Skip to content

Commit

Permalink
Add new display mode Wireframe & Nodes to FEM
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jan 16, 2019
1 parent 6e5369d commit f1c23e9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Mod/Fem/Gui/ViewProviderFemMesh.cpp
Expand Up @@ -165,13 +165,15 @@ class ViewProviderFemMesh::Private
{
public:
static const char *dm_face_wire;
static const char *dm_wire_node;
static const char *dm_face_wire_node;
static const char *dm_face;
static const char *dm_node;
static const char *dm_wire;
};

const char * ViewProviderFemMesh::Private::dm_face_wire = "Faces & Wireframe";
const char * ViewProviderFemMesh::Private::dm_wire_node = "Wireframe & Nodes";
const char * ViewProviderFemMesh::Private::dm_face_wire_node = "Faces, Wireframe & Nodes";
const char * ViewProviderFemMesh::Private::dm_face = "Faces";
const char * ViewProviderFemMesh::Private::dm_node = "Nodes";
Expand Down Expand Up @@ -327,6 +329,12 @@ void ViewProviderFemMesh::attach(App::DocumentObject *pcObj)
//pcElemNodesRoot->addChild(offset);
pcElemNodesRoot->addChild(pcFlatRoot);
addDisplayMaskMode(pcElemNodesRoot, Private::dm_face_wire_node);

// Wireframe + Nodes
SoGroup* pcWireNodeRoot = new SoGroup();
pcWireNodeRoot->addChild(pcPointsRoot);
pcWireNodeRoot->addChild(pcWireRoot);
addDisplayMaskMode(pcWireNodeRoot, Private::dm_wire_node);
}

void ViewProviderFemMesh::setDisplayMode(const char* ModeName)
Expand All @@ -343,6 +351,7 @@ std::vector<std::string> ViewProviderFemMesh::getDisplayModes(void) const
StrList.push_back(Private::dm_face);
StrList.push_back(Private::dm_wire);
StrList.push_back(Private::dm_node);
StrList.push_back(Private::dm_wire_node);
return StrList;
}

Expand Down

0 comments on commit f1c23e9

Please sign in to comment.