tataratat / splinepy

Library for prototyping spline geometries of arbitrary dimensions and degrees, and IGA
https://tataratat.github.io/splinepy
Other
47 stars 13 forks source link

Mutipatch conversion error on multiple calls #198

Closed jzwar closed 1 year ago

jzwar commented 1 year ago
import splinepy as sp
import numpy as np
a = sp.Bezier(degrees=[1,1,1],control_points=sp.utils.data.cartesian_product([np.array([0,1]) for _ in range(3)]))
aa = a.copy()
aa.cps += [1,0,0]
b = sp.Multipatch(splines=[a,aa])
# First
v = b.boundary_multi_patch()
v.splines # Works fine
v = b.boundary_multi_patch()
v.splines # Error

The above example produces an error as the shared pointer (member of py_multi_patch) is not converted into the correct type. Maybe @j042 you have an idea what causes this problem?

j042 commented 1 year ago

oh, I think it is because move ctor is called from to_derived(). I'll work on it