diff --git a/src/Mod/Fem/Gui/ViewProviderFemMesh.h b/src/Mod/Fem/Gui/ViewProviderFemMesh.h index 7fde46fa1..223a772e9 100755 --- a/src/Mod/Fem/Gui/ViewProviderFemMesh.h +++ b/src/Mod/Fem/Gui/ViewProviderFemMesh.h @@ -109,6 +109,8 @@ public: void resetColorByNodeId(void); //@} + const std::vector &getVisibleElementFaces(void)const{return vFaceElementIdx;} + PyObject *getPyObject(); diff --git a/src/Mod/Fem/Gui/ViewProviderFemMeshPy.xml b/src/Mod/Fem/Gui/ViewProviderFemMeshPy.xml index b40c8c812..37085dbde 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemMeshPy.xml +++ b/src/Mod/Fem/Gui/ViewProviderFemMeshPy.xml @@ -22,15 +22,21 @@ - Pose of Axis 1 in degrees + Postprocessing color of the the nodes. The faces between the nodes gets interpolated. - Pose of Axis 1 in degrees + List of nodes which gets highlighted + + + A List of elements and faces which are actually shown. This are all surface faces of the mesh + + + diff --git a/src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp b/src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp index 1de796d15..5d35195e4 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp @@ -66,6 +66,22 @@ void ViewProviderFemMeshPy::setHighlightedNodes(Py::List arg) } +Py::List ViewProviderFemMeshPy::getVisibleElementFaces(void) const +{ + const std::vector & visElmFc = this->getViewProviderFemMeshPtr()->getVisibleElementFaces(); + Py::List result( visElmFc.size() ); + + int i = 0; + for (std::vector::const_iterator it = visElmFc.begin();it!=visElmFc.end();++it,i++){ + Py::Tuple tup(2); + + tup.setItem( 0,Py::Int((long)*it>>3) ); + tup.setItem( 1,Py::Int((long)(*it&7)+1) ); + result.setItem(i,tup); + } + + return result; +} PyObject *ViewProviderFemMeshPy::getCustomAttributes(const char* /*attr*/) const