libcascade
API ReferenceModelingAlgorithmsTKMesh

BRepMesh

OCCT package BRepMesh: BRepMesh_BaseMeshAlgo, BRepMesh_BoundaryParamsRangeSplitter, BRepMesh_Circle, BRepMesh_CircleInspector, and 49 more bound classes.

BRepMesh_BaseMeshAlgo

Class provides base functionality for algorithms building face triangulation. Performs initialization of BRepMesh_DataStructureOfDelaun and nodes map structures.

Static methods(2)

Instance methods(2)

BRepMesh_Circle

Describes a 2d circle with a size of only 3 double numbers instead of gp who needs 7 double numbers.

Constructors(2)

Instance methods(4)

  • SetLocation(theLocation: gp_XY): void

    Sets location of a circle.

    Parameters (1)
    • theLocation —
      location of a circle.
  • SetRadius(theRadius: number): void

    Sets radius of a circle.

    Parameters (1)
    • theRadius —
      radius of a circle.
  • Returns location of a circle.

  • Radius(): number

    Returns radius of a circle.

BRepMesh_CircleInspector

Auxiliary class to find circles shot by the given point.

Constructors(1)

  • constructor(theTolerance: number, theReservedSize: number, theAllocator: NCollection_IncAllocator): BRepMesh_CircleInspector

    Constructor.

    Parameters (3)
    • theTolerance —
      tolerance to be used for identification of shot circles.
    • theReservedSize —
      size to be reserved for vector of circles.
    • theAllocator —
      memory allocator to be used by internal collections.

Static methods(3)

  • Coord(i: number, thePnt: gp_XY): number
    Parameters (2)
    • i
    • thePnt
  • Shift(thePnt: gp_XY, theTol: number): gp_XY
    Parameters (2)
    • thePnt
    • theTol
  • IsEqual(theIndex: number, theTargetIndex: number): boolean

    Checks indices for equality.

    Parameters (2)
    • theIndex
    • theTargetIndex

Instance methods(6)

  • Bind(theIndex: number, theCircle: BRepMesh_Circle): void

    Adds the circle to vector of circles at the given position.

    Parameters (2)
    • theIndex —
      position of circle in the vector.
    • theCircle —
      circle to be added.
  • Circles(): VectorOfCircle

    Resutns vector of registered circles.

  • Circle(theIndex: number): BRepMesh_Circle

    Returns circle with the given index.

    Parameters (1)
    • theIndex —
      index of circle.
    Returns

    circle with the given index.

  • SetPoint(thePoint: gp_XY): void

    Set reference point to be checked.

    Parameters (1)
    • thePoint —
      bullet point.
  • GetShotCircles(): ListOfInteger

    Returns list of circles shot by the reference point.

  • Inspect(theTargetIndex: number): NCollection_CellFilter_Action

    Performs inspection of a circle with the given index.

    Parameters (1)
    • theTargetIndex —
      index of a circle to be checked.
    Returns

    status of the check.

BRepMesh_CircleTool

Create sort and destroy the circles used in triangulation.

Constructors(2)

Static methods(1)

  • MakeCircle(thePoint1: gp_XY, thePoint2: gp_XY, thePoint3: gp_XY, theLocation: gp_XY, theRadius?: number): { returnValue: boolean; theRadius: number }

    Computes circle on three points.

    Parameters (5)
    • thePoint1 —
      first point.
    • thePoint2 —
      second point.
    • thePoint3 —
      third point.
    • theLocation —
      center of computed circle. Mutated in place; read the updated value from this argument after the call.
    • theRadius —
      radius of computed circle.
    Returns

    A result object with fields:

    • returnValue: FALSE in case of impossibility to build a circle on the given points, TRUE elsewhere.
    • theRadius: radius of computed circle.

Instance methods(10)

  • Init(argNo0: number): void

    Initializes the tool.

    Parameters (1)
    • argNo0
  • SetCellSize(theSize: number): void

    Sets new size for cell filter.

    Parameters (1)
    • theSize —
      cell size to be set for X and Y dimensions.
  • SetCellSize(theSizeX: number, theSizeY: number): void

    Sets new size for cell filter.

    Parameters (2)
    • theSizeX —
      cell size to be set for X dimension.
    • theSizeY —
      cell size to be set for Y dimension.
  • SetMinMaxSize(theMin: gp_XY, theMax: gp_XY): void

    Sets limits of inspection area.

    Parameters (2)
    • theMin —
      bottom left corner of inspection area.
    • theMax —
      top right corner of inspection area.
  • IsEmpty(): boolean

    Returns true if cell filter contains no circle.

  • Bind(theIndex: number, theCircle: gp_Circ2d): void

    Binds the circle to the tool.

    Parameters (2)
    • theIndex —
      index a circle should be bound with.
    • theCircle —
      circle to be bound.
  • Bind(theIndex: number, thePoint1: gp_XY, thePoint2: gp_XY, thePoint3: gp_XY): boolean

    Computes circle on three points and bind it to the tool.

    Parameters (4)
    • theIndex —
      index a circle should be bound with.
    • thePoint1 —
      first point.
    • thePoint2 —
      second point.
    • thePoint3 —
      third point.
    Returns

    FALSE in case of impossibility to build a circle on the given points, TRUE elsewhere.

  • MocBind(theIndex: number): void

    Binds implicit zero circle.

    Parameters (1)
    • theIndex —
      index a zero circle should be bound with.
  • Delete(theIndex: number): void

    Deletes a circle from the tool.

    Parameters (1)
    • theIndex —
      index of a circle to be removed.
  • Select(thePoint: gp_XY): ListOfInteger

    Select the circles shot by the given point.

    Parameters (1)
    • thePoint —
      bullet point.

BRepMesh_Classifier

Auxiliary class intended for classification of points regarding internals of discrete face.

Constructors(1)

Static methods(2)

Instance methods(3)

  • Performs classification of the given point regarding to face internals.

    Parameters (1)
    • thePoint —
      Point in parametric space to be classified.
    Returns

    TopAbs_IN if point lies within face boundaries and TopAbs_OUT elsewhere.

  • RegisterWire(theWire: NCollection_Sequence_gp_Pnt2d, theTolUV: [number, number], theRangeU: [number, number], theRangeV: [number, number]): void

    Registers wire specified by sequence of points for further classification of points.

    Parameters (4)
    • theWire —
      Wire to be registered. Specified by sequence of points.
    • theTolUV —
      Tolerance to be used for calculations in parametric space.
    • theRangeU
    • theRangeV

BRepMesh_ConeRangeSplitter

Auxiliary class extending default range splitter in order to generate internal nodes for conical surface.

Constructors(1)

Instance methods(2)

  • GetSplitSteps(theParameters: IMeshTools_Parameters, theStepsNb: [number, number]): [number, number]

    Returns split intervals along U and V direction.

    Parameters (2)
    • theParameters —
      meshing parameters.
    • theStepsNb —
      number of steps along corresponding direction. Mutated in place; read the updated value from this argument after the call.
  • GenerateSurfaceNodes(theParameters: IMeshTools_Parameters): ListOfPnt2d

    Returns list of nodes generated using surface data and specified parameters.

    Parameters (1)
    • theParameters

BRepMesh_CurveTessellator

Auxiliary class performing tessellation of passed edge according to specified parameters.

Constructors(2)

Static methods(2)

Instance methods(3)

  • PointsNb(): number

    Returns number of tessellation points.

  • Value(theIndex: number, thePoint: gp_Pnt, theParameter: number): { returnValue: boolean; theParameter: number }

    Returns parameters of solution with the given index.

    Parameters (3)
    • theIndex —
      index of tessellation point.
    • thePoint —
      tessellation point. Mutated in place; read the updated value from this argument after the call.
    • theParameter —
      parameters on PCurve corresponded to the solution.
    Returns

    A result object with fields:

    • returnValue: True in case of valid result, false elewhere.
    • theParameter: parameters on PCurve corresponded to the solution.

BRepMesh_CylinderRangeSplitter

Auxiliary class extending default range splitter in order to generate internal nodes for cylindrical surface.

Constructors(1)

Instance methods(2)

  • Reset(theDFace: IFaceHandle, theParameters: IMeshTools_Parameters): void

    Resets this splitter. Must be called before first use.

    Parameters (2)
    • theDFace
    • theParameters
  • GenerateSurfaceNodes(theParameters: IMeshTools_Parameters): ListOfPnt2d

    Returns list of nodes generated using surface data and specified parameters.

    Parameters (1)
    • theParameters

BRepMesh_DataStructureOfDelaun

Describes the data structure necessary for the mesh algorithms in two dimensions plane or on surface by meshing in UV space.

Constructors(1)

Static methods(2)

Instance methods(23)

BRepMesh_DefaultRangeSplitter

Default tool to define range of discrete face model and obtain grid points distributed within this range.

Constructors(1)

Instance methods(13)

  • Reset(theDFace: IFaceHandle, theParameters: IMeshTools_Parameters): void

    Resets this splitter. Must be called before first use.

    Parameters (2)
    • theDFace
    • theParameters
  • AddPoint(thePoint: gp_Pnt2d): void

    Registers border point.

    Parameters (1)
    • thePoint
  • AdjustRange(): void

    Updates discrete range of surface according to its geometric range.

  • IsValid(): boolean

    Returns True if computed range is valid.

  • Scale(thePoint: gp_Pnt2d, isToFaceBasis: boolean): gp_Pnt2d

    Scales the given point from real parametric space to face basis and otherwise.

    Parameters (2)
    • thePoint —
      point to be scaled.
    • isToFaceBasis —
      if TRUE converts point to face basis, otherwise performs reverse conversion.
    Returns

    scaled point.

  • GenerateSurfaceNodes(theParameters: IMeshTools_Parameters): ListOfPnt2d

    Returns list of nodes generated using surface data and specified parameters. By default returns null ptr.

    Parameters (1)
    • theParameters
  • Point(thePoint2d: gp_Pnt2d): gp_Pnt

    Returns point in 3d space corresponded to the given point defined in parametric space of surface.

    Parameters (1)
    • thePoint2d
  • GetDFace(): IFaceHandle

    Returns face model.

  • Returns surface.

  • GetRangeU(): [number, number]

    Returns U range.

  • GetRangeV(): [number, number]

    Returns V range.

  • GetDelta(): [number, number]

    Returns delta.

  • GetToleranceUV(): [number, number]

BRepMesh_Deflection

Auxiliary tool encompassing methods to compute deflection of shapes.

Constructors(1)

