Draft: Fix logical error in is_line function

This commit is contained in:
marioalexis
2020-10-22 17:14:46 +02:00
committed by Yorik van Havre
parent cd4901bf51
commit 318312be75
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -83,6 +83,7 @@ from draftgeoutils.edges import (findEdge,
orientEdge,
isSameLine,
isLine,
is_line,
invert,
findMidpoint,
getTangent)
+1 -1
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