Skip to content

pyflightstream.workspace.morph (provisional)

Generated from the docstrings at build time: every one of the 2 names in the __all__ of pyflightstream.workspace.morph has an entry below. The names a guide or an example uses come first; the others follow under Advanced.

Morph a sector or a full wheel from one control file, on the OBJ (PFS-2193).

morph applies the tables the morphing file holds, in one fixed order: [hub_rings], [repitch], [collapse_te], [wheel]. The order is not a key: the ring route of repitch needs the rings, and the collapse leaves a closure triangle on the first ring, so no other order works; the wheel copies the finished sector. [hub_rings] is optional: without it, [repitch] hub_method (and band_width) decide how the hub follows each blade, and a quad-dominant hub is remeshed around each turned root (PFS-2196). Each step is the verb of the same name with its own checks, reading its own table and the top-level blades and hub. The steps pass their mesh, boundaries file and points files to the next through a private temporary folder; one output is written with its boundaries file, the points files it names and <out>.morph.json, and nothing is written beside the output when any step refuses.

Advanced

pyflightstream.workspace.morph.MORPH_ORDER module-attribute

MORPH_ORDER = (
    "hub_rings",
    "repitch",
    "collapse_te",
    "wheel",
)

pyflightstream.workspace.morph.morph_mesh

morph_mesh(
    mesh: str | Path, morphing: str | Path, out: str | Path
) -> dict[str, Any]

Apply the tables of a morphing control file to an OBJ, in their fixed order.

Parameters:

Name Type Description Default
mesh str or Path

Source OBJ, a sector or a full wheel, read only. A saved simulation (.fsm) is refused.

required
morphing str or Path

TOML control file: blades and hub at the top, and any of [hub_rings], [repitch], [collapse_te] and [wheel] (a sector only).

required
out str or Path

New OBJ. Existing outputs are refused.

required

Returns:

Type Description
dict

The order applied, each step's checks and the files written, also written as <out>.morph.json.