Static methods(7)

  • ComputeAbsoluteDeflection(theShape: TopoDS_Shape, theRelativeDeflection: number, theMaxShapeSize: number): number

    Returns absolute deflection for theShape with respect to the relative deflection and theMaxShapeSize.

    Parameters (3)
    • theShape —
      shape for that the deflection should be computed.
    • theRelativeDeflection —
      relative deflection.
    • theMaxShapeSize —
      maximum size of the whole shape.
    Returns

    absolute deflection for the shape.

  • ComputeDeflection(theDWire: IWireHandle, theParameters: IMeshTools_Parameters): void

    Computes and updates deflection of the given discrete wire.

    Parameters (2)
    • theDWire
    • theParameters
  • ComputeDeflection(theDFace: IFaceHandle, theParameters: IMeshTools_Parameters): void

    Computes and updates deflection of the given discrete face.

    Parameters (2)
    • theDFace
    • theParameters
  • ComputeDeflection(theDEdge: IEdgeHandle, theMaxShapeSize: number, theParameters: IMeshTools_Parameters): void

    Computes and updates deflection of the given discrete edge.

    Parameters (3)
    • theDEdge
    • theMaxShapeSize
    • theParameters
  • IsConsistent(theCurrent: number, theRequired: number, theAllowDecrease: boolean, theRatio?: number): boolean

    Checks if the deflection of current polygonal representation is consistent with the required deflection.

    Parameters (4)
    • theCurrent —
      Current deflection.
    • theRequired —
      Required deflection.
    • theAllowDecrease —
      Flag controlling the check. If decrease is allowed, to be consistent the current and required deflections should be approximately the same. If not allowed, the current deflection should be less than required.
    • theRatio —
      The ratio for comparison of the deflections (value from 0 to 1).
  • get_type_name(): string

Instance methods(1)

BRepMesh_DelabellaMeshAlgoFactory

Implementation of IMeshTools_MeshAlgoFactory providing Delabella-based algorithms of different complexity depending on type of target surface.

Constructors(1)

Static methods(2)

Instance methods(2)

BRepMesh_DiscretAlgoFactory

Abstract factory for creating meshing algorithms. This class provides a registry-based factory pattern that allows multiple meshing algorithms to coexist without symbol collisions. It follows the pattern established by Graphic3d_GraphicDriverFactory.

Static methods(7)

Instance methods(3)

BRepMesh_DiscretFactory

Factory for retrieving triangulation algorithms. Use BRepMesh_DiscretFactory::Get() static method to retrieve global Factory instance. Use BRepMesh_DiscretFactory::Discret() method to retrieve meshing tool.
This class delegates to BRepMesh_DiscretAlgoFactory registry for algorithm creation.

Static methods(1)

Instance methods(3)

  • Setup meshing algorithm by name. Returns TRUE if requested algorithm is available. On fail Factory will continue to use previous algorithm.

    Parameters (1)
    • theName —
      name of the algorithm to use
  • Returns name of current meshing algorithm.

  • Discret(theShape: TopoDS_Shape, theLinDeflection: number, theAngDeflection: number): BRepMesh_DiscretRoot

    Returns triangulation algorithm instance.

    Parameters (3)
    • theShape —
      shape to be meshed
    • theLinDeflection —
      linear deflection to be used for meshing
    • theAngDeflection —
      angular deflection to be used for meshing
    Returns

    new meshing algorithm instance, or NULL if no algorithm available

BRepMesh_DiscretRoot

This is a common interface for meshing algorithms instantiated by Mesh Factory and implemented by plugins.

Static methods(2)

Instance methods(5)

BRepMesh_Edge

Light weighted structure representing link of the mesh.

Constructors(2)

Instance methods(5)

  • Returns movability flag of the Link.

  • Sets movability flag of the Link.

    Parameters (1)
    • theMovability —
      flag to be set.
  • IsSameOrientation(theOther: BRepMesh_Edge): boolean

    Checks if the given edge and this one have the same orientation.

    Parameters (1)
    • theOther —
      edge to be checked against this one.
    Returns

    TRUE if edges have the same orientation, FALSE if not.

  • IsEqual(theOther: BRepMesh_Edge): boolean

    Checks for equality with another edge.

    Parameters (1)
    • theOther —
      edge to be checked against this one.
    Returns

    TRUE if equal, FALSE if not.

  • IsEqual(theOther: BRepMesh_OrientedEdge): boolean

    Checks for equality with another edge.

    Parameters (1)
    • theOther —
      edge to be checked against this one.
    Returns

    TRUE if equal, FALSE if not.

BRepMesh_EdgeDiscret

Class implements functionality of edge discret tool. Performs check of the edges for existing Poly_PolygonOnTriangulation. In case if it fits specified deflection, restores data structure using it, else clears edges from outdated data.

Constructors(1)

Static methods(7)

Instance methods(1)

BRepMesh_EdgeTessellationExtractor

Auxiliary class implements functionality retrieving tessellated representation of an edge stored in polygon.

Constructors(1)

Static methods(2)

Instance methods(3)

  • PointsNb(): number

    Returns number of tessellation points.

  • Value(theIndex: number, thePoint: gp_Pnt, theParameter: number): { returnValue: boolean; theParameter: number }

    Returns parameters of solution with the given index.

    Parameters (3)
    • theIndex —
      index of tessellation point.
    • thePoint —
      tessellation point. Mutated in place; read the updated value from this argument after the call.
    • theParameter —
      parameters on PCurve corresponded to the solution.
    Returns

    A result object with fields:

    • returnValue: True in case of valid result, false elewhere.
    • theParameter: parameters on PCurve corresponded to the solution.

BRepMesh_FaceChecker

Auxiliary class checking wires of target face for self-intersections. Explodes wires of discrete face on sets of segments using tessellation data stored in model. Each segment is then checked for intersection with other ones. All collisions are registered and returned as result of check.

Constructors(1)

Static methods(2)

Instance methods(3)

BRepMesh_FaceDiscret

Class implements functionality starting triangulation of model's faces. Each face is processed separately and can be executed in parallel mode. Uses mesh algo factory passed as initializer to create instance of triangulation algorithm according to type of surface of target face.

Constructors(1)

Static methods(2)

Instance methods(1)

BRepMesh_GeomTool

Tool class accumulating common geometrical functions as well as functionality using shape geometry to produce data necessary for tessellation. General aim is to calculate discretization points for the given curve or iso curve of surface according to the specified parameters.

Constructors(2)

  • constructor(theCurve: BRepAdaptor_Curve, theFirstParam: number, theLastParam: number, theLinDeflection: number, theAngDeflection: number, theMinPointsNb?: number, theMinSize?: number): BRepMesh_GeomTool

    Constructor. Initiates discretization of the given geometric curve.

    Parameters (7)
    • theCurve —
      curve to be discretized.
    • theFirstParam —
      first parameter of the curve.
    • theLastParam —
      last parameter of the curve.
    • theLinDeflection —
      linear deflection.
    • theAngDeflection —
      angular deflection.
    • theMinPointsNb —
      minimum number of points to be produced.
    • theMinSize
  • constructor(theSurface: BRepAdaptor_Surface, theIsoType: GeomAbs_IsoType, theParamIso: number, theFirstParam: number, theLastParam: number, theLinDeflection: number, theAngDeflection: number, theMinPointsNb?: number, theMinSize?: number): BRepMesh_GeomTool

    Constructor. Initiates discretization of geometric curve corresponding to iso curve of the given surface.

    Parameters (9)
    • theSurface —
      surface the iso curve to be taken from.
    • theIsoType —
      type of iso curve to be used, U or V.
    • theParamIso —
      parameter on the surface specifying the iso curve.
    • theFirstParam —
      first parameter of the curve.
    • theLastParam —
      last parameter of the curve.
    • theLinDeflection —
      linear deflection.
    • theAngDeflection —
      angular deflection.
    • theMinPointsNb —
      minimum number of points to be produced.
    • theMinSize

Static methods(5)

  • Normal(theSurface: BRepAdaptor_Surface, theParamU: number, theParamV: number, thePoint: gp_Pnt, theNormal: gp_Dir): boolean
    Parameters (5)
    • theSurface
    • theParamU
    • theParamV
    • thePoint
    • theNormal
  • IntLinLin(theStartPnt1: gp_XY, theEndPnt1: gp_XY, theStartPnt2: gp_XY, theEndPnt2: gp_XY, theIntPnt: gp_XY, theParamOnSegment: [number, number]): BRepMesh_GeomTool_IntFlag
    Parameters (6)
    • theStartPnt1
    • theEndPnt1
    • theStartPnt2
    • theEndPnt2
    • theIntPnt
    • theParamOnSegment
  • IntSegSeg(theStartPnt1: gp_XY, theEndPnt1: gp_XY, theStartPnt2: gp_XY, theEndPnt2: gp_XY, isConsiderEndPointTouch: boolean, isConsiderPointOnSegment: boolean, theIntPnt: gp_Pnt2d): BRepMesh_GeomTool_IntFlag
    Parameters (7)
    • theStartPnt1
    • theEndPnt1
    • theStartPnt2
    • theEndPnt2
    • isConsiderEndPointTouch
    • isConsiderPointOnSegment
    • theIntPnt
  • SquareDeflectionOfSegment(theFirstPoint: gp_Pnt, theLastPoint: gp_Pnt, theMidPoint: gp_Pnt): number
    Parameters (3)
    • theFirstPoint
    • theLastPoint
    • theMidPoint
  • CellsCount(theSurface: Adaptor3d_Surface, theVerticesNb: number, theDeflection: number, theRangeSplitter: BRepMesh_DefaultRangeSplitter): [number, number]
    Parameters (4)
    • theSurface
    • theVerticesNb
    • theDeflection
    • theRangeSplitter

Instance methods(4)

  • AddPoint(thePoint: gp_Pnt, theParam: number, theIsReplace?: boolean): number

    Adds point to already calculated points (or replaces existing).

    Parameters (3)
    • thePoint —
      point to be added.
    • theParam —
      parameter on the curve corresponding to the given point.
    • theIsReplace —
      if TRUE replaces existing point lying within parametric tolerance of the given point.
    Returns

    index of new added point or found with parametric tolerance

  • NbPoints(): number

    Returns number of discretization points.

  • Value(theIndex: number, theIsoParam: number, theParam: number, thePoint: gp_Pnt, theUV: gp_Pnt2d): { returnValue: boolean; theParam: number }

    Gets parameters of discretization point with the given index.

    Parameters (5)
    • theIndex —
      index of discretization point.
    • theIsoParam —
      parameter on surface to be used as second coordinate of resulting 2d point.
    • theParam —
      parameter of the point on the iso curve.
    • thePoint —
      discretization point. Mutated in place; read the updated value from this argument after the call.
    • theUV —
      discretization point in parametric space of the surface. Mutated in place; read the updated value from this argument after the call.
    Returns

    A result object with fields:

    • returnValue: TRUE on success, FALSE elsewhere.
    • theParam: parameter of the point on the iso curve.
  • Value(theIndex: number, theSurface: BRepAdaptor_Surface, theParam: number, thePoint: gp_Pnt, theUV: gp_Pnt2d): { returnValue: boolean; theParam: number }

    Gets parameters of discretization point with the given index.

    Parameters (5)
    • theIndex —
      index of discretization point.
    • theSurface —
      surface the curve is lying onto.
    • theParam —
      parameter of the point on the curve.
    • thePoint —
      discretization point. Mutated in place; read the updated value from this argument after the call.
    • theUV —
      discretization point in parametric space of the surface. Mutated in place; read the updated value from this argument after the call.
    Returns

    A result object with fields:

    • returnValue: TRUE on success, FALSE elsewhere.
    • theParam: parameter of the point on the curve.

BRepMesh_IncrementalMesh

Builds the mesh of a shape with respect of their correctly triangulated parts.

Constructors(3)

Static methods(4)

Instance methods(7)

BRepMesh_IncrementalMeshFactory

Factory for creating BRepMesh_IncrementalMesh instances. This factory is registered under the name "FastDiscret" and provides the default built-in meshing algorithm.

Constructors(1)

Static methods(2)

Instance methods(2)

BRepMesh_MeshAlgoFactory

Default implementation of IMeshTools_MeshAlgoFactory providing algorithms of different complexity depending on type of target surface.

Constructors(1)

Static methods(2)

Instance methods(2)

BRepMesh_MeshTool

Auxiliary tool providing API for manipulation with BRepMesh_DataStructureOfDelaun.

Constructors(1)

Static methods(2)

Instance methods(14)

  • Returns data structure manipulated by this tool.

  • DumpTriangles(theFileName: string, theTriangles: NCollection_Shared_NCollection_PackedMap_int_void): void

    Dumps triangles to specified file.

    Parameters (2)
    • theFileName
    • theTriangles
  • AddAndLegalizeTriangle(thePoint1: number, thePoint2: number, thePoint3: number): void

    Adds new triangle with specified nodes to mesh. Legalizes triangle in case if it violates circle criteria.

    Parameters (3)
    • thePoint1
    • thePoint2
    • thePoint3
  • AddTriangle(thePoint1: number, thePoint2: number, thePoint3: number, theEdges: [number, number, number]): void

    Adds new triangle with specified nodes to mesh.

    Parameters (4)
    • thePoint1
    • thePoint2
    • thePoint3
    • theEdges
  • Legalize(theLinkIndex: number): void

    Performs legalization of triangles connected to the specified link.

    Parameters (1)
    • theLinkIndex
  • EraseItemsConnectedTo(theNodeIndex: number): void

    Erases all elements connected to the specified artificial node. In addition, erases the artificial node itself.

    Parameters (1)
    • theNodeIndex
  • EraseTriangles(theTriangles: NCollection_Shared_NCollection_PackedMap_int_void, theLoopEdges: MapOfIntegerInteger): void

    Erases the given set of triangles. Fills map of loop edges forming the contour surrounding the erased triangles.

    Parameters (2)
    • theTriangles
    • theLoopEdges
  • EraseTriangle(theTriangleIndex: number, theLoopEdges: MapOfIntegerInteger): void

    Erases triangle with the given index and adds the free edges into the map. When an edge is suppressed more than one time it is destroyed.

    Parameters (2)
    • theTriangleIndex
    • theLoopEdges
  • Erases all links that have no elements connected to them.

  • EraseFreeLinks(theLinks: MapOfIntegerInteger): void

    Erases links from the specified map that have no elements connected to them.

    Parameters (1)
    • theLinks
  • GetEdgesByType(theEdgeType: BRepMesh_DegreeOfFreedom): NCollection_Shared_NCollection_PackedMap_int_void

    Gives the list of edges with type defined by input parameter.

    Parameters (1)
    • theEdgeType

BRepMesh_ModelBuilder

Class implements interface representing tool for discrete model building.
The following statuses should be used by default: Message_Done1 - model has been successfully built. Message_Fail1 - empty shape. Message_Fail2 - model has not been build due to unexpected reason.

Constructors(1)

Static methods(2)

Instance methods(1)

BRepMesh_ModelHealer

Class implements functionality of model healer tool.
Iterates over model's faces and checks consistency of their wires, i.e.whether wires are closed and do not contain self - intersections.
In case if wire contains disconnected parts, ends of adjacent edges forming the gaps are connected in parametric space forcibly.
The notion of this operation is to create correct discrete model defined relatively parametric space of target face taking into account connectivity and tolerances of 3D space only. This means that there are no specific computations are made for the sake of determination of U and V tolerance.
Registers intersections on edges forming the face's shape and tries to amplify discrete representation by decreasing of deflection for the target edge. Checks can be performed in parallel mode.

Constructors(1)

Static methods(2)

Instance methods(1)

BRepMesh_NURBSRangeSplitter

Auxiliary class extending UV range splitter in order to generate internal nodes for NURBS surface.

Constructors(1)

Instance methods(2)

  • AdjustRange(): void

    Updates discrete range of surface according to its geometric range.

  • GenerateSurfaceNodes(theParameters: IMeshTools_Parameters): ListOfPnt2d

    Returns list of nodes generated using surface data and specified parameters.

    Parameters (1)
    • theParameters

BRepMesh_OrientedEdge

Light weighted structure representing simple link.

Constructors(2)

