![]() |
The Open FUSION Toolkit 26.9
An open-source framework for fusion and plasma science and engineering
|
ThinCurr mesh manipulation and combination utility script and supporting functions.
See OFT_ThinCurr_mesh_tool: ThinCurr mesh manipulation utility
Classes | |
| class | ThinCurrMesh |
| Container for a 3-node triangular ThinCurr surface mesh. More... | |
Functions | |
| _parse_rotate (val) | |
| Validate and normalize a (axis, angle) argument pair. | |
| build_parser () | |
| Construct the command-line argument parser. | |
| combine_meshes (filenames, distinct_regions=True) | |
| Combine multiple mesh files into a single mesh. | |
| replicate_mesh (mesh, ncopies, shift=None, rotate=None, center=None, distinct_regions=True) | |
| Generate an output mesh consisting of the original plus transformed copies. | |
| resolve_jumper_indices (nnodesets, explicit=None, index_range=None) | |
| Resolve jumper nodeset indices from CLI options. | |
| rotation_matrix (axis, angle_deg) | |
| Build a rotation matrix about a principal Cartesian axis. | |
| script_entry (argv=None) | |
| Command-line entry point. | |
|
protected |
Validate and normalize a (axis, angle) argument pair.
| build_parser | ( | ) |
Construct the command-line argument parser.
| combine_meshes | ( | filenames, | |
| distinct_regions = True ) |
Combine multiple mesh files into a single mesh.
Aborts if any input file contains native NODESET entries, since such uncategorized loops cannot be meaningfully combined; run the modify workflow first to convert them into ThinCurr holes/jumpers.
| filenames | List of input file paths |
| distinct_regions | Keep each input's regions distinct by offsetting IDs |
| replicate_mesh | ( | mesh, | |
| ncopies, | |||
| shift = None, | |||
| rotate = None, | |||
| center = None, | |||
| distinct_regions = True ) |
Generate an output mesh consisting of the original plus transformed copies.
The untransformed original is always kept. Copy k (k = 1..ncopies) is the input mesh with the incremental transform applied k times: shifted by k*shift and/or rotated by k*angle about center. The output therefore contains ncopies + 1 instances.
| mesh | Input ThinCurrMesh |
| ncopies | Number of transformed copies to add (excludes the original) |
| shift | Per-copy incremental translation [3] (optional) |
| rotate | Per-copy incremental rotation (axis, angle_deg) (optional) |
| center | Center of rotation [3] (default: origin) |
| distinct_regions | If True, offset region IDs so every copy is distinct |
| resolve_jumper_indices | ( | nnodesets, | |
| explicit = None, | |||
| index_range = None ) |
Resolve jumper nodeset indices from CLI options.
| nnodesets | Number of nodesets available to categorize |
| explicit | Iterable of explicit 0-based indices (negative allowed) |
| index_range | (start, stop) half-open range with Python slice semantics (negative allowed) |
| rotation_matrix | ( | axis, | |
| angle_deg ) |
Build a rotation matrix about a principal Cartesian axis.
| axis | Rotation axis: 'x', 'y', or 'z' (case-insensitive) |
| angle_deg | Rotation angle in degrees (right-handed about axis) |
| script_entry | ( | argv = None | ) |
Command-line entry point.
See OFT_ThinCurr_mesh_tool: ThinCurr mesh manipulation utility