Skip to content

Commit

Permalink
Arch: Also skip default storey when importing IFC with 'replace by gr…
Browse files Browse the repository at this point in the history
…oup' option
  • Loading branch information
yorikvanhavre committed Apr 21, 2020
1 parent 6e712f6 commit 71414fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Arch/Resources/ui/preferences-ifc.ui
Expand Up @@ -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>
Expand Down
5 changes: 5 additions & 0 deletions src/Mod/Arch/importIFC.py
Expand Up @@ -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
Expand Down

0 comments on commit 71414fc

Please sign in to comment.