diff --git a/cadquery/occ_impl/sketch_solver.py b/cadquery/occ_impl/sketch_solver.py index e6e3ac8a5..bf75b15a1 100644 --- a/cadquery/occ_impl/sketch_solver.py +++ b/cadquery/occ_impl/sketch_solver.py @@ -84,7 +84,7 @@ def arc_point(x, val): def line_point(x, val): - return x[:2] + val * x[2:] + return x[:2] + val * (x[2:] - x[:2]) def arc_first_tangent(x): diff --git a/tests/test_sketch.py b/tests/test_sketch.py index 786db8682..7ea754051 100644 --- a/tests/test_sketch.py +++ b/tests/test_sketch.py @@ -640,7 +640,7 @@ def test_constraint_solver(): midpoint = (seg2.startPoint() + seg2.endPoint()) / 2 - (midpoint - seg1.startPoint()).Length == approx(2) + assert (midpoint - seg1.startPoint()).Length == approx(2) s5 = ( Sketch()