Cubit Python API  16.04
Classes
CubitInterface Namespace Reference

The CubitInterface provides a Python/C++ interface into Cubit. More...

Classes

class  AssemblyItem
 Class to implement assembly tree interface. More...
 
class  Body
 Defines a body object that mostly parallels Cubit's Body class. More...
 
class  CFD_BC_Entity
 Class to implement cfd bc data retrieval. More...
 
class  CubitFailureException
 An exception class to alert the caller when the underlying Cubit function fails. More...
 
class  Curve
 Defines a curve object that mostly parallels Cubit's RefEdge class. More...
 
class  Dir
 Defines a direction object. More...
 
class  Entity
 The base class of all the geometry and mesh types. More...
 
class  GeomEntity
 The base class for specifically the Geometry types (Body, Surface, etc.) More...
 
class  InvalidEntityException
 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...
 
class  InvalidInputException
 An exception class to alert the caller of a function that invalid inputs were entered. More...
 
class  Loc
 Defines a location object. More...
 
class  MeshErrorFeedback
 Class to implement mesh command feedback processing. More...
 
class  Surface
 Defines a surface object that mostly parallels Cubit's RefFace class. More...
 
class  Vertex
 Defines a vertex object that mostly parallels Cubit's RefVertex class. More...
 
class  Volume
 Defines a volume object that mostly parallels Cubit's RefVolume class. More...
 

Functions

System Control and Data
void set_progress_handler (CubitProgressHandler *progress)
 Register a progress-bar callback handler with Cubit. Deletes the current progress handler if it exists. More...
 
CubitProgressHandler * replace_progress_handler (CubitProgressHandler *progress)
 Register a new progress-bar callback handler with Cubit and return the the previous progress-handler without deleting it. More...
 
void set_cubit_interrupt (bool interrupt)
 This sets the global flag in Cubit that stops all interruptable processes. More...
 
void set_playback_paused_on_error (bool pause)
 Sets whether or not playback is paused when an error occurs. More...
 
bool is_playback_paused_on_error ()
 Gets whether or not playback is paused when an error occurs. More...
 
bool developer_commands_are_enabled ()
 This checks to see whether developer commands are enabled. More...
 
CubitBaseInterface * get_interface (std::string interface_name)
 Get the interface of a given name. More...
 
bool release_interface (CubitBaseInterface *instance)
 Release the interface with the given name. More...
 
CubitPluginManager * plugin_manager ()
 
void add_filename_to_recent_file_list (std::string &filename)
 Adds the filename to the recent file list. More...
 
std::string get_version ()
 Get the Cubit version. More...
 
std::string get_revision_date ()
 Get the Cubit revision date. More...
 
std::string get_build_number ()
 Get the Cubit build number. More...
 
std::string get_acis_version ()
 Get the Acis version number. More...
 
int get_acis_version_as_int ()
 Get the Acis version number as an int. More...
 
std::string get_exodus_version ()
 Get the Exodus version number. More...
 
std::string get_meshgems_version ()
 Get the MeshGems version number. More...
 
double get_cubit_digits_setting ()
 Get the Cubit digits setting. More...
 
std::string get_graphics_version ()
 Get the VTK version number. More...
 
std::string get_python_version ()
 get the python version used in cubit More...
 
void print_cmd_options ()
 Used to print the command line options. More...
 
bool is_modified ()
 Get the modified status of the model. More...
 
void set_modified ()
 Set the status of the model (is_modified() is now false). If you modify the model after you set this flag, it will register true. More...
 
bool is_undo_save_needed ()
 Get the status of the model relative to undo checkpointing. More...
 
void set_undo_saved ()
 Set the status of the model relative to undo checkpointin. More...
 
bool is_performing_undo ()
 Check if an undo command is currently being performed. More...
 
bool is_command_echoed ()
 Check the echo flag in cubit. More...
 
std::string get_command_from_history (int command_number)
 Get a specific command from Cubit's command history buffer. More...
 
std::string get_next_command_from_history ()
 Get 'next' command from history buffer. More...
 
std::string get_previous_command_from_history ()
 Get 'previous' command from history buffer. More...
 
bool is_volume_meshable (int volume_id)
 Check if volume is meshable with current scheme. More...
 
void journal_commands (bool state)
 Set the journaling flag in cubit. More...
 
bool is_command_journaled ()
 Check the journaling flag in cubit. More...
 
void write_to_journal (std::string words)
 Write a string to the active journal. More...
 
void override_journal_stream (JournalStreamBase *jnl_stream)
 Override the Journal Stream in CUBIT. More...
 
std::string get_current_journal_file ()
 Gets the current journal file name. More...
 
bool is_working_dir_set ()
 Create BCVizInterface for CompSimUI. More...
 
bool cmd (const char *input_string)
 Pass a command string into Cubit. More...
 
bool silent_cmd (const char *input_string)
 Pass a command string into Cubit and have it executed without being verbose at the command prompt. More...
 
bool was_last_cmd_undoable ()
 Report whether the last executed command was undoable. More...
 
std::vector< int > parse_cubit_list (const std::string &type, std::string entity_list_string)
 Parse a Cubit style entity list into a list of integers. More...
 
std::string string_from_id_list (std::vector< int > ids)
 Parse a list of integers into a Cubit style id list. Includes carriage return and line breaks at column 80. More...
 
std::string get_id_string (const std::vector< int > &entity_ids)
 Parse a list of integers into a Cubit style id list. Return string will not include carriage returns or line break. More...
 
void print_raw_help (const char *input_line, int order_dependent, int consecutive_dependent)
 Used to print out help when a ?, & or ! is pressed. More...
 
int get_error_count ()
 Get the number of errors in the current Cubit session. More...
 
std::vector< std::string > get_mesh_error_solutions (int error_code)
 Get the paired list of mesh error solutions and help context cues. 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...
 
Graphics Manipulation and Data
double get_view_distance ()
 Get the distance from the camera to the model (from - at) More...
 
std::array< double, 3 > get_view_at ()
 Get the camera 'at' point. More...
 
std::array< double, 3 > get_view_from ()
 Get the camera 'from' point. More...
 
std::array< double, 3 > get_view_up ()
 Get the camera 'up' direction. More...
 
void reset_camera ()
 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. More...
 
void flush_graphics ()
 Flush the graphics. More...
 
void clear_drawing_set (const std::string &set_name)
 Clear a named drawing set (this is for mesh preview) More...
 
void unselect_entity (const std::string &entity_type, int entity_id)
 Unselect an entity that is currently selected. More...
 
int get_rubberband_shape ()
 Get the current rubberband select mode. More...
 
bool is_perspective_on ()
 Get the current perspective mode. More...
 
bool is_occlusion_on ()
 Get the current occlusion mode. More...
 
bool is_scale_visibility_on ()
 Get the current scale visibility setting. More...
 
bool is_mesh_visibility_on ()
 Get the current mesh visibility setting. More...
 
bool is_geometry_visibility_on ()
 Get the current geometry visibility setting. More...
 
bool is_select_partial_on ()
 Get the current select partial setting. More...
 
int get_rendering_mode ()
 Get the current rendering mode. More...
 
void set_rendering_mode (int mode)
 Set the current rendering mode. More...
 
void clear_highlight ()
 Clear all entity highlights. More...
 
void clear_preview ()
 Clear preview graphics without affecting other display settings. More...
 
void highlight (const std::string &entity_type, int entity_id)
 Highlight the given entity. More...
 
std::vector< int > get_selected_ids ()
 Get a list of the currently selected ids. More...
 
int get_selected_id (int index)
 Get the selected id based on an index. More...
 
std::string get_selected_type (int index)
 Get the selected type based on an index. More...
 
const char * get_pick_type ()
 Get the current pick type. More...
 
void set_pick_type (const std::string &pick_type, bool silent=false)
 Set the pick type. More...
 
void set_filter_types (int num_types, const std::vector< std::string > filter_types)
 Set the pick filter types. More...
 
void add_filter_type (const std::string &filter_type)
 Add a filter type. More...
 
void remove_filter_type (const std::string &filter_type)
 Remove a filter type. More...
 
bool is_type_filtered (const std::string &filter_type)
 Determine whether a type is filtered. More...
 
std::vector< std::string > get_pick_filters ()
 Get a list of the current pick filters. More...
 
void clear_picked_list ()
 Clear the picked list. More...
 
void step_next_possible_selection ()
 Step to the next possible selection (selected next dialog) More...
 
void step_previous_possible_selection ()
 Step to the previous possible selection (selected next dialog) More...
 
void print_current_selections ()
 Print the current selections. More...
 
void print_currently_selected_entity ()
 Print the current selection. More...
 
int current_selection_count ()
 Get the current count of selected items. More...
 
Mesh Query Support
double get_mesh_edge_length (int edge_id)
 Get the length of a mesh edge. More...
 
double 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. More...
 
double 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. More...
 
size_t estimate_morph_tet_element_count (const std::vector< int > &volume_ids, double size, bool keep_void)
 Return estimated tet element count for volumes. More...
 
int 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. More...
 
double get_meshed_volume_or_area (const std::string &geometry_type, std::vector< int > entity_ids)
 Get the total volume/area of a entity's mesh. More...
 
int get_mesh_intervals (const std::string &geometry_type, int entity_id)
 Get the interval count for a specified entity. More...
 
double get_mesh_size (const std::string &geometry_type, int entity_id)
 Get the mesh size for a specified entity. More...
 
double get_requested_mesh_size (const std::string &geometry_type, int id)
 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. More...
 
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. More...
 
double get_default_auto_size ()
 Get auto size needs for the current set of geometry. More...
 
int get_requested_mesh_intervals (const std::string &geometry_type, int entity_id)
 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...
 
std::string get_exodus_sizing_function_variable_name ()
 Get the exodus sizing function variable name. More...
 
std::string get_exodus_sizing_function_file_name ()
 Get the exodus sizing function file name. More...
 
std::string get_sizing_function_name (const std::string &entity_type, int surface_id)
 Get the sizing function name for a surface or volume. More...
 
bool exodus_sizing_function_file_exists ()
 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...
 
std::string get_curve_bias_type (int curve_id)
 
double get_curve_bias_geometric_factor (int curve_id)
 
double get_curve_bias_geometric_factor2 (int curve_id)
 
double get_curve_bias_first_interval_length (int curve_id)
 
double get_curve_bias_first_interval_fraction (int curve_id)
 
double get_curve_bias_fine_size (int curve_id)
 
double get_curve_bias_coarse_size (int curve_id)
 
double get_curve_bias_first_last_ratio1 (int curve_id)
 
double get_curve_bias_first_last_ratio2 (int curve_id)
 
double get_curve_bias_last_first_ratio1 (int curve_id)
 
double get_curve_bias_last_first_ratio2 (int curve_id)
 
bool get_curve_bias_from_start (int curve_id, bool &value)
 
bool get_curve_bias_from_start_set (int curve_id)
 
int get_curve_bias_start_vertex_id (int curve_id)
 
double get_curve_mesh_scheme_curvature (int curve_id)
 Get the curvature mesh scheme value of a curve. More...
 
bool get_curve_mesh_scheme_stretch_values (int curve_id, double &first_size, double &factor, double &last_size, bool &start, int &vertex_id)
 
std::vector< double > get_curve_mesh_scheme_pinpoint_locations (int curve_id)
 
void 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. More...
 
std::vector< double > 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)
 python callable version of the get_quality_stats without pass by reference arguments. All return values are stuffed into a double array More...
 
std::vector< double > 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)
 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::vector< double > get_quality_values (const std::string &mesh_type, std::vector< int > mesh_ids, const std::string &metric_name)
 Get the metric values for specified mesh entities. More...
 
std::string get_mesh_scheme (const std::string &geometry_type, int entity_id)
 Get the mesh scheme for the specified entity. More...
 
std::string get_mesh_scheme_firmness (const std::string &geometry_type, int entity_id)
 Get the mesh scheme firmness for the specified entity. More...
 
std::string get_mesh_interval_firmness (const std::string &geometry_type, int entity_id)
 Get the mesh interval firmness for the specified entity. This may include influence from connected mesh intervals on connected geometry. More...
 
std::string get_requested_mesh_interval_firmness (const std::string &geometry_type, int entity_id)
 Get the mesh interval firmness for the specified entity as set specifically on the entity. More...
 
std::string get_mesh_size_type (const std::string &geometry_type, int entity_id)
 Get the mesh size setting type for the specified entity. This may include influence from attached geometry. More...
 
std::string get_requested_mesh_size_type (const std::string &geometry_type, int entity_id)
 Get the mesh size setting type for the specified entity as set specifically on the entity. More...
 
bool get_tetmesh_proximity_flag (int volume_id)
 Get the proximity flag for tet meshing. More...
 
int 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. More...
 
double get_tetmesh_growth_factor (int volume_id)
 Get the tetmesh growth factor. More...
 
bool get_tetmesh_parallel ()
 Get the parallel flag for tet meshing. Defines whether to use parallel mesher. More...
 
int get_tetmesh_num_anisotropic_layers ()
 Get the number of anisotropic tet layers. Global setting. More...
 
int get_tetmesh_optimization_level ()
 Get the optimization level for tetmeshing. Global setting. More...
 
bool get_tetmesh_insert_mid_nodes ()
 Get the state of the flag to insert midnodes during meshing. Global setting. More...
 
bool get_tetmesh_optimize_mid_nodes ()
 Get the state of the flag to optimize midnodes during meshing. Global setting. More...
 
bool get_tetmesh_optimize_overconstrained_tets ()
 Get the state of the flag to optimize overconstrained tets. Global setting. More...
 
bool get_tetmesh_optimize_overconstrained_edges ()
 Get the state of the flag to optimize overconstrained edges. Global setting. More...
 
bool get_tetmesh_minimize_slivers ()
 Get the state of the flag to minimize sliver tets. Global setting. More...
 
bool get_tetmesh_minimize_interior_points ()
 Get the state of the flag to minimize interior points in tetmesher. Global setting. More...
 
bool get_tetmesh_relax_surface_constraints ()
 Get the state of the flag to relax surface mesh constraints in tetmesher. Global setting. More...
 
double get_mesh_geometry_approximation_angle (std::string geometry_type, int entity_id)
 Get the geometry approximation angle set for tri/tet meshing. More...
 
double get_trimesh_surface_gradation ()
 Get the global surface mesh gradation set for meshing with MeshGems. More...
 
double get_trimesh_volume_gradation ()
 Get the global volume mesh gradation set for meshing with MeshGems. More...
 
double 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. More...
 
bool get_trimesh_geometry_sizing ()
 Get the global geometry sizing flag for trimesher. More...
 
int get_trimesh_num_anisotropic_layers ()
 Get the global number of anisotropic layers for trimeshing. More...
 
bool get_trimesh_split_overconstrained_edges ()
 Get the global setting for trimesher split over-constrained edges. More...
 
int best_edge_to_collapse_interior_node (int node_id)
 Finds the best edge to collapse this node along to remove the interior node. More...
 
double get_trimesh_tiny_edge_length ()
 Get the global setting for tiny edge length in trimesher. More...
 
double get_trimesh_ridge_angle ()
 Get the global setting for ridge angle in trimesher. More...
 
bool is_meshed (const std::string &geometry_type, int entity_id)
 Determines whether a specified entity is meshed. More...
 
bool is_merged (const std::string &geometry_type, int entity_id)
 Determines whether a specified entity is merged. More...
 
std::string get_smooth_scheme (const std::string &geometry_type, int entity_id)
 Get the smooth scheme for a specified entity. More...
 
int get_hex_count ()
 Get the count of hexes in the model. More...
 
int get_pyramid_count ()
 Get the count of pyramids in the model. More...
 
int get_tet_count ()
 Get the count of tets in the model. More...
 
int get_quad_count ()
 Get the count of quads in the model. More...
 
int get_tri_count ()
 Get the count of tris in the model. More...
 
int get_edge_count ()
 Get the count of edges in the model. More...
 
int get_sphere_count ()
 Get the count of sphere elements in the model. More...
 
int get_node_count ()
 Get the count of nodes in the model. More...
 
int get_element_count ()
 Get the count of elements in the model. More...
 
int get_volume_element_count (int volume_id)
 Get the count of elements in a volume. More...
 
int get_surface_element_count (int surface_id)
 Get the count of elements in a surface. More...
 
bool volume_contains_tets (int volume_id)
 Determine whether a volume contains tets. More...
 
std::vector< int > 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. More...
 
std::string get_default_element_type ()
 Get the current default setting for the element type that will be used when meshing. More...
 
Geometry Query Support
bool is_visible (const std::string &geometry_type, int entity_id)
 Query visibility for a specific entity. More...
 
bool is_virtual (const std::string &geometry_type, int entity_id)
 Query virtualality for a specific entity. More...
 
bool contains_virtual (const std::string &geometry_type, int entity_id)
 Query virtualality of an entity's children. More...
 
std::vector< int > get_source_surfaces (int volume_id)
 Get a list of a volume's sweep source surfaces. More...
 
std::vector< int > get_target_surfaces (int volume_id)
 Get a list of a volume's sweep target surfaces. More...
 
int get_common_curve_id (int surface_1_id, int surface_2_id)
 Given 2 surfaces, get the common curve id. More...
 
int get_common_vertex_id (int curve_1_id, int curve_2_id)
 Given 2 curves, get the common vertex id. More...
 
std::vector< std::vector< double > > 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...
 
std::string get_merge_setting (const std::string &geometry_type, int entity_id)
 Get the merge setting for a specified entity. More...
 
std::string get_curve_type (int curve_id)
 Get the curve type for a specified curve. More...
 
std::string get_surface_type (int surface_id)
 Get the surface type for a specified surface. More...
 
std::array< double, 3 > get_surface_normal (int surface_id)
 Get the surface normal for a specified surface. More...
 
std::array< double, 3 > get_surface_normal_at_coord (int surface_id, std::array< double, 3 >)
 Get the surface normal for a specified surface at a location. More...
 
std::array< double, 3 > get_surface_centroid (int surface_id)
 Get the surface centroid for a specified surface. More...
 
std::string get_surface_sense (int surface_id)
 Get the surface sense for a specified surface. More...
 
std::vector< std::string > get_entity_modeler_engine (const std::string &geometry_type, int entity_id)
 Get the modeler engine type for a specified entity. More...
 
std::string get_default_geometry_engine ()
 Get the name of the default modeler engine. More...
 
std::array< double, 10 > get_bounding_box (const std::string &geometry_type, int entity_id)
 Get the bounding box for a specified entity. More...
 
std::array< double, 10 > get_total_bounding_box (const std::string &geometry_type, std::vector< int > entity_list)
 Get the bounding box for a list of entities. More...
 
std::array< double, 15 > get_tight_bounding_box (const std::string &geometry_type, std::vector< int > entity_list)
 Get the tight bounding box for a list of entities. More...
 
double get_total_volume (std::vector< int > volume_list)
 Get the total volume for a list of volume ids. More...
 
std::string get_entity_name (const std::string &entity_type, int entity_id, bool no_default=false)
 Get the name of a specified entity. More...
 
bool set_entity_name (const std::string &entity_type, int entity_id, const std::string &new_name)
 Set the name of a specified entity. More...
 
int get_entity_color_index (const std::string &entity_type, int entity_id)
 Get the color of a specified entity. More...
 
bool is_multi_volume (int body_id)
 Query whether a specified body is a multi volume body. More...
 
bool is_sheet_body (int volume_id)
 Query whether a specified volume is a sheet body. More...
 
bool is_interval_count_odd (int surface_id)
 Query whether a specified surface has an odd loop. More...
 
bool is_periodic (const std::string &geometry_type, int entity_id)
 Query whether a specified surface or curve is periodic. More...
 
bool is_surface_planer (int surface_id)
 Query whether a specified surface is planer. More...
 
bool is_surface_planar (int surface_id)
 
void 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. More...
 
bool get_undo_enabled ()
 Query whether undo is currently enabled. More...
 
int number_undo_commands ()
 Query whether there are any undo commands to execute. More...
 
std::vector< std::string > get_aprepro_vars ()
 Gets the current aprepro variable names. More...
 
std::string get_aprepro_value_as_string (std::string variable_name)
 Gets the string value of an aprepro variable. More...
 
bool 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. More...
 
double get_aprepro_numeric_value (std::string variable_name)
 get the value of the given aprepro variable More...
 
bool get_node_constraint ()
 Query current setting for node constraint (move nodes to geometry) More...
 
int get_node_constraint_value ()
 Query current setting for node constraint (move nodes to geometry) More...
 
double get_node_constraint_smart_threshold ()
 Query current setting for node constraint smart threshold. More...
 
std::string get_node_constraint_smart_metric ()
 Query current setting for node constraint smart metric Currently only for tets. Return either "distortion" of "normalized inradius". More...
 
std::string 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". More...
 
std::vector< int > 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. More...
 
std::vector< int > get_adjacent_surfaces (const std::string &geometry_type, int entity_id)
 Get a list of adjacent surfaces to a specified entity. More...
 
std::vector< int > get_adjacent_volumes (const std::string &geometry_type, int entity_id)
 Get a list of adjacent volumes to a specified entity. More...
 
std::vector< int > get_entities (const std::string &entity_type)
 Get all entities of a specified type (including geometry, mesh, etc...) More...
 
std::vector< int > get_list_of_free_ref_entities (const std::string &geometry_type)
 Get all free entities of a given geometry type. More...
 
int get_owning_body (const std::string &geometry_type, int entity_id)
 Get the owning body for a specified entity. More...
 
int get_owning_volume (const std::string &geometry_type, int entity_id)
 Get the owning volume for a specified entity. More...
 
int get_owning_volume_by_name (const std::string &entity_name)
 Get the owning volume for a specified entity. More...
 
double get_curve_length (int curve_id)
 Get the length of a specified curve. More...
 
double get_arc_length (int curve_id)
 Get the arc length of a specified curve. More...
 
double 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. More...
 
double get_curve_radius (int curve_id)
 Get the radius of a specified arc. More...
 
std::array< double, 3 > get_curve_center (int curve_id)
 Get the center point of the arc. More...
 
double get_surface_area (int surface_id)
 Get the area of a surface. More...
 
std::vector< int > get_similar_curves (std::vector< int > curve_ids, double tol=1e-3, bool use_percent_tol=true, bool on_similar_vols=true)
 Get similar curves with the same length. More...
 
std::vector< int > get_similar_surfaces (std::vector< int > surface_ids, double tol=1e-3, bool use_percent_tol=true, bool on_similar_vols=true)
 Get similar surfaces with the same area and number of curves. More...
 
std::vector< int > get_similar_volumes (std::vector< int > volume_ids, double tol=1e-3, bool use_percent_tol=true)
 Get similar volumes with the same volume and number of faces. More...
 
std::vector< double > get_surface_principal_curvatures (int surface_id)
 Get the principal curvatures of a surface at surface mid_point. More...
 
double get_volume_area (int volume_id)
 Get the area of a volume. More...
 
double get_volume_volume (int vol_id)
 Get the volume of a volume. More...
 
int get_num_volume_shells (int volume_id)
 Get the number of shells in this volume. More...
 
double get_hydraulic_radius_surface_area (int surface_id)
 Get the area of a hydraulic surface. More...
 
double get_hydraulic_radius_volume_area (int volume_id)
 Get the area of a hydraulic volume. More...
 
std::array< double, 3 > get_center_point (const std::string &entity_type, int entity_id)
 Get the center point of a specified entity. More...
 
int get_valence (int vertex_id)
 Get the valence for a specific vertex. More...
 
double get_distance_between (int vertex_id_1, int vertex_id_2)
 Get the distance between two vertices. More...
 
double 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. More...
 
int 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. More...
 
void print_surface_summary_stats ()
 Print the surface summary stats to the console. More...
 
void print_volume_summary_stats ()
 Print the volume summary stats to the console. More...
 
int get_block_count ()
 Get the current number of blocks. More...
 
int get_sideset_count ()
 Get the current number of sidesets. More...
 
int get_nodeset_count ()
 Get the current number of sidesets. More...
 
int get_volume_count ()
 Get the current number of nodesets. More...
 
int get_body_count ()
 Get the current number of bodies. More...
 
int get_surface_count ()
 Get the current number of surfaces. More...
 
int get_vertex_count ()
 Get the current number of vertices. More...
 
int get_curve_count ()
 Get the current number of curves. More...
 
int get_curve_count_in_volumes (std::vector< int > target_volume_ids)
 Get the current number of curves in the passed-in volumes. More...
 
bool is_catia_engine_available ()
 Determine whether catia engine is available. More...
 
bool is_acis_engine_available ()
 
bool is_opencascade_engine_available ()
 
std::vector< int > 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) More...
 
double evaluate_exterior_angle_at_curve (int curve_id, int volume_id)
 return exterior angle at a single curve with respect to a volume More...
 
double evaluate_surface_angle_at_vertex (int surf_id, int vert_id)
 return interior angle at a vertex on a specified surface More...
 
double get_overlap_max_gap (void)
 Get the max gap setting for calculating surface overlaps. More...
 
void set_overlap_max_gap (const double maximum_gap)
 Set the max gap setting for calculating surface overlaps. More...
 
double get_overlap_min_gap (void)
 Get the min gap setting for calculating surface overlaps. More...
 
void set_overlap_min_gap (const double min_gap)
 Set the min gap setting for calculating surface overlaps. More...
 
double get_overlap_max_angle (void)
 Get the max angle setting for calculating surface overlaps. More...
 
void set_overlap_max_angle (const double maximum_angle)
 Set the max angle setting for calculating surface overlaps. More...
 
Geometry Repair Support
void 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. More...
 
std::vector< int > 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. More...
 
void 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. More...
 
std::vector< int > get_small_curves (std::vector< int > target_volume_ids, double mesh_size)
 Get the list of small curves for a list of volumes. More...
 
std::vector< int > 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'. More...
 
std::vector< int > get_small_surfaces (std::vector< int > target_volume_ids, double mesh_size)
 Get the list of small surfaces for a list of volumes. More...
 
bool is_narrow_surface (int surface_id, double mesh_size)
 return whether the surface is narrow (has a width smaller than mesh_size) More...
 
std::vector< int > get_narrow_surfaces (std::vector< int > target_volume_ids, double mesh_size)
 Get the list of narrow surfaces for a list of volumes. More...
 
std::vector< int > 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. More...
 
std::vector< int > get_closed_narrow_surfaces (std::vector< int > target_ids, double narrow_size)
 Get the list of closed, narrow surfaces from a list of volumes. More...
 
std::vector< int > get_surfs_with_narrow_regions (std::vector< int > target_ids, double narrow_size)
 Get the list of surfaces with narrow regions. More...
 
std::vector< int > get_narrow_regions (std::vector< int > target_ids, double narrow_size)
 Get the list of surfaces with narrow regions. More...
 
std::vector< int > get_small_volumes (std::vector< int > target_volume_ids, double mesh_size)
 Get the list of small volumes from a list of volumes. More...
 
bool is_cylinder_surface (int surface_id)
 return whether the surface is a cylinder More...
 
bool is_chamfer_surface (int surface_id, double thickness_threshold)
 return whether the surface is a chamfer More...
 
std::vector< std::vector< double > > get_chamfer_surfaces (std::vector< int > target_volume_ids, double thickness_threshold)
 Get the list of chamfer surfaces for a list of volumes. More...
 
bool is_blend_surface (int surface_id)
 return whether the surface is a blend More...
 
std::vector< int > get_blend_surfaces (std::vector< int > target_volume_ids)
 Get the list of blend surfaces for a list of volumes. More...
 
std::vector< int > 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. More...
 
bool is_close_loop_surface (int surface_id, double mesh_size)
 return whether the has one or more close loops More...
 
std::vector< int > get_close_loops (std::vector< int > target_volume_ids, double mesh_size)
 Get the list of close loops (surfaces) for a list of volumes. More...
 
std::vector< std::vector< double > > 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. More...
 
double get_close_loop_thickness (int surface_id)
 Get the thickness of a close loop surface. More...
 
std::vector< std::vector< std::string > > get_solutions_for_close_loop (int surface_id, double mesh_size)
 Get the solution list for a given close loop surface. More...
 
std::vector< int > 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. More...
 
std::vector< int > get_coincident_vertices (std::vector< int > target_volume_ids, double high_tolerance)
 
std::vector< int > get_close_vertex_curve_pairs (std::vector< int > target_volume_ids, double high_tolerance)
 Get the list of close vertex-curve pairs (python callable) More...
 
std::vector< std::vector< std::string > > 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. More...
 
std::vector< std::vector< std::string > > get_solutions_for_bad_geometry (std::string geom_type, int geom_id)
 Get lists of display strings and command strings for bad geometry. More...
 
std::vector< std::vector< std::string > > 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. More...
 
std::vector< std::vector< std::string > > get_solutions_for_overlapping_surfaces (int surface_id_1, int surface_id_2)
 Get lists of display strings and command strings for overlapping surfaces. More...
 
std::vector< std::vector< std::string > > get_volume_gap_solutions (int surface_id_1, int surface_id_2)
 
std::vector< std::vector< std::string > > 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. More...
 
std::vector< std::vector< std::string > > 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. More...
 
std::vector< std::vector< std::string > > get_solutions_for_imprint_merge (int surface_id1, int surface_id2)
 Get lists of display strings and command strings for imprint/merge solutions. More...
 
std::vector< std::vector< std::string > > 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 More...
 
std::vector< std::vector< std::string > > 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. More...
 
std::vector< std::vector< std::string > > get_solutions_for_classified_volume (std::string classification, int vol_id)
 Get lists of display, preview and command strings for a classified volume. More...
 
std::vector< std::vector< std::string > > get_solutions_for_thin_volume (int vol_id, bool limit_connections=false)
 Get lists of display, preview and command strings for a volume to reduce to shell. More...
 
std::vector< std::vector< std::string > > get_solutions_for_sheet_volumes (std::vector< int > vol_ids, std::vector< double > thickness)
 Get lists of display, preview and command strings to connect sheet bodies. More...
 
std::vector< std::vector< std::string > > get_solutions_for_sheet_volume_connection (std::vector< int > vol1_sheets, std::vector< int > vol2_sheets, std::vector< double > thickness1, std::vector< double > thickness2)
 Get lists of display, preview and command strings for two neighboring sheet volume sets. each set should be part of a common parent 3D volume. More...
 
std::vector< std::vector< std::string > > 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. More...
 
std::vector< std::vector< std::string > > 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. More...
 
std::vector< std::vector< std::string > > 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. More...
 
std::vector< std::vector< std::string > > 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. More...
 
std::vector< std::vector< std::string > > get_solutions_for_cone_surface (int surface_id)
 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. More...
 
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...
 
bool is_cone_surface (int surface_id)
 return whether the surface is a cone More...
 
std::vector< int > 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 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< int > > get_overlapping_surfaces_in_bodies (std::vector< int > body_ids, bool filter_slivers=false)
 returns a vector of vectors defining surface overlaps The first surface (id) in each vector overlaps with all subsequent surfaces in the vector. More...
 
void get_overlapping_surfaces_in_volumes (std::vector< int > target_volume_ids, std::vector< int > &returned_surface_list_1, std::vector< int > &returned_surface_list_2, std::vector< double > &returned_distance_list, std::vector< double > &returned_overlap_area_list, bool filter_slivers=false, bool filter_volume_overlaps=false, int cache_overlaps=0)
 This function only works from C++ Get the list of overlapping surfaces for a list of volumes More...
 
void get_overlapping_surfaces (std::vector< int > target_surface_ids, std::vector< int > &returned_surface_list_1, std::vector< int > &returned_surface_list_2, std::vector< double > &returned_distance_list, std::vector< double > &returned_overlap_area_list, bool filter_slivers=false, bool filter_volume_overlaps=false, int cache_overlaps=0)
 This function only works from C++ Get the list of overlapping surfaces for a list of surfaces More...
 
void get_overlapping_curves (std::vector< int > target_surface_ids, double min_gap, double max_gap, std::vector< int > &returned_curve_list_1, std::vector< int > &returned_curve_list_2, std::vector< double > &returned_distance_list)
 
void get_volume_gaps (std::vector< int > target_volume_ids, std::vector< int > &returned_surface_list_1, std::vector< int > &returned_surface_list_2, std::vector< double > &returned_distance_list, std::vector< double > &returned_overlap_area_list, double maximum_gap_tolerance, double maximum_gap_angle, int cache_overlaps=0)
 This function only works from C++ Get the list of gaps for a list of volumes More...
 
std::vector< int > get_overlapping_volumes (std::vector< int > target_volume_ids)
 Get the list of overlapping volumes for a list of volumes. More...
 
std::vector< int > get_overlapping_volumes_at_volume (int volume_id, std::vector< int > compare_volumes)
 Get the list of overlapping volumes from the model for a single volume. More...
 
std::vector< int > get_overlapping_surfaces_at_surface (int surface_id, std::vector< int > compare_volumes, int cache_overlaps=0)
 Get the list of overlapping surfaces from the model for a single surface. More...
 
std::vector< int > get_nearby_volumes_at_volume (int volume_id, std::vector< int > compare_volumes, double distance)
 Get the list of nearby volumes from the model for a single volume. More...
 
std::vector< int > get_unmerged_curves_on_shells (std::vector< int > shell_vols, std::vector< double > thickness)
 return a list of curve IDs on the given shell volumes that are in proximity to one of the other shell volumes in the list More...
 
void get_mergeable_entities (std::vector< int > target_volume_ids, std::vector< std::vector< int > > &returned_surface_list, std::vector< std::vector< int > > &returned_curve_list, std::vector< std::vector< int > > &returned_vertex_list, double merge_tol=-1)
 This function only works from C++ Get the list of mergeable entities from a list of volumes More...
 
std::vector< std::vector< int > > get_mergeable_vertices (std::vector< int > target_volume_ids)
 Get the list of mergeable vertices from a list of volumes/bodies. More...
 
std::vector< std::vector< int > > get_mergeable_curves (std::vector< int > target_volume_ids)
 Get the list of mergeable curves from a list of volumes/bodies. More...
 
std::vector< std::vector< int > > get_mergeable_surfaces (std::vector< int > target_volume_ids)
 Get the list of mergeable surfaces from a list of volumes/bodies. More...
 
void get_closest_vertex_curve_pairs (std::vector< int > target_ids, int &returned_number_to_return, std::vector< int > &returned_vertex_ids, std::vector< int > &returned_curve_ids, std::vector< double > &returned_distances)
 Find the n closest vertex pairs in the model. More...
 
void get_smallest_features (std::vector< int > target_ids, int &returned_number_to_return, std::vector< int > &returned_type_1_list, std::vector< int > &returned_type_2_list, std::vector< int > &returned_id_1_list, std::vector< int > &returned_id_2_list, std::vector< double > &returned_distance_list)
 Finds all of the smallest features. More...
 
double estimate_merge_tolerance (std::vector< int > target_volume_ids, bool accurate_in=false, bool report_in=false, double low_value_in=-1.0, double high_value_in=-1.0, int number_calculations_in=10, bool return_calculations_in=false, std::vector< double > *merge_tolerance_list=NULL, std::vector< int > *number_of_proximities_list=NULL)
 Estimate a good merge tolerance for the passed-in volumes. More...
 
void find_floating_volumes (std::vector< int > target_volume_ids, std::vector< int > &returned_floating_id_list)
 Get the list of volumes with no merged children. More...
 
void find_nonmanifold_curves (std::vector< int > target_volume_ids, std::vector< int > &returned_curve_list)
 Get the list of nonmanifold curves in the volume list. More...
 
void find_nonmanifold_vertices (std::vector< int > target_volume_ids, std::vector< int > &returned_vertex_list)
 Get the list of nonmanifold vertices in the volume list. More...
 
void get_coincident_entity_pairs (std::vector< int > target_volume_ids, std::vector< int > &returned_v_v_vertex_list, std::vector< int > &returned_v_c_vertex_list, std::vector< int > &returned_v_c_curve_list, std::vector< int > &returned_v_s_vertex_list, std::vector< int > &returned_v_s_surf_list, std::vector< double > &returned_vertex_distance_list, std::vector< double > &returned_curve_distance_list, std::vector< double > &returned_surf_distance_list, double low_value, double high_value, bool do_vertex_vertex=true, bool do_vertex_curve=true, bool do_vertex_surf=true, bool filter_same_volume_cases=false)
 Get the list of coincident vertex-vertex, vertex-curve, and vertex-surface pairs and distances from a list of volumes. More...
 
void get_coincident_vertex_vertex_pairs (std::vector< int > target_volume_ids, std::vector< int > &returned_vertex_pair_list, std::vector< double > &returned_distance_list, double low_value, double threshold_value, bool filter_same_volume_cases=false)
 Get the list of coincident vertex pairs and distances from a list of volumes. More...
 
void get_coincident_vertex_curve_pairs (std::vector< int > target_volume_ids, std::vector< int > &returned_vertex_list, std::vector< int > &returned_curve_list, std::vector< double > &returned_distance_list, double low_value, double threshold_value, bool filter_same_volume_cases=false)
 Get the list of coincident vertex/curve pairs and distances from a list of volumes. More...
 
void get_coincident_vertex_surface_pairs (std::vector< int > target_volume_ids, std::vector< int > &returned_vertex_list, std::vector< int > &returned_surface_list, std::vector< double > &returned_distance_list, double low_value, double threshold_value, bool filter_same_volume_cases=false)
 Get the list of coincident vertex/surface pairs and distances from a list of volumes. More...
 
std::vector< std::string > get_solutions_for_decomposition (const std::vector< int > &volume_list, double exterior_angle, bool do_imprint_merge, bool tolerant_imprint)
 Get the list of possible decompositions. More...
 
std::vector< std::vector< std::string > > get_solutions_for_blends (int surface_id)
 Get the solution list for a given blend surface. More...
 
std::vector< std::vector< int > > get_blend_chains (int surface_id)
 Returns the blend chains for a surface. More...
 
std::vector< std::vector< int > > get_chamfer_chains (int surface_id)
 Returns the chamfer chains for a surface. More...
 
bool are_adjacent_surfaces (std::vector< int > surface_ids)
 return whether two or more surfaces share at least one manifold curve (common curve is part of exactly two surfaces) More...
 
bool are_adjacent_curves (std::vector< int > curve_ids)
 return whether two or more curves share at least one manifold vertex (common vertex is part of exactly two curves) More...
 
bool is_continuous_surface (int surface_id, double angle_tol)
 return whether the surface has any adjacent surfaces that are continuous (exterior angle is 180 degrees +- angle_tol) More...
 
std::vector< int > get_continuous_surfaces (int surface_id, double angle_tol)
 Returns the adjacent surfaces that are continuous (exterior angle is 180 degrees +- angle_tol) More...
 
std::vector< int > get_continuous_curves (int curve_id, double angle_tol)
 Returns the adjacent curves that are continuous (angle is 180 degrees +- angle_tol) More...
 
bool is_cavity_surface (int surface_id)
 return whether the surface is part of a cavity More...
 
bool is_hole_surface (int surface_id, double radius_threshold)
 return whether the surface is part of a hole More...
 
std::vector< int > get_cavity_surfaces (int surface_id)
 Returns the adjacent surfaces in a cavity for a surface. More...
 
std::vector< int > get_hole_surfaces (int surface_id)
 Returns the adjacent surfaces in a hole for a surface. More...
 
std::vector< std::vector< int > > get_surface_cavity_collections (const std::vector< int > &volume_list, double hr_threshold, double area_threshold, std::vector< double > &return_cavity_hrs, std::vector< double > &return_cavity_areas)
 Returns the collections of surfaces that comprise holes or cavities in the specified volumes. Filter by hydarulic radius and area of the cavity. More...
 
std::vector< std::vector< int > > get_surface_hole_collections (const std::vector< int > &volume_list, double radius_threshold, std::vector< double > &return_hole_radius)
 Returns the collections of surfaces that comprise holes in the specified volumes. Filter by radius of the hole. More...
 
std::vector< std::vector< int > > get_blend_chain_collections (const std::vector< int > &volume_list, double radius_threshold, std::vector< double > &return_radii)
 Returns the collections of surfaces that comprise blend chains in the specified volumes. Filter by radius threshold. More...
 
std::vector< std::vector< int > > get_chamfer_chain_collections (const std::vector< int > &volume_list, double thickness_threshold, std::vector< double > &return_thicknesses)
 Returns the collections of surfaces that comprise chamfers in the specified volumes. Filter by thickness of chamfer. More...
 
std::vector< std::vector< std::string > > get_solutions_for_cavity_surface (int surface_id)
 Get the solution list for a given cavity surface. More...
 
double get_merge_tolerance ()
 Get the current merge tolerance value. More...
 
Blocks, Sidesets, and Nodesets
std::string get_exodus_entity_name (const std::string entity_type, int entity_id)
 Get the name associated with an exodus entity. More...
 
std::string get_exodus_entity_type (std::string entity_type, int entity_id)
 Get the type of an exodus entity. More...
 
std::string get_exodus_entity_description (std::string entity_type, int entity_id)
 Get the description associated with an exodus entity. More...
 
std::vector< double > get_all_exodus_times (const std::string &filename)
 Open an exodus file and get a vector of all stored time stamps. More...
 
std::vector< std::string > 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. More...
 
int get_block_id (std::string entity_type, int entity_id)
 Get the associated block id for a specific curve, surface, or volume. More...
 
std::vector< int > get_block_ids (const std::string &mesh_geometry_file_name)
 Get list of block ids from a mesh geometry file. More...
 
std::vector< int > get_block_id_list ()
 Get a list of all blocks. More...
 
std::vector< int > get_nodeset_id_list ()
 Get a list of all nodesets. More...
 
std::vector< int > get_sideset_id_list ()
 Get a list of all sidesets. More...
 
std::vector< int > get_bc_id_list (CI_BCTypes bc_type_enum)
 Get a list of all bcs of a specified type. More...
 
std::string get_bc_name (CI_BCTypes bc_type_enum, int bc_id)
 Get the name for the specified bc. More...
 
std::vector< int > 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. More...
 
std::vector< int > 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. More...
 
int get_next_sideset_id ()
 Get a next available sideset id. More...
 
int get_next_nodeset_id ()
 Get a next available nodeset id. More...
 
int get_next_block_id ()
 Get a next available block id. More...
 
std::string get_copy_nodeset_on_geometry_copy_setting ()
 Get the copy nodeset on geometry copy setting. More...
 
std::string get_copy_sideset_on_geometry_copy_setting ()
 Get the copy nodeset on geometry copy setting. More...
 
std::string get_copy_block_on_geometry_copy_setting ()
 Get the copy nodeset on geometry copy setting. More...
 
bool set_copy_nodeset_on_geometry_copy_setting (std::string val)
 Set the copy nodeset on geometry copy setting "ON", "USE_ORIGINAL", or "OFF". More...
 
bool set_copy_sideset_on_geometry_copy_setting (std::string val)
 Set the copy sideset on geometry copy setting "ON", "USE_ORIGINAL", or "OFF". More...
 
bool set_copy_block_on_geometry_copy_setting (std::string val)
 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...
 
std::vector< int > get_block_volumes (int block_id)
 Get a list of volume ids associated with a specific block. More...
 
std::vector< int > get_block_surfaces (int block_id)
 Get a list of surface associated with a specific block. More...
 
std::vector< int > get_block_curves (int block_id)
 Get a list of curve associated with a specific block. More...
 
std::vector< int > get_block_vertices (int block_id)
 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...
 
std::vector< int > get_edges_to_swap (int curve_id)
 Given a curve defining a knife edge between two triangle-meshed surfaces, return a list of edges on triangles at the curve that are good candidates for swapping. A good candidate for swapping means that if swapped, the two triangles at the knife's edge will have a larger interior dihedral angle between them, allowing a larger volume to accommodate tetmeshing. More...
 
std::vector< int > get_block_nodes (int block_id)
 Get a list of nodes associated with a specific block. More...
 
std::vector< int > get_block_edges (int block_id)
 Get a list of edges associated with a specific block. More...
 
std::vector< int > get_block_tris (int block_id)
 Get a list of tris associated with a specific block. More...
 
std::vector< int > get_block_faces (int block_id)
 Get a list of faces associated with a specific block. More...
 
std::vector< int > get_block_pyramids (int block_id)
 Get a list of pyramids associated with a specific block. More...
 
std::vector< int > get_block_wedges (int block_id)
 Get a list of wedges associated with a specific block. More...
 
std::vector< int > get_block_tets (int block_id)
 Get a list of tets associated with a specific block. More...
 
std::vector< int > get_block_hexes (int block_id)
 Get a list of hexes associated with a specific block. More...
 
std::vector< int > get_volume_hexes (int volume_id)
 get the list of any hex elements in a given volume More...
 
std::vector< int > get_volume_tets (int volume_id)
 get the list of any tet elements in a given volume More...
 
std::vector< int > get_nodeset_volumes (int nodeset_id)
 Get a list of volume ids associated with a specific nodeset. More...
 
std::vector< int > get_nodeset_surfaces (int nodeset_id)
 Get a list of surface ids associated with a specific nodeset. More...
 
std::vector< int > get_nodeset_curves (int nodeset_id)
 Get a list of curve ids associated with a specific nodeset. More...
 
std::vector< int > get_nodeset_vertices (int nodeset_id)
 Get a list of vertex ids associated with a specific nodeset. More...
 
std::vector< int > 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. More...
 
std::vector< int > 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. More...
 
std::vector< int > get_sideset_curves (int sideset_id)
 Get a list of curve ids associated with a specific sideset. More...
 
std::vector< int > get_curve_edges (int curve_id)
 get the list of any edge elements on a given curve More...
 
std::vector< int > get_sideset_surfaces (int sideset_id)
 Get a list of any surfaces in a sideset. More...
 
std::vector< int > get_sideset_quads (int sideset_id)
 Get a list of any quads in a sideset. More...
 
std::vector< int > get_surface_quads (int surface_id)
 get the list of any quad elements on a given surface More...
 
std::vector< int > get_surface_tris (int surface_id)
 get the list of any tri elements on a given surface More...
 
int get_surface_num_loops (int surface_id)
 get the number of loops on the surface More...
 
std::vector< std::vector< int > > get_surface_loop_nodes (int surface_id)
 get the ordered list of nodes on the loops of this surface More...
 
std::string get_entity_sense (std::string source_type, int source_id, int sideset_id)
 Get the sense of a sideset item. More...
 
std::string get_wrt_entity (std::string source_type, int source_id, int sideset_id)
 Get the with-respect-to entity. More...
 
std::vector< std::string > get_geometric_owner (std::string mesh_entity_type, std::string mesh_entity_list)
 Get a list of geometric owners given a list of mesh entities. More...
 
std::vector< std::string > get_all_geometric_owners (std::string mesh_entity_type, std::string mesh_entity_list)
 Get a list of geometric owners given a list of mesh entities. returns geometric owners of entity as well as all of its child mesh entities. More...
 
Geometry-Mesh Entity Support
std::vector< int > get_volume_nodes (int volume_id)
 Get list of node ids owned by a volume.
Excludes nodes owned by bounding surfs, curves and verts. More...
 
std::vector< int > get_surface_nodes (int surface_id)
 Get list of node ids owned by a surface.
Excludes nodes owned by bounding curves and verts. More...
 
std::vector< int > get_curve_nodes (int curve_id)
 Get list of node ids owned by a curve.
Excludes nodes owned by bounding vertices. More...
 
int get_vertex_node (int vertex_id)
 Get the node owned by a vertex.
More...
 
Group Support
int get_id_from_name (const std::string &name)
 Get id for a named entity. More...
 
std::vector< int > get_all_ids_from_name (const std::string &geo_type, const std::string &name)
 Get all ids of a geometry type with the prefix given by string. More...
 
void 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. More...
 
std::vector< int > get_group_groups (int group_id)
 Get group groups (groups that are children of another group) More...
 
std::vector< int > get_group_volumes (int group_id)
 Get group volumes (volumes that are children of a group) More...
 
std::vector< int > get_group_bodies (int group_id)
 Get group bodies (bodies that are children of a group) More...
 
std::vector< int > get_group_surfaces (int group_id)
 Get group surfaces (surfaces that are children of a group) More...
 
std::vector< int > get_group_curves (int group_id)
 Get group curves (curves that are children of a group) More...
 
std::vector< int > get_group_vertices (int group_id)
 Get group vertices (vertices that are children of a group) More...
 
std::vector< int > get_group_nodes (int group_id)
 Get group nodes (nodes that are children of a group) More...
 
std::vector< int > get_group_edges (int group_id)
 Get group edges (edges that are children of a group) More...
 
std::vector< int > get_group_quads (int group_id)
 Get group quads (quads that are children of a group) More...
 
std::vector< int > get_group_tris (int group_id)
 Get group tris (tris that are children of a group) More...
 
std::vector< int > get_group_tets (int group_id)
 Get group tets (tets that are children of a group) More...
 
std::vector< int > get_group_wedges (int group_id)
 Get group wedges (wedges that are children of a group) More...
 
std::vector< int > get_group_pyramids (int group_id)
 Get group pyramids (pyramids that are children of a group) More...
 
std::vector< int > get_group_spheres (int group_id)
 
std::vector< int > get_group_hexes (int group_id)
 
int get_next_group_id ()
 Get the next available group id from Cubit. More...
 
void delete_all_groups ()
 Delete all groups. More...
 
void delete_group (int group_id)
 Delete a specific group. More...
 
void 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. More...
 
int create_new_group ()
 Create a new group. More...
 
void remove_entity_from_group (int group_id, int entity_id, const std::string &entity_type)
 Remove a specific entity from a specific group. More...
 
void add_entity_to_group (int group_id, int entity_id, const std::string &entity_type)
 Add a specific entity to a specific group. More...
 
void add_entities_to_group (int group_id, const std::vector< int > &entity_id, const std::string &entity_type)
 Add a list of entities to a specific group. More...
 
void 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. More...
 
std::vector< std::pair< std::string, int > > 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. More...
 
std::vector< int > 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. More...
 
bool is_mesh_element_in_group (const std::string &element_type, int element_id)
 Indicates whether a mesh element is in a group. More...
 
General Purpose Utility
bool 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. More...
 
int get_last_id (const std::string &entity_type)
 Get the id of the last created entity of the given type. More...
 
bool entity_exists (const std::string &entity_type, int id)
 return whether an entity of specified ID exists More...
 
std::string get_idless_signature (std::string entity_type, int entity_id)
 get the idless signature of a geometric or mesh entity More...
 
std::string 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 More...
 
Metadata Support
std::string get_assembly_classification_level ()
 Get Classification Level for metadata. More...
 
std::string get_assembly_classification_category ()
 Get Classification Category for metadata. More...
 
std::string get_assembly_weapons_category ()
 Get Weapons Category for metadata. More...
 
std::string get_assembly_metadata (int volume_id, int data_type)
 Get metadata for a specified volume id. More...
 
bool is_assembly_metadata_attached (int volume_id)
 Determine whether metadata is attached to a specified volume. More...
 
std::string get_assembly_name (int assembly_id)
 Get the stored name of an assembly node. More...
 
std::string get_assembly_path (int assembly_id)
 Get the stored path of an assembly node. More...
 
std::string get_assembly_type (int assembly_id)
 Get the stored type of an assembly node. More...
 
std::string get_parent_assembly_path (int assembly_id)
 Get the stored path of an assembly node' parent. More...
 
int get_assembly_level (int assembly_id)
 Get the stored level of an assembly node. More...
 
std::string get_assembly_description (int assembly_id)
 Get the stored description of an assembly node. More...
 
int get_assembly_instance (int assembly_id)
 Get the stored instance number of an assembly node. More...
 
int get_parent_assembly_instance (int assembly_id)
 Get the stored instance number of an assembly node's instance. More...
 
std::string get_assembly_file_format (int assembly_id)
 Get the stored file format of an assembly node. More...
 
std::string get_assembly_units (int assembly_id)
 Get the stored units measure of an assembly node. More...
 
std::string get_assembly_material_description (int assembly_id)
 Get the stored material description of an assembly part. More...
 
std::string get_assembly_material_specification (int assembly_id)
 Get the stored material specification of an assembly part. More...
 
Mesh Element Queries
int get_exodus_id (const std::string &entity_type, int entity_id)
 Get the exodus/genesis id for this element. More...
 
std::string get_geometry_owner (const std::string &entity_type, int entity_id)
 Get the geometric owner of this mesh element. More...
 
std::vector< int > get_connectivity (const std::string &entity_type, int entity_id)
 Get the list of node ids contained within a mesh entity. More...
 
std::vector< int > get_expanded_connectivity (const std::string &entity_type, int entity_id)
 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...
 
bool get_node_exists (int node_id)
 Check the existance of a node. More...
 
bool get_element_exists (int element_id)
 Check the existance of an element. More...
 
std::string get_element_type (int element_id)
 return the type of a given element More...
 
int get_element_type_id (int element_id)
 return the type id of a given element More...
 
int get_element_block (int element_id)
 return the block that a given element is in. More...
 
int get_global_element_id (const std::string &element_type, int id)
 Given a hex, tet, etc. id, return the global element id. More...
 
int get_hex_global_element_id (int hex_id)
 Given a hex id, return the global element id. More...
 
int get_tet_global_element_id (int tet_id)
 Given a tet id, return the global element id. More...
 
int get_wedge_global_element_id (int wedge_id)
 Given a wedge id, return the global element id. More...
 
int get_pyramid_global_element_id (int pyramid_id)
 Given a pyramid id, return the global element id. More...
 
int get_tri_global_element_id (int tri_id)
 Given a tri id, return the global element id. More...
 
int get_quad_global_element_id (int quad_id)
 Given a quad id, return the global element id. More...
 
int get_edge_global_element_id (int edge_id)
 Given a edge id, return the global element id. More...
 
int get_sphere_global_element_id (int edge_id)
 Given a sphere id, return the global element id. More...
 
int get_node_global_id (int node_id)
 Given a node id, return the global element id that is assigned when the mesh is exported. More...
 
int get_closest_node (double x_coordinate, double y_coordinate, double z_coordinate)
 Get the node closest to the given coordinates. More...
 
std::array< double, 3 > get_nodal_coordinates (int node_id)
 Get the nodal coordinates for a given node id. More...
 
std::vector< int > get_node_faces (int node_id)
 
std::vector< int > get_node_tris (int node_id)
 
bool get_node_position_fixed (int node_id)
 Query "fixedness" state of node. A fixed node is not affecting by smoothing. More...
 
std::vector< std::pair< int, int > > 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. More...
 
std::string get_sideset_element_type (int sideset_id)
 Get the element type of a sideset. More...
 
std::string get_block_element_type (int block_id)
 Get the element type of a block. More...
 
int get_exodus_element_count (int entity_id, std::string entity_type)
 Get the number of elements in a exodus entity. More...
 
int get_block_attribute_count (int block_id)
 Get the number of attributes in a block. More...
 
int get_block_element_attribute_count (int block_id)
 Get the number of attributes in a block element. More...
 
double get_block_attribute_value (int block_id, int attribute_index)
 Get a specific block attribute value. More...
 
std::string get_block_attribute_name (int block_id, int attribute_index)
 Get a specific block attribute name. More...
 
std::vector< std::string > get_block_element_attribute_names (int block_id)
 Get a specific block element attribute name. More...
 
std::vector< std::string > get_valid_block_element_types (int block_id)
 Get a list of potential element types for a block. More...
 
int get_block_material (int block_id)
 Get the id of the material assigned to the specified block. More...
 
std::vector< std::vector< int > > get_blocks_with_materials ()
 Get the block ids and ids of the respective materials assigned to each block. More...
 
int get_exodus_variable_count (std::string container_type, int container_id)
 Get the number of exodus variables in a nodeset, sideset, or block. More...
 
std::vector< std::string > get_exodus_variable_names (std::string container_type, int container_id)
 Get the names of exodus variables in a nodeset, sideset, or block. More...
 
int get_nodeset_node_count (int nodeset_id)
 Get the number of nodes in a nodeset. More...
 
int get_geometry_node_count (const std::string &entity_type, int entity_id)
 Get the node count for a specific geometric entity. More...
 
void 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. More...
 
std::string get_mesh_element_type (const std::string &entity_type, int entity_id)
 Get the mesh element type contained in the specified geometry. More...
 
Boundary Condition Support
bool 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. More...
 
bool 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. More...
 
bool convection_is_on_solid (int entity_id)
 Determine whether a BC convection is on a solid. Valid for convection. More...
 
bool 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. More...
 
double get_convection_coefficient (int entity_id, CI_BCEntityTypes bc_type_enum)
 Get the convection coefficient. More...
 
double get_bc_temperature (CI_BCTypes bc_type_enum, int entity_id, CI_BCEntityTypes temp_type_enum)
 Get the temperature. Valid for convection, temperature. More...
 
bool 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. More...
 
bool heatflux_is_on_shell_area (CI_BCEntityTypes bc_area_enum, int entity_id)
 Determine whether a BC heatflux is on a shell area. More...
 
double get_heatflux_on_area (CI_BCEntityTypes bc_area_enum, int entity_id)
 Get the heatflux on a specified area. More...
 
int get_cfd_type (int entity_id)
 Get the cfd subtype for a specified cfd BC. More...
 
double get_contact_pair_friction_value (int entity_id)
 Get the contact pair's friction value. More...
 
double get_contact_pair_tolerance_value (int entity_id)
 Get the contact pair's upper bound tolerance value. More...
 
double get_contact_pair_tol_lower_value (int entity_id)
 Get the contact pair's lower bound tolerance value. More...
 
bool get_contact_pair_tied_state (int entity_id)
 Get the contact pair's tied state. More...
 
bool get_contact_pair_general_state (int entity_id)
 Get the contact pair's general state. More...
 
bool get_contact_pair_exterior_state (int entity_id)
 Get the contact pair's exterior state. More...
 
int get_displacement_coord_system (int entity_id)
 Get the displacement's coordinate system id. More...
 
const double * get_displacement_dof_values (int entity_id)
 This function only available from C++ Get the displacement's dof values More...
 
const int * get_displacement_dof_signs (int entity_id)
 This function only available from C++ Get the displacement's dof signs More...
 
const double * get_velocity_dof_values (int entity_id)
 This function only available from C++ Get the velocity's dof values More...
 
const int * get_velocity_dof_signs (int entity_id)
 This function only available from C++ Get the velocity's dof signs More...
 
std::string get_velocity_combine_type (int entity_id)
 Get the velocity's combine type which is "Overwrite", "Average", "SmallestCombine", or "LargestCombine". More...
 
const double * get_acceleration_dof_values (int entity_id)
 This function only available from C++ Get the acceleration's dof values More...
 
const int * get_acceleration_dof_signs (int entity_id)
 This function only available from C++ Get the acceleration's dof signs More...
 
std::string get_acceleration_combine_type (int entity_id)
 Get the acceleration's combine type which is "Overwrite", "Average", "SmallestCombine", or "LargestCombine". More...
 
std::string get_displacement_combine_type (int entity_id)
 Get the displacement's combine type which is "Overwrite", "Average", "SmallestCombine", or "LargestCombine". More...
 
double get_pressure_value (int entity_id)
 Get the pressure value. More...
 
std::string get_pressure_function (int entity_id)
 Get the pressure function. More...
 
double get_force_magnitude (int entity_id)
 Get the force magnitude from a force. More...
 
double get_moment_magnitude (int entity_id)
 Get the moment magnitude from a force. More...
 
std::array< double, 3 > get_force_direction_vector (int entity_id)
 Get the direction vector from a force. More...
 
std::array< double, 3 > get_force_moment_vector (int entity_id)
 Get the moment vector from a force. More...
 
std::string get_constraint_type (int constraint_id)
 Get the type of a specified constraint. More...
 
std::string get_constraint_reference_point (int constraint_id)
 Get the reference point of a specified constraint. More...
 
std::string get_constraint_dependent_entity_point (int constraint_id)
 Get the dependent entity of a specified constraint. More...
 
double get_material_property (CI_MaterialProperty material_property_enum, int entity_id)
 Get the specified material property value. More...
 
int get_media_property (int entity_id)
 Get the media property value. More...
 
std::vector< std::string > get_material_name_list ()
 Get a list of all defined material names. More...
 
std::vector< std::string > get_media_name_list ()
 Get a list of all defined material names. More...
 
std::string get_material_name (int material_id)
 Get the name of the material (or cfd media) with the given id. More...
 
double calculate_timestep_estimate (std::string entity_type, std::vector< int > entity_ids)
 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. More...
 
double calculate_timestep_estimate_with_props (std::string entity_type, std::vector< int > entity_id_list, double density, double youngs_modulus, double poissons_ratio)
 Calculates time step estimate on elements of/in entity type: "Tet" or "Hex" or "Volume" or "Block" or "Group". More...
 
double get_target_timestep ()
 Returns the target timestep threshold used in the timestep density multiplier metric. More...
 
std::vector< std::array< double, 3 > > snap_locations_to_geometry (const std::vector< std::array< double, 3 >> &locations, std::string entity_type, int entity_id, double tol)
 Snaps xyz locations to closest point on entity. Then snaps to child curves or vertices within given tolerance. Vertices snapped to before curves.
More...
 
std::vector< double > measure_between_entities (std::string entity_type1, int entity_id1, std::string entity_type2, int entity_id2)
 returns distance between two geometry entities and their closest points More...
 
std::vector< int > gather_surfaces_by_orientation (std::vector< int > seed_surf_ids, std::vector< int > all_surf_ids)
 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. More...
 
void set_label_type (const char *entity_type, int label_flag)
 make calls to SVDrawTool::set_label_type
More...
 
int get_label_type (const char *entity_type)
 make calls to SVDrawTool::get_label_type
More...
 
std::vector< int > get_coordinate_systems_id_list ()
 get a list of coordinate system ids More...
 
std::vector< double > get_n_largest_distances_between_meshes (int n, std::string entity_type1, std::vector< int > ids1, std::string entity_type2, std::vector< int > ids2)
 Finds the 'n' largest distances between two meshes. These distances are from the nodes on the entities of 'ids1' to the elements in 'ids2'. Only triangle and face (quads) element types are supported. It is assumed that the meshes approximately line up.
Each distance is returned with three values: More...
 
void 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)
 Compare the geometry and mesh. More...
 
double get_dbl_sculpt_default (const char *variable)
 return sculpt default value More...
 
int get_int_sculpt_default (const char *variable)
 
bool get_bool_sculpt_default (const char *variable)
 
std::string get_string_sculpt_default (const char *variable)
 
double get_blunt_tangency_default_depth (int vert_id, double angle, bool add_material)
 get default depth value for blunt tangency operation More...
 
std::vector< double > get_reduce_bolt_core_default_dimensions (int vol_id)
 get default dimensions for reduce vol bolt core operation More...
 
double get_bolt_diameter (int vol_id)
 get diameter of bolt shank More...
 
std::vector< double > get_bolt_axis (int vol_id)
 get axis vector of bolt More...
 
Boundary Layer Support
int get_next_boundary_layer_id ()
 
bool is_boundary_layer_id_available (int boundary_layer_id)
 
std::string get_boundary_layer_algorithm (int boundary_layer_id)
 
std::vector< int > get_boundary_layers_by_base (const std::string &base_type, int base_id)
 
std::vector< int > get_boundary_layers_by_pair (const std::string &base_type, int base_id, int parent_id)
 
bool get_boundary_layer_uniform_parameters (int boundary_layer_id, double &returned_first_row_height, double &returned_growth_factor, int &returned_number_rows)
 
bool get_boundary_layer_aspect_first_parameters (int boundary_layer_id, double &returned_first_row_aspect, double &returned_growth_factor, int &returned_number_rows)
 
bool get_boundary_layer_aspect_last_parameters (int boundary_layer_id, double &returned_first_row_height, int &returned_number_rows, double &returned_last_row_aspect)
 
bool get_boundary_layer_curve_surface_pairs (int boundary_layer_id, std::vector< int > &returned_curve_list, std::vector< int > &returned_surface_list)
 
bool get_boundary_layer_surface_volume_pairs (int boundary_layer_id, std::vector< int > &returned_surface_list, std::vector< int > &returned_volume_list)
 
bool get_boundary_layer_vertex_intersection_types (std::vector< int > &returned_vertex_list, std::vector< int > &returned_surface_list, std::vector< std::string > &returned_types)
 
bool get_boundary_layer_curve_intersection_types (std::vector< int > &returned_curve_list, std::vector< int > &returned_volume_list, std::vector< std::string > &returned_types)
 
bool get_boundary_layer_continuity (int boundary_layer_id)
 
std::vector< int > get_boundary_layer_id_list ()
 
std::vector< int > sizing_source_ids ()
 Functions to support sizing source sizing function. More...
 
double sizing_source_min_size ()
 
double sizing_source_max_size ()
 
std::array< double, 3 > sizing_source_scale (int id)
 
std::array< double, 3 > sizing_source_rotation_vector (int id)
 
double sizing_source_rotation_angle (int id)
 
std::array< double, 3 > sizing_source_origin (int id)
 
double sizing_source_size (int id)
 
double sizing_source_growth_factor (int id)
 
void set_capture_color (bool is_captured, std::array< double, 4 > color)
 
void draw_curve_capture (const std::string &geometry_type, const std::vector< int > &ids, bool is_captured)
 
void draw_curve_capture_from_size (const std::string &geometry_type, const std::vector< int > &ids, double percent_captured, double mesh_size)
 
std::vector< CFD_BC_Entityget_all_cfd_bcs ()
 
std::vector< AssemblyItemget_assembly_items ()
 
std::vector< AssemblyItemget_top_level_assembly_items ()
 
std::vector< AssemblyItemget_assembly_children (int assembly_id)
 
std::vector< int > get_volumes_for_node (std::string node_name, int node_instance)
 
std::vector< MeshErrorFeedback * > get_mesh_errors ()
 
int get_mesh_error_count ()
 
Geometry from ids
CubitInterface::Body body (int id_in)
 Gets the body object from an ID. More...
 
CubitInterface::Volume volume (int id_in)
 Gets the volume object from an ID. More...
 
CubitInterface::Surface surface (int id_in)
 Gets the surface object from an ID. More...
 
CubitInterface::Curve curve (int id_in)
 Gets the curve object from an ID. More...
 
CubitInterface::Vertex vertex (int id_in)
 Gets the vertex object from an ID. More...
 
void reset ()
 Executes a reset within cubit. More...
 
Geometry Creation Functions
Body brick (double width, double depth=-1, double height=-1)
 Creates a brick of specified width, depth, and height. More...
 
Body 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. More...
 
Body prism (double height, int sides, double major, double minor)
 Creates a prism of the specified dimensions. More...
 
Body pyramid (double height, int sides, double major, double minor, double top=0.0)
 Creates a pyramid of the specified dimensions. More...
 
Body cylinder (double height, double x_radius, double y_radius, double top_radius)
 creates a cylinder of the specified dimensions More...
 
Body torus (double center_radius, double swept_radius)
 creates a torus of the specified dimensions More...
 
Vertex create_vertex (double x=0, double y=0, double z=0)
 Creates a vertex at a x,y,z. More...
 
Curve create_curve (Vertex v0, Vertex v1)
 Creates a curve between two vertices. More...
 
Curve create_arc_curve (Vertex v0, Vertex v1, std::array< double, 3 > intermediate_point)
 Creates a arc curve using end vertices and an intermediate point. More...
 
Curve create_spline (std::vector< std::array< double, 3 > > points, int surface_id)
 create spline through the given 3d points More...
 
Body create_surface (std::vector< Curve > curves)
 Creates a surface from boundary curves. More...
 
std::vector< Bodysweep_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. More...
 
Body copy_body (Body init_body)
 Creates a copy of the input Body. More...
 
Geometry Manipulation Functions
std::vector< Bodytweak_surface_offset (std::vector< Surface > surfaces, std::vector< double > distances)
 Performs a tweak surface offset command. More...
 
std::vector< CubitInterface::Bodytweak_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. More...
 
