This content is specific to Simscape™ Multibody™ First Generation software. First-generation features are slated to be deprecated and should be avoided.
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
The full CAD translation is composed of two distinct steps, with different requirements.
The first step is the export of the CAD assembly, which creates the Physical Modeling XML file and one or more STL file(s).
The second step is the import of the Physical Modeling XML file and generation of the Simscape Multibody model.
To export a CAD assembly into XML, you must first
Install your CAD platform or software application.
Install the Simscape Multibody Link utility and link it to your CAD platform. The Simscape Multibody Link utility requires MATLAB® only.
For CAD export, you do not need Simulink or Simscape Multibody software.
To import a Physical Modeling XML file and generate a model, you must have installed Simulink and the Simscape and Simscape Multibody products.
For XML import, you do not need a CAD platform or the Simscape Multibody Link utility.
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.
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
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.
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
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.