Public Member Functions | |
def | add_point (self, edit_command, obj, pos) |
def | delete_point (self, obj, node_idx) |
def | get_edit_obj_context_menu (self, edit_command, obj, position) |
def | get_edit_point_context_menu (self, edit_command, obj, node_idx) |
def | get_edit_points (self, obj) |
def | init_preview_object (self, obj) |
def | recomputePointsBezier (self, obj, pts, idx, v, degree, moveTrackers=False) |
def | smoothBezPoint (self, obj, point, style='Symmetric') |
def | update_object_from_edit_points (self, obj, node_idx, v, alt_edit_mode=0) |
def | update_preview_object (self, edit_command, obj, node_idx, v) |
Public Member Functions inherited from draftguitools.gui_edit_base_object.GuiTools | |
def | get_edit_obj_context_menu (self, edit_command, obj, position) |
def | get_edit_point_context_menu (self, edit_command, obj, node_idx) |
def | get_edit_points (self, obj) |
def | get_object_style (self, obj) |
def | init_preview_object (self, obj) |
def | restore_object_style (self, obj, modes) |
def | set_object_editing_style (self, obj) |
def | update_object_from_edit_points (self, obj, node_idx, v, alt_edit_mode=0) |
def | update_preview_object (self, edit_command, obj, node_idx, v) |
def draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.add_point | ( | self, | |
edit_command, | |||
obj, | |||
pos | |||
) |
Add point to obj and reset trackers.
Referenced by draftguitools.gui_edit_draft_objects.DraftWireGuiTools.get_edit_obj_context_menu(), and draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.get_edit_obj_context_menu().
def draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.delete_point | ( | self, | |
obj, | |||
node_idx | |||
) |
def draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.get_edit_obj_context_menu | ( | self, | |
edit_command, | |||
obj, | |||
position | |||
) |
Get the context menu associated to edited object (user is over the object) Return a list of tuples containing menu labels and associated functions: return [ ("action label", lambda: self.handle_action_label(edit_command, obj, position)), ] Parameters: edit_command: running Draft_Edit command obj: the edited object position: position of the cursor on the screen (x, y)
Reimplemented from draftguitools.gui_edit_base_object.GuiTools.
References draftguitools.gui_edit_draft_objects.DraftWireGuiTools.add_point(), draftguitools.gui_edit_draft_objects.DraftBSplineGuiTools.add_point(), and draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.add_point().
def draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.get_edit_point_context_menu | ( | self, | |
edit_command, | |||
obj, | |||
node_idx | |||
) |
Get the context menu associated to edit points (user is over an editpoint) Return a list of tuples containing menu labels and associated functions: return [ ("action label", lambda: self.handle_action_label(edit_command, obj, node_idx)), ] Parameters: edit_command: running Draft_Edit command obj: the edited object node_idx: number of the edited node
Reimplemented from draftguitools.gui_edit_base_object.GuiTools.
References draftguitools.gui_edit_draft_objects.DraftWireGuiTools.delete_point(), draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.delete_point(), and draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.smoothBezPoint().
def draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.get_edit_points | ( | self, | |
obj | |||
) |
Return to Draft_Edit a list of vectors for the given object. Remember to use object local coordinates system. Parameters: obj: the object
Reimplemented from draftguitools.gui_edit_base_object.GuiTools.
def draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.init_preview_object | ( | self, | |
obj | |||
) |
Reimplemented from draftguitools.gui_edit_base_object.GuiTools.
def draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.recomputePointsBezier | ( | self, | |
obj, | |||
pts, | |||
idx, | |||
v, | |||
degree, | |||
moveTrackers = False |
|||
) |
(object, Points as list, nodeIndex as Int, App.Vector of new point, moveTrackers as Bool) return the new point list, applying the App.Vector to the given index point
Referenced by draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.update_object_from_edit_points(), and draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.update_preview_object().
def draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.smoothBezPoint | ( | self, | |
obj, | |||
point, | |||
style = 'Symmetric' |
|||
) |
def draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.update_object_from_edit_points | ( | self, | |
obj, | |||
node_idx, | |||
v, | |||
alt_edit_mode = 0 |
|||
) |
Update the object from modified Draft_Edit point. No need to recompute at the end. Parameters: obj: the object node_idx: number of the edited node v: target vector of the node in object local coordinates system alt_edit_mode: alternative edit mode to perform different operations (usually can be selected from the Draft_Edit context menu) default = 0
Reimplemented from draftguitools.gui_edit_base_object.GuiTools.
References draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.recomputePointsBezier().
def draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.update_preview_object | ( | self, | |
edit_command, | |||
obj, | |||
node_idx, | |||
v | |||
) |
Reimplemented from draftguitools.gui_edit_base_object.GuiTools.
References draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.recomputePointsBezier().