From a3f17cd4e7ed9e2dcde7f59422f83e63a0d926ff Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 2 Jun 2015 13:30:02 +0000 Subject: [PATCH] Enable passing explicit IfcRepresentation in IfcOpenShell-Python create_shape() --- src/ifcopenshell-python/ifcopenshell/geom/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/geom/__init__.py b/src/ifcopenshell-python/ifcopenshell/geom/__init__.py index ba7c2ddcc4..8550f4013d 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/__init__.py @@ -68,8 +68,14 @@ class iterator(_iterator): return wrap_shape_creation(self.settings, _iterator.get(self)) -def create_shape(settings, inst): - return wrap_shape_creation(settings, ifcopenshell_wrapper.create_shape(settings, inst.wrapped_data)) +def create_shape(settings, inst, repr=None): + return wrap_shape_creation( + settings, + ifcopenshell_wrapper.create_shape( + settings, + inst.wrapped_data, + repr.wrapped_data if repr is not None else None + )) def iterate(settings, filename):