Bug fix for length 0 Dashed line

This commit is contained in:
Grant Sanderson
2018-04-12 21:56:00 -07:00
parent 1da3b23695
commit 515257e0b1

View File

@ -439,6 +439,9 @@ class DashedLine(Line):
def generate_points(self):
length = np.linalg.norm(self.end - self.start)
if length == 0:
self.add(Line(self.start, self.end))
return self
num_interp_points = int(length / self.dashed_segment_length)
points = [
interpolate(self.start, self.end, alpha)