OpenCascade.js
API ReferenceModelingAlgorithmsTKTopAlgo

BRepLib

OCCT package BRepLib: BRepLib, BRepLib_CheckCurveOnSurface, BRepLib_Command, BRepLib_EdgeError, and 18 more bound classes.

BRepLib

The BRepLib package provides general utilities for BRep.

  • FindSurface : Class to compute a surface through a set of edges.
  • Compute missing 3d curve on an edge.

Constructors(1)

Static methods(33)

  • Precision(P: number): void

    Computes the max distance between edge and its 2d representation on the face. Sets the default precision. The current Precision is returned.

    Parameters (1)
    • P
  • Precision(): number

    Returns the default precision.

  • Plane(P: Geom_Plane): void

    Sets the current plane to P.

    Parameters (1)
    • P
  • Returns the current plane.

  • CheckSameRange(E: TopoDS_Edge, Confusion?: number): boolean

    checks if the Edge is same range IGNORING the same range flag of the edge Confusion argument is to compare real numbers idenpendently of any model space tolerance

    Parameters (2)
    • E
    • Confusion
  • SameRange(E: TopoDS_Edge, Tolerance?: number): void

    will make all the curve representation have the same range domain for the parameters. This will IGNORE the same range flag value to proceed. If there is a 3D curve there it will the range of that curve. If not the first curve representation encountered in the list will give its range to the all the other curves.

    Parameters (2)
    • E
    • Tolerance
  • BuildCurve3d(E: TopoDS_Edge, Tolerance?: number, Continuity?: GeomAbs_Shape, MaxDegree?: number, MaxSegment?: number): boolean

    Computes the 3d curve for the edge <E> if it does not exist. Returns True if the curve was computed or existed. Returns False if there is no planar pcurve or the computation failed. <MaxSegment> >= 30 in approximation.

    Parameters (5)
    • E
    • Tolerance
    • Continuity
    • MaxDegree
    • MaxSegment
  • BuildCurves3d(S: TopoDS_Shape, Tolerance: number, Continuity: GeomAbs_Shape, MaxDegree: number, MaxSegment: number): boolean

    Computes the 3d curves for all the edges of return False if one of the computation failed. <MaxSegment> >= 30 in approximation.

    Parameters (5)
    • S
    • Tolerance
    • Continuity
    • MaxDegree
    • MaxSegment
  • Computes the 3d curves for all the edges of return False if one of the computation failed.

    Parameters (1)
    • S
  • Builds pcurve of edge on face if the surface is plane, and updates the edge.

    Parameters (2)
    • theE
    • theF
  • BuildPCurveForEdgeOnPlane(theE: TopoDS_Edge, theF: TopoDS_Face, bToUpdate: boolean): { aC2D: Geom2d_Curve; bToUpdate: boolean; [Symbol.dispose](): void }

    Builds pcurve of edge on face if the surface is plane, but does not update the edge. The output are the pcurve and the flag telling that pcurve was built.

    Parameters (3)
    • theE
    • theF
    • bToUpdate
    Returns

    A result object with fields:

    • aC2D: owned by the returned envelope.
    • bToUpdate: updated value from the call.
      Dispose the returned envelope to release owned Handle fields.
  • UpdateEdgeTol(E: TopoDS_Edge, MinToleranceRequest: number, MaxToleranceToCheck: number): boolean

    Checks if the edge has a Tolerance smaller than MaxToleranceToCheck if so it will compute the radius of the cylindrical pipe surface that MinToleranceRequest is the minimum tolerance before it is useful to start testing. Usually it should be around 10e-5 contains all the curve representation of the edge returns True if the Edge tolerance had to be updated.

    Parameters (3)
    • E
    • MinToleranceRequest
    • MaxToleranceToCheck
  • UpdateEdgeTolerance(S: TopoDS_Shape, MinToleranceRequest: number, MaxToleranceToCheck: number): boolean

    Checks all the edges of the shape whose Tolerance is smaller than MaxToleranceToCheck Returns True if at least one edge was updated MinToleranceRequest is the minimum tolerance before it is useful to start testing. Usually it should be around 10e-5.
    Warning: The method is very slow as it checks all. Use only in interfaces or processing assimilate batch

    Parameters (3)
    • S
    • MinToleranceRequest
    • MaxToleranceToCheck
  • SameParameter(theEdge: TopoDS_Edge, Tolerance: number): void

    Computes new 2d curve(s) for the edge <theEdge> to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on the Edge.

    Parameters (2)
    • theEdge
    • Tolerance
  • SameParameter(S: TopoDS_Shape, Tolerance: number, forced: boolean): void

    Computes new 2d curve(s) for all the edges of to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on an Edge.

    Parameters (3)
    • S
    • Tolerance
    • forced
  • SameParameter(theEdge: TopoDS_Edge, theTolerance: number, theNewTol: number, IsUseOldEdge: boolean): { returnValue: TopoDS_Edge; theNewTol: number; [Symbol.dispose](): void }

    Computes new 2d curve(s) for the edge <theEdge> to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on the Edge. theNewTol is a new tolerance of vertices of the input edge (not applied inside the algorithm, but pre-computed). If IsUseOldEdge is true then the input edge will be modified, otherwise the new copy of input edge will be created. Returns the new edge as a result, can be ignored if IsUseOldEdge is true.

    Parameters (4)
    • theEdge
    • theTolerance
    • theNewTol
    • IsUseOldEdge
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • theNewTol: updated value from the call.
      Dispose the returned envelope to release owned Handle fields.
  • SameParameter(S: TopoDS_Shape, theReshaper: BRepTools_ReShape, Tolerance: number, forced: boolean): void

    Computes new 2d curve(s) for all the edges of to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on an Edge. theReshaper is used to record the modifications of input shape to prevent any modifications on the shape itself. Thus the input shape (and its subshapes) will not be modified, instead the reshaper will contain a modified empty-copies of original subshapes as substitutions.

    Parameters (4)
    • S
    • theReshaper
      Mutated in place; read the updated value from this argument after the call.
    • Tolerance
    • forced
  • UpdateTolerances(S: TopoDS_Shape, verifyFaceTolerance: boolean): void

    Replaces tolerance of FACE EDGE VERTEX by the tolerance Max of their connected handling shapes. It is not necessary to use this call after SameParameter. (called in).

    Parameters (2)
    • S
    • verifyFaceTolerance
  • UpdateTolerances(S: TopoDS_Shape, theReshaper: BRepTools_ReShape, verifyFaceTolerance: boolean): void

    Replaces tolerance of FACE EDGE VERTEX by the tolerance Max of their connected handling shapes. It is not necessary to use this call after SameParameter. (called in) theReshaper is used to record the modifications of input shape to prevent any modifications on the shape itself. Thus the input shape (and its subshapes) will not be modified, instead the reshaper will contain a modified empty-copies of original subshapes as substitutions.

    Parameters (3)
    • S
    • theReshaper
      Mutated in place; read the updated value from this argument after the call.
    • verifyFaceTolerance
  • Checks tolerances of edges (including inner points) and vertices of a shape and updates them to satisfy "SameParameter" condition.

    Parameters (1)
    • S
  • Orients the solid forward and the shell with the orientation to have matter in the solid. Returns False if the solid is unOrientable (open or incoherent).

    Parameters (1)
    • solid
      Mutated in place; read the updated value from this argument after the call.
  • ContinuityOfFaces(theEdge: TopoDS_Edge, theFace1: TopoDS_Face, theFace2: TopoDS_Face, theAngleTol: number): GeomAbs_Shape

    Returns the order of continuity between two faces connected by an edge.

    Parameters (4)
    • theEdge
    • theFace1
    • theFace2
    • theAngleTol
  • EncodeRegularity(S: TopoDS_Shape, TolAng: number): void

    Encodes the Regularity of edges on a Shape. Warning: <TolAng> is an angular tolerance, expressed in Rad. Warning: If the edges's regularity are coded before, nothing is done.

    Parameters (2)
    • S
    • TolAng
  • Encodes the Regularity of edges in list <LE> on the shape Warning: <TolAng> is an angular tolerance, expressed in Rad. Warning: If the edges's regularity are coded before, nothing is done.

    Parameters (3)
    • S
    • LE
    • TolAng
  • EncodeRegularity(E: TopoDS_Edge, F1: TopoDS_Face, F2: TopoDS_Face, TolAng: number): void

    Encodes the Regularity between <F1> and <F2> by <E> Warning: <TolAng> is an angular tolerance, expressed in Rad. Warning: If the edge's regularity is coded before, nothing is done.

    Parameters (4)
    • E
      Mutated in place; read the updated value from this argument after the call.
    • F1
    • F2
    • TolAng
  • Sorts in LF the Faces of S on the complexity of their surfaces (Plane,Cylinder,Cone,Sphere,Torus,other).

    Parameters (2)
    • S
    • LF
      Mutated in place; read the updated value from this argument after the call.
  • Sorts in LF the Faces of S on the reverse complexity of their surfaces (other,Torus,Sphere,Cone,Cylinder,Plane).

    Parameters (2)
    • S
    • LF
      Mutated in place; read the updated value from this argument after the call.
  • EnsureNormalConsistency(S: TopoDS_Shape, theAngTol?: number, ForceComputeNormals?: boolean): boolean

    Corrects the normals in Poly_Triangulation of faces, in such way that normals at nodes lying along smooth edges have the same value on both adjacent triangulations. Returns TRUE if any correction is done.

    Parameters (3)
    • S
    • theAngTol
    • ForceComputeNormals
  • Updates value of deflection in Poly_Triangulation of faces by the maximum deviation measured on existing triangulation.

    Parameters (1)
    • S
  • BoundingVertex(theLV: NCollection_List_TopoDS_Shape, theNewCenter: gp_Pnt, theNewTol: number): { theNewTol: number }

    Calculates the bounding sphere around the set of vertexes from the theLV list. Returns the center (theNewCenter) and the radius (theNewTol) of this sphere. This can be used to construct the new vertex which covers the given set of other vertices.

    Parameters (3)
    • theLV
    • theNewCenter
      Mutated in place; read the updated value from this argument after the call.
    • theNewTol
    Returns

    A result object with fields:

    • theNewTol: updated value from the call.
  • FindValidRange(theCurve: Adaptor3d_Curve, theTolE: number, theParV1: number, thePntV1: gp_Pnt, theTolV1: number, theParV2: number, thePntV2: gp_Pnt, theTolV2: number, theFirst: number, theLast: number): { returnValue: boolean; theFirst: number; theLast: number }

    For an edge defined by 3d curve and tolerance and vertices defined by points, parameters on curve and tolerances, finds a range of curve between vertices not covered by vertices tolerances. Returns false if there is no such range. Otherwise, sets theFirst and theLast as its bounds.

    Parameters (10)
    • theCurve
    • theTolE
    • theParV1
    • thePntV1
    • theTolV1
    • theParV2
    • thePntV2
    • theTolV2
    • theFirst
    • theLast
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • theFirst: updated value from the call.
    • theLast: updated value from the call.
  • FindValidRange(theEdge: TopoDS_Edge, theFirst: number, theLast: number): { returnValue: boolean; theFirst: number; theLast: number }

    Finds a range of 3d curve of the edge not covered by vertices tolerances. Returns false if there is no such range. Otherwise, sets theFirst and theLast as its bounds.

    Parameters (3)
    • theEdge
    • theFirst
    • theLast
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • theFirst: updated value from the call.
    • theLast: updated value from the call.
  • ExtendFace(theF: TopoDS_Face, theExtVal: number, theExtUMin: boolean, theExtUMax: boolean, theExtVMin: boolean, theExtVMax: boolean, theFExtended: TopoDS_Face): void

    Enlarges the face on the given value.

    Parameters (7)
    • theF
      The face to extend
    • theExtVal
      The extension value
    • theExtUMin
      Defines whether to extend the face in UMin direction
    • theExtUMax
      Defines whether to extend the face in UMax direction
    • theExtVMin
      Defines whether to extend the face in VMin direction
    • theExtVMax
      Defines whether to extend the face in VMax direction
    • theFExtended
      The extended face Mutated in place; read the updated value from this argument after the call.

