/** * Serialize a `ScheduleExtraction` to IFC4-conformant STEP entity lines. * * The output is a list of `#N=IFC...(...);` lines (no preamble, no * `DATA;`/`ENDSEC;` framing) ready to be spliced into an existing STEP file * just before its terminating `ENDSEC;`. Every emitted entity carries: * * • a freshly minted express ID starting at `nextId` (the caller computes * `max(existing IDs) + 1`), * • a 22-character GlobalId — the one already on the `ScheduleExtraction` * when set, otherwise generated, * • a reference to the supplied `ownerHistoryId` for IfcRoot ownership * (pass `undefined` to emit `$`), * • IFC4-correct attribute counts and ordering — IfcWorkSchedule, * IfcTask + IfcTaskTime, IfcRelSequence + IfcLagTime, and the * IfcRelAssignsToControl / IfcRelAssignsToProcess / IfcRelNests edges. * * The function is pure — it doesn't mutate the input and never touches the * STEP source buffer. Re-running it with the same inputs produces the same * output (deterministic), which keeps round-trip exports stable and makes * unit tests simple. */ import type { ScheduleExtraction } from './schedule-extractor.js'; export interface SerializeScheduleOptions { /** First free express ID for the synthesized entities. */ nextId: number; /** * Express ID of an existing `IfcOwnerHistory` to reference, if the host * file has one. When omitted, every emitted entity uses `$` for ownership. */ ownerHistoryId?: number; /** * Look up an existing express ID for a product GlobalId (for binding * `IfcRelAssignsToProcess.RelatedObjects`). When omitted, the relationship * is skipped — the schedule is still valid IFC, just without product links. */ resolveProductExpressId?: (productGlobalId: string) => number | undefined; } export interface SerializeScheduleResult { /** STEP entity lines (each terminated with `;`). */ lines: string[]; /** First express ID after the last entity emitted. */ nextId: number; /** Statistics for diagnostics / preview UI. */ stats: { workSchedules: number; tasks: number; taskTimes: number; sequences: number; lagTimes: number; assignsToControl: number; assignsToProcess: number; relNests: number; }; } export declare function serializeScheduleToStep(data: ScheduleExtraction, options: SerializeScheduleOptions): SerializeScheduleResult; //# sourceMappingURL=schedule-serializer.d.ts.map