(std-massprop <ename> [<keystring>])
This function is used for getting the volume properties of a solid as with (command "MASSPROP") but silent. It is only available on ACIS enabled ACAD's (i.e. since R14).
ename must be a ACIS object, a region, 3dsolid or dependent custom object.
Without 2nd arg an association list of all properties and values is returned. With 2nd arg, which must be a valid key of the alist, only this value is returned. All the properties are evaluated in the WCS.
Attributes and their return types:
:volume
Volume as real number
:centroid
Centroid as 3d point
:mominertia
X, Y, and Z moments of inertia as 3d point
:prodinertia
X, Y, and Z products of inertia as 3d point
:prinmoments
X, Y, and Z principal moments as 3d point
:prinaxes
X, Y, and Z principal axes as list of three 3d points
:radiigyration
X, Y, and Z radii of gyration as 3d point
:extents
Minumum and maximum point of the bounding box as list of two 3d points
To get all valid supported keywords use (mapcar 'car (std-massprop (entlast)))
if the last entity is a valid solid. For R10-12 AME solids there's no workaround yet.
(setq e (car (entsel "3dsolid: ")))
;; print all keys
(print (setq m (std-massprop e)))
;; print single keys
(foreach key (mapcar 'car m) (print (std-massprop e key)))
ename: ename of an ACIS object (region, 3dsolid, or dependent custom object)
keystring: optional argument. must be one of these strings (case-insensitve match):
":volume", ":centroid", ":mominertia", ":prodinertia",
":prinmoments", ":prinaxes", ":radiigyration", ":extents"
Association list of all attributes, or a single value according the given keyword.
None. The ACIS modules are already loaded, so there's even no recognizable delay on invocation.
Defined in the external module ARXSTUFF, contained in stdlib<xx>.arx.