mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
Merge branch 'throw_on_meshing_fail' into 'master'
throw on meshing failure See merge request jschoeberl/netgen!299
This commit is contained in:
commit
2b683f70d5
@ -707,7 +707,9 @@ However, when r = 0, the top part becomes a point(tip) and meshing fails!
|
|||||||
mesh->SetGeometry(geo);
|
mesh->SetGeometry(geo);
|
||||||
ng_geometry = geo;
|
ng_geometry = geo;
|
||||||
geo->FindIdenticSurfaces(1e-8 * geo->MaxSize());
|
geo->FindIdenticSurfaces(1e-8 * geo->MaxSize());
|
||||||
geo->GenerateMesh (mesh, mp);
|
auto result = geo->GenerateMesh (mesh, mp);
|
||||||
|
if(result != 0)
|
||||||
|
throw Exception("Meshing failed!");
|
||||||
return mesh;
|
return mesh;
|
||||||
}, py::arg("mp") = nullptr,
|
}, py::arg("mp") = nullptr,
|
||||||
meshingparameter_description.c_str(),
|
meshingparameter_description.c_str(),
|
||||||
|
@ -377,7 +377,9 @@ DLL_HEADER void ExportGeom2d(py::module &m)
|
|||||||
mesh->SetGeometry(self);
|
mesh->SetGeometry(self);
|
||||||
SetGlobalMesh (mesh);
|
SetGlobalMesh (mesh);
|
||||||
ng_geometry = self;
|
ng_geometry = self;
|
||||||
self->GenerateMesh(mesh, mp);
|
auto result = self->GenerateMesh(mesh, mp);
|
||||||
|
if(result != 0)
|
||||||
|
throw Exception("Meshing failed!");
|
||||||
return mesh;
|
return mesh;
|
||||||
}, py::arg("mp") = nullptr,
|
}, py::arg("mp") = nullptr,
|
||||||
py::call_guard<py::gil_scoped_release>(),
|
py::call_guard<py::gil_scoped_release>(),
|
||||||
|
@ -177,7 +177,9 @@ DLL_HEADER void ExportNgOCC(py::module &m)
|
|||||||
geo->SetOCCParameters(occparam);
|
geo->SetOCCParameters(occparam);
|
||||||
auto mesh = make_shared<Mesh>();
|
auto mesh = make_shared<Mesh>();
|
||||||
mesh->SetGeometry(geo);
|
mesh->SetGeometry(geo);
|
||||||
geo->GenerateMesh(mesh, mp);
|
auto result = geo->GenerateMesh(mesh, mp);
|
||||||
|
if(result != 0)
|
||||||
|
throw Exception("Meshing failed!");
|
||||||
SetGlobalMesh(mesh);
|
SetGlobalMesh(mesh);
|
||||||
ng_geometry = geo;
|
ng_geometry = geo;
|
||||||
return mesh;
|
return mesh;
|
||||||
|
@ -205,7 +205,10 @@ DLL_HEADER void ExportSTL(py::module & m)
|
|||||||
mesh->SetGeometry(geo);
|
mesh->SetGeometry(geo);
|
||||||
ng_geometry = geo;
|
ng_geometry = geo;
|
||||||
SetGlobalMesh(mesh);
|
SetGlobalMesh(mesh);
|
||||||
STLMeshingDummy(geo.get(), mesh, mp, stlparam);
|
auto result = STLMeshingDummy(geo.get(), mesh, mp, stlparam);
|
||||||
|
if(result != 0)
|
||||||
|
throw Exception("Meshing failed!");
|
||||||
|
|
||||||
return mesh;
|
return mesh;
|
||||||
}, py::arg("mp") = nullptr,
|
}, py::arg("mp") = nullptr,
|
||||||
py::call_guard<py::gil_scoped_release>(),
|
py::call_guard<py::gil_scoped_release>(),
|
||||||
|
Loading…
Reference in New Issue
Block a user