Skip to content

pyflightstream.geometry.iges_profile (provisional)

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

The IGES profile the FlightStream reader is known to accept, and what is not known.

A plain description with no kernel and no file access: :mod:pyflightstream.workspace._geom_gate measures a file against it. Every value here is either observed (a file of that shape was read by the solver) or None, which means no source states a limit and a file beyond the observed shape is warned about, never refused. Only a solid entity is refused, because the package builds surfaces only.

Observed: non-rational, clamped, bicubic parametric surfaces (entity 128), trimmed by an outer boundary (entities 142 and 102) and, where a face has holes, inner boundaries, each face named by a 406 form 15 property. The observed degrees are a set per direction and the observed net size a limit, both filled from the licensed reader probe (record tests/tier1_offline/data/g13p-reads.json, build 26.127): the solver read faces of degree 1, 3 and 5 in either direction, and a net of 111 by 18, from files written by iges-convert; the same probe files as the package writes them, imported directly, read with the same areas (record tests/tier1_offline/data/g13d-reads.json, the P2 file of PREF 2 excepted). The direct route reads a face only when its outer boundary has parameter-space curves flagged 2D parametric (entity use 05) and a PREF other than 2; the writer states both, and a PREF 2 asked of it is warned about and written as 1. No net limit is stated because the largest net probed was not a failing one. The native route's import of a generated wing and of a body, directly, through IMPORT_CAD and CONVERT_CAD_TO_MESH on build 26.127, is recorded in tests/tier3_licensed/data/g13-native-import.json: the solver reads the faces the profile states and names the one body it converts Model 0.

Advanced

pyflightstream.geometry.iges_profile.GateFinding dataclass

GateFinding(
    check: str,
    severity: str,
    entity: int | None,
    detail: str,
)

One defect: the check that found it, fail or warn, the entity and the detail.

pyflightstream.geometry.iges_profile.OBSERVED module-attribute

OBSERVED = ReaderProfile(
    degrees_u=(1, 3, 5),
    degrees_v=(1, 3, 5),
    inner_loops=True,
)

pyflightstream.geometry.iges_profile.ReaderProfile dataclass

ReaderProfile(
    rational: bool = False,
    clamped: bool = True,
    degrees: tuple[int, ...] = (3,),
    max_degree: int | None = None,
    bad_side_counts: tuple[int, ...] = (3,),
    degrees_u: tuple[int, ...] | None = None,
    degrees_v: tuple[int, ...] | None = None,
    max_net: tuple[int, int] | None = None,
    loop_gap: float = 1e-07,
    inner_loops: bool = False,
)

What the reader is known to accept.

degrees are the degrees a file was read with, in both directions; degrees_u and degrees_v replace them for one direction once the probe observes the two apart. max_degree is a stated limit, None while no source gives one: a degree outside the observed ones is then warned about; once a source sets it, a degree above it fails. max_net is the largest net, as points in u and in v, a probe read: None states no limit, and a larger net then fails. bad_side_counts are the numbers of curves of an outer boundary that fail: a three-sided face collapses a side and is not among the observed shapes. loop_gap is the gap, in parameter units, within which a trim loop is closed. inner_loops is true once a probe read a face with an inner boundary with the hole subtracted; while it is false, a face with inner boundaries is warned about.

observed

observed(direction: str) -> tuple[int, ...]

Return the degrees observed read in direction ("u" or "v").

pyflightstream.geometry.iges_profile.SOLID_ENTITIES module-attribute

SOLID_ENTITIES: tuple[int, ...] = (
    150,
    152,
    154,
    156,
    158,
    160,
    162,
    164,
    168,
    180,
    184,
    186,
    430,
    502,
    504,
    508,
    510,
    514,
)

pyflightstream.geometry.iges_profile.surface_findings

surface_findings(
    entity: dict[str, Any], profile: ReaderProfile
) -> list[GateFinding]

Return the findings of one surface entity (128) measured against profile.

Parameters:

Name Type Description Default
entity dict

One parsed entity of type 128: its id and its parameters as read from the parameter data section.

required
profile ReaderProfile

The profile the surface is measured against, usually :data:OBSERVED.

required

Returns:

Type Description
list of GateFinding

One finding per defect: rational weights, unclamped knots or a degree outside the profile. Empty when the surface matches the profile.