throw if optimize2d is called without geometry

This commit is contained in:
Christopher Lackner 2021-01-26 11:23:46 +01:00
parent 5e489319c6
commit d1d3253408

View File

@ -983,6 +983,8 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
self.CalcLocalH(0.5);
MeshingParameters mp;
mp.optsteps2d = 5;
if(!self.GetGeometry())
throw Exception("Cannot optimize surface mesh without geometry!");
Optimize2d (self, mp);
},py::call_guard<py::gil_scoped_release>())