Commit 0b5cb22e authored by stevet's avatar stevet
Browse files

added boost shared ptr to binding type

parent e5651543
......@@ -534,7 +534,7 @@ BOOST_PYTHON_MODULE(curves) {
;
/** END bezier3 curve**/
/** BEGIN bezier curve**/
class_<bezier_t, bases<curve_abc_t> >("bezier", init<>())
class_<bezier_t, bases<curve_abc_t>, boost::shared_ptr<bezier_t> >("bezier", init<>())
.def("__init__", make_constructor(&wrapBezierConstructor))
.def("__init__", make_constructor(&wrapBezierConstructorBounds))
.def("__init__", make_constructor(&wrapBezierConstructorConstraints))
......@@ -582,7 +582,7 @@ BOOST_PYTHON_MODULE(curves) {
.def("isZero", &linear_variable_t::isZero)
.def("norm", &linear_variable_t::norm);
class_<bezier_linear_variable_t>("bezier_linear_variable", no_init)
class_<bezier_linear_variable_t, bases<curve_abc_t>, boost::shared_ptr<bezier_linear_variable_t> >("bezier_linear_variable", no_init)
.def("__init__", make_constructor(&wrapBezierLinearConstructor))
.def("__init__", make_constructor(&wrapBezierLinearConstructorBounds))
.def("min", &bezier_linear_variable_t::min)
......
This diff is collapsed.
This diff is collapsed.
......@@ -440,7 +440,8 @@ class TestCurves(unittest.TestCase):
a = bezier(waypoints, 0., 1.)
b = bezier(waypoints, 1., 2.)
pc = piecewise(a)
pc.append(b)
pc.append(b)
a.split(array([0.4,0.8])).curve_at_index(0)
pc.min()
pc.max()
pc(0.4)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment