Cubit Python API  16.04
Public Member Functions
Body

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

Inheritance diagram for Body:
GeomEntity Entity

Public Member Functions

  Body ()
 
  Body (const Body &other)
 
  Body (CubitEntity *entity_ptr)
 
  ~Body ()
 
std::array< double, 3 >  get_mass_props ()
  Get the mass properties of the Body, specifically the center of gravity. More...
 
bool  is_sheet_body ()
  Get whether the Body is a sheet body or not. More...
 
int  point_containment (std::array< double, 3 > loc_in)
  Get whether a point is in, on, or outside the Body. More...
 
double  volume ()
  Get the volume of the Body. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Body() [1/3]

Body (   )  
inline

 

◆ Body() [2/3]

Body ( const Body other )  
inline

 

◆ ~Body()

~Body (   )  
inline

 

◆ Body() [3/3]

Body ( CubitEntity *  entity_ptr )  
inline

 

Member Function Documentation

◆ get_mass_props()

std::array<double,3> get_mass_props (   )  

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

std::array<double,3> props = body->get_mass_props();
props = body.get_mass_props()
Returns
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

◆ is_sheet_body()

bool is_sheet_body (   )  

Get whether the Body is a sheet body or not.

bool is_sheet = body->is_sheet_body();
is_sheet = body.is_sheet_body()
Returns
Whether the Body is a sheet body or not

◆ point_containment()

int point_containment ( std::array< double, 3 >  loc_in )  

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

std::array<double,3> point(3, 0);
int on_out_in = body->point_containment(point);
on_out_in = body.point_containment([0,0,0])
Returns
Whether a point is unknown (-1), outside (0), in (1), or on (2) the Body

◆ volume()

double volume (   )  

Get the volume of the Body.

double vol = body->volume();
vol = body.volume()
Returns
The volume of the Body