From c0f2ac592e406128c9c4945a51e40b50f58bfe56 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 22 Jul 2024 13:07:40 +0200 Subject: [PATCH] Consider edge orientation in faceset helper for advanced planar breps #4895 --- src/ifcgeom/kernels/opencascade/faceset_helper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ifcgeom/kernels/opencascade/faceset_helper.cpp b/src/ifcgeom/kernels/opencascade/faceset_helper.cpp index fa7716abe5..3436b67bbd 100644 --- a/src/ifcgeom/kernels/opencascade/faceset_helper.cpp +++ b/src/ifcgeom/kernels/opencascade/faceset_helper.cpp @@ -42,7 +42,7 @@ IfcGeom::OpenCascadeKernel::faceset_helper::faceset_helper( loops.push_back(l); for (auto& e : l->children) { // @todo make sure only cartesian points are provided here - auto& p = boost::get(e->start); + auto& p = boost::get(e->orientation.get_value_or(true) ? e->start : e->end); if (point_identities_visited.find(p->identity()) == point_identities_visited.end()) { point_identities_visited.insert(p->identity()); points.push_back(p); @@ -201,10 +201,10 @@ void IfcGeom::OpenCascadeKernel::faceset_helper::loop_(const ifcopenshell::geome return; } - auto a = boost::get(ps->children.back()->start); + auto a = boost::get(ps->children.back()->orientation.get_value_or(true) ? ps->children.back()->start : ps->children.back()->end); auto A = a->identity(); for (auto& b : ps->children) { - auto B = boost::get(b->start)->identity(); + auto B = boost::get(b->orientation.get_value_or(true) ? b->start : b->end)->identity(); auto C = vertex_mapping_[A], D = vertex_mapping_[B]; bool fwd = C < D; if (!b->orientation) {