Sometimes I see this function fail (i.e. the triangulation I get from BRep_Tool::Triangulation() afterwards is Null. There is no error message and the only parameter I can see to tweak (the deflection) seems to have no effect on whether it fails or not. It looks like the surface it's failing on has a lot of holes and possibly degeneracies (but since I can't triangulate it I can't really tell). Does anybody have any suggestions on how to approach this type of problem? I'm not sure if I can post an example - the one I am looking at is proprietary.



Forum supervisor's picture

Dear Wayne,
OPEN CASCADE has a good experience in solving similar tasks for its customers working with triangulation services. We have a good level of expertise and some re-usable solutions we can offer on a paid basis. Please, do not hesitate to contact us via for more detailed information.

zhou's picture

I just face the problem,I want to know if you have solved?

SunHongLei's picture

As far as i learned, TopoDS_Face have data struct like in attachment.It means that TopoDS_Face has a member like Triangulation,if you do not compute it, it is null.So if you want BRep_Tool::Triangulation() is no null,you need mesh them first.

BrepMesh::Mesh(TopoDS_Face &face);
then,you can use this: BRep_Tool::Triangulation()
and it is not null