question

JulieLin avatar image
0 Likes"
JulieLin asked Felix Möhlmann answered

Set Shape Factors by code

In my simulation, the robot needs to change the gripper appearance during runtime (specifically at Robot Joint6).

However, after changing the appearance, I also need to adjust the gripper's size and position accordingly using shape factors, as shown in the image.


How can I control this dynamically through code during the simulation?


1745459738048.png

1745460373065.png

FlexSim 24.0.8
flexscript codingshape factors
1745459738048.png (60.5 KiB)
1745460373065.png (56.7 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

You can access the nodes where the shape factor values are stored with offset_(object). The _ is meant as a placeholder for the various possible options here. Namely x, y, z, sx, sy, sz, rx, ry, rz. These access the position, size and rotation shape factor for the x, y and z axis respectively.

For example, setting the size offset along the x axis would look like this.

Object robot = ...;
offsetsx(robot).value = ...;
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.