Commit f5a1c90c authored by Alexander Dielen's avatar Alexander Dielen

removed low-level items from the project

parent 04614b0f
Pipeline #6277 passed with stages
in 5 minutes and 17 seconds
......@@ -13,7 +13,6 @@ namespace OM = OpenMesh;
PYBIND11_MODULE(openmesh, m) {
expose_items(m);
expose_handles(m);
expose_status_bits_and_info(m);
......
......@@ -497,12 +497,6 @@ void expose_mesh(py::module& m, const char *_name) {
const typename Mesh::Edge& (Mesh::*edge )(OM::EdgeHandle ) const = &Mesh::edge;
const typename Mesh::Face& (Mesh::*face )(OM::FaceHandle ) const = &Mesh::face;
// Item -> Handle
OM::VertexHandle (Mesh::*handle_v)(const typename Mesh::Vertex& ) const = &Mesh::handle;
OM::HalfedgeHandle (Mesh::*handle_h)(const typename Mesh::Halfedge&) const = &Mesh::handle;
OM::EdgeHandle (Mesh::*handle_e)(const typename Mesh::Edge& ) const = &Mesh::handle;
OM::FaceHandle (Mesh::*handle_f)(const typename Mesh::Face& ) const = &Mesh::handle;
// Get value of a standard property (status)
const StatusInfo& (Mesh::*status_vh)(OM::VertexHandle ) const = &Mesh::status;
const StatusInfo& (Mesh::*status_hh)(OM::HalfedgeHandle) const = &Mesh::status;
......@@ -579,12 +573,6 @@ void expose_mesh(py::module& m, const char *_name) {
bool (Mesh::*is_boundary_vh)(OM::VertexHandle ) const = &Mesh::is_boundary;
bool (Mesh::*is_boundary_fh)(OM::FaceHandle, bool) const = &Mesh::is_boundary;
// Generic handle derefertiation
const typename Mesh::Vertex& (Mesh::*deref_vh)(OM::VertexHandle ) const = &Mesh::deref;
const typename Mesh::Halfedge& (Mesh::*deref_hh)(OM::HalfedgeHandle) const = &Mesh::deref;
const typename Mesh::Edge& (Mesh::*deref_eh)(OM::EdgeHandle ) const = &Mesh::deref;
const typename Mesh::Face& (Mesh::*deref_fh)(OM::FaceHandle ) const = &Mesh::deref;
//======================================================================
// PolyMeshT Function Pointers
//======================================================================
......@@ -623,16 +611,6 @@ void expose_mesh(py::module& m, const char *_name) {
.def("reserve", &Mesh::reserve)
.def("vertex", vertex, py::return_value_policy::reference)
.def("halfedge", halfedge, py::return_value_policy::reference)
.def("edge", edge, py::return_value_policy::reference)
.def("face", face, py::return_value_policy::reference)
.def("handle", handle_v)
.def("handle", handle_h)
.def("handle", handle_e)
.def("handle", handle_f)
.def("vertex_handle", vertex_handle_uint)
.def("halfedge_handle", halfedge_handle_uint)
.def("edge_handle", edge_handle_uint)
......@@ -843,11 +821,6 @@ void expose_mesh(py::module& m, const char *_name) {
.def("is_boundary", is_boundary_fh, py::arg("fh"), py::arg("check_vertex")=false)
.def("is_manifold", &Mesh::is_manifold)
.def("deref", deref_vh, py::return_value_policy::reference)
.def("deref", deref_hh, py::return_value_policy::reference)
.def("deref", deref_eh, py::return_value_policy::reference)
.def("deref", deref_fh, py::return_value_policy::reference)
.def_static("is_triangles", &Mesh::is_triangles)
.def_readonly_static("InvalidVertexHandle", &Mesh::InvalidVertexHandle)
......
#include "Miscellaneous.hh"
#include <OpenMesh/Core/Mesh/ArrayItems.hh>
#include <OpenMesh/Core/Mesh/Handles.hh>
#include <OpenMesh/Core/Utils/Property.hh>
namespace OM = OpenMesh;
/**
* Expose mesh items to %Python.
*/
void expose_items(py::module& m) {
py::class_<OM::ArrayItems::Vertex>(m, "Vertex");
py::class_<OM::ArrayItems::Halfedge>(m, "Halfedge");
py::class_<OM::ArrayItems::Edge>(m, "Edge");
py::class_<OM::ArrayItems::Face>(m, "Face");
}
/**
* Expose item and property handles to %Python.
*/
......
......@@ -5,7 +5,6 @@
namespace py = pybind11;
void expose_items(py::module& m);
void expose_handles(py::module& m);
void expose_status_bits_and_info(py::module& m);
......
......@@ -150,8 +150,6 @@ class TrimeshCirculatorFaceFace(unittest.TestCase):
# Get the face via the handle
faceHandle1 = next(face_iter)
face1 = self.mesh.face(faceHandle1)
self.assertEqual(faceHandle1.idx(), 1)
......
Markdown is supported
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