Skip to content
Snippets Groups Projects
Commit 785299a8 authored by Niklaus Johner's avatar Niklaus Johner
Browse files

Added wrapper function for the export of the Vec3List::FitCylinder function

parent db8e46f1
Branches
Tags
No related merge requests found
......@@ -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")))
;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment