SolidMixin

Synopsis

This design contains all the rules and methods pertaining to a solid object, such as mass and moments of inertia. The design is mixed into all the solid designs .

Mixins

Parameters

Name Type Description
density number The density of the object. The units should be consistent with the units used for the dimension of the solid. For example, if the solid has a length in meters, then the density may be in kg/meter3. Note that density is single valued through the whole solid.
keep? boolean Determines whether this object survives destructive operations. Solids are sometimes 'consumed' when used in solid operations and become unavailable for subsequent use. Set keep? to True if the solid should be kept for other reasons - including use in other solid operations or to reference its rules that depend on the modeled result (e.g.. volume). Usually when keep? is set to True , you will want to set render? to False , so that the kept solid is not drawn.

Rules

Name Type Description
boundingBox list This is a list of two Points . The first point is the minimum x, y, and z coordinates of a box needed to enclose the solid part that is oriented in the world coordinate system. The second point is the maximum x, y, and z coordinates of the box.
centroid point Centroid point of the solid. If the density in the solid is constant through the part , this is also the center of mass.
mass number This is the mass of the part calculated as the volume*density.
massProperties list This lists all the mass properties in the following order, {volume, surfaceArea, centroid, moments}.
moments list This is a list of the moments of inertia in the local X, Y, and Z axes of the part .
surfaceArea number The surface area of the solid.
volume number Volume of the solid. Units are in the dimensional units of the solid.

Methods

closestApproach( p as Any ) As Number 
This method gets the smallest distance (closest approach) between this solid part and the object specified in p - a curve, surface, solid, plane, face, line, vertex, body, point , or ray.