File Solid
Libraries:
Simscape /
Multibody /
Body Elements
Description
The File Solid block models a solid element with geometry, inertia, color, and reference frame derived from an external file. The file must be of a part model, which is to say that it contains at least solid geometry data. Some formats may provide color and inertia data, though such properties can be specified manually if need be.
The File Solid block can read geometries created by various CAD software, as shown in the table.
Supported Software and File Formats
CAD Software | Release Supported |
---|---|
ACIS | Up to 2019 |
Autodesk Inventor | Up to 2020 |
CATIA V4 | Up to 4.2.5 |
CATIA V5 | Up to V5-6 R2019(R29) |
CATIA V6 | Up to V5-6 R2019(R29) |
Creo-Pro/E | Pro/Engineer 19.0 to Creo 6.0 |
IGES | 5.1, 5.2, and 5.3 |
JT | Up to v10.6 |
NX | V11.0 to NX 12.0, and 1953 |
Parasolid | Up to v33 |
Revit | 2015 to 2021 |
Rhino3D | 4, 5, and 6 |
Solid Edge | V19 - 20, ST - ST10, 2021 |
SolidWorks | 97 to 2021 |
STEP | AP 203 E1/E2, AP 214, and AP 242 |
STL | All Versions |
Note
CAD drawing and assembly files, which do not contain the necessary data for a solid element, cannot be imported to the block.
Inertia Calculations
For part model files with density data, the block gives the option to
(automatically) set the mass, center of mass, and inertia tensor of the solid from
calculation. This behavior is enabled by default (through the
Type and Based On parameters under the
Inertia node, which, in their original states, will read
Calculate from Geometry
and Density from
File
).
If the imported file does not contain density data, you must specify it (or,
equivalently, mass) for the calculations to be made. Set the Based
On parameter to Custom Density
or
Custom Mass
to enter the missing data.
Alternatively, if you have the complete mass properties of the imported part—often
provided, for CAD models, by the CAD application itself—you can enter them directly
as block parameters. Set the inertia Type parameter to
Custom
in order to do this.
Note that the frame in which the moments and products of inertia are defined will vary among CAD applications. In this block, the origin of that frame is assumed to be at the center of mass (and its axes parallel to those of the reference frame). This frame is referred to here as the inertia resolution frame. (The center of mass, on the other hand, is defined in the reference frame.) For more information, see Specifying Custom Inertias.
If the mass properties are computed from geometry, you can view their values
in the block dialog box. To do so, expand the Derived
Values node under Inertia and click
Update. (This feature, as it is specified to computed
properties, requires that the inertia Type setting be
Calculated from Geometry
.) If a geometry or
inertia block parameter changes, click the Update button
once again to display the new mass properties. All values are in SI units of
length (m
) and mass (kg
).
Solid Visualization
The block dialog box contains a collapsible visualization pane. This pane provides instant visual feedback on the solid you are modeling. Use it to find and fix any issues with the shape and color of the solid. You can examine the solid from different perspectives by selecting a standard view or by rotating, panning, and zooming the solid.
Select the Update Visualization button to view the latest changes to the solid geometry
in the visualization pane. Select Apply or
OK to commit your changes to the solid. Closing the block
dialog box without first selecting Apply or
OK causes the block to discard those changes.
Solid Visualization Pane
Right-click the visualization pane to access the visualization context-sensitive menu. This menu provides additional options so that you can change the background color, split the visualization pane into multiple tiles, and modify the view convention from the default +Z up (XY Top) setting.
Connection Frames
Like most components, the solid connects through frames, of which it has at least one. The default frame, which serves as its reference and is associated with port R, gets its origin and axes from the data in the imported file. (The origin is generally the zero coordinate of the CAD model or, if such technology is used, the 3-D scan, contained in the file.)
For those cases in which the reference frame is ill-placed for connection, or in which multiple connection frames are needed, the block comes with a frame creation tool. Treat this tool as an interactive alternative to the Rigid Transform block (the latter a numerical means to add and translate as well as rotate frames, though one that keeps the frames separate from the solid).
You can create (and edit) frames using geometry features as constraints—placing the frame origin on, and orienting the frame axes along, selected vertices, edges, and faces. You can also use the reference frame origin and its axes, as well as the center of mass and the principal inertia axes, to define the new frames. Each frame adds to the block a new frame port (its label derived from the name given in the frame creation pane).
To create or edit a frame, first expand the Frames node in
the block dialog box. Click the button to create a frame or the
button to edit a frame (if one, other than the
reference frame, already exists). The frame definitions depend on a mix of geometry
and inertia data, so you must have previously imported a part geometry file. If a
block parameter changes, you must refresh the visualization pane (by clicking the
button) in order to create or edit a
frame.
A custom frame is fully defined when its origin and axes are too. Of these, the axes require the most care. You must specify two axes, one primary and one secondary. The primary axis defines the plane (that normal to it) on which the other axes must lie. The secondary axis is merely the projection of a selected direction—axis or geometry feature—on that plane.
The remaining (and unspecified) axis is set by requiring that all three be perpendicular and ordered according to the right-hand rule. Naturally, the secondary axis must have a vector component perpendicular to the primary axis. If the two are parallel, the frame is invalid. If the frame is then saved, its orientation is set to that of the reference frame.
To use a geometry feature for the frame origin or axis definitions:
In the frame creation pane, select the Based on Geometric Feature radio button.
In the solid visualization pane, click a vertex, edge, or face. Zoom in, if necessary, to more precisely select a feature.
Again in the frame creation pane, click the Use Selected Feature button.
MATLAB Variables
It is common in a model to parameterize blocks in terms of MATLAB variables. Instead of a scalar, vector, or string, for example, a block parameter will have in its field the name of a variable. The variable is defined elsewhere, often in a subsystem mask or in the model workspace, sometimes by reference to an external M file.
This approach suits complex models in which multiple blocks must share the same parameter value—a common density, say, or color, if defined as an RGB vector. When the MATLAB variable definition then changes, so do all block parameters that depend on it. Consider using MATLAB variables here if a parameter is likely to be shared by several blocks in a large model.
(For a simple example with solid blocks parameterized in terms of workspace
variables, open the sm_compound_body
model)
Exporting Geometry Properties
The File Solid block can generate a convex hull geometry representation of an imported CAD file in the Simscape Multibody environment. This geometric data can be used to model spatial contact forces.
As shown in the figure, the convex hull geometry is an approximation of the true geometry. Note that the block calculates the physical properties, such as mass and inertia, based on its true geometry.
Simple Part
Ports
Frame
Geometry
Parameters
Extended Capabilities
Version History
Introduced in R2018b