@ifc-lite/wasm 10.4.0 → 10.6.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.
@@ -0,0 +1,3075 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /** Every field is optional; absent or `undefined` means the default. Unknown fields and non-finite numbers are refused. Lengths in metres; pass plane coordinates local to the slab (f32 input). */
5
+ export interface ScanOutlineOptionsJs {
6
+ /** Fixed cell edge; omit to pick it from the point density between minCellSize and maxCellSize. */
7
+ cellSize?: number;
8
+ /** Default 0.02, at least 0.001. */ minCellSize?: number;
9
+ /** Default 0.05. */ maxCellSize?: number;
10
+ /** Adaptive cells grow until the median occupied cell holds this many points. Default 6. */
11
+ targetPointsPerCell?: number;
12
+ /** Cell budget for the padded grid, from (2·pad + 1)² (81 with the defaults) up to 67108864. Default 16777216; hitting it sets diagnostics.cellCapHit. */
13
+ maxCells?: number;
14
+ /** Default 1. */ minPointsPerCell?: number;
15
+ /** A cell is occupied from this fraction of the median occupied-cell count. Default 0.25. */
16
+ noiseFraction?: number;
17
+ /** Widest gap the closing bridges, about a wall thickness; clamped to 0.5. Default 0.3. */
18
+ maxGap?: number;
19
+ /** Speckle opening radius in cells (0 disables). Default 1. */ openRadiusCells?: number;
20
+ /** Solid components below this area (m²) are dropped. Default 0.02. */ minComponentArea?: number;
21
+ /** Enclosed holes below this area (m²) are filled. Default 0.5. */ minHoleArea?: number;
22
+ /** Douglas-Peucker tolerance in cells. Default 1.5. */ simplifyToleranceCells?: number;
23
+ /** Refit edges to the points. Default true. */ snap?: boolean;
24
+ /** Evidence band beside an edge, in cells (at most 16). Default 3. */ snapDistanceCells?: number;
25
+ /** Fewest points to refit an edge. Default 8. */ minSnapPoints?: number;
26
+ /** Largest squaring move, in cells (at most 32). Default 4. */ maxVertexMoveCells?: number;
27
+ /** Square edges to the dominant direction. Default true. */ square?: boolean;
28
+ /** Default 3. */ squareAngleToleranceDeg?: number;
29
+ /** Squares edges whose ends move at most this far. Default 0.03. */ squareOffsetTolerance?: number;
30
+ }
31
+ /** world = origin + u * uAxis + v * vAxis */
32
+ export interface ScanOutlinePlaneFrameJs {
33
+ origin: [number, number, number];
34
+ uAxis: [number, number, number];
35
+ vAxis: [number, number, number];
36
+ }
37
+ export interface ScanOutlineDiagnosticsJs {
38
+ inputPoints: number; usedPoints: number; nonFinitePoints: number; outlierPoints: number;
39
+ cellSize: number; gridWidth: number; gridHeight: number;
40
+ cellCapHit: boolean; maxGapClamped: boolean; countThreshold: number;
41
+ /** f32 step at the largest input coordinate; `coordinatePrecisionDegraded` when above a tenth of a cell. Pass coordinates local to the slab. */
42
+ coordinateSpacingMetres: number; coordinatePrecisionDegraded: boolean;
43
+ occupiedCells: number; solidCells: number; componentsDropped: number; holesFilled: number;
44
+ ringCount: number; outerRingCount: number; holeRingCount: number; vertexCount: number;
45
+ simplifyReinsertions: number; snappedEdges: number;
46
+ /** Degrees in [0, 90); absent when no edge was long enough to tell. */
47
+ dominantAngleDeg?: number;
48
+ squaredEdges: number; revertedMoves: number;
49
+ }
50
+
51
+
52
+
53
+ /** Exact browser mesh RTC frame, in IFC Z-up metres. */
54
+ export interface RtcFrame {
55
+ x: number;
56
+ y: number;
57
+ z: number;
58
+ needsShift: boolean;
59
+ }
60
+
61
+
62
+
63
+ export interface LandXmlTerrainOptionsJs {
64
+ /** `YYYY-MM-DD`, the required `LandXML@date`; the caller owns the clock. */
65
+ date: string;
66
+ /** `HH:MM:SS`, the required `LandXML@time`. */
67
+ time: string;
68
+ /** Default `'metre'`. US survey feet write elevations in international feet (LandXML 1.2 has no US-survey-foot elevation unit); both are declared. */
69
+ linearUnit?: 'metre' | 'internationalFoot' | 'usSurveyFoot';
70
+ /** Decimal places in the written unit, 0 to 9. Default 6. */
71
+ decimals?: number;
72
+ /** `Surface@name` per product; a blank name keeps the IFC name. */
73
+ surfaceNames?: { productId: number; name: string }[];
74
+ }
75
+
76
+
77
+
78
+ export interface LandXmlTinDocumentJs {
79
+ format: "landxml";
80
+ schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2";
81
+ capabilities: { renderable_tin: boolean; preserved_only_surfaces: number; unknown_extensions: number };
82
+ version: string;
83
+ /** serde_wasm_bindgen omits an absent Rust Option field rather than serializing null. `assumed` is true only when these units came from `LandXmlParseOptionsJs.assumedLinearUnit`, never from a declared LandXML/Units element (#5175). */
84
+ units?: { linear_unit: string; elevation_unit: string; linear_scale_to_meters: number; elevation_scale_to_meters: number; assumed: boolean };
85
+ surfaces: LandXmlSurfaceJs[];
86
+ pipe_networks?: LandXmlPipeNetworkDocumentJs;
87
+ extensions: LandXmlExtensionJs[];
88
+ warnings: string[];
89
+ alignments: LandXmlAlignmentSummaryJs[]; profiles: LandXmlProfileJs[];
90
+ cross_sections: LandXmlCrossSectionJs[]; cross_section_surfaces: LandXmlCrossSectionSurfaceJs[];
91
+ roadways: LandXmlRoadwayJs[]; capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
92
+ preserved_only_extensions: LandXmlPreservedOnlyExtensionJs[];
93
+ /** COGO, parcel and plan-feature records from the same source bytes. */
94
+ plan: LandXmlPlanDocumentJs;
95
+ }
96
+ export interface LandXmlPlanDocumentJs {
97
+ schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2"; version: string;
98
+ capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
99
+ area_unit?: string; area_scale_to_square_meters?: number;
100
+ cogo_points: LandXmlCgPointJs[]; monuments: LandXmlMonumentJs[];
101
+ plan_features: LandXmlPlanFeatureJs[]; parcels: LandXmlParcelJs[]; warnings: string[];
102
+ source_batches: LandXmlPlanSourceBatchJs[]; parcel_probes: LandXmlParcelProbeJs[];
103
+ resolved_monuments: LandXmlResolvedMonumentJs[]; resolved_geometry: LandXmlResolvedGeometryJs[];
104
+ }
105
+ export interface LandXmlPlanSourceBatchJs { source_ids: string[]; }
106
+ export interface LandXmlParcelProbeJs { source_id: string; state: { kind: "analytic" } | { kind: "preserved_only"; reason: string }; perimeter_in_declared_linear_units?: number; area_in_declared_square_units?: number; declared_area?: number; declared_perimeter?: number; perimeter_in_meters?: number; area_in_square_meters?: number; }
107
+ export interface LandXmlResolvedMonumentJs { source_id: string; point?: LandXmlPlanPointJs; }
108
+ export interface LandXmlResolvedGeometryJs { source_id: string; start?: LandXmlPlanPointJs; end?: LandXmlPlanPointJs; center?: LandXmlPlanPointJs; pi?: LandXmlPlanPointJs; }
109
+ export interface LandXmlPlanPointJs { northing: number; easting: number; elevation?: number; }
110
+ export interface LandXmlCgPointJs { source_id: string; scope_id: string; ordinal: number; name?: string; code?: string; description?: string; point?: LandXmlPlanPointJs; pnt_ref?: string; properties: Record<string, string>; }
111
+ export interface LandXmlMonumentJs { source_id: string; point_scope_id?: string; ordinal: number; name?: string; code?: string; description?: string; pnt_ref?: string; point?: LandXmlPlanPointJs; properties: Record<string, string>; }
112
+ export interface LandXmlPlanFeatureJs { source_id: string; ordinal: number; name?: string; code?: string; description?: string; properties: Record<string, string>; locations: LandXmlPlanPointLocationJs[]; geometry: LandXmlPlanGeometryJs[]; }
113
+ export interface LandXmlParcelJs { source_id: string; ordinal: number; name?: string; code?: string; description?: string; title?: string; declared_area?: number; declared_perimeter?: number; declared_area_unit?: string; properties: Record<string, string>; loops: LandXmlPlanGeometryJs[][]; preservation_reason?: string; }
114
+ export interface LandXmlPlanGeometryJs { source_id: string; ordinal: number; kind: "line" | "curve" | "irregular_line"; point_scope_id?: string; start: LandXmlPlanPointLocationJs; end: LandXmlPlanPointLocationJs; center?: LandXmlPlanPointLocationJs; pi?: LandXmlPlanPointLocationJs; intermediate_points: LandXmlPlanPointJs[]; rotation?: string; radius?: number; declared_length?: number; properties: Record<string, string>; }
115
+ export type LandXmlPlanPointLocationJs = { kind: "coordinates"; point: LandXmlPlanPointJs; pnt_ref?: string } | { kind: "point_reference"; pnt_ref: string };
116
+ export interface LandXmlSurfaceJs {
117
+ source_id: string; ordinal: number; source_path: string;
118
+ properties: Record<string, string>; definition_properties: Record<string, string>;
119
+ name: string; kind: "tin" | "grid" | "volume" | "other";
120
+ render_state: "rendered" | "preserved_only" | "unsupported";
121
+ topology_origin: "authored_faces" | "constrained_triangulation" | "preserved_only";
122
+ terrain_diagnostic?: { code: "missing_outer_boundary" | "unsupported_boundary_semantics" | "unsupported_breakline_semantics" | "missing_elevation" | "conflicting_elevation" | "intersecting_constraints" | "degenerate_constraints" | "work_limit_exceeded" | "cancelled"; message: string };
123
+ points: LandXmlPointJs[]; canonical_vertices: LandXmlCanonicalVertexJs[]; source_data_points: LandXmlSourcePointJs[];
124
+ faces: [string, string, string][]; face_source_ids: string[]; face_visibility: boolean[];
125
+ hidden_face_count: number; boundaries: LandXmlPolylineJs[]; breaklines: LandXmlPolylineJs[]; contours: LandXmlPolylineJs[];
126
+ }
127
+ export interface LandXmlPointJs { source_id: string; id: string; northing: number; easting: number; elevation: number; }
128
+ export interface LandXmlCanonicalVertexJs { id: string; northing: number; easting: number; elevation: number; contributor_source_ids: string[]; }
129
+ export interface LandXmlSourcePointJs { source_id: string; ordinal: number; source_path: string; coordinate_dimension: 2 | 3; coordinates: number[]; }
130
+ /** serde_wasm_bindgen omits absent Rust Option fields rather than serializing null. */
131
+ export interface LandXmlPolylineJs { source_id: string; ordinal: number; name?: string; kind?: string; source_path: string; properties: Record<string, string>; coordinate_dimension: 2 | 3; points: number[][]; point_source_ids: string[]; }
132
+ export interface LandXmlExtensionJs { namespace: string; local_name: string; path: string; }
133
+ export interface LandXmlSourceDocumentJs { tin: LandXmlTinDocumentJs; alignments: LandXmlAlignmentDocumentJs; alignment_render_spans: LandXmlAlignmentRenderSpanJs[]; alignment_render_refusals: LandXmlAlignmentRenderRefusalJs[]; alignment_render_truncated: boolean; }
134
+ export interface LandXmlAlignmentRenderSpanJs { source_id: string; points: LandXmlPlanPointJs[]; }
135
+ export interface LandXmlAlignmentRenderRefusalJs { source_id: string; message: string; }
136
+ export interface LandXmlAlignmentDocumentJs {
137
+ schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2"; version: string;
138
+ capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
139
+ units?: LandXmlUnitsJs; alignments: LandXmlAlignmentJs[]; warnings: string[];
140
+ }
141
+ /** `assumed` is true only when these units came from `LandXmlParseOptionsJs.assumedLinearUnit`, never from a declared LandXML/Units element (#5175). */
142
+ export interface LandXmlUnitsJs { linear_unit: string; elevation_unit: string; linear_scale_to_meters: number; elevation_scale_to_meters: number; assumed: boolean; }
143
+ /** Terrain-parser alignment linkage; use LandXmlAlignmentDocumentJs for complete alignment semantics. */
144
+ export interface LandXmlAlignmentSummaryJs { source_id: string; ordinal: number; name: string; length: number; sta_start: number; profile_source_ids: string[]; cross_section_source_ids: string[]; }
145
+ export interface LandXmlAlignmentJs { source_id: string; ordinal: number; name: string; length: number; sta_start: number; start?: LandXmlPointLocationJs; align_pis: LandXmlAlignmentPiJs[]; segments: LandXmlAlignmentSegmentJs[]; station_equations: LandXmlStationEquationJs[]; cant?: LandXmlCantJs; superelevations: LandXmlSuperelevationJs[]; unsupported_transitions: LandXmlUnsupportedTransitionJs[]; }
146
+ export type LandXmlPointLocationJs = { kind: "coordinates"; point: LandXmlPlanPointJs } | { kind: "point_reference"; pnt_ref: string };
147
+ export interface LandXmlAlignmentPiJs { source_id: string; location: LandXmlPointLocationJs; }
148
+ export type LandXmlAlignmentSegmentJs = { source_id: string; ordinal: number; primitive: LandXmlAlignmentPrimitiveJs };
149
+ export interface LandXmlSpiralJs { start: LandXmlPointLocationJs; pi: LandXmlPointLocationJs; end: LandXmlPointLocationJs; spi_type: string; radius_start: LandXmlRadiusJs; radius_end: LandXmlRadiusJs; rotation: "clockwise" | "counter_clockwise"; declared_length: number; }
150
+ export type LandXmlAlignmentPrimitiveJs = { kind: "line"; start: LandXmlPointLocationJs; end: LandXmlPointLocationJs; declared_length?: number } | { kind: "irregular_line"; start: LandXmlPointLocationJs; end: LandXmlPointLocationJs; points: LandXmlPlanPointJs[]; declared_length?: number } | { kind: "curve"; start: LandXmlPointLocationJs; center: LandXmlPointLocationJs; end: LandXmlPointLocationJs; pi?: LandXmlPointLocationJs; rotation: "clockwise" | "counter_clockwise"; radius?: number; declared_length?: number } | ({ kind: "spiral" } & LandXmlSpiralJs) | ({ kind: "unsupported_spiral" } & LandXmlSpiralJs);
151
+ export type LandXmlRadiusJs = { finite: number } | "infinite";
152
+ export interface LandXmlStationEquationJs { source_id: string; sta_internal: number; sta_ahead: number; sta_back?: number; sta_increment?: string; }
153
+ export interface LandXmlCantJs { source_id: string; name: string; gauge: number; rotation_point?: string; equilibrium_constant?: number; applied_cant_constant?: number; stations: LandXmlCantStationJs[]; speed_stations: LandXmlSpeedStationJs[]; }
154
+ export interface LandXmlCantStationJs { source_id: string; station: number; applied_cant: number; equilibrium_cant?: number; curvature: "clockwise" | "counter_clockwise"; cant_deficiency?: number; cant_excess?: number; rate_of_change_of_applied_cant_over_time?: number; rate_of_change_of_applied_cant_over_length?: number; rate_of_change_of_cant_deficiency_over_time?: number; cant_gradient?: number; speed?: number; transition_type?: string; adverse?: boolean; }
155
+ export interface LandXmlSpeedStationJs { source_id: string; station: number; speed: number; }
156
+ export interface LandXmlSuperelevationJs { source_id: string; sta_start?: number; sta_end?: number; events: LandXmlSuperelevationEventJs[]; }
157
+ export interface LandXmlSuperelevationEventJs { source_id: string; kind: string; value?: string; }
158
+ /** `spiral` is the Rust LandXmlSpiral payload, not a tagged primitive enum. */
159
+ export interface LandXmlUnsupportedTransitionJs { source_id: string; spi_type: string; spiral: LandXmlSpiralJs; reason: string; }
160
+ export interface LandXmlAlignmentProbeJs { alignment_source_id: string; segment_source_id: string; geometric_distance: number; station: { geometric_distance: number; displayed_back: number; displayed_ahead: number; is_equation_boundary: boolean }; northing: number; easting: number; tangent_northing: number; tangent_easting: number; }
161
+ export type LandXmlAlignmentProbesJs = LandXmlAlignmentProbeJs[];
162
+ /** Neighbouring authored CantStation records; values are never interpolated. */
163
+ export interface LandXmlAlignmentInspectionJs { cant?: { internal_station: number; station: { geometric_distance: number; displayed_back: number; displayed_ahead: number; is_equation_boundary: boolean }; previous?: LandXmlCantStationJs; next?: LandXmlCantStationJs }; superelevations: LandXmlSuperelevationJs[]; superelevation_block_count: number; superelevation_event_count: number; superelevation_truncated: boolean; }
164
+ /** `assumedLinearUnit`: see #5175. Accepts the same tokens a declared `<Units linearUnit="...">` accepts (e.g. `"meter"`, `"foot"`, `"USSurveyFoot"`); an unknown token refuses rather than defaulting to meters. Ignored, with a warning, when the source declares its own `<Units>`. */
165
+ export interface LandXmlParseOptionsJs { maxBytes?: number; maxDepth?: number; maxTextBytes?: number; maxPoints?: number; maxFaces?: number; maxWork?: number; maxAlignments?: number; maxAlignmentSegments?: number; maxAlignmentPoints?: number; maxStationEquations?: number; maxCantStations?: number; maxSuperelevationEvents?: number; assumedLinearUnit?: string; cancelled?: boolean; }
166
+ export interface LandXmlProfilePointJs { source_id: string; station: number; elevation?: number; }
167
+ export interface LandXmlGradeLineJs { source_id: string; parent_profile_source_id: string; ordinal: number; points: LandXmlProfilePointJs[]; }
168
+ export interface LandXmlVerticalCurveJs { source_id: string; parent_profile_source_id: string; kind: "parabolic" | "unsymmetrical_parabolic" | "circular"; station: number; elevation?: number; length?: number; length_in?: number; length_out?: number; radius?: number; }
169
+ export interface LandXmlProfileJs { source_id: string; parent_alignment_source_id: string; ordinal: number; name: string; kind: "design" | "sampled"; pvis: LandXmlProfilePointJs[]; vertical_curves: LandXmlVerticalCurveJs[]; grade_lines: LandXmlGradeLineJs[]; }
170
+ export interface LandXmlCrossSectionJs { source_id: string; parent_alignment_source_id: string; ordinal: number; station: number; surface_source_ids: string[]; }
171
+ export interface LandXmlCrossSectionPointJs { source_id: string; data_format: "offset_elevation" | "slope_distance"; offset?: number; elevation?: number; slope?: number; distance?: number; pnt_ref?: string; alignment_ref?: string; align_ref_station?: number; alignment_source_id?: string; plan_feature_ref?: string; plan_feature_ref_station?: number; parcel_ref?: string; parcel_ref_station?: number; }
172
+ export interface LandXmlCrossSectionSegmentJs { source_id: string; parent_surface_source_id: string; ordinal: number; points: LandXmlCrossSectionPointJs[]; }
173
+ export interface LandXmlCrossSectionSurfaceJs { source_id: string; parent_cross_section_source_id: string; kind: "sampled" | "design"; name?: string; segments: LandXmlCrossSectionSegmentJs[]; points: LandXmlCrossSectionPointJs[]; }
174
+ export interface LandXmlRoadwayJs { source_id: string; ordinal: number; name: string; alignment_refs: string[]; alignment_source_ids: string[]; surface_refs: string[]; surface_source_ids: string[]; grade_model_refs: string[]; }
175
+ export interface LandXmlCapabilityDiagnosticJs { code: string; source_id?: string; source_path: string; message: string; }
176
+ export interface LandXmlPreservedOnlyExtensionJs { source_id: string; parent_source_id?: string; local_name: string; source_path: string; kind: "corridor" | "string_line"; }
177
+ /** `assumed` is true only when these units came from `LandXmlParseOptionsJs.assumedLinearUnit` because the source declares no root LandXML/Units element, never from a declared one (#5175, #7693). */
178
+ export interface LandXmlPipeUnitsJs { linear_unit: string; elevation_unit: string; diameter_unit: string; width_unit: string; height_unit: string; flow_unit?: string; linear_scale_to_meters: number; elevation_scale_to_meters: number; diameter_scale_to_meters: number; width_scale_to_meters: number; height_scale_to_meters: number; assumed: boolean; }
179
+ export interface LandXmlPipeNetworkDocumentJs {
180
+ schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2"; version: string;
181
+ capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
182
+ root_units?: LandXmlPipeUnitsJs; collections: LandXmlPipeCollectionJs[];
183
+ features: LandXmlPipeFeatureJs[]; networks: LandXmlPipeNetworkJs[]; refusals: LandXmlPipeRefusalJs[];
184
+ }
185
+ export interface LandXmlPipeCollectionJs { source_id: string; source_path: string; properties: Record<string, string>; }
186
+ export interface LandXmlPipeFeatureJs { source_id: string; source_path: string; owner_source_id: string; properties: Record<string, string>; }
187
+ export interface LandXmlPipeRefusalJs { source_id: string; source_path: string; code: string; message: string; }
188
+ export interface LandXmlPipeMeasureJs { value: number; unit: string; meters: number; }
189
+ export interface LandXmlPipePositionJs { northing: number; easting: number; northing_meters: number; easting_meters: number; elevation?: LandXmlPipeMeasureJs; }
190
+ export interface LandXmlPipeFlowJs { source_id: string; source_path: string; unit?: string; flow_in?: number; loss_in?: number; loss_out?: number; properties: Record<string, string>; }
191
+ export interface LandXmlPipeInvertJs { source_id: string; source_path: string; pipe_source_id: string; flow_direction: string; elevation: LandXmlPipeMeasureJs; properties: Record<string, string>; }
192
+ export interface LandXmlPipePartJs { kind: "circular" | "elliptical" | "egg" | "rectangular"; properties: Record<string, string>; diameter?: LandXmlPipeMeasureJs; span?: LandXmlPipeMeasureJs; width?: LandXmlPipeMeasureJs; height?: LandXmlPipeMeasureJs; thickness?: LandXmlPipeMeasureJs; material?: string; }
193
+ export interface LandXmlStructurePartJs { kind: "circular" | "rectangular" | "inlet" | "outlet" | "connection"; properties: Record<string, string>; diameter?: LandXmlPipeMeasureJs; length?: LandXmlPipeMeasureJs; width?: LandXmlPipeMeasureJs; thickness?: LandXmlPipeMeasureJs; material?: string; }
194
+ export interface LandXmlPipeNetworkJs { source_id: string; source_path: string; name: string; pipe_network_type: string; properties: Record<string, string>; features: LandXmlPipeFeatureJs[]; structure_units?: LandXmlPipeUnitsJs; pipe_units?: LandXmlPipeUnitsJs; structures: LandXmlPipeStructureJs[]; pipes: LandXmlPipeJs[]; }
195
+ export interface LandXmlPipeStructureJs { source_id: string; source_path: string; name: string; properties: Record<string, string>; units: LandXmlPipeUnitsJs; center: LandXmlPipePositionJs; part: LandXmlStructurePartJs; rim_elevation?: LandXmlPipeMeasureJs; sump_elevation?: LandXmlPipeMeasureJs; inverts: LandXmlPipeInvertJs[]; flow?: LandXmlPipeFlowJs; }
196
+ export interface LandXmlPipeJs { source_id: string; source_path: string; name: string; properties: Record<string, string>; units: LandXmlPipeUnitsJs; connectivity: { start_structure_source_id: string; end_structure_source_id: string }; part: LandXmlPipePartJs; geometry: { kind: "straight" | "pass_through"; point?: LandXmlPipePositionJs }; length?: LandXmlPipeMeasureJs; flow?: LandXmlPipeFlowJs; }
197
+
198
+
199
+
200
+ export type AnalyticStatusJs = { type: "complete" } | { type: "unsupported"; reason: string };
201
+ export type AnalyticSourceContextJs =
202
+ | { kind: "direct"; representation_id: number }
203
+ | { kind: "mapped"; representation_map_path: number[] };
204
+ export interface AnalyticSourceKeyJs {
205
+ model_sha256: string; schema: string | null; length_unit_scale_bits: string;
206
+ context: AnalyticSourceContextJs; solid_id: number;
207
+ }
208
+ export type AnalyticCurveSegmentJs =
209
+ | { type: "line"; start: number[]; end: number[] }
210
+ | { type: "arc"; center: number[]; normal: number[]; x_axis: number[];
211
+ radius: number; start_angle: number; sweep_angle: number };
212
+ export interface AnalyticProfileLoopJs {
213
+ kind: "outer" | "inner"; segments: AnalyticCurveSegmentJs[];
214
+ signed_area: number; perimeter: number;
215
+ }
216
+ export interface AnalyticProfileJs {
217
+ profile_id: number; ifc_type_name: string; ProfileType: string | null;
218
+ Position: number | null; profile_position: number[] | null;
219
+ loops: AnalyticProfileLoopJs[]; status: AnalyticStatusJs;
220
+ }
221
+ export interface AnalyticExtrusionJs {
222
+ solid_id: number; SweptArea: number | null; profile: AnalyticProfileJs | null;
223
+ Position: number | null; position_matrix: number[] | null;
224
+ ExtrudedDirection: number | null; DirectionRatios: number[] | null;
225
+ axis_unit_vector: number[] | null; Depth: number | null; status: AnalyticStatusJs;
226
+ }
227
+ export interface ExtrusionNominalQuantitiesJs {
228
+ profile_area: number; projected_height: number; nominal_volume: number;
229
+ }
230
+ export interface ExtrusionDefinitionJs {
231
+ key: AnalyticSourceKeyJs; source: AnalyticExtrusionJs;
232
+ /** Squared/cubed IFC file-length units; null for unsupported or invalid sources. */
233
+ nominal_quantities: ExtrusionNominalQuantitiesJs | null;
234
+ }
235
+ export interface ExtrusionInstanceJs {
236
+ ordinal: number; source: AnalyticSourceKeyJs; product_id: number;
237
+ solid_id: number; mapping_path: number[]; source_modified: boolean;
238
+ world_from_source: number[] | null; status: AnalyticStatusJs;
239
+ }
240
+ export interface ExtrusionDefinitionsJs {
241
+ up_axis: "Z"; source_units: "ifc_file_length_units"; world_units: "m";
242
+ coordinate_space: "absolute_ifc_world"; model_sha256: string;
243
+ schema: string | null; length_unit_scale: number;
244
+ sources: ExtrusionDefinitionJs[];
245
+ instances: Record<number, ExtrusionInstanceJs[]>; diagnostics: string[];
246
+ }
247
+
248
+
249
+
250
+ export class AlignmentAxisJs {
251
+ free(): void;
252
+ [Symbol.dispose](): void;
253
+ /**
254
+ * [horizontal distance, IFC Z-up point XYZ, normalized world tangent XYZ].
255
+ * Coordinates remain f64 absolute metres; no renderer origin is applied.
256
+ */
257
+ evaluate(distance_m: number): Float64Array;
258
+ constructor(content: string, express_id: number);
259
+ readonly GlobalId: string | undefined;
260
+ readonly Name: string | undefined;
261
+ readonly approximate: boolean;
262
+ readonly expressId: number;
263
+ readonly geometricHorizontalLengthMeters: number;
264
+ }
265
+
266
+ /**
267
+ * The overlap solid of one clashing pair, or the reason there is none.
268
+ */
269
+ export class ClashIntersectionSolidJs {
270
+ private constructor();
271
+ free(): void;
272
+ [Symbol.dispose](): void;
273
+ /**
274
+ * `""` when `isSolid`, otherwise one of:
275
+ * - `"malformed-operand"` — any of FOUR malformations, all rejected
276
+ * before the boolean runs, because computing on them would silently
277
+ * drop the offending triangle (or worse) rather than report the true
278
+ * operand:
279
+ * 1. `positionsA`/`positionsB` is not a flat `[x, y, z, …]` triple
280
+ * (length not a multiple of 3);
281
+ * 2. `indicesA`/`indicesB` has a length that is not a multiple of 3,
282
+ * so it does not describe whole triangles;
283
+ * 3. `indicesA`/`indicesB` references a vertex past the end of its own
284
+ * operand's positions;
285
+ * 4. a position is **non-finite** (NaN or infinity). This one is worth
286
+ * calling out to callers: a NaN coordinate is caught by neither
287
+ * length check, and left alone it can be absorbed into a
288
+ * normal-looking answer or corrupt a face enough to report a
289
+ * genuinely overlapping pair as `"no-overlap"`. So if you are
290
+ * debugging an unexpected `"no-overlap"`, check your inputs for
291
+ * NaN — it surfaces here, not there.
292
+ * - `"empty-operand"` — an operand had no triangles.
293
+ * - `"no-overlap"` — the exact intersection is empty. Covers a disjoint
294
+ * pair AND a *touching* pair, including any graze below the kernel's
295
+ * `2^-16 m ≈ 15.26 µm` snap grid (both faces snap flush).
296
+ * - `"below-kernel-resolution"` — the pair overlaps, but too shallowly for
297
+ * the kernel to resolve as a solid rather than a coplanar contact. See
298
+ * `thicknessM` / `requiredM`.
299
+ * - `"budget-exhausted"` — the escalation budget tripped; the arrangement
300
+ * is partial and nothing about it is trustworthy.
301
+ */
302
+ readonly degenerateReason: string;
303
+ /**
304
+ * Triangle indices into `positions / 3`.
305
+ */
306
+ readonly indices: Uint32Array;
307
+ /**
308
+ * True when a trustworthy overlap solid was produced. When false, every
309
+ * geometry getter is empty and `degenerateReason` says why.
310
+ */
311
+ readonly isSolid: boolean;
312
+ /**
313
+ * World-space vertex positions, flat `[x, y, z, …]`, f64.
314
+ *
315
+ * f64 rather than the f32 the rest of the mesh pipeline uses because the
316
+ * caller reports this solid's volume: the f32 round-trip costs ~1e-7
317
+ * relative, a thousand times the exactness the kernel actually delivers.
318
+ * Downcast to f32 at the GPU upload if the renderer wants it.
319
+ */
320
+ readonly positions: Float64Array;
321
+ /**
322
+ * For `"below-kernel-resolution"`: the depth this pair would have needed
323
+ * for the kernel to resolve a solid, in metres. `0` otherwise. Grows with
324
+ * distance from the world origin, as the kernel's own tolerance does.
325
+ */
326
+ readonly requiredM: number;
327
+ /**
328
+ * For `"below-kernel-resolution"`: the overlap's measured thinnest extent,
329
+ * in metres. `0` otherwise. Useful to tell the user how shallow the clash
330
+ * is even though no solid can be drawn.
331
+ */
332
+ readonly thicknessM: number;
333
+ /**
334
+ * Triangle count of the solid; `0` when degenerate.
335
+ */
336
+ readonly triangleCount: number;
337
+ /**
338
+ * Enclosed volume in m³. `0` when not a solid — check `isSolid` first;
339
+ * "no measurable overlap" and "an overlap of zero" are different claims.
340
+ */
341
+ readonly volumeM3: number;
342
+ }
343
+
344
+ /**
345
+ * Packed result of one rule run. Parallel arrays, one entry per clash record;
346
+ * `points` has 3 per record and `bounds` has 6 per record.
347
+ */
348
+ export class ClashRunResult {
349
+ private constructor();
350
+ free(): void;
351
+ [Symbol.dispose](): void;
352
+ readonly a: Uint32Array;
353
+ readonly b: Uint32Array;
354
+ readonly bounds: Float64Array;
355
+ readonly depthFloor: Float64Array;
356
+ readonly distance: Float64Array;
357
+ readonly distanceKind: Uint8Array;
358
+ readonly points: Float64Array;
359
+ readonly status: Uint8Array;
360
+ }
361
+
362
+ /**
363
+ * A clash session: ingest element geometry once, then run rules repeatedly.
364
+ */
365
+ export class ClashSession {
366
+ free(): void;
367
+ [Symbol.dispose](): void;
368
+ /**
369
+ * Ingest N elements from flat arenas.
370
+ *
371
+ * - `positions`: concatenated per-element vertex coords (x,y,z,...)
372
+ * - `pos_ranges`: 2 per element = [float_offset, float_len]
373
+ * - `indices`: concatenated per-element LOCAL (0-based) triangle indices
374
+ * - `idx_ranges`: 2 per element = [idx_offset, idx_len]
375
+ * - `aabbs`: 6 per element = [minx,miny,minz,maxx,maxy,maxz]
376
+ */
377
+ ingest(positions: Float32Array, pos_ranges: Uint32Array, indices: Uint32Array, idx_ranges: Uint32Array, aabbs: Float32Array): void;
378
+ constructor();
379
+ /**
380
+ * Run one rule. `group_a`/`group_b` are GLOBAL element indices.
381
+ * OMIT `group_b` (pass `undefined`/`null`) for a self-clash within
382
+ * `group_a`; pass an array -- INCLUDING an empty one -- for a two-sided
383
+ * rule. An empty array is a B side that matched nothing and yields no
384
+ * clashes, which is why this is nullable rather than "empty means
385
+ * self" (#5354). `mode`: 0 = hard, 1 = clearance. Records carry GLOBAL
386
+ * element indices.
387
+ */
388
+ runRule(group_a: Uint32Array, group_b: Uint32Array | null | undefined, mode: number, tolerance: number, clearance: number, report_touch: boolean): ClashRunResult;
389
+ }
390
+
391
+ /**
392
+ * A set of closed 2D rings, grouped into disjoint shapes.
393
+ *
394
+ * Rings carry no duplicated closing vertex (connect the last point back to
395
+ * the first). Winding is meaningful: a counter-clockwise ring covers area, a
396
+ * clockwise one removes it, so an outer boundary and its holes are
397
+ * distinguishable without any extra tagging — the property
398
+ * `meshOutline2d`'s flattened contour list relies on too.
399
+ */
400
+ export class Contours2D {
401
+ free(): void;
402
+ [Symbol.dispose](): void;
403
+ /**
404
+ * Axis-aligned bounds as `[minX, minY, maxX, maxY]`, or `undefined` when
405
+ * empty. Cheap enough to gate the boolean itself: an accumulated occluder
406
+ * whose bounds miss the next element needs no difference at all.
407
+ */
408
+ bounds(): Float64Array | undefined;
409
+ /**
410
+ * Every ring's coordinates concatenated. Paired with `ringLengths()` this
411
+ * reconstructs the set through the constructor, and reads a whole result
412
+ * back in one boundary crossing instead of one per ring. It round-trips the
413
+ * constructor's *sanitised* rings — degenerate rings and explicit closing
414
+ * vertices are dropped at construction, so those are not echoed back.
415
+ */
416
+ coords(): Float64Array;
417
+ /**
418
+ * Adopt the rings of a `meshOutline2d` result, widening its f32
419
+ * coordinates to the f64 the boolean engine works in.
420
+ *
421
+ * The outline's `axisMin`/`axisMax` are dropped — they describe the cut
422
+ * axis, which a 2D boolean has no notion of; keep them on the JS side if
423
+ * the caller still needs them for band classification.
424
+ */
425
+ static fromMeshOutline(outline: MeshOutlineJs): Contours2D;
426
+ /**
427
+ * Build a contour set from flat coordinates plus per-ring vertex counts.
428
+ *
429
+ * `coords` is `[x0, y0, x1, y1, …]` with every ring concatenated in order;
430
+ * `ringLengths[i]` is the VERTEX count (not the float count) of ring `i`.
431
+ * Throws when the counts do not add up to `coords.length / 2`.
432
+ *
433
+ * Shape grouping is a property of boolean *results*: a set built here is
434
+ * an unstructured ring soup, so `shapeCount` reports 0 until it has been
435
+ * through an operation (`resolve2d` alone is enough). Degenerate rings
436
+ * (under 3 vertices, non-finite, or exactly collinear) are dropped at
437
+ * construction, so `isEmpty`/`bounds()` report the same rings a later
438
+ * boolean would keep rather than exposing an unsanitised soup.
439
+ */
440
+ constructor(coords: Float64Array, ring_lengths: Uint32Array);
441
+ /**
442
+ * Ring `index` as a flat `[x0, y0, x1, y1, …]` array, or `undefined` when
443
+ * out of range.
444
+ */
445
+ ring(index: number): Float64Array | undefined;
446
+ /**
447
+ * Vertex count of each ring, in the same order as `coords()`.
448
+ */
449
+ ringLengths(): Uint32Array;
450
+ /**
451
+ * Ring index at which each shape starts. Entry `s` is shape `s`'s OUTER
452
+ * ring; the rings up to the next entry (or `ringCount`) are its holes.
453
+ */
454
+ shapeOffsets(): Uint32Array;
455
+ /**
456
+ * True when the set holds no rings. Degenerate rings are dropped at
457
+ * construction and never emitted by an operation, so this also means the
458
+ * set covers no area.
459
+ */
460
+ readonly isEmpty: boolean;
461
+ /**
462
+ * Total number of boundary rings across every shape.
463
+ */
464
+ readonly ringCount: number;
465
+ /**
466
+ * Number of disjoint shapes, or 0 for a set that has not been through an
467
+ * operation yet (see the constructor).
468
+ */
469
+ readonly shapeCount: number;
470
+ }
471
+
472
+ /**
473
+ * A collection of resolved grid axes.
474
+ */
475
+ export class GridAxisCollection {
476
+ private constructor();
477
+ free(): void;
478
+ [Symbol.dispose](): void;
479
+ /**
480
+ * Get the axis at `index`. Returns `undefined` for out-of-bounds index.
481
+ */
482
+ getAxis(index: number): GridAxisJs | undefined;
483
+ /**
484
+ * Whether the collection is empty.
485
+ */
486
+ readonly isEmpty: boolean;
487
+ /**
488
+ * Number of grid axes.
489
+ */
490
+ readonly length: number;
491
+ }
492
+
493
+ /**
494
+ * One grid axis: tag + endpoints in renderer Y-up world space (metres).
495
+ */
496
+ export class GridAxisJs {
497
+ private constructor();
498
+ free(): void;
499
+ [Symbol.dispose](): void;
500
+ /**
501
+ * Express ID of the `IfcGridAxis`.
502
+ */
503
+ readonly axisId: number;
504
+ /**
505
+ * End endpoint `[x, y, z]` in renderer Y-up world space (metres).
506
+ */
507
+ readonly end: Float32Array;
508
+ /**
509
+ * Express ID of the owning `IfcGrid`.
510
+ */
511
+ readonly gridId: number;
512
+ /**
513
+ * Start endpoint `[x, y, z]` in renderer Y-up world space (metres).
514
+ */
515
+ readonly start: Float32Array;
516
+ /**
517
+ * Axis tag (e.g. `"A"`, `"1"`); empty string when unauthored.
518
+ */
519
+ readonly tag: string;
520
+ }
521
+
522
+ /**
523
+ * Main IFC-Lite API
524
+ */
525
+ export class IfcAPI {
526
+ free(): void;
527
+ [Symbol.dispose](): void;
528
+ /**
529
+ * Run the pre-pass ONCE and return serialized results for worker distribution.
530
+ * Takes raw bytes (&[u8]) to avoid TextDecoder overhead.
531
+ */
532
+ buildPrePassOnce(data: Uint8Array): any;
533
+ /**
534
+ * Streaming pre-pass: emits geometry jobs in chunks via a JS callback
535
+ * instead of waiting for the full file scan to complete.
536
+ *
537
+ * Single linear walk over the file:
538
+ * 1. Builds the entity index incrementally from the same scan that
539
+ * collects geometry jobs (a separate index scan would double
540
+ * wall-clock).
541
+ * 2. As soon as `IFCPROJECT` has been seen, the unit scale and the
542
+ * first ~50 geometry jobs have been collected, resolves
543
+ * `unitScale` + `rtcOffset` and emits a `meta` callback so the
544
+ * JS host can spin up geometry process workers.
545
+ * 3. Emits `jobs` callbacks every `chunk_size` jobs (or fewer if
546
+ * the meta phase already buffered some).
547
+ * 4. Emits `complete` with the total job count at end of scan.
548
+ *
549
+ * On a 986 MB / 14 M-entity file this drops time-to-first-geometry
550
+ * from ~17 s (full pre-pass + worker spawn + first batch) to ~3 s
551
+ * (first 100 K bytes scanned + meta + first chunk).
552
+ *
553
+ * The callback receives a single `JsValue` argument shaped as one of:
554
+ * `{ type: "meta", unitScale, rtcOffset: [x,y,z], needsShift, buildingRotation? }`
555
+ * `{ type: "jobs", jobs: Uint32Array }` // [id, start, end] triples
556
+ * `{ type: "complete", totalJobs }`
557
+ */
558
+ buildPrePassStreaming(data: Uint8Array, on_event: Function, chunk_size: number, disabled_type_names: string[] | null | undefined, skip_type_geometry: boolean): any;
559
+ /**
560
+ * Sharded pre-pass variant: same scan/discovery/jobs/columns pipeline as
561
+ * `buildPrePassStreaming`, but
562
+ * 1. the entity index is PREBUILT from the host's stitched shard columns
563
+ * (file order; see `scanEntityIndexShard`) — the scan skips its inline
564
+ * index build, the meta RTC ladder resolves against the FULL index
565
+ * (no partial-ladder full-rescan detour), and the post-scan
566
+ * `entity-index` event is skipped (the host already delivered it), and
567
+ * 2. styles resolution is EXTERNAL: the styled-item spans are resolved as
568
+ * shard slices on the geometry workers (`resolveStyledItemsShard`);
569
+ * this call stashes the SUPPORT spans + plane-angle scale, and the
570
+ * follow-up `finalizePrepassStyles` merges + flattens into the exact
571
+ * styles payload the serial path emits. NO `styles` event is emitted
572
+ * here.
573
+ */
574
+ 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;
575
+ /**
576
+ * Existing sharded prepass plus an exact full-source key in complete.
577
+ */
578
+ buildPrePassStreamingShardedWithSourceFingerprint(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;
579
+ /**
580
+ * Existing streaming prepass plus an exact full-source key in complete.
581
+ */
582
+ buildPrePassStreamingWithSourceFingerprint(data: Uint8Array, on_event: Function, chunk_size: number, disabled_type_names: string[] | null | undefined, skip_type_geometry: boolean): any;
583
+ /**
584
+ * Calibrate one raster plane from native-source landmarks and a measured
585
+ * world span. Returns UTF-8 CalibratedPlane JSON. Constant bounded work;
586
+ * does not read IFC, decode image pixels or mutate a model.
587
+ */
588
+ calibrateAppearancePlane(request_json: string): Uint8Array;
589
+ /**
590
+ * Catalog effective IfcProduct classes and IfcRelDefinesByType membership.
591
+ * JSON input is AppearanceCatalogRequest; output is AppearanceCatalog JSON.
592
+ * Run in a worker and validate sourceRevision before using the selectors.
593
+ */
594
+ catalogAppearance(content: Uint8Array, request_json: string): Uint8Array;
595
+ /**
596
+ * Clear the cached entity index (call between loads when reusing
597
+ * the same `IfcAPI` instance — e.g. the parser worker keeps one
598
+ * `IfcAPI` alive across multiple `parse` requests).
599
+ *
600
+ * Recovers a poisoned cache Mutex instead of panicking; see `mod_tests.rs`.
601
+ */
602
+ clearPrePassCache(): void;
603
+ /**
604
+ * Starts one owned raw-byte LandXML session. The caller must free or abort
605
+ * the session on every cancellation path.
606
+ *
607
+ * `options` is the same shape `parseLandXmlSourceBytesWithOptions`
608
+ * accepts (see `LandXmlParseOptionsJs`) and is optional so every
609
+ * existing single-argument call site keeps working unchanged. A bad
610
+ * `assumedLinearUnit` token (or any other invalid option) refuses here,
611
+ * at session construction, never partway through a stream (#5175).
612
+ */
613
+ createLandXmlTinStreamSession(max_bytes: number, options?: LandXmlParseOptionsJs | null): LandXmlTinStreamSession;
614
+ /**
615
+ * Run geometry extraction on `content` and return its typed CSG / opening
616
+ * diagnostics (the `GeometryDiagnostics` contract) as a JS object, or
617
+ * `undefined` when nothing diagnostic-worthy happened (no openings, no
618
+ * failures). Takes the raw IFC bytes (`Uint8Array`) so there is no input-size
619
+ * cap. The produced meshes are dropped; only the diagnostics are returned.
620
+ */
621
+ diagnoseGeometry(content: Uint8Array): any;
622
+ /**
623
+ * Export tabular **CSV**. `mode` ∈ {`"entities"`, `"properties"`, `"quantities"`,
624
+ * `"spatial"`}. `delimiter` defaults to `,` when empty; `include_properties` adds
625
+ * flattened `Pset_Prop` columns to the entities view.
626
+ */
627
+ exportCsv(content: Uint8Array, mode: string, delimiter: string, include_properties: boolean): Uint8Array;
628
+ /**
629
+ * Export the `IfcSpace` volumes in `content` as a Dragonfly **DFJSON** string.
630
+ *
631
+ * Each space becomes an extruded `Room2D` (floor polygon + floor-to-ceiling height)
632
+ * grouped into stories — the simpler Ladybug Tools target for mostly-vertical-wall
633
+ * models. Loads via `dragonfly.model.Model.from_dfjson`.
634
+ *
635
+ * ```javascript
636
+ * const api = new IfcAPI();
637
+ * const dfjson = api.exportDfjson(ifcContent, "my_model");
638
+ * ```
639
+ */
640
+ exportDfjson(content: Uint8Array, name: string): string;
641
+ /**
642
+ * Export the render geometry in `content` as a binary **GLB** (`Uint8Array`).
643
+ *
644
+ * `hidden` / `isolated` are express-id visibility filters; `hidden_types_csv` is a
645
+ * comma-separated list of IFC type names whose class toggle is off (e.g.
646
+ * `"IfcOpeningElement,IfcSpace"`). `isolated` carries the isolation allowlist's
647
+ * null-vs-empty distinction across the wasm boundary: omit it (`undefined`) for
648
+ * "no isolation filter" (every mesh is a candidate); pass an empty `Uint32Array`
649
+ * for "isolation is ACTIVE and currently matches nothing" (every mesh is
650
+ * excluded). Collapsing the two — as a bare `Uint32Array` parameter would force a
651
+ * caller to do — silently exports the whole model when a filter matches nothing
652
+ * (#4328 follow-up: reachable by filtering the Class tab to a type present only
653
+ * in a federated model's secondary member, then exporting "Visible Only"). A
654
+ * non-empty `Uint32Array` is the ordinary allowlist. `include_metadata` attaches
655
+ * counts + per-node `expressId`. Per-mesh RTC origin rides the node translation
656
+ * (precision-safe).
657
+ * `lit` emits standard PBR materials that shade from normals; omitted or
658
+ * `true` ⇒ lit (the default), `false` ⇒ flat `KHR_materials_unlit` (the
659
+ * historical look — #1321). Optional at the boundary so older 5-arg callers
660
+ * keep lit-by-default behaviour.
661
+ * `emissive` self-illuminates each material at its base colour (core glTF
662
+ * `emissiveFactor`) so renderers without ambient/IBL — Google Earth — don't
663
+ * render the model near-black (#1427); omitted or `false` ⇒ off.
664
+ *
665
+ * Fails CLOSED: when the visible mesh set is empty this throws an `Error`
666
+ * whose message starts with `NO_RENDER_GEOMETRY`, instead of returning a
667
+ * structurally valid but empty GLB. #1438 put that guard only in the TS
668
+ * CLI/MCP wrappers; making the boundary itself refuse means SDK/viewer/
669
+ * direct callers inherit it too (the TS guards stay as defense-in-depth).
670
+ */
671
+ exportGlb(content: Uint8Array, include_metadata: boolean, hidden: Uint32Array, isolated: Uint32Array | null | undefined, hidden_types_csv: string, lit?: boolean | null, emissive?: boolean | null): Uint8Array;
672
+ /**
673
+ * Assemble a **GLB** from already-produced meshes (the viewer's `MeshData`, flattened)
674
+ * — no re-meshing. Per mesh `i`: `vertex_counts[i]` verts + `index_counts[i]` indices
675
+ * taken in order from the concatenated `positions`/`normals`/`indices`; `colors` is
676
+ * RGBA per mesh, `origins` xyz per mesh, `express_ids` labels each mesh (indices are
677
+ * per-mesh local). The caller passes exactly the meshes it wants emitted.
678
+ *
679
+ * Fails CLOSED: if the declared vertex/index counts run past the flattened
680
+ * `positions` / `indices`, there are fewer `index_counts` than meshes, `normals`
681
+ * is empty or too short to cover every vertex, a mesh's index block is not a
682
+ * whole number of triangles, or an index names a vertex its own mesh does not
683
+ * have (glTF 2.0 3.7.2.1), this throws an `Error` whose message starts with
684
+ * `MALFORMED_MESH_INPUT` — instead of silently emitting a GLB with those meshes
685
+ * dropped, a TRIANGLES primitive whose count is not a multiple of 3, or the
686
+ * out-of-range index copied into the BIN chunk. (The viewer always passes
687
+ * fully-backed, normal-covered, whole-triangle, in-range arrays, so this only
688
+ * fires on a caller bug.)
689
+ *
690
+ * `world_matrix` is the frame the meshes were baked in (#7734): 16 finite
691
+ * numbers, a column-major 4x4 in IFC Z-up metres with `world = M * baked`
692
+ * (the viewer builds it from `CoordinateInfo`). The GLB root carries it, so
693
+ * a georeferenced model exports where the from-bytes `exportGlb` puts it
694
+ * instead of in the render frame. Omit it (`undefined`) for an unshifted
695
+ * model; a matrix that is not 16 finite numbers throws
696
+ * `MALFORMED_MESH_INPUT`.
697
+ */
698
+ 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, world_matrix?: Float64Array | null): Uint8Array;
699
+ /**
700
+ * Export the `IfcSpace` volumes in `content` as Honeybee **HBJSON** UTF-8 bytes.
701
+ *
702
+ * Returned as UTF-8 bytes (`Uint8Array`) so output is not capped by the
703
+ * V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
704
+ * is genuinely needed.
705
+ *
706
+ * Rooms are built analytically from extruded-area profiles (watertight by construction);
707
+ * faces are typed Floor / RoofCeiling / Wall with outward normals. The result loads via
708
+ * `honeybee.model.Model.from_hbjson` and is ready for Ladybug Tools / Pollination.
709
+ *
710
+ * ```javascript
711
+ * const api = new IfcAPI();
712
+ * const hbjson = api.exportHbjson(ifcContent, "my_model");
713
+ * ```
714
+ */
715
+ exportHbjson(content: Uint8Array, name: string): Uint8Array;
716
+ /**
717
+ * Like [`Self::export_hbjson`], but also returns the export's coverage stats
718
+ * (`HbjsonStats`: spaces seen, rooms emitted, spaces skipped as degenerate, plus
719
+ * apertures / doors / shades / constructions / interior adjacencies) so a caller
720
+ * can tell whether the "success" result silently dropped input.
721
+ *
722
+ * Returns a plain JS object `{ content: Uint8Array, stats: HbjsonStats }`; `content`
723
+ * is UTF-8 HBJSON bytes (same encoding rationale as [`Self::export_hbjson`] — not
724
+ * capped by the V8 max-string ceiling). Runs the export once — `content` and `stats`
725
+ * come from the same pass, not two separate exports.
726
+ *
727
+ * ```javascript
728
+ * const api = new IfcAPI();
729
+ * const { content, stats } = api.exportHbjsonWithStats(ifcContent, "my_model");
730
+ * if (stats.skipped > 0) console.warn(`${stats.skipped} spaces skipped as degenerate`);
731
+ * ```
732
+ */
733
+ exportHbjsonWithStats(content: Uint8Array, name: string): any;
734
+ /**
735
+ * Export **IFC5 / IFCX** (the USD-style node graph). `only_known_properties` keeps
736
+ * only properties with an official IFC5 schema.
737
+ */
738
+ exportIfcx(content: Uint8Array, only_known_properties: boolean, pretty: boolean): Uint8Array;
739
+ /**
740
+ * Export structured **JSON** (array of entity objects with typed property values).
741
+ */
742
+ exportJson(content: Uint8Array, pretty: boolean, include_properties: boolean, include_quantities: boolean): Uint8Array;
743
+ /**
744
+ * Export **JSON-LD** (`@graph` of `ifc:` nodes). Empty `context` ⇒ buildingSMART
745
+ * IFC4 OWL default.
746
+ *
747
+ * `included` is an express-id isolation filter mirroring `exportObj` /
748
+ * `exportGlb`, and carries the same null-vs-empty distinction across the wasm
749
+ * boundary: omit it (`undefined`) for "no isolation filter" (every entity is
750
+ * emitted); pass an empty `Uint32Array` for "isolation is ACTIVE and currently
751
+ * matches nothing", which emits an empty `@graph`. Collapsing the two — as a
752
+ * bare `Uint32Array` parameter would force a caller to do — silently exported
753
+ * the whole model when a filter matched nothing (#4659, the JSON-LD twin of
754
+ * #4483/#4484). A non-empty `Uint32Array` is the ordinary allowlist.
755
+ */
756
+ exportJsonld(content: Uint8Array, context: string, include_properties: boolean, include_quantities: boolean, pretty: boolean, included?: Uint32Array | null): Uint8Array;
757
+ /**
758
+ * Build a Google-Earth-ready **KMZ** (`Uint8Array`) straight from the viewer's
759
+ * already-produced meshes — the working path (#1427). The model is embedded as
760
+ * **COLLADA** (`model.dae`), the only `<Model>` format Google Earth loads (a GLB
761
+ * raises "Unsupported element: Model"), with emission-lit double-sided materials
762
+ * placement. Mesh arrays match `exportGlbFromMeshes`;
763
+ * `latitude`/`longitude`/`altitude` + `x_axis_abscissa`/`x_axis_ordinate`
764
+ * (grid-north, `undefined` ⇒ heading 0) place + orient the model.
765
+ * `altitude_mode` (`"clampToGround"` default ⇒ rest on terrain, ignoring
766
+ * `altitude`; `"absolute"` ⇒ place at `altitude` metres MSL) selects the
767
+ * KML vertical placement (#1427).
768
+ *
769
+ * Fails CLOSED: when no triangle survives (an empty visible set, or meshes
770
+ * whose only triangles are degenerate and collapse in the vertex dedup)
771
+ * this throws an `Error` whose message starts with `NO_RENDER_GEOMETRY`;
772
+ * a declared vertex/index count running past its buffer, an index block
773
+ * that is not whole triangles, or an index outside its mesh throws
774
+ * `MALFORMED_MESH_INPUT`, exactly as `exportGlbFromMeshes` does. These used
775
+ * to ship as a "successful" archive: an empty one around a COLLADA
776
+ * document the 1.4.1 schema rejects, or one with meshes or faces missing.
777
+ */
778
+ 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;
779
+ /**
780
+ * Export the terrain products `product_ids` (express ids) of `content` as
781
+ * one LandXML 1.2 document, one `<Surface>` each.
782
+ *
783
+ * Returns JSON `{ xml, crsName, surfaces: [{ productId, globalId, name,
784
+ * points, faces }] }`. A selection that is not an authored triangulated
785
+ * terrain, or whose georeferencing is missing or ambiguous, throws an
786
+ * `Error` whose message starts with `TERRAIN_REFUSED:` and names the
787
+ * reason.
788
+ */
789
+ exportLandXmlTerrain(content: Uint8Array, product_ids: Uint32Array, options: LandXmlTerrainOptionsJs): string;
790
+ /**
791
+ * Merge several IFC models into one STEP/IFC UTF-8 byte buffer (`Uint8Array`).
792
+ * `concatenated` is every model's
793
+ * bytes laid end-to-end; `lengths[i]` is the byte length of model `i`. The first model
794
+ * keeps its ids; later models are id-offset and their project unified to the first.
795
+ */
796
+ exportMerged(concatenated: Uint8Array, lengths: Uint32Array, schema: string): Uint8Array;
797
+ /**
798
+ * Export the render geometry in `content` as Wavefront **OBJ** UTF-8 bytes.
799
+ *
800
+ * Returned as UTF-8 bytes (`Uint8Array`) so output is not capped by the
801
+ * V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
802
+ * is genuinely needed.
803
+ *
804
+ * `hidden` is an express-id filter mirroring the viewer's visibility state.
805
+ * `isolated` carries the isolation allowlist's null-vs-empty distinction across
806
+ * the wasm boundary: omit it (`undefined`) for "no isolation filter" (every mesh
807
+ * is a candidate); pass an empty `Uint32Array` for "isolation is ACTIVE and
808
+ * currently matches nothing" (every mesh is excluded). Collapsing the two — as a
809
+ * bare `Uint32Array` parameter would force a caller to do — silently exports the
810
+ * whole model when a filter matches nothing (the OBJ twin of #4328/#4364, fixed
811
+ * for GLB in `export_glb`). A non-empty `Uint32Array` is the ordinary allowlist.
812
+ * Instanced type-library shapes are skipped regardless of the filter.
813
+ *
814
+ * Fails CLOSED like `exportGlb`: when no mesh is written this throws an
815
+ * `Error` whose message starts with `NO_RENDER_GEOMETRY`, instead of
816
+ * returning a header-only OBJ (#7695).
817
+ *
818
+ * ```javascript
819
+ * const obj = api.exportObj(ifcContent, true, new Uint32Array(), undefined);
820
+ * ```
821
+ */
822
+ exportObj(content: Uint8Array, include_normals: boolean, hidden: Uint32Array, isolated?: Uint32Array | null): Uint8Array;
823
+ /**
824
+ * Re-serialize the model in `content` to STEP/IFC UTF-8 bytes.
825
+ *
826
+ * Returned as UTF-8 bytes (`Uint8Array`) so output is not capped by the
827
+ * V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
828
+ * is genuinely needed.
829
+ *
830
+ * `schema` is the FILE_SCHEMA label to write (empty ⇒ preserve the source schema).
831
+ *
832
+ * `included` is an express-id allowlist carrying the same null-vs-empty
833
+ * distinction as `exportObj` / `exportGlb`: omit it (`undefined`) for "no
834
+ * isolation filter" (whole model); pass an empty `Uint32Array` for "isolation
835
+ * is ACTIVE and currently matches nothing", which writes a header-only file
836
+ * with an empty `DATA;` section. Collapsing the two — as a bare `Uint32Array`
837
+ * parameter would force a caller to do — silently exported the whole model
838
+ * when a filter matched nothing (#4659, the STEP twin of #4483/#4484). When
839
+ * set, the forward `#`-reference closure is added so the subset never dangles
840
+ * a reference.
841
+ * `mutations_json` carries `MutablePropertyView` edits; empty ⇒ none. It is
842
+ * either the mutation log `MutablePropertyView.exportMutations()` returns
843
+ * (an object with a `mutations` array, optionally `newEntities` and
844
+ * `georefMutations`), written with byte parity to the TypeScript
845
+ * `StepExporter` (#5941), or the older pre-serialized
846
+ * `{ attributeUpdates, propertyMutations }` shape. A log does not combine
847
+ * with `included`. See `export_step_json` for both shapes.
848
+ * A non-empty but malformed `mutations_json` throws rather than silently
849
+ * exporting the model with none of the caller's edits applied — mirrors
850
+ * `exportGlb`'s and `exportMerged`'s fail-closed contract on this same API.
851
+ */
852
+ exportStep(content: Uint8Array, schema: string, included: Uint32Array | null | undefined, mutations_json: string): Uint8Array;
853
+ /**
854
+ * Export **OpenUSD** (`.usda` ASCII): a real Z-up USD stage — spatial hierarchy of
855
+ * `Xform` prims, `UsdGeomMesh` geometry, `UsdPreviewSurface` materials, IFC
856
+ * metadata as custom attributes. Whole-model (geometry-backed).
857
+ *
858
+ * Fails CLOSED like `exportGlb`: a model with no render geometry throws an
859
+ * `Error` whose message starts with `NO_RENDER_GEOMETRY`, instead of
860
+ * returning a stage with nothing to look at (#7695).
861
+ */
862
+ exportUsd(content: Uint8Array): Uint8Array;
863
+ /**
864
+ * Extract raw profile polygons from all building elements with `IfcExtrudedAreaSolid`
865
+ * representations.
866
+ *
867
+ * Returns a [`ProfileCollection`] whose entries each carry:
868
+ * - A 2D polygon (outer + holes) in local profile space (metres)
869
+ * - A 4 × 4 column-major transform in WebGL Y-up world space
870
+ * - Extrusion direction (world space) and depth (metres)
871
+ *
872
+ * Use [`ProfileProjector`] (TypeScript) to convert these into `DrawingLine[]`
873
+ * for clean projection without tessellation artifacts.
874
+ *
875
+ * ```javascript
876
+ * const api = new IfcAPI();
877
+ * const profiles = api.extractProfiles(ifcContent, 0);
878
+ * console.log('Profiles:', profiles.length);
879
+ * for (let i = 0; i < profiles.length; i++) {
880
+ * const p = profiles.get(i);
881
+ * console.log(p.ifcType, 'depth:', p.extrusionDepth);
882
+ * }
883
+ * ```
884
+ */
885
+ extractProfiles(content: string, model_index: number): ProfileCollection;
886
+ /**
887
+ * Return authored swept-disk occurrences, including exact line/arc
888
+ * directrices and derived measurements, in absolute IFC Z-up metres.
889
+ * `ids` contains product STEP IDs; omit it for all products or pass an
890
+ * empty `Uint32Array` for none. Unsupported records keep their status and
891
+ * a null `directrix_metrics`; malformed representation walks report a
892
+ * diagnostic and omit that product atomically.
893
+ */
894
+ extractSweptDiskDescriptions(content: Uint8Array, ids?: Uint32Array | null): any;
895
+ /**
896
+ * `ids` is an optional product STEP-ID filter; `None` selects all and
897
+ * `Some([])` selects no products, matching the Rust and Python APIs.
898
+ * Matrices are column-major f64; profile_position and position_matrix are
899
+ * applied before world_from_source. No mesh is decoded on this path.
900
+ */
901
+ extrusionDefinitions(content: Uint8Array, ids?: Uint32Array | null): ExtrusionDefinitionsJs;
902
+ /**
903
+ * Sharded pre-pass: merge the shard-resolved styled-item columns with the
904
+ * SUPPORT spans (extracted host-side from the shard classes) and run the
905
+ * CANONICAL styles flatten. Returns the exact `styles` event payload the
906
+ * serial path emits. Runs on any worker with `setEntityIndex` installed.
907
+ * Span arguments are `[id, start, len]` triples; `plane_angle_to_radians`
908
+ * comes from the meta event. `orphanColors` / `geomColors` carry exactly
909
+ * four floats per id in `orphanIds` / `geomIds`; any other length throws
910
+ * before either column is read. The payload's `styleFinishes` come from
911
+ * the geometry finishes a preceding `setPrepassGeometryFinishes` stashed
912
+ * (consumed here); without that call they are all NaN.
913
+ */
914
+ 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;
915
+ /**
916
+ * Finalize prepass styles against the installed source and entity index.
917
+ */
918
+ finalizePrepassStylesFromSource(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;
919
+ /**
920
+ * Get WASM memory for zero-copy access
921
+ */
922
+ getMemory(): any;
923
+ /**
924
+ * Structured pipeline diagnostics accumulated across every
925
+ * `processGeometryBatch*` call since the last load reset
926
+ * (`clearPrePassCache` / `setEntityIndex`), as a JS object with a
927
+ * `schemaVersion` field — or `undefined` when no batch has run yet.
928
+ * Includes per-batch summed geometry wall time, mesh/triangle counts,
929
+ * the degenerate-backstop drop count, and the CSG failure aggregates.
930
+ */
931
+ getPipelineDiagnostics(): any;
932
+ /**
933
+ * Inspect authored cant and superelevation records at a physical distance.
934
+ * Cant exposes bracketing source records only; no transition value is
935
+ * fabricated. Superelevation blocks preserve their authored bounds.
936
+ */
937
+ inspectLandXmlAlignmentAtDistance(data: Uint8Array, alignment_source_id: string, distance: number): LandXmlAlignmentInspectionJs;
938
+ /**
939
+ * Create and initialize the IFC API
940
+ */
941
+ constructor();
942
+ /**
943
+ * Parse the file and return every `IfcAlignment` directrix as a flat
944
+ * `Float32Array` of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` in
945
+ * the renderer's Y-up world space (RTC-subtracted, metres). Consecutive
946
+ * samples form line segments. Feed straight to
947
+ * `renderer.setLineOverlay('alignment', ...)`.
948
+ *
949
+ * Returns an empty array when the file has no alignments (or none with a
950
+ * resolvable Axis curve), so the caller can clear the overlay cheaply.
951
+ */
952
+ parseAlignmentLines(content: string): Float32Array;
953
+ /**
954
+ * Parse alignments in the exact RTC frame selected by the mesh pre-pass.
955
+ */
956
+ parseAlignmentLinesInFrame(content: string, frame: RtcFrame): Float32Array;
957
+ /**
958
+ * Parse the file and return structured per-axis data (tag + endpoints) in
959
+ * the renderer's Y-up world space (RTC-subtracted, metres). Use this when
960
+ * you also need the axis tags (to render grid bubbles / labels).
961
+ */
962
+ parseGridAxes(content: string): GridAxisCollection;
963
+ /**
964
+ * Parse structured grid axes in the exact frame selected by the mesh pre-pass.
965
+ */
966
+ parseGridAxesInFrame(content: string, frame: RtcFrame): GridAxisCollection;
967
+ /**
968
+ * Parse the file and return every `IfcGridAxis` as a flat `Float32Array`
969
+ * of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` (one segment per
970
+ * axis) in the renderer's Y-up world space (RTC-subtracted, metres). Feed
971
+ * straight to a line pipeline (e.g. `renderer.setLineOverlay('grid', …)`).
972
+ *
973
+ * Returns an empty array when the file has no grids, so the caller can
974
+ * clear the overlay cheaply.
975
+ */
976
+ parseGridLines(content: string): Float32Array;
977
+ /**
978
+ * Parse grid line vertices in the exact frame selected by the mesh pre-pass.
979
+ */
980
+ parseGridLinesInFrame(content: string, frame: RtcFrame): Float32Array;
981
+ /**
982
+ * Parse all currently supported LandXML source families from the original
983
+ * bytes. Terrain-only and alignment-only sources both return an honest
984
+ * empty sibling collection, allowing the viewer's single load path to
985
+ * handle either form and mixed documents uniformly.
986
+ */
987
+ parseLandXmlSourceBytes(data: Uint8Array): LandXmlSourceDocumentJs;
988
+ /**
989
+ * Parse a source with explicit hostile-input bounds. Passing
990
+ * `cancelled: true` refuses before entering WASM; in-flight browser
991
+ * cancellation is performed by terminating the worker that owns this
992
+ * synchronous operation.
993
+ */
994
+ parseLandXmlSourceBytesWithOptions(data: Uint8Array, options: any): LandXmlSourceDocumentJs;
995
+ /**
996
+ * Parse a supported LandXML TIN document from its original bytes.
997
+ *
998
+ * The object is an owned serialization of the semantic document. Errors
999
+ * deliberately use `LandXmlError::Display`, including its stable LXML code.
1000
+ */
1001
+ parseLandXmlTinBytes(data: Uint8Array): LandXmlTinDocumentJs;
1002
+ /**
1003
+ * Parse IFC file and extract symbolic representations (Plan,
1004
+ * Annotation, FootPrint, Axis). These are 2D curves used for
1005
+ * architectural drawings instead of sectioning 3D geometry.
1006
+ *
1007
+ * This standalone entry point detects an RTC frame from the whole source.
1008
+ * Use `parseSymbolicRepresentationsInFrame` when the symbols accompany
1009
+ * meshes produced by a streaming pre-pass or federation override.
1010
+ *
1011
+ * Example:
1012
+ * ```javascript
1013
+ * const api = new IfcAPI();
1014
+ * const symbols = api.parseSymbolicRepresentations(ifcData);
1015
+ * console.log('Found', symbols.totalCount, 'symbolic items');
1016
+ * for (let i = 0; i < symbols.polylineCount; i++) {
1017
+ * const polyline = symbols.getPolyline(i);
1018
+ * console.log('Polyline for', polyline.ifcType, ':', polyline.points);
1019
+ * }
1020
+ * ```
1021
+ */
1022
+ parseSymbolicRepresentations(content: string): SymbolicRepresentationCollection;
1023
+ /**
1024
+ * Parse symbolic representations in the exact RTC frame selected by the
1025
+ * browser mesh pre-pass rather than detecting a second frame from the
1026
+ * whole source.
1027
+ */
1028
+ parseSymbolicRepresentationsInFrame(content: string, frame: RtcFrame): SymbolicRepresentationCollection;
1029
+ /**
1030
+ * Create a calibrated image annotation through canonical native geometry.
1031
+ * Input is AnnotationPlaneRequest; output UTF-8 AnnotationPlanePlan JSON.
1032
+ * Does not mutate the IFC snapshot or decode the host-owned image.
1033
+ */
1034
+ planAnnotationPlane(content: Uint8Array, request_json: string): Uint8Array;
1035
+ /**
1036
+ * Plan image/UV edits against an effective IFC snapshot without mutating it.
1037
+ * JSON input uses AppearanceRequest; output is UTF-8 AppearancePlan JSON.
1038
+ * Call from a worker, then validate sourceRevision and allocator before an
1039
+ * atomic host commit. Preview UVs describe an unsplit canonical mesh item.
1040
+ */
1041
+ planAppearance(content: Uint8Array, request_json: string): Uint8Array;
1042
+ /**
1043
+ * Create a captured textured surface through canonical native geometry.
1044
+ * Input is CapturedMeshRequest; output UTF-8 CapturedMeshPlan JSON.
1045
+ * Does not mutate the IFC snapshot or decode the host-owned image.
1046
+ */
1047
+ planCapturedMesh(content: Uint8Array, request_json: string): Uint8Array;
1048
+ /**
1049
+ * Plan opt-in map similarity normalization on a completed STEP export.
1050
+ * Returns entity patches, allocated IDs and atomic refusal warnings as JSON.
1051
+ */
1052
+ planMapConversionNormalization(content: Uint8Array): string;
1053
+ /**
1054
+ * Registered mesh observations over canonical target albedo. Host verifies
1055
+ * original GLB identity against decoded source mesh/image and freezes frames.
1056
+ * Run in an owned cancellable worker. IFPA output adds `transfer` coverage;
1057
+ * `plan` is null when no sample is observed. Never infer accuracy approval.
1058
+ */
1059
+ planMeshTransfer(content: Uint8Array, request_json: string, rgba: Uint8Array): Uint8Array;
1060
+ /**
1061
+ * Finite-page composition over original canonical albedo. RGBA is supplied
1062
+ * separately from the bounded JSON request. Result: IFPA magic, little-endian
1063
+ * u32 JSON byte length, metadata JSON, then PNG bytes addressed by metadata.
1064
+ * Run in a cancellable worker; atomically adopt every item asset and IFC edit.
1065
+ */
1066
+ planPageAppearance(content: Uint8Array, request_json: string, rgba: Uint8Array): Uint8Array;
1067
+ /**
1068
+ * Plan an opaque polygonal PDF fill page as canonical IfcAnnotation
1069
+ * geometry with a provenance property set. An exact page plans directly; a
1070
+ * page with visible omissions needs the accepted fidelity report digest.
1071
+ */
1072
+ planPdfFillAnnotation(source: Uint8Array, request_json: string): Uint8Array;
1073
+ /**
1074
+ * Registered RGB point-cloud observations (#4381). `request_json.source`
1075
+ * is `{kind:'points', …}`; `positions` (3n f64, source-frame metres) and
1076
+ * `colors` (3n RGB8) are the payload, `normals` (3n f32, oriented) and
1077
+ * `stations` (n indices into `source.viewpoints`) are empty when absent.
1078
+ * `rgba` carries only the target's existing rasters. Same output as
1079
+ * `planMeshTransfer`; `transfer.source` records the orientation used.
1080
+ */
1081
+ planPointTransfer(content: Uint8Array, request_json: string, rgba: Uint8Array, positions: Float64Array, colors: Uint8Array, normals: Float32Array, stations: Uint32Array): Uint8Array;
1082
+ /**
1083
+ * Prepare bounded ordered PDF vector graphics states and the page fidelity
1084
+ * report (convertible paths, omissions with extent, exact/raster-only).
1085
+ */
1086
+ preparePdfVectorPage(request_json: string): Uint8Array;
1087
+ /**
1088
+ * Evaluate one supported horizontal-alignment source span at an exact
1089
+ * f64 distance. The binding reuses the native validator, so malformed
1090
+ * deserialized records, discontinuities, unresolved references, and
1091
+ * unsupported transition domains are rejected rather than approximated.
1092
+ */
1093
+ probeLandXmlAlignmentAtDistance(data: Uint8Array, alignment_source_id: string, distance: number, offset_right: number): LandXmlAlignmentProbeJs;
1094
+ /**
1095
+ * Evaluate a bounded set of physical locations carrying a displayed
1096
+ * station label. A duplicate label is real, never collapsed; an
1097
+ * excessive number is refused rather than allocated synchronously.
1098
+ */
1099
+ probeLandXmlAlignmentAtStation(data: Uint8Array, alignment_source_id: string, station: number, offset_right: number): LandXmlAlignmentProbesJs;
1100
+ /**
1101
+ * Process geometry for a subset of pre-scanned entities → flat
1102
+ * MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
1103
+ * Thin wrapper over [`IfcAPI::produce_batch`]; converts each produced mesh
1104
+ * to MeshDataJs (the IFC Z-up→WebGL Y-up rotation with preserved winding happens
1105
+ * there). Flat indices preserve source order through this proper rotation.
1106
+ */
1107
+ 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;
1108
+ /**
1109
+ * Like [`IfcAPI::process_geometry_batch`] but reads the source bytes held by
1110
+ * [`IfcAPI::set_source_bytes`] instead of taking `data`. Byte-for-byte
1111
+ * identical output — it delegates to the legacy twin with the held slice.
1112
+ */
1113
+ 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;
1114
+ /**
1115
+ * Like [`IfcAPI::process_geometry_batch`] but collates the batch's meshes
1116
+ * into a GPU-instancing shard (IFNS wire format) instead of a flat
1117
+ * MeshCollection. Repeated geometry collapses to one template + per-
1118
+ * occurrence transforms; non-instanceable meshes ride as flat singleton
1119
+ * templates so nothing is dropped. The shard stays in the producer-native
1120
+ * (IFC Z-up) frame — the renderer composes the constant Z-up→Y-up swap at
1121
+ * upload. Each batch shard renders independently: affinity routing already
1122
+ * co-locates identical geometry on one worker, so per-batch collation
1123
+ * captures ~all the dedup and no cross-batch merge is needed. Returns empty
1124
+ * bytes only when the batch produced zero non-empty meshes.
1125
+ */
1126
+ 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;
1127
+ /**
1128
+ * Produce a batch ONCE and PARTITION it (the instanced-ONLY path): opaque
1129
+ * ordinary occurrences (colour alpha >= 0.99 AND geometry_class == 0) are
1130
+ * collated into the instanced shard; everything else (transparent glass,
1131
+ * type-product geometry) goes to the flat MeshCollection. Each mesh takes
1132
+ * exactly ONE route, so produce_batch runs once (no emit-both 2× meshing)
1133
+ * and the renderer draws opaque occurrences via instancing instead of flat.
1134
+ * Partition mirrors the renderer gates: INSTANCED_ALPHA_CUTOFF (0.99 =
1135
+ * OPAQUE_ALPHA_CUTOFF) for transparency, geometry_class for the Model/Types
1136
+ * split.
1137
+ *
1138
+ * NOTE: the renderer must be instanced-feature-complete (picking / selection
1139
+ * / lens overlays on instanced geometry) before the worker calls this in
1140
+ * place of processGeometryBatch — otherwise those features break for the
1141
+ * opaque bulk. See the instanced-only follow-ups.
1142
+ */
1143
+ 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;
1144
+ /**
1145
+ * Like [`IfcAPI::process_geometry_batch_partitioned`] but reads the source
1146
+ * bytes held by [`IfcAPI::set_source_bytes`] instead of taking `data`.
1147
+ * Byte-for-byte identical output — it delegates to the legacy twin.
1148
+ */
1149
+ 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;
1150
+ /**
1151
+ * Propose IFC walls, slabs, columns and pipes from a scan segmentation
1152
+ * report (#6894). `report_json` is the JSON `segmentScanPoints`
1153
+ * returned; `options_json` is a camelCase `ScanProposalOptions` object
1154
+ * (`{}` for the defaults; `scanToModel` maps the report's frame into the
1155
+ * IFC model frame). Returns the UTF-8 JSON `ScanProposalReport` in the
1156
+ * model frame (Z up, metres). Pure: loads and changes nothing.
1157
+ */
1158
+ proposeScanElements(report_json: string, options_json: string): Uint8Array;
1159
+ /**
1160
+ * Fit bounded manual correspondences in source metres -> IFC world Z-up
1161
+ * metres, reporting held-out errors separately. Does not load or move models.
1162
+ */
1163
+ registerScanCorrespondences(request_json: string): Uint8Array;
1164
+ /**
1165
+ * Sharded pre-pass: resolve ONE contiguous (file-ordered) slice of the
1166
+ * styled-item span list on this worker, against the entity index installed
1167
+ * by `setEntityIndex`. Returns raw resolved maps as flat columns:
1168
+ * `{ orphanIds, orphanColors (f32 rgba per id), geomIds, geomColors,
1169
+ * geomFinishes }`, where `geomFinishes` is the #5582 `[metallic,
1170
+ * roughness]` pair per `geomIds` entry (NaN when unauthored), from
1171
+ * `resolve_geometry_finishes` over this slice.
1172
+ * The host merges shard results IN SHARD ORDER with first-wins per
1173
+ * geometry id, reproducing the serial resolver's file-order precedence,
1174
+ * then hands the merged columns to `finalizePrepassStyles`.
1175
+ * `spans` is `[id, start, len]` triples.
1176
+ */
1177
+ resolveStyledItemsShard(data: Uint8Array, spans: Uint32Array): any;
1178
+ /**
1179
+ * Resolve styled-item spans against the installed source and entity index.
1180
+ */
1181
+ resolveStyledItemsShardFromSource(spans: Uint32Array): any;
1182
+ /**
1183
+ * Read-only walk of the model's authored extrusions and swept disks that
1184
+ * the retained route can represent. Starts no Worker and fetches nothing.
1185
+ * `ids` filters by product STEP ID as `extrusionDefinitions` does.
1186
+ */
1187
+ retainedSources(content: Uint8Array, ids?: Uint32Array | null): RetainedBrowserSources;
1188
+ /**
1189
+ * Fast entity scanning using SIMD-accelerated Rust scanner
1190
+ * Returns array of entity references for data model parsing
1191
+ * Much faster than TypeScript byte-by-byte scanning (5-10x speedup)
1192
+ *
1193
+ * The returned array also carries two own properties describing what the
1194
+ * scan refused (#7393): `oversizedIdCount` (records skipped because their
1195
+ * express id does not fit u32, #3395) and `malformedRecordCount` (0 or 1:
1196
+ * whether a record was dropped for having no terminating `;`, #3695).
1197
+ */
1198
+ scanEntitiesFast(content: string): any;
1199
+ /**
1200
+ * Fast entity scanning from raw bytes (avoids TextDecoder.decode on JS side).
1201
+ * Accepts Uint8Array directly — saves ~2-5s for 487MB files by skipping
1202
+ * JS string creation and UTF-16→UTF-8 conversion.
1203
+ *
1204
+ * Carries the same `oversizedIdCount` / `malformedRecordCount` array
1205
+ * properties as `scanEntitiesFast` (#7393).
1206
+ */
1207
+ scanEntitiesFastBytes(data: Uint8Array): any;
1208
+ /**
1209
+ * SPIKE (sharded pre-pass): scan the entity index over a single byte range.
1210
+ *
1211
+ * Each idle browser geometry worker calls this on its `[range_start,
1212
+ * range_end)` shard; the main thread stitches the returned columns into the
1213
+ * full entity index (byte-identical to the single-threaded
1214
+ * `build_entity_index`) by binary-searching each shard for the previous
1215
+ * shard's `handoff`. Delegates to
1216
+ * `ifc_lite_processing::scan_shard_classified_with_refusals` — a
1217
+ * separately-maintained loop over the same `EntityScanner` primitive as
1218
+ * `scan_shard` (the one the native `build_entity_index_parallel` fans across
1219
+ * cores), plus a per-record class column this sharded path also needs. The
1220
+ * two loops' records/handoff are kept in parity by a dedicated test
1221
+ * (`rust/processing/tests/issue_2053_shard_scan_parity.rs`), not by
1222
+ * delegation — edit one without the other and that test catches the drift.
1223
+ *
1224
+ * Byte offsets returned are GLOBAL (relative to file start), so shards
1225
+ * concatenate without rewriting. Returns a plain object:
1226
+ * `{ ids: Uint32Array, starts: Uint32Array, lengths: Uint32Array,
1227
+ * classes: Uint8Array, handoff: number,
1228
+ * oversizedIdStarts: Uint32Array }`
1229
+ * where `classes` is the parallel per-record prepass class byte
1230
+ * (`PREPASS_CLASS_*`: named code in the low bits plus the geometry-job /
1231
+ * type-candidate flags) the host filters on to rebuild pre-pass span
1232
+ * lists, and `handoff` is the global start of the first entity at/after
1233
+ * `range_end` (the next shard's first real entity), or `-1` at EOF.
1234
+ *
1235
+ * `oversizedIdStarts` carries the global start byte of every record this
1236
+ * shard refused for an express id above `u32::MAX` (#3395). Offsets, not
1237
+ * a count, and deliberately NOT reported from here: a shard begins at an
1238
+ * arbitrary byte, so it can start inside a quoted value and refuse a
1239
+ * string literal shaped like `#4294967297=IFCWALL(` — text no file
1240
+ * declared. Reporting per shard would warn "skipped N records" on a file
1241
+ * that is fine. The host's stitch keeps only the offsets at/after the
1242
+ * retained boundary it computed for this shard and reports once, which is
1243
+ * what makes the number attributable to a record the stitch retained
1244
+ * (#3430).
1245
+ */
1246
+ scanEntityIndexShard(data: Uint8Array, range_start: number, range_end: number): any;
1247
+ /**
1248
+ * Scan a shard of the source installed by `setSourceBytes`.
1249
+ */
1250
+ scanEntityIndexShardFromSource(start: number, end: number): any;
1251
+ /**
1252
+ * Fast geometry-only entity scanning
1253
+ * Scans only entities that have geometry, skipping 99% of non-geometry entities
1254
+ * Returns array of geometry entity references for parallel processing
1255
+ * Much faster than scanning all entities (3x speedup for large files)
1256
+ */
1257
+ scanGeometryEntitiesFast(content: string): any;
1258
+ /**
1259
+ * Detect planes and cylinders (columns, pipes) in a point cloud (#6870). `positions` are xyz f32 metres
1260
+ * (at most 100,000,000 points); `options_json` is a camelCase
1261
+ * `ScanSegmentationOptions` object (`{}` for the defaults). Returns the
1262
+ * UTF-8 JSON `ScanSegmentationReport`. Pure: loads and changes nothing.
1263
+ */
1264
+ segmentScanPoints(positions: Float32Array, options_json: string): Uint8Array;
1265
+ /**
1266
+ * Enable or disable per-entity geometry fingerprinting in
1267
+ * `processGeometryBatch`, used by the viewer's revision-diff feature.
1268
+ *
1269
+ * Pass a positive `tolerance` (metres) to enable — the quantization grid
1270
+ * positions snap to (larger tolerates more float noise, smaller catches
1271
+ * finer edits; below the `f32` precision floor of model-local coordinates,
1272
+ * ~1 mm, mostly hashes noise). Finer than
1273
+ * `ifc_lite_geometry::MIN_GEOM_HASH_TOLERANCE` (1e-6 m) is clamped up to it
1274
+ * — see that constant's doc for why (an `i128` overflow surface, not a
1275
+ * precision win). `null`/`undefined`/non-positive disables. Default: off.
1276
+ */
1277
+ setComputeGeometryHashes(tolerance?: number | null): void;
1278
+ /**
1279
+ * Populate `cached_entity_index` from pre-extracted column arrays.
1280
+ *
1281
+ * Used by the streaming pre-pass to share its already-built entity
1282
+ * index across worker realms via SAB-backed Uint32Arrays — every
1283
+ * process worker would otherwise re-scan the entire file in
1284
+ * `processGeometryBatch`'s lazy build path (~5 s on a 1 GB IFC),
1285
+ * even though the pre-pass worker built the same index minutes
1286
+ * earlier.
1287
+ *
1288
+ * Adopts the three binding-owned columns into a compact [`ColumnarEntityIndex`]
1289
+ * (sorted `u32` columns + binary search) instead of a per-worker
1290
+ * `FxHashMap` — ~229 MB vs ~436 MB on a 19.1 M-entity model (#1682).
1291
+ * [`ColumnarEntityIndex::from_owned_columns`] verifies the id ordering once
1292
+ * (O(n)) and only argsorts if the producer did not emit sorted columns.
1293
+ *
1294
+ * `lengths[i]` is the byte length of entity `ids[i]`, so lookup returns
1295
+ * `(start, start + length)` to match the existing `(start, end)` layout.
1296
+ *
1297
+ * Idempotent in the sense that repeated calls REPLACE the cache —
1298
+ * supports the parser-worker pattern of reusing one IfcAPI across
1299
+ * multiple loads with different files.
1300
+ *
1301
+ * Throws when the three columns disagree in length. Every call is a
1302
+ * content swap, a rejected one included: the previous file's index,
1303
+ * content-scoped caches and pipeline diagnostics are dropped before the
1304
+ * error is raised, and a rejected or empty index leaves no index, so the
1305
+ * next batch scans the bytes it is given.
1306
+ */
1307
+ setEntityIndex(ids: Uint32Array, starts: Uint32Array, lengths: Uint32Array): void;
1308
+ /**
1309
+ * Install the pre-computed set of type ids that an `IfcRelDefinesByType`
1310
+ * instantiates (#957 follow-up), so the worker's first type-product batch
1311
+ * skips the per-worker [`Self::get_or_build_instantiated_type_ids`]
1312
+ * full-file walk. Same injection contract as [`Self::set_referenced_repmaps`].
1313
+ */
1314
+ setInstantiatedTypeIds(ids: Uint32Array): void;
1315
+ /**
1316
+ * Install the pre-computed #1623 Phase 3 don't-bake plan: the flat list of
1317
+ * `IfcRepresentationMap` ids that an `IfcMappedItem` instantiates >= 2 times.
1318
+ * The streaming pre-pass tallies it in the SAME scan that builds the referenced-
1319
+ * repmap set (`styling::build_mapped_instance_plan_from_spans`) and ships the id
1320
+ * list here. The batch path arms its router with it (batch-local template mode),
1321
+ * so a repeated single-solid mapped source materializes ONCE per batch and the
1322
+ * rest ride as instances in the IFNS shard.
1323
+ *
1324
+ * Same injection contract as [`Self::set_referenced_repmaps`]: installed after
1325
+ * `setEntityIndex` (which clears it on content swap), and a no-op absence leaves
1326
+ * the batch path materializing every occurrence (byte-identical). Each id is
1327
+ * stored as `(2, id)` — the batch-local router only needs the eligibility set
1328
+ * (count >= 2); the min-id template slot is unused in batch-local mode.
1329
+ */
1330
+ setMappedInstancePlan(source_ids: Uint32Array): void;
1331
+ /**
1332
+ * Install the pre-computed [`ifc_lite_geometry::MaterialLayerIndex`] (#563)
1333
+ * from its flat SoA encoding, so the worker's first batch skips the
1334
+ * per-worker [`Self::get_or_build_material_layer_index`] full-file decode
1335
+ * scan (the dominant first-batch cost on layered architectural models,
1336
+ * which run this on the DEFAULT view). The streaming pre-pass built the
1337
+ * index once from the `IfcRelAssociatesMaterial` spans it already scanned
1338
+ * (`MaterialLayerIndex::from_spans`) and flat-encoded it here; the flat
1339
+ * encoding round-trips bit-for-bit (proven in `material_layer_index` tests),
1340
+ * so the injected index equals each worker's `from_content` result.
1341
+ *
1342
+ * Same injection contract as [`Self::set_referenced_repmaps`]: installed
1343
+ * after `setEntityIndex`, and a no-op absence leaves the lazy build intact.
1344
+ */
1345
+ setMaterialLayerIndex(element_ids: Uint32Array, axis: Uint32Array, layer_counts: Uint32Array, direction_sense: Float64Array, offset: Float64Array, layer_material_ids: Uint32Array, layer_thicknesses: Float64Array): void;
1346
+ /**
1347
+ * Toggle the "render multilayer walls as a single solid" mode (issue #540).
1348
+ *
1349
+ * When `enabled` is `true`, every subsequent `processGeometryBatch` call
1350
+ * will suppress geometry emission for `IfcBuildingElementPart` entities
1351
+ * whose `IfcRelAggregates` parent wall is sliceable (has an
1352
+ * `IfcMaterialLayerSetUsage`) AND has its own `Representation`. The
1353
+ * parent wall keeps its per-layer sub-mesh colouring, so the visual
1354
+ * result is the same as the layered render but with one mesh per wall
1355
+ * instead of one per layer part — much cheaper for both CPU and GPU.
1356
+ *
1357
+ * Default is `false`. Pass `true` before calling `processGeometryBatch`.
1358
+ */
1359
+ setMergeLayers(enabled: boolean): void;
1360
+ /**
1361
+ * Sharded pre-pass (#5582): stash the shard-merged geometry finishes —
1362
+ * the `geomFinishes` columns `resolveStyledItemsShard` returns, merged
1363
+ * first-wins like `geomColors` — for the next `finalizePrepassStyles` /
1364
+ * `finalizePrepassStylesFromSource` call on this instance, which consumes
1365
+ * them and emits the aligned `styleFinishes`. Without this call that
1366
+ * finalize emits NaN finishes, as it always emitted colours only.
1367
+ */
1368
+ setPrepassGeometryFinishes(geom_ids: Uint32Array, geom_finishes: Float32Array): void;
1369
+ /**
1370
+ * Enable or disable the PARAMETRIC rectangular-opening fast path (the
1371
+ * placement-frame, ground-truth-exact analytic cut) for `processGeometryBatch`.
1372
+ *
1373
+ * DEFAULT ON (corpus-validated; native defaults ON too, and wasm has no env to
1374
+ * read `IFC_LITE_RECT_PARAM`, so both targets default in LOCKSTEP -- the
1375
+ * byte-identical native==wasm contract requires both take the same path). This
1376
+ * toggle is the wasm-side escape hatch mirroring `IFC_LITE_RECT_PARAM=0`.
1377
+ * The path subtracts rectangular openings as exact parametric boxes in the host's
1378
+ * own placement frame (rotated walls included), deferring any non-clean case to
1379
+ * the exact kernel. Pass `false` before `processGeometryBatch` to opt out.
1380
+ */
1381
+ setRectParamFastPath(enabled: boolean): void;
1382
+ /**
1383
+ * Install the pre-computed set of `IfcRepresentationMap` ids referenced by
1384
+ * an `IfcMappedItem` (issue #957), so the worker's first type-product batch
1385
+ * SKIPS the per-worker [`Self::get_or_build_referenced_repmaps`] full-file
1386
+ * walk. The streaming pre-pass built the same set once from the
1387
+ * `IfcMappedItem` spans it already scanned (see
1388
+ * `styling::build_referenced_representation_maps_from_spans`) and ships the
1389
+ * id list here — bit-identical to what each worker would compute, since a
1390
+ * set's membership is order-invariant and consumers only call `.contains`.
1391
+ *
1392
+ * Installed AFTER `setEntityIndex` (which clears this cache on content
1393
+ * swap), so the injected value survives. When this setter is never called
1394
+ * (native path, non-streaming callers), the lazy build path is unchanged.
1395
+ */
1396
+ setReferencedRepmaps(ids: Uint32Array): void;
1397
+ /**
1398
+ * Toggle the tier-independent small-cut skip (#1286). When `true`,
1399
+ * `processGeometryBatch` drops `IfcBooleanResult` differences whose cutter is
1400
+ * tiny relative to its host (steel copes/notches) while keeping the
1401
+ * tessellation tier — so curves stay full-density. The viewer enables this for
1402
+ * the on-screen load; exports/drawings leave it off so their geometry keeps
1403
+ * every cut. Default off ⇒ byte-identical to before.
1404
+ *
1405
+ * Set BEFORE processing — meshes already emitted are not regenerated.
1406
+ */
1407
+ setSkipSmallCuts(on: boolean): void;
1408
+ /**
1409
+ * Store the whole IFC source file ONCE per load so the `*FromSource` batch
1410
+ * variants can read it from the wasm heap instead of re-copying it per call.
1411
+ *
1412
+ * Mirrors the `setEntityIndex` lifecycle: called once per worker per load,
1413
+ * and REPLACES the previous file wholesale (repeated calls swap the bytes),
1414
+ * so a parser/geometry worker reusing one `IfcAPI` across loads is safe.
1415
+ * The bytes must be the exact source the batch jobs' byte spans index into
1416
+ * (the same buffer passed as `data` to the legacy `processGeometryBatch*`),
1417
+ * or the decoded entities won't match — the JS worker installs its own
1418
+ * session buffer, so this holds by construction.
1419
+ *
1420
+ * Taking `Vec<u8>` (by value) means wasm-bindgen hands us ownership of the
1421
+ * single JS→wasm copy directly; we wrap it in `Arc` with no second copy.
1422
+ */
1423
+ setSourceBytes(data: Uint8Array): void;
1424
+ /**
1425
+ * Install the prepass's authored metallic/roughness per style (#5582):
1426
+ * `styleFinishes` carries two floats per `styleIds` entry,
1427
+ * `[metallic, roughness]`, NaN for an unauthored field — the
1428
+ * `styleFinishes` array every prepass result carries beside `styleColors`.
1429
+ * Call it with the same `styleIds` later passed to `processGeometryBatch*`;
1430
+ * finishes set for a different style wire are ignored. Empty arrays clear
1431
+ * them. Malformed lengths never throw: a style without a complete pair
1432
+ * simply gets no finish.
1433
+ *
1434
+ * The batch stamps each returned `MeshDataJs` (`metallic` / `roughness`)
1435
+ * from these, taking each mesh's finish from the style its colour came
1436
+ * from (#5984). Occurrences that ride the instanced (IFNS) shard carry
1437
+ * theirs in the shard's per-instance finish field (v3).
1438
+ */
1439
+ setStyleFinishes(style_ids: Uint32Array, style_finishes: Float32Array): void;
1440
+ /**
1441
+ * Select the tessellation detail level applied by every subsequent
1442
+ * `processGeometryBatch` call (issue #976, step 4).
1443
+ *
1444
+ * `level` is one of `"lowest" | "low" | "medium" | "high" | "highest"`
1445
+ * (case-insensitive). `"medium"` is the default and reproduces the
1446
+ * engine's historical hardcoded densities byte-for-byte; lower levels
1447
+ * trade curved-surface smoothness for throughput, higher levels reduce
1448
+ * faceting on pipes / cylinders / NURBS at a triangle-count cost.
1449
+ * Pass `null`/`undefined` to reset to the default.
1450
+ *
1451
+ * Set BEFORE processing — meshes already emitted are not regenerated.
1452
+ * Throws on an unrecognized level so typos fail loudly instead of
1453
+ * silently rendering at the wrong density.
1454
+ */
1455
+ setTessellationQuality(level?: string | null): void;
1456
+ /**
1457
+ * Simplify already-produced element meshes at per-element demesher
1458
+ * levels (1-4 = cavity removal + clustering at 0.5/0.25/0.10/0.03
1459
+ * triangle ratio, 5 = bounding box).
1460
+ *
1461
+ * One RECORD per input `MeshData` entry (an element may span several
1462
+ * records — per-material submeshes; pass all of them, grouped or not).
1463
+ * Per record `i`: `vertexCounts[i]` vertices from `positions` (and
1464
+ * `normals` when non-empty), `indexCounts[i]` indices from `indices`
1465
+ * (per-record local), `origins[i*3..]`, `localToWorld[i*16..]` valid
1466
+ * only when `localToWorldPresent[i] != 0`, level `levels[i]` (records
1467
+ * of one element must agree). Arrays are the boundary Y-up convention
1468
+ * when `yUp` is true (the browser/SDK case).
1469
+ *
1470
+ * `rtcX/Y/Z` = `coordinateInfo.originShift` (IFC Z-up metres);
1471
+ * `unitScale` = metres per project length unit.
1472
+ */
1473
+ 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;
1474
+ /**
1475
+ * Check if API is initialized
1476
+ */
1477
+ readonly is_ready: boolean;
1478
+ /**
1479
+ * Get version string
1480
+ */
1481
+ readonly version: string;
1482
+ }
1483
+
1484
+ export class LandXmlTinStreamSession {
1485
+ private constructor();
1486
+ free(): void;
1487
+ [Symbol.dispose](): void;
1488
+ abort(): void;
1489
+ advanceChunk(data: Uint8Array): void;
1490
+ /**
1491
+ * Drain only after the renderer has credited this many transport bytes.
1492
+ */
1493
+ drain(max_bytes: number): any;
1494
+ finish(): any;
1495
+ /**
1496
+ * Start the resumable metadata cursor. Consumers must continue draining
1497
+ * until [`Self::output_pending`] is false, then abort/free the session.
1498
+ */
1499
+ finishCursor(): void;
1500
+ header(): any;
1501
+ /**
1502
+ * Whether the host must grant more credited output drain capacity.
1503
+ */
1504
+ outputPending(): boolean;
1505
+ /**
1506
+ * Exact serialized transport bytes currently retained by the Rust queue.
1507
+ */
1508
+ queuedBytes(): number;
1509
+ /**
1510
+ * Complete credited transport records currently retained by the Rust queue.
1511
+ */
1512
+ queuedEvents(): number;
1513
+ }
1514
+
1515
+ /**
1516
+ * Collection of mesh data for returning multiple meshes
1517
+ */
1518
+ export class MeshCollection {
1519
+ private constructor();
1520
+ free(): void;
1521
+ [Symbol.dispose](): void;
1522
+ /**
1523
+ * Get mesh at index (clones — non-destructive). Prefer `takeMesh` on the
1524
+ * hot streaming path; this stays for callers that read meshes more than once.
1525
+ */
1526
+ get(index: number): MeshDataJs | undefined;
1527
+ /**
1528
+ * Check if an RTC offset was applied to these meshes (any non-zero
1529
+ * component). It can be inside 10 km: the placement-bounds fallback
1530
+ * re-bases on the bbox centre when a corner is past 10 km (#4643).
1531
+ */
1532
+ hasRtcOffset(): boolean;
1533
+ /**
1534
+ * #1097 perf: MOVE the mesh at `index` out of the collection (the Vec
1535
+ * buffers are `std::mem::take`-n, leaving an empty stub). The streaming
1536
+ * worker reads each mesh exactly once, so moving avoids the full vertex-
1537
+ * data clone `get` pays — one fewer copy of positions/normals/indices/uvs/
1538
+ * texture per mesh (the JS getters still do the single Rust→JS copy). Calling
1539
+ * it twice for the same index yields the second call a DEFAULT mesh:
1540
+ * `expressId` 0 and every buffer empty, rather than the metadata-bearing
1541
+ * husk the hand-written copy used to leave. The method is read-once by
1542
+ * contract and the wasm-contract test pins this.
1543
+ */
1544
+ takeMesh(index: number): MeshDataJs | undefined;
1545
+ /**
1546
+ * Get building rotation angle in radians (from IfcSite placement)
1547
+ * Returns None if no rotation was detected
1548
+ */
1549
+ readonly buildingRotation: number | undefined;
1550
+ /**
1551
+ * The batch's typed CSG / opening diagnostics as a JS object (the
1552
+ * `GeometryDiagnostics` contract), or `undefined` if none were recorded. The
1553
+ * worker merges these across batches. One serialized value keeps the rich
1554
+ * nested shape as a single FFI crossing instead of dozens of getters.
1555
+ */
1556
+ readonly diagnostics: any;
1557
+ /**
1558
+ * Per-entity world-space AABBs as a `Float64Array`, SIX values per entry
1559
+ * (`minx, miny, minz, maxx, maxy, maxz`), in the same order as
1560
+ * [`Self::geometry_hash_ids`] — entry `i` spans `[6*i, 6*i+6)`. Empty
1561
+ * unless geometry hashing was enabled; the same
1562
+ * `IfcAPI.setComputeGeometryHashes` switch gates both, so nothing is
1563
+ * computed when the diff feature is off.
1564
+ *
1565
+ * Unquantized world `f64` (the file's RTC folded back in), so two
1566
+ * revisions that chose different RTC offsets report the same box. This is
1567
+ * what lets a consumer say "MOVED" honestly instead of inferring it from a
1568
+ * changed hash, which also fires on reshape and on retriangulation.
1569
+ *
1570
+ * **Frame: WebGL Y-up**, like every other box, position, origin and
1571
+ * placement that crosses this boundary (see `MeshDataJs::local_bounds`).
1572
+ * The hasher accumulates in the producer's IFC Z-up frame, so the swap
1573
+ * `(x,y,z) -> (x,z,-y)` is applied here, on the way out. Unconverted, the
1574
+ * boxes would not enclose the very meshes `processGeometryBatch` returns
1575
+ * alongside them. Positions are RTC-relative and this box is absolute, so
1576
+ * a consumer comparing the two folds `rtcOffset*` in — itself Y-up-swapped.
1577
+ *
1578
+ * Present for every hashed entity. Its companion
1579
+ * [`Self::geometry_volume_values`] is not — see there.
1580
+ */
1581
+ readonly geometryAabbValues: Float64Array;
1582
+ /**
1583
+ * Per-entity topology verdict as a `Uint8Array`, one packed byte per entry
1584
+ * in [`Self::geometry_hash_ids`] order:
1585
+ *
1586
+ * * bit 0 (`1`) — every segment closed (no boundary / non-manifold edge)
1587
+ * * bit 1 (`2`) — every segment orientable
1588
+ * * bit 2 (`4`) — every segment a single connected component
1589
+ * * bit 3 (`8`) — the entity produced exactly one segment
1590
+ *
1591
+ * `0x0F` is exactly the set that carries a volume in
1592
+ * [`Self::geometry_volume_values`]. The individual bits are the diagnosis:
1593
+ * a model checker can distinguish "this wall is an open shell" (bit 0
1594
+ * clear) from "this door is a multi-item assembly whose parts may overlap"
1595
+ * (bit 3 clear), which are different findings with different fixes.
1596
+ */
1597
+ readonly geometryClosureFlags: Uint8Array;
1598
+ /**
1599
+ * Number of per-entity geometry fingerprints recorded.
1600
+ */
1601
+ readonly geometryHashCount: number;
1602
+ /**
1603
+ * Express ids for the per-entity geometry fingerprints, parallel to
1604
+ * [`Self::geometry_hash_values`]. Empty unless geometry hashing was
1605
+ * enabled via `IfcAPI.setComputeGeometryHashes`.
1606
+ */
1607
+ readonly geometryHashIds: Uint32Array;
1608
+ /**
1609
+ * Per-entity geometry fingerprints as a `BigUint64Array`, parallel to
1610
+ * [`Self::geometry_hash_ids`]. `u64` is exposed (not hex strings) so JS
1611
+ * can compare with `===` and key maps without allocation. Empty unless
1612
+ * geometry hashing was enabled.
1613
+ */
1614
+ readonly geometryHashValues: BigUint64Array;
1615
+ /**
1616
+ * Per-entity enclosed volume in CUBIC METRES as a `Float64Array`, one
1617
+ * value per entry in [`Self::geometry_hash_ids`] order. `NaN` means NO
1618
+ * TRUSTWORTHY VOLUME — the same absent convention as
1619
+ * [`Self::geometry_aabb_values`] — and it is `NaN` for roughly a third of
1620
+ * entities by design, not by failure.
1621
+ *
1622
+ * A value is emitted only when that entity's produced geometry was
1623
+ * PROVABLY a single closed, orientable, single-component solid, as decided
1624
+ * by the mesher's own orientation pass. Read
1625
+ * `ifc_lite_geometry::GeometryHasher::volume` before treating a `NaN` as a
1626
+ * bug: an open `SurfaceModel`, a material-layered wall (whose slices are
1627
+ * open bands by construction), and any element assembled from more than one
1628
+ * representation item all correctly report nothing rather than a plausible
1629
+ * wrong number. [`Self::geometry_closure_flags`] says which.
1630
+ *
1631
+ * This is NOT a substitute for an IFC `BaseQuantities` `GrossVolume`: it is
1632
+ * the volume of the geometry that was actually meshed, after opening cuts,
1633
+ * and it says nothing about whether a CSG degradation left the host uncut
1634
+ * (see the `diagnostics` getter).
1635
+ */
1636
+ readonly geometryVolumeValues: Float64Array;
1637
+ /**
1638
+ * Get number of meshes
1639
+ */
1640
+ readonly length: number;
1641
+ /**
1642
+ * Get RTC offset X (for converting local coords back to world coords)
1643
+ * Add this to local X coordinates to get world X coordinates
1644
+ */
1645
+ readonly rtcOffsetX: number;
1646
+ /**
1647
+ * Get RTC offset Y
1648
+ */
1649
+ readonly rtcOffsetY: number;
1650
+ /**
1651
+ * Get RTC offset Z
1652
+ */
1653
+ readonly rtcOffsetZ: number;
1654
+ /**
1655
+ * Get total triangle count across all meshes
1656
+ */
1657
+ readonly totalTriangles: number;
1658
+ /**
1659
+ * Get total vertex count across all meshes
1660
+ */
1661
+ readonly totalVertices: number;
1662
+ }
1663
+
1664
+ /**
1665
+ * Individual mesh data with express ID and color (matches MeshData interface)
1666
+ *
1667
+ * `Clone` is derived so the three sites that used to enumerate all 21 fields
1668
+ * by hand -- `get`, `takeMesh` and `MeshCollection`'s own `Clone` -- reduce to
1669
+ * `.cloned()`, `mem::take` and `.clone()`. Adding a field to #3199 meant
1670
+ * editing three literals in lockstep; the allowlist row for this file records
1671
+ * exactly that cost.
1672
+ *
1673
+ * To be precise about what this does and does not buy, because the obvious
1674
+ * claim is wrong: an exhaustive struct literal that OMITS a field is a compile
1675
+ * error, so those literals were never silently lossy. What they were is three
1676
+ * places to edit for one field, and `..Default::default()` is the shortcut a
1677
+ * hurried author reaches for when the compiler complains -- which WOULD be
1678
+ * silently lossy. `Default` is what makes `takeMesh` a one-liner, so the rule
1679
+ * is: TWO literals remain, `new` and `Default` below (both spelled
1680
+ * `Self { .. }`, which is why a grep for `MeshDataJs {` finds neither). Both
1681
+ * must stay exhaustive AND must agree on every field `new` does not take as an
1682
+ * argument. The compiler catches an omitted field in either; it cannot catch
1683
+ * the two DISAGREEING, which is the failure the pair exists to prevent, so
1684
+ * `default_agrees_with_new_on_the_fields_new_does_not_take` covers that.
1685
+ * Never spread `Default` into `new` -- `new` is the only place a field's
1686
+ * initial value is decided, so a field defaulted there is inert everywhere.
1687
+ */
1688
+ export class MeshDataJs {
1689
+ private constructor();
1690
+ free(): void;
1691
+ [Symbol.dispose](): void;
1692
+ /**
1693
+ * Get color as [r, g, b, a] array
1694
+ */
1695
+ readonly color: Float32Array;
1696
+ /**
1697
+ * Get express ID
1698
+ */
1699
+ readonly expressId: number;
1700
+ /**
1701
+ * Geometry provenance for the viewer's Model/Types switch (#957 follow-up):
1702
+ * 0 = occurrence, 1 = orphan type geometry (no occurrence), 2 = instanced
1703
+ * type geometry (hidden in Model mode, shown in Types mode).
1704
+ */
1705
+ readonly geometryClass: number;
1706
+ /**
1707
+ * Source `IfcRepresentationItem`, or `undefined` where identity is merged
1708
+ * away. Never set alongside `materialId` (#3199).
1709
+ */
1710
+ readonly geometryItemId: number | undefined;
1711
+ /**
1712
+ * True when this mesh carries a surface texture (#961).
1713
+ */
1714
+ readonly hasTexture: boolean;
1715
+ /**
1716
+ * Get IFC type name (e.g., "IfcWall", "IfcSpace")
1717
+ */
1718
+ readonly ifcType: string;
1719
+ /**
1720
+ * Get indices as Uint32Array (copy to JS)
1721
+ */
1722
+ readonly indices: Uint32Array;
1723
+ /**
1724
+ * Local (pre-placement, object-space) AABB (issue #1474), WebGL Y-up,
1725
+ * `[minX,minY,minZ,maxX,maxY,maxZ]`. `undefined` when not captured
1726
+ * (wasm-bindgen maps `Option::None` to `undefined`, not `null`).
1727
+ */
1728
+ readonly localBounds: Float32Array | undefined;
1729
+ /**
1730
+ * The resolved `IfcLocalPlacement` chain for this mesh (issue #1474),
1731
+ * row-major 4×4, WebGL Y-up. `undefined` when not captured (see
1732
+ * `local_bounds` above).
1733
+ */
1734
+ readonly localToWorld: Float64Array | undefined;
1735
+ /**
1736
+ * `IfcMaterial` layer sliced, or `undefined` (#3199).
1737
+ */
1738
+ readonly materialId: number | undefined;
1739
+ /**
1740
+ * IFC-authored metallic/roughness (#5582). `undefined` when unauthored.
1741
+ */
1742
+ readonly metallic: number | undefined;
1743
+ /**
1744
+ * Get normals as Float32Array (copy to JS)
1745
+ */
1746
+ readonly normals: Float32Array;
1747
+ /**
1748
+ * Per-element local-frame origin (Float64Array[3], WebGL Y-up, metres):
1749
+ * world position of vertex i = `origin + positions[3i..3i+3]`. Returns
1750
+ * [0,0,0] when positions are absolute (legacy / local frame off).
1751
+ */
1752
+ readonly origin: Float64Array;
1753
+ /**
1754
+ * Get positions as Float32Array (copy to JS)
1755
+ */
1756
+ readonly positions: Float32Array;
1757
+ readonly roughness: number | undefined;
1758
+ /**
1759
+ * Optional SurfaceColour for the "Shading" GLB-export choice — only
1760
+ * present when the file authored a distinct DiffuseColour. JS sees
1761
+ * `undefined` when absent (most files).
1762
+ */
1763
+ readonly shadingColor: Float32Array | undefined;
1764
+ readonly textureHeight: number;
1765
+ /**
1766
+ * Stable texture dedup key (`IfcSurfaceTexture` express id, #1781).
1767
+ * 0 when the mesh is untextured.
1768
+ */
1769
+ readonly textureId: number;
1770
+ /**
1771
+ * Sampler wrap for the S axis (`IfcSurfaceTexture.RepeatS`): true = repeat.
1772
+ */
1773
+ readonly textureRepeatS: boolean;
1774
+ /**
1775
+ * Sampler wrap for the T axis (`IfcSurfaceTexture.RepeatT`): true = repeat.
1776
+ */
1777
+ readonly textureRepeatT: boolean;
1778
+ /**
1779
+ * Decoded RGBA8 texture bytes (`width*height*4`). Empty when untextured.
1780
+ */
1781
+ readonly textureRgba: Uint8Array;
1782
+ /**
1783
+ * External image reference (`IfcImageTexture.URLReference`, #1781) for the
1784
+ * host to resolve — e.g. a sibling image inside the `.ifcZIP`. `undefined`
1785
+ * for untextured meshes and Rust-decoded blob/pixel textures.
1786
+ */
1787
+ readonly textureUrl: string | undefined;
1788
+ readonly textureWidth: number;
1789
+ /**
1790
+ * Get triangle count
1791
+ */
1792
+ readonly triangleCount: number;
1793
+ /**
1794
+ * Per-vertex texture coordinates as Float32Array (u, v pairs). Empty when
1795
+ * the mesh is untextured.
1796
+ */
1797
+ readonly uvs: Float32Array;
1798
+ /**
1799
+ * Get vertex count
1800
+ */
1801
+ readonly vertexCount: number;
1802
+ }
1803
+
1804
+ /**
1805
+ * A mesh's projected footprint outline.
1806
+ *
1807
+ * Contours are closed rings in drawing 2D space (same basis as `projectTo2D`
1808
+ * in `@ifc-lite/drawing-2d`), WITHOUT a duplicated closing vertex.
1809
+ * `axisMin`/`axisMax` are the element's extent along the cut axis (world
1810
+ * units, not flip-adjusted) for band classification on the TS side.
1811
+ */
1812
+ export class MeshOutlineJs {
1813
+ private constructor();
1814
+ free(): void;
1815
+ [Symbol.dispose](): void;
1816
+ /**
1817
+ * Ring `i` as a flat `[u0, v0, u1, v1, …]` array, or `undefined` if out of
1818
+ * range. The ring is closed implicitly (connect the last point to the
1819
+ * first).
1820
+ */
1821
+ contour(index: number): Float32Array | undefined;
1822
+ /**
1823
+ * Element extent (max) along the cut axis, world units.
1824
+ */
1825
+ readonly axisMax: number;
1826
+ /**
1827
+ * Element extent (min) along the cut axis, world units.
1828
+ */
1829
+ readonly axisMin: number;
1830
+ /**
1831
+ * Number of boundary rings (outer + holes).
1832
+ */
1833
+ readonly contourCount: number;
1834
+ }
1835
+
1836
+ /**
1837
+ * Result of [`IfcAPI::process_geometry_batch_partitioned`]: the flat
1838
+ * MeshCollection (transparent + type geometry) and the instanced IFNS shard
1839
+ * (opaque ordinary occurrences) from ONE produce_batch. Take-once accessors so
1840
+ * the JS side moves each out without a clone.
1841
+ */
1842
+ export class PartitionedBatch {
1843
+ private constructor();
1844
+ free(): void;
1845
+ [Symbol.dispose](): void;
1846
+ /**
1847
+ * The flat MeshCollection (transparent glass + type-product geometry).
1848
+ * Moves out — call once.
1849
+ */
1850
+ takeMeshes(): MeshCollection | undefined;
1851
+ /**
1852
+ * The instanced IFNS shard bytes (opaque ordinary occurrences). Moves out.
1853
+ */
1854
+ takeShard(): Uint8Array;
1855
+ /**
1856
+ * Number of occurrences routed into the instanced shard this batch. The viewer
1857
+ * folds this into its total mesh count so the count reflects ALL rendered
1858
+ * geometry (flat + instanced), not just the flat MeshCollection.
1859
+ */
1860
+ readonly instancedOccurrences: number;
1861
+ }
1862
+
1863
+ /**
1864
+ * A collection of extracted profiles.
1865
+ */
1866
+ export class ProfileCollection {
1867
+ private constructor();
1868
+ free(): void;
1869
+ [Symbol.dispose](): void;
1870
+ /**
1871
+ * Get profile at `index`. Returns `undefined` for out-of-bounds index.
1872
+ */
1873
+ get(index: number): ProfileEntryJs | undefined;
1874
+ /**
1875
+ * Number of profiles.
1876
+ */
1877
+ readonly length: number;
1878
+ /**
1879
+ * Express IDs of elements that had an `IfcExtrudedAreaSolid` (direct or
1880
+ * mapped) but whose profile could not be extracted, so they are MISSING
1881
+ * from this collection. Empty on a clean model.
1882
+ */
1883
+ readonly skippedExpressIds: Uint32Array;
1884
+ }
1885
+
1886
+ /**
1887
+ * A single profile entry – raw 2D polygon + world transform.
1888
+ *
1889
+ * Profile points are in **local 2D profile space** (metres).
1890
+ * Apply `transform` to `[x, y, 0, 1]` to get WebGL Y-up world coordinates.
1891
+ */
1892
+ export class ProfileEntryJs {
1893
+ private constructor();
1894
+ free(): void;
1895
+ [Symbol.dispose](): void;
1896
+ /**
1897
+ * Express ID of the building element.
1898
+ */
1899
+ readonly expressId: number;
1900
+ /**
1901
+ * Extrusion depth (metres).
1902
+ */
1903
+ readonly extrusionDepth: number;
1904
+ /**
1905
+ * Extrusion direction `[dx, dy, dz]` in WebGL Y-up world space (unit vector).
1906
+ */
1907
+ readonly extrusionDir: Float32Array;
1908
+ /**
1909
+ * Number of points per hole.
1910
+ */
1911
+ readonly holeCounts: Uint32Array;
1912
+ /**
1913
+ * All hole points concatenated: `[x0, y0, x1, y1, …]` (metres).
1914
+ */
1915
+ readonly holePoints: Float32Array;
1916
+ /**
1917
+ * IFC type name (e.g., `"IfcWall"`).
1918
+ */
1919
+ readonly ifcType: string;
1920
+ /**
1921
+ * Model index for multi-model federation.
1922
+ */
1923
+ readonly modelIndex: number;
1924
+ /**
1925
+ * Outer boundary: flat `[x0, y0, x1, y1, …]` in local profile space (metres).
1926
+ */
1927
+ readonly outerPoints: Float32Array;
1928
+ /**
1929
+ * 4 × 4 column-major transform in WebGL Y-up world space.
1930
+ * `M * [x, y, 0, 1]ᵀ` gives the world position.
1931
+ */
1932
+ readonly transform: Float32Array;
1933
+ }
1934
+
1935
+ /**
1936
+ * Retirement captured before an async call, usable while that call holds the
1937
+ * executor. It cannot create results, replace the Worker or qualify it.
1938
+ */
1939
+ export class RetainedBrowserCancellation {
1940
+ private constructor();
1941
+ free(): void;
1942
+ [Symbol.dispose](): void;
1943
+ retire(): void;
1944
+ }
1945
+
1946
+ /**
1947
+ * One module Worker running the deployed `/smlib/` SDK bundle.
1948
+ */
1949
+ export class RetainedBrowserExecutor {
1950
+ free(): void;
1951
+ [Symbol.dispose](): void;
1952
+ cancellation(): RetainedBrowserCancellation;
1953
+ /**
1954
+ * Families this actual Worker can execute now. Reads its SDK capability
1955
+ * bits; curved families additionally need `qualifyNumericalRoutes`.
1956
+ */
1957
+ capabilities(): Promise<any>;
1958
+ /**
1959
+ * Explicit allocation only: starts one module Worker from `/smlib/`.
1960
+ */
1961
+ constructor();
1962
+ /**
1963
+ * Run this Worker's ordered-region and rational-disk SDK witnesses. A
1964
+ * failure retires it; a replacement must qualify on its own.
1965
+ */
1966
+ qualifyNumericalRoutes(): Promise<void>;
1967
+ retire(): void;
1968
+ }
1969
+
1970
+ /**
1971
+ * The authored retained sources of one model. Holding it grants no
1972
+ * execution authority and keeps no Worker alive.
1973
+ */
1974
+ export class RetainedBrowserSources {
1975
+ private constructor();
1976
+ free(): void;
1977
+ [Symbol.dispose](): void;
1978
+ /**
1979
+ * Evaluate source `index` on `executor` and publish its display. A family
1980
+ * the actual Worker cannot run is refused before anything is submitted.
1981
+ * The Worker object is released once its copied mesh is published.
1982
+ */
1983
+ execute(index: number, executor: RetainedBrowserExecutor, chord_metres: number, angle_degrees: number, max_bytes: number): Promise<any>;
1984
+ /**
1985
+ * Every refused source or occurrence, with its reason; never dropped.
1986
+ */
1987
+ refused(): any;
1988
+ /**
1989
+ * Admitted sources: `{ index, solid_id, family, key, product_ids }`.
1990
+ */
1991
+ sources(): any;
1992
+ }
1993
+
1994
+ /**
1995
+ * The traced outline. Owns wasm memory: call `free()`.
1996
+ */
1997
+ export class ScanOutlineJs {
1998
+ private constructor();
1999
+ free(): void;
2000
+ [Symbol.dispose](): void;
2001
+ /**
2002
+ * Every ring's plane coordinates concatenated, `[u0, v0, u1, v1, …]`.
2003
+ */
2004
+ coords(): Float64Array;
2005
+ /**
2006
+ * What the run did: cell size, cap hits, ring counts, repairs.
2007
+ */
2008
+ diagnostics(): ScanOutlineDiagnosticsJs;
2009
+ /**
2010
+ * Vertex count of each ring, in `coords()` order.
2011
+ */
2012
+ ringLengths(): Uint32Array;
2013
+ /**
2014
+ * The ring directly containing each ring (a hole's outer boundary, an
2015
+ * island's hole), or `-1` at top level.
2016
+ */
2017
+ ringParents(): Int32Array;
2018
+ /**
2019
+ * Ring index at which each shape starts; entry `s` is shape `s`'s outer
2020
+ * ring and the rings up to the next entry are its holes.
2021
+ */
2022
+ shapeOffsets(): Uint32Array;
2023
+ /**
2024
+ * Every ring mapped through the plane frame, `[x0, y0, z0, …]` in
2025
+ * `coords()` order, or `undefined` when no frame was given.
2026
+ */
2027
+ worldCoords(): Float64Array | undefined;
2028
+ /**
2029
+ * Total number of rings (outer boundaries and holes).
2030
+ */
2031
+ readonly ringCount: number;
2032
+ /**
2033
+ * Number of outer boundaries.
2034
+ */
2035
+ readonly shapeCount: number;
2036
+ }
2037
+
2038
+ /**
2039
+ * Flat result of `simplifyMeshes`: per surviving element `i`,
2040
+ * `vertexCounts[i]` vertices and `indexCounts[i]` indices taken in order
2041
+ * from the concatenated arrays (mirrors the `exportGlbFromMeshes` wire
2042
+ * convention). `localPositions` is 1:1 with `renderPositions` (f64, file
2043
+ * units, element object frame); `localIndices` is 1:1 with `renderIndices`
2044
+ * but in the IFC frame's winding. Skipped elements are reported in
2045
+ * `skippedIds` / `skippedReasons` and must keep their original geometry.
2046
+ */
2047
+ export class SimplifiedMeshes {
2048
+ private constructor();
2049
+ free(): void;
2050
+ [Symbol.dispose](): void;
2051
+ readonly cavitiesDropped: Uint32Array;
2052
+ readonly elementIds: Uint32Array;
2053
+ readonly indexCounts: Uint32Array;
2054
+ readonly levels: Uint8Array;
2055
+ readonly localIndices: Uint32Array;
2056
+ readonly localPositions: Float64Array;
2057
+ readonly renderIndices: Uint32Array;
2058
+ readonly renderNormals: Float32Array;
2059
+ /**
2060
+ * xyz per element (frame matches the render positions' convention).
2061
+ */
2062
+ readonly renderOrigins: Float64Array;
2063
+ readonly renderPositions: Float32Array;
2064
+ readonly skippedIds: Uint32Array;
2065
+ /**
2066
+ * Skip reason per `skippedIds` entry (stable slugs:
2067
+ * `no-geometry` / `missing-placement` / `singular-placement` /
2068
+ * `empty-result` / `invalid-unit-scale`).
2069
+ */
2070
+ readonly skippedReasons: any[];
2071
+ readonly trisAfter: Uint32Array;
2072
+ readonly trisBefore: Uint32Array;
2073
+ readonly vertexCounts: Uint32Array;
2074
+ }
2075
+
2076
+ /**
2077
+ * A persistent, editable floor-plate topology. See the module docs.
2078
+ */
2079
+ export class SpacePlateHandle {
2080
+ free(): void;
2081
+ [Symbol.dispose](): void;
2082
+ /**
2083
+ * Author a new room from a flat ring `[x0, y0, x1, y1, …]` (no repeated
2084
+ * closing vertex). `source` `-1` marks a user-drawn room. Winding is
2085
+ * normalised to CCW; returns the new room patch. The room is its own
2086
+ * connected component — it does not merge into existing topology.
2087
+ */
2088
+ addFace(coords: Float64Array, source: number): any;
2089
+ /**
2090
+ * Bounding half-edges of a face paired with their source element —
2091
+ * `[{ edge, source }, …]` — for `IfcRelSpaceBoundary` at bake.
2092
+ */
2093
+ boundingElements(face: number): any;
2094
+ /**
2095
+ * Dissolve a degree-2 vertex, welding its two edges into one straight
2096
+ * edge between the neighbours — the inverse of `splitEdge`, and the
2097
+ * "delete this corner / node" affordance. Returns the rooms it changed.
2098
+ * Rejects a wall junction (degree ≥ 3) or a weld that would duplicate an
2099
+ * edge.
2100
+ */
2101
+ dissolveVertex(v: number): any;
2102
+ /**
2103
+ * Move a vertex; returns the rooms it changed. A shared wall is one edge
2104
+ * whose endpoints are shared vertices, so one drag updates both rooms.
2105
+ */
2106
+ dragVertex(v: number, x: number, y: number): any;
2107
+ /**
2108
+ * Deep-copy the plate for an undo/redo snapshot. The clone owns its own
2109
+ * heap; the caller must `.free()` it like any handle.
2110
+ */
2111
+ duplicate(): SpacePlateHandle;
2112
+ /**
2113
+ * Absolute area (m²) of a face.
2114
+ */
2115
+ faceArea(face: number): number;
2116
+ /**
2117
+ * Flat outline `[x0, y0, x1, y1, …]` of a face (no repeated closing vertex).
2118
+ */
2119
+ faceOutline(face: number): Float64Array;
2120
+ /**
2121
+ * Nearest live vertex id to `(x, y)` within `tol`, or `undefined`.
2122
+ */
2123
+ findVertexNear(x: number, y: number, tol: number): number | undefined;
2124
+ /**
2125
+ * FACE-BASED build: rooms are the gaps between wall footprint rectangles.
2126
+ * `rectCoords` is flat `[x0, y0, x1, y1, x2, y2, x3, y3, …]` — 8 f64 per wall
2127
+ * (its 4 plan-rectangle corners, CCW). A bounded arrangement face is a room
2128
+ * only if its centroid is outside every rectangle (a gap, not a wall
2129
+ * interior). The room outline IS the net (inner-face) area; `gapBoundary`
2130
+ * gives the centre axis (½ thickness) and the gross outer face.
2131
+ */
2132
+ static fromWallRects(rect_coords: Float64Array, snap_tolerance: number, min_area: number): SpacePlateHandle;
2133
+ /**
2134
+ * Face-based gap-room boundary as flat `[x0, y0, …]`: each edge pushed
2135
+ * OUTWARD (into the wall) by `factor × the source wall's half-thickness`.
2136
+ * `0` → net (the gap / inner faces); `1` → centre axis (½ thickness, the
2137
+ * editable node line on the wall mid); `2` → gross outer face.
2138
+ */
2139
+ gapBoundary(face: number, factor: number): Float64Array;
2140
+ /**
2141
+ * Remove a shared wall, unioning the two rooms it separated. Returns the
2142
+ * surviving room.
2143
+ */
2144
+ mergeFaces(edge: number): any;
2145
+ /**
2146
+ * The room on the far side of a half-edge (its twin's face), or
2147
+ * `undefined`. O(1) — the "who's across this wall" query.
2148
+ */
2149
+ neighborAcross(edge: number): number | undefined;
2150
+ /**
2151
+ * The face outline offset to a wall boundary, as flat `[x0, y0, …]`: each
2152
+ * edge is moved by its own wall's half-thickness — inward when `inset`
2153
+ * (the net / inner face), outward otherwise (the gross / outer face).
2154
+ * Shared room↔room edges are pinned when pushing outward. Falls back to the
2155
+ * centreline outline when no offset applies — so it's always a sane ring.
2156
+ * (For a `center` boundary just use `faceOutline`.)
2157
+ */
2158
+ netOutline(face: number, inset: boolean): Float64Array;
2159
+ /**
2160
+ * Build a plate from flat wall-axis segments.
2161
+ *
2162
+ * `segCoords`: `[ax, ay, bx, by, …]` (length a multiple of 4).
2163
+ * `segSources`: one `i32` per segment, `-1` for none.
2164
+ * `segHalfThickness`: one `f64` per segment — half the wall's thickness in
2165
+ * metres, carried onto the derived edges for `netOutline`. Pass an empty
2166
+ * array (or all zeros) when thickness is unknown (centreline only).
2167
+ * `snapTolerance` / `minArea`: pass `<= 0` to take the defaults.
2168
+ */
2169
+ constructor(seg_coords: Float64Array, seg_sources: Int32Array, seg_half_thickness: Float64Array, snap_tolerance: number, min_area: number);
2170
+ /**
2171
+ * Sweep the whole plate clean: remove dangling spur walls, isolated nodes,
2172
+ * and redundant collinear nodes — the "clean up orphans" / eraser action.
2173
+ * Area-neutral and idempotent. Returns how many topology elements were
2174
+ * pruned (0 = the plate was already clean); the caller re-renders via
2175
+ * `snapshot` like any other edit.
2176
+ */
2177
+ prune(): number;
2178
+ /**
2179
+ * Remove a wall edge, choosing the right semantics from its two faces:
2180
+ * two real rooms → union them; a bridge / spur / outer-only wall → delete
2181
+ * it and auto-clean the orphaned inner lines and nodes it leaves; a real
2182
+ * enclosing wall (room ↔ exterior) → rejected (`BordersExterior`). This is
2183
+ * the "remove this wall and tidy up" affordance for the orphan cruft the
2184
+ * non-destructive wall arrangement leaves behind. Returns the rooms it
2185
+ * changed (empty if the edge bounded no room).
2186
+ */
2187
+ removeEdge(edge: number): any;
2188
+ /**
2189
+ * Face ids of every live room.
2190
+ */
2191
+ roomIds(): Uint32Array;
2192
+ /**
2193
+ * Set a face's floor / ceiling planes (the vertical dimension that turns a
2194
+ * 2D face into a prismatic space at bake).
2195
+ */
2196
+ setFaceHeight(face: number, floor_z: number, ceiling_z: number, non_planar: boolean): void;
2197
+ /**
2198
+ * All live rooms as `{ face, area, simple, outline }` patches.
2199
+ */
2200
+ snapshot(): any;
2201
+ /**
2202
+ * Insert a new vertex at `(x, y)` on edge `edge`, subdividing it (no new
2203
+ * face). Returns the new vertex id — use it as a `splitFace` endpoint to
2204
+ * cut between points that weren't existing corners. Project `(x, y)` onto
2205
+ * the edge to keep areas unchanged.
2206
+ */
2207
+ splitEdge(edge: number, x: number, y: number): number;
2208
+ /**
2209
+ * Subdivide a face with a partition between two of its vertices. `source`
2210
+ * `-1` marks a brand-new partition (materialised as a fresh wall at bake).
2211
+ * Returns the kept face and the new face.
2212
+ */
2213
+ splitFace(face: number, va: number, vb: number, source: number): any;
2214
+ /**
2215
+ * Number of live rooms.
2216
+ */
2217
+ readonly roomCount: number;
2218
+ }
2219
+
2220
+ /**
2221
+ * A 2D circle/arc for symbolic representations
2222
+ */
2223
+ export class SymbolicCircle {
2224
+ private constructor();
2225
+ free(): void;
2226
+ [Symbol.dispose](): void;
2227
+ readonly centerX: number;
2228
+ readonly centerY: number;
2229
+ readonly endAngle: number;
2230
+ readonly expressId: number;
2231
+ readonly ifcType: string;
2232
+ /**
2233
+ * Check if this is a full circle
2234
+ */
2235
+ readonly isFullCircle: boolean;
2236
+ readonly radius: number;
2237
+ readonly repIdentifier: string;
2238
+ readonly startAngle: number;
2239
+ /**
2240
+ * World-Y elevation captured from the placement chain.
2241
+ */
2242
+ readonly worldY: number;
2243
+ }
2244
+
2245
+ /**
2246
+ * A 2D filled region (IfcAnnotationFillArea / IfcAnnotationFillAreaOccurrence).
2247
+ *
2248
+ * Stores one outer ring of 2D points plus an offset table indexing inner
2249
+ * rings (holes). Both rings are stored flat in `points` so the JS side can
2250
+ * view the buffer as one Float32Array. The optional `hatch_*` fields encode
2251
+ * IfcFillAreaStyleHatching (line spacing, primary/secondary angles, line
2252
+ * width) when the IfcStyledItem chain resolves to a hatching style; absent
2253
+ * styles render as a solid fill.
2254
+ *
2255
+ * `holes_offsets` is an inclusive-prefix array describing where each hole
2256
+ * begins. The outer ring is implicitly at `points[0..holes_offsets[0]]`
2257
+ * (or all points if `holes_offsets` is empty). Each `holes_offsets[i]` is a
2258
+ * vertex index, not a byte offset.
2259
+ */
2260
+ export class SymbolicFillArea {
2261
+ private constructor();
2262
+ free(): void;
2263
+ [Symbol.dispose](): void;
2264
+ readonly expressId: number;
2265
+ readonly fillA: number;
2266
+ readonly fillB: number;
2267
+ readonly fillG: number;
2268
+ readonly fillR: number;
2269
+ readonly geometryItemId: number | undefined;
2270
+ readonly hasHatching: boolean;
2271
+ readonly hatchAngle: number;
2272
+ readonly hatchAngleSecondary: number;
2273
+ readonly hatchLineWidth: number;
2274
+ readonly hatchSpacing: number;
2275
+ readonly holeCount: number;
2276
+ /**
2277
+ * Vertex indices marking the start of each hole. Empty = no holes.
2278
+ */
2279
+ readonly holesOffsets: Uint32Array;
2280
+ readonly ifcType: string;
2281
+ readonly pointCount: number;
2282
+ /**
2283
+ * Flattened ring vertices.
2284
+ */
2285
+ readonly points: Float32Array;
2286
+ readonly repIdentifier: string;
2287
+ readonly worldY: number;
2288
+ }
2289
+
2290
+ /**
2291
+ * A single 2D polyline for symbolic representations (Plan, Annotation, FootPrint)
2292
+ * Points are stored as [x1, y1, x2, y2, ...] in 2D coordinates
2293
+ */
2294
+ export class SymbolicPolyline {
2295
+ private constructor();
2296
+ free(): void;
2297
+ [Symbol.dispose](): void;
2298
+ /**
2299
+ * Get express ID of the parent element
2300
+ */
2301
+ readonly expressId: number;
2302
+ /**
2303
+ * Get IFC type name (e.g., "IfcDoor", "IfcWindow")
2304
+ */
2305
+ readonly ifcType: string;
2306
+ /**
2307
+ * Check if this is a closed loop
2308
+ */
2309
+ readonly isClosed: boolean;
2310
+ /**
2311
+ * Get number of points
2312
+ */
2313
+ readonly pointCount: number;
2314
+ /**
2315
+ * Get 2D points as Float32Array [x1, y1, x2, y2, ...]
2316
+ */
2317
+ readonly points: Float32Array;
2318
+ /**
2319
+ * Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
2320
+ */
2321
+ readonly repIdentifier: string;
2322
+ /**
2323
+ * World-Y elevation captured from the placement chain (or first 3D
2324
+ * point's Z component). JS uses this as the canonical bucket key.
2325
+ */
2326
+ readonly worldY: number;
2327
+ }
2328
+
2329
+ /**
2330
+ * Collection of symbolic representations for an IFC model
2331
+ */
2332
+ export class SymbolicRepresentationCollection {
2333
+ private constructor();
2334
+ free(): void;
2335
+ [Symbol.dispose](): void;
2336
+ /**
2337
+ * Get circle at index
2338
+ */
2339
+ getCircle(index: number): SymbolicCircle | undefined;
2340
+ /**
2341
+ * Get all express IDs that have symbolic representations
2342
+ */
2343
+ getExpressIds(): Uint32Array;
2344
+ /**
2345
+ * Get fill area at index.
2346
+ */
2347
+ getFill(index: number): SymbolicFillArea | undefined;
2348
+ /**
2349
+ * Get polyline at index
2350
+ */
2351
+ getPolyline(index: number): SymbolicPolyline | undefined;
2352
+ /**
2353
+ * Get text annotation at index.
2354
+ */
2355
+ getText(index: number): SymbolicText | undefined;
2356
+ /**
2357
+ * Get number of circles/arcs
2358
+ */
2359
+ readonly circleCount: number;
2360
+ /**
2361
+ * Get number of fill areas
2362
+ */
2363
+ readonly fillCount: number;
2364
+ /**
2365
+ * Check if collection is empty. A TRUNCATED result never is, even with no
2366
+ * primitives; the reasoning and the parity test are in `symbolic_truncation.rs`.
2367
+ */
2368
+ readonly isEmpty: boolean;
2369
+ /**
2370
+ * Get number of polylines
2371
+ */
2372
+ readonly polylineCount: number;
2373
+ /**
2374
+ * Get number of text annotations
2375
+ */
2376
+ readonly textCount: number;
2377
+ /**
2378
+ * Get total count of all symbolic items
2379
+ */
2380
+ readonly totalCount: number;
2381
+ /**
2382
+ * Primitive count at which extraction stopped, else `undefined`.
2383
+ */
2384
+ readonly truncatedAt: number | undefined;
2385
+ /**
2386
+ * The bound's numeric value, when the reason has one, else `undefined`.
2387
+ * Absent for the per-item reasons, whose bound is per item and not
2388
+ * comparable with `truncatedAt`.
2389
+ */
2390
+ readonly truncatedLimit: number | undefined;
2391
+ /**
2392
+ * Which bound stopped extraction, else `undefined`. One of
2393
+ * `element-count`, `output-bytes`, `item-depth`, `item-revisits`,
2394
+ * `item-cycle` — the same kebab-case strings the JSON path emits, so a
2395
+ * consumer reading either surface reads one vocabulary.
2396
+ */
2397
+ readonly truncatedReason: string | undefined;
2398
+ }
2399
+
2400
+ /**
2401
+ * A 2D text annotation (IfcTextLiteral / IfcTextLiteralWithExtent).
2402
+ *
2403
+ * Position is in the same 2D coordinate space as `SymbolicPolyline` (i.e. the
2404
+ * floor-plan / annotation overlay's local frame after applying placement +
2405
+ * RTC). The text-orientation pair `(cos, sin)` rotates the baseline from the
2406
+ * `+x` axis. Height is the IFC font height in model units, scaled by the
2407
+ * project's length-unit factor so the renderer can convert directly to world
2408
+ * units. Alignment is the IFC `BoxAlignment` string verbatim
2409
+ * (`top-left`, `center`, `bottom-right`, …) — the renderer can interpret it.
2410
+ */
2411
+ export class SymbolicText {
2412
+ private constructor();
2413
+ free(): void;
2414
+ [Symbol.dispose](): void;
2415
+ readonly alignment: string;
2416
+ readonly colorA: number;
2417
+ readonly colorB: number;
2418
+ readonly colorG: number;
2419
+ readonly colorR: number;
2420
+ readonly content: string;
2421
+ readonly dirX: number;
2422
+ readonly dirY: number;
2423
+ readonly expressId: number;
2424
+ readonly height: number;
2425
+ readonly ifcType: string;
2426
+ readonly repIdentifier: string;
2427
+ readonly targetPx: number;
2428
+ readonly worldY: number;
2429
+ readonly x: number;
2430
+ readonly y: number;
2431
+ }
2432
+
2433
+ /**
2434
+ * One closed solid of a split element.
2435
+ */
2436
+ export class ZonePieceJs {
2437
+ private constructor();
2438
+ free(): void;
2439
+ [Symbol.dispose](): void;
2440
+ /**
2441
+ * Flat triangle indices into `positions`.
2442
+ */
2443
+ readonly indices: Uint32Array;
2444
+ /**
2445
+ * Flat `[x, y, z, ...]` in the caller's frame.
2446
+ */
2447
+ readonly positions: Float64Array;
2448
+ /**
2449
+ * Enclosed volume of this piece, cubic units of the caller's frame.
2450
+ */
2451
+ readonly volume: number;
2452
+ /**
2453
+ * Index into the zone array that was passed in, or `-1` for the part of
2454
+ * the element inside no zone.
2455
+ */
2456
+ readonly zoneIndex: number;
2457
+ }
2458
+
2459
+ /**
2460
+ * The result of splitting one element.
2461
+ */
2462
+ export class ZoneSplitJs {
2463
+ private constructor();
2464
+ free(): void;
2465
+ [Symbol.dispose](): void;
2466
+ /**
2467
+ * Piece `index`, or `undefined` when out of range. Each call COPIES the
2468
+ * piece out, matching the rest of this API surface.
2469
+ */
2470
+ piece(index: number): ZonePieceJs | undefined;
2471
+ readonly pieceCount: number;
2472
+ /**
2473
+ * The part of the element inside NO zone could not be built.
2474
+ *
2475
+ * Separate from `sumErrorRel` because the two have opposite fixes: a
2476
+ * raised sum means the zones overlap and want redrawing, while this means
2477
+ * real volume is MISSING from the result. A caller must refuse the split
2478
+ * outright rather than publish the zone pieces alone.
2479
+ */
2480
+ readonly remainderFailed: boolean;
2481
+ /**
2482
+ * How far the pieces are from summing to the whole, relative.
2483
+ *
2484
+ * The invariant #2508 puts above everything else here. Exposed rather than
2485
+ * enforced: the caller decides what to do with a split that does not add
2486
+ * up (the expected cause is zones that overlap each other), and a number
2487
+ * it can show beats a silent refusal.
2488
+ */
2489
+ readonly sumErrorRel: number;
2490
+ /**
2491
+ * Enclosed volume of the input element.
2492
+ */
2493
+ readonly wholeVolume: number;
2494
+ }
2495
+
2496
+ /**
2497
+ * Compute the intersection solid of one clashing pair.
2498
+ *
2499
+ * `positionsA` / `positionsB` are flat world-space XYZ; `indicesA` /
2500
+ * `indicesB` are flat triangle indices into their own operand.
2501
+ *
2502
+ * ```javascript
2503
+ * const solid = clashIntersectionSolid(posA, idxA, posB, idxB);
2504
+ * if (solid.isSolid) {
2505
+ * draw(solid.positions, solid.indices, solid.volumeM3);
2506
+ * } else {
2507
+ * keepContactMarker(solid.degenerateReason); // e.g. "no-overlap"
2508
+ * }
2509
+ * solid.free();
2510
+ * ```
2511
+ */
2512
+ export function clashIntersectionSolid(positions_a: Float32Array, indices_a: Uint32Array, positions_b: Float32Array, indices_b: Uint32Array): ClashIntersectionSolidJs;
2513
+
2514
+ /**
2515
+ * `a - b`, keeping EVERY disjoint remnant.
2516
+ *
2517
+ * This is the operation the existing `subtract_2d` could not stand in for: it
2518
+ * returns one shape per island, where `subtract_2d` collapses to the largest
2519
+ * (correct for a single extrusion profile, silent geometry loss anywhere else).
2520
+ *
2521
+ * `b` may hold any number of rings; they subtract as their union, so there is
2522
+ * no separate "difference against many" entry point.
2523
+ */
2524
+ export function difference2d(a: Contours2D, b: Contours2D): Contours2D;
2525
+
2526
+ /**
2527
+ * Get WASM memory to allow JavaScript to create TypedArray views
2528
+ */
2529
+ export function get_memory(): any;
2530
+
2531
+ /**
2532
+ * Initialize the WASM module.
2533
+ *
2534
+ * This function is called automatically when the WASM module is loaded.
2535
+ * It sets up panic hooks for better error messages in the browser console,
2536
+ * and points core's scan diagnostics at that console too.
2537
+ */
2538
+ export function init(): void;
2539
+
2540
+ /**
2541
+ * `a ∩ b`.
2542
+ */
2543
+ export function intersection2d(a: Contours2D, b: Contours2D): Contours2D;
2544
+
2545
+ /**
2546
+ * Compute the winding-robust 2D footprint outline of a triangle mesh.
2547
+ *
2548
+ * `positions` is flat XYZ; `indices` is flat triangle indices. `axis` is
2549
+ * 0/1/2 = x/y/z (the cut axis, WebGL Y-up). Returns `undefined` when the mesh
2550
+ * has no triangles or projects to nothing: the element has no footprint.
2551
+ *
2552
+ * THROWS when the outline was not computed: an `axis` outside 0..=2, or a
2553
+ * mesh with more valid projected triangles than the overlay budget (50 000).
2554
+ * The viewer's outline provider catches the throw and draws its TypeScript
2555
+ * silhouette for that mesh.
2556
+ *
2557
+ * ```javascript
2558
+ * const outline = meshOutline2d(positions, indices, 1, false); // axis 1 = y
2559
+ * if (outline) {
2560
+ * for (let i = 0; i < outline.contourCount; i++) {
2561
+ * const ring = outline.contour(i); // Float32Array of [u0, v0, u1, v1, ...]
2562
+ * }
2563
+ * outline.free();
2564
+ * }
2565
+ * ```
2566
+ */
2567
+ export function meshOutline2d(positions: Float32Array, indices: Uint32Array, axis: number, flipped: boolean): MeshOutlineJs | undefined;
2568
+
2569
+ /**
2570
+ * Resolve a ring soup into disjoint outer/hole shapes without changing the
2571
+ * area it covers (a self-union). Use it to give a hand-built set — or a
2572
+ * `meshOutline2d` result — the shape grouping the operations produce.
2573
+ */
2574
+ export function resolve2d(a: Contours2D): Contours2D;
2575
+
2576
+ /**
2577
+ * Install (or, with `undefined`, remove) the callback invoked at most once a
2578
+ * second while geometry work is in progress inside a WASM call. It runs
2579
+ * synchronously inside that call, so it must only do something cheap such as
2580
+ * `postMessage`, and must not call back into this module.
2581
+ */
2582
+ export function setGeometryProgressCallback(callback?: Function | null): void;
2583
+
2584
+ /**
2585
+ * Split a mesh into one closed solid per zone, plus the remainder.
2586
+ *
2587
+ * `positions` is flat XYZ (f64, caller's frame), `indices` flat triangle
2588
+ * indices. `zones` is flat, SEVEN numbers per zone:
2589
+ * `[cx, cy, cz, sx, sy, sz, rotationY]`, where the sizes are FULL extents
2590
+ * (matching the viewer's `Zone.size`) and the rotation is radians about the
2591
+ * vertical axis. A trailing partial zone is ignored rather than guessed at.
2592
+ *
2593
+ * A zone becomes a PRISM (#2508 item 4) when `footprint_counts[i]` is at
2594
+ * least 3: it then takes that many `[x, z]` pairs from `footprints`, in order,
2595
+ * and uses the 7-tuple only for its vertical extent (`cy +/- sy/2`). The
2596
+ * footprint must be CONVEX; the viewer gates that on import, because a concave
2597
+ * polygon fans into overlapping triangles and would cut wrong rather than
2598
+ * fail. A count of 1 or 2 is not a polygon: it still consumes its pairs, so
2599
+ * later zones stay aligned, and leaves that zone a box. Passing empty arrays
2600
+ * keeps every zone a box.
2601
+ *
2602
+ * The caller must have established that the mesh is a closed orientable solid
2603
+ * first, exactly as it must before quoting a volume at all (#1891/#1993): a
2604
+ * clip of an open shell produces pieces whose volumes are arbitrary rather
2605
+ * than approximate.
2606
+ *
2607
+ * A triangle with an out-of-range index or a non-finite coordinate is DROPPED
2608
+ * rather than reported, matching `kernel::mesh_bridge::mesh_to_tris`, which is
2609
+ * panic-free for the same reason: the alternative is a crash deep in the
2610
+ * predicates. It does mean a malformed caller can open the surface and get
2611
+ * meaningless volumes with a plausible `sumErrorRel`, so the closure proof
2612
+ * above is the caller's responsibility and not a formality.
2613
+ *
2614
+ * Returns `undefined` when a zone parameter is non-finite, or a mesh vertex
2615
+ * or zone corner lies past ±2^128, the exact kernel's coordinate bound
2616
+ * (#7677): such a split is refused rather than answered wrongly.
2617
+ *
2618
+ * Returns `undefined` if an intersection, zone union or remainder exhausts
2619
+ * the exact kernel's work budget. Completed pieces are not returned as a
2620
+ * successful partial split, and a failed empty piece is not treated as disjoint.
2621
+ *
2622
+ * Returns `undefined` when the mesh encloses no volume (no triangles survive
2623
+ * the filter above, or the shell is degenerate): there is nothing to split,
2624
+ * and a result for it would report `pieceCount` 1, `sumErrorRel` 0 and
2625
+ * `remainderFailed` false, a perfect split of nothing. A caller that gates
2626
+ * on those numbers must treat `undefined` as "no split", not as "no error".
2627
+ *
2628
+ * ```javascript
2629
+ * const split = splitMeshByZones(positions, indices, new Float64Array([
2630
+ * 0, 0, 0, 10, 10, 10, 0,
2631
+ * ]));
2632
+ * if (!split) return; // no usable complete split
2633
+ * for (let i = 0; i < split.pieceCount; i++) {
2634
+ * const piece = split.piece(i);
2635
+ * // piece.zoneIndex, piece.positions, piece.indices, piece.volume
2636
+ * piece.free();
2637
+ * }
2638
+ * split.free();
2639
+ * ```
2640
+ */
2641
+ export function splitMeshByZones(positions: Float64Array, indices: Uint32Array, zones: Float64Array, footprints?: Float64Array | null, footprint_counts?: Uint32Array | null): ZoneSplitJs | undefined;
2642
+
2643
+ /**
2644
+ * Trace closed outlines from slab points given in plane coordinates.
2645
+ *
2646
+ * THROWS on invalid options or plane frame (unknown field, non-finite or
2647
+ * out-of-range value). Points that are not finite are skipped and counted.
2648
+ */
2649
+ export function traceScanOutline(plane_xy: Float32Array, options?: ScanOutlineOptionsJs | null, plane_frame?: ScanOutlinePlaneFrameJs | null): ScanOutlineJs;
2650
+
2651
+ /**
2652
+ * `a ∪ b`.
2653
+ */
2654
+ export function union2d(a: Contours2D, b: Contours2D): Contours2D;
2655
+
2656
+ /**
2657
+ * Get the version of IFC-Lite.
2658
+ *
2659
+ * # Returns
2660
+ *
2661
+ * Version string (e.g., "0.1.0")
2662
+ *
2663
+ * # Example
2664
+ *
2665
+ * ```javascript
2666
+ * console.log(`IFC-Lite version: ${version()}`);
2667
+ * ```
2668
+ */
2669
+ export function version(): string;
2670
+
2671
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
2672
+
2673
+ export interface InitOutput {
2674
+ readonly memory: WebAssembly.Memory;
2675
+ readonly __wbg_alignmentaxisjs_free: (a: number, b: number) => void;
2676
+ readonly __wbg_clashintersectionsolidjs_free: (a: number, b: number) => void;
2677
+ readonly __wbg_clashrunresult_free: (a: number, b: number) => void;
2678
+ readonly __wbg_clashsession_free: (a: number, b: number) => void;
2679
+ readonly __wbg_contours2d_free: (a: number, b: number) => void;
2680
+ readonly __wbg_gridaxiscollection_free: (a: number, b: number) => void;
2681
+ readonly __wbg_gridaxisjs_free: (a: number, b: number) => void;
2682
+ readonly __wbg_ifcapi_free: (a: number, b: number) => void;
2683
+ readonly __wbg_landxmltinstreamsession_free: (a: number, b: number) => void;
2684
+ readonly __wbg_meshcollection_free: (a: number, b: number) => void;
2685
+ readonly __wbg_meshdatajs_free: (a: number, b: number) => void;
2686
+ readonly __wbg_meshoutlinejs_free: (a: number, b: number) => void;
2687
+ readonly __wbg_partitionedbatch_free: (a: number, b: number) => void;
2688
+ readonly __wbg_profilecollection_free: (a: number, b: number) => void;
2689
+ readonly __wbg_profileentryjs_free: (a: number, b: number) => void;
2690
+ readonly __wbg_retainedbrowsercancellation_free: (a: number, b: number) => void;
2691
+ readonly __wbg_retainedbrowserexecutor_free: (a: number, b: number) => void;
2692
+ readonly __wbg_retainedbrowsersources_free: (a: number, b: number) => void;
2693
+ readonly __wbg_scanoutlinejs_free: (a: number, b: number) => void;
2694
+ readonly __wbg_simplifiedmeshes_free: (a: number, b: number) => void;
2695
+ readonly __wbg_spaceplatehandle_free: (a: number, b: number) => void;
2696
+ readonly __wbg_symboliccircle_free: (a: number, b: number) => void;
2697
+ readonly __wbg_symbolicfillarea_free: (a: number, b: number) => void;
2698
+ readonly __wbg_symbolicpolyline_free: (a: number, b: number) => void;
2699
+ readonly __wbg_symbolicrepresentationcollection_free: (a: number, b: number) => void;
2700
+ readonly __wbg_symbolictext_free: (a: number, b: number) => void;
2701
+ readonly __wbg_zonepiecejs_free: (a: number, b: number) => void;
2702
+ readonly __wbg_zonesplitjs_free: (a: number, b: number) => void;
2703
+ readonly alignmentaxisjs_GlobalId: (a: number, b: number) => void;
2704
+ readonly alignmentaxisjs_Name: (a: number, b: number) => void;
2705
+ readonly alignmentaxisjs_approximate: (a: number) => number;
2706
+ readonly alignmentaxisjs_evaluate: (a: number, b: number, c: number) => void;
2707
+ readonly alignmentaxisjs_expressId: (a: number) => number;
2708
+ readonly alignmentaxisjs_geometricHorizontalLengthMeters: (a: number) => number;
2709
+ readonly alignmentaxisjs_new: (a: number, b: number, c: number, d: number) => void;
2710
+ readonly clashIntersectionSolid: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
2711
+ readonly clashintersectionsolidjs_degenerateReason: (a: number, b: number) => void;
2712
+ readonly clashintersectionsolidjs_indices: (a: number, b: number) => void;
2713
+ readonly clashintersectionsolidjs_isSolid: (a: number) => number;
2714
+ readonly clashintersectionsolidjs_positions: (a: number, b: number) => void;
2715
+ readonly clashintersectionsolidjs_requiredM: (a: number) => number;
2716
+ readonly clashintersectionsolidjs_thicknessM: (a: number) => number;
2717
+ readonly clashintersectionsolidjs_triangleCount: (a: number) => number;
2718
+ readonly clashintersectionsolidjs_volumeM3: (a: number) => number;
2719
+ readonly clashrunresult_a: (a: number, b: number) => void;
2720
+ readonly clashrunresult_b: (a: number, b: number) => void;
2721
+ readonly clashrunresult_bounds: (a: number, b: number) => void;
2722
+ readonly clashrunresult_depthFloor: (a: number, b: number) => void;
2723
+ readonly clashrunresult_distance: (a: number, b: number) => void;
2724
+ readonly clashrunresult_distanceKind: (a: number, b: number) => void;
2725
+ readonly clashrunresult_points: (a: number, b: number) => void;
2726
+ readonly clashrunresult_status: (a: number, b: number) => void;
2727
+ 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;
2728
+ readonly clashsession_new: () => number;
2729
+ readonly clashsession_runRule: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
2730
+ readonly contours2d_bounds: (a: number) => number;
2731
+ readonly contours2d_coords: (a: number) => number;
2732
+ readonly contours2d_fromMeshOutline: (a: number) => number;
2733
+ readonly contours2d_isEmpty: (a: number) => number;
2734
+ readonly contours2d_new: (a: number, b: number, c: number, d: number, e: number) => void;
2735
+ readonly contours2d_ring: (a: number, b: number) => number;
2736
+ readonly contours2d_ringCount: (a: number) => number;
2737
+ readonly contours2d_ringLengths: (a: number) => number;
2738
+ readonly contours2d_shapeCount: (a: number) => number;
2739
+ readonly contours2d_shapeOffsets: (a: number) => number;
2740
+ readonly difference2d: (a: number, b: number) => number;
2741
+ readonly gridaxiscollection_getAxis: (a: number, b: number) => number;
2742
+ readonly gridaxiscollection_isEmpty: (a: number) => number;
2743
+ readonly gridaxiscollection_length: (a: number) => number;
2744
+ readonly gridaxisjs_axisId: (a: number) => number;
2745
+ readonly gridaxisjs_end: (a: number) => number;
2746
+ readonly gridaxisjs_gridId: (a: number) => number;
2747
+ readonly gridaxisjs_start: (a: number) => number;
2748
+ readonly gridaxisjs_tag: (a: number, b: number) => void;
2749
+ readonly ifcapi_buildPrePassOnce: (a: number, b: number, c: number) => number;
2750
+ readonly ifcapi_buildPrePassStreaming: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
2751
+ 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;
2752
+ readonly ifcapi_buildPrePassStreamingShardedWithSourceFingerprint: (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;
2753
+ readonly ifcapi_buildPrePassStreamingWithSourceFingerprint: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
2754
+ readonly ifcapi_calibrateAppearancePlane: (a: number, b: number, c: number, d: number) => void;
2755
+ readonly ifcapi_catalogAppearance: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2756
+ readonly ifcapi_clearPrePassCache: (a: number) => void;
2757
+ readonly ifcapi_createLandXmlTinStreamSession: (a: number, b: number, c: number, d: number) => void;
2758
+ readonly ifcapi_diagnoseGeometry: (a: number, b: number, c: number) => number;
2759
+ readonly ifcapi_exportCsv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
2760
+ readonly ifcapi_exportDfjson: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2761
+ 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;
2762
+ 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, v: number, w: number) => void;
2763
+ readonly ifcapi_exportHbjson: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2764
+ readonly ifcapi_exportHbjsonWithStats: (a: number, b: number, c: number, d: number, e: number) => number;
2765
+ readonly ifcapi_exportIfcx: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2766
+ readonly ifcapi_exportJson: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
2767
+ 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;
2768
+ 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;
2769
+ readonly ifcapi_exportLandXmlTerrain: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
2770
+ readonly ifcapi_exportMerged: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
2771
+ readonly ifcapi_exportObj: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
2772
+ readonly ifcapi_exportStep: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
2773
+ readonly ifcapi_exportUsd: (a: number, b: number, c: number, d: number) => void;
2774
+ readonly ifcapi_extractProfiles: (a: number, b: number, c: number, d: number) => number;
2775
+ readonly ifcapi_extractSweptDiskDescriptions: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2776
+ readonly ifcapi_extrusionDefinitions: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2777
+ 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;
2778
+ readonly ifcapi_finalizePrepassStylesFromSource: (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) => void;
2779
+ readonly ifcapi_getMemory: (a: number) => number;
2780
+ readonly ifcapi_getPipelineDiagnostics: (a: number) => number;
2781
+ readonly ifcapi_inspectLandXmlAlignmentAtDistance: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
2782
+ readonly ifcapi_is_ready: (a: number) => number;
2783
+ readonly ifcapi_new: () => number;
2784
+ readonly ifcapi_parseAlignmentLines: (a: number, b: number, c: number) => number;
2785
+ readonly ifcapi_parseAlignmentLinesInFrame: (a: number, b: number, c: number, d: number, e: number) => void;
2786
+ readonly ifcapi_parseGridAxes: (a: number, b: number, c: number) => number;
2787
+ readonly ifcapi_parseGridAxesInFrame: (a: number, b: number, c: number, d: number, e: number) => void;
2788
+ readonly ifcapi_parseGridLines: (a: number, b: number, c: number) => number;
2789
+ readonly ifcapi_parseGridLinesInFrame: (a: number, b: number, c: number, d: number, e: number) => void;
2790
+ readonly ifcapi_parseLandXmlSourceBytes: (a: number, b: number, c: number, d: number) => void;
2791
+ readonly ifcapi_parseLandXmlSourceBytesWithOptions: (a: number, b: number, c: number, d: number, e: number) => void;
2792
+ readonly ifcapi_parseLandXmlTinBytes: (a: number, b: number, c: number, d: number) => void;
2793
+ readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
2794
+ readonly ifcapi_parseSymbolicRepresentationsInFrame: (a: number, b: number, c: number, d: number, e: number) => void;
2795
+ readonly ifcapi_planAnnotationPlane: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2796
+ readonly ifcapi_planAppearance: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2797
+ readonly ifcapi_planCapturedMesh: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2798
+ readonly ifcapi_planMapConversionNormalization: (a: number, b: number, c: number, d: number) => void;
2799
+ readonly ifcapi_planMeshTransfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
2800
+ readonly ifcapi_planPageAppearance: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
2801
+ readonly ifcapi_planPdfFillAnnotation: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2802
+ readonly ifcapi_planPointTransfer: (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) => void;
2803
+ readonly ifcapi_preparePdfVectorPage: (a: number, b: number, c: number, d: number) => void;
2804
+ readonly ifcapi_probeLandXmlAlignmentAtDistance: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
2805
+ readonly ifcapi_probeLandXmlAlignmentAtStation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
2806
+ 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;
2807
+ 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;
2808
+ 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;
2809
+ 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;
2810
+ 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;
2811
+ readonly ifcapi_proposeScanElements: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2812
+ readonly ifcapi_registerScanCorrespondences: (a: number, b: number, c: number, d: number) => void;
2813
+ readonly ifcapi_resolveStyledItemsShard: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2814
+ readonly ifcapi_resolveStyledItemsShardFromSource: (a: number, b: number, c: number, d: number) => void;
2815
+ readonly ifcapi_retainedSources: (a: number, b: number, c: number, d: number, e: number) => number;
2816
+ readonly ifcapi_scanEntitiesFast: (a: number, b: number, c: number) => number;
2817
+ readonly ifcapi_scanEntitiesFastBytes: (a: number, b: number, c: number) => number;
2818
+ readonly ifcapi_scanEntityIndexShard: (a: number, b: number, c: number, d: number, e: number) => number;
2819
+ readonly ifcapi_scanEntityIndexShardFromSource: (a: number, b: number, c: number) => number;
2820
+ readonly ifcapi_scanGeometryEntitiesFast: (a: number, b: number, c: number) => number;
2821
+ readonly ifcapi_segmentScanPoints: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2822
+ readonly ifcapi_setComputeGeometryHashes: (a: number, b: number, c: number) => void;
2823
+ readonly ifcapi_setEntityIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
2824
+ readonly ifcapi_setInstantiatedTypeIds: (a: number, b: number, c: number) => void;
2825
+ readonly ifcapi_setMappedInstancePlan: (a: number, b: number, c: number) => void;
2826
+ 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;
2827
+ readonly ifcapi_setMergeLayers: (a: number, b: number) => void;
2828
+ readonly ifcapi_setPrepassGeometryFinishes: (a: number, b: number, c: number, d: number, e: number) => void;
2829
+ readonly ifcapi_setRectParamFastPath: (a: number, b: number) => void;
2830
+ readonly ifcapi_setReferencedRepmaps: (a: number, b: number, c: number) => void;
2831
+ readonly ifcapi_setSkipSmallCuts: (a: number, b: number) => void;
2832
+ readonly ifcapi_setSourceBytes: (a: number, b: number, c: number) => void;
2833
+ readonly ifcapi_setStyleFinishes: (a: number, b: number, c: number, d: number, e: number) => void;
2834
+ readonly ifcapi_setTessellationQuality: (a: number, b: number, c: number, d: number) => void;
2835
+ 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;
2836
+ readonly ifcapi_version: (a: number, b: number) => void;
2837
+ readonly intersection2d: (a: number, b: number) => number;
2838
+ readonly landxmltinstreamsession_abort: (a: number) => void;
2839
+ readonly landxmltinstreamsession_advanceChunk: (a: number, b: number, c: number, d: number) => void;
2840
+ readonly landxmltinstreamsession_drain: (a: number, b: number, c: number) => void;
2841
+ readonly landxmltinstreamsession_finish: (a: number, b: number) => void;
2842
+ readonly landxmltinstreamsession_finishCursor: (a: number, b: number) => void;
2843
+ readonly landxmltinstreamsession_header: (a: number, b: number) => void;
2844
+ readonly landxmltinstreamsession_outputPending: (a: number) => number;
2845
+ readonly landxmltinstreamsession_queuedBytes: (a: number) => number;
2846
+ readonly landxmltinstreamsession_queuedEvents: (a: number) => number;
2847
+ readonly meshOutline2d: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
2848
+ readonly meshcollection_buildingRotation: (a: number, b: number) => void;
2849
+ readonly meshcollection_diagnostics: (a: number) => number;
2850
+ readonly meshcollection_geometryAabbValues: (a: number) => number;
2851
+ readonly meshcollection_geometryClosureFlags: (a: number) => number;
2852
+ readonly meshcollection_geometryHashCount: (a: number) => number;
2853
+ readonly meshcollection_geometryHashIds: (a: number) => number;
2854
+ readonly meshcollection_geometryHashValues: (a: number) => number;
2855
+ readonly meshcollection_geometryVolumeValues: (a: number) => number;
2856
+ readonly meshcollection_get: (a: number, b: number) => number;
2857
+ readonly meshcollection_hasRtcOffset: (a: number) => number;
2858
+ readonly meshcollection_length: (a: number) => number;
2859
+ readonly meshcollection_rtcOffsetX: (a: number) => number;
2860
+ readonly meshcollection_rtcOffsetY: (a: number) => number;
2861
+ readonly meshcollection_rtcOffsetZ: (a: number) => number;
2862
+ readonly meshcollection_takeMesh: (a: number, b: number) => number;
2863
+ readonly meshcollection_totalTriangles: (a: number) => number;
2864
+ readonly meshcollection_totalVertices: (a: number) => number;
2865
+ readonly meshdatajs_color: (a: number, b: number) => void;
2866
+ readonly meshdatajs_expressId: (a: number) => number;
2867
+ readonly meshdatajs_geometryClass: (a: number) => number;
2868
+ readonly meshdatajs_geometryItemId: (a: number) => number;
2869
+ readonly meshdatajs_hasTexture: (a: number) => number;
2870
+ readonly meshdatajs_ifcType: (a: number, b: number) => void;
2871
+ readonly meshdatajs_indices: (a: number) => number;
2872
+ readonly meshdatajs_localBounds: (a: number, b: number) => void;
2873
+ readonly meshdatajs_localToWorld: (a: number, b: number) => void;
2874
+ readonly meshdatajs_materialId: (a: number) => number;
2875
+ readonly meshdatajs_metallic: (a: number) => number;
2876
+ readonly meshdatajs_normals: (a: number) => number;
2877
+ readonly meshdatajs_origin: (a: number) => number;
2878
+ readonly meshdatajs_positions: (a: number) => number;
2879
+ readonly meshdatajs_roughness: (a: number) => number;
2880
+ readonly meshdatajs_shadingColor: (a: number, b: number) => void;
2881
+ readonly meshdatajs_textureHeight: (a: number) => number;
2882
+ readonly meshdatajs_textureId: (a: number) => number;
2883
+ readonly meshdatajs_textureRepeatS: (a: number) => number;
2884
+ readonly meshdatajs_textureRepeatT: (a: number) => number;
2885
+ readonly meshdatajs_textureRgba: (a: number) => number;
2886
+ readonly meshdatajs_textureUrl: (a: number, b: number) => void;
2887
+ readonly meshdatajs_textureWidth: (a: number) => number;
2888
+ readonly meshdatajs_triangleCount: (a: number) => number;
2889
+ readonly meshdatajs_uvs: (a: number) => number;
2890
+ readonly meshdatajs_vertexCount: (a: number) => number;
2891
+ readonly meshoutlinejs_axisMax: (a: number) => number;
2892
+ readonly meshoutlinejs_axisMin: (a: number) => number;
2893
+ readonly meshoutlinejs_contour: (a: number, b: number) => number;
2894
+ readonly partitionedbatch_instancedOccurrences: (a: number) => number;
2895
+ readonly partitionedbatch_takeMeshes: (a: number) => number;
2896
+ readonly partitionedbatch_takeShard: (a: number, b: number) => void;
2897
+ readonly profilecollection_get: (a: number, b: number) => number;
2898
+ readonly profilecollection_length: (a: number) => number;
2899
+ readonly profilecollection_skippedExpressIds: (a: number) => number;
2900
+ readonly profileentryjs_expressId: (a: number) => number;
2901
+ readonly profileentryjs_extrusionDepth: (a: number) => number;
2902
+ readonly profileentryjs_extrusionDir: (a: number) => number;
2903
+ readonly profileentryjs_holeCounts: (a: number) => number;
2904
+ readonly profileentryjs_holePoints: (a: number) => number;
2905
+ readonly profileentryjs_ifcType: (a: number, b: number) => void;
2906
+ readonly profileentryjs_modelIndex: (a: number) => number;
2907
+ readonly profileentryjs_outerPoints: (a: number) => number;
2908
+ readonly profileentryjs_transform: (a: number) => number;
2909
+ readonly resolve2d: (a: number) => number;
2910
+ readonly retainedbrowsercancellation_retire: (a: number) => void;
2911
+ readonly retainedbrowserexecutor_cancellation: (a: number) => number;
2912
+ readonly retainedbrowserexecutor_capabilities: (a: number) => number;
2913
+ readonly retainedbrowserexecutor_new: (a: number) => void;
2914
+ readonly retainedbrowserexecutor_qualifyNumericalRoutes: (a: number) => number;
2915
+ readonly retainedbrowserexecutor_retire: (a: number) => void;
2916
+ readonly retainedbrowsersources_execute: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
2917
+ readonly retainedbrowsersources_refused: (a: number, b: number) => void;
2918
+ readonly retainedbrowsersources_sources: (a: number, b: number) => void;
2919
+ readonly scanoutlinejs_coords: (a: number) => number;
2920
+ readonly scanoutlinejs_diagnostics: (a: number, b: number) => void;
2921
+ readonly scanoutlinejs_ringCount: (a: number) => number;
2922
+ readonly scanoutlinejs_ringLengths: (a: number) => number;
2923
+ readonly scanoutlinejs_ringParents: (a: number) => number;
2924
+ readonly scanoutlinejs_shapeCount: (a: number) => number;
2925
+ readonly scanoutlinejs_shapeOffsets: (a: number) => number;
2926
+ readonly scanoutlinejs_worldCoords: (a: number) => number;
2927
+ readonly setGeometryProgressCallback: (a: number) => void;
2928
+ readonly simplifiedmeshes_cavitiesDropped: (a: number, b: number) => void;
2929
+ readonly simplifiedmeshes_elementIds: (a: number, b: number) => void;
2930
+ readonly simplifiedmeshes_indexCounts: (a: number, b: number) => void;
2931
+ readonly simplifiedmeshes_levels: (a: number, b: number) => void;
2932
+ readonly simplifiedmeshes_localIndices: (a: number, b: number) => void;
2933
+ readonly simplifiedmeshes_localPositions: (a: number, b: number) => void;
2934
+ readonly simplifiedmeshes_renderIndices: (a: number, b: number) => void;
2935
+ readonly simplifiedmeshes_renderNormals: (a: number, b: number) => void;
2936
+ readonly simplifiedmeshes_renderOrigins: (a: number, b: number) => void;
2937
+ readonly simplifiedmeshes_renderPositions: (a: number, b: number) => void;
2938
+ readonly simplifiedmeshes_skippedIds: (a: number, b: number) => void;
2939
+ readonly simplifiedmeshes_skippedReasons: (a: number, b: number) => void;
2940
+ readonly simplifiedmeshes_trisAfter: (a: number, b: number) => void;
2941
+ readonly simplifiedmeshes_trisBefore: (a: number, b: number) => void;
2942
+ readonly simplifiedmeshes_vertexCounts: (a: number, b: number) => void;
2943
+ readonly spaceplatehandle_addFace: (a: number, b: number, c: number, d: number, e: number) => void;
2944
+ readonly spaceplatehandle_boundingElements: (a: number, b: number, c: number) => void;
2945
+ readonly spaceplatehandle_dissolveVertex: (a: number, b: number, c: number) => void;
2946
+ readonly spaceplatehandle_dragVertex: (a: number, b: number, c: number, d: number, e: number) => void;
2947
+ readonly spaceplatehandle_duplicate: (a: number) => number;
2948
+ readonly spaceplatehandle_faceArea: (a: number, b: number) => number;
2949
+ readonly spaceplatehandle_faceOutline: (a: number, b: number, c: number) => void;
2950
+ readonly spaceplatehandle_findVertexNear: (a: number, b: number, c: number, d: number) => number;
2951
+ readonly spaceplatehandle_fromWallRects: (a: number, b: number, c: number, d: number, e: number) => void;
2952
+ readonly spaceplatehandle_gapBoundary: (a: number, b: number, c: number, d: number) => void;
2953
+ readonly spaceplatehandle_mergeFaces: (a: number, b: number, c: number) => void;
2954
+ readonly spaceplatehandle_neighborAcross: (a: number, b: number) => number;
2955
+ readonly spaceplatehandle_netOutline: (a: number, b: number, c: number, d: number) => void;
2956
+ readonly spaceplatehandle_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
2957
+ readonly spaceplatehandle_prune: (a: number) => number;
2958
+ readonly spaceplatehandle_removeEdge: (a: number, b: number, c: number) => void;
2959
+ readonly spaceplatehandle_roomCount: (a: number) => number;
2960
+ readonly spaceplatehandle_roomIds: (a: number, b: number) => void;
2961
+ readonly spaceplatehandle_setFaceHeight: (a: number, b: number, c: number, d: number, e: number) => void;
2962
+ readonly spaceplatehandle_snapshot: (a: number, b: number) => void;
2963
+ readonly spaceplatehandle_splitEdge: (a: number, b: number, c: number, d: number, e: number) => void;
2964
+ readonly spaceplatehandle_splitFace: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2965
+ readonly splitMeshByZones: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
2966
+ readonly symboliccircle_centerX: (a: number) => number;
2967
+ readonly symboliccircle_centerY: (a: number) => number;
2968
+ readonly symboliccircle_endAngle: (a: number) => number;
2969
+ readonly symboliccircle_expressId: (a: number) => number;
2970
+ readonly symboliccircle_ifcType: (a: number, b: number) => void;
2971
+ readonly symboliccircle_isFullCircle: (a: number) => number;
2972
+ readonly symboliccircle_radius: (a: number) => number;
2973
+ readonly symboliccircle_repIdentifier: (a: number, b: number) => void;
2974
+ readonly symboliccircle_startAngle: (a: number) => number;
2975
+ readonly symboliccircle_worldY: (a: number) => number;
2976
+ readonly symbolicfillarea_expressId: (a: number) => number;
2977
+ readonly symbolicfillarea_fillA: (a: number) => number;
2978
+ readonly symbolicfillarea_fillB: (a: number) => number;
2979
+ readonly symbolicfillarea_fillG: (a: number) => number;
2980
+ readonly symbolicfillarea_fillR: (a: number) => number;
2981
+ readonly symbolicfillarea_geometryItemId: (a: number) => number;
2982
+ readonly symbolicfillarea_hasHatching: (a: number) => number;
2983
+ readonly symbolicfillarea_hatchAngle: (a: number) => number;
2984
+ readonly symbolicfillarea_hatchAngleSecondary: (a: number) => number;
2985
+ readonly symbolicfillarea_hatchLineWidth: (a: number) => number;
2986
+ readonly symbolicfillarea_hatchSpacing: (a: number) => number;
2987
+ readonly symbolicfillarea_holeCount: (a: number) => number;
2988
+ readonly symbolicfillarea_holesOffsets: (a: number) => number;
2989
+ readonly symbolicfillarea_ifcType: (a: number, b: number) => void;
2990
+ readonly symbolicfillarea_pointCount: (a: number) => number;
2991
+ readonly symbolicfillarea_points: (a: number) => number;
2992
+ readonly symbolicfillarea_repIdentifier: (a: number, b: number) => void;
2993
+ readonly symbolicfillarea_worldY: (a: number) => number;
2994
+ readonly symbolicpolyline_expressId: (a: number) => number;
2995
+ readonly symbolicpolyline_ifcType: (a: number, b: number) => void;
2996
+ readonly symbolicpolyline_isClosed: (a: number) => number;
2997
+ readonly symbolicpolyline_pointCount: (a: number) => number;
2998
+ readonly symbolicpolyline_points: (a: number) => number;
2999
+ readonly symbolicpolyline_repIdentifier: (a: number, b: number) => void;
3000
+ readonly symbolicrepresentationcollection_circleCount: (a: number) => number;
3001
+ readonly symbolicrepresentationcollection_fillCount: (a: number) => number;
3002
+ readonly symbolicrepresentationcollection_getCircle: (a: number, b: number) => number;
3003
+ readonly symbolicrepresentationcollection_getExpressIds: (a: number, b: number) => void;
3004
+ readonly symbolicrepresentationcollection_getFill: (a: number, b: number) => number;
3005
+ readonly symbolicrepresentationcollection_getPolyline: (a: number, b: number) => number;
3006
+ readonly symbolicrepresentationcollection_getText: (a: number, b: number) => number;
3007
+ readonly symbolicrepresentationcollection_isEmpty: (a: number) => number;
3008
+ readonly symbolicrepresentationcollection_polylineCount: (a: number) => number;
3009
+ readonly symbolicrepresentationcollection_textCount: (a: number) => number;
3010
+ readonly symbolicrepresentationcollection_totalCount: (a: number) => number;
3011
+ readonly symbolicrepresentationcollection_truncatedAt: (a: number) => number;
3012
+ readonly symbolicrepresentationcollection_truncatedLimit: (a: number) => number;
3013
+ readonly symbolicrepresentationcollection_truncatedReason: (a: number, b: number) => void;
3014
+ readonly symbolictext_alignment: (a: number, b: number) => void;
3015
+ readonly symbolictext_content: (a: number, b: number) => void;
3016
+ readonly symbolictext_ifcType: (a: number, b: number) => void;
3017
+ readonly symbolictext_repIdentifier: (a: number, b: number) => void;
3018
+ readonly symbolictext_x: (a: number) => number;
3019
+ readonly symbolictext_y: (a: number) => number;
3020
+ readonly traceScanOutline: (a: number, b: number, c: number, d: number, e: number) => void;
3021
+ readonly union2d: (a: number, b: number) => number;
3022
+ readonly version: (a: number) => void;
3023
+ readonly zonepiecejs_indices: (a: number) => number;
3024
+ readonly zonepiecejs_positions: (a: number) => number;
3025
+ readonly zonepiecejs_zoneIndex: (a: number) => number;
3026
+ readonly zonesplitjs_piece: (a: number, b: number) => number;
3027
+ readonly zonesplitjs_pieceCount: (a: number) => number;
3028
+ readonly zonesplitjs_remainderFailed: (a: number) => number;
3029
+ readonly meshoutlinejs_contourCount: (a: number) => number;
3030
+ readonly get_memory: () => number;
3031
+ readonly symbolicpolyline_worldY: (a: number) => number;
3032
+ readonly symbolictext_colorA: (a: number) => number;
3033
+ readonly symbolictext_colorB: (a: number) => number;
3034
+ readonly symbolictext_colorG: (a: number) => number;
3035
+ readonly symbolictext_colorR: (a: number) => number;
3036
+ readonly symbolictext_dirX: (a: number) => number;
3037
+ readonly symbolictext_dirY: (a: number) => number;
3038
+ readonly symbolictext_expressId: (a: number) => number;
3039
+ readonly symbolictext_height: (a: number) => number;
3040
+ readonly symbolictext_targetPx: (a: number) => number;
3041
+ readonly symbolictext_worldY: (a: number) => number;
3042
+ readonly zonepiecejs_volume: (a: number) => number;
3043
+ readonly zonesplitjs_sumErrorRel: (a: number) => number;
3044
+ readonly zonesplitjs_wholeVolume: (a: number) => number;
3045
+ readonly init: () => void;
3046
+ readonly __wbindgen_export: (a: number, b: number) => number;
3047
+ readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
3048
+ readonly __wbindgen_export3: (a: number) => void;
3049
+ readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
3050
+ readonly __wbindgen_export5: (a: number, b: number) => void;
3051
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
3052
+ readonly __wbindgen_start: () => void;
3053
+ }
3054
+
3055
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
3056
+
3057
+ /**
3058
+ * Instantiates the given `module`, which can either be bytes or
3059
+ * a precompiled `WebAssembly.Module`.
3060
+ *
3061
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
3062
+ *
3063
+ * @returns {InitOutput}
3064
+ */
3065
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
3066
+
3067
+ /**
3068
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
3069
+ * for everything else, calls `WebAssembly.instantiate` directly.
3070
+ *
3071
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
3072
+ *
3073
+ * @returns {Promise<InitOutput>}
3074
+ */
3075
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;