An exception class to alert the caller that an invalid entity was attempted to be used. Likely the user is attempting to use an Entity who’s underlying CubitEntity has been deleted. More...
Get the number of errors in the current Cubit session. More...
void
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.) More...
reset the camera in all open windows this includes resetting the view, closing the histogram and color windows and clearing the scalar bar, highlight, and picked entities.
void
flush_graphics ()
Flush the graphics.
void
clear_drawing_set (const std::string &set_name)
Clear a named drawing set (this is for mesh preview)
void
unselect_entity (const std::string &entity_type, int entity_id)
Unselect an entity that is currently selected. More...
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. More...
Get the requested mesh size for a specified entity. This returns a size that has been set specifically on the entity and not averaged from parents. More...
int
has_valid_size (const std::string &geometry_type, int entity_id)
Get whether an entity has a size. All entities have a size unless the auto sizing is off. If the auto sizing is off, an entity has a size only if it has been set.
bool
auto_size_needs_to_be_calculated ()
Get whether the auto size needs to be calculated. Calculating the auto size may be expensive on complex models. The auto size may be outdated if the model has changed.
double
get_default_auto_size ()
Get auto size needs for the current set of geometry.
Get the interval count for a specified entity as set specifically on that entity. More...
double
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. More...
int
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. More...
return whether the exodus sizing funnction file exists More...
bool
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 More...
get element quality at a list of geometry entities. Finds all elements with nodes ON/IN the specified geometry and finds the quality of all elements of the specfied element type that are connected. Same arguments and return values as get_elem_quality_stats except a geometry and element type are used as arguments More...
double
get_quality_value (const std::string &mesh_type, int mesh_id, const std::string &metric_name)
Get the metric value for a specified mesh entity. More...
std::string
get_mesh_scheme (const std::string &geometry_type, int entity_id)
Get the mesh scheme for the specified entity. More...
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. More...
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. More...
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) More...
Get lists of display, preview and command strings for surfaces with defined as cones. More...
bool
get_solutions_for_source_target (int volume_id, std::vector< std::vector< int > > &feasible_source_surface_id_list, std::vector< std::vector< int > > &feasible_target_surface_id_list, std::vector< std::vector< int > > &infeasible_source_surface_id_list, std::vector< std::vector< int > > &infeasible_target_surface_id_list)
Get a list of suggested sources and target surface ids given a specified volume.
void
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. More...
void
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. More...
std::vector< std::vector< double > >
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. More...
return a list of surfaces that are cones defined by a conic surface and a hard point More...
void
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 More...
std::vector< std::vector< double > >
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. More...
for the given operation type described by get_ML_operation_features, return a vector of strings indicating the type of data for each feature in the vector. Will return one of the following for each index: More...
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. More...
Set the copy block on geometry copy setting "ON", "USE_ORIGINAL", or "OFF". More...
void
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. More...
void
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 More...
void
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 More...
Get a list of vertices associated with a specific block. More...
bool
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. More...
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. More...
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. More...
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)
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. More...
Get the list of node ids contained within a mesh entity, including interior nodes. More...
std::vector< int >
get_sub_elements (const std::string &entity_type, int entity_id, int dimension)
Get the lower dimesion entities associated with a higher dimension entities. For example get the faces associated with a hex or the edges associated with a tri. More...
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. More...
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)
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 )
Creates a brick of specified width, depth, and height.
Parameters:
[in]
width
The width of the brick being created
[in]
depth
The depth of the brick being created
[in]
height
The height of the brick being created
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 )
/brief Calculates time step estimate on elements of/in entity type: "Tet" or "Hex" or "Volume" or "Block" or "Group" The hexes or tets must belong to a single block and that block must have a material assigned to it. That material must have elastic_modulus, poisson_ratio, and density defined.
Passing a command into Cubit using this method will result in an immediate execution of the command. The command is passed directly to Cubit without any validation or other checking.
Pointer to a string containing a complete Cubit command
collapse_edges()
int CubitInterface::collapse_edges ( std::vector< int > edge_ids, std::string quality_name = "Scaled Jacobian" )
/brief Collapses the specified edges by merging its nodes. If the collapse operation degrades the quality of surrounding triangles to worse than it was before, no collapse is performed. Calls the ’collapse edge <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 tris collapsed. Specifing a quality metric is optional. Supported ones are: "Scaled Jacobian" "Aspect Ratio" "Shape" Default is "Scaled Jacobian".
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()
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.)
Parameters:
line
[in/out] the line to be completed and the completed line num_chars [out] the number of characters added to the input line. If 0 there are multiple completions found_quote [out] if the end of quote was found
contains_virtual()
bool CubitInterface::contains_virtual ( const std::string & geometry_type, int entity_id )
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()
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 )
The degree of the bspline surface in the u/v-direction.
[in]
rational_u/v
True if surface is rational in the u/v-direction.
[in]
form_u/v
Specifies whether the surface is open (0), closed (1), or periodic (2) in the u/ direction.
[in]
pole_u/v
Indicates whether or not the surface has a singularity at the u-minimum or u-maximum parameter boundaries according to the following: 0 = > no singularity at u/v - minimum or u - maximum boundary 1 = > has a singularity at the u/v - minimum boundary 2 = > has a singularity at the u/v - maximum boundary 3 = > has a singularity at both boundaries
[in]
ctrl_pts
and weights The control points are contained in the array ctrlpts. The v index varies first. That is, a row of v control points for the first u value is found first. Then, the row of v control points for the next u value. If the surface is rational in either parameter, it is considered a rational surface and the associated weights are in the array weights. Each of the control points should be unique, except possibly the start and end points. The weight values must be positive.
[in]
point_tol
Determines when two control points are identical, and knot_tol performs the same function for the knot values.
[in]
knots_u/v
The knot sequence in u(and v) should form a non - negative, non - decreasing sequence with any knot value appearing at most degree_u(degree_v) times. In ACIS all B - spline surfaces interpolate their boundary control points. To achieve this, the end knot multiplicities are either(a) equal to the degree, or (b)equal to the degree plus one. If the end knot multiplicities are equal to the degree, then the number of knots should be equal to the number of control points plus the degree minus one num_knots = num_crtlpts + degree - 1. If the end knot multiplicities are equal to the degree plus one, then the number of knots should be equal to the number of control points plus the degree plus one num_knots = num_crtlpts + degree + 1. No assumption is made about the relationship between parameter values and object space distances; however, it is advantageous for the parameterization to be as homogeneous as possible. (That is, it is advantageous for the parameterization to be somewhat proportional to arclength.) In addition, it is advantageous for the parameterization in the two directions be of similar scale.ACIS also prefers that surfaces be G2 continuous; therefore, it may be advantageous to limit the knot multiplicities of interior knots to being less than degree - 2. The ID of the newly created surface. If surface creation was unsuccessful, returns -1.
A list of x, y, z coordinates representing the control points. The list should be of the form [x0, y0, z0, x1, y1, z1, ... , xn, yn, zn]. The minimum size of this list must be degree + 1.
[in]
weights
A list of weights for each control point. The size of this list should be equal to the number of control points.
[in]
knot_vec
The knot vector for the curve. This size of this list should be (num_ctrl_pts + degree - 1) or (num_ctrl_pts + degree + 1). If the former, end knot multiplicity should be the same as degree. If the latter, end knot multiplicity should be degree + 1.
Returns: The ID of the newly created curve. If curve creation was unsuccessful, returns -1.
create_spline()
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.
Parameters:
geometry_type
The type of geometry entity to esitmate mesh size geom_id The Id of the geometry entity to estimate mesh size percent_capture The requested percentage of capture for a curve
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.
Parameters:
volume_ids
The Id of the volumes that will be meshed with morph size The overlay grid size
Returns: The recommended number of procs to use for morph
estimate_morph_tet_element_count()
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)
Parameters:
curve_list
a list of curve ids (integers)
test_angle
the value (in degrees) that will be used in testing the exterior angle
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
Parameters:
curve
id (integer) volume id (integer)
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
Parameters:
surf
id (integer) vert id (integer)
Returns: angle in degrees
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 )
/brief Collapses each specified triangle 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 tri <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 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 surfaceA
in 'seed_surf_ids' uses a curvein the FORWARD sense and it can find
surface, B, that uses that same curvein a REVERSED sense, it adds B
to the list. The search continues with all of surfaceB'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
Returns: Requested data
get_assembly_description()
std::string CubitInterface::get_assembly_description ( int assembly_id)
Get the stored description of an assembly node.
Parameters:
assembly_id
Id that identifies the 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.
Parameters:
assembly_id
Id that identifies the 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.
Parameters:
assembly_id
Id that identifies the 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.
Parameters:
assembly_id
Id that identifies the 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.
Parameters:
assembly_id
Id that identifies the assembly node
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.
Parameters:
assembly_id
Id that identifies the assembly node
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.
Parameters:
volume_id
ID of the volume
data_type
Magic number representing the type of assembly information to return. 1 = Part Number, 2 = Description, 3 = Material Description 4 = Material Specification, 5 = Assembly Path, 6 = Original File
Returns: Requested data
get_assembly_name()
std::string CubitInterface::get_assembly_name ( int assembly_id)
Get the stored name of an assembly node.
Parameters:
assembly_id
Id that identifies the 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.
Parameters:
assembly_id
Id that identifies the 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.
Parameters:
assembly_id
Id that identifies the 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.
Parameters:
assembly_id
Id that identifies the assembly node
Returns: Units of the assembly node
get_assembly_weapons_category()
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.
Parameters:
entity_type
Specifies the geometry type of the entity
enitty_id_list
List (vector) of entity ids
size
The auto factor for the AutoSizeTool
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.
Parameters:
target_volume_ids
List of volume ids to examine.
body_list
User specified list where ids of bad bodies will be returned
volume_list
User specified list where ids of bad volumes will be returned
surface_list
User specified list where ids of bad surfaces will be returned
curve_list
User specified list where ids of bad curves will be returned
as an enum defined by CI_BCTypes. 1-9 is FEA, 10-30 is CFD
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.
Parameters:
bc_type_in
type of bc, as defined by enum CI_BCTypes. 1-9 is FEA, 10-30 is CFD
bc_id
ID of the desired 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.
Parameters:
target_volume_ids
List of volume ids to examine.
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.
Parameters:
block_id
The block id
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.
Parameters:
block_id
The block id
index
The index of the attribute
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.
Parameters:
block_id
The block id
index
The index of the attribute
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.
Parameters:
block_id
ID of block to examine
group_list
User specified list where groups associated with this block are returned
node_list
User specified list where nodes associated with this block are returned
edge_list
User specified list where edges associated with this block are returned
tri_list
User specified list where tris associated with this block are returned
face_list
User specified list where faces associated with this block are returned
pyramid_list
User specified list where pyramids associated with this block are returned
tet_list
User specified list where tets associated with this block are returned
hex_list
User specified list where hexes associated with this block are returned
volume_list
User specified list where volumes associated with this block are returned
surface_list
User specified list where surfaces associated with this block are returned
curve_list
User specified list where curves associated with this block are returned
vertex_list
User specified list where vertices associated with this block are returned
get_block_count()
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.
Parameters:
block_id
User specified id of the desired 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.
Parameters:
block_id
User specified id of the desired 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.
Parameters:
block_id
The block id
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.
Parameters:
block_id
The block id
index
The index of the attribute
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.
Parameters:
block_id
The block id
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.
Parameters:
block_id
User specified id of the desired block A list (python tuple) of node ids contained in the block A list (python tuple) of edge ids contained in the block A list (python tuple) of tri ids contained in the block A list (python tuple) of quad ids contained in the block A list (python tuple) of pyramid ids contained in the block A list (python tuple) of wedge ids contained in the block A list (python tuple) of tet ids contained in the block A list (python tuple) of hex ids contained in the block
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.
Parameters:
block_id
User specified id of the desired 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.
Parameters:
block_id
User specified id of the desired 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 )
Get the associated block id for a specific curve, surface, or volume.
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()
Get the list of chamfer surfaces for a list of volumes.
Parameters:
target_volume_ids
List of volume ids to examine.
thickness_threshold
max thickness criteria for chamfer
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.
Parameters:
surafce
id
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.
Parameters:
target_volume_ids
List of volume ids to examine.
mesh_size
Indicate the mesh size used as the threshold
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.
Parameters:
target_volume_ids
List of volume ids to examine.
mesh_size
Indicate the mesh size used as the threshold
genus
Indicate the genus of the surfaces requested. Genus is defined as the number of loops on the surface minus 1. To return any genus surface in the volume(s), use genus < 0
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)
Parameters:
target_volume_list
List of volumes ids to examine.
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.
Parameters:
target_volume_ids
List of volume ids to examine.
narrow_size
Indicate the narrow size threshold
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.
Parameters:
x
coordinate
y
coordinate
z
coordinate
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
Parameters:
target_volume_list
List of volumes ids to examine.
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.
Parameters:
surface_1_id
The id of one of the surfaces
surface_2_id
The id of the other surface
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.
Parameters:
curve_1_id
The id of one of the curves
curve_2_id
The id of the other curves
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
Parameters:
target_volume_ids
List of volume ids to examine.
get_connectivity()
std::vector<int> CubitInterface::get_connectivity ( const std::string & entity_type, int entity_id )
Get the list of node ids contained within a mesh entity.
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.
Parameters:
constraint_id
ID of the 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.
Parameters:
constraint_id
ID of the 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.
Parameters:
constraint_id
ID of the 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()
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.
Parameters:
vertex_id_1
ID of vertex 1 vertex_id_2 ID of vertex 2
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.
Parameters:
geom_type_1
geometry type of entity 1: "vertex", "curve", "surface", "volume" entity_id_1 ID of entity 1 geom_type_2 geometry type of entity 2: "vertex", "curve", "surface", "volume" entity_id_2 ID of entity 2
int CubitInterface::get_element_block ( int element_id)
return the block that a given element is in.
Parameters:
element_id
The element id (i.e. the global element export id)
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.
Parameters:
element_type
"hex" or "tet"
entity_id_list
List (vector) of volume ids
auto_factor
The current auto size factor value
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.
Parameters:
element_id
The element id (i.e. the global element export id)
Returns: true or false
get_element_type()
std::string CubitInterface::get_element_type ( int element_id)
return the type of a given element
Parameters:
element_id
The element id (i.e. the global element export id)
Returns: The type
get_element_type_id()
int CubitInterface::get_element_type_id ( int element_id)
return the type id of a given element
Parameters:
element_id
The element id (i.e. the global element export id)
Returns: type_id The hex, tet, wedge, etc. id is returned.
get_entities()
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.
Names returned are of two types: 1) user defined names which are actually stored in Cubit when the name is defined, and 2) ’default’ names supplied by Cubit at run-time which are not stored in Cubit. The second variety of name cannot be used to query Cubit.
The type of mesh entity. Works for ’quad, ’face’, ’tri’, ’hex’, ’tet’, ’edge’, ’node’
mesh_entity_list
A string containing space delimited ids, Cubit command form (i.e. ’all’, ’1 to 8’, ’1 2 3’, etc)
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 )
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of bodies ids contained in the specified group
get_group_children()
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.
Parameters:
group_id
ID of the group to examine
group_list
User specified list where group ids will be returned
body_list
User specified list where body ids will be returned
volume_list
User specified list where volume ids will be returned
surface_list
User specified list where surface ids will be returned
curve_list
User specified list where curve ids will be returned
vertex_list
User specified list where vertex ids will be returned
node_count
User specified variable where the number of nodes will be returned
edge_count
User specified variable where the number of edges will be returned
hex_count
User specified variable where the number of hexes will be returned
quad_count
User specified variable where the number of quads will be returned
tet_count
User specified variable where the number of tets will be returned
tri_count
User specified variable where the number of tris will be returned
get_group_curves()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of curve ids contained in the specified group
get_group_edges()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of edge ids contained in the specified group
get_group_groups()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of group ids contained in the specified group
get_group_hexes()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of hex ids contained in the specified group
get_group_nodes()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of node ids contained in the specified group
get_group_pyramids()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of pyramid ids contained in the specified group
get_group_quads()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of quad ids contained in the specified group
get_group_spheres()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of sphere ids contained in the specified group
get_group_surfaces()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of surface ids contained in the specified group
get_group_tets()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of tet ids contained in the specified group
get_group_tris()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of tri ids contained in the specified group
get_group_vertices()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of vertex ids contained in the specified group
get_group_volumes()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of volume ids contained in the specified group
get_group_wedges()
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.
Parameters:
group_id
ID of the group to examine return List (python tuple) of wedge ids contained in the specified group
get_heatflux_on_area()
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)
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.
Parameters:
surface_id
ID of the 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.
Parameters:
volume_id
ID of the 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.
This routine returns an integer id for the entity whose name is passed in.
/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()
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.
Parameters:
error_code
The error code associated with the error solution
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.
Parameters:
geom_type
either "surface" or "volume"
entity_id
the entity id
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 )
Get the group ids which are parents to the indicated mesh element.
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
Parameters:
op_type
operation type (see get_ML_operation_features)
entity1_id
first entity associated with operation (see table)
entity2_id
second entity associated with operation (see table)
params
optional parameters for operation
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.
Parameters:
op_type
cubit operation id from table in get_ML_operation_features
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
Parameters:
op_type
cubit operation id from table in get_ML_operation_features
get_ML_operation_feature_types()
std::vector<std::string> CubitInterface::get_ML_operation_feature_types ( const int op_type)
for the given operation type described by get_ML_operation_features, return a vector of strings indicating the type of data for each feature in the vector. Will return one of the following for each index:
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..)
Parameters:
op_types
cubit operation id from table in get_ML_operation_features
get_ML_operation_features()
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.
Parameters:
body_ids
List of bodies to search for surface overlaps
filter_sliver
Optional parameter that removes false positives from the output omitting overlapping pairs sharing a merged curve sharing merged curves.
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.
Parameters:
bc_type_in
Type of bc to query, as defined by enum CI_BCTypes. 1-9 is FEA, 10-30 is CFD
bc_id
ID of the bc to query
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.
Parameters:
nodeset_id
The nodeset id
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.
Parameters:
nodeset_id
User specified id of the desired nodeset
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.
Parameters:
nodeset_id
User specified id of the desired 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.
Parameters:
nodeset_id
User specified id of the desired 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.
Parameters:
nodeset_id
User specified id of the desired 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.
Parameters:
nodeset_id
User specified id of the desired nodeset
Returns: A list (python tuple) of volume ids contained in the nodeset
get_overlap_max_angle()
get element quality at a list of geometry entities. Finds all elements with nodes ON/IN the specified geometry and finds the quality of all elements of the specfied element type that are connected. Same arguments and return values as get_elem_quality_stats except a geometry and element type are used as arguments
Get the relatives (parents/children) of a specified entity.
This can be used to get either ancestors or predecessors for a specific entity. Only one specified entity type is returned with one use of the routine. For example, to get all surface parents associated with Curve 1, ’curve’ is the source_geometry_type, ’1’ is the source_id, and ’surface’ is the target_geom_type.
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
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.
Parameters:
target_volume_ids
List of volume ids to examine.
large_curve_angles
User specified list where the ids of curves with curve angles will be returned
small_curve_angles
User specified list where the ids of curves with small angles will be returned
large_angles
User specified list where the angles associated with large_curve_angles will be returned. Angles returned are in the same order as the ids returned in large_curve_angles.
small_angles
User specified list where the angles associated with small_curve_angles will be returned. Angles returned are in the same order as the ids returned in small_curve_angles.
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.
Parameters:
target_volume_ids
List of volume ids to examine.
large_surface_angles
User specified list where the ids of surfaces with large angles will be returned
small_surface_angles
User specified list where the ids of surfaces with small angles will be returned
large_angles
User specified list where the angles associated with large_surface_angles will be returned. Angles returned are in the same order as the ids returned in large_surface_angles.
small_angles
User specified list where the angles associated with small_surface_angles will be returned. Angles returned are in the same order as the ids returned in small_surface_angles.
upper_bound
Upper threshold angle
lower_bound
Lower threshold angle
get_sideset_children()
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.
Parameters:
sideset_id
User specified id of the desired sideset
face_list
User specified list where faces associated with this sideset are returned
surface_list
User specified list where surfaces associated with this sideset are returned
curve_list
User specified list where curves associated with this sideset are returned
get_sideset_count()
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.
Parameters:
sideset_id
User specified id of the desired 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.
Parameters:
sideset_id
User specified id of the desired 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)
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.
Parameters:
bc_type_in
Type of bc to query, as defined by enum CI_BCTypes. 1-9 is FEA, 10-30 is CFD
bc_id
ID of the bc to query
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.
Parameters:
sideset_id
User specified id of the desired 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.
Parameters:
sideset_id
User specified id of the desired 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.
Parameters:
curve_ids
IDs of curve to compare against
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.
Parameters:
surface_ids
IDs of surface to compare against
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.
Parameters:
volume_ids
IDs of volume(s) to compare against
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.
Parameters:
entity_type
Type (volume or surface)
entity_id
Id of the entity
Returns: The sizing function name (constant, curvature, interval, inverse, linear, super, test, exodus, none)
get_small_and_narrow_surfaces()
Get the list of small or narrow surfaces from a list of volumes.
Parameters:
target_volume_ids
List of volume ids to examine.
small_area
Indicate the area threshold
small_curve_size
Indicate size for ’narrowness’
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.
Parameters:
target_volume_ids
List of volume ids to examine. in Cubit is valid as input here.
mesh_size
Indicate the mesh size used as the threshold
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.
Parameters:
target_volume_ids
List of volume ids to examine. max_radius maximum radius of curvature for which blend surfaces will be returned if max_radius = 0, then all blend surfaces will be returned.
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.
Parameters:
target_volume_ids
List of volume ids to examine.
mesh_size
Indicate the mesh size used as the threshold
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.
Parameters:
target_volume_ids
List of volume ids to examine.
mesh_size
Indicate the mesh size used as the threshold
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.
Parameters:
target_volume_ids
List of volume ids to examine.
mesh_size
Indicate the mesh size used as the threshold
returned_small_surfaces
ids of small hydraulic radius surfaces will be returned
returned_small_radius
User The hydrualic radius of each small surface will be returned. The order of the radius values is the same as the order of the returned ids.
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.
Parameters:
target_volume_ids
List of volume ids to examine.
mesh_size
Indicate the mesh size used as the threshold
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.
Parameters:
target_volume_ids
List of volume ids to examine.
mesh_size
Indicate the mesh size used as the threshold
small_volumes
User specified list where the ids of small volumes will be returned
small_radius
User specified list where the radius of each small volume will be returned. The order of the radius values is the same as the order of the returned ids.
get_smallest_curves()
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’.
Parameters:
target_volume_ids
List of volume ids to examine. in Cubit is valid as input here.
num_to_return
Indicate the number of curves 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 )
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.
Parameters:
geom_type
"curve", "surface", "volume" or "body"
geom_id
ID of geometry entity
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.
Parameters:
surface_id
the surface being queried
mesh_size
Indicate size for ’narrowness’
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.
Parameters:
surface_id
cone surface
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
Parameters:
volume_id
id of volume source_surface_id_list list of source surface ids target_surface_id_list list of target surface ids small_curve_size optional paramtere to specify small curve size
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.
Parameters:
vertex_id
ID of the vertex
curve_id
ID of the curve
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.
Parameters:
vertex_id
ID of the vertex
surface_id
ID of the 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. 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.
Parameters:
id
of surface 1
id
of surface 2
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.
Parameters:
id
of volume 1
id
of volume 2
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()
Get lists of display, preview and command strings for sharp angle solutions.
Parameters:
vertex_id
vertex with sharp angle
small_curve_size
Threshold value used to determine what ’small’ is
mesh_size
Element size of the model
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()
Get lists of display, preview and command strings for small curve solutions.
Parameters:
curve_id
Small curve
small_curve_size
Threshold value used to determine what ’small’ is
mesh_size
Element size of the model
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()
Get lists of display, preview and command strings for small surface solutions.
Parameters:
surface_id
Small surface
small_curve_size
Threshold value used to determine what ’small’ is
mesh_size
Element size of the model
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()
Get lists of display, preview and command strings for surfaces with narrow regions solutions.
Parameters:
surface_id
Small surface
small_curve_size
Threshold value used to determine what ’small’ is
mesh_size
Element size of the model
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()
Get lists of display, preview and command strings for small volume solutions.
Parameters:
vol_id
small_curve_size
Threshold value used to determine what ’small’ is
mesh_size
Element size of the model
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.
Parameters:
volume_id
Specifies the volume id
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)
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 )
Get the lower dimesion entities associated with a higher dimension entities. For example get the faces associated with a hex or the edges associated with a tri.
The mesh element type of the higher dimension entity
entity_id
The mesh element id
dimension
The dimension of the desired sub entities
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.
Parameters:
the
id of the surface
Returns: a vector of pairs of <id, corner_type> The corner_types are defined as follows
double CubitInterface::get_surface_area ( int surface_id)
Get the area of a surface.
Parameters:
surface_id
ID of the 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.
Parameters:
surface_id
ID of the 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
Parameters:
surface_id
User specified id of the desired 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)
Get list of node ids owned by a surface. Excludes nodes owned by bounding curves and verts.
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.
Parameters:
target_volume_ids
List of volume ids to examine.
upper_bound
Upper threshold angle
lower_bound
Lower threshold angle
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.
Parameters:
volume_id
Specifies the volume id
Returns: List (python tuple) of surface ids
get_tet_count()