|On this page…|
You can import a CAD assembly into a SimMechanics™ model. To do this, you use the SimMechanics command smimport. In this example, you import the CAD assembly for a Stewart platform. All required files are provided with your SimMechanics installation.
To import the CAD assembly, you must have access to the SimMechanics Import XML and STL files for this assembly. Check that you have these files before proceeding.
Navigate to directory
Check that the following files exist.
|SimMechanics Import XML||One||Provides model structure and parameters|
|STL||Multiple||Provides part geometry|
If you have access to the import files, you can import the model. To do this, at the MATLAB® command line enter smimport('stewart_platform.xml'). SimMechanics automatically generates a Stewart platform model. This model replicates the original CAD assembly.
You can now simulate the model that you imported. On the Simulink® tool bar, click the Run button. Alternatively, press Ctrl+T. Mechanics Explorer opens with a dynamic display of your model.
By default, Mechanics Explorer uses a Z axis up view convention. This convention differs from that which most CAD platforms use—Y axis up. The different view conventions cause the Stewart platform to appear sideways in the visualization pane. To fix this issue, change the Mechanics Explorer view convention to Y axis up:
On the Mechanics Explorer tool bar, in the View Convention drop-down list, select Y Up (XY Front).
To refresh the visualization pane using the new view convention, on the Mechanics Explorer tool bar, click any standard view button, e.g., Isometric View.