CubitInterface

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

It provides an object oriented structure that allows a developer to manipulate objects familiar to Cubit such as bodies, volumes, surfaces, etc. It also allows developers to create and manipulate as well as query geometry.

Class Member Functions

  init Use init to initialize Cubit. Using a blank list as the input parameter is acceptable.
  destroy Closes the current journal file.
  set_cubit_interrupt This sets the global flag in Cubit that stops all interruptable processes.
  set_playback_paused_on_error Sets whether or not playback is paused when an error occurs.
Bool is_playback_paused_on_error Gets whether or not playback is paused when an error occurs.
Bool developer_commands_are_enabled This checks to see whether developer commands are enabled.
str get_version Get the Cubit version.
str get_revision_date Get the Cubit revision date.
str get_build_number Get the Cubit build number.
str get_acis_version Get the Acis version number.
int get_acis_version_as_int Get the Acis version number as an int.
str get_exodus_version Get the Exodus version number.
str get_graphics_version Get the VTK version number.
  print_cmd_options Used to print the command line options.
Bool is_modified Get the modified status of the model.
  set_modified Set the status of the model (is_modified() is now false). If you modify the model after you set this flag, it will register true.
Bool is_undo_save_needed Get the status of the model relative to undo checkpointing.
  set_undo_saved Set the status of the model relative to undo checkpointin.
Bool is_command_echoed Check the echo flag in cubit.
Bool is_volume_meshable Check if volume is meshable with current scheme.
  journal_commands Set the journaling flag in cubit.
Bool is_command_journaled Check the journaling flag in cubit.
str get_current_journal_file Gets the current journal file name.
  cmd Pass a command string into Cubit.
  silent_cmd Pass a command string into Cubit and have it executed without being verbose at the command prompt.
[ int ] parse_cubit_list Parse a Cubit style list of IDs (1,2,4 to 19 by 3 or all) into a list of integers.
  print_raw_help Used to print out help when a ?, & or ! is pressed.
int get_error_count Get the number of errors in the current Cubit session.
[ str ] get_mesh_error_solutions Get the paired list of mesh error solutions and help context cues.
float get_view_distance Get the distance from the camera to the model (from - at).
[ float ] get_view_at Get the camera 'at' point.
[ float ] get_view_from Get the camera 'from' point.
  reset_camera reset the camera in all open windows this includes resetting the view, closing the histogram and color windows and clearing the scalar bar, highlight, and picked entities.
  unselect_entity Unselect an entity that is currently selected.
Bool is_perspective_on Get the current perspective mode.
Bool is_occlusion_on Get the current occlusion mode.
Bool is_scale_visibility_on Get the current scale visibility setting.
Bool is_select_partial_on Get the current select partial setting.
int get_rendering_mode Get the current rendering mode.
  set_rendering_mode Set the current rendering mode.
  clear_preview Clear preview graphics without affecting other display settings.
str get_pick_type Get the current pick type.
float get_mesh_edge_length Get the length of a mesh edge.
float get_meshed_volume_or_area Get the total volume/area of a entity's mesh.
int get_mesh_intervals Get the interval count for a specified entity.
float get_mesh_size Get the mesh size for a specified entity.
float get_auto_size Get the auto size for a given set of volumes. Note, this does not actually set the interval size on the volumes. It simply returns the size that would be set if an 'size auto factor n' command were issued.
float get_quality_value Get the metric value for a specified mesh entity.
str get_mesh_scheme Get the mesh scheme for the specified entity.
str get_mesh_scheme_firmness Get the mesh scheme firmness for the specified entity.
str get_mesh_interval_firmness Get the mesh interval firmness for the specified entity.
Bool is_meshed Determines whether a specified entity is meshed.
Bool is_merged Determines whether a specified entity is merged.
str get_smooth_scheme Get the smooth scheme for a specified entity.
int get_hex_count Get the count of hexes in the model.
int get_pyramid_count Get the count of pyramids in the model.
int get_tet_count Get the count of tets in the model.
int get_quad_count Get the count of quads in the model.
int get_tri_count Get the count of tris in the model.
int get_edge_count Get the count of edges in the model.
int get_node_count Get the count of nodes in the model.
str get_element_count Get the number of elements which have been assigned to a block, given a global element id, and will be exported.
int get_volume_element_count Get the count of hexes, tets, pyramids, and wedges in a volume. NOTE: This count does not distinguish between elements which have been put into a block or not.
int get_surface_element_count Get the count of quads, and triangles in a surface. NOTE: This count does not distinguish between elements which have been put into a block or not.
Bool volume_contains_tets Determine whether a volume contains tets.
[ int ] get_hex_sheet Get the list of hex elements forming a hex sheet through the given two node ids. The nodes must be adjacent in the connectivity of the hex i.e. they form an edge of the hex.
Bool is_visible Query visibility for a specific entity.
Bool is_virtual Query virtualality for a specific entity.
Bool contains_virtual Query virtualality of an entity's children.
[ int ] get_source_surfaces Get a list of a volume's sweep source surfaces.
[ int ] get_target_surfaces Get a list of a volume's sweep target surfaces.
int get_common_curve_id Given 2 surfaces, get the common curve id.
int get_common_vertex_id Given 2 curves, get the common vertex id.
str get_merge_setting Get the merge setting for a specified entity.
str get_curve_type Get the curve type for a specified curve.
str get_surface_type Get the surface type for a specified surface.
[ float ] get_surface_normal Get the surface normal for a specified surface.
[ float ] get_surface_centroid Get the surface centroid for a specified surface.
str get_surface_sense Get the surface sense for a specified surface.
[ str ] get_entity_modeler_engine Get the modeler engine type for a specified entity.
[ float ] get_bounding_box Get the bounding box for a specified entity.
[ float ] get_total_bounding_box Get the bounding box for a list of entities.
float get_total_volume Get the total volume for a list of volume ids.
str get_entity_name Get the name of a specified entity.
int get_entity_color_index Get the color of a specified entity.
Bool is_multi_volume Query whether a specified body is a multi volume body.
Bool is_sheet_body Query whether a specified volume is a sheet body.
Bool is_interval_count_odd Query whether a specified surface has an odd loop.
Bool is_periodic Query whether a specified surface or curve is periodic.
Bool is_surface_planar Query whether a specified surface is planer.
Bool get_undo_enabled  
int number_undo_commands  
[ str ] get_aprepro_vars Gets the current aprepro variable names.
str get_aprepro_value_as_string Gets the string value of an aprepro variable.
Bool get_node_constraint Query current setting for node constraint (move nodes to geometry).
str get_vertex_type Get the Vertex Types for a specified vertex on a specified surface. Vertex types include "side", "end", "reverse", "unknown".
[ int ] get_relatives Get the relatives (parents/children) of a specified entity.
[ int ] get_adjacent_surfaces Get a list of adjacent surfaces to a specified entity.
[ int ] get_adjacent_volumes Get a list of adjacent volumes to a specified entity.
[ int ] get_entities Get all geometry entities of a specified type.
[ int ] get_list_of_free_ref_entities Get all free entities of a given geometry type.
int get_owning_body Get the owning body for a specified entity.
int get_owning_volume Get the owning volume for a specified entity.
int get_owning_volume_by_name Get the owning volume for a specified entity.
float get_curve_length Get the length of a specified curve.
float get_arc_length Get the arc length of a specified curve.
float get_distance_from_curve_start Get the distance from a point on a curve to the curve's start point.
float get_curve_radius Get the radius of a specified arc.
[ float ] get_curve_center Get the center point of the arc.
float get_surface_area Get the area of a surface.
float get_volume_area Get the area of a volume.
float get_hydraulic_radius_surface_area Get the area of a hydraulic surface.
float get_hydraulic_radius_volume_area Get the area of a hydraulic volume.
[ float ] get_center_point Get the center point of a specified entity.
int get_valence Get the valence for a specific vertex.
float get_distance_between Get the distance between two vertices.
  print_surface_summary_stats Print the surface summary stats to the console.
  print_volume_summary_stats Print the volume summary stats to the console.
int get_volume_count Get the current number of volumes.
int get_body_count Get the current number of bodies.
int get_surface_count Get the current number of surfaces.
int get_vertex_count Get the current number of vertices.
int get_curve_count Get the current number of curves.
int get_curve_count Get the current number of curves in the passed-in volumes.
Bool is_catia_engine_available Determine whether catia engine is available.
[ int ] evaluate_exterior_angle find all curves in the given list with an exterior angle (the angle between surfaces) less than the test angle. This is equivalent to the df parser "exterior_angle" test. (draw curve with exterior_angle >90)
[ int ] get_small_curves Get the list of small curves for a list of volumes.
[ int ] get_smallest_curves Get a list of the smallest curves in the list of volumes. The number returned is specified by 'num_to_return'.
[ int ] get_small_surfaces Get the list of small surfaces for a list of volumes.
[ int ] get_narrow_surfaces Get the list of narrow surfaces for a list of volumes.
[ int ] get_small_and_narrow_surfaces Get the list of small or narrow surfaces from a list of volumes.
[ int ] get_surfs_with_narrow_regions Get the list of surfaces with narrow regions.
[ int ] get_small_volumes Get the list of small volumes from a list of volumes.
[ int ] get_blend_surfaces Get the list of blend surfaces for a list of volumes.
[ int ] get_small_loops Get the list of close loops (surfaces) for a list of volumes.
[ int ] get_tangential_intersections Get the list of bad tangential intersections for a list of volumes.
[ int ] get_coincident_vertices  
[ [ str ] ] get_solutions_for_near_coincident_vertices Get lists of display strings and command strings for near coincident vertices.
[ [ str ] ] get_solutions_for_imprint_merge Get lists of display strings and command strings for imprint/merge solutions.
[ [ str ] ] get_solutions_for_small_surfaces Get lists of display, preview and command strings for small surface solutions.
[ [ str ] ] get_solutions_for_small_curves Get lists of display, preview and command strings for small curve solutions.
[ [ str ] ] get_solutions_for_surfaces_with_narrow_regions Get lists of display, preview and command strings for surfaces with narrow regions solutions.
[ int ] get_overlapping_volumes Get the list of overlapping volumes for a list of volumes.
[ [ int ] ] get_mergeable_vertices Get the list of mergeable vertices from a list of volumes/bodies.
[ [ str ] ] get_solutions_for_blends Get the solution list for a given blend surface.
[ [ int ] ] get_blend_chains Queries the blend chains for a surface.
float get_merge_tolerance Get the current merge tolerance value.
str get_exodus_entity_name Get the name associated with an exodus entity.
str get_exodus_entity_description Get the description associated with an exodus entity.
[ float ] get_all_exodus_times Open an exodus file and get a vector of all stored time stamps.
int get_block_id Get the associated block id for a specific curve, surface, or volume.
[ int ] get_block_ids Get list of block ids from a mesh geometry file.
[ int ] get_block_id_list Get a list of all blocks.
[ int ] get_nodeset_id_list Get a list of all nodesets.
[ int ] get_sideset_id_list Get a list of all sidesets.
[ int ] get_bc_id_list Get a list of all bcs of a specified type.
str get_bc_name Get the name for the specified bc.
[ int ] get_nodeset_id_list_for_bc Get a list of all nodesets the specified bc is applied to.
[ int ] get_sideset_id_list_for_bc Get a list of all sidesets the specified bc is applied to.
int get_next_sideset_id Get a next available sideset id.
int get_next_nodeset_id Get a next available nodeset id.
int get_next_block_id Get a next available block id.
[ int ] get_block_volumes Get a list of volume ids associated with a specific block.
[ int ] get_block_surfaces Get a list of surface associated with a specific block.
[ int ] get_block_curves Get a list of curve associated with a specific block.
[ int ] get_block_vertices Get a list of vertices associated with a specific block.
[ int ] get_block_nodes Get a list of nodes associated with a specific block.
[ int ] get_block_edges Get a list of edges associated with a specific block.
[ int ] get_block_tris Get a list of tris associated with a specific block.
[ int ] get_block_faces Get a list of faces associated with a specific block.
[ int ] get_block_pyramids Get a list of pyramids associated with a specific block.
[ int ] get_block_tets Get a list of tets associated with a specific block.
[ int ] get_block_hexes Get a list of hexes associated with a specific block.
[ int ] get_volume_hexes get the list of any hex elements in a given volume
[ int ] get_volume_tets get the list of any tet elements in a given volume
[ int ] get_nodeset_volumes Get a list of volume ids associated with a specific nodeset.
[ int ] get_nodeset_surfaces Get a list of surface ids associated with a specific nodeset.
[ int ] get_nodeset_curves Get a list of curve ids associated with a specific nodeset.
[ int ] get_nodeset_vertices Get a list of vertex ids associated with a specific nodeset.
[ int ] get_nodeset_nodes Get a list of node ids associated with a specific nodeset. This only returns the nodes that were specifically assigned to this nodeset. If the nodeset was created as a piece of geometry, get_nodeset_nodes will not return the nodes on that geometry See also get_nodeset_nodes_inclusive.
[ int ] get_nodeset_nodes_inclusive Get a list of node ids associated with a specific nodeset. This includes all nodes specifically assigned to the nodeset, as well as nodes associated to a piece of geometry which was used to define the nodeset.
[ int ] get_sideset_curves Get a list of curve ids associated with a specific sideset.
[ int ] get_curve_edges get the list of any edge elements on a given curve
[ int ] get_sideset_surfaces Get a list of any surfaces in a sideset.
[ int ] get_sideset_quads Get a list of any quads in a sideset.
[ int ] get_surface_quads get the list of any quad elements on a given surface
[ int ] get_surface_tris get the list of any tri elements on a given surface
str get_entity_sense Get the sense of a sideset item.
str get_wrt_entity Get the with-respect-to entity.
Bool is_using_shells Get the shell use for a sideset.
[ str ] get_geometric_owner Get a list of geometric owners given a list of mesh entities.
[ int ] get_volume_nodes Get list of node ids owned by a volume. Excludes nodes owned by bounding surfs, curves and verts.
[ int ] get_surface_nodes Get list of node ids owned by a surface. Excludes nodes owned by bounding curves and verts.
[ int ] get_curve_nodes Get list of node ids owned by a curve. Excludes nodes owned by bounding vertices.
int get_vertex_node Get the node owned by a vertex.
int get_id_from_name Get id for a named entity.
[ int ] get_group_groups Get group groups (groups that are children of another group).
[ int ] get_group_bodies Get group bodies (bodies that are children of a group).
[ int ] get_group_volumes Get group volumes (volumes that are children of a group).
[ int ] get_group_surfaces Get group surfaces (surfaces that are children of a group).
[ int ] get_group_curves Get group curves (curves that are children of a group).
[ int ] get_group_vertices Get group vertices (vertices that are children of a group).
[ int ] get_group_nodes Get group nodes (nodes that are children of a group).
[ int ] get_group_edges Get group edges (edges that are children of a group).
[ int ] get_group_quads Get group quads (quads that are children of a group).
[ int ] get_group_tris Get group tris (tris that are children of a group).
[ int ] get_group_tets Get group tets (tets that are children of a group).
[ int ] get_group_hexes Get group hexes (hexes that are children of a group).
int get_next_group_id Get the next available group id from Cubit.
  delete_all_groups Delete all groups.
  delete_group Delete a specific group.
  set_max_group_id Reset Cubit's max group id This is really dangerous to use and exists only to overcome a limitation with Cubit. Cubit keeps track of the next group id to assign. But those ids just keep incrementing in Cubit. Some of the power tools in the Cubit GUI make groups 'under the covers' for various operations. The groups are immediately deleted. But, creating those groups will cause Cubit's group id to increase and downstream journal files may be messed up because those journal files are expecting a certain ID to be available.
int create_new_group Create a new group.
  remove_entity_from_group Remove a specific entity from a specific group.
  add_entity_to_group Add a specific entity to a specific group.
[ int ] get_mesh_group_parent_ids Get the group ids which are parents to the indicated mesh element.
Bool is_mesh_element_in_group Indicates whether a mesh element is in a group.
Bool is_part_of_list Routine to check for the presence of an id in a list of ids.
int get_last_id Get the id of the last created entity of the given type.
str get_assembly_classification_level Get Classification Level for metadata.
str get_assembly_classification_category Get Classification Category for metadata.
str get_assembly_weapons_category Get Weapons Category for metadata.
str get_assembly_metadata Get metadata for a specified volume id.
Bool is_assembly_metadata_attached Determine whether metadata is attached to a specified volume.
str get_assembly_name Get the stored name of an assembly node.
str get_assembly_path Get the stored path of an assembly node.
str get_assembly_description Get the stored description of an assembly node.
int get_assembly_instance Get the stored instance number of an assembly node.
str get_assembly_file_format Get the stored file format of an assembly node.
str get_assembly_units Get the stored units measure of an assembly node.
str get_assembly_material_description Get the stored material description of an assembly part.
str get_assembly_material_specification Get the stored material specification of an assembly part.
int get_exodus_id Get the exodus/genesis id for this element.
str get_geometry_owner Get the geometric owner of this mesh element.
[ int ] get_connectivity Get the list of node ids contained within a mesh entity.
[ int ] get_expanded_connectivity Get the list of node ids contained within a quadratic mesh entity, including interior nodes.
[ int ] get_sub_elements Get the lower dimesion entities associated with a higher dimension entities. For example get the faces associated with a hex or the edges associated with a tri.
[ float ] get_nodal_coordinates Get the nodal coordinates for a given node id.
Bool get_node_position_fixed Query "fixedness" state of node. A fixed node is not affecting by smoothing.
str get_sideset_element_type Get the element type of a sideset.
str get_block_element_type Get the element type of a block.
int get_exodus_element_count Get the number of elements in a exodus entity.
int get_block_attribute_count Get the number of attributes in a block.
float get_block_attribute_value Get a specific block attribute value.
[ str ] get_valid_block_element_types Get a list of potential element types for a block.
int get_nodeset_node_count Get the number of nodes in a nodeset.
int get_geometry_node_count  
str get_mesh_element_type Get the mesh element type contained in the specified geometry.
Bool is_on_thin_shell Determine whether a BC is on a thin shell. Valid for temperature, convection and heatflux.
Bool temperature_is_on_solid Determine whether a BC temperature is on a solid. Valid for convection and temperature.
Bool convection_is_on_solid Determine whether a BC convection is on a solid. Valid for convection.
Bool convection_is_on_shell_area Determine whether a BC convection is on a shell top or bottom. Valid for convection.
float get_convection_coefficient Get the convection coefficient.
float get_bc_temperature Get the temperature. Valid for convection, temperature.
Bool temperature_is_on_shell_area Determine whether a BC temperature is on a shell area. Valid for convection and temperature and on top, bottom, gradient, and middle.
Bool heatflux_is_on_shell_area Determine whether a BC heatflux is on a shell area.
float get_heatflux_on_area Get the heatflux on a specified area.
int get_cfd_type Get the cfd subtype for a specified cfd BC.
float get_contact_pair_friction_value Get the contact pair's friction value.
float get_contact_pair_tolerance_value Get the contact pair's tolerance value.
Bool get_contact_pair_tied_state Get the contact pair's tied state.
Bool get_contact_pair_general_state Get the contact pair's general state.
Bool get_contact_pair_exterior_state Get the contact pair's exterior state.
int get_displacement_coord_system Get the displacement's coordinate system id.
str get_displacement_combine_type Get the displacement's combine type which is "Overwrite", "Average", "SmallestCombine", or "LargestCombine".
float get_pressure_value Get the pressure value.
str get_pressure_function Get the pressure function.
float get_force_magnitude Get the force magnitude from a force.
float get_moment_magnitude Get the moment magnitude from a force.
[ float ] get_force_direction_vector Get the direction vector from a force.
[ float ] get_force_moment_vector Get the moment vector from a force.
str get_constraint_type Get the type of a specified constraint.
str get_constraint_reference_point Get the reference point of a specified constraint.
str get_constraint_dependent_entity_point Get the dependent entity of a specified constraint.
float get_material_property  
int get_media_property  
[ str ] get_material_name_list  
[ str ] get_media_name_list  
  set_label_type  