BRepLib_CheckCurveOnSurface

Computes the max distance between edge and its 2d representation on the face. This class is not intended to process non-sameparameter edges.

Constructors(2)

Instance methods(8)

  • Init(theEdge: TopoDS_Edge, theFace: TopoDS_Face): void

    Sets the data for the algorithm.

    Parameters (2)
    • theEdge
    • theFace
  • Perform(): void

    Performs the calculation If myIsParallel == true then computation will be performed in parallel.

  • IsDone(): boolean

    Returns true if the max distance has been found.

  • SetParallel(theIsParallel: boolean): void

    Sets parallel flag.

    Parameters (1)
    • theIsParallel
  • IsParallel(): boolean

    Returns true if parallel flag is set.

  • ErrorStatus(): number

    Returns error status The possible values are: 0 - OK; 1 - null curve or surface or 2d curve; 2 - invalid parametric range; 3 - error in calculations.

  • MaxDistance(): number

    Returns max distance.

  • MaxParameter(): number

    Returns parameter in which the distance is maximal.

BRepLib_Command

Root class for all commands in BRepLib.
Provides :

  • Managements of the notDone flag.
  • Catching of exceptions (not implemented).
  • Logging (not implemented).

Instance methods(2)

  • IsDone(): boolean
  • Check(): void

    Raises NotDone if done is false.

