diff --git a/src/Mod/CAM/Path/Main/Gui/Job.py b/src/Mod/CAM/Path/Main/Gui/Job.py index c2277e83e9..2c19d35973 100644 --- a/src/Mod/CAM/Path/Main/Gui/Job.py +++ b/src/Mod/CAM/Path/Main/Gui/Job.py @@ -127,48 +127,21 @@ class ViewProvider: # Setup the axis display at the origin self.switch = coin.SoSwitch() - self.sep = coin.SoSeparator() - self.axs = coin.SoType.fromName("SoAxisCrossKit").createInstance() + self.sep = coin.SoType.fromName("So3DAnnotation").createInstance() - # Adjust the axis heads if needed, the scale here is just for the head - self.axs.set("xHead.transform", "scaleFactor 1.5 1.5 1") - self.axs.set("yHead.transform", "scaleFactor 1.5 1.5 1") - self.axs.set("zHead.transform", "scaleFactor 1.5 1.5 1") + self.axs = coin.SoType.fromName("SoFCPlacementIndicatorKit").createInstance() + self.axs.axisLength.setValue(1.2) - # Adjust the axis heads if needed, the scale here is just for the head - self.axs.set("xHead.transform", "translation 50 0 0") - self.axs.set("yHead.transform", "translation 0 50 0") - self.axs.set("zHead.transform", "translation 0 0 50") + # enum values for SoFCPlacementIndicatorKit + AXES = 1 + LABELS = 4 + ARROWHEADS = 8 - # Adjust the axis line width if needed - self.axs.set("xAxis.transform", "scaleFactor 0.5 0.5 1") - self.axs.set("xAxis.appearance.drawStyle", "lineWidth 9") - self.axs.set("yAxis.transform", "scaleFactor 0.5 0.5 1") - self.axs.set("yAxis.appearance.drawStyle", "lineWidth 9") - self.axs.set("zAxis.transform", "scaleFactor 0.5 0.5 1") - self.axs.set("zAxis.appearance.drawStyle", "lineWidth 9") + self.axs.parts.setValue(AXES | LABELS | ARROWHEADS) - self.sca = coin.SoType.fromName("SoShapeScale").createInstance() - self.sca.setPart("shape", self.axs) - self.sca.scaleFactor.setValue(2) # Keep or adjust if needed - - self.mat = coin.SoMaterial() - # Set sphere color to bright yellow - self.mat.diffuseColor = coin.SbColor(1, 1, 0) - self.mat.transparency = 0.35 # Keep or adjust if needed - - self.sph = coin.SoSphere() - self.scs = coin.SoType.fromName("SoShapeScale").createInstance() - self.scs.setPart("shape", self.sph) - # Increase the scaleFactor to make the sphere larger - self.scs.scaleFactor.setValue(20) # Adjust this value as needed - - self.sep.addChild(self.sca) - self.sep.addChild(self.mat) - self.sep.addChild(self.scs) + self.sep.addChild(self.axs) self.switch.addChild(self.sep) - self.switch.addChild(self.sep) vobj.RootNode.addChild(self.switch) self.showOriginAxis(True) diff --git a/src/Mod/CAM/Path/Main/Stock.py b/src/Mod/CAM/Path/Main/Stock.py index 939512abeb..afbb5236ce 100644 --- a/src/Mod/CAM/Path/Main/Stock.py +++ b/src/Mod/CAM/Path/Main/Stock.py @@ -341,6 +341,7 @@ def SetupStockObject(obj, stockType): PathIconViewProvider.ViewProvider(obj.ViewObject, "Stock") obj.ViewObject.Transparency = 90 + obj.ViewObject.PointSize = 5 obj.ViewObject.DisplayMode = "Wireframe"