Ellipsoid Wrap Dimensions Python

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Tyler Knighton
Posts: 1
Joined: Mon May 06, 2019 8:52 am

Ellipsoid Wrap Dimensions Python

Post by Tyler Knighton » Wed Sep 04, 2019 12:11 pm

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

Tags:

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Ellipsoid Wrap Dimensions Python

Post by Dimitar Stanev » Thu Sep 05, 2019 12:01 am

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

POST REPLY