Fix sketch solver line_point method relative/absolute mixup (#1336)

* Sketch: Fix line_point implementation

Enable assert that fails without the fix ( issue #1127 )

* Change channel order

---------

Co-authored-by: AU <adam-urbanczyk@users.noreply.github.com>
This commit is contained in:
Matti Eiden
2023-06-17 11:50:30 +03:00
committed by GitHub
parent 665815b8dc
commit b96eb8a255
2 changed files with 2 additions and 2 deletions

View File

@ -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):

View File

@ -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()