Core: SoShapeScale fix weird scaling on viewport resize. See https://github.com/FreeCAD/FreeCAD/issues/18382#issuecomment-2527623758

This commit is contained in:
PaddleStroke
2024-12-09 14:25:36 +01:00
committed by wwmayer
parent 09be35359e
commit dbdbc9934e
10 changed files with 21 additions and 19 deletions

View File

@@ -255,7 +255,7 @@ ViewProviderPath::ViewProviderPath()
pArrow->set("zAxis.appearance.drawStyle", "style INVISIBLE");
pArrow->set("zHead.transform", "translation 0 0 0");
pArrowScale->setPart("shape", pArrow);
pArrowScale->scaleFactor = 1.0f;
pArrowScale->scaleFactor = 2.0f;
pArrowGroup->addChild(pArrowScale);
pcArrowSwitch->addChild(pArrowGroup);

View File

@@ -330,7 +330,7 @@ class HoldingTagMarker:
self.sphere = coin.SoSphere()
self.scale = coin.SoType.fromName("SoShapeScale").createInstance()
self.scale.setPart("shape", self.sphere)
self.scale.scaleFactor.setValue(7)
self.scale.scaleFactor.setValue(14)
self.material = coin.SoMaterial()
self.sep.addChild(self.pos)
self.sep.addChild(self.material)

View File

@@ -150,7 +150,7 @@ class ViewProvider:
self.sca = coin.SoType.fromName("SoShapeScale").createInstance()
self.sca.setPart("shape", self.axs)
self.sca.scaleFactor.setValue(1) # Keep or adjust if needed
self.sca.scaleFactor.setValue(2) # Keep or adjust if needed
self.mat = coin.SoMaterial()
# Set sphere color to bright yellow
@@ -161,7 +161,7 @@ class ViewProvider:
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(10) # Adjust this value as needed
self.scs.scaleFactor.setValue(20) # Adjust this value as needed
self.sep.addChild(self.sca)
self.sep.addChild(self.mat)