Draft: Fix logical error in is_line function
This commit is contained in:
committed by
Yorik van Havre
parent
cd4901bf51
commit
318312be75
@@ -83,6 +83,7 @@ from draftgeoutils.edges import (findEdge,
|
||||
orientEdge,
|
||||
isSameLine,
|
||||
isLine,
|
||||
is_line,
|
||||
invert,
|
||||
findMidpoint,
|
||||
getTangent)
|
||||
|
||||
@@ -127,7 +127,7 @@ def is_line(bspline):
|
||||
start_point = bspline.StartPoint
|
||||
end_point = bspline.EndPoint
|
||||
dist_start_end = end_point.distanceToPoint(start_point)
|
||||
if (dist_start_end == bspline.length()) < 1e-7:
|
||||
if abs(bspline.length() - dist_start_end) < 1e-7:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user