BRepLib_EdgeError

Properties(7)

BRepLib_FindSurface

Provides an algorithm to find a Surface through a set of edges.
The edges of the shape given as argument are explored if they are not coplanar at the required tolerance the method Found returns false.
If a null tolerance is given the max of the edges tolerances is used.
The method Tolerance returns the true distance of the edges to the Surface.
The method Surface returns the Surface if found.
The method Existed returns True if the Surface was already attached to some of the edges.
When Existed returns True the Surface may have a location given by the Location method.

Constructors(2)

  • constructor(S: TopoDS_Shape, Tol?: number, OnlyPlane?: boolean, OnlyClosed?: boolean): BRepLib_FindSurface

    Computes the Surface from the edges of with the given tolerance. if <OnlyPlane> is true, the computed surface will be a plane. If it is not possible to find a plane, the flag NotDone will be set. If <OnlyClosed> is true, then S should be a wire and the existing surface, on which wire S is not closed in 2D, will be ignored.

    Parameters (4)
    • S
    • Tol
    • OnlyPlane
    • OnlyClosed

Instance methods(7)

  • Init(S: TopoDS_Shape, Tol?: number, OnlyPlane?: boolean, OnlyClosed?: boolean): void

    Computes the Surface from the edges of with the given tolerance. if <OnlyPlane> is true, the computed surface will be a plane. If it is not possible to find a plane, the flag NotDone will be set. If <OnlyClosed> is true, then S should be a wire and the existing surface, on which wire S is not closed in 2D, will be ignored.

    Parameters (4)
    • S
    • Tol
    • OnlyPlane
    • OnlyClosed
  • Found(): boolean
  • Tolerance(): number
  • Existed(): boolean

