OpenCascade.js
API ReferenceModelingAlgorithmsTKHLR

Contap

OCCT package Contap: Contap_ArcFunction, Contap_ContAna, Contap_Contour, Contap_HContTool, and 13 more bound classes.

Contap_ArcFunction

Constructors(1)

Instance methods(15)

  • Parameters (1)
    • S
  • Set(Direction: gp_Dir): void
    Parameters (1)
    • Direction
  • Set(Eye: gp_Pnt): void
    Parameters (1)
    • Eye
  • Parameters (1)
    • A
  • Set(Direction: gp_Dir, Angle: number): void
    Parameters (2)
    • Direction
    • Angle
  • Set(Eye: gp_Pnt, Angle: number): void
    Parameters (2)
    • Eye
    • Angle
  • Value(X: number, F: number): { returnValue: boolean; F: number }

    Computes the value <F>of the function for the variable <X>. Returns True if the calculation were successfully done, False otherwise.

    Parameters (2)
    • X
    • F
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
  • Derivative(X: number, D: number): { returnValue: boolean; D: number }

    Computes the derivative <D> of the function for the variable <X>. Returns True if the calculation were successfully done, False otherwise.

    Parameters (2)
    • X
    • D
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • D: updated value from the call.
  • Values(X: number, F: number, D: number): { returnValue: boolean; F: number; D: number }

    Computes the value <F> and the derivative <D> of the function for the variable <X>. Returns True if the calculation were successfully done, False otherwise.

    Parameters (3)
    • X
    • F
    • D
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
    • D: updated value from the call.
  • NbSamples(): number
  • GetStateNumber(): number

    returns the state of the function corresponding to the latest call of any methods associated with the function.
    This function is called by each of the algorithms described later which defined the function Integer Algorithm::StateNumber().
    The algorithm has the responsibility to call this function when it has found a solution (i.e. a root or a minimum) and has to maintain the association between the solution found and this StateNumber. Byu default, this method returns 0 (which means for the algorithm: no state has been saved).
    It is the responsibility of the programmer to decide if he needs to save the current state of the function and to return an Integer that allows retrieval of the state.

  • Valpoint(Index: number): gp_Pnt
    Parameters (1)
    • Index
  • Returns mySurf field.

  • Returns the point, which has been computed while the last calling Value() method.

Contap_ContAna

This class provides the computation of the contours for quadric surfaces.

Constructors(1)

Instance methods(14)

Contap_Contour

Constructors(7)

Instance methods(12)

Contap_HContTool

Tool for the intersection between 2 surfaces. Regroupe pour l instant les methodes hors Adaptor3d...

Constructors(1)

