|
Cubit Python API 2026.6
|
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 | BoltHoleInfo |
| Struct for BoltHoleInfo data used in CubitInterface. More... | |
| class | CFD_BC_Entity |
| Class to implement cfd bc data retrieval. More... | |
| class | CIObserve |
| class | CubitFailureException |
| An exception class to alert the caller when the underlying Cubit function fails. More... | |
| class | CubitMessageHandler |
| CubitMessageHandler provides a way to override how messages are displayed to the user. More... | |
| class | CubitProgressHandler |
| class | CubitStringMessageHandler |
| 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 | ExternalExitHandler |
| 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. 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 | MeshImport |
| 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... | |
| class | VolumeGap |
| Struct for VolumeGap data used in CubitInterface. More... | |
Functions | |
| body (id_in) | |
| Retrieve a body by its ID. | |
| brick (width, depth=-1, height=-1) | |
| Create a brick of specified width, depth, and height. | |
| copy_body (init_body) | |
| Create a duplicate of the specified body. | |
| create_arc_curve (v0, v1, intermediate_point) | |
| Create an arc curve using end vertices and an intermediate point. | |
| create_curve (v0, v1) | |
| Create a curve between two vertices. | |
| create_nurbs_curve (degree, ctrl_pts, weights, knot_vec) | |
| Creates a NURBS curve... code-block:: c++. | |
| create_spline (points, surface_id) | |
| Create a spline curve through a sequence of 3D points on a surface. | |
| create_surface (curves) | |
| Create a sheet body from boundary curves. | |
| create_vertex (x, y, z) | |
| Create a vertex at specified coordinates. | |
| create_window () | |
| curve (id_in) | |
| Retrieve a curve object by its ID. | |
| cylinder (height, x_radius, y_radius, top_radius) | |
| Create a cylinder or truncated cone of specified dimensions. | |
| delete_window (id) | |
| get_all_cfd_bcs () | |
| get_assembly_children (assembly_id) | |
| get_assembly_items () | |
| get_block_cad_material (block_id) | |
| get_block_string_attributes (block_id) | |
| get_mesh_error_count () | |
| get_mesh_errors () | |
| get_top_level_assembly_items () | |
| get_volume_cad_material (volume_id) | |
| get_volumes_for_node (node_name, node_instance) | |
| move (entity, vector, preview=False) | |
| Translates an Entity by a specified vector. | |
| prism (height, sides, major, minor) | |
| Create a prism of the specified dimensions. | |
| pyramid (height, sides, major, minor, top=0.0) | |
| Create a pyramid of specified dimensions. | |
| reflect (entity, axis, preview=False) | |
| Reflects an Entity about a specified axis (e.g., plane normal). | |
| reset () | |
| Reset Cubit state. | |
| scale (entity, factor, preview=False) | |
| Scales an Entity uniformly by a specified factor. | |
| set_element_variable (element_ids, variable_name, variables) | |
| Sets scalar variables on specified mesh elements for Exodus export. | |
| set_nodal_variable (node_ids, variable_name, variables) | |
| Sets scalar variables on specified mesh nodes. | |
| sphere (radius, x_cut=0, y_cut=0, z_cut=0, inner_radius=0) | |
| Create all or part of a sphere. | |
| subtract (tool_in, from_in, imprint_in=False, keep_old_in=False) | |
| Performs a boolean subtract operation: removes tool bodies from target bodies. | |
| surface (id_in) | |
| Retrieve a surface object by its ID. | |
| sweep_curve (curves, along_curves, draft_angle, draft_type, rigid) | |
| Sweep one or more curves along a path to create sheet bodies. | |
| torus (center_radius, swept_radius) | |
| Create a torus of specified dimensions. | |
| tweak_curve_offset (curves, distances, keep_old=False, preview=False) | |
| 2D equivalent of tweak_surface_offset: offsets specified curves on a sheet body. | |
| tweak_curve_remove (curves, keep_old=False, preview=False) | |
| Removes specified curves and extends adjacent surfaces on a sheet body. | |
| tweak_surface_offset (surfaces, distances) | |
| Offsets specified surfaces by given distances. | |
| tweak_surface_remove (surfaces, extend_ajoining=True, keep_old=False, preview=False) | |
| Removes specified surfaces from a body, optionally extending adjacent surfaces. | |
| tweak_vertex_fillet (verts, radius, keep_old=False, preview=False) | |
| 2D sheet vertex chamfer: creates chamfers at specified vertices by offsetting adjacent curves. | |
| unite (body_in, keep_old_in=False) | |
| Performs a boolean unite operation: merges specified bodies into one. | |
| vertex (id_in) | |
| Retrieve a vertex object by its ID. | |
| volume (id_in) | |
| Retrieve a volume by its ID. | |
CubitInterface Control | |
| init (argv) | |
| Initialize the Cubit engine with optional startup arguments. | |
| destroy () | |
| Shut down Cubit and close the active journal file. | |
| _incr_acis () | |
| _decr_acis () | |
| set_cubit_message_handler (hdlr) | |
| Redirect Cubit output to a custom message handler. | |
| get_cubit_message_handler () | |
| Retrieve the current Cubit message handler. | |
| set_exit_handler (hdlr) | |
| Set a custom exit callback for Cubit. | |
| set_progress_handler (progress) | |
| Register a progress-bar callback handler with Cubit. | |
| replace_progress_handler (progress) | |
| Replace the current progress-bar callback handler and return the old one. | |
| set_cubit_interrupt (interrupt) | |
| Enable or disable interruptible operations in Cubit. | |
System Control and Data | |
| set_playback_paused_on_error (pause) | |
| Configure whether playback pauses on error. | |
| is_playback_paused_on_error () | |
| Query whether playback is paused on error. | |
| pause_playback () | |
| Pause journal playback immediately. | |
| stop_playback () | |
| Stop journal playback entirely. | |
| resume_playback () | |
| Resume a paused journal playback. | |
| is_playback_paused () | |
| Check if journal playback is currently paused. | |
| developer_commands_are_enabled () | |
| Check if developer commands are enabled. | |
| get_interface (interface_name) | |
| Retrieve a Cubit interface by name. | |
| release_interface (instance) | |
| Release a previously retrieved Cubit interface. | |
| add_filename_to_recent_file_list (filename) | |
| Add a filename to Cubit's recent-file list in the GUI File menu. | |
| get_version () | |
| Retrieve the current Cubit version string. | |
| get_revision_date () | |
| Retrieve the Cubit revision date. | |
| get_build_number () | |
| Retrieve the Cubit build number. | |
| get_acis_version () | |
| Retrieve the ACIS kernel version string. | |
| get_acis_version_as_int () | |
| Retrieve the ACIS kernel version as an integer. | |
| get_sgm_version () | |
| Retrieve the SGM (Solid Geometry Manager) version. | |
| get_exodus_version () | |
| Retrieve the Exodus mesh library version. | |
| get_meshgems_version () | |
| Retrieve the MeshGems library version. | |
| get_graphics_version () | |
| Retrieve the VTK (Visualization Toolkit) version used by Cubit. | |
| get_python_version () | |
| Retrieve the Python interpreter version used by Cubit. | |
| get_default_geometry_engine () | |
| Get the name of the default modeler engine. | |
| is_catia_engine_available () | |
| Determine whether the CATIA geometry engine is available. | |
| is_acis_engine_available () | |
| Determine whether the ACIS geometry engine is available. | |
| is_opencascade_engine_available () | |
| Determine whether the OpenCASCADE geometry engine is available. | |
| is_special_build (build_type) | |
| Check if a special build type is available. | |
| print_cmd_options () | |
| Display Cubit's supported startup options. | |
| graphics_enabled () | |
| Used to check if a GUI graphics window is enabled. | |
| is_modified () | |
| Check if the model has been modified since import or last save. | |
| set_modified () | |
| Reset the model's modified status to "unmodified". | |
| is_undo_save_needed () | |
| Check if the model requires an undo checkpoint save. | |
| set_undo_saved () | |
| Clear the undo-needed flag for the model. | |
| is_performing_undo () | |
| Query whether an undo operation is currently being performed. | |
| was_last_cmd_undoable () | |
| Report whether the last executed command was undoable. | |
| get_undo_enabled () | |
| Query whether undo is currently enabled. | |
| number_undo_commands () | |
| Query the number of undoable commands in the stack. | |
| is_command_echoed () | |
| Check whether Cubit echoes commands to the console. | |
| get_command_from_history (command_number) | |
| Retrieve a specific command from Cubit's history buffer. | |
| get_command_history_count () | |
| Get the number of commands in Cubit's history buffer. | |
| get_next_command_from_history () | |
| Get the next command from the history buffer. | |
| get_previous_command_from_history () | |
| Get the previous command from the history buffer. | |
| write_to_journal (words) | |
| Append a custom entry to Cubit's journal and recording streams. | |
| journal_commands (state) | |
| Enable or disable journaling of Cubit commands. | |
| is_command_journaled () | |
| Query whether Cubit is journaling commands. | |
| get_current_journal_file () | |
| Get the filename of the current journal file. | |
| is_working_dir_set () | |
| Check if the "-workingdir" option was provided at Cubit startup. | |
| app_util () | |
| Return Cubit's AppUtil interface for global services. | |
| cgm_iface () | |
| Return the CGM-based geometry interface for Cubit. | |
| cgm () | |
| Return the raw CGMApp kernel instance used by Cubit. | |
Command Utilities | |
| cmd (input_string) | |
| Execute a raw Cubit command string immediately (modifies model state). | |
| silent_cmd (input_string) | |
| Execute a Cubit command without echoing or verbose output. | |
| print_info (message) | |
| Print a message through Cubit's messaging system. | |
| parse_cubit_list (type, entity_list_string) | |
| Parse a Cubit-style entity selection expression into a list of IDs. | |
| parse_locations (location_str) | |
| Parse a Cubit location specification into concrete 3D coordinates. | |
| string_from_id_list (ids) | |
| Convert a list of integers into a compact Cubit-style ID string. | |
| get_id_string (entity_ids, sort=True) | |
| Convert a list of integers into a compact Cubit-style ID range string. | |
| print_raw_help (input_line, order_dependent, consecutive_dependent) | |
| Display context-sensitive help while typing commands. | |
| get_error_count () | |
| Retrieve the total number of errors in the current Cubit session. | |
| get_cubit_digits_setting () | |
| Retrieve the current Cubit "digits" setting. | |
| is_part_of_list (target_id, id_list) | |
| Check if an ID is present in a list of IDs. | |
| get_last_id (entity_type) | |
| Get the ID of the last created entity of the given type. | |
| entity_exists (entity_type, id) | |
| Check whether an entity of the specified type and ID exists. | |
| get_idless_signature (entity_type, entity_id) | |
| Get the idless signature of a geometric or mesh entity. | |
| get_idless_signatures (entity_type, entity_id_list) | |
| Get the idless signatures of a range of geometric or mesh entities. | |
| is_file_hdf5 (filename) | |
| Check whether a file is an HDF5 file. | |
| get_aprepro_vars () | |
| Retrieve the current Aprepro variable names. | |
| get_aprepro_value_as_string (variable_name) | |
| Get the string value of an Aprepro variable. | |
| get_aprepro_numeric_value (variable_name) | |
| Get the numeric value of a specified Aprepro variable. | |
Graphics Viewing | |
| get_view_distance () | |
| Get the camera's distance between its position and focus point. | |
| get_view_at () | |
| Get the camera's current "at" (target) point. | |
| get_view_from () | |
| Get the camera's current 'from' (position) point. | |
| get_view_up () | |
| Get the camera's 'up' direction vector. | |
| reset_camera () | |
| Reset the camera view and clear auxiliary graphics windows. | |
| flush_graphics () | |
| Force immediate rendering of pending graphics operations. | |
| is_perspective_on () | |
| Check if perspective projection is enabled. | |
| is_clipping_plane_on () | |
| Get the current clipping plane status :rtype: boolean. | |
| is_clipping_plane_manipulation_on () | |
| Get the current clipping plane manipulation status :rtype: boolean. | |
| is_occlusion_on () | |
| Check if occlusion is enabled. | |
| is_scale_visibility_on () | |
| Check if the scale annotation is visible in the graphics window. | |
| is_mesh_visibility_on () | |
| Check if mesh graphics are visible in the graphics window. | |
| is_geometry_visibility_on () | |
| Check if geometry graphics are visible in the graphics window. | |
| get_rendering_mode () | |
| Get the current graphics rendering mode. | |
| set_rendering_mode (mode) | |
| Set the current graphics rendering mode (equivalent to "Graphics Mode <option>"). | |
| set_label_type (entity_type, label_flag) | |
| Sets label display type for a given entity type. | |
| get_label_type (entity_type) | |
| Gets the current label display type for a given entity type. | |
Graphics Entity Selections | |
| clear_drawing_set (set_name) | |
| Clear all geometry in a named drawing set (e.g., mesh preview). | |
| unselect_entity (entity_type, entity_id) | |
| Unselect an entity that is currently selected. | |
| get_rubberband_shape () | |
| Get the current rubberband selection shape. | |
| is_select_partial_on () | |
| Check if partial selection is enabled. | |
| clear_highlight () | |
| Clear all entity highlights. | |
| clear_preview () | |
| Clear preview graphics without affecting other display settings. | |
| highlight (entity_type, entity_id) | |
| Highlight the given entity in the graphics window without selecting it. | |
| get_selected_ids () | |
| Retrieve all currently selected entity IDs in pick order. | |
| get_selected_id (index) | |
| Get the selected entity ID by index. | |
| get_selected_type (index) | |
| Get the selected entity type by index. | |
| get_pick_type () | |
| Get the current pick mode for entity selection. | |
| set_pick_type (pick_type, silent=False) | |
| Set the current pick mode for entity selection. | |
| set_filter_types (num_types, filter_types) | |
| Set multiple pick filter types for graphics selections. | |
| add_filter_type (filter_type) | |
| Add an entity type to the graphics pick filter. | |
| remove_filter_type (filter_type) | |
| Remove an entity type from the graphics pick filter. | |
| is_type_filtered (filter_type) | |
| Check if a specific entity type is currently excluded from picking. | |
| get_pick_filters () | |
| Retrieve the list of entity types currently allowed for picking. | |
| clear_picked_list () | |
| Clear the list of currently picked entities. | |
| step_next_possible_selection () | |
| Advance to the next entity in the current selection list. | |
| step_previous_possible_selection () | |
| Move back to the previous entity in the current selection list. | |
| print_current_selections () | |
| Print all selected entities and their types. | |
| print_currently_selected_entity () | |
| Print details of the current selected entity. | |
| current_selection_count () | |
| Get the number of entities in the current selection list. | |
Meshing Schemes Support | |
| get_default_element_type () | |
| Retrieve the current default element type for meshing. | |
| is_volume_meshable (volume_id) | |
| Check if a volume is meshable under the current meshing scheme. | |
| is_surface_meshable (surface_id) | |
| Check if a surface is meshable under the current meshing scheme. | |
| get_vertex_type (surface_id, vertex_id) | |
| Retrieve the vertex type for a given vertex on a surface. | |
| get_submap_corner_types (surface_id) | |
| Get a list of vertex IDs and their corner-type codes for a surface submap. | |
| get_curve_bias_type (curve_id) | |
| Retrieve the bias scheme type applied to a curve. | |
| get_curve_bias_geometric_factor (curve_id) | |
| Get the primary geometric progression factor used for biasing a curve. | |
| get_curve_bias_geometric_factor2 (curve_id) | |
| Get the secondary geometric progression factor for a dual-bias curve. | |
| get_curve_bias_first_interval_length (curve_id) | |
| Query the length of the first interval on a biased curve. | |
| get_curve_bias_first_interval_fraction (curve_id) | |
| Retrieve the fraction of curve length used as the first interval size. | |
| get_curve_bias_fine_size (curve_id) | |
| Get the "fine size" parameter for a biased curve, if set. | |
| get_curve_bias_coarse_size (curve_id) | |
| Get the "coarse size" parameter for a biased curve, if set. | |
| get_curve_bias_first_last_ratio1 (curve_id) | |
| Retrieve the ratio of first-to-last interval at the start of a biased curve. | |
| get_curve_bias_first_last_ratio2 (curve_id) | |
| Retrieve the ratio of first-to-last interval at the end of a biased curve. | |
| get_curve_bias_last_first_ratio1 (curve_id) | |
| Retrieve the ratio of last-to-first interval at the start of a biased curve. | |
| get_curve_bias_last_first_ratio2 (curve_id) | |
| Retrieve the ratio of last-to-first interval at the end of a biased curve. | |
| get_curve_bias_from_start (curve_id, value) | |
| Determine if the bias is measured from the curve's start vertex. | |
| get_curve_bias_from_start_set (curve_id) | |
| Check if the "bias from start" flag has been explicitly set on a curve. | |
| get_curve_bias_start_vertex_id (curve_id) | |
| Retrieve the vertex ID designated as the start of bias on a curve. | |
| get_curve_mesh_scheme_curvature (curve_id) | |
| Retrieve the curvature mesh scheme adaptation value for a curve. | |
| get_curve_mesh_scheme_pinpoint_locations (curve_id) | |
| Retrieve the pinpoint mesh scheme locations for a curve. | |
| get_mesh_scheme (geometry_type, entity_id) | |
| Retrieve the meshing scheme applied to a geometric entity. | |
| get_smooth_scheme (geometry_type, entity_id) | |
| Retrieve the smoothing scheme for a specified geometry entity. | |
| get_mesh_scheme_firmness (geometry_type, entity_id) | |
| Retrieve the meshing scheme firmness for a specified surface or volume. | |
| get_tetmesh_proximity_flag (volume_id) | |
| Get the proximity-layer flag for tet meshing on a volume. | |
| get_tetmesh_proximity_layers (volume_id) | |
| Get the number of proximity layers for tet meshing on a volume. | |
| get_tetmesh_growth_factor (volume_id) | |
| Get the growth factor for tet meshing on a volume. | |
| get_tetmesh_parallel () | |
| Get the global parallel-tetmesher flag (HPC) setting. | |
| get_tetmesh_num_anisotropic_layers () | |
| Get the global number of anisotropic tet layers setting. | |
| get_tetmesh_optimization_level () | |
| Get the global tet meshing optimization level. | |
| get_tetmesh_insert_mid_nodes () | |
| Get the global flag indicating insertion of mid-edge (quadratic) nodes during tet meshing. | |
| get_tetmesh_optimize_mid_nodes () | |
| Get the global flag indicating optimization of mid-edge nodes during tet meshing. | |
| get_tetmesh_optimize_overconstrained_tets () | |
| Get the global flag indicating optimization of overconstrained tetrahedra. | |
| get_tetmesh_optimize_overconstrained_edges () | |
| Get the global flag indicating optimization of overconstrained edges. | |
| get_tetmesh_minimize_slivers () | |
| Get the global flag indicating minimization of sliver tetrahedra. | |
| get_tetmesh_minimize_interior_points () | |
| Get the global flag indicating minimization of interior points in tet meshing. | |
| get_tetmesh_relax_surface_constraints () | |
| Get the global flag indicating relaxation of surface mesh constraints in tet meshing. | |
| get_mesh_geometry_approximation_angle (geometry_type, entity_id) | |
| Get the geometry approximation angle for TriMesh/TetMesh on a given entity. | |
| get_trimesh_surface_gradation () | |
| Retrieve the global surface mesh gradation for the TriMesh scheme. | |
| get_trimesh_volume_gradation () | |
| Retrieve the global volume mesh gradation for the TriMesh scheme. | |
| get_trimesh_use_surface_proximity () | |
| Retrieve the global surface proximity flag for the TriMesh scheme. | |
| get_trimesh_surface_proximity_ratio () | |
| Retrieve the global surface proximity ratio for the TriMesh scheme. | |
| get_trimesh_target_min_size (geometry_type, entity_id) | |
| Retrieve the target minimum triangle size set on a specific geometry entity for the TriMesh scheme. | |
| get_trimesh_geometry_sizing () | |
| Retrieve the global geometry sizing flag for the TriMesh scheme. | |
| get_trimesh_num_anisotropic_layers () | |
| Retrieve the global number of anisotropic triangle layers for the TriMesh scheme. | |
| get_trimesh_split_overconstrained_edges () | |
| Retrieve the global flag for splitting overconstrained edges in the TriMesh scheme. | |
| get_trimesh_coarse_mesh_toggle () | |
| Get the global setting for trimesher coarse mesh :rtype: boolean. | |
| get_trimesh_anisotropic_ratio () | |
| Get the global setting for trimesher coarse anisotropic ratio :rtype: float. | |
| get_trimesh_coarse_deviation_angle () | |
| Get the global setting for trimesher coarse mesh geometric approximation angle :rtype: float. | |
| get_trimesh_tiny_edge_length () | |
| Retrieve the global tiny edge length for the TriMesh scheme. | |
| get_trimesh_ridge_angle () | |
| Retrieve the global ridge angle for the TriMesh scheme. | |
| get_node_constraint () | |
| Query whether node constraint is enabled (move mid-nodes to geometry). | |
| get_node_constraint_value () | |
| Query the numeric value of the node constraint setting. | |
| get_node_constraint_smart_threshold () | |
| Query the current quality threshold for smart node constraint. | |
| get_node_constraint_smart_metric () | |
| Query the current quality metric for smart node constraint. | |
| get_dbl_sculpt_default (variable) | |
| Retrieve the default value of a named sculpt parameter. | |
| get_int_sculpt_default (variable) | |
| Retrieve default integer-valued sculpt parameter. | |
| get_bool_sculpt_default (variable) | |
| Retrieve default boolean-valued sculpt parameter. | |
| get_string_sculpt_default (variable) | |
| Retrieve default string-valued sculpt parameter. | |
Mesh Sizing Support | |
| get_mesh_intervals (geometry_type, entity_id) | |
| Get the mesh interval count for a specified entity. | |
| get_mesh_size (geometry_type, entity_id) | |
| Retrieve the effective target edge length for meshing an entity. | |
| get_requested_mesh_size (geometry_type, id) | |
| Retrieve the mesh size explicitly set on a geometry entity. | |
| has_valid_size (geometry_type, entity_id) | |
| Check whether a geometric entity has a valid size. | |
| get_mesh_interval_firmness (geometry_type, entity_id) | |
| Retrieve the interval firmness for a specified geometry entity. | |
| get_requested_mesh_interval_firmness (geometry_type, entity_id) | |
| Retrieve the explicitly requested interval firmness for a specified entity. | |
| get_mesh_size_type (geometry_type, entity_id) | |
| Retrieve the mesh size setting type for a specified entity. | |
| get_requested_mesh_size_type (geometry_type, entity_id) | |
| Retrieve the mesh size setting type explicitly requested on a specified entity. | |
| auto_size_needs_to_be_calculated () | |
| Check if automatic mesh sizing is outdated and needs recomputation. | |
| get_default_auto_size () | |
| Compute Cubit's heuristic default automatic mesh size for the current model. | |
| get_requested_mesh_intervals (geometry_type, entity_id) | |
| Retrieve the mesh interval count explicitly set on a geometry entity. | |
| is_interval_count_odd (surface_id) | |
| Check if any loop on a surface has an odd number of mesh intervals. | |
| get_auto_size (geometry_type, entity_id_list, auto_factor) | |
| Predict the automatic mesh size for a set of entities. | |
| get_element_budget (element_type, entity_id_list, auto_factor) | |
| Estimate the total element count for a set of volumes given size settings. | |
| get_exodus_sizing_function_variable_name () | |
| Retrieve the Exodus-based sizing function variable name. | |
| get_exodus_sizing_function_file_name () | |
| Retrieve the Exodus sizing function file name. | |
| get_sizing_function_name (entity_type, entity_id) | |
| Retrieve the meshing sizing function type for a surface or volume. | |
| exodus_sizing_function_file_exists () | |
| Check if the Exodus sizing function file currently exists. | |
Mesh Query Support | |
| is_meshed (geometry_type, entity_id) | |
| Determine whether a specified geometry entity has been meshed. | |
| get_hex_count () | |
| Retrieve the count of hexahedral elements in the current model. | |
| get_pyramid_count () | |
| Retrieve the count of pyramid elements in the current model. | |
| get_tet_count () | |
| Retrieve the count of tetrahedral elements in the current model. | |
| get_quad_count () | |
| Retrieve the count of quadrilateral elements in the current model. | |
| get_tri_count () | |
| Retrieve the count of triangular elements in the current model. | |
| get_edge_count () | |
| Retrieve the count of edges between surface elements in the current model. | |
| get_sphere_count () | |
| Retrieve the count of sphere elements in the current model. | |
| get_wedge_count () | |
| Retrieve the count of wedge-shaped elements in the current model. | |
| get_node_count () | |
| Retrieve the count of nodes in the current model. | |
| get_element_count () | |
| Retrieve the count of exportable elements in the current model. | |
| get_volume_element_count (volume_id) | |
| Retrieve the count of 3D elements in a specified volume. | |
| get_surface_element_count (surface_id) | |
| Retrieve the count of elements on a specified surface. | |
| volume_contains_tets (volume_id) | |
| Determine whether a specified volume contains any tetrahedral elements. | |
| get_hex_sheet (node_id_1, node_id_2) | |
| Retrieve the IDs of all hexahedral elements forming a hex sheet through two nodes. | |
| get_hex_column (quad_id) | |
| Get the list of hex elements forming a hex column through the given quad/face. | |
| get_mesh_edge_length (edge_id) | |
| Compute the length of a specified mesh edge. | |
| get_meshed_volume_or_area (geometry_type, entity_ids) | |
| Sum mesh volumes or surface areas for CAD entities or mesh elements. | |
| get_elem_quality_stats (entity_type, id_list, metric_name, single_threshold, use_low_threshold, low_threshold, high_threshold, make_group) | |
| Python-friendly version of get_quality_stats without reference parameters. | |
| get_quality_stats_at_geometry (geom_type, mesh_type, geom_id_list, expand_levels, metric_name, single_threshold, use_low_threshold, low_threshold, high_threshold, make_group) | |
| Python-friendly version of get_quality_stats operating on geometry entities. | |
| get_quality_value (mesh_type, mesh_id, metric_name) | |
| Retrieve a specific quality metric value for a single mesh element. | |
| get_quality_values (mesh_type, mesh_ids, metric_name) | |
| Retrieve quality metric values for multiple mesh elements. | |
| calculate_timestep_estimate (entity_type, entity_ids) | |
| Estimate the time step based on element sizes and material properties. | |
| calculate_timestep_estimate_with_props (entity_type, entity_id_list, density, youngs_modulus, poissons_ratio) | |
| Estimate the stable time step using user-specified material properties. | |
| get_target_timestep () | |
| Return the current target time step threshold used in the density multiplier metric. | |
| get_overconstrained_tets_in_volumes (volumes) | |
| Retrieve IDs of overconstrained tetrahedra within specified volumes. | |
| best_edge_to_collapse_interior_node (node_id) | |
| Find the best edge to collapse to remove an interior node in a triangular mesh. | |
| get_edges_to_swap (curve_id) | |
| Get edges on triangles at a knife-edge curve that are candidates for swapping. | |
| get_n_largest_distances_between_meshes (n, entity_type1, ids1, entity_type2, ids2) | |
| Finds the N largest node-to-element distances between two meshes. | |
Geometry Topology Support | |
| get_entities (entity_type) | |
| Retrieve IDs of all current entities of a specified type (geometry and mesh). | |
| get_current_ids (entity_type) | |
| Retrieve IDs of all current geometry entities of a specified type. | |
| get_body_count () | |
| Get the current number of bodies in the model. | |
| get_volume_count () | |
| Get the current number of volumes in the model. | |
| get_surface_count () | |
| Get the current number of surfaces in the model. | |
| get_curve_count () | |
| Get the current number of curves in the model. | |
| get_vertex_count () | |
| Get the current number of vertices in the model. | |
| get_curve_count_in_volumes (target_volume_ids) | |
| Get the current number of curves in the specified volumes. | |
| get_relatives (source_geometry_type, source_id, target_geom_type) | |
| Get the relatives (parents or children) of a specified entity. | |
| are_adjacent_surfaces (surface_ids) | |
| Return whether two or more surfaces share at least one manifold curve. | |
| are_adjacent_curves (curve_ids) | |
| Return whether two or more curves share at least one manifold vertex. | |
| get_adjacent_surfaces (geometry_type, entity_id) | |
| Get a list of surfaces adjacent to a specified surface (including the surface itself). | |
| get_adjacent_volumes (geometry_type, entity_id) | |
| Get a list of adjacent volumes to a specified entity. | |
| get_num_volume_shells (volume_id) | |
| Get the number of shells in a volume. | |
| get_valence (vertex_id) | |
| Get the valence (number of incident edges) for a specific vertex. | |
| get_list_of_free_ref_entities (geometry_type) | |
| Get all free (unattached) entities of a given geometry type. | |
| get_owning_body (geometry_type, entity_id) | |
| Get the owning body for a specified entity. | |
| get_owning_volume (geometry_type, entity_id) | |
| Get the owning volume for a specified entity. | |
| get_owning_volume_by_name (entity_name) | |
| Get the owning volume for an entity by its name. | |
| get_common_curve_id (surface_1_id, surface_2_id) | |
| Return a curve shared by two surfaces. | |
| get_common_vertex_id (curve_1_id, curve_2_id) | |
| Return a vertex shared by two curves. | |
| get_connected_surfaces (surf_ids) | |
| Find surfaces connected to a given set of surfaces. | |
| gather_surfaces_by_orientation (seed_surf_ids, all_surf_ids) | |
| Gathers surfaces connected across shared edges, forming a surface enclosure. | |
Geometry Attribute Support | |
| is_visible (geometry_type, entity_id) | |
| Query visibility for a specific geometry entity. | |
| is_virtual (geometry_type, entity_id) | |
| Query whether a specified geometry entity is virtual. | |
| contains_virtual (geometry_type, entity_id) | |
| Query whether any child entities of a specified geometry entity are virtual. | |
| is_merged (geometry_type, entity_id) | |
| Check if a specified geometry entity has been merged into another. | |
| get_merge_setting (geometry_type, entity_id) | |
| Get merge mode ("on", "off", or "auto") for a given entity. | |
| get_source_surfaces (volume_id) | |
| Retrieve the list of sweep source surfaces for a specified volume. | |
| get_target_surfaces (volume_id) | |
| Retrieve the list of sweep target surfaces for a specified volume. | |
| get_entity_modeler_engine (geometry_type, entity_id) | |
| Get the modeler engine type for a specified entity. | |
| get_entity_name (entity_type, entity_id, no_default=False) | |
| Get the name of a specified entity. | |
| get_entity_names (entity_type, entity_id, no_default=False, first_name_only=False) | |
| Get all names associated with a specified entity. | |
| set_entity_name (entity_type, entity_id, new_name) | |
| Set the name of a specified entity. | |
| get_id_from_name (name) | |
| Retrieve the integer ID of an entity by its name. | |
| get_all_ids_from_name (geo_type, name) | |
| Retrieve all IDs of entities of a specified geometry type whose names start with a given prefix. | |
| get_namespace_list () | |
| get_entity_color (entity_type, entity_id) | |
| Get the color of a specified entity. | |
| get_entity_color_index (entity_type, entity_id) | |
| Get the color index of a specified entity. | |
| is_multi_volume (body_id) | |
| Check if a body contains multiple volumes. | |
| is_sheet_body (volume_id) | |
| Determine if a volume is a sheet body (zero thickness). | |
Geometry Query Support | |
| get_vertex_coordinates (entityID) | |
| Get the 3D coordinates of a vertex. | |
| get_distance_between (vertex_id_1, vertex_id_2) | |
| Get the Euclidean distance between two vertices. | |
| get_curve_type (curve_id) | |
| Get the curve type for a specified curve. | |
| get_curve_length (curve_id) | |
| Get the 3D length of a specified curve. | |
| get_arc_length (curve_id) | |
| Get the parametric (arc) length of a specified curve. | |
| get_distance_from_curve_start (x_coordinate, y_coordinate, z_coordinate, curve_id) | |
| Get the distance along a curve from its start to the closest point on the curve. | |
| get_curve_radius (curve_id) | |
| Compute the radius of a specified curve. | |
| get_curve_center (curve_id) | |
| Retrieve the center point of a specified curve. | |
| get_arc_center_radius (curve_id) | |
| Get the center point and radius of a specified arc curve. | |
| evaluate_exterior_angle_at_curve (curve_id, volume_id) | |
| Return the exterior angle at a single curve with respect to a volume. | |
| evaluate_exterior_angle (curve_list, test_angle) | |
| Find curves whose exterior angle between adjacent surfaces is less than a given threshold. | |
| get_similar_curves (curve_ids, tol=1e-3, use_percent_tol=True, on_similar_vols=True) | |
| Find curves with lengths similar to a given curve. | |
| get_surface_type (surface_id) | |
| Get the surface type for a specified surface. | |
| get_surface_normal (surface_id) | |
| Get the unit normal vector at the center of a specified surface. | |
| get_surface_normal_at_coord (surface_id, coord) | |
| Get the unit normal vector at a specified point on a surface. | |
| get_u_v_from_surface_position (surface_id, position) | |
| Get the parametric location u, v of a given point on the surface :type surface_id: int. | |
| get_surface_position_from_u_v (surface_id, u, v) | |
| Get the XYZ position for a specified surface at the given parametric (u, v) :type surface_id: int. | |
| get_surface_centroid (surface_id) | |
| Get the approximate centroid of a specified surface based on graphics faceting. | |
| get_surface_sense (surface_id) | |
| Get the orientation ("sense") of a specified surface. | |
| is_surface_planer (surface_id) | |
| Query whether a specified surface is planar. | |
| is_surface_planar (surface_id) | |
| get_surface_area (surface_id) | |
| Get the area of a specified surface. | |
| get_hydraulic_radius_surface_area (surface_id) | |
| Compute the hydraulic radius of a specified surface. | |
| get_surface_principal_curvatures (surface_id) | |
| Get the principal curvatures of a surface at its midpoint. | |
| evaluate_surface_angle_at_vertex (surf_id, vert_id) | |
| Return the interior angle at a vertex on a specified surface. | |
| project_unit_square (pts, surface_id, quad_id, node00_id, node10_id) | |
| Map points in a unit square (u-v coordinates on a quad face) and project them onto a surface. | |
| get_similar_surfaces (surface_ids, tol=1e-3, use_percent_tol=True, on_similar_vols=True) | |
| Find surfaces with similar area and curve count to given surfaces. | |
| print_surface_summary_stats () | |
| Print summary statistics for all surfaces in the model. | |
| get_volume_area (volume_id) | |
| Get the total surface area of a specified volume. | |
| get_volume_volume (vol_id) | |
| Get the enclosed volume of a specified volume. | |
| get_hydraulic_radius_volume_area (volume_id) | |
| Compute the hydraulic radius of a specified volume. | |
| get_similar_volumes (volume_ids, tol=1e-3, use_percent_tol=True) | |
| Find volumes with similar size and face count to given volumes. | |
| get_bounding_box (geometry_type, entity_id) | |
| Get the axis-aligned bounding box for a specified entity. | |
| get_total_bounding_box (geometry_type, entity_list) | |
| Get the combined bounding box for a list of entities. | |
| get_tight_bounding_box (geometry_type, entity_list) | |
| Get the tight bounding box for a list of entities. | |
| get_total_volume (volume_list) | |
| Get the total volume for a list of volumes. | |
| print_volume_summary_stats () | |
| Print summary statistics for all volumes in the model. | |
| get_center_point (entity_type, entity_id) | |
| Get the 3D center or coordinates of a specified entity. | |
| is_periodic (geometry_type, entity_id) | |
| Query whether a specified surface or curve is periodic. | |
| get_geometry_type (geom_type, ent_ids) | |
| Return the analytic geometry type for a list of surfaces or curves. | |
| get_distance_between_entities (geom_type_1, entity_id_1, geom_type_2, entity_id_2) | |
| Get the minimum distance between two geometry entities. | |
| is_point_contained (geometry_type, entity_id, xyz_point) | |
| Determine if a point is inside, outside, on, or unknown relative to a given entity. | |
| snap_locations_to_geometry (locations, entity_type, entity_id, tol) | |
| Snaps given XYZ locations to nearest points on specified entity. | |
| measure_between_entities (entity_type1, entity_id1, entity_type2, entity_id2) | |
| Returns the shortest distance between two geometry entities and their closest points. | |
| fire_ray (origin, direction, target_type, target_ids, max_hits=0, ray_radius=0.0) | |
| Fire a ray at a list of target entities and return the hit locations and entity ids. | |
| get_coordinate_systems_id_list () | |
| Returns a list of coordinate system IDs. | |
Geometry-Mesh Entity Support | |
| get_geometry_node_count (entity_type, entity_id) | |
| Get the number of mesh nodes on a geometric entity. | |
| get_vertex_node (vertex_id) | |
| Get the node ID owned by a vertex. | |
| get_curve_nodes (curve_id) | |
| Get the list of node IDs owned by a curve. | |
| get_curve_edges (curve_id) | |
| Get the list of edge element IDs on a curve. | |
| get_surface_nodes (surface_id) | |
| Get the list of node IDs owned by a surface. | |
| get_surface_quads (surface_id) | |
| Get the list of quadrilateral (quad) element IDs on a surface. | |
| get_surface_tris (surface_id) | |
| Get the list of triangle (tri) element IDs on a surface. | |
| get_volume_nodes (volume_id) | |
| Get the list of node IDs owned by a volume. | |
| get_volume_hexes (volume_id) | |
| Get the list of hexahedron (hex) IDs contained in a volume. | |
| get_volume_tets (volume_id) | |
| Get the list of tetrahedron (tet) IDs contained in a volume. | |
| get_volume_wedges (volume_id) | |
| Get the list of wedge IDs contained in a volume. | |
| get_volume_pyramids (volume_id) | |
| Get the list of pyramid IDs contained in a volume. | |
| get_surface_num_loops (surface_id) | |
| Get the number of loops on a surface. | |
| get_surface_loop_curves (surface_id) | |
| Get the curve IDs for each loop on a surface. | |
| get_surface_loop_nodes (surface_id) | |
| Get the ordered list of node IDs on the loops of a surface. | |
| get_entity_sense (source_type, source_id, sideset_id) | |
| Get the sense of an entity in a sideset. | |
| get_wrt_entity (source_type, source_id, sideset_id) | |
| Get the 'with-respect-to' entity of an item in a sideset. | |
| get_geometric_owner (mesh_entity_type, mesh_entity_list) | |
| Get geometric owners for a set of mesh entities. | |
| get_geometry_owner (entity_type, entity_id) | |
| Get the geometric owner of a mesh element. | |
| get_all_geometric_owners (mesh_entity_type, mesh_entity_list) | |
| Get the list of geometric owners for a set of mesh entities and their child entities. | |
Mesh Element Queries | |
| get_connectivity (entity_type, entity_id) | |
| Get the list of node IDs comprising a mesh element. | |
| get_expanded_connectivity (entity_type, entity_id) | |
| Get the list of node IDs for a mesh element, including interior nodes. | |
| get_sub_elements (entity_type, entity_id, dimension) | |
| Get the lower-dimensional entities of a higher-dimensional mesh element. | |
| get_node_exists (node_id) | |
| Check whether a node exists in the model. | |
| get_exodus_id (entity_type, entity_id) | |
| Get the Global Element ID for a mesh entity. | |
| get_element_exists (element_id) | |
| Check whether a global mesh element ID exists in the model. | |
| get_element_type (element_id) | |
| Get the specific mesh element type for a global element ID. | |
| get_element_type_id (element_id) | |
| Map a Global Element ID back to its local mesh entity ID. | |
| get_element_block (element_id) | |
| Get the block ID containing a given global element. | |
| get_global_element_id (element_type, id) | |
| Alias for get_exodus_id: get the Global Element ID for a local mesh entity. | |
| get_hex_global_element_id (hex_id) | |
| Get the Global Element ID for a specific hexahedral element. | |
| get_tet_global_element_id (tet_id) | |
| Get the Global Element ID for a specific tetrahedral element. | |
| get_wedge_global_element_id (wedge_id) | |
| Get the Global Element ID for a specific wedge element. | |
| get_pyramid_global_element_id (pyramid_id) | |
| Get the Global Element ID for a specific pyramid element. | |
| get_tri_global_element_id (tri_id) | |
| Get the Global Element ID for a specific triangular element. | |
| get_quad_global_element_id (quad_id) | |
| Get the Global Element ID for a specific quadrilateral element. | |
| get_edge_global_element_id (edge_id) | |
| Get the Global Element ID for a specific edge element. | |
| get_sphere_global_element_id (sphere_id) | |
| Get the Global Element ID for a specific node (SPHERE element). | |
| get_node_global_id (node_id) | |
| Get the global node ID assigned in the Exodus file for a mesh node. | |
| get_closest_node (x_coordinate, y_coordinate, z_coordinate) | |
| Find the mesh node closest to a given point. | |
| get_nodal_coordinates (node_id) | |
| Get the coordinates of a mesh node. | |
| get_node_faces (node_id) | |
| Get the IDs of all quadrilateral elements (faces) adjacent to a node. | |
| get_node_tris (node_id) | |
| Get the IDs of all triangular elements adjacent to a node. | |
| get_node_edges (node_id) | |
| Get the IDs of all edge elements adjacent to a node. | |
| get_node_position_fixed (node_id) | |
| Query whether a mesh node is fixed (constrained against smoothing). | |
| get_mesh_element_type (entity_type, entity_id) | |
| Get the mesh element type applied to a geometric entity. | |
Geometry Defeaturing Support | |
| get_small_curves (target_volume_ids, mesh_size) | |
| Find curves with edge length below a threshold within given volumes. | |
| get_smallest_curves (target_volume_ids, number_to_return) | |
| Return IDs of the smallest curves in the specified volumes. | |
| get_small_surfaces (target_volume_ids, area_threshold) | |
| Find surfaces with area below a given threshold. | |
| get_small_surfaces_HR (target_volume_ids, mesh_size) | |
| Python-callable version: identify small hydraulic-radius surfaces. | |
| is_narrow_surface (surface_id, mesh_size) | |
| Determine if any two non-adjacent edges on the surface form a narrow region. | |
| get_narrow_surfaces (target_volume_ids, mesh_size) | |
| Find surfaces with narrow regions in specified volumes. | |
| get_small_and_narrow_surfaces (target_ids, small_area, small_curve_size) | |
| Find surfaces that are either small in area or contain narrow regions. | |
| get_closed_narrow_surfaces (target_ids, narrow_size) | |
| Find faces on closed surfaces whose two boundary edges remain within a distance threshold. | |
| get_narrow_regions (target_ids, narrow_size) | |
| Find faces containing narrow regions within specified volumes. | |
| get_surfs_with_narrow_regions (target_ids, narrow_size) | |
| Find surfaces with narrow regions based on edge-pair orientation and proximity. | |
| is_close_loop_surface (surface_id, mesh_size) | |
| Check if a surface has multiple loops closer than a given threshold. | |
| get_close_loops (target_volume_ids, mesh_size) | |
| Find faces with multiple loops closer than a given threshold. | |
| get_close_loops_with_thickness (target_volume_ids, mesh_size, genus) | |
| Find faces with multiple loops closer than a threshold and return their minimum loop separations. | |
| get_close_loop_thickness (surface_id) | |
| Compute the minimum separation distance between loops on a surface. | |
| get_small_volumes (target_volume_ids, mesh_size) | |
| Find volumes whose size is below a threshold based on mesh size. | |
| is_chamfer_surface (surface_id, thickness_threshold) | |
| Determine if a face's underlying surface is a chamfer. | |
| get_chamfer_surfaces (target_volume_ids, thickness_threshold) | |
| Get the list of chamfer surfaces for a list of volumes. | |
| get_chamfer_chains (surface_id) | |
| Returns the chamfer chains for a given surface. | |
| get_chamfer_chain_collections (volume_list, thickness_threshold) | |
| Return collections of surfaces that form chamfer chains in the specified volumes. | |
| is_cylinder_surface (surface_id) | |
| Determine if a given face's underlying surface is a circular cylinder. | |
| is_blend_surface (surface_id) | |
| Determine if a face's underlying surface is a blend (fillet). | |
| get_blend_surfaces (target_volume_ids) | |
| Find blend (fillet) surfaces within specified volumes. | |
| get_small_radius_blend_surfaces (target_volume_ids, max_radius) | |
| Find blend surfaces with radius of curvature <= max_radius. | |
| get_blend_chains (surface_id) | |
| Returns the blend chains for a given surface. | |
| get_blend_chain_collections (volume_list, radius_threshold) | |
| Return collections of surfaces that form blend chains in the specified volumes. | |
| is_cone_surface (surface_id) | |
| Determine whether a surface is a cone. | |
| find_cone_surfaces (surface_id) | |
| Identify cone surface(s) starting from a candidate surface. | |
| get_cone_surfaces (target_volume_ids) | |
| Identify full conical surfaces in given volumes. | |
| get_surface_cone_collections (volume_list, radius_threshold=0.0) | |
| Identify collections of surfaces that comprise cones in specified volumes. | |
| is_cavity_surface (surface_id) | |
| Return whether the specified surface is part of a cavity. | |
| get_cavity_surfaces (surface_id) | |
| Return the surfaces in the cavity adjacent to the specified surface. | |
| get_protrusion_surfaces (surface_id) | |
| Return the surfaces in the protrusion connected to the specified surface. | |
| is_protrusion_surface (surface_id) | |
| Return whether the specified surface is part of a protrusion. | |
| get_surface_cavity_collections (volume_list, area_threshold=-1, angle_tolerance=-1, combine_cavities=True) | |
| Return collections of surfaces that form cavities in the specified volumes. | |
| get_surface_protrusion_collections (volume_list, area_threshold=-1, angle_tolerance=-1, combine_protrusions=True) | |
| Return collections of surfaces that form protrusions in the specified volumes. | |
| is_hole_surface (surface_id, radius_threshold) | |
| Return whether the specified surface is part of a hole. | |
| get_hole_surfaces (surface_id) | |
| Return the surfaces in the hole adjacent to the specified surface. | |
| get_surface_hole_collections (volume_list, radius_threshold) | |
| Return collections of surfaces that form holes in the specified volumes. | |
| is_continuous_surface (surface_id, angle_tol) | |
| Return whether the surface has any adjacent continuous surfaces. | |
| get_continuous_surfaces (surface_id, angle_tol) | |
| Return the list of adjacent continuous surfaces. | |
| get_continuous_curves (curve_id, angle_tol, require_two_valent=False) | |
| Return the list of adjacent continuous curves. | |
| get_continuous_curve_collections (volume_list, angle_tolerance=-1) | |
| Returns collections of continuous curves in the given volumes. | |
| get_continuous_surface_collections (volume_list, angle_tolerance=-1) | |
| Returns collections of continuous surfaces in the given volumes. | |
| get_sharp_angle_vertices (target_volume_ids, upper_bound, lower_bound) | |
| Identify vertices at sharp curve angles in a set of volumes. | |
| get_blunt_tangency_default_depth (vert_id, angle, add_material) | |
| Computes the default depth used to blunt a tangency at a vertex. | |
| get_tangential_intersections (target_volume_ids, upper_bound, lower_bound) | |
| Find surfaces with tangential intersection angles outside specified bounds. | |
| get_coincident_vertices (target_volume_ids, high_tolerance) | |
| Find vertex pairs within a specified tolerance across given volumes. | |
| get_close_vertex_curve_pairs (target_volume_ids, high_tolerance) | |
| Find pairs of vertices and curves within a specified tolerance across given volumes. | |
| get_overlapping_surfaces_in_bodies (body_ids, filter_slivers=False) | |
| Identify overlapping surfaces between different volumes in a set of bodies. | |
| find_overlapping_curves (curve_ids) | |
| Identify overlapping curves in a specified list of curves. | |
| get_gaps_between_volumes (target_volume_ids, maximum_gap_tolerance, maximum_gap_angle, cache_overlaps=0) | |
| Identify gaps between surfaces in a list of volumes. | |
| get_overlapping_volumes (target_volume_ids) | |
| Identify overlapping volumes in a list of volumes. | |
| get_overlapping_volumes_at_volume (volume_id, compare_volumes) | |
| Identify volumes in the model that overlap a single target volume. | |
| get_overlapping_surfaces_at_surface (surface_id, compare_volumes, cache_overlaps=0) | |
| Identify surfaces in the model that overlap a single target surface. | |
| get_overlap_max_gap () | |
| Get the current maximum gap tolerance used for calculating surface overlaps. | |
| set_overlap_max_gap (maximum_gap) | |
| Set the maximum gap tolerance for calculating surface overlaps. | |
| get_overlap_min_gap () | |
| Get the current minimum gap tolerance used for calculating surface overlaps. | |
| set_overlap_min_gap (min_gap) | |
| Set the minimum gap tolerance for calculating surface overlaps. | |
| get_overlap_max_angle () | |
| Get the current maximum angle tolerance used for calculating surface overlaps. | |
| set_overlap_max_angle (maximum_angle) | |
| Set the maximum angle tolerance for calculating surface overlaps. | |
| get_nearby_entities (gtype, ent_ids, compare_ents, distance) | |
| Identify nearby entities of type curve, surface, or volume for a given list of the same type. | |
| get_nearby_volumes_at_volume (volume_id, compare_volumes, distance) | |
| Get the list of nearby volumes from the model for a single volume :type volume_id: int. | |
| get_unmerged_curves_on_shells (shell_vols, thickness) | |
| Identify unmerged curves between sheet (shell) volumes for use in shell construction workflows. | |
| get_mergeable_vertices (target_volume_ids) | |
| Get the list of mergeable vertices from a list of volumes or bodies. | |
| get_mergeable_curves (target_volume_ids) | |
| Get the list of mergeable curves from a list of volumes or bodies. | |
| get_mergeable_surfaces (target_volume_ids) | |
| Get the list of mergeable surfaces from a list of volumes or bodies. | |
| get_merge_tolerance () | |
| Return the current merge tolerance value. | |
Geometry ITEM Solutions | |
| get_solutions_for_close_loop (surface_id, mesh_size) | |
| Retrieve recommended remedies for a close-loop surface to resolve narrow regions. | |
| get_solutions_for_near_coincident_vertices (vertex_id_1, vertex_id_2) | |
| Provide remedies for two nearly coincident vertices on different volumes to resolve gaps or misalignments. | |
| get_solutions_for_bad_geometry (geom_type, geom_id) | |
| Provide remedy for bad geometry via ACIS healing (deprecated). | |
| get_solutions_for_overlapping_volumes (volume_id_1, volume_id_2, maximum_gap_tolerance, maximum_gap_angle) | |
| Provide remedies for two overlapping volumes based on gap and angular tolerances. | |
| get_solutions_for_overlapping_surfaces (surface_id_1, surface_id_2) | |
| Suggests remedies for two overlapping surfaces on different volumes. | |
| get_volume_gap_solutions (surface_id_1, surface_id_2) | |
| Suggests remedies for a gap between two surfaces on different volumes. | |
| get_solutions_for_near_coincident_vertex_and_curve (vertex_id, curve_id) | |
| Suggests remedies when a vertex lies nearly on a curve from a different volume. | |
| get_solutions_for_near_coincident_vertex_and_surface (vertex_id, surface_id) | |
| Suggests remedies when a vertex lies nearly on a surface from a different volume. | |
| get_solutions_for_imprint_merge (surface_id1, surface_id2) | |
| Suggests remedies for imprint/merge when two overlapping surfaces are on different volumes. | |
| get_solutions_for_volumes (vol_id, small_curve_size, mesh_size) | |
| Recommend remediation operations for volumes with features below a size threshold. | |
| get_solutions_for_classified_volume (classification, vol_id) | |
| Suggests geometry fixes or feature operations for a volume based on its classification. | |
| get_solutions_for_bolt (bolt_id, insert_id, threaded_vol_id) | |
| Suggests operations for a volume classified as a bolt using known subcomponent IDs. | |
| get_solutions_for_bolt_hole (bearing_hole, threaded_holes) | |
| Suggests repair or modification options for a set of concentric fastener pilot holes. | |
| get_solutions_for_classified_surface (classification, surf_id) | |
| Suggests remedies or modifications for a classified surface. | |
| get_solutions_for_thin_volume (vol_id, near_vols, include_weights=False, include_type=False) | |
| Generate candidate operations to reduce a thin volume into a sheet body. | |
| get_solutions_for_sheet_volumes (vol_ids, thickness) | |
| Propose surface-extension and imprint/merge operations to connect sheet bodies. | |
| get_solutions_for_sheet_volume_connection (*args, **kwargs) | |
| Propose surface-tweak, imprint, and merge operations to bridge two sheet-volume sets. | |
| get_solutions_for_small_surfaces (surface_id, small_curve_size, mesh_size) | |
| Recommend remedial operations on a surface already flagged as small. | |
| get_solutions_for_connected_surfaces (surf_ids, common_surface_type) | |
| Propose two operations for a connected set of surfaces. | |
| get_solutions_for_small_curves (curve_id, small_curve_size, mesh_size) | |
| Recommend remedial operations on a curve already flagged as small. | |
| get_solutions_for_sharp_angle_vertex (vertex_id, small_curve_size, mesh_size) | |
| Retrieve recommended remedies for a sharp angle at a vertex. | |
| get_solutions_for_surfaces_with_narrow_regions (surface_id, small_curve_size, mesh_size) | |
| Recommend operations to eliminate narrow regions on a surface identified as narrow. | |
| get_solutions_for_cone_surface (surface_id) | |
| Suggests remedies for a surface classified as a cone. | |
| get_solutions_for_decomposition (volume_list, exterior_angle, do_imprint_merge, tolerant_imprint) | |
| Provide possible decomposition solutions for volumes based on exterior angle criteria. | |
| get_solutions_for_blends (surface_id) | |
| Provide possible blend removal solutions for a given surface (and its blend chain if applicable). | |
| get_solutions_for_chamfers (surface_id) | |
| Provide possible chamfer removal solutions for a given surface (and its chamfer chain if applicable). | |
| get_solutions_for_cavity_surface (surface_id) | |
| Provide possible cavity removal or adjustment solutions for a given surface (and its cavity if applicable). | |
| get_solutions_for_protrusion_surface (surface_id) | |
| Provide possible protrusion removal or adjustment solutions for a given surface (and its protrusion if applicable). | |
| get_mesh_error_solutions (error_code) | |
| Retrieve recommended solutions and context cues for a mesh error. | |
Geometry Idealization Support | |
| get_reduce_bolt_core_default_dimensions (vol_id) | |
| Computes default core dimensions for a bolt volume in reduce bolt core operation. | |
| get_bolt_diameters (vol_ids) | |
| Get the shank diameters of specified bolt volumes. | |
| get_bolt_axis (vol_id) | |
| Get the normalized axis vector of a bolt volume. | |
| get_bolt_shigley_radius (bolt_id, angle, washer_id=0) | |
| Get the equivalent Shigley frustum radius at the bolt interface. | |
| get_bolt_washer (bolt_id) | |
| Get the washer volume ID associated with a given bolt. | |
| get_bolt_coordinate_system (geom_type, id) | |
| Get local coordinate system for a bolt or bolt hole. | |
| get_bolt_clamped_members (vol_ids, nearby_vols, progress=None) | |
| Identify clamped members associated with a bolt. | |
| get_bolts_in_clamped_members (geo_type, clamped_vols, candidate_bolts) | |
| Identify bolts clamping the given volumes or blocks. | |
| get_bolt_holes_info (geo_type, clamped_members, radius_threshold, gap_threshold) | |
| Identify concentric pilot holes across clamped members. | |
| get_bolt_holes (geo_type, clamped_members, radius_threshold, gap_threshold) | |
| Identify upper and lower pilot hole surfaces from clamped members. | |
| get_2D_sheet_volumes (vol_id) | |
| Get associated 2D sheet volumes from a reduced 3D thin volume. | |
| get_3D_thin_volume (vol_id) | |
| Get the original 3D thin volume associated with a 2D sheet volume. | |
Blocks, Sidesets, and Nodesets | |
| get_block_count () | |
| Get the current number of element blocks in the model. | |
| get_block_id (entity_type, entity_id) | |
| Get the element block ID associated with a geometric entity. | |
| get_block_name (block_id) | |
| Get the block name for a given block id. | |
| get_block_ids (mesh_geometry_file_name) | |
| Get list of block IDs from a mesh geometry file. | |
| get_block_id_list () | |
| Get a list of all active block IDs. | |
| get_next_block_id () | |
| Get the next available block ID. | |
| get_block_volumes (block_id) | |
| Get the list of volume IDs contained in a block. | |
| get_block_surfaces (block_id) | |
| Get the list of surface IDs contained in a block. | |
| get_block_curves (block_id) | |
| Get the list of curve IDs contained in a block. | |
| get_block_vertices (block_id) | |
| Get the list of vertex IDs contained in a block. | |
| get_block_nodes (block_id) | |
| Get the list of node IDs contained in a block. | |
| get_block_edges (block_id) | |
| Get the list of edge IDs contained in a block. | |
| get_block_tris (block_id) | |
| Get the list of triangle (tri) IDs contained in a block. | |
| get_block_faces (block_id) | |
| Get the list of face IDs contained in a block. | |
| get_block_pyramids (block_id) | |
| Get the list of pyramid IDs contained in a block. | |
| get_block_wedges (block_id) | |
| Get the list of wedge IDs contained in a block. | |
| get_block_tets (block_id) | |
| Get the list of tetrahedron (tet) IDs contained in a block. | |
| get_block_hexes (block_id) | |
| Get the list of hexahedron (hex) IDs contained in a block. | |
| get_block_element_type (block_id) | |
| Get the element type associated with a block. | |
| get_block_attribute_count (block_id) | |
| Get the number of attributes assigned to a block. | |
| get_block_element_attribute_count (block_id) | |
| Get the number of attributes defined for elements in the specified block. | |
| get_block_attribute_value (block_id, attribute_index) | |
| Get the value of a specific attribute for a block. | |
| get_block_attribute_name (block_id, attribute_index) | |
| Get the name of a specific attribute for a block. | |
| get_block_element_attribute_names (block_id) | |
| Get the list of attribute names associated with block elements. | |
| get_valid_block_element_types (block_id) | |
| Get a list of valid element types for the specified block. | |
| get_block_material (block_id) | |
| Get the ID of the material assigned to the specified block. | |
| get_blocks_with_materials () | |
| Get all block IDs and their associated material IDs. | |
| get_sideset_count () | |
| Get the current number of sidesets in the model. | |
| get_sideset_id_list () | |
| Get a list of all active sideset IDs. | |
| get_next_sideset_id () | |
| Get the next available sideset ID. | |
| get_sideset_curves (sideset_id) | |
| Get the list of curve IDs associated with a sideset. | |
| get_sideset_edges (sideset_id) | |
| Get the list of edge IDs contained in a sideset. | |
| get_sideset_surfaces (sideset_id) | |
| Get the list of surface IDs contained in a sideset. | |
| get_sideset_quads (sideset_id) | |
| Get the list of quadrilateral (quad) element IDs contained in a sideset. | |
| get_sideset_tris (sideset_id) | |
| Get the list of triangle (tri) element IDs contained in a sideset. | |
| get_sideset_area (sideset_id) | |
| Get the total area of a sideset. | |
| get_sideset_element_type (sideset_id) | |
| Get the element type of a sideset. | |
| get_sideset_contact_pairs (geom_type, ent_list, geom_tol=-1.0) | |
| Identify sideset-based contact interfaces and return compact integer interaction records. | |
| get_nodeset_count () | |
| Get the current number of nodesets in the model. | |
| get_nodeset_id_list () | |
| Get a list of all active nodeset IDs. | |
| get_next_nodeset_id () | |
| Get the next available nodeset ID. | |
| get_nodeset_volumes (nodeset_id) | |
| Get the list of volume IDs associated with a nodeset. | |
| get_nodeset_surfaces (nodeset_id) | |
| Get the list of surface IDs associated with a nodeset. | |
| get_nodeset_curves (nodeset_id) | |
| Get the list of curve IDs associated with a nodeset. | |
| get_nodeset_vertices (nodeset_id) | |
| Get the list of vertex IDs associated with a nodeset. | |
| get_nodeset_nodes (nodeset_id) | |
| Get the list of node IDs explicitly assigned to a nodeset. | |
| get_nodeset_nodes_inclusive (nodeset_id) | |
| Get the list of node IDs associated with a nodeset (inclusive). | |
| get_nodeset_node_count (nodeset_id) | |
| Get the number of nodes in a nodeset. | |
| get_exodus_element_count (entity_id, entity_type) | |
| Get the number of elements in a Exodus entity. | |
| get_exodus_entity_name (entity_type, entity_id) | |
| Get the name of an Exodus entity. | |
| get_exodus_entity_type (entity_type, entity_id) | |
| Get the Exodus type of an entity. | |
| get_exodus_entity_description (entity_type, entity_id) | |
| Get the description of an Exodus entity. | |
| get_all_exodus_times (filename) | |
| Get all available time steps from an Exodus file. | |
| get_exodus_variable_names (container_type, container_id) | |
| Get the names of Exodus variables in a nodeset, sideset, or block. | |
| get_all_exodus_variable_names (filename, variable_type) | |
| Get all variable names of a given type from an Exodus file. | |
| get_exodus_variable_count (container_type, container_id) | |
| Get the number of Exodus variables in a nodeset, sideset, or block. | |
| get_copy_nodeset_on_geometry_copy_setting () | |
| Get the current nodeset behavior setting for geometry copy. | |
| get_copy_sideset_on_geometry_copy_setting () | |
| Get the current sideset behavior setting for geometry copy. | |
| get_copy_block_on_geometry_copy_setting () | |
| Get the current block behavior setting for geometry copy. | |
| set_copy_nodeset_on_geometry_copy_setting (val) | |
| Set the behavior for nodeset propagation during geometry copy. | |
| set_copy_sideset_on_geometry_copy_setting (val) | |
| Set the behavior for sideset propagation during geometry copy. | |
| set_copy_block_on_geometry_copy_setting (val) | |
| Set the behavior for block propagation during geometry copy. | |
Group Support | |
| get_group_groups (group_id) | |
| Retrieve direct child group IDs for a specified parent group, if any. | |
| get_group_volumes (group_id) | |
| Return direct child volume IDs for a specified group, if any. | |
| get_group_bodies (group_id) | |
| Return direct child body IDs for a specified group, if any. | |
| get_group_surfaces (group_id) | |
| Return direct child surface IDs for a specified group, if any. | |
| get_group_curves (group_id) | |
| Return direct child curve IDs for a specified group, if any. | |
| get_group_vertices (group_id) | |
| Return direct child vertex IDs for a specified group, if any. | |
| get_group_nodes (group_id) | |
| Return direct child node IDs for a specified group, if any. | |
| get_group_edges (group_id) | |
| Return direct child edge IDs for a specified group, if any. | |
| get_group_quads (group_id) | |
| Return direct child quad IDs for a specified group, if any. | |
| get_group_tris (group_id) | |
| Return direct child triangle IDs for a specified group, if any. | |
| get_group_tets (group_id) | |
| Return direct child tetrahedron IDs for a specified group, if any. | |
| get_group_wedges (group_id) | |
| Return direct child wedge element IDs for a specified group, if any. | |
| get_group_pyramids (group_id) | |
| Return direct child pyramid element IDs for a specified group, if any. | |
| get_group_spheres (group_id) | |
| Return direct child sphere element IDs for a specified group, if any. | |
| get_group_hexes (group_id) | |
| Return direct child hexahedral element IDs for a specified group, if any. | |
| get_next_group_id () | |
| Return the next available group ID from Cubit. | |
| delete_all_groups () | |
| Remove all groups from the current Cubit session. | |
| delete_group (group_id) | |
| Delete a specific group by ID. | |
| set_max_group_id (maximum_group_id) | |
| Reset Cubit's internal maximum group ID to a specified value. | |
| create_new_group () | |
| Create a new, empty group and return its ID. | |
| remove_entity_from_group (group_id, entity_id, entity_type) | |
| Remove a specific entity from a given group. | |
| add_entity_to_group (group_id, entity_id, entity_type) | |
| Add a specific entity to a given group. | |
| add_entities_to_group (group_id, entity_ids, entity_type) | |
| Add a list of entities to a specified group. | |
| group_names_ids () | |
| Retrieve names and IDs of all defined groups (excluding the pick group). | |
| get_mesh_group_parent_ids (element_type, element_id) | |
| Retrieve parent group IDs for a specific mesh element. | |
| is_mesh_element_in_group (element_type, element_id) | |
| Check if a specific mesh element belongs to any group. | |
Metadata Support | |
| get_assembly_classification_level () | |
| Get classification level metadata. | |
| get_assembly_classification_category () | |
| Get classification category metadata. | |
| get_assembly_weapons_category () | |
| Get weapons category metadata. | |
| get_assembly_metadata (volume_id, data_type) | |
| Get metadata for a specified volume. | |
| is_assembly_metadata_attached (volume_id) | |
| Check if metadata is attached to a volume. | |
| get_assembly_name (assembly_id) | |
| Get the name of an assembly node. | |
| get_assembly_path (assembly_id) | |
| Get the full path of an assembly node, identifying its hierarchy. | |
| get_assembly_type (assembly_id) | |
| Get the type of an assembly node ("part" or "assembly"). | |
| get_parent_assembly_path (assembly_id) | |
| Get the path of an assembly node's parent. | |
| get_assembly_level (assembly_id) | |
| Get the hierarchy level of an assembly node. | |
| get_assembly_description (assembly_id) | |
| Get the description of an assembly node. | |
| get_assembly_instance (assembly_id) | |
| Get the instance number of an assembly node. | |
| get_parent_assembly_instance (assembly_id) | |
| Get the instance number of the parent of an assembly node. | |
| get_assembly_file_format (assembly_id) | |
| Get the file format from which the assembly node was imported. | |
| get_assembly_units (assembly_id) | |
| Get the units of measurement used in the assembly node. | |
| get_assembly_material_description (assembly_id) | |
| Get the material description for a part. | |
| get_assembly_material_specification (assembly_id) | |
| Get the material specification for a part. | |
Non-Exodus Boundary Condition Support | |
| get_bc_id_list (bc_type_enum) | |
| Get active boundary condition (BC) IDs of a specified type. | |
| get_bc_name (bc_type_enum, bc_id) | |
| Get the name of a specific boundary condition (BC). | |
| get_nodeset_id_list_for_bc (bc_type_enum, bc_id) | |
| Get list of nodeset IDs associated with a boundary condition. | |
| get_sideset_id_list_for_bc (bc_type_enum, bc_id) | |
| Get list of sideset IDs associated with a boundary condition. | |
| is_on_thin_shell (bc_type_enum, entity_id) | |
| Check if a boundary condition is applied to a thin shell. | |
| temperature_is_on_solid (bc_type_enum, entity_id) | |
| Check if a temperature BC is applied to a solid region. | |
| convection_is_on_solid (entity_id) | |
| Check if a convection BC is on a solid. | |
| convection_is_on_shell_area (entity_id, shell_area_enum) | |
| Check if a convection BC is on a shell top or bottom. | |
| get_convection_coefficient (entity_id, bc_type_enum) | |
| Get convection coefficient from a convection BC. | |
| get_bc_temperature (bc_type_enum, entity_id, temp_type_enum) | |
| Get the temperature value for a specified BC area. | |
| temperature_is_on_shell_area (bc_type_enum, bc_area_enum, entity_id) | |
| Check if a temperature BC is on a shell area. | |
| heatflux_is_on_shell_area (bc_area_enum, entity_id) | |
| Check if a heatflux BC is on a shell area. | |
| get_heatflux_on_area (bc_area_enum, entity_id) | |
| Get the heatflux value on a specified area. | |
| get_cfd_type (entity_id) | |
| Get the CFD boundary condition subtype. | |
| get_contact_pair_friction_value (entity_id) | |
| Get the friction value for a contact pair. | |
| get_contact_pair_tolerance_value (entity_id) | |
| Get the upper bound tolerance for a contact pair. | |
| get_contact_pair_tol_lower_value (entity_id) | |
| Get the lower bound tolerance for a contact pair. | |
| get_contact_pair_tied_state (entity_id) | |
| Get the tied state of a contact pair. | |
| get_contact_pair_general_state (entity_id) | |
| Get the general contact state. | |
| get_contact_pair_exterior_state (entity_id) | |
| Get the exterior state of a contact pair. | |
| get_velocity_combine_type (entity_id) | |
| Get the velocity's combine type. | |
| get_acceleration_combine_type (entity_id) | |
| Get the combine method for an acceleration BC. | |
| get_displacement_combine_type (entity_id) | |
| Get the combine method for a displacement BC. | |
| get_pressure_value (entity_id) | |
| Get the magnitude value of a pressure BC. | |
| get_pressure_function (entity_id) | |
| Get the function expression associated with a pressure BC. | |
| get_force_magnitude (entity_id) | |
| Get the force magnitude of a force BC. | |
| get_moment_magnitude (entity_id) | |
| Get the moment magnitude of a force BC. | |
| get_force_direction_vector (entity_id) | |
| Get the direction vector of a force BC. | |
| get_force_moment_vector (entity_id) | |
| Get the moment vector of a force BC. | |
| get_constraint_type (constraint_id) | |
| Get the type of a specified constraint. | |
| get_constraint_reference_point (constraint_id) | |
| Get the reference point of a specified constraint. | |
| get_constraint_dependent_entity_point (constraint_id) | |
| Get the dependent entity of a specified constraint. | |
| get_material_property (material_property_enum, entity_id) | |
| Get the value of a material property. | |
| get_media_property (entity_id) | |
| Get the media classification of a material. | |
| get_media_name_list () | |
| Get list of all CFD media names. | |
| get_material_name_list () | |
| Get list of all material names. | |
| get_material_name (material_id) | |
| Get the name of a material or CFD media by ID. | |
Boundary Layer Support | |
| get_next_boundary_layer_id () | |
| Get the next available boundary layer ID. | |
| is_boundary_layer_id_available (boundary_layer_id) | |
| Check if a boundary layer ID is currently available. | |
| get_boundary_layer_algorithm (boundary_layer_id) | |
| Get the algorithm type used by the specified boundary layer. | |
| get_boundary_layers_by_base (base_type, base_id) | |
| Get all boundary layers associated with a specified base entity. | |
| get_boundary_layers_by_pair (base_type, base_id, parent_id) | |
| Get all boundary layers associated with a base-parent pair. | |
| get_boundary_layer_continuity (boundary_layer_id) | |
| Get the continuity setting of a boundary layer. | |
| get_boundary_layer_id_list () | |
| Get a list of all defined boundary layer IDs. | |
Machine Learning Support | |
| load_ML (*args, **kwargs) | |
| Load machine learning training data into memory. | |
| unload_ML (*args, **kwargs) | |
| Unload machine learning training data from memory. | |
| get_ML_operation_features (ml_op_names, entity1_ids, entity2_ids, params, user_configs, mesh_size, reduced_features=False) | |
| Compute ML feature vectors for a list of Cubit operations. | |
| get_ML_features (ml_op_names, entity1_ids, entity2_ids, params, user_configs, mesh_size, reduced_features=False) | |
| Compute ML feature vectors for operations permitting multiple entities. | |
| get_ML_predictions (ml_op_names, entity1_ids, entity2_ids, params, user_configs, mesh_size, reduced_features=False) | |
| Compute ML predictions for a list of operations on single-entity pairs. | |
| do_ML_predictions (ml_op_names, entity1_ids, entity2_ids, params, user_configs, mesh_size, reduced_features=False) | |
| Compute ML predictions for a list of operations with multiple entities. | |
| get_ML_classification (geom_type, ent_id) | |
| Get the top classification label for a single volume or surface. | |
| get_ML_classifications (geom_type, ent_ids) | |
| Classify multiple volumes or surfaces in a single batch operation. | |
| get_ML_classification_categories (geom_type) | |
| Retrieve all available classification categories for a geometry type. | |
| ML_train (geom_type) | |
| Force retraining of the ML classification model for a specific geometry type. | |
| get_ML_operation_feature_types (ml_op_name, reduced_features=False) | |
| Get the data-type descriptor for each feature of a specified ML operation. | |
| get_ML_operation_feature_names (ml_op_name, reduced_features=False) | |
| Retrieve the list of feature names for a specified ML operation. | |
| get_ML_operation_feature_size (ml_op_name, reduced_features=False) | |
| Retrieve the expected feature-vector length for a given ML operation. | |
| get_ML_operation_label_size (ml_op_name) | |
| Retrieve the expected label vector length for a given ML operation. | |
| get_ML_classification_models () | |
| Retrieve the list of supported classification ML model names. | |
| get_ML_regression_models () | |
| Retrieve the list of supported regression ML model names. | |
| get_ML_model_name (model_ID) | |
| Retrieve the name of an ML model based on its ID. | |
| get_ML_model_ID (model_name) | |
| Retrieve the unique numeric ID for a given ML model or operation name. | |
| get_ML_operation (op_name, entity_id1, entity_id2, params, user_configs, small_curve_size, mesh_size) | |
| Generate the command, display label, and preview text for an ML operation. | |
| get_ML_feature_importances (op_name) | |
| Retrieve feature importance scores for a given ML operation. | |
| get_ML_feature_distance (op_name, f1, f2) | |
| Compute the weighted distance between two feature vectors. | |
| set_ML_base_user_dir (path, print_info=False) | |
| Set the root directory for user-provided ML training data (classification only). | |
| get_ML_initialize_surviving_entities (op_name, ent1, ent2) | |
| Capture entities for survival tracking before a CAD operation. | |
| get_ML_surviving_entities (op_name, begin_ents) | |
| Identify which entities survive after a CAD operation. | |
Variables | |
| BAR = _cubit3.BAR | |
| BAR2 = _cubit3.BAR2 | |
| BAR3 = _cubit3.BAR3 | |
| BEAM = _cubit3.BEAM | |
| BEAM2 = _cubit3.BEAM2 | |
| BEAM3 = _cubit3.BEAM3 | |
| CI_BCENTITY_CC = _cubit3.CI_BCENTITY_CC | |
| CI_BCENTITY_CC_SHELL_BOTTOM = _cubit3.CI_BCENTITY_CC_SHELL_BOTTOM | |
| CI_BCENTITY_CC_SHELL_TOP = _cubit3.CI_BCENTITY_CC_SHELL_TOP | |
| CI_BCENTITY_FIRST = _cubit3.CI_BCENTITY_FIRST | |
| CI_BCENTITY_LAST = _cubit3.CI_BCENTITY_LAST | |
| CI_BCENTITY_SHELL_AREA_BOTTOM = _cubit3.CI_BCENTITY_SHELL_AREA_BOTTOM | |
| CI_BCENTITY_SHELL_AREA_GRADIENT = _cubit3.CI_BCENTITY_SHELL_AREA_GRADIENT | |
| CI_BCENTITY_SHELL_AREA_MIDDLE = _cubit3.CI_BCENTITY_SHELL_AREA_MIDDLE | |
| CI_BCENTITY_SHELL_AREA_TOP = _cubit3.CI_BCENTITY_SHELL_AREA_TOP | |
| CI_BCENTITY_SOLID_HEATFLUX = _cubit3.CI_BCENTITY_SOLID_HEATFLUX | |
| CI_BCENTITY_SOLID_TEMP = _cubit3.CI_BCENTITY_SOLID_TEMP | |
| CI_BCENTITY_TEMP = _cubit3.CI_BCENTITY_TEMP | |
| CI_BCENTITY_UNKNOWN = _cubit3.CI_BCENTITY_UNKNOWN | |
| CI_BCTYPE_ACCELERATION = _cubit3.CI_BCTYPE_ACCELERATION | |
| CI_BCTYPE_AXIS = _cubit3.CI_BCTYPE_AXIS | |
| CI_BCTYPE_CONSTRAINT = _cubit3.CI_BCTYPE_CONSTRAINT | |
| CI_BCTYPE_CONTACT_PAIR = _cubit3.CI_BCTYPE_CONTACT_PAIR | |
| CI_BCTYPE_CONTACT_REGION = _cubit3.CI_BCTYPE_CONTACT_REGION | |
| CI_BCTYPE_CONVECTION = _cubit3.CI_BCTYPE_CONVECTION | |
| CI_BCTYPE_DISPLACEMENT = _cubit3.CI_BCTYPE_DISPLACEMENT | |
| CI_BCTYPE_EXHAUSTFAN = _cubit3.CI_BCTYPE_EXHAUSTFAN | |
| CI_BCTYPE_FAN = _cubit3.CI_BCTYPE_FAN | |
| CI_BCTYPE_FIRST = _cubit3.CI_BCTYPE_FIRST | |
| CI_BCTYPE_FORCE = _cubit3.CI_BCTYPE_FORCE | |
| CI_BCTYPE_GAP = _cubit3.CI_BCTYPE_GAP | |
| CI_BCTYPE_HEATFLUX = _cubit3.CI_BCTYPE_HEATFLUX | |
| CI_BCTYPE_INLETVENT = _cubit3.CI_BCTYPE_INLETVENT | |
| CI_BCTYPE_INTAKEFAN = _cubit3.CI_BCTYPE_INTAKEFAN | |
| CI_BCTYPE_INTERFACE = _cubit3.CI_BCTYPE_INTERFACE | |
| CI_BCTYPE_INTERIOR = _cubit3.CI_BCTYPE_INTERIOR | |
| CI_BCTYPE_LAST = _cubit3.CI_BCTYPE_LAST | |
| CI_BCTYPE_LUMPMASS = _cubit3.CI_BCTYPE_LUMPMASS | |
| CI_BCTYPE_MASSFLOWINLET = _cubit3.CI_BCTYPE_MASSFLOWINLET | |
| CI_BCTYPE_MATERIAL = _cubit3.CI_BCTYPE_MATERIAL | |
| CI_BCTYPE_MEDIA = _cubit3.CI_BCTYPE_MEDIA | |
| CI_BCTYPE_MPC = _cubit3.CI_BCTYPE_MPC | |
| CI_BCTYPE_OUTFLOW = _cubit3.CI_BCTYPE_OUTFLOW | |
| CI_BCTYPE_OUTLETVENT = _cubit3.CI_BCTYPE_OUTLETVENT | |
| CI_BCTYPE_PERIODIC = _cubit3.CI_BCTYPE_PERIODIC | |
| CI_BCTYPE_PERIODICSHADOW = _cubit3.CI_BCTYPE_PERIODICSHADOW | |
| CI_BCTYPE_POROUSJUMP = _cubit3.CI_BCTYPE_POROUSJUMP | |
| CI_BCTYPE_PRESSURE = _cubit3.CI_BCTYPE_PRESSURE | |
| CI_BCTYPE_PRESSUREFARFIELD = _cubit3.CI_BCTYPE_PRESSUREFARFIELD | |
| CI_BCTYPE_PRESSUREINLET = _cubit3.CI_BCTYPE_PRESSUREINLET | |
| CI_BCTYPE_PRESSUREOUTLET = _cubit3.CI_BCTYPE_PRESSUREOUTLET | |
| CI_BCTYPE_RADIATOR = _cubit3.CI_BCTYPE_RADIATOR | |
| CI_BCTYPE_RIGIDBODY = _cubit3.CI_BCTYPE_RIGIDBODY | |
| CI_BCTYPE_SPRING = _cubit3.CI_BCTYPE_SPRING | |
| CI_BCTYPE_SUPERSONICINFLOW = _cubit3.CI_BCTYPE_SUPERSONICINFLOW | |
| CI_BCTYPE_SUPERSONICOUTFLOW = _cubit3.CI_BCTYPE_SUPERSONICOUTFLOW | |
| CI_BCTYPE_SYMMETRY = _cubit3.CI_BCTYPE_SYMMETRY | |
| CI_BCTYPE_TEMPERATURE = _cubit3.CI_BCTYPE_TEMPERATURE | |
| CI_BCTYPE_UNKNOWN = _cubit3.CI_BCTYPE_UNKNOWN | |
| CI_BCTYPE_VELOCITY = _cubit3.CI_BCTYPE_VELOCITY | |
| CI_BCTYPE_VELOCITYINLET = _cubit3.CI_BCTYPE_VELOCITYINLET | |
| CI_BCTYPE_WALL = _cubit3.CI_BCTYPE_WALL | |
| CI_CONDUCTIVITY = _cubit3.CI_CONDUCTIVITY | |
| CI_DENSITY = _cubit3.CI_DENSITY | |
| CI_ERROR = cvar.CI_ERROR | |
| CI_MATERIAL_FIRST = _cubit3.CI_MATERIAL_FIRST | |
| CI_MATERIAL_LAST = _cubit3.CI_MATERIAL_LAST | |
| CI_MATERIAL_UNKNOWNPROPERTY = _cubit3.CI_MATERIAL_UNKNOWNPROPERTY | |
| CI_MODULUS = _cubit3.CI_MODULUS | |
| CI_POISSON = _cubit3.CI_POISSON | |
| CI_SHEAR_MODULUS = _cubit3.CI_SHEAR_MODULUS | |
| CI_SPECIFIC_HEAT = _cubit3.CI_SPECIFIC_HEAT | |
| CI_THERMAL_EXPANSION = _cubit3.CI_THERMAL_EXPANSION | |
| CI_ULTIMATE_STRAIN = _cubit3.CI_ULTIMATE_STRAIN | |
| CI_ULTIMATE_STRENGTH = _cubit3.CI_ULTIMATE_STRENGTH | |
| CI_YIELD_STRENGTH = _cubit3.CI_YIELD_STRENGTH | |
| CUBIT_TRI = _cubit3.CUBIT_TRI | |
| CURVE = _cubit3.CURVE | |
| cvar = _cubit3.cvar | |
| HEX = _cubit3.HEX | |
| HEX20 = _cubit3.HEX20 | |
| HEX21 = _cubit3.HEX21 | |
| HEX26 = _cubit3.HEX26 | |
| HEX27 = _cubit3.HEX27 | |
| HEX8 = _cubit3.HEX8 | |
| HEX9 = _cubit3.HEX9 | |
| HEXSHELL = _cubit3.HEXSHELL | |
| INVALID_ELEMENT_TYPE = _cubit3.INVALID_ELEMENT_TYPE | |
| PYRAMID = _cubit3.PYRAMID | |
| PYRAMID13 = _cubit3.PYRAMID13 | |
| PYRAMID18 = _cubit3.PYRAMID18 | |
| PYRAMID5 = _cubit3.PYRAMID5 | |
| PYRAMID8 = _cubit3.PYRAMID8 | |
| QUAD = _cubit3.QUAD | |
| QUAD4 = _cubit3.QUAD4 | |
| QUAD5 = _cubit3.QUAD5 | |
| QUAD8 = _cubit3.QUAD8 | |
| QUAD9 = _cubit3.QUAD9 | |
| SHARED_PTR_DISOWN = _cubit3.SHARED_PTR_DISOWN | |
| SHEL = _cubit3.SHEL | |
| SHELL4 = _cubit3.SHELL4 | |
| SHELL8 = _cubit3.SHELL8 | |
| SHELL9 = _cubit3.SHELL9 | |
| SPHERE_EXO = _cubit3.SPHERE_EXO | |
| SPRING = _cubit3.SPRING | |
| SUPERELEMENT_TOPOLOGY = _cubit3.SUPERELEMENT_TOPOLOGY | |
| SURFACE = _cubit3.SURFACE | |
| TETRA = _cubit3.TETRA | |
| TETRA10 = _cubit3.TETRA10 | |
| TETRA14 = _cubit3.TETRA14 | |
| TETRA15 = _cubit3.TETRA15 | |
| TETRA4 = _cubit3.TETRA4 | |
| TETRA8 = _cubit3.TETRA8 | |
| TRI3 = _cubit3.TRI3 | |
| TRI4 = _cubit3.TRI4 | |
| TRI6 = _cubit3.TRI6 | |
| TRI7 = _cubit3.TRI7 | |
| TRISHELL = _cubit3.TRISHELL | |
| TRISHELL3 = _cubit3.TRISHELL3 | |
| TRISHELL4 = _cubit3.TRISHELL4 | |
| TRISHELL6 = _cubit3.TRISHELL6 | |
| TRISHELL7 = _cubit3.TRISHELL7 | |
| TRUSS = _cubit3.TRUSS | |
| TRUSS2 = _cubit3.TRUSS2 | |
| TRUSS3 = _cubit3.TRUSS3 | |
| VERTEX = _cubit3.VERTEX | |
| VOLUME = _cubit3.VOLUME | |
| WEDGE = _cubit3.WEDGE | |
| WEDGE12 = _cubit3.WEDGE12 | |
| WEDGE15 = _cubit3.WEDGE15 | |
| WEDGE16 = _cubit3.WEDGE16 | |
| WEDGE20 = _cubit3.WEDGE20 | |
| WEDGE21 = _cubit3.WEDGE21 | |
| WEDGE6 = _cubit3.WEDGE6 | |
Function Documentation
◆ _decr_acis()
|
protected |
◆ _incr_acis()
|
protected |
◆ add_entities_to_group()
| add_entities_to_group | ( | group_id, | |
| entity_ids, | |||
| entity_type ) |
Add a list of entities to a specified group.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to which entities will be added.
type of entity_ids: std::vector< int,std::allocator< int > >entity_ids Vector of entity IDs to add.
type of entity_type: stringentity_type Type of the entities (e.g., "vertex", "curve", "surface", "volume"). Only geometric entities are supported.
return type of : void
- Returns
- None.
◆ add_entity_to_group()
| add_entity_to_group | ( | group_id, | |
| entity_id, | |||
| entity_type ) |
Add a specific entity to a given group.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to which the entity will be added.
type of entity_id: intentity_id ID of the entity to add.
type of entity_type: stringentity_type Type of the entity (e.g., "vertex", "curve", "surface", "volume"). Only geometric entities are supported.
return type of : void
- Returns
- None.
◆ add_filename_to_recent_file_list()
| add_filename_to_recent_file_list | ( | filename | ) |
Add a filename to Cubit's recent-file list in the GUI File menu.
Registers the specified file path so it appears under "Recent Files" in Cubit's GUI.
.. code-block:: python
@n type of filename: string
- Parameters
-
filename Reference to the file path string to add to the recent-file list.
◆ add_filter_type()
| add_filter_type | ( | filter_type | ) |
Add an entity type to the graphics pick filter.
Allows picking entities of the specified type in addition to any existing filters.
.. code-block:: python
@n type of filter_type: string
- Parameters
-
filter_type Entity type to add to the pickable set (e.g., "vertex", "curve", "surface", "volume", "node", "edge", "face").
◆ app_util()
| app_util | ( | ) |
Return Cubit's AppUtil interface for global services.
Provides access to application-level utilities--logging, configuration, file I/O, and more--required by higher-level modules like CubitML. Python usage example:
.. code-block:: python
Typically used together with cgm_iface() to bootstrap ML workflows.
return type of : std:: shared_ptr< AppUtil >
- Returns
- Shared pointer to the AppUtil instance.
◆ are_adjacent_curves()
| are_adjacent_curves | ( | curve_ids | ) |
Return whether two or more curves share at least one manifold vertex.
Given a list of curve IDs, this function returns whether the curves are adjacent. Two curves are considered adjacent if they share at least one manifold vertex: a vertex that is connected to exactly two curves. If the shared vertex is connected to more than two curves, the curves are **not considered adjacent**.
.. code-block:: python
@n type of curve_ids: std::vector< int,std::allocator< int > >
- Parameters
-
curve_ids IDs of curves to query.
return type of : boolean
- Returns
- True if the curves are adjacent (share at least one manifold vertex - vertex connected to exactly two curves), false otherwise.
◆ are_adjacent_surfaces()
| are_adjacent_surfaces | ( | surface_ids | ) |
Return whether two or more surfaces share at least one manifold curve.
Given a list of surface IDs, this function returns whether the surfaces are adjacent. Two surfaces are considered adjacent if they share at least one manifold curve (a curve that is part of exactly two surfaces).
.. code-block:: python
@n type of surface_ids: std::vector< int,std::allocator< int > >
- Parameters
-
surface_ids IDs of surfaces to query.
return type of : boolean
- Returns
- True if the surfaces are adjacent (share at least one manifold curve), false otherwise.
◆ auto_size_needs_to_be_calculated()
| auto_size_needs_to_be_calculated | ( | ) |
Check if automatic mesh sizing is outdated and needs recomputation.
Returns true if the model has changed since the last auto size calculation, indicating that automatic sizes (which can be expensive to compute) should be recalculated before generating a mesh.
.. code-block:: python
if cubit.auto_size_needs_to_be_calculated(): cubit.cmd("volume 1 size auto factor 3")
@n return type of : boolean
- Returns
- True if auto sizing is out of date and should be recalculated; false otherwise.
◆ best_edge_to_collapse_interior_node()
| best_edge_to_collapse_interior_node | ( | node_id | ) |
Find the best edge to collapse to remove an interior node in a triangular mesh.
For a given interior mesh node (no geometry association), this function identifies the best adjacent edge whose collapse would remove the node. If no suitable edge is found, returns 0.
.. code-block:: python
if best_edge > 0: print(f"Collapse interior node 50 along edge {best_edge}") else:
type of node_id: int
- Parameters
-
node_id ID of the interior mesh node to remove.
return type of : int
- Returns
- ID of the best edge to collapse; 0 if no valid edge found.
◆ body()
| body | ( | id_in | ) |
Retrieve a body by its ID.
Retrieves the body object corresponding to the provided ID. .. code-block:: python
@n type of id_in: int
- Parameters
-
id_in ID of the body to retrieve.
return type of : :py:class:Body
- Returns
- Body object corresponding to the specified ID.
◆ brick()
| brick | ( | width, | |
| depth = -1, | |||
| height = -1 ) |
Create a brick of specified width, depth, and height.
Creates a brick geometry with the given dimensions. If only width is provided (depth and height default to -1), a cube of side length `width` is generated. .. code-block:: python
@n type of width: float, in
- Parameters
-
width Width of the brick (or cube side length if only this argument is supplied).
type of depth: float, in, optionaldepth Depth of the brick (default = -1, uses width).
type of height: float, in, optionalheight Height of the brick (default = -1, uses width).
return type of : :py:class:Body
- Returns
- Body object representing the newly created brick geometry.
◆ calculate_timestep_estimate()
| calculate_timestep_estimate | ( | entity_type, | |
| entity_ids ) |
Estimate the time step based on element sizes and material properties.
Calculates a time step estimate for specified mesh elements of a given type.
Supported "tet", "hex", "volume", "block", "group". Elements must belong to a single block with an assigned material defining at least elastic_modulus, poisson_ratio, and density.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Mesh element type string ("tet", "hex", "volume", "block", "group").
type of entity_ids: std::vector< int,std::allocator< int > >entity_ids List of IDs of elements to include in the estimate.
return type of : float
- Returns
- Smallest stable time step across specified elements.
◆ calculate_timestep_estimate_with_props()
| calculate_timestep_estimate_with_props | ( | entity_type, | |
| entity_id_list, | |||
| density, | |||
| youngs_modulus, | |||
| poissons_ratio ) |
Estimate the stable time step using user-specified material properties.
Calculates a time step estimate for mesh elements of the given type, using provided density, Young's modulus, and Poisson's ratio rather than block-assigned materials.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Mesh element type ("tet", "hex", "volume", "block", "group").
type of entity_id_list: std::vector< int,std::allocator< int > >entity_id_list Vector of element IDs to include.
type of density: floatdensity Material density.
type of youngs_modulus: floatyoungs_modulus Young's modulus.
type of poissons_ratio: floatpoissons_ratio Poisson's ratio.
return type of : float
- Returns
- Smallest stable time step estimate.
◆ cgm()
| cgm | ( | ) |
Return the raw CGMApp kernel instance used by Cubit.
Grants direct access to lower-level CGM application calls (version, kernel settings, etc.).
return type of : CGMApp
- Returns
- Pointer to the active CGMApp instance (or None if CGM is unavailable).
◆ cgm_iface()
| cgm_iface | ( | ) |
Return the CGM-based geometry interface for Cubit.
Yields a CubitGeometryInterface implemented on the CGM kernel, enabling CAD topology queries and edits needed for ML feature extraction. Python usage example:
.. code-block:: python
Use this interface for all geometry operations in the ML pipeline.
return type of : CubitGeometryInterface
- Returns
- Pointer to the CGM-backed CubitGeometryInterface.
◆ clear_drawing_set()
| clear_drawing_set | ( | set_name | ) |
Clear all geometry in a named drawing set (e.g., mesh preview).
Removes any preview graphics associated with the specified set name, leaving the set empty for fresh drawing operations.
.. code-block:: python
@n type of set_name: string
- Parameters
-
set_name Name of the drawing set to clear.
◆ clear_highlight()
| clear_highlight | ( | ) |
Clear all entity highlights.
Removes highlights and selections from every entity in the graphics window.
.. code-block:: python
◆ clear_picked_list()
| clear_picked_list | ( | ) |
Clear the list of currently picked entities.
Empties the internal pick list without altering the pick filter or highlights.
.. code-block:: python
◆ clear_preview()
| clear_preview | ( | ) |
Clear preview graphics without affecting other display settings.
Removes only the temporary preview without altering the main geometry or mesh visibility.
.. code-block:: python
◆ cmd()
| cmd | ( | input_string | ) |
Execute a raw Cubit command string immediately (modifies model state).
This is one of the two primary ways (silent_cmd) to change the CAD model within Cubit. Sends the exact command text to Cubit for execution with no pre-validation. See Cubit's command syntax in the online documentation for a full description.
.. code-block:: python
@n type of input_string: string
- Parameters
-
input_string Null-terminated C string containing the complete Cubit command.
return type of : boolean
- Returns
- true if the command executed successfully; false otherwise.
◆ contains_virtual()
| contains_virtual | ( | geometry_type, | |
| entity_id ) |
Query whether any child entities of a specified geometry entity are virtual.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type The type of geometry ("curve", "surface", "volume", etc.).
type of entity_id: intentity_id The ID of the entity to query.
return type of : boolean
- Returns
- True if any child entities of the specified entity are virtual; false otherwise.
◆ convection_is_on_shell_area()
| convection_is_on_shell_area | ( | entity_id, | |
| shell_area_enum ) |
Check if a convection BC is on a shell top or bottom.
type of entity_id: int
- Parameters
-
entity_id ID of the BC.
type of shell_area_enum: intshell_area_enum Use CI_BCEntityTypes: 7 for top, 8 for bottom.
return type of : boolean
- Returns
- True if BC is applied to specified shell area.
◆ convection_is_on_solid()
| convection_is_on_solid | ( | entity_id | ) |
Check if a convection BC is on a solid.
type of entity_id: int
- Parameters
-
entity_id ID of the convection boundary condition.
return type of : boolean
- Returns
- True if the BC is applied to a solid region.
◆ copy_body()
| copy_body | ( | init_body | ) |
Create a duplicate of the specified body.
Returns a new Body object that is an exact copy of the input body, including geometry and mesh data. .. code-block:: python
@n type of init_body: :py:class:`Body`, in
- Parameters
-
init_body Body object to duplicate.
type of init_body: :py:class:Body, ininit_body Body object to duplicate.
return type of : :py:class:Body
- Returns
- New Body object that is a copy of the input. :raises: CubitFailureException Thrown if copying fails.
◆ create_arc_curve()
| create_arc_curve | ( | v0, | |
| v1, | |||
| intermediate_point ) |
Create an arc curve using end vertices and an intermediate point.
Constructs a circular arc passing through the specified start and end vertices and the given intermediate point. .. code-block:: python
@n type of v0: :py:class:`Vertex`, in
- Parameters
-
v0 The start vertex of the arc.
type of v1: :py:class:Vertex, inv1 The end vertex of the arc.
type of intermediate_point: std::array< double,3 >, inintermediate_point Array of three coordinates representing a point on the arc.
return type of : :py:class:Curve
- Returns
- Curve object representing the created arc.
◆ create_curve()
| create_curve | ( | v0, | |
| v1 ) |
Create a curve between two vertices.
Constructs a straight-line curve connecting the two specified vertices. .. code-block:: python
@n type of v0: :py:class:`Vertex`, in
- Parameters
-
v0 The start vertex of the curve.
type of v1: :py:class:Vertex, inv1 The end vertex of the curve.
return type of : :py:class:Curve
- Returns
- Curve object representing the connection between the vertices.
◆ create_new_group()
| create_new_group | ( | ) |
Create a new, empty group and return its ID.
.. code-block:: python
@n return type of : int
- Returns
- ID of the newly created group.
◆ create_nurbs_curve()
| create_nurbs_curve | ( | degree, | |
| ctrl_pts, | |||
| weights, | |||
| knot_vec ) |
Creates a NURBS curve... code-block:: c++.
// Create a degree 2 NURBS curve std::vector<double> pts = { 0.0, 2.0, 0.0, 1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0}; std::vector<double> weights = {1.0, 0.5, 1.0, 1.0}; std::vector<double> knot_vec = {0.0, 0.0, 0.5, 1.0, 1.0}; int curve_id = CubitInterface::create_nurbs_curve(2, pts, weights, knot_vec); .. code-block:: c++
Create a degree 2 NURBS curve pts = [] pts.extend([ 0.0, 2.0, 0.0]) pts.extend([ 1.0, 1.0, 0.0]) pts.extend([-1.0, 0.0, 0.0]) pts.extend([ 0.0, -1.0, 0.0]) weights = [1.0, 0.5, 1.0, 1.0] knot_vec = [0.0, 0.0, 0.5, 1.0, 1.0] curve_id = cubit.create_nurbs_curve(2, pts, weights, knot_vec) :type degree: int, in
- Parameters
-
degree The degree of the NURBS curve. :type ctrl_pts: std::vector< double,std::allocator< double > >, in ctrl_pts A list of x, y, z coordinates representing the control points. The list should be of the form [x0, y0, z0, x1, y1, z1, ... , xn, yn, zn]. The minimum size of this list must be degree + 1. :type weights: std::vector< double,std::allocator< double > >, in weights A list of weights for each control point. The size of this list should be equal to the number of control points. :type knot_vec: std::vector< double,std::allocator< double > >, in knot_vec The knot vector for the curve. This size of this list should be (num_ctrl_pts + degree - 1) or (num_ctrl_pts + degree + 1). If the former, end knot multiplicity should be the same as degree. If the latter, end knot multiplicity should be degree + 1. :rtype: int
- Returns
- The ID of the newly created curve. If curve creation was unsuccessful, returns -1.
◆ create_spline()
| create_spline | ( | points, | |
| surface_id ) |
Create a spline curve through a sequence of 3D points on a surface.
Constructs a smooth spline curve passing through the provided points, projected onto the specified surface. Projection is mandatory: the `surface_id` must refer to an existing surface entity. At least two points are required; otherwise, a CubitFailureException is thrown. A non-existent `surface_id` produces an InvalidEntityException. Other errors during projection or spline creation will result in a CubitFailureException or runtime error. .. code-block:: python
@n type of points: std::vector< std::array< double,3 >,std::allocator< std::array< double,3 > > >, in
- Parameters
-
points Ordered list of 3D coordinates (each array length = 3); must contain at least two points.
type of surface_id: int, insurface_id ID of the surface onto which points are projected; must be a valid surface ID.
return type of : :py:class:Curve
- Returns
- Curve object representing the projected spline. :raises: CubitFailureException Thrown for invalid input or projection failure. :raises: InvalidEntityException Thrown if
surface_iddoes not correspond to an existing surface.
◆ create_surface()
| create_surface | ( | curves | ) |
Create a sheet body from boundary curves.
Constructs a sheet body bounded by the specified closed curves. The returned Body contains exactly one surface and one volume. To access the underlying Surface, retrieve it from the body's surface list. .. code-block:: python
@n type of curves: std::vector< CubitInterface::Curve,std::allocator< CubitInterface::Curve > >, in
- Parameters
-
curves List of Curve objects forming a closed boundary loop.
return type of : :py:class:Body
- Returns
- Body object representing the created sheet (contains one surface and one volume). :raises: CubitFailureException Thrown if curves do not form a valid loop or creation fails.
◆ create_vertex()
| create_vertex | ( | x, | |
| y, | |||
| z ) |
Create a vertex at specified coordinates.
Creates a 0-dimensional geometric entity (vertex) at the given (x, y, z) location. If no coordinates are specified, the vertex is placed at the origin (0,0,0). .. code-block:: python
@n type of x: float, in
- Parameters
-
x X-coordinate of the vertex (default = 0).
type of y: float, iny Y-coordinate of the vertex (default = 0).
type of z: float, inz Z-coordinate of the vertex (default = 0).
return type of : :py:class:Vertex
- Returns
- Vertex object located at the specified coordinates.
◆ create_window()
| create_window | ( | ) |
◆ current_selection_count()
| current_selection_count | ( | ) |
Get the number of entities in the current selection list.
Returns how many entities have been picked and are available for navigation.
.. code-block:: python
@n return type of : int
- Returns
- Number of entities currently selected.
◆ curve()
| curve | ( | id_in | ) |
Retrieve a curve object by its ID.
Retrieves the curve object corresponding to the provided ID. .. code-block:: python
@n type of id_in: int
- Parameters
-
id_in ID of the curve to retrieve.
return type of : :py:class:Curve
- Returns
- Curve object corresponding to the specified ID.
◆ cylinder()
| cylinder | ( | height, | |
| x_radius, | |||
| y_radius, | |||
| top_radius ) |
Create a cylinder or truncated cone of specified dimensions.
Creates a cylindrical or conical body based on provided bottom and top radii. A zero top radius yields a cone; a top radius equal to the x and y radii yields a straight cylinder. .. code-block:: python
@n type of height: float, in
- Parameters
-
height Height of the cylinder.
type of x_radius: float, inx_radius Radius in the x direction (base ellipse x-axis).
type of y_radius: float, iny_radius Radius in the y direction (base ellipse y-axis).
type of top_radius: float, intop_radius Radius at the top: 0 for cone, equal to x and y radii for straight cylinder.
return type of : :py:class:Body
- Returns
- Body object representing the newly created cylinder or cone.
◆ delete_all_groups()
| delete_all_groups | ( | ) |
Remove all groups from the current Cubit session.
.. code-block:: python
@n return type of : void
- Returns
- None.
◆ delete_group()
| delete_group | ( | group_id | ) |
Delete a specific group by ID.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to delete.
return type of : void
- Returns
- None.
◆ delete_window()
| delete_window | ( | id | ) |
◆ destroy()
| destroy | ( | ) |
Shut down Cubit and close the active journal file.
Flushes any pending commands, closes the journal, and releases Cubit resources. After calling destroy(), no further Cubit calls should be made.
.. code-block:: python
return type of : int
- Returns
- 0 on success; non-zero error code on failure.
◆ developer_commands_are_enabled()
| developer_commands_are_enabled | ( | ) |
Check if developer commands are enabled.
Returns true if Cubit is running in developer mode, allowing access to internal or experimental commands.
.. code-block:: python
if cubit.developer_commands_are_enabled(): print("Developer commands are enabled.")
@n return type of : boolean
- Returns
- True if developer mode is active; false otherwise.
◆ do_ML_predictions()
| do_ML_predictions | ( | ml_op_names, | |
| entity1_ids, | |||
| entity2_ids, | |||
| params, | |||
| user_configs, | |||
| mesh_size, | |||
| reduced_features = False ) |
Compute ML predictions for a list of operations with multiple entities.
This is a batch variant of get_ML_predictions() that accepts lists of entity IDs per operation, enabling more flexible inputs. Features are computed and predictions are generated via a scikit-learn ensemble of decision trees. @n type of ml_op_names: std::vector< std::string,std::allocator< std::string > >
- Parameters
-
ml_op_names Vector of ML operation or model names.
type of entity1_ids: std::vector< std::vector< size_t,std::allocator< size_t > >,std::allocator< std::vector< size_t,std::allocator< size_t > > > >entity1_ids Vector of vectors of primary entity IDs for each operation.
type of entity2_ids: std::vector< std::vector< size_t,std::allocator< size_t > >,std::allocator< std::vector< size_t,std::allocator< size_t > > > >entity2_ids Vector of vectors of secondary entity IDs for each operation.
type of params: std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >params Vector of parameter lists for each operation.
type of user_configs: std::vector< double,std::allocator< double > >user_configs Vector of user configurable settings (geometry sizing and regularize).
type of mesh_size: floatmesh_size Target mesh size used in feature calculation.
type of reduced_features: boolean, optionalreduced_features If true (where supported), use the reduced feature set for faster inference.
return type of : std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std:: allocator< double > > > >
- Returns
- Outer vector matches ml_op_names length; each inner vector contains the predicted values for that operation.
.. code-block:: python
◆ entity_exists()
| entity_exists | ( | entity_type, | |
| id ) |
Check whether an entity of the specified type and ID exists.
This function returns `true` if an entity of the given type and ID exists in the model; otherwise it returns `false`. Supported entity types include: "vertex", "curve", "surface", "volume", "body", etc.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity being queried (e.g. "surface", "curve", "volume").
type of id: intid ID of the entity.
return type of : boolean
- Returns
trueif the entity exists,falseotherwise.
◆ evaluate_exterior_angle()
| evaluate_exterior_angle | ( | curve_list, | |
| test_angle ) |
Find curves whose exterior angle between adjacent surfaces is less than a given threshold.
This function implements the Cubit "draw curve with exterior_angle < test_angle" test. For each curve in curve_list, it computes the exterior angle (the angle on the outside of the volume) between the two faces sharing that curve and returns those curves whose exterior angle is below test_angle. Example setup:
.. code-block:: python
@n type of curve_list: std::vector< int,std::allocator< int > >
- Parameters
-
curve_list Vector of curve IDs to test.
type of test_angle: floattest_angle Exterior angle threshold in degrees; curves with exterior angle < test_angle are returned.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list (vector<int> or Python tuple) of curve IDs satisfying the test.
◆ evaluate_exterior_angle_at_curve()
| evaluate_exterior_angle_at_curve | ( | curve_id, | |
| volume_id ) |
Return the exterior angle at a single curve with respect to a volume.
Computes the exterior angle (in degrees) on the outside of the specified volume between the two faces sharing the given curve.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve.
type of volume_id: intvolume_id ID of the volume.
return type of : float
- Returns
- Exterior angle in degrees between the two faces sharing the curve on the specified volume.
◆ evaluate_surface_angle_at_vertex()
| evaluate_surface_angle_at_vertex | ( | surf_id, | |
| vert_id ) |
Return the interior angle at a vertex on a specified surface.
Computes the angle in degrees between the two edges meeting at vert_id on surf_id, measured inside the surface. For a planar cube face, each corner vertex has an interior angle of 90 degrees.
.. code-block:: python
@n type of surf_id: int
- Parameters
-
surf_id ID of the surface.
type of vert_id: intvert_id ID of the vertex on that surface.
return type of : float
- Returns
- Interior angle in degrees at the specified vertex on the given surface.
◆ exodus_sizing_function_file_exists()
| exodus_sizing_function_file_exists | ( | ) |
Check if the Exodus sizing function file currently exists.
Returns true if an Exodus II file has been imported as a sizing function and still resides on disk; returns false otherwise.
.. code-block:: python
@n return type of : boolean
- Returns
- True if the imported Exodus II sizing file still exists on disk; false otherwise.
◆ find_cone_surfaces()
| find_cone_surfaces | ( | surface_id | ) |
Identify cone surface(s) starting from a candidate surface.
Given a surface ID, this function determines if the surface is part of a cone. If the surface is a cone with an adjacent surface also part of the same cone, both surface IDs are returned. Otherwise, only the input surface ID is returned.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id Surface ID to test as a candidate cone.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of surface IDs:
- If the input surface is a cone with a cone neighbor, both surface IDs are returned.
- If not, the list contains only the input surface ID.
◆ find_overlapping_curves()
| find_overlapping_curves | ( | curve_ids | ) |
Identify overlapping curves in a specified list of curves.
The result is a vector of vectors. Each vector contains the IDs of curves that overlap with one another. Only overlaps between curves of different volumes or touching surfaces are reported.
.. code-block:: python
for overlap in my_overlaps: print("Curves:", tuple(int(cid) for cid in overlap))
@n type of curve_ids: std::vector< int,std::allocator< int > >
- Parameters
-
curve_ids List of curve IDs to search for curve overlaps.
return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- A list of curve overlap results. Each entry is a vector of curve IDs that overlap.
◆ fire_ray()
| fire_ray | ( | origin, | |
| direction, | |||
| target_type, | |||
| target_ids, | |||
| max_hits = 0, | |||
| ray_radius = 0.0 ) |
Fire a ray at a list of target entities and return the hit locations and entity ids.
:type origin: std::array< double,3 >
- Parameters
-
origin xyz coordinate of ray start point :type direction: std::array< double,3 > direction xyz vector defining ray orientation :type target_type: string target_type one of vertex, curve, surface, volume, or body :type target_ids: std::vector< int,std::allocator< int > > target_ids one or more entity ids for targets :type max_hits: int, optional max_hits [optional] the number of intersection hits to find. If 0 get all intersections. :type ray_radius: float, optional ray_radius [optional] a tolerance on the ray for intersection calculations :rtype: std::pair< std::vector< std::array< double,3 >,std::allocator< std::array< double,3 > > >,std::vector< int,std::allocator< int > > >
- Returns
- a pair of a vector of hit locations and a vector of ids of the type specified in target_type. No ids are returned if the intersections are not of the specified type.
◆ flush_graphics()
| flush_graphics | ( | ) |
Force immediate rendering of pending graphics operations.
Ensures that any queued draw calls (for example, draw location or mesh preview) are displayed before subsequent commands execute. Requires an active graphics window.
.. code-block:: python
◆ gather_surfaces_by_orientation()
| gather_surfaces_by_orientation | ( | seed_surf_ids, | |
| all_surf_ids ) |
Gathers surfaces connected across shared edges, forming a surface enclosure.
Starting from a list of seed surfaces, recursively finds and returns all surfaces that are connected to them across shared edges. The resulting set typically forms a closed or connected surface group (enclosure). If `all_surf_ids` is provided, the search is limited to those surfaces. If empty, all model surfaces are considered. This function is useful for finding surface enclosures, identifying connected outer boundaries, or selecting surface groups in models with voids or non-manifold geometry.
.. code-block:: python
@n type of seed_surf_ids: std::vector< int,std::allocator< int > >
- Parameters
-
seed_surf_ids List of starting surface IDs to grow from.
type of all_surf_ids: std::vector< int,std::allocator< int > >all_surf_ids Optional list of candidate surface IDs to search within (empty means all surfaces). @n return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of surface IDs connected across shared edges.
◆ get_2D_sheet_volumes()
| get_2D_sheet_volumes | ( | vol_id | ) |
Get associated 2D sheet volumes from a reduced 3D thin volume.
Returns the IDs of sheet bodies created from a 3D thin volume using reduce thin commands. These sheet volumes preserve thickness and loft attributes for shell FEA purposes.
.. code-block:: python
@n type of vol_id: int
- Parameters
-
vol_id Volume ID representing the 3D thin volume.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- IDs of 2D sheet volumes generated from the 3D volume.
◆ get_3D_thin_volume()
| get_3D_thin_volume | ( | vol_id | ) |
Get the original 3D thin volume associated with a 2D sheet volume.
Used to retrieve the parent 3D geometry from a 2D sheet volume generated by a reduce thin operation. Supports traceability in shell FEA workflows.
.. code-block:: python
@n type of vol_id: int
- Parameters
-
vol_id Volume ID representing a 2D sheet volume.
return type of : int
- Returns
- ID of the associated 3D thin volume.
◆ get_acceleration_combine_type()
| get_acceleration_combine_type | ( | entity_id | ) |
Get the combine method for an acceleration BC.
Valid options include "Overwrite", "Average", "SmallestCombine", or "LargestCombine".
type of entity_id: int
- Parameters
-
entity_id ID of the acceleration BC.
return type of : string
- Returns
- Combine method as a string.
◆ get_acis_version()
| get_acis_version | ( | ) |
Retrieve the ACIS kernel version string.
Returns the ACIS geometric modeling kernel version used by Cubit.
.. code-block:: python
@n return type of : string
- Returns
- A string containing the ACIS version number.
◆ get_acis_version_as_int()
| get_acis_version_as_int | ( | ) |
Retrieve the ACIS kernel version as an integer.
Returns the ACIS version encoded as an integer (e.g., 202107 for version 2021.07).
.. code-block:: python
@n return type of : int
- Returns
- An integer representing the ACIS version.
◆ get_adjacent_surfaces()
| get_adjacent_surfaces | ( | geometry_type, | |
| entity_id ) |
Get a list of surfaces adjacent to a specified surface (including the surface itself).
For a given surface, this returns all surfaces that either own the specified entity or share a boundary with it. The returned list includes the queried surface as well.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type The type of the entity ("surface" for this function).
type of entity_id: intentity_id ID of the surface to query.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list (vector or Python tuple) of surface IDs adjacent to-and including-the queried surface.
◆ get_adjacent_volumes()
| get_adjacent_volumes | ( | geometry_type, | |
| 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.
.. code-block:: python
- Parameters
-
geom_type Specifies the geometry type of the entity
type of entity_id: intentity_id Specifies the id of the entity
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list (python tuple) of volume ids
◆ get_all_cfd_bcs()
| get_all_cfd_bcs | ( | ) |
◆ get_all_exodus_times()
| get_all_exodus_times | ( | filename | ) |
Get all available time steps from an Exodus file.
Opens an Exodus II file and returns a vector of all stored time values (time steps). These time values are used when importing deformed meshes (via the `Time <time>` or `Step <step>` options) to select which deformation state to import. The last time in the list corresponds to the default import time.
.. code-block:: python
for t in times: print(" Time:", t)
@n type of filename: string
- Parameters
-
filename Fully qualified Exodus II file name.
return type of : std::vector< double,std:: allocator< double > >
- Returns
- Vector (Python tuple) of available time steps stored in the file.
◆ get_all_exodus_variable_names()
| get_all_exodus_variable_names | ( | filename, | |
| variable_type ) |
Get all variable names of a given type from an Exodus file.
Opens an Exodus II file and returns a vector of all variable names of the requested type. These variable names are used when importing nodal or element variable data into Cubit via the `nodal_var` and `element_var` import options. Valid variable types: - `'g'` = global variables - `'n'` = nodal variables - `'e'` = element variables
.. code-block:: python
for var_name in nodal_vars: print(" ", var_name)
@n type of filename: string
- Parameters
-
filename Fully qualified Exodus II file name.
type of variable_type: stringvariable_type Variable type: 'g' (global), 'n' (nodal), or 'e' (element).
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector (Python tuple) of variable names of the requested type stored in the file.
◆ get_all_geometric_owners()
| get_all_geometric_owners | ( | mesh_entity_type, | |
| mesh_entity_list ) |
Get the list of geometric owners for a set of mesh entities and their child entities.
Returns the geometric owners of the specified mesh entities and any child entities (e.g., edges or nodes of a quad).
Title Supported mesh entity types
- quad
- face
- tri
- hex
- tet
- edge
- node
.. code-block:: python
@n type of mesh_entity_type: string
- Parameters
-
mesh_entity_type Mesh entity type: quad, face, tri, hex, tet, edge, or node.
type of mesh_entity_list: stringmesh_entity_list Space-delimited mesh entity IDs (e.g., "all", "1 to 8", "1 2 3").
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector of owner strings for each specified entity and its children.
◆ get_all_ids_from_name()
| get_all_ids_from_name | ( | geo_type, | |
| name ) |
Retrieve all IDs of entities of a specified geometry type whose names start with a given prefix.
.. code-block:: python
@n type of geo_type: string
- Parameters
-
geo_type Geometry entity type ("vertex", "curve", "surface", or "volume").
type of name: stringname Prefix of the entity names to search for.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of integer IDs of entities matching the name prefix.
◆ get_aprepro_numeric_value()
| get_aprepro_numeric_value | ( | variable_name | ) |
Get the numeric value of a specified Aprepro variable.
Aprepro is a lightweight macro language in Cubit used for variable substitution and simple scripting.
.. code-block:: python
@n type of variable_name: string
- Parameters
-
variable_name Name of the Aprepro variable to query.
return type of : float
- Returns
- The variable's value as a double, or CUBIT_DBL_MAX on failure.
◆ get_aprepro_value_as_string()
| get_aprepro_value_as_string | ( | variable_name | ) |
Get the string value of an Aprepro variable.
Aprepro is a lightweight macro language in Cubit used for variable substitution and simple scripting.
.. code-block:: python
@n type of variable_name: string
- Parameters
-
variable_name Name of the Aprepro variable to query.
return type of : string
- Returns
- The string value of the specified Aprepro variable.
◆ get_aprepro_vars()
| get_aprepro_vars | ( | ) |
Retrieve the current Aprepro variable names.
Aprepro is a lightweight macro language in Cubit used for variable substitution and simple scripting.
.. code-block:: python
@n return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- A list (vector<int> or Python tuple) of the current Aprepro variable names.
◆ get_arc_center_radius()
| get_arc_center_radius | ( | curve_id | ) |
Get the center point and radius of a specified arc curve.
If the curve is a circular or elliptical arc (e.g., an end circle of a cylinder), returns its center (X,Y,Z) and constant radius.
For any other curve type, returns {0,0,0,0} and emits a warning.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the RefEdge to query.
return type of : std:: array< double,4 >
- Returns
- Array of four doubles: [0] = center.x, [1] = center.y, [2] = center.z, [3] = radius; returns {0,0,0,0} on unsupported curve types or failure.
◆ get_arc_length()
| get_arc_length | ( | curve_id | ) |
Get the parametric (arc) length of a specified curve.
Returns the length measured along the curve's parameterization. For most curves in Cubit, this matches the physical 3D length, but for certain spline or NURBS representations, arc length may be computed by integrating the parametric form.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve to query.
return type of : float
- Returns
- The parametric (arc) length of the curve in model units.
◆ get_assembly_children()
| get_assembly_children | ( | assembly_id | ) |
◆ get_assembly_classification_category()
| get_assembly_classification_category | ( | ) |
Get classification category metadata.
return type of : string
- Returns
- Classification category as a string.
◆ get_assembly_classification_level()
| get_assembly_classification_level | ( | ) |
Get classification level metadata.
return type of : string
- Returns
- Classification level as a string.
◆ get_assembly_description()
| get_assembly_description | ( | assembly_id | ) |
Get the description of an assembly node.
type of assembly_id: int
- Parameters
-
assembly_id ID of the assembly node.
return type of : string
- Returns
- Description string.
◆ get_assembly_file_format()
| get_assembly_file_format | ( | assembly_id | ) |
Get the file format from which the assembly node was imported.
type of assembly_id: int
- Parameters
-
assembly_id ID of the assembly node.
return type of : string
- Returns
- File format string, e.g., "ACIS" or "STEP".
◆ get_assembly_instance()
| get_assembly_instance | ( | assembly_id | ) |
Get the instance number of an assembly node.
Distinguishes nodes with the same name.
type of assembly_id: int
- Parameters
-
assembly_id ID of the assembly node.
return type of : int
- Returns
- Instance number.
◆ get_assembly_items()
| get_assembly_items | ( | ) |
◆ get_assembly_level()
| get_assembly_level | ( | assembly_id | ) |
Get the hierarchy level of an assembly node.
Level 0 is the root.
type of assembly_id: int
- Parameters
-
assembly_id ID of the assembly node.
return type of : int
- Returns
- Integer hierarchy level.
◆ get_assembly_material_description()
| get_assembly_material_description | ( | assembly_id | ) |
Get the material description for a part.
type of assembly_id: int
- Parameters
-
assembly_id ID of the part node.
return type of : string
- Returns
- Material description string.
◆ get_assembly_material_specification()
| get_assembly_material_specification | ( | assembly_id | ) |
Get the material specification for a part.
type of assembly_id: int
- Parameters
-
assembly_id ID of the part node.
return type of : string
- Returns
- Material specification string.
◆ get_assembly_metadata()
| get_assembly_metadata | ( | volume_id, | |
| data_type ) |
Get metadata for a specified volume.
Returns metadata associated with a volume's part, such as part number, description, material info, or file reference.
type of volume_id: int
- Parameters
-
volume_id ID of the volume.
type of data_type: intdata_type Integer representing the metadata type: 1 = Part Number, 2 = Description, 3 = Material Description, 4 = Material Specification, 5 = Assembly Path, 6 = Original File.
return type of : string
- Returns
- Corresponding metadata string.
◆ get_assembly_name()
| get_assembly_name | ( | assembly_id | ) |
Get the name of an assembly node.
type of assembly_id: int
- Parameters
-
assembly_id ID of the assembly node.
return type of : string
- Returns
- Name string of the node.
◆ get_assembly_path()
| get_assembly_path | ( | assembly_id | ) |
Get the full path of an assembly node, identifying its hierarchy.
type of assembly_id: int
- Parameters
-
assembly_id ID of the assembly node.
return type of : string
- Returns
- Full path string, e.g., "/root/subassembly/part".
◆ get_assembly_type()
| get_assembly_type | ( | assembly_id | ) |
Get the type of an assembly node ("part" or "assembly").
type of assembly_id: int
- Parameters
-
assembly_id ID of the assembly node.
return type of : string
- Returns
- Type string.
◆ get_assembly_units()
| get_assembly_units | ( | assembly_id | ) |
Get the units of measurement used in the assembly node.
type of assembly_id: int
- Parameters
-
assembly_id ID of the assembly node.
return type of : string
- Returns
- Units string, e.g., "mm", "inch".
◆ get_assembly_weapons_category()
| get_assembly_weapons_category | ( | ) |
Get weapons category metadata.
return type of : string
- Returns
- Weapons category as a string.
◆ get_auto_size()
| get_auto_size | ( | geometry_type, | |
| entity_id_list, | |||
| auto_factor ) |
Predict the automatic mesh size for a set of entities.
Calculates the mesh size (target edge length) that would be applied if the command 'size auto factor n' were issued on the given entities. This does not modify the model or set any sizes-it only returns the value.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Entity type: "curve", "surface", or "volume".
type of entity_id_list: std::vector< int,std::allocator< int > >entity_id_list Vector of IDs for the specified entities.
type of auto_factor: floatauto_factor The factor n used in size auto factor n.
return type of : float
- Returns
- The mesh size that would result from auto-sizing.
◆ get_bc_id_list()
| get_bc_id_list | ( | bc_type_enum | ) |
Get active boundary condition (BC) IDs of a specified type.
Returns a list of active BC IDs matching the given type enum.
type of bc_type_enum: int
- Parameters
-
bc_type_enum Boundary condition type enum (CI_BCTypes). FEA types: 1-9, CFD types: 10-30.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of active BC IDs.
◆ get_bc_name()
| get_bc_name | ( | bc_type_enum, | |
| bc_id ) |
Get the name of a specific boundary condition (BC).
Retrieves the name associated with a given BC ID and type.
type of bc_type_enum: int
- Parameters
-
bc_type_enum BC type enum (CI_BCTypes).
type of bc_id: intbc_id ID of the boundary condition.
return type of : string
- Returns
- Name string of the specified BC.
◆ get_bc_temperature()
| get_bc_temperature | ( | bc_type_enum, | |
| entity_id, | |||
| temp_type_enum ) |
Get the temperature value for a specified BC area.
type of bc_type_enum: int
- Parameters
-
bc_type_enum BC type (temperature = 4, convection = 7).
type of entity_id: intentity_id ID of the BC.
type of temp_type_enum: inttemp_type_enum CI_BCEntityTypes for area: 2 (solid convection), 3 (solid temp), 7 (top), 8 (bottom), 9 (gradient), 10 (middle).
return type of : float
- Returns
- Temperature value.
◆ get_blend_chain_collections()
| get_blend_chain_collections | ( | volume_list, | |
| radius_threshold ) |
Return collections of surfaces that form blend chains in the specified volumes.
A blend chain is a group of contiguous surfaces that together form a smooth transition feature, such as a fillet or round. Blend chains are filtered by their computed radius. If radius_threshold is provided, only blend chains with radius less than this value are returned.
.. code-block:: python
for surfaces, radius in blend_collections: print("Blend chain surfaces:", tuple(surfaces), "Radius:", radius)
@n type of volume_list: std::vector< int,std::allocator< int > >
- Parameters
-
volume_list List of volume IDs to query.
type of radius_threshold: floatradius_threshold Return only blend chains whose computed radius is less than this value.
return type of : std::vector< std::pair< std::vector< int,std::allocator< int > >,double >,std::allocator< std::pair< std::vector< int,std:: allocator< int > >,double > > >
- Returns
- : A list of pairs each pair contains (1) a list of surface IDs defining a blend chain, and (2) the computed radius of the blend chain.
◆ get_blend_chains()
| get_blend_chains | ( | surface_id | ) |
Returns the blend chains for a given surface.
Given a surface ID, this function returns all blend chains associated with that surface. If the surface is part of one or more blend chains, each chain will be returned as a list of surface IDs.
.. code-block:: python
for chain in blend_chains: print("Blend chain:", tuple(chain))
@n type of surface_id: int
- Parameters
-
surface_id Surface to retrieve the blend chains from.
return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- A list of lists of surface IDs in each blend chain.
- Note
- If using Python, lists will be returned as Python tuples.
◆ get_blend_surfaces()
| get_blend_surfaces | ( | target_volume_ids | ) |
Find blend (fillet) surfaces within specified volumes.
Iterates over all faces of volumes in target_volume_ids and returns those for which is_blend_surface returns true.
.. code-block:: python
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of IDs of surfaces that are blends (fillets).
◆ get_block_attribute_count()
| get_block_attribute_count | ( | block_id | ) |
Get the number of attributes assigned to a block.
Each block can store up to 20 attributes, which represent physical properties like material parameters.
.. code-block:: python
@n type of block_id: int
- Parameters
-
block_id The ID of the block to query.
return type of : int
- Returns
- The number of attributes currently assigned to the block.
◆ get_block_attribute_name()
| get_block_attribute_name | ( | block_id, | |
| attribute_index ) |
Get the name of a specific attribute for a block.
Returns the name associated with the attribute at the specified index for a given block. Attribute names are typically assigned to describe the purpose or meaning of each attribute, such as "thickness" or "thermal_conductivity".
.. code-block:: python
@n type of block_id: int
- Parameters
-
block_id ID of the block.
type of attribute_index: intattribute_index Index of the attribute (1-based).
return type of : string
- Returns
- Name of the attribute at the specified index.
◆ get_block_attribute_value()
| get_block_attribute_value | ( | block_id, | |
| attribute_index ) |
Get the value of a specific attribute for a block.
Returns the floating-point value of the attribute at the specified index for a given block. Attributes are user-defined values assigned to represent physical or material properties in a block, such as shell thickness or temperature.
.. code-block:: python
@n type of block_id: int
- Parameters
-
block_id ID of the block.
type of attribute_index: intattribute_index Index of the attribute (1-based).
return type of : float
- Returns
- Value of the attribute at the specified index.
◆ get_block_cad_material()
| get_block_cad_material | ( | block_id | ) |
◆ get_block_count()
| get_block_count | ( | ) |
Get the current number of element blocks in the model.
In Cubit, an element block groups related mesh elements of the same type into a single entity. Blocks can be defined by geometric entities (volumes, surfaces, curves) or by directly specifying mesh entities. Once defined, all elements owned by those entities become part of the block.
.. code-block:: python
@n return type of : int
- Returns
- The number of element blocks currently defined in the model.
◆ get_block_curves()
| get_block_curves | ( | block_id | ) |
Get the list of curve IDs contained in a block.
This function returns the IDs of all curves that are part of the specified block.
.. code-block:: python
for curve_id in curve_ids: print(f" Curve ID: {curve_id}")
@n type of block_id: int
- Parameters
-
block_id ID of the block to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of curve IDs contained in the block.
◆ get_block_edges()
| get_block_edges | ( | block_id | ) |
Get the list of edge IDs contained in a block.
This function returns the IDs of all edges that are part of the specified block.
.. code-block:: python
for edge_id in edge_ids: print(f" Edge ID: {edge_id}")
@n type of block_id: int
- Parameters
-
block_id ID of the block to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of edge IDs contained in the block.
◆ get_block_element_attribute_count()
| get_block_element_attribute_count | ( | block_id | ) |
Get the number of attributes defined for elements in the specified block.
This returns the number of attribute values associated with each element in a block. Attributes can represent properties like shell thickness, material coefficients, etc.
.. code-block:: python
@n type of block_id: int
- Parameters
-
block_id The ID of the block.
return type of : int
- Returns
- Number of element-level attributes defined in the block.
◆ get_block_element_attribute_names()
| get_block_element_attribute_names | ( | block_id | ) |
Get the list of attribute names associated with block elements.
Returns the names of all attributes associated with the elements of a given block. These names describe the meaning of each attribute (e.g., "thickness", "material_id").
.. code-block:: python
for name in names: print(name)
@n type of block_id: int
- Parameters
-
block_id ID of the block.
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector of attribute names associated with the block elements.
◆ get_block_element_type()
| get_block_element_type | ( | block_id | ) |
Get the element type associated with a block.
Returns the finite element type (e.g., HEX8, HEX20, TET10) used in the specified block.
.. code-block:: python
@n type of block_id: int
- Parameters
-
block_id ID of the block to query.
return type of : string
- Returns
- A string indicating the element type used in the block.
◆ get_block_faces()
| get_block_faces | ( | block_id | ) |
Get the list of face IDs contained in a block.
This function returns the IDs of all face elements that are part of the specified block.
.. code-block:: python
for face_id in face_ids: print(f" Face ID: {face_id}")
@n type of block_id: int
- Parameters
-
block_id ID of the block to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of face IDs contained in the block.
◆ get_block_hexes()
| get_block_hexes | ( | block_id | ) |
Get the list of hexahedron (hex) IDs contained in a block.
This function returns the IDs of all hexahedron (hex) elements that are part of the specified block.
.. code-block:: python
for hex_id in hex_ids: print(f" Hex ID: {hex_id}")
@n type of block_id: int
- Parameters
-
block_id ID of the block to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of hexahedron (hex) IDs contained in the block.
◆ get_block_id()
| get_block_id | ( | entity_type, | |
| entity_id ) |
Get the element block ID associated with a geometric entity.
Returns the ID of the element block that is associated with the specified curve, surface, or volume. A geometric entity may be assigned to only one block. If no block is assigned, this function returns 0.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity: "curve", "surface", or "volume".
type of entity_id: intentity_id ID of the entity.
return type of : int
- Returns
- Block ID associated with the entity, or zero (0) if none.
◆ get_block_id_list()
| get_block_id_list | ( | ) |
Get a list of all active block IDs.
Returns a vector of all currently active element block IDs in the model. A geometric entity may be assigned to only one block.
.. code-block:: python
for block_id in block_ids: print(" Block ID:", block_id)
@n return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector (Python tuple) of all active block IDs.
◆ get_block_ids()
| get_block_ids | ( | mesh_geometry_file_name | ) |
Get list of block IDs from a mesh geometry file.
Opens a mesh geometry file (Exodus II format) and returns a vector of all element block IDs defined in the file. This allows users to inspect available blocks before importing the mesh, and to selectively import blocks by ID.
.. code-block:: python
for block_id in block_ids: print(" Block ID:", block_id)
@n type of mesh_geometry_file_name: string
- Parameters
-
mesh_geometry_file_name Fully qualified name of a mesh geometry file (Exodus II format).
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector (Python tuple) of block IDs defined in the mesh geometry file.
◆ get_block_material()
| get_block_material | ( | block_id | ) |
Get the ID of the material assigned to the specified block.
Returns the material ID associated with the block. This ID corresponds to a defined material (as created with material commands). A value of 0 indicates that no material is currently assigned.
.. code-block:: python
@n type of block_id: int
- Parameters
-
block_id ID of the block.
return type of : int
- Returns
- Material ID assigned to the block, or 0 if none.
◆ get_block_name()
| get_block_name | ( | block_id | ) |
Get the block name for a given block id.
. code-block:: c++
std::string block_name = CubitInterface::get_block_name(1); .. code-block:: c++ block_name = cubit.get_block_name(1) :type block_id: int
- Parameters
-
block_id Id of block in question :rtype: string
- Returns
- Block name associated with this block or "" if none
◆ get_block_nodes()
| get_block_nodes | ( | block_id | ) |
Get the list of node IDs contained in a block.
This function returns the IDs of all nodes that are part of the specified block.
.. code-block:: python
for node_id in node_ids: print(f" Node ID: {node_id}")
@n type of block_id: int
- Parameters
-
block_id ID of the block to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of node IDs contained in the block.
◆ get_block_pyramids()
| get_block_pyramids | ( | block_id | ) |
Get the list of pyramid IDs contained in a block.
This function returns the IDs of all pyramid elements that are part of the specified block.
- Note
- In Cubit, only one type of element can be assigned to a block. To separate element types, use multiple blocks. For example, after meshing with tets and pyramids, assign tets and pyramids to separate blocks as shown below.
.. code-block:: python
for pyr_id in pyramid_ids: print(f" Pyramid ID: {pyr_id}")
@n type of block_id: int
- Parameters
-
block_id ID of the block to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of pyramid IDs contained in the block.
◆ get_block_string_attributes()
| get_block_string_attributes | ( | block_id | ) |
◆ get_block_surfaces()
| get_block_surfaces | ( | block_id | ) |
Get the list of surface IDs contained in a block.
This function returns the IDs of all surfaces that are part of the specified block.
.. code-block:: python
for surf_id in surface_ids: print(f" Surface ID: {surf_id}")
@n type of block_id: int
- Parameters
-
block_id ID of the block to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of surface IDs contained in the block.
◆ get_block_tets()
| get_block_tets | ( | block_id | ) |
Get the list of tetrahedron (tet) IDs contained in a block.
This function returns the IDs of all tetrahedron (tet) elements that are part of the specified block.
.. code-block:: python
for tet_id in tet_ids: print(f" Tet ID: {tet_id}")
@n type of block_id: int
- Parameters
-
block_id ID of the block to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of tetrahedron (tet) IDs contained in the block.
◆ get_block_tris()
| get_block_tris | ( | block_id | ) |
Get the list of triangle (tri) IDs contained in a block.
This function returns the IDs of all triangle elements that are part of the specified block.
.. code-block:: python
for tri_id in tri_ids: print(f" Tri ID: {tri_id}")
@n type of block_id: int
- Parameters
-
block_id ID of the block to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of triangle (tri) IDs contained in the block.
◆ get_block_vertices()
| get_block_vertices | ( | block_id | ) |
Get the list of vertex IDs contained in a block.
This function returns the IDs of all vertices that are part of the specified block.
.. code-block:: python
for vertex_id in vertex_ids: print(f" Vertex ID: {vertex_id}")
@n type of block_id: int
- Parameters
-
block_id ID of the block to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of vertex IDs contained in the block.
◆ get_block_volumes()
| get_block_volumes | ( | block_id | ) |
Get the list of volume IDs contained in a block.
This function returns the IDs of all volumes that are part of the specified block.
.. code-block:: python
for vol_id in volume_ids: print(f" Volume ID: {vol_id}")
@n type of block_id: int
- Parameters
-
block_id ID of the block to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of volume IDs contained in the block.
◆ get_block_wedges()
| get_block_wedges | ( | block_id | ) |
Get the list of wedge IDs contained in a block.
This function returns the IDs of all wedge elements that are part of the specified block.
.. code-block:: python
for wedge_id in wedge_ids: print(f" Wedge ID: {wedge_id}")
@n type of block_id: int
- Parameters
-
block_id ID of the block to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of wedge IDs contained in the block.
◆ get_blocks_with_materials()
| get_blocks_with_materials | ( | ) |
Get all block IDs and their associated material IDs.
Returns a list of all existing block IDs and the corresponding material ID assigned to each. This function helps identify which blocks are assigned materials. Blocks without an assigned material will have a material ID of 0 in the returned pair.
.. code-block:: python
for pair in block_mats: print("Block", pair[0], "has material", pair[1])
@n return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- List of [block_id, material_id] pairs. Material ID is 0 if unassigned.
◆ get_blunt_tangency_default_depth()
| get_blunt_tangency_default_depth | ( | vert_id, | |
| angle, | |||
| add_material ) |
Computes the default depth used to blunt a tangency at a vertex.
Used with the `blunt tangency` command to eliminate small angles caused by fillets. This function estimates the default `depth` parameter based on the specified angle and whether material is added or removed.
.. code-block:: python
@n type of vert_id: int
- Parameters
-
vert_id ID of the vertex to modify.
type of angle: floatangle Desired target angle after blunting.
type of add_material: booleanadd_material If true, material is added; if false, material is removed. @n return type of : float
- Returns
- Suggested depth value for the operation.
◆ get_body_count()
| get_body_count | ( | ) |
Get the current number of bodies in the model.
.. code-block:: python
@n return type of : int
- Returns
- The number of bodies currently defined in the model.
◆ get_bolt_axis()
| get_bolt_axis | ( | vol_id | ) |
Get the normalized axis vector of a bolt volume.
Returns the primary axis direction of the specified bolt geometry, normalized to unit length. If the volume is invalid or the axis cannot be determined, the returned vector will be [0, 0, 0].
.. code-block:: python
type of vol_id: int
- Parameters
-
vol_id Volume ID representing a bolt geometry.
return type of : std::vector< double,std:: allocator< double > >
- Returns
- Normalized axis vector of the bolt, or [0, 0, 0] if invalid.
◆ get_bolt_clamped_members()
| get_bolt_clamped_members | ( | vol_ids, | |
| nearby_vols, | |||
| progress = None ) |
Identify clamped members associated with a bolt.
Returns the ordered list of volume IDs that represent the bolt's clamped components: * Bearing surface member * Sandwiched members (if any) * Threaded member If `nearby_vols` is empty, Cubit will automatically determine nearby volumes (less efficient). .. code-block:: python
for group in clamped: print(group)
@n type of vol_ids: std::vector< int,std::allocator< int > >
- Parameters
-
vol_ids List of bolt volume IDs.
type of nearby_vols: std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >nearby_vols Optional list of nearby volume IDs for each bolt. Leave empty to compute automatically.
type of progress: :py:class:CubitProgressHandler, optionalprogress Optional CubitProgressHandler for monitoring progress.
return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- : Nested list one entry per bolt, each a list of volume IDs representing clamped members.
◆ get_bolt_coordinate_system()
| get_bolt_coordinate_system | ( | geom_type, | |
| id ) |
Get local coordinate system for a bolt or bolt hole.
Returns the coordinate system as three 3D points defining the origin, the Z-direction point, and a point in the XZ plane. This is useful for aligning or analyzing bolt and hole geometry in local space. For hole-based queries, only one surface from the hole is needed; it must uniquely identify the hole. .. code-block:: python
@n type of geom_type: string
- Parameters
-
geom_type "bolt" for bolt volume or "hole" for hole surface.
type of id: intid Volume ID for bolts or surface ID from the hole geometry.
return type of : std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std:: allocator< double > > > >
- Returns
- : Three 3D points as vectors origin, Z-direction point, and XZ-plane point.
◆ get_bolt_diameters()
| get_bolt_diameters | ( | vol_ids | ) |
Get the shank diameters of specified bolt volumes.
Returns the estimated shank diameter for each volume in the input list. Volumes that are invalid or for which the diameter cannot be determined will return a value of 0.
.. code-block:: python
type of vol_ids: std::vector< int,std::allocator< int > >
- Parameters
-
vol_ids Volume IDs representing bolt geometries.
return type of : std::vector< double,std:: allocator< double > >
- Returns
- Vector of shank diameters (in same order as vol_ids).
◆ get_bolt_holes()
| get_bolt_holes | ( | geo_type, | |
| clamped_members, | |||
| radius_threshold, | |||
| gap_threshold ) |
Identify upper and lower pilot hole surfaces from clamped members.
Analyzes the provided volumes or blocks to extract the top and bottom surfaces of pilot holes (e.g., for bolts) based on radius and proximity criteria. The output can be passed directly to reduce bolt commands.
.. code-block:: python
@n type of geo_type: string
- Parameters
-
geo_type "volume" or "block", specifying clamped member type.
type of clamped_members: std::vector< int,std::allocator< int > >clamped_members IDs of volumes or blocks with candidate pilot holes.
type of radius_threshold: floatradius_threshold Maximum radius for a hole to be considered.
type of gap_threshold: floatgap_threshold Maximum separation for concentric hole matching. @n return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- A vector of two surface ID lists:
- First list: upper hole surfaces.
- Second list: lower hole surfaces (may include more than one per hole).
◆ get_bolt_holes_info()
| get_bolt_holes_info | ( | geo_type, | |
| clamped_members, | |||
| radius_threshold, | |||
| gap_threshold ) |
Identify concentric pilot holes across clamped members.
Analyzes a list of clamped volumes or blocks to identify sets of concentric holes that qualify as bolt pilot holes, based on a maximum radius and proximity criteria. Returns detailed information including hole surfaces, radii, axes, and associated volumes.
.. code-block:: python
for hole in pilot_holes: print("Bearing volume:", hole.bearingVolume, "radius:", hole.bearingRadius)
@n type of geo_type: string
- Parameters
-
geo_type "volume" or "block", specifying how the clamped members are defined.
type of clamped_members: std::vector< int,std::allocator< int > >clamped_members IDs of volumes or blocks potentially containing pilot holes.
type of radius_threshold: floatradius_threshold Maximum hole radius to be considered a pilot hole.
type of gap_threshold: floatgap_threshold Maximum gap between concentric holes to be treated as aligned. @n return type of : std::vector< BoltHoleInfo,std:: allocator< BoltHoleInfo > >
- Returns
- A list of BoltHoleInfo structs containing:
- bearing hole surface IDs and volume,
- bearing hole axis and radius,
- thread hole surface IDs, volumes, axes, and radii,
- bounding box of the full hole set and total volume.
◆ get_bolt_shigley_radius()
| get_bolt_shigley_radius | ( | bolt_id, | |
| angle, | |||
| washer_id = 0 ) |
Get the equivalent Shigley frustum radius at the bolt interface.
Calculates the radius of a Shigley-style frustum representing the stress cone between upper and lower volumes surrounding a bolt. This is typically used to evaluate stress distribution. A standard angle of 30 degrees is common.
Optionally accounts for a washer in the bolt-washer clamp mechanism by specifying its entity ID (set to 0 if no washer is used).
.. code-block:: c++
type of bolt_id: int
- Parameters
-
bolt_id ID of the bolt volume entity.
type of washer_id: int, optionalwasher_id Optional ID of the washer entity in the bolt-washer mechanism (use 0 if none).
type of angle: floatangle Cone half-angle in degrees (typical value is 30).
return type of : float
- Returns
- Radius at the bolt interface, or x1 if it cannot be computed.
◆ get_bolt_washer()
| get_bolt_washer | ( | bolt_id | ) |
Get the washer volume ID associated with a given bolt.
Returns the volume ID of the washer corresponding to the specified bolt ID. If no washer is associated with the bolt, the function returns 0. .. code-block:: python
@n type of bolt_id: int
- Parameters
-
bolt_id The ID of the bolt whose washer volume ID is requested.
return type of : int
- Returns
- The volume ID of the washer associated with the bolt, or 0 if none exists.
◆ get_bolts_in_clamped_members()
| get_bolts_in_clamped_members | ( | geo_type, | |
| clamped_vols, | |||
| candidate_bolts ) |
Identify bolts clamping the given volumes or blocks.
Performs ML-based classification on provided candidate volumes to identify which are bolts, then checks which of those bolts clamp the specified clamped members.
.. code-block:: python
@n type of geo_type: string
- Parameters
-
geo_type "volume" or "block", indicating the type of clamped entities.
type of clamped_vols: std::vector< int,std::allocator< int > >clamped_vols List of volume or block IDs that are clamped by one or more bolts.
type of candidate_bolts: std::vector< int,std::allocator< int > >candidate_bolts Volumes to consider as potential bolts. ML classification is run on them to identify actual bolts.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of volume IDs classified as bolts that clamp the given entities.
◆ get_bool_sculpt_default()
| get_bool_sculpt_default | ( | variable | ) |
Retrieve default boolean-valued sculpt parameter.
Matches the input variable name substring to known sculpt parameters and returns its default.
Title Available boolean parameters
- OVERWRITE
- EXECUTE
- VOID
- SEPARATE_VOID_BLOCKS
- HTET * PATH_ABSOLUTE, PATH_COMMAND* CLEAN, SHOW, IMPORT, COMBINE
- BBOX_EXPAND
- GEN_INPUT_FILE
- PERIODIC * PILLOW_SURFACES, PILLOW_CURVES, PILLOW_BOUNDARIES, PILLOW_SMOOTH
- DEFEATURE_BBOX * ADAPT_EXPORT, ADAPT_NON_MANIFOLD, USE_DEFAULT_ADAPT_THRESHOLD* QUALITY, COMPARE_VOLUME, COMPUTE_SS_STATS* WRITE_GEOM, WRITE_MBG
- UNIQUE_GENESIS_IDS
type of variable: string
- Parameters
-
variable Name of the sculpt parameter substring.
return type of : boolean
- Returns
- Default boolean value for the specified parameter.
◆ get_boundary_layer_algorithm()
| get_boundary_layer_algorithm | ( | boundary_layer_id | ) |
Get the algorithm type used by the specified boundary layer.
Returns the name of the algorithm (e.g., "Structured", "Unstructured").
type of boundary_layer_id: int
- Parameters
-
boundary_layer_id ID of the boundary layer.
return type of : string
- Returns
- Algorithm name as a string.
◆ get_boundary_layer_continuity()
| get_boundary_layer_continuity | ( | boundary_layer_id | ) |
Get the continuity setting of a boundary layer.
Indicates whether the boundary layer is continuous across adjacent entities.
type of boundary_layer_id: int
- Parameters
-
boundary_layer_id ID of the boundary layer.
return type of : boolean
- Returns
- True if the boundary layer is continuous; otherwise false.
◆ get_boundary_layer_id_list()
| get_boundary_layer_id_list | ( | ) |
Get a list of all defined boundary layer IDs.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of boundary layer IDs currently defined in the model.
◆ get_boundary_layers_by_base()
| get_boundary_layers_by_base | ( | base_type, | |
| base_id ) |
Get all boundary layers associated with a specified base entity.
Retrieves boundary layer IDs that use the given base entity.
type of base_type: string
- Parameters
-
base_type Type of base entity (e.g., "surface", "volume").
type of base_id: intbase_id ID of the base entity.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of boundary layer IDs using the specified base.
◆ get_boundary_layers_by_pair()
| get_boundary_layers_by_pair | ( | base_type, | |
| base_id, | |||
| parent_id ) |
Get all boundary layers associated with a base-parent pair.
Returns boundary layers defined using both the base and parent entities.
type of base_type: string
- Parameters
-
base_type Type of base entity (e.g., "surface", "volume").
type of base_id: intbase_id ID of the base entity.
type of parent_id: intparent_id ID of the parent entity.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of boundary layer IDs that match the base-parent pair.
◆ get_bounding_box()
| get_bounding_box | ( | geometry_type, | |
| entity_id ) |
Get the axis-aligned bounding box for a specified entity.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Specifies the geometry type ("body", "volume", "surface", "curve", or "vertex").
type of entity_id: intentity_id ID of the entity.
return type of : std:: array< double,10 >
- Returns
- A 10-element array containing the bounding box parameters.
Title: Array contents
- [0] min x coordinate
- [1] max x coordinate
- [2] x-range (max x ? min x)
- [3] min y coordinate
- [4] max y coordinate
- [5] y-range (max y ? min y)
- [6] min z coordinate
- [7] max z coordinate
- [8] z-range (max z ? min z)
- [9] diagonal length of the box
◆ get_build_number()
| get_build_number | ( | ) |
Retrieve the Cubit build number.
Returns the build identifier for the current Cubit binary.
.. code-block:: python
@n return type of : string
- Returns
- A string containing the current Cubit build number.
◆ get_cavity_surfaces()
| get_cavity_surfaces | ( | surface_id | ) |
Return the surfaces in the cavity adjacent to the specified surface.
The function returns a list of surface IDs that belong to the same cavity as the given surface. The input surface_id must already be part of a cavity. The result includes surface_id itself.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id Surface ID that is part of a cavity.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list of surface IDs belonging to the cavity (includes surface_id itself).
◆ get_center_point()
| get_center_point | ( | entity_type, | |
| entity_id ) |
Get the 3D center or coordinates of a specified entity.
Returns the centroid for geometry entities (body, volume, surface), midpoint for curves, coordinates for vertices, or center for mesh entities (node, edge, face, tri, quad, hex, tet, wedge, pyramid, sphere).
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Entity type: "body", "volume", "surface", "curve", "vertex", "node", "edge", "face", "tri", "quad", "hex", "tet", "wedge", "pyramid", or "sphere".
type of entity_id: intentity_id ID of the entity to query.
return type of : std:: array< double,3 >
- Returns
- A 3-element array [x, y, z] representing the entity's center or vertex coordinates.
◆ get_cfd_type()
| get_cfd_type | ( | entity_id | ) |
Get the CFD boundary condition subtype.
type of entity_id: int
- Parameters
-
entity_id ID of the CFD boundary condition.
return type of : int
- Returns
- CFD type as defined in CI_BCTypes.
◆ get_chamfer_chain_collections()
| get_chamfer_chain_collections | ( | volume_list, | |
| thickness_threshold ) |
Return collections of surfaces that form chamfer chains in the specified volumes.
A chamfer chain is a group of contiguous planar surfaces that together form a chamfer feature. Chamfer chains are filtered by their computed thickness (distance between chamfer edges). If thickness_threshold is provided, only chamfer chains with thickness less than this value are returned.
.. code-block:: python
for surfaces, thickness in chamfer_collections: print("Chamfer chain surfaces:", tuple(surfaces), "Thickness:", thickness)
@n type of volume_list: std::vector< int,std::allocator< int > >
- Parameters
-
volume_list List of volume IDs to query.
type of thickness_threshold: floatthickness_threshold Return only chamfer chains whose computed thickness is less than this value.
return type of : std::vector< std::pair< std::vector< int,std::allocator< int > >,double >,std::allocator< std::pair< std::vector< int,std:: allocator< int > >,double > > >
- Returns
- : A list of pairs each pair contains (1) a list of surface IDs defining a chamfer chain, and (2) the computed thickness of the chamfer chain.
◆ get_chamfer_chains()
| get_chamfer_chains | ( | surface_id | ) |
Returns the chamfer chains for a given surface.
Given a surface ID, this function returns all chamfer chains associated with that surface. If the surface is part of one or more chamfer chains, each chain will be returned as a list of surface IDs.
.. code-block:: python
for chain in chamfer_chains: print("Chamfer chain:", tuple(chain))
@n type of surface_id: int
- Parameters
-
surface_id Surface to retrieve the chamfer chains from.
return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- A list of lists of surface IDs in each chamfer chain.
- Note
- If using Python, lists will be returned as Python tuples.
◆ get_chamfer_surfaces()
| get_chamfer_surfaces | ( | target_volume_ids, | |
| thickness_threshold ) |
Get the list of chamfer surfaces for a list of volumes.
type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids List of volume ids to examine.
type of thickness_threshold: floatthickness_threshold max thickness criteria for chamfer
return type of : std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std:: allocator< double > > > >
- Returns
- List (python tuple) of chamfer surface ids (as doubles) and their thicknesses
◆ get_close_loop_thickness()
| get_close_loop_thickness | ( | surface_id | ) |
Compute the minimum separation distance between loops on a surface.
For a surface with two or more boundary loops, returns the smallest distance between any two loops. If the surface has fewer than two loops, returns 0.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to measure.
return type of : float
- Returns
- Minimum loop-to-loop distance (thickness). Returns 0 if fewer than two loops.
◆ get_close_loops()
| get_close_loops | ( | target_volume_ids, | |
| mesh_size ) |
Find faces with multiple loops closer than a given threshold.
Iterates over all faces of volumes in target_volume_ids. A face is included if it has two or more boundary loops and the minimum distance between any two loops is <= mesh_size. This differs from get_narrow_regions and get_surfs_with_narrow_regions by only checking loop-to-loop proximity on faces with multiple loops, rather than edge splits or oriented edge-pair tests.
.. code-block:: python
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
type of mesh_size: floatmesh_size Distance threshold for loop separation.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of surface IDs whose loops lie within mesh_size of each other.
◆ get_close_loops_with_thickness()
| get_close_loops_with_thickness | ( | target_volume_ids, | |
| mesh_size, | |||
| genus ) |
Find faces with multiple loops closer than a threshold and return their minimum loop separations.
Iterates over all faces of volumes in target_volume_ids. A face is included if it has (genus + 1) loops (where genus = num_loops - 1) and the minimum distance between any two loops is <= mesh_size. Returns a list of [surface_id, min_distance] pairs for each qualifying face. This function differs from get_close_loops by filtering faces by genus and also returning the minimum loop-to-loop distance for each face.
.. code-block:: python
for sid, dist in results: print("Surface", sid, "has min loop distance", dist) # expect: Surface 9 has min loop distance 1.0
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
type of mesh_size: floatmesh_size Distance threshold for loop separation.
type of genus: intgenus Number of loops minus one. To return faces of any genus, use genus < 0.
return type of : std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std:: allocator< double > > > >
- Returns
- Vector of [surface_id, min_distance] for each face whose loops lie within mesh_size and match the specified genus.
◆ get_close_vertex_curve_pairs()
| get_close_vertex_curve_pairs | ( | target_volume_ids, | |
| high_tolerance ) |
Find pairs of vertices and curves within a specified tolerance across given volumes.
Unlike get_coincident_vertices, which identifies vertices that coincide with other vertices, this function finds vertices that lie within high_tolerance of a curve. Iterates over all vertices and curves of volumes in target_volume_ids and returns pairs whose shortest distance is <= high_tolerance.
.. code-block:: python
for i in range(0, len(pairs), 2): print("Vertex", pairs[i], "is close to Curve", pairs[i+1])
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
type of high_tolerance: floathigh_tolerance Distance threshold below which a vertex and a curve are considered close.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Flat vector of [vertex_id, curve_id, ...] representing close vertex-curve pairs.
◆ get_closed_narrow_surfaces()
| get_closed_narrow_surfaces | ( | target_ids, | |
| narrow_size ) |
Find faces on closed surfaces whose two boundary edges remain within a distance threshold.
A surface is "closed in U" (or "closed in V") if traversing its U (or V) parameter from minimum to maximum returns to the same point (no open edge). For each face of volumes in target_ids, the following criteria are applied: - The underlying surface is closed in U or V (no open boundary in that parametric direction). - The face has exactly two loops and exactly two edges (inner and outer boundaries). - Sampling five points uniformly along one edge, each point's shortest distance to the other edge must be <= narrow_size. Faces meeting all criteria are returned. This function differs from get_narrow_regions and get_surfs_with_narrow_regions by only considering closed two-loop faces and sampling along their boundary loops, rather than testing all faces or arbitrary edge pairs.
.. code-block:: python
@n type of target_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_ids Vector of volume IDs whose faces are checked.
type of narrow_size: floatnarrow_size Distance threshold for edge proximity.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of IDs of faces whose underlying surface is closed in U or V, has two loops, and whose two edges remain within narrow_size.
◆ get_closest_node()
| get_closest_node | ( | x_coordinate, | |
| y_coordinate, | |||
| z_coordinate ) |
Find the mesh node closest to a given point.
This function searches the current mesh and returns the ID of the node whose coordinates are nearest to the specified (x, y, z) point. If the mesh contains no nodes, it returns 0.
.. code-block:: python
@n type of x_coordinate: float
- Parameters
-
x_coordinate X coordinate of the query point.
type of y_coordinate: floaty_coordinate Y coordinate of the query point.
type of z_coordinate: floatz_coordinate Z coordinate of the query point.
return type of : int
- Returns
- ID of the closest node, or 0 if no nodes are present.
◆ get_coincident_vertices()
| get_coincident_vertices | ( | target_volume_ids, | |
| high_tolerance ) |
Find vertex pairs within a specified tolerance across given volumes.
Iterates over all vertices of volumes in target_volume_ids and identifies pairs whose distance is <= high_tolerance. Returns a flat list of vertex ID pairs: [v1_a, v1_b, v2_a, v2_b, . . .].
.. code-block:: python
for i in range(0, len(pairs), 2): print("Coincident pair:", pairs[i], "and", pairs[i+1])
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
type of high_tolerance: floathigh_tolerance Distance threshold below which two vertices are considered coincident.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Flat vector of vertex ID pairs [v1, v2, v3, v4, . . .] representing coincident vertices.
◆ get_command_from_history()
| get_command_from_history | ( | command_number | ) |
Retrieve a specific command from Cubit's history buffer.
.. code-block:: python
for i in range(count): print(cubit.get_command_from_history(i))
@n type of command_number: int
- Parameters
-
command_number Zero-based index into the history buffer.
return type of : string
- Returns
- The command string at the given index.
◆ get_command_history_count()
| get_command_history_count | ( | ) |
Get the number of commands in Cubit's history buffer.
.. code-block:: python
@n return type of : int
- Returns
- The total number of commands stored in history.
◆ get_common_curve_id()
| get_common_curve_id | ( | surface_1_id, | |
| surface_2_id ) |
Return a curve shared by two surfaces.
Finds the curve that bounds both input surfaces. Assumes both surface IDs are valid and that only topologically adjacent surfaces can share a curve. Returns -1 if no shared curve exists.
.. code-block:: python
@n type of surface_1_id: int
- Parameters
-
surface_1_id ID of the first surface.
type of surface_2_id: intsurface_2_id ID of the second surface.
return type of : int
- Returns
- ID of the shared curve, or -1 if none exists.
◆ get_common_vertex_id()
| get_common_vertex_id | ( | curve_1_id, | |
| curve_2_id ) |
Return a vertex shared by two curves.
Finds the vertex that bounds both input curves. Assumes both curves exist and that only adjacent curves share a vertex. Returns 0 if no shared vertex exists.
.. code-block:: python
cubit.cmd("brick x 10") // curves 1-12
vid = cubit.get_common_vertex_id(1, 2) // expected: 2
@n type of curve_1_id: int
- Parameters
-
curve_1_id ID of the first curve.
type of curve_2_id: intcurve_2_id ID of the second curve.
return type of : int
- Returns
- ID of the shared vertex, or 0 if none exists.
◆ get_cone_surfaces()
| get_cone_surfaces | ( | target_volume_ids | ) |
Identify full conical surfaces in given volumes.
Detects conical surfaces within the specified volumes that are represented by a single, unsplit surface. Cones that are split into mirrored surface pairs are intentionally not identified by this function. Use get_surface_cone_collections() if detection of both full and split (mirrored) cones is required.
.. code-block:: python
type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids List of volume IDs to analyze.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of surface IDs corresponding to full, unsplit cone surfaces.
◆ get_connected_surfaces()
| get_connected_surfaces | ( | surf_ids | ) |
Find surfaces connected to a given set of surfaces.
Given a list of surface IDs, this function groups them into "patches" of connected surfaces (connection means sharing a common curve). Merged surfaces are always excluded.
Title Behavior based on the number of patches found:
- If the input surfaces form a single patch, return all surfaces connected to that patch (excluding merged surfaces).
- If the input surfaces form exactly two separate patches, return all surfaces that lie between those two patches (excluding merged surfaces), plus the original patches.
- If the input surfaces form more than two patches, return an empty list.
.. code-block:: python
- Parameters
-
surface_ids IDs of the surfaces to start from.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list (vector or Python tuple) of surface IDs that satisfy the connectivity rules above.
◆ get_connectivity()
| get_connectivity | ( | entity_type, | |
| entity_id ) |
Get the list of node IDs comprising a mesh element.
This function returns the connectivity of the specified mesh element by listing the IDs of its corner nodes. The ordering of nodes follows the Exodus convention; see the Exodus documentation for the element type-specific node ordering.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Mesh element type (e.g., "hex", "tet", "tri", "quad").
type of entity_id: intentity_id ID of the mesh element.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of node IDs defining the element's connectivity.
◆ get_constraint_dependent_entity_point()
| get_constraint_dependent_entity_point | ( | constraint_id | ) |
Get the dependent entity of a specified constraint.
type of constraint_id: int
- Parameters
-
constraint_id ID of the constraint.
return type of : string
- Returns
- Dependent entity as a string.
◆ get_constraint_reference_point()
| get_constraint_reference_point | ( | constraint_id | ) |
Get the reference point of a specified constraint.
type of constraint_id: int
- Parameters
-
constraint_id ID of the constraint.
return type of : string
- Returns
- Reference point as a string.
◆ get_constraint_type()
| get_constraint_type | ( | constraint_id | ) |
Get the type of a specified constraint.
type of constraint_id: int
- Parameters
-
constraint_id ID of the constraint.
return type of : string
- Returns
- : Constraint type "Kinematic", "Distributing", or "Rigidbody".
◆ get_contact_pair_exterior_state()
| get_contact_pair_exterior_state | ( | entity_id | ) |
Get the exterior state of a contact pair.
type of entity_id: int
- Parameters
-
entity_id ID of the contact pair.
return type of : boolean
- Returns
- True if contact is considered exterior.
◆ get_contact_pair_friction_value()
| get_contact_pair_friction_value | ( | entity_id | ) |
Get the friction value for a contact pair.
type of entity_id: int
- Parameters
-
entity_id ID of the contact pair.
return type of : float
- Returns
- Friction value.
◆ get_contact_pair_general_state()
| get_contact_pair_general_state | ( | entity_id | ) |
Get the general contact state.
type of entity_id: int
- Parameters
-
entity_id ID of the contact pair.
return type of : boolean
- Returns
- True if general contact is active.
◆ get_contact_pair_tied_state()
| get_contact_pair_tied_state | ( | entity_id | ) |
Get the tied state of a contact pair.
type of entity_id: int
- Parameters
-
entity_id ID of the contact pair.
return type of : boolean
- Returns
- True if tied state is active.
◆ get_contact_pair_tol_lower_value()
| get_contact_pair_tol_lower_value | ( | entity_id | ) |
Get the lower bound tolerance for a contact pair.
type of entity_id: int
- Parameters
-
entity_id ID of the contact pair.
return type of : float
- Returns
- Lower tolerance value.
◆ get_contact_pair_tolerance_value()
| get_contact_pair_tolerance_value | ( | entity_id | ) |
Get the upper bound tolerance for a contact pair.
type of entity_id: int
- Parameters
-
entity_id ID of the contact pair.
return type of : float
- Returns
- Upper tolerance value.
◆ get_continuous_curve_collections()
| get_continuous_curve_collections | ( | volume_list, | |
| angle_tolerance = -1 ) |
Returns collections of continuous curves in the given volumes.
Continuous curves are defined as curves connected at 2-valent vertices, where the tangents at the common vertex form an angle of 180 degrees +/- the specified angle tolerance.
.. code-block:: python
for curve_ids, total_length in collections: print("Curve IDs:", curve_ids, "Length:", total_length)
@n type of volume_list: std::vector< int,std::allocator< int > >
- Parameters
-
volume_list List of volume IDs to query.
type of angle_tolerance: float, optionalangle_tolerance Tangent angle tolerance in degrees. Continuous curves must have tangents at 180 +/- this tolerance. If angle_tolerance < 0 or not specified, defaults to 10 degrees.
return type of : std::vector< std::pair< std::vector< int,std::allocator< int > >,double >,std::allocator< std::pair< std::vector< int,std:: allocator< int > >,double > > >
- Returns
- : Ordered list of pairs (1) vector of contiguous curve IDs forming a continuous curve, (2) total length of the curves. The list is ordered from smallest to largest total length.
◆ get_continuous_curves()
| get_continuous_curves | ( | curve_id, | |
| angle_tol, | |||
| require_two_valent = False ) |
Return the list of adjacent continuous curves.
Two curves are considered continuous if the angle between them at a shared vertex is 180 degrees +/- angle_tol. The returned list includes the input curve_id and any connected continuous curves. If require_two_valent is true, continuity does not extend across vertices connected to more than two curves.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id Curve ID to query.
type of angle_tol: floatangle_tol Angle tolerance for continuity (degrees).
type of require_two_valent: boolean, optionalrequire_two_valent If true, continuity does not extend across vertices with more than two adjacent curves.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list of curve IDs in the continuous set (including curve_id).
◆ get_continuous_surface_collections()
| get_continuous_surface_collections | ( | volume_list, | |
| angle_tolerance = -1 ) |
Returns collections of continuous surfaces in the given volumes.
Continuous surfaces are defined as surfaces connected at 2-valent curves, where the surface normals at the common curve form an angle of 180 degrees +/- the specified angle tolerance.
.. code-block:: python
for surface_ids, total_area in collections: print("Surface IDs:", surface_ids, "Area:", total_area)
@n type of volume_list: std::vector< int,std::allocator< int > >
- Parameters
-
volume_list List of volume IDs to query.
type of angle_tolerance: float, optionalangle_tolerance Normal angle tolerance in degrees. Continuous surfaces must have normals at 180 +/- this tolerance. If angle_tolerance < 0 or not specified, defaults to 10 degrees.
return type of : std::vector< std::pair< std::vector< int,std::allocator< int > >,double >,std::allocator< std::pair< std::vector< int,std:: allocator< int > >,double > > >
- Returns
- : Ordered list of pairs (1) vector of contiguous surface IDs forming a continuous patch, (2) total area of the surfaces. The list is ordered from smallest to largest total area.
◆ get_continuous_surfaces()
| get_continuous_surfaces | ( | surface_id, | |
| angle_tol ) |
Return the list of adjacent continuous surfaces.
Two surfaces are considered continuous if the exterior angle between them at a shared curve is 180 degrees +/- angle_tol. The returned list includes the input surface_id and any connected continuous surfaces.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id Surface ID to query.
type of angle_tol: floatangle_tol Angle tolerance for continuity (degrees).
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list of surface IDs in the continuous set (including surface_id).
◆ get_convection_coefficient()
| get_convection_coefficient | ( | entity_id, | |
| bc_type_enum ) |
Get convection coefficient from a convection BC.
type of entity_id: int
- Parameters
-
entity_id ID of the convection BC.
type of bc_type_enum: intbc_type_enum CI_BCEntityTypes: 1 (normal), 5 (shell top), 6 (shell bottom).
return type of : float
- Returns
- Convection coefficient value.
◆ get_coordinate_systems_id_list()
| get_coordinate_systems_id_list | ( | ) |
Returns a list of coordinate system IDs.
Retrieves the IDs of all coordinate systems currently defined in the model. In Python, the returned list is a tuple of IDs.
.. code-block:: python
@n return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of coordinate system IDs.
◆ get_copy_block_on_geometry_copy_setting()
| get_copy_block_on_geometry_copy_setting | ( | ) |
Get the current block behavior setting for geometry copy.
When a geometric entity is copied, this setting controls how blocks are propagated: - "OFF": Copied geometry/mesh is not included in any block. - "use_original": Copied geometry/mesh is added to the original block. - "on": New blocks are created for the copied geometry/mesh, mirroring the originals.
.. code-block:: python
@n return type of : string
- Returns
- Current copy block on geometry copy setting ("on", "OFF", or "use_original").
◆ get_copy_nodeset_on_geometry_copy_setting()
| get_copy_nodeset_on_geometry_copy_setting | ( | ) |
Get the current nodeset behavior setting for geometry copy.
When a geometric entity is copied, this setting controls how nodesets are propagated: - "OFF": Copied geometry/mesh is not included in any nodeset. - "use_original": Copied geometry/mesh is added to the original nodeset. - "on": New nodesets are created for the copied geometry/mesh, mirroring the originals.
.. code-block:: python
@n return type of : string
- Returns
- Current copy nodeset on geometry copy setting ("on", "OFF", or "use_original").
◆ get_copy_sideset_on_geometry_copy_setting()
| get_copy_sideset_on_geometry_copy_setting | ( | ) |
Get the current sideset behavior setting for geometry copy.
When a geometric entity is copied, this setting controls how sidesets are propagated: - "OFF": Copied geometry/mesh is not included in any sideset. - "use_original": Copied geometry/mesh is added to the original sideset. - "on": New sidesets are created for the copied geometry/mesh, mirroring the originals.
.. code-block:: python
@n return type of : string
- Returns
- Current copy sideset on geometry copy setting ("on", "OFF", or "use_original").
◆ get_cubit_digits_setting()
| get_cubit_digits_setting | ( | ) |
Retrieve the current Cubit "digits" setting.
Returns the number of digits after the decimal point that Cubit uses when printing numeric output. This corresponds to the value set by the Cubit command `set digits N`.
.. code-block:: python
@n return type of : float
- Returns
- The number of decimal digits Cubit will print, or -1 if no setting exists.
◆ get_cubit_message_handler()
| get_cubit_message_handler | ( | ) |
Retrieve the current Cubit message handler.
Returns the handler instance currently receiving Cubit messages.
.. code-block:: python
@n return type of : :py:class: `CubitMessageHandler`
- Returns
- Shared pointer to the active CubitMessageHandler.
◆ get_current_ids()
| get_current_ids | ( | entity_type | ) |
Retrieve IDs of all current geometry entities of a specified type.
Returns the IDs of every geometry entity matching the given type. Supported types are "body", "volume", "surface", "curve", and "vertex".
Notes To include mesh entities (e.g. "node", "element"), use get_entities().
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Geometry entity type: "body", "volume", "surface", "curve", or "vertex".
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A vector<int> (or Python tuple) of IDs of all current geometry entities of the specified type.
◆ get_current_journal_file()
| get_current_journal_file | ( | ) |
Get the filename of the current journal file.
Returns the path to the active journal file. With journaling on by default, this shows which file Cubit is writing to upon startup.
.. code-block:: python
@n return type of : string
- Returns
- The full path to the active journal file, or an empty string if journaling is off.
◆ get_curve_bias_coarse_size()
| get_curve_bias_coarse_size | ( | curve_id | ) |
Get the "coarse size" parameter for a biased curve, if set.
Returns the user-specified "coarse" interval size for the curve's bias scheme. If no coarse size is set, returns 0.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose coarse size is retrieved.
return type of : float
- Returns
- Coarse interval size (double > 0), or 0 if not defined.
◆ get_curve_bias_fine_size()
| get_curve_bias_fine_size | ( | curve_id | ) |
Get the "fine size" parameter for a biased curve, if set.
Returns the user-specified "fine" interval size for the curve's bias scheme. If no fine size is set, returns 0.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose fine size is retrieved.
return type of : float
- Returns
- Fine interval size (double > 0), or 0 if not defined.
◆ get_curve_bias_first_interval_fraction()
| get_curve_bias_first_interval_fraction | ( | curve_id | ) |
Retrieve the fraction of curve length used as the first interval size.
Returns the first interval length expressed as a fraction of total curve length. (e.g., if fraction = 0.25, the first interval = 0.25 * curve_length).
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose first interval fraction is retrieved.
return type of : float
- Returns
- Fraction (0 < fraction <= 1) of total curve length, or 0 if not set.
◆ get_curve_bias_first_interval_length()
| get_curve_bias_first_interval_length | ( | curve_id | ) |
Query the length of the first interval on a biased curve.
Returns the absolute length of the first (smallest) mesh interval on the curve. This corresponds to the "first_delta" if that form was used, or the automatically computed value. @n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose first interval length is retrieved.
return type of : float
- Returns
- Length of the first mesh interval (double > 0), or 0 if not set.
.. code-block:: python
◆ get_curve_bias_first_last_ratio1()
| get_curve_bias_first_last_ratio1 | ( | curve_id | ) |
Retrieve the ratio of first-to-last interval at the start of a biased curve.
Returns the ratio of the length of the first interval to the last interval at the curve's start vertex. Useful for understanding how aggressively the mesh is biased at the beginning.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose start ratio is retrieved.
return type of : float
- Returns
- Ratio (double > 0) of first interval length to last interval length at start.
◆ get_curve_bias_first_last_ratio2()
| get_curve_bias_first_last_ratio2 | ( | curve_id | ) |
Retrieve the ratio of first-to-last interval at the end of a biased curve.
Returns the ratio of the length of the first interval to the last interval at the curve's end vertex. Useful for understanding how aggressively the mesh is biased near the end.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose end ratio is retrieved.
return type of : float
- Returns
- Ratio (double > 0) of first interval length to last interval length at end.
◆ get_curve_bias_from_start()
| get_curve_bias_from_start | ( | curve_id, | |
| value ) |
Determine if the bias is measured from the curve's start vertex.
By default, any "bias" scheme is applied from the start vertex. If you call "curve <id> reverse bias", this flips the progression so it is measured from the end. This function sets the output boolean to true if the bias progression begins at the start vertex, or false if it was reversed.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve to query.
type of value: boolean, outvalue Set to true if bias is from the start vertex; false if reversed or not set.
return type of : boolean
- Returns
- True if the curve exists (and output is written); false if curve_id is invalid.
◆ get_curve_bias_from_start_set()
| get_curve_bias_from_start_set | ( | curve_id | ) |
Check if the "bias from start" flag has been explicitly set on a curve.
Returns true if the bias-from-start setting (or "reverse bias") has been defined for this curve. If the curve is unmeshed but you have never called "reverse bias", this may still report true (default).
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve to query.
return type of : boolean
- Returns
- True if bias-from-start (or reverse) has been defined; false if not or curve invalid.
◆ get_curve_bias_geometric_factor()
| get_curve_bias_geometric_factor | ( | curve_id | ) |
Get the primary geometric progression factor used for biasing a curve.
Retrieves the ratio between successive edge lengths at the start of the curve. This "factor" defines the geometric progression for a biased mesh from the first vertex. @n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose first bias factor is retrieved.
return type of : float
- Returns
- The first geometric bias factor (ratio > 0).
.. code-block:: python
◆ get_curve_bias_geometric_factor2()
| get_curve_bias_geometric_factor2 | ( | curve_id | ) |
Get the secondary geometric progression factor for a dual-bias curve.
Retrieves the same "factor" used from the end vertices toward the middle when using dualbias. For a dualbias, there is only one factor value (applied symmetrically from both ends). @n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose dualbias factor is retrieved.
return type of : float
- Returns
- The geometric factor (ratio > 0) for a dualbias curve.
.. code-block:: python
◆ get_curve_bias_last_first_ratio1()
| get_curve_bias_last_first_ratio1 | ( | curve_id | ) |
Retrieve the ratio of last-to-first interval at the start of a biased curve.
Returns the inverse of the first/last ratio at the curve's start vertex (i.e., last interval length / first interval length).
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose start inverse ratio is retrieved.
return type of : float
- Returns
- Ratio (double > 0) of last interval length to first interval length at start.
◆ get_curve_bias_last_first_ratio2()
| get_curve_bias_last_first_ratio2 | ( | curve_id | ) |
Retrieve the ratio of last-to-first interval at the end of a biased curve.
Returns the inverse of the first/last ratio at the curve's end vertex (i.e., last interval length / first interval length)
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose end inverse ratio is retrieved.
return type of : float
- Returns
- Ratio (double > 0) of last interval length to first interval length at end.
◆ get_curve_bias_start_vertex_id()
| get_curve_bias_start_vertex_id | ( | curve_id | ) |
Retrieve the vertex ID designated as the start of bias on a curve.
Returns the ID of the vertex used as the bias "start" point when using curve-based vertex sizes. If no custom start vertex is defined, returns -1.
.. code-block:: python
if start_vertex >= 0: print("Start vertex for bias:", start_vertex) # Should print 1
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose start-vertex is queried.
return type of : int
- Returns
- Vertex ID for the bias start, or -1 if not defined or invalid.
◆ get_curve_bias_type()
| get_curve_bias_type | ( | curve_id | ) |
Retrieve the bias scheme type applied to a curve.
Returns a string describing the bias scheme for the specified curve. Possible values include "Bias", "Dualbias", "Multi_bias", or "None". @n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose bias type is queried.
return type of : string
- Returns
- String indicating the curve's bias type.
.. code-block:: python
◆ get_curve_center()
| get_curve_center | ( | curve_id | ) |
Retrieve the center point of a specified curve.
Title Center computation
- For circular and elliptical arcs, returns the exact geometric center.
- For straight-line curves, returns the midpoint between endpoints.
- For all other curve types or if the center cannot be determined, returns (0, 0, 0).
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve to query.
return type of : std:: array< double,3 >
- Returns
- Three-element array {x, y, z} representing the curve's center or midpoint; returns {0, 0, 0} if undefined.
◆ get_curve_count()
| get_curve_count | ( | ) |
Get the current number of curves in the model.
.. code-block:: python
@n return type of : int
- Returns
- The number of curves currently defined in the model.
◆ get_curve_count_in_volumes()
| get_curve_count_in_volumes | ( | target_volume_ids | ) |
Get the current number of curves in the specified volumes.
.. code-block:: python
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids List of volume IDs to query.
return type of : int
- Returns
- The total number of curves contained in the specified volumes.
◆ get_curve_edges()
| get_curve_edges | ( | curve_id | ) |
Get the list of edge element IDs on a curve.
This function returns the IDs of all edge elements that are on the specified curve.
.. code-block:: python
for edge_id in edge_ids: print(f" Edge ID: {edge_id}")
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of edge element IDs on the curve.
◆ get_curve_length()
| get_curve_length | ( | curve_id | ) |
Get the 3D length of a specified curve.
This returns the physical length of the curve in model units. For closed curves (e.g., circles), it equals the circumference; for lines, the straight-line distance.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve to query.
return type of : float
- Returns
- The total 3D length of the curve in model units.
◆ get_curve_mesh_scheme_curvature()
| get_curve_mesh_scheme_curvature | ( | curve_id | ) |
Retrieve the curvature mesh scheme adaptation value for a curve.
Returns the double parameter that controls how node spacing adapts to local curvature. A value of zero produces nearly equal intervals; positive values concentrate nodes in high-curvature regions.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose curvature scheme value is retrieved.
return type of : float
- Returns
- Curvature adaptation value (double). Zero = uniform intervals.
◆ get_curve_mesh_scheme_pinpoint_locations()
| get_curve_mesh_scheme_pinpoint_locations | ( | curve_id | ) |
Retrieve the pinpoint mesh scheme locations for a curve.
Returns a list of absolute positions along the curve (measured from the start vertex) where nodes have been placed by the pinpoint scheme.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve whose pinpoint locations are retrieved.
return type of : std::vector< double,std:: allocator< double > >
- Returns
- std::vector<double> of positions along the curve where nodes are placed.
◆ get_curve_nodes()
| get_curve_nodes | ( | curve_id | ) |
Get the list of node IDs owned by a curve.
This function returns the IDs of nodes owned by the specified curve. Nodes on the bounding vertices of the curve are excluded.
.. code-block:: python
for node_id in curve_nodes: print(f" Node ID: {node_id}")
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of node IDs owned by the curve (excluding nodes on bounding vertices).
◆ get_curve_radius()
| get_curve_radius | ( | curve_id | ) |
Compute the radius of a specified curve.
Title Computation
- For circular arcs, returns the constant radius.
- For ellipses, parabolas, splines, helices, and hyperbolas, returns the radius of curvature at the midpoint (curvature evaluated and inverted; below numerical tolerance treated as infinite and returned as 0.0).
- For straight lines or invalid/unsupported curve IDs, returns 0.0.
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve to query.
return type of : float
- Returns
- Constant radius for circular arcs; radius of curvature at midpoint for other curved types; 0.0 for straight lines or invalid/unsupported IDs.
◆ get_curve_type()
| get_curve_type | ( | curve_id | ) |
Get the curve type for a specified curve.
Returns a descriptive string indicating the curve's geometry.
Title Available curve types
- Arc curve
- Ellipse curve
- Parabola curve
- Segmented/facet curve
- Spline curve
- Straight curve
- Point curve
- Helical curve
- Undefined curve type
.. code-block:: python
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve to query.
return type of : string
- Returns
- Descriptive string of the curve's geometry type.
◆ get_dbl_sculpt_default()
| get_dbl_sculpt_default | ( | variable | ) |
Retrieve the default value of a named sculpt parameter.
Matches the given substring against known double-valued sculpt parameters and returns its default.
Title Available parameters
- AUTO_SIZE
- OPT_THRESHOLD
- CURVE_OPT_THRESHOLD
- GQ_THRESHOLD
- DEFAULT_GEO_SMOOTH_MAX_DEVIATION
- PCOL_THRESHOLD
- DEG_THRESHOLD
- HTET_THRESHOLD
- ADAPT_THRESHOLD
- CAPTURE_ANGLE
- EXPAND_PERCENT
- THICKEN_VOID
- PILLOW_THRESHOLD
- REMOVE_BAD
- MIN_ELEM_THICKNESS * XTRANSLATE, YTRANSLATE, ZTRANSLATE* XSCALE, YSCALE, ZSCALE
type of variable: string
- Parameters
-
variable Substring of the sculpt parameter name to look up.
return type of : float
- Returns
- The default double value for the matched parameter.
◆ get_default_auto_size()
| get_default_auto_size | ( | ) |
Compute Cubit's heuristic default automatic mesh size for the current model.
Returns the target edge length determined by Cubit's auto-sizing heuristics (model dimensions, curve lengths, etc.). This is equivalent to running: .. code-block:: c++
and then querying:
.. code-block:: c++
.. code-block:: python
@n return type of : float
- Returns
- Target edge length computed by Cubit's auto-sizing algorithm.
◆ get_default_element_type()
| get_default_element_type | ( | ) |
Retrieve the current default element type for meshing.
.. code-block:: python
@n return type of : string
- 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()
| get_default_geometry_engine | ( | ) |
Get the name of the default modeler engine.
The default engine is the geometry kernel used for creating new geometry. ACIS is the default but can be changed to facet.
.. code-block:: python
@n return type of : string
- Returns
- : The name of the default modeler engine ACIS, CATIA, OCC, or facet.
◆ get_displacement_combine_type()
| get_displacement_combine_type | ( | entity_id | ) |
Get the combine method for a displacement BC.
Valid options include "Overwrite", "Average", "SmallestCombine", or "LargestCombine".
type of entity_id: int
- Parameters
-
entity_id ID of the displacement BC.
return type of : string
- Returns
- Combine method as a string.
◆ get_distance_between()
| get_distance_between | ( | vertex_id_1, | |
| vertex_id_2 ) |
Get the Euclidean distance between two vertices.
.. code-block:: python
@n type of vertex_id_1: int
- Parameters
-
vertex_id_1 ID of the first vertex.
type of vertex_id_2: intvertex_id_2 ID of the second vertex.
return type of : float
- Returns
- The straight-line distance between the two vertices.
◆ get_distance_between_entities()
| get_distance_between_entities | ( | geom_type_1, | |
| entity_id_1, | |||
| geom_type_2, | |||
| entity_id_2 ) |
Get the minimum distance between two geometry entities.
Computes the shortest straight-line distance between any point on the first entity and any point on the second entity. Supported entity types are "vertex", "curve", "surface", and "volume".
.. code-block:: python
@n type of geom_type_1: string
- Parameters
-
geom_type_1 Type of the first entity ("vertex", "curve", "surface", or "volume").
type of entity_id_1: intentity_id_1 ID of the first entity.
type of geom_type_2: stringgeom_type_2 Type of the second entity ("vertex", "curve", "surface", or "volume").
type of entity_id_2: intentity_id_2 ID of the second entity.
return type of : float
- Returns
- The minimum straight-line distance between the two specified entities.
◆ get_distance_from_curve_start()
| get_distance_from_curve_start | ( | x_coordinate, | |
| y_coordinate, | |||
| z_coordinate, | |||
| curve_id ) |
Get the distance along a curve from its start to the closest point on the curve.
If the given xyz is not exactly on the curve, the closest point on the curve is used.
.. code-block:: python
@n type of x_coordinate: float
- Parameters
-
x_coordinate X coordinate of the query point.
type of y_coordinate: floaty_coordinate Y coordinate of the query point.
type of z_coordinate: floatz_coordinate Z coordinate of the query point.
type of curve_id: intcurve_id ID of the curve to measure along.
return type of : float
- Returns
- The arc distance from the curve's start to the closest point on the curve to the specified xyz.
◆ get_edge_count()
| get_edge_count | ( | ) |
Retrieve the count of edges between surface elements in the current model.
For a volume mesh, only edges on the surface-between surface elements-are counted.
.. code-block:: python
@n return type of : int
- Returns
- Number of edges between surface elements in the current model's mesh.
◆ get_edge_global_element_id()
| get_edge_global_element_id | ( | edge_id | ) |
Get the Global Element ID for a specific edge element.
Cubit assigns a Global Element ID to each mesh element when it is placed into a block. This function returns the Global Element ID corresponding to the given local edge ID within its type-specific ID space.
.. code-block:: python
@n type of edge_id: int
- Parameters
-
edge_id Local edge element ID within its type-specific ID space.
return type of : int
- Returns
- Global Element ID for the specified edge, or 0 if not placed into a block.
◆ get_edges_to_swap()
| get_edges_to_swap | ( | curve_id | ) |
Get edges on triangles at a knife-edge curve that are candidates for swapping.
Given a curve that defines a knife-edge between two triangle-meshed surfaces, this function returns the IDs of mesh edges on the triangles at the curve that are good candidates for edge swapping. Swapping these edges can improve the local dihedral angles between adjacent triangles, resulting in larger available volumes for successful tet meshing. This function is commonly used as a postprocessing step after tri or tet meshing to identify edges that may be swapped to improve mesh quality. The Cubit command: ``Swap Edge <ids>`` can then be used to perform the actual swapping.
.. code-block:: python
if edge_ids: swap_cmd = "Swap Edge" for edge_id in edge_ids: swap_cmd += f" {edge_id}"
@n type of curve_id: int
- Parameters
-
curve_id ID of the curve defining the knife-edge.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of edge IDs that are good candidates for swapping.
◆ get_elem_quality_stats()
| get_elem_quality_stats | ( | entity_type, | |
| id_list, | |||
| metric_name, | |||
| single_threshold, | |||
| use_low_threshold, | |||
| low_threshold, | |||
| high_threshold, | |||
| make_group ) |
Python-friendly version of get_quality_stats without reference parameters.
Computes quality statistics and returns all results--including failing element IDs--in a single vector.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Geometry type ("edge", "tri", "quad", "tet", "hex").
type of id_list: std::vector< int,std::allocator< int > >id_list List of element IDs to evaluate.
type of metric_name: stringmetric_name Quality metric name (e.g., "scaled jacobian").
type of single_threshold: floatsingle_threshold Threshold when using a single bound.
type of use_low_threshold: booleanuse_low_threshold If true, apply [low_threshold, high_threshold]; otherwise use single_threshold.
type of low_threshold: floatlow_threshold Lower bound for quality range.
type of high_threshold: floathigh_threshold Upper bound for quality range.
type of make_group: booleanmake_group If true, create a group for failing elements and return its ID.
return type of : std::vector< double,std:: allocator< double > >
- Returns
- Vector<double> containing: [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] mesh_list size (n) [9..] mesh_list element IDs
◆ get_element_block()
| get_element_block | ( | element_id | ) |
Get the block ID containing a given global element.
In Cubit, elements receive a Global Element ID when placed into a block. This function returns the ID of the block that contains the specified global element. Returns 0 if the element is not assigned to any block. You can also use the interactive command `list element <global_id>` to see the block.
.. code-block:: python
@n type of element_id: int
- Parameters
-
element_id Global Element ID to query.
return type of : int
- Returns
- ID of the block containing the element, or 0 if none.
◆ get_element_budget()
| get_element_budget | ( | element_type, | |
| entity_id_list, | |||
| auto_factor ) |
Estimate the total element count for a set of volumes given size settings.
Calculates an approximate "element budget" (total number of elements) for the specified volumes, based on the current mesh size factor and element type. For hexahedral meshes, the target edge length (esize) is related to the model volume (Vmodel) and the hex count (Nhex) by: .. code-block:: c++
Solving for Nhex gives:
.. code-block:: c++
For tetrahedral meshes, the element count is roughly seven times that of a hex mesh with the same edge length (i.e., Ntet ~ 7 * Nhex)
.. code-block:: python
@n type of element_type: string
- Parameters
-
element_type Element type: "hex" or "tet". Determines whether to estimate a hexahedral or tetrahedral budget.
type of entity_id_list: std::vector< int,std::allocator< int > >entity_id_list Vector of volume IDs over which to compute the total model volume.
type of auto_factor: intauto_factor The "auto size" factor n (as in size auto factor n). This factor scales the base size; a larger factor produces larger elements and fewer total elements.
return type of : int
- Returns
- Approximate number of elements that will be generated (integer).
◆ get_element_count()
| get_element_count | ( | ) |
Retrieve the count of exportable elements in the current model.
Exportable elements are those that have been assigned to a block. If no blocks are defined, all elements (nodes, edges, quad, hex, tet, tri, wedge, sphere, etc.) are considered exportable.
.. code-block:: python
@n return type of : int
- Returns
- Number of exportable elements in the current model's mesh.
◆ get_element_exists()
| get_element_exists | ( | element_id | ) |
Check whether a global mesh element ID exists in the model.
In Cubit, elements receive a Global Element ID when they are placed into a block. This function returns `true` if the specified global element ID has been established (i.e., the element was assigned to a block); otherwise it returns `false`.
.. code-block:: python
@n type of element_id: int
- Parameters
-
element_id Global element ID to check (as established by block assignment).
return type of : boolean
- Returns
trueif the element has a Global Element ID,falseotherwise.
◆ get_element_type()
| get_element_type | ( | element_id | ) |
Get the specific mesh element type for a global element ID.
CUBIT supports a variety of element types, each with different node counts and accuracy orders. This function returns one of the specific type strings defined in CUBIT; for example, "HEX20", "TETRA4", "TRISHELL7", etc. Supported element types are detailed in the CUBIT documentation or the Exodus manual.
.. code-block:: python
print("Element 1 type:", elem_type) // should print HEX20
@n type of element_id: int
- Parameters
-
element_id Global element ID (as assigned by Exodus/Genesis).
return type of : string
- Returns
- A string naming the specific element type (for example, HEX, HEX20, TETRA4, TRISHELL7, etc.).
◆ get_element_type_id()
| get_element_type_id | ( | element_id | ) |
Map a Global Element ID back to its local mesh entity ID.
Cubit assigns each element a Global Element ID when it is placed into a block. This function returns the corresponding local mesh entity ID within that element's type-specific ID space (hex, tet, tri, etc.). Together with get_element_type, it lets you determine both the element's type and its local ID.
.. code-block:: python
@n type of element_id: int
- Parameters
-
element_id Global Element ID (as assigned in the Exodus file).
return type of : int
- Returns
- Local mesh entity ID within its type-specific ID space.
◆ get_entities()
| get_entities | ( | entity_type | ) |
Retrieve IDs of all current entities of a specified type (geometry and mesh).
Returns the IDs of every entity matching the given type, including both geometry entities (body, volume, surface, curve, vertex) and mesh entities (node, element).
Notes To restrict the results to geometry entities only, use get_current_ids().
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of entity to query: geometry types ("body", "volume", "surface", "curve", "vertex") or mesh types ("node", "element").
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A vector<int> (or Python tuple) of IDs of all entities of the specified type.
◆ get_entity_color()
| get_entity_color | ( | entity_type, | |
| entity_id ) |
Get the color of a specified entity.
Returns the RGBA color as four doubles in [0, 1] for the given entity.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity ("body", "volume", "surface", "curve", or "vertex").
type of entity_id: intentity_id ID of the entity to query.
return type of : std:: array< double,4 >
- Returns
- A 4-element array [R, G, B, A], each component in [0, 1].
◆ get_entity_color_index()
| get_entity_color_index | ( | entity_type, | |
| entity_id ) |
Get the color index of a specified entity.
Cubit uses predefined color indices to represent common colors.
Title Available color indices
- -1 default color
- 0 black (0,0,0)
- 1 grey (127,127,127)
- 2 orange (255,165,0)
- 3 red (255,0,0)
- 4 green (0,255,0)
- 5 yellow (255,255,0)
- 6 magenta (255,0,255)
- 7 cyan (0,255,255)
- 8 blue (0,0,255)
- 9 white (255,255,255)
- 10 brown (165,42,42)
- 11 gold (255,215,0)
- 12 lightblue (173,216,230)
- 13 lightgreen (0,204,0)
- 14 salmon (250,128,114)
- 15 coral (255,127,80)
- 16 pink (255,192,203)
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity ("body", "volume", "surface", "curve", or "vertex").
type of entity_id: intentity_id ID of the entity to query.
return type of : int
- Returns
- : The color index -1 (default) or 0-16 for predefined colors.
◆ get_entity_modeler_engine()
| get_entity_modeler_engine | ( | geometry_type, | |
| entity_id ) |
Get the modeler engine type for a specified entity.
Returns the engines associated with this entity. Valid return strings are: acis, facet, virtual.
.. code-block:: python
- Parameters
-
geom_type Specifies the geometry type ("body", "volume", "surface", "curve", or "vertex").
type of entity_id: intentity_id ID of the entity.
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- : A list of modeler engine names "acis", "facet", or "virtual".
◆ get_entity_name()
| get_entity_name | ( | entity_type, | |
| entity_id, | |||
| no_default = False ) |
Get the name of a specified entity.
Returns either a user-defined name (stored in Cubit) or a default name generated at run-time. If no_default is true and the entity has only a default name, an empty string is returned.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity ("body", "volume", "surface", "curve", or "vertex").
type of entity_id: intentity_id ID of the entity.
type of no_default: boolean, optionalno_default If true, return an empty string when only a default name exists.
return type of : string
- Returns
- The entity's name, or an empty string if no_default is true and the name is default.
◆ get_entity_names()
| get_entity_names | ( | entity_type, | |
| entity_id, | |||
| no_default = False, | |||
| first_name_only = False ) |
Get all names associated with a specified entity.
Retrieves every name attribute set on the entity. By default, returns all names, but if first_name_only is true, only the first name is returned. Setting no_default to true excludes default names.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity ("body", "volume", "surface", "curve", or "vertex").
type of entity_id: intentity_id ID of the entity.
type of no_default: boolean, optionalno_default If true, excludes default names from the returned list.
type of first_name_only: boolean, optionalfirst_name_only If true, returns only the first name attribute.
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- A vector of all name strings (or a single-element vector if first_name_only is true).
◆ get_entity_sense()
| get_entity_sense | ( | source_type, | |
| source_id, | |||
| sideset_id ) |
Get the sense of an entity in a sideset.
This function returns the sense of the specified entity (face, quad, or tri) within the specified sideset. The sense indicates the orientation of the entity relative to the sideset.
.. code-block:: python
@n type of source_type: string
- Parameters
-
source_type Item type: "face", "quad", or "tri".
type of source_id: intsource_id ID of the entity.
type of sideset_id: intsideset_id ID of the sideset.
return type of : string
- Returns
- Sense of the specified entity in the sideset.
◆ get_error_count()
| get_error_count | ( | ) |
Retrieve the total number of errors in the current Cubit session.
Use this to check whether any errors have occurred since Cubit was started (or since the last manual reset). Errors can be cleared by issuing the Cubit command `reset error`.
.. code-block:: python
@n return type of : int
- Returns
- Integer count of errors recorded in this Cubit session.
◆ get_exodus_element_count()
| get_exodus_element_count | ( | entity_id, | |
| entity_type ) |
Get the number of elements in a Exodus entity.
.. code-block:: python
@n type of entity_id: int
- Parameters
-
entity_id The id of the entity
type of entity_type: stringentity_type The type of the entity
return type of : int
- Returns
- Number of Elements
◆ get_exodus_entity_description()
| get_exodus_entity_description | ( | entity_type, | |
| entity_id ) |
Get the description of an Exodus entity.
Returns the description string associated with a block, sideset, or nodeset entity. If no description is assigned or the entity does not exist, an empty string is returned.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity: "block", "sideset", or "nodeset".
type of entity_id: intentity_id ID of the entity.
return type of : string
- Returns
- Description of the entity, or an empty string if none is assigned.
◆ get_exodus_entity_name()
| get_exodus_entity_name | ( | entity_type, | |
| entity_id ) |
Get the name of an Exodus entity.
Retrieves the user-defined name of an Exodus entity of the given type and ID.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity: "block", "sideset", or "nodeset".
type of entity_id: intentity_id ID of the entity.
return type of : string
- Returns
- Name of the entity, or an empty string if none is assigned.
◆ get_exodus_entity_type()
| get_exodus_entity_type | ( | entity_type, | |
| entity_id ) |
Get the Exodus type of an entity.
Returns the Exodus type string associated with the mesh group of a block, sideset, or nodeset. If the entity does not exist, an empty string is returned.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity: "block", "sideset", or "nodeset".
type of entity_id: intentity_id ID of the entity.
return type of : string
- Returns
- Exodus type string of the entity (e.g., "lite"), or an empty string if the entity does not exist.
◆ get_exodus_id()
| get_exodus_id | ( | entity_type, | |
| entity_id ) |
Get the Global Element ID for a mesh entity.
In Cubit, each mesh element type (hex, tet, quad, tri, etc.) has a local ID unique only among its type. When elements are placed into a block, they receive a Global Element ID that is unique across all blocks and element types. Global Element IDs are exported to Exodus files for downstream applications to map back to the original Cubit elements.
Notes In an interactive session you can also use list <type> <local_id> (e.g. list hex 100) to display the Global Element ID.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Mesh element type ("hex", "tet", "quad", "tri", "face", etc.).
type of entity_id: intentity_id Local mesh entity ID within its type.
return type of : int
- Returns
- Global Element ID (unique across all blocks and types), or 0 if the mesh has not been exported.
◆ get_exodus_sizing_function_file_name()
| get_exodus_sizing_function_file_name | ( | ) |
Retrieve the Exodus sizing function file name.
Returns the path or file name of the Exodus II file from which the sizing function was imported. If no file has been imported, returns an empty string.
.. code-block:: python
@n return type of : string
- Returns
- The file name of the imported Exodus II sizing function, or an empty string.
◆ get_exodus_sizing_function_variable_name()
| get_exodus_sizing_function_variable_name | ( | ) |
Retrieve the Exodus-based sizing function variable name.
Returns the name of the field variable currently used as the sizing function. This is the Exodus variable (node- or element-based) driving adaptive meshing.
.. code-block:: python
@n return type of : string
- Returns
- The name of the Exodus variable used for sizing.
◆ get_exodus_variable_count()
| get_exodus_variable_count | ( | container_type, | |
| container_id ) |
Get the number of Exodus variables in a nodeset, sideset, or block.
- Parameters
-
entity_type : nodeset, sideset, or block
type of container_id: intcontainer_id The block id
return type of : int
- Returns
- Number of Exodus variables
◆ get_exodus_variable_names()
| get_exodus_variable_names | ( | container_type, | |
| container_id ) |
Get the names of Exodus variables in a nodeset, sideset, or block.
- Parameters
-
entity_type : nodeset, sideset, or block
type of container_id: intcontainer_id The block id
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Names of Exodus variables
◆ get_exodus_version()
| get_exodus_version | ( | ) |
Retrieve the Exodus mesh library version.
Returns the version string of the Exodus library used for mesh I/O.
.. code-block:: python
@n return type of : string
- Returns
- A string containing the Exodus library version.
◆ get_expanded_connectivity()
| get_expanded_connectivity | ( | entity_type, | |
| entity_id ) |
Get the list of node IDs for a mesh element, including interior nodes.
This function returns the IDs of all nodes associated with the specified mesh element, including both corner (boundary) and interior nodes. The ordering follows the Exodus convention; see the Exodus documentation for element-specific node ordering.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Mesh element type (e.g., "hex", "tet", "tri", "quad", "hex20").
type of entity_id: intentity_id ID of the mesh element.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of node IDs associated with the element, including interior nodes.
◆ get_force_direction_vector()
| get_force_direction_vector | ( | entity_id | ) |
Get the direction vector of a force BC.
type of entity_id: int
- Parameters
-
entity_id ID of the force BC.
return type of : std:: array< double,3 >
- Returns
- Direction vector as [x, y, z].
◆ get_force_magnitude()
| get_force_magnitude | ( | entity_id | ) |
Get the force magnitude of a force BC.
type of entity_id: int
- Parameters
-
entity_id ID of the force BC.
return type of : float
- Returns
- Force magnitude.
◆ get_force_moment_vector()
| get_force_moment_vector | ( | entity_id | ) |
Get the moment vector of a force BC.
type of entity_id: int
- Parameters
-
entity_id ID of the force BC.
return type of : std:: array< double,3 >
- Returns
- Moment vector as [x, y, z].
◆ get_gaps_between_volumes()
| get_gaps_between_volumes | ( | target_volume_ids, | |
| maximum_gap_tolerance, | |||
| maximum_gap_angle, | |||
| cache_overlaps = 0 ) |
Identify gaps between surfaces in a list of volumes.
This is a Python-friendly version of `get_volume_gaps`. For each pair of volumes that have surface gaps, a `VolumeGap` object is returned. Each `VolumeGap` contains: - the pair of volume IDs, - a list of surface ID pairs (`surfPairs`), - corresponding distances (`gaps`), - corresponding overlap areas (`overlapAreas`). Caching can be used to avoid redundant distance calculations when this function is called together with `get_overlapping_surfaces_in_volumes`. Both functions require the same underlying distance computations between surfaces in the specified volumes. If caching is enabled, the results of these distance calculations will be saved and reused when the second function is called. If you are calling only this function by itself, caching provides no performance benefit.
.. code-block:: python
for gap in gaps: print(f"Volumes: ({gap.volume1}, {gap.volume2})") for surf_pair, dist, area in zip(gap.surfPairs, gap.gaps, gap.overlapAreas): print(f" Surfaces: ({surf_pair[0]}, {surf_pair[1]}), " f {dist:.6f}, Overlap area: {area}")
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids List of volume IDs to examine.
type of maximum_gap_tolerance: floatmaximum_gap_tolerance Maximum distance between surfaces to be considered a gap.
type of maximum_gap_angle: floatmaximum_gap_angle Maximum angle between surfaces to be considered a gap.
type of cache_overlaps: int, optionalcache_overlaps Caching mode: 0 = no caching, 1 = clear cache first, 2 = use and add to existing cache.
return type of : std::vector< VolumeGap,std:: allocator< VolumeGap > >
◆ get_geometric_owner()
| get_geometric_owner | ( | mesh_entity_type, | |
| mesh_entity_list ) |
Get geometric owners for a set of mesh entities.
Returns the geometric owners of the specified mesh entities (e.g. "surface 3", "curve 5").
Title Supported mesh entity types
- quad
- face
- tri
- hex
- tet
- edge
- node
.. code-block:: python
@n type of mesh_entity_type: string
- Parameters
-
mesh_entity_type Mesh entity type: "quad", "face", "tri", "hex", "tet", "edge", or "node".
type of mesh_entity_list: stringmesh_entity_list Space-delimited mesh entity IDs (e.g. "all", "1 to 8", "1 2 3").
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector of owner strings in the form "surface x", "curve y", etc.
◆ get_geometry_node_count()
| get_geometry_node_count | ( | entity_type, | |
| entity_id ) |
Get the number of mesh nodes on a geometric entity.
This function returns the count of mesh nodes associated with the specified geometric entity (surface, curve, etc.).
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the geometric entity ("surface", "curve", "volume", etc.).
type of entity_id: intentity_id ID of the geometric entity.
return type of : int
- Returns
- Number of mesh nodes on the entity.
◆ get_geometry_owner()
| get_geometry_owner | ( | entity_type, | |
| entity_id ) |
Get the geometric owner of a mesh element.
This function returns the geometric entity that owns the specified mesh element. For example, it may return "surface 3", "volume 1", etc., indicating where the element lives.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Mesh element type (e.g., "hex", "tet", "tri", "quad", etc.).
type of entity_id: intentity_id ID of the mesh element.
return type of : string
- Returns
- Geometric owner of the element (e.g., "surface 3").
◆ get_geometry_type()
| get_geometry_type | ( | geom_type, | |
| ent_ids ) |
Return the analytic geometry type for a list of surfaces or curves.
This function behaves similar to get_surface_type and get_curve_type but accepts multiple IDs. Note also the difference in return types
.. code-block:: python
@n type of geom_type: string
- Parameters
-
geom_type Specifies the entity type: "curve" or "surface".
type of ent_ids: std::vector< int,std::allocator< int > >ent_ids List of IDs for curves or surfaces to query.
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- A vector of geometry-type strings in the same order as ent_ids. Valid curve types: "arc", "ellipse", "parabola", "segmented", "spline", "straight", "point", "helix", "hyperbola", "undefined", "unknown". Valid surface types: "cone", "plane", "sphere", "spline", "torus", "best_fit", "facet", "cylinder", "undefined", "unknown".
◆ get_global_element_id()
| get_global_element_id | ( | element_type, | |
| id ) |
Alias for get_exodus_id: get the Global Element ID for a local mesh entity.
This function is equivalent to get_exodus_id and returns the Global Element ID assigned to the specified local mesh entity within its type-specific ID space.
.. code-block:: python
@n type of element_type: string
- Parameters
-
element_type Type of the mesh entity ("hex", "tet", "wedge", "pyramid", "tri", "quad", "face", "edge", or "sphere").
type of id: intid Local mesh entity ID within its type.
return type of : int
- Returns
- Global Element ID corresponding to the specified local entity.
◆ get_graphics_version()
| get_graphics_version | ( | ) |
Retrieve the VTK (Visualization Toolkit) version used by Cubit.
Returns the version string of the VTK graphics library integrated into Cubit.
.. code-block:: python
@n return type of : string
- Returns
- A string containing the VTK version number.
◆ get_group_bodies()
| get_group_bodies | ( | group_id | ) |
Return direct child body IDs for a specified group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of body IDs (empty if none).
◆ get_group_curves()
| get_group_curves | ( | group_id | ) |
Return direct child curve IDs for a specified group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of curve IDs (empty if none).
◆ get_group_edges()
| get_group_edges | ( | group_id | ) |
Return direct child edge IDs for a specified group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of edge IDs (empty if none).
◆ get_group_groups()
| get_group_groups | ( | group_id | ) |
Retrieve direct child group IDs for a specified parent group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the parent group.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of child group IDs (empty if none).
◆ get_group_hexes()
| get_group_hexes | ( | group_id | ) |
Return direct child hexahedral element IDs for a specified group, if any.
Hexahedral elements are generated on volumes using the default map scheme and meshed via: mesh volume all
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of hex IDs (empty if none).
◆ get_group_nodes()
| get_group_nodes | ( | group_id | ) |
Return direct child node IDs for a specified group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of node IDs (empty if none).
◆ get_group_pyramids()
| get_group_pyramids | ( | group_id | ) |
Return direct child pyramid element IDs for a specified group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of pyramid IDs (empty if none).
◆ get_group_quads()
| get_group_quads | ( | group_id | ) |
Return direct child quad IDs for a specified group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of quad IDs (empty if none).
◆ get_group_spheres()
| get_group_spheres | ( | group_id | ) |
Return direct child sphere element IDs for a specified group, if any.
Sphere elements are generated by inserting nodes or vertices into a block using:
Block <id> {node|vertex} <id_range>
Once created, spheres can be located and grouped for querying.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of sphere IDs (empty if none).
◆ get_group_surfaces()
| get_group_surfaces | ( | group_id | ) |
Return direct child surface IDs for a specified group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of surface IDs (empty if none).
◆ get_group_tets()
| get_group_tets | ( | group_id | ) |
Return direct child tetrahedron IDs for a specified group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of tetrahedron IDs (empty if none).
◆ get_group_tris()
| get_group_tris | ( | group_id | ) |
Return direct child triangle IDs for a specified group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of triangle IDs (empty if none).
◆ get_group_vertices()
| get_group_vertices | ( | group_id | ) |
Return direct child vertex IDs for a specified group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of vertex IDs (empty if none).
◆ get_group_volumes()
| get_group_volumes | ( | group_id | ) |
Return direct child volume IDs for a specified group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of volume IDs (empty if none).
◆ get_group_wedges()
| get_group_wedges | ( | group_id | ) |
Return direct child wedge element IDs for a specified group, if any.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of wedge IDs (empty if none).
◆ get_heatflux_on_area()
| get_heatflux_on_area | ( | bc_area_enum, | |
| entity_id ) |
Get the heatflux value on a specified area.
type of bc_area_enum: int
- Parameters
-
bc_area_enum CI_BCEntityTypes: 4 (solid), 7 (shell top), 8 (shell bottom).
type of entity_id: intentity_id ID of the heatflux BC.
return type of : float
- Returns
- Heatflux value.
◆ get_hex_column()
| get_hex_column | ( | quad_id | ) |
Get the list of hex elements forming a hex column through the given quad/face.
Note that quad elements normally only exist on surfaces, so the starting face and the column start will exist on a surface. Free mesh must be skinned to have a starting quad. :rtype: std::vector< int,std::allocator< int > >
- Returns
- A list (python tuple) of hex ids in the hex column
◆ get_hex_count()
| get_hex_count | ( | ) |
Retrieve the count of hexahedral elements in the current model.
.. code-block:: python
@n return type of : int
- Returns
- Number of hexahedral elements in the current model's mesh.
◆ get_hex_global_element_id()
| get_hex_global_element_id | ( | hex_id | ) |
Get the Global Element ID for a specific hexahedral element.
This function returns the Global Element ID assigned to the given local hex ID when the element was placed into a block.
.. code-block:: python
@n type of hex_id: int
- Parameters
-
hex_id Local hexahedral element ID.
return type of : int
- Returns
- Global Element ID for the specified hex.
◆ get_hex_sheet()
| get_hex_sheet | ( | node_id_1, | |
| node_id_2 ) |
Retrieve the IDs of all hexahedral elements forming a hex sheet through two nodes.
A hex sheet is a layer of contiguous hexes. The two node IDs define an edge perpendicular to that layer.
.. code-block:: python
@n type of node_id_1: int
- Parameters
-
node_id_1 First node ID defining the edge perpendicular to the hex layer.
type of node_id_2: intnode_id_2 Second node ID defining the edge perpendicular to the hex layer.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list (vector<int> or Python tuple) of hex IDs forming the contiguous sheet.
◆ get_hole_surfaces()
| get_hole_surfaces | ( | surface_id | ) |
Return the surfaces in the hole adjacent to the specified surface.
The function returns a list of surface IDs that belong to the same hole as the given surface. The input surface_id must already be part of a hole. The result includes surface_id itself.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id Surface ID that is part of a hole.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list of surface IDs belonging to the hole (includes surface_id itself).
◆ get_hydraulic_radius_surface_area()
| get_hydraulic_radius_surface_area | ( | surface_id | ) |
Compute the hydraulic radius of a specified surface.
Title Computation
- hydraulic_radius = 4 * (surface_area / total_edge_length), where surface_area is the face area and total_edge_length is the sum of all edge lengths bounding the face
- If total_edge_length is zero, returns 0.0
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
return type of : float
- Returns
- Hydraulic radius of the specified surface (4 * area / total_edge_length), or 0.0 if no edges.
◆ get_hydraulic_radius_volume_area()
| get_hydraulic_radius_volume_area | ( | volume_id | ) |
Compute the hydraulic radius of a specified volume.
Title Computation
- hydraulic_radius = 6 * (enclosed_volume / total_surface_area)
- enclosed_volume: measured volume of the body
- total_surface_area: sum of areas of all faces
- Returns 0.0 if total_surface_area is zero
.. code-block:: python
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to query.
return type of : float
- Returns
- Hydraulic radius = 6 * (enclosed_volume / total_surface_area); 0.0 if total_surface_area is zero.
◆ get_id_from_name()
| get_id_from_name | ( | name | ) |
Retrieve the integer ID of an entity by its name.
.. code-block:: python
@n type of name: string
- Parameters
-
name Name of the entity whose ID is requested.
return type of : int
- Returns
- Integer ID of the named entity.
◆ get_id_string()
| get_id_string | ( | entity_ids, | |
| sort = True ) |
Convert a list of integers into a compact Cubit-style ID range string.
Collapses consecutive IDs into "start to end" ranges and separates entries with commas. Unlike string_from_id_list(), this variant does not insert any newline characters.
.. code-block:: python
@n type of entity_ids: std::vector< int,std::allocator< int > >
- Parameters
-
entity_ids Vector of integer IDs to format.
type of sort: boolean, optionalsort If true (default), sort IDs ascending before collapsing ranges; if false, preserve the original order.
return type of : string
- Returns
- A single-line string representing the ID ranges (no line breaks).
◆ get_idless_signature()
| get_idless_signature | ( | entity_type, | |
| entity_id ) |
Get the idless signature of a geometric or mesh entity.
This function returns the *idless signature* of the specified entity. The idless signature is a position-based and ordinal-based reference to the entity, independent of its current ID. Idless signatures are used to create **version-independent journal files**. Because entity IDs can change between different Cubit versions or after model operations (e.g., webcuts), using the idless signature ensures that journal files will still refer to the correct entity by position and ordinal rather than ID. Example format of an idless signature: `"volume at 3.42 5.66 6.32 ordinal 2"` or `"curve at (1 1 0 ordinal 2)"` Common usage scenario: - Enable `journal idless on` - Journal commands will record using idless references (rather than entity IDs) - Use `get_idless_signature` to retrieve the current idless reference for an entity programmatically
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity (e.g. "curve", "surface", "vertex", "volume", "face", etc.).
type of entity_id: intentity_id ID of the requested entity.
return type of : string
- Returns
- Idless signature of the entity (e.g. "volume at x y z ordinal n").
Notes: For full context, see the Cubit command: journal idless {on | off | reverse}.
◆ get_idless_signatures()
| get_idless_signatures | ( | entity_type, | |
| entity_id_list ) |
Get the idless signatures of a range of geometric or mesh entities.
This function returns the idless signatures of the specified entities as a single string. The idless signature is a position-based and ordinal-based reference to each entity, independent of its current ID.
Idless signatures are used to create version-independent journal files. Since entity IDs can change between different Cubit versions or after model operations (e.g., webcuts), using idless signatures ensures that journal files remain valid by referring to entities by position and ordinal instead of ID.
The return string will contain one idless signature per entity, space-separated. Title Example:
- "curve at (1 1 0 ordinal 2) curve at (0 0 1 ordinal 1) ..."
.. code-block:: python
type of entity_type: string
- Parameters
-
entity_type Type of the entities (e.g. "curve", "surface", "vertex", "volume", "face", etc.).
type of entity_id_list: std::vector< int,std::allocator< int > >entity_id_list List of entity IDs.
return type of : string
- Returns
- A single string containing the idless signatures of the entities, space-separated.
Notes: For full context, see the Cubit command: journal idless {on | off | reverse}.
◆ get_int_sculpt_default()
| get_int_sculpt_default | ( | variable | ) |
Retrieve default integer-valued sculpt parameter.
Matches the input variable name substring to known sculpt parameters and returns its default value.
Title Available integer parameters
- NUM_PROC
- DEBUG
- NUM_LAPLACE
- MAX_OPT_SMOOTH
- MAX_PCOL
- MAX_GQ_ITERS
- DEG_ITERS
- STAIR
- CSMOOTH
- SMOOTH * VOID_MAT, VOID
- SIDESETS * HTET_METHOD, HTET
- TRI_MESH
- PILLOW_LAYERS * ADAPT_TYPE, ADAPT_LEVELS, ADAPT_LOAD_BALANCE, ADAPT_MEMORY_STATS
- ALIGN * CAPTURE_SIDE, CAPTURE* DEFEATURE_MIN_VOL_CELLS, DEFEATURE_ITERS, DEFEATURE* MICRO_EXPAND, MICRO_SHAVE
- QUIET * WRITE_GEOM, WRITE_MBG
- MESHING_SCHEME
- PRINT_ONLY
- THREADS
- BBOX_EXPAND
- WEAR_METHOD
- MIN_NUM_LAYERS
- INPUT_MESH_MATERIAL
type of variable: string
- Parameters
-
variable Name of the sculpt parameter substring.
return type of : int
- Returns
- Default integer value for the specified parameter.
◆ get_interface()
| get_interface | ( | interface_name | ) |
Retrieve a Cubit interface by name.
Returns a pointer to the requested CubitBaseInterface instance, or nullptr if no matching interface is registered.
.. code-block:: python
if iface is not None:
use iface ...
cubit.release_interface(iface)
@n type of interface_name: string
- Parameters
-
interface_name Name of the interface to retrieve.
return type of : CubitBaseInterface
- Returns
- Pointer to the CubitBaseInterface, or nullptr if not found.
◆ get_label_type()
| get_label_type | ( | entity_type | ) |
Gets the current label display type for a given entity type.
Queries the label display type currently associated with the specified entity type. Valid `entity_type` values:
Returned value corresponds to SVUtil::LabelType: 0=CUBIT_LABEL_NONE, 1=CUBIT_LABEL_ID, 2=CUBIT_LABEL_ELEMENT_ID, 3=CUBIT_LABEL_NAME, 4=CUBIT_LABEL_INTERVAL, 5=CUBIT_LABEL_SIZE, 6=CUBIT_LABEL_MERGE, 7=CUBIT_LABEL_IS_MERGED, 8=CUBIT_LABEL_FIRMNESS, 9=CUBIT_LABEL_SCHEME, 10=CUBIT_LABEL_NAME_ID, 11=CUBIT_LABEL_NAME_ONLY, 12=CUBIT_LABEL_SPHERE_ID
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Entity type to query.
return type of : int
- Returns
- Label display type (see list above).
◆ get_last_id()
| get_last_id | ( | entity_type | ) |
Get the ID of the last created entity of the given type.
This function returns the ID of the most recently created entity of the specified type. Supported entity types include: "vertex", "curve", "surface", "volume", "body", etc.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity being queried (e.g. "surface", "curve", "volume").
return type of : int
- Returns
- Integer ID of the last created entity of the specified type.
◆ get_list_of_free_ref_entities()
| get_list_of_free_ref_entities | ( | geometry_type | ) |
Get all free (unattached) entities of a given geometry type.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Specifies the geometry type ("vertex", "curve", "surface", etc.).
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list (vector or Python tuple) of IDs of detached entities of the specified type.
◆ get_material_name()
| get_material_name | ( | material_id | ) |
Get the name of a material or CFD media by ID.
type of material_id: int
- Parameters
-
material_id ID of the material or media.
return type of : string
- Returns
- Material or media name.
◆ get_material_name_list()
| get_material_name_list | ( | ) |
Get list of all material names.
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- List of material names.
◆ get_material_property()
| get_material_property | ( | material_property_enum, | |
| entity_id ) |
Get the value of a material property.
type of material_property_enum: int
- Parameters
-
material_property_enum Property type (e.g., 0 = Elastic Modulus, 1 = Shear Modulus, etc.).
type of entity_id: intentity_id ID of the material.
return type of : float
- Returns
- Value of the specified material property.
◆ get_media_name_list()
| get_media_name_list | ( | ) |
Get list of all CFD media names.
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- List of media names.
◆ get_media_property()
| get_media_property | ( | entity_id | ) |
Get the media classification of a material.
type of entity_id: int
- Parameters
-
entity_id ID of the media.
return type of : int
- Returns
- : Media type 0 = FLUID, 1 = POROUS, 2 = SOLID.
◆ get_merge_setting()
| get_merge_setting | ( | geometry_type, | |
| entity_id ) |
Get merge mode ("on", "off", or "auto") for a given entity.
By disabling merge on an entity, adjacent geometry remains separate-preserving material boundaries, distinct mesh regions, and contact interfaces.
.. code-block:: python
- Parameters
-
geom_type Geometry type ("body", "volume", "surface", "curve", or "vertex").
type of entity_id: intentity_id ID of the entity.
return type of : string
- Returns
- : The merge setting "on", "off", or "auto".
◆ get_merge_tolerance()
| get_merge_tolerance | ( | ) |
Return the current merge tolerance value.
The merge tolerance is an absolute distance value used to determine geometric correspondence when merging entities. Vertices, curves, and surfaces are compared using spatial checks within this tolerance. Entities closer than the merge tolerance are considered equivalent and may be merged, even if their parameterizations differ. The default merge tolerance in Cubit is 5.0e-4. The lower limit is 1.0e-6. There is no defined upper limit.
.. code-block:: python
@n return type of : float
- Returns
- The current merge tolerance value.
◆ get_mergeable_curves()
| get_mergeable_curves | ( | target_volume_ids | ) |
Get the list of mergeable curves from a list of volumes or bodies.
Given a list of volume IDs, this function returns a list of lists of potentially mergeable curves. Each inner list contains the curve IDs of one set of curves that can be merged. Each set may contain more than two curves. Curves are considered mergeable if they are within the current merge tolerance. If not explicitly set, the default merge tolerance is 1e-6. In Python, the lists will be returned as Python tuples.
.. code-block:: python
for group in mergeable_curves: print(group)
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids List of volume IDs to examine.
return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- List of lists of mergeable curve IDs (potentially more than a pair). In Python, each inner list is returned as a tuple.
◆ get_mergeable_surfaces()
| get_mergeable_surfaces | ( | target_volume_ids | ) |
Get the list of mergeable surfaces from a list of volumes or bodies.
Given a list of volume IDs, this function returns a list of lists of potentially mergeable surfaces. Each inner list contains the surface IDs of one set of surfaces that can be merged. Each set may contain more than two surfaces. Surfaces are considered mergeable if they are within the current merge tolerance. If not explicitly set, the default merge tolerance is 1e-6. In Python, the lists will be returned as Python tuples.
.. code-block:: python
for group in mergeable_surfaces: print(group)
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids List of volume IDs to examine.
return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- List of lists of mergeable surface IDs (potentially more than a pair). In Python, each inner list is returned as a tuple.
◆ get_mergeable_vertices()
| get_mergeable_vertices | ( | target_volume_ids | ) |
Get the list of mergeable vertices from a list of volumes or bodies.
Given a list of volume IDs, this function returns a list of lists of potentially mergeable vertices. Each inner list contains the vertex IDs of one set of vertices that can be merged. Each set may contain more than two vertices. Vertices are considered mergeable if they are within the current merge tolerance. If not explicitly set, the default merge tolerance is 1e-6. In Python, the lists will be returned as Python tuples.
.. code-block:: python
for group in mergeable_vertices: print(group)
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids List of volume IDs to examine.
return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- List of lists of mergeable vertex IDs (potentially more than a pair). In Python, each inner list is returned as a tuple.
◆ get_mesh_edge_length()
| get_mesh_edge_length | ( | edge_id | ) |
Compute the length of a specified mesh edge.
Returns the geometric length, in model units, of the mesh edge with the given ID.
.. code-block:: python
@n type of edge_id: int
- Parameters
-
edge_id ID of the mesh edge whose length is requested.
return type of : float
- Returns
- The length of the specified mesh edge.
◆ get_mesh_element_type()
| get_mesh_element_type | ( | entity_type, | |
| entity_id ) |
Get the mesh element type applied to a geometric entity.
Returns the type of elements used to mesh the specified geometry. Possible return values: "hex", "tet", "pyramid", "wedge", "face" (quad), "tri", "edge", or "node". Returns an empty string if the entity has not been meshed.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the geometry ("surface", "curve", "volume", etc.).
type of entity_id: intentity_id ID of the geometry entity.
return type of : string
- Returns
- Name of the mesh element type on that entity, or empty if none.
◆ get_mesh_error_count()
| get_mesh_error_count | ( | ) |
◆ get_mesh_error_solutions()
| get_mesh_error_solutions | ( | error_code | ) |
Retrieve recommended solutions and context cues for a mesh error.
Given a mesh error code, returns a triplet of strings: 1) Solution text describing how to correct the error. 2) Help context cue for detailed guidance. 3) Command-panel cue suggesting the UI panel or command to use.
.. code-block:: python
@n type of error_code: int
- Parameters
-
error_code Integer mesh error code for which to retrieve guidance.
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector of three strings: [0] solution text, [1] help context cue, [2] command-panel cue.
◆ get_mesh_errors()
| get_mesh_errors | ( | ) |
◆ get_mesh_geometry_approximation_angle()
| get_mesh_geometry_approximation_angle | ( | geometry_type, | |
| entity_id ) |
Get the geometry approximation angle for TriMesh/TetMesh on a given entity.
Returns the maximum deviation angle (in degrees) used to approximate curved CAD surfaces when meshing. A smaller angle yields more finely triangulated surfaces. The value may be explicitly set on a curve, surface, or volume, or computed from adjacent geometry if not user-set.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Geometry type ("curve", "surface", or "volume").
type of entity_id: intentity_id ID of the entity whose approximation angle is queried.
return type of : float
- Returns
- Geometry approximation angle in degrees (double); default is 15 if not set.
◆ get_mesh_group_parent_ids()
| get_mesh_group_parent_ids | ( | element_type, | |
| element_id ) |
Retrieve parent group IDs for a specific mesh element.
Returns IDs of all groups containing the given mesh element (excluding pick group).
.. code-block:: python
@n type of element_type: string
- Parameters
-
element_type Mesh element type (e.g., "node", "edge", "face"/"tri"/"quad", "volume"/"tet"/"hex").
type of element_id: intelement_id ID of the mesh element.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of group IDs containing this element.
◆ get_mesh_interval_firmness()
| get_mesh_interval_firmness | ( | geometry_type, | |
| entity_id ) |
Retrieve the interval firmness for a specified geometry entity.
Interval firmness determines whether a curve's interval count or size can be modified by other commands.
Title Possible return values:
- "HARD" - interval is locked (user-set directly via hard command).
- "SOFT" - interval is a goal (may be adjusted by matching or other commands).
- "LIMP" - no interval was explicitly set (default state).
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Geometry type of the entity ("curve", "surface", or "volume").
- Note
- interval firmness applies to curves; "surface" and "volume" queries return combined firmness of contained curves.
type of entity_id: int
- Parameters
-
entity_id ID of the entity whose interval firmness is queried.
return type of : string
- Returns
- : The current interval firmness "HARD", "SOFT", or "LIMP".
◆ get_mesh_intervals()
| get_mesh_intervals | ( | geometry_type, | |
| entity_id ) |
Get the mesh interval count for a specified entity.
Title Retrieves the number of mesh intervals (curve subdivisions) defined on a geometry entity.
- For curves, this is the number of mesh edges along that curve.
- For surfaces or volumes, it is the default interval count that their boundary curves inherit if no curve-level setting exists.
- Curve-level interval settings always override surface- or volume-level settings.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Entity type: "curve", "surface", or "volume".
type of entity_id: intentity_id ID of the geometry entity.
return type of : int
- Returns
- Mesh interval count on the curve, or inherited count for surface or volume (overridden by any curve-level setting).
◆ get_mesh_scheme()
| get_mesh_scheme | ( | geometry_type, | |
| entity_id ) |
Retrieve the meshing scheme applied to a geometric entity.
Returns the name of the scheme currently set on the specified entity.
This can be called at any time after a scheme has been assigned (e.g.,
via `cubit.cmd("vol 1 scheme sweep")`) to confirm which scheme is in use.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Type of geometry ("curve", "surface", "volume").
type of entity_id: intentity_id ID of the entity whose scheme is queried.
return type of : string
- Returns
- The meshing scheme name currently applied (e.g., "sweep", "bias", "tetmesh").
◆ get_mesh_scheme_firmness()
| get_mesh_scheme_firmness | ( | geometry_type, | |
| entity_id ) |
Retrieve the meshing scheme firmness for a specified surface or volume.
Scheme firmness controls whether a user-assigned scheme can be overridden by automatic selection. Valid firmness values are "Default" (automatic selection allowed), "Soft" (automatic selection preferred), and "Hard" (scheme locked and not changed by automatic selection). Only "surface" and "volume" entities support scheme firmness.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Geometry type ("surface" or "volume").
type of entity_id: intentity_id ID of the entity whose scheme firmness is queried.
return type of : string
- Returns
- The current scheme firmness ("Default", "Soft", or "Hard").
◆ get_mesh_size()
| get_mesh_size | ( | geometry_type, | |
| entity_id ) |
Retrieve the effective target edge length for meshing an entity.
Returns the mesh size (in model units) used when generating 2D or 3D elements. * If no size is set on the entity, it inherits the size from its parent. * If no size is set anywhere in the hierarchy, the default automatic size is used.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Entity type: "curve", "surface", or "volume".
type of entity_id: intentity_id ID of the entity to query.
return type of : float
- Returns
- Effective mesh edge length (inherited or default auto size).
◆ get_mesh_size_type()
| get_mesh_size_type | ( | geometry_type, | |
| entity_id ) |
Retrieve the mesh size setting type for a specified entity.
Unlike get_mesh_interval_firmness(), which returns the firmness of an interval count (number of edges),
this function returns the status of a target edge length ("mesh size") setting. The returned value
may reflect direct user input, automatic calculation from connected geometry, or lack of any setting.
Title Possible return values are:
- "USER_SET" - The mesh size (edge length) was explicitly set by the user on this entity.
- "CALCULATED" - The mesh size was inferred or computed based on adjacent geometry or default rules.
- "NOT_SET" - No mesh size has been set, either by user or by calculation.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Geometry type ("curve", "surface", or "volume").
type of entity_id: intentity_id ID of the entity whose mesh size type is queried.
return type of : string
- Returns
- : The entity's mesh size status "USER_SET", "CALCULATED", or "NOT_SET".
◆ get_meshed_volume_or_area()
| get_meshed_volume_or_area | ( | geometry_type, | |
| entity_ids ) |
Sum mesh volumes or surface areas for CAD entities or mesh elements.
- If geometry_type is "volume" or "surface", sums the volumes or areas of all mesh elements attached to those entities. - If geometry_type is "hex", "tet", "tri", or "quad", sums volumes (hex,tet) or areas (tri,quad) of the specified mesh element IDs.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type "volume","surface","hex","tet","tri", or "quad".
type of entity_ids: std::vector< int,std::allocator< int > >entity_ids Vector of IDs for the specified type.
return type of : float
- Returns
- Total mesh volume (3D) or area (2D).
◆ get_meshgems_version()
| get_meshgems_version | ( | ) |
Retrieve the MeshGems library version.
Returns the version string of the MeshGems library used by Cubit.
.. code-block:: python
@n return type of : string
- Returns
- A string containing the MeshGems library version.
◆ get_ML_classification()
| get_ML_classification | ( | geom_type, | |
| ent_id ) |
Get the top classification label for a single volume or surface.
This function performs the full classification workflow, equivalent to calling
get_ML_operation_features() followed by get_ML_predictions(). It uses the
appropriate model ("volume_no_op" for volumes or "classify_surface" for surfaces)
and returns the category with the highest predicted probability.
@n type of geom_type: string
- Parameters
-
geom_type Geometry type indicator: "volume" or "surface".
type of ent_id: intent_id ID of the volume or surface entity to classify.
return type of : string
- Returns
- String label of the highest-confidence category.
.. code-block:: python
◆ get_ML_classification_categories()
| get_ML_classification_categories | ( | geom_type | ) |
Retrieve all available classification categories for a geometry type.
This function queries the ML system for every label used to classify volumes or surfaces. It can also accept the specific ML model type, such as "volume_no_op" or "surface_classification". @n type of geom_type: string
- Parameters
-
geom_type Geometry type ("volume" or "surface"). Also supports the ML model type, e.g., "volume_no_op" or "surface_classification".
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector of category names.
.. code-block:: python
◆ get_ML_classification_models()
| get_ML_classification_models | ( | ) |
Retrieve the list of supported classification ML model names.
Queries the ML subsystem for all available classification models used for labeling or categorization. @n return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector of classification model names; empty if none are registered.
.. code-block:: python
◆ get_ML_classifications()
| get_ML_classifications | ( | geom_type, | |
| ent_ids ) |
Classify multiple volumes or surfaces in a single batch operation.
Perform classification on a collection of entities at once to improve efficiency over repeated individual calls. @n type of geom_type: string
- Parameters
-
geom_type Geometry type to classify ("volume" or "surface").
type of ent_ids: std::vector< size_t,std::allocator< size_t > >ent_ids Vector of entity IDs (volumes or surfaces) to classify.
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector of predicted category labels, in the same order as ent_ids.
◆ get_ML_feature_distance()
| get_ML_feature_distance | ( | op_name, | |
| f1, | |||
| f2 ) |
Compute the weighted distance between two feature vectors.
Applies operation-specific importance weights derived from an ensemble of decision trees to each feature, then calculates the Euclidean distance between the weighted vectors. The distance indicates the geometric or topological similarity between the two entities, where a distance of zero signifies an exact match. @n type of op_name: string
- Parameters
-
op_name ML operation name (see get_ML_operation_features()).
type of f1: std::vector< double,std::allocator< double > >f1 First feature vector; must match f2 in length.
type of f2: std::vector< double,std::allocator< double > >f2 Second feature vector; must match f1 in length.
return type of : float
- Returns
- Weighted distance between the two feature vectors. A distance of zero indicates an exact match between the entities.
.. code-block:: python
◆ get_ML_feature_importances()
| get_ML_feature_importances | ( | op_name | ) |
Retrieve feature importance scores for a given ML operation.
Queries the trained model to obtain the relative importance of each feature used in the specified operation.
type of op_name: string
- Parameters
-
op_name ML operation identifier (e.g., "remove_cone").
return type of : std::vector< double,std:: allocator< double > >
- Returns
- Vector of importance values for each feature, in the same order as get_ML_operation_features().
.. code-block:: python
for i in range(len(feature_names)): print(f"{feature_names[i]}\t{importances[i]}")
◆ get_ML_features()
| get_ML_features | ( | ml_op_names, | |
| entity1_ids, | |||
| entity2_ids, | |||
| params, | |||
| user_configs, | |||
| mesh_size, | |||
| reduced_features = False ) |
Compute ML feature vectors for operations permitting multiple entities.
This is a batch variant of get_ML_operation_features() that accepts lists of IDs per operation, enabling feature extraction across multiple entities at once. @n type of ml_op_names: std::vector< std::string,std::allocator< std::string > >
- Parameters
-
ml_op_names Vector of ML operation/model names.
type of entity1_ids: std::vector< std::vector< size_t,std::allocator< size_t > >,std::allocator< std::vector< size_t,std::allocator< size_t > > > >entity1_ids Vector of vectors of primary entity IDs per operation.
type of entity2_ids: std::vector< std::vector< size_t,std::allocator< size_t > >,std::allocator< std::vector< size_t,std::allocator< size_t > > > >entity2_ids Vector of vectors of secondary entity IDs per operation.
type of params: std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >params Vector of parameter lists for each operation.
type of user_configs: std::vector< double,std::allocator< double > >user_configs Vector of user configurable settings (geometry sizing and regularize).
type of mesh_size: floatmesh_size Target mesh size for feature calculations.
type of reduced_features: boolean, optionalreduced_features If true (where supported), compute a reduced feature set for faster performance.
return type of : std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std:: allocator< double > > > >
- Returns
- Outer vector size == ml_op_names.size(); each inner vector contains the feature values for that operation.
.. code-block:: python
◆ get_ML_initialize_surviving_entities()
| get_ML_initialize_surviving_entities | ( | op_name, | |
| ent1, | |||
| ent2 ) |
Capture entities for survival tracking before a CAD operation.
This function sets a baseline for CAD operation models that measure mesh quality before and after the operation. It is used with get_ML_surviving_entities() to identify entities that replace or correspond to the originals after the operation. @n type of op_name: string
- Parameters
-
op_name ML operation name (e.g., "remove_cone").
type of ent1: std::vector< int,std::allocator< int > >ent1 List of primary entity IDs involved in the operation.
type of ent2: std::vector< int,std::allocator< int > >ent2 List of secondary entity IDs involved in the operation.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of entity IDs for survival tracking.
.. code-block:: python
◆ get_ML_model_ID()
| get_ML_model_ID | ( | model_name | ) |
Retrieve the unique numeric ID for a given ML model or operation name.
Looks up the internal mapping from a model or operation name to its assigned ID. @n type of model_name: string
- Parameters
-
model_name Name of the ML model or operation to query.
return type of : int
- Returns
- Positive integer ID on success; 0 if not found or on error.
.. code-block:: python
◆ get_ML_model_name()
| get_ML_model_name | ( | model_ID | ) |
Retrieve the name of an ML model based on its ID.
This function returns the name of the ML model corresponding to the provided model ID. The model name is used to identify a specific machine learning model that can be used for various operations such as classification or prediction. @n type of model_ID: int
- Parameters
-
model_ID The unique identifier for the ML model.
return type of : string
- Returns
- The name of the ML model corresponding to the provided ID.
.. code-block:: python
◆ get_ML_operation()
| get_ML_operation | ( | op_name, | |
| entity_id1, | |||
| entity_id2, | |||
| params, | |||
| user_configs, | |||
| small_curve_size, | |||
| mesh_size ) |
Generate the command, display label, and preview text for an ML operation.
Constructs three strings for the specified operation and entities: 1. the Cubit command to execute the operation, 2. a human-readable display label, 3. a preview description. @n type of op_name: string
- Parameters
-
op_name Name of the ML operation (see get_ML_operation_features).
type of entity_id1: intentity_id1 ID of the primary entity involved in the operation.
type of entity_id2: intentity_id2 ID of the secondary entity involved in the operation.
type of params: std::vector< double,std::allocator< double > >params Optional vector of parameter values for the operation.
type of user_configs: std::vector< double,std::allocator< double > >user_configs Vector of user configurable settings (geometry sizing and regularize).
type of small_curve_size: floatsmall_curve_size Threshold below which a curve is considered "small." Used for tailoring command generation.
type of mesh_size: floatmesh_size Target mesh size parameter for the operation.
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- A vector of three strings:
- [0] = execution command,
- [1] = display label,
- [2] = preview text.
.. code-block:: python
◆ get_ML_operation_feature_names()
| get_ML_operation_feature_names | ( | ml_op_name, | |
| reduced_features = False ) |
Retrieve the list of feature names for a specified ML operation.
This function returns a vector of strings naming each feature in the operation's input vector.
type of ml_op_name: string
- Parameters
-
ml_op_name Name of the ML operation or model (as defined by get_ML_operation_features()).
type of reduced_features: boolean, optionalreduced_features If true (currently only for "volume_no_op"), return the reduced set of feature names (9) instead of the full set (46) for faster inference. @n return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector of feature name strings, in the same order as the corresponding feature values.
.. code-block:: python
for i in range(len(feature_names)): print(f"{i}\t{feature_names[i]}\t{feature_types[i]}\t{features[0][i]}")
◆ get_ML_operation_feature_size()
| get_ML_operation_feature_size | ( | ml_op_name, | |
| reduced_features = False ) |
Retrieve the expected feature-vector length for a given ML operation.
For the specified operation (as described by get_ML_operation_features()), this function returns the number of features that the model expects as input. @n type of ml_op_name: string
- Parameters
-
ml_op_name Name of the ML operation or model.
type of reduced_features: boolean, optionalreduced_features If true (currently only supported for "volume_no_op"), returns the reduced feature count (9) instead of the full feature set (46) for more efficient predictions.
return type of : int
- Returns
- Number of features expected by the operation.
.. code-block:: python
◆ get_ML_operation_feature_types()
| get_ML_operation_feature_types | ( | ml_op_name, | |
| reduced_features = False ) |
Get the data-type descriptor for each feature of a specified ML operation.
This function returns a list of strings indicating the type of data expected for each feature in the operation's input vector. The types can be: - "boolean" (binary flags: 0 or 1) - "categorical" (integer codes representing discrete categories, e.g., surface type) - "continuous" (numeric values spanning a range, e.g., curve count or surface area) @n type of ml_op_name: string
- Parameters
-
ml_op_name Name of the ML model or operation (see get_ML_operation_features()).
type of reduced_features: boolean, optionalreduced_features If true (currently only for "volume_no_op"), returns types for the reduced feature set (9) instead of the full set (46).
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector of data-type strings matching the order of the feature values.
.. code-block:: python
◆ get_ML_operation_features()
| get_ML_operation_features | ( | ml_op_names, | |
| entity1_ids, | |||
| entity2_ids, | |||
| params, | |||
| user_configs, | |||
| mesh_size, | |||
| reduced_features = False ) |
Compute ML feature vectors for a list of Cubit operations.
This function computes machine learning feature vectors for a list of Cubit operations based on specified parameters, including entity IDs and target mesh size. It returns the computed feature vectors for each operation.
.. code-block:: python
Supported operations: ### Outdated ###
.. code-block:: c++
ID | Type | #Labels | Name | Entity1 | Entity2 | Params
---------------------------------------------------------------------------
1 | R | 3 | vertex_no_op | vertex | none |
2 | R | 3 | curve_no_op | curve | none |
3 | R | 3 | surface_no_op | surface | none |
4 | C | 1 | volume_no_op | volume | none |
5 | R | 3 | remove_surface | surface | none |
6 | R | 3 | tweak_replace_surface | surface | surface |
7 | R | 3 | composite_surfaces | surface | surface |
8 | R | 3 | collapse_curve | curve | vertex |
9 | R | 3 | remove_topology_curve | curve | curve |
10 | R | 3 | virtual_collapse_curve | curve | vertex |
11 | R | 3 | remove_topology_surface | surface | surface |
13 | R | 3 | remove_cone | surface | none |
15 | R | 3 | remove_blend | surface | none | 16 | R | 3 | remove_cavity | surface | none |
19 | C | 1 | classify_surface | surface | none |
type of ml_op_names: std::vector< std::string,std::allocator< std::string > >
- Parameters
-
ml_op_names Vector of ML operation/model names.
type of entity1_ids: std::vector< size_t,std::allocator< size_t > >entity1_ids Vector of primary entity IDs for each operation.
type of entity2_ids: std::vector< size_t,std::allocator< size_t > >entity2_ids Vector of secondary entity IDs for each operation.
type of params: std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >params Vector of parameter lists for each operation.
type of user_configs: std::vector< double,std::allocator< double > >user_configs Vector of user configurable settings (geometry sizing and regularize).
type of mesh_size: floatmesh_size Target mesh size for feature calculations.
type of reduced_features: boolean, optionalreduced_features If true (where supported), compute a reduced feature set for faster performance.
return type of : std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std:: allocator< double > > > >
- Returns
- Outer vector size == ml_op_names.size(); each inner vector contains the feature values for that operation.
◆ get_ML_operation_label_size()
| get_ML_operation_label_size | ( | ml_op_name | ) |
Retrieve the expected label vector length for a given ML operation.
Returns the number of entries in the output label vector for the specified operation or model. @n type of ml_op_name: string
- Parameters
-
ml_op_name Name of the ML operation or model.
return type of : int
- Returns
- Number of labels in the operation's output vector.
.. code-block:: python
◆ get_ML_predictions()
| get_ML_predictions | ( | ml_op_names, | |
| entity1_ids, | |||
| entity2_ids, | |||
| params, | |||
| user_configs, | |||
| mesh_size, | |||
| reduced_features = False ) |
Compute ML predictions for a list of operations on single-entity pairs.
This function loads the ML training data (if not already loaded), computes features for each specified operation and its associated entities, and then runs predictions using a scikit-learn ensemble of decision trees. @n type of ml_op_names: std::vector< std::string,std::allocator< std::string > >
- Parameters
-
ml_op_names Vector of ML operation or model names. Classification "volume_no_op", "classify_surface" (returns confidence per category). Regression various operation IDs (returns one or more quality metrics).
type of entity1_ids: std::vector< size_t,std::allocator< size_t > >entity1_ids Vector of primary entity IDs for each operation.
type of entity2_ids: std::vector< size_t,std::allocator< size_t > >entity2_ids Vector of secondary entity IDs for each operation.
type of params: std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >params Vector of parameter lists for each operation.
type of user_configs: std::vector< double,std::allocator< double > >user_configs Vector of user configurable settings (geometry sizing and regularize).
type of mesh_size: floatmesh_size Target mesh size used in feature calculation.
type of reduced_features: boolean, optionalreduced_features If true (where supported), use the reduced feature set for faster inference.
return type of : std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std:: allocator< double > > > >
- Returns
- Outer vector matches ml_op_names length; each inner vector contains the predicted values for that operation:
- Classification: confidences (0-1) per category.
- Regression: one or more metrics as defined per model.
.. code-block:: python
◆ get_ML_regression_models()
| get_ML_regression_models | ( | ) |
Retrieve the list of supported regression ML model names.
Queries the ML subsystem for all available regression models used for prediction or analysis. @n return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector of regression model names; empty if no models are registered.
.. code-block:: python
◆ get_ML_surviving_entities()
| get_ML_surviving_entities | ( | op_name, | |
| begin_ents ) |
Identify which entities survive after a CAD operation.
Uses the snapshot from get_ML_initialize_surviving_entities() to find entities that remain or correspond to the initial set after the operation is completed. @n type of op_name: string
- Parameters
-
op_name Name of the ML operation.
type of begin_ents: std::vector< int,std::allocator< int > >begin_ents Entity ID list from get_ML_initialize_surviving_entities().
return type of : std::pair< std::string,std::vector< int,std:: allocator< int > > >
- Returns
- A pair:
- first = entity type ("vertex", "curve", etc.),
- second = list of surviving entity IDs.
.. code-block:: python
for id in result[1]: print("Surviving entity ID:", id)
◆ get_moment_magnitude()
| get_moment_magnitude | ( | entity_id | ) |
Get the moment magnitude of a force BC.
type of entity_id: int
- Parameters
-
entity_id ID of the force BC.
return type of : float
- Returns
- Moment magnitude.
◆ get_n_largest_distances_between_meshes()
| get_n_largest_distances_between_meshes | ( | n, | |
| entity_type1, | |||
| ids1, | |||
| entity_type2, | |||
| ids2 ) |
Finds the N largest node-to-element distances between two meshes.
For each node on the entities in `ids1`, computes its distance to nearby elements on `ids2`.
* Only triangle and quad elements are supported. For a distance to be included:
* The node and element must be sufficiently facing each other (dot product of normals < -0.65).
* The distance must be smaller than the element's bounding box size.
* The function returns the N largest such distances found. For each, the following are returned:
* Distance between the node and element.
* Node ID.
* Element ID.
* The result is a flat vector of 3 * N doubles, ordered by decreasing distance.
* This function is useful for:
* Checking mesh alignment between surfaces.
* Identifying large mesh gaps.
* Identifying overlapping regions where contact conditions are expected.
* Overlapping meshes in such cases can cause problems in FEA analyses if not corrected.
.. code-block:: python
for i in range(0, len(distances), 3): print("Distance:", distances[i], "Node ID:", int(distances[i+1]), "Element ID:", int(distances[i+2]))
@n type of n: int
- Parameters
-
n Number of largest distances to return.
type of entity_type1: stringentity_type1 Entity type for first mesh (e.g., "surface").
type of ids1: std::vector< int,std::allocator< int > >ids1 IDs of entities to use for nodes.
type of entity_type2: stringentity_type2 Entity type for second mesh (e.g., "surface").
type of ids2: std::vector< int,std::allocator< int > >ids2 IDs of entities to use for elements. @n return type of : std::vector< double,std:: allocator< double > >
- Returns
- Flat vector of (distance, node ID, element ID) triplets, size = 3 * N.
◆ get_namespace_list()
| get_namespace_list | ( | ) |
◆ get_narrow_regions()
| get_narrow_regions | ( | target_ids, | |
| narrow_size ) |
Find faces containing narrow regions within specified volumes.
Collects all unique faces of volumes in target_ids. For each face: - If the face has a single boundary loop, looks for "split" locations between non-adjacent edges where edges come within narrow_size without a short vertex chain between them. - If the face has multiple loops, computes the minimum distance between loops; if any two loops come within narrow_size, the face is included. Faces meeting either criterion are returned. This function differs from get_closed_narrow_surfaces by applying to all faces (not just closed two-loop faces), and from get_surfs_with_narrow_regions by using split-point and loop-to-loop proximity tests rather than purely edge-pair orientation checks.
.. code-block:: python
@n type of target_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_ids Vector of volume IDs to examine.
type of narrow_size: floatnarrow_size Distance threshold for detecting narrow regions.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of surface IDs that contain narrow regions.
◆ get_narrow_surfaces()
| get_narrow_surfaces | ( | target_volume_ids, | |
| mesh_size ) |
Find surfaces with narrow regions in specified volumes.
For each face of volumes in target_volume_ids, checks if any two non-adjacent edges form a narrow region (distance <= mesh_size and orientation difference > 15deg). Returns all face IDs that meet this criterion.
.. code-block:: python
for sid in narrow_surfaces: print("Narrow surface ID:", sid)
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
type of mesh_size: floatmesh_size Distance threshold for detecting narrow regions.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of IDs of surfaces containing a narrow region.
◆ get_nearby_entities()
| get_nearby_entities | ( | gtype, | |
| ent_ids, | |||
| compare_ents, | |||
| distance ) |
Identify nearby entities of type curve, surface, or volume for a given list of the same type.
Returns a list of entities of type `gtype` that are within the specified `distance` of the entities in `ent_ids`. If `compare_ents` is empty, all entities of type `gtype` in the model will be used for comparison. If `distance` is set to -1, a default tolerance will be computed internally.
.. code-block:: python
for id in nearby_ents: print(id)
@n type of gtype: string
- Parameters
-
gtype Entity type to query: "curve", "surface", or "volume".
type of ent_ids: std::vector< int,std::allocator< int > >ent_ids Entities of type gtypeto check.
type of compare_ents: std::vector< int,std::allocator< int > >compare_ents Entities of type gtypeto check against. If empty, checks against all entities of typegtypein the model.
type of distance: floatdistance Maximum distance between entities. If -1, a default tolerance will be computed.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of entity IDs of type
gtypethat are withindistanceof the entities inent_ids.
◆ get_nearby_volumes_at_volume()
| get_nearby_volumes_at_volume | ( | volume_id, | |
| compare_volumes, | |||
| distance ) |
Get the list of nearby volumes from the model for a single volume :type volume_id: int.
- Parameters
-
volume_id volume to check. :param volumes: to check against. If empty, will check against all volumes in model :param maximum: distance betwen volumes. Optional. Use -1 to compute default tolerance :rtype: std::vector< int,std::allocator< int > >
- Returns
- list of volumes that are nearby to volume_id from compare_volumes list
◆ get_next_block_id()
| get_next_block_id | ( | ) |
Get the next available block ID.
.. code-block:: python
@n return type of : int
- Returns
- Next available block ID.
◆ get_next_boundary_layer_id()
| get_next_boundary_layer_id | ( | ) |
Get the next available boundary layer ID.
This ID can be used to define a new boundary layer entity.
return type of : int
- Returns
- Next available unique boundary layer ID.
◆ get_next_command_from_history()
| get_next_command_from_history | ( | ) |
Get the next command from the history buffer.
Advances an internal history pointer and returns the next command.
.. code-block:: python
@n return type of : string
- Returns
- The next command in the history sequence.
◆ get_next_group_id()
| get_next_group_id | ( | ) |
Return the next available group ID from Cubit.
.. code-block:: python
@n return type of : int
- Returns
- Next unused integer ID for a new group.
◆ get_next_nodeset_id()
| get_next_nodeset_id | ( | ) |
Get the next available nodeset ID.
.. code-block:: python
@n return type of : int
- Returns
- Next available nodeset ID.
◆ get_next_sideset_id()
| get_next_sideset_id | ( | ) |
Get the next available sideset ID.
.. code-block:: python
@n return type of : int
- Returns
- Next available sideset ID.
◆ get_nodal_coordinates()
| get_nodal_coordinates | ( | node_id | ) |
Get the coordinates of a mesh node.
This function returns the (x, y, z) coordinates of the specified node ID. In C++, the coordinates are returned as a std::array<double,3>. In Python, the coordinates are returned as a tuple of three floats.
.. code-block:: python
@n type of node_id: int
- Parameters
-
node_id ID of the node.
return type of : std:: array< double,3 >
- Returns
- : Array (or tuple) of three doubles the x, y, and z coordinates of the node.
◆ get_node_constraint()
| get_node_constraint | ( | ) |
Query whether node constraint is enabled (move mid-nodes to geometry).
Node constraints control how higher-order mid-nodes snap to curved geometry: - off : mid-nodes retain their original positions. - on : mid-nodes are projected to the geometry. - smart : mid-nodes only snap if doing so does not degrade element quality.
.. code-block:: python
@n return type of : boolean
- Returns
- True if node constraint is "on" or "smart"; otherwise false.
◆ get_node_constraint_smart_metric()
| get_node_constraint_smart_metric | ( | ) |
Query the current quality metric for smart node constraint.
When node constraint is in "smart" mode for tets or tris, this returns either "distortion" or "normalized inradius", indicating which metric controls snapping.
.. code-block:: python
@n return type of : string
- Returns
- The quality metric name for smart mode ("distortion" or "normalized inradius").
◆ get_node_constraint_smart_threshold()
| get_node_constraint_smart_threshold | ( | ) |
Query the current quality threshold for smart node constraint.
When node constraint is in "smart" mode, mid-nodes are only projected if element quality remains above this threshold.
.. code-block:: python
@n return type of : float
- Returns
- The quality threshold used for smart mode (double).
◆ get_node_constraint_value()
| get_node_constraint_value | ( | ) |
Query the numeric value of the node constraint setting.
Returns 0 for off, 1 for on, or 2 for smart. This corresponds to the "set Node Constraint" options.
.. code-block:: python
@n return type of : int
- Returns
- 0 if off, 1 if on, or 2 if smart.
◆ get_node_count()
| get_node_count | ( | ) |
Retrieve the count of nodes in the current model.
.. code-block:: python
@n return type of : int
- Returns
- Number of nodes in the current model's mesh.
◆ get_node_edges()
| get_node_edges | ( | node_id | ) |
Get the IDs of all edge elements adjacent to a node.
Edge elements are created on meshed curves and throughout meshed surfaces, but not within the interior volume mesh. Nodes not on any meshed curve or surface will have no adjacent edges.
.. code-block:: python
@n type of node_id: int
- Parameters
-
node_id ID of the node.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of edge element IDs adjacent to the node (empty if none).
◆ get_node_exists()
| get_node_exists | ( | node_id | ) |
Check whether a node exists in the model.
This function returns `true` if the specified node ID exists in the current model; otherwise it returns `false`.
.. code-block:: python
@n type of node_id: int
- Parameters
-
node_id ID of the node to check.
return type of : boolean
- Returns
trueif the node exists,falseotherwise.
◆ get_node_faces()
| get_node_faces | ( | node_id | ) |
Get the IDs of all quadrilateral elements (faces) adjacent to a node.
In Cubit, "faces" are represented as quad elements on surfaces. Nodes in the interior of volumes will have no adjacent faces returned.
.. code-block:: python
@n type of node_id: int
- Parameters
-
node_id ID of the node.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of quad element IDs (faces) adjacent to the node (empty if none).
◆ get_node_global_id()
| get_node_global_id | ( | node_id | ) |
Get the global node ID assigned in the Exodus file for a mesh node.
In Cubit, each node has a local ID unique within the session. Upon exporting the mesh to an Exodus file, nodes are renumbered into a global ID space from 1 to N. This function returns the Exodus global node ID for the given local node ID, or 0 if the mesh has not been exported.
.. code-block:: python
@n type of node_id: int
- Parameters
-
node_id Local Cubit node ID.
return type of : int
- Returns
- Global node ID assigned in the Exodus file, or 0 if not yet exported.
◆ get_node_position_fixed()
| get_node_position_fixed | ( | node_id | ) |
Query whether a mesh node is fixed (constrained against smoothing).
A fixed node will not be moved by mesh smoothing or optimization operations.
.. code-block:: python
@n type of node_id: int
- Parameters
-
node_id ID of the node to query.
return type of : boolean
- Returns
trueif the node is fixed (constrained),falseif it is not.
◆ get_node_tris()
| get_node_tris | ( | node_id | ) |
Get the IDs of all triangular elements adjacent to a node.
In Cubit, triangular "faces" are represented as tris on surfaces. Nodes in the interior of volumes will have no adjacent tris returned.
.. code-block:: python
@n type of node_id: int
- Parameters
-
node_id ID of the node.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of triangular element IDs (tris) adjacent to the node (empty if none).
◆ get_nodeset_count()
| get_nodeset_count | ( | ) |
Get the current number of nodesets in the model.
In Cubit, a nodeset groups mesh nodes for applying boundary conditions or loads. Nodesets can be defined by assigning vertices, curves, surfaces, volumes, or individual nodes to a given ID.
.. code-block:: python
@n return type of : int
- Returns
- The number of nodesets currently defined in the model.
◆ get_nodeset_curves()
| get_nodeset_curves | ( | nodeset_id | ) |
Get the list of curve IDs associated with a nodeset.
This function returns the IDs of all curves that are associated with the specified nodeset.
.. code-block:: python
for curve_id in curve_ids: print(f" Curve ID: {curve_id}")
@n type of nodeset_id: int
- Parameters
-
nodeset_id ID of the nodeset to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of curve IDs contained in the nodeset.
◆ get_nodeset_id_list()
| get_nodeset_id_list | ( | ) |
Get a list of all active nodeset IDs.
Returns a vector of all currently active nodeset IDs in the model.
.. code-block:: python
for nodeset_id in nodeset_ids: print(" Nodeset ID:", nodeset_id)
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector (Python tuple) of all active nodeset IDs.
◆ get_nodeset_id_list_for_bc()
| get_nodeset_id_list_for_bc | ( | bc_type_enum, | |
| bc_id ) |
Get list of nodeset IDs associated with a boundary condition.
Returns nodesets to which the BC is applied.
type of bc_type_enum: int
- Parameters
-
bc_type_enum BC type enum (CI_BCTypes).
type of bc_id: intbc_id ID of the boundary condition.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of associated nodeset IDs.
◆ get_nodeset_node_count()
| get_nodeset_node_count | ( | nodeset_id | ) |
Get the number of nodes in a nodeset.
type of nodeset_id: int
- Parameters
-
nodeset_id The nodeset id
return type of : int
- Returns
- Number of nodes in the nodeset
◆ get_nodeset_nodes()
| get_nodeset_nodes | ( | nodeset_id | ) |
Get the list of node IDs explicitly assigned to a nodeset.
This function returns the IDs of nodes that were specifically assigned to the nodeset. If the nodeset was created on geometry (e.g. a surface or volume), this function will **not** return the nodes on that geometry unless they were explicitly assigned. To include nodes on geometry, use 'get_nodeset_nodes_inclusive' instead.
.. code-block:: python
for node_id in node_ids: print(f" Node ID: {node_id}")
@n type of nodeset_id: int
- Parameters
-
nodeset_id ID of the nodeset to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of node IDs explicitly assigned to the nodeset.
◆ get_nodeset_nodes_inclusive()
| get_nodeset_nodes_inclusive | ( | nodeset_id | ) |
Get the list of node IDs associated with a nodeset (inclusive).
This function returns the IDs of all nodes associated with the specified nodeset. It includes: - Nodes explicitly assigned to the nodeset. - Nodes associated with any geometry used to define the nodeset (e.g. surfaces or volumes). Use this function when the nodeset was created using geometry and you want **all associated nodes**. For only explicitly assigned nodes, see 'get_nodeset_nodes'.
.. code-block:: python
for node_id in node_ids: print(f" Node ID: {node_id}")
@n type of nodeset_id: int
- Parameters
-
nodeset_id ID of the nodeset to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of node IDs contained in the nodeset, including nodes on associated geometry.
◆ get_nodeset_surfaces()
| get_nodeset_surfaces | ( | nodeset_id | ) |
Get the list of surface IDs associated with a nodeset.
This function returns the IDs of all surfaces that are associated with the specified nodeset.
.. code-block:: python
for surf_id in surface_ids: print(f" Surface ID: {surf_id}")
@n type of nodeset_id: int
- Parameters
-
nodeset_id ID of the nodeset to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of surface IDs contained in the nodeset.
◆ get_nodeset_vertices()
| get_nodeset_vertices | ( | nodeset_id | ) |
Get the list of vertex IDs associated with a nodeset.
This function returns the IDs of all vertices that are associated with the specified nodeset.
.. code-block:: python
for vertex_id in vertex_ids: print(f" Vertex ID: {vertex_id}")
@n type of nodeset_id: int
- Parameters
-
nodeset_id ID of the nodeset to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of vertex IDs contained in the nodeset.
◆ get_nodeset_volumes()
| get_nodeset_volumes | ( | nodeset_id | ) |
Get the list of volume IDs associated with a nodeset.
This function returns the IDs of all volumes that are associated with the specified nodeset.
.. code-block:: python
for vol_id in volume_ids: print(f" Volume ID: {vol_id}")
@n type of nodeset_id: int
- Parameters
-
nodeset_id ID of the nodeset to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of volume IDs contained in the nodeset.
◆ get_num_volume_shells()
| get_num_volume_shells | ( | volume_id | ) |
Get the number of shells in a volume.
A "shell" is a closed set of faces bounding a region within the volume. For a simple solid with no internal cavities, this returns 1. If the volume contains voids or nested regions, each closed boundary counts as a separate shell.
.. code-block:: python
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to query.
return type of : int
- Returns
- Number of shells (closed face loops) in the specified volume.
◆ get_overconstrained_tets_in_volumes()
| get_overconstrained_tets_in_volumes | ( | volumes | ) |
Retrieve IDs of overconstrained tetrahedra within specified volumes.
Overconstrained tetrahedra are those that have two triangular faces on the same surface and all four corner nodes lying on surfaces, curves, or vertices. Such tets cannot be smoothed and are typically removed to improve mesh quality. @n type of volumes: std::vector< int,std::allocator< int > >
- Parameters
-
volumes Vector of volume IDs to search for overconstrained tets.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- std::vector<int> containing the IDs of all overconstrained tets found.
.. code-block:: python
if over_tets:
3) Convert the integer list to a space-separated string.
ids_str = cubit.string_from_id_list(over_tets)
else:
◆ get_overlap_max_angle()
| get_overlap_max_angle | ( | ) |
Get the current maximum angle tolerance used for calculating surface overlaps.
Returns the maximum angle (in degrees) allowed between normals of adjacent surfaces when determining overlaps. This setting controls how much angular deviation is tolerated before surfaces are considered non-overlapping.
.. code-block:: python
@n return type of : float
- Returns
- The current maximum angle tolerance (in degrees) used for surface overlap calculations.
◆ get_overlap_max_gap()
| get_overlap_max_gap | ( | ) |
Get the current maximum gap tolerance used for calculating surface overlaps.
Returns the maximum allowable gap between adjacent surfaces when determining overlaps. This setting controls how large a gap is tolerated before surfaces are considered non-overlapping.
.. code-block:: python
@n return type of : float
- Returns
- The current maximum gap tolerance (in model units) used for surface overlap calculations.
◆ get_overlap_min_gap()
| get_overlap_min_gap | ( | ) |
Get the current minimum gap tolerance used for calculating surface overlaps.
Returns the minimum allowable gap between adjacent surfaces when determining overlaps. This setting can be used to ignore negligible gaps that should be treated as overlapping.
.. code-block:: python
@n return type of : float
- Returns
- The current minimum gap tolerance (in model units) used for surface overlap calculations.
◆ get_overlapping_surfaces_at_surface()
| get_overlapping_surfaces_at_surface | ( | surface_id, | |
| compare_volumes, | |||
| cache_overlaps = 0 ) |
Identify surfaces in the model that overlap a single target surface.
Returns a list of surfaces that overlap the specified `surface_id`. If `compare_volumes` is empty, all volumes in the model will be used for comparison. Caching can be used to avoid redundant distance calculations when this function is called together with `get_overlapping_surfaces_in_volumes`. Both functions require the same underlying distance computations between surfaces in the specified volumes. If caching is enabled, the results of these distance calculations will be saved and reused when the second function is called. If you are calling only this function by itself, caching provides no performance benefit.
.. code-block:: python
for s_id in overlapping_surfaces: print(s_id)
@n type of surface_id: int
- Parameters
-
surface_id Surface ID to check.
type of compare_volumes: std::vector< int,std::allocator< int > >compare_volumes List of volumes to check against. If empty, checks against all volumes in the model.
type of cache_overlaps: int, optionalcache_overlaps Caching mode: 0 = no caching, 1 = clear cache first, 2 = use and add to existing cache.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of surface IDs that overlap the specified
surface_id.
◆ get_overlapping_surfaces_in_bodies()
| get_overlapping_surfaces_in_bodies | ( | body_ids, | |
| filter_slivers = False ) |
Identify overlapping surfaces between different volumes in a set of bodies.
Overlaps are only reported between surfaces from different volumes. The result is a vector of vectors. The first surface ID in each vector overlaps with all subsequent surfaces in that vector.
.. code-block:: python
for surfaces in overlaps: print("Surfaces:", tuple(int(sid) for sid in surfaces))
type of body_ids: std::vector< int,std::allocator< int > >
- Parameters
-
body_ids List of body IDs to search for surface overlaps.
type of filter_slivers: boolean, optionalfilter_slivers Optional flag to filter out overlaps where surfaces share a merged curve.
return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- A list of surface overlap results. Each entry is a vector of surface IDs where the first ID overlaps with all subsequent IDs in that vector. Overlaps are only reported between surfaces from different volumes.
◆ get_overlapping_volumes()
| get_overlapping_volumes | ( | target_volume_ids | ) |
Identify overlapping volumes in a list of volumes.
For each pair of overlapping volumes, two volume IDs are returned in the output list. The first volume ID overlaps with the second, the third overlaps with the fourth, and so on. The list should always contain an even number of volume IDs (modulus 2 = 0).
.. code-block:: python
for i in range(0, len(overlapping_volumes), 2): print(f"Volumes: ({overlapping_volumes[i]}, {overlapping_volumes[i+1]})")
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids List of volume IDs to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list of overlapping volume IDs. The first ID overlaps with the second, the third with the fourth, and so on.
◆ get_overlapping_volumes_at_volume()
| get_overlapping_volumes_at_volume | ( | volume_id, | |
| compare_volumes ) |
Identify volumes in the model that overlap a single target volume.
Returns a list of volumes that overlap the specified `volume_id`. If `compare_volumes` is empty, all volumes in the model will be used for comparison.
.. code-block:: python
for v_id in overlapping_volumes: print(v_id)
@n type of volume_id: int
- Parameters
-
volume_id Volume ID to check.
type of compare_volumes: std::vector< int,std::allocator< int > >compare_volumes List of volumes to check against. If empty, checks against all volumes in the model.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of volume IDs that overlap the specified
volume_id.
◆ get_owning_body()
| get_owning_body | ( | geometry_type, | |
| entity_id ) |
Get the owning body for a specified entity.
Returns the ID of the body that contains (owns) the given entity.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Specifies the entity type ("body", "volume", "surface", "curve", or "vertex").
type of entity_id: intentity_id ID of the entity whose owning body is requested.
return type of : int
- Returns
- ID of the body that owns the specified entity (or 0 if none).
◆ get_owning_volume()
| get_owning_volume | ( | geometry_type, | |
| entity_id ) |
Get the owning volume for a specified entity.
Returns the ID of the volume that contains (owns) the given entity.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Specifies the entity type ("body", "volume", "surface", "curve", or "vertex").
type of entity_id: intentity_id ID of the entity whose owning volume is requested.
return type of : int
- Returns
- ID of the volume that owns the specified entity (or 0 if none).
◆ get_owning_volume_by_name()
| get_owning_volume_by_name | ( | entity_name | ) |
Get the owning volume for an entity by its name.
.. code-block:: python
@n type of entity_name: string
- Parameters
-
entity_name The name of the entity as defined in Cubit.
return type of : int
- Returns
- ID of the volume that owns the named entity, or 0 if the name is not found.
◆ get_parent_assembly_instance()
| get_parent_assembly_instance | ( | assembly_id | ) |
Get the instance number of the parent of an assembly node.
type of assembly_id: int
- Parameters
-
assembly_id ID of the assembly node.
return type of : int
- Returns
- Parent instance number.
◆ get_parent_assembly_path()
| get_parent_assembly_path | ( | assembly_id | ) |
Get the path of an assembly node's parent.
type of assembly_id: int
- Parameters
-
assembly_id ID of the assembly node.
return type of : string
- Returns
- Parent path string.
◆ get_pick_filters()
| get_pick_filters | ( | ) |
Retrieve the list of entity types currently allowed for picking.
Returns all types in the active pick filter. Only entities of these types can be selected in the graphics window.
.. code-block:: python
for t in filters: print("Pick filter:", t)
@n return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector of strings naming the current pick filter types.
◆ get_pick_type()
| get_pick_type | ( | ) |
Get the current pick mode for entity selection.
Returns the pick type that the graphics system is using for selection. This corresponds to the GUI icons and can be one of: "vertex", "curve", "surface", "volume", "node", "edge", "face", etc.
.. code-block:: python
for id in ids: print(f"Selected {mode}: {id}")
@n return type of : string
- Returns
- Null-terminated string naming the current pick type.
◆ get_pressure_function()
| get_pressure_function | ( | entity_id | ) |
Get the function expression associated with a pressure BC.
type of entity_id: int
- Parameters
-
entity_id ID of the pressure BC.
return type of : string
- Returns
- Pressure function as a string.
◆ get_pressure_value()
| get_pressure_value | ( | entity_id | ) |
Get the magnitude value of a pressure BC.
type of entity_id: int
- Parameters
-
entity_id ID of the pressure BC.
return type of : float
- Returns
- Pressure magnitude.
◆ get_previous_command_from_history()
| get_previous_command_from_history | ( | ) |
Get the previous command from the history buffer.
Moves the internal history pointer backwards and returns that command.
.. code-block:: python
@n return type of : string
- Returns
- The previous command in the history sequence.
◆ get_protrusion_surfaces()
| get_protrusion_surfaces | ( | surface_id | ) |
Return the surfaces in the protrusion connected to the specified surface.
The function returns a list of surface IDs that belong to the same protrusion feature as the given surface. The input surface_id must be part of a protrusion. The result includes surface_id itself.
.. code-block:: python
type of surface_id: int
- Parameters
-
surface_id Surface ID that is part of a protrusion.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list of surface IDs belonging to the protrusion (includes surface_id itself).
◆ get_pyramid_count()
| get_pyramid_count | ( | ) |
Retrieve the count of pyramid elements in the current model.
.. code-block:: python
@n return type of : int
- Returns
- Number of pyramid elements in the current model's mesh.
◆ get_pyramid_global_element_id()
| get_pyramid_global_element_id | ( | pyramid_id | ) |
Get the Global Element ID for a specific pyramid element.
This function returns the Global Element ID assigned to the given local pyramid ID when the element is placed into a block.
.. code-block:: python
@n type of pyramid_id: int
- Parameters
-
pyramid_id Local pyramid element ID within its type.
return type of : int
- Returns
- Global Element ID for the specified pyramid, or 0 if not placed into a block.
◆ get_python_version()
| get_python_version | ( | ) |
Retrieve the Python interpreter version used by Cubit.
Returns the version string of the embedded Python interpreter in Cubit.
.. code-block:: python
@n return type of : string
- Returns
- A string containing the Python version number.
◆ get_quad_count()
| get_quad_count | ( | ) |
Retrieve the count of quadrilateral elements in the current model.
For a hexahedral volume mesh, this returns the number of quad faces on the surface.
.. code-block:: python
@n return type of : int
- Returns
- Number of quadrilateral elements (surface faces of a hex mesh).
◆ get_quad_global_element_id()
| get_quad_global_element_id | ( | quad_id | ) |
Get the Global Element ID for a specific quadrilateral element.
Cubit assigns a Global Element ID to each element when it is placed into a block. This function returns the Global Element ID corresponding to the given local quad ID within its type-specific ID space.
.. code-block:: python
@n type of quad_id: int
- Parameters
-
quad_id Local quadrilateral element ID within its type.
return type of : int
- Returns
- Global Element ID for the specified quad, or 0 if not placed into a block.
◆ get_quality_stats_at_geometry()
| get_quality_stats_at_geometry | ( | geom_type, | |
| mesh_type, | |||
| geom_id_list, | |||
| expand_levels, | |||
| metric_name, | |||
| single_threshold, | |||
| use_low_threshold, | |||
| low_threshold, | |||
| high_threshold, | |||
| make_group ) |
Python-friendly version of get_quality_stats operating on geometry entities.
Computes quality statistics over all mesh elements attached to the specified geometry entities (curves, surfaces, or volumes) up to a given adjacency level, using the specified metric and threshold criteria. Results are packed into a single std::vector<double> as follows: * [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] number of failing elements (n) * [9]...[9+n-1] IDs of failing elements Unlike get_elem_quality_stats(), which operates on a flat list of mesh-element IDs, this function first gathers all mesh elements of mesh_type attached to the given geometry_type entities (expanding connectivity up to expand_levels) and then calls get_elem_quality_stats() internally.
.. code-block:: python
@n type of geom_type: string
- Parameters
-
geom_type Geometry type ("curve", "surface", or "volume").
type of mesh_type: stringmesh_type Mesh-element type to evaluate ("edge", "tri", "quad", "tet", "hex").
type of geom_id_list: std::vector< int,std::allocator< int > >geom_id_list Vector of geometry IDs whose attached mesh elements are considered.
type of expand_levels: intexpand_levels Number of adjacency levels to include (0 = only directly attached elements).
type of metric_name: stringmetric_name Name of the quality metric (e.g., "scaled jacobian", "skew").
type of single_threshold: floatsingle_threshold Threshold when using a single bound.
type of use_low_threshold: booleanuse_low_threshold If true, apply [low_threshold, high_threshold]; otherwise use single_threshold.
type of low_threshold: floatlow_threshold Lower bound of the acceptable quality range.
type of high_threshold: floathigh_threshold Upper bound of the acceptable quality range.
type of make_group: booleanmake_group If true, create a group containing failing elements; its ID appears in the output.
return type of : std::vector< double,std:: allocator< double > >
- Returns
- Vector<double> containing quality summary and failing-element IDs.
◆ get_quality_value()
| get_quality_value | ( | mesh_type, | |
| mesh_id, | |||
| metric_name ) |
Retrieve a specific quality metric value for a single mesh element.
Returns the requested quality metric for the given mesh entity.
.. code-block:: python
@n type of mesh_type: string
- Parameters
-
mesh_type Type of mesh element ("hex", "tet", "tri", "quad").
type of mesh_id: intmesh_id Identifier of the mesh element.
type of metric_name: stringmetric_name Name of the quality metric (e.g., "skew", "taper", "scaled jacobian").
return type of : float
- Returns
- The value of the specified quality metric.
◆ get_quality_values()
| get_quality_values | ( | mesh_type, | |
| mesh_ids, | |||
| metric_name ) |
Retrieve quality metric values for multiple mesh elements.
Returns a vector of metric values for the specified list of element IDs. This differs from get_quality_value(), which only returns a single element's metric.
.. code-block:: python
for eid, val in zip(mesh_ids, skew_vals): print(f"Element {eid} skew: {val}")
@n type of mesh_type: string
- Parameters
-
mesh_type Type of mesh element ("hex", "tet", "tri", "quad").
type of mesh_ids: std::vector< int,std::allocator< int > >mesh_ids Vector of mesh element IDs to query.
type of metric_name: stringmetric_name Name of the quality metric (e.g., "skew", "taper", "scaled jacobian").
return type of : std::vector< double,std:: allocator< double > >
- Returns
- std::vector<double> containing metric values corresponding to each mesh_id.
◆ get_reduce_bolt_core_default_dimensions()
| get_reduce_bolt_core_default_dimensions | ( | vol_id | ) |
Computes default core dimensions for a bolt volume in reduce bolt core operation.
Used with `reduce volume <id> bolt core` to estimate the default values for c1, c2, and c3, which define the extent of the core geometry surrounding the bolt.
.. code-block:: python
@n type of vol_id: int
- Parameters
-
vol_id Volume ID representing bolt geometry.
return type of : std::vector< double,std:: allocator< double > >
- Returns
- Vector containing [c1, c2, c3] dimensions for the bolt core.
◆ get_relatives()
| get_relatives | ( | source_geometry_type, | |
| source_id, | |||
| target_geom_type ) |
Get the relatives (parents or children) of a specified entity.
Use this to fetch either ancestor (parent) or descendant (child) entities of one type for a given source entity. For example, to list all curves bounding surface 12, call with source_geometry_type="surface", source_id=12, target_geom_type="curve".
.. code-block:: python
@n type of source_geometry_type: string
- Parameters
-
source_geometry_type The type of the source entity ("body", "volume", "surface", "curve", or "vertex").
type of source_id: intsource_id ID of the source entity.
type of target_geom_type: stringtarget_geom_type The target entity type to retrieve ("body", "volume", "surface", "curve", or "vertex").
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list (vector or Python tuple) of IDs matching target_geom_type related to source_id.
◆ get_rendering_mode()
| get_rendering_mode | ( | ) |
Get the current graphics rendering mode.
Returns an integer code for the active rendering style: * 0 = wireframe only * 1 = wireframe with hidden-line removal * 2 = true hidden-line shading * 3 = smooth shaded surfaces * 4 = transparent surfaces * 5 = geometry facets only
.. code-block:: python
@n return type of : int
- Returns
- Integer code for the current rendering mode.
◆ get_requested_mesh_interval_firmness()
| get_requested_mesh_interval_firmness | ( | geometry_type, | |
| entity_id ) |
Retrieve the explicitly requested interval firmness for a specified entity.
Unlike get_mesh_interval_firmness(), which returns the effective firmness after considering influences from connected topology, this function returns only the firmness setting directly assigned by the user on the entity itself (no inheritance or propagation).
Title Possible return values are:
- "HARD" - interval was explicitly locked by using a hard interval command on this entity.
- "SOFT" - interval was explicitly set (or upgraded) to soft on this entity.
- "LIMP" - no interval firmness was ever set directly on this entity.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Geometry type of the entity ("curve", "surface", or "volume").
type of entity_id: intentity_id ID of the entity whose requested interval firmness is queried.
return type of : string
- Returns
- : The requested interval firmness on that entity "HARD", "SOFT", or "LIMP". "LIMP" indicates no firmness was explicitly set here.
◆ get_requested_mesh_intervals()
| get_requested_mesh_intervals | ( | geometry_type, | |
| entity_id ) |
Retrieve the mesh interval count explicitly set on a geometry entity.
Returns the number of subdivisions assigned directly to the specified geometry entity. * If no interval is set on the entity, it inherits the size from its parent. * If no interval is set anywhere in the hierarchy, the default automatic size is used.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Entity type: "curve", "surface", or "volume".
type of entity_id: intentity_id ID of the geometry entity.
return type of : int
- Returns
- Interval count set on that entity.
◆ get_requested_mesh_size()
| get_requested_mesh_size | ( | geometry_type, | |
| id ) |
Retrieve the mesh size explicitly set on a geometry entity.
Returns the target edge length that was directly assigned to the entity, not inherited from parent entities. If no explicit size was set, returns -1.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Entity type: "curve", "surface", or "volume".
type of id: intid ID of the geometry entity.
return type of : float
- Returns
- Mesh size explicitly set on the entity, or -1 if none.
◆ get_requested_mesh_size_type()
| get_requested_mesh_size_type | ( | geometry_type, | |
| entity_id ) |
Retrieve the mesh size setting type explicitly requested on a specified entity.
Unlike get_mesh_size_type(), which may return "CALCULATED" if the size was inherited or computed, this function returns only the status of a mesh size setting directly applied by the user on this entity.
Title Possible return values are:
- "USER_SET" - The mesh size (target edge length) was explicitly set on this entity.
- "CALCULATED" - The mesh size was inferred or computed on this entity (but not directly by the user).
- "NOT_SET" - No mesh size was explicitly set on this entity.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Geometry type ("curve", "surface", or "volume").
type of entity_id: intentity_id ID of the entity whose requested mesh size status is queried.
return type of : string
- Returns
- : The requested mesh size status on that entity "USER_SET", "CALCULATED", or "NOT_SET".
◆ get_revision_date()
| get_revision_date | ( | ) |
Retrieve the Cubit revision date.
Returns the date of the last code revision applied to the Cubit engine.
.. code-block:: python
@n return type of : string
- Returns
- A string containing Cubit's last revision date.
◆ get_rubberband_shape()
| get_rubberband_shape | ( | ) |
Get the current rubberband selection shape.
Returns an integer code for the active selection shape in the graphics window: * 0 = box * 1 = polygon * 2 = circle
.. code-block:: python
@n return type of : int
- Returns
- Integer code indicating the current rubberband selection shape.
◆ get_selected_id()
| get_selected_id | ( | index | ) |
Get the selected entity ID by index.
Use together with get_selected_ids() and get_selected_type() to inspect selections.
.. code-block:: python
for i in range(len(ids)): id = cubit.get_selected_id(i)
@n type of index: int
- Parameters
-
index Zero-based index into the current selection list.
return type of : int
- Returns
- Entity ID at the given index.
◆ get_selected_ids()
| get_selected_ids | ( | ) |
Retrieve all currently selected entity IDs in pick order.
Returns a vector of IDs for entities selected via the graphics interface or programmatic pick commands. The order reflects the sequence in which entities were picked.
.. code-block:: python
for i, id in enumerate(ids): t = cubit.get_selected_type(i)
@n return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of selected entity IDs; empty if no entities are selected.
◆ get_selected_type()
| get_selected_type | ( | index | ) |
Get the selected entity type by index.
Use together with get_selected_ids() and get_selected_id() to inspect selections.
.. code-block:: python
if ids: id = cubit.get_selected_id(0)
@n type of index: int
- Parameters
-
index Zero-based index into the current selection list.
return type of : string
- Returns
- Entity type string ("vertex", "curve", "surface", "volume") at that index.
◆ get_sgm_version()
| get_sgm_version | ( | ) |
Retrieve the SGM (Solid Geometry Manager) version.
Returns the version string of the SGM engine integrated with Cubit.
.. code-block:: python
@n return type of : string
- Returns
- A string containing the SGM version number.
◆ get_sharp_angle_vertices()
| get_sharp_angle_vertices | ( | target_volume_ids, | |
| upper_bound, | |||
| lower_bound ) |
Identify vertices at sharp curve angles in a set of volumes.
This function computes the interior angles at curve intersections (sharp corners) on the surfaces of each of the specified volumes. Vertices are identified where the interior angle exceeds the specified *upper_bound* or falls below the *lower_bound* threshold.
.. code-block:: python
for vid, angle in zip(vertex_ids, angles): print(f"Vertex {int(vid)} angle {angle:.1f}")
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids List of volume IDs to analyze.
type of upper_bound: floatupper_bound Upper threshold angle, in degrees.
type of lower_bound: floatlower_bound Lower threshold angle, in degrees.
return type of : std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std:: allocator< double > > > >
- Returns
- : A 2D array [ vertex IDs[], corresponding angles[] ]. The first array contains the unique vertex IDs (as integers). The second array contains the corresponding angle at each vertex (as floating-point values).
◆ get_sideset_area()
| get_sideset_area | ( | sideset_id | ) |
Get the total area of a sideset.
If the sideset contains triangle or quadrilateral elements, this function returns the sum of the areas of those elements. Otherwise, it finds the geometric faces associated with the sideset and returns the sum of the areas of the corresponding geometric surfaces.
.. code-block:: python
@n type of sideset_id: int
- Parameters
-
sideset_id ID of the sideset to examine.
return type of : float
- Returns
- Sum of the areas of all tris or faces in the sideset.
◆ get_sideset_contact_pairs()
| get_sideset_contact_pairs | ( | geom_type, | |
| ent_list, | |||
| geom_tol = -1.0 ) |
Identify sideset-based contact interfaces and return compact integer interaction records.
This scans sidesets associated with the specified volumes or blocks, groups sidesets that represent a common contact interface (1-to-1, one-to-many, many-to-one, or many-to-many), and returns each interface as a compact integer record. Records may also represent "intent" where only one side has a named sideset but the opposite entity is known.
Each returned interaction record is encoded as:
[ status, A_id, B_id, bolt_id, n_A_to_B, A_to_B_ss..., n_B_to_A, B_to_A_ss... ]
Field meanings:
- status:
- 0 = both directions present (n_A_to_B >= 1 and n_B_to_A >= 1)
- 1 = missing reverse direction (exactly one direction list is present)
- 2 = ambiguous (multiple plausible neighbors; not uniquely resolvable)
- 3 = unmatched (no inferred opposite entity)
- A_id, B_id:
- In geom_type=="volume" mode: volume IDs
- In geom_type=="block" mode: block IDs
- B_id is 0 when unknown/ambiguous/unmatched
- bolt_id: parsed from naming convention (e.g. "<A>_to_<B>_<bolt_id>"); 0 if not present/unknown
- n_A_to_B, n_B_to_A: number of grouped sidesets in each direction
- A_to_B_ss, B_to_A_ss: sideset IDs grouped for each direction
- Notes
- The output list is sorted deterministically for reproducibility and testing.
- In many models, only one direction is explicitly defined by naming conventions. Such cases return status==1 when the opposite entity is known.
Related helpers once you have sideset IDs:
.. code-block:: python
for rec in pairs: status, a_id, b_id, bolt_id = rec[0], rec[1], rec[2], rec[3]
for sid in ab_ids: name = cubit.get_exodus_entity_name("sideset", sid)
for sid in ba_ids: name = cubit.get_exodus_entity_name("sideset", sid)
@n type of geom_type: string
- Parameters
-
geom_type Entity type selector: "volume" (ent_list are volume IDs) or "block" (ent_list are block IDs). Only sidesets associated with the specified entities are considered. Case-insensitive.
type of ent_list: std::vector< int,std::allocator< int > >ent_list List of entity IDs to inspect (volume IDs when geom_type=="volume"; block IDs when geom_type=="block").
type of geom_tol: float, optionalgeom_tol Geometric tolerance for proximity fallback. If geom_tol < 0 (default -1.0), uses get_merge_tolerance(). If geom_tol == 0, disables proximity fallback. If geom_tol > 0, uses the provided tolerance.
return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- A list of interaction records as described above.
◆ get_sideset_count()
| get_sideset_count | ( | ) |
Get the current number of sidesets in the model.
In Cubit, a sideset groups element faces (or edges) for applying boundary conditions. Sidesets can be defined by assigning surfaces, curves, faces, or mesh entities to a given ID.
.. code-block:: python
@n return type of : int
- Returns
- The number of sidesets currently defined in the model.
◆ get_sideset_curves()
| get_sideset_curves | ( | sideset_id | ) |
Get the list of curve IDs associated with a sideset.
This function returns the IDs of all curves that are associated with the specified sideset.
.. code-block:: python
for curve_id in curve_ids: print(f" Curve ID: {curve_id}")
@n type of sideset_id: int
- Parameters
-
sideset_id ID of the sideset to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of curve IDs contained in the sideset.
◆ get_sideset_edges()
| get_sideset_edges | ( | sideset_id | ) |
Get the list of edge IDs contained in a sideset.
A sideset can contain edge elements. This function returns the IDs of those edge elements, if they exist. An empty list will be returned if there are no edges in the sideset.
.. code-block:: python
for edge_id in edge_ids: print(f" Edge ID: {edge_id}")
@n type of sideset_id: int
- Parameters
-
sideset_id ID of the sideset to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of edge IDs contained in the sideset.
◆ get_sideset_element_type()
| get_sideset_element_type | ( | sideset_id | ) |
Get the element type of a sideset.
type of sideset_id: int
- Parameters
-
sideset_id The id of the sideset to be queried
return type of : string
- Returns
- Element type
◆ get_sideset_id_list()
| get_sideset_id_list | ( | ) |
Get a list of all active sideset IDs.
Returns a vector of all currently active sideset IDs in the model.
.. code-block:: python
for sideset_id in sideset_ids: print(" Sideset ID:", sideset_id)
@n return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector (Python tuple) of all active sideset IDs.
◆ get_sideset_id_list_for_bc()
| get_sideset_id_list_for_bc | ( | bc_type_enum, | |
| bc_id ) |
Get list of sideset IDs associated with a boundary condition.
Returns sidesets to which the BC is applied.
type of bc_type_enum: int
- Parameters
-
bc_type_enum BC type enum (CI_BCTypes).
type of bc_id: intbc_id ID of the boundary condition.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of associated sideset IDs.
◆ get_sideset_quads()
| get_sideset_quads | ( | sideset_id | ) |
Get the list of quadrilateral (quad) element IDs contained in a sideset.
A sideset can contain quadrilateral elements (faces). This function returns the IDs of those quad elements, if they exist. An empty list will be returned if there are no quads in the sideset.
.. code-block:: python
for quad_id in quad_ids: print(f" Quad ID: {quad_id}")
@n type of sideset_id: int
- Parameters
-
sideset_id ID of the sideset to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of quadrilateral (quad) element IDs contained in the sideset.
◆ get_sideset_surfaces()
| get_sideset_surfaces | ( | sideset_id | ) |
Get the list of surface IDs contained in a sideset.
A sideset can contain surfaces. This function returns the IDs of those surfaces, if they exist. An empty list will be returned if there are no surfaces in the sideset.
.. code-block:: python
for surf_id in surface_ids: print(f" Surface ID: {surf_id}")
@n type of sideset_id: int
- Parameters
-
sideset_id ID of the sideset to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of surface IDs contained in the sideset.
◆ get_sideset_tris()
| get_sideset_tris | ( | sideset_id | ) |
Get the list of triangle (tri) element IDs contained in a sideset.
A sideset can contain triangle (tri) elements. This function returns the IDs of those tri elements, if they exist. An empty list will be returned if there are no tris in the sideset.
.. code-block:: python
for tri_id in tri_ids: print(f" Tri ID: {tri_id}")
@n type of sideset_id: int
- Parameters
-
sideset_id ID of the sideset to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of triangle (tri) element IDs contained in the sideset.
◆ get_similar_curves()
| get_similar_curves | ( | curve_ids, | |
| tol = 1e-3, | |||
| use_percent_tol = True, | |||
| on_similar_vols = True ) |
Find curves with lengths similar to a given curve.
This function compares the length of the curve in curve_ids against all other curves in the model. Curves whose lengths differ by no more than tol (interpreted as a fraction if use_percent_tol is true, or as an absolute length if false) are considered similar. If on_similar_vols is true, only curves on volumes with the same geometry as the volume owning curve_ids are compared.
.. code-block:: python
@n type of curve_ids: std::vector< int,std::allocator< int > >
- Parameters
-
curve_ids List of curve IDs to compare against.
type of tol: float, optionaltol Tolerance for length comparison (fraction if use_percent_tol is true, otherwise absolute).
type of use_percent_tol: boolean, optionaluse_percent_tol If true, interpret tol as a fraction of the curve length; otherwise interpret as an absolute length.
type of on_similar_vols: boolean, optionalon_similar_vols If true, restrict comparison to curves on volumes similar to the volume owning curve_ids.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list of curve IDs whose lengths match within tolerance.
◆ get_similar_surfaces()
| get_similar_surfaces | ( | surface_ids, | |
| tol = 1e-3, | |||
| use_percent_tol = True, | |||
| on_similar_vols = True ) |
Find surfaces with similar area and curve count to given surfaces.
This function compares each surface in surface_ids against all other surfaces in the model. Surfaces whose areas differ by no more than tol (interpreted as a fraction if use_percent_tol is true, or as an absolute area if false) and that have the same number of bounding curves are considered similar. If on_similar_vols is true, only surfaces on volumes with the same geometry as the volumes owning surface_ids are compared.
.. code-block:: python
@n type of surface_ids: std::vector< int,std::allocator< int > >
- Parameters
-
surface_ids List of surface IDs to compare against.
type of tol: float, optionaltol Tolerance for area comparison (fraction if use_percent_tol is true, otherwise absolute).
type of use_percent_tol: boolean, optionaluse_percent_tol If true, interpret tol as a fraction of the surface area; otherwise interpret as an absolute area.
type of on_similar_vols: boolean, optionalon_similar_vols If true, restrict comparison to surfaces on volumes similar to the volumes owning surface_ids.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list of surface IDs whose areas and curve counts match within tolerance.
◆ get_similar_volumes()
| get_similar_volumes | ( | volume_ids, | |
| tol = 1e-3, | |||
| use_percent_tol = True ) |
Find volumes with similar size and face count to given volumes.
This function compares each volume in volume_ids against all other volumes in the model. Volumes whose volumes differ by no more than tol (interpreted as a fraction if use_percent_tol is true, or as an absolute volume if false) and that have the same number of faces are considered similar.
.. code-block:: python
@n type of volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
volume_ids List of volume IDs to compare against.
type of tol: float, optionaltol Tolerance for volume comparison (fraction if use_percent_tol is true, otherwise absolute).
type of use_percent_tol: boolean, optionaluse_percent_tol If true, interpret tol as a fraction of the volume; otherwise interpret as an absolute volume.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list (vector or Python tuple) of volume IDs whose volumes and face counts match within tolerance.
◆ get_sizing_function_name()
| get_sizing_function_name | ( | entity_type, | |
| entity_id ) |
Retrieve the meshing sizing function type for a surface or volume.
Returns the sizing function type assigned to the specified entity. Possible return values: "constant", "curvature", "interval", "inverse", "linear", "super", "test", "exodus", or "none".
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Either "surface" or "volume".
type of entity_id: intentity_id ID of the surface or volume.
return type of : string
- Returns
- The sizing function name assigned to that entity.
◆ get_small_and_narrow_surfaces()
| get_small_and_narrow_surfaces | ( | target_ids, | |
| small_area, | |||
| small_curve_size ) |
Find surfaces that are either small in area or contain narrow regions.
For each face of volumes in target_ids, measures its area and checks if area <= small_area. Also checks for narrow regions by evaluating pairs of non-adjacent edges: if their distance <= small_curve_size and orientation difference > 15deg, the face is narrow. Returns all face IDs meeting either criterion.
.. code-block:: python
for sid in results: print("Surface ID:", sid)
@n type of target_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_ids Vector of volume IDs to examine.
type of small_area: floatsmall_area Area threshold; faces with area <= small_area qualify as "small."
type of small_curve_size: floatsmall_curve_size Distance threshold; faces with any two non-adjacent edges within small_curve_size and orientation difference > 15deg qualify as "narrow."
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of IDs of faces that are small or narrow.
◆ get_small_curves()
| get_small_curves | ( | target_volume_ids, | |
| mesh_size ) |
Find curves with edge length below a threshold within given volumes.
For each curve on faces of volumes in target_volume_ids, measures its edge length. Curves with length <= mesh_size are returned.
.. code-block:: python
for cid in small_curves: print("Small curve ID:", cid)
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
type of mesh_size: floatmesh_size Edge-length threshold for "small" curves.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of IDs of curves with length <= mesh_size.
◆ get_small_radius_blend_surfaces()
| get_small_radius_blend_surfaces | ( | target_volume_ids, | |
| max_radius ) |
Find blend surfaces with radius of curvature <= max_radius.
Iterates over all faces of volumes in target_volume_ids and returns those blend surfaces whose radius of curvature is <= max_radius. If max_radius = 0, all blend surfaces are returned.
.. code-block:: python
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
type of max_radius: floatmax_radius Maximum radius of curvature; if 0, return all blend surfaces.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of blend surface IDs with radius <= max_radius.
◆ get_small_surfaces()
| get_small_surfaces | ( | target_volume_ids, | |
| area_threshold ) |
Find surfaces with area below a given threshold.
Gathers all unique faces from the specified volumes, measures each face's area, and returns those with area <= area_threshold.
.. code-block:: python
for sid in small_surfaces: print("Small surface ID:", sid)
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
type of area_threshold: floatarea_threshold Area threshold; faces with area <= area_threshold are returned.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of IDs of surfaces with area <= area_threshold.
◆ get_small_surfaces_HR()
| get_small_surfaces_HR | ( | target_volume_ids, | |
| mesh_size ) |
Python-callable version: identify small hydraulic-radius surfaces.
Computes hydraulic radius = 4*(area/perimeter) for each face in target_volume_ids. Returns IDs of faces with hydraulic radius <= mesh_size.
.. code-block:: python
for sid in small_surfaces: print("Small surface ID:", sid)
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
type of mesh_size: floatmesh_size Hydraulic radius threshold (faces with 4*(area/perimeter) <= mesh_size are "small").
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of IDs of small hydraulic-radius surfaces.
◆ get_small_volumes()
| get_small_volumes | ( | target_volume_ids, | |
| mesh_size ) |
Find volumes whose size is below a threshold based on mesh size.
Volumes with actual volume < 10 * mesh_size^3 are considered "small".
.. code-block:: python
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
type of mesh_size: floatmesh_size Threshold defining "small": volumes with volume < 10 * mesh_size^3.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of IDs of volumes that meet the "small" criterion.
◆ get_smallest_curves()
| get_smallest_curves | ( | target_volume_ids, | |
| number_to_return ) |
Return IDs of the smallest curves in the specified volumes.
Measures the length of each curve on faces of volumes in target_volume_ids and returns the number_to_return curves with the shortest lengths.
.. code-block:: python
for cid in smallest_curves: print("Curve ID:", cid)
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
type of number_to_return: intnumber_to_return Number of smallest curves to return.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of IDs of the smallest curves.
◆ get_smooth_scheme()
| get_smooth_scheme | ( | geometry_type, | |
| entity_id ) |
Retrieve the smoothing scheme for a specified geometry entity.
This returns the name of the smoothing scheme applied to the given entity
("curve", "surface", or "volume") and ID. If none is set, returns an empty string.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type The geometry type: "curve", "surface", or "volume".
type of entity_id: intentity_id The ID of the entity.
return type of : string
- Returns
- The smoothing scheme name, or an empty string if none is set.
◆ get_solutions_for_bad_geometry()
| get_solutions_for_bad_geometry | ( | geom_type, | |
| geom_id ) |
Provide remedy for bad geometry via ACIS healing (deprecated).
Bad geometry often results from imperfect CAD translations. This function invokes ACIS's built-in healing operation.
- Note
- ACIS healing support is deprecated and will be removed in a future release. Alternative solutions for bad geometry are pending.
type of geom_type: string
- Parameters
-
geom_type Type of entity: "curve", "surface", "volume", or "body".
type of geom_id: intgeom_id ID of the geometry entity to query.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of three string vectors: [0] Display string, [1] Command string, [2] Preview string.
◆ get_solutions_for_blends()
| get_solutions_for_blends | ( | surface_id | ) |
Provide possible blend removal solutions for a given surface (and its blend chain if applicable).
Given a surface ID, this function returns possible solutions for removing or adjusting blends on that surface. If the surface is part of a blend chain, the solutions will include operations for the entire blend chain as well.
.. code-block:: python
for i in range(len(solutions[0])): print("Option:", solutions[0][i])
@n type of surface_id: int
- Parameters
-
surface_id The surface being queried. If part of a blend chain, solutions will include the full chain.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display strings for each recommended blend solution, [1] Cubit command strings to apply each blend solution, [2] Cubit preview command strings, [3] Shorthand descriptions (operation ID and involved surface IDs).
◆ get_solutions_for_bolt()
| get_solutions_for_bolt | ( | bolt_id, | |
| insert_id, | |||
| threaded_vol_id ) |
Suggests operations for a volume classified as a bolt using known subcomponent IDs.
This function provides modification options for a bolt volume using known insert and threaded subcomponent volumes. It is more efficient than get_solutions_for_classified_volume when those IDs are already available. Set insert_id or threaded_vol_id to 0 if the corresponding volume is not present or not known. To classify bolt volumes in the model, use get_ML_classification().
.. code-block:: python
for i in range(3): print("Option:", solutions[0][i])
@n type of bolt_id: int
- Parameters
-
bolt_id ID of the volume classified as a bolt.
type of insert_id: intinsert_id Optional ID of the insert volume at the bolt interface. Use 0 if absent.
type of threaded_vol_id: intthreaded_vol_id Optional ID of the threaded (lower) volume. Use 0 if absent or unknown.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four aligned string vectors: [0] Display strings for each recommended operation, [1] Cubit commands to execute the operations, [2] Preview commands for visualization, [3] Operation strings formatted for machine learning tools. In Python, the result is a tuple of lists.
◆ get_solutions_for_bolt_hole()
| get_solutions_for_bolt_hole | ( | bearing_hole, | |
| threaded_holes ) |
Suggests repair or modification options for a set of concentric fastener pilot holes.
Given a bearing hole surface ID and a list of concentric threaded hole surface IDs, this function identifies potential repair or optimization operations.
.. code-block:: python
for i in range(3): print("Option:", solutions[0][i])
@n type of bearing_hole: int
- Parameters
-
bearing_hole ID of the surface on the bearing hole (one per hole).
type of threaded_holes: std::vector< int,std::allocator< int > >threaded_holes List of surface IDs from concentric threaded holes (one per hole).
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four aligned string vectors: [0] Display strings for each proposed operation, [1] Cubit commands to execute them, [2] Preview commands for visualization, [3] Shorthand strings identifying operation and surface IDs. In Python, the result is a tuple of lists.
◆ get_solutions_for_cavity_surface()
| get_solutions_for_cavity_surface | ( | surface_id | ) |
Provide possible cavity removal or adjustment solutions for a given surface (and its cavity if applicable).
Given a surface ID, this function returns possible solutions for removing or adjusting cavity geometry on that surface. If the surface is part of a cavity, the solutions will include operations for the entire cavity as well.
.. code-block:: python
for i in range(len(solutions[0])): print("Option:", solutions[0][i])
@n type of surface_id: int
- Parameters
-
surface_id The surface being queried. If part of a cavity, solutions will include the full cavity.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of three string vectors: [0] Display strings for each recommended cavity solution, [1] Cubit command strings to apply each cavity solution, [2] Cubit preview command strings.
◆ get_solutions_for_chamfers()
| get_solutions_for_chamfers | ( | surface_id | ) |
Provide possible chamfer removal solutions for a given surface (and its chamfer chain if applicable).
Given a surface ID, this function returns possible solutions for removing or adjusting chamfers on that surface. If the surface is part of a chamfer chain, the solutions will include operations for the entire chamfer chain as well.
.. code-block:: python
for i in range(len(solutions[0])): print("Option:", solutions[0][i])
@n type of surface_id: int
- Parameters
-
surface_id The surface being queried. If part of a chamfer chain, solutions will include the full chain.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display strings for each recommended blend solution, [1] Cubit command strings to apply each blend solution, [2] Cubit preview command strings, [3] Shorthand descriptions (operation ID and involved surface IDs).
◆ get_solutions_for_classified_surface()
| get_solutions_for_classified_surface | ( | classification, | |
| surf_id ) |
Suggests remedies or modifications for a classified surface.
.. code-block:: python
for disp, cmd, prev, shrt in zip(solutions[0], solutions[1], solutions[2], solutions[3]): print("Option:", disp)
@n type of classification: string
- Parameters
-
classification Type assigned to the surface (e.g., "slot", "hole", "fillet").
type of surf_id: intsurf_id ID of the classified surface.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display strings describing each remedy, [1] Cubit command strings to execute each remedy, [2] Preview commands for visualization, [3] Shorthand operation descriptors.
◆ get_solutions_for_classified_volume()
| get_solutions_for_classified_volume | ( | classification, | |
| vol_id ) |
Suggests geometry fixes or feature operations for a volume based on its classification.
Given a classification type and a volume ID, this function generates recommended modifications. To obtain classifications from Cubit's ML system, use get_ML_classification().
.. code-block:: python
for i in range(3): print("Option:", solutions[0][i])
@n type of classification: string
- Parameters
-
classification Classification type: one of "bolt", "nut", "washer", "spring", "ball", "race", "pin", "gear", "insert", or "other".
type of vol_id: intvol_id ID of the volume to process.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four aligned string vectors: [0] Display strings for each suggested operation, [1] Cubit command strings to apply the operations, [2] Preview command strings for visualization, [3] Machine-learning-formatted operation strings.
◆ get_solutions_for_close_loop()
| get_solutions_for_close_loop | ( | surface_id, | |
| mesh_size ) |
Retrieve recommended remedies for a close-loop surface to resolve narrow regions.
.. code-block:: python
for disp, cmd, prev, shrt in zip(solutions[0], solutions[1], solutions[2], solutions[3]): print("Option:", disp)
@n type of surface_id: int
- Parameters
-
surface_id ID of the close-loop surface being queried.
type of mesh_size: floatmesh_size Distance threshold that defines a narrow loop region.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display strings for each remedy, [1] Cubit command strings to apply each remedy, [2] Cubit preview command strings, [3] Shorthand descriptions (operation ID and entity IDs) for reconstructing the operation.
◆ get_solutions_for_cone_surface()
| get_solutions_for_cone_surface | ( | surface_id | ) |
Suggests remedies for a surface classified as a cone.
Returns recommended operations for a conical surface, including human-readable descriptions, Cubit command strings to apply them, preview commands for visualization, and shorthand strings for serialization or machine learning workflows.
.. code-block:: python
for disp, cmd, prev, shrt in zip(solutions[0], solutions[1], solutions[2], solutions[3]): print("Option:", disp)
@n type of surface_id: int
- Parameters
-
surface_id ID of the conical surface.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display strings for each recommended operation, [1] Cubit command strings, [2] Preview command strings, [3] Shorthand operation descriptors.
- Note
- In Python, returned vectors will be tuples.
◆ get_solutions_for_connected_surfaces()
| get_solutions_for_connected_surfaces | ( | surf_ids, | |
| common_surface_type ) |
Propose two operations for a connected set of surfaces.
Given a list of surface IDs that are mutually connected, this function returns exactly two candidate operations: (1) Removal of the connected region. (2) Composite of the surfaces into a single face.
Each solution is represented as a 4-element string list: [0] Display string for the operation. [1] Cubit command to execute it. [2] Cubit preview command. [3] ML shorthand string (includes operation + IDs).
The ML shorthand encodes the operation and surface IDs; its feature type is derived from the specified common_surface_type.
- Note
- The function does not verify whether the surfaces are actually connected or whether the specified surface type is valid. It assumes both are correct.
.. code-block:: python
for disp, cmd, prev, shrt in zip(*solutions): print("Option:", disp)
type of surf_ids: std::vector< int,std::allocator< int > >
- Parameters
-
surf_ids IDs of surfaces that must be mutually connected.
type of common_surface_type: string
- Parameters
-
common_surface_type Known type of the connected surfaces. One "chamfer", "blend", "cavity", "cone", or (default) "contiguous". This type is reflected in the ML shorthand string for each solution.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors of length 2: [0] Display strings for each operation, [1] Cubit commands, [2] Preview commands, [3] ML shorthand strings (feature type derived from input type). In Python, the result is a tuple of lists.
◆ get_solutions_for_decomposition()
| get_solutions_for_decomposition | ( | volume_list, | |
| exterior_angle, | |||
| do_imprint_merge, | |||
| tolerant_imprint ) |
Provide possible decomposition solutions for volumes based on exterior angle criteria.
Given a list of volumes and an exterior angle threshold, this function suggests possible decompositions. Optionally, imprinting and merging can be performed to support the decomposition process.
.. code-block:: python
for i in range(len(solutions[0])): print("Option:", solutions[0][i])
@n type of volume_list: std::vector< int,std::allocator< int > >
- Parameters
-
volume_list List of volume IDs to query.
type of exterior_angle: floatexterior_angle Threshold value for the exterior angle (in degrees) used to determine decomposition faces.
type of do_imprint_merge: booleando_imprint_merge If true, perform imprint and merge operations to support decomposition.
type of tolerant_imprint: booleantolerant_imprint If true, perform tolerant imprinting.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display strings for each recommended decomposition option, [1] Cubit command strings to apply each decomposition option, [2] Cubit preview command strings, [3] Shorthand descriptions (operation ID and involved volume or surface IDs). This may be empty depending on the solution.
◆ get_solutions_for_imprint_merge()
| get_solutions_for_imprint_merge | ( | surface_id1, | |
| surface_id2 ) |
Suggests remedies for imprint/merge when two overlapping surfaces are on different volumes.
Given two overlapping surface IDs from different volumes, this function provides suggested operations to resolve the overlap. To detect overlapping surfaces beforehand, use get_overlapping_surfaces_at_surface (for a single surface) or get_overlapping_surfaces_in_volumes (for sets of volumes).
.. code-block:: python
for i in range(len(solutions[0])): print("Option:", solutions[0][i])
@n type of surface_id1: int
- Parameters
-
surface_id1 ID of the first overlapping surface (must be on a different volume than surface_id2).
type of surface_id2: intsurface_id2 ID of the second overlapping surface (must be on a different volume than surface_id1).
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four aligned string vectors: [0] Display strings for each recommended remedy, [1] Cubit command strings to apply each remedy, [2] Cubit preview command strings for each remedy, [3] Shorthand descriptions (operation ID and surface/volume IDs; may be empty).
◆ get_solutions_for_near_coincident_vertex_and_curve()
| get_solutions_for_near_coincident_vertex_and_curve | ( | vertex_id, | |
| curve_id ) |
Suggests remedies when a vertex lies nearly on a curve from a different volume.
Given a vertex and a nearby curve from different volumes, this function identifies operations to resolve the near-coincidence without introducing geometry issues. To detect such vertex-curve pairs, use get_close_vertex_curve_pairs.
.. code-block:: python
for i in range(3): print("Option:", solutions[0][i])
@n type of vertex_id: int
- Parameters
-
vertex_id ID of the vertex that is nearly coincident with the curve (must be on a different volume).
type of curve_id: intcurve_id ID of the curve that lies near the vertex (must be on a different volume).
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four aligned string vectors: [0] Display strings for each recommended remedy, [1] Cubit command strings to apply each remedy, [2] Cubit preview command strings for each remedy, [3] Shorthand descriptions (operation ID and vertex/curve IDs).
◆ get_solutions_for_near_coincident_vertex_and_surface()
| get_solutions_for_near_coincident_vertex_and_surface | ( | vertex_id, | |
| surface_id ) |
Suggests remedies when a vertex lies nearly on a surface from a different volume.
Given a vertex and a nearby surface from different volumes, this function identifies potential fixes such as tweaks or volume adjustments. To identify near-coincident vertex-surface pairs, use get_close_vertex_surface_pairs.
.. code-block:: python
for i in range(3): print("Option:", solutions[0][i])
@n type of vertex_id: int
- Parameters
-
vertex_id ID of the vertex that is nearly coincident with the surface (must be on a different volume).
type of surface_id: intsurface_id ID of the surface that lies near the vertex (must be on a different volume).
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four aligned string vectors: [0] Display strings for each recommended remedy, [1] Cubit command strings to apply each remedy, [2] Cubit preview command strings for each remedy, [3] Shorthand descriptions (operation ID and vertex/surface IDs).
◆ get_solutions_for_near_coincident_vertices()
| get_solutions_for_near_coincident_vertices | ( | vertex_id_1, | |
| vertex_id_2 ) |
Provide remedies for two nearly coincident vertices on different volumes to resolve gaps or misalignments.
Vertices must belong to different volumes.
.. code-block:: python
for disp, cmd, prev, shrt in zip(solutions[0][:3], solutions[1][:3], solutions[2][:3], solutions[3][:3]): print("Option:", disp)
@n type of vertex_id_1: int
- Parameters
-
vertex_id_1 ID of the first vertex (on volume 1).
type of vertex_id_2: intvertex_id_2 ID of the second vertex (on volume 2).
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display strings for each recommended remedy, [1] Cubit command strings to apply each remedy, [2] Cubit preview command strings, [3] Shorthand descriptions (operation ID and vertex IDs).
◆ get_solutions_for_overlapping_surfaces()
| get_solutions_for_overlapping_surfaces | ( | surface_id_1, | |
| surface_id_2 ) |
Suggests remedies for two overlapping surfaces on different volumes.
Given two overlapping surface IDs from different volumes that share the same spatial region, this function provides imprint and merge options for resolving the overlap. To identify overlapping surfaces beforehand, use get_overlapping_surfaces_at_surface or get_overlapping_surfaces_in_volumes.
.. code-block:: python
for i in range(len(solutions[0])): print("Option:", solutions[0][i])
@n type of surface_id_1: int
- Parameters
-
surface_id_1 ID of the first overlapping surface (must be on a different volume than surface_id_2).
type of surface_id_2: intsurface_id_2 ID of the second overlapping surface (must be on a different volume than surface_id_1).
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four aligned string vectors: [0] Display strings for each recommended remedy, [1] Cubit command strings to apply each remedy, [2] Cubit preview command strings for each remedy, [3] Shorthand descriptions (operation ID and volume IDs).
◆ get_solutions_for_overlapping_volumes()
| get_solutions_for_overlapping_volumes | ( | volume_id_1, | |
| volume_id_2, | |||
| maximum_gap_tolerance, | |||
| maximum_gap_angle ) |
Provide remedies for two overlapping volumes based on gap and angular tolerances.
If two volume IDs represent overlapping solids and the overlap exceeds a given gap or angle tolerance, this function suggests operations to resolve the interference.
.. code-block:: python
for i in range(len(solutions[0])): print("Option:", solutions[0][i])
@n type of volume_id_1: int
- Parameters
-
volume_id_1 ID of the first volume.
type of volume_id_2: intvolume_id_2 ID of the second volume.
type of maximum_gap_tolerance: floatmaximum_gap_tolerance Maximum allowed gap before volumes are considered overlapping.
type of maximum_gap_angle: floatmaximum_gap_angle Maximum allowed angular deviation at overlap regions.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display strings for each recommended remedy, [1] Cubit command strings to apply each remedy, [2] Cubit preview command strings, [3] Shorthand descriptions (operation ID and volume or surface IDs).
◆ get_solutions_for_protrusion_surface()
| get_solutions_for_protrusion_surface | ( | surface_id | ) |
Provide possible protrusion removal or adjustment solutions for a given surface (and its protrusion if applicable).
Given a surface ID, this function returns possible solutions for removing or adjusting protrusion geometry on that surface. If the surface is part of a protrusion, the solutions will include operations for the entire protrusion group as well.
.. code-block:: python
for i in range(len(solutions[0])): print("Option:", solutions[0][i])
type of surface_id: int
- Parameters
-
surface_id The surface being queried. If part of a protrusion, solutions will include the full protrusion group.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of three string vectors: [0] Display strings for each recommended protrusion solution, [1] Cubit command strings to apply each protrusion solution, [2] Cubit preview command strings.
◆ get_solutions_for_sharp_angle_vertex()
| get_solutions_for_sharp_angle_vertex | ( | vertex_id, | |
| small_curve_size, | |||
| mesh_size ) |
Retrieve recommended remedies for a sharp angle at a vertex.
.. code-block:: python
for disp, cmd, prev, shrt in zip(solutions[0], solutions[1], solutions[2], solutions[3]): print("Option:", disp)
@n type of vertex_id: int
- Parameters
-
vertex_id ID of the vertex with the sharp angle being queried.
type of small_curve_size: floatsmall_curve_size Threshold that defines what is considered a "small" curve.
type of mesh_size: floatmesh_size Element size used for meshing, used to inform the solution.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display strings for each remedy, [1] Cubit command strings to apply each remedy, [2] Cubit preview command strings, [3] Shorthand descriptions (operation ID and entity IDs) for reconstructing the operation.
◆ get_solutions_for_sheet_volume_connection()
| get_solutions_for_sheet_volume_connection | ( | * | args, |
| ** | kwargs ) |
Propose surface-tweak, imprint, and merge operations to bridge two sheet-volume sets.
Unlike get_solutions_for_sheet_volumes (single group), this function connects two distinct sheet-body sets by first merging within each set (if needed) and then suggesting tweaks, imprint, and merge steps between them. Sheets remain separate bodies to retain unique material assignments.
.. code-block:: python
@n type of vol1_sheets: std::vector< int,std::allocator< int > >
- Parameters
-
vol1_sheets IDs of the first sheet-volume set (common parent).
type of vol2_sheets: std::vector< int,std::allocator< int > >vol2_sheets IDs of the second sheet-volume set (common parent).
type of thickness1: floatthickness1 Thickness of sheets in vol1_sheets.
type of thickness2: floatthickness2 Thickness of sheets in vol2_sheets.
type of close_type: string, optionalclose_type Optional entity type to focus near (e.g., "curve"). Default = "".
type of close_id: int, optionalclose_id Optional ID of close_type entity. Default = 0.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display labels of each option, [1] Commands to execute each option, [2] Preview commands, [3] Shorthand strings for ML training.
◆ get_solutions_for_sheet_volumes()
| get_solutions_for_sheet_volumes | ( | vol_ids, | |
| thickness ) |
Propose surface-extension and imprint/merge operations to connect sheet bodies.
Analyze sheet-body volumes and suggest surface-tweak commands that extend surfaces to fill gaps between them, then propose imprint and merge operations. The sheets remain separate bodies to accommodate unique material assignments.
.. code-block:: python
for disp, cmd, prev, shrt in zip(*solutions): print("Option:", disp)
@n type of vol_ids: std::vector< int,std::allocator< int > >
- Parameters
-
vol_ids IDs of the sheet bodies to connect.
type of thickness: std::vector< double,std::allocator< double > >thickness Corresponding thickness values for each sheet body.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display descriptions of each connection option, [1] Cubit commands to execute the extension, imprint and merge, [2] Cubit preview commands, [3] Shorthand strings (for ML training).
◆ get_solutions_for_small_curves()
| get_solutions_for_small_curves | ( | curve_id, | |
| small_curve_size, | |||
| mesh_size ) |
Recommend remedial operations on a curve already flagged as small.
Operates on a curve marked small by small_curve_size and mesh_size, and suggests surface removals, surface-replacement tweaks, curve collapses to vertices, or topology rebuild operations.
.. code-block:: python
for disp, cmd, prev, shrt in zip(*solutions)[:3]: print("Option:", disp)
@n type of curve_id: int
- Parameters
-
curve_id ID of the small curve.
type of small_curve_size: floatsmall_curve_size Curve-length threshold defining "small" features.
type of mesh_size: floatmesh_size Target mesh element size for context.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display labels, [1] Cubit commands, [2] Preview commands, [3] Shorthand strings for ML training.
◆ get_solutions_for_small_surfaces()
| get_solutions_for_small_surfaces | ( | surface_id, | |
| small_curve_size, | |||
| mesh_size ) |
Recommend remedial operations on a surface already flagged as small.
Operates on a surface marked small by small_curve_size and mesh_size, and suggests composite merges, topology rebuilds, surface removals, or surface-replacement tweaks.
.. code-block:: python
for disp, cmd, prev, shrt in zip(*solutions)[:3]: print("Option:", disp)
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to remediate.
type of small_curve_size: floatsmall_curve_size Threshold under which curves are deemed small.
type of mesh_size: floatmesh_size Target mesh element size for context.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- Vector of four string vectors: [0] Display labels, [1] Execution commands, [2] Preview commands, [3] Shorthand strings for ML training.
◆ get_solutions_for_surfaces_with_narrow_regions()
| get_solutions_for_surfaces_with_narrow_regions | ( | surface_id, | |
| small_curve_size, | |||
| mesh_size ) |
Recommend operations to eliminate narrow regions on a surface identified as narrow.
Analyzes a surface with narrow regions and suggests operations.
type of surface_id: int
- Parameters
-
surface_id ID of the surface to analyze.
type of small_curve_size: floatsmall_curve_size Length threshold defining narrow regions.
type of mesh_size: floatmesh_size Target mesh element size for context.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of three string vectors: [0] Display descriptions for each solution, [1] Cubit command strings to execute solutions, [2] Cubit preview command strings. (In Python, returned as a tuple of lists.)
◆ get_solutions_for_thin_volume()
| get_solutions_for_thin_volume | ( | vol_id, | |
| near_vols, | |||
| include_weights = False, | |||
| include_type = False ) |
Generate candidate operations to reduce a thin volume into a sheet body.
Suggest copying or midsurfacing operations (with optional weights/types) to reduce a volume to a shell.
.. code-block:: python
for disp, cmd, prev, shrt in zip(*solutions[:3]): print("Option:", disp)
@n type of vol_id: int
- Parameters
-
vol_id ID of the thin volume to convert to a sheet.
type of near_vols: std::vector< int,std::allocator< int > >near_vols List of neighboring volume IDs to limit influence; empty uses all.
type of include_weights: boolean, optionalinclude_weights If true, prepend each operation string with heuristic weight (1=best ... 0=worst).
type of include_type: boolean, optionalinclude_type If true, include connection type code (long_long=4, continuous=3, midsurface=2, copy=1).
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display labels for each candidate operation, [1] Cubit commands to perform each operation, [2] Cubit preview commands, [3] Shorthand strings encoding type, vol, surfaces, factors, etc. (In Python this returns as a tuple of lists.)
◆ get_solutions_for_volumes()
| get_solutions_for_volumes | ( | vol_id, | |
| small_curve_size, | |||
| mesh_size ) |
Recommend remediation operations for volumes with features below a size threshold.
Analyze a given volume to find curves smaller than a user-specified threshold and suggest operations to eliminate those features before meshing.
.. code-block:: python
for disp, cmd, prev, shrt in zip(*solutions): print("Option:", disp)
@n type of vol_id: int
- Parameters
-
vol_id ID of the volume to inspect.
type of small_curve_size: floatsmall_curve_size Maximum curve length considered "small".
type of mesh_size: floatmesh_size Target mesh element size for the volume.
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four string vectors: [0] Display labels for each remedy option, [1] Cubit commands to execute each remedy, [2] Cubit preview commands, [3] Shorthand operation strings for ML training.
◆ get_source_surfaces()
| get_source_surfaces | ( | volume_id | ) |
Retrieve the list of sweep source surfaces for a specified volume.
When a volume uses the Sweep scheme, source surfaces are the starting faces from which the hexahedral mesh is extruded. This function returns all surface IDs designated as sources. If no explicit source was set, returns an empty list.
.. code-block:: python
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to query.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list (vector<int> or Python tuple) of surface IDs designated as sweep sources.
◆ get_sphere_count()
| get_sphere_count | ( | ) |
Retrieve the count of sphere elements in the current model.
Sphere elements are nodes whose element type has been set to "sphere".
.. code-block:: python
@n return type of : int
- Returns
- Number of sphere elements (nodes flagged as "sphere") in the current model.
◆ get_sphere_global_element_id()
| get_sphere_global_element_id | ( | sphere_id | ) |
Get the Global Element ID for a specific node (SPHERE element).
Cubit assigns a Global Element ID to each mesh entity when it is placed into a block. Nodes are represented as SPHERE elements in the mesh. This function returns the Global Element ID corresponding to the given local sphere (node) ID within its type-specific ID space.
.. code-block:: python
@n type of sphere_id: int
- Parameters
-
sphere_id Local node (SPHERE) ID within its type-specific ID space.
return type of : int
- Returns
- Global Element ID for the specified node, or 0 if not placed into a block.
◆ get_string_sculpt_default()
| get_string_sculpt_default | ( | variable | ) |
Retrieve default string-valued sculpt parameter.
Matches the input variable name substring to known sculpt parameters and returns its default.
Title Available string parameters
- ROOT_FILE
- QUALITY_FILE
- VOLFRAC_FILE
type of variable: string
- Parameters
-
variable Name of the sculpt parameter substring.
return type of : string
- Returns
- Default string value for the specified parameter.
◆ get_sub_elements()
| get_sub_elements | ( | entity_type, | |
| entity_id, | |||
| dimension ) |
Get the lower-dimensional entities of a higher-dimensional mesh element.
This function returns the IDs of all sub-entities of the specified dimension for a given mesh element. For example, to get all faces (dimension 2) of a hexahedron, or all edges (dimension 1) of a triangle.
Notes Faces and edges are only created on surfaces and curves, respectively. Interior faces or edges within volumes are not generated. In the example below, only three faces appear because they lie on the exterior surfaces of volume 1.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Mesh element type of the higher-dimensional entity (e.g., "hex", "tet", "tri", "quad").
type of entity_id: intentity_id ID of the mesh element.
type of dimension: intdimension Dimension of sub-entities to retrieve: 0 = vertices, 1 = edges, 2 = faces, 3 = volumes.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of IDs of the requested sub-entities (Python tuple in Python API).
◆ get_submap_corner_types()
| get_submap_corner_types | ( | surface_id | ) |
Get a list of vertex IDs and their corner-type codes for a surface submap.
Vertex types classify each corner based on how many mesh elements meet there:
- -1 unknown : not classified or not applicable
- 1 end : interior angle ~ 90deg (one element)
- 2 side : interior angle ~ 180deg (two elements)
- 3 corner : interior angle ~ 270deg (three elements)
- 4 reverse : interior angle ~ 360deg (four elements)
- 5 triangle corner : corner of a triangular mesh element
- 6 non-triangle : corner of a non-triangular mesh element
type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
return type of : std::vector< std::pair< int,int >,std::allocator< std:: pair< int,int > > >
- Returns
- Vector of <vertex_id, corner_type> pairs for each corner.
◆ get_surface_area()
| get_surface_area | ( | surface_id | ) |
Get the area of a specified surface.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
return type of : float
- Returns
- The area of the specified surface.
◆ get_surface_cavity_collections()
| get_surface_cavity_collections | ( | volume_list, | |
| area_threshold = -1, | |||
| angle_tolerance = -1, | |||
| combine_cavities = True ) |
Return collections of surfaces that form cavities in the specified volumes.
A cavity is a collection of contiguous surfaces, bounded by curves where the exterior angle is greater than or equal to (180 - angle_tolerance). Cavities are filtered by their total surface area. If combine_cavities is true, small adjacent cavities are merged after initial cavity detection. If area_threshold < 0.0, all cavities are returned. If angle_tolerance < 0.0, a default of 0.01 degrees is used.
.. code-block:: python
for surfaces, area in cavity_collections: print("Cavity surfaces:", tuple(surfaces), "Area:", area)
@n type of volume_list: std::vector< int,std::allocator< int > >
- Parameters
-
volume_list List of volume IDs to query.
type of area_threshold: float, optionalarea_threshold Return cavities whose total surface area is less than this value. If less than 0.0, return all cavities.
type of angle_tolerance: float, optionalangle_tolerance Bounding curves will have an exterior angle greater than or equal to (180 - angle_tolerance). If less than 0.0, default is 0.01 degrees.
type of combine_cavities: boolean, optionalcombine_cavities If true, small adjacent cavities are combined after initial cavity detection.
return type of : std::vector< std::pair< std::vector< int,std::allocator< int > >,double >,std::allocator< std::pair< std::vector< int,std:: allocator< int > >,double > > >
- Returns
- : Ordered list of pairs each pair contains (1) a list of contiguous surface IDs defining a cavity, and (2) the total surface area of that cavity (ordered from smallest to largest area).
◆ get_surface_centroid()
| get_surface_centroid | ( | surface_id | ) |
Get the approximate centroid of a specified surface based on graphics faceting.
The centroid is computed from the faceted representation of the surface, so it is an approximation.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
return type of : std:: array< double,3 >
- Returns
- A 3-element array [x, y, z] representing the approximate surface centroid.
◆ get_surface_cone_collections()
| get_surface_cone_collections | ( | volume_list, | |
| radius_threshold = 0.0 ) |
Identify collections of surfaces that comprise cones in specified volumes.
Cones may be represented by a single surface or by two adjacent surfaces symmetrically split. Results can be filtered by a maximum cone radius.
.. code-block:: python
for surfaces, radius in cone_collections: print("Radius:", radius, "Surfaces:", [int(sid) for sid in surfaces])
type of volume_list: std::vector< int,std::allocator< int > >
- Parameters
-
volume_list List of volume IDs to query.
type of radius_threshold: float, optionalradius_threshold Optional maximum radius. Return cones with computed radius less than or equal to radius_threshold. If 0, all cone collections are returned.
return type of : std::vector< std::pair< std::vector< int,std::allocator< int > >,double >,std::allocator< std::pair< std::vector< int,std:: allocator< int > >,double > > >
- Returns
- A list of (surface ID list, radius) pairs. Each pair corresponds to one cone collection. Surfaces are grouped per individual cone.
◆ get_surface_count()
| get_surface_count | ( | ) |
Get the current number of surfaces in the model.
.. code-block:: python
@n return type of : int
- Returns
- The number of surfaces currently defined in the model.
◆ get_surface_element_count()
| get_surface_element_count | ( | surface_id | ) |
Retrieve the count of elements on a specified surface.
Returns the total number of quadrilateral and triangular elements present on the given surface, regardless of block assignments.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
return type of : int
- Returns
- Number of quadrilateral and triangular elements on that surface.
◆ get_surface_hole_collections()
| get_surface_hole_collections | ( | volume_list, | |
| radius_threshold ) |
Return collections of surfaces that form holes in the specified volumes.
A hole is a collection of contiguous surfaces that form a cylindrical or approximately cylindrical feature. Holes are filtered by their computed radius. If radius_threshold is provided, only holes with radius less than or equal to this value are returned.
.. code-block:: python
for surfaces, radius in hole_collections: print("Hole surfaces:", tuple(surfaces), "Radius:", radius)
@n type of volume_list: std::vector< int,std::allocator< int > >
- Parameters
-
volume_list List of volume IDs to query.
type of radius_threshold: floatradius_threshold Return holes with computed radius less than or equal to this value.
return type of : std::vector< std::pair< std::vector< int,std::allocator< int > >,double >,std::allocator< std::pair< std::vector< int,std:: allocator< int > >,double > > >
- Returns
- : A list of pairs each pair contains (1) a list of contiguous surface IDs defining a hole, and (2) the computed radius of the hole.
◆ get_surface_loop_curves()
| get_surface_loop_curves | ( | surface_id | ) |
Get the curve IDs for each loop on a surface.
This function returns the boundary curves for each closed loop on the specified surface. Each loop is represented as an ordered list of curve (RefEdge) IDs that form a closed boundary. Surfaces with holes or internal boundaries will have multiple loops.
If the surface ID is invalid, an error is printed and an empty list is returned.
.. code-block:: python
for i, loop in enumerate(loops): print(" loop %d curves: %s" % (i, " ".join(str(c) for c in loop)))
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface.
return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- List of loops on the surface; each loop is a list of curve IDs. Returns an empty list on error.
◆ get_surface_loop_nodes()
| get_surface_loop_nodes | ( | surface_id | ) |
Get the ordered list of node IDs on the loops of a surface.
This function returns the ordered list of node IDs for each loop on the specified surface. The first loop in the list is the external loop. Each loop is returned as a separate list of node IDs. Loops are ordered as follows: - First list: external loop (outer boundary) - Subsequent lists: internal loops (holes, if present)
.. code-block:: python
for i, loop in enumerate(loop_nodes): print(f" Loop {i+1} has {len(loop)} node(s):", " ".join(str(node_id) for node_id in loop))
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface.
return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > >
- Returns
- List of lists of node IDs, one list per loop (first list is the external loop).
◆ get_surface_nodes()
| get_surface_nodes | ( | surface_id | ) |
Get the list of node IDs owned by a surface.
This function returns the IDs of nodes owned by the specified surface. Nodes on the bounding curves and vertices of the surface are excluded.
.. code-block:: python
for node_id in surface_nodes: print(f" Node ID: {node_id}")
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of node IDs owned by the surface (excluding nodes on bounding curves and vertices).
◆ get_surface_normal()
| get_surface_normal | ( | surface_id | ) |
Get the unit normal vector at the center of a specified surface.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
return type of : std:: array< double,3 >
- Returns
- A 3-element array [nx, ny, nz] representing the unit normal at the surface center.
◆ get_surface_normal_at_coord()
| get_surface_normal_at_coord | ( | surface_id, | |
| coord ) |
Get the unit normal vector at a specified point on a surface.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
type of coord: std::array< double,3 >coord A 3-element array {x, y, z} representing a point on the surface.
return type of : std:: array< double,3 >
- Returns
- A 3-element array [nx, ny, nz] representing the unit normal at coord.
◆ get_surface_num_loops()
| get_surface_num_loops | ( | surface_id | ) |
Get the number of loops on a surface.
This function returns the number of loops on the specified surface. A loop is a closed boundary on the surface. Surfaces with holes or internal boundaries will have multiple loops.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface.
return type of : int
- Returns
- Number of loops on the surface.
◆ get_surface_position_from_u_v()
| get_surface_position_from_u_v | ( | surface_id, | |
| u, | |||
| v ) |
Get the XYZ position for a specified surface at the given parametric (u, v) :type surface_id: int.
- Parameters
-
surface_id ID of the surface :type u: float u parametric u coordinate :type v: float v parametric v coordinate :rtype: std::array< double,3 >
- Returns
- surface position at parametric (u, v)
◆ get_surface_principal_curvatures()
| get_surface_principal_curvatures | ( | surface_id | ) |
Get the principal curvatures of a surface at its midpoint.
Principal curvatures quantify how a surface bends in two orthogonal directions at a point. At the surface midpoint, this function returns two scalar values: k1 and k2. For a planar surface, both values are 0. For a sphere of radius R, both values equal 1/R.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
return type of : std::vector< double,std:: allocator< double > >
- Returns
- : A vector of two doubles the first and second principal curvatures at the surface midpoint.
◆ get_surface_protrusion_collections()
| get_surface_protrusion_collections | ( | volume_list, | |
| area_threshold = -1, | |||
| angle_tolerance = -1, | |||
| combine_protrusions = True ) |
Return collections of surfaces that form protrusions in the specified volumes.
A protrusion is a collection of contiguous surfaces, bounded by curves where the exterior angle is greater than or equal to (180 + angle_tolerance). Protrusions are filtered by their total surface area.
If combine_protrusions is true, small adjacent protrusions are merged after initial detection.
If area_threshold < 0.0, all protrusions are returned. If angle_tolerance < 0.0, a default of 0.01 degrees is used.
.. code-block:: python
for surfaces, area in protrusion_collections: print("Protrusion surfaces:", tuple(surfaces), "Area:", area)
type of volume_list: std::vector< int,std::allocator< int > >
- Parameters
-
volume_list List of volume IDs to query.
type of area_threshold: float, optionalarea_threshold Return protrusions whose total surface area is less than this value. If less than 0.0, return all protrusions.
type of angle_tolerance: float, optionalangle_tolerance Bounding curves must have an exterior angle greater than or equal to (180 + angle_tolerance). If less than 0.0, default is 0.01 degrees.
type of combine_protrusions: boolean, optionalcombine_protrusions If true, small adjacent protrusions are combined after initial detection.
return type of : std::vector< std::pair< std::vector< int,std::allocator< int > >,double >,std::allocator< std::pair< std::vector< int,std:: allocator< int > >,double > > >
- Returns
- : Ordered list of pairs each pair contains (1) a list of contiguous surface IDs defining a protrusion, and (2) the total surface area of that protrusion (ordered from smallest to largest area).
◆ get_surface_quads()
| get_surface_quads | ( | surface_id | ) |
Get the list of quadrilateral (quad) element IDs on a surface.
This function returns the IDs of all quadrilateral (quad) elements on the specified surface.
.. code-block:: python
for quad_id in quad_ids: print(f" Quad ID: {quad_id}")
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of quadrilateral (quad) element IDs on the surface.
◆ get_surface_sense()
| get_surface_sense | ( | surface_id | ) |
Get the orientation ("sense") of a specified surface.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
return type of : string
- Returns
- : The surface sense "Reversed", "Forward", or "Both".
◆ get_surface_tris()
| get_surface_tris | ( | surface_id | ) |
Get the list of triangle (tri) element IDs on a surface.
This function returns the IDs of all triangle (tri) elements on the specified surface.
.. code-block:: python
for tri_id in tri_ids: print(f" Tri ID: {tri_id}")
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of triangle (tri) element IDs on the surface.
◆ get_surface_type()
| get_surface_type | ( | surface_id | ) |
Get the surface type for a specified surface.
Title Available surface types
- cone surface
- plane surface
- sphere surface
- spline surface
- torus surface
- best fit surface
- facet surface
- undefined surface type
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
return type of : string
- Returns
- Descriptive string indicating the surface's geometry type.
◆ get_surfs_with_narrow_regions()
| get_surfs_with_narrow_regions | ( | target_ids, | |
| narrow_size ) |
Find surfaces with narrow regions based on edge-pair orientation and proximity.
For each face of volumes in target_ids, iterates over every pair of non-adjacent edges. For each pair: - Computes the shortest distance between edges. - If distance <= narrow_size, computes local edge tangents and surface normals to form cross-product vectors. - If the dot product of those cross-product vectors is < -cos(15deg), the face is included. Returns IDs of faces where any such qualifying edge pair exists. This function differs from get_closed_narrow_surfaces by checking all faces (not only closed two-loop faces), and from get_narrow_regions by requiring an oriented edge-pair test rather than loop-split or loop-proximity tests.
.. code-block:: python
@n type of target_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_ids Vector of volume IDs to examine.
type of narrow_size: floatnarrow_size Distance threshold for detecting narrow edge pairs with orientation checks.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of surface IDs containing at least one narrow edge-pair region.
◆ get_tangential_intersections()
| get_tangential_intersections | ( | target_volume_ids, | |
| upper_bound, | |||
| lower_bound ) |
Find surfaces with tangential intersection angles outside specified bounds.
Iterates over all faces of volumes in target_volume_ids. For each face, computes any tangential intersection angles between adjacent faces. A surface is included if any angle is < lower_bound or > upper_bound.
type of target_volume_ids: std::vector< int,std::allocator< int > >
- Parameters
-
target_volume_ids Vector of volume IDs to examine.
type of upper_bound: floatupper_bound Upper threshold for acceptable tangential angle.
type of lower_bound: floatlower_bound Lower threshold for acceptable tangential angle.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of surface IDs having any tangential intersection angle < lower_bound or > upper_bound.
◆ get_target_surfaces()
| get_target_surfaces | ( | volume_id | ) |
Retrieve the list of sweep target surfaces for a specified volume.
When a volume uses the Sweep scheme, target surfaces are the ending faces to which the hexahedral mesh is extruded. This function returns all surface IDs designated as targets. If no explicit target was set, returns an empty list.
.. code-block:: python
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to query.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- A list (vector<int> or Python tuple) of surface IDs designated as sweep targets.
◆ get_target_timestep()
| get_target_timestep | ( | ) |
Return the current target time step threshold used in the density multiplier metric.
This threshold influences adaptive time stepping by multiplying element-based estimates.
.. code-block:: python
@n return type of : float
- Returns
- The currently configured target time step threshold.
◆ get_tet_count()
| get_tet_count | ( | ) |
Retrieve the count of tetrahedral elements in the current model.
.. code-block:: python
@n return type of : int
- Returns
- Number of tetrahedral elements in the current model.
◆ get_tet_global_element_id()
| get_tet_global_element_id | ( | tet_id | ) |
Get the Global Element ID for a specific tetrahedral element.
This function returns the Global Element ID assigned to the given local tet ID when the element was placed into a block.
.. code-block:: python
@n type of tet_id: int
- Parameters
-
tet_id Local tetrahedral element ID.
return type of : int
- Returns
- Global Element ID for the specified tetrahedron, or 0 if the tet is not in a block.
◆ get_tetmesh_growth_factor()
| get_tetmesh_growth_factor | ( | volume_id | ) |
Get the growth factor for tet meshing on a volume.
The growth factor controls how quickly tetrahedral sizes can change when transitioning from small to larger elements within the volume. Valid values range from 1.0 (uniform sizing) to 10.0 (rapid growth).
.. code-block:: python
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to query.
return type of : float
- Returns
- Growth factor (double) currently set on the volume.
◆ get_tetmesh_insert_mid_nodes()
| get_tetmesh_insert_mid_nodes | ( | ) |
Get the global flag indicating insertion of mid-edge (quadratic) nodes during tet meshing.
Returns true if the tet mesher is configured to create mid-edge nodes while generating tets (improves quadratic element quality); false if midnodes are inserted post-meshing.
.. code-block:: python
@n return type of : boolean
- Returns
- True if mid-edge nodes are inserted during meshing; false otherwise.
◆ get_tetmesh_minimize_interior_points()
| get_tetmesh_minimize_interior_points | ( | ) |
Get the global flag indicating minimization of interior points in tet meshing.
Returns true if the tet mesher will attempt to reduce the number of interior nodes inserted; false if interior point insertion is unrestricted. Disabling interior point insertion may produce a mesh with fewer nodes but can fail in complex geometries.
.. code-block:: python
@n return type of : boolean
- Returns
- True if minimizing interior points is ON; false otherwise.
◆ get_tetmesh_minimize_slivers()
| get_tetmesh_minimize_slivers | ( | ) |
Get the global flag indicating minimization of sliver tetrahedra.
Returns true if the tet mesher will apply additional processing to identify and remove sliver-shaped tetrahedra (minimize slivers); false if sliver removal is not explicitly requested.
.. code-block:: python
@n return type of : boolean
- Returns
- True if sliver minimization is ON; false otherwise.
◆ get_tetmesh_num_anisotropic_layers()
| get_tetmesh_num_anisotropic_layers | ( | ) |
Get the global number of anisotropic tet layers setting.
Returns how many anisotropic layers the tet mesher will attempt to place in thin regions. If this global setting is zero, anisotropic layering is disabled.
.. code-block:: python
@n return type of : int
- Returns
- Number of anisotropic layers (integer); 0 if disabled.
◆ get_tetmesh_optimization_level()
| get_tetmesh_optimization_level | ( | ) |
Get the global tet meshing optimization level.
Returns the integer optimization level in use for the tet mesher, ranging from 0 (none) to 6 (extreme). Higher levels yield better element quality at the expense of runtime.
.. code-block:: python
@n return type of : int
- Returns
- Optimization level (int in [0..6]).
◆ get_tetmesh_optimize_mid_nodes()
| get_tetmesh_optimize_mid_nodes | ( | ) |
Get the global flag indicating optimization of mid-edge nodes during tet meshing.
Returns true if the tet mesher is configured to optimize (adjust) mid-edge node positions during meshing to improve element quality; false if no midnode optimization is performed.
.. code-block:: python
@n return type of : boolean
- Returns
- True if mid-edge node optimization is ON; false otherwise.
◆ get_tetmesh_optimize_overconstrained_edges()
| get_tetmesh_optimize_overconstrained_edges | ( | ) |
Get the global flag indicating optimization of overconstrained edges.
Returns true if the tet mesher will split edges that connect two surface nodes but do not lie
on the surface ("overconstrained edges"); false if not.
.. code-block:: python
@n return type of : boolean
- Returns
- True if overconstrained edges optimization is ON; false otherwise.
◆ get_tetmesh_optimize_overconstrained_tets()
| get_tetmesh_optimize_overconstrained_tets | ( | ) |
Get the global flag indicating optimization of overconstrained tetrahedra.
Returns true if the tet mesher will optimize any tetrahedra that have more than one triangular face on the same geometric surface (removes "overconstrained" tets); false if not.
.. code-block:: python
@n return type of : boolean
- Returns
- True if overconstrained tetrahedra optimization is ON; false otherwise.
◆ get_tetmesh_parallel()
| get_tetmesh_parallel | ( | ) |
Get the global parallel-tetmesher flag (HPC) setting.
Returns true if the MeshGems-Tetra HPC (parallel) tet mesher is enabled globally; false if using the older serial tet mesher. This setting applies to all subsequent tet meshes until changed.
.. code-block:: python
@n return type of : boolean
- Returns
- True if parallel (HPC) tet mesher is ON; false if OFF.
◆ get_tetmesh_proximity_flag()
| get_tetmesh_proximity_flag | ( | volume_id | ) |
Get the proximity-layer flag for tet meshing on a volume.
Returns whether proximity layers are enabled for the specified volume. When enabled, the tet mesher will insert a minimum number of tetrahedral layers in thin regions to capture physical features.
.. code-block:: python
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to query.
return type of : boolean
- Returns
- True if proximity layers are ON; false if OFF.
◆ get_tetmesh_proximity_layers()
| get_tetmesh_proximity_layers | ( | volume_id | ) |
Get the number of proximity layers for tet meshing on a volume.
Returns the integer number of tetrahedral layers configured for thin regions. Only valid if proximity is enabled; otherwise, returns zero.
.. code-block:: python
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to query.
return type of : int
- Returns
- Number of proximity layers (integer); 0 if proximity is OFF.
◆ get_tetmesh_relax_surface_constraints()
| get_tetmesh_relax_surface_constraints | ( | ) |
Get the global flag indicating relaxation of surface mesh constraints in tet meshing.
Returns true if the tet mesher is configured to relax surface mesh conformity constraints, allowing insertion of tetrahedra that may deviate slightly from the exact surface mesh; false otherwise.
.. code-block:: python
@n return type of : boolean
- Returns
- True if relaxing surface constraints is ON; false otherwise.
◆ get_tight_bounding_box()
| get_tight_bounding_box | ( | geometry_type, | |
| entity_list ) |
Get the tight bounding box for a list of entities.
Computes an oriented (tight) bounding box for the specified entities. The box is aligned with the principal axes of the geometry, not the global axes. This provides a minimal-volume bounding box that follows the geometry's orientation.
Title Array contents
- [0-2] center coordinates (x, y, z)
- [3-5] U-axis (normalized) vector (x, y, z)
- [6-8] V-axis (normalized) vector (x, y, z)
- [9-11] W-axis (normalized) vector (x, y, z)
- [12-14] lengths along U, V, W axes
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Geometry type ("body", "volume", "surface", "curve", or "vertex").
type of entity_list: std::vector< int,std::allocator< int > >entity_list List of entity IDs.
return type of : std:: array< double,15 >
- Returns
- 15-element array representing the tight bounding box.
◆ get_top_level_assembly_items()
| get_top_level_assembly_items | ( | ) |
◆ get_total_bounding_box()
| get_total_bounding_box | ( | geometry_type, | |
| entity_list ) |
Get the combined bounding box for a list of entities.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Specifies the geometry type ("body", "volume", "surface", "curve", or "vertex").
type of entity_list: std::vector< int,std::allocator< int > >entity_list List of IDs associated with geometry_type.
return type of : std:: array< double,10 >
- Returns
- A 10-element array containing the combined bounding box parameters.
-
Title Array contents
- [0] x-min
- [1] x-max
- [2] x-range (x-max ? x-min)
- [3] y-min
- [4] y-max
- [5] y-range (y-max ? y-min)
- [6] z-min
- [7] z-max
- [8] z-range (z-max ? z-min)
- [9] diagonal length of the bounding box
◆ get_total_volume()
| get_total_volume | ( | volume_list | ) |
Get the total volume for a list of volumes.
.. code-block:: python
@n type of volume_list: std::vector< int,std::allocator< int > >
- Parameters
-
volume_list List of volume IDs to include.
return type of : float
- Returns
- The sum of the volumes for all specified IDs.
◆ get_tri_count()
| get_tri_count | ( | ) |
Retrieve the count of triangular elements in the current model.
For a tetrahedral volume mesh, returns the number of surface triangles.
.. code-block:: python
@n return type of : int
- Returns
- Number of triangular elements (surface faces of a tet mesh) in the current model's mesh.
◆ get_tri_global_element_id()
| get_tri_global_element_id | ( | tri_id | ) |
Get the Global Element ID for a specific triangular element.
Cubit assigns a Global Element ID to each element when it is placed into a block. This function returns the Global Element ID corresponding to the given local tri ID within its type-specific ID space.
.. code-block:: python
@n type of tri_id: int
- Parameters
-
tri_id Local triangular element ID within its type.
return type of : int
- Returns
- Global Element ID for the specified triangle, or 0 if not placed into a block.
◆ get_trimesh_anisotropic_ratio()
| get_trimesh_anisotropic_ratio | ( | ) |
Get the global setting for trimesher coarse anisotropic ratio :rtype: float.
- Returns
- value of anisotropic ratio (length:width)
◆ get_trimesh_coarse_deviation_angle()
| get_trimesh_coarse_deviation_angle | ( | ) |
Get the global setting for trimesher coarse mesh geometric approximation angle :rtype: float.
- Returns
- deviation angle (degrees) used for the coarse mesh
◆ get_trimesh_coarse_mesh_toggle()
| get_trimesh_coarse_mesh_toggle | ( | ) |
Get the global setting for trimesher coarse mesh :rtype: boolean.
- Returns
- true if trimesher is set to generate a coarse mesh
◆ get_trimesh_geometry_sizing()
| get_trimesh_geometry_sizing | ( | ) |
Retrieve the global geometry sizing flag for the TriMesh scheme.
If ON, TriMesh will incorporate the geometry approximation angle when computing element sizes. If OFF, geometry approximation is ignored.
.. code-block:: python
@n return type of : boolean
- Returns
- True if TriMesh geometry sizing is ON; false otherwise.
◆ get_trimesh_num_anisotropic_layers()
| get_trimesh_num_anisotropic_layers | ( | ) |
Retrieve the global number of anisotropic triangle layers for the TriMesh scheme.
When ON, TriMesh will attempt to place specified layers of triangles in thin surface regions. Returns the number of layers; zero if anisotropic layers are disabled.
.. code-block:: python
@n return type of : int
- Returns
- Number of anisotropic layers (int); 0 if disabled.
◆ get_trimesh_ridge_angle()
| get_trimesh_ridge_angle | ( | ) |
Retrieve the global ridge angle for the TriMesh scheme.
The ridge angle determines which angles in a discrete surface are preserved as ridges when meshing. Triangles on discrete surfaces with dihedral angles above this threshold remain as ridges.
.. code-block:: python
@n return type of : float
- Returns
- Ridge angle in degrees (double).
◆ get_trimesh_split_overconstrained_edges()
| get_trimesh_split_overconstrained_edges | ( | ) |
Retrieve the global flag for splitting overconstrained edges in the TriMesh scheme.
If ON, TriMesh will split edges owned by a surface but whose nodes lie on curves, ensuring two elements through thickness in those regions.
.. code-block:: python
@n return type of : boolean
- Returns
- True if splitting overconstrained edges is ON; false otherwise.
◆ get_trimesh_surface_gradation()
| get_trimesh_surface_gradation | ( | ) |
Retrieve the global surface mesh gradation for the TriMesh scheme.
The surface gradation controls how quickly triangle sizes change on surfaces when using MeshGems. A value > 1.0 limits the size ratio of adjacent triangles; larger values yield faster growth.
.. code-block:: python
@n return type of : float
- Returns
- Global surface gradation value (double).
◆ get_trimesh_surface_proximity_ratio()
| get_trimesh_surface_proximity_ratio | ( | ) |
Retrieve the global surface proximity ratio for the TriMesh scheme.
The proximity ratio is used when surface proximity is ON to scale the feature-based size in thin regions.
.. code-block:: python
@n return type of : float
- Returns
- Global surface proximity ratio (double).
◆ get_trimesh_target_min_size()
| get_trimesh_target_min_size | ( | geometry_type, | |
| entity_id ) |
Retrieve the target minimum triangle size set on a specific geometry entity for the TriMesh scheme.
Returns the local "minimum size" constraint for the given entity (curve, surface, or volume) when using TriMesh. If no minimum was set on that entity, returns 0.
.. code-block:: python
- Parameters
-
geom_type Geometry type of the entity ("curve", "surface", or "volume").
type of entity_id: intentity_id ID of the entity whose TriMesh minimum size is queried.
return type of : float
- Returns
- Target minimum triangle size (double) set on that entity; 0 if not set.
◆ get_trimesh_tiny_edge_length()
| get_trimesh_tiny_edge_length | ( | ) |
Retrieve the global tiny edge length for the TriMesh scheme.
The tiny edge length setting defines the minimum edge length below which elements are considered "tiny". TriMesh may use this value during cleanup or facet generation.
.. code-block:: python
@n return type of : float
- Returns
- Global tiny edge length value (double).
◆ get_trimesh_use_surface_proximity()
| get_trimesh_use_surface_proximity | ( | ) |
Retrieve the global surface proximity flag for the TriMesh scheme.
When enabled, surface proximity adds refinement in thin regions of surfaces based on a proximity ratio.
.. code-block:: python
@n return type of : boolean
- Returns
- True if global surface proximity is ON; false if OFF.
◆ get_trimesh_volume_gradation()
| get_trimesh_volume_gradation | ( | ) |
Retrieve the global volume mesh gradation for the TriMesh scheme.
The volume gradation controls how triangle sizes on adjacent surfaces respond to nearby features. This affects how small surface triangles propagate to neighboring regions.
.. code-block:: python
@n return type of : float
- Returns
- Global volume gradation value (double).
◆ get_u_v_from_surface_position()
| get_u_v_from_surface_position | ( | surface_id, | |
| position ) |
Get the parametric location u, v of a given point on the surface :type surface_id: int.
- Parameters
-
surface_id ID of the surface :type position: std::array< double,3 > position of point on the surface :rtype: std::array< double,2 >
- Returns
- parametric u,v of the surface. Returns {-CUBIT_DBL_MAX, -CUBIT_DBL_MAX} if the underlying inverse evaluation fails.
◆ get_undo_enabled()
| get_undo_enabled | ( | ) |
Query whether undo is currently enabled.
.. code-block:: python
@n return type of : boolean
- Returns
- True if undo is enabled; otherwise false.
◆ get_unmerged_curves_on_shells()
| get_unmerged_curves_on_shells | ( | shell_vols, | |
| thickness ) |
Identify unmerged curves between sheet (shell) volumes for use in shell construction workflows.
This function is normally used in the construction of shell representations from thin volumes. It identifies unmerged curve IDs on the specified shell_vols that are within the corresponding thickness distance of faces on other shell volumes in the list. These curves typically represent locations where the sheet bodies would need to be extended or trimmed to fully match the geometry of the original thin volumes. Only sheet (shell) volumes are processed; solid volumes are ignored. The thickness list specifies a proximity distance (normally the thickness of the original thin volumes) to use for detecting nearby curves. The list must match the length of shell_vols.
.. code-block:: python
for c_id in unmerged_curves: print(c_id)
@n type of shell_vols: std::vector< int,std::allocator< int > >
- Parameters
-
shell_vols List of volume IDs to check. Only sheet (shell) volumes will be processed.
type of thickness: std::vector< double,std::allocator< double > >thickness List of thickness values (proximity distance) corresponding to shell_vols. Length must match shell_vols.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of unmerged curve IDs on the specified shell volumes that are in proximity to faces on other shell volumes.
◆ get_valence()
| get_valence | ( | vertex_id | ) |
Get the valence (number of incident edges) for a specific vertex.
The valence of a vertex is the number of curves (edges) that meet at that vertex.
.. code-block:: python
@n type of vertex_id: int
- Parameters
-
vertex_id ID of the vertex to query.
return type of : int
- Returns
- The number of edges (curves) meeting at the specified vertex.
◆ get_valid_block_element_types()
| get_valid_block_element_types | ( | block_id | ) |
Get a list of valid element types for the specified block.
Returns the list of supported element types (e.g., "hex8", "hex20", "tet10") that can be assigned to the given block, based on its associated geometry or mesh configuration.
.. code-block:: python
for t in valid_types: print(t)
@n type of block_id: int
- Parameters
-
block_id ID of the block.
return type of : std::vector< std::string,std::allocator< std:: string > >
- Returns
- Vector of supported element type strings.
◆ get_velocity_combine_type()
| get_velocity_combine_type | ( | entity_id | ) |
Get the velocity's combine type.
Returns how multiple velocity boundary conditions are combined. Possible values include "Overwrite", "Average", "SmallestCombine", or "LargestCombine".
type of entity_id: int
- Parameters
-
entity_id ID of the velocity boundary condition.
return type of : string
- Returns
- Combine type string for the given velocity BC.
◆ get_version()
| get_version | ( | ) |
Retrieve the current Cubit version string.
Returns the version identifier of the active Cubit engine, typically in "major.minor.patch" format.
.. code-block:: python
@n return type of : string
- Returns
- A string containing the current Cubit version.
◆ get_vertex_coordinates()
| get_vertex_coordinates | ( | entityID | ) |
Get the 3D coordinates of a vertex.
Returns the exact 3D coordinates for a vertex.
.. code-block:: python
- Parameters
-
entity_id ID of the vertex to query.
return type of : std:: array< double,3 >
- Returns
- A 3-element array [x, y, z] representing the vertex coordinates.
◆ get_vertex_count()
| get_vertex_count | ( | ) |
Get the current number of vertices in the model.
.. code-block:: python
@n return type of : int
- Returns
- The number of vertices currently defined in the model.
◆ get_vertex_node()
| get_vertex_node | ( | vertex_id | ) |
Get the node ID owned by a vertex.
This function returns the ID of the node associated with the specified vertex. If the vertex does not have an associated node, the function returns -1.
.. code-block:: python
@n type of vertex_id: int
- Parameters
-
vertex_id ID of the vertex.
return type of : int
- Returns
- ID of the node owned by the vertex. Returns -1 if no node exists.
◆ get_vertex_type()
| get_vertex_type | ( | surface_id, | |
| vertex_id ) |
Retrieve the vertex type for a given vertex on a surface.
Vertex types classify each corner based on how many mesh elements meet there: * "end" : interior angle ~ 90deg (one element) * "side" : interior angle ~ 180deg (two elements) * "corner" : interior angle ~ 270deg (three elements) * "reverse" : interior angle ~ 360deg (four elements) * "unknown" : not classified or not applicable
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface containing the vertex.
type of vertex_id: intvertex_id ID of the vertex to query.
return type of : string
- Returns
- : The vertex type "end", "side", "corner", "reverse", or "unknown".
◆ get_view_at()
| get_view_at | ( | ) |
Get the camera's current "at" (target) point.
Returns the xyz coordinates of the point that the camera is looking at. Requires an active graphics window; if graphics are disabled, this call may fail.
.. code-block:: python
@n return type of : std:: array< double,3 >
- Returns
- Array of three doubles {x, y, z} representing the camera's target point.
◆ get_view_distance()
| get_view_distance | ( | ) |
Get the camera's distance between its position and focus point.
Returns the straight-line distance from the camera "from" point to its "at" point. Requires an active graphics window; if graphics are disabled, this call may fail.
.. code-block:: python
@n return type of : float
- Returns
- Distance (double) between the camera position ("from") and its focus point ("at").
◆ get_view_from()
| get_view_from | ( | ) |
Get the camera's current 'from' (position) point.
Returns the xyz coordinates of the camera's location in space. Requires an active graphics window; if graphics are disabled, this call may fail.
.. code-block:: python
@n return type of : std:: array< double,3 >
- Returns
- Array of three doubles {x, y, z} representing the camera's position.
◆ get_view_up()
| get_view_up | ( | ) |
Get the camera's 'up' direction vector.
Returns the normalized xyz vector that defines the upward orientation of the camera. Requires an active graphics window; if graphics are disabled, this call may fail.
.. code-block:: python
@n return type of : std:: array< double,3 >
- Returns
- Array of three doubles {x, y, z} representing the camera's up direction vector.
◆ get_volume_area()
| get_volume_area | ( | volume_id | ) |
Get the total surface area of a specified volume.
This returns the sum of all face areas bounding the volume.
.. code-block:: python
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to query.
return type of : float
- Returns
- Total surface area of the specified volume.
◆ get_volume_cad_material()
| get_volume_cad_material | ( | volume_id | ) |
◆ get_volume_count()
| get_volume_count | ( | ) |
Get the current number of volumes in the model.
.. code-block:: python
@n return type of : int
- Returns
- The number of volumes currently defined in the model.
◆ get_volume_element_count()
| get_volume_element_count | ( | volume_id | ) |
Retrieve the count of 3D elements in a specified volume.
Returns the total number of hexahedra, tetrahedra, pyramids, and wedges within the given volume (regardless of block assignments).
.. code-block:: python
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to query.
return type of : int
- Returns
- Number of hexes, tets, pyramids, and wedges in the specified volume.
◆ get_volume_gap_solutions()
| get_volume_gap_solutions | ( | surface_id_1, | |
| surface_id_2 ) |
Suggests remedies for a gap between two surfaces on different volumes.
Given two surface IDs from different volumes that are close but separated by a gap, this function provides options to close or reconcile the gap. To identify surface gaps, use get_gaps_between_volumes or get_volume_gaps.
.. code-block:: python
for i in range(len(solutions[0])): print("Option:", solutions[0][i])
@n type of surface_id_1: int
- Parameters
-
surface_id_1 ID of the first surface forming a gap (must be on a different volume than surface_id_2).
type of surface_id_2: intsurface_id_2 ID of the second surface forming a gap (must be on a different volume than surface_id_1).
return type of : std::vector< std::vector< std::string,std::allocator< std::string > >,std::allocator< std::vector< std::string,std::allocator< std:: string > > > >
- Returns
- A vector of four aligned string vectors: [0] Display strings for each recommended remedy, [1] Cubit command strings to apply each remedy, [2] Cubit preview command strings for each remedy, [3] Shorthand descriptions (operation ID and surface/volume IDs).
◆ get_volume_hexes()
| get_volume_hexes | ( | volume_id | ) |
Get the list of hexahedron (hex) IDs contained in a volume.
This function returns the IDs of all hexahedron (hex) elements that are part of the specified volume.
.. code-block:: python
for hex_id in hex_ids: print(f" Hex ID: {hex_id}")
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of hexahedron (hex) IDs contained in the volume.
◆ get_volume_nodes()
| get_volume_nodes | ( | volume_id | ) |
Get the list of node IDs owned by a volume.
This function returns the IDs of nodes owned by the specified volume. Nodes on bounding surfaces, curves, and vertices are excluded. Only interior (volume-owned) nodes are returned.
.. code-block:: python
for node_id in volume_nodes: print(f" Node ID: {node_id}")
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of node IDs owned by the volume (excluding nodes on bounding surfaces, curves, and vertices).
◆ get_volume_pyramids()
| get_volume_pyramids | ( | volume_id | ) |
Get the list of pyramid IDs contained in a volume.
This function returns the IDs of all pyramid elements that are part of the specified volume.
.. code-block:: python
for pyr_id in pyramid_ids: print(f" Pyramid ID: {pyr_id}")
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of pyramid IDs contained in the volume.
◆ get_volume_tets()
| get_volume_tets | ( | volume_id | ) |
Get the list of tetrahedron (tet) IDs contained in a volume.
This function returns the IDs of all tetrahedron (tet) elements that are part of the specified volume.
.. code-block:: python
for tet_id in tet_ids: print(f" Tet ID: {tet_id}")
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of tetrahedron (tet) IDs contained in the volume.
◆ get_volume_volume()
| get_volume_volume | ( | vol_id | ) |
Get the enclosed volume of a specified volume.
.. code-block:: python
@n type of vol_id: int
- Parameters
-
vol_id ID of the volume to query.
return type of : float
- Returns
- The enclosed volume of the specified volume.
◆ get_volume_wedges()
| get_volume_wedges | ( | volume_id | ) |
Get the list of wedge IDs contained in a volume.
This function returns the IDs of all wedge elements that are part of the specified volume.
.. code-block:: python
for wedge_id in wedge_ids: print(f" Wedge ID: {wedge_id}")
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to examine.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- List of wedge IDs contained in the volume.
◆ get_volumes_for_node()
| get_volumes_for_node | ( | node_name, | |
| node_instance ) |
◆ get_wedge_count()
| get_wedge_count | ( | ) |
Retrieve the count of wedge-shaped elements in the current model.
.. code-block:: python
@n return type of : int
- Returns
- Number of wedge-shaped elements in the current model (e.g., generated by sweeping triangles).
◆ get_wedge_global_element_id()
| get_wedge_global_element_id | ( | wedge_id | ) |
Get the Global Element ID for a specific wedge element.
This function returns the Global Element ID assigned to the given local wedge ID when the element is placed into a block.
.. code-block:: python
@n type of wedge_id: int
- Parameters
-
wedge_id Local wedge element ID within its type.
return type of : int
- Returns
- Global Element ID for the specified wedge, or 0 if not placed into a block.
◆ get_wrt_entity()
| get_wrt_entity | ( | source_type, | |
| source_id, | |||
| sideset_id ) |
Get the 'with-respect-to' entity of an item in a sideset.
This function returns the "with-respect-to" (WRT) entity associated with the specified entity (face, quad, or tri) in the specified sideset. The WRT entity provides context for how the sideset references or is oriented with respect to the entity.
.. code-block:: python
@n type of source_type: string
- Parameters
-
source_type Item type: "face", "quad", or "tri".
type of source_id: intsource_id ID of the entity.
type of sideset_id: intsideset_id ID of the sideset.
return type of : string
- Returns
- 'With-respect-to' entity of the specified entity in the sideset.
◆ graphics_enabled()
| graphics_enabled | ( | ) |
Used to check if a GUI graphics window is enabled.
◆ group_names_ids()
| group_names_ids | ( | ) |
Retrieve names and IDs of all defined groups (excluding the pick group).
Returns a vector of (name, ID) pairs for each active group in the current session.
.. code-block:: python
for name, gid in groups: print(f"Group '{name}' has ID {gid}")
@n return type of : std::vector< std::pair< std::string,int >,std::allocator< std::pair< std:: string,int > > >
- Returns
- Vector of (group name, group ID) pairs.
◆ has_valid_size()
| has_valid_size | ( | geometry_type, | |
| entity_id ) |
Check whether a geometric entity has a valid size.
Title This function returns whether the specified geometric entity currently has a valid size.
- All entities have a size if auto sizing is enabled.
- If auto sizing is off, an entity only has a size if it has been explicitly set (e.g. via a
sizecommand).
Title Return value:
1if the entity has a valid size0if the entity does not have a valid size
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Type of the geometric entity (e.g. "surface", "curve", "volume", etc.).
type of entity_id: intentity_id ID of the geometric entity.
return type of : int
- Returns
1if the entity has a valid size,0if it does not.
◆ heatflux_is_on_shell_area()
| heatflux_is_on_shell_area | ( | bc_area_enum, | |
| entity_id ) |
Check if a heatflux BC is on a shell area.
type of bc_area_enum: int
- Parameters
-
bc_area_enum CI_BCEntityTypes: 7 (top), 8 (bottom).
type of entity_id: intentity_id ID of the heatflux BC.
return type of : boolean
- Returns
- True if the BC is applied to the specified shell area.
◆ highlight()
| highlight | ( | entity_type, | |
| entity_id ) |
Highlight the given entity in the graphics window without selecting it.
Adds a visual highlight (for example, an orange colored overlay) to the specified entity. Unlike selection, highlighting does not add the entity to the pick list or change its selection state. Selecting an entity (for example, via "select volume 5") also produces a highlight, but calling this function only affects appearance.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Entity type to highlight ("vertex", "curve", "surface", or "volume").
type of entity_id: intentity_id ID of the entity to highlight.
◆ init()
| init | ( | argv | ) |
Initialize the Cubit engine with optional startup arguments.
Must be called before any other Cubit API functions. Passing a single empty string in the argument list will launch Cubit with default settings.
.. code-block:: python
type of argv: std::vector< std::string,std::allocator< std::string > >
- Parameters
-
argv List of startup directives for Cubit (e.g., command-line flags). Use {""} for defaults.
◆ is_acis_engine_available()
| is_acis_engine_available | ( | ) |
Determine whether the ACIS geometry engine is available.
Notes ACIS is the default engine in standard Cubit distributions and should always be available.
.. code-block:: python
@n return type of : boolean
- Returns
- True if ACIS support is present; otherwise false.
◆ is_assembly_metadata_attached()
| is_assembly_metadata_attached | ( | volume_id | ) |
Check if metadata is attached to a volume.
Used to validate part association or identify unassociated geometry.
type of volume_id: int
- Parameters
-
volume_id ID of the volume.
return type of : boolean
- Returns
- True if metadata exists, false otherwise.
◆ is_blend_surface()
| is_blend_surface | ( | surface_id | ) |
Determine if a face's underlying surface is a blend (fillet).
Checks whether the surface with ID surface_id represents a blend created by a fillet operation.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to check.
return type of : boolean
- Returns
- True if the surface is a blend (fillet); otherwise false.
◆ is_boundary_layer_id_available()
| is_boundary_layer_id_available | ( | boundary_layer_id | ) |
Check if a boundary layer ID is currently available.
Useful for verifying uniqueness before assignment.
type of boundary_layer_id: int
- Parameters
-
boundary_layer_id Boundary layer ID to check.
return type of : boolean
- Returns
- True if ID is available, false if already in use.
◆ is_catia_engine_available()
| is_catia_engine_available | ( | ) |
Determine whether the CATIA geometry engine is available.
Notes CATIA is not included in standard Cubit distributions. Only special builds with CATIA support will return true.
.. code-block:: python
@n return type of : boolean
- Returns
- True if CATIA support is compiled in; otherwise false.
◆ is_cavity_surface()
| is_cavity_surface | ( | surface_id | ) |
Return whether the specified surface is part of a cavity.
A cavity surface is a surface that bounds a closed void within the model geometry. If the surface is part of a cavity (such as the inner walls of a subtracted volume), this function returns true; otherwise, false.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
return type of : boolean
- Returns
- True if the surface is part of a cavity, false otherwise.
◆ is_chamfer_surface()
| is_chamfer_surface | ( | surface_id, | |
| thickness_threshold ) |
Determine if a face's underlying surface is a chamfer.
Checks whether the surface with ID surface_id represents a chamfer by comparing its maximum thickness to thickness_threshold.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to check.
type of thickness_threshold: floatthickness_threshold Max thickness to qualify as chamfer.
return type of : boolean
- Returns
- True if the surface thickness <= thickness_threshold, indicating a chamfer.
◆ is_clipping_plane_manipulation_on()
| is_clipping_plane_manipulation_on | ( | ) |
Get the current clipping plane manipulation status :rtype: boolean.
- Returns
- True if clipping manipluation is on, otherwise false
◆ is_clipping_plane_on()
| is_clipping_plane_on | ( | ) |
Get the current clipping plane status :rtype: boolean.
- Returns
- True if clipping is on, otherwise false
◆ is_close_loop_surface()
| is_close_loop_surface | ( | surface_id, | |
| mesh_size ) |
Check if a surface has multiple loops closer than a given threshold.
Returns true if the face has two or more boundary loops and any two edges from different loops lie within mesh_size of each other. Otherwise returns false.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to check.
type of mesh_size: floatmesh_size Distance threshold for loop separation.
return type of : boolean
- Returns
- True if the surface has two or more loops and at least one pair of edges between loops within mesh_size.
◆ is_command_echoed()
| is_command_echoed | ( | ) |
Check whether Cubit echoes commands to the console.
Returns true if each command is printed as it is executed.
.. code-block:: python
@n return type of : boolean
- Returns
- True if command echoing is enabled; false otherwise.
◆ is_command_journaled()
| is_command_journaled | ( | ) |
Query whether Cubit is journaling commands.
Returns true if command journaling is currently enabled. Journaling is on by default, but may be turned off explicitly using a command or API call.
.. code-block:: python
if not cubit.is_command_journaled(): print("Journaling is disabled.")
@n return type of : boolean
- Returns
- True if command journaling is enabled; false otherwise.
◆ is_cone_surface()
| is_cone_surface | ( | surface_id | ) |
Determine whether a surface is a cone.
Returns whether the specified surface is a conical surface.
Notes This test returns true only for a single, complete cone that includes the apex (hard point). It is not intended to identify cone surfaces after a periodic split.
.. code-block:: python
type of surface_id: int
- Parameters
-
surface_id ID of the surface to test.
return type of : boolean
- Returns
- True if the surface is a complete cone (with apex), false otherwise.
◆ is_continuous_surface()
| is_continuous_surface | ( | surface_id, | |
| angle_tol ) |
Return whether the surface has any adjacent continuous surfaces.
Two surfaces are considered continuous if the exterior angle between them at a shared curve is 180 degrees +/- angle_tol.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of surface to query.
type of angle_tol: floatangle_tol Angle tolerance for continuity (degrees).
return type of : boolean
- Returns
- True if the surface has at least one adjacent continuous surface, false otherwise.
◆ is_cylinder_surface()
| is_cylinder_surface | ( | surface_id | ) |
Determine if a given face's underlying surface is a circular cylinder.
Checks whether the surface associated with the specified face ID is a true cylindrical surface.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to check.
return type of : boolean
- Returns
- True if the surface is a cylindrical surface; otherwise false.
◆ is_file_hdf5()
| is_file_hdf5 | ( | filename | ) |
Check whether a file is an HDF5 file.
.. code-block:: python
type of filename: string
- Parameters
-
filename Path to the file to test.
return type of : boolean
- Returns
- True if the file exists and has an HDF5 signature; false otherwise.
◆ is_geometry_visibility_on()
| is_geometry_visibility_on | ( | ) |
Check if geometry graphics are visible in the graphics window.
Geometry display can be toggled on or off to show or hide CAD entities. This is useful when you want to view only the mesh without underlying geometry.
.. code-block:: python
@n return type of : boolean
- Returns
- true if geometry graphics are currently visible; false otherwise.
◆ is_hole_surface()
| is_hole_surface | ( | surface_id, | |
| radius_threshold ) |
Return whether the specified surface is part of a hole.
A hole surface is one that bounds a small feature, such as a drilled or machined hole, whose maximum radius does not exceed the given threshold. If radius_threshold < 0, the default is used: 3 x mesh_size.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
type of radius_threshold: floatradius_threshold Maximum radius criterion for hole detection. If < 0, defaults to 3 x mesh_size.
return type of : boolean
- Returns
- True if the surface is part of a hole, false otherwise.
◆ is_interval_count_odd()
| is_interval_count_odd | ( | surface_id | ) |
Check if any loop on a surface has an odd number of mesh intervals.
The pave meshing scheme requires each loop on a surface to have an even number of intervals so that quads can be generated. Use this function to detect if a surface contains any loop with an odd interval count, which would prevent pave meshing.
.. code-block:: python
if has_odd: print("Surface 5 contains an odd loop; cannot apply pave mesh.") else:
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to check.
return type of : boolean
- Returns
- True if any loop on the surface has an odd number of intervals; otherwise false.
◆ is_merged()
| is_merged | ( | geometry_type, | |
| entity_id ) |
Check if a specified geometry entity has been merged into another.
This function returns true if the given entity-identified by its geometry type
("curve", "surface", or "volume") and integer ID-has been merged into a different
entity; otherwise, it returns false.
After performing merge operations (for example, merge vol all), shared or redundant entities
may no longer exist as standalone objects. Use is_merged() to verify whether a
particular entity was absorbed by another during such operations.
.. code-block:: python
if (cubit.is_merged("surface", 6)) { std::cout << "Surface 6 has been merged." << std::endl; } else { std::cout << "Surface 6 is not merged." << std::endl; }
@n type of geometry_type: string
- Parameters
-
geometry_type The type of geometry to check. Valid values are "curve", "surface", or "volume".
type of entity_id: intentity_id The integer ID of the entity to query.
return type of : boolean
- Returns
- true if the specified entity was merged into another; false otherwise.
◆ is_mesh_element_in_group()
| is_mesh_element_in_group | ( | element_type, | |
| element_id ) |
Check if a specific mesh element belongs to any group.
.. code-block:: python
if cubit.is_mesh_element_in_group("tet", 445): print("Tet 445 is in a group") else:
@n type of element_type: string
- Parameters
-
element_type Mesh element type (e.g., "node", "edge", "tri", "quad", "tet", "hex").
type of element_id: intelement_id ID of the mesh element to test.
return type of : boolean
- Returns
- True if the element is contained in at least one group, false otherwise.
◆ is_mesh_visibility_on()
| is_mesh_visibility_on | ( | ) |
Check if mesh graphics are visible in the graphics window.
Mesh display can be toggled on or off to show or hide mesh elements. Hiding mesh can improve performance when displaying the geometry.
.. code-block:: python
@n return type of : boolean
- Returns
- true if mesh graphics are currently visible; false otherwise.
◆ is_meshed()
| is_meshed | ( | geometry_type, | |
| entity_id ) |
Determine whether a specified geometry entity has been meshed.
Returns true if the given entity (curve, surface, or volume) already has a valid mesh; otherwise false.
.. code-block:: python
if cubit.is_meshed("surface", 137): print("Surface 137 is meshed.") else:
@n type of geometry_type: string
- Parameters
-
geometry_type Geometry type ("curve", "surface", or "volume").
type of entity_id: intentity_id ID of the entity to check.
return type of : boolean
- Returns
- True if the specified entity is already meshed; false otherwise.
◆ is_modified()
| is_modified | ( | ) |
Check if the model has been modified since import or last save.
Returns true if any CAD operation has altered the current model state (e.g., `remove surface 10` after an import), false if the model is still in its original, unmodified state.
.. code-block:: python
@n return type of : boolean
- Returns
- True if the model has been changed by any operation; false otherwise.
◆ is_multi_volume()
| is_multi_volume | ( | body_id | ) |
Check if a body contains multiple volumes.
Cubit bodies typically consist of a single volume; multi-volume bodies are
rare and usually arise from importing ACIS models.
To split a multi-volume body into separate volumes, use: cubit.cmd('split body <id>')
.. code-block:: python
if multi: print("Body 10 has multiple volumes. Splitting...")
@n type of body_id: int
- Parameters
-
body_id ID of the body to query.
return type of : boolean
- Returns
- True if the body contains more than one volume; otherwise false.
◆ is_narrow_surface()
| is_narrow_surface | ( | surface_id, | |
| mesh_size ) |
Determine if any two non-adjacent edges on the surface form a narrow region.
Iterates over all pairs of edges without a shared vertex. For each pair, if their shortest distance <= mesh_size and their local edge directions (relative to surface normals) differ by more than 15deg, the surface is marked narrow.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to check.
type of mesh_size: floatmesh_size Distance threshold for identifying narrow edge pairs.
return type of : boolean
- Returns
- True if any qualifying edge pair is found; otherwise false.
◆ is_occlusion_on()
| is_occlusion_on | ( | ) |
Check if occlusion is enabled.
Returns true if occlusion is currently active.
.. code-block:: python
@n return type of : boolean
- Returns
- true if occlusion (hidden-line removal) is enabled; false otherwise.
◆ is_on_thin_shell()
| is_on_thin_shell | ( | bc_type_enum, | |
| entity_id ) |
Check if a boundary condition is applied to a thin shell.
Valid for temperature, convection, and heatflux BCs.
type of bc_type_enum: int
- Parameters
-
bc_type_enum BC type (temperature = 4, convection = 7, heatflux = 8).
type of entity_id: intentity_id ID of the boundary condition.
return type of : boolean
- Returns
- True if BC is on a thin shell element.
◆ is_opencascade_engine_available()
| is_opencascade_engine_available | ( | ) |
Determine whether the OpenCASCADE geometry engine is available.
Notes OpenCASCADE is not included in standard Cubit distributions. Only special builds with OpenCASCADE support will return true.
.. code-block:: python
@n return type of : boolean
- Returns
- True if OpenCASCADE support is compiled in; otherwise false.
◆ is_part_of_list()
| is_part_of_list | ( | target_id, | |
| id_list ) |
Check if an ID is present in a list of IDs.
This function checks whether the specified target ID is present in the given list of IDs. Returns `true` if the target ID is found in the list; otherwise returns `false`.
.. code-block:: python
@n type of target_id: int
- Parameters
-
target_id Target ID to search for.
type of id_list: std::vector< int,std::allocator< int > >id_list List of IDs.
return type of : boolean
- Returns
trueif target_id is a member of id_list, otherwisefalse.
◆ is_performing_undo()
| is_performing_undo | ( | ) |
Query whether an undo operation is currently being performed.
Use this to detect if Cubit is in the middle of executing an undo command.
.. code-block:: python
@n return type of : boolean
- Returns
- True if an undo is in progress; false otherwise.
◆ is_periodic()
| is_periodic | ( | geometry_type, | |
| entity_id ) |
Query whether a specified surface or curve is periodic.
.. code-block:: python
- Parameters
-
geom_type Specifies the geometry type ("surface" or "curve").
type of entity_id: intentity_id ID of the entity to query.
return type of : boolean
- Returns
- True if the entity is periodic; otherwise false.
◆ is_perspective_on()
| is_perspective_on | ( | ) |
Check if perspective projection is enabled.
Returns true if the graphics window is using perspective projection; false if orthographic.
.. code-block:: python
@n return type of : boolean
- Returns
- true if perspective projection is enabled; false otherwise.
◆ is_playback_paused()
| is_playback_paused | ( | ) |
Check if journal playback is currently paused.
Returns true if journal playback is currently paused, either manually via pause_playback() or due to an error when playback-paused-on-error is enabled.
.. code-block:: python
if cubit.is_playback_paused(): print("Playback is currently paused.")
@n return type of : boolean
- Returns
- True if playback is paused; false otherwise.
◆ is_playback_paused_on_error()
| is_playback_paused_on_error | ( | ) |
Query whether playback is paused on error.
Returns the current setting that controls whether Cubit pauses journal playback when an error occurs.
.. code-block:: python
if cubit.is_playback_paused_on_error(): print("Playback paused on error.")
@n return type of : boolean
- Returns
- True if playback will pause on errors; false otherwise.
◆ is_point_contained()
| is_point_contained | ( | geometry_type, | |
| entity_id, | |||
| xyz_point ) |
Determine if a point is inside, outside, on, or unknown relative to a given entity.
Commonly used for volumes or sheet bodies to test point containment.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type Type of the entity ("volume" or "body").
type of entity_id: intentity_id ID of the entity to test.
type of xyz_point: std::array< double,3 >xyz_point A 3-element array {x, y, z} defining the point to test.
return type of : int
- Returns
- -1 on failure, 0 if outside, 1 if inside, 2 if on the boundary.
◆ is_protrusion_surface()
| is_protrusion_surface | ( | surface_id | ) |
Return whether the specified surface is part of a protrusion.
A protrusion surface is a surface that bounds a region of material extending outward from the main geometry.
If the surface is part of a protrusion (such as a boss or raised feature), this function returns true; otherwise, false.
.. code-block:: python
type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
return type of : boolean
- Returns
- True if the surface is part of a protrusion, false otherwise.
◆ is_scale_visibility_on()
| is_scale_visibility_on | ( | ) |
Check if the scale annotation is visible in the graphics window.
The scale annotation displays X, Y, and Z axes (with unit markings) at the bounding box of the current objects. It helps judge physical dimensions.
.. code-block:: python
@n return type of : boolean
- Returns
- true if the scale annotation is currently visible; false otherwise.
◆ is_select_partial_on()
| is_select_partial_on | ( | ) |
Check if partial selection is enabled.
@n return type of : boolean
- Returns
- true if partial picks are allowed; false otherwise.
.. code-block:: python
◆ is_sheet_body()
| is_sheet_body | ( | volume_id | ) |
Determine if a volume is a sheet body (zero thickness).
.. code-block:: python
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to query.
return type of : boolean
- Returns
- True if the volume is a sheet body (zero thickness); otherwise false.
◆ is_special_build()
| is_special_build | ( | build_type | ) |
Check if a special build type is available.
Determines if the specified build_type corresponds to a special Cubit build or engine support compiled into this Cubit build. The comparison is case-insensitive
and "acis", "catia", "goodyear", "granite", "machine_learning" ("ml"), "opencascade", and "sgm".
.. code-block:: python
@n type of build_type: string
- Parameters
-
build_type Name of the special build to check (e.g., "acis", "catia", "ml"). Case-insensitive.
return type of : boolean
- Returns
- True if the specified special build type is available; false otherwise.
◆ is_surface_meshable()
| is_surface_meshable | ( | surface_id | ) |
Check if a surface is meshable under the current meshing scheme.
Returns whether the specified surface can be meshed using the active mesh settings. Surfaces have a default scheme if none was explicitly set.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to test.
return type of : boolean
- Returns
- True if the surface is meshable; false otherwise.
◆ is_surface_planar()
| is_surface_planar | ( | surface_id | ) |
◆ is_surface_planer()
| is_surface_planer | ( | surface_id | ) |
Query whether a specified surface is planar.
Some workflows require distinguishing planar faces from curved ones. Both `is_surface_planer` (archaic spelling) and `is_surface_planar` are provided for compatibility; they behave identically.
.. code-block:: python
@n type of surface_id: int
- Parameters
-
surface_id ID of the surface to query.
return type of : boolean
- Returns
- True if the surface is planar; otherwise false.
◆ is_type_filtered()
| is_type_filtered | ( | filter_type | ) |
Check if a specific entity type is currently excluded from picking.
Returns true if the given type is in the pick filter list (i.e., will not be picked).
.. code-block:: python
@n type of filter_type: string
- Parameters
-
filter_type Entity type to test ("vertex", "curve", "surface", "volume", "node", "edge", "face", etc.).
return type of : boolean
- Returns
- True if that type is currently filtered out; false otherwise.
◆ is_undo_save_needed()
| is_undo_save_needed | ( | ) |
Check if the model requires an undo checkpoint save.
Returns true if any CAD operation has modified the model since the last call to set_undo_saved().
.. code-block:: python
@n return type of : boolean
- Returns
- True if the model has changed since last undo save; false otherwise.
◆ is_virtual()
| is_virtual | ( | geometry_type, | |
| entity_id ) |
Query whether a specified geometry entity is virtual.
.. code-block:: python
@n type of geometry_type: string
- Parameters
-
geometry_type The type of geometry ("curve", "surface", "volume", etc.).
type of entity_id: intentity_id The ID of the entity to query.
return type of : boolean
- Returns
- True if the specified entity is virtual; false otherwise.
◆ is_visible()
| is_visible | ( | geometry_type, | |
| entity_id ) |
Query visibility for a specific geometry entity.
.. code-block:: python
if not cubit.is_visible("volume", 4): print("Volume 4 is now hidden.")
if cubit.is_visible("volume", 4): print("Volume 4 is now visible.")
@n type of geometry_type: string
- Parameters
-
geometry_type The type of geometry ("curve", "surface", "volume", etc.).
type of entity_id: intentity_id The ID of the entity to query.
return type of : boolean
- Returns
- True if the specified entity is currently visible; false otherwise.
◆ is_volume_meshable()
| is_volume_meshable | ( | volume_id | ) |
Check if a volume is meshable under the current meshing scheme.
Returns whether the specified volume can be meshed using the active mesh settings. Volumes have a default scheme if none was explicitly set.
.. code-block:: python
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to test.
return type of : boolean
- Returns
- True if the volume is meshable; false otherwise.
◆ is_working_dir_set()
| is_working_dir_set | ( | ) |
Check if the "-workingdir" option was provided at Cubit startup.
Determines whether the user specified a working directory on the Cubit command line using -workingdir <path>.
.. code-block:: python
@n return type of : boolean
- Returns
- true if -workingdir was used when launching Cubit; false otherwise.
◆ journal_commands()
| journal_commands | ( | state | ) |
Enable or disable journaling of Cubit commands.
Controls whether commands issued via cubit.cmd or API calls are recorded in the active journal file. Journaling is enabled by default when Cubit starts.
.. code-block:: python
@n type of state: boolean
- Parameters
-
state True to enable journaling; false to disable it.
◆ load_ML()
| load_ML | ( | * | args, |
| ** | kwargs ) |
Load machine learning training data into memory.
This function loads and caches the specified machine learning models for immediate use in predictions or feature extraction. If a model is required by another ML function and not yet loaded, it will be loaded automatically. Calling this function explicitly ensures the model is loaded immediately. @n type of model_type: string, optional
- Parameters
-
model_type Specifies which data to load: - "all" : Load both classification and regression models.
- "classification" : Load classification models only.
- "regression" : Load regression models only.
return type of : boolean
- Returns
- True if the data was loaded successfully; false otherwise.
.. code-block:: python
if success: print("Regression models loaded.") else:
◆ measure_between_entities()
| measure_between_entities | ( | entity_type1, | |
| entity_id1, | |||
| entity_type2, | |||
| entity_id2 ) |
Returns the shortest distance between two geometry entities and their closest points.
Computes the closest points between two entities and returns the distance along with the coordinates of these points.
.. code-block:: python
@n type of entity_type1: string
- Parameters
-
entity_type1 Type of the first geometry entity.
type of entity_id1: intentity_id1 ID of the first geometry entity.
type of entity_type2: stringentity_type2 Type of the second geometry entity.
type of entity_id2: intentity_id2 ID of the second geometry entity. @n return type of : std::vector< double,std:: allocator< double > >
- Returns
- : A vector containing distance and coordinates [distance, x1, y1, z1, x2, y2, z2].
◆ ML_train()
| ML_train | ( | geom_type | ) |
Force retraining of the ML classification model for a specific geometry type.
This function initiates a new training run for the specified classification operation. Currently, it is supported only for "volume_no_op" and "surface_no_op" models. @n type of geom_type: string
- Parameters
-
geom_type Geometry type to train ("volume" or "surface"), or operation name.
return type of : boolean
- Returns
- True if the training job was successfully triggered; false otherwise.
.. code-block:: python
if success: print("Training for surface model started successfully.") else:
◆ move()
| move | ( | entity, | |
| vector, | |||
| preview = False ) |
Translates an Entity by a specified vector.
Moves the given ``entity`` by the offset defined in ``vector``. Use ``preview`` to display the translation without applying it. .. code-block:: python
@n type of entity: :py:class:`Entity`, in
- Parameters
-
entity The Entity to translate.
type of vector: std::array< double,3 >, invector The translation vector (x, y, z).
type of preview: boolean, in, optionalpreview If true, show a preview without applying (default false).
◆ number_undo_commands()
| number_undo_commands | ( | ) |
Query the number of undoable commands in the stack.
.. code-block:: python
@n return type of : int
- Returns
- The number of commands currently in the undo stack.
◆ parse_cubit_list()
| parse_cubit_list | ( | type, | |
| entity_list_string ) |
Parse a Cubit-style entity selection expression into a list of IDs.
Converts a free-form Cubit entity expression?supporting ranges, name patterns, and topological queries?into a flat list of integer IDs for the given type.
Title Supported syntax examples
- "1 to 12" - IDs 1 through 12
- "5,7,9" - IDs 5, 7, and 9
- with name "my*" - all matching names
- in volume 5 to 23 - surfaces or curves within volumes 5?23
.. code-block:: python
@n type of type: string
- Parameters
-
type Entity type string (e.g., "vertex", "curve", "surface", "volume").
type of entity_list_string: stringentity_list_string Free-form Cubit selection expression.
return type of : std::vector< int,std:: allocator< int > >
- Returns
- Vector of validated entity IDs matching the expression.
◆ parse_locations()
| parse_locations | ( | location_str | ) |
Parse a Cubit location specification into concrete 3D coordinates.
Accepts any Cubit-style location expression and returns the resulting point(s) as x-y-z triples. See documentation for supported location options.
.. code-block:: python
@n type of location_str: string
- Parameters
-
location_str Cubit location expression string.
return type of : std::vector< std::array< double,3 >,std::allocator< std:: array< double,3 > > >
- Returns
- Vector of 3-element arrays (x, y, z) for each parsed location.
◆ pause_playback()
| pause_playback | ( | ) |
Pause journal playback immediately.
Halts any ongoing playback of journal commands. Typically used within a journal file to pause execution for debugging or inspection. Playback can be resumed by calling resume_playback().
.. code-block:: python
◆ print_cmd_options()
| print_cmd_options | ( | ) |
Display Cubit's supported startup options.
Prints every command-line flag that the Cubit executable accepts when launched
from a terminal, along with its syntax and description.
Example output (first few of many):
.. code-block:: c++
-Include <$val> (Default path to search for input files)
-[no]banner (Suppress printing of startup information.)
-[no]batch (Batch Mode--No Interactive Command Input)
-debug <$val> (Set specified flags on, e.g. 1,3,7-9 enables 1,3,7,8,9))
etc. (and many more options)
.. code-block:: python
◆ print_current_selections()
| print_current_selections | ( | ) |
Print all selected entities and their types.
Outputs each selection in order (index, type, and ID) to the console.
.. code-block:: python
◆ print_currently_selected_entity()
| print_currently_selected_entity | ( | ) |
Print details of the current selected entity.
Shows the type and ID of the entity at the internal selection pointer.
.. code-block:: python
◆ print_info()
| print_info | ( | message | ) |
Print a message through Cubit's messaging system.
Send an informational message to the Cubit message handler for display or logging.
.. code-block:: python
@n type of message: string
- Parameters
-
message The text to be printed.
◆ print_raw_help()
| print_raw_help | ( | input_line, | |
| order_dependent, | |||
| consecutive_dependent ) |
Display context-sensitive help while typing commands.
Called when the user presses one of the help keys ('?', '&', or '!') at the prompt.
It prints relevant syntax or usage hints based on the current input line.
.. code-block:: python
@n type of input_line: string
- Parameters
-
input_line Current command-line text being edited.
type of order_dependent: intorder_dependent Set to 1 (true) if the key was '?' or '!'; set to 0 (false) if it was '&'.
type of consecutive_dependent: intconsecutive_dependent Set to 1 (true) if the key was '?' (allows repeated help); otherwise 0 (false).
◆ print_surface_summary_stats()
| print_surface_summary_stats | ( | ) |
Print summary statistics for all surfaces in the model.
Title Reported metrics * Number of surfaces measured and their average area * Minimum and maximum surface area, with corresponding surface IDs * Minimum hydraulic radius (area/perimeter) and the surface ID * Minimum curve length (smallest edge) with edge ID and surface ID * Maximum ratio of adjacent curve lengths on a surface and its surface ID * Minimum distance between loops on multi-loop surfaces (if applicable) and surface ID * Minimum distance between edges within a single loop and surface ID * Minimum and maximum interior angles between adjacent curves on a surface, with surface IDs
.. code-block:: python
◆ print_volume_summary_stats()
| print_volume_summary_stats | ( | ) |
Print summary statistics for all volumes in the model.
Title Reported metrics * Total number of volumes measured and average volume * Minimum volume value and its volume ID * Minimum hydraulic radius (6 * volume/total_surface_area) and its volume ID * Minimum and maximum interior angles between any two faces in a volume, including the two face IDs and volume ID * Maximum area ratio between adjacent faces in a volume, including the larger and smaller face IDs and volume ID * Total counts of merged and unmerged surfaces across all volumes and their ratio * Number of shell groups found among the combined faces of all volumes and the name of the RefGroup containing those shells * Summary statistics for all surfaces in these volumes (calls print_surface_summary_stats())
.. code-block:: python
◆ prism()
| prism | ( | height, | |
| sides, | |||
| major, | |||
| minor ) |
Create a prism of the specified dimensions.
Creates an extruded prism from a regular polygon base defined by major and minor radii. The prism height and number of sides specify its shape and extrusion. .. code-block:: python
@n type of height: float, in
- Parameters
-
height Height of the prism.
type of sides: int, insides Number of sides of the base polygon.
type of major: float, inmajor Major radius of the base polygon.
type of minor: float, inminor Minor radius of the base polygon.
return type of : :py:class:Body
- Returns
- Body object representing the newly created prism geometry.
◆ project_unit_square()
| project_unit_square | ( | pts, | |
| surface_id, | |||
| quad_id, | |||
| node00_id, | |||
| node10_id ) |
Map points in a unit square (u-v coordinates on a quad face) and project them onto a surface.
For each (u, v) in pts (with values in [0, 1], representing local coordinates on the quad face), this function uses node00_id (u=0, v=0) and node10_id (u=1, v=0) to locate the corresponding point on the quad (quad_id), then projects that 3D point onto the specified surface (surface_id). Returns the 3D coordinates of each projected point.
.. code-block:: python
for p in positions: print(p) # Each p is a list [x, y, z]
@n type of pts: std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >
- Parameters
-
pts A list of (u, v) pairs (each a length-2 vector) in [0, 1], representing local u-v coordinates on the quad face.
type of surface_id: intsurface_id ID of the surface onto which points are projected.
type of quad_id: intquad_id ID of the quad face used to map unit-square coordinates.
type of node00_id: intnode00_id ID of the quad node corresponding to (u=0, v=0).
type of node10_id: intnode10_id ID of the quad node corresponding to (u=1, v=0).
return type of : std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std:: allocator< double > > > >
- Returns
- A list of 3-element vectors [x, y, z] representing each projected point.
◆ pyramid()
| pyramid | ( | height, | |
| sides, | |||
| major, | |||
| minor, | |||
| top = 0.0 ) |
Create a pyramid of specified dimensions.
Creates an extruded pyramid from a regular polygon base defined by major and minor radii. The apex or top plateau size can be specified. .. code-block:: python
@n type of height: float, in
- Parameters
-
height Height of the pyramid.
type of sides: int, insides Number of sides of the base polygon.
type of major: float, inmajor Major radius of the base polygon.
type of minor: float, inminor Minor radius of the base polygon.
type of top: float, in, optionaltop Top radius for a truncated pyramid (default = 0, pointed apex).
return type of : :py:class:Body
- Returns
- Body object representing the newly created pyramid geometry.
◆ reflect()
| reflect | ( | entity, | |
| axis, | |||
| preview = False ) |
Reflects an Entity about a specified axis (e.g., plane normal).
Reflects the given ``entity`` across the plane perpendicular to ``axis``. The original entity can be previewed without modification using ``preview``. .. code-block:: python
@n type of entity: :py:class:`Entity`, in
- Parameters
-
entity The Entity to be reflected.
type of axis: std::array< double,3 >, inaxis The axis (normal) defining the reflection plane.
type of preview: boolean, in, optionalpreview If true, show a preview without applying (default false).
◆ release_interface()
| release_interface | ( | instance | ) |
Release a previously retrieved Cubit interface.
Decrements the reference count (or performs cleanup) for the given interface instance. After calling this, the pointer should not be used.
.. code-block:: python
if iface is not None:
use iface ...
success = cubit.release_interface(iface) if not success: print("Failed to release interface")
@n type of instance: CubitBaseInterface
- Parameters
-
instance Pointer to the CubitBaseInterface to release.
return type of : boolean
- Returns
- True if the interface was successfully released; false otherwise.
◆ remove_entity_from_group()
| remove_entity_from_group | ( | group_id, | |
| entity_id, | |||
| entity_type ) |
Remove a specific entity from a given group.
.. code-block:: python
@n type of group_id: int
- Parameters
-
group_id ID of the group from which the entity will be removed.
type of entity_id: intentity_id ID of the entity to remove.
type of entity_type: stringentity_type Type of the entity (e.g., "vertex", "curve", "surface", "volume"). Only geometric entities are supported.
return type of : void
- Returns
- None.
◆ remove_filter_type()
| remove_filter_type | ( | filter_type | ) |
Remove an entity type from the graphics pick filter.
Disallows picking of the specified entity type; other filters remain unchanged.
.. code-block:: python
@n type of filter_type: string
- Parameters
-
filter_type Entity type to remove from the pickable set (e.g., "vertex", "curve", "surface", "volume", "node", "edge", "face").
◆ replace_progress_handler()
| replace_progress_handler | ( | progress | ) |
Replace the current progress-bar callback handler and return the old one.
Unregisters the existing handler and replaces it with the given one. Returns the previous handler without deleting it.
.. code-block:: python
@n type of progress: :py:class:`CubitProgressHandler`
- Parameters
-
progress Shared pointer to the new CubitProgressHandler instance.
return type of : :py:class:CubitProgressHandler
- Returns
- Shared pointer to the previous handler (may be null if none was set).
◆ reset()
| reset | ( | ) |
◆ reset_camera()
| reset_camera | ( | ) |
Reset the camera view and clear auxiliary graphics windows.
Restores the default view, closes dialogs, and clears overlays.
.. code-block:: python
◆ resume_playback()
| resume_playback | ( | ) |
Resume a paused journal playback.
Continues journal playback after it has been paused, either manually via pause_playback() or automatically due to an error when playback-paused-on-error is enabled.
.. code-block:: python
◆ scale()
| scale | ( | entity, | |
| factor, | |||
| preview = False ) |
Scales an Entity uniformly by a specified factor.
Scales the given ``entity`` by ``factor`` in all directions. Use ``preview`` to display the scaled geometry without applying it. .. code-block:: python
@n type of entity: :py:class:`Entity`, in
- Parameters
-
entity The Entity to scale.
type of factor: float, infactor The uniform scale factor.
type of preview: boolean, in, optionalpreview If true, show a preview without applying (default false).
◆ set_copy_block_on_geometry_copy_setting()
| set_copy_block_on_geometry_copy_setting | ( | val | ) |
Set the behavior for block propagation during geometry copy.
Valid settings: - "ON": Create new blocks on copied geometry/mesh, mirroring the original. - "USE_ORIGINAL": Add copied geometry/mesh to the original block. - "OFF": Do not copy block to the new geometry/mesh.
.. code-block:: python
@n type of val: string
- Parameters
-
val Desired setting ("ON", "USE_ORIGINAL", or "OFF").
return type of : boolean
- Returns
- True if setting was successfully applied, false otherwise.
◆ set_copy_nodeset_on_geometry_copy_setting()
| set_copy_nodeset_on_geometry_copy_setting | ( | val | ) |
Set the behavior for nodeset propagation during geometry copy.
Valid settings: - "ON": Create new nodesets on copied geometry/mesh, mirroring the original. - "USE_ORIGINAL": Add copied geometry/mesh to the original nodeset. - "OFF": Do not copy nodeset to the new geometry/mesh.
.. code-block:: python
@n type of val: string
- Parameters
-
val Desired setting ("ON", "USE_ORIGINAL", or "OFF").
return type of : boolean
- Returns
- True if setting was successfully applied, false otherwise.
◆ set_copy_sideset_on_geometry_copy_setting()
| set_copy_sideset_on_geometry_copy_setting | ( | val | ) |
Set the behavior for sideset propagation during geometry copy.
Valid settings: - "ON": Create new sidesets on copied geometry/mesh, mirroring the original. - "USE_ORIGINAL": Add copied geometry/mesh to the original sideset. - "OFF": Do not copy sideset to the new geometry/mesh.
.. code-block:: python
@n type of val: string
- Parameters
-
val Desired setting ("ON", "USE_ORIGINAL", or "OFF").
return type of : boolean
- Returns
- True if setting was successfully applied, false otherwise.
◆ set_cubit_interrupt()
| set_cubit_interrupt | ( | interrupt | ) |
Enable or disable interruptible operations in Cubit.
When set to true, any interruptible Cubit process will be stopped at the next interrupt check.
.. code-block:: python
@n type of interrupt: boolean
- Parameters
-
interrupt True to stop interruptible processes, false to allow them.
◆ set_cubit_message_handler()
| set_cubit_message_handler | ( | hdlr | ) |
Redirect Cubit output to a custom message handler.
Replace the default Cubit message handler so that all subsequent messages are routed to the provided handler instance, which must implement print_message() and/or print_error().
.. code-block:: python
class MyHandler(cubit.CubitMessageHandler): def print_message(self, message):
def print_error(self, message): print("[Error]", message, file=sys.stderr)
@n type of hdlr: :py:class:`CubitMessageHandler`
- Parameters
-
hdlr Shared pointer to a CubitMessageHandler that will receive messages.
◆ set_element_variable()
| set_element_variable | ( | element_ids, | |
| variable_name, | |||
| variables ) |
Sets scalar variables on specified mesh elements for Exodus export.
Assigns the element variable named ``variable_name`` to the elements in ``element_ids``, using the corresponding values in ``variables``. If ``variables`` contains a single entry, that value is applied to all elements; otherwise, its length must match ``element_ids``. When exporting the mesh to an Exodus file, these element variables will be included for downstream analysis. .. code-block:: python
@n type of element_ids: std::vector< int,std::allocator< int > >, in
- Parameters
-
element_ids List of element IDs to assign variables to.
type of variable_name: string, invariable_name Name of the element variable.
type of variables: std::vector< double,std::allocator< double > >, invariables Values for each element (single value applies to all elements).
◆ set_entity_name()
| set_entity_name | ( | entity_type, | |
| entity_id, | |||
| new_name ) |
Set the name of a specified entity.
Equivalent to the command:
.. code-block:: c++
{Body|Volume|Surface|Curve|Vertex} <id_range> name '<name_string>'
For example, to name vertex 22 "point_load":
.. code-block:: c++
Vertex 22 name 'point_load'
.. code-block:: python
if success: print("Rename succeeded")
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity ("body", "volume", "surface", "curve", or "vertex").
type of entity_id: intentity_id ID of the entity to rename.
type of new_name: stringnew_name The new name to assign to the entity.
return type of : boolean
- Returns
- True if the entity was found and renamed; otherwise false.
◆ set_exit_handler()
| set_exit_handler | ( | hdlr | ) |
Set a custom exit callback for Cubit.
Provide an ExternalExitHandler-derived instance to handle Cubit's exit events.
.. code-block:: python
class MyExitHandler(cubit.ExternalExitHandler): def handle_exit_event(self, code):
@n type of hdlr: :py:class:`ExternalExitHandler`
- Parameters
-
hdlr Pointer to an ExternalExitHandler implementation that will be called when Cubit exits.
◆ set_filter_types()
| set_filter_types | ( | num_types, | |
| filter_types ) |
Set multiple pick filter types for graphics selections.
Configures the graphics system to allow picking any entity whose type is in the provided list. Overrides any previously set pick filters.
.. code-block:: python
@n type of num_types: int
- Parameters
-
num_types Number of entity types in filter_types.
type of filter_types: std::vector< std::string,std::allocator< std::string > >filter_types Vector of entity-type strings to enable for picking. Valid values include "vertex", "curve", "surface", "volume", "node", "edge", "face", etc.
◆ set_label_type()
| set_label_type | ( | entity_type, | |
| label_flag ) |
Sets label display type for a given entity type.
Controls how labels are displayed for the specified entity type in the graphics window. Valid `entity_type` values:
Label flag values (SVUtil::LabelType): 0=CUBIT_LABEL_NONE, 1=CUBIT_LABEL_ID, 2=CUBIT_LABEL_ELEMENT_ID, 3=CUBIT_LABEL_NAME, 4=CUBIT_LABEL_INTERVAL, 5=CUBIT_LABEL_SIZE, 6=CUBIT_LABEL_MERGE, 7=CUBIT_LABEL_IS_MERGED, 8=CUBIT_LABEL_FIRMNESS, 9=CUBIT_LABEL_SCHEME, 10=CUBIT_LABEL_NAME_ID, 11=CUBIT_LABEL_NAME_ONLY, 12=CUBIT_LABEL_SPHERE_ID
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Entity type to label.
type of label_flag: intlabel_flag Label display type. @n return type of : void
- Returns
- None.
◆ set_max_group_id()
| set_max_group_id | ( | maximum_group_id | ) |
Reset Cubit's internal maximum group ID to a specified value.
Cubit tracks a monotonically increasing next group ID. GUI power tools may create and delete groups behind the scenes, incrementing Cubit's group ID counter and causing downstream journal files to reference unexpected IDs. This function restores control by resetting Cubit's max group ID, but only when the specified maximum_group_id matches Cubit's current highest ID?otherwise no change occurs.
- Warning
- Use sparingly. An incorrect
maximum_group_idcan desynchronize journal files or lead to ID collisions.
type of maximum_group_id: int
- Parameters
-
maximum_group_id The desired maximum group ID to enforce (must equal Cubit's current max ID).
return type of : void
- Returns
- None.
◆ set_ML_base_user_dir()
| set_ML_base_user_dir | ( | path, | |
| print_info = False ) |
Set the root directory for user-provided ML training data (classification only).
Specifies the location of user training files for classification operations. The directory must contain subfolders matching the ML operation names (e.g., "ml/volume_no_op"). @n type of path: string
- Parameters
-
path Top-level path to the user training data directory.
type of print_info: boolean, optionalprint_info If true, output status messages about directory setup.
.. code-block:: python
◆ set_modified()
| set_modified | ( | ) |
Reset the model's modified status to "unmodified".
Clears the internal flag so that is_modified() returns false until the next CAD operation.
.. code-block:: python
◆ set_nodal_variable()
| set_nodal_variable | ( | node_ids, | |
| variable_name, | |||
| variables ) |
Sets scalar variables on specified mesh nodes.
Assigns the nodal variable named ``variable_name`` to the nodes in ``node_ids``, using the corresponding values in ``variables``. If ``variables`` contains a single value, that value is applied to all nodes; otherwise, its length must match ``node_ids``. When exporting to Exodus, these nodal values will be included for analysis. .. code-block:: python
@n type of node_ids: std::vector< int,std::allocator< int > >, in
- Parameters
-
node_ids List of node IDs to assign variables to.
type of variable_name: string, invariable_name Name of the nodal variable.
type of variables: std::vector< double,std::allocator< double > >, invariables Values for each node (single value applies to all nodes).
◆ set_overlap_max_angle()
| set_overlap_max_angle | ( | maximum_angle | ) |
Set the maximum angle tolerance for calculating surface overlaps.
Updates the threshold that defines how much angular difference between surface normals can exist before surfaces are considered non-overlapping. Smaller values enforce stricter overlap detection by requiring surfaces to be nearly coplanar.
.. code-block:: python
@n type of maximum_angle: float
- Parameters
-
maximum_angle The new maximum angle tolerance (in degrees) to use when testing surface overlaps.
◆ set_overlap_max_gap()
| set_overlap_max_gap | ( | maximum_gap | ) |
Set the maximum gap tolerance for calculating surface overlaps.
Updates the threshold that defines how large a gap between two surfaces can be before they are considered non-overlapping. Smaller values make the overlap test more stringent, while larger values allow greater discrepancies.
.. code-block:: python
@n type of maximum_gap: float
- Parameters
-
maximum_gap The new maximum gap tolerance (in model units) to use when testing surface overlaps.
◆ set_overlap_min_gap()
| set_overlap_min_gap | ( | min_gap | ) |
Set the minimum gap tolerance for calculating surface overlaps.
Updates the threshold that defines how small a gap between two surfaces can be before they are considered overlapping. Smaller values enforce stricter overlap detection by ignoring only very tiny gaps.
.. code-block:: python
@n type of min_gap: float
- Parameters
-
min_gap The new minimum gap tolerance (in model units) to use when testing surface overlaps.
◆ set_pick_type()
| set_pick_type | ( | pick_type, | |
| silent = False ) |
Set the current pick mode for entity selection.
Specifies which entity type the graphics system will select on the next pick. This determines the output of get_selected_ids() and pick dialogs.
.. code-block:: python
@n type of pick_type: string
- Parameters
-
pick_type Entity type to pick. Valid values include: "vertex", "curve", "surface", "volume", "node", "edge", "face", etc.
type of silent: boolean, optionalsilent If true, suppress the console message confirming the change. Defaults to false (confirmation printed).
◆ set_playback_paused_on_error()
| set_playback_paused_on_error | ( | pause | ) |
Configure whether playback pauses on error.
Controls whether Cubit pauses journal playback automatically when an error occurs, allowing inspection before continuing.
.. code-block:: python
@n type of pause: boolean
- Parameters
-
pause True to pause playback on error; false to continue automatically.
◆ set_progress_handler()
| set_progress_handler | ( | progress | ) |
Register a progress-bar callback handler with Cubit.
Sets the given handler as the active progress-bar callback. If a handler is already registered, it is released (but not returned).
.. code-block:: python
class MyProgressHandler(cubit.CubitProgressHandler): def start(self, title, info_string, hasCancel): print {info_string}") def end(self): print("Progress complete.") def percent(self, pcnt): print {pcnt * 100:.1f}%", end="\\r") def check_interrupt(self): return False
type of progress: :py:class:CubitProgressHandler
- Parameters
-
progress Shared pointer to a CubitProgressHandler instance.
◆ set_rendering_mode()
| set_rendering_mode | ( | mode | ) |
Set the current graphics rendering mode (equivalent to "Graphics Mode <option>").
This is the programmatic equivalent of the Cubit command:
cubit.cmd("Graphics Mode <option>")
where mode can be one of HiddenLine, TrueHiddenLine, SmoothShade, Transparent, WireFrame, or GeomFacet. Instead of a string, this function accepts an integer code:
- 0 =
WireFrame - 1 =
HiddenLine - 2 =
TrueHiddenLine - 3 =
SmoothShade - 4 =
Transparent - 5 =
GeomFacet
Python example (for reference): .. code-block:: python
type of mode: int
- Parameters
-
mode Integer code for the rendering mode (0-5), corresponding to: 0=WireFrame, 1=HiddenLine, 2=TrueHiddenLine, 3=SmoothShade, 4=Transparent, 5=GeomFacet.
◆ set_undo_saved()
| set_undo_saved | ( | ) |
Clear the undo-needed flag for the model.
Marks the current model state as saved for undo purposes. After calling, is_undo_save_needed() returns false until the next modifying operation.
.. code-block:: python
◆ silent_cmd()
| silent_cmd | ( | input_string | ) |
Execute a Cubit command without echoing or verbose output.
Behaves like cmd(), but suppresses prompt echo and messages--ideal for scripting.
.. code-block:: python
@n type of input_string: string
- Parameters
-
input_string C-string containing the complete Cubit command.
return type of : boolean
- Returns
- true if the command executed successfully; false otherwise.
◆ snap_locations_to_geometry()
| snap_locations_to_geometry | ( | locations, | |
| entity_type, | |||
| entity_id, | |||
| tol ) |
Snaps given XYZ locations to nearest points on specified entity.
Points are first snapped to the closest location on the specified entity. Within the provided tolerance, points are then snapped preferentially to vertices, followed by curves.
.. code-block:: python
@n type of locations: std::vector< std::array< double,3 >,std::allocator< std::array< double,3 > > >
- Parameters
-
locations A vector of XYZ points to snap.
type of entity_type: stringentity_type Type of entity (e.g., "volume", "surface", "curve").
type of entity_id: intentity_id ID of the target entity.
type of tol: floattol Tolerance for snapping to vertices and curves. @n return type of : std::vector< std::array< double,3 >,std::allocator< std:: array< double,3 > > >
- Returns
- A vector of snapped XYZ points corresponding to input locations.
◆ sphere()
| sphere | ( | radius, | |
| x_cut = 0, | |||
| y_cut = 0, | |||
| z_cut = 0, | |||
| inner_radius = 0 ) |
Create all or part of a sphere.
Creates a spherical geometry of given radius. Optional planar cuts (along the yz, xz, or xy planes) and an inner radius for hollow spheres can be specified. .. code-block:: python
@n type of radius: float, in
- Parameters
-
radius Radius of the sphere.
type of x_cut: int, in, optionalx_cut If 1, cut sphere by the yz-plane (default = 0).
type of y_cut: int, in, optionaly_cut If 1, cut sphere by the xz-plane (default = 0).
type of z_cut: int, in, optionalz_cut If 1, cut sphere by the xy-plane (default = 0).
type of inner_radius: float, in, optionalinner_radius Inner radius for a hollow sphere (default = 0).
return type of : :py:class:Body
- Returns
- Body object representing the newly created sphere geometry.
◆ step_next_possible_selection()
| step_next_possible_selection | ( | ) |
Advance to the next entity in the current selection list.
Moves the internal selection pointer forward, updating which entity is considered the "current" selection for print_currently_selected_entity().
.. code-block:: python
◆ step_previous_possible_selection()
| step_previous_possible_selection | ( | ) |
Move back to the previous entity in the current selection list.
Moves the internal selection pointer backward, so that the "current" selection reverts to the one before the last step.
.. code-block:: python
◆ stop_playback()
| stop_playback | ( | ) |
Stop journal playback entirely.
Immediately terminates the execution of a journal file. This is typically used within a journal to abort playback due to errors or conditional logic. To restart, use resume_playback() or manually reissue commands.
.. code-block:: python
◆ string_from_id_list()
| string_from_id_list | ( | ids | ) |
Convert a list of integers into a compact Cubit-style ID string.
Collapses consecutive IDs into "start to end" ranges, separates entries with commas, and inserts line breaks at 80 characters for readability.
Title Examples:
- {1,2,3,4,5,6,7,8} -> "1 to 8\n"
- {1,2,3,100,5,6,7,8} -> "1 to 3, 5 to 8, 100\n"
.. code-block:: python
@n type of ids: std::vector< int,std::allocator< int > >
- Parameters
-
ids Vector of integer IDs to format.
return type of : string
- Returns
- String containing ranges and line breaks at column 80.
◆ subtract()
| subtract | ( | tool_in, | |
| from_in, | |||
| imprint_in = False, | |||
| keep_old_in = False ) |
Performs a boolean subtract operation: removes tool bodies from target bodies.
Subtracts each body in ``tool_in`` from the corresponding body in ``from_in``. The subtraction can imprint shared geometry if ``imprint_in`` is true, and the original bodies can be preserved if ``keep_old_in`` is true. .. code-block:: python
@n type of tool_in: std::vector< CubitInterface::Body,std::allocator< CubitInterface::Body > >, in
- Parameters
-
tool_in Bodies to subtract (tools).
type of from_in: std::vector< CubitInterface::Body,std::allocator< CubitInterface::Body > >, infrom_in Bodies to subtract from (targets).
type of imprint_in: boolean, in, optionalimprint_in True to imprint shared geometry (default false).
type of keep_old_in: boolean, in, optionalkeep_old_in True to retain the original bodies (default false).
return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > >
- Returns
- A vector of Body objects representing the resulting bodies after subtraction.
◆ surface()
| surface | ( | id_in | ) |
Retrieve a surface object by its ID.
Retrieves the surface object corresponding to the provided ID. .. code-block:: python
@n type of id_in: int
- Parameters
-
id_in ID of the surface to retrieve.
return type of : :py:class:Surface
- Returns
- Surface object corresponding to the specified ID.
◆ sweep_curve()
| sweep_curve | ( | curves, | |
| along_curves, | |||
| draft_angle, | |||
| draft_type, | |||
| rigid ) |
Sweep one or more curves along a path to create sheet bodies.
Constructs sheet bodies by sweeping the specified cross-section curves along the given path curves. Optional draft angle, draft type, and rigidity control taper and rounding behavior. This creates surface bodies (no solid volume); each returned Body contains exactly one Surface. Use the body's `surfaces()` method to access it and obtain area. .. code-block:: python
@n type of curves: std::vector< CubitInterface::Curve,std::allocator< CubitInterface::Curve > >, in
- Parameters
-
curves Cross-section curves to sweep.
type of along_curves: std::vector< CubitInterface::Curve,std::allocator< CubitInterface::Curve > >, inalong_curves Path curves defining the sweep trajectory.
type of draft_angle: float, indraft_angle Angle (in degrees) for draft taper (default = 0).
type of draft_type: int, indraft_type Draft type: 0=extended, 1=rounded, 2=natural (default = 0).
type of rigid: boolean, inrigid If true, maintains cross-section rigidity (default = false).
return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > >
- Returns
- Vector of sheet Body objects created by the sweep (each contains one Surface). :raises: CubitFailureException Thrown if input is invalid or sweep fails.
◆ temperature_is_on_shell_area()
| temperature_is_on_shell_area | ( | bc_type_enum, | |
| bc_area_enum, | |||
| entity_id ) |
Check if a temperature BC is on a shell area.
type of bc_type_enum: int
- Parameters
-
bc_type_enum BC type (temperature = 4, convection = 7).
type of bc_area_enum: intbc_area_enum CI_BCEntityTypes: 7 (top), 8 (bottom), 9 (gradient), 10 (middle).
type of entity_id: intentity_id ID of the BC.
return type of : boolean
- Returns
- True if the temperature BC is on the specified shell area.
◆ temperature_is_on_solid()
| temperature_is_on_solid | ( | bc_type_enum, | |
| entity_id ) |
Check if a temperature BC is applied to a solid region.
Valid for temperature and convection BCs.
type of bc_type_enum: int
- Parameters
-
bc_type_enum BC type (temperature = 4, convection = 7).
type of entity_id: intentity_id ID of the boundary condition.
return type of : boolean
- Returns
- True if temperature BC is on a solid.
◆ torus()
| torus | ( | center_radius, | |
| swept_radius ) |
Create a torus of specified dimensions.
Creates a toroidal geometry defined by the distance from center to the center of the swept circle (major radius) and the radius of the swept circle (minor radius). .. code-block:: python
@n type of center_radius: float, in
- Parameters
-
center_radius Distance from torus center to center of swept circle (major radius, must be > swept_radius).
type of swept_radius: float, inswept_radius Radius of the circle to be swept (minor radius, must be < center_radius).
return type of : :py:class:Body
- Returns
- Body object representing the newly created torus geometry.
◆ tweak_curve_offset()
| tweak_curve_offset | ( | curves, | |
| distances, | |||
| keep_old = False, | |||
| preview = False ) |
2D equivalent of tweak_surface_offset: offsets specified curves on a sheet body.
Offsets each curve in ``curves`` by the corresponding value in ``distances`` on a 2D sheet body. The original sheet can be retained via ``keep_old``, and a preview generated via ``preview``. .. code-block:: python
@n type of curves: std::vector< CubitInterface::Curve,std::allocator< CubitInterface::Curve > >, in
- Parameters
-
curves List of Curve objects to offset.
type of distances: std::vector< double,std::allocator< double > >, indistances List of distances for each curve (in model units).
type of keep_old: boolean, in, optionalkeep_old True to retain the original sheet body (default false).
type of preview: boolean, in, optionalpreview True to generate a preview without modifying geometry (default false).
return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > >
- Returns
- A vector of sheet Body objects representing the resulting bodies after offset.
◆ tweak_curve_remove()
| tweak_curve_remove | ( | curves, | |
| keep_old = False, | |||
| preview = False ) |
Removes specified curves and extends adjacent surfaces on a sheet body.
2D equivalent of tweak_surface_remove. Removes each curve (edge) in ``curves`` from a 2D sheet body. Adjacent surfaces are extended to fill the gap created by removal. The original sheet can be retained via ``keep_old``, and a preview can be generated without modification when ``preview`` is true. .. code-block:: python
@n type of curves: std::vector< CubitInterface::Curve,std::allocator< CubitInterface::Curve > >, in
- Parameters
-
curves List of Curve objects to remove.
type of keep_old: boolean, in, optionalkeep_old True to retain the original sheet body (default false).
type of preview: boolean, in, optionalpreview True to generate a preview without modifying geometry (default false).
return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > >
- Returns
- A vector of sheet Body objects representing the resulting bodies after curve removal.
◆ tweak_surface_offset()
| tweak_surface_offset | ( | surfaces, | |
| distances ) |
Offsets specified surfaces by given distances.
Offsets each surface in ``surfaces`` by the corresponding value in ``distances``, modifying the geometry and returning the resulting bodies (one per set of inputs). .. code-block:: python
@n type of surfaces: std::vector< CubitInterface::Surface,std::allocator< CubitInterface::Surface > >
- Parameters
-
surfaces List of Surface objects to offset.
type of distances: std::vector< double,std::allocator< double > >distances List of distances for each surface (positive values offset outward).
return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > >
◆ tweak_surface_remove()
| tweak_surface_remove | ( | surfaces, | |
| extend_ajoining = True, | |||
| keep_old = False, | |||
| preview = False ) |
Removes specified surfaces from a body, optionally extending adjacent surfaces.
Removes each surface in ``surfaces`` from its body. If ``extend_ajoining`` is true, adjacent surfaces are extended to close the gap. The original body can be retained via ``keep_old``, and a preview can be generated without modification when ``preview`` is true. .. code-block:: python
@n type of surfaces: std::vector< CubitInterface::Surface,std::allocator< CubitInterface::Surface > >, in
- Parameters
-
surfaces List of Surface objects to remove.
type of extend_ajoining: boolean, in, optionalextend_ajoining True to extend adjacent surfaces (default true).
type of keep_old: boolean, in, optionalkeep_old True to retain the original body (default false).
type of preview: boolean, in, optionalpreview True to generate a preview without modifying geometry (default false).
return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > >
- Returns
- A vector of Body objects representing the resulting bodies after removal.
◆ tweak_vertex_fillet()
| tweak_vertex_fillet | ( | verts, | |
| radius, | |||
| keep_old = False, | |||
| preview = False ) |
2D sheet vertex chamfer: creates chamfers at specified vertices by offsetting adjacent curves.
Performs a chamfer operation at each vertex in ``verts`` on a 2D sheet body. Adjacent curves are trimmed and extended to form a flat face at distance ``radius`` from the vertex. The original sheet can be retained via ``keep_old``, and a preview generated via ``preview``. .. code-block:: python
@n type of verts: std::vector< CubitInterface::Vertex,std::allocator< CubitInterface::Vertex > >, in
- Parameters
-
verts List of Vertex objects to chamfer.
type of radius: float, inradius Chamfer distance (model units).
type of keep_old: boolean, in, optionalkeep_old True to retain the original sheet body (default false).
type of preview: boolean, in, optionalpreview True to generate a preview without modifying geometry (default false).
return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > >
- Returns
- A vector of sheet Body objects representing the resulting bodies after chamfering.
◆ unite()
| unite | ( | body_in, | |
| keep_old_in = False ) |
Performs a boolean unite operation: merges specified bodies into one.
Unites the bodies in ``body_in`` into a single body. Surfaces in contact remain connected. The original bodies can be retained via ``keep_old_in``. .. code-block:: python
@n type of body_in: std::vector< CubitInterface::Body,std::allocator< CubitInterface::Body > >, in
- Parameters
-
body_in List of Body objects to unite.
type of keep_old_in: boolean, in, optionalkeep_old_in True to retain original bodies (default false).
return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > >
◆ unload_ML()
| unload_ML | ( | * | args, |
| ** | kwargs ) |
Unload machine learning training data from memory.
This function clears cached ML models and releases associated resources for the specified type. @n type of model_type: string, optional
- Parameters
-
model_type Specifies which data to unload: - "all" : Unload both classification and regression models.
- "classification" : Unload classification models only.
- "regression" : Unload regression models only.
.. code-block:: python
◆ unselect_entity()
| unselect_entity | ( | entity_type, | |
| entity_id ) |
Unselect an entity that is currently selected.
Removes the highlight and pick status of the specified entity.
.. code-block:: python
@n type of entity_type: string
- Parameters
-
entity_type Type of the entity ("vertex", "curve", "surface", "volume").
type of entity_id: intentity_id ID of the entity to unselect.
◆ vertex()
| vertex | ( | id_in | ) |
Retrieve a vertex object by its ID.
Retrieves the vertex object corresponding to the provided ID. .. code-block:: python
@n type of id_in: int
- Parameters
-
id_in ID of the vertex to retrieve.
return type of : :py:class:Vertex
- Returns
- Vertex object corresponding to the specified ID.
◆ volume()
| volume | ( | id_in | ) |
Retrieve a volume by its ID.
Retrieves the volume object corresponding to the provided ID. .. code-block:: python
@n type of id_in: int
- Parameters
-
id_in ID of the volume to retrieve.
return type of : :py:class:Volume
- Returns
- Volume object corresponding to the specified ID.
◆ volume_contains_tets()
| volume_contains_tets | ( | volume_id | ) |
Determine whether a specified volume contains any tetrahedral elements.
.. code-block:: python
@n type of volume_id: int
- Parameters
-
volume_id ID of the volume to check.
return type of : boolean
- Returns
- True if the volume contains any tetrahedral elements; false otherwise.
◆ was_last_cmd_undoable()
| was_last_cmd_undoable | ( | ) |
Report whether the last executed command was undoable.
Returns true if the most recent Cubit command supports undo; false otherwise.
.. code-block:: python
@n return type of : boolean
- Returns
- true if the last command supports undo; false otherwise.
◆ write_to_journal()
| write_to_journal | ( | words | ) |
Append a custom entry to Cubit's journal and recording streams.
Forces the given text to be recorded as if it were a Cubit command. This marks the model as modified and, if journaling and recording are enabled, writes the entry to the active journal and recording files.
.. code-block:: python
@n type of words: string
- Parameters
-
words Text to append to the journal and recording streams.
Variable Documentation
◆ BAR
| BAR = _cubit3.BAR |
◆ BAR2
| BAR2 = _cubit3.BAR2 |
◆ BAR3
| BAR3 = _cubit3.BAR3 |
◆ BEAM
| BEAM = _cubit3.BEAM |
◆ BEAM2
| BEAM2 = _cubit3.BEAM2 |
◆ BEAM3
| BEAM3 = _cubit3.BEAM3 |
◆ CI_BCENTITY_CC
| CI_BCENTITY_CC = _cubit3.CI_BCENTITY_CC |
◆ CI_BCENTITY_CC_SHELL_BOTTOM
| CI_BCENTITY_CC_SHELL_BOTTOM = _cubit3.CI_BCENTITY_CC_SHELL_BOTTOM |
◆ CI_BCENTITY_CC_SHELL_TOP
| CI_BCENTITY_CC_SHELL_TOP = _cubit3.CI_BCENTITY_CC_SHELL_TOP |
◆ CI_BCENTITY_FIRST
| CI_BCENTITY_FIRST = _cubit3.CI_BCENTITY_FIRST |
◆ CI_BCENTITY_LAST
| CI_BCENTITY_LAST = _cubit3.CI_BCENTITY_LAST |
◆ CI_BCENTITY_SHELL_AREA_BOTTOM
| CI_BCENTITY_SHELL_AREA_BOTTOM = _cubit3.CI_BCENTITY_SHELL_AREA_BOTTOM |
◆ CI_BCENTITY_SHELL_AREA_GRADIENT
| CI_BCENTITY_SHELL_AREA_GRADIENT = _cubit3.CI_BCENTITY_SHELL_AREA_GRADIENT |
◆ CI_BCENTITY_SHELL_AREA_MIDDLE
| CI_BCENTITY_SHELL_AREA_MIDDLE = _cubit3.CI_BCENTITY_SHELL_AREA_MIDDLE |
◆ CI_BCENTITY_SHELL_AREA_TOP
| CI_BCENTITY_SHELL_AREA_TOP = _cubit3.CI_BCENTITY_SHELL_AREA_TOP |
◆ CI_BCENTITY_SOLID_HEATFLUX
| CI_BCENTITY_SOLID_HEATFLUX = _cubit3.CI_BCENTITY_SOLID_HEATFLUX |
◆ CI_BCENTITY_SOLID_TEMP
| CI_BCENTITY_SOLID_TEMP = _cubit3.CI_BCENTITY_SOLID_TEMP |
◆ CI_BCENTITY_TEMP
| CI_BCENTITY_TEMP = _cubit3.CI_BCENTITY_TEMP |
◆ CI_BCENTITY_UNKNOWN
| CI_BCENTITY_UNKNOWN = _cubit3.CI_BCENTITY_UNKNOWN |
◆ CI_BCTYPE_ACCELERATION
| CI_BCTYPE_ACCELERATION = _cubit3.CI_BCTYPE_ACCELERATION |
◆ CI_BCTYPE_AXIS
| CI_BCTYPE_AXIS = _cubit3.CI_BCTYPE_AXIS |
◆ CI_BCTYPE_CONSTRAINT
| CI_BCTYPE_CONSTRAINT = _cubit3.CI_BCTYPE_CONSTRAINT |
◆ CI_BCTYPE_CONTACT_PAIR
| CI_BCTYPE_CONTACT_PAIR = _cubit3.CI_BCTYPE_CONTACT_PAIR |
◆ CI_BCTYPE_CONTACT_REGION
| CI_BCTYPE_CONTACT_REGION = _cubit3.CI_BCTYPE_CONTACT_REGION |
◆ CI_BCTYPE_CONVECTION
| CI_BCTYPE_CONVECTION = _cubit3.CI_BCTYPE_CONVECTION |
◆ CI_BCTYPE_DISPLACEMENT
| CI_BCTYPE_DISPLACEMENT = _cubit3.CI_BCTYPE_DISPLACEMENT |
◆ CI_BCTYPE_EXHAUSTFAN
| CI_BCTYPE_EXHAUSTFAN = _cubit3.CI_BCTYPE_EXHAUSTFAN |
◆ CI_BCTYPE_FAN
| CI_BCTYPE_FAN = _cubit3.CI_BCTYPE_FAN |
◆ CI_BCTYPE_FIRST
| CI_BCTYPE_FIRST = _cubit3.CI_BCTYPE_FIRST |
◆ CI_BCTYPE_FORCE
| CI_BCTYPE_FORCE = _cubit3.CI_BCTYPE_FORCE |
◆ CI_BCTYPE_GAP
| CI_BCTYPE_GAP = _cubit3.CI_BCTYPE_GAP |
◆ CI_BCTYPE_HEATFLUX
| CI_BCTYPE_HEATFLUX = _cubit3.CI_BCTYPE_HEATFLUX |
◆ CI_BCTYPE_INLETVENT
| CI_BCTYPE_INLETVENT = _cubit3.CI_BCTYPE_INLETVENT |
◆ CI_BCTYPE_INTAKEFAN
| CI_BCTYPE_INTAKEFAN = _cubit3.CI_BCTYPE_INTAKEFAN |
◆ CI_BCTYPE_INTERFACE
| CI_BCTYPE_INTERFACE = _cubit3.CI_BCTYPE_INTERFACE |
◆ CI_BCTYPE_INTERIOR
| CI_BCTYPE_INTERIOR = _cubit3.CI_BCTYPE_INTERIOR |
◆ CI_BCTYPE_LAST
| CI_BCTYPE_LAST = _cubit3.CI_BCTYPE_LAST |
◆ CI_BCTYPE_LUMPMASS
| CI_BCTYPE_LUMPMASS = _cubit3.CI_BCTYPE_LUMPMASS |
◆ CI_BCTYPE_MASSFLOWINLET
| CI_BCTYPE_MASSFLOWINLET = _cubit3.CI_BCTYPE_MASSFLOWINLET |
◆ CI_BCTYPE_MATERIAL
| CI_BCTYPE_MATERIAL = _cubit3.CI_BCTYPE_MATERIAL |
◆ CI_BCTYPE_MEDIA
| CI_BCTYPE_MEDIA = _cubit3.CI_BCTYPE_MEDIA |
◆ CI_BCTYPE_MPC
| CI_BCTYPE_MPC = _cubit3.CI_BCTYPE_MPC |
◆ CI_BCTYPE_OUTFLOW
| CI_BCTYPE_OUTFLOW = _cubit3.CI_BCTYPE_OUTFLOW |
◆ CI_BCTYPE_OUTLETVENT
| CI_BCTYPE_OUTLETVENT = _cubit3.CI_BCTYPE_OUTLETVENT |
◆ CI_BCTYPE_PERIODIC
| CI_BCTYPE_PERIODIC = _cubit3.CI_BCTYPE_PERIODIC |
◆ CI_BCTYPE_PERIODICSHADOW
| CI_BCTYPE_PERIODICSHADOW = _cubit3.CI_BCTYPE_PERIODICSHADOW |
◆ CI_BCTYPE_POROUSJUMP
| CI_BCTYPE_POROUSJUMP = _cubit3.CI_BCTYPE_POROUSJUMP |
◆ CI_BCTYPE_PRESSURE
| CI_BCTYPE_PRESSURE = _cubit3.CI_BCTYPE_PRESSURE |
◆ CI_BCTYPE_PRESSUREFARFIELD
| CI_BCTYPE_PRESSUREFARFIELD = _cubit3.CI_BCTYPE_PRESSUREFARFIELD |
◆ CI_BCTYPE_PRESSUREINLET
| CI_BCTYPE_PRESSUREINLET = _cubit3.CI_BCTYPE_PRESSUREINLET |
◆ CI_BCTYPE_PRESSUREOUTLET
| CI_BCTYPE_PRESSUREOUTLET = _cubit3.CI_BCTYPE_PRESSUREOUTLET |
◆ CI_BCTYPE_RADIATOR
| CI_BCTYPE_RADIATOR = _cubit3.CI_BCTYPE_RADIATOR |
◆ CI_BCTYPE_RIGIDBODY
| CI_BCTYPE_RIGIDBODY = _cubit3.CI_BCTYPE_RIGIDBODY |
◆ CI_BCTYPE_SPRING
| CI_BCTYPE_SPRING = _cubit3.CI_BCTYPE_SPRING |
◆ CI_BCTYPE_SUPERSONICINFLOW
| CI_BCTYPE_SUPERSONICINFLOW = _cubit3.CI_BCTYPE_SUPERSONICINFLOW |
◆ CI_BCTYPE_SUPERSONICOUTFLOW
| CI_BCTYPE_SUPERSONICOUTFLOW = _cubit3.CI_BCTYPE_SUPERSONICOUTFLOW |
◆ CI_BCTYPE_SYMMETRY
| CI_BCTYPE_SYMMETRY = _cubit3.CI_BCTYPE_SYMMETRY |
◆ CI_BCTYPE_TEMPERATURE
| CI_BCTYPE_TEMPERATURE = _cubit3.CI_BCTYPE_TEMPERATURE |
◆ CI_BCTYPE_UNKNOWN
| CI_BCTYPE_UNKNOWN = _cubit3.CI_BCTYPE_UNKNOWN |
◆ CI_BCTYPE_VELOCITY
| CI_BCTYPE_VELOCITY = _cubit3.CI_BCTYPE_VELOCITY |
◆ CI_BCTYPE_VELOCITYINLET
| CI_BCTYPE_VELOCITYINLET = _cubit3.CI_BCTYPE_VELOCITYINLET |
◆ CI_BCTYPE_WALL
| CI_BCTYPE_WALL = _cubit3.CI_BCTYPE_WALL |
◆ CI_CONDUCTIVITY
| CI_CONDUCTIVITY = _cubit3.CI_CONDUCTIVITY |
◆ CI_DENSITY
| CI_DENSITY = _cubit3.CI_DENSITY |
◆ CI_ERROR
| CI_ERROR = cvar.CI_ERROR |
◆ CI_MATERIAL_FIRST
| CI_MATERIAL_FIRST = _cubit3.CI_MATERIAL_FIRST |
◆ CI_MATERIAL_LAST
| CI_MATERIAL_LAST = _cubit3.CI_MATERIAL_LAST |
◆ CI_MATERIAL_UNKNOWNPROPERTY
| CI_MATERIAL_UNKNOWNPROPERTY = _cubit3.CI_MATERIAL_UNKNOWNPROPERTY |
◆ CI_MODULUS
| CI_MODULUS = _cubit3.CI_MODULUS |
◆ CI_POISSON
| CI_POISSON = _cubit3.CI_POISSON |
◆ CI_SHEAR_MODULUS
| CI_SHEAR_MODULUS = _cubit3.CI_SHEAR_MODULUS |
◆ CI_SPECIFIC_HEAT
| CI_SPECIFIC_HEAT = _cubit3.CI_SPECIFIC_HEAT |
◆ CI_THERMAL_EXPANSION
| CI_THERMAL_EXPANSION = _cubit3.CI_THERMAL_EXPANSION |
◆ CI_ULTIMATE_STRAIN
| CI_ULTIMATE_STRAIN = _cubit3.CI_ULTIMATE_STRAIN |
◆ CI_ULTIMATE_STRENGTH
| CI_ULTIMATE_STRENGTH = _cubit3.CI_ULTIMATE_STRENGTH |
◆ CI_YIELD_STRENGTH
| CI_YIELD_STRENGTH = _cubit3.CI_YIELD_STRENGTH |
◆ CUBIT_TRI
| CUBIT_TRI = _cubit3.CUBIT_TRI |
◆ CURVE
| CURVE = _cubit3.CURVE |
◆ cvar
| cvar = _cubit3.cvar |
◆ HEX
| HEX = _cubit3.HEX |
◆ HEX20
| HEX20 = _cubit3.HEX20 |
◆ HEX21
| HEX21 = _cubit3.HEX21 |
◆ HEX26
| HEX26 = _cubit3.HEX26 |
◆ HEX27
| HEX27 = _cubit3.HEX27 |
◆ HEX8
| HEX8 = _cubit3.HEX8 |
◆ HEX9
| HEX9 = _cubit3.HEX9 |
◆ HEXSHELL
| HEXSHELL = _cubit3.HEXSHELL |
◆ INVALID_ELEMENT_TYPE
| INVALID_ELEMENT_TYPE = _cubit3.INVALID_ELEMENT_TYPE |
◆ PYRAMID
| PYRAMID = _cubit3.PYRAMID |
◆ PYRAMID13
| PYRAMID13 = _cubit3.PYRAMID13 |
◆ PYRAMID18
| PYRAMID18 = _cubit3.PYRAMID18 |
◆ PYRAMID5
| PYRAMID5 = _cubit3.PYRAMID5 |
◆ PYRAMID8
| PYRAMID8 = _cubit3.PYRAMID8 |
◆ QUAD
| QUAD = _cubit3.QUAD |
◆ QUAD4
| QUAD4 = _cubit3.QUAD4 |
◆ QUAD5
| QUAD5 = _cubit3.QUAD5 |
◆ QUAD8
| QUAD8 = _cubit3.QUAD8 |
◆ QUAD9
| QUAD9 = _cubit3.QUAD9 |
◆ SHARED_PTR_DISOWN
| SHARED_PTR_DISOWN = _cubit3.SHARED_PTR_DISOWN |
◆ SHEL
| SHEL = _cubit3.SHEL |
◆ SHELL4
| SHELL4 = _cubit3.SHELL4 |
◆ SHELL8
| SHELL8 = _cubit3.SHELL8 |
◆ SHELL9
| SHELL9 = _cubit3.SHELL9 |
◆ SPHERE_EXO
| SPHERE_EXO = _cubit3.SPHERE_EXO |
◆ SPRING
| SPRING = _cubit3.SPRING |
◆ SUPERELEMENT_TOPOLOGY
| SUPERELEMENT_TOPOLOGY = _cubit3.SUPERELEMENT_TOPOLOGY |
◆ SURFACE
| SURFACE = _cubit3.SURFACE |
◆ TETRA
| TETRA = _cubit3.TETRA |
◆ TETRA10
| TETRA10 = _cubit3.TETRA10 |
◆ TETRA14
| TETRA14 = _cubit3.TETRA14 |
◆ TETRA15
| TETRA15 = _cubit3.TETRA15 |
◆ TETRA4
| TETRA4 = _cubit3.TETRA4 |
◆ TETRA8
| TETRA8 = _cubit3.TETRA8 |
◆ TRI3
| TRI3 = _cubit3.TRI3 |
◆ TRI4
| TRI4 = _cubit3.TRI4 |
◆ TRI6
| TRI6 = _cubit3.TRI6 |
◆ TRI7
| TRI7 = _cubit3.TRI7 |
◆ TRISHELL
| TRISHELL = _cubit3.TRISHELL |
◆ TRISHELL3
| TRISHELL3 = _cubit3.TRISHELL3 |
◆ TRISHELL4
| TRISHELL4 = _cubit3.TRISHELL4 |
◆ TRISHELL6
| TRISHELL6 = _cubit3.TRISHELL6 |
◆ TRISHELL7
| TRISHELL7 = _cubit3.TRISHELL7 |
◆ TRUSS
| TRUSS = _cubit3.TRUSS |
◆ TRUSS2
| TRUSS2 = _cubit3.TRUSS2 |
◆ TRUSS3
| TRUSS3 = _cubit3.TRUSS3 |
◆ VERTEX
| VERTEX = _cubit3.VERTEX |
◆ VOLUME
| VOLUME = _cubit3.VOLUME |
◆ WEDGE
| WEDGE = _cubit3.WEDGE |
◆ WEDGE12
| WEDGE12 = _cubit3.WEDGE12 |
◆ WEDGE15
| WEDGE15 = _cubit3.WEDGE15 |
◆ WEDGE16
| WEDGE16 = _cubit3.WEDGE16 |
◆ WEDGE20
| WEDGE20 = _cubit3.WEDGE20 |
◆ WEDGE21
| WEDGE21 = _cubit3.WEDGE21 |
◆ WEDGE6
| WEDGE6 = _cubit3.WEDGE6 |
Generated on Tue Jun 9 2026 13:00:43 for Cubit Python API by