Search code examples
autodesk-forgeautodesk-viewerautodesk

Section plane/box gizmo is too big for oblong models in the viewer


Is there a simple way we can control how large the section box/plane gizmo is rendered in the viewer?

In some models, e.g for road infrastructure, the section plane/box is difficult to adjust because the gizmo is sized relative to the extent of the model. (Please see the attached image).

So when you zoom into a location in the model and add a section box/plane, the gizmo is not visible at all. You have to zoom out and show the whole model in order to see it. This is unfortunate because it makes it nearly impossible to adjust the section for the location at this zoom level.

Would it be possible to either:

  • Add a new viewer setting that makes the user able to choose between the current behavior or optionally size the gizmo in relation to the screen/viewer instead of model extent
  • Create a more sophisticated sizing algorithm that suites oblong models better

Section gizmo


Solution

  • Thank you for the heads up. Yes, scaling the section plane gizmo properly has been tricky, and apparently it still has ways to go. I'll report this to the engineering team. In the meantime, you should be able to tweak the scale of the gizmo by adjusting the clientScale value (a float, 1.0 by default) of the THREE.TransformControls object. You can find these in an overlay scene called gizmo.