Body

Defines a body object that mostly parallels Cubit's Body class.

Inheritance

PyObservable
Entity
GeomEntity
Body

Class Member Functions

[ float ] get_mass_props Get the mass properties of the Body, specifically the center of gravity.
int point_containment Get whether a point is in, on, or outside the Body.
float volume Get the volume of the Body.
Bool is_sheet_body Get whether the Body is a sheet body or not.

Member Function Documentation


[ float ] get_mass_props()

Get the mass properties of the Body, specifically the center of gravity.

Example

 props = body.get_mass_props()

Return

A vector (or list) of numerical data corresponding to the center of gravity of the body with indices as follows: 0 - x coordinate 1 - y coordinate 2 - z coordinate


int point_containment(loc_in)

Get whether a point is in, on, or outside the Body.

Example

 on_out_in = body.point_containment([0,0,0])

Parameters

loc_in  

Return

Whether a point is unknown (-1), outside (0), in (1), or on (2) the Body


float volume()

Get the volume of the Body.

Example

 vol = body.volume()

Return

The volume of the Body


Bool is_sheet_body()

Get whether the Body is a sheet body or not.

Example

 is_sheet = body.is_sheet_body()

Return

Whether the Bodyis a sheet body or not