Documentation

Solid

Solid element with geometry, inertia, and color

  • Library:
  • Body Elements

Description

The Solid block adds to the attached frame a solid element with geometry, inertia, and color. The solid element can be a simple rigid body or part of a compound rigid body—a group of rigidly connected solids, often separated in space through rigid transformations. Combine Solid and Rigid Transform blocks to model a compound rigid body.

Geometry parameters include shape and size. You can choose from a list of preset shapes or import a custom shape from an external file in STL or STEP format. By default, for all but STL-derived shapes, the block automatically computes the mass properties of the solid from the specified geometry and either mass or mass density. You can change this setting in the Inertia > Type block parameter.

A reference frame encodes the position and orientation of the solid. In the default configuration, the block provides only the reference frame. A frame-creation interface provides the means to define additional frames based on solid geometry features. You access this interface by selecting the Create button in the Frames expandable area.

Derived Properties

You can view the calculated values of the solid mass properties directly in the block dialog box. Setting the Inertia > Type parameter to Calculate from Geometry causes the block to expose a new node, Derived Values. Click the Update button provided under this node to calculate the mass properties and display their values in the fields below the button.

Derived Values Display

Visualization Pane

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.

Ports

Frame

expand all

Local reference frame of the solid. This frame is fixed with respect to the solid geometry. For the frame placement relative to a specific geometry see Shape. Connect this port to a frame entity—port, line, or junction—to resolve the placement of the reference frame in a model. For more information, see Working with Frames.

Parameters

expand all

Geometry

Shape parameterization to use. Select a preset shape such as Sphere or use the From File option to import an external STEP or STL geometry.

  • Cylinder — Cylindrical shape with geometry center coincident with the reference frame origin and symmetry axis coincident with the reference frame z axis.

  • Sphere — Spherical shape with geometry center coincident with the reference frame origin.

  • Brick — Prismatic shape with geometry center coincident with the reference frame origin and prismatic surfaces normal to the reference frame x, y, and z axes.

  • Ellipsoid — Three-dimensional extension of the ellipse with geometry center coincident with the reference frame origin and semi-principal axes coincident with the reference frame x, y, and z axes.

  • Regular Extrusion — Translational sweep of a regular polygon cross section with geometry center coincident with the reference frame origin and extrusion axis coincident with the reference frame z axis.

  • General Extrusion — Translational sweep of a general cross section with geometry center coincident with the [0 0] coordinate on the cross-sectional XY plane and extrusion axis coincident with the reference frame z axis.

  • Revolution — Rotational sweep of a general cross section with geometry center coincident with the [0 0] coordinate on the cross-sectional XZ plane and revolution axis coincident with the reference frame z axis.

  • From File — Imported custom shape with geometry center and orientation as defined in STL or STEP geometry file.

Distance between the axis of the cylinder and its surface.

Distance between the opposing ends of the cylinder.

Distance between the center of the sphere and its surface.

Lengths of the brick sides along the x-, y-, and z-axes of the solid reference frame. These lengths give, in no specific order, the width, thickness, and height of the brick.

Ellipsoid radii along the x, y, and z axes of the solid reference frame. The ellipsoid becomes a sphere if all radii are equal.

Number of sides of the extrusion cross-section. The cross-section is by definition a regular polygon—one whose sides are of equal lenth. The number specified must be greater than two.

Radius of the circle that fully inscribes the extrusion cross-section. The cross-section is by definition a regular polygon—one whose sides are of equal length.

Length by which to sweep the specified extrusion cross-section. The extrusion axis is the z-axis of the solid reference frame. The cross-section is swept by equal amounts in the positive and negative directions.

Cross-sectional shape specified as an [x,y] coordinate matrix, with each row corresponding to a point on the cross-sectional profile. The coordinates specified must define a closed loop with no self-intersecting segments.

The coordinates must be arranged such that from one point to the next the solid region always lies to the left. The block extrudes the cross-sectional shape specified along the z axis to obtain the extruded solid.

