Fix Ifc Spatial Element Default Composition Type should be 'Element'

This commit is contained in:
hoshengwei
2024-10-31 22:49:41 +08:00
committed by Yorik van Havre
parent b9d7cd23a9
commit 25b4e319eb
3 changed files with 7 additions and 0 deletions

View File

@@ -125,6 +125,7 @@ def makeFloor(objectslist=None,baseobj=None,name=None):
obj = makeBuildingPart(objectslist)
obj.Label = name if name else translate("Arch","Level")
obj.IfcType = "Building Storey"
obj.CompositionType = "ELEMENT"
return obj
@@ -136,6 +137,7 @@ def makeBuilding(objectslist=None,baseobj=None,name=None):
obj = makeBuildingPart(objectslist)
obj.Label = name if name else translate("Arch","Building")
obj.IfcType = "Building"
obj.CompositionType = "ELEMENT"
t = QT_TRANSLATE_NOOP("App::Property","The type of this building")
obj.addProperty("App::PropertyEnumeration","BuildingType","Building",t)
obj.BuildingType = ArchBuildingPart.BuildingTypes
@@ -162,8 +164,10 @@ def convertFloors(floor=None):
nobj = makeBuildingPart(obj.Group)
if Draft.getType(obj) == "Floor":
nobj.IfcType = "Building Storey"
nobj.CompositionType = "ELEMENT"
else:
nobj.IfcType = "Building"
nobj.CompositionType = "ELEMENT"
t = QT_TRANSLATE_NOOP("App::Property","The type of this building")
nobj.addProperty("App::PropertyEnumeration","BuildingType","Building",t)
nobj.BuildingType = ArchBuildingPart.BuildingTypes

View File

@@ -503,6 +503,8 @@ class _Site(ArchIFC.IfcProduct):
obj.Proxy = self
self.setProperties(obj)
obj.IfcType = "Site"
obj.CompositionType = "ELEMENT"
def setProperties(self,obj):
"""Gives the object properties unique to sites.

View File

@@ -212,6 +212,7 @@ class _Space(ArchComponent.Component):
ArchComponent.Component.__init__(self,obj)
self.setProperties(obj)
obj.IfcType = "Space"
obj.CompositionType = "ELEMENT"
def setProperties(self,obj):