Fem: Add offset between faces and wireframe in FemMesh view provider

This commit is contained in:
marioalexis
2024-09-21 16:46:37 -03:00
committed by Chris Hennes
parent c029bb08e2
commit 00cd30aff2

View File

@@ -195,7 +195,7 @@ ViewProviderFemMesh::ViewProviderFemMesh()
ADD_PROPERTY(PointColor, (App::Color(0.7f, 0.7f, 0.7f)));
ADD_PROPERTY(PointSize, (5.0f));
PointSize.setConstraints(&floatRange);
ADD_PROPERTY(LineWidth, (2.0f));
ADD_PROPERTY(LineWidth, (1.0f));
LineWidth.setConstraints(&floatRange);
ShapeAppearance.setDiffuseColor(App::Color(1.0f, 0.7f, 0.0f));
@@ -334,14 +334,11 @@ void ViewProviderFemMesh::attach(App::DocumentObject* pcObj)
// because the group affects nodes that are rendered afterwards (#0003769)
// Faces + Wireframe (Elements)
// SoPolygonOffset* offset = new SoPolygonOffset();
// offset->styles = SoPolygonOffset::FILLED;
// offset->factor = 2.0f;
// offset->units = 1.0f;
SoPolygonOffset* offset = new SoPolygonOffset();
SoGroup* pcFlatWireRoot = new SoGroup();
pcFlatWireRoot->addChild(pcWireRoot);
// pcFlatWireRoot->addChild(offset);
pcFlatWireRoot->addChild(offset);
pcFlatWireRoot->addChild(pcFlatRoot);
addDisplayMaskMode(pcFlatWireRoot, Private::dm_face_wire);
@@ -349,7 +346,7 @@ void ViewProviderFemMesh::attach(App::DocumentObject* pcObj)
SoGroup* pcElemNodesRoot = new SoGroup();
pcElemNodesRoot->addChild(pcPointsRoot);
pcElemNodesRoot->addChild(pcWireRoot);
// pcElemNodesRoot->addChild(offset);
pcElemNodesRoot->addChild(offset);
pcElemNodesRoot->addChild(pcFlatRoot);
addDisplayMaskMode(pcElemNodesRoot, Private::dm_face_wire_node);