On this page:
11.6.1  Inheritance diagram for Body:
2022.4+26187-e1209cf7 Apr 14, 2022

11.6  Body

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

#include <CubitInterfaceEx.hpp>

11.6.1  Inheritance diagram for Body:

Public Member Functions

std::array< double, 3 > 

get_mass_props ()

 

Get the mass properties of the Body, specifically the center of gravity. 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...

 

bool 

is_sheet_body ()

 

Get whether the Body is a sheet body or not. More...

 

 

Body (const Body &other)

 

 

Body (CubitEntity *entity_ptr)

 

Detailed Description

Defines a body object that mostly parallels Cubit’s Body class. 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();

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