Hide menu
Loading...
Searching...
No Matches
cadex::ModelData_BRepToPolyAssociations Class Reference

Contains connecting information between B-Rep and Poly representation. More...

Public Member Functions

ModelData_MeshPatch Get (const ModelData_Vertex &theVertex) const
 Returns the result of meshing the given vertex.
 
ModelData_MeshPatch Get (const ModelData_Edge &theEdge) const
 Returns the result of meshing the given edge.
 
ModelData_MeshPatch Get (const ModelData_Face &theFace) const
 Returns the result of meshing the given face.
 
const std::shared_ptr< internal::ModelData_BRepToPolyAssociationsImpl > & Impl () const
 

Detailed Description

Contains connecting information between B-Rep and Poly representation.

Methods of this container class allow to get index array from PolyVertexSet (one of IndexedTriangleSet, PolyLineSet, PolyPointSet) which represents parts of mesh, corresponding to ModelData_Face, ModelData_Edge, ModelData_Vertex of original B-Rep model.

Attention
By default when ModelAlgo_BRepMesher computes Poly representation that groups faces by their appearances and then merges them into several IndexedTriangleSets, one for each appearance.
For example, if the model of cube will be given to ModelAlgo_BRepMesher, and some faces of cube will be red colored and some yellow colored, then ModelAlgo_BRepMesher returns mesh model with two IndexedTriangleSets - red and yellow. As result, each IndexedTriangleSet will have its own indexation.
This may be unwanted behavior, and to fix it, use SaveAppearances() flag. If it set to false, then ModelAlgo_BRepMesher creates one mesh per body, but the appearance of IndexedTriangleSet will be empty and may only be gotten from original B-Rep model.
Similar situation will be if MergeFaceSets() flag is set to false. Then each face of cube will have it's own ITS.
This also may be unwanted behavior, and to fix it - set MergeFaceSets() to true.
See also
ModelAlgo_BRepMesher
Examples
meshing/visualizationmesher/Program.cs, and meshing/visualizationmesher/main.cxx.

Member Function Documentation

◆ Get() [1/3]

ModelData_MeshPatch cadex::ModelData_BRepToPolyAssociations::Get ( const ModelData_Edge theEdge) const

Returns the result of meshing the given edge.

The result is a polyline represented by ModelData_MeshPatch. If this edge was part of Solid or Sheet body, the vertex set would be ModelData_IndexedTriangleSet, and if it was part of Wireframe body, the vertex set would be ModelData_PolyLineSet.

If edge is null or was meshed by a different mesher instance, returns false.

◆ Get() [2/3]

ModelData_MeshPatch cadex::ModelData_BRepToPolyAssociations::Get ( const ModelData_Face theFace) const

Returns the result of meshing the given face.

The result is a piece of mesh represented by ModelData_MeshPatch.

If face is null or was meshed by a different mesher instance, returns false.

◆ Get() [3/3]

ModelData_MeshPatch cadex::ModelData_BRepToPolyAssociations::Get ( const ModelData_Vertex theVertex) const

Returns the result of meshing the given vertex.

The result is a point represented by ModelData_MeshPatch. If this vertex was part of Solid or Sheet body, the vertex set would be ModelData_IndexedTriangleSet, and if it was part of Wireframe body, the vertex set would be ModelData_PolyLineSet, and if it was part of Acorn body, the vertex set would be ModelData_PolyPointSet,

If vertex is null or was meshed by a different mesher instance, returns false.

Examples
meshing/visualizationmesher/Program.cs, and meshing/visualizationmesher/main.cxx.