File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,16 @@ using namespace SimTK;
3131
3232%rename OpenSim::PathPointSet::clone unused_clone;
3333
34+ // replace insert with a variant that takes ownership of passed in AbstractPathPoint.
35+ // in java the method 'insert' ends in super class so we can call it internally
36+ // and that hides the super class method
37+ %typemap(javacode) OpenSim::PathPointSet %{
38+ public boolean insert (int aIndex, AbstractPathPoint aObject) {
39+ aObject.markAdopted ();
40+ return super.insert (aIndex, aObject);
41+ }
42+ %}
43+
3444%extend OpenSim::Body {
3545 void getInertia (Array<double >& rInertia) {
3646 SimTK::Mat33 inertia= self->getInertia ().toMat33 ();
Original file line number Diff line number Diff line change @@ -92,6 +92,10 @@ MODEL_ADOPT_HELPER(Controller);
9292 args[1 ]._markAdopted ()
9393%}
9494
95+ // PathPointSet takes ownership of passed in object
96+ %pythonappend OpenSim::PathPointSet::insert %{
97+ aObject._markAdopted ()
98+ %}
9599// Typemaps
96100// ========
97101// None.
Original file line number Diff line number Diff line change 1010======
1111
1212- Made ` Component::getSocketNames ` a ` const ` member method (previously: non-const)
13+ - Modifed the swig interface files to make OpenSim::PathPointSet adopt new PathPoints inserted into it. (Issue #3276 )
1314- Fixed an issue with IPOPT libraries when building OpenSim with ` OPENSIM_WITH_CASADI = ON ` but ` OPENSIM_WITH_TROPTER = OFF ` (Issue #3267 ).
1415
1516v4.4
You can’t perform that action at this time.
0 commit comments