diff --git a/manim/mobject/geometry/arc.py b/manim/mobject/geometry/arc.py index 2923239944..555cb8c071 100644 --- a/manim/mobject/geometry/arc.py +++ b/manim/mobject/geometry/arc.py @@ -232,6 +232,11 @@ def has_start_tip(self) -> bool: # Getters def pop_tips(self) -> VGroup: + """Removes the tips of the arrow, + if there are no tips to return, does nothing + """ + if not self.has_tip() and not self.has_start_tip(): + return self.get_group_class()() start, end = self.get_start_and_end() result = self.get_group_class()() if self.has_tip(): @@ -298,6 +303,19 @@ def get_length(self) -> float: start, end = self.get_start_and_end() return float(np.linalg.norm(start - end)) + def pointwise_become_partial( + self, + vmobject: VMobject, + a: float, + b: float, + ) -> Self: + super().pointwise_become_partial(vmobject, a, b) + """In case of a dashed object, removes all the excess tips created by each individual dash.""" + if self.has_tip() and a != 0: + """Does the removal of the tip for a particular TipableVMobject""" + self.remove(self.tip) + return self + class Arc(TipableVMobject): """A circular arc. diff --git a/manim/mobject/types/vectorized_mobject.py b/manim/mobject/types/vectorized_mobject.py index 321fe4287b..f445c04c37 100644 --- a/manim/mobject/types/vectorized_mobject.py +++ b/manim/mobject/types/vectorized_mobject.py @@ -1959,7 +1959,6 @@ def pointwise_become_partial( 0, upper_residue, ) - return self def get_subcurve(self, a: float, b: float) -> Self: