Example #1
0
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
Example #2
0
def contraint_coinsident_face(doc, parent_obj, child_obj, parent_face, child_face, direction, offset):
    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.PlaneConstraint([s1, s2])
    co = cc.constraintObject
    co.directionConstraint = direction
    co.offset = offset
Example #3
0
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