mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
csg2d - skip degenerated solids
This commit is contained in:
parent
89c33f5b28
commit
7aab695f04
@ -1538,7 +1538,7 @@ shared_ptr<netgen::SplineGeometry2d> CSG2d :: GenerateSplineGeometry()
|
||||
for(auto & s : solids)
|
||||
{
|
||||
dom++;
|
||||
geo->SetMaterial(dom, s.name);
|
||||
bool is_solid_degenerated = true; // Don't create new domain for degenerated solids
|
||||
for(auto & poly : s.polys)
|
||||
{
|
||||
for(auto v : poly.Vertices(ALL))
|
||||
@ -1588,9 +1588,15 @@ shared_ptr<netgen::SplineGeometry2d> CSG2d :: GenerateSplineGeometry()
|
||||
ls.left = dom;
|
||||
else
|
||||
ls.right = dom;
|
||||
|
||||
is_solid_degenerated = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!is_solid_degenerated)
|
||||
geo->SetMaterial(dom, s.name);
|
||||
else
|
||||
dom--; // degenerated solid, use same domain index again
|
||||
}
|
||||
|
||||
for(auto & [name, bc] : bcmap)
|
||||
|
Loading…
Reference in New Issue
Block a user