Main Content

simscape.multibody.Solid class

Package: simscape.multibody
Superclasses: simscape.multibody.Component

Construct rigid solid

Description

Use an object of the simscape.multibody.Solid class to construct a rigid solid. Solid objects model the physical parts of a multibody system, such as hinges or shafts. By default, each Solid object has a reference frame that has a corresponding connector called R.

To specify a Solid object, use the Geometry, Inertia, and VisualProperties properties. The geometry and inertia of a solid are relative to the reference frame of the Solid object.

Class Attributes

Sealed
true
ConstructOnLoad
true
RestrictsSubclassing
true

For information on class attributes, see Class Attributes.

Creation

Description

solid = simscape.multibody.Solid constructs a solid with default values.

solid = simscape.multibody.Solid(geometry) constructs a solid with the specified geometry.

solid = simscape.multibody.Solid(geometry,inertia) constructs a solid with the specified geometry and inertia.

solid = simscape.multibody.Solid(geometry,visualProperties) constructs a solid with the specified geometry and visual properties.

solid = simscape.multibody.Solid(geometry,inertia,visualProperties) constructs a solid with the specified geometry, inertia, and visual properties.

Properties

expand all

Geometry of the solid, specified as an object of a subclass of the simscape.multibody.Geometry class.

Example: simscape.multibody.Sphere

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Mass distribution of the solid, specified as an object of a subclass of the simscape.multibody.Inertia class.

Example: simscape.multibody.MassDistribution

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Visual properties of the solid, specified as an object of a subclass of the simscape.multibody.VisualProperties class.

Example: simscape.multibody.AdvancedVisualProperties

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Methods

expand all

Examples

collapse all

The example shows how to create a solid that has a radius of 10 cm, a mass of 1 kg, and red color.

  1. Use a simscape.multibody.Sphere object to create a spherical geometry with radius of 10 cm.

    geom = simscape.multibody.Sphere(simscape.Value(10,"cm"));
  2. Use a simscape.multibody.UniformMass object to create a uniform mass distribution with a total mass of 1 kg.

    inert = simscape.multibody.UniformMass(simscape.Value(1,'kg'));
  3. Use a simscape.multibody.SimpleVisualProperties object to create a visual property with red color.

    visProps = simscape.multibody.SimpleVisualProperties([1 0 0]);
  4. Use a simscape.multibody.Solid object to create a spherical solid that has a radius of 10 cm, a mass of 1 kg, and red color.

    solid = simscape.multibody.Solid(geom,inert,visProps);

Version History

Introduced in R2022a