Contenido principal

simscape.multibody.GeneralSolid Class

R2026b

Namespace: simscape.multibody
Superclasses: simscape.multibody.Component

Solid with specified geometry and inertia

Since R2026b

Description

Use an object of the simscape.multibody.GeneralSolid class to model a solid body with a specified geometry and inertia properties. The solid has a reference frame R that defines the origin and orientation for the geometry and inertia.

Class Attributes

Sealed
true
ConstructOnLoad
true

For information on class attributes, see Class Attributes.

Creation

Description

solid = simscape.multibody.GeneralSolid creates a solid with default property values.

solid = simscape.multibody.GeneralSolid(geometry,inertia) creates a solid with the specified geometry and inertia.

example

Properties

expand all

Inertia properties of the solid, specified as a simscape.multibody.GeneralInertia object.

The reference frame connector on this component, returned as the string R. Use this frame connector to connect this object to other components.

Methods

expand all

Examples

collapse all

This example shows how to create a solid with a cylinder geometry and specified inertia properties.

Create a cylinder geometry for the solid.

cyl = simscape.multibody.Cylinder(simscape.Value(0.02,"m"), ...
    simscape.Value(0.5,"m"));

Define the inertia properties of the solid. Specify a mass of 2.5 kg, a center of mass offset of [0.1 0 0] m from the reference frame origin, and moments of inertia of [0.04 0.05 0.06] kg*m^2.

inertia = simscape.multibody.GeneralInertia( ...
    simscape.Value(2.5,"kg"), ...
    simscape.Value([0.1 0 0],"m"), ...
    simscape.Value([0.04 0.05 0.06],"kg*m^2"), ...
    simscape.Value([0 0 0],"kg*m^2"));

Create a solid with the cylinder geometry and specified inertia.

solid = simscape.multibody.GeneralSolid(cyl,inertia)
solid =
  GeneralSolid with properties:

           Geometry: [1x1 simscape.multibody.Cylinder]
            Inertia: [1x1 simscape.multibody.GeneralInertia]
    FrameConnectors: "R"

Version History

Introduced in R2026b