The Open FUSION Toolkit 26.9
An open-source framework for fusion and plasma science and engineering
Loading...
Searching...
No Matches
OpenFUSIONToolkit.ThinCurr._mesh_cli Namespace Reference

Detailed Description

ThinCurr mesh manipulation and combination utility script and supporting functions.

See OFT_ThinCurr_mesh_tool: ThinCurr mesh manipulation utility

Authors
Open FUSION Toolkit contributors
Date
July 2026

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.

Function Documentation

◆ _parse_rotate()

_parse_rotate ( val)
protected

Validate and normalize a (axis, angle) argument pair.

◆ build_parser()

build_parser ( )

Construct the command-line argument parser.

◆ combine_meshes()

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.

Parameters
filenamesList of input file paths
distinct_regionsKeep each input's regions distinct by offsetting IDs
Returns
Combined ThinCurrMesh

◆ replicate_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.

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.

Parameters
meshInput ThinCurrMesh
ncopiesNumber of transformed copies to add (excludes the original)
shiftPer-copy incremental translation [3] (optional)
rotatePer-copy incremental rotation (axis, angle_deg) (optional)
centerCenter of rotation [3] (default: origin)
distinct_regionsIf True, offset region IDs so every copy is distinct
Returns
Replicated ThinCurrMesh

◆ resolve_jumper_indices()

resolve_jumper_indices ( nnodesets,
explicit = None,
index_range = None )

Resolve jumper nodeset indices from CLI options.

Parameters
nnodesetsNumber of nodesets available to categorize
explicitIterable of explicit 0-based indices (negative allowed)
index_range(start, stop) half-open range with Python slice semantics (negative allowed)
Returns
Sorted list of resolved 0-based jumper indices

◆ rotation_matrix()

rotation_matrix ( axis,
angle_deg )

Build a rotation matrix about a principal Cartesian axis.

Parameters
axisRotation axis: 'x', 'y', or 'z' (case-insensitive)
angle_degRotation angle in degrees (right-handed about axis)
Returns
3x3 rotation matrix

◆ script_entry()

script_entry ( argv = None)