mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
Update opengl_vectorized_mobject.py (#3790)
The "insert_n_curves_to_point_list" function requires the "points" argument to be a numpy array, since it calls the "get_bezier_tuples_from_points" function, which requires "points" to be a numpy array because it has the "return points.reshape((-1, nppc, 3))" statement. Ordinary lists do not have a "reshape" method. So we need to convert "sp1" and "sp2" to numpy arrays before calling the "insert_n_curves_to_point_list" function. Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
This commit is contained in:
parent
e30ed6ed82
commit
c2fa4f926b
1 changed files with 2 additions and 2 deletions
|
|
@ -1223,8 +1223,8 @@ class OpenGLVMobject(OpenGLMobject):
|
|||
return path
|
||||
|
||||
for n in range(n_subpaths):
|
||||
sp1 = get_nth_subpath(subpaths1, n)
|
||||
sp2 = get_nth_subpath(subpaths2, n)
|
||||
sp1 = np.asarray(get_nth_subpath(subpaths1, n))
|
||||
sp2 = np.asarray(get_nth_subpath(subpaths2, n))
|
||||
diff1 = max(0, (len(sp2) - len(sp1)) // nppc)
|
||||
diff2 = max(0, (len(sp1) - len(sp2)) // nppc)
|
||||
sp1 = self.insert_n_curves_to_point_list(diff1, sp1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue