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:
@ -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):
|
||||
|
@ -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()
|
||||
|
Reference in New Issue
Block a user