Commit 437accc1 authored by Alexander Dielen's avatar Alexander Dielen
Browse files

exposed meshes

parent d58bdfdc
#include "Bindings.hh" #include "Bindings.hh"
#include "Miscellaneous.hh" #include "Miscellaneous.hh"
#include "Vector.hh" #include "Vector.hh"
#include "Mesh.hh"
#include "Iterator.hh" #include "Iterator.hh"
#include "Circulator.hh" #include "Circulator.hh"
...@@ -22,8 +23,8 @@ PYBIND11_MODULE(openmesh, m) { ...@@ -22,8 +23,8 @@ PYBIND11_MODULE(openmesh, m) {
expose_vec<double, 3>(m, "Vec3d"); expose_vec<double, 3>(m, "Vec3d");
expose_vec<double, 4>(m, "Vec4d"); expose_vec<double, 4>(m, "Vec4d");
// expose_mesh<PolyMesh>("PolyMesh"); expose_mesh<PolyMesh>(m, "PolyMesh");
// expose_mesh<TriMesh>("TriMesh"); expose_mesh<TriMesh>(m, "TriMesh");
expose_iterator<OM::PolyConnectivity::VertexIter, &OM::ArrayKernel::n_vertices>(m, "VertexIter"); expose_iterator<OM::PolyConnectivity::VertexIter, &OM::ArrayKernel::n_vertices>(m, "VertexIter");
expose_iterator<OM::PolyConnectivity::HalfedgeIter, &OM::ArrayKernel::n_halfedges>(m, "HalfedgeIter"); expose_iterator<OM::PolyConnectivity::HalfedgeIter, &OM::ArrayKernel::n_halfedges>(m, "HalfedgeIter");
......
...@@ -7,6 +7,14 @@ ...@@ -7,6 +7,14 @@
#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh> #include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh> #include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
/**
* Return value policy for functions that return references to objects that are
* managed by %OpenMesh.
*/
#define OPENMESH_PYTHON_DEFAULT_POLICY py::return_value_policy::copy
struct MeshTraits : public OpenMesh::DefaultTraits { struct MeshTraits : public OpenMesh::DefaultTraits {
/** Use double precision points */ /** Use double precision points */
typedef OpenMesh::Vec3d Point; typedef OpenMesh::Vec3d Point;
......
This diff is collapsed.
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