BRepLib_FuseEdges

This class can detect vertices in a face that can be considered useless and then perform the fuse of the edges and remove the useless vertices. By useles vertices, we mean:

  • vertices that have exactly two connex edges
  • the edges connex to the vertex must have exactly the same 2 connex faces.
  • The edges connex to the vertex must have the same geometric support.

Constructors(1)

Instance methods(8)

  • set edges to avoid being fused

    Parameters (1)
    • theMapEdg
  • SetConcatBSpl(theConcatBSpl?: boolean): void

    set mode to enable concatenation G1 BSpline edges in one End Modified by IFV 19.04.07

    Parameters (1)
    • theConcatBSpl
  • returns all the list of edges to be fused each list of the map represent a set of connex edges that can be fused.

    Parameters (1)
    • theMapLstEdg
      Mutated in place; read the updated value from this argument after the call.
  • returns all the fused edges. each integer entry in the map corresponds to the integer in the DataMapOfIntegerListOfShape we get in method Edges. That is to say, to the list of edges in theMapLstEdg(i) corresponds the resulting edge theMapEdge(i)

    Parameters (1)
    • theMapEdg
      Mutated in place; read the updated value from this argument after the call.
  • returns the map of modified faces.

    Parameters (1)
    • theMapFac
      Mutated in place; read the updated value from this argument after the call.
  • returns myShape modified with the list of internal edges removed from it.

  • NbVertices(): number

    returns the number of vertices candidate to be removed

  • Perform(): void

    Using map of list of connex edges, fuse each list to one edge and then update myShape.

