11.3 CubitInterface Namespace Reference
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
| |
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
|
|
| |
| |
| |
| |
|
|
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
|
|
| |
| |
| |
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
|
|
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
|
|
| |
| |
| |
| |
|
|
| |
|
|
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
|
|
| |
|
|
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
|
|
| |
|
|
| |
|
|
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
|
|
| |
| |
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
|
|
| |
| |
|
|
| |
|
|
| |
| |
| |
|
|
| |
|
|
| |
|
|
| |
The CubitInterface provides a Python/C++ interface into Cubit.
It provides an object oriented structure that allows a developer to manipulate objects familiar to Cubit such as bodies, volumes, surfaces, etc. It also allows developers to create and manipulate as well as query geometry.
Function Documentation
add_entities_to_group()
void CubitInterface::add_entities_to_group ( int group_id, const std::vector< int > & entity_id, const std::string & entity_type )
CubitInterface::add_entities_to_group(3, list, "surface"); |
cubit.add_entities_to_group(3, list, "surface") |
|
|
|
|
|
|
void CubitInterface::add_entity_to_group ( int group_id, int entity_id, const std::string & entity_type )
CubitInterface::add_entity_to_group(3, 22, "surface"); |
cubit.add_entity_to_group(3, 22, "surface") |
|
|
|
|
|
|
add_filename_to_recent_file_list()
void CubitInterface::add_filename_to_recent_file_list ( std::string & filename)
/brief Adds the filename to the recent file list. /param filename to be added to the recent file list.
body()
CubitInterface::Body CubitInterface::body ( int id_in)
Gets the body object from an ID.
|
|
Returns:
The body object
brick()
Body CubitInterface::brick ( double width, double depth = -1, double height = -1 )
Creates a brick of specified width, depth, and height.
|
|
|
|
|
|
|
|
|
Returns:
A Body object of the newly created brick
calculate_timestep_estimate()
double CubitInterface::calculate_timestep_estimate ( std::string entity_type, std::vector< int > entity_ids )
double cubit.calculate_timestep_estimate("volume", vol_list) |
|
|
|
|
Returns:
time step estimate (smallest time step)
calculate_timestep_estimate_with_props()
double CubitInterface::calculate_timestep_estimate_with_props ( std::string entity_type, std::vector< int > entity_id_list, double density, double youngs_modulus, double poissons_ratio )
double cubit.calculate_timestep_estimate_with_props("volume", vol_list, 2.7, 70, 0.35 ) |
|
|
|
|
|
|
|
|
|
|
Returns:
time step estimate (smallest time step)
cmd()
bool CubitInterface::cmd ( const char * input_string)
Pass a command string into Cubit.
CubitInterface::cmd("create brick x 10"); |
cubit.cmd("brick x 10") |
|
|
int CubitInterface::collapse_edges ( std::vector< int > edge_ids, std::string quality_name = "Scaled Jacobian" )
returns the number of tris collapsed. Specifing a quality metric is optional. Supported ones are: "Scaled Jacobian" "Aspect Ratio" "Shape"
Default is "Scaled Jacobian".
edges_to_collapse = [ 15, 19, 24, 88 ] |
cubit.collapse_edges( edges_to_collapse, "Shape" ) |
void CubitInterface::compare_geometry_and_mesh ( std::vector< int > volume_ids, std::vector< int > block_ids, std::vector< int > hex_ids, std::vector< int > tet_ids, double tolerance, int & returned_unmatched_volumes_count, int & returned_unmatched_elements_count, std::vector< int > & returned_full_matches_group_ids_list, std::vector< int > & returned_partial_matches_group_ids_list, int & returned_volume_curves_group_id )
/brief Compare the geometry and mesh
complete_filename()
void CubitInterface::complete_filename ( std::string & line, int & num_chars, bool & found_quote )
Get the file completion inside a quote based on files in the current directory. This handles completion of directories as well as filtering on specific types (.jou, .g, .sat, etc.)
|
|
bool CubitInterface::contains_virtual ( const std::string & geometry_type, int entity_id )
if (CubitInterface::contains_virtual("surface", 134)) . . . |
if cubit.contains_virtual("surface", 134)): |
|
|
|
|
bool CubitInterface::convection_is_on_shell_area ( int entity_id, CI_BCEntityTypes shell_area_enum )
Determine whether a BC convection is on a shell top or bottom. Valid for convection.
/param entity_id Id of the BC convection /param shell_area enum of BCEntityTypes. Use 7 to check if on top, 8 to check if on bottom /return true if convection is on the shell area, otherwise false
convection_is_on_solid()
bool CubitInterface::convection_is_on_solid ( int entity_id)
Determine whether a BC convection is on a solid. Valid for convection.
/param entity_id Id of the BC convection /return true if convection is on a solid, otherwise false
copy_body()
Body CubitInterface::copy_body ( Body init_body)
Creates a copy of the input Body.
|
|
|
Returns:
A Body identical to the input Body
create_arc_curve()
Curve CubitInterface::create_arc_curve ( Vertex v0, Vertex v1, std::array< double, 3 > intermediate_point )
Creates a arc curve using end vertices and an intermediate point.
|
|
|
|
|
|
|
|
|
Returns:
A Curve object
create_bspline_surface()
int CubitInterface::create_bspline_surface ( int degree_u, bool rational_u, int form_u, int pole_u, int num_ctrlpts_u, int degree_v, bool rational_v, int form_v, int pole_v, int num_ctrlpts_v, std::vector< double > ctrlpts, std::vector< double > weights, double point_tol, std::vector< double > knots_u, std::vector< double > knots_v, double knot_tol )
// Create a degree 2 bspline surface |
std::vector<double> pts = { 0.0, 0.0, 0.0, |
5.0, 2.0, 0.0, |
10.0, 0.0, 0.0, |
0.0, 0.0, 5.0, |
5.0, -2.0, 5.0, |
10.0, 0.0, 5.0, |
0.0, 0.0, 10.0, |
5.0, 2.0, 10.0, |
10.0, 0.0, 10.0 }; |
|
std::vector<double> weights = {1.0, 0.5, 1.0, 1.0, 1.0, 0.5, 0.2, 1.0, 0.1}; |
std::vector<double> knots_u = {0.0, 0.0, 0.0, 1.0, 1.0, 1.0}; |
std::vector<double> knots_v = {0.0, 0.0, 0.0, 1.0, 1.0, 1.0}; |
int degree_u = 2; |
int degree_v = 2; |
bool rational_u = true; |
bool rational_v = true; |
int form_u = 0; |
int form_v = 0; |
int pole_u = 0; |
int pole_v = 0; |
int num_ctrl_pts_u = 3; |
int num_ctrl_pts_v = 3; |
int point_tol = 0.01; |
int knot_tol = 0.01; |
|
int surf_id = CubitInterface::create_bspline_surface( |
degree_u, rational_u, form_u, pole_u, num_ctrl_pts_u, |
degree_v, rational_v, form_v, pole_v, num_ctrl_pts_v, |
pts, weights, point_tol, knots_u, knots_v, knot_tol ); |
# Create a degree 2 bspline surface |
pts = [] |
pts.extend([0.0, 0.0, 0.0]) |
pts.extend([5.0, 2.0, 0.0]) |
pts.extend([10.0, 0.0, 0.0]) |
pts.extend([0.0, 0.0, 5.0]) |
pts.extend([5.0, -2.0, 5.0]) |
pts.extend([10.0, 0.0, 5.0]) |
pts.extend([0.0, 0.0, 10.0]) |
pts.extend([5.0, 2.0, 10.0]) |
pts.extend([10.0, 0.0, 10.0]) |
|
weights = [1.0, 0.5, 1.0, 1.0, 1.0, 0.5, 0.2, 1.0, 0.1] |
knots_u = [0.0, 0.0, 0.0, 1.0, 1.0, 1.0] |
knots_v = [0.0, 0.0, 0.0, 1.0, 1.0, 1.0] |
degree_u = 2 |
degree_v = 2 |
rational_u = True |
rational_v = True |
form_u = 0 |
form_v = 0 |
pole_u = 0 |
pole_v = 0 |
num_ctl_pts_u = 3 |
num_ctl_pts_v = 3 |
point_tol = 0.01 |
knot_tol = 0.01 |
|
surf_id = cubit.create_bspline_surface(degree_u, rational_u, form_u, pole_u, num_ctl_pts_u, \ |
degree_v, rational_u, form_u, pole_u, num_ctl_pts_v, pts, weights, point_tol, knots_u, knots_v, knot_tol) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Curve CubitInterface::create_curve ( Vertex v0, Vertex v1 )
Creates a curve between two vertices.
|
|
|
|
|
|
Returns:
A Curve object
create_new_group()
int CubitInterface::create_new_group ( )
Create a new group.
Returns:
group_id ID of new group
create_nurbs_curve()
int CubitInterface::create_nurbs_curve ( int degree, const std::vector< double > & ctrl_pts, const std::vector< double > & weights, const std::vector< double > & knot_vec )
// Create a degree 2 NURBS curve |
std::vector<double> pts = { 0.0, 2.0, 0.0, |
1.0, 1.0, 0.0, |
-1.0, 0.0, 0.0, |
0.0, -1.0, 0.0}; |
|
std::vector<double> weights = {1.0, 0.5, 1.0, 1.0}; |
std::vector<double> knot_vec = {0.0, 0.0, 0.5, 1.0, 1.0}; |
|
int curve_id = CubitInterface::create_nurbs_curve(2, pts, weights, knot_vec); |
# Create a degree 2 NURBS curve |
pts = [] |
pts.extend([ 0.0, 2.0, 0.0]) |
pts.extend([ 1.0, 1.0, 0.0]) |
pts.extend([-1.0, 0.0, 0.0]) |
pts.extend([ 0.0, -1.0, 0.0]) |
|
weights = [1.0, 0.5, 1.0, 1.0] |
knot_vec = [0.0, 0.0, 0.5, 1.0, 1.0] |
|
curve_id = cubit.create_nurbs_curve(2, pts, weights, knot_vec) |
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
The ID of the newly created curve. If curve creation was unsuccessful, returns -1.
create_spline()
Curve CubitInterface::create_spline ( std::vector< std::array< double, 3 > > points, int surface_id )
create spline through the given 3d points
|
|
|
|
|
|
Returns:
the created curve object
create_surface()
Body CubitInterface::create_surface ( std::vector< Curve > curves)
Creates a surface from boundary curves.
|
|
|
Returns:
A Body object of the newly created Surface
create_vertex()
Vertex CubitInterface::create_vertex ( double x = 0, double y = 0, double z = 0 )
Creates a vertex at a x,y,z.
|
|
|
|
|
|
|
|
|
Returns:
A Vertex object
curve()
CubitInterface::Curve CubitInterface::curve ( int id_in)
Gets the curve object from an ID.
|
|
Returns:
The curve object
cylinder()
Body CubitInterface::cylinder ( double height, double x_radius, double y_radius, double top_radius )
creates a cylinder of the specified dimensions
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
A body object of the newly created cylinder
delete_group()
void CubitInterface::delete_group ( int group_id)
Delete a specific group.
|
|
developer_commands_are_enabled()
bool CubitInterface::developer_commands_are_enabled ( )
This checks to see whether developer commands are enabled.
Returns:
True if developer commands are enabled, otherwise False
enable_signal_handling()
void CubitInterface::enable_signal_handling ( bool on)
initialize/uninitialize signal handling C++ only
|
|
bool CubitInterface::entity_exists ( const std::string & entity_type, int id )
bool exists = CubitInterface::entity_exists("surface", 12); |
|
|
|
|
Returns:
true of false whether entity exists
estimate_curve_mesh_size()
double CubitInterface::estimate_curve_mesh_size ( int curve_id, double percent_capture )
Return estimated mesh size for a curve such that the sum of edge lengths are within a precentage of the curve length.
|
|
Returns:
The length of one mesh edge, or -1 on error.
estimate_curves_mesh_size()
double CubitInterface::estimate_curves_mesh_size ( const std::string & geometry_type, const std::vector< int > & geom_id, double percent_capture )
Return estimated mesh size for curves related to an entity such that the sum of edge lengths are within a precentage of the curve length. The smallest size for all curves is returned.
|
|
Returns:
The length of one mesh edge, or -1 on error.
estimate_morph_num_procs()
int CubitInterface::estimate_morph_num_procs ( const std::vector< int > & volume_ids, double size )
Return recommended numprocs to run morph on this model at the specified size.
|
|
Returns:
The recommended number of procs to use for morph
estimate_morph_tet_element_count()
size_t CubitInterface::estimate_morph_tet_element_count ( const std::vector< int > & volume_ids, double size, bool keep_void )
Return estimated tet element count for volumes.
|
|
Returns:
The estimated number of tet elements morph will generate
evaluate_exterior_angle()
std::vector<int> CubitInterface::evaluate_exterior_angle ( const std::vector< int > & curve_list, const double test_angle )
find all curves in the given list with an exterior angle (the angle between surfaces) less than the test angle. This is equivalent to the df parser "exterior_angle" test. (draw curve with exterior_angle >90)
|
|
|
|
Returns:
A list (python tuple) of curve ids that meet the angle test.
evaluate_exterior_angle_at_curve()
double CubitInterface::evaluate_exterior_angle_at_curve ( int curve_id, int volume_id )
return exterior angle at a single curve with respect to a volume
|
|
Returns:
angle in degrees
evaluate_surface_angle_at_vertex()
double CubitInterface::evaluate_surface_angle_at_vertex ( int surf_id, int vert_id )
return interior angle at a vertex on a specified surface
|
|
Returns:
angle in degrees
exodus_sizing_function_file_exists()
bool CubitInterface::exodus_sizing_function_file_exists ( )
return whether the exodus sizing funnction file exists
Returns:
whether the exodus sizing function file exists
gather_surfaces_by_orientation()
std::vector<int> CubitInterface::gather_surfaces_by_orientation ( std::vector< int > seed_surf_ids, std::vector< int > all_surf_ids )
returns the number of tris collapsed. Specifing a quality metric is optional. Supported ones are: "Scaled Jacobian" "Aspect Ratio" "Shape"
Default is "Scaled Jacobian".
tris_to_collapse = [ 15, 19, 24, 88 ] |
cubit.collapse_tris( tris_to_collapse, "Shape" ) |
|
int collapse_tris(std::vector<int> tri_ids, std::string quality_name = "Scaled Jacobian"); |
|
/brief |
Collapses each specified tet by finding the best two nodes to merge. If |
the collapse operation degrades the quality of surrounding elements to worse |
than it was before, no collapse is performed. Calls the 'collapse tet <id>' command. |
On free mesh, it tries to collapse nodes on a flatter part of the mesh, thereby |
preserving freatures on the skin of the free mesh. |
returns the number of tet collapsed. |
Specifing a quality metric is optional. Supported ones are: |
"Altitude" |
"Aspect Ratio" |
"Aspect Ratio Gam" |
"Distortion" |
"Jacobian" |
"Normalized Inradius" |
"Scaled Jacobian" |
"Shape" |
"Timestep" |
Default is "Scaled Jacobian". |
\code |
tets_to_collapse = [ 15, 19, 24, 88 ] |
cubit.collapse_tets( tets_to_collapse, "Shape" ) |
|
int collapse_tets(std::vector<int> tet_ids, std::string quality_name = "Scaled Jacobian"); |
|
|
/brief |
Gathers connected surfaces to those in 'seed_surf_ids' that |
use common curves in an opposite sense. For example, if a surface A |
in 'seed_surf_ids' uses a curve in the FORWARD sense and it can find |
surface, B, that uses that same curve in a REVERSED sense, it adds B |
to the list. The search continues with all of surface B's curves. |
All the surfaces in 'seed_surf_ids' will be returned. If the user |
wants to limit the scope of possible surfaces that are searched, |
'all_surf_ids' can be populated. If 'all_surf_ids' is empty, all |
surfaces are candidates. |
This function can be helpful in finding enclosures when you have a set |
of non-manifold surfaces. |
\code |
seed_surf_ids = [ 15, 19, 24, 88 ] |
all_surf_ids = [ 15, 19, 24, 88, 26, 104, 44, 23, 95, 342, 533, 23, ... ] |
orientation_surfs = cubit.gather_surfaces_by_orientation( seed_surf_ids, all_surf_ids ) |
std::string CubitInterface::get_acceleration_combine_type ( int entity_id)
Get the acceleration’s combine type which is "Overwrite", "Average", "SmallestCombine", or "LargestCombine".
/param entity_id Id of the acceleration /return The combine type for the given acceleration
get_acceleration_dof_signs()
const int* CubitInterface::get_acceleration_dof_signs ( int entity_id)
This function only available from C++ Get the acceleration’s dof signs
/param entity_id Id of the acceleration /return An array of ints which are the dof signs
get_acceleration_dof_values()
const double* CubitInterface::get_acceleration_dof_values ( int entity_id)
This function only available from C++ Get the acceleration’s dof values
/param entity_id Id of the acceleration /return An array of doubles which are the dof values
get_acis_version()
std::string CubitInterface::get_acis_version ( )
Get the Acis version number.
Returns:
A string containing the Acis version number
get_acis_version_as_int()
int CubitInterface::get_acis_version_as_int ( )
Get the Acis version number as an int.
Returns:
An integer containing the Acis version number
get_adjacent_surfaces()
std::vector<int> CubitInterface::get_adjacent_surfaces ( const std::string & geometry_type, int entity_id )
Get a list of adjacent surfaces to a specified entity.
std::vector<int> surface_id_list; |
surface_id_list = CubitInterface::get_adjacent_surfaces("curve", 22); |
surface_id_list = cubit.get_adjacent_surfaces("curve", 22) |
|
|
|
|
Returns:
A list (python tuple) of surfaces ids
get_adjacent_volumes()
std::vector<int> CubitInterface::get_adjacent_volumes ( const std::string & geometry_type, int entity_id )
Get a list of adjacent volumes to a specified entity.
std::vector<int> volume_id_list; |
volume_id_list = CubitInterface::get_adjacent_volumes("curve", 22); |
volume_id_list = cubit.get_adjacent_volumes("curve", 22) |
|
|
|
|
Returns:
A list (python tuple) of volume ids
get_all_exodus_times()
std::vector<double> CubitInterface::get_all_exodus_times ( const std::string & filename)
Open an exodus file and get a vector of all stored time stamps.
|
|
Returns:
List (python tuple) of time stamps in the exodus file
get_all_exodus_variable_names()
std::vector<std::string> CubitInterface::get_all_exodus_variable_names ( const std::string & filename, const std::string & variable_type )
Open an exodus file and get a list of all stored variable names.
|
|
|
|
Returns:
List (python tuple) of variable names in the exodus file
get_all_geometric_owners()
std::vector<std::string> CubitInterface::get_all_geometric_owners ( std::string mesh_entity_type, std::string mesh_entity_list )
std::vector<std::string> owner_list; |
owner_list = CubitInterface::get_all_geometric_owners("quad", id_list); |
owner_list = cubit.get_all_geometric_owners("quad", id_list) |
|
|
|
|
Returns:
A list (python tuple) of geometry owners in the form of ’surface x’, ’curve y’, etc.
get_aprepro_numeric_value()
double CubitInterface::get_aprepro_numeric_value ( std::string variable_name)
get the value of the given aprepro variable
Returns:
value as double on failure returns CUBIT_DBL_MAX
get_aprepro_value()
bool CubitInterface::get_aprepro_value ( std::string variable_name, int & returned_variable_type, double & returned_double_val, std::string & returned_string_val )
Get the value of an aprepro variable.
|
|
|
|
|
|
|
|
Returns:
1 = success, 0 = failure (no such variable name)
get_aprepro_value_as_string()
std::string CubitInterface::get_aprepro_value_as_string ( std::string variable_name)
Gets the string value of an aprepro variable.
/param var_name aprepro variable name /return The string value of the aprepro variable name
get_aprepro_vars()
std::vector<std::string> CubitInterface::get_aprepro_vars ( )
Gets the current aprepro variable names.
/return A list (python tuple) of the current aprepro variable names
get_arc_length()
double CubitInterface::get_arc_length ( int curve_id)
Get the arc length of a specified curve.
|
|
Returns:
Arc length of the curve
get_assembly_classification_category()
std::string CubitInterface::get_assembly_classification_category ( )
Get Classification Category for metadata.
Returns:
Requested data
get_assembly_classification_level()
std::string CubitInterface::get_assembly_classification_level ( )
Get Classification Level for metadata.
Returns:
Requested data
get_assembly_description()
std::string CubitInterface::get_assembly_description ( int assembly_id)
Get the stored description of an assembly node.
|
|
Returns:
Description of the assembly node
get_assembly_file_format()
std::string CubitInterface::get_assembly_file_format ( int assembly_id)
Get the stored file format of an assembly node.
|
|
Returns:
File Format of the assembly node
get_assembly_instance()
int CubitInterface::get_assembly_instance ( int assembly_id)
Get the stored instance number of an assembly node.
|
|
Returns:
Instance of the assembly node
get_assembly_level()
int CubitInterface::get_assembly_level ( int assembly_id)
Get the stored level of an assembly node.
|
|
Returns:
Level of the assembly node - Level == 0 == Root
get_assembly_material_description()
std::string CubitInterface::get_assembly_material_description ( int assembly_id)
Get the stored material description of an assembly part.
|
|
Returns:
Material Description of the assembly part
get_assembly_material_specification()
std::string CubitInterface::get_assembly_material_specification ( int assembly_id)
Get the stored material specification of an assembly part.
|
|
Returns:
Material Specification of the assembly part
get_assembly_metadata()
std::string CubitInterface::get_assembly_metadata ( int volume_id, int data_type )
Get metadata for a specified volume id.
|
|
|
|
Returns:
Requested data
get_assembly_name()
std::string CubitInterface::get_assembly_name ( int assembly_id)
Get the stored name of an assembly node.
|
|
Returns:
Name of the assembly node
get_assembly_path()
std::string CubitInterface::get_assembly_path ( int assembly_id)
Get the stored path of an assembly node.
|
|
Returns:
Path of the assembly node
get_assembly_type()
std::string CubitInterface::get_assembly_type ( int assembly_id)
Get the stored type of an assembly node.
|
|
Returns:
Type of the assembly node – ’part’ or ’assembly’
get_assembly_units()
std::string CubitInterface::get_assembly_units ( int assembly_id)
Get the stored units measure of an assembly node.
|
|
Returns:
Units of the assembly node
get_assembly_weapons_category()
std::string CubitInterface::get_assembly_weapons_category ( )
Get Weapons Category for metadata.
Returns:
Requested data
get_auto_size()
double CubitInterface::get_auto_size ( const std::string & geometry_type, std::vector< int > entity_id_list, double size )
Get the auto size for a given set of enitities. Note, this does not actually set the interval size on the volumes. It simply returns the size that would be set if an ’size auto factor n’ command were issued.
|
|
|
|
|
|
Returns:
The interval size from the AutoSizeTool
get_bad_geometry()
void CubitInterface::get_bad_geometry ( std::vector< int > target_volume_ids, std::vector< int > & returned_body_list, std::vector< int > & returned_volume_list, std::vector< int > & returned_surface_list, std::vector< int > & returned_curve_list )
This function only works from C++ Get the list of bad geometry for a list of volumes
Bad geometry can be any number of problems associated with poorly defined ACIS geometry.
|
|
|
|
|
|
|
|
|
|
std::vector<int> CubitInterface::get_bc_id_list ( CI_BCTypes bc_type_enum)
Get a list of all bcs of a specified type.
|
|
Returns:
List (python tuple) of all active bc ids
get_bc_name()
std::string CubitInterface::get_bc_name ( CI_BCTypes bc_type_enum, int bc_id )
Get the name for the specified bc.
|
|
|
|
Returns:
The bc name
get_bc_temperature()
double CubitInterface::get_bc_temperature ( CI_BCTypes bc_type_enum, int entity_id, CI_BCEntityTypes temp_type_enum )
Get the temperature. Valid for convection, temperature.
/param bc_type enum of CI_BCTypes. temperature = 4, convection = 7 /param entity_id Id of the BC convection /param temp_type enum of CI_BCEntityTypes (normal, shell top, shell bottom). For convection, 2 if on solid, 7 if on top, 8 if on bottom. For temperature, 3 if on solid, 7 for top, 8 for bottom, 9 for gradient, 10 for middle /return The value of the specified BC temperature
get_blend_surfaces()
std::vector<int> CubitInterface::get_blend_surfaces ( std::vector< int > target_volume_ids)
Get the list of blend surfaces for a list of volumes.
|
|
Returns:
List (python tuple) of blend surface ids
get_block_attribute_count()
int CubitInterface::get_block_attribute_count ( int block_id)
Get the number of attributes in a block.
|
|
Returns:
Number of attributes in the block
get_block_attribute_name()
std::string CubitInterface::get_block_attribute_name ( int block_id, int attribute_index )
Get a specific block attribute name.
|
|
|
|
Returns:
Attribute name as a std::string
get_block_attribute_value()
double CubitInterface::get_block_attribute_value ( int block_id, int attribute_index )
Get a specific block attribute value.
|
|
|
|
Returns:
List of attributes
get_block_children()
void CubitInterface::get_block_children ( int block_id, std::vector< int > & returned_group_list, std::vector< int > & returned_node_list, std::vector< int > & returned_sphere_list, std::vector< int > & returned_edge_list, std::vector< int > & returned_tri_list, std::vector< int > & returned_face_list, std::vector< int > & returned_pyramid_list, std::vector< int > & returned_tet_list, std::vector< int > & returned_hex_list, std::vector< int > & returned_wedge_list, std::vector< int > & returned_volume_list, std::vector< int > & returned_surface_list, std::vector< int > & returned_curve_list, std::vector< int > & returned_vertex_list )
Get lists of any and all possible children of a block.
A block can contain a variety of entity types. This routine will return all contents of a specified block.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int get_block_count ( )
Get the current number of blocks.
Returns:
The number of blocks in the current model, if any
get_block_curves()
std::vector<int> CubitInterface::get_block_curves ( int block_id)
Get a list of curve associated with a specific block.
|
|
Returns:
A list (python tuple) of curve ids contained in the block
get_block_edges()
std::vector<int> CubitInterface::get_block_edges ( int block_id)
Get a list of edges associated with a specific block.
|
|
Returns:
A list (python tuple) of edge ids contained in the block
get_block_element_attribute_count()
int CubitInterface::get_block_element_attribute_count ( int block_id)
Get the number of attributes in a block element.
|
|
Returns:
Number of attributes in the block element
get_block_element_attribute_names()
std::vector< std::string > CubitInterface::get_block_element_attribute_names ( int block_id)
Get a specific block element attribute name.
|
|
|
|
Returns:
Attribute name as a std::string
get_block_element_type()
std::string CubitInterface::get_block_element_type ( int block_id)
Get the element type of a block.
|
|
Returns:
Element type
get_block_elements_and_nodes()
bool CubitInterface::get_block_elements_and_nodes ( int block_id, std::vector< int > & returned_node_list, std::vector< int > & returned_sphere_list, std::vector< int > & returned_edge_list, std::vector< int > & returned_tri_list, std::vector< int > & returned_face_list, std::vector< int > & returned_pyramid_list, std::vector< int > & returned_wedge_list, std::vector< int > & returned_tet_list, std::vector< int > & returned_hex_list )
Get lists of the nodes and different element types associated with this block. This function is recursive, meaning that if the block was created pointing to a piece of geometry, it will traverse down and get the mesh entities associated to that geometry.
|
|
Returns:
true for success, otherwise false
get_block_faces()
std::vector<int> CubitInterface::get_block_faces ( int block_id)
Get a list of faces associated with a specific block.
|
|
Returns:
A list (python tuple) of face ids contained in the block
get_block_hexes()
std::vector<int> CubitInterface::get_block_hexes ( int block_id)
Get a list of hexes associated with a specific block.
|
|
Returns:
A list (python tuple) of hex ids contained in the block
get_block_id()
int CubitInterface::get_block_id ( std::string entity_type, int entity_id )
int block_id = CubitInterface::get_block_id("surface", 33); |
block_id = cubit.get_block_id("surface", 33) |
|
|
|
|
Returns:
Block id associated with this entity or zero (0) if none
get_block_id_list()
std::vector<int> CubitInterface::get_block_id_list ( )
Get a list of all blocks.
Returns:
List (python tuple) of all active block ids
get_block_ids()
std::vector<int> CubitInterface::get_block_ids ( const std::string & mesh_geometry_file_name)
Get list of block ids from a mesh geometry file.
|
|
Returns:
List of block ids in the mesh geometry file
get_block_material()
int CubitInterface::get_block_material ( int block_id)
Get the id of the material assigned to the specified block.
Returns:
The material id. If no material has been assigned to the block, returns 0.
get_block_nodes()
std::vector<int> CubitInterface::get_block_nodes ( int block_id)
Get a list of nodes associated with a specific block.
|
|
Returns:
A list (python tuple) of node ids contained in the block
get_block_pyramids()
std::vector<int> CubitInterface::get_block_pyramids ( int block_id)
Get a list of pyramids associated with a specific block.
|
|
Returns:
A list (python tuple) of pyramid ids contained in the block
get_block_surfaces()
std::vector<int> CubitInterface::get_block_surfaces ( int block_id)
Get a list of surface associated with a specific block.
|
|
Returns:
A list (python tuple) of surface ids contained in the block
get_block_tets()
std::vector<int> CubitInterface::get_block_tets ( int block_id)
Get a list of tets associated with a specific block.
|
|
Returns:
A list (python tuple) of tet ids contained in the block
get_block_tris()
std::vector<int> CubitInterface::get_block_tris ( int block_id)
Get a list of tris associated with a specific block.
|
|
Returns:
A list (python tuple) of tri ids contained in the block
get_block_vertices()
std::vector<int> CubitInterface::get_block_vertices ( int block_id)
Get a list of vertices associated with a specific block.
|
|
Returns:
A list (python tuple) of vertex ids contained in the block
get_block_volumes()
std::vector<int> CubitInterface::get_block_volumes ( int block_id)
Get a list of volume ids associated with a specific block.
|
|
Returns:
A list (python tuple) of volume ids contained in the block
get_block_wedges()
std::vector<int> CubitInterface::get_block_wedges ( int block_id)
Get a list of wedges associated with a specific block.
|
|
Returns:
A list (python tuple) of wedges ids contained in the block
get_blocks_with_materials()
std::vector<std::vector<int> > CubitInterface::get_blocks_with_materials ( )
Get the block ids and ids of the respective materials assigned to each block.
Returns:
List of tuples ([block_1_id, material_1_id], [block_2_id, material_2_id], ...) for each block, whether or not it has a material. If no material has been assigned to the block, returns 0.
get_blunt_tangency_default_depth()
double CubitInterface::get_blunt_tangency_default_depth ( int vert_id, double angle, bool add_material )
/brief get default depth value for blunt tangency operation /return depth
get_body_count()
int CubitInterface::get_body_count ( )
Get the current number of bodies.
Returns:
The number of bodies in the current model, if any
get_bounding_box()
std::array<double, 10> CubitInterface::get_bounding_box ( const std::string & geometry_type, int entity_id )
std::array<double, 10> vector_list; |
vector_list = CubitInterface::get_bounding_box("surface", 22); |
vector_list = cubit.get_bounding_box("surface", 22) |
|
|
|
|
Returns:
A vector (python tuple) of coordinates describing the entity’s bounding box. Ten (10) values will be: [0] = minx [1] = maxx [2] = boxx range [3] = miny [4] = maxy [5] = boxy range [6] = minz [7] = maxz [8] = boxz range [9] = box diagonal length
get_build_number()
std::string CubitInterface::get_build_number ( )
Get the Cubit build number.
Returns:
A string containing the current Cubit build number
get_center_point()
std::array<double,3> CubitInterface::get_center_point ( const std::string & entity_type, int entity_id )
std::array<double,3> center_point; |
center_point = CubitInterface::get_center_point("surface", 22); |
center_point = cubit.get_center_point("surface", 22) |
|
|
|
|
Returns:
Vector (python tuple) of doubles representing x y z
get_cfd_type()
int CubitInterface::get_cfd_type ( int entity_id)
Get the cfd subtype for a specified cfd BC.
|
|
Returns:
Integer corresponding to the type of cfd, as defined by CI_BCTypes
get_chamfer_surfaces()
std::vector<std::vector<double> > CubitInterface::get_chamfer_surfaces ( std::vector< int > target_volume_ids, double thickness_threshold )
Get the list of chamfer surfaces for a list of volumes.
|
|
|
|
Returns:
List (python tuple) of chamfer surface ids (as doubles) and their thicknesses
get_close_loop_thickness()
double CubitInterface::get_close_loop_thickness ( int surface_id)
Get the thickness of a close loop surface.
|
|
Returns:
List (python tuple) of close loop (surface) ids
get_close_loops()
std::vector<int> CubitInterface::get_close_loops ( std::vector< int > target_volume_ids, double mesh_size )
Get the list of close loops (surfaces) for a list of volumes.
’Small’ or ’Close’ is a function of the mesh_size passed into the routine. The mesh_size parameter will act as the threshold for determining what ’small’ is. A small entity is one that has an edge length smaller than mesh_size.
|
|
|
|
Returns:
List (python tuple) of close loop (surface) ids
get_close_loops_with_thickness()
std::vector<std::vector<double> > CubitInterface::get_close_loops_with_thickness ( std::vector< int > target_volume_ids, double mesh_size, int genus )
Get the list of close loops (surfaces) for a list of volumes also return the corresponding minimum distances for each surface.
’Small’ or ’Close’ is a function of the mesh_size passed into the routine. The mesh_size parameter will act as the threshold for determining what ’small’ is. A small entity is one that has an edge length smaller than mesh_size.
|
|
|
|
|
|
Returns:
List (python tuple) of close loop (surface) ids
get_close_vertex_curve_pairs()
std::vector<int> CubitInterface::get_close_vertex_curve_pairs ( std::vector< int > target_volume_ids, double high_tolerance )
Get the list of close vertex-curve pairs (python callable)
|
|
Returns:
Paired list (python tuple) of vertex and curve ids considered coincident
get_closed_narrow_surfaces()
std::vector<int> CubitInterface::get_closed_narrow_surfaces ( std::vector< int > target_ids, double narrow_size )
Get the list of closed, narrow surfaces from a list of volumes.
|
|
|
|
Returns:
List (python tuple) of close, narrow surface ids
get_closest_node()
int CubitInterface::get_closest_node ( double x_coordinate, double y_coordinate, double z_coordinate )
Get the node closest to the given coordinates.
|
|
|
|
|
|
Returns:
id of closest node, 0 if none found
get_coincident_vertices()
std::vector<int> CubitInterface::get_coincident_vertices ( std::vector< int > target_volume_ids, double high_tolerance )
Get the list of coincident vertex pairs
|
|
Returns:
Paired list (python tuple) of vertex ids considered coincident
get_command_from_history()
std::string CubitInterface::get_command_from_history ( int command_number)
Get a specific command from Cubit’s command history buffer.
Returns:
A string which is the command at the given index
get_common_curve_id()
int CubitInterface::get_common_curve_id ( int surface_1_id, int surface_2_id )
Given 2 surfaces, get the common curve id.
|
|
|
|
Returns:
The id of the curve common to the two surfaces
get_common_vertex_id()
int CubitInterface::get_common_vertex_id ( int curve_1_id, int curve_2_id )
Given 2 curves, get the common vertex id.
|
|
|
|
Returns:
The id of the vertex common to the two curves, 0 if there is none
get_cone_surfaces()
std::vector<int> CubitInterface::get_cone_surfaces ( std::vector< int > target_volume_ids)
return a list of surfaces that are cones defined by a conic surface and a hard point
|
|
std::vector<int> CubitInterface::get_connectivity ( const std::string & entity_type, int entity_id )
std::vector<int> node_id_list; |
node_id_list = CubitInterface::get_connectivity("hex", 221); |
node_id_list = cubit.get_connectivity("hex", 221) |
|
|
|
|
Returns:
List (python tuple) of node ids
get_constraint_dependent_entity_point()
std::string CubitInterface::get_constraint_dependent_entity_point ( int constraint_id)
Get the dependent entity of a specified constraint.
|
|
Returns:
A std::string indicating the dependent entity
get_constraint_reference_point()
std::string CubitInterface::get_constraint_reference_point ( int constraint_id)
Get the reference point of a specified constraint.
|
|
Returns:
A std::string indicating the reference point
get_constraint_type()
std::string CubitInterface::get_constraint_type ( int constraint_id)
Get the type of a specified constraint.
|
|
Returns:
A std::string indicating the type – Kinematic, Distributing, Rigidbody
get_contact_pair_exterior_state()
bool CubitInterface::get_contact_pair_exterior_state ( int entity_id)
Get the contact pair’s exterior state.
/param entity_id Id of the contact pair /return The exterior state of the contact pair
get_contact_pair_friction_value()
double CubitInterface::get_contact_pair_friction_value ( int entity_id)
Get the contact pair’s friction value.
/param entity_id Id of the contact pair /return The friction value of the contact pair
get_contact_pair_general_state()
bool CubitInterface::get_contact_pair_general_state ( int entity_id)
Get the contact pair’s general state.
/param entity_id Id of the contact pair /return The general state of the contact pair
get_contact_pair_tied_state()
bool CubitInterface::get_contact_pair_tied_state ( int entity_id)
Get the contact pair’s tied state.
/param entity_id Id of the contact pair /return The tied state of the contact pair
get_contact_pair_tol_lower_value()
double CubitInterface::get_contact_pair_tol_lower_value ( int entity_id)
Get the contact pair’s lower bound tolerance value.
/param entity_id Id of the contact pair /return The tolerance value of the contact pair
get_contact_pair_tolerance_value()
double CubitInterface::get_contact_pair_tolerance_value ( int entity_id)
Get the contact pair’s upper bound tolerance value.
/param entity_id Id of the contact pair /return The tolerance value of the contact pair
get_convection_coefficient()
double CubitInterface::get_convection_coefficient ( int entity_id, CI_BCEntityTypes bc_type_enum )
Get the convection coefficient.
/param entity_id Id of the BC convection /param cc_type enum of CI_BCEntityTypes (1-normal, 5-shell top, 6-shell bottom) /return The value of the convection coefficient
get_coordinate_systems_id_list()
std::vector<int> CubitInterface::get_coordinate_systems_id_list ( )
/brief get a list of coordinate system ids
/return List (python tuple) of ids
get_copy_block_on_geometry_copy_setting()
std::string CubitInterface::get_copy_block_on_geometry_copy_setting ( )
Get the copy nodeset on geometry copy setting.
Returns:
copy nodeset setting
get_copy_nodeset_on_geometry_copy_setting()
std::string CubitInterface::get_copy_nodeset_on_geometry_copy_setting ( )
Get the copy nodeset on geometry copy setting.
Returns:
copy nodeset setting
get_copy_sideset_on_geometry_copy_setting()
std::string CubitInterface::get_copy_sideset_on_geometry_copy_setting ( )
Get the copy nodeset on geometry copy setting.
Returns:
copy nodeset setting
get_cubfile_journal()
std::vector<std::string> CubitInterface::get_cubfile_journal ( )
Gets the journal embeded in the last cubit file loaded.
Returns:
The journal embeded in the last cubit file loaded.
get_cubit_digits_setting()
double CubitInterface::get_cubit_digits_setting ( )
Get the Cubit digits setting.
Returns:
A double containing the digits. -1 if no digits are set
get_cubit_message_handler()
CubitMessageHandler* CubitInterface::get_cubit_message_handler ( )
get the default message handler
std::string CubitInterface::get_current_journal_file ( )
Gets the current journal file name.
Returns:
The current journal file name.
get_curve_bias_coarse_size()
double CubitInterface::get_curve_bias_coarse_size ( int curve_id)
Get the bias coarse size of a curve
|
|
Returns:
The bias coarse size of the curve.
get_curve_bias_fine_size()
double CubitInterface::get_curve_bias_fine_size ( int curve_id)
Get the bias fine size of a curve
|
|
Returns:
The bias fine size of the curve.
get_curve_bias_first_interval_fraction()
double CubitInterface::get_curve_bias_first_interval_fraction ( int curve_id)
Get the bias first interval fraction of a curve
|
|
Returns:
The bias first interval fraction of the curve.
get_curve_bias_first_interval_length()
double CubitInterface::get_curve_bias_first_interval_length ( int curve_id)
Get the bias first interval length of a curve
|
|
Returns:
The bias first interval length of the curve.
get_curve_bias_first_last_ratio1()
double CubitInterface::get_curve_bias_first_last_ratio1 ( int curve_id)
Get the bias first/last ratio at start of a curve
|
|
Returns:
The bias coarse size of the curve.
get_curve_bias_first_last_ratio2()
double CubitInterface::get_curve_bias_first_last_ratio2 ( int curve_id)
Get the bias first/last ratio at end of a curve
|
|
Returns:
The bias coarse size of the curve.
get_curve_bias_from_start()
bool CubitInterface::get_curve_bias_from_start ( int curve_id, bool & value )
Get whether the bias is from the start of a curve
|
|
|
|
Returns:
True/False A curve with the curve_id exists.
get_curve_bias_from_start_set()
bool CubitInterface::get_curve_bias_from_start_set ( int curve_id)
Get whether the bias from the start of a curve settings has been set
|
|
|
|
Returns:
True/False A curve with the curve_id exists.
get_curve_bias_geometric_factor()
double CubitInterface::get_curve_bias_geometric_factor ( int curve_id)
Get the first bias geometric factor of a curve
|
|
Returns:
The bias geometric factor of the curve.
get_curve_bias_geometric_factor2()
double CubitInterface::get_curve_bias_geometric_factor2 ( int curve_id)
Get the second bias geometric factor of a curve
|
|
Returns:
The bias geometric factor of the curve.
get_curve_bias_last_first_ratio1()
double CubitInterface::get_curve_bias_last_first_ratio1 ( int curve_id)
Get the bias last/first ratio at start of a curve
|
|
Returns:
The bias coarse size of the curve.
get_curve_bias_last_first_ratio2()
double CubitInterface::get_curve_bias_last_first_ratio2 ( int curve_id)
Get the bias last/first ratio at end of a curve
|
|
Returns:
The bias coarse size of the curve.
get_curve_bias_start_vertex_id()
int CubitInterface::get_curve_bias_start_vertex_id ( int curve_id)
Get the bias start vertex id of a curve
|
|
Returns:
The bias start vertex id of a curve.
get_curve_bias_type()
std::string CubitInterface::get_curve_bias_type ( int curve_id)
Get the bias type of a curve
|
|
Returns:
The bias type of the curve.
get_curve_center()
std::array<double,3> CubitInterface::get_curve_center ( int curve_id)
Get the center point of the arc.
|
|
Returns:
x, y, z center point of the curve in a vector (python tuple)
get_curve_count()
int CubitInterface::get_curve_count ( )
Get the current number of curves.
Returns:
The number of curves in the current model, if any
get_curve_count_in_volumes()
int CubitInterface::get_curve_count_in_volumes ( std::vector< int > target_volume_ids)
Get the current number of curves in the passed-in volumes.
Returns:
The number of curves in the volumes
get_curve_edges()
std::vector<int> CubitInterface::get_curve_edges ( int curve_id)
get the list of any edge elements on a given curve
|
|
Returns:
A list (python tuple) of the edge element ids on the curve
get_curve_length()
double CubitInterface::get_curve_length ( int curve_id)
Get the length of a specified curve.
|
|
Returns:
Length of the curve
get_curve_mesh_scheme_curvature()
double CubitInterface::get_curve_mesh_scheme_curvature ( int curve_id)
Get the curvature mesh scheme value of a curve.
|
|
Returns:
The curvature mesh scheme value of a curve.
get_curve_mesh_scheme_pinpoint_locations()
std::vector<double> CubitInterface::get_curve_mesh_scheme_pinpoint_locations ( int curve_id)
Get the pinpoint mesh scheme locations of a curve
|
|
Returns:
The pinpoint mesh scheme locations for a curve.
get_curve_mesh_scheme_stretch_values()
bool CubitInterface::get_curve_mesh_scheme_stretch_values ( int curve_id, double & first_size, double & factor, double & last_size, bool & start, int & vertex_id )
Get the stretch mesh scheme values of a curve
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
True/False A curve with the curve_id exists.
get_curve_nodes()
std::vector<int> CubitInterface::get_curve_nodes ( int curve_id)
Excludes nodes owned by bounding vertices.
int curv_id = 12; |
vector<int> curve_nodes = CubitInterface::get_curve_nodes(curv_id); |
|
|
Returns:
List (python tuple) of IDs of nodes owned by the curve
get_curve_radius()
double CubitInterface::get_curve_radius ( int curve_id)
Get the radius of a specified arc.
|
|
Returns:
Radius of the curve
get_curve_type()
std::string CubitInterface::get_curve_type ( int curve_id)
Get the curve type for a specified curve.
|
|
Returns:
Type of curve
get_dbl_sculpt_default()
double CubitInterface::get_dbl_sculpt_default ( const char * variable)
/brief return sculpt default value
get_default_element_type()
std::string CubitInterface::get_default_element_type ( )
Get the current default setting for the element type that will be used when meshing.
A string indicating the default mesh type:
"tri" indicates a tri/tet mesh default
"hex" indicates a quad/hex mesh default
"none" indicates no default has been assigned
std::string CubitInterface::get_default_geometry_engine ( )
std::string engine; |
engine = CubitInterface::get_default_geometry_engine(); |
engine = cubit.get_default_geometry_engine() |
Returns:
The name of the default modeler engine in the form ACIS, CATIA, OCC, facet
get_displacement_combine_type()
std::string CubitInterface::get_displacement_combine_type ( int entity_id)
Get the displacement’s combine type which is "Overwrite", "Average", "SmallestCombine", or "LargestCombine".
/param entity_id Id of the displacement /return The combine type for the given displacement
get_displacement_coord_system()
int CubitInterface::get_displacement_coord_system ( int entity_id)
Get the displacement’s coordinate system id.
/param entity_id Id of the displacement /return The Id of the displacement’s coordinate system
get_displacement_dof_signs()
const int* CubitInterface::get_displacement_dof_signs ( int entity_id)
This function only available from C++ Get the displacement’s dof signs
/param entity_id Id of the displacement /return
get_displacement_dof_values()
const double* CubitInterface::get_displacement_dof_values ( int entity_id)
This function only available from C++ Get the displacement’s dof values
/param entity_id Id of the displacement /return
get_distance_between()
double CubitInterface::get_distance_between ( int vertex_id_1, int vertex_id_2 )
Get the distance between two vertices.
|
|
Returns:
distance
get_distance_between_entities()
double CubitInterface::get_distance_between_entities ( std::string geom_type_1, int entity_id_1, std::string geom_type_2, int entity_id_2 )
Get the distance between two geom entities.
|
|
Returns:
distance
get_distance_from_curve_start()
double CubitInterface::get_distance_from_curve_start ( double x_coordinate, double y_coordinate, double z_coordinate, int curve_id )
Get the distance from a point on a curve to the curve’s start point.
|
|
|
|
|
|
|
|
Returns:
Distance from the xyz to the curve start
get_edge_count()
int CubitInterface::get_edge_count ( )
Get the count of edges in the model.
Returns:
The number of edges in the model
get_edge_global_element_id()
int CubitInterface::get_edge_global_element_id ( int edge_id)
int gid = CubitInterface::get_edge_global_element_id(22); |
|
|
Returns:
The corresponding element id
get_elem_quality_stats()
std::vector<double> CubitInterface::get_elem_quality_stats ( const std::string & entity_type, const std::vector< int > id_list, const std::string & metric_name, const double single_threshold, const bool use_low_threshold, const double low_threshold, const double high_threshold, const bool make_group )
std::vector<int> id_list = {223, 226, 256}; |
double single_threshold = 0.2; |
bool use_low_threshold = false; |
double low_threshold = 0.0; |
double high_threshold = 0.0; |
bool make_group = true; |
|
std::vector<double> |
quality_data = CubitInterface::get_elem_quality_stats("hex", id_list, "scaled jacobian", |
single_threshold, use_low_threshold, |
low_threshold, high_threshold, |
make_group); |
double min_value = quality_data[0]; |
double max_value = quality_data[1]; |
double mean_value = quality_data[2]; |
double std_value = quality_data[3]; |
int min_element_id = (int)quality_data[4]; |
int max_element_id = (int)quality_data[5]; |
int element_type = (int)quality_data[6]; |
int bad_group_id = (int)quality_data[7]; |
int num_elems = (int)quality_data[8]; |
std::vector<int> elem_ids(num_elems); |
for (int i=9, j=0; i<quality_data.size(); i++, j++) |
elem_ids[j] = (int)quality_data[i]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
[0] min_value [1] max_value [2] mean_value [3] std_value [4] min_element_id [5] max_element_id [6] element_type 0 = edge, 1 = tri, 2 = quad, 3 = tet, 4 = hex [7] bad_group_id [8] size of mesh_list [9]...[n-1] mesh_list
get_element_block()
int CubitInterface::get_element_block ( int element_id)
return the block that a given element is in.
|
|
Returns:
block_id, the id of the containing block
get_element_budget()
int CubitInterface::get_element_budget ( const std::string & element_type, std::vector< int > entity_id_list, int auto_factor )
Get the element budget based on current size settings for a list of volumes.
|
|
|
|
|
|
Returns:
The approximate number of elements that will be generated
get_element_count()
int CubitInterface::get_element_count ( )
Get the count of elements in the model.
Returns:
The number of quad, hex, tet, tri, wedge, edge, spheres, etc. which have been assigned to a block, given a global element id, and will be exported.
get_element_exists()
bool CubitInterface::get_element_exists ( int element_id)
Check the existance of an element.
|
|
Returns:
true or false
get_element_type()
std::string CubitInterface::get_element_type ( int element_id)
return the type of a given element
|
|
Returns:
The type
get_element_type_id()
int CubitInterface::get_element_type_id ( int element_id)
return the type id of a given element
|
|
Returns:
type_id The hex, tet, wedge, etc. id is returned.
get_entities()
std::vector<int> CubitInterface::get_entities ( const std::string & entity_type)
std::vector<int> entity_id_list; |
entity_id_list = CubitInterface::get_entities("volume"); |
entity_id_list = cubit.get_entities("volume") |
|
|
Returns:
A list (python tuple) of ids of the specified geometry type
get_entity_color_index()
int CubitInterface::get_entity_color_index ( const std::string & entity_type, int entity_id )
int color_index = CubitInterface::get_entity_color_index("curve", 33); |
color_index = cubit.get_entity_color_index("curve", 33) |
|
|
|
|
Returns:
The color of the entity
get_entity_modeler_engine()
std::vector<std::string> CubitInterface::get_entity_modeler_engine ( const std::string & geometry_type, int entity_id )
std::vector<std::string> engine_list; |
engine_list = CubitInterface::get_entity_modeler_engine("surface", 47); |
engine_list = cubit.get_entity_modeler_engine("surface", 47) |
|
|
|
|
Returns:
A vector (python tuple) of modeler engines associated with this entity
get_entity_name()
std::string CubitInterface::get_entity_name ( const std::string & entity_type, int entity_id )
Get the name of a specified entity.
std::string name = CubitInterface::get_entity_name("vertex", 22); |
name = cubit.get_entity_name("vertex", 22) |
|
|
|
|
Returns:
The name of the entity
get_entity_sense()
std::string CubitInterface::get_entity_sense ( std::string source_type, int source_id, int sideset_id )
std::string sense; |
sense = CubitInterface::get_entity_sense("face", 332, 2); |
sense = cubit.get_entity_sense("face", 332, 2) |
|
|
|
|
|
|
Returns:
Sense of the source_type/source_id in specified sideset
get_error_count()
int CubitInterface::get_error_count ( )
Get the number of errors in the current Cubit session.
Returns:
The number of errors in the Cubit session.
get_exodus_element_count()
int CubitInterface::get_exodus_element_count ( int entity_id, std::string entity_type )
int element_count = CubitInterface::get_exodus_element_count(2, "sideset"); |
element_count = cubit.get_exodus_element_count(2, "sideset") |
|
|
|
|
Returns:
Number of Elements
get_exodus_entity_description()
std::string CubitInterface::get_exodus_entity_description ( std::string entity_type, int entity_id )
std::string entity_description; |
entity_description = CubitInterface::get_exodus_entity_description("sideset", 33); |
entity_description = cubit.get_exodus_entity_description("sideset", 33) |
|
|
|
|
Returns:
Description of the entity or "" if none
get_exodus_entity_name()
std::string CubitInterface::get_exodus_entity_name ( const std::string entity_type, int entity_id )
Get the current number of nodesets.
Returns:
The number of nodesets in the current model, if any
std::string entity_name; |
entity_name = CubitInterface::get_exodus_entity_name("sideset", 33); |
entity_name = cubit.get_exodus_entity_name("sideset", 33) |
|
|
|
|
Returns:
Name of the entity or "" if none
get_exodus_entity_type()
std::string CubitInterface::get_exodus_entity_type ( std::string entity_type, int entity_id )
std::string entity_description; |
entity_description = CubitInterface::get_exodus_entity_description("sideset", 33); |
entity_description = cubit.get_exodus_entity_type("sideset", 33) |
|
|
|
|
Returns:
Type of the entity or "" if none. Returns "lite" or ""
get_exodus_id()
int CubitInterface::get_exodus_id ( const std::string & entity_type, int entity_id )
int exodus_id = CubitInterface::get_exodus_id("hex", 221); |
exodus_id = cubit.get_exodus_id("hex", 221) |
|
|
|
|
Returns:
Exodus id of the element if element has been written out, otherwise 0
get_exodus_sizing_function_file_name()
std::string CubitInterface::get_exodus_sizing_function_file_name ( )
Get the exodus sizing function file name.
Returns:
The sizing function file name
get_exodus_sizing_function_variable_name()
std::string CubitInterface::get_exodus_sizing_function_variable_name ( )
Get the exodus sizing function variable name.
Returns:
The sizing function variable name
get_exodus_variable_count()
int CubitInterface::get_exodus_variable_count ( std::string container_type, int container_id )
Get the number of exodus variables in a nodeset, sideset, or block.
|
|
Returns:
Number of exodus variables
get_exodus_variable_names()
std::vector< std::string > CubitInterface::get_exodus_variable_names ( std::string container_type, int container_id )
Get the names of exodus variables in a nodeset, sideset, or block.
|
|
Returns:
Names of exodus variables
get_exodus_version()
std::string CubitInterface::get_exodus_version ( )
Get the Exodus version number.
Returns:
A string containing the Exodus version number
get_expanded_connectivity()
std::vector<int> CubitInterface::get_expanded_connectivity ( const std::string & entity_type, int entity_id )
std::vector<int> node_id_list; |
node_id_list = CubitInterface::get__expanded_connectivity("hex", 221); |
node_id_list = cubit.get__expanded_connectivity("hex", 221) |
|
|
|
|
Returns:
List (python tuple) of all node ids associated with the element, including interior nodes
get_force_direction_vector()
std::array<double,3> CubitInterface::get_force_direction_vector ( int entity_id)
Get the direction vector from a force.
/param entity_id Id of the force /return A vector (python tuple) [x,y,z] of the direction the given force is acting
get_force_magnitude()
double CubitInterface::get_force_magnitude ( int entity_id)
Get the force magnitude from a force.
/param entity_id Id of the force /return Magnitude of the given force
get_force_moment_vector()
std::array<double,3> CubitInterface::get_force_moment_vector ( int entity_id)
Get the moment vector from a force.
/param entity_id Id of the force /return A vector (python tuple) [x,y,z] of the direction of the moment for the given force
get_geometric_owner()
std::vector<std::string> CubitInterface::get_geometric_owner ( std::string mesh_entity_type, std::string mesh_entity_list )
std::vector<std::string> owner_list; |
owner_list = CubitInterface::get_geometric_owner("quad", id_list); |
owner_list = cubit.get_geometric_owner("quad", id_list) |
|
|
|
|
Returns:
A list (python tuple) of geometry owners in the form of ’surface x’, ’curve y’, etc.
get_geometry_node_count()
int CubitInterface::get_geometry_node_count ( const std::string & entity_type, int entity_id )
/brief Get the node count for a specific geometric entity
/param entity_type The geometry type ("surface", "curve", etc) /param entity_id The entity id /return Number of nodes in the geometry
get_geometry_owner()
std::string CubitInterface::get_geometry_owner ( const std::string & entity_type, int entity_id )
std::string geom_owner = CubitInterface::get_geometry_owner("hex", 221); |
geom_owner = cubit.get_geometry_owner("hex", 221) |
|
|
|
|
Returns:
Name of owner
get_global_element_id()
int CubitInterface::get_global_element_id ( const std::string & element_type, int id )
int gid = CubitInterface::get_global_element_id("hex", 22); |
|
|
Returns:
The corresponding element id
get_graphics_version()
std::string CubitInterface::get_graphics_version ( )
Get the VTK version number.
Returns:
A string containing the VTK version number
get_group_bodies()
std::vector<int> CubitInterface::get_group_bodies ( int group_id)
Get group bodies (bodies that are children of a group)
This routine returns a list of bodies that are contained in a specified group.
|
|
void CubitInterface::get_group_children ( int group_id, std::vector< int > & returned_group_list, std::vector< int > & returned_body_list, std::vector< int > & returned_volume_list, std::vector< int > & returned_surface_list, std::vector< int > & returned_curve_list, std::vector< int > & returned_vertex_list, int & returned_node_count, int & returned_edge_count, int & returned_hex_count, int & returned_quad_count, int & returned_tet_count, int & returned_tri_count, int & returned_wedge_count, int & returned_pyramid_count, int & returned_sphere_count )
Get group children.
This routine returns a list for each geometry entity type in the group. Since groups may contain both geometry and mesh entities, this routine also returns the count of any mesh entity contained in the group. For groups contained in the group, the group_list will only contain one generation. In other words, if this routine is examining Group ABC, and Group ABC contains Group XYZ and Group XYZ happens to contain other groups (which in turn may contain other groups) this routine will only return the id of Group XYZ.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<int> CubitInterface::get_group_curves ( int group_id)
Get group curves (curves that are children of a group)
This routine returns a list of curves that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_edges ( int group_id)
Get group edges (edges that are children of a group)
This routine returns a list of edges that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_groups ( int group_id)
Get group groups (groups that are children of another group)
This routine returns a list a groups that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_hexes ( int group_id)
Get group hexes (hexes that are children of a group)
This routine returns a list of hexes that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_nodes ( int group_id)
Get group nodes (nodes that are children of a group)
This routine returns a list of nodes that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_pyramids ( int group_id)
Get group pyramids (pyramids that are children of a group)
This routine returns a list of pyramids that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_quads ( int group_id)
Get group quads (quads that are children of a group)
This routine returns a list of quads that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_spheres ( int group_id)
Get group spheres (sphere elements that are children of a group)
This routine returns a list of spheres that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_surfaces ( int group_id)
Get group surfaces (surfaces that are children of a group)
This routine returns a list of surfaces that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_tets ( int group_id)
Get group tets (tets that are children of a group)
This routine returns a list of tets that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_tris ( int group_id)
Get group tris (tris that are children of a group)
This routine returns a list of tris that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_vertices ( int group_id)
Get group vertices (vertices that are children of a group)
This routine returns a list of vertices that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_volumes ( int group_id)
Get group volumes (volumes that are children of a group)
This routine returns a list of volumes that are contained in a specified group.
|
|
std::vector<int> CubitInterface::get_group_wedges ( int group_id)
Get group wedges (wedges that are children of a group)
This routine returns a list of wedges that are contained in a specified group.
|
|
double CubitInterface::get_heatflux_on_area ( CI_BCEntityTypes bc_area_enum, int entity_id )
Get the heatflux on a specified area.
/param bc_area enum of CI_BCEntityTypes. If on solid, use 4. If on thin shell, use 7 for top, 8 for bottom /param entity_id ID of the heatflux /return The value or magnitude of the specified heatflux
get_hex_count()
int CubitInterface::get_hex_count ( )
Get the count of hexes in the model.
Returns:
The number of hexes in the model
get_hex_global_element_id()
int CubitInterface::get_hex_global_element_id ( int hex_id)
int gid = CubitInterface::get_hex_global_element_id(22); |
|
|
Returns:
The corresponding element id
get_hex_sheet()
std::vector<int> CubitInterface::get_hex_sheet ( int node_id_1, int node_id_2 )
Get the list of hex elements forming a hex sheet through the given two node ids. The nodes must be adjacent in the connectivity of the hex i.e. they form an edge of the hex.
Returns:
A list (python tuple) of hex ids in the hex sheet
get_hydraulic_radius_surface_area()
double CubitInterface::get_hydraulic_radius_surface_area ( int surface_id)
Get the area of a hydraulic surface.
|
|
Returns:
Hydraulic area of the surface
get_hydraulic_radius_volume_area()
double CubitInterface::get_hydraulic_radius_volume_area ( int volume_id)
Get the area of a hydraulic volume.
|
|
Returns:
Hydraulic area of the volume
get_id_from_name()
int CubitInterface::get_id_from_name ( const std::string & name)
Get id for a named entity.
int entity_id = CubitInterface::get_id_from_name("member_2"); |
entity_id = cubit.get_id_from_name("member_2") |
|
|
std::string CubitInterface::get_idless_signature ( std::string entity_type, int entity_id )
get the idless signature of a geometric or mesh entity
|
|
|
|
Returns:
the idless signature i.e. curve at (1 1 0 ordinal 2)
get_idless_signatures()
std::string CubitInterface::get_idless_signatures ( std::string entity_type, const std::vector< int > & entity_id_list )
get the idless signatures of a range of geometric or mesh entities
|
|
|
|
Returns:
the idless signature i.e. curve at (1 1 0 ordinal 2) curve at (0 0 1 ordinal 1) ...
get_interface()
CubitBaseInterface* CubitInterface::get_interface ( std::string interface_name)
Get the interface of a given name.
|
|
int CubitInterface::get_label_type ( const char * entity_type)
/brief make calls to SVDrawTool::get_label_type
/return label type currently associated with entity_type
get_last_id()
int CubitInterface::get_last_id ( const std::string & entity_type)
int last_id = CubitInterface::get_last_id("surface"); |
last_id = cubit.get_last_id("surface") |
|
|
Returns:
Integer id of last created entity
get_list_of_free_ref_entities()
std::vector<int> CubitInterface::get_list_of_free_ref_entities ( const std::string & geometry_type)
std::vector<int> free_curve_id_list; |
free_curve_id_list = CubitInterface::get_list_of_free_ref_entities("curve"); |
free_curve_id_list = cubit.get_list_of_free_ref_entities("curve") |
|
|
Returns:
A list (python tuple) of ids of the specified geometry type
get_material_name()
std::string CubitInterface::get_material_name ( int material_id)
Get the name of the material (or cfd media) with the given id.
Returns:
A std::string with the material’s name.
get_material_name_list()
std::vector<std::string> CubitInterface::get_material_name_list ( )
/brief Get a list of all defined material names
/return List (python tuple) of all the material names.
get_material_property()
double CubitInterface::get_material_property ( CI_MaterialProperty material_property_enum, int entity_id )
/brief Get the specified material property value
/param mp enum of CI_MaterialProperty. 0-Elastic Modulus, 1-Shear Modulus, 2-Poisson Ratio, 3-Density, 4-Specific Heat, 5-Conductivity /param entity_id Id of the material /return Value of the specified property for that material
get_media_name_list()
std::vector<std::string> CubitInterface::get_media_name_list ( )
/brief Get a list of all defined material names
/return List (python tuple) of all the material names.
get_media_property()
int CubitInterface::get_media_property ( int entity_id)
/brief Get the media property value
/param entity_id Id of the media /return Value of the media property, 0 == FLUID, 1 == POROUS, 2 == SOLID
get_merge_setting()
std::string CubitInterface::get_merge_setting ( const std::string & geometry_type, int entity_id )
std::string merge_setting = CubitInterface::get_merge_setting("surface", 33); |
merge_setting = cubit.get_merge_setting("surface", 33) |
|
|
|
|
Returns:
A text string that indicates the merge setting for the entity
get_mesh_edge_length()
double CubitInterface::get_mesh_edge_length ( int edge_id)
Get the length of a mesh edge.
|
|
Returns:
The length of the mesh edge
get_mesh_element_type()
std::string CubitInterface::get_mesh_element_type ( const std::string & entity_type, int entity_id )
std::string element_type = CubitInterface::get_mesh_element_type("surface", 2); |
element_type = cubit.get_mesh_element_type("surface", 2) |
|
|
|
|
Returns:
Mesh element type for that entity
get_mesh_error_solutions()
std::vector<std::string> CubitInterface::get_mesh_error_solutions ( int error_code)
Get the paired list of mesh error solutions and help context cues.
|
|
Returns:
List (python tuple) of ’married’ strings. First string is solution text. Second string is help context cue. Third string is command_panel cue.
get_mesh_geometry_approximation_angle()
double CubitInterface::get_mesh_geometry_approximation_angle ( std::string geometry_type, int entity_id )
Get the geometry approximation angle set for tri/tet meshing.
|
|
|
|
Returns:
boolean value as to whether or not the proximity flag is set
get_mesh_group_parent_ids()
std::vector<int> CubitInterface::get_mesh_group_parent_ids ( const std::string & element_type, int element_id )
std::vector<int> parent_id_list; |
parent_id_list = CubitInterface::get_mesh_group_parent_ids("tri", 332); |
parent_id_list = cubit.get_mesh_group_parent_ids("tri", 332) |
|
|
|
|
std::string CubitInterface::get_mesh_interval_firmness ( const std::string & geometry_type, int entity_id )
std::string firmness; |
CubitInterface::get_mesh_interval_firmness("surface", 12); |
firmness = cubit.get_mesh_interval_firmness("surface", 12) |
|
|
|
|
Returns:
The entity’s meshing firmness (HARD, SOFT, LIMP) HARD = set directly SOFT = computed LIMP = not set
get_mesh_intervals()
int CubitInterface::get_mesh_intervals ( const std::string & geometry_type, int entity_id )
int intervals = CubitInterface::get_mesh_intervals("surface", 12); |
intervals = cubit.get_mesh_intervals("surface", 12) |
|
|
|
|
Returns:
The entity’s interval count
get_mesh_scheme()
std::string CubitInterface::get_mesh_scheme ( const std::string & geometry_type, int entity_id )
std::string scheme; |
CubitInterface::get_mesh_scheme("surface", 12, scheme); |
scheme = cubit.get_mesh_scheme("surface", 12) |
|
|
|
|
Returns:
The entity’s meshing scheme
get_mesh_scheme_firmness()
std::string CubitInterface::get_mesh_scheme_firmness ( const std::string & geometry_type, int entity_id )
std::string firmness; |
CubitInterface::get_mesh_firmness("surface", 12); |
firmness = cubit.get_mesh_firmness("surface", 12) |
|
|
|
|
Returns:
The entity’s meshing firmness (HARD, LIMP, SOFT)
get_mesh_size()
double CubitInterface::get_mesh_size ( const std::string & geometry_type, int entity_id )
double mesh_size = CubitInterface::get_mesh_size("volume", 2); |
mesh_size = cubit.get_mesh_size("volume", 2) |
|
|
|
|
Returns:
The entity’s mesh size
get_mesh_size_type()
std::string CubitInterface::get_mesh_size_type ( const std::string & geometry_type, int entity_id )
std::string firmness; |
CubitInterface::get_mesh_size_setting_type("surface", 12); |
firmness = cubit.get_mesh_size_setting_type("surface", 12) |
|
|
|
|
Returns:
The entity’s mesh size type (USER_SET, CALCULATED, NOT_SET)
get_meshed_volume_or_area()
double CubitInterface::get_meshed_volume_or_area ( const std::string & geometry_type, std::vector< int > entity_ids )
double area = CubitInterface::get_meshed_volume_or_area("volume", 1); |
area = cubit.get_meshed_volume_or_area("volume", 1) |
|
|
|
|
Returns:
The entity’s meshed volume or area
get_meshgems_version()
std::string CubitInterface::get_meshgems_version ( )
Get the MeshGems version number.
Returns:
A string containing the MeshGems version number
get_ML_operation()
std::vector<std::string> CubitInterface::get_ML_operation ( const int op_type, const int entity_id1, const int entity_id2, const std::vector< double > params, const double small_curve_size, const double mesh_size )
get the command, display and preview strings for a given operation type
|
|
|
|
|
|
|
|
get_ML_operation_feature_names()
std::vector<std::string> CubitInterface::get_ML_operation_feature_names ( const int op_type)
for the given operation type described by get_ML_operation_features, return a vector of strings indicating the name of data for each feature in the vector.
|
|
get_ML_operation_feature_size()
int CubitInterface::get_ML_operation_feature_size ( const int op_type)
for the given operation type described by get_ML_operation_features, return the expected size of the feature vector
|
|
get_ML_operation_feature_types()
std::vector<std::string> CubitInterface::get_ML_operation_feature_types ( const int op_type)
boolean 1 or 0
categorical usually positive integer representing a unique
continuous could be double or integer describing a continuous range (i.e. number of adjacent curves, area of a surface, etc..)
|
|
std::vector<std::vector<double> > CubitInterface::get_ML_operation_features ( std::vector< int > op_types, std::vector< int > entity1_ids, std::vector< int > entity2_ids, std::vector< std::vector< double >> params, double mesh_size )
returns a vector of vectors defining surface overlaps The first surface (id) in each vector overlaps with all subsequent surfaces in the vector.
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
op_types = [3, 3] # 2 surface_no_op queries |
entity1_ids = [20, 25] # surface IDs |
entity2_ids = [0, 0] # none for surface_no_op |
params = [[-1, -1, -1], [-1, -1, -1]] # dummy for surface no_op |
mesh_size = 1.5924 # target mesh size |
features = cubit.get_ML_operation_features(op_types, |
entity1_ids, entity2_ids, |
params, mesh_size) |
|
|
11.3.1 op_type Description Entity1 Entity2 Params
0 Unknown none none 1 Vertex No Operation vertex none 2 Curve No Operation curve none 3 Surface No Operation surface none 4 Volume No Operation volume none 5 Remove Surface surface none 6 Tweak Replace Surface surface surface 7 Composite Surfaces surface surface 8 Collapse Curve curve vertex 9 Tweak Remove Topology Curve curve none 10 Virtual Collapse Curve curve vertex 11 Tweak Remove Topology Surface surface none 12 Blunt Tangency vertex none remove_mat, angle, depth 13 Remove Cone Surface surface none 14 Collapse Angle vertex none real_split, angle, composite_vertex 15 Remove Blend surface none 16 Remove Cavity surface none
|
|
|
|
|
|
|
|
std::string CubitInterface::get_ML_operation_name ( const int op_type)
get an ML operation name according from its index
|
|
double CubitInterface::get_moment_magnitude ( int entity_id)
Get the moment magnitude from a force.
/param entity_id Id of the force /return magnitude of the moment on the given force
get_narrow_regions()
std::vector<int> CubitInterface::get_narrow_regions ( std::vector< int > target_ids, double narrow_size )
Get the list of surfaces with narrow regions.
|
|
|
|
Returns:
List (python tuple) of surface ids
get_narrow_surfaces()
std::vector<int> CubitInterface::get_narrow_surfaces ( std::vector< int > target_volume_ids, double mesh_size )
Get the list of narrow surfaces for a list of volumes.
’Narrow’ is a function of the mesh_size passed into the routine. The mesh_size parameter will act as the threshold for determining what ’narrow’ is.
|
|
|
|
Returns:
List (python tuple) of small surface ids
get_next_block_id()
int CubitInterface::get_next_block_id ( )
Get a next available block id.
Returns:
Next available block id
get_next_command_from_history()
std::string CubitInterface::get_next_command_from_history ( )
Get ’next’ command from history buffer.
Returns:
A string which is the command
get_next_nodeset_id()
int CubitInterface::get_next_nodeset_id ( )
Get a next available nodeset id.
Returns:
Next available nodeset id
get_next_sideset_id()
int CubitInterface::get_next_sideset_id ( )
Get a next available sideset id.
Returns:
Next available sideset id
get_nodal_coordinates()
std::array<double,3> CubitInterface::get_nodal_coordinates ( int node_id)
Get the nodal coordinates for a given node id.
|
|
Returns:
a triple (python tuple) containing the x, y, and z coordinates
get_node_constraint()
bool CubitInterface::get_node_constraint ( )
Query current setting for node constraint (move nodes to geometry)
Returns:
True if constrained, otherwise false
get_node_constraint_smart_metric()
std::string CubitInterface::get_node_constraint_smart_metric ( )
Query current setting for node constraint smart metric Currently only for tets. Return either "distortion" of "normalized inradius".
Returns:
Returns quality metric name for projecting mid-nodes
get_node_constraint_smart_threshold()
double CubitInterface::get_node_constraint_smart_threshold ( )
Query current setting for node constraint smart threshold.
Returns:
Returns quality threshold for projecting mid-nodes
get_node_constraint_value()
int CubitInterface::get_node_constraint_value ( )
Query current setting for node constraint (move nodes to geometry)
Returns:
Returns 0 (off), 1(on), 2(smart)
get_node_count()
int CubitInterface::get_node_count ( )
Get the count of nodes in the model.
Returns:
The number of nodes in the model
get_node_edges()
std::vector<int> CubitInterface::get_node_edges ( int node_id)
Get the edge ids that share a node.
|
|
Returns:
List (python tuple) of edge ids adjacent to the node
get_node_exists()
bool CubitInterface::get_node_exists ( int node_id)
Check the existance of a node.
|
|
Returns:
true or false
get_node_faces()
std::vector<int> CubitInterface::get_node_faces ( int node_id)
Get the face/quad ids that share a node.
|
|
Returns:
List (python tuple) of face/quad ids adjacent to the node
get_node_global_id()
int CubitInterface::get_node_global_id ( int node_id)
int gid = CubitInterface::get_node_global_id(22); |
|
|
Returns:
The corresponding global node id
get_node_position_fixed()
bool CubitInterface::get_node_position_fixed ( int node_id)
Query "fixedness" state of node. A fixed node is not affecting by smoothing.
|
|
Returns:
True if constrained, otherwise false
get_node_tris()
std::vector<int> CubitInterface::get_node_tris ( int node_id)
Get the tri ids that share a node.
|
|
Returns:
List (python tuple) of tri ids adjacent to the node
get_nodeset_children()
void CubitInterface::get_nodeset_children ( int nodeset_id, std::vector< int > & returned_node_list, std::vector< int > & returned_volume_list, std::vector< int > & returned_surface_list, std::vector< int > & returned_curve_list, std::vector< int > & returned_vertex_list )
get lists of any and all possible children of a nodeset
A nodeset can contain a variety of entity types. This routine will return all contents of a specified nodeset.
|
|
|
|
|
|
|
|
|
|
|
|
int get_nodeset_count ( )
Get the current number of sidesets.
Returns:
The number of sidesets in the current model, if any
get_nodeset_curves()
std::vector<int> CubitInterface::get_nodeset_curves ( int nodeset_id)
Get a list of curve ids associated with a specific nodeset.
|
|
Returns:
A list (python tuple) of curve ids contained in the nodeset
get_nodeset_id_list()
std::vector<int> CubitInterface::get_nodeset_id_list ( )
Get a list of all nodesets.
Returns:
List (python tuple) of all active nodeset ids
get_nodeset_id_list_for_bc()
std::vector<int> CubitInterface::get_nodeset_id_list_for_bc ( CI_BCTypes bc_type_enum, int bc_id )
Get a list of all nodesets the specified bc is applied to.
|
|
|
|
Returns:
A list (python tuple) of nodeset ID’s associated with that bc
get_nodeset_node_count()
int CubitInterface::get_nodeset_node_count ( int nodeset_id)
Get the number of nodes in a nodeset.
|
|
Returns:
Number of nodes in the nodeset
get_nodeset_nodes()
std::vector<int> CubitInterface::get_nodeset_nodes ( int nodeset_id)
Get a list of node ids associated with a specific nodeset. This only returns the nodes that were specifically assigned to this nodeset. If the nodeset was created as a piece of geometry, get_nodeset_nodes will not return the nodes on that geometry See also get_nodeset_nodes_inclusive.
|
|
Returns:
A list (python tuple) of node ids contained in the nodeset
get_nodeset_nodes_inclusive()
std::vector<int> CubitInterface::get_nodeset_nodes_inclusive ( int nodeset_id)
Get a list of node ids associated with a specific nodeset. This includes all nodes specifically assigned to the nodeset, as well as nodes associated to a piece of geometry which was used to define the nodeset.
|
|
Returns:
A list (python tuple) of node ids contained in the nodeset
get_nodeset_surfaces()
std::vector<int> CubitInterface::get_nodeset_surfaces ( int nodeset_id)
Get a list of surface ids associated with a specific nodeset.
|
|
Returns:
A list (python tuple) of surface ids contained in the nodeset
get_nodeset_vertices()
std::vector<int> CubitInterface::get_nodeset_vertices ( int nodeset_id)
Get a list of vertex ids associated with a specific nodeset.
|
|
Returns:
A list (python tuple) of vertex ids contained in the nodeset
get_nodeset_volumes()
std::vector<int> CubitInterface::get_nodeset_volumes ( int nodeset_id)
Get a list of volume ids associated with a specific nodeset.
|
|
Returns:
A list (python tuple) of volume ids contained in the nodeset
get_overlap_max_angle()
double CubitInterface::get_overlap_max_angle ( void )
Get the max angle setting for calculating surface overlaps.
Returns:
The max angle setting
get_overlap_max_gap()
double CubitInterface::get_overlap_max_gap ( void )
Get the max gap setting for calculating surface overlaps.
Returns:
The max gap setting
get_overlap_min_gap()
double CubitInterface::get_overlap_min_gap ( void )
Get the min gap setting for calculating surface overlaps.
Returns:
The min gap setting
get_owning_body()
int CubitInterface::get_owning_body ( const std::string & geometry_type, int entity_id )
int body_id = CubitInterface::get_owning_body("curve", 12); |
body_id = cubit.get_owning_body("curve", 12) |
|
|
|
|
Returns:
ID of the specified entity’s owning body
get_owning_volume()
int CubitInterface::get_owning_volume ( const std::string & geometry_type, int entity_id )
int volume_id = CubitInterface::get_owning_volume("curve", 12); |
volume_id = cubit.get_owning_volume("curve", 12) |
|
|
|
|
Returns:
ID of the specified entity’s owning volume
get_owning_volume_by_name()
int CubitInterface::get_owning_volume_by_name ( const std::string & entity_name)
int volume_id = CubitInterface::get_owning_volume_by_name("TipSurface"); |
volume_id = cubit.get_owning_volume_by_name("TipSurface") |
|
|
Returns:
ID of the specified entity’s owning volume or 0 if name is unknown
get_owning_volume_ids()
void CubitInterface::get_owning_volume_ids ( const std::string & entity_type, std::vector< int > & entity_list, std::vector< int > & volume_ids )
Gets the id’s of the volumes that are owners of one of the specified entities.
| |
| |
|
get_parent_assembly_instance()
int CubitInterface::get_parent_assembly_instance ( int assembly_id)
Get the stored instance number of an assembly node’s instance.
|
|
Returns:
Instance of the assembly node’ instance
get_parent_assembly_path()
std::string CubitInterface::get_parent_assembly_path ( int assembly_id)
Get the stored path of an assembly node’ parent.
|
|
Returns:
Path of the assembly node’ parent
get_periodic_data()
void CubitInterface::get_periodic_data ( const std::string & geometry_type, int entity_id, double & returned_interval, std::string & returned_firmness, int & returned_lower_bound, std::string & returned_upper_bound )
Get the periodic data for a surface or curve.
|
|
|
|
|
|
|
|
|
|
|
|
const char* CubitInterface::get_pick_type ( )
Get the current pick type.
Returns:
The current pick type of the graphics system
get_pressure_function()
std::string CubitInterface::get_pressure_function ( int entity_id)
Get the pressure function.
/param entity_id Id of the pressure /return The pressure function
get_pressure_value()
double CubitInterface::get_pressure_value ( int entity_id)
Get the pressure value.
/param entity_id Id of the pressure /return The value or magnitude of the given pressure
get_previous_command_from_history()
std::string CubitInterface::get_previous_command_from_history ( )
Get ’previous’ command from history buffer.
Returns:
A string which is the command
get_pyramid_count()
int CubitInterface::get_pyramid_count ( )
Get the count of pyramids in the model.
Returns:
The number of pyramids in the model
get_pyramid_global_element_id()
int CubitInterface::get_pyramid_global_element_id ( int pyramid_id)
int gid = CubitInterface::get_pyramid_global_element_id(22); |
|
|
Returns:
The corresponding element id
get_quad_count()
int CubitInterface::get_quad_count ( )
Get the count of quads in the model.
Returns:
The number of quads in the model
get_quad_global_element_id()
int CubitInterface::get_quad_global_element_id ( int quad_id)
int gid = CubitInterface::get_quad_global_element_id(22); |
|
|
Returns:
The corresponding element id
get_quality_stats()
void CubitInterface::get_quality_stats ( const std::string & entity_type, std::vector< int > id_list, const std::string & metric_name, double single_threshold, bool use_low_threshold, double low_threshold, double high_threshold, double & min_value, double & max_value, double & mean_value, double & std_value, int & min_element_id, int & max_element_id, std::vector< int > & mesh_list, std::string & element_type, int & bad_group_id, bool make_group = false )
Get the quality stats for a specified entity.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_quality_stats_at_geometry()
std::vector<double> CubitInterface::get_quality_stats_at_geometry ( const std::string & geom_type, const std::string & mesh_type, const std::vector< int > geom_id_list, const int expand_levels, const std::string & metric_name, const double single_threshold, const bool use_low_threshold, const double low_threshold, const double high_threshold, const bool make_group )
std::vector<int> geom_ids = {4, 5}; |
expand_levels = 2 |
double single_threshold = 0.2; |
bool use_low_threshold = false; |
double low_threshold = 0.0; |
double high_threshold = 0.0; |
bool make_group = true; |
|
std::vector<double> |
quality_data = CubitInterface::get_quality_stats_at_geometry("surface", "tet", |
geom_ids, expand_levels, "scaled jacobian", |
single_threshold, use_low_threshold, |
low_threshold, high_threshold, |
make_group); |
double min_value = quality_data[0]; |
double max_value = quality_data[1]; |
double mean_value = quality_data[2]; |
double std_value = quality_data[3]; |
int min_element_id = (int)quality_data[4]; |
int max_element_id = (int)quality_data[5]; |
int element_type = (int)quality_data[6]; |
int bad_group_id = (int)quality_data[7]; |
int num_elems = (int)quality_data[8]; |
std::vector<int> elem_ids(num_elems); |
for (int i=9, j=0; i<quality_data.size(); i++, j++) |
elem_ids[j] = (int)quality_data[i]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
[0] min_value [1] max_value [2] mean_value [3] std_value [4] min_element_id [5] max_element_id [6] element_type 0 = edge, 1 = tri, 2 = quad, 3 = tet, 4 = hex [7] bad_group_id [8] size of mesh_list [9]...[n-1] mesh_list
get_quality_value()
double CubitInterface::get_quality_value ( const std::string & mesh_type, int mesh_id, const std::string & metric_name )
CubitInterface::get_quality_value("hex", 223, "skew"); |
|
|
|
|
|
|
Returns:
The value of the quality metric
get_relatives()
std::vector<int> CubitInterface::get_relatives ( const std::string & source_geometry_type, int source_id, const std::string & target_geom_type )
Get the relatives (parents/children) of a specified entity.
std::vector<int> relative_list; |
curve_list = CubitInterface::get_relatives("surface", 12, "curve"); |
curve_list = cubit.get_relatives("surface", 12, "curve") |
|
|
|
|
|
|
Returns:
A list (python tuple) of ids of the target geometry type
get_rendering_mode()
int CubitInterface::get_rendering_mode ( )
Get the current rendering mode.
Returns:
The current rendering mode of the graphics subsystem
get_requested_mesh_interval_firmness()
std::string CubitInterface::get_requested_mesh_interval_firmness ( const std::string & geometry_type, int entity_id )
std::string firmness; |
CubitInterface::get_requested_mesh_interval_firmness("surface", 12); |
firmness = cubit.get_requested_mesh_interval_firmness("surface", 12) |
|
|
|
|
Returns:
The entity’s meshing firmness (HARD, SOFT, LIMP) HARD = set directly SOFT = computed LIMP = not set
get_requested_mesh_intervals()
int CubitInterface::get_requested_mesh_intervals ( const std::string & geometry_type, int entity_id )
int intervals = CubitInterface::get_meshed_intervals("surface", 12); |
intervals = cubit.get_meshed_intervals("surface", 12) |
|
|
|
|
Returns:
The entity’s interval count
get_requested_mesh_size()
double CubitInterface::get_requested_mesh_size ( const std::string & geometry_type, int id )
double mesh_size = CubitInterface::get_requested_meshed_size("volume", 2); |
mesh_size = cubit.get_mesh_size("volume", 2) |
|
|
|
|
Returns:
The entity’s requested mesh size
get_requested_mesh_size_type()
std::string CubitInterface::get_requested_mesh_size_type ( const std::string & geometry_type, int entity_id )
std::string firmness; |
CubitInterface::get_requested_mesh_size_setting_type("surface", 12); |
firmness = cubit.get_requested_mesh_size_setting_type("surface", 12) |
|
|
|
|
Returns:
The entity’s mesh size type (USER_SET, CALCULATED, NOT_SET)
get_revision_date()
std::string CubitInterface::get_revision_date ( )
Get the Cubit revision date.
Returns:
A string containing Cubit’s last date of revision
get_rubberband_shape()
int CubitInterface::get_rubberband_shape ( )
Get the current rubberband select mode.
Returns:
0 for box, 1, for polygon, 2 for circle
get_selected_id()
int CubitInterface::get_selected_id ( int index)
Get the selected id based on an index.
Returns:
An id based on the passed in index
get_selected_ids()
std::vector<int> CubitInterface::get_selected_ids ( )
Get a list of the currently selected ids.
Returns:
A list of the currently selected ids
get_selected_type()
std::string CubitInterface::get_selected_type ( int index)
Get the selected type based on an index.
Returns:
A type based on the passed in index
get_sharp_angle_vertices()
std::vector<std::vector<double> > CubitInterface::get_sharp_angle_vertices ( std::vector< int > target_volume_ids, double upper_bound, double lower_bound )
Get the list of vertices at sharp curve angles for a list of volumes returns two parallel arrays. First array are the vertex ids and second are the associated angles at the vertices.
’Sharp’ is a function of the upper_bound and lower_bound threshold parameters. The id of vertices is returned. Similar to get_sharp_curve_angles except only vertices are returned with angles above upper_bound and below lower_bound
|
|
|
|
|
|
void CubitInterface::get_sharp_curve_angles ( std::vector< int > target_volume_ids, std::vector< int > & returned_large_curve_angles, std::vector< int > & returned_small_curve_angles, std::vector< double > & returned_large_angles, std::vector< double > & returned_small_angles, double upper_bound, double lower_bound )
Get the list of sharp curve angles for a list of volumes.
’Sharp’ is a function of the upper_bound and lower_bound threshold parameters. The id of curves are returned when any angle associated with a curve is less than the lower_bound or greater than the upper_bound.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CubitInterface::get_sharp_surface_angles ( std::vector< int > target_volume_ids, std::vector< int > & returned_large_surface_angles, std::vector< int > & returned_small_surface_angles, std::vector< double > & returned_large_angles, std::vector< double > & returned_small_angles, double upper_bound, double lower_bound )
Get the list of sharp surface angles for a list of volumes.
’Sharp’ is a function of the upper_bound and lower_bound threshold parameters. The id of surfaces are returned when any angle associated with a surface is less than the lower_bound or greater than the upper_bound.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CubitInterface::get_sideset_children ( int sideset_id, std::vector< int > & returned_face_list, std::vector< int > & returned_surface_list, std::vector< int > & returned_curve_list )
get lists of any and all possible children of a sideset
A nodeset can contain a variety of entity types. This routine will return all contents of a specified sideset.
|
|
|
|
|
|
|
|
int get_sideset_count ( )
Get the current number of sidesets.
Returns:
The number of sidesets in the current model, if any
get_sideset_curves()
std::vector<int> CubitInterface::get_sideset_curves ( int sideset_id)
Get a list of curve ids associated with a specific sideset.
|
|
Returns:
A list (python tuple) of curve ids contained in the sideset
get_sideset_edges()
std::vector<int> CubitInterface::get_sideset_edges ( int sideset_id)
Get a list of any quads in a sideset.
A sideset can contain edge elements. This function will return those edge elements if they exist. An empty list will be returned if there are no edges in the sideset.
|
|
Returns:
A list (python tuple) of the edges in the sideset
get_sideset_element_type()
std::string CubitInterface::get_sideset_element_type ( int sideset_id)
Get the element type of a sideset.
|
|
Returns:
Element type
get_sideset_id_list()
std::vector<int> CubitInterface::get_sideset_id_list ( )
Get a list of all sidesets.
Returns:
List (python tuple) of all active sideset ids
get_sideset_id_list_for_bc()
std::vector<int> CubitInterface::get_sideset_id_list_for_bc ( CI_BCTypes bc_type_enum, int bc_id )
Get a list of all sidesets the specified bc is applied to.
|
|
|
|
Returns:
A list (python tuple) of sideset ID’s associated with that bc
get_sideset_quads()
std::vector<int> CubitInterface::get_sideset_quads ( int sideset_id)
Get a list of any quads in a sideset.
A sideset can contain quadrilateral elements.
This function will return those quad elements if they exist. An empty list will be returned if there are no quads in the sideset.
|
|
Returns:
A list (python tuple) of the quads in the sideset
get_sideset_surfaces()
std::vector<int> CubitInterface::get_sideset_surfaces ( int sideset_id)
Get a list of any surfaces in a sideset.
A sideset can contain surfaces. This function will return those surfaces if they exist. An empty list will be returned if there are no surfaces in the sideset.
|
|
Returns:
A list (python tuple) of the surfaces defining the sideset
get_similar_curves()
std::vector<int> CubitInterface::get_similar_curves ( std::vector< int > curve_ids)
Get similar curves with the same length.
|
|
Returns:
list of IDs of similar surfaces
get_similar_surfaces()
std::vector<int> CubitInterface::get_similar_surfaces ( std::vector< int > surface_ids)
Get similar surfaces with the same area and number of curves.
|
|
Returns:
list of IDs of similar surfaces
get_similar_volumes()
std::vector<int> CubitInterface::get_similar_volumes ( std::vector< int > volume_ids)
Get similar volumes with the same volume and number of faces.
|
|
Returns:
list of IDs of similar volumes
get_sizing_function_name()
std::string get_sizing_function_name ( const std::string & entity_type, int surface_id )
Get the sizing function name for a surface or volume.
|
|
|
|
Returns:
The sizing function name (constant, curvature, interval, inverse, linear, super, test, exodus, none)
get_small_and_narrow_surfaces()
std::vector<int> CubitInterface::get_small_and_narrow_surfaces ( std::vector< int > target_ids, double small_area, double small_curve_size )
Get the list of small or narrow surfaces from a list of volumes.
|
|
|
|
|
|
Returns:
List (python tuple) of small or narrow surface ids
get_small_curves()
std::vector<int> CubitInterface::get_small_curves ( std::vector< int > target_volume_ids, double mesh_size )
Get the list of small curves for a list of volumes.
’Small’ is a function of the mesh_size passed into the routine. The mesh_size parameter will act as the threshold for determining what ’small’ is. A small entity is one that has an edge length smaller than mesh_size.
|
|
|
|
Returns:
List (python tuple) of small curve ids
get_small_radius_blend_surfaces()
std::vector<int> CubitInterface::get_small_radius_blend_surfaces ( std::vector< int > target_volume_ids, double max_radius )
Get the list of blend surfaces for a list of volumes that have a radius of curvature smaller than max_radius.
|
|
Returns:
List (python tuple) of blend surface ids
get_small_surfaces()
std::vector<int> CubitInterface::get_small_surfaces ( std::vector< int > target_volume_ids, double mesh_size )
Get the list of small surfaces for a list of volumes.
’Small’ is a function of the mesh_size passed into the routine. The mesh_size parameter will act as the threshold for determining what ’small’ is. A small entity is one that has an edge length smaller than mesh_size.
|
|
|
|
Returns:
List (python tuple) of small surface ids
get_small_surfaces_HR()
std::vector<int> CubitInterface::get_small_surfaces_HR ( std::vector< int > target_volume_ids, double mesh_size )
Python callable version Get the list of small hydraulic radius surfaces for a list of volumes.
’Small’ is a function of the mesh_size passed into the routine. The mesh_size parameter will act as the threshold for determining what ’small’ is. A small entity is one that has an edge length smaller than mesh_size.
|
|
|
|
Returns:
return the list of small hydraulic radius surfaces (same as returned_small_surfaces)
get_small_surfaces_hydraulic_radius()
void CubitInterface::get_small_surfaces_hydraulic_radius ( std::vector< int > target_volume_ids, double mesh_size, std::vector< int > & returned_small_surfaces, std::vector< double > & returned_small_radius )
Get the list of small hydraulic radius surfaces for a list of volumes.
’Small’ is a function of the mesh_size passed into the routine. The mesh_size parameter will act as the threshold for determining what ’small’ is. A small entity is one that has an edge length smaller than mesh_size.
|
|
|
|
|
|
|
|
Returns:
return the list of small hydraulic radius surfaces (same as returned_small_surfaces)
get_small_volumes()
std::vector<int> CubitInterface::get_small_volumes ( std::vector< int > target_volume_ids, double mesh_size )
Get the list of small volumes from a list of volumes.
’Small’ is a function of the mesh_size passed into the routine. The mesh_size parameter will act as the threshold for determining what ’small’ is. volumes with volume < 10*mesh_size^3 will be returned.
|
|
|
|
Returns:
List (python tuple) of small volume ids
get_small_volumes_hydraulic_radius()
void CubitInterface::get_small_volumes_hydraulic_radius ( std::vector< int > target_volume_ids, double mesh_size, std::vector< int > & returned_small_volumes, std::vector< double > & returned_small_radius )
Get the list of small hydraulic radius volumes for a list of volumes.
’Small’ is a function of the mesh_size passed into the routine. The mesh_size parameter will act as the threshold for determining what ’small’ is. A small entity is one that has an edge length smaller than mesh_size.
|
|
|
|
|
|
|
|
std::vector<int> CubitInterface::get_smallest_curves ( std::vector< int > target_volume_ids, int number_to_return )
Get a list of the smallest curves in the list of volumes. The number returned is specified by ’num_to_return’.
|
|
|
|
Returns:
List (python tuple) of smallest curve ids
get_smooth_scheme()
std::string CubitInterface::get_smooth_scheme ( const std::string & geometry_type, int entity_id )
std::string smooth_scheme; |
CubitInterface::get_smooth_scheme("curve", 122, smooth_scheme); |
smooth_scheme = cubit.get_smooth_scheme("curve", 122) |
|
|
|
|
Returns:
The smooth scheme associated with the entity
get_solutions_for_bad_geometry()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_bad_geometry ( std::string geom_type, int geom_id )
Get lists of display strings and command strings for bad geometry.
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. This second set of strings may contain concatenated strings delimited by ’&&&’. In other words, one instance of command string may in fact contain multiple commands separated by the ’&&&’ sequence. Vector 3 will contain Cubit preview strings. Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_classified_volume()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_classified_volume ( std::string classification, int vol_id )
Get lists of display, preview and command strings for a classified volume.
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. Vector 3 will contain Cubit preview strings. Vector 4 will contain operation strings for machine learning Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_close_loop()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_close_loop ( int surface_id, double mesh_size )
Get the solution list for a given close loop surface.
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. Vector 3 will contain Cubit preview strings. Note: If using python, vectors will be python tuples.
get_solutions_for_cone_surface()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_cone_surface ( int surface_id)
Get lists of display, preview and command strings for surfaces with defined as cones.
|
|
get_solutions_for_forced_sweepability()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_forced_sweepability ( int volume_id, std::vector< int > & source_surface_id_list, std::vector< int > & target_surface_id_list, double small_curve_size = -1.0 )
This function only works from C++ Get lists of display strings and command strings for forced sweepability solutions
|
|
Returns:
Vector of two string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. Vector 3 will contain Cubit preview strings. Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_imprint_merge()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_imprint_merge ( int surface_id1, int surface_id2 )
Get lists of display strings and command strings for imprint/merge solutions.
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. This second set of strings may contain concatenated strings delimited by ’&&&’. In other words, one instance of command string may in fact contain multiple commands separated by the ’&&&’ sequence. Vector 3 will contain Cubit preview strings. Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_near_coincident_vertex_and_curve()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_near_coincident_vertex_and_curve ( int vertex_id, int curve_id )
Get lists of display strings and command strings for near coincident vertices and curves.
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. This second set of strings may contain concatenated strings delimited by ’&&&’. In other words, one instance of command string may in fact contain multiple commands separated by the ’&&&’ sequence. Vector 3 will contain Cubit preview strings. Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_near_coincident_vertex_and_surface()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_near_coincident_vertex_and_surface ( int vertex_id, int surface_id )
Get lists of display strings and command strings for near coincident vertices and surfaces.
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. This second set of strings may contain concatenated strings delimited by ’&&&’. In other words, one instance of command string may in fact contain multiple commands separated by the ’&&&’ sequence. Vector 3 will contain Cubit preview strings. Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_near_coincident_vertices()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_near_coincident_vertices ( int vertex_id_1, int vertex_id_2 )
Get lists of display strings and command strings for near coincident vertices.
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. This second set of strings may contain concatenated strings delimited by ’&&&’. In other words, one instance of command string may in fact contain multiple commands separated by the ’&&&’ sequence. Vector 3 will contain Cubit preview strings. Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_overlapping_surfaces()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_overlapping_surfaces ( int surface_id_1, int surface_id_2 )
Get lists of display strings and command strings for overlapping surfaces.
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. This second set of strings may contain concatenated strings delimited by ’&&&’. In other words, one instance of command string may in fact contain multiple commands separated by the ’&&&’ sequence. Vector 3 will contain Cubit preview strings. Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_overlapping_volumes()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_overlapping_volumes ( int volume_id_1, int volume_id_2, double maximum_gap_tolerance, double maximum_gap_angle )
Get lists of display strings and command strings for overlapping volumes.
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. This second set of strings may contain concatenated strings delimited by ’&&&’. In other words, one instance of command string may in fact contain multiple commands separated by the ’&&&’ sequence. Vector 3 will contain Cubit preview strings. Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_sharp_angle_vertex()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_sharp_angle_vertex ( int vertex_id, double small_curve_size, double mesh_size )
Get lists of display, preview and command strings for sharp angle solutions.
|
|
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. Vector 3 will contain Cubit preview strings. Vector 4 will contain operation strings for machine learning Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_small_curves()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_small_curves ( int curve_id, double small_curve_size, double mesh_size )
Get lists of display, preview and command strings for small curve solutions.
|
|
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. Vector 3 will contain Cubit preview strings. Vector 4 will contain operation strings for machine learning Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_small_surfaces()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_small_surfaces ( int surface_id, double small_curve_size, double mesh_size )
Get lists of display, preview and command strings for small surface solutions.
|
|
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. Vector 3 will contain Cubit preview strings. Vector 4 will contain operation strings for machine learning Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_surfaces_with_narrow_regions()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_surfaces_with_narrow_regions ( int surface_id, double small_curve_size, double mesh_size )
Get lists of display, preview and command strings for surfaces with narrow regions solutions.
|
|
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. Vector 3 will contain Cubit preview strings. Note: If using this function in python, returned vectors will be python tuples.
get_solutions_for_volumes()
std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_volumes ( int vol_id, double small_curve_size, double mesh_size )
Get lists of display, preview and command strings for small volume solutions.
| |
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. Vector 3 will contain Cubit preview strings. Vector 4 will contain operation strings for machine learning Note: If using this function in python, returned vectors will be python tuples.
get_source_surfaces()
std::vector<int> CubitInterface::get_source_surfaces ( int volume_id)
Get a list of a volume’s sweep source surfaces.
|
|
Returns:
List (python tuple) of surface ids
get_sphere_count()
int CubitInterface::get_sphere_count ( )
Get the count of sphere elements in the model.
Returns:
The number of spheres in the model
get_sphere_global_element_id()
int CubitInterface::get_sphere_global_element_id ( int edge_id)
int gid = CubitInterface::get_sphere_global_element_id(22); |
|
|
Returns:
The corresponding element id
get_sub_elements()
std::vector<int> CubitInterface::get_sub_elements ( const std::string & entity_type, int entity_id, int dimension )
std::vector<int> face_id_list; |
face_id_list = CubitInterface::get_sub_elements("hex", 221, 2); |
face_id_list = cubit.get_sub_elements("hex", 221, 2) |
|
|
|
|
|
|
Returns:
List (python tuple) of ids of the desired dimension
get_submap_corner_types()
std::vector<std::pair<int, int> > CubitInterface::get_submap_corner_types ( int surface_id)
Get a list of vertex ids and the corresponding corner vertex types if the surface were defined as submap surface. There are no side affects. This does not actually assign corner types or change the underlying mesh scheme of the surface.
|
|
Returns:
a vector of pairs of <id, corner_type> The corner_types are defined as follows
UNSET_TYPE = -1, END_TYPE = 1, SIDE_TYPE, CORNER_TYPE, REVERSAL_TYPE, TRIANGLE_TYPE, NON_TRIANGLE_TYPE ;
}
get_surface_area()
double CubitInterface::get_surface_area ( int surface_id)
Get the area of a surface.
|
|
Returns:
Area of the surface
get_surface_centroid()
std::array<double,3> CubitInterface::get_surface_centroid ( int surface_id)
Get the surface centroid for a specified surface.
|
|
Returns:
surface centroid
get_surface_count()
int CubitInterface::get_surface_count ( )
Get the current number of surfaces.
Returns:
The number of surfaces in the current model, if any
get_surface_element_count()
int CubitInterface::get_surface_element_count ( int surface_id)
Get the count of elements in a surface.
Returns:
The number of quads, and triangles in a surface. NOTE: This count does not distinguish between elements which have been put into a block or not.
get_surface_loop_nodes()
std::vector<std::vector<int> > CubitInterface::get_surface_loop_nodes ( int surface_id)
get the ordered list of nodes on the loops of this surface
|
|
Returns:
A list of lists (python tuple of tuples) one list per loop first loop is the external
get_surface_nodes()
std::vector<int> CubitInterface::get_surface_nodes ( int surface_id)
Excludes nodes owned by bounding curves and verts.
int surf_id = 5; |
vector<int> surface_nodes = CubitInterface::get_surface_nodes(surface_id); |
|
|
Returns:
List (python tuple) of IDs of nodes owned by the surface
get_surface_normal()
std::array<double,3> CubitInterface::get_surface_normal ( int surface_id)
Get the surface normal for a specified surface.
|
|
Returns:
surface normal at the center
get_surface_normal_at_coord()
std::array<double,3> CubitInterface::get_surface_normal_at_coord ( int surface_id, std::array< double, 3 > )
Get the surface normal for a specified surface at a location.
|
|
|
|
Returns:
surface normal at coord
get_surface_num_loops()
int CubitInterface::get_surface_num_loops ( int surface_id)
get the number of loops on the surface
|
|
Returns:
number of loops on the surface
get_surface_principal_curvatures()
std::vector<double> CubitInterface::get_surface_principal_curvatures ( int surface_id)
Get the principal curvatures of a surface at surface mid_point.
|
|
Returns:
two scalars that are the principal curvatures at midpoint
get_surface_quads()
std::vector<int> CubitInterface::get_surface_quads ( int surface_id)
get the list of any quad elements on a given surface
|
|
Returns:
A list (python tuple) of the quad ids on the surface
get_surface_sense()
std::string CubitInterface::get_surface_sense ( int surface_id)
Get the surface sense for a specified surface.
|
|
Returns:
surface sense as "Reversed" or "Forward" or "Both"
get_surface_tris()
std::vector<int> CubitInterface::get_surface_tris ( int surface_id)
get the list of any tri elements on a given surface
|
|
Returns:
A list (python tuple) of the tri ids on the surface
get_surface_type()
std::string CubitInterface::get_surface_type ( int surface_id)
Get the surface type for a specified surface.
|
|
Returns:
Type of surface
get_surfs_with_narrow_regions()
std::vector<int> CubitInterface::get_surfs_with_narrow_regions ( std::vector< int > target_ids, double narrow_size )
Get the list of surfaces with narrow regions.
|
|
|
|
Returns:
List (python tuple) of surface ids
get_tangential_intersections()
std::vector<int> CubitInterface::get_tangential_intersections ( std::vector< int > target_volume_ids, double upper_bound, double lower_bound )
Get the list of bad tangential intersections for a list of volumes.
’Bad’ is a function of the upper_bound and lower_bound threshold parameters. The id of surfaces are returned when any tangential angle associated with a surface is less than the lower_bound or greater than the upper_bound.
|
|
|
|
|
|
Returns:
List (python tuple) of surface ids associated with bad tangential angles
get_target_surfaces()
std::vector<int> CubitInterface::get_target_surfaces ( int volume_id)
Get a list of a volume’s sweep target surfaces.
|
|
Returns:
List (python tuple) of surface ids
get_tet_count()
int CubitInterface::get_tet_count ( )
Get the count of tets in the model.
Returns:
The number of tets in the model
get_tet_global_element_id()
int CubitInterface::get_tet_global_element_id ( int tet_id)
int gid = CubitInterface::get_tet_global_element_id(22); |
|
|
Returns:
The corresponding element id
double CubitInterface::get_tetmesh_growth_factor ( int volume_id)
Get the tetmesh growth factor.
Returns:
the volume growth factor
get_tetmesh_insert_mid_nodes()
bool CubitInterface::get_tetmesh_insert_mid_nodes ( )
Get the state of the flag to insert midnodes during meshing. Global setting.
Returns:
boolean - true if insert midnodes during meshing
get_tetmesh_minimize_interior_points()
bool CubitInterface::get_tetmesh_minimize_interior_points ( )
Get the state of the flag to minimize interior points in tetmesher. Global setting.
Returns:
boolean - true if minimizing interior points during meshing
get_tetmesh_minimize_slivers()
bool CubitInterface::get_tetmesh_minimize_slivers ( )
Get the state of the flag to minimize sliver tets. Global setting.
Returns:
boolean - true if minimizing sliver tets during meshing
get_tetmesh_num_anisotropic_layers()
int CubitInterface::get_tetmesh_num_anisotropic_layers ( )
Get the number of anisotropic tet layers. Global setting.
Returns:
number of anisotropic layers (0 if not using anisotropy)
get_tetmesh_optimization_level()
int CubitInterface::get_tetmesh_optimization_level ( )
Get the optimization level for tetmeshing. Global setting.
Returns:
integer from 1 to 6
get_tetmesh_optimize_mid_nodes()
bool CubitInterface::get_tetmesh_optimize_mid_nodes ( )
Get the state of the flag to optimize midnodes during meshing. Global setting.
Returns:
boolean - true if optimize midnodes during meshing
get_tetmesh_optimize_overconstrained_edges()
bool CubitInterface::get_tetmesh_optimize_overconstrained_edges ( )
Get the state of the flag to optimize overconstrained edges. Global setting.
Returns:
boolean - true if optimizing overconstrained edges during meshing
get_tetmesh_optimize_overconstrained_tets()
bool CubitInterface::get_tetmesh_optimize_overconstrained_tets ( )
Get the state of the flag to optimize overconstrained tets. Global setting.
Returns:
boolean - true if optimizing overconstrained tets during meshing
get_tetmesh_parallel()
bool CubitInterface::get_tetmesh_parallel ( )
Get the parallel flag for tet meshing. Defines whether to use parallel mesher.
Returns:
boolean value as to whether or not the parallel tet mesher is used
get_tetmesh_proximity_flag()
bool CubitInterface::get_tetmesh_proximity_flag ( int volume_id)
Get the proximity flag for tet meshing.
|
|
Returns:
boolean value as to whether or not the proximity flag is set
get_tetmesh_proximity_layers()
int CubitInterface::get_tetmesh_proximity_layers ( int volume_id)
Get the number of proximity layers for tet meshing. This is the number of layers between close surfaces.
|
|
Returns:
boolean value as to whether or not the proximity flag is set
get_tetmesh_relax_surface_constraints()
bool CubitInterface::get_tetmesh_relax_surface_constraints ( )
Get the state of the flag to relax surface mesh constraints in tetmesher. Global setting.
Returns:
boolean - true if relaxing surface mesh constraints during meshing
get_tight_bounding_box()
std::array<double,15> CubitInterface::get_tight_bounding_box ( const std::string & geometry_type, std::vector< int > entity_list )
std::array<double> vector_list; |
vector_list = CubitInterface::get_tight_bounding_box("surface", entity_list); |
vector_list = cubit.get_tight_bounding_box("surface", entity_list) |
|
|
|
|
Returns:
A vector (python tuple) of coordinates and axis (0-2) center (3-5, 6-8, 9-11) u, v, x normalized coordinate axis of the box (12-14) length in u, v, w
get_total_bounding_box()
std::array<double,10> CubitInterface::get_total_bounding_box ( const std::string & geometry_type, std::vector< int > entity_list )
std::array<double,10> vector_list; |
vector_list = CubitInterface::get_total_bounding_box("surface", entity_list); |
vector_list = cubit.get_total_bounding_box("surface", entity_list) |
|
|
|
|
Returns:
An array of coordinates for the entity’s bounding box. Ten (10) values will be returned. [ x-min, x-max, x-range, y-min, y-max, y-range, z-min, z-max, z-range, diagonal].
get_total_volume()
double CubitInterface::get_total_volume ( std::vector< int > volume_list)
Get the total volume for a list of volume ids.
|
|
Returns:
The total volume of all volumes indicated in the id list
get_tri_count()
int CubitInterface::get_tri_count ( )
Get the count of tris in the model.
Returns:
The number of tris in the model
get_tri_global_element_id()
int CubitInterface::get_tri_global_element_id ( int tri_id)
int gid = CubitInterface::get_tri_global_element_id(22); |
|
|
Returns:
The corresponding element id
get_trimesh_geometry_sizing()
bool CubitInterface::get_trimesh_geometry_sizing ( )
Get the global geometry sizing flag for trimesher.
Returns:
boolean - true if geometry sizing is on
get_trimesh_num_anisotropic_layers()
int CubitInterface::get_trimesh_num_anisotropic_layers ( )
Get the global number of anisotropic layers for trimeshing.
Returns:
number of anistropic tri layers (0 if not using anisotropy)
get_trimesh_ridge_angle()
double CubitInterface::get_trimesh_ridge_angle ( )
Get the global setting for ridge angle in trimesher.
Returns:
ridge angle
get_trimesh_split_overconstrained_edges()
bool CubitInterface::get_trimesh_split_overconstrained_edges ( )
Get the global setting for trimesher split over-constrained edges.
Returns:
boolen - true if trimesher split over-constrained edges setting is on
get_trimesh_surface_gradation()
double CubitInterface::get_trimesh_surface_gradation ( )
Get the global surface mesh gradation set for meshing with MeshGems.
Returns:
the surface gradation
get_trimesh_target_min_size()
double CubitInterface::get_trimesh_target_min_size ( std::string geom_type, int entity_id )
Get the trimesh target min size for the entity. local setting for surfaces.
Returns:
the target min size for entity ID
get_trimesh_tiny_edge_length()
double CubitInterface::get_trimesh_tiny_edge_length ( )
Get the global setting for tiny edge length in trimesher.
Returns:
tiny edge length
get_trimesh_volume_gradation()
double CubitInterface::get_trimesh_volume_gradation ( )
Get the global volume mesh gradation set for meshing with MeshGems.
Returns:
the volume gradation
get_undo_enabled()
bool CubitInterface::get_undo_enabled ( )
/brief Query whether undo is currently enabled
/return True if undo is enabled, otherwise false
get_valence()
int CubitInterface::get_valence ( int vertex_id)
Get the valence for a specific vertex.
|
|
get_valid_block_element_types()
std::vector<std::string> CubitInterface::get_valid_block_element_types ( int block_id)
Get a list of potential element types for a block.
|
|
Returns:
List (python tuple) of potential element types
get_velocity_combine_type()
std::string CubitInterface::get_velocity_combine_type ( int entity_id)
Get the velocity’s combine type which is "Overwrite", "Average", "SmallestCombine", or "LargestCombine".
/param entity_id Id of the velocity /return The combine type for the given velocity
get_velocity_dof_signs()
const int* CubitInterface::get_velocity_dof_signs ( int entity_id)
This function only available from C++ Get the velocity’s dof signs
/param entity_id Id of the velocity /return
get_velocity_dof_values()
const double* CubitInterface::get_velocity_dof_values ( int entity_id)
This function only available from C++ Get the velocity’s dof values
/param entity_id Id of the velocity /return
get_version()
std::string CubitInterface::get_version ( )
Get the Cubit version.
Returns:
A string containing the current version of Cubit
get_vertex_count()
int CubitInterface::get_vertex_count ( )
Get the current number of vertices.
Returns:
The number of vertices in the current model, if any
get_vertex_node()
int CubitInterface::get_vertex_node ( int vertex_id)
int vert_id = 22; |
int node_id = CubitInterface::get_vertex_node(vert_id); |
|
|
Returns:
ID of node owned by the vertex. returns -1 of doesn’t exist
get_vertex_type()
std::string CubitInterface::get_vertex_type ( int surface_id, int vertex_id )
Get the Vertex Types for a specified vertex on a specified surface. Vertex types include "side", "end", "reverse", "unknown".
|
|
|
|
Returns:
The type – "side", "end", "reverse", or "unknown"
get_view_at()
std::array<double,3> CubitInterface::get_view_at ( )
Get the camera ’at’ point.
Returns:
The xyz coordinates of the camera’s current position
get_view_distance()
double CubitInterface::get_view_distance ( )
Get the distance from the camera to the model (from - at)
Returns:
Distance from the camera to the model
get_view_from()
std::array<double,3> CubitInterface::get_view_from ( )
Get the camera ’from’ point.
Returns:
The xyz coordinates of the camera’s from position
get_view_up()
std::array<double,3> CubitInterface::get_view_up ( )
Get the camera ’up’ direction.
Returns:
The xyz coordinates of the camera’s up direction
get_vol_sphere_params()
bool CubitInterface::get_vol_sphere_params ( std::vector< int > sphere_id_list, int & rad_intervals, int & az_intervals, double & bias, double & fract, int & max_smooth_iterations )
get the current sphere parameters for a sphere volume
|
|
|
|
|
|
|
|
|
|
|
|
double CubitInterface::get_volume_area ( int volume_id)
Get the area of a volume.
|
|
Returns:
Area of the volume
get_volume_count()
int CubitInterface::get_volume_count ( )
Get the current number of nodesets.
Returns:
The number of nodesets in the current model, if any
get_volume_element_count()
int CubitInterface::get_volume_element_count ( int volume_id)
Get the count of elements in a volume.
Returns:
The number of hexes, tets, pyramids, and wedges in a volume. NOTE: This count does not distinguish between elements which have been put into a block or not.
get_volume_gap_solutions()
std::vector<std::vector<std::string> > CubitInterface::get_volume_gap_solutions ( int surface_id_1, int surface_id_2 )
Get lists of display strings and command strings for gaps
|
|
|
|
Returns:
Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. This second set of strings may contain concatenated strings delimited by ’&&&’. In other words, one instance of command string may in fact contain multiple commands separated by the ’&&&’ sequence. Vector 3 will contain Cubit preview strings. Note: If using this function in python, returned vectors will be python tuples.
get_volume_hexes()
std::vector<int> CubitInterface::get_volume_hexes ( int volume_id)
get the list of any hex elements in a given volume
|
|
Returns:
A list (python tuple) of the hex ids in the volume
get_volume_nodes()
std::vector<int> CubitInterface::get_volume_nodes ( int volume_id)
Excludes nodes owned by bounding surfs, curves and verts.
int vol_id = 1; |
vector<int> volume_nodes = CubitInterface::get_volume_nodes(vol_id); |
|
|
Returns:
List (python tuple) of IDs of nodes owned by the volume
get_volume_pyramids()
std::vector<int> CubitInterface::get_volume_pyramids ( int volume_id)
get the list of any pyramid elements in a given volume
|
|
Returns:
A list (python tuple) of the pyramid ids in the volume
get_volume_tets()
std::vector<int> CubitInterface::get_volume_tets ( int volume_id)
get the list of any tet elements in a given volume
|
|
Returns:
A list (python tuple) of the tet ids in the volume
get_volume_wedges()
std::vector<int> CubitInterface::get_volume_wedges ( int volume_id)
get the list of any wedge elements in a given volume
|
|
Returns:
A list (python tuple) of the wedge ids in the volume
get_wedge_global_element_id()
int CubitInterface::get_wedge_global_element_id ( int wedge_id)
int gid = CubitInterface::get_wedge_global_element_id(22); |
|
|
Returns:
The corresponding element id
get_wrt_entity()
std::string CubitInterface::get_wrt_entity ( std::string source_type, int source_id, int sideset_id )
std::string wrt_entity; |
wrt_entity = CubitInterface::get_wrt_entity("face", 332, 2); |
wrt_entity = cubit.get_wrt_entity("face", 332, 2) |
|
|
|
|
|
|
Returns:
’with-respect-to’ entity of the source_type/source_id in specified sideset
group_list()
void CubitInterface::group_list ( std::vector< std::string > & name_list, std::vector< int > & returned_id_list )
Get the names and ids of all the groups (excluding the pick group) that are defined by the current cubit session.
|
|
|
|
std::vector<std::pair<std::string, int> > CubitInterface::group_names_ids ( )
Get the names and ids of all the groups returned in a name/id structure that are defined by the current cubit session.
return A list of std::pair<std::string, int> structure instances
heatflux_is_on_shell_area()
bool CubitInterface::heatflux_is_on_shell_area ( CI_BCEntityTypes bc_area_enum, int entity_id )
Determine whether a BC heatflux is on a shell area.
/param bc_area enum of CI_BCEntityTypes. Use 7 to check if on top, 8 to check if on bottom /param entity_id Id of the BC /return true if BC heatflux is on specified shell area, otherwise false
init()
void CubitInterface::init ( const std::vector< std::string > & argv)
Use init to initialize Cubit. Using a blank list as the input parameter is acceptable.
|
|
is_assembly_metadata_attached()
bool CubitInterface::is_assembly_metadata_attached ( int volume_id)
Determine whether metadata is attached to a specified volume.
|
|
Returns:
True if metadata exists, otherwise false
is_blend_surface()
bool CubitInterface::is_blend_surface ( int surface_id)
return whether the surface is a blend
|
|
Returns:
whether the surface is a blend
is_catia_engine_available()
bool CubitInterface::is_catia_engine_available ( )
Determine whether catia engine is available.
Returns:
True if catia engine is available, otherwise false
is_chamfer_surface()
bool CubitInterface::is_chamfer_surface ( int surface_id, double thickness_threshold )
return whether the surface is a chamfer
|
|
|
|
Returns:
whether the surface is a chamfer
is_close_loop_surface()
bool CubitInterface::is_close_loop_surface ( int surface_id, double mesh_size )
return whether the has one or more close loops
|
|
|
|
Returns:
whether the surface has one or more close loops
is_command_echoed()
bool CubitInterface::is_command_echoed ( )
Check the echo flag in cubit.
Returns:
A boolean indicating whether commands should be echoed in Cubit
is_command_journaled()
bool CubitInterface::is_command_journaled ( )
Check the journaling flag in cubit.
Returns:
A boolean indicating whether commands are journaled by Cubit
is_cone_surface()
bool CubitInterface::is_cone_surface ( int surface_id)
return whether the surface is a cone
|
|
Returns:
whether the surface is a cone
is_cylinder_surface()
bool CubitInterface::is_cylinder_surface ( int surface_id)
return whether the surface is a cylinder
|
|
Returns:
whether the surface is a cylinder
is_geometry_visibility_on()
bool CubitInterface::is_geometry_visibility_on ( )
Get the current geometry visibility setting.
Returns:
True if scale is visible, otherwise false
is_interval_count_odd()
bool CubitInterface::is_interval_count_odd ( int surface_id)
Query whether a specified surface has an odd loop.
|
|
Returns:
True if surface is/contains an odd looop, otherwise false.
is_merged()
bool CubitInterface::is_merged ( const std::string & geometry_type, int entity_id )
if (CubitInterface::is_merged("surface", 137)) . . . |
if cubit.is_merged("surface", 137): |
|
|
|
|
bool CubitInterface::is_mesh_element_in_group ( const std::string & element_type, int element_id )
if (CubitInterface::is_mesh_element_in_group("tet", 445)) ... |
if cubit.is_mesh_element_in_group("tet", 445): |
|
|
|
|
bool CubitInterface::is_mesh_visibility_on ( )
Get the current mesh visibility setting.
Returns:
True if scale is visible, otherwise false
is_meshed()
bool CubitInterface::is_meshed ( const std::string & geometry_type, int entity_id )
if (CubitInterface::is_meshed("surface", 137)) . . . |
if cubit.is_meshed("surface", 137): |
|
|
|
|
bool CubitInterface::is_modified ( )
Get the modified status of the model.
Returns:
A boolean indicating whether the model has been modified
is_multi_volume()
bool CubitInterface::is_multi_volume ( int body_id)
Query whether a specified body is a multi volume body.
|
|
Returns:
True if body contains multiple volumes, otherwise false.
is_narrow_surface()
bool CubitInterface::is_narrow_surface ( int surface_id, double mesh_size )
return whether the surface is narrow (has a width smaller than mesh_size)
|
|
|
|
Returns:
whether the surface is narrow
is_occlusion_on()
bool CubitInterface::is_occlusion_on ( )
Get the current occlusion mode.
Returns:
True if occlusion is on, otherwise false
is_on_thin_shell()
bool CubitInterface::is_on_thin_shell ( CI_BCTypes bc_type_enum, int entity_id )
Determine whether a BC is on a thin shell. Valid for temperature, convection and heatflux.
/param bc_type_in enum of CI_BCTypes. temperature = 4, convection = 7, heatflux = 8 /param entity_id Id of the BC /return true if BC is on thin shell element, otherwise false
is_part_of_list()
bool CubitInterface::is_part_of_list ( int target_id, std::vector< int > id_list )
Routine to check for the presence of an id in a list of ids.
|
|
|
|
Returns:
True if target_id is member of id_list, otherwise false
is_performing_undo()
bool CubitInterface::is_performing_undo ( )
Check if an undo command is currently being performed.
Returns:
True or false.
is_periodic()
bool CubitInterface::is_periodic ( const std::string & geometry_type, int entity_id )
if (CubitInterface::is_periodic("surface", 22)) . . . |
if cubit.is_periodic("surface", 22): |
|
|
|
|
Returns:
True is entity is periodic, otherwise false
is_perspective_on()
bool CubitInterface::is_perspective_on ( )
Get the current perspective mode.
Returns:
True if perspective is on, otherwise false
is_playback_paused_on_error()
bool CubitInterface::is_playback_paused_on_error ( )
Gets whether or not playback is paused when an error occurs.
Returns:
True if playback should be paused when an error occurs.
is_point_contained()
int CubitInterface::is_point_contained ( const std::string & geometry_type, int entity_id, const std::array< double, 3 > & xyz_point )
Determine if given point is inside, outside, on or unknown the given entity. note that this is typically used for volumes or sheet bodies.
|
|
Returns:
-1 failure, 0 outside, 1, inside, 2 on
is_scale_visibility_on()
bool CubitInterface::is_scale_visibility_on ( )
Get the current scale visibility setting.
Returns:
True if scale is visible, otherwise false
is_select_partial_on()
bool CubitInterface::is_select_partial_on ( )
Get the current select partial setting.
Returns:
True if partial select is on, otherwise false
is_sheet_body()
bool CubitInterface::is_sheet_body ( int volume_id)
Query whether a specified volume is a sheet body.
|
|
Returns:
True if volume is a sheet body, otherwise false
is_surface_planer()
bool CubitInterface::is_surface_planer ( int surface_id)
if (CubitInterface::is_surface_planar(22)) . . . |
if cubit.is_surface_planar(22): |
|
|
Returns:
True is surface is planer, otherwise false
is_undo_save_needed()
bool CubitInterface::is_undo_save_needed ( )
Get the status of the model relative to undo checkpointing.
Returns:
A boolean indicating whether the model has been modified
is_virtual()
bool CubitInterface::is_virtual ( const std::string & geometry_type, int entity_id )
if (CubitInterface::is_virtual("surface", 134)) . . . |
if cubit.is_virtual("surface", 134)): |
|
|
|
|
bool CubitInterface::is_visible ( const std::string & geometry_type, int entity_id )
if (CubitInterface::is_visible("volume", 4)) . . . |
if cubit.is_visible("volume", 4)): |
|
|
|
|
bool CubitInterface::is_volume_meshable ( int volume_id)
Check if volume is meshable with current scheme.
Returns:
A boolean indicating whether volume is meshable with current scheme
is_working_dir_set()
bool CubitInterface::is_working_dir_set ( )
Create BCVizInterface for CompSimUI.
Returns:
was the -workingdir passed in from the command line
Returns:
boolean value indicating whether -working dir was set
journal_commands()
void CubitInterface::journal_commands ( bool state)
Set the journaling flag in cubit.
|
|
std::vector<double> CubitInterface::measure_between_entities ( std::string entity_type1, int entity_id1, std::string entity_type2, int entity_id2 )
std::vector<double> dist_info = |
CubitInterface::measure_between_entities("curve", 10, "surface", 12) |
double dist = dist_info[0] |
std::vector<double> curv_point = {dist_info[1], dist_info[2], dist_info[3]}; |
std::vector<double> surf_point = {dist_info[4], dist_info[5], dist_info[6]}; |
dist_info = cubit.measure_between_entities("curve", 10, "surface", 12) |
dist = dist_info[0] |
curv_point = [dist_info[1], dist_info[2], dist_info[3]] |
surf_point = [dist_info[4], dist_info[5], dist_info[6]] |
|
|
|
|
|
|
|
|
void CubitInterface::move ( Entity entity, std::array< double, 3 > vector, bool preview = false )
Moves the Entity the specified vector.
|
|
|
|
|
|
|
|
|
int CubitInterface::number_undo_commands ( )
/brief Query whether there are any undo commands to execute
/return The number of commands in the undo stack
override_journal_stream()
void CubitInterface::override_journal_stream ( JournalStreamBase * jnl_stream)
Override the Journal Stream in CUBIT.
std::vector<int> CubitInterface::parse_cubit_list ( const std::string & type, std::string entity_list_string )
Parse a Cubit style entity list into a list of integers.
Users are allowed to input many variations of entities and IDs for any given command. This routine parses the input and returns a regular list of valid IDs for the specified entity type. For example: parse_cubit_list(’surface’, ’1 to 12’) parse_cubit_list(’surface’, ’with name "myname*"’) parse_cubit_list(’surface’, ’in volume 5 to 23’)
|
|
|
|
Returns:
A vector (python tuple) of validated integers
print_raw_help()
void CubitInterface::print_raw_help ( const char * input_line, int order_dependent, int consecutive_dependent )
Used to print out help when a ?, & or ! is pressed.
|
|
|
|
|
|
Body CubitInterface::prism ( double height, int sides, double major, double minor )
Creates a prism of the specified dimensions.
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
A Body object of the newly created prism
project_unit_square()
std::vector< std::vector<double> > CubitInterface::project_unit_square ( std::vector< std::vector< double > > pts, int surface_id, int quad_id, int node00_id, int node10_id )
Given points in a unit square, map them to the given quad using the orientation info, then project them onto the given surface, and return their projected positions.
|
|
|
|
|
|
|
|
|
|
Returns:
Return the position on the surface of each input node, in the same order as the input was given
pyramid()
Body CubitInterface::pyramid ( double height, int sides, double major, double minor, double top = 0.0 )
Creates a pyramid of the specified dimensions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
A Body object of the newly created pyramid
reflect()
void CubitInterface::reflect ( Entity entity, std::array< double, 3 > axis, bool preview = false )
Reflect the Entity about the specified axis.
|
|
|
|
|
|
|
|
|
bool CubitInterface::release_interface ( CubitBaseInterface * instance)
Release the interface with the given name.
|
|
void CubitInterface::remove_entity_from_group ( int group_id, int entity_id, const std::string & entity_type )
CubitInterface::remove_entity_from_group(3, 22, "surface"); |
cubit.remove_entity_from_group(3, 22, "surface") |
|
|
|
|
|
|
void CubitInterface::remove_overconstrained_tets ( std::vector< int > tet_ids)
can be snapped to the surface without causing adjacent tets to have an inradius smaller than the tet we are removing. This operation is typically done to remove sliver tets (high aspect ratio). If the removal casues neighbor tets to have an aspect ratio larger then the one getting deleted, the removal does not happen.
tets_to_remove = [ 15, 19, 24, 88 ] |
cubit.remove_overconstrained_tets( tets_to_remove ) |
CubitProgressHandler* CubitInterface::replace_progress_handler ( CubitProgressHandler * progress)
Register a new progress-bar callback handler with Cubit and return the the previous progress-handler without deleting it.
|
|
Returns:
pointer to previous progress handler
scale()
void CubitInterface::scale ( Entity entity, double factor, bool preview = false )
Scales the Entity according to the specified factor.
|
|
|
|
|
|
|
|
|
set_copy_block_on_geometry_copy_setting()
bool CubitInterface::set_copy_block_on_geometry_copy_setting ( std::string val)
Set the copy block on geometry copy setting "ON", "USE_ORIGINAL", or "OFF".
Returns:
success/fail setting the setting
set_copy_nodeset_on_geometry_copy_setting()
bool CubitInterface::set_copy_nodeset_on_geometry_copy_setting ( std::string val)
Set the copy nodeset on geometry copy setting "ON", "USE_ORIGINAL", or "OFF".
Returns:
success/fail setting the setting
set_copy_sideset_on_geometry_copy_setting()
bool CubitInterface::set_copy_sideset_on_geometry_copy_setting ( std::string val)
Set the copy sideset on geometry copy setting "ON", "USE_ORIGINAL", or "OFF".
Returns:
success/fail setting the setting
set_cubit_interrupt()
void CubitInterface::set_cubit_interrupt ( bool interrupt)
This sets the global flag in Cubit that stops all interruptable processes.
|
|
void CubitInterface::set_cubit_message_handler ( CubitMessageHandler * hdlr)
redirect the output from cubit.
bool CubitInterface::set_entity_name ( const std::string & entity_type, int entity_id, const std::string & new_name )
CubitInterface::set_entity_name("vertex", 22, "new_name"); |
|
|
|
|
|
|
Returns:
true if entity was found and rename, otherwise false.
set_exit_handler()
void CubitInterface::set_exit_handler ( ExternalExitHandler * hdlr)
Set the exit handler.
|
|
void CubitInterface::set_ext_plugin_paths ( const std::string & paths)
set the directory for user loaded components/plugins
void CubitInterface::set_label_type ( const char * entity_type, int label_flag )
/brief make calls to SVDrawTool::set_label_type
void CubitInterface::set_license ( const char * license_str)
Provide a license.
|
|
void CubitInterface::set_max_group_id ( int maximum_group_id)
Reset Cubit’s max group id This is really dangerous to use and exists only to overcome a limitation with Cubit. Cubit keeps track of the next group id to assign. But those ids just keep incrementing in Cubit. Some of the power tools in the Cubit GUI make groups ’under the covers’ for various operations. The groups are immediately deleted. But, creating those groups will cause Cubit’s group id to increase and downstream journal files may be messed up because those journal files are expecting a certain ID to be available.
When using this call the user must ensure the group max_group_id is under their control. Typically, a user will create a group, use it, then immediately delete it. This call will only work if the max_group_id is the same as Cubit’s max group id. If it is Cubit’s max id will be reset. If not, nothing will happen.
|
|
void CubitInterface::set_overlap_max_angle ( const double maximum_angle)
Set the max angle setting for calculating surface overlaps.
|
|
Returns:
set_overlap_max_gap()
void CubitInterface::set_overlap_max_gap ( const double maximum_gap)
Set the max gap setting for calculating surface overlaps.
|
|
Returns:
set_overlap_min_gap()
void CubitInterface::set_overlap_min_gap ( const double min_gap)
Set the min gap setting for calculating surface overlaps.
|
Returns:
set_playback_handler()
void CubitInterface::set_playback_handler ( ExternalPlaybackHandler * hdlr)
C++ only
set_playback_paused_on_error()
void CubitInterface::set_playback_paused_on_error ( bool pause)
Sets whether or not playback is paused when an error occurs.
|
|
void CubitInterface::set_progress_handler ( CubitProgressHandler * progress)
Register a progress-bar callback handler with Cubit. Deletes the current progress handler if it exists.
|
|
void CubitInterface::set_rendering_mode ( int mode)
Set the current rendering mode.
|
|
bool CubitInterface::silent_cmd ( const char * input_string)
Pass a command string into Cubit and have it executed without being verbose at the command prompt.
CubitInterface::silent_cmd("display"); |
cubit.silent_cmd("display") |
|
|
std::vector<double> CubitInterface::snap_locations_to_geometry ( std::vector< double > locations, std::string entity_type, int entity_id, double tol )
#give 'n' points in form, x, y, z, x, y, z,... |
locations = [ 0.0, 1.0, 3.0, 0.1, 1.1, 4.2 ] |
snapped_xyz = cubit.snap_locations_to_geometry( locations, "volume", 1, 0.001 ) |
Body CubitInterface::sphere ( double radius, int x_cut = 0, int y_cut = 0, int z_cut = 0, double inner_radius = 0 )
Creates all or part of a sphere.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
A Body object of the newly created sphere
string_from_id_list()
std::string CubitInterface::string_from_id_list ( std::vector< int > ids)
Parse a list of integers into a Cubit style id list.
For example: string_from_id_list(<1, 2, 3, 4, 5, 6, 7, 8>) returns ’1 to 8’ example: string_from_id_list(<1, 2, 3, 100, 5, 6, 7, 8>) returns ’1 to 3, 5 to 8, 100’
|
|
Returns:
A string representing the id list
subtract()
std::vector<Body> CubitInterface::subtract ( std::vector< CubitInterface::Body > tool_in, std::vector< CubitInterface::Body > from_in, bool imprint_in = false, bool keep_old_in = false )
Performs a boolean subtract operation.
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
A list of changed body objects
surface()
CubitInterface::Surface CubitInterface::surface ( int id_in)
Gets the surface object from an ID.
|
|
Returns:
The surface object
sweep_curve()
std::vector<Body> CubitInterface::sweep_curve ( std::vector< Curve > curves, std::vector< Curve > along_curves, double draft_angle = 0, int draft_type = 0, bool rigid = false )
Create a Body or a set of Bodies from a swept curve.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
A List of newly created Bodies
temperature_is_on_shell_area()
bool CubitInterface::temperature_is_on_shell_area ( CI_BCTypes bc_type_enum, CI_BCEntityTypes bc_area_enum, int entity_id )
Determine whether a BC temperature is on a shell area. Valid for convection and temperature and on top, bottom, gradient, and middle.
/param bc_type enum of CI_BCTypes. temperature = 4, convection = 7 /param bc_area enum of CI_BCEntityTypes. Use 7 for top, 8 for bottom, 9 for gradient, 10 for middle /param entity_id Id of the BC /return true if BC temperature is on the shell area, otherwise false
temperature_is_on_solid()
bool CubitInterface::temperature_is_on_solid ( CI_BCTypes bc_type_enum, int entity_id )
Determine whether a BC temperature is on a solid. Valid for convection and temperature.
/param bc_type_in enum of CI_BCTypes. temperature = 4, convection = 7 /param entity_id Id of the BC /return true if BC temperature is on a solid, otherwise false
torus()
Body CubitInterface::torus ( double center_radius, double swept_radius )
creates a torus of the specified dimensions
|
|
|
|
|
|
Returns:
A Body object of the newly created torus
tweak_curve_offset()
std::vector<Body> CubitInterface::tweak_curve_offset ( std::vector< Curve > curves, std::vector< double > distances, bool keep_old = false, bool preview = false )
Performs a tweak curve offset command.
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
A list of changed body objects
tweak_curve_remove()
std::vector<CubitInterface::Body> CubitInterface::tweak_curve_remove ( std::vector< Curve > curves, bool keep_old = false, bool preview = false )
Removes a curve from a body and extends the surrounding surface to fill the gap.
Removes a curve from a body
|
|
|
|
|
|
|
|
|
Returns:
A list of changed body objects
tweak_surface_offset()
std::vector<Body> CubitInterface::tweak_surface_offset ( std::vector< Surface > surfaces, std::vector< double > distances )
Performs a tweak surface offset command.
|
|
|
|
Returns:
A list of the body objects of the modified bodies
tweak_surface_remove()
std::vector<CubitInterface::Body> CubitInterface::tweak_surface_remove ( std::vector< Surface > surfaces, bool extend_ajoining = true, bool keep_old = false, bool preview = false )
Removes a surface from a body and extends the surrounding surfaces if extend_ajoining is true.
Removes a surface from a body
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
A list of changed body objects
tweak_vertex_fillet()
std::vector<Body> CubitInterface::tweak_vertex_fillet ( std::vector< Vertex > verts, double radius, bool keep_old = false, bool preview = false )
Performs a tweak vertex fillet command.
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
A list of changed body objects
unite()
std::vector<Body> CubitInterface::unite ( std::vector< CubitInterface::Body > body_in, bool keep_old_in = false )
Performs a boolean unite operation.
|
|
|
|
|
|
Returns:
A list of changed bodies
unselect_entity()
void CubitInterface::unselect_entity ( const std::string & entity_type, int entity_id )
Unselect an entity that is currently selected.
CubitInterface::unselect_entity("curve", 221); |
cubit.unselect_entity("curve", 221) |
|
|
|
|
CubitInterface::Vertex CubitInterface::vertex ( int id_in)
Gets the vertex object from an ID.
|
|
Returns:
The vertex object
volume()
CubitInterface::Volume CubitInterface::volume ( int id_in)
Gets the volume object from an ID.
|
|
Returns:
The volume object
volume_contains_tets()
bool CubitInterface::volume_contains_tets ( int volume_id)
Determine whether a volume contains tets.
Returns:
bool
was_last_cmd_undoable()
bool CubitInterface::was_last_cmd_undoable ( )
Report whether the last executed command was undoable.
Returns:
true if the last executed command was undoable
write_to_journal()
void CubitInterface::write_to_journal ( std::string words)
Write a string to the active journal.
words string to write to journal file
Returns:
A boolean indicating whether commands are journaled by Cubit