RobTranslation.ViewProviderRobTranslationProxy Class Reference

Proxy class for Gui.ViewProviderDocumentObject RobTranslation.ViewObject. More...

Public Member Functions

def __init__ (self, vp)
 Initialization method for ViewProviderRobTranslationProxy. 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 RobTranslation was changed. More...
 
def onChanged (self, vp, prop)
 Method called after RobTranslation.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 when RobTranslation is double-clicked in the Tree View. More...
 
def setupContextMenu (self, vp, menu)
 Method called by the FreeCAD to customize a RobTranslation 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 RobTranslation. 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 SoText2s labels denoting all axes and an origin. More...
 
 label_translations
 A list of SoTranslations moving labels. More...
 
 labels
 A list of SoSwitches 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 RobTranslation object. More...
 

Detailed Description

Proxy class for Gui.ViewProviderDocumentObject RobTranslation.ViewObject.

A ViewProviderRobTranslationProxy instance provides a RobTranslation's icon, double-click response and context menu with a Check joint range option.

To connect this Proxy object to a Gui.ViewProviderDocumentObject RobTranslation.ViewObject do:

a = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroupPython",
"RobTranslation")
ViewProviderRobTranslationProxy(a.ViewObject)

Definition at line 579 of file RobTranslation.py.

Constructor & Destructor Documentation

◆ __init__()

def RobTranslation.ViewProviderRobTranslationProxy.__init__ (   self,
  vp 
)

Initialization method for ViewProviderRobTranslationProxy.

A class instance is created and made a Proxy for a generic Gui.ViewProviderDocumentObject RobTranslation.ViewObject. During initialization number of properties are specified and preset.

Parameters
vpA barebone Gui.ViewProviderDocumentObject RobTranslation.ViewObject.

Definition at line 646 of file RobTranslation.py.

646  def __init__(self, vp):
647  self.setProperties(vp)
648  vp.Proxy = self
649 

Member Function Documentation

◆ __getstate__()

def RobTranslation.ViewProviderRobTranslationProxy.__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.

Returns
None, because we don't serialize anything.

Definition at line 877 of file RobTranslation.py.

877  def __getstate__(self):
878  return None
879 

◆ __setstate__()

def RobTranslation.ViewProviderRobTranslationProxy.__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 887 of file RobTranslation.py.

887  def __setstate__(self, state):
888  pass
889 

◆ attach()

def RobTranslation.ViewProviderRobTranslationProxy.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 translation. This method adds RobTranslation as the fp attribute.

Parameters
vpA RobTranslation.ViewObject after initialization.

Definition at line 660 of file RobTranslation.py.

660  def attach(self, vp):
661  # prepare transformation to keep pose corresponding to placement
662  self.tf_object2world = coin.SoTransform()
663 
664  labels = self.makeLabels()
665  self.font = coin.SoFontStyle()
666 
667  frame = self.makeFrame(labels[:3])
668  frame.insertChild(self.tf_object2world, 0)
669  frame.insertChild(self.font, 1)
670  self.frame = coin.SoSwitch()
671  self.frame.addChild(frame)
672 
673  self.visualisations = coin.SoSwitch()
674  self.visualisations.addChild(self.frame)
675  self.visualisations.whichChild.setValue(coin.SO_SWITCH_ALL)
676  vp.RootNode.addChild(self.visualisations)
677 
678  vp.Object.Proxy.setProperties(vp.Object)
679  self.setProperties(vp)
680  self.fp = vp.Object
681 

◆ canDropObject()

def RobTranslation.ViewProviderRobTranslationProxy.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 RobTranslation group.

Parameters
objAn object hovering above a RobTranslation item in the Tree View.

Definition at line 846 of file RobTranslation.py.

846  def canDropObject(self, obj):
847  if hasattr(obj, "Proxy") and \
848  (obj.Proxy.__class__.__name__ == "RobRotationProxy" or
849  obj.Proxy.__class__.__name__ == "RobTranslationProxy"):
850  return True
851  return False
852 

◆ claimChildren()

def RobTranslation.ViewProviderRobTranslationProxy.claimChildren (   self)

Method called by FreeCAD to retrieve assigned children.

