enable optimization of mesh from gui

A new mesh should only be created if full meshing is done and not only
some substeps like volume optimization.
This commit is contained in:
Christopher Lackner 2019-09-16 12:30:45 +02:00
parent d32d498259
commit 8b43ed2637

View File

@ -1349,11 +1349,16 @@ namespace netgen
else else
#endif #endif
if (ng_geometry) if (ng_geometry)
{
if (perfstepsstart == 1)
{ {
mesh = make_shared<Mesh> (); mesh = make_shared<Mesh> ();
// vsmesh.SetMesh (mesh); // vsmesh.SetMesh (mesh);
SetGlobalMesh (mesh); SetGlobalMesh (mesh);
mesh -> SetGeometry(ng_geometry); mesh -> SetGeometry(ng_geometry);
}
if(!mesh)
throw Exception("Need existing global mesh");
mparam.perfstepsstart = perfstepsstart; mparam.perfstepsstart = perfstepsstart;
mparam.perfstepsend = perfstepsend; mparam.perfstepsend = perfstepsend;
int res = ng_geometry -> GenerateMesh (mesh, mparam); int res = ng_geometry -> GenerateMesh (mesh, mparam);