diff --git a/src/Mod/Mesh/App/FacetPy.xml b/src/Mod/Mesh/App/FacetPy.xml index 50f0dfa0e..47ceb3de4 100644 --- a/src/Mod/Mesh/App/FacetPy.xml +++ b/src/Mod/Mesh/App/FacetPy.xml @@ -63,5 +63,17 @@ Get a list of intersection points with another triangle. - + + + The index tuple of point vertices of the mesh this facet is built of + + + + + + The index tuple of neighbour facets of the mesh this facet is adjacent with + + + + \ No newline at end of file diff --git a/src/Mod/Mesh/App/FacetPyImp.cpp b/src/Mod/Mesh/App/FacetPyImp.cpp index 17ee6ccc5..94dc00eca 100644 --- a/src/Mod/Mesh/App/FacetPyImp.cpp +++ b/src/Mod/Mesh/App/FacetPyImp.cpp @@ -144,6 +144,30 @@ Py::List FacetPy::getPoints(void) const return pts; } +Py::Tuple FacetPy::getPointIndices(void) const +{ + FacetPy::PointerType face = this->getFacetPtr(); + if (!face->isBound()) + { return Py::Tuple(); } + + Py::Tuple idxTuple(3); + for (int i=0; i<3; i++) + { idxTuple.setItem( i, Py::Int( (long)face->PIndex[i] ) ); } + return idxTuple; +} + +Py::Tuple FacetPy::getNeighbourIndices(void) const +{ + FacetPy::PointerType face = this->getFacetPtr(); + if (!face->isBound()) + { return Py::Tuple(); } + + Py::Tuple idxTuple(3); + for (int i=0; i<3; i++) + { idxTuple.setItem( i, Py::Int( (long)face->NIndex[i] ) ); } + return idxTuple; +} + PyObject *FacetPy::getCustomAttributes(const char* attr) const { return 0;