Instance methods(3)

  • FirstNode(): number

    Returns index of first node of the Link.

  • LastNode(): number

    Returns index of last node of the Link.

  • IsEqual(theOther: BRepMesh_OrientedEdge): boolean

    Checks this and other edge for equality.

    Parameters (1)
    • theOther —
      edge to be checked against this one.
    Returns

    TRUE if edges have the same orientation, FALSE if not.

BRepMesh_PairOfIndex

This class represents a pair of integer indices to store element indices connected to link. It is restricted to store more than two indices in it.

Constructors(1)

Instance methods(10)

  • Clear(): void

    Clears indices.

  • Append(theIndex: number): void

    Appends index to the pair.

    Parameters (1)
    • theIndex
  • Prepend(theIndex: number): void

    Prepends index to the pair.

    Parameters (1)
    • theIndex
  • IsEmpty(): boolean

    Returns is pair is empty.

  • Extent(): number

    Returns number of initialized indices.

  • FirstIndex(): number

    Returns first index of pair.

  • LastIndex(): number

    Returns last index of pair.

  • Index(thePairPos: number): number

    Returns index corresponding to the given position in the pair.

    Parameters (1)
    • thePairPos —
      position of index in the pair (1 or 2).
  • SetIndex(thePairPos: number, theIndex: number): void

    Sets index corresponding to the given position in the pair.

    Parameters (2)
    • thePairPos —
      position of index in the pair (1 or 2).
    • theIndex —
      index to be stored.
  • RemoveIndex(thePairPos: number): void

    Remove index from the given position.

    Parameters (1)
    • thePairPos —
      position of index in the pair (1 or 2).

BRepMesh_SelectorOfDataStructureOfDelaun

Describes a selector and an iterator on a selector of components of a mesh.

Constructors(2)

Static methods(2)

Instance methods(12)

  • Selects all neighboring elements of the given node.

    Parameters (1)
    • theNode
  • NeighboursOf(theLink: BRepMesh_Edge): void

    Selects all neighboring elements of the given link.

    Parameters (1)
    • theLink
  • Selects all neighboring elements of the given element.

    Parameters (1)
    • argNo0
  • NeighboursOfNode(theNodeIndex: number): void

    Selects all neighboring elements of node with the given index.

    Parameters (1)
    • theNodeIndex
  • NeighboursOfElement(theElementIndex: number): void

    Selects all neighboring elements by nodes of the given element.

    Parameters (1)
    • theElementIndex
  • Adds a level of neighbours by edge the selector.

  • Nodes(): NCollection_Shared_NCollection_PackedMap_int_void

    Returns selected nodes.

  • Elements(): NCollection_Shared_NCollection_PackedMap_int_void

    Returns selected elements.

BRepMesh_ShapeTool

Auxiliary class providing functionality to compute, retrieve and store data to TopoDS and model shape.

Constructors(1)

