Skip to content

Commit

Permalink
Fixed arch bug in bim views
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Mar 15, 2024
1 parent 9e2add8 commit 1e96402
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BimViews.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def update(self, retrigger=True):
for obj in FreeCAD.ActiveDocument.Objects:
t = Draft.getType(obj)
if obj and (t in ["Building", "BuildingPart", "IfcBuilding", "IfcBuildingStorey"]):
if t in ["Building", "IfcBuilding"]:
if t in ["Building", "IfcBuilding"] or getattr(obj, "IfcType", "") == "Building":
building, _ = getTreeViewItem(obj)
subObjs = obj.Group
# find every levels belongs to the building
Expand All @@ -207,8 +207,8 @@ def update(self, retrigger=True):
treeViewItems.append(building)
lvHold.clear()

if t in ["Building Storey", "IfcBuildingStorey"]:
if Draft.getType(getParent(obj)) in ["Building", "IfcBuilding"]:
if t in ["Building Storey", "IfcBuildingStorey"] or getattr(obj, "IfcType", "") == "Building Storey":
if Draft.getType(getParent(obj)) in ["Building", "IfcBuilding"] or getattr(getParent(obj), "IfcType", "") == "Building":
continue
lv, lvH = getTreeViewItem(obj)
subObjs = obj.Group
Expand Down

0 comments on commit 1e96402

Please sign in to comment.