BRepLib_MakeEdge

Provides methods to build edges.
The methods have the following syntax, where TheCurve is one of Lin, Circ, ...
Create(C : TheCurve)
Makes an edge on the whole curve. Add vertices on finite curves.
Create(C : TheCurve; p1,p2 : Real)
Make an edge on the curve between parameters p1 and p2. if p2 < p1 the edge will be REVERSED. If p1 or p2 is infinite the curve will be open in that direction. Vertices are created for finite values of p1 and p2.
Create(C : TheCurve; P1, P2 : Pnt from gp)
Make an edge on the curve between the points P1 and P2. The points are projected on the curve and the previous method is used. An error is raised if the points are not on the curve.
Create(C : TheCurve; V1, V2 : Vertex from TopoDS)
Make an edge on the curve between the vertices V1 and V2. Same as the previous but no vertices are created. If a vertex is Null the curve will be open in this direction.

Constructors(35)

Instance methods(16)

BRepLib_MakeEdge2d

Provides methods to build edges.
The methods have the following syntax, where TheCurve is one of Lin2d, Circ2d, ...
Create(C : TheCurve)
Makes an edge on the whole curve. Add vertices on finite curves.
Create(C : TheCurve; p1,p2 : Real)
Make an edge on the curve between parameters p1 and p2. if p2 < p1 the edge will be REVERSED. If p1 or p2 is infinite the curve will be open in that direction. Vertices are created for finite values of p1 and p2.
Create(C : TheCurve; P1, P2 : Pnt2d from gp)
Make an edge on the curve between the points P1 and P2. The points are projected on the curve and the previous method is used. An error is raised if the points are not on the curve.
Create(C : TheCurve; V1, V2 : Vertex from TopoDS)
Make an edge on the curve between the vertices V1 and V2. Same as the previous but no vertices are created. If a vertex is Null the curve will be open in this direction.

Constructors(28)

Instance methods(10)

BRepLib_MakeFace

Provides methods to build faces.
A face may be built :

  • From a surface.
  • Elementary surface from gp.
  • Surface from Geom.
  • From a surface and U,V values.
  • From a wire.
  • Find the surface automatically if possible.
  • From a surface and a wire.
  • A flag Inside is given, when this flag is True the wire is oriented to bound a finite area on the surface.
  • From a face and a wire.
  • The new wire is a perforation.

Constructors(22)

