cloneAndAppend Wrap Object in MatLab not working
Posted: Fri Jun 24, 2022 5:37 am
Hi, I am attempting to locate an existing wrap object in a model and add it to an existing muscle. When I do this I get the following error:
No method 'cloneAndAppend' with matching signature found for class 'org.opensim.modeling.PathWrapSet'.
Does anyone have any insight into what I am doing wrong or if there is a workaround I can use. I have included my code below for clarity.
Any advice would be much appreciated
Regards
Alex
No method 'cloneAndAppend' with matching signature found for class 'org.opensim.modeling.PathWrapSet'.
Does anyone have any insight into what I am doing wrong or if there is a workaround I can use. I have included my code below for clarity.
Code: Select all
muscles = osimModel.getMuscles(); %pulls all the muscles from the model
muscle = muscles.get(muscle_name); %calls specific muscle chosen by muscle_name defined above
WrapAdd = osimModel.getBodySet().get(12).getWrapObjectSet().get(3); %12 represents the body humerus in BodySet and 3 represents humeral_column in WrapObjectSet. for full lists see Untitled_Test.m
% add wrap object to muscle
wrapGeoPath = muscle.getGeometryPath(); %Get the muscles geometry where muscle is defined above
wrapSet = wrapGeoPath.getWrapSet(); %Get the muscle's wrap set
muscle.getGeometryPath.getWrapSet.cloneAndAppend(WrapAdd); %muscle is previously defined
model.finalizeConnections();
Regards
Alex