find edges by searching for segments in both directions

This commit is contained in:
Christopher Lackner 2022-04-11 13:04:56 +02:00
parent a5ba7075e4
commit 0135559dd6

View File

@ -818,11 +818,22 @@ namespace netgen
point_found = true;
break;
}
else if(seg[1] == points.Last() &&
points[points.Size()-2] != seg[0])
{
edge_len += (mesh[points.Last()] - mesh[seg[0]]).Length();
points.Append(seg[0]);
point_found = true;
break;
}
}
if(is_end_point(points.Last()))
break;
if(!point_found)
throw Exception(string("Could not find connected list of line segments for edge ") + edgenr);
{
cout << "points = " << points << endl;
throw Exception(string("Could not find connected list of line segments for edge ") + edgenr);
}
}
// tangential part of growth vectors