Arch: Extended role property to all Arch objects - fixes #1577
This commit is contained in:
parent
4f5f9be38c
commit
e08788eca9
|
@ -26,9 +26,10 @@ __author__ = "Yorik van Havre"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
# Possible roles for IFC objects
|
# Possible roles for IFC objects
|
||||||
Roles = ['Undefined','Beam','Chimney','Column','Covering','Curtain Wall','Door','Foundation',
|
Roles = ['Undefined','Beam','Beam Standard Case','Chimney','Column','Column Standard Case','Covering','Curtain Wall',
|
||||||
'Member','Plate','Railing','Ramp','Ramp Flight','Rebar','Pile','Roof','Shading Device','Slab',
|
'Door','Door Standard Case','Foundation','Furniture','Hydro Equipment','Electric Equipment',
|
||||||
'Stair','Stair Flight','Tendon','Wall','Wall Layer','Window']
|
'Member','Plate','Railing','Ramp','Ramp Flight','Rebar','Pile','Roof','Shading Device','Slab','Space'
|
||||||
|
'Stair','Stair Flight','Tendon','Wall','Wall Standard Case','Wall Layer','Window','Window Standard Case']
|
||||||
|
|
||||||
import FreeCAD,Draft
|
import FreeCAD,Draft
|
||||||
from FreeCAD import Vector
|
from FreeCAD import Vector
|
||||||
|
@ -294,6 +295,7 @@ class Component:
|
||||||
obj.addProperty("App::PropertyString","Tag","Arch","An optional tag for this component")
|
obj.addProperty("App::PropertyString","Tag","Arch","An optional tag for this component")
|
||||||
obj.addProperty("App::PropertyMap","IfcAttributes","Arch","Custom IFC properties and attributes")
|
obj.addProperty("App::PropertyMap","IfcAttributes","Arch","Custom IFC properties and attributes")
|
||||||
obj.addProperty("App::PropertyMap","Material","Arch","A material for this object")
|
obj.addProperty("App::PropertyMap","Material","Arch","A material for this object")
|
||||||
|
obj.addProperty("App::PropertyEnumeration","Role","Arch",translate("Arch","The role of this object"))
|
||||||
obj.Proxy = self
|
obj.Proxy = self
|
||||||
self.Type = "Component"
|
self.Type = "Component"
|
||||||
self.Subvolume = None
|
self.Subvolume = None
|
||||||
|
|
|
@ -237,7 +237,6 @@ class _Equipment(ArchComponent.Component):
|
||||||
obj.addProperty("Part::PropertyPartShape","SideView","Arch",translate("Arch","an optional 2D shape representing a side view of this equipment"))
|
obj.addProperty("Part::PropertyPartShape","SideView","Arch",translate("Arch","an optional 2D shape representing a side view of this equipment"))
|
||||||
obj.addProperty("App::PropertyString","Model","Arch",translate("Arch","The model description of this equipment"))
|
obj.addProperty("App::PropertyString","Model","Arch",translate("Arch","The model description of this equipment"))
|
||||||
obj.addProperty("App::PropertyString","Url","Arch",translate("Arch","The url of the product page of this equipment"))
|
obj.addProperty("App::PropertyString","Url","Arch",translate("Arch","The url of the product page of this equipment"))
|
||||||
obj.addProperty("App::PropertyEnumeration","Role","Arch",translate("Arch","The role of this equipment"))
|
|
||||||
self.Type = "Equipment"
|
self.Type = "Equipment"
|
||||||
obj.Role = Roles
|
obj.Role = Roles
|
||||||
obj.Proxy = self
|
obj.Proxy = self
|
||||||
|
|
|
@ -84,7 +84,6 @@ class _Frame(ArchComponent.Component):
|
||||||
obj.addProperty("App::PropertyBool","Align","Arch","Specifies if the profile must be aligned with the extrusion wires")
|
obj.addProperty("App::PropertyBool","Align","Arch","Specifies if the profile must be aligned with the extrusion wires")
|
||||||
obj.addProperty("App::PropertyVector","Offset","Arch","An offset vector between the base sketch and the frame")
|
obj.addProperty("App::PropertyVector","Offset","Arch","An offset vector between the base sketch and the frame")
|
||||||
obj.addProperty("App::PropertyAngle","Rotation","Arch","The rotation of the profile around its extrusion axis")
|
obj.addProperty("App::PropertyAngle","Rotation","Arch","The rotation of the profile around its extrusion axis")
|
||||||
obj.addProperty("App::PropertyEnumeration","Role","Arch","The role of this wall")
|
|
||||||
self.Type = "Frame"
|
self.Type = "Frame"
|
||||||
obj.Role = Roles
|
obj.Role = Roles
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,8 @@ __title__="FreeCAD Arch Space"
|
||||||
__author__ = "Yorik van Havre"
|
__author__ = "Yorik van Havre"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
|
Roles = ["Space"]
|
||||||
|
|
||||||
import FreeCAD,ArchComponent,ArchCommands,math,Draft
|
import FreeCAD,ArchComponent,ArchCommands,math,Draft
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
import FreeCADGui
|
import FreeCADGui
|
||||||
|
@ -115,6 +117,7 @@ class _Space(ArchComponent.Component):
|
||||||
obj.addProperty("App::PropertyString", "FinishCeiling","Arch",translate("Arch","The finishing of the ceiling of this space"))
|
obj.addProperty("App::PropertyString", "FinishCeiling","Arch",translate("Arch","The finishing of the ceiling of this space"))
|
||||||
obj.addProperty("App::PropertyLinkList", "Group", "Arch",translate("Arch","Objects that are included inside this space, such as furniture"))
|
obj.addProperty("App::PropertyLinkList", "Group", "Arch",translate("Arch","Objects that are included inside this space, such as furniture"))
|
||||||
self.Type = "Space"
|
self.Type = "Space"
|
||||||
|
obj.Role = Roles
|
||||||
|
|
||||||
def execute(self,obj):
|
def execute(self,obj):
|
||||||
self.getShape(obj)
|
self.getShape(obj)
|
||||||
|
|
|
@ -556,9 +556,8 @@ class _Structure(ArchComponent.Component):
|
||||||
obj.addProperty("App::PropertyLength","Height","Arch",translate("Arch","The height or extrusion depth of this element. Keep 0 for automatic"))
|
obj.addProperty("App::PropertyLength","Height","Arch",translate("Arch","The height or extrusion depth of this element. Keep 0 for automatic"))
|
||||||
obj.addProperty("App::PropertyLinkList","Armatures","Arch",translate("Arch","Armatures contained in this element"))
|
obj.addProperty("App::PropertyLinkList","Armatures","Arch",translate("Arch","Armatures contained in this element"))
|
||||||
obj.addProperty("App::PropertyVector","Normal","Arch",translate("Arch","The normal extrusion direction of this object (keep (0,0,0) for automatic normal)"))
|
obj.addProperty("App::PropertyVector","Normal","Arch",translate("Arch","The normal extrusion direction of this object (keep (0,0,0) for automatic normal)"))
|
||||||
obj.addProperty("App::PropertyEnumeration","Role","Arch",translate("Arch","The role of this structural element"))
|
|
||||||
obj.addProperty("App::PropertyVectorList","Nodes","Arch",translate("Arch","The structural nodes of this element"))
|
obj.addProperty("App::PropertyVectorList","Nodes","Arch",translate("Arch","The structural nodes of this element"))
|
||||||
obj.addProperty("App::PropertyString","Profile","Arch","A description of the standard profile this element is based upon")
|
obj.addProperty("App::PropertyString","Profile","Arch",translate("Arch","A description of the standard profile this element is based upon"))
|
||||||
self.Type = "Structure"
|
self.Type = "Structure"
|
||||||
obj.Role = Roles
|
obj.Role = Roles
|
||||||
|
|
||||||
|
|
|
@ -395,7 +395,6 @@ class _Wall(ArchComponent.Component):
|
||||||
obj.addProperty("App::PropertyVector","Normal","Arch",translate("Arch","The normal extrusion direction of this object (keep (0,0,0) for automatic normal)"))
|
obj.addProperty("App::PropertyVector","Normal","Arch",translate("Arch","The normal extrusion direction of this object (keep (0,0,0) for automatic normal)"))
|
||||||
obj.addProperty("App::PropertyInteger","Face","Arch",translate("Arch","The face number of the base object used to build this wall"))
|
obj.addProperty("App::PropertyInteger","Face","Arch",translate("Arch","The face number of the base object used to build this wall"))
|
||||||
obj.addProperty("App::PropertyLength","Offset","Arch",translate("Arch","The offset between this wall and its baseline (only for left and right alignments)"))
|
obj.addProperty("App::PropertyLength","Offset","Arch",translate("Arch","The offset between this wall and its baseline (only for left and right alignments)"))
|
||||||
obj.addProperty("App::PropertyEnumeration","Role","Arch",translate("Arch","The role of this wall"))
|
|
||||||
obj.Align = ['Left','Right','Center']
|
obj.Align = ['Left','Right','Center']
|
||||||
obj.Role = Roles
|
obj.Role = Roles
|
||||||
self.Type = "Wall"
|
self.Type = "Wall"
|
||||||
|
|
|
@ -608,7 +608,6 @@ class _Window(ArchComponent.Component):
|
||||||
obj.addProperty("App::PropertyLength","Height","Arch",translate("Arch","The height of this window (for preset windows only)"))
|
obj.addProperty("App::PropertyLength","Height","Arch",translate("Arch","The height of this window (for preset windows only)"))
|
||||||
obj.addProperty("App::PropertyVector","Normal","Arch",translate("Arch","The normal direction of this window"))
|
obj.addProperty("App::PropertyVector","Normal","Arch",translate("Arch","The normal direction of this window"))
|
||||||
obj.addProperty("App::PropertyInteger","Preset","Arch","")
|
obj.addProperty("App::PropertyInteger","Preset","Arch","")
|
||||||
obj.addProperty("App::PropertyEnumeration","Role","Arch",translate("Arch","The role of this window"))
|
|
||||||
obj.setEditorMode("Preset",2)
|
obj.setEditorMode("Preset",2)
|
||||||
|
|
||||||
self.Type = "Window"
|
self.Type = "Window"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user