check for infinite shape

This commit is contained in:
Joachim Schoeberl 2024-02-21 15:14:33 +01:00
parent 4f0b15ef55
commit b959676534

View File

@ -669,8 +669,14 @@ namespace netgen
BRepMesh_IncrementalMesh (geom.shape, 0.01, true); BRepMesh_IncrementalMesh (geom.shape, 0.01, true);
triangulation = BRep_Tool::Triangulation (face, loc); triangulation = BRep_Tool::Triangulation (face, loc);
} }
if(triangulation.IsNull()) if(triangulation.IsNull())
throw Exception("OCC-Triangulation could not be built. Do you have a bounded shape?"); {
if (geom.shape.Infinite())
throw Exception("Cannot generate mesh for an infinite geometry");
else
throw Exception("OCC-Triangulation could not be built");
}
BRepAdaptor_Surface sf(face, Standard_True); BRepAdaptor_Surface sf(face, Standard_True);
// one prop for evaluating and one for derivatives // one prop for evaluating and one for derivatives