BIM: NativeIFC 2D support - section planes

This commit is contained in:
Yorik van Havre
2024-09-30 14:58:11 +02:00
committed by Yorik van Havre
parent c0d452f6c5
commit 14585a760e
9 changed files with 240 additions and 48 deletions

View File

@@ -213,11 +213,15 @@ class Shape2DView(DraftObject):
import DraftGeomUtils
pl = obj.Placement
if obj.Base:
if utils.get_type(obj.Base) in ["BuildingPart","SectionPlane"]:
if utils.get_type(obj.Base) in ["BuildingPart","SectionPlane","IfcAnnotation"]:
objs = []
if utils.get_type(obj.Base) == "SectionPlane":
objs = self.excludeNames(obj,obj.Base.Objects)
cutplane = obj.Base.Shape
elif utils.get_type(obj.Base) == "IfcAnnotation":
# this is a NativeIFC section plane
objs, cutplane = obj.Base.Proxy.get_section_data(obj.Base)
objs = self.excludeNames(obj, objs)
else:
objs = self.excludeNames(obj,obj.Base.Group)
cutplane = Part.makePlane(1000, 1000, App.Vector(-500, -500, 0))