When a property of a RobTranslation is touched the RobTranslation 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 832 of file RobTranslation.py.

832  def claimChildren(self):
833  if hasattr(self, "fp") and self.fp:
834  return self.fp.Group
835  return []
836 

◆ doubleClicked()

def RobTranslation.ViewProviderRobTranslationProxy.doubleClicked (   self,
  vp 
)

Method called when RobTranslation 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.

Parameters
vpA Gui.ViewProviderDocumentObject RobTranslation.ViewObject.
Returns
True confirmation that this method was implemented.

Definition at line 917 of file RobTranslation.py.

917  def doubleClicked(self, vp):
918  # Switch to the Task View if a RobotPanel is already opened
919  if self.panel:
920  FreeCADGui.Control.showTaskView()
921 
922  # Try to open new RobotPanel
923  else:
924  # Load the QDialog from a file and name it after this object
925  new_form = [FreeCADGui.PySideUic.loadUi(path.join(PATH_TO_UI,
926  "AnimationJoint.ui"))]
927  new_form[0].setWindowTitle(vp.Object.Label)
928 
929  # Create a control panel and try to show it
930  self.panel = RobotPanel([vp.Object], new_form)
931  try:
932  FreeCADGui.Control.showDialog(self.panel)
933  except RuntimeError as e:
934  # Reset the panel
935  self.panel = None
936 
937  # Find all RobRotation/RobTranslation feature python objects
938  # with a reference to a RobotPanel
939  robot_joints = []
940  for obj in FreeCAD.ActiveDocument.Objects:
941  if hasattr(obj, "Proxy") and \
942  (obj.Proxy.__class__.__name__
943  == "RobRotationProxy"
944  or obj.Proxy.__class__.__name__
945  == "RobTranslationProxy"):
946  if obj.ViewObject.Proxy.panel is not None:
947  robot_joints.append(obj)
948 
949  if len(robot_joints) > 0:
950  # Close opened Trajecotry panel
951  robot_joints[0].ViewObject.Proxy.panel.reject()
952 
953  # Load the QDialog form for each RobRotation/RobTranslation
954  # which had a reference to the panel
955  forms = []
956  for joint in robot_joints:
957  form = FreeCADGui.PySideUic.loadUi(
958  path.join(PATH_TO_UI, "AnimationJoint.ui"))
959  form.setWindowTitle(joint.Label)
960  forms.append(form)
961 
962  # Load one more QDialog for this RobTranslation
963  forms.append(new_form[0])
964 
965  # Add this RobTranslation to the list of robot_joints
966  robot_joints.append(vp.Object)
967 
968  # Add a reference to the new panel to view providers
969  # of all robot_joints
970  self.panel = RobotPanel(robot_joints, forms)
971  for joint in robot_joints:
972  joint.ViewObject.Proxy.panel = self.panel
973  FreeCADGui.Control.showDialog(self.panel)
974  return True
975 
976  # Diffeerent Task panel is opened, inform the user
977  else:
978  QMessageBox.warning(
979  None,
980  'Error while opening RobotPanel',
981  "A different panel is already active.\n"
982  + "Close it before opening this one.")
983  FreeCADGui.Control.showTaskView()
984  return True
985 
RobotPanel class for the Animate Workbench.
Definition: RobotPanel.py:1

◆ getIcon()

def RobTranslation.ViewProviderRobTranslationProxy.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.

Returns
A str path to an icon.

Definition at line 861 of file RobTranslation.py.

861  def getIcon(self):
862  return path.join(PATH_TO_ICONS, "RobTranslation.png")
863 

◆ makeFrame()

def RobTranslation.ViewProviderRobTranslationProxy.makeFrame (   self,
  frame_labels 
)

Method which makes a Coin3D frame to show a current pose in a RobTranslation.

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 RobTranslation properties.

Returns
A SoSeparator with the frame shown in the FreeCAD View.

Definition at line 1050 of file RobTranslation.py.

1050  def makeFrame(self, frame_labels):
1051  # make a generic shaft from 0 in Y direction
1052  shaft_vertices = coin.SoVertexProperty()
1053  shaft_vertices.vertex.setNum(2)
1054  shaft_vertices.vertex.set1Value(0, 0, 0, 0)
1055  self.frame_shaft = coin.SoLineSet()
1056  self.frame_shaft.vertexProperty.setValue(shaft_vertices)
1057  self.frame_shaft.numVertices.setNum(1)
1058  self.frame_shaft.numVertices.setValue(2)
1059 
1060  # make a generic conic arrowhead oriented in Y axis direction and
1061  # move it at the end of the shaft
1062  self.frame_arrowhead_translation = coin.SoTranslation()
1063  self.frame_arrowhead_cone = coin.SoCone()
1064  self.frame_arrowhead = coin.SoSwitch()
1065  self.frame_arrowhead.addChild(self.frame_arrowhead_translation)
1066  self.frame_arrowhead.addChild(self.frame_arrowhead_cone)
1067 
1068  # make rotations to rotate prepared shaft and arrowhead for Y axis
1069  # direction also to X and Z
1070  rot_y2x = coin.SoRotation()
1071  rot_y2x.rotation.setValue(coin.SbRotation(coin.SbVec3f(0, 1, 0),
1072  coin.SbVec3f(1, 0, 0)))
1073  rot_y2z = coin.SoRotation()
1074  rot_y2z.rotation.setValue(coin.SbRotation(coin.SbVec3f(0, 1, 0),
1075  coin.SbVec3f(0, 0, 1)))
1076 
1077  # prepare colors for X,Y,Z which will correspond to R,G,B as customary
1078  self.frame_color_x = coin.SoPackedColor()
1079  self.frame_color_y = coin.SoPackedColor()
1080  self.frame_color_z = coin.SoPackedColor()
1081 
1082  # make complete colored and rotated arrows
1083  x_arrow = coin.SoSeparator()
1084  x_arrow.addChild(rot_y2x)
1085  x_arrow.addChild(self.frame_color_x)
1086  x_arrow.addChild(self.frame_shaft)
1087  x_arrow.addChild(self.frame_arrowhead)
1088  x_arrow.addChild(frame_labels[0])
1089  y_arrow = coin.SoSeparator()
1090  y_arrow.addChild(self.frame_color_y)
1091  y_arrow.addChild(self.frame_shaft)
1092  y_arrow.addChild(self.frame_arrowhead)
1093  y_arrow.addChild(frame_labels[1])
1094  z_arrow = coin.SoSeparator()
1095  z_arrow.addChild(rot_y2z)
1096  z_arrow.addChild(self.frame_color_z)
1097  z_arrow.addChild(self.frame_shaft)
1098  z_arrow.addChild(self.frame_arrowhead)
1099  z_arrow.addChild(frame_labels[2])
1100 
1101  # prepare draw style to control shaft width
1102  self.frame_drawstyle = coin.SoDrawStyle()
1103 
1104  # make complete frame and it to shaded display mode
1105  separated_frame = coin.SoSeparator()
1106  separated_frame.addChild(self.frame_drawstyle)
1107  separated_frame.addChild(x_arrow)
1108  separated_frame.addChild(y_arrow)
1109  separated_frame.addChild(z_arrow)
1110 
1111  return separated_frame
1112 
1113 

◆ makeLabels()

def RobTranslation.ViewProviderRobTranslationProxy.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.

Returns
A SoSwitch with colored text label to be shown in the FreeCAD View.

Definition at line 1012 of file RobTranslation.py.

1012  def makeLabels(self):
1013  label_strings = ["X", "Y", "Z"]
1014  colors = [0xFF0000FF, 0x00FF00FF, 0x0000FFFF]
1015  self.label_texts = []
1016  self.label_translations = []
1017  # frame translation
1018  self.label_translations.append(coin.SoTranslation())
1019  # axis translation
1020  self.label_translations.append(coin.SoTranslation())
1021  self.labels = []
1022  for i in range(3):
1023  label_group = coin.SoSeparator()
1024  label_group.addChild(self.label_translations[0])
1025  frame_axis_color = coin.SoPackedColor()
1026  frame_axis_color.orderedRGBA.setValue(colors[i])
1027  label_group.addChild(frame_axis_color)
1028  self.label_texts.append(coin.SoText2())
1029  self.label_texts[i].string.setValues(
1030  0, 3, ["", label_strings[i], ""])
1031  self.label_texts[i].justification.setValue(
1032  self.label_texts[i].CENTER)
1033  self.label_texts[i].spacing.setValue(0.45)
1034  label_group.addChild(self.label_texts[i])
1035  self.labels.append(coin.SoSwitch())
1036  self.labels[i].addChild(label_group)
1037  return self.labels
1038 

◆ onChanged()

def RobTranslation.ViewProviderRobTranslationProxy.onChanged (   self,
  vp,
  prop 
)

Method called after RobTranslation.ViewObject was changed.

If visibility changed, an appropriate Coin3D construct hides the frame showing current pose.

Parameters
vpA RobTranslation.ViewObject.
propA str name of a changed property.

Definition at line 816 of file RobTranslation.py.

816  def onChanged(self, vp, prop):
817  if prop == "Visibility":
818  if vp.Visibility:
819  self.visualisations.whichChild.setValue(coin.SO_SWITCH_ALL)
820  else:
821  self.visualisations.whichChild.setValue(coin.SO_SWITCH_NONE)
822 

◆ setProperties()

def RobTranslation.ViewProviderRobTranslationProxy.setProperties (   self,
  vp 
)

Method to hide unused properties.

Property Display Mode is set to be invisible as they are unused.

Parameters
vpA Gui.ViewProviderDocumentObject RobTranslation.ViewObject.

Definition at line 898 of file RobTranslation.py.

898  def setProperties(self, vp):
899  # hide unnecessary view properties
900  vp.setEditorMode("DisplayMode", 2)
901 

◆ setupContextMenu()

def RobTranslation.ViewProviderRobTranslationProxy.setupContextMenu (   self,
  vp,
  menu 
)

Method called by the FreeCAD to customize a RobTranslation context menu.

The Transform and Set colors... items are removed from the context menu shown upon right click on DocumentObjectGroupPython RobTranslation in the Tree View. The option to Check joint range is added instead.

Parameters
vpA right-clicked RobTranslation.ViewObject.
menuA Qt's QMenu to be edited.

Definition at line 997 of file RobTranslation.py.

997  def setupContextMenu(self, vp, menu):
998  menu.clear()
999  action = menu.addAction("Check joint range")
1000  action.triggered.connect(lambda f=self.doubleClicked,
1001  arg=vp: f(arg))
1002 

◆ updateData()

def RobTranslation.ViewProviderRobTranslationProxy.updateData (   self,
  fp,
  prop 
)

Method called after DocumentObjectGroupPython RobTranslation 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.

Parameters
fpA DocumentObjectGroupPython RobTranslation object.
propA str name of a changed property.

Definition at line 693 of file RobTranslation.py.

693  def updateData(self, fp, prop):
694  # Placement changes
695  if prop == "Placement" and hasattr(fp, "Placement"):
696  trans = fp.Placement.Base
697  rot = fp.Placement.Rotation
698  self.tf_object2world.translation.setValue((trans.x, trans.y,
699  trans.z))
700  self.tf_object2world.rotation.setValue(rot.Q)
701 
702  # Frame changes
703  elif prop == "ShowFrame" and hasattr(fp, "ShowFrame"):
704  if fp.ShowFrame:
705  self.frame.whichChild.setValue(coin.SO_SWITCH_ALL)
706  else:
707  self.frame.whichChild.setValue(coin.SO_SWITCH_NONE)
708 
709  elif prop == "FrameTransparency" and hasattr(fp, "FrameTransparency"):
710  self.frame_color_x.orderedRGBA.\
711  setValue(0xff0000ff - (0xff*fp.FrameTransparency)//100)
712  self.frame_color_y.orderedRGBA.\
713  setValue(0x00ff00ff - (0xff*fp.FrameTransparency)//100)
714  self.frame_color_z.orderedRGBA.\
715  setValue(0x0000ffff - (0xff*fp.FrameTransparency)//100)
716 
717  elif prop == "ShaftLength" and hasattr(fp, "ShaftLength"):
718  self.frame_shaft.vertexProperty.getValue().vertex.\
719  set1Value(1, 0, fp.ShaftLength, 0)
720  if hasattr(fp, "FrameArrowheadLength"):
721  self.frame_arrowhead_translation.translation.setValue(
722  0, fp.ShaftLength + fp.FrameArrowheadLength/2, 0)
723  if not fp.ShowFrameArrowheads and hasattr(fp, "DistanceToAxis"):
724  self.label_translations[0].translation.setValue(
725  0, fp.ShaftLength + fp.DistanceToAxis, 0)
726 
727  elif prop == "FrameArrowheadLength" and \
728  hasattr(fp, "FrameArrowheadLength"):
729  self.frame_arrowhead_cone.height.setValue(fp.FrameArrowheadLength)
730  if hasattr(fp, "ShaftLength"):
731  self.frame_arrowhead_translation.translation.setValue(
732  0, fp.ShaftLength + fp.FrameArrowheadLength/2, 0)
733  if fp.ShowFrameArrowheads and hasattr(fp, "DistanceToAxis"):
734  self.label_translations[0].translation.setValue(
735  0, fp.FrameArrowheadLength/2 + fp.DistanceToAxis, 0)
736 
737  elif prop == "ShaftWidth" and hasattr(fp, "ShaftWidth"):
738  self.frame_drawstyle.lineWidth.setValue(fp.ShaftWidth)
739 
740  elif prop == "FrameArrowheadRadius" and \
741  hasattr(fp, "FrameArrowheadRadius"):
742  self.frame_arrowhead_cone.bottomRadius.setValue(
743  fp.FrameArrowheadRadius)
744 
745  elif prop == "ShowFrameArrowheads" and \
746  hasattr(fp, "ShowFrameArrowheads"):
747  if fp.ShowFrameArrowheads:
748  self.frame_arrowhead.whichChild.setValue(coin.SO_SWITCH_ALL)
749  if hasattr(fp, "FrameArrowheadLength") and \
750  hasattr(fp, "DistanceToAxis"):
751  self.label_translations[0].translation.setValue(
752  0, fp.FrameArrowheadLength/2 + fp.DistanceToAxis, 0)
753  else:
754  self.frame_arrowhead.whichChild.setValue(coin.SO_SWITCH_NONE)
755  if hasattr(fp, "ShaftLength") and \
756  hasattr(fp, "DistanceToAxis"):
757  self.label_translations[0].translation.setValue(
758  0, fp.ShaftLength + fp.DistanceToAxis, 0)
759 
760  elif prop == "ShowFrameLabels" and hasattr(fp, "ShowFrameLabels"):
761  for label in self.labels[:3]:
762  if fp.ShowFrameLabels:
763  label.whichChild.setValue(coin.SO_SWITCH_ALL)
764  else:
765  label.whichChild.setValue(coin.SO_SWITCH_NONE)
766 
767  # Changes to the labels
768  elif prop == "Subscription" and hasattr(fp, "Subscription"):
769  for l in self.label_texts:
770  l.string.setValues(2, 1, [fp.Subscription])
771 
772  elif prop == "Superscription" and hasattr(fp, "Superscription"):
773  for l in self.label_texts:
774  l.string.setValues(0, 1, [fp.Superscription])
775 
776  elif prop == "FontFamily" and hasattr(fp, "FontFamily"):
777  if fp.FontFamily == "SERIF":
778  self.font.family.setValue(self.font.SERIF)
779  if fp.FontFamily == "SANS":
780  self.font.family.setValue(self.font.SANS)
781  if fp.FontFamily == "TYPEWRITER":
782  self.font.family.setValue(self.font.TYPEWRITER)
783 
784  elif prop == "FontStyle" and hasattr(fp, "FontStyle"):
785  if fp.FontStyle == "NONE":
786  self.font.style.setValue(self.font.NONE)
787  if fp.FontStyle == "BOLD":
788  self.font.style.setValue(self.font.BOLD)
789  if fp.FontStyle == "ITALIC":
790  self.font.style.setValue(self.font.ITALIC)
791  if fp.FontStyle == "BOLD ITALIC":
792  self.font.style.setValue(self.font.BOLD | self.font.ITALIC)
793 
794  elif prop == "FontSize" and hasattr(fp, "FontSize"):
795  self.font.size.setValue(fp.FontSize)
796 
797  elif prop == "DistanceToAxis" and hasattr(fp, "DistanceToAxis") and \
798  hasattr(fp, "ShowFrameArrowheads"):
799  if fp.ShowFrameArrowheads and hasattr(fp, "FrameArrowheadLength"):
800  self.label_translations[0].translation.setValue(
801  0, fp.FrameArrowheadLength/2 + fp.DistanceToAxis, 0)
802  elif hasattr(fp, "ShaftLength"):
803  self.label_translations[0].translation.setValue(
804  0, fp.ShaftLength + fp.DistanceToAxis, 0)
805 

Member Data Documentation

◆ font

RobTranslation.ViewProviderRobTranslationProxy.font

A SoFontStyle font for axes labels.

Definition at line 665 of file RobTranslation.py.

◆ fp

RobTranslation.ViewProviderRobTranslationProxy.fp = None
static

A RobTranslation object.

Definition at line 633 of file RobTranslation.py.

◆ frame

RobTranslation.ViewProviderRobTranslationProxy.frame

A SoSeparator with a coordinate frame made from 3 RGB arrows.

Definition at line 670 of file RobTranslation.py.

◆ frame_arrowhead

RobTranslation.ViewProviderRobTranslationProxy.frame_arrowhead

A SoSwitch translated cone for frame axes.

Definition at line 1064 of file RobTranslation.py.

◆ frame_arrowhead_cone

RobTranslation.ViewProviderRobTranslationProxy.frame_arrowhead_cone

A SoCone arrowhead cone for frame axes.

Definition at line 1063 of file RobTranslation.py.

◆ frame_arrowhead_translation

RobTranslation.ViewProviderRobTranslationProxy.frame_arrowhead_translation

A SoTranslation moving frame arrowheads.

Definition at line 1062 of file RobTranslation.py.

◆ frame_color_x

RobTranslation.ViewProviderRobTranslationProxy.frame_color_x

A SoPackedColor red color for an X axis.

Definition at line 1078 of file RobTranslation.py.

◆ frame_color_y

RobTranslation.ViewProviderRobTranslationProxy.frame_color_y

A SoPackedColor green color for an Y axis.

Definition at line 1079 of file RobTranslation.py.

◆ frame_color_z

RobTranslation.ViewProviderRobTranslationProxy.frame_color_z

A SoPackedColor blue color for an Z axis.

Definition at line 1080 of file RobTranslation.py.

◆ frame_drawstyle

RobTranslation.ViewProviderRobTranslationProxy.frame_drawstyle

A SoDrawStyle controlling frame axes shaft line width.

Definition at line 1102 of file RobTranslation.py.

◆ frame_shaft

RobTranslation.ViewProviderRobTranslationProxy.frame_shaft

A SoLineSet shaft for frame axes.

Definition at line 1055 of file RobTranslation.py.

◆ label_texts

RobTranslation.ViewProviderRobTranslationProxy.label_texts

A list of SoText2s labels denoting all axes and an origin.

Definition at line 1015 of file RobTranslation.py.

◆ label_translations

RobTranslation.ViewProviderRobTranslationProxy.label_translations

A list of SoTranslations moving labels.

Definition at line 1016 of file RobTranslation.py.

◆ labels

RobTranslation.ViewProviderRobTranslationProxy.labels

A list of SoSwitches containing colored translated labels.

Definition at line 1021 of file RobTranslation.py.

◆ panel

RobTranslation.ViewProviderRobTranslationProxy.panel = None
static

A RobotPanel if one is active or None.

Definition at line 632 of file RobTranslation.py.

◆ tf_object2world

RobTranslation.ViewProviderRobTranslationProxy.tf_object2world

A SoTransform transformation from object to world frame.

Definition at line 662 of file RobTranslation.py.

◆ visualisations

RobTranslation.ViewProviderRobTranslationProxy.visualisations

A SoSwitch with all visualisations (frame & rotation axis).

Definition at line 673 of file RobTranslation.py.


The documentation for this class was generated from the following file: