diff --git a/libsrc/occ/occgenmesh.cpp b/libsrc/occ/occgenmesh.cpp index 7a26bf1b..7eac4cc3 100644 --- a/libsrc/occ/occgenmesh.cpp +++ b/libsrc/occ/occgenmesh.cpp @@ -1137,7 +1137,12 @@ namespace netgen Handle(Geom_Surface) surf = BRep_Tool::Surface (face); Handle(Poly_Triangulation) triangulation = BRep_Tool::Triangulation (face, loc); - if (triangulation.IsNull()) continue; + if (triangulation.IsNull()) + { + BRepTools::Clean (geom.shape); + BRepMesh_IncrementalMesh (geom.shape, 0.01, true); + triangulation = BRep_Tool::Triangulation (face, loc); + } BRepAdaptor_Surface sf(face, Standard_True); BRepLProp_SLProps prop(sf, 2, 1e-5); diff --git a/libsrc/occ/python_occ.cpp b/libsrc/occ/python_occ.cpp index 186970b7..dbd1eda6 100644 --- a/libsrc/occ/python_occ.cpp +++ b/libsrc/occ/python_occ.cpp @@ -33,6 +33,7 @@ DLL_HEADER void ExportNgOCC(py::module &m) SetGlobalMesh(mesh); mesh->SetGeometry(geo); ng_geometry = geo; + try { geo->GenerateMesh(mesh,param);