Skip to content

Commit

Permalink
Merge pull request #932 from lorenzncode/sketch-arcangle
Browse files Browse the repository at this point in the history
Sketch ArcAngle constraint fix
  • Loading branch information
jmwright authored Dec 21, 2021
2 parents 84edaf5 + e703925 commit 6b01d78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cadquery/occ_impl/sketch_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def orientation_cost(x, t, x0, val):
def arc_angle_cost(x, t, x0, val):

if t == "CIRCLE":
rv = norm(x[4] - x[3]) - val
rv = x[4] - val
else:
raise invalid_args(t)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_sketch.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ def test_constraint_solver():

assert s3._faces.isValid()

s3._tags["a1"][0].radius() == approx(1)
s3._tags["a1"][0].Length() == approx(pi / 3)
assert s3._tags["a1"][0].radius() == approx(1)
assert s3._tags["a1"][0].Length() == approx(pi / 3)

s4 = (
Sketch()
Expand Down

0 comments on commit 6b01d78

Please sign in to comment.