std::vector< CubitInterface::Bodytweak_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. More...
 
std::vector< Bodytweak_curve_offset (std::vector< Curve > curves, std::vector< double > distances, bool keep_old=false, bool preview=false)
 Performs a tweak curve offset command. More...
 
std::vector< Bodytweak_vertex_fillet (std::vector< Vertex > verts, double radius, bool keep_old=false, bool preview=false)
 Performs a tweak vertex fillet command. More...
 
std::vector< Bodysubtract (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. More...
 
std::vector< Bodyunite (std::vector< CubitInterface::Body > body_in, bool keep_old_in=false)
 Performs a boolean unite operation. More...
 
void move (Entity entity, std::array< double, 3 > vector, bool preview=false)
 Moves the Entity the specified vector. More...
 
void scale (Entity entity, double factor, bool preview=false)
 Scales the Entity according to the specified factor. More...
 
void reflect (Entity entity, std::array< double, 3 > axis, bool preview=false)
 Reflect the Entity about the specified axis. More...
 
Machine Learning Support
MLUtil * machine_learning ()
 
bool load_ML (std::string model_type="all")
 load the machine learning training data More...
 
void unload_ML (std::string model_type="all")
 unload the machine learning training data More...
 
std::vector< std::vector< double > > get_ML_operation_features (std::vector< std::string > ml_op_names, std::vector< size_t > entity1_ids, std::vector< size_t > entity2_ids, std::vector< std::vector< double >> params, double mesh_size, bool reduced_features=false)
 get machine learning features for a list of cubit operations More...
 
std::vector< std::vector< double > > get_ML_operation_features_ (std::vector< std::string > ml_op_names, std::vector< int > entity1_ids, std::vector< int > entity2_ids, std::vector< std::vector< double >> params, double mesh_size, bool reduced_features=false)
 
std::vector< std::vector< double > > get_ML_predictions (std::vector< std::string > ml_op_names, std::vector< size_t > entity1_ids, std::vector< size_t > entity2_ids, std::vector< std::vector< double >> params, double mesh_size, bool reduced_features=false)
 get machine learning predictions for the list of operations and corresponding entities This function will load the ML training data if not already loaded. It will first compute features and then run predictions from training data Currently uses scikit-learn EDT (Ensembles of Decision Trees) for predictions More...
 
std::string get_ML_classification (size_t vol_id)
 return the name of the classification category for this volume. uses same methods as get_ML_predictions for Volume No Op (4) More...
 
std::vector< std::string > get_ML_classifications (std::vector< size_t > vol_ids)
 same as get_ML_classification, but classifies multiple volumes with a single call (more efficient) More...
 
std::vector< std::string > get_ML_classification_categories ()
 return a list of strings representing all possible calssification categories currently supported with ML tools More...
 
bool ML_train ()
 
std::vector< std::string > get_ML_operation_feature_types (const std::string ml_op_name, bool reduced_features=false)
 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...
 
std::vector< std::string > get_ML_operation_feature_names (const std::string ml_op_name, bool reduced_features=false)
 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...
 
int get_ML_operation_feature_size (const std::string ml_op_name, const bool reduced_features=false)
 for the given operation type described by get_ML_operation_features, return the expected size of the feature vector More...
 
std::vector< std::string > get_ML_classification_models ()
 get the available classification ML model names More...
 
std::vector< std::string > get_ML_regression_models ()
 get the available regression ML model names More...
 
int get_ML_model_ID (std::string)
 get a unique ID for the given operation/model name More...
 
std::string get_ML_model_name (int model_ID)
 get the name for the given operation/model ID More...
 
std::vector< std::string > get_ML_operation (const std::string op_name, const size_t entity_id1, const size_t 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 More...
 
std::vector< double > get_ML_feature_importances (const std::string op_name)
 return the vector of feature importances for a given operation type More...
 
double get_ML_feature_distance (const std::string op_name, std::vector< double > &f1, std::vector< double > &f2)
 feature distance is defined as a weighted distance between two feature vectors of the same size. Features are weighted on EDT (ensembles of decision trees) importance values More...
 
void set_ML_base_user_dir (const std::string path, const bool print_info=false, const bool only=false)
 set the path to any user training data. (classification only) More...
 

CubitInterface Control

const int CI_ERROR = -1
 
void init (const std::vector< std::string > &argv)
 Use init to initialize Cubit. Using a blank list as the input parameter is acceptable. More...
 
int destroy ()
 Closes the current journal file. More...
 
void create_user_interface ()
 
void ensure_init ()
 
void report_usage ()
 
void process_input_files ()
 C++ only More...
 
void set_playback_handler (ExternalPlaybackHandler *hdlr)
 C++ only More...
 
ExternalPlaybackHandler * get_playback_handler ()
 
void enable_signal_handling (bool on)
 initialize/uninitialize signal handling C++ only More...
 
void print_info (const std::string &message)
 Print a message using the cubit message handler. More...
 
void set_cubit_message_handler (CubitMessageHandler *hdlr)
 redirect the output from cubit. More...
 
CubitMessageHandler * get_cubit_message_handler ()
 get the default message handler More...
 
void set_exit_handler (ExternalExitHandler *hdlr)
 Set the exit handler. More...
 

Detailed Description

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 
)

Add a list of entities to a specific group.

cubit.add_entities_to_group(3, list, "surface")
Parameters
group_idID of group to which the entity will be added
lista vector of IDs of the entities to be added to the group
entity_typeType of the entity to be added to the group. Note that this function is valid only for geometric entities

◆ add_entity_to_group()

void CubitInterface::add_entity_to_group ( int  group_id,
int  entity_id,
const std::string &  entity_type 
)

Add a specific entity to a specific group.

cubit.add_entity_to_group(3, 22, "surface")
Parameters
group_idID of group to which the entity will be added
entity_idID of the entity to be added to the group
entity_typeType of the entity to be added to the group. Note that this function is valid only for geometric entities

◆ add_filename_to_recent_file_list()

void CubitInterface::add_filename_to_recent_file_list ( std::string &  filename)

Adds the filename to the recent file list.

Parameters
filenameto be added to the recent file list.

◆ add_filter_type()

void CubitInterface::add_filter_type ( const std::string &  filter_type)

Add a filter type.

◆ are_adjacent_curves()

bool CubitInterface::are_adjacent_curves ( std::vector< int >  curve_ids)

return whether two or more curves share at least one manifold vertex (common vertex is part of exactly two curves)

Parameters
curve_idsIDs of curves to query
Returns
whether the curves are adjacent

◆ are_adjacent_surfaces()

bool CubitInterface::are_adjacent_surfaces ( std::vector< int >  surface_ids)

return whether two or more surfaces share at least one manifold curve (common curve is part of exactly two surfaces)

Parameters
surface_idsIDs of surfaces to query
Returns
whether the surface are adjacent

◆ auto_size_needs_to_be_calculated()

bool CubitInterface::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.

◆ best_edge_to_collapse_interior_node()

int CubitInterface::best_edge_to_collapse_interior_node ( int  node_id)

Finds the best edge to collapse this node along to remove the interior node.

Returns
int - return the id of the edge, 0 if no edge found

◆ body()

CubitInterface::Body CubitInterface::body ( int  id_in)

Gets the body object from an ID.

Parameters
id_inThe ID of the body
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.

Parameters
[in]widthThe width of the brick being created
[in]depthThe depth of the brick being created
[in]heightThe 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 
)

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.

double cubit.calculate_timestep_estimate("volume", vol_list)
Parameters
entity_typeSpecifies the entity type (hex, tet, volume, block, group)
idsSpecifies the ids of the entity type
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 
)

Calculates time step estimate on elements of/in entity type: "Tet" or "Hex" or "Volume" or "Block" or "Group".

double cubit.calculate_timestep_estimate_with_props("volume", vol_list, 2.7, 70, 0.35 )
Parameters
entity_typeSpecifies the entity type (hex, tet, volume, block, group)
idsSpecifies the ids of the entity type
densitySpecifies the density
youngs_modulusSpecifies the Young's modulus
poissons_ratioSpecifies the Poisson's ratio
Returns
time step estimate (smallest time step)

◆ clear_drawing_set()

void CubitInterface::clear_drawing_set ( const std::string &  set_name)

Clear a named drawing set (this is for mesh preview)

◆ clear_highlight()

void CubitInterface::clear_highlight ( )

Clear all entity highlights.

◆ clear_picked_list()

void CubitInterface::clear_picked_list ( )

Clear the picked list.

◆ clear_preview()

void CubitInterface::clear_preview ( )

Clear preview graphics without affecting other display settings.

◆ cmd()

bool CubitInterface::cmd ( const char *  input_string)

Pass a command string into Cubit.

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.

CubitInterface::cmd("create brick x 10");
cubit.cmd("brick x 10")
Parameters
input_stringPointer to a string containing a complete Cubit command

◆ compare_geometry_and_mesh()

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 
)

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.)

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 
)

Query virtualality of an entity's children.

if (CubitInterface::contains_virtual("surface", 134)) . . .
if cubit.contains_virtual("surface", 134)):
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity

◆ convection_is_on_shell_area()

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.

Parameters
entity_idId of the BC convection
shell_areaenum of BCEntityTypes. Use 7 to check if on top, 8 to check if on bottom
Returns
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.

Parameters
entity_idId of the BC convection
Returns
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.

Parameters
[in]init_bodyThe Body to be copied
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.

Parameters
[in]v0The start vertex
[in]v1The end vertex
[in]intermediate_pointintermideate coord
Returns
A Curve object

◆ create_curve()

Curve CubitInterface::create_curve ( Vertex  v0,
Vertex  v1 
)

Creates a curve between two vertices.

Parameters
[in]v0The start vertex
[in]v1The end vertex
Returns
A Curve object

◆ create_new_group()

int CubitInterface::create_new_group ( )

Create a new group.

Returns
group_id ID of new group

◆ create_spline()

Curve CubitInterface::create_spline ( std::vector< std::array< double, 3 > >  points,
int  surface_id 
)

create spline through the given 3d points

Parameters
[in]coordinatesof points on the spline, in order
[in]idof the surface on which to create the spline
Returns
the created curve object

◆ create_surface()

Body CubitInterface::create_surface ( std::vector< Curve curves)

Creates a surface from boundary curves.

Parameters
[in]curvesA list of curve objects from which to make the surface
Returns
A Body object of the newly created Surface

◆ create_user_interface()

void CubitInterface::create_user_interface ( )

◆ create_vertex()

Vertex CubitInterface::create_vertex ( double  x = 0,
double  y = 0,
double  z = 0 
)

Creates a vertex at a x,y,z.

Parameters
[in]xThe x location of the vertex (default to 0)
[in]yThe y location of the vertex (default to 0)
[in]zThe z location of the vertex (default to 0)
Returns
A Vertex object

◆ current_selection_count()

int CubitInterface::current_selection_count ( )

Get the current count of selected items.

◆ curve()

CubitInterface::Curve CubitInterface::curve ( int  id_in)

Gets the curve object from an ID.

Parameters
id_inThe ID of the curve
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

Parameters
[in]hithe height of the cylinder
[in]r1radius in the x direction
[in]r2radius in the y direction
[in]r3used to adjust the top. If set to 0, will produce a cone. If set to the larger of r1 or r2 it will create a straight cylinder.
Returns
A body object of the newly created cylinder

◆ delete_all_groups()

void CubitInterface::delete_all_groups ( )

Delete all groups.

◆ delete_group()

void CubitInterface::delete_group ( int  group_id)

Delete a specific group.

Parameters
group_idID of group to delete

◆ destroy()

int CubitInterface::destroy ( )

Closes the current journal file.

◆ 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

◆ draw_curve_capture()

void CubitInterface::draw_curve_capture ( const std::string &  geometry_type,
const std::vector< int > &  ids,
bool  is_captured 
)

◆ draw_curve_capture_from_size()

void CubitInterface::draw_curve_capture_from_size ( const std::string &  geometry_type,
const std::vector< int > &  ids,
double  percent_captured,
double  mesh_size 
)

◆ enable_signal_handling()

void CubitInterface::enable_signal_handling ( bool  on)

initialize/uninitialize signal handling C++ only

Parameters
onSet to true to initialize signal handling, false to uninitialize.

◆ ensure_init()

void CubitInterface::ensure_init ( )

◆ entity_exists()

bool CubitInterface::entity_exists ( const std::string &  entity_type,
int  id 
)

return whether an entity of specified ID exists

bool exists = CubitInterface::entity_exists("surface", 12);
Parameters
entity_typeType of the entity being queried
idID of entity
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.

Parameters
curve_idThe Curve 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_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.

Parameters
geometry_typeThe 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_merge_tolerance()

double CubitInterface::estimate_merge_tolerance ( std::vector< int >  target_volume_ids,
bool  accurate_in = false,
bool  report_in = false,
double  low_value_in = -1.0,
double  high_value_in = -1.0,
int  number_calculations_in = 10,
bool  return_calculations_in = false,
std::vector< double > *  merge_tolerance_list = NULL,
std::vector< int > *  number_of_proximities_list = NULL 
)

Estimate a good merge tolerance for the passed-in volumes.

Given a list of volumes try to estimate a good merge tolerance.

Parameters
target_volume_idsList of volumes ids to examine.
accurate_inFlag specifying whether to do a lengthier, more accurate calculation.
report_inFlag specifying whether to report results to the command line.
lo_val_inLow value of range to search for merge tolerance.
hi_val_inHigh value of range to search for merge tolerance.
num_calculations_inNumber of intervals to split search range up into.
return_calculations_inFlag specifying whether to return the number of proximities at each step.
merge_tolsList containing merge tolerance at each step of calculation.
num_proximitiesList containing number of proximities at each step of calculation.

◆ 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_idsThe 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()

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.

Parameters
volume_idsThe Id of the volumes to estimate element count size The overlay grid size keep_void Mesh the void space (e.g. air, enclosures, etc.)
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)

Parameters
curve_lista list of curve ids (integers)
test_anglethe 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
curveid (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
surfid (integer) vert id (integer)
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

◆ find_floating_volumes()

void CubitInterface::find_floating_volumes ( std::vector< int >  target_volume_ids,
std::vector< int > &  returned_floating_id_list 
)

Get the list of volumes with no merged children.

Given a list of volumes find all of the volumes that are not attached to any other entity through a merge.

Parameters
target_volume_idsList of volumes ids to examine.
volume_listUser specified list where the ids of floating volumes are returned

◆ find_nonmanifold_curves()

void CubitInterface::find_nonmanifold_curves ( std::vector< int >  target_volume_ids,
std::vector< int > &  returned_curve_list 
)

Get the list of nonmanifold curves in the volume list.

Given a list of volumes find all of the nonmanifold curves. This is found by seeing if there is at least one merged face attached to any merged curve. If there exist merged curves that don't belong to merged faces it represents a nonmanifold case.

Parameters
target_volume_idsList of volumes ids to examine.
curve_listUser specified list where the ids of nonmanifold curves are returned

◆ find_nonmanifold_vertices()

void CubitInterface::find_nonmanifold_vertices ( std::vector< int >  target_volume_ids,
std::vector< int > &  returned_vertex_list 
)

Get the list of nonmanifold vertices in the volume list.

Given a list of volumes find all of the nonmanifold vertices. This is found by seeing if there is at least one merged curve attached to any merged vertex. If there exist merged vertices that don't belong to merged curves it represents a nonmanifold case.

Parameters
target_volume_idsList of volumes ids to examine.
vertex_listUser specified list where the ids of nonmanifold vertices are returned

◆ flush_graphics()

void CubitInterface::flush_graphics ( )

Flush the graphics.

◆ gather_surfaces_by_orientation()

std::vector<int> CubitInterface::gather_surfaces_by_orientation ( std::vector< int >  seed_surf_ids,
std::vector< int >  all_surf_ids 
)

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.

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 )

◆ get_acceleration_combine_type()

std::string CubitInterface::get_acceleration_combine_type ( int  entity_id)

Get the acceleration's combine type which is "Overwrite", "Average", "SmallestCombine", or "LargestCombine".

Parameters
entity_idId of the acceleration
Returns
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

Parameters
entity_idId of the acceleration
Returns
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

Parameters
entity_idId of the acceleration
Returns
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.

For a specified entity, find all surfaces that own the entity and surfaces that touch the surface that owns this 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)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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.

For a specified entity, find all volumes that own the entity and volumes that touch the volume that owns this 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)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
Returns
A list (python tuple) of volume ids

◆ get_all_cfd_bcs()

std::vector<CFD_BC_Entity> CubitInterface::get_all_cfd_bcs ( )

◆ 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.

Parameters
filenameFully qualified exodus file name
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.

Parameters
filenameFully qualified exodus file name
typeVariable type - 'g', 'n', or 'e'
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 
)

Get a list of geometric owners given a list of mesh entities. returns geometric owners of entity as well as all of its child mesh entities.

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)
Parameters
mesh_entity_typeThe type of mesh entity. Works for 'quad, 'face', 'tri', 'hex', 'tet', 'edge', 'node'
mesh_entity_listA 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_all_ids_from_name()

std::vector<int> CubitInterface::get_all_ids_from_name ( const std::string &  geo_type,
const std::string &  name 
)

Get all ids of a geometry type with the prefix given by string.

std::vector<int> entity_ids = CubitInterface::get_all_ids_from_name("volume", "member_2");
entity_ids = cubit.get_all_ids_from_name("volume", "member_2")
Parameters
geo_typetype of geometry entity (vertex, curve, surface, volume) name Prefix of entity name return vector of integers representing the entities that have the given name as a prefix

◆ 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.

Parameters
var_nameaprepro variable name
var_typereturn 0, 1 or 3 where 0=undefined 1=double/int 2=string
dvalreturn integer or double value if var_type=1
svalreturn string if var_type=2
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.

Parameters
var_nameaprepro variable name
Returns
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.

Returns
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.

Parameters
curve_idID of the curve
Returns
Arc length of the curve

◆ get_assembly_children()

std::vector<AssemblyItem> CubitInterface::get_assembly_children ( int  assembly_id)

◆ 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.

Parameters
assembly_idId 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_idId 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_idId that identifies the assembly node
Returns
Instance of the assembly node

◆ get_assembly_items()

std::vector<AssemblyItem> CubitInterface::get_assembly_items ( )

◆ get_assembly_level()

int CubitInterface::get_assembly_level ( int  assembly_id)

Get the stored level of an assembly node.

Parameters
assembly_idId 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_idId 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_idId 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_idID of the volume
data_typeMagic 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_idId 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_idId 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_idId 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_idId that identifies the 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.

Parameters
entity_typeSpecifies the geometry type of the entity
enitty_id_listList (vector) of entity ids
sizeThe 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_idsList of volume ids to examine.
body_listUser specified list where ids of bad bodies will be returned
volume_listUser specified list where ids of bad volumes will be returned
surface_listUser specified list where ids of bad surfaces will be returned
curve_listUser specified list where ids of bad curves will be returned

◆ get_bc_id_list()

std::vector<int> CubitInterface::get_bc_id_list ( CI_BCTypes  bc_type_enum)

Get a list of all bcs of a specified type.

Parameters
bc_type_inas 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_intype of bc, as defined by enum CI_BCTypes. 1-9 is FEA, 10-30 is CFD
bc_idID 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.

Parameters
bc_typeenum of CI_BCTypes. temperature = 4, convection = 7
entity_idId of the BC convection
temp_typeenum 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
Returns
The value of the specified BC temperature

◆ get_blend_chain_collections()

std::vector<std::vector<int> > CubitInterface::get_blend_chain_collections ( const std::vector< int > &  volume_list,
double  radius_threshold,
std::vector< double > &  return_radii 
)

Returns the collections of surfaces that comprise blend chains in the specified volumes. Filter by radius threshold.

Parameters
volume_listList of volumes to query
radius_thresholdresturn only blend chains less than radius_threshold
return_radiireturn a vector of blend chain radii corresponding to the return blend chains lists
Returns
A list of lists of surface id's grouped by their individual blend chain

◆ get_blend_chains()

std::vector< std::vector<int> > CubitInterface::get_blend_chains ( int  surface_id)

Returns the blend chains for a surface.

Parameters
surface_idsurface to retrieve the blend chains from
Returns
A list of lists of id's in each blend chain. Note: If using python, lists will be python tuples.

◆ 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_idsList 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_idThe 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_idThe block id
indexThe 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_idThe block id
indexThe 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_idID of block to examine
group_listUser specified list where groups associated with this block are returned
node_listUser specified list where nodes associated with this block are returned
edge_listUser specified list where edges associated with this block are returned
tri_listUser specified list where tris associated with this block are returned
face_listUser specified list where faces associated with this block are returned
pyramid_listUser specified list where pyramids associated with this block are returned
tet_listUser specified list where tets associated with this block are returned
hex_listUser specified list where hexes associated with this block are returned
volume_listUser specified list where volumes associated with this block are returned
surface_listUser specified list where surfaces associated with this block are returned
curve_listUser specified list where curves associated with this block are returned
vertex_listUser specified list where vertices associated with this block are returned

◆ get_block_count()

int CubitInterface::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_idUser 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_idUser 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_idThe 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_idThe block id
indexThe 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_idThe 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_idUser 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_idUser 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_idUser 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.

int block_id = CubitInterface::get_block_id("surface", 33);
block_id = cubit.get_block_id("surface", 33)
Parameters
entity_typeType of entity
entity_idId of entity in question
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.

Parameters
mesh_geom_file_nameFully qualified name of 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.

Parameters
block_idUser specified id of the desired 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.

Parameters
block_idUser specified id of the desired 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.

Parameters
block_idUser specified id of the desired 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.

Parameters
block_idUser specified id of the desired 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.

Parameters
block_idUser specified id of the desired 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.

Parameters
block_idUser specified id of the desired 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.

Parameters
block_idUser specified id of the desired 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.

Parameters
block_idUser specified id of the desired 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 
)

get default depth value for blunt tangency operation

Returns
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_bolt_axis()

std::vector<double> CubitInterface::get_bolt_axis ( int  vol_id)

get axis vector of bolt