Static methods(1)

  • IsDegenerated(theCurve: Geom_Curve, theMaxTol: number, theActTol: number): { returnValue: boolean; theActTol: number }

    Checks the specified curve is degenerated according to specified tolerance. Returns <theActTol> less than <theMaxTol>, which shows actual tolerance to decide the curve is degenerated. Warning: For internal use of BRepLib_MakeFace and BRepLib_MakeShell.

    Parameters (3)
    • theCurve
    • theMaxTol
    • theActTol
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • theActTol: updated value from the call.

Instance methods(6)

  • Init(F: TopoDS_Face): void

    Load the face.

    Parameters (1)
    • F
  • Init(S: Geom_Surface, Bound: boolean, TolDegen: number): void

    Creates the face from the surface. If Bound is True a wire is made from the natural bounds. Accepts tolerance value (TolDegen) for resolution of degenerated edges.

    Parameters (3)
    • S
    • Bound
    • TolDegen
  • Init(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, TolDegen: number): void

    Creates the face from the surface and the min-max values. Accepts tolerance value (TolDegen) for resolution of degenerated edges.

    Parameters (6)
    • S
    • UMin
    • UMax
    • VMin
    • VMax
    • TolDegen
  • Add(W: TopoDS_Wire): void

    Adds the wire <W> in the current face.

    Parameters (1)
    • W
  • Returns the new face.

BRepLib_MakePolygon

Class to build polygonal wires.
A polygonal wire may be build from

  • 2,4,3 points.
  • 2,3,4 vertices.
  • any number of points.
  • any number of vertices.
    When a point or vertex is added to the polygon if it is identic to the previous point no edge is built. The method added can be used to test it.

Constructors(7)

Instance methods(8)

BRepLib_MakeShape

This is the root class for all shape constructions. It stores the result.
It provides deferred methods to trace the history of sub-shapes.

Instance methods(8)

BRepLib_MakeShell

Provides methods to build shells.
Build a shell from a set of faces. Build untied shell from a non C2 surface splitting it into C2-continuous parts.

Constructors(3)

Instance methods(3)

BRepLib_MakeSolid

Makes a solid from compsolid or shells.

Constructors(7)

Instance methods(3)

BRepLib_MakeWire

Provides methods to build wires.
A wire may be built:

  • From a single edge.
  • From a wire and an edge.
  • A new wire is created with the edges of the wire + the edge.
  • If the edge is not connected to the wire the flag NotDone is set and the method Wire will raise an error.
  • The connection may be:
    . Through an existing vertex. The edge is shared.
    . Through a geometric coincidence of vertices. The edge is copied and the vertices from the edge are replaced by the vertices from the wire.
    . The new edge and the connection vertices are kept by the algorithm.
  • From 2, 3, 4 edges.
  • A wire is created from the first edge, the following edges are added.
  • From many edges.
  • The following syntax may be used :
    BRepLib_MakeWire MW;
    // for all the edges ... MW.Add(anEdge);
    TopoDS_Wire W = MW;

Constructors(7)

Instance methods(7)

BRepLib_PointCloudShape

This tool is intended to get points from shape with specified distance from shape along normal. Can be used to simulation of points obtained in result of laser scan of shape. There are 2 ways for generation points by shape:

  1. Generation points with specified density
  2. Generation points using triangulation Nodes Generation of points by density using the GeneratePointsByDensity() function is not thread safe.

