Arch: Also skip default storey when importing IFC with 'replace by group' option
This commit is contained in:
@@ -388,10 +388,10 @@ FreeCAD object properties</string>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBox">
|
||||
<property name="toolTip">
|
||||
<string>If this option is checked, the default Project, Site and Building objects that are usually found in an IFC file are not imported, and all objects are placed in a Group</string>
|
||||
<string>If this option is checked, the default Project, Site, Building and Storeys objects that are usually found in an IFC file are not imported, and all objects are placed in a Group. Buildins ans storeys are still imported if there is more than one.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Replace Project, Site and Buiding by Group</string>
|
||||
<string>Replace Project, Site, Buiding and Storey by Group</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ifcReplaceProject</cstring>
|
||||
|
||||
@@ -393,6 +393,11 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None):
|
||||
# let multiple buildings through...
|
||||
if preferences['DEBUG']: print(" skipped.")
|
||||
continue
|
||||
elif ptype in ['IfcBuildingStorey']:
|
||||
if len(ifcfile.by_type("IfcBuildingStorey")) == 1:
|
||||
# let multiple storeys through...
|
||||
if preferences['DEBUG']: print(" skipped.")
|
||||
continue
|
||||
|
||||
# check if this object is sharing its shape (mapped representation)
|
||||
clone = None
|
||||
|
||||
Reference in New Issue
Block a user