Parameters
vol_idvolume ID. Should represent bolt geometry
Returns
normalized axis vector of bolt ([0,0,0] if invalid volume or couldn't determine)

◆ get_bolt_diameter()

double CubitInterface::get_bolt_diameter ( int  vol_id)

get diameter of bolt shank

Parameters
vol_idvolume ID. Should represent bolt geometry
Returns
diameter of bolt (0 if invalid volume or couldn't determine)

◆ get_bool_sculpt_default()

bool CubitInterface::get_bool_sculpt_default ( const char *  variable)

◆ get_boundary_layer_algorithm()

std::string CubitInterface::get_boundary_layer_algorithm ( int  boundary_layer_id)

◆ get_boundary_layer_aspect_first_parameters()

bool CubitInterface::get_boundary_layer_aspect_first_parameters ( int  boundary_layer_id,
double &  returned_first_row_aspect,
double &  returned_growth_factor,
int &  returned_number_rows 
)

◆ get_boundary_layer_aspect_last_parameters()

bool CubitInterface::get_boundary_layer_aspect_last_parameters ( int  boundary_layer_id,
double &  returned_first_row_height,
int &  returned_number_rows,
double &  returned_last_row_aspect 
)

◆ get_boundary_layer_continuity()

bool CubitInterface::get_boundary_layer_continuity ( int  boundary_layer_id)

◆ get_boundary_layer_curve_intersection_types()

bool CubitInterface::get_boundary_layer_curve_intersection_types ( std::vector< int > &  returned_curve_list,
std::vector< int > &  returned_volume_list,
std::vector< std::string > &  returned_types 
)

◆ get_boundary_layer_curve_surface_pairs()

bool CubitInterface::get_boundary_layer_curve_surface_pairs ( int  boundary_layer_id,
std::vector< int > &  returned_curve_list,
std::vector< int > &  returned_surface_list 
)

◆ get_boundary_layer_id_list()

std::vector<int> CubitInterface::get_boundary_layer_id_list ( )

◆ get_boundary_layer_surface_volume_pairs()

bool CubitInterface::get_boundary_layer_surface_volume_pairs ( int  boundary_layer_id,
std::vector< int > &  returned_surface_list,
std::vector< int > &  returned_volume_list 
)

◆ get_boundary_layer_uniform_parameters()

bool CubitInterface::get_boundary_layer_uniform_parameters ( int  boundary_layer_id,
double &  returned_first_row_height,
double &  returned_growth_factor,
int &  returned_number_rows 
)

◆ get_boundary_layer_vertex_intersection_types()

bool CubitInterface::get_boundary_layer_vertex_intersection_types ( std::vector< int > &  returned_vertex_list,
std::vector< int > &  returned_surface_list,
std::vector< std::string > &  returned_types 
)

◆ get_boundary_layers_by_base()

std::vector<int> CubitInterface::get_boundary_layers_by_base ( const std::string &  base_type,
int  base_id 
)

◆ get_boundary_layers_by_pair()

std::vector<int> CubitInterface::get_boundary_layers_by_pair ( const std::string &  base_type,
int  base_id,
int  parent_id 
)

◆ get_bounding_box()

std::array<double, 10> CubitInterface::get_bounding_box ( const std::string &  geometry_type,
int  entity_id 
)

Get the bounding box for a specified entity.

std::array<double, 10> vector_list;
vector_list = CubitInterface::get_bounding_box("surface", 22);
vector_list = cubit.get_bounding_box("surface", 22)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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_cavity_surfaces()

std::vector<int> CubitInterface::get_cavity_surfaces ( int  surface_id)

Returns the adjacent surfaces in a cavity for a surface.

Parameters
surface_idthat is part of the cavity
Returns
A list of surface id's in the cavity (including surface_id).

◆ get_center_point()

std::array<double,3> CubitInterface::get_center_point ( const std::string &  entity_type,
int  entity_id 
)

Get the center point of a specified entity.

std::array<double,3> center_point;
center_point = CubitInterface::get_center_point("surface", 22);
center_point = cubit.get_center_point("surface", 22)
Parameters
entity_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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.

Parameters
entity_idID of the cfd BC
Returns
Integer corresponding to the type of cfd, as defined by CI_BCTypes

◆ get_chamfer_chain_collections()

std::vector<std::vector<int> > CubitInterface::get_chamfer_chain_collections ( const std::vector< int > &  volume_list,
double  thickness_threshold,
std::vector< double > &  return_thicknesses 
)

Returns the collections of surfaces that comprise chamfers in the specified volumes. Filter by thickness of chamfer.

Parameters
volume_listList of volumes to query
radius_thresholdresturn only chamfer chains less than thickness_threshold
return_radiireturn a vector of chamfer chain radii corresponding to the return chamfer chains lists
Returns
A list of lists of surface id's grouped by their individual chamfer_chain

◆ get_chamfer_chains()

std::vector< std::vector<int> > CubitInterface::get_chamfer_chains ( int  surface_id)

Returns the chamfer chains for a surface.

Parameters
surface_idsurface to retrieve the chamfer chains from
Returns
A list of lists of id's in each chamfer chain. Note: If using python, lists will be python tuples.

◆ 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.

Parameters
target_volume_idsList of volume ids to examine.
thickness_thresholdmax 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
surafceid
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_idsList of volume ids to examine.
mesh_sizeIndicate 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_idsList of volume ids to examine.
mesh_sizeIndicate the mesh size used as the threshold
genusIndicate 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_listList 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_idsList of volume ids to examine.
narrow_sizeIndicate 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
xcoordinate
ycoordinate
zcoordinate
Returns
id of closest node, 0 if none found

◆ get_closest_vertex_curve_pairs()

void CubitInterface::get_closest_vertex_curve_pairs ( std::vector< int >  target_ids,
int &  returned_number_to_return,
std::vector< int > &  returned_vertex_ids,
std::vector< int > &  returned_curve_ids,
std::vector< double > &  returned_distances 
)

Find the n closest vertex pairs in the model.

Given a list of volumes find the n closest vertex curve pairs. The checks will be done on a surface by surface basis so that only curve-vertex pairs within a given surface will be returned. This function is for finding the smallest features within the surfaces of the model.

Parameters
target_idsList of volumes ids to examine.
num_to_returnNumber of vertex curve pairs to return.
vert_idsIds of returned vertices.
curve_idsIds of returned curves.
distancesVertex-curve pair distances.

◆ get_coincident_entity_pairs()

void CubitInterface::get_coincident_entity_pairs ( std::vector< int >  target_volume_ids,
std::vector< int > &  returned_v_v_vertex_list,
std::vector< int > &  returned_v_c_vertex_list,
std::vector< int > &  returned_v_c_curve_list,
std::vector< int > &  returned_v_s_vertex_list,
std::vector< int > &  returned_v_s_surf_list,
std::vector< double > &  returned_vertex_distance_list,
std::vector< double > &  returned_curve_distance_list,
std::vector< double > &  returned_surf_distance_list,
double  low_value,
double  high_value,
bool  do_vertex_vertex = true,
bool  do_vertex_curve = true,
bool  do_vertex_surf = true,
bool  filter_same_volume_cases = false 
)

Get the list of coincident vertex-vertex, vertex-curve, and vertex-surface pairs and distances from a list of volumes.

Given a list of volumes get lists of coincident vertex-vertex, vertex-curve, and vertex-surface pairs and their distances based on the passed-in thresholds. The returned lists will be exactly double the size of the distance lists. For each distance, 2 entities will be associated at the same relative place in the list.

Parameters
target_volume_idsList of volumes ids to examine.
do_vertex_vertexParameter specifying whether to do vertex-vertex check.
do_vertex_curveParameter specifying whether to do vertex-curve check.
do_vertex_surfParameter specifying whether to do vertex-surface check.
v_v_vertex_listUser specified list where the ids of coincident vertex pairs are returned
v_c_vertex_listUser specified list where the ids of the vertices of coincident vertex-curve pairs are returned
v_c_curve_listUser specified list where the ids of the curves of coincident vertex-curve pairs are returned
v_s_vertex_listUser specified list where the ids of the vertices of coincident vertex-surface pairs are returned
v_s_surf_listUser specified list where the ids of the surfaces of coincident vertex-surface pairs are returned
vertex_distance_listUser specified list where the vertex-vertex distance values will be returned
curve_distance_listUser specified list where the vertex-curve distance values will be returned
surf_distance_listUser specified list where the vertex-surface distance values will be returned
low_valueUser specified low threshold value
hi_valueUser specified high threshold value
filter_same_volume_casesParameter specifying whether to weed out entity pairs that are in the same volume.

◆ get_coincident_vertex_curve_pairs()

void CubitInterface::get_coincident_vertex_curve_pairs ( std::vector< int >  target_volume_ids,
std::vector< int > &  returned_vertex_list,
std::vector< int > &  returned_curve_list,
std::vector< double > &  returned_distance_list,
double  low_value,
double  threshold_value,
bool  filter_same_volume_cases = false 
)

Get the list of coincident vertex/curve pairs and distances from a list of volumes.

Given a list of volumes get a list of coincident vertex/curve pairs and their distances based on the current merge tolerance value and a threshold value. The returned lists will be of equal length and matched by order.

Parameters
target_volume_idsList of vertices ids to examine.
vertex_listUser specified list for the ids of coincident vertices
curve_listUser specified list for the ids of coincident curves
distance_listUser specified list where the distance values will be returned
threshold_valueUser specified threshold value

◆ get_coincident_vertex_surface_pairs()

void CubitInterface::get_coincident_vertex_surface_pairs ( std::vector< int >  target_volume_ids,
std::vector< int > &  returned_vertex_list,
std::vector< int > &  returned_surface_list,
std::vector< double > &  returned_distance_list,
double  low_value,
double  threshold_value,
bool  filter_same_volume_cases = false 
)

Get the list of coincident vertex/surface pairs and distances from a list of volumes.

Given a list of volumes get a list of coincident vertex/pairs pairs and their distances based on the current merge tolerance value and a threshold value. The returned lists will be of equal length and matched by order.

Parameters
target_volume_idsList of vertices ids to examine.
vertex_listUser specified list for the ids of coincident vertices
surface_listUser specified list for the ids of coincident surfaces
distance_listUser specified list where the distance values will be returned
threshold_valueUser specified threshold value

◆ get_coincident_vertex_vertex_pairs()

void CubitInterface::get_coincident_vertex_vertex_pairs ( std::vector< int >  target_volume_ids,
std::vector< int > &  returned_vertex_pair_list,
std::vector< double > &  returned_distance_list,
double  low_value,
double  threshold_value,
bool  filter_same_volume_cases = false 
)

Get the list of coincident vertex pairs and distances from a list of volumes.

Given a list of volumes get a list of coincident vertex pairs and their distances based on the current merge tolerance value and a threshold. The returned vertex list will be exactly double the size of the distance list. For each distance, 2 vertices will be associated at the same relative place in the list.

Parameters
target_volume_idsList of volumes ids to examine.
vertex_pair_listUser specified list where the ids of coincident vertex pairs be returned
distance_listUser specified list where the distance values will be returned
threshold_valueUser specified threshold value

◆ 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_listList 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_idThe id of one of the surfaces
surface_2_idThe 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_idThe id of one of the curves
curve_2_idThe 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_idsList 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.

std::vector<int> node_id_list;
node_id_list = CubitInterface::get_connectivity("hex", 221);
node_id_list = cubit.get_connectivity("hex", 221)
Parameters
entity_typeThe mesh element type
entity_idThe mesh element id
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_idID 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_idID 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_idID 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.

Parameters
entity_idId of the contact pair
Returns
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.

Parameters
entity_idId of the contact pair
Returns
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.

Parameters
entity_idId of the contact pair
Returns
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.

Parameters
entity_idId of the contact pair
Returns
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.

Parameters
entity_idId of the contact pair
Returns
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.

Parameters
entity_idId of the contact pair
Returns
The tolerance value of the contact pair

◆ get_continuous_curves()

std::vector<int> CubitInterface::get_continuous_curves ( int  curve_id,
double  angle_tol 
)

Returns the adjacent curves that are continuous (angle is 180 degrees +- angle_tol)

Parameters
curve_idthat is part of the cavity
angle_tolangle tolerance for continuity
Returns
A list of curve id's in the continuous set (including curve_id).

◆ get_continuous_surfaces()

std::vector<int> CubitInterface::get_continuous_surfaces ( int  surface_id,
double  angle_tol 
)

Returns the adjacent surfaces that are continuous (exterior angle is 180 degrees +- angle_tol)

Parameters
surface_idthat is part of the cavity
angle_tolangle tolerance for continuity
Returns
A list of surface id's in the continuous set (including surface_id).

◆ get_convection_coefficient()

double CubitInterface::get_convection_coefficient ( int  entity_id,
CI_BCEntityTypes  bc_type_enum 
)

Get the convection coefficient.

Parameters
entity_idId of the BC convection
cc_typeenum of CI_BCEntityTypes (1-normal, 5-shell top, 6-shell bottom)
Returns
The value of the convection coefficient

◆ get_coordinate_systems_id_list()

std::vector<int> CubitInterface::get_coordinate_systems_id_list ( )

get a list of coordinate system ids

Returns
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_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

◆ get_current_journal_file()

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

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the curve
valueReturns whether the bias is from the start of the 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

Parameters
curve_idSpecifies the id of the curve
valueReturns whether the bias from the start of the 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

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the 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.

Parameters
curve_idID of the curve
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

Parameters
curve_idUser specified id of the desired 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.

Parameters
curve_idID of the 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.

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the 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

Parameters
curve_idSpecifies the id of the curve
first_sizeReturns the first_size
factorReturns the factor
last_sizeReturns the last_size
startReturns whether the scheme is from the start of the curve.
vertex_idReturns the vertex id used for the start of the scheme.
Returns
True/False A curve with the curve_id exists.

◆ get_curve_nodes()

std::vector<int> CubitInterface::get_curve_nodes ( int  curve_id)

Get list of node ids owned by a curve.
Excludes nodes owned by bounding vertices.

int curv_id = 12;
vector<int> curve_nodes = CubitInterface::get_curve_nodes(curv_id);
Parameters
curv_idid of curve
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.

Parameters
curve_idID of the curve
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.

Parameters
curve_idID of the curve
Returns
Type of curve

◆ get_dbl_sculpt_default()

double CubitInterface::get_dbl_sculpt_default ( const char *  variable)

return sculpt default value

◆ get_default_auto_size()

double CubitInterface::get_default_auto_size ( )

Get auto size needs for the current set of geometry.

◆ 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.

Returns
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

◆ get_default_geometry_engine()

std::string CubitInterface::get_default_geometry_engine ( )

Get the name of the default modeler engine.

std::string 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".

Parameters
entity_idId of the displacement
Returns
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.

Parameters
entity_idId of the displacement
Returns
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

Parameters
entity_idId of the displacement
Returns

◆ 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

Parameters
entity_idId of the displacement
Returns

◆ 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_1ID 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_1geometry 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
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.

Parameters
xvalue of the point to measure
yvalue of the point to measure
zvalue of the point to measure
curve_idID of the curve
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)

Given a edge id, return the global element id.

Parameters
edge_idSpecifies the id of the edge
Returns
The corresponding element id

◆ get_edges_to_swap()

std::vector<int> CubitInterface::get_edges_to_swap ( int  curve_id)

Given a curve defining a knife edge between two triangle-meshed surfaces, return a list of edges on triangles at the curve that are good candidates for swapping. A good candidate for swapping means that if swapped, the two triangles at the knife's edge will have a larger interior dihedral angle between them, allowing a larger volume to accommodate tetmeshing.

Parameters
curve_idUser-specified id of the curve
Returns
A list (python tuple) of edge ids contained

◆ 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 
)

python callable version of the get_quality_stats without pass by reference arguments. All return values are stuffed into a double array

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];
Parameters
entity_typeSpecifies the geometry type of the entity
id_listSpecifies a list of ids to work on
metric_nameSpecify the metric used to determine the quality
single_thresholdQuality threshold value
use_low_thresholduse threshold as lower or upper bound
low_thresholdQuality threshold when using a lower and upper range
high_thresholdQuality threshold when using a lower and upper range
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.

Parameters
element_idThe 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_listList (vector) of volume ids
auto_factorThe 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_idThe 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_idThe 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_idThe element id (i.e. the global element export id)
Returns
type_id The hex, tet, wedge, etc. id is returned.

◆ get_entities()

std::vector<int> CubitInterface::get_entities ( const std::string &  entity_type)

Get all entities of a specified type (including geometry, mesh, etc...)

std::vector<int> entity_id_list;
entity_id_list = CubitInterface::get_entities("volume");
entity_id_list = cubit.get_entities("volume")
Parameters
entity_typeSpecifies the type of the entity
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 
)

Get the color of a specified entity.

int color_index = CubitInterface::get_entity_color_index("curve", 33);
color_index = cubit.get_entity_color_index("curve", 33)
Parameters
entity_typeSpecifies the type of the entity
entity_idSpecifies the id of the entity
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 
)

Get the modeler engine type for a specified entity.

std::vector<std::string> engine_list;
engine_list = CubitInterface::get_entity_modeler_engine("surface", 47);
engine_list = cubit.get_entity_modeler_engine("surface", 47)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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,
bool  no_default = false 
)

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.

std::string name = CubitInterface::get_entity_name("vertex", 22);
name = cubit.get_entity_name("vertex", 22)
Parameters
entity_typeSpecifies the type of the entity
entity_idSpecifies the id of the entity
no_defaultTrue to return an empty string if no name is set
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 
)

Get the sense of a sideset item.

std::string sense;
sense = CubitInterface::get_entity_sense("face", 332, 2);
sense = cubit.get_entity_sense("face", 332, 2)
Parameters
source_typeItem type - could be 'face', 'quad' or 'tri'
source_idID of entity
sideset_idID of the sideset
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 
)

Get the number of elements in a exodus entity.

int element_count = CubitInterface::get_exodus_element_count(2, "sideset");
element_count = cubit.get_exodus_element_count(2, "sideset")
Parameters
entity_idThe id of the entity
entity_typeThe type of the entity
Returns
Number of Elements

◆ get_exodus_entity_description()

std::string CubitInterface::get_exodus_entity_description ( std::string  entity_type,
int  entity_id 
)

Get the description associated with an exodus entity.

std::string entity_description;
entity_description = CubitInterface::get_exodus_entity_description("sideset", 33);
entity_description = cubit.get_exodus_entity_description("sideset", 33)
Parameters
entity_type"block", "sideset", nodeset"
entity_idId of the entity in question
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 name associated with an exodus entity.

std::string entity_name;
entity_name = CubitInterface::get_exodus_entity_name("sideset", 33);
entity_name = cubit.get_exodus_entity_name("sideset", 33)
Parameters
entity_type"block", "sideset", nodeset"
entity_idId of the entity in question
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 
)

Get the type of an exodus entity.

std::string entity_description;
entity_description = CubitInterface::get_exodus_entity_description("sideset", 33);
entity_description = cubit.get_exodus_entity_type("sideset", 33)
Parameters
entity_type"block", "sideset", nodeset"
entity_idId of the entity in question
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 
)

Get the exodus/genesis id for this element.

int exodus_id = CubitInterface::get_exodus_id("hex", 221);
exodus_id = cubit.get_exodus_id("hex", 221)
Parameters
entity_typeThe mesh element type
entity_idThe mesh element id
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.

Parameters
entity_type: nodeset, sideset, or block block_id The block id
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.

Parameters
entity_type: nodeset, sideset, or block block_id The block id
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 
)

Get the list of node ids contained within a mesh entity, including interior nodes.

std::vector<int> node_id_list;
node_id_list = CubitInterface::get__expanded_connectivity("hex", 221);
node_id_list = cubit.get__expanded_connectivity("hex", 221)
Parameters
entity_typeThe mesh element type
entity_idThe mesh element id
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.

Parameters
entity_idId of the force
Returns
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.

Parameters
entity_idId of the force
Returns
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.

Parameters
entity_idId of the force
Returns
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 
)

Get a list of geometric owners given a list of mesh entities.

std::vector<std::string> owner_list;
owner_list = CubitInterface::get_geometric_owner("quad", id_list);
owner_list = cubit.get_geometric_owner("quad", id_list)
Parameters
mesh_entity_typeThe type of mesh entity. Works for 'quad, 'face', 'tri', 'hex', 'tet', 'edge', 'node'
mesh_entity_listA 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 
)

Get the node count for a specific geometric entity.

Parameters
entity_typeThe geometry type ("surface", "curve", etc)
entity_idThe entity id
Returns
Number of nodes in the geometry

◆ get_geometry_owner()

std::string CubitInterface::get_geometry_owner ( const std::string &  entity_type,
int  entity_id 
)

Get the geometric owner of this mesh element.

std::string geom_owner = CubitInterface::get_geometry_owner("hex", 221);
geom_owner = cubit.get_geometry_owner("hex", 221)
Parameters
entity_typeThe mesh element type
entity_idThe mesh element id
Returns
Name of owner

◆ get_global_element_id()

int CubitInterface::get_global_element_id ( const std::string &  element_type,
int  id 
)

Given a hex, tet, etc. id, return the global element id.

Parameters
idSpecifies the id of the hex, tet, etc. elem_type the type of the entity ("hex", "tet", "wedge", "pyramid", "tri", "face", "quad", "edge", or "sphere")
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.

Parameters
group_idID 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_idID of the group to examine
group_listUser specified list where group ids will be returned
body_listUser specified list where body ids will be returned
volume_listUser specified list where volume ids will be returned
surface_listUser specified list where surface ids will be returned
curve_listUser specified list where curve ids will be returned
vertex_listUser specified list where vertex ids will be returned
node_countUser specified variable where the number of nodes will be returned
edge_countUser specified variable where the number of edges will be returned
hex_countUser specified variable where the number of hexes will be returned
quad_countUser specified variable where the number of quads will be returned
tet_countUser specified variable where the number of tets will be returned
tri_countUser 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_idID 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_idID 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_idID 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_idID 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_idID 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_idID 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_idID 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_idID 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_idID 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_idID 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_idID 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_idID 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_idID 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_idID 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.

Parameters
bc_areaenum of CI_BCEntityTypes. If on solid, use 4. If on thin shell, use 7 for top, 8 for bottom
entity_idID of the heatflux
Returns
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)

Given a hex id, return the global element id.

Parameters
hex_idSpecifies the id of the hex
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_hole_surfaces()

std::vector<int> CubitInterface::get_hole_surfaces ( int  surface_id)

Returns the adjacent surfaces in a hole for a surface.

Parameters
surface_idthat is part of the hole
Returns
A list of surface id's in the hole (including surface_id).

◆ get_hydraulic_radius_surface_area()

double CubitInterface::get_hydraulic_radius_surface_area ( int  surface_id)

Get the area of a hydraulic surface.

Parameters
surface_idID 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_idID 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.

int entity_id = CubitInterface::get_id_from_name("member_2");
entity_id = cubit.get_id_from_name("member_2")
Parameters
nameName of the entity to examine return Integer representing the entity

◆ get_id_string()

std::string CubitInterface::get_id_string ( const std::vector< int > &  entity_ids)

Parse a list of integers into a Cubit style id list. Return string will not include carriage returns or line break.

std::vector<int> entity_ids = {1, 2, 3, 4};
std::string id_string = CubitInterface::get_id_string(entity_ids);
// id_string is "1 to 4";
entity_ids = [1,2,3,4]
id_string = cubit.get_all_ids_from_name(entity_ids)
# id_string is '1 to 4'
Parameters
entity_idsvector of integers return A string representing the id list without line breaks

◆ get_idless_signature()

std::string CubitInterface::get_idless_signature ( std::string  entity_type,
int  entity_id 
)

get the idless signature of a geometric or mesh entity

Parameters
typethe type of the requested entity
idthe id of the requested 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

Parameters
typethe type of the requested entity
idlista list of ids
Returns
the idless signature i.e. curve at (1 1 0 ordinal 2) curve at (0 0 1 ordinal 1) ...

◆ get_int_sculpt_default()

int CubitInterface::get_int_sculpt_default ( const char *  variable)

◆ get_interface()

CubitBaseInterface* CubitInterface::get_interface ( std::string  interface_name)

Get the interface of a given name.

Parameters
interface_namethe name of interface

◆ get_label_type()

int CubitInterface::get_label_type ( const char *  entity_type)

make calls to SVDrawTool::get_label_type

Returns
label type currently associated with entity_type

◆ get_last_id()

int CubitInterface::get_last_id ( const std::string &  entity_type)

Get the id of the last created entity of the given type.

int last_id = CubitInterface::get_last_id("surface");
last_id = cubit.get_last_id("surface")
Parameters
entity_typeType of the entity being queried
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)

Get all free entities of a given 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")
Parameters
geom_typeSpecifies the geometry type of the free entity
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 ( )

Get a list of all defined material names.

Returns
List (python tuple) of all the material names.

◆ get_material_property()

double CubitInterface::get_material_property ( CI_MaterialProperty  material_property_enum,
int  entity_id 
)

Get the specified material property value.

Parameters
mpenum of CI_MaterialProperty. 0-Elastic Modulus, 1-Shear Modulus, 2-Poisson Ratio, 3-Density, 4-Specific Heat, 5-Conductivity
entity_idId of the material
Returns
Value of the specified property for that material

◆ get_media_name_list()

std::vector<std::string> CubitInterface::get_media_name_list ( )

Get a list of all defined material names.

Returns
List (python tuple) of all the material names.

◆ get_media_property()

int CubitInterface::get_media_property ( int  entity_id)

Get the media property value.

Parameters
entity_idId of the media
Returns
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 
)

Get the merge setting for a specified entity.

std::string merge_setting = CubitInterface::get_merge_setting("surface", 33);
merge_setting = cubit.get_merge_setting("surface", 33)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
Returns
A text string that indicates the merge setting for the entity

◆ get_merge_tolerance()

double CubitInterface::get_merge_tolerance ( )

Get the current merge tolerance value.

Returns
The value of the current merge tolerance

◆ get_mergeable_curves()

std::vector<std::vector<int> > CubitInterface::get_mergeable_curves ( std::vector< int >  target_volume_ids)

Get the list of mergeable curves from a list of volumes/bodies.

Given a list of volume ids, this will return a list of potentially mergeable curves. The returned lists include lists of the merge partners.

Parameters
target_volume_idsList of volume ids to examine.
Returns
list of lists of mergeable curves (potentially more than a pair) Note: If using python, lists will be python tuples.

◆ get_mergeable_entities()

void CubitInterface::get_mergeable_entities ( std::vector< int >  target_volume_ids,
std::vector< std::vector< int > > &  returned_surface_list,
std::vector< std::vector< int > > &  returned_curve_list,
std::vector< std::vector< int > > &  returned_vertex_list,
double  merge_tol = -1 
)

This function only works from C++ Get the list of mergeable entities from a list of volumes

Given a list of volume ids, this will return 3 lists of potential merge candidates. The returned lists include lists of the merge partners.

Parameters
target_volume_idsList of volume ids to examine.
surface_listUser specified list where mergeable surfaces will be stored
curve_listUser specified list where mergeable curves will be stored
vertex_listUser specified list where mergeable vertices will be stored
merge_tolmerge tolerance to determine mergable (optional). Uses the default merge_tolerance if not specified

◆ get_mergeable_surfaces()

std::vector<std::vector<int> > CubitInterface::get_mergeable_surfaces ( std::vector< int >  target_volume_ids)

Get the list of mergeable surfaces from a list of volumes/bodies.

Given a list of volume ids, this will return a list of potentially mergeable surfaces. The returned lists include lists of the merge partners.

Parameters
target_volume_idsList of volume ids to examine.
Returns
list of lists of mergeable surfaces (potentially more than a pair) Note: If using python, lists will be python tuples.

◆ get_mergeable_vertices()

std::vector<std::vector<int> > CubitInterface::get_mergeable_vertices ( std::vector< int >  target_volume_ids)

Get the list of mergeable vertices from a list of volumes/bodies.

Given a list of volume ids, this will return a list of potentially mergeable vertices. The returned lists include lists of the merge partners.

Parameters
target_volume_idsList of volume ids to examine.
Returns
list of lists of mergeable vertices (potentially more than a pair) Note: If using python, lists will be python tuples.

◆ get_mesh_edge_length()

double CubitInterface::get_mesh_edge_length ( int  edge_id)

Get the length of a mesh edge.

Parameters
edge_idSpecifies the id of the 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 
)

Get the mesh element type contained in the specified geometry.

std::string element_type = CubitInterface::get_mesh_element_type("surface", 2);
element_type = cubit.get_mesh_element_type("surface", 2)
Parameters
entity_typeThe type of entity
entity_idThe id of the entity
Returns
Mesh element type for that entity

◆ get_mesh_error_count()

int CubitInterface::get_mesh_error_count ( )

◆ 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_codeThe 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_errors()

std::vector<MeshErrorFeedback*> CubitInterface::get_mesh_errors ( )

◆ 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_typeeither "surface" or "volume"
entity_idthe 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.

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)
Parameters
element_typeMesh type of the element
element_idID of the mesh element return List (python tuple) of group ids that contain this mesh element

◆ get_mesh_interval_firmness()

std::string CubitInterface::get_mesh_interval_firmness ( const std::string &  geometry_type,
int  entity_id 
)

Get the mesh interval firmness for the specified entity. This may include influence from connected mesh intervals on connected geometry.

std::string firmness;
firmness = cubit.get_mesh_interval_firmness("surface", 12)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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 
)

Get the interval count for a specified entity.

int intervals = CubitInterface::get_mesh_intervals("surface", 12);
intervals = cubit.get_mesh_intervals("surface", 12)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
Returns
The entity's interval count

◆ get_mesh_scheme()

std::string CubitInterface::get_mesh_scheme ( const std::string &  geometry_type,
int  entity_id 
)

Get the mesh scheme for the specified entity.

std::string scheme;
CubitInterface::get_mesh_scheme("surface", 12, scheme);
scheme = cubit.get_mesh_scheme("surface", 12)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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 
)

Get the mesh scheme firmness for the specified entity.

std::string firmness;
CubitInterface::get_mesh_firmness("surface", 12);
firmness = cubit.get_mesh_firmness("surface", 12)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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 
)

Get the mesh size for a specified entity.

double mesh_size = CubitInterface::get_mesh_size("volume", 2);
mesh_size = cubit.get_mesh_size("volume", 2)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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 
)

Get the mesh size setting type for the specified entity. This may include influence from attached geometry.

std::string firmness;
CubitInterface::get_mesh_size_setting_type("surface", 12);
firmness = cubit.get_mesh_size_setting_type("surface", 12)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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 
)

Get the total volume/area of a entity's mesh.

double area = CubitInterface::get_meshed_volume_or_area("volume", 1);
area = cubit.get_meshed_volume_or_area("volume", 1)
Parameters
geom_typeSpecifies the type of entity - volume, surface, hex, tet, tri, quad
entity_idsA list of ids for the entity type
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_classification()

std::string CubitInterface::get_ML_classification ( size_t  vol_id)

return the name of the classification category for this volume. uses same methods as get_ML_predictions for Volume No Op (4)

Parameters
vol_idid of volume to classify
Returns
string representing classification. Currently supported classes include: "bolt", "nut", "washer", "spring", "ball", "race", "pin", "gear", "insert", "other"

◆ get_ML_classification_categories()

std::vector<std::string> CubitInterface::get_ML_classification_categories ( )

return a list of strings representing all possible calssification categories currently supported with ML tools

◆ get_ML_classification_models()

std::vector<std::string> CubitInterface::get_ML_classification_models ( )

get the available classification ML model names

◆ get_ML_classifications()

std::vector<std::string> CubitInterface::get_ML_classifications ( std::vector< size_t >  vol_ids)

same as get_ML_classification, but classifies multiple volumes with a single call (more efficient)

Parameters
vol_idsvector of ids of volumes to classify
Returns
vector of strings representing classification. Same order as vol_ids.

◆ get_ML_feature_distance()

double CubitInterface::get_ML_feature_distance ( const std::string  op_name,
std::vector< double > &  f1,
std::vector< double > &  f2 
)

feature distance is defined as a weighted distance between two feature vectors of the same size. Features are weighted on EDT (ensembles of decision trees) importance values

Parameters
op_nameoperation name (see get_ML_operation_features)
f1first feature vector
f2second feature vector

◆ get_ML_feature_importances()

std::vector<double> CubitInterface::get_ML_feature_importances ( const std::string  op_name)

return the vector of feature importances for a given operation type

◆ get_ML_model_ID()

int CubitInterface::get_ML_model_ID ( std::string  )

get a unique ID for the given operation/model name

Returns
0 if failure or postive integer otherwise

◆ get_ML_model_name()

std::string CubitInterface::get_ML_model_name ( int  model_ID)

get the name for the given operation/model ID

Returns
empty string if failure

◆ get_ML_operation()

std::vector<std::string> CubitInterface::get_ML_operation ( const std::string  op_name,
const size_t  entity_id1,
const size_t  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_nameoperation name (see get_ML_operation_features)
entity1_idfirst entity associated with operation (see table)
entity2_idsecond entity associated with operation (see table)
paramsoptional parameters for operation

◆ get_ML_operation_feature_names()

std::vector<std::string> CubitInterface::get_ML_operation_feature_names ( const std::string  ml_op_name,
bool  reduced_features = false 
)

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
ml_op_namename of ML model
reduced_featuresoptional currently supported only for "Volume No Operation=4". Uses 9 instead of 46 features for more efficient predictions

◆ get_ML_operation_feature_size()

int CubitInterface::get_ML_operation_feature_size ( const std::string  ml_op_name,
const bool  reduced_features = false 
)

for the given operation type described by get_ML_operation_features, return the expected size of the feature vector

Parameters
ml_op_namename of ML model
reduced_featuresoptional currently supported only for "volume_no_op". Uses 9 instead of 46 features for more efficient predictions

◆ get_ML_operation_feature_types()

std::vector<std::string> CubitInterface::get_ML_operation_feature_types ( const std::string  ml_op_name,
bool  reduced_features = false 
)

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:

  1. boolean 1 or 0
  2. categorical usually positive integer representing a unique category assignment (ie. planar vs conic vs spline surface type)
  3. continuous could be double or integer describing a continuous range (i.e. number of adjacent curves, area of a surface, etc..)
    Parameters
    ml_op_namename of ML model
    reduced_featuresoptional currently supported only for "Volume No Operation=4". Uses 9 instead of 46 features for more efficient predictions

◆ get_ML_operation_features()

std::vector<std::vector<double> > CubitInterface::get_ML_operation_features ( std::vector< std::string >  ml_op_names,
std::vector< size_t >  entity1_ids,
std::vector< size_t >  entity2_ids,
std::vector< std::vector< double >>  params,
double  mesh_size,
bool  reduced_features = false 
)

get machine learning features for a list of cubit operations

std::vector<std_string> ml_op_names = {"surface_no_op", "surface_no_op"};
std::vector<int> entity1_ids = {20, 25}; // surface IDs
std::vector<int> entity2_ids = {0, 0}; // none for surface_no_op
std::vector<std::vector<double>> params = {{-1, -1, -1}, {-1, -1, -1}}; // dummy for surface no_op
double mesh_size = 1.5924; // target mesh size
std::vector<std::vector<double>>
entity1_ids, entity2_ids,
params, mesh_size);
ml_op_names = ['surface_no_op', 'surface_no_op']
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(ml_op_names,
entity1_ids, entity2_ids,
params, mesh_size)
Parameters
ml_op_namelML operation/model name. One of the following IDs: see also get_ML_regression_models and get_ML_classification_models type of model (R) regression (C) classification

type ml_op_name Entity1 Entity2 Params

R "vertex_no_op" vertex none R "curve_no_op" curve none R "surface_no_op" surface none C "volume_no_op" volume none R "remove_surface" surface none R "tweak_replace_surface" surface surface R "composite_surfaces" surface surface R "collapse_curve" curve vertex R "remove_topology_curve" curve curve R "virtual_collapse_curve" curve vertex R "remove_topology_surface" surface surface R "blunt_tangency" vertex none remove_mat, angle, depth R "remove_cone" surface none R "collapse_angle" vertex none real_split, angle, composite_vertex R "remove_blend" surface none R "remove_cavity" surface none

Parameters
entity1_idslist of first entity ids associated with operation (see above table)
entity2_idslist of second entity associated with operation (see above table)
paramsarray of parameters the operation needs to execute (see above table)
mesh_sizetarget mesh size for operation
reduced_featuresoptional currently supported only for "Volume No Operation=4". Uses 9 instead of 46 features for more efficient predictions

◆ get_ML_operation_features_()

std::vector<std::vector<double> > CubitInterface::get_ML_operation_features_ ( std::vector< std::string >  ml_op_names,
std::vector< int >  entity1_ids,
std::vector< int >  entity2_ids,
std::vector< std::vector< double >>  params,
double  mesh_size,
bool  reduced_features = false 
)

◆ get_ML_predictions()

std::vector<std::vector<double> > CubitInterface::get_ML_predictions ( std::vector< std::string >  ml_op_names,
std::vector< size_t >  entity1_ids,
std::vector< size_t >  entity2_ids,
std::vector< std::vector< double >>  params,
double  mesh_size,
bool  reduced_features = false 
)

get machine learning predictions for the list of operations and corresponding entities This function will load the ML training data if not already loaded. It will first compute features and then run predictions from training data Currently uses scikit-learn EDT (Ensembles of Decision Trees) for predictions

Parameters
ml_op_nameslist of ML operation/model names
entity1_idslist of first entity ids associated with operation (see table)
entity2_idslist of second entity associated with operation (see table)
paramsarray of parameters the operation needs to execute (see table)
mesh_sizetarget mesh size for operation
reduced_featuresoptional currently supported only for "Volume No Operation=4". Uses 9 instead of 46 features for more efficient predictions
Returns
resulting predictions. Vector of vectors. 4 Volume No Operation: confidence prediciton for classification of volume. return vector has ordered vector of scalars (0-1) indicating confidence of classification. Order is: [0] bolt, [1] nut, [2]washer [3]spring, [4]ball, [5]race [6]pin, [7]gear, [8]insert, [9]other All other op_types: predicted metric outcome of indicated operation: [0] Success or Failure. (1 or 0). predicted success or failure of operation [1] Scaled Jacobian (-1 to 1). predicted scaled jacobian metric of operation at entity [2] Scaled In-radius (0 to 1). predicted scaled in-radius of operation at entity. Scales the tet in-radius by normalizing in-radius of an equilateral tet where the size is edge-length=mesh_size [3] Scaled Deviation (0 to inf). predicted deviation of the tets near the entity from the geometry. Scaled deviation is the distance from a tet face (tri center) at the boundary to the geometry scaled by the input mesh_size

◆ get_ML_regression_models()

std::vector<std::string> CubitInterface::get_ML_regression_models ( )

get the available regression ML model names

◆ get_moment_magnitude()

double CubitInterface::get_moment_magnitude ( int  entity_id)

Get the moment magnitude from a force.

Parameters
entity_idId of the force
Returns
magnitude of the moment on the given force

◆ get_n_largest_distances_between_meshes()

std::vector<double> CubitInterface::get_n_largest_distances_between_meshes ( int  n,
std::string  entity_type1,
std::vector< int >  ids1,
std::string  entity_type2,
std::vector< int >  ids2 
)

Finds the 'n' largest distances between two meshes. These distances are from the nodes on the entities of 'ids1' to the elements in 'ids2'. Only triangle and face (quads) element types are supported. It is assumed that the meshes approximately line up.
Each distance is returned with three values:

  1. The distance between a node and element.
  2. The node id.
  3. The element id. The output is given in a vector of three doubles for each distance. So if the user asked for the three largest distances, the vector would contain the 9 doubles, with the distances in descending order.
    Returns
    vector of distance, node id, element id, distance nod id, element id, ...

◆ 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.

Parameters
target_volume_idsList of volume ids to examine.
narrow_sizeIndicate the size that defines 'narrowness'
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.

Parameters
target_volume_idsList of volume ids to examine.
mesh_sizeIndicate the mesh size used as the threshold
Returns
List (python tuple) of small surface ids

◆ get_nearby_volumes_at_volume()

std::vector<int> CubitInterface::get_nearby_volumes_at_volume ( int  volume_id,
std::vector< int >  compare_volumes,
double  distance 
)

Get the list of nearby volumes from the model for a single volume.

Parameters
volume_idvolume to check.
volumesto check against. If empty, will check against all volumes in model
maximumdistance betwen volumes. Optional. Use -1 to compute default tolerance
Returns
list of volumes that are nearby to volume_id from compare_volumes list

◆ get_next_block_id()

int CubitInterface::get_next_block_id ( )

Get a next available block id.

Returns
Next available block id

◆ get_next_boundary_layer_id()

int CubitInterface::get_next_boundary_layer_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_group_id()

int CubitInterface::get_next_group_id ( )

Get the next available group id from Cubit.

◆ 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.

Parameters
node_idThe 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_exists()

bool CubitInterface::get_node_exists ( int  node_id)

Check the existance of a node.

Parameters
node_idThe node id
Returns
true or false

◆ get_node_faces()

std::vector<int> CubitInterface::get_node_faces ( int  node_id)

|brief Get the face/quad ids that share a node

Parameters
node_idThe node id
Returns
List (python tuple) of face/quad ids adjacent the node

◆ get_node_global_id()

int CubitInterface::get_node_global_id ( int  node_id)

Given a node id, return the global element id that is assigned when the mesh is exported.

Parameters
node_idSpecifies the id of the sphere
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.

Parameters
node_idThe node id
Returns
True if constrained, otherwise false

◆ get_node_tris()

std::vector<int> CubitInterface::get_node_tris ( int  node_id)

|brief Get the tri ids that share a node

Parameters
node_idThe node id
Returns
List (python tuple) of tri ids adjacent 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.

Parameters
nodeset_idUser specified id of the desired nodeset
node_listUser specified list where nodes associated with this nodeset are returned
volume_listUser specified list where volumes associated with this nodeset are returned
surface_listUser specified list where surfaces associated with this nodeset are returned
curve_listUser specified list where curves associated with this nodeset are returned
vertex_listUser specified list where vertices associated with this nodeset are returned

◆ get_nodeset_count()

int CubitInterface::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.

Parameters
nodeset_idUser specified id of the desired 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.

Parameters
bc_type_inType of bc to query, as defined by enum CI_BCTypes. 1-9 is FEA, 10-30 is CFD
bc_idID 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_idThe 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_idUser 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_idUser 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_idUser 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_idUser 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_idUser specified id of the desired nodeset
Returns
A list (python tuple) of volume ids contained in the nodeset

◆ get_num_volume_shells()

int CubitInterface::get_num_volume_shells ( int  volume_id)

Get the number of shells in this volume.

Parameters
volume_idID of the volume
Returns
Number of shells in the volume

◆ 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_overlapping_curves()

void CubitInterface::get_overlapping_curves ( std::vector< int >  target_surface_ids,
double  min_gap,
double  max_gap,
std::vector< int > &  returned_curve_list_1,
std::vector< int > &  returned_curve_list_2,
std::vector< double > &  returned_distance_list 
)

For every occurance of two overlapping curves, two curve ids are returned. Those ids are returned in the indicated lists and are aligned. In other words the first id in curv_list_1 overlaps with the first id in curv_list_2. The second id in curv_list_1 overlaps with the second id in curv_list-2, and so on.

Parameters
target_surface_idsList of surface ids to examine.
min_gapminimum overlap distance between curves to return
max_gapmaximum overlap distance between curves to return
returned_curve_list_1User specified list where the ids of overlapping curves will be returned
returned_curve_list_2User specified list where the ids of overlapping curves will be returned
returned_distance_listCorresponding user specified list where distances between curves will be returned

◆ get_overlapping_surfaces()

void CubitInterface::get_overlapping_surfaces ( std::vector< int >  target_surface_ids,
std::vector< int > &  returned_surface_list_1,
std::vector< int > &  returned_surface_list_2,
std::vector< double > &  returned_distance_list,
std::vector< double > &  returned_overlap_area_list,
bool  filter_slivers = false,
bool  filter_volume_overlaps = false,
int  cache_overlaps = 0 
)

This function only works from C++ Get the list of overlapping surfaces for a list of surfaces

For every occurance of two overlapping surfaces, two surfaces ids are returned. Those ids are returned in the indicated lists and are aligned. In other words the first id in surf_list_1 overlaps with the first id in surf_list_2. The second id in surf_list_1 overlaps with the second id in surf_list-2, and so on.

Parameters
target_surface_idsList of surface ids to examine.
returned_surface_list_1User specified list where the ids of overlapping surfaces will be returned
returned_surface_list_2User specified list where the ids of overlapping surfaces will be returned
returned_distance_listCorresponding user specified list where distances between surfaces will be returned
returned_overlap_area_listCorresponding user specified list where overlap areas between surfaces will be returned
filter_sliverswhether to return filter slivers
filter_volume_overlapswhether to return surfaces on the same volume
cache_overlapsspeed up overlaps by caching and using previously computed results. Default 0 = no caching. 1 = clear out old values first. 2 = use and add to existing cache

◆ get_overlapping_surfaces_at_surface()

std::vector<int> CubitInterface::get_overlapping_surfaces_at_surface ( int  surface_id,
std::vector< int >  compare_volumes,
int  cache_overlaps = 0 
)

Get the list of overlapping surfaces from the model for a single surface.

Parameters
surface_idsurface to check.
compare_volumesvolumes to check against. If empty, will check against all volumes in model
Returns
list of surfaces that overlap surface_id from compare_volumes list

◆ get_overlapping_surfaces_in_bodies()

std::vector< std::vector<int> > CubitInterface::get_overlapping_surfaces_in_bodies ( std::vector< int >  body_ids,
bool  filter_slivers = false 
)

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_idsList of bodies to search for surface overlaps
filter_sliverOptional parameter that removes false positives from the output omitting overlapping pairs sharing a merged curve sharing merged curves.
bodies = [ 15, 19, 24, 88 ]
my_overlaps = cubit.get_overlapping_surfaces_in_bodies( bodies )

◆ get_overlapping_surfaces_in_volumes()

void CubitInterface::get_overlapping_surfaces_in_volumes ( std::vector< int >  target_volume_ids,
std::vector< int > &  returned_surface_list_1,
std::vector< int > &  returned_surface_list_2,
std::vector< double > &  returned_distance_list,
std::vector< double > &  returned_overlap_area_list,
bool  filter_slivers = false,
bool  filter_volume_overlaps = false,
int  cache_overlaps = 0 
)

This function only works from C++ Get the list of overlapping surfaces for a list of volumes

For every occurance of two overlapping surfaces, two surfaces ids are returned. Those ids are returned in the indicated lists and are aligned. In other words the first id in surf_list_1 overlaps with the first id in surf_list_2. The second id in surf_list_1 overlaps with the second id in surf_list-2, and so on.

Parameters
target_volume_idsList of volume ids to examine.
surf_list_1User specified list where the ids of overlapping surfaces will be returned
surf_list_2User specified list where the ids of overlapping surfaces will be returned
returned_distance_listCorresponding user specified list where distances between surfaces will be returned
returned_overlap_area_listCorresponding user specified list where overlap areas between surfaces will be returned
filter_sliverswhether to return filter slivers
filter_volume_overlapswhether to return surfaces on the same volume
cache_overlapsspeed up overlaps by caching and using previously computed results. Default 0 = no caching. 1 = clear out old values first. 2 = use and add to existing cache

◆ get_overlapping_volumes()

std::vector<int> CubitInterface::get_overlapping_volumes ( std::vector< int >  target_volume_ids)

Get the list of overlapping volumes for a list of volumes.

For every occurance of two overlapping volumes, two volume ids are returned in volume_list. Modulus 2 of the volume_list should always be 0 (the list should contain an even number of volume ids). The first volume id in the returned list overlaps with the second volume id. The third volume id overlaps with the fourth volume id, and so on.

Parameters
target_volume_idsList of volume ids to examine.
Returns
List (python tuple) of overlapping volumes ids

◆ get_overlapping_volumes_at_volume()

std::vector<int> CubitInterface::get_overlapping_volumes_at_volume ( int  volume_id,
std::vector< int >  compare_volumes 
)

Get the list of overlapping volumes from the model for a single volume.

Parameters
volume_idvolume to check.
volumesto check against. If empty, will check against all volumes in model
Returns
list of volumes that overlap volume_id from compare_volumes list

◆ get_owning_body()

int CubitInterface::get_owning_body ( const std::string &  geometry_type,
int  entity_id 
)

Get the owning body for a specified entity.

int body_id = CubitInterface::get_owning_body("curve", 12);
body_id = cubit.get_owning_body("curve", 12)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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 
)

Get the owning volume for a specified entity.

int volume_id = CubitInterface::get_owning_volume("curve", 12);
volume_id = cubit.get_owning_volume("curve", 12)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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)

Get the owning volume for a specified entity.

int volume_id = CubitInterface::get_owning_volume_by_name("TipSurface");
volume_id = cubit.get_owning_volume_by_name("TipSurface")
Parameters
entity_nameSpecifies the name (supplied by Cubit) of the entity
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.

Parameters
entity_type
entity_list
vol_ids

◆ get_parent_assembly_instance()

int CubitInterface::get_parent_assembly_instance ( int  assembly_id)

Get the stored instance number of an assembly node's instance.

Parameters
assembly_idId that identifies the assembly node
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.

Parameters
assembly_idId that identifies the assembly node
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.

Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
intervalUser specified variable where interval count for the specified entity is returned
firmnessUser specified variable where a firmness of 'hard', 'soft', or 'default' is returned
lower_boundUser specified variable where the lower bound value is returned
upper_boundUser specified variable where the upper bound value is returned

◆ get_pick_filters()

std::vector<std::string> CubitInterface::get_pick_filters ( )

Get a list of the current pick filters.

◆ get_pick_type()

const char* CubitInterface::get_pick_type ( )

Get the current pick type.

Returns
The current pick type of the graphics system

◆ get_playback_handler()

ExternalPlaybackHandler* CubitInterface::get_playback_handler ( )

◆ get_pressure_function()

std::string CubitInterface::get_pressure_function ( int  entity_id)

Get the pressure function.

Parameters
entity_idId of the pressure
Returns
The pressure function

◆ get_pressure_value()

double CubitInterface::get_pressure_value ( int  entity_id)

Get the pressure value.

Parameters
entity_idId of the pressure
Returns
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)

Given a pyramid id, return the global element id.

Parameters
pyramid_idSpecifies the id of the pyramid
Returns
The corresponding element id

◆ get_python_version()

std::string CubitInterface::get_python_version ( )

get the python version used in cubit

Returns
A string containing the python version number

◆ 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)

Given a quad id, return the global element id.

Parameters
quad_idSpecifies the id of the quad
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.

Parameters
entity_typeSpecifies the geometry type of the entity
id_listSpecifies a list of ids to work on
metric_nameSpecify the metric used to determine the quality
single_thresholdQuality threshold value
use_low_thresholduse threshold as lower or upper bound
low_thresholdQuality threshold when using a lower and upper range
high_thresholdQuality threshold when using a lower and upper range
min_valueQuality value of the worst element
max_valueQuality value of the best element
mean_valueAverage quality value of all elements
std_valueStd deviationvalue of all elements
min_element_idID of the worst element
max_element_idID of the best element
mesh_listlist of failed elements
element_typetype of failed elements (does not support mixed element types)
make_groupwhether to create a group or not
bad_group_idID of the created group
min_valueUser specified variable where the minimum quality value will be returned
max_valueUser specified variable where the maximum quality value will be returned
mean_valueUser specified variable where the mean quality value will be returned
std_valueUser specified variable where the standard deviation quality value will be returned

◆ 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 
)

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

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];
Parameters
geom_typeSpecifies the geometry type of the entities
mesh_typeSpecifies the element type to find quality at geom entities
id_listSpecifies a list of geometry entity ids to work on
expand_levelsNumber of element levels from target geometry to expand
metric_nameSpecify the metric used to determine the quality
single_thresholdQuality threshold value
use_low_thresholduse threshold as lower or upper bound
low_thresholdQuality threshold when using a lower and upper range
high_thresholdQuality threshold when using a lower and upper range
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 
)

Get the metric value for a specified mesh entity.

Parameters
mesh_typeSpecifies the mesh entity type (hex, tet, tri, quad)
mesh_idSpecifies the id of the mesh entity
metric_nameSpecifies the name of the metric (skew, taper, jacobian, etc)
Returns
The value of the quality metric

◆ get_quality_values()

std::vector<double> CubitInterface::get_quality_values ( const std::string &  mesh_type,
std::vector< int >  mesh_ids,
const std::string &  metric_name 
)

Get the metric values for specified mesh entities.

CubitInterface::get_quality_value("hex", [223, 224, 225] "skew");
Parameters
mesh_typeSpecifies the mesh entity type (hex, tet, tri, quad)
mesh_idsSpecifies the ids of the mesh entities
metric_nameSpecifies the name of the metric (skew, taper, jacobian, etc)
Returns
The values of the quality metric

◆ get_reduce_bolt_core_default_dimensions()

std::vector<double> CubitInterface::get_reduce_bolt_core_default_dimensions ( int  vol_id)

get default dimensions for reduce vol bolt core operation

Parameters
vol_idvolume ID. Should represent bolt geometry
Returns
c1, c2, c3 dimensions

◆ 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.

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.

std::vector<int> relative_list;
curve_list = CubitInterface::get_relatives("surface", 12, "curve");
curve_list = cubit.get_relatives("surface", 12, "curve")
Parameters
source_geom_typeThe entity type of the source entity
source_idThe id of the source entity
target_geom_typeThe target geometry type
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 
)

Get the mesh interval firmness for the specified entity as set specifically on the entity.

std::string firmness;
firmness = cubit.get_requested_mesh_interval_firmness("surface", 12)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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 
)

Get the interval count for a specified entity as set specifically on that entity.

int intervals = CubitInterface::get_meshed_intervals("surface", 12);
intervals = cubit.get_meshed_intervals("surface", 12)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
Returns
The entity's interval count

◆ get_requested_mesh_size()

double CubitInterface::get_requested_mesh_size ( const std::string &  geometry_type,
int  id 
)

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.

double mesh_size = CubitInterface::get_requested_meshed_size("volume", 2);
mesh_size = cubit.get_mesh_size("volume", 2)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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 
)

Get the mesh size setting type for the specified entity as set specifically on the entity.

std::string firmness;
CubitInterface::get_requested_mesh_size_setting_type("surface", 12);
firmness = cubit.get_requested_mesh_size_setting_type("surface", 12)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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

Parameters
target_volume_idsList of volume ids to examine.
upper_boundUpper threshold angle
lower_boundLower threshold angle

◆ get_sharp_curve_angles()

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.

Parameters
target_volume_idsList of volume ids to examine.
large_curve_anglesUser specified list where the ids of curves with curve angles will be returned
small_curve_anglesUser specified list where the ids of curves with small angles will be returned
large_anglesUser 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_anglesUser 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.
upper_boundUpper threshold angle
lower_boundLower threshold angle

◆ get_sharp_surface_angles()

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.

Parameters
target_volume_idsList of volume ids to examine.
large_surface_anglesUser specified list where the ids of surfaces with large angles will be returned
small_surface_anglesUser specified list where the ids of surfaces with small angles will be returned
large_anglesUser 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_anglesUser 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_boundUpper threshold angle
lower_boundLower 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_idUser specified id of the desired sideset
face_listUser specified list where faces associated with this sideset are returned
surface_listUser specified list where surfaces associated with this sideset are returned
curve_listUser specified list where curves associated with this sideset are returned

◆ get_sideset_count()

int CubitInterface::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_idUser specified id of the desired sideset
Returns
A list (python tuple) of curve ids contained in the sideset

◆ get_sideset_element_type()

std::string CubitInterface::get_sideset_element_type ( int  sideset_id)

Get the element type of a sideset.

Parameters
sideset_idThe id of the sideset to be queried
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.

Parameters
bc_type_inType of bc to query, as defined by enum CI_BCTypes. 1-9 is FEA, 10-30 is CFD
bc_idID 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_idUser 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_idUser 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,
double  tol = 1e-3,
bool  use_percent_tol = true,
bool  on_similar_vols = true 
)

Get similar curves with the same length.

Parameters
curve_idsIDs of curve to compare against
toltolerance for comparison
use_percent_toltolerance is a percentage (0-1) of length, otherwise absolute length
on_similar_volscheck only curves on volumes that are similar to the curve_ids' owning volume(s)
Returns
list of IDs of similar curves

◆ get_similar_surfaces()

std::vector<int> CubitInterface::get_similar_surfaces ( std::vector< int >  surface_ids,
double  tol = 1e-3,
bool  use_percent_tol = true,
bool  on_similar_vols = true 
)

Get similar surfaces with the same area and number of curves.

Parameters
surface_idsIDs of surface to compare against
toltolerance for comparison
use_percent_toltolerance is a percentage (0-1) of area, otherwise absolute area
on_similar_volscheck only surfaces on volumes that are similar to the surface_ids' owning volume(s)
Returns
list of IDs of similar surfaces

◆ get_similar_volumes()

std::vector<int> CubitInterface::get_similar_volumes ( std::vector< int >  volume_ids,
double  tol = 1e-3,
bool  use_percent_tol = true 
)

Get similar volumes with the same volume and number of faces.

Parameters
volume_idsIDs of volume(s) to compare against //!
toltolerance for comparison
use_percent_toltolerance is a percentage (0-1) of volume, otherwise absolute volume
Returns
list of IDs of similar volumes

◆ get_sizing_function_name()

std::string CubitInterface::get_sizing_function_name ( const std::string &  entity_type,
int  surface_id 
)

Get the sizing function name for a surface or volume.

Parameters
entity_typeType (volume or surface)
entity_idId of the entity
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.

Parameters
target_volume_idsList of volume ids to examine.
small_areaIndicate the area threshold
small_curve_sizeIndicate 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_idsList of volume ids to examine. in Cubit is valid as input here.
mesh_sizeIndicate 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_idsList 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_idsList of volume ids to examine.
mesh_sizeIndicate 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_idsList of volume ids to examine.
mesh_sizeIndicate 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_idsList of volume ids to examine.
mesh_sizeIndicate the mesh size used as the threshold
returned_small_surfacesids of small hydraulic radius surfaces will be returned
returned_small_radiusUser 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_idsList of volume ids to examine.
mesh_sizeIndicate 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_idsList of volume ids to examine.
mesh_sizeIndicate the mesh size used as the threshold
small_volumesUser specified list where the ids of small volumes will be returned
small_radiusUser 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_idsList of volume ids to examine. in Cubit is valid as input here.
num_to_returnIndicate the number of curves to return
Returns
List (python tuple) of smallest curve ids

◆ get_smallest_features()

void CubitInterface::get_smallest_features ( std::vector< int >  target_ids,
int &  returned_number_to_return,
std::vector< int > &  returned_type_1_list,
std::vector< int > &  returned_type_2_list,
std::vector< int > &  returned_id_1_list,
std::vector< int > &  returned_id_2_list,
std::vector< double > &  returned_distance_list 
)

Finds all of the smallest features.

Parameters
target_idsThe entities to query
num_to_returnnumber of small features to return
type1_list
type2_list
id1_list
id2_list
distance_list

◆ get_smooth_scheme()

std::string CubitInterface::get_smooth_scheme ( const std::string &  geometry_type,
int  entity_id 
)

Get the smooth scheme for a specified entity.

std::string smooth_scheme;
CubitInterface::get_smooth_scheme("curve", 122, smooth_scheme);
smooth_scheme = cubit.get_smooth_scheme("curve", 122)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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_idID 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_blends()

std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_blends ( int  surface_id)

Get the solution list for a given blend surface.

Parameters
surface_idthe surface being queried
max_radiusthe maximum radius of curvature for which solutions will be returned max_radius=-1 will return solutions for any blend
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_cavity_surface()

std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_cavity_surface ( int  surface_id)

Get the solution list for a given cavity surface.

Parameters
surface_idthe surface being queries
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_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.

Parameters
classificationstring defining the classification type: "bolt", "nut", "washer", "spring", "ball", "race", "pin", "gear", "insert", "other"
vol_id
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_idthe surface being queried
mesh_sizeIndicate 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_idcone surface

◆ get_solutions_for_decomposition()

std::vector<std::string> CubitInterface::get_solutions_for_decomposition ( const std::vector< int > &  volume_list,
double  exterior_angle,
bool  do_imprint_merge,
bool  tolerant_imprint 
)

Get the list of possible decompositions.

Parameters
volume_listList of volumes to query
exterior_angleThreshold value for the exterior angle
do_imprint_mergeSet to true (1) if you want the imprint and merge to be done
tol_imprintSet to true (1) if you want to do a tolerant imprint

◆ 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_idid 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.

Parameters
surface_id1overlapping surface 1 surface_id2 overlapping 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_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_idID of the vertex
curve_idID 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_idID of the vertex
surface_idID 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.

Parameters
target_vertex_idsVertex list
high_toleranceThe upper threshold tolerance value
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
idof surface 1
idof 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
idof volume 1
idof 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()

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.

Parameters
vertex_idvertex with sharp angle
small_curve_sizeThreshold value used to determine what 'small' is
mesh_sizeElement 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_sheet_volume_connection()

std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_sheet_volume_connection ( std::vector< int >  vol1_sheets,
std::vector< int >  vol2_sheets,
std::vector< double >  thickness1,
std::vector< double >  thickness2 
)

Get lists of display, preview and command strings for two neighboring sheet volume sets. each set should be part of a common parent 3D volume.

◆ get_solutions_for_sheet_volumes()

std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_sheet_volumes ( std::vector< int >  vol_ids,
std::vector< double >  thickness 
)

Get lists of display, preview and command strings to connect sheet bodies.

◆ 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.

Parameters
curve_idSmall curve
small_curve_sizeThreshold value used to determine what 'small' is
mesh_sizeElement 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()

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.

Parameters
surface_idSmall surface
small_curve_sizeThreshold value used to determine what 'small' is
mesh_sizeElement 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_source_target()

bool CubitInterface::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.

◆ 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.

Parameters
surface_idSmall surface
small_curve_sizeThreshold value used to determine what 'small' is
mesh_sizeElement 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_thin_volume()

std::vector<std::vector<std::string> > CubitInterface::get_solutions_for_thin_volume ( int  vol_id,
bool  limit_connections = false 
)

Get lists of display, preview and command strings for a volume to reduce to shell.

Parameters
limit_connectionsonly return solution with long-long if available

◆ 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.

Parameters
vol_id
small_curve_sizeThreshold value used to determine what 'small' is
mesh_sizeElement 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_idSpecifies 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)

Given a sphere id, return the global element id.

Parameters
sphere_idSpecifies the id of the sphere
Returns
The corresponding element id

◆ get_string_sculpt_default()

std::string CubitInterface::get_string_sculpt_default ( const char *  variable)

◆ 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.

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)
Parameters
entity_typeThe mesh element type of the higher dimension entity
entity_idThe mesh element id
dimensionThe 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
theid 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.

Parameters
surface_idID of the surface
Returns
Area of the surface

◆ get_surface_cavity_collections()

std::vector<std::vector<int> > CubitInterface::get_surface_cavity_collections ( const std::vector< int > &  volume_list,
double  hr_threshold,
double  area_threshold,
std::vector< double > &  return_cavity_hrs,
std::vector< double > &  return_cavity_areas 
)

Returns the collections of surfaces that comprise holes or cavities in the specified volumes. Filter by hydarulic radius and area of the cavity.

Parameters
volume_listList of volumes to query
hr_thresholdreturn cavities with computed hydraulic radius less than hr_threshold. Where hr = 4*Area/Perimeter. Use hr_threshold < 0.0 to return all cavities
area_thresholdreturn cavities with computed surface area less than area_threshold. Use area_threshold < 0.0 to return all cavities
returna vector of cavity areas corresponding to the return cavity id lists
Returns
A list of lists of surface id's grouped by their individual cavity or hole

◆ get_surface_centroid()

std::array<double,3> CubitInterface::get_surface_centroid ( int  surface_id)

Get the surface centroid for a specified surface.

Parameters
surface_idID 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_hole_collections()

std::vector<std::vector<int> > CubitInterface::get_surface_hole_collections ( const std::vector< int > &  volume_list,
double  radius_threshold,
std::vector< double > &  return_hole_radius 
)

Returns the collections of surfaces that comprise holes in the specified volumes. Filter by radius of the hole.

Parameters
volume_listList of volumes to query
radius_thresholdreturn holes with computed radius less than or equal to radius_threshold.
returna vector of hole radii corresponding to the return hole id lists
Returns
A list of lists of surface id's grouped by their individual hole

◆ 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_idUser 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.

int surf_id = 5;
vector<int> surface_nodes = CubitInterface::get_surface_nodes(surface_id);
Parameters
surf_idid of surface
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.

Parameters
surface_idID of the 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.

Parameters
surface_idID of the surface
coordarray of x,y,z location on surface
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

Parameters
surface_idUser specified id of the desired 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.

Parameters
surface_idID of the surface
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

Parameters
surface_idUser specified id of the desired 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.

Parameters
surface_idID of the 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

Parameters
surface_idUser specified id of the desired 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.

Parameters
surface_idID of the 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.

Parameters
target_volume_idsList of volume ids to examine.
narrow_sizeIndicate the size that defines 'narrowness'
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.

Parameters
target_volume_idsList of volume ids to examine.
upper_boundUpper threshold angle
lower_boundLower 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_idSpecifies the volume id
Returns
List (python tuple) of surface ids

◆ get_target_timestep()

double CubitInterface::get_target_timestep ( )

Returns the target timestep threshold used in the timestep density multiplier metric.

◆ 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)

Given a tet id, return the global element id.

Parameters
tet_idSpecifies the id of the tet
Returns
The corresponding element id

◆ get_tetmesh_growth_factor()

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.

Parameters
volume_idthe volume id
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.

Parameters
volume_idthe volume id
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 
)

Get the tight bounding box for a list of entities.

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)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_listList of ids associated with geom_type
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_top_level_assembly_items()

std::vector<AssemblyItem> CubitInterface::get_top_level_assembly_items ( )

◆ get_total_bounding_box()

std::array<double,10> CubitInterface::get_total_bounding_box ( const std::string &  geometry_type,
std::vector< int >  entity_list 
)

Get the bounding box for a list of entities.

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)
Parameters
geom_typeSpecifies the geometry type of the entity
entity_listList of ids associated with geom_type
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.

Parameters
volume_listList 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)

Given a tri id, return the global element id.

Parameters
tri_idSpecifies the id of the tri
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 ( )

Query whether undo is currently enabled.

Returns
True if undo is enabled, otherwise false

◆ get_unmerged_curves_on_shells()

std::vector<int> CubitInterface::get_unmerged_curves_on_shells ( std::vector< int >  shell_vols,
std::vector< double >  thickness 
)

return a list of curve IDs on the given shell volumes that are in proximity to one of the other shell volumes in the list

Parameters
shell_volslist of volum IDs to check. Ignores any volumes that are not sheet volumes
thicknesslist of thicknesses corresponding to volume IDs. Normally this is the designated thickness of each of the shell volumes. Length of thickness should be the same as shell_vols
Returns
list of curve IDs that meet the criteria

◆ get_valence()

int CubitInterface::get_valence ( int  vertex_id)

Get the valence for a specific vertex.

Parameters
vertex_idID of 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.

Parameters
block_idThe block id
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".

Parameters
entity_idId of the velocity
Returns
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

Parameters
entity_idId of the velocity
Returns

◆ 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

Parameters
entity_idId of the velocity
Returns

◆ 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)

Get the node owned by a vertex.

int vert_id = 22;
int node_id = CubitInterface::get_vertex_node(vert_id);
Parameters
vert_idid of vertex
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".

Parameters
surface_idId of the surface associated with the vertex
vertex_idId of the vertex
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

Parameters
sphere_id_listlist of volume ids (should be spheres)
rad_intervalsnumber of radial intervals (around circle)
az_intervalsnumber of intervals from inner mapped box to surface
biasbias from inner mapped box to surface (<1 increases size to boundary)
fractfraction of radius to use as size of interior mapped box
max_smooth_iterationsmax number of smooth iterations to perform after meshing

◆ get_volume_area()

double CubitInterface::get_volume_area ( int  volume_id)

Get the area of a volume.

Parameters
volume_idID of the 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

Parameters
idof surface 1
idof 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_volume_gaps()

void CubitInterface::get_volume_gaps ( std::vector< int >  target_volume_ids,
std::vector< int > &  returned_surface_list_1,
std::vector< int > &  returned_surface_list_2,
std::vector< double > &  returned_distance_list,
std::vector< double > &  returned_overlap_area_list,
double  maximum_gap_tolerance,
double  maximum_gap_angle,
int  cache_overlaps = 0 
)

This function only works from C++ Get the list of gaps for a list of volumes

For every occurance of a gap, two surfaces ids are returned. Those ids are returned in the indicated lists and are aligned. In other words the first id in surf_list_1 overlaps with the first id in surf_list_2. The second id in surf_list_1 overlaps with the second id in surf_list-2, and so on.

Parameters
target_volume_idsList of volume ids to examine.
surf_list_1User specified list where the ids of the gap surfaces will be returned
surf_list_2User specified list where the ids of the gap surfaces will be returned
distance_listUser specified list where the distance between the gap surface will be returned
max_gap_toleranceUser specified tolerance used to find the gaps.
cache_overlapsspeed up overlaps by caching and using previously computed results. Default 0 = no caching. 1 = clear out old values first. 2 = use and add to existing cache

◆ get_volume_hexes()

std::vector<int> CubitInterface::get_volume_hexes ( int  volume_id)

get the list of any hex elements in a given volume

Parameters
volume_idUser specified id of the desired 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)

Get list of node ids owned by a volume.
Excludes nodes owned by bounding surfs, curves and verts.

int vol_id = 1;
vector<int> volume_nodes = CubitInterface::get_volume_nodes(vol_id);
Parameters
vol_idid of volume
Returns
List (python tuple) of IDs of nodes owned by 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

Parameters
volume_idUser specified id of the desired volume
Returns
A list (python tuple) of the tet ids in the volume

◆ get_volume_volume()

double CubitInterface::get_volume_volume ( int  vol_id)

Get the volume of a volume.

Parameters
volume_idID of the volume
Returns
volume

◆ get_volumes_for_node()

std::vector<int> CubitInterface::get_volumes_for_node ( std::string  node_name,
int  node_instance 
)

◆ get_wedge_global_element_id()

int CubitInterface::get_wedge_global_element_id ( int  wedge_id)

Given a wedge id, return the global element id.

Parameters
wedge_idSpecifies the id of the wedge
Returns
The corresponding element id

◆ get_wrt_entity()

std::string CubitInterface::get_wrt_entity ( std::string  source_type,
int  source_id,
int  sideset_id 
)

Get the with-respect-to entity.

std::string wrt_entity;
wrt_entity = CubitInterface::get_wrt_entity("face", 332, 2);
wrt_entity = cubit.get_wrt_entity("face", 332, 2)
Parameters
source_typeItem type - could be 'face', 'quad' or 'tri'
source_idID of entity
sideset_idID of the sideset
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.

Parameters
name_listUser specified list where the active group names will be returned
id_listUser specified list where the ids of all active groups will be returned

◆ group_names_ids()

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

◆ has_valid_size()

int CubitInterface::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.

◆ 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.

Parameters
bc_areaenum of CI_BCEntityTypes. Use 7 to check if on top, 8 to check if on bottom
entity_idId of the BC
Returns
true if BC heatflux is on specified shell area, otherwise false

◆ highlight()

void CubitInterface::highlight ( const std::string &  entity_type,
int  entity_id 
)

Highlight the given entity.

◆ 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.

Parameters
argvList of start-up directives. A blank list such as [''] will suffice. See Cubit Help for details

◆ is_acis_engine_available()

bool CubitInterface::is_acis_engine_available ( )

◆ is_assembly_metadata_attached()

bool CubitInterface::is_assembly_metadata_attached ( int  volume_id)

Determine whether metadata is attached to a specified volume.

Parameters
volume_idID of the 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

Parameters
surface_idID ofsurface
Returns
whether the surface is a blend

◆ is_boundary_layer_id_available()

bool CubitInterface::is_boundary_layer_id_available ( int  boundary_layer_id)

◆ 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_cavity_surface()

bool CubitInterface::is_cavity_surface ( int  surface_id)

return whether the surface is part of a cavity

Parameters
surface_idID ofsurface
Returns
whether the surface is part of a cavity

◆ is_chamfer_surface()

bool CubitInterface::is_chamfer_surface ( int  surface_id,
double  thickness_threshold 
)

return whether the surface is a chamfer

Parameters
surface_idID ofsurface
thickness_thresholdmax thickness criteria for chamfer
Returns
whether the surface is a chamfer (if < 0 then 3*mesh_size)

◆ 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

Parameters
surface_idID ofsurface
mesh_sizeIndicate the mesh size used as the threshold
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

Parameters
surface_idID ofsurface
Returns
whether the surface is a cone

◆ is_continuous_surface()

bool CubitInterface::is_continuous_surface ( int  surface_id,
double  angle_tol 
)

return whether the surface has any adjacent surfaces that are continuous (exterior angle is 180 degrees +- angle_tol)

Parameters
surface_idID ofsurface
angle_tolangle tolerance for continuity
Returns
whether the surface has adjacent continuous surfaces

◆ is_cylinder_surface()

bool CubitInterface::is_cylinder_surface ( int  surface_id)

return whether the surface is a cylinder

Parameters
surface_idID ofsurface
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_hole_surface()

bool CubitInterface::is_hole_surface ( int  surface_id,
double  radius_threshold 
)

return whether the surface is part of a hole

Parameters
surface_idID of surface
radius_thresholdmax radius criteria for hole (if < 0, then default is 3*mesh_size)
Returns
whether the surface is part of a hole

◆ is_interval_count_odd()

bool CubitInterface::is_interval_count_odd ( int  surface_id)

Query whether a specified surface has an odd loop.

Parameters
surface_idId of the surface
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 
)

Determines whether a specified entity is merged.

if (CubitInterface::is_merged("surface", 137)) . . .
if cubit.is_merged("surface", 137):
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity

◆ is_mesh_element_in_group()

bool CubitInterface::is_mesh_element_in_group ( const std::string &  element_type,
int  element_id 
)

Indicates whether a mesh element is in a group.

if cubit.is_mesh_element_in_group("tet", 445):
Parameters
element_typeMesh type of the element
element_idID of the mesh element return True if in a group, otherwise false

◆ is_mesh_visibility_on()

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 
)

Determines whether a specified entity is meshed.

if (CubitInterface::is_meshed("surface", 137)) . . .
if cubit.is_meshed("surface", 137):
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity

◆ is_modified()

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.

Parameters
body_idId of the 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)

Parameters
surface_idID ofsurface
mesh_sizethreshold used to determine if is narrow
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.

Parameters
bc_type_inenum of CI_BCTypes. temperature = 4, convection = 7, heatflux = 8
entity_idId of the BC
Returns
true if BC is on thin shell element, otherwise false

◆ is_opencascade_engine_available()

bool CubitInterface::is_opencascade_engine_available ( )

◆ 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.

Parameters
target_idTarget id
id_listList 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 
)

Query whether a specified surface or curve is periodic.

if (CubitInterface::is_periodic("surface", 22)) . . .
if cubit.is_periodic("surface", 22):
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity
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.

Parameters
geom_typestring defining geometry type (volume or body) id ID of the geometric entity point xyz triplet defining the point (note that it must be std::array<double,3>
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.

Parameters
volume_idId of the volume
Returns
True if volume is a sheet body, otherwise false

◆ is_surface_planar()

bool CubitInterface::is_surface_planar ( int  surface_id)

◆ is_surface_planer()

bool CubitInterface::is_surface_planer ( int  surface_id)

Query whether a specified surface is planer.

if cubit.is_surface_planar(22):
Parameters
surface_idSpecifies the id of the surface
Returns
True is surface is planer, otherwise false

◆ is_type_filtered()

bool CubitInterface::is_type_filtered ( const std::string &  filter_type)

Determine whether a type is filtered.

◆ 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 
)

Query virtualality for a specific entity.

if (CubitInterface::is_virtual("surface", 134)) . . .
if cubit.is_virtual("surface", 134)):
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity

◆ is_visible()

bool CubitInterface::is_visible ( const std::string &  geometry_type,
int  entity_id 
)

Query visibility for a specific entity.

if (CubitInterface::is_visible("volume", 4)) . . .
if cubit.is_visible("volume", 4)):
Parameters
geom_typeSpecifies the geometry type of the entity
entity_idSpecifies the id of the entity

◆ is_volume_meshable()

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.

Parameters
stateA boolean that turns journaling on (1) and off (0)

◆ load_ML()

bool CubitInterface::load_ML ( std::string  model_type = "all")

load the machine learning training data

Parameters
model_typeshould be one of "all", "classification" or "regression"

◆ machine_learning()

MLUtil* CubitInterface::machine_learning ( )

◆ measure_between_entities()

std::vector<double> CubitInterface::measure_between_entities ( std::string  entity_type1,
int  entity_id1,
std::string  entity_type2,
int  entity_id2 
)

returns distance between two geometry entities and their closest points

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]]
Parameters
entity_type1type of first entity
entity_id1id of first entity
entity_type2type of second entity
entity_id2id of second entity

◆ ML_train()

bool CubitInterface::ML_train ( )

◆ move()

void CubitInterface::move ( Entity  entity,
std::array< double, 3 >  vector,
bool  preview = false 
)

Moves the Entity the specified vector.

Parameters
[in]entityThe Entity to be moved
[in]vectorThe vector the Entity will be moved
[in]previewFlag to show the preview or not, default is false

◆ number_undo_commands()

int CubitInterface::number_undo_commands ( )

Query whether there are any undo commands to execute.

Returns
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.

Returns

◆ parse_cubit_list()

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')

Parameters
typeThe specific entity type represented by the list of entities
int_listThe string that contains the entity list
Returns
A vector (python tuple) of validated integers

◆ plugin_manager()

CubitPluginManager* CubitInterface::plugin_manager ( )

◆ print_cmd_options()

void CubitInterface::print_cmd_options ( )

Used to print the command line options.

◆ print_current_selections()

void CubitInterface::print_current_selections ( )

Print the current selections.

◆ print_currently_selected_entity()

void CubitInterface::print_currently_selected_entity ( )

Print the current selection.

◆ print_info()

void CubitInterface::print_info ( const std::string &  message)

Print a message using the cubit message handler.

Parameters
messageThe message to print.

◆ 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.

Parameters
input_lineThe current command line being typed by the user
order_dependentIs set to '1' if the key pressed is not &, otherwise '0'
consecutive_dependentIs set to '1' if the pressed is '?', otherwise '0'

◆ print_surface_summary_stats()

void CubitInterface::print_surface_summary_stats ( )

Print the surface summary stats to the console.

◆ print_volume_summary_stats()

void CubitInterface::print_volume_summary_stats ( )

Print the volume summary stats to the console.

◆ prism()

Body CubitInterface::prism ( double  height,
int  sides,
double  major,
double  minor 
)

Creates a prism of the specified dimensions.

Parameters
[in]heightThe height of the prism
[in]sidesThe number of sides of the prism
[in]majorThe major radius
[in]minorThe minor radius
Returns
A Body object of the newly created prism

◆ process_input_files()

void CubitInterface::process_input_files ( )

C++ only

◆ 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.

Parameters
ptsThe x,y (abstract u,v) coordinates of the input points. Should be in [0,1].
surf_idThe surface.
quad_idThe quad.
node00_idThe id of the node of the quad corresponding to an input point with coordinates (0,0)
node10_idThe id of the node of the quad corresponding to an input point with coordinates (1,0)
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.

Parameters
[in]heightThe height of the pyramid
[in]sidesThe number of sides of the pyramid
[in]majorThe major radius
[in]minorThe minor radius
[in]topdetermines size for the top of the pyramid. Defaults to 0, meaning it will go to a point
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.

Parameters
[in]entityThe Entity to be reflected
[in]axisThe axis to be reflected about
[in]previewFlag to show the preview or not, default is false

◆ release_interface()

bool CubitInterface::release_interface ( CubitBaseInterface *  instance)

Release the interface with the given name.

Parameters
interface_namethe name of interface

◆ remove_entity_from_group()

void CubitInterface::remove_entity_from_group ( int  group_id,
int  entity_id,
const std::string &  entity_type 
)

Remove a specific entity from a specific group.

cubit.remove_entity_from_group(3, 22, "surface")
Parameters
group_idID of group from which the entity will be removed
entity_idID of the entity to be removed from the group
entity_typeType of the entity to be removed from the group. Note that only geometric entities can be removed

◆ remove_filter_type()

void CubitInterface::remove_filter_type ( const std::string &  filter_type)

Remove a filter type.

◆ replace_progress_handler()

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.

Parameters
progressA pointer to a CubitProgressHandler instance
Returns
pointer to previous progress handler

◆ report_usage()

void CubitInterface::report_usage ( )

◆ reset()

void CubitInterface::reset ( )

Executes a reset within cubit.

◆ reset_camera()

void CubitInterface::reset_camera ( )

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.

◆ scale()

void CubitInterface::scale ( Entity  entity,
double  factor,
bool  preview = false 
)

Scales the Entity according to the specified factor.

Parameters
[in]entityThe Entity to be scaled
[in]factorThe scale factor
[in]previewFlag to show the preview or not, default is false

◆ set_capture_color()

void CubitInterface::set_capture_color ( bool  is_captured,
std::array< double, 4 >  color 
)

◆ 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.

Parameters
interruptBoolean set to TRUE if process is to be stopped

◆ set_cubit_message_handler()

void CubitInterface::set_cubit_message_handler ( CubitMessageHandler *  hdlr)

redirect the output from cubit.

Parameters
hdlr

◆ set_entity_name()

bool CubitInterface::set_entity_name ( const std::string &  entity_type,
int  entity_id,
const std::string &  new_name 
)

Set the name of a specified entity.

CubitInterface::set_entity_name("vertex", 22, "new_name");
Parameters
entity_typeSpecifies the type of the entity
entity_idSpecifies the id of the entity
new_nameSpecifies what the name of the entity should be changed to
Returns
true if entity was found and rename, otherwise false.

◆ set_exit_handler()

void CubitInterface::set_exit_handler ( ExternalExitHandler *  hdlr)

Set the exit handler.

Parameters
Aninstance of a class that inherits from ExternalExitHandler

◆ set_filter_types()

void CubitInterface::set_filter_types ( int  num_types,
const std::vector< std::string >  filter_types 
)

Set the pick filter types.

◆ set_label_type()

void CubitInterface::set_label_type ( const char *  entity_type,
int  label_flag 
)

make calls to SVDrawTool::set_label_type

Returns
none.

◆ set_max_group_id()

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.

Parameters
max_idID of group to make 'max'

◆ set_ML_base_user_dir()

void CubitInterface::set_ML_base_user_dir ( const std::string  path,
const bool  print_info = false,
const bool  only = false 
)

set the path to any user training data. (classification only)

Parameters
pathtop level training directory (should contain ml/volume_no_op dir)
print_infoprint info to output
onlyuse only user training data – don't use cubit training data

◆ set_modified()

void CubitInterface::set_modified ( )

Set the status of the model (is_modified() is now false). If you modify the model after you set this flag, it will register true.

◆ set_overlap_max_angle()

void CubitInterface::set_overlap_max_angle ( const double  maximum_angle)

Set the max angle setting for calculating surface overlaps.

Parameters
maxangle
Returns

◆ set_overlap_max_gap()

void CubitInterface::set_overlap_max_gap ( const double  maximum_gap)

Set the max gap setting for calculating surface overlaps.

Parameters
maxgap
Returns

◆ set_overlap_min_gap()

void CubitInterface::set_overlap_min_gap ( const double  min_gap)

Set the min gap setting for calculating surface overlaps.

Parameters
min_gap
Returns

◆ set_pick_type()

void CubitInterface::set_pick_type ( const std::string &  pick_type,
bool  silent = false 
)

Set the pick type.

◆ set_playback_handler()

void CubitInterface::set_playback_handler ( ExternalPlaybackHandler *  hdlr)

C++ only

Parameters

◆ 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.

Parameters
pauseTrue if playback should be paused when an error occurs.

◆ set_progress_handler()

void CubitInterface::set_progress_handler ( CubitProgressHandler *  progress)

Register a progress-bar callback handler with Cubit. Deletes the current progress handler if it exists.

Parameters
progressA pointer to a CubitProgressHandler instance

◆ set_rendering_mode()

void CubitInterface::set_rendering_mode ( int  mode)

Set the current rendering mode.

Parameters
modeInteger associated with the rendering mode. Options are 1,7,2,8, or 5

◆ set_undo_saved()

void CubitInterface::set_undo_saved ( )

Set the status of the model relative to undo checkpointin.

◆ silent_cmd()

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.

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.

cubit.silent_cmd("display")
Parameters
input_stringPointer to a string containing a complete Cubit command

◆ sizing_source_growth_factor()

double CubitInterface::sizing_source_growth_factor ( int  id)

◆ sizing_source_ids()

std::vector<int> CubitInterface::sizing_source_ids ( )

Functions to support sizing source sizing function.

◆ sizing_source_max_size()

double CubitInterface::sizing_source_max_size ( )

◆ sizing_source_min_size()

double CubitInterface::sizing_source_min_size ( )

◆ sizing_source_origin()

std::array<double, 3> CubitInterface::sizing_source_origin ( int  id)

◆ sizing_source_rotation_angle()

double CubitInterface::sizing_source_rotation_angle ( int  id)

◆ sizing_source_rotation_vector()

std::array<double, 3> CubitInterface::sizing_source_rotation_vector ( int  id)

◆ sizing_source_scale()

std::array<double, 3> CubitInterface::sizing_source_scale ( int  id)

◆ sizing_source_size()

double CubitInterface::sizing_source_size ( int  id)

◆ snap_locations_to_geometry()

std::vector<std::array<double,3> > CubitInterface::snap_locations_to_geometry ( const std::vector< std::array< double, 3 >> &  locations,
std::string  entity_type,
int  entity_id,
double  tol 
)

Snaps xyz locations to closest point on entity. Then snaps to child curves or vertices within given tolerance. Vertices snapped to before curves.

#give list of lists of 3 points in form: [ [x, y, z], [x, y, z], ...]
locations = [ [0.0, 1.0, 3.0], [0.1, 1.1, 4.2] ]
snapped_xyz_vec = cubit.snap_locations_to_geometry( locations, "volume", 1, 0.001 )

◆ sphere()

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.

Parameters
[in]radiusThe radius of the sphere
[in]x_cutIf 1, cuts sphere by yz plane (default to 0)
[in]y_cutIf 1, cuts sphere by xz plane (default to 0)
[in]z_cutIf 1, cuts sphere by xy plane (default to 0)
[in]inner_radiusThe inside radius if the sphere is hollow (default to 0)
Returns
A Body object of the newly created sphere

◆ step_next_possible_selection()

void CubitInterface::step_next_possible_selection ( )

Step to the next possible selection (selected next dialog)

◆ step_previous_possible_selection()

void CubitInterface::step_previous_possible_selection ( )

Step to the previous possible selection (selected next dialog)

◆ 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. Includes carriage return and line breaks at column 80.

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'

std::vector<int> entity_ids = {1, 2, 3, 4};
std::string id_string = CubitInterface::get_id_string(entity_ids);
// id_string is "1 to 4\n";
entity_ids = [1,2,3,4]
id_string = cubit.get_all_ids_from_name(entity_ids)
# id_string is '1 to 4\n'
Parameters
idsThe vector of integer ids
Returns
A string representing the id list with line breaks

◆ 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.

Parameters
[in]tool_inList of Body objects to subtract
[in]from_inList of Body objects to be subtracted from
[in]imprint_inFlag to set the imprint (defaults to false)
[in]keep_old_inFlag to keep the old volume (defaults to false)
Returns
A list of changed body objects

◆ surface()

CubitInterface::Surface CubitInterface::surface ( int  id_in)

Gets the surface object from an ID.

Parameters
id_inThe ID of the surface
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.

Parameters
[in]curvesA list of curves to sweep
[in]along_curvesA list of curves to sweep along
[in]draft_angleThe sweep draft angle (default to 0)
[in]draft_typeThe draft type (default to 0) 0 => extended (draws two straight tangent lines from the ends of each segment until they intersect) 1 => rounded (create rounded corner between segments) 2 => natural (extends the shapes along their natural curve) ***
[in]rigidThe inside radius if the sphere is hollow (default to False)
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.

Parameters
bc_typeenum of CI_BCTypes. temperature = 4, convection = 7
bc_areaenum of CI_BCEntityTypes. Use 7 for top, 8 for bottom, 9 for gradient, 10 for middle
entity_idId of the BC
Returns
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.

Parameters
bc_type_inenum of CI_BCTypes. temperature = 4, convection = 7
entity_idId of the BC
Returns
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

Parameters
[in]r1radius from center to center of circle to be swept (r1>r2)
[in]r2radius of circle swept to create torus (r1>r2)
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.

Parameters
[in]curvesA list of curve objects to offset
[in]distancesA list of distances associated with the offset for each curve
[in]keep_oldKeep the old body (defaults to false)
[in]previewFlag to show the preview (defaults to false)
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

Parameters
[in]surfacesA list of the curves to be removed
[in]keep_oldKeep the old body (defaults to false)
[in]previewFlag to show the preview (defaults to false)
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.

Parameters
surfacesA list of surface objects to offset
distancesA list of distances associated with the offset for each surface
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

Parameters
[in]surfacesThe surfaces to be removed
[in]extend_ajoiningExtend the ajoining surfaces (default to true)
[in]keep_oldKeep the old body (default to false)
[in]previewFlag to show the preview or not (default to false)
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.

Parameters
[in]vertsA list of vertex objects to fillet
[in]r0radius of the fillet
[in]keep_oldKeep the old body (defaults to false)
[in]previewFlag to show the preview (defaults to false)
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.

Parameters
[in]body_inA list of body objects to unite
[in]keep_old_inFlag to keep old bodies (defaults to false)
Returns
A list of changed bodies

◆ unload_ML()

void CubitInterface::unload_ML ( std::string  model_type = "all")

unload the machine learning training data

Parameters
model_typeshould be one of "all", "classification" or "regression"

◆ unselect_entity()

void CubitInterface::unselect_entity ( const std::string &  entity_type,
int  entity_id 
)

Unselect an entity that is currently selected.

Unselecting an entity will unhighlight it in the graphics window and remove it from the global pick list.

cubit.unselect_entity("curve", 221)
Parameters
entity_typeThe type of the entity to be unselected
entity_idThe ID of the entity to be unselected

◆ vertex()

CubitInterface::Vertex CubitInterface::vertex ( int  id_in)

Gets the vertex object from an ID.

Parameters
id_inThe ID of the vertex
Returns
The vertex object

◆ volume()

CubitInterface::Volume CubitInterface::volume ( int  id_in)

Gets the volume object from an ID.

Parameters
id_inThe ID of the volume
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

Variable Documentation

◆ CI_ERROR

const int CI_ERROR = -1