Instance methods(10)

  • Return loaded shape.

  • SetShape(theShape: TopoDS_Shape): void

    Set shape.

    Parameters (1)
    • theShape
  • Tolerance(): number

    Return tolerance.

  • SetTolerance(theTol: number): void

    Set tolerance.

    Parameters (1)
    • theTol
  • GetDistance(): number

    Returns value of the distance to define deflection of points from shape along normal to shape; 0.0 by default.

  • SetDistance(theDist: number): void

    Sets value of the distance to define deflection of points from shape along normal to shape. Negative values of theDist parameter are ignored.

    Parameters (1)
    • theDist
  • NbPointsByDensity(theDensity?: number): number

    Returns size of the point cloud for specified density.

    Parameters (1)
    • theDensity
  • Returns size of the point cloud for using triangulation.

  • GeneratePointsByDensity(theDensity?: number): boolean

    Computes points with specified density for initial shape. If parameter Density is equal to 0 then density will be computed automatically by criterion:

    • 10 points per minimal unreduced face area.
      Note: this function should not be called from concurrent threads without external lock.
    Parameters (1)
    • theDensity
  • Get points from triangulation existing in the shape.

BRepLib_ToolTriangulatedShape

Provides methods for calculating normals to Poly_Triangulation of TopoDS_Face.

Constructors(1)

Static methods(2)

  • Computes nodal normals for Poly_Triangulation structure using UV coordinates and surface. Does nothing if triangulation already defines normals.

    Parameters (2)
    • theFace
      the face
    • theTris
      the definition of a face triangulation
  • ComputeNormals(theFace: TopoDS_Face, theTris: Poly_Triangulation, thePolyConnect: Poly_Connect): void

    Computes nodal normals for Poly_Triangulation structure using UV coordinates and surface. Does nothing if triangulation already defines normals.

    Parameters (3)
    • theFace
      the face
    • theTris
      the definition of a face triangulation
    • thePolyConnect
      optional, initialized tool for exploring triangulation Mutated in place; read the updated value from this argument after the call.

BRepLib_ValidateEdge

Computes the max distance between 3D-curve and curve on surface. This class uses 2 methods: approximate using finite number of points (default) and exact.

Constructors(1)

Instance methods(11)

  • SetExactMethod(theIsExact: boolean): void

    Sets method to calculate distance: Calculating in finite number of points (if theIsExact is false, faster, but possible not correct result) or exact calculating by using BRepLib_CheckCurveOnSurface class (if theIsExact is true, slowly, but more correctly). Exact method is used only when edge is SameParameter. Default method is calculating in finite number of points.

    Parameters (1)
    • theIsExact
  • IsExactMethod(): boolean

    Returns true if exact method selected.

  • SetParallel(theIsMultiThread: boolean): void

    Sets parallel flag.

    Parameters (1)
    • theIsMultiThread
  • IsParallel(): boolean

    Returns true if parallel flag is set.

  • SetControlPointsNumber(theControlPointsNumber: number): void

    Set control points number (if you need a value other than 22).

    Parameters (1)
    • theControlPointsNumber
  • SetExitIfToleranceExceeded(theToleranceForChecking: number): void

    Sets limit to compute a distance in the Process() function. If the distance greater than theToleranceForChecking the Process() function stopped. Use this in case checking of tolerance for best performcnce. Has no effect in case using exact method.

    Parameters (1)
    • theToleranceForChecking
  • Process(): void

    Computes the max distance for the 3d curve <myReferenceCurve> and curve on surface <myOtherCurve>. If the SetExitIfToleranceExceeded() function was called before <myCalculatedDistance> contains first greater than SetExitIfToleranceExceeded() parameter value. In case using exact method always computes real max distance.

  • IsDone(): boolean

    Returns true if the distance has been found for all points.

  • CheckTolerance(theToleranceToCheck: number): boolean

    Returns true if computed distance is less than <theToleranceToCheck>.

    Parameters (1)
    • theToleranceToCheck
  • GetMaxDistance(): number

    Returns max distance.

  • UpdateTolerance(theToleranceToUpdate: number): { theToleranceToUpdate: number }

    Increase <theToleranceToUpdate> if max distance is greater than <theToleranceToUpdate>.

    Parameters (1)
    • theToleranceToUpdate
    Returns

    A result object with fields:

    • theToleranceToUpdate: updated value from the call.