Static methods(16)

  • MaxFaceTolerance(theFace: TopoDS_Face): number

    Returns maximum tolerance of the given face. Considers tolerances of edges and vertices contained in the given face.

    Parameters (1)
    • theFace
  • BoxMaxDimension(theBox: Bnd_Box, theMaxDimension?: number): { theMaxDimension: number }

    Gets the maximum dimension of the given bounding box. If the given bounding box is void leaves the resulting value unchanged.

    Parameters (2)
    • theBox —
      bounding box to be processed.
    • theMaxDimension —
      maximum dimension of the given box.
    Returns

    A result object with fields:

    • theMaxDimension: maximum dimension of the given box.
  • CheckAndUpdateFlags(theEdge: IEdgeHandle, thePCurve: IPCurveHandle): void

    Checks same parameter, same range and degenerativity attributes using geometrical data of the given edge and updates edge model by computed parameters in case of worst case - it can drop flags same parameter and same range to False but never to True if it is already set to False. In contrary, it can also drop degenerated flag to True, but never to False if it is already set to True.

    Parameters (2)
    • theEdge
    • thePCurve
  • AddInFace(theFace: TopoDS_Face): { theTriangulation: Poly_Triangulation; [Symbol.dispose](): void }

    Stores the given triangulation into the given face.

    Parameters (1)
    • theFace —
      face to be updated by triangulation.
    Returns

    A result object with fields:

    • theTriangulation: triangulation to be stored into the face., owned by the returned envelope.
      Dispose the returned envelope to release owned Handle fields.
  • NullifyFace(theFace: TopoDS_Face): void

    Nullifies triangulation stored in the face.

    Parameters (1)
    • theFace —
      face to be updated by null triangulation.
  • NullifyEdge(theEdge: TopoDS_Edge, theTriangulation: Poly_Triangulation, theLocation: TopLoc_Location): void

    Nullifies polygon on triangulation stored in the edge.

    Parameters (3)
    • theEdge —
      edge to be updated by null polygon.
    • theTriangulation —
      triangulation the given edge is associated to.
    • theLocation —
      face location.
  • NullifyEdge(theEdge: TopoDS_Edge, theLocation: TopLoc_Location): void

    Nullifies 3d polygon stored in the edge.

    Parameters (2)
    • theEdge —
      edge to be updated by null polygon.
    • theLocation —
      face location.
  • UpdateEdge(theEdge: TopoDS_Edge, thePolygon: Poly_PolygonOnTriangulation, theTriangulation: Poly_Triangulation, theLocation: TopLoc_Location): void

    Updates the given edge by the given tessellated representation.

    Parameters (4)
    • theEdge —
      edge to be updated.
    • thePolygon —
      tessellated representation of the edge to be stored.
    • theTriangulation —
      triangulation the given edge is associated to.
    • theLocation —
      face location.
  • UpdateEdge(theEdge: TopoDS_Edge, thePolygon: Poly_Polygon3D): void

    Updates the given edge by the given tessellated representation.

    Parameters (2)
    • theEdge —
      edge to be updated.
    • thePolygon —
      tessellated representation of the edge to be stored.
  • UpdateEdge(theEdge: TopoDS_Edge, thePolygon1: Poly_PolygonOnTriangulation, thePolygon2: Poly_PolygonOnTriangulation, theTriangulation: Poly_Triangulation, theLocation: TopLoc_Location): void

    Updates the given seam edge by the given tessellated representations.

    Parameters (5)
    • theEdge —
      edge to be updated.
    • thePolygon1 —
      tessellated representation corresponding to forward direction of the seam edge.
    • thePolygon2 —
      tessellated representation corresponding to reversed direction of the seam edge.
    • theTriangulation —
      triangulation the given edge is associated to.
    • theLocation —
      face location.
  • Applies location to the given point and return result.

    Parameters (2)
    • thePnt —
      point to be transformed.
    • theLoc —
      location to be applied.
  • UVPoints(theEdge: TopoDS_Edge, theFace: TopoDS_Face, theFirstPoint2d: gp_Pnt2d, theLastPoint2d: gp_Pnt2d, isConsiderOrientation: boolean): boolean

    Gets the strict UV locations of the extremities of the edge using pcurve.

    Parameters (5)
    • theEdge
    • theFace
    • theFirstPoint2d —
      Mutated in place; read the updated value from this argument after the call.
    • theLastPoint2d —
      Mutated in place; read the updated value from this argument after the call.
    • isConsiderOrientation
  • Range(theEdge: TopoDS_Edge, theFace: TopoDS_Face, theFirstParam: number, theLastParam: number, isConsiderOrientation: boolean): { returnValue: boolean; thePCurve: Geom2d_Curve; theFirstParam: number; theLastParam: number; [Symbol.dispose](): void }

    Gets the parametric range of the given edge on the given face.

    Parameters (5)
    • theEdge
    • theFace
    • theFirstParam
    • theLastParam
    • isConsiderOrientation
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • thePCurve: owned by the returned envelope.
    • theFirstParam: updated value from the call.
    • theLastParam: updated value from the call.
      Dispose the returned envelope to release owned Handle fields.
  • Range(theEdge: TopoDS_Edge, theFirstParam: number, theLastParam: number, isConsiderOrientation: boolean): { returnValue: boolean; theCurve: Geom_Curve; theFirstParam: number; theLastParam: number; [Symbol.dispose](): void }

    Gets the 3d range of the given edge.

    Parameters (4)
    • theEdge
    • theFirstParam
    • theLastParam
    • isConsiderOrientation
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • theCurve: owned by the returned envelope.
    • theFirstParam: updated value from the call.
    • theLastParam: updated value from the call.
      Dispose the returned envelope to release owned Handle fields.
  • get_type_name(): string

Instance methods(1)

BRepMesh_ShapeVisitor

Builds discrete model of a shape by adding faces and free edges. Computes deflection for corresponded shape and checks whether it fits existing polygonal representation. If not, cleans shape from outdated info.

Constructors(1)

Static methods(2)

Instance methods(3)

BRepMesh_TorusRangeSplitter

Auxiliary class extending UV range splitter in order to generate internal nodes for NURBS surface.

Constructors(1)

Instance methods(2)

BRepMesh_Triangulator

Auxiliary tool to generate triangulation.

Constructors(1)

Instance methods(1)

  • Perform(thePolyTriangles: NCollection_List_Poly_Triangle): boolean

    Performs triangulation of source wires and stores triangles the output list.

    Parameters (1)
    • thePolyTriangles —
      Mutated in place; read the updated value from this argument after the call.

BRepMesh_Vertex

Light weighted structure representing vertex of the mesh in parametric space. Vertex could be associated with 3d point stored in external map.

Constructors(3)

  • Default constructor.

  • constructor(theUV: gp_XY, theLocation3d: number, theMovability: BRepMesh_DegreeOfFreedom): BRepMesh_Vertex

    Creates vertex associated with point in 3d space.

    Parameters (3)
    • theUV —
      position of vertex in parametric space.
    • theLocation3d —
      index of 3d point to be associated with vertex.
    • theMovability —
      movability of the vertex.
  • constructor(theU: number, theV: number, theMovability: BRepMesh_DegreeOfFreedom): BRepMesh_Vertex

    Creates vertex without association with point in 3d space.

    Parameters (3)
    • theU —
      U position of vertex in parametric space.
    • theV —
      V position of vertex in parametric space.
    • theMovability —
      movability of the vertex.

Instance methods(7)

  • Initialize(theUV: gp_XY, theLocation3d: number, theMovability: BRepMesh_DegreeOfFreedom): void

    Initializes vertex associated with point in 3d space.

    Parameters (3)
    • theUV —
      position of vertex in parametric space.
    • theLocation3d —
      index of 3d point to be associated with vertex.
    • theMovability —
      movability of the vertex.
  • Returns position of the vertex in parametric space.

  • Returns position of the vertex in parametric space for modification.

  • Location3d(): number

    Returns index of 3d point associated with the vertex.

  • Returns movability of the vertex.

  • Sets movability of the vertex.

    Parameters (1)
    • theMovability
  • IsEqual(theOther: BRepMesh_Vertex): boolean

    Checks for equality with another vertex.

    Parameters (1)
    • theOther —
      vertex to be checked against this one.
    Returns

    TRUE if equal, FALSE if not.

BRepMesh_VertexInspector

Class intended for fast searching of the coincidence points.

Constructors(1)

Static methods(3)

  • Coord(i: number, thePnt: gp_XY): number
    Parameters (2)
    • i
    • thePnt
  • Shift(thePnt: gp_XY, theTol: number): gp_XY
    Parameters (2)
    • thePnt
    • theTol
  • IsEqual(theIndex: number, theTargetIndex: number): boolean

    Checks indices for equality.

    Parameters (2)
    • theIndex
    • theTargetIndex

Instance methods(13)

  • Add(theVertex: BRepMesh_Vertex): number

    Registers the given vertex.

    Parameters (1)
    • theVertex —
      vertex to be registered.
  • SetTolerance(theTolerance: number): void

    Sets the tolerance to be used for identification of coincident vertices equal for both dimensions.

    Parameters (1)
    • theTolerance
  • SetTolerance(theToleranceX: number, theToleranceY: number): void

    Sets the tolerance to be used for identification of coincident vertices.

    Parameters (2)
    • theToleranceX —
      tolerance for X dimension.
    • theToleranceY —
      tolerance for Y dimension.
  • Clear(): void

    Clear inspector's internal data structures.

  • Delete(theIndex: number): void

    Deletes vertex with the given index.

    Parameters (1)
    • theIndex —
      index of vertex to be removed.
  • NbVertices(): number

    Returns number of registered vertices.

  • GetVertex(theIndex: number): BRepMesh_Vertex

    Returns vertex with the given index.

    Parameters (1)
    • theIndex
  • SetPoint(thePoint: gp_XY): void

    Set reference point to be checked.

    Parameters (1)
    • thePoint
  • Returns index of point coinciding with regerence one.

  • GetListOfDelPoints(): ListOfInteger

    Returns list with indexes of vertices that have movability attribute equal to BRepMesh_Deleted and can be replaced with another node.

  • Vertices(): VectorOfVertex

    Returns set of mesh vertices.

  • ChangeVertices(): VectorOfVertex

    Returns set of mesh vertices for modification.

  • Inspect(theTargetIndex: number): NCollection_CellFilter_Action

    Performs inspection of a point with the given index.

    Parameters (1)
    • theTargetIndex —
      index of a circle to be checked.
    Returns

    status of the check.

BRepMesh_VertexTool

Describes data structure intended to keep mesh nodes defined in UV space and implements functionality providing their uniqueness regarding their position.

Constructors(1)

Static methods(2)

Instance methods(17)

  • SetCellSize(theSize: number): void

    Sets new size of cell for cellfilter equal in both directions.

    Parameters (1)
    • theSize
  • SetCellSize(theSizeX: number, theSizeY: number): void

    Sets new size of cell for cellfilter.

    Parameters (2)
    • theSizeX —
      size for X dimension.
    • theSizeY —
      size for Y dimension.
  • SetTolerance(theTolerance: number): void

    Sets the tolerance to be used for identification of coincident vertices equal for both dimensions.

    Parameters (1)
    • theTolerance
  • SetTolerance(theToleranceX: number, theToleranceY: number): void

    Sets the tolerance to be used for identification of coincident vertices.

    Parameters (2)
    • theToleranceX —
      tolerance for X dimension.
    • theToleranceY —
      tolerance for Y dimension.
  • GetTolerance(theToleranceX?: number, theToleranceY?: number): { theToleranceX: number; theToleranceY: number }

    Gets the tolerance to be used for identification of coincident vertices.

    Parameters (2)
    • theToleranceX —
      tolerance for X dimension.
    • theToleranceY —
      tolerance for Y dimension.
    Returns

    A result object with fields:

    • theToleranceX: tolerance for X dimension.
    • theToleranceY: tolerance for Y dimension.
  • Add(theVertex: BRepMesh_Vertex, isForceAdd: boolean): number

    Adds vertex with empty data to the tool.

    Parameters (2)
    • theVertex —
      node to be added to the mesh.
    • isForceAdd —
      adds the given node to structure without checking on coincidence with other nodes.
    Returns

    index of the node in the structure.

  • DeleteVertex(theIndex: number): void

    Deletes vertex with the given index from the tool.

    Parameters (1)
    • theIndex
  • Vertices(): VectorOfVertex

    Returns set of mesh vertices.

  • ChangeVertices(): VectorOfVertex

    Returns set of mesh vertices.

  • FindKey(theIndex: number): BRepMesh_Vertex

    Returns vertex by the given index.

    Parameters (1)
    • theIndex
  • FindIndex(theVertex: BRepMesh_Vertex): number

    Returns index of the given vertex.

    Parameters (1)
    • theVertex
  • Extent(): number

    Returns a number of vertices.

  • IsEmpty(): boolean

    Returns True when the map contains no keys.

  • Substitute(theIndex: number, theVertex: BRepMesh_Vertex): void

    Substitutes vertex with the given by the given vertex with attributes.

    Parameters (2)
    • theIndex —
      index of vertex to be substituted.
    • theVertex —
      replacement vertex.
  • RemoveLast(): void

    Remove last node from the structure.

  • GetListOfDelNodes(): ListOfInteger

    Returns the list with indexes of vertices that have movability attribute equal to BRepMesh_Deleted and can be replaced with another node.