@ifc-lite/wasm 9.2.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "IFC-Lite Contributors"
6
6
  ],
7
7
  "description": "WebAssembly bindings for IFC-Lite",
8
- "version": "9.2.0",
8
+ "version": "10.0.0",
9
9
  "license": "MPL-2.0",
10
10
  "repository": {
11
11
  "type": "git",
package/pkg/ifc-lite.d.ts CHANGED
@@ -11,6 +11,127 @@ export interface RtcFrame {
11
11
 
12
12
 
13
13
 
14
+ export interface LandXmlTinDocumentJs {
15
+ format: "landxml";
16
+ schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2";
17
+ capabilities: { renderable_tin: boolean; preserved_only_surfaces: number; unknown_extensions: number };
18
+ version: string;
19
+ /** 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). */
20
+ units?: { linear_unit: string; elevation_unit: string; linear_scale_to_meters: number; elevation_scale_to_meters: number; assumed: boolean };
21
+ surfaces: LandXmlSurfaceJs[];
22
+ pipe_networks?: LandXmlPipeNetworkDocumentJs;
23
+ extensions: LandXmlExtensionJs[];
24
+ warnings: string[];
25
+ alignments: LandXmlAlignmentSummaryJs[]; profiles: LandXmlProfileJs[];
26
+ cross_sections: LandXmlCrossSectionJs[]; cross_section_surfaces: LandXmlCrossSectionSurfaceJs[];
27
+ roadways: LandXmlRoadwayJs[]; capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
28
+ preserved_only_extensions: LandXmlPreservedOnlyExtensionJs[];
29
+ /** COGO, parcel and plan-feature records from the same source bytes. */
30
+ plan: LandXmlPlanDocumentJs;
31
+ }
32
+ export interface LandXmlPlanDocumentJs {
33
+ schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2"; version: string;
34
+ capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
35
+ area_unit?: string; area_scale_to_square_meters?: number;
36
+ cogo_points: LandXmlCgPointJs[]; monuments: LandXmlMonumentJs[];
37
+ plan_features: LandXmlPlanFeatureJs[]; parcels: LandXmlParcelJs[]; warnings: string[];
38
+ source_batches: LandXmlPlanSourceBatchJs[]; parcel_probes: LandXmlParcelProbeJs[];
39
+ resolved_monuments: LandXmlResolvedMonumentJs[]; resolved_geometry: LandXmlResolvedGeometryJs[];
40
+ }
41
+ export interface LandXmlPlanSourceBatchJs { source_ids: string[]; }
42
+ 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; }
43
+ export interface LandXmlResolvedMonumentJs { source_id: string; point?: LandXmlPlanPointJs; }
44
+ export interface LandXmlResolvedGeometryJs { source_id: string; start?: LandXmlPlanPointJs; end?: LandXmlPlanPointJs; center?: LandXmlPlanPointJs; pi?: LandXmlPlanPointJs; }
45
+ export interface LandXmlPlanPointJs { northing: number; easting: number; elevation?: number; }
46
+ 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>; }
47
+ 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>; }
48
+ export interface LandXmlPlanFeatureJs { source_id: string; ordinal: number; name?: string; code?: string; description?: string; properties: Record<string, string>; locations: LandXmlPlanPointLocationJs[]; geometry: LandXmlPlanGeometryJs[]; }
49
+ 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; }
50
+ 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>; }
51
+ export type LandXmlPlanPointLocationJs = { kind: "coordinates"; point: LandXmlPlanPointJs; pnt_ref?: string } | { kind: "point_reference"; pnt_ref: string };
52
+ export interface LandXmlSurfaceJs {
53
+ source_id: string; ordinal: number; source_path: string;
54
+ properties: Record<string, string>; definition_properties: Record<string, string>;
55
+ name: string; kind: "tin" | "grid" | "volume" | "other";
56
+ render_state: "rendered" | "preserved_only" | "unsupported";
57
+ topology_origin: "authored_faces" | "constrained_triangulation" | "preserved_only";
58
+ 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 };
59
+ points: LandXmlPointJs[]; canonical_vertices: LandXmlCanonicalVertexJs[]; source_data_points: LandXmlSourcePointJs[];
60
+ faces: [string, string, string][]; face_source_ids: string[]; face_visibility: boolean[];
61
+ hidden_face_count: number; boundaries: LandXmlPolylineJs[]; breaklines: LandXmlPolylineJs[]; contours: LandXmlPolylineJs[];
62
+ }
63
+ export interface LandXmlPointJs { source_id: string; id: string; northing: number; easting: number; elevation: number; }
64
+ export interface LandXmlCanonicalVertexJs { id: string; northing: number; easting: number; elevation: number; contributor_source_ids: string[]; }
65
+ export interface LandXmlSourcePointJs { source_id: string; ordinal: number; source_path: string; coordinate_dimension: 2 | 3; coordinates: number[]; }
66
+ /** serde_wasm_bindgen omits absent Rust Option fields rather than serializing null. */
67
+ 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[]; }
68
+ export interface LandXmlExtensionJs { namespace: string; local_name: string; path: string; }
69
+ export interface LandXmlSourceDocumentJs { tin: LandXmlTinDocumentJs; alignments: LandXmlAlignmentDocumentJs; alignment_render_spans: LandXmlAlignmentRenderSpanJs[]; alignment_render_refusals: LandXmlAlignmentRenderRefusalJs[]; alignment_render_truncated: boolean; }
70
+ export interface LandXmlAlignmentRenderSpanJs { source_id: string; points: LandXmlPlanPointJs[]; }
71
+ export interface LandXmlAlignmentRenderRefusalJs { source_id: string; message: string; }
72
+ export interface LandXmlAlignmentDocumentJs {
73
+ schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2"; version: string;
74
+ capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
75
+ units?: LandXmlUnitsJs; alignments: LandXmlAlignmentJs[]; warnings: string[];
76
+ }
77
+ /** `assumed` is true only when these units came from `LandXmlParseOptionsJs.assumedLinearUnit`, never from a declared LandXML/Units element (#5175). */
78
+ export interface LandXmlUnitsJs { linear_unit: string; elevation_unit: string; linear_scale_to_meters: number; elevation_scale_to_meters: number; assumed: boolean; }
79
+ /** Terrain-parser alignment linkage; use LandXmlAlignmentDocumentJs for complete alignment semantics. */
80
+ export interface LandXmlAlignmentSummaryJs { source_id: string; ordinal: number; name: string; length: number; sta_start: number; profile_source_ids: string[]; cross_section_source_ids: string[]; }
81
+ 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[]; }
82
+ export type LandXmlPointLocationJs = { kind: "coordinates"; point: LandXmlPlanPointJs } | { kind: "point_reference"; pnt_ref: string };
83
+ export interface LandXmlAlignmentPiJs { source_id: string; location: LandXmlPointLocationJs; }
84
+ export type LandXmlAlignmentSegmentJs = { source_id: string; ordinal: number; primitive: LandXmlAlignmentPrimitiveJs };
85
+ 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; }
86
+ 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);
87
+ export type LandXmlRadiusJs = { finite: number } | "infinite";
88
+ export interface LandXmlStationEquationJs { source_id: string; sta_internal: number; sta_ahead: number; sta_back?: number; sta_increment?: string; }
89
+ 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[]; }
90
+ 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; }
91
+ export interface LandXmlSpeedStationJs { source_id: string; station: number; speed: number; }
92
+ export interface LandXmlSuperelevationJs { source_id: string; sta_start?: number; sta_end?: number; events: LandXmlSuperelevationEventJs[]; }
93
+ export interface LandXmlSuperelevationEventJs { source_id: string; kind: string; value?: string; }
94
+ /** `spiral` is the Rust LandXmlSpiral payload, not a tagged primitive enum. */
95
+ export interface LandXmlUnsupportedTransitionJs { source_id: string; spi_type: string; spiral: LandXmlSpiralJs; reason: string; }
96
+ 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; }
97
+ export type LandXmlAlignmentProbesJs = LandXmlAlignmentProbeJs[];
98
+ /** Neighbouring authored CantStation records; values are never interpolated. */
99
+ 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; }
100
+ /** `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>`. */
101
+ 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; }
102
+ export interface LandXmlProfilePointJs { source_id: string; station: number; elevation?: number; }
103
+ export interface LandXmlGradeLineJs { source_id: string; parent_profile_source_id: string; ordinal: number; points: LandXmlProfilePointJs[]; }
104
+ 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; }
105
+ 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[]; }
106
+ export interface LandXmlCrossSectionJs { source_id: string; parent_alignment_source_id: string; ordinal: number; station: number; surface_source_ids: string[]; }
107
+ 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; }
108
+ export interface LandXmlCrossSectionSegmentJs { source_id: string; parent_surface_source_id: string; ordinal: number; points: LandXmlCrossSectionPointJs[]; }
109
+ export interface LandXmlCrossSectionSurfaceJs { source_id: string; parent_cross_section_source_id: string; kind: "sampled" | "design"; name?: string; segments: LandXmlCrossSectionSegmentJs[]; points: LandXmlCrossSectionPointJs[]; }
110
+ 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[]; }
111
+ export interface LandXmlCapabilityDiagnosticJs { code: string; source_id?: string; source_path: string; message: string; }
112
+ export interface LandXmlPreservedOnlyExtensionJs { source_id: string; parent_source_id?: string; local_name: string; source_path: string; kind: "corridor" | "string_line"; }
113
+ 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; }
114
+ export interface LandXmlPipeNetworkDocumentJs {
115
+ schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2"; version: string;
116
+ capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
117
+ root_units?: LandXmlPipeUnitsJs; collections: LandXmlPipeCollectionJs[];
118
+ features: LandXmlPipeFeatureJs[]; networks: LandXmlPipeNetworkJs[]; refusals: LandXmlPipeRefusalJs[];
119
+ }
120
+ export interface LandXmlPipeCollectionJs { source_id: string; source_path: string; properties: Record<string, string>; }
121
+ export interface LandXmlPipeFeatureJs { source_id: string; source_path: string; owner_source_id: string; properties: Record<string, string>; }
122
+ export interface LandXmlPipeRefusalJs { source_id: string; source_path: string; code: string; message: string; }
123
+ export interface LandXmlPipeMeasureJs { value: number; unit: string; meters: number; }
124
+ export interface LandXmlPipePositionJs { northing: number; easting: number; northing_meters: number; easting_meters: number; elevation?: LandXmlPipeMeasureJs; }
125
+ export interface LandXmlPipeFlowJs { source_id: string; source_path: string; unit?: string; flow_in?: number; loss_in?: number; loss_out?: number; properties: Record<string, string>; }
126
+ export interface LandXmlPipeInvertJs { source_id: string; source_path: string; pipe_source_id: string; flow_direction: string; elevation: LandXmlPipeMeasureJs; properties: Record<string, string>; }
127
+ export interface LandXmlPipePartJs { kind: "circular" | "elliptical" | "egg" | "rectangular"; properties: Record<string, string>; diameter?: LandXmlPipeMeasureJs; span?: LandXmlPipeMeasureJs; width?: LandXmlPipeMeasureJs; height?: LandXmlPipeMeasureJs; thickness?: LandXmlPipeMeasureJs; material?: string; }
128
+ export interface LandXmlStructurePartJs { kind: "circular" | "rectangular" | "inlet" | "outlet" | "connection"; properties: Record<string, string>; diameter?: LandXmlPipeMeasureJs; length?: LandXmlPipeMeasureJs; width?: LandXmlPipeMeasureJs; thickness?: LandXmlPipeMeasureJs; material?: string; }
129
+ 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[]; }
130
+ 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; }
131
+ 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; }
132
+
133
+
134
+
14
135
  /**
15
136
  * The overlap solid of one clashing pair, or the reason there is none.
16
137
  */
@@ -124,11 +245,15 @@ export class ClashSession {
124
245
  ingest(positions: Float32Array, pos_ranges: Uint32Array, indices: Uint32Array, idx_ranges: Uint32Array, aabbs: Float32Array): void;
125
246
  constructor();
126
247
  /**
127
- * Run one rule. `group_a`/`group_b` are GLOBAL element indices; an empty
128
- * `group_b` means a self-clash within `group_a`. `mode`: 0 = hard,
129
- * 1 = clearance. Records carry GLOBAL element indices.
248
+ * Run one rule. `group_a`/`group_b` are GLOBAL element indices.
249
+ * OMIT `group_b` (pass `undefined`/`null`) for a self-clash within
250
+ * `group_a`; pass an array -- INCLUDING an empty one -- for a two-sided
251
+ * rule. An empty array is a B side that matched nothing and yields no
252
+ * clashes, which is why this is nullable rather than "empty means
253
+ * self" (#5354). `mode`: 0 = hard, 1 = clearance. Records carry GLOBAL
254
+ * element indices.
130
255
  */
131
- runRule(group_a: Uint32Array, group_b: Uint32Array, mode: number, tolerance: number, clearance: number, report_touch: boolean): ClashRunResult;
256
+ runRule(group_a: Uint32Array, group_b: Uint32Array | null | undefined, mode: number, tolerance: number, clearance: number, report_touch: boolean): ClashRunResult;
132
257
  }
133
258
 
134
259
  /**
@@ -343,6 +468,17 @@ export class IfcAPI {
343
468
  * Recovers a poisoned cache Mutex instead of panicking; see `mod_tests.rs`.
344
469
  */
345
470
  clearPrePassCache(): void;
471
+ /**
472
+ * Starts one owned raw-byte LandXML session. The caller must free or abort
473
+ * the session on every cancellation path.
474
+ *
475
+ * `options` is the same shape `parseLandXmlSourceBytesWithOptions`
476
+ * accepts (see `LandXmlParseOptionsJs`) and is optional so every
477
+ * existing single-argument call site keeps working unchanged. A bad
478
+ * `assumedLinearUnit` token (or any other invalid option) refuses here,
479
+ * at session construction, never partway through a stream (#5175).
480
+ */
481
+ createLandXmlTinStreamSession(max_bytes: number, options?: LandXmlParseOptionsJs | null): LandXmlTinStreamSession;
346
482
  /**
347
483
  * Run geometry extraction on `content` and return its typed CSG / opening
348
484
  * diagnostics (the `GeometryDiagnostics` contract) as a JS object, or
@@ -611,6 +747,12 @@ export class IfcAPI {
611
747
  * the degenerate-backstop drop count, and the CSG failure aggregates.
612
748
  */
613
749
  getPipelineDiagnostics(): any;
750
+ /**
751
+ * Inspect authored cant and superelevation records at a physical distance.
752
+ * Cant exposes bracketing source records only; no transition value is
753
+ * fabricated. Superelevation blocks preserve their authored bounds.
754
+ */
755
+ inspectLandXmlAlignmentAtDistance(data: Uint8Array, alignment_source_id: string, distance: number): LandXmlAlignmentInspectionJs;
614
756
  /**
615
757
  * Create and initialize the IFC API
616
758
  */
@@ -654,6 +796,27 @@ export class IfcAPI {
654
796
  * Parse grid line vertices in the exact frame selected by the mesh pre-pass.
655
797
  */
656
798
  parseGridLinesInFrame(content: string, frame: RtcFrame): Float32Array;
799
+ /**
800
+ * Parse all currently supported LandXML source families from the original
801
+ * bytes. Terrain-only and alignment-only sources both return an honest
802
+ * empty sibling collection, allowing the viewer's single load path to
803
+ * handle either form and mixed documents uniformly.
804
+ */
805
+ parseLandXmlSourceBytes(data: Uint8Array): LandXmlSourceDocumentJs;
806
+ /**
807
+ * Parse a source with explicit hostile-input bounds. Passing
808
+ * `cancelled: true` refuses before entering WASM; in-flight browser
809
+ * cancellation is performed by terminating the worker that owns this
810
+ * synchronous operation.
811
+ */
812
+ parseLandXmlSourceBytesWithOptions(data: Uint8Array, options: any): LandXmlSourceDocumentJs;
813
+ /**
814
+ * Parse a supported LandXML TIN document from its original bytes.
815
+ *
816
+ * The object is an owned serialization of the semantic document. Errors
817
+ * deliberately use `LandXmlError::Display`, including its stable LXML code.
818
+ */
819
+ parseLandXmlTinBytes(data: Uint8Array): LandXmlTinDocumentJs;
657
820
  /**
658
821
  * Parse IFC file and extract symbolic representations (Plan,
659
822
  * Annotation, FootPrint, Axis). These are 2D curves used for
@@ -734,6 +897,19 @@ export class IfcAPI {
734
897
  * report (convertible paths, omissions with extent, exact/raster-only).
735
898
  */
736
899
  preparePdfVectorPage(request_json: string): Uint8Array;
900
+ /**
901
+ * Evaluate one supported horizontal-alignment source span at an exact
902
+ * f64 distance. The binding reuses the native validator, so malformed
903
+ * deserialized records, discontinuities, unresolved references, and
904
+ * unsupported transition domains are rejected rather than approximated.
905
+ */
906
+ probeLandXmlAlignmentAtDistance(data: Uint8Array, alignment_source_id: string, distance: number, offset_right: number): LandXmlAlignmentProbeJs;
907
+ /**
908
+ * Evaluate a bounded set of physical locations carrying a displayed
909
+ * station label. A duplicate label is real, never collapsed; an
910
+ * excessive number is refused rather than allocated synchronously.
911
+ */
912
+ probeLandXmlAlignmentAtStation(data: Uint8Array, alignment_source_id: string, station: number, offset_right: number): LandXmlAlignmentProbesJs;
737
913
  /**
738
914
  * Process geometry for a subset of pre-scanned entities → flat
739
915
  * MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
@@ -1060,6 +1236,37 @@ export class IfcAPI {
1060
1236
  readonly version: string;
1061
1237
  }
1062
1238
 
1239
+ export class LandXmlTinStreamSession {
1240
+ private constructor();
1241
+ free(): void;
1242
+ [Symbol.dispose](): void;
1243
+ abort(): void;
1244
+ advanceChunk(data: Uint8Array): void;
1245
+ /**
1246
+ * Drain only after the renderer has credited this many transport bytes.
1247
+ */
1248
+ drain(max_bytes: number): any;
1249
+ finish(): any;
1250
+ /**
1251
+ * Start the resumable metadata cursor. Consumers must continue draining
1252
+ * until [`Self::output_pending`] is false, then abort/free the session.
1253
+ */
1254
+ finishCursor(): void;
1255
+ header(): any;
1256
+ /**
1257
+ * Whether the host must grant more credited output drain capacity.
1258
+ */
1259
+ outputPending(): boolean;
1260
+ /**
1261
+ * Exact serialized transport bytes currently retained by the Rust queue.
1262
+ */
1263
+ queuedBytes(): number;
1264
+ /**
1265
+ * Complete credited transport records currently retained by the Rust queue.
1266
+ */
1267
+ queuedEvents(): number;
1268
+ }
1269
+
1063
1270
  /**
1064
1271
  * Collection of mesh data for returning multiple meshes
1065
1272
  */
