|
Cubit Python API 17.05
|
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 |
| 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 |
Functions |
|
| def | body (id_in) |
|
Retrieve a body by its ID. More... |
|
| def | brick (width, depth=-1, height=-1) |
|
Create a brick of specified width, depth, and height.
More... |
|
| def | copy_body (init_body) |
|
Create a duplicate of the specified body. More... |
|
| def | create_arc_curve (v0, v1, intermediate_point) |
|
Create an arc curve using end vertices and an
intermediate point. More... |
|
| def | create_curve (v0, v1) |
|
Create a curve between two vertices. More... |
|
| def | create_spline (points, surface_id) |
|
Create a spline curve through a sequence of 3D points on
a surface. More... |
|
| def | create_surface (curves) |
|
Create a sheet body from boundary curves. More... |
|
| def | create_vertex (x, y, z) |
|
Create a vertex at specified coordinates. More... |
|
| def | curve (id_in) |
|
Retrieve a curve object by its ID. More... |
|
| def | cylinder (height, x_radius, y_radius, top_radius) |
|
Create a cylinder or truncated cone of specified
dimensions. More... |
|
| def | get_all_cfd_bcs () |
| def | get_assembly_children (assembly_id) |
| def | get_assembly_items () |
| def | get_mesh_error_count () |
| def | get_mesh_errors () |
| def | get_top_level_assembly_items () |
| def | get_volume_CAD_material (volume_id) |
| def | get_volumes_for_node (node_name, node_instance) |
| def | move (entity, vector, preview=False) |
|
Translates an Entity by a
specified vector. More... |
|
| def | prism (height, sides, major, minor) |
|
Create a prism of the specified dimensions. More... |
|
| def | pyramid (height, sides, major, minor, top=0.0) |
|
Create a pyramid of specified dimensions. More... |
|
| def | reflect (entity, axis, preview=False) |
|
Reflects an Entity about a
specified axis (e.g., plane normal). More... |
|
| def | reset () |
|
Reset Cubit state. More... |
|
| def | scale (entity, factor, preview=False) |
|
Scales an Entity uniformly by
a specified factor. More... |
|
| def | set_element_variable (element_ids, variable_name, variables) |
|
Sets scalar variables on specified mesh elements for
Exodus export. More... |
|
| def | set_nodal_variable (node_ids, variable_name, variables) |
|
Sets scalar variables on specified mesh nodes. More... |
|
| def | sphere (radius, x_cut=0, y_cut=0, z_cut=0, inner_radius=0) |
|
Create all or part of a sphere. More... |
|
| def | subtract (tool_in, from_in, imprint_in=False, keep_old_in=False) |
|
Performs a boolean subtract operation: removes tool
bodies from target bodies. More... |
|
| def | surface (id_in) |
|
Retrieve a surface object by its ID. More... |
|
| def | sweep_curve (curves, along_curves, draft_angle, draft_type, rigid) |
|
Sweep one or more curves along a path to create sheet
bodies. More... |
|
| def | torus (center_radius, swept_radius) |
|
Create a torus of specified dimensions. More... |
|
| def | tweak_curve_offset (curves, distances, keep_old=False, preview=False) |
|
2D equivalent of tweak_surface_offset: offsets specified
curves on a sheet body. More... |
|
| def | tweak_curve_remove (curves, keep_old=False, preview=False) |
|
Removes specified curves and extends adjacent surfaces on
a sheet body. More... |
|
| def | tweak_surface_offset (surfaces, distances) |
|
Offsets specified surfaces by given distances. More... |
|
| def | tweak_surface_remove (surfaces, extend_ajoining=True, keep_old=False, preview=False) |
|
Removes specified surfaces from a body, optionally
extending adjacent surfaces. More... |
|
| def | tweak_vertex_fillet (verts, radius, keep_old=False, preview=False) |
|
2D sheet vertex chamfer: creates chamfers at specified
vertices by offsetting adjacent curves. More... |
|
| def | unite (body_in, keep_old_in=False) |
|
Performs a boolean unite operation: merges specified
bodies into one. More... |
|
| def | vertex (id_in) |
|
Retrieve a vertex object by its ID. More... |
|
| def | volume (id_in) |
|
Retrieve a volume by its ID. More... |
|
|
CubitInterface Control
|
|
| def | init (argv) |
|
Initialize the Cubit engine with optional startup
arguments. More... |
|
| def | destroy () |
|
Shut down Cubit and close the active journal file.
More... |
|
| def | set_cubit_message_handler (hdlr) |
|
Redirect Cubit output to a custom message handler.
More... |
|
| def | get_cubit_message_handler () |
|
Retrieve the current Cubit message handler. More... |
|
| def | set_exit_handler (hdlr) |
|
Set a custom exit callback for Cubit. More... |
|
| def | set_progress_handler (progress) |
|
Register a progress-bar callback handler with Cubit.
More... |
|
| def | replace_progress_handler (progress) |
|
Replace the current progress-bar callback handler and
return the old one. More... |
|
| def | set_cubit_interrupt (interrupt) |
|
Enable or disable interruptible operations in Cubit.
More... |
|
|
System Control and Data
|
|
| def | set_playback_paused_on_error (pause) |
|
Configure whether playback pauses on error. More... |
|
| def | is_playback_paused_on_error () |
|
Query whether playback is paused on error. More... |
|
| def | pause_playback () |
|
Pause journal playback immediately. More... |
|
| def | stop_playback () |
|
Stop journal playback entirely. More... |
|
| def | resume_playback () |
|
Resume a paused journal playback. More... |
|
| def | is_playback_paused () |
|
Check if journal playback is currently paused. More... |
|
| def | developer_commands_are_enabled () |
|
Check if developer commands are enabled. More... |
|
| def | get_interface (interface_name) |
|
Retrieve a Cubit interface by name. More... |
|
| def | release_interface (instance) |
|
Release a previously retrieved Cubit interface. More... |
|
| def | add_filename_to_recent_file_list (filename) |
|
Add a filename to Cubit's recent-file list in the GUI
File menu. More... |
|
| def | get_version () |
|
Retrieve the current Cubit version string. More... |
|
| def | get_revision_date () |
|
Retrieve the Cubit revision date. More... |
|
| def | get_build_number () |
|
Retrieve the Cubit build number. More... |
|
| def | get_acis_version () |
|
Retrieve the ACIS kernel version string. More... |
|
| def | get_acis_version_as_int () |
|
Retrieve the ACIS kernel version as an integer. More... |
|
| def | get_sgm_version () |
|
Retrieve the SGM (Solid Geometry Manager) version.
More... |
|
| def | get_exodus_version () |
|
Retrieve the Exodus mesh library version. More... |
|
| def | get_meshgems_version () |
|
Retrieve the MeshGems library version. More... |
|
| def | get_graphics_version () |
|
Retrieve the VTK (Visualization Toolkit) version used by
Cubit. More... |
|
| def | get_python_version () |
|
Retrieve the Python interpreter version used by Cubit.
More... |
|
| def | get_default_geometry_engine () |
|
Get the name of the default modeler engine. More... |
|
| def | is_catia_engine_available () |
|
Determine whether the CATIA geometry engine is available.
More... |
|
| def | is_acis_engine_available () |
|
Determine whether the ACIS geometry engine is available.
More... |
|
| def | is_opencascade_engine_available () |
|
Determine whether the OpenCASCADE geometry engine is
available. More... |
|
| def | is_special_build (build_type) |
|
Check if a special build type is available. More... |
|
| def | print_cmd_options () |
|
Display Cubit's supported startup options. More... |
|
| def | is_modified () |
|
Check if the model has been modified since import or last
save. More... |
|
| def | set_modified () |
|
Reset the model's modified status to "unmodified".
More... |
|
| def | is_undo_save_needed () |
|
Check if the model requires an undo checkpoint save.
More... |
|
| def | set_undo_saved () |
|
Clear the undo-needed flag for the model. More... |
|
| def | is_performing_undo () |
|
Query whether an undo operation is currently being
performed. More... |
|
| def | was_last_cmd_undoable () |
|
Report whether the last executed command was undoable.
More... |
|
| def | get_undo_enabled () |
|
Query whether undo is currently enabled. More... |
|
| def | number_undo_commands () |
|
Query the number of undoable commands in the stack.
More... |
|
| def | is_command_echoed () |
|
Check whether Cubit echoes commands to the console.
More... |
|
| def | get_command_from_history (command_number) |
|
Retrieve a specific command from Cubit's history buffer.
More... |
|
| def | get_command_history_count () |
|
Get the number of commands in Cubit's history buffer.
More... |
|
| def | get_next_command_from_history () |
|
Get the next command from the history buffer. More... |
|
| def | get_previous_command_from_history () |
|
Get the previous command from the history buffer.
More... |
|
| def | write_to_journal (words) |
|
Append a custom entry to Cubit's journal and recording
streams. More... |
|
| def | journal_commands (state) |
|
Enable or disable journaling of Cubit commands. More... |
|
| def | is_command_journaled () |
|
Query whether Cubit is journaling commands. More... |
|
| def | get_current_journal_file () |
|
Get the filename of the current journal file. More... |
|
| def | is_working_dir_set () |
|
Check if the "-workingdir" option was provided at Cubit
startup. More... |
|
| def | app_util () |
|
Return Cubit's AppUtil interface for global services.
More... |
|
| def | cgm_iface () |
|
Return the CGM-based geometry interface for Cubit.
More... |
|
| def | cgm () |
|
Return the raw CGMApp kernel instance used by Cubit.
More... |
|
|
Command Utilities
|
|
| def | cmd (input_string) |
|
Execute a raw Cubit command string immediately (modifies
model state). More... |
|
| def | silent_cmd (input_string) |
|
Execute a Cubit command without echoing or verbose
output. More... |
|
| def | print_info (message) |
|
Print a message through Cubit's messaging system.
More... |
|
| def | parse_cubit_list (type, entity_list_string) |
|
Parse a Cubit-style entity selection expression into a
list of IDs. More... |
|
| def | parse_locations (location_str) |
|
Parse a Cubit location specification into concrete 3D
coordinates. More... |
|
| def | string_from_id_list (ids) |
|
Convert a list of integers into a compact Cubit-style ID
string. More... |
|
| def | get_id_string (entity_ids, sort=True) |
|
Convert a list of integers into a compact Cubit-style ID
range string. More... |
|
| def | print_raw_help (input_line, order_dependent, consecutive_dependent) |
|
Display context-sensitive help while typing commands.
More... |
|
| def | get_error_count () |
|
Retrieve the total number of errors in the current Cubit
session. More... |
|
| def | get_cubit_digits_setting () |
|
Retrieve the current Cubit "digits" setting. More... |
|
| def | is_part_of_list (target_id, id_list) |
|
Check if an ID is present in a list of IDs. More... |
|
| def | get_last_id (entity_type) |
|
Get the ID of the last created entity of the given type.
More... |
|
| def | entity_exists (entity_type, id) |
|
Check whether an entity of the specified type and ID
exists. More... |
|
| def | get_idless_signature (entity_type, entity_id) |
|
Get the idless signature of a geometric or mesh entity.
More... |
|
| def | get_idless_signatures (entity_type, entity_id_list) |
|
Get the idless signatures of a range of geometric or mesh
entities. More... |
|
| def | get_aprepro_vars () |
|
Retrieve the current Aprepro variable names. More... |
|
| def | get_aprepro_value_as_string (variable_name) |
|
Get the string value of an Aprepro variable. More... |
|
| def | get_aprepro_numeric_value (variable_name) |
|
Get the numeric value of a specified Aprepro variable.
More... |
|
|
Graphics Viewing
|
|
| def | get_view_distance () |
|
Get the camera's distance between its position and focus
point. More... |
|
| def | get_view_at () |
|
Get the camera's current "at" (target) point. More... |
|
| def | get_view_from () |
|
Get the camera's current 'from' (position) point.
More... |
|
| def | get_view_up () |
|
Get the camera's 'up' direction vector. More... |
|
| def | reset_camera () |
|
Reset the camera view and clear auxiliary graphics
windows. More... |
|
| def | flush_graphics () |
|
Force immediate rendering of pending graphics operations.
More... |
|
| def | is_perspective_on () |
|
Check if perspective projection is enabled. More... |
|
| def | is_occlusion_on () |
|
Check if occlusion is enabled. More... |
|
| def | is_scale_visibility_on () |
|
Check if the scale annotation is visible in the graphics
window. More... |
|
| def | is_mesh_visibility_on () |
|
Check if mesh graphics are visible in the graphics
window. More... |
|
| def | is_geometry_visibility_on () |
|
Check if geometry graphics are visible in the graphics
window. More... |
|
| def | get_rendering_mode () |
|
Get the current graphics rendering mode. More... |
|
| def | set_rendering_mode (mode) |
|
Set the current graphics rendering mode (equivalent to
"Graphics Mode <option>"). More... |
|
| def | set_label_type (entity_type, label_flag) |
|
Sets label display type for a given entity type. More... |
|
| def | get_label_type (entity_type) |
|
Gets the current label display type for a given entity
type. More... |
|
|
Graphics Entity Selections
|
|
| def | clear_drawing_set (set_name) |
|
Clear all geometry in a named drawing set (e.g., mesh
preview). More... |
|
| def | unselect_entity (entity_type, entity_id) |
|
Unselect an entity that is currently selected. More... |
|
| def | get_rubberband_shape () |
|
Get the current rubberband selection shape. More... |
|
| def | is_select_partial_on () |
|
Check if partial selection is enabled. More... |
|
| def | clear_highlight () |
|
Clear all entity highlights. More... |
|
| def | clear_preview () |
|
Clear preview graphics without affecting other display
settings. More... |
|
| def | highlight (entity_type, entity_id) |
|
Highlight the given entity in the graphics window without
selecting it. More... |
|
| def | get_selected_ids () |
|
Retrieve all currently selected entity IDs in pick order.
More... |
|
| def | get_selected_id (index) |
|
Get the selected entity ID by index. More... |
|
| def | get_selected_type (index) |
|
Get the selected entity type by index. More... |
|
| def | get_pick_type () |
|
Get the current pick mode for entity selection. More... |
|
| def | set_pick_type (pick_type, silent=False) |
|
Set the current pick mode for entity selection. More... |
|
| def | set_filter_types (num_types, filter_types) |
|
Set multiple pick filter types for graphics selections.
More... |
|
| def | add_filter_type (filter_type) |
|
Add an entity type to the graphics pick filter. More... |
|
| def | remove_filter_type (filter_type) |
|
Remove an entity type from the graphics pick filter.
More... |
|
| def | is_type_filtered (filter_type) |
|
Check if a specific entity type is currently excluded
from picking. More... |
|
| def | get_pick_filters () |
|
Retrieve the list of entity types currently allowed for
picking. More... |
|
| def | clear_picked_list () |
|
Clear the list of currently picked entities. More... |
|
| def | step_next_possible_selection () |
|
Advance to the next entity in the current selection list.
More... |
|
| def | step_previous_possible_selection () |
|
Move back to the previous entity in the current selection
list. More... |
|
| def | print_current_selections () |
|
Print all selected entities and their types. More... |
|
| def | print_currently_selected_entity () |
|
Print details of the current selected entity. More... |
|
| def | current_selection_count () |
|
Get the number of entities in the current selection list.
More... |
|
|
Meshing Schemes Support
|
|
| def | get_default_element_type () |
|
Retrieve the current default element type for meshing.
More... |
|
| def | is_volume_meshable (volume_id) |
|
Check if a volume is meshable under the current meshing
scheme. More... |
|
| def | is_surface_meshable (surface_id) |
|
Check if a surface is meshable under the current meshing
scheme. More... |
|
| def | get_vertex_type (surface_id, vertex_id) |
|
Retrieve the vertex type for a given vertex on a surface.
More... |
|
| def | get_submap_corner_types (surface_id) |
|
Get a list of vertex IDs and their corner-type codes for
a surface submap. More... |
|
| def | get_curve_bias_type (curve_id) |
|
Retrieve the bias scheme type applied to a curve.
More... |
|
| def | get_curve_bias_geometric_factor (curve_id) |
|
Get the primary geometric progression factor used for
biasing a curve. More... |
|
| def | get_curve_bias_geometric_factor2 (curve_id) |
|
Get the secondary geometric progression factor for a
dual-bias curve. More... |
|
| def | get_curve_bias_first_interval_length (curve_id) |
|
Query the length of the first interval on a biased curve.
More... |
|
| def | get_curve_bias_first_interval_fraction (curve_id) |
|
Retrieve the fraction of curve length used as the first
interval size. More... |
|
| def | get_curve_bias_fine_size (curve_id) |
|
Get the "fine size" parameter for a biased curve, if set.
More... |
|
| def | get_curve_bias_coarse_size (curve_id) |
|
Get the "coarse size" parameter for a biased curve, if
set. More... |
|
| def | get_curve_bias_first_last_ratio1 (curve_id) |
|
Retrieve the ratio of first-to-last interval at the start
of a biased curve. More... |
|
| def | get_curve_bias_first_last_ratio2 (curve_id) |
|
Retrieve the ratio of first-to-last interval at the end
of a biased curve. More... |
|
| def | get_curve_bias_last_first_ratio1 (curve_id) |
|
Retrieve the ratio of last-to-first interval at the start
of a biased curve. More... |
|
| def | get_curve_bias_last_first_ratio2 (curve_id) |
|
Retrieve the ratio of last-to-first interval at the end
of a biased curve. More... |
|
| def | get_curve_bias_from_start (curve_id, value) |
|
Determine if the bias is measured from the curve's start
vertex. More... |
|
| def | get_curve_bias_from_start_set (curve_id) |
|
Check if the "bias from start" flag has been explicitly
set on a curve. More... |
|
| def | get_curve_bias_start_vertex_id (curve_id) |
|
Retrieve the vertex ID designated as the start of bias on
a curve. More... |
|
| def | get_curve_mesh_scheme_curvature (curve_id) |
|
Retrieve the curvature mesh scheme adaptation value for a
curve. More... |
|
| def | get_curve_mesh_scheme_pinpoint_locations (curve_id) |
|
Retrieve the pinpoint mesh scheme locations for a curve.
More... |
|
| def | get_mesh_scheme (geometry_type, entity_id) |
|
Retrieve the meshing scheme applied to a geometric
entity. More... |
|
| def | get_smooth_scheme (geometry_type, entity_id) |
|
Retrieve the smoothing scheme for a specified geometry
entity. More... |
|
| def | get_mesh_scheme_firmness (geometry_type, entity_id) |
|
Retrieve the meshing scheme firmness for a specified
surface or volume. More... |
|
| def | get_tetmesh_proximity_flag (volume_id) |
|
Get the proximity-layer flag for tet meshing on a volume.
More... |
|
| def | get_tetmesh_proximity_layers (volume_id) |
|
Get the number of proximity layers for tet meshing on a
volume. More... |
|
| def | get_tetmesh_growth_factor (volume_id) |
|
Get the growth factor for tet meshing on a volume.
More... |
|
| def | get_tetmesh_parallel () |
|
Get the global parallel-tetmesher flag (HPC) setting.
More... |
|
| def | get_tetmesh_num_anisotropic_layers () |
|
Get the global number of anisotropic tet layers setting.
More... |
|
| def | get_tetmesh_optimization_level () |
|
Get the global tet meshing optimization level. More... |
|
| def | get_tetmesh_insert_mid_nodes () |
|
Get the global flag indicating insertion of mid-edge
(quadratic) nodes during tet meshing. More... |
|
| def | get_tetmesh_optimize_mid_nodes () |
|
Get the global flag indicating optimization of mid-edge
nodes during tet meshing. More... |
|
| def | get_tetmesh_optimize_overconstrained_tets () |
|
Get the global flag indicating optimization of
overconstrained tetrahedra. More... |
|
| def | get_tetmesh_optimize_overconstrained_edges () |
|
Get the global flag indicating optimization of
overconstrained edges. More... |
|
| def | get_tetmesh_minimize_slivers () |
|
Get the global flag indicating minimization of sliver
tetrahedra. More... |
|
| def | get_tetmesh_minimize_interior_points () |
|
Get the global flag indicating minimization of interior
points in tet meshing. More... |
|
| def | get_tetmesh_relax_surface_constraints () |
|
Get the global flag indicating relaxation of surface mesh
constraints in tet meshing. More... |
|
| def | get_mesh_geometry_approximation_angle (geometry_type, entity_id) |
|
Get the geometry approximation angle for TriMesh/TetMesh
on a given entity. More... |
|
| def | get_trimesh_surface_gradation () |
|
Retrieve the global surface mesh gradation for the
TriMesh scheme. More... |
|
| def | get_trimesh_volume_gradation () |
|
Retrieve the global volume mesh gradation for the TriMesh
scheme. More... |
|
| def | get_trimesh_use_surface_proximity () |
|
Retrieve the global surface proximity flag for the
TriMesh scheme. More... |
|
| def | get_trimesh_surface_proximity_ratio () |
|
Retrieve the global surface proximity ratio for the
TriMesh scheme. More... |
|
| def | 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. More... |
|
| def | get_trimesh_geometry_sizing () |
|
Retrieve the global geometry sizing flag for the TriMesh
scheme. More... |
|
| def | get_trimesh_num_anisotropic_layers () |
|
Retrieve the global number of anisotropic triangle layers
for the TriMesh scheme. More... |
|
| def | get_trimesh_split_overconstrained_edges () |
|
Retrieve the global flag for splitting overconstrained
edges in the TriMesh scheme. More... |
|
| def | get_trimesh_tiny_edge_length () |
|
Retrieve the global tiny edge length for the TriMesh
scheme. More... |
|
| def | get_trimesh_ridge_angle () |
|
Retrieve the global ridge angle for the TriMesh scheme.
More... |
|
| def | get_node_constraint () |
|
Query whether node constraint is enabled (move mid-nodes
to geometry). More... |
|
| def | get_node_constraint_value () |
|
Query the numeric value of the node constraint setting.
More... |
|
| def | get_node_constraint_smart_threshold () |
|
Query the current quality threshold for smart node
constraint. More... |
|
| def | get_node_constraint_smart_metric () |
|
Query the current quality metric for smart node
constraint. More... |
|
| def | get_dbl_sculpt_default (variable) |
|
Retrieve the default value of a named sculpt parameter.
More... |
|
| def | get_int_sculpt_default (variable) |
|
Retrieve default integer-valued sculpt parameter.
More... |
|
| def | get_bool_sculpt_default (variable) |
|
Retrieve default boolean-valued sculpt parameter.
More... |
|
| def | get_string_sculpt_default (variable) |
|
Retrieve default string-valued sculpt parameter. More... |
|
|
Mesh Sizing Support
|
|
| def | get_mesh_intervals (geometry_type, entity_id) |
|
Get the mesh interval count for a specified entity.
More... |
|
| def | get_mesh_size (geometry_type, entity_id) |
|
Retrieve the effective target edge length for meshing an
entity. More... |
|
| def | get_requested_mesh_size (geometry_type, id) |
|
Retrieve the mesh size explicitly set on a geometry
entity. More... |
|
| def | has_valid_size (geometry_type, entity_id) |
|
Check whether a geometric entity has a valid size.
More... |
|
| def | get_mesh_interval_firmness (geometry_type, entity_id) |
|
Retrieve the interval firmness for a specified geometry
entity. More... |
|
| def | get_requested_mesh_interval_firmness (geometry_type, entity_id) |
|
Retrieve the explicitly requested interval firmness for a
specified entity. More... |
|
| def | get_mesh_size_type (geometry_type, entity_id) |
|
Retrieve the mesh size setting type for a specified
entity. More... |
|
| def | get_requested_mesh_size_type (geometry_type, entity_id) |
|
Retrieve the mesh size setting type explicitly requested
on a specified entity. More... |
|
| def | auto_size_needs_to_be_calculated () |
|
Check if automatic mesh sizing is outdated and needs
recomputation. More... |
|
| def | get_default_auto_size () |
|
Compute Cubit's heuristic default automatic mesh size for
the current model. More... |
|
| def | get_requested_mesh_intervals (geometry_type, entity_id) |
|
Retrieve the mesh interval count explicitly set on a
geometry entity. More... |
|
| def | is_interval_count_odd (surface_id) |
|
Check if any loop on a surface has an odd number of mesh
intervals. More... |
|
| def | get_auto_size (geometry_type, entity_id_list, auto_factor) |
|
Predict the automatic mesh size for a set of entities.
More... |
|
| def | get_element_budget (element_type, entity_id_list, auto_factor) |
|
Estimate the total element count for a set of volumes
given size settings. More... |
|
| def | get_exodus_sizing_function_variable_name () |
|
Retrieve the Exodus-based sizing function variable name.
More... |
|
| def | get_exodus_sizing_function_file_name () |
|
Retrieve the Exodus sizing function file name. More... |
|
| def | get_sizing_function_name (entity_type, entity_id) |
|
Retrieve the meshing sizing function type for a surface
or volume. More... |
|
| def | exodus_sizing_function_file_exists () |
|
Check if the Exodus sizing function file currently
exists. More... |
|
|
Mesh Query Support
|
|
| def | is_meshed (geometry_type, entity_id) |
|
Determine whether a specified geometry entity has been
meshed. More... |
|
| def | get_hex_count () |
|
Retrieve the count of hexahedral elements in the current
model. More... |
|
| def | get_pyramid_count () |
|
Retrieve the count of pyramid elements in the current
model. More... |
|
| def | get_tet_count () |
|
Retrieve the count of tetrahedral elements in the current
model. More... |
|
| def | get_quad_count () |
|
Retrieve the count of quadrilateral elements in the
current model. More... |
|
| def | get_tri_count () |
|
Retrieve the count of triangular elements in the current
model. More... |
|
| def | get_edge_count () |
|
Retrieve the count of edges between surface elements in
the current model. More... |
|
| def | get_sphere_count () |
|
Retrieve the count of sphere elements in the current
model. More... |
|
| def | get_wedge_count () |
|
Retrieve the count of wedge-shaped elements in the
current model. More... |
|
| def | get_node_count () |
|
Retrieve the count of nodes in the current model.
More... |
|
| def | get_element_count () |
|
Retrieve the count of exportable elements in the current
model. More... |
|
| def | get_volume_element_count (volume_id) |
|
Retrieve the count of 3D elements in a specified volume.
More... |
|
| def | get_surface_element_count (surface_id) |
|
Retrieve the count of elements on a specified surface.
More... |
|
| def | volume_contains_tets (volume_id) |
|
Determine whether a specified volume contains any
tetrahedral elements. More... |
|
| def | get_hex_sheet (node_id_1, node_id_2) |
|
Retrieve the IDs of all hexahedral elements forming a hex
sheet through two nodes. More... |
|
| def | get_mesh_edge_length (edge_id) |
|
Compute the length of a specified mesh edge. More... |
|
| def | get_meshed_volume_or_area (geometry_type, entity_ids) |
|
Sum mesh volumes or surface areas for CAD entities or
mesh elements. More... |
|
| def | 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. More... |
|
| def | 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. More... |
|
| def | get_quality_value (mesh_type, mesh_id, metric_name) |
|
Retrieve a specific quality metric value for a single
mesh element. More... |
|
| def | get_quality_values (mesh_type, mesh_ids, metric_name) |
|
Retrieve quality metric values for multiple mesh
elements. More... |
|
| def | calculate_timestep_estimate (entity_type, entity_ids) |
|
Estimate the time step based on element sizes and
material properties. More... |
|
| def | 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. More... |
|
| def | get_target_timestep () |
|
Return the current target time step threshold used in the
density multiplier metric. More... |
|
| def | get_overconstrained_tets_in_volumes (volumes) |
|
Retrieve IDs of overconstrained tetrahedra within
specified volumes. More... |
|
| def | best_edge_to_collapse_interior_node (node_id) |
|
Find the best edge to collapse to remove an interior node
in a triangular mesh. More... |
|
| def | get_edges_to_swap (curve_id) |
|
Get edges on triangles at a knife-edge curve that are
candidates for swapping. More... |
|
| def | get_n_largest_distances_between_meshes (n, entity_type1, ids1, entity_type2, ids2) |
|
Finds the N largest node-to-element distances between two
meshes. More... |
|
|
Geometry Topology Support
|
|
| def | get_entities (entity_type) |
|
Retrieve IDs of all current entities of a specified type
(geometry and mesh). More... |
|
| def | get_current_ids (entity_type) |
|
Retrieve IDs of all current geometry entities of a
specified type. More... |
|
| def | get_body_count () |
|
Get the current number of bodies in the model. More... |
|
| def | get_volume_count () |
|
Get the current number of volumes in the model. More... |
|
| def | get_surface_count () |
|
Get the current number of surfaces in the model. More... |
|
| def | get_curve_count () |
|
Get the current number of curves in the model. More... |
|
| def | get_vertex_count () |
|
Get the current number of vertices in the model. More... |
|
| def | get_curve_count_in_volumes (target_volume_ids) |
|
Get the current number of curves in the specified
volumes. More... |
|
| def | get_relatives (source_geometry_type, source_id, target_geom_type) |
|
Get the relatives (parents or children) of a specified
entity. More... |
|
| def | are_adjacent_surfaces (surface_ids) |
|
Return whether two or more surfaces share at least one
manifold curve. More... |
|
| def | are_adjacent_curves (curve_ids) |
|
Return whether two or more curves share at least one
manifold vertex. More... |
|
| def | get_adjacent_surfaces (geometry_type, entity_id) |
|
Get a list of surfaces adjacent to a specified surface
(including the surface itself). More... |
|
| def | get_adjacent_volumes (geometry_type, entity_id) |
|
Get a list of adjacent volumes to a specified entity.
More... |
|
| def | get_num_volume_shells (volume_id) |
|
Get the number of shells in a volume. More... |
|
| def | get_valence (vertex_id) |
|
Get the valence (number of incident edges) for a specific
vertex. More... |
|
| def | get_list_of_free_ref_entities (geometry_type) |
|
Get all free (unattached) entities of a given geometry
type. More... |
|
| def | get_owning_body (geometry_type, entity_id) |
|
Get the owning body for a specified entity. More... |
|
| def | get_owning_volume (geometry_type, entity_id) |
|
Get the owning volume for a specified entity. More... |
|
| def | get_owning_volume_by_name (entity_name) |
|
Get the owning volume for an entity by its name. More... |
|
| def | get_common_curve_id (surface_1_id, surface_2_id) |
|
Return a curve shared by two surfaces. More... |
|
| def | get_common_vertex_id (curve_1_id, curve_2_id) |
|
Return a vertex shared by two curves. More... |
|
| def | get_connected_surfaces (surf_ids) |
|
Find surfaces connected to a given set of surfaces.
More... |
|
| def | gather_surfaces_by_orientation (seed_surf_ids, all_surf_ids) |
|
Gathers surfaces connected across shared edges, forming a
surface enclosure. More... |
|
|
Geometry Attribute Support
|
|
| def | is_visible (geometry_type, entity_id) |
|
Query visibility for a specific geometry entity. More... |
|
| def | is_virtual (geometry_type, entity_id) |
|
Query whether a specified geometry entity is virtual.
More... |
|
| def | contains_virtual (geometry_type, entity_id) |
|
Query whether any child entities of a specified geometry
entity are virtual. More... |
|
| def | is_merged (geometry_type, entity_id) |
|
Check if a specified geometry entity has been merged into
another. More... |
|
| def | get_merge_setting (geometry_type, entity_id) |
|
Get merge mode ("on", "off", or "auto") for a given
entity. More... |
|
| def | get_source_surfaces (volume_id) |
|
Retrieve the list of sweep source surfaces for a
specified volume. More... |
|
| def | get_target_surfaces (volume_id) |
|
Retrieve the list of sweep target surfaces for a
specified volume. More... |
|
| def | get_entity_modeler_engine (geometry_type, entity_id) |
|
Get the modeler engine type for a specified entity.
More... |
|
| def | get_entity_name (entity_type, entity_id, no_default=False) |
|
Get the name of a specified entity. More... |
|
| def | get_entity_names (entity_type, entity_id, no_default=False, first_name_only=False) |
|
Get all names associated with a specified entity.
More... |
|
| def | set_entity_name (entity_type, entity_id, new_name) |
|
Set the name of a specified entity. More... |
|
| def | get_id_from_name (name) |
|
Retrieve the integer ID of an entity by its name.
More... |
|
| def | 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. More... |
|
| def | get_entity_color (entity_type, entity_id) |
|
Get the color of a specified entity. More... |
|
| def | get_entity_color_index (entity_type, entity_id) |
|
Get the color index of a specified entity. More... |
|
| def | is_multi_volume (body_id) |
|
Check if a body contains multiple volumes. More... |
|
| def | is_sheet_body (volume_id) |
|
Determine if a volume is a sheet body (zero thickness).
More... |
|
|
Geometry Query Support
|
|
| def | get_vertex_coordinates (entityID) |
|
Get the 3D coordinates of a vertex. More... |
|
| def | get_distance_between (vertex_id_1, vertex_id_2) |
|
Get the Euclidean distance between two vertices. More... |
|
| def | get_curve_type (curve_id) |
|
Get the curve type for a specified curve. More... |
|
| def | get_curve_length (curve_id) |
|
Get the 3D length of a specified curve. More... |
|
| def | get_arc_length (curve_id) |
|
Get the parametric (arc) length of a specified curve.
More... |
|
| def | 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. More... |
|
| def | get_curve_radius (curve_id) |
|
Compute the radius of a specified curve. More... |
|
| def | get_curve_center (curve_id) |
|
Retrieve the center point of a specified curve. More... |
|
| def | get_arc_center_radius (curve_id) |
|
Get the center point and radius of a specified arc curve.
More... |
|
| def | evaluate_exterior_angle_at_curve (curve_id, volume_id) |
|
Return the exterior angle at a single curve with respect
to a volume. More... |
|
| def | evaluate_exterior_angle (curve_list, test_angle) |
|
Find curves whose exterior angle between adjacent
surfaces is less than a given threshold. More... |
|
| def | 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.
More... |
|
| def | get_surface_type (surface_id) |
|
Get the surface type for a specified surface. More... |
|
| def | get_surface_normal (surface_id) |
|
Get the unit normal vector at the center of a specified
surface. More... |
|
| def | get_surface_normal_at_coord (surface_id, coord) |
|
Get the unit normal vector at a specified point on a
surface. More... |
|
| def | get_surface_centroid (surface_id) |
|
Get the approximate centroid of a specified surface based
on graphics faceting. More... |
|
| def | get_surface_sense (surface_id) |
|
Get the orientation ("sense") of a specified surface.
More... |
|
| def | is_surface_planer (surface_id) |
|
Query whether a specified surface is planar. More... |
|
| def | is_surface_planar (surface_id) |
| def | get_surface_area (surface_id) |
|
Get the area of a specified surface. More... |
|
| def | get_hydraulic_radius_surface_area (surface_id) |
|
Compute the hydraulic radius of a specified surface.
More... |
|
| def | get_surface_principal_curvatures (surface_id) |
|
Get the principal curvatures of a surface at its
midpoint. More... |
|
| def | evaluate_surface_angle_at_vertex (surf_id, vert_id) |
|
Return the interior angle at a vertex on a specified
surface. More... |
|
| def | 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. More... |
|
| def | 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. More... |
|
| def | print_surface_summary_stats () |
|
Print summary statistics for all surfaces in the model.
More... |
|
| def | get_volume_area (volume_id) |
|
Get the total surface area of a specified volume.
More... |
|
| def | get_volume_volume (vol_id) |
|
Get the enclosed volume of a specified volume. More... |
|
| def | get_hydraulic_radius_volume_area (volume_id) |
|
Compute the hydraulic radius of a specified volume.
More... |
|
| def | get_similar_volumes (volume_ids, tol=1e-3, use_percent_tol=True) |
|
Find volumes with similar size and face count to given
volumes. More... |
|
| def | get_bounding_box (geometry_type, entity_id) |
|
Get the axis-aligned bounding box for a specified entity.
More... |
|
| def | get_total_bounding_box (geometry_type, entity_list) |
|
Get the combined bounding box for a list of entities.
More... |
|
| def | get_tight_bounding_box (geometry_type, entity_list) |
|
Get the tight bounding box for a list of entities.
More... |
|
| def | get_total_volume (volume_list) |
|
Get the total volume for a list of volumes. More... |
|
| def | print_volume_summary_stats () |
|
Print summary statistics for all volumes in the model.
More... |
|
| def | get_center_point (entity_type, entity_id) |
|
Get the 3D center or coordinates of a specified entity.
More... |
|
| def | is_periodic (geometry_type, entity_id) |
|
Query whether a specified surface or curve is periodic.
More... |
|
| def | get_geometry_type (geom_type, ent_ids) |
|
Return the analytic geometry type for a list of surfaces
or curves. More... |
|
| def | get_distance_between_entities (geom_type_1, entity_id_1, geom_type_2, entity_id_2) |
|
Get the minimum distance between two geometry entities.
More... |
|
| def | is_point_contained (geometry_type, entity_id, xyz_point) |
|
Determine if a point is inside, outside, on, or unknown
relative to a given entity. More... |
|
| def | snap_locations_to_geometry (locations, entity_type, entity_id, tol) |
|
Snaps given XYZ locations to nearest points on specified
entity. More... |
|
| def | measure_between_entities (entity_type1, entity_id1, entity_type2, entity_id2) |
|
Returns the shortest distance between two geometry
entities and their closest points. More... |
|
| def | get_coordinate_systems_id_list () |
|
Returns a list of coordinate system IDs. More... |
|
|
Geometry-Mesh Entity Support
|
|
| def | get_geometry_node_count (entity_type, entity_id) |
|
Get the number of mesh nodes on a geometric entity.
More... |
|
| def | get_vertex_node (vertex_id) |
|
Get the node ID owned by a vertex. More... |
|
| def | get_curve_nodes (curve_id) |
|
Get the list of node IDs owned by a curve. More... |
|
| def | get_curve_edges (curve_id) |
|
Get the list of edge element IDs on a curve. More... |
|
| def | get_surface_nodes (surface_id) |
|
Get the list of node IDs owned by a surface. More... |
|
| def | get_surface_quads (surface_id) |
|
Get the list of quadrilateral (quad) element IDs on a
surface. More... |
|
| def | get_surface_tris (surface_id) |
|
Get the list of triangle (tri) element IDs on a surface.
More... |
|
| def | get_volume_nodes (volume_id) |
|
Get the list of node IDs owned by a volume. More... |
|
| def | get_volume_hexes (volume_id) |
|
Get the list of hexahedron (hex) IDs contained in a
volume. More... |
|
| def | get_volume_tets (volume_id) |
|
Get the list of tetrahedron (tet) IDs contained in a
volume. More... |
|
| def | get_volume_wedges (volume_id) |
|
Get the list of wedge IDs contained in a volume. More... |
|
| def | get_volume_pyramids (volume_id) |
|
Get the list of pyramid IDs contained in a volume.
More... |
|
| def | get_surface_num_loops (surface_id) |
|
Get the number of loops on a surface. More... |
|
| def | get_surface_loop_nodes (surface_id) |
|
Get the ordered list of node IDs on the loops of a
surface. More... |
|
| def | get_entity_sense (source_type, source_id, sideset_id) |
|
Get the sense of an entity in a sideset. More... |
|
| def | get_wrt_entity (source_type, source_id, sideset_id) |
|
Get the 'with-respect-to' entity of an item in a sideset.
More... |
|
| def | get_geometric_owner (mesh_entity_type, mesh_entity_list) |
|
Get geometric owners for a set of mesh entities. More... |
|
| def | get_geometry_owner (entity_type, entity_id) |
|
Get the geometric owner of a mesh element. More... |
|
| def | 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. More... |
|
|
Mesh Element Queries
|
|
| def | get_connectivity (entity_type, entity_id) |
|
Get the list of node IDs comprising a mesh element.
More... |
|
| def | get_expanded_connectivity (entity_type, entity_id) |
|
Get the list of node IDs for a mesh element, including
interior nodes. More... |
|
| def | get_sub_elements (entity_type, entity_id, dimension) |
|
Get the lower-dimensional entities of a
higher-dimensional mesh element. More... |
|
| def | get_node_exists (node_id) |
|
Check whether a node exists in the model. More... |
|
| def | get_exodus_id (entity_type, entity_id) |
|
Get the Global Element ID for a mesh entity. More... |
|
| def | get_element_exists (element_id) |
|
Check whether a global mesh element ID exists in the
model. More... |
|
| def | get_element_type (element_id) |
|
Get the specific mesh element type for a global element
ID. More... |
|
| def | get_element_type_id (element_id) |
|
Map a Global Element ID back to its local mesh entity ID.
More... |
|
| def | get_element_block (element_id) |
|
Get the block ID containing a given global element.
More... |
|
| def | get_global_element_id (element_type, id) |
|
Alias for get_exodus_id: get the Global Element ID for a
local mesh entity. More... |
|
| def | get_hex_global_element_id (hex_id) |
|
Get the Global Element ID for a specific hexahedral
element. More... |
|
| def | get_tet_global_element_id (tet_id) |
|
Get the Global Element ID for a specific tetrahedral
element. More... |
|
| def | get_wedge_global_element_id (wedge_id) |
|
Get the Global Element ID for a specific wedge element.
More... |
|
| def | get_pyramid_global_element_id (pyramid_id) |
|
Get the Global Element ID for a specific pyramid element.
More... |
|
| def | get_tri_global_element_id (tri_id) |
|
Get the Global Element ID for a specific triangular
element. More... |
|
| def | get_quad_global_element_id (quad_id) |
|
Get the Global Element ID for a specific quadrilateral
element. More... |
|
| def | get_edge_global_element_id (edge_id) |
|
Get the Global Element ID for a specific edge element.
More... |
|
| def | get_sphere_global_element_id (sphere_id) |
|
Get the Global Element ID for a specific node (SPHERE
element). More... |
|
| def | get_node_global_id (node_id) |
|
Get the global node ID assigned in the Exodus file for a
mesh node. More... |
|
| def | get_closest_node (x_coordinate, y_coordinate, z_coordinate) |
|
Find the mesh node closest to a given point. More... |
|
| def | get_nodal_coordinates (node_id) |
|
Get the coordinates of a mesh node. More... |
|
| def | get_node_faces (node_id) |
|
Get the IDs of all quadrilateral elements (faces)
adjacent to a node. More... |
|
| def | get_node_tris (node_id) |
|
Get the IDs of all triangular elements adjacent to a
node. More... |
|
| def | get_node_edges (node_id) |
|
Get the IDs of all edge elements adjacent to a node.
More... |
|
| def | get_node_position_fixed (node_id) |
|
Query whether a mesh node is fixed (constrained against
smoothing). More... |
|
| def | get_mesh_element_type (entity_type, entity_id) |
|
Get the mesh element type applied to a geometric entity.
More... |
|
|
Geometry Defeaturing Support
|
|
| def | get_small_curves (target_volume_ids, mesh_size) |
|
Find curves with edge length below a threshold within
given volumes. More... |
|
| def | get_smallest_curves (target_volume_ids, number_to_return) |
|
Return IDs of the smallest curves in the specified
volumes. More... |
|
| def | get_small_surfaces (target_volume_ids, area_threshold) |
|
Find surfaces with area below a given threshold. More... |
|
| def | get_small_surfaces_HR (target_volume_ids, mesh_size) |
|
Python-callable version: identify small hydraulic-radius
surfaces. More... |
|
| def | is_narrow_surface (surface_id, mesh_size) |
|
Determine if any two non-adjacent edges on the surface
form a narrow region. More... |
|
| def | get_narrow_surfaces (target_volume_ids, mesh_size) |
|
Find surfaces with narrow regions in specified volumes.
More... |
|
| def | get_small_and_narrow_surfaces (target_ids, small_area, small_curve_size) |
|
Find surfaces that are either small in area or contain
narrow regions. More... |
|
| def | get_closed_narrow_surfaces (target_ids, narrow_size) |
|
Find faces on closed surfaces whose two boundary edges
remain within a distance threshold. More... |
|
| def | get_narrow_regions (target_ids, narrow_size) |
|
Find faces containing narrow regions within specified
volumes. More... |
|
| def | get_surfs_with_narrow_regions (target_ids, narrow_size) |
|
Find surfaces with narrow regions based on edge-pair
orientation and proximity. More... |
|
| def | is_close_loop_surface (surface_id, mesh_size) |
|
Check if a surface has multiple loops closer than a given
threshold. More... |
|
| def | get_close_loops (target_volume_ids, mesh_size) |
|
Find faces with multiple loops closer than a given
threshold. More... |
|
| def | 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. More... |
|
| def | get_close_loop_thickness (surface_id) |
|
Compute the minimum separation distance between loops on
a surface. More... |
|
| def | get_small_volumes (target_volume_ids, mesh_size) |
|
Find volumes whose size is below a threshold based on
mesh size. More... |
|
| def | is_chamfer_surface (surface_id, thickness_threshold) |
|
Determine if a face's underlying surface is a chamfer.
More... |
|
| def | get_chamfer_surfaces (target_volume_ids, thickness_threshold) |
|
Get the list of chamfer surfaces for a list of volumes.
More... |
|
| def | get_chamfer_chains (surface_id) |
|
Returns the chamfer chains for a given surface. More... |
|
| def | get_chamfer_chain_collections (volume_list, thickness_threshold) |
|
Return collections of surfaces that form chamfer chains
in the specified volumes. More... |
|
| def | is_cylinder_surface (surface_id) |
|
Determine if a given face's underlying surface is a
circular cylinder. More... |
|
| def | is_blend_surface (surface_id) |
|
Determine if a face's underlying surface is a blend
(fillet). More... |
|
| def | get_blend_surfaces (target_volume_ids) |
|
Find blend (fillet) surfaces within specified volumes.
More... |
|
| def | get_small_radius_blend_surfaces (target_volume_ids, max_radius) |
|
Find blend surfaces with radius of curvature <=
max_radius. More... |
|
| def | get_blend_chains (surface_id) |
|
Returns the blend chains for a given surface. More... |
|
| def | get_blend_chain_collections (volume_list, radius_threshold) |
|
Return collections of surfaces that form blend chains in
the specified volumes. More... |
|
| def | is_cone_surface (surface_id) |
|
Determine whether a surface is a cone. More... |
|
| def | find_cone_surfaces (surface_id) |
|
Identify cone surface(s) starting from a candidate
surface. More... |
|
| def | get_cone_surfaces (target_volume_ids) |
|
Identify cone surfaces in a set of volumes. More... |
|
| def | get_surface_cone_collections (volume_list, radius_threshold=0.0) |
|
Identify collections of surfaces that comprise cones in
specified volumes. More... |
|
| def | is_cavity_surface (surface_id) |
|
Return whether the specified surface is part of a cavity.
More... |
|
| def | get_cavity_surfaces (surface_id) |
|
Return the surfaces in the cavity adjacent to the
specified surface. More... |
|
| def | 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. More... |
|
| def | is_hole_surface (surface_id, radius_threshold) |
|
Return whether the specified surface is part of a hole.
More... |
|
| def | get_hole_surfaces (surface_id) |
|
Return the surfaces in the hole adjacent to the specified
surface. More... |
|
| def | get_surface_hole_collections (volume_list, radius_threshold) |
|
Return collections of surfaces that form holes in the
specified volumes. More... |
|
| def | is_continuous_surface (surface_id, angle_tol) |
|
Return whether the surface has any adjacent continuous
surfaces. More... |
|
| def | get_continuous_surfaces (surface_id, angle_tol) |
|
Return the list of adjacent continuous surfaces. More... |
|
| def | get_continuous_curves (curve_id, angle_tol, require_two_valent=False) |
|
Return the list of adjacent continuous curves. More... |
|
| def | get_continuous_curve_collections (volume_list, angle_tolerance=-1) |
|
Returns collections of continuous curves in the given
volumes. More... |
|
| def | get_sharp_angle_vertices (target_volume_ids, upper_bound, lower_bound) |
|
Identify vertices at sharp curve angles in a set of
volumes. More... |
|
| def | get_blunt_tangency_default_depth (vert_id, angle, add_material) |
|
Computes the default depth used to blunt a tangency at a
vertex. More... |
|
| def | get_tangential_intersections (target_volume_ids, upper_bound, lower_bound) |
|
Find surfaces with tangential intersection angles outside
specified bounds. More... |
|
| def | get_coincident_vertices (target_volume_ids, high_tolerance) |
|
Find vertex pairs within a specified tolerance across
given volumes. More... |
|
| def | get_close_vertex_curve_pairs (target_volume_ids, high_tolerance) |
|
Find pairs of vertices and curves within a specified
tolerance across given volumes. More... |
|
| def | get_overlapping_surfaces_in_bodies (body_ids, filter_slivers=False) |
|
Identify overlapping surfaces between different volumes
in a set of bodies. More... |
|
| def | find_overlapping_curves (curve_ids) |
|
Identify overlapping curves in a specified list of
curves. More... |
|
| def | 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.
More... |
|
| def | get_overlapping_volumes (target_volume_ids) |
|
Identify overlapping volumes in a list of volumes.
More... |
|
| def | get_overlapping_volumes_at_volume (volume_id, compare_volumes) |
|
Identify volumes in the model that overlap a single
target volume. More... |
|
| def | get_overlapping_surfaces_at_surface (surface_id, compare_volumes, cache_overlaps=0) |
|
Identify surfaces in the model that overlap a single
target surface. More... |
|
| def | get_overlap_max_gap () |
|
Get the current maximum gap tolerance used for
calculating surface overlaps. More... |
|
| def | set_overlap_max_gap (maximum_gap) |
|
Set the maximum gap tolerance for calculating surface
overlaps. More... |
|
| def | get_overlap_min_gap () |
|
Get the current minimum gap tolerance used for
calculating surface overlaps. More... |
|
| def | set_overlap_min_gap (min_gap) |
|
Set the minimum gap tolerance for calculating surface
overlaps. More... |
|
| def | get_overlap_max_angle () |
|
Get the current maximum angle tolerance used for
calculating surface overlaps. More... |
|
| def | set_overlap_max_angle (maximum_angle) |
|
Set the maximum angle tolerance for calculating surface
overlaps. More... |
|
| def | 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. More... |
|
| def | get_nearby_volumes_at_volume (volume_id, compare_volumes, distances, progress=None) |
|
Identify nearby volumes in the model for a list of target
volumes. More... |
|
| def | get_unmerged_curves_on_shells (shell_vols, thickness) |
|
Identify unmerged curves between sheet (shell) volumes
for use in shell construction workflows. More... |
|
| def | get_mergeable_vertices (target_volume_ids) |
|
Get the list of mergeable vertices from a list of volumes
or bodies. More... |
|
| def | get_mergeable_curves (target_volume_ids) |
|
Get the list of mergeable curves from a list of volumes
or bodies. More... |
|
| def | get_mergeable_surfaces (target_volume_ids) |
|
Get the list of mergeable surfaces from a list of volumes
or bodies. More... |
|
| def | get_merge_tolerance () |
|
Return the current merge tolerance value. More... |
|
|
Geometry ITEM Solutions
|
|
| def | get_solutions_for_close_loop (surface_id, mesh_size) |
|
Retrieve recommended remedies for a close-loop surface to
resolve narrow regions. More... |
|
| def | 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.
More... |
|
| def | get_solutions_for_bad_geometry (geom_type, geom_id) |
|
Provide remedy for bad geometry via ACIS healing
(deprecated). More... |
|
| def | 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. More... |
|
| def | get_solutions_for_overlapping_surfaces (surface_id_1, surface_id_2) |
|
Suggests remedies for two overlapping surfaces on
different volumes. More... |
|
| def | get_volume_gap_solutions (surface_id_1, surface_id_2) |
|
Suggests remedies for a gap between two surfaces on
different volumes. More... |
|
| def | 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. More... |
|
| def | 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. More... |
|
| def | get_solutions_for_imprint_merge (surface_id1, surface_id2) |
|
Suggests remedies for imprint/merge when two overlapping
surfaces are on different volumes. More... |
|
| def | get_solutions_for_volumes (vol_id, small_curve_size, mesh_size) |
|
Recommend remediation operations for volumes with
features below a size threshold. More... |
|
| def | get_solutions_for_classified_volume (classification, vol_id) |
|
Suggests geometry fixes or feature operations for a
volume based on its classification. More... |
|
| def | get_solutions_for_bolt (bolt_id, insert_id, threaded_vol_id) |
|
Suggests operations for a volume classified as a bolt
using known subcomponent IDs. More... |
|
| def | get_solutions_for_bolt_hole (bearing_hole, threaded_holes) |
|
Suggests repair or modification options for a set of
concentric fastener pilot holes. More... |
|
| def | get_solutions_for_classified_surface (classification, surf_id) |
|
Suggests remedies or modifications for a classified
surface. More... |
|
| def | 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. More... |
|
| def | get_solutions_for_sheet_volumes (vol_ids, thickness) |
|
Propose surface-extension and imprint/merge operations to
connect sheet bodies. More... |
|
| def | get_solutions_for_sheet_volume_connection (args, kwargs) |
|
Propose surface-tweak, imprint, and merge operations to
bridge two sheet-volume sets. More... |
|
| def | get_solutions_for_small_surfaces (surface_id, small_curve_size, mesh_size) |
|
Recommend remedial operations on a surface already
flagged as small. More... |
|
| def | get_solutions_for_small_curves (curve_id, small_curve_size, mesh_size) |
|
Recommend remedial operations on a curve already flagged
as small. More... |
|
| def | get_solutions_for_sharp_angle_vertex (vertex_id, small_curve_size, mesh_size) |
|
Retrieve recommended remedies for a sharp angle at a
vertex. More... |
|
| def | 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. More... |
|
| def | get_solutions_for_cone_surface (surface_id) |
|
Suggests remedies for a surface classified as a cone.
More... |
|
| def | get_solutions_for_decomposition (volume_list, exterior_angle, do_imprint_merge, tolerant_imprint) |
|
Provide possible decomposition solutions for volumes
based on exterior angle criteria. More... |
|
| def | get_solutions_for_blends (surface_id) |
|
Provide possible blend removal solutions for a given
surface (and its blend chain if applicable). More... |
|
| def | get_solutions_for_cavity_surface (surface_id) |
|
Provide possible cavity removal or adjustment solutions
for a given surface (and its cavity if applicable).
More... |
|
| def | get_mesh_error_solutions (error_code) |
|
Retrieve recommended solutions and context cues for a
mesh error. More... |
|
|
Geometry Idealization Support
|
|
| def | get_reduce_bolt_core_default_dimensions (vol_id) |
|
Computes default core dimensions for a bolt volume in
reduce bolt core operation. More... |
|
| def | get_bolt_diameters (vol_ids) |
|
Get the shank diameters of specified bolt volumes.
More... |
|
| def | get_bolt_axis (vol_id) |
|
Get the normalized axis vector of a bolt volume. More... |
|
| def | get_bolt_shigley_radius (bolt_id, angle, washer_id=0) |
|
Get the equivalent Shigley frustum radius at the bolt
interface. More... |
|
| def | get_bolt_washer (bolt_id) |
|
Get the washer volume ID associated with a given bolt.
More... |
|
| def | get_bolt_coordinate_system (geom_type, id) |
|
Get local coordinate system for a bolt or bolt hole.
More... |
|
| def | get_bolt_clamped_members (vol_ids, nearby_vols, progress=None) |
|
Identify clamped members associated with a bolt. More... |
|
| def | get_bolts_in_clamped_members (geo_type, clamped_vols, candidate_bolts) |
|
Identify bolts clamping the given volumes or blocks.
More... |
|
| def | get_bolt_holes_info (geo_type, clamped_members, radius_threshold, gap_threshold) |
|
Identify concentric pilot holes across clamped members.
More... |
|
| def | get_bolt_holes (geo_type, clamped_members, radius_threshold, gap_threshold) |
|
Identify upper and lower pilot hole surfaces from clamped
members. More... |
|
| def | get_2D_sheet_volumes (vol_id) |
|
Get associated 2D sheet volumes from a reduced 3D thin
volume. More... |
|
| def | get_3D_thin_volume (vol_id) |
|
Get the original 3D thin volume associated with a 2D
sheet volume. More... |
|
|
Blocks, Sidesets, and Nodesets
|
|
| def | get_block_count () |
|
Get the current number of element blocks in the model.
More... |
|
| def | get_block_id (entity_type, entity_id) |
|
Get the element block ID associated with a geometric
entity. More... |
|
| def | get_block_ids (mesh_geometry_file_name) |
|
Get list of block IDs from a mesh geometry file. More... |
|
| def | get_block_id_list () |
|
Get a list of all active block IDs. More... |
|
| def | get_next_block_id () |
|
Get the next available block ID. More... |
|
| def | get_block_volumes (block_id) |
|
Get the list of volume IDs contained in a block. More... |
|
| def | get_block_surfaces (block_id) |
|
Get the list of surface IDs contained in a block.
More... |
|
| def | get_block_curves (block_id) |
|
Get the list of curve IDs contained in a block. More... |
|
| def | get_block_vertices (block_id) |
|
Get the list of vertex IDs contained in a block. More... |
|
| def | get_block_nodes (block_id) |
|
Get the list of node IDs contained in a block. More... |
|
| def | get_block_edges (block_id) |
|
Get the list of edge IDs contained in a block. More... |
|
| def | get_block_tris (block_id) |
|
Get the list of triangle (tri) IDs contained in a block.
More... |
|
| def | get_block_faces (block_id) |
|
Get the list of face IDs contained in a block. More... |
|
| def | get_block_pyramids (block_id) |
|
Get the list of pyramid IDs contained in a block.
More... |
|
| def | get_block_wedges (block_id) |
|
Get the list of wedge IDs contained in a block. More... |
|
| def | get_block_tets (block_id) |
|
Get the list of tetrahedron (tet) IDs contained in a
block. More... |
|
| def | get_block_hexes (block_id) |
|
Get the list of hexahedron (hex) IDs contained in a
block. More... |
|
| def | get_block_element_type (block_id) |
|
Get the element type associated with a block. More... |
|
| def | get_block_attribute_count (block_id) |
|
Get the number of attributes assigned to a block.
More... |
|
| def | get_block_element_attribute_count (block_id) |
|
Get the number of attributes defined for elements in the
specified block. More... |
|
| def | get_block_attribute_value (block_id, attribute_index) |
|
Get the value of a specific attribute for a block.
More... |
|
| def | get_block_attribute_name (block_id, attribute_index) |
|
Get the name of a specific attribute for a block.
More... |
|
| def | get_block_element_attribute_names (block_id) |
|
Get the list of attribute names associated with block
elements. More... |
|
| def | get_valid_block_element_types (block_id) |
|
Get a list of valid element types for the specified
block. More... |
|
| def | get_block_material (block_id) |
|
Get the ID of the material assigned to the specified
block. More... |
|
| def | get_blocks_with_materials () |
|
Get all block IDs and their associated material IDs.
More... |
|
| def | get_sideset_count () |
|
Get the current number of sidesets in the model. More... |
|
| def | get_sideset_id_list () |
|
Get a list of all active sideset IDs. More... |
|
| def | get_next_sideset_id () |
|
Get the next available sideset ID. More... |
|
| def | get_sideset_curves (sideset_id) |
|
Get the list of curve IDs associated with a sideset.
More... |
|
| def | get_sideset_edges (sideset_id) |
|
Get the list of edge IDs contained in a sideset. More... |
|
| def | get_sideset_surfaces (sideset_id) |
|
Get the list of surface IDs contained in a sideset.
More... |
|
| def | get_sideset_quads (sideset_id) |
|
Get the list of quadrilateral (quad) element IDs
contained in a sideset. More... |
|
| def | get_sideset_tris (sideset_id) |
|
Get the list of triangle (tri) element IDs contained in a
sideset. More... |
|
| def | get_sideset_area (sideset_id) |
|
Get the total area of a sideset. More... |
|
| def | get_sideset_element_type (sideset_id) |
|
Get the element type of a sideset. More... |
|
| def | get_nodeset_count () |
|
Get the current number of nodesets in the model. More... |
|
| def | get_nodeset_id_list () |
|
Get a list of all active nodeset IDs. More... |
|
| def | get_next_nodeset_id () |
|
Get the next available nodeset ID. More... |
|
| def | get_nodeset_volumes (nodeset_id) |
|
Get the list of volume IDs associated with a nodeset.
More... |
|
| def | get_nodeset_surfaces (nodeset_id) |
|
Get the list of surface IDs associated with a nodeset.
More... |
|
| def | get_nodeset_curves (nodeset_id) |
|
Get the list of curve IDs associated with a nodeset.
More... |
|
| def | get_nodeset_vertices (nodeset_id) |
|
Get the list of vertex IDs associated with a nodeset.
More... |
|
| def | get_nodeset_nodes (nodeset_id) |
|
Get the list of node IDs explicitly assigned to a
nodeset. More... |
|
| def | get_nodeset_nodes_inclusive (nodeset_id) |
|
Get the list of node IDs associated with a nodeset
(inclusive). More... |
|
| def | get_nodeset_node_count (nodeset_id) |
|
Get the number of nodes in a nodeset. More... |
|
| def | get_exodus_element_count (entity_id, entity_type) |
|
Get the number of elements in a Exodus entity. More... |
|
| def | get_exodus_entity_name (entity_type, entity_id) |
|
Get the name of an Exodus entity. More... |
|
| def | get_exodus_entity_type (entity_type, entity_id) |
|
Get the Exodus type of an entity. More... |
|
| def | get_exodus_entity_description (entity_type, entity_id) |
|
Get the description of an Exodus entity. More... |
|
| def | get_all_exodus_times (filename) |
|
Get all available time steps from an Exodus file.
More... |
|
| def | get_exodus_variable_names (container_type, container_id) |
|
Get the names of Exodus variables in a nodeset, sideset,
or block. More... |
|
| def | get_all_exodus_variable_names (filename, variable_type) |
|
Get all variable names of a given type from an Exodus
file. More... |
|
| def | get_exodus_variable_count (container_type, container_id) |
|
Get the number of Exodus variables in a nodeset, sideset,
or block. More... |
|
| def | get_copy_nodeset_on_geometry_copy_setting () |
|
Get the current nodeset behavior setting for geometry
copy. More... |
|
| def | get_copy_sideset_on_geometry_copy_setting () |
|
Get the current sideset behavior setting for geometry
copy. More... |
|
| def | get_copy_block_on_geometry_copy_setting () |
|
Get the current block behavior setting for geometry copy.
More... |
|
| def | set_copy_nodeset_on_geometry_copy_setting (val) |
|
Set the behavior for nodeset propagation during geometry
copy. More... |
|
| def | set_copy_sideset_on_geometry_copy_setting (val) |
|
Set the behavior for sideset propagation during geometry
copy. More... |
|
| def | set_copy_block_on_geometry_copy_setting (val) |
|
Set the behavior for block propagation during geometry
copy. More... |
|
|
Group Support
|
|
| def | get_group_groups (group_id) |
|
Retrieve direct child group IDs for a specified parent
group, if any. More... |
|
| def | get_group_volumes (group_id) |
|
Return direct child volume IDs for a specified group, if
any. More... |
|
| def | get_group_bodies (group_id) |
|
Return direct child body IDs for a specified group, if
any. More... |
|
| def | get_group_surfaces (group_id) |
|
Return direct child surface IDs for a specified group, if
any. More... |
|
| def | get_group_curves (group_id) |
|
Return direct child curve IDs for a specified group, if
any. More... |
|
| def | get_group_vertices (group_id) |
|
Return direct child vertex IDs for a specified group, if
any. More... |
|
| def | get_group_nodes (group_id) |
|
Return direct child node IDs for a specified group, if
any. More... |
|
| def | get_group_edges (group_id) |
|
Return direct child edge IDs for a specified group, if
any. More... |
|
| def | get_group_quads (group_id) |
|
Return direct child quad IDs for a specified group, if
any. More... |
|
| def | get_group_tris (group_id) |
|
Return direct child triangle IDs for a specified group,
if any. More... |
|
| def | get_group_tets (group_id) |
|
Return direct child tetrahedron IDs for a specified
group, if any. More... |
|
| def | get_group_wedges (group_id) |
|
Return direct child wedge element IDs for a specified
group, if any. More... |
|
| def | get_group_pyramids (group_id) |
|
Return direct child pyramid element IDs for a specified
group, if any. More... |
|
| def | get_group_spheres (group_id) |
|
Return direct child sphere element IDs for a specified
group, if any. More... |
|
| def | get_group_hexes (group_id) |
|
Return direct child hexahedral element IDs for a
specified group, if any. More... |
|
| def | get_next_group_id () |
|
Return the next available group ID from Cubit. More... |
|
| def | delete_all_groups () |
|
Remove all groups from the current Cubit session.
More... |
|
| def | delete_group (group_id) |
|
Delete a specific group by ID. More... |
|
| def | set_max_group_id (maximum_group_id) |
|
Reset Cubit's internal maximum group ID to a specified
value. More... |
|
| def | create_new_group () |
|
Create a new, empty group and return its ID. More... |
|
| def | remove_entity_from_group (group_id, entity_id, entity_type) |
|
Remove a specific entity from a given group. More... |
|
| def | add_entity_to_group (group_id, entity_id, entity_type) |
|
Add a specific entity to a given group. More... |
|
| def | add_entities_to_group (group_id, entity_ids, entity_type) |
|
Add a list of entities to a specified group. More... |
|
| def | group_names_ids () |
|
Retrieve names and IDs of all defined groups (excluding
the pick group). More... |
|
| def | get_mesh_group_parent_ids (element_type, element_id) |
|
Retrieve parent group IDs for a specific mesh element.
More... |
|
| def | is_mesh_element_in_group (element_type, element_id) |
|
Check if a specific mesh element belongs to any group.
More... |
|
|
Metadata Support
|
|
| def | get_assembly_classification_level () |
|
Get classification level metadata. More... |
|
| def | get_assembly_classification_category () |
|
Get classification category metadata. More... |
|
| def | get_assembly_weapons_category () |
|
Get weapons category metadata. More... |
|
| def | get_assembly_metadata (volume_id, data_type) |
|
Get metadata for a specified volume. More... |
|
| def | is_assembly_metadata_attached (volume_id) |
|
Check if metadata is attached to a volume. More... |
|
| def | get_assembly_name (assembly_id) |
|
Get the name of an assembly node. More... |
|
| def | get_assembly_path (assembly_id) |
|
Get the full path of an assembly node, identifying its
hierarchy. More... |
|
| def | get_assembly_type (assembly_id) |
|
Get the type of an assembly node ("part" or "assembly").
More... |
|
| def | get_parent_assembly_path (assembly_id) |
|
Get the path of an assembly node's parent. More... |
|
| def | get_assembly_level (assembly_id) |
|
Get the hierarchy level of an assembly node. More... |
|
| def | get_assembly_description (assembly_id) |
|
Get the description of an assembly node. More... |
|
| def | get_assembly_instance (assembly_id) |
|
Get the instance number of an assembly node. More... |
|
| def | get_parent_assembly_instance (assembly_id) |
|
Get the instance number of the parent of an assembly
node. More... |
|
| def | get_assembly_file_format (assembly_id) |
|
Get the file format from which the assembly node was
imported. More... |
|
| def | get_assembly_units (assembly_id) |
|
Get the units of measurement used in the assembly node.
More... |
|
| def | get_assembly_material_description (assembly_id) |
|
Get the material description for a part. More... |
|
| def | get_assembly_material_specification (assembly_id) |
|
Get the material specification for a part. More... |
|
|
Non-Exodus Boundary Condition Support
|
|
| def | get_bc_id_list (bc_type_enum) |
|
Get active boundary condition (BC) IDs of a specified
type. More... |
|
| def | get_bc_name (bc_type_enum, bc_id) |
|
Get the name of a specific boundary condition (BC).
More... |
|
| def | get_nodeset_id_list_for_bc (bc_type_enum, bc_id) |
|
Get list of nodeset IDs associated with a boundary
condition. More... |
|
| def | get_sideset_id_list_for_bc (bc_type_enum, bc_id) |
|
Get list of sideset IDs associated with a boundary
condition. More... |
|
| def | is_on_thin_shell (bc_type_enum, entity_id) |
|
Check if a boundary condition is applied to a thin shell.
More... |
|
| def | temperature_is_on_solid (bc_type_enum, entity_id) |
|
Check if a temperature BC is applied to a solid region.
More... |
|
| def | convection_is_on_solid (entity_id) |
|
Check if a convection BC is on a solid. More... |
|
| def | convection_is_on_shell_area (entity_id, shell_area_enum) |
|
Check if a convection BC is on a shell top or bottom.
More... |
|
| def | get_convection_coefficient (entity_id, bc_type_enum) |
|
Get convection coefficient from a convection BC. More... |
|
| def | get_bc_temperature (bc_type_enum, entity_id, temp_type_enum) |
|
Get the temperature value for a specified BC area.
More... |
|
| def | temperature_is_on_shell_area (bc_type_enum, bc_area_enum, entity_id) |
|
Check if a temperature BC is on a shell area. More... |
|
| def | heatflux_is_on_shell_area (bc_area_enum, entity_id) |
|
Check if a heatflux BC is on a shell area. More... |
|
| def | get_heatflux_on_area (bc_area_enum, entity_id) |
|
Get the heatflux value on a specified area. More... |
|
| def | get_cfd_type (entity_id) |
|
Get the CFD boundary condition subtype. More... |
|
| def | get_contact_pair_friction_value (entity_id) |
|
Get the friction value for a contact pair. More... |
|
| def | get_contact_pair_tolerance_value (entity_id) |
|
Get the upper bound tolerance for a contact pair.
More... |
|
| def | get_contact_pair_tol_lower_value (entity_id) |
|
Get the lower bound tolerance for a contact pair.
More... |
|
| def | get_contact_pair_tied_state (entity_id) |
|
Get the tied state of a contact pair. More... |
|
| def | get_contact_pair_general_state (entity_id) |
|
Get the general contact state. More... |
|
| def | get_contact_pair_exterior_state (entity_id) |
|
Get the exterior state of a contact pair. More... |
|
| def | get_velocity_combine_type (entity_id) |
|
Get the velocity's combine type. More... |
|
| def | get_acceleration_combine_type (entity_id) |
|
Get the combine method for an acceleration BC. More... |
|
| def | get_displacement_combine_type (entity_id) |
|
Get the combine method for a displacement BC. More... |
|
| def | get_pressure_value (entity_id) |
|
Get the magnitude value of a pressure BC. More... |
|
| def | get_pressure_function (entity_id) |
|
Get the function expression associated with a pressure
BC. More... |
|
| def | get_force_magnitude (entity_id) |
|
Get the force magnitude of a force BC. More... |
|
| def | get_moment_magnitude (entity_id) |
|
Get the moment magnitude of a force BC. More... |
|
| def | get_force_direction_vector (entity_id) |
|
Get the direction vector of a force BC. More... |
|
| def | get_force_moment_vector (entity_id) |
|
Get the moment vector of a force BC. More... |
|
| def | get_constraint_type (constraint_id) |
|
Get the type of a specified constraint. More... |
|
| def | get_constraint_reference_point (constraint_id) |
|
Get the reference point of a specified constraint.
More... |
|
| def | get_constraint_dependent_entity_point (constraint_id) |
|
Get the dependent entity of a specified constraint.
More... |
|
| def | get_material_property (material_property_enum, entity_id) |
|
Get the value of a material property. More... |
|
| def | get_media_property (entity_id) |
|
Get the media classification of a material. More... |
|
| def | get_media_name_list () |
|
Get list of all CFD media names. More... |
|
| def | get_material_name_list () |
|
Get list of all material names. More... |
|
| def | get_material_name (material_id) |
|
Get the name of a material or CFD media by ID. More... |
|
|
Boundary Layer Support
|
|
| def | get_next_boundary_layer_id () |
|
Get the next available boundary layer ID. More... |
|
| def | is_boundary_layer_id_available (boundary_layer_id) |
|
Check if a boundary layer ID is currently available.
More... |
|
| def | get_boundary_layer_algorithm (boundary_layer_id) |
|
Get the algorithm type used by the specified boundary
layer. More... |
|
| def | get_boundary_layers_by_base (base_type, base_id) |
|
Get all boundary layers associated with a specified base
entity. More... |
|
| def | get_boundary_layers_by_pair (base_type, base_id, parent_id) |
|
Get all boundary layers associated with a base-parent
pair. More... |
|
| def | get_boundary_layer_continuity (boundary_layer_id) |
|
Get the continuity setting of a boundary layer. More... |
|
| def | get_boundary_layer_id_list () |
|
Get a list of all defined boundary layer IDs. More... |
|
|
Machine Learning Support
|
|
| def | load_ML (args, kwargs) |
|
Load machine learning training data into memory. More... |
|
| def | unload_ML (args, kwargs) |
|
Unload machine learning training data from memory.
More... |
|
| def | get_ML_operation_features (ml_op_names, entity1_ids, entity2_ids, params, mesh_size, reduced_features=False) |
|
Compute ML feature vectors for a list of Cubit
operations. More... |
|
| def | get_ML_features (ml_op_names, entity1_ids, entity2_ids, params, mesh_size, reduced_features=False) |
|
Compute ML feature vectors for operations permitting
multiple entities. More... |
|
| def | get_ML_predictions (ml_op_names, entity1_ids, entity2_ids, params, mesh_size, reduced_features=False) |
|
Compute ML predictions for a list of operations on
single-entity pairs. More... |
|
| def | do_ML_predictions (ml_op_names, entity1_ids, entity2_ids, params, mesh_size, reduced_features=False) |
|
Compute ML predictions for a list of operations with
multiple entities. More... |
|
| def | get_ML_classification (geom_type, ent_id) |
|
Get the top classification label for a single volume or
surface. More... |
|
| def | get_ML_classifications (geom_type, ent_ids) |
|
Classify multiple volumes or surfaces in a single batch
operation. More... |
|
| def | get_ML_classification_categories (geom_type) |
|
Retrieve all available classification categories for a
geometry type. More... |
|
| def | ML_train (geom_type) |
|
Force retraining of the ML classification model for a
specific geometry type. More... |
|
| def | get_ML_operation_feature_types (ml_op_name, reduced_features=False) |
|
Get the data-type descriptor for each feature of a
specified ML operation. More... |
|
| def | get_ML_operation_feature_names (ml_op_name, reduced_features=False) |
|
Retrieve the list of feature names for a specified ML
operation. More... |
|
| def | get_ML_operation_feature_size (ml_op_name, reduced_features=False) |
|
Retrieve the expected feature-vector length for a given
ML operation. More... |
|
| def | get_ML_operation_label_size (ml_op_name) |
|
Retrieve the expected label vector length for a given ML
operation. More... |
|
| def | get_ML_classification_models () |
|
Retrieve the list of supported classification ML model
names. More... |
|
| def | get_ML_regression_models () |
|
Retrieve the list of supported regression ML model names.
More... |
|
| def | get_ML_model_name (model_ID) |
|
Retrieve the name of an ML model based on its ID.
More... |
|
| def | get_ML_model_ID (model_name) |
|
Retrieve the unique numeric ID for a given ML model or
operation name. More... |
|
| def | get_ML_operation (op_name, entity_id1, entity_id2, params, small_curve_size, mesh_size) |
|
Generate the command, display label, and preview text for
an ML operation. More... |
|
| def | get_ML_feature_importances (op_name) |
|
Retrieve feature importance scores for a given ML
operation. More... |
|
| def | get_ML_feature_distance (op_name, f1, f2) |
|
Compute the weighted distance between two feature
vectors. More... |
|
| def | set_ML_base_user_dir (path, print_info=False) |
|
Set the root directory for user-provided ML training data
(classification only). More... |
|
| def | get_ML_initialize_surviving_entities (op_name, ent1, ent2) |
|
Capture entities for survival tracking before a CAD
operation. More... |
|
| def | get_ML_surviving_entities (op_name, begin_ents) |
|
Identify which entities survive after a CAD operation.
More... |
|
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 | |
| WEDGE15 = _cubit3.WEDGE15 | |
| WEDGE16 = _cubit3.WEDGE16 | |
| WEDGE20 = _cubit3.WEDGE20 | |
| WEDGE21 = _cubit3.WEDGE21 | |
| WEDGE6 = _cubit3.WEDGE6 | |
| def cubit.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
| 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: string |
| entity_type | Type of the entities (e.g., "vertex", "curve",
"surface", "volume"). Only geometric entities are
supported. return type of : void |
| def cubit.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
| group_id | ID of the group to which the entity will be
added. type of entity_id: int |
| entity_id | ID of the entity to add. type of entity_type: string |
| entity_type | Type of the entity (e.g., "vertex", "curve",
"surface", "volume"). Only geometric entities are
supported. return type of : void |
| def cubit.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
| filename | Reference to the file path string to add to the recent-file list. |
| def cubit.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
| filter_type | Entity type to add to the pickable set (e.g., "vertex", "curve", "surface", "volume", "node", "edge", "face"). |
| def cubit.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 >
| def cubit.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 > >
| curve_ids | IDs of curves to query. return type of : boolean |
| def cubit.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 > >
| surface_ids | IDs of surfaces to query. return type of : boolean |
| def cubit.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
| def cubit.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
| node_id | ID of the interior mesh node to remove. return type of : int |
| def cubit.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
| id_in | ID of the body to retrieve. return type of : :py:class: Body |
| def cubit.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
| width | Width of the brick (or cube side length if only
this argument is supplied). type of depth: float, in, optional |
| depth | Depth of the brick (default = -1, uses
width).type of height: float, in, optional |
| height | Height of the brick (default = -1, uses
width).return type of : :py:class: Body |
| def cubit.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
| 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 |
| def cubit.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
| 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: float |
| density | Material density. type of youngs_modulus: float |
| youngs_modulus | Young's modulus. type of poissons_ratio: float |
| poissons_ratio | Poisson's ratio. return type of : float |
| def cubit.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
| def cubit.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
| def cubit.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
| set_name | Name of the drawing set to clear. |
| def cubit.clear_highlight | ( | ) |
Clear all entity highlights.
Removes highlights and selections from every entity in the graphics window.
.. code-block:: python
| def cubit.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
| def cubit.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
| def cubit.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
| input_string | Null-terminated C string containing the
complete Cubit command. return type of : boolean |
| def cubit.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
| geometry_type | The type of geometry ("curve", "surface",
"volume", etc.). type of entity_id: int |
| entity_id | The ID of the entity to query. return type of : boolean |
| def cubit.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
| entity_id | ID of the BC. type of shell_area_enum: int |
| shell_area_enum | Use CI_BCEntityTypes: 7 for top, 8 for
bottom. return type of : boolean |
| def cubit.convection_is_on_solid | ( | entity_id | ) |
Check if a convection BC is on a solid.
type of entity_id: int
| entity_id | ID of the convection boundary condition. return type of : boolean |
| def cubit.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
| init_body |
Body object to
duplicate. type of init_body: :py:class: Body,
in
|
| init_body |
Body object to
duplicate. return type of : :py:class: Body
|
| def cubit.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
| v0 | The start vertex of the arc. type of v1: :py:class: Vertex,
in |
| v1 | The end vertex of the arc. type of intermediate_point: std::array< double,3 >, in |
| intermediate_point | Array of three coordinates representing a point
on the arc. return type of : :py:class: Curve |
| def cubit.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
| v0 | The start vertex of the curve. type of v1: :py:class: Vertex,
in |
| v1 | The end vertex of the curve. return type of : :py:class: Curve |
| def cubit.create_new_group | ( | ) |
Create a new, empty group and return its ID.
.. code-block:: python
@n return type of : int
| def cubit.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
| points | Ordered list of 3D coordinates (each array
length = 3); must contain at least two
points. type of surface_id: int, in |
| surface_id | ID of the surface onto which points are
projected; must be a valid surface ID. return type of : :py:class: Curve |
surface_id does not correspond
to an existing surface.
| def cubit.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
| curves |
List of Curve objects
forming a closed boundary loop. return type of : :py:class: Body
|
| def cubit.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
| x | X-coordinate of the vertex (default = 0). type of y: float, in |
| y | Y-coordinate of the vertex (default = 0). type of z: float, in |
| z | Z-coordinate of the vertex (default = 0). return type of : :py:class: Vertex |
| def cubit.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
| def cubit.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
| id_in | ID of the curve to retrieve. return type of : :py:class: Curve |
| def cubit.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
| height | Height of the cylinder. type of x_radius: float, in |
| x_radius | Radius in the x direction (base ellipse
x-axis). type of y_radius: float, in |
| y_radius | Radius in the y direction (base ellipse
y-axis). type of top_radius: float, in |
| top_radius | Radius at the top: 0 for cone, equal to x and y
radii for straight cylinder. return type of : :py:class: Body |
| def cubit.delete_all_groups | ( | ) |
Remove all groups from the current Cubit session.
.. code-block:: python
@n return type of : void
| def cubit.delete_group | ( | group_id | ) |
Delete a specific group by ID.
.. code-block:: python
@n type of group_id: int
| group_id | ID of the group to delete. return type of : void |
| def cubit.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
| def cubit.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
| def cubit.do_ML_predictions | ( | ml_op_names, | |
| entity1_ids, | |||
| entity2_ids, | |||
| params, | |||
| 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.
type of ml_op_names: std::vector<
std::string,std::allocator< std::string > >
| 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 mesh_size: float |
| mesh_size | Target mesh size used in feature
calculation. type of reduced_features: boolean, optional |
| reduced_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 > > > > |
.. code-block:: python
| def cubit.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
| entity_type | Type of the entity being queried (e.g.
"surface", "curve", "volume"). type of id: int |
| id | ID of the entity. return type of : boolean |
true if the entity exists,
false otherwise.| def cubit.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 > >
| curve_list | Vector of curve IDs to test. type of test_angle: float |
| test_angle | Exterior angle threshold in degrees; curves
with exterior angle < test_angle are
returned. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| curve_id | ID of the curve. type of volume_id: int |
| volume_id | ID of the volume. return type of : float |
| def cubit.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
| surf_id | ID of the surface. type of vert_id: int |
| vert_id | ID of the vertex on that surface. return type of : float |
| def cubit.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
| def cubit.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
| surface_id |
Surface ID
to test as a candidate cone. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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 > >
| 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 > > > > |
| def cubit.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
| def cubit.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 > >
| 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 > > |
| def cubit.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
| vol_id |
Volume ID
representing the 3D thin volume. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| vol_id |
Volume ID
representing a 2D sheet volume. return type of : int |
| def cubit.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
| entity_id | ID of the acceleration BC. return type of : string |
| def cubit.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
| def cubit.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
| def cubit.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
| geometry_type | The type of the entity ("surface" for this
function). type of entity_id: int |
| entity_id | ID of the surface to query. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| geom_type | Specifies the geometry type of the entity type of entity_id: int |
| entity_id | Specifies the id of the entity return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_all_cfd_bcs | ( | ) |
| def cubit.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
| filename | Fully qualified Exodus II file name. return type of : std::vector< double,std:: allocator< double > > |
| def cubit.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:
= 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
| filename | Fully qualified Exodus II file name. type of variable_type: string |
| variable_type | Variable type: 'g' (global), 'n' (nodal), or
'e' (element). return type of : std::vector< std::string,std::allocator< std:: string > > |
| def cubit.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
.. code-block:: python
@n type of mesh_entity_type: string
| mesh_entity_type | Mesh entity type: quad, face, tri, hex, tet,
edge, or node. type of mesh_entity_list: string |
| mesh_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 > > |
| def cubit.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
| geo_type | Geometry entity type ("vertex", "curve",
"surface", or "volume"). type of name: string |
| name | Prefix of the entity names to search for. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| variable_name | Name of the Aprepro variable to query. return type of : float |
| def cubit.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
| variable_name | Name of the Aprepro variable to query. return type of : string |
| def cubit.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 > >
| def cubit.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
| curve_id | ID of the RefEdge to query. return type of : std:: array< double,4 > |
| def cubit.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
| curve_id | ID of the curve to query. return type of : float |
| def cubit.get_assembly_children | ( | assembly_id | ) |
| def cubit.get_assembly_classification_category | ( | ) |
Get classification category metadata.
return type of : string
| def cubit.get_assembly_classification_level | ( | ) |
Get classification level metadata.
return type of : string
| def cubit.get_assembly_description | ( | assembly_id | ) |
Get the description of an assembly node.
type of assembly_id: int
| assembly_id | ID of the assembly node. return type of : string |
| def cubit.get_assembly_file_format | ( | assembly_id | ) |
Get the file format from which the assembly node was imported.
type of assembly_id: int
| assembly_id | ID of the assembly node. return type of : string |
| def cubit.get_assembly_instance | ( | assembly_id | ) |
Get the instance number of an assembly node.
Distinguishes nodes with the same name.
type of assembly_id: int
| assembly_id | ID of the assembly node. return type of : int |
| def cubit.get_assembly_items | ( | ) |
| def cubit.get_assembly_level | ( | assembly_id | ) |
Get the hierarchy level of an assembly node.
Level 0 is the root.
type of assembly_id: int
| assembly_id | ID of the assembly node. return type of : int |
| def cubit.get_assembly_material_description | ( | assembly_id | ) |
Get the material description for a part.
type of assembly_id: int
| assembly_id | ID of the part node. return type of : string |
| def cubit.get_assembly_material_specification | ( | assembly_id | ) |
Get the material specification for a part.
type of assembly_id: int
| assembly_id | ID of the part node. return type of : string |
| def cubit.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
| volume_id | ID of the volume. type of data_type: int |
| data_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 |
| def cubit.get_assembly_name | ( | assembly_id | ) |
Get the name of an assembly node.
type of assembly_id: int
| assembly_id | ID of the assembly node. return type of : string |
| def cubit.get_assembly_path | ( | assembly_id | ) |
Get the full path of an assembly node, identifying its hierarchy.
type of assembly_id: int
| assembly_id | ID of the assembly node. return type of : string |
| def cubit.get_assembly_type | ( | assembly_id | ) |
Get the type of an assembly node ("part" or "assembly").
type of assembly_id: int
| assembly_id | ID of the assembly node. return type of : string |
| def cubit.get_assembly_units | ( | assembly_id | ) |
Get the units of measurement used in the assembly node.
type of assembly_id: int
| assembly_id | ID of the assembly node. return type of : string |
| def cubit.get_assembly_weapons_category | ( | ) |
Get weapons category metadata.
return type of : string
| def cubit.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
| 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: float |
| auto_factor | The factor n used in size auto factor
n.return type of : float |
| def cubit.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
| 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 > > |
| def cubit.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
| bc_type_enum | BC type enum (CI_BCTypes). type of bc_id: int |
| bc_id | ID of the boundary condition. return type of : string |
| def cubit.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
| bc_type_enum | BC type (temperature = 4, convection =
7). type of entity_id: int |
| entity_id | ID of the BC. type of temp_type_enum: int |
| temp_type_enum | CI_BCEntityTypes for area: 2 (solid
convection), 3 (solid temp), 7 (top), 8 (bottom), 9
(gradient), 10 (middle). return type of : float |
| def cubit.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 > >
| volume_list | List of volume IDs to query. type of radius_threshold: float |
| radius_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 > > > |
| def cubit.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
| 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 > > > > |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| block_id | The ID of the block to query. return type of : int |
| def cubit.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
| block_id | ID of the block. type of attribute_index: int |
| attribute_index | Index of the attribute (1-based). return type of : string |
| def cubit.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
| block_id | ID of the block. type of attribute_index: int |
| attribute_index | Index of the attribute (1-based). return type of : float |
| def cubit.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
| def cubit.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
| block_id | ID of the block to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| block_id | ID of the block to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| block_id | The ID of the block. return type of : int |
| def cubit.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
| block_id | ID of the block. return type of : std::vector< std::string,std::allocator< std:: string > > |
| def cubit.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
| block_id | ID of the block to query. return type of : string |
| def cubit.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
| block_id | ID of the block to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| block_id | ID of the block to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| entity_type | Type of the entity: "curve", "surface", or
"volume". type of entity_id: int |
| entity_id | ID of the entity. return type of : int |
| def cubit.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 > >
| def cubit.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
| mesh_geometry_file_name | Fully qualified name of a mesh geometry file
(Exodus II format). return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| block_id | ID of the block. return type of : int |
| def cubit.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
| block_id | ID of the block to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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.
.. code-block:: python
for pyr_id in pyramid_ids: print(f" Pyramid ID: {pyr_id}")
@n type of block_id: int
| block_id | ID of the block to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| block_id | ID of the block to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| block_id | ID of the block to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| block_id | ID of the block to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| block_id | ID of the block to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| block_id | ID of the block to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| block_id | ID of the block to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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 > > > >
| def cubit.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
| vert_id | ID of the vertex to modify. type of angle: float |
| angle | Desired target angle after blunting. type of add_material: boolean |
| add_material |
If true, material is added; if false, material is
removed.
@n return type of : float |
| def cubit.get_body_count | ( | ) |
Get the current number of bodies in the model.
.. code-block:: python
@n return type of : int
| def cubit.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
| vol_id |
Volume ID
representing a bolt geometry. return type of : std::vector< double,std:: allocator< double > > |
| def cubit.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:
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 > >
| 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,
optional |
| progress |
Optional CubitProgressHandler
for monitoring progress. return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > > |
| def cubit.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
| geom_type | "bolt" for bolt volume or "hole" for hole
surface. type of id: int |
| id |
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 > > > > |
| def cubit.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
> >
| vol_ids |
Volume IDs
representing bolt geometries. return type of : std::vector< double,std:: allocator< double > > |
| def cubit.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
| 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: float |
| radius_threshold | Maximum radius for a hole to be
considered. type of gap_threshold: float |
| gap_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 > > > > |
| def cubit.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
| 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: float |
| radius_threshold | Maximum hole radius to be considered a pilot
hole. type of gap_threshold: float |
| gap_threshold |
Maximum gap between concentric holes to be
treated as aligned.
@n return type of : std::vector< BoltHoleInfo,std:: allocator< BoltHoleInfo > > |
| def cubit.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
| bolt_id | ID of the bolt volume entity. type of washer_id: int, optional |
| washer_id | Optional ID of the washer entity in the
bolt-washer mechanism (use 0 if none). type of angle: float |
| angle | Cone half-angle in degrees (typical value is
30). return type of : float |
| def cubit.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
| bolt_id | The ID of the bolt whose washer volume ID is
requested. return type of : int |
| def cubit.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
| 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 > > |
| def cubit.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
type of variable: string
| variable | Name of the sculpt parameter substring. return type of : boolean |
| def cubit.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
| boundary_layer_id | ID of the boundary layer. return type of : string |
| def cubit.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
| boundary_layer_id | ID of the boundary layer. return type of : boolean |
| def cubit.get_boundary_layer_id_list | ( | ) |
Get a list of all defined boundary layer IDs.
return type of : std::vector< int,std:: allocator<
int > >
| def cubit.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
| base_type | Type of base entity (e.g., "surface",
"volume"). type of base_id: int |
| base_id | ID of the base entity. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| base_type | Type of base entity (e.g., "surface",
"volume"). type of base_id: int |
| base_id | ID of the base entity. type of parent_id: int |
| parent_id | ID of the parent entity. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| geometry_type | Specifies the geometry type ("body", "volume",
"surface", "curve", or "vertex"). type of entity_id: int |
| entity_id | ID of the entity. return type of : std:: array< double,10 > |
Title: Array contents
| def cubit.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
| def cubit.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
| surface_id |
Surface ID
that is part of a cavity. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| entity_type |
Entity type:
"body", "volume", "surface", "curve", "vertex",
"node", "edge", "face", "tri", "quad", "hex",
"tet", "wedge", "pyramid", or "sphere". type of entity_id: int |
| entity_id | ID of the entity to query. return type of : std:: array< double,3 > |
| def cubit.get_cfd_type | ( | entity_id | ) |
Get the CFD boundary condition subtype.
type of entity_id: int
| entity_id | ID of the CFD boundary condition. return type of : int |
| def cubit.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 > >
| volume_list | List of volume IDs to query. type of thickness_threshold: float |
| thickness_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 > > > |
| def cubit.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
| 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 > > > > |
| def cubit.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 > >
| target_volume_ids | List of volume ids to examine. type of thickness_threshold: float |
| thickness_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 > > > > |
| def cubit.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
| surface_id | ID of the surface to measure. return type of : float |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. type of mesh_size: float |
| mesh_size | Distance threshold for loop separation. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. type of mesh_size: float |
| mesh_size | Distance threshold for loop separation. type of genus: int |
| genus | 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 > > > > |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. type of high_tolerance: float |
| high_tolerance | Distance threshold below which a vertex and a
curve are considered close. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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:
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 > >
| target_ids | Vector of volume IDs whose faces are
checked. type of narrow_size: float |
| narrow_size | Distance threshold for edge proximity. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| x_coordinate | X coordinate of the query point. type of y_coordinate: float |
| y_coordinate | Y coordinate of the query point. type of z_coordinate: float |
| z_coordinate | Z coordinate of the query point. return type of : int |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. type of high_tolerance: float |
| high_tolerance | Distance threshold below which two vertices are
considered coincident. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| command_number | Zero-based index into the history buffer. return type of : string |
| def cubit.get_command_history_count | ( | ) |
Get the number of commands in Cubit's history buffer.
.. code-block:: python
@n return type of : int
| def cubit.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
| surface_1_id | ID of the first surface. type of surface_2_id: int |
| surface_2_id | ID of the second surface. return type of : int |
| def cubit.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
| curve_1_id | ID of the first curve. type of curve_2_id: int |
| curve_2_id | ID of the second curve. return type of : int |
| def cubit.get_cone_surfaces | ( | target_volume_ids | ) |
Identify cone surfaces in a set of volumes.
This function returns the surfaces that represent cones defined by a conic surface and a hard point in the specified volumes.
The function is callable from both C++ and Python.
.. code-block:: python
@n type of target_volume_ids: std::vector< int,std::allocator< int > >
| target_volume_ids | List of volume IDs to analyze. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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:
.. code-block:: python
| surface_ids | IDs of the surfaces to start from. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| entity_type | Mesh element type (e.g., "hex", "tet", "tri",
"quad"). type of entity_id: int |
| entity_id | ID of the mesh element. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_constraint_dependent_entity_point | ( | constraint_id | ) |
Get the dependent entity of a specified constraint.
type of constraint_id: int
| constraint_id | ID of the constraint. return type of : string |
| def cubit.get_constraint_reference_point | ( | constraint_id | ) |
Get the reference point of a specified constraint.
type of constraint_id: int
| constraint_id | ID of the constraint. return type of : string |
| def cubit.get_constraint_type | ( | constraint_id | ) |
Get the type of a specified constraint.
type of constraint_id: int
| constraint_id | ID of the constraint. return type of : string |
| def cubit.get_contact_pair_exterior_state | ( | entity_id | ) |
Get the exterior state of a contact pair.
type of entity_id: int
| entity_id | ID of the contact pair. return type of : boolean |
| def cubit.get_contact_pair_friction_value | ( | entity_id | ) |
Get the friction value for a contact pair.
type of entity_id: int
| entity_id | ID of the contact pair. return type of : float |
| def cubit.get_contact_pair_general_state | ( | entity_id | ) |
Get the general contact state.
type of entity_id: int
| entity_id | ID of the contact pair. return type of : boolean |
| def cubit.get_contact_pair_tied_state | ( | entity_id | ) |
Get the tied state of a contact pair.
type of entity_id: int
| entity_id | ID of the contact pair. return type of : boolean |
| def cubit.get_contact_pair_tol_lower_value | ( | entity_id | ) |
Get the lower bound tolerance for a contact pair.
type of entity_id: int
| entity_id | ID of the contact pair. return type of : float |
| def cubit.get_contact_pair_tolerance_value | ( | entity_id | ) |
Get the upper bound tolerance for a contact pair.
type of entity_id: int
| entity_id | ID of the contact pair. return type of : float |
| def cubit.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 > >
| volume_list | List of volume IDs to query. type of angle_tolerance: float, optional |
| angle_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 > > > |
| def cubit.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
| curve_id |
Curve ID to
query. type of angle_tol: float |
| angle_tol | Angle tolerance for continuity (degrees). type of require_two_valent: boolean, optional |
| require_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 > > |
| def cubit.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
| surface_id |
Surface ID
to query. type of angle_tol: float |
| angle_tol | Angle tolerance for continuity (degrees). return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_convection_coefficient | ( | entity_id, | |
| bc_type_enum | |||
| ) |
Get convection coefficient from a convection BC.
type of entity_id: int
| entity_id | ID of the convection BC. type of bc_type_enum: int |
| bc_type_enum | CI_BCEntityTypes: 1 (normal), 5 (shell top), 6
(shell bottom). return type of : float |
| def cubit.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 > >
| def cubit.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:
.. code-block:: python
@n return type of : string
| def cubit.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:
.. code-block:: python
@n return type of : string
| def cubit.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:
.. code-block:: python
@n return type of : string
| def cubit.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
| def cubit.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`
| def cubit.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
| entity_type | Geometry entity type: "body", "volume",
"surface", "curve", or "vertex". return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| def cubit.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
| curve_id | ID of the curve whose coarse size is
retrieved. return type of : float |
| def cubit.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
| curve_id | ID of the curve whose fine size is
retrieved. return type of : float |
| def cubit.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
| curve_id | ID of the curve whose first interval fraction
is retrieved. return type of : float |
| def cubit.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.
type of curve_id: int
| curve_id | ID of the curve whose first interval length is
retrieved. return type of : float |
.. code-block:: python
| def cubit.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
| curve_id | ID of the curve whose start ratio is
retrieved. return type of : float |
| def cubit.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
| curve_id | ID of the curve whose end ratio is
retrieved. return type of : float |
| def cubit.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
| curve_id | ID of the curve to query. type of value: boolean, out |
| value | Set to true if bias is from the start vertex;
false if reversed or not set. return type of : boolean |
| def cubit.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
| curve_id | ID of the curve to query. return type of : boolean |
| def cubit.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.
type of curve_id: int
| curve_id | ID of the curve whose first bias factor is
retrieved. return type of : float |
.. code-block:: python
| def cubit.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).
type of curve_id: int
| curve_id | ID of the curve whose dualbias factor is
retrieved. return type of : float |
.. code-block:: python
| def cubit.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
| curve_id | ID of the curve whose start inverse ratio is
retrieved. return type of : float |
| def cubit.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
| curve_id | ID of the curve whose end inverse ratio is
retrieved. return type of : float |
| def cubit.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
| curve_id | ID of the curve whose start-vertex is
queried. return type of : int |
| def cubit.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".
type of curve_id: int
| curve_id | ID of the curve whose bias type is
queried. return type of : string |
.. code-block:: python
| def cubit.get_curve_center | ( | curve_id | ) |
Retrieve the center point of a specified curve.
Title Center computation
.. code-block:: python
@n type of curve_id: int
| curve_id | ID of the curve to query. return type of : std:: array< double,3 > |
| def cubit.get_curve_count | ( | ) |
Get the current number of curves in the model.
.. code-block:: python
@n return type of : int
| def cubit.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 > >
| target_volume_ids | List of volume IDs to query. return type of : int |
| def cubit.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
| curve_id | ID of the curve to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| curve_id | ID of the curve to query. return type of : float |
| def cubit.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
| curve_id | ID of the curve whose curvature scheme value is
retrieved. return type of : float |
| def cubit.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
| curve_id | ID of the curve whose pinpoint locations are
retrieved. return type of : std::vector< double,std:: allocator< double > > |
| def cubit.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
| curve_id | ID of the curve. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_curve_radius | ( | curve_id | ) |
Compute the radius of a specified curve.
Title Computation
.. code-block:: python
@n type of curve_id: int
| curve_id | ID of the curve to query. return type of : float |
| def cubit.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
.. code-block:: python
@n type of curve_id: int
| curve_id | ID of the curve to query. return type of : string |
| def cubit.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
type of variable: string
| variable | Substring of the sculpt parameter name to look
up. return type of : float |
| def cubit.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
| def cubit.get_default_element_type | ( | ) |
Retrieve the current default element type for meshing.
.. code-block:: python
@n return type of : string
| def cubit.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
| def cubit.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
| entity_id | ID of the displacement BC. return type of : string |
| def cubit.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
| vertex_id_1 | ID of the first vertex. type of vertex_id_2: int |
| vertex_id_2 | ID of the second vertex. return type of : float |
| def cubit.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
| geom_type_1 | Type of the first entity ("vertex", "curve",
"surface", or "volume"). type of entity_id_1: int |
| entity_id_1 | ID of the first entity. type of geom_type_2: string |
| geom_type_2 | Type of the second entity ("vertex", "curve",
"surface", or "volume"). type of entity_id_2: int |
| entity_id_2 | ID of the second entity. return type of : float |
| def cubit.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
| x_coordinate | X coordinate of the query point. type of y_coordinate: float |
| y_coordinate | Y coordinate of the query point. type of z_coordinate: float |
| z_coordinate | Z coordinate of the query point. type of curve_id: int |
| curve_id | ID of the curve to measure along. return type of : float |
| def cubit.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
| def cubit.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
| edge_id | Local edge element ID within its type-specific
ID space. return type of : int |
| def cubit.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
| curve_id | ID of the curve defining the knife-edge. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| 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: string |
| metric_name | Quality metric name (e.g., "scaled
jacobian"). type of single_threshold: float |
| single_threshold | Threshold when using a single bound. type of use_low_threshold: boolean |
| use_low_threshold | If true, apply [low_threshold, high_threshold];
otherwise use single_threshold. type of low_threshold: float |
| low_threshold | Lower bound for quality range. type of high_threshold: float |
| high_threshold | Upper bound for quality range. type of make_group: boolean |
| make_group | If true, create a group for failing elements
and return its ID. return type of : std::vector< double,std:: allocator< double > > |
| def cubit.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
| element_id | Global Element ID to query. return type of : int |
| def cubit.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
| 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: int |
| auto_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 |
| def cubit.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
| def cubit.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
| element_id | Global element ID to check (as established by
block assignment). return type of : boolean |
true if the element has a Global Element
ID, false otherwise.| def cubit.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
| element_id | Global element ID (as assigned by
Exodus/Genesis). return type of : string |
| def cubit.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
| element_id | Global Element ID (as assigned in the Exodus
file). return type of : int |
| def cubit.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
| 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 > > |
| def cubit.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
| entity_type | Type of the entity ("body", "volume",
"surface", "curve", or "vertex"). type of entity_id: int |
| entity_id | ID of the entity to query. return type of : std:: array< double,4 > |
| def cubit.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
.. code-block:: python
@n type of entity_type: string
| entity_type | Type of the entity ("body", "volume",
"surface", "curve", or "vertex"). type of entity_id: int |
| entity_id | ID of the entity to query. return type of : int |
| def cubit.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
| geom_type | Specifies the geometry type ("body", "volume",
"surface", "curve", or "vertex"). type of entity_id: int |
| entity_id | ID of the entity. return type of : std::vector< std::string,std::allocator< std:: string > > |
| def cubit.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
| entity_type | Type of the entity ("body", "volume",
"surface", "curve", or "vertex"). type of entity_id: int |
| entity_id | ID of the entity. type of no_default: boolean, optional |
| no_default | If true, return an empty string when only a
default name exists. return type of : string |
| def cubit.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
| entity_type | Type of the entity ("body", "volume",
"surface", "curve", or "vertex"). type of entity_id: int |
| entity_id | ID of the entity. type of no_default: boolean, optional |
| no_default | If true, excludes default names from the
returned list. type of first_name_only: boolean, optional |
| first_name_only | If true, returns only the first name
attribute. return type of : std::vector< std::string,std::allocator< std:: string > > |
| def cubit.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
| source_type | Item type: "face", "quad", or "tri". type of source_id: int |
| source_id | ID of the entity. type of sideset_id: int |
| sideset_id | ID of the sideset. return type of : string |
| def cubit.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
| def cubit.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
| entity_id | The id of the entity type of entity_type: string |
| entity_type | The type of the entity return type of : int |
| def cubit.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
| entity_type | Type of the entity: "block", "sideset", or
"nodeset". type of entity_id: int |
| entity_id | ID of the entity. return type of : string |
| def cubit.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
| entity_type | Type of the entity: "block", "sideset", or
"nodeset". type of entity_id: int |
| entity_id | ID of the entity. return type of : string |
| def cubit.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
| entity_type | Type of the entity: "block", "sideset", or
"nodeset". type of entity_id: int |
| entity_id | ID of the entity. return type of : string |
| def cubit.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
| entity_type | Mesh element type ("hex", "tet", "quad", "tri",
"face", etc.). type of entity_id: int |
| entity_id | Local mesh entity ID within its type. return type of : int |
| def cubit.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
| def cubit.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
| def cubit.get_exodus_variable_count | ( | container_type, | |
| container_id | |||
| ) |
Get the number of Exodus variables in a nodeset, sideset, or block.
| entity_type | : nodeset, sideset, or block type of container_id: int |
| container_id | The block id return type of : int |
| def cubit.get_exodus_variable_names | ( | container_type, | |
| container_id | |||
| ) |
Get the names of Exodus variables in a nodeset, sideset, or block.
| entity_type | : nodeset, sideset, or block type of container_id: int |
| container_id | The block id return type of : std::vector< std::string,std::allocator< std:: string > > |
| def cubit.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
| def cubit.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
| entity_type | Mesh element type (e.g., "hex", "tet", "tri",
"quad", "hex20"). type of entity_id: int |
| entity_id | ID of the mesh element. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_force_direction_vector | ( | entity_id | ) |
Get the direction vector of a force BC.
type of entity_id: int
| entity_id | ID of the force BC. return type of : std:: array< double,3 > |
| def cubit.get_force_magnitude | ( | entity_id | ) |
Get the force magnitude of a force BC.
type of entity_id: int
| entity_id | ID of the force BC. return type of : float |
| def cubit.get_force_moment_vector | ( | entity_id | ) |
Get the moment vector of a force BC.
type of entity_id: int
| entity_id | ID of the force BC. return type of : std:: array< double,3 > |
| def cubit.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:
surfPairs),gaps),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 > >
| target_volume_ids | List of volume IDs to examine. type of maximum_gap_tolerance: float |
| maximum_gap_tolerance | Maximum distance between surfaces to be
considered a gap. type of maximum_gap_angle: float |
| maximum_gap_angle | Maximum angle between surfaces to be considered
a gap. type of cache_overlaps: int, optional |
| cache_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 > > |
| def cubit.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
.. code-block:: python
@n type of mesh_entity_type: string
| mesh_entity_type | Mesh entity type: "quad", "face", "tri", "hex",
"tet", "edge", or "node". type of mesh_entity_list: string |
| mesh_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 > > |
| def cubit.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
| entity_type | Type of the geometric entity ("surface",
"curve", "volume", etc.). type of entity_id: int |
| entity_id | ID of the geometric entity. return type of : int |
| def cubit.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
| entity_type | Mesh element type (e.g., "hex", "tet", "tri",
"quad", etc.). type of entity_id: int |
| entity_id | ID of the mesh element. return type of : string |
| def cubit.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
| 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 > > |
| def cubit.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
| element_type | Type of the mesh entity ("hex", "tet", "wedge",
"pyramid", "tri", "quad", "face", "edge", or
"sphere"). type of id: int |
| id | Local mesh entity ID within its type. return type of : int |
| def cubit.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
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the parent group. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| group_id | ID of the group to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_heatflux_on_area | ( | bc_area_enum, | |
| entity_id | |||
| ) |
Get the heatflux value on a specified area.
type of bc_area_enum: int
| bc_area_enum | CI_BCEntityTypes: 4 (solid), 7 (shell top), 8
(shell bottom). type of entity_id: int |
| entity_id | ID of the heatflux BC. return type of : float |
| def cubit.get_hex_count | ( | ) |
Retrieve the count of hexahedral elements in the current model.
.. code-block:: python
@n return type of : int
| def cubit.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
| hex_id | Local hexahedral element ID. return type of : int |
| def cubit.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
| node_id_1 | First node ID defining the edge perpendicular
to the hex layer. type of node_id_2: int |
| node_id_2 | Second node ID defining the edge perpendicular
to the hex layer. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| surface_id |
Surface ID
that is part of a hole. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_hydraulic_radius_surface_area | ( | surface_id | ) |
Compute the hydraulic radius of a specified surface.
Title Computation
.. code-block:: python
@n type of surface_id: int
| surface_id | ID of the surface to query. return type of : float |
| def cubit.get_hydraulic_radius_volume_area | ( | volume_id | ) |
Compute the hydraulic radius of a specified volume.
Title Computation
.. code-block:: python
@n type of volume_id: int
| volume_id | ID of the volume to query. return type of : float |
| def cubit.get_id_from_name | ( | name | ) |
Retrieve the integer ID of an entity by its name.
.. code-block:: python
@n type of name: string
| name | Name of the entity whose ID is requested. return type of : int |
| def cubit.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 > >
| entity_ids | Vector of integer IDs to format. type of sort: boolean, optional |
| sort | If true (default), sort IDs ascending before
collapsing ranges; if false, preserve the original
order. return type of : string |
| def cubit.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:
journal idless onget_idless_signature to retrieve the
current idless reference for an entity
programmatically.. code-block:: python
@n type of entity_type: string
| entity_type | Type of the entity (e.g. "curve", "surface",
"vertex", "volume", "face", etc.). type of entity_id: int |
| entity_id | ID of the requested entity. return type of : string |
Notes: For full context, see the Cubit command:
journal idless {on | off | reverse} .
| def cubit.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:
.. code-block:: python
@n type of entity_type: string
| 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 |
Notes: For full context, see the Cubit command:
journal idless {on | off | reverse} .
| def cubit.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
type of variable: string
| variable | Name of the sculpt parameter substring. return type of : int |
| def cubit.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:
cubit.release_interface(iface)
@n type of interface_name: string
| interface_name | Name of the interface to retrieve. return type of : CubitBaseInterface |
| def cubit.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
| entity_type |
Entity type
to query. return type of : int |
| def cubit.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
| entity_type | Type of the entity being queried (e.g.
"surface", "curve", "volume"). return type of : int |
| def cubit.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
| geometry_type | Specifies the geometry type ("vertex", "curve",
"surface", etc.). return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_material_name | ( | material_id | ) |
Get the name of a material or CFD media by ID.
type of material_id: int
| material_id | ID of the material or media. return type of : string |
| def cubit.get_material_name_list | ( | ) |
Get list of all material names.
return type of : std::vector<
std::string,std::allocator< std:: string > >
| def cubit.get_material_property | ( | material_property_enum, | |
| entity_id | |||
| ) |
Get the value of a material property.
type of material_property_enum: int
| material_property_enum | Property type (e.g., 0 = Elastic Modulus, 1 =
Shear Modulus, etc.). type of entity_id: int |
| entity_id | ID of the material. return type of : float |
| def cubit.get_media_name_list | ( | ) |
Get list of all CFD media names.
return type of : std::vector<
std::string,std::allocator< std:: string > >
| def cubit.get_media_property | ( | entity_id | ) |
Get the media classification of a material.
type of entity_id: int
| entity_id | ID of the media. return type of : int |
| def cubit.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
| geom_type | Geometry type ("body", "volume", "surface",
"curve", or "vertex"). type of entity_id: int |
| entity_id | ID of the entity. return type of : string |
| def cubit.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
| def cubit.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 > >
| 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 > > > > |
| def cubit.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 > >
| 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 > > > > |
| def cubit.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 > >
| 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 > > > > |
| def cubit.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
| edge_id | ID of the mesh edge whose length is
requested. return type of : float |
| def cubit.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
| entity_type | Type of the geometry ("surface", "curve",
"volume", etc.). type of entity_id: int |
| entity_id | ID of the geometry entity. return type of : string |
| def cubit.get_mesh_error_count | ( | ) |
| def cubit.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
| error_code | Integer mesh error code for which to retrieve
guidance. return type of : std::vector< std::string,std::allocator< std:: string > > |
| def cubit.get_mesh_errors | ( | ) |
| def cubit.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
| geometry_type | Geometry type ("curve", "surface", or
"volume"). type of entity_id: int |
| entity_id | ID of the entity whose approximation angle is
queried. return type of : float |
| def cubit.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
| element_type | Mesh element type (e.g., "node", "edge",
"face"/"tri"/"quad", "volume"/"tet"/"hex"). type of element_id: int |
| element_id | ID of the mesh element. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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:
.. code-block:: python
@n type of geometry_type: string
| geometry_type | Geometry type of the entity ("curve", "surface", or "volume"). |
| entity_id | ID of the entity whose interval firmness is
queried. return type of : string |
| def cubit.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.
.. code-block:: python
@n type of geometry_type: string
| geometry_type |
Entity type:
"curve", "surface", or "volume". type of entity_id: int |
| entity_id | ID of the geometry entity. return type of : int |
| def cubit.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
| geometry_type | Type of geometry ("curve", "surface",
"volume"). type of entity_id: int |
| entity_id | ID of the entity whose scheme is queried. return type of : string |
| def cubit.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
| geometry_type | Geometry type ("surface" or "volume"). type of entity_id: int |
| entity_id | ID of the entity whose scheme firmness is
queried. return type of : string |
| def cubit.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.
.. code-block:: python
@n type of geometry_type: string
| geometry_type |
Entity type:
"curve", "surface", or "volume". type of entity_id: int |
| entity_id | ID of the entity to query. return type of : float |
| def cubit.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:
.. code-block:: python
@n type of geometry_type: string
| geometry_type | Geometry type ("curve", "surface", or
"volume"). type of entity_id: int |
| entity_id | ID of the entity whose mesh size type is
queried. return type of : string |
| def cubit.get_meshed_volume_or_area | ( | geometry_type, | |
| entity_ids | |||
| ) |
Sum mesh volumes or surface areas for CAD entities or mesh elements.
.. code-block:: python
@n type of geometry_type: string
| 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 |
| def cubit.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
| def cubit.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.
type of geom_type: string
| geom_type | Geometry type indicator: "volume" or
"surface". type of ent_id: int |
| ent_id | ID of the volume or surface entity to
classify. return type of : string |
.. code-block:: python
| def cubit.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".
type of geom_type: string
| 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 > > |
.. code-block:: python
| def cubit.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.
return type of : std::vector<
std::string,std::allocator< std:: string > >
.. code-block:: python
| def cubit.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.
type of geom_type: string
| 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 > > |
| def cubit.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.
type of op_name: string
| 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 |
.. code-block:: python
| def cubit.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
| op_name | ML operation identifier (e.g.,
"remove_cone"). return type of : std::vector< double,std:: allocator< double > > |
.. code-block:: python
for i in range(len(feature_names)): print(f"{feature_names[i]}\t{importances[i]}")
| def cubit.get_ML_features | ( | ml_op_names, | |
| entity1_ids, | |||
| entity2_ids, | |||
| params, | |||
| 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.
type of ml_op_names: std::vector<
std::string,std::allocator< std::string > >
| 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 mesh_size: float |
| mesh_size | Target mesh size for feature
calculations. type of reduced_features: boolean, optional |
| reduced_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 > > > > |
.. code-block:: python
| def cubit.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.
type of op_name: string
| 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 > > |
.. code-block:: python
| def cubit.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.
type of model_name: string
| model_name | Name of the ML model or operation to
query. return type of : int |
.. code-block:: python
| def cubit.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.
type of model_ID: int
| model_ID | The unique identifier for the ML model. return type of : string |
.. code-block:: python
| def cubit.get_ML_operation | ( | op_name, | |
| entity_id1, | |||
| entity_id2, | |||
| params, | |||
| 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:
type of op_name: string
| op_name | Name of the ML operation (see
get_ML_operation_features). type of entity_id1: int |
| entity_id1 | ID of the primary entity involved in the
operation. type of entity_id2: int |
| entity_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 small_curve_size: float |
| small_curve_size | Threshold below which a curve is considered
"small." Used for tailoring command
generation. type of mesh_size: float |
| mesh_size | Target mesh size parameter for the
operation. return type of : std::vector< std::string,std::allocator< std:: string > > |
.. code-block:: python
| def cubit.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
| ml_op_name |
Name of the ML operation or model (as defined by
get_ML_operation_features()). type of reduced_features: boolean, optional |
| reduced_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 > > |
.. 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]}")
| def cubit.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.
type of ml_op_name: string
| ml_op_name | Name of the ML operation or model. type of reduced_features: boolean, optional |
| reduced_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 |
.. code-block:: python
| def cubit.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:
type of ml_op_name: string
| ml_op_name |
Name of the ML model or operation (see
get_ML_operation_features()). type of reduced_features: boolean, optional |
| reduced_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 > > |
.. code-block:: python
| def cubit.get_ML_operation_features | ( | ml_op_names, | |
| entity1_ids, | |||
| entity2_ids, | |||
| params, | |||
| 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:
.. 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 > >
| 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 mesh_size: float |
| mesh_size | Target mesh size for feature
calculations. type of reduced_features: boolean, optional |
| reduced_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 > > > > |
| def cubit.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.
type of ml_op_name: string
| ml_op_name | Name of the ML operation or model. return type of : int |
.. code-block:: python
| def cubit.get_ML_predictions | ( | ml_op_names, | |
| entity1_ids, | |||
| entity2_ids, | |||
| params, | |||
| 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.
type of ml_op_names: std::vector<
std::string,std::allocator< std::string > >
| 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 mesh_size: float |
| mesh_size | Target mesh size used in feature
calculation. type of reduced_features: boolean, optional |
| reduced_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 > > > > |
.. code-block:: python
| def cubit.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.
return type of : std::vector<
std::string,std::allocator< std:: string > >
.. code-block:: python
| def cubit.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.
type of op_name: string
| 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 > > > |
.. code-block:: python
for id in result[1]: print("Surviving entity ID:", id)
| def cubit.get_moment_magnitude | ( | entity_id | ) |
Get the moment magnitude of a force BC.
type of entity_id: int
| entity_id | ID of the force BC. return type of : float |
| def cubit.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
| n | Number of largest distances to return. type of entity_type1: string |
| entity_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: string |
| entity_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 > > |
| def cubit.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:
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 > >
| target_ids | Vector of volume IDs to examine. type of narrow_size: float |
| narrow_size | Distance threshold for detecting narrow
regions. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. type of mesh_size: float |
| mesh_size | Distance threshold for detecting narrow
regions. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| gtype |
Entity type
to query: "curve", "surface", or "volume". type of ent_ids: std::vector< int,std::allocator< int > > |
| ent_ids | Entities of type gtype to
check.type of compare_ents: std::vector< int,std::allocator< int > > |
| compare_ents | Entities of type gtype to check
against. If empty, checks against all entities of
type gtype in the model.type of distance: float |
| distance | Maximum distance between entities. If -1, a
default tolerance will be computed. return type of : std::vector< int,std:: allocator< int > > |
gtype that
are within distance of the entities in
ent_ids.| def cubit.get_nearby_volumes_at_volume | ( | volume_id, | |
| compare_volumes, | |||
| distances, | |||
progress =
None |
|||
| ) |
Identify nearby volumes in the model for a list of target volumes.
For each volume in volume_id , returns a
list of volumes from compare_volumes (or all
volumes in the model if compare_volumes is
empty) that are within the specified distance.
The distances vector specifies the maximum
distance to use for each corresponding volume in
volume_id . If a value is set to -1, a default
tolerance will be computed for that volume.
The result is a vector of vectors: one list of nearby
volumes per input volume in volume_id .
.. code-block:: python
for i, near_list in enumerate(nearby_volumes): print(f"Volume {volume_ids[i]} nearby volumes:", " ".join(str(v) for v in near_list))
@n type of volume_id: std::vector< int,std::allocator< int > >
| volume_id | List of volume IDs 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 distances: std::vector< double,std::allocator< double > > |
| distances | Maximum distance to use per volume in
volume_id. If a value is -1, a default
tolerance will be computed.type of progress: :py:class: CubitProgressHandler,
optional |
| progress | Optional progress handler. return type of : std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std:: allocator< int > > > > |
volume_id, returns a list of nearby volume
IDs from compare_volumes.| def cubit.get_next_block_id | ( | ) |
Get the next available block ID.
.. code-block:: python
@n return type of : int
| def cubit.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
| def cubit.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
| def cubit.get_next_group_id | ( | ) |
Return the next available group ID from Cubit.
.. code-block:: python
@n return type of : int
| def cubit.get_next_nodeset_id | ( | ) |
Get the next available nodeset ID.
.. code-block:: python
@n return type of : int
| def cubit.get_next_sideset_id | ( | ) |
Get the next available sideset ID.
.. code-block:: python
@n return type of : int
| def cubit.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
| node_id | ID of the node. return type of : std:: array< double,3 > |
| def cubit.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:
.. code-block:: python
@n return type of : boolean
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.get_node_count | ( | ) |
Retrieve the count of nodes in the current model.
.. code-block:: python
@n return type of : int
| def cubit.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
| node_id | ID of the node. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| node_id | ID of the node to check. return type of : boolean |
true if the node exists,
false otherwise.| def cubit.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
| node_id | ID of the node. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| node_id | Local Cubit node ID. return type of : int |
| def cubit.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
| node_id | ID of the node to query. return type of : boolean |
true if the node is fixed (constrained),
false if it is not.| def cubit.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
| node_id | ID of the node. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| def cubit.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
| nodeset_id | ID of the nodeset to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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 > >
| def cubit.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
| bc_type_enum | BC type enum (CI_BCTypes). type of bc_id: int |
| bc_id | ID of the boundary condition. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_nodeset_node_count | ( | nodeset_id | ) |
Get the number of nodes in a nodeset.
type of nodeset_id: int
| nodeset_id | The nodeset id return type of : int |
| def cubit.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
| nodeset_id | ID of the nodeset to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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:
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
| nodeset_id | ID of the nodeset to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| nodeset_id | ID of the nodeset to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| nodeset_id | ID of the nodeset to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| nodeset_id | ID of the nodeset to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| volume_id | ID of the volume to query. return type of : int |
| def cubit.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.
type of volumes: std::vector< int,std::allocator< int
> >
| volumes | Vector of volume IDs to search for
overconstrained tets. return type of : std::vector< int,std:: allocator< int > > |
.. code-block:: python
if over_tets:
ids_str = cubit.string_from_id_list(over_tets)
else:
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| 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, optional |
| cache_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 > > |
surface_id.| def cubit.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 > >
| body_ids | List of body IDs to search for surface
overlaps. type of filter_slivers: boolean, optional |
| filter_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 > > > > |
| def cubit.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 > >
| target_volume_ids | List of volume IDs to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| 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 > > |
volume_id.| def cubit.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
| geometry_type | Specifies the entity type ("body", "volume",
"surface", "curve", or "vertex"). type of entity_id: int |
| entity_id | ID of the entity whose owning body is
requested. return type of : int |
| def cubit.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
| geometry_type | Specifies the entity type ("body", "volume",
"surface", "curve", or "vertex"). type of entity_id: int |
| entity_id | ID of the entity whose owning volume is
requested. return type of : int |
| def cubit.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
| entity_name | The name of the entity as defined in
Cubit. return type of : int |
| def cubit.get_parent_assembly_instance | ( | assembly_id | ) |
Get the instance number of the parent of an assembly node.
type of assembly_id: int
| assembly_id | ID of the assembly node. return type of : int |
| def cubit.get_parent_assembly_path | ( | assembly_id | ) |
Get the path of an assembly node's parent.
type of assembly_id: int
| assembly_id | ID of the assembly node. return type of : string |
| def cubit.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 > >
| def cubit.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
| def cubit.get_pressure_function | ( | entity_id | ) |
Get the function expression associated with a pressure BC.
type of entity_id: int
| entity_id | ID of the pressure BC. return type of : string |
| def cubit.get_pressure_value | ( | entity_id | ) |
Get the magnitude value of a pressure BC.
type of entity_id: int
| entity_id | ID of the pressure BC. return type of : float |
| def cubit.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
| def cubit.get_pyramid_count | ( | ) |
Retrieve the count of pyramid elements in the current model.
.. code-block:: python
@n return type of : int
| def cubit.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
| pyramid_id | Local pyramid element ID within its type. return type of : int |
| def cubit.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
| def cubit.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
| def cubit.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
| quad_id | Local quadrilateral element ID within its
type. return type of : int |
| def cubit.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:
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
| geom_type | Geometry type ("curve", "surface", or
"volume"). type of mesh_type: string |
| mesh_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: int |
| expand_levels | Number of adjacency levels to include (0 = only
directly attached elements). type of metric_name: string |
| metric_name | Name of the quality metric (e.g., "scaled
jacobian", "skew"). type of single_threshold: float |
| single_threshold | Threshold when using a single bound. type of use_low_threshold: boolean |
| use_low_threshold | If true, apply [low_threshold, high_threshold];
otherwise use single_threshold. type of low_threshold: float |
| low_threshold | Lower bound of the acceptable quality
range. type of high_threshold: float |
| high_threshold | Upper bound of the acceptable quality
range. type of make_group: boolean |
| make_group | If true, create a group containing failing
elements; its ID appears in the output. return type of : std::vector< double,std:: allocator< double > > |
| def cubit.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
| mesh_type | Type of mesh element ("hex", "tet", "tri",
"quad"). type of mesh_id: int |
| mesh_id | Identifier of the mesh element. type of metric_name: string |
| metric_name | Name of the quality metric (e.g., "skew",
"taper", "scaled jacobian"). return type of : float |
| def cubit.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
| 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: string |
| metric_name | Name of the quality metric (e.g., "skew",
"taper", "scaled jacobian"). return type of : std::vector< double,std:: allocator< double > > |
| def cubit.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
| vol_id |
Volume ID
representing bolt geometry. return type of : std::vector< double,std:: allocator< double > > |
| def cubit.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
| source_geometry_type | The type of the source entity ("body",
"volume", "surface", "curve", or "vertex"). type of source_id: int |
| source_id | ID of the source entity. type of target_geom_type: string |
| target_geom_type | The target entity type to retrieve ("body",
"volume", "surface", "curve", or "vertex"). return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_rendering_mode | ( | ) |
Get the current graphics rendering mode.
Returns an integer code for the active rendering style:
.. code-block:: python
@n return type of : int
| def cubit.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:
.. code-block:: python
@n type of geometry_type: string
| geometry_type | Geometry type of the entity ("curve",
"surface", or "volume"). type of entity_id: int |
| entity_id | ID of the entity whose requested interval
firmness is queried. return type of : string |
| def cubit.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.
.. code-block:: python
@n type of geometry_type: string
| geometry_type |
Entity type:
"curve", "surface", or "volume". type of entity_id: int |
| entity_id | ID of the geometry entity. return type of : int |
| def cubit.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
| geometry_type |
Entity type:
"curve", "surface", or "volume". type of id: int |
| id | ID of the geometry entity. return type of : float |
| def cubit.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:
.. code-block:: python
@n type of geometry_type: string
| geometry_type | Geometry type ("curve", "surface", or
"volume"). type of entity_id: int |
| entity_id | ID of the entity whose requested mesh size
status is queried. return type of : string |
| def cubit.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
| def cubit.get_rubberband_shape | ( | ) |
Get the current rubberband selection shape.
Returns an integer code for the active selection shape in the graphics window:
.. code-block:: python
@n return type of : int
| def cubit.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
| index | Zero-based index into the current selection
list. return type of : int |
| def cubit.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 > >
| def cubit.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
| index | Zero-based index into the current selection
list. return type of : string |
| def cubit.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
| def cubit.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 > >
| target_volume_ids | List of volume IDs to analyze. type of upper_bound: float |
| upper_bound | Upper threshold angle, in degrees. type of lower_bound: float |
| lower_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 > > > > |
| def cubit.get_sideset_area | ( | sideset_id | ) |
Get the total area of a sideset.
A sideset can contain triangle (tri) or quadrilateral (face) elements. This function returns the sum of the areas of those elements, if they exist. If no such elements are present in the sideset, the function returns zero.
.. code-block:: python
@n type of sideset_id: int
| sideset_id | ID of the sideset to examine. return type of : float |
| def cubit.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
| def cubit.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
| sideset_id | ID of the sideset to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| sideset_id | ID of the sideset to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_sideset_element_type | ( | sideset_id | ) |
Get the element type of a sideset.
type of sideset_id: int
| sideset_id | The id of the sideset to be queried return type of : string |
| def cubit.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 > >
| def cubit.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
| bc_type_enum | BC type enum (CI_BCTypes). type of bc_id: int |
| bc_id | ID of the boundary condition. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| sideset_id | ID of the sideset to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| sideset_id | ID of the sideset to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| sideset_id | ID of the sideset to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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 > >
| curve_ids | List of curve IDs to compare against. type of tol: float, optional |
| tol | Tolerance for length comparison (fraction if
use_percent_tol is true, otherwise absolute). type of use_percent_tol: boolean, optional |
| use_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, optional |
| on_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 > > |
| def cubit.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 > >
| surface_ids | List of surface IDs to compare against. type of tol: float, optional |
| tol | Tolerance for area comparison (fraction if
use_percent_tol is true, otherwise absolute). type of use_percent_tol: boolean, optional |
| use_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, optional |
| on_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 > > |
| def cubit.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 > >
| volume_ids | List of volume IDs to compare against. type of tol: float, optional |
| tol | Tolerance for volume comparison (fraction if
use_percent_tol is true, otherwise absolute). type of use_percent_tol: boolean, optional |
| use_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 > > |
| def cubit.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
| entity_type | Either "surface" or "volume". type of entity_id: int |
| entity_id | ID of the surface or volume. return type of : string |
| def cubit.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 > >
| target_ids | Vector of volume IDs to examine. type of small_area: float |
| small_area | Area threshold; faces with area <=
small_area qualify as "small." type of small_curve_size: float |
| small_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 > > |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. type of mesh_size: float |
| mesh_size | Edge-length threshold for "small" curves. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. type of max_radius: float |
| max_radius | Maximum radius of curvature; if 0, return all
blend surfaces. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. type of area_threshold: float |
| area_threshold | Area threshold; faces with area <=
area_threshold are returned. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. type of mesh_size: float |
| mesh_size | Hydraulic radius threshold (faces with
4*(area/perimeter) <= mesh_size are
"small"). return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. type of mesh_size: float |
| mesh_size | Threshold defining "small": volumes with volume
< 10 * mesh_size^3. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. type of number_to_return: int |
| number_to_return | Number of smallest curves to return. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| geometry_type | The geometry type: "curve", "surface", or
"volume". type of entity_id: int |
| entity_id | The ID of the entity. return type of : string |
| def cubit.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.
type of geom_type: string
| geom_type | Type of entity: "curve", "surface", "volume",
or "body". type of geom_id: int |
| geom_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 > > > > |
| def cubit.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
| 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 > > > > |
| def cubit.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
| bolt_id | ID of the volume classified as a bolt. type of insert_id: int |
| insert_id | Optional ID of the insert volume at the bolt
interface. Use 0 if absent. type of threaded_vol_id: int |
| threaded_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 > > > > |
| def cubit.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
| 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 > > > > |
| def cubit.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
| 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 > > > > |
| def cubit.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
| classification | Type assigned to the surface (e.g., "slot",
"hole", "fillet"). type of surf_id: int |
| surf_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 > > > > |
| def cubit.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
| classification | Classification type: one of "bolt", "nut",
"washer", "spring", "ball", "race", "pin", "gear",
"insert", or "other". type of vol_id: int |
| vol_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 > > > > |
| def cubit.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
| surface_id | ID of the close-loop surface being
queried. type of mesh_size: float |
| mesh_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 > > > > |
| def cubit.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
| 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 > > > > |
| def cubit.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 > >
| volume_list | List of volume IDs to query. type of exterior_angle: float |
| exterior_angle | Threshold value for the exterior angle (in
degrees) used to determine decomposition
faces. type of do_imprint_merge: boolean |
| do_imprint_merge | If true, perform imprint and merge operations
to support decomposition. type of tolerant_imprint: boolean |
| tolerant_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 > > > > |
| def cubit.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
| surface_id1 | ID of the first overlapping surface (must be on
a different volume than surface_id2). type of surface_id2: int |
| surface_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 > > > > |
| def cubit.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
| vertex_id | ID of the vertex that is nearly coincident with
the curve (must be on a different volume). type of curve_id: int |
| curve_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 > > > > |
| def cubit.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
| vertex_id | ID of the vertex that is nearly coincident with
the surface (must be on a different volume). type of surface_id: int |
| surface_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 > > > > |
| def cubit.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
| vertex_id_1 | ID of the first vertex (on volume 1). type of vertex_id_2: int |
| vertex_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 > > > > |
| def cubit.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
| surface_id_1 | ID of the first overlapping surface (must be on
a different volume than surface_id_2). type of surface_id_2: int |
| surface_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 > > > > |
| def cubit.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
| volume_id_1 | ID of the first volume. type of volume_id_2: int |
| volume_id_2 | ID of the second volume. type of maximum_gap_tolerance: float |
| maximum_gap_tolerance | Maximum allowed gap before volumes are
considered overlapping. type of maximum_gap_angle: float |
| maximum_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 > > > > |
| def cubit.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
| vertex_id | ID of the vertex with the sharp angle being
queried. type of small_curve_size: float |
| small_curve_size | Threshold that defines what is considered a
"small" curve. type of mesh_size: float |
| mesh_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 > > > > |
| def cubit.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 > >
| 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: float |
| thickness1 | Thickness of sheets in vol1_sheets. type of thickness2: float |
| thickness2 | Thickness of sheets in vol2_sheets. type of close_type: string, optional |
| close_type | Optional entity type to focus near (e.g.,
"curve"). Default = "". type of close_id: int, optional |
| close_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 > > > > |
| def cubit.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 > >
| 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 > > > > |
| def cubit.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
| curve_id | ID of the small curve. type of small_curve_size: float |
| small_curve_size | Curve-length threshold defining "small"
features. type of mesh_size: float |
| mesh_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 > > > > |
| def cubit.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
| surface_id | ID of the surface to remediate. type of small_curve_size: float |
| small_curve_size | Threshold under which curves are deemed
small. type of mesh_size: float |
| mesh_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 > > > > |
| def cubit.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
| surface_id | ID of the surface to analyze. type of small_curve_size: float |
| small_curve_size | Length threshold defining narrow regions. type of mesh_size: float |
| mesh_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 > > > > |
| def cubit.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
| 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, optional |
| include_weights | If true, prepend each operation string with
heuristic weight (1=best ... 0=worst). type of include_type: boolean, optional |
| include_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 > > > > |
| def cubit.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
| vol_id | ID of the volume to inspect. type of small_curve_size: float |
| small_curve_size | Maximum curve length considered "small". type of mesh_size: float |
| mesh_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 > > > > |
| def cubit.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
| volume_id | ID of the volume to query. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| def cubit.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
| sphere_id | Local node (SPHERE) ID within its type-specific
ID space. return type of : int |
| def cubit.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
type of variable: string
| variable | Name of the sculpt parameter substring. return type of : string |
| def cubit.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
| entity_type | Mesh element type of the higher-dimensional
entity (e.g., "hex", "tet", "tri", "quad"). type of entity_id: int |
| entity_id | ID of the mesh element. type of dimension: int |
| dimension | Dimension of sub-entities to retrieve: 0 =
vertices, 1 = edges, 2 = faces, 3 = volumes. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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:
type of surface_id: int
| surface_id | ID of the surface to query. return type of : std::vector< std::pair< int,int >,std::allocator< std:: pair< int,int > > > |
| def cubit.get_surface_area | ( | surface_id | ) |
Get the area of a specified surface.
.. code-block:: python
@n type of surface_id: int
| surface_id | ID of the surface to query. return type of : float |
| def cubit.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 > >
| volume_list | List of volume IDs to query. type of area_threshold: float, optional |
| area_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, optional |
| angle_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, optional |
| combine_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 > > > |
| def cubit.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
| surface_id | ID of the surface to query. return type of : std:: array< double,3 > |
| def cubit.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(f"Radius: {radius}, Surfaces:", [int(sid) for sid in surfaces])
@n type of volume_list: std::vector< int,std::allocator< int > >
| volume_list | List of volume IDs to query. type of radius_threshold: float, optional |
| radius_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 > > > |
| def cubit.get_surface_count | ( | ) |
Get the current number of surfaces in the model.
.. code-block:: python
@n return type of : int
| def cubit.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
| surface_id | ID of the surface to query. return type of : int |
| def cubit.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 > >
| volume_list | List of volume IDs to query. type of radius_threshold: float |
| radius_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 > > > |
| def cubit.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:
.. 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
| 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 > > > > |
| def cubit.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
| surface_id | ID of the surface. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| surface_id | ID of the surface to query. return type of : std:: array< double,3 > |
| def cubit.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
| 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 > |
| def cubit.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
| surface_id | ID of the surface. return type of : int |
| def cubit.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
| surface_id | ID of the surface to query. return type of : std::vector< double,std:: allocator< double > > |
| def cubit.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
| surface_id | ID of the surface. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_surface_sense | ( | surface_id | ) |
Get the orientation ("sense") of a specified surface.
.. code-block:: python
@n type of surface_id: int
| surface_id | ID of the surface to query. return type of : string |
| def cubit.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
| surface_id | ID of the surface. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_surface_type | ( | surface_id | ) |
Get the surface type for a specified surface.
Title Available surface types
.. code-block:: python
@n type of surface_id: int
| surface_id | ID of the surface to query. return type of : string |
| def cubit.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:
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 > >
| target_ids | Vector of volume IDs to examine. type of narrow_size: float |
| narrow_size | Distance threshold for detecting narrow edge
pairs with orientation checks. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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 > >
| target_volume_ids | Vector of volume IDs to examine. type of upper_bound: float |
| upper_bound | Upper threshold for acceptable tangential
angle. type of lower_bound: float |
| lower_bound | Lower threshold for acceptable tangential
angle. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| volume_id | ID of the volume to query. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| def cubit.get_tet_count | ( | ) |
Retrieve the count of tetrahedral elements in the current model.
.. code-block:: python
@n return type of : int
| def cubit.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
| tet_id | Local tetrahedral element ID. return type of : int |
| def cubit.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
| volume_id | ID of the volume to query. return type of : float |
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| volume_id | ID of the volume to query. return type of : boolean |
| def cubit.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
| volume_id | ID of the volume to query. return type of : int |
| def cubit.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
| def cubit.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
.. code-block:: python
@n type of geometry_type: string
| 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 > |
| def cubit.get_top_level_assembly_items | ( | ) |
| def cubit.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
| 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 > |
| def cubit.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 > >
| volume_list | List of volume IDs to include. return type of : float |
| def cubit.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
| def cubit.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
| tri_id | Local triangular element ID within its
type. return type of : int |
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| geom_type | Geometry type of the entity ("curve",
"surface", or "volume"). type of entity_id: int |
| entity_id | ID of the entity whose TriMesh minimum size is
queried. return type of : float |
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.get_undo_enabled | ( | ) |
Query whether undo is currently enabled.
.. code-block:: python
@n return type of : boolean
| def cubit.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 > >
| 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 > > |
| def cubit.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
| vertex_id | ID of the vertex to query. return type of : int |
| def cubit.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
| block_id | ID of the block. return type of : std::vector< std::string,std::allocator< std:: string > > |
| def cubit.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
| entity_id | ID of the velocity boundary condition. return type of : string |
| def cubit.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
| def cubit.get_vertex_coordinates | ( | entityID | ) |
Get the 3D coordinates of a vertex.
Returns the exact 3D coordinates for a vertex.
.. code-block:: python
| entity_id | ID of the vertex to query. return type of : std:: array< double,3 > |
| def cubit.get_vertex_count | ( | ) |
Get the current number of vertices in the model.
.. code-block:: python
@n return type of : int
| def cubit.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
| vertex_id | ID of the vertex. return type of : int |
| def cubit.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:
.. code-block:: python
@n type of surface_id: int
| surface_id | ID of the surface containing the vertex. type of vertex_id: int |
| vertex_id | ID of the vertex to query. return type of : string |
| def cubit.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 >
| def cubit.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
| def cubit.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 >
| def cubit.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 >
| def cubit.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
| volume_id | ID of the volume to query. return type of : float |
| def cubit.get_volume_CAD_material | ( | volume_id | ) |
| def cubit.get_volume_count | ( | ) |
Get the current number of volumes in the model.
.. code-block:: python
@n return type of : int
| def cubit.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
| volume_id | ID of the volume to query. return type of : int |
| def cubit.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
| 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: int |
| surface_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 > > > > |
| def cubit.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
| volume_id | ID of the volume to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| volume_id | ID of the volume. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| volume_id | ID of the volume to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| volume_id | ID of the volume to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_volume_volume | ( | vol_id | ) |
Get the enclosed volume of a specified volume.
.. code-block:: python
@n type of vol_id: int
| vol_id | ID of the volume to query. return type of : float |
| def cubit.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
| volume_id | ID of the volume to examine. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.get_volumes_for_node | ( | node_name, | |
| node_instance | |||
| ) |
| def cubit.get_wedge_count | ( | ) |
Retrieve the count of wedge-shaped elements in the current model.
.. code-block:: python
@n return type of : int
| def cubit.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
| wedge_id | Local wedge element ID within its type. return type of : int |
| def cubit.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
| source_type | Item type: "face", "quad", or "tri". type of source_id: int |
| source_id | ID of the entity. type of sideset_id: int |
| sideset_id | ID of the sideset. return type of : string |
| def cubit.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 > > >
| def cubit.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.
size command).Title Return value:
1 if the entity has a valid size0 if the entity does not have a valid
size.. code-block:: python
@n type of geometry_type: string
| geometry_type | Type of the geometric entity (e.g. "surface",
"curve", "volume", etc.). type of entity_id: int |
| entity_id | ID of the geometric entity. return type of : int |
1 if the entity has a valid size,
0 if it does not.| def cubit.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
| bc_area_enum | CI_BCEntityTypes: 7 (top), 8 (bottom). type of entity_id: int |
| entity_id | ID of the heatflux BC. return type of : boolean |
| def cubit.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
| entity_type |
Entity type
to highlight ("vertex", "curve", "surface", or
"volume"). type of entity_id: int |
| entity_id | ID of the entity to highlight. |
| def cubit.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 > >
| argv | List of startup directives for Cubit (e.g., command-line flags). Use {""} for defaults. |
| def cubit.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
| def cubit.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
| volume_id | ID of the volume. return type of : boolean |
| def cubit.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
| surface_id | ID of the surface to check. return type of : boolean |
| def cubit.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
| boundary_layer_id | Boundary layer ID to check. return type of : boolean |
| def cubit.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
| def cubit.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
| surface_id | ID of the surface to query. return type of : boolean |
| def cubit.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
| surface_id | ID of the surface to check. type of thickness_threshold: float |
| thickness_threshold | Max thickness to qualify as chamfer. return type of : boolean |
| def cubit.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
| surface_id | ID of the surface to check. type of mesh_size: float |
| mesh_size | Distance threshold for loop separation. return type of : boolean |
| def cubit.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
| def cubit.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
| def cubit.is_cone_surface | ( | surface_id | ) |
Determine whether a surface is a cone.
Returns whether the specified surface is a conical surface.
.. code-block:: python
@n type of surface_id: int
| surface_id | ID of the surface to test. return type of : boolean |
| def cubit.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
| surface_id | ID of surface to query. type of angle_tol: float |
| angle_tol | Angle tolerance for continuity (degrees). return type of : boolean |
| def cubit.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
| surface_id | ID of the surface to check. return type of : boolean |
| def cubit.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
| def cubit.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
| surface_id | ID of the surface to query. type of radius_threshold: float |
| radius_threshold | Maximum radius criterion for hole detection. If
< 0, defaults to 3 x mesh_size. return type of : boolean |
| def cubit.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
| surface_id | ID of the surface to check. return type of : boolean |
| def cubit.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
| geometry_type | The type of geometry to check. Valid values are
"curve", "surface", or "volume". type of entity_id: int |
| entity_id | The integer ID of the entity to query. return type of : boolean |
| def cubit.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
| element_type | Mesh element type (e.g., "node", "edge", "tri",
"quad", "tet", "hex"). type of element_id: int |
| element_id | ID of the mesh element to test. return type of : boolean |
| def cubit.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
| def cubit.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
| geometry_type | Geometry type ("curve", "surface", or
"volume"). type of entity_id: int |
| entity_id | ID of the entity to check. return type of : boolean |
| def cubit.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
| def cubit.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
| body_id | ID of the body to query. return type of : boolean |
| def cubit.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
| surface_id | ID of the surface to check. type of mesh_size: float |
| mesh_size | Distance threshold for identifying narrow edge
pairs. return type of : boolean |
| def cubit.is_occlusion_on | ( | ) |
Check if occlusion is enabled.
Returns true if occlusion is currently active.
.. code-block:: python
@n return type of : boolean
| def cubit.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
| bc_type_enum | BC type (temperature = 4, convection = 7,
heatflux = 8). type of entity_id: int |
| entity_id | ID of the boundary condition. return type of : boolean |
| def cubit.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
| def cubit.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
| 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 |
true if target_id is a member of
id_list, otherwise false.| def cubit.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
| def cubit.is_periodic | ( | geometry_type, | |
| entity_id | |||
| ) |
Query whether a specified surface or curve is periodic.
.. code-block:: python
| geom_type | Specifies the geometry type ("surface" or
"curve"). type of entity_id: int |
| entity_id | ID of the entity to query. return type of : boolean |
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| geometry_type | Type of the entity ("volume" or "body"). type of entity_id: int |
| entity_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 |
| def cubit.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
| def cubit.is_select_partial_on | ( | ) |
Check if partial selection is enabled.
return type of : boolean
.. code-block:: python
| def cubit.is_sheet_body | ( | volume_id | ) |
Determine if a volume is a sheet body (zero thickness).
.. code-block:: python
@n type of volume_id: int
| volume_id | ID of the volume to query. return type of : boolean |
| def cubit.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
| build_type | Name of the special build to check (e.g.,
"acis", "catia", "ml"). Case-insensitive. return type of : boolean |
| def cubit.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
| surface_id | ID of the surface to test. return type of : boolean |
| def cubit.is_surface_planar | ( | surface_id | ) |
| def cubit.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
| surface_id | ID of the surface to query. return type of : boolean |
| def cubit.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
| filter_type |
Entity type
to test ("vertex", "curve", "surface", "volume",
"node", "edge", "face", etc.). return type of : boolean |
| def cubit.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
| def cubit.is_virtual | ( | geometry_type, | |
| entity_id | |||
| ) |
Query whether a specified geometry entity is virtual.
.. code-block:: python
@n type of geometry_type: string
| geometry_type | The type of geometry ("curve", "surface",
"volume", etc.). type of entity_id: int |
| entity_id | The ID of the entity to query. return type of : boolean |
| def cubit.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
| geometry_type | The type of geometry ("curve", "surface",
"volume", etc.). type of entity_id: int |
| entity_id | The ID of the entity to query. return type of : boolean |
| def cubit.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
| volume_id | ID of the volume to test. return type of : boolean |
| def cubit.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
| def cubit.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
| state | True to enable journaling; false to disable it. |
| def cubit.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.
type of model_type: string, optional
| model_type |
Specifies which data to load:
|
.. code-block:: python
if success: print("Regression models loaded.") else:
| def cubit.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
| entity_type1 | Type of the first geometry entity. type of entity_id1: int |
| entity_id1 | ID of the first geometry entity. type of entity_type2: string |
| entity_type2 | Type of the second geometry entity. type of entity_id2: int |
| entity_id2 |
ID of the second geometry entity.
@n return type of : std::vector< double,std:: allocator< double > > |
| def cubit.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.
type of geom_type: string
| geom_type | Geometry type to train ("volume" or "surface"),
or operation name. return type of : boolean |
.. code-block:: python
if success: print("Training for surface model started successfully.") else:
| def cubit.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
| entity |
The Entity to
translate. type of vector: std::array< double,3 >, in |
| vector | The translation vector (x, y, z). type of preview: boolean, in, optional |
| preview | If true, show a preview without applying (default false). |
| def cubit.number_undo_commands | ( | ) |
Query the number of undoable commands in the stack.
.. code-block:: python
@n return type of : int
| def cubit.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
.. code-block:: python
@n type of type: string
| type |
Entity type
string (e.g., "vertex", "curve", "surface",
"volume"). type of entity_list_string: string |
| entity_list_string | Free-form Cubit selection expression. return type of : std::vector< int,std:: allocator< int > > |
| def cubit.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
| location_str | Cubit location expression string. return type of : std::vector< std::array< double,3 >,std::allocator< std:: array< double,3 > > > |
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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
| message | The text to be printed. |
| def cubit.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
| input_line | Current command-line text being edited. type of order_dependent: int |
| order_dependent | Set to 1 (true) if the key was '?' or '!'; set
to 0 (false) if it was '&'. type of consecutive_dependent: int |
| consecutive_dependent | Set to 1 (true) if the key was '?' (allows repeated help); otherwise 0 (false). |
| def cubit.print_surface_summary_stats | ( | ) |
Print summary statistics for all surfaces in the model.
Title Reported metrics
.. code-block:: python
| def cubit.print_volume_summary_stats | ( | ) |
Print summary statistics for all volumes in the model.
Title Reported metrics
.. code-block:: python
| def cubit.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
| height | Height of the prism. type of sides: int, in |
| sides | Number of sides of the base polygon. type of major: float, in |
| major | Major radius of the base polygon. type of minor: float, in |
| minor | Minor radius of the base polygon. return type of : :py:class: Body |
| def cubit.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 > > > >
| 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: int |
| surface_id | ID of the surface onto which points are
projected. type of quad_id: int |
| quad_id | ID of the quad face used to map unit-square
coordinates. type of node00_id: int |
| node00_id | ID of the quad node corresponding to (u=0,
v=0). type of node10_id: int |
| node10_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 > > > > |
| def cubit.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
| height | Height of the pyramid. type of sides: int, in |
| sides | Number of sides of the base polygon. type of major: float, in |
| major | Major radius of the base polygon. type of minor: float, in |
| minor | Minor radius of the base polygon. type of top: float, in, optional |
| top | Top radius for a truncated pyramid (default =
0, pointed apex). return type of : :py:class: Body |
| def cubit.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
| entity |
The Entity to be
reflected. type of axis: std::array< double,3 >, in |
| axis | The axis (normal) defining the reflection
plane. type of preview: boolean, in, optional |
| preview | If true, show a preview without applying (default false). |
| def cubit.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:
success = cubit.release_interface(iface) if not success: print("Failed to release interface")
@n type of instance: CubitBaseInterface
| instance | Pointer to the CubitBaseInterface to
release. return type of : boolean |
| def cubit.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
| group_id | ID of the group from which the entity will be
removed. type of entity_id: int |
| entity_id | ID of the entity to remove. type of entity_type: string |
| entity_type | Type of the entity (e.g., "vertex", "curve",
"surface", "volume"). Only geometric entities are
supported. return type of : void |
| def cubit.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
| filter_type | Entity type to remove from the pickable set (e.g., "vertex", "curve", "surface", "volume", "node", "edge", "face"). |
| def cubit.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`
| progress |
Shared pointer to the new CubitProgressHandler
instance. return type of : :py:class: CubitProgressHandler
|
| def cubit.reset | ( | ) |
Reset Cubit state.
Clears all geometry and mesh data currently loaded in the session, returning Cubit to its initial state.
.. code-block:: python
| def cubit.reset_camera | ( | ) |
| def cubit.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
| def cubit.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
| entity |
The Entity to
scale. type of factor: float, in |
| factor | The uniform scale factor. type of preview: boolean, in, optional |
| preview | If true, show a preview without applying (default false). |
| def cubit.set_copy_block_on_geometry_copy_setting | ( | val | ) |
Set the behavior for block propagation during geometry copy.
Valid settings:
.. code-block:: python
@n type of val: string
| val | Desired setting ("ON", "USE_ORIGINAL", or
"OFF"). return type of : boolean |
| def cubit.set_copy_nodeset_on_geometry_copy_setting | ( | val | ) |
Set the behavior for nodeset propagation during geometry copy.
Valid settings:
.. code-block:: python
@n type of val: string
| val | Desired setting ("ON", "USE_ORIGINAL", or
"OFF"). return type of : boolean |
| def cubit.set_copy_sideset_on_geometry_copy_setting | ( | val | ) |
Set the behavior for sideset propagation during geometry copy.
Valid settings:
.. code-block:: python
@n type of val: string
| val | Desired setting ("ON", "USE_ORIGINAL", or
"OFF"). return type of : boolean |
| def cubit.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
| interrupt | True to stop interruptible processes, false to allow them. |
| def cubit.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`
| hdlr | Shared pointer to a CubitMessageHandler that will receive messages. |
| def cubit.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
| element_ids | List of element IDs to assign variables
to. type of variable_name: string, in |
| variable_name | Name of the element variable. type of variables: std::vector< double,std::allocator< double > >, in |
| variables | Values for each element (single value applies to all elements). |
| def cubit.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
| entity_type | Type of the entity ("body", "volume",
"surface", "curve", or "vertex"). type of entity_id: int |
| entity_id | ID of the entity to rename. type of new_name: string |
| new_name | The new name to assign to the entity. return type of : boolean |
| def cubit.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`
| hdlr | Pointer to an ExternalExitHandler implementation that will be called when Cubit exits. |
| def cubit.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
| 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. |
| def cubit.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
| entity_type |
Entity type
to label. type of label_flag: int |
| label_flag |
Label display type.
@n return type of : void |
| def cubit.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.
maximum_group_id can desynchronize journal
files or lead to ID collisions.
type of maximum_group_id: int
| maximum_group_id | The desired maximum group ID to enforce (must
equal Cubit's current max ID). return type of : void |
| def cubit.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").
type of path: string
| path | Top-level path to the user training data
directory. type of print_info: boolean, optional |
| print_info | If true, output status messages about directory setup. |
.. code-block:: python
| def cubit.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
| def cubit.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
| node_ids | List of node IDs to assign variables to. type of variable_name: string, in |
| variable_name | Name of the nodal variable. type of variables: std::vector< double,std::allocator< double > >, in |
| variables | Values for each node (single value applies to all nodes). |
| def cubit.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
| maximum_angle | The new maximum angle tolerance (in degrees) to use when testing surface overlaps. |
| def cubit.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
| maximum_gap | The new maximum gap tolerance (in model units) to use when testing surface overlaps. |
| def cubit.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
| min_gap | The new minimum gap tolerance (in model units) to use when testing surface overlaps. |
| def cubit.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
| pick_type |
Entity type
to pick. Valid values include: "vertex", "curve",
"surface", "volume", "node", "edge", "face",
etc. type of silent: boolean, optional |
| silent | If true, suppress the console message confirming the change. Defaults to false (confirmation printed). |
| def cubit.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
| pause | True to pause playback on error; false to continue automatically. |
| def cubit.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
| progress | Shared pointer to a CubitProgressHandler instance. |
| def cubit.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:
WireFrameHiddenLineTrueHiddenLineSmoothShadeTransparentGeomFacetPython example (for reference): .. code-block:: python
type of mode: int
| mode | Integer code for the rendering mode (0-5), corresponding to: 0=WireFrame, 1=HiddenLine, 2=TrueHiddenLine, 3=SmoothShade, 4=Transparent, 5=GeomFacet. |
| def cubit.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
| def cubit.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
| input_string | C-string containing the complete Cubit
command. return type of : boolean |
| def cubit.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 > > >
| locations | A vector of XYZ points to snap. type of entity_type: string |
| entity_type | Type of entity (e.g., "volume", "surface",
"curve"). type of entity_id: int |
| entity_id | ID of the target entity. type of tol: float |
| tol |
Tolerance for snapping to vertices and curves.
@n return type of : std::vector< std::array< double,3 >,std::allocator< std:: array< double,3 > > > |
| def cubit.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
| radius | Radius of the sphere. type of x_cut: int, in, optional |
| x_cut | If 1, cut sphere by the yz-plane (default =
0). type of y_cut: int, in, optional |
| y_cut | If 1, cut sphere by the xz-plane (default =
0). type of z_cut: int, in, optional |
| z_cut | If 1, cut sphere by the xy-plane (default =
0). type of inner_radius: float, in, optional |
| inner_radius | Inner radius for a hollow sphere (default =
0). return type of : :py:class: Body |
| def cubit.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
| def cubit.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
| def cubit.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
| def cubit.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:
.. code-block:: python
@n type of ids: std::vector< int,std::allocator< int > >
| ids | Vector of integer IDs to format. return type of : string |
| def cubit.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
| tool_in | Bodies to subtract (tools). type of from_in: std::vector< CubitInterface::Body,std::allocator< CubitInterface::Body > >, in |
| from_in | Bodies to subtract from (targets). type of imprint_in: boolean, in, optional |
| imprint_in | True to imprint shared geometry (default
false). type of keep_old_in: boolean, in, optional |
| keep_old_in | True to retain the original bodies (default
false). return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > > |
| def cubit.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
| id_in | ID of the surface to retrieve. return type of : :py:class: Surface |
| def cubit.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
| curves | Cross-section curves to sweep. type of along_curves: std::vector< CubitInterface::Curve,std::allocator< CubitInterface::Curve > >, in |
| along_curves | Path curves defining the sweep
trajectory. type of draft_angle: float, in |
| draft_angle | Angle (in degrees) for draft taper (default =
0). type of draft_type: int, in |
| draft_type | Draft type: 0=extended, 1=rounded, 2=natural
(default = 0). type of rigid: boolean, in |
| rigid | If true, maintains cross-section rigidity
(default = false). return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > > |
| def cubit.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
| bc_type_enum | BC type (temperature = 4, convection =
7). type of bc_area_enum: int |
| bc_area_enum | CI_BCEntityTypes: 7 (top), 8 (bottom), 9
(gradient), 10 (middle). type of entity_id: int |
| entity_id | ID of the BC. return type of : boolean |
| def cubit.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
| bc_type_enum | BC type (temperature = 4, convection =
7). type of entity_id: int |
| entity_id | ID of the boundary condition. return type of : boolean |
| def cubit.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
| center_radius | Distance from torus center to center of swept
circle (major radius, must be >
swept_radius). type of swept_radius: float, in |
| swept_radius | Radius of the circle to be swept (minor radius,
must be < center_radius). return type of : :py:class: Body |
| def cubit.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
| curves |
List of Curve objects
to offset. type of distances: std::vector< double,std::allocator< double > >, in |
| distances | List of distances for each curve (in model
units). type of keep_old: boolean, in, optional |
| keep_old | True to retain the original sheet body (default
false). type of preview: boolean, in, optional |
| preview | True to generate a preview without modifying
geometry (default false). return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > > |
| def cubit.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
| curves |
List of Curve objects
to remove. type of keep_old: boolean, in, optional |
| keep_old | True to retain the original sheet body (default
false). type of preview: boolean, in, optional |
| preview | True to generate a preview without modifying
geometry (default false). return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > > |
| def cubit.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 > >
| 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 > > |
| def cubit.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
| surfaces |
List of Surface
objects to remove. type of extend_ajoining: boolean, in, optional |
| extend_ajoining | True to extend adjacent surfaces (default
true). type of keep_old: boolean, in, optional |
| keep_old | True to retain the original body (default
false). type of preview: boolean, in, optional |
| preview | True to generate a preview without modifying
geometry (default false). return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > > |
| def cubit.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
| verts |
List of Vertex
objects to chamfer. type of radius: float, in |
| radius | Chamfer distance (model units). type of keep_old: boolean, in, optional |
| keep_old | True to retain the original sheet body (default
false). type of preview: boolean, in, optional |
| preview | True to generate a preview without modifying
geometry (default false). return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > > |
| def cubit.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
| body_in |
List of Body objects
to unite. type of keep_old_in: boolean, in, optional |
| keep_old_in | True to retain original bodies (default
false). return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > > |
| def cubit.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.
type of model_type: string, optional
| model_type |
Specifies which data to unload:
|
.. code-block:: python
| def cubit.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
| entity_type | Type of the entity ("vertex", "curve",
"surface", "volume"). type of entity_id: int |
| entity_id | ID of the entity to unselect. |
| def cubit.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
| id_in | ID of the vertex to retrieve. return type of : :py:class: Vertex |
| def cubit.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
| id_in | ID of the volume to retrieve. return type of : :py:class: Volume |
| def cubit.volume_contains_tets | ( | volume_id | ) |
Determine whether a specified volume contains any tetrahedral elements.
.. code-block:: python
@n type of volume_id: int
| volume_id | ID of the volume to check. return type of : boolean |
| def cubit.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
| def cubit.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
| words | Text to append to the journal and recording streams. |
| 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 |
| WEDGE15 = _cubit3.WEDGE15 |
| WEDGE16 = _cubit3.WEDGE16 |
| WEDGE20 = _cubit3.WEDGE20 |
| WEDGE21 = _cubit3.WEDGE21 |
| WEDGE6 = _cubit3.WEDGE6 |