@ifc-lite/wasm 4.1.4 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/pkg/ifc-lite.d.ts CHANGED
@@ -1,1270 +1,1456 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
 
4
+ /**
5
+ * Packed result of one rule run. Parallel arrays, one entry per clash record;
6
+ * `points` has 3 per record and `bounds` has 6 per record.
7
+ */
4
8
  export class ClashRunResult {
5
- private constructor();
6
- free(): void;
7
- [Symbol.dispose](): void;
8
- readonly a: Uint32Array;
9
- readonly b: Uint32Array;
10
- readonly bounds: Float64Array;
11
- readonly points: Float64Array;
12
- readonly status: Uint8Array;
13
- readonly distance: Float64Array;
9
+ private constructor();
10
+ free(): void;
11
+ [Symbol.dispose](): void;
12
+ readonly a: Uint32Array;
13
+ readonly b: Uint32Array;
14
+ readonly bounds: Float64Array;
15
+ readonly distance: Float64Array;
16
+ readonly points: Float64Array;
17
+ readonly status: Uint8Array;
14
18
  }
15
19
 
20
+ /**
21
+ * A clash session: ingest element geometry once, then run rules repeatedly.
22
+ */
16
23
  export class ClashSession {
17
- free(): void;
18
- [Symbol.dispose](): void;
19
- constructor();
20
- /**
21
- * Ingest N elements from flat arenas.
22
- *
23
- * - `positions`: concatenated per-element vertex coords (x,y,z,...)
24
- * - `pos_ranges`: 2 per element = [float_offset, float_len]
25
- * - `indices`: concatenated per-element LOCAL (0-based) triangle indices
26
- * - `idx_ranges`: 2 per element = [idx_offset, idx_len]
27
- * - `aabbs`: 6 per element = [minx,miny,minz,maxx,maxy,maxz]
28
- */
29
- ingest(positions: Float32Array, pos_ranges: Uint32Array, indices: Uint32Array, idx_ranges: Uint32Array, aabbs: Float32Array): void;
30
- /**
31
- * Run one rule. `group_a`/`group_b` are GLOBAL element indices; an empty
32
- * `group_b` means a self-clash within `group_a`. `mode`: 0 = hard,
33
- * 1 = clearance. Records carry GLOBAL element indices.
34
- */
35
- runRule(group_a: Uint32Array, group_b: Uint32Array, mode: number, tolerance: number, clearance: number, report_touch: boolean): ClashRunResult;
24
+ free(): void;
25
+ [Symbol.dispose](): void;
26
+ /**
27
+ * Ingest N elements from flat arenas.
28
+ *
29
+ * - `positions`: concatenated per-element vertex coords (x,y,z,...)
30
+ * - `pos_ranges`: 2 per element = [float_offset, float_len]
31
+ * - `indices`: concatenated per-element LOCAL (0-based) triangle indices
32
+ * - `idx_ranges`: 2 per element = [idx_offset, idx_len]
33
+ * - `aabbs`: 6 per element = [minx,miny,minz,maxx,maxy,maxz]
34
+ */
35
+ ingest(positions: Float32Array, pos_ranges: Uint32Array, indices: Uint32Array, idx_ranges: Uint32Array, aabbs: Float32Array): void;
36
+ constructor();
37
+ /**
38
+ * Run one rule. `group_a`/`group_b` are GLOBAL element indices; an empty
39
+ * `group_b` means a self-clash within `group_a`. `mode`: 0 = hard,
40
+ * 1 = clearance. Records carry GLOBAL element indices.
41
+ */
42
+ runRule(group_a: Uint32Array, group_b: Uint32Array, mode: number, tolerance: number, clearance: number, report_touch: boolean): ClashRunResult;
43
+ }
44
+
45
+ /**
46
+ * A set of closed 2D rings, grouped into disjoint shapes.
47
+ *
48
+ * Rings carry no duplicated closing vertex (connect the last point back to
49
+ * the first). Winding is meaningful: a counter-clockwise ring covers area, a
50
+ * clockwise one removes it, so an outer boundary and its holes are
51
+ * distinguishable without any extra tagging — the property
52
+ * `meshOutline2d`'s flattened contour list relies on too.
53
+ */
54
+ export class Contours2D {
55
+ free(): void;
56
+ [Symbol.dispose](): void;
57
+ /**
58
+ * Axis-aligned bounds as `[minX, minY, maxX, maxY]`, or `undefined` when
59
+ * empty. Cheap enough to gate the boolean itself: an accumulated occluder
60
+ * whose bounds miss the next element needs no difference at all.
61
+ */
62
+ bounds(): Float64Array | undefined;
63
+ /**
64
+ * Every ring's coordinates concatenated. Paired with `ringLengths()` this
65
+ * reconstructs the set through the constructor, and reads a whole result
66
+ * back in one boundary crossing instead of one per ring. It round-trips the
67
+ * constructor's *sanitised* rings — degenerate rings and explicit closing
68
+ * vertices are dropped at construction, so those are not echoed back.
69
+ */
70
+ coords(): Float64Array;
71
+ /**
72
+ * Adopt the rings of a `meshOutline2d` result, widening its f32
73
+ * coordinates to the f64 the boolean engine works in.
74
+ *
75
+ * The outline's `axisMin`/`axisMax` are dropped — they describe the cut
76
+ * axis, which a 2D boolean has no notion of; keep them on the JS side if
77
+ * the caller still needs them for band classification.
78
+ */
79
+ static fromMeshOutline(outline: MeshOutlineJs): Contours2D;
80
+ /**
81
+ * Build a contour set from flat coordinates plus per-ring vertex counts.
82
+ *
83
+ * `coords` is `[x0, y0, x1, y1, …]` with every ring concatenated in order;
84
+ * `ringLengths[i]` is the VERTEX count (not the float count) of ring `i`.
85
+ * Throws when the counts do not add up to `coords.length / 2`.
86
+ *
87
+ * Shape grouping is a property of boolean *results*: a set built here is
88
+ * an unstructured ring soup, so `shapeCount` reports 0 until it has been
89
+ * through an operation (`resolve2d` alone is enough). Degenerate rings
90
+ * (under 3 vertices, non-finite, or exactly collinear) are dropped at
91
+ * construction, so `isEmpty`/`bounds()` report the same rings a later
92
+ * boolean would keep rather than exposing an unsanitised soup.
93
+ */
94
+ constructor(coords: Float64Array, ring_lengths: Uint32Array);
95
+ /**
96
+ * Ring `index` as a flat `[x0, y0, x1, y1, …]` array, or `undefined` when
97
+ * out of range.
98
+ */
99
+ ring(index: number): Float64Array | undefined;
100
+ /**
101
+ * Vertex count of each ring, in the same order as `coords()`.
102
+ */
103
+ ringLengths(): Uint32Array;
104
+ /**
105
+ * Ring index at which each shape starts. Entry `s` is shape `s`'s OUTER
106
+ * ring; the rings up to the next entry (or `ringCount`) are its holes.
107
+ */
108
+ shapeOffsets(): Uint32Array;
109
+ /**
110
+ * True when the set holds no rings. Degenerate rings are dropped at
111
+ * construction and never emitted by an operation, so this also means the
112
+ * set covers no area.
113
+ */
114
+ readonly isEmpty: boolean;
115
+ /**
116
+ * Total number of boundary rings across every shape.
117
+ */
118
+ readonly ringCount: number;
119
+ /**
120
+ * Number of disjoint shapes, or 0 for a set that has not been through an
121
+ * operation yet (see the constructor).
122
+ */
123
+ readonly shapeCount: number;
36
124
  }
37
125
 
126
+ /**
127
+ * A collection of resolved grid axes.
128
+ */
38
129
  export class GridAxisCollection {
39
- private constructor();
40
- free(): void;
41
- [Symbol.dispose](): void;
42
- /**
43
- * Get the axis at `index`. Returns `undefined` for out-of-bounds index.
44
- */
45
- getAxis(index: number): GridAxisJs | undefined;
46
- /**
47
- * Number of grid axes.
48
- */
49
- readonly length: number;
50
- /**
51
- * Whether the collection is empty.
52
- */
53
- readonly isEmpty: boolean;
130
+ private constructor();
131
+ free(): void;
132
+ [Symbol.dispose](): void;
133
+ /**
134
+ * Get the axis at `index`. Returns `undefined` for out-of-bounds index.
135
+ */
136
+ getAxis(index: number): GridAxisJs | undefined;
137
+ /**
138
+ * Whether the collection is empty.
139
+ */
140
+ readonly isEmpty: boolean;
141
+ /**
142
+ * Number of grid axes.
143
+ */
144
+ readonly length: number;
54
145
  }
55
146
 
147
+ /**
148
+ * One grid axis: tag + endpoints in renderer Y-up world space (metres).
149
+ */
56
150
  export class GridAxisJs {
57
- private constructor();
58
- free(): void;
59
- [Symbol.dispose](): void;
60
- /**
61
- * End endpoint `[x, y, z]` in renderer Y-up world space (metres).
62
- */
63
- readonly end: Float32Array;
64
- /**
65
- * Axis tag (e.g. `"A"`, `"1"`); empty string when unauthored.
66
- */
67
- readonly tag: string;
68
- /**
69
- * Start endpoint `[x, y, z]` in renderer Y-up world space (metres).
70
- */
71
- readonly start: Float32Array;
72
- /**
73
- * Express ID of the `IfcGridAxis`.
74
- */
75
- readonly axisId: number;
76
- /**
77
- * Express ID of the owning `IfcGrid`.
78
- */
79
- readonly gridId: number;
151
+ private constructor();
152
+ free(): void;
153
+ [Symbol.dispose](): void;
154
+ /**
155
+ * Express ID of the `IfcGridAxis`.
156
+ */
157
+ readonly axisId: number;
158
+ /**
159
+ * End endpoint `[x, y, z]` in renderer Y-up world space (metres).
160
+ */
161
+ readonly end: Float32Array;
162
+ /**
163
+ * Express ID of the owning `IfcGrid`.
164
+ */
165
+ readonly gridId: number;
166
+ /**
167
+ * Start endpoint `[x, y, z]` in renderer Y-up world space (metres).
168
+ */
169
+ readonly start: Float32Array;
170
+ /**
171
+ * Axis tag (e.g. `"A"`, `"1"`); empty string when unauthored.
172
+ */
173
+ readonly tag: string;
80
174
  }
81
175
 
176
+ /**
177
+ * Main IFC-Lite API
178
+ */
82
179
  export class IfcAPI {
83
- free(): void;
84
- [Symbol.dispose](): void;
85
- /**
86
- * Export the render geometry in `content` as a binary **GLB** (`Uint8Array`).
87
- *
88
- * `hidden` / `isolated` are express-id visibility filters; `hidden_types_csv` is a
89
- * comma-separated list of IFC type names whose class toggle is off (e.g.
90
- * `"IfcOpeningElement,IfcSpace"`). `include_metadata` attaches counts + per-node
91
- * `expressId`. Per-mesh RTC origin rides the node translation (precision-safe).
92
- * `lit` emits standard PBR materials that shade from normals; omitted or
93
- * `true` ⇒ lit (the default), `false` ⇒ flat `KHR_materials_unlit` (the
94
- * historical look #1321). Optional at the boundary so older 5-arg callers
95
- * keep lit-by-default behaviour.
96
- * `emissive` self-illuminates each material at its base colour (core glTF
97
- * `emissiveFactor`) so renderers without ambient/IBL — Google Earth — don't
98
- * render the model near-black (#1427); omitted or `false` off.
99
- *
100
- * Fails CLOSED: when the visible mesh set is empty this throws an `Error`
101
- * whose message starts with `NO_RENDER_GEOMETRY`, instead of returning a
102
- * structurally valid but empty GLB. #1438 put that guard only in the TS
103
- * CLI/MCP wrappers; making the boundary itself refuse means SDK/viewer/
104
- * direct callers inherit it too (the TS guards stay as defense-in-depth).
105
- */
106
- exportGlb(content: Uint8Array, include_metadata: boolean, hidden: Uint32Array, isolated: Uint32Array, hidden_types_csv: string, lit?: boolean | null, emissive?: boolean | null): Uint8Array;
107
- /**
108
- * Package an already-produced **GLB** + georeference into a **KMZ** (`Uint8Array`)
109
- * for Google Earth: a ZIP of `doc.kml` (a `<Model>` placed at `latitude`/`longitude`/
110
- * `altitude`) + `model.glb`. `x_axis_abscissa`/`x_axis_ordinate` are the
111
- * `IfcMapConversion` grid-north components; pass both as `undefined` for heading 0.
112
- *
113
- * `altitude_mode` selects the KML vertical placement: `"clampToGround"`
114
- * (the default when omitted) rests the model on the terrain, ignoring
115
- * `altitude`; `"absolute"` places the origin at `altitude` metres MSL.
116
- * Google Earth's terrain already encodes the site elevation, so clamping
117
- * keeps a wrong/zero/double-counted OrthogonalHeight from floating the
118
- * model into the sky (#1427); absolute is offered for models whose
119
- * OrthogonalHeight is a true MSL elevation the user wants honoured.
120
- */
121
- exportKmz(glb: Uint8Array, latitude: number, longitude: number, altitude: number, x_axis_abscissa: number | null | undefined, x_axis_ordinate: number | null | undefined, name: string, altitude_mode?: string | null): Uint8Array;
122
- /**
123
- * Assemble a **GLB** from already-produced meshes (the viewer's `MeshData`, flattened)
124
- * no re-meshing. Per mesh `i`: `vertex_counts[i]` verts + `index_counts[i]` indices
125
- * taken in order from the concatenated `positions`/`normals`/`indices`; `colors` is
126
- * RGBA per mesh, `origins` xyz per mesh, `express_ids` labels each mesh (indices are
127
- * per-mesh local). The caller passes exactly the meshes it wants emitted.
128
- */
129
- exportGlbFromMeshes(positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, colors: Float32Array, origins: Float64Array, express_ids: Uint32Array, include_metadata: boolean, lit?: boolean | null, emissive?: boolean | null): Uint8Array;
130
- /**
131
- * Build a Google-Earth-ready **KMZ** (`Uint8Array`) straight from the viewer's
132
- * already-produced meshes — the working path (#1427). The model is embedded as
133
- * **COLLADA** (`model.dae`), the only `<Model>` format Google Earth loads (a GLB
134
- * raises "Unsupported element: Model"), with emission-lit double-sided materials
135
- * placement. Mesh arrays match `exportGlbFromMeshes`;
136
- * `latitude`/`longitude`/`altitude` + `x_axis_abscissa`/`x_axis_ordinate`
137
- * (grid-north, `undefined` heading 0) place + orient the model.
138
- * `altitude_mode` (`"clampToGround"` default ⇒ rest on terrain, ignoring
139
- * `altitude`; `"absolute"` ⇒ place at `altitude` metres MSL) selects the
140
- * KML vertical placement (#1427).
141
- */
142
- exportKmzFromMeshes(positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, colors: Float32Array, origins: Float64Array, latitude: number, longitude: number, altitude: number, x_axis_abscissa: number | null | undefined, x_axis_ordinate: number | null | undefined, name: string, altitude_mode?: string | null): Uint8Array;
143
- /**
144
- * Export the render geometry in `content` as Wavefront **OBJ** UTF-8 bytes.
145
- *
146
- * Returned as UTF-8 bytes (`Uint8Array`) so output is not capped by the
147
- * V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
148
- * is genuinely needed.
149
- *
150
- * `hidden` / `isolated` are express-id filters mirroring the viewer's visibility
151
- * state (empty `isolated` all visible). Instanced type-library shapes are skipped.
152
- *
153
- * ```javascript
154
- * const obj = api.exportObj(ifcContent, true, new Uint32Array(), new Uint32Array());
155
- * ```
156
- */
157
- exportObj(content: Uint8Array, include_normals: boolean, hidden: Uint32Array, isolated: Uint32Array): Uint8Array;
158
- /**
159
- * Sharded pre-pass: merge the shard-resolved styled-item columns with the
160
- * SUPPORT spans (extracted host-side from the shard classes) and run the
161
- * CANONICAL styles flatten. Returns the exact `styles` event payload the
162
- * serial path emits. Runs on any worker with `setEntityIndex` installed.
163
- * Span arguments are `[id, start, len]` triples; `plane_angle_to_radians`
164
- * comes from the meta event.
165
- */
166
- finalizePrepassStyles(data: Uint8Array, orphan_ids: Uint32Array, orphan_colors: Float32Array, geom_ids: Uint32Array, geom_colors: Float32Array, colour_map_spans: Uint32Array, material_def_spans: Uint32Array, rel_material_spans: Uint32Array, void_spans: Uint32Array, fills_spans: Uint32Array, aggregate_spans: Uint32Array, plane_angle_to_radians: number): any;
167
- /**
168
- * SPIKE (sharded pre-pass): scan the entity index over a single byte range.
169
- *
170
- * Each idle browser geometry worker calls this on its `[range_start,
171
- * range_end)` shard; the main thread stitches the returned columns into the
172
- * full entity index (byte-identical to the single-threaded
173
- * `build_entity_index`) by binary-searching each shard for the previous
174
- * shard's `handoff`. Delegates to `ifc_lite_processing::scan_shard`, the
175
- * exact per-chunk primitive the native `build_entity_index_parallel` fans
176
- * across cores — so the sharded merge cannot drift from the serial builder.
177
- *
178
- * Byte offsets returned are GLOBAL (relative to file start), so shards
179
- * concatenate without rewriting. Returns a plain object:
180
- * `{ ids: Uint32Array, starts: Uint32Array, lengths: Uint32Array,
181
- * handoff: number }`
182
- * where `handoff` is the global start of the first entity at/after
183
- * `range_end` (the next shard's first real entity), or `-1` at EOF.
184
- */
185
- scanEntityIndexShard(data: Uint8Array, range_start: number, range_end: number): any;
186
- /**
187
- * Sharded pre-pass: resolve ONE contiguous (file-ordered) slice of the
188
- * styled-item span list on this worker, against the entity index installed
189
- * by `setEntityIndex`. Returns raw resolved maps as flat columns:
190
- * `{ orphanIds, orphanColors (f32 rgba per id), geomIds, geomColors }`.
191
- * The host merges shard results IN SHARD ORDER with first-wins per
192
- * geometry id, reproducing the serial resolver's file-order precedence,
193
- * then hands the merged columns to `finalizePrepassStyles`.
194
- * `spans` is `[id, start, len]` triples.
195
- */
196
- resolveStyledItemsShard(data: Uint8Array, spans: Uint32Array): any;
197
- /**
198
- * Sharded pre-pass variant: same scan/discovery/jobs/columns pipeline as
199
- * `buildPrePassStreaming`, but
200
- * 1. the entity index is PREBUILT from the host's stitched shard columns
201
- * (file order; see `scanEntityIndexShard`) — the scan skips its inline
202
- * index build, the meta RTC ladder resolves against the FULL index
203
- * (no partial-ladder full-rescan detour), and the post-scan
204
- * `entity-index` event is skipped (the host already delivered it), and
205
- * 2. styles resolution is EXTERNAL: the styled-item spans are resolved as
206
- * shard slices on the geometry workers (`resolveStyledItemsShard`);
207
- * this call stashes the SUPPORT spans + plane-angle scale, and the
208
- * follow-up `finalizePrepassStyles` merges + flattens into the exact
209
- * styles payload the serial path emits. NO `styles` event is emitted
210
- * here.
211
- */
212
- buildPrePassStreamingSharded(data: Uint8Array, on_event: Function, chunk_size: number, disabled_type_names: string[] | null | undefined, skip_type_geometry: boolean, index_ids: Uint32Array, index_starts: Uint32Array, index_lengths: Uint32Array, index_classes: Uint8Array): any;
213
- /**
214
- * Store the whole IFC source file ONCE per load so the `*FromSource` batch
215
- * variants can read it from the wasm heap instead of re-copying it per call.
216
- *
217
- * Mirrors the `setEntityIndex` lifecycle: called once per worker per load,
218
- * and REPLACES the previous file wholesale (repeated calls swap the bytes),
219
- * so a parser/geometry worker reusing one `IfcAPI` across loads is safe.
220
- * The bytes must be the exact source the batch jobs' byte spans index into
221
- * (the same buffer passed as `data` to the legacy `processGeometryBatch*`),
222
- * or the decoded entities won't match — the JS worker installs its own
223
- * session buffer, so this holds by construction.
224
- *
225
- * Taking `Vec<u8>` (by value) means wasm-bindgen hands us ownership of the
226
- * single JS→wasm copy directly; we wrap it in `Arc` with no second copy.
227
- */
228
- setSourceBytes(data: Uint8Array): void;
229
- /**
230
- * Like [`IfcAPI::process_geometry_batch`] but reads the source bytes held by
231
- * [`IfcAPI::set_source_bytes`] instead of taking `data`. Byte-for-byte
232
- * identical output it delegates to the legacy twin with the held slice.
233
- */
234
- processGeometryBatchFromSource(jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): MeshCollection;
235
- /**
236
- * Like [`IfcAPI::process_geometry_batch_partitioned`] but reads the source
237
- * bytes held by [`IfcAPI::set_source_bytes`] instead of taking `data`.
238
- * Byte-for-byte identical output it delegates to the legacy twin.
239
- */
240
- processGeometryBatchPartitionedFromSource(jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): PartitionedBatch;
241
- /**
242
- * Process geometry for a subset of pre-scanned entities → flat
243
- * MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
244
- * Thin wrapper over [`IfcAPI::produce_batch`]; converts each produced mesh
245
- * to MeshDataJs (the IFC Z-up→WebGL Y-up swap + winding reversal happen
246
- * there). Output is byte-for-byte what the pre-refactor method produced.
247
- */
248
- processGeometryBatch(data: Uint8Array, jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): MeshCollection;
249
- /**
250
- * Like [`IfcAPI::process_geometry_batch`] but collates the batch's meshes
251
- * into a GPU-instancing shard (IFNS wire format) instead of a flat
252
- * MeshCollection. Repeated geometry collapses to one template + per-
253
- * occurrence transforms; non-instanceable meshes ride as flat singleton
254
- * templates so nothing is dropped. The shard stays in the producer-native
255
- * (IFC Z-up) frame the renderer composes the constant Z-up→Y-up swap at
256
- * upload. Each batch shard renders independently: affinity routing already
257
- * co-locates identical geometry on one worker, so per-batch collation
258
- * captures ~all the dedup and no cross-batch merge is needed. Returns empty
259
- * bytes only when the batch produced zero non-empty meshes.
260
- */
261
- processGeometryBatchInstanced(data: Uint8Array, jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): Uint8Array;
262
- /**
263
- * Produce a batch ONCE and PARTITION it (the instanced-ONLY path): opaque
264
- * ordinary occurrences (colour alpha >= 0.99 AND geometry_class == 0) are
265
- * collated into the instanced shard; everything else (transparent glass,
266
- * type-product geometry) goes to the flat MeshCollection. Each mesh takes
267
- * exactly ONE route, so produce_batch runs once (no emit-both 2× meshing)
268
- * and the renderer draws opaque occurrences via instancing instead of flat.
269
- * Partition mirrors the renderer gates: INSTANCED_ALPHA_CUTOFF (0.99 =
270
- * OPAQUE_ALPHA_CUTOFF) for transparency, geometry_class for the Model/Types
271
- * split.
272
- *
273
- * NOTE: the renderer must be instanced-feature-complete (picking / selection
274
- * / lens overlays on instanced geometry) before the worker calls this in
275
- * place of processGeometryBatch otherwise those features break for the
276
- * opaque bulk. See the instanced-only follow-ups.
277
- */
278
- processGeometryBatchPartitioned(data: Uint8Array, jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): PartitionedBatch;
279
- /**
280
- * Run the pre-pass ONCE and return serialized results for worker distribution.
281
- * Takes raw bytes (&[u8]) to avoid TextDecoder overhead.
282
- */
283
- buildPrePassOnce(data: Uint8Array): any;
284
- /**
285
- * Streaming pre-pass: emits geometry jobs in chunks via a JS callback
286
- * instead of waiting for the full file scan to complete.
287
- *
288
- * Single linear walk over the file:
289
- * 1. Builds the entity index incrementally from the same scan that
290
- * collects geometry jobs (a separate index scan would double
291
- * wall-clock).
292
- * 2. As soon as `IFCPROJECT` has been seen, the unit scale and the
293
- * first ~50 geometry jobs have been collected, resolves
294
- * `unitScale` + `rtcOffset` and emits a `meta` callback so the
295
- * JS host can spin up geometry process workers.
296
- * 3. Emits `jobs` callbacks every `chunk_size` jobs (or fewer if
297
- * the meta phase already buffered some).
298
- * 4. Emits `complete` with the total job count at end of scan.
299
- *
300
- * On a 986 MB / 14 M-entity file this drops time-to-first-geometry
301
- * from ~17 s (full pre-pass + worker spawn + first batch) to ~3 s
302
- * (first 100 K bytes scanned + meta + first chunk).
303
- *
304
- * The callback receives a single `JsValue` argument shaped as one of:
305
- * `{ type: "meta", unitScale, rtcOffset: [x,y,z], needsShift, buildingRotation? }`
306
- * `{ type: "jobs", jobs: Uint32Array }` // [id, start, end] triples
307
- * `{ type: "complete", totalJobs }`
308
- */
309
- buildPrePassStreaming(data: Uint8Array, on_event: Function, chunk_size: number, disabled_type_names: string[] | null | undefined, skip_type_geometry: boolean): any;
310
- /**
311
- * Parse the file and return structured per-axis data (tag + endpoints) in
312
- * the renderer's Y-up world space (RTC-subtracted, metres). Use this when
313
- * you also need the axis tags (to render grid bubbles / labels).
314
- */
315
- parseGridAxes(content: string): GridAxisCollection;
316
- /**
317
- * Parse the file and return every `IfcGridAxis` as a flat `Float32Array`
318
- * of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` (one segment per
319
- * axis) in the renderer's Y-up world space (RTC-subtracted, metres). Feed
320
- * straight to a line pipeline (e.g. `uploadAnnotationLines3D`).
321
- *
322
- * Returns an empty array when the file has no grids, so the caller can
323
- * clear the overlay cheaply.
324
- */
325
- parseGridLines(content: string): Float32Array;
326
- /**
327
- * Export tabular **CSV**. `mode` ∈ {`"entities"`, `"properties"`, `"quantities"`,
328
- * `"spatial"`}. `delimiter` defaults to `,` when empty; `include_properties` adds
329
- * flattened `Pset_Prop` columns to the entities view.
330
- */
331
- exportCsv(content: Uint8Array, mode: string, delimiter: string, include_properties: boolean): Uint8Array;
332
- /**
333
- * Export **IFC5 / IFCX** (the USD-style node graph). `only_known_properties` keeps
334
- * only properties with an official IFC5 schema.
335
- */
336
- exportIfcx(content: Uint8Array, only_known_properties: boolean, pretty: boolean): Uint8Array;
337
- /**
338
- * Export structured **JSON** (array of entity objects with typed property values).
339
- */
340
- exportJson(content: Uint8Array, pretty: boolean, include_properties: boolean, include_quantities: boolean): Uint8Array;
341
- /**
342
- * Export **JSON-LD** (`@graph` of `ifc:` nodes). Empty `context` ⇒ buildingSMART
343
- * IFC4 OWL default. `included` is an express-id isolation filter mirroring the
344
- * OBJ/glTF/STEP exporters (empty ⇒ all entities).
345
- */
346
- exportJsonld(content: Uint8Array, context: string, include_properties: boolean, include_quantities: boolean, pretty: boolean, included: Uint32Array): Uint8Array;
347
- /**
348
- * Re-serialize the model in `content` to STEP/IFC UTF-8 bytes.
349
- *
350
- * Returned as UTF-8 bytes (`Uint8Array`) so output is not capped by the
351
- * V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
352
- * is genuinely needed.
353
- *
354
- * `schema` is the FILE_SCHEMA label to write (empty ⇒ preserve the source schema).
355
- * `included` is an express-id allowlist (empty whole model); when set, the forward
356
- * `#`-reference closure is added so the subset never dangles a reference.
357
- * `mutations_json` carries `MutablePropertyView` edits (attribute updates +
358
- * property-set synthesis); empty none. See `export_step_json` for the shape.
359
- */
360
- exportStep(content: Uint8Array, schema: string, included: Uint32Array, mutations_json: string): Uint8Array;
361
- /**
362
- * Merge several IFC models into one STEP/IFC UTF-8 byte buffer (`Uint8Array`).
363
- * `concatenated` is every model's
364
- * bytes laid end-to-end; `lengths[i]` is the byte length of model `i`. The first model
365
- * keeps its ids; later models are id-offset and their project unified to the first.
366
- */
367
- exportMerged(concatenated: Uint8Array, lengths: Uint32Array, schema: string): Uint8Array;
368
- /**
369
- * Export the `IfcSpace` volumes in `content` as Honeybee **HBJSON** UTF-8 bytes.
370
- *
371
- * Returned as UTF-8 bytes (`Uint8Array`) so output is not capped by the
372
- * V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
373
- * is genuinely needed.
374
- *
375
- * Rooms are built analytically from extruded-area profiles (watertight by construction);
376
- * faces are typed Floor / RoofCeiling / Wall with outward normals. The result loads via
377
- * `honeybee.model.Model.from_hbjson` and is ready for Ladybug Tools / Pollination.
378
- *
379
- * ```javascript
380
- * const api = new IfcAPI();
381
- * const hbjson = api.exportHbjson(ifcContent, "my_model");
382
- * ```
383
- */
384
- exportHbjson(content: Uint8Array, name: string): Uint8Array;
385
- /**
386
- * Parse the file and return every `IfcAlignment` directrix as a flat
387
- * `Float32Array` of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` in
388
- * the renderer's Y-up world space (RTC-subtracted, metres). Consecutive
389
- * samples form line segments. Feed straight to
390
- * `renderer.uploadAnnotationLines3D(...)`.
391
- *
392
- * Returns an empty array when the file has no alignments (or none with a
393
- * resolvable Axis curve), so the caller can clear the overlay cheaply.
394
- */
395
- parseAlignmentLines(content: string): Float32Array;
396
- /**
397
- * Extract raw profile polygons from all building elements with `IfcExtrudedAreaSolid`
398
- * representations.
399
- *
400
- * Returns a [`ProfileCollection`] whose entries each carry:
401
- * - A 2D polygon (outer + holes) in local profile space (metres)
402
- * - A 4 × 4 column-major transform in WebGL Y-up world space
403
- * - Extrusion direction (world space) and depth (metres)
404
- *
405
- * Use [`ProfileProjector`] (TypeScript) to convert these into `DrawingLine[]`
406
- * for clean projection without tessellation artifacts.
407
- *
408
- * ```javascript
409
- * const api = new IfcAPI();
410
- * const profiles = api.extractProfiles(ifcContent, 0);
411
- * console.log('Profiles:', profiles.length);
412
- * for (let i = 0; i < profiles.length; i++) {
413
- * const p = profiles.get(i);
414
- * console.log(p.ifcType, 'depth:', p.extrusionDepth);
415
- * }
416
- * ```
417
- */
418
- extractProfiles(content: string, model_index: number): ProfileCollection;
419
- /**
420
- * Structured pipeline diagnostics accumulated across every
421
- * `processGeometryBatch*` call since the last load reset
422
- * (`clearPrePassCache` / `setEntityIndex`), as a JS object with a
423
- * `schemaVersion` field — or `undefined` when no batch has run yet.
424
- * Includes per-batch summed geometry wall time, mesh/triangle counts,
425
- * the degenerate-backstop drop count, and the CSG failure aggregates.
426
- */
427
- getPipelineDiagnostics(): any;
428
- /**
429
- * Get WASM memory for zero-copy access
430
- */
431
- getMemory(): any;
432
- /**
433
- * Populate `cached_entity_index` from pre-extracted column arrays.
434
- *
435
- * Used by the streaming pre-pass to share its already-built entity
436
- * index across worker realms via SAB-backed Uint32Arrays every
437
- * process worker would otherwise re-scan the entire file in
438
- * `processGeometryBatch`'s lazy build path (~5 s on a 1 GB IFC),
439
- * even though the pre-pass worker built the same index minutes
440
- * earlier.
441
- *
442
- * Builds a compact [`ColumnarEntityIndex`] from the three input slices
443
- * (sorted `u32` columns + binary search) instead of a per-worker
444
- * `FxHashMap` — ~229 MB vs ~436 MB on a 19.1 M-entity model (#1682).
445
- * [`ColumnarEntityIndex::from_columns`] verifies the id ordering once
446
- * (O(n)) and only argsorts if the producer did not emit sorted columns.
447
- *
448
- * `lengths[i]` is the byte length of entity `ids[i]`, so lookup returns
449
- * `(start, start + length)` to match the existing `(start, end)` layout.
450
- *
451
- * Idempotent in the sense that repeated calls REPLACE the cache —
452
- * supports the parser-worker pattern of reusing one IfcAPI across
453
- * multiple loads with different files.
454
- */
455
- setEntityIndex(ids: Uint32Array, starts: Uint32Array, lengths: Uint32Array): void;
456
- /**
457
- * Toggle the "render multilayer walls as a single solid" mode (issue #540).
458
- *
459
- * When `enabled` is `true`, every subsequent `processGeometryBatch` call
460
- * will suppress geometry emission for `IfcBuildingElementPart` entities
461
- * whose `IfcRelAggregates` parent wall is sliceable (has an
462
- * `IfcMaterialLayerSetUsage`) AND has its own `Representation`. The
463
- * parent wall keeps its per-layer sub-mesh colouring, so the visual
464
- * result is the same as the layered render but with one mesh per wall
465
- * instead of one per layer part — much cheaper for both CPU and GPU.
466
- *
467
- * Default is `false`. Pass `true` before calling `processGeometryBatch`.
468
- */
469
- setMergeLayers(enabled: boolean): void;
470
- /**
471
- * Toggle the tier-independent small-cut skip (#1286). When `true`,
472
- * `processGeometryBatch` drops `IfcBooleanResult` differences whose cutter is
473
- * tiny relative to its host (steel copes/notches) while keeping the
474
- * tessellation tier so curves stay full-density. The viewer enables this for
475
- * the on-screen load; exports/drawings leave it off so their geometry keeps
476
- * every cut. Default off byte-identical to before.
477
- *
478
- * Set BEFORE processing meshes already emitted are not regenerated.
479
- */
480
- setSkipSmallCuts(on: boolean): void;
481
- /**
482
- * Clear the cached entity index (call between loads when reusing
483
- * the same `IfcAPI` instance — e.g. the parser worker keeps one
484
- * `IfcAPI` alive across multiple `parse` requests).
485
- *
486
- * Recovers a poisoned cache Mutex instead of panicking; see `mod_tests.rs`.
487
- */
488
- clearPrePassCache(): void;
489
- /**
490
- * Install the pre-computed set of `IfcRepresentationMap` ids referenced by
491
- * an `IfcMappedItem` (issue #957), so the worker's first type-product batch
492
- * SKIPS the per-worker [`Self::get_or_build_referenced_repmaps`] full-file
493
- * walk. The streaming pre-pass built the same set once from the
494
- * `IfcMappedItem` spans it already scanned (see
495
- * `styling::build_referenced_representation_maps_from_spans`) and ships the
496
- * id list here bit-identical to what each worker would compute, since a
497
- * set's membership is order-invariant and consumers only call `.contains`.
498
- *
499
- * Installed AFTER `setEntityIndex` (which clears this cache on content
500
- * swap), so the injected value survives. When this setter is never called
501
- * (native path, non-streaming callers), the lazy build path is unchanged.
502
- */
503
- setReferencedRepmaps(ids: Uint32Array): void;
504
- /**
505
- * Install the pre-computed #1623 Phase 3 don't-bake plan: the flat list of
506
- * `IfcRepresentationMap` ids that an `IfcMappedItem` instantiates >= 2 times.
507
- * The streaming pre-pass tallies it in the SAME scan that builds the referenced-
508
- * repmap set (`styling::build_mapped_instance_plan_from_spans`) and ships the id
509
- * list here. The batch path arms its router with it (batch-local template mode),
510
- * so a repeated single-solid mapped source materializes ONCE per batch and the
511
- * rest ride as instances in the IFNS shard.
512
- *
513
- * Same injection contract as [`Self::set_referenced_repmaps`]: installed after
514
- * `setEntityIndex` (which clears it on content swap), and a no-op absence leaves
515
- * the batch path materializing every occurrence (byte-identical). Each id is
516
- * stored as `(2, id)` the batch-local router only needs the eligibility set
517
- * (count >= 2); the min-id template slot is unused in batch-local mode.
518
- */
519
- setMappedInstancePlan(source_ids: Uint32Array): void;
520
- /**
521
- * Install the pre-computed [`ifc_lite_geometry::MaterialLayerIndex`] (#563)
522
- * from its flat SoA encoding, so the worker's first batch skips the
523
- * per-worker [`Self::get_or_build_material_layer_index`] full-file decode
524
- * scan (the dominant first-batch cost on layered architectural models,
525
- * which run this on the DEFAULT view). The streaming pre-pass built the
526
- * index once from the `IfcRelAssociatesMaterial` spans it already scanned
527
- * (`MaterialLayerIndex::from_spans`) and flat-encoded it here; the flat
528
- * encoding round-trips bit-for-bit (proven in `material_layer_index` tests),
529
- * so the injected index equals each worker's `from_content` result.
530
- *
531
- * Same injection contract as [`Self::set_referenced_repmaps`]: installed
532
- * after `setEntityIndex`, and a no-op absence leaves the lazy build intact.
533
- */
534
- setMaterialLayerIndex(element_ids: Uint32Array, axis: Uint32Array, layer_counts: Uint32Array, direction_sense: Float64Array, offset: Float64Array, layer_material_ids: Uint32Array, layer_thicknesses: Float64Array): void;
535
- /**
536
- * Enable or disable the PARAMETRIC rectangular-opening fast path (the
537
- * placement-frame, ground-truth-exact analytic cut) for `processGeometryBatch`.
538
- *
539
- * DEFAULT ON (corpus-validated; native defaults ON too, and wasm has no env to
540
- * read `IFC_LITE_RECT_PARAM`, so both targets default in LOCKSTEP -- the
541
- * byte-identical native==wasm contract requires both take the same path). This
542
- * toggle is the wasm-side escape hatch mirroring `IFC_LITE_RECT_PARAM=0`.
543
- * The path subtracts rectangular openings as exact parametric boxes in the host's
544
- * own placement frame (rotated walls included), deferring any non-clean case to
545
- * the exact kernel. Pass `false` before `processGeometryBatch` to opt out.
546
- */
547
- setRectParamFastPath(enabled: boolean): void;
548
- /**
549
- * Select the tessellation detail level applied by every subsequent
550
- * `processGeometryBatch` call (issue #976, step 4).
551
- *
552
- * `level` is one of `"lowest" | "low" | "medium" | "high" | "highest"`
553
- * (case-insensitive). `"medium"` is the default and reproduces the
554
- * engine's historical hardcoded densities byte-for-byte; lower levels
555
- * trade curved-surface smoothness for throughput, higher levels reduce
556
- * faceting on pipes / cylinders / NURBS at a triangle-count cost.
557
- * Pass `null`/`undefined` to reset to the default.
558
- *
559
- * Set BEFORE processing — meshes already emitted are not regenerated.
560
- * Throws on an unrecognized level so typos fail loudly instead of
561
- * silently rendering at the wrong density.
562
- */
563
- setTessellationQuality(level?: string | null): void;
564
- /**
565
- * Install the pre-computed set of type ids that an `IfcRelDefinesByType`
566
- * instantiates (#957 follow-up), so the worker's first type-product batch
567
- * skips the per-worker [`Self::get_or_build_instantiated_type_ids`]
568
- * full-file walk. Same injection contract as [`Self::set_referenced_repmaps`].
569
- */
570
- setInstantiatedTypeIds(ids: Uint32Array): void;
571
- /**
572
- * Enable or disable per-entity geometry fingerprinting in
573
- * `processGeometryBatch`, used by the viewer's revision-diff feature.
574
- *
575
- * Pass a positive `tolerance` (metres) to enable — it is the quantization
576
- * grid the hash snaps positions to (larger = more tolerant of float noise,
577
- * smaller = catches finer edits; the `f32` precision floor of model-local
578
- * coordinates means values below ~1 mm mostly hash noise). Pass `null`/
579
- * `undefined` (or a non-positive value) to disable. Default: disabled.
580
- */
581
- setComputeGeometryHashes(tolerance?: number | null): void;
582
- /**
583
- * Create and initialize the IFC API
584
- */
585
- constructor();
586
- /**
587
- * Fast entity scanning using SIMD-accelerated Rust scanner
588
- * Returns array of entity references for data model parsing
589
- * Much faster than TypeScript byte-by-byte scanning (5-10x speedup)
590
- */
591
- scanEntitiesFast(content: string): any;
592
- /**
593
- * Fast entity scanning from raw bytes (avoids TextDecoder.decode on JS side).
594
- * Accepts Uint8Array directly — saves ~2-5s for 487MB files by skipping
595
- * JS string creation and UTF-16→UTF-8 conversion.
596
- */
597
- scanEntitiesFastBytes(data: Uint8Array): any;
598
- /**
599
- * Fast geometry-only entity scanning
600
- * Scans only entities that have geometry, skipping 99% of non-geometry entities
601
- * Returns array of geometry entity references for parallel processing
602
- * Much faster than scanning all entities (3x speedup for large files)
603
- */
604
- scanGeometryEntitiesFast(content: string): any;
605
- /**
606
- * Run geometry extraction on `content` and return its typed CSG / opening
607
- * diagnostics (the `GeometryDiagnostics` contract) as a JS object, or
608
- * `undefined` when nothing diagnostic-worthy happened (no openings, no
609
- * failures). Takes the raw IFC bytes (`Uint8Array`) so there is no input-size
610
- * cap. The produced meshes are dropped; only the diagnostics are returned.
611
- */
612
- diagnoseGeometry(content: Uint8Array): any;
613
- /**
614
- * Simplify already-produced element meshes at per-element demesher
615
- * levels (1-4 = cavity removal + clustering at 0.5/0.25/0.10/0.03
616
- * triangle ratio, 5 = bounding box).
617
- *
618
- * One RECORD per input `MeshData` entry (an element may span several
619
- * records — per-material submeshes; pass all of them, grouped or not).
620
- * Per record `i`: `vertexCounts[i]` vertices from `positions` (and
621
- * `normals` when non-empty), `indexCounts[i]` indices from `indices`
622
- * (per-record local), `origins[i*3..]`, `localToWorld[i*16..]` valid
623
- * only when `localToWorldPresent[i] != 0`, level `levels[i]` (records
624
- * of one element must agree). Arrays are the boundary Y-up convention
625
- * when `yUp` is true (the browser/SDK case).
626
- *
627
- * `rtcX/Y/Z` = `coordinateInfo.originShift` (IFC Z-up metres);
628
- * `unitScale` = metres per project length unit.
629
- */
630
- simplifyMeshes(express_ids: Uint32Array, levels: Uint8Array, positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, origins: Float64Array, local_to_world: Float64Array, local_to_world_present: Uint8Array, rtc_x: number, rtc_y: number, rtc_z: number, unit_scale: number, y_up: boolean): SimplifiedMeshes;
631
- /**
632
- * Parse IFC file and extract symbolic representations (Plan,
633
- * Annotation, FootPrint, Axis). These are 2D curves used for
634
- * architectural drawings instead of sectioning 3D geometry.
635
- *
636
- * Example:
637
- * ```javascript
638
- * const api = new IfcAPI();
639
- * const symbols = api.parseSymbolicRepresentations(ifcData);
640
- * console.log('Found', symbols.totalCount, 'symbolic items');
641
- * for (let i = 0; i < symbols.polylineCount; i++) {
642
- * const polyline = symbols.getPolyline(i);
643
- * console.log('Polyline for', polyline.ifcType, ':', polyline.points);
644
- * }
645
- * ```
646
- */
647
- parseSymbolicRepresentations(content: string): SymbolicRepresentationCollection;
648
- /**
649
- * Get version string
650
- */
651
- readonly version: string;
652
- /**
653
- * Check if API is initialized
654
- */
655
- readonly is_ready: boolean;
180
+ free(): void;
181
+ [Symbol.dispose](): void;
182
+ /**
183
+ * Run the pre-pass ONCE and return serialized results for worker distribution.
184
+ * Takes raw bytes (&[u8]) to avoid TextDecoder overhead.
185
+ */
186
+ buildPrePassOnce(data: Uint8Array): any;
187
+ /**
188
+ * Streaming pre-pass: emits geometry jobs in chunks via a JS callback
189
+ * instead of waiting for the full file scan to complete.
190
+ *
191
+ * Single linear walk over the file:
192
+ * 1. Builds the entity index incrementally from the same scan that
193
+ * collects geometry jobs (a separate index scan would double
194
+ * wall-clock).
195
+ * 2. As soon as `IFCPROJECT` has been seen, the unit scale and the
196
+ * first ~50 geometry jobs have been collected, resolves
197
+ * `unitScale` + `rtcOffset` and emits a `meta` callback so the
198
+ * JS host can spin up geometry process workers.
199
+ * 3. Emits `jobs` callbacks every `chunk_size` jobs (or fewer if
200
+ * the meta phase already buffered some).
201
+ * 4. Emits `complete` with the total job count at end of scan.
202
+ *
203
+ * On a 986 MB / 14 M-entity file this drops time-to-first-geometry
204
+ * from ~17 s (full pre-pass + worker spawn + first batch) to ~3 s
205
+ * (first 100 K bytes scanned + meta + first chunk).
206
+ *
207
+ * The callback receives a single `JsValue` argument shaped as one of:
208
+ * `{ type: "meta", unitScale, rtcOffset: [x,y,z], needsShift, buildingRotation? }`
209
+ * `{ type: "jobs", jobs: Uint32Array }` // [id, start, end] triples
210
+ * `{ type: "complete", totalJobs }`
211
+ */
212
+ buildPrePassStreaming(data: Uint8Array, on_event: Function, chunk_size: number, disabled_type_names: string[] | null | undefined, skip_type_geometry: boolean): any;
213
+ /**
214
+ * Sharded pre-pass variant: same scan/discovery/jobs/columns pipeline as
215
+ * `buildPrePassStreaming`, but
216
+ * 1. the entity index is PREBUILT from the host's stitched shard columns
217
+ * (file order; see `scanEntityIndexShard`) — the scan skips its inline
218
+ * index build, the meta RTC ladder resolves against the FULL index
219
+ * (no partial-ladder full-rescan detour), and the post-scan
220
+ * `entity-index` event is skipped (the host already delivered it), and
221
+ * 2. styles resolution is EXTERNAL: the styled-item spans are resolved as
222
+ * shard slices on the geometry workers (`resolveStyledItemsShard`);
223
+ * this call stashes the SUPPORT spans + plane-angle scale, and the
224
+ * follow-up `finalizePrepassStyles` merges + flattens into the exact
225
+ * styles payload the serial path emits. NO `styles` event is emitted
226
+ * here.
227
+ */
228
+ buildPrePassStreamingSharded(data: Uint8Array, on_event: Function, chunk_size: number, disabled_type_names: string[] | null | undefined, skip_type_geometry: boolean, index_ids: Uint32Array, index_starts: Uint32Array, index_lengths: Uint32Array, index_classes: Uint8Array): any;
229
+ /**
230
+ * Clear the cached entity index (call between loads when reusing
231
+ * the same `IfcAPI` instance e.g. the parser worker keeps one
232
+ * `IfcAPI` alive across multiple `parse` requests).
233
+ *
234
+ * Recovers a poisoned cache Mutex instead of panicking; see `mod_tests.rs`.
235
+ */
236
+ clearPrePassCache(): void;
237
+ /**
238
+ * Run geometry extraction on `content` and return its typed CSG / opening
239
+ * diagnostics (the `GeometryDiagnostics` contract) as a JS object, or
240
+ * `undefined` when nothing diagnostic-worthy happened (no openings, no
241
+ * failures). Takes the raw IFC bytes (`Uint8Array`) so there is no input-size
242
+ * cap. The produced meshes are dropped; only the diagnostics are returned.
243
+ */
244
+ diagnoseGeometry(content: Uint8Array): any;
245
+ /**
246
+ * Export tabular **CSV**. `mode` ∈ {`"entities"`, `"properties"`, `"quantities"`,
247
+ * `"spatial"`}. `delimiter` defaults to `,` when empty; `include_properties` adds
248
+ * flattened `Pset_Prop` columns to the entities view.
249
+ */
250
+ exportCsv(content: Uint8Array, mode: string, delimiter: string, include_properties: boolean): Uint8Array;
251
+ /**
252
+ * Export the render geometry in `content` as a binary **GLB** (`Uint8Array`).
253
+ *
254
+ * `hidden` / `isolated` are express-id visibility filters; `hidden_types_csv` is a
255
+ * comma-separated list of IFC type names whose class toggle is off (e.g.
256
+ * `"IfcOpeningElement,IfcSpace"`). `include_metadata` attaches counts + per-node
257
+ * `expressId`. Per-mesh RTC origin rides the node translation (precision-safe).
258
+ * `lit` emits standard PBR materials that shade from normals; omitted or
259
+ * `true` lit (the default), `false` flat `KHR_materials_unlit` (the
260
+ * historical look #1321). Optional at the boundary so older 5-arg callers
261
+ * keep lit-by-default behaviour.
262
+ * `emissive` self-illuminates each material at its base colour (core glTF
263
+ * `emissiveFactor`) so renderers without ambient/IBL Google Earth don't
264
+ * render the model near-black (#1427); omitted or `false` ⇒ off.
265
+ *
266
+ * Fails CLOSED: when the visible mesh set is empty this throws an `Error`
267
+ * whose message starts with `NO_RENDER_GEOMETRY`, instead of returning a
268
+ * structurally valid but empty GLB. #1438 put that guard only in the TS
269
+ * CLI/MCP wrappers; making the boundary itself refuse means SDK/viewer/
270
+ * direct callers inherit it too (the TS guards stay as defense-in-depth).
271
+ */
272
+ exportGlb(content: Uint8Array, include_metadata: boolean, hidden: Uint32Array, isolated: Uint32Array, hidden_types_csv: string, lit?: boolean | null, emissive?: boolean | null): Uint8Array;
273
+ /**
274
+ * Assemble a **GLB** from already-produced meshes (the viewer's `MeshData`, flattened)
275
+ * no re-meshing. Per mesh `i`: `vertex_counts[i]` verts + `index_counts[i]` indices
276
+ * taken in order from the concatenated `positions`/`normals`/`indices`; `colors` is
277
+ * RGBA per mesh, `origins` xyz per mesh, `express_ids` labels each mesh (indices are
278
+ * per-mesh local). The caller passes exactly the meshes it wants emitted.
279
+ */
280
+ exportGlbFromMeshes(positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, colors: Float32Array, origins: Float64Array, express_ids: Uint32Array, include_metadata: boolean, lit?: boolean | null, emissive?: boolean | null): Uint8Array;
281
+ /**
282
+ * Export the `IfcSpace` volumes in `content` as Honeybee **HBJSON** UTF-8 bytes.
283
+ *
284
+ * Returned as UTF-8 bytes (`Uint8Array`) so output is not capped by the
285
+ * V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
286
+ * is genuinely needed.
287
+ *
288
+ * Rooms are built analytically from extruded-area profiles (watertight by construction);
289
+ * faces are typed Floor / RoofCeiling / Wall with outward normals. The result loads via
290
+ * `honeybee.model.Model.from_hbjson` and is ready for Ladybug Tools / Pollination.
291
+ *
292
+ * ```javascript
293
+ * const api = new IfcAPI();
294
+ * const hbjson = api.exportHbjson(ifcContent, "my_model");
295
+ * ```
296
+ */
297
+ exportHbjson(content: Uint8Array, name: string): Uint8Array;
298
+ /**
299
+ * Export **IFC5 / IFCX** (the USD-style node graph). `only_known_properties` keeps
300
+ * only properties with an official IFC5 schema.
301
+ */
302
+ exportIfcx(content: Uint8Array, only_known_properties: boolean, pretty: boolean): Uint8Array;
303
+ /**
304
+ * Export structured **JSON** (array of entity objects with typed property values).
305
+ */
306
+ exportJson(content: Uint8Array, pretty: boolean, include_properties: boolean, include_quantities: boolean): Uint8Array;
307
+ /**
308
+ * Export **JSON-LD** (`@graph` of `ifc:` nodes). Empty `context` ⇒ buildingSMART
309
+ * IFC4 OWL default. `included` is an express-id isolation filter mirroring the
310
+ * OBJ/glTF/STEP exporters (empty ⇒ all entities).
311
+ */
312
+ exportJsonld(content: Uint8Array, context: string, include_properties: boolean, include_quantities: boolean, pretty: boolean, included: Uint32Array): Uint8Array;
313
+ /**
314
+ * Package an already-produced **GLB** + georeference into a **KMZ** (`Uint8Array`)
315
+ * for Google Earth: a ZIP of `doc.kml` (a `<Model>` placed at `latitude`/`longitude`/
316
+ * `altitude`) + `model.glb`. `x_axis_abscissa`/`x_axis_ordinate` are the
317
+ * `IfcMapConversion` grid-north components; pass both as `undefined` for heading 0.
318
+ *
319
+ * `altitude_mode` selects the KML vertical placement: `"clampToGround"`
320
+ * (the default when omitted) rests the model on the terrain, ignoring
321
+ * `altitude`; `"absolute"` places the origin at `altitude` metres MSL.
322
+ * Google Earth's terrain already encodes the site elevation, so clamping
323
+ * keeps a wrong/zero/double-counted OrthogonalHeight from floating the
324
+ * model into the sky (#1427); absolute is offered for models whose
325
+ * OrthogonalHeight is a true MSL elevation the user wants honoured.
326
+ */
327
+ exportKmz(glb: Uint8Array, latitude: number, longitude: number, altitude: number, x_axis_abscissa: number | null | undefined, x_axis_ordinate: number | null | undefined, name: string, altitude_mode?: string | null): Uint8Array;
328
+ /**
329
+ * Build a Google-Earth-ready **KMZ** (`Uint8Array`) straight from the viewer's
330
+ * already-produced meshes — the working path (#1427). The model is embedded as
331
+ * **COLLADA** (`model.dae`), the only `<Model>` format Google Earth loads (a GLB
332
+ * raises "Unsupported element: Model"), with emission-lit double-sided materials
333
+ * placement. Mesh arrays match `exportGlbFromMeshes`;
334
+ * `latitude`/`longitude`/`altitude` + `x_axis_abscissa`/`x_axis_ordinate`
335
+ * (grid-north, `undefined` heading 0) place + orient the model.
336
+ * `altitude_mode` (`"clampToGround"` default ⇒ rest on terrain, ignoring
337
+ * `altitude`; `"absolute"` place at `altitude` metres MSL) selects the
338
+ * KML vertical placement (#1427).
339
+ */
340
+ exportKmzFromMeshes(positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, colors: Float32Array, origins: Float64Array, latitude: number, longitude: number, altitude: number, x_axis_abscissa: number | null | undefined, x_axis_ordinate: number | null | undefined, name: string, altitude_mode?: string | null): Uint8Array;
341
+ /**
342
+ * Merge several IFC models into one STEP/IFC UTF-8 byte buffer (`Uint8Array`).
343
+ * `concatenated` is every model's
344
+ * bytes laid end-to-end; `lengths[i]` is the byte length of model `i`. The first model
345
+ * keeps its ids; later models are id-offset and their project unified to the first.
346
+ */
347
+ exportMerged(concatenated: Uint8Array, lengths: Uint32Array, schema: string): Uint8Array;
348
+ /**
349
+ * Export the render geometry in `content` as Wavefront **OBJ** UTF-8 bytes.
350
+ *
351
+ * Returned as UTF-8 bytes (`Uint8Array`) so output is not capped by the
352
+ * V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
353
+ * is genuinely needed.
354
+ *
355
+ * `hidden` / `isolated` are express-id filters mirroring the viewer's visibility
356
+ * state (empty `isolated` all visible). Instanced type-library shapes are skipped.
357
+ *
358
+ * ```javascript
359
+ * const obj = api.exportObj(ifcContent, true, new Uint32Array(), new Uint32Array());
360
+ * ```
361
+ */
362
+ exportObj(content: Uint8Array, include_normals: boolean, hidden: Uint32Array, isolated: Uint32Array): Uint8Array;
363
+ /**
364
+ * Re-serialize the model in `content` to STEP/IFC UTF-8 bytes.
365
+ *
366
+ * Returned as UTF-8 bytes (`Uint8Array`) so output is not capped by the
367
+ * V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
368
+ * is genuinely needed.
369
+ *
370
+ * `schema` is the FILE_SCHEMA label to write (empty preserve the source schema).
371
+ * `included` is an express-id allowlist (empty whole model); when set, the forward
372
+ * `#`-reference closure is added so the subset never dangles a reference.
373
+ * `mutations_json` carries `MutablePropertyView` edits (attribute updates +
374
+ * property-set synthesis); empty ⇒ none. See `export_step_json` for the shape.
375
+ */
376
+ exportStep(content: Uint8Array, schema: string, included: Uint32Array, mutations_json: string): Uint8Array;
377
+ /**
378
+ * Extract raw profile polygons from all building elements with `IfcExtrudedAreaSolid`
379
+ * representations.
380
+ *
381
+ * Returns a [`ProfileCollection`] whose entries each carry:
382
+ * - A 2D polygon (outer + holes) in local profile space (metres)
383
+ * - A 4 × 4 column-major transform in WebGL Y-up world space
384
+ * - Extrusion direction (world space) and depth (metres)
385
+ *
386
+ * Use [`ProfileProjector`] (TypeScript) to convert these into `DrawingLine[]`
387
+ * for clean projection without tessellation artifacts.
388
+ *
389
+ * ```javascript
390
+ * const api = new IfcAPI();
391
+ * const profiles = api.extractProfiles(ifcContent, 0);
392
+ * console.log('Profiles:', profiles.length);
393
+ * for (let i = 0; i < profiles.length; i++) {
394
+ * const p = profiles.get(i);
395
+ * console.log(p.ifcType, 'depth:', p.extrusionDepth);
396
+ * }
397
+ * ```
398
+ */
399
+ extractProfiles(content: string, model_index: number): ProfileCollection;
400
+ /**
401
+ * Sharded pre-pass: merge the shard-resolved styled-item columns with the
402
+ * SUPPORT spans (extracted host-side from the shard classes) and run the
403
+ * CANONICAL styles flatten. Returns the exact `styles` event payload the
404
+ * serial path emits. Runs on any worker with `setEntityIndex` installed.
405
+ * Span arguments are `[id, start, len]` triples; `plane_angle_to_radians`
406
+ * comes from the meta event.
407
+ */
408
+ finalizePrepassStyles(data: Uint8Array, orphan_ids: Uint32Array, orphan_colors: Float32Array, geom_ids: Uint32Array, geom_colors: Float32Array, colour_map_spans: Uint32Array, material_def_spans: Uint32Array, rel_material_spans: Uint32Array, void_spans: Uint32Array, fills_spans: Uint32Array, aggregate_spans: Uint32Array, plane_angle_to_radians: number): any;
409
+ /**
410
+ * Get WASM memory for zero-copy access
411
+ */
412
+ getMemory(): any;
413
+ /**
414
+ * Structured pipeline diagnostics accumulated across every
415
+ * `processGeometryBatch*` call since the last load reset
416
+ * (`clearPrePassCache` / `setEntityIndex`), as a JS object with a
417
+ * `schemaVersion` field or `undefined` when no batch has run yet.
418
+ * Includes per-batch summed geometry wall time, mesh/triangle counts,
419
+ * the degenerate-backstop drop count, and the CSG failure aggregates.
420
+ */
421
+ getPipelineDiagnostics(): any;
422
+ /**
423
+ * Create and initialize the IFC API
424
+ */
425
+ constructor();
426
+ /**
427
+ * Parse the file and return every `IfcAlignment` directrix as a flat
428
+ * `Float32Array` of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` in
429
+ * the renderer's Y-up world space (RTC-subtracted, metres). Consecutive
430
+ * samples form line segments. Feed straight to
431
+ * `renderer.uploadAnnotationLines3D(...)`.
432
+ *
433
+ * Returns an empty array when the file has no alignments (or none with a
434
+ * resolvable Axis curve), so the caller can clear the overlay cheaply.
435
+ */
436
+ parseAlignmentLines(content: string): Float32Array;
437
+ /**
438
+ * Parse the file and return structured per-axis data (tag + endpoints) in
439
+ * the renderer's Y-up world space (RTC-subtracted, metres). Use this when
440
+ * you also need the axis tags (to render grid bubbles / labels).
441
+ */
442
+ parseGridAxes(content: string): GridAxisCollection;
443
+ /**
444
+ * Parse the file and return every `IfcGridAxis` as a flat `Float32Array`
445
+ * of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` (one segment per
446
+ * axis) in the renderer's Y-up world space (RTC-subtracted, metres). Feed
447
+ * straight to a line pipeline (e.g. `uploadAnnotationLines3D`).
448
+ *
449
+ * Returns an empty array when the file has no grids, so the caller can
450
+ * clear the overlay cheaply.
451
+ */
452
+ parseGridLines(content: string): Float32Array;
453
+ /**
454
+ * Parse IFC file and extract symbolic representations (Plan,
455
+ * Annotation, FootPrint, Axis). These are 2D curves used for
456
+ * architectural drawings instead of sectioning 3D geometry.
457
+ *
458
+ * Example:
459
+ * ```javascript
460
+ * const api = new IfcAPI();
461
+ * const symbols = api.parseSymbolicRepresentations(ifcData);
462
+ * console.log('Found', symbols.totalCount, 'symbolic items');
463
+ * for (let i = 0; i < symbols.polylineCount; i++) {
464
+ * const polyline = symbols.getPolyline(i);
465
+ * console.log('Polyline for', polyline.ifcType, ':', polyline.points);
466
+ * }
467
+ * ```
468
+ */
469
+ parseSymbolicRepresentations(content: string): SymbolicRepresentationCollection;
470
+ /**
471
+ * Process geometry for a subset of pre-scanned entities → flat
472
+ * MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
473
+ * Thin wrapper over [`IfcAPI::produce_batch`]; converts each produced mesh
474
+ * to MeshDataJs (the IFC Z-up→WebGL Y-up swap + winding reversal happen
475
+ * there). Output is byte-for-byte what the pre-refactor method produced.
476
+ */
477
+ processGeometryBatch(data: Uint8Array, jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): MeshCollection;
478
+ /**
479
+ * Like [`IfcAPI::process_geometry_batch`] but reads the source bytes held by
480
+ * [`IfcAPI::set_source_bytes`] instead of taking `data`. Byte-for-byte
481
+ * identical output it delegates to the legacy twin with the held slice.
482
+ */
483
+ processGeometryBatchFromSource(jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): MeshCollection;
484
+ /**
485
+ * Like [`IfcAPI::process_geometry_batch`] but collates the batch's meshes
486
+ * into a GPU-instancing shard (IFNS wire format) instead of a flat
487
+ * MeshCollection. Repeated geometry collapses to one template + per-
488
+ * occurrence transforms; non-instanceable meshes ride as flat singleton
489
+ * templates so nothing is dropped. The shard stays in the producer-native
490
+ * (IFC Z-up) frame the renderer composes the constant Z-up→Y-up swap at
491
+ * upload. Each batch shard renders independently: affinity routing already
492
+ * co-locates identical geometry on one worker, so per-batch collation
493
+ * captures ~all the dedup and no cross-batch merge is needed. Returns empty
494
+ * bytes only when the batch produced zero non-empty meshes.
495
+ */
496
+ processGeometryBatchInstanced(data: Uint8Array, jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): Uint8Array;
497
+ /**
498
+ * Produce a batch ONCE and PARTITION it (the instanced-ONLY path): opaque
499
+ * ordinary occurrences (colour alpha >= 0.99 AND geometry_class == 0) are
500
+ * collated into the instanced shard; everything else (transparent glass,
501
+ * type-product geometry) goes to the flat MeshCollection. Each mesh takes
502
+ * exactly ONE route, so produce_batch runs once (no emit-both 2× meshing)
503
+ * and the renderer draws opaque occurrences via instancing instead of flat.
504
+ * Partition mirrors the renderer gates: INSTANCED_ALPHA_CUTOFF (0.99 =
505
+ * OPAQUE_ALPHA_CUTOFF) for transparency, geometry_class for the Model/Types
506
+ * split.
507
+ *
508
+ * NOTE: the renderer must be instanced-feature-complete (picking / selection
509
+ * / lens overlays on instanced geometry) before the worker calls this in
510
+ * place of processGeometryBatch — otherwise those features break for the
511
+ * opaque bulk. See the instanced-only follow-ups.
512
+ */
513
+ processGeometryBatchPartitioned(data: Uint8Array, jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): PartitionedBatch;
514
+ /**
515
+ * Like [`IfcAPI::process_geometry_batch_partitioned`] but reads the source
516
+ * bytes held by [`IfcAPI::set_source_bytes`] instead of taking `data`.
517
+ * Byte-for-byte identical output it delegates to the legacy twin.
518
+ */
519
+ processGeometryBatchPartitionedFromSource(jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): PartitionedBatch;
520
+ /**
521
+ * Sharded pre-pass: resolve ONE contiguous (file-ordered) slice of the
522
+ * styled-item span list on this worker, against the entity index installed
523
+ * by `setEntityIndex`. Returns raw resolved maps as flat columns:
524
+ * `{ orphanIds, orphanColors (f32 rgba per id), geomIds, geomColors }`.
525
+ * The host merges shard results IN SHARD ORDER with first-wins per
526
+ * geometry id, reproducing the serial resolver's file-order precedence,
527
+ * then hands the merged columns to `finalizePrepassStyles`.
528
+ * `spans` is `[id, start, len]` triples.
529
+ */
530
+ resolveStyledItemsShard(data: Uint8Array, spans: Uint32Array): any;
531
+ /**
532
+ * Fast entity scanning using SIMD-accelerated Rust scanner
533
+ * Returns array of entity references for data model parsing
534
+ * Much faster than TypeScript byte-by-byte scanning (5-10x speedup)
535
+ */
536
+ scanEntitiesFast(content: string): any;
537
+ /**
538
+ * Fast entity scanning from raw bytes (avoids TextDecoder.decode on JS side).
539
+ * Accepts Uint8Array directly saves ~2-5s for 487MB files by skipping
540
+ * JS string creation and UTF-16→UTF-8 conversion.
541
+ */
542
+ scanEntitiesFastBytes(data: Uint8Array): any;
543
+ /**
544
+ * SPIKE (sharded pre-pass): scan the entity index over a single byte range.
545
+ *
546
+ * Each idle browser geometry worker calls this on its `[range_start,
547
+ * range_end)` shard; the main thread stitches the returned columns into the
548
+ * full entity index (byte-identical to the single-threaded
549
+ * `build_entity_index`) by binary-searching each shard for the previous
550
+ * shard's `handoff`. Delegates to `ifc_lite_processing::scan_shard`, the
551
+ * exact per-chunk primitive the native `build_entity_index_parallel` fans
552
+ * across cores so the sharded merge cannot drift from the serial builder.
553
+ *
554
+ * Byte offsets returned are GLOBAL (relative to file start), so shards
555
+ * concatenate without rewriting. Returns a plain object:
556
+ * `{ ids: Uint32Array, starts: Uint32Array, lengths: Uint32Array,
557
+ * handoff: number }`
558
+ * where `handoff` is the global start of the first entity at/after
559
+ * `range_end` (the next shard's first real entity), or `-1` at EOF.
560
+ */
561
+ scanEntityIndexShard(data: Uint8Array, range_start: number, range_end: number): any;
562
+ /**
563
+ * Fast geometry-only entity scanning
564
+ * Scans only entities that have geometry, skipping 99% of non-geometry entities
565
+ * Returns array of geometry entity references for parallel processing
566
+ * Much faster than scanning all entities (3x speedup for large files)
567
+ */
568
+ scanGeometryEntitiesFast(content: string): any;
569
+ /**
570
+ * Enable or disable per-entity geometry fingerprinting in
571
+ * `processGeometryBatch`, used by the viewer's revision-diff feature.
572
+ *
573
+ * Pass a positive `tolerance` (metres) to enable — it is the quantization
574
+ * grid the hash snaps positions to (larger = more tolerant of float noise,
575
+ * smaller = catches finer edits; the `f32` precision floor of model-local
576
+ * coordinates means values below ~1 mm mostly hash noise). Pass `null`/
577
+ * `undefined` (or a non-positive value) to disable. Default: disabled.
578
+ */
579
+ setComputeGeometryHashes(tolerance?: number | null): void;
580
+ /**
581
+ * Populate `cached_entity_index` from pre-extracted column arrays.
582
+ *
583
+ * Used by the streaming pre-pass to share its already-built entity
584
+ * index across worker realms via SAB-backed Uint32Arrays — every
585
+ * process worker would otherwise re-scan the entire file in
586
+ * `processGeometryBatch`'s lazy build path (~5 s on a 1 GB IFC),
587
+ * even though the pre-pass worker built the same index minutes
588
+ * earlier.
589
+ *
590
+ * Builds a compact [`ColumnarEntityIndex`] from the three input slices
591
+ * (sorted `u32` columns + binary search) instead of a per-worker
592
+ * `FxHashMap` ~229 MB vs ~436 MB on a 19.1 M-entity model (#1682).
593
+ * [`ColumnarEntityIndex::from_columns`] verifies the id ordering once
594
+ * (O(n)) and only argsorts if the producer did not emit sorted columns.
595
+ *
596
+ * `lengths[i]` is the byte length of entity `ids[i]`, so lookup returns
597
+ * `(start, start + length)` to match the existing `(start, end)` layout.
598
+ *
599
+ * Idempotent in the sense that repeated calls REPLACE the cache —
600
+ * supports the parser-worker pattern of reusing one IfcAPI across
601
+ * multiple loads with different files.
602
+ */
603
+ setEntityIndex(ids: Uint32Array, starts: Uint32Array, lengths: Uint32Array): void;
604
+ /**
605
+ * Install the pre-computed set of type ids that an `IfcRelDefinesByType`
606
+ * instantiates (#957 follow-up), so the worker's first type-product batch
607
+ * skips the per-worker [`Self::get_or_build_instantiated_type_ids`]
608
+ * full-file walk. Same injection contract as [`Self::set_referenced_repmaps`].
609
+ */
610
+ setInstantiatedTypeIds(ids: Uint32Array): void;
611
+ /**
612
+ * Install the pre-computed #1623 Phase 3 don't-bake plan: the flat list of
613
+ * `IfcRepresentationMap` ids that an `IfcMappedItem` instantiates >= 2 times.
614
+ * The streaming pre-pass tallies it in the SAME scan that builds the referenced-
615
+ * repmap set (`styling::build_mapped_instance_plan_from_spans`) and ships the id
616
+ * list here. The batch path arms its router with it (batch-local template mode),
617
+ * so a repeated single-solid mapped source materializes ONCE per batch and the
618
+ * rest ride as instances in the IFNS shard.
619
+ *
620
+ * Same injection contract as [`Self::set_referenced_repmaps`]: installed after
621
+ * `setEntityIndex` (which clears it on content swap), and a no-op absence leaves
622
+ * the batch path materializing every occurrence (byte-identical). Each id is
623
+ * stored as `(2, id)` — the batch-local router only needs the eligibility set
624
+ * (count >= 2); the min-id template slot is unused in batch-local mode.
625
+ */
626
+ setMappedInstancePlan(source_ids: Uint32Array): void;
627
+ /**
628
+ * Install the pre-computed [`ifc_lite_geometry::MaterialLayerIndex`] (#563)
629
+ * from its flat SoA encoding, so the worker's first batch skips the
630
+ * per-worker [`Self::get_or_build_material_layer_index`] full-file decode
631
+ * scan (the dominant first-batch cost on layered architectural models,
632
+ * which run this on the DEFAULT view). The streaming pre-pass built the
633
+ * index once from the `IfcRelAssociatesMaterial` spans it already scanned
634
+ * (`MaterialLayerIndex::from_spans`) and flat-encoded it here; the flat
635
+ * encoding round-trips bit-for-bit (proven in `material_layer_index` tests),
636
+ * so the injected index equals each worker's `from_content` result.
637
+ *
638
+ * Same injection contract as [`Self::set_referenced_repmaps`]: installed
639
+ * after `setEntityIndex`, and a no-op absence leaves the lazy build intact.
640
+ */
641
+ setMaterialLayerIndex(element_ids: Uint32Array, axis: Uint32Array, layer_counts: Uint32Array, direction_sense: Float64Array, offset: Float64Array, layer_material_ids: Uint32Array, layer_thicknesses: Float64Array): void;
642
+ /**
643
+ * Toggle the "render multilayer walls as a single solid" mode (issue #540).
644
+ *
645
+ * When `enabled` is `true`, every subsequent `processGeometryBatch` call
646
+ * will suppress geometry emission for `IfcBuildingElementPart` entities
647
+ * whose `IfcRelAggregates` parent wall is sliceable (has an
648
+ * `IfcMaterialLayerSetUsage`) AND has its own `Representation`. The
649
+ * parent wall keeps its per-layer sub-mesh colouring, so the visual
650
+ * result is the same as the layered render but with one mesh per wall
651
+ * instead of one per layer part — much cheaper for both CPU and GPU.
652
+ *
653
+ * Default is `false`. Pass `true` before calling `processGeometryBatch`.
654
+ */
655
+ setMergeLayers(enabled: boolean): void;
656
+ /**
657
+ * Enable or disable the PARAMETRIC rectangular-opening fast path (the
658
+ * placement-frame, ground-truth-exact analytic cut) for `processGeometryBatch`.
659
+ *
660
+ * DEFAULT ON (corpus-validated; native defaults ON too, and wasm has no env to
661
+ * read `IFC_LITE_RECT_PARAM`, so both targets default in LOCKSTEP -- the
662
+ * byte-identical native==wasm contract requires both take the same path). This
663
+ * toggle is the wasm-side escape hatch mirroring `IFC_LITE_RECT_PARAM=0`.
664
+ * The path subtracts rectangular openings as exact parametric boxes in the host's
665
+ * own placement frame (rotated walls included), deferring any non-clean case to
666
+ * the exact kernel. Pass `false` before `processGeometryBatch` to opt out.
667
+ */
668
+ setRectParamFastPath(enabled: boolean): void;
669
+ /**
670
+ * Install the pre-computed set of `IfcRepresentationMap` ids referenced by
671
+ * an `IfcMappedItem` (issue #957), so the worker's first type-product batch
672
+ * SKIPS the per-worker [`Self::get_or_build_referenced_repmaps`] full-file
673
+ * walk. The streaming pre-pass built the same set once from the
674
+ * `IfcMappedItem` spans it already scanned (see
675
+ * `styling::build_referenced_representation_maps_from_spans`) and ships the
676
+ * id list here — bit-identical to what each worker would compute, since a
677
+ * set's membership is order-invariant and consumers only call `.contains`.
678
+ *
679
+ * Installed AFTER `setEntityIndex` (which clears this cache on content
680
+ * swap), so the injected value survives. When this setter is never called
681
+ * (native path, non-streaming callers), the lazy build path is unchanged.
682
+ */
683
+ setReferencedRepmaps(ids: Uint32Array): void;
684
+ /**
685
+ * Toggle the tier-independent small-cut skip (#1286). When `true`,
686
+ * `processGeometryBatch` drops `IfcBooleanResult` differences whose cutter is
687
+ * tiny relative to its host (steel copes/notches) while keeping the
688
+ * tessellation tier — so curves stay full-density. The viewer enables this for
689
+ * the on-screen load; exports/drawings leave it off so their geometry keeps
690
+ * every cut. Default off byte-identical to before.
691
+ *
692
+ * Set BEFORE processing meshes already emitted are not regenerated.
693
+ */
694
+ setSkipSmallCuts(on: boolean): void;
695
+ /**
696
+ * Store the whole IFC source file ONCE per load so the `*FromSource` batch
697
+ * variants can read it from the wasm heap instead of re-copying it per call.
698
+ *
699
+ * Mirrors the `setEntityIndex` lifecycle: called once per worker per load,
700
+ * and REPLACES the previous file wholesale (repeated calls swap the bytes),
701
+ * so a parser/geometry worker reusing one `IfcAPI` across loads is safe.
702
+ * The bytes must be the exact source the batch jobs' byte spans index into
703
+ * (the same buffer passed as `data` to the legacy `processGeometryBatch*`),
704
+ * or the decoded entities won't match — the JS worker installs its own
705
+ * session buffer, so this holds by construction.
706
+ *
707
+ * Taking `Vec<u8>` (by value) means wasm-bindgen hands us ownership of the
708
+ * single JS→wasm copy directly; we wrap it in `Arc` with no second copy.
709
+ */
710
+ setSourceBytes(data: Uint8Array): void;
711
+ /**
712
+ * Select the tessellation detail level applied by every subsequent
713
+ * `processGeometryBatch` call (issue #976, step 4).
714
+ *
715
+ * `level` is one of `"lowest" | "low" | "medium" | "high" | "highest"`
716
+ * (case-insensitive). `"medium"` is the default and reproduces the
717
+ * engine's historical hardcoded densities byte-for-byte; lower levels
718
+ * trade curved-surface smoothness for throughput, higher levels reduce
719
+ * faceting on pipes / cylinders / NURBS at a triangle-count cost.
720
+ * Pass `null`/`undefined` to reset to the default.
721
+ *
722
+ * Set BEFORE processing meshes already emitted are not regenerated.
723
+ * Throws on an unrecognized level so typos fail loudly instead of
724
+ * silently rendering at the wrong density.
725
+ */
726
+ setTessellationQuality(level?: string | null): void;
727
+ /**
728
+ * Simplify already-produced element meshes at per-element demesher
729
+ * levels (1-4 = cavity removal + clustering at 0.5/0.25/0.10/0.03
730
+ * triangle ratio, 5 = bounding box).
731
+ *
732
+ * One RECORD per input `MeshData` entry (an element may span several
733
+ * records — per-material submeshes; pass all of them, grouped or not).
734
+ * Per record `i`: `vertexCounts[i]` vertices from `positions` (and
735
+ * `normals` when non-empty), `indexCounts[i]` indices from `indices`
736
+ * (per-record local), `origins[i*3..]`, `localToWorld[i*16..]` valid
737
+ * only when `localToWorldPresent[i] != 0`, level `levels[i]` (records
738
+ * of one element must agree). Arrays are the boundary Y-up convention
739
+ * when `yUp` is true (the browser/SDK case).
740
+ *
741
+ * `rtcX/Y/Z` = `coordinateInfo.originShift` (IFC Z-up metres);
742
+ * `unitScale` = metres per project length unit.
743
+ */
744
+ simplifyMeshes(express_ids: Uint32Array, levels: Uint8Array, positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, origins: Float64Array, local_to_world: Float64Array, local_to_world_present: Uint8Array, rtc_x: number, rtc_y: number, rtc_z: number, unit_scale: number, y_up: boolean): SimplifiedMeshes;
745
+ /**
746
+ * Check if API is initialized
747
+ */
748
+ readonly is_ready: boolean;
749
+ /**
750
+ * Get version string
751
+ */
752
+ readonly version: string;
656
753
  }
