"Concat" Poly_Triangulation

Hello! I'm working with triangulation, generated with OCCT, and have a question. Is there any possibility to glue (concat) two triangulations into one?

For example, if I have

Handle(Poly_Triangulation) triang1 = new .... // some points and Poly_Triangles (N1 - number of nodes, M1 - number of triangles)

Handle(Poly_Triangulation) triang2 = new .... // some another points and Poly_Triangles (N2, M2)

.....

Handle(Poly_Triangulation) totalTriang = SomeTool::ConcatTriangles(triang1, triang2); // some fake code to concat :)

.....

I create some custom code, that executed this operation (including reoredering triangles), but may be exist any included possibility do this...

Roman Lygin's picture

Hi Sergey,

This does not exist in OCC out of the box. You have to implement your own.

We do this in our product by stitching triangulations of faces belonging to one shell to create a watertight topological mesh (geometrical watertightness is ensured by the mesher itself).

The algorithm is based on using Poly_PolygonOnTriangulation (returned by BRep_Tool::PolygonOnTriangulation) for shared edges.

Hope this gives some hints.

Good luck!

Roman