mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
Don't add new duplicate segments to mesh, if mesh fulfills HaveSingleSegments()
This commit is contained in:
parent
875da8ee45
commit
35360df540
@ -360,6 +360,14 @@ namespace netgen
|
||||
{
|
||||
INDEX_2_HASHTABLE<bool> already_added( 2*new_segments.Size() );
|
||||
|
||||
for(auto & seg : mesh.LineSegments())
|
||||
{
|
||||
INDEX_2 i2 (seg[0], seg[1]);
|
||||
i2.Sort();
|
||||
if(!already_added.Used(i2))
|
||||
already_added.Set(i2, true);
|
||||
}
|
||||
|
||||
for(auto & seg : new_segments)
|
||||
{
|
||||
INDEX_2 i2 (seg[0], seg[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user