For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Accessing edges of a BRepMesh_Triangle (after BRepMesh_FastDiscret)

Jean-Yves Brud's picture

I use BRepMesh_FastDiscret to mesh a Shape:
BRepMesh_FastDiscret *myMesh = new BRepMesh_FastDiscret(...)

To retrieve triangles, I do this:
int NbTri = myMesh->NbTriangles();

BRepMesh_Triangle& triangle;
for (iTri=1; iTri triangle = myMesh->Triangle(iTri);

But, here I cannot retrieve the edge indices for the triangle (Edge1, Edge2, Edge3 are private data).

Does anyone know how to access these private fields ?


Rob Bachrach's picture

Have you looked at the public member function Edges of BRepMesh_Triangle? This appears to return the edge indices and their orientations for the triangle.

Jean-Yves Brud's picture

Thank you Bob,

It is exactly what I needed.

Jun WANG's picture

Hi, Jean. Why BRepMesh_FastDiscret has no the function: "NbTriangles()" in my OCC. What kind of OCC are you using ????