IMeshData
OCCT package IMeshData: IMeshData_Array1OfInteger, IMeshData_Array1OfVertexOfDelaun, IMeshData_BndBox2dTree, IMeshData_BndBox2dTreeFiller, and 46 more…
IMeshData_Array1OfInteger
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_Array1OfVertexOfDelaun
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_BndBox2dTree
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_BndBox2dTreeFiller
This class is used to fill an UBTree in a random order. The quality of a tree is much better (from the point of view of the search time) if objects are added to it in a random order to avoid adding a chain of neerby objects one following each other.
This class collects objects to be added, and then add them to the tree in a random order.
Constructors(1)
- constructor(theTree: any, theAlloc?: NCollection_BaseAllocator, isFullRandom?: boolean): IMeshData_BndBox2dTreeFiller
Constructor.
Parameters (3)theTree—Tree instance that is to be filled.theAlloc—Allocator for the Filler data.isFullRandom—Takes effect when the number of items is large (order of 50,000). When it is True, the code uses the maximal randomization allowing a better balanced tree. If False, the randomization/tree balance are worse but the tree filling is faster due to better utilisation of CPU L1/L2 cache.
Instance methods(3)
Adds a pair (theObj, theBnd) to my sequence.
Parameters (2)theObjtheBnd
- Fill(): number
Fills the tree with the objects from my sequence. This method clears the internal buffer of added items making sure that no item would be added twice.
Returnsthe number of objects added to the tree.
- Reset(): void
Remove all data from Filler, partculary if the Tree no more needed so the destructor of this Filler should not populate the useless Tree.
IMeshData_CircleCellFilter
A data structure for sorting geometric objects (called targets) in n-dimensional space into cells, with associated algorithm for fast checking of coincidence (overlapping, intersection, etc.) with other objects (called here bullets).
Description
The algorithm is based on hash map, thus it has linear time of initialization (O(N) where N is number of cells covered by added targets) and constant-time search for one bullet (more precisely, O(M) where M is number of cells covered by the bullet).
The idea behind the algorithm is to separate each coordinate of the space into equal-size cells. Note that this works well when cell size is approximately equal to the characteristic size of the involved objects (targets and bullets; including tolerance eventually used for coincidence check).
Usage
The target objects to be searched are added to the tool by methods Add(); each target is classified as belonging to some cell(s). The data on cells (list of targets found in each one) are stored in the hash map with key being cumulative index of the cell by all coordinates. Thus the time needed to find targets in some cell is O(1) * O(number of targets in the cell).
As soon as all the targets are added, the algorithm is ready to check for coincidence. To find the targets coincident with any given bullet, it checks all the candidate targets in the cell(s) covered by the bullet object (methods Inspect()).
The methods Add() and Inspect() have two flavours each: one accepts single point identifying one cell, another accept two points specifying the range of cells. It should be noted that normally at least one of these methods is called as for range of cells: either due to objects having non- zero size, or in order to account for the tolerance when objects are points.
The set of targets can be modified during the process: new targets can be added by Add(), existing targets can be removed by Remove().
Implementation
The algorithm is implemented as template class, thus it is capable to work with objects of any type. The only argument of the template should be the specific class providing all necessary features required by the algorithm:
- typedef "Target" defining type of target objects. This type must have copy constructor
- typedef "Point" defining type of geometrical points used
- static constexpr int Dimension whose value must be dimension of the point
- method Coord() returning value of the i-th coordinate of the point: static double Coord (int i, const
Point& thePnt); Note that index i is from 0 to Dimension-1. - method
IsEqual()used byRemove()to identify objects to be removed: bool IsEqual (constTarget& theT1, constTarget& theT2); - method
Inspect()performing necessary actions on the candidate target object (usually comparison with the currently checked bullet object):NCollection_CellFilter_ActionInspect (constTarget& theObject); The returned value can be used to command CellFilter to remove the inspected item from the current cell; this allows to exclude the items that has been processed and are not needed any more in further search (for better performance). Note that methodInspect()can be const and/or virtual.
Constructors(2)
- constructor(theCellSize?: number, theAlloc?: NCollection_IncAllocator): IMeshData_CircleCellFilter
Constructor when dimension count is known at compilation time.
Parameters (2)theCellSizetheAlloc
- constructor(theDim: number, theCellSize?: number, theAlloc?: NCollection_IncAllocator): IMeshData_CircleCellFilter
Constructor; initialized by dimension count and cell size.
Note: the cell size must be ensured to be greater than maximal coordinate of the involved points divided by INT_MAX, in order to avoid integer overflow of cell index.
By default cell size is 0, which is invalid; thus if default constructor is used, the tool must be initialized later with appropriate cell size by call toReset()Constructor when dimension count is unknown at compilation time.Parameters (3)theDimtheCellSizetheAlloc
Instance methods(8)
- Reset(theCellSize: number, theAlloc: NCollection_IncAllocator): void
Clear the data structures, set new cell size and allocator.
Parameters (2)theCellSizetheAlloc
- Reset(theCellSize: NCollection_Array1_double, theAlloc: NCollection_IncAllocator): void
Clear the data structures and set new cell sizes and allocator.
Parameters (2)theCellSize—Mutated in place; read the updated value from this argument after the call.theAlloc
Adds a target object for further search at a point (into only one cell).
Parameters (2)theTargetthePnt
Adds a target object for further search in the range of cells defined by two points (the first point must have all coordinates equal or less than the same coordinate of the second point).
Parameters (3)theTargetthePntMinthePntMax
Find a target object at a point and remove it from the structures. For usage of this method "operator ==" should be defined for
Target.Parameters (2)theTargetthePnt
Find a target object in the range of cells defined by two points and remove it from the structures (the first point must have all coordinates equal or less than the same coordinate of the second point). For usage of this method "operator ==" should be defined for
Target.Parameters (3)theTargetthePntMinthePntMax
- Inspect(thePnt: gp_XY, theInspector: BRepMesh_CircleInspector): void
Inspect all targets in the cell corresponding to the given point.
Parameters (2)thePnttheInspector
- Inspect(thePntMin: gp_XY, thePntMax: gp_XY, theInspector: BRepMesh_CircleInspector): void
Inspect all targets in the cells range limited by two given points (the first point must have all coordinates equal or less than the same coordinate of the second point).
Parameters (3)thePntMinthePntMaxtheInspector
IMeshData_Curve
Interface class representing discrete 3d curve of edge. Indexation of points starts from zero.
Static methods(2)
- get_type_name(): string
Instance methods(5)
- InsertPoint(thePosition: number, thePoint: gp_Pnt, theParamOnPCurve: number): void
Inserts new discretization point at the given position.
Parameters (3)thePositionthePointtheParamOnPCurve
Adds new discretization point to curve.
Parameters (2)thePointtheParamOnCurve
Returns discretization point with the given index.
Parameters (1)theIndex
- RemovePoint(theIndex: number): void
Removes point with the given index.
Parameters (1)theIndex
IMeshData_DMapOfIFacePtrsListOfInteger
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_DMapOfIFacePtrsMapOfIEdgePtrs
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_DMapOfIntegerListOfInteger
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_DMapOfShapeInteger
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_ICurveArrayAdaptorHandle
Constructors(1)
IMeshData_ICurveHandle
Constructors(1)
IMeshData_IDMapOfIFacePtrsListOfIPCurves
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_IDMapOfLink
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_IEdgeHandle
Constructors(1)
IMeshData_IFaceHandle
Constructors(1)
IMeshData_IMapOfReal
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_IPCurveHandle
Constructors(1)
IMeshData_IWireHandle
Constructors(1)
IMeshData_ListOfInteger
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_ListOfIPCurves
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_ListOfPnt2d
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_MapOfIEdgePtr
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_MapOfIFacePtr
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_MapOfInteger
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_MapOfIntegerInteger
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_MapOfOrientedEdges
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_MapOfReal
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_Model
Interface class representing discrete model of a shape.
Static methods(2)
- get_type_name(): string
Instance methods(8)
- GetMaxSize(): number
Returns maximum size of shape model.
- FacesNb(): number
- AddFace(theFace: TopoDS_Face): IFaceHandleParameters (1)
theFace
- GetFace(theIndex: number): IFaceHandleParameters (1)
theIndex
- EdgesNb(): number
- AddEdge(theEdge: TopoDS_Edge): IEdgeHandleParameters (1)
theEdge
- GetEdge(theIndex: number): IEdgeHandleParameters (1)
theIndex
IMeshData_ParametersList
Interface class representing list of parameters on curve.
Static methods(2)
- get_type_name(): string
Instance methods(4)
- GetParameter(theIndex: number): number
Returns parameter with the given index.
Parameters (1)theIndex
- ParametersNb(): number
Returns number of parameters.
- Clear(isKeepEndPoints: boolean): void
Clears parameters list.
Parameters (1)isKeepEndPoints
IMeshData_PCurve
Interface class representing pcurve of edge associated with discrete face. Indexation of points starts from zero.
Static methods(2)
- get_type_name(): string
Instance methods(10)
- InsertPoint(thePosition: number, thePoint: gp_Pnt2d, theParamOnPCurve: number): void
Inserts new discretization point at the given position.
Parameters (3)thePositionthePointtheParamOnPCurve
Adds new discretization point to pcurve.
Parameters (2)thePointtheParamOnPCurve
Returns discretization point with the given index.
Parameters (1)theIndex
- GetIndex(theIndex: number): number
Returns index in mesh corresponded to discretization point with the given index.
Parameters (1)theIndex
- RemovePoint(theIndex: number): void
Removes point with the given index.
Parameters (1)theIndex
- IsForward(): boolean
Returns forward flag of this pcurve.
- IsInternal(): boolean
Returns internal flag of this pcurve.
Returns orientation of the edge associated with current pcurve.
- GetFace(): unknown
Returns discrete face pcurve is associated to.
IMeshData_SequenceOfBndB2d
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_SequenceOfInteger
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_SequenceOfReal
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_Shape
Interface class representing model with associated TopoDS_Shape. Intended for inheritance by structures and algorithms keeping reference TopoDS_Shape.
Static methods(2)
- get_type_name(): string
Instance methods(3)
- SetShape(theShape: TopoDS_Shape): void
Assigns shape to discrete shape.
Parameters (1)theShape
Returns shape assigned to discrete shape.
IMeshData_Status
Properties(10)
IMeshData_StatusOwner
Extension interface class providing status functionality.
Instance methods(5)
- IsEqual(theValue: IMeshData_Status): boolean
Returns true in case if status is strictly equal to the given value.
Parameters (1)theValue
- IsSet(theValue: IMeshData_Status): boolean
Returns true in case if status is set.
Parameters (1)theValue
- SetStatus(theValue: IMeshData_Status): void
Adds status to status flags of a face.
Parameters (1)theValue
- UnsetStatus(theValue: IMeshData_Status): void
Adds status to status flags of a face.
Parameters (1)theValue
- GetStatusMask(): number
Returns complete status mask.
IMeshData_TessellatedShape
Interface class representing shaped model with deflection.
Static methods(2)
- get_type_name(): string
Instance methods(3)
- GetDeflection(): number
Gets deflection value for the discrete model.
- SetDeflection(theValue: number): void
Sets deflection value for the discrete model.
Parameters (1)theValue
IMeshData_VectorOfBoolean
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_VectorOfCircle
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_VectorOfElements
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_VectorOfIEdgeHandles
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_VectorOfIEdgePtrs
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_VectorOfIFaceHandles
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_VectorOfInteger
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_VectorOfIPCurveHandles
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_VectorOfIWireHandles
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_VectorOfOrientation
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_VectorOfVertex
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
IMeshData_VertexCellFilter
A data structure for sorting geometric objects (called targets) in n-dimensional space into cells, with associated algorithm for fast checking of coincidence (overlapping, intersection, etc.) with other objects (called here bullets).
Description
The algorithm is based on hash map, thus it has linear time of initialization (O(N) where N is number of cells covered by added targets) and constant-time search for one bullet (more precisely, O(M) where M is number of cells covered by the bullet).
The idea behind the algorithm is to separate each coordinate of the space into equal-size cells. Note that this works well when cell size is approximately equal to the characteristic size of the involved objects (targets and bullets; including tolerance eventually used for coincidence check).
Usage
The target objects to be searched are added to the tool by methods Add(); each target is classified as belonging to some cell(s). The data on cells (list of targets found in each one) are stored in the hash map with key being cumulative index of the cell by all coordinates. Thus the time needed to find targets in some cell is O(1) * O(number of targets in the cell).
As soon as all the targets are added, the algorithm is ready to check for coincidence. To find the targets coincident with any given bullet, it checks all the candidate targets in the cell(s) covered by the bullet object (methods Inspect()).
The methods Add() and Inspect() have two flavours each: one accepts single point identifying one cell, another accept two points specifying the range of cells. It should be noted that normally at least one of these methods is called as for range of cells: either due to objects having non- zero size, or in order to account for the tolerance when objects are points.
The set of targets can be modified during the process: new targets can be added by Add(), existing targets can be removed by Remove().
Implementation
The algorithm is implemented as template class, thus it is capable to work with objects of any type. The only argument of the template should be the specific class providing all necessary features required by the algorithm:
- typedef "Target" defining type of target objects. This type must have copy constructor
- typedef "Point" defining type of geometrical points used
- static constexpr int Dimension whose value must be dimension of the point
- method Coord() returning value of the i-th coordinate of the point: static double Coord (int i, const
Point& thePnt); Note that index i is from 0 to Dimension-1. - method
IsEqual()used byRemove()to identify objects to be removed: bool IsEqual (constTarget& theT1, constTarget& theT2); - method
Inspect()performing necessary actions on the candidate target object (usually comparison with the currently checked bullet object):NCollection_CellFilter_ActionInspect (constTarget& theObject); The returned value can be used to command CellFilter to remove the inspected item from the current cell; this allows to exclude the items that has been processed and are not needed any more in further search (for better performance). Note that methodInspect()can be const and/or virtual.
Constructors(2)
- constructor(theCellSize?: number, theAlloc?: NCollection_IncAllocator): IMeshData_VertexCellFilter
Constructor when dimension count is known at compilation time.
Parameters (2)theCellSizetheAlloc
- constructor(theDim: number, theCellSize?: number, theAlloc?: NCollection_IncAllocator): IMeshData_VertexCellFilter
Constructor; initialized by dimension count and cell size.
Note: the cell size must be ensured to be greater than maximal coordinate of the involved points divided by INT_MAX, in order to avoid integer overflow of cell index.
By default cell size is 0, which is invalid; thus if default constructor is used, the tool must be initialized later with appropriate cell size by call toReset()Constructor when dimension count is unknown at compilation time.Parameters (3)theDimtheCellSizetheAlloc
Instance methods(8)
- Reset(theCellSize: number, theAlloc: NCollection_IncAllocator): void
Clear the data structures, set new cell size and allocator.
Parameters (2)theCellSizetheAlloc
- Reset(theCellSize: NCollection_Array1_double, theAlloc: NCollection_IncAllocator): void
Clear the data structures and set new cell sizes and allocator.
Parameters (2)theCellSize—Mutated in place; read the updated value from this argument after the call.theAlloc
Adds a target object for further search at a point (into only one cell).
Parameters (2)theTargetthePnt
Adds a target object for further search in the range of cells defined by two points (the first point must have all coordinates equal or less than the same coordinate of the second point).
Parameters (3)theTargetthePntMinthePntMax
Find a target object at a point and remove it from the structures. For usage of this method "operator ==" should be defined for
Target.Parameters (2)theTargetthePnt
Find a target object in the range of cells defined by two points and remove it from the structures (the first point must have all coordinates equal or less than the same coordinate of the second point). For usage of this method "operator ==" should be defined for
Target.Parameters (3)theTargetthePntMinthePntMax
- Inspect(thePnt: gp_XY, theInspector: BRepMesh_VertexInspector): void
Inspect all targets in the cell corresponding to the given point.
Parameters (2)thePnttheInspector
- Inspect(thePntMin: gp_XY, thePntMax: gp_XY, theInspector: BRepMesh_VertexInspector): void
Inspect all targets in the cells range limited by two given points (the first point must have all coordinates equal or less than the same coordinate of the second point).
Parameters (3)thePntMinthePntMaxtheInspector
BRepMesh
OCCT package BRepMesh: BRepMesh_BaseMeshAlgo, BRepMesh_BoundaryParamsRangeSplitter, BRepMesh_Circle, BRepMesh_CircleInspector, and 49 more bound classes.
IMeshTools
OCCT package IMeshTools: IMeshTools_Context, IMeshTools_CurveTessellator, IMeshTools_MeshAlgo, IMeshTools_MeshAlgoFactory, and 7 more bound classes.