mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 08:54:38 +08:00
Change subdivide_intersections default to one subdivision, remove second check
This commit is contained in:
@ -577,14 +577,11 @@ class VMobject(Mobject):
|
|||||||
self.subdivide_curves_by_condition(tuple_to_subdivisions, recurse)
|
self.subdivide_curves_by_condition(tuple_to_subdivisions, recurse)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def subdivide_intersections(self, recurse: bool = True, n_subdivisions: int = 2):
|
def subdivide_intersections(self, recurse: bool = True, n_subdivisions: int = 1):
|
||||||
path = self.get_anchors()
|
path = self.get_anchors()
|
||||||
def tuple_to_subdivisions(b0, b1, b2):
|
def tuple_to_subdivisions(b0, b1, b2):
|
||||||
if line_intersects_path(b0, b1, path):
|
if line_intersects_path(b0, b1, path):
|
||||||
return n_subdivisions
|
return n_subdivisions
|
||||||
alt_b1 = b0 + b2 - b1
|
|
||||||
if line_intersects_path(b0, alt_b1, path):
|
|
||||||
return n_subdivisions
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
self.subdivide_curves_by_condition(tuple_to_subdivisions, recurse)
|
self.subdivide_curves_by_condition(tuple_to_subdivisions, recurse)
|
||||||
|
Reference in New Issue
Block a user