File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1938,24 +1938,27 @@ def pointwise_become_partial(
19381938 upper_residue ,
19391939 )
19401940 else :
1941+ # make a copy of points before setting self.points = np.empty(...)
1942+ vmobject_points = vmobject .points .copy ()
1943+
19411944 # Allocate space for (upper_index-lower_index+1) Bézier curves.
19421945 self .points = np .empty ((nppc * (upper_index - lower_index + 1 ), self .dim ))
19431946 # Look at the "lower_index"-th Bezier curve and select its part from
19441947 # t=lower_residue to t=1. This is the first curve in self.points.
19451948 self .points [:nppc ] = partial_bezier_points (
1946- vmobject . points [nppc * lower_index : nppc * (lower_index + 1 )],
1949+ vmobject_points [nppc * lower_index : nppc * (lower_index + 1 )],
19471950 lower_residue ,
19481951 1 ,
19491952 )
19501953 # If there are more curves between the "lower_index"-th and the
19511954 # "upper_index"-th Béziers, add them all to self.points.
1952- self .points [nppc :- nppc ] = vmobject . points [
1955+ self .points [nppc :- nppc ] = vmobject_points [
19531956 nppc * (lower_index + 1 ) : nppc * upper_index
19541957 ]
19551958 # Look at the "upper_index"-th Bézier curve and select its part from
19561959 # t=0 to t=upper_residue. This is the last curve in self.points.
19571960 self .points [- nppc :] = partial_bezier_points (
1958- vmobject . points [nppc * upper_index : nppc * (upper_index + 1 )],
1961+ vmobject_points [nppc * upper_index : nppc * (upper_index + 1 )],
19591962 0 ,
19601963 upper_residue ,
19611964 )
You can’t perform that action at this time.
0 commit comments