Coreform Cubit 2024.3 User Documentation

Cubit Python API 2024.3
Body

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

#include <CubitInterfaceEx.hpp>

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.
 
bool is_sheet_body ()
  Get whether the Body is a sheet body or not.
 
int point_containment (std::array< double, 3 > loc_in)
  Get whether a point is in, on, or outside the Body.
 
double volume ()
  Get the volume of the Body.
 
- Public Member Functions inherited from GeomEntity
std::vector< Body > bodies ()
  Get the bodies in the GeomEntity.
 
std::vector< Curve > curves ()
  Get the curves in the GeomEntity.
 
int dimension ()
  Get the dimensions of the GeomEntity.
 
std::string entity_name ()
  Return the first name of the GeomEntity.
 
void entity_name (std::string name)
  Assign a name to the GeomEntity.
 
std::vector< std::string > entity_names ()
  Return the all the names of the GeomEntity.
 
bool is_meshed ()
  Return the current mesh state of the GeomEntity.
 
void mesh ()
  Mesh the GeomEntity.
 
int num_names ()
  Return the number of names for the GeomEntity.
 
void remove_entity_name (std::string name)
  Remove a specific name from the list of names assigned to the GeomEntity.
 
void remove_entity_names ()
  Remove all the names assigned to the GeomEntity.
 
void remove_mesh ()
  Removes the mesh on the GeomEntity.
 
void set_entity_name (std::string name)
  Assign a name to the GeomEntity.
 
void smooth ()
  Smooths the mesh on the GeomEntity.
 
std::vector< Surface > surfaces ()
  Get the surfaces in the GeomEntity.
 
std::vector< Vertex > vertices ()
  Get the vertices in the GeomEntity.
 
std::vector< Volume > volumes ()
  Get the volumes in the GeomEntity.
 
- Public Member Functions inherited from Entity
  Entity ()
 
  Entity (Coreform CubitEntity *entity_ptr)
 
  Entity (Entity const &copy_from)
 
  ~Entity ()
 
std::array< double, 6 > bounding_box ()
  Get the bounding box of the Entity.
 
std::array< double, 3 > center_point ()
  Get the center point of the Entity.
 
void destroy_Coreform Cubit_entity ()
 
Coreform CubitEntity * entity_ptr ()
 
int id ()
  Get the id of the Entity.
 
int is_transparent ()
  Get the tranparency state of the Entity.
 
void is_transparent (int transparency_flag)
  Set the tranparency state of the Entity.
 
int is_visible ()
  Get the visibility state of the Entity.
 
void is_visible (bool visibility_flag)
  Set the visibility state of the Entity.
 
Entity & operator= (const Entity &rhs)
 
void set_transparent (int transparency_flag)
  Set the tranparency state of the Entity.
 
void set_visible (bool visibility_flag)
  Set the visibility state of the Entity.
 

Additional Inherited Members

- Protected Member Functions inherited from GeomEntity
  GeomEntity (const GeomEntity &other)
 
  GeomEntity (Coreform CubitEntity *entity_ptr)
 
- Protected Attributes inherited from Entity
CubObserver * Coreform CubitWatcher
 
Coreform CubitEntity * mEntityPtr
 

Detailed Description

Defines a body object that mostly parallels Coreform 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 ();
std::array< double, 3 > get_mass_props()
Get the mass properties of the Body, specifically the center of gravity.
CubitInterface::Body body(int id_in)
Gets the body object from an ID.
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 ();
bool is_sheet_body()
Get whether the Body is a sheet body or not.
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);
int point_containment(std::array< double, 3 > loc_in)
Get whether a point is in, on, or outside the Body.
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 ();
double volume()
Get the volume of the Body.
vol = body .volume ()
Returns
The volume of the Body