@@ -2095,6 +2302,7 @@ export interface InitOutput {
2095
2302
  readonly __wbg_gridaxiscollection_free: (a: number, b: number) => void;
2096
2303
  readonly __wbg_gridaxisjs_free: (a: number, b: number) => void;
2097
2304
  readonly __wbg_ifcapi_free: (a: number, b: number) => void;
2305
+ readonly __wbg_landxmltinstreamsession_free: (a: number, b: number) => void;
2098
2306
  readonly __wbg_meshcollection_free: (a: number, b: number) => void;
2099
2307
  readonly __wbg_meshdatajs_free: (a: number, b: number) => void;
2100
2308
  readonly __wbg_meshoutlinejs_free: (a: number, b: number) => void;
@@ -2156,6 +2364,7 @@ export interface InitOutput {
2156
2364
  readonly ifcapi_calibrateAppearancePlane: (a: number, b: number, c: number, d: number) => void;
2157
2365
  readonly ifcapi_catalogAppearance: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2158
2366
  readonly ifcapi_clearPrePassCache: (a: number) => void;
2367
+ readonly ifcapi_createLandXmlTinStreamSession: (a: number, b: number, c: number, d: number) => void;
2159
2368
  readonly ifcapi_diagnoseGeometry: (a: number, b: number, c: number) => number;
2160
2369
  readonly ifcapi_exportCsv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
2161
2370
  readonly ifcapi_exportDfjson: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
@@ -2176,6 +2385,7 @@ export interface InitOutput {
2176
2385
  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;
2177
2386
  readonly ifcapi_getMemory: (a: number) => number;
2178
2387
  readonly ifcapi_getPipelineDiagnostics: (a: number) => number;
2388
+ readonly ifcapi_inspectLandXmlAlignmentAtDistance: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
2179
2389
  readonly ifcapi_is_ready: (a: number) => number;
2180
2390
  readonly ifcapi_new: () => number;
2181
2391
  readonly ifcapi_parseAlignmentLines: (a: number, b: number, c: number) => number;
@@ -2184,6 +2394,9 @@ export interface InitOutput {
2184
2394
  readonly ifcapi_parseGridAxesInFrame: (a: number, b: number, c: number, d: number, e: number) => void;
2185
2395
  readonly ifcapi_parseGridLines: (a: number, b: number, c: number) => number;
2186
2396
  readonly ifcapi_parseGridLinesInFrame: (a: number, b: number, c: number, d: number, e: number) => void;
2397
+ readonly ifcapi_parseLandXmlSourceBytes: (a: number, b: number, c: number, d: number) => void;
2398
+ readonly ifcapi_parseLandXmlSourceBytesWithOptions: (a: number, b: number, c: number, d: number, e: number) => void;
2399
+ readonly ifcapi_parseLandXmlTinBytes: (a: number, b: number, c: number, d: number) => void;
2187
2400
  readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
2188
2401
  readonly ifcapi_parseSymbolicRepresentationsInFrame: (a: number, b: number, c: number, d: number, e: number) => void;
2189
2402
  readonly ifcapi_planAnnotationPlane: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
@@ -2194,6 +2407,8 @@ export interface InitOutput {
2194
2407
  readonly ifcapi_planPdfFillAnnotation: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2195
2408
  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;
2196
2409
  readonly ifcapi_preparePdfVectorPage: (a: number, b: number, c: number, d: number) => void;
2410
+ readonly ifcapi_probeLandXmlAlignmentAtDistance: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
2411
+ readonly ifcapi_probeLandXmlAlignmentAtStation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
2197
2412
  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;
2198
2413
  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;
2199
2414
  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;
@@ -2221,6 +2436,15 @@ export interface InitOutput {
2221
2436
  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;
2222
2437
  readonly ifcapi_version: (a: number, b: number) => void;
2223
2438
  readonly intersection2d: (a: number, b: number) => number;
2439
+ readonly landxmltinstreamsession_abort: (a: number) => void;
2440
+ readonly landxmltinstreamsession_advanceChunk: (a: number, b: number, c: number, d: number) => void;
2441
+ readonly landxmltinstreamsession_drain: (a: number, b: number, c: number) => void;
2442
+ readonly landxmltinstreamsession_finish: (a: number, b: number) => void;
2443
+ readonly landxmltinstreamsession_finishCursor: (a: number, b: number) => void;
2444
+ readonly landxmltinstreamsession_header: (a: number, b: number) => void;
2445
+ readonly landxmltinstreamsession_outputPending: (a: number) => number;
2446
+ readonly landxmltinstreamsession_queuedBytes: (a: number) => number;
2447
+ readonly landxmltinstreamsession_queuedEvents: (a: number) => number;
2224
2448
  readonly meshOutline2d: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
2225
2449
  readonly meshcollection_buildingRotation: (a: number, b: number) => void;
2226
2450
  readonly meshcollection_diagnostics: (a: number) => number;
package/pkg/ifc-lite.js CHANGED
@@ -338,11 +338,15 @@ export class ClashSession {
338
338
  return this;
339
339
  }
340
340
  /**
341
- * Run one rule. `group_a`/`group_b` are GLOBAL element indices; an empty
342
- * `group_b` means a self-clash within `group_a`. `mode`: 0 = hard,
343
- * 1 = clearance. Records carry GLOBAL element indices.
341
+ * Run one rule. `group_a`/`group_b` are GLOBAL element indices.
342
+ * OMIT `group_b` (pass `undefined`/`null`) for a self-clash within
343
+ * `group_a`; pass an array -- INCLUDING an empty one -- for a two-sided
344
+ * rule. An empty array is a B side that matched nothing and yields no
345
+ * clashes, which is why this is nullable rather than "empty means
346
+ * self" (#5354). `mode`: 0 = hard, 1 = clearance. Records carry GLOBAL
347
+ * element indices.
344
348
  * @param {Uint32Array} group_a
345
- * @param {Uint32Array} group_b
349
+ * @param {Uint32Array | null | undefined} group_b
346
350
  * @param {number} mode
347
351
  * @param {number} tolerance
348
352
  * @param {number} clearance
@@ -352,8 +356,8 @@ export class ClashSession {
352
356
  runRule(group_a, group_b, mode, tolerance, clearance, report_touch) {
353
357
  const ptr0 = passArray32ToWasm0(group_a, wasm.__wbindgen_export);
354
358
  const len0 = WASM_VECTOR_LEN;
355
- const ptr1 = passArray32ToWasm0(group_b, wasm.__wbindgen_export);
356
- const len1 = WASM_VECTOR_LEN;
359
+ var ptr1 = isLikeNone(group_b) ? 0 : passArray32ToWasm0(group_b, wasm.__wbindgen_export);
360
+ var len1 = WASM_VECTOR_LEN;
357
361
  const ret = wasm.clashsession_runRule(this.__wbg_ptr, ptr0, len0, ptr1, len1, mode, tolerance, clearance, report_touch);
358
362
  return ClashRunResult.__wrap(ret);
359
363
  }
@@ -907,6 +911,34 @@ export class IfcAPI {
907
911
  clearPrePassCache() {
908
912
  wasm.ifcapi_clearPrePassCache(this.__wbg_ptr);
909
913
  }
914
+ /**
915
+ * Starts one owned raw-byte LandXML session. The caller must free or abort
916
+ * the session on every cancellation path.
917
+ *
918
+ * `options` is the same shape `parseLandXmlSourceBytesWithOptions`
919
+ * accepts (see `LandXmlParseOptionsJs`) and is optional so every
920
+ * existing single-argument call site keeps working unchanged. A bad
921
+ * `assumedLinearUnit` token (or any other invalid option) refuses here,
922
+ * at session construction, never partway through a stream (#5175).
923
+ * @param {number} max_bytes
924
+ * @param {LandXmlParseOptionsJs | null} [options]
925
+ * @returns {LandXmlTinStreamSession}
926
+ */
927
+ createLandXmlTinStreamSession(max_bytes, options) {
928
+ try {
929
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
930
+ wasm.ifcapi_createLandXmlTinStreamSession(retptr, this.__wbg_ptr, max_bytes, isLikeNone(options) ? 0 : addHeapObject(options));
931
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
932
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
933
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
934
+ if (r2) {
935
+ throw takeObject(r1);
936
+ }
937
+ return LandXmlTinStreamSession.__wrap(r0);
938
+ } finally {
939
+ wasm.__wbindgen_add_to_stack_pointer(16);
940
+ }
941
+ }
910
942
  /**
911
943
  * Run geometry extraction on `content` and return its typed CSG / opening
912
944
  * diagnostics (the `GeometryDiagnostics` contract) as a JS object, or
@@ -1643,6 +1675,34 @@ export class IfcAPI {
1643
1675
  const ret = wasm.ifcapi_getPipelineDiagnostics(this.__wbg_ptr);
1644
1676
  return takeObject(ret);
1645
1677
  }
1678
+ /**
1679
+ * Inspect authored cant and superelevation records at a physical distance.
1680
+ * Cant exposes bracketing source records only; no transition value is
1681
+ * fabricated. Superelevation blocks preserve their authored bounds.
1682
+ * @param {Uint8Array} data
1683
+ * @param {string} alignment_source_id
1684
+ * @param {number} distance
1685
+ * @returns {LandXmlAlignmentInspectionJs}
1686
+ */
1687
+ inspectLandXmlAlignmentAtDistance(data, alignment_source_id, distance) {
1688
+ try {
1689
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1690
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
1691
+ const len0 = WASM_VECTOR_LEN;
1692
+ const ptr1 = passStringToWasm0(alignment_source_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1693
+ const len1 = WASM_VECTOR_LEN;
1694
+ wasm.ifcapi_inspectLandXmlAlignmentAtDistance(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, distance);
1695
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1696
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1697
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1698
+ if (r2) {
1699
+ throw takeObject(r1);
1700
+ }
1701
+ return takeObject(r0);
1702
+ } finally {
1703
+ wasm.__wbindgen_add_to_stack_pointer(16);
1704
+ }
1705
+ }
1646
1706
  /**
1647
1707
  * Check if API is initialized
1648
1708
  * @returns {boolean}
@@ -1777,6 +1837,82 @@ export class IfcAPI {
1777
1837
  wasm.__wbindgen_add_to_stack_pointer(16);
1778
1838
  }
1779
1839
  }
1840
+ /**
1841
+ * Parse all currently supported LandXML source families from the original
1842
+ * bytes. Terrain-only and alignment-only sources both return an honest
1843
+ * empty sibling collection, allowing the viewer's single load path to
1844
+ * handle either form and mixed documents uniformly.
1845
+ * @param {Uint8Array} data
1846
+ * @returns {LandXmlSourceDocumentJs}
1847
+ */
1848
+ parseLandXmlSourceBytes(data) {
1849
+ try {
1850
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1851
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
1852
+ const len0 = WASM_VECTOR_LEN;
1853
+ wasm.ifcapi_parseLandXmlSourceBytes(retptr, this.__wbg_ptr, ptr0, len0);
1854
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1855
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1856
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1857
+ if (r2) {
1858
+ throw takeObject(r1);
1859
+ }
1860
+ return takeObject(r0);
1861
+ } finally {
1862
+ wasm.__wbindgen_add_to_stack_pointer(16);
1863
+ }
1864
+ }
1865
+ /**
1866
+ * Parse a source with explicit hostile-input bounds. Passing
1867
+ * `cancelled: true` refuses before entering WASM; in-flight browser
1868
+ * cancellation is performed by terminating the worker that owns this
1869
+ * synchronous operation.
1870
+ * @param {Uint8Array} data
1871
+ * @param {any} options
1872
+ * @returns {LandXmlSourceDocumentJs}
1873
+ */
1874
+ parseLandXmlSourceBytesWithOptions(data, options) {
1875
+ try {
1876
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1877
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
1878
+ const len0 = WASM_VECTOR_LEN;
1879
+ wasm.ifcapi_parseLandXmlSourceBytesWithOptions(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1880
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1881
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1882
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1883
+ if (r2) {
1884
+ throw takeObject(r1);
1885
+ }
1886
+ return takeObject(r0);
1887
+ } finally {
1888
+ wasm.__wbindgen_add_to_stack_pointer(16);
1889
+ }
1890
+ }
1891
+ /**
1892
+ * Parse a supported LandXML TIN document from its original bytes.
1893
+ *
1894
+ * The object is an owned serialization of the semantic document. Errors
1895
+ * deliberately use `LandXmlError::Display`, including its stable LXML code.
1896
+ * @param {Uint8Array} data
1897
+ * @returns {LandXmlTinDocumentJs}
1898
+ */
1899
+ parseLandXmlTinBytes(data) {
1900
+ try {
1901
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1902
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
1903
+ const len0 = WASM_VECTOR_LEN;
1904
+ wasm.ifcapi_parseLandXmlTinBytes(retptr, this.__wbg_ptr, ptr0, len0);
1905
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1906
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1907
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1908
+ if (r2) {
1909
+ throw takeObject(r1);
1910
+ }
1911
+ return takeObject(r0);
1912
+ } finally {
1913
+ wasm.__wbindgen_add_to_stack_pointer(16);
1914
+ }
1915
+ }
1780
1916
  /**
1781
1917
  * Parse IFC file and extract symbolic representations (Plan,
1782
1918
  * Annotation, FootPrint, Axis). These are 2D curves used for
@@ -2093,6 +2229,65 @@ export class IfcAPI {
2093
2229
  wasm.__wbindgen_add_to_stack_pointer(16);
2094
2230
  }
2095
2231
  }
2232
+ /**
2233
+ * Evaluate one supported horizontal-alignment source span at an exact
2234
+ * f64 distance. The binding reuses the native validator, so malformed
2235
+ * deserialized records, discontinuities, unresolved references, and
2236
+ * unsupported transition domains are rejected rather than approximated.
2237
+ * @param {Uint8Array} data
2238
+ * @param {string} alignment_source_id
2239
+ * @param {number} distance
2240
+ * @param {number} offset_right
2241
+ * @returns {LandXmlAlignmentProbeJs}
2242
+ */
2243
+ probeLandXmlAlignmentAtDistance(data, alignment_source_id, distance, offset_right) {
2244
+ try {
2245
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2246
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
2247
+ const len0 = WASM_VECTOR_LEN;
2248
+ const ptr1 = passStringToWasm0(alignment_source_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2249
+ const len1 = WASM_VECTOR_LEN;
2250
+ wasm.ifcapi_probeLandXmlAlignmentAtDistance(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, distance, offset_right);
2251
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2252
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2253
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2254
+ if (r2) {
2255
+ throw takeObject(r1);
2256
+ }
2257
+ return takeObject(r0);
2258
+ } finally {
2259
+ wasm.__wbindgen_add_to_stack_pointer(16);
2260
+ }
2261
+ }
2262
+ /**
2263
+ * Evaluate a bounded set of physical locations carrying a displayed
2264
+ * station label. A duplicate label is real, never collapsed; an
2265
+ * excessive number is refused rather than allocated synchronously.
2266
+ * @param {Uint8Array} data
2267
+ * @param {string} alignment_source_id
2268
+ * @param {number} station
2269
+ * @param {number} offset_right
2270
+ * @returns {LandXmlAlignmentProbesJs}
2271
+ */
2272
+ probeLandXmlAlignmentAtStation(data, alignment_source_id, station, offset_right) {
2273
+ try {
2274
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2275
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
2276
+ const len0 = WASM_VECTOR_LEN;
2277
+ const ptr1 = passStringToWasm0(alignment_source_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2278
+ const len1 = WASM_VECTOR_LEN;
2279
+ wasm.ifcapi_probeLandXmlAlignmentAtStation(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, station, offset_right);
2280
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2281
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2282
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2283
+ if (r2) {
2284
+ throw takeObject(r1);
2285
+ }
2286
+ return takeObject(r0);
2287
+ } finally {
2288
+ wasm.__wbindgen_add_to_stack_pointer(16);
2289
+ }
2290
+ }
2096
2291
  /**
2097
2292
  * Process geometry for a subset of pre-scanned entities → flat
2098
2293
  * MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
@@ -2872,6 +3067,144 @@ export class IfcAPI {
2872
3067
  }
2873
3068
  if (Symbol.dispose) IfcAPI.prototype[Symbol.dispose] = IfcAPI.prototype.free;
2874
3069
 
3070
+ export class LandXmlTinStreamSession {
3071
+ static __wrap(ptr) {
3072
+ const obj = Object.create(LandXmlTinStreamSession.prototype);
3073
+ obj.__wbg_ptr = ptr;
3074
+ LandXmlTinStreamSessionFinalization.register(obj, obj.__wbg_ptr, obj);
3075
+ return obj;
3076
+ }
3077
+ __destroy_into_raw() {
3078
+ const ptr = this.__wbg_ptr;
3079
+ this.__wbg_ptr = 0;
3080
+ LandXmlTinStreamSessionFinalization.unregister(this);
3081
+ return ptr;
3082
+ }
3083
+ free() {
3084
+ const ptr = this.__destroy_into_raw();
3085
+ wasm.__wbg_landxmltinstreamsession_free(ptr, 0);
3086
+ }
3087
+ abort() {
3088
+ wasm.landxmltinstreamsession_abort(this.__wbg_ptr);
3089
+ }
3090
+ /**
3091
+ * @param {Uint8Array} data
3092
+ */
3093
+ advanceChunk(data) {
3094
+ try {
3095
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3096
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
3097
+ const len0 = WASM_VECTOR_LEN;
3098
+ wasm.landxmltinstreamsession_advanceChunk(retptr, this.__wbg_ptr, ptr0, len0);
3099
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3100
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3101
+ if (r1) {
3102
+ throw takeObject(r0);
3103
+ }
3104
+ } finally {
3105
+ wasm.__wbindgen_add_to_stack_pointer(16);
3106
+ }
3107
+ }
3108
+ /**
3109
+ * Drain only after the renderer has credited this many transport bytes.
3110
+ * @param {number} max_bytes
3111
+ * @returns {any}
3112
+ */
3113
+ drain(max_bytes) {
3114
+ try {
3115
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3116
+ wasm.landxmltinstreamsession_drain(retptr, this.__wbg_ptr, max_bytes);
3117
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3118
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3119
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3120
+ if (r2) {
3121
+ throw takeObject(r1);
3122
+ }
3123
+ return takeObject(r0);
3124
+ } finally {
3125
+ wasm.__wbindgen_add_to_stack_pointer(16);
3126
+ }
3127
+ }
3128
+ /**
3129
+ * @returns {any}
3130
+ */
3131
+ finish() {
3132
+ try {
3133
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3134
+ wasm.landxmltinstreamsession_finish(retptr, this.__wbg_ptr);
3135
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3136
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3137
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3138
+ if (r2) {
3139
+ throw takeObject(r1);
3140
+ }
3141
+ return takeObject(r0);
3142
+ } finally {
3143
+ wasm.__wbindgen_add_to_stack_pointer(16);
3144
+ }
3145
+ }
3146
+ /**
3147
+ * Start the resumable metadata cursor. Consumers must continue draining
3148
+ * until [`Self::output_pending`] is false, then abort/free the session.
3149
+ */
3150
+ finishCursor() {
3151
+ try {
3152
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3153
+ wasm.landxmltinstreamsession_finishCursor(retptr, this.__wbg_ptr);
3154
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3155
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3156
+ if (r1) {
3157
+ throw takeObject(r0);
3158
+ }
3159
+ } finally {
3160
+ wasm.__wbindgen_add_to_stack_pointer(16);
3161
+ }
3162
+ }
3163
+ /**
3164
+ * @returns {any}
3165
+ */
3166
+ header() {
3167
+ try {
3168
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3169
+ wasm.landxmltinstreamsession_header(retptr, this.__wbg_ptr);
3170
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3171
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3172
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3173
+ if (r2) {
3174
+ throw takeObject(r1);
3175
+ }
3176
+ return takeObject(r0);
3177
+ } finally {
3178
+ wasm.__wbindgen_add_to_stack_pointer(16);
3179
+ }
3180
+ }
3181
+ /**
3182
+ * Whether the host must grant more credited output drain capacity.
3183
+ * @returns {boolean}
3184
+ */
3185
+ outputPending() {
3186
+ const ret = wasm.landxmltinstreamsession_outputPending(this.__wbg_ptr);
3187
+ return ret !== 0;
3188
+ }
3189
+ /**
3190
+ * Exact serialized transport bytes currently retained by the Rust queue.
3191
+ * @returns {number}
3192
+ */
3193
+ queuedBytes() {
3194
+ const ret = wasm.landxmltinstreamsession_queuedBytes(this.__wbg_ptr);
3195
+ return ret >>> 0;
3196
+ }
3197
+ /**
3198
+ * Complete credited transport records currently retained by the Rust queue.
3199
+ * @returns {number}
3200
+ */
3201
+ queuedEvents() {
3202
+ const ret = wasm.landxmltinstreamsession_queuedEvents(this.__wbg_ptr);
3203
+ return ret >>> 0;
3204
+ }
3205
+ }
3206
+ if (Symbol.dispose) LandXmlTinStreamSession.prototype[Symbol.dispose] = LandXmlTinStreamSession.prototype.free;
3207
+
2875
3208
  /**
2876
3209
  * Collection of mesh data for returning multiple meshes
2877
3210
  */
@@ -5605,6 +5938,10 @@ function __wbg_get_imports() {
5605
5938
  const ret = Error(getStringFromWasm0(arg0, arg1));
5606
5939
  return addHeapObject(ret);
5607
5940
  },
5941
+ __wbg_Number_9a4e0ecb0fa16705: function(arg0) {
5942
+ const ret = Number(getObject(arg0));
5943
+ return ret;
5944
+ },
5608
5945
  __wbg_String_8564e559799eccda: function(arg0, arg1) {
5609
5946
  const ret = String(getObject(arg1));
5610
5947
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -5612,11 +5949,32 @@ function __wbg_get_imports() {
5612
5949
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5613
5950
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5614
5951
  },
5952
+ __wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
5953
+ const v = getObject(arg1);
5954
+ const ret = typeof(v) === 'bigint' ? v : undefined;
5955
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
5956
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
5957
+ },
5615
5958
  __wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
5616
5959
  const v = getObject(arg0);
5617
5960
  const ret = typeof(v) === 'boolean' ? v : undefined;
5618
5961
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
5619
5962
  },
5963
+ __wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
5964
+ const ret = debugString(getObject(arg1));
5965
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
5966
+ const len1 = WASM_VECTOR_LEN;
5967
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5968
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5969
+ },
5970
+ __wbg___wbindgen_in_aca499c5de7ff5e5: function(arg0, arg1) {
5971
+ const ret = getObject(arg0) in getObject(arg1);
5972
+ return ret;
5973
+ },
5974
+ __wbg___wbindgen_is_bigint_2f76dc55065b4273: function(arg0) {
5975
+ const ret = typeof(getObject(arg0)) === 'bigint';
5976
+ return ret;
5977
+ },
5620
5978
  __wbg___wbindgen_is_null_ea9085d691f535d3: function(arg0) {
5621
5979
  const ret = getObject(arg0) === null;
5622
5980
  return ret;
@@ -5626,10 +5984,22 @@ function __wbg_get_imports() {
5626
5984
  const ret = typeof(val) === 'object' && val !== null;
5627
5985
  return ret;
5628
5986
  },
5987
+ __wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
5988
+ const ret = typeof(getObject(arg0)) === 'string';
5989
+ return ret;
5990
+ },
5629
5991
  __wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
5630
5992
  const ret = getObject(arg0) === undefined;
5631
5993
  return ret;
5632
5994
  },
5995
+ __wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
5996
+ const ret = getObject(arg0) === getObject(arg1);
5997
+ return ret;
5998
+ },
5999
+ __wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170: function(arg0, arg1) {
6000
+ const ret = getObject(arg0) == getObject(arg1);
6001
+ return ret;
6002
+ },
5633
6003
  __wbg___wbindgen_memory_de265df8aadd6273: function() {
5634
6004
  const ret = wasm.memory;
5635
6005
  return addHeapObject(ret);
@@ -5670,13 +6040,45 @@ function __wbg_get_imports() {
5670
6040
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
5671
6041
  return addHeapObject(ret);
5672
6042
  }, arguments); },
6043
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
6044
+ const ret = getObject(arg0)[getObject(arg1)];
6045
+ return addHeapObject(ret);
6046
+ },
5673
6047
  __wbg_info_eadbe775a8e2e9eb: function(arg0) {
5674
6048
  console.info(getObject(arg0));
5675
6049
  },
6050
+ __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
6051
+ let result;
6052
+ try {
6053
+ result = getObject(arg0) instanceof ArrayBuffer;
6054
+ } catch (_) {
6055
+ result = false;
6056
+ }
6057
+ const ret = result;
6058
+ return ret;
6059
+ },
6060
+ __wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
6061
+ let result;
6062
+ try {
6063
+ result = getObject(arg0) instanceof Uint8Array;
6064
+ } catch (_) {
6065
+ result = false;
6066
+ }
6067
+ const ret = result;
6068
+ return ret;
6069
+ },
5676
6070
  __wbg_isArray_0677c962b281d01a: function(arg0) {
5677
6071
  const ret = Array.isArray(getObject(arg0));
5678
6072
  return ret;
5679
6073
  },
6074
+ __wbg_isSafeInteger_04f36e4056f1b851: function(arg0) {
6075
+ const ret = Number.isSafeInteger(getObject(arg0));
6076
+ return ret;
6077
+ },
6078
+ __wbg_length_1f0964f4a5e2c6d8: function(arg0) {
6079
+ const ret = getObject(arg0).length;
6080
+ return ret;
6081
+ },
5680
6082
  __wbg_new_227d7c05414eb861: function() {
5681
6083
  const ret = new Error();
5682
6084
  return addHeapObject(ret);
@@ -5685,10 +6087,18 @@ function __wbg_get_imports() {
5685
6087
  const ret = new Array();
5686
6088
  return addHeapObject(ret);
5687
6089
  },
6090
+ __wbg_new_7796ffc7ed656783: function() {
6091
+ const ret = new Map();
6092
+ return addHeapObject(ret);
6093
+ },
5688
6094
  __wbg_new_b667d279fd5aa943: function(arg0, arg1) {
5689
6095
  const ret = new Error(getStringFromWasm0(arg0, arg1));
5690
6096
  return addHeapObject(ret);
5691
6097
  },
6098
+ __wbg_new_cd45aabdf6073e84: function(arg0) {
6099
+ const ret = new Uint8Array(getObject(arg0));
6100
+ return addHeapObject(ret);
6101
+ },
5692
6102
  __wbg_new_da52cf8fe3429cb2: function() {
5693
6103
  const ret = new Object();
5694
6104
  return addHeapObject(ret);
@@ -5729,6 +6139,13 @@ function __wbg_get_imports() {
5729
6139
  const ret = Date.now();
5730
6140
  return ret;
5731
6141
  },
6142
+ __wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
6143
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
6144
+ },
6145
+ __wbg_set_575dd786d51585f8: function(arg0, arg1, arg2) {
6146
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
6147
+ return addHeapObject(ret);
6148
+ },
5732
6149
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
5733
6150
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5734
6151
  },
@@ -5827,6 +6244,9 @@ const GridAxisJsFinalization = (typeof FinalizationRegistry === 'undefined')
5827
6244
  const IfcAPIFinalization = (typeof FinalizationRegistry === 'undefined')
5828
6245
  ? { register: () => {}, unregister: () => {} }
5829
6246
  : new FinalizationRegistry(ptr => wasm.__wbg_ifcapi_free(ptr, 1));
6247
+ const LandXmlTinStreamSessionFinalization = (typeof FinalizationRegistry === 'undefined')
6248
+ ? { register: () => {}, unregister: () => {} }
6249
+ : new FinalizationRegistry(ptr => wasm.__wbg_landxmltinstreamsession_free(ptr, 1));
5830
6250
  const MeshCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
5831
6251
  ? { register: () => {}, unregister: () => {} }
5832
6252
  : new FinalizationRegistry(ptr => wasm.__wbg_meshcollection_free(ptr, 1));
@@ -5894,6 +6314,71 @@ function addBorrowedObject(obj) {
5894
6314
  return stack_pointer;
5895
6315
  }
5896
6316
 
6317
+ function debugString(val) {
6318
+ // primitive types
6319
+ const type = typeof val;
6320
+ if (type == 'number' || type == 'boolean' || val == null) {
6321
+ return `${val}`;
6322
+ }
6323
+ if (type == 'string') {
6324
+ return `"${val}"`;
6325
+ }
6326
+ if (type == 'symbol') {
6327
+ const description = val.description;
6328
+ if (description == null) {
6329
+ return 'Symbol';
6330
+ } else {
6331
+ return `Symbol(${description})`;
6332
+ }
6333
+ }
6334
+ if (type == 'function') {
6335
+ const name = val.name;
6336
+ if (typeof name == 'string' && name.length > 0) {
6337
+ return `Function(${name})`;
6338
+ } else {
6339
+ return 'Function';
6340
+ }
6341
+ }
6342
+ // objects
6343
+ if (Array.isArray(val)) {
6344
+ const length = val.length;
6345
+ let debug = '[';
6346
+ if (length > 0) {
6347
+ debug += debugString(val[0]);
6348
+ }
6349
+ for(let i = 1; i < length; i++) {
6350
+ debug += ', ' + debugString(val[i]);
6351
+ }
6352
+ debug += ']';
6353
+ return debug;
6354
+ }
6355
+ // Test for built-in
6356
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
6357
+ let className;
6358
+ if (builtInMatches && builtInMatches.length > 1) {
6359
+ className = builtInMatches[1];
6360
+ } else {
6361
+ // Failed to match the standard '[object ClassName]'
6362
+ return toString.call(val);
6363
+ }
6364
+ if (className == 'Object') {
6365
+ // we're a user defined class or Object
6366
+ // JSON.stringify avoids problems with cycles, and is generally much
6367
+ // easier than looping through ownProperties of `val`.
6368
+ try {
6369
+ return 'Object(' + JSON.stringify(val) + ')';
6370
+ } catch (_) {
6371
+ return 'Object';
6372
+ }
6373
+ }
6374
+ // errors
6375
+ if (val instanceof Error) {
6376
+ return `${val.name}: ${val.message}\n${val.stack}`;
6377
+ }
6378
+ // TODO we could test for more things here, like `Set`s and `Map`s.
6379
+ return className;
6380
+ }
6381
+
5897
6382
  function dropObject(idx) {
5898
6383
  if (idx < 1028) return;
5899
6384
  heap[idx] = heap_next;
Binary file