Types - STEP
API reference for ./io/step on @huukhanhnguyen/types — the option and result records of @huukhanhnguyen/io's STEP reader/writer.
See the Guide for the package's role.
API reference
Signatures are generated from the live package .d.ts - not hand-written.
StepBrepDocument
interface
interface StepBrepDocumentStepCurveRow
type
The STEP writer's narrowed slice of the document curve union: the four curve kinds, without the segment trim wrapper (STEP has no window-onto-parent carrier — a trim is written as its own bounded curve).
Unit F: no kind "circle" — full circle is an arc with sweepAngle 2π.
type StepCurveRow
// = ({ type: "line"; } & LineCurve) | ({ type: "arc"; } & ArcCurve) | ({ type: "ellipse"; } & EllipseCurve) | ({ type: "nurbs"; } & NurbsCurve)StepEntity
interface
interface StepEntityStepOptions
interface
Options for the entity-level STEP door (entitiesToStep / sceneToStep, which orchestrate in @huukhanhnguyen/model — this tier writes DOCUMENTS, not entities). Same rule as every other writer: without definitions a BlockEntity resolves to nothing and writes NOTHING, never a copy left untransformed at the origin.
A placement is EXPANDED, not written as MAPPED_ITEM over a REPRESENTATION_MAP (STEP's own instancing, the entity IFC's IfcMappedItem derives from). Expansion here costs no geometry: the placement matrix goes through the kernel's exact B-rep transform, so a placed cylinder is still a CYLINDRICAL_SURFACE in the file — it costs repeated entity ROWS. MAPPED_ITEM would buy that file size back at the price of a second representation tier (one SHAPE_REPRESENTATION + REPRESENTATION_MAP per definition, plus a CARTESIAN_TRANSFORMATION_OPERATOR_3D per placement) that every reader on the other side has to support; the exact geometry — the reason this format exists here — is identical either way.
interface StepOptionsStepShellBody
interface
interface StepShellBodyStepSurfaceRow
type
type StepSurfaceRow
// = {
type: "plane";
normal: Vector;
d: number;
uvMin: [number, number];
uvMax: [number, number];
}StepWriteBody
interface
interface StepWriteBody