diff --git a/modules/geom/pymod/export_vec3.cc b/modules/geom/pymod/export_vec3.cc index 1281b3008f1a451e41ca983242c9db74bd0e4123..8adf113fcfd5fb1ae09fd6bbb097212489a65ab5 100644 --- a/modules/geom/pymod/export_vec3.cc +++ b/modules/geom/pymod/export_vec3.cc @@ -52,6 +52,11 @@ list vec3_data(const geom::Vec3& v) return nrvo; } +boost::python::tuple wrap_FitCylinder(const geom::Vec3List& vl,const geom::Vec3& initial_direction) { + std::pair<geom::Line3,Real> pair=vl.FitCylinder(initial_direction); + return boost::python::make_tuple<geom::Line3,Real>(pair.first,pair.second); +} + void export_Vec3() { using namespace geom; @@ -115,6 +120,6 @@ void export_Vec3() .add_property("inertia", &Vec3List::GetInertia) .add_property("principal_axes", &Vec3List::GetPrincipalAxes) .def("GetODRLine", &Vec3List::GetODRLine) - .def("FitCylinder", &Vec3List::FitCylinder) + .def("FitCylinder", wrap_FitCylinder,(arg("direction initial guess"))) ; }