Added a function to add a new entity without inserting it into the ifc file

This commit is contained in:
Yorik van Havre
2014-07-25 18:03:40 -03:00
parent 286e9d183a
commit eb39eeb30b
+7
View File
@@ -103,6 +103,13 @@ def create_shape(inst, settings): return ifc_wrapper.create_shape(inst.wrapped_d
def clean(): return ifc_wrapper.clean()
def create_entity(type,*args,**kwargs):
e = entity_instance(ifc_wrapper.entity_instance(type))
attrs = list(enumerate(args)) + \
[(e.wrapped_data.get_argument_index(name), arg) for name, arg in kwargs.items()]
for idx, arg in attrs: e[idx] = arg
return e
DISABLE_OPENING_SUBTRACTIONS = ifc_wrapper.DISABLE_OPENING_SUBTRACTIONS
DISABLE_OBJECT_PLACEMENT = ifc_wrapper.DISABLE_OBJECT_PLACEMENT
SEW_SHELLS = ifc_wrapper.SEW_SHELLS