From 65730a492fd3e7ac80de1656736bb9f16ae506a9 Mon Sep 17 00:00:00 2001 From: David Daish Date: Sun, 19 Apr 2020 18:39:39 +1200 Subject: [PATCH] Work towards adding references to the objects passed in python class methods. --- src/Mod/Arch/ArchComponent.py | 89 ++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 2 deletions(-) diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index a3969dd41d..b904b5978e 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -234,7 +234,13 @@ class Component(ArchIFC.IfcProduct): self.Type = "Component" def onDocumentRestored(self, obj): - """Method run when the document is restored. Re-add the Arch component properties.""" + """Method run when the document is restored. Re-add the Arch component properties. + + Parameters + ---------- + obj: + The component object. + """ Component.setProperties(self, obj) def execute(self,obj): @@ -244,6 +250,11 @@ class Component(ArchIFC.IfcProduct): Process subshapes of the object to add additions, and subtract subtractions from the object's shape. + + Parameters + ---------- + obj: + The component object. """ if self.clone(obj): @@ -274,6 +285,8 @@ class Component(ArchIFC.IfcProduct): Parameters ---------- + obj: + The component object. prop: string The name of the property that has changed. """ @@ -291,6 +304,8 @@ class Component(ArchIFC.IfcProduct): Parameters ---------- + obj: + The component object. prop: string The name of the property that has changed. """ @@ -333,6 +348,11 @@ class Component(ArchIFC.IfcProduct): "Hosts" properties. Objects are set to move with their host via the MoveWithHost property. + Parameters + ---------- + obj: + The component object. + Returns ------- list of @@ -362,6 +382,11 @@ class Component(ArchIFC.IfcProduct): Recursively crawl hosts until a Floor or BuildingPart is found, then return the value of its Height property. + Paramters + --------- + obj: + The component object. + Returns ------- @@ -392,6 +417,11 @@ class Component(ArchIFC.IfcProduct): of the same type, or if the object has the type "Component" or "BuildingPart". + Parameters + ---------- + obj: + The component object. + Returns ------- bool @@ -416,6 +446,11 @@ class Component(ArchIFC.IfcProduct): Look to base object, and find other objects that are based off this base object. If these objects are the same type, return them. + Parameters + ---------- + obj: + The component object. + Returns ------- list of @@ -452,6 +487,11 @@ class Component(ArchIFC.IfcProduct): this data as a tuple containing lists. The lists will contain the same data as above, from each of the objects within the multifuse. + Parameters + ---------- + obj: + The component object. + Returns ------- tuple @@ -615,6 +655,8 @@ class Component(ArchIFC.IfcProduct): Parameters ---------- + obj: + The component object. prop: string The name of the property that has changed. """ @@ -649,6 +691,8 @@ class Component(ArchIFC.IfcProduct): Parameters ---------- + obj: + The component object. base: , optional The base shape to add Additions and Subtractions to. placement: , optional @@ -772,6 +816,8 @@ class Component(ArchIFC.IfcProduct): Parameters ---------- + obj: + The component object. shape: The shape to copy. placement: @@ -839,6 +885,8 @@ class Component(ArchIFC.IfcProduct): Parameters ---------- + obj: + The component object. shape: The shape to check and apply to the object. placement: @@ -907,6 +955,11 @@ class Component(ArchIFC.IfcProduct): Assign these values to the object's "VerticalArea", "HorizontalArea", and "PerimeterLength" properties. + + Parameters + ---------- + obj: + The component object. """ @@ -989,6 +1042,11 @@ class Component(ArchIFC.IfcProduct): All objects whose IfcType is suffixed with the string " Sandard Case" are automatically a standard case. + Parameters + ---------- + obj: + The component object. + Returns ------- bool @@ -1158,6 +1216,8 @@ class ViewProviderComponent: Parameters ---------- + vobj: + The component's view provider object. prop: string The name of the property that has changed. """ @@ -1200,6 +1260,11 @@ class ViewProviderComponent: of the display mode node. Add the HiRes display mode. + + Parameters + ---------- + vobj: + The component's view provider object. """ from pivy import coin @@ -1217,6 +1282,11 @@ class ViewProviderComponent: Define mode HiRes, which displays the component as a mesh, intended as a more visually appealing version of the component. + Parameters + ---------- + vobj: + The component's view provider object. + Returns ------- list of str @@ -1241,6 +1311,8 @@ class ViewProviderComponent: Parameters ---------- + vobj: + The component's view provider object. mode: str The name of the display mode the view provider has switched to. @@ -1304,6 +1376,11 @@ class ViewProviderComponent: Set the host object's Base object as a child, and set any additions or subtractions as children. + Parameters + ---------- + vobj: + The component's view provider object. + Returns ------- list of s: @@ -1351,6 +1428,8 @@ class ViewProviderComponent: Parameters ---------- + vobj: + The component's view provider object. mode: int or str The edit mode the document has requested. Set to 0 when requested via a double click or [Edit -> Toggle Edit Mode]. @@ -1391,6 +1470,8 @@ class ViewProviderComponent: Parameters ---------- + vobj: + The component's view provider object. menu: The context menu already assembled prior to this method being called. @@ -1590,7 +1671,6 @@ class ComponentTaskPanel: """The default TaskPanel for all Arch components. TODO: outline the purpose of this taskpanel. - """ def __init__(self): @@ -1715,6 +1795,11 @@ class ComponentTaskPanel: def getIcon(self,obj): """Get the path to the icons, of the items that fill the tree widget. + + Paramters + --------- + obj: + The object being edited. """ if hasattr(obj.ViewObject,"Proxy"):