Skip to content

pyflightstream.workspace.iges_grid (provisional)

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

Grid a named IGES assembly into one OBJ, one family per component (PFS-2198).

Each IGES file is imported into one OpenCASCADE model (the gmsh kernel) with every face named by the NAME of its level (:mod:pyflightstream.workspace._iges_names). The faces are healed and fragmented together so the edges two components share are conformal, four-sided patches are meshed transfinite with the laws of the grid control file and recombined into quads, and every other patch is meshed quad-dominant at its component's size (:mod:pyflightstream.workspace._iges_mesh). The OBJ holds one family per component in the order of the control file, each oriented outward; <out>.boundaries.toml is the boundaries file pyfs-mesh mark-boundaries reads, with one points file per trailing edge found; and <out>.json records the nodes, faces, quad share, least scaled Jacobian and largest aspect of every component, the conformal check and every warning. Quality is warned with its numbers and never refused.

Advanced

pyflightstream.workspace.iges_grid.grid_iges

grid_iges(
    sources: Sequence[str | Path],
    grid: str | Path,
    out: str | Path,
    *,
    name_encoding: str = DEFAULT_NAME_ENCODING,
    components: Sequence[str] | None = None,
) -> dict[str, Any]

Grid the named components of IGES files into one OBJ with its boundaries file and record.

Parameters:

Name Type Description Default
sources sequence of str or Path

IGES files, read only; their faces are named by the NAME of their level.

required
grid str or Path

The grid control file (grid.toml).

required
name_encoding str

The text encoding of the NAME bytes in the IGES files; default "latin-1".

DEFAULT_NAME_ENCODING
components sequence of str

Grid only these components, named as the files name them (an exact name, or one that differs only in case); the others leave the model before the join. An unknown or ambiguous name is refused with the names found. Every component when omitted.

None
out str or Path

The OBJ to write; <out>.boundaries.toml, <out>.json and one <stem>.<component>.te.txt per component with a trailing edge are written beside it.

required

Returns:

Type Description
dict

The record written to <out>.json.

Raises:

Type Description
MissingExtraError

The gmsh library cannot load (KernelUnavailableError).

(InputValueError, InputArtifactError)

The control file or an IGES file is refused, or the geometry kernel failed (it runs in a worker process of its own, so a native fault ends only that worker and is reported with its cause); nothing was written.