Skip to content
Open
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions manim/mobject/mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -2380,11 +2380,21 @@ def get_z(self, direction: Vector3DLike = ORIGIN) -> float:

def get_start(self) -> Point3D:
"""Returns the point, where the stroke that surrounds the :class:`~.Mobject` starts."""
# Points may live only on submobjects (e.g. a Text/Tex-shaped mobject, or
# the result of a Transform onto one), so fall back to the family (#4510).
if self.has_no_points():
members = self.family_members_with_points()
if members:
return members[0].get_start()
self.throw_error_if_no_points()
return np.array(self.points[0])

def get_end(self) -> Point3D:
"""Returns the point, where the stroke that surrounds the :class:`~.Mobject` ends."""
if self.has_no_points():
members = self.family_members_with_points()
if members:
return members[-1].get_end()
self.throw_error_if_no_points()
return np.array(self.points[-1])

Expand Down
Loading