@ifc-lite/viewer 1.27.0 → 1.28.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/.turbo/turbo-build.log +38 -38
- package/CHANGELOG.md +64 -0
- package/dist/assets/{basketViewActivator-B3CdrLsb.js → basketViewActivator-BNRDNuUJ.js} +8 -8
- package/dist/assets/{bcf-QeHK_Aud.js → bcf-DCwCuP7n.js} +56 -56
- package/dist/assets/{decode-worker-CgM1iNSK.js → decode-worker-Cjign7Zh.js} +1 -1
- package/dist/assets/{deflate-B-d0SYQM.js → deflate-DNGgs8Ur.js} +1 -1
- package/dist/assets/drawing-2d-D0dDf6Lh.js +257 -0
- package/dist/assets/e57-source-2wI9jkCA.js +1 -0
- package/dist/assets/{exporters-B4LbZFeT.js → exporters-B9v81gi9.js} +1249 -1140
- package/dist/assets/geometry.worker-Bpa3115V.js +1 -0
- package/dist/assets/{geotiff-CrVtDRFq.js → geotiff-D-YCLS4g.js} +10 -10
- package/dist/assets/{ids-DjsGFN10.js → ids-CCpq-5d3.js} +952 -945
- package/dist/assets/{ifc-lite_bg-DsYUIHm3.wasm → ifc-lite_bg-DbgS5EUA.wasm} +0 -0
- package/dist/assets/{index-COYokSKc.js → index-Bgb3_Pu_.js} +41073 -38715
- package/dist/assets/index-BtbXFKsX.css +1 -0
- package/dist/assets/{index.es-CY202jA3.js → index.es-CWfqZyyr.js} +9 -9
- package/dist/assets/{jpeg-D4wOkf5h.js → jpeg-DGOAeUqU.js} +1 -1
- package/dist/assets/{jspdf.es.min-DIGb9BHN.js → jspdf.es.min-XPLU2Wkq.js} +4 -4
- package/dist/assets/lens-C4p1kQ0p.js +1 -0
- package/dist/assets/{lerc-DmW0_tgf.js → lerc-1PMSCHwX.js} +1 -1
- package/dist/assets/{lzw-oWetY-d6.js → lzw-C65U9lNM.js} +1 -1
- package/dist/assets/{native-bridge-BX8_tHXE.js → native-bridge-XxXos6yI.js} +2 -2
- package/dist/assets/{packbits-F8Nkp4NY.js → packbits-BdMWXC3m.js} +1 -1
- package/dist/assets/parser.worker-Ddwo3_06.js +182 -0
- package/dist/assets/{pdf-Dsh3HPZB.js → pdf-CRwaZf3s.js} +10 -10
- package/dist/assets/raw-CJgQdyuZ.js +1 -0
- package/dist/assets/{sandbox-BAC3a-eN.js → sandbox-0sDo3g3m.js} +2960 -2552
- package/dist/assets/server-client-cTCJ-853.js +719 -0
- package/dist/assets/{webimage-BLV1dgmd.js → webimage-BtakWX7W.js} +1 -1
- package/dist/assets/{xlsx-Bc2HTrjC.js → xlsx-B1YOg2QB.js} +8 -8
- package/dist/assets/{zstd-C_1HxVrA.js → zstd-CmwsbxmM.js} +1 -1
- package/dist/index.html +9 -9
- package/package.json +24 -23
- package/src/components/mcp/playground-dispatcher.ts +3 -0
- package/src/components/mcp/playground-files.ts +33 -1
- package/src/components/viewer/CommandPalette.tsx +6 -1
- package/src/components/viewer/ComparePanel.tsx +420 -0
- package/src/components/viewer/HierarchyPanel.tsx +46 -7
- package/src/components/viewer/MainToolbar.tsx +19 -2
- package/src/components/viewer/PropertiesPanel.tsx +71 -2
- package/src/components/viewer/ViewerLayout.tsx +5 -0
- package/src/components/viewer/Viewport.tsx +3 -0
- package/src/components/viewer/hierarchy/HierarchyNode.tsx +3 -3
- package/src/components/viewer/hierarchy/ifc-icons.ts +9 -0
- package/src/components/viewer/hierarchy/treeDataBuilder.ts +87 -0
- package/src/components/viewer/hierarchy/types.ts +1 -0
- package/src/components/viewer/hierarchy/useHierarchyTree.ts +6 -2
- package/src/components/viewer/properties/MaterialTotalsPanel.tsx +283 -0
- package/src/hooks/federationLoadGate.test.ts +12 -2
- package/src/hooks/federationLoadGate.ts +9 -2
- package/src/hooks/ingest/federationAlign.ts +481 -0
- package/src/hooks/ingest/viewerModelIngest.ts +3 -212
- package/src/hooks/useCompare.ts +0 -0
- package/src/hooks/useCompareOverlay.ts +119 -0
- package/src/hooks/useDrawingGeneration.ts +23 -1
- package/src/hooks/useIfc.ts +1 -1
- package/src/hooks/useIfcCache.ts +32 -9
- package/src/hooks/useIfcFederation.ts +42 -810
- package/src/hooks/useIfcLoader.ts +361 -488
- package/src/hooks/useIfcServer.ts +3 -0
- package/src/hooks/useLens.ts +5 -1
- package/src/hooks/useSymbolicAnnotations.ts +70 -38
- package/src/lib/compare/buildFingerprints.ts +173 -0
- package/src/lib/compare/describeChange.ts +0 -0
- package/src/lib/compare/geometricData.test.ts +54 -0
- package/src/lib/compare/geometricData.ts +37 -0
- package/src/lib/compare/overlay.test.ts +99 -0
- package/src/lib/compare/overlay.ts +91 -0
- package/src/lib/geo/cesium-placement.ts +1 -1
- package/src/lib/geo/reproject.ts +4 -1
- package/src/lib/llm/script-edit-ops.ts +23 -0
- package/src/lib/llm/stream-client.ts +8 -1
- package/src/lib/search/result-export.ts +7 -1
- package/src/sdk/adapters/export-adapter.ts +6 -1
- package/src/store/globalId.ts +15 -13
- package/src/store/index.ts +16 -1
- package/src/store/slices/cesiumSlice.ts +8 -1
- package/src/store/slices/compareSlice.ts +96 -0
- package/src/store/slices/lensSlice.ts +8 -0
- package/src/utils/acquireFileBuffer.test.ts +12 -4
- package/src/utils/desktopModelSnapshot.ts +2 -1
- package/src/utils/loadingUtils.ts +32 -0
- package/src/utils/spatialHierarchy.test.ts +53 -1
- package/src/utils/spatialHierarchy.ts +42 -2
- package/src/vite-env.d.ts +2 -0
- package/dist/assets/drawing-2d-C71b8Ugx.js +0 -257
- package/dist/assets/e57-source-CQHxE8n3.js +0 -1
- package/dist/assets/geometry.worker-BdH-E6NB.js +0 -1
- package/dist/assets/index-ajK6D32J.css +0 -1
- package/dist/assets/lens-PYsLu_MA.js +0 -1
- package/dist/assets/parser.worker-D591Zu_-.js +0 -182
- package/dist/assets/raw-D9iw0tmc.js +0 -1
- package/dist/assets/server-client-Cjwnm7il.js +0 -706
- package/src/hooks/ingest/resolveDataStoreOrAbort.test.ts +0 -61
- package/src/hooks/ingest/resolveDataStoreOrAbort.ts +0 -28
- package/src/hooks/ingest/watchedGeometryStream.test.ts +0 -78
- package/src/hooks/ingest/watchedGeometryStream.ts +0 -76
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-bridge-
|
|
2
|
-
import {
|
|
3
|
-
let
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-bridge-XxXos6yI.js","assets/sandbox-0sDo3g3m.js","assets/lens-C4p1kQ0p.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import { W as We, _ as je, aX as it, ac as ke, ad as Ye, k as st, l as Et, a_ as De, E as Xe, ao as ie, as as qe, ap as Qe, aS as Je, Y as Ke, j as re, i as Ze, __tla as __tla_0 } from "./sandbox-0sDo3g3m.js";
|
|
3
|
+
let ps, hs, Ue, _s, rs, $e, us, wn, Is, ae, gs, fs;
|
|
4
4
|
let __tla = Promise.all([
|
|
5
5
|
(()=>{
|
|
6
6
|
try {
|
|
@@ -9,74 +9,81 @@ let __tla = Promise.all([
|
|
|
9
9
|
})()
|
|
10
10
|
]).then(async ()=>{
|
|
11
11
|
let a;
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
const t =
|
|
15
|
-
return
|
|
12
|
+
function P(r) {
|
|
13
|
+
Ot === ct.length && ct.push(ct.length + 1);
|
|
14
|
+
const t = Ot;
|
|
15
|
+
return Ot = ct[t], ct[t] = r, t;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function tn(r) {
|
|
18
18
|
if (kt == 1) throw new Error("out of js stack");
|
|
19
|
-
return
|
|
19
|
+
return ct[--kt] = r, kt;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const he = typeof FinalizationRegistry > "u" ? {
|
|
22
22
|
register: ()=>{},
|
|
23
23
|
unregister: ()=>{}
|
|
24
24
|
} : new FinalizationRegistry((r)=>r.dtor(r.a, r.b));
|
|
25
|
-
function
|
|
26
|
-
r < 132 || (
|
|
25
|
+
function en(r) {
|
|
26
|
+
r < 132 || (ct[r] = Ot, Ot = r);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return r = r >>> 0,
|
|
28
|
+
function oe(r, t) {
|
|
29
|
+
return r = r >>> 0, an().subarray(r / 4, r / 4 + t);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
return r = r >>> 0,
|
|
31
|
+
function nn(r, t) {
|
|
32
|
+
return r = r >>> 0, cn().subarray(r / 8, r / 8 + t);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return r = r >>> 0,
|
|
34
|
+
function ve(r, t) {
|
|
35
|
+
return r = r >>> 0, Ge().subarray(r / 4, r / 4 + t);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function sn(r, t) {
|
|
38
|
+
return r = r >>> 0, on().subarray(r / 8, r / 8 + t);
|
|
39
|
+
}
|
|
40
|
+
function rn(r, t) {
|
|
38
41
|
return r = r >>> 0, Ct().subarray(r / 1, r / 1 + t);
|
|
39
42
|
}
|
|
43
|
+
let Ft = null;
|
|
44
|
+
function on() {
|
|
45
|
+
return (Ft === null || Ft.byteLength === 0) && (Ft = new BigUint64Array(a.memory.buffer)), Ft;
|
|
46
|
+
}
|
|
40
47
|
let _t = null;
|
|
41
48
|
function A() {
|
|
42
49
|
return (_t === null || _t.buffer.detached === !0 || _t.buffer.detached === void 0 && _t.buffer !== a.memory.buffer) && (_t = new DataView(a.memory.buffer)), _t;
|
|
43
50
|
}
|
|
44
|
-
let
|
|
45
|
-
function
|
|
46
|
-
return (
|
|
51
|
+
let Rt = null;
|
|
52
|
+
function an() {
|
|
53
|
+
return (Rt === null || Rt.byteLength === 0) && (Rt = new Float32Array(a.memory.buffer)), Rt;
|
|
47
54
|
}
|
|
48
|
-
let
|
|
49
|
-
function
|
|
50
|
-
return (
|
|
55
|
+
let St = null;
|
|
56
|
+
function cn() {
|
|
57
|
+
return (St === null || St.byteLength === 0) && (St = new Float64Array(a.memory.buffer)), St;
|
|
51
58
|
}
|
|
52
|
-
function
|
|
53
|
-
return r = r >>> 0,
|
|
59
|
+
function K(r, t) {
|
|
60
|
+
return r = r >>> 0, fn(r, t);
|
|
54
61
|
}
|
|
55
|
-
let
|
|
56
|
-
function
|
|
57
|
-
return (
|
|
62
|
+
let Nt = null;
|
|
63
|
+
function Ge() {
|
|
64
|
+
return (Nt === null || Nt.byteLength === 0) && (Nt = new Uint32Array(a.memory.buffer)), Nt;
|
|
58
65
|
}
|
|
59
|
-
let
|
|
66
|
+
let At = null;
|
|
60
67
|
function Ct() {
|
|
61
|
-
return (
|
|
68
|
+
return (At === null || At.byteLength === 0) && (At = new Uint8Array(a.memory.buffer)), At;
|
|
62
69
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
70
|
+
function j(r) {
|
|
71
|
+
return ct[r];
|
|
65
72
|
}
|
|
66
|
-
function
|
|
73
|
+
function Jt(r, t) {
|
|
67
74
|
try {
|
|
68
75
|
return r.apply(this, t);
|
|
69
76
|
} catch (e) {
|
|
70
|
-
a.__wbindgen_export(
|
|
77
|
+
a.__wbindgen_export(P(e));
|
|
71
78
|
}
|
|
72
79
|
}
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
let
|
|
76
|
-
function
|
|
80
|
+
let ct = new Array(128).fill(void 0);
|
|
81
|
+
ct.push(void 0, null, !0, !1);
|
|
82
|
+
let Ot = ct.length;
|
|
83
|
+
function bt(r) {
|
|
77
84
|
return r == null;
|
|
78
85
|
}
|
|
79
|
-
function
|
|
86
|
+
function ln(r, t, e, n) {
|
|
80
87
|
const s = {
|
|
81
88
|
a: r,
|
|
82
89
|
b: t,
|
|
@@ -93,21 +100,21 @@ let __tla = Promise.all([
|
|
|
93
100
|
}
|
|
94
101
|
};
|
|
95
102
|
return i._wbg_cb_unref = ()=>{
|
|
96
|
-
--s.cnt === 0 && (s.dtor(s.a, s.b), s.a = 0,
|
|
97
|
-
},
|
|
103
|
+
--s.cnt === 0 && (s.dtor(s.a, s.b), s.a = 0, he.unregister(s));
|
|
104
|
+
}, he.register(i, s, s), i;
|
|
98
105
|
}
|
|
99
106
|
function ut(r, t) {
|
|
100
107
|
const e = t(r.length * 4, 4) >>> 0;
|
|
101
|
-
return
|
|
108
|
+
return Ge().set(r, e / 4), v = r.length, e;
|
|
102
109
|
}
|
|
103
|
-
function
|
|
110
|
+
function gt(r, t) {
|
|
104
111
|
const e = t(r.length * 1, 1) >>> 0;
|
|
105
|
-
return Ct().set(r, e / 1),
|
|
112
|
+
return Ct().set(r, e / 1), v = r.length, e;
|
|
106
113
|
}
|
|
107
|
-
function
|
|
114
|
+
function lt(r, t, e) {
|
|
108
115
|
if (e === void 0) {
|
|
109
|
-
const c =
|
|
110
|
-
return Ct().subarray(l, l + c.length).set(c),
|
|
116
|
+
const c = xt.encode(r), l = t(c.length, 1) >>> 0;
|
|
117
|
+
return Ct().subarray(l, l + c.length).set(c), v = c.length, l;
|
|
111
118
|
}
|
|
112
119
|
let n = r.length, s = t(n, 1) >>> 0;
|
|
113
120
|
const i = Ct();
|
|
@@ -119,92 +126,92 @@ let __tla = Promise.all([
|
|
|
119
126
|
}
|
|
120
127
|
if (o !== n) {
|
|
121
128
|
o !== 0 && (r = r.slice(o)), s = e(s, n, n = o + r.length * 3, 1) >>> 0;
|
|
122
|
-
const c = Ct().subarray(s + o, s + n), l =
|
|
129
|
+
const c = Ct().subarray(s + o, s + n), l = xt.encodeInto(r, c);
|
|
123
130
|
o += l.written, s = e(s, n, o, 1) >>> 0;
|
|
124
131
|
}
|
|
125
|
-
return
|
|
132
|
+
return v = o, s;
|
|
126
133
|
}
|
|
127
134
|
let kt = 128;
|
|
128
|
-
function
|
|
129
|
-
const t =
|
|
130
|
-
return
|
|
135
|
+
function B(r) {
|
|
136
|
+
const t = j(r);
|
|
137
|
+
return en(r), t;
|
|
131
138
|
}
|
|
132
139
|
let Yt = new TextDecoder("utf-8", {
|
|
133
140
|
ignoreBOM: !0,
|
|
134
141
|
fatal: !0
|
|
135
142
|
});
|
|
136
143
|
Yt.decode();
|
|
137
|
-
const
|
|
138
|
-
let
|
|
139
|
-
function
|
|
140
|
-
return
|
|
144
|
+
const dn = 2146435072;
|
|
145
|
+
let Kt = 0;
|
|
146
|
+
function fn(r, t) {
|
|
147
|
+
return Kt += t, Kt >= dn && (Yt = new TextDecoder("utf-8", {
|
|
141
148
|
ignoreBOM: !0,
|
|
142
149
|
fatal: !0
|
|
143
|
-
}), Yt.decode(),
|
|
150
|
+
}), Yt.decode(), Kt = t), Yt.decode(Ct().subarray(r, r + t));
|
|
144
151
|
}
|
|
145
|
-
const
|
|
146
|
-
"encodeInto" in
|
|
147
|
-
const e =
|
|
152
|
+
const xt = new TextEncoder;
|
|
153
|
+
"encodeInto" in xt || (xt.encodeInto = function(r, t) {
|
|
154
|
+
const e = xt.encode(r);
|
|
148
155
|
return t.set(e), {
|
|
149
156
|
read: r.length,
|
|
150
157
|
written: e.length
|
|
151
158
|
};
|
|
152
159
|
});
|
|
153
|
-
let
|
|
154
|
-
function
|
|
155
|
-
a.
|
|
160
|
+
let v = 0;
|
|
161
|
+
function un(r, t, e) {
|
|
162
|
+
a.__wasm_bindgen_func_elem_666(r, t, P(e));
|
|
156
163
|
}
|
|
157
|
-
function
|
|
158
|
-
a.
|
|
164
|
+
function hn(r, t, e, n) {
|
|
165
|
+
a.__wasm_bindgen_func_elem_700(r, t, P(e), P(n));
|
|
159
166
|
}
|
|
160
167
|
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r)=>a.__wbg_clashrunresult_free(r >>> 0, 1));
|
|
161
168
|
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r)=>a.__wbg_clashsession_free(r >>> 0, 1));
|
|
162
|
-
const
|
|
169
|
+
const pe = typeof FinalizationRegistry > "u" ? {
|
|
163
170
|
register: ()=>{},
|
|
164
171
|
unregister: ()=>{}
|
|
165
|
-
} : new FinalizationRegistry((r)=>a.__wbg_gridaxiscollection_free(r >>> 0, 1)),
|
|
172
|
+
} : new FinalizationRegistry((r)=>a.__wbg_gridaxiscollection_free(r >>> 0, 1)), ge = typeof FinalizationRegistry > "u" ? {
|
|
166
173
|
register: ()=>{},
|
|
167
174
|
unregister: ()=>{}
|
|
168
|
-
} : new FinalizationRegistry((r)=>a.__wbg_gridaxisjs_free(r >>> 0, 1)),
|
|
175
|
+
} : new FinalizationRegistry((r)=>a.__wbg_gridaxisjs_free(r >>> 0, 1)), _e = typeof FinalizationRegistry > "u" ? {
|
|
169
176
|
register: ()=>{},
|
|
170
177
|
unregister: ()=>{}
|
|
171
|
-
} : new FinalizationRegistry((r)=>a.__wbg_ifcapi_free(r >>> 0, 1)),
|
|
178
|
+
} : new FinalizationRegistry((r)=>a.__wbg_ifcapi_free(r >>> 0, 1)), Ie = typeof FinalizationRegistry > "u" ? {
|
|
172
179
|
register: ()=>{},
|
|
173
180
|
unregister: ()=>{}
|
|
174
|
-
} : new FinalizationRegistry((r)=>a.__wbg_meshcollection_free(r >>> 0, 1)),
|
|
181
|
+
} : new FinalizationRegistry((r)=>a.__wbg_meshcollection_free(r >>> 0, 1)), ye = typeof FinalizationRegistry > "u" ? {
|
|
175
182
|
register: ()=>{},
|
|
176
183
|
unregister: ()=>{}
|
|
177
|
-
} : new FinalizationRegistry((r)=>a.__wbg_meshdatajs_free(r >>> 0, 1)),
|
|
184
|
+
} : new FinalizationRegistry((r)=>a.__wbg_meshdatajs_free(r >>> 0, 1)), me = typeof FinalizationRegistry > "u" ? {
|
|
178
185
|
register: ()=>{},
|
|
179
186
|
unregister: ()=>{}
|
|
180
|
-
} : new FinalizationRegistry((r)=>a.__wbg_profilecollection_free(r >>> 0, 1)),
|
|
187
|
+
} : new FinalizationRegistry((r)=>a.__wbg_profilecollection_free(r >>> 0, 1)), Ee = typeof FinalizationRegistry > "u" ? {
|
|
181
188
|
register: ()=>{},
|
|
182
189
|
unregister: ()=>{}
|
|
183
|
-
} : new FinalizationRegistry((r)=>a.__wbg_profileentryjs_free(r >>> 0, 1)),
|
|
190
|
+
} : new FinalizationRegistry((r)=>a.__wbg_profileentryjs_free(r >>> 0, 1)), be = typeof FinalizationRegistry > "u" ? {
|
|
184
191
|
register: ()=>{},
|
|
185
192
|
unregister: ()=>{}
|
|
186
|
-
} : new FinalizationRegistry((r)=>a.__wbg_symboliccircle_free(r >>> 0, 1)),
|
|
193
|
+
} : new FinalizationRegistry((r)=>a.__wbg_symboliccircle_free(r >>> 0, 1)), Ce = typeof FinalizationRegistry > "u" ? {
|
|
187
194
|
register: ()=>{},
|
|
188
195
|
unregister: ()=>{}
|
|
189
|
-
} : new FinalizationRegistry((r)=>a.__wbg_symbolicfillarea_free(r >>> 0, 1)),
|
|
196
|
+
} : new FinalizationRegistry((r)=>a.__wbg_symbolicfillarea_free(r >>> 0, 1)), we = typeof FinalizationRegistry > "u" ? {
|
|
190
197
|
register: ()=>{},
|
|
191
198
|
unregister: ()=>{}
|
|
192
|
-
} : new FinalizationRegistry((r)=>a.__wbg_symbolicpolyline_free(r >>> 0, 1)),
|
|
199
|
+
} : new FinalizationRegistry((r)=>a.__wbg_symbolicpolyline_free(r >>> 0, 1)), Te = typeof FinalizationRegistry > "u" ? {
|
|
193
200
|
register: ()=>{},
|
|
194
201
|
unregister: ()=>{}
|
|
195
|
-
} : new FinalizationRegistry((r)=>a.__wbg_symbolicrepresentationcollection_free(r >>> 0, 1)),
|
|
202
|
+
} : new FinalizationRegistry((r)=>a.__wbg_symbolicrepresentationcollection_free(r >>> 0, 1)), Fe = typeof FinalizationRegistry > "u" ? {
|
|
196
203
|
register: ()=>{},
|
|
197
204
|
unregister: ()=>{}
|
|
198
205
|
} : new FinalizationRegistry((r)=>a.__wbg_symbolictext_free(r >>> 0, 1));
|
|
199
|
-
class
|
|
206
|
+
class Lt {
|
|
200
207
|
static __wrap(t) {
|
|
201
208
|
t = t >>> 0;
|
|
202
|
-
const e = Object.create(
|
|
203
|
-
return e.__wbg_ptr = t,
|
|
209
|
+
const e = Object.create(Lt.prototype);
|
|
210
|
+
return e.__wbg_ptr = t, pe.register(e, e.__wbg_ptr, e), e;
|
|
204
211
|
}
|
|
205
212
|
__destroy_into_raw() {
|
|
206
213
|
const t = this.__wbg_ptr;
|
|
207
|
-
return this.__wbg_ptr = 0,
|
|
214
|
+
return this.__wbg_ptr = 0, pe.unregister(this), t;
|
|
208
215
|
}
|
|
209
216
|
free() {
|
|
210
217
|
const t = this.__destroy_into_raw();
|
|
@@ -215,22 +222,22 @@ let __tla = Promise.all([
|
|
|
215
222
|
}
|
|
216
223
|
getAxis(t) {
|
|
217
224
|
const e = a.gridaxiscollection_getAxis(this.__wbg_ptr, t);
|
|
218
|
-
return e === 0 ? void 0 :
|
|
225
|
+
return e === 0 ? void 0 : Mt.__wrap(e);
|
|
219
226
|
}
|
|
220
227
|
get isEmpty() {
|
|
221
228
|
return a.gridaxiscollection_isEmpty(this.__wbg_ptr) !== 0;
|
|
222
229
|
}
|
|
223
230
|
}
|
|
224
|
-
Symbol.dispose && (
|
|
225
|
-
class
|
|
231
|
+
Symbol.dispose && (Lt.prototype[Symbol.dispose] = Lt.prototype.free);
|
|
232
|
+
class Mt {
|
|
226
233
|
static __wrap(t) {
|
|
227
234
|
t = t >>> 0;
|
|
228
|
-
const e = Object.create(
|
|
229
|
-
return e.__wbg_ptr = t,
|
|
235
|
+
const e = Object.create(Mt.prototype);
|
|
236
|
+
return e.__wbg_ptr = t, ge.register(e, e.__wbg_ptr, e), e;
|
|
230
237
|
}
|
|
231
238
|
__destroy_into_raw() {
|
|
232
239
|
const t = this.__wbg_ptr;
|
|
233
|
-
return this.__wbg_ptr = 0,
|
|
240
|
+
return this.__wbg_ptr = 0, ge.unregister(this), t;
|
|
234
241
|
}
|
|
235
242
|
free() {
|
|
236
243
|
const t = this.__destroy_into_raw();
|
|
@@ -238,7 +245,7 @@ let __tla = Promise.all([
|
|
|
238
245
|
}
|
|
239
246
|
get end() {
|
|
240
247
|
const t = a.gridaxisjs_end(this.__wbg_ptr);
|
|
241
|
-
return
|
|
248
|
+
return B(t);
|
|
242
249
|
}
|
|
243
250
|
get tag() {
|
|
244
251
|
let t, e;
|
|
@@ -246,14 +253,14 @@ let __tla = Promise.all([
|
|
|
246
253
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
247
254
|
a.gridaxisjs_tag(i, this.__wbg_ptr);
|
|
248
255
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
249
|
-
return t = n, e = s,
|
|
256
|
+
return t = n, e = s, K(n, s);
|
|
250
257
|
} finally{
|
|
251
258
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
252
259
|
}
|
|
253
260
|
}
|
|
254
261
|
get start() {
|
|
255
262
|
const t = a.gridaxisjs_start(this.__wbg_ptr);
|
|
256
|
-
return
|
|
263
|
+
return B(t);
|
|
257
264
|
}
|
|
258
265
|
get axisId() {
|
|
259
266
|
return a.gridaxisjs_axisId(this.__wbg_ptr) >>> 0;
|
|
@@ -262,61 +269,61 @@ let __tla = Promise.all([
|
|
|
262
269
|
return a.gridaxisjs_gridId(this.__wbg_ptr) >>> 0;
|
|
263
270
|
}
|
|
264
271
|
}
|
|
265
|
-
Symbol.dispose && (
|
|
266
|
-
|
|
272
|
+
Symbol.dispose && (Mt.prototype[Symbol.dispose] = Mt.prototype.free);
|
|
273
|
+
ae = class {
|
|
267
274
|
__destroy_into_raw() {
|
|
268
275
|
const t = this.__wbg_ptr;
|
|
269
|
-
return this.__wbg_ptr = 0,
|
|
276
|
+
return this.__wbg_ptr = 0, _e.unregister(this), t;
|
|
270
277
|
}
|
|
271
278
|
free() {
|
|
272
279
|
const t = this.__destroy_into_raw();
|
|
273
280
|
a.__wbg_ifcapi_free(t, 0);
|
|
274
281
|
}
|
|
275
282
|
buildPrePassFast(t) {
|
|
276
|
-
const e =
|
|
277
|
-
return
|
|
283
|
+
const e = gt(t, a.__wbindgen_export3), n = v, s = a.ifcapi_buildPrePassFast(this.__wbg_ptr, e, n);
|
|
284
|
+
return B(s);
|
|
278
285
|
}
|
|
279
286
|
buildPrePassOnce(t) {
|
|
280
|
-
const e =
|
|
281
|
-
return
|
|
287
|
+
const e = gt(t, a.__wbindgen_export3), n = v, s = a.ifcapi_buildPrePassOnce(this.__wbg_ptr, e, n);
|
|
288
|
+
return B(s);
|
|
282
289
|
}
|
|
283
|
-
processGeometryBatch(t, e, n, s, i, o, c, l, d,
|
|
284
|
-
const
|
|
285
|
-
return
|
|
290
|
+
processGeometryBatch(t, e, n, s, i, o, c, l, d, f, u, p) {
|
|
291
|
+
const I = gt(t, a.__wbindgen_export3), h = v, y = ut(e, a.__wbindgen_export3), E = v, C = ut(l, a.__wbindgen_export3), T = v, G = ut(d, a.__wbindgen_export3), x = v, k = ut(f, a.__wbindgen_export3), O = v, D = ut(u, a.__wbindgen_export3), b = v, S = gt(p, a.__wbindgen_export3), F = v, m = a.ifcapi_processGeometryBatch(this.__wbg_ptr, I, h, y, E, n, s, i, o, c, C, T, G, x, k, O, D, b, S, F);
|
|
292
|
+
return Bt.__wrap(m);
|
|
286
293
|
}
|
|
287
294
|
buildPrePassStreaming(t, e, n) {
|
|
288
295
|
try {
|
|
289
|
-
const c = a.__wbindgen_add_to_stack_pointer(-16), l =
|
|
290
|
-
a.ifcapi_buildPrePassStreaming(c, this.__wbg_ptr, l, d,
|
|
296
|
+
const c = a.__wbindgen_add_to_stack_pointer(-16), l = gt(t, a.__wbindgen_export3), d = v;
|
|
297
|
+
a.ifcapi_buildPrePassStreaming(c, this.__wbg_ptr, l, d, tn(e), n);
|
|
291
298
|
var s = A().getInt32(c + 0, !0), i = A().getInt32(c + 4, !0), o = A().getInt32(c + 8, !0);
|
|
292
|
-
if (o) throw
|
|
293
|
-
return
|
|
299
|
+
if (o) throw B(i);
|
|
300
|
+
return B(s);
|
|
294
301
|
} finally{
|
|
295
|
-
a.__wbindgen_add_to_stack_pointer(16),
|
|
302
|
+
a.__wbindgen_add_to_stack_pointer(16), ct[kt++] = void 0;
|
|
296
303
|
}
|
|
297
304
|
}
|
|
298
305
|
parseGridAxes(t) {
|
|
299
|
-
const e =
|
|
300
|
-
return
|
|
306
|
+
const e = lt(t, a.__wbindgen_export3, a.__wbindgen_export4), n = v, s = a.ifcapi_parseGridAxes(this.__wbg_ptr, e, n);
|
|
307
|
+
return Lt.__wrap(s);
|
|
301
308
|
}
|
|
302
309
|
parseGridLines(t) {
|
|
303
|
-
const e =
|
|
304
|
-
return
|
|
310
|
+
const e = lt(t, a.__wbindgen_export3, a.__wbindgen_export4), n = v, s = a.ifcapi_parseGridLines(this.__wbg_ptr, e, n);
|
|
311
|
+
return B(s);
|
|
305
312
|
}
|
|
306
313
|
parseAlignmentLines(t) {
|
|
307
|
-
const e =
|
|
308
|
-
return
|
|
314
|
+
const e = lt(t, a.__wbindgen_export3, a.__wbindgen_export4), n = v, s = a.ifcapi_parseAlignmentLines(this.__wbg_ptr, e, n);
|
|
315
|
+
return B(s);
|
|
309
316
|
}
|
|
310
317
|
extractProfiles(t, e) {
|
|
311
|
-
const n =
|
|
312
|
-
return
|
|
318
|
+
const n = lt(t, a.__wbindgen_export3, a.__wbindgen_export4), s = v, i = a.ifcapi_extractProfiles(this.__wbg_ptr, n, s, e);
|
|
319
|
+
return Ut.__wrap(i);
|
|
313
320
|
}
|
|
314
321
|
getMemory() {
|
|
315
322
|
const t = a.ifcapi_getMemory(this.__wbg_ptr);
|
|
316
|
-
return
|
|
323
|
+
return B(t);
|
|
317
324
|
}
|
|
318
325
|
setEntityIndex(t, e, n) {
|
|
319
|
-
const s = ut(t, a.__wbindgen_export3), i =
|
|
326
|
+
const s = ut(t, a.__wbindgen_export3), i = v, o = ut(e, a.__wbindgen_export3), c = v, l = ut(n, a.__wbindgen_export3), d = v;
|
|
320
327
|
a.ifcapi_setEntityIndex(this.__wbg_ptr, s, i, o, c, l, d);
|
|
321
328
|
}
|
|
322
329
|
setMergeLayers(t) {
|
|
@@ -325,9 +332,12 @@ let __tla = Promise.all([
|
|
|
325
332
|
clearPrePassCache() {
|
|
326
333
|
a.ifcapi_clearPrePassCache(this.__wbg_ptr);
|
|
327
334
|
}
|
|
335
|
+
setComputeGeometryHashes(t) {
|
|
336
|
+
a.ifcapi_setComputeGeometryHashes(this.__wbg_ptr, !bt(t), bt(t) ? 0 : t);
|
|
337
|
+
}
|
|
328
338
|
constructor(){
|
|
329
339
|
const t = a.ifcapi_new();
|
|
330
|
-
return this.__wbg_ptr = t >>> 0,
|
|
340
|
+
return this.__wbg_ptr = t >>> 0, _e.register(this, this.__wbg_ptr, this), this;
|
|
331
341
|
}
|
|
332
342
|
get version() {
|
|
333
343
|
let t, e;
|
|
@@ -335,7 +345,7 @@ let __tla = Promise.all([
|
|
|
335
345
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
336
346
|
a.ifcapi_version(i, this.__wbg_ptr);
|
|
337
347
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
338
|
-
return t = n, e = s,
|
|
348
|
+
return t = n, e = s, K(n, s);
|
|
339
349
|
} finally{
|
|
340
350
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
341
351
|
}
|
|
@@ -344,44 +354,44 @@ let __tla = Promise.all([
|
|
|
344
354
|
return a.ifcapi_is_ready(this.__wbg_ptr) !== 0;
|
|
345
355
|
}
|
|
346
356
|
parseStreaming(t, e) {
|
|
347
|
-
const n =
|
|
348
|
-
return
|
|
357
|
+
const n = lt(t, a.__wbindgen_export3, a.__wbindgen_export4), s = v, i = a.ifcapi_parseStreaming(this.__wbg_ptr, n, s, P(e));
|
|
358
|
+
return B(i);
|
|
349
359
|
}
|
|
350
360
|
scanEntitiesFast(t) {
|
|
351
|
-
const e =
|
|
352
|
-
return
|
|
361
|
+
const e = lt(t, a.__wbindgen_export3, a.__wbindgen_export4), n = v, s = a.ifcapi_scanEntitiesFast(this.__wbg_ptr, e, n);
|
|
362
|
+
return B(s);
|
|
353
363
|
}
|
|
354
364
|
scanEntitiesFastBytes(t) {
|
|
355
|
-
const e =
|
|
356
|
-
return
|
|
365
|
+
const e = gt(t, a.__wbindgen_export3), n = v, s = a.ifcapi_scanEntitiesFastBytes(this.__wbg_ptr, e, n);
|
|
366
|
+
return B(s);
|
|
357
367
|
}
|
|
358
368
|
scanGeometryEntitiesFast(t) {
|
|
359
|
-
const e =
|
|
360
|
-
return
|
|
369
|
+
const e = lt(t, a.__wbindgen_export3, a.__wbindgen_export4), n = v, s = a.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, e, n);
|
|
370
|
+
return B(s);
|
|
361
371
|
}
|
|
362
372
|
scanRelevantEntitiesFastBytes(t) {
|
|
363
|
-
const e =
|
|
364
|
-
return
|
|
373
|
+
const e = gt(t, a.__wbindgen_export3), n = v, s = a.ifcapi_scanRelevantEntitiesFastBytes(this.__wbg_ptr, e, n);
|
|
374
|
+
return B(s);
|
|
365
375
|
}
|
|
366
376
|
parse(t) {
|
|
367
|
-
const e =
|
|
368
|
-
return
|
|
377
|
+
const e = lt(t, a.__wbindgen_export3, a.__wbindgen_export4), n = v, s = a.ifcapi_parse(this.__wbg_ptr, e, n);
|
|
378
|
+
return B(s);
|
|
369
379
|
}
|
|
370
380
|
parseSymbolicRepresentations(t) {
|
|
371
|
-
const e =
|
|
372
|
-
return
|
|
381
|
+
const e = lt(t, a.__wbindgen_export3, a.__wbindgen_export4), n = v, s = a.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, e, n);
|
|
382
|
+
return Vt.__wrap(s);
|
|
373
383
|
}
|
|
374
384
|
};
|
|
375
|
-
Symbol.dispose && (
|
|
376
|
-
class
|
|
385
|
+
Symbol.dispose && (ae.prototype[Symbol.dispose] = ae.prototype.free);
|
|
386
|
+
class Bt {
|
|
377
387
|
static __wrap(t) {
|
|
378
388
|
t = t >>> 0;
|
|
379
|
-
const e = Object.create(
|
|
380
|
-
return e.__wbg_ptr = t,
|
|
389
|
+
const e = Object.create(Bt.prototype);
|
|
390
|
+
return e.__wbg_ptr = t, Ie.register(e, e.__wbg_ptr, e), e;
|
|
381
391
|
}
|
|
382
392
|
__destroy_into_raw() {
|
|
383
393
|
const t = this.__wbg_ptr;
|
|
384
|
-
return this.__wbg_ptr = 0,
|
|
394
|
+
return this.__wbg_ptr = 0, Ie.unregister(this), t;
|
|
385
395
|
}
|
|
386
396
|
free() {
|
|
387
397
|
const t = this.__destroy_into_raw();
|
|
@@ -403,7 +413,7 @@ let __tla = Promise.all([
|
|
|
403
413
|
try {
|
|
404
414
|
const c = a.__wbindgen_add_to_stack_pointer(-16);
|
|
405
415
|
a.meshcollection_localToWorld(c, this.__wbg_ptr, t, e, n);
|
|
406
|
-
var s = A().getInt32(c + 0, !0), i = A().getInt32(c + 4, !0), o =
|
|
416
|
+
var s = A().getInt32(c + 0, !0), i = A().getInt32(c + 4, !0), o = nn(s, i).slice();
|
|
407
417
|
return a.__wbindgen_export2(s, i * 8, 8), o;
|
|
408
418
|
} finally{
|
|
409
419
|
a.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -425,24 +435,35 @@ let __tla = Promise.all([
|
|
|
425
435
|
a.__wbindgen_add_to_stack_pointer(16);
|
|
426
436
|
}
|
|
427
437
|
}
|
|
438
|
+
get geometryHashIds() {
|
|
439
|
+
const t = a.meshcollection_geometryHashIds(this.__wbg_ptr);
|
|
440
|
+
return B(t);
|
|
441
|
+
}
|
|
442
|
+
get geometryHashCount() {
|
|
443
|
+
return a.meshcollection_geometryHashCount(this.__wbg_ptr) >>> 0;
|
|
444
|
+
}
|
|
445
|
+
get geometryHashValues() {
|
|
446
|
+
const t = a.meshcollection_geometryHashValues(this.__wbg_ptr);
|
|
447
|
+
return B(t);
|
|
448
|
+
}
|
|
428
449
|
get(t) {
|
|
429
450
|
const e = a.meshcollection_get(this.__wbg_ptr, t);
|
|
430
|
-
return e === 0 ? void 0 :
|
|
451
|
+
return e === 0 ? void 0 : Pt.__wrap(e);
|
|
431
452
|
}
|
|
432
453
|
get length() {
|
|
433
454
|
return a.meshcollection_length(this.__wbg_ptr) >>> 0;
|
|
434
455
|
}
|
|
435
456
|
}
|
|
436
|
-
Symbol.dispose && (
|
|
437
|
-
class
|
|
457
|
+
Symbol.dispose && (Bt.prototype[Symbol.dispose] = Bt.prototype.free);
|
|
458
|
+
class Pt {
|
|
438
459
|
static __wrap(t) {
|
|
439
460
|
t = t >>> 0;
|
|
440
|
-
const e = Object.create(
|
|
441
|
-
return e.__wbg_ptr = t,
|
|
461
|
+
const e = Object.create(Pt.prototype);
|
|
462
|
+
return e.__wbg_ptr = t, ye.register(e, e.__wbg_ptr, e), e;
|
|
442
463
|
}
|
|
443
464
|
__destroy_into_raw() {
|
|
444
465
|
const t = this.__wbg_ptr;
|
|
445
|
-
return this.__wbg_ptr = 0,
|
|
466
|
+
return this.__wbg_ptr = 0, ye.unregister(this), t;
|
|
446
467
|
}
|
|
447
468
|
free() {
|
|
448
469
|
const t = this.__destroy_into_raw();
|
|
@@ -456,7 +477,7 @@ let __tla = Promise.all([
|
|
|
456
477
|
}
|
|
457
478
|
get textureRgba() {
|
|
458
479
|
const t = a.meshdatajs_textureRgba(this.__wbg_ptr);
|
|
459
|
-
return
|
|
480
|
+
return B(t);
|
|
460
481
|
}
|
|
461
482
|
get vertexCount() {
|
|
462
483
|
return a.meshdatajs_vertexCount(this.__wbg_ptr) >>> 0;
|
|
@@ -467,7 +488,7 @@ let __tla = Promise.all([
|
|
|
467
488
|
a.meshdatajs_shadingColor(n, this.__wbg_ptr);
|
|
468
489
|
var t = A().getInt32(n + 0, !0), e = A().getInt32(n + 4, !0);
|
|
469
490
|
let s;
|
|
470
|
-
return t !== 0 && (s =
|
|
491
|
+
return t !== 0 && (s = oe(t, e).slice(), a.__wbindgen_export2(t, e * 4, 4)), s;
|
|
471
492
|
} finally{
|
|
472
493
|
a.__wbindgen_add_to_stack_pointer(16);
|
|
473
494
|
}
|
|
@@ -489,13 +510,13 @@ let __tla = Promise.all([
|
|
|
489
510
|
}
|
|
490
511
|
get uvs() {
|
|
491
512
|
const t = a.meshdatajs_uvs(this.__wbg_ptr);
|
|
492
|
-
return
|
|
513
|
+
return B(t);
|
|
493
514
|
}
|
|
494
515
|
get color() {
|
|
495
516
|
try {
|
|
496
517
|
const s = a.__wbindgen_add_to_stack_pointer(-16);
|
|
497
518
|
a.meshdatajs_color(s, this.__wbg_ptr);
|
|
498
|
-
var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n =
|
|
519
|
+
var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n = oe(t, e).slice();
|
|
499
520
|
return a.__wbindgen_export2(t, e * 4, 4), n;
|
|
500
521
|
} finally{
|
|
501
522
|
a.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -503,11 +524,11 @@ let __tla = Promise.all([
|
|
|
503
524
|
}
|
|
504
525
|
get indices() {
|
|
505
526
|
const t = a.meshdatajs_indices(this.__wbg_ptr);
|
|
506
|
-
return
|
|
527
|
+
return B(t);
|
|
507
528
|
}
|
|
508
529
|
get normals() {
|
|
509
530
|
const t = a.meshdatajs_normals(this.__wbg_ptr);
|
|
510
|
-
return
|
|
531
|
+
return B(t);
|
|
511
532
|
}
|
|
512
533
|
get ifcType() {
|
|
513
534
|
let t, e;
|
|
@@ -515,26 +536,26 @@ let __tla = Promise.all([
|
|
|
515
536
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
516
537
|
a.meshdatajs_ifcType(i, this.__wbg_ptr);
|
|
517
538
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
518
|
-
return t = n, e = s,
|
|
539
|
+
return t = n, e = s, K(n, s);
|
|
519
540
|
} finally{
|
|
520
541
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
521
542
|
}
|
|
522
543
|
}
|
|
523
544
|
get positions() {
|
|
524
545
|
const t = a.meshdatajs_positions(this.__wbg_ptr);
|
|
525
|
-
return
|
|
546
|
+
return B(t);
|
|
526
547
|
}
|
|
527
548
|
}
|
|
528
|
-
Symbol.dispose && (
|
|
529
|
-
class
|
|
549
|
+
Symbol.dispose && (Pt.prototype[Symbol.dispose] = Pt.prototype.free);
|
|
550
|
+
class Ut {
|
|
530
551
|
static __wrap(t) {
|
|
531
552
|
t = t >>> 0;
|
|
532
|
-
const e = Object.create(
|
|
533
|
-
return e.__wbg_ptr = t,
|
|
553
|
+
const e = Object.create(Ut.prototype);
|
|
554
|
+
return e.__wbg_ptr = t, me.register(e, e.__wbg_ptr, e), e;
|
|
534
555
|
}
|
|
535
556
|
__destroy_into_raw() {
|
|
536
557
|
const t = this.__wbg_ptr;
|
|
537
|
-
return this.__wbg_ptr = 0,
|
|
558
|
+
return this.__wbg_ptr = 0, me.unregister(this), t;
|
|
538
559
|
}
|
|
539
560
|
free() {
|
|
540
561
|
const t = this.__destroy_into_raw();
|
|
@@ -542,22 +563,22 @@ let __tla = Promise.all([
|
|
|
542
563
|
}
|
|
543
564
|
get(t) {
|
|
544
565
|
const e = a.profilecollection_get(this.__wbg_ptr, t);
|
|
545
|
-
return e === 0 ? void 0 :
|
|
566
|
+
return e === 0 ? void 0 : Dt.__wrap(e);
|
|
546
567
|
}
|
|
547
568
|
get length() {
|
|
548
569
|
return a.profilecollection_length(this.__wbg_ptr) >>> 0;
|
|
549
570
|
}
|
|
550
571
|
}
|
|
551
|
-
Symbol.dispose && (
|
|
552
|
-
class
|
|
572
|
+
Symbol.dispose && (Ut.prototype[Symbol.dispose] = Ut.prototype.free);
|
|
573
|
+
class Dt {
|
|
553
574
|
static __wrap(t) {
|
|
554
575
|
t = t >>> 0;
|
|
555
|
-
const e = Object.create(
|
|
556
|
-
return e.__wbg_ptr = t,
|
|
576
|
+
const e = Object.create(Dt.prototype);
|
|
577
|
+
return e.__wbg_ptr = t, Ee.register(e, e.__wbg_ptr, e), e;
|
|
557
578
|
}
|
|
558
579
|
__destroy_into_raw() {
|
|
559
580
|
const t = this.__wbg_ptr;
|
|
560
|
-
return this.__wbg_ptr = 0,
|
|
581
|
+
return this.__wbg_ptr = 0, Ee.unregister(this), t;
|
|
561
582
|
}
|
|
562
583
|
free() {
|
|
563
584
|
const t = this.__destroy_into_raw();
|
|
@@ -568,22 +589,22 @@ let __tla = Promise.all([
|
|
|
568
589
|
}
|
|
569
590
|
get holeCounts() {
|
|
570
591
|
const t = a.profileentryjs_holeCounts(this.__wbg_ptr);
|
|
571
|
-
return
|
|
592
|
+
return B(t);
|
|
572
593
|
}
|
|
573
594
|
get holePoints() {
|
|
574
595
|
const t = a.profileentryjs_holePoints(this.__wbg_ptr);
|
|
575
|
-
return
|
|
596
|
+
return B(t);
|
|
576
597
|
}
|
|
577
598
|
get modelIndex() {
|
|
578
599
|
return a.profileentryjs_modelIndex(this.__wbg_ptr) >>> 0;
|
|
579
600
|
}
|
|
580
601
|
get outerPoints() {
|
|
581
602
|
const t = a.profileentryjs_outerPoints(this.__wbg_ptr);
|
|
582
|
-
return
|
|
603
|
+
return B(t);
|
|
583
604
|
}
|
|
584
605
|
get extrusionDir() {
|
|
585
606
|
const t = a.profileentryjs_extrusionDir(this.__wbg_ptr);
|
|
586
|
-
return
|
|
607
|
+
return B(t);
|
|
587
608
|
}
|
|
588
609
|
get extrusionDepth() {
|
|
589
610
|
return a.profileentryjs_extrusionDepth(this.__wbg_ptr);
|
|
@@ -594,26 +615,26 @@ let __tla = Promise.all([
|
|
|
594
615
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
595
616
|
a.profileentryjs_ifcType(i, this.__wbg_ptr);
|
|
596
617
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
597
|
-
return t = n, e = s,
|
|
618
|
+
return t = n, e = s, K(n, s);
|
|
598
619
|
} finally{
|
|
599
620
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
600
621
|
}
|
|
601
622
|
}
|
|
602
623
|
get transform() {
|
|
603
624
|
const t = a.profileentryjs_transform(this.__wbg_ptr);
|
|
604
|
-
return
|
|
625
|
+
return B(t);
|
|
605
626
|
}
|
|
606
627
|
}
|
|
607
|
-
Symbol.dispose && (
|
|
608
|
-
class
|
|
628
|
+
Symbol.dispose && (Dt.prototype[Symbol.dispose] = Dt.prototype.free);
|
|
629
|
+
class vt {
|
|
609
630
|
static __wrap(t) {
|
|
610
631
|
t = t >>> 0;
|
|
611
|
-
const e = Object.create(
|
|
612
|
-
return e.__wbg_ptr = t,
|
|
632
|
+
const e = Object.create(vt.prototype);
|
|
633
|
+
return e.__wbg_ptr = t, be.register(e, e.__wbg_ptr, e), e;
|
|
613
634
|
}
|
|
614
635
|
__destroy_into_raw() {
|
|
615
636
|
const t = this.__wbg_ptr;
|
|
616
|
-
return this.__wbg_ptr = 0,
|
|
637
|
+
return this.__wbg_ptr = 0, be.unregister(this), t;
|
|
617
638
|
}
|
|
618
639
|
free() {
|
|
619
640
|
const t = this.__destroy_into_raw();
|
|
@@ -634,7 +655,7 @@ let __tla = Promise.all([
|
|
|
634
655
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
635
656
|
a.symboliccircle_repIdentifier(i, this.__wbg_ptr);
|
|
636
657
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
637
|
-
return t = n, e = s,
|
|
658
|
+
return t = n, e = s, K(n, s);
|
|
638
659
|
} finally{
|
|
639
660
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
640
661
|
}
|
|
@@ -657,7 +678,7 @@ let __tla = Promise.all([
|
|
|
657
678
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
658
679
|
a.symboliccircle_ifcType(i, this.__wbg_ptr);
|
|
659
680
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
660
|
-
return t = n, e = s,
|
|
681
|
+
return t = n, e = s, K(n, s);
|
|
661
682
|
} finally{
|
|
662
683
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
663
684
|
}
|
|
@@ -666,16 +687,16 @@ let __tla = Promise.all([
|
|
|
666
687
|
return a.symboliccircle_endAngle(this.__wbg_ptr);
|
|
667
688
|
}
|
|
668
689
|
}
|
|
669
|
-
Symbol.dispose && (
|
|
670
|
-
class
|
|
690
|
+
Symbol.dispose && (vt.prototype[Symbol.dispose] = vt.prototype.free);
|
|
691
|
+
class Gt {
|
|
671
692
|
static __wrap(t) {
|
|
672
693
|
t = t >>> 0;
|
|
673
|
-
const e = Object.create(
|
|
674
|
-
return e.__wbg_ptr = t,
|
|
694
|
+
const e = Object.create(Gt.prototype);
|
|
695
|
+
return e.__wbg_ptr = t, Ce.register(e, e.__wbg_ptr, e), e;
|
|
675
696
|
}
|
|
676
697
|
__destroy_into_raw() {
|
|
677
698
|
const t = this.__wbg_ptr;
|
|
678
|
-
return this.__wbg_ptr = 0,
|
|
699
|
+
return this.__wbg_ptr = 0, Ce.unregister(this), t;
|
|
679
700
|
}
|
|
680
701
|
free() {
|
|
681
702
|
const t = this.__destroy_into_raw();
|
|
@@ -701,7 +722,7 @@ let __tla = Promise.all([
|
|
|
701
722
|
}
|
|
702
723
|
get holesOffsets() {
|
|
703
724
|
const t = a.symbolicfillarea_holesOffsets(this.__wbg_ptr);
|
|
704
|
-
return
|
|
725
|
+
return B(t);
|
|
705
726
|
}
|
|
706
727
|
get repIdentifier() {
|
|
707
728
|
let t, e;
|
|
@@ -709,7 +730,7 @@ let __tla = Promise.all([
|
|
|
709
730
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
710
731
|
a.symbolicfillarea_repIdentifier(i, this.__wbg_ptr);
|
|
711
732
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
712
|
-
return t = n, e = s,
|
|
733
|
+
return t = n, e = s, K(n, s);
|
|
713
734
|
} finally{
|
|
714
735
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
715
736
|
}
|
|
@@ -734,7 +755,7 @@ let __tla = Promise.all([
|
|
|
734
755
|
}
|
|
735
756
|
get points() {
|
|
736
757
|
const t = a.symbolicfillarea_points(this.__wbg_ptr);
|
|
737
|
-
return
|
|
758
|
+
return B(t);
|
|
738
759
|
}
|
|
739
760
|
get worldY() {
|
|
740
761
|
return a.symbolicfillarea_worldY(this.__wbg_ptr);
|
|
@@ -745,22 +766,22 @@ let __tla = Promise.all([
|
|
|
745
766
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
746
767
|
a.symbolicfillarea_ifcType(i, this.__wbg_ptr);
|
|
747
768
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
748
|
-
return t = n, e = s,
|
|
769
|
+
return t = n, e = s, K(n, s);
|
|
749
770
|
} finally{
|
|
750
771
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
751
772
|
}
|
|
752
773
|
}
|
|
753
774
|
}
|
|
754
|
-
Symbol.dispose && (
|
|
755
|
-
class
|
|
775
|
+
Symbol.dispose && (Gt.prototype[Symbol.dispose] = Gt.prototype.free);
|
|
776
|
+
class $t {
|
|
756
777
|
static __wrap(t) {
|
|
757
778
|
t = t >>> 0;
|
|
758
|
-
const e = Object.create(
|
|
759
|
-
return e.__wbg_ptr = t,
|
|
779
|
+
const e = Object.create($t.prototype);
|
|
780
|
+
return e.__wbg_ptr = t, we.register(e, e.__wbg_ptr, e), e;
|
|
760
781
|
}
|
|
761
782
|
__destroy_into_raw() {
|
|
762
783
|
const t = this.__wbg_ptr;
|
|
763
|
-
return this.__wbg_ptr = 0,
|
|
784
|
+
return this.__wbg_ptr = 0, we.unregister(this), t;
|
|
764
785
|
}
|
|
765
786
|
free() {
|
|
766
787
|
const t = this.__destroy_into_raw();
|
|
@@ -778,14 +799,14 @@ let __tla = Promise.all([
|
|
|
778
799
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
779
800
|
a.symbolicpolyline_repIdentifier(i, this.__wbg_ptr);
|
|
780
801
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
781
|
-
return t = n, e = s,
|
|
802
|
+
return t = n, e = s, K(n, s);
|
|
782
803
|
} finally{
|
|
783
804
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
784
805
|
}
|
|
785
806
|
}
|
|
786
807
|
get points() {
|
|
787
808
|
const t = a.symbolicpolyline_points(this.__wbg_ptr);
|
|
788
|
-
return
|
|
809
|
+
return B(t);
|
|
789
810
|
}
|
|
790
811
|
get worldY() {
|
|
791
812
|
return a.symboliccircle_worldY(this.__wbg_ptr);
|
|
@@ -796,7 +817,7 @@ let __tla = Promise.all([
|
|
|
796
817
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
797
818
|
a.symbolicpolyline_ifcType(i, this.__wbg_ptr);
|
|
798
819
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
799
|
-
return t = n, e = s,
|
|
820
|
+
return t = n, e = s, K(n, s);
|
|
800
821
|
} finally{
|
|
801
822
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
802
823
|
}
|
|
@@ -805,16 +826,16 @@ let __tla = Promise.all([
|
|
|
805
826
|
return a.symbolicpolyline_isClosed(this.__wbg_ptr) !== 0;
|
|
806
827
|
}
|
|
807
828
|
}
|
|
808
|
-
Symbol.dispose && (
|
|
809
|
-
class
|
|
829
|
+
Symbol.dispose && ($t.prototype[Symbol.dispose] = $t.prototype.free);
|
|
830
|
+
class Vt {
|
|
810
831
|
static __wrap(t) {
|
|
811
832
|
t = t >>> 0;
|
|
812
|
-
const e = Object.create(
|
|
813
|
-
return e.__wbg_ptr = t,
|
|
833
|
+
const e = Object.create(Vt.prototype);
|
|
834
|
+
return e.__wbg_ptr = t, Te.register(e, e.__wbg_ptr, e), e;
|
|
814
835
|
}
|
|
815
836
|
__destroy_into_raw() {
|
|
816
837
|
const t = this.__wbg_ptr;
|
|
817
|
-
return this.__wbg_ptr = 0,
|
|
838
|
+
return this.__wbg_ptr = 0, Te.unregister(this), t;
|
|
818
839
|
}
|
|
819
840
|
free() {
|
|
820
841
|
const t = this.__destroy_into_raw();
|
|
@@ -825,7 +846,7 @@ let __tla = Promise.all([
|
|
|
825
846
|
}
|
|
826
847
|
getCircle(t) {
|
|
827
848
|
const e = a.symbolicrepresentationcollection_getCircle(this.__wbg_ptr, t);
|
|
828
|
-
return e === 0 ? void 0 :
|
|
849
|
+
return e === 0 ? void 0 : vt.__wrap(e);
|
|
829
850
|
}
|
|
830
851
|
get textCount() {
|
|
831
852
|
return a.symbolicrepresentationcollection_textCount(this.__wbg_ptr) >>> 0;
|
|
@@ -838,7 +859,7 @@ let __tla = Promise.all([
|
|
|
838
859
|
}
|
|
839
860
|
getPolyline(t) {
|
|
840
861
|
const e = a.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr, t);
|
|
841
|
-
return e === 0 ? void 0 :
|
|
862
|
+
return e === 0 ? void 0 : $t.__wrap(e);
|
|
842
863
|
}
|
|
843
864
|
get polylineCount() {
|
|
844
865
|
return a.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr) >>> 0;
|
|
@@ -847,7 +868,7 @@ let __tla = Promise.all([
|
|
|
847
868
|
try {
|
|
848
869
|
const s = a.__wbindgen_add_to_stack_pointer(-16);
|
|
849
870
|
a.symbolicrepresentationcollection_getExpressIds(s, this.__wbg_ptr);
|
|
850
|
-
var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n =
|
|
871
|
+
var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n = ve(t, e).slice();
|
|
851
872
|
return a.__wbindgen_export2(t, e * 4, 4), n;
|
|
852
873
|
} finally{
|
|
853
874
|
a.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -855,26 +876,26 @@ let __tla = Promise.all([
|
|
|
855
876
|
}
|
|
856
877
|
getFill(t) {
|
|
857
878
|
const e = a.symbolicrepresentationcollection_getFill(this.__wbg_ptr, t);
|
|
858
|
-
return e === 0 ? void 0 :
|
|
879
|
+
return e === 0 ? void 0 : Gt.__wrap(e);
|
|
859
880
|
}
|
|
860
881
|
getText(t) {
|
|
861
882
|
const e = a.symbolicrepresentationcollection_getText(this.__wbg_ptr, t);
|
|
862
|
-
return e === 0 ? void 0 :
|
|
883
|
+
return e === 0 ? void 0 : zt.__wrap(e);
|
|
863
884
|
}
|
|
864
885
|
get isEmpty() {
|
|
865
886
|
return a.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr) !== 0;
|
|
866
887
|
}
|
|
867
888
|
}
|
|
868
|
-
Symbol.dispose && (
|
|
869
|
-
class
|
|
889
|
+
Symbol.dispose && (Vt.prototype[Symbol.dispose] = Vt.prototype.free);
|
|
890
|
+
class zt {
|
|
870
891
|
static __wrap(t) {
|
|
871
892
|
t = t >>> 0;
|
|
872
|
-
const e = Object.create(
|
|
873
|
-
return e.__wbg_ptr = t,
|
|
893
|
+
const e = Object.create(zt.prototype);
|
|
894
|
+
return e.__wbg_ptr = t, Fe.register(e, e.__wbg_ptr, e), e;
|
|
874
895
|
}
|
|
875
896
|
__destroy_into_raw() {
|
|
876
897
|
const t = this.__wbg_ptr;
|
|
877
|
-
return this.__wbg_ptr = 0,
|
|
898
|
+
return this.__wbg_ptr = 0, Fe.unregister(this), t;
|
|
878
899
|
}
|
|
879
900
|
free() {
|
|
880
901
|
const t = this.__destroy_into_raw();
|
|
@@ -889,7 +910,7 @@ let __tla = Promise.all([
|
|
|
889
910
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
890
911
|
a.symbolictext_repIdentifier(i, this.__wbg_ptr);
|
|
891
912
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
892
|
-
return t = n, e = s,
|
|
913
|
+
return t = n, e = s, K(n, s);
|
|
893
914
|
} finally{
|
|
894
915
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
895
916
|
}
|
|
@@ -927,7 +948,7 @@ let __tla = Promise.all([
|
|
|
927
948
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
928
949
|
a.symbolictext_content(i, this.__wbg_ptr);
|
|
929
950
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
930
|
-
return t = n, e = s,
|
|
951
|
+
return t = n, e = s, K(n, s);
|
|
931
952
|
} finally{
|
|
932
953
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
933
954
|
}
|
|
@@ -941,7 +962,7 @@ let __tla = Promise.all([
|
|
|
941
962
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
942
963
|
a.symbolictext_ifcType(i, this.__wbg_ptr);
|
|
943
964
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
944
|
-
return t = n, e = s,
|
|
965
|
+
return t = n, e = s, K(n, s);
|
|
945
966
|
} finally{
|
|
946
967
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
947
968
|
}
|
|
@@ -952,7 +973,7 @@ let __tla = Promise.all([
|
|
|
952
973
|
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
953
974
|
a.symbolictext_alignment(i, this.__wbg_ptr);
|
|
954
975
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
955
|
-
return t = n, e = s,
|
|
976
|
+
return t = n, e = s, K(n, s);
|
|
956
977
|
} finally{
|
|
957
978
|
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
958
979
|
}
|
|
@@ -961,18 +982,18 @@ let __tla = Promise.all([
|
|
|
961
982
|
return a.symbolictext_targetPx(this.__wbg_ptr);
|
|
962
983
|
}
|
|
963
984
|
}
|
|
964
|
-
Symbol.dispose && (
|
|
965
|
-
const
|
|
985
|
+
Symbol.dispose && (zt.prototype[Symbol.dispose] = zt.prototype.free);
|
|
986
|
+
const pn = new Set([
|
|
966
987
|
"basic",
|
|
967
988
|
"cors",
|
|
968
989
|
"default"
|
|
969
990
|
]);
|
|
970
|
-
async function
|
|
991
|
+
async function gn(r, t) {
|
|
971
992
|
if (typeof Response == "function" && r instanceof Response) {
|
|
972
993
|
if (typeof WebAssembly.instantiateStreaming == "function") try {
|
|
973
994
|
return await WebAssembly.instantiateStreaming(r, t);
|
|
974
995
|
} catch (n) {
|
|
975
|
-
if (r.ok &&
|
|
996
|
+
if (r.ok && pn.has(r.type) && r.headers.get("Content-Type") !== "application/wasm") console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", n);
|
|
976
997
|
else throw n;
|
|
977
998
|
}
|
|
978
999
|
const e = await r.arrayBuffer();
|
|
@@ -985,50 +1006,50 @@ let __tla = Promise.all([
|
|
|
985
1006
|
} : e;
|
|
986
1007
|
}
|
|
987
1008
|
}
|
|
988
|
-
function
|
|
1009
|
+
function _n() {
|
|
989
1010
|
const r = {};
|
|
990
1011
|
return r.wbg = {}, r.wbg.__wbg_Error_52673b7de5a0ca89 = function(t, e) {
|
|
991
|
-
const n = Error(
|
|
992
|
-
return
|
|
1012
|
+
const n = Error(K(t, e));
|
|
1013
|
+
return P(n);
|
|
993
1014
|
}, r.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(t) {
|
|
994
|
-
return typeof
|
|
1015
|
+
return typeof j(t) == "function";
|
|
995
1016
|
}, r.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(t) {
|
|
996
|
-
return
|
|
1017
|
+
return j(t) === void 0;
|
|
997
1018
|
}, r.wbg.__wbg___wbindgen_memory_a342e963fbcabd68 = function() {
|
|
998
1019
|
const t = a.memory;
|
|
999
|
-
return
|
|
1020
|
+
return P(t);
|
|
1000
1021
|
}, r.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(t, e) {
|
|
1001
|
-
throw new Error(
|
|
1022
|
+
throw new Error(K(t, e));
|
|
1002
1023
|
}, r.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(t) {
|
|
1003
|
-
|
|
1024
|
+
j(t)._wbg_cb_unref();
|
|
1004
1025
|
}, r.wbg.__wbg_call_3020136f7a2d6e44 = function() {
|
|
1005
|
-
return
|
|
1006
|
-
const s =
|
|
1007
|
-
return
|
|
1026
|
+
return Jt(function(t, e, n) {
|
|
1027
|
+
const s = j(t).call(j(e), j(n));
|
|
1028
|
+
return P(s);
|
|
1008
1029
|
}, arguments);
|
|
1009
1030
|
}, r.wbg.__wbg_call_abb4ff46ce38be40 = function() {
|
|
1010
|
-
return
|
|
1011
|
-
const n =
|
|
1012
|
-
return
|
|
1031
|
+
return Jt(function(t, e) {
|
|
1032
|
+
const n = j(t).call(j(e));
|
|
1033
|
+
return P(n);
|
|
1013
1034
|
}, arguments);
|
|
1014
1035
|
}, r.wbg.__wbg_error_7534b8e9a36f1ab4 = function(t, e) {
|
|
1015
1036
|
let n, s;
|
|
1016
1037
|
try {
|
|
1017
|
-
n = t, s = e, console.error(
|
|
1038
|
+
n = t, s = e, console.error(K(t, e));
|
|
1018
1039
|
} finally{
|
|
1019
1040
|
a.__wbindgen_export2(n, s, 1);
|
|
1020
1041
|
}
|
|
1021
1042
|
}, r.wbg.__wbg_info_ce6bcc489c22f6f0 = function(t) {
|
|
1022
|
-
console.info(
|
|
1043
|
+
console.info(j(t));
|
|
1023
1044
|
}, r.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
1024
1045
|
const t = new Object;
|
|
1025
|
-
return
|
|
1046
|
+
return P(t);
|
|
1026
1047
|
}, r.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
1027
1048
|
const t = new Array;
|
|
1028
|
-
return
|
|
1049
|
+
return P(t);
|
|
1029
1050
|
}, r.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
1030
1051
|
const t = new Error;
|
|
1031
|
-
return
|
|
1052
|
+
return P(t);
|
|
1032
1053
|
}, r.wbg.__wbg_new_ff12d2b041fb48f1 = function(t, e) {
|
|
1033
1054
|
try {
|
|
1034
1055
|
var n = {
|
|
@@ -1038,125 +1059,129 @@ let __tla = Promise.all([
|
|
|
1038
1059
|
const l = n.a;
|
|
1039
1060
|
n.a = 0;
|
|
1040
1061
|
try {
|
|
1041
|
-
return
|
|
1062
|
+
return hn(l, n.b, o, c);
|
|
1042
1063
|
} finally{
|
|
1043
1064
|
n.a = l;
|
|
1044
1065
|
}
|
|
1045
1066
|
};
|
|
1046
1067
|
const i = new Promise(s);
|
|
1047
|
-
return
|
|
1068
|
+
return P(i);
|
|
1048
1069
|
} finally{
|
|
1049
1070
|
n.a = n.b = 0;
|
|
1050
1071
|
}
|
|
1051
1072
|
}, r.wbg.__wbg_new_from_slice_41e2764a343e3cb1 = function(t, e) {
|
|
1052
|
-
const n = new Float32Array(
|
|
1053
|
-
return
|
|
1073
|
+
const n = new Float32Array(oe(t, e));
|
|
1074
|
+
return P(n);
|
|
1075
|
+
}, r.wbg.__wbg_new_from_slice_883d10a76ca46292 = function(t, e) {
|
|
1076
|
+
const n = new BigUint64Array(sn(t, e));
|
|
1077
|
+
return P(n);
|
|
1054
1078
|
}, r.wbg.__wbg_new_from_slice_db0691b69e9d3891 = function(t, e) {
|
|
1055
|
-
const n = new Uint32Array(
|
|
1056
|
-
return
|
|
1079
|
+
const n = new Uint32Array(ve(t, e));
|
|
1080
|
+
return P(n);
|
|
1057
1081
|
}, r.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(t, e) {
|
|
1058
|
-
const n = new Uint8Array(
|
|
1059
|
-
return
|
|
1082
|
+
const n = new Uint8Array(rn(t, e));
|
|
1083
|
+
return P(n);
|
|
1060
1084
|
}, r.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(t, e) {
|
|
1061
|
-
const n = new Function(
|
|
1062
|
-
return
|
|
1085
|
+
const n = new Function(K(t, e));
|
|
1086
|
+
return P(n);
|
|
1063
1087
|
}, r.wbg.__wbg_new_with_length_202b3db94ba5fc86 = function(t) {
|
|
1064
1088
|
const e = new Uint32Array(t >>> 0);
|
|
1065
|
-
return
|
|
1089
|
+
return P(e);
|
|
1066
1090
|
}, r.wbg.__wbg_new_with_length_806b9e5b8290af7c = function(t) {
|
|
1067
1091
|
const e = new Float64Array(t >>> 0);
|
|
1068
|
-
return
|
|
1092
|
+
return P(e);
|
|
1069
1093
|
}, r.wbg.__wbg_new_with_length_aa5eaf41d35235e5 = function(t) {
|
|
1070
1094
|
const e = new Uint8Array(t >>> 0);
|
|
1071
|
-
return
|
|
1095
|
+
return P(e);
|
|
1072
1096
|
}, r.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(t) {
|
|
1073
|
-
const e =
|
|
1074
|
-
return
|
|
1097
|
+
const e = j(t).queueMicrotask;
|
|
1098
|
+
return P(e);
|
|
1075
1099
|
}, r.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(t) {
|
|
1076
|
-
queueMicrotask(
|
|
1100
|
+
queueMicrotask(j(t));
|
|
1077
1101
|
}, r.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(t) {
|
|
1078
|
-
const e = Promise.resolve(
|
|
1079
|
-
return
|
|
1102
|
+
const e = Promise.resolve(j(t));
|
|
1103
|
+
return P(e);
|
|
1080
1104
|
}, r.wbg.__wbg_set_3f1d0b984ed272ed = function(t, e, n) {
|
|
1081
|
-
|
|
1105
|
+
j(t)[B(e)] = B(n);
|
|
1082
1106
|
}, r.wbg.__wbg_set_781438a03c0c3c81 = function() {
|
|
1083
|
-
return
|
|
1084
|
-
return Reflect.set(
|
|
1107
|
+
return Jt(function(t, e, n) {
|
|
1108
|
+
return Reflect.set(j(t), j(e), j(n));
|
|
1085
1109
|
}, arguments);
|
|
1086
1110
|
}, r.wbg.__wbg_set_7df433eea03a5c14 = function(t, e, n) {
|
|
1087
|
-
|
|
1111
|
+
j(t)[e >>> 0] = B(n);
|
|
1088
1112
|
}, r.wbg.__wbg_set_index_021489b2916af13e = function(t, e, n) {
|
|
1089
|
-
|
|
1113
|
+
j(t)[e >>> 0] = n;
|
|
1090
1114
|
}, r.wbg.__wbg_set_index_04c4b93e64d08a52 = function(t, e, n) {
|
|
1091
|
-
|
|
1115
|
+
j(t)[e >>> 0] = n;
|
|
1092
1116
|
}, r.wbg.__wbg_set_index_42abe35f117e614e = function(t, e, n) {
|
|
1093
|
-
|
|
1117
|
+
j(t)[e >>> 0] = n >>> 0;
|
|
1094
1118
|
}, r.wbg.__wbg_stack_0ed75d68575b0f3c = function(t, e) {
|
|
1095
|
-
const n =
|
|
1119
|
+
const n = j(e).stack, s = lt(n, a.__wbindgen_export3, a.__wbindgen_export4), i = v;
|
|
1096
1120
|
A().setInt32(t + 4, i, !0), A().setInt32(t + 0, s, !0);
|
|
1097
1121
|
}, r.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
1098
1122
|
const t = typeof global > "u" ? null : global;
|
|
1099
|
-
return
|
|
1123
|
+
return bt(t) ? 0 : P(t);
|
|
1100
1124
|
}, r.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
1101
1125
|
const t = typeof globalThis > "u" ? null : globalThis;
|
|
1102
|
-
return
|
|
1126
|
+
return bt(t) ? 0 : P(t);
|
|
1103
1127
|
}, r.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
1104
1128
|
const t = typeof self > "u" ? null : self;
|
|
1105
|
-
return
|
|
1129
|
+
return bt(t) ? 0 : P(t);
|
|
1106
1130
|
}, r.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
1107
1131
|
const t = typeof window > "u" ? null : window;
|
|
1108
|
-
return
|
|
1132
|
+
return bt(t) ? 0 : P(t);
|
|
1109
1133
|
}, r.wbg.__wbg_then_4f95312d68691235 = function(t, e) {
|
|
1110
|
-
const n =
|
|
1111
|
-
return
|
|
1134
|
+
const n = j(t).then(j(e));
|
|
1135
|
+
return P(n);
|
|
1112
1136
|
}, r.wbg.__wbg_warn_6e567d0d926ff881 = function(t) {
|
|
1113
|
-
console.warn(
|
|
1137
|
+
console.warn(j(t));
|
|
1138
|
+
}, r.wbg.__wbindgen_cast_0093e2d96a856a3b = function(t, e) {
|
|
1139
|
+
const n = ln(t, e, a.__wasm_bindgen_func_elem_665, un);
|
|
1140
|
+
return P(n);
|
|
1114
1141
|
}, r.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(t, e) {
|
|
1115
|
-
const n =
|
|
1116
|
-
return
|
|
1117
|
-
}, r.wbg.__wbindgen_cast_257c51b8abf9285e = function(t, e) {
|
|
1118
|
-
const n = on(t, e, a.__wasm_bindgen_func_elem_653, ln);
|
|
1119
|
-
return U(n);
|
|
1142
|
+
const n = K(t, e);
|
|
1143
|
+
return P(n);
|
|
1120
1144
|
}, r.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(t) {
|
|
1121
1145
|
const e = BigInt.asUintN(64, t);
|
|
1122
|
-
return
|
|
1146
|
+
return P(e);
|
|
1123
1147
|
}, r.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(t) {
|
|
1124
|
-
return
|
|
1148
|
+
return P(t);
|
|
1125
1149
|
}, r.wbg.__wbindgen_object_clone_ref = function(t) {
|
|
1126
|
-
const e =
|
|
1127
|
-
return
|
|
1150
|
+
const e = j(t);
|
|
1151
|
+
return P(e);
|
|
1128
1152
|
}, r.wbg.__wbindgen_object_drop_ref = function(t) {
|
|
1129
|
-
|
|
1153
|
+
B(t);
|
|
1130
1154
|
}, r;
|
|
1131
1155
|
}
|
|
1132
|
-
function
|
|
1133
|
-
return a = r.exports,
|
|
1156
|
+
function In(r, t) {
|
|
1157
|
+
return a = r.exports, $e.__wbindgen_wasm_module = t, Ft = null, _t = null, Rt = null, St = null, Nt = null, At = null, a.__wbindgen_start(), a;
|
|
1134
1158
|
}
|
|
1135
|
-
|
|
1159
|
+
$e = async function(r) {
|
|
1136
1160
|
if (a !== void 0) return a;
|
|
1137
|
-
typeof r < "u" && (Object.getPrototypeOf(r) === Object.prototype ? { module_or_path: r } = r : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), typeof r > "u" && (r = new URL("/assets/ifc-lite_bg-
|
|
1138
|
-
const t =
|
|
1161
|
+
typeof r < "u" && (Object.getPrototypeOf(r) === Object.prototype ? { module_or_path: r } = r : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), typeof r > "u" && (r = new URL("/assets/ifc-lite_bg-DbgS5EUA.wasm", import.meta.url));
|
|
1162
|
+
const t = _n();
|
|
1139
1163
|
(typeof r == "string" || typeof Request == "function" && r instanceof Request || typeof URL == "function" && r instanceof URL) && (r = fetch(r));
|
|
1140
|
-
const { instance: e, module: n } = await
|
|
1141
|
-
return
|
|
1164
|
+
const { instance: e, module: n } = await gn(await r, t);
|
|
1165
|
+
return In(e, n);
|
|
1142
1166
|
};
|
|
1143
|
-
const tt = We("Geometry"),
|
|
1144
|
-
let
|
|
1145
|
-
class
|
|
1167
|
+
const tt = We("Geometry"), yn = "IFC-Lite WASM cannot recover from a fatal runtime error within the same document lifetime. Reload the page or recreate the worker process before calling init() again.";
|
|
1168
|
+
let Zt = null;
|
|
1169
|
+
class mn {
|
|
1146
1170
|
ifcApi = null;
|
|
1147
1171
|
initialized = !1;
|
|
1148
1172
|
mergeLayers = !1;
|
|
1173
|
+
geometryHashTolerance = null;
|
|
1149
1174
|
isWasmRuntimeError(t) {
|
|
1150
1175
|
return t instanceof WebAssembly.RuntimeError;
|
|
1151
1176
|
}
|
|
1152
1177
|
markFatalWasmRuntimeError() {
|
|
1153
|
-
|
|
1178
|
+
Zt = new Error(yn), this.reset();
|
|
1154
1179
|
}
|
|
1155
1180
|
async init() {
|
|
1156
1181
|
if (!this.initialized) {
|
|
1157
|
-
if (
|
|
1182
|
+
if (Zt) throw Zt;
|
|
1158
1183
|
try {
|
|
1159
|
-
await
|
|
1184
|
+
await $e(), tt.debug("Geometry processing: single-threaded WASM (N-worker pool handles parallelism)"), this.ifcApi = new ae, this.applyMergeLayers(), this.applyComputeGeometryHashes(), this.initialized = !0, tt.info("WASM geometry engine initialized");
|
|
1160
1185
|
} catch (t) {
|
|
1161
1186
|
throw tt.error("Failed to initialize WASM geometry engine", t, {
|
|
1162
1187
|
operation: "init"
|
|
@@ -1279,14 +1304,36 @@ let __tla = Promise.all([
|
|
|
1279
1304
|
operation: "setMergeLayers"
|
|
1280
1305
|
});
|
|
1281
1306
|
}
|
|
1307
|
+
setComputeGeometryHashes(t) {
|
|
1308
|
+
this.geometryHashTolerance = t != null && t > 0 ? t : null, this.ifcApi && this.applyComputeGeometryHashes();
|
|
1309
|
+
}
|
|
1310
|
+
getComputeGeometryHashes() {
|
|
1311
|
+
return this.geometryHashTolerance;
|
|
1312
|
+
}
|
|
1313
|
+
applyComputeGeometryHashes() {
|
|
1314
|
+
if (!this.ifcApi) return;
|
|
1315
|
+
const t = this.ifcApi;
|
|
1316
|
+
if (typeof t.setComputeGeometryHashes != "function") {
|
|
1317
|
+
this.geometryHashTolerance != null && tt.warn("setComputeGeometryHashes not present on WASM API — geometry diff hashes unavailable until WASM is rebuilt", {
|
|
1318
|
+
operation: "setComputeGeometryHashes",
|
|
1319
|
+
data: {
|
|
1320
|
+
requested: this.geometryHashTolerance
|
|
1321
|
+
}
|
|
1322
|
+
});
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
t.setComputeGeometryHashes(this.geometryHashTolerance), tt.debug(`computeGeometryHashes=${this.geometryHashTolerance ?? "off"}`, {
|
|
1326
|
+
operation: "setComputeGeometryHashes"
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1282
1329
|
}
|
|
1283
|
-
function
|
|
1330
|
+
function Ve() {
|
|
1284
1331
|
return typeof window < "u" && "__TAURI_INTERNALS__" in window;
|
|
1285
1332
|
}
|
|
1286
|
-
async function
|
|
1287
|
-
if (
|
|
1333
|
+
async function En() {
|
|
1334
|
+
if (Ve()) {
|
|
1288
1335
|
const { NativeBridge: r } = await je(async ()=>{
|
|
1289
|
-
const { NativeBridge: t } = await import("./native-bridge-
|
|
1336
|
+
const { NativeBridge: t } = await import("./native-bridge-XxXos6yI.js").then(async (m)=>{
|
|
1290
1337
|
await m.__tla;
|
|
1291
1338
|
return m;
|
|
1292
1339
|
});
|
|
@@ -1298,7 +1345,7 @@ let __tla = Promise.all([
|
|
|
1298
1345
|
}
|
|
1299
1346
|
throw new Error("createPlatformBridge() is native-only; the browser uses the WASM GeometryProcessor path directly.");
|
|
1300
1347
|
}
|
|
1301
|
-
class
|
|
1348
|
+
class bn {
|
|
1302
1349
|
buildInterleavedBuffer(t) {
|
|
1303
1350
|
const e = t.positions.length / 3, n = new Float32Array(e * 6);
|
|
1304
1351
|
for(let s = 0; s < e; s++){
|
|
@@ -1317,7 +1364,7 @@ let __tla = Promise.all([
|
|
|
1317
1364
|
};
|
|
1318
1365
|
}
|
|
1319
1366
|
}
|
|
1320
|
-
class
|
|
1367
|
+
class Cn {
|
|
1321
1368
|
originShift = {
|
|
1322
1369
|
x: 0,
|
|
1323
1370
|
y: 0,
|
|
@@ -1352,8 +1399,8 @@ let __tla = Promise.all([
|
|
|
1352
1399
|
for (const i of t){
|
|
1353
1400
|
const o = i.positions;
|
|
1354
1401
|
for(let c = 0; c < o.length; c += 3){
|
|
1355
|
-
const l = o[c], d = o[c + 1],
|
|
1356
|
-
Number.isFinite(l) && Number.isFinite(d) && Number.isFinite(
|
|
1402
|
+
const l = o[c], d = o[c + 1], f = o[c + 2];
|
|
1403
|
+
Number.isFinite(l) && Number.isFinite(d) && Number.isFinite(f) && Math.abs(l) < s && Math.abs(d) < s && Math.abs(f) < s && (n.min.x = Math.min(n.min.x, l), n.min.y = Math.min(n.min.y, d), n.min.z = Math.min(n.min.z, f), n.max.x = Math.max(n.max.x, l), n.max.y = Math.max(n.max.y, d), n.max.z = Math.max(n.max.z, f));
|
|
1357
1404
|
}
|
|
1358
1405
|
}
|
|
1359
1406
|
return n;
|
|
@@ -1361,11 +1408,11 @@ let __tla = Promise.all([
|
|
|
1361
1408
|
calculateBoundsFast(t) {
|
|
1362
1409
|
let e = 1 / 0, n = 1 / 0, s = 1 / 0, i = -1 / 0, o = -1 / 0, c = -1 / 0;
|
|
1363
1410
|
for (const l of t){
|
|
1364
|
-
const d = l.positions,
|
|
1365
|
-
if (
|
|
1366
|
-
const
|
|
1367
|
-
if (
|
|
1368
|
-
const h = d[
|
|
1411
|
+
const d = l.positions, f = d.length;
|
|
1412
|
+
if (f < 3) continue;
|
|
1413
|
+
const u = d[0], p = d[1], I = d[2];
|
|
1414
|
+
if (u < e && (e = u), p < n && (n = p), I < s && (s = I), u > i && (i = u), p > o && (o = p), I > c && (c = I), f >= 6) {
|
|
1415
|
+
const h = d[f - 3], y = d[f - 2], E = d[f - 1];
|
|
1369
1416
|
h < e && (e = h), y < n && (n = y), E < s && (s = E), h > i && (i = h), y > o && (o = y), E > c && (c = E);
|
|
1370
1417
|
}
|
|
1371
1418
|
}
|
|
@@ -1504,15 +1551,15 @@ let __tla = Promise.all([
|
|
|
1504
1551
|
z: this.accumulatedBounds.max.z - this.accumulatedBounds.min.z
|
|
1505
1552
|
}, i = Math.max(s.x, s.y, s.z), o = this.calculateCentroid(this.accumulatedBounds), c = Math.sqrt(o.x ** 2 + o.y ** 2 + o.z ** 2);
|
|
1506
1553
|
let l = 0, d = 0;
|
|
1507
|
-
const
|
|
1508
|
-
for (const
|
|
1509
|
-
const h =
|
|
1554
|
+
const f = this.THRESHOLD;
|
|
1555
|
+
for (const I of t){
|
|
1556
|
+
const h = I.positions;
|
|
1510
1557
|
if (h.length >= 3) {
|
|
1511
1558
|
const y = Math.abs(h[0]), E = Math.abs(h[1]), C = Math.abs(h[2]);
|
|
1512
|
-
Math.max(y, E, C) <
|
|
1559
|
+
Math.max(y, E, C) < f ? l++ : d++;
|
|
1513
1560
|
}
|
|
1514
1561
|
}
|
|
1515
|
-
const
|
|
1562
|
+
const u = l + d, p = u > 0 && l / u > .5;
|
|
1516
1563
|
p && (this.wasmRtcDetected = !0, this.accumulatedBounds = this.calculateBounds(t, this.NORMAL_COORD_THRESHOLD)), (c > this.THRESHOLD || i > this.THRESHOLD) && !p && (this.originShift = o);
|
|
1517
1564
|
}
|
|
1518
1565
|
this.shiftCalculated = !0;
|
|
@@ -1605,8 +1652,8 @@ let __tla = Promise.all([
|
|
|
1605
1652
|
}, this.wasmRtcDetected = !1, this.activeThreshold = this.MAX_REASONABLE_COORD, this.appliedWasmRtcOffset = null, this.lengthUnitScale = void 0;
|
|
1606
1653
|
}
|
|
1607
1654
|
}
|
|
1608
|
-
|
|
1609
|
-
function
|
|
1655
|
+
wn = ((r)=>(r.Fast = "fast", r.Balanced = "balanced", r.High = "high", r))(wn || {});
|
|
1656
|
+
function Tn(r) {
|
|
1610
1657
|
const t = Math.max(0, r.fileSizeMB), e = Math.max(1, Math.floor(r.cores)), n = Math.max(1, r.deviceMemoryGB), s = e >= 10 ? Math.max(n, 16) : n, i = Math.max(0, Math.floor(r.totalJobs)), o = Math.max(1, Math.floor(r.minWorkers ?? 1)), c = Math.max(o, Math.floor(r.maxWorkers ?? 8));
|
|
1611
1658
|
if (i === 0) return {
|
|
1612
1659
|
count: 0,
|
|
@@ -1614,7 +1661,7 @@ let __tla = Promise.all([
|
|
|
1614
1661
|
};
|
|
1615
1662
|
let l;
|
|
1616
1663
|
e >= 16 && s >= 16 ? l = Math.min(c, Math.floor(e / 2)) : e >= 12 && s >= 8 ? l = t > 512 ? 4 : 5 : e >= 10 && s >= 8 ? l = t > 512 ? 3 : 4 : e >= 8 && s >= 8 ? l = t > 512 ? 2 : 3 : l = Math.max(1, Math.min(2, Math.floor(e / 2)));
|
|
1617
|
-
const d = s * 1024,
|
|
1664
|
+
const d = s * 1024, f = Math.max(1024, d * .25), u = t * 2.5, p = Math.max(64, t * 1.5), I = d - f - u, h = I > 0 ? Math.max(1, Math.floor(I / p)) : 1, y = [
|
|
1618
1665
|
{
|
|
1619
1666
|
value: l,
|
|
1620
1667
|
reason: "cores"
|
|
@@ -1642,55 +1689,56 @@ let __tla = Promise.all([
|
|
|
1642
1689
|
reason: E.reason
|
|
1643
1690
|
};
|
|
1644
1691
|
}
|
|
1645
|
-
function
|
|
1646
|
-
return
|
|
1692
|
+
function Fn(r) {
|
|
1693
|
+
return Tn(r).count;
|
|
1647
1694
|
}
|
|
1648
|
-
const
|
|
1649
|
-
|
|
1650
|
-
const t = r.desktopStableWasm === !0, e = Math.max(0, Math.floor(r.batchCount)), n = Math.max(0, r.fileSizeMB), s = e > 0 ? t ?
|
|
1695
|
+
const Rn = 3e4, Sn = 15e3, Nn = 15e3, An = 5e3, On = 60, xn = 30, Ln = 30, Mn = 15;
|
|
1696
|
+
fs = function(r) {
|
|
1697
|
+
const t = r.desktopStableWasm === !0, e = Math.max(0, Math.floor(r.batchCount)), n = Math.max(0, r.fileSizeMB), s = e > 0 ? t ? An : Nn : t ? Sn : Rn, i = e > 0 ? t ? Mn : Ln : t ? xn : On;
|
|
1651
1698
|
return Math.max(s, Math.round(s + n * i));
|
|
1652
1699
|
};
|
|
1653
|
-
function
|
|
1700
|
+
function Bn(r, t) {
|
|
1654
1701
|
if (typeof t == "number") return t;
|
|
1655
1702
|
const e = t.fileSizeMB ? t.fileSizeMB : r.length / (1024 * 1024);
|
|
1656
1703
|
return e < 10 ? 100 : e < 50 ? 200 : e < 100 ? 300 : e < 300 ? 500 : e < 500 ? 1500 : 3e3;
|
|
1657
1704
|
}
|
|
1658
|
-
function
|
|
1705
|
+
function Re(r) {
|
|
1659
1706
|
const t = [];
|
|
1660
1707
|
try {
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1708
|
+
const e = Pn(r);
|
|
1709
|
+
for(let n = 0; n < r.length; n++){
|
|
1710
|
+
const s = r.get(n);
|
|
1711
|
+
if (s) try {
|
|
1712
|
+
const i = s.shadingColor, o = i && i.length === 4 ? [
|
|
1713
|
+
i[0],
|
|
1714
|
+
i[1],
|
|
1715
|
+
i[2],
|
|
1716
|
+
i[3]
|
|
1717
|
+
] : void 0, c = s.color, l = e.get(s.expressId), d = {
|
|
1718
|
+
expressId: s.expressId,
|
|
1719
|
+
ifcType: s.ifcType,
|
|
1720
|
+
positions: s.positions,
|
|
1721
|
+
normals: s.normals,
|
|
1722
|
+
indices: s.indices,
|
|
1675
1723
|
color: [
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1724
|
+
c[0],
|
|
1725
|
+
c[1],
|
|
1726
|
+
c[2],
|
|
1727
|
+
c[3]
|
|
1680
1728
|
],
|
|
1681
|
-
...
|
|
1682
|
-
shadingColor:
|
|
1729
|
+
...o ? {
|
|
1730
|
+
shadingColor: o
|
|
1683
1731
|
} : {}
|
|
1684
1732
|
};
|
|
1685
|
-
|
|
1686
|
-
rgba:
|
|
1687
|
-
width:
|
|
1688
|
-
height:
|
|
1689
|
-
repeatS:
|
|
1690
|
-
repeatT:
|
|
1691
|
-
}), t.push(
|
|
1733
|
+
s.hasTexture && (d.uvs = s.uvs, d.texture = {
|
|
1734
|
+
rgba: s.textureRgba,
|
|
1735
|
+
width: s.textureWidth,
|
|
1736
|
+
height: s.textureHeight,
|
|
1737
|
+
repeatS: s.textureRepeatS,
|
|
1738
|
+
repeatT: s.textureRepeatT
|
|
1739
|
+
}), l !== void 0 && (d.geometryHash = l), t.push(d);
|
|
1692
1740
|
} finally{
|
|
1693
|
-
|
|
1741
|
+
s.free();
|
|
1694
1742
|
}
|
|
1695
1743
|
}
|
|
1696
1744
|
} finally{
|
|
@@ -1698,20 +1746,29 @@ let __tla = Promise.all([
|
|
|
1698
1746
|
}
|
|
1699
1747
|
return t;
|
|
1700
1748
|
}
|
|
1749
|
+
function Pn(r) {
|
|
1750
|
+
const t = new Map, e = r;
|
|
1751
|
+
if ((e.geometryHashCount ?? 0) === 0) return t;
|
|
1752
|
+
const s = e.geometryHashIds, i = e.geometryHashValues;
|
|
1753
|
+
if (!s || !i) return t;
|
|
1754
|
+
const o = Math.min(s.length, i.length);
|
|
1755
|
+
for(let c = 0; c < o; c++)t.set(s[c], i[c]);
|
|
1756
|
+
return t;
|
|
1757
|
+
}
|
|
1701
1758
|
function Wt(r, t) {
|
|
1702
1759
|
return t !== void 0 ? {
|
|
1703
1760
|
...r,
|
|
1704
1761
|
buildingRotation: t
|
|
1705
1762
|
} : r;
|
|
1706
1763
|
}
|
|
1707
|
-
const
|
|
1708
|
-
function
|
|
1764
|
+
const Un = 8, Dn = 32768, vn = 4, Gn = 8192, $n = 10;
|
|
1765
|
+
function Se() {
|
|
1709
1766
|
const r = globalThis.scheduler;
|
|
1710
1767
|
return typeof r?.yield == "function" ? r.yield() : new Promise((t)=>{
|
|
1711
1768
|
globalThis.setTimeout(t, 0);
|
|
1712
1769
|
});
|
|
1713
1770
|
}
|
|
1714
|
-
function
|
|
1771
|
+
function Ne(r, t, e) {
|
|
1715
1772
|
if (t.type === "colorUpdate") {
|
|
1716
1773
|
const i = r[r.length - 1];
|
|
1717
1774
|
if (i?.type === "colorUpdate") {
|
|
@@ -1722,17 +1779,17 @@ let __tla = Promise.all([
|
|
|
1722
1779
|
return;
|
|
1723
1780
|
}
|
|
1724
1781
|
const n = r[r.length - 1];
|
|
1725
|
-
if (n?.type === "batch" && (r.length >=
|
|
1782
|
+
if (n?.type === "batch" && (r.length >= Un || e.queuedMeshes >= Dn)) {
|
|
1726
1783
|
for(let i = 0; i < t.meshes.length; i++)n.meshes.push(t.meshes[i]);
|
|
1727
1784
|
n.nativeTelemetry = t.nativeTelemetry, e.coalescedBatchCount += 1;
|
|
1728
1785
|
} else r.push(t);
|
|
1729
1786
|
e.queuedMeshes += t.meshes.length;
|
|
1730
1787
|
}
|
|
1731
|
-
async function*
|
|
1788
|
+
async function* Ae(r, t, e, n) {
|
|
1732
1789
|
e.reset(), yield {
|
|
1733
1790
|
type: "start",
|
|
1734
1791
|
totalEstimate: t
|
|
1735
|
-
}, await
|
|
1792
|
+
}, await Se(), yield {
|
|
1736
1793
|
type: "model-open",
|
|
1737
1794
|
modelID: 0
|
|
1738
1795
|
};
|
|
@@ -1740,65 +1797,71 @@ let __tla = Promise.all([
|
|
|
1740
1797
|
queuedMeshes: 0,
|
|
1741
1798
|
coalescedBatchCount: 0
|
|
1742
1799
|
};
|
|
1743
|
-
let o = null, c = !1, l = null, d,
|
|
1744
|
-
const
|
|
1800
|
+
let o = null, c = !1, l = null, d, f = 0;
|
|
1801
|
+
const u = ()=>{
|
|
1745
1802
|
o && (o(), o = null);
|
|
1746
1803
|
}, p = r({
|
|
1747
1804
|
onBatch: (h)=>{
|
|
1748
|
-
|
|
1805
|
+
Ne(s, {
|
|
1749
1806
|
type: "batch",
|
|
1750
1807
|
meshes: h.meshes,
|
|
1751
1808
|
nativeTelemetry: h.nativeTelemetry
|
|
1752
|
-
}, i),
|
|
1809
|
+
}, i), u();
|
|
1753
1810
|
},
|
|
1754
1811
|
onColorUpdate: (h)=>{
|
|
1755
|
-
|
|
1812
|
+
Ne(s, {
|
|
1756
1813
|
type: "colorUpdate",
|
|
1757
1814
|
updates: new Map(h)
|
|
1758
|
-
}, i),
|
|
1815
|
+
}, i), u();
|
|
1759
1816
|
},
|
|
1760
1817
|
onComplete: (h)=>{
|
|
1761
|
-
n(h), d = h.totalMeshes, c = !0,
|
|
1818
|
+
n(h), d = h.totalMeshes, c = !0, u();
|
|
1762
1819
|
},
|
|
1763
1820
|
onError: (h)=>{
|
|
1764
|
-
l = h, c = !0,
|
|
1821
|
+
l = h, c = !0, u();
|
|
1765
1822
|
}
|
|
1766
1823
|
});
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1824
|
+
try {
|
|
1825
|
+
for(; !c || s.length > 0;){
|
|
1826
|
+
let h = 0, y = 0, E = performance.now();
|
|
1827
|
+
for(; s.length > 0;){
|
|
1828
|
+
const C = s.shift();
|
|
1829
|
+
if (C.type === "colorUpdate") {
|
|
1830
|
+
yield {
|
|
1831
|
+
type: "colorUpdate",
|
|
1832
|
+
updates: C.updates
|
|
1833
|
+
};
|
|
1834
|
+
continue;
|
|
1835
|
+
}
|
|
1836
|
+
i.queuedMeshes = Math.max(0, i.queuedMeshes - C.meshes.length), e.processTrustedMeshesIncremental(C.meshes), f += C.meshes.length;
|
|
1837
|
+
const T = e.getCurrentCoordinateInfo();
|
|
1772
1838
|
yield {
|
|
1773
|
-
type: "
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1839
|
+
type: "batch",
|
|
1840
|
+
meshes: C.meshes,
|
|
1841
|
+
totalSoFar: f,
|
|
1842
|
+
coordinateInfo: T || void 0,
|
|
1843
|
+
nativeTelemetry: C.nativeTelemetry
|
|
1844
|
+
}, h += 1, y += C.meshes.length, s.length > 0 && (h >= vn || y >= Gn || performance.now() - E >= $n) && (await Se(), h = 0, y = 0, E = performance.now());
|
|
1777
1845
|
}
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
meshes: C.meshes,
|
|
1783
|
-
totalSoFar: u,
|
|
1784
|
-
coordinateInfo: T || void 0,
|
|
1785
|
-
nativeTelemetry: C.nativeTelemetry
|
|
1786
|
-
}, h += 1, y += C.meshes.length, s.length > 0 && (h >= Pn || y >= Bn || performance.now() - E >= Un) && (await Re(), h = 0, y = 0, E = performance.now());
|
|
1846
|
+
if (l) throw l;
|
|
1847
|
+
c || await new Promise((C)=>{
|
|
1848
|
+
o = C;
|
|
1849
|
+
});
|
|
1787
1850
|
}
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
}
|
|
1851
|
+
} finally{
|
|
1852
|
+
try {
|
|
1853
|
+
await p;
|
|
1854
|
+
} catch {}
|
|
1792
1855
|
}
|
|
1793
|
-
|
|
1794
|
-
const
|
|
1856
|
+
i.coalescedBatchCount > 0 && console.info(`[GeometryProcessor] Coalesced ${i.coalescedBatchCount} native batches while JS drained the queue`);
|
|
1857
|
+
const I = e.getFinalCoordinateInfo();
|
|
1795
1858
|
yield {
|
|
1796
1859
|
type: "complete",
|
|
1797
|
-
totalMeshes: d ??
|
|
1798
|
-
coordinateInfo:
|
|
1860
|
+
totalMeshes: d ?? f,
|
|
1861
|
+
coordinateInfo: I
|
|
1799
1862
|
};
|
|
1800
1863
|
}
|
|
1801
|
-
async function*
|
|
1864
|
+
async function* Vn(r, t, e, n, s) {
|
|
1802
1865
|
t.reset(), yield {
|
|
1803
1866
|
type: "start",
|
|
1804
1867
|
totalEstimate: r.length / 1e3
|
|
@@ -1809,320 +1872,336 @@ let __tla = Promise.all([
|
|
|
1809
1872
|
let i;
|
|
1810
1873
|
const o = r.buffer;
|
|
1811
1874
|
n && n.byteLength === r.byteLength ? i = n : typeof SharedArrayBuffer < "u" && o instanceof SharedArrayBuffer && r.byteOffset === 0 && r.byteLength === o.byteLength ? i = o : (i = new SharedArrayBuffer(r.byteLength), new Uint8Array(i).set(r));
|
|
1812
|
-
const c = ()=>new Worker(new URL("/assets/geometry.worker-
|
|
1875
|
+
const c = ()=>new Worker(new URL("/assets/geometry.worker-Bpa3115V.js", import.meta.url), {
|
|
1813
1876
|
type: "module"
|
|
1814
|
-
}), l = ()=>new Worker(new URL("/assets/geometry.worker-
|
|
1877
|
+
}), l = ()=>new Worker(new URL("/assets/geometry.worker-Bpa3115V.js", import.meta.url), {
|
|
1815
1878
|
type: "module"
|
|
1816
1879
|
}), d = [];
|
|
1817
|
-
let
|
|
1818
|
-
const
|
|
1819
|
-
|
|
1880
|
+
let f = null;
|
|
1881
|
+
const u = ()=>{
|
|
1882
|
+
f && (f(), f = null);
|
|
1820
1883
|
};
|
|
1821
|
-
let p = null,
|
|
1822
|
-
const
|
|
1823
|
-
let O = !1,
|
|
1824
|
-
const b = [], S = (L,
|
|
1825
|
-
L.onmessage = (
|
|
1826
|
-
const
|
|
1827
|
-
if (
|
|
1828
|
-
console.log(`[stream] worker[${
|
|
1884
|
+
let p = null, I = 0, h = !1, y = null, E = null, C = 0, T = 0, G = !1, x = !1;
|
|
1885
|
+
const k = [];
|
|
1886
|
+
let O = !1, D = !1;
|
|
1887
|
+
const b = [], S = (L, W)=>{
|
|
1888
|
+
L.onmessage = (X)=>{
|
|
1889
|
+
const U = X.data;
|
|
1890
|
+
if (U.type === "ready") {
|
|
1891
|
+
console.log(`[stream] worker[${W}] WASM ready @ ${Q()}ms`);
|
|
1829
1892
|
return;
|
|
1830
1893
|
}
|
|
1831
|
-
if (
|
|
1894
|
+
if (U.type === "memory") {
|
|
1832
1895
|
d.push({
|
|
1833
1896
|
type: "workerMemory",
|
|
1834
|
-
workerIndex:
|
|
1835
|
-
wasmHeapBytes:
|
|
1836
|
-
meshBytes:
|
|
1837
|
-
}),
|
|
1897
|
+
workerIndex: W,
|
|
1898
|
+
wasmHeapBytes: U.wasmHeapBytes,
|
|
1899
|
+
meshBytes: U.meshBytes
|
|
1900
|
+
}), u();
|
|
1838
1901
|
return;
|
|
1839
1902
|
}
|
|
1840
|
-
if (
|
|
1841
|
-
b[
|
|
1842
|
-
const q =
|
|
1843
|
-
expressId:
|
|
1844
|
-
ifcType:
|
|
1845
|
-
positions:
|
|
1846
|
-
normals:
|
|
1847
|
-
indices:
|
|
1848
|
-
color:
|
|
1849
|
-
...
|
|
1850
|
-
uvs:
|
|
1903
|
+
if (U.type === "batch") {
|
|
1904
|
+
b[W] === void 0 && (b[W] = Q(), console.log(`[stream] worker[${W}] first batch @ ${Q()}ms (${U.meshes?.length ?? 0} meshes)`));
|
|
1905
|
+
const q = U.meshes.map((M)=>({
|
|
1906
|
+
expressId: M.expressId,
|
|
1907
|
+
ifcType: M.ifcType,
|
|
1908
|
+
positions: M.positions instanceof Float32Array ? M.positions : new Float32Array(M.positions),
|
|
1909
|
+
normals: M.normals instanceof Float32Array ? M.normals : new Float32Array(M.normals),
|
|
1910
|
+
indices: M.indices instanceof Uint32Array ? M.indices : new Uint32Array(M.indices),
|
|
1911
|
+
color: M.color,
|
|
1912
|
+
...M.uvs ? {
|
|
1913
|
+
uvs: M.uvs
|
|
1851
1914
|
} : {},
|
|
1852
|
-
...
|
|
1853
|
-
texture:
|
|
1915
|
+
...M.texture ? {
|
|
1916
|
+
texture: M.texture
|
|
1917
|
+
} : {},
|
|
1918
|
+
...M.geometryHash !== void 0 ? {
|
|
1919
|
+
geometryHash: M.geometryHash
|
|
1854
1920
|
} : {}
|
|
1855
1921
|
}));
|
|
1856
1922
|
if (q.length > 0) {
|
|
1857
1923
|
T += q.length, t.processMeshesIncremental(q);
|
|
1858
|
-
const
|
|
1924
|
+
const M = t.getCurrentCoordinateInfo();
|
|
1859
1925
|
d.push({
|
|
1860
1926
|
type: "batch",
|
|
1861
1927
|
meshes: q,
|
|
1862
1928
|
totalSoFar: T,
|
|
1863
|
-
coordinateInfo:
|
|
1864
|
-
}),
|
|
1929
|
+
coordinateInfo: M || void 0
|
|
1930
|
+
}), u();
|
|
1865
1931
|
}
|
|
1866
1932
|
return;
|
|
1867
1933
|
}
|
|
1868
|
-
if (
|
|
1869
|
-
C++, L.terminate(),
|
|
1934
|
+
if (U.type === "complete") {
|
|
1935
|
+
C++, L.terminate(), u();
|
|
1870
1936
|
return;
|
|
1871
1937
|
}
|
|
1872
|
-
if (
|
|
1873
|
-
E = new Error(`Geometry worker error: ${
|
|
1938
|
+
if (U.type === "error") {
|
|
1939
|
+
E = new Error(`Geometry worker error: ${U.message}`), C++, L.terminate(), u();
|
|
1874
1940
|
return;
|
|
1875
1941
|
}
|
|
1876
|
-
}, L.onerror = (
|
|
1877
|
-
E = new Error(`Geometry worker failed: ${
|
|
1942
|
+
}, L.onerror = (X)=>{
|
|
1943
|
+
E = new Error(`Geometry worker failed: ${X.message}`), C++, L.terminate(), u();
|
|
1878
1944
|
};
|
|
1879
|
-
}, F = typeof navigator < "u" ? navigator.hardwareConcurrency ?? 2 : 2, m = typeof navigator < "u" ? navigator.deviceMemory ?? 8 : 8, _ = r.byteLength / (1024 * 1024), w = Math.max(1, Math.ceil(_ * 100)),
|
|
1945
|
+
}, F = typeof navigator < "u" ? navigator.hardwareConcurrency ?? 2 : 2, m = typeof navigator < "u" ? navigator.deviceMemory ?? 8 : 8, _ = r.byteLength / (1024 * 1024), w = Math.max(1, Math.ceil(_ * 100)), g = Fn({
|
|
1880
1946
|
fileSizeMB: _,
|
|
1881
1947
|
cores: F,
|
|
1882
1948
|
deviceMemoryGB: m,
|
|
1883
1949
|
totalJobs: w
|
|
1884
1950
|
}), R = [];
|
|
1885
|
-
for(let L = 0; L <
|
|
1886
|
-
const
|
|
1887
|
-
R.push(
|
|
1888
|
-
const
|
|
1889
|
-
|
|
1951
|
+
for(let L = 0; L < g; L++){
|
|
1952
|
+
const W = c();
|
|
1953
|
+
R.push(W), S(W, L);
|
|
1954
|
+
const X = s?.wasmUrls?.wasm;
|
|
1955
|
+
W.postMessage({
|
|
1890
1956
|
type: "init",
|
|
1891
|
-
...
|
|
1892
|
-
wasmUrl:
|
|
1957
|
+
...X ? {
|
|
1958
|
+
wasmUrl: X
|
|
1893
1959
|
} : {}
|
|
1894
|
-
}),
|
|
1960
|
+
}), W.postMessage({
|
|
1895
1961
|
type: "set-merge-layers",
|
|
1896
1962
|
enabled: s?.mergeLayers === !0
|
|
1963
|
+
}), W.postMessage({
|
|
1964
|
+
type: "set-compute-geometry-hashes",
|
|
1965
|
+
tolerance: s?.geometryHashTolerance ?? null
|
|
1897
1966
|
});
|
|
1898
1967
|
}
|
|
1899
1968
|
const N = ()=>{
|
|
1900
|
-
if (
|
|
1901
|
-
|
|
1969
|
+
if (!G) {
|
|
1970
|
+
G = !0;
|
|
1902
1971
|
for (const L of R)try {
|
|
1903
1972
|
L.postMessage({
|
|
1904
1973
|
type: "stream-end"
|
|
1905
1974
|
});
|
|
1906
1975
|
} catch {}
|
|
1907
1976
|
}
|
|
1908
|
-
},
|
|
1977
|
+
}, $ = ()=>{
|
|
1909
1978
|
if (x || !p) return;
|
|
1910
1979
|
x = !0;
|
|
1911
|
-
const L = e != null,
|
|
1980
|
+
const L = e != null, W = L ? e.x : p.rtcOffset[0], X = L ? e.y : p.rtcOffset[1], U = L ? e.z : p.rtcOffset[2], q = L ? !0 : p.needsShift;
|
|
1912
1981
|
t.setWasmMetadata(p.unitScale, q ? {
|
|
1913
|
-
x:
|
|
1914
|
-
y:
|
|
1915
|
-
z:
|
|
1982
|
+
x: W,
|
|
1983
|
+
y: X,
|
|
1984
|
+
z: U
|
|
1916
1985
|
} : null), d.push({
|
|
1917
1986
|
type: "rtcOffset",
|
|
1918
1987
|
rtcOffset: {
|
|
1919
|
-
x:
|
|
1920
|
-
y:
|
|
1921
|
-
z:
|
|
1988
|
+
x: W,
|
|
1989
|
+
y: X,
|
|
1990
|
+
z: U
|
|
1922
1991
|
},
|
|
1923
1992
|
hasRtc: q
|
|
1924
|
-
}),
|
|
1925
|
-
const
|
|
1926
|
-
for (const
|
|
1993
|
+
}), u();
|
|
1994
|
+
const M = new Uint32Array(0), nt = new Uint8Array(0);
|
|
1995
|
+
for (const dt of R)dt.postMessage({
|
|
1927
1996
|
type: "stream-start",
|
|
1928
1997
|
sharedBuffer: i,
|
|
1929
1998
|
unitScale: p.unitScale,
|
|
1930
|
-
rtcX:
|
|
1931
|
-
rtcY:
|
|
1932
|
-
rtcZ:
|
|
1999
|
+
rtcX: W,
|
|
2000
|
+
rtcY: X,
|
|
2001
|
+
rtcZ: U,
|
|
1933
2002
|
needsShift: q,
|
|
1934
|
-
voidKeys:
|
|
1935
|
-
voidCounts:
|
|
1936
|
-
voidValues:
|
|
1937
|
-
styleIds:
|
|
1938
|
-
styleColors:
|
|
2003
|
+
voidKeys: M,
|
|
2004
|
+
voidCounts: M,
|
|
2005
|
+
voidValues: M,
|
|
2006
|
+
styleIds: M,
|
|
2007
|
+
styleColors: nt
|
|
1939
2008
|
});
|
|
1940
2009
|
};
|
|
1941
|
-
function
|
|
2010
|
+
function V(L) {
|
|
1942
2011
|
if (R.length === 0 || L.length === 0) return;
|
|
1943
|
-
const
|
|
1944
|
-
if (
|
|
1945
|
-
const
|
|
2012
|
+
const W = Math.floor(L.length / 3);
|
|
2013
|
+
if (W === 0) return;
|
|
2014
|
+
const X = Math.ceil(W / R.length);
|
|
1946
2015
|
try {
|
|
1947
|
-
for(let
|
|
1948
|
-
const q =
|
|
1949
|
-
if (q >=
|
|
1950
|
-
const
|
|
1951
|
-
R[
|
|
2016
|
+
for(let U = 0; U < R.length; U++){
|
|
2017
|
+
const q = U * X * 3, M = Math.min(q + X * 3, L.length);
|
|
2018
|
+
if (q >= M) continue;
|
|
2019
|
+
const nt = L.slice(q, M);
|
|
2020
|
+
R[U].postMessage({
|
|
1952
2021
|
type: "stream-chunk",
|
|
1953
|
-
jobsFlat:
|
|
2022
|
+
jobsFlat: nt
|
|
1954
2023
|
}, [
|
|
1955
|
-
|
|
2024
|
+
nt.buffer
|
|
1956
2025
|
]);
|
|
1957
2026
|
}
|
|
1958
|
-
} catch (
|
|
1959
|
-
E = new Error(`Failed to dispatch jobs chunk: ${
|
|
2027
|
+
} catch (U) {
|
|
2028
|
+
E = new Error(`Failed to dispatch jobs chunk: ${U instanceof Error ? U.message : String(U)}`), u();
|
|
1960
2029
|
}
|
|
1961
2030
|
}
|
|
1962
|
-
const
|
|
1963
|
-
if (!x || !O || !
|
|
1964
|
-
|
|
1965
|
-
return;
|
|
1966
|
-
}
|
|
1967
|
-
z(L);
|
|
1968
|
-
}, H = ()=>{
|
|
1969
|
-
if (!(!x || !O || !v)) for(; Y.length > 0;)z(Y.shift());
|
|
1970
|
-
}, j = performance.now(), Q = ()=>Math.round(performance.now() - j);
|
|
1971
|
-
console.log(`[stream] processParallel start, fileSizeMB=${_.toFixed(1)} workerCount=${I}`);
|
|
1972
|
-
const K = l();
|
|
1973
|
-
s?.wasmUrls?.wasm && K.postMessage({
|
|
1974
|
-
type: "init",
|
|
1975
|
-
wasmUrl: s.wasmUrls.wasm
|
|
1976
|
-
});
|
|
1977
|
-
let at = 0, ht = 0, rt = -1;
|
|
1978
|
-
K.onmessage = (L)=>{
|
|
1979
|
-
const X = L.data;
|
|
1980
|
-
if (X.type === "prepass-progress") {
|
|
1981
|
-
d.push({
|
|
1982
|
-
type: "progress",
|
|
1983
|
-
phase: "prepass"
|
|
1984
|
-
}), f();
|
|
2031
|
+
const z = (L)=>{
|
|
2032
|
+
if (!x || !O || !D) {
|
|
2033
|
+
k.push(L);
|
|
1985
2034
|
return;
|
|
1986
2035
|
}
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
console.
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
} catch (
|
|
2039
|
-
console.warn("[stream]
|
|
2040
|
-
}
|
|
2041
|
-
} else {
|
|
2042
|
-
for (const it of R)try {
|
|
2043
|
-
it.postMessage({
|
|
2044
|
-
type: "set-entity-index",
|
|
2045
|
-
ids: M.slice(),
|
|
2046
|
-
starts: q.slice(),
|
|
2047
|
-
lengths: P.slice()
|
|
2048
|
-
});
|
|
2049
|
-
} catch (pt) {
|
|
2050
|
-
console.warn("[stream] set-entity-index dispatch failed:", pt);
|
|
2036
|
+
V(L);
|
|
2037
|
+
}, Y = ()=>{
|
|
2038
|
+
if (!(!x || !O || !D)) for(; k.length > 0;)V(k.shift());
|
|
2039
|
+
}, H = performance.now(), Q = ()=>Math.round(performance.now() - H);
|
|
2040
|
+
console.log(`[stream] processParallel start, fileSizeMB=${_.toFixed(1)} workerCount=${g}`);
|
|
2041
|
+
const Z = l();
|
|
2042
|
+
try {
|
|
2043
|
+
s?.wasmUrls?.wasm && Z.postMessage({
|
|
2044
|
+
type: "init",
|
|
2045
|
+
wasmUrl: s.wasmUrls.wasm
|
|
2046
|
+
});
|
|
2047
|
+
let L = 0, W = 0, X = -1;
|
|
2048
|
+
Z.onmessage = (nt)=>{
|
|
2049
|
+
const dt = nt.data;
|
|
2050
|
+
if (dt.type === "prepass-progress") {
|
|
2051
|
+
d.push({
|
|
2052
|
+
type: "progress",
|
|
2053
|
+
phase: "prepass"
|
|
2054
|
+
}), u();
|
|
2055
|
+
return;
|
|
2056
|
+
}
|
|
2057
|
+
if (dt.type === "prepass-stream") {
|
|
2058
|
+
const J = dt.event;
|
|
2059
|
+
if (J.type === "meta") p = {
|
|
2060
|
+
unitScale: J.unitScale,
|
|
2061
|
+
rtcOffset: J.rtcOffset,
|
|
2062
|
+
needsShift: J.needsShift,
|
|
2063
|
+
buildingRotation: J.buildingRotation ?? null
|
|
2064
|
+
}, console.log(`[stream] meta @ ${Q()}ms unitScale=${p.unitScale} rtc=[${p.rtcOffset[0].toFixed(0)},${p.rtcOffset[1].toFixed(0)},${p.rtcOffset[2].toFixed(0)}]`), $(), u();
|
|
2065
|
+
else if (J.type === "jobs") {
|
|
2066
|
+
const ot = J.jobs, at = Math.floor(ot.length / 3);
|
|
2067
|
+
L++, W += at, X < 0 && (X = Q(), console.log(`[stream] first jobs chunk @ ${X}ms (${at} jobs)`)), (L % 10 === 1 || at < 1e3) && console.log(`[stream] chunk #${L} @ ${Q()}ms (+${at} jobs, total ${W})`), z(ot);
|
|
2068
|
+
} else if (J.type === "styles") {
|
|
2069
|
+
const ot = J.styleIds, at = J.styleColors, ht = J.voidKeys, pt = J.voidCounts, wt = J.voidValues;
|
|
2070
|
+
console.log(`[stream] styles @ ${Q()}ms (${ot.length} styled, ${ht.length} void hosts), draining ${k.length} queued chunks`);
|
|
2071
|
+
for (const Qt of R)try {
|
|
2072
|
+
const ft = ot.slice(), It = at.slice(), yt = ht.slice(), mt = pt.slice(), Ht = wt.slice();
|
|
2073
|
+
Qt.postMessage({
|
|
2074
|
+
type: "set-styles",
|
|
2075
|
+
styleIds: ft,
|
|
2076
|
+
styleColors: It,
|
|
2077
|
+
voidKeys: yt,
|
|
2078
|
+
voidCounts: mt,
|
|
2079
|
+
voidValues: Ht
|
|
2080
|
+
}, [
|
|
2081
|
+
ft.buffer,
|
|
2082
|
+
It.buffer,
|
|
2083
|
+
yt.buffer,
|
|
2084
|
+
mt.buffer,
|
|
2085
|
+
Ht.buffer
|
|
2086
|
+
]);
|
|
2087
|
+
} catch (ft) {
|
|
2088
|
+
console.warn("[stream] set-styles dispatch failed:", ft);
|
|
2051
2089
|
}
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2090
|
+
O = !0, Y();
|
|
2091
|
+
} else if (J.type === "entity-index") {
|
|
2092
|
+
const ot = J.ids, at = J.starts, ht = J.lengths;
|
|
2093
|
+
if (console.log(`[stream] entity-index @ ${Q()}ms (${ot.length} entries)`), typeof SharedArrayBuffer < "u") {
|
|
2094
|
+
const pt = ot.byteLength, wt = at.byteLength, Qt = ht.byteLength, ft = new SharedArrayBuffer(pt), It = new SharedArrayBuffer(wt), yt = new SharedArrayBuffer(Qt);
|
|
2095
|
+
new Uint32Array(ft).set(ot), new Uint32Array(It).set(at), new Uint32Array(yt).set(ht);
|
|
2096
|
+
for (const mt of R)try {
|
|
2097
|
+
mt.postMessage({
|
|
2098
|
+
type: "set-entity-index",
|
|
2099
|
+
ids: new Uint32Array(ft),
|
|
2100
|
+
starts: new Uint32Array(It),
|
|
2101
|
+
lengths: new Uint32Array(yt)
|
|
2102
|
+
});
|
|
2103
|
+
} catch (Ht) {
|
|
2104
|
+
console.warn("[stream] set-entity-index dispatch failed:", Ht);
|
|
2105
|
+
}
|
|
2106
|
+
if (s?.onEntityIndex) try {
|
|
2107
|
+
s.onEntityIndex(new Uint32Array(ft), new Uint32Array(It), new Uint32Array(yt));
|
|
2108
|
+
} catch (mt) {
|
|
2109
|
+
console.warn("[stream] onEntityIndex callback failed:", mt);
|
|
2110
|
+
}
|
|
2111
|
+
} else {
|
|
2112
|
+
for (const pt of R)try {
|
|
2113
|
+
pt.postMessage({
|
|
2114
|
+
type: "set-entity-index",
|
|
2115
|
+
ids: ot.slice(),
|
|
2116
|
+
starts: at.slice(),
|
|
2117
|
+
lengths: ht.slice()
|
|
2118
|
+
});
|
|
2119
|
+
} catch (wt) {
|
|
2120
|
+
console.warn("[stream] set-entity-index dispatch failed:", wt);
|
|
2121
|
+
}
|
|
2122
|
+
if (s?.onEntityIndex) try {
|
|
2123
|
+
s.onEntityIndex(ot.slice(), at.slice(), ht.slice());
|
|
2124
|
+
} catch (pt) {
|
|
2125
|
+
console.warn("[stream] onEntityIndex callback failed:", pt);
|
|
2126
|
+
}
|
|
2056
2127
|
}
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
chunkSize: 5e4
|
|
2076
|
-
});
|
|
2077
|
-
let lt = !1;
|
|
2078
|
-
for(;;){
|
|
2079
|
-
for(; d.length > 0;)yield d.shift();
|
|
2080
|
-
if (E) {
|
|
2081
|
-
for (const L of R)try {
|
|
2082
|
-
L.terminate();
|
|
2083
|
-
} catch {}
|
|
2084
|
-
try {
|
|
2085
|
-
K.terminate();
|
|
2086
|
-
} catch {}
|
|
2087
|
-
throw E;
|
|
2088
|
-
}
|
|
2089
|
-
if (y) {
|
|
2090
|
-
for (const L of R)try {
|
|
2091
|
-
L.terminate();
|
|
2092
|
-
} catch {}
|
|
2093
|
-
throw y;
|
|
2094
|
-
}
|
|
2095
|
-
if (h && !x && g === 0) {
|
|
2096
|
-
for (const X of R)try {
|
|
2097
|
-
X.terminate();
|
|
2098
|
-
} catch {}
|
|
2099
|
-
yield {
|
|
2100
|
-
type: "complete",
|
|
2101
|
-
totalMeshes: 0,
|
|
2102
|
-
coordinateInfo: t.getFinalCoordinateInfo()
|
|
2103
|
-
};
|
|
2104
|
-
return;
|
|
2105
|
-
}
|
|
2106
|
-
if (h && x && C >= R.length && d.length === 0) break;
|
|
2107
|
-
await new Promise((L)=>{
|
|
2108
|
-
u = L;
|
|
2128
|
+
D = !0, Y();
|
|
2129
|
+
} else J.type === "complete" && (I = J.totalJobs, console.log(`[stream] prepass complete @ ${Q()}ms totalJobs=${I} chunks=${L}`), q || (q = !0, U()));
|
|
2130
|
+
return;
|
|
2131
|
+
}
|
|
2132
|
+
if (dt.type === "error") {
|
|
2133
|
+
y = new Error(dt.message), h = !0, Z.terminate(), u();
|
|
2134
|
+
return;
|
|
2135
|
+
}
|
|
2136
|
+
}, Z.onerror = (nt)=>{
|
|
2137
|
+
y = new Error(`Pre-pass worker failed: ${nt.message}`), h = !0, Z.terminate(), u();
|
|
2138
|
+
};
|
|
2139
|
+
const U = ()=>{
|
|
2140
|
+
h = !0, x && N(), Z.terminate(), u();
|
|
2141
|
+
};
|
|
2142
|
+
Z.postMessage({
|
|
2143
|
+
type: "prepass-streaming",
|
|
2144
|
+
sharedBuffer: i,
|
|
2145
|
+
chunkSize: 5e4
|
|
2109
2146
|
});
|
|
2147
|
+
let q = !1;
|
|
2148
|
+
for(;;){
|
|
2149
|
+
for(; d.length > 0;)yield d.shift();
|
|
2150
|
+
if (E) {
|
|
2151
|
+
for (const nt of R)try {
|
|
2152
|
+
nt.terminate();
|
|
2153
|
+
} catch {}
|
|
2154
|
+
try {
|
|
2155
|
+
Z.terminate();
|
|
2156
|
+
} catch {}
|
|
2157
|
+
throw E;
|
|
2158
|
+
}
|
|
2159
|
+
if (y) {
|
|
2160
|
+
for (const nt of R)try {
|
|
2161
|
+
nt.terminate();
|
|
2162
|
+
} catch {}
|
|
2163
|
+
throw y;
|
|
2164
|
+
}
|
|
2165
|
+
if (h && !x && I === 0) {
|
|
2166
|
+
for (const dt of R)try {
|
|
2167
|
+
dt.terminate();
|
|
2168
|
+
} catch {}
|
|
2169
|
+
yield {
|
|
2170
|
+
type: "complete",
|
|
2171
|
+
totalMeshes: 0,
|
|
2172
|
+
coordinateInfo: t.getFinalCoordinateInfo()
|
|
2173
|
+
};
|
|
2174
|
+
return;
|
|
2175
|
+
}
|
|
2176
|
+
if (h && x && C >= R.length && d.length === 0) break;
|
|
2177
|
+
await new Promise((nt)=>{
|
|
2178
|
+
f = nt;
|
|
2179
|
+
});
|
|
2180
|
+
}
|
|
2181
|
+
const M = t.getFinalCoordinateInfo();
|
|
2182
|
+
yield {
|
|
2183
|
+
type: "complete",
|
|
2184
|
+
totalMeshes: T,
|
|
2185
|
+
coordinateInfo: M
|
|
2186
|
+
};
|
|
2187
|
+
} finally{
|
|
2188
|
+
for (const L of R)try {
|
|
2189
|
+
L.terminate();
|
|
2190
|
+
} catch {}
|
|
2191
|
+
try {
|
|
2192
|
+
Z.terminate();
|
|
2193
|
+
} catch {}
|
|
2110
2194
|
}
|
|
2111
|
-
const gt = t.getFinalCoordinateInfo();
|
|
2112
|
-
yield {
|
|
2113
|
-
type: "complete",
|
|
2114
|
-
totalMeshes: T,
|
|
2115
|
-
coordinateInfo: gt
|
|
2116
|
-
};
|
|
2117
2195
|
}
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2196
|
+
const zn = .001;
|
|
2197
|
+
let Tt = null;
|
|
2198
|
+
function Hn(r) {
|
|
2199
|
+
if (Tt) throw new Error(`GeometryProcessor ${r} cannot start while ${Tt} is still running. Wait for the active stream to finish, or cancel it before starting another geometry operation.`);
|
|
2200
|
+
return Tt = r, ()=>{
|
|
2201
|
+
Tt === r && (Tt = null);
|
|
2123
2202
|
};
|
|
2124
2203
|
}
|
|
2125
|
-
|
|
2204
|
+
us = class {
|
|
2126
2205
|
static largeFileByteStreamingThreshold = 256 * 1024 * 1024;
|
|
2127
2206
|
bridge = null;
|
|
2128
2207
|
platformBridge = null;
|
|
@@ -2132,10 +2211,10 @@ let __tla = Promise.all([
|
|
|
2132
2211
|
lastNativeStats = null;
|
|
2133
2212
|
mergeLayers;
|
|
2134
2213
|
constructor(t = {}){
|
|
2135
|
-
this.bufferBuilder = new
|
|
2214
|
+
this.bufferBuilder = new bn, this.coordinateHandler = new Cn, this.isNative = t.preferNative !== !1 && Ve(), this.mergeLayers = t.mergeLayers === !0, t.quality, this.isNative || (this.bridge = new mn, this.bridge.setMergeLayers(this.mergeLayers));
|
|
2136
2215
|
}
|
|
2137
2216
|
async init() {
|
|
2138
|
-
this.isNative ? (this.platformBridge = await
|
|
2217
|
+
this.isNative ? (this.platformBridge = await En(), await this.platformBridge.init(), console.log("[GeometryProcessor] Native bridge initialized")) : this.bridge && await this.bridge.init();
|
|
2139
2218
|
}
|
|
2140
2219
|
async process(t, e) {
|
|
2141
2220
|
let n;
|
|
@@ -2144,15 +2223,15 @@ let __tla = Promise.all([
|
|
|
2144
2223
|
this.bridge?.isInitialized() || await this.init();
|
|
2145
2224
|
const c = await this.collectMeshesMainThread(t);
|
|
2146
2225
|
n = c.meshes;
|
|
2147
|
-
const l = this.coordinateHandler.processMeshes(n), d = c.buildingRotation,
|
|
2226
|
+
const l = this.coordinateHandler.processMeshes(n), d = c.buildingRotation, f = {
|
|
2148
2227
|
...l,
|
|
2149
2228
|
buildingRotation: d
|
|
2150
|
-
},
|
|
2229
|
+
}, u = this.bufferBuilder.processMeshes(n);
|
|
2151
2230
|
return {
|
|
2152
|
-
meshes:
|
|
2153
|
-
totalTriangles:
|
|
2154
|
-
totalVertices:
|
|
2155
|
-
coordinateInfo:
|
|
2231
|
+
meshes: u.meshes,
|
|
2232
|
+
totalTriangles: u.totalTriangles,
|
|
2233
|
+
totalVertices: u.totalVertices,
|
|
2234
|
+
coordinateInfo: f
|
|
2156
2235
|
};
|
|
2157
2236
|
}
|
|
2158
2237
|
const s = this.coordinateHandler.processMeshes(n), i = this.bufferBuilder.processMeshes(n);
|
|
@@ -2189,7 +2268,7 @@ let __tla = Promise.all([
|
|
|
2189
2268
|
const s = [], i = n.totalJobs ?? 0;
|
|
2190
2269
|
if (n.jobs && i > 0) {
|
|
2191
2270
|
const o = e.processGeometryBatch(t, n.jobs, n.unitScale, n.rtcOffset?.[0] ?? 0, n.rtcOffset?.[1] ?? 0, n.rtcOffset?.[2] ?? 0, n.needsShift, n.voidKeys, n.voidCounts, n.voidValues, n.styleIds, n.styleColors);
|
|
2192
|
-
s.push(...
|
|
2271
|
+
s.push(...Re(o));
|
|
2193
2272
|
}
|
|
2194
2273
|
return {
|
|
2195
2274
|
meshes: s,
|
|
@@ -2228,10 +2307,10 @@ let __tla = Promise.all([
|
|
|
2228
2307
|
};
|
|
2229
2308
|
return;
|
|
2230
2309
|
}
|
|
2231
|
-
const o =
|
|
2310
|
+
const o = Bn(t, e), l = Math.max(o, Math.ceil(s.totalJobs / 30));
|
|
2232
2311
|
let d = 0;
|
|
2233
|
-
for(let
|
|
2234
|
-
const p = Math.min(
|
|
2312
|
+
for(let u = 0; u < s.totalJobs; u += l){
|
|
2313
|
+
const p = Math.min(u + l, s.totalJobs), I = s.jobs.slice(u * 3, p * 3), h = n.processGeometryBatch(t, I, s.unitScale, s.rtcOffset?.[0] ?? 0, s.rtcOffset?.[1] ?? 0, s.rtcOffset?.[2] ?? 0, s.needsShift, s.voidKeys, s.voidCounts, s.voidValues, s.styleIds, s.styleColors), y = Re(h);
|
|
2235
2314
|
if (y.length === 0) {
|
|
2236
2315
|
await new Promise((T)=>setTimeout(T, 0));
|
|
2237
2316
|
continue;
|
|
@@ -2245,18 +2324,18 @@ let __tla = Promise.all([
|
|
|
2245
2324
|
coordinateInfo: C || void 0
|
|
2246
2325
|
}, await new Promise((T)=>setTimeout(T, 0));
|
|
2247
2326
|
}
|
|
2248
|
-
const
|
|
2327
|
+
const f = Wt(this.coordinateHandler.getFinalCoordinateInfo(), i);
|
|
2249
2328
|
yield {
|
|
2250
2329
|
type: "complete",
|
|
2251
2330
|
totalMeshes: d,
|
|
2252
|
-
coordinateInfo:
|
|
2331
|
+
coordinateInfo: f
|
|
2253
2332
|
};
|
|
2254
2333
|
} finally{
|
|
2255
2334
|
n.clearPrePassCache?.();
|
|
2256
2335
|
}
|
|
2257
2336
|
}
|
|
2258
2337
|
async *processStreaming(t, e, n = 25, s) {
|
|
2259
|
-
const i = this.isNative ? null :
|
|
2338
|
+
const i = this.isNative ? null : Hn("processStreaming");
|
|
2260
2339
|
try {
|
|
2261
2340
|
yield* this.processStreamingUnlocked(t, e, n, s);
|
|
2262
2341
|
} finally{
|
|
@@ -2273,8 +2352,8 @@ let __tla = Promise.all([
|
|
|
2273
2352
|
modelID: 0
|
|
2274
2353
|
}, console.time("[GeometryProcessor] native-streaming");
|
|
2275
2354
|
const i = [];
|
|
2276
|
-
let o = null, c = !1, l = null, d,
|
|
2277
|
-
const
|
|
2355
|
+
let o = null, c = !1, l = null, d, f = 0;
|
|
2356
|
+
const u = ()=>{
|
|
2278
2357
|
o && (o(), o = null);
|
|
2279
2358
|
}, p = this.platformBridge.processGeometryStreaming(t, {
|
|
2280
2359
|
onBatch: (h)=>{
|
|
@@ -2282,52 +2361,57 @@ let __tla = Promise.all([
|
|
|
2282
2361
|
type: "batch",
|
|
2283
2362
|
meshes: h.meshes,
|
|
2284
2363
|
nativeTelemetry: h.nativeTelemetry
|
|
2285
|
-
}),
|
|
2364
|
+
}), u();
|
|
2286
2365
|
},
|
|
2287
2366
|
onColorUpdate: (h)=>{
|
|
2288
2367
|
i.push({
|
|
2289
2368
|
type: "colorUpdate",
|
|
2290
2369
|
updates: new Map(h)
|
|
2291
|
-
}),
|
|
2370
|
+
}), u();
|
|
2292
2371
|
},
|
|
2293
2372
|
onComplete: (h)=>{
|
|
2294
|
-
this.lastNativeStats = h, d = h.totalMeshes, c = !0,
|
|
2373
|
+
this.lastNativeStats = h, d = h.totalMeshes, c = !0, u();
|
|
2295
2374
|
},
|
|
2296
2375
|
onError: (h)=>{
|
|
2297
|
-
l = h, c = !0,
|
|
2376
|
+
l = h, c = !0, u();
|
|
2298
2377
|
}
|
|
2299
2378
|
});
|
|
2300
|
-
|
|
2301
|
-
for(; i.length > 0;){
|
|
2302
|
-
|
|
2303
|
-
|
|
2379
|
+
try {
|
|
2380
|
+
for(; !c || i.length > 0;){
|
|
2381
|
+
for(; i.length > 0;){
|
|
2382
|
+
const h = i.shift();
|
|
2383
|
+
if (h.type === "colorUpdate") {
|
|
2384
|
+
yield {
|
|
2385
|
+
type: "colorUpdate",
|
|
2386
|
+
updates: h.updates
|
|
2387
|
+
};
|
|
2388
|
+
continue;
|
|
2389
|
+
}
|
|
2390
|
+
this.coordinateHandler.processMeshesIncremental(h.meshes), f += h.meshes.length;
|
|
2391
|
+
const y = this.coordinateHandler.getCurrentCoordinateInfo();
|
|
2304
2392
|
yield {
|
|
2305
|
-
type: "
|
|
2306
|
-
|
|
2393
|
+
type: "batch",
|
|
2394
|
+
meshes: h.meshes,
|
|
2395
|
+
totalSoFar: f,
|
|
2396
|
+
coordinateInfo: y || void 0,
|
|
2397
|
+
nativeTelemetry: h.nativeTelemetry
|
|
2307
2398
|
};
|
|
2308
|
-
continue;
|
|
2309
2399
|
}
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
meshes: h.meshes,
|
|
2315
|
-
totalSoFar: u,
|
|
2316
|
-
coordinateInfo: y || void 0,
|
|
2317
|
-
nativeTelemetry: h.nativeTelemetry
|
|
2318
|
-
};
|
|
2400
|
+
if (l) throw l;
|
|
2401
|
+
c || await new Promise((h)=>{
|
|
2402
|
+
o = h;
|
|
2403
|
+
});
|
|
2319
2404
|
}
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
}
|
|
2405
|
+
} finally{
|
|
2406
|
+
try {
|
|
2407
|
+
await p;
|
|
2408
|
+
} catch {}
|
|
2324
2409
|
}
|
|
2325
|
-
|
|
2326
|
-
const g = this.coordinateHandler.getFinalCoordinateInfo();
|
|
2410
|
+
const I = this.coordinateHandler.getFinalCoordinateInfo();
|
|
2327
2411
|
yield {
|
|
2328
2412
|
type: "complete",
|
|
2329
|
-
totalMeshes: d ??
|
|
2330
|
-
coordinateInfo:
|
|
2413
|
+
totalMeshes: d ?? f,
|
|
2414
|
+
coordinateInfo: I
|
|
2331
2415
|
}, console.timeEnd("[GeometryProcessor] native-streaming");
|
|
2332
2416
|
} else {
|
|
2333
2417
|
if (!this.bridge) throw new Error("WASM bridge not initialized");
|
|
@@ -2337,21 +2421,22 @@ let __tla = Promise.all([
|
|
|
2337
2421
|
async *processStreamingPath(t, e = 0, n) {
|
|
2338
2422
|
if (!this.isNative) throw new Error("File-path geometry streaming is only available in native desktop builds");
|
|
2339
2423
|
if (this.platformBridge || await this.init(), !this.platformBridge?.processGeometryStreamingPath) throw new Error("Native platform bridge does not support file-path streaming");
|
|
2340
|
-
yield*
|
|
2424
|
+
yield* Ae((s)=>this.platformBridge.processGeometryStreamingPath(t, s, n), e > 0 ? e / 1e3 : 0, this.coordinateHandler, (s)=>{
|
|
2341
2425
|
this.lastNativeStats = s;
|
|
2342
2426
|
});
|
|
2343
2427
|
}
|
|
2344
2428
|
async *processStreamingCache(t) {
|
|
2345
2429
|
if (!this.isNative) throw new Error("Native cached geometry streaming is only available in native desktop builds");
|
|
2346
2430
|
if (this.platformBridge || await this.init(), !this.platformBridge?.processGeometryStreamingCache) throw new Error("Native platform bridge does not support cached geometry streaming");
|
|
2347
|
-
yield*
|
|
2431
|
+
yield* Ae((e)=>this.platformBridge.processGeometryStreamingCache(t, e), 0, this.coordinateHandler, (e)=>{
|
|
2348
2432
|
this.lastNativeStats = e;
|
|
2349
2433
|
});
|
|
2350
2434
|
}
|
|
2351
2435
|
async *processParallel(t, e, n, s, i) {
|
|
2352
|
-
this.bridge?.isInitialized() || await this.init(), yield*
|
|
2436
|
+
this.bridge?.isInitialized() || await this.init(), yield* Vn(t, this.coordinateHandler, e, n, {
|
|
2353
2437
|
onEntityIndex: s,
|
|
2354
2438
|
mergeLayers: this.mergeLayers,
|
|
2439
|
+
geometryHashTolerance: this.bridge?.getComputeGeometryHashes() ?? null,
|
|
2355
2440
|
wasmUrls: i
|
|
2356
2441
|
});
|
|
2357
2442
|
}
|
|
@@ -2385,6 +2470,9 @@ let __tla = Promise.all([
|
|
|
2385
2470
|
};
|
|
2386
2471
|
} else typeof SharedArrayBuffer < "u" && typeof Worker < "u" && typeof navigator < "u" && (navigator.hardwareConcurrency ?? 1) > 1 ? yield* this.processParallel(t, e.sharedRtcOffset, e.existingSab, e.onEntityIndex, e.wasmUrls) : yield* this.processStreaming(t, e.entityIndex, s, e.sharedRtcOffset);
|
|
2387
2472
|
}
|
|
2473
|
+
enableGeometryHashes(t = zn) {
|
|
2474
|
+
this.bridge?.setComputeGeometryHashes(t);
|
|
2475
|
+
}
|
|
2388
2476
|
getApi() {
|
|
2389
2477
|
return !this.bridge || !this.bridge.isInitialized() ? null : this.bridge.getApi();
|
|
2390
2478
|
}
|
|
@@ -2393,22 +2481,22 @@ let __tla = Promise.all([
|
|
|
2393
2481
|
}
|
|
2394
2482
|
parseSymbolicRepresentations(t) {
|
|
2395
2483
|
if (!this.bridge || !this.bridge.isInitialized()) return null;
|
|
2396
|
-
const e =
|
|
2484
|
+
const e = it(t);
|
|
2397
2485
|
return this.bridge.parseSymbolicRepresentations(e);
|
|
2398
2486
|
}
|
|
2399
2487
|
parseAlignmentLines(t) {
|
|
2400
2488
|
if (!this.bridge || !this.bridge.isInitialized()) return null;
|
|
2401
|
-
const e =
|
|
2489
|
+
const e = it(t);
|
|
2402
2490
|
return this.bridge.parseAlignmentLines(e);
|
|
2403
2491
|
}
|
|
2404
2492
|
parseGridLines(t) {
|
|
2405
2493
|
if (!this.bridge || !this.bridge.isInitialized()) return null;
|
|
2406
|
-
const e =
|
|
2494
|
+
const e = it(t);
|
|
2407
2495
|
return this.bridge.parseGridLines(e);
|
|
2408
2496
|
}
|
|
2409
2497
|
parseGridAxes(t) {
|
|
2410
2498
|
if (!this.bridge || !this.bridge.isInitialized()) return null;
|
|
2411
|
-
const e =
|
|
2499
|
+
const e = it(t), n = this.bridge.parseGridAxes(e);
|
|
2412
2500
|
try {
|
|
2413
2501
|
const s = [];
|
|
2414
2502
|
for(let i = 0; i < n.length; i++){
|
|
@@ -2441,12 +2529,12 @@ let __tla = Promise.all([
|
|
|
2441
2529
|
}
|
|
2442
2530
|
extractProfiles(t, e = 0) {
|
|
2443
2531
|
if (!this.bridge || !this.bridge.isInitialized()) return null;
|
|
2444
|
-
const n =
|
|
2532
|
+
const n = it(t);
|
|
2445
2533
|
return this.bridge.extractProfiles(n, e);
|
|
2446
2534
|
}
|
|
2447
2535
|
dispose() {}
|
|
2448
2536
|
};
|
|
2449
|
-
|
|
2537
|
+
hs = class {
|
|
2450
2538
|
geometryResult;
|
|
2451
2539
|
constructor(t){
|
|
2452
2540
|
this.geometryResult = t;
|
|
@@ -2463,7 +2551,7 @@ let __tla = Promise.all([
|
|
|
2463
2551
|
};
|
|
2464
2552
|
}
|
|
2465
2553
|
buildGLTF(t) {
|
|
2466
|
-
const e = this.geometryResult.meshes, n = t.colorSource ?? "rendering", s = t.visibleOnly === !0, i = t.hiddenEntityIds ?? null, o = t.isolatedEntityIds ?? null, c = o !== null && o.size > 0, l = t.hiddenIfcTypes ?? null, d = (
|
|
2554
|
+
const e = this.geometryResult.meshes, n = t.colorSource ?? "rendering", s = t.visibleOnly === !0, i = t.hiddenEntityIds ?? null, o = t.isolatedEntityIds ?? null, c = o !== null && o.size > 0, l = t.hiddenIfcTypes ?? null, d = (g)=>s ? !(l && g.ifcType && l.has(g.ifcType) || c && !o.has(g.expressId) || i && i.has(g.expressId)) : !0, f = (g)=>n === "shading" ? g.shadingColor ?? g.color : g.color, u = {
|
|
2467
2555
|
asset: {
|
|
2468
2556
|
version: "2.0",
|
|
2469
2557
|
generator: "IFC-Lite"
|
|
@@ -2484,23 +2572,23 @@ let __tla = Promise.all([
|
|
|
2484
2572
|
}
|
|
2485
2573
|
]
|
|
2486
2574
|
};
|
|
2487
|
-
t.includeMetadata && (
|
|
2575
|
+
t.includeMetadata && (u.asset.extras = {
|
|
2488
2576
|
meshCount: e.length,
|
|
2489
2577
|
vertexCount: this.geometryResult.totalVertices,
|
|
2490
2578
|
triangleCount: this.geometryResult.totalTriangles
|
|
2491
2579
|
});
|
|
2492
|
-
const p = new Map,
|
|
2493
|
-
function h(
|
|
2494
|
-
const R = `${Math.round(
|
|
2580
|
+
const p = new Map, I = [];
|
|
2581
|
+
function h(g) {
|
|
2582
|
+
const R = `${Math.round(g[0] * 100)},${Math.round(g[1] * 100)},${Math.round(g[2] * 100)},${Math.round(g[3] * 100)}`, N = p.get(R);
|
|
2495
2583
|
if (N !== void 0) return N;
|
|
2496
|
-
const
|
|
2497
|
-
return
|
|
2584
|
+
const $ = I.length;
|
|
2585
|
+
return I.push({
|
|
2498
2586
|
pbrMetallicRoughness: {
|
|
2499
2587
|
baseColorFactor: [
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2588
|
+
g[0],
|
|
2589
|
+
g[1],
|
|
2590
|
+
g[2],
|
|
2591
|
+
g[3]
|
|
2504
2592
|
],
|
|
2505
2593
|
metallicFactor: 0,
|
|
2506
2594
|
roughnessFactor: 1
|
|
@@ -2508,146 +2596,146 @@ let __tla = Promise.all([
|
|
|
2508
2596
|
extensions: {
|
|
2509
2597
|
KHR_materials_unlit: {}
|
|
2510
2598
|
},
|
|
2511
|
-
...
|
|
2599
|
+
...g[3] < 1 ? {
|
|
2512
2600
|
alphaMode: "BLEND"
|
|
2513
2601
|
} : {}
|
|
2514
|
-
}), p.set(R,
|
|
2602
|
+
}), p.set(R, $), $;
|
|
2515
2603
|
}
|
|
2516
2604
|
const y = [];
|
|
2517
2605
|
let E = 0, C = 0, T = 0;
|
|
2518
|
-
for(let
|
|
2519
|
-
const R = e[
|
|
2606
|
+
for(let g = 0; g < e.length; g++){
|
|
2607
|
+
const R = e[g];
|
|
2520
2608
|
if (!d(R)) continue;
|
|
2521
|
-
const N = R.positions,
|
|
2522
|
-
if (!N.length ||
|
|
2523
|
-
let
|
|
2524
|
-
for(let
|
|
2525
|
-
const
|
|
2526
|
-
|
|
2609
|
+
const N = R.positions, $ = R.normals, V = R.indices;
|
|
2610
|
+
if (!N.length || !$.length || !V.length || N.length % 3 !== 0 || $.length % 3 !== 0 || N.length !== $.length) continue;
|
|
2611
|
+
let z = N[0], Y = N[1], H = N[2], Q = N[0], Z = N[1], L = N[2];
|
|
2612
|
+
for(let X = 3; X < N.length; X += 3){
|
|
2613
|
+
const U = N[X], q = N[X + 1], M = N[X + 2];
|
|
2614
|
+
U < z && (z = U), U > Q && (Q = U), q < Y && (Y = q), q > Z && (Z = q), M < H && (H = M), M > L && (L = M);
|
|
2527
2615
|
}
|
|
2528
|
-
const
|
|
2616
|
+
const W = f(R);
|
|
2529
2617
|
y.push({
|
|
2530
|
-
meshIndex:
|
|
2618
|
+
meshIndex: g,
|
|
2531
2619
|
posCount: N.length,
|
|
2532
|
-
normCount:
|
|
2533
|
-
idxCount:
|
|
2620
|
+
normCount: $.length,
|
|
2621
|
+
idxCount: V.length,
|
|
2534
2622
|
posByteOffset: E * 4,
|
|
2535
2623
|
normByteOffset: C * 4,
|
|
2536
2624
|
idxByteOffset: T * 4,
|
|
2537
2625
|
bounds: {
|
|
2538
2626
|
min: [
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2627
|
+
z,
|
|
2628
|
+
Y,
|
|
2629
|
+
H
|
|
2542
2630
|
],
|
|
2543
2631
|
max: [
|
|
2544
2632
|
Q,
|
|
2545
|
-
|
|
2546
|
-
|
|
2633
|
+
Z,
|
|
2634
|
+
L
|
|
2547
2635
|
]
|
|
2548
2636
|
},
|
|
2549
|
-
materialIdx:
|
|
2550
|
-
}), E += N.length, C +=
|
|
2637
|
+
materialIdx: W ? h(W) : void 0
|
|
2638
|
+
}), E += N.length, C += $.length, T += V.length;
|
|
2551
2639
|
}
|
|
2552
2640
|
if (E === 0 || C === 0 || T === 0) throw new Error("Cannot export GLB: no valid geometry data found");
|
|
2553
|
-
const
|
|
2554
|
-
let O = 0,
|
|
2641
|
+
const G = new Float32Array(E), x = new Float32Array(C), k = new Uint32Array(T);
|
|
2642
|
+
let O = 0, D = 0, b = 0;
|
|
2555
2643
|
const S = [];
|
|
2556
|
-
for (const
|
|
2557
|
-
const R = e[
|
|
2558
|
-
|
|
2559
|
-
const N =
|
|
2560
|
-
|
|
2644
|
+
for (const g of y){
|
|
2645
|
+
const R = e[g.meshIndex];
|
|
2646
|
+
G.set(R.positions, O), x.set(R.normals, D), k.set(R.indices, b), O += g.posCount, D += g.normCount, b += g.idxCount;
|
|
2647
|
+
const N = u.accessors.length;
|
|
2648
|
+
u.accessors.push({
|
|
2561
2649
|
bufferView: 0,
|
|
2562
|
-
byteOffset:
|
|
2650
|
+
byteOffset: g.posByteOffset,
|
|
2563
2651
|
componentType: 5126,
|
|
2564
|
-
count:
|
|
2652
|
+
count: g.posCount / 3,
|
|
2565
2653
|
type: "VEC3",
|
|
2566
|
-
min:
|
|
2567
|
-
max:
|
|
2654
|
+
min: g.bounds.min,
|
|
2655
|
+
max: g.bounds.max
|
|
2568
2656
|
});
|
|
2569
|
-
const
|
|
2570
|
-
|
|
2657
|
+
const $ = u.accessors.length;
|
|
2658
|
+
u.accessors.push({
|
|
2571
2659
|
bufferView: 1,
|
|
2572
|
-
byteOffset:
|
|
2660
|
+
byteOffset: g.normByteOffset,
|
|
2573
2661
|
componentType: 5126,
|
|
2574
|
-
count:
|
|
2662
|
+
count: g.normCount / 3,
|
|
2575
2663
|
type: "VEC3"
|
|
2576
2664
|
});
|
|
2577
|
-
const
|
|
2578
|
-
|
|
2665
|
+
const V = u.accessors.length;
|
|
2666
|
+
u.accessors.push({
|
|
2579
2667
|
bufferView: 2,
|
|
2580
|
-
byteOffset:
|
|
2668
|
+
byteOffset: g.idxByteOffset,
|
|
2581
2669
|
componentType: 5125,
|
|
2582
|
-
count:
|
|
2670
|
+
count: g.idxCount,
|
|
2583
2671
|
type: "SCALAR"
|
|
2584
2672
|
});
|
|
2585
|
-
const
|
|
2586
|
-
|
|
2673
|
+
const z = u.meshes.length;
|
|
2674
|
+
u.meshes.push({
|
|
2587
2675
|
primitives: [
|
|
2588
2676
|
{
|
|
2589
2677
|
attributes: {
|
|
2590
2678
|
POSITION: N,
|
|
2591
|
-
NORMAL:
|
|
2679
|
+
NORMAL: $
|
|
2592
2680
|
},
|
|
2593
|
-
indices:
|
|
2594
|
-
...
|
|
2595
|
-
material:
|
|
2681
|
+
indices: V,
|
|
2682
|
+
...g.materialIdx !== void 0 ? {
|
|
2683
|
+
material: g.materialIdx
|
|
2596
2684
|
} : {}
|
|
2597
2685
|
}
|
|
2598
2686
|
]
|
|
2599
2687
|
});
|
|
2600
|
-
const
|
|
2601
|
-
mesh:
|
|
2688
|
+
const Y = u.nodes.length, H = {
|
|
2689
|
+
mesh: z
|
|
2602
2690
|
};
|
|
2603
|
-
t.includeMetadata && R.expressId !== void 0 && (
|
|
2691
|
+
t.includeMetadata && R.expressId !== void 0 && (H.extras = R.modelIndex !== void 0 ? {
|
|
2604
2692
|
expressId: R.expressId,
|
|
2605
2693
|
modelIndex: R.modelIndex
|
|
2606
2694
|
} : {
|
|
2607
2695
|
expressId: R.expressId
|
|
2608
|
-
}),
|
|
2696
|
+
}), u.nodes.push(H), S.push(Y);
|
|
2609
2697
|
}
|
|
2610
|
-
|
|
2698
|
+
u.scenes[0].nodes = S, I.length > 0 && (u.materials = I, u.extensionsUsed = [
|
|
2611
2699
|
"KHR_materials_unlit"
|
|
2612
2700
|
]);
|
|
2613
|
-
const F =
|
|
2614
|
-
|
|
2701
|
+
const F = G.buffer, m = x.buffer, _ = k.buffer, w = F.byteLength + m.byteLength + _.byteLength;
|
|
2702
|
+
u.bufferViews.push({
|
|
2615
2703
|
buffer: 0,
|
|
2616
2704
|
byteOffset: 0,
|
|
2617
2705
|
byteLength: F.byteLength,
|
|
2618
2706
|
byteStride: 12,
|
|
2619
2707
|
target: 34962
|
|
2620
|
-
}),
|
|
2708
|
+
}), u.bufferViews.push({
|
|
2621
2709
|
buffer: 0,
|
|
2622
2710
|
byteOffset: F.byteLength,
|
|
2623
2711
|
byteLength: m.byteLength,
|
|
2624
2712
|
byteStride: 12,
|
|
2625
2713
|
target: 34962
|
|
2626
|
-
}),
|
|
2714
|
+
}), u.bufferViews.push({
|
|
2627
2715
|
buffer: 0,
|
|
2628
2716
|
byteOffset: F.byteLength + m.byteLength,
|
|
2629
2717
|
byteLength: _.byteLength,
|
|
2630
2718
|
target: 34963
|
|
2631
|
-
}),
|
|
2632
|
-
for (const
|
|
2633
|
-
const R =
|
|
2634
|
-
if (!R) throw new Error(`Accessor references invalid bufferView ${
|
|
2719
|
+
}), u.buffers[0].byteLength = w;
|
|
2720
|
+
for (const g of u.accessors){
|
|
2721
|
+
const R = u.bufferViews[g.bufferView];
|
|
2722
|
+
if (!R) throw new Error(`Accessor references invalid bufferView ${g.bufferView}`);
|
|
2635
2723
|
let N = 0;
|
|
2636
|
-
if (
|
|
2637
|
-
else if (
|
|
2638
|
-
else if (
|
|
2639
|
-
else if (
|
|
2640
|
-
else throw new Error(`Unsupported component type: ${
|
|
2641
|
-
let
|
|
2642
|
-
if (
|
|
2643
|
-
else if (
|
|
2644
|
-
else if (
|
|
2645
|
-
else throw new Error(`Unsupported accessor type: ${
|
|
2646
|
-
const
|
|
2647
|
-
if (
|
|
2724
|
+
if (g.componentType === 5126) N = 4;
|
|
2725
|
+
else if (g.componentType === 5125) N = 4;
|
|
2726
|
+
else if (g.componentType === 5123) N = 2;
|
|
2727
|
+
else if (g.componentType === 5120) N = 1;
|
|
2728
|
+
else throw new Error(`Unsupported component type: ${g.componentType}`);
|
|
2729
|
+
let $ = 1;
|
|
2730
|
+
if (g.type === "VEC3") $ = 3;
|
|
2731
|
+
else if (g.type === "VEC2") $ = 2;
|
|
2732
|
+
else if (g.type === "SCALAR") $ = 1;
|
|
2733
|
+
else throw new Error(`Unsupported accessor type: ${g.type}`);
|
|
2734
|
+
const V = g.count * $ * N, z = (g.byteOffset || 0) + V;
|
|
2735
|
+
if (z > R.byteLength) throw new Error(`Accessor exceeds bufferView bounds: accessor byteOffset=${g.byteOffset || 0}, length=${V}, bufferView byteLength=${R.byteLength}, end=${z}`);
|
|
2648
2736
|
}
|
|
2649
2737
|
return {
|
|
2650
|
-
json:
|
|
2738
|
+
json: u,
|
|
2651
2739
|
buffers: [
|
|
2652
2740
|
new Uint8Array(F),
|
|
2653
2741
|
new Uint8Array(m),
|
|
@@ -2662,14 +2750,14 @@ let __tla = Promise.all([
|
|
|
2662
2750
|
return n;
|
|
2663
2751
|
}
|
|
2664
2752
|
packGLB(t, e) {
|
|
2665
|
-
const n = JSON.stringify(t), s = new TextEncoder().encode(n), i = (4 - s.byteLength % 4) % 4, o = s.byteLength + i, c = this.combineBuffers(e), l = (4 - c.byteLength % 4) % 4, d = c.byteLength + l,
|
|
2753
|
+
const n = JSON.stringify(t), s = new TextEncoder().encode(n), i = (4 - s.byteLength % 4) % 4, o = s.byteLength + i, c = this.combineBuffers(e), l = (4 - c.byteLength % 4) % 4, d = c.byteLength + l, f = 20 + o + 8 + d, u = new ArrayBuffer(f), p = new DataView(u), I = new Uint8Array(u);
|
|
2666
2754
|
let h = 0;
|
|
2667
|
-
p.setUint32(h, 1179937895, !0), h += 4, p.setUint32(h, 2, !0), h += 4, p.setUint32(h,
|
|
2668
|
-
for(let y = 0; y < i; y++)
|
|
2669
|
-
return p.setUint32(h, d, !0), h += 4, p.setUint32(h, 5130562, !0), h += 4,
|
|
2755
|
+
p.setUint32(h, 1179937895, !0), h += 4, p.setUint32(h, 2, !0), h += 4, p.setUint32(h, f, !0), h += 4, p.setUint32(h, o, !0), h += 4, p.setUint32(h, 1313821514, !0), h += 4, I.set(s, h), h += s.byteLength;
|
|
2756
|
+
for(let y = 0; y < i; y++)I[h++] = 32;
|
|
2757
|
+
return p.setUint32(h, d, !0), h += 4, p.setUint32(h, 5130562, !0), h += 4, I.set(c, h), new Uint8Array(u);
|
|
2670
2758
|
}
|
|
2671
2759
|
};
|
|
2672
|
-
|
|
2760
|
+
ps = class {
|
|
2673
2761
|
store;
|
|
2674
2762
|
constructor(t){
|
|
2675
2763
|
this.store = t;
|
|
@@ -2691,42 +2779,42 @@ let __tla = Promise.all([
|
|
|
2691
2779
|
"hasGeometry"
|
|
2692
2780
|
], c = new Map;
|
|
2693
2781
|
if (s && i) {
|
|
2694
|
-
const
|
|
2695
|
-
for (const
|
|
2696
|
-
const p = this.getPropertiesForEntity(
|
|
2697
|
-
for (const
|
|
2698
|
-
c.has(
|
|
2699
|
-
for (const h of
|
|
2782
|
+
const f = t ?? this.getAllEntityIds();
|
|
2783
|
+
for (const u of f){
|
|
2784
|
+
const p = this.getPropertiesForEntity(u);
|
|
2785
|
+
for (const I of p){
|
|
2786
|
+
c.has(I.name) || c.set(I.name, new Set);
|
|
2787
|
+
for (const h of I.properties)c.get(I.name).add(h.name);
|
|
2700
2788
|
}
|
|
2701
2789
|
}
|
|
2702
|
-
for (const [
|
|
2790
|
+
for (const [u, p] of c)for (const I of p)o.push(`${u}_${I}`);
|
|
2703
2791
|
}
|
|
2704
2792
|
const l = [
|
|
2705
|
-
this.joinRow(o.map((
|
|
2793
|
+
this.joinRow(o.map((f)=>this.escapeValue(f)), n)
|
|
2706
2794
|
], d = t ?? this.getAllEntityIds();
|
|
2707
|
-
for (const
|
|
2708
|
-
const
|
|
2709
|
-
this.escapeValue(
|
|
2710
|
-
this.escapeValue(this.store.entities.getGlobalId(
|
|
2711
|
-
this.escapeValue(this.store.entities.getName(
|
|
2712
|
-
this.escapeValue(this.store.entities.getTypeName(
|
|
2713
|
-
this.escapeValue(this.store.entities.getDescription(
|
|
2714
|
-
this.escapeValue(this.store.entities.getObjectType(
|
|
2715
|
-
this.escapeValue(this.store.entities.hasGeometry(
|
|
2795
|
+
for (const f of d){
|
|
2796
|
+
const u = [
|
|
2797
|
+
this.escapeValue(f),
|
|
2798
|
+
this.escapeValue(this.store.entities.getGlobalId(f) || ""),
|
|
2799
|
+
this.escapeValue(this.store.entities.getName(f) || ""),
|
|
2800
|
+
this.escapeValue(this.store.entities.getTypeName(f) || ""),
|
|
2801
|
+
this.escapeValue(this.store.entities.getDescription(f) || ""),
|
|
2802
|
+
this.escapeValue(this.store.entities.getObjectType(f) || ""),
|
|
2803
|
+
this.escapeValue(this.store.entities.hasGeometry(f) ? "true" : "false")
|
|
2716
2804
|
];
|
|
2717
2805
|
if (s && i) {
|
|
2718
|
-
const p = this.getPropertiesForEntity(
|
|
2806
|
+
const p = this.getPropertiesForEntity(f), I = new Map;
|
|
2719
2807
|
for (const h of p){
|
|
2720
2808
|
const y = new Map;
|
|
2721
2809
|
for (const E of h.properties)y.set(E.name, E.value);
|
|
2722
|
-
|
|
2810
|
+
I.set(h.name, y);
|
|
2723
2811
|
}
|
|
2724
2812
|
for (const [h, y] of c)for (const E of y){
|
|
2725
|
-
const C =
|
|
2726
|
-
|
|
2813
|
+
const C = I.get(h)?.get(E) ?? "";
|
|
2814
|
+
u.push(this.escapeValue(C));
|
|
2727
2815
|
}
|
|
2728
2816
|
}
|
|
2729
|
-
l.push(this.joinRow(
|
|
2817
|
+
l.push(this.joinRow(u, n));
|
|
2730
2818
|
}
|
|
2731
2819
|
return l.join(`
|
|
2732
2820
|
`);
|
|
@@ -2747,17 +2835,17 @@ let __tla = Promise.all([
|
|
|
2747
2835
|
for (const c of o){
|
|
2748
2836
|
const l = this.getPropertiesForEntity(c);
|
|
2749
2837
|
if (!l || l.length === 0) continue;
|
|
2750
|
-
const d = this.store.entities.getGlobalId(c) || "",
|
|
2751
|
-
for (const p of l)if (!(!p.properties || p.properties.length === 0)) for (const
|
|
2838
|
+
const d = this.store.entities.getGlobalId(c) || "", f = this.store.entities.getName(c) || "", u = this.store.entities.getTypeName(c) || "";
|
|
2839
|
+
for (const p of l)if (!(!p.properties || p.properties.length === 0)) for (const I of p.properties){
|
|
2752
2840
|
const h = [
|
|
2753
2841
|
this.escapeValue(c),
|
|
2754
2842
|
this.escapeValue(d),
|
|
2755
|
-
this.escapeValue(u),
|
|
2756
2843
|
this.escapeValue(f),
|
|
2844
|
+
this.escapeValue(u),
|
|
2757
2845
|
this.escapeValue(p.name || ""),
|
|
2758
|
-
this.escapeValue(
|
|
2759
|
-
this.escapeValue(
|
|
2760
|
-
this.escapeValue(
|
|
2846
|
+
this.escapeValue(I.name || ""),
|
|
2847
|
+
this.escapeValue(I.value),
|
|
2848
|
+
this.escapeValue(I.type ?? "")
|
|
2761
2849
|
];
|
|
2762
2850
|
i.push(this.joinRow(h, n));
|
|
2763
2851
|
}
|
|
@@ -2781,14 +2869,14 @@ let __tla = Promise.all([
|
|
|
2781
2869
|
for (const l of c){
|
|
2782
2870
|
const d = this.getQuantitiesForEntity(l);
|
|
2783
2871
|
if (!d || d.length === 0) continue;
|
|
2784
|
-
const
|
|
2785
|
-
for (const
|
|
2872
|
+
const f = this.store.entities.getGlobalId(l) || "", u = this.store.entities.getName(l) || "", p = this.store.entities.getTypeName(l) || "";
|
|
2873
|
+
for (const I of d)if (!(!I.quantities || I.quantities.length === 0)) for (const h of I.quantities){
|
|
2786
2874
|
const y = [
|
|
2787
2875
|
this.escapeValue(l),
|
|
2788
|
-
this.escapeValue(u),
|
|
2789
2876
|
this.escapeValue(f),
|
|
2877
|
+
this.escapeValue(u),
|
|
2790
2878
|
this.escapeValue(p),
|
|
2791
|
-
this.escapeValue(
|
|
2879
|
+
this.escapeValue(I.name || ""),
|
|
2792
2880
|
this.escapeValue(h.name || ""),
|
|
2793
2881
|
this.escapeValue(h.value),
|
|
2794
2882
|
this.escapeValue(h.type ?? "")
|
|
@@ -2812,7 +2900,7 @@ let __tla = Promise.all([
|
|
|
2812
2900
|
], i = this.store.spatialHierarchy;
|
|
2813
2901
|
if (!i?.project) return s[0];
|
|
2814
2902
|
const o = (c, l, d)=>{
|
|
2815
|
-
const
|
|
2903
|
+
const f = [
|
|
2816
2904
|
this.escapeValue(c.expressId),
|
|
2817
2905
|
this.escapeValue(this.store.entities.getGlobalId(c.expressId) || ""),
|
|
2818
2906
|
this.escapeValue(c.name || ""),
|
|
@@ -2820,7 +2908,7 @@ let __tla = Promise.all([
|
|
|
2820
2908
|
this.escapeValue(l ?? ""),
|
|
2821
2909
|
this.escapeValue(d)
|
|
2822
2910
|
];
|
|
2823
|
-
if (s.push(this.joinRow(
|
|
2911
|
+
if (s.push(this.joinRow(f, e)), c.children) for (const u of c.children)o(u, c.expressId, d + 1);
|
|
2824
2912
|
};
|
|
2825
2913
|
return o(i.project, null, 0), s.join(`
|
|
2826
2914
|
`);
|
|
@@ -2832,15 +2920,15 @@ let __tla = Promise.all([
|
|
|
2832
2920
|
}
|
|
2833
2921
|
escapeValue(t) {
|
|
2834
2922
|
if (t == null) return "";
|
|
2835
|
-
|
|
2836
|
-
return e.includes(",") || e.includes('"') || e.includes(`
|
|
2923
|
+
let e = String(t);
|
|
2924
|
+
return /^[=+\-@\t\r]/.test(e) && (e = `'${e}`), e.includes(",") || e.includes('"') || e.includes(`
|
|
2837
2925
|
`) || e.includes("\r") ? `"${e.replace(/"/g, '""')}"` : e;
|
|
2838
2926
|
}
|
|
2839
2927
|
joinRow(t, e) {
|
|
2840
2928
|
return t.join(e);
|
|
2841
2929
|
}
|
|
2842
2930
|
};
|
|
2843
|
-
const
|
|
2931
|
+
const Wn = 35, jt = 48, Oe = 57, jn = new Set([
|
|
2844
2932
|
"IFCOWNERHISTORY",
|
|
2845
2933
|
"IFCAPPLICATION",
|
|
2846
2934
|
"IFCPERSON",
|
|
@@ -2856,7 +2944,7 @@ let __tla = Promise.all([
|
|
|
2856
2944
|
"IFCMONETARYUNIT",
|
|
2857
2945
|
"IFCGEOMETRICREPRESENTATIONCONTEXT",
|
|
2858
2946
|
"IFCGEOMETRICREPRESENTATIONSUBCONTEXT"
|
|
2859
|
-
]),
|
|
2947
|
+
]), kn = new Set([
|
|
2860
2948
|
"IFCPROJECT",
|
|
2861
2949
|
"IFCSITE",
|
|
2862
2950
|
"IFCBUILDING",
|
|
@@ -2877,7 +2965,7 @@ let __tla = Promise.all([
|
|
|
2877
2965
|
"IFCSPATIALZONE",
|
|
2878
2966
|
"IFCEXTERNALSPATIALELEMENT",
|
|
2879
2967
|
"IFCEXTERNALSPATIALSTRUCTUREELEMENT"
|
|
2880
|
-
]),
|
|
2968
|
+
]), Yn = new Set([
|
|
2881
2969
|
"IFCBEAM",
|
|
2882
2970
|
"IFCBEAMSTANDARDCASE",
|
|
2883
2971
|
"IFCBUILDINGELEMENT",
|
|
@@ -3085,45 +3173,45 @@ let __tla = Promise.all([
|
|
|
3085
3173
|
"IFCSTRUCTURALSURFACEMEMBERVARYING",
|
|
3086
3174
|
"IFCSTRUCTURALSURFACEREACTION"
|
|
3087
3175
|
]);
|
|
3088
|
-
function
|
|
3176
|
+
function Xt(r, t, e, n) {
|
|
3089
3177
|
const s = t + e;
|
|
3090
3178
|
let i = t;
|
|
3091
|
-
for(; i < s;)if (r[i] ===
|
|
3092
|
-
if (i++, i < s && r[i] >= jt && r[i] <=
|
|
3179
|
+
for(; i < s;)if (r[i] === Wn) {
|
|
3180
|
+
if (i++, i < s && r[i] >= jt && r[i] <= Oe) {
|
|
3093
3181
|
let o = r[i] - jt;
|
|
3094
|
-
for(i++; i < s && r[i] >= jt && r[i] <=
|
|
3182
|
+
for(i++; i < s && r[i] >= jt && r[i] <= Oe;)o = o * 10 + (r[i] - jt), i++;
|
|
3095
3183
|
n.push(o);
|
|
3096
3184
|
}
|
|
3097
3185
|
} else i++;
|
|
3098
3186
|
}
|
|
3099
|
-
function
|
|
3187
|
+
function ce(r, t, e, n) {
|
|
3100
3188
|
const s = new Set, i = [];
|
|
3101
3189
|
for (const c of r)e.has(c) && !s.has(c) && (s.add(c), i.push(c));
|
|
3102
3190
|
const o = [];
|
|
3103
3191
|
for(; i.length > 0;){
|
|
3104
3192
|
const c = i.pop(), l = e.get(c);
|
|
3105
3193
|
if (l) {
|
|
3106
|
-
o.length = 0,
|
|
3194
|
+
o.length = 0, Xt(t, l.byteOffset, l.byteLength, o);
|
|
3107
3195
|
for(let d = 0; d < o.length; d++){
|
|
3108
|
-
const
|
|
3109
|
-
if (!s.has(
|
|
3110
|
-
if (n && n.has(
|
|
3111
|
-
s.add(
|
|
3196
|
+
const f = o[d];
|
|
3197
|
+
if (!s.has(f) && e.has(f)) {
|
|
3198
|
+
if (n && n.has(f)) continue;
|
|
3199
|
+
s.add(f), i.push(f);
|
|
3112
3200
|
}
|
|
3113
3201
|
}
|
|
3114
3202
|
}
|
|
3115
3203
|
}
|
|
3116
3204
|
return s;
|
|
3117
3205
|
}
|
|
3118
|
-
function
|
|
3206
|
+
function le(r, t, e) {
|
|
3119
3207
|
const n = new Set, s = new Set;
|
|
3120
3208
|
for (const [i, o] of r.entityIndex.byId){
|
|
3121
3209
|
const c = o.type.toUpperCase();
|
|
3122
|
-
if (
|
|
3210
|
+
if (jn.has(c)) {
|
|
3123
3211
|
n.add(i);
|
|
3124
3212
|
continue;
|
|
3125
3213
|
}
|
|
3126
|
-
if (
|
|
3214
|
+
if (kn.has(c)) {
|
|
3127
3215
|
n.add(i);
|
|
3128
3216
|
continue;
|
|
3129
3217
|
}
|
|
@@ -3131,7 +3219,7 @@ let __tla = Promise.all([
|
|
|
3131
3219
|
n.add(i);
|
|
3132
3220
|
continue;
|
|
3133
3221
|
}
|
|
3134
|
-
if (
|
|
3222
|
+
if (Yn.has(c)) {
|
|
3135
3223
|
const l = t.has(i), d = e !== null && !e.has(i);
|
|
3136
3224
|
l || d ? s.add(i) : n.add(i);
|
|
3137
3225
|
continue;
|
|
@@ -3145,12 +3233,12 @@ let __tla = Promise.all([
|
|
|
3145
3233
|
continue;
|
|
3146
3234
|
}
|
|
3147
3235
|
}
|
|
3148
|
-
return
|
|
3236
|
+
return Xn(r, n, s), {
|
|
3149
3237
|
roots: n,
|
|
3150
3238
|
hiddenProductIds: s
|
|
3151
3239
|
};
|
|
3152
3240
|
}
|
|
3153
|
-
function
|
|
3241
|
+
function Xn(r, t, e) {
|
|
3154
3242
|
const n = r.source;
|
|
3155
3243
|
if (!n) return;
|
|
3156
3244
|
const s = r.entityIndex.byType.get("IFCRELVOIDSELEMENT") ?? [];
|
|
@@ -3162,12 +3250,12 @@ let __tla = Promise.all([
|
|
|
3162
3250
|
let l = c.byteOffset;
|
|
3163
3251
|
const d = c.byteOffset + c.byteLength;
|
|
3164
3252
|
for(; l < d && n[l] !== 40;)l++;
|
|
3165
|
-
if (l >= d || (i.length = 0,
|
|
3166
|
-
const
|
|
3167
|
-
e.has(
|
|
3253
|
+
if (l >= d || (i.length = 0, Xt(n, l, d - l, i), i.length < 2)) continue;
|
|
3254
|
+
const f = i[i.length - 2], u = i[i.length - 1];
|
|
3255
|
+
e.has(f) && (e.add(u), t.delete(o), t.delete(u));
|
|
3168
3256
|
}
|
|
3169
3257
|
}
|
|
3170
|
-
function
|
|
3258
|
+
function de(r, t, e) {
|
|
3171
3259
|
const n = [], s = [], i = e.byType.get("IFCSTYLEDITEM") ?? [], o = e.byType.get("IFCSTYLEDREPRESENTATION") ?? [];
|
|
3172
3260
|
for (const c of [
|
|
3173
3261
|
i,
|
|
@@ -3176,26 +3264,26 @@ let __tla = Promise.all([
|
|
|
3176
3264
|
if (r.has(l)) continue;
|
|
3177
3265
|
const d = e.byId.get(l);
|
|
3178
3266
|
if (!d) continue;
|
|
3179
|
-
s.length = 0,
|
|
3180
|
-
let
|
|
3181
|
-
for(let
|
|
3182
|
-
|
|
3267
|
+
s.length = 0, Xt(t, d.byteOffset, d.byteLength, s);
|
|
3268
|
+
let f = !1;
|
|
3269
|
+
for(let u = 0; u < s.length; u++)if (r.has(s[u])) {
|
|
3270
|
+
f = !0;
|
|
3183
3271
|
break;
|
|
3184
3272
|
}
|
|
3185
|
-
|
|
3273
|
+
f && (r.add(l), n.push(l));
|
|
3186
3274
|
}
|
|
3187
3275
|
for(; n.length > 0;){
|
|
3188
3276
|
const c = n.pop(), l = e.byId.get(c);
|
|
3189
3277
|
if (l) {
|
|
3190
|
-
s.length = 0,
|
|
3278
|
+
s.length = 0, Xt(t, l.byteOffset, l.byteLength, s);
|
|
3191
3279
|
for(let d = 0; d < s.length; d++){
|
|
3192
|
-
const
|
|
3193
|
-
!r.has(
|
|
3280
|
+
const f = s[d];
|
|
3281
|
+
!r.has(f) && e.byId.has(f) && (r.add(f), n.push(f));
|
|
3194
3282
|
}
|
|
3195
3283
|
}
|
|
3196
3284
|
}
|
|
3197
3285
|
}
|
|
3198
|
-
const
|
|
3286
|
+
const xe = new Map([
|
|
3199
3287
|
[
|
|
3200
3288
|
"IFCELECTRICDISTRIBUTIONPOINT",
|
|
3201
3289
|
"IFCELECTRICDISTRIBUTIONBOARD"
|
|
@@ -3208,7 +3296,7 @@ let __tla = Promise.all([
|
|
|
3208
3296
|
"IFCEQUIPMENTELEMENT",
|
|
3209
3297
|
"IFCBUILDINGELEMENTPROXY"
|
|
3210
3298
|
]
|
|
3211
|
-
]),
|
|
3299
|
+
]), Le = new Map([
|
|
3212
3300
|
[
|
|
3213
3301
|
"IFCELECTRICDISTRIBUTIONBOARD",
|
|
3214
3302
|
"IFCELECTRICDISTRIBUTIONPOINT"
|
|
@@ -3301,7 +3389,7 @@ let __tla = Promise.all([
|
|
|
3301
3389
|
"IFCBUILTELEMENT",
|
|
3302
3390
|
"IFCBUILDINGELEMENTPROXY"
|
|
3303
3391
|
]
|
|
3304
|
-
]),
|
|
3392
|
+
]), te = new Map([]), ee = new Map([
|
|
3305
3393
|
[
|
|
3306
3394
|
"IFCFACILITY",
|
|
3307
3395
|
"IFCBUILDING"
|
|
@@ -3446,7 +3534,7 @@ let __tla = Promise.all([
|
|
|
3446
3534
|
"IFCELECTRICFLOWTREATMENTDEVICE",
|
|
3447
3535
|
"IFCFLOWTREATMENTDEVICE"
|
|
3448
3536
|
]
|
|
3449
|
-
]),
|
|
3537
|
+
]), qn = new Map([
|
|
3450
3538
|
[
|
|
3451
3539
|
"IFCWALL",
|
|
3452
3540
|
8
|
|
@@ -3568,34 +3656,34 @@ let __tla = Promise.all([
|
|
|
3568
3656
|
8
|
|
3569
3657
|
]
|
|
3570
3658
|
]);
|
|
3571
|
-
function
|
|
3659
|
+
function ze(r, t, e) {
|
|
3572
3660
|
if (t === e) return r;
|
|
3573
3661
|
const n = r.toUpperCase();
|
|
3574
|
-
return
|
|
3662
|
+
return Qn(t, e)?.get(n) ?? n;
|
|
3575
3663
|
}
|
|
3576
|
-
function
|
|
3577
|
-
return r === "IFC2X3" && t === "IFC4" ?
|
|
3664
|
+
function Qn(r, t) {
|
|
3665
|
+
return r === "IFC2X3" && t === "IFC4" ? xe : r === "IFC4" && t === "IFC2X3" ? Le : r === "IFC4" && t === "IFC4X3" ? te : r === "IFC4X3" && t === "IFC4" ? ee : r === "IFC5" && t === "IFC4X3" || r === "IFC4X3" && t === "IFC5" ? null : r === "IFC5" && t === "IFC4" ? ee : r === "IFC4" && t === "IFC5" ? te : r === "IFC2X3" && (t === "IFC4X3" || t === "IFC5") ? Me(xe, te) : (r === "IFC4X3" || r === "IFC5") && t === "IFC2X3" ? Me(ee, Le) : null;
|
|
3578
3666
|
}
|
|
3579
|
-
function
|
|
3667
|
+
function Me(r, t) {
|
|
3580
3668
|
const e = new Map;
|
|
3581
3669
|
for (const [n, s] of r)e.set(n, t.get(s) ?? s);
|
|
3582
3670
|
for (const [n, s] of t)e.has(n) || e.set(n, s);
|
|
3583
3671
|
return e;
|
|
3584
3672
|
}
|
|
3585
|
-
function
|
|
3673
|
+
function qt(r, t, e) {
|
|
3586
3674
|
if (t === e) return r;
|
|
3587
3675
|
const n = r.match(/^(#\d+=)(\w+)\((.*)?\);?\s*$/);
|
|
3588
3676
|
if (!n) return r;
|
|
3589
|
-
const s = n[1], i = n[2].toUpperCase(), o = n[3] ?? "", c =
|
|
3590
|
-
if (
|
|
3677
|
+
const s = n[1], i = n[2].toUpperCase(), o = n[3] ?? "", c = ze(i, t, e);
|
|
3678
|
+
if (Jn(c, e)) return `${s}IFCPROXY('${ts()}',$,'${i}',$,$,$,$,.NOTDEFINED.,$);`;
|
|
3591
3679
|
let l = o;
|
|
3592
3680
|
if (e === "IFC2X3") {
|
|
3593
|
-
const d =
|
|
3594
|
-
d !== void 0 && (l =
|
|
3681
|
+
const d = qn.get(c);
|
|
3682
|
+
d !== void 0 && (l = Kn(o, d));
|
|
3595
3683
|
}
|
|
3596
3684
|
return `${s}${c}(${l});`;
|
|
3597
3685
|
}
|
|
3598
|
-
function
|
|
3686
|
+
function Jn(r, t) {
|
|
3599
3687
|
return t === "IFC4X3" || t === "IFC5" ? !1 : new Set([
|
|
3600
3688
|
"IFCALIGNMENTCANT",
|
|
3601
3689
|
"IFCALIGNMENTHORIZONTAL",
|
|
@@ -3603,7 +3691,7 @@ let __tla = Promise.all([
|
|
|
3603
3691
|
"IFCALIGNMENTSEGMENT"
|
|
3604
3692
|
]).has(r);
|
|
3605
3693
|
}
|
|
3606
|
-
function
|
|
3694
|
+
function Kn(r, t) {
|
|
3607
3695
|
if (!r.trim()) return r;
|
|
3608
3696
|
const e = [];
|
|
3609
3697
|
let n = 0, s = !1, i = "";
|
|
@@ -3625,70 +3713,70 @@ let __tla = Promise.all([
|
|
|
3625
3713
|
}
|
|
3626
3714
|
return e.push(i), e.length > t ? e.slice(0, t).join(",") : e.join(",");
|
|
3627
3715
|
}
|
|
3628
|
-
function
|
|
3716
|
+
function fe(r, t) {
|
|
3629
3717
|
return r !== t;
|
|
3630
3718
|
}
|
|
3631
|
-
let
|
|
3632
|
-
function
|
|
3633
|
-
const r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_$", t =
|
|
3719
|
+
let Zn = 0;
|
|
3720
|
+
function ts() {
|
|
3721
|
+
const r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_$", t = Zn++;
|
|
3634
3722
|
let e = "PROXY_", n = t;
|
|
3635
3723
|
for(let s = 0; s < 16; s++)e += r[n % 64], n = Math.floor(n / 64) + s;
|
|
3636
3724
|
return e;
|
|
3637
3725
|
}
|
|
3638
|
-
function
|
|
3639
|
-
return r.replace(/\\/g, "\\\\").replace(/'/g, "''");
|
|
3726
|
+
function rt(r) {
|
|
3727
|
+
return r.replace(/\\/g, "\\\\").replace(/'/g, "''").replace(/[\x00-\x1F\x7F]+/g, " ");
|
|
3640
3728
|
}
|
|
3641
|
-
function
|
|
3729
|
+
function et(r) {
|
|
3642
3730
|
if (!Number.isFinite(r)) return "0.";
|
|
3643
3731
|
const t = r.toString();
|
|
3644
3732
|
return t.includes(".") ? t : t + ".";
|
|
3645
3733
|
}
|
|
3646
|
-
function
|
|
3734
|
+
function es(r) {
|
|
3647
3735
|
switch(r){
|
|
3648
|
-
case
|
|
3736
|
+
case Et.Length:
|
|
3649
3737
|
return "IFCQUANTITYLENGTH";
|
|
3650
|
-
case
|
|
3738
|
+
case Et.Area:
|
|
3651
3739
|
return "IFCQUANTITYAREA";
|
|
3652
|
-
case
|
|
3740
|
+
case Et.Volume:
|
|
3653
3741
|
return "IFCQUANTITYVOLUME";
|
|
3654
|
-
case
|
|
3742
|
+
case Et.Count:
|
|
3655
3743
|
return "IFCQUANTITYCOUNT";
|
|
3656
|
-
case
|
|
3744
|
+
case Et.Weight:
|
|
3657
3745
|
return "IFCQUANTITYWEIGHT";
|
|
3658
|
-
case
|
|
3746
|
+
case Et.Time:
|
|
3659
3747
|
return "IFCQUANTITYTIME";
|
|
3660
3748
|
default:
|
|
3661
3749
|
return "IFCQUANTITYCOUNT";
|
|
3662
3750
|
}
|
|
3663
3751
|
}
|
|
3664
|
-
function
|
|
3752
|
+
function He(r, t) {
|
|
3665
3753
|
if (r == null) return "$";
|
|
3666
3754
|
switch(t){
|
|
3667
|
-
case
|
|
3668
|
-
case
|
|
3669
|
-
case
|
|
3670
|
-
return `IFCLABEL('${
|
|
3671
|
-
case
|
|
3672
|
-
return `IFCIDENTIFIER('${
|
|
3673
|
-
case
|
|
3755
|
+
case st.String:
|
|
3756
|
+
case st.Label:
|
|
3757
|
+
case st.Text:
|
|
3758
|
+
return `IFCLABEL('${rt(String(r))}')`;
|
|
3759
|
+
case st.Identifier:
|
|
3760
|
+
return `IFCIDENTIFIER('${rt(String(r))}')`;
|
|
3761
|
+
case st.Real:
|
|
3674
3762
|
{
|
|
3675
3763
|
const e = Number(r);
|
|
3676
3764
|
return Number.isFinite(e) ? `IFCREAL(${e.toString().includes(".") ? e : e + "."})` : "$";
|
|
3677
3765
|
}
|
|
3678
|
-
case
|
|
3766
|
+
case st.Integer:
|
|
3679
3767
|
return `IFCINTEGER(${Math.round(Number(r))})`;
|
|
3680
|
-
case
|
|
3681
|
-
case
|
|
3768
|
+
case st.Boolean:
|
|
3769
|
+
case st.Logical:
|
|
3682
3770
|
return r === !0 ? "IFCBOOLEAN(.T.)" : r === !1 ? "IFCBOOLEAN(.F.)" : "IFCLOGICAL(.U.)";
|
|
3683
|
-
case
|
|
3771
|
+
case st.Enum:
|
|
3684
3772
|
return `.${String(r).toUpperCase()}.`;
|
|
3685
|
-
case
|
|
3686
|
-
return Array.isArray(r) ? `(${r.map((n)=>
|
|
3773
|
+
case st.List:
|
|
3774
|
+
return Array.isArray(r) ? `(${r.map((n)=>He(n, st.String)).join(",")})` : "$";
|
|
3687
3775
|
default:
|
|
3688
|
-
return `IFCLABEL('${
|
|
3776
|
+
return `IFCLABEL('${rt(String(r))}')`;
|
|
3689
3777
|
}
|
|
3690
3778
|
}
|
|
3691
|
-
function
|
|
3779
|
+
function ns(r, t) {
|
|
3692
3780
|
const e = r.trim(), n = t.trim();
|
|
3693
3781
|
if (r === "") return "$";
|
|
3694
3782
|
if (e === "$" || e === "*" || /^#\d+$/.test(e)) return e;
|
|
@@ -3699,22 +3787,22 @@ let __tla = Promise.all([
|
|
|
3699
3787
|
}
|
|
3700
3788
|
if (/^-?\d+(?:\.\d+)?(?:E[+-]?\d+)?$/i.test(e) && /^-?\d/.test(n)) {
|
|
3701
3789
|
const s = Number(e);
|
|
3702
|
-
return Number.isFinite(s) ? n.includes(".") || /E/i.test(n) ?
|
|
3790
|
+
return Number.isFinite(s) ? n.includes(".") || /E/i.test(n) ? et(s) : String(s) : "$";
|
|
3703
3791
|
}
|
|
3704
|
-
return
|
|
3792
|
+
return De(r);
|
|
3705
3793
|
}
|
|
3706
|
-
function
|
|
3794
|
+
function ue(r) {
|
|
3707
3795
|
if (r == null) return "$";
|
|
3708
3796
|
if (typeof r == "boolean") return r ? ".T." : ".F.";
|
|
3709
|
-
if (typeof r == "number") return Number.isFinite(r) ? Number.isInteger(r) ? String(r) :
|
|
3710
|
-
if (Array.isArray(r)) return `(${r.map(
|
|
3797
|
+
if (typeof r == "number") return Number.isFinite(r) ? Number.isInteger(r) ? String(r) : et(r) : "$";
|
|
3798
|
+
if (Array.isArray(r)) return `(${r.map(ue).join(",")})`;
|
|
3711
3799
|
const t = String(r).trim();
|
|
3712
|
-
return t === "$" || t === "*" || /^#\d+$/.test(t) ? t : /^\.[A-Z0-9_]+\.$/i.test(t) ? t.toUpperCase() : `'${
|
|
3800
|
+
return t === "$" || t === "*" || /^#\d+$/.test(t) ? t : /^\.[A-Z0-9_]+\.$/i.test(t) ? t.toUpperCase() : `'${rt(String(r))}'`;
|
|
3713
3801
|
}
|
|
3714
|
-
function
|
|
3715
|
-
return r.map(
|
|
3802
|
+
function ss(r) {
|
|
3803
|
+
return r.map(ue).join(",");
|
|
3716
3804
|
}
|
|
3717
|
-
function
|
|
3805
|
+
function Be(r) {
|
|
3718
3806
|
const t = [];
|
|
3719
3807
|
let e = "", n = 0, s = !1;
|
|
3720
3808
|
for(let i = 0; i < r.length; i++){
|
|
@@ -3739,7 +3827,7 @@ let __tla = Promise.all([
|
|
|
3739
3827
|
}
|
|
3740
3828
|
return e.trim() && t.push(e.trim()), t;
|
|
3741
3829
|
}
|
|
3742
|
-
function
|
|
3830
|
+
function is(r) {
|
|
3743
3831
|
const t = [];
|
|
3744
3832
|
let e = "", n = 0, s = !1;
|
|
3745
3833
|
for(let i = 0; i < r.length; i++){
|
|
@@ -3764,7 +3852,7 @@ let __tla = Promise.all([
|
|
|
3764
3852
|
}
|
|
3765
3853
|
return t.push(e), t;
|
|
3766
3854
|
}
|
|
3767
|
-
|
|
3855
|
+
rs = class {
|
|
3768
3856
|
dataStore;
|
|
3769
3857
|
mutationView;
|
|
3770
3858
|
nextExpressId;
|
|
@@ -3772,121 +3860,121 @@ let __tla = Promise.all([
|
|
|
3772
3860
|
constructor(t, e){
|
|
3773
3861
|
this.dataStore = t, this.mutationView = e || null;
|
|
3774
3862
|
const n = this.findMaxExpressId(), s = typeof e?.peekNextExpressId == "function" ? e.peekNextExpressId() - 1 : 0;
|
|
3775
|
-
this.nextExpressId = Math.max(n, s) + 1, this.entityExtractor = t.source ? new
|
|
3863
|
+
this.nextExpressId = Math.max(n, s) + 1, this.entityExtractor = t.source ? new Xe(t.source) : null;
|
|
3776
3864
|
}
|
|
3777
3865
|
export(t) {
|
|
3778
3866
|
const e = [];
|
|
3779
3867
|
let n = 0, s = 0;
|
|
3780
|
-
const i = t.schema || this.dataStore.schemaVersion || "IFC4", o = this.dataStore.schemaVersion || "IFC4", c =
|
|
3868
|
+
const i = t.schema || this.dataStore.schemaVersion || "IFC4", o = this.dataStore.schemaVersion || "IFC4", c = fe(o, i);
|
|
3781
3869
|
if (i === "IFC2X3" && t.applyMutations !== !1 && t.georefMutations && (Object.keys(t.georefMutations.projectedCRS ?? {}).length > 0 || Object.keys(t.georefMutations.mapConversion ?? {}).length > 0)) throw new Error("Georeferencing creation and editing requires IFC4 or newer. IFC2X3 does not support IfcProjectedCRS or IfcMapConversion.");
|
|
3782
|
-
const l =
|
|
3870
|
+
const l = ie({
|
|
3783
3871
|
schema: i,
|
|
3784
3872
|
description: t.description || "Exported from ifc-lite",
|
|
3785
3873
|
author: t.author || "",
|
|
3786
3874
|
organization: t.organization || "",
|
|
3787
3875
|
application: t.application || "ifc-lite",
|
|
3788
3876
|
filename: t.filename || "export.ifc"
|
|
3789
|
-
}), d = new Set,
|
|
3877
|
+
}), d = new Set, f = new Map, u = new Map, p = [], I = [], h = new Map, y = new Map, E = new Set, C = new Map, T = new Set, G = new Set;
|
|
3790
3878
|
if (this.mutationView && t.applyMutations !== !1) {
|
|
3791
3879
|
const b = this.mutationView.getMutations(), S = new Map, F = new Map;
|
|
3792
3880
|
for (const _ of b){
|
|
3793
3881
|
if (_.type === "UPDATE_ATTRIBUTE" && _.attributeName) {
|
|
3794
|
-
d.add(_.entityId),
|
|
3882
|
+
d.add(_.entityId), u.has(_.entityId) || u.set(_.entityId, new Map), u.get(_.entityId).set(_.attributeName, _.newValue == null ? "" : String(_.newValue));
|
|
3795
3883
|
continue;
|
|
3796
3884
|
}
|
|
3797
3885
|
if (!_.psetName) continue;
|
|
3798
|
-
const
|
|
3799
|
-
|
|
3886
|
+
const g = _.type === "CREATE_QUANTITY" || _.type === "UPDATE_QUANTITY" || _.type === "DELETE_QUANTITY" ? F : S;
|
|
3887
|
+
g.has(_.entityId) || g.set(_.entityId, new Set), g.get(_.entityId).add(_.psetName);
|
|
3800
3888
|
}
|
|
3801
3889
|
const m = this.buildRelDefinesByPropertiesIndex();
|
|
3802
3890
|
for (const [_, w] of S){
|
|
3803
|
-
d.add(_),
|
|
3804
|
-
const R = this.mutationView.getForEntity(_).filter((
|
|
3891
|
+
d.add(_), f.set(_, w), s++;
|
|
3892
|
+
const R = this.mutationView.getForEntity(_).filter((V)=>w.has(V.name)), N = new Set;
|
|
3805
3893
|
R.length > 0 && p.push({
|
|
3806
3894
|
entityId: _,
|
|
3807
3895
|
psets: R
|
|
3808
3896
|
});
|
|
3809
|
-
const
|
|
3810
|
-
if (
|
|
3811
|
-
const
|
|
3812
|
-
if (
|
|
3813
|
-
|
|
3814
|
-
const
|
|
3815
|
-
for (const Q of
|
|
3897
|
+
const $ = m.get(_);
|
|
3898
|
+
if ($) for (const { relId: V, psetId: z } of $){
|
|
3899
|
+
const Y = this.getPropertySetName(z);
|
|
3900
|
+
if (Y && N.add(Y), Y && w.has(Y)) {
|
|
3901
|
+
G.add(V), T.add(z);
|
|
3902
|
+
const H = this.getPropertyIdsInSet(z);
|
|
3903
|
+
for (const Q of H)T.add(Q);
|
|
3816
3904
|
}
|
|
3817
3905
|
}
|
|
3818
3906
|
if (this.isTypeEntity(_)) {
|
|
3819
|
-
const
|
|
3820
|
-
for (const
|
|
3821
|
-
const
|
|
3822
|
-
if (!
|
|
3823
|
-
|
|
3824
|
-
const Q = this.getPropertyIdsInSet(
|
|
3825
|
-
for (const
|
|
3907
|
+
const V = this.getTypeOwnedHasPropertySetIds(_), z = new Set;
|
|
3908
|
+
for (const Y of V){
|
|
3909
|
+
const H = this.getPropertySetName(Y);
|
|
3910
|
+
if (!H || !w.has(H)) continue;
|
|
3911
|
+
z.add(H), T.add(Y);
|
|
3912
|
+
const Q = this.getPropertyIdsInSet(Y);
|
|
3913
|
+
for (const Z of Q)T.add(Z);
|
|
3826
3914
|
}
|
|
3827
|
-
for (const
|
|
3828
|
-
|
|
3915
|
+
for (const Y of w)N.has(Y) || z.add(Y);
|
|
3916
|
+
z.size > 0 && (h.set(_, z), y.set(_, V), E.add(_));
|
|
3829
3917
|
}
|
|
3830
3918
|
}
|
|
3831
3919
|
t.includeQuantities === !1 && F.clear();
|
|
3832
3920
|
for (const [_, w] of F){
|
|
3833
|
-
d.add(_),
|
|
3834
|
-
const R = this.mutationView.getQuantitiesForEntity(_).filter((
|
|
3835
|
-
R.length > 0 &&
|
|
3921
|
+
d.add(_), f.has(_) || s++;
|
|
3922
|
+
const R = this.mutationView.getQuantitiesForEntity(_).filter(($)=>w.has($.name));
|
|
3923
|
+
R.length > 0 && I.push({
|
|
3836
3924
|
entityId: _,
|
|
3837
3925
|
qsets: R
|
|
3838
3926
|
});
|
|
3839
3927
|
const N = m.get(_);
|
|
3840
|
-
if (N) for (const { relId:
|
|
3841
|
-
const
|
|
3842
|
-
if (
|
|
3843
|
-
|
|
3844
|
-
const
|
|
3845
|
-
for (const
|
|
3928
|
+
if (N) for (const { relId: $, psetId: V } of N){
|
|
3929
|
+
const z = this.getElementQuantityName(V);
|
|
3930
|
+
if (z && w.has(z)) {
|
|
3931
|
+
G.add($), T.add(V);
|
|
3932
|
+
const Y = this.getPropertyIdsInSet(V);
|
|
3933
|
+
for (const H of Y)T.add(H);
|
|
3846
3934
|
}
|
|
3847
3935
|
}
|
|
3848
3936
|
}
|
|
3849
|
-
for (const [_] of
|
|
3937
|
+
for (const [_] of u)!S.has(_) && !F.has(_) && s++;
|
|
3850
3938
|
}
|
|
3851
3939
|
const x = [];
|
|
3852
3940
|
if (t.applyMutations !== !1 && t.georefMutations) {
|
|
3853
3941
|
const b = t.georefMutations, S = this.dataStore.entityIndex.byType.get("IFCPROJECTEDCRS"), F = this.dataStore.entityIndex.byType.get("IFCMAPCONVERSION");
|
|
3854
3942
|
if (b.projectedCRS && S?.length) {
|
|
3855
3943
|
const m = S[0];
|
|
3856
|
-
|
|
3857
|
-
const _ =
|
|
3858
|
-
let
|
|
3859
|
-
if (w.name !== void 0 && (_.set("Name", String(w.name)),
|
|
3944
|
+
u.has(m) || u.set(m, new Map);
|
|
3945
|
+
const _ = u.get(m), w = b.projectedCRS;
|
|
3946
|
+
let g = !1;
|
|
3947
|
+
if (w.name !== void 0 && (_.set("Name", String(w.name)), g = !0), w.description !== void 0 && (_.set("Description", String(w.description)), g = !0), w.geodeticDatum !== void 0 && (_.set("GeodeticDatum", String(w.geodeticDatum)), g = !0), w.verticalDatum !== void 0 && (_.set("VerticalDatum", String(w.verticalDatum)), g = !0), w.mapProjection !== void 0 && (_.set("MapProjection", String(w.mapProjection)), g = !0), w.mapZone !== void 0 && (_.set("MapZone", String(w.mapZone)), g = !0), w.mapUnit !== void 0) {
|
|
3860
3948
|
const R = this.resolveMapUnitReference(String(w.mapUnit), x);
|
|
3861
|
-
_.set("MapUnit", `#${R}`),
|
|
3949
|
+
_.set("MapUnit", `#${R}`), g = !0;
|
|
3862
3950
|
}
|
|
3863
|
-
|
|
3951
|
+
g && !d.has(m) && (d.add(m), s++);
|
|
3864
3952
|
}
|
|
3865
3953
|
if (b.mapConversion && F?.length) {
|
|
3866
3954
|
const m = F[0];
|
|
3867
|
-
|
|
3868
|
-
const _ =
|
|
3869
|
-
let
|
|
3870
|
-
w.eastings !== void 0 && (_.set("Eastings", String(w.eastings)),
|
|
3955
|
+
u.has(m) || u.set(m, new Map);
|
|
3956
|
+
const _ = u.get(m), w = b.mapConversion;
|
|
3957
|
+
let g = !1;
|
|
3958
|
+
w.eastings !== void 0 && (_.set("Eastings", String(w.eastings)), g = !0), w.northings !== void 0 && (_.set("Northings", String(w.northings)), g = !0), w.orthogonalHeight !== void 0 && (_.set("OrthogonalHeight", String(w.orthogonalHeight)), g = !0), w.xAxisAbscissa !== void 0 && (_.set("XAxisAbscissa", String(w.xAxisAbscissa)), g = !0), w.xAxisOrdinate !== void 0 && (_.set("XAxisOrdinate", String(w.xAxisOrdinate)), g = !0), w.scale !== void 0 && (_.set("Scale", String(w.scale)), g = !0), g && !d.has(m) && (d.add(m), s++);
|
|
3871
3959
|
}
|
|
3872
3960
|
if (b.projectedCRS && !S?.length) {
|
|
3873
|
-
const m = b.projectedCRS, _ = this.nextExpressId++, w = m.name ? `'${
|
|
3874
|
-
x.push(`#${_}=IFCPROJECTEDCRS(${w},${
|
|
3875
|
-
const
|
|
3876
|
-
if (
|
|
3877
|
-
const
|
|
3878
|
-
x.push(`#${Q}=IFCMAPCONVERSION(#${
|
|
3961
|
+
const m = b.projectedCRS, _ = this.nextExpressId++, w = m.name ? `'${rt(String(m.name))}'` : "$", g = m.description ? `'${rt(String(m.description))}'` : "$", R = m.geodeticDatum ? `'${rt(String(m.geodeticDatum))}'` : "$", N = m.verticalDatum ? `'${rt(String(m.verticalDatum))}'` : "$", $ = m.mapProjection ? `'${rt(String(m.mapProjection))}'` : "$", V = m.mapZone ? `'${rt(String(m.mapZone))}'` : "$", z = m.mapUnit ? `#${this.resolveMapUnitReference(String(m.mapUnit), x)}` : "$";
|
|
3962
|
+
x.push(`#${_}=IFCPROJECTEDCRS(${w},${g},${R},${N},${$},${V},${z});`), n++;
|
|
3963
|
+
const Y = this.findPreferredGeometricRepresentationContextId();
|
|
3964
|
+
if (Y) {
|
|
3965
|
+
const H = b.mapConversion || {}, Q = this.nextExpressId++, Z = et(Number(H.eastings) || 0), L = et(Number(H.northings) || 0), W = et(Number(H.orthogonalHeight) || 0), X = H.xAxisAbscissa !== void 0 ? et(Number(H.xAxisAbscissa)) : "$", U = H.xAxisOrdinate !== void 0 ? et(Number(H.xAxisOrdinate)) : "$", q = H.scale !== void 0 ? et(Number(H.scale)) : "$";
|
|
3966
|
+
x.push(`#${Q}=IFCMAPCONVERSION(#${Y},#${_},${Z},${L},${W},${X},${U},${q});`), n++;
|
|
3879
3967
|
} else console.warn("[StepExporter] Cannot create IfcMapConversion: no IfcGeometricRepresentationContext found in source file");
|
|
3880
3968
|
} else if (b.mapConversion && !F?.length && S?.length) {
|
|
3881
3969
|
const m = this.findPreferredGeometricRepresentationContextId();
|
|
3882
3970
|
if (m) {
|
|
3883
|
-
const _ = b.mapConversion, w = this.nextExpressId++,
|
|
3884
|
-
x.push(`#${w}=IFCMAPCONVERSION(#${m},#${S[0]},${
|
|
3971
|
+
const _ = b.mapConversion, w = this.nextExpressId++, g = et(Number(_.eastings) || 0), R = et(Number(_.northings) || 0), N = et(Number(_.orthogonalHeight) || 0), $ = _.xAxisAbscissa !== void 0 ? et(Number(_.xAxisAbscissa)) : "$", V = _.xAxisOrdinate !== void 0 ? et(Number(_.xAxisOrdinate)) : "$", z = _.scale !== void 0 ? et(Number(_.scale)) : "$";
|
|
3972
|
+
x.push(`#${w}=IFCMAPCONVERSION(#${m},#${S[0]},${g},${R},${N},${$},${V},${z});`), n++;
|
|
3885
3973
|
} else console.warn("[StepExporter] Cannot create IfcMapConversion: no IfcGeometricRepresentationContext found in source file");
|
|
3886
3974
|
}
|
|
3887
3975
|
}
|
|
3888
|
-
const
|
|
3889
|
-
if (t.deltaOnly && d.size === 0 &&
|
|
3976
|
+
const k = this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function" ? this.mutationView.getNewEntities().length : 0;
|
|
3977
|
+
if (t.deltaOnly && d.size === 0 && k === 0 && x.length === 0) {
|
|
3890
3978
|
const b = new TextEncoder().encode(l + `DATA;
|
|
3891
3979
|
ENDSEC;
|
|
3892
3980
|
END-ISO-10303-21;
|
|
@@ -3903,22 +3991,22 @@ END-ISO-10303-21;
|
|
|
3903
3991
|
}
|
|
3904
3992
|
let O = null;
|
|
3905
3993
|
if (t.visibleOnly && this.dataStore.source) {
|
|
3906
|
-
const { roots: b, hiddenProductIds: S } =
|
|
3907
|
-
O =
|
|
3994
|
+
const { roots: b, hiddenProductIds: S } = le(this.dataStore, t.hiddenEntityIds ?? new Set, t.isolatedEntityIds ?? null);
|
|
3995
|
+
O = ce(b, this.dataStore.source, this.dataStore.entityIndex.byId, S), de(O, this.dataStore.source, this.dataStore.entityIndex);
|
|
3908
3996
|
}
|
|
3909
3997
|
if (!t.deltaOnly && this.dataStore.source) {
|
|
3910
3998
|
const b = this.dataStore.source, S = !!this.mutationView && t.applyMutations !== !1;
|
|
3911
3999
|
for (const [F, m] of this.dataStore.entityIndex.byId){
|
|
3912
|
-
if (S && typeof this.mutationView.isDeleted == "function" && this.mutationView.isDeleted(F) || m.byteLength === 0 || m.byteOffset < 0 || O !== null && !O.has(F) || T.has(F) ||
|
|
4000
|
+
if (S && typeof this.mutationView.isDeleted == "function" && this.mutationView.isDeleted(F) || m.byteLength === 0 || m.byteOffset < 0 || O !== null && !O.has(F) || T.has(F) || G.has(F) || E.has(F)) continue;
|
|
3913
4001
|
const _ = m.type.toUpperCase();
|
|
3914
4002
|
if (t.includeGeometry === !1 && this.isGeometryEntity(_)) continue;
|
|
3915
|
-
const w =
|
|
3916
|
-
let
|
|
4003
|
+
const w = it(b, m.byteOffset, m.byteOffset + m.byteLength);
|
|
4004
|
+
let g = u.has(F) ? this.applyAttributeMutations(w, _, u.get(F)) : w;
|
|
3917
4005
|
const R = S && typeof this.mutationView.getPositionalMutationsForEntity == "function" ? this.mutationView.getPositionalMutationsForEntity(F) : null;
|
|
3918
|
-
if (R && R.size > 0 && (
|
|
3919
|
-
const N =
|
|
4006
|
+
if (R && R.size > 0 && (g = this.applyPositionalMutations(g, R), d.has(F) || (d.add(F), s++)), c) {
|
|
4007
|
+
const N = qt(g, o, i);
|
|
3920
4008
|
N !== null && e.push(N);
|
|
3921
|
-
} else e.push(
|
|
4009
|
+
} else e.push(g);
|
|
3922
4010
|
}
|
|
3923
4011
|
}
|
|
3924
4012
|
for (const { entityId: b, psets: S } of p){
|
|
@@ -3935,7 +4023,7 @@ END-ISO-10303-21;
|
|
|
3935
4023
|
const F = this.rewriteTypeEntityHasPropertySets(b, y.get(b) ?? [], S, new Map);
|
|
3936
4024
|
F && C.set(b, F);
|
|
3937
4025
|
}
|
|
3938
|
-
for (const { entityId: b, qsets: S } of
|
|
4026
|
+
for (const { entityId: b, qsets: S } of I){
|
|
3939
4027
|
const F = this.generateQuantitySetEntities(b, S);
|
|
3940
4028
|
e.push(...F.lines), n += F.count;
|
|
3941
4029
|
}
|
|
@@ -3944,20 +4032,20 @@ END-ISO-10303-21;
|
|
|
3944
4032
|
if (this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function") for (const b of this.mutationView.getNewEntities()){
|
|
3945
4033
|
const S = b.type.toUpperCase();
|
|
3946
4034
|
if (t.includeGeometry === !1 && this.isGeometryEntity(S) || O !== null && !O.has(b.expressId)) continue;
|
|
3947
|
-
const F = `#${b.expressId}=${S}(${
|
|
4035
|
+
const F = `#${b.expressId}=${S}(${ss(b.attributes)});`;
|
|
3948
4036
|
if (c) {
|
|
3949
|
-
const m =
|
|
4037
|
+
const m = qt(F, o, i);
|
|
3950
4038
|
m !== null && (e.push(m), n++);
|
|
3951
4039
|
} else e.push(F), n++;
|
|
3952
4040
|
}
|
|
3953
|
-
const
|
|
4041
|
+
const D = os(l, e);
|
|
3954
4042
|
return {
|
|
3955
|
-
content:
|
|
4043
|
+
content: D,
|
|
3956
4044
|
stats: {
|
|
3957
4045
|
entityCount: e.length,
|
|
3958
4046
|
newEntityCount: n,
|
|
3959
4047
|
modifiedEntityCount: s,
|
|
3960
|
-
fileSize:
|
|
4048
|
+
fileSize: D.byteLength
|
|
3961
4049
|
}
|
|
3962
4050
|
};
|
|
3963
4051
|
}
|
|
@@ -3995,20 +4083,20 @@ END-ISO-10303-21;
|
|
|
3995
4083
|
const o = new Map;
|
|
3996
4084
|
for (const c of e){
|
|
3997
4085
|
const l = [];
|
|
3998
|
-
for (const
|
|
4086
|
+
for (const I of c.properties){
|
|
3999
4087
|
const h = this.nextExpressId++;
|
|
4000
4088
|
i++;
|
|
4001
|
-
const y =
|
|
4089
|
+
const y = He(I.value, I.type), E = I.unit ? this.findUnitId(I.unit) : null, C = E !== null ? Je(E) : null, T = `#${h}=IFCPROPERTYSINGLEVALUE('${rt(I.name)}',$,${y},${C ? De(C) : "$"});`;
|
|
4002
4090
|
s.push(T), l.push(h);
|
|
4003
4091
|
}
|
|
4004
4092
|
const d = this.nextExpressId++;
|
|
4005
4093
|
i++;
|
|
4006
|
-
const
|
|
4094
|
+
const f = l.map((I)=>`#${I}`).join(","), u = this.generateGlobalId(), p = `#${d}=IFCPROPERTYSET('${u}',$,'${rt(c.name)}',$,(${f}));`;
|
|
4007
4095
|
if (s.push(p), n?.has(c.name)) o.set(c.name, d);
|
|
4008
4096
|
else {
|
|
4009
|
-
const
|
|
4097
|
+
const I = this.nextExpressId++;
|
|
4010
4098
|
i++;
|
|
4011
|
-
const h = this.generateGlobalId(), y = `#${
|
|
4099
|
+
const h = this.generateGlobalId(), y = `#${I}=IFCRELDEFINESBYPROPERTIES('${h}',$,$,$,(#${t}),#${d});`;
|
|
4012
4100
|
s.push(y);
|
|
4013
4101
|
}
|
|
4014
4102
|
}
|
|
@@ -4026,17 +4114,17 @@ END-ISO-10303-21;
|
|
|
4026
4114
|
for (const h of i.quantities){
|
|
4027
4115
|
const y = this.nextExpressId++;
|
|
4028
4116
|
s++;
|
|
4029
|
-
const E =
|
|
4117
|
+
const E = es(h.type), C = et(h.value), T = `#${y}=${E}('${rt(h.name)}',$,$,${C},$);`;
|
|
4030
4118
|
n.push(T), o.push(y);
|
|
4031
4119
|
}
|
|
4032
4120
|
const c = this.nextExpressId++;
|
|
4033
4121
|
s++;
|
|
4034
|
-
const l = o.map((h)=>`#${h}`).join(","), d = this.generateGlobalId(),
|
|
4035
|
-
n.push(
|
|
4036
|
-
const
|
|
4122
|
+
const l = o.map((h)=>`#${h}`).join(","), d = this.generateGlobalId(), f = `#${c}=IFCELEMENTQUANTITY('${d}',$,'${rt(i.name)}',$,$,(${l}));`;
|
|
4123
|
+
n.push(f);
|
|
4124
|
+
const u = this.nextExpressId++;
|
|
4037
4125
|
s++;
|
|
4038
|
-
const p = this.generateGlobalId(),
|
|
4039
|
-
n.push(
|
|
4126
|
+
const p = this.generateGlobalId(), I = `#${u}=IFCRELDEFINESBYPROPERTIES('${p}',$,$,$,(#${t}),#${c});`;
|
|
4127
|
+
n.push(I);
|
|
4040
4128
|
}
|
|
4041
4129
|
return {
|
|
4042
4130
|
lines: n,
|
|
@@ -4046,22 +4134,22 @@ END-ISO-10303-21;
|
|
|
4046
4134
|
applyAttributeMutations(t, e, n) {
|
|
4047
4135
|
const s = t.indexOf("("), i = t.lastIndexOf(");");
|
|
4048
4136
|
if (s < 0 || i < s) return t;
|
|
4049
|
-
const o =
|
|
4137
|
+
const o = qe(e);
|
|
4050
4138
|
if (o.length === 0) return t;
|
|
4051
|
-
const c =
|
|
4139
|
+
const c = Be(t.slice(s + 1, i));
|
|
4052
4140
|
let l = !1;
|
|
4053
|
-
for (const [d,
|
|
4054
|
-
const
|
|
4055
|
-
|
|
4141
|
+
for (const [d, f] of n){
|
|
4142
|
+
const u = o.indexOf(d);
|
|
4143
|
+
u < 0 || u >= c.length || (c[u] = ns(f, c[u]), l = !0);
|
|
4056
4144
|
}
|
|
4057
4145
|
return l ? `${t.slice(0, s + 1)}${c.join(",")}${t.slice(i)}` : t;
|
|
4058
4146
|
}
|
|
4059
4147
|
applyPositionalMutations(t, e) {
|
|
4060
4148
|
const n = t.indexOf("("), s = t.lastIndexOf(");");
|
|
4061
4149
|
if (n < 0 || s < n) return t;
|
|
4062
|
-
const i =
|
|
4150
|
+
const i = Be(t.slice(n + 1, s));
|
|
4063
4151
|
let o = !1;
|
|
4064
|
-
for (const [c, l] of e)c < 0 || c >= i.length || (i[c] =
|
|
4152
|
+
for (const [c, l] of e)c < 0 || c >= i.length || (i[c] = ue(l), o = !0);
|
|
4065
4153
|
return o ? `${t.slice(0, n + 1)}${i.join(",")}${t.slice(s)}` : t;
|
|
4066
4154
|
}
|
|
4067
4155
|
resolveMapUnitReference(t, e) {
|
|
@@ -4072,8 +4160,8 @@ END-ISO-10303-21;
|
|
|
4072
4160
|
return e.push(`#${o}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), o;
|
|
4073
4161
|
}
|
|
4074
4162
|
if (n === "FOOT" || n === "US SURVEY FOOT") {
|
|
4075
|
-
const o = this.nextExpressId++, c = this.nextExpressId++, l = this.nextExpressId++, d = this.nextExpressId++,
|
|
4076
|
-
return e.push(`#${o}=IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);`), e.push(`#${c}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), e.push(`#${l}=IFCMEASUREWITHUNIT(IFCLENGTHMEASURE(${
|
|
4163
|
+
const o = this.nextExpressId++, c = this.nextExpressId++, l = this.nextExpressId++, d = this.nextExpressId++, f = n === "US SURVEY FOOT" ? 1200 / 3937 : .3048, u = n === "US SURVEY FOOT" ? "US SURVEY FOOT" : "FOOT";
|
|
4164
|
+
return e.push(`#${o}=IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);`), e.push(`#${c}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), e.push(`#${l}=IFCMEASUREWITHUNIT(IFCLENGTHMEASURE(${et(f)}),#${c});`), e.push(`#${d}=IFCCONVERSIONBASEDUNIT(#${o},.LENGTHUNIT.,'${u}',#${l});`), d;
|
|
4077
4165
|
}
|
|
4078
4166
|
const i = this.nextExpressId++;
|
|
4079
4167
|
return e.push(`#${i}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), i;
|
|
@@ -4090,15 +4178,15 @@ END-ISO-10303-21;
|
|
|
4090
4178
|
if (!Array.isArray(l)) return null;
|
|
4091
4179
|
for (const d of l){
|
|
4092
4180
|
if (typeof d != "number") continue;
|
|
4093
|
-
const
|
|
4094
|
-
if (!
|
|
4095
|
-
const p =
|
|
4096
|
-
if ((typeof
|
|
4181
|
+
const f = this.dataStore.entityIndex.byId.get(d), u = f ? this.entityExtractor.extractEntity(f) : null;
|
|
4182
|
+
if (!u) continue;
|
|
4183
|
+
const p = u.type.toUpperCase(), I = u.attributes ?? [];
|
|
4184
|
+
if ((typeof I[1] == "string" ? I[1].replace(/\./g, "").toUpperCase() : "") === "LENGTHUNIT") {
|
|
4097
4185
|
if (p === "IFCSIUNIT") {
|
|
4098
|
-
const y = typeof
|
|
4186
|
+
const y = typeof I[2] == "string" ? I[2].replace(/\./g, "").toUpperCase() : "", E = typeof I[3] == "string" ? I[3].replace(/\./g, "").toUpperCase() : "", C = y ? `${y}${E}` : E;
|
|
4099
4187
|
if (t === "METRE" && (C === "METRE" || C === "METER")) return d;
|
|
4100
4188
|
}
|
|
4101
|
-
if (p === "IFCCONVERSIONBASEDUNIT" && (typeof
|
|
4189
|
+
if (p === "IFCCONVERSIONBASEDUNIT" && (typeof I[2] == "string" ? this.normalizeMapUnitName(I[2]) : "") === t) return d;
|
|
4102
4190
|
}
|
|
4103
4191
|
}
|
|
4104
4192
|
return null;
|
|
@@ -4116,7 +4204,7 @@ END-ISO-10303-21;
|
|
|
4116
4204
|
return e ?? t[0] ?? null;
|
|
4117
4205
|
}
|
|
4118
4206
|
generateGlobalId() {
|
|
4119
|
-
return
|
|
4207
|
+
return Qe();
|
|
4120
4208
|
}
|
|
4121
4209
|
findMaxExpressId() {
|
|
4122
4210
|
let t = 0;
|
|
@@ -4179,7 +4267,7 @@ END-ISO-10303-21;
|
|
|
4179
4267
|
getRelatedEntities(t) {
|
|
4180
4268
|
const e = this.dataStore.entityIndex.byId.get(t);
|
|
4181
4269
|
if (!e || !this.dataStore.source) return [];
|
|
4182
|
-
const s =
|
|
4270
|
+
const s = it(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/\(([^)]+)\)\s*,\s*#(\d+)\s*\)\s*;/);
|
|
4183
4271
|
if (!s) return [];
|
|
4184
4272
|
const i = s[1], o = [], c = i.matchAll(/#(\d+)/g);
|
|
4185
4273
|
for (const l of c)o.push(parseInt(l[1], 10));
|
|
@@ -4188,25 +4276,25 @@ END-ISO-10303-21;
|
|
|
4188
4276
|
getRelatedPropertySet(t) {
|
|
4189
4277
|
const e = this.dataStore.entityIndex.byId.get(t);
|
|
4190
4278
|
if (!e || !this.dataStore.source) return null;
|
|
4191
|
-
const s =
|
|
4279
|
+
const s = it(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/,\s*#(\d+)\s*\)\s*;$/);
|
|
4192
4280
|
return s ? parseInt(s[1], 10) : null;
|
|
4193
4281
|
}
|
|
4194
4282
|
getPropertySetName(t) {
|
|
4195
4283
|
const e = this.dataStore.entityIndex.byId.get(t);
|
|
4196
4284
|
if (!e || !this.dataStore.source) return null;
|
|
4197
|
-
const s =
|
|
4285
|
+
const s = it(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/IFCPROPERTYSET\s*\([^,]*,[^,]*,'([^']*)'/i);
|
|
4198
4286
|
return s ? s[1] : null;
|
|
4199
4287
|
}
|
|
4200
4288
|
getElementQuantityName(t) {
|
|
4201
4289
|
const e = this.dataStore.entityIndex.byId.get(t);
|
|
4202
4290
|
if (!e || !this.dataStore.source) return null;
|
|
4203
|
-
const s =
|
|
4291
|
+
const s = it(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/IFCELEMENTQUANTITY\s*\([^,]*,[^,]*,'([^']*)'/i);
|
|
4204
4292
|
return s ? s[1] : null;
|
|
4205
4293
|
}
|
|
4206
4294
|
getPropertyIdsInSet(t) {
|
|
4207
4295
|
const e = this.dataStore.entityIndex.byId.get(t);
|
|
4208
4296
|
if (!e || !this.dataStore.source) return [];
|
|
4209
|
-
const s =
|
|
4297
|
+
const s = it(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/\(\s*(#[^)]+)\s*\)\s*\)\s*;$/);
|
|
4210
4298
|
if (!s) return [];
|
|
4211
4299
|
const i = s[1], o = [], c = i.matchAll(/#(\d+)/g);
|
|
4212
4300
|
for (const l of c)o.push(parseInt(l[1], 10));
|
|
@@ -4227,8 +4315,8 @@ END-ISO-10303-21;
|
|
|
4227
4315
|
for (const l of e){
|
|
4228
4316
|
const d = this.getPropertySetName(l);
|
|
4229
4317
|
if (d && n.has(d)) {
|
|
4230
|
-
const
|
|
4231
|
-
|
|
4318
|
+
const f = s.get(d);
|
|
4319
|
+
f !== void 0 && (i.push(f), o.add(d));
|
|
4232
4320
|
continue;
|
|
4233
4321
|
}
|
|
4234
4322
|
i.push(l);
|
|
@@ -4240,20 +4328,20 @@ END-ISO-10303-21;
|
|
|
4240
4328
|
replaceEntityAttribute(t, e, n) {
|
|
4241
4329
|
const s = this.dataStore.entityIndex.byId.get(t);
|
|
4242
4330
|
if (!s || !this.dataStore.source) return null;
|
|
4243
|
-
const o =
|
|
4331
|
+
const o = it(this.dataStore.source, s.byteOffset, s.byteOffset + s.byteLength).match(/^(#\d+\s*=\s*\w+\()([\s\S]*)(\)\s*;)\s*$/);
|
|
4244
4332
|
if (!o) return null;
|
|
4245
|
-
const [, c, l, d] = o,
|
|
4246
|
-
return e >=
|
|
4333
|
+
const [, c, l, d] = o, f = is(l);
|
|
4334
|
+
return e >= f.length ? null : (f[e] = n, `${c}${f.join(",")}${d}`);
|
|
4247
4335
|
}
|
|
4248
4336
|
};
|
|
4249
|
-
|
|
4250
|
-
const n = new
|
|
4337
|
+
gs = function(r, t) {
|
|
4338
|
+
const n = new rs(r).export({
|
|
4251
4339
|
schema: "IFC4",
|
|
4252
4340
|
...t
|
|
4253
4341
|
});
|
|
4254
4342
|
return new TextDecoder().decode(n.content);
|
|
4255
4343
|
};
|
|
4256
|
-
function
|
|
4344
|
+
function os(r, t) {
|
|
4257
4345
|
const e = new TextEncoder, n = e.encode(`${r}DATA;
|
|
4258
4346
|
`), s = e.encode(`ENDSEC;
|
|
4259
4347
|
END-ISO-10303-21;
|
|
@@ -4261,26 +4349,26 @@ END-ISO-10303-21;
|
|
|
4261
4349
|
`);
|
|
4262
4350
|
let o = n.byteLength + s.byteLength;
|
|
4263
4351
|
const c = new Array(t.length);
|
|
4264
|
-
for(let
|
|
4352
|
+
for(let f = 0; f < t.length; f++)c[f] = e.encode(t[f]), o += c[f].byteLength + i.byteLength;
|
|
4265
4353
|
const l = new Uint8Array(o);
|
|
4266
4354
|
let d = 0;
|
|
4267
4355
|
l.set(n, d), d += n.byteLength;
|
|
4268
|
-
for(let
|
|
4356
|
+
for(let f = 0; f < c.length; f++)l.set(c[f], d), d += c[f].byteLength, l.set(i, d), d += i.byteLength;
|
|
4269
4357
|
return l.set(s, d), l;
|
|
4270
4358
|
}
|
|
4271
|
-
const
|
|
4359
|
+
const as = new Set([
|
|
4272
4360
|
"IFCUNITASSIGNMENT",
|
|
4273
4361
|
"IFCGEOMETRICREPRESENTATIONCONTEXT",
|
|
4274
4362
|
"IFCGEOMETRICREPRESENTATIONSUBCONTEXT"
|
|
4275
4363
|
]);
|
|
4276
|
-
|
|
4364
|
+
_s = class {
|
|
4277
4365
|
models;
|
|
4278
4366
|
constructor(t){
|
|
4279
4367
|
if (t.length === 0) throw new Error("MergedExporter requires at least one model");
|
|
4280
4368
|
this.models = t;
|
|
4281
4369
|
}
|
|
4282
4370
|
export(t) {
|
|
4283
|
-
const e = t.onProgress, n = t.schema || "IFC4", s =
|
|
4371
|
+
const e = t.onProgress, n = t.schema || "IFC4", s = ie({
|
|
4284
4372
|
schema: n,
|
|
4285
4373
|
description: t.description || `Merged export of ${this.models.length} models from ifc-lite`,
|
|
4286
4374
|
author: t.author || "",
|
|
@@ -4296,39 +4384,39 @@ END-ISO-10303-21;
|
|
|
4296
4384
|
for (const [C] of y.dataStore.entityIndex.byId)C > E && (E = C);
|
|
4297
4385
|
o += E;
|
|
4298
4386
|
}
|
|
4299
|
-
const l = this.models[0], d = c.get(l.id),
|
|
4300
|
-
let
|
|
4387
|
+
const l = this.models[0], d = c.get(l.id), f = this.findInfrastructureEntities(l.dataStore), u = this.findEntitiesByType(l.dataStore, "IFCPROJECT"), p = this.buildSpatialLookup(l.dataStore);
|
|
4388
|
+
let I = !0;
|
|
4301
4389
|
for (const y of this.models){
|
|
4302
4390
|
const E = c.get(y.id), C = y.dataStore.source;
|
|
4303
4391
|
if (!C || C.length === 0) continue;
|
|
4304
4392
|
let T = null;
|
|
4305
4393
|
if (t.visibleOnly) {
|
|
4306
|
-
const
|
|
4307
|
-
T =
|
|
4394
|
+
const k = t.hiddenEntityIdsByModel?.get(y.id) ?? new Set, O = t.isolatedEntityIdsByModel?.get(y.id) ?? null, { roots: D, hiddenProductIds: b } = le(y.dataStore, k, O);
|
|
4395
|
+
T = ce(D, C, y.dataStore.entityIndex.byId, b), de(T, C, y.dataStore.entityIndex);
|
|
4308
4396
|
}
|
|
4309
|
-
const
|
|
4310
|
-
if (!
|
|
4311
|
-
const
|
|
4312
|
-
if (
|
|
4397
|
+
const G = new Map, x = new Set;
|
|
4398
|
+
if (!I) {
|
|
4399
|
+
const k = this.findEntitiesByType(y.dataStore, "IFCPROJECT");
|
|
4400
|
+
if (u.length > 0) for (const D of k)G.set(D, u[0] + d), x.add(D);
|
|
4313
4401
|
const O = this.findInfrastructureEntities(y.dataStore);
|
|
4314
|
-
for (const [
|
|
4315
|
-
const S = O.get(
|
|
4316
|
-
S && b.length > 0 && S.length > 0 && (
|
|
4402
|
+
for (const [D, b] of f){
|
|
4403
|
+
const S = O.get(D);
|
|
4404
|
+
S && b.length > 0 && S.length > 0 && (G.set(S[0], b[0] + d), x.add(S[0]));
|
|
4317
4405
|
}
|
|
4318
|
-
this.unifySpatialEntities(y.dataStore, p, d,
|
|
4406
|
+
this.unifySpatialEntities(y.dataStore, p, d, G, x), this.skipRedundantRelAggregates(y.dataStore, G, x);
|
|
4319
4407
|
}
|
|
4320
|
-
for (const [
|
|
4321
|
-
if (T !== null && !T.has(
|
|
4322
|
-
const
|
|
4408
|
+
for (const [k, O] of y.dataStore.entityIndex.byId){
|
|
4409
|
+
if (T !== null && !T.has(k) || x.has(k)) continue;
|
|
4410
|
+
const D = it(C, O.byteOffset, O.byteOffset + O.byteLength);
|
|
4323
4411
|
let b;
|
|
4324
|
-
E === 0 &&
|
|
4412
|
+
E === 0 && G.size === 0 ? b = D : b = this.remapEntityText(D, E, G);
|
|
4325
4413
|
const S = y.dataStore.schemaVersion || "IFC4";
|
|
4326
|
-
if (
|
|
4327
|
-
const F =
|
|
4414
|
+
if (fe(S, n)) {
|
|
4415
|
+
const F = qt(b, S, n);
|
|
4328
4416
|
F !== null && i.push(F);
|
|
4329
4417
|
} else i.push(b);
|
|
4330
4418
|
}
|
|
4331
|
-
|
|
4419
|
+
I = !1;
|
|
4332
4420
|
}
|
|
4333
4421
|
e && e({
|
|
4334
4422
|
phase: "assembling",
|
|
@@ -4347,7 +4435,7 @@ END-ISO-10303-21;
|
|
|
4347
4435
|
};
|
|
4348
4436
|
}
|
|
4349
4437
|
async exportAsync(t) {
|
|
4350
|
-
const e = t.onProgress, n = t.schema || "IFC4", s =
|
|
4438
|
+
const e = t.onProgress, n = t.schema || "IFC4", s = ie({
|
|
4351
4439
|
schema: n,
|
|
4352
4440
|
description: t.description || `Merged export of ${this.models.length} models from ifc-lite`,
|
|
4353
4441
|
author: t.author || "",
|
|
@@ -4361,11 +4449,11 @@ END-ISO-10303-21;
|
|
|
4361
4449
|
const l = new Map;
|
|
4362
4450
|
for (const T of this.models){
|
|
4363
4451
|
l.set(T.id, c - 1);
|
|
4364
|
-
let
|
|
4365
|
-
for (const [x] of T.dataStore.entityIndex.byId)x >
|
|
4366
|
-
c +=
|
|
4452
|
+
let G = 0;
|
|
4453
|
+
for (const [x] of T.dataStore.entityIndex.byId)x > G && (G = x);
|
|
4454
|
+
c += G;
|
|
4367
4455
|
}
|
|
4368
|
-
const d = this.models[0],
|
|
4456
|
+
const d = this.models[0], f = l.get(d.id), u = this.findInfrastructureEntities(d.dataStore), p = this.findEntitiesByType(d.dataStore, "IFCPROJECT"), I = this.buildSpatialLookup(d.dataStore);
|
|
4369
4457
|
let h = !0, y = 0;
|
|
4370
4458
|
const E = 2e3;
|
|
4371
4459
|
e && e({
|
|
@@ -4375,7 +4463,7 @@ END-ISO-10303-21;
|
|
|
4375
4463
|
entitiesTotal: o
|
|
4376
4464
|
});
|
|
4377
4465
|
for (const T of this.models){
|
|
4378
|
-
const
|
|
4466
|
+
const G = l.get(T.id), x = T.dataStore.source;
|
|
4379
4467
|
if (!x || x.length === 0) continue;
|
|
4380
4468
|
e && e({
|
|
4381
4469
|
phase: "entities",
|
|
@@ -4384,32 +4472,32 @@ END-ISO-10303-21;
|
|
|
4384
4472
|
entitiesTotal: o,
|
|
4385
4473
|
currentModel: T.name
|
|
4386
4474
|
});
|
|
4387
|
-
let
|
|
4475
|
+
let k = null;
|
|
4388
4476
|
if (t.visibleOnly) {
|
|
4389
|
-
const S = t.hiddenEntityIdsByModel?.get(T.id) ?? new Set, F = t.isolatedEntityIdsByModel?.get(T.id) ?? null, { roots: m, hiddenProductIds: _ } =
|
|
4390
|
-
|
|
4477
|
+
const S = t.hiddenEntityIdsByModel?.get(T.id) ?? new Set, F = t.isolatedEntityIdsByModel?.get(T.id) ?? null, { roots: m, hiddenProductIds: _ } = le(T.dataStore, S, F);
|
|
4478
|
+
k = ce(m, x, T.dataStore.entityIndex.byId, _), de(k, x, T.dataStore.entityIndex);
|
|
4391
4479
|
}
|
|
4392
|
-
const O = new Map,
|
|
4480
|
+
const O = new Map, D = new Set;
|
|
4393
4481
|
if (!h) {
|
|
4394
4482
|
const S = this.findEntitiesByType(T.dataStore, "IFCPROJECT");
|
|
4395
|
-
if (p.length > 0) for (const m of S)O.set(m, p[0] +
|
|
4483
|
+
if (p.length > 0) for (const m of S)O.set(m, p[0] + f), D.add(m);
|
|
4396
4484
|
const F = this.findInfrastructureEntities(T.dataStore);
|
|
4397
|
-
for (const [m, _] of
|
|
4485
|
+
for (const [m, _] of u){
|
|
4398
4486
|
const w = F.get(m);
|
|
4399
|
-
w && _.length > 0 && w.length > 0 && (O.set(w[0], _[0] +
|
|
4487
|
+
w && _.length > 0 && w.length > 0 && (O.set(w[0], _[0] + f), D.add(w[0]));
|
|
4400
4488
|
}
|
|
4401
|
-
this.unifySpatialEntities(T.dataStore,
|
|
4489
|
+
this.unifySpatialEntities(T.dataStore, I, f, O, D), this.skipRedundantRelAggregates(T.dataStore, O, D);
|
|
4402
4490
|
}
|
|
4403
4491
|
let b = 0;
|
|
4404
4492
|
for (const [S, F] of T.dataStore.entityIndex.byId){
|
|
4405
|
-
if (
|
|
4406
|
-
const m =
|
|
4493
|
+
if (k !== null && !k.has(S) || D.has(S)) continue;
|
|
4494
|
+
const m = it(x, F.byteOffset, F.byteOffset + F.byteLength);
|
|
4407
4495
|
let _;
|
|
4408
|
-
|
|
4496
|
+
G === 0 && O.size === 0 ? _ = m : _ = this.remapEntityText(m, G, O);
|
|
4409
4497
|
const w = T.dataStore.schemaVersion || "IFC4";
|
|
4410
|
-
if (
|
|
4411
|
-
const
|
|
4412
|
-
|
|
4498
|
+
if (fe(w, n)) {
|
|
4499
|
+
const g = qt(_, w, n);
|
|
4500
|
+
g !== null && i.push(g);
|
|
4413
4501
|
} else i.push(_);
|
|
4414
4502
|
b++, y++, b % E === 0 && (e && e({
|
|
4415
4503
|
phase: "entities",
|
|
@@ -4417,7 +4505,7 @@ END-ISO-10303-21;
|
|
|
4417
4505
|
entitiesProcessed: y,
|
|
4418
4506
|
entitiesTotal: o,
|
|
4419
4507
|
currentModel: T.name
|
|
4420
|
-
}), await new Promise((
|
|
4508
|
+
}), await new Promise((g)=>setTimeout(g, 0)));
|
|
4421
4509
|
}
|
|
4422
4510
|
h = !1;
|
|
4423
4511
|
}
|
|
@@ -4443,14 +4531,35 @@ END-ISO-10303-21;
|
|
|
4443
4531
|
};
|
|
4444
4532
|
}
|
|
4445
4533
|
remapEntityText(t, e, n) {
|
|
4446
|
-
|
|
4447
|
-
const
|
|
4448
|
-
return
|
|
4449
|
-
}
|
|
4534
|
+
const s = (c)=>{
|
|
4535
|
+
const l = n.get(c);
|
|
4536
|
+
return l !== void 0 ? `#${l}` : `#${c + e}`;
|
|
4537
|
+
};
|
|
4538
|
+
let i = "", o = !1;
|
|
4539
|
+
for(let c = 0; c < t.length; c++){
|
|
4540
|
+
const l = t[c];
|
|
4541
|
+
if (o) {
|
|
4542
|
+
i += l, l === "'" && (t[c + 1] === "'" ? (i += t[c + 1], c++) : o = !1);
|
|
4543
|
+
continue;
|
|
4544
|
+
}
|
|
4545
|
+
if (l === "'") {
|
|
4546
|
+
o = !0, i += l;
|
|
4547
|
+
continue;
|
|
4548
|
+
}
|
|
4549
|
+
if (l === "#" && t[c + 1] >= "0" && t[c + 1] <= "9") {
|
|
4550
|
+
let d = c + 1;
|
|
4551
|
+
for(; d < t.length && t[d] >= "0" && t[d] <= "9";)d++;
|
|
4552
|
+
const f = parseInt(t.slice(c + 1, d), 10);
|
|
4553
|
+
i += s(f), c = d - 1;
|
|
4554
|
+
continue;
|
|
4555
|
+
}
|
|
4556
|
+
i += l;
|
|
4557
|
+
}
|
|
4558
|
+
return i;
|
|
4450
4559
|
}
|
|
4451
4560
|
findInfrastructureEntities(t) {
|
|
4452
4561
|
const e = new Map;
|
|
4453
|
-
for (const n of
|
|
4562
|
+
for (const n of as){
|
|
4454
4563
|
const s = t.entityIndex.byType.get(n) ?? [];
|
|
4455
4564
|
s.length > 0 && e.set(n, [
|
|
4456
4565
|
...s
|
|
@@ -4494,36 +4603,36 @@ END-ISO-10303-21;
|
|
|
4494
4603
|
unifySpatialEntities(t, e, n, s, i) {
|
|
4495
4604
|
const o = this.findEntitiesByType(t, "IFCSITE");
|
|
4496
4605
|
for (const d of o){
|
|
4497
|
-
const
|
|
4498
|
-
let
|
|
4499
|
-
|
|
4606
|
+
const f = this.extractEntityName(d, t);
|
|
4607
|
+
let u;
|
|
4608
|
+
f && (u = e.sitesByName.get(f.toLowerCase())), u === void 0 && o.length === 1 && e.siteIds.length === 1 && (u = e.siteIds[0]), u !== void 0 && (s.set(d, u + n), i.add(d));
|
|
4500
4609
|
}
|
|
4501
4610
|
const c = this.findEntitiesByType(t, "IFCBUILDING");
|
|
4502
4611
|
for (const d of c){
|
|
4503
|
-
const
|
|
4504
|
-
let
|
|
4505
|
-
|
|
4612
|
+
const f = this.extractEntityName(d, t);
|
|
4613
|
+
let u;
|
|
4614
|
+
f && (u = e.buildingsByName.get(f.toLowerCase())), u === void 0 && c.length === 1 && e.buildingIds.length === 1 && (u = e.buildingIds[0]), u !== void 0 && (s.set(d, u + n), i.add(d));
|
|
4506
4615
|
}
|
|
4507
4616
|
const l = new Set;
|
|
4508
4617
|
for (const d of this.findEntitiesByType(t, "IFCBUILDINGSTOREY")){
|
|
4509
|
-
const
|
|
4510
|
-
let
|
|
4511
|
-
if (
|
|
4512
|
-
const p = e.storeysByName.get(
|
|
4513
|
-
p !== void 0 && !l.has(p) && (
|
|
4618
|
+
const f = this.extractEntityName(d, t);
|
|
4619
|
+
let u;
|
|
4620
|
+
if (f) {
|
|
4621
|
+
const p = e.storeysByName.get(f.toLowerCase());
|
|
4622
|
+
p !== void 0 && !l.has(p) && (u = p);
|
|
4514
4623
|
}
|
|
4515
|
-
if (
|
|
4624
|
+
if (u === void 0) {
|
|
4516
4625
|
const p = this.extractStoreyElevation(d, t);
|
|
4517
|
-
if (p !== void 0) for (const
|
|
4518
|
-
if (l.has(
|
|
4519
|
-
const h = Math.max(.5, Math.abs(
|
|
4520
|
-
if (Math.abs(p -
|
|
4521
|
-
|
|
4626
|
+
if (p !== void 0) for (const I of e.storeysByElevation){
|
|
4627
|
+
if (l.has(I.expressId)) continue;
|
|
4628
|
+
const h = Math.max(.5, Math.abs(I.elevation) * .01);
|
|
4629
|
+
if (Math.abs(p - I.elevation) <= h) {
|
|
4630
|
+
u = I.expressId;
|
|
4522
4631
|
break;
|
|
4523
4632
|
}
|
|
4524
4633
|
}
|
|
4525
4634
|
}
|
|
4526
|
-
|
|
4635
|
+
u !== void 0 && (l.add(u), s.set(d, u + n), i.add(d));
|
|
4527
4636
|
}
|
|
4528
4637
|
}
|
|
4529
4638
|
skipRedundantRelAggregates(t, e, n) {
|
|
@@ -4535,9 +4644,9 @@ END-ISO-10303-21;
|
|
|
4535
4644
|
const c = this.extractStepAttribute(s, t, 5);
|
|
4536
4645
|
if (!c) continue;
|
|
4537
4646
|
const l = [], d = /#(\d+)/g;
|
|
4538
|
-
let
|
|
4539
|
-
for(; (
|
|
4540
|
-
l.length !== 0 && l.every((
|
|
4647
|
+
let f;
|
|
4648
|
+
for(; (f = d.exec(c)) !== null;)l.push(parseInt(f[1], 10));
|
|
4649
|
+
l.length !== 0 && l.every((u)=>e.has(u)) && n.add(s);
|
|
4541
4650
|
}
|
|
4542
4651
|
}
|
|
4543
4652
|
extractEntityName(t, e) {
|
|
@@ -4545,7 +4654,7 @@ END-ISO-10303-21;
|
|
|
4545
4654
|
if (!n || n === "$") return null;
|
|
4546
4655
|
if (n.startsWith("'") && n.endsWith("'")) {
|
|
4547
4656
|
const s = n.slice(1, -1).replace(/''/g, "'");
|
|
4548
|
-
return
|
|
4657
|
+
return Ke(s);
|
|
4549
4658
|
}
|
|
4550
4659
|
return null;
|
|
4551
4660
|
}
|
|
@@ -4560,26 +4669,26 @@ END-ISO-10303-21;
|
|
|
4560
4669
|
if (!s) return null;
|
|
4561
4670
|
const i = e.entityIndex.byId.get(t);
|
|
4562
4671
|
if (!i) return null;
|
|
4563
|
-
const o =
|
|
4672
|
+
const o = it(s, i.byteOffset, i.byteOffset + i.byteLength), c = o.indexOf("(");
|
|
4564
4673
|
if (c === -1) return null;
|
|
4565
|
-
let l = 0, d = 0,
|
|
4674
|
+
let l = 0, d = 0, f = c + 1, u = !1;
|
|
4566
4675
|
for(let p = c + 1; p < o.length; p++){
|
|
4567
|
-
const
|
|
4568
|
-
if (
|
|
4569
|
-
else if (
|
|
4676
|
+
const I = o[p];
|
|
4677
|
+
if (I === "'" && !u) u = !0;
|
|
4678
|
+
else if (I === "'" && u) {
|
|
4570
4679
|
if (p + 1 < o.length && o[p + 1] === "'") {
|
|
4571
4680
|
p++;
|
|
4572
4681
|
continue;
|
|
4573
4682
|
}
|
|
4574
|
-
|
|
4575
|
-
} else if (!
|
|
4576
|
-
if (
|
|
4577
|
-
else if (
|
|
4578
|
-
if (l === 0) return d === n ? o.substring(
|
|
4683
|
+
u = !1;
|
|
4684
|
+
} else if (!u) {
|
|
4685
|
+
if (I === "(") l++;
|
|
4686
|
+
else if (I === ")") {
|
|
4687
|
+
if (l === 0) return d === n ? o.substring(f, p).trim() : null;
|
|
4579
4688
|
l--;
|
|
4580
|
-
} else if (
|
|
4581
|
-
if (d === n) return o.substring(
|
|
4582
|
-
d++,
|
|
4689
|
+
} else if (I === "," && l === 0) {
|
|
4690
|
+
if (d === n) return o.substring(f, p).trim();
|
|
4691
|
+
d++, f = p + 1;
|
|
4583
4692
|
}
|
|
4584
4693
|
}
|
|
4585
4694
|
}
|
|
@@ -4594,20 +4703,20 @@ END-ISO-10303-21;
|
|
|
4594
4703
|
`);
|
|
4595
4704
|
let o = n.byteLength + s.byteLength;
|
|
4596
4705
|
const c = new Array(t.length);
|
|
4597
|
-
for(let
|
|
4706
|
+
for(let f = 0; f < t.length; f++)c[f] = e.encode(t[f]), o += c[f].byteLength + i.byteLength;
|
|
4598
4707
|
const l = new Uint8Array(o);
|
|
4599
4708
|
let d = 0;
|
|
4600
4709
|
l.set(n, d), d += n.byteLength;
|
|
4601
|
-
for(let
|
|
4710
|
+
for(let f = 0; f < c.length; f++)l.set(c[f], d), d += c[f].byteLength, l.set(i, d), d += i.byteLength;
|
|
4602
4711
|
return l.set(s, d), l;
|
|
4603
4712
|
}
|
|
4604
|
-
let
|
|
4605
|
-
|
|
4713
|
+
let ne;
|
|
4714
|
+
ne = {
|
|
4606
4715
|
IFC_CORE: "https://ifcx.dev/@standards.buildingsmart.org/ifc/core/ifc@v5a.ifcx",
|
|
4607
4716
|
IFC_PROP: "https://ifcx.dev/@standards.buildingsmart.org/ifc/core/prop@v5a.ifcx",
|
|
4608
4717
|
USD: "https://ifcx.dev/@openusd.org/usd@v1.ifcx"
|
|
4609
4718
|
};
|
|
4610
|
-
|
|
4719
|
+
Ue = new Set([
|
|
4611
4720
|
"UsageType",
|
|
4612
4721
|
"TypeName",
|
|
4613
4722
|
"IsExternal",
|
|
@@ -4626,7 +4735,7 @@ END-ISO-10303-21;
|
|
|
4626
4735
|
"CrossSectionArea",
|
|
4627
4736
|
"Station"
|
|
4628
4737
|
]);
|
|
4629
|
-
|
|
4738
|
+
Is = class {
|
|
4630
4739
|
dataStore;
|
|
4631
4740
|
mutationView;
|
|
4632
4741
|
geometryResult;
|
|
@@ -4643,47 +4752,47 @@ END-ISO-10303-21;
|
|
|
4643
4752
|
this.buildEntityMaps();
|
|
4644
4753
|
const n = this.buildMeshLookup(t), s = this.buildVisibleSet(t), i = t.onlyTreeEntities !== !1 ? this.buildTreeEntitySet() : null, o = [];
|
|
4645
4754
|
let c = 0, l = 0;
|
|
4646
|
-
const { entities: d, strings:
|
|
4647
|
-
let
|
|
4755
|
+
const { entities: d, strings: f } = this.dataStore;
|
|
4756
|
+
let u = null;
|
|
4648
4757
|
for(let y = 0; y < d.count; y++){
|
|
4649
4758
|
const E = d.expressId[y];
|
|
4650
4759
|
if (s && !s.has(E) || i && !i.has(E)) continue;
|
|
4651
|
-
const C = d.typeEnum[y], T =
|
|
4652
|
-
x === "IfcProject" && (
|
|
4653
|
-
const
|
|
4760
|
+
const C = d.typeEnum[y], T = re(C) || "IfcElement", G = ze(T.toUpperCase(), e, "IFC5"), x = ls(G);
|
|
4761
|
+
x === "IfcProject" && (u = E);
|
|
4762
|
+
const k = this.entityUuids.get(E) || se(E), O = {};
|
|
4654
4763
|
O["bsi::ifc::class"] = {
|
|
4655
4764
|
code: x,
|
|
4656
4765
|
uri: `https://identifier.buildingsmart.org/uri/buildingsmart/ifc/5/class/${x}`
|
|
4657
4766
|
};
|
|
4658
|
-
const
|
|
4659
|
-
|
|
4660
|
-
const b =
|
|
4767
|
+
const D = f.get(d.name[y]) || this.spatialNodeNames.get(E);
|
|
4768
|
+
D && (O["bsi::ifc::prop::Name"] = D);
|
|
4769
|
+
const b = f.get(d.description[y]);
|
|
4661
4770
|
if (b && (O["bsi::ifc::prop::Description"] = b), t.includeProperties !== !1) {
|
|
4662
4771
|
const m = this.getPropertiesForEntity(E, t);
|
|
4663
4772
|
for (const [_, w] of Object.entries(m))O[_] = w, c++;
|
|
4664
4773
|
}
|
|
4665
4774
|
const S = {
|
|
4666
|
-
path:
|
|
4775
|
+
path: k
|
|
4667
4776
|
}, F = this.getChildrenForEntity(E);
|
|
4668
4777
|
if (Object.keys(F).length > 0 && (S.children = F), t.includeGeometry !== !1) {
|
|
4669
4778
|
const m = n.get(E);
|
|
4670
4779
|
if (m && m.length > 0) {
|
|
4671
4780
|
const _ = this.convertToUsdMesh(m);
|
|
4672
4781
|
O["usd::usdgeom::mesh"] = _;
|
|
4673
|
-
const [w,
|
|
4782
|
+
const [w, g, R, N] = m[0].color;
|
|
4674
4783
|
O["bsi::ifc::presentation::diffuseColor"] = [
|
|
4675
4784
|
w,
|
|
4676
|
-
|
|
4785
|
+
g,
|
|
4677
4786
|
R
|
|
4678
4787
|
], N < 1 && (O["bsi::ifc::presentation::opacity"] = N), l++;
|
|
4679
4788
|
}
|
|
4680
4789
|
}
|
|
4681
4790
|
Object.keys(O).length > 0 && (S.attributes = O), o.push(S);
|
|
4682
4791
|
}
|
|
4683
|
-
if (
|
|
4684
|
-
const y = this.entityUuids.get(
|
|
4792
|
+
if (u !== null) {
|
|
4793
|
+
const y = this.entityUuids.get(u);
|
|
4685
4794
|
if (y) {
|
|
4686
|
-
const E = this.childNames.get(
|
|
4795
|
+
const E = this.childNames.get(u) || f.get(d.name[this.findEntityIndex(u)]) || "Project", C = se(0);
|
|
4687
4796
|
o.unshift({
|
|
4688
4797
|
path: C,
|
|
4689
4798
|
children: {
|
|
@@ -4693,7 +4802,7 @@ END-ISO-10303-21;
|
|
|
4693
4802
|
});
|
|
4694
4803
|
}
|
|
4695
4804
|
}
|
|
4696
|
-
const p =
|
|
4805
|
+
const p = cs(o), I = {
|
|
4697
4806
|
header: {
|
|
4698
4807
|
id: `ifcx_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`,
|
|
4699
4808
|
ifcxVersion: "ifcx_alpha",
|
|
@@ -4704,7 +4813,7 @@ END-ISO-10303-21;
|
|
|
4704
4813
|
imports: p,
|
|
4705
4814
|
schemas: {},
|
|
4706
4815
|
data: o
|
|
4707
|
-
}, h = t.prettyPrint !== !1 ? JSON.stringify(
|
|
4816
|
+
}, h = t.prettyPrint !== !1 ? JSON.stringify(I, null, 2) : JSON.stringify(I);
|
|
4708
4817
|
return {
|
|
4709
4818
|
content: h,
|
|
4710
4819
|
stats: {
|
|
@@ -4724,18 +4833,18 @@ END-ISO-10303-21;
|
|
|
4724
4833
|
const { spatialHierarchy: t, entities: e, strings: n } = this.dataStore;
|
|
4725
4834
|
this.entityUuids.clear();
|
|
4726
4835
|
for(let l = 0; l < e.count; l++){
|
|
4727
|
-
const d = e.expressId[l],
|
|
4728
|
-
this.entityUuids.set(d,
|
|
4836
|
+
const d = e.expressId[l], f = n.get(e.globalId[l]);
|
|
4837
|
+
this.entityUuids.set(d, f || se(d));
|
|
4729
4838
|
}
|
|
4730
4839
|
const s = new Map, i = (l, d)=>{
|
|
4731
|
-
if (d) for (const
|
|
4840
|
+
if (d) for (const f of d)s.set(f, l);
|
|
4732
4841
|
};
|
|
4733
4842
|
if (this.spatialChildIds.clear(), this.spatialNodeNames.clear(), t?.project) {
|
|
4734
4843
|
const l = (d)=>{
|
|
4735
4844
|
d.name && this.spatialNodeNames.set(d.expressId, d.name);
|
|
4736
|
-
const
|
|
4737
|
-
for (const
|
|
4738
|
-
this.spatialChildIds.set(d.expressId,
|
|
4845
|
+
const f = [];
|
|
4846
|
+
for (const u of d.children)s.set(u.expressId, d.expressId), f.push(u.expressId), l(u);
|
|
4847
|
+
this.spatialChildIds.set(d.expressId, f);
|
|
4739
4848
|
};
|
|
4740
4849
|
l(t.project);
|
|
4741
4850
|
}
|
|
@@ -4745,17 +4854,17 @@ END-ISO-10303-21;
|
|
|
4745
4854
|
t.byBuilding,
|
|
4746
4855
|
t.byStorey,
|
|
4747
4856
|
t.bySpace
|
|
4748
|
-
])if (l) for (const [d,
|
|
4857
|
+
])if (l) for (const [d, f] of l)i(d, f);
|
|
4749
4858
|
}
|
|
4750
4859
|
const o = new Map;
|
|
4751
4860
|
for(let l = 0; l < e.count; l++){
|
|
4752
4861
|
const d = e.expressId[l];
|
|
4753
|
-
let
|
|
4754
|
-
if (
|
|
4755
|
-
const
|
|
4756
|
-
|
|
4862
|
+
let f = n.get(e.name[l]) || "";
|
|
4863
|
+
if (f || (f = this.spatialNodeNames.get(d) || ""), !f) {
|
|
4864
|
+
const u = re(e.typeEnum[l]);
|
|
4865
|
+
u !== "Unknown" && (f = u);
|
|
4757
4866
|
}
|
|
4758
|
-
o.set(d,
|
|
4867
|
+
o.set(d, f);
|
|
4759
4868
|
}
|
|
4760
4869
|
const c = new Map;
|
|
4761
4870
|
for (const [l, d] of s)c.has(d) || c.set(d, []), c.get(d).push(l);
|
|
@@ -4766,13 +4875,13 @@ END-ISO-10303-21;
|
|
|
4766
4875
|
this.childNames.clear();
|
|
4767
4876
|
for (const [, l] of c){
|
|
4768
4877
|
const d = new Map;
|
|
4769
|
-
for (const
|
|
4770
|
-
const p = (o.get(
|
|
4878
|
+
for (const f of l){
|
|
4879
|
+
const p = (o.get(f) || `e${f}`).replace(/[/\\]/g, "_").replace(/\s+/g, "_");
|
|
4771
4880
|
d.set(p, (d.get(p) || 0) + 1);
|
|
4772
4881
|
}
|
|
4773
|
-
for (const
|
|
4774
|
-
const p = (o.get(
|
|
4775
|
-
this.childNames.set(
|
|
4882
|
+
for (const f of l){
|
|
4883
|
+
const p = (o.get(f) || `e${f}`).replace(/[/\\]/g, "_").replace(/\s+/g, "_");
|
|
4884
|
+
this.childNames.set(f, d.get(p) > 1 ? `${p}_${f}` : p);
|
|
4776
4885
|
}
|
|
4777
4886
|
}
|
|
4778
4887
|
}
|
|
@@ -4781,14 +4890,14 @@ END-ISO-10303-21;
|
|
|
4781
4890
|
if (this.mutationView && e.applyMutations !== !1) {
|
|
4782
4891
|
const s = this.mutationView.getForEntity(t);
|
|
4783
4892
|
for (const i of s)for (const o of i.properties){
|
|
4784
|
-
if (e.onlyKnownProperties !== !1 && !
|
|
4893
|
+
if (e.onlyKnownProperties !== !1 && !Ue.has(o.name)) continue;
|
|
4785
4894
|
const c = `bsi::ifc::prop::${o.name}`;
|
|
4786
4895
|
n[c] = this.convertPropertyValue(o.value, o.type);
|
|
4787
4896
|
}
|
|
4788
4897
|
} else if (this.dataStore.properties) {
|
|
4789
4898
|
const s = this.dataStore.properties.getForEntity(t);
|
|
4790
4899
|
for (const i of s)for (const o of i.properties){
|
|
4791
|
-
if (e.onlyKnownProperties !== !1 && !
|
|
4900
|
+
if (e.onlyKnownProperties !== !1 && !Ue.has(o.name)) continue;
|
|
4792
4901
|
const c = `bsi::ifc::prop::${o.name}`;
|
|
4793
4902
|
n[c] = this.convertPropertyValue(o.value, o.type);
|
|
4794
4903
|
}
|
|
@@ -4798,12 +4907,12 @@ END-ISO-10303-21;
|
|
|
4798
4907
|
convertPropertyValue(t, e) {
|
|
4799
4908
|
if (t == null) return null;
|
|
4800
4909
|
switch(e){
|
|
4801
|
-
case
|
|
4910
|
+
case st.Real:
|
|
4802
4911
|
return Number(t);
|
|
4803
|
-
case
|
|
4912
|
+
case st.Integer:
|
|
4804
4913
|
return Math.round(Number(t));
|
|
4805
|
-
case
|
|
4806
|
-
case
|
|
4914
|
+
case st.Boolean:
|
|
4915
|
+
case st.Logical:
|
|
4807
4916
|
return !!t;
|
|
4808
4917
|
default:
|
|
4809
4918
|
return t;
|
|
@@ -4887,7 +4996,7 @@ END-ISO-10303-21;
|
|
|
4887
4996
|
return s;
|
|
4888
4997
|
}
|
|
4889
4998
|
};
|
|
4890
|
-
function
|
|
4999
|
+
function cs(r) {
|
|
4891
5000
|
let t = !1, e = !1, n = !1;
|
|
4892
5001
|
for (const i of r)if (i.attributes) {
|
|
4893
5002
|
for (const o of Object.keys(i.attributes))if (!t && (o === "bsi::ifc::class" || o.startsWith("bsi::ifc::presentation::") || o === "bsi::ifc::material" || o === "bsi::ifc::spaceBoundary") && (t = !0), !e && o.startsWith("bsi::ifc::prop::") && (e = !0), !n && o.startsWith("usd::") && (n = !0), t && e && n) break;
|
|
@@ -4895,21 +5004,21 @@ END-ISO-10303-21;
|
|
|
4895
5004
|
}
|
|
4896
5005
|
const s = [];
|
|
4897
5006
|
return t && s.push({
|
|
4898
|
-
uri:
|
|
5007
|
+
uri: ne.IFC_CORE
|
|
4899
5008
|
}), e && s.push({
|
|
4900
|
-
uri:
|
|
5009
|
+
uri: ne.IFC_PROP
|
|
4901
5010
|
}), n && s.push({
|
|
4902
|
-
uri:
|
|
5011
|
+
uri: ne.USD
|
|
4903
5012
|
}), s;
|
|
4904
5013
|
}
|
|
4905
|
-
function
|
|
5014
|
+
function se(r) {
|
|
4906
5015
|
return `00000000-0000-4000-8000-${r.toString(16).padStart(12, "0")}`;
|
|
4907
5016
|
}
|
|
4908
|
-
function
|
|
4909
|
-
const t =
|
|
5017
|
+
function ls(r) {
|
|
5018
|
+
const t = Ze(r), e = re(t);
|
|
4910
5019
|
if (e !== "Unknown") return e;
|
|
4911
5020
|
const n = r.toLowerCase();
|
|
4912
5021
|
return n.startsWith("ifc") ? "Ifc" + n.charAt(3).toUpperCase() + n.slice(4) : r;
|
|
4913
5022
|
}
|
|
4914
5023
|
});
|
|
4915
|
-
export {
|
|
5024
|
+
export { ps as C, hs as G, Ue as I, _s as M, rs as S, $e as _, us as a, wn as b, Is as c, ae as d, gs as e, fs as g, __tla };
|