Length by which to sweep the specified extrusion cross-section. The extrusion axis is the z-axis of the solid reference frame. The cross-section is swept by equal amounts in the positive and negative directions.

Cross-sectional shape specified as an [x,z] coordinate matrix, with each row corresponding to a point on the cross-sectional profile. The coordinates specified must define a closed loop with no self-intersecting segments.

The coordinates must be arranged such that from one point to the next the solid region always lies to the left. The block revolves the cross-sectional shape specified about the reference frame z axis to obtain the revolved solid.

Type of revolution sweep to use. Use the default setting of Full to revolve the cross-sectional shape by the maximum 360 degrees. Select Custom to revolve the cross-sectional shape by a lesser angle.

Angle of the rotational sweep associated with the revolution.

Type of geometry file to import. Automatic inertia calculation is available for STEP files only. You must specify all inertial properties explicitly for STL files.

Name, path, and extension of the geometry file—e.g., ‘C:/Users/Jdoe/Documents/myShape.STEP’. File paths can be absolute or relative.

Unit of length to apply to the STL file. You can change the units to scale the dimensions of the imported geometry.

Inertia

Inertia parameterization to use. Select Point Mass to model a concentrated mass with negligible rotational inertia. Select Custom to model a distributed mass with the specified moments and products of inertia. The default setting, Calculate from Geometry, enables the block to automatically calculate the rotational inertia properties from the solid geometry and specified mass or mass density.

Parameter to use in inertia calculation. The block obtains the inertia tensor from the solid geometry and the parameter selected. Use Density if the material properties are known. Use Mass if the total solid mass if known.

Mass per unit volume of material. The mass density can take on a positive or negative value. Specify a negative mass density to model the effects of a void or cavity in a solid body.

Aggregate mass of the solid. The mass can be a positive or negative value. Specify a negative mass to model the aggregate effect of voids and cavities in a compound body.

[x y z] coordinates of the center of mass relative to the block reference frame. The center of mass coincides with the center of gravity in uniform gravitational fields only.

Three-element vector with the [Ixx Iyy Izz] moments of inertia specified relative to a frame with origin at the center of mass and axes parallel to the block reference frame. The moments of inertia are the diagonal elements of the inertia tensor

(IxxIyyIzz),

where:

  • Ixx=V(y2+z2)dm

  • Iyy=V(x2+z2)dm

  • Izz=V(x2+y2)dm

Three-element vector with the [Iyz Izx Ixy] products of inertia specified relative to a frame with origin at the center of mass and axes parallel to the block reference frame. The products of inertia are the off-diagonal elements of the inertia tensor

(IxyIzxIxyIyzIzxIyz),

where:

  • Iyz=Vyzdm

  • Izx=Vzxdm

  • Ixy=Vxydm

Display of the calculated values of the solid mass properties—mass, center of mass, moments of inertia, and products of inertia. Click the Update button to calculate and display the mass properties of the solid. Click this button following any changes to the block parameters to ensure that the displayed values are still current.

The center of mass is resolved in the local reference frame of the solid. The moments and products of inertia are each resolved in the inertia frame of resolution—a frame whose axes are parallel to those of the reference frame but whose origin coincides with the solid center of mass.

Dependencies

The option to calculate and display the mass properties is active when the Inertia > Type block parameter is set to Calculate from Geometry.

Graphic

Visualization setting for this solid. Use the default setting, From Geometry, to show the solid geometry. Select Marker to show a graphic marker such as a sphere or frame. Select None to disable visualization for this solid.

Geometrical shape of the graphic marker. Mechanics Explorer shows the marker using the selected shape.

Absolute size of the graphic marker in screen pixels. The marker size is invariant with zoom level.

Parameterization for specifying visual properties. Select Simple to specify color and opacity. Select Advanced to add specular highlights, ambient shadows, and self-illumination effects.

RGB color vector with red (R), green (G), and blue (B) color amounts specified on a 0–1 scale. A color picker provides an alternative interactive means of specifying a color. If you change the Visual Properties setting to Advanced, the color specified in this parameter becomes the Diffuse Color vector.

Graphic opacity specified on a scale of 0–1. An opacity of 0 corresponds to a completely transparent graphic and an opacity of 1 to a completely opaque graphic.

True color under direct white light specified as an [R,G,B] or [R,G,B,A] vector on a 0–1 scale. An optional fourth element specifies the color opacity also on a scale of 0–1. Omitting the opacity element is equivalent to specifying a value of 1.

Color of specular highlights specified as an [R,G,B] or [R,G,B,A] vector on a 0–1 scale. The optional fourth element specifies the color opacity. Omitting the opacity element is equivalent to specifying a value of 1.

Color of shadow areas in diffuse ambient light, specified as an [R,G,B] or [R,G,B,A] vector on a 0–1 scale. The optional fourth element specifies the color opacity. Omitting the opacity element is equivalent to specifying a value of 1.

Surface color due to self illumination, specified as an [R,G,B] or [R,G,B,A] vector on a 0–1 scale. The optional fourth element specifies the color opacity. Omitting the opacity element is equivalent to specifying a value of 1.

Sharpness of specular light reflections, specified as a scalar number on a 0–128 scale. Increase the shininess value for smaller but sharper highlights. Decrease the value for larger but smoother highlights.

Frames

Clear the check box to hide the reference frame port in the Solid block. Hiding the reference frame port suppresses the frame visualization in Mechanics Explorer. You must expose the reference frame port if the block has no custom frames.

Select the Create button to define a new frame using the frame-creation interface. Each new frame appears on a row above the New Frame parameter. To edit an existing frame, select the Edit button . To delete an existing frame, select the Delete button .

Frame Creation Interface

Frame identifier specified as a MATLAB string. This string identifies the frame port in the block diagram and in the tree view pane of Mechanics Explorer. Keep the frame name short to ensure it fits in the block icon width.

Select the location of the frame origin. Options include:

  • At Reference Frame Origin — Make the new frame origin coincident with the reference frame origin. This is the default option.

  • At Center of Mass — Make the new frame origin coincident with the solid center of mass. The reference frame origin is located at the center of mass in symmetrical shapes such as spheres and bricks but not in certain extrusions or revolutions.

  • Based on Geometric Feature — Place the new frame origin at the center of the selected geometry feature. Valid geometry features include surfaces, lines, and points. You must select a geometry feature from the visualization pane and then select the Use Selected Feature button. The name of the selected geometry feature appears in the field below this option.

Select the axis of the new frame that you want to set as the primary axis. The primary axis constrains the possible orientations of the remaining two axes. Specify the orientation of the primary axis by selecting from the following options:

  • Along Reference Frame Axis — Align the primary axis with the selected axis of the reference frame.

  • Along Principal Inertia Axis — Align the primary axis with the selected principal inertia axis. The principal inertia axes are those about which the products of inertia are zero.

  • Based on Geometric Feature — Align the primary axis with the vector associated with the selected geometric feature. Valid geometric features include surfaces and lines.

Select the axis of the new frame that you want to set as the secondary axis. The secondary axis is the projection of the selected direction onto the normal plane of the primary axis. Select the direction to project from the following options:

  • Along Reference Frame Axis — Project the selected reference frame axis onto the normal plane of the primary axis. Align the secondary axis with the projection.

  • Along Principal Inertia Axis — Project the selected principal inertia axis onto the normal plane of the primary axis. Align the secondary axis with the projection. The principal inertia axes are those about which the products of inertia are zero.

  • Based on Geometric Feature — Project the vector associated with the selected geometry feature onto the normal plane of the primary axis. Align the secondary axis with the projection. Valid geometry features include surfaces and lines. You must select a geometry feature from the visualization pane and then select the Use Selected Feature button.

Introduced in R2012a

Was this topic helpful?