@ifc-lite/wasm 1.3.0 → 1.5.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": "1.3.0",
8
+ "version": "1.5.0",
9
9
  "license": "MPL-2.0",
10
10
  "repository": {
11
11
  "type": "git",
package/pkg/ifc-lite.d.ts CHANGED
@@ -461,6 +461,22 @@ export class IfcAPI {
461
461
  * ```
462
462
  */
463
463
  parseMeshesInstancedAsync(content: string, options: any): Promise<any>;
464
+ /**
465
+ * Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
466
+ * These are 2D curves used for architectural drawings instead of sectioning 3D geometry
467
+ *
468
+ * Example:
469
+ * ```javascript
470
+ * const api = new IfcAPI();
471
+ * const symbols = api.parseSymbolicRepresentations(ifcData);
472
+ * console.log('Found', symbols.totalCount, 'symbolic items');
473
+ * for (let i = 0; i < symbols.polylineCount; i++) {
474
+ * const polyline = symbols.getPolyline(i);
475
+ * console.log('Polyline for', polyline.ifcType, ':', polyline.points);
476
+ * }
477
+ * ```
478
+ */
479
+ parseSymbolicRepresentations(content: string): SymbolicRepresentationCollection;
464
480
  /**
465
481
  * Parse IFC file to GPU-ready instanced geometry for zero-copy upload
466
482
  *
@@ -562,6 +578,11 @@ export class MeshCollection {
562
578
  * Get total triangle count across all meshes
563
579
  */
564
580
  readonly totalTriangles: number;
581
+ /**
582
+ * Get building rotation angle in radians (from IfcSite placement)
583
+ * Returns None if no rotation was detected
584
+ */
585
+ readonly buildingRotation: number | undefined;
565
586
  /**
566
587
  * Get number of meshes
567
588
  */
@@ -654,6 +675,88 @@ export class RtcOffsetJs {
654
675
  z: number;
655
676
  }
656
677
 
678
+ export class SymbolicCircle {
679
+ private constructor();
680
+ free(): void;
681
+ [Symbol.dispose](): void;
682
+ readonly expressId: number;
683
+ readonly startAngle: number;
684
+ /**
685
+ * Check if this is a full circle
686
+ */
687
+ readonly isFullCircle: boolean;
688
+ readonly repIdentifier: string;
689
+ readonly radius: number;
690
+ readonly centerX: number;
691
+ readonly centerY: number;
692
+ readonly ifcType: string;
693
+ readonly endAngle: number;
694
+ }
695
+
696
+ export class SymbolicPolyline {
697
+ private constructor();
698
+ free(): void;
699
+ [Symbol.dispose](): void;
700
+ /**
701
+ * Get express ID of the parent element
702
+ */
703
+ readonly expressId: number;
704
+ /**
705
+ * Get number of points
706
+ */
707
+ readonly pointCount: number;
708
+ /**
709
+ * Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
710
+ */
711
+ readonly repIdentifier: string;
712
+ /**
713
+ * Get 2D points as Float32Array [x1, y1, x2, y2, ...]
714
+ */
715
+ readonly points: Float32Array;
716
+ /**
717
+ * Get IFC type name (e.g., "IfcDoor", "IfcWindow")
718
+ */
719
+ readonly ifcType: string;
720
+ /**
721
+ * Check if this is a closed loop
722
+ */
723
+ readonly isClosed: boolean;
724
+ }
725
+
726
+ export class SymbolicRepresentationCollection {
727
+ private constructor();
728
+ free(): void;
729
+ [Symbol.dispose](): void;
730
+ /**
731
+ * Get circle at index
732
+ */
733
+ getCircle(index: number): SymbolicCircle | undefined;
734
+ /**
735
+ * Get polyline at index
736
+ */
737
+ getPolyline(index: number): SymbolicPolyline | undefined;
738
+ /**
739
+ * Get all express IDs that have symbolic representations
740
+ */
741
+ getExpressIds(): Uint32Array;
742
+ /**
743
+ * Get total count of all symbolic items
744
+ */
745
+ readonly totalCount: number;
746
+ /**
747
+ * Get number of circles/arcs
748
+ */
749
+ readonly circleCount: number;
750
+ /**
751
+ * Get number of polylines
752
+ */
753
+ readonly polylineCount: number;
754
+ /**
755
+ * Check if collection is empty
756
+ */
757
+ readonly isEmpty: boolean;
758
+ }
759
+
657
760
  export class ZeroCopyMesh {
658
761
  free(): void;
659
762
  [Symbol.dispose](): void;
@@ -766,6 +869,9 @@ export interface InitOutput {
766
869
  readonly __wbg_set_georeferencejs_scale: (a: number, b: number) => void;
767
870
  readonly __wbg_set_georeferencejs_x_axis_abscissa: (a: number, b: number) => void;
768
871
  readonly __wbg_set_georeferencejs_x_axis_ordinate: (a: number, b: number) => void;
872
+ readonly __wbg_symboliccircle_free: (a: number, b: number) => void;
873
+ readonly __wbg_symbolicpolyline_free: (a: number, b: number) => void;
874
+ readonly __wbg_symbolicrepresentationcollection_free: (a: number, b: number) => void;
769
875
  readonly __wbg_zerocopymesh_free: (a: number, b: number) => void;
770
876
  readonly georeferencejs_crsName: (a: number, b: number) => void;
771
877
  readonly georeferencejs_localToMap: (a: number, b: number, c: number, d: number, e: number) => void;
@@ -841,6 +947,7 @@ export interface InitOutput {
841
947
  readonly ifcapi_parseMeshesInstancedAsync: (a: number, b: number, c: number, d: number) => number;
842
948
  readonly ifcapi_parseMeshesWithRtc: (a: number, b: number, c: number) => number;
843
949
  readonly ifcapi_parseStreaming: (a: number, b: number, c: number, d: number) => number;
950
+ readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
844
951
  readonly ifcapi_parseToGpuGeometry: (a: number, b: number, c: number) => number;
845
952
  readonly ifcapi_parseToGpuGeometryAsync: (a: number, b: number, c: number, d: number) => number;
846
953
  readonly ifcapi_parseToGpuInstancedGeometry: (a: number, b: number, c: number) => number;
@@ -858,14 +965,16 @@ export interface InitOutput {
858
965
  readonly instancedgeometry_positions: (a: number) => number;
859
966
  readonly instancedmeshcollection_get: (a: number, b: number) => number;
860
967
  readonly instancedmeshcollection_totalInstances: (a: number) => number;
968
+ readonly meshcollection_buildingRotation: (a: number, b: number) => void;
861
969
  readonly meshcollection_get: (a: number, b: number) => number;
862
970
  readonly meshcollection_hasRtcOffset: (a: number) => number;
863
971
  readonly meshcollection_length: (a: number) => number;
864
972
  readonly meshcollection_localToWorld: (a: number, b: number, c: number, d: number, e: number) => void;
973
+ readonly meshcollection_rtcOffsetY: (a: number) => number;
974
+ readonly meshcollection_rtcOffsetZ: (a: number) => number;
865
975
  readonly meshcollection_totalTriangles: (a: number) => number;
866
976
  readonly meshcollection_totalVertices: (a: number) => number;
867
977
  readonly meshcollectionwithrtc_get: (a: number, b: number) => number;
868
- readonly meshcollectionwithrtc_length: (a: number) => number;
869
978
  readonly meshcollectionwithrtc_meshes: (a: number) => number;
870
979
  readonly meshcollectionwithrtc_rtcOffset: (a: number) => number;
871
980
  readonly meshdatajs_color: (a: number, b: number) => void;
@@ -876,7 +985,29 @@ export interface InitOutput {
876
985
  readonly meshdatajs_positions: (a: number) => number;
877
986
  readonly meshdatajs_triangleCount: (a: number) => number;
878
987
  readonly meshdatajs_vertexCount: (a: number) => number;
988
+ readonly rtcoffsetjs_isSignificant: (a: number) => number;
879
989
  readonly rtcoffsetjs_toWorld: (a: number, b: number, c: number, d: number, e: number) => void;
990
+ readonly symboliccircle_centerX: (a: number) => number;
991
+ readonly symboliccircle_centerY: (a: number) => number;
992
+ readonly symboliccircle_endAngle: (a: number) => number;
993
+ readonly symboliccircle_ifcType: (a: number, b: number) => void;
994
+ readonly symboliccircle_isFullCircle: (a: number) => number;
995
+ readonly symboliccircle_radius: (a: number) => number;
996
+ readonly symboliccircle_repIdentifier: (a: number, b: number) => void;
997
+ readonly symboliccircle_startAngle: (a: number) => number;
998
+ readonly symbolicpolyline_expressId: (a: number) => number;
999
+ readonly symbolicpolyline_ifcType: (a: number, b: number) => void;
1000
+ readonly symbolicpolyline_isClosed: (a: number) => number;
1001
+ readonly symbolicpolyline_pointCount: (a: number) => number;
1002
+ readonly symbolicpolyline_points: (a: number) => number;
1003
+ readonly symbolicpolyline_repIdentifier: (a: number, b: number) => void;
1004
+ readonly symbolicrepresentationcollection_circleCount: (a: number) => number;
1005
+ readonly symbolicrepresentationcollection_getCircle: (a: number, b: number) => number;
1006
+ readonly symbolicrepresentationcollection_getExpressIds: (a: number, b: number) => void;
1007
+ readonly symbolicrepresentationcollection_getPolyline: (a: number, b: number) => number;
1008
+ readonly symbolicrepresentationcollection_isEmpty: (a: number) => number;
1009
+ readonly symbolicrepresentationcollection_polylineCount: (a: number) => number;
1010
+ readonly symbolicrepresentationcollection_totalCount: (a: number) => number;
880
1011
  readonly version: (a: number) => void;
881
1012
  readonly zerocopymesh_bounds_max: (a: number, b: number) => void;
882
1013
  readonly zerocopymesh_bounds_min: (a: number, b: number) => void;
@@ -889,6 +1020,7 @@ export interface InitOutput {
889
1020
  readonly init: () => void;
890
1021
  readonly instancedmeshcollection_length: (a: number) => number;
891
1022
  readonly instancedmeshcollection_totalGeometries: (a: number) => number;
1023
+ readonly meshcollectionwithrtc_length: (a: number) => number;
892
1024
  readonly zerocopymesh_indices_len: (a: number) => number;
893
1025
  readonly __wbg_set_rtcoffsetjs_x: (a: number, b: number) => void;
894
1026
  readonly __wbg_set_rtcoffsetjs_y: (a: number, b: number) => void;
@@ -897,19 +1029,17 @@ export interface InitOutput {
897
1029
  readonly get_memory: () => number;
898
1030
  readonly zerocopymesh_indices_ptr: (a: number) => number;
899
1031
  readonly zerocopymesh_normals_ptr: (a: number) => number;
900
- readonly rtcoffsetjs_isSignificant: (a: number) => number;
901
1032
  readonly __wbg_get_rtcoffsetjs_x: (a: number) => number;
902
1033
  readonly __wbg_get_rtcoffsetjs_y: (a: number) => number;
903
1034
  readonly __wbg_get_rtcoffsetjs_z: (a: number) => number;
904
1035
  readonly instancedgeometry_geometryId: (a: number) => bigint;
905
1036
  readonly meshcollection_rtcOffsetX: (a: number) => number;
906
- readonly meshcollection_rtcOffsetY: (a: number) => number;
907
- readonly meshcollection_rtcOffsetZ: (a: number) => number;
908
- readonly __wasm_bindgen_func_elem_847: (a: number, b: number, c: number) => void;
909
- readonly __wasm_bindgen_func_elem_845: (a: number, b: number) => void;
910
- readonly __wasm_bindgen_func_elem_408: (a: number, b: number) => void;
911
- readonly __wasm_bindgen_func_elem_406: (a: number, b: number) => void;
912
- readonly __wasm_bindgen_func_elem_878: (a: number, b: number, c: number, d: number) => void;
1037
+ readonly symboliccircle_expressId: (a: number) => number;
1038
+ readonly __wasm_bindgen_func_elem_474: (a: number, b: number) => void;
1039
+ readonly __wasm_bindgen_func_elem_472: (a: number, b: number) => void;
1040
+ readonly __wasm_bindgen_func_elem_921: (a: number, b: number, c: number) => void;
1041
+ readonly __wasm_bindgen_func_elem_919: (a: number, b: number) => void;
1042
+ readonly __wasm_bindgen_func_elem_952: (a: number, b: number, c: number, d: number) => void;
913
1043
  readonly __wbindgen_export: (a: number) => void;
914
1044
  readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
915
1045
  readonly __wbindgen_export3: (a: number, b: number) => number;
package/pkg/ifc-lite.js CHANGED
@@ -198,16 +198,16 @@ if (!('encodeInto' in cachedTextEncoder)) {
198
198
 
199
199
  let WASM_VECTOR_LEN = 0;
200
200
 
201
- function __wasm_bindgen_func_elem_847(arg0, arg1, arg2) {
202
- wasm.__wasm_bindgen_func_elem_847(arg0, arg1, addHeapObject(arg2));
201
+ function __wasm_bindgen_func_elem_474(arg0, arg1) {
202
+ wasm.__wasm_bindgen_func_elem_474(arg0, arg1);
203
203
  }
204
204
 
205
- function __wasm_bindgen_func_elem_408(arg0, arg1) {
206
- wasm.__wasm_bindgen_func_elem_408(arg0, arg1);
205
+ function __wasm_bindgen_func_elem_921(arg0, arg1, arg2) {
206
+ wasm.__wasm_bindgen_func_elem_921(arg0, arg1, addHeapObject(arg2));
207
207
  }
208
208
 
209
- function __wasm_bindgen_func_elem_878(arg0, arg1, arg2, arg3) {
210
- wasm.__wasm_bindgen_func_elem_878(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
209
+ function __wasm_bindgen_func_elem_952(arg0, arg1, arg2, arg3) {
210
+ wasm.__wasm_bindgen_func_elem_952(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
211
211
  }
212
212
 
213
213
  const GeoReferenceJsFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -266,6 +266,18 @@ const RtcOffsetJsFinalization = (typeof FinalizationRegistry === 'undefined')
266
266
  ? { register: () => {}, unregister: () => {} }
267
267
  : new FinalizationRegistry(ptr => wasm.__wbg_rtcoffsetjs_free(ptr >>> 0, 1));
268
268
 
269
+ const SymbolicCircleFinalization = (typeof FinalizationRegistry === 'undefined')
270
+ ? { register: () => {}, unregister: () => {} }
271
+ : new FinalizationRegistry(ptr => wasm.__wbg_symboliccircle_free(ptr >>> 0, 1));
272
+
273
+ const SymbolicPolylineFinalization = (typeof FinalizationRegistry === 'undefined')
274
+ ? { register: () => {}, unregister: () => {} }
275
+ : new FinalizationRegistry(ptr => wasm.__wbg_symbolicpolyline_free(ptr >>> 0, 1));
276
+
277
+ const SymbolicRepresentationCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
278
+ ? { register: () => {}, unregister: () => {} }
279
+ : new FinalizationRegistry(ptr => wasm.__wbg_symbolicrepresentationcollection_free(ptr >>> 0, 1));
280
+
269
281
  const ZeroCopyMeshFinalization = (typeof FinalizationRegistry === 'undefined')
270
282
  ? { register: () => {}, unregister: () => {} }
271
283
  : new FinalizationRegistry(ptr => wasm.__wbg_zerocopymesh_free(ptr >>> 0, 1));
@@ -1450,6 +1462,29 @@ export class IfcAPI {
1450
1462
  const ret = wasm.ifcapi_parseMeshesInstancedAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1451
1463
  return takeObject(ret);
1452
1464
  }
1465
+ /**
1466
+ * Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
1467
+ * These are 2D curves used for architectural drawings instead of sectioning 3D geometry
1468
+ *
1469
+ * Example:
1470
+ * ```javascript
1471
+ * const api = new IfcAPI();
1472
+ * const symbols = api.parseSymbolicRepresentations(ifcData);
1473
+ * console.log('Found', symbols.totalCount, 'symbolic items');
1474
+ * for (let i = 0; i < symbols.polylineCount; i++) {
1475
+ * const polyline = symbols.getPolyline(i);
1476
+ * console.log('Polyline for', polyline.ifcType, ':', polyline.points);
1477
+ * }
1478
+ * ```
1479
+ * @param {string} content
1480
+ * @returns {SymbolicRepresentationCollection}
1481
+ */
1482
+ parseSymbolicRepresentations(content) {
1483
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1484
+ const len0 = WASM_VECTOR_LEN;
1485
+ const ret = wasm.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, ptr0, len0);
1486
+ return SymbolicRepresentationCollection.__wrap(ret);
1487
+ }
1453
1488
  /**
1454
1489
  * Parse IFC file to GPU-ready instanced geometry for zero-copy upload
1455
1490
  *
@@ -1723,7 +1758,7 @@ export class MeshCollection {
1723
1758
  * @returns {number}
1724
1759
  */
1725
1760
  get rtcOffsetX() {
1726
- const ret = wasm.gpugeometry_rtcOffsetX(this.__wbg_ptr);
1761
+ const ret = wasm.gpugeometry_rtcOffsetZ(this.__wbg_ptr);
1727
1762
  return ret;
1728
1763
  }
1729
1764
  /**
@@ -1731,7 +1766,7 @@ export class MeshCollection {
1731
1766
  * @returns {number}
1732
1767
  */
1733
1768
  get rtcOffsetY() {
1734
- const ret = wasm.gpugeometry_rtcOffsetY(this.__wbg_ptr);
1769
+ const ret = wasm.meshcollection_rtcOffsetY(this.__wbg_ptr);
1735
1770
  return ret;
1736
1771
  }
1737
1772
  /**
@@ -1739,7 +1774,7 @@ export class MeshCollection {
1739
1774
  * @returns {number}
1740
1775
  */
1741
1776
  get rtcOffsetZ() {
1742
- const ret = wasm.gpugeometry_rtcOffsetZ(this.__wbg_ptr);
1777
+ const ret = wasm.meshcollection_rtcOffsetZ(this.__wbg_ptr);
1743
1778
  return ret;
1744
1779
  }
1745
1780
  /**
@@ -1787,6 +1822,22 @@ export class MeshCollection {
1787
1822
  const ret = wasm.meshcollection_totalTriangles(this.__wbg_ptr);
1788
1823
  return ret >>> 0;
1789
1824
  }
1825
+ /**
1826
+ * Get building rotation angle in radians (from IfcSite placement)
1827
+ * Returns None if no rotation was detected
1828
+ * @returns {number | undefined}
1829
+ */
1830
+ get buildingRotation() {
1831
+ try {
1832
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1833
+ wasm.meshcollection_buildingRotation(retptr, this.__wbg_ptr);
1834
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1835
+ var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
1836
+ return r0 === 0 ? undefined : r2;
1837
+ } finally {
1838
+ wasm.__wbindgen_add_to_stack_pointer(16);
1839
+ }
1840
+ }
1790
1841
  /**
1791
1842
  * Get mesh at index
1792
1843
  * @param {number} index
@@ -1850,7 +1901,7 @@ export class MeshCollectionWithRtc {
1850
1901
  * @returns {number}
1851
1902
  */
1852
1903
  get length() {
1853
- const ret = wasm.meshcollectionwithrtc_length(this.__wbg_ptr);
1904
+ const ret = wasm.meshcollection_length(this.__wbg_ptr);
1854
1905
  return ret >>> 0;
1855
1906
  }
1856
1907
  /**
@@ -2044,7 +2095,7 @@ export class RtcOffsetJs {
2044
2095
  * @returns {boolean}
2045
2096
  */
2046
2097
  isSignificant() {
2047
- const ret = wasm.meshcollection_hasRtcOffset(this.__wbg_ptr);
2098
+ const ret = wasm.rtcoffsetjs_isSignificant(this.__wbg_ptr);
2048
2099
  return ret !== 0;
2049
2100
  }
2050
2101
  /**
@@ -2070,6 +2121,306 @@ export class RtcOffsetJs {
2070
2121
  }
2071
2122
  if (Symbol.dispose) RtcOffsetJs.prototype[Symbol.dispose] = RtcOffsetJs.prototype.free;
2072
2123
 
2124
+ /**
2125
+ * A 2D circle/arc for symbolic representations
2126
+ */
2127
+ export class SymbolicCircle {
2128
+ static __wrap(ptr) {
2129
+ ptr = ptr >>> 0;
2130
+ const obj = Object.create(SymbolicCircle.prototype);
2131
+ obj.__wbg_ptr = ptr;
2132
+ SymbolicCircleFinalization.register(obj, obj.__wbg_ptr, obj);
2133
+ return obj;
2134
+ }
2135
+ __destroy_into_raw() {
2136
+ const ptr = this.__wbg_ptr;
2137
+ this.__wbg_ptr = 0;
2138
+ SymbolicCircleFinalization.unregister(this);
2139
+ return ptr;
2140
+ }
2141
+ free() {
2142
+ const ptr = this.__destroy_into_raw();
2143
+ wasm.__wbg_symboliccircle_free(ptr, 0);
2144
+ }
2145
+ /**
2146
+ * @returns {number}
2147
+ */
2148
+ get expressId() {
2149
+ const ret = wasm.gpumeshmetadata_vertexCount(this.__wbg_ptr);
2150
+ return ret >>> 0;
2151
+ }
2152
+ /**
2153
+ * @returns {number}
2154
+ */
2155
+ get startAngle() {
2156
+ const ret = wasm.symboliccircle_startAngle(this.__wbg_ptr);
2157
+ return ret;
2158
+ }
2159
+ /**
2160
+ * Check if this is a full circle
2161
+ * @returns {boolean}
2162
+ */
2163
+ get isFullCircle() {
2164
+ const ret = wasm.symboliccircle_isFullCircle(this.__wbg_ptr);
2165
+ return ret !== 0;
2166
+ }
2167
+ /**
2168
+ * @returns {string}
2169
+ */
2170
+ get repIdentifier() {
2171
+ let deferred1_0;
2172
+ let deferred1_1;
2173
+ try {
2174
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2175
+ wasm.symboliccircle_repIdentifier(retptr, this.__wbg_ptr);
2176
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2177
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2178
+ deferred1_0 = r0;
2179
+ deferred1_1 = r1;
2180
+ return getStringFromWasm0(r0, r1);
2181
+ } finally {
2182
+ wasm.__wbindgen_add_to_stack_pointer(16);
2183
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2184
+ }
2185
+ }
2186
+ /**
2187
+ * @returns {number}
2188
+ */
2189
+ get radius() {
2190
+ const ret = wasm.symboliccircle_radius(this.__wbg_ptr);
2191
+ return ret;
2192
+ }
2193
+ /**
2194
+ * @returns {number}
2195
+ */
2196
+ get centerX() {
2197
+ const ret = wasm.symboliccircle_centerX(this.__wbg_ptr);
2198
+ return ret;
2199
+ }
2200
+ /**
2201
+ * @returns {number}
2202
+ */
2203
+ get centerY() {
2204
+ const ret = wasm.symboliccircle_centerY(this.__wbg_ptr);
2205
+ return ret;
2206
+ }
2207
+ /**
2208
+ * @returns {string}
2209
+ */
2210
+ get ifcType() {
2211
+ let deferred1_0;
2212
+ let deferred1_1;
2213
+ try {
2214
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2215
+ wasm.symboliccircle_ifcType(retptr, this.__wbg_ptr);
2216
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2217
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2218
+ deferred1_0 = r0;
2219
+ deferred1_1 = r1;
2220
+ return getStringFromWasm0(r0, r1);
2221
+ } finally {
2222
+ wasm.__wbindgen_add_to_stack_pointer(16);
2223
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2224
+ }
2225
+ }
2226
+ /**
2227
+ * @returns {number}
2228
+ */
2229
+ get endAngle() {
2230
+ const ret = wasm.symboliccircle_endAngle(this.__wbg_ptr);
2231
+ return ret;
2232
+ }
2233
+ }
2234
+ if (Symbol.dispose) SymbolicCircle.prototype[Symbol.dispose] = SymbolicCircle.prototype.free;
2235
+
2236
+ /**
2237
+ * A single 2D polyline for symbolic representations (Plan, Annotation, FootPrint)
2238
+ * Points are stored as [x1, y1, x2, y2, ...] in 2D coordinates
2239
+ */
2240
+ export class SymbolicPolyline {
2241
+ static __wrap(ptr) {
2242
+ ptr = ptr >>> 0;
2243
+ const obj = Object.create(SymbolicPolyline.prototype);
2244
+ obj.__wbg_ptr = ptr;
2245
+ SymbolicPolylineFinalization.register(obj, obj.__wbg_ptr, obj);
2246
+ return obj;
2247
+ }
2248
+ __destroy_into_raw() {
2249
+ const ptr = this.__wbg_ptr;
2250
+ this.__wbg_ptr = 0;
2251
+ SymbolicPolylineFinalization.unregister(this);
2252
+ return ptr;
2253
+ }
2254
+ free() {
2255
+ const ptr = this.__destroy_into_raw();
2256
+ wasm.__wbg_symbolicpolyline_free(ptr, 0);
2257
+ }
2258
+ /**
2259
+ * Get express ID of the parent element
2260
+ * @returns {number}
2261
+ */
2262
+ get expressId() {
2263
+ const ret = wasm.symbolicpolyline_expressId(this.__wbg_ptr);
2264
+ return ret >>> 0;
2265
+ }
2266
+ /**
2267
+ * Get number of points
2268
+ * @returns {number}
2269
+ */
2270
+ get pointCount() {
2271
+ const ret = wasm.symbolicpolyline_pointCount(this.__wbg_ptr);
2272
+ return ret >>> 0;
2273
+ }
2274
+ /**
2275
+ * Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
2276
+ * @returns {string}
2277
+ */
2278
+ get repIdentifier() {
2279
+ let deferred1_0;
2280
+ let deferred1_1;
2281
+ try {
2282
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2283
+ wasm.symbolicpolyline_repIdentifier(retptr, this.__wbg_ptr);
2284
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2285
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2286
+ deferred1_0 = r0;
2287
+ deferred1_1 = r1;
2288
+ return getStringFromWasm0(r0, r1);
2289
+ } finally {
2290
+ wasm.__wbindgen_add_to_stack_pointer(16);
2291
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2292
+ }
2293
+ }
2294
+ /**
2295
+ * Get 2D points as Float32Array [x1, y1, x2, y2, ...]
2296
+ * @returns {Float32Array}
2297
+ */
2298
+ get points() {
2299
+ const ret = wasm.symbolicpolyline_points(this.__wbg_ptr);
2300
+ return takeObject(ret);
2301
+ }
2302
+ /**
2303
+ * Get IFC type name (e.g., "IfcDoor", "IfcWindow")
2304
+ * @returns {string}
2305
+ */
2306
+ get ifcType() {
2307
+ let deferred1_0;
2308
+ let deferred1_1;
2309
+ try {
2310
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2311
+ wasm.symbolicpolyline_ifcType(retptr, this.__wbg_ptr);
2312
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2313
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2314
+ deferred1_0 = r0;
2315
+ deferred1_1 = r1;
2316
+ return getStringFromWasm0(r0, r1);
2317
+ } finally {
2318
+ wasm.__wbindgen_add_to_stack_pointer(16);
2319
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2320
+ }
2321
+ }
2322
+ /**
2323
+ * Check if this is a closed loop
2324
+ * @returns {boolean}
2325
+ */
2326
+ get isClosed() {
2327
+ const ret = wasm.symbolicpolyline_isClosed(this.__wbg_ptr);
2328
+ return ret !== 0;
2329
+ }
2330
+ }
2331
+ if (Symbol.dispose) SymbolicPolyline.prototype[Symbol.dispose] = SymbolicPolyline.prototype.free;
2332
+
2333
+ /**
2334
+ * Collection of symbolic representations for an IFC model
2335
+ */
2336
+ export class SymbolicRepresentationCollection {
2337
+ static __wrap(ptr) {
2338
+ ptr = ptr >>> 0;
2339
+ const obj = Object.create(SymbolicRepresentationCollection.prototype);
2340
+ obj.__wbg_ptr = ptr;
2341
+ SymbolicRepresentationCollectionFinalization.register(obj, obj.__wbg_ptr, obj);
2342
+ return obj;
2343
+ }
2344
+ __destroy_into_raw() {
2345
+ const ptr = this.__wbg_ptr;
2346
+ this.__wbg_ptr = 0;
2347
+ SymbolicRepresentationCollectionFinalization.unregister(this);
2348
+ return ptr;
2349
+ }
2350
+ free() {
2351
+ const ptr = this.__destroy_into_raw();
2352
+ wasm.__wbg_symbolicrepresentationcollection_free(ptr, 0);
2353
+ }
2354
+ /**
2355
+ * Get circle at index
2356
+ * @param {number} index
2357
+ * @returns {SymbolicCircle | undefined}
2358
+ */
2359
+ getCircle(index) {
2360
+ const ret = wasm.symbolicrepresentationcollection_getCircle(this.__wbg_ptr, index);
2361
+ return ret === 0 ? undefined : SymbolicCircle.__wrap(ret);
2362
+ }
2363
+ /**
2364
+ * Get total count of all symbolic items
2365
+ * @returns {number}
2366
+ */
2367
+ get totalCount() {
2368
+ const ret = wasm.symbolicrepresentationcollection_totalCount(this.__wbg_ptr);
2369
+ return ret >>> 0;
2370
+ }
2371
+ /**
2372
+ * Get number of circles/arcs
2373
+ * @returns {number}
2374
+ */
2375
+ get circleCount() {
2376
+ const ret = wasm.symbolicrepresentationcollection_circleCount(this.__wbg_ptr);
2377
+ return ret >>> 0;
2378
+ }
2379
+ /**
2380
+ * Get polyline at index
2381
+ * @param {number} index
2382
+ * @returns {SymbolicPolyline | undefined}
2383
+ */
2384
+ getPolyline(index) {
2385
+ const ret = wasm.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr, index);
2386
+ return ret === 0 ? undefined : SymbolicPolyline.__wrap(ret);
2387
+ }
2388
+ /**
2389
+ * Get number of polylines
2390
+ * @returns {number}
2391
+ */
2392
+ get polylineCount() {
2393
+ const ret = wasm.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr);
2394
+ return ret >>> 0;
2395
+ }
2396
+ /**
2397
+ * Get all express IDs that have symbolic representations
2398
+ * @returns {Uint32Array}
2399
+ */
2400
+ getExpressIds() {
2401
+ try {
2402
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2403
+ wasm.symbolicrepresentationcollection_getExpressIds(retptr, this.__wbg_ptr);
2404
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2405
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2406
+ var v1 = getArrayU32FromWasm0(r0, r1).slice();
2407
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
2408
+ return v1;
2409
+ } finally {
2410
+ wasm.__wbindgen_add_to_stack_pointer(16);
2411
+ }
2412
+ }
2413
+ /**
2414
+ * Check if collection is empty
2415
+ * @returns {boolean}
2416
+ */
2417
+ get isEmpty() {
2418
+ const ret = wasm.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr);
2419
+ return ret !== 0;
2420
+ }
2421
+ }
2422
+ if (Symbol.dispose) SymbolicRepresentationCollection.prototype[Symbol.dispose] = SymbolicRepresentationCollection.prototype.free;
2423
+
2073
2424
  /**
2074
2425
  * Zero-copy mesh that exposes pointers to WASM memory
2075
2426
  */
@@ -2362,6 +2713,10 @@ function __wbg_get_imports() {
2362
2713
  const ret = InstancedGeometry.__wrap(arg0);
2363
2714
  return addHeapObject(ret);
2364
2715
  };
2716
+ imports.wbg.__wbg_length_86ce4877baf913bb = function(arg0) {
2717
+ const ret = getObject(arg0).length;
2718
+ return ret;
2719
+ };
2365
2720
  imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
2366
2721
  const ret = getObject(arg0).length;
2367
2722
  return ret;
@@ -2393,7 +2748,7 @@ function __wbg_get_imports() {
2393
2748
  const a = state0.a;
2394
2749
  state0.a = 0;
2395
2750
  try {
2396
- return __wasm_bindgen_func_elem_878(a, state0.b, arg0, arg1);
2751
+ return __wasm_bindgen_func_elem_952(a, state0.b, arg0, arg1);
2397
2752
  } finally {
2398
2753
  state0.a = a;
2399
2754
  }
@@ -2416,6 +2771,9 @@ function __wbg_get_imports() {
2416
2771
  const ret = new Function(getStringFromWasm0(arg0, arg1));
2417
2772
  return addHeapObject(ret);
2418
2773
  };
2774
+ imports.wbg.__wbg_prototypesetcall_96cc7097487b926d = function(arg0, arg1, arg2) {
2775
+ Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), getObject(arg2));
2776
+ };
2419
2777
  imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
2420
2778
  const ret = getObject(arg0).push(getObject(arg1));
2421
2779
  return ret;
@@ -2495,7 +2853,7 @@ function __wbg_get_imports() {
2495
2853
  };
2496
2854
  imports.wbg.__wbindgen_cast_7f089052c998c143 = function(arg0, arg1) {
2497
2855
  // Cast intrinsic for `Closure(Closure { dtor_idx: 105, function: Function { arguments: [Externref], shim_idx: 106, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2498
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_845, __wasm_bindgen_func_elem_847);
2856
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_919, __wasm_bindgen_func_elem_921);
2499
2857
  return addHeapObject(ret);
2500
2858
  };
2501
2859
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
@@ -2505,7 +2863,7 @@ function __wbg_get_imports() {
2505
2863
  };
2506
2864
  imports.wbg.__wbindgen_cast_fa504d1cec41bd0d = function(arg0, arg1) {
2507
2865
  // Cast intrinsic for `Closure(Closure { dtor_idx: 45, function: Function { arguments: [], shim_idx: 46, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2508
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_406, __wasm_bindgen_func_elem_408);
2866
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_472, __wasm_bindgen_func_elem_474);
2509
2867
  return addHeapObject(ret);
2510
2868
  };
2511
2869
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
Binary file