int get_label_type  
Body body Gets the body object from an ID.
Volume volume Gets the volume object from an ID.
Surface surface Gets the surface object from an ID.
Curve curve Gets the curve object from an ID.
Vertex vertex Gets the vertex object from an ID.
  reset Executes a reset within cubit.
Body brick Creates a brick of specified width, depth, and height.
Body sphere Creates all or part of a sphere.
Body prism Creates a prism of the specified dimensions.
Body pyramid Creates a pyramid of the specified dimensions.
Body cylinder creates a cylinder of the specified dimensions
Body torus creates a torus of the specified dimensions
Vertex create_vertex Creates a vertex at a x,y,z.
Curve create_curve Creates a curve between two vertices.
Body create_surface Creates a surface from boundary curves.
[ Body] sweep_curve Create a Body or a set of Bodies from a swept curve.
Body copy_body Creates a copy of the input Body.
[ Body] tweak_surface_offset Performs a tweak surface offset command.
[ Body] tweak_surface_remove Removes a surface from a body and extends the surrounding surfaces if extend_ajoining is true.
[ Body] tweak_curve_remove Removes a curve from a body and extends the surrounding surface to fill the gap.
[ Body] tweak_curve_offset Performs a tweak curve offset command.
[ Body] tweak_vertex_fillet Performs a tweak vertex fillet command.
[ Body] subtract Performs a boolean subtract operation.
[ Body] unite Performs a boolean unite operation.
  move Moves the Entity the specified vector.
  scale Scales the Entity according to the specified factor.
  reflect Reflect the Entity about the specified axis.
[ int ] get_volumes_for_node  
int get_mesh_error_count  

Class Variables

const int CI_ERROR -

Member Function Documentation


init(argv)

Use init to initialize Cubit. Using a blank list as the input parameter is acceptable.

Parameters

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

destroy()

Closes the current journal file.

set_cubit_interrupt(interrupt)

This sets the global flag in Cubit that stops all interruptable processes.

Parameters

interrupt Boolean set to TRUE if process is to be stopped

set_playback_paused_on_error(pause)

Sets whether or not playback is paused when an error occurs.

Parameters

pause True if playback should be paused when an error occurs.

Bool is_playback_paused_on_error()

Gets whether or not playback is paused when an error occurs.

Return

True if playback should be paused when an error occurs.


Bool developer_commands_are_enabled()

This checks to see whether developer commands are enabled.

Return

True if developer commands are enabled, otherwise False


str get_version()

Get the Cubit version.

Return

A string containing the current version of Cubit


str get_revision_date()

Get the Cubit revision date.

Return

A string containing Cubit's last date of revision


str get_build_number()

Get the Cubit build number.

Return

A string containing the current Cubit build number


str get_acis_version()

Get the Acis version number.

Return

A string containing the Acis version number


int get_acis_version_as_int()

Get the Acis version number as an int.

Return

An integer containing the Acis version number


str get_exodus_version()

Get the Exodus version number.

Return

A string containing the Exodus version number


str get_graphics_version()

Get the VTK version number.

Return

A string containing the VTK version number


print_cmd_options()

Used to print the command line options.

Bool is_modified()

Get the modified status of the model.

Return

A boolean indicating whether the model has been modified


set_modified()

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

Bool is_undo_save_needed()

Get the status of the model relative to undo checkpointing.

Return

A boolean indicating whether the model has been modified


set_undo_saved()

Set the status of the model relative to undo checkpointin.

Bool is_command_echoed()

Check the echo flag in cubit.

Return

A boolean indicating whether commands should be echoed in Cubit


Bool is_volume_meshable(volume_id)

Check if volume is meshable with current scheme.

Parameters

volume_id  

Return

A boolean indicating whether volume is meshable with current scheme


journal_commands(state)

Set the journaling flag in cubit.

Parameters

state A boolean that turns journaling on (1) and off (0)

Bool is_command_journaled()

Check the journaling flag in cubit.

Return

A boolean indicating whether commands are journaled by Cubit


str get_current_journal_file()

Gets the current journal file name.

Return

The current journal file name.


cmd(input_string)

Pass a command string into Cubit.

Example

 cubit.cmd("brick x 10")

Parameters

input_string Pointer to a string containing a complete Cubit command

silent_cmd(input_string)

Pass a command string into Cubit and have it executed without being verbose at the command prompt.

Example

 cubit.silent_cmd("display")

Parameters

input_string Pointer to a string containing a complete Cubit command

[ int ] parse_cubit_list(type, int_list)

Parse a Cubit style list of IDs (1,2,4 to 19 by 3 or all) into a list of integers.

Parameters

type The specific entity type represented by the list of IDs
int_list The string that contains the user's ID list

Return

A vector of validated integers


print_raw_help(input_line, order_dependent, consecutive_dependent)

Used to print out help when a ?, & or ! is pressed.

Parameters

input_line The current command line being typed by the user
order_dependent Is set to '1' if the key pressed is not &, otherwise '0'
consecutive_dependent Is set to '1' if the pressed is '?', otherwise '0'

int get_error_count()

Get the number of errors in the current Cubit session.

Return

The number of errors in the Cubit session.


[ str ] get_mesh_error_solutions(error_code)

Get the paired list of mesh error solutions and help context cues.

Parameters

error_code The error code associated with the error solution

Return

List of 'married' strings. First string is solution text. Second string is help context cue. Third string is command_panel cue.


float get_view_distance()

Get the distance from the camera to the model (from - at).

Return

Distance from the camera to the model


[ float ] get_view_at()

Get the camera 'at' point.

Return

The xyz coordinates of the camera's current position


[ float ] get_view_from()

Get the camera 'from' point.

Return

The xyz coordinates of the camera's from position


reset_camera()

reset the camera in all open windows this includes resetting the view, closing the histogram and color windows and clearing the scalar bar, highlight, and picked entities.

unselect_entity(entity_type, entity_id)

Unselect an entity that is currently selected.

Example

 cubit.unselect_entity("curve", 221)

Parameters

entity_type The type of the entity to be unselected
entity_id The ID of the entity to be unselected

Bool is_perspective_on()

Get the current perspective mode.

Return

True if perspective is on, otherwise false


Bool is_occlusion_on()

Get the current occlusion mode.

Return

True if occlusion is on, otherwise false


Bool is_scale_visibility_on()

Get the current scale visibility setting.

Return

True if scale is visible, otherwise false


Bool is_select_partial_on()

Get the current select partial setting.

Return

True if partial select is on, otherwise false


int get_rendering_mode()

Get the current rendering mode.

Return

The current rendering mode of the graphics subsystem


set_rendering_mode(mode)

Set the current rendering mode.

Parameters

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

clear_preview()

Clear preview graphics without affecting other display settings.

str get_pick_type()

Get the current pick type.

Return

The current pick type of the graphics system


float get_mesh_edge_length(edge_id)

Get the length of a mesh edge.

Parameters

edge_id Specifies the id of the edge

Return

The length of the mesh edge


float get_meshed_volume_or_area(geom_type, entity_ids)

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

Example

 area = cubit.get_meshed_volume_or_area("volume", 1)

Parameters

geom_type Specifies the type of entity - volume, surface, hex, tet, tri, quad
entity_ids A list of ids for the entity type

Return

The entity's meshed volume or area


int get_mesh_intervals(geom_type, entity_id)

Get the interval count for a specified entity.

Example

 intervals = cubit.get_mesh_intervals("surface", 12)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

The entity's interval count


float get_mesh_size(geom_type, entity_id)

Get the mesh size for a specified entity.

Example

 mesh_size = cubit.get_mesh_size("volume", 2)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

The entity's mesh size


float get_auto_size(volume_id_list, size)

Get the auto size for a given set of volumes. Note, this does not actually set the interval size on the volumes. It simply returns the size that would be set if an 'size auto factor n' command were issued.

Example

 double get_auto_size(volume_list)

Parameters

volume_id_list  
size The auto factor for the AutoSizeTool

Return

The interval size from the AutoSizeTool


float get_quality_value(mesh_type, mesh_id, metric_name)

Get the metric value for a specified mesh entity.

Parameters

mesh_type Specifies the mesh entity type (hex, tet, tri, quad)
mesh_id Specifies the id of the mesh entity
metric_name Specifies the name of the metric (skew, taper, jacobian, etc)

Return

The value of the quality metric


str get_mesh_scheme(geom_type, entity_id)

Get the mesh scheme for the specified entity.

Example

 scheme = cubit.get_mesh_scheme("surface", 12)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

The entity's meshing scheme


str get_mesh_scheme_firmness(geom_type, entity_id)

Get the mesh scheme firmness for the specified entity.

Example

 firmness = cubit.get_mesh_firmness("surface", 12)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

The entity's meshing firmness (HARD, LIMP, SOFT, etc)


str get_mesh_interval_firmness(geom_type, entity_id)

Get the mesh interval firmness for the specified entity.

Example

 firmness = cubit.get_mesh_interval_firmness("surface", 12)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

The entity's meshing firmness (HARD, LIMP, SOFT, etc)


Bool is_meshed(geom_type, entity_id)

Determines whether a specified entity is meshed.

Example

 if cubit.is_meshed("surface", 137):

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Bool is_merged(geom_type, entity_id)

Determines whether a specified entity is merged.

Example

 if cubit.is_merged("surface", 137):

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

str get_smooth_scheme(geom_type, entity_id)

Get the smooth scheme for a specified entity.

Example

 smooth_scheme = cubit.get_smooth_scheme("curve", 122)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

The smooth scheme associated with the entity


int get_hex_count()

Get the count of hexes in the model.

Return

The number of hexes in the model


int get_pyramid_count()

Get the count of pyramids in the model.

Return

The number of pyramids in the model


int get_tet_count()

Get the count of tets in the model.

Return

The number of tets in the model


int get_quad_count()

Get the count of quads in the model.

Return

The number of quads in the model


int get_tri_count()

Get the count of tris in the model.

Return

The number of tris in the model


int get_edge_count()

Get the count of edges in the model.

Return

The number of edges in the model


int get_node_count()

Get the count of nodes in the model.

Return

The number of nodes in the model


int get_element_count()

Get the number of elements which have been assigned to a block, given a global element id, and will be exported.

Return

The number of elements in the model


int get_volume_element_count(volume_id)

Get the count of hexes, tets, pyramids, and wedges in a volume. NOTE: This count does not distinguish between elements which have been put into a block or not.

Parameters

volume_id  

Return

The number of elements (hexes, tets, wedges, and pyramids) in a volume


int get_surface_element_count(surface_id)

Get the count of quads, and triangles in a surface. NOTE: This count does not distinguish between elements which have been put into a block or not.

Parameters

surface_id  

Return

The number of elements (both quads and tris) in a surface


Bool volume_contains_tets(volume_id)

Determine whether a volume contains tets.

Parameters

volume_id  

Return

bool


[ int ] get_hex_sheet(node_id_1, node_id_2)

Get the list of hex elements forming a hex sheet through the given two node ids. The nodes must be adjacent in the connectivity of the hex i.e. they form an edge of the hex.

Parameters

node_id_1  
node_id_2  

Return

A list of hex ids in the hex sheet


Bool is_visible(geom_type, entity_id)

Query visibility for a specific entity.

Example

 if cubit.is_visible("volume", 4)):

ERROR: EOF in multi-line statement

 

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Bool is_virtual(geom_type, entity_id)

Query virtualality for a specific entity.

Example

 if cubit.is_virtual("surface", 134)):

ERROR: EOF in multi-line statement

 

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Bool contains_virtual(geom_type, entity_id)

Query virtualality of an entity's children.

Example

 if cubit.contains_virtual("surface", 134)):

ERROR: EOF in multi-line statement

 

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

[ int ] get_source_surfaces(volume_id)

Get a list of a volume's sweep source surfaces.

Parameters

volume_id Specifies the volume id

Return

List of surface ids


[ int ] get_target_surfaces(volume_id)

Get a list of a volume's sweep target surfaces.

Parameters

volume_id Specifies the volume id

Return

List of surface ids


int get_common_curve_id(surface_1_id, surface_2_id)

Given 2 surfaces, get the common curve id.

Parameters

surface_1_id The id of one of the surfaces
surface_2_id The id of the other surface

Return

The id of the curve common to the two surfaces


int get_common_vertex_id(curve_1_id, curve_2_id)

Given 2 curves, get the common vertex id.

Parameters

curve_1_id The id of one of the curves
curve_2_id The id of the other curves

Return

The id of the vertex common to the two curves, 0 if there is none


str get_merge_setting(geom_type, entity_id)

Get the merge setting for a specified entity.

Example

 merge_setting = cubit.get_merge_setting("surface", 33)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

A text string that indicates the merge setting for the entity


str get_curve_type(curve_id)

Get the curve type for a specified curve.

Parameters

curve_id ID of the curve

Return

Type of curve


str get_surface_type(surface_id)

Get the surface type for a specified surface.

Parameters

surface_id ID of the surface

Return

Type of surface


[ float ] get_surface_normal(surface_id)

Get the surface normal for a specified surface.

Parameters

surface_id ID of the surface

Return

surface normal at the center


[ float ] get_surface_centroid(surface_id)

Get the surface centroid for a specified surface.

Parameters

surface_id ID of the surface

Return

surface centroid


str get_surface_sense(surface_id)

Get the surface sense for a specified surface.

Parameters

surface_id ID of the surface

Return

surface sense as "Reversed" or "Forward" or "Both"


[ str ] get_entity_modeler_engine(geom_type, entity_id)

Get the modeler engine type for a specified entity.

Example

 engine_list = cubit.get_entity_modeler_engine("surface", 47)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

A vector of modeler engines associated with this entity


[ float ] get_bounding_box(geom_type, entity_id)

Get the bounding box for a specified entity.

Example

 vector_list = cubit.get_bounding_box("surface", 22)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

A vector of coordinates describing the entity's bounding box. Ten (10) values will be returned in axis-min, axis-max, and axis-range order, repeated for x-axis, y-axis, and z-axis and ending with the total diagonal measure.


[ float ] get_total_bounding_box(geom_type, entity_list)

Get the bounding box for a list of entities.

Example

 vector_list = cubit.get_total_bounding_box("surface", entity_list)

Parameters

geom_type Specifies the geometry type of the entity
entity_list List of ids associated with geom_type

Return

A vector of coordinates for the entity's bounding box. Twelve (12) values will be returned in xyz set order repeated four (4) times per set.


float get_total_volume(volume_list)

Get the total volume for a list of volume ids.

Parameters

volume_list List of volume ids

Return

The total volume of all volumes indicated in the id list


str get_entity_name(geom_type, entity_id)

Get the name of a specified entity.

Example

 name = cubit.get_entity_name("vertex", 22)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

The name of the entity


int get_entity_color_index(entity_type, entity_id)

Get the color of a specified entity.

Example

 color_index = cubit.get_entity_color_index("curve", 33)

Parameters

entity_type Specifies the type of the entity
entity_id Specifies the id of the entity

Return

The color of the entity


Bool is_multi_volume(body_id)

Query whether a specified body is a multi volume body.

Parameters

body_id Id of the body

Return

True if body contains multiple volumes, otherwise false.


Bool is_sheet_body(volume_id)

Query whether a specified volume is a sheet body.

Parameters

volume_id Id of the volume

Return

True if volume is a sheet body, otherwise false


Bool is_interval_count_odd(surface_id)

Query whether a specified surface has an odd loop.

Parameters

surface_id Id of the surface

Return

True if surface is/contains an odd looop, otherwise false.


Bool is_periodic(geom_type, entity_id)

Query whether a specified surface or curve is periodic.

Example

 if cubit.is_periodic("surface", 22):

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

True is entity is periodic, otherwise false


Bool is_surface_planar(surface_id)

Query whether a specified surface is planar.

Example

 if cubit.is_surface_planar(22):

Parameters

surface_id Specifies the id of the surface

Return

True is surface is planar, otherwise false


Bool get_undo_enabled()


int number_undo_commands()


[ str ] get_aprepro_vars()

Gets the current aprepro variable names.

str get_aprepro_value_as_string(var_name)

Gets the string value of an aprepro variable.

Parameters

var_name  

Bool get_node_constraint()

Query current setting for node constraint (move nodes to geometry).

Return

True if constrained, otherwise false


str get_vertex_type(surface_id, vertex_id)

Get the Vertex Types for a specified vertex on a specified surface. Vertex types include "side", "end", "reverse", "unknown".

Parameters

surface_id Id of the surface associated with the vertex
vertex_id Id of the vertex

Return

The type -- "side", "end", "reverse", or "unknown"


[ int ] get_relatives(source_geom_type, source_id, target_geom_type)

Get the relatives (parents/children) of a specified entity.

Example

 curve_list = cubit.get_relatives("surface", 12, "curve")

Parameters

source_geom_type The entity type of the source entity
source_id The id of the source entity
target_geom_type The target geometry type

Return

A list of ids of the target geometry type


[ int ] get_adjacent_surfaces(geom_type, entity_id)

Get a list of adjacent surfaces to a specified entity.

Example

 surface_id_list = cubit.get_adjacent_surfaces("curve", 22)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

A list of surfaces ids


[ int ] get_adjacent_volumes(geom_type, entity_id)

Get a list of adjacent volumes to a specified entity.

Example

 volume_id_list = cubit.get_adjacent_volumes("curve", 22)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

A list of volume ids


[ int ] get_entities(entity_type)

Get all entities of a specified type.

Example

 entity_id_list = cubit.get_entities("volume")

Parameters

entity_type Specifies the type of the entity

Return

A list of ids of the specified geometry type


[ int ] get_list_of_free_ref_entities(geom_type)

Get all free entities of a given geometry type.

Example

 free_curve_id_list = cubit.get_list_of_free_ref_entities("curve")

Parameters

geom_type Specifies the geometry type of the free entity

Return

A list of ids of the specified geometry type


int get_owning_body(geom_type, entity_id)

Get the owning body for a specified entity.

Example

 body_id = cubit.get_owning_body("curve", 12)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

ID of the specified entity's owning body


int get_owning_volume(geom_type, entity_id)

Get the owning volume for a specified entity.

Example

 volume_id = cubit.get_owning_volume("curve", 12)

Parameters

geom_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

ID of the specified entity's owning volume


int get_owning_volume_by_name(entity_name)

Get the owning volume for a specified entity.

Example

 volume_id = cubit.get_owning_volume_by_name("TipSurface")

Parameters

entity_name Specifies the name (supplied by Cubit) of the entity

Return

ID of the specified entity's owning volume or 0 if name is unknown


float get_curve_length(curve_id)

Get the length of a specified curve.

Parameters

curve_id ID of the curve

Return

Length of the curve


float get_arc_length(curve_id)

Get the arc length of a specified curve.

Parameters

curve_id ID of the curve

Return

Arc length of the curve


float get_distance_from_curve_start(x, y, z, curve_id)

Get the distance from a point on a curve to the curve's start point.

Parameters

x value of the point to measure
y value of the point to measure
z value of the point to measure
curve_id ID of the curve

Return

Distance from the xyz to the curve start


float get_curve_radius(curve_id)

Get the radius of a specified arc.

Parameters

curve_id ID of the curve

Return

Radius of the curve


[ float ] get_curve_center(curve_id)

Get the center point of the arc.

Parameters

curve_id ID of the curve

Return

x, y, z center point of the curve in a vector


float get_surface_area(surface_id)

Get the area of a surface.

Parameters

surface_id ID of the surface

Return

Area of the surface


float get_volume_area(volume_id)

Get the area of a volume.

Parameters

volume_id ID of the volume

Return

Area of the volume


float get_hydraulic_radius_surface_area(surface_id)

Get the area of a hydraulic surface.

Parameters

surface_id ID of the surface

Return

Hydraulic area of the surface


float get_hydraulic_radius_volume_area(volume_id)

Get the area of a hydraulic volume.

Parameters

volume_id ID of the volume

Return

Hydraulic area of the volume


[ float ] get_center_point(entity_type, entity_id)

Get the center point of a specified entity.

Example

 center_point = cubit.get_center_point("surface", 22)

Parameters

entity_type Specifies the geometry type of the entity
entity_id Specifies the id of the entity

Return

Vector of doubles representing x y z


int get_valence(vertex_id)

Get the valence for a specific vertex.

Parameters

vertex_id ID of vertex

float get_distance_between(vertex_id_1, vertex_id_2)

Get the distance between two vertices.

Parameters

vertex_id_1 ID of vertex 1 vertex_id_2 ID of vertex 2 /return distance
vertex_id_2  

print_surface_summary_stats()

Print the surface summary stats to the console.

print_volume_summary_stats()

Print the volume summary stats to the console.

The number of bodies in the current model, if any


int get_body_count()

Get the current number of bodies.

Return

The number of volumes in the current model, if any


int get_volume_count()

Get the current number of volumes.

Return

The number of volumes in the current model, if any


int get_surface_count()

Get the current number of surfaces.

Return

The number of surfaces in the current model, if any


int get_vertex_count()

Get the current number of vertices.

Return

The number of vertices in the current model, if any


int get_curve_count()

Get the current number of curves.

Return

The number of curves in the current model, if any


int get_curve_count(target_volume_ids)

Get the current number of curves in the passed-in volumes.

Parameters

target_volume_ids  

Return

The number of curves in the volumes


Bool is_catia_engine_available()

Determine whether catia engine is available.

Return

True if catia engine is available, otherwise false


[ int ] evaluate_exterior_angle(curve_list, test_angle)

find all curves in the given list with an exterior angle (the angle between surfaces) less than the test angle. This is equivalent to the df parser "exterior_angle" test. (draw curve with exterior_angle >90)

Parameters

curve_list a list of curve ids (integers)
test_angle the value (in degrees) that will be used in testing the exterior angle

Return

a list of curve ids that meet the angle test.


[ int ] get_small_curves(target_volume_ids, mesh_size)

Get the list of small curves for a list of volumes.

Parameters

target_volume_ids List of volume ids to examine. in Cubit is valid as input here.
mesh_size Indicate the mesh size used as the threshold

Return

List of small curve ids


[ int ] get_smallest_curves(target_volume_ids, num_to_return)

Get a list of the smallest curves in the list of volumes. The number returned is specified by 'num_to_return'.

Parameters

target_volume_ids List of volume ids to examine. in Cubit is valid as input here.
num_to_return Indicate the number of curves to return

Return

List of smallest curve ids


[ int ] get_small_surfaces(target_volume_ids, mesh_size)

Get the list of small surfaces for a list of volumes.

Parameters

target_volume_ids List of volume ids to examine.
mesh_size Indicate the mesh size used as the threshold

Return

List of small surface ids


[ int ] get_narrow_surfaces(target_volume_ids, mesh_size)

Get the list of narrow surfaces for a list of volumes.

Parameters

target_volume_ids List of volume ids to examine.
mesh_size Indicate the mesh size used as the threshold

Return

List of small surface ids


[ int ] get_small_and_narrow_surfaces(target_ids, small_area, small_curve_size)

Get the list of small or narrow surfaces from a list of volumes.

Parameters

target_ids  
small_area Indicate the area threshold
small_curve_size Indicate size for 'narrowness'

Return

List of small or narrow surface ids


[ int ] get_surfs_with_narrow_regions(target_ids, narrow_size)

Get the list of surfaces with narrow regions.

Parameters

target_ids  
narrow_size Indicate the size that defines 'narrowness'

Return

List of surface ids


[ int ] get_small_volumes(target_volume_ids, mesh_size)

Get the list of small volumes from a list of volumes.

Parameters

target_volume_ids List of volume ids to examine.
mesh_size Indicate the mesh size used as the threshold

Return

List of small volume ids


[ int ] get_blend_surfaces(target_volume_ids)

Get the list of blend surfaces for a list of volumes.

Parameters

target_volume_ids List of volume ids to examine. List of blend surface ids

[ int ] get_small_loops(target_volume_ids, mesh_size)

Get the list of close loops (surfaces) for a list of volumes.

Parameters

target_volume_ids List of volume ids to examine.
mesh_size Indicate the mesh size used as the threshold

Return

List of close loop (surface) ids


[ int ] get_tangential_intersections(target_volume_ids, upper_bound, lower_bound)

Get the list of bad tangential intersections for a list of volumes.

Parameters

target_volume_ids List of volume ids to examine.
upper_bound Upper threshold angle
lower_bound Lower threshold angle

Return

List of surface ids associated with bad tangential angles


[ int ] get_coincident_vertices(target_volume_ids, high_tolerance)

Parameters

target_volume_ids  
high_tolerance  

Return

Paired list of vertex ids considered coincident


[ [ str ] ] get_solutions_for_near_coincident_vertices(vertex_id1, vertex_id2)

Get lists of display strings and command strings for near coincident vertices.

Parameters

vertex_id1  
vertex_id2  

Return

Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. This second set of strings may contain concatenated strings delimited by '&&&'. In other words, one instance of command string may in fact contain multiple commands separated by the '&&&' sequence. Vector 3 will contain Cubit preview strings.


[ [ str ] ] get_solutions_for_imprint_merge(surface_id1, surface_id2)

Get lists of display strings and command strings for imprint/merge solutions.

Parameters

surface_id1 overlapping surface 1 surface_id2 overlapping surface 2
surface_id2  

Return

Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. This second set of strings may contain concatenated strings delimited by '&&&'. In other words, one instance of command string may in fact contain multiple commands separated by the '&&&' sequence. Vector 3 will contain Cubit preview strings.


[ [ str ] ] get_solutions_for_small_surfaces(surface_id, small_curve_size, mesh_size)

Get lists of display, preview and command strings for small surface solutions.

Parameters

surface_id Small surface
small_curve_size Threshold value used to determine what 'small' is
mesh_size Element size of the model

Return

Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. Vector 3 will contain Cubit preview strings.


[ [ str ] ] get_solutions_for_small_curves(curve_id, small_curve_size, mesh_size)

Get lists of display, preview and command strings for small curve solutions.

Parameters

curve_id Small curve
small_curve_size Threshold value used to determine what 'small' is
mesh_size Element size of the model

Return

Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. Vector 3 will contain Cubit preview strings.


[ [ str ] ] get_solutions_for_surfaces_with_narrow_regions(surface_id, small_curve_size, mesh_size)

Get lists of display, preview and command strings for surfaces with narrow regions solutions.

Parameters

surface_id Small surface
small_curve_size Threshold value used to determine what 'small' is
mesh_size Element size of the model

Return

Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. Vector 3 will contain Cubit preview strings.


[ int ] get_overlapping_volumes(target_volume_ids)

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

Parameters

target_volume_ids List of volume ids to examine.

Return

volume_list List of overlapping volumes ids


[ [ int ] ] get_mergeable_vertices(target_volume_ids)

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

Parameters

target_volume_ids List of volume ids to examine.

Return

list of lists of mergeable vertices (potentially more than a pair)


[ [ str ] ] get_solutions_for_blends(surface_id)

Get the solution list for a given blend surface.

Parameters

surface_id the surface being queried

Return

Vector of three string vectors. Vector 1 will contain display strings to be shown to users. Vector 2 will contain Cubit command strings. Vector 3 will contain Cubit preview strings.


[ [ int ] ] get_blend_chains(surface_id)

Queries the blend chains for a surface.

Parameters

surface_id surface to retrieve the blend chains from

Return

A set of lists of id's in each blend chain


float get_merge_tolerance()

Get the current merge tolerance value.

Return

The value of the current merge tolerance


str get_exodus_entity_name(entity_type, entity_id)

Get the name associated with an exodus entity.

Example

 entity_name = cubit.get_exodus_entity_name("sideset", 33)

Parameters

entity_type "block", "sideset", nodeset"
entity_id Id of the entity in question

Return

Name of the entity or "" if none


str get_exodus_entity_description(entity_type, entity_id)

Get the description associated with an exodus entity.

Example

 entity_description = cubit.get_exodus_entity_description("sideset", 33)

Parameters

entity_type "block", "sideset", nodeset"
entity_id Id of the entity in question

Return

Description of the entity or "" if none


[ float ] get_all_exodus_times(filename)

Open an exodus file and get a vector of all stored time stamps.

Parameters

filename Fully qualified exodus file name

Return

List of time stamps in the exodus file


int get_block_id(entity_type, entity_id)

Get the associated block id for a specific curve, surface, or volume.

Example

 block_id = cubit.get_block_id("surface", 33)

Parameters

entity_type Type of entity
entity_id Id of entity in question

Return

Block id associated with this entity or zero (0) if none


[ int ] get_block_ids(mesh_geom_file_name)

Get list of block ids from a mesh geometry file.

Parameters

mesh_geom_file_name Fully qualified name of a mesh geometry file

Return

List of block ids in the mesh geometry file


[ int ] get_block_id_list()

Get a list of all blocks.

Return

List of all active block ids


[ int ] get_nodeset_id_list()

Get a list of all nodesets.

Return

List of all active nodeset ids


[ int ] get_sideset_id_list()

Get a list of all sidesets.

Return

List of all active sideset ids


[ int ] get_bc_id_list(bc_type_in)

Get a list of all bcs of a specified type.

Parameters

bc_type_in as an enum defined by CI_BCTypes. 1-9 is FEA, 10-30 is CFD

Return

List of all active bc ids


str get_bc_name(bc_type_in, bc_id)

Get the name for the specified bc.

Parameters

bc_type_in type of bc, as defined by enum CI_BCTypes. 1-9 is FEA, 10-30 is CFD
bc_id ID of the desired bc.

Return

The bc name


[ int ] get_nodeset_id_list_for_bc(bc_type_in, bc_id)

Get a list of all nodesets the specified bc is applied to.

Parameters

bc_type_in Type of bc to query, as defined by enum CI_BCTypes. 1-9 is FEA, 10-30 is CFD
bc_id ID of the bc to query

Return

A list of nodeset ID's associated with that bc


[ int ] get_sideset_id_list_for_bc(bc_type_in, bc_id)

Get a list of all sidesets the specified bc is applied to.

Parameters

bc_type_in Type of bc to query, as defined by enum CI_BCTypes. 1-9 is FEA, 10-30 is CFD
bc_id ID of the bc to query

Return

A list of sideset ID's associated with that bc


int get_next_sideset_id()

Get a next available sideset id.

Return

Next available sideset id


int get_next_nodeset_id()

Get a next available nodeset id.

Return

Next available nodeset id


int get_next_block_id()

Get a next available block id.

Return

Next available block id


[ int ] get_block_volumes(block_id)

Get a list of volume ids associated with a specific block.

Parameters

block_id User specified id of the desired block

Return

A list of volume ids contained in the block


[ int ] get_block_surfaces(block_id)

Get a list of surface associated with a specific block.

Parameters

block_id User specified id of the desired block

Return

A list of surface ids contained in the block


[ int ] get_block_curves(block_id)

Get a list of curve associated with a specific block.

Parameters

block_id User specified id of the desired block

Return

A list of curve ids contained in the block


[ int ] get_block_vertices(block_id)

Get a list of vertices associated with a specific block.

Parameters

block_id User specified id of the desired block

Return

A list of vertex ids contained in the block


[ int ] get_block_nodes(block_id)

Get a list of nodes associated with a specific block.

Parameters

block_id User specified id of the desired block

Return

A list of node ids contained in the block


[ int ] get_block_edges(block_id)

Get a list of edges associated with a specific block.

Parameters

block_id User specified id of the desired block

Return

A list of edge ids contained in the block


[ int ] get_block_tris(block_id)

Get a list of tris associated with a specific block.

Parameters

block_id User specified id of the desired block

Return

A list of tri ids contained in the block


[ int ] get_block_faces(block_id)

Get a list of faces associated with a specific block.

Parameters

block_id User specified id of the desired block

Return

A list of face ids contained in the block


[ int ] get_block_pyramids(block_id)

Get a list of pyramids associated with a specific block.

Parameters

block_id User specified id of the desired block

Return

A list of pyramid ids contained in the block


[ int ] get_block_tets(block_id)

Get a list of tets associated with a specific block.

Parameters

block_id User specified id of the desired block

Return

A list of tet ids contained in the block


[ int ] get_block_hexes(block_id)

Get a list of hexes associated with a specific block.

Parameters

block_id User specified id of the desired block

Return

A list of hex ids contained in the block


[ int ] get_volume_hexes(volume_id)

get the list of any hex elements in a given volume

Parameters

volume_id User specified id of the desired volume

Return

A list of the hex ids in the volume


[ int ] get_volume_tets(volume_id)

get the list of any tet elements in a given volume

Parameters

volume_id User specified id of the desired volume

Return

A list of the tet ids in the volume


[ int ] get_nodeset_volumes(nodeset_id)

Get a list of volume ids associated with a specific nodeset.

Parameters

nodeset_id User specified id of the desired nodeset

Return

A list of volume ids contained in the nodeset


[ int ] get_nodeset_surfaces(nodeset_id)

Get a list of surface ids associated with a specific nodeset.

Parameters

nodeset_id User specified id of the desired nodeset

Return

A list of surface ids contained in the nodeset


[ int ] get_nodeset_curves(nodeset_id)

Get a list of curve ids associated with a specific nodeset.

Parameters

nodeset_id User specified id of the desired nodeset

Return

A list of curve ids contained in the nodeset


[ int ] get_nodeset_vertices(nodeset_id)

Get a list of vertex ids associated with a specific nodeset.

Parameters

nodeset_id User specified id of the desired nodeset

Return

A list of vertex ids contained in the nodeset


[ int ] get_nodeset_nodes(nodeset_id)

Get a list of node ids associated with a specific nodeset. This only returns the nodes that were specifically assigned to this nodeset. If the nodeset was created as a piece of geometry, get_nodeset_nodes will not return the nodes on that geometry See also get_nodeset_nodes_inclusive.

Parameters

nodeset_id User specified id of the desired nodeset

Return

A list of node ids contained in the nodeset


[ int ] get_nodeset_nodes_inclusive(nodeset_id)

Get a list of node ids associated with a specific nodeset. This includes all nodes specifically assigned to the nodeset, as well as nodes associated to a piece of geometry which was used to define the nodeset.

Parameters

nodeset_id User specified id of the desired nodeset

Return

A list of node ids contained in the nodeset


[ int ] get_sideset_curves(sideset_id)

Get a list of curve ids associated with a specific sideset.

Parameters

sideset_id User specified id of the desired sideset

Return

A list of curve ids contained in the sideset


[ int ] get_curve_edges(curve_id)

get the list of any edge elements on a given curve

Parameters

curve_id User specified id of the desired curve

Return

A list of the edge element ids on the curve


[ int ] get_sideset_surfaces(sideset_id)

Get a list of any surfaces in a sideset.

Parameters

sideset_id User specified id of the desired sideset

Return

A list of the surfaces defining the sideset


[ int ] get_sideset_quads(sideset_id)

Get a list of any quads in a sideset.

Parameters

sideset_id User specified id of the desired sideset

Return

A list of the quads in the sideset


[ int ] get_surface_quads(surface_id)

get the list of any quad elements on a given surface

Parameters

surface_id User specified id of the desired surface

Return

A list of the quad ids on the surface


[ int ] get_surface_tris(surface_id)

get the list of any tri elements on a given surface

Parameters

surface_id User specified id of the desired surface

Return

A list of the tri ids on the surface


str get_entity_sense(source_type, source_id, sideset_id)

Get the sense of a sideset item.

Example

 sense = cubit.get_entity_sense("face", 332, 2)

Parameters

source_type Item type - could be 'face', 'quad' or 'tri'
source_id ID of entity
sideset_id ID of the sideset

Return

Sense of the source_type/source_id in specified sideset


str get_wrt_entity(source_type, source_id, sideset_id)

Get the with-respect-to entity.

Example

 wrt_entity = cubit.get_wrt_entity("face", 332, 2)

Parameters

source_type Item type - could be 'face', 'quad' or 'tri'
source_id ID of entity
sideset_id ID of the sideset

Return

'with-respect-to' entity of the source_type/source_id in specified sideset


Bool is_using_shells(sideset_id)

Get the shell use for a sideset.

Parameters

sideset_id ID of the sideset

Return

True if the sideset uses shells, otherwise false


[ str ] get_geometric_owner(mesh_entity_type, mesh_entity_list)

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

Example

 owner_list = cubit.get_geometric_owner("quad", id_list)

Parameters

mesh_entity_type The type of mesh entity. Only works for 'quad, 'face', or 'tri'
mesh_entity_list A string containing space delimited ids, Cubit command form (i.e. 'all', '1 to 8', '1 2 3', etc)

Return

A list of geometry owners in the form of 'surface x', 'curve y', etc.


[ int ] get_volume_nodes(vol_id)

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

Parameters

vol_id id of volume

Return

vector of IDs of nodes owned by the volume


[ int ] get_surface_nodes(surf_id)

Get list of node ids owned by a surface. Excludes nodes owned by bounding curves and verts.

Parameters

surf_id id of surface

Return

vector of IDs of nodes owned by the surface


[ int ] get_curve_nodes(curv_id)

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

Parameters

curv_id id of curve

Return

vector of IDs of nodes owned by the curve


int get_vertex_node(vert_id)

Get the node owned by a vertex.

Parameters

vert_id id of vertex

Return

ID of node owned by the vertex. returns -1 of doesn't exist


int get_id_from_name(name)

Get id for a named entity.

Example

 entity_id = cubit.get_id_from_name("member_2")

Parameters

name Name of the entity to examine return Integer representing the entity

[ int ] get_group_groups(group_id)

Get group groups (groups that are children of another group).

Parameters

group_id ID of the group to examine return List of group ids contained in the specified group

[ int ] get_group_bodies(group_id)

Get group bodies (bodies that are children of a group).

Parameters

group_id ID of the group to examine return List of body ids contained in the specified group

[ int ] get_group_volumes(group_id)

Get group volumes (volumes that are children of a group).

Parameters

group_id ID of the group to examine return List of volume ids contained in the specified group

[ int ] get_group_surfaces(group_id)

Get group surfaces (surfaces that are children of a group).

Parameters

group_id ID of the group to examine return List of surface ids contained in the specified group

