From a6bc73d49dbbd3b07c01b8e60633b052f8a414d1 Mon Sep 17 00:00:00 2001
From: Niklaus Johner <nij2003@med.cornell.edu>
Date: Fri, 24 Jan 2014 18:09:31 -0500
Subject: [PATCH] Fixed cexport for CoordFrame::FitCylinder

---
 modules/mol/base/pymod/export_coord_frame.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/mol/base/pymod/export_coord_frame.cc b/modules/mol/base/pymod/export_coord_frame.cc
index 70ccadd92..566f0a43c 100644
--- a/modules/mol/base/pymod/export_coord_frame.cc
+++ b/modules/mol/base/pymod/export_coord_frame.cc
@@ -43,7 +43,11 @@ Real (CoordFrame::*get_min_dist)(const mol::EntityView&, const mol::EntityView&)
 Real (CoordFrame::*get_alpha)(const mol::EntityView&) const = &CoordFrame::GetAlphaHelixContent;
 geom::Line3 (CoordFrame::*get_odr_line)(const mol::EntityView&) const = &CoordFrame::GetODRLine;
 geom::Plane (CoordFrame::*get_odr_plane)(const mol::EntityView&) const = &CoordFrame::GetODRPlane;
-std::pair<geom::Line3,Real> (CoordFrame::*fit_cylinder)(const mol::EntityView&) const = &CoordFrame::FitCylinder;
+boost::python::tuple wrap_FitCylinder(const CoordFrame& f,const mol::EntityView& ev) {
+  std::pair<geom::Line3,Real> pair=f.FitCylinder(ev);
+  return boost::python::make_tuple<geom::Line3,Real>(pair.first,pair.second);
+}  
+
 // TODO: move to geom
 geom::Line3 (CoordFrame::*get_odr_line2)() const = &geom::Vec3List::GetODRLine;
 
@@ -83,7 +87,7 @@ void export_CoordFrame()
     .def("GetODRLine",get_odr_line)
     .def("GetODRLine",get_odr_line2)
     .def("GetAlphaHelixContent",get_alpha)
-    .def("FitCylinder",fit_cylinder)
+    .def("FitCylinder",wrap_FitCylinder)
   ;
   def("CreateCoordFrame",create_coord_frame1);
   def("CreateCoordFrame",create_coord_frame2);
-- 
GitLab