BIM: Add missing IFC attributes for both Pipe and Rebar
As the title says - those two tools missed IFC attributes, since they used different path of initialization than other components, so this patch makes sure we initialize those properties properly.
This commit is contained in:
committed by
Yorik van Havre
parent
88d9be2e10
commit
391a41cbda
@@ -35,6 +35,7 @@ __url__ = "https://www.freecad.org"
|
||||
|
||||
import FreeCAD
|
||||
import ArchComponent
|
||||
import ArchIFC
|
||||
|
||||
from draftutils import params
|
||||
|
||||
@@ -101,7 +102,11 @@ class _ArchPipe(ArchComponent.Component):
|
||||
self.setProperties(obj)
|
||||
|
||||
def onChanged(self, obj, prop):
|
||||
if prop == "ProfileType":
|
||||
if prop == "IfcType":
|
||||
root = ArchIFC.IfcProduct()
|
||||
root.setupIfcAttributes(obj)
|
||||
root.setupIfcComplexAttributes(obj)
|
||||
elif prop == "ProfileType":
|
||||
if obj.ProfileType == "Square":
|
||||
obj.setPropertyStatus("Height", "Hidden")
|
||||
obj.setPropertyStatus("Diameter", "Hidden")
|
||||
|
||||
@@ -38,6 +38,7 @@ __url__ = "https://www.freecad.org"
|
||||
|
||||
import FreeCAD
|
||||
import ArchCommands
|
||||
import ArchIFC
|
||||
import ArchComponent
|
||||
import Draft
|
||||
import DraftVecUtils
|
||||
@@ -210,8 +211,11 @@ class _Rebar(ArchComponent.Component):
|
||||
return [wires,obj.Diameter.Value/2]
|
||||
|
||||
def onChanged(self,obj,prop):
|
||||
|
||||
if prop == "Host":
|
||||
if prop == "IfcType":
|
||||
root = ArchIFC.IfcProduct()
|
||||
root.setupIfcAttributes(obj)
|
||||
root.setupIfcComplexAttributes(obj)
|
||||
elif prop == "Host":
|
||||
if hasattr(obj,"Host"):
|
||||
if obj.Host:
|
||||
# mark host to recompute so it can detect this object
|
||||
|
||||
Reference in New Issue
Block a user