Static methods(18)

  • NbSamplesU(S: Adaptor3d_Surface, u1: number, u2: number): number
    Parameters (3)
    • S
    • u1
    • u2
  • NbSamplesV(S: Adaptor3d_Surface, v1: number, v2: number): number
    Parameters (3)
    • S
    • v1
    • v2
  • Parameters (1)
    • S
  • SamplePoint(S: Adaptor3d_Surface, Index: number, U: number, V: number): { U: number; V: number }
    Parameters (4)
    • S
    • Index
    • U
    • V
  • Returns True if all the intersection point and edges are known on the Arc. The intersection point are given as vertices. The intersection edges are given as intervals between two vertices.

    Parameters (1)
    • C
  • returns the number of points which is used to make a sample on the arc. this number is a function of the Surface and the CurveOnSurface complexity.

    Parameters (1)
    • A
  • Bounds(C: Adaptor2d_Curve2d, Ufirst: number, Ulast: number): { Ufirst: number; Ulast: number }

    Returns the parametric limits on the arc C. These limits must be finite : they are either the real limits of the arc, for a finite arc, or a bounding box for an infinite arc.

    Parameters (3)
    • C
    • Ufirst
    • Ulast
    Returns

    A result object with fields:

    • Ufirst: updated value from the call.
    • Ulast: updated value from the call.
  • Project(C: Adaptor2d_Curve2d, P: gp_Pnt2d, Paramproj: number, Ptproj: gp_Pnt2d): { returnValue: boolean; Paramproj: number }

    Projects the point P on the arc C. If the methods returns true, the projection is successful, and Paramproj is the parameter on the arc of the projected point, Ptproj is the projected Point. If the method returns false, Param proj and Ptproj are not significant.

    Parameters (4)
    • C
    • P
    • Paramproj
    • Ptproj
      Mutated in place; read the updated value from this argument after the call.
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • Paramproj: updated value from the call.
  • Returns the parametric tolerance used to consider that the vertex and another point meet, i-e if std::abs(parameter(Vertex) - parameter(OtherPnt))<= Tolerance, the points are "merged".

    Parameters (2)
    • V
    • C
  • Returns the parameter of the vertex V on the arc A.

    Parameters (2)
    • V
    • C
  • Returns the number of intersection points on the arc A.

    Parameters (1)
    • C
  • Value(C: Adaptor2d_Curve2d, Index: number, Pt: gp_Pnt, Tol: number, U: number): { Tol: number; U: number }

    Returns the value (Pt), the tolerance (Tol), and the parameter (U) on the arc A , of the intersection point of range Index.

    Parameters (5)
    • C
    • Index
    • Pt
      Mutated in place; read the updated value from this argument after the call.
    • Tol
    • U
    Returns

    A result object with fields:

    • Tol: updated value from the call.
    • U: updated value from the call.
  • IsVertex(C: Adaptor2d_Curve2d, Index: number): boolean

    Returns True if the intersection point of range Index corresponds with a vertex on the arc A.

    Parameters (2)
    • C
    • Index
  • Vertex(C: Adaptor2d_Curve2d, Index: number): { V: Adaptor3d_HVertex; [Symbol.dispose](): void }

    When IsVertex returns True, this method returns the vertex on the arc A.

    Parameters (2)
    • C
    • Index
    Returns

    A result object with fields:

    • V: owned by the returned envelope.
      Dispose the returned envelope to release owned Handle fields.
  • returns the number of part of A solution of the of intersection problem.

    Parameters (1)
    • C
  • HasFirstPoint(C: Adaptor2d_Curve2d, Index: number, IndFirst: number): { returnValue: boolean; IndFirst: number }

    Returns True when the segment of range Index is not open at the left side. In that case, IndFirst is the range in the list intersection points (see NbPoints) of the one which defines the left bound of the segment. Otherwise, the method has to return False, and IndFirst has no meaning.

    Parameters (3)
    • C
    • Index
    • IndFirst
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • IndFirst: updated value from the call.
  • HasLastPoint(C: Adaptor2d_Curve2d, Index: number, IndLast: number): { returnValue: boolean; IndLast: number }

    Returns True when the segment of range Index is not open at the right side. In that case, IndLast is the range in the list intersection points (see NbPoints) of the one which defines the right bound of the segment. Otherwise, the method has to return False, and IndLast has no meaning.

    Parameters (3)
    • C
    • Index
    • IndLast
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • IndLast: updated value from the call.
  • Returns True when the whole restriction is solution of the intersection problem.

    Parameters (1)
    • C

Contap_HCurve2dTool

Constructors(1)

Static methods(24)

Contap_Line

Constructors(1)

Instance methods(19)

Contap_Point

Definition of a vertex on the contour line. Most of the time, such a point is an intersection between the contour and a restriction of the surface. When it is not the method IsOnArc return False. Such a point is contains geometrical information (see the Value method) and logical information.

Constructors(2)

Instance methods(18)

  • SetValue(Pt: gp_Pnt, U: number, V: number): void

    Sets the values for a point.

    Parameters (3)
    • Pt
    • U
    • V
  • SetParameter(Para: number): void

    Set the value of the parameter on the intersection line.

    Parameters (1)
    • Para
  • Sets the values of a point which is a vertex on the initial facet of restriction of one of the surface.

    Parameters (1)
    • V
  • SetArc(A: Adaptor2d_Curve2d, Param: number, TLine: IntSurf_Transition, TArc: IntSurf_Transition): void

    Sets the value of the arc and of the parameter on this arc of the point.

    Parameters (4)
    • A
    • Param
    • TLine
    • TArc
  • SetMultiple(): void
  • SetInternal(): void
  • Returns the intersection point (geometric information).

  • ParameterOnLine(): number

    This method returns the parameter of the point on the intersection line. If the points does not belong to an intersection line, the value returned does not have any sens.

  • Parameters(U1: number, V1: number): { U1: number; V1: number }

    Returns the parameters on the surface of the point.

    Parameters (2)
    • U1
    • V1
    Returns

    A result object with fields:

    • U1: updated value from the call.
    • V1: updated value from the call.
  • IsOnArc(): boolean

    Returns True when the point is an intersection between the contour and a restriction.

  • Returns the arc of restriction containing the vertex.

  • ParameterOnArc(): number

    Returns the parameter of the point on the arc returned by the method Arc().

  • Returns the transition of the point on the contour.

  • Returns the transition of the point on the arc.

  • IsVertex(): boolean

    Returns TRUE if the point is a vertex on the initial restriction facet of the surface.

  • Returns the information about the point when it is on the domain of the patch, i-e when the function IsVertex returns True. Otherwise, an exception is raised.

  • IsMultiple(): boolean

    Returns True if the point belongs to several lines.

  • IsInternal(): boolean

    Returns True if the point is an internal one, i.e if the tangent to the line on the point and the eye direction are parallel.

Contap_SurfFunction

This class describes the function on a parametric surface. the form of the function is F(u,v) = 0 where u and v are the parametric coordinates of a point on the surface, to compute the contours of the surface.

Constructors(1)

Instance methods(23)

Contap_SurfProps

Internal tool used to compute the normal and its derivatives.

Constructors(1)

Static methods(3)

  • Normale(S: Adaptor3d_Surface, U: number, V: number, P: gp_Pnt, N: gp_Vec): void

    Computes the point.
    , and normal vector <N> on at parameters U,V.

    Parameters (5)
    • S
    • U
    • V
    • P
      Mutated in place; read the updated value from this argument after the call.
    • N
      Mutated in place; read the updated value from this argument after the call.
  • DerivAndNorm(S: Adaptor3d_Surface, U: number, V: number, P: gp_Pnt, d1u: gp_Vec, d1v: gp_Vec, N: gp_Vec): void

    Computes the point.
    , and normal vector <N> on at parameters U,V.

    Parameters (7)
    • S
    • U
    • V
    • P
      Mutated in place; read the updated value from this argument after the call.
    • d1u
      Mutated in place; read the updated value from this argument after the call.
    • d1v
      Mutated in place; read the updated value from this argument after the call.
    • N
      Mutated in place; read the updated value from this argument after the call.
  • NormAndDn(S: Adaptor3d_Surface, U: number, V: number, P: gp_Pnt, N: gp_Vec, Dnu: gp_Vec, Dnv: gp_Vec): void

    Computes the point.
    , normal vector <N>, and its derivatives <Dnu> and <Dnv> on at parameters U,V.

    Parameters (7)
    • S
    • U
    • V
    • P
      Mutated in place; read the updated value from this argument after the call.
    • N
      Mutated in place; read the updated value from this argument after the call.
    • Dnu
      Mutated in place; read the updated value from this argument after the call.
    • Dnv
      Mutated in place; read the updated value from this argument after the call.

Contap_TheIWalking

Constructors(1)

  • constructor(Epsilon: number, Deflection: number, Step: number, theToFillHoles?: boolean): Contap_TheIWalking

    Deflection is the maximum deflection admitted between two consecutive points on a resulting polyline. Step is the maximum increment admitted between two consecutive points (in 2d space). Epsilon is the tolerance beyond which 2 points are confused. theToFillHoles is the flag defining whether possible holes between resulting curves are filled or not in case of Contap walking theToFillHoles is True.

    Parameters (4)
    • Epsilon
    • Deflection
    • Step
    • theToFillHoles

Instance methods(8)

  • SetTolerance(Epsilon: number, Deflection: number, Step: number): void

    Deflection is the maximum deflection admitted between two consecutive points on a resulting polyline. Step is the maximum increment admitted between two consecutive points (in 2d space). Epsilon is the tolerance beyond which 2 points are confused.

    Parameters (3)
    • Epsilon
    • Deflection
    • Step
  • Searches a set of polylines starting on a point of Pnts1 or Pnts2. Each point on a resulting polyline verifies F(u,v)=0.

    Parameters (5)
    • Pnts1
    • Pnts2
    • Func
      Mutated in place; read the updated value from this argument after the call.
    • S
    • Reversed
  • Searches a set of polylines starting on a point of Pnts1. Each point on a resulting polyline verifies F(u,v)=0.

    Parameters (4)
    • Pnts1
    • Func
      Mutated in place; read the updated value from this argument after the call.
    • S
    • Reversed
  • IsDone(): boolean

    Returns true if the calculus was successful.

  • NbLines(): number

    Returns the number of resulting polylines. An exception is raised if IsDone returns False.

  • Returns the polyline of range Index. An exception is raised if IsDone is False. An exception is raised if Index<=0 or Index>NbLines.

    Parameters (1)
    • Index
  • NbSinglePnts(): number

    Returns the number of points belonging to Pnts on which no line starts or ends. An exception is raised if IsDone returns False.

  • Returns the point of range Index . An exception is raised if IsDone returns False. An exception is raised if Index<=0 or Index > NbSinglePnts.

    Parameters (1)
    • Index

Contap_TheIWLineOfTheIWalking

Constructors(1)

Static methods(2)

