Page 1 of 1

Ellipsoid Wrap Dimensions Python

Posted: Wed Sep 04, 2019 12:11 pm
by tknighton
Hello,

I am building a model from the ground up in python 2.7, and when trying to use PropertyHelper to specify the dimensions of an ellipsoid wrap, I get an error that the OpenSim python module has no attribute PropertyHelper. Has this functionality been removed from the Python API in OpenSim 4.0, or is there a different method available? Any help would be greatly appreciated.

I've been working off the suggestion made in this thread:
viewtopicPhpbb.php?f=91&t=6123&p=15731&start=0&view=

I've attached a snippet of what I think the code should look like below.

Code: Select all

import opensim as osim
....
....
capsule = osim.WrapEllipsoid()
prop = capsule.updPropertyByName('dimensions')
osim.PropertyHelper.setValueDouble(1.1, prop, 0)
Thanks,
Tyler

Re: Ellipsoid Wrap Dimensions Python

Posted: Thu Sep 05, 2019 12:01 am
by mitkof6
I think in the v4.0 version you can set the dimensions using the setter:

Code: Select all

capsule.set_dimensions(osim.Vec3(x, y, z))


https://github.com/opensim-org/opensim- ... soid.h#L49