@ifc-lite/wasm 10.3.0 → 10.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/README.md +25 -0
- package/package.json +12 -3
- package/pkg/ifc-lite.d.ts +202 -4
- package/pkg/ifc-lite.js +349 -5
- package/pkg/ifc-lite_bg.wasm +0 -0
- package/pkg-retained/ifc-lite.d.ts +3075 -0
- package/retained.d.ts +16 -0
- package/retained.js +33 -0
package/README.md
CHANGED
|
@@ -10,6 +10,16 @@ Pre-built WebAssembly bindings for the IFClite Rust core, covering STEP parsing
|
|
|
10
10
|
npm install @ifc-lite/wasm
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
The package includes generated private JavaScript helpers under `pkg/snippets/`
|
|
14
|
+
when the WASM bindings import them. Keep these files beside the generated glue;
|
|
15
|
+
copying only `ifc-lite.js` and the `.wasm` file can leave an incomplete runtime.
|
|
16
|
+
The canonical build and prebuilt fetch generate npm ignore metadata so
|
|
17
|
+
wasm-pack's broad Git ignore does not exclude these helpers from publication.
|
|
18
|
+
`pnpm build:wasm:fetch` validates the static helper dependency closure and runtime
|
|
19
|
+
exports before installation, preserving committed types and an existing runtime
|
|
20
|
+
if validation fails. Validation parses code without evaluating the generated JavaScript.
|
|
21
|
+
Dynamic imports remain lazy and are outside this static dependency check.
|
|
22
|
+
|
|
13
23
|
## Direct WASM use
|
|
14
24
|
|
|
15
25
|
The text-based entity scanner (`scanEntitiesFast`) takes the raw IFC text
|
|
@@ -208,6 +218,21 @@ residuals. Frames and asset identities are bound into the report; the call does
|
|
|
208
218
|
not align a loaded model or approve scan accuracy. See the
|
|
209
219
|
[registration contract](../../docs/api/wasm.md#scan-correspondence-registration).
|
|
210
220
|
|
|
221
|
+
`IfcAPI.segmentScanPoints` detects planes in an xyz `Float32Array` point cloud
|
|
222
|
+
(voxel means, PCA normals, region growing, a robust refit and coplanar
|
|
223
|
+
merging). It also detects cylinders, such as columns and pipes, among the
|
|
224
|
+
remaining voxels (seeded RANSAC, then a least-squares refit), and wide round
|
|
225
|
+
and polygonal columns among rings of vertical planes; a column's surface is
|
|
226
|
+
not also reported as planes. The JSON report is independent of point order. See the
|
|
227
|
+
[segmentation contract](../../docs/api/wasm.md#scan-plane-segmentation); the
|
|
228
|
+
typed wrapper is `@ifc-lite/geometry/scan-segmentation`.
|
|
229
|
+
|
|
230
|
+
`IfcAPI.proposeScanElements` turns that report into proposed walls, slabs,
|
|
231
|
+
columns and pipes in the IFC model frame, each with a confidence and its source
|
|
232
|
+
detections; it creates nothing. See the
|
|
233
|
+
[proposal contract](../../docs/api/wasm.md#scan-element-proposals); the typed
|
|
234
|
+
wrapper is `@ifc-lite/geometry/scan-proposals`.
|
|
235
|
+
|
|
211
236
|
`IfcAPI.planMeshTransfer` composes registered opaque textured-mesh observations
|
|
212
237
|
onto supported direct IFC tessellations using the shared atlas planner. Unknown
|
|
213
238
|
samples retain existing target albedo; the IFPA response includes explicit
|
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": "10.
|
|
8
|
+
"version": "10.5.0",
|
|
9
9
|
"license": "MPL-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"pkg/ifc-lite_bg.wasm",
|
|
16
16
|
"pkg/ifc-lite.js",
|
|
17
|
-
"pkg/ifc-lite.d.ts"
|
|
17
|
+
"pkg/ifc-lite.d.ts",
|
|
18
|
+
"pkg/snippets/**",
|
|
19
|
+
"retained.js",
|
|
20
|
+
"retained.d.ts",
|
|
21
|
+
"pkg-retained/ifc-lite.d.ts"
|
|
18
22
|
],
|
|
19
23
|
"main": "./pkg/ifc-lite.js",
|
|
20
24
|
"module": "./pkg/ifc-lite.js",
|
|
@@ -25,7 +29,12 @@
|
|
|
25
29
|
"import": "./pkg/ifc-lite.js",
|
|
26
30
|
"default": "./pkg/ifc-lite.js"
|
|
27
31
|
},
|
|
28
|
-
"./ifc-lite_bg.wasm": "./pkg/ifc-lite_bg.wasm"
|
|
32
|
+
"./ifc-lite_bg.wasm": "./pkg/ifc-lite_bg.wasm",
|
|
33
|
+
"./retained": {
|
|
34
|
+
"types": "./retained.d.ts",
|
|
35
|
+
"import": "./retained.js",
|
|
36
|
+
"default": "./retained.js"
|
|
37
|
+
}
|
|
29
38
|
},
|
|
30
39
|
"sideEffects": false,
|
|
31
40
|
"keywords": [
|
package/pkg/ifc-lite.d.ts
CHANGED
|
@@ -1,6 +1,55 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
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
|
+
|
|
4
53
|
/** Exact browser mesh RTC frame, in IFC Z-up metres. */
|
|
5
54
|
export interface RtcFrame {
|
|
6
55
|
x: number;
|
|
@@ -11,6 +60,21 @@ export interface RtcFrame {
|
|
|
11
60
|
|
|
12
61
|
|
|
13
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
|
+
|
|
14
78
|
export interface LandXmlTinDocumentJs {
|
|
15
79
|
format: "landxml";
|
|
16
80
|
schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2";
|
|
@@ -110,7 +174,8 @@ export interface LandXmlCrossSectionSurfaceJs { source_id: string; parent_cross_
|
|
|
110
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[]; }
|
|
111
175
|
export interface LandXmlCapabilityDiagnosticJs { code: string; source_id?: string; source_path: string; message: string; }
|
|
112
176
|
export interface LandXmlPreservedOnlyExtensionJs { source_id: string; parent_source_id?: string; local_name: string; source_path: string; kind: "corridor" | "string_line"; }
|
|
113
|
-
|
|
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; }
|
|
114
179
|
export interface LandXmlPipeNetworkDocumentJs {
|
|
115
180
|
schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2"; version: string;
|
|
116
181
|
capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
|
|
@@ -621,8 +686,16 @@ export class IfcAPI {
|
|
|
621
686
|
* out-of-range index copied into the BIN chunk. (The viewer always passes
|
|
622
687
|
* fully-backed, normal-covered, whole-triangle, in-range arrays, so this only
|
|
623
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`.
|
|
624
697
|
*/
|
|
625
|
-
exportGlbFromMeshes(positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, colors: Float32Array, origins: Float64Array, express_ids: Uint32Array, include_metadata: boolean, lit?: boolean | null, emissive?: boolean | null): Uint8Array;
|
|
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;
|
|
626
699
|
/**
|
|
627
700
|
* Export the `IfcSpace` volumes in `content` as Honeybee **HBJSON** UTF-8 bytes.
|
|
628
701
|
*
|
|
@@ -703,6 +776,17 @@ export class IfcAPI {
|
|
|
703
776
|
* document the 1.4.1 schema rejects, or one with meshes or faces missing.
|
|
704
777
|
*/
|
|
705
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;
|
|
706
790
|
/**
|
|
707
791
|
* Merge several IFC models into one STEP/IFC UTF-8 byte buffer (`Uint8Array`).
|
|
708
792
|
* `concatenated` is every model's
|
|
@@ -727,6 +811,10 @@ export class IfcAPI {
|
|
|
727
811
|
* for GLB in `export_glb`). A non-empty `Uint32Array` is the ordinary allowlist.
|
|
728
812
|
* Instanced type-library shapes are skipped regardless of the filter.
|
|
729
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
|
+
*
|
|
730
818
|
* ```javascript
|
|
731
819
|
* const obj = api.exportObj(ifcContent, true, new Uint32Array(), undefined);
|
|
732
820
|
* ```
|
|
@@ -766,6 +854,10 @@ export class IfcAPI {
|
|
|
766
854
|
* Export **OpenUSD** (`.usda` ASCII): a real Z-up USD stage — spatial hierarchy of
|
|
767
855
|
* `Xform` prims, `UsdGeomMesh` geometry, `UsdPreviewSurface` materials, IFC
|
|
768
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).
|
|
769
861
|
*/
|
|
770
862
|
exportUsd(content: Uint8Array): Uint8Array;
|
|
771
863
|
/**
|
|
@@ -1055,6 +1147,15 @@ export class IfcAPI {
|
|
|
1055
1147
|
* Byte-for-byte identical output — it delegates to the legacy twin.
|
|
1056
1148
|
*/
|
|
1057
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;
|
|
1058
1159
|
/**
|
|
1059
1160
|
* Fit bounded manual correspondences in source metres -> IFC world Z-up
|
|
1060
1161
|
* metres, reporting held-out errors separately. Does not load or move models.
|
|
@@ -1082,12 +1183,20 @@ export class IfcAPI {
|
|
|
1082
1183
|
* Fast entity scanning using SIMD-accelerated Rust scanner
|
|
1083
1184
|
* Returns array of entity references for data model parsing
|
|
1084
1185
|
* Much faster than TypeScript byte-by-byte scanning (5-10x speedup)
|
|
1186
|
+
*
|
|
1187
|
+
* The returned array also carries two own properties describing what the
|
|
1188
|
+
* scan refused (#7393): `oversizedIdCount` (records skipped because their
|
|
1189
|
+
* express id does not fit u32, #3395) and `malformedRecordCount` (0 or 1:
|
|
1190
|
+
* whether a record was dropped for having no terminating `;`, #3695).
|
|
1085
1191
|
*/
|
|
1086
1192
|
scanEntitiesFast(content: string): any;
|
|
1087
1193
|
/**
|
|
1088
1194
|
* Fast entity scanning from raw bytes (avoids TextDecoder.decode on JS side).
|
|
1089
1195
|
* Accepts Uint8Array directly — saves ~2-5s for 487MB files by skipping
|
|
1090
1196
|
* JS string creation and UTF-16→UTF-8 conversion.
|
|
1197
|
+
*
|
|
1198
|
+
* Carries the same `oversizedIdCount` / `malformedRecordCount` array
|
|
1199
|
+
* properties as `scanEntitiesFast` (#7393).
|
|
1091
1200
|
*/
|
|
1092
1201
|
scanEntitiesFastBytes(data: Uint8Array): any;
|
|
1093
1202
|
/**
|
|
@@ -1140,6 +1249,13 @@ export class IfcAPI {
|
|
|
1140
1249
|
* Much faster than scanning all entities (3x speedup for large files)
|
|
1141
1250
|
*/
|
|
1142
1251
|
scanGeometryEntitiesFast(content: string): any;
|
|
1252
|
+
/**
|
|
1253
|
+
* Detect planes and cylinders (columns, pipes) in a point cloud (#6870). `positions` are xyz f32 metres
|
|
1254
|
+
* (at most 100,000,000 points); `options_json` is a camelCase
|
|
1255
|
+
* `ScanSegmentationOptions` object (`{}` for the defaults). Returns the
|
|
1256
|
+
* UTF-8 JSON `ScanSegmentationReport`. Pure: loads and changes nothing.
|
|
1257
|
+
*/
|
|
1258
|
+
segmentScanPoints(positions: Float32Array, options_json: string): Uint8Array;
|
|
1143
1259
|
/**
|
|
1144
1260
|
* Enable or disable per-entity geometry fingerprinting in
|
|
1145
1261
|
* `processGeometryBatch`, used by the viewer's revision-diff feature.
|
|
@@ -1810,6 +1926,50 @@ export class ProfileEntryJs {
|
|
|
1810
1926
|
readonly transform: Float32Array;
|
|
1811
1927
|
}
|
|
1812
1928
|
|
|
1929
|
+
/**
|
|
1930
|
+
* The traced outline. Owns wasm memory: call `free()`.
|
|
1931
|
+
*/
|
|
1932
|
+
export class ScanOutlineJs {
|
|
1933
|
+
private constructor();
|
|
1934
|
+
free(): void;
|
|
1935
|
+
[Symbol.dispose](): void;
|
|
1936
|
+
/**
|
|
1937
|
+
* Every ring's plane coordinates concatenated, `[u0, v0, u1, v1, …]`.
|
|
1938
|
+
*/
|
|
1939
|
+
coords(): Float64Array;
|
|
1940
|
+
/**
|
|
1941
|
+
* What the run did: cell size, cap hits, ring counts, repairs.
|
|
1942
|
+
*/
|
|
1943
|
+
diagnostics(): ScanOutlineDiagnosticsJs;
|
|
1944
|
+
/**
|
|
1945
|
+
* Vertex count of each ring, in `coords()` order.
|
|
1946
|
+
*/
|
|
1947
|
+
ringLengths(): Uint32Array;
|
|
1948
|
+
/**
|
|
1949
|
+
* The ring directly containing each ring (a hole's outer boundary, an
|
|
1950
|
+
* island's hole), or `-1` at top level.
|
|
1951
|
+
*/
|
|
1952
|
+
ringParents(): Int32Array;
|
|
1953
|
+
/**
|
|
1954
|
+
* Ring index at which each shape starts; entry `s` is shape `s`'s outer
|
|
1955
|
+
* ring and the rings up to the next entry are its holes.
|
|
1956
|
+
*/
|
|
1957
|
+
shapeOffsets(): Uint32Array;
|
|
1958
|
+
/**
|
|
1959
|
+
* Every ring mapped through the plane frame, `[x0, y0, z0, …]` in
|
|
1960
|
+
* `coords()` order, or `undefined` when no frame was given.
|
|
1961
|
+
*/
|
|
1962
|
+
worldCoords(): Float64Array | undefined;
|
|
1963
|
+
/**
|
|
1964
|
+
* Total number of rings (outer boundaries and holes).
|
|
1965
|
+
*/
|
|
1966
|
+
readonly ringCount: number;
|
|
1967
|
+
/**
|
|
1968
|
+
* Number of outer boundaries.
|
|
1969
|
+
*/
|
|
1970
|
+
readonly shapeCount: number;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1813
1973
|
/**
|
|
1814
1974
|
* Flat result of `simplifyMeshes`: per surviving element `i`,
|
|
1815
1975
|
* `vertexCounts[i]` vertices and `indexCounts[i]` indices taken in order
|
|
@@ -2348,6 +2508,14 @@ export function meshOutline2d(positions: Float32Array, indices: Uint32Array, axi
|
|
|
2348
2508
|
*/
|
|
2349
2509
|
export function resolve2d(a: Contours2D): Contours2D;
|
|
2350
2510
|
|
|
2511
|
+
/**
|
|
2512
|
+
* Install (or, with `undefined`, remove) the callback invoked at most once a
|
|
2513
|
+
* second while geometry work is in progress inside a WASM call. It runs
|
|
2514
|
+
* synchronously inside that call, so it must only do something cheap such as
|
|
2515
|
+
* `postMessage`, and must not call back into this module.
|
|
2516
|
+
*/
|
|
2517
|
+
export function setGeometryProgressCallback(callback?: Function | null): void;
|
|
2518
|
+
|
|
2351
2519
|
/**
|
|
2352
2520
|
* Split a mesh into one closed solid per zone, plus the remainder.
|
|
2353
2521
|
*
|
|
@@ -2378,6 +2546,14 @@ export function resolve2d(a: Contours2D): Contours2D;
|
|
|
2378
2546
|
* meaningless volumes with a plausible `sumErrorRel`, so the closure proof
|
|
2379
2547
|
* above is the caller's responsibility and not a formality.
|
|
2380
2548
|
*
|
|
2549
|
+
* Returns `undefined` when a zone parameter is non-finite, or a mesh vertex
|
|
2550
|
+
* or zone corner lies past ±2^128, the exact kernel's coordinate bound
|
|
2551
|
+
* (#7677): such a split is refused rather than answered wrongly.
|
|
2552
|
+
*
|
|
2553
|
+
* Returns `undefined` if an intersection, zone union or remainder exhausts
|
|
2554
|
+
* the exact kernel's work budget. Completed pieces are not returned as a
|
|
2555
|
+
* successful partial split, and a failed empty piece is not treated as disjoint.
|
|
2556
|
+
*
|
|
2381
2557
|
* Returns `undefined` when the mesh encloses no volume (no triangles survive
|
|
2382
2558
|
* the filter above, or the shell is degenerate): there is nothing to split,
|
|
2383
2559
|
* and a result for it would report `pieceCount` 1, `sumErrorRel` 0 and
|
|
@@ -2388,7 +2564,7 @@ export function resolve2d(a: Contours2D): Contours2D;
|
|
|
2388
2564
|
* const split = splitMeshByZones(positions, indices, new Float64Array([
|
|
2389
2565
|
* 0, 0, 0, 10, 10, 10, 0,
|
|
2390
2566
|
* ]));
|
|
2391
|
-
* if (!split) return; //
|
|
2567
|
+
* if (!split) return; // no usable complete split
|
|
2392
2568
|
* for (let i = 0; i < split.pieceCount; i++) {
|
|
2393
2569
|
* const piece = split.piece(i);
|
|
2394
2570
|
* // piece.zoneIndex, piece.positions, piece.indices, piece.volume
|
|
@@ -2399,6 +2575,14 @@ export function resolve2d(a: Contours2D): Contours2D;
|
|
|
2399
2575
|
*/
|
|
2400
2576
|
export function splitMeshByZones(positions: Float64Array, indices: Uint32Array, zones: Float64Array, footprints?: Float64Array | null, footprint_counts?: Uint32Array | null): ZoneSplitJs | undefined;
|
|
2401
2577
|
|
|
2578
|
+
/**
|
|
2579
|
+
* Trace closed outlines from slab points given in plane coordinates.
|
|
2580
|
+
*
|
|
2581
|
+
* THROWS on invalid options or plane frame (unknown field, non-finite or
|
|
2582
|
+
* out-of-range value). Points that are not finite are skipped and counted.
|
|
2583
|
+
*/
|
|
2584
|
+
export function traceScanOutline(plane_xy: Float32Array, options?: ScanOutlineOptionsJs | null, plane_frame?: ScanOutlinePlaneFrameJs | null): ScanOutlineJs;
|
|
2585
|
+
|
|
2402
2586
|
/**
|
|
2403
2587
|
* `a ∪ b`.
|
|
2404
2588
|
*/
|
|
@@ -2438,6 +2622,7 @@ export interface InitOutput {
|
|
|
2438
2622
|
readonly __wbg_partitionedbatch_free: (a: number, b: number) => void;
|
|
2439
2623
|
readonly __wbg_profilecollection_free: (a: number, b: number) => void;
|
|
2440
2624
|
readonly __wbg_profileentryjs_free: (a: number, b: number) => void;
|
|
2625
|
+
readonly __wbg_scanoutlinejs_free: (a: number, b: number) => void;
|
|
2441
2626
|
readonly __wbg_simplifiedmeshes_free: (a: number, b: number) => void;
|
|
2442
2627
|
readonly __wbg_spaceplatehandle_free: (a: number, b: number) => void;
|
|
2443
2628
|
readonly __wbg_symboliccircle_free: (a: number, b: number) => void;
|
|
@@ -2506,13 +2691,14 @@ export interface InitOutput {
|
|
|
2506
2691
|
readonly ifcapi_exportCsv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
2507
2692
|
readonly ifcapi_exportDfjson: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
2508
2693
|
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;
|
|
2509
|
-
readonly ifcapi_exportGlbFromMeshes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number) => void;
|
|
2694
|
+
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;
|
|
2510
2695
|
readonly ifcapi_exportHbjson: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
2511
2696
|
readonly ifcapi_exportHbjsonWithStats: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
2512
2697
|
readonly ifcapi_exportIfcx: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
2513
2698
|
readonly ifcapi_exportJson: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
2514
2699
|
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;
|
|
2515
2700
|
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;
|
|
2701
|
+
readonly ifcapi_exportLandXmlTerrain: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
2516
2702
|
readonly ifcapi_exportMerged: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
2517
2703
|
readonly ifcapi_exportObj: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
2518
2704
|
readonly ifcapi_exportStep: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
@@ -2554,6 +2740,7 @@ export interface InitOutput {
|
|
|
2554
2740
|
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;
|
|
2555
2741
|
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;
|
|
2556
2742
|
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;
|
|
2743
|
+
readonly ifcapi_proposeScanElements: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
2557
2744
|
readonly ifcapi_registerScanCorrespondences: (a: number, b: number, c: number, d: number) => void;
|
|
2558
2745
|
readonly ifcapi_resolveStyledItemsShard: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
2559
2746
|
readonly ifcapi_resolveStyledItemsShardFromSource: (a: number, b: number, c: number, d: number) => void;
|
|
@@ -2562,6 +2749,7 @@ export interface InitOutput {
|
|
|
2562
2749
|
readonly ifcapi_scanEntityIndexShard: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
2563
2750
|
readonly ifcapi_scanEntityIndexShardFromSource: (a: number, b: number, c: number) => number;
|
|
2564
2751
|
readonly ifcapi_scanGeometryEntitiesFast: (a: number, b: number, c: number) => number;
|
|
2752
|
+
readonly ifcapi_segmentScanPoints: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
2565
2753
|
readonly ifcapi_setComputeGeometryHashes: (a: number, b: number, c: number) => void;
|
|
2566
2754
|
readonly ifcapi_setEntityIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
2567
2755
|
readonly ifcapi_setInstantiatedTypeIds: (a: number, b: number, c: number) => void;
|
|
@@ -2650,6 +2838,15 @@ export interface InitOutput {
|
|
|
2650
2838
|
readonly profileentryjs_outerPoints: (a: number) => number;
|
|
2651
2839
|
readonly profileentryjs_transform: (a: number) => number;
|
|
2652
2840
|
readonly resolve2d: (a: number) => number;
|
|
2841
|
+
readonly scanoutlinejs_coords: (a: number) => number;
|
|
2842
|
+
readonly scanoutlinejs_diagnostics: (a: number, b: number) => void;
|
|
2843
|
+
readonly scanoutlinejs_ringCount: (a: number) => number;
|
|
2844
|
+
readonly scanoutlinejs_ringLengths: (a: number) => number;
|
|
2845
|
+
readonly scanoutlinejs_ringParents: (a: number) => number;
|
|
2846
|
+
readonly scanoutlinejs_shapeCount: (a: number) => number;
|
|
2847
|
+
readonly scanoutlinejs_shapeOffsets: (a: number) => number;
|
|
2848
|
+
readonly scanoutlinejs_worldCoords: (a: number) => number;
|
|
2849
|
+
readonly setGeometryProgressCallback: (a: number) => void;
|
|
2653
2850
|
readonly simplifiedmeshes_cavitiesDropped: (a: number, b: number) => void;
|
|
2654
2851
|
readonly simplifiedmeshes_elementIds: (a: number, b: number) => void;
|
|
2655
2852
|
readonly simplifiedmeshes_indexCounts: (a: number, b: number) => void;
|
|
@@ -2742,6 +2939,7 @@ export interface InitOutput {
|
|
|
2742
2939
|
readonly symbolictext_repIdentifier: (a: number, b: number) => void;
|
|
2743
2940
|
readonly symbolictext_x: (a: number) => number;
|
|
2744
2941
|
readonly symbolictext_y: (a: number) => number;
|
|
2942
|
+
readonly traceScanOutline: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
2745
2943
|
readonly union2d: (a: number, b: number) => number;
|
|
2746
2944
|
readonly version: (a: number) => void;
|
|
2747
2945
|
readonly zonepiecejs_indices: (a: number) => number;
|