Store multiple triangulations

Hello, I see we can get the Triangulation with a Poly_MeshPurpose, but is there a way to actually store multiple meshings inside a shape ? Something like:

BRepMesh_IncrementalMesh(shape, fine_params, nullptr,  Poly_MeshPurpose_Calculation);
BRepMesh_IncrementalMesh(shape, coarse_params, nullptr,  Poly_MeshPurpose_Presentation);

// and then:
auto t = BRep_Tool::Triangulation(face, location, Poly_MeshPurpose_Calculation);

Thanks for your help !

Dmitrii Pasukhin's picture

Hello,

You be able to store more then 1 tesselation.

I can suggest the following solution: You need to build by BRepMesh_IncrementalMesh and then get active tesselation and put into correct position. Please look into "BRepTools::ActivateTriangulation" "BRep_TFace::Triangulation" to modify and "const Handle(Poly_Triangulation)& BRep_TFace::Triangulation" to get active tessellation generated from IMesh. And then build again with differ BRepMesh_IncrementalMesh parameters.

Best regards, Dmitrii.

Antoine H's picture

Excellent, that seems to work :-) Thanks !

Feature request: add a Poly_MeshPurpose into BRepMesh_IncrementalMesh.