Modify sphere handle glyph size in vtkjs vtkPolyLineWidget

Hi, I am looking for help modifying the size of the sphere handles in vtkjs’s polyline widget.

In this fiddle, I’d like to set the glyph size to something smaller but still in pixels. Setting defaultScale has no effect, but changing scaleInPixels does have an effect… Any idea how to change the glyph size?

Best,
Ryan

// ----------------------------------------------------------------------------
// Widget manager
// ----------------------------------------------------------------------------

const widgetManager = vtk.Widgets.Core.vtkWidgetManager.newInstance();
widgetManager.setRenderer(renderer);

const widget = vtk.Widgets.Widgets3D.vtkPolyLineWidget.newInstance();
widget.placeWidget(cone.getOutputData().getBounds());

const widgetRepr = widgetManager.addWidget(widget, 0, {scaleInPixels: true, defaultScale: 1});

renderer.resetCamera();
widgetManager.enablePicking();
widgetManager.grabFocus(widget);

Try this:

const state = widgetRepr.getWidgetState();
state.getMoveHandle().setScale1(5);

1 Like