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

BRepMesh_IncrementalMesh questions !

Anonymous's picture


I have some questions on the BRepMesh_IncrementalMesh class.

It looks like the real triangulation is performed in the BRepMesh_FastDiscret class through the Add method where you first add the different faces from the shape and then the Add method for the edges forming the faces.

In BRepMesh_FastDiscret::Add(const TopoDS_Face& theface) : - what is the signification of the test on SS.IsNull() ? - what is the signification of the variables mapdefle, myvemap ...

I guess that I will come with more questions in a while but I will terminate by that one : what does prevent this algorithm to genarate ream meshes instead of triangulations if we mesh first the edges ie the edges being part of several faces should be meshed only once !



Igor Feoktistov's picture


algorithm checks exists triangulation for given edge or not. Since connected faces share the same edges, algorithm builds triangulation for edges only once.


guillaume's picture

Hi Igor, The question in then why when I did ask for a STLMesh I did not have this. Is this because the faces are not connected (so is there a way to automatically stich the faces according to some tolerance) or is this because the STL mesh is not generated with this function ?

Is this class (algoritm) describe somewhere ?



Igor Feoktistov's picture

> Is this class (algoritm) describe somewhere
> ?

> Yours

> Guillaume


if you have a set of faces that have only geometrical coincidence between some edges with given tolerance, you can use class BRepOffsetAPI_Sewing to get shell that consists of those faces, but faces will share the same edges.


rla dndwn's picture


I got a problem about the triangulation. BRep_Tool::Triangulation() does not take in TopoDS_Shell. So, triangulations can be queried by only TopoDS_Face. After all,shared edges have unavoidable redundant nodes. What I realy want is unique nodes on vertices and eges in TopoDS_Shell.

Is there a way to solve it?

Olivier GROGNET's picture


I have also a problem with triangulation

In order to transform a TopoDS_Shape in mesh, I used the method:

void BRepMesh::Mesh(const TopoDS_Shape& S,

const Standard_Real d)

which just call BRepMesh_IncrementalMesh(S,d). I have copied the sample about the triangulation to recover the Poly_Triangulation object. My problem is some Face have moved during the transformation. I guess their new location is their local location but I don't know why the method don't care about their location compared to the Shape. Moreover the BRep_Tool::Triangulation(Face,Location) method seems not to use the Location object.

Is the problem known? and is there a solution?

Thanks for any help

rla dndwn's picture

Try this.

TopLoc_Location loc; Handle(Poly_Triangulation) tris=BRep_Tool::Triangulation(face,loc); for(int i=1;iNbNodes();i++){

gp_Pnt pnt=tris->Nodes().Value(i);

pnt.Transform(loc); }

Use the nodes transformed by TopLoc_Location.

Olivier grognet's picture

Thanks for the answer OG

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.