Fix errors approximations in arc circle introducing gaps between ars in roads

This commit is contained in:
2024-06-21 00:55:33 +02:00
parent 92569d8815
commit 0eb47ac345
3 changed files with 67 additions and 59 deletions

View File

@@ -247,7 +247,6 @@ class Segment2D:
index = -1
else:
index = 0
print(i)
del self.points_thick_by_line[index]
del self.gaps[index]
@@ -276,9 +275,9 @@ class Segment2D:
return Point2D(x3, y3).round(), Point2D(x4, y4).round()
def middle_point(self):
return (np.round((self.start.x + self.end.x) / 2.0).astype(int),
np.round((self.start.y + self.end.y) / 2.0).astype(int),
)
return Point2D(np.round((self.start.x + self.end.x) / 2.0).astype(int),
np.round((self.start.y + self.end.y) / 2.0).astype(int),
)
def _add_points(self, points, is_computing_thickness, overlap):
if is_computing_thickness >= 0: