Cubit Python API  16.06
Public Member Functions
Curve

Defines a curve object that mostly parallels Cubit's RefEdge class. More...

Inheritance diagram for Curve:
GeomEntity Entity

Public Member Functions

  Curve ()
 
  Curve (const Curve &other)
 
  Curve (CubitEntity *entity_ptr)
 
  ~Curve ()
 
std::array< double, 3 >  closest_point (std::array< double, 3 > point)
  Get the curvature of the Curve at a particular point. More...
 
std::array< double, 3 >  closest_point_trimmed (std::array< double, 3 > point)
  Get the curvature of the Curve at a particular point. More...
 
int  color ()
  Get the color of the Curve. More...
 
void  color (int value)
  Set the color of the Curve. More...
 
std::array< double, 3 >  curvature (std::array< double, 3 > point)
  Get the curvature of the Curve at a particular point. More...
 
std::array< double, 3 >  curve_center ()
  Get the center point of the Curve. More...
 
double  end_param ()
  Get the highest value of the Curve in uv space. More...
 
double  fraction_from_arc_length (Vertex root_vertex, double length)
  Get the fraction along the Curve a specified arc length is away from a given Vertex. More...
 
bool  is_periodic ()
  Get whether the Curve is periodic or not. More...
 
double  length ()
  Get the length of the Curve. More...
 
double  length_from_u (double parameter1, double parameter2)
  Get the length between two specified parameters on a Curve. More...
 
std::array< double, 3 >  point_from_arc_length (double root_param, double arc_length)
  Get the position on a Curve that is a specified arc length away from the specified root parameter. More...
 
std::array< double, 3 >  position_from_fraction (double fraction_along_curve)
  Get the position of the point a specified fraction along the Curve. More...
 
std::array< double, 3 >  position_from_u (double u_value)
  Get the position of a particular u value for the Curve. More...
 
void  set_color (int value)
  Set the color of the Curve. More...
 
double  start_param ()
  Get the lowest value of the Curve in uv space. More...
 
std::array< double, 3 >  tangent (std::array< double, 3 > point)
  Get the tangent to the Curve at a particular point. More...
 
double  u_from_arc_length (double root_param, double arc_length)
  Get the u value for a point a specified arc length away from a specified root parameter on the Curve. More...
 
double  u_from_position (std::array< double, 3 > position)
  Get the u value of a particular position on the Curve. More...
 
- Public Member Functions inherited from GeomEntity
std::vector< Body bodies ()
  Get the bodies in the GeomEntity. More...
 
std::vector< Curve curves ()
  Get the curves in the GeomEntity. More...
 
int  dimension ()
  Get the dimensions of the GeomEntity. More...
 
std::string  entity_name ()
  Return the first name of the GeomEntity. More...
 
void  entity_name (std::string name)
  Assign a name to the GeomEntity. More...
 
std::vector< std::string >  entity_names ()
  Return the all the names of the GeomEntity. More...
 
bool  is_meshed ()
  Return the current mesh state of the GeomEntity. More...
 
void  mesh ()
  Mesh the GeomEntity. More...
 
int  num_names ()
  Return the number of names for the GeomEntity. More...
 
void  remove_entity_name (std::string name)
  Remove a specific name from the list of names assigned to the GeomEntity. More...
 
void  remove_entity_names ()
  Remove all the names assigned to the GeomEntity. More...
 
void  remove_mesh ()
  Removes the mesh on the GeomEntity. More...
 
void  set_entity_name (std::string name)
  Assign a name to the GeomEntity. More...
 
void  smooth ()
  Smooths the mesh on the GeomEntity. More...
 
std::vector< Surface surfaces ()
  Get the surfaces in the GeomEntity. More...
 
std::vector< Vertex vertices ()
  Get the vertices in the GeomEntity. More...
 
std::vector< Volume volumes ()
  Get the volumes in the GeomEntity. More...
 
- Public Member Functions inherited from Entity
  Entity ()
 
  Entity (CubitEntity *entity_ptr)
 
  Entity (Entity const &copy_from)
 
  ~Entity ()
 
std::array< double, 6 >  bounding_box ()
  Get the bounding box of the Entity. More...
 
std::array< double, 3 >  center_point ()
  Get the center point of the Entity. More...
 
void  destroy_cubit_entity ()
 
CubitEntity *  entity_ptr ()
 
int  id ()
  Get the id of the Entity. More...
 
int  is_transparent ()
  Get the tranparency state of the Entity. More...
 
void  is_transparent (int transparency_flag)
  Set the tranparency state of the Entity. More...
 
int  is_visible ()
  Get the visibility state of the Entity. More...
 
void  is_visible (bool visibility_flag)
  Set the visibility state of the Entity. More...
 
Entity operator= (const Entity &rhs)
 
void  set_transparent (int transparency_flag)
  Set the tranparency state of the Entity. More...
 
void  set_visible (bool visibility_flag)
  Set the visibility state of the Entity. More...
 

Additional Inherited Members

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

Detailed Description

Defines a curve object that mostly parallels Cubit's RefEdge class.

Constructor & Destructor Documentation

◆ Curve() [1/3]

Curve ( )
inline

◆ ~Curve()

~Curve ( )
inline

◆ Curve() [2/3]

Curve ( const Curve other )
inline

◆ Curve() [3/3]

Curve ( CubitEntity *  entity_ptr )
inline

Member Function Documentation

◆ closest_point()

std::array<double,3> closest_point ( std::array< double, 3 >  point )

Get the curvature of the Curve at a particular point.

std::vector<double> point(3, 0);
std::vector<double> close = curve ->closest_point (point);
close = curve .closest_point ([0,0,0])
Parameters
[in] point A vector containing 3 doubles representing coordinates of a location on the Curve
Returns
The closest point to the Curve from the location specified

◆ closest_point_trimmed()

std::array<double,3> closest_point_trimmed ( std::array< double, 3 >  point )

Get the curvature of the Curve at a particular point.

std::vector<double> point(3, 0);
std::vector<double> close = curve ->closest_point (point);
close = curve .closest_point ([0,0,0])
Parameters
[in] point A vector containing 3 doubles representing coordinates of a location on the Curve
Returns
The closest point to the Curve from the location specified

◆ color() [1/2]

int color ( )

Get the color of the Curve .

int col = curve ->color ();
col = curve .color ()
Returns
The color value associated with the curve's current color

◆ color() [2/2]

void color ( int  value )

Set the color of the Curve .

curve ->color (0);
curve .color (0)
Parameters
[in] value The color value that the curve will have

◆ curvature()

std::array<double,3> curvature ( std::array< double, 3 >  point )

Get the curvature of the Curve at a particular point.

std::vector<double> point(3, 0);
std::vector<double> curvature = curve ->curvature (point);
curvature = curve .curvature ([0,0,0])
Parameters
[in] point A vector containing 3 doubles representing coordinates of a location on the Curve
Returns
The curvature of the Curve at the location specified

◆ curve_center()

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

Get the center point of the Curve .

std::array<double,3> center = curve ->curve_center ();
center = curve .curve_center ()
Returns
A vector containing the coordinates of the Curve's center according to the following:
0 - x coordinate
1 - y coordinate
2 - z coordinate

◆ end_param()

double end_param ( )

Get the highest value of the Curve in uv space.

double end = curve ->end_param ();
end = curve .end_param ()
Returns
The ending value of the parameter

◆ fraction_from_arc_length()

double fraction_from_arc_length ( Vertex  root_vertex,
double  length 
)

Get the fraction along the Curve a specified arc length is away from a given Vertex .

double fraction = curve ->fraction_from_arc_length (vertex , 0.5);
fraction = curve .fraction_from_arc_length (vertex , 0.5)
Parameters
[in] root_vertex The Vertex to start from (vertex object)
[in] length The length along the Curve away from the root Vertex
Returns
The fraction of the Curve that is the specified length away from the specified Vertex

◆ is_periodic()

bool is_periodic ( )

Get whether the Curve is periodic or not.

bool periodic = curve ->is_periodic ();
periodic = curve .is_periodic ()
Returns
Whether the Curve is periodic or not

◆ length()

double length ( )

Get the length of the Curve .

double len = curve ->length ();
len = curve .length ()
Returns
The length of the Curve

◆ length_from_u()

double length_from_u ( double  parameter1,
double  parameter2 
)

Get the length between two specified parameters on a Curve .

doublelength = curve ->length_from_u (0, 0.5);
Parameters
[in] parameter1 The beginning parameter
[in] parameter2 The ending parameter
Returns
The length between the two specified paramters along the Curve

◆ point_from_arc_length()

std::array<double,3> point_from_arc_length ( double  root_param,
double  arc_length 
)

Get the position on a Curve that is a specified arc length away from the specified root parameter.

std::vector<double> position = curve ->point_from_arc_length (0, 0.5);
position = curve .point_from_arc_length (0, 0.5)
Parameters
[in] root_param The root parameter from which the arc length is added to
[in] arc_length The arc length along the Curve away from the root parameter
Returns
A vector that contains the coordinates of a position a specified arc length away from the root parameter

◆ position_from_fraction()

std::array<double,3> position_from_fraction ( double  fraction_along_curve )

Get the position of the point a specified fraction along the Curve .

std::array<double,3> pos = curve ->position_from_fraction (0.5);
Parameters
[in] fraction_along_curve A decimal value between 0 and 1 to determine a particular position along the Curve
Returns
A vector containing the coordinates of the position a specified fraction along the Curve:
0 - x coordinate
1 - y coordinate
2 - z coordinate

◆ position_from_u()

std::array<double,3> position_from_u ( double  u_value )

Get the position of a particular u value for the Curve .

std::vector<double> position = curve ->position_from_u (0.5);
position = curve .position_from_u (0.5)
Parameters
[in] u_value The u value of the position along the Curve
Returns
A vector containing the coordinates of the output position

◆ set_color()

void set_color ( int  value )

Set the color of the Curve .

Parameters
[in] value The color value that the curve will have

◆ start_param()

double start_param ( )

Get the lowest value of the Curve in uv space.

double start = curve ->start_param ();
start = curve .start_param ()
Returns
The beginning value of the parameter

◆ tangent()

std::array<double,3> tangent ( std::array< double, 3 >  point )

Get the tangent to the Curve at a particular point.

std::vector<double> point(3, 0);
std::vector<double> tan = curve ->tangent (point);
tan = curve .tangent ([0,0,0])
Parameters
[in] point A vector containing 3 doubles representing coordinates of a location on the Curve
Returns
The tangent to the Curve at the location specified

◆ u_from_arc_length()

double u_from_arc_length ( double  root_param,
double  arc_length 
)

Get the u value for a point a specified arc length away from a specified root parameter on the Curve .

double u = curve ->u_from_arc_length (0, 0.5);
u = curve .u_from_arc_length (0, 0.5)
Parameters
[in] root_param The beginning parameter from which the arc length is added to
[in] arc_length The length away from the root parameter of the output parameter
Returns
The u value of the Curve the arc length away from the root parameter

◆ u_from_position()

double u_from_position ( std::array< double, 3 >  position )

Get the u value of a particular position on the Curve .

std::vector<double> point(3, 0);
double u = curve ->u_from_position (point);
u = curve .u_from_position ([0,0,0])
Parameters
[in] position A vector containing the coordinates of the input position
Returns
The u value of the position along the Curve