Find and Fix Visualization Issues

Mechanics Explorer Not Opening

By default, Mechanics Explorer is set to open the first time you update a model. If a Mechanics Explorer window is already open for your model, the open window updates the model display. Note, however, that updating a model does not automatically bring the Mechanics Explorer window to the front. If the Mechanics Explorer window is hidden during model update, you must bring that window to the front to see the updated model.

Set Mechanics Explorer to Open on Model Update

If Mechanics Explorer fails to open during model update, check that Mechanics Explorer is set to open on model update:

  1. In the Simulink® Editor menu bar, select Simulation > Model Configuration Parameters.

  2. Expand the SimMechanics 2G node.

  3. Click Explorer.

  4. Verify that Open Mechanics Explorer on model update or simulation is selected.

Model Showing Sideways in Mechanics Explorer

By default, Mechanics Explorer displays a model with the Z axis of the World frame pointing up. Using this convention, the default gravity vector [0 0 -9.81] m/s^2 points down, a direction that is practical for most applications. However, this convention differs from that which CAD platforms commonly use, Y axis up, causing Mechanics Explorer to display some models sideways. If this happens, you can manually change the view convention to that used in the original CAD assembly. The figure shows the default Mechanics Explorer display of an imported robot arm model.

Change View Convention

To change the view convention of a model:

  1. In the Mechanics Explorer toolbar, click the View Convention drop-down menu.

  2. Select Y up (ZX Top).

  3. Refresh the Mechanics Explorer display by selecting a view point from the Mechanics Explorer tool bar.

Mechanics Explorer displays the model using the new view convention.

Parts Not Showing in Mechanics Explorer

During CAD import, SimMechanics™ uses a set of stereolithographic (STL) files to generate the 3-D surface geometry of each CAD part. If SimMechanics cannot load the STL file for a part, that part appears invisible in Mechanics Explorer. This issue does not affect model update or simulation.

The figure shows the Mechanics Explorer display of an imported model containing an invalid STL file.

Correct Visualization Issue

If a part of an imported model appears invisible in Mechanics Explorer:

  1. In Mechanics Explorer, identify the name of each invisible part.

  2. In the block diagram, open the dialog boxes of the associated Solid blocks.

  3. In the Geometry section, check that the name and location of the STL files are correct.

    If either is incorrect, enter the correct information and update the model. Check that Mechanics Explorer displays the invisible part. If not, check if the STL files are valid.

STL File Issues

To visualize a CAD assembly that you import, SimMechanics relies on a set of STL files that specify the 3-D surface geometry of the CAD parts. Each STL file specifies the surface geometry of one CAD part as a set of 2-D triangles. To do this, the STL files contain:

  • [X Y Z] coordinates of the triangle vertices

  • [X Y Z] components of the normal vectors for the triangles.

If an STL file specifies a normal vector with zero length, SimMechanics issues a warning. The STL file fails to load.

Colored Parts Showing Gray in Mechanics Explorer

To import the color of a CAD part into SimMechanics, the color must be specified at the part level. Colors specified at the feature level, such as individually colored surfaces, or assembly level do not carry over into SimMechanics. This can cause parts to appear gray—the default solid color in SimMechanics—during model visualization. To correct this issue, you must modify the CAD part file directly to ensure that it contains a single color applied to the entire part.

Was this topic helpful?