SimMechanics™ supports most, but not all, CAD constraints. If you import a CAD assembly with a CAD constraint that SimMechanics does not support, SimMechanics issues a warning message and automatically replaces that constraint with a rigid connection.
The figure shows the imported model of a CAD assembly that contains an unsupported gear constraint. Because SimMechanics does not support that particular gear constraint, it replaces it with a frame line. The frame line represents a rigid connection.
The warning message identifies the blocks and ports that connect to the unsupported constraint. Use this information to identify the new rigid connection in the model. Then, determine if any combination of SimMechanics joint, gear, or constraint blocks adequately replaces the unsupported constraint. If so, replace that rigid connection. Run the simulation to check that the model behaves as you expect.
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 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.
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 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.
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.
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.