Work towards adding references to the objects passed in python class methods.

This commit is contained in:
David Daish
2020-04-19 18:39:39 +12:00
committed by Yorik van Havre
parent e46ca0b967
commit 65730a492f

View File

@@ -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: <App::FeaturePython>
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: <App::FeaturePython>
The component object.
"""
if self.clone(obj):
@@ -274,6 +285,8 @@ class Component(ArchIFC.IfcProduct):
Parameters
----------
obj: <App::FeaturePython>
The component object.
prop: string
The name of the property that has changed.
"""
@@ -291,6 +304,8 @@ class Component(ArchIFC.IfcProduct):
Parameters
----------
obj: <App::FeaturePython>
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: <App::FeaturePython>
The component object.
Returns
-------
list of <App::FeaturePython>
@@ -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: <App::FeaturePython>
The component object.
Returns
-------
<App::PropertyLength>
@@ -392,6 +417,11 @@ class Component(ArchIFC.IfcProduct):
of the same type, or if the object has the type "Component" or
"BuildingPart".
Parameters
----------
obj: <App::FeaturePython>
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: <App::FeaturePython>
The component object.
Returns
-------
list of <App::FeaturePython>
@@ -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: <App::FeaturePython>
The component object.
Returns
-------
tuple
@@ -615,6 +655,8 @@ class Component(ArchIFC.IfcProduct):
Parameters
----------
obj: <App::FeaturePython>
The component object.
prop: string
The name of the property that has changed.
"""
@@ -649,6 +691,8 @@ class Component(ArchIFC.IfcProduct):
Parameters
----------
obj: <App::FeaturePython>
The component object.
base: <Part.Shape>, optional
The base shape to add Additions and Subtractions to.
placement: <Base.Placement>, optional
@@ -772,6 +816,8 @@ class Component(ArchIFC.IfcProduct):
Parameters
----------
obj: <App::FeaturePython>
The component object.
shape: <Part.Shape>
The shape to copy.
placement:
@@ -839,6 +885,8 @@ class Component(ArchIFC.IfcProduct):
Parameters
----------
obj: <App::FeaturePython>
The component object.
shape: <Part.Shape>
The shape to check and apply to the object.
placement: <Base.Placement>
@@ -907,6 +955,11 @@ class Component(ArchIFC.IfcProduct):
Assign these values to the object's "VerticalArea", "HorizontalArea",
and "PerimeterLength" properties.
Parameters
----------
obj: <App::FeaturePython>
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: <App::FeaturePython>
The component object.
Returns
-------
bool
@@ -1158,6 +1216,8 @@ class ViewProviderComponent:
Parameters
----------
vobj: <Gui.ViewProviderDocumentObject>
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: <Gui.ViewProviderDocumentObject>
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: <Gui.ViewProviderDocumentObject>
The component's view provider object.
Returns
-------
list of str
@@ -1241,6 +1311,8 @@ class ViewProviderComponent:
Parameters
----------
vobj: <Gui.ViewProviderDocumentObject>
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: <Gui.ViewProviderDocumentObject>
The component's view provider object.
Returns
-------
list of <App::DocumentObject>s:
@@ -1351,6 +1428,8 @@ class ViewProviderComponent:
Parameters
----------
vobj: <Gui.ViewProviderDocumentObject>
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: <Gui.ViewProviderDocumentObject>
The component's view provider object.
menu: <PySide2.QtWidgets.QMenu>
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: <App::DocumentObject>
The object being edited.
"""
if hasattr(obj.ViewObject,"Proxy"):