Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Bug fix for length 0 Dashed line

Grant Sanderson515257e0b131
diff --git a/mobject/geometry.py b/mobject/geometry.py
index f7c3e53c9..f9683221a 100644
--- a/mobject/geometry.py
+++ b/mobject/geometry.py
@@ -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)