On this page:
11.7.1  Inheritance diagram for Volume:
2021.11

11.7  Volume

Defines a volume object that mostly parallels Cubit’s RefVolume class. More...

#include <CubitInterfaceEx.hpp>

11.7.1  Inheritance diagram for Volume:

Public Member Functions

double 

volume ()

 

Get the volume of the Volume. More...

 

void 

color (int value)

 

Set the color of the Volume. More...

 

void 

set_color (int value)

 

Set the color of the Volume. More...

 

int 

color ()

 

Get the color of the Volume. More...

 

std::array< double, 9 > 

principal_axes ()

 

Get the principal axes of the Volume. More...

 

std::array< double, 3 > 

principal_moments ()

 

Get the principal moments of the Volume. More...

 

std::array< double, 3 > 

centroid ()

 

Get the centroid of the Volume. More...

 

 

Volume (const Volume &other)

 

 

Volume (CubitEntity *entity_ptr)

 

Detailed Description

Defines a volume object that mostly parallels Cubit’s RefVolume class. Member Function Documentation
centroid()

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

Get the centroid of the Volume.

std::array<double,3> centroid = volume->centroid();

centroid = volume.centroid()

Returns:
A vector (or list) of the coordinates of the centroid of the volume with the indices of the vector corresponding to the values as follows:
0 - x coordinate
1 - y coordinate
2 - z coordinate
color() [1/2]

 int color ( )

Get the color of the Volume.

int col = volume->color();

col = volume.color()

Returns:
The color value associated with the volume’s current color
color() [2/2]

 void color ( int  value)

Set the color of the Volume.

volume->color(0);

volume.color(0)

Parameters:

[in]

value

The color value that the volume will have


principal_axes()

 std::array<double,9> principal_axes ( )

Get the principal axes of the Volume.

std::array<double,9> axes = volume->principal_axes();

axes = volume.principal_axes()

Returns:
A vector (or list) of the principal axes of the volume with the indices of the vector corresponding to the values as follows:
0 - axis 1 x value
1 - axis 1 y value
2 - axis 1 z value
3 - axis 2 x value
4 - axis 2 y value
5 - axis 2 z value
6 - axis 3 x value
7 - axis 3 y value
8 - axis 3 z value
principal_moments()

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

Get the principal moments of the Volume.

std::array<double,3> moments = volume->principal_moments();

moments = volume.principal_moments()

Returns:
A vector (or list) of the principal moments of the volume with the indices of the vector corresponding to the values as follows:
0 - x moment
1 - y moment
2 - z moment
set_color()

 void set_color ( int  value)

Set the color of the Volume.

volume->set_color(0);

volume.set_color(0)

Parameters:

[in]

value

The color value that the volume will have


volume()

 double volume ( )

Get the volume of the Volume.

double vol = volume->volume();

vol = volume.volume()

Returns:
The volume of the Volume