skconstraint on the circle center

pierre_gr
pierre_gr Member Posts: 12 ✭✭
edited October 2017 in Community Support
Hi,
I have a line and a circle.
The line is fixed and I need to place a circle at a specific position, tangent to the line.

skCircle(gearSketch2, "baseCircle", {
                    "center" : center,
                    "radius" : arcBase.radius,
                    "construction" : true
                });
        skConstraint(gearSketch2, "Base_tangent", { "constraintType" : ConstraintType.TANGENT, "localFirst" : "baseCircle", "localSecond" : "pressureLine" });
The tangent constraint is working ok but the center is moved because I haven't fixed it.

How can I do it ?
Should I add something like that before my tangent constraint ?
skConstraint(gearSketch2, "baseCircle_fix_center", { "constraintType" : ConstraintType.FIX, "localFirst" : "baseCircle.center"});
or with a COINCIDENT constraint ? How do I access the circle center ?

Thank you,
Tagged:

Best Answer

  • pierre_gr
    pierre_gr Member Posts: 12 ✭✭
    Answer ✓
    Solved.

    Turns out that this is exactly what I had to do :) (the FIX constraint with circleName.center)


Answers

  • pierre_gr
    pierre_gr Member Posts: 12 ✭✭
    Answer ✓
    Solved.

    Turns out that this is exactly what I had to do :) (the FIX constraint with circleName.center)