Commit 9c2f0901 authored by gsell's avatar gsell
Browse files

Merge branch '637-segmantation-fault-with-boundarygeometry' into 'master'

Resolve "Segmantation fault with BoundaryGeometry"

Closes #637

See merge request OPAL/src!476
parents 48a60c6e 3c9581d9
......@@ -1962,26 +1962,26 @@ Change orientation if diff is:
Find next untested triangle, trivial for the first sub-mesh.
There is a least one not yet tested triangle!
*/
while (isOriented [triangle_id])
while (isOriented[triangle_id])
triangle_id++;
// ensure that normal of this triangle is inward pointing
if (!hasInwardPointingNormal (bg, triangle_id)) {
std::swap (bg->PointID (triangle_id, 2), bg->PointID (triangle_id, 3));
}
isOriented [triangle_id] = true;
isOriented[triangle_id] = true;
// loop over all triangles in sub-mesh
triangles [queue_end++] = triangle_id;
triangles[queue_end++] = triangle_id;
do {
for (auto neighbor_id: neighbors [triangle_id]) {
if (isOriented [neighbor_id]) continue;
for (auto neighbor_id: neighbors[triangle_id]) {
if (isOriented[neighbor_id]) continue;
orientTriangle (bg, triangle_id, neighbor_id);
isOriented [neighbor_id] = true;
isOriented[neighbor_id] = true;
triangles[queue_end++] = neighbor_id;
}
triangle_id = triangles [++queue_cursor];
} while (queue_cursor < queue_end);
queue_cursor++;
} while (queue_cursor < queue_end && (triangle_id = triangles[queue_cursor],true));
} while (queue_end < bg->Triangles_m.size());
if (parts == 1) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment