Draft: Fix logical error in is_line function

This commit is contained in:
marioalexis
2020-10-21 11:03:04 -03:00
committed by Yorik van Havre
parent cd4901bf51
commit 318312be75
2 changed files with 2 additions and 1 deletions

View File

@@ -83,6 +83,7 @@ from draftgeoutils.edges import (findEdge,
orientEdge,
isSameLine,
isLine,
is_line,
invert,
findMidpoint,
getTangent)

View File

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