diff --git a/libsrc/occ/occgenmesh.cpp b/libsrc/occ/occgenmesh.cpp index 1e373ca5..45565a2b 100644 --- a/libsrc/occ/occgenmesh.cpp +++ b/libsrc/occ/occgenmesh.cpp @@ -666,8 +666,24 @@ namespace netgen if (triangulation.IsNull()) { BRepTools::Clean (geom.shape); - BRepMesh_IncrementalMesh (geom.shape, 0.01, true); - triangulation = BRep_Tool::Triangulation (face, loc); + // BRepMesh_IncrementalMesh (geom.shape, 0.01, true); + + // https://dev.opencascade.org/doc/overview/html/occt_user_guides__mesh.html + IMeshTools_Parameters aMeshParams; + aMeshParams.Deflection = 0.01; + aMeshParams.Angle = 0.5; + aMeshParams.Relative = Standard_False; + aMeshParams.InParallel = Standard_True; + aMeshParams.MinSize = Precision::Confusion(); + aMeshParams.InternalVerticesMode = Standard_True; + aMeshParams.ControlSurfaceDeflection = Standard_True; + + BRepMesh_IncrementalMesh aMesher (geom.shape, aMeshParams); + const Standard_Integer aStatus = aMesher.GetStatusFlags(); + if (aStatus != 0) + cout << "BRepMesh_IncrementalMesh.status = " << aStatus << endl; + + triangulation = BRep_Tool::Triangulation (face, loc); } if(triangulation.IsNull())