I use the following python code in the API of Inspire Motion v2025.1 to create a bushing between two imported parts. I applied a force to this system and the bushing displacement was according to the defined stiffness.
I use the same type of definition in a more complicated model, and the solution does not converge.
Is there anything missing? Do I need to define the indipendent variable?
________________________ Python Code:
from hwx import inspire
from hwx.inspire import motionview
from hwx.inspire.motion import Spline
from hwx.inspire import motion
from hw import mview
Start with imported geometry
model = motion.getModel()
subname = ['NAUO'+str(i) for i in range(1, 3)]
extracting the subassemblies:
ass = [model.getChild(i) for i in subname]
extracting the segments as parts
parts = [ass[i].getChild() for i in range(0, len(subname))]
k1 = motionview.Curve(x_type = 'VALUE',y_type = 'VALUE',x_value = [-0.104729072, -0.005496048, -0.002643271, 0.0, 0.002643271, 0.005496048, 0.104729072],y_value = [20000, 350, 100, 0, -100, -350, -20000])
feat_1 = ass[0].getFeature('FeatureCylindrical(Boss-Extrude1.2)')
ref_point = inspire.geometry.Point(feat_1, "CENTER_OF_CIRCLE")
bush1 = motionview.Bushing(name = 'bush'+str(i))
bush1.kx.type = 'CRV'
bush1.ky.type = 'CRV'
bush1.kx.crv = k1
bush1.ky.crv = k1
bush1.kx.int_type = 'CUBIC'
bush1.ky.int_type = 'CUBIC'
bush1.kx.indep_var = 'DX'
bush1.ky.indep_var = 'DY'
bush1.setValues(b1 = parts[0],b2 = parts[1])
bush1.origin = ref_point