Documentation

Mechanical Import

About Mechanical Import and CAD Translation

Simscape™ Multibody™ software features an importer that lets you automatically generate Simscape Multibody 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 Simscape Multibody 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 Simscape Multibody 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 Simscape Multibody software.

The Simscape Multibody Link utility is the necessary intermediary that lets you convert CAD assemblies into Simscape Multibody models. The intermediate step between CAD assembly and Simscape Multibody 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 Simscape Multibody 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 Simscape Multibody 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 Simscape Multibody Link utility and link it to your CAD platform. The Simscape Multibody Link utility requires MATLAB® only.

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

Setting Up Simscape Multibody Link Software.  To install and register Simscape Multibody Link, see Install Simscape Multibody Link Plug-In

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 Simscape Multibody products.

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

Essential CAD Translation Steps

Converting a CAD assembly to a Simscape Multibody model requires two major steps, exporting the CAD assembly into XML, then importing the XML to create a Simscape Multibody 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 Simscape Multibody importer. See the Simscape Multibody 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 Simscape Multibody 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 Simscape Multibody visualization, once you create your Simscape Multibody model.

See Referencing STL Body Geometry Files for Simscape Multibody Model Visualization.

Importing the XML and Generating a Model

To complete the CAD translation, you convert the Physical Modeling XML file into a Simscape Multibody model. See Generating New Models from Physical Modeling XML.

Importing a Physical Modeling XML File into a Model

Referencing STL Body Geometry Files for Simscape Multibody Model Visualization

Once you have imported the Physical Modeling XML to create a Simscape Multibody model, you can visualize the bodies in the model. The generated Simscape Multibody 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?