Skip to content

Removed multiple arrow heads with DashedVMobject #4078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
494b776
Update arc.py
CobaltIII Dec 29, 2024
a1670eb
Update vectorized_mobject.py
CobaltIII Dec 29, 2024
06857fa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 29, 2024
3ee17ff
Update vectorized_mobject.py
CobaltIII Dec 29, 2024
d91f727
Update vectorized_mobject.py
CobaltIII Dec 29, 2024
6d20506
Update arc.py
CobaltIII Dec 29, 2024
01f9bac
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 29, 2024
aadfaa8
Update arc.py
CobaltIII Jan 2, 2025
d415384
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 2, 2025
29014b7
Update arc.py
CobaltIII Jan 2, 2025
81ccf2f
Merge branch 'main' into main
CobaltIII Jan 2, 2025
f576d2a
Merge branch 'main' into main
CobaltIII Jan 5, 2025
479d7ec
Merge branch 'main' into main
CobaltIII Jan 21, 2025
9715c57
Merge branch 'main' into main
CobaltIII Jan 21, 2025
b6d1e88
Merge branch 'main' into main
CobaltIII Jan 22, 2025
91e3fdd
Merge branch 'main' into main
CobaltIII Feb 3, 2025
c7c0074
Merge branch 'main' into main
CobaltIII Feb 4, 2025
490a843
Merge branch 'main' into main
CobaltIII Feb 10, 2025
ca4c11d
Merge branch 'main' into main
CobaltIII Feb 11, 2025
86f9693
Merge branch 'main' into main
CobaltIII Mar 8, 2025
64e9425
Merge branch 'main' into main
CobaltIII Mar 13, 2025
cf71659
Merge branch 'main' into main
CobaltIII Mar 26, 2025
4d09134
Merge branch 'main' into main
CobaltIII Apr 20, 2025
b3ed975
Merge branch 'main' into main
CobaltIII May 14, 2025
c150307
Merge branch 'main' into main
CobaltIII Jun 1, 2025
f0fb8ab
Merge branch 'main' into main
CobaltIII Jun 9, 2025
bd0f655
Merge branch 'main' into main
CobaltIII Jun 12, 2025
e82c121
Merge branch 'main' into main
CobaltIII Jun 28, 2025
4ca0204
Merge branch 'main' into main
CobaltIII Aug 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions manim/mobject/geometry/arc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion manim/mobject/types/vectorized_mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,6 @@ def pointwise_become_partial(
0,
upper_residue,
)

return self

def get_subcurve(self, a: float, b: float) -> Self:
Expand Down
Loading