657
754
 
755
+ /**
756
+ * Collection of mesh data for returning multiple meshes
757
+ */
658
758
  export class MeshCollection {
659
- private constructor();
660
- free(): void;
661
- [Symbol.dispose](): void;
662
- /**
663
- * Check if RTC offset is significant (>10km)
664
- */
665
- hasRtcOffset(): boolean;
666
- /**
667
- * Get mesh at index (clones — non-destructive). Prefer `takeMesh` on the
668
- * hot streaming path; this stays for callers that read meshes more than once.
669
- */
670
- get(index: number): MeshDataJs | undefined;
671
- /**
672
- * #1097 perf: MOVE the mesh at `index` out of the collection (the Vec
673
- * buffers are `std::mem::take`-n, leaving an empty stub). The streaming
674
- * worker reads each mesh exactly once, so moving avoids the full vertex-
675
- * data clone `get` pays — one fewer copy of positions/normals/indices/uvs/
676
- * texture per mesh (the JS getters still do the single Rust→JS copy). Calling
677
- * it twice for the same index yields the second call an empty mesh.
678
- */
679
- takeMesh(index: number): MeshDataJs | undefined;
680
- /**
681
- * The batch's typed CSG / opening diagnostics as a JS object (the
682
- * `GeometryDiagnostics` contract), or `undefined` if none were recorded. The
683
- * worker merges these across batches. One serialized value keeps the rich
684
- * nested shape as a single FFI crossing instead of dozens of getters.
685
- */
686
- readonly diagnostics: any;
687
- /**
688
- * Get RTC offset X (for converting local coords back to world coords)
689
- * Add this to local X coordinates to get world X coordinates
690
- */
691
- readonly rtcOffsetX: number;
692
- /**
693
- * Get RTC offset Y
694
- */
695
- readonly rtcOffsetY: number;
696
- /**
697
- * Get RTC offset Z
698
- */
699
- readonly rtcOffsetZ: number;
700
- /**
701
- * Get total vertex count across all meshes
702
- */
703
- readonly totalVertices: number;
704
- /**
705
- * Get total triangle count across all meshes
706
- */
707
- readonly totalTriangles: number;
708
- /**
709
- * Get building rotation angle in radians (from IfcSite placement)
710
- * Returns None if no rotation was detected
711
- */
712
- readonly buildingRotation: number | undefined;
713
- /**
714
- * Express ids for the per-entity geometry fingerprints, parallel to
715
- * [`Self::geometry_hash_values`]. Empty unless geometry hashing was
716
- * enabled via `IfcAPI.setComputeGeometryHashes`.
717
- */
718
- readonly geometryHashIds: Uint32Array;
719
- /**
720
- * Number of per-entity geometry fingerprints recorded.
721
- */
722
- readonly geometryHashCount: number;
723
- /**
724
- * Per-entity geometry fingerprints as a `BigUint64Array`, parallel to
725
- * [`Self::geometry_hash_ids`]. `u64` is exposed (not hex strings) so JS
726
- * can compare with `===` and key maps without allocation. Empty unless
727
- * geometry hashing was enabled.
728
- */
729
- readonly geometryHashValues: BigUint64Array;
730
- /**
731
- * Get number of meshes
732
- */
733
- readonly length: number;
759
+ private constructor();
760
+ free(): void;
761
+ [Symbol.dispose](): void;
762
+ /**
763
+ * Get mesh at index (clones non-destructive). Prefer `takeMesh` on the
764
+ * hot streaming path; this stays for callers that read meshes more than once.
765
+ */
766
+ get(index: number): MeshDataJs | undefined;
767
+ /**
768
+ * Check if RTC offset is significant (>10km)
769
+ */
770
+ hasRtcOffset(): boolean;
771
+ /**
772
+ * #1097 perf: MOVE the mesh at `index` out of the collection (the Vec
773
+ * buffers are `std::mem::take`-n, leaving an empty stub). The streaming
774
+ * worker reads each mesh exactly once, so moving avoids the full vertex-
775
+ * data clone `get` pays — one fewer copy of positions/normals/indices/uvs/
776
+ * texture per mesh (the JS getters still do the single Rust→JS copy). Calling
777
+ * it twice for the same index yields the second call an empty mesh.
778
+ */
779
+ takeMesh(index: number): MeshDataJs | undefined;
780
+ /**
781
+ * Get building rotation angle in radians (from IfcSite placement)
782
+ * Returns None if no rotation was detected
783
+ */
784
+ readonly buildingRotation: number | undefined;
785
+ /**
786
+ * The batch's typed CSG / opening diagnostics as a JS object (the
787
+ * `GeometryDiagnostics` contract), or `undefined` if none were recorded. The
788
+ * worker merges these across batches. One serialized value keeps the rich
789
+ * nested shape as a single FFI crossing instead of dozens of getters.
790
+ */
791
+ readonly diagnostics: any;
792
+ /**
793
+ * Number of per-entity geometry fingerprints recorded.
794
+ */
795
+ readonly geometryHashCount: number;
796
+ /**
797
+ * Express ids for the per-entity geometry fingerprints, parallel to
798
+ * [`Self::geometry_hash_values`]. Empty unless geometry hashing was
799
+ * enabled via `IfcAPI.setComputeGeometryHashes`.
800
+ */
801
+ readonly geometryHashIds: Uint32Array;
802
+ /**
803
+ * Per-entity geometry fingerprints as a `BigUint64Array`, parallel to
804
+ * [`Self::geometry_hash_ids`]. `u64` is exposed (not hex strings) so JS
805
+ * can compare with `===` and key maps without allocation. Empty unless
806
+ * geometry hashing was enabled.
807
+ */
808
+ readonly geometryHashValues: BigUint64Array;
809
+ /**
810
+ * Get number of meshes
811
+ */
812
+ readonly length: number;
813
+ /**
814
+ * Get RTC offset X (for converting local coords back to world coords)
815
+ * Add this to local X coordinates to get world X coordinates
816
+ */
817
+ readonly rtcOffsetX: number;
818
+ /**
819
+ * Get RTC offset Y
820
+ */
821
+ readonly rtcOffsetY: number;
822
+ /**
823
+ * Get RTC offset Z
824
+ */
825
+ readonly rtcOffsetZ: number;
826
+ /**
827
+ * Get total triangle count across all meshes
828
+ */
829
+ readonly totalTriangles: number;
830
+ /**
831
+ * Get total vertex count across all meshes
832
+ */
833
+ readonly totalVertices: number;
734
834
  }
735
835
 
836
+ /**
837
+ * Individual mesh data with express ID and color (matches MeshData interface)
838
+ */
736
839
  export class MeshDataJs {
737
- private constructor();
738
- free(): void;
739
- [Symbol.dispose](): void;
740
- /**
741
- * Get express ID
742
- */
743
- readonly expressId: number;
744
- /**
745
- * Stable texture dedup key (`IfcSurfaceTexture` express id, #1781).
746
- * 0 when the mesh is untextured.
747
- */
748
- readonly textureId: number;
749
- /**
750
- * True when this mesh carries a surface texture (#961).
751
- */
752
- readonly hasTexture: boolean;
753
- /**
754
- * External image reference (`IfcImageTexture.URLReference`, #1781) for the
755
- * host to resolve e.g. a sibling image inside the `.ifcZIP`. `undefined`
756
- * for untextured meshes and Rust-decoded blob/pixel textures.
757
- */
758
- readonly textureUrl: string | undefined;
759
- /**
760
- * Local (pre-placement, object-space) AABB (issue #1474), WebGL Y-up,
761
- * `[minX,minY,minZ,maxX,maxY,maxZ]`. `undefined` when not captured
762
- * (wasm-bindgen maps `Option::None` to `undefined`, not `null`).
763
- */
764
- readonly localBounds: Float32Array | undefined;
765
- /**
766
- * Decoded RGBA8 texture bytes (`width*height*4`). Empty when untextured.
767
- */
768
- readonly textureRgba: Uint8Array;
769
- /**
770
- * Get vertex count
771
- */
772
- readonly vertexCount: number;
773
- /**
774
- * Optional SurfaceColour for the "Shading" GLB-export choice only
775
- * present when the file authored a distinct DiffuseColour. JS sees
776
- * `undefined` when absent (most files).
777
- */
778
- readonly shadingColor: Float32Array | undefined;
779
- readonly textureWidth: number;
780
- /**
781
- * Geometry provenance for the viewer's Model/Types switch (#957 follow-up):
782
- * 0 = occurrence, 1 = orphan type geometry (no occurrence), 2 = instanced
783
- * type geometry (hidden in Model mode, shown in Types mode).
784
- */
785
- readonly geometryClass: number;
786
- /**
787
- * The resolved `IfcLocalPlacement` chain for this mesh (issue #1474),
788
- * row-major 4×4, WebGL Y-up. `undefined` when not captured (see
789
- * `local_bounds` above).
790
- */
791
- readonly localToWorld: Float64Array | undefined;
792
- readonly textureHeight: number;
793
- /**
794
- * Get triangle count
795
- */
796
- readonly triangleCount: number;
797
- /**
798
- * Sampler wrap for the S axis (`IfcSurfaceTexture.RepeatS`): true = repeat.
799
- */
800
- readonly textureRepeatS: boolean;
801
- /**
802
- * Sampler wrap for the T axis (`IfcSurfaceTexture.RepeatT`): true = repeat.
803
- */
804
- readonly textureRepeatT: boolean;
805
- /**
806
- * Per-vertex texture coordinates as Float32Array (u, v pairs). Empty when
807
- * the mesh is untextured.
808
- */
809
- readonly uvs: Float32Array;
810
- /**
811
- * Get color as [r, g, b, a] array
812
- */
813
- readonly color: Float32Array;
814
- /**
815
- * Per-element local-frame origin (Float64Array[3], WebGL Y-up, metres):
816
- * world position of vertex i = `origin + positions[3i..3i+3]`. Returns
817
- * [0,0,0] when positions are absolute (legacy / local frame off).
818
- */
819
- readonly origin: Float64Array;
820
- /**
821
- * Get indices as Uint32Array (copy to JS)
822
- */
823
- readonly indices: Uint32Array;
824
- /**
825
- * Get normals as Float32Array (copy to JS)
826
- */
827
- readonly normals: Float32Array;
828
- /**
829
- * Get IFC type name (e.g., "IfcWall", "IfcSpace")
830
- */
831
- readonly ifcType: string;
832
- /**
833
- * Get positions as Float32Array (copy to JS)
834
- */
835
- readonly positions: Float32Array;
840
+ private constructor();
841
+ free(): void;
842
+ [Symbol.dispose](): void;
843
+ /**
844
+ * Get color as [r, g, b, a] array
845
+ */
846
+ readonly color: Float32Array;
847
+ /**
848
+ * Get express ID
849
+ */
850
+ readonly expressId: number;
851
+ /**
852
+ * Geometry provenance for the viewer's Model/Types switch (#957 follow-up):
853
+ * 0 = occurrence, 1 = orphan type geometry (no occurrence), 2 = instanced
854
+ * type geometry (hidden in Model mode, shown in Types mode).
855
+ */
856
+ readonly geometryClass: number;
857
+ /**
858
+ * True when this mesh carries a surface texture (#961).
859
+ */
860
+ readonly hasTexture: boolean;
861
+ /**
862
+ * Get IFC type name (e.g., "IfcWall", "IfcSpace")
863
+ */
864
+ readonly ifcType: string;
865
+ /**
866
+ * Get indices as Uint32Array (copy to JS)
867
+ */
868
+ readonly indices: Uint32Array;
869
+ /**
870
+ * Local (pre-placement, object-space) AABB (issue #1474), WebGL Y-up,
871
+ * `[minX,minY,minZ,maxX,maxY,maxZ]`. `undefined` when not captured
872
+ * (wasm-bindgen maps `Option::None` to `undefined`, not `null`).
873
+ */
874
+ readonly localBounds: Float32Array | undefined;
875
+ /**
876
+ * The resolved `IfcLocalPlacement` chain for this mesh (issue #1474),
877
+ * row-major 4×4, WebGL Y-up. `undefined` when not captured (see
878
+ * `local_bounds` above).
879
+ */
880
+ readonly localToWorld: Float64Array | undefined;
881
+ /**
882
+ * Get normals as Float32Array (copy to JS)
883
+ */
884
+ readonly normals: Float32Array;
885
+ /**
886
+ * Per-element local-frame origin (Float64Array[3], WebGL Y-up, metres):
887
+ * world position of vertex i = `origin + positions[3i..3i+3]`. Returns
888
+ * [0,0,0] when positions are absolute (legacy / local frame off).
889
+ */
890
+ readonly origin: Float64Array;
891
+ /**
892
+ * Get positions as Float32Array (copy to JS)
893
+ */
894
+ readonly positions: Float32Array;
895
+ /**
896
+ * Optional SurfaceColour for the "Shading" GLB-export choice — only
897
+ * present when the file authored a distinct DiffuseColour. JS sees
898
+ * `undefined` when absent (most files).
899
+ */
900
+ readonly shadingColor: Float32Array | undefined;
901
+ readonly textureHeight: number;
902
+ /**
903
+ * Stable texture dedup key (`IfcSurfaceTexture` express id, #1781).
904
+ * 0 when the mesh is untextured.
905
+ */
906
+ readonly textureId: number;
907
+ /**
908
+ * Sampler wrap for the S axis (`IfcSurfaceTexture.RepeatS`): true = repeat.
909
+ */
910
+ readonly textureRepeatS: boolean;
911
+ /**
912
+ * Sampler wrap for the T axis (`IfcSurfaceTexture.RepeatT`): true = repeat.
913
+ */
914
+ readonly textureRepeatT: boolean;
915
+ /**
916
+ * Decoded RGBA8 texture bytes (`width*height*4`). Empty when untextured.
917
+ */
918
+ readonly textureRgba: Uint8Array;
919
+ /**
920
+ * External image reference (`IfcImageTexture.URLReference`, #1781) for the
921
+ * host to resolve — e.g. a sibling image inside the `.ifcZIP`. `undefined`
922
+ * for untextured meshes and Rust-decoded blob/pixel textures.
923
+ */
924
+ readonly textureUrl: string | undefined;
925
+ readonly textureWidth: number;
926
+ /**
927
+ * Get triangle count
928
+ */
929
+ readonly triangleCount: number;
930
+ /**
931
+ * Per-vertex texture coordinates as Float32Array (u, v pairs). Empty when
932
+ * the mesh is untextured.
933
+ */
934
+ readonly uvs: Float32Array;
935
+ /**
936
+ * Get vertex count
937
+ */
938
+ readonly vertexCount: number;
836
939
  }
837
940
 
941
+ /**
942
+ * A mesh's projected footprint outline.
943
+ *
944
+ * Contours are closed rings in drawing 2D space (same basis as `projectTo2D`
945
+ * in `@ifc-lite/drawing-2d`), WITHOUT a duplicated closing vertex.
946
+ * `axisMin`/`axisMax` are the element's extent along the cut axis (world
947
+ * units, not flip-adjusted) for band classification on the TS side.
948
+ */
838
949
  export class MeshOutlineJs {
839
- private constructor();
840
- free(): void;
841
- [Symbol.dispose](): void;
842
- /**
843
- * Ring `i` as a flat `[u0, v0, u1, v1, …]` array, or `undefined` if out of
844
- * range. The ring is closed implicitly (connect the last point to the
845
- * first).
846
- */
847
- contour(index: number): Float32Array | undefined;
848
- /**
849
- * Number of boundary rings (outer + holes).
850
- */
851
- readonly contourCount: number;
852
- /**
853
- * Element extent (max) along the cut axis, world units.
854
- */
855
- readonly axisMax: number;
856
- /**
857
- * Element extent (min) along the cut axis, world units.
858
- */
859
- readonly axisMin: number;
950
+ private constructor();
951
+ free(): void;
952
+ [Symbol.dispose](): void;
953
+ /**
954
+ * Ring `i` as a flat `[u0, v0, u1, v1, …]` array, or `undefined` if out of
955
+ * range. The ring is closed implicitly (connect the last point to the
956
+ * first).
957
+ */
958
+ contour(index: number): Float32Array | undefined;
959
+ /**
960
+ * Element extent (max) along the cut axis, world units.
961
+ */
962
+ readonly axisMax: number;
963
+ /**
964
+ * Element extent (min) along the cut axis, world units.
965
+ */
966
+ readonly axisMin: number;
967
+ /**
968
+ * Number of boundary rings (outer + holes).
969
+ */
970
+ readonly contourCount: number;
860
971
  }
861
972
 
973
+ /**
974
+ * Result of [`IfcAPI::process_geometry_batch_partitioned`]: the flat
975
+ * MeshCollection (transparent + type geometry) and the instanced IFNS shard
976
+ * (opaque ordinary occurrences) from ONE produce_batch. Take-once accessors so
977
+ * the JS side moves each out without a clone.
978
+ */
862
979
  export class PartitionedBatch {
863
- private constructor();
864
- free(): void;
865
- [Symbol.dispose](): void;
866
- /**
867
- * The instanced IFNS shard bytes (opaque ordinary occurrences). Moves out.
868
- */
869
- takeShard(): Uint8Array;
870
- /**
871
- * The flat MeshCollection (transparent glass + type-product geometry).
872
- * Moves out call once.
873
- */
874
- takeMeshes(): MeshCollection | undefined;
875
- /**
876
- * Number of occurrences routed into the instanced shard this batch. The viewer
877
- * folds this into its total mesh count so the count reflects ALL rendered
878
- * geometry (flat + instanced), not just the flat MeshCollection.
879
- */
880
- readonly instancedOccurrences: number;
980
+ private constructor();
981
+ free(): void;
982
+ [Symbol.dispose](): void;
983
+ /**
984
+ * The flat MeshCollection (transparent glass + type-product geometry).
985
+ * Moves out — call once.
986
+ */
987
+ takeMeshes(): MeshCollection | undefined;
988
+ /**
989
+ * The instanced IFNS shard bytes (opaque ordinary occurrences). Moves out.
990
+ */
991
+ takeShard(): Uint8Array;
992
+ /**
993
+ * Number of occurrences routed into the instanced shard this batch. The viewer
994
+ * folds this into its total mesh count so the count reflects ALL rendered
995
+ * geometry (flat + instanced), not just the flat MeshCollection.
996
+ */
997
+ readonly instancedOccurrences: number;
881
998
  }
882
999
 
1000
+ /**
1001
+ * A collection of extracted profiles.
1002
+ */
883
1003
  export class ProfileCollection {
884
- private constructor();
885
- free(): void;
886
- [Symbol.dispose](): void;
887
- /**
888
- * Get profile at `index`. Returns `undefined` for out-of-bounds index.
889
- */
890
- get(index: number): ProfileEntryJs | undefined;
891
- /**
892
- * Number of profiles.
893
- */
894
- readonly length: number;
1004
+ private constructor();
1005
+ free(): void;
1006
+ [Symbol.dispose](): void;
1007
+ /**
1008
+ * Get profile at `index`. Returns `undefined` for out-of-bounds index.
1009
+ */
1010
+ get(index: number): ProfileEntryJs | undefined;
1011
+ /**
1012
+ * Number of profiles.
1013
+ */
1014
+ readonly length: number;
895
1015
  }
896
1016
 
1017
+ /**
1018
+ * A single profile entry – raw 2D polygon + world transform.
1019
+ *
1020
+ * Profile points are in **local 2D profile space** (metres).
1021
+ * Apply `transform` to `[x, y, 0, 1]` to get WebGL Y-up world coordinates.
1022
+ */
897
1023
  export class ProfileEntryJs {
898
- private constructor();
899
- free(): void;
900
- [Symbol.dispose](): void;
901
- /**
902
- * Express ID of the building element.
903
- */
904
- readonly expressId: number;
905
- /**
906
- * Number of points per hole.
907
- */
908
- readonly holeCounts: Uint32Array;
909
- /**
910
- * All hole points concatenated: `[x0, y0, x1, y1, …]` (metres).
911
- */
912
- readonly holePoints: Float32Array;
913
- /**
914
- * Model index for multi-model federation.
915
- */
916
- readonly modelIndex: number;
917
- /**
918
- * Outer boundary: flat `[x0, y0, x1, y1, …]` in local profile space (metres).
919
- */
920
- readonly outerPoints: Float32Array;
921
- /**
922
- * Extrusion direction `[dx, dy, dz]` in WebGL Y-up world space (unit vector).
923
- */
924
- readonly extrusionDir: Float32Array;
925
- /**
926
- * Extrusion depth (metres).
927
- */
928
- readonly extrusionDepth: number;
929
- /**
930
- * IFC type name (e.g., `"IfcWall"`).
931
- */
932
- readonly ifcType: string;
933
- /**
934
- * 4 × 4 column-major transform in WebGL Y-up world space.
935
- * `M * [x, y, 0, 1]ᵀ` gives the world position.
936
- */
937
- readonly transform: Float32Array;
1024
+ private constructor();
1025
+ free(): void;
1026
+ [Symbol.dispose](): void;
1027
+ /**
1028
+ * Express ID of the building element.
1029
+ */
1030
+ readonly expressId: number;
1031
+ /**
1032
+ * Extrusion depth (metres).
1033
+ */
1034
+ readonly extrusionDepth: number;
1035
+ /**
1036
+ * Extrusion direction `[dx, dy, dz]` in WebGL Y-up world space (unit vector).
1037
+ */
1038
+ readonly extrusionDir: Float32Array;
1039
+ /**
1040
+ * Number of points per hole.
1041
+ */
1042
+ readonly holeCounts: Uint32Array;
1043
+ /**
1044
+ * All hole points concatenated: `[x0, y0, x1, y1, …]` (metres).
1045
+ */
1046
+ readonly holePoints: Float32Array;
1047
+ /**
1048
+ * IFC type name (e.g., `"IfcWall"`).
1049
+ */
1050
+ readonly ifcType: string;
1051
+ /**
1052
+ * Model index for multi-model federation.
1053
+ */
1054
+ readonly modelIndex: number;
1055
+ /**
1056
+ * Outer boundary: flat `[x0, y0, x1, y1, …]` in local profile space (metres).
1057
+ */
1058
+ readonly outerPoints: Float32Array;
1059
+ /**
1060
+ * 4 × 4 column-major transform in WebGL Y-up world space.
1061
+ * `M * [x, y, 0, 1]ᵀ` gives the world position.
1062
+ */
1063
+ readonly transform: Float32Array;
938
1064
  }
939
1065
 
1066
+ /**
1067
+ * Flat result of `simplifyMeshes`: per surviving element `i`,
1068
+ * `vertexCounts[i]` vertices and `indexCounts[i]` indices taken in order
1069
+ * from the concatenated arrays (mirrors the `exportGlbFromMeshes` wire
1070
+ * convention). `localPositions` is 1:1 with `renderPositions` (f64, file
1071
+ * units, element object frame); `localIndices` is 1:1 with `renderIndices`
1072
+ * but in the IFC frame's winding. Skipped elements are reported in
1073
+ * `skippedIds` / `skippedReasons` and must keep their original geometry.
1074
+ */
940
1075
  export class SimplifiedMeshes {
941
- private constructor();
942
- free(): void;
943
- [Symbol.dispose](): void;
944
- readonly trisAfter: Uint32Array;
945
- readonly elementIds: Uint32Array;
946
- readonly skippedIds: Uint32Array;
947
- readonly trisBefore: Uint32Array;
948
- readonly indexCounts: Uint32Array;
949
- readonly localIndices: Uint32Array;
950
- readonly vertexCounts: Uint32Array;
951
- readonly renderIndices: Uint32Array;
952
- readonly renderNormals: Float32Array;
953
- /**
954
- * xyz per element (frame matches the render positions' convention).
955
- */
956
- readonly renderOrigins: Float64Array;
957
- readonly localPositions: Float64Array;
958
- /**
959
- * Skip reason per `skippedIds` entry (stable slugs:
960
- * `no-geometry` / `missing-placement` / `singular-placement` /
961
- * `empty-result` / `invalid-unit-scale`).
962
- */
963
- readonly skippedReasons: any[];
964
- readonly cavitiesDropped: Uint32Array;
965
- readonly renderPositions: Float32Array;
966
- readonly levels: Uint8Array;
1076
+ private constructor();
1077
+ free(): void;
1078
+ [Symbol.dispose](): void;
1079
+ readonly cavitiesDropped: Uint32Array;
1080
+ readonly elementIds: Uint32Array;
1081
+ readonly indexCounts: Uint32Array;
1082
+ readonly levels: Uint8Array;
1083
+ readonly localIndices: Uint32Array;
1084
+ readonly localPositions: Float64Array;
1085
+ readonly renderIndices: Uint32Array;
1086
+ readonly renderNormals: Float32Array;
1087
+ /**
1088
+ * xyz per element (frame matches the render positions' convention).
1089
+ */
1090
+ readonly renderOrigins: Float64Array;
1091
+ readonly renderPositions: Float32Array;
1092
+ readonly skippedIds: Uint32Array;
1093
+ /**
1094
+ * Skip reason per `skippedIds` entry (stable slugs:
1095
+ * `no-geometry` / `missing-placement` / `singular-placement` /
1096
+ * `empty-result` / `invalid-unit-scale`).
1097
+ */
1098
+ readonly skippedReasons: any[];
1099
+ readonly trisAfter: Uint32Array;
1100
+ readonly trisBefore: Uint32Array;
1101
+ readonly vertexCounts: Uint32Array;
967
1102
  }
968
1103
 
1104
+ /**
1105
+ * A persistent, editable floor-plate topology. See the module docs.
1106
+ */
969
1107
  export class SpacePlateHandle {
970
- free(): void;
971
- [Symbol.dispose](): void;
972
- /**
973
- * Insert a new vertex at `(x, y)` on edge `edge`, subdividing it (no new
974
- * face). Returns the new vertex id use it as a `splitFace` endpoint to
975
- * cut between points that weren't existing corners. Project `(x, y)` onto
976
- * the edge to keep areas unchanged.
977
- */
978
- splitEdge(edge: number, x: number, y: number): number;
979
- /**
980
- * Subdivide a face with a partition between two of its vertices. `source`
981
- * `-1` marks a brand-new partition (materialised as a fresh wall at bake).
982
- * Returns the kept face and the new face.
983
- */
984
- splitFace(face: number, va: number, vb: number, source: number): any;
985
- /**
986
- * Move a vertex; returns the rooms it changed. A shared wall is one edge
987
- * whose endpoints are shared vertices, so one drag updates both rooms.
988
- */
989
- dragVertex(v: number, x: number, y: number): any;
990
- /**
991
- * Remove a shared wall, unioning the two rooms it separated. Returns the
992
- * surviving room.
993
- */
994
- mergeFaces(edge: number): any;
995
- /**
996
- * The face outline offset to a wall boundary, as flat `[x0, y0, …]`: each
997
- * edge is moved by its own wall's half-thickness — inward when `inset`
998
- * (the net / inner face), outward otherwise (the gross / outer face).
999
- * Shared room↔room edges are pinned when pushing outward. Falls back to the
1000
- * centreline outline when no offset applies — so it's always a sane ring.
1001
- * (For a `center` boundary just use `faceOutline`.)
1002
- */
1003
- netOutline(face: number, inset: boolean): Float64Array;
1004
- /**
1005
- * Remove a wall edge, choosing the right semantics from its two faces:
1006
- * two real rooms → union them; a bridge / spur / outer-only wall → delete
1007
- * it and auto-clean the orphaned inner lines and nodes it leaves; a real
1008
- * enclosing wall (room ↔ exterior) → rejected (`BordersExterior`). This is
1009
- * the "remove this wall and tidy up" affordance for the orphan cruft the
1010
- * non-destructive wall arrangement leaves behind. Returns the rooms it
1011
- * changed (empty if the edge bounded no room).
1012
- */
1013
- removeEdge(edge: number): any;
1014
- /**
1015
- * Flat outline `[x0, y0, x1, y1, …]` of a face (no repeated closing vertex).
1016
- */
1017
- faceOutline(face: number): Float64Array;
1018
- /**
1019
- * Face-based gap-room boundary as flat `[x0, y0, …]`: each edge pushed
1020
- * OUTWARD (into the wall) by `factor × the source wall's half-thickness`.
1021
- * `0` → net (the gap / inner faces); `1` → centre axis (½ thickness, the
1022
- * editable node line on the wall mid); `2` → gross outer face.
1023
- */
1024
- gapBoundary(face: number, factor: number): Float64Array;
1025
- /**
1026
- * Dissolve a degree-2 vertex, welding its two edges into one straight
1027
- * edge between the neighbours the inverse of `splitEdge`, and the
1028
- * "delete this corner / node" affordance. Returns the rooms it changed.
1029
- * Rejects a wall junction (degree ≥ 3) or a weld that would duplicate an
1030
- * edge.
1031
- */
1032
- dissolveVertex(v: number): any;
1033
- /**
1034
- * FACE-BASED build: rooms are the gaps between wall footprint rectangles.
1035
- * `rectCoords` is flat `[x0, y0, x1, y1, x2, y2, x3, y3, …]` — 8 f64 per wall
1036
- * (its 4 plan-rectangle corners, CCW). A bounded arrangement face is a room
1037
- * only if its centroid is outside every rectangle (a gap, not a wall
1038
- * interior). The room outline IS the net (inner-face) area; `gapBoundary`
1039
- * gives the centre axis (½ thickness) and the gross outer face.
1040
- */
1041
- static fromWallRects(rect_coords: Float64Array, snap_tolerance: number, min_area: number): SpacePlateHandle;
1042
- /**
1043
- * The room on the far side of a half-edge (its twin's face), or
1044
- * `undefined`. O(1) the "who's across this wall" query.
1045
- */
1046
- neighborAcross(edge: number): number | undefined;
1047
- /**
1048
- * Set a face's floor / ceiling planes (the vertical dimension that turns a
1049
- * 2D face into a prismatic space at bake).
1050
- */
1051
- setFaceHeight(face: number, floor_z: number, ceiling_z: number, non_planar: boolean): void;
1052
- /**
1053
- * Nearest live vertex id to `(x, y)` within `tol`, or `undefined`.
1054
- */
1055
- findVertexNear(x: number, y: number, tol: number): number | undefined;
1056
- /**
1057
- * Bounding half-edges of a face paired with their source element —
1058
- * `[{ edge, source }, …]` — for `IfcRelSpaceBoundary` at bake.
1059
- */
1060
- boundingElements(face: number): any;
1061
- /**
1062
- * Build a plate from flat wall-axis segments.
1063
- *
1064
- * `segCoords`: `[ax, ay, bx, by, …]` (length a multiple of 4).
1065
- * `segSources`: one `i32` per segment, `-1` for none.
1066
- * `segHalfThickness`: one `f64` per segment — half the wall's thickness in
1067
- * metres, carried onto the derived edges for `netOutline`. Pass an empty
1068
- * array (or all zeros) when thickness is unknown (centreline only).
1069
- * `snapTolerance` / `minArea`: pass `<= 0` to take the defaults.
1070
- */
1071
- constructor(seg_coords: Float64Array, seg_sources: Int32Array, seg_half_thickness: Float64Array, snap_tolerance: number, min_area: number);
1072
- /**
1073
- * Sweep the whole plate clean: remove dangling spur walls, isolated nodes,
1074
- * and redundant collinear nodes the "clean up orphans" / eraser action.
1075
- * Area-neutral and idempotent. Returns how many topology elements were
1076
- * pruned (0 = the plate was already clean); the caller re-renders via
1077
- * `snapshot` like any other edit.
1078
- */
1079
- prune(): number;
1080
- /**
1081
- * Author a new room from a flat ring `[x0, y0, x1, y1, …]` (no repeated
1082
- * closing vertex). `source` `-1` marks a user-drawn room. Winding is
1083
- * normalised to CCW; returns the new room patch. The room is its own
1084
- * connected component it does not merge into existing topology.
1085
- */
1086
- addFace(coords: Float64Array, source: number): any;
1087
- /**
1088
- * Face ids of every live room.
1089
- */
1090
- roomIds(): Uint32Array;
1091
- /**
1092
- * All live rooms as `{ face, area, simple, outline }` patches.
1093
- */
1094
- snapshot(): any;
1095
- /**
1096
- * Deep-copy the plate for an undo/redo snapshot. The clone owns its own
1097
- * heap; the caller must `.free()` it like any handle.
1098
- */
1099
- duplicate(): SpacePlateHandle;
1100
- /**
1101
- * Absolute area (m²) of a face.
1102
- */
1103
- faceArea(face: number): number;
1104
- /**
1105
- * Number of live rooms.
1106
- */
1107
- readonly roomCount: number;
1108
+ free(): void;
1109
+ [Symbol.dispose](): void;
1110
+ /**
1111
+ * Author a new room from a flat ring `[x0, y0, x1, y1, …]` (no repeated
1112
+ * closing vertex). `source` `-1` marks a user-drawn room. Winding is
1113
+ * normalised to CCW; returns the new room patch. The room is its own
1114
+ * connected component it does not merge into existing topology.
1115
+ */
1116
+ addFace(coords: Float64Array, source: number): any;
1117
+ /**
1118
+ * Bounding half-edges of a face paired with their source element
1119
+ * `[{ edge, source }, …]` for `IfcRelSpaceBoundary` at bake.
1120
+ */
1121
+ boundingElements(face: number): any;
1122
+ /**
1123
+ * Dissolve a degree-2 vertex, welding its two edges into one straight
1124
+ * edge between the neighbours the inverse of `splitEdge`, and the
1125
+ * "delete this corner / node" affordance. Returns the rooms it changed.
1126
+ * Rejects a wall junction (degree ≥ 3) or a weld that would duplicate an
1127
+ * edge.
1128
+ */
1129
+ dissolveVertex(v: number): any;
1130
+ /**
1131
+ * Move a vertex; returns the rooms it changed. A shared wall is one edge
1132
+ * whose endpoints are shared vertices, so one drag updates both rooms.
1133
+ */
1134
+ dragVertex(v: number, x: number, y: number): any;
1135
+ /**
1136
+ * Deep-copy the plate for an undo/redo snapshot. The clone owns its own
1137
+ * heap; the caller must `.free()` it like any handle.
1138
+ */
1139
+ duplicate(): SpacePlateHandle;
1140
+ /**
1141
+ * Absolute area (m²) of a face.
1142
+ */
1143
+ faceArea(face: number): number;
1144
+ /**
1145
+ * Flat outline `[x0, y0, x1, y1, …]` of a face (no repeated closing vertex).
1146
+ */
1147
+ faceOutline(face: number): Float64Array;
1148
+ /**
1149
+ * Nearest live vertex id to `(x, y)` within `tol`, or `undefined`.
1150
+ */
1151
+ findVertexNear(x: number, y: number, tol: number): number | undefined;
1152
+ /**
1153
+ * FACE-BASED build: rooms are the gaps between wall footprint rectangles.
1154
+ * `rectCoords` is flat `[x0, y0, x1, y1, x2, y2, x3, y3, …]` — 8 f64 per wall
1155
+ * (its 4 plan-rectangle corners, CCW). A bounded arrangement face is a room
1156
+ * only if its centroid is outside every rectangle (a gap, not a wall
1157
+ * interior). The room outline IS the net (inner-face) area; `gapBoundary`
1158
+ * gives the centre axis thickness) and the gross outer face.
1159
+ */
1160
+ static fromWallRects(rect_coords: Float64Array, snap_tolerance: number, min_area: number): SpacePlateHandle;
1161
+ /**
1162
+ * Face-based gap-room boundary as flat `[x0, y0, …]`: each edge pushed
1163
+ * OUTWARD (into the wall) by `factor × the source wall's half-thickness`.
1164
+ * `0` net (the gap / inner faces); `1` centre axis (½ thickness, the
1165
+ * editable node line on the wall mid); `2` gross outer face.
1166
+ */
1167
+ gapBoundary(face: number, factor: number): Float64Array;
1168
+ /**
1169
+ * Remove a shared wall, unioning the two rooms it separated. Returns the
1170
+ * surviving room.
1171
+ */
1172
+ mergeFaces(edge: number): any;
1173
+ /**
1174
+ * The room on the far side of a half-edge (its twin's face), or
1175
+ * `undefined`. O(1) the "who's across this wall" query.
1176
+ */
1177
+ neighborAcross(edge: number): number | undefined;
1178
+ /**
1179
+ * The face outline offset to a wall boundary, as flat `[x0, y0, …]`: each
1180
+ * edge is moved by its own wall's half-thickness — inward when `inset`
1181
+ * (the net / inner face), outward otherwise (the gross / outer face).
1182
+ * Shared room↔room edges are pinned when pushing outward. Falls back to the
1183
+ * centreline outline when no offset applies — so it's always a sane ring.
1184
+ * (For a `center` boundary just use `faceOutline`.)
1185
+ */
1186
+ netOutline(face: number, inset: boolean): Float64Array;
1187
+ /**
1188
+ * Build a plate from flat wall-axis segments.
1189
+ *
1190
+ * `segCoords`: `[ax, ay, bx, by, …]` (length a multiple of 4).
1191
+ * `segSources`: one `i32` per segment, `-1` for none.
1192
+ * `segHalfThickness`: one `f64` per segment — half the wall's thickness in
1193
+ * metres, carried onto the derived edges for `netOutline`. Pass an empty
1194
+ * array (or all zeros) when thickness is unknown (centreline only).
1195
+ * `snapTolerance` / `minArea`: pass `<= 0` to take the defaults.
1196
+ */
1197
+ constructor(seg_coords: Float64Array, seg_sources: Int32Array, seg_half_thickness: Float64Array, snap_tolerance: number, min_area: number);
1198
+ /**
1199
+ * Sweep the whole plate clean: remove dangling spur walls, isolated nodes,
1200
+ * and redundant collinear nodes the "clean up orphans" / eraser action.
1201
+ * Area-neutral and idempotent. Returns how many topology elements were
1202
+ * pruned (0 = the plate was already clean); the caller re-renders via
1203
+ * `snapshot` like any other edit.
1204
+ */
1205
+ prune(): number;
1206
+ /**
1207
+ * Remove a wall edge, choosing the right semantics from its two faces:
1208
+ * two real rooms → union them; a bridge / spur / outer-only wall → delete
1209
+ * it and auto-clean the orphaned inner lines and nodes it leaves; a real
1210
+ * enclosing wall (room ↔ exterior) → rejected (`BordersExterior`). This is
1211
+ * the "remove this wall and tidy up" affordance for the orphan cruft the
1212
+ * non-destructive wall arrangement leaves behind. Returns the rooms it
1213
+ * changed (empty if the edge bounded no room).
1214
+ */
1215
+ removeEdge(edge: number): any;
1216
+ /**
1217
+ * Face ids of every live room.
1218
+ */
1219
+ roomIds(): Uint32Array;
1220
+ /**
1221
+ * Set a face's floor / ceiling planes (the vertical dimension that turns a
1222
+ * 2D face into a prismatic space at bake).
1223
+ */
1224
+ setFaceHeight(face: number, floor_z: number, ceiling_z: number, non_planar: boolean): void;
1225
+ /**
1226
+ * All live rooms as `{ face, area, simple, outline }` patches.
1227
+ */
1228
+ snapshot(): any;
1229
+ /**
1230
+ * Insert a new vertex at `(x, y)` on edge `edge`, subdividing it (no new
1231
+ * face). Returns the new vertex id — use it as a `splitFace` endpoint to
1232
+ * cut between points that weren't existing corners. Project `(x, y)` onto
1233
+ * the edge to keep areas unchanged.
1234
+ */
1235
+ splitEdge(edge: number, x: number, y: number): number;
1236
+ /**
1237
+ * Subdivide a face with a partition between two of its vertices. `source`
1238
+ * `-1` marks a brand-new partition (materialised as a fresh wall at bake).
1239
+ * Returns the kept face and the new face.
1240
+ */
1241
+ splitFace(face: number, va: number, vb: number, source: number): any;
1242
+ /**
1243
+ * Number of live rooms.
1244
+ */
1245
+ readonly roomCount: number;
1108
1246
  }
1109
1247
 
1248
+ /**
1249
+ * A 2D circle/arc for symbolic representations
1250
+ */
1110
1251
  export class SymbolicCircle {
1111
- private constructor();
1112
- free(): void;
1113
- [Symbol.dispose](): void;
1114
- readonly expressId: number;
1115
- readonly startAngle: number;
1116
- /**
1117
- * Check if this is a full circle
1118
- */
1119
- readonly isFullCircle: boolean;
1120
- readonly repIdentifier: string;
1121
- readonly radius: number;
1122
- /**
1123
- * World-Y elevation captured from the placement chain.
1124
- */
1125
- readonly worldY: number;
1126
- readonly centerX: number;
1127
- readonly centerY: number;
1128
- readonly ifcType: string;
1129
- readonly endAngle: number;
1252
+ private constructor();
1253
+ free(): void;
1254
+ [Symbol.dispose](): void;
1255
+ readonly centerX: number;
1256
+ readonly centerY: number;
1257
+ readonly endAngle: number;
1258
+ readonly expressId: number;
1259
+ readonly ifcType: string;
1260
+ /**
1261
+ * Check if this is a full circle
1262
+ */
1263
+ readonly isFullCircle: boolean;
1264
+ readonly radius: number;
1265
+ readonly repIdentifier: string;
1266
+ readonly startAngle: number;
1267
+ /**
1268
+ * World-Y elevation captured from the placement chain.
1269
+ */
1270
+ readonly worldY: number;
1130
1271
  }
1131
1272
 
1273
+ /**
1274
+ * A 2D filled region (IfcAnnotationFillArea / IfcAnnotationFillAreaOccurrence).
1275
+ *
1276
+ * Stores one outer ring of 2D points plus an offset table indexing inner
1277
+ * rings (holes). Both rings are stored flat in `points` so the JS side can
1278
+ * view the buffer as one Float32Array. The optional `hatch_*` fields encode
1279
+ * IfcFillAreaStyleHatching (line spacing, primary/secondary angles, line
1280
+ * width) when the IfcStyledItem chain resolves to a hatching style; absent
1281
+ * styles render as a solid fill.
1282
+ *
1283
+ * `holes_offsets` is an inclusive-prefix array describing where each hole
1284
+ * begins. The outer ring is implicitly at `points[0..holes_offsets[0]]`
1285
+ * (or all points if `holes_offsets` is empty). Each `holes_offsets[i]` is a
1286
+ * vertex index, not a byte offset.
1287
+ */
1132
1288
  export class SymbolicFillArea {
1133
- private constructor();
1134
- free(): void;
1135
- [Symbol.dispose](): void;
1136
- readonly expressId: number;
1137
- readonly holeCount: number;
1138
- readonly hatchAngle: number;
1139
- readonly pointCount: number;
1140
- readonly hasHatching: boolean;
1141
- readonly hatchSpacing: number;
1142
- /**
1143
- * Vertex indices marking the start of each hole. Empty = no holes.
1144
- */
1145
- readonly holesOffsets: Uint32Array;
1146
- readonly repIdentifier: string;
1147
- readonly hatchLineWidth: number;
1148
- readonly hatchAngleSecondary: number;
1149
- readonly fillA: number;
1150
- readonly fillB: number;
1151
- readonly fillG: number;
1152
- readonly fillR: number;
1153
- /**
1154
- * Flattened ring vertices.
1155
- */
1156
- readonly points: Float32Array;
1157
- readonly worldY: number;
1158
- readonly ifcType: string;
1289
+ private constructor();
1290
+ free(): void;
1291
+ [Symbol.dispose](): void;
1292
+ readonly expressId: number;
1293
+ readonly fillA: number;
1294
+ readonly fillB: number;
1295
+ readonly fillG: number;
1296
+ readonly fillR: number;
1297
+ readonly hasHatching: boolean;
1298
+ readonly hatchAngle: number;
1299
+ readonly hatchAngleSecondary: number;
1300
+ readonly hatchLineWidth: number;
1301
+ readonly hatchSpacing: number;
1302
+ readonly holeCount: number;
1303
+ /**
1304
+ * Vertex indices marking the start of each hole. Empty = no holes.
1305
+ */
1306
+ readonly holesOffsets: Uint32Array;
1307
+ readonly ifcType: string;
1308
+ readonly pointCount: number;
1309
+ /**
1310
+ * Flattened ring vertices.
1311
+ */
1312
+ readonly points: Float32Array;
1313
+ readonly repIdentifier: string;
1314
+ readonly worldY: number;
1159
1315
  }
1160
1316
 
1317
+ /**
1318
+ * A single 2D polyline for symbolic representations (Plan, Annotation, FootPrint)
1319
+ * Points are stored as [x1, y1, x2, y2, ...] in 2D coordinates
1320
+ */
1161
1321
  export class SymbolicPolyline {
1162
- private constructor();
1163
- free(): void;
1164
- [Symbol.dispose](): void;
1165
- /**
1166
- * Get express ID of the parent element
1167
- */
1168
- readonly expressId: number;
1169
- /**
1170
- * Get number of points
1171
- */
1172
- readonly pointCount: number;
1173
- /**
1174
- * Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
1175
- */
1176
- readonly repIdentifier: string;
1177
- /**
1178
- * Get 2D points as Float32Array [x1, y1, x2, y2, ...]
1179
- */
1180
- readonly points: Float32Array;
1181
- /**
1182
- * World-Y elevation captured from the placement chain (or first 3D
1183
- * point's Z component). JS uses this as the canonical bucket key.
1184
- */
1185
- readonly worldY: number;
1186
- /**
1187
- * Get IFC type name (e.g., "IfcDoor", "IfcWindow")
1188
- */
1189
- readonly ifcType: string;
1190
- /**
1191
- * Check if this is a closed loop
1192
- */
1193
- readonly isClosed: boolean;
1322
+ private constructor();
1323
+ free(): void;
1324
+ [Symbol.dispose](): void;
1325
+ /**
1326
+ * Get express ID of the parent element
1327
+ */
1328
+ readonly expressId: number;
1329
+ /**
1330
+ * Get IFC type name (e.g., "IfcDoor", "IfcWindow")
1331
+ */
1332
+ readonly ifcType: string;
1333
+ /**
1334
+ * Check if this is a closed loop
1335
+ */
1336
+ readonly isClosed: boolean;
1337
+ /**
1338
+ * Get number of points
1339
+ */
1340
+ readonly pointCount: number;
1341
+ /**
1342
+ * Get 2D points as Float32Array [x1, y1, x2, y2, ...]
1343
+ */
1344
+ readonly points: Float32Array;
1345
+ /**
1346
+ * Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
1347
+ */
1348
+ readonly repIdentifier: string;
1349
+ /**
1350
+ * World-Y elevation captured from the placement chain (or first 3D
1351
+ * point's Z component). JS uses this as the canonical bucket key.
1352
+ */
1353
+ readonly worldY: number;
1194
1354
  }
1195
1355
 
1356
+ /**
1357
+ * Collection of symbolic representations for an IFC model
1358
+ */
1196
1359
  export class SymbolicRepresentationCollection {
1197
- private constructor();
1198
- free(): void;
1199
- [Symbol.dispose](): void;
1200
- /**
1201
- * Get circle at index
1202
- */
1203
- getCircle(index: number): SymbolicCircle | undefined;
1204
- /**
1205
- * Get polyline at index
1206
- */
1207
- getPolyline(index: number): SymbolicPolyline | undefined;
1208
- /**
1209
- * Get all express IDs that have symbolic representations
1210
- */
1211
- getExpressIds(): Uint32Array;
1212
- /**
1213
- * Get fill area at index.
1214
- */
1215
- getFill(index: number): SymbolicFillArea | undefined;
1216
- /**
1217
- * Get text annotation at index.
1218
- */
1219
- getText(index: number): SymbolicText | undefined;
1220
- /**
1221
- * Get number of fill areas
1222
- */
1223
- readonly fillCount: number;
1224
- /**
1225
- * Get number of text annotations
1226
- */
1227
- readonly textCount: number;
1228
- /**
1229
- * Get total count of all symbolic items
1230
- */
1231
- readonly totalCount: number;
1232
- /**
1233
- * Get number of circles/arcs
1234
- */
1235
- readonly circleCount: number;
1236
- /**
1237
- * Get number of polylines
1238
- */
1239
- readonly polylineCount: number;
1240
- /**
1241
- * Check if collection is empty
1242
- */
1243
- readonly isEmpty: boolean;
1360
+ private constructor();
1361
+ free(): void;
1362
+ [Symbol.dispose](): void;
1363
+ /**
1364
+ * Get circle at index
1365
+ */
1366
+ getCircle(index: number): SymbolicCircle | undefined;
1367
+ /**
1368
+ * Get all express IDs that have symbolic representations
1369
+ */
1370
+ getExpressIds(): Uint32Array;
1371
+ /**
1372
+ * Get fill area at index.
1373
+ */
1374
+ getFill(index: number): SymbolicFillArea | undefined;
1375
+ /**
1376
+ * Get polyline at index
1377
+ */
1378
+ getPolyline(index: number): SymbolicPolyline | undefined;
1379
+ /**
1380
+ * Get text annotation at index.
1381
+ */
1382
+ getText(index: number): SymbolicText | undefined;
1383
+ /**
1384
+ * Get number of circles/arcs
1385
+ */
1386
+ readonly circleCount: number;
1387
+ /**
1388
+ * Get number of fill areas
1389
+ */
1390
+ readonly fillCount: number;
1391
+ /**
1392
+ * Check if collection is empty
1393
+ */
1394
+ readonly isEmpty: boolean;
1395
+ /**
1396
+ * Get number of polylines
1397
+ */
1398
+ readonly polylineCount: number;
1399
+ /**
1400
+ * Get number of text annotations
1401
+ */
1402
+ readonly textCount: number;
1403
+ /**
1404
+ * Get total count of all symbolic items
1405
+ */
1406
+ readonly totalCount: number;
1244
1407
  }
1245
1408
 
1409
+ /**
1410
+ * A 2D text annotation (IfcTextLiteral / IfcTextLiteralWithExtent).
1411
+ *
1412
+ * Position is in the same 2D coordinate space as `SymbolicPolyline` (i.e. the
1413
+ * floor-plan / annotation overlay's local frame after applying placement +
1414
+ * RTC). The text-orientation pair `(cos, sin)` rotates the baseline from the
1415
+ * `+x` axis. Height is the IFC font height in model units, scaled by the
1416
+ * project's length-unit factor so the renderer can convert directly to world
1417
+ * units. Alignment is the IFC `BoxAlignment` string verbatim
1418
+ * (`top-left`, `center`, `bottom-right`, …) — the renderer can interpret it.
1419
+ */
1246
1420
  export class SymbolicText {
1247
- private constructor();
1248
- free(): void;
1249
- [Symbol.dispose](): void;
1250
- readonly expressId: number;
1251
- readonly repIdentifier: string;
1252
- readonly x: number;
1253
- readonly y: number;
1254
- readonly dirX: number;
1255
- readonly dirY: number;
1256
- readonly height: number;
1257
- readonly colorA: number;
1258
- readonly colorB: number;
1259
- readonly colorG: number;
1260
- readonly colorR: number;
1261
- readonly content: string;
1262
- readonly worldY: number;
1263
- readonly ifcType: string;
1264
- readonly alignment: string;
1265
- readonly targetPx: number;
1421
+ private constructor();
1422
+ free(): void;
1423
+ [Symbol.dispose](): void;
1424
+ readonly alignment: string;
1425
+ readonly colorA: number;
1426
+ readonly colorB: number;
1427
+ readonly colorG: number;
1428
+ readonly colorR: number;
1429
+ readonly content: string;
1430
+ readonly dirX: number;
1431
+ readonly dirY: number;
1432
+ readonly expressId: number;
1433
+ readonly height: number;
1434
+ readonly ifcType: string;
1435
+ readonly repIdentifier: string;
1436
+ readonly targetPx: number;
1437
+ readonly worldY: number;
1438
+ readonly x: number;
1439
+ readonly y: number;
1266
1440
  }
1267
1441
 
1442
+ /**
1443
+ * `a - b`, keeping EVERY disjoint remnant.
1444
+ *
1445
+ * This is the operation the existing `subtract_2d` could not stand in for: it
1446
+ * returns one shape per island, where `subtract_2d` collapses to the largest
1447
+ * (correct for a single extrusion profile, silent geometry loss anywhere else).
1448
+ *
1449
+ * `b` may hold any number of rings; they subtract as their union, so there is
1450
+ * no separate "difference against many" entry point.
1451
+ */
1452
+ export function difference2d(a: Contours2D, b: Contours2D): Contours2D;
1453
+
1268
1454
  /**
1269
1455
  * Get WASM memory to allow JavaScript to create TypedArray views
1270
1456
  */
@@ -1278,6 +1464,11 @@ export function get_memory(): any;
1278
1464
  */
1279
1465
  export function init(): void;
1280
1466
 
1467
+ /**
1468
+ * `a ∩ b`.
1469
+ */
1470
+ export function intersection2d(a: Contours2D, b: Contours2D): Contours2D;
1471
+
1281
1472
  /**
1282
1473
  * Compute the winding-robust 2D footprint outline of a triangle mesh.
1283
1474
  *
@@ -1297,6 +1488,18 @@ export function init(): void;
1297
1488
  */
1298
1489
  export function meshOutline2d(positions: Float32Array, indices: Uint32Array, axis: number, flipped: boolean): MeshOutlineJs | undefined;
1299
1490
 
1491
+ /**
1492
+ * Resolve a ring soup into disjoint outer/hole shapes without changing the
1493
+ * area it covers (a self-union). Use it to give a hand-built set — or a
1494
+ * `meshOutline2d` result — the shape grouping the operations produce.
1495
+ */
1496
+ export function resolve2d(a: Contours2D): Contours2D;
1497
+
1498
+ /**
1499
+ * `a ∪ b`.
1500
+ */
1501
+ export function union2d(a: Contours2D, b: Contours2D): Contours2D;
1502
+
1300
1503
  /**
1301
1504
  * Get the version of IFC-Lite.
1302
1505
  *
@@ -1315,274 +1518,289 @@ export function version(): string;
1315
1518
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
1316
1519
 
1317
1520
  export interface InitOutput {
1318
- readonly memory: WebAssembly.Memory;
1319
- readonly __wbg_clashrunresult_free: (a: number, b: number) => void;
1320
- readonly __wbg_clashsession_free: (a: number, b: number) => void;
1321
- readonly __wbg_gridaxiscollection_free: (a: number, b: number) => void;
1322
- readonly __wbg_gridaxisjs_free: (a: number, b: number) => void;
1323
- readonly __wbg_ifcapi_free: (a: number, b: number) => void;
1324
- readonly __wbg_meshcollection_free: (a: number, b: number) => void;
1325
- readonly __wbg_meshdatajs_free: (a: number, b: number) => void;
1326
- readonly __wbg_meshoutlinejs_free: (a: number, b: number) => void;
1327
- readonly __wbg_partitionedbatch_free: (a: number, b: number) => void;
1328
- readonly __wbg_profilecollection_free: (a: number, b: number) => void;
1329
- readonly __wbg_profileentryjs_free: (a: number, b: number) => void;
1330
- readonly __wbg_simplifiedmeshes_free: (a: number, b: number) => void;
1331
- readonly __wbg_spaceplatehandle_free: (a: number, b: number) => void;
1332
- readonly __wbg_symboliccircle_free: (a: number, b: number) => void;
1333
- readonly __wbg_symbolicfillarea_free: (a: number, b: number) => void;
1334
- readonly __wbg_symbolicpolyline_free: (a: number, b: number) => void;
1335
- readonly __wbg_symbolicrepresentationcollection_free: (a: number, b: number) => void;
1336
- readonly __wbg_symbolictext_free: (a: number, b: number) => void;
1337
- readonly clashrunresult_a: (a: number, b: number) => void;
1338
- readonly clashrunresult_b: (a: number, b: number) => void;
1339
- readonly clashrunresult_bounds: (a: number, b: number) => void;
1340
- readonly clashrunresult_distance: (a: number, b: number) => void;
1341
- readonly clashrunresult_points: (a: number, b: number) => void;
1342
- readonly clashrunresult_status: (a: number, b: number) => void;
1343
- readonly clashsession_ingest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
1344
- readonly clashsession_new: () => number;
1345
- readonly clashsession_runRule: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
1346
- readonly gridaxiscollection_getAxis: (a: number, b: number) => number;
1347
- readonly gridaxiscollection_isEmpty: (a: number) => number;
1348
- readonly gridaxiscollection_length: (a: number) => number;
1349
- readonly gridaxisjs_axisId: (a: number) => number;
1350
- readonly gridaxisjs_end: (a: number) => number;
1351
- readonly gridaxisjs_gridId: (a: number) => number;
1352
- readonly gridaxisjs_start: (a: number) => number;
1353
- readonly gridaxisjs_tag: (a: number, b: number) => void;
1354
- readonly ifcapi_buildPrePassOnce: (a: number, b: number, c: number) => number;
1355
- readonly ifcapi_buildPrePassStreaming: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1356
- readonly ifcapi_buildPrePassStreamingSharded: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number) => void;
1357
- readonly ifcapi_clearPrePassCache: (a: number) => void;
1358
- readonly ifcapi_diagnoseGeometry: (a: number, b: number, c: number) => number;
1359
- readonly ifcapi_exportCsv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1360
- readonly ifcapi_exportGlb: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
1361
- readonly ifcapi_exportGlbFromMeshes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number) => void;
1362
- readonly ifcapi_exportHbjson: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1363
- readonly ifcapi_exportIfcx: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1364
- readonly ifcapi_exportJson: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1365
- readonly ifcapi_exportJsonld: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
1366
- readonly ifcapi_exportKmz: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => void;
1367
- readonly ifcapi_exportKmzFromMeshes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number) => void;
1368
- readonly ifcapi_exportMerged: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
1369
- readonly ifcapi_exportObj: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1370
- readonly ifcapi_exportStep: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
1371
- readonly ifcapi_extractProfiles: (a: number, b: number, c: number, d: number) => number;
1372
- readonly ifcapi_finalizePrepassStyles: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number) => void;
1373
- readonly ifcapi_getMemory: (a: number) => number;
1374
- readonly ifcapi_getPipelineDiagnostics: (a: number) => number;
1375
- readonly ifcapi_is_ready: (a: number) => number;
1376
- readonly ifcapi_new: () => number;
1377
- readonly ifcapi_parseAlignmentLines: (a: number, b: number, c: number) => number;
1378
- readonly ifcapi_parseGridAxes: (a: number, b: number, c: number) => number;
1379
- readonly ifcapi_parseGridLines: (a: number, b: number, c: number) => number;
1380
- readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
1381
- readonly ifcapi_processGeometryBatch: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number) => number;
1382
- readonly ifcapi_processGeometryBatchFromSource: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number) => number;
1383
- readonly ifcapi_processGeometryBatchInstanced: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number) => void;
1384
- readonly ifcapi_processGeometryBatchPartitioned: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number) => number;
1385
- readonly ifcapi_processGeometryBatchPartitionedFromSource: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number) => number;
1386
- readonly ifcapi_resolveStyledItemsShard: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1387
- readonly ifcapi_scanEntitiesFast: (a: number, b: number, c: number) => number;
1388
- readonly ifcapi_scanEntitiesFastBytes: (a: number, b: number, c: number) => number;
1389
- readonly ifcapi_scanEntityIndexShard: (a: number, b: number, c: number, d: number, e: number) => number;
1390
- readonly ifcapi_scanGeometryEntitiesFast: (a: number, b: number, c: number) => number;
1391
- readonly ifcapi_setComputeGeometryHashes: (a: number, b: number, c: number) => void;
1392
- readonly ifcapi_setEntityIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1393
- readonly ifcapi_setInstantiatedTypeIds: (a: number, b: number, c: number) => void;
1394
- readonly ifcapi_setMappedInstancePlan: (a: number, b: number, c: number) => void;
1395
- readonly ifcapi_setMaterialLayerIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => void;
1396
- readonly ifcapi_setMergeLayers: (a: number, b: number) => void;
1397
- readonly ifcapi_setRectParamFastPath: (a: number, b: number) => void;
1398
- readonly ifcapi_setReferencedRepmaps: (a: number, b: number, c: number) => void;
1399
- readonly ifcapi_setSkipSmallCuts: (a: number, b: number) => void;
1400
- readonly ifcapi_setSourceBytes: (a: number, b: number, c: number) => void;
1401
- readonly ifcapi_setTessellationQuality: (a: number, b: number, c: number, d: number) => void;
1402
- readonly ifcapi_simplifyMeshes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number) => void;
1403
- readonly ifcapi_version: (a: number, b: number) => void;
1404
- readonly meshOutline2d: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
1405
- readonly meshcollection_buildingRotation: (a: number, b: number) => void;
1406
- readonly meshcollection_diagnostics: (a: number) => number;
1407
- readonly meshcollection_geometryHashCount: (a: number) => number;
1408
- readonly meshcollection_geometryHashIds: (a: number) => number;
1409
- readonly meshcollection_geometryHashValues: (a: number) => number;
1410
- readonly meshcollection_get: (a: number, b: number) => number;
1411
- readonly meshcollection_hasRtcOffset: (a: number) => number;
1412
- readonly meshcollection_length: (a: number) => number;
1413
- readonly meshcollection_rtcOffsetX: (a: number) => number;
1414
- readonly meshcollection_rtcOffsetY: (a: number) => number;
1415
- readonly meshcollection_rtcOffsetZ: (a: number) => number;
1416
- readonly meshcollection_takeMesh: (a: number, b: number) => number;
1417
- readonly meshcollection_totalTriangles: (a: number) => number;
1418
- readonly meshcollection_totalVertices: (a: number) => number;
1419
- readonly meshdatajs_color: (a: number, b: number) => void;
1420
- readonly meshdatajs_expressId: (a: number) => number;
1421
- readonly meshdatajs_geometryClass: (a: number) => number;
1422
- readonly meshdatajs_hasTexture: (a: number) => number;
1423
- readonly meshdatajs_ifcType: (a: number, b: number) => void;
1424
- readonly meshdatajs_indices: (a: number) => number;
1425
- readonly meshdatajs_localBounds: (a: number, b: number) => void;
1426
- readonly meshdatajs_localToWorld: (a: number, b: number) => void;
1427
- readonly meshdatajs_normals: (a: number) => number;
1428
- readonly meshdatajs_origin: (a: number) => number;
1429
- readonly meshdatajs_positions: (a: number) => number;
1430
- readonly meshdatajs_shadingColor: (a: number, b: number) => void;
1431
- readonly meshdatajs_textureHeight: (a: number) => number;
1432
- readonly meshdatajs_textureId: (a: number) => number;
1433
- readonly meshdatajs_textureRepeatS: (a: number) => number;
1434
- readonly meshdatajs_textureRepeatT: (a: number) => number;
1435
- readonly meshdatajs_textureRgba: (a: number) => number;
1436
- readonly meshdatajs_textureUrl: (a: number, b: number) => void;
1437
- readonly meshdatajs_textureWidth: (a: number) => number;
1438
- readonly meshdatajs_triangleCount: (a: number) => number;
1439
- readonly meshdatajs_uvs: (a: number) => number;
1440
- readonly meshdatajs_vertexCount: (a: number) => number;
1441
- readonly meshoutlinejs_axisMax: (a: number) => number;
1442
- readonly meshoutlinejs_axisMin: (a: number) => number;
1443
- readonly meshoutlinejs_contour: (a: number, b: number) => number;
1444
- readonly meshoutlinejs_contourCount: (a: number) => number;
1445
- readonly partitionedbatch_instancedOccurrences: (a: number) => number;
1446
- readonly partitionedbatch_takeMeshes: (a: number) => number;
1447
- readonly partitionedbatch_takeShard: (a: number, b: number) => void;
1448
- readonly profilecollection_get: (a: number, b: number) => number;
1449
- readonly profilecollection_length: (a: number) => number;
1450
- readonly profileentryjs_expressId: (a: number) => number;
1451
- readonly profileentryjs_extrusionDepth: (a: number) => number;
1452
- readonly profileentryjs_extrusionDir: (a: number) => number;
1453
- readonly profileentryjs_holeCounts: (a: number) => number;
1454
- readonly profileentryjs_holePoints: (a: number) => number;
1455
- readonly profileentryjs_ifcType: (a: number, b: number) => void;
1456
- readonly profileentryjs_modelIndex: (a: number) => number;
1457
- readonly profileentryjs_outerPoints: (a: number) => number;
1458
- readonly profileentryjs_transform: (a: number) => number;
1459
- readonly simplifiedmeshes_cavitiesDropped: (a: number, b: number) => void;
1460
- readonly simplifiedmeshes_elementIds: (a: number, b: number) => void;
1461
- readonly simplifiedmeshes_indexCounts: (a: number, b: number) => void;
1462
- readonly simplifiedmeshes_levels: (a: number, b: number) => void;
1463
- readonly simplifiedmeshes_localIndices: (a: number, b: number) => void;
1464
- readonly simplifiedmeshes_localPositions: (a: number, b: number) => void;
1465
- readonly simplifiedmeshes_renderIndices: (a: number, b: number) => void;
1466
- readonly simplifiedmeshes_renderNormals: (a: number, b: number) => void;
1467
- readonly simplifiedmeshes_renderOrigins: (a: number, b: number) => void;
1468
- readonly simplifiedmeshes_renderPositions: (a: number, b: number) => void;
1469
- readonly simplifiedmeshes_skippedIds: (a: number, b: number) => void;
1470
- readonly simplifiedmeshes_skippedReasons: (a: number, b: number) => void;
1471
- readonly simplifiedmeshes_trisAfter: (a: number, b: number) => void;
1472
- readonly simplifiedmeshes_trisBefore: (a: number, b: number) => void;
1473
- readonly simplifiedmeshes_vertexCounts: (a: number, b: number) => void;
1474
- readonly spaceplatehandle_addFace: (a: number, b: number, c: number, d: number, e: number) => void;
1475
- readonly spaceplatehandle_boundingElements: (a: number, b: number, c: number) => void;
1476
- readonly spaceplatehandle_dissolveVertex: (a: number, b: number, c: number) => void;
1477
- readonly spaceplatehandle_dragVertex: (a: number, b: number, c: number, d: number, e: number) => void;
1478
- readonly spaceplatehandle_duplicate: (a: number) => number;
1479
- readonly spaceplatehandle_faceArea: (a: number, b: number) => number;
1480
- readonly spaceplatehandle_faceOutline: (a: number, b: number, c: number) => void;
1481
- readonly spaceplatehandle_findVertexNear: (a: number, b: number, c: number, d: number) => number;
1482
- readonly spaceplatehandle_fromWallRects: (a: number, b: number, c: number, d: number, e: number) => void;
1483
- readonly spaceplatehandle_gapBoundary: (a: number, b: number, c: number, d: number) => void;
1484
- readonly spaceplatehandle_mergeFaces: (a: number, b: number, c: number) => void;
1485
- readonly spaceplatehandle_neighborAcross: (a: number, b: number) => number;
1486
- readonly spaceplatehandle_netOutline: (a: number, b: number, c: number, d: number) => void;
1487
- readonly spaceplatehandle_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1488
- readonly spaceplatehandle_prune: (a: number) => number;
1489
- readonly spaceplatehandle_removeEdge: (a: number, b: number, c: number) => void;
1490
- readonly spaceplatehandle_roomCount: (a: number) => number;
1491
- readonly spaceplatehandle_roomIds: (a: number, b: number) => void;
1492
- readonly spaceplatehandle_setFaceHeight: (a: number, b: number, c: number, d: number, e: number) => void;
1493
- readonly spaceplatehandle_snapshot: (a: number, b: number) => void;
1494
- readonly spaceplatehandle_splitEdge: (a: number, b: number, c: number, d: number, e: number) => void;
1495
- readonly spaceplatehandle_splitFace: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1496
- readonly symboliccircle_centerX: (a: number) => number;
1497
- readonly symboliccircle_centerY: (a: number) => number;
1498
- readonly symboliccircle_endAngle: (a: number) => number;
1499
- readonly symboliccircle_expressId: (a: number) => number;
1500
- readonly symboliccircle_ifcType: (a: number, b: number) => void;
1501
- readonly symboliccircle_isFullCircle: (a: number) => number;
1502
- readonly symboliccircle_radius: (a: number) => number;
1503
- readonly symboliccircle_repIdentifier: (a: number, b: number) => void;
1504
- readonly symboliccircle_startAngle: (a: number) => number;
1505
- readonly symboliccircle_worldY: (a: number) => number;
1506
- readonly symbolicfillarea_fillA: (a: number) => number;
1507
- readonly symbolicfillarea_fillB: (a: number) => number;
1508
- readonly symbolicfillarea_fillG: (a: number) => number;
1509
- readonly symbolicfillarea_fillR: (a: number) => number;
1510
- readonly symbolicfillarea_hasHatching: (a: number) => number;
1511
- readonly symbolicfillarea_hatchAngle: (a: number) => number;
1512
- readonly symbolicfillarea_hatchAngleSecondary: (a: number) => number;
1513
- readonly symbolicfillarea_hatchLineWidth: (a: number) => number;
1514
- readonly symbolicfillarea_hatchSpacing: (a: number) => number;
1515
- readonly symbolicfillarea_holeCount: (a: number) => number;
1516
- readonly symbolicfillarea_holesOffsets: (a: number) => number;
1517
- readonly symbolicfillarea_ifcType: (a: number, b: number) => void;
1518
- readonly symbolicfillarea_pointCount: (a: number) => number;
1519
- readonly symbolicfillarea_points: (a: number) => number;
1520
- readonly symbolicfillarea_repIdentifier: (a: number, b: number) => void;
1521
- readonly symbolicfillarea_worldY: (a: number) => number;
1522
- readonly symbolicpolyline_expressId: (a: number) => number;
1523
- readonly symbolicpolyline_ifcType: (a: number, b: number) => void;
1524
- readonly symbolicpolyline_isClosed: (a: number) => number;
1525
- readonly symbolicpolyline_points: (a: number) => number;
1526
- readonly symbolicpolyline_repIdentifier: (a: number, b: number) => void;
1527
- readonly symbolicrepresentationcollection_circleCount: (a: number) => number;
1528
- readonly symbolicrepresentationcollection_fillCount: (a: number) => number;
1529
- readonly symbolicrepresentationcollection_getCircle: (a: number, b: number) => number;
1530
- readonly symbolicrepresentationcollection_getExpressIds: (a: number, b: number) => void;
1531
- readonly symbolicrepresentationcollection_getFill: (a: number, b: number) => number;
1532
- readonly symbolicrepresentationcollection_getPolyline: (a: number, b: number) => number;
1533
- readonly symbolicrepresentationcollection_getText: (a: number, b: number) => number;
1534
- readonly symbolicrepresentationcollection_isEmpty: (a: number) => number;
1535
- readonly symbolicrepresentationcollection_polylineCount: (a: number) => number;
1536
- readonly symbolicrepresentationcollection_textCount: (a: number) => number;
1537
- readonly symbolicrepresentationcollection_totalCount: (a: number) => number;
1538
- readonly symbolictext_alignment: (a: number, b: number) => void;
1539
- readonly symbolictext_colorA: (a: number) => number;
1540
- readonly symbolictext_content: (a: number, b: number) => void;
1541
- readonly symbolictext_ifcType: (a: number, b: number) => void;
1542
- readonly symbolictext_repIdentifier: (a: number, b: number) => void;
1543
- readonly symbolictext_targetPx: (a: number) => number;
1544
- readonly version: (a: number) => void;
1545
- readonly init: () => void;
1546
- readonly symbolicpolyline_pointCount: (a: number) => number;
1547
- readonly get_memory: () => number;
1548
- readonly symbolicfillarea_expressId: (a: number) => number;
1549
- readonly symbolicpolyline_worldY: (a: number) => number;
1550
- readonly symbolictext_colorB: (a: number) => number;
1551
- readonly symbolictext_colorG: (a: number) => number;
1552
- readonly symbolictext_colorR: (a: number) => number;
1553
- readonly symbolictext_dirX: (a: number) => number;
1554
- readonly symbolictext_dirY: (a: number) => number;
1555
- readonly symbolictext_expressId: (a: number) => number;
1556
- readonly symbolictext_height: (a: number) => number;
1557
- readonly symbolictext_worldY: (a: number) => number;
1558
- readonly symbolictext_x: (a: number) => number;
1559
- readonly symbolictext_y: (a: number) => number;
1560
- readonly __wbindgen_export: (a: number, b: number) => number;
1561
- readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
1562
- readonly __wbindgen_export3: (a: number) => void;
1563
- readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
1564
- readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
1565
- readonly __wbindgen_start: () => void;
1521
+ readonly memory: WebAssembly.Memory;
1522
+ readonly __wbg_clashrunresult_free: (a: number, b: number) => void;
1523
+ readonly __wbg_clashsession_free: (a: number, b: number) => void;
1524
+ readonly __wbg_contours2d_free: (a: number, b: number) => void;
1525
+ readonly __wbg_gridaxiscollection_free: (a: number, b: number) => void;
1526
+ readonly __wbg_gridaxisjs_free: (a: number, b: number) => void;
1527
+ readonly __wbg_ifcapi_free: (a: number, b: number) => void;
1528
+ readonly __wbg_meshcollection_free: (a: number, b: number) => void;
1529
+ readonly __wbg_meshdatajs_free: (a: number, b: number) => void;
1530
+ readonly __wbg_meshoutlinejs_free: (a: number, b: number) => void;
1531
+ readonly __wbg_partitionedbatch_free: (a: number, b: number) => void;
1532
+ readonly __wbg_profilecollection_free: (a: number, b: number) => void;
1533
+ readonly __wbg_profileentryjs_free: (a: number, b: number) => void;
1534
+ readonly __wbg_simplifiedmeshes_free: (a: number, b: number) => void;
1535
+ readonly __wbg_spaceplatehandle_free: (a: number, b: number) => void;
1536
+ readonly __wbg_symboliccircle_free: (a: number, b: number) => void;
1537
+ readonly __wbg_symbolicfillarea_free: (a: number, b: number) => void;
1538
+ readonly __wbg_symbolicpolyline_free: (a: number, b: number) => void;
1539
+ readonly __wbg_symbolicrepresentationcollection_free: (a: number, b: number) => void;
1540
+ readonly __wbg_symbolictext_free: (a: number, b: number) => void;
1541
+ readonly clashrunresult_a: (a: number, b: number) => void;
1542
+ readonly clashrunresult_b: (a: number, b: number) => void;
1543
+ readonly clashrunresult_bounds: (a: number, b: number) => void;
1544
+ readonly clashrunresult_distance: (a: number, b: number) => void;
1545
+ readonly clashrunresult_points: (a: number, b: number) => void;
1546
+ readonly clashrunresult_status: (a: number, b: number) => void;
1547
+ readonly clashsession_ingest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
1548
+ readonly clashsession_new: () => number;
1549
+ readonly clashsession_runRule: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
1550
+ readonly contours2d_bounds: (a: number) => number;
1551
+ readonly contours2d_coords: (a: number) => number;
1552
+ readonly contours2d_fromMeshOutline: (a: number) => number;
1553
+ readonly contours2d_isEmpty: (a: number) => number;
1554
+ readonly contours2d_new: (a: number, b: number, c: number, d: number, e: number) => void;
1555
+ readonly contours2d_ring: (a: number, b: number) => number;
1556
+ readonly contours2d_ringCount: (a: number) => number;
1557
+ readonly contours2d_ringLengths: (a: number) => number;
1558
+ readonly contours2d_shapeCount: (a: number) => number;
1559
+ readonly contours2d_shapeOffsets: (a: number) => number;
1560
+ readonly difference2d: (a: number, b: number) => number;
1561
+ readonly gridaxiscollection_getAxis: (a: number, b: number) => number;
1562
+ readonly gridaxiscollection_isEmpty: (a: number) => number;
1563
+ readonly gridaxiscollection_length: (a: number) => number;
1564
+ readonly gridaxisjs_axisId: (a: number) => number;
1565
+ readonly gridaxisjs_end: (a: number) => number;
1566
+ readonly gridaxisjs_gridId: (a: number) => number;
1567
+ readonly gridaxisjs_start: (a: number) => number;
1568
+ readonly gridaxisjs_tag: (a: number, b: number) => void;
1569
+ readonly ifcapi_buildPrePassOnce: (a: number, b: number, c: number) => number;
1570
+ readonly ifcapi_buildPrePassStreaming: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1571
+ readonly ifcapi_buildPrePassStreamingSharded: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number) => void;
1572
+ readonly ifcapi_clearPrePassCache: (a: number) => void;
1573
+ readonly ifcapi_diagnoseGeometry: (a: number, b: number, c: number) => number;
1574
+ readonly ifcapi_exportCsv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1575
+ readonly ifcapi_exportGlb: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
1576
+ readonly ifcapi_exportGlbFromMeshes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number) => void;
1577
+ readonly ifcapi_exportHbjson: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1578
+ readonly ifcapi_exportIfcx: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1579
+ readonly ifcapi_exportJson: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1580
+ readonly ifcapi_exportJsonld: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
1581
+ readonly ifcapi_exportKmz: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => void;
1582
+ readonly ifcapi_exportKmzFromMeshes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number) => void;
1583
+ readonly ifcapi_exportMerged: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
1584
+ readonly ifcapi_exportObj: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1585
+ readonly ifcapi_exportStep: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
1586
+ readonly ifcapi_extractProfiles: (a: number, b: number, c: number, d: number) => number;
1587
+ readonly ifcapi_finalizePrepassStyles: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number) => void;
1588
+ readonly ifcapi_getMemory: (a: number) => number;
1589
+ readonly ifcapi_getPipelineDiagnostics: (a: number) => number;
1590
+ readonly ifcapi_is_ready: (a: number) => number;
1591
+ readonly ifcapi_new: () => number;
1592
+ readonly ifcapi_parseAlignmentLines: (a: number, b: number, c: number) => number;
1593
+ readonly ifcapi_parseGridAxes: (a: number, b: number, c: number) => number;
1594
+ readonly ifcapi_parseGridLines: (a: number, b: number, c: number) => number;
1595
+ readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
1596
+ readonly ifcapi_processGeometryBatch: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number) => number;
1597
+ readonly ifcapi_processGeometryBatchFromSource: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number) => number;
1598
+ readonly ifcapi_processGeometryBatchInstanced: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number) => void;
1599
+ readonly ifcapi_processGeometryBatchPartitioned: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number) => number;
1600
+ readonly ifcapi_processGeometryBatchPartitionedFromSource: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number) => number;
1601
+ readonly ifcapi_resolveStyledItemsShard: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1602
+ readonly ifcapi_scanEntitiesFast: (a: number, b: number, c: number) => number;
1603
+ readonly ifcapi_scanEntitiesFastBytes: (a: number, b: number, c: number) => number;
1604
+ readonly ifcapi_scanEntityIndexShard: (a: number, b: number, c: number, d: number, e: number) => number;
1605
+ readonly ifcapi_scanGeometryEntitiesFast: (a: number, b: number, c: number) => number;
1606
+ readonly ifcapi_setComputeGeometryHashes: (a: number, b: number, c: number) => void;
1607
+ readonly ifcapi_setEntityIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1608
+ readonly ifcapi_setInstantiatedTypeIds: (a: number, b: number, c: number) => void;
1609
+ readonly ifcapi_setMappedInstancePlan: (a: number, b: number, c: number) => void;
1610
+ readonly ifcapi_setMaterialLayerIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => void;
1611
+ readonly ifcapi_setMergeLayers: (a: number, b: number) => void;
1612
+ readonly ifcapi_setRectParamFastPath: (a: number, b: number) => void;
1613
+ readonly ifcapi_setReferencedRepmaps: (a: number, b: number, c: number) => void;
1614
+ readonly ifcapi_setSkipSmallCuts: (a: number, b: number) => void;
1615
+ readonly ifcapi_setSourceBytes: (a: number, b: number, c: number) => void;
1616
+ readonly ifcapi_setTessellationQuality: (a: number, b: number, c: number, d: number) => void;
1617
+ readonly ifcapi_simplifyMeshes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number) => void;
1618
+ readonly ifcapi_version: (a: number, b: number) => void;
1619
+ readonly intersection2d: (a: number, b: number) => number;
1620
+ readonly meshOutline2d: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
1621
+ readonly meshcollection_buildingRotation: (a: number, b: number) => void;
1622
+ readonly meshcollection_diagnostics: (a: number) => number;
1623
+ readonly meshcollection_geometryHashCount: (a: number) => number;
1624
+ readonly meshcollection_geometryHashIds: (a: number) => number;
1625
+ readonly meshcollection_geometryHashValues: (a: number) => number;
1626
+ readonly meshcollection_get: (a: number, b: number) => number;
1627
+ readonly meshcollection_hasRtcOffset: (a: number) => number;
1628
+ readonly meshcollection_length: (a: number) => number;
1629
+ readonly meshcollection_rtcOffsetX: (a: number) => number;
1630
+ readonly meshcollection_rtcOffsetY: (a: number) => number;
1631
+ readonly meshcollection_rtcOffsetZ: (a: number) => number;
1632
+ readonly meshcollection_takeMesh: (a: number, b: number) => number;
1633
+ readonly meshcollection_totalTriangles: (a: number) => number;
1634
+ readonly meshcollection_totalVertices: (a: number) => number;
1635
+ readonly meshdatajs_color: (a: number, b: number) => void;
1636
+ readonly meshdatajs_expressId: (a: number) => number;
1637
+ readonly meshdatajs_geometryClass: (a: number) => number;
1638
+ readonly meshdatajs_hasTexture: (a: number) => number;
1639
+ readonly meshdatajs_ifcType: (a: number, b: number) => void;
1640
+ readonly meshdatajs_indices: (a: number) => number;
1641
+ readonly meshdatajs_localBounds: (a: number, b: number) => void;
1642
+ readonly meshdatajs_localToWorld: (a: number, b: number) => void;
1643
+ readonly meshdatajs_normals: (a: number) => number;
1644
+ readonly meshdatajs_origin: (a: number) => number;
1645
+ readonly meshdatajs_positions: (a: number) => number;
1646
+ readonly meshdatajs_shadingColor: (a: number, b: number) => void;
1647
+ readonly meshdatajs_textureHeight: (a: number) => number;
1648
+ readonly meshdatajs_textureId: (a: number) => number;
1649
+ readonly meshdatajs_textureRepeatS: (a: number) => number;
1650
+ readonly meshdatajs_textureRepeatT: (a: number) => number;
1651
+ readonly meshdatajs_textureRgba: (a: number) => number;
1652
+ readonly meshdatajs_textureUrl: (a: number, b: number) => void;
1653
+ readonly meshdatajs_textureWidth: (a: number) => number;
1654
+ readonly meshdatajs_triangleCount: (a: number) => number;
1655
+ readonly meshdatajs_uvs: (a: number) => number;
1656
+ readonly meshdatajs_vertexCount: (a: number) => number;
1657
+ readonly meshoutlinejs_axisMax: (a: number) => number;
1658
+ readonly meshoutlinejs_axisMin: (a: number) => number;
1659
+ readonly meshoutlinejs_contour: (a: number, b: number) => number;
1660
+ readonly partitionedbatch_instancedOccurrences: (a: number) => number;
1661
+ readonly partitionedbatch_takeMeshes: (a: number) => number;
1662
+ readonly partitionedbatch_takeShard: (a: number, b: number) => void;
1663
+ readonly profilecollection_get: (a: number, b: number) => number;
1664
+ readonly profilecollection_length: (a: number) => number;
1665
+ readonly profileentryjs_expressId: (a: number) => number;
1666
+ readonly profileentryjs_extrusionDepth: (a: number) => number;
1667
+ readonly profileentryjs_extrusionDir: (a: number) => number;
1668
+ readonly profileentryjs_holeCounts: (a: number) => number;
1669
+ readonly profileentryjs_holePoints: (a: number) => number;
1670
+ readonly profileentryjs_ifcType: (a: number, b: number) => void;
1671
+ readonly profileentryjs_modelIndex: (a: number) => number;
1672
+ readonly profileentryjs_outerPoints: (a: number) => number;
1673
+ readonly profileentryjs_transform: (a: number) => number;
1674
+ readonly resolve2d: (a: number) => number;
1675
+ readonly simplifiedmeshes_cavitiesDropped: (a: number, b: number) => void;
1676
+ readonly simplifiedmeshes_elementIds: (a: number, b: number) => void;
1677
+ readonly simplifiedmeshes_indexCounts: (a: number, b: number) => void;
1678
+ readonly simplifiedmeshes_levels: (a: number, b: number) => void;
1679
+ readonly simplifiedmeshes_localIndices: (a: number, b: number) => void;
1680
+ readonly simplifiedmeshes_localPositions: (a: number, b: number) => void;
1681
+ readonly simplifiedmeshes_renderIndices: (a: number, b: number) => void;
1682
+ readonly simplifiedmeshes_renderNormals: (a: number, b: number) => void;
1683
+ readonly simplifiedmeshes_renderOrigins: (a: number, b: number) => void;
1684
+ readonly simplifiedmeshes_renderPositions: (a: number, b: number) => void;
1685
+ readonly simplifiedmeshes_skippedIds: (a: number, b: number) => void;
1686
+ readonly simplifiedmeshes_skippedReasons: (a: number, b: number) => void;
1687
+ readonly simplifiedmeshes_trisAfter: (a: number, b: number) => void;
1688
+ readonly simplifiedmeshes_trisBefore: (a: number, b: number) => void;
1689
+ readonly simplifiedmeshes_vertexCounts: (a: number, b: number) => void;
1690
+ readonly spaceplatehandle_addFace: (a: number, b: number, c: number, d: number, e: number) => void;
1691
+ readonly spaceplatehandle_boundingElements: (a: number, b: number, c: number) => void;
1692
+ readonly spaceplatehandle_dissolveVertex: (a: number, b: number, c: number) => void;
1693
+ readonly spaceplatehandle_dragVertex: (a: number, b: number, c: number, d: number, e: number) => void;
1694
+ readonly spaceplatehandle_duplicate: (a: number) => number;
1695
+ readonly spaceplatehandle_faceArea: (a: number, b: number) => number;
1696
+ readonly spaceplatehandle_faceOutline: (a: number, b: number, c: number) => void;
1697
+ readonly spaceplatehandle_findVertexNear: (a: number, b: number, c: number, d: number) => number;
1698
+ readonly spaceplatehandle_fromWallRects: (a: number, b: number, c: number, d: number, e: number) => void;
1699
+ readonly spaceplatehandle_gapBoundary: (a: number, b: number, c: number, d: number) => void;
1700
+ readonly spaceplatehandle_mergeFaces: (a: number, b: number, c: number) => void;
1701
+ readonly spaceplatehandle_neighborAcross: (a: number, b: number) => number;
1702
+ readonly spaceplatehandle_netOutline: (a: number, b: number, c: number, d: number) => void;
1703
+ readonly spaceplatehandle_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1704
+ readonly spaceplatehandle_prune: (a: number) => number;
1705
+ readonly spaceplatehandle_removeEdge: (a: number, b: number, c: number) => void;
1706
+ readonly spaceplatehandle_roomCount: (a: number) => number;
1707
+ readonly spaceplatehandle_roomIds: (a: number, b: number) => void;
1708
+ readonly spaceplatehandle_setFaceHeight: (a: number, b: number, c: number, d: number, e: number) => void;
1709
+ readonly spaceplatehandle_snapshot: (a: number, b: number) => void;
1710
+ readonly spaceplatehandle_splitEdge: (a: number, b: number, c: number, d: number, e: number) => void;
1711
+ readonly spaceplatehandle_splitFace: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1712
+ readonly symboliccircle_centerX: (a: number) => number;
1713
+ readonly symboliccircle_centerY: (a: number) => number;
1714
+ readonly symboliccircle_endAngle: (a: number) => number;
1715
+ readonly symboliccircle_expressId: (a: number) => number;
1716
+ readonly symboliccircle_ifcType: (a: number, b: number) => void;
1717
+ readonly symboliccircle_isFullCircle: (a: number) => number;
1718
+ readonly symboliccircle_radius: (a: number) => number;
1719
+ readonly symboliccircle_repIdentifier: (a: number, b: number) => void;
1720
+ readonly symboliccircle_startAngle: (a: number) => number;
1721
+ readonly symboliccircle_worldY: (a: number) => number;
1722
+ readonly symbolicfillarea_fillA: (a: number) => number;
1723
+ readonly symbolicfillarea_fillB: (a: number) => number;
1724
+ readonly symbolicfillarea_fillG: (a: number) => number;
1725
+ readonly symbolicfillarea_fillR: (a: number) => number;
1726
+ readonly symbolicfillarea_hasHatching: (a: number) => number;
1727
+ readonly symbolicfillarea_hatchAngle: (a: number) => number;
1728
+ readonly symbolicfillarea_hatchAngleSecondary: (a: number) => number;
1729
+ readonly symbolicfillarea_hatchLineWidth: (a: number) => number;
1730
+ readonly symbolicfillarea_hatchSpacing: (a: number) => number;
1731
+ readonly symbolicfillarea_holeCount: (a: number) => number;
1732
+ readonly symbolicfillarea_holesOffsets: (a: number) => number;
1733
+ readonly symbolicfillarea_ifcType: (a: number, b: number) => void;
1734
+ readonly symbolicfillarea_pointCount: (a: number) => number;
1735
+ readonly symbolicfillarea_points: (a: number) => number;
1736
+ readonly symbolicfillarea_repIdentifier: (a: number, b: number) => void;
1737
+ readonly symbolicfillarea_worldY: (a: number) => number;
1738
+ readonly symbolicpolyline_expressId: (a: number) => number;
1739
+ readonly symbolicpolyline_ifcType: (a: number, b: number) => void;
1740
+ readonly symbolicpolyline_isClosed: (a: number) => number;
1741
+ readonly symbolicpolyline_points: (a: number) => number;
1742
+ readonly symbolicpolyline_repIdentifier: (a: number, b: number) => void;
1743
+ readonly symbolicrepresentationcollection_circleCount: (a: number) => number;
1744
+ readonly symbolicrepresentationcollection_fillCount: (a: number) => number;
1745
+ readonly symbolicrepresentationcollection_getCircle: (a: number, b: number) => number;
1746
+ readonly symbolicrepresentationcollection_getExpressIds: (a: number, b: number) => void;
1747
+ readonly symbolicrepresentationcollection_getFill: (a: number, b: number) => number;
1748
+ readonly symbolicrepresentationcollection_getPolyline: (a: number, b: number) => number;
1749
+ readonly symbolicrepresentationcollection_getText: (a: number, b: number) => number;
1750
+ readonly symbolicrepresentationcollection_isEmpty: (a: number) => number;
1751
+ readonly symbolicrepresentationcollection_polylineCount: (a: number) => number;
1752
+ readonly symbolicrepresentationcollection_textCount: (a: number) => number;
1753
+ readonly symbolicrepresentationcollection_totalCount: (a: number) => number;
1754
+ readonly symbolictext_alignment: (a: number, b: number) => void;
1755
+ readonly symbolictext_colorA: (a: number) => number;
1756
+ readonly symbolictext_content: (a: number, b: number) => void;
1757
+ readonly symbolictext_ifcType: (a: number, b: number) => void;
1758
+ readonly symbolictext_repIdentifier: (a: number, b: number) => void;
1759
+ readonly symbolictext_targetPx: (a: number) => number;
1760
+ readonly union2d: (a: number, b: number) => number;
1761
+ readonly version: (a: number) => void;
1762
+ readonly init: () => void;
1763
+ readonly meshoutlinejs_contourCount: (a: number) => number;
1764
+ readonly symbolicpolyline_pointCount: (a: number) => number;
1765
+ readonly get_memory: () => number;
1766
+ readonly symbolicfillarea_expressId: (a: number) => number;
1767
+ readonly symbolicpolyline_worldY: (a: number) => number;
1768
+ readonly symbolictext_colorB: (a: number) => number;
1769
+ readonly symbolictext_colorG: (a: number) => number;
1770
+ readonly symbolictext_colorR: (a: number) => number;
1771
+ readonly symbolictext_dirX: (a: number) => number;
1772
+ readonly symbolictext_dirY: (a: number) => number;
1773
+ readonly symbolictext_expressId: (a: number) => number;
1774
+ readonly symbolictext_height: (a: number) => number;
1775
+ readonly symbolictext_worldY: (a: number) => number;
1776
+ readonly symbolictext_x: (a: number) => number;
1777
+ readonly symbolictext_y: (a: number) => number;
1778
+ readonly __wbindgen_export: (a: number, b: number) => number;
1779
+ readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
1780
+ readonly __wbindgen_export3: (a: number) => void;
1781
+ readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
1782
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
1783
+ readonly __wbindgen_start: () => void;
1566
1784
  }
1567
1785
 
1568
1786
  export type SyncInitInput = BufferSource | WebAssembly.Module;
1569
1787
 
1570
1788
  /**
1571
- * Instantiates the given `module`, which can either be bytes or
1572
- * a precompiled `WebAssembly.Module`.
1573
- *
1574
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
1575
- *
1576
- * @returns {InitOutput}
1577
- */
1789
+ * Instantiates the given `module`, which can either be bytes or
1790
+ * a precompiled `WebAssembly.Module`.
1791
+ *
1792
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
1793
+ *
1794
+ * @returns {InitOutput}
1795
+ */
1578
1796
  export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
1579
1797
 
1580
1798
  /**
1581
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
1582
- * for everything else, calls `WebAssembly.instantiate` directly.
1583
- *
1584
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
1585
- *
1586
- * @returns {Promise<InitOutput>}
1587
- */
1799
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
1800
+ * for everything else, calls `WebAssembly.instantiate` directly.
1801
+ *
1802
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
1803
+ *
1804
+ * @returns {Promise<InitOutput>}
1805
+ */
1588
1806
  export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;