[ int ] get_group_curves(group_id)

Get group curves (curves that are children of a group).

Parameters

group_id ID of the group to examine return List of curve ids contained in the specified group

[ int ] get_group_vertices(group_id)

Get group vertices (vertices that are children of a group).

Parameters

group_id ID of the group to examine return List of vertex ids contained in the specified group

[ int ] get_group_nodes(group_id)

Get group nodes (nodes that are children of a group).

Parameters

group_id ID of the group to examine return List of node ids contained in the specified group

[ int ] get_group_edges(group_id)

Get group edges (edges that are children of a group).

Parameters

group_id ID of the group to examine return List of edge ids contained in the specified group

[ int ] get_group_quads(group_id)

Get group quads (quads that are children of a group).

Parameters

group_id ID of the group to examine return List of quad ids contained in the specified group

[ int ] get_group_tris(group_id)

Get group tris (tris that are children of a group).

Parameters

group_id ID of the group to examine return List of tri ids contained in the specified group

[ int ] get_group_tets(group_id)

Get group tets (tets that are children of a group).

Parameters

group_id ID of the group to examine return List of tet ids contained in the specified group

[ int ] get_group_hexes(group_id)

Get group hexes (hexes that are children of a group).

Parameters

group_id ID of the group to examine return List of hex ids contained in the specified group

int get_next_group_id()

Get the next available group id from Cubit.

delete_all_groups()

Delete all groups.

delete_group(group_id)

Delete a specific group.

Parameters

group_id ID of group to delete

set_max_group_id(max_group_id)

Reset Cubit's max group id This is really dangerous to use and exists only to overcome a limitation with Cubit. Cubit keeps track of the next group id to assign. But those ids just keep incrementing in Cubit. Some of the power tools in the Cubit GUI make groups 'under the covers' for various operations. The groups are immediately deleted. But, creating those groups will cause Cubit's group id to increase and downstream journal files may be messed up because those journal files are expecting a certain ID to be available.

Parameters

max_group_id  

int create_new_group()

Create a new group.

Return

group_id ID of new group


remove_entity_from_group(group_id, entity_id, entity_type)

Remove a specific entity from a specific group.

Example

 cubit.remove_entity_from_group(3, 22, "surface")

Parameters

group_id ID of group from which the entity will be removed
entity_id ID of the entity to be removed from the group
entity_type Type of the entity to be removed from the group. Note that only geometric entities can be removed

add_entity_to_group(group_id, entity_id, entity_type)

Add a specific entity to a specific group.

Example

 cubit.add_entity_to_group(3, 22, "surface")

Parameters

group_id ID of group to which the entity will be added
entity_id ID of the entity to be added to the group
entity_type Type of the entity to be added to the group. Note that this function is valid only for geometric entities

[ int ] get_mesh_group_parent_ids(element_type, element_id)

Get the group ids which are parents to the indicated mesh element.

Example

 parent_id_list = cubit.get_mesh_group_parent_ids("tri", 332)

Parameters

element_type Mesh type of the element
element_id ID of the mesh element return List of group ids that contain this mesh element

Bool is_mesh_element_in_group(element_type, element_id)

Indicates whether a mesh element is in a group.

Example

 if cubit.is_mesh_element_in_group("tet", 445):

Parameters

element_type Mesh type of the element
element_id ID of the mesh element return True if in a group, otherwise false

Bool is_part_of_list(target_id, id_list)

Routine to check for the presence of an id in a list of ids.

Parameters

target_id Target id
id_list List of ids

Return

True if target_id is member of id_list, otherwise false


int get_last_id(entity_type)

Get the id of the last created entity of the given type. If the last command modified geometry the id might not be what you expect.

Example

 last_id = cubit.get_last_id("surface")

Parameters

entity_type Type of the entity being queried

Return

Integer id of last created entity


str get_assembly_classification_level()

Get Classification Level for metadata.

Return

Requested data


str get_assembly_classification_category()

Get Classification Category for metadata.

Return

Requested data


str get_assembly_weapons_category()

Get Weapons Category for metadata.

Return

Requested data


str get_assembly_metadata(volume_id, data_type)

Get metadata for a specified volume id.

Parameters

volume_id ID of the volume
data_type Magic number representing the type of assembly information to return. 1 = Part Number, 2 = Description, 3 = Material Description 4 = Material Specification, 5 = Assembly Path, 6 = Original File

Return

Requested data


Bool is_assembly_metadata_attached(volume_id)

Determine whether metadata is attached to a specified volume.

Parameters

volume_id ID of the volume

Return

True if metadata exists, otherwise false


str get_assembly_name(assembly_id)

Get the stored name of an assembly node.

Parameters

assembly_id Id that identifies the assembly node

Return

Name of the assembly node


str get_assembly_path(assembly_id)

Get the stored path of an assembly node.

Parameters

assembly_id Id that identifies the assembly node

Return

Path of the assembly node


str get_assembly_description(assembly_id)

Get the stored description of an assembly node.

Parameters

assembly_id Id that identifies the assembly node

Return

Description of the assembly node


int get_assembly_instance(assembly_id)

Get the stored instance number of an assembly node.

Parameters

assembly_id Id that identifies the assembly node

Return

Instance of the assembly node


str get_assembly_file_format(assembly_id)

Get the stored file format of an assembly node.

Parameters

assembly_id Id that identifies the assembly node

Return

File Format of the assembly node


str get_assembly_units(assembly_id)

Get the stored units measure of an assembly node.

Parameters

assembly_id Id that identifies the assembly node

Return

Units of the assembly node


str get_assembly_material_description(assembly_id)

Get the stored material description of an assembly part.

Parameters

assembly_id Id that identifies the assembly node

Return

Material Description of the assembly part


str get_assembly_material_specification(assembly_id)

Get the stored material specification of an assembly part.

Parameters

assembly_id Id that identifies the assembly node

Return

Material Specification of the assembly part


int get_exodus_id(entity_type, entity_id)

Get the exodus/genesis id for this element.

Example

 exodus_id = cubit.get_exodus_id("hex", 221)

Parameters

entity_type The mesh element type
entity_id The mesh element id

Return

Exodus id of the element if element has been written out, otherwise 0


str get_geometry_owner(entity_type, entity_id)

Get the geometric owner of this mesh element.

Example

 geom_owner = cubit.get_geometry_owner("hex", 221)

Parameters

entity_type The mesh element type
entity_id The mesh element id

Return

Name of owner


[ int ] get_connectivity(entity_type, entity_id)

Get the list of node ids contained within a mesh entity.

Example

 node_id_list = cubit.get_connectivity("hex", 221)

Parameters

entity_type The mesh element type
entity_id The mesh element id

Return

List of node ids


[ int ] get_expanded_connectivity(entity_type, entity_id)

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

Example

 node_id_list = cubit.get__expanded_connectivity("hex", 221)

Parameters

entity_type The mesh element type
entity_id The mesh element id

Return

List of all node ids associated with the element, including interior nodes


[ int ] get_sub_elements(entity_type, entity_id, dimension)

Get the lower dimesion entities associated with a higher dimension entities. For example get the faces associated with a hex or the edges associated with a tri.

Example

 face_id_list = cubit.get_sub_elements("hex", 221, 2)

Parameters

entity_type The mesh element type of the higher dimension entity
entity_id The mesh element id
dimension The dimension of the desired sub entities

Return

List of ids of the desired dimension


[ float ] get_nodal_coordinates(node_id)

Get the nodal coordinates for a given node id.

Parameters

node_id The node id

Return

a triple containing the x, y, and z coordinates


Bool get_node_position_fixed(node_id)

Query "fixedness" state of node. A fixed node is not affecting by smoothing.

Parameters

node_id The node id

Return

True if constrained, otherwise false


str get_sideset_element_type(sideset_id)

Get the element type of a sideset.

Parameters

sideset_id The id of the sideset to be queried

Return

Element type


str get_block_element_type(block_id)

Get the element type of a block.

Parameters

block_id The block id

Return

Element type


int get_exodus_element_count(entity_id, entity_type)

Get the number of elements in a exodus entity.

Example

 element_count = cubit.get_exodus_element_count(2, "sideset")

Parameters

entity_id The id of the entity
entity_type The type of the entity

Return

Number of Elements


int get_block_attribute_count(block_id)

Get the number of attributes in a block.

Parameters

block_id The block id

Return

Number of attributes in the block


float get_block_attribute_value(block_id, index)

Get a specific block attribute value.

Parameters

block_id The block id
index The index of the attribute

Return

List of attributes


[ str ] get_valid_block_element_types(block_id)

Get a list of potential element types for a block.

Parameters

block_id The block id

Return

List of potential element types


int get_nodeset_node_count(nodeset_id)

Get the number of nodes in a nodeset.

Parameters

nodeset_id The nodeset id

Return

Number of nodes in the nodeset


int get_geometry_node_count(entity_type, entity_id)

Parameters

entity_type  
entity_id  

str get_mesh_element_type(entity_type, entity_id)

Get the mesh element type contained in the specified geometry.

Example

 element_type = cubit.get_mesh_element_type("surface", 2)

Parameters

entity_type The type of entity
entity_id The id of the entity

Return

Mesh element type for that entity


Bool is_on_thin_shell(bc_type_in, entity_id)

Determine whether a BC is on a thin shell. Valid for temperature, convection and heatflux.

Parameters

bc_type_in  
entity_id  

Bool temperature_is_on_solid(bc_type_in, entity_id)

Determine whether a BC temperature is on a solid. Valid for convection and temperature.

Parameters

bc_type_in  
entity_id  

Bool convection_is_on_solid(entity_id)

Determine whether a BC convection is on a solid. Valid for convection.

Parameters

entity_id  

Bool convection_is_on_shell_area(entity_id, shell_area)

Determine whether a BC convection is on a shell top or bottom. Valid for convection.

