mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
Ensure svgs have positive orientation by default
This commit is contained in:
@ -320,8 +320,9 @@ class VMobjectFromSVGPath(VMobject):
|
||||
self.set_points(self.get_points_without_null_curves())
|
||||
# So triangulation doesn't get messed up
|
||||
self.subdivide_intersections()
|
||||
# Always default to orienting outward
|
||||
if self.get_unit_normal()[2] < 0:
|
||||
# Always default to orienting outward, account
|
||||
# for the fact that this will get flipped in SVG.__init__
|
||||
if self.get_unit_normal()[2] > 0:
|
||||
self.reverse_points()
|
||||
# Save for future use
|
||||
PATH_TO_POINTS[path_string] = self.get_points().copy()
|
||||
|
Reference in New Issue
Block a user