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.
If Mechanics Explorer fails to open during model update, check that Mechanics Explorer is set to open on model update:
In the Simulink® Editor menu bar, select Simulation > Model Configuration Parameters.
Expand the SimMechanics 2G node.
Verify that Open Mechanics Explorer on model update or simulation is selected.
By default, Mechanics Explorer displays a model with the Z axis
of the World frame pointing up. Using this convention, the default
[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.
To change the view convention of a model:
In the Mechanics Explorer toolbar, click the View Convention drop-down menu.
Select Y up (ZX Top).
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.
During CAD import, SimMechanics™ uses a set of geometry files in STEP or STL format to generate the 3-D surface geometry of each CAD part. If SimMechanics cannot load the geometry 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 geometry file.
If a part of an imported model appears invisible in Mechanics Explorer:
In Mechanics Explorer, identify the name of each invisible part.
In the block diagram, open the dialog boxes of the associated Solid blocks.
In the Geometry section, check that the name and location of the geometry 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 geometry files are valid.
To visualize a CAD assembly that you import, SimMechanics relies on a set of geometry files that specify the 3-D surface geometry of the CAD parts. Each geometry file specifies the surface geometry of one CAD part as a set of 2-D triangles. To do this, the geometry files contain:
[X Y Z] coordinates of the triangle vertices
[X Y Z] components of the normal vectors for the triangles.
If a geometry file specifies a normal vector with zero length, SimMechanics issues a warning. The geometry file fails to load.
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.