Parameters

entity_id  
shell_area  

float get_convection_coefficient(entity_id, cc_type)

Get the convection coefficient.

Parameters

entity_id  
cc_type  

float get_bc_temperature(bc_type, entity_id, temp_type)

Get the temperature. Valid for convection, temperature.

Parameters

bc_type  
entity_id  
temp_type  

Bool temperature_is_on_shell_area(bc_type, bc_area, entity_id)

Determine whether a BC temperature is on a shell area. Valid for convection and temperature and on top, bottom, gradient, and middle.

Parameters

bc_type  
bc_area  
entity_id  

Bool heatflux_is_on_shell_area(bc_area, entity_id)

Determine whether a BC heatflux is on a shell area.

Parameters

bc_area  
entity_id  

float get_heatflux_on_area(bc_area, entity_id)

Get the heatflux on a specified area.

Parameters

bc_area  
entity_id  

int get_cfd_type(entity_id)

Get the cfd subtype for a specified cfd BC.

Parameters

entity_id ID of the cfd BC

Return

Integer corresponding to the type of cfd, as defined by CI_BCTypes


float get_contact_pair_friction_value(entity_id)

Get the contact pair's friction value.

Parameters

entity_id  

float get_contact_pair_tolerance_value(entity_id)

Get the contact pair's tolerance value.

Parameters

entity_id  

Bool get_contact_pair_tied_state(entity_id)

Get the contact pair's tied state.

Parameters

entity_id  

Bool get_contact_pair_general_state(entity_id)

Get the contact pair's general state.

Parameters

entity_id  

Bool get_contact_pair_exterior_state(entity_id)

Get the contact pair's exterior state.

Parameters

entity_id  

int get_displacement_coord_system(entity_id)

Get the displacement's coordinate system id.

Parameters

entity_id  

str get_displacement_combine_type(entity_id)

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

Parameters

entity_id  

float get_pressure_value(entity_id)

Get the pressure value.

Parameters

entity_id  

str get_pressure_function(entity_id)

Get the pressure function.

Parameters

entity_id  

float get_force_magnitude(entity_id)

Get the force magnitude from a force.

Parameters

entity_id  

float get_moment_magnitude(entity_id)

Get the moment magnitude from a force.

Parameters

entity_id  

[ float ] get_force_direction_vector(entity_id)

Get the direction vector from a force.

Parameters

entity_id  

[ float ] get_force_moment_vector(entity_id)

Get the moment vector from a force.

Parameters

entity_id  

str get_constraint_type(constraint_id)

Get the type of a specified constraint.

Parameters

constraint_id ID of the constraint

Return

A std::string indicating the type -- Kinematic, Distributing, Rigidbody


str get_constraint_reference_point(constraint_id)

Get the reference point of a specified constraint.

Parameters

constraint_id ID of the constraint

Return

A std::string indicating the reference point


str get_constraint_dependent_entity_point(constraint_id)

Get the dependent entity of a specified constraint.

Parameters

constraint_id ID of the constraint

Return

A std::string indicating the dependent entity


float get_material_property(mp, entity_id)

Parameters

mp  
entity_id  

int get_media_property(entity_id)

Parameters

entity_id  

[ str ] get_material_name_list()


[ str ] get_media_name_list()


set_label_type(entity_type, label_flag)

Parameters

entity_type  
label_flag  

int get_label_type(entity_type)

Parameters

entity_type  

Body body(id_in)

Gets the body object from an ID.

Parameters

id_in The ID of the body

Return

The body object


Volume volume(id_in)

Gets the volume object from an ID.

Parameters

id_in The ID of the volume

Return

The volume object


Surface surface(id_in)

Gets the surface object from an ID.

Parameters

id_in The ID of the surface

Return

The surface object


Curve curve(id_in)

Gets the curve object from an ID.

Parameters

id_in The ID of the curve

Return

The curve object


Vertex vertex(id_in)

Gets the vertex object from an ID.

Parameters

id_in The ID of the vertex

Return

The vertex object


reset()

Executes a reset within cubit.

Body brick(width, depth, height)

Creates a brick of specified width, depth, and height.

Parameters

width The width of the brick being created
depth The depth of the brick being created
height The height of the brick being created

Return

A Bodyobject of the newly created brick


Body sphere(radius, x_cut, y_cut, z_cut, inner_radius)

Creates all or part of a sphere.

Parameters

radius The radius of the sphere
x_cut If 1, cuts sphere by yz plane (default to 0)
y_cut If 1, cuts sphere by xz plane (default to 0)
z_cut If 1, cuts sphere by xy plane (default to 0)
inner_radius The inside radius if the sphere is hollow (default to 0)

Return

A Bodyobject of the newly created sphere


Body prism(height, sides, major, minor)

Creates a prism of the specified dimensions.

Parameters

height The height of the prism
sides The number of sides of the prism
major The major radius
minor The minor radius

Return

A Bodyobject of the newly created prism


Body pyramid(height, sides, major, minor, top)

Creates a pyramid of the specified dimensions.

Parameters

height The height of the pyramid
sides The number of sides of the pyramid
major The major radius
minor The minor radius
top determines size for the top of the pyramid. Defaults to 0, meaning it will go to a point

Return

A Bodyobject of the newly created pyramid


Body cylinder(hi, r1, r2, r3)

creates a cylinder of the specified dimensions

Parameters

hi the height of the cylinder
r1 radius in the x direction
r2 radius in the y direction
r3 used to adjust the top. If set to 0, will produce a cone. Set to r1/r2 to get a straight cylinder

Return

A body object of the newly created cylinder


Body torus(r1, r2)

creates a torus of the specified dimensions

Parameters

r1 radius from center to center of circle to be swept (r1>r2)
r2 radius of circle swept to create torus (r1>r2)

Return

A Bodyobject of the newly created torus


Vertex create_vertex(x, y, z)

Creates a vertex at a x,y,z.

Parameters

x The x location of the vertex (default to 0)
y The y location of the vertex (default to 0)
z The z location of the vertex (default to 0)

Return

A Vertexobject


Curve create_curve(v0, v1)

Creates a curve between two vertices.

Parameters

v0 The start vertex
v1 The end vertex

Return

A Curveobject


Body create_surface(curves)

Creates a surface from boundary curves.

Parameters

curves A list of curve objects from which to make the surface

Return

A Bodyobject of the newly created Surface


[ Body] sweep_curve(curves, along_curves, draft_angle, draft_type, rigid)

Create a Body or a set of Bodies from a swept curve.

Parameters

curves A list of curves to sweep
along_curves A list of curves to sweep along
draft_angle The sweep draft angle (default to 0)
draft_type The draft type (default to 0) 0 => extended (draws two straight tangent lines from the ends of each segment until they intersect) 1 => rounded (create rounded corner between segments) 2 => natural (extends the shapes along their natural curve) ***
rigid The inside radius if the sphere is hollow (default to False)

Return

A List of newly created Bodies


Body copy_body(init_body)

Creates a copy of the input Body.

Parameters

init_body The Bodyto be copied

Return

A Bodyidentical to the input Body


[ Body] tweak_surface_offset(surfaces, distances)

Performs a tweak surface offset command.

Parameters

surfaces A list of surface objects to offset
distances A list of distances associated with the offset for each surface

Return

A list of the body objects of the modified bodies


[ Body] tweak_surface_remove(surfaces, extend_ajoining, keep_old, preview)

Removes a surface from a body and extends the surrounding surfaces if extend_ajoining is true.

Parameters

surfaces The surfaces to be removed
extend_ajoining Extend the ajoining surfaces (default to true)
keep_old Keep the old body (default to false)
preview Flag to show the preview or not (default to false)

Return

A list of changed body objects


[ Body] tweak_curve_remove(curves, keep_old, preview)

Removes a curve from a body and extends the surrounding surface to fill the gap.

Parameters

curves  
keep_old Keep the old body (defaults to false)
preview Flag to show the preview (defaults to false)

Return

A list of changed body objects


[ Body] tweak_curve_offset(curves, distances, keep_old, preview)

Performs a tweak curve offset command.

Parameters

curves A list of curve objects to offset
distances A list of distances associated with the offset for each curve
keep_old Keep the old body (defaults to false)
preview Flag to show the preview (defaults to false)

Return

A list of changed body objects


[ Body] tweak_vertex_fillet(verts, r0, keep_old, preview)

Performs a tweak vertex fillet command.

Parameters

verts A list of vertex objects to fillet
r0 radius of the fillet
keep_old Keep the old body (defaults to false)
preview Flag to show the preview (defaults to false)

Return

A list of changed body objects


[ Body] subtract(tool_in, from_in, imprint_in, keep_old_in)

Performs a boolean subtract operation.

Parameters

tool_in List of Bodyobjects to subtract
from_in List of Bodyobjects to be subtracted from
imprint_in Flag to set the imprint (defaults to false)
keep_old_in Flag to keep the old volume (defaults to false)

Return

A list of changed body objects


[ Body] unite(body_in, keep_old_in)

Performs a boolean unite operation.

Parameters

body_in A list of body objects to unite
keep_old_in Flag to keep old bodies (defaults to false)

Return

A list of changed bodies


move(entity, vector, preview)

Moves the Entity the specified vector.

Parameters

entity The Entityto be moved
vector The vector the Entitywill be moved
preview Flag to show the preview or not, default is false

scale(entity, factor, preview)

Scales the Entity according to the specified factor.

Parameters

entity The Entityto be scaled
factor The scale factor
preview Flag to show the preview or not, default is false

reflect(entity, axis, preview)

Reflect the Entity about the specified axis.

Parameters

entity The Entityto be reflected
axis The axis to be reflected about
preview Flag to show the preview or not, default is false

[ int ] get_volumes_for_node(node_name, node_instance)

Parameters

node_name  
node_instance  

int get_mesh_error_count()