From 25a5135e8d297d28e9e3d546c216447fcd593e0f Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sun, 27 Mar 2016 21:18:28 +0200 Subject: [PATCH] Disable geometry re-use with world coords --- src/ifcgeom/IfcGeomIterator.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ifcgeom/IfcGeomIterator.h b/src/ifcgeom/IfcGeomIterator.h index b3867b7539..2d0cca7415 100644 --- a/src/ifcgeom/IfcGeomIterator.h +++ b/src/ifcgeom/IfcGeomIterator.h @@ -381,7 +381,10 @@ namespace IfcGeom { } } - const bool process_maps_for_current_representation = (!has_openings || settings.get(IteratorSettings::DISABLE_OPENING_SUBTRACTIONS)); + // With world coords enabled, object transformations are directly applied to + // the BRep. There is no way to re-use the geometry for multiple products. + const bool process_maps_for_current_representation = !settings.get(IteratorSettings::USE_WORLD_COORDS) && + (!has_openings || settings.get(IteratorSettings::DISABLE_OPENING_SUBTRACTIONS)); bool representation_processed_as_mapped_item = false; IfcSchema::IfcRepresentation* representation_mapped_to = 0; @@ -506,7 +509,7 @@ namespace IfcGeom { IfcSchema::IfcProduct* product = *ifcproduct_iterator; BRepElement

* element; - if (ifcproduct_iterator == ifcproducts->begin()) { + if (ifcproduct_iterator == ifcproducts->begin() || !settings.get(IteratorSettings::USE_WORLD_COORDS)) { element = kernel.create_brep_for_representation_and_product

(settings, representation, product); } else { element = kernel.create_brep_for_processed_representation(settings, representation, product, current_shape_model);