Further work on trying to get orientation properly mapped

This commit is contained in:
Thomas Krijnen
2024-06-28 13:41:01 +02:00
parent c240f0582a
commit 42b96d6290
3 changed files with 22 additions and 16 deletions
+3 -4
View File
@@ -52,15 +52,14 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve* inst) {
else if (segment->as<IfcSchema::IfcCompositeCurveSegment>()) {
auto crv = map(segment->as<IfcSchema::IfcCompositeCurveSegment>()->ParentCurve());
if (crv) {
if (!segment->as<IfcSchema::IfcCompositeCurveSegment>()->SameSense()) {
crv->reverse();
}
if (crv->kind() == taxonomy::EDGE) {
auto ecrv = taxonomy::cast<taxonomy::edge>(crv);
ecrv->curve_sense.reset(segment->as<IfcSchema::IfcCompositeCurveSegment>()->SameSense());
loop->children.push_back(ecrv);
}
else if (crv->kind() == taxonomy::LOOP) {
if (!segment->as<IfcSchema::IfcCompositeCurveSegment>()->SameSense()) {
crv->reverse();
}
for (auto& s : taxonomy::cast<taxonomy::loop>(crv)->children) {
loop->children.push_back(s);
}