Instance methods(28)

  • Reverse(): void

    reverse the points in the line. Hasfirst, HasLast are kept.

  • Cut(Index: number): void

    Cut the line at the point of rank Index.

    Parameters (1)
    • Index
  • Add a point in the line.

    Parameters (1)
    • P
  • AddStatusFirst(Closed: boolean, HasFirst: boolean): void
    Parameters (2)
    • Closed
    • HasFirst
  • AddStatusFirst(Closed: boolean, HasLast: boolean, Index: number, P: IntSurf_PathPoint): void
    Parameters (4)
    • Closed
    • HasLast
    • Index
    • P
  • AddStatusFirstLast(Closed: boolean, HasFirst: boolean, HasLast: boolean): void
    Parameters (3)
    • Closed
    • HasFirst
    • HasLast
  • AddStatusLast(HasLast: boolean): void
    Parameters (1)
    • HasLast
  • AddStatusLast(HasLast: boolean, Index: number, P: IntSurf_PathPoint): void
    Parameters (3)
    • HasLast
    • Index
    • P
  • AddIndexPassing(Index: number): void

    associate the index of the point on the line with the index of the point passing through the starting iterator

    Parameters (1)
    • Index
  • SetTangentVector(V: gp_Vec, Index: number): void
    Parameters (2)
    • V
    • Index
  • SetTangencyAtBegining(IsTangent: boolean): void
    Parameters (1)
    • IsTangent
  • SetTangencyAtEnd(IsTangent: boolean): void
    Parameters (1)
    • IsTangent
  • NbPoints(): number

    Returns the number of points of the line (including first point and end point : see HasLastPoint and HasFirstPoint).

  • Value(Index: number): IntSurf_PntOn2S

    Returns the point of range Index. If index <= 0 or Index > NbPoints, an exception is raised.

    Parameters (1)
    • Index
  • Returns the LineOn2S contained in the walking line.

  • IsClosed(): boolean

    Returns True if the line is closed.

  • HasFirstPoint(): boolean

    Returns True if the first point of the line is a marching point. when is HasFirstPoint==False ,the line begins on the natural bound of the surface. The line can be too long.

  • HasLastPoint(): boolean

    Returns True if the end point of the line is a marching point (Point from IntWS). when is HasFirstPoint==False the line ends on the natural bound of the surface. The line can be too long.

  • Returns the first point of the line when it is a marching point. An exception is raised if HasFirstPoint returns False.

  • FirstPointIndex(): number

    Returns the Index of first point of the line when it is a marching point. This index is the index in the PointStartIterator. An exception is raised if HasFirstPoint returns False.

  • Returns the last point of the line when it is a marching point. An exception is raised if HasLastPoint returns False.

  • LastPointIndex(): number

    Returns the index of last point of the line when it is a marching point. This index is the index in the PointStartIterator. An exception is raised if HasLastPoint returns False.

  • NbPassingPoint(): number

    returns the number of points belonging to Pnts1 which are passing point.

  • PassingPoint(Index: number, IndexLine: number, IndexPnts: number): { IndexLine: number; IndexPnts: number }

    returns the index of the point belonging to the line which is associated to the passing point belonging to Pnts1 an exception is raised if Index > NbPassingPoint()

    Parameters (3)
    • Index
    • IndexLine
    • IndexPnts
    Returns

    A result object with fields:

    • IndexLine: updated value from the call.
    • IndexPnts: updated value from the call.
  • TangentVector(Index: number): { returnValue: gp_Vec; Index: number; [Symbol.dispose](): void }
    Parameters (1)
    • Index
  • IsTangentAtEnd(): boolean

Contap_ThePathPointOfTheSearch

Constructors(3)

Instance methods(8)

Contap_TheSearch

Constructors(1)

Instance methods(7)

  • Perform(F: Contap_ArcFunction, Domain: Adaptor3d_TopolTool, TolBoundary: number, TolTangency: number, RecheckOnRegularity: boolean): void

    Algorithm to find the points and parts of curves of Domain (domain of of restriction of a surface) which verify F = 0. TolBoundary defines if a curve is on Q. TolTangency defines if a point is on Q.

    Parameters (5)
    • F
      Mutated in place; read the updated value from this argument after the call.
    • Domain
    • TolBoundary
    • TolTangency
    • RecheckOnRegularity
  • IsDone(): boolean

    Returns True if the calculus was successful.

  • AllArcSolution(): boolean

    Returns true if all arc of the Arcs are solution (inside the surface). An exception is raised if IsDone returns False.

  • NbPoints(): number

    Returns the number of resulting points. An exception is raised if IsDone returns False (NotDone).

  • Returns the resulting point of range Index. The exception NotDone is raised if IsDone() returns False. The exception OutOfRange is raised if Index <= 0 or Index > NbPoints.

    Parameters (1)
    • Index
  • NbSegments(): number

    Returns the number of the resulting segments. An exception is raised if IsDone returns False (NotDone).

  • Returns the resulting segment of range Index. The exception NotDone is raised if IsDone() returns False. The exception OutOfRange is raised if Index <= 0 or Index > NbPoints.

    Parameters (1)
    • Index

Contap_TheSearchInside

Constructors(2)

Instance methods(5)

Contap_TheSegmentOfTheSearch

Constructors(1)

Instance methods(7)