39 from RobotPanel
import RobotPanel
41 from PySide2.QtWidgets
import QMessageBox
42 from bisect
import bisect
47 PATH_TO_ICONS = path.join(FreeCAD.getHomePath(),
"Mod",
"Animate",
"Resources",
51 PATH_TO_UI = path.join(FreeCAD.getHomePath(),
"Mod",
"Animate",
"Resources",
115 elif prop ==
"dMinimum" and hasattr(fp,
"dMaximum"):
117 fp.dMaximum = (fp.dMaximum, fp.dMinimum, float(
"inf"), 1)
118 elif prop ==
"dMaximum" and hasattr(fp,
"dMinimum"):
120 fp.dMinimum = (fp.dMinimum, -float(
"inf"), fp.dMaximum, 1)
124 hasattr(fp,
"dMaximum")
and \
125 hasattr(fp,
"dMinimum")
and \
128 if trans_valid != fp.ValidTranslation:
129 fp.ValidTranslation = trans_valid
131 elif prop ==
"Placement":
133 if hasattr(fp,
"Group")
and len(fp.Group) != 0:
134 for child
in fp.Group:
135 child.ParentFramePlacement = fp.Placement
140 if hasattr(fp,
"AnimatedObjects")
and len(fp.AnimatedObjects) != 0:
141 for o
in fp.AnimatedObjects:
142 o.Placement = fp.Placement
145 elif prop ==
"ParentFramePlacement":
147 fp.Placement = fp.ParentFramePlacement.multiply(
163 if not fp.RobotPanelActive:
165 if not fp.ValidTranslation:
166 FreeCAD.Console.PrintWarning(fp.Name +
167 ".execute(): Translation " +
168 "is not in a valid format.\n")
174 fp.d = fp.dOffset + (weights[0]*fp.dSequence[indices[0]]
175 + weights[1]*fp.dSequence[indices[1]])
178 T_theta = FreeCAD.Placement(FreeCAD.Vector(0, 0, 0),
179 FreeCAD.Rotation(FreeCAD.Vector(0, 0, 1),
181 T_d = FreeCAD.Placement(FreeCAD.Vector(0, 0, fp.d),
182 FreeCAD.Rotation(FreeCAD.Vector(0, 0, 1), 0))
183 T_a = FreeCAD.Placement(FreeCAD.Vector(fp.a, 0, 0),
184 FreeCAD.Rotation(FreeCAD.Vector(1, 0, 0), 0))
185 T_alpha = FreeCAD.Placement(FreeCAD.Vector(0, 0, 0),
186 FreeCAD.Rotation(FreeCAD.Vector(1, 0, 0),
189 fp.ObjectPlacement = T_theta.multiply(T_d.multiply(
190 T_a.multiply(T_alpha)))
193 fp.Placement = fp.ParentFramePlacement.multiply(fp.ObjectPlacement)
206 fp.ViewObject.Proxy.setProperties(fp.ViewObject)
222 if not hasattr(fp,
"ValidTranslation"):
223 fp.addProperty(
"App::PropertyBool",
"ValidTranslation",
"General",
224 "This property records if rotation was changed." 225 ).ValidTranslation =
False 226 if not hasattr(fp,
"RobotPanelActive"):
227 fp.addProperty(
"App::PropertyBool",
"RobotPanelActive",
"General",
228 "This property records if robot panel is active." 229 ).RobotPanelActive =
False 230 if not hasattr(fp,
"AnimatedObjects"):
231 fp.addProperty(
"App::PropertyLinkListGlobal",
"AnimatedObjects",
232 "General",
"Objects that will be animated.")
233 if not hasattr(fp,
"Interpolate"):
234 fp.addProperty(
"App::PropertyBool",
"Interpolate",
"General",
235 "Interpolate RobTranslation between timestamps." 237 if not hasattr(fp,
"AllowServer"):
238 fp.addProperty(
"App::PropertyBool",
"AllowServer",
"General",
239 "Should this object allow a Server object to " 240 +
"change it.").AllowServer =
True 241 if not hasattr(fp,
"AllowControl"):
242 fp.addProperty(
"App::PropertyBool",
"AllowControl",
"General",
243 "Should this object allow a Control object " 245 ).AllowControl =
True 246 if not hasattr(fp,
"Time"):
247 fp.addProperty(
"App::PropertyFloat",
"Time",
"General",
248 "Animation time in seconds.").Time = 0
249 if not hasattr(fp,
"ParentFramePlacement"):
250 fp.addProperty(
"App::PropertyPlacement",
"ParentFramePlacement",
251 "General",
"Current placement of a Parent Frame.")
252 if not hasattr(fp,
"ObjectPlacement"):
253 fp.addProperty(
"App::PropertyPlacement",
"ObjectPlacement",
255 "Current Object placement in a Parent Frame.")
258 if not hasattr(fp,
"d"):
259 fp.addProperty(
"App::PropertyFloat",
"d",
"d-hParameters",
260 "Displacement along Z axis.").d = 0
261 if not hasattr(fp,
"dMaximum"):
262 fp.addProperty(
"App::PropertyFloatConstraint",
"dMaximum",
263 "d-hParameters",
"Upper limit of displacement" 265 ).dMaximum = (1000, 0, float(
"inf"), 1)
266 elif hasattr(fp,
"dMinimum"):
267 fp.dMaximum = (fp.dMaximum, fp.dMinimum, float(
"inf"), 1)
268 if not hasattr(fp,
"dMinimum"):
269 fp.addProperty(
"App::PropertyFloatConstraint",
"dMinimum",
270 "d-hParameters",
"Lower limit of displacement" 272 ).dMinimum = (0, -float(
"inf"), 1000, 1)
273 elif hasattr(fp,
"dMaximum"):
274 fp.dMinimum = (fp.dMinimum, -float(
"inf"), fp.dMaximum, 1)
275 if not hasattr(fp,
"dOffset"):
276 fp.addProperty(
"App::PropertyFloat",
"dOffset",
277 "d-hParameters",
"Offset of displacement" 278 +
" along Z axis.").dOffset = 0
279 if not hasattr(fp,
"a"):
280 fp.addProperty(
"App::PropertyFloat",
"a",
"d-hParameters",
281 "Displacement along X axis.").a = 0
282 if not hasattr(fp,
"alpha"):
283 fp.addProperty(
"App::PropertyFloat",
"alpha",
"d-hParameters",
284 "Rotation angle about X axis in degrees.").alpha = 0
285 if not hasattr(fp,
"theta"):
286 fp.addProperty(
"App::PropertyFloat",
"theta",
"d-hParameters",
287 "Rotation angle about X axis in degrees.").theta = 0
290 if not hasattr(fp,
"ShowFrame"):
291 fp.addProperty(
"App::PropertyBool",
"ShowFrame",
"Frame",
292 "Show a frame for current pose." 294 if not hasattr(fp,
"FrameTransparency"):
295 fp.addProperty(
"App::PropertyPercent",
"FrameTransparency",
296 "Frame",
"Transparency of the frame in percents." 297 ).FrameTransparency = 0
298 if not hasattr(fp,
"ShowFrameArrowheads"):
299 fp.addProperty(
"App::PropertyBool",
"ShowFrameArrowheads",
"Frame",
300 "Show arrowheads for frame axis arrow's." 301 ).ShowFrameArrowheads =
True 302 if not hasattr(fp,
"FrameArrowheadLength"):
303 fp.addProperty(
"App::PropertyFloatConstraint",
304 "FrameArrowheadLength",
"Frame",
305 "Frame axis arrow's arrowhead length.\n" 306 +
"Range is < 1.0 | 1e6 >." 307 ).FrameArrowheadLength = (10, 1.0, 1e6, 1)
309 fp.FrameArrowheadLength = (fp.FrameArrowheadLength, 1.0, 1e6, 1)
310 if not hasattr(fp,
"FrameArrowheadRadius"):
311 fp.addProperty(
"App::PropertyFloatConstraint",
312 "FrameArrowheadRadius",
"Frame",
313 "Frame axis arrow's arrowhead bottom radius.\n" 314 +
"Range is < 0.5 | 1e6 >." 315 ).FrameArrowheadRadius = (5, 0.5, 1e6, 0.5)
317 fp.FrameArrowheadRadius = (fp.FrameArrowheadRadius, 0.5, 1e6, 0.5)
318 if not hasattr(fp,
"ShaftLength"):
319 fp.addProperty(
"App::PropertyFloatConstraint",
"ShaftLength",
320 "Frame",
"Frame axis arrow's shaft length.\n" 321 +
"Range is < 1.0 | 1e6 >." 322 ).ShaftLength = (20, 1.0, 1e6, 1)
324 fp.ShaftLength = (fp.ShaftLength, 1.0, 1e6, 1)
325 if not hasattr(fp,
"ShaftWidth"):
326 fp.addProperty(
"App::PropertyFloatConstraint",
"ShaftWidth",
327 "Frame",
"Frame axis arrow's shaft width.\n" 328 +
"Range is < 1.0 | 64 >." 329 ).ShaftWidth = (4, 1.0, 64, 1)
331 fp.ShaftWidth = (fp.ShaftWidth, 1.0, 64, 1)
332 if not hasattr(fp,
"ShowFrameLabels"):
333 fp.addProperty(
"App::PropertyBool",
"ShowFrameLabels",
334 "Frame",
"Show label for frame axes." 335 ).ShowFrameLabels =
True 338 if not hasattr(fp,
"FontSize"):
339 fp.addProperty(
"App::PropertyIntegerConstraint",
"FontSize",
340 "Labels",
"Label font size.\n" 341 +
"Range is < 1 | 100 >." 342 ).FontSize = (10, 1, 100, 1)
344 fp.FontSize = (fp.FontSize, 1, 100, 1)
345 if not hasattr(fp,
"DistanceToAxis"):
346 fp.addProperty(
"App::PropertyFloatConstraint",
"DistanceToAxis",
347 "Labels",
"Distance from label to its axis.\n" 348 +
"Range is < 0.5 | 1e6 >." 349 ).DistanceToAxis = (5, 0.5, 1e6, 0.5)
351 fp.DistanceToAxis = (fp.DistanceToAxis, 0.5, 1e6, 0.5)
352 if not hasattr(fp,
"Subscription"):
353 fp.addProperty(
"App::PropertyString",
"Subscription",
"Labels",
354 "Subscription added to an axis name." 356 if not hasattr(fp,
"Superscription"):
357 fp.addProperty(
"App::PropertyString",
"Superscription",
"Labels",
358 "Superscription added to an axis name." 359 ).Superscription =
"" 360 if not hasattr(fp,
"FontFamily"):
361 fp.addProperty(
"App::PropertyEnumeration",
"FontFamily",
362 "Labels",
"Label font family." 363 ).FontFamily = [
"SERIF",
"SANS",
"TYPEWRITER"]
364 if not hasattr(fp,
"FontStyle"):
365 fp.addProperty(
"App::PropertyEnumeration",
"FontStyle",
366 "Labels",
"Label font style." 367 ).FontStyle = [
"NONE",
"BOLD",
"ITALIC",
371 if not hasattr(fp,
"Placement"):
372 fp.addProperty(
"App::PropertyPlacement",
"Placement",
"Base",
373 "Current placement for animated objects in " 377 if not hasattr(fp,
"Timestamps"):
378 fp.addProperty(
"App::PropertyFloatList",
"Timestamps",
379 "Translation",
"Timestamps at which we define\n" 381 if not hasattr(fp,
"dSequence"):
382 fp.addProperty(
"App::PropertyFloatList",
"dSequence",
383 "Translation",
"Displacements along Z axis.")
389 fp.setEditorMode(
"ObjectPlacement", 1)
390 fp.setEditorMode(
"ParentFramePlacement", 1)
391 fp.setEditorMode(
"d", 1)
394 fp.setEditorMode(
"Placement", 2)
395 fp.setEditorMode(
"ValidTranslation", 2)
396 fp.setEditorMode(
"RobotPanelActive", 2)
398 import AnimateDocumentObserver
414 self.
fp.Timestamps = joint_sequence[
"Timestamps"]
415 self.
fp.dSequence = joint_sequence[
"dSequence"]
417 FreeCAD.Console.PrintError(
"Invalid joint sequence!")
431 return prop
in [
"Timestamps",
"dSequence"]
452 if translation
is not None and isinstance(translation, dict):
453 for key
in [
"Timestamps",
"dSequence"]:
454 if key
not in translation.keys():
455 FreeCAD.Console.PrintWarning(
"Translation misses key " +
458 timestamps = translation[
"Timestamps"]
459 ds = translation[
"dSequence"]
462 if len(timestamps) == 0
or \
463 (len(timestamps) != 0
and len(timestamps) != len(ds)):
464 FreeCAD.Console.PrintWarning(
"Translation has lists with " 465 +
"inconsistent or zero " 470 if any([timestamps[i] >= timestamps[i+1]
471 for i
in range(len(timestamps)-1)]):
472 FreeCAD.Console.PrintWarning(
"Translation 'Timestamps' is not " 473 +
"list of increasing values.\n")
476 if not all([self.
fp.dMinimum <= d <= self.
fp.dMaximum
for d
in ds]):
477 FreeCAD.Console.PrintWarning(
"Translation 'dSequence' elements" 478 +
" are out of d range.\n")
506 if fp.Time <= fp.Timestamps[0]:
511 elif fp.Time >= fp.Timestamps[-1]:
518 indices = [bisect(fp.Timestamps, fp.Time)]
520 indices.insert(0, indices[0]-1)
521 weights = [fp.Timestamps[indices[1]] - fp.Time,
522 fp.Time - fp.Timestamps[indices[0]]]
523 if not fp.Interpolate:
524 if weights[0] > weights[1]:
529 weights = [weights[0]/sum(weights), weights[1]/sum(weights)]
531 return indices, weights
669 frame.insertChild(self.
font, 1)
671 self.
frame.addChild(frame)
678 vp.Object.Proxy.setProperties(vp.Object)
695 if prop ==
"Placement" and hasattr(fp,
"Placement"):
696 trans = fp.Placement.Base
697 rot = fp.Placement.Rotation
703 elif prop ==
"ShowFrame" and hasattr(fp,
"ShowFrame"):
705 self.
frame.whichChild.setValue(coin.SO_SWITCH_ALL)
707 self.
frame.whichChild.setValue(coin.SO_SWITCH_NONE)
709 elif prop ==
"FrameTransparency" and hasattr(fp,
"FrameTransparency"):
711 setValue(0xff0000ff - (0xff*fp.FrameTransparency)//100)
713 setValue(0x00ff00ff - (0xff*fp.FrameTransparency)//100)
715 setValue(0x0000ffff - (0xff*fp.FrameTransparency)//100)
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"):
722 0, fp.ShaftLength + fp.FrameArrowheadLength/2, 0)
723 if not fp.ShowFrameArrowheads
and hasattr(fp,
"DistanceToAxis"):
725 0, fp.ShaftLength + fp.DistanceToAxis, 0)
727 elif prop ==
"FrameArrowheadLength" and \
728 hasattr(fp,
"FrameArrowheadLength"):
730 if hasattr(fp,
"ShaftLength"):
732 0, fp.ShaftLength + fp.FrameArrowheadLength/2, 0)
733 if fp.ShowFrameArrowheads
and hasattr(fp,
"DistanceToAxis"):
735 0, fp.FrameArrowheadLength/2 + fp.DistanceToAxis, 0)
737 elif prop ==
"ShaftWidth" and hasattr(fp,
"ShaftWidth"):
740 elif prop ==
"FrameArrowheadRadius" and \
741 hasattr(fp,
"FrameArrowheadRadius"):
743 fp.FrameArrowheadRadius)
745 elif prop ==
"ShowFrameArrowheads" and \
746 hasattr(fp,
"ShowFrameArrowheads"):
747 if fp.ShowFrameArrowheads:
749 if hasattr(fp,
"FrameArrowheadLength")
and \
750 hasattr(fp,
"DistanceToAxis"):
752 0, fp.FrameArrowheadLength/2 + fp.DistanceToAxis, 0)
755 if hasattr(fp,
"ShaftLength")
and \
756 hasattr(fp,
"DistanceToAxis"):
758 0, fp.ShaftLength + fp.DistanceToAxis, 0)
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)
765 label.whichChild.setValue(coin.SO_SWITCH_NONE)
768 elif prop ==
"Subscription" and hasattr(fp,
"Subscription"):
770 l.string.setValues(2, 1, [fp.Subscription])
772 elif prop ==
"Superscription" and hasattr(fp,
"Superscription"):
774 l.string.setValues(0, 1, [fp.Superscription])
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)
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)
794 elif prop ==
"FontSize" and hasattr(fp,
"FontSize"):
795 self.
font.size.setValue(fp.FontSize)
797 elif prop ==
"DistanceToAxis" and hasattr(fp,
"DistanceToAxis")
and \
798 hasattr(fp,
"ShowFrameArrowheads"):
799 if fp.ShowFrameArrowheads
and hasattr(fp,
"FrameArrowheadLength"):
801 0, fp.FrameArrowheadLength/2 + fp.DistanceToAxis, 0)
802 elif hasattr(fp,
"ShaftLength"):
804 0, fp.ShaftLength + fp.DistanceToAxis, 0)
817 if prop ==
"Visibility":
833 if hasattr(self,
"fp")
and self.
fp:
847 if hasattr(obj,
"Proxy")
and \
848 (obj.Proxy.__class__.__name__ ==
"RobRotationProxy" or 849 obj.Proxy.__class__.__name__ ==
"RobTranslationProxy"):
862 return path.join(PATH_TO_ICONS,
"RobTranslation.png")
900 vp.setEditorMode(
"DisplayMode", 2)
920 FreeCADGui.Control.showTaskView()
925 new_form = [FreeCADGui.PySideUic.loadUi(path.join(PATH_TO_UI,
926 "AnimationJoint.ui"))]
927 new_form[0].setWindowTitle(vp.Object.Label)
932 FreeCADGui.Control.showDialog(self.
panel)
933 except RuntimeError
as e:
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)
949 if len(robot_joints) > 0:
951 robot_joints[0].ViewObject.Proxy.panel.reject()
956 for joint
in robot_joints:
957 form = FreeCADGui.PySideUic.loadUi(
958 path.join(PATH_TO_UI,
"AnimationJoint.ui"))
959 form.setWindowTitle(joint.Label)
963 forms.append(new_form[0])
966 robot_joints.append(vp.Object)
971 for joint
in robot_joints:
972 joint.ViewObject.Proxy.panel = self.
panel 973 FreeCADGui.Control.showDialog(self.
panel)
980 'Error while opening RobotPanel',
981 "A different panel is already active.\n" 982 +
"Close it before opening this one.")
983 FreeCADGui.Control.showTaskView()
999 action = menu.addAction(
"Check joint range")
1013 label_strings = [
"X",
"Y",
"Z"]
1014 colors = [0xFF0000FF, 0x00FF00FF, 0x0000FFFF]
1023 label_group = coin.SoSeparator()
1025 frame_axis_color = coin.SoPackedColor()
1026 frame_axis_color.orderedRGBA.setValue(colors[i])
1027 label_group.addChild(frame_axis_color)
1030 0, 3, [
"", label_strings[i],
""])
1035 self.
labels.append(coin.SoSwitch())
1036 self.
labels[i].addChild(label_group)
1052 shaft_vertices = coin.SoVertexProperty()
1053 shaft_vertices.vertex.setNum(2)
1054 shaft_vertices.vertex.set1Value(0, 0, 0, 0)
1056 self.
frame_shaft.vertexProperty.setValue(shaft_vertices)
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)))
1083 x_arrow = coin.SoSeparator()
1084 x_arrow.addChild(rot_y2x)
1088 x_arrow.addChild(frame_labels[0])
1089 y_arrow = coin.SoSeparator()
1093 y_arrow.addChild(frame_labels[1])
1094 z_arrow = coin.SoSeparator()
1095 z_arrow.addChild(rot_y2z)
1099 z_arrow.addChild(frame_labels[2])
1105 separated_frame = coin.SoSeparator()
1107 separated_frame.addChild(x_arrow)
1108 separated_frame.addChild(y_arrow)
1109 separated_frame.addChild(z_arrow)
1111 return separated_frame
1132 return {
'Pixmap': path.join(PATH_TO_ICONS,
"RobTranslationCmd.png"),
1133 'MenuText':
"RobTranslation",
1134 'ToolTip':
"Create RobTranslation instance."}
1145 doc = FreeCAD.ActiveDocument
1146 a = doc.addObject(
"App::DocumentObjectGroupPython",
"RobTranslation")
1164 if FreeCAD.ActiveDocument
is None:
frame_drawstyle
A SoDrawStyle controlling frame axes shaft line width.
def __getstate__(self)
Necessary method to avoid errors when trying to save unserializable objects.
Class specifying Animate workbench's RobTranslation button/command.
tf_object2world
A SoTransform transformation from object to world frame.
def updateData(self, fp, prop)
Method called after DocumentObjectGroupPython RobTranslation was changed.
def Activated(self)
Method used as a callback when the toolbar button or the menu item is clicked.
frame_shaft
A SoLineSet shaft for frame axes.
fp
A DocumentObjectGroupPython associated with the proxy.
font
A SoFontStyle font for axes labels.
def onDocumentRestored(self, fp)
Method called when document is restored to make sure everything is as it was.
def addObserver()
Adds an AnimateDocumentObserver between FreeCAD's document observers safely.
def IsActive(self)
Method to specify when the toolbar button and the menu item are enabled.
frame_color_y
A SoPackedColor green color for an Y axis.
def __init__(self, fp)
Initialization method for RobTranslationProxy.
def onChanged(self, vp, prop)
Method called after RobTranslation.ViewObject was changed.
def GetResources(self)
Method used by FreeCAD to retrieve resources to use for this command.
def claimChildren(self)
Method called by FreeCAD to retrieve assigned children.
def makeLabels(self)
Method which makes Coin3D labels to be displayed in the FreeCAD View.
def canDropObject(self, obj)
Method called by FreeCAD to ask if an object obj can be dropped into a Group.
panel
A RobotPanel if one is active or None.
frame
A SoSeparator with a coordinate frame made from 3 RGB arrows.
frame_arrowhead
A SoSwitch translated cone for frame axes.
def setProperties(self, fp)
Method to set properties during initialization or document restoration.
frame_color_z
A SoPackedColor blue color for an Z axis.
def execute(self, fp)
Method called when recomputing a DocumentObjectGroupPython.
def makeFrame(self, frame_labels)
Method which makes a Coin3D frame to show a current pose in a RobTranslation.
def doubleClicked(self, vp)
Method called when RobTranslation is double-clicked in the Tree View.
def change_joint_sequence(self, joint_sequence)
Method used to change a RobTranslation's joint variable sequence.
def setProperties(self, vp)
Method to hide unused properties.
labels
A list of SoSwitches containing colored translated labels.
Proxy class for Gui.ViewProviderDocumentObject RobTranslation.ViewObject.
fp
A RobTranslation object.
Proxy class for a DocumentObjectGroupPython RobTranslation instance.
def __setstate__(self, state)
Necessary method to avoid errors when trying to restore unserializable objects.
def __init__(self, vp)
Initialization method for ViewProviderRobTranslationProxy.
def is_translation_property(self, prop)
Method to check that a property describes a translation.
def getIcon(self)
Method called by FreeCAD to supply an icon for the Tree View.
def setupContextMenu(self, vp, menu)
Method called by the FreeCAD to customize a RobTranslation context menu.
label_translations
A list of SoTranslations moving labels.
frame_color_x
A SoPackedColor red color for an X axis.
def onChanged(self, fp, prop)
Method called after DocumentObjectGroupPython RobTranslation was changed.
Class providing funcionality to a RobRotation panel inside the TaskView.
def is_ValidTranslation(self, timestamps=[], ds=[], translation=None)
Method to check if a translation is valid.
def find_timestamp_indices_and_weights(self, fp)
Method to find weighted timestamps indices corresponding to a given time.
frame_arrowhead_translation
A SoTranslation moving frame arrowheads.
def __setstate__(self, state)
Necessary method to avoid errors when trying to restore unserializable objects.
frame_arrowhead_cone
A SoCone arrowhead cone for frame axes.
label_texts
A list of SoText2s labels denoting all axes and an origin.
def __getstate__(self)
Necessary method to avoid errors when trying to save unserializable objects.
bool updated
A bool - True if a property was changed by a class and not user.
def attach(self, vp)
Method called by FreeCAD after initialization to attach Coin3D constructs.
visualisations
A SoSwitch with all visualisations (frame & rotation axis).