dos_massprops - dalefugier/DOSLib GitHub Wiki

Returns the mass properties of a 3-D solid entity.

Syntax

(dos_massprops entity)

Parameters

entity

The entity name of a 3-D solid object.

Returns

A list of strings describing the file's details if successful. The information returned is as follows:

Value Description
volume The volume of the solid.
centroid A list containing the centroid of the solid.
momInertia A list containing the X, Y, and Z moments of inertia of the solid.
prodInertia A list containing the X, Y, and Z products of inertia of the solid.
prinMoments A list containing the X, Y, and Z principal moments of the solid.
prinAxes A list containing the X, Y, and Z principal axes of the solid.
radiiGyration A list containing the X, Y, and Z radii of gyration of the solid.
extents A list containing the extents (bounding box) of the solid.

nil if not successful or on error.

Example

Command: (dos_massprops (car (entsel "\nSelect a solid:")))
(29.7069 (8.38222 3.97879 2.0) (640.888 2273.47 2597.49) (990.758 236.395 498.02) (51.7765 67.3905 39.9486) ((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0)) (4.64475 8.74815 9.35079) ((6.70725 2.87031 0.0) (10.0572 5.08728 4.0)))