def Activated(self): selection = FreeCADGui.Selection.getSelectionEx() c = a2p_constraints.CircularEdgeConstraint(selection) cvp = a2p_constraintDialog.a2p_ConstraintValuePanel( c.constraintObject, 'createConstraint') FreeCADGui.Selection.clearSelection()
def constraint_two_circle(doc, parent_obj, child_obj, parent_edge, child_edge, direction, offset): # parent_obj.fixedPosition = True # child_obj.fixedPosition = False s1 = a2plib.SelectionExObject(doc, parent_obj, "Edge" + str(parent_edge)) s2 = a2plib.SelectionExObject(doc, child_obj, "Edge" + str(child_edge)) cc = a2pconst.CircularEdgeConstraint([s1, s2]) co = cc.constraintObject co.directionConstraint = direction co.offset = offset return co
def onCircularEdgeButton(self): selection = FreeCADGui.Selection.getSelectionEx() self.activeConstraint = a2p_constraints.CircularEdgeConstraint(selection) self.manageConstraint()