fix optimizing mesh without geometry

This commit is contained in:
Christopher Lackner 2022-08-22 17:49:12 +02:00
parent 43fbd57a67
commit 54ee68d847

View File

@ -1058,9 +1058,10 @@ namespace netgen
void NetgenGeometry :: FinalizeMesh(Mesh& mesh) const
{
for (int i = 0; i < mesh.GetNDomains(); i++)
if (auto name = solids[i]->properties.name)
mesh.SetMaterial (i+1, *name);
if(solids.Size())
for (int i = 0; i < mesh.GetNDomains(); i++)
if (auto name = solids[i]->properties.name)
mesh.SetMaterial (i+1, *name);
}
shared_ptr<NetgenGeometry> GeometryRegisterArray :: LoadFromMeshFile (istream & ist) const