Skip to content

pyflightstream.workspace.iges_convert (provisional)

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

Rewrite one or more named IGES files as one IGES of B-spline faces, names kept (PFS-2199).

Each file is imported into one OpenCASCADE model (the gmsh kernel), every face is converted to a NURBS surface, and one IGES is written holding only B-spline surfaces and curves, the form the solver's CAD import reads. Each component keeps its name: its faces sit on one level and one 406 form 15 NAME names that level, so the solver and :func:pyflightstream.workspace._iges_names.read_iges_names read the same components back. The first file's length unit is kept and every other file is scaled to it. A compatible single NURBS source retains its coefficients and trims, with a second native import checking its faces and names before writing. A record <out>.json beside the output lists the faces of each component, the digest of every source, the surface types before and after, and the read-back.

Advanced

pyflightstream.workspace.iges_convert.convert_iges

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

Write the faces of sources as one IGES of NURBS faces with their component names.

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
out str or Path

The IGES to write; <out>.json is written beside it.

required
name_encoding str

The text encoding of the NAME bytes, read and written; default "latin-1".

DEFAULT_NAME_ENCODING

Returns:

Type Description
dict

The record written to <out>.json.

Raises:

Type Description
MissingExtraError

The gmsh library cannot load (KernelUnavailableError).

InputArtifactError

A source cannot be named face by face, the written file does not read back with the same components, or the geometry kernel failed (it runs in a worker process of its own, so a native fault ends only that worker, is reported with its cause, and the conversion is not retried); nothing was written.