From 95d1e8244f00a9410b7c3755935fcdd89f2ffe39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Sun, 20 Mar 2016 10:27:37 +0100 Subject: [PATCH] FEM Post: Handle wireframe with internal wires --- src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp | 16 +++++++++++++--- src/Mod/Fem/Gui/ViewProviderFemPostObject.h | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp index 8cb455380..4f8fe43b1 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp @@ -110,12 +110,16 @@ ViewProviderFemPostObject::ViewProviderFemPostObject() : m_blockPropertyChanges( //create the vtk algorithms we use for visualisation m_outline = vtkSmartPointer::New(); m_points = vtkSmartPointer::New(); + m_pointsSurface = vtkSmartPointer::New(); m_surface = vtkSmartPointer::New(); m_wireframe = vtkSmartPointer::New(); + m_wireframeSurface = vtkSmartPointer::New(); m_surfaceEdges = vtkSmartPointer::New(); + m_pointsSurface->AddInputConnection(m_surface->GetOutputPort()); + m_wireframeSurface->AddInputConnection(m_surface->GetOutputPort()); m_surfaceEdges->AddInputConnection(m_surface->GetOutputPort()); - m_surfaceEdges->AddInputConnection(m_wireframe->GetOutputPort()); - + m_surfaceEdges->AddInputConnection(m_wireframeSurface->GetOutputPort()); + m_currentAlgorithm = m_outline; } @@ -194,9 +198,13 @@ void ViewProviderFemPostObject::setDisplayMode(const char* ModeName) m_currentAlgorithm = m_surface; else if (strcmp("Wireframe",ModeName)==0) m_currentAlgorithm = m_wireframe; + else if (strcmp("Wireframe (surface only)",ModeName)==0) + m_currentAlgorithm = m_wireframeSurface; else if (strcmp("Nodes",ModeName)==0) m_currentAlgorithm = m_points; - + else if (strcmp("Nodes (surface only)",ModeName)==0) + m_currentAlgorithm = m_pointsSurface; + update(); ViewProviderDocumentObject::setDisplayMode( ModeName ); @@ -207,9 +215,11 @@ std::vector ViewProviderFemPostObject::getDisplayModes(void) const std::vector StrList; StrList.push_back("Outline"); StrList.push_back("Nodes"); + //StrList.push_back("Nodes (surface only)"); somehow this filter does not work StrList.push_back("Surface"); StrList.push_back("Surface with Edges"); StrList.push_back("Wireframe"); + StrList.push_back("Wireframe (surface only)"); return StrList; } diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostObject.h b/src/Mod/Fem/Gui/ViewProviderFemPostObject.h index f9587f9bd..124dc8627 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostObject.h +++ b/src/Mod/Fem/Gui/ViewProviderFemPostObject.h @@ -141,8 +141,8 @@ protected: vtkSmartPointer m_surface; vtkSmartPointer m_surfaceEdges; vtkSmartPointer m_outline; - vtkSmartPointer m_wireframe; - vtkSmartPointer m_points; + vtkSmartPointer m_wireframe, m_wireframeSurface; + vtkSmartPointer m_points, m_pointsSurface; private: void updateProperties();