Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Mechanical Import

About Mechanical Import and CAD Translation

SimMechanics™ software features an importer that lets you automatically generate SimMechanics models from an XML file in Physical Modeling format. This externally defined XML file specifies mechanical information — bodies, degrees of freedom, and geometry — in a form that the SimMechanics importer can use to construct a model representing that system.

The standard way to obtain such a Physical Modeling XML is to generate it by exporting a computer-aided aided (CAD) assembly. CAD tools allow you to model mechanical systems geometrically as collections of parts, or assemblies. You use Simulink® and SimMechanics block diagrams to represent control systems composed of mechanical devices and simulate their dynamics. The block diagram approach does not include full geometric information, nor do CAD assemblies typically incorporate controllers or allow you to perform dynamic simulations. With CAD translation, you can combine the power of CAD and SimMechanics software.

The SimMechanics Link utility is the necessary intermediary that lets you convert CAD assemblies into SimMechanics models. The intermediate step between CAD assembly and SimMechanics model is exporting an XML file in Physical Modeling format from the assembly. The export also automatically creates STL files containing body geometry information that you need for visualizing the bodies in the model.

The SimMechanics importer then converts this XML file into a mechanical model, which references the STL files to visualize the bodies.

Complete Translation of CAD Assembly Into a Visualizable Model

Requirements for CAD Export and Mechanical Import

The full CAD translation is composed of two distinct steps, with different requirements.

  1. The first step is the export of the CAD assembly, which creates the Physical Modeling XML file and one or more STL file(s).

  2. The second step is the import of the Physical Modeling XML file and generation of the SimMechanics model.

CAD Export Software Requirements

To export a CAD assembly into XML, you must first

  1. Install your CAD platform or software application.

  2. Install the SimMechanics Link utility and link it to your CAD platform. The SimMechanics Link utility requires MATLAB® only.

    Note:   For CAD export, you do not need Simulink or SimMechanics software.

Setting Up SimMechanics Link Software.  Learn more about and obtain the SimMechanics Link utility at the MathWorks Web site.

Physical Modeling XML Import Software Requirements

To import a Physical Modeling XML file and generate a model, you must have installed Simulink and the Simscape™ and SimMechanics products.

    Note:   For XML import, you do not need a CAD platform or the SimMechanics Link utility.

Essential CAD Translation Steps

Converting a CAD assembly to a SimMechanics model requires two major steps, exporting the CAD assembly into XML, then importing the XML to create a SimMechanics model.

Exporting an Assembly to XML

You export the assembly from the CAD platform into a Physical Modeling XML file that you can later use with the SimMechanics importer. See the SimMechanics Link documentation.

Exporting a CAD Assembly into a Physical Modeling XML File

Automatic Export of STL Files Representing CAD Part Geometries

When you export the CAD assembly into Physical Modeling XML, the SimMechanics Link exporter also automatically creates an STL body geometry file for each body represented as a CAD assembly part. You then need these STL files for SimMechanics visualization, once you create your SimMechanics model.

See Referencing STL Body Geometry Files for SimMechanics Model Visualization following.

Importing the XML and Generating a Model

To complete the CAD translation, you convert the Physical Modeling XML file into a SimMechanics model. See Generating New Models from Physical Modeling XML in this chapter.

Importing a Physical Modeling XML File into a Model

Referencing STL Body Geometry Files for SimMechanics Model Visualization

Once you have imported the Physical Modeling XML to create a SimMechanics model, you can visualize the bodies in the model. The generated SimMechanics model automatically references the necessary STL body geometry files, one for each body, to visualize the bodies with their original CAD assembly shapes.

Was this topic helpful?