From 38de336ee0391763ee4511d524f0c58d3d2c8df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Mon, 4 May 2015 22:43:59 +0200 Subject: [PATCH] make hidden base plane parts dashed --- src/Gui/ViewProviderPlane.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Gui/ViewProviderPlane.cpp b/src/Gui/ViewProviderPlane.cpp index 6a6d28dd0c..76fb611bd9 100644 --- a/src/Gui/ViewProviderPlane.cpp +++ b/src/Gui/ViewProviderPlane.cpp @@ -155,6 +155,7 @@ void ViewProviderPlane::attach(App::DocumentObject* pcObject) { ViewProviderGeometryObject::attach(pcObject); + SoSeparator *sep = new SoSeparator(); SoAnnotation *lineSep = new SoAnnotation(); SoDrawStyle* style = new SoDrawStyle(); @@ -163,18 +164,25 @@ void ViewProviderPlane::attach(App::DocumentObject* pcObject) SoMaterialBinding* matBinding = new SoMaterialBinding; matBinding->value = SoMaterialBinding::PER_FACE; + sep->addChild(style); + sep->addChild(matBinding); + sep->addChild(pMat); + sep->addChild(pCoords); + sep->addChild(pLines); + + style = new SoDrawStyle(); + style->lineWidth = 1.0f; + style->linePattern.setValue(0x00FF); lineSep->addChild(style); - lineSep->addChild(matBinding); - lineSep->addChild(pMat); - lineSep->addChild(pCoords); lineSep->addChild(pLines); - lineSep->addChild(pFont); - + lineSep->addChild(pFont); pText->string.setValue(SbString(pcObject->Label.getValue())); lineSep->addChild(pTranslation); lineSep->addChild(pText); + sep->addChild(lineSep); + - addDisplayMaskMode(lineSep, "Base"); + addDisplayMaskMode(sep, "Base"); } void ViewProviderPlane::updateData(const App::Property* prop)