stoune
(Oussama Eddahri)
June 2, 2023, 8:13am
1
Hi,
I’m trying to make an mesh actor (a line) thicker in my scene, but every time I use the setScale(2 * currentScale[0], currentScale[1], currentScale[2])
it changes its position in the scene,
Is there a way to make my actor or my polydata thicker?
finetjul
(Julien Finet)
June 2, 2023, 8:23am
2
Have you tried the following:
const origin = actor.getOrigin();
actor.setScale(...);
actor.setOrigin(origin);
stoune
(Oussama Eddahri)
June 2, 2023, 8:30am
3
Julien Finet:
actor.setOrig
Yes, I tried setOrigin, and setPosition as well but It changes the position (I have two actors in my scene)
stoune
(Oussama Eddahri)
June 2, 2023, 8:38am
4
Here is a codeSandbox to show you the problem,
busy-mountain-bg19kb by stounej using @emotion/react, @emotion/styled, @kitware/vtk.js, @mui/material, loader-utils, react, react-dom, react-scripts
finetjul
(Julien Finet)
June 2, 2023, 8:48am
5
You actually have to compensate for the scaling in your origin. It’s a “matrix” math thingy…
stoune
(Oussama Eddahri)
June 2, 2023, 9:07am
6
I’ve managed to make the line actor thicker using:
actor.getProperty().setLineWidth(scale)