Command Line Utilities#
A collection of solid body modeling tools for 2D sketched, 2D axisymmetric, and 3D revolved models. Implemented for Abaqus, Cubit, and Gmsh (work-in-progress) as backend modeling and meshing software. Most of the interface options and descriptions use Abaqus modeling concepts and language. Turbo-Turtle makes a best effort to maintain common behaviors and features across each third-party software’s modeling concepts.
usage: turbo-turtle [-h] [-V] {subcommand} ...
Named Arguments#
- -V, --version
show program’s version number and exit
subcommands#
- {subcommand}
Possible choices: docs, fetch, print-abaqus-path, geometry, geometry-xyplot, cylinder, sphere, partition, sets, mesh, merge, export, image
Sub-commands#
docs#
Open the packaged turbo-turtle HTML documentation in the system default web browser
usage: turbo-turtle docs [-h] [-p]
Named Arguments#
- -p, --print-local-path
Print the path to the locally installed documentation index file. As an alternative to the docs sub-command, open index.html in a web browser (default: False)
fetch#
Fetch and copy Turbo Turtle modsim template files and directories. If no FILE
is specified, all available files will be created. Directories are recursively copied. pathlib.Path
recursive pattern matching is possible. The source path is truncated to use the shortest common file prefix, e.g. requesting two files common/source/file.1
and common/source/file.2
will create /destination/file.1
and /destination/file.2
, respectively.
usage: turbo-turtle fetch [-h] [--destination DESTINATION] [--overwrite]
[--dry-run] [--print-available]
[FILE ...]
Positional Arguments#
- FILE
modsim template file or directory
Named Arguments#
- --destination
Destination directory. Unless
--overwrite
is specified, conflicting file names in the destination will not be copied. (default: PWD)- --overwrite
Overwrite any existing files (default: False)
- --dry-run
Print the destination tree and exit (default: False)
- --print-available
Print available modsim template files and exit (default: False)
print-abaqus-path#
*NOTE: this is an alpha feature for early adopters and developer testing of possible GUI support* Print the absolute path to Turbo-Turtle’s Abaqus Python compatible package. If this directory is on your PYTHONPATH, you can directly import Turbo Turtle Abaqus Python packages in your own scrips (i.e. import turbo_turtle_abaqus.partition)
usage: turbo-turtle print-abaqus-path [-h]
geometry#
Create a 2D planar, 2D axisymmetric, or 3D body of revolution (about the global Y-Axis) by sketching lines and splines in the XY plane. Line and spline definitions are formed by parsing an input file with [N, 2] array of XY coordinates. Defaults to Abaqus, but can optionally run Cubit (Gmsh implementation is a work-in-progress). Cubit and Gmsh backends replace hyphens with underscores in part name(s) for ACIS compatibility. Cubit backend ignores model/assembly name arguments.
usage: turbo-turtle geometry [-h] --input-file INPUT_FILE [INPUT_FILE ...]
--output-file OUTPUT_FILE
[--unit-conversion UNIT_CONVERSION]
[--euclidean-distance EUCLIDEAN_DISTANCE]
[--planar] [--model-name MODEL_NAME]
[--part-name PART_NAME [PART_NAME ...]]
[--delimiter DELIMITER]
[--header-lines HEADER_LINES]
[--revolution-angle REVOLUTION_ANGLE]
[--y-offset Y_OFFSET] [--rtol RTOL] [--atol ATOL]
[--abaqus-command ABAQUS_COMMAND [ABAQUS_COMMAND ...]]
[--cubit-command CUBIT_COMMAND [CUBIT_COMMAND ...]]
[--backend {abaqus,cubit,gmsh}]
Named Arguments#
- --abaqus-command
Abaqus executable options (default: [‘abaqus’, ‘abq2024’])
- --cubit-command
Cubit executable options (default: [‘cubit’])
- --backend
Possible choices: abaqus, cubit, gmsh
Back end software (default: ‘abaqus’)
required arguments#
- --input-file
Name of an input file(s) with points in x-y coordinate system
- --output-file
Name of the output model database file to save
optional arguments#
- --unit-conversion
Unit conversion multiplication factor (default: 1.0)
- --euclidean-distance
Connect points with a straight line if the distance between them is larger than this in units after the unit conversion (default: 4.0)
- --planar
Switch to indicate that 2D model dimensionality is planar, not axisymmetric (default: False)
- --model-name
Model name in which to create the new part(s) (default: ‘Model-1’)
- --part-name
Part name(s) or Cubit volume name(s). Cubit implementation converts hyphens to underscores for ACIS compatibility. (default: [None])
- --delimiter
Delimiter character between columns in the points file(s) (default: ‘,’)
- --header-lines
Number of header lines to skip when parsing the points files(s) (default: 0)
- --revolution-angle
Revolution angle for a 3D part in degrees (default: 360.0)
- --y-offset
Offset along the global Y-axis in units after the unit conversion (default: 0.0)
- --rtol
relative tolerance used by
numpy.isclose
. If not provided, use numpy defaults (default: None)- --atol
absolute tolerance used by
numpy.isclose
. If not provided, use numpy defaults (default: None)
geometry-xyplot#
Plot the lines-and-splines as parsed by the geometry subcommand. Lines are shown as solid lines with circle markers at the vertices. Splines are show as dashed lines with plus sign markers at the vertices. If there is more than one part, each part is shown in a unique color.
usage: turbo-turtle geometry-xyplot [-h] --input-file INPUT_FILE
[INPUT_FILE ...] --output-file OUTPUT_FILE
[--unit-conversion UNIT_CONVERSION]
[--euclidean-distance EUCLIDEAN_DISTANCE]
[--planar] [--model-name MODEL_NAME]
[--part-name PART_NAME [PART_NAME ...]]
[--delimiter DELIMITER]
[--header-lines HEADER_LINES]
[--revolution-angle REVOLUTION_ANGLE]
[--y-offset Y_OFFSET] [--rtol RTOL]
[--atol ATOL]
[--abaqus-command ABAQUS_COMMAND [ABAQUS_COMMAND ...]]
[--cubit-command CUBIT_COMMAND [CUBIT_COMMAND ...]]
[--backend {abaqus,cubit,gmsh}]
[--no-markers] [--annotate] [--scale]
Named Arguments#
- --abaqus-command
Abaqus executable options (default: [‘abaqus’, ‘abq2024’])
- --cubit-command
Cubit executable options (default: [‘cubit’])
- --backend
Possible choices: abaqus, cubit, gmsh
Back end software (default: ‘abaqus’)
- --no-markers
Exclude vertex markers and only plot lines (default: False)
- --annotate
Annotate the vertex coordinates with their index from the source CSV file (default: False)
- --scale
Change the plot aspect ratio to use the same scale for the X and Y axes (default: False)
required arguments#
- --input-file
Name of an input file(s) with points in x-y coordinate system
- --output-file
Name of the output model database file to save
optional arguments#
- --unit-conversion
Unit conversion multiplication factor (default: 1.0)
- --euclidean-distance
Connect points with a straight line if the distance between them is larger than this in units after the unit conversion (default: 4.0)
- --planar
Switch to indicate that 2D model dimensionality is planar, not axisymmetric (default: False)
- --model-name
Model name in which to create the new part(s) (default: ‘Model-1’)
- --part-name
Part name(s) or Cubit volume name(s). Cubit implementation converts hyphens to underscores for ACIS compatibility. (default: [None])
- --delimiter
Delimiter character between columns in the points file(s) (default: ‘,’)
- --header-lines
Number of header lines to skip when parsing the points files(s) (default: 0)
- --revolution-angle
Revolution angle for a 3D part in degrees (default: 360.0)
- --y-offset
Offset along the global Y-axis in units after the unit conversion (default: 0.0)
- --rtol
relative tolerance used by
numpy.isclose
. If not provided, use numpy defaults (default: None)- --atol
absolute tolerance used by
numpy.isclose
. If not provided, use numpy defaults (default: None)
cylinder#
Accept dimensions of a right circular cylinder and generate an axisymmetric revolved geometry. Defaults to Abaqus, but can optionally run Cubit (Gmsh implementation is a work-in-progress). Cubit and Gmsh backends replace hyphens with underscores in part name(s) for ACIS compatibility. Cubit backend ignores model/assembly name arguments.
usage: turbo-turtle cylinder [-h] --inner-radius INNER_RADIUS --outer-radius
OUTER_RADIUS --height HEIGHT --output-file
OUTPUT_FILE [--model-name MODEL_NAME]
[--part-name PART_NAME]
[--revolution-angle REVOLUTION_ANGLE]
[--y-offset Y_OFFSET]
[--abaqus-command ABAQUS_COMMAND [ABAQUS_COMMAND ...]]
[--cubit-command CUBIT_COMMAND [CUBIT_COMMAND ...]]
[--backend {abaqus,cubit,gmsh}]
Named Arguments#
- --abaqus-command
Abaqus executable options (default: [‘abaqus’, ‘abq2024’])
- --cubit-command
Cubit executable options (default: [‘cubit’])
- --backend
Possible choices: abaqus, cubit, gmsh
Back end software (default: ‘abaqus’)
required arguments#
- --inner-radius
Inner radius of hollow cylinder
- --outer-radius
Outer radius of cylinder
- --height
Height of the right circular cylinder
- --output-file
Name of the output model database file to save
optional arguments#
- --model-name
Model name in which to create the new part(s) (default: ‘Model-1’)
- --part-name
Part name or Cubit volume name. Cubit implementation converts hyphens to underscores for ACIS compatibility. (default: ‘Part-1’)
- --revolution-angle
Revolution angle for a 3D part in degrees (default: 360.0)
- --y-offset
Offset along the global Y-axis (default: 0.0)
sphere#
Create a hollow, spherical geometry from a sketch in the X-Y plane with upper (+X+Y), lower (+X-Y), or both quadrants. Defaults to Abaqus, but can optionally run Cubit (Gmsh implementation is a work-in-progress). Cubit and Gmsh backends replace hyphens with underscores in part name(s) for ACIS compatibility. Cubit backend ignores model/assembly name arguments.
usage: turbo-turtle sphere [-h] --inner-radius INNER_RADIUS --outer-radius
OUTER_RADIUS --output-file OUTPUT_FILE
[--input-file INPUT_FILE]
[--quadrant {both,upper,lower}]
[--revolution-angle REVOLUTION_ANGLE]
[--y-offset Y_OFFSET] [--model-name MODEL_NAME]
[--part-name PART_NAME]
[--abaqus-command ABAQUS_COMMAND [ABAQUS_COMMAND ...]]
[--cubit-command CUBIT_COMMAND [CUBIT_COMMAND ...]]
[--backend {abaqus,cubit,gmsh}]
Named Arguments#
- --abaqus-command
Abaqus executable options (default: [‘abaqus’, ‘abq2024’])
- --cubit-command
Cubit executable options (default: [‘cubit’])
- --backend
Possible choices: abaqus, cubit, gmsh
Back end software (default: ‘abaqus’)
required arguments#
- --inner-radius
Inner radius (hollow size)
- --outer-radius
Outer radius (sphere size)
- --output-file
Model database to create
optional arguments#
- --input-file
Model database to open (default: None)
- --quadrant
Possible choices: both, upper, lower
XY plane quadrant: both, upper (I), lower (IV) (default: ‘both’)
- --revolution-angle
Angle of revolution about the +Y axis (default: 360.0)
- --y-offset
Offset along the global Y-axis (default: 0.0)
- --model-name
Model name (default: ‘Model-1’)
- --part-name
Part name or Cubit volume name. Cubit implementation converts hyphens to underscores for ACIS compatibility. (default: ‘Part-1’)
partition#
Partition hollow spheres into a turtle shell given a small number of locating, clocking, and partition plane angle parameters. Defaults to Abaqus, but can optionally run Cubit (Gmsh implementation is a work-in-progress). Cubit and Gmsh backends replace hyphens with underscores in part name(s) for ACIS compatibility. Cubit backend ignores model/assembly name arguments.
usage: turbo-turtle partition [-h] --input-file INPUT_FILE
[--output-file OUTPUT_FILE]
[--center CENTER CENTER CENTER]
[--xvector XVECTOR XVECTOR XVECTOR]
[--zvector ZVECTOR ZVECTOR ZVECTOR]
[--model-name MODEL_NAME]
[--part-name PART_NAME [PART_NAME ...]]
[--big-number BIG_NUMBER]
[--abaqus-command ABAQUS_COMMAND [ABAQUS_COMMAND ...]]
[--cubit-command CUBIT_COMMAND [CUBIT_COMMAND ...]]
[--backend {abaqus,cubit,gmsh}]
Named Arguments#
- --abaqus-command
Abaqus executable options (default: [‘abaqus’, ‘abq2024’])
- --cubit-command
Cubit executable options (default: [‘cubit’])
- --backend
Possible choices: abaqus, cubit, gmsh
Back end software (default: ‘abaqus’)
required arguments#
- --input-file
Model database to open (default: None)
optional arguments#
- --output-file
Model database to save to. Defaults to the specified –input-file
- --center
Center of the sphere (default: [0.0, 0.0, 0.0])
- --xvector
Local x-axis vector defined in global coordinates (default: [1.0, 0.0, 0.0])
- --zvector
Local z-axis vector defined in global coordinates (default: [0.0, 0.0, 1.0])
- --model-name
Model name (default: ‘Model-1’)
- --part-name
Part name or Cubit volume name. Cubit implementation converts hyphens to underscores for ACIS compatibility. (default: [‘Part-1’])
- --big-number
Number larger than the outer radius of the part to partition (default: 1000000.0)
sets#
Warning
Abaqus masks are fragile with respect to geometry creation order. If previously working masks no longer produce the expected result, open the model file and verify that the masks still correspond to the expected geometry.
Create geometric sets from mask strings. Primarly intended for use in scripted workflows with stable geometry creation order and features because masks are fragile with respect to geometric changes. The recommended workflow is to perform manual set creation on a nominal geometry model, record the set masks/IDs reported by the third-party software, and write the CLI options into a scripted workflow file. Abaqus reports CAE operations in the abaqus.rpy
replay file, e.g. grep -A 1 'mask=' abaqus.rpy
. Cubit IDs can be found in the model tree. Defaults to Abaqus, but can optionally run Cubit (Gmsh implementation is a work-in-progress). Cubit and Gmsh backends replace hyphens with underscores in part name(s) for ACIS compatibility. Cubit backend ignores model/assembly name arguments.
usage: turbo-turtle sets [-h] --input-file INPUT_FILE
[--output-file OUTPUT_FILE] [--model-name MODEL_NAME]
[--part-name PART_NAME] [--face-set name mask]
[--edge-set name mask] [--vertex-set name mask]
[--abaqus-command ABAQUS_COMMAND [ABAQUS_COMMAND ...]]
[--cubit-command CUBIT_COMMAND [CUBIT_COMMAND ...]]
[--backend {abaqus,cubit,gmsh}]
Named Arguments#
- --abaqus-command
Abaqus executable options (default: [‘abaqus’, ‘abq2024’])
- --cubit-command
Cubit executable options (default: [‘cubit’])
- --backend
Possible choices: abaqus, cubit, gmsh
Back end software (default: ‘abaqus’)
required arguments#
- --input-file
Model database input file
optional arguments#
- --output-file
Model database output file (default: None)
- --model-name
Model name (default: ‘Model-1’)
- --part-name
Part name unused by Cubit implementation.(default: ‘Part-1’)
- --face-set
Face (surface) set (name, mask) pairs. Repeat once per set (default: None)
- --edge-set
Edge set (name, mask) pairs. Repeat once per set (default: None)
- --vertex-set
Vertex set (name, mask) pairs. Repeat once per set (default: None)
mesh#
Mesh a part from a global seed and optional edge seeds. The edge seeds must be positive numbers. If the seed is an integer, the edge will be seeded by number. If it is a float, the edge will be seeded by size. Defaults to Abaqus, but can optionally run Cubit (Gmsh implementation is a work-in-progress). Cubit and Gmsh backends replace hyphens with underscores in part name(s) for ACIS compatibility. Cubit backend ignores model/assembly name arguments.
usage: turbo-turtle mesh [-h] --input-file INPUT_FILE --element-type
ELEMENT_TYPE [--output-file OUTPUT_FILE]
[--model-name MODEL_NAME] [--part-name PART_NAME]
[--global-seed GLOBAL_SEED] [--edge-seed name number]
[--abaqus-command ABAQUS_COMMAND [ABAQUS_COMMAND ...]]
[--cubit-command CUBIT_COMMAND [CUBIT_COMMAND ...]]
[--backend {abaqus,cubit,gmsh}]
Named Arguments#
- --abaqus-command
Abaqus executable options (default: [‘abaqus’, ‘abq2024’])
- --cubit-command
Cubit executable options (default: [‘cubit’])
- --backend
Possible choices: abaqus, cubit, gmsh
Back end software (default: ‘abaqus’)
required arguments#
- --input-file
Model database input file
- --element-type
Abaqus element type. Applied as a Cubit meshing scheme if it matches ‘tetmesh’ or ‘trimesh’. Otherwise ignored by Cubit implementation.
optional arguments#
- --output-file
Model database output file (default: None)
- --model-name
Model name (default: ‘Model-1’)
- --part-name
Part name or Cubit volume name. Cubit implementation converts hyphens to underscores for ACIS compatibility. (default: ‘Part-1’)
- --global-seed
The global mesh seed size. Positive float.
- --edge-seed
Edge seed (name, number) pairs. Repeat once per edge set. (default: None)
image#
Save a part or assembly view image for a given Abaqus input file Defaults to Abaqus, but can optionally run Cubit (Gmsh implementation is a work-in-progress). Cubit and Gmsh backends replace hyphens with underscores in part name(s) for ACIS compatibility. Cubit backend ignores model/assembly name arguments.
usage: turbo-turtle image [-h] --input-file INPUT_FILE --output-file
OUTPUT_FILE [--x-angle X_ANGLE] [--y-angle Y_ANGLE]
[--z-angle Z_ANGLE]
[--image-size IMAGE_SIZE IMAGE_SIZE]
[--model-name MODEL_NAME] [--part-name PART_NAME]
[--color-map {Material,Section,Composite layup,Composite ply,Part,Part instance,Element set,Averaging region,Element type,Default,Assembly,Part geometry,Load,Boundary condition,Interaction,Constraint,Property,Meshability,Instance type,Set,Surface,Internal set,Internal surface,Display group,Selection group,Skin,Stringer,Cell,Face}]
[--abaqus-command ABAQUS_COMMAND [ABAQUS_COMMAND ...]]
[--cubit-command CUBIT_COMMAND [CUBIT_COMMAND ...]]
[--backend {abaqus,cubit,gmsh}]
Named Arguments#
- --abaqus-command
Abaqus executable options (default: [‘abaqus’, ‘abq2024’])
- --cubit-command
Cubit executable options (default: [‘cubit’])
- --backend
Possible choices: abaqus, cubit, gmsh
Back end software (default: ‘abaqus’)
required arguments#
- --input-file
Abaqus input file. Supports
*.inp
and*.cae
.- --output-file
Output image from the Abaqus viewport. Supports
*.png
and*.svg
.
optional arguments#
- --x-angle
Viewer rotation about X-axis in degrees (default: 0.0)
- --y-angle
Viewer rotation about Y-axis in degrees (default: 0.0)
- --z-angle
Viewer rotation about Z-axis in degrees (default: 0.0)
- --image-size
Image size in pixels (width, height) (default: [1920, 1080])
- --model-name
Model name. Unused by Cubit implementation. (default: ‘Model-1’)
- --part-name
Part name. Unused by Cubit implementation. (default: None)
- --color-map
Possible choices: Material, Section, Composite layup, Composite ply, Part, Part instance, Element set, Averaging region, Element type, Default, Assembly, Part geometry, Load, Boundary condition, Interaction, Constraint, Property, Meshability, Instance type, Set, Surface, Internal set, Internal surface, Display group, Selection group, Skin, Stringer, Cell, Face
Color map. Unused by Cubit implementation. (default: ‘Material’)
merge#
Supply multiple model database files, model names, and part names to merge the parts into a new model. Every model databse file is searched for every model/part name combination. If a part name is found in more than one model, return an error. Defaults to Abaqus, but can optionally run Cubit (Gmsh implementation is a work-in-progress). Cubit and Gmsh backends replace hyphens with underscores in part name(s) for ACIS compatibility. Cubit backend ignores model/assembly name arguments.
usage: turbo-turtle merge [-h] --input-file INPUT_FILE [INPUT_FILE ...]
--output-file OUTPUT_FILE
[--merged-model-name MERGED_MODEL_NAME]
[--model-name MODEL_NAME [MODEL_NAME ...]]
[--part-name PART_NAME [PART_NAME ...]]
[--abaqus-command ABAQUS_COMMAND [ABAQUS_COMMAND ...]]
[--cubit-command CUBIT_COMMAND [CUBIT_COMMAND ...]]
[--backend {abaqus,cubit,gmsh}]
Named Arguments#
- --abaqus-command
Abaqus executable options (default: [‘abaqus’, ‘abq2024’])
- --cubit-command
Cubit executable options (default: [‘cubit’])
- --backend
Possible choices: abaqus, cubit, gmsh
Back end software (default: ‘abaqus’)
required arguments#
- --input-file
Model database input file(s)
- --output-file
Model database file to save the merged model
optional arguments#
- --merged-model-name
Model to create and merge parts into (default: ‘Model-1’)
- --model-name
Model name(s) to query in the input model database file(s) (default: [None])
- --part-name
Part name(s) to search for within model(s). Unused by Cubit implementation. (default: [None])
export#
Export a part mesh as an orphan mesh Defaults to Abaqus, but can optionally run Cubit (Gmsh implementation is a work-in-progress). Cubit and Gmsh backends replace hyphens with underscores in part name(s) for ACIS compatibility. Cubit backend ignores model/assembly name arguments.
usage: turbo-turtle export [-h] --input-file INPUT_FILE
[--model-name MODEL_NAME]
[--part-name PART_NAME [PART_NAME ...]]
[--element-type ELEMENT_TYPE [ELEMENT_TYPE ...]]
[--destination DESTINATION] [--assembly ASSEMBLY]
[--output-type {abaqus,genesis,genesis-normal,genesis-hdf5}]
[--abaqus-command ABAQUS_COMMAND [ABAQUS_COMMAND ...]]
[--cubit-command CUBIT_COMMAND [CUBIT_COMMAND ...]]
[--backend {abaqus,cubit,gmsh}]
Named Arguments#
- --abaqus-command
Abaqus executable options (default: [‘abaqus’, ‘abq2024’])
- --cubit-command
Cubit executable options (default: [‘cubit’])
- --backend
Possible choices: abaqus, cubit, gmsh
Back end software (default: ‘abaqus’)
required arguments#
- --input-file
Model database input file
optional arguments#
- --model-name
Model name (default: ‘Model-1’)
- --part-name
Part name(s) or Cubit volume name(s). Cubit implementation converts hyphens to underscores for ACIS compatibility. (default: [‘Part-1’])
- --element-type
List of element types, one per part name or one global replacement for every part name (default: [None])
- --destination
Write orphan mesh files to this output directory (default: PWD)
- --assembly
Assembly file for exporting the assembly keyword block. If a file is provided, but no assembly instances are found, instance all provided part names and export assembly block (default: None)
- --output-type
Possible choices: abaqus, genesis, genesis-normal, genesis-hdf5
Cubit output type. When ‘abaqus’ is selected, each part name is exported as an orphan mesh to a
part_name
.inp file. When ‘genesis’ is selected all blocks are output to a single fileinput_file
.g (default: ‘abaqus’)