def Activated(self): selection = FreeCADGui.Selection.getSelectionEx() c = a2p_constraints.PlanesParallelConstraint(selection) cvp = a2p_constraintDialog.a2p_ConstraintValuePanel( c.constraintObject, 'createConstraint') FreeCADGui.Selection.clearSelection()
def constraint_parallel_face(doc, parent_obj, child_obj, parent_face, child_face, direction): parent_obj.fixedPosition = True child_obj.fixedPosition = False s1 = a2plib.SelectionExObject(doc, parent_obj, "Face" + str(parent_face)) s2 = a2plib.SelectionExObject(doc, child_obj, "Face" + str(child_face)) cc = a2pconst.PlanesParallelConstraint([s1, s2]) co = cc.constraintObject co.directionConstraint = direction return co
def onPlanesParallelButton(self): selection = FreeCADGui.Selection.getSelectionEx() self.activeConstraint = a2p_constraints.PlanesParallelConstraint(selection) self.manageConstraint()