Skip to content

Commit 6b01d78

Browse files
authored
Merge pull request #932 from lorenzncode/sketch-arcangle
Sketch ArcAngle constraint fix
2 parents 84edaf5 + e703925 commit 6b01d78

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cadquery/occ_impl/sketch_solver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def orientation_cost(x, t, x0, val):
212212
def arc_angle_cost(x, t, x0, val):
213213

214214
if t == "CIRCLE":
215-
rv = norm(x[4] - x[3]) - val
215+
rv = x[4] - val
216216
else:
217217
raise invalid_args(t)
218218

tests/test_sketch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ def test_constraint_solver():
468468

469469
assert s3._faces.isValid()
470470

471-
s3._tags["a1"][0].radius() == approx(1)
472-
s3._tags["a1"][0].Length() == approx(pi / 3)
471+
assert s3._tags["a1"][0].radius() == approx(1)
472+
assert s3._tags["a1"][0].Length() == approx(pi / 3)
473473

474474
s4 = (
475475
Sketch()

0 commit comments

Comments
 (0)