Proxy class for a FeaturePython
Collision instance.
More...
Public Member Functions | |
def | __init__ (self, fp, shape=None, cause1=None, cause2=None) |
Initialization method for CollisionProxy. More... | |
def | onDocumentRestored (self, fp) |
Method called when document is restored to make sure everything is as it was. More... | |
def | setProperties (self, fp, cause1=None, cause2=None) |
Method to set properties during initialization or document restoration. More... | |
Proxy class for a FeaturePython
Collision instance.
To connect this Proxy
object to a DocumentObjectGroupPython
CollisionDetector do:
a = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "Collision") CollisionProxy(a, shape, cause1, cause2)
Definition at line 55 of file CollisionObject.py.
def CollisionObject.CollisionProxy.__init__ | ( | self, | |
fp, | |||
shape = None , |
|||
cause1 = None , |
|||
cause2 = None |
|||
) |
Initialization method for CollisionProxy.
A class instance is created and made a Proxy
for a generic FeaturePython
Collision object. During initialization number of properties are specified and preset. An object shape is supplied and the object is labeled so its known which objects caused this collision
.
fp | A barebone FeaturePython Server object to be extended. |
shape | A Solid object defining the shape of an intersection. |
cause1 | An FreeCAD object observed intersecting with the cause2 . |
cause2 | An FreeCAD object observed intersecting with the cause1 . |
Definition at line 71 of file CollisionObject.py.
def CollisionObject.CollisionProxy.onDocumentRestored | ( | self, | |
fp | |||
) |
Method called when document is restored to make sure everything is as it was.
Reinitialization it creates properties and sets them to default values, if they were not restored automatically. Properties of connected ViewObject
are also recreated and reset if necessary.
fp | A restored FeaturePython CollisionObject object. |
Definition at line 89 of file CollisionObject.py.
def CollisionObject.CollisionProxy.setProperties | ( | self, | |
fp, | |||
cause1 = None , |
|||
cause2 = None |
|||
) |
Method to set properties during initialization or document restoration.
The properties are set if they are not already present. Later they are set read only, because an user is not allowed to edit any instance of the CollisionObject.
fp | A restored or barebone FeaturePython CollisionObject object. |
Definition at line 104 of file CollisionObject.py.