@thatopen/components 2.1.14 → 2.1.16
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/dist/core/Components/index.d.ts +1 -1
- package/dist/fragments/FragmentsManager/index.d.ts +2 -0
- package/dist/ifc/IfcRelationsIndexer/src/types.d.ts +5 -1
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +136 -117
- package/dist/namespace.d.ts +1954 -1948
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import * as O from "three";
|
|
|
5
5
|
import { BufferAttribute as Pn, Vector3 as M, Vector2 as fe, Plane as Fi, Line3 as Lt, Triangle as ue, Sphere as Zn, Matrix4 as yt, Box3 as gt, BackSide as Qn, DoubleSide as Ln, FrontSide as wi, Mesh as v, Ray as jn, Raycaster as qn, Quaternion as Pt, Object3D as ri, Euler as Kn, MeshBasicMaterial as yn, LineBasicMaterial as $n, CylinderGeometry as ct, BoxGeometry as rt, BufferGeometry as Di, Float32BufferAttribute as Ui, OctahedronGeometry as Ze, Line as Dt, SphereGeometry as Jn, TorusGeometry as Re, PlaneGeometry as to } from "three";
|
|
6
6
|
import * as Vt from "@thatopen/fragments";
|
|
7
7
|
import { Serializer as eo } from "@thatopen/fragments";
|
|
8
|
-
import * as
|
|
8
|
+
import * as U from "web-ifc";
|
|
9
9
|
const Mn = 0, so = 1, io = 2, xi = 2, Ys = 1.25, bi = 1, Cs = 6 * 4 + 4 + 4, Us = 65535, no = Math.pow(2, -24), Vs = Symbol("SKIP_GENERATION");
|
|
10
10
|
function oo(l) {
|
|
11
11
|
return l.index ? l.index.count : l.attributes.position.count;
|
|
@@ -99,7 +99,7 @@ function Gs(l, s, t, e, i = null) {
|
|
|
99
99
|
g < o && (o = g), S > a && (a = S), C && p < d && (d = p), C && p > f && (f = p);
|
|
100
100
|
const _ = l[A + 2], N = l[A + 3], L = _ - N, D = _ + N;
|
|
101
101
|
L < n && (n = L), D > c && (c = D), C && _ < E && (E = _), C && _ > T && (T = _);
|
|
102
|
-
const y = l[A + 4],
|
|
102
|
+
const y = l[A + 4], x = l[A + 5], b = y - x, B = y + x;
|
|
103
103
|
b < r && (r = b), B > h && (h = B), C && y < u && (u = y), C && y > R && (R = y);
|
|
104
104
|
}
|
|
105
105
|
e[0] = o, e[1] = n, e[2] = r, e[3] = a, e[4] = c, e[5] = h, C && (i[0] = d, i[1] = E, i[2] = u, i[3] = f, i[4] = T, i[5] = R);
|
|
@@ -319,9 +319,9 @@ function mo(l, s) {
|
|
|
319
319
|
A(m + g), p.offset = m, p.count = g;
|
|
320
320
|
else {
|
|
321
321
|
p.splitAxis = N.axis;
|
|
322
|
-
const D = new qe(), y = m,
|
|
323
|
-
p.left = D, D.boundingData = new Float32Array(6), Gs(f, y,
|
|
324
|
-
const b = new qe(), B = L, H = g -
|
|
322
|
+
const D = new qe(), y = m, x = L - m;
|
|
323
|
+
p.left = D, D.boundingData = new Float32Array(6), Gs(f, y, x, D.boundingData, u), F(D, y, x, u, _ + 1);
|
|
324
|
+
const b = new qe(), B = L, H = g - x;
|
|
325
325
|
p.right = b, b.boundingData = new Float32Array(6), Gs(f, B, H, b.boundingData, u), F(b, B, H, u, _ + 1);
|
|
326
326
|
}
|
|
327
327
|
return p;
|
|
@@ -553,8 +553,8 @@ Ft.prototype.intersectsTriangle = function() {
|
|
|
553
553
|
if (g !== 2)
|
|
554
554
|
return !1;
|
|
555
555
|
if (d.delta(r), E.delta(a), r.dot(a) < 0) {
|
|
556
|
-
let
|
|
557
|
-
E.start = E.end, E.end =
|
|
556
|
+
let x = E.start;
|
|
557
|
+
E.start = E.end, E.end = x;
|
|
558
558
|
}
|
|
559
559
|
const S = d.start.dot(r), _ = d.end.dot(r), N = E.start.dot(r), L = E.end.dot(r), D = _ < N, y = S < L;
|
|
560
560
|
return S !== L && N !== _ && D === y ? !1 : (C && (c.subVectors(d.start, E.start), c.dot(r) > 0 ? C.start.copy(d.start) : C.start.copy(E.start), c.subVectors(d.end, E.end), c.dot(r) < 0 ? C.end.copy(d.end) : C.end.copy(E.end)), !0);
|
|
@@ -697,7 +697,7 @@ at.prototype.distanceToBox = function() {
|
|
|
697
697
|
for (let A = 0; A <= 1; A++) {
|
|
698
698
|
const F = (R + 1) % 3, p = (R + 2) % 3, m = C << F | A << p, g = 1 << R | C << F | A << p, S = u[m], _ = u[g];
|
|
699
699
|
s[T].set(S, _);
|
|
700
|
-
const L = l[R], D = l[F], y = l[p],
|
|
700
|
+
const L = l[R], D = l[F], y = l[p], x = t[T], b = x.start, B = x.end;
|
|
701
701
|
b[L] = d[L], b[D] = C ? d[D] : E[D], b[y] = A ? d[y] : E[D], B[L] = E[L], B[D] = C ? d[D] : E[D], B[y] = A ? d[y] : E[D], T++;
|
|
702
702
|
}
|
|
703
703
|
for (let R = 0; R <= 1; R++)
|
|
@@ -787,17 +787,17 @@ function ai(l, s, t, e, i = null, o = 0, n = 0) {
|
|
|
787
787
|
return K(l, r, Yt), e(E, u, !1, n, o + l, Yt);
|
|
788
788
|
} else {
|
|
789
789
|
let L = function(y) {
|
|
790
|
-
const { uint16Array:
|
|
790
|
+
const { uint16Array: x, uint32Array: b } = Z;
|
|
791
791
|
let B = y * 2;
|
|
792
|
-
for (; !Et(B,
|
|
792
|
+
for (; !Et(B, x); )
|
|
793
793
|
y = pt(y), B = y * 2;
|
|
794
794
|
return dt(y, b);
|
|
795
795
|
}, D = function(y) {
|
|
796
|
-
const { uint16Array:
|
|
796
|
+
const { uint16Array: x, uint32Array: b } = Z;
|
|
797
797
|
let B = y * 2;
|
|
798
|
-
for (; !Et(B,
|
|
798
|
+
for (; !Et(B, x); )
|
|
799
799
|
y = Ct(y, b), B = y * 2;
|
|
800
|
-
return dt(y, b) + ft(B,
|
|
800
|
+
return dt(y, b) + ft(B, x);
|
|
801
801
|
};
|
|
802
802
|
const E = pt(l), u = Ct(l, c);
|
|
803
803
|
let f = E, T = u, R, C, A, F;
|
|
@@ -936,8 +936,8 @@ function Do(l, s = null) {
|
|
|
936
936
|
let F = 1 / 0, p = 1 / 0, m = 1 / 0, g = -1 / 0, S = -1 / 0, _ = -1 / 0;
|
|
937
937
|
for (let N = 3 * C, L = 3 * (C + A); N < L; N++) {
|
|
938
938
|
let D = e[N];
|
|
939
|
-
const y = i.getX(D),
|
|
940
|
-
y < F && (F = y), y > g && (g = y),
|
|
939
|
+
const y = i.getX(D), x = i.getY(D), b = i.getZ(D);
|
|
940
|
+
y < F && (F = y), y > g && (g = y), x < p && (p = x), x > S && (S = x), b < m && (m = b), b > _ && (_ = b);
|
|
941
941
|
}
|
|
942
942
|
return a[E + 0] !== F || a[E + 1] !== p || a[E + 2] !== m || a[E + 3] !== g || a[E + 4] !== S || a[E + 5] !== _ ? (a[E + 0] = F, a[E + 1] = p, a[E + 2] = m, a[E + 3] = g, a[E + 4] = S, a[E + 5] = _, !0) : !1;
|
|
943
943
|
} else {
|
|
@@ -951,9 +951,9 @@ function Do(l, s = null) {
|
|
|
951
951
|
N && (D = d(A, u, m));
|
|
952
952
|
const y = L || D;
|
|
953
953
|
if (y)
|
|
954
|
-
for (let
|
|
955
|
-
const b = C +
|
|
956
|
-
a[E +
|
|
954
|
+
for (let x = 0; x < 3; x++) {
|
|
955
|
+
const b = C + x, B = A + x, H = a[b], q = a[b + 3], st = a[B], Q = a[B + 3];
|
|
956
|
+
a[E + x] = H < st ? H : st, a[E + x + 3] = q > Q ? q : Q;
|
|
957
957
|
}
|
|
958
958
|
return y;
|
|
959
959
|
}
|
|
@@ -1085,7 +1085,7 @@ function ko(l, s, t, e = {}, i = {}, o = 0, n = 1 / 0) {
|
|
|
1085
1085
|
intersectsRange: (_, N) => {
|
|
1086
1086
|
for (let L = _, D = _ + N; L < D; L++) {
|
|
1087
1087
|
tt(u, 3 * L, d, h), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
1088
|
-
for (let y = m,
|
|
1088
|
+
for (let y = m, x = m + g; y < x; y++) {
|
|
1089
1089
|
tt(E, 3 * y, c, a), E.needsUpdate = !0;
|
|
1090
1090
|
const b = E.distanceToTriangle(u, f, R);
|
|
1091
1091
|
if (b < A && (T.copy(f), C && C.copy(R), A = b, F = y, p = L), b < o)
|
|
@@ -1125,9 +1125,9 @@ function Xo(l, s = null) {
|
|
|
1125
1125
|
for (let N = C, L = C + A; N < L; N++) {
|
|
1126
1126
|
const D = 3 * l.resolveTriangleIndex(N);
|
|
1127
1127
|
for (let y = 0; y < 3; y++) {
|
|
1128
|
-
let
|
|
1129
|
-
|
|
1130
|
-
const b = i.getX(
|
|
1128
|
+
let x = D + y;
|
|
1129
|
+
x = e ? e[x] : x;
|
|
1130
|
+
const b = i.getX(x), B = i.getY(x), H = i.getZ(x);
|
|
1131
1131
|
b < F && (F = b), b > g && (g = b), B < p && (p = B), B > S && (S = B), H < m && (m = H), H > _ && (_ = H);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
@@ -1143,9 +1143,9 @@ function Xo(l, s = null) {
|
|
|
1143
1143
|
N && (D = d(A, u, m));
|
|
1144
1144
|
const y = L || D;
|
|
1145
1145
|
if (y)
|
|
1146
|
-
for (let
|
|
1147
|
-
const b = C +
|
|
1148
|
-
a[E +
|
|
1146
|
+
for (let x = 0; x < 3; x++) {
|
|
1147
|
+
const b = C + x, B = A + x, H = a[b], q = a[b + 3], st = a[B], Q = a[B + 3];
|
|
1148
|
+
a[E + x] = H < st ? H : st, a[E + x + 3] = q > Q ? q : Q;
|
|
1149
1149
|
}
|
|
1150
1150
|
return y;
|
|
1151
1151
|
}
|
|
@@ -1251,11 +1251,11 @@ function er(l, s, t, e = {}, i = {}, o = 0, n = 1 / 0) {
|
|
|
1251
1251
|
for (let L = _, D = _ + N; L < D; L++) {
|
|
1252
1252
|
const y = S.resolveTriangleIndex(L);
|
|
1253
1253
|
tt(u, 3 * y, d, h), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
1254
|
-
for (let
|
|
1255
|
-
const B = l.resolveTriangleIndex(
|
|
1254
|
+
for (let x = m, b = m + g; x < b; x++) {
|
|
1255
|
+
const B = l.resolveTriangleIndex(x);
|
|
1256
1256
|
tt(E, 3 * B, c, a), E.needsUpdate = !0;
|
|
1257
1257
|
const H = E.distanceToTriangle(u, f, R);
|
|
1258
|
-
if (H < A && (T.copy(f), C && C.copy(R), A = H, F =
|
|
1258
|
+
if (H < A && (T.copy(f), C && C.copy(R), A = H, F = x, p = L), H < o)
|
|
1259
1259
|
return !0;
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
@@ -1268,8 +1268,8 @@ function er(l, s, t, e = {}, i = {}, o = 0, n = 1 / 0) {
|
|
|
1268
1268
|
for (let L = m, D = m + g; L < D; L++) {
|
|
1269
1269
|
const y = l.resolveTriangleIndex(L);
|
|
1270
1270
|
tt(E, 3 * y, c, a), E.needsUpdate = !0;
|
|
1271
|
-
const
|
|
1272
|
-
if (
|
|
1271
|
+
const x = E.distanceToTriangle(u, f, R);
|
|
1272
|
+
if (x < A && (T.copy(f), C && C.copy(R), A = x, F = L, p = _), x < o)
|
|
1273
1273
|
return !0;
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
@@ -1416,12 +1416,12 @@ function Tt(l, s, t, e, i, o = 0, n = 0, r = 0, a = 0, c = null, h = !1) {
|
|
|
1416
1416
|
else {
|
|
1417
1417
|
const y = vt.getPrimitive();
|
|
1418
1418
|
y.copy(Xs).applyMatrix4(t);
|
|
1419
|
-
const
|
|
1420
|
-
K(
|
|
1419
|
+
const x = pt(l), b = Ct(l, f);
|
|
1420
|
+
K(x, u, ae), K(b, u, ce);
|
|
1421
1421
|
const B = y.intersectsBox(ae), H = y.intersectsBox(ce);
|
|
1422
1422
|
S = B && Tt(
|
|
1423
1423
|
_,
|
|
1424
|
-
|
|
1424
|
+
x,
|
|
1425
1425
|
e,
|
|
1426
1426
|
t,
|
|
1427
1427
|
i,
|
|
@@ -1463,12 +1463,12 @@ function Tt(l, s, t, e, i, o = 0, n = 0, r = 0, a = 0, c = null, h = !1) {
|
|
|
1463
1463
|
else {
|
|
1464
1464
|
const y = vt.getPrimitive();
|
|
1465
1465
|
y.copy(Zs).applyMatrix4(t);
|
|
1466
|
-
const
|
|
1467
|
-
K(
|
|
1466
|
+
const x = pt(l), b = Ct(l, f);
|
|
1467
|
+
K(x, u, ae), K(b, u, ce);
|
|
1468
1468
|
const B = y.intersectsBox(ae), H = y.intersectsBox(ce);
|
|
1469
1469
|
S = B && Tt(
|
|
1470
1470
|
N,
|
|
1471
|
-
|
|
1471
|
+
x,
|
|
1472
1472
|
e,
|
|
1473
1473
|
t,
|
|
1474
1474
|
i,
|
|
@@ -2453,14 +2453,14 @@ function mr(l) {
|
|
|
2453
2453
|
g.elements[0] = R, g.elements[1] = C, g.elements[2] = A, g.elements[3] = C, g.elements[4] = F, g.elements[5] = p, g.elements[6] = A, g.elements[7] = p, g.elements[8] = m, Tr(g, e);
|
|
2454
2454
|
const S = e.unitary, _ = new O.Vector3(), N = new O.Vector3(), L = new O.Vector3();
|
|
2455
2455
|
S.extractBasis(_, N, L);
|
|
2456
|
-
let D = -1 / 0, y = -1 / 0,
|
|
2456
|
+
let D = -1 / 0, y = -1 / 0, x = -1 / 0, b = 1 / 0, B = 1 / 0, H = 1 / 0;
|
|
2457
2457
|
for (let it = 0, Xt = s.length; it < Xt; it++) {
|
|
2458
2458
|
const J = s[it];
|
|
2459
|
-
D = Math.max(_.dot(J), D), y = Math.max(N.dot(J), y),
|
|
2459
|
+
D = Math.max(_.dot(J), D), y = Math.max(N.dot(J), y), x = Math.max(L.dot(J), x), b = Math.min(_.dot(J), b), B = Math.min(N.dot(J), B), H = Math.min(L.dot(J), H);
|
|
2460
2460
|
}
|
|
2461
|
-
_.multiplyScalar(0.5 * (b + D)), N.multiplyScalar(0.5 * (B + y)), L.multiplyScalar(0.5 * (H +
|
|
2461
|
+
_.multiplyScalar(0.5 * (b + D)), N.multiplyScalar(0.5 * (B + y)), L.multiplyScalar(0.5 * (H + x));
|
|
2462
2462
|
const q = new O.Vector3(), st = new O.Vector3(), Q = new O.Matrix3();
|
|
2463
|
-
q.add(_).add(N).add(L), st.x = D - b, st.y = y - B, st.z =
|
|
2463
|
+
q.add(_).add(N).add(L), st.x = D - b, st.y = y - B, st.z = x - H, st.multiplyScalar(0.5), Q.copy(S);
|
|
2464
2464
|
const { x: Ht, y: Wt, z: kt } = st, ke = new O.Matrix4();
|
|
2465
2465
|
ke.makeScale(Ht * 2, Wt * 2, kt * 2);
|
|
2466
2466
|
const Te = new O.Matrix4();
|
|
@@ -3015,7 +3015,7 @@ const Fs = class Fs {
|
|
|
3015
3015
|
/**
|
|
3016
3016
|
* The version of the @thatopen/components library.
|
|
3017
3017
|
*/
|
|
3018
|
-
I(Fs, "release", "2.1.
|
|
3018
|
+
I(Fs, "release", "2.1.16");
|
|
3019
3019
|
let pi = Fs;
|
|
3020
3020
|
class Ar {
|
|
3021
3021
|
constructor(s) {
|
|
@@ -3497,8 +3497,8 @@ function rn(l, s, t, e, i = 1 / 0, o, n) {
|
|
|
3497
3497
|
h = l.x - u, d = l.y - f, E = l.z - T;
|
|
3498
3498
|
const g = (t.x + r * u) * o, S = (t.y + r * f) * o, _ = (t.z + r * T) * o;
|
|
3499
3499
|
t.x = (t.x - r * g) * c, t.y = (t.y - r * S) * c, t.z = (t.z - r * _) * c, n.x = h + (u + g) * c, n.y = d + (f + S) * c, n.z = E + (T + _) * c;
|
|
3500
|
-
const N = R - l.x, L = C - l.y, D = A - l.z, y = n.x - R,
|
|
3501
|
-
return N * y + L *
|
|
3500
|
+
const N = R - l.x, L = C - l.y, D = A - l.z, y = n.x - R, x = n.y - C, b = n.z - A;
|
|
3501
|
+
return N * y + L * x + D * b > 0 && (n.x = R, n.y = C, n.z = A, t.x = (n.x - R) / o, t.y = (n.y - C) / o, t.z = (n.z - A) / o), n;
|
|
3502
3502
|
}
|
|
3503
3503
|
function $s(l, s) {
|
|
3504
3504
|
s.set(0, 0), l.forEach((t) => {
|
|
@@ -3858,8 +3858,8 @@ class ot extends Or {
|
|
|
3858
3858
|
if ((this._state & P.TOUCH_DOLLY) === P.TOUCH_DOLLY || (this._state & P.TOUCH_ZOOM) === P.TOUCH_ZOOM || (this._state & P.TOUCH_DOLLY_TRUCK) === P.TOUCH_DOLLY_TRUCK || (this._state & P.TOUCH_ZOOM_TRUCK) === P.TOUCH_ZOOM_TRUCK || (this._state & P.TOUCH_DOLLY_OFFSET) === P.TOUCH_DOLLY_OFFSET || (this._state & P.TOUCH_ZOOM_OFFSET) === P.TOUCH_ZOOM_OFFSET || (this._state & P.TOUCH_DOLLY_ROTATE) === P.TOUCH_DOLLY_ROTATE || (this._state & P.TOUCH_ZOOM_ROTATE) === P.TOUCH_ZOOM_ROTATE) {
|
|
3859
3859
|
const _ = lt.x - this._activePointers[1].clientX, N = lt.y - this._activePointers[1].clientY, L = Math.sqrt(_ * _ + N * N), D = o.y - L;
|
|
3860
3860
|
o.set(0, L);
|
|
3861
|
-
const y = this.dollyToCursor ? (i.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0,
|
|
3862
|
-
(this._state & P.TOUCH_DOLLY) === P.TOUCH_DOLLY || (this._state & P.TOUCH_DOLLY_ROTATE) === P.TOUCH_DOLLY_ROTATE || (this._state & P.TOUCH_DOLLY_TRUCK) === P.TOUCH_DOLLY_TRUCK || (this._state & P.TOUCH_DOLLY_OFFSET) === P.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(D * Es, y,
|
|
3861
|
+
const y = this.dollyToCursor ? (i.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, x = this.dollyToCursor ? (i.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
|
3862
|
+
(this._state & P.TOUCH_DOLLY) === P.TOUCH_DOLLY || (this._state & P.TOUCH_DOLLY_ROTATE) === P.TOUCH_DOLLY_ROTATE || (this._state & P.TOUCH_DOLLY_TRUCK) === P.TOUCH_DOLLY_TRUCK || (this._state & P.TOUCH_DOLLY_OFFSET) === P.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(D * Es, y, x), this._isUserControllingDolly = !0) : (this._zoomInternal(D * Es, y, x), this._isUserControllingZoom = !0);
|
|
3863
3863
|
}
|
|
3864
3864
|
((this._state & P.TRUCK) === P.TRUCK || (this._state & P.TOUCH_TRUCK) === P.TOUCH_TRUCK || (this._state & P.TOUCH_DOLLY_TRUCK) === P.TOUCH_DOLLY_TRUCK || (this._state & P.TOUCH_ZOOM_TRUCK) === P.TOUCH_ZOOM_TRUCK) && (this._truckInternal(g, S, !1), this._isUserControllingTruck = !0), ((this._state & P.OFFSET) === P.OFFSET || (this._state & P.TOUCH_OFFSET) === P.TOUCH_OFFSET || (this._state & P.TOUCH_DOLLY_OFFSET) === P.TOUCH_DOLLY_OFFSET || (this._state & P.TOUCH_ZOOM_OFFSET) === P.TOUCH_ZOOM_OFFSET) && (this._truckInternal(g, S, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
|
3865
3865
|
}, C = () => {
|
|
@@ -5582,7 +5582,7 @@ class xr extends ri {
|
|
|
5582
5582
|
XYZ: [
|
|
5583
5583
|
[new v(new rt(0.2, 0.2, 0.2), e), [0, 0, 0]]
|
|
5584
5584
|
]
|
|
5585
|
-
},
|
|
5585
|
+
}, x = {
|
|
5586
5586
|
X: [
|
|
5587
5587
|
[new Dt(C, i.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
|
|
5588
5588
|
],
|
|
@@ -5604,7 +5604,7 @@ class xr extends ri {
|
|
|
5604
5604
|
}
|
|
5605
5605
|
return H;
|
|
5606
5606
|
}
|
|
5607
|
-
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = b(m)), this.add(this.gizmo.rotate = b(_)), this.add(this.gizmo.scale = b(D)), this.add(this.picker.translate = b(g)), this.add(this.picker.rotate = b(L)), this.add(this.picker.scale = b(y)), this.add(this.helper.translate = b(S)), this.add(this.helper.rotate = b(N)), this.add(this.helper.scale = b(
|
|
5607
|
+
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = b(m)), this.add(this.gizmo.rotate = b(_)), this.add(this.gizmo.scale = b(D)), this.add(this.picker.translate = b(g)), this.add(this.picker.rotate = b(L)), this.add(this.picker.scale = b(y)), this.add(this.helper.translate = b(S)), this.add(this.helper.rotate = b(N)), this.add(this.helper.scale = b(x)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
|
|
5608
5608
|
}
|
|
5609
5609
|
// updateMatrixWorld will update transformations and appearance of individual handles
|
|
5610
5610
|
updateMatrixWorld(s) {
|
|
@@ -6915,60 +6915,74 @@ class aa extends We {
|
|
|
6915
6915
|
}
|
|
6916
6916
|
const Zr = /* @__PURE__ */ new Map([
|
|
6917
6917
|
[
|
|
6918
|
-
|
|
6918
|
+
U.IFCRELAGGREGATES,
|
|
6919
6919
|
{
|
|
6920
6920
|
forRelating: "IsDecomposedBy",
|
|
6921
6921
|
forRelated: "Decomposes"
|
|
6922
6922
|
}
|
|
6923
6923
|
],
|
|
6924
6924
|
[
|
|
6925
|
-
|
|
6925
|
+
U.IFCRELASSOCIATESMATERIAL,
|
|
6926
6926
|
{
|
|
6927
6927
|
forRelating: "AssociatedTo",
|
|
6928
6928
|
forRelated: "HasAssociations"
|
|
6929
6929
|
}
|
|
6930
6930
|
],
|
|
6931
6931
|
[
|
|
6932
|
-
|
|
6932
|
+
U.IFCRELASSOCIATESCLASSIFICATION,
|
|
6933
6933
|
{
|
|
6934
6934
|
forRelating: "ClassificationForObjects",
|
|
6935
6935
|
forRelated: "HasAssociations"
|
|
6936
6936
|
}
|
|
6937
6937
|
],
|
|
6938
6938
|
[
|
|
6939
|
-
|
|
6939
|
+
U.IFCRELASSIGNSTOGROUP,
|
|
6940
6940
|
{
|
|
6941
6941
|
forRelating: "IsGroupedBy",
|
|
6942
6942
|
forRelated: "HasAssignments"
|
|
6943
6943
|
}
|
|
6944
6944
|
],
|
|
6945
6945
|
[
|
|
6946
|
-
|
|
6946
|
+
U.IFCRELDEFINESBYPROPERTIES,
|
|
6947
6947
|
{
|
|
6948
6948
|
forRelated: "IsDefinedBy",
|
|
6949
6949
|
forRelating: "DefinesOcurrence"
|
|
6950
6950
|
}
|
|
6951
6951
|
],
|
|
6952
6952
|
[
|
|
6953
|
-
|
|
6953
|
+
U.IFCRELDEFINESBYTYPE,
|
|
6954
6954
|
{
|
|
6955
6955
|
forRelated: "IsTypedBy",
|
|
6956
6956
|
forRelating: "Types"
|
|
6957
6957
|
}
|
|
6958
6958
|
],
|
|
6959
6959
|
[
|
|
6960
|
-
|
|
6960
|
+
U.IFCRELDEFINESBYTEMPLATE,
|
|
6961
6961
|
{
|
|
6962
6962
|
forRelated: "IsDefinedBy",
|
|
6963
6963
|
forRelating: "Defines"
|
|
6964
6964
|
}
|
|
6965
6965
|
],
|
|
6966
6966
|
[
|
|
6967
|
-
|
|
6967
|
+
U.IFCRELCONTAINEDINSPATIALSTRUCTURE,
|
|
6968
6968
|
{
|
|
6969
6969
|
forRelated: "ContainedInStructure",
|
|
6970
6970
|
forRelating: "ContainsElements"
|
|
6971
6971
|
}
|
|
6972
|
+
],
|
|
6973
|
+
[
|
|
6974
|
+
U.IFCRELFLOWCONTROLELEMENTS,
|
|
6975
|
+
{
|
|
6976
|
+
forRelated: "AssignedToFlowElement",
|
|
6977
|
+
forRelating: "HasControlElements"
|
|
6978
|
+
}
|
|
6979
|
+
],
|
|
6980
|
+
[
|
|
6981
|
+
U.IFCRELCONNECTSELEMENTS,
|
|
6982
|
+
{
|
|
6983
|
+
forRelated: "ConnectedFrom",
|
|
6984
|
+
forRelating: "ConnectedTo"
|
|
6985
|
+
}
|
|
6972
6986
|
]
|
|
6973
6987
|
]), Ve = class Ve extends et {
|
|
6974
6988
|
constructor(t) {
|
|
@@ -7010,17 +7024,21 @@ const Zr = /* @__PURE__ */ new Map([
|
|
|
7010
7024
|
"Types",
|
|
7011
7025
|
"Defines",
|
|
7012
7026
|
"ContainedInStructure",
|
|
7013
|
-
"ContainsElements"
|
|
7027
|
+
"ContainsElements",
|
|
7028
|
+
"HasControlElements",
|
|
7029
|
+
"AssignedToFlowElement",
|
|
7030
|
+
"ConnectedTo",
|
|
7031
|
+
"ConnectedFrom"
|
|
7014
7032
|
]);
|
|
7015
7033
|
I(this, "_ifcRels", [
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7034
|
+
U.IFCRELAGGREGATES,
|
|
7035
|
+
U.IFCRELASSOCIATESMATERIAL,
|
|
7036
|
+
U.IFCRELASSOCIATESCLASSIFICATION,
|
|
7037
|
+
U.IFCRELASSIGNSTOGROUP,
|
|
7038
|
+
U.IFCRELDEFINESBYPROPERTIES,
|
|
7039
|
+
U.IFCRELDEFINESBYTYPE,
|
|
7040
|
+
U.IFCRELDEFINESBYTEMPLATE,
|
|
7041
|
+
U.IFCRELCONTAINEDINSPATIALSTRUCTURE
|
|
7024
7042
|
]);
|
|
7025
7043
|
I(this, "onFragmentsDisposed", (t) => {
|
|
7026
7044
|
delete this.relationMaps[t.groupID];
|
|
@@ -7364,13 +7382,14 @@ const Ns = class Ns extends et {
|
|
|
7364
7382
|
* Loads a binary file that contain fragment geometry.
|
|
7365
7383
|
* @param data - The binary data to load.
|
|
7366
7384
|
* @param config - Optional configuration for loading.
|
|
7385
|
+
* @param config.isStreamed - Optional setting to determine whether this model is streamed or not.
|
|
7367
7386
|
* @param config.coordinate - Whether to apply coordinate transformation. Default is true.
|
|
7368
7387
|
* @param config.properties - Ifc properties to set on the loaded fragments. Not to be used when streaming.
|
|
7369
7388
|
* @returns The loaded FragmentsGroup.
|
|
7370
7389
|
*/
|
|
7371
7390
|
load(t, e) {
|
|
7372
7391
|
const o = { ...{ coordinate: !0 }, ...e }, { coordinate: n, name: r, properties: a, relationsMap: c } = o, h = this._loader.import(t);
|
|
7373
|
-
r && (h.name = r);
|
|
7392
|
+
e && (h.isStreamed = e.isStreamed || !1), r && (h.name = r);
|
|
7374
7393
|
for (const d of h.items)
|
|
7375
7394
|
d.group = h, this.list.set(d.id, d);
|
|
7376
7395
|
return n && this.coordinate([h]), this.groups.set(h.uuid, h), a && h.setLocalProperties(a), c && this.components.get(pe).setRelationMap(h, c), this.onFragmentsLoaded.trigger(h), h;
|
|
@@ -7893,11 +7912,11 @@ const vn = /* @__PURE__ */ new Set([
|
|
|
7893
7912
|
*/
|
|
7894
7913
|
async export(t, e, i = !1, o = !0) {
|
|
7895
7914
|
const n = {}, r = new Set(t.GetIfcEntityList(e)), a = /* @__PURE__ */ new Set([
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7915
|
+
U.IFCPROJECT,
|
|
7916
|
+
U.IFCSITE,
|
|
7917
|
+
U.IFCBUILDING,
|
|
7918
|
+
U.IFCBUILDINGSTOREY,
|
|
7919
|
+
U.IFCSPACE
|
|
7901
7920
|
]);
|
|
7902
7921
|
for (const c of a)
|
|
7903
7922
|
r.add(c);
|
|
@@ -9214,7 +9233,7 @@ const Bn = {
|
|
|
9214
9233
|
class Kt {
|
|
9215
9234
|
static async getUnits(s) {
|
|
9216
9235
|
var n, r, a;
|
|
9217
|
-
const { IFCUNITASSIGNMENT: t } =
|
|
9236
|
+
const { IFCUNITASSIGNMENT: t } = U, e = await s.getAllPropertiesOfType(t);
|
|
9218
9237
|
if (!e)
|
|
9219
9238
|
return 1;
|
|
9220
9239
|
const i = Object.keys(e), o = e[parseInt(i[0], 10)];
|
|
@@ -9265,19 +9284,19 @@ class Kt {
|
|
|
9265
9284
|
static async getQsetQuantities(s, t, e) {
|
|
9266
9285
|
const o = e ?? (() => {
|
|
9267
9286
|
}), n = await s.getProperties(t);
|
|
9268
|
-
return !n || n.type !==
|
|
9287
|
+
return !n || n.type !== U.IFCELEMENTQUANTITY ? null : (n.Quantities ?? [{}]).map((c) => (c.value && o(c.value), c.value)).filter((c) => c !== null);
|
|
9269
9288
|
}
|
|
9270
9289
|
static async getPsetProps(s, t, e) {
|
|
9271
9290
|
const o = e ?? (() => {
|
|
9272
9291
|
}), n = await s.getProperties(t);
|
|
9273
|
-
return !n || n.type !==
|
|
9292
|
+
return !n || n.type !== U.IFCPROPERTYSET ? null : (n.HasProperties ?? [{}]).map((c) => (c.value && o(c.value), c.value)).filter((c) => c !== null);
|
|
9274
9293
|
}
|
|
9275
9294
|
static async getPsetRel(s, t) {
|
|
9276
9295
|
var r;
|
|
9277
9296
|
if (!await s.getProperties(t))
|
|
9278
9297
|
return null;
|
|
9279
9298
|
const i = await s.getAllPropertiesOfType(
|
|
9280
|
-
|
|
9299
|
+
U.IFCRELDEFINESBYPROPERTIES
|
|
9281
9300
|
);
|
|
9282
9301
|
if (!i)
|
|
9283
9302
|
return null;
|
|
@@ -9368,7 +9387,7 @@ class jr {
|
|
|
9368
9387
|
try {
|
|
9369
9388
|
const e = s.GetLineIDsWithType(
|
|
9370
9389
|
0,
|
|
9371
|
-
|
|
9390
|
+
U.IFCUNITASSIGNMENT
|
|
9372
9391
|
).get(0), i = s.GetLine(0, e);
|
|
9373
9392
|
for (const o of i.Units) {
|
|
9374
9393
|
if (!o || o.value === null || o.value === void 0)
|
|
@@ -9415,11 +9434,11 @@ class Yn {
|
|
|
9415
9434
|
try {
|
|
9416
9435
|
const t = s.GetLineIDsWithType(
|
|
9417
9436
|
0,
|
|
9418
|
-
|
|
9419
|
-
), e = /* @__PURE__ */ new Set(), i = s.GetLineIDsWithType(0,
|
|
9437
|
+
U.IFCRELCONTAINEDINSPATIALSTRUCTURE
|
|
9438
|
+
), e = /* @__PURE__ */ new Set(), i = s.GetLineIDsWithType(0, U.IFCSPACE);
|
|
9420
9439
|
for (let c = 0; c < i.size(); c++)
|
|
9421
9440
|
e.add(i.get(c));
|
|
9422
|
-
const o = s.GetLineIDsWithType(0,
|
|
9441
|
+
const o = s.GetLineIDsWithType(0, U.IFCRELAGGREGATES), n = o.size();
|
|
9423
9442
|
for (let c = 0; c < n; c++) {
|
|
9424
9443
|
const h = o.get(c), d = s.GetLine(0, h);
|
|
9425
9444
|
if (!d || !d.RelatingObject || !d.RelatedObjects)
|
|
@@ -9482,14 +9501,14 @@ class Li {
|
|
|
9482
9501
|
* Generate the geometry for categories that are not included by default,
|
|
9483
9502
|
* like IFCSPACE.
|
|
9484
9503
|
*/
|
|
9485
|
-
I(this, "optionalCategories", [
|
|
9504
|
+
I(this, "optionalCategories", [U.IFCSPACE]);
|
|
9486
9505
|
/** Whether to use the coordination data coming from the IFC files. */
|
|
9487
9506
|
I(this, "coordinate", !0);
|
|
9488
9507
|
/** Path of the WASM for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
9489
9508
|
I(this, "wasm", {
|
|
9490
9509
|
path: "",
|
|
9491
9510
|
absolute: !1,
|
|
9492
|
-
logLevel:
|
|
9511
|
+
logLevel: U.LogLevel.LOG_LEVEL_OFF
|
|
9493
9512
|
});
|
|
9494
9513
|
/** List of categories that won't be converted to fragments. */
|
|
9495
9514
|
I(this, "excludedCategories", /* @__PURE__ */ new Set());
|
|
@@ -9572,7 +9591,7 @@ class Vn {
|
|
|
9572
9591
|
class Gn {
|
|
9573
9592
|
getNameInfo(s) {
|
|
9574
9593
|
var d;
|
|
9575
|
-
const t = {}, { arguments: e } = s.GetHeaderLine(0,
|
|
9594
|
+
const t = {}, { arguments: e } = s.GetHeaderLine(0, U.FILE_NAME) || {};
|
|
9576
9595
|
if (!e)
|
|
9577
9596
|
return t;
|
|
9578
9597
|
const [
|
|
@@ -9593,7 +9612,7 @@ class Gn {
|
|
|
9593
9612
|
}
|
|
9594
9613
|
getDescriptionInfo(s) {
|
|
9595
9614
|
var n;
|
|
9596
|
-
const t = {}, { arguments: e } = s.GetHeaderLine(0,
|
|
9615
|
+
const t = {}, { arguments: e } = s.GetHeaderLine(0, U.FILE_DESCRIPTION) || {};
|
|
9597
9616
|
if (!e)
|
|
9598
9617
|
return t;
|
|
9599
9618
|
const [i, o] = e;
|
|
@@ -9607,15 +9626,15 @@ class Gn {
|
|
|
9607
9626
|
class zn {
|
|
9608
9627
|
static get(s, t) {
|
|
9609
9628
|
const e = [
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9629
|
+
U.IFCPROJECT,
|
|
9630
|
+
U.IFCSITE,
|
|
9631
|
+
U.IFCBUILDING,
|
|
9632
|
+
U.IFCBUILDINGSTOREY,
|
|
9633
|
+
U.IFCSPACE,
|
|
9634
|
+
U.IFCROAD,
|
|
9635
|
+
U.IFCFACILITY,
|
|
9636
|
+
U.IFCFACILITYPART,
|
|
9637
|
+
U.IFCBRIDGE
|
|
9619
9638
|
], i = s.data;
|
|
9620
9639
|
for (const o of e) {
|
|
9621
9640
|
const n = t.GetLineIDsWithType(0, o), r = n.size();
|
|
@@ -9647,7 +9666,7 @@ const Ge = class Ge extends et {
|
|
|
9647
9666
|
/**
|
|
9648
9667
|
* The instance of the Web-IFC library used for handling IFC data.
|
|
9649
9668
|
*/
|
|
9650
|
-
I(this, "webIfc", new
|
|
9669
|
+
I(this, "webIfc", new U.IfcAPI());
|
|
9651
9670
|
/** {@link Component.enabled} */
|
|
9652
9671
|
I(this, "enabled", !0);
|
|
9653
9672
|
I(this, "_material", new O.MeshLambertMaterial());
|
|
@@ -9660,7 +9679,7 @@ const Ge = class Ge extends et {
|
|
|
9660
9679
|
transparent: !0,
|
|
9661
9680
|
opacity: 0.5
|
|
9662
9681
|
}));
|
|
9663
|
-
this.components.add(Ge.uuid, this), this.settings.excludedCategories.add(
|
|
9682
|
+
this.components.add(Ge.uuid, this), this.settings.excludedCategories.add(U.IFCOPENINGELEMENT);
|
|
9664
9683
|
}
|
|
9665
9684
|
/** {@link Disposable.dispose} */
|
|
9666
9685
|
dispose() {
|
|
@@ -9755,7 +9774,7 @@ const Ge = class Ge extends et {
|
|
|
9755
9774
|
* ```
|
|
9756
9775
|
*/
|
|
9757
9776
|
cleanUp() {
|
|
9758
|
-
this.webIfc.Dispose(), this.webIfc = null, this.webIfc = new
|
|
9777
|
+
this.webIfc.Dispose(), this.webIfc = null, this.webIfc = new U.IfcAPI(), this._visitedFragments.clear(), this._fragmentInstances.clear();
|
|
9759
9778
|
}
|
|
9760
9779
|
async getAllGeometries() {
|
|
9761
9780
|
this._spatialTree.setUp(this.webIfc);
|
|
@@ -9770,7 +9789,7 @@ const Ge = class Ge extends et {
|
|
|
9770
9789
|
};
|
|
9771
9790
|
const i = [];
|
|
9772
9791
|
for (const n of t) {
|
|
9773
|
-
if (!this.webIfc.IsIfcElement(n) && n !==
|
|
9792
|
+
if (!this.webIfc.IsIfcElement(n) && n !== U.IFCSPACE || this.settings.excludedCategories.has(n))
|
|
9774
9793
|
continue;
|
|
9775
9794
|
const r = this.webIfc.GetLineIDsWithType(0, n), a = r.size();
|
|
9776
9795
|
for (let c = 0; c < a; c++) {
|
|
@@ -9972,7 +9991,7 @@ const Bt = class Bt extends et {
|
|
|
9972
9991
|
* @throws Will throw an error if no OwnerHistory is found in the model.
|
|
9973
9992
|
*/
|
|
9974
9993
|
async newPset(t, e, i) {
|
|
9975
|
-
const o = Bt.getIFCSchema(t), { ownerHistoryHandle: n } = await this.getOwnerHistory(t), r = this.newGUID(t), a = new
|
|
9994
|
+
const o = Bt.getIFCSchema(t), { ownerHistoryHandle: n } = await this.getOwnerHistory(t), r = this.newGUID(t), a = new U[o].IfcLabel(e), c = i ? new U[o].IfcText(i) : null, h = new U[o].IfcPropertySet(
|
|
9976
9995
|
r,
|
|
9977
9996
|
n,
|
|
9978
9997
|
a,
|
|
@@ -9980,13 +9999,13 @@ const Bt = class Bt extends et {
|
|
|
9980
9999
|
[]
|
|
9981
10000
|
);
|
|
9982
10001
|
h.expressID = this.increaseMaxID(t);
|
|
9983
|
-
const d = this.newGUID(t), E = new
|
|
10002
|
+
const d = this.newGUID(t), E = new U[o].IfcRelDefinesByProperties(
|
|
9984
10003
|
d,
|
|
9985
10004
|
n,
|
|
9986
10005
|
null,
|
|
9987
10006
|
null,
|
|
9988
10007
|
[],
|
|
9989
|
-
new
|
|
10008
|
+
new U.Handle(h.expressID)
|
|
9990
10009
|
);
|
|
9991
10010
|
return E.expressID = this.increaseMaxID(t), await this.setData(t, h, E), { pset: h, rel: E };
|
|
9992
10011
|
}
|
|
@@ -10005,7 +10024,7 @@ const Bt = class Bt extends et {
|
|
|
10005
10024
|
async removePset(t, ...e) {
|
|
10006
10025
|
for (const i of e) {
|
|
10007
10026
|
const o = await t.getProperties(i);
|
|
10008
|
-
if ((o == null ? void 0 : o.type) !==
|
|
10027
|
+
if ((o == null ? void 0 : o.type) !== U.IFCPROPERTYSET)
|
|
10009
10028
|
continue;
|
|
10010
10029
|
const n = await Kt.getPsetRel(t, i);
|
|
10011
10030
|
if (n && (await t.setProperties(n, null), this.registerChange(t, n)), o) {
|
|
@@ -10077,7 +10096,7 @@ const Bt = class Bt extends et {
|
|
|
10077
10096
|
*/
|
|
10078
10097
|
async removePsetProp(t, e, i) {
|
|
10079
10098
|
const o = await t.getProperties(e), n = await t.getProperties(i);
|
|
10080
|
-
!o || !n || o.type ===
|
|
10099
|
+
!o || !n || o.type === U.IFCPROPERTYSET && n && (o.HasProperties = o.HasProperties.filter((r) => r.value !== i), await t.setProperties(i, null), this.registerChange(t, e, i));
|
|
10081
10100
|
}
|
|
10082
10101
|
async addElementToPset(t, e, ...i) {
|
|
10083
10102
|
const o = await Kt.getPsetRel(t, e);
|
|
@@ -10087,7 +10106,7 @@ const Bt = class Bt extends et {
|
|
|
10087
10106
|
if (!n)
|
|
10088
10107
|
return;
|
|
10089
10108
|
for (const a of i) {
|
|
10090
|
-
const c = new
|
|
10109
|
+
const c = new U.Handle(a);
|
|
10091
10110
|
n.RelatedObjects.push(c), this.onElementToPset.trigger({
|
|
10092
10111
|
model: t,
|
|
10093
10112
|
psetID: e,
|
|
@@ -10118,7 +10137,7 @@ const Bt = class Bt extends et {
|
|
|
10118
10137
|
for (const n of i) {
|
|
10119
10138
|
if (o.HasProperties.includes(n))
|
|
10120
10139
|
continue;
|
|
10121
|
-
const r = new
|
|
10140
|
+
const r = new U.Handle(n);
|
|
10122
10141
|
o.HasProperties.push(r), this.onPropToPset.trigger({ model: t, psetID: e, propID: n });
|
|
10123
10142
|
}
|
|
10124
10143
|
this.registerChange(t, e);
|
|
@@ -10197,15 +10216,15 @@ const Bt = class Bt extends et {
|
|
|
10197
10216
|
}
|
|
10198
10217
|
newGUID(t) {
|
|
10199
10218
|
const e = Bt.getIFCSchema(t);
|
|
10200
|
-
return new
|
|
10219
|
+
return new U[e].IfcGloballyUniqueId(ze.create());
|
|
10201
10220
|
}
|
|
10202
10221
|
async getOwnerHistory(t) {
|
|
10203
10222
|
const e = await t.getAllPropertiesOfType(
|
|
10204
|
-
|
|
10223
|
+
U.IFCOWNERHISTORY
|
|
10205
10224
|
);
|
|
10206
10225
|
if (!e)
|
|
10207
10226
|
throw new Error("No OwnerHistory was found.");
|
|
10208
|
-
const i = Object.keys(e).map((r) => parseInt(r, 10)), o = e[i[0]], n = new
|
|
10227
|
+
const i = Object.keys(e).map((r) => parseInt(r, 10)), o = e[i[0]], n = new U.Handle(o.expressID);
|
|
10209
10228
|
return { ownerHistory: o, ownerHistoryHandle: n };
|
|
10210
10229
|
}
|
|
10211
10230
|
registerChange(t, ...e) {
|
|
@@ -10214,7 +10233,7 @@ const Bt = class Bt extends et {
|
|
|
10214
10233
|
this.changeMap[t.uuid].add(i), this.onDataChanged.trigger({ model: t, expressID: i });
|
|
10215
10234
|
}
|
|
10216
10235
|
async newSingleProperty(t, e, i, o) {
|
|
10217
|
-
const n = Bt.getIFCSchema(t), r = new
|
|
10236
|
+
const n = Bt.getIFCSchema(t), r = new U[n].IfcIdentifier(i), a = new U[n][e](o), c = new U[n].IfcPropertySingleValue(
|
|
10218
10237
|
r,
|
|
10219
10238
|
null,
|
|
10220
10239
|
a,
|
|
@@ -10761,7 +10780,7 @@ const ws = class ws extends et {
|
|
|
10761
10780
|
/**
|
|
10762
10781
|
* The WebIFC API instance used for IFC file processing.
|
|
10763
10782
|
*/
|
|
10764
|
-
I(this, "webIfc", new
|
|
10783
|
+
I(this, "webIfc", new U.IfcAPI());
|
|
10765
10784
|
I(this, "_spatialTree", new Yn());
|
|
10766
10785
|
I(this, "_metaData", new Gn());
|
|
10767
10786
|
I(this, "_visitedGeometries", /* @__PURE__ */ new Map());
|
|
@@ -10772,7 +10791,7 @@ const ws = class ws extends et {
|
|
|
10772
10791
|
I(this, "_groupSerializer", new Vt.Serializer());
|
|
10773
10792
|
I(this, "_assets", []);
|
|
10774
10793
|
I(this, "_meshesWithHoles", /* @__PURE__ */ new Set());
|
|
10775
|
-
this.components.add(ws.uuid, this), this.settings.excludedCategories.add(
|
|
10794
|
+
this.components.add(ws.uuid, this), this.settings.excludedCategories.add(U.IFCOPENINGELEMENT);
|
|
10776
10795
|
}
|
|
10777
10796
|
/** {@link Disposable.dispose} */
|
|
10778
10797
|
dispose() {
|
|
@@ -10833,7 +10852,7 @@ const ws = class ws extends et {
|
|
|
10833
10852
|
};
|
|
10834
10853
|
let r = 0, a = 0;
|
|
10835
10854
|
for (const T of i) {
|
|
10836
|
-
if (!this.webIfc.IsIfcElement(T) && T !==
|
|
10855
|
+
if (!this.webIfc.IsIfcElement(T) && T !== U.IFCSPACE || this.settings.excludedCategories.has(T))
|
|
10837
10856
|
continue;
|
|
10838
10857
|
const R = this.webIfc.GetLineIDsWithType(0, T), C = R.size();
|
|
10839
10858
|
for (let A = 0; A < C; A++) {
|
|
@@ -10869,7 +10888,7 @@ const ws = class ws extends et {
|
|
|
10869
10888
|
this.onIfcLoaded.trigger(f), n.dispose(!0);
|
|
10870
10889
|
}
|
|
10871
10890
|
cleanUp() {
|
|
10872
|
-
this.webIfc.Dispose(), this.webIfc = null, this.webIfc = new
|
|
10891
|
+
this.webIfc.Dispose(), this.webIfc = null, this.webIfc = new U.IfcAPI(), this._visitedGeometries.clear(), this._geometries.clear(), this._assets = [], this._meshesWithHoles.clear();
|
|
10873
10892
|
}
|
|
10874
10893
|
getMesh(t, e, i) {
|
|
10875
10894
|
const o = e.geometries.size(), n = e.expressID, r = { id: n, geometries: [] };
|
|
@@ -10974,7 +10993,7 @@ class $r extends et {
|
|
|
10974
10993
|
/**
|
|
10975
10994
|
* An instance of the IfcAPI class from the Web-IFC library, which provides methods for reading and processing IFC data.
|
|
10976
10995
|
*/
|
|
10977
|
-
I(this, "webIfc", new
|
|
10996
|
+
I(this, "webIfc", new U.IfcAPI());
|
|
10978
10997
|
}
|
|
10979
10998
|
/** {@link Disposable.dispose} */
|
|
10980
10999
|
async dispose() {
|
|
@@ -11008,11 +11027,11 @@ class $r extends et {
|
|
|
11008
11027
|
}
|
|
11009
11028
|
async streamAllProperties() {
|
|
11010
11029
|
const { propertiesSize: t } = this.settings, e = new Set(this.webIfc.GetIfcEntityList(0)), i = /* @__PURE__ */ new Set([
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11030
|
+
U.IFCPROJECT,
|
|
11031
|
+
U.IFCSITE,
|
|
11032
|
+
U.IFCBUILDING,
|
|
11033
|
+
U.IFCBUILDINGSTOREY,
|
|
11034
|
+
U.IFCSPACE
|
|
11016
11035
|
]);
|
|
11017
11036
|
for (const c of i)
|
|
11018
11037
|
e.add(c);
|
|
@@ -11056,7 +11075,7 @@ class $r extends et {
|
|
|
11056
11075
|
await this.onIndicesStreamed.trigger(a);
|
|
11057
11076
|
}
|
|
11058
11077
|
cleanUp() {
|
|
11059
|
-
this.webIfc.Dispose(), this.webIfc = null, this.webIfc = new
|
|
11078
|
+
this.webIfc.Dispose(), this.webIfc = null, this.webIfc = new U.IfcAPI();
|
|
11060
11079
|
}
|
|
11061
11080
|
}
|
|
11062
11081
|
/**
|