Proxy class for Gui.ViewProviderDocumentObject
RobRotation.ViewObject.
More...
Public Member Functions | |
def | __init__ (self, vp) |
Initialization method for ViewProviderRobRotationProxy. More... | |
def | attach (self, vp) |
Method called by FreeCAD after initialization to attach Coin3D constructs. More... | |
def | updateData (self, fp, prop) |
Method called after DocumentObjectGroupPython RobRotation was changed. More... | |
def | onChanged (self, vp, prop) |
Method called after RobRotation.ViewObject was changed. More... | |
def | claimChildren (self) |
Method called by FreeCAD to retrieve assigned children. More... | |
def | canDropObject (self, obj) |
Method called by FreeCAD to ask if an object obj can be dropped into a Group. More... | |
def | getIcon (self) |
Method called by FreeCAD to supply an icon for the Tree View. More... | |
def | __getstate__ (self) |
Necessary method to avoid errors when trying to save unserializable objects. More... | |
def | __setstate__ (self, state) |
Necessary method to avoid errors when trying to restore unserializable objects. More... | |
def | setProperties (self, vp) |
Method to hide unused properties. More... | |
def | doubleClicked (self, vp) |
Method called by FreeCAD when RobRotation is double-clicked in the Tree View. More... | |
def | setupContextMenu (self, vp, menu) |
Method called by the FreeCAD to customize a RobRotation context menu. More... | |
def | makeLabels (self) |
Method which makes Coin3D labels to be displayed in the FreeCAD View. More... | |
def | makeFrame (self, frame_labels) |
Method which makes a Coin3D frame to show a current pose in a RobRotation. More... | |
Public Attributes | |
tf_object2world | |
A SoTransform transformation from object to world frame. More... | |
font | |
A SoFontStyle font for axes labels. More... | |
frame | |
A SoSeparator with a coordinate frame made from 3 RGB arrows. More... | |
visualisations | |
A SoSwitch with all visualisations (frame & rotation axis). More... | |
label_texts | |
A list of SoText2 s labels denoting all axes and an origin. More... | |
label_translations | |
A list of SoTranslation s moving labels. More... | |
labels | |
A list of SoSwitch es containing colored translated labels. More... | |
frame_shaft | |
A SoLineSet shaft for frame axes. More... | |
frame_arrowhead_translation | |
A SoTranslation moving frame arrowheads. More... | |
frame_arrowhead_cone | |
A SoCone arrowhead cone for frame axes. More... | |
frame_arrowhead | |
A SoSwitch translated cone for frame axes. More... | |
frame_color_x | |
A SoPackedColor red color for an X axis. More... | |
frame_color_y | |
A SoPackedColor green color for an Y axis. More... | |
frame_color_z | |
A SoPackedColor blue color for an Z axis. More... | |
frame_drawstyle | |
A SoDrawStyle controlling frame axes shaft line width. More... | |
Static Public Attributes | |
panel = None | |
A RobotPanel if one is active or None. More... | |
fp = None | |
A RobRotation object. More... | |
Proxy class for Gui.ViewProviderDocumentObject
RobRotation.ViewObject.
A ViewProviderRobRotationProxy instance provides a RobRotation's icon, double-click response and context menu with a Check joint range option.
To connect this Proxy
object to a Gui.ViewProviderDocumentObject
RobRotation.ViewObject do:
Definition at line 589 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.__init__ | ( | self, | |
vp | |||
) |
Initialization method for ViewProviderRobRotationProxy.
A class instance is created and made a Proxy
for a generic Gui.ViewProviderDocumentObject
RobRotation.ViewObject. During initialization number of properties are specified and preset.
vp | A barebone Gui.ViewProviderDocumentObject RobRotation.ViewObject. |
Definition at line 656 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.__getstate__ | ( | self | ) |
Necessary method to avoid errors when trying to save unserializable objects.
This method is used by JSON to serialize unserializable objects during autosave. Without this an Error would rise when JSON would try to do that itself.
We need this for unserializable fp
attribute, but we don't serialize it, because it's enough to reset it when object is restored.
Definition at line 887 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.__setstate__ | ( | self, | |
state | |||
) |
Necessary method to avoid errors when trying to restore unserializable objects.
This method is used during a document restoration. We need this for unserializable fp
attribute, but we do not restore it, because it's enough to reset it.
Definition at line 897 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.attach | ( | self, | |
vp | |||
) |
Method called by FreeCAD after initialization to attach Coin3D constructs.
A coordinate frame made of RGB arrows corresponding to X, Y and Z axes. This frame shows current pose in a rotation. This method adds RobRotation as the fp
attribute.
vp | A RobRotation.ViewObject after initialization. |
Definition at line 670 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.canDropObject | ( | self, | |
obj | |||
) |
Method called by FreeCAD to ask if an object obj
can be dropped into a Group.
Only FreeCAD objects of a RobRotation and RobTranslation type are allowed to drop inside a RobRotation group.
obj | A FreeCAD object hovering above a RobRotation item in the Tree View. |
Definition at line 856 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.claimChildren | ( | self | ) |
Method called by FreeCAD to retrieve assigned children.
When a property of a RobRotation is touched the RobRotation and the FreeCAD ActiveDocument are notified. The FreeCAD ActiveDocument then emits a signal to inform all its observers e.g. the FreeCADGui ActiveDocument. The FreeCADGui document then emits a new signal to inform e.g. the tree view. The tree view then invokes claimChildren()
.
Definition at line 842 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.doubleClicked | ( | self, | |
vp | |||
) |
Method called by FreeCAD when RobRotation is double-clicked in the Tree View.
If no dialog is opened in the Task View, a new RobotPanel
is opened. If another RobotPanel
is opened, it is closed and all its QDialogs are added to a new RobotPanel
. If a RobotPanel
is already opened, the Model tab on the Combo View is swapped for the Tasks tab so that the panel becomes visible. If another dialog is opened a warning is shown.
vp | A Gui.ViewProviderDocumentObject RobRotation.ViewObject. |
Definition at line 927 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.getIcon | ( | self | ) |
Method called by FreeCAD to supply an icon for the Tree View.
A full path to an icon is supplied for the FreeCADGui.
Definition at line 871 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.makeFrame | ( | self, | |
frame_labels | |||
) |
Method which makes a Coin3D frame to show a current pose in a RobRotation.
A frame is made from 3 red, green and blue arrows representing X, Y and Z. Arrows are each constructed from a shaft and an arrowhead. Their dimensions and other attributes are unassigned as they are extracted from appropriate RobRotation
properties.
Definition at line 1060 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.makeLabels | ( | self | ) |
Method which makes Coin3D labels to be displayed in the FreeCAD View.
Frame labels for axes X, Y and Z are made. The labels have the same color as the axes.
Definition at line 1022 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.onChanged | ( | self, | |
vp, | |||
prop | |||
) |
Method called after RobRotation.ViewObject was changed.
If visibility changed, an appropriate Coin3D construct hides the frame showing current pose.
vp | A RobRotation.ViewObject. |
prop | A str name of a changed property. |
Definition at line 826 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.setProperties | ( | self, | |
vp | |||
) |
Method to hide unused properties.
Property Display Mode is set to be invisible as they are unused.
vp | A Gui.ViewProviderDocumentObject RobRotation.ViewObject. |
Definition at line 908 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.setupContextMenu | ( | self, | |
vp, | |||
menu | |||
) |
Method called by the FreeCAD to customize a RobRotation context menu.
The Transform and Set colors... items are removed from the context menu shown upon right click on DocumentObjectGroupPython
RobRotation in the Tree View. The option to Check joint range is added instead.
vp | A rightclicked Gui.ViewProviderDocumentObject RobRotation.ViewObject. |
menu | A Qt's QMenu to be edited. |
Definition at line 1007 of file RobRotation.py.
def RobRotation.ViewProviderRobRotationProxy.updateData | ( | self, | |
fp, | |||
prop | |||
) |
Method called after DocumentObjectGroupPython
RobRotation was changed.
This method is used to update Coin3D constructs, if associated properties changed e.g. if the FrameArrowheadRadius
changes, all Coin3D cones representing frame arrowheads will change their radius accordingly.
fp | A DocumentObjectGroupPython RobRotation object. |
prop | A str name of the changed property. |
Definition at line 703 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.font |
A SoFontStyle font for axes labels.
Definition at line 675 of file RobRotation.py.
|
static |
A RobRotation object.
Definition at line 643 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.frame |
A SoSeparator with a coordinate frame made from 3 RGB arrows.
Definition at line 680 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.frame_arrowhead |
A SoSwitch translated cone for frame axes.
Definition at line 1074 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.frame_arrowhead_cone |
A SoCone arrowhead cone for frame axes.
Definition at line 1073 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.frame_arrowhead_translation |
A SoTranslation moving frame arrowheads.
Definition at line 1072 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.frame_color_x |
A SoPackedColor red color for an X axis.
Definition at line 1088 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.frame_color_y |
A SoPackedColor green color for an Y axis.
Definition at line 1089 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.frame_color_z |
A SoPackedColor blue color for an Z axis.
Definition at line 1090 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.frame_drawstyle |
A SoDrawStyle controlling frame axes shaft line width.
Definition at line 1112 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.frame_shaft |
A SoLineSet shaft for frame axes.
Definition at line 1065 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.label_texts |
A list of SoText2
s labels denoting all axes and an origin.
Definition at line 1025 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.label_translations |
A list of SoTranslation
s moving labels.
Definition at line 1026 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.labels |
A list of SoSwitch
es containing colored translated labels.
Definition at line 1031 of file RobRotation.py.
|
static |
A RobotPanel if one is active or None.
Definition at line 642 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.tf_object2world |
A SoTransform transformation from object to world frame.
Definition at line 672 of file RobRotation.py.
RobRotation.ViewProviderRobRotationProxy.visualisations |
A SoSwitch with all visualisations (frame & rotation axis).
Definition at line 683 of file RobRotation.py.