diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index 5f78756f7..aedea78a7 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -26,9 +26,10 @@ __author__ = "Yorik van Havre" __url__ = "http://www.freecadweb.org" # Possible roles for IFC objects -Roles = ['Undefined','Beam','Chimney','Column','Covering','Curtain Wall','Door','Foundation', - 'Member','Plate','Railing','Ramp','Ramp Flight','Rebar','Pile','Roof','Shading Device','Slab', - 'Stair','Stair Flight','Tendon','Wall','Wall Layer','Window'] +Roles = ['Undefined','Beam','Beam Standard Case','Chimney','Column','Column Standard Case','Covering','Curtain Wall', + 'Door','Door Standard Case','Foundation','Furniture','Hydro Equipment','Electric Equipment', + '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 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::PropertyMap","IfcAttributes","Arch","Custom IFC properties and attributes") 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 self.Type = "Component" self.Subvolume = None diff --git a/src/Mod/Arch/ArchEquipment.py b/src/Mod/Arch/ArchEquipment.py index 5ecd4687f..ac4409905 100644 --- a/src/Mod/Arch/ArchEquipment.py +++ b/src/Mod/Arch/ArchEquipment.py @@ -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("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::PropertyEnumeration","Role","Arch",translate("Arch","The role of this equipment")) self.Type = "Equipment" obj.Role = Roles obj.Proxy = self diff --git a/src/Mod/Arch/ArchFrame.py b/src/Mod/Arch/ArchFrame.py index b7fe5e108..0aec461cd 100644 --- a/src/Mod/Arch/ArchFrame.py +++ b/src/Mod/Arch/ArchFrame.py @@ -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::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::PropertyEnumeration","Role","Arch","The role of this wall") self.Type = "Frame" obj.Role = Roles diff --git a/src/Mod/Arch/ArchSpace.py b/src/Mod/Arch/ArchSpace.py index 791a56a48..b90ba7874 100644 --- a/src/Mod/Arch/ArchSpace.py +++ b/src/Mod/Arch/ArchSpace.py @@ -27,6 +27,8 @@ __title__="FreeCAD Arch Space" __author__ = "Yorik van Havre" __url__ = "http://www.freecadweb.org" +Roles = ["Space"] + import FreeCAD,ArchComponent,ArchCommands,math,Draft if FreeCAD.GuiUp: 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::PropertyLinkList", "Group", "Arch",translate("Arch","Objects that are included inside this space, such as furniture")) self.Type = "Space" + obj.Role = Roles def execute(self,obj): self.getShape(obj) diff --git a/src/Mod/Arch/ArchStructure.py b/src/Mod/Arch/ArchStructure.py index 21c78c47d..c41a409ee 100644 --- a/src/Mod/Arch/ArchStructure.py +++ b/src/Mod/Arch/ArchStructure.py @@ -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::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::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::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" obj.Role = Roles diff --git a/src/Mod/Arch/ArchWall.py b/src/Mod/Arch/ArchWall.py index e3fe0aac3..4ed09ca0f 100644 --- a/src/Mod/Arch/ArchWall.py +++ b/src/Mod/Arch/ArchWall.py @@ -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::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::PropertyEnumeration","Role","Arch",translate("Arch","The role of this wall")) obj.Align = ['Left','Right','Center'] obj.Role = Roles self.Type = "Wall" diff --git a/src/Mod/Arch/ArchWindow.py b/src/Mod/Arch/ArchWindow.py index b22b1d1ef..5ff63301b 100644 --- a/src/Mod/Arch/ArchWindow.py +++ b/src/Mod/Arch/ArchWindow.py @@ -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::PropertyVector","Normal","Arch",translate("Arch","The normal direction of this window")) obj.addProperty("App::PropertyInteger","Preset","Arch","") - obj.addProperty("App::PropertyEnumeration","Role","Arch",translate("Arch","The role of this window")) obj.setEditorMode("Preset",2) self.Type = "Window"