From bed9c448836770a5d3a5b72e7f9822c1fa431bd3 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sun, 1 Sep 2019 18:46:11 +0200 Subject: [PATCH] mark bounds as external based on entity type --- src/ifcgeom/kernels/cgal/CgalKernel.h | 2 +- src/ifcgeom/schema/mapping.cpp | 7 +++++++ src/ifcgeom/schema_agnostic/IfcGeomIterator.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/kernels/cgal/CgalKernel.h b/src/ifcgeom/kernels/cgal/CgalKernel.h index 1ac193a673..d3b2703606 100644 --- a/src/ifcgeom/kernels/cgal/CgalKernel.h +++ b/src/ifcgeom/kernels/cgal/CgalKernel.h @@ -112,7 +112,7 @@ namespace kernels { bool convert(const taxonomy::shell* l, cgal_shape_t& shape); virtual bool convert_impl(const taxonomy::shell*, ifcopenshell::geometry::ConversionResults&); - virtual bool convert_impl(const taxonomy::extrusion*, ifcopenshell::geometry::ConversionResults&); + // virtual bool convert_impl(const taxonomy::extrusion*, ifcopenshell::geometry::ConversionResults&); }; } diff --git a/src/ifcgeom/schema/mapping.cpp b/src/ifcgeom/schema/mapping.cpp index dd7a605dae..2ce140442f 100644 --- a/src/ifcgeom/schema/mapping.cpp +++ b/src/ifcgeom/schema/mapping.cpp @@ -176,6 +176,13 @@ taxonomy::item* mapping::map_impl(const IfcSchema::IfcFace* inst) { if (!bound->Orientation()) { r->reverse(); } + if (bound->declaration().is(IfcSchema::IfcFaceOuterBound::Class())) { + // Make a copy in case we need immutability later for e.g. caching + auto s = r->clone(); + ((taxonomy::loop*)s)->external = true; + delete r; + r = s; + } face->children.push_back(r); } } diff --git a/src/ifcgeom/schema_agnostic/IfcGeomIterator.h b/src/ifcgeom/schema_agnostic/IfcGeomIterator.h index cc6bc32823..feb28af639 100644 --- a/src/ifcgeom/schema_agnostic/IfcGeomIterator.h +++ b/src/ifcgeom/schema_agnostic/IfcGeomIterator.h @@ -219,6 +219,7 @@ namespace ifcopenshell { namespace geometry { task_iterator_ = tasks_.begin(); + task_result_index_ = 0; done = 0; total = tasks_.size();