From a3d63f1ba39c56c2b0236932965b9712654fad12 Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Wed, 26 Feb 2020 15:37:10 +0200 Subject: [PATCH] Remove edge visualization from solid objects when not highlighted gitlab #93 Change-Id: If76196f017db4ddd416541a0c57bf7b9018d2df6 --- .../src/org/simantics/opencascade/vtk/vtkSolidObject.java | 2 +- .../src/org/simantics/plant3d/scenegraph/GeometryComponent.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/org.simantics.opencascade.vtk/src/org/simantics/opencascade/vtk/vtkSolidObject.java b/org.simantics.opencascade.vtk/src/org/simantics/opencascade/vtk/vtkSolidObject.java index 2dc2416f..0979eb35 100644 --- a/org.simantics.opencascade.vtk/src/org/simantics/opencascade/vtk/vtkSolidObject.java +++ b/org.simantics.opencascade.vtk/src/org/simantics/opencascade/vtk/vtkSolidObject.java @@ -407,7 +407,7 @@ public class vtkSolidObject { vtkProperty prop = partEdgesActor.GetProperty(); prop.SetColor(0, 0, 0); - prop.SetLineWidth(2.0); + prop.SetLineWidth(1.0); prop.Delete(); partEdgesActor.SetMapper(partEdgesMapper); diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/GeometryComponent.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/GeometryComponent.java index c784b411..a25bd4ef 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/GeometryComponent.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/GeometryComponent.java @@ -258,6 +258,7 @@ public class GeometryComponent { if (hover) color = new double[]{1,0,1}; for (vtkProp3D prop : solidObject.getEdges()) { + prop.SetVisibility(hover ? 1 : 0); vtkProperty property = ((vtkActor)prop).GetProperty(); property.SetColor(color); property.Delete(); -- 2.47.1