Skip to Main Content Skip to Search
Product Documentation

Translating a CAD Part into a Body

Locating the Single-Part Assembly Files

In this example, you export an assembly with one part and no constraints. Look for the following two example CAD files in the SimMechanics Link demos folder:

Although it has only one part, you must export the full assembly into XML, not just the cup part.

Viewing the CAD Assembly

Open the cup assembly file in your CAD platform and check its geometry and mass properties.

Cup Assembly in a CAD Platform

PropertyValue
Volume0.0001 cubic meters (m3)
Surface area0.0381 square meters (m2)
Density3.0 grams/cm3 = 3000 kg/m3
Mass0.2906 kilograms (kg)
Principal moments of inertia at
the center of gravity
Ix = 0.00015, Iy = 0.00067,
Iz = 0.00067 kg-m2

The inertia tensor is computed at the center of gravity, with the coordinate axes aligned with assembly base-origin axes, indicated in the preceding figure, Cup Assembly in a CAD Platform. The x-axis is the cup's axis of symmetry, and the y- and z-axes point across the cup.

Exporting the CAD Assembly

Using the SimMechanics Link interface to your CAD platform, export the assembly into Physical Modeling XML format. The XML file cup_assembly.xml appears in your working CAD folder.

Generating the SimMechanics Model

To import the Physical Modeling XML with the SimMechanics importer:

  1. Move or copy the exported XML file into a MATLAB working folder to generate a SimMechanics model from the file.

  2. Generate the model from cup_assembly.xml with the mech_import command.

Once you generate the SimMechanics model, it has six blocks, a combination representing the entire assembly:

   Machine Environment – Root Ground – Weld – Root Part – Weld – Cup

Deleting the Root Part and one of the Welds does not physically change the model, as long as you reconnect the remaining blocks.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS