mark bounds as external based on entity type

This commit is contained in:
Thomas Krijnen
2019-09-01 18:46:11 +02:00
parent 8efb86420e
commit bed9c44883
3 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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&);
};
}
+7
View File
@@ -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);
}
}
@@ -219,6 +219,7 @@ namespace ifcopenshell { namespace geometry {
task_iterator_ = tasks_.begin();
task_result_index_ = 0;
done = 0;
total = tasks_.size();