Can I use the VR Sink block to change the geometry of an object during a Simulink simulation?

1 view (last 30 days)
I would like to use the VR Sink block to change the shape of a solid object during a Simulink simulation. When I select the appropriate geometry field in the VR Sink block, the VR Sink block requests signal dimensions for a single point, not all the points that make up a surface. This can be seen by turning on the "Show Signal Dimensions" property in the Simulink model.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
It is not possible to modify the geometry of a Virtual Reality object in Simulink using the VR Sink block in Virtual Reality Toolbox 3.1 (R13.0.1+). The block does not support matrix signals for MFxxx fields. Simulink also requires signal dimensions to be constant, so the number of points in the geometry can not be varied during the simulation.
MFxxx fields are fully accessible from the MATLAB interface where variables can have varying dimensions between calls.
As a workaround, you can write a MATLAB file S-function that would construct the variable-dimension value for MFxxx field from the fixed-dimensions Simulink signal and call that S-function from the model. Note that MATLAB file S-Functions can not be used with Real-Time Workshop.

More Answers (0)

Categories

Find more on Block and Blockset Authoring in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!