@ifc-lite/viewer 1.26.0 → 1.27.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 -31
- package/CHANGELOG.md +29 -0
- package/dist/assets/{basketViewActivator-ZpTYWE3K.js → basketViewActivator-B3CdrLsb.js} +7 -7
- package/dist/assets/{bcf-Ctcu_Sc2.js → bcf-QeHK_Aud.js} +1 -1
- package/dist/assets/{browser-DXS29_v9.js → browser-BIoDDfBW.js} +1 -1
- package/dist/assets/{cesium-BoVuJvTC.js → cesium-CzZn5yVA.js} +319 -319
- package/dist/assets/{deflate-Cnx0il6E.js → deflate-B-d0SYQM.js} +1 -1
- package/dist/assets/exceljs.min-DsuzKYnj.js +29 -0
- package/dist/assets/{exporters-DSq76AVM.js → exporters-B4LbZFeT.js} +1422 -1194
- package/dist/assets/geometry.worker-BdH-E6NB.js +1 -0
- package/dist/assets/{geotiff-A5UjhI6L.js → geotiff-CrVtDRFq.js} +10 -10
- package/dist/assets/html2canvas.esm-Ge7aVWlp.js +5 -0
- package/dist/assets/{ids-DiLcGTer.js → ids-DjsGFN10.js} +4 -4
- package/dist/assets/ifc-lite_bg-DsYUIHm3.wasm +0 -0
- package/dist/assets/{index-BAH8IJVR.js → index-COYokSKc.js} +38319 -35469
- package/dist/assets/index-ajK6D32J.css +1 -0
- package/dist/assets/index.es-CY202jA3.js +6866 -0
- package/dist/assets/{jpeg-BzSkwo5D.js → jpeg-D4wOkf5h.js} +1 -1
- package/dist/assets/jspdf.es.min-DIGb9BHN.js +19571 -0
- package/dist/assets/jspdf.plugin.autotable-BBLUVd7n.js +2 -0
- package/dist/assets/{lerc-Cg2Rz-D5.js → lerc-DmW0_tgf.js} +1 -1
- package/dist/assets/{lzw-BBPPLW-0.js → lzw-oWetY-d6.js} +1 -1
- package/dist/assets/{maplibre-gl-Do6O5tDc.js → maplibre-gl-BF3Z0idw.js} +1 -1
- package/dist/assets/{native-bridge-CPojOeGE.js → native-bridge-BX8_tHXE.js} +1 -1
- package/dist/assets/{packbits-yLSpjW-V.js → packbits-F8Nkp4NY.js} +1 -1
- package/dist/assets/{pako.esm-Cram60i4.js → pako.esm-n3Pgozwg.js} +1 -1
- package/dist/assets/{parser.worker-8md211IW.js → parser.worker-D591Zu_-.js} +3 -3
- package/dist/assets/pdf-Dsh3HPZB.js +135 -0
- package/dist/assets/raw-D9iw0tmc.js +1 -0
- package/dist/assets/{sandbox-CsRXlgCO.js → sandbox-BAC3a-eN.js} +1735 -1660
- package/dist/assets/server-client-Cjwnm7il.js +706 -0
- package/dist/assets/{webimage-YafxjjGr.js → webimage-BLV1dgmd.js} +1 -1
- package/dist/assets/xlsx-Bc2HTrjC.js +142 -0
- package/dist/assets/{zip-BJqVbRkU.js → zip-DFgP-l20.js} +1 -1
- package/dist/assets/{zstd-CkSLOiuu.js → zstd-C_1HxVrA.js} +1 -1
- package/dist/index.html +8 -8
- package/package.json +10 -7
- package/src/components/mcp/PlaygroundChat.tsx +1 -0
- package/src/components/mcp/data.ts +6 -0
- package/src/components/mcp/playground-dispatcher.ts +277 -0
- package/src/components/mcp/types.ts +2 -1
- package/src/components/ui/combo-input.tsx +163 -0
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/viewer/PropertiesPanel.tsx +13 -6
- package/src/components/viewer/SearchInline.tsx +62 -2
- package/src/components/viewer/SearchModal.filter.builder.tsx +24 -393
- package/src/components/viewer/SearchModal.filter.editors.tsx +503 -0
- package/src/components/viewer/SearchModal.filter.tsx +64 -1
- package/src/components/viewer/SearchModal.tsx +19 -6
- package/src/components/viewer/Viewport.tsx +15 -0
- package/src/components/viewer/lists/ColumnHeaderMenu.tsx +84 -0
- package/src/components/viewer/lists/ListBuilder.tsx +789 -280
- package/src/components/viewer/lists/ListGroupingBar.tsx +72 -0
- package/src/components/viewer/lists/ListPanel.tsx +49 -5
- package/src/components/viewer/lists/ListResultsTable.tsx +270 -176
- package/src/components/viewer/lists/list-table-utils.ts +123 -0
- package/src/generated/mcp-catalog.json +4 -0
- package/src/hooks/source-key.ts +35 -0
- package/src/hooks/useAlignmentLines3D.ts +1 -26
- package/src/hooks/useGridLines3D.ts +140 -0
- package/src/lib/length-unit-scale.ts +41 -0
- package/src/lib/lists/adapter.ts +136 -11
- package/src/lib/lists/export/csv.ts +47 -0
- package/src/lib/lists/export/index.ts +49 -0
- package/src/lib/lists/export/model.ts +111 -0
- package/src/lib/lists/export/pdf.ts +67 -0
- package/src/lib/lists/export/xlsx.ts +83 -0
- package/src/lib/lists/index.ts +2 -0
- package/src/lib/search/filter-evaluate.test.ts +81 -0
- package/src/lib/search/filter-evaluate.ts +59 -87
- package/src/lib/search/filter-match.ts +167 -0
- package/src/lib/search/filter-rules.test.ts +25 -0
- package/src/lib/search/filter-rules.ts +75 -2
- package/src/lib/search/filter-schema.ts +0 -0
- package/src/lib/slab-edit.test.ts +72 -0
- package/src/lib/slab-edit.ts +159 -19
- package/src/sdk/adapters/export-adapter.ts +3 -3
- package/src/sdk/adapters/query-adapter.ts +3 -3
- package/src/store/slices/listSlice.ts +6 -0
- package/src/store/slices/mutationSlice.ts +14 -6
- package/src/store/slices/searchSlice.ts +29 -3
- package/src/utils/nativeSpatialDataStore.ts +6 -0
- package/src/utils/serverDataModel.test.ts +6 -0
- package/src/utils/serverDataModel.ts +7 -0
- package/dist/assets/geometry.worker-0Q9qEa6p.js +0 -1
- package/dist/assets/ifc-lite_bg-CEZnhM2e.wasm +0 -0
- package/dist/assets/index-B9Ug2EqU.css +0 -1
- package/dist/assets/raw-BQrAgxwT.js +0 -1
- package/dist/assets/server-client-Bk4c1CPO.js +0 -626
|
@@ -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-BX8_tHXE.js","assets/sandbox-BAC3a-eN.js","assets/lens-PYsLu_MA.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import { V as We, _ as je, aT as nt, a9 as ke, aa as Ye, l as et, m as bt, aW as Ue, E as He, al as se, ap as Xe, am as qe, aO as Qe, X as Je, k as ie, j as Ke, __tla as __tla_0 } from "./sandbox-BAC3a-eN.js";
|
|
3
|
+
let ds, ls, Be, us, ts, Ge, cs, En, hs, oe, fs, as;
|
|
4
4
|
let __tla = Promise.all([
|
|
5
5
|
(()=>{
|
|
6
6
|
try {
|
|
@@ -8,72 +8,75 @@ let __tla = Promise.all([
|
|
|
8
8
|
} catch {}
|
|
9
9
|
})()
|
|
10
10
|
]).then(async ()=>{
|
|
11
|
-
let
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
const t =
|
|
15
|
-
return
|
|
11
|
+
let a;
|
|
12
|
+
function U(r) {
|
|
13
|
+
Nt === ot.length && ot.push(ot.length + 1);
|
|
14
|
+
const t = Nt;
|
|
15
|
+
return Nt = ot[t], ot[t] = r, t;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function Ze(r) {
|
|
18
18
|
if (kt == 1) throw new Error("out of js stack");
|
|
19
19
|
return ot[--kt] = r, kt;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const ue = 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 || (ot[r] =
|
|
25
|
+
function tn(r) {
|
|
26
|
+
r < 132 || (ot[r] = Nt, Nt = r);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return r = r >>> 0,
|
|
28
|
+
function re(r, t) {
|
|
29
|
+
return r = r >>> 0, sn().subarray(r / 4, r / 4 + t);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
return r = r >>> 0,
|
|
31
|
+
function en(r, t) {
|
|
32
|
+
return r = r >>> 0, rn().subarray(r / 8, r / 8 + t);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return r = r >>> 0,
|
|
34
|
+
function De(r, t) {
|
|
35
|
+
return r = r >>> 0, ve().subarray(r / 4, r / 4 + t);
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
function nn(r, t) {
|
|
38
|
+
return r = r >>> 0, Ct().subarray(r / 1, r / 1 + t);
|
|
39
|
+
}
|
|
40
|
+
let _t = null;
|
|
38
41
|
function A() {
|
|
39
|
-
return (
|
|
42
|
+
return (_t === null || _t.buffer.detached === !0 || _t.buffer.detached === void 0 && _t.buffer !== a.memory.buffer) && (_t = new DataView(a.memory.buffer)), _t;
|
|
40
43
|
}
|
|
41
44
|
let Tt = null;
|
|
42
|
-
function
|
|
43
|
-
return (Tt === null || Tt.byteLength === 0) && (Tt = new Float32Array(
|
|
45
|
+
function sn() {
|
|
46
|
+
return (Tt === null || Tt.byteLength === 0) && (Tt = new Float32Array(a.memory.buffer)), Tt;
|
|
44
47
|
}
|
|
45
|
-
let
|
|
46
|
-
function
|
|
47
|
-
return (
|
|
48
|
+
let Ft = null;
|
|
49
|
+
function rn() {
|
|
50
|
+
return (Ft === null || Ft.byteLength === 0) && (Ft = new Float64Array(a.memory.buffer)), Ft;
|
|
48
51
|
}
|
|
49
52
|
function J(r, t) {
|
|
50
|
-
return r = r >>> 0,
|
|
51
|
-
}
|
|
52
|
-
let Ft = null;
|
|
53
|
-
function Pe() {
|
|
54
|
-
return (Ft === null || Ft.byteLength === 0) && (Ft = new Uint32Array(c.memory.buffer)), Ft;
|
|
53
|
+
return r = r >>> 0, cn(r, t);
|
|
55
54
|
}
|
|
56
55
|
let Rt = null;
|
|
57
|
-
function
|
|
58
|
-
return (Rt === null || Rt.byteLength === 0) && (Rt = new
|
|
56
|
+
function ve() {
|
|
57
|
+
return (Rt === null || Rt.byteLength === 0) && (Rt = new Uint32Array(a.memory.buffer)), Rt;
|
|
58
|
+
}
|
|
59
|
+
let St = null;
|
|
60
|
+
function Ct() {
|
|
61
|
+
return (St === null || St.byteLength === 0) && (St = new Uint8Array(a.memory.buffer)), St;
|
|
59
62
|
}
|
|
60
|
-
function
|
|
63
|
+
function k(r) {
|
|
61
64
|
return ot[r];
|
|
62
65
|
}
|
|
63
|
-
function
|
|
66
|
+
function Qt(r, t) {
|
|
64
67
|
try {
|
|
65
68
|
return r.apply(this, t);
|
|
66
69
|
} catch (e) {
|
|
67
|
-
|
|
70
|
+
a.__wbindgen_export(U(e));
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
73
|
let ot = new Array(128).fill(void 0);
|
|
71
74
|
ot.push(void 0, null, !0, !1);
|
|
72
|
-
let
|
|
73
|
-
function
|
|
75
|
+
let Nt = ot.length;
|
|
76
|
+
function zt(r) {
|
|
74
77
|
return r == null;
|
|
75
78
|
}
|
|
76
|
-
function
|
|
79
|
+
function on(r, t, e, n) {
|
|
77
80
|
const s = {
|
|
78
81
|
a: r,
|
|
79
82
|
b: t,
|
|
@@ -81,63 +84,63 @@ let __tla = Promise.all([
|
|
|
81
84
|
dtor: e
|
|
82
85
|
}, i = (...o)=>{
|
|
83
86
|
s.cnt++;
|
|
84
|
-
const
|
|
87
|
+
const c = s.a;
|
|
85
88
|
s.a = 0;
|
|
86
89
|
try {
|
|
87
|
-
return n(
|
|
90
|
+
return n(c, s.b, ...o);
|
|
88
91
|
} finally{
|
|
89
|
-
s.a =
|
|
92
|
+
s.a = c, i._wbg_cb_unref();
|
|
90
93
|
}
|
|
91
94
|
};
|
|
92
95
|
return i._wbg_cb_unref = ()=>{
|
|
93
|
-
--s.cnt === 0 && (s.dtor(s.a, s.b), s.a = 0,
|
|
94
|
-
},
|
|
96
|
+
--s.cnt === 0 && (s.dtor(s.a, s.b), s.a = 0, ue.unregister(s));
|
|
97
|
+
}, ue.register(i, s, s), i;
|
|
95
98
|
}
|
|
96
|
-
function
|
|
99
|
+
function ut(r, t) {
|
|
97
100
|
const e = t(r.length * 4, 4) >>> 0;
|
|
98
|
-
return
|
|
101
|
+
return ve().set(r, e / 4), G = r.length, e;
|
|
99
102
|
}
|
|
100
103
|
function It(r, t) {
|
|
101
104
|
const e = t(r.length * 1, 1) >>> 0;
|
|
102
|
-
return
|
|
105
|
+
return Ct().set(r, e / 1), G = r.length, e;
|
|
103
106
|
}
|
|
104
|
-
function
|
|
107
|
+
function ct(r, t, e) {
|
|
105
108
|
if (e === void 0) {
|
|
106
|
-
const
|
|
107
|
-
return
|
|
109
|
+
const c = At.encode(r), l = t(c.length, 1) >>> 0;
|
|
110
|
+
return Ct().subarray(l, l + c.length).set(c), G = c.length, l;
|
|
108
111
|
}
|
|
109
112
|
let n = r.length, s = t(n, 1) >>> 0;
|
|
110
|
-
const i =
|
|
113
|
+
const i = Ct();
|
|
111
114
|
let o = 0;
|
|
112
115
|
for(; o < n; o++){
|
|
113
|
-
const
|
|
114
|
-
if (
|
|
115
|
-
i[s + o] =
|
|
116
|
+
const c = r.charCodeAt(o);
|
|
117
|
+
if (c > 127) break;
|
|
118
|
+
i[s + o] = c;
|
|
116
119
|
}
|
|
117
120
|
if (o !== n) {
|
|
118
121
|
o !== 0 && (r = r.slice(o)), s = e(s, n, n = o + r.length * 3, 1) >>> 0;
|
|
119
|
-
const
|
|
122
|
+
const c = Ct().subarray(s + o, s + n), l = At.encodeInto(r, c);
|
|
120
123
|
o += l.written, s = e(s, n, o, 1) >>> 0;
|
|
121
124
|
}
|
|
122
|
-
return
|
|
125
|
+
return G = o, s;
|
|
123
126
|
}
|
|
124
127
|
let kt = 128;
|
|
125
|
-
function
|
|
126
|
-
const t =
|
|
127
|
-
return
|
|
128
|
+
function D(r) {
|
|
129
|
+
const t = k(r);
|
|
130
|
+
return tn(r), t;
|
|
128
131
|
}
|
|
129
132
|
let Yt = new TextDecoder("utf-8", {
|
|
130
133
|
ignoreBOM: !0,
|
|
131
134
|
fatal: !0
|
|
132
135
|
});
|
|
133
136
|
Yt.decode();
|
|
134
|
-
const
|
|
135
|
-
let
|
|
136
|
-
function
|
|
137
|
-
return
|
|
137
|
+
const an = 2146435072;
|
|
138
|
+
let Jt = 0;
|
|
139
|
+
function cn(r, t) {
|
|
140
|
+
return Jt += t, Jt >= an && (Yt = new TextDecoder("utf-8", {
|
|
138
141
|
ignoreBOM: !0,
|
|
139
142
|
fatal: !0
|
|
140
|
-
}), Yt.decode(),
|
|
143
|
+
}), Yt.decode(), Jt = t), Yt.decode(Ct().subarray(r, r + t));
|
|
141
144
|
}
|
|
142
145
|
const At = new TextEncoder;
|
|
143
146
|
"encodeInto" in At || (At.encodeInto = function(r, t) {
|
|
@@ -147,725 +150,829 @@ let __tla = Promise.all([
|
|
|
147
150
|
written: e.length
|
|
148
151
|
};
|
|
149
152
|
});
|
|
150
|
-
let
|
|
151
|
-
function
|
|
152
|
-
|
|
153
|
+
let G = 0;
|
|
154
|
+
function ln(r, t, e) {
|
|
155
|
+
a.__wasm_bindgen_func_elem_654(r, t, U(e));
|
|
153
156
|
}
|
|
154
|
-
function
|
|
155
|
-
|
|
157
|
+
function dn(r, t, e, n) {
|
|
158
|
+
a.__wasm_bindgen_func_elem_688(r, t, U(e), U(n));
|
|
156
159
|
}
|
|
157
|
-
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r)=>
|
|
158
|
-
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r)=>
|
|
159
|
-
const
|
|
160
|
+
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r)=>a.__wbg_clashrunresult_free(r >>> 0, 1));
|
|
161
|
+
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r)=>a.__wbg_clashsession_free(r >>> 0, 1));
|
|
162
|
+
const he = typeof FinalizationRegistry > "u" ? {
|
|
163
|
+
register: ()=>{},
|
|
164
|
+
unregister: ()=>{}
|
|
165
|
+
} : new FinalizationRegistry((r)=>a.__wbg_gridaxiscollection_free(r >>> 0, 1)), pe = typeof FinalizationRegistry > "u" ? {
|
|
160
166
|
register: ()=>{},
|
|
161
167
|
unregister: ()=>{}
|
|
162
|
-
} : new FinalizationRegistry((r)=>
|
|
168
|
+
} : new FinalizationRegistry((r)=>a.__wbg_gridaxisjs_free(r >>> 0, 1)), Ie = typeof FinalizationRegistry > "u" ? {
|
|
163
169
|
register: ()=>{},
|
|
164
170
|
unregister: ()=>{}
|
|
165
|
-
} : new FinalizationRegistry((r)=>
|
|
171
|
+
} : new FinalizationRegistry((r)=>a.__wbg_ifcapi_free(r >>> 0, 1)), _e = typeof FinalizationRegistry > "u" ? {
|
|
166
172
|
register: ()=>{},
|
|
167
173
|
unregister: ()=>{}
|
|
168
|
-
} : new FinalizationRegistry((r)=>
|
|
174
|
+
} : new FinalizationRegistry((r)=>a.__wbg_meshcollection_free(r >>> 0, 1)), ge = typeof FinalizationRegistry > "u" ? {
|
|
169
175
|
register: ()=>{},
|
|
170
176
|
unregister: ()=>{}
|
|
171
|
-
} : new FinalizationRegistry((r)=>
|
|
177
|
+
} : new FinalizationRegistry((r)=>a.__wbg_meshdatajs_free(r >>> 0, 1)), ye = typeof FinalizationRegistry > "u" ? {
|
|
172
178
|
register: ()=>{},
|
|
173
179
|
unregister: ()=>{}
|
|
174
|
-
} : new FinalizationRegistry((r)=>
|
|
180
|
+
} : new FinalizationRegistry((r)=>a.__wbg_profilecollection_free(r >>> 0, 1)), me = typeof FinalizationRegistry > "u" ? {
|
|
175
181
|
register: ()=>{},
|
|
176
182
|
unregister: ()=>{}
|
|
177
|
-
} : new FinalizationRegistry((r)=>
|
|
183
|
+
} : new FinalizationRegistry((r)=>a.__wbg_profileentryjs_free(r >>> 0, 1)), Ee = typeof FinalizationRegistry > "u" ? {
|
|
178
184
|
register: ()=>{},
|
|
179
185
|
unregister: ()=>{}
|
|
180
|
-
} : new FinalizationRegistry((r)=>
|
|
186
|
+
} : new FinalizationRegistry((r)=>a.__wbg_symboliccircle_free(r >>> 0, 1)), be = typeof FinalizationRegistry > "u" ? {
|
|
181
187
|
register: ()=>{},
|
|
182
188
|
unregister: ()=>{}
|
|
183
|
-
} : new FinalizationRegistry((r)=>
|
|
189
|
+
} : new FinalizationRegistry((r)=>a.__wbg_symbolicfillarea_free(r >>> 0, 1)), Ce = typeof FinalizationRegistry > "u" ? {
|
|
184
190
|
register: ()=>{},
|
|
185
191
|
unregister: ()=>{}
|
|
186
|
-
} : new FinalizationRegistry((r)=>
|
|
192
|
+
} : new FinalizationRegistry((r)=>a.__wbg_symbolicpolyline_free(r >>> 0, 1)), we = typeof FinalizationRegistry > "u" ? {
|
|
187
193
|
register: ()=>{},
|
|
188
194
|
unregister: ()=>{}
|
|
189
|
-
} : new FinalizationRegistry((r)=>
|
|
190
|
-
|
|
195
|
+
} : new FinalizationRegistry((r)=>a.__wbg_symbolicrepresentationcollection_free(r >>> 0, 1)), Te = typeof FinalizationRegistry > "u" ? {
|
|
196
|
+
register: ()=>{},
|
|
197
|
+
unregister: ()=>{}
|
|
198
|
+
} : new FinalizationRegistry((r)=>a.__wbg_symbolictext_free(r >>> 0, 1));
|
|
199
|
+
class Ot {
|
|
200
|
+
static __wrap(t) {
|
|
201
|
+
t = t >>> 0;
|
|
202
|
+
const e = Object.create(Ot.prototype);
|
|
203
|
+
return e.__wbg_ptr = t, he.register(e, e.__wbg_ptr, e), e;
|
|
204
|
+
}
|
|
205
|
+
__destroy_into_raw() {
|
|
206
|
+
const t = this.__wbg_ptr;
|
|
207
|
+
return this.__wbg_ptr = 0, he.unregister(this), t;
|
|
208
|
+
}
|
|
209
|
+
free() {
|
|
210
|
+
const t = this.__destroy_into_raw();
|
|
211
|
+
a.__wbg_gridaxiscollection_free(t, 0);
|
|
212
|
+
}
|
|
213
|
+
get length() {
|
|
214
|
+
return a.gridaxiscollection_length(this.__wbg_ptr) >>> 0;
|
|
215
|
+
}
|
|
216
|
+
getAxis(t) {
|
|
217
|
+
const e = a.gridaxiscollection_getAxis(this.__wbg_ptr, t);
|
|
218
|
+
return e === 0 ? void 0 : xt.__wrap(e);
|
|
219
|
+
}
|
|
220
|
+
get isEmpty() {
|
|
221
|
+
return a.gridaxiscollection_isEmpty(this.__wbg_ptr) !== 0;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
Symbol.dispose && (Ot.prototype[Symbol.dispose] = Ot.prototype.free);
|
|
225
|
+
class xt {
|
|
226
|
+
static __wrap(t) {
|
|
227
|
+
t = t >>> 0;
|
|
228
|
+
const e = Object.create(xt.prototype);
|
|
229
|
+
return e.__wbg_ptr = t, pe.register(e, e.__wbg_ptr, e), e;
|
|
230
|
+
}
|
|
191
231
|
__destroy_into_raw() {
|
|
192
232
|
const t = this.__wbg_ptr;
|
|
193
|
-
return this.__wbg_ptr = 0,
|
|
233
|
+
return this.__wbg_ptr = 0, pe.unregister(this), t;
|
|
194
234
|
}
|
|
195
235
|
free() {
|
|
196
236
|
const t = this.__destroy_into_raw();
|
|
197
|
-
|
|
237
|
+
a.__wbg_gridaxisjs_free(t, 0);
|
|
238
|
+
}
|
|
239
|
+
get end() {
|
|
240
|
+
const t = a.gridaxisjs_end(this.__wbg_ptr);
|
|
241
|
+
return D(t);
|
|
242
|
+
}
|
|
243
|
+
get tag() {
|
|
244
|
+
let t, e;
|
|
245
|
+
try {
|
|
246
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
247
|
+
a.gridaxisjs_tag(i, this.__wbg_ptr);
|
|
248
|
+
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
249
|
+
return t = n, e = s, J(n, s);
|
|
250
|
+
} finally{
|
|
251
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
get start() {
|
|
255
|
+
const t = a.gridaxisjs_start(this.__wbg_ptr);
|
|
256
|
+
return D(t);
|
|
257
|
+
}
|
|
258
|
+
get axisId() {
|
|
259
|
+
return a.gridaxisjs_axisId(this.__wbg_ptr) >>> 0;
|
|
260
|
+
}
|
|
261
|
+
get gridId() {
|
|
262
|
+
return a.gridaxisjs_gridId(this.__wbg_ptr) >>> 0;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
Symbol.dispose && (xt.prototype[Symbol.dispose] = xt.prototype.free);
|
|
266
|
+
oe = class {
|
|
267
|
+
__destroy_into_raw() {
|
|
268
|
+
const t = this.__wbg_ptr;
|
|
269
|
+
return this.__wbg_ptr = 0, Ie.unregister(this), t;
|
|
270
|
+
}
|
|
271
|
+
free() {
|
|
272
|
+
const t = this.__destroy_into_raw();
|
|
273
|
+
a.__wbg_ifcapi_free(t, 0);
|
|
198
274
|
}
|
|
199
275
|
buildPrePassFast(t) {
|
|
200
|
-
const e = It(t,
|
|
201
|
-
return
|
|
276
|
+
const e = It(t, a.__wbindgen_export3), n = G, s = a.ifcapi_buildPrePassFast(this.__wbg_ptr, e, n);
|
|
277
|
+
return D(s);
|
|
202
278
|
}
|
|
203
279
|
buildPrePassOnce(t) {
|
|
204
|
-
const e = It(t,
|
|
205
|
-
return
|
|
280
|
+
const e = It(t, a.__wbindgen_export3), n = G, s = a.ifcapi_buildPrePassOnce(this.__wbg_ptr, e, n);
|
|
281
|
+
return D(s);
|
|
206
282
|
}
|
|
207
|
-
processGeometryBatch(t, e, n, s, i, o,
|
|
208
|
-
const
|
|
209
|
-
return
|
|
283
|
+
processGeometryBatch(t, e, n, s, i, o, c, l, d, u, f, p) {
|
|
284
|
+
const g = It(t, a.__wbindgen_export3), h = G, y = ut(e, a.__wbindgen_export3), E = G, C = ut(l, a.__wbindgen_export3), T = G, $ = ut(d, a.__wbindgen_export3), x = G, Y = ut(u, a.__wbindgen_export3), O = G, v = ut(f, a.__wbindgen_export3), b = G, S = It(p, a.__wbindgen_export3), F = G, m = a.ifcapi_processGeometryBatch(this.__wbg_ptr, g, h, y, E, n, s, i, o, c, C, T, $, x, Y, O, v, b, S, F);
|
|
285
|
+
return Lt.__wrap(m);
|
|
210
286
|
}
|
|
211
287
|
buildPrePassStreaming(t, e, n) {
|
|
212
288
|
try {
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
var s = A().getInt32(
|
|
216
|
-
if (o) throw
|
|
217
|
-
return
|
|
289
|
+
const c = a.__wbindgen_add_to_stack_pointer(-16), l = It(t, a.__wbindgen_export3), d = G;
|
|
290
|
+
a.ifcapi_buildPrePassStreaming(c, this.__wbg_ptr, l, d, Ze(e), n);
|
|
291
|
+
var s = A().getInt32(c + 0, !0), i = A().getInt32(c + 4, !0), o = A().getInt32(c + 8, !0);
|
|
292
|
+
if (o) throw D(i);
|
|
293
|
+
return D(s);
|
|
218
294
|
} finally{
|
|
219
|
-
|
|
295
|
+
a.__wbindgen_add_to_stack_pointer(16), ot[kt++] = void 0;
|
|
220
296
|
}
|
|
221
297
|
}
|
|
298
|
+
parseGridAxes(t) {
|
|
299
|
+
const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parseGridAxes(this.__wbg_ptr, e, n);
|
|
300
|
+
return Ot.__wrap(s);
|
|
301
|
+
}
|
|
302
|
+
parseGridLines(t) {
|
|
303
|
+
const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parseGridLines(this.__wbg_ptr, e, n);
|
|
304
|
+
return D(s);
|
|
305
|
+
}
|
|
222
306
|
parseAlignmentLines(t) {
|
|
223
|
-
const e =
|
|
224
|
-
return
|
|
307
|
+
const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parseAlignmentLines(this.__wbg_ptr, e, n);
|
|
308
|
+
return D(s);
|
|
225
309
|
}
|
|
226
310
|
extractProfiles(t, e) {
|
|
227
|
-
const n =
|
|
228
|
-
return
|
|
311
|
+
const n = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), s = G, i = a.ifcapi_extractProfiles(this.__wbg_ptr, n, s, e);
|
|
312
|
+
return Pt.__wrap(i);
|
|
229
313
|
}
|
|
230
314
|
getMemory() {
|
|
231
|
-
const t =
|
|
232
|
-
return
|
|
315
|
+
const t = a.ifcapi_getMemory(this.__wbg_ptr);
|
|
316
|
+
return D(t);
|
|
233
317
|
}
|
|
234
318
|
setEntityIndex(t, e, n) {
|
|
235
|
-
const s =
|
|
236
|
-
|
|
319
|
+
const s = ut(t, a.__wbindgen_export3), i = G, o = ut(e, a.__wbindgen_export3), c = G, l = ut(n, a.__wbindgen_export3), d = G;
|
|
320
|
+
a.ifcapi_setEntityIndex(this.__wbg_ptr, s, i, o, c, l, d);
|
|
237
321
|
}
|
|
238
322
|
setMergeLayers(t) {
|
|
239
|
-
|
|
323
|
+
a.ifcapi_setMergeLayers(this.__wbg_ptr, t);
|
|
240
324
|
}
|
|
241
325
|
clearPrePassCache() {
|
|
242
|
-
|
|
326
|
+
a.ifcapi_clearPrePassCache(this.__wbg_ptr);
|
|
243
327
|
}
|
|
244
328
|
constructor(){
|
|
245
|
-
const t =
|
|
246
|
-
return this.__wbg_ptr = t >>> 0,
|
|
329
|
+
const t = a.ifcapi_new();
|
|
330
|
+
return this.__wbg_ptr = t >>> 0, Ie.register(this, this.__wbg_ptr, this), this;
|
|
247
331
|
}
|
|
248
332
|
get version() {
|
|
249
333
|
let t, e;
|
|
250
334
|
try {
|
|
251
|
-
const i =
|
|
252
|
-
|
|
335
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
336
|
+
a.ifcapi_version(i, this.__wbg_ptr);
|
|
253
337
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
254
338
|
return t = n, e = s, J(n, s);
|
|
255
339
|
} finally{
|
|
256
|
-
|
|
340
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
257
341
|
}
|
|
258
342
|
}
|
|
259
343
|
get is_ready() {
|
|
260
|
-
return
|
|
344
|
+
return a.ifcapi_is_ready(this.__wbg_ptr) !== 0;
|
|
261
345
|
}
|
|
262
346
|
parseStreaming(t, e) {
|
|
263
|
-
const n =
|
|
264
|
-
return
|
|
347
|
+
const n = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), s = G, i = a.ifcapi_parseStreaming(this.__wbg_ptr, n, s, U(e));
|
|
348
|
+
return D(i);
|
|
265
349
|
}
|
|
266
350
|
scanEntitiesFast(t) {
|
|
267
|
-
const e =
|
|
268
|
-
return
|
|
351
|
+
const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_scanEntitiesFast(this.__wbg_ptr, e, n);
|
|
352
|
+
return D(s);
|
|
269
353
|
}
|
|
270
354
|
scanEntitiesFastBytes(t) {
|
|
271
|
-
const e = It(t,
|
|
272
|
-
return
|
|
355
|
+
const e = It(t, a.__wbindgen_export3), n = G, s = a.ifcapi_scanEntitiesFastBytes(this.__wbg_ptr, e, n);
|
|
356
|
+
return D(s);
|
|
273
357
|
}
|
|
274
358
|
scanGeometryEntitiesFast(t) {
|
|
275
|
-
const e =
|
|
276
|
-
return
|
|
359
|
+
const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, e, n);
|
|
360
|
+
return D(s);
|
|
277
361
|
}
|
|
278
362
|
scanRelevantEntitiesFastBytes(t) {
|
|
279
|
-
const e = It(t,
|
|
280
|
-
return
|
|
363
|
+
const e = It(t, a.__wbindgen_export3), n = G, s = a.ifcapi_scanRelevantEntitiesFastBytes(this.__wbg_ptr, e, n);
|
|
364
|
+
return D(s);
|
|
281
365
|
}
|
|
282
366
|
parse(t) {
|
|
283
|
-
const e =
|
|
284
|
-
return
|
|
367
|
+
const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parse(this.__wbg_ptr, e, n);
|
|
368
|
+
return D(s);
|
|
285
369
|
}
|
|
286
370
|
parseSymbolicRepresentations(t) {
|
|
287
|
-
const e =
|
|
288
|
-
return
|
|
371
|
+
const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, e, n);
|
|
372
|
+
return Gt.__wrap(s);
|
|
289
373
|
}
|
|
290
374
|
};
|
|
291
|
-
Symbol.dispose && (
|
|
292
|
-
class
|
|
375
|
+
Symbol.dispose && (oe.prototype[Symbol.dispose] = oe.prototype.free);
|
|
376
|
+
class Lt {
|
|
293
377
|
static __wrap(t) {
|
|
294
378
|
t = t >>> 0;
|
|
295
|
-
const e = Object.create(
|
|
296
|
-
return e.__wbg_ptr = t,
|
|
379
|
+
const e = Object.create(Lt.prototype);
|
|
380
|
+
return e.__wbg_ptr = t, _e.register(e, e.__wbg_ptr, e), e;
|
|
297
381
|
}
|
|
298
382
|
__destroy_into_raw() {
|
|
299
383
|
const t = this.__wbg_ptr;
|
|
300
|
-
return this.__wbg_ptr = 0,
|
|
384
|
+
return this.__wbg_ptr = 0, _e.unregister(this), t;
|
|
301
385
|
}
|
|
302
386
|
free() {
|
|
303
387
|
const t = this.__destroy_into_raw();
|
|
304
|
-
|
|
388
|
+
a.__wbg_meshcollection_free(t, 0);
|
|
305
389
|
}
|
|
306
390
|
get rtcOffsetX() {
|
|
307
|
-
return
|
|
391
|
+
return a.meshcollection_rtcOffsetX(this.__wbg_ptr);
|
|
308
392
|
}
|
|
309
393
|
get rtcOffsetY() {
|
|
310
|
-
return
|
|
394
|
+
return a.meshcollection_rtcOffsetY(this.__wbg_ptr);
|
|
311
395
|
}
|
|
312
396
|
get rtcOffsetZ() {
|
|
313
|
-
return
|
|
397
|
+
return a.meshcollection_rtcOffsetZ(this.__wbg_ptr);
|
|
314
398
|
}
|
|
315
399
|
hasRtcOffset() {
|
|
316
|
-
return
|
|
400
|
+
return a.meshcollection_hasRtcOffset(this.__wbg_ptr) !== 0;
|
|
317
401
|
}
|
|
318
402
|
localToWorld(t, e, n) {
|
|
319
403
|
try {
|
|
320
|
-
const
|
|
321
|
-
|
|
322
|
-
var s = A().getInt32(
|
|
323
|
-
return
|
|
404
|
+
const c = a.__wbindgen_add_to_stack_pointer(-16);
|
|
405
|
+
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 = en(s, i).slice();
|
|
407
|
+
return a.__wbindgen_export2(s, i * 8, 8), o;
|
|
324
408
|
} finally{
|
|
325
|
-
|
|
409
|
+
a.__wbindgen_add_to_stack_pointer(16);
|
|
326
410
|
}
|
|
327
411
|
}
|
|
328
412
|
get totalVertices() {
|
|
329
|
-
return
|
|
413
|
+
return a.meshcollection_totalVertices(this.__wbg_ptr) >>> 0;
|
|
330
414
|
}
|
|
331
415
|
get totalTriangles() {
|
|
332
|
-
return
|
|
416
|
+
return a.meshcollection_totalTriangles(this.__wbg_ptr) >>> 0;
|
|
333
417
|
}
|
|
334
418
|
get buildingRotation() {
|
|
335
419
|
try {
|
|
336
|
-
const n =
|
|
337
|
-
|
|
420
|
+
const n = a.__wbindgen_add_to_stack_pointer(-16);
|
|
421
|
+
a.meshcollection_buildingRotation(n, this.__wbg_ptr);
|
|
338
422
|
var t = A().getInt32(n + 0, !0), e = A().getFloat64(n + 8, !0);
|
|
339
423
|
return t === 0 ? void 0 : e;
|
|
340
424
|
} finally{
|
|
341
|
-
|
|
425
|
+
a.__wbindgen_add_to_stack_pointer(16);
|
|
342
426
|
}
|
|
343
427
|
}
|
|
344
428
|
get(t) {
|
|
345
|
-
const e =
|
|
346
|
-
return e === 0 ? void 0 :
|
|
429
|
+
const e = a.meshcollection_get(this.__wbg_ptr, t);
|
|
430
|
+
return e === 0 ? void 0 : Mt.__wrap(e);
|
|
347
431
|
}
|
|
348
432
|
get length() {
|
|
349
|
-
return
|
|
433
|
+
return a.meshcollection_length(this.__wbg_ptr) >>> 0;
|
|
350
434
|
}
|
|
351
435
|
}
|
|
352
|
-
Symbol.dispose && (
|
|
353
|
-
class
|
|
436
|
+
Symbol.dispose && (Lt.prototype[Symbol.dispose] = Lt.prototype.free);
|
|
437
|
+
class Mt {
|
|
354
438
|
static __wrap(t) {
|
|
355
439
|
t = t >>> 0;
|
|
356
|
-
const e = Object.create(
|
|
357
|
-
return e.__wbg_ptr = t,
|
|
440
|
+
const e = Object.create(Mt.prototype);
|
|
441
|
+
return e.__wbg_ptr = t, ge.register(e, e.__wbg_ptr, e), e;
|
|
358
442
|
}
|
|
359
443
|
__destroy_into_raw() {
|
|
360
444
|
const t = this.__wbg_ptr;
|
|
361
|
-
return this.__wbg_ptr = 0,
|
|
445
|
+
return this.__wbg_ptr = 0, ge.unregister(this), t;
|
|
362
446
|
}
|
|
363
447
|
free() {
|
|
364
448
|
const t = this.__destroy_into_raw();
|
|
365
|
-
|
|
449
|
+
a.__wbg_meshdatajs_free(t, 0);
|
|
366
450
|
}
|
|
367
451
|
get expressId() {
|
|
368
|
-
return
|
|
452
|
+
return a.meshdatajs_expressId(this.__wbg_ptr) >>> 0;
|
|
453
|
+
}
|
|
454
|
+
get hasTexture() {
|
|
455
|
+
return a.meshdatajs_hasTexture(this.__wbg_ptr) !== 0;
|
|
456
|
+
}
|
|
457
|
+
get textureRgba() {
|
|
458
|
+
const t = a.meshdatajs_textureRgba(this.__wbg_ptr);
|
|
459
|
+
return D(t);
|
|
369
460
|
}
|
|
370
461
|
get vertexCount() {
|
|
371
|
-
return
|
|
462
|
+
return a.meshdatajs_vertexCount(this.__wbg_ptr) >>> 0;
|
|
372
463
|
}
|
|
373
464
|
get shadingColor() {
|
|
374
465
|
try {
|
|
375
|
-
const n =
|
|
376
|
-
|
|
466
|
+
const n = a.__wbindgen_add_to_stack_pointer(-16);
|
|
467
|
+
a.meshdatajs_shadingColor(n, this.__wbg_ptr);
|
|
377
468
|
var t = A().getInt32(n + 0, !0), e = A().getInt32(n + 4, !0);
|
|
378
469
|
let s;
|
|
379
|
-
return t !== 0 && (s =
|
|
470
|
+
return t !== 0 && (s = re(t, e).slice(), a.__wbindgen_export2(t, e * 4, 4)), s;
|
|
380
471
|
} finally{
|
|
381
|
-
|
|
472
|
+
a.__wbindgen_add_to_stack_pointer(16);
|
|
382
473
|
}
|
|
383
474
|
}
|
|
475
|
+
get textureWidth() {
|
|
476
|
+
return a.meshdatajs_textureWidth(this.__wbg_ptr) >>> 0;
|
|
477
|
+
}
|
|
478
|
+
get textureHeight() {
|
|
479
|
+
return a.meshdatajs_textureHeight(this.__wbg_ptr) >>> 0;
|
|
480
|
+
}
|
|
384
481
|
get triangleCount() {
|
|
385
|
-
return
|
|
482
|
+
return a.meshdatajs_triangleCount(this.__wbg_ptr) >>> 0;
|
|
483
|
+
}
|
|
484
|
+
get textureRepeatS() {
|
|
485
|
+
return a.meshdatajs_textureRepeatS(this.__wbg_ptr) !== 0;
|
|
486
|
+
}
|
|
487
|
+
get textureRepeatT() {
|
|
488
|
+
return a.meshdatajs_textureRepeatT(this.__wbg_ptr) !== 0;
|
|
489
|
+
}
|
|
490
|
+
get uvs() {
|
|
491
|
+
const t = a.meshdatajs_uvs(this.__wbg_ptr);
|
|
492
|
+
return D(t);
|
|
386
493
|
}
|
|
387
494
|
get color() {
|
|
388
495
|
try {
|
|
389
|
-
const s =
|
|
390
|
-
|
|
391
|
-
var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n =
|
|
392
|
-
return
|
|
496
|
+
const s = a.__wbindgen_add_to_stack_pointer(-16);
|
|
497
|
+
a.meshdatajs_color(s, this.__wbg_ptr);
|
|
498
|
+
var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n = re(t, e).slice();
|
|
499
|
+
return a.__wbindgen_export2(t, e * 4, 4), n;
|
|
393
500
|
} finally{
|
|
394
|
-
|
|
501
|
+
a.__wbindgen_add_to_stack_pointer(16);
|
|
395
502
|
}
|
|
396
503
|
}
|
|
397
504
|
get indices() {
|
|
398
|
-
const t =
|
|
399
|
-
return
|
|
505
|
+
const t = a.meshdatajs_indices(this.__wbg_ptr);
|
|
506
|
+
return D(t);
|
|
400
507
|
}
|
|
401
508
|
get normals() {
|
|
402
|
-
const t =
|
|
403
|
-
return
|
|
509
|
+
const t = a.meshdatajs_normals(this.__wbg_ptr);
|
|
510
|
+
return D(t);
|
|
404
511
|
}
|
|
405
512
|
get ifcType() {
|
|
406
513
|
let t, e;
|
|
407
514
|
try {
|
|
408
|
-
const i =
|
|
409
|
-
|
|
515
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
516
|
+
a.meshdatajs_ifcType(i, this.__wbg_ptr);
|
|
410
517
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
411
518
|
return t = n, e = s, J(n, s);
|
|
412
519
|
} finally{
|
|
413
|
-
|
|
520
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
414
521
|
}
|
|
415
522
|
}
|
|
416
523
|
get positions() {
|
|
417
|
-
const t =
|
|
418
|
-
return
|
|
524
|
+
const t = a.meshdatajs_positions(this.__wbg_ptr);
|
|
525
|
+
return D(t);
|
|
419
526
|
}
|
|
420
527
|
}
|
|
421
|
-
Symbol.dispose && (
|
|
422
|
-
class
|
|
528
|
+
Symbol.dispose && (Mt.prototype[Symbol.dispose] = Mt.prototype.free);
|
|
529
|
+
class Pt {
|
|
423
530
|
static __wrap(t) {
|
|
424
531
|
t = t >>> 0;
|
|
425
|
-
const e = Object.create(
|
|
426
|
-
return e.__wbg_ptr = t,
|
|
532
|
+
const e = Object.create(Pt.prototype);
|
|
533
|
+
return e.__wbg_ptr = t, ye.register(e, e.__wbg_ptr, e), e;
|
|
427
534
|
}
|
|
428
535
|
__destroy_into_raw() {
|
|
429
536
|
const t = this.__wbg_ptr;
|
|
430
|
-
return this.__wbg_ptr = 0,
|
|
537
|
+
return this.__wbg_ptr = 0, ye.unregister(this), t;
|
|
431
538
|
}
|
|
432
539
|
free() {
|
|
433
540
|
const t = this.__destroy_into_raw();
|
|
434
|
-
|
|
541
|
+
a.__wbg_profilecollection_free(t, 0);
|
|
435
542
|
}
|
|
436
543
|
get(t) {
|
|
437
|
-
const e =
|
|
438
|
-
return e === 0 ? void 0 :
|
|
544
|
+
const e = a.profilecollection_get(this.__wbg_ptr, t);
|
|
545
|
+
return e === 0 ? void 0 : Bt.__wrap(e);
|
|
439
546
|
}
|
|
440
547
|
get length() {
|
|
441
|
-
return
|
|
548
|
+
return a.profilecollection_length(this.__wbg_ptr) >>> 0;
|
|
442
549
|
}
|
|
443
550
|
}
|
|
444
|
-
Symbol.dispose && (
|
|
445
|
-
class
|
|
551
|
+
Symbol.dispose && (Pt.prototype[Symbol.dispose] = Pt.prototype.free);
|
|
552
|
+
class Bt {
|
|
446
553
|
static __wrap(t) {
|
|
447
554
|
t = t >>> 0;
|
|
448
|
-
const e = Object.create(
|
|
449
|
-
return e.__wbg_ptr = t,
|
|
555
|
+
const e = Object.create(Bt.prototype);
|
|
556
|
+
return e.__wbg_ptr = t, me.register(e, e.__wbg_ptr, e), e;
|
|
450
557
|
}
|
|
451
558
|
__destroy_into_raw() {
|
|
452
559
|
const t = this.__wbg_ptr;
|
|
453
|
-
return this.__wbg_ptr = 0,
|
|
560
|
+
return this.__wbg_ptr = 0, me.unregister(this), t;
|
|
454
561
|
}
|
|
455
562
|
free() {
|
|
456
563
|
const t = this.__destroy_into_raw();
|
|
457
|
-
|
|
564
|
+
a.__wbg_profileentryjs_free(t, 0);
|
|
458
565
|
}
|
|
459
566
|
get expressId() {
|
|
460
|
-
return
|
|
567
|
+
return a.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
|
|
461
568
|
}
|
|
462
569
|
get holeCounts() {
|
|
463
|
-
const t =
|
|
464
|
-
return
|
|
570
|
+
const t = a.profileentryjs_holeCounts(this.__wbg_ptr);
|
|
571
|
+
return D(t);
|
|
465
572
|
}
|
|
466
573
|
get holePoints() {
|
|
467
|
-
const t =
|
|
468
|
-
return
|
|
574
|
+
const t = a.profileentryjs_holePoints(this.__wbg_ptr);
|
|
575
|
+
return D(t);
|
|
469
576
|
}
|
|
470
577
|
get modelIndex() {
|
|
471
|
-
return
|
|
578
|
+
return a.profileentryjs_modelIndex(this.__wbg_ptr) >>> 0;
|
|
472
579
|
}
|
|
473
580
|
get outerPoints() {
|
|
474
|
-
const t =
|
|
475
|
-
return
|
|
581
|
+
const t = a.profileentryjs_outerPoints(this.__wbg_ptr);
|
|
582
|
+
return D(t);
|
|
476
583
|
}
|
|
477
584
|
get extrusionDir() {
|
|
478
|
-
const t =
|
|
479
|
-
return
|
|
585
|
+
const t = a.profileentryjs_extrusionDir(this.__wbg_ptr);
|
|
586
|
+
return D(t);
|
|
480
587
|
}
|
|
481
588
|
get extrusionDepth() {
|
|
482
|
-
return
|
|
589
|
+
return a.profileentryjs_extrusionDepth(this.__wbg_ptr);
|
|
483
590
|
}
|
|
484
591
|
get ifcType() {
|
|
485
592
|
let t, e;
|
|
486
593
|
try {
|
|
487
|
-
const i =
|
|
488
|
-
|
|
594
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
595
|
+
a.profileentryjs_ifcType(i, this.__wbg_ptr);
|
|
489
596
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
490
597
|
return t = n, e = s, J(n, s);
|
|
491
598
|
} finally{
|
|
492
|
-
|
|
599
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
493
600
|
}
|
|
494
601
|
}
|
|
495
602
|
get transform() {
|
|
496
|
-
const t =
|
|
497
|
-
return
|
|
603
|
+
const t = a.profileentryjs_transform(this.__wbg_ptr);
|
|
604
|
+
return D(t);
|
|
498
605
|
}
|
|
499
606
|
}
|
|
500
|
-
Symbol.dispose && (
|
|
501
|
-
class
|
|
607
|
+
Symbol.dispose && (Bt.prototype[Symbol.dispose] = Bt.prototype.free);
|
|
608
|
+
class Ut {
|
|
502
609
|
static __wrap(t) {
|
|
503
610
|
t = t >>> 0;
|
|
504
|
-
const e = Object.create(
|
|
505
|
-
return e.__wbg_ptr = t,
|
|
611
|
+
const e = Object.create(Ut.prototype);
|
|
612
|
+
return e.__wbg_ptr = t, Ee.register(e, e.__wbg_ptr, e), e;
|
|
506
613
|
}
|
|
507
614
|
__destroy_into_raw() {
|
|
508
615
|
const t = this.__wbg_ptr;
|
|
509
|
-
return this.__wbg_ptr = 0,
|
|
616
|
+
return this.__wbg_ptr = 0, Ee.unregister(this), t;
|
|
510
617
|
}
|
|
511
618
|
free() {
|
|
512
619
|
const t = this.__destroy_into_raw();
|
|
513
|
-
|
|
620
|
+
a.__wbg_symboliccircle_free(t, 0);
|
|
514
621
|
}
|
|
515
622
|
get expressId() {
|
|
516
|
-
return
|
|
623
|
+
return a.symboliccircle_expressId(this.__wbg_ptr) >>> 0;
|
|
517
624
|
}
|
|
518
625
|
get startAngle() {
|
|
519
|
-
return
|
|
626
|
+
return a.symboliccircle_startAngle(this.__wbg_ptr);
|
|
520
627
|
}
|
|
521
628
|
get isFullCircle() {
|
|
522
|
-
return
|
|
629
|
+
return a.symboliccircle_isFullCircle(this.__wbg_ptr) !== 0;
|
|
523
630
|
}
|
|
524
631
|
get repIdentifier() {
|
|
525
632
|
let t, e;
|
|
526
633
|
try {
|
|
527
|
-
const i =
|
|
528
|
-
|
|
634
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
635
|
+
a.symboliccircle_repIdentifier(i, this.__wbg_ptr);
|
|
529
636
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
530
637
|
return t = n, e = s, J(n, s);
|
|
531
638
|
} finally{
|
|
532
|
-
|
|
639
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
533
640
|
}
|
|
534
641
|
}
|
|
535
642
|
get radius() {
|
|
536
|
-
return
|
|
643
|
+
return a.symboliccircle_radius(this.__wbg_ptr);
|
|
537
644
|
}
|
|
538
645
|
get worldY() {
|
|
539
|
-
return
|
|
646
|
+
return a.symboliccircle_worldY(this.__wbg_ptr);
|
|
540
647
|
}
|
|
541
648
|
get centerX() {
|
|
542
|
-
return
|
|
649
|
+
return a.symboliccircle_centerX(this.__wbg_ptr);
|
|
543
650
|
}
|
|
544
651
|
get centerY() {
|
|
545
|
-
return
|
|
652
|
+
return a.symboliccircle_centerY(this.__wbg_ptr);
|
|
546
653
|
}
|
|
547
654
|
get ifcType() {
|
|
548
655
|
let t, e;
|
|
549
656
|
try {
|
|
550
|
-
const i =
|
|
551
|
-
|
|
657
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
658
|
+
a.symboliccircle_ifcType(i, this.__wbg_ptr);
|
|
552
659
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
553
660
|
return t = n, e = s, J(n, s);
|
|
554
661
|
} finally{
|
|
555
|
-
|
|
662
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
556
663
|
}
|
|
557
664
|
}
|
|
558
665
|
get endAngle() {
|
|
559
|
-
return
|
|
666
|
+
return a.symboliccircle_endAngle(this.__wbg_ptr);
|
|
560
667
|
}
|
|
561
668
|
}
|
|
562
|
-
Symbol.dispose && (
|
|
563
|
-
class
|
|
669
|
+
Symbol.dispose && (Ut.prototype[Symbol.dispose] = Ut.prototype.free);
|
|
670
|
+
class Dt {
|
|
564
671
|
static __wrap(t) {
|
|
565
672
|
t = t >>> 0;
|
|
566
|
-
const e = Object.create(
|
|
567
|
-
return e.__wbg_ptr = t,
|
|
673
|
+
const e = Object.create(Dt.prototype);
|
|
674
|
+
return e.__wbg_ptr = t, be.register(e, e.__wbg_ptr, e), e;
|
|
568
675
|
}
|
|
569
676
|
__destroy_into_raw() {
|
|
570
677
|
const t = this.__wbg_ptr;
|
|
571
|
-
return this.__wbg_ptr = 0,
|
|
678
|
+
return this.__wbg_ptr = 0, be.unregister(this), t;
|
|
572
679
|
}
|
|
573
680
|
free() {
|
|
574
681
|
const t = this.__destroy_into_raw();
|
|
575
|
-
|
|
682
|
+
a.__wbg_symbolicfillarea_free(t, 0);
|
|
576
683
|
}
|
|
577
684
|
get expressId() {
|
|
578
|
-
return
|
|
685
|
+
return a.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
|
|
579
686
|
}
|
|
580
687
|
get holeCount() {
|
|
581
|
-
return
|
|
688
|
+
return a.symbolicfillarea_holeCount(this.__wbg_ptr) >>> 0;
|
|
582
689
|
}
|
|
583
690
|
get hatchAngle() {
|
|
584
|
-
return
|
|
691
|
+
return a.symbolicfillarea_hatchAngle(this.__wbg_ptr);
|
|
585
692
|
}
|
|
586
693
|
get pointCount() {
|
|
587
|
-
return
|
|
694
|
+
return a.symbolicfillarea_pointCount(this.__wbg_ptr) >>> 0;
|
|
588
695
|
}
|
|
589
696
|
get hasHatching() {
|
|
590
|
-
return
|
|
697
|
+
return a.symbolicfillarea_hasHatching(this.__wbg_ptr) !== 0;
|
|
591
698
|
}
|
|
592
699
|
get hatchSpacing() {
|
|
593
|
-
return
|
|
700
|
+
return a.symbolicfillarea_hatchSpacing(this.__wbg_ptr);
|
|
594
701
|
}
|
|
595
702
|
get holesOffsets() {
|
|
596
|
-
const t =
|
|
597
|
-
return
|
|
703
|
+
const t = a.symbolicfillarea_holesOffsets(this.__wbg_ptr);
|
|
704
|
+
return D(t);
|
|
598
705
|
}
|
|
599
706
|
get repIdentifier() {
|
|
600
707
|
let t, e;
|
|
601
708
|
try {
|
|
602
|
-
const i =
|
|
603
|
-
|
|
709
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
710
|
+
a.symbolicfillarea_repIdentifier(i, this.__wbg_ptr);
|
|
604
711
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
605
712
|
return t = n, e = s, J(n, s);
|
|
606
713
|
} finally{
|
|
607
|
-
|
|
714
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
608
715
|
}
|
|
609
716
|
}
|
|
610
717
|
get hatchLineWidth() {
|
|
611
|
-
return
|
|
718
|
+
return a.symbolicfillarea_hatchLineWidth(this.__wbg_ptr);
|
|
612
719
|
}
|
|
613
720
|
get hatchAngleSecondary() {
|
|
614
|
-
return
|
|
721
|
+
return a.symbolicfillarea_hatchAngleSecondary(this.__wbg_ptr);
|
|
615
722
|
}
|
|
616
723
|
get fillA() {
|
|
617
|
-
return
|
|
724
|
+
return a.symbolicfillarea_fillA(this.__wbg_ptr);
|
|
618
725
|
}
|
|
619
726
|
get fillB() {
|
|
620
|
-
return
|
|
727
|
+
return a.symbolicfillarea_fillB(this.__wbg_ptr);
|
|
621
728
|
}
|
|
622
729
|
get fillG() {
|
|
623
|
-
return
|
|
730
|
+
return a.symbolicfillarea_fillG(this.__wbg_ptr);
|
|
624
731
|
}
|
|
625
732
|
get fillR() {
|
|
626
|
-
return
|
|
733
|
+
return a.symbolicfillarea_fillR(this.__wbg_ptr);
|
|
627
734
|
}
|
|
628
735
|
get points() {
|
|
629
|
-
const t =
|
|
630
|
-
return
|
|
736
|
+
const t = a.symbolicfillarea_points(this.__wbg_ptr);
|
|
737
|
+
return D(t);
|
|
631
738
|
}
|
|
632
739
|
get worldY() {
|
|
633
|
-
return
|
|
740
|
+
return a.symbolicfillarea_worldY(this.__wbg_ptr);
|
|
634
741
|
}
|
|
635
742
|
get ifcType() {
|
|
636
743
|
let t, e;
|
|
637
744
|
try {
|
|
638
|
-
const i =
|
|
639
|
-
|
|
745
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
746
|
+
a.symbolicfillarea_ifcType(i, this.__wbg_ptr);
|
|
640
747
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
641
748
|
return t = n, e = s, J(n, s);
|
|
642
749
|
} finally{
|
|
643
|
-
|
|
750
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
644
751
|
}
|
|
645
752
|
}
|
|
646
753
|
}
|
|
647
|
-
Symbol.dispose && (
|
|
648
|
-
class
|
|
754
|
+
Symbol.dispose && (Dt.prototype[Symbol.dispose] = Dt.prototype.free);
|
|
755
|
+
class vt {
|
|
649
756
|
static __wrap(t) {
|
|
650
757
|
t = t >>> 0;
|
|
651
|
-
const e = Object.create(
|
|
652
|
-
return e.__wbg_ptr = t,
|
|
758
|
+
const e = Object.create(vt.prototype);
|
|
759
|
+
return e.__wbg_ptr = t, Ce.register(e, e.__wbg_ptr, e), e;
|
|
653
760
|
}
|
|
654
761
|
__destroy_into_raw() {
|
|
655
762
|
const t = this.__wbg_ptr;
|
|
656
|
-
return this.__wbg_ptr = 0,
|
|
763
|
+
return this.__wbg_ptr = 0, Ce.unregister(this), t;
|
|
657
764
|
}
|
|
658
765
|
free() {
|
|
659
766
|
const t = this.__destroy_into_raw();
|
|
660
|
-
|
|
767
|
+
a.__wbg_symbolicpolyline_free(t, 0);
|
|
661
768
|
}
|
|
662
769
|
get expressId() {
|
|
663
|
-
return
|
|
770
|
+
return a.symbolicpolyline_expressId(this.__wbg_ptr) >>> 0;
|
|
664
771
|
}
|
|
665
772
|
get pointCount() {
|
|
666
|
-
return
|
|
773
|
+
return a.symbolicfillarea_pointCount(this.__wbg_ptr) >>> 0;
|
|
667
774
|
}
|
|
668
775
|
get repIdentifier() {
|
|
669
776
|
let t, e;
|
|
670
777
|
try {
|
|
671
|
-
const i =
|
|
672
|
-
|
|
778
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
779
|
+
a.symbolicpolyline_repIdentifier(i, this.__wbg_ptr);
|
|
673
780
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
674
781
|
return t = n, e = s, J(n, s);
|
|
675
782
|
} finally{
|
|
676
|
-
|
|
783
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
677
784
|
}
|
|
678
785
|
}
|
|
679
786
|
get points() {
|
|
680
|
-
const t =
|
|
681
|
-
return
|
|
787
|
+
const t = a.symbolicpolyline_points(this.__wbg_ptr);
|
|
788
|
+
return D(t);
|
|
682
789
|
}
|
|
683
790
|
get worldY() {
|
|
684
|
-
return
|
|
791
|
+
return a.symboliccircle_worldY(this.__wbg_ptr);
|
|
685
792
|
}
|
|
686
793
|
get ifcType() {
|
|
687
794
|
let t, e;
|
|
688
795
|
try {
|
|
689
|
-
const i =
|
|
690
|
-
|
|
796
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
797
|
+
a.symbolicpolyline_ifcType(i, this.__wbg_ptr);
|
|
691
798
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
692
799
|
return t = n, e = s, J(n, s);
|
|
693
800
|
} finally{
|
|
694
|
-
|
|
801
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
695
802
|
}
|
|
696
803
|
}
|
|
697
804
|
get isClosed() {
|
|
698
|
-
return
|
|
805
|
+
return a.symbolicpolyline_isClosed(this.__wbg_ptr) !== 0;
|
|
699
806
|
}
|
|
700
807
|
}
|
|
701
|
-
Symbol.dispose && (
|
|
702
|
-
class
|
|
808
|
+
Symbol.dispose && (vt.prototype[Symbol.dispose] = vt.prototype.free);
|
|
809
|
+
class Gt {
|
|
703
810
|
static __wrap(t) {
|
|
704
811
|
t = t >>> 0;
|
|
705
|
-
const e = Object.create(
|
|
706
|
-
return e.__wbg_ptr = t,
|
|
812
|
+
const e = Object.create(Gt.prototype);
|
|
813
|
+
return e.__wbg_ptr = t, we.register(e, e.__wbg_ptr, e), e;
|
|
707
814
|
}
|
|
708
815
|
__destroy_into_raw() {
|
|
709
816
|
const t = this.__wbg_ptr;
|
|
710
|
-
return this.__wbg_ptr = 0,
|
|
817
|
+
return this.__wbg_ptr = 0, we.unregister(this), t;
|
|
711
818
|
}
|
|
712
819
|
free() {
|
|
713
820
|
const t = this.__destroy_into_raw();
|
|
714
|
-
|
|
821
|
+
a.__wbg_symbolicrepresentationcollection_free(t, 0);
|
|
715
822
|
}
|
|
716
823
|
get fillCount() {
|
|
717
|
-
return
|
|
824
|
+
return a.symbolicrepresentationcollection_fillCount(this.__wbg_ptr) >>> 0;
|
|
718
825
|
}
|
|
719
826
|
getCircle(t) {
|
|
720
|
-
const e =
|
|
721
|
-
return e === 0 ? void 0 :
|
|
827
|
+
const e = a.symbolicrepresentationcollection_getCircle(this.__wbg_ptr, t);
|
|
828
|
+
return e === 0 ? void 0 : Ut.__wrap(e);
|
|
722
829
|
}
|
|
723
830
|
get textCount() {
|
|
724
|
-
return
|
|
831
|
+
return a.symbolicrepresentationcollection_textCount(this.__wbg_ptr) >>> 0;
|
|
725
832
|
}
|
|
726
833
|
get totalCount() {
|
|
727
|
-
return
|
|
834
|
+
return a.symbolicrepresentationcollection_totalCount(this.__wbg_ptr) >>> 0;
|
|
728
835
|
}
|
|
729
836
|
get circleCount() {
|
|
730
|
-
return
|
|
837
|
+
return a.symbolicrepresentationcollection_circleCount(this.__wbg_ptr) >>> 0;
|
|
731
838
|
}
|
|
732
839
|
getPolyline(t) {
|
|
733
|
-
const e =
|
|
734
|
-
return e === 0 ? void 0 :
|
|
840
|
+
const e = a.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr, t);
|
|
841
|
+
return e === 0 ? void 0 : vt.__wrap(e);
|
|
735
842
|
}
|
|
736
843
|
get polylineCount() {
|
|
737
|
-
return
|
|
844
|
+
return a.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr) >>> 0;
|
|
738
845
|
}
|
|
739
846
|
getExpressIds() {
|
|
740
847
|
try {
|
|
741
|
-
const s =
|
|
742
|
-
|
|
743
|
-
var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n =
|
|
744
|
-
return
|
|
848
|
+
const s = a.__wbindgen_add_to_stack_pointer(-16);
|
|
849
|
+
a.symbolicrepresentationcollection_getExpressIds(s, this.__wbg_ptr);
|
|
850
|
+
var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n = De(t, e).slice();
|
|
851
|
+
return a.__wbindgen_export2(t, e * 4, 4), n;
|
|
745
852
|
} finally{
|
|
746
|
-
|
|
853
|
+
a.__wbindgen_add_to_stack_pointer(16);
|
|
747
854
|
}
|
|
748
855
|
}
|
|
749
856
|
getFill(t) {
|
|
750
|
-
const e =
|
|
751
|
-
return e === 0 ? void 0 :
|
|
857
|
+
const e = a.symbolicrepresentationcollection_getFill(this.__wbg_ptr, t);
|
|
858
|
+
return e === 0 ? void 0 : Dt.__wrap(e);
|
|
752
859
|
}
|
|
753
860
|
getText(t) {
|
|
754
|
-
const e =
|
|
755
|
-
return e === 0 ? void 0 :
|
|
861
|
+
const e = a.symbolicrepresentationcollection_getText(this.__wbg_ptr, t);
|
|
862
|
+
return e === 0 ? void 0 : $t.__wrap(e);
|
|
756
863
|
}
|
|
757
864
|
get isEmpty() {
|
|
758
|
-
return
|
|
865
|
+
return a.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr) !== 0;
|
|
759
866
|
}
|
|
760
867
|
}
|
|
761
|
-
Symbol.dispose && (
|
|
762
|
-
class
|
|
868
|
+
Symbol.dispose && (Gt.prototype[Symbol.dispose] = Gt.prototype.free);
|
|
869
|
+
class $t {
|
|
763
870
|
static __wrap(t) {
|
|
764
871
|
t = t >>> 0;
|
|
765
|
-
const e = Object.create(
|
|
766
|
-
return e.__wbg_ptr = t,
|
|
872
|
+
const e = Object.create($t.prototype);
|
|
873
|
+
return e.__wbg_ptr = t, Te.register(e, e.__wbg_ptr, e), e;
|
|
767
874
|
}
|
|
768
875
|
__destroy_into_raw() {
|
|
769
876
|
const t = this.__wbg_ptr;
|
|
770
|
-
return this.__wbg_ptr = 0,
|
|
877
|
+
return this.__wbg_ptr = 0, Te.unregister(this), t;
|
|
771
878
|
}
|
|
772
879
|
free() {
|
|
773
880
|
const t = this.__destroy_into_raw();
|
|
774
|
-
|
|
881
|
+
a.__wbg_symbolictext_free(t, 0);
|
|
775
882
|
}
|
|
776
883
|
get expressId() {
|
|
777
|
-
return
|
|
884
|
+
return a.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
|
|
778
885
|
}
|
|
779
886
|
get repIdentifier() {
|
|
780
887
|
let t, e;
|
|
781
888
|
try {
|
|
782
|
-
const i =
|
|
783
|
-
|
|
889
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
890
|
+
a.symbolictext_repIdentifier(i, this.__wbg_ptr);
|
|
784
891
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
785
892
|
return t = n, e = s, J(n, s);
|
|
786
893
|
} finally{
|
|
787
|
-
|
|
894
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
788
895
|
}
|
|
789
896
|
}
|
|
790
897
|
get x() {
|
|
791
|
-
return
|
|
898
|
+
return a.symbolicfillarea_fillR(this.__wbg_ptr);
|
|
792
899
|
}
|
|
793
900
|
get y() {
|
|
794
|
-
return
|
|
901
|
+
return a.symbolicfillarea_fillG(this.__wbg_ptr);
|
|
795
902
|
}
|
|
796
903
|
get dirX() {
|
|
797
|
-
return
|
|
904
|
+
return a.symbolicfillarea_fillB(this.__wbg_ptr);
|
|
798
905
|
}
|
|
799
906
|
get dirY() {
|
|
800
|
-
return
|
|
907
|
+
return a.symbolicfillarea_fillA(this.__wbg_ptr);
|
|
801
908
|
}
|
|
802
909
|
get height() {
|
|
803
|
-
return
|
|
910
|
+
return a.symbolicfillarea_hatchSpacing(this.__wbg_ptr);
|
|
804
911
|
}
|
|
805
912
|
get colorA() {
|
|
806
|
-
return
|
|
913
|
+
return a.symbolictext_colorA(this.__wbg_ptr);
|
|
807
914
|
}
|
|
808
915
|
get colorB() {
|
|
809
|
-
return
|
|
916
|
+
return a.symbolicfillarea_worldY(this.__wbg_ptr);
|
|
810
917
|
}
|
|
811
918
|
get colorG() {
|
|
812
|
-
return
|
|
919
|
+
return a.symbolicfillarea_hatchLineWidth(this.__wbg_ptr);
|
|
813
920
|
}
|
|
814
921
|
get colorR() {
|
|
815
|
-
return
|
|
922
|
+
return a.symbolicfillarea_hatchAngleSecondary(this.__wbg_ptr);
|
|
816
923
|
}
|
|
817
924
|
get content() {
|
|
818
925
|
let t, e;
|
|
819
926
|
try {
|
|
820
|
-
const i =
|
|
821
|
-
|
|
927
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
928
|
+
a.symbolictext_content(i, this.__wbg_ptr);
|
|
822
929
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
823
930
|
return t = n, e = s, J(n, s);
|
|
824
931
|
} finally{
|
|
825
|
-
|
|
932
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
826
933
|
}
|
|
827
934
|
}
|
|
828
935
|
get worldY() {
|
|
829
|
-
return
|
|
936
|
+
return a.symbolicfillarea_hatchAngle(this.__wbg_ptr);
|
|
830
937
|
}
|
|
831
938
|
get ifcType() {
|
|
832
939
|
let t, e;
|
|
833
940
|
try {
|
|
834
|
-
const i =
|
|
835
|
-
|
|
941
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
942
|
+
a.symbolictext_ifcType(i, this.__wbg_ptr);
|
|
836
943
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
837
944
|
return t = n, e = s, J(n, s);
|
|
838
945
|
} finally{
|
|
839
|
-
|
|
946
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
840
947
|
}
|
|
841
948
|
}
|
|
842
949
|
get alignment() {
|
|
843
950
|
let t, e;
|
|
844
951
|
try {
|
|
845
|
-
const i =
|
|
846
|
-
|
|
952
|
+
const i = a.__wbindgen_add_to_stack_pointer(-16);
|
|
953
|
+
a.symbolictext_alignment(i, this.__wbg_ptr);
|
|
847
954
|
var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
|
|
848
955
|
return t = n, e = s, J(n, s);
|
|
849
956
|
} finally{
|
|
850
|
-
|
|
957
|
+
a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
|
|
851
958
|
}
|
|
852
959
|
}
|
|
853
960
|
get targetPx() {
|
|
854
|
-
return
|
|
961
|
+
return a.symbolictext_targetPx(this.__wbg_ptr);
|
|
855
962
|
}
|
|
856
963
|
}
|
|
857
|
-
Symbol.dispose && (
|
|
858
|
-
const
|
|
964
|
+
Symbol.dispose && ($t.prototype[Symbol.dispose] = $t.prototype.free);
|
|
965
|
+
const fn = new Set([
|
|
859
966
|
"basic",
|
|
860
967
|
"cors",
|
|
861
968
|
"default"
|
|
862
969
|
]);
|
|
863
|
-
async function
|
|
970
|
+
async function un(r, t) {
|
|
864
971
|
if (typeof Response == "function" && r instanceof Response) {
|
|
865
972
|
if (typeof WebAssembly.instantiateStreaming == "function") try {
|
|
866
973
|
return await WebAssembly.instantiateStreaming(r, t);
|
|
867
974
|
} catch (n) {
|
|
868
|
-
if (r.ok &&
|
|
975
|
+
if (r.ok && fn.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);
|
|
869
976
|
else throw n;
|
|
870
977
|
}
|
|
871
978
|
const e = await r.arrayBuffer();
|
|
@@ -878,161 +985,164 @@ let __tla = Promise.all([
|
|
|
878
985
|
} : e;
|
|
879
986
|
}
|
|
880
987
|
}
|
|
881
|
-
function
|
|
988
|
+
function hn() {
|
|
882
989
|
const r = {};
|
|
883
990
|
return r.wbg = {}, r.wbg.__wbg_Error_52673b7de5a0ca89 = function(t, e) {
|
|
884
991
|
const n = Error(J(t, e));
|
|
885
|
-
return
|
|
992
|
+
return U(n);
|
|
886
993
|
}, r.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(t) {
|
|
887
|
-
return typeof
|
|
994
|
+
return typeof k(t) == "function";
|
|
888
995
|
}, r.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(t) {
|
|
889
|
-
return
|
|
996
|
+
return k(t) === void 0;
|
|
890
997
|
}, r.wbg.__wbg___wbindgen_memory_a342e963fbcabd68 = function() {
|
|
891
|
-
const t =
|
|
892
|
-
return
|
|
998
|
+
const t = a.memory;
|
|
999
|
+
return U(t);
|
|
893
1000
|
}, r.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(t, e) {
|
|
894
1001
|
throw new Error(J(t, e));
|
|
895
1002
|
}, r.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(t) {
|
|
896
|
-
|
|
1003
|
+
k(t)._wbg_cb_unref();
|
|
897
1004
|
}, r.wbg.__wbg_call_3020136f7a2d6e44 = function() {
|
|
898
|
-
return
|
|
899
|
-
const s =
|
|
900
|
-
return
|
|
1005
|
+
return Qt(function(t, e, n) {
|
|
1006
|
+
const s = k(t).call(k(e), k(n));
|
|
1007
|
+
return U(s);
|
|
901
1008
|
}, arguments);
|
|
902
1009
|
}, r.wbg.__wbg_call_abb4ff46ce38be40 = function() {
|
|
903
|
-
return
|
|
904
|
-
const n =
|
|
905
|
-
return
|
|
1010
|
+
return Qt(function(t, e) {
|
|
1011
|
+
const n = k(t).call(k(e));
|
|
1012
|
+
return U(n);
|
|
906
1013
|
}, arguments);
|
|
907
1014
|
}, r.wbg.__wbg_error_7534b8e9a36f1ab4 = function(t, e) {
|
|
908
1015
|
let n, s;
|
|
909
1016
|
try {
|
|
910
1017
|
n = t, s = e, console.error(J(t, e));
|
|
911
1018
|
} finally{
|
|
912
|
-
|
|
1019
|
+
a.__wbindgen_export2(n, s, 1);
|
|
913
1020
|
}
|
|
914
1021
|
}, r.wbg.__wbg_info_ce6bcc489c22f6f0 = function(t) {
|
|
915
|
-
console.info(
|
|
1022
|
+
console.info(k(t));
|
|
916
1023
|
}, r.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
917
1024
|
const t = new Object;
|
|
918
|
-
return
|
|
1025
|
+
return U(t);
|
|
919
1026
|
}, r.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
920
1027
|
const t = new Array;
|
|
921
|
-
return
|
|
1028
|
+
return U(t);
|
|
922
1029
|
}, r.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
923
1030
|
const t = new Error;
|
|
924
|
-
return
|
|
1031
|
+
return U(t);
|
|
925
1032
|
}, r.wbg.__wbg_new_ff12d2b041fb48f1 = function(t, e) {
|
|
926
1033
|
try {
|
|
927
1034
|
var n = {
|
|
928
1035
|
a: t,
|
|
929
1036
|
b: e
|
|
930
|
-
}, s = (o,
|
|
1037
|
+
}, s = (o, c)=>{
|
|
931
1038
|
const l = n.a;
|
|
932
1039
|
n.a = 0;
|
|
933
1040
|
try {
|
|
934
|
-
return
|
|
1041
|
+
return dn(l, n.b, o, c);
|
|
935
1042
|
} finally{
|
|
936
1043
|
n.a = l;
|
|
937
1044
|
}
|
|
938
1045
|
};
|
|
939
1046
|
const i = new Promise(s);
|
|
940
|
-
return
|
|
1047
|
+
return U(i);
|
|
941
1048
|
} finally{
|
|
942
1049
|
n.a = n.b = 0;
|
|
943
1050
|
}
|
|
944
1051
|
}, r.wbg.__wbg_new_from_slice_41e2764a343e3cb1 = function(t, e) {
|
|
945
|
-
const n = new Float32Array(
|
|
946
|
-
return
|
|
1052
|
+
const n = new Float32Array(re(t, e));
|
|
1053
|
+
return U(n);
|
|
947
1054
|
}, r.wbg.__wbg_new_from_slice_db0691b69e9d3891 = function(t, e) {
|
|
948
|
-
const n = new Uint32Array(
|
|
949
|
-
return
|
|
1055
|
+
const n = new Uint32Array(De(t, e));
|
|
1056
|
+
return U(n);
|
|
1057
|
+
}, r.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(t, e) {
|
|
1058
|
+
const n = new Uint8Array(nn(t, e));
|
|
1059
|
+
return U(n);
|
|
950
1060
|
}, r.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(t, e) {
|
|
951
1061
|
const n = new Function(J(t, e));
|
|
952
|
-
return
|
|
1062
|
+
return U(n);
|
|
953
1063
|
}, r.wbg.__wbg_new_with_length_202b3db94ba5fc86 = function(t) {
|
|
954
1064
|
const e = new Uint32Array(t >>> 0);
|
|
955
|
-
return
|
|
1065
|
+
return U(e);
|
|
956
1066
|
}, r.wbg.__wbg_new_with_length_806b9e5b8290af7c = function(t) {
|
|
957
1067
|
const e = new Float64Array(t >>> 0);
|
|
958
|
-
return
|
|
1068
|
+
return U(e);
|
|
959
1069
|
}, r.wbg.__wbg_new_with_length_aa5eaf41d35235e5 = function(t) {
|
|
960
1070
|
const e = new Uint8Array(t >>> 0);
|
|
961
|
-
return
|
|
1071
|
+
return U(e);
|
|
962
1072
|
}, r.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(t) {
|
|
963
|
-
const e =
|
|
964
|
-
return
|
|
1073
|
+
const e = k(t).queueMicrotask;
|
|
1074
|
+
return U(e);
|
|
965
1075
|
}, r.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(t) {
|
|
966
|
-
queueMicrotask(
|
|
1076
|
+
queueMicrotask(k(t));
|
|
967
1077
|
}, r.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(t) {
|
|
968
|
-
const e = Promise.resolve(
|
|
969
|
-
return
|
|
1078
|
+
const e = Promise.resolve(k(t));
|
|
1079
|
+
return U(e);
|
|
970
1080
|
}, r.wbg.__wbg_set_3f1d0b984ed272ed = function(t, e, n) {
|
|
971
|
-
|
|
1081
|
+
k(t)[D(e)] = D(n);
|
|
972
1082
|
}, r.wbg.__wbg_set_781438a03c0c3c81 = function() {
|
|
973
|
-
return
|
|
974
|
-
return Reflect.set(
|
|
1083
|
+
return Qt(function(t, e, n) {
|
|
1084
|
+
return Reflect.set(k(t), k(e), k(n));
|
|
975
1085
|
}, arguments);
|
|
976
1086
|
}, r.wbg.__wbg_set_7df433eea03a5c14 = function(t, e, n) {
|
|
977
|
-
|
|
1087
|
+
k(t)[e >>> 0] = D(n);
|
|
978
1088
|
}, r.wbg.__wbg_set_index_021489b2916af13e = function(t, e, n) {
|
|
979
|
-
|
|
1089
|
+
k(t)[e >>> 0] = n;
|
|
980
1090
|
}, r.wbg.__wbg_set_index_04c4b93e64d08a52 = function(t, e, n) {
|
|
981
|
-
|
|
1091
|
+
k(t)[e >>> 0] = n;
|
|
982
1092
|
}, r.wbg.__wbg_set_index_42abe35f117e614e = function(t, e, n) {
|
|
983
|
-
|
|
1093
|
+
k(t)[e >>> 0] = n >>> 0;
|
|
984
1094
|
}, r.wbg.__wbg_stack_0ed75d68575b0f3c = function(t, e) {
|
|
985
|
-
const n =
|
|
1095
|
+
const n = k(e).stack, s = ct(n, a.__wbindgen_export3, a.__wbindgen_export4), i = G;
|
|
986
1096
|
A().setInt32(t + 4, i, !0), A().setInt32(t + 0, s, !0);
|
|
987
1097
|
}, r.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
988
1098
|
const t = typeof global > "u" ? null : global;
|
|
989
|
-
return
|
|
1099
|
+
return zt(t) ? 0 : U(t);
|
|
990
1100
|
}, r.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
991
1101
|
const t = typeof globalThis > "u" ? null : globalThis;
|
|
992
|
-
return
|
|
1102
|
+
return zt(t) ? 0 : U(t);
|
|
993
1103
|
}, r.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
994
1104
|
const t = typeof self > "u" ? null : self;
|
|
995
|
-
return
|
|
1105
|
+
return zt(t) ? 0 : U(t);
|
|
996
1106
|
}, r.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
997
1107
|
const t = typeof window > "u" ? null : window;
|
|
998
|
-
return
|
|
1108
|
+
return zt(t) ? 0 : U(t);
|
|
999
1109
|
}, r.wbg.__wbg_then_4f95312d68691235 = function(t, e) {
|
|
1000
|
-
const n =
|
|
1001
|
-
return
|
|
1110
|
+
const n = k(t).then(k(e));
|
|
1111
|
+
return U(n);
|
|
1002
1112
|
}, r.wbg.__wbg_warn_6e567d0d926ff881 = function(t) {
|
|
1003
|
-
console.warn(
|
|
1113
|
+
console.warn(k(t));
|
|
1004
1114
|
}, r.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(t, e) {
|
|
1005
1115
|
const n = J(t, e);
|
|
1006
|
-
return
|
|
1116
|
+
return U(n);
|
|
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);
|
|
1007
1120
|
}, r.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(t) {
|
|
1008
1121
|
const e = BigInt.asUintN(64, t);
|
|
1009
|
-
return
|
|
1122
|
+
return U(e);
|
|
1010
1123
|
}, r.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(t) {
|
|
1011
|
-
return
|
|
1012
|
-
}, r.wbg.__wbindgen_cast_e7ad0d7b317830d5 = function(t, e) {
|
|
1013
|
-
const n = tn(t, e, c.__wasm_bindgen_func_elem_592, sn);
|
|
1014
|
-
return B(n);
|
|
1124
|
+
return U(t);
|
|
1015
1125
|
}, r.wbg.__wbindgen_object_clone_ref = function(t) {
|
|
1016
|
-
const e =
|
|
1017
|
-
return
|
|
1126
|
+
const e = k(t);
|
|
1127
|
+
return U(e);
|
|
1018
1128
|
}, r.wbg.__wbindgen_object_drop_ref = function(t) {
|
|
1019
|
-
|
|
1129
|
+
D(t);
|
|
1020
1130
|
}, r;
|
|
1021
1131
|
}
|
|
1022
|
-
function
|
|
1023
|
-
return
|
|
1132
|
+
function pn(r, t) {
|
|
1133
|
+
return a = r.exports, Ge.__wbindgen_wasm_module = t, _t = null, Tt = null, Ft = null, Rt = null, St = null, a.__wbindgen_start(), a;
|
|
1024
1134
|
}
|
|
1025
|
-
|
|
1026
|
-
if (
|
|
1027
|
-
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-
|
|
1028
|
-
const t =
|
|
1135
|
+
Ge = async function(r) {
|
|
1136
|
+
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-DsYUIHm3.wasm", import.meta.url));
|
|
1138
|
+
const t = hn();
|
|
1029
1139
|
(typeof r == "string" || typeof Request == "function" && r instanceof Request || typeof URL == "function" && r instanceof URL) && (r = fetch(r));
|
|
1030
|
-
const { instance: e, module: n } = await
|
|
1031
|
-
return
|
|
1140
|
+
const { instance: e, module: n } = await un(await r, t);
|
|
1141
|
+
return pn(e, n);
|
|
1032
1142
|
};
|
|
1033
|
-
const
|
|
1034
|
-
let
|
|
1035
|
-
class
|
|
1143
|
+
const tt = We("Geometry"), In = "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.";
|
|
1144
|
+
let Kt = null;
|
|
1145
|
+
class _n {
|
|
1036
1146
|
ifcApi = null;
|
|
1037
1147
|
initialized = !1;
|
|
1038
1148
|
mergeLayers = !1;
|
|
@@ -1040,15 +1150,15 @@ let __tla = Promise.all([
|
|
|
1040
1150
|
return t instanceof WebAssembly.RuntimeError;
|
|
1041
1151
|
}
|
|
1042
1152
|
markFatalWasmRuntimeError() {
|
|
1043
|
-
|
|
1153
|
+
Kt = new Error(In), this.reset();
|
|
1044
1154
|
}
|
|
1045
1155
|
async init() {
|
|
1046
1156
|
if (!this.initialized) {
|
|
1047
|
-
if (
|
|
1157
|
+
if (Kt) throw Kt;
|
|
1048
1158
|
try {
|
|
1049
|
-
await
|
|
1159
|
+
await Ge(), tt.debug("Geometry processing: single-threaded WASM (N-worker pool handles parallelism)"), this.ifcApi = new oe, this.applyMergeLayers(), this.initialized = !0, tt.info("WASM geometry engine initialized");
|
|
1050
1160
|
} catch (t) {
|
|
1051
|
-
throw
|
|
1161
|
+
throw tt.error("Failed to initialize WASM geometry engine", t, {
|
|
1052
1162
|
operation: "init"
|
|
1053
1163
|
}), this.isWasmRuntimeError(t) ? this.markFatalWasmRuntimeError() : this.reset(), t;
|
|
1054
1164
|
}
|
|
@@ -1061,11 +1171,11 @@ let __tla = Promise.all([
|
|
|
1061
1171
|
if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
|
|
1062
1172
|
try {
|
|
1063
1173
|
const e = this.ifcApi.parseSymbolicRepresentations(t);
|
|
1064
|
-
return
|
|
1174
|
+
return tt.debug(`Parsed ${e.totalCount} symbolic items (${e.polylineCount} polylines, ${e.circleCount} circles)`, {
|
|
1065
1175
|
operation: "parseSymbolicRepresentations"
|
|
1066
1176
|
}), e;
|
|
1067
1177
|
} catch (e) {
|
|
1068
|
-
throw
|
|
1178
|
+
throw tt.error("Failed to parse symbolic representations", e, {
|
|
1069
1179
|
operation: "parseSymbolicRepresentations",
|
|
1070
1180
|
data: {
|
|
1071
1181
|
contentLength: t.length
|
|
@@ -1077,11 +1187,11 @@ let __tla = Promise.all([
|
|
|
1077
1187
|
if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
|
|
1078
1188
|
try {
|
|
1079
1189
|
const e = this.ifcApi.parseAlignmentLines(t);
|
|
1080
|
-
return
|
|
1190
|
+
return tt.debug(`Parsed ${e.length / 3} alignment line vertices`, {
|
|
1081
1191
|
operation: "parseAlignmentLines"
|
|
1082
1192
|
}), e;
|
|
1083
1193
|
} catch (e) {
|
|
1084
|
-
throw
|
|
1194
|
+
throw tt.error("Failed to parse alignment lines", e, {
|
|
1085
1195
|
operation: "parseAlignmentLines",
|
|
1086
1196
|
data: {
|
|
1087
1197
|
contentLength: t.length
|
|
@@ -1089,15 +1199,47 @@ let __tla = Promise.all([
|
|
|
1089
1199
|
}), this.isWasmRuntimeError(e) && this.markFatalWasmRuntimeError(), e;
|
|
1090
1200
|
}
|
|
1091
1201
|
}
|
|
1202
|
+
parseGridLines(t) {
|
|
1203
|
+
if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
|
|
1204
|
+
try {
|
|
1205
|
+
const e = this.ifcApi.parseGridLines(t);
|
|
1206
|
+
return tt.debug(`Parsed ${e.length / 3} grid line vertices`, {
|
|
1207
|
+
operation: "parseGridLines"
|
|
1208
|
+
}), e;
|
|
1209
|
+
} catch (e) {
|
|
1210
|
+
throw tt.error("Failed to parse grid lines", e, {
|
|
1211
|
+
operation: "parseGridLines",
|
|
1212
|
+
data: {
|
|
1213
|
+
contentLength: t.length
|
|
1214
|
+
}
|
|
1215
|
+
}), this.isWasmRuntimeError(e) && this.markFatalWasmRuntimeError(), e;
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
parseGridAxes(t) {
|
|
1219
|
+
if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
|
|
1220
|
+
try {
|
|
1221
|
+
const e = this.ifcApi.parseGridAxes(t);
|
|
1222
|
+
return tt.debug(`Parsed ${e.length} grid axes`, {
|
|
1223
|
+
operation: "parseGridAxes"
|
|
1224
|
+
}), e;
|
|
1225
|
+
} catch (e) {
|
|
1226
|
+
throw tt.error("Failed to parse grid axes", e, {
|
|
1227
|
+
operation: "parseGridAxes",
|
|
1228
|
+
data: {
|
|
1229
|
+
contentLength: t.length
|
|
1230
|
+
}
|
|
1231
|
+
}), this.isWasmRuntimeError(e) && this.markFatalWasmRuntimeError(), e;
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1092
1234
|
extractProfiles(t, e = 0) {
|
|
1093
1235
|
if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
|
|
1094
1236
|
try {
|
|
1095
1237
|
const n = this.ifcApi.extractProfiles(t, e);
|
|
1096
|
-
return
|
|
1238
|
+
return tt.debug(`Extracted ${n.length} profiles`, {
|
|
1097
1239
|
operation: "extractProfiles"
|
|
1098
1240
|
}), n;
|
|
1099
1241
|
} catch (n) {
|
|
1100
|
-
throw
|
|
1242
|
+
throw tt.error("Failed to extract profiles", n, {
|
|
1101
1243
|
operation: "extractProfiles",
|
|
1102
1244
|
data: {
|
|
1103
1245
|
contentLength: t.length
|
|
@@ -1125,7 +1267,7 @@ let __tla = Promise.all([
|
|
|
1125
1267
|
if (!this.ifcApi) return;
|
|
1126
1268
|
const t = this.ifcApi;
|
|
1127
1269
|
if (typeof t.setMergeLayers != "function") {
|
|
1128
|
-
|
|
1270
|
+
tt.warn("setMergeLayers not present on WASM API — flag tracked but suppression is a no-op until WASM is rebuilt", {
|
|
1129
1271
|
operation: "setMergeLayers",
|
|
1130
1272
|
data: {
|
|
1131
1273
|
requested: this.mergeLayers
|
|
@@ -1133,18 +1275,18 @@ let __tla = Promise.all([
|
|
|
1133
1275
|
});
|
|
1134
1276
|
return;
|
|
1135
1277
|
}
|
|
1136
|
-
t.setMergeLayers(this.mergeLayers),
|
|
1278
|
+
t.setMergeLayers(this.mergeLayers), tt.debug(`mergeLayers=${this.mergeLayers}`, {
|
|
1137
1279
|
operation: "setMergeLayers"
|
|
1138
1280
|
});
|
|
1139
1281
|
}
|
|
1140
1282
|
}
|
|
1141
|
-
function
|
|
1283
|
+
function $e() {
|
|
1142
1284
|
return typeof window < "u" && "__TAURI_INTERNALS__" in window;
|
|
1143
1285
|
}
|
|
1144
|
-
async function
|
|
1145
|
-
if (
|
|
1146
|
-
const { NativeBridge: r } = await
|
|
1147
|
-
const { NativeBridge: t } = await import("./native-bridge-
|
|
1286
|
+
async function gn() {
|
|
1287
|
+
if ($e()) {
|
|
1288
|
+
const { NativeBridge: r } = await je(async ()=>{
|
|
1289
|
+
const { NativeBridge: t } = await import("./native-bridge-BX8_tHXE.js").then(async (m)=>{
|
|
1148
1290
|
await m.__tla;
|
|
1149
1291
|
return m;
|
|
1150
1292
|
});
|
|
@@ -1156,12 +1298,12 @@ let __tla = Promise.all([
|
|
|
1156
1298
|
}
|
|
1157
1299
|
throw new Error("createPlatformBridge() is native-only; the browser uses the WASM GeometryProcessor path directly.");
|
|
1158
1300
|
}
|
|
1159
|
-
class
|
|
1301
|
+
class yn {
|
|
1160
1302
|
buildInterleavedBuffer(t) {
|
|
1161
1303
|
const e = t.positions.length / 3, n = new Float32Array(e * 6);
|
|
1162
1304
|
for(let s = 0; s < e; s++){
|
|
1163
|
-
const i = s * 6, o = s * 3,
|
|
1164
|
-
n[i] = t.positions[o], n[i + 1] = t.positions[o + 1], n[i + 2] = t.positions[o + 2], n[i + 3] = t.normals[
|
|
1305
|
+
const i = s * 6, o = s * 3, c = s * 3;
|
|
1306
|
+
n[i] = t.positions[o], n[i + 1] = t.positions[o + 1], n[i + 2] = t.positions[o + 2], n[i + 3] = t.normals[c], n[i + 4] = t.normals[c + 1], n[i + 5] = t.normals[c + 2];
|
|
1165
1307
|
}
|
|
1166
1308
|
return n;
|
|
1167
1309
|
}
|
|
@@ -1175,7 +1317,7 @@ let __tla = Promise.all([
|
|
|
1175
1317
|
};
|
|
1176
1318
|
}
|
|
1177
1319
|
}
|
|
1178
|
-
class
|
|
1320
|
+
class mn {
|
|
1179
1321
|
originShift = {
|
|
1180
1322
|
x: 0,
|
|
1181
1323
|
y: 0,
|
|
@@ -1188,6 +1330,8 @@ let __tla = Promise.all([
|
|
|
1188
1330
|
wasmRtcDetected = !1;
|
|
1189
1331
|
NORMAL_COORD_THRESHOLD = 1e4;
|
|
1190
1332
|
activeThreshold = 1e7;
|
|
1333
|
+
appliedWasmRtcOffset = null;
|
|
1334
|
+
lengthUnitScale = void 0;
|
|
1191
1335
|
isReasonableValue(t) {
|
|
1192
1336
|
return Number.isFinite(t) && Math.abs(t) < this.MAX_REASONABLE_COORD;
|
|
1193
1337
|
}
|
|
@@ -1207,22 +1351,22 @@ let __tla = Promise.all([
|
|
|
1207
1351
|
}, s = e ?? this.MAX_REASONABLE_COORD;
|
|
1208
1352
|
for (const i of t){
|
|
1209
1353
|
const o = i.positions;
|
|
1210
|
-
for(let
|
|
1211
|
-
const l = o[
|
|
1354
|
+
for(let c = 0; c < o.length; c += 3){
|
|
1355
|
+
const l = o[c], d = o[c + 1], u = o[c + 2];
|
|
1212
1356
|
Number.isFinite(l) && Number.isFinite(d) && Number.isFinite(u) && Math.abs(l) < s && Math.abs(d) < s && Math.abs(u) < 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, u), 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, u));
|
|
1213
1357
|
}
|
|
1214
1358
|
}
|
|
1215
1359
|
return n;
|
|
1216
1360
|
}
|
|
1217
1361
|
calculateBoundsFast(t) {
|
|
1218
|
-
let e = 1 / 0, n = 1 / 0, s = 1 / 0, i = -1 / 0, o = -1 / 0,
|
|
1362
|
+
let e = 1 / 0, n = 1 / 0, s = 1 / 0, i = -1 / 0, o = -1 / 0, c = -1 / 0;
|
|
1219
1363
|
for (const l of t){
|
|
1220
1364
|
const d = l.positions, u = d.length;
|
|
1221
1365
|
if (u < 3) continue;
|
|
1222
|
-
const f = d[0], p = d[1],
|
|
1223
|
-
if (f < e && (e = f), p < n && (n = p),
|
|
1224
|
-
const h = d[u - 3], y = d[u - 2],
|
|
1225
|
-
h < e && (e = h), y < n && (n = y),
|
|
1366
|
+
const f = d[0], p = d[1], g = d[2];
|
|
1367
|
+
if (f < e && (e = f), p < n && (n = p), g < s && (s = g), f > i && (i = f), p > o && (o = p), g > c && (c = g), u >= 6) {
|
|
1368
|
+
const h = d[u - 3], y = d[u - 2], E = d[u - 1];
|
|
1369
|
+
h < e && (e = h), y < n && (n = y), E < s && (s = E), h > i && (i = h), y > o && (o = y), E > c && (c = E);
|
|
1226
1370
|
}
|
|
1227
1371
|
}
|
|
1228
1372
|
return {
|
|
@@ -1234,7 +1378,7 @@ let __tla = Promise.all([
|
|
|
1234
1378
|
max: {
|
|
1235
1379
|
x: i,
|
|
1236
1380
|
y: o,
|
|
1237
|
-
z:
|
|
1381
|
+
z: c
|
|
1238
1382
|
}
|
|
1239
1383
|
};
|
|
1240
1384
|
}
|
|
@@ -1251,8 +1395,8 @@ let __tla = Promise.all([
|
|
|
1251
1395
|
shiftPositions(t, e, n) {
|
|
1252
1396
|
const s = n ?? this.MAX_REASONABLE_COORD;
|
|
1253
1397
|
for(let i = 0; i < t.length; i += 3){
|
|
1254
|
-
const o = t[i],
|
|
1255
|
-
Number.isFinite(o) && Number.isFinite(
|
|
1398
|
+
const o = t[i], c = t[i + 1], l = t[i + 2];
|
|
1399
|
+
Number.isFinite(o) && Number.isFinite(c) && Number.isFinite(l) && Math.abs(o) < s && Math.abs(c) < s && Math.abs(l) < s ? (t[i] = o - e.x, t[i + 1] = c - e.y, t[i + 2] = l - e.z) : (t[i] = 0, t[i + 1] = 0, t[i + 2] = 0);
|
|
1256
1400
|
}
|
|
1257
1401
|
}
|
|
1258
1402
|
shiftBounds(t, e) {
|
|
@@ -1322,11 +1466,11 @@ let __tla = Promise.all([
|
|
|
1322
1466
|
const o = this.calculateCentroid(n);
|
|
1323
1467
|
this.originShift = o;
|
|
1324
1468
|
for (const l of t)this.shiftPositions(l.positions, o);
|
|
1325
|
-
const
|
|
1469
|
+
const c = this.shiftBounds(n, o);
|
|
1326
1470
|
return {
|
|
1327
1471
|
originShift: o,
|
|
1328
1472
|
originalBounds: n,
|
|
1329
|
-
shiftedBounds:
|
|
1473
|
+
shiftedBounds: c,
|
|
1330
1474
|
hasLargeCoordinates: !0
|
|
1331
1475
|
};
|
|
1332
1476
|
}
|
|
@@ -1358,18 +1502,18 @@ let __tla = Promise.all([
|
|
|
1358
1502
|
x: this.accumulatedBounds.max.x - this.accumulatedBounds.min.x,
|
|
1359
1503
|
y: this.accumulatedBounds.max.y - this.accumulatedBounds.min.y,
|
|
1360
1504
|
z: this.accumulatedBounds.max.z - this.accumulatedBounds.min.z
|
|
1361
|
-
}, i = Math.max(s.x, s.y, s.z), o = this.calculateCentroid(this.accumulatedBounds),
|
|
1505
|
+
}, 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);
|
|
1362
1506
|
let l = 0, d = 0;
|
|
1363
1507
|
const u = this.THRESHOLD;
|
|
1364
|
-
for (const
|
|
1365
|
-
const h =
|
|
1508
|
+
for (const g of t){
|
|
1509
|
+
const h = g.positions;
|
|
1366
1510
|
if (h.length >= 3) {
|
|
1367
|
-
const y = Math.abs(h[0]),
|
|
1368
|
-
Math.max(y,
|
|
1511
|
+
const y = Math.abs(h[0]), E = Math.abs(h[1]), C = Math.abs(h[2]);
|
|
1512
|
+
Math.max(y, E, C) < u ? l++ : d++;
|
|
1369
1513
|
}
|
|
1370
1514
|
}
|
|
1371
1515
|
const f = l + d, p = f > 0 && l / f > .5;
|
|
1372
|
-
p && (this.wasmRtcDetected = !0, this.accumulatedBounds = this.calculateBounds(t, this.NORMAL_COORD_THRESHOLD)), (
|
|
1516
|
+
p && (this.wasmRtcDetected = !0, this.accumulatedBounds = this.calculateBounds(t, this.NORMAL_COORD_THRESHOLD)), (c > this.THRESHOLD || i > this.THRESHOLD) && !p && (this.originShift = o);
|
|
1373
1517
|
}
|
|
1374
1518
|
this.shiftCalculated = !0;
|
|
1375
1519
|
}
|
|
@@ -1394,7 +1538,15 @@ let __tla = Promise.all([
|
|
|
1394
1538
|
...this.accumulatedBounds
|
|
1395
1539
|
},
|
|
1396
1540
|
shiftedBounds: e,
|
|
1397
|
-
hasLargeCoordinates: n
|
|
1541
|
+
hasLargeCoordinates: n,
|
|
1542
|
+
...this.appliedWasmRtcOffset ? {
|
|
1543
|
+
wasmRtcOffset: {
|
|
1544
|
+
...this.appliedWasmRtcOffset
|
|
1545
|
+
}
|
|
1546
|
+
} : {},
|
|
1547
|
+
...this.lengthUnitScale !== void 0 ? {
|
|
1548
|
+
lengthUnitScale: this.lengthUnitScale
|
|
1549
|
+
} : {}
|
|
1398
1550
|
};
|
|
1399
1551
|
}
|
|
1400
1552
|
getFinalCoordinateInfo() {
|
|
@@ -1429,27 +1581,40 @@ let __tla = Promise.all([
|
|
|
1429
1581
|
z: 0
|
|
1430
1582
|
}
|
|
1431
1583
|
},
|
|
1432
|
-
hasLargeCoordinates: !1
|
|
1584
|
+
hasLargeCoordinates: !1,
|
|
1585
|
+
...this.appliedWasmRtcOffset ? {
|
|
1586
|
+
wasmRtcOffset: {
|
|
1587
|
+
...this.appliedWasmRtcOffset
|
|
1588
|
+
}
|
|
1589
|
+
} : {},
|
|
1590
|
+
...this.lengthUnitScale !== void 0 ? {
|
|
1591
|
+
lengthUnitScale: this.lengthUnitScale
|
|
1592
|
+
} : {}
|
|
1433
1593
|
};
|
|
1434
1594
|
}
|
|
1595
|
+
setWasmMetadata(t, e) {
|
|
1596
|
+
this.lengthUnitScale = t, this.appliedWasmRtcOffset = e ? {
|
|
1597
|
+
...e
|
|
1598
|
+
} : null;
|
|
1599
|
+
}
|
|
1435
1600
|
reset() {
|
|
1436
1601
|
this.accumulatedBounds = null, this.shiftCalculated = !1, this.originShift = {
|
|
1437
1602
|
x: 0,
|
|
1438
1603
|
y: 0,
|
|
1439
1604
|
z: 0
|
|
1440
|
-
}, this.wasmRtcDetected = !1, this.activeThreshold = this.MAX_REASONABLE_COORD;
|
|
1605
|
+
}, this.wasmRtcDetected = !1, this.activeThreshold = this.MAX_REASONABLE_COORD, this.appliedWasmRtcOffset = null, this.lengthUnitScale = void 0;
|
|
1441
1606
|
}
|
|
1442
1607
|
}
|
|
1443
|
-
|
|
1444
|
-
function
|
|
1445
|
-
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)),
|
|
1608
|
+
En = ((r)=>(r.Fast = "fast", r.Balanced = "balanced", r.High = "high", r))(En || {});
|
|
1609
|
+
function bn(r) {
|
|
1610
|
+
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));
|
|
1446
1611
|
if (i === 0) return {
|
|
1447
1612
|
count: 0,
|
|
1448
1613
|
reason: "jobs"
|
|
1449
1614
|
};
|
|
1450
1615
|
let l;
|
|
1451
|
-
e >= 16 && s >= 16 ? l = Math.min(
|
|
1452
|
-
const d = s * 1024, u = Math.max(1024, d * .25), f = t * 2.5, p = Math.max(64, t * 1.5),
|
|
1616
|
+
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, u = Math.max(1024, d * .25), f = t * 2.5, p = Math.max(64, t * 1.5), g = d - u - f, h = g > 0 ? Math.max(1, Math.floor(g / p)) : 1, y = [
|
|
1453
1618
|
{
|
|
1454
1619
|
value: l,
|
|
1455
1620
|
reason: "cores"
|
|
@@ -1463,34 +1628,34 @@ let __tla = Promise.all([
|
|
|
1463
1628
|
reason: "jobs"
|
|
1464
1629
|
},
|
|
1465
1630
|
{
|
|
1466
|
-
value:
|
|
1631
|
+
value: c,
|
|
1467
1632
|
reason: "max"
|
|
1468
1633
|
}
|
|
1469
1634
|
];
|
|
1470
|
-
let
|
|
1471
|
-
for(let
|
|
1472
|
-
return
|
|
1635
|
+
let E = y[0];
|
|
1636
|
+
for(let C = 1; C < y.length; C++)y[C].value < E.value && (E = y[C]);
|
|
1637
|
+
return E.value < o ? {
|
|
1473
1638
|
count: o,
|
|
1474
1639
|
reason: "min"
|
|
1475
1640
|
} : {
|
|
1476
|
-
count:
|
|
1477
|
-
reason:
|
|
1641
|
+
count: E.value,
|
|
1642
|
+
reason: E.reason
|
|
1478
1643
|
};
|
|
1479
1644
|
}
|
|
1480
|
-
function
|
|
1481
|
-
return
|
|
1645
|
+
function Cn(r) {
|
|
1646
|
+
return bn(r).count;
|
|
1482
1647
|
}
|
|
1483
|
-
const
|
|
1484
|
-
|
|
1485
|
-
const t = r.desktopStableWasm === !0, e = Math.max(0, Math.floor(r.batchCount)), n = Math.max(0, r.fileSizeMB), s = e > 0 ? t ?
|
|
1648
|
+
const wn = 3e4, Tn = 15e3, Fn = 15e3, Rn = 5e3, Sn = 60, Nn = 30, An = 30, On = 15;
|
|
1649
|
+
as = function(r) {
|
|
1650
|
+
const t = r.desktopStableWasm === !0, e = Math.max(0, Math.floor(r.batchCount)), n = Math.max(0, r.fileSizeMB), s = e > 0 ? t ? Rn : Fn : t ? Tn : wn, i = e > 0 ? t ? On : An : t ? Nn : Sn;
|
|
1486
1651
|
return Math.max(s, Math.round(s + n * i));
|
|
1487
1652
|
};
|
|
1488
|
-
function
|
|
1653
|
+
function xn(r, t) {
|
|
1489
1654
|
if (typeof t == "number") return t;
|
|
1490
1655
|
const e = t.fileSizeMB ? t.fileSizeMB : r.length / (1024 * 1024);
|
|
1491
1656
|
return e < 10 ? 100 : e < 50 ? 200 : e < 100 ? 300 : e < 300 ? 500 : e < 500 ? 1500 : 3e3;
|
|
1492
1657
|
}
|
|
1493
|
-
function
|
|
1658
|
+
function Fe(r) {
|
|
1494
1659
|
const t = [];
|
|
1495
1660
|
try {
|
|
1496
1661
|
for(let e = 0; e < r.length; e++){
|
|
@@ -1501,8 +1666,7 @@ let __tla = Promise.all([
|
|
|
1501
1666
|
s[1],
|
|
1502
1667
|
s[2],
|
|
1503
1668
|
s[3]
|
|
1504
|
-
] : void 0
|
|
1505
|
-
t.push({
|
|
1669
|
+
] : void 0, o = {
|
|
1506
1670
|
expressId: n.expressId,
|
|
1507
1671
|
ifcType: n.ifcType,
|
|
1508
1672
|
positions: n.positions,
|
|
@@ -1517,7 +1681,14 @@ let __tla = Promise.all([
|
|
|
1517
1681
|
...i ? {
|
|
1518
1682
|
shadingColor: i
|
|
1519
1683
|
} : {}
|
|
1520
|
-
}
|
|
1684
|
+
};
|
|
1685
|
+
n.hasTexture && (o.uvs = n.uvs, o.texture = {
|
|
1686
|
+
rgba: n.textureRgba,
|
|
1687
|
+
width: n.textureWidth,
|
|
1688
|
+
height: n.textureHeight,
|
|
1689
|
+
repeatS: n.textureRepeatS,
|
|
1690
|
+
repeatT: n.textureRepeatT
|
|
1691
|
+
}), t.push(o);
|
|
1521
1692
|
} finally{
|
|
1522
1693
|
n.free();
|
|
1523
1694
|
}
|
|
@@ -1527,41 +1698,41 @@ let __tla = Promise.all([
|
|
|
1527
1698
|
}
|
|
1528
1699
|
return t;
|
|
1529
1700
|
}
|
|
1530
|
-
function
|
|
1701
|
+
function Wt(r, t) {
|
|
1531
1702
|
return t !== void 0 ? {
|
|
1532
1703
|
...r,
|
|
1533
1704
|
buildingRotation: t
|
|
1534
1705
|
} : r;
|
|
1535
1706
|
}
|
|
1536
|
-
const
|
|
1537
|
-
function
|
|
1707
|
+
const Ln = 8, Mn = 32768, Pn = 4, Bn = 8192, Un = 10;
|
|
1708
|
+
function Re() {
|
|
1538
1709
|
const r = globalThis.scheduler;
|
|
1539
1710
|
return typeof r?.yield == "function" ? r.yield() : new Promise((t)=>{
|
|
1540
1711
|
globalThis.setTimeout(t, 0);
|
|
1541
1712
|
});
|
|
1542
1713
|
}
|
|
1543
|
-
function
|
|
1714
|
+
function Se(r, t, e) {
|
|
1544
1715
|
if (t.type === "colorUpdate") {
|
|
1545
1716
|
const i = r[r.length - 1];
|
|
1546
1717
|
if (i?.type === "colorUpdate") {
|
|
1547
|
-
for (const [o,
|
|
1718
|
+
for (const [o, c] of t.updates)i.updates.set(o, c);
|
|
1548
1719
|
return;
|
|
1549
1720
|
}
|
|
1550
1721
|
r.push(t);
|
|
1551
1722
|
return;
|
|
1552
1723
|
}
|
|
1553
1724
|
const n = r[r.length - 1];
|
|
1554
|
-
if (n?.type === "batch" && (r.length >=
|
|
1725
|
+
if (n?.type === "batch" && (r.length >= Ln || e.queuedMeshes >= Mn)) {
|
|
1555
1726
|
for(let i = 0; i < t.meshes.length; i++)n.meshes.push(t.meshes[i]);
|
|
1556
1727
|
n.nativeTelemetry = t.nativeTelemetry, e.coalescedBatchCount += 1;
|
|
1557
1728
|
} else r.push(t);
|
|
1558
1729
|
e.queuedMeshes += t.meshes.length;
|
|
1559
1730
|
}
|
|
1560
|
-
async function*
|
|
1731
|
+
async function* Ne(r, t, e, n) {
|
|
1561
1732
|
e.reset(), yield {
|
|
1562
1733
|
type: "start",
|
|
1563
1734
|
totalEstimate: t
|
|
1564
|
-
}, await
|
|
1735
|
+
}, await Re(), yield {
|
|
1565
1736
|
type: "model-open",
|
|
1566
1737
|
modelID: 0
|
|
1567
1738
|
};
|
|
@@ -1569,65 +1740,65 @@ let __tla = Promise.all([
|
|
|
1569
1740
|
queuedMeshes: 0,
|
|
1570
1741
|
coalescedBatchCount: 0
|
|
1571
1742
|
};
|
|
1572
|
-
let o = null,
|
|
1743
|
+
let o = null, c = !1, l = null, d, u = 0;
|
|
1573
1744
|
const f = ()=>{
|
|
1574
1745
|
o && (o(), o = null);
|
|
1575
1746
|
}, p = r({
|
|
1576
1747
|
onBatch: (h)=>{
|
|
1577
|
-
|
|
1748
|
+
Se(s, {
|
|
1578
1749
|
type: "batch",
|
|
1579
1750
|
meshes: h.meshes,
|
|
1580
1751
|
nativeTelemetry: h.nativeTelemetry
|
|
1581
1752
|
}, i), f();
|
|
1582
1753
|
},
|
|
1583
1754
|
onColorUpdate: (h)=>{
|
|
1584
|
-
|
|
1755
|
+
Se(s, {
|
|
1585
1756
|
type: "colorUpdate",
|
|
1586
1757
|
updates: new Map(h)
|
|
1587
1758
|
}, i), f();
|
|
1588
1759
|
},
|
|
1589
1760
|
onComplete: (h)=>{
|
|
1590
|
-
n(h), d = h.totalMeshes,
|
|
1761
|
+
n(h), d = h.totalMeshes, c = !0, f();
|
|
1591
1762
|
},
|
|
1592
1763
|
onError: (h)=>{
|
|
1593
|
-
l = h,
|
|
1764
|
+
l = h, c = !0, f();
|
|
1594
1765
|
}
|
|
1595
1766
|
});
|
|
1596
|
-
for(; !
|
|
1597
|
-
let h = 0, y = 0,
|
|
1767
|
+
for(; !c || s.length > 0;){
|
|
1768
|
+
let h = 0, y = 0, E = performance.now();
|
|
1598
1769
|
for(; s.length > 0;){
|
|
1599
|
-
const
|
|
1600
|
-
if (
|
|
1770
|
+
const C = s.shift();
|
|
1771
|
+
if (C.type === "colorUpdate") {
|
|
1601
1772
|
yield {
|
|
1602
1773
|
type: "colorUpdate",
|
|
1603
|
-
updates:
|
|
1774
|
+
updates: C.updates
|
|
1604
1775
|
};
|
|
1605
1776
|
continue;
|
|
1606
1777
|
}
|
|
1607
|
-
i.queuedMeshes = Math.max(0, i.queuedMeshes -
|
|
1608
|
-
const
|
|
1778
|
+
i.queuedMeshes = Math.max(0, i.queuedMeshes - C.meshes.length), e.processTrustedMeshesIncremental(C.meshes), u += C.meshes.length;
|
|
1779
|
+
const T = e.getCurrentCoordinateInfo();
|
|
1609
1780
|
yield {
|
|
1610
1781
|
type: "batch",
|
|
1611
|
-
meshes:
|
|
1782
|
+
meshes: C.meshes,
|
|
1612
1783
|
totalSoFar: u,
|
|
1613
|
-
coordinateInfo:
|
|
1614
|
-
nativeTelemetry:
|
|
1615
|
-
}, h += 1, y +=
|
|
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());
|
|
1616
1787
|
}
|
|
1617
1788
|
if (l) throw l;
|
|
1618
|
-
|
|
1619
|
-
o =
|
|
1789
|
+
c || await new Promise((C)=>{
|
|
1790
|
+
o = C;
|
|
1620
1791
|
});
|
|
1621
1792
|
}
|
|
1622
1793
|
await p, i.coalescedBatchCount > 0 && console.info(`[GeometryProcessor] Coalesced ${i.coalescedBatchCount} native batches while JS drained the queue`);
|
|
1623
|
-
const
|
|
1794
|
+
const g = e.getFinalCoordinateInfo();
|
|
1624
1795
|
yield {
|
|
1625
1796
|
type: "complete",
|
|
1626
1797
|
totalMeshes: d ?? u,
|
|
1627
|
-
coordinateInfo:
|
|
1798
|
+
coordinateInfo: g
|
|
1628
1799
|
};
|
|
1629
1800
|
}
|
|
1630
|
-
async function*
|
|
1801
|
+
async function* Dn(r, t, e, n, s) {
|
|
1631
1802
|
t.reset(), yield {
|
|
1632
1803
|
type: "start",
|
|
1633
1804
|
totalEstimate: r.length / 1e3
|
|
@@ -1638,164 +1809,174 @@ let __tla = Promise.all([
|
|
|
1638
1809
|
let i;
|
|
1639
1810
|
const o = r.buffer;
|
|
1640
1811
|
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));
|
|
1641
|
-
const
|
|
1812
|
+
const c = ()=>new Worker(new URL("/assets/geometry.worker-BdH-E6NB.js", import.meta.url), {
|
|
1642
1813
|
type: "module"
|
|
1643
|
-
}), l = ()=>new Worker(new URL("/assets/geometry.worker-
|
|
1814
|
+
}), l = ()=>new Worker(new URL("/assets/geometry.worker-BdH-E6NB.js", import.meta.url), {
|
|
1644
1815
|
type: "module"
|
|
1645
1816
|
}), d = [];
|
|
1646
1817
|
let u = null;
|
|
1647
1818
|
const f = ()=>{
|
|
1648
1819
|
u && (u(), u = null);
|
|
1649
1820
|
};
|
|
1650
|
-
let p = null,
|
|
1651
|
-
const
|
|
1652
|
-
let O = !1,
|
|
1653
|
-
const
|
|
1654
|
-
|
|
1655
|
-
const
|
|
1656
|
-
if (
|
|
1821
|
+
let p = null, g = 0, h = !1, y = null, E = null, C = 0, T = 0, $ = !1, x = !1;
|
|
1822
|
+
const Y = [];
|
|
1823
|
+
let O = !1, v = !1;
|
|
1824
|
+
const b = [], S = (L, X)=>{
|
|
1825
|
+
L.onmessage = (B)=>{
|
|
1826
|
+
const M = B.data;
|
|
1827
|
+
if (M.type === "ready") {
|
|
1657
1828
|
console.log(`[stream] worker[${X}] WASM ready @ ${Q()}ms`);
|
|
1658
1829
|
return;
|
|
1659
1830
|
}
|
|
1660
|
-
if (
|
|
1831
|
+
if (M.type === "memory") {
|
|
1661
1832
|
d.push({
|
|
1662
1833
|
type: "workerMemory",
|
|
1663
1834
|
workerIndex: X,
|
|
1664
|
-
wasmHeapBytes:
|
|
1665
|
-
meshBytes:
|
|
1835
|
+
wasmHeapBytes: M.wasmHeapBytes,
|
|
1836
|
+
meshBytes: M.meshBytes
|
|
1666
1837
|
}), f();
|
|
1667
1838
|
return;
|
|
1668
1839
|
}
|
|
1669
|
-
if (
|
|
1670
|
-
|
|
1671
|
-
const q =
|
|
1672
|
-
expressId:
|
|
1673
|
-
ifcType:
|
|
1674
|
-
positions:
|
|
1675
|
-
normals:
|
|
1676
|
-
indices:
|
|
1677
|
-
color:
|
|
1840
|
+
if (M.type === "batch") {
|
|
1841
|
+
b[X] === void 0 && (b[X] = Q(), console.log(`[stream] worker[${X}] first batch @ ${Q()}ms (${M.meshes?.length ?? 0} meshes)`));
|
|
1842
|
+
const q = M.meshes.map((P)=>({
|
|
1843
|
+
expressId: P.expressId,
|
|
1844
|
+
ifcType: P.ifcType,
|
|
1845
|
+
positions: P.positions instanceof Float32Array ? P.positions : new Float32Array(P.positions),
|
|
1846
|
+
normals: P.normals instanceof Float32Array ? P.normals : new Float32Array(P.normals),
|
|
1847
|
+
indices: P.indices instanceof Uint32Array ? P.indices : new Uint32Array(P.indices),
|
|
1848
|
+
color: P.color,
|
|
1849
|
+
...P.uvs ? {
|
|
1850
|
+
uvs: P.uvs
|
|
1851
|
+
} : {},
|
|
1852
|
+
...P.texture ? {
|
|
1853
|
+
texture: P.texture
|
|
1854
|
+
} : {}
|
|
1678
1855
|
}));
|
|
1679
1856
|
if (q.length > 0) {
|
|
1680
|
-
|
|
1681
|
-
const
|
|
1857
|
+
T += q.length, t.processMeshesIncremental(q);
|
|
1858
|
+
const P = t.getCurrentCoordinateInfo();
|
|
1682
1859
|
d.push({
|
|
1683
1860
|
type: "batch",
|
|
1684
1861
|
meshes: q,
|
|
1685
|
-
totalSoFar:
|
|
1686
|
-
coordinateInfo:
|
|
1862
|
+
totalSoFar: T,
|
|
1863
|
+
coordinateInfo: P || void 0
|
|
1687
1864
|
}), f();
|
|
1688
1865
|
}
|
|
1689
1866
|
return;
|
|
1690
1867
|
}
|
|
1691
|
-
if (
|
|
1692
|
-
|
|
1868
|
+
if (M.type === "complete") {
|
|
1869
|
+
C++, L.terminate(), f();
|
|
1693
1870
|
return;
|
|
1694
1871
|
}
|
|
1695
|
-
if (
|
|
1696
|
-
|
|
1872
|
+
if (M.type === "error") {
|
|
1873
|
+
E = new Error(`Geometry worker error: ${M.message}`), C++, L.terminate(), f();
|
|
1697
1874
|
return;
|
|
1698
1875
|
}
|
|
1699
|
-
},
|
|
1700
|
-
|
|
1876
|
+
}, L.onerror = (B)=>{
|
|
1877
|
+
E = new Error(`Geometry worker failed: ${B.message}`), C++, L.terminate(), f();
|
|
1701
1878
|
};
|
|
1702
|
-
}, F = typeof navigator < "u" ? navigator.hardwareConcurrency ?? 2 : 2,
|
|
1703
|
-
fileSizeMB:
|
|
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)), I = Cn({
|
|
1880
|
+
fileSizeMB: _,
|
|
1704
1881
|
cores: F,
|
|
1705
|
-
deviceMemoryGB:
|
|
1706
|
-
totalJobs:
|
|
1882
|
+
deviceMemoryGB: m,
|
|
1883
|
+
totalJobs: w
|
|
1707
1884
|
}), R = [];
|
|
1708
|
-
for(let
|
|
1709
|
-
const X =
|
|
1710
|
-
R.push(X),
|
|
1711
|
-
const
|
|
1885
|
+
for(let L = 0; L < I; L++){
|
|
1886
|
+
const X = c();
|
|
1887
|
+
R.push(X), S(X, L);
|
|
1888
|
+
const B = s?.wasmUrls?.wasm;
|
|
1712
1889
|
X.postMessage({
|
|
1713
1890
|
type: "init",
|
|
1714
|
-
...
|
|
1715
|
-
wasmUrl:
|
|
1891
|
+
...B ? {
|
|
1892
|
+
wasmUrl: B
|
|
1716
1893
|
} : {}
|
|
1717
1894
|
}), X.postMessage({
|
|
1718
1895
|
type: "set-merge-layers",
|
|
1719
1896
|
enabled: s?.mergeLayers === !0
|
|
1720
1897
|
});
|
|
1721
1898
|
}
|
|
1722
|
-
const
|
|
1723
|
-
if (
|
|
1724
|
-
|
|
1725
|
-
for (const
|
|
1726
|
-
|
|
1899
|
+
const N = ()=>{
|
|
1900
|
+
if (!$) {
|
|
1901
|
+
$ = !0;
|
|
1902
|
+
for (const L of R)try {
|
|
1903
|
+
L.postMessage({
|
|
1727
1904
|
type: "stream-end"
|
|
1728
1905
|
});
|
|
1729
1906
|
} catch {}
|
|
1730
1907
|
}
|
|
1731
|
-
},
|
|
1732
|
-
if (
|
|
1733
|
-
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1908
|
+
}, V = ()=>{
|
|
1909
|
+
if (x || !p) return;
|
|
1910
|
+
x = !0;
|
|
1911
|
+
const L = e != null, X = L ? e.x : p.rtcOffset[0], B = L ? e.y : p.rtcOffset[1], M = L ? e.z : p.rtcOffset[2], q = L ? !0 : p.needsShift;
|
|
1912
|
+
t.setWasmMetadata(p.unitScale, q ? {
|
|
1913
|
+
x: X,
|
|
1914
|
+
y: B,
|
|
1915
|
+
z: M
|
|
1916
|
+
} : null), d.push({
|
|
1736
1917
|
type: "rtcOffset",
|
|
1737
1918
|
rtcOffset: {
|
|
1738
1919
|
x: X,
|
|
1739
|
-
y:
|
|
1740
|
-
z:
|
|
1920
|
+
y: B,
|
|
1921
|
+
z: M
|
|
1741
1922
|
},
|
|
1742
1923
|
hasRtc: q
|
|
1743
1924
|
}), f();
|
|
1744
|
-
const
|
|
1925
|
+
const P = new Uint32Array(0), it = new Uint8Array(0);
|
|
1745
1926
|
for (const pt of R)pt.postMessage({
|
|
1746
1927
|
type: "stream-start",
|
|
1747
1928
|
sharedBuffer: i,
|
|
1748
1929
|
unitScale: p.unitScale,
|
|
1749
1930
|
rtcX: X,
|
|
1750
|
-
rtcY:
|
|
1751
|
-
rtcZ:
|
|
1931
|
+
rtcY: B,
|
|
1932
|
+
rtcZ: M,
|
|
1752
1933
|
needsShift: q,
|
|
1753
|
-
voidKeys:
|
|
1754
|
-
voidCounts:
|
|
1755
|
-
voidValues:
|
|
1756
|
-
styleIds:
|
|
1757
|
-
styleColors:
|
|
1934
|
+
voidKeys: P,
|
|
1935
|
+
voidCounts: P,
|
|
1936
|
+
voidValues: P,
|
|
1937
|
+
styleIds: P,
|
|
1938
|
+
styleColors: it
|
|
1758
1939
|
});
|
|
1759
1940
|
};
|
|
1760
|
-
function z(
|
|
1761
|
-
if (R.length === 0 ||
|
|
1762
|
-
const X = Math.floor(
|
|
1941
|
+
function z(L) {
|
|
1942
|
+
if (R.length === 0 || L.length === 0) return;
|
|
1943
|
+
const X = Math.floor(L.length / 3);
|
|
1763
1944
|
if (X === 0) return;
|
|
1764
|
-
const
|
|
1945
|
+
const B = Math.ceil(X / R.length);
|
|
1765
1946
|
try {
|
|
1766
|
-
for(let
|
|
1767
|
-
const q =
|
|
1768
|
-
if (q >=
|
|
1769
|
-
const
|
|
1770
|
-
R[
|
|
1947
|
+
for(let M = 0; M < R.length; M++){
|
|
1948
|
+
const q = M * B * 3, P = Math.min(q + B * 3, L.length);
|
|
1949
|
+
if (q >= P) continue;
|
|
1950
|
+
const it = L.slice(q, P);
|
|
1951
|
+
R[M].postMessage({
|
|
1771
1952
|
type: "stream-chunk",
|
|
1772
|
-
jobsFlat:
|
|
1953
|
+
jobsFlat: it
|
|
1773
1954
|
}, [
|
|
1774
|
-
|
|
1955
|
+
it.buffer
|
|
1775
1956
|
]);
|
|
1776
1957
|
}
|
|
1777
|
-
} catch (
|
|
1778
|
-
|
|
1958
|
+
} catch (M) {
|
|
1959
|
+
E = new Error(`Failed to dispatch jobs chunk: ${M instanceof Error ? M.message : String(M)}`), f();
|
|
1779
1960
|
}
|
|
1780
1961
|
}
|
|
1781
|
-
const
|
|
1782
|
-
if (!
|
|
1783
|
-
|
|
1962
|
+
const W = (L)=>{
|
|
1963
|
+
if (!x || !O || !v) {
|
|
1964
|
+
Y.push(L);
|
|
1784
1965
|
return;
|
|
1785
1966
|
}
|
|
1786
|
-
z(
|
|
1967
|
+
z(L);
|
|
1787
1968
|
}, H = ()=>{
|
|
1788
|
-
if (!(!
|
|
1789
|
-
},
|
|
1790
|
-
console.log(`[stream] processParallel start, fileSizeMB=${
|
|
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}`);
|
|
1791
1972
|
const K = l();
|
|
1792
1973
|
s?.wasmUrls?.wasm && K.postMessage({
|
|
1793
1974
|
type: "init",
|
|
1794
1975
|
wasmUrl: s.wasmUrls.wasm
|
|
1795
1976
|
});
|
|
1796
|
-
let at = 0, ht = 0,
|
|
1797
|
-
K.onmessage = (
|
|
1798
|
-
const X =
|
|
1977
|
+
let at = 0, ht = 0, rt = -1;
|
|
1978
|
+
K.onmessage = (L)=>{
|
|
1979
|
+
const X = L.data;
|
|
1799
1980
|
if (X.type === "prepass-progress") {
|
|
1800
1981
|
d.push({
|
|
1801
1982
|
type: "progress",
|
|
@@ -1804,114 +1985,114 @@ let __tla = Promise.all([
|
|
|
1804
1985
|
return;
|
|
1805
1986
|
}
|
|
1806
1987
|
if (X.type === "prepass-stream") {
|
|
1807
|
-
const
|
|
1808
|
-
if (
|
|
1809
|
-
unitScale:
|
|
1810
|
-
rtcOffset:
|
|
1811
|
-
needsShift:
|
|
1812
|
-
buildingRotation:
|
|
1813
|
-
}, 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)}]`),
|
|
1814
|
-
else if (
|
|
1815
|
-
const
|
|
1816
|
-
at++, ht += q,
|
|
1817
|
-
} else if (
|
|
1818
|
-
const
|
|
1819
|
-
console.log(`[stream] styles @ ${Q()}ms (${
|
|
1820
|
-
for (const
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1988
|
+
const B = X.event;
|
|
1989
|
+
if (B.type === "meta") p = {
|
|
1990
|
+
unitScale: B.unitScale,
|
|
1991
|
+
rtcOffset: B.rtcOffset,
|
|
1992
|
+
needsShift: B.needsShift,
|
|
1993
|
+
buildingRotation: B.buildingRotation ?? null
|
|
1994
|
+
}, 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)}]`), V(), f();
|
|
1995
|
+
else if (B.type === "jobs") {
|
|
1996
|
+
const M = B.jobs, q = Math.floor(M.length / 3);
|
|
1997
|
+
at++, ht += q, rt < 0 && (rt = Q(), console.log(`[stream] first jobs chunk @ ${rt}ms (${q} jobs)`)), (at % 10 === 1 || q < 1e3) && console.log(`[stream] chunk #${at} @ ${Q()}ms (+${q} jobs, total ${ht})`), W(M);
|
|
1998
|
+
} else if (B.type === "styles") {
|
|
1999
|
+
const M = B.styleIds, q = B.styleColors, P = B.voidKeys, it = B.voidCounts, pt = B.voidValues;
|
|
2000
|
+
console.log(`[stream] styles @ ${Q()}ms (${M.length} styled, ${P.length} void hosts), draining ${Y.length} queued chunks`);
|
|
2001
|
+
for (const qt of R)try {
|
|
2002
|
+
const ft = M.slice(), yt = q.slice(), mt = P.slice(), Et = it.slice(), Vt = pt.slice();
|
|
2003
|
+
qt.postMessage({
|
|
1823
2004
|
type: "set-styles",
|
|
1824
|
-
styleIds:
|
|
2005
|
+
styleIds: ft,
|
|
1825
2006
|
styleColors: yt,
|
|
1826
|
-
voidKeys:
|
|
1827
|
-
voidCounts:
|
|
1828
|
-
voidValues:
|
|
2007
|
+
voidKeys: mt,
|
|
2008
|
+
voidCounts: Et,
|
|
2009
|
+
voidValues: Vt
|
|
1829
2010
|
}, [
|
|
1830
|
-
|
|
2011
|
+
ft.buffer,
|
|
1831
2012
|
yt.buffer,
|
|
1832
|
-
Et.buffer,
|
|
1833
2013
|
mt.buffer,
|
|
1834
|
-
|
|
2014
|
+
Et.buffer,
|
|
2015
|
+
Vt.buffer
|
|
1835
2016
|
]);
|
|
1836
|
-
} catch (
|
|
1837
|
-
console.warn("[stream] set-styles dispatch failed:",
|
|
2017
|
+
} catch (ft) {
|
|
2018
|
+
console.warn("[stream] set-styles dispatch failed:", ft);
|
|
1838
2019
|
}
|
|
1839
2020
|
O = !0, H();
|
|
1840
|
-
} else if (
|
|
1841
|
-
const
|
|
1842
|
-
if (console.log(`[stream] entity-index @ ${Q()}ms (${
|
|
1843
|
-
const
|
|
1844
|
-
new Uint32Array(
|
|
1845
|
-
for (const
|
|
1846
|
-
|
|
2021
|
+
} else if (B.type === "entity-index") {
|
|
2022
|
+
const M = B.ids, q = B.starts, P = B.lengths;
|
|
2023
|
+
if (console.log(`[stream] entity-index @ ${Q()}ms (${M.length} entries)`), typeof SharedArrayBuffer < "u") {
|
|
2024
|
+
const it = M.byteLength, pt = q.byteLength, qt = P.byteLength, ft = new SharedArrayBuffer(it), yt = new SharedArrayBuffer(pt), mt = new SharedArrayBuffer(qt);
|
|
2025
|
+
new Uint32Array(ft).set(M), new Uint32Array(yt).set(q), new Uint32Array(mt).set(P);
|
|
2026
|
+
for (const Et of R)try {
|
|
2027
|
+
Et.postMessage({
|
|
1847
2028
|
type: "set-entity-index",
|
|
1848
|
-
ids: new Uint32Array(
|
|
2029
|
+
ids: new Uint32Array(ft),
|
|
1849
2030
|
starts: new Uint32Array(yt),
|
|
1850
|
-
lengths: new Uint32Array(
|
|
2031
|
+
lengths: new Uint32Array(mt)
|
|
1851
2032
|
});
|
|
1852
|
-
} catch (
|
|
1853
|
-
console.warn("[stream] set-entity-index dispatch failed:",
|
|
2033
|
+
} catch (Vt) {
|
|
2034
|
+
console.warn("[stream] set-entity-index dispatch failed:", Vt);
|
|
1854
2035
|
}
|
|
1855
2036
|
if (s?.onEntityIndex) try {
|
|
1856
|
-
s.onEntityIndex(new Uint32Array(
|
|
1857
|
-
} catch (
|
|
1858
|
-
console.warn("[stream] onEntityIndex callback failed:",
|
|
2037
|
+
s.onEntityIndex(new Uint32Array(ft), new Uint32Array(yt), new Uint32Array(mt));
|
|
2038
|
+
} catch (Et) {
|
|
2039
|
+
console.warn("[stream] onEntityIndex callback failed:", Et);
|
|
1859
2040
|
}
|
|
1860
2041
|
} else {
|
|
1861
|
-
for (const
|
|
1862
|
-
|
|
2042
|
+
for (const it of R)try {
|
|
2043
|
+
it.postMessage({
|
|
1863
2044
|
type: "set-entity-index",
|
|
1864
|
-
ids:
|
|
2045
|
+
ids: M.slice(),
|
|
1865
2046
|
starts: q.slice(),
|
|
1866
|
-
lengths:
|
|
2047
|
+
lengths: P.slice()
|
|
1867
2048
|
});
|
|
1868
2049
|
} catch (pt) {
|
|
1869
2050
|
console.warn("[stream] set-entity-index dispatch failed:", pt);
|
|
1870
2051
|
}
|
|
1871
2052
|
if (s?.onEntityIndex) try {
|
|
1872
|
-
s.onEntityIndex(
|
|
1873
|
-
} catch (
|
|
1874
|
-
console.warn("[stream] onEntityIndex callback failed:",
|
|
2053
|
+
s.onEntityIndex(M.slice(), q.slice(), P.slice());
|
|
2054
|
+
} catch (it) {
|
|
2055
|
+
console.warn("[stream] onEntityIndex callback failed:", it);
|
|
1875
2056
|
}
|
|
1876
2057
|
}
|
|
1877
|
-
|
|
1878
|
-
} else
|
|
2058
|
+
v = !0, H();
|
|
2059
|
+
} else B.type === "complete" && (g = B.totalJobs, console.log(`[stream] prepass complete @ ${Q()}ms totalJobs=${g} chunks=${at}`), lt || (lt = !0, dt()));
|
|
1879
2060
|
return;
|
|
1880
2061
|
}
|
|
1881
2062
|
if (X.type === "error") {
|
|
1882
2063
|
y = new Error(X.message), h = !0, K.terminate(), f();
|
|
1883
2064
|
return;
|
|
1884
2065
|
}
|
|
1885
|
-
}, K.onerror = (
|
|
1886
|
-
y = new Error(`Pre-pass worker failed: ${
|
|
2066
|
+
}, K.onerror = (L)=>{
|
|
2067
|
+
y = new Error(`Pre-pass worker failed: ${L.message}`), h = !0, K.terminate(), f();
|
|
1887
2068
|
};
|
|
1888
|
-
const
|
|
1889
|
-
h = !0,
|
|
2069
|
+
const dt = ()=>{
|
|
2070
|
+
h = !0, x && N(), K.terminate(), f();
|
|
1890
2071
|
};
|
|
1891
2072
|
K.postMessage({
|
|
1892
2073
|
type: "prepass-streaming",
|
|
1893
2074
|
sharedBuffer: i,
|
|
1894
2075
|
chunkSize: 5e4
|
|
1895
2076
|
});
|
|
1896
|
-
let
|
|
2077
|
+
let lt = !1;
|
|
1897
2078
|
for(;;){
|
|
1898
2079
|
for(; d.length > 0;)yield d.shift();
|
|
1899
|
-
if (
|
|
1900
|
-
for (const
|
|
1901
|
-
|
|
2080
|
+
if (E) {
|
|
2081
|
+
for (const L of R)try {
|
|
2082
|
+
L.terminate();
|
|
1902
2083
|
} catch {}
|
|
1903
2084
|
try {
|
|
1904
2085
|
K.terminate();
|
|
1905
2086
|
} catch {}
|
|
1906
|
-
throw
|
|
2087
|
+
throw E;
|
|
1907
2088
|
}
|
|
1908
2089
|
if (y) {
|
|
1909
|
-
for (const
|
|
1910
|
-
|
|
2090
|
+
for (const L of R)try {
|
|
2091
|
+
L.terminate();
|
|
1911
2092
|
} catch {}
|
|
1912
2093
|
throw y;
|
|
1913
2094
|
}
|
|
1914
|
-
if (h && !
|
|
2095
|
+
if (h && !x && g === 0) {
|
|
1915
2096
|
for (const X of R)try {
|
|
1916
2097
|
X.terminate();
|
|
1917
2098
|
} catch {}
|
|
@@ -1922,26 +2103,26 @@ let __tla = Promise.all([
|
|
|
1922
2103
|
};
|
|
1923
2104
|
return;
|
|
1924
2105
|
}
|
|
1925
|
-
if (h &&
|
|
1926
|
-
await new Promise((
|
|
1927
|
-
u =
|
|
2106
|
+
if (h && x && C >= R.length && d.length === 0) break;
|
|
2107
|
+
await new Promise((L)=>{
|
|
2108
|
+
u = L;
|
|
1928
2109
|
});
|
|
1929
2110
|
}
|
|
1930
|
-
const
|
|
2111
|
+
const gt = t.getFinalCoordinateInfo();
|
|
1931
2112
|
yield {
|
|
1932
2113
|
type: "complete",
|
|
1933
|
-
totalMeshes:
|
|
1934
|
-
coordinateInfo:
|
|
2114
|
+
totalMeshes: T,
|
|
2115
|
+
coordinateInfo: gt
|
|
1935
2116
|
};
|
|
1936
2117
|
}
|
|
1937
|
-
let
|
|
1938
|
-
function
|
|
1939
|
-
if (
|
|
1940
|
-
return
|
|
1941
|
-
|
|
2118
|
+
let wt = null;
|
|
2119
|
+
function vn(r) {
|
|
2120
|
+
if (wt) throw new Error(`GeometryProcessor ${r} cannot start while ${wt} is still running. Wait for the active stream to finish, or cancel it before starting another geometry operation.`);
|
|
2121
|
+
return wt = r, ()=>{
|
|
2122
|
+
wt === r && (wt = null);
|
|
1942
2123
|
};
|
|
1943
2124
|
}
|
|
1944
|
-
|
|
2125
|
+
cs = class {
|
|
1945
2126
|
static largeFileByteStreamingThreshold = 256 * 1024 * 1024;
|
|
1946
2127
|
bridge = null;
|
|
1947
2128
|
platformBridge = null;
|
|
@@ -1951,19 +2132,19 @@ let __tla = Promise.all([
|
|
|
1951
2132
|
lastNativeStats = null;
|
|
1952
2133
|
mergeLayers;
|
|
1953
2134
|
constructor(t = {}){
|
|
1954
|
-
this.bufferBuilder = new
|
|
2135
|
+
this.bufferBuilder = new yn, this.coordinateHandler = new mn, this.isNative = t.preferNative !== !1 && $e(), this.mergeLayers = t.mergeLayers === !0, t.quality, this.isNative || (this.bridge = new _n, this.bridge.setMergeLayers(this.mergeLayers));
|
|
1955
2136
|
}
|
|
1956
2137
|
async init() {
|
|
1957
|
-
this.isNative ? (this.platformBridge = await
|
|
2138
|
+
this.isNative ? (this.platformBridge = await gn(), await this.platformBridge.init(), console.log("[GeometryProcessor] Native bridge initialized")) : this.bridge && await this.bridge.init();
|
|
1958
2139
|
}
|
|
1959
2140
|
async process(t, e) {
|
|
1960
2141
|
let n;
|
|
1961
2142
|
if (this.isNative && this.platformBridge) console.time("[GeometryProcessor] native-processing"), n = (await this.platformBridge.processGeometry(t)).meshes, console.timeEnd("[GeometryProcessor] native-processing");
|
|
1962
2143
|
else {
|
|
1963
2144
|
this.bridge?.isInitialized() || await this.init();
|
|
1964
|
-
const
|
|
1965
|
-
n =
|
|
1966
|
-
const l = this.coordinateHandler.processMeshes(n), d =
|
|
2145
|
+
const c = await this.collectMeshesMainThread(t);
|
|
2146
|
+
n = c.meshes;
|
|
2147
|
+
const l = this.coordinateHandler.processMeshes(n), d = c.buildingRotation, u = {
|
|
1967
2148
|
...l,
|
|
1968
2149
|
buildingRotation: d
|
|
1969
2150
|
}, f = this.bufferBuilder.processMeshes(n);
|
|
@@ -1993,14 +2174,22 @@ let __tla = Promise.all([
|
|
|
1993
2174
|
coordinateInfo: n
|
|
1994
2175
|
};
|
|
1995
2176
|
}
|
|
2177
|
+
applyPrePassMetadata(t) {
|
|
2178
|
+
this.coordinateHandler.setWasmMetadata(t.unitScale, t.needsShift ? {
|
|
2179
|
+
x: t.rtcOffset?.[0] ?? 0,
|
|
2180
|
+
y: t.rtcOffset?.[1] ?? 0,
|
|
2181
|
+
z: t.rtcOffset?.[2] ?? 0
|
|
2182
|
+
} : null);
|
|
2183
|
+
}
|
|
1996
2184
|
collectMeshesViaPrePass(t) {
|
|
1997
2185
|
if (!this.bridge) throw new Error("WASM bridge not initialized");
|
|
1998
2186
|
const e = this.bridge.getApi(), n = e.buildPrePassOnce(t);
|
|
2187
|
+
this.applyPrePassMetadata(n);
|
|
1999
2188
|
try {
|
|
2000
2189
|
const s = [], i = n.totalJobs ?? 0;
|
|
2001
2190
|
if (n.jobs && i > 0) {
|
|
2002
2191
|
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);
|
|
2003
|
-
s.push(...
|
|
2192
|
+
s.push(...Fe(o));
|
|
2004
2193
|
}
|
|
2005
2194
|
return {
|
|
2006
2195
|
meshes: s,
|
|
@@ -2016,6 +2205,7 @@ let __tla = Promise.all([
|
|
|
2016
2205
|
async *processStreamingBytes(t, e) {
|
|
2017
2206
|
if (!this.bridge) throw new Error("WASM bridge not initialized");
|
|
2018
2207
|
const n = this.bridge.getApi(), s = n.buildPrePassOnce(t);
|
|
2208
|
+
this.applyPrePassMetadata(s);
|
|
2019
2209
|
try {
|
|
2020
2210
|
yield {
|
|
2021
2211
|
type: "model-open",
|
|
@@ -2034,28 +2224,28 @@ let __tla = Promise.all([
|
|
|
2034
2224
|
yield {
|
|
2035
2225
|
type: "complete",
|
|
2036
2226
|
totalMeshes: 0,
|
|
2037
|
-
coordinateInfo:
|
|
2227
|
+
coordinateInfo: Wt(this.coordinateHandler.getFinalCoordinateInfo(), i)
|
|
2038
2228
|
};
|
|
2039
2229
|
return;
|
|
2040
2230
|
}
|
|
2041
|
-
const o =
|
|
2231
|
+
const o = xn(t, e), l = Math.max(o, Math.ceil(s.totalJobs / 30));
|
|
2042
2232
|
let d = 0;
|
|
2043
2233
|
for(let f = 0; f < s.totalJobs; f += l){
|
|
2044
|
-
const p = Math.min(f + l, s.totalJobs),
|
|
2234
|
+
const p = Math.min(f + l, s.totalJobs), g = s.jobs.slice(f * 3, p * 3), h = n.processGeometryBatch(t, g, 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 = Fe(h);
|
|
2045
2235
|
if (y.length === 0) {
|
|
2046
|
-
await new Promise((
|
|
2236
|
+
await new Promise((T)=>setTimeout(T, 0));
|
|
2047
2237
|
continue;
|
|
2048
2238
|
}
|
|
2049
2239
|
this.coordinateHandler.processMeshesIncremental(y), d += y.length;
|
|
2050
|
-
const
|
|
2240
|
+
const E = this.coordinateHandler.getCurrentCoordinateInfo(), C = E ? Wt(E, i) : null;
|
|
2051
2241
|
yield {
|
|
2052
2242
|
type: "batch",
|
|
2053
2243
|
meshes: y,
|
|
2054
2244
|
totalSoFar: d,
|
|
2055
|
-
coordinateInfo:
|
|
2056
|
-
}, await new Promise((
|
|
2245
|
+
coordinateInfo: C || void 0
|
|
2246
|
+
}, await new Promise((T)=>setTimeout(T, 0));
|
|
2057
2247
|
}
|
|
2058
|
-
const u =
|
|
2248
|
+
const u = Wt(this.coordinateHandler.getFinalCoordinateInfo(), i);
|
|
2059
2249
|
yield {
|
|
2060
2250
|
type: "complete",
|
|
2061
2251
|
totalMeshes: d,
|
|
@@ -2066,7 +2256,7 @@ let __tla = Promise.all([
|
|
|
2066
2256
|
}
|
|
2067
2257
|
}
|
|
2068
2258
|
async *processStreaming(t, e, n = 25, s) {
|
|
2069
|
-
const i = this.isNative ? null :
|
|
2259
|
+
const i = this.isNative ? null : vn("processStreaming");
|
|
2070
2260
|
try {
|
|
2071
2261
|
yield* this.processStreamingUnlocked(t, e, n, s);
|
|
2072
2262
|
} finally{
|
|
@@ -2083,7 +2273,7 @@ let __tla = Promise.all([
|
|
|
2083
2273
|
modelID: 0
|
|
2084
2274
|
}, console.time("[GeometryProcessor] native-streaming");
|
|
2085
2275
|
const i = [];
|
|
2086
|
-
let o = null,
|
|
2276
|
+
let o = null, c = !1, l = null, d, u = 0;
|
|
2087
2277
|
const f = ()=>{
|
|
2088
2278
|
o && (o(), o = null);
|
|
2089
2279
|
}, p = this.platformBridge.processGeometryStreaming(t, {
|
|
@@ -2101,13 +2291,13 @@ let __tla = Promise.all([
|
|
|
2101
2291
|
}), f();
|
|
2102
2292
|
},
|
|
2103
2293
|
onComplete: (h)=>{
|
|
2104
|
-
this.lastNativeStats = h, d = h.totalMeshes,
|
|
2294
|
+
this.lastNativeStats = h, d = h.totalMeshes, c = !0, f();
|
|
2105
2295
|
},
|
|
2106
2296
|
onError: (h)=>{
|
|
2107
|
-
l = h,
|
|
2297
|
+
l = h, c = !0, f();
|
|
2108
2298
|
}
|
|
2109
2299
|
});
|
|
2110
|
-
for(; !
|
|
2300
|
+
for(; !c || i.length > 0;){
|
|
2111
2301
|
for(; i.length > 0;){
|
|
2112
2302
|
const h = i.shift();
|
|
2113
2303
|
if (h.type === "colorUpdate") {
|
|
@@ -2128,16 +2318,16 @@ let __tla = Promise.all([
|
|
|
2128
2318
|
};
|
|
2129
2319
|
}
|
|
2130
2320
|
if (l) throw l;
|
|
2131
|
-
|
|
2321
|
+
c || await new Promise((h)=>{
|
|
2132
2322
|
o = h;
|
|
2133
2323
|
});
|
|
2134
2324
|
}
|
|
2135
2325
|
await p;
|
|
2136
|
-
const
|
|
2326
|
+
const g = this.coordinateHandler.getFinalCoordinateInfo();
|
|
2137
2327
|
yield {
|
|
2138
2328
|
type: "complete",
|
|
2139
2329
|
totalMeshes: d ?? u,
|
|
2140
|
-
coordinateInfo:
|
|
2330
|
+
coordinateInfo: g
|
|
2141
2331
|
}, console.timeEnd("[GeometryProcessor] native-streaming");
|
|
2142
2332
|
} else {
|
|
2143
2333
|
if (!this.bridge) throw new Error("WASM bridge not initialized");
|
|
@@ -2147,19 +2337,19 @@ let __tla = Promise.all([
|
|
|
2147
2337
|
async *processStreamingPath(t, e = 0, n) {
|
|
2148
2338
|
if (!this.isNative) throw new Error("File-path geometry streaming is only available in native desktop builds");
|
|
2149
2339
|
if (this.platformBridge || await this.init(), !this.platformBridge?.processGeometryStreamingPath) throw new Error("Native platform bridge does not support file-path streaming");
|
|
2150
|
-
yield*
|
|
2340
|
+
yield* Ne((s)=>this.platformBridge.processGeometryStreamingPath(t, s, n), e > 0 ? e / 1e3 : 0, this.coordinateHandler, (s)=>{
|
|
2151
2341
|
this.lastNativeStats = s;
|
|
2152
2342
|
});
|
|
2153
2343
|
}
|
|
2154
2344
|
async *processStreamingCache(t) {
|
|
2155
2345
|
if (!this.isNative) throw new Error("Native cached geometry streaming is only available in native desktop builds");
|
|
2156
2346
|
if (this.platformBridge || await this.init(), !this.platformBridge?.processGeometryStreamingCache) throw new Error("Native platform bridge does not support cached geometry streaming");
|
|
2157
|
-
yield*
|
|
2347
|
+
yield* Ne((e)=>this.platformBridge.processGeometryStreamingCache(t, e), 0, this.coordinateHandler, (e)=>{
|
|
2158
2348
|
this.lastNativeStats = e;
|
|
2159
2349
|
});
|
|
2160
2350
|
}
|
|
2161
2351
|
async *processParallel(t, e, n, s, i) {
|
|
2162
|
-
this.bridge?.isInitialized() || await this.init(), yield*
|
|
2352
|
+
this.bridge?.isInitialized() || await this.init(), yield* Dn(t, this.coordinateHandler, e, n, {
|
|
2163
2353
|
onEntityIndex: s,
|
|
2164
2354
|
mergeLayers: this.mergeLayers,
|
|
2165
2355
|
wasmUrls: i
|
|
@@ -2182,16 +2372,16 @@ let __tla = Promise.all([
|
|
|
2182
2372
|
i = l.meshes, o = l.buildingRotation;
|
|
2183
2373
|
}
|
|
2184
2374
|
this.coordinateHandler.processMeshesIncremental(i);
|
|
2185
|
-
const
|
|
2375
|
+
const c = Wt(this.coordinateHandler.getFinalCoordinateInfo(), o);
|
|
2186
2376
|
yield {
|
|
2187
2377
|
type: "batch",
|
|
2188
2378
|
meshes: i,
|
|
2189
2379
|
totalSoFar: i.length,
|
|
2190
|
-
coordinateInfo:
|
|
2380
|
+
coordinateInfo: c || void 0
|
|
2191
2381
|
}, yield {
|
|
2192
2382
|
type: "complete",
|
|
2193
2383
|
totalMeshes: i.length,
|
|
2194
|
-
coordinateInfo:
|
|
2384
|
+
coordinateInfo: c
|
|
2195
2385
|
};
|
|
2196
2386
|
} 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);
|
|
2197
2387
|
}
|
|
@@ -2211,6 +2401,44 @@ let __tla = Promise.all([
|
|
|
2211
2401
|
const e = nt(t);
|
|
2212
2402
|
return this.bridge.parseAlignmentLines(e);
|
|
2213
2403
|
}
|
|
2404
|
+
parseGridLines(t) {
|
|
2405
|
+
if (!this.bridge || !this.bridge.isInitialized()) return null;
|
|
2406
|
+
const e = nt(t);
|
|
2407
|
+
return this.bridge.parseGridLines(e);
|
|
2408
|
+
}
|
|
2409
|
+
parseGridAxes(t) {
|
|
2410
|
+
if (!this.bridge || !this.bridge.isInitialized()) return null;
|
|
2411
|
+
const e = nt(t), n = this.bridge.parseGridAxes(e);
|
|
2412
|
+
try {
|
|
2413
|
+
const s = [];
|
|
2414
|
+
for(let i = 0; i < n.length; i++){
|
|
2415
|
+
const o = n.getAxis(i);
|
|
2416
|
+
if (o) try {
|
|
2417
|
+
const c = o.start, l = o.end;
|
|
2418
|
+
s.push({
|
|
2419
|
+
gridId: o.gridId,
|
|
2420
|
+
axisId: o.axisId,
|
|
2421
|
+
tag: o.tag,
|
|
2422
|
+
start: [
|
|
2423
|
+
c[0],
|
|
2424
|
+
c[1],
|
|
2425
|
+
c[2]
|
|
2426
|
+
],
|
|
2427
|
+
end: [
|
|
2428
|
+
l[0],
|
|
2429
|
+
l[1],
|
|
2430
|
+
l[2]
|
|
2431
|
+
]
|
|
2432
|
+
});
|
|
2433
|
+
} finally{
|
|
2434
|
+
o.free();
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
return s;
|
|
2438
|
+
} finally{
|
|
2439
|
+
n.free();
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2214
2442
|
extractProfiles(t, e = 0) {
|
|
2215
2443
|
if (!this.bridge || !this.bridge.isInitialized()) return null;
|
|
2216
2444
|
const n = nt(t);
|
|
@@ -2218,7 +2446,7 @@ let __tla = Promise.all([
|
|
|
2218
2446
|
}
|
|
2219
2447
|
dispose() {}
|
|
2220
2448
|
};
|
|
2221
|
-
|
|
2449
|
+
ls = class {
|
|
2222
2450
|
geometryResult;
|
|
2223
2451
|
constructor(t){
|
|
2224
2452
|
this.geometryResult = t;
|
|
@@ -2235,7 +2463,7 @@ let __tla = Promise.all([
|
|
|
2235
2463
|
};
|
|
2236
2464
|
}
|
|
2237
2465
|
buildGLTF(t) {
|
|
2238
|
-
const e = this.geometryResult.meshes, n = t.colorSource ?? "rendering", s = t.visibleOnly === !0, i = t.hiddenEntityIds ?? null, o = t.isolatedEntityIds ?? null,
|
|
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 = (I)=>s ? !(l && I.ifcType && l.has(I.ifcType) || c && !o.has(I.expressId) || i && i.has(I.expressId)) : !0, u = (I)=>n === "shading" ? I.shadingColor ?? I.color : I.color, f = {
|
|
2239
2467
|
asset: {
|
|
2240
2468
|
version: "2.0",
|
|
2241
2469
|
generator: "IFC-Lite"
|
|
@@ -2261,12 +2489,12 @@ let __tla = Promise.all([
|
|
|
2261
2489
|
vertexCount: this.geometryResult.totalVertices,
|
|
2262
2490
|
triangleCount: this.geometryResult.totalTriangles
|
|
2263
2491
|
});
|
|
2264
|
-
const p = new Map,
|
|
2492
|
+
const p = new Map, g = [];
|
|
2265
2493
|
function h(I) {
|
|
2266
|
-
const R = `${Math.round(I[0] * 100)},${Math.round(I[1] * 100)},${Math.round(I[2] * 100)},${Math.round(I[3] * 100)}`,
|
|
2267
|
-
if (
|
|
2268
|
-
const
|
|
2269
|
-
return
|
|
2494
|
+
const R = `${Math.round(I[0] * 100)},${Math.round(I[1] * 100)},${Math.round(I[2] * 100)},${Math.round(I[3] * 100)}`, N = p.get(R);
|
|
2495
|
+
if (N !== void 0) return N;
|
|
2496
|
+
const V = g.length;
|
|
2497
|
+
return g.push({
|
|
2270
2498
|
pbrMetallicRoughness: {
|
|
2271
2499
|
baseColorFactor: [
|
|
2272
2500
|
I[0],
|
|
@@ -2283,34 +2511,34 @@ let __tla = Promise.all([
|
|
|
2283
2511
|
...I[3] < 1 ? {
|
|
2284
2512
|
alphaMode: "BLEND"
|
|
2285
2513
|
} : {}
|
|
2286
|
-
}), p.set(R,
|
|
2514
|
+
}), p.set(R, V), V;
|
|
2287
2515
|
}
|
|
2288
2516
|
const y = [];
|
|
2289
|
-
let
|
|
2517
|
+
let E = 0, C = 0, T = 0;
|
|
2290
2518
|
for(let I = 0; I < e.length; I++){
|
|
2291
2519
|
const R = e[I];
|
|
2292
2520
|
if (!d(R)) continue;
|
|
2293
|
-
const
|
|
2294
|
-
if (!
|
|
2295
|
-
let
|
|
2296
|
-
for(let
|
|
2297
|
-
const
|
|
2298
|
-
|
|
2521
|
+
const N = R.positions, V = R.normals, z = R.indices;
|
|
2522
|
+
if (!N.length || !V.length || !z.length || N.length % 3 !== 0 || V.length % 3 !== 0 || N.length !== V.length) continue;
|
|
2523
|
+
let W = N[0], H = N[1], j = N[2], Q = N[0], K = N[1], at = N[2];
|
|
2524
|
+
for(let rt = 3; rt < N.length; rt += 3){
|
|
2525
|
+
const dt = N[rt], lt = N[rt + 1], gt = N[rt + 2];
|
|
2526
|
+
dt < W && (W = dt), dt > Q && (Q = dt), lt < H && (H = lt), lt > K && (K = lt), gt < j && (j = gt), gt > at && (at = gt);
|
|
2299
2527
|
}
|
|
2300
2528
|
const ht = u(R);
|
|
2301
2529
|
y.push({
|
|
2302
2530
|
meshIndex: I,
|
|
2303
|
-
posCount:
|
|
2304
|
-
normCount:
|
|
2531
|
+
posCount: N.length,
|
|
2532
|
+
normCount: V.length,
|
|
2305
2533
|
idxCount: z.length,
|
|
2306
|
-
posByteOffset:
|
|
2307
|
-
normByteOffset:
|
|
2308
|
-
idxByteOffset:
|
|
2534
|
+
posByteOffset: E * 4,
|
|
2535
|
+
normByteOffset: C * 4,
|
|
2536
|
+
idxByteOffset: T * 4,
|
|
2309
2537
|
bounds: {
|
|
2310
2538
|
min: [
|
|
2311
|
-
|
|
2539
|
+
W,
|
|
2312
2540
|
H,
|
|
2313
|
-
|
|
2541
|
+
j
|
|
2314
2542
|
],
|
|
2315
2543
|
max: [
|
|
2316
2544
|
Q,
|
|
@@ -2319,16 +2547,16 @@ let __tla = Promise.all([
|
|
|
2319
2547
|
]
|
|
2320
2548
|
},
|
|
2321
2549
|
materialIdx: ht ? h(ht) : void 0
|
|
2322
|
-
}),
|
|
2550
|
+
}), E += N.length, C += V.length, T += z.length;
|
|
2323
2551
|
}
|
|
2324
|
-
if (
|
|
2325
|
-
const
|
|
2326
|
-
let O = 0,
|
|
2327
|
-
const
|
|
2552
|
+
if (E === 0 || C === 0 || T === 0) throw new Error("Cannot export GLB: no valid geometry data found");
|
|
2553
|
+
const $ = new Float32Array(E), x = new Float32Array(C), Y = new Uint32Array(T);
|
|
2554
|
+
let O = 0, v = 0, b = 0;
|
|
2555
|
+
const S = [];
|
|
2328
2556
|
for (const I of y){
|
|
2329
2557
|
const R = e[I.meshIndex];
|
|
2330
|
-
|
|
2331
|
-
const
|
|
2558
|
+
$.set(R.positions, O), x.set(R.normals, v), Y.set(R.indices, b), O += I.posCount, v += I.normCount, b += I.idxCount;
|
|
2559
|
+
const N = f.accessors.length;
|
|
2332
2560
|
f.accessors.push({
|
|
2333
2561
|
bufferView: 0,
|
|
2334
2562
|
byteOffset: I.posByteOffset,
|
|
@@ -2338,7 +2566,7 @@ let __tla = Promise.all([
|
|
|
2338
2566
|
min: I.bounds.min,
|
|
2339
2567
|
max: I.bounds.max
|
|
2340
2568
|
});
|
|
2341
|
-
const
|
|
2569
|
+
const V = f.accessors.length;
|
|
2342
2570
|
f.accessors.push({
|
|
2343
2571
|
bufferView: 1,
|
|
2344
2572
|
byteOffset: I.normByteOffset,
|
|
@@ -2354,13 +2582,13 @@ let __tla = Promise.all([
|
|
|
2354
2582
|
count: I.idxCount,
|
|
2355
2583
|
type: "SCALAR"
|
|
2356
2584
|
});
|
|
2357
|
-
const
|
|
2585
|
+
const W = f.meshes.length;
|
|
2358
2586
|
f.meshes.push({
|
|
2359
2587
|
primitives: [
|
|
2360
2588
|
{
|
|
2361
2589
|
attributes: {
|
|
2362
|
-
POSITION:
|
|
2363
|
-
NORMAL:
|
|
2590
|
+
POSITION: N,
|
|
2591
|
+
NORMAL: V
|
|
2364
2592
|
},
|
|
2365
2593
|
indices: z,
|
|
2366
2594
|
...I.materialIdx !== void 0 ? {
|
|
@@ -2369,20 +2597,20 @@ let __tla = Promise.all([
|
|
|
2369
2597
|
}
|
|
2370
2598
|
]
|
|
2371
2599
|
});
|
|
2372
|
-
const H = f.nodes.length,
|
|
2373
|
-
mesh:
|
|
2600
|
+
const H = f.nodes.length, j = {
|
|
2601
|
+
mesh: W
|
|
2374
2602
|
};
|
|
2375
|
-
t.includeMetadata && R.expressId !== void 0 && (
|
|
2603
|
+
t.includeMetadata && R.expressId !== void 0 && (j.extras = R.modelIndex !== void 0 ? {
|
|
2376
2604
|
expressId: R.expressId,
|
|
2377
2605
|
modelIndex: R.modelIndex
|
|
2378
2606
|
} : {
|
|
2379
2607
|
expressId: R.expressId
|
|
2380
|
-
}), f.nodes.push(
|
|
2608
|
+
}), f.nodes.push(j), S.push(H);
|
|
2381
2609
|
}
|
|
2382
|
-
f.scenes[0].nodes =
|
|
2610
|
+
f.scenes[0].nodes = S, g.length > 0 && (f.materials = g, f.extensionsUsed = [
|
|
2383
2611
|
"KHR_materials_unlit"
|
|
2384
2612
|
]);
|
|
2385
|
-
const F =
|
|
2613
|
+
const F = $.buffer, m = x.buffer, _ = Y.buffer, w = F.byteLength + m.byteLength + _.byteLength;
|
|
2386
2614
|
f.bufferViews.push({
|
|
2387
2615
|
buffer: 0,
|
|
2388
2616
|
byteOffset: 0,
|
|
@@ -2392,38 +2620,38 @@ let __tla = Promise.all([
|
|
|
2392
2620
|
}), f.bufferViews.push({
|
|
2393
2621
|
buffer: 0,
|
|
2394
2622
|
byteOffset: F.byteLength,
|
|
2395
|
-
byteLength:
|
|
2623
|
+
byteLength: m.byteLength,
|
|
2396
2624
|
byteStride: 12,
|
|
2397
2625
|
target: 34962
|
|
2398
2626
|
}), f.bufferViews.push({
|
|
2399
2627
|
buffer: 0,
|
|
2400
|
-
byteOffset: F.byteLength +
|
|
2401
|
-
byteLength:
|
|
2628
|
+
byteOffset: F.byteLength + m.byteLength,
|
|
2629
|
+
byteLength: _.byteLength,
|
|
2402
2630
|
target: 34963
|
|
2403
|
-
}), f.buffers[0].byteLength =
|
|
2631
|
+
}), f.buffers[0].byteLength = w;
|
|
2404
2632
|
for (const I of f.accessors){
|
|
2405
2633
|
const R = f.bufferViews[I.bufferView];
|
|
2406
2634
|
if (!R) throw new Error(`Accessor references invalid bufferView ${I.bufferView}`);
|
|
2407
|
-
let
|
|
2408
|
-
if (I.componentType === 5126)
|
|
2409
|
-
else if (I.componentType === 5125)
|
|
2410
|
-
else if (I.componentType === 5123)
|
|
2411
|
-
else if (I.componentType === 5120)
|
|
2635
|
+
let N = 0;
|
|
2636
|
+
if (I.componentType === 5126) N = 4;
|
|
2637
|
+
else if (I.componentType === 5125) N = 4;
|
|
2638
|
+
else if (I.componentType === 5123) N = 2;
|
|
2639
|
+
else if (I.componentType === 5120) N = 1;
|
|
2412
2640
|
else throw new Error(`Unsupported component type: ${I.componentType}`);
|
|
2413
|
-
let
|
|
2414
|
-
if (I.type === "VEC3")
|
|
2415
|
-
else if (I.type === "VEC2")
|
|
2416
|
-
else if (I.type === "SCALAR")
|
|
2641
|
+
let V = 1;
|
|
2642
|
+
if (I.type === "VEC3") V = 3;
|
|
2643
|
+
else if (I.type === "VEC2") V = 2;
|
|
2644
|
+
else if (I.type === "SCALAR") V = 1;
|
|
2417
2645
|
else throw new Error(`Unsupported accessor type: ${I.type}`);
|
|
2418
|
-
const z = I.count *
|
|
2419
|
-
if (
|
|
2646
|
+
const z = I.count * V * N, W = (I.byteOffset || 0) + z;
|
|
2647
|
+
if (W > R.byteLength) throw new Error(`Accessor exceeds bufferView bounds: accessor byteOffset=${I.byteOffset || 0}, length=${z}, bufferView byteLength=${R.byteLength}, end=${W}`);
|
|
2420
2648
|
}
|
|
2421
2649
|
return {
|
|
2422
2650
|
json: f,
|
|
2423
2651
|
buffers: [
|
|
2424
2652
|
new Uint8Array(F),
|
|
2425
|
-
new Uint8Array(
|
|
2426
|
-
new Uint8Array(
|
|
2653
|
+
new Uint8Array(m),
|
|
2654
|
+
new Uint8Array(_)
|
|
2427
2655
|
]
|
|
2428
2656
|
};
|
|
2429
2657
|
}
|
|
@@ -2434,23 +2662,23 @@ let __tla = Promise.all([
|
|
|
2434
2662
|
return n;
|
|
2435
2663
|
}
|
|
2436
2664
|
packGLB(t, e) {
|
|
2437
|
-
const n = JSON.stringify(t), s = new TextEncoder().encode(n), i = (4 - s.byteLength % 4) % 4, o = s.byteLength + i,
|
|
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, u = 20 + o + 8 + d, f = new ArrayBuffer(u), p = new DataView(f), g = new Uint8Array(f);
|
|
2438
2666
|
let h = 0;
|
|
2439
|
-
p.setUint32(h, 1179937895, !0), h += 4, p.setUint32(h, 2, !0), h += 4, p.setUint32(h, u, !0), h += 4, p.setUint32(h, o, !0), h += 4, p.setUint32(h, 1313821514, !0), h += 4,
|
|
2440
|
-
for(let y = 0; y < i; y++)
|
|
2441
|
-
return p.setUint32(h, d, !0), h += 4, p.setUint32(h, 5130562, !0), h += 4,
|
|
2667
|
+
p.setUint32(h, 1179937895, !0), h += 4, p.setUint32(h, 2, !0), h += 4, p.setUint32(h, u, !0), h += 4, p.setUint32(h, o, !0), h += 4, p.setUint32(h, 1313821514, !0), h += 4, g.set(s, h), h += s.byteLength;
|
|
2668
|
+
for(let y = 0; y < i; y++)g[h++] = 32;
|
|
2669
|
+
return p.setUint32(h, d, !0), h += 4, p.setUint32(h, 5130562, !0), h += 4, g.set(c, h), new Uint8Array(f);
|
|
2442
2670
|
}
|
|
2443
2671
|
};
|
|
2444
|
-
|
|
2672
|
+
ds = class {
|
|
2445
2673
|
store;
|
|
2446
2674
|
constructor(t){
|
|
2447
2675
|
this.store = t;
|
|
2448
2676
|
}
|
|
2449
2677
|
getPropertiesForEntity(t) {
|
|
2450
|
-
return this.store.onDemandPropertyMap && this.store.source?.length > 0 ?
|
|
2678
|
+
return this.store.onDemandPropertyMap && this.store.source?.length > 0 ? ke(this.store, t) : this.store.properties?.getForEntity(t) ?? [];
|
|
2451
2679
|
}
|
|
2452
2680
|
getQuantitiesForEntity(t) {
|
|
2453
|
-
return this.store.onDemandQuantityMap && this.store.source?.length > 0 ?
|
|
2681
|
+
return this.store.onDemandQuantityMap && this.store.source?.length > 0 ? Ye(this.store, t) : this.store.quantities?.getForEntity(t) ?? [];
|
|
2454
2682
|
}
|
|
2455
2683
|
exportEntities(t, e = {}) {
|
|
2456
2684
|
const n = e.delimiter ?? ",", s = e.includeProperties ?? !1, i = e.flattenProperties ?? !1, o = [
|
|
@@ -2461,17 +2689,17 @@ let __tla = Promise.all([
|
|
|
2461
2689
|
"description",
|
|
2462
2690
|
"objectType",
|
|
2463
2691
|
"hasGeometry"
|
|
2464
|
-
],
|
|
2692
|
+
], c = new Map;
|
|
2465
2693
|
if (s && i) {
|
|
2466
2694
|
const u = t ?? this.getAllEntityIds();
|
|
2467
2695
|
for (const f of u){
|
|
2468
2696
|
const p = this.getPropertiesForEntity(f);
|
|
2469
|
-
for (const
|
|
2470
|
-
|
|
2471
|
-
for (const h of
|
|
2697
|
+
for (const g of p){
|
|
2698
|
+
c.has(g.name) || c.set(g.name, new Set);
|
|
2699
|
+
for (const h of g.properties)c.get(g.name).add(h.name);
|
|
2472
2700
|
}
|
|
2473
2701
|
}
|
|
2474
|
-
for (const [f, p] of
|
|
2702
|
+
for (const [f, p] of c)for (const g of p)o.push(`${f}_${g}`);
|
|
2475
2703
|
}
|
|
2476
2704
|
const l = [
|
|
2477
2705
|
this.joinRow(o.map((u)=>this.escapeValue(u)), n)
|
|
@@ -2487,15 +2715,15 @@ let __tla = Promise.all([
|
|
|
2487
2715
|
this.escapeValue(this.store.entities.hasGeometry(u) ? "true" : "false")
|
|
2488
2716
|
];
|
|
2489
2717
|
if (s && i) {
|
|
2490
|
-
const p = this.getPropertiesForEntity(u),
|
|
2718
|
+
const p = this.getPropertiesForEntity(u), g = new Map;
|
|
2491
2719
|
for (const h of p){
|
|
2492
2720
|
const y = new Map;
|
|
2493
|
-
for (const
|
|
2494
|
-
|
|
2721
|
+
for (const E of h.properties)y.set(E.name, E.value);
|
|
2722
|
+
g.set(h.name, y);
|
|
2495
2723
|
}
|
|
2496
|
-
for (const [h, y] of
|
|
2497
|
-
const
|
|
2498
|
-
f.push(this.escapeValue(
|
|
2724
|
+
for (const [h, y] of c)for (const E of y){
|
|
2725
|
+
const C = g.get(h)?.get(E) ?? "";
|
|
2726
|
+
f.push(this.escapeValue(C));
|
|
2499
2727
|
}
|
|
2500
2728
|
}
|
|
2501
2729
|
l.push(this.joinRow(f, n));
|
|
@@ -2514,22 +2742,22 @@ let __tla = Promise.all([
|
|
|
2514
2742
|
"value",
|
|
2515
2743
|
"type"
|
|
2516
2744
|
], i = [
|
|
2517
|
-
this.joinRow(s.map((
|
|
2745
|
+
this.joinRow(s.map((c)=>this.escapeValue(c)), n)
|
|
2518
2746
|
], o = t ?? this.getAllEntityIds();
|
|
2519
|
-
for (const
|
|
2520
|
-
const l = this.getPropertiesForEntity(
|
|
2747
|
+
for (const c of o){
|
|
2748
|
+
const l = this.getPropertiesForEntity(c);
|
|
2521
2749
|
if (!l || l.length === 0) continue;
|
|
2522
|
-
const d = this.store.entities.getGlobalId(
|
|
2523
|
-
for (const p of l)if (!(!p.properties || p.properties.length === 0)) for (const
|
|
2750
|
+
const d = this.store.entities.getGlobalId(c) || "", u = this.store.entities.getName(c) || "", f = this.store.entities.getTypeName(c) || "";
|
|
2751
|
+
for (const p of l)if (!(!p.properties || p.properties.length === 0)) for (const g of p.properties){
|
|
2524
2752
|
const h = [
|
|
2525
|
-
this.escapeValue(
|
|
2753
|
+
this.escapeValue(c),
|
|
2526
2754
|
this.escapeValue(d),
|
|
2527
2755
|
this.escapeValue(u),
|
|
2528
2756
|
this.escapeValue(f),
|
|
2529
2757
|
this.escapeValue(p.name || ""),
|
|
2530
|
-
this.escapeValue(
|
|
2531
|
-
this.escapeValue(
|
|
2532
|
-
this.escapeValue(
|
|
2758
|
+
this.escapeValue(g.name || ""),
|
|
2759
|
+
this.escapeValue(g.value),
|
|
2760
|
+
this.escapeValue(g.type ?? "")
|
|
2533
2761
|
];
|
|
2534
2762
|
i.push(this.joinRow(h, n));
|
|
2535
2763
|
}
|
|
@@ -2549,18 +2777,18 @@ let __tla = Promise.all([
|
|
|
2549
2777
|
"type"
|
|
2550
2778
|
], o = [
|
|
2551
2779
|
this.joinRow(s.map((l)=>this.escapeValue(l)), n)
|
|
2552
|
-
],
|
|
2553
|
-
for (const l of
|
|
2780
|
+
], c = t ?? this.getAllEntityIds();
|
|
2781
|
+
for (const l of c){
|
|
2554
2782
|
const d = this.getQuantitiesForEntity(l);
|
|
2555
2783
|
if (!d || d.length === 0) continue;
|
|
2556
2784
|
const u = this.store.entities.getGlobalId(l) || "", f = this.store.entities.getName(l) || "", p = this.store.entities.getTypeName(l) || "";
|
|
2557
|
-
for (const
|
|
2785
|
+
for (const g of d)if (!(!g.quantities || g.quantities.length === 0)) for (const h of g.quantities){
|
|
2558
2786
|
const y = [
|
|
2559
2787
|
this.escapeValue(l),
|
|
2560
2788
|
this.escapeValue(u),
|
|
2561
2789
|
this.escapeValue(f),
|
|
2562
2790
|
this.escapeValue(p),
|
|
2563
|
-
this.escapeValue(
|
|
2791
|
+
this.escapeValue(g.name || ""),
|
|
2564
2792
|
this.escapeValue(h.name || ""),
|
|
2565
2793
|
this.escapeValue(h.value),
|
|
2566
2794
|
this.escapeValue(h.type ?? "")
|
|
@@ -2580,19 +2808,19 @@ let __tla = Promise.all([
|
|
|
2580
2808
|
"parentId",
|
|
2581
2809
|
"level"
|
|
2582
2810
|
], s = [
|
|
2583
|
-
this.joinRow(n.map((
|
|
2811
|
+
this.joinRow(n.map((c)=>this.escapeValue(c)), e)
|
|
2584
2812
|
], i = this.store.spatialHierarchy;
|
|
2585
2813
|
if (!i?.project) return s[0];
|
|
2586
|
-
const o = (
|
|
2814
|
+
const o = (c, l, d)=>{
|
|
2587
2815
|
const u = [
|
|
2588
|
-
this.escapeValue(
|
|
2589
|
-
this.escapeValue(this.store.entities.getGlobalId(
|
|
2590
|
-
this.escapeValue(
|
|
2591
|
-
this.escapeValue(this.store.entities.getTypeName(
|
|
2816
|
+
this.escapeValue(c.expressId),
|
|
2817
|
+
this.escapeValue(this.store.entities.getGlobalId(c.expressId) || ""),
|
|
2818
|
+
this.escapeValue(c.name || ""),
|
|
2819
|
+
this.escapeValue(this.store.entities.getTypeName(c.expressId) || ""),
|
|
2592
2820
|
this.escapeValue(l ?? ""),
|
|
2593
2821
|
this.escapeValue(d)
|
|
2594
2822
|
];
|
|
2595
|
-
if (s.push(this.joinRow(u, e)),
|
|
2823
|
+
if (s.push(this.joinRow(u, e)), c.children) for (const f of c.children)o(f, c.expressId, d + 1);
|
|
2596
2824
|
};
|
|
2597
2825
|
return o(i.project, null, 0), s.join(`
|
|
2598
2826
|
`);
|
|
@@ -2612,7 +2840,7 @@ let __tla = Promise.all([
|
|
|
2612
2840
|
return t.join(e);
|
|
2613
2841
|
}
|
|
2614
2842
|
};
|
|
2615
|
-
const
|
|
2843
|
+
const Gn = 35, jt = 48, Ae = 57, $n = new Set([
|
|
2616
2844
|
"IFCOWNERHISTORY",
|
|
2617
2845
|
"IFCAPPLICATION",
|
|
2618
2846
|
"IFCPERSON",
|
|
@@ -2628,7 +2856,7 @@ let __tla = Promise.all([
|
|
|
2628
2856
|
"IFCMONETARYUNIT",
|
|
2629
2857
|
"IFCGEOMETRICREPRESENTATIONCONTEXT",
|
|
2630
2858
|
"IFCGEOMETRICREPRESENTATIONSUBCONTEXT"
|
|
2631
|
-
]),
|
|
2859
|
+
]), Vn = new Set([
|
|
2632
2860
|
"IFCPROJECT",
|
|
2633
2861
|
"IFCSITE",
|
|
2634
2862
|
"IFCBUILDING",
|
|
@@ -2649,7 +2877,7 @@ let __tla = Promise.all([
|
|
|
2649
2877
|
"IFCSPATIALZONE",
|
|
2650
2878
|
"IFCEXTERNALSPATIALELEMENT",
|
|
2651
2879
|
"IFCEXTERNALSPATIALSTRUCTUREELEMENT"
|
|
2652
|
-
]),
|
|
2880
|
+
]), zn = new Set([
|
|
2653
2881
|
"IFCBEAM",
|
|
2654
2882
|
"IFCBEAMSTANDARDCASE",
|
|
2655
2883
|
"IFCBUILDINGELEMENT",
|
|
@@ -2857,25 +3085,25 @@ let __tla = Promise.all([
|
|
|
2857
3085
|
"IFCSTRUCTURALSURFACEMEMBERVARYING",
|
|
2858
3086
|
"IFCSTRUCTURALSURFACEREACTION"
|
|
2859
3087
|
]);
|
|
2860
|
-
function
|
|
3088
|
+
function Ht(r, t, e, n) {
|
|
2861
3089
|
const s = t + e;
|
|
2862
3090
|
let i = t;
|
|
2863
|
-
for(; i < s;)if (r[i] ===
|
|
2864
|
-
if (i++, i < s && r[i] >=
|
|
2865
|
-
let o = r[i] -
|
|
2866
|
-
for(i++; i < s && r[i] >=
|
|
3091
|
+
for(; i < s;)if (r[i] === Gn) {
|
|
3092
|
+
if (i++, i < s && r[i] >= jt && r[i] <= Ae) {
|
|
3093
|
+
let o = r[i] - jt;
|
|
3094
|
+
for(i++; i < s && r[i] >= jt && r[i] <= Ae;)o = o * 10 + (r[i] - jt), i++;
|
|
2867
3095
|
n.push(o);
|
|
2868
3096
|
}
|
|
2869
3097
|
} else i++;
|
|
2870
3098
|
}
|
|
2871
|
-
function
|
|
3099
|
+
function ae(r, t, e, n) {
|
|
2872
3100
|
const s = new Set, i = [];
|
|
2873
|
-
for (const
|
|
3101
|
+
for (const c of r)e.has(c) && !s.has(c) && (s.add(c), i.push(c));
|
|
2874
3102
|
const o = [];
|
|
2875
3103
|
for(; i.length > 0;){
|
|
2876
|
-
const
|
|
3104
|
+
const c = i.pop(), l = e.get(c);
|
|
2877
3105
|
if (l) {
|
|
2878
|
-
o.length = 0,
|
|
3106
|
+
o.length = 0, Ht(t, l.byteOffset, l.byteLength, o);
|
|
2879
3107
|
for(let d = 0; d < o.length; d++){
|
|
2880
3108
|
const u = o[d];
|
|
2881
3109
|
if (!s.has(u) && e.has(u)) {
|
|
@@ -2887,23 +3115,23 @@ let __tla = Promise.all([
|
|
|
2887
3115
|
}
|
|
2888
3116
|
return s;
|
|
2889
3117
|
}
|
|
2890
|
-
function
|
|
3118
|
+
function ce(r, t, e) {
|
|
2891
3119
|
const n = new Set, s = new Set;
|
|
2892
3120
|
for (const [i, o] of r.entityIndex.byId){
|
|
2893
|
-
const
|
|
2894
|
-
if (
|
|
3121
|
+
const c = o.type.toUpperCase();
|
|
3122
|
+
if ($n.has(c)) {
|
|
2895
3123
|
n.add(i);
|
|
2896
3124
|
continue;
|
|
2897
3125
|
}
|
|
2898
|
-
if (
|
|
3126
|
+
if (Vn.has(c)) {
|
|
2899
3127
|
n.add(i);
|
|
2900
3128
|
continue;
|
|
2901
3129
|
}
|
|
2902
|
-
if (
|
|
3130
|
+
if (c.startsWith("IFCREL")) {
|
|
2903
3131
|
n.add(i);
|
|
2904
3132
|
continue;
|
|
2905
3133
|
}
|
|
2906
|
-
if (
|
|
3134
|
+
if (zn.has(c)) {
|
|
2907
3135
|
const l = t.has(i), d = e !== null && !e.has(i);
|
|
2908
3136
|
l || d ? s.add(i) : n.add(i);
|
|
2909
3137
|
continue;
|
|
@@ -2917,38 +3145,38 @@ let __tla = Promise.all([
|
|
|
2917
3145
|
continue;
|
|
2918
3146
|
}
|
|
2919
3147
|
}
|
|
2920
|
-
return
|
|
3148
|
+
return Wn(r, n, s), {
|
|
2921
3149
|
roots: n,
|
|
2922
3150
|
hiddenProductIds: s
|
|
2923
3151
|
};
|
|
2924
3152
|
}
|
|
2925
|
-
function
|
|
3153
|
+
function Wn(r, t, e) {
|
|
2926
3154
|
const n = r.source;
|
|
2927
3155
|
if (!n) return;
|
|
2928
3156
|
const s = r.entityIndex.byType.get("IFCRELVOIDSELEMENT") ?? [];
|
|
2929
3157
|
if (s.length === 0) return;
|
|
2930
3158
|
const i = [];
|
|
2931
3159
|
for (const o of s){
|
|
2932
|
-
const
|
|
2933
|
-
if (!
|
|
2934
|
-
let l =
|
|
2935
|
-
const d =
|
|
3160
|
+
const c = r.entityIndex.byId.get(o);
|
|
3161
|
+
if (!c) continue;
|
|
3162
|
+
let l = c.byteOffset;
|
|
3163
|
+
const d = c.byteOffset + c.byteLength;
|
|
2936
3164
|
for(; l < d && n[l] !== 40;)l++;
|
|
2937
|
-
if (l >= d || (i.length = 0,
|
|
3165
|
+
if (l >= d || (i.length = 0, Ht(n, l, d - l, i), i.length < 2)) continue;
|
|
2938
3166
|
const u = i[i.length - 2], f = i[i.length - 1];
|
|
2939
3167
|
e.has(u) && (e.add(f), t.delete(o), t.delete(f));
|
|
2940
3168
|
}
|
|
2941
3169
|
}
|
|
2942
|
-
function
|
|
3170
|
+
function le(r, t, e) {
|
|
2943
3171
|
const n = [], s = [], i = e.byType.get("IFCSTYLEDITEM") ?? [], o = e.byType.get("IFCSTYLEDREPRESENTATION") ?? [];
|
|
2944
|
-
for (const
|
|
3172
|
+
for (const c of [
|
|
2945
3173
|
i,
|
|
2946
3174
|
o
|
|
2947
|
-
])for (const l of
|
|
3175
|
+
])for (const l of c){
|
|
2948
3176
|
if (r.has(l)) continue;
|
|
2949
3177
|
const d = e.byId.get(l);
|
|
2950
3178
|
if (!d) continue;
|
|
2951
|
-
s.length = 0,
|
|
3179
|
+
s.length = 0, Ht(t, d.byteOffset, d.byteLength, s);
|
|
2952
3180
|
let u = !1;
|
|
2953
3181
|
for(let f = 0; f < s.length; f++)if (r.has(s[f])) {
|
|
2954
3182
|
u = !0;
|
|
@@ -2957,9 +3185,9 @@ let __tla = Promise.all([
|
|
|
2957
3185
|
u && (r.add(l), n.push(l));
|
|
2958
3186
|
}
|
|
2959
3187
|
for(; n.length > 0;){
|
|
2960
|
-
const
|
|
3188
|
+
const c = n.pop(), l = e.byId.get(c);
|
|
2961
3189
|
if (l) {
|
|
2962
|
-
s.length = 0,
|
|
3190
|
+
s.length = 0, Ht(t, l.byteOffset, l.byteLength, s);
|
|
2963
3191
|
for(let d = 0; d < s.length; d++){
|
|
2964
3192
|
const u = s[d];
|
|
2965
3193
|
!r.has(u) && e.byId.has(u) && (r.add(u), n.push(u));
|
|
@@ -2967,7 +3195,7 @@ let __tla = Promise.all([
|
|
|
2967
3195
|
}
|
|
2968
3196
|
}
|
|
2969
3197
|
}
|
|
2970
|
-
const
|
|
3198
|
+
const Oe = new Map([
|
|
2971
3199
|
[
|
|
2972
3200
|
"IFCELECTRICDISTRIBUTIONPOINT",
|
|
2973
3201
|
"IFCELECTRICDISTRIBUTIONBOARD"
|
|
@@ -2980,7 +3208,7 @@ let __tla = Promise.all([
|
|
|
2980
3208
|
"IFCEQUIPMENTELEMENT",
|
|
2981
3209
|
"IFCBUILDINGELEMENTPROXY"
|
|
2982
3210
|
]
|
|
2983
|
-
]),
|
|
3211
|
+
]), xe = new Map([
|
|
2984
3212
|
[
|
|
2985
3213
|
"IFCELECTRICDISTRIBUTIONBOARD",
|
|
2986
3214
|
"IFCELECTRICDISTRIBUTIONPOINT"
|
|
@@ -3073,7 +3301,7 @@ let __tla = Promise.all([
|
|
|
3073
3301
|
"IFCBUILTELEMENT",
|
|
3074
3302
|
"IFCBUILDINGELEMENTPROXY"
|
|
3075
3303
|
]
|
|
3076
|
-
]),
|
|
3304
|
+
]), Zt = new Map([]), te = new Map([
|
|
3077
3305
|
[
|
|
3078
3306
|
"IFCFACILITY",
|
|
3079
3307
|
"IFCBUILDING"
|
|
@@ -3218,7 +3446,7 @@ let __tla = Promise.all([
|
|
|
3218
3446
|
"IFCELECTRICFLOWTREATMENTDEVICE",
|
|
3219
3447
|
"IFCFLOWTREATMENTDEVICE"
|
|
3220
3448
|
]
|
|
3221
|
-
]),
|
|
3449
|
+
]), jn = new Map([
|
|
3222
3450
|
[
|
|
3223
3451
|
"IFCWALL",
|
|
3224
3452
|
8
|
|
@@ -3340,34 +3568,34 @@ let __tla = Promise.all([
|
|
|
3340
3568
|
8
|
|
3341
3569
|
]
|
|
3342
3570
|
]);
|
|
3343
|
-
function
|
|
3571
|
+
function Ve(r, t, e) {
|
|
3344
3572
|
if (t === e) return r;
|
|
3345
3573
|
const n = r.toUpperCase();
|
|
3346
|
-
return
|
|
3574
|
+
return kn(t, e)?.get(n) ?? n;
|
|
3347
3575
|
}
|
|
3348
|
-
function
|
|
3349
|
-
return r === "IFC2X3" && t === "IFC4" ?
|
|
3576
|
+
function kn(r, t) {
|
|
3577
|
+
return r === "IFC2X3" && t === "IFC4" ? Oe : r === "IFC4" && t === "IFC2X3" ? xe : r === "IFC4" && t === "IFC4X3" ? Zt : r === "IFC4X3" && t === "IFC4" ? te : r === "IFC5" && t === "IFC4X3" || r === "IFC4X3" && t === "IFC5" ? null : r === "IFC5" && t === "IFC4" ? te : r === "IFC4" && t === "IFC5" ? Zt : r === "IFC2X3" && (t === "IFC4X3" || t === "IFC5") ? Le(Oe, Zt) : (r === "IFC4X3" || r === "IFC5") && t === "IFC2X3" ? Le(te, xe) : null;
|
|
3350
3578
|
}
|
|
3351
|
-
function
|
|
3579
|
+
function Le(r, t) {
|
|
3352
3580
|
const e = new Map;
|
|
3353
3581
|
for (const [n, s] of r)e.set(n, t.get(s) ?? s);
|
|
3354
3582
|
for (const [n, s] of t)e.has(n) || e.set(n, s);
|
|
3355
3583
|
return e;
|
|
3356
3584
|
}
|
|
3357
|
-
function
|
|
3585
|
+
function Xt(r, t, e) {
|
|
3358
3586
|
if (t === e) return r;
|
|
3359
3587
|
const n = r.match(/^(#\d+=)(\w+)\((.*)?\);?\s*$/);
|
|
3360
3588
|
if (!n) return r;
|
|
3361
|
-
const s = n[1], i = n[2].toUpperCase(), o = n[3] ?? "",
|
|
3362
|
-
if (
|
|
3589
|
+
const s = n[1], i = n[2].toUpperCase(), o = n[3] ?? "", c = Ve(i, t, e);
|
|
3590
|
+
if (Yn(c, e)) return `${s}IFCPROXY('${qn()}',$,'${i}',$,$,$,$,.NOTDEFINED.,$);`;
|
|
3363
3591
|
let l = o;
|
|
3364
3592
|
if (e === "IFC2X3") {
|
|
3365
|
-
const d =
|
|
3366
|
-
d !== void 0 && (l =
|
|
3593
|
+
const d = jn.get(c);
|
|
3594
|
+
d !== void 0 && (l = Hn(o, d));
|
|
3367
3595
|
}
|
|
3368
|
-
return `${s}${
|
|
3596
|
+
return `${s}${c}(${l});`;
|
|
3369
3597
|
}
|
|
3370
|
-
function
|
|
3598
|
+
function Yn(r, t) {
|
|
3371
3599
|
return t === "IFC4X3" || t === "IFC5" ? !1 : new Set([
|
|
3372
3600
|
"IFCALIGNMENTCANT",
|
|
3373
3601
|
"IFCALIGNMENTHORIZONTAL",
|
|
@@ -3375,39 +3603,39 @@ let __tla = Promise.all([
|
|
|
3375
3603
|
"IFCALIGNMENTSEGMENT"
|
|
3376
3604
|
]).has(r);
|
|
3377
3605
|
}
|
|
3378
|
-
function
|
|
3606
|
+
function Hn(r, t) {
|
|
3379
3607
|
if (!r.trim()) return r;
|
|
3380
3608
|
const e = [];
|
|
3381
3609
|
let n = 0, s = !1, i = "";
|
|
3382
3610
|
for(let o = 0; o < r.length; o++){
|
|
3383
|
-
const
|
|
3384
|
-
if (
|
|
3385
|
-
else if (
|
|
3611
|
+
const c = r[o];
|
|
3612
|
+
if (c === "'" && !s) s = !0, i += c;
|
|
3613
|
+
else if (c === "'" && s) {
|
|
3386
3614
|
if (o + 1 < r.length && r[o + 1] === "'") {
|
|
3387
3615
|
i += "''", o++;
|
|
3388
3616
|
continue;
|
|
3389
3617
|
}
|
|
3390
|
-
s = !1, i +=
|
|
3391
|
-
} else if (s) i +=
|
|
3392
|
-
else if (
|
|
3393
|
-
else if (
|
|
3394
|
-
else if (
|
|
3618
|
+
s = !1, i += c;
|
|
3619
|
+
} else if (s) i += c;
|
|
3620
|
+
else if (c === "(") n++, i += c;
|
|
3621
|
+
else if (c === ")") n--, i += c;
|
|
3622
|
+
else if (c === "," && n === 0) {
|
|
3395
3623
|
if (e.push(i), i = "", e.length >= t) return e.join(",");
|
|
3396
|
-
} else i +=
|
|
3624
|
+
} else i += c;
|
|
3397
3625
|
}
|
|
3398
3626
|
return e.push(i), e.length > t ? e.slice(0, t).join(",") : e.join(",");
|
|
3399
3627
|
}
|
|
3400
|
-
function
|
|
3628
|
+
function de(r, t) {
|
|
3401
3629
|
return r !== t;
|
|
3402
3630
|
}
|
|
3403
|
-
let
|
|
3404
|
-
function
|
|
3405
|
-
const r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_$", t =
|
|
3631
|
+
let Xn = 0;
|
|
3632
|
+
function qn() {
|
|
3633
|
+
const r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_$", t = Xn++;
|
|
3406
3634
|
let e = "PROXY_", n = t;
|
|
3407
3635
|
for(let s = 0; s < 16; s++)e += r[n % 64], n = Math.floor(n / 64) + s;
|
|
3408
3636
|
return e;
|
|
3409
3637
|
}
|
|
3410
|
-
function
|
|
3638
|
+
function st(r) {
|
|
3411
3639
|
return r.replace(/\\/g, "\\\\").replace(/'/g, "''");
|
|
3412
3640
|
}
|
|
3413
3641
|
function Z(r) {
|
|
@@ -3415,52 +3643,52 @@ let __tla = Promise.all([
|
|
|
3415
3643
|
const t = r.toString();
|
|
3416
3644
|
return t.includes(".") ? t : t + ".";
|
|
3417
3645
|
}
|
|
3418
|
-
function
|
|
3646
|
+
function Qn(r) {
|
|
3419
3647
|
switch(r){
|
|
3420
|
-
case
|
|
3648
|
+
case bt.Length:
|
|
3421
3649
|
return "IFCQUANTITYLENGTH";
|
|
3422
|
-
case
|
|
3650
|
+
case bt.Area:
|
|
3423
3651
|
return "IFCQUANTITYAREA";
|
|
3424
|
-
case
|
|
3652
|
+
case bt.Volume:
|
|
3425
3653
|
return "IFCQUANTITYVOLUME";
|
|
3426
|
-
case
|
|
3654
|
+
case bt.Count:
|
|
3427
3655
|
return "IFCQUANTITYCOUNT";
|
|
3428
|
-
case
|
|
3656
|
+
case bt.Weight:
|
|
3429
3657
|
return "IFCQUANTITYWEIGHT";
|
|
3430
|
-
case
|
|
3658
|
+
case bt.Time:
|
|
3431
3659
|
return "IFCQUANTITYTIME";
|
|
3432
3660
|
default:
|
|
3433
3661
|
return "IFCQUANTITYCOUNT";
|
|
3434
3662
|
}
|
|
3435
3663
|
}
|
|
3436
|
-
function
|
|
3664
|
+
function ze(r, t) {
|
|
3437
3665
|
if (r == null) return "$";
|
|
3438
3666
|
switch(t){
|
|
3439
|
-
case
|
|
3440
|
-
case
|
|
3441
|
-
case
|
|
3442
|
-
return `IFCLABEL('${
|
|
3443
|
-
case
|
|
3444
|
-
return `IFCIDENTIFIER('${
|
|
3445
|
-
case
|
|
3667
|
+
case et.String:
|
|
3668
|
+
case et.Label:
|
|
3669
|
+
case et.Text:
|
|
3670
|
+
return `IFCLABEL('${st(String(r))}')`;
|
|
3671
|
+
case et.Identifier:
|
|
3672
|
+
return `IFCIDENTIFIER('${st(String(r))}')`;
|
|
3673
|
+
case et.Real:
|
|
3446
3674
|
{
|
|
3447
3675
|
const e = Number(r);
|
|
3448
3676
|
return Number.isFinite(e) ? `IFCREAL(${e.toString().includes(".") ? e : e + "."})` : "$";
|
|
3449
3677
|
}
|
|
3450
|
-
case
|
|
3678
|
+
case et.Integer:
|
|
3451
3679
|
return `IFCINTEGER(${Math.round(Number(r))})`;
|
|
3452
|
-
case
|
|
3453
|
-
case
|
|
3680
|
+
case et.Boolean:
|
|
3681
|
+
case et.Logical:
|
|
3454
3682
|
return r === !0 ? "IFCBOOLEAN(.T.)" : r === !1 ? "IFCBOOLEAN(.F.)" : "IFCLOGICAL(.U.)";
|
|
3455
|
-
case
|
|
3683
|
+
case et.Enum:
|
|
3456
3684
|
return `.${String(r).toUpperCase()}.`;
|
|
3457
|
-
case
|
|
3458
|
-
return Array.isArray(r) ? `(${r.map((n)=>
|
|
3685
|
+
case et.List:
|
|
3686
|
+
return Array.isArray(r) ? `(${r.map((n)=>ze(n, et.String)).join(",")})` : "$";
|
|
3459
3687
|
default:
|
|
3460
|
-
return `IFCLABEL('${
|
|
3688
|
+
return `IFCLABEL('${st(String(r))}')`;
|
|
3461
3689
|
}
|
|
3462
3690
|
}
|
|
3463
|
-
function
|
|
3691
|
+
function Jn(r, t) {
|
|
3464
3692
|
const e = r.trim(), n = t.trim();
|
|
3465
3693
|
if (r === "") return "$";
|
|
3466
3694
|
if (e === "$" || e === "*" || /^#\d+$/.test(e)) return e;
|
|
@@ -3473,20 +3701,20 @@ let __tla = Promise.all([
|
|
|
3473
3701
|
const s = Number(e);
|
|
3474
3702
|
return Number.isFinite(s) ? n.includes(".") || /E/i.test(n) ? Z(s) : String(s) : "$";
|
|
3475
3703
|
}
|
|
3476
|
-
return
|
|
3704
|
+
return Ue(r);
|
|
3477
3705
|
}
|
|
3478
|
-
function
|
|
3706
|
+
function fe(r) {
|
|
3479
3707
|
if (r == null) return "$";
|
|
3480
3708
|
if (typeof r == "boolean") return r ? ".T." : ".F.";
|
|
3481
3709
|
if (typeof r == "number") return Number.isFinite(r) ? Number.isInteger(r) ? String(r) : Z(r) : "$";
|
|
3482
|
-
if (Array.isArray(r)) return `(${r.map(
|
|
3710
|
+
if (Array.isArray(r)) return `(${r.map(fe).join(",")})`;
|
|
3483
3711
|
const t = String(r).trim();
|
|
3484
|
-
return t === "$" || t === "*" || /^#\d+$/.test(t) ? t : /^\.[A-Z0-9_]+\.$/i.test(t) ? t.toUpperCase() : `'${
|
|
3712
|
+
return t === "$" || t === "*" || /^#\d+$/.test(t) ? t : /^\.[A-Z0-9_]+\.$/i.test(t) ? t.toUpperCase() : `'${st(String(r))}'`;
|
|
3485
3713
|
}
|
|
3486
|
-
function
|
|
3487
|
-
return r.map(
|
|
3714
|
+
function Kn(r) {
|
|
3715
|
+
return r.map(fe).join(",");
|
|
3488
3716
|
}
|
|
3489
|
-
function
|
|
3717
|
+
function Me(r) {
|
|
3490
3718
|
const t = [];
|
|
3491
3719
|
let e = "", n = 0, s = !1;
|
|
3492
3720
|
for(let i = 0; i < r.length; i++){
|
|
@@ -3511,7 +3739,7 @@ let __tla = Promise.all([
|
|
|
3511
3739
|
}
|
|
3512
3740
|
return e.trim() && t.push(e.trim()), t;
|
|
3513
3741
|
}
|
|
3514
|
-
function
|
|
3742
|
+
function Zn(r) {
|
|
3515
3743
|
const t = [];
|
|
3516
3744
|
let e = "", n = 0, s = !1;
|
|
3517
3745
|
for(let i = 0; i < r.length; i++){
|
|
@@ -3536,7 +3764,7 @@ let __tla = Promise.all([
|
|
|
3536
3764
|
}
|
|
3537
3765
|
return t.push(e), t;
|
|
3538
3766
|
}
|
|
3539
|
-
|
|
3767
|
+
ts = class {
|
|
3540
3768
|
dataStore;
|
|
3541
3769
|
mutationView;
|
|
3542
3770
|
nextExpressId;
|
|
@@ -3544,192 +3772,192 @@ let __tla = Promise.all([
|
|
|
3544
3772
|
constructor(t, e){
|
|
3545
3773
|
this.dataStore = t, this.mutationView = e || null;
|
|
3546
3774
|
const n = this.findMaxExpressId(), s = typeof e?.peekNextExpressId == "function" ? e.peekNextExpressId() - 1 : 0;
|
|
3547
|
-
this.nextExpressId = Math.max(n, s) + 1, this.entityExtractor = t.source ? new
|
|
3775
|
+
this.nextExpressId = Math.max(n, s) + 1, this.entityExtractor = t.source ? new He(t.source) : null;
|
|
3548
3776
|
}
|
|
3549
3777
|
export(t) {
|
|
3550
3778
|
const e = [];
|
|
3551
3779
|
let n = 0, s = 0;
|
|
3552
|
-
const i = t.schema || this.dataStore.schemaVersion || "IFC4", o = this.dataStore.schemaVersion || "IFC4",
|
|
3780
|
+
const i = t.schema || this.dataStore.schemaVersion || "IFC4", o = this.dataStore.schemaVersion || "IFC4", c = de(o, i);
|
|
3553
3781
|
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.");
|
|
3554
|
-
const l =
|
|
3782
|
+
const l = se({
|
|
3555
3783
|
schema: i,
|
|
3556
3784
|
description: t.description || "Exported from ifc-lite",
|
|
3557
3785
|
author: t.author || "",
|
|
3558
3786
|
organization: t.organization || "",
|
|
3559
3787
|
application: t.application || "ifc-lite",
|
|
3560
3788
|
filename: t.filename || "export.ifc"
|
|
3561
|
-
}), d = new Set, u = new Map, f = new Map, p = [],
|
|
3789
|
+
}), d = new Set, u = new Map, f = new Map, p = [], g = [], h = new Map, y = new Map, E = new Set, C = new Map, T = new Set, $ = new Set;
|
|
3562
3790
|
if (this.mutationView && t.applyMutations !== !1) {
|
|
3563
|
-
const
|
|
3564
|
-
for (const
|
|
3565
|
-
if (
|
|
3566
|
-
d.add(
|
|
3791
|
+
const b = this.mutationView.getMutations(), S = new Map, F = new Map;
|
|
3792
|
+
for (const _ of b){
|
|
3793
|
+
if (_.type === "UPDATE_ATTRIBUTE" && _.attributeName) {
|
|
3794
|
+
d.add(_.entityId), f.has(_.entityId) || f.set(_.entityId, new Map), f.get(_.entityId).set(_.attributeName, _.newValue == null ? "" : String(_.newValue));
|
|
3567
3795
|
continue;
|
|
3568
3796
|
}
|
|
3569
|
-
if (!
|
|
3570
|
-
const I =
|
|
3571
|
-
I.has(
|
|
3797
|
+
if (!_.psetName) continue;
|
|
3798
|
+
const I = _.type === "CREATE_QUANTITY" || _.type === "UPDATE_QUANTITY" || _.type === "DELETE_QUANTITY" ? F : S;
|
|
3799
|
+
I.has(_.entityId) || I.set(_.entityId, new Set), I.get(_.entityId).add(_.psetName);
|
|
3572
3800
|
}
|
|
3573
|
-
const
|
|
3574
|
-
for (const [
|
|
3575
|
-
d.add(
|
|
3576
|
-
const R = this.mutationView.getForEntity(
|
|
3801
|
+
const m = this.buildRelDefinesByPropertiesIndex();
|
|
3802
|
+
for (const [_, w] of S){
|
|
3803
|
+
d.add(_), u.set(_, w), s++;
|
|
3804
|
+
const R = this.mutationView.getForEntity(_).filter((z)=>w.has(z.name)), N = new Set;
|
|
3577
3805
|
R.length > 0 && p.push({
|
|
3578
|
-
entityId:
|
|
3806
|
+
entityId: _,
|
|
3579
3807
|
psets: R
|
|
3580
3808
|
});
|
|
3581
|
-
const
|
|
3582
|
-
if (
|
|
3583
|
-
const H = this.getPropertySetName(
|
|
3584
|
-
if (H &&
|
|
3585
|
-
|
|
3586
|
-
const
|
|
3587
|
-
for (const Q of
|
|
3809
|
+
const V = m.get(_);
|
|
3810
|
+
if (V) for (const { relId: z, psetId: W } of V){
|
|
3811
|
+
const H = this.getPropertySetName(W);
|
|
3812
|
+
if (H && N.add(H), H && w.has(H)) {
|
|
3813
|
+
$.add(z), T.add(W);
|
|
3814
|
+
const j = this.getPropertyIdsInSet(W);
|
|
3815
|
+
for (const Q of j)T.add(Q);
|
|
3588
3816
|
}
|
|
3589
3817
|
}
|
|
3590
|
-
if (this.isTypeEntity(
|
|
3591
|
-
const z = this.getTypeOwnedHasPropertySetIds(
|
|
3818
|
+
if (this.isTypeEntity(_)) {
|
|
3819
|
+
const z = this.getTypeOwnedHasPropertySetIds(_), W = new Set;
|
|
3592
3820
|
for (const H of z){
|
|
3593
|
-
const
|
|
3594
|
-
if (!
|
|
3595
|
-
|
|
3821
|
+
const j = this.getPropertySetName(H);
|
|
3822
|
+
if (!j || !w.has(j)) continue;
|
|
3823
|
+
W.add(j), T.add(H);
|
|
3596
3824
|
const Q = this.getPropertyIdsInSet(H);
|
|
3597
|
-
for (const K of Q)
|
|
3825
|
+
for (const K of Q)T.add(K);
|
|
3598
3826
|
}
|
|
3599
|
-
for (const H of
|
|
3600
|
-
|
|
3827
|
+
for (const H of w)N.has(H) || W.add(H);
|
|
3828
|
+
W.size > 0 && (h.set(_, W), y.set(_, z), E.add(_));
|
|
3601
3829
|
}
|
|
3602
3830
|
}
|
|
3603
3831
|
t.includeQuantities === !1 && F.clear();
|
|
3604
|
-
for (const [
|
|
3605
|
-
d.add(
|
|
3606
|
-
const R = this.mutationView.getQuantitiesForEntity(
|
|
3607
|
-
R.length > 0 &&
|
|
3608
|
-
entityId:
|
|
3832
|
+
for (const [_, w] of F){
|
|
3833
|
+
d.add(_), u.has(_) || s++;
|
|
3834
|
+
const R = this.mutationView.getQuantitiesForEntity(_).filter((V)=>w.has(V.name));
|
|
3835
|
+
R.length > 0 && g.push({
|
|
3836
|
+
entityId: _,
|
|
3609
3837
|
qsets: R
|
|
3610
3838
|
});
|
|
3611
|
-
const
|
|
3612
|
-
if (
|
|
3613
|
-
const
|
|
3614
|
-
if (
|
|
3615
|
-
|
|
3839
|
+
const N = m.get(_);
|
|
3840
|
+
if (N) for (const { relId: V, psetId: z } of N){
|
|
3841
|
+
const W = this.getElementQuantityName(z);
|
|
3842
|
+
if (W && w.has(W)) {
|
|
3843
|
+
$.add(V), T.add(z);
|
|
3616
3844
|
const H = this.getPropertyIdsInSet(z);
|
|
3617
|
-
for (const
|
|
3845
|
+
for (const j of H)T.add(j);
|
|
3618
3846
|
}
|
|
3619
3847
|
}
|
|
3620
3848
|
}
|
|
3621
|
-
for (const [
|
|
3849
|
+
for (const [_] of f)!S.has(_) && !F.has(_) && s++;
|
|
3622
3850
|
}
|
|
3623
|
-
const
|
|
3851
|
+
const x = [];
|
|
3624
3852
|
if (t.applyMutations !== !1 && t.georefMutations) {
|
|
3625
|
-
const
|
|
3626
|
-
if (
|
|
3627
|
-
const
|
|
3628
|
-
f.has(
|
|
3629
|
-
const
|
|
3853
|
+
const b = t.georefMutations, S = this.dataStore.entityIndex.byType.get("IFCPROJECTEDCRS"), F = this.dataStore.entityIndex.byType.get("IFCMAPCONVERSION");
|
|
3854
|
+
if (b.projectedCRS && S?.length) {
|
|
3855
|
+
const m = S[0];
|
|
3856
|
+
f.has(m) || f.set(m, new Map);
|
|
3857
|
+
const _ = f.get(m), w = b.projectedCRS;
|
|
3630
3858
|
let I = !1;
|
|
3631
|
-
if (
|
|
3632
|
-
const R = this.resolveMapUnitReference(String(
|
|
3633
|
-
|
|
3859
|
+
if (w.name !== void 0 && (_.set("Name", String(w.name)), I = !0), w.description !== void 0 && (_.set("Description", String(w.description)), I = !0), w.geodeticDatum !== void 0 && (_.set("GeodeticDatum", String(w.geodeticDatum)), I = !0), w.verticalDatum !== void 0 && (_.set("VerticalDatum", String(w.verticalDatum)), I = !0), w.mapProjection !== void 0 && (_.set("MapProjection", String(w.mapProjection)), I = !0), w.mapZone !== void 0 && (_.set("MapZone", String(w.mapZone)), I = !0), w.mapUnit !== void 0) {
|
|
3860
|
+
const R = this.resolveMapUnitReference(String(w.mapUnit), x);
|
|
3861
|
+
_.set("MapUnit", `#${R}`), I = !0;
|
|
3634
3862
|
}
|
|
3635
|
-
I && !d.has(
|
|
3863
|
+
I && !d.has(m) && (d.add(m), s++);
|
|
3636
3864
|
}
|
|
3637
|
-
if (
|
|
3638
|
-
const
|
|
3639
|
-
f.has(
|
|
3640
|
-
const
|
|
3865
|
+
if (b.mapConversion && F?.length) {
|
|
3866
|
+
const m = F[0];
|
|
3867
|
+
f.has(m) || f.set(m, new Map);
|
|
3868
|
+
const _ = f.get(m), w = b.mapConversion;
|
|
3641
3869
|
let I = !1;
|
|
3642
|
-
|
|
3870
|
+
w.eastings !== void 0 && (_.set("Eastings", String(w.eastings)), I = !0), w.northings !== void 0 && (_.set("Northings", String(w.northings)), I = !0), w.orthogonalHeight !== void 0 && (_.set("OrthogonalHeight", String(w.orthogonalHeight)), I = !0), w.xAxisAbscissa !== void 0 && (_.set("XAxisAbscissa", String(w.xAxisAbscissa)), I = !0), w.xAxisOrdinate !== void 0 && (_.set("XAxisOrdinate", String(w.xAxisOrdinate)), I = !0), w.scale !== void 0 && (_.set("Scale", String(w.scale)), I = !0), I && !d.has(m) && (d.add(m), s++);
|
|
3643
3871
|
}
|
|
3644
|
-
if (
|
|
3645
|
-
const
|
|
3646
|
-
|
|
3872
|
+
if (b.projectedCRS && !S?.length) {
|
|
3873
|
+
const m = b.projectedCRS, _ = this.nextExpressId++, w = m.name ? `'${st(String(m.name))}'` : "$", I = m.description ? `'${st(String(m.description))}'` : "$", R = m.geodeticDatum ? `'${st(String(m.geodeticDatum))}'` : "$", N = m.verticalDatum ? `'${st(String(m.verticalDatum))}'` : "$", V = m.mapProjection ? `'${st(String(m.mapProjection))}'` : "$", z = m.mapZone ? `'${st(String(m.mapZone))}'` : "$", W = m.mapUnit ? `#${this.resolveMapUnitReference(String(m.mapUnit), x)}` : "$";
|
|
3874
|
+
x.push(`#${_}=IFCPROJECTEDCRS(${w},${I},${R},${N},${V},${z},${W});`), n++;
|
|
3647
3875
|
const H = this.findPreferredGeometricRepresentationContextId();
|
|
3648
3876
|
if (H) {
|
|
3649
|
-
const
|
|
3650
|
-
|
|
3877
|
+
const j = b.mapConversion || {}, Q = this.nextExpressId++, K = Z(Number(j.eastings) || 0), at = Z(Number(j.northings) || 0), ht = Z(Number(j.orthogonalHeight) || 0), rt = j.xAxisAbscissa !== void 0 ? Z(Number(j.xAxisAbscissa)) : "$", dt = j.xAxisOrdinate !== void 0 ? Z(Number(j.xAxisOrdinate)) : "$", lt = j.scale !== void 0 ? Z(Number(j.scale)) : "$";
|
|
3878
|
+
x.push(`#${Q}=IFCMAPCONVERSION(#${H},#${_},${K},${at},${ht},${rt},${dt},${lt});`), n++;
|
|
3651
3879
|
} else console.warn("[StepExporter] Cannot create IfcMapConversion: no IfcGeometricRepresentationContext found in source file");
|
|
3652
|
-
} else if (
|
|
3653
|
-
const
|
|
3654
|
-
if (
|
|
3655
|
-
const
|
|
3656
|
-
|
|
3880
|
+
} else if (b.mapConversion && !F?.length && S?.length) {
|
|
3881
|
+
const m = this.findPreferredGeometricRepresentationContextId();
|
|
3882
|
+
if (m) {
|
|
3883
|
+
const _ = b.mapConversion, w = this.nextExpressId++, I = Z(Number(_.eastings) || 0), R = Z(Number(_.northings) || 0), N = Z(Number(_.orthogonalHeight) || 0), V = _.xAxisAbscissa !== void 0 ? Z(Number(_.xAxisAbscissa)) : "$", z = _.xAxisOrdinate !== void 0 ? Z(Number(_.xAxisOrdinate)) : "$", W = _.scale !== void 0 ? Z(Number(_.scale)) : "$";
|
|
3884
|
+
x.push(`#${w}=IFCMAPCONVERSION(#${m},#${S[0]},${I},${R},${N},${V},${z},${W});`), n++;
|
|
3657
3885
|
} else console.warn("[StepExporter] Cannot create IfcMapConversion: no IfcGeometricRepresentationContext found in source file");
|
|
3658
3886
|
}
|
|
3659
3887
|
}
|
|
3660
|
-
const
|
|
3661
|
-
if (t.deltaOnly && d.size === 0 &&
|
|
3662
|
-
const
|
|
3888
|
+
const Y = this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function" ? this.mutationView.getNewEntities().length : 0;
|
|
3889
|
+
if (t.deltaOnly && d.size === 0 && Y === 0 && x.length === 0) {
|
|
3890
|
+
const b = new TextEncoder().encode(l + `DATA;
|
|
3663
3891
|
ENDSEC;
|
|
3664
3892
|
END-ISO-10303-21;
|
|
3665
3893
|
`);
|
|
3666
3894
|
return {
|
|
3667
|
-
content:
|
|
3895
|
+
content: b,
|
|
3668
3896
|
stats: {
|
|
3669
3897
|
entityCount: 0,
|
|
3670
3898
|
newEntityCount: 0,
|
|
3671
3899
|
modifiedEntityCount: 0,
|
|
3672
|
-
fileSize:
|
|
3900
|
+
fileSize: b.byteLength
|
|
3673
3901
|
}
|
|
3674
3902
|
};
|
|
3675
3903
|
}
|
|
3676
3904
|
let O = null;
|
|
3677
3905
|
if (t.visibleOnly && this.dataStore.source) {
|
|
3678
|
-
const { roots:
|
|
3679
|
-
O =
|
|
3906
|
+
const { roots: b, hiddenProductIds: S } = ce(this.dataStore, t.hiddenEntityIds ?? new Set, t.isolatedEntityIds ?? null);
|
|
3907
|
+
O = ae(b, this.dataStore.source, this.dataStore.entityIndex.byId, S), le(O, this.dataStore.source, this.dataStore.entityIndex);
|
|
3680
3908
|
}
|
|
3681
3909
|
if (!t.deltaOnly && this.dataStore.source) {
|
|
3682
|
-
const
|
|
3683
|
-
for (const [F,
|
|
3684
|
-
if (
|
|
3685
|
-
const
|
|
3686
|
-
if (t.includeGeometry === !1 && this.isGeometryEntity(
|
|
3687
|
-
const
|
|
3688
|
-
let I = f.has(F) ? this.applyAttributeMutations(
|
|
3689
|
-
const R =
|
|
3690
|
-
if (R && R.size > 0 && (I = this.applyPositionalMutations(I, R), d.has(F) || (d.add(F), s++)),
|
|
3691
|
-
const
|
|
3692
|
-
|
|
3910
|
+
const b = this.dataStore.source, S = !!this.mutationView && t.applyMutations !== !1;
|
|
3911
|
+
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) || $.has(F) || E.has(F)) continue;
|
|
3913
|
+
const _ = m.type.toUpperCase();
|
|
3914
|
+
if (t.includeGeometry === !1 && this.isGeometryEntity(_)) continue;
|
|
3915
|
+
const w = nt(b, m.byteOffset, m.byteOffset + m.byteLength);
|
|
3916
|
+
let I = f.has(F) ? this.applyAttributeMutations(w, _, f.get(F)) : w;
|
|
3917
|
+
const R = S && typeof this.mutationView.getPositionalMutationsForEntity == "function" ? this.mutationView.getPositionalMutationsForEntity(F) : null;
|
|
3918
|
+
if (R && R.size > 0 && (I = this.applyPositionalMutations(I, R), d.has(F) || (d.add(F), s++)), c) {
|
|
3919
|
+
const N = Xt(I, o, i);
|
|
3920
|
+
N !== null && e.push(N);
|
|
3693
3921
|
} else e.push(I);
|
|
3694
3922
|
}
|
|
3695
3923
|
}
|
|
3696
|
-
for (const { entityId:
|
|
3697
|
-
const F = this.generatePropertySetEntities(
|
|
3924
|
+
for (const { entityId: b, psets: S } of p){
|
|
3925
|
+
const F = this.generatePropertySetEntities(b, S, h.get(b));
|
|
3698
3926
|
e.push(...F.lines), n += F.count;
|
|
3699
|
-
const
|
|
3700
|
-
if (
|
|
3701
|
-
const
|
|
3702
|
-
|
|
3927
|
+
const m = h.get(b);
|
|
3928
|
+
if (m && m.size > 0) {
|
|
3929
|
+
const _ = this.rewriteTypeEntityHasPropertySets(b, y.get(b) ?? [], m, F.generatedTypeOwnedPsetIds);
|
|
3930
|
+
_ && C.set(b, _);
|
|
3703
3931
|
}
|
|
3704
3932
|
}
|
|
3705
|
-
for (const [
|
|
3706
|
-
if (
|
|
3707
|
-
const F = this.rewriteTypeEntityHasPropertySets(
|
|
3708
|
-
F &&
|
|
3933
|
+
for (const [b, S] of h){
|
|
3934
|
+
if (C.has(b)) continue;
|
|
3935
|
+
const F = this.rewriteTypeEntityHasPropertySets(b, y.get(b) ?? [], S, new Map);
|
|
3936
|
+
F && C.set(b, F);
|
|
3709
3937
|
}
|
|
3710
|
-
for (const { entityId:
|
|
3711
|
-
const F = this.generateQuantitySetEntities(
|
|
3938
|
+
for (const { entityId: b, qsets: S } of g){
|
|
3939
|
+
const F = this.generateQuantitySetEntities(b, S);
|
|
3712
3940
|
e.push(...F.lines), n += F.count;
|
|
3713
3941
|
}
|
|
3714
|
-
for (const
|
|
3715
|
-
for (const
|
|
3716
|
-
if (this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function") for (const
|
|
3717
|
-
const
|
|
3718
|
-
if (t.includeGeometry === !1 && this.isGeometryEntity(
|
|
3719
|
-
const F = `#${
|
|
3720
|
-
if (
|
|
3721
|
-
const
|
|
3722
|
-
|
|
3942
|
+
for (const b of C.values())e.push(b);
|
|
3943
|
+
for (const b of x)e.push(b);
|
|
3944
|
+
if (this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function") for (const b of this.mutationView.getNewEntities()){
|
|
3945
|
+
const S = b.type.toUpperCase();
|
|
3946
|
+
if (t.includeGeometry === !1 && this.isGeometryEntity(S) || O !== null && !O.has(b.expressId)) continue;
|
|
3947
|
+
const F = `#${b.expressId}=${S}(${Kn(b.attributes)});`;
|
|
3948
|
+
if (c) {
|
|
3949
|
+
const m = Xt(F, o, i);
|
|
3950
|
+
m !== null && (e.push(m), n++);
|
|
3723
3951
|
} else e.push(F), n++;
|
|
3724
3952
|
}
|
|
3725
|
-
const
|
|
3953
|
+
const v = es(l, e);
|
|
3726
3954
|
return {
|
|
3727
|
-
content:
|
|
3955
|
+
content: v,
|
|
3728
3956
|
stats: {
|
|
3729
3957
|
entityCount: e.length,
|
|
3730
3958
|
newEntityCount: n,
|
|
3731
3959
|
modifiedEntityCount: s,
|
|
3732
|
-
fileSize:
|
|
3960
|
+
fileSize: v.byteLength
|
|
3733
3961
|
}
|
|
3734
3962
|
};
|
|
3735
3963
|
}
|
|
@@ -3765,22 +3993,22 @@ END-ISO-10303-21;
|
|
|
3765
3993
|
const s = [];
|
|
3766
3994
|
let i = 0;
|
|
3767
3995
|
const o = new Map;
|
|
3768
|
-
for (const
|
|
3996
|
+
for (const c of e){
|
|
3769
3997
|
const l = [];
|
|
3770
|
-
for (const
|
|
3998
|
+
for (const g of c.properties){
|
|
3771
3999
|
const h = this.nextExpressId++;
|
|
3772
4000
|
i++;
|
|
3773
|
-
const y =
|
|
3774
|
-
s.push(
|
|
4001
|
+
const y = ze(g.value, g.type), E = g.unit ? this.findUnitId(g.unit) : null, C = E !== null ? Qe(E) : null, T = `#${h}=IFCPROPERTYSINGLEVALUE('${st(g.name)}',$,${y},${C ? Ue(C) : "$"});`;
|
|
4002
|
+
s.push(T), l.push(h);
|
|
3775
4003
|
}
|
|
3776
4004
|
const d = this.nextExpressId++;
|
|
3777
4005
|
i++;
|
|
3778
|
-
const u = l.map((
|
|
3779
|
-
if (s.push(p), n?.has(
|
|
4006
|
+
const u = l.map((g)=>`#${g}`).join(","), f = this.generateGlobalId(), p = `#${d}=IFCPROPERTYSET('${f}',$,'${st(c.name)}',$,(${u}));`;
|
|
4007
|
+
if (s.push(p), n?.has(c.name)) o.set(c.name, d);
|
|
3780
4008
|
else {
|
|
3781
|
-
const
|
|
4009
|
+
const g = this.nextExpressId++;
|
|
3782
4010
|
i++;
|
|
3783
|
-
const h = this.generateGlobalId(), y = `#${
|
|
4011
|
+
const h = this.generateGlobalId(), y = `#${g}=IFCRELDEFINESBYPROPERTIES('${h}',$,$,$,(#${t}),#${d});`;
|
|
3784
4012
|
s.push(y);
|
|
3785
4013
|
}
|
|
3786
4014
|
}
|
|
@@ -3798,17 +4026,17 @@ END-ISO-10303-21;
|
|
|
3798
4026
|
for (const h of i.quantities){
|
|
3799
4027
|
const y = this.nextExpressId++;
|
|
3800
4028
|
s++;
|
|
3801
|
-
const
|
|
3802
|
-
n.push(
|
|
4029
|
+
const E = Qn(h.type), C = Z(h.value), T = `#${y}=${E}('${st(h.name)}',$,$,${C},$);`;
|
|
4030
|
+
n.push(T), o.push(y);
|
|
3803
4031
|
}
|
|
3804
|
-
const
|
|
4032
|
+
const c = this.nextExpressId++;
|
|
3805
4033
|
s++;
|
|
3806
|
-
const l = o.map((h)=>`#${h}`).join(","), d = this.generateGlobalId(), u = `#${
|
|
4034
|
+
const l = o.map((h)=>`#${h}`).join(","), d = this.generateGlobalId(), u = `#${c}=IFCELEMENTQUANTITY('${d}',$,'${st(i.name)}',$,$,(${l}));`;
|
|
3807
4035
|
n.push(u);
|
|
3808
4036
|
const f = this.nextExpressId++;
|
|
3809
4037
|
s++;
|
|
3810
|
-
const p = this.generateGlobalId(),
|
|
3811
|
-
n.push(
|
|
4038
|
+
const p = this.generateGlobalId(), g = `#${f}=IFCRELDEFINESBYPROPERTIES('${p}',$,$,$,(#${t}),#${c});`;
|
|
4039
|
+
n.push(g);
|
|
3812
4040
|
}
|
|
3813
4041
|
return {
|
|
3814
4042
|
lines: n,
|
|
@@ -3818,22 +4046,22 @@ END-ISO-10303-21;
|
|
|
3818
4046
|
applyAttributeMutations(t, e, n) {
|
|
3819
4047
|
const s = t.indexOf("("), i = t.lastIndexOf(");");
|
|
3820
4048
|
if (s < 0 || i < s) return t;
|
|
3821
|
-
const o =
|
|
4049
|
+
const o = Xe(e);
|
|
3822
4050
|
if (o.length === 0) return t;
|
|
3823
|
-
const
|
|
4051
|
+
const c = Me(t.slice(s + 1, i));
|
|
3824
4052
|
let l = !1;
|
|
3825
4053
|
for (const [d, u] of n){
|
|
3826
4054
|
const f = o.indexOf(d);
|
|
3827
|
-
f < 0 || f >=
|
|
4055
|
+
f < 0 || f >= c.length || (c[f] = Jn(u, c[f]), l = !0);
|
|
3828
4056
|
}
|
|
3829
|
-
return l ? `${t.slice(0, s + 1)}${
|
|
4057
|
+
return l ? `${t.slice(0, s + 1)}${c.join(",")}${t.slice(i)}` : t;
|
|
3830
4058
|
}
|
|
3831
4059
|
applyPositionalMutations(t, e) {
|
|
3832
4060
|
const n = t.indexOf("("), s = t.lastIndexOf(");");
|
|
3833
4061
|
if (n < 0 || s < n) return t;
|
|
3834
|
-
const i =
|
|
4062
|
+
const i = Me(t.slice(n + 1, s));
|
|
3835
4063
|
let o = !1;
|
|
3836
|
-
for (const [
|
|
4064
|
+
for (const [c, l] of e)c < 0 || c >= i.length || (i[c] = fe(l), o = !0);
|
|
3837
4065
|
return o ? `${t.slice(0, n + 1)}${i.join(",")}${t.slice(s)}` : t;
|
|
3838
4066
|
}
|
|
3839
4067
|
resolveMapUnitReference(t, e) {
|
|
@@ -3844,8 +4072,8 @@ END-ISO-10303-21;
|
|
|
3844
4072
|
return e.push(`#${o}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), o;
|
|
3845
4073
|
}
|
|
3846
4074
|
if (n === "FOOT" || n === "US SURVEY FOOT") {
|
|
3847
|
-
const o = this.nextExpressId++,
|
|
3848
|
-
return e.push(`#${o}=IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);`), e.push(`#${
|
|
4075
|
+
const o = this.nextExpressId++, c = this.nextExpressId++, l = this.nextExpressId++, d = this.nextExpressId++, u = n === "US SURVEY FOOT" ? 1200 / 3937 : .3048, f = n === "US SURVEY FOOT" ? "US SURVEY FOOT" : "FOOT";
|
|
4076
|
+
return e.push(`#${o}=IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);`), e.push(`#${c}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), e.push(`#${l}=IFCMEASUREWITHUNIT(IFCLENGTHMEASURE(${Z(u)}),#${c});`), e.push(`#${d}=IFCCONVERSIONBASEDUNIT(#${o},.LENGTHUNIT.,'${f}',#${l});`), d;
|
|
3849
4077
|
}
|
|
3850
4078
|
const i = this.nextExpressId++;
|
|
3851
4079
|
return e.push(`#${i}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), i;
|
|
@@ -3864,13 +4092,13 @@ END-ISO-10303-21;
|
|
|
3864
4092
|
if (typeof d != "number") continue;
|
|
3865
4093
|
const u = this.dataStore.entityIndex.byId.get(d), f = u ? this.entityExtractor.extractEntity(u) : null;
|
|
3866
4094
|
if (!f) continue;
|
|
3867
|
-
const p = f.type.toUpperCase(),
|
|
3868
|
-
if ((typeof
|
|
4095
|
+
const p = f.type.toUpperCase(), g = f.attributes ?? [];
|
|
4096
|
+
if ((typeof g[1] == "string" ? g[1].replace(/\./g, "").toUpperCase() : "") === "LENGTHUNIT") {
|
|
3869
4097
|
if (p === "IFCSIUNIT") {
|
|
3870
|
-
const y = typeof
|
|
3871
|
-
if (t === "METRE" && (
|
|
4098
|
+
const y = typeof g[2] == "string" ? g[2].replace(/\./g, "").toUpperCase() : "", E = typeof g[3] == "string" ? g[3].replace(/\./g, "").toUpperCase() : "", C = y ? `${y}${E}` : E;
|
|
4099
|
+
if (t === "METRE" && (C === "METRE" || C === "METER")) return d;
|
|
3872
4100
|
}
|
|
3873
|
-
if (p === "IFCCONVERSIONBASEDUNIT" && (typeof
|
|
4101
|
+
if (p === "IFCCONVERSIONBASEDUNIT" && (typeof g[2] == "string" ? this.normalizeMapUnitName(g[2]) : "") === t) return d;
|
|
3874
4102
|
}
|
|
3875
4103
|
}
|
|
3876
4104
|
return null;
|
|
@@ -3882,13 +4110,13 @@ END-ISO-10303-21;
|
|
|
3882
4110
|
for (const n of t){
|
|
3883
4111
|
const s = this.dataStore.entityIndex.byId.get(n), i = s ? this.entityExtractor.extractEntity(s) : null;
|
|
3884
4112
|
if (!i) continue;
|
|
3885
|
-
const o = i.attributes ?? [],
|
|
3886
|
-
if (l === 3 && e === null && (e = n),
|
|
4113
|
+
const o = i.attributes ?? [], c = typeof o[1] == "string" ? o[1].trim().toUpperCase() : "", l = typeof o[2] == "number" ? o[2] : null;
|
|
4114
|
+
if (l === 3 && e === null && (e = n), c === "MODEL" && l === 3) return n;
|
|
3887
4115
|
}
|
|
3888
4116
|
return e ?? t[0] ?? null;
|
|
3889
4117
|
}
|
|
3890
4118
|
generateGlobalId() {
|
|
3891
|
-
return
|
|
4119
|
+
return qe();
|
|
3892
4120
|
}
|
|
3893
4121
|
findMaxExpressId() {
|
|
3894
4122
|
let t = 0;
|
|
@@ -3953,8 +4181,8 @@ END-ISO-10303-21;
|
|
|
3953
4181
|
if (!e || !this.dataStore.source) return [];
|
|
3954
4182
|
const s = nt(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/\(([^)]+)\)\s*,\s*#(\d+)\s*\)\s*;/);
|
|
3955
4183
|
if (!s) return [];
|
|
3956
|
-
const i = s[1], o = [],
|
|
3957
|
-
for (const l of
|
|
4184
|
+
const i = s[1], o = [], c = i.matchAll(/#(\d+)/g);
|
|
4185
|
+
for (const l of c)o.push(parseInt(l[1], 10));
|
|
3958
4186
|
return o;
|
|
3959
4187
|
}
|
|
3960
4188
|
getRelatedPropertySet(t) {
|
|
@@ -3980,8 +4208,8 @@ END-ISO-10303-21;
|
|
|
3980
4208
|
if (!e || !this.dataStore.source) return [];
|
|
3981
4209
|
const s = nt(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/\(\s*(#[^)]+)\s*\)\s*\)\s*;$/);
|
|
3982
4210
|
if (!s) return [];
|
|
3983
|
-
const i = s[1], o = [],
|
|
3984
|
-
for (const l of
|
|
4211
|
+
const i = s[1], o = [], c = i.matchAll(/#(\d+)/g);
|
|
4212
|
+
for (const l of c)o.push(parseInt(l[1], 10));
|
|
3985
4213
|
return o;
|
|
3986
4214
|
}
|
|
3987
4215
|
isTypeEntity(t) {
|
|
@@ -4006,53 +4234,53 @@ END-ISO-10303-21;
|
|
|
4006
4234
|
i.push(l);
|
|
4007
4235
|
}
|
|
4008
4236
|
for (const [l, d] of s)o.has(l) || i.push(d);
|
|
4009
|
-
const
|
|
4010
|
-
return this.replaceEntityAttribute(t, 5,
|
|
4237
|
+
const c = i.length > 0 ? `(${i.map((l)=>`#${l}`).join(",")})` : "$";
|
|
4238
|
+
return this.replaceEntityAttribute(t, 5, c);
|
|
4011
4239
|
}
|
|
4012
4240
|
replaceEntityAttribute(t, e, n) {
|
|
4013
4241
|
const s = this.dataStore.entityIndex.byId.get(t);
|
|
4014
4242
|
if (!s || !this.dataStore.source) return null;
|
|
4015
4243
|
const o = nt(this.dataStore.source, s.byteOffset, s.byteOffset + s.byteLength).match(/^(#\d+\s*=\s*\w+\()([\s\S]*)(\)\s*;)\s*$/);
|
|
4016
4244
|
if (!o) return null;
|
|
4017
|
-
const [,
|
|
4018
|
-
return e >= u.length ? null : (u[e] = n, `${
|
|
4245
|
+
const [, c, l, d] = o, u = Zn(l);
|
|
4246
|
+
return e >= u.length ? null : (u[e] = n, `${c}${u.join(",")}${d}`);
|
|
4019
4247
|
}
|
|
4020
4248
|
};
|
|
4021
|
-
|
|
4022
|
-
const n = new
|
|
4249
|
+
fs = function(r, t) {
|
|
4250
|
+
const n = new ts(r).export({
|
|
4023
4251
|
schema: "IFC4",
|
|
4024
4252
|
...t
|
|
4025
4253
|
});
|
|
4026
4254
|
return new TextDecoder().decode(n.content);
|
|
4027
4255
|
};
|
|
4028
|
-
function
|
|
4256
|
+
function es(r, t) {
|
|
4029
4257
|
const e = new TextEncoder, n = e.encode(`${r}DATA;
|
|
4030
4258
|
`), s = e.encode(`ENDSEC;
|
|
4031
4259
|
END-ISO-10303-21;
|
|
4032
4260
|
`), i = e.encode(`
|
|
4033
4261
|
`);
|
|
4034
4262
|
let o = n.byteLength + s.byteLength;
|
|
4035
|
-
const
|
|
4036
|
-
for(let u = 0; u < t.length; u++)
|
|
4263
|
+
const c = new Array(t.length);
|
|
4264
|
+
for(let u = 0; u < t.length; u++)c[u] = e.encode(t[u]), o += c[u].byteLength + i.byteLength;
|
|
4037
4265
|
const l = new Uint8Array(o);
|
|
4038
4266
|
let d = 0;
|
|
4039
4267
|
l.set(n, d), d += n.byteLength;
|
|
4040
|
-
for(let u = 0; u <
|
|
4268
|
+
for(let u = 0; u < c.length; u++)l.set(c[u], d), d += c[u].byteLength, l.set(i, d), d += i.byteLength;
|
|
4041
4269
|
return l.set(s, d), l;
|
|
4042
4270
|
}
|
|
4043
|
-
const
|
|
4271
|
+
const ns = /#(\d+)/g, ss = new Set([
|
|
4044
4272
|
"IFCUNITASSIGNMENT",
|
|
4045
4273
|
"IFCGEOMETRICREPRESENTATIONCONTEXT",
|
|
4046
4274
|
"IFCGEOMETRICREPRESENTATIONSUBCONTEXT"
|
|
4047
4275
|
]);
|
|
4048
|
-
|
|
4276
|
+
us = class {
|
|
4049
4277
|
models;
|
|
4050
4278
|
constructor(t){
|
|
4051
4279
|
if (t.length === 0) throw new Error("MergedExporter requires at least one model");
|
|
4052
4280
|
this.models = t;
|
|
4053
4281
|
}
|
|
4054
4282
|
export(t) {
|
|
4055
|
-
const e = t.onProgress, n = t.schema || "IFC4", s =
|
|
4283
|
+
const e = t.onProgress, n = t.schema || "IFC4", s = se({
|
|
4056
4284
|
schema: n,
|
|
4057
4285
|
description: t.description || `Merged export of ${this.models.length} models from ifc-lite`,
|
|
4058
4286
|
author: t.author || "",
|
|
@@ -4061,46 +4289,46 @@ END-ISO-10303-21;
|
|
|
4061
4289
|
filename: t.filename || "merged.ifc"
|
|
4062
4290
|
}), i = [];
|
|
4063
4291
|
let o = 1;
|
|
4064
|
-
const
|
|
4292
|
+
const c = new Map;
|
|
4065
4293
|
for (const y of this.models){
|
|
4066
|
-
|
|
4067
|
-
let
|
|
4068
|
-
for (const [
|
|
4069
|
-
o +=
|
|
4294
|
+
c.set(y.id, o - 1);
|
|
4295
|
+
let E = 0;
|
|
4296
|
+
for (const [C] of y.dataStore.entityIndex.byId)C > E && (E = C);
|
|
4297
|
+
o += E;
|
|
4070
4298
|
}
|
|
4071
|
-
const l = this.models[0], d =
|
|
4072
|
-
let
|
|
4299
|
+
const l = this.models[0], d = c.get(l.id), u = this.findInfrastructureEntities(l.dataStore), f = this.findEntitiesByType(l.dataStore, "IFCPROJECT"), p = this.buildSpatialLookup(l.dataStore);
|
|
4300
|
+
let g = !0;
|
|
4073
4301
|
for (const y of this.models){
|
|
4074
|
-
const
|
|
4075
|
-
if (!
|
|
4076
|
-
let
|
|
4302
|
+
const E = c.get(y.id), C = y.dataStore.source;
|
|
4303
|
+
if (!C || C.length === 0) continue;
|
|
4304
|
+
let T = null;
|
|
4077
4305
|
if (t.visibleOnly) {
|
|
4078
|
-
const
|
|
4079
|
-
|
|
4306
|
+
const Y = t.hiddenEntityIdsByModel?.get(y.id) ?? new Set, O = t.isolatedEntityIdsByModel?.get(y.id) ?? null, { roots: v, hiddenProductIds: b } = ce(y.dataStore, Y, O);
|
|
4307
|
+
T = ae(v, C, y.dataStore.entityIndex.byId, b), le(T, C, y.dataStore.entityIndex);
|
|
4080
4308
|
}
|
|
4081
|
-
const
|
|
4082
|
-
if (!
|
|
4083
|
-
const
|
|
4084
|
-
if (f.length > 0) for (const
|
|
4309
|
+
const $ = new Map, x = new Set;
|
|
4310
|
+
if (!g) {
|
|
4311
|
+
const Y = this.findEntitiesByType(y.dataStore, "IFCPROJECT");
|
|
4312
|
+
if (f.length > 0) for (const v of Y)$.set(v, f[0] + d), x.add(v);
|
|
4085
4313
|
const O = this.findInfrastructureEntities(y.dataStore);
|
|
4086
|
-
for (const [
|
|
4087
|
-
const
|
|
4088
|
-
|
|
4314
|
+
for (const [v, b] of u){
|
|
4315
|
+
const S = O.get(v);
|
|
4316
|
+
S && b.length > 0 && S.length > 0 && ($.set(S[0], b[0] + d), x.add(S[0]));
|
|
4089
4317
|
}
|
|
4090
|
-
this.unifySpatialEntities(y.dataStore, p, d,
|
|
4318
|
+
this.unifySpatialEntities(y.dataStore, p, d, $, x), this.skipRedundantRelAggregates(y.dataStore, $, x);
|
|
4091
4319
|
}
|
|
4092
|
-
for (const [
|
|
4093
|
-
if (
|
|
4094
|
-
const
|
|
4095
|
-
let
|
|
4096
|
-
|
|
4097
|
-
const
|
|
4098
|
-
if (
|
|
4099
|
-
const F =
|
|
4320
|
+
for (const [Y, O] of y.dataStore.entityIndex.byId){
|
|
4321
|
+
if (T !== null && !T.has(Y) || x.has(Y)) continue;
|
|
4322
|
+
const v = nt(C, O.byteOffset, O.byteOffset + O.byteLength);
|
|
4323
|
+
let b;
|
|
4324
|
+
E === 0 && $.size === 0 ? b = v : b = this.remapEntityText(v, E, $);
|
|
4325
|
+
const S = y.dataStore.schemaVersion || "IFC4";
|
|
4326
|
+
if (de(S, n)) {
|
|
4327
|
+
const F = Xt(b, S, n);
|
|
4100
4328
|
F !== null && i.push(F);
|
|
4101
|
-
} else i.push(
|
|
4329
|
+
} else i.push(b);
|
|
4102
4330
|
}
|
|
4103
|
-
|
|
4331
|
+
g = !1;
|
|
4104
4332
|
}
|
|
4105
4333
|
e && e({
|
|
4106
4334
|
phase: "assembling",
|
|
@@ -4108,7 +4336,7 @@ END-ISO-10303-21;
|
|
|
4108
4336
|
entitiesProcessed: i.length,
|
|
4109
4337
|
entitiesTotal: i.length
|
|
4110
4338
|
});
|
|
4111
|
-
const h =
|
|
4339
|
+
const h = Pe(s, i);
|
|
4112
4340
|
return {
|
|
4113
4341
|
content: h,
|
|
4114
4342
|
stats: {
|
|
@@ -4119,7 +4347,7 @@ END-ISO-10303-21;
|
|
|
4119
4347
|
};
|
|
4120
4348
|
}
|
|
4121
4349
|
async exportAsync(t) {
|
|
4122
|
-
const e = t.onProgress, n = t.schema || "IFC4", s =
|
|
4350
|
+
const e = t.onProgress, n = t.schema || "IFC4", s = se({
|
|
4123
4351
|
schema: n,
|
|
4124
4352
|
description: t.description || `Merged export of ${this.models.length} models from ifc-lite`,
|
|
4125
4353
|
author: t.author || "",
|
|
@@ -4128,67 +4356,67 @@ END-ISO-10303-21;
|
|
|
4128
4356
|
filename: t.filename || "merged.ifc"
|
|
4129
4357
|
}), i = [];
|
|
4130
4358
|
let o = 0;
|
|
4131
|
-
for (const
|
|
4132
|
-
let
|
|
4359
|
+
for (const T of this.models)o += T.dataStore.entityIndex.byId.size;
|
|
4360
|
+
let c = 1;
|
|
4133
4361
|
const l = new Map;
|
|
4134
|
-
for (const
|
|
4135
|
-
l.set(
|
|
4136
|
-
let
|
|
4137
|
-
for (const [
|
|
4138
|
-
|
|
4362
|
+
for (const T of this.models){
|
|
4363
|
+
l.set(T.id, c - 1);
|
|
4364
|
+
let $ = 0;
|
|
4365
|
+
for (const [x] of T.dataStore.entityIndex.byId)x > $ && ($ = x);
|
|
4366
|
+
c += $;
|
|
4139
4367
|
}
|
|
4140
|
-
const d = this.models[0], u = l.get(d.id), f = this.findInfrastructureEntities(d.dataStore), p = this.findEntitiesByType(d.dataStore, "IFCPROJECT"),
|
|
4368
|
+
const d = this.models[0], u = l.get(d.id), f = this.findInfrastructureEntities(d.dataStore), p = this.findEntitiesByType(d.dataStore, "IFCPROJECT"), g = this.buildSpatialLookup(d.dataStore);
|
|
4141
4369
|
let h = !0, y = 0;
|
|
4142
|
-
const
|
|
4370
|
+
const E = 2e3;
|
|
4143
4371
|
e && e({
|
|
4144
4372
|
phase: "preparing",
|
|
4145
4373
|
percent: 0,
|
|
4146
4374
|
entitiesProcessed: 0,
|
|
4147
4375
|
entitiesTotal: o
|
|
4148
4376
|
});
|
|
4149
|
-
for (const
|
|
4150
|
-
const
|
|
4151
|
-
if (!
|
|
4377
|
+
for (const T of this.models){
|
|
4378
|
+
const $ = l.get(T.id), x = T.dataStore.source;
|
|
4379
|
+
if (!x || x.length === 0) continue;
|
|
4152
4380
|
e && e({
|
|
4153
4381
|
phase: "entities",
|
|
4154
4382
|
percent: o > 0 ? y / o * .85 : 0,
|
|
4155
4383
|
entitiesProcessed: y,
|
|
4156
4384
|
entitiesTotal: o,
|
|
4157
|
-
currentModel:
|
|
4385
|
+
currentModel: T.name
|
|
4158
4386
|
});
|
|
4159
|
-
let
|
|
4387
|
+
let Y = null;
|
|
4160
4388
|
if (t.visibleOnly) {
|
|
4161
|
-
const
|
|
4162
|
-
|
|
4389
|
+
const S = t.hiddenEntityIdsByModel?.get(T.id) ?? new Set, F = t.isolatedEntityIdsByModel?.get(T.id) ?? null, { roots: m, hiddenProductIds: _ } = ce(T.dataStore, S, F);
|
|
4390
|
+
Y = ae(m, x, T.dataStore.entityIndex.byId, _), le(Y, x, T.dataStore.entityIndex);
|
|
4163
4391
|
}
|
|
4164
|
-
const O = new Map,
|
|
4392
|
+
const O = new Map, v = new Set;
|
|
4165
4393
|
if (!h) {
|
|
4166
|
-
const
|
|
4167
|
-
if (p.length > 0) for (const
|
|
4168
|
-
const F = this.findInfrastructureEntities(
|
|
4169
|
-
for (const [
|
|
4170
|
-
const
|
|
4171
|
-
|
|
4394
|
+
const S = this.findEntitiesByType(T.dataStore, "IFCPROJECT");
|
|
4395
|
+
if (p.length > 0) for (const m of S)O.set(m, p[0] + u), v.add(m);
|
|
4396
|
+
const F = this.findInfrastructureEntities(T.dataStore);
|
|
4397
|
+
for (const [m, _] of f){
|
|
4398
|
+
const w = F.get(m);
|
|
4399
|
+
w && _.length > 0 && w.length > 0 && (O.set(w[0], _[0] + u), v.add(w[0]));
|
|
4172
4400
|
}
|
|
4173
|
-
this.unifySpatialEntities(
|
|
4401
|
+
this.unifySpatialEntities(T.dataStore, g, u, O, v), this.skipRedundantRelAggregates(T.dataStore, O, v);
|
|
4174
4402
|
}
|
|
4175
|
-
let
|
|
4176
|
-
for (const [
|
|
4177
|
-
if (
|
|
4178
|
-
const
|
|
4179
|
-
let
|
|
4180
|
-
|
|
4181
|
-
const
|
|
4182
|
-
if (
|
|
4183
|
-
const I =
|
|
4403
|
+
let b = 0;
|
|
4404
|
+
for (const [S, F] of T.dataStore.entityIndex.byId){
|
|
4405
|
+
if (Y !== null && !Y.has(S) || v.has(S)) continue;
|
|
4406
|
+
const m = nt(x, F.byteOffset, F.byteOffset + F.byteLength);
|
|
4407
|
+
let _;
|
|
4408
|
+
$ === 0 && O.size === 0 ? _ = m : _ = this.remapEntityText(m, $, O);
|
|
4409
|
+
const w = T.dataStore.schemaVersion || "IFC4";
|
|
4410
|
+
if (de(w, n)) {
|
|
4411
|
+
const I = Xt(_, w, n);
|
|
4184
4412
|
I !== null && i.push(I);
|
|
4185
|
-
} else i.push(
|
|
4186
|
-
|
|
4413
|
+
} else i.push(_);
|
|
4414
|
+
b++, y++, b % E === 0 && (e && e({
|
|
4187
4415
|
phase: "entities",
|
|
4188
4416
|
percent: o > 0 ? y / o * .85 : 0,
|
|
4189
4417
|
entitiesProcessed: y,
|
|
4190
4418
|
entitiesTotal: o,
|
|
4191
|
-
currentModel:
|
|
4419
|
+
currentModel: T.name
|
|
4192
4420
|
}), await new Promise((I)=>setTimeout(I, 0)));
|
|
4193
4421
|
}
|
|
4194
4422
|
h = !1;
|
|
@@ -4198,31 +4426,31 @@ END-ISO-10303-21;
|
|
|
4198
4426
|
percent: .9,
|
|
4199
4427
|
entitiesProcessed: o,
|
|
4200
4428
|
entitiesTotal: o
|
|
4201
|
-
}), await new Promise((
|
|
4202
|
-
const
|
|
4429
|
+
}), await new Promise((T)=>setTimeout(T, 0));
|
|
4430
|
+
const C = Pe(s, i);
|
|
4203
4431
|
return e && e({
|
|
4204
4432
|
phase: "assembling",
|
|
4205
4433
|
percent: 1,
|
|
4206
4434
|
entitiesProcessed: o,
|
|
4207
4435
|
entitiesTotal: o
|
|
4208
4436
|
}), {
|
|
4209
|
-
content:
|
|
4437
|
+
content: C,
|
|
4210
4438
|
stats: {
|
|
4211
4439
|
modelCount: this.models.length,
|
|
4212
4440
|
totalEntityCount: i.length,
|
|
4213
|
-
fileSize:
|
|
4441
|
+
fileSize: C.byteLength
|
|
4214
4442
|
}
|
|
4215
4443
|
};
|
|
4216
4444
|
}
|
|
4217
4445
|
remapEntityText(t, e, n) {
|
|
4218
|
-
return t.replace(
|
|
4219
|
-
const o = parseInt(i, 10),
|
|
4220
|
-
return
|
|
4446
|
+
return t.replace(ns, (s, i)=>{
|
|
4447
|
+
const o = parseInt(i, 10), c = n.get(o);
|
|
4448
|
+
return c !== void 0 ? `#${c}` : `#${o + e}`;
|
|
4221
4449
|
});
|
|
4222
4450
|
}
|
|
4223
4451
|
findInfrastructureEntities(t) {
|
|
4224
4452
|
const e = new Map;
|
|
4225
|
-
for (const n of
|
|
4453
|
+
for (const n of ss){
|
|
4226
4454
|
const s = t.entityIndex.byType.get(n) ?? [];
|
|
4227
4455
|
s.length > 0 && e.set(n, [
|
|
4228
4456
|
...s
|
|
@@ -4270,11 +4498,11 @@ END-ISO-10303-21;
|
|
|
4270
4498
|
let f;
|
|
4271
4499
|
u && (f = e.sitesByName.get(u.toLowerCase())), f === void 0 && o.length === 1 && e.siteIds.length === 1 && (f = e.siteIds[0]), f !== void 0 && (s.set(d, f + n), i.add(d));
|
|
4272
4500
|
}
|
|
4273
|
-
const
|
|
4274
|
-
for (const d of
|
|
4501
|
+
const c = this.findEntitiesByType(t, "IFCBUILDING");
|
|
4502
|
+
for (const d of c){
|
|
4275
4503
|
const u = this.extractEntityName(d, t);
|
|
4276
4504
|
let f;
|
|
4277
|
-
u && (f = e.buildingsByName.get(u.toLowerCase())), f === void 0 &&
|
|
4505
|
+
u && (f = e.buildingsByName.get(u.toLowerCase())), f === void 0 && c.length === 1 && e.buildingIds.length === 1 && (f = e.buildingIds[0]), f !== void 0 && (s.set(d, f + n), i.add(d));
|
|
4278
4506
|
}
|
|
4279
4507
|
const l = new Set;
|
|
4280
4508
|
for (const d of this.findEntitiesByType(t, "IFCBUILDINGSTOREY")){
|
|
@@ -4286,11 +4514,11 @@ END-ISO-10303-21;
|
|
|
4286
4514
|
}
|
|
4287
4515
|
if (f === void 0) {
|
|
4288
4516
|
const p = this.extractStoreyElevation(d, t);
|
|
4289
|
-
if (p !== void 0) for (const
|
|
4290
|
-
if (l.has(
|
|
4291
|
-
const h = Math.max(.5, Math.abs(
|
|
4292
|
-
if (Math.abs(p -
|
|
4293
|
-
f =
|
|
4517
|
+
if (p !== void 0) for (const g of e.storeysByElevation){
|
|
4518
|
+
if (l.has(g.expressId)) continue;
|
|
4519
|
+
const h = Math.max(.5, Math.abs(g.elevation) * .01);
|
|
4520
|
+
if (Math.abs(p - g.elevation) <= h) {
|
|
4521
|
+
f = g.expressId;
|
|
4294
4522
|
break;
|
|
4295
4523
|
}
|
|
4296
4524
|
}
|
|
@@ -4304,11 +4532,11 @@ END-ISO-10303-21;
|
|
|
4304
4532
|
if (!i) continue;
|
|
4305
4533
|
const o = i.match(/^#(\d+)$/);
|
|
4306
4534
|
if (!o || !e.has(parseInt(o[1], 10))) continue;
|
|
4307
|
-
const
|
|
4308
|
-
if (!
|
|
4535
|
+
const c = this.extractStepAttribute(s, t, 5);
|
|
4536
|
+
if (!c) continue;
|
|
4309
4537
|
const l = [], d = /#(\d+)/g;
|
|
4310
4538
|
let u;
|
|
4311
|
-
for(; (u = d.exec(
|
|
4539
|
+
for(; (u = d.exec(c)) !== null;)l.push(parseInt(u[1], 10));
|
|
4312
4540
|
l.length !== 0 && l.every((f)=>e.has(f)) && n.add(s);
|
|
4313
4541
|
}
|
|
4314
4542
|
}
|
|
@@ -4317,7 +4545,7 @@ END-ISO-10303-21;
|
|
|
4317
4545
|
if (!n || n === "$") return null;
|
|
4318
4546
|
if (n.startsWith("'") && n.endsWith("'")) {
|
|
4319
4547
|
const s = n.slice(1, -1).replace(/''/g, "'");
|
|
4320
|
-
return
|
|
4548
|
+
return Je(s);
|
|
4321
4549
|
}
|
|
4322
4550
|
return null;
|
|
4323
4551
|
}
|
|
@@ -4332,24 +4560,24 @@ END-ISO-10303-21;
|
|
|
4332
4560
|
if (!s) return null;
|
|
4333
4561
|
const i = e.entityIndex.byId.get(t);
|
|
4334
4562
|
if (!i) return null;
|
|
4335
|
-
const o = nt(s, i.byteOffset, i.byteOffset + i.byteLength),
|
|
4336
|
-
if (
|
|
4337
|
-
let l = 0, d = 0, u =
|
|
4338
|
-
for(let p =
|
|
4339
|
-
const
|
|
4340
|
-
if (
|
|
4341
|
-
else if (
|
|
4563
|
+
const o = nt(s, i.byteOffset, i.byteOffset + i.byteLength), c = o.indexOf("(");
|
|
4564
|
+
if (c === -1) return null;
|
|
4565
|
+
let l = 0, d = 0, u = c + 1, f = !1;
|
|
4566
|
+
for(let p = c + 1; p < o.length; p++){
|
|
4567
|
+
const g = o[p];
|
|
4568
|
+
if (g === "'" && !f) f = !0;
|
|
4569
|
+
else if (g === "'" && f) {
|
|
4342
4570
|
if (p + 1 < o.length && o[p + 1] === "'") {
|
|
4343
4571
|
p++;
|
|
4344
4572
|
continue;
|
|
4345
4573
|
}
|
|
4346
4574
|
f = !1;
|
|
4347
4575
|
} else if (!f) {
|
|
4348
|
-
if (
|
|
4349
|
-
else if (
|
|
4576
|
+
if (g === "(") l++;
|
|
4577
|
+
else if (g === ")") {
|
|
4350
4578
|
if (l === 0) return d === n ? o.substring(u, p).trim() : null;
|
|
4351
4579
|
l--;
|
|
4352
|
-
} else if (
|
|
4580
|
+
} else if (g === "," && l === 0) {
|
|
4353
4581
|
if (d === n) return o.substring(u, p).trim();
|
|
4354
4582
|
d++, u = p + 1;
|
|
4355
4583
|
}
|
|
@@ -4358,28 +4586,28 @@ END-ISO-10303-21;
|
|
|
4358
4586
|
return null;
|
|
4359
4587
|
}
|
|
4360
4588
|
};
|
|
4361
|
-
function
|
|
4589
|
+
function Pe(r, t) {
|
|
4362
4590
|
const e = new TextEncoder, n = e.encode(`${r}DATA;
|
|
4363
4591
|
`), s = e.encode(`ENDSEC;
|
|
4364
4592
|
END-ISO-10303-21;
|
|
4365
4593
|
`), i = e.encode(`
|
|
4366
4594
|
`);
|
|
4367
4595
|
let o = n.byteLength + s.byteLength;
|
|
4368
|
-
const
|
|
4369
|
-
for(let u = 0; u < t.length; u++)
|
|
4596
|
+
const c = new Array(t.length);
|
|
4597
|
+
for(let u = 0; u < t.length; u++)c[u] = e.encode(t[u]), o += c[u].byteLength + i.byteLength;
|
|
4370
4598
|
const l = new Uint8Array(o);
|
|
4371
4599
|
let d = 0;
|
|
4372
4600
|
l.set(n, d), d += n.byteLength;
|
|
4373
|
-
for(let u = 0; u <
|
|
4601
|
+
for(let u = 0; u < c.length; u++)l.set(c[u], d), d += c[u].byteLength, l.set(i, d), d += i.byteLength;
|
|
4374
4602
|
return l.set(s, d), l;
|
|
4375
4603
|
}
|
|
4376
|
-
let
|
|
4377
|
-
|
|
4604
|
+
let ee;
|
|
4605
|
+
ee = {
|
|
4378
4606
|
IFC_CORE: "https://ifcx.dev/@standards.buildingsmart.org/ifc/core/ifc@v5a.ifcx",
|
|
4379
4607
|
IFC_PROP: "https://ifcx.dev/@standards.buildingsmart.org/ifc/core/prop@v5a.ifcx",
|
|
4380
4608
|
USD: "https://ifcx.dev/@openusd.org/usd@v1.ifcx"
|
|
4381
4609
|
};
|
|
4382
|
-
|
|
4610
|
+
Be = new Set([
|
|
4383
4611
|
"UsageType",
|
|
4384
4612
|
"TypeName",
|
|
4385
4613
|
"IsExternal",
|
|
@@ -4398,7 +4626,7 @@ END-ISO-10303-21;
|
|
|
4398
4626
|
"CrossSectionArea",
|
|
4399
4627
|
"Station"
|
|
4400
4628
|
]);
|
|
4401
|
-
|
|
4629
|
+
hs = class {
|
|
4402
4630
|
dataStore;
|
|
4403
4631
|
mutationView;
|
|
4404
4632
|
geometryResult;
|
|
@@ -4414,58 +4642,58 @@ END-ISO-10303-21;
|
|
|
4414
4642
|
const e = this.dataStore.schemaVersion || "IFC4";
|
|
4415
4643
|
this.buildEntityMaps();
|
|
4416
4644
|
const n = this.buildMeshLookup(t), s = this.buildVisibleSet(t), i = t.onlyTreeEntities !== !1 ? this.buildTreeEntitySet() : null, o = [];
|
|
4417
|
-
let
|
|
4645
|
+
let c = 0, l = 0;
|
|
4418
4646
|
const { entities: d, strings: u } = this.dataStore;
|
|
4419
4647
|
let f = null;
|
|
4420
4648
|
for(let y = 0; y < d.count; y++){
|
|
4421
|
-
const
|
|
4422
|
-
if (s && !s.has(
|
|
4423
|
-
const
|
|
4424
|
-
|
|
4425
|
-
const
|
|
4649
|
+
const E = d.expressId[y];
|
|
4650
|
+
if (s && !s.has(E) || i && !i.has(E)) continue;
|
|
4651
|
+
const C = d.typeEnum[y], T = ie(C) || "IfcElement", $ = Ve(T.toUpperCase(), e, "IFC5"), x = rs($);
|
|
4652
|
+
x === "IfcProject" && (f = E);
|
|
4653
|
+
const Y = this.entityUuids.get(E) || ne(E), O = {};
|
|
4426
4654
|
O["bsi::ifc::class"] = {
|
|
4427
|
-
code:
|
|
4428
|
-
uri: `https://identifier.buildingsmart.org/uri/buildingsmart/ifc/5/class/${
|
|
4655
|
+
code: x,
|
|
4656
|
+
uri: `https://identifier.buildingsmart.org/uri/buildingsmart/ifc/5/class/${x}`
|
|
4429
4657
|
};
|
|
4430
|
-
const
|
|
4431
|
-
|
|
4432
|
-
const
|
|
4433
|
-
if (
|
|
4434
|
-
const
|
|
4435
|
-
for (const [
|
|
4658
|
+
const v = u.get(d.name[y]) || this.spatialNodeNames.get(E);
|
|
4659
|
+
v && (O["bsi::ifc::prop::Name"] = v);
|
|
4660
|
+
const b = u.get(d.description[y]);
|
|
4661
|
+
if (b && (O["bsi::ifc::prop::Description"] = b), t.includeProperties !== !1) {
|
|
4662
|
+
const m = this.getPropertiesForEntity(E, t);
|
|
4663
|
+
for (const [_, w] of Object.entries(m))O[_] = w, c++;
|
|
4436
4664
|
}
|
|
4437
|
-
const
|
|
4438
|
-
path:
|
|
4439
|
-
}, F = this.getChildrenForEntity(
|
|
4440
|
-
if (Object.keys(F).length > 0 && (
|
|
4441
|
-
const
|
|
4442
|
-
if (
|
|
4443
|
-
const
|
|
4444
|
-
O["usd::usdgeom::mesh"] =
|
|
4445
|
-
const [
|
|
4665
|
+
const S = {
|
|
4666
|
+
path: Y
|
|
4667
|
+
}, F = this.getChildrenForEntity(E);
|
|
4668
|
+
if (Object.keys(F).length > 0 && (S.children = F), t.includeGeometry !== !1) {
|
|
4669
|
+
const m = n.get(E);
|
|
4670
|
+
if (m && m.length > 0) {
|
|
4671
|
+
const _ = this.convertToUsdMesh(m);
|
|
4672
|
+
O["usd::usdgeom::mesh"] = _;
|
|
4673
|
+
const [w, I, R, N] = m[0].color;
|
|
4446
4674
|
O["bsi::ifc::presentation::diffuseColor"] = [
|
|
4447
|
-
|
|
4675
|
+
w,
|
|
4448
4676
|
I,
|
|
4449
4677
|
R
|
|
4450
|
-
],
|
|
4678
|
+
], N < 1 && (O["bsi::ifc::presentation::opacity"] = N), l++;
|
|
4451
4679
|
}
|
|
4452
4680
|
}
|
|
4453
|
-
Object.keys(O).length > 0 && (
|
|
4681
|
+
Object.keys(O).length > 0 && (S.attributes = O), o.push(S);
|
|
4454
4682
|
}
|
|
4455
4683
|
if (f !== null) {
|
|
4456
4684
|
const y = this.entityUuids.get(f);
|
|
4457
4685
|
if (y) {
|
|
4458
|
-
const
|
|
4686
|
+
const E = this.childNames.get(f) || u.get(d.name[this.findEntityIndex(f)]) || "Project", C = ne(0);
|
|
4459
4687
|
o.unshift({
|
|
4460
|
-
path:
|
|
4688
|
+
path: C,
|
|
4461
4689
|
children: {
|
|
4462
|
-
[
|
|
4690
|
+
[E]: y
|
|
4463
4691
|
},
|
|
4464
4692
|
attributes: {}
|
|
4465
4693
|
});
|
|
4466
4694
|
}
|
|
4467
4695
|
}
|
|
4468
|
-
const p =
|
|
4696
|
+
const p = is(o), g = {
|
|
4469
4697
|
header: {
|
|
4470
4698
|
id: `ifcx_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`,
|
|
4471
4699
|
ifcxVersion: "ifcx_alpha",
|
|
@@ -4476,12 +4704,12 @@ END-ISO-10303-21;
|
|
|
4476
4704
|
imports: p,
|
|
4477
4705
|
schemas: {},
|
|
4478
4706
|
data: o
|
|
4479
|
-
}, h = t.prettyPrint !== !1 ? JSON.stringify(
|
|
4707
|
+
}, h = t.prettyPrint !== !1 ? JSON.stringify(g, null, 2) : JSON.stringify(g);
|
|
4480
4708
|
return {
|
|
4481
4709
|
content: h,
|
|
4482
4710
|
stats: {
|
|
4483
4711
|
nodeCount: o.length,
|
|
4484
|
-
propertyCount:
|
|
4712
|
+
propertyCount: c,
|
|
4485
4713
|
meshCount: l,
|
|
4486
4714
|
fileSize: new TextEncoder().encode(h).length
|
|
4487
4715
|
}
|
|
@@ -4497,7 +4725,7 @@ END-ISO-10303-21;
|
|
|
4497
4725
|
this.entityUuids.clear();
|
|
4498
4726
|
for(let l = 0; l < e.count; l++){
|
|
4499
4727
|
const d = e.expressId[l], u = n.get(e.globalId[l]);
|
|
4500
|
-
this.entityUuids.set(d, u ||
|
|
4728
|
+
this.entityUuids.set(d, u || ne(d));
|
|
4501
4729
|
}
|
|
4502
4730
|
const s = new Map, i = (l, d)=>{
|
|
4503
4731
|
if (d) for (const u of d)s.set(u, l);
|
|
@@ -4524,19 +4752,19 @@ END-ISO-10303-21;
|
|
|
4524
4752
|
const d = e.expressId[l];
|
|
4525
4753
|
let u = n.get(e.name[l]) || "";
|
|
4526
4754
|
if (u || (u = this.spatialNodeNames.get(d) || ""), !u) {
|
|
4527
|
-
const f =
|
|
4755
|
+
const f = ie(e.typeEnum[l]);
|
|
4528
4756
|
f !== "Unknown" && (u = f);
|
|
4529
4757
|
}
|
|
4530
4758
|
o.set(d, u);
|
|
4531
4759
|
}
|
|
4532
|
-
const
|
|
4533
|
-
for (const [l, d] of s)
|
|
4760
|
+
const c = new Map;
|
|
4761
|
+
for (const [l, d] of s)c.has(d) || c.set(d, []), c.get(d).push(l);
|
|
4534
4762
|
for(let l = 0; l < e.count; l++){
|
|
4535
4763
|
const d = e.expressId[l];
|
|
4536
|
-
s.has(d) || (
|
|
4764
|
+
s.has(d) || (c.has(void 0) || c.set(void 0, []), c.get(void 0).push(d));
|
|
4537
4765
|
}
|
|
4538
4766
|
this.childNames.clear();
|
|
4539
|
-
for (const [, l] of
|
|
4767
|
+
for (const [, l] of c){
|
|
4540
4768
|
const d = new Map;
|
|
4541
4769
|
for (const u of l){
|
|
4542
4770
|
const p = (o.get(u) || `e${u}`).replace(/[/\\]/g, "_").replace(/\s+/g, "_");
|
|
@@ -4553,16 +4781,16 @@ END-ISO-10303-21;
|
|
|
4553
4781
|
if (this.mutationView && e.applyMutations !== !1) {
|
|
4554
4782
|
const s = this.mutationView.getForEntity(t);
|
|
4555
4783
|
for (const i of s)for (const o of i.properties){
|
|
4556
|
-
if (e.onlyKnownProperties !== !1 && !
|
|
4557
|
-
const
|
|
4558
|
-
n[
|
|
4784
|
+
if (e.onlyKnownProperties !== !1 && !Be.has(o.name)) continue;
|
|
4785
|
+
const c = `bsi::ifc::prop::${o.name}`;
|
|
4786
|
+
n[c] = this.convertPropertyValue(o.value, o.type);
|
|
4559
4787
|
}
|
|
4560
4788
|
} else if (this.dataStore.properties) {
|
|
4561
4789
|
const s = this.dataStore.properties.getForEntity(t);
|
|
4562
4790
|
for (const i of s)for (const o of i.properties){
|
|
4563
|
-
if (e.onlyKnownProperties !== !1 && !
|
|
4564
|
-
const
|
|
4565
|
-
n[
|
|
4791
|
+
if (e.onlyKnownProperties !== !1 && !Be.has(o.name)) continue;
|
|
4792
|
+
const c = `bsi::ifc::prop::${o.name}`;
|
|
4793
|
+
n[c] = this.convertPropertyValue(o.value, o.type);
|
|
4566
4794
|
}
|
|
4567
4795
|
}
|
|
4568
4796
|
return n;
|
|
@@ -4570,12 +4798,12 @@ END-ISO-10303-21;
|
|
|
4570
4798
|
convertPropertyValue(t, e) {
|
|
4571
4799
|
if (t == null) return null;
|
|
4572
4800
|
switch(e){
|
|
4573
|
-
case
|
|
4801
|
+
case et.Real:
|
|
4574
4802
|
return Number(t);
|
|
4575
|
-
case
|
|
4803
|
+
case et.Integer:
|
|
4576
4804
|
return Math.round(Number(t));
|
|
4577
|
-
case
|
|
4578
|
-
case
|
|
4805
|
+
case et.Boolean:
|
|
4806
|
+
case et.Logical:
|
|
4579
4807
|
return !!t;
|
|
4580
4808
|
default:
|
|
4581
4809
|
return t;
|
|
@@ -4583,10 +4811,10 @@ END-ISO-10303-21;
|
|
|
4583
4811
|
}
|
|
4584
4812
|
getChildrenForEntity(t) {
|
|
4585
4813
|
const e = {}, n = (o)=>{
|
|
4586
|
-
const
|
|
4587
|
-
if (!
|
|
4814
|
+
const c = this.entityUuids.get(o);
|
|
4815
|
+
if (!c) return;
|
|
4588
4816
|
const l = this.childNames.get(o) || `e${o}`;
|
|
4589
|
-
e[l] =
|
|
4817
|
+
e[l] = c;
|
|
4590
4818
|
}, s = this.spatialChildIds.get(t);
|
|
4591
4819
|
if (s) for (const o of s)n(o);
|
|
4592
4820
|
const { spatialHierarchy: i } = this.dataStore;
|
|
@@ -4597,7 +4825,7 @@ END-ISO-10303-21;
|
|
|
4597
4825
|
i.byStorey?.get(t),
|
|
4598
4826
|
i.bySpace?.get(t)
|
|
4599
4827
|
];
|
|
4600
|
-
for (const
|
|
4828
|
+
for (const c of o)if (c) for (const l of c)n(l);
|
|
4601
4829
|
}
|
|
4602
4830
|
return e;
|
|
4603
4831
|
}
|
|
@@ -4615,9 +4843,9 @@ END-ISO-10303-21;
|
|
|
4615
4843
|
let s = 0;
|
|
4616
4844
|
for (const i of t){
|
|
4617
4845
|
for(let o = 0; o < i.positions.length; o += 3){
|
|
4618
|
-
const
|
|
4846
|
+
const c = i.positions[o], l = i.positions[o + 1], d = i.positions[o + 2];
|
|
4619
4847
|
e.push([
|
|
4620
|
-
|
|
4848
|
+
c,
|
|
4621
4849
|
-d,
|
|
4622
4850
|
l
|
|
4623
4851
|
]);
|
|
@@ -4653,13 +4881,13 @@ END-ISO-10303-21;
|
|
|
4653
4881
|
if (!t.visibleOnly) return null;
|
|
4654
4882
|
const e = t.hiddenEntityIds ?? new Set, n = t.isolatedEntityIds ?? null, s = new Set, { entities: i } = this.dataStore;
|
|
4655
4883
|
for(let o = 0; o < i.count; o++){
|
|
4656
|
-
const
|
|
4657
|
-
n ? n.has(
|
|
4884
|
+
const c = i.expressId[o];
|
|
4885
|
+
n ? n.has(c) && s.add(c) : e.has(c) || s.add(c);
|
|
4658
4886
|
}
|
|
4659
4887
|
return s;
|
|
4660
4888
|
}
|
|
4661
4889
|
};
|
|
4662
|
-
function
|
|
4890
|
+
function is(r) {
|
|
4663
4891
|
let t = !1, e = !1, n = !1;
|
|
4664
4892
|
for (const i of r)if (i.attributes) {
|
|
4665
4893
|
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;
|
|
@@ -4667,21 +4895,21 @@ END-ISO-10303-21;
|
|
|
4667
4895
|
}
|
|
4668
4896
|
const s = [];
|
|
4669
4897
|
return t && s.push({
|
|
4670
|
-
uri:
|
|
4898
|
+
uri: ee.IFC_CORE
|
|
4671
4899
|
}), e && s.push({
|
|
4672
|
-
uri:
|
|
4900
|
+
uri: ee.IFC_PROP
|
|
4673
4901
|
}), n && s.push({
|
|
4674
|
-
uri:
|
|
4902
|
+
uri: ee.USD
|
|
4675
4903
|
}), s;
|
|
4676
4904
|
}
|
|
4677
|
-
function
|
|
4905
|
+
function ne(r) {
|
|
4678
4906
|
return `00000000-0000-4000-8000-${r.toString(16).padStart(12, "0")}`;
|
|
4679
4907
|
}
|
|
4680
|
-
function
|
|
4681
|
-
const t =
|
|
4908
|
+
function rs(r) {
|
|
4909
|
+
const t = Ke(r), e = ie(t);
|
|
4682
4910
|
if (e !== "Unknown") return e;
|
|
4683
4911
|
const n = r.toLowerCase();
|
|
4684
4912
|
return n.startsWith("ifc") ? "Ifc" + n.charAt(3).toUpperCase() + n.slice(4) : r;
|
|
4685
4913
|
}
|
|
4686
4914
|
});
|
|
4687
|
-
export {
|
|
4915
|
+
export { ds as C, ls as G, Be as I, us as M, ts as S, Ge as _, cs as a, En as b, hs as c, oe as d, fs as e, as as g, __tla };
|