@mlightcad/libredwg-converter 3.7.8 → 3.7.10
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/libredwg-converter.umd.cjs +1 -1
- package/dist/libredwg-parser-worker.js +312 -298
- package/lib/AcDbEntitiyConverter.d.ts.map +1 -1
- package/lib/AcDbEntitiyConverter.js +15 -0
- package/lib/AcDbEntitiyConverter.js.map +1 -1
- package/lib/AcDbLibreDwgConverter.d.ts +0 -4
- package/lib/AcDbLibreDwgConverter.d.ts.map +1 -1
- package/lib/AcDbLibreDwgConverter.js +43 -102
- package/lib/AcDbLibreDwgConverter.js.map +1 -1
- package/package.json +4 -4
|
@@ -15,7 +15,7 @@ var mC = function(C, B, E, Q) {
|
|
|
15
15
|
F(y);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function H(R) {
|
|
19
19
|
try {
|
|
20
20
|
h(Q.throw(R));
|
|
21
21
|
} catch (y) {
|
|
@@ -23,7 +23,7 @@ var mC = function(C, B, E, Q) {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
function h(R) {
|
|
26
|
-
R.done ? w(R.value) : G(R.value).then(i,
|
|
26
|
+
R.done ? w(R.value) : G(R.value).then(i, H);
|
|
27
27
|
}
|
|
28
28
|
h((Q = Q.apply(C, B || [])).next());
|
|
29
29
|
});
|
|
@@ -37,10 +37,10 @@ var mC = function(C, B, E, Q) {
|
|
|
37
37
|
}), F;
|
|
38
38
|
function i(h) {
|
|
39
39
|
return function(R) {
|
|
40
|
-
return
|
|
40
|
+
return H([h, R]);
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function H(h) {
|
|
44
44
|
if (Q) throw new TypeError("Generator is already executing.");
|
|
45
45
|
for (; F && (F = 0, h[0] && (E = 0)), E; ) try {
|
|
46
46
|
if (Q = 1, G && (w = h[0] & 2 ? G.return : h[0] ? G.throw || ((w = G.return) && w.call(G), 0) : G.next) && !(w = w.call(G, h[1])).done) return w;
|
|
@@ -95,16 +95,16 @@ var mC = function(C, B, E, Q) {
|
|
|
95
95
|
self.onmessage = function(E) {
|
|
96
96
|
return mC(B, void 0, void 0, function() {
|
|
97
97
|
var Q, G, w, F, i;
|
|
98
|
-
return eC(this, function(
|
|
99
|
-
switch (
|
|
98
|
+
return eC(this, function(H) {
|
|
99
|
+
switch (H.label) {
|
|
100
100
|
case 0:
|
|
101
|
-
Q = E.data, G = Q.id, w = Q.input,
|
|
101
|
+
Q = E.data, G = Q.id, w = Q.input, H.label = 1;
|
|
102
102
|
case 1:
|
|
103
|
-
return
|
|
103
|
+
return H.trys.push([1, 3, , 4]), [4, this.executeTask(w)];
|
|
104
104
|
case 2:
|
|
105
|
-
return F =
|
|
105
|
+
return F = H.sent(), this.sendResponse(G, !0, F), [3, 4];
|
|
106
106
|
case 3:
|
|
107
|
-
return i =
|
|
107
|
+
return i = H.sent(), this.sendResponse(G, !1, void 0, i instanceof Error ? i.message : String(i)), [3, 4];
|
|
108
108
|
case 4:
|
|
109
109
|
return [2];
|
|
110
110
|
}
|
|
@@ -128,14 +128,14 @@ async function _g(C = {}) {
|
|
|
128
128
|
const { createRequire: A } = await Promise.resolve().then(() => HI);
|
|
129
129
|
var F = A(import.meta.url);
|
|
130
130
|
}
|
|
131
|
-
var i = "./this.program",
|
|
131
|
+
var i = "./this.program", H = import.meta.url, h = "";
|
|
132
132
|
function R(A) {
|
|
133
133
|
return E.locateFile ? E.locateFile(A, h) : h + A;
|
|
134
134
|
}
|
|
135
135
|
var y, c;
|
|
136
136
|
if (w) {
|
|
137
137
|
var k = F("node:fs");
|
|
138
|
-
|
|
138
|
+
H.startsWith("file:") && (h = F("node:path").dirname(F("node:url").fileURLToPath(H)) + "/"), c = (A) => {
|
|
139
139
|
A = z(A) ? new URL(A) : A;
|
|
140
140
|
var g = k.readFileSync(A);
|
|
141
141
|
return g;
|
|
@@ -146,7 +146,7 @@ async function _g(C = {}) {
|
|
|
146
146
|
}, process.argv.length > 1 && (i = process.argv[1].replace(/\\/g, "/")), process.argv.slice(2);
|
|
147
147
|
} else if (Q || G) {
|
|
148
148
|
try {
|
|
149
|
-
h = new URL(".",
|
|
149
|
+
h = new URL(".", H).href;
|
|
150
150
|
} catch {
|
|
151
151
|
}
|
|
152
152
|
G && (c = (A) => {
|
|
@@ -248,8 +248,8 @@ async function _g(C = {}) {
|
|
|
248
248
|
var I = PA();
|
|
249
249
|
if (E.instantiateWasm)
|
|
250
250
|
return new Promise((K, M) => {
|
|
251
|
-
E.instantiateWasm(I, (
|
|
252
|
-
K(A(
|
|
251
|
+
E.instantiateWasm(I, (Y, U) => {
|
|
252
|
+
K(A(Y));
|
|
253
253
|
});
|
|
254
254
|
});
|
|
255
255
|
FA ?? (FA = KA());
|
|
@@ -381,12 +381,12 @@ async function _g(C = {}) {
|
|
|
381
381
|
;
|
|
382
382
|
return S > t ? [] : s.slice(S, t - S + 1);
|
|
383
383
|
}
|
|
384
|
-
for (var D = I(A.split("/")), N = I(g.split("/")), K = Math.min(D.length, N.length), M = K,
|
|
385
|
-
if (D[
|
|
386
|
-
M =
|
|
384
|
+
for (var D = I(A.split("/")), N = I(g.split("/")), K = Math.min(D.length, N.length), M = K, Y = 0; Y < K; Y++)
|
|
385
|
+
if (D[Y] !== N[Y]) {
|
|
386
|
+
M = Y;
|
|
387
387
|
break;
|
|
388
388
|
}
|
|
389
|
-
for (var U = [],
|
|
389
|
+
for (var U = [], Y = M; Y < D.length; Y++)
|
|
390
390
|
U.push("..");
|
|
391
391
|
return U = U.concat(N.slice(M)), U.join("/");
|
|
392
392
|
} }, MB = globalThis.TextDecoder && new TextDecoder(), iB = (A, g, I, D) => {
|
|
@@ -405,13 +405,13 @@ async function _g(C = {}) {
|
|
|
405
405
|
K += String.fromCharCode(M);
|
|
406
406
|
continue;
|
|
407
407
|
}
|
|
408
|
-
var
|
|
408
|
+
var Y = A[g++] & 63;
|
|
409
409
|
if ((M & 224) == 192) {
|
|
410
|
-
K += String.fromCharCode((M & 31) << 6 |
|
|
410
|
+
K += String.fromCharCode((M & 31) << 6 | Y);
|
|
411
411
|
continue;
|
|
412
412
|
}
|
|
413
413
|
var U = A[g++] & 63;
|
|
414
|
-
if ((M & 240) == 224 ? M = (M & 15) << 12 |
|
|
414
|
+
if ((M & 240) == 224 ? M = (M & 15) << 12 | Y << 6 | U : M = (M & 7) << 18 | Y << 12 | U << 6 | A[g++] & 63, M < 65536)
|
|
415
415
|
K += String.fromCharCode(M);
|
|
416
416
|
else {
|
|
417
417
|
var s = M - 65536;
|
|
@@ -428,19 +428,19 @@ async function _g(C = {}) {
|
|
|
428
428
|
}, QB = (A, g, I, D) => {
|
|
429
429
|
if (I >>>= 0, !(D > 0)) return 0;
|
|
430
430
|
for (var N = I, K = I + D - 1, M = 0; M < A.length; ++M) {
|
|
431
|
-
var
|
|
432
|
-
if (
|
|
431
|
+
var Y = A.codePointAt(M);
|
|
432
|
+
if (Y <= 127) {
|
|
433
433
|
if (I >= K) break;
|
|
434
|
-
g[I++ >>> 0] =
|
|
435
|
-
} else if (
|
|
434
|
+
g[I++ >>> 0] = Y;
|
|
435
|
+
} else if (Y <= 2047) {
|
|
436
436
|
if (I + 1 >= K) break;
|
|
437
|
-
g[I++ >>> 0] = 192 |
|
|
438
|
-
} else if (
|
|
437
|
+
g[I++ >>> 0] = 192 | Y >> 6, g[I++ >>> 0] = 128 | Y & 63;
|
|
438
|
+
} else if (Y <= 65535) {
|
|
439
439
|
if (I + 2 >= K) break;
|
|
440
|
-
g[I++ >>> 0] = 224 |
|
|
440
|
+
g[I++ >>> 0] = 224 | Y >> 12, g[I++ >>> 0] = 128 | Y >> 6 & 63, g[I++ >>> 0] = 128 | Y & 63;
|
|
441
441
|
} else {
|
|
442
442
|
if (I + 3 >= K) break;
|
|
443
|
-
g[I++ >>> 0] = 240 |
|
|
443
|
+
g[I++ >>> 0] = 240 | Y >> 18, g[I++ >>> 0] = 128 | Y >> 12 & 63, g[I++ >>> 0] = 128 | Y >> 6 & 63, g[I++ >>> 0] = 128 | Y & 63, M++;
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
return g[I >>> 0] = 0, I - N;
|
|
@@ -484,16 +484,16 @@ async function _g(C = {}) {
|
|
|
484
484
|
if (!A.tty || !A.tty.ops.get_char)
|
|
485
485
|
throw new o.ErrnoError(60);
|
|
486
486
|
for (var K = 0, M = 0; M < D; M++) {
|
|
487
|
-
var
|
|
487
|
+
var Y;
|
|
488
488
|
try {
|
|
489
|
-
|
|
489
|
+
Y = A.tty.ops.get_char(A.tty);
|
|
490
490
|
} catch {
|
|
491
491
|
throw new o.ErrnoError(29);
|
|
492
492
|
}
|
|
493
|
-
if (
|
|
493
|
+
if (Y === void 0 && K === 0)
|
|
494
494
|
throw new o.ErrnoError(6);
|
|
495
|
-
if (
|
|
496
|
-
K++, g[I + M] =
|
|
495
|
+
if (Y == null) break;
|
|
496
|
+
K++, g[I + M] = Y;
|
|
497
497
|
}
|
|
498
498
|
return K && (A.node.atime = Date.now()), K;
|
|
499
499
|
}, write(A, g, I, D, N) {
|
|
@@ -606,13 +606,13 @@ async function _g(C = {}) {
|
|
|
606
606
|
}, mmap(A, g, I, D, N) {
|
|
607
607
|
if (!o.isFile(A.node.mode))
|
|
608
608
|
throw new o.ErrnoError(43);
|
|
609
|
-
var K, M,
|
|
610
|
-
if (!(N & 2) &&
|
|
611
|
-
M = !1, K =
|
|
609
|
+
var K, M, Y = A.node.contents;
|
|
610
|
+
if (!(N & 2) && Y.buffer === e.buffer)
|
|
611
|
+
M = !1, K = Y.byteOffset;
|
|
612
612
|
else {
|
|
613
613
|
if (M = !0, K = CB(), !K)
|
|
614
614
|
throw new o.ErrnoError(48);
|
|
615
|
-
|
|
615
|
+
Y && ((I > 0 || I + g < Y.length) && (Y.subarray ? Y = Y.subarray(I, I + g) : Y = Array.prototype.slice.call(Y, I, I + g)), e.set(Y, K >>> 0));
|
|
616
616
|
}
|
|
617
617
|
return { ptr: K, allocated: M };
|
|
618
618
|
}, msync(A, g, I, D, N) {
|
|
@@ -644,17 +644,17 @@ async function _g(C = {}) {
|
|
|
644
644
|
if (I.canHandle(g))
|
|
645
645
|
return I.handle(A, g);
|
|
646
646
|
return A;
|
|
647
|
-
}, DB = async (A, g, I, D, N, K, M,
|
|
647
|
+
}, DB = async (A, g, I, D, N, K, M, Y) => {
|
|
648
648
|
var U = g ? LA.resolve(j.join2(A, g)) : A;
|
|
649
649
|
kB();
|
|
650
650
|
try {
|
|
651
651
|
var s = I;
|
|
652
|
-
typeof I == "string" && (s = await UB(I)), s = await yB(s, U),
|
|
652
|
+
typeof I == "string" && (s = await UB(I)), s = await yB(s, U), Y == null || Y(), K || hB(A, g, s, D, N, M);
|
|
653
653
|
} finally {
|
|
654
654
|
RB();
|
|
655
655
|
}
|
|
656
|
-
}, bB = (A, g, I, D, N, K, M,
|
|
657
|
-
DB(A, g, I, D, N,
|
|
656
|
+
}, bB = (A, g, I, D, N, K, M, Y, U, s) => {
|
|
657
|
+
DB(A, g, I, D, N, Y, U, s).then(K).catch(M);
|
|
658
658
|
}, o = { root: null, mounts: [], devices: {}, streams: [], nextInode: 1, nameTable: null, currentPath: "/", initialized: !1, ignorePermissions: !0, filesystems: null, syncFSRequests: 0, ErrnoError: class {
|
|
659
659
|
constructor(A) {
|
|
660
660
|
dA(this, "name", "ErrnoError");
|
|
@@ -724,8 +724,8 @@ async function _g(C = {}) {
|
|
|
724
724
|
g.follow_mount ?? (g.follow_mount = !0), j.isAbs(A) || (A = o.cwd() + "/" + A);
|
|
725
725
|
A: for (var I = 0; I < 40; I++) {
|
|
726
726
|
for (var D = A.split("/").filter((s) => !!s), N = o.root, K = "/", M = 0; M < D.length; M++) {
|
|
727
|
-
var
|
|
728
|
-
if (
|
|
727
|
+
var Y = M === D.length - 1;
|
|
728
|
+
if (Y && g.parent)
|
|
729
729
|
break;
|
|
730
730
|
if (D[M] !== ".") {
|
|
731
731
|
if (D[M] === "..") {
|
|
@@ -740,11 +740,11 @@ async function _g(C = {}) {
|
|
|
740
740
|
try {
|
|
741
741
|
N = o.lookupNode(N, D[M]);
|
|
742
742
|
} catch (s) {
|
|
743
|
-
if ((s == null ? void 0 : s.errno) === 44 &&
|
|
743
|
+
if ((s == null ? void 0 : s.errno) === 44 && Y && g.noent_okay)
|
|
744
744
|
return { path: K };
|
|
745
745
|
throw s;
|
|
746
746
|
}
|
|
747
|
-
if (o.isMountpoint(N) && (!
|
|
747
|
+
if (o.isMountpoint(N) && (!Y || g.follow_mount) && (N = N.mounted.root), o.isLink(N.mode) && (!Y || g.follow)) {
|
|
748
748
|
if (!N.node_ops.readlink)
|
|
749
749
|
throw new o.ErrnoError(52);
|
|
750
750
|
var U = N.node_ops.readlink(N);
|
|
@@ -906,12 +906,12 @@ async function _g(C = {}) {
|
|
|
906
906
|
}, syncfs(A, g) {
|
|
907
907
|
typeof A == "function" && (g = A, A = !1), o.syncFSRequests++, o.syncFSRequests > 1 && a(`warning: ${o.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);
|
|
908
908
|
var I = o.getMounts(o.root.mount), D = 0;
|
|
909
|
-
function N(
|
|
910
|
-
return o.syncFSRequests--, g(
|
|
909
|
+
function N(Y) {
|
|
910
|
+
return o.syncFSRequests--, g(Y);
|
|
911
911
|
}
|
|
912
|
-
function K(
|
|
913
|
-
if (
|
|
914
|
-
return K.errored ? void 0 : (K.errored = !0, N(
|
|
912
|
+
function K(Y) {
|
|
913
|
+
if (Y)
|
|
914
|
+
return K.errored ? void 0 : (K.errored = !0, N(Y));
|
|
915
915
|
++D >= I.length && N(null);
|
|
916
916
|
}
|
|
917
917
|
for (var M of I)
|
|
@@ -927,8 +927,8 @@ async function _g(C = {}) {
|
|
|
927
927
|
if (!o.isDir(K.mode))
|
|
928
928
|
throw new o.ErrnoError(54);
|
|
929
929
|
}
|
|
930
|
-
var
|
|
931
|
-
return U.mount =
|
|
930
|
+
var Y = { type: A, opts: g, mountpoint: I, mounts: [] }, U = A.mount(Y);
|
|
931
|
+
return U.mount = Y, Y.root = U, D ? o.root = U : K && (K.mounted = Y, K.mount && K.mount.mounts.push(Y)), U;
|
|
932
932
|
}, unmount(A) {
|
|
933
933
|
var g = o.lookupPath(A, { follow_mount: !1 });
|
|
934
934
|
if (!o.isMountpoint(g.node))
|
|
@@ -936,8 +936,8 @@ async function _g(C = {}) {
|
|
|
936
936
|
var I = g.node, D = I.mounted, N = o.getMounts(D);
|
|
937
937
|
for (var [K, M] of Object.entries(o.nameTable))
|
|
938
938
|
for (; M; ) {
|
|
939
|
-
var
|
|
940
|
-
N.includes(M.mount) && o.destroyNode(M), M =
|
|
939
|
+
var Y = M.name_next;
|
|
940
|
+
N.includes(M.mount) && o.destroyNode(M), M = Y;
|
|
941
941
|
}
|
|
942
942
|
I.mounted = null;
|
|
943
943
|
var U = I.mount.mounts.indexOf(D);
|
|
@@ -993,11 +993,11 @@ async function _g(C = {}) {
|
|
|
993
993
|
throw new o.ErrnoError(63);
|
|
994
994
|
return D.node_ops.symlink(D, N, A);
|
|
995
995
|
}, rename(A, g) {
|
|
996
|
-
var I = j.dirname(A), D = j.dirname(g), N = j.basename(A), K = j.basename(g), M,
|
|
997
|
-
if (M = o.lookupPath(A, { parent: !0 }),
|
|
998
|
-
if (
|
|
996
|
+
var I = j.dirname(A), D = j.dirname(g), N = j.basename(A), K = j.basename(g), M, Y, U;
|
|
997
|
+
if (M = o.lookupPath(A, { parent: !0 }), Y = M.node, M = o.lookupPath(g, { parent: !0 }), U = M.node, !Y || !U) throw new o.ErrnoError(44);
|
|
998
|
+
if (Y.mount !== U.mount)
|
|
999
999
|
throw new o.ErrnoError(75);
|
|
1000
|
-
var s = o.lookupNode(
|
|
1000
|
+
var s = o.lookupNode(Y, N), S = LA.relative(A, D);
|
|
1001
1001
|
if (S.charAt(0) !== ".")
|
|
1002
1002
|
throw new o.ErrnoError(28);
|
|
1003
1003
|
if (S = LA.relative(g, I), S.charAt(0) !== ".")
|
|
@@ -1008,20 +1008,20 @@ async function _g(C = {}) {
|
|
|
1008
1008
|
} catch {
|
|
1009
1009
|
}
|
|
1010
1010
|
if (s !== t) {
|
|
1011
|
-
var P = o.isDir(s.mode), J = o.mayDelete(
|
|
1011
|
+
var P = o.isDir(s.mode), J = o.mayDelete(Y, N, P);
|
|
1012
1012
|
if (J)
|
|
1013
1013
|
throw new o.ErrnoError(J);
|
|
1014
1014
|
if (J = t ? o.mayDelete(U, K, P) : o.mayCreate(U, K), J)
|
|
1015
1015
|
throw new o.ErrnoError(J);
|
|
1016
|
-
if (!
|
|
1016
|
+
if (!Y.node_ops.rename)
|
|
1017
1017
|
throw new o.ErrnoError(63);
|
|
1018
1018
|
if (o.isMountpoint(s) || t && o.isMountpoint(t))
|
|
1019
1019
|
throw new o.ErrnoError(10);
|
|
1020
|
-
if (U !==
|
|
1020
|
+
if (U !== Y && (J = o.nodePermissions(Y, "w"), J))
|
|
1021
1021
|
throw new o.ErrnoError(J);
|
|
1022
1022
|
o.hashRemoveNode(s);
|
|
1023
1023
|
try {
|
|
1024
|
-
|
|
1024
|
+
Y.node_ops.rename(s, U, K), s.parent = U;
|
|
1025
1025
|
} catch (f) {
|
|
1026
1026
|
throw f;
|
|
1027
1027
|
} finally {
|
|
@@ -1151,9 +1151,9 @@ async function _g(C = {}) {
|
|
|
1151
1151
|
if (o.isChrdev(D.mode) && (g &= -513), g & 65536 && !o.isDir(D.mode))
|
|
1152
1152
|
throw new o.ErrnoError(54);
|
|
1153
1153
|
if (!M) {
|
|
1154
|
-
var
|
|
1155
|
-
if (
|
|
1156
|
-
throw new o.ErrnoError(
|
|
1154
|
+
var Y = o.mayOpen(D, g);
|
|
1155
|
+
if (Y)
|
|
1156
|
+
throw new o.ErrnoError(Y);
|
|
1157
1157
|
}
|
|
1158
1158
|
g & 512 && !M && o.truncate(D, 0), g &= -131713;
|
|
1159
1159
|
var U = o.createStream({ node: D, path: o.getPath(D), flags: g, seekable: !0, position: 0, stream_ops: D.stream_ops, ungotten: [], error: !1 });
|
|
@@ -1215,8 +1215,8 @@ async function _g(C = {}) {
|
|
|
1215
1215
|
N = A.position;
|
|
1216
1216
|
else if (!A.seekable)
|
|
1217
1217
|
throw new o.ErrnoError(70);
|
|
1218
|
-
var
|
|
1219
|
-
return M || (A.position +=
|
|
1218
|
+
var Y = A.stream_ops.write(A, g, I, D, N, K);
|
|
1219
|
+
return M || (A.position += Y), Y;
|
|
1220
1220
|
}, mmap(A, g, I, D, N) {
|
|
1221
1221
|
if (D & 2 && !(N & 2) && (A.flags & 2097155) !== 2)
|
|
1222
1222
|
throw new o.ErrnoError(2);
|
|
@@ -1254,7 +1254,7 @@ async function _g(C = {}) {
|
|
|
1254
1254
|
}, createDefaultDirectories() {
|
|
1255
1255
|
o.mkdir("/tmp"), o.mkdir("/home"), o.mkdir("/home/web_user");
|
|
1256
1256
|
}, createDefaultDevices() {
|
|
1257
|
-
o.mkdir("/dev"), o.registerDevice(o.makedev(1, 3), { read: () => 0, write: (D, N, K, M,
|
|
1257
|
+
o.mkdir("/dev"), o.registerDevice(o.makedev(1, 3), { read: () => 0, write: (D, N, K, M, Y) => M, llseek: () => 0 }), o.mkdev("/dev/null", o.makedev(1, 3)), YA.register(o.makedev(5, 0), YA.default_tty_ops), YA.register(o.makedev(6, 0), YA.default_tty1_ops), o.mkdev("/dev/tty", o.makedev(5, 0)), o.mkdev("/dev/tty1", o.makedev(6, 0));
|
|
1258
1258
|
var A = new Uint8Array(1024), g = 0, I = () => (g === 0 && (XA(A), g = A.byteLength), A[--g]);
|
|
1259
1259
|
o.createDevice("/dev", "random", I), o.createDevice("/dev", "urandom", I), o.mkdir("/dev/shm"), o.mkdir("/dev/shm/tmp");
|
|
1260
1260
|
}, createSpecialDirectories() {
|
|
@@ -1304,8 +1304,8 @@ async function _g(C = {}) {
|
|
|
1304
1304
|
var M = j.join2(A, K);
|
|
1305
1305
|
try {
|
|
1306
1306
|
o.mkdir(M);
|
|
1307
|
-
} catch (
|
|
1308
|
-
if (
|
|
1307
|
+
} catch (Y) {
|
|
1308
|
+
if (Y.errno != 20) throw Y;
|
|
1309
1309
|
}
|
|
1310
1310
|
A = M;
|
|
1311
1311
|
}
|
|
@@ -1317,16 +1317,16 @@ async function _g(C = {}) {
|
|
|
1317
1317
|
}, createDataFile(A, g, I, D, N, K) {
|
|
1318
1318
|
var M = g;
|
|
1319
1319
|
A && (A = typeof A == "string" ? A : o.getPath(A), M = g ? j.join2(A, g) : A);
|
|
1320
|
-
var
|
|
1320
|
+
var Y = jA(D, N), U = o.create(M, Y);
|
|
1321
1321
|
if (I) {
|
|
1322
|
-
I = IB(I), o.chmod(U,
|
|
1322
|
+
I = IB(I), o.chmod(U, Y | 146);
|
|
1323
1323
|
var s = o.open(U, 577);
|
|
1324
|
-
o.write(s, I, 0, I.length, 0, K), o.close(s), o.chmod(U,
|
|
1324
|
+
o.write(s, I, 0, I.length, 0, K), o.close(s), o.chmod(U, Y);
|
|
1325
1325
|
}
|
|
1326
1326
|
}, createDevice(A, g, I, D) {
|
|
1327
|
-
var
|
|
1327
|
+
var Y;
|
|
1328
1328
|
var N = j.join2(typeof A == "string" ? A : o.getPath(A), g), K = jA(!!I, !!D);
|
|
1329
|
-
(
|
|
1329
|
+
(Y = o.createDevice).major ?? (Y.major = 64);
|
|
1330
1330
|
var M = o.makedev(o.createDevice.major++, 0);
|
|
1331
1331
|
return o.registerDevice(M, { open(U) {
|
|
1332
1332
|
U.seekable = !1;
|
|
@@ -1405,11 +1405,11 @@ async function _g(C = {}) {
|
|
|
1405
1405
|
}
|
|
1406
1406
|
if (globalThis.XMLHttpRequest) {
|
|
1407
1407
|
G || u("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");
|
|
1408
|
-
var M = new K(),
|
|
1408
|
+
var M = new K(), Y = { isDevice: !1, contents: M };
|
|
1409
1409
|
} else
|
|
1410
|
-
var
|
|
1411
|
-
var U = o.createFile(A, g,
|
|
1412
|
-
|
|
1410
|
+
var Y = { isDevice: !1, url: I };
|
|
1411
|
+
var U = o.createFile(A, g, Y, D, N);
|
|
1412
|
+
Y.contents ? U.contents = Y.contents : Y.url && (U.contents = null, U.url = Y.url), Object.defineProperties(U, { usedBytes: { get: function() {
|
|
1413
1413
|
return this.contents.length;
|
|
1414
1414
|
} } });
|
|
1415
1415
|
var s = {};
|
|
@@ -1494,8 +1494,8 @@ async function _g(C = {}) {
|
|
|
1494
1494
|
return D.flags = D.flags & ~M | N & M, 0;
|
|
1495
1495
|
}
|
|
1496
1496
|
case 12: {
|
|
1497
|
-
var N = JA(),
|
|
1498
|
-
return oA[N +
|
|
1497
|
+
var N = JA(), Y = 0;
|
|
1498
|
+
return oA[N + Y >>> 1 >>> 0] = 2, 0;
|
|
1499
1499
|
}
|
|
1500
1500
|
case 13:
|
|
1501
1501
|
case 14:
|
|
@@ -1543,9 +1543,9 @@ async function _g(C = {}) {
|
|
|
1543
1543
|
case 21508: {
|
|
1544
1544
|
if (!D.tty) return -59;
|
|
1545
1545
|
if (D.tty.ops.ioctl_tcsets) {
|
|
1546
|
-
for (var K = JA(),
|
|
1546
|
+
for (var K = JA(), Y = Z[K >>> 2 >>> 0], U = Z[K + 4 >>> 2 >>> 0], s = Z[K + 8 >>> 2 >>> 0], S = Z[K + 12 >>> 2 >>> 0], t = [], M = 0; M < 32; M++)
|
|
1547
1547
|
t.push(e[K + M + 17 >>> 0]);
|
|
1548
|
-
return D.tty.ops.ioctl_tcsets(D.tty, g, { c_iflag:
|
|
1548
|
+
return D.tty.ops.ioctl_tcsets(D.tty, g, { c_iflag: Y, c_oflag: U, c_cflag: s, c_lflag: S, c_cc: t });
|
|
1549
1549
|
}
|
|
1550
1550
|
return 0;
|
|
1551
1551
|
}
|
|
@@ -1666,12 +1666,12 @@ async function _g(C = {}) {
|
|
|
1666
1666
|
}, rB = function(A, g, I, D, N) {
|
|
1667
1667
|
A >>>= 0, g >>>= 0, I >>>= 0, g = DA(g);
|
|
1668
1668
|
const K = D === 0n;
|
|
1669
|
-
let M = (
|
|
1669
|
+
let M = (Y) => Y;
|
|
1670
1670
|
if (K) {
|
|
1671
|
-
const
|
|
1672
|
-
M = (U) => BigInt.asUintN(
|
|
1671
|
+
const Y = I * 8;
|
|
1672
|
+
M = (U) => BigInt.asUintN(Y, U), N = M(N);
|
|
1673
1673
|
}
|
|
1674
|
-
CA(A, { name: g, fromWireType: M, toWireType: (
|
|
1674
|
+
CA(A, { name: g, fromWireType: M, toWireType: (Y, U) => (typeof U == "number" && (U = BigInt(U)), U), readValueFromPointer: sA(g, I, !K), destructorFunction: null });
|
|
1675
1675
|
};
|
|
1676
1676
|
function og(A, g, I, D) {
|
|
1677
1677
|
A >>>= 0, g >>>= 0, g = DA(g), CA(A, { name: g, fromWireType: function(N) {
|
|
@@ -1751,8 +1751,8 @@ async function _g(C = {}) {
|
|
|
1751
1751
|
var g = A.charCodeAt(0);
|
|
1752
1752
|
return g >= YQ && g <= UQ ? `_${A}` : A;
|
|
1753
1753
|
};
|
|
1754
|
-
function RQ(A, g, I, D, N, K, M,
|
|
1755
|
-
this.name = A, this.constructor = g, this.instancePrototype = I, this.rawDestructor = D, this.baseClass = N, this.getActualType = K, this.upcast = M, this.downcast =
|
|
1754
|
+
function RQ(A, g, I, D, N, K, M, Y) {
|
|
1755
|
+
this.name = A, this.constructor = g, this.instancePrototype = I, this.rawDestructor = D, this.baseClass = N, this.getActualType = K, this.upcast = M, this.downcast = Y, this.pureVirtualFunctions = [];
|
|
1756
1756
|
}
|
|
1757
1757
|
var eB = (A, g, I) => {
|
|
1758
1758
|
for (; g !== I; )
|
|
@@ -1847,10 +1847,10 @@ async function _g(C = {}) {
|
|
|
1847
1847
|
var K = this.registeredClass.getActualType(g), M = ag[K];
|
|
1848
1848
|
if (!M)
|
|
1849
1849
|
return N.call(this);
|
|
1850
|
-
var
|
|
1851
|
-
this.isConst ?
|
|
1852
|
-
var U = Sg(g, this.registeredClass,
|
|
1853
|
-
return U === null ? N.call(this) : this.isSmartPointer ? _B(
|
|
1850
|
+
var Y;
|
|
1851
|
+
this.isConst ? Y = M.constPointerType : Y = M.pointerType;
|
|
1852
|
+
var U = Sg(g, this.registeredClass, Y.registeredClass);
|
|
1853
|
+
return U === null ? N.call(this) : this.isSmartPointer ? _B(Y.registeredClass.instancePrototype, { ptrType: Y, ptr: U, smartPtrType: this, smartPtr: A }) : _B(Y.registeredClass.instancePrototype, { ptrType: Y, ptr: U });
|
|
1854
1854
|
}
|
|
1855
1855
|
var qQ = () => {
|
|
1856
1856
|
Object.assign($B.prototype, { getPointee(A) {
|
|
@@ -1860,8 +1860,8 @@ async function _g(C = {}) {
|
|
|
1860
1860
|
(g = this.rawDestructor) == null || g.call(this, A);
|
|
1861
1861
|
}, readValueFromPointer: uB, fromWireType: JQ });
|
|
1862
1862
|
};
|
|
1863
|
-
function $B(A, g, I, D, N, K, M,
|
|
1864
|
-
this.name = A, this.registeredClass = g, this.isReference = I, this.isConst = D, this.isSmartPointer = N, this.pointeeType = K, this.sharingPolicy = M, this.rawGetPointee =
|
|
1863
|
+
function $B(A, g, I, D, N, K, M, Y, U, s, S) {
|
|
1864
|
+
this.name = A, this.registeredClass = g, this.isReference = I, this.isConst = D, this.isSmartPointer = N, this.pointeeType = K, this.sharingPolicy = M, this.rawGetPointee = Y, this.rawConstructor = U, this.rawShare = s, this.rawDestructor = S, !N && g.baseClass === void 0 ? D ? (this.toWireType = kQ, this.destructorFunction = null) : (this.toWireType = cQ, this.destructorFunction = null) : this.toWireType = yQ;
|
|
1865
1865
|
}
|
|
1866
1866
|
var Jg = (A, g, I) => {
|
|
1867
1867
|
E.hasOwnProperty(A) || vB("Replacing nonexistent public symbol"), E[A].overloadTable !== void 0 && I !== void 0 ? E[A].overloadTable[I] = g : (E[A] = g, E[A].argCount = I);
|
|
@@ -1870,8 +1870,8 @@ async function _g(C = {}) {
|
|
|
1870
1870
|
return g || (qg[A] = g = rg.get(A)), g;
|
|
1871
1871
|
}, OQ = (A, g, I = [], D = !1) => {
|
|
1872
1872
|
var N = Og(g), K = N(...I);
|
|
1873
|
-
function M(
|
|
1874
|
-
return A[0] == "p" ?
|
|
1873
|
+
function M(Y) {
|
|
1874
|
+
return A[0] == "p" ? Y >>> 0 : Y;
|
|
1875
1875
|
}
|
|
1876
1876
|
return M(K);
|
|
1877
1877
|
}, zQ = (A, g, I = !1) => (...D) => OQ(A, g, D, I), wB = (A, g, I = !1) => {
|
|
@@ -1903,22 +1903,22 @@ async function _g(C = {}) {
|
|
|
1903
1903
|
}
|
|
1904
1904
|
throw g.forEach(N), new dQ(`${A}: ` + I.map(zg).join([", "]));
|
|
1905
1905
|
}, Bg = (A, g, I) => {
|
|
1906
|
-
A.forEach((
|
|
1907
|
-
function D(
|
|
1908
|
-
var U = I(
|
|
1906
|
+
A.forEach((Y) => uA[Y] = g);
|
|
1907
|
+
function D(Y) {
|
|
1908
|
+
var U = I(Y);
|
|
1909
1909
|
U.length !== A.length && vB("Mismatched type converter count");
|
|
1910
1910
|
for (var s = 0; s < A.length; ++s)
|
|
1911
1911
|
CA(A[s], U[s]);
|
|
1912
1912
|
}
|
|
1913
1913
|
var N = new Array(g.length), K = [], M = 0;
|
|
1914
|
-
for (let [
|
|
1915
|
-
xA.hasOwnProperty(U) ? N[
|
|
1916
|
-
N[
|
|
1914
|
+
for (let [Y, U] of g.entries())
|
|
1915
|
+
xA.hasOwnProperty(U) ? N[Y] = xA[U] : (K.push(U), eA.hasOwnProperty(U) || (eA[U] = []), eA[U].push(() => {
|
|
1916
|
+
N[Y] = xA[U], ++M, M === K.length && D(N);
|
|
1917
1917
|
}));
|
|
1918
1918
|
K.length === 0 && D(N);
|
|
1919
1919
|
};
|
|
1920
|
-
function pQ(A, g, I, D, N, K, M,
|
|
1921
|
-
A >>>= 0, g >>>= 0, I >>>= 0, D >>>= 0, N >>>= 0, K >>>= 0, M >>>= 0,
|
|
1920
|
+
function pQ(A, g, I, D, N, K, M, Y, U, s, S, t, P) {
|
|
1921
|
+
A >>>= 0, g >>>= 0, I >>>= 0, D >>>= 0, N >>>= 0, K >>>= 0, M >>>= 0, Y >>>= 0, U >>>= 0, s >>>= 0, S >>>= 0, t >>>= 0, P >>>= 0, S = DA(S), K = wB(N, K), Y && (Y = wB(M, Y)), s && (s = wB(U, s)), P = wB(t, P);
|
|
1922
1922
|
var J = hQ(S);
|
|
1923
1923
|
WB(J, function() {
|
|
1924
1924
|
Ag(`Cannot construct ${S} due to unbound types`, [D]);
|
|
@@ -1938,7 +1938,7 @@ async function _g(C = {}) {
|
|
|
1938
1938
|
return vg.apply(this, Yg);
|
|
1939
1939
|
}), NA = Object.create(gA, { constructor: { value: QA } });
|
|
1940
1940
|
QA.prototype = NA;
|
|
1941
|
-
var wA = new RQ(S, QA, NA, P, l, K,
|
|
1941
|
+
var wA = new RQ(S, QA, NA, P, l, K, Y, s);
|
|
1942
1942
|
wA.baseClass && ((ug = wA.baseClass).__derivedClasses ?? (ug.__derivedClasses = []), wA.baseClass.__derivedClasses.push(wA));
|
|
1943
1943
|
var RA = new $B(S, wA, !0, !1, !1), fA = new $B(S + "*", wA, !1, !1, !1), IA = new $B(S + " const*", wA, !1, !0, !1);
|
|
1944
1944
|
return ag[A] = { pointerType: fA, constPointerType: IA }, Jg(J, QA), [RA, fA, IA];
|
|
@@ -1949,8 +1949,8 @@ async function _g(C = {}) {
|
|
|
1949
1949
|
var g = A.pop(), I = A.pop();
|
|
1950
1950
|
I(g);
|
|
1951
1951
|
}
|
|
1952
|
-
}, dg = (A, g, I) => (A instanceof Object || b(`${I} with invalid "this": ${A}`), A instanceof g.registeredClass.constructor || b(`${I} incompatible with "this" of type ${A.constructor.name}`), A.$$.ptr || b(`cannot call emscripten binding method ${I} on deleted object`), eB(A.$$.ptr, A.$$.ptrType.registeredClass, g.registeredClass)), tQ = function(A, g, I, D, N, K, M,
|
|
1953
|
-
A >>>= 0, g >>>= 0, I >>>= 0, D >>>= 0, N >>>= 0, K >>>= 0, M >>>= 0,
|
|
1952
|
+
}, dg = (A, g, I) => (A instanceof Object || b(`${I} with invalid "this": ${A}`), A instanceof g.registeredClass.constructor || b(`${I} incompatible with "this" of type ${A.constructor.name}`), A.$$.ptr || b(`cannot call emscripten binding method ${I} on deleted object`), eB(A.$$.ptr, A.$$.ptrType.registeredClass, g.registeredClass)), tQ = function(A, g, I, D, N, K, M, Y, U, s) {
|
|
1953
|
+
A >>>= 0, g >>>= 0, I >>>= 0, D >>>= 0, N >>>= 0, K >>>= 0, M >>>= 0, Y >>>= 0, U >>>= 0, s >>>= 0, g = DA(g), N = wB(D, N), Bg([], [A], (S) => {
|
|
1954
1954
|
S = S[0];
|
|
1955
1955
|
var t = `${S.name}.${g}`, P = { get() {
|
|
1956
1956
|
Ag(`Cannot access ${t} due to unbound types`, [I, M]);
|
|
@@ -1961,7 +1961,7 @@ async function _g(C = {}) {
|
|
|
1961
1961
|
return f.fromWireType(N(K, QA));
|
|
1962
1962
|
}, enumerable: !0 };
|
|
1963
1963
|
if (U) {
|
|
1964
|
-
U = wB(
|
|
1964
|
+
U = wB(Y, U);
|
|
1965
1965
|
var gA = J[1];
|
|
1966
1966
|
l.set = function(QA) {
|
|
1967
1967
|
var NA = dg(this, S, t + " setter"), wA = [];
|
|
@@ -2042,8 +2042,8 @@ async function _g(C = {}) {
|
|
|
2042
2042
|
break;
|
|
2043
2043
|
}
|
|
2044
2044
|
case "string": {
|
|
2045
|
-
var
|
|
2046
|
-
CA(A, { name: g, valuesMap:
|
|
2045
|
+
var Y = {}, U = {}, M = {};
|
|
2046
|
+
CA(A, { name: g, valuesMap: Y, reverseMap: U, keysMap: M, valueType: K, fromWireType: function(S) {
|
|
2047
2047
|
return this.reverseMap[S];
|
|
2048
2048
|
}, toWireType: function(S, t) {
|
|
2049
2049
|
return this.valuesMap[t];
|
|
@@ -2099,11 +2099,11 @@ async function _g(C = {}) {
|
|
|
2099
2099
|
return !1;
|
|
2100
2100
|
}
|
|
2101
2101
|
function bQ(A, g, I, D) {
|
|
2102
|
-
var N = Pg(A), K = A.length - 2, M = [],
|
|
2103
|
-
g &&
|
|
2102
|
+
var N = Pg(A), K = A.length - 2, M = [], Y = ["fn"];
|
|
2103
|
+
g && Y.push("thisWired");
|
|
2104
2104
|
for (var U = 0; U < K; ++U)
|
|
2105
|
-
M.push(`arg${U}`),
|
|
2106
|
-
M = M.join(","),
|
|
2105
|
+
M.push(`arg${U}`), Y.push(`arg${U}Wired`);
|
|
2106
|
+
M = M.join(","), Y = Y.join(",");
|
|
2107
2107
|
var s = `return function (${M}) {
|
|
2108
2108
|
`;
|
|
2109
2109
|
N && (s += `var destructors = [];
|
|
@@ -2116,7 +2116,7 @@ async function _g(C = {}) {
|
|
|
2116
2116
|
s += `var arg${U}Wired = ${P}(${S}, arg${U});
|
|
2117
2117
|
`, t.push(P);
|
|
2118
2118
|
}
|
|
2119
|
-
if (s += (I || D ? "var rv = " : "") + `invoker(${
|
|
2119
|
+
if (s += (I || D ? "var rv = " : "") + `invoker(${Y});
|
|
2120
2120
|
`, N)
|
|
2121
2121
|
s += `runDestructors(destructors);
|
|
2122
2122
|
`;
|
|
@@ -2134,14 +2134,14 @@ return ret;
|
|
|
2134
2134
|
function lQ(A, g, I, D, N, K) {
|
|
2135
2135
|
var M = g.length;
|
|
2136
2136
|
M < 2 && b("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
2137
|
-
for (var
|
|
2137
|
+
for (var Y = g[1] !== null && I !== null, U = Pg(g), s = !g[0].isVoid, S = g[0], t = g[1], P = [A, b, D, N, Fg, S.fromWireType.bind(S), t == null ? void 0 : t.toWireType.bind(t)], J = 2; J < M; ++J) {
|
|
2138
2138
|
var f = g[J];
|
|
2139
2139
|
P.push(f.toWireType.bind(f));
|
|
2140
2140
|
}
|
|
2141
2141
|
if (!U)
|
|
2142
|
-
for (var J =
|
|
2142
|
+
for (var J = Y ? 1 : 2; J < g.length; ++J)
|
|
2143
2143
|
g[J].destructorFunction !== null && P.push(g[J].destructorFunction);
|
|
2144
|
-
var gA = bQ(g,
|
|
2144
|
+
var gA = bQ(g, Y, s, K)(...P);
|
|
2145
2145
|
return mB(A, gA);
|
|
2146
2146
|
}
|
|
2147
2147
|
var XQ = (A, g) => {
|
|
@@ -2153,7 +2153,7 @@ return ret;
|
|
|
2153
2153
|
const g = A.indexOf("(");
|
|
2154
2154
|
return g === -1 ? A : A.slice(0, g);
|
|
2155
2155
|
};
|
|
2156
|
-
function jQ(A, g, I, D, N, K, M,
|
|
2156
|
+
function jQ(A, g, I, D, N, K, M, Y) {
|
|
2157
2157
|
A >>>= 0, I >>>= 0, D >>>= 0, N >>>= 0, K >>>= 0;
|
|
2158
2158
|
var U = XQ(g, I);
|
|
2159
2159
|
A = DA(A), A = rQ(A), N = wB(D, N, M), WB(A, function() {
|
|
@@ -2168,8 +2168,8 @@ return ret;
|
|
|
2168
2168
|
const K = D === 0;
|
|
2169
2169
|
let M = (U) => U;
|
|
2170
2170
|
if (K) {
|
|
2171
|
-
var
|
|
2172
|
-
M = (U) => U <<
|
|
2171
|
+
var Y = 32 - 8 * I;
|
|
2172
|
+
M = (U) => U << Y >>> Y, N = M(N);
|
|
2173
2173
|
}
|
|
2174
2174
|
CA(A, { name: g, fromWireType: M, toWireType: (U, s) => s, readValueFromPointer: sA(g, I, D !== 0), destructorFunction: null });
|
|
2175
2175
|
};
|
|
@@ -2177,8 +2177,8 @@ return ret;
|
|
|
2177
2177
|
A >>>= 0, I >>>= 0;
|
|
2178
2178
|
var D = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, BigInt64Array, BigUint64Array], N = D[g];
|
|
2179
2179
|
function K(M) {
|
|
2180
|
-
var
|
|
2181
|
-
return new N(e.buffer, U,
|
|
2180
|
+
var Y = x[M >>> 2 >>> 0], U = x[M + 4 >>> 2 >>> 0];
|
|
2181
|
+
return new N(e.buffer, U, Y);
|
|
2182
2182
|
}
|
|
2183
2183
|
I = DA(I), CA(A, { name: I, fromWireType: K, readValueFromPointer: K }, { ignoreDuplicateRegistrations: !0 });
|
|
2184
2184
|
}
|
|
@@ -2191,8 +2191,8 @@ return ret;
|
|
|
2191
2191
|
D instanceof ArrayBuffer && (D = new Uint8Array(D));
|
|
2192
2192
|
var N, K = typeof D == "string";
|
|
2193
2193
|
K || ArrayBuffer.isView(D) && D.BYTES_PER_ELEMENT == 1 || b("Cannot pass non-string to std::string"), K ? N = OA(D) : N = D.length;
|
|
2194
|
-
var M = Qg(4 + N + 1),
|
|
2195
|
-
return x[M >>> 2 >>> 0] = N, K ? _A(D,
|
|
2194
|
+
var M = Qg(4 + N + 1), Y = M + 4;
|
|
2195
|
+
return x[M >>> 2 >>> 0] = N, K ? _A(D, Y, N + 1) : GA.set(D, Y >>> 0), I !== null && I.push($A, M), M;
|
|
2196
2196
|
}, readValueFromPointer: uB, destructorFunction(I) {
|
|
2197
2197
|
$A(I);
|
|
2198
2198
|
} });
|
|
@@ -2201,8 +2201,8 @@ return ret;
|
|
|
2201
2201
|
var D = A >>> 1, N = iB(HA, D, g / 2, I);
|
|
2202
2202
|
if (N - D > 16 && Vg) return Vg.decode(HA.subarray(D >>> 0, N >>> 0));
|
|
2203
2203
|
for (var K = "", M = D; M < N; ++M) {
|
|
2204
|
-
var
|
|
2205
|
-
K += String.fromCharCode(
|
|
2204
|
+
var Y = HA[M >>> 0];
|
|
2205
|
+
K += String.fromCharCode(Y);
|
|
2206
2206
|
}
|
|
2207
2207
|
return K;
|
|
2208
2208
|
}, vQ = (A, g, I) => {
|
|
@@ -2238,12 +2238,12 @@ return ret;
|
|
|
2238
2238
|
A >>>= 0, g >>>= 0, I >>>= 0, I = DA(I);
|
|
2239
2239
|
var D, N, K;
|
|
2240
2240
|
g === 2 ? (D = uQ, N = vQ, K = _Q) : (D = $Q, N = AC, K = BC), CA(A, { name: I, fromWireType: (M) => {
|
|
2241
|
-
var
|
|
2241
|
+
var Y = x[M >>> 2 >>> 0], U = D(M + 4, Y * g, !0);
|
|
2242
2242
|
return $A(M), U;
|
|
2243
|
-
}, toWireType: (M,
|
|
2244
|
-
typeof
|
|
2245
|
-
var U = K(
|
|
2246
|
-
return x[s >>> 2 >>> 0] = U / g, N(
|
|
2243
|
+
}, toWireType: (M, Y) => {
|
|
2244
|
+
typeof Y != "string" && b(`Cannot pass non-string to C++ string type ${I}`);
|
|
2245
|
+
var U = K(Y), s = Qg(4 + U + g);
|
|
2246
|
+
return x[s >>> 2 >>> 0] = U / g, N(Y, s + 4, U + g), M !== null && M.push($A, s), s;
|
|
2247
2247
|
}, readValueFromPointer: uB, destructorFunction(M) {
|
|
2248
2248
|
$A(M);
|
|
2249
2249
|
} });
|
|
@@ -2267,9 +2267,9 @@ return ret;
|
|
|
2267
2267
|
return g === void 0 ? DA(A) : g;
|
|
2268
2268
|
}, wC = function(A, g, I) {
|
|
2269
2269
|
g >>>= 0;
|
|
2270
|
-
var D = 8, [N, ...K] = IC(A, g), M = N.toWireType.bind(N),
|
|
2270
|
+
var D = 8, [N, ...K] = IC(A, g), M = N.toWireType.bind(N), Y = K.map((J) => J.readValueFromPointer.bind(J));
|
|
2271
2271
|
A--;
|
|
2272
|
-
var U = { toValue: hA.toValue }, s =
|
|
2272
|
+
var U = { toValue: hA.toValue }, s = Y.map((J, f) => {
|
|
2273
2273
|
var l = `argFromPtr${f}`;
|
|
2274
2274
|
return U[l] = J, `${l}(args${f ? "+" + f * D : ""})`;
|
|
2275
2275
|
}), S;
|
|
@@ -2332,11 +2332,11 @@ ${S}
|
|
|
2332
2332
|
var I = new Date(Z[A + 20 >>> 2 >>> 0] + 1900, Z[A + 16 >>> 2 >>> 0], Z[A + 12 >>> 2 >>> 0], Z[A + 8 >>> 2 >>> 0], Z[A + 4 >>> 2 >>> 0], Z[A >>> 2 >>> 0], 0);
|
|
2333
2333
|
if (isNaN(I.getTime()))
|
|
2334
2334
|
return -1;
|
|
2335
|
-
var D = Z[A + 32 >>> 2 >>> 0], N = I.getTimezoneOffset(), K = new Date(I.getFullYear(), 0, 1), M = new Date(I.getFullYear(), 6, 1).getTimezoneOffset(),
|
|
2335
|
+
var D = Z[A + 32 >>> 2 >>> 0], N = I.getTimezoneOffset(), K = new Date(I.getFullYear(), 0, 1), M = new Date(I.getFullYear(), 6, 1).getTimezoneOffset(), Y = K.getTimezoneOffset(), U = Math.min(Y, M);
|
|
2336
2336
|
if (D < 0)
|
|
2337
|
-
Z[A + 32 >>> 2 >>> 0] = +(M !=
|
|
2337
|
+
Z[A + 32 >>> 2 >>> 0] = +(M != Y && U == N);
|
|
2338
2338
|
else if (D > 0 != (U == N)) {
|
|
2339
|
-
var s = Math.max(
|
|
2339
|
+
var s = Math.max(Y, M), S = D > 0 ? U : s;
|
|
2340
2340
|
I.setTime(I.getTime() + (S - N) * 6e4);
|
|
2341
2341
|
}
|
|
2342
2342
|
Z[A + 24 >>> 2 >>> 0] = I.getDay();
|
|
@@ -2346,13 +2346,13 @@ ${S}
|
|
|
2346
2346
|
return BigInt(g);
|
|
2347
2347
|
}, yC = function(A, g, I, D) {
|
|
2348
2348
|
A >>>= 0, g >>>= 0, I >>>= 0, D >>>= 0;
|
|
2349
|
-
var N = (/* @__PURE__ */ new Date()).getFullYear(), K = new Date(N, 0, 1), M = new Date(N, 6, 1),
|
|
2350
|
-
x[A >>> 2 >>> 0] = s * 60, Z[g >>> 2 >>> 0] = +(
|
|
2349
|
+
var N = (/* @__PURE__ */ new Date()).getFullYear(), K = new Date(N, 0, 1), M = new Date(N, 6, 1), Y = K.getTimezoneOffset(), U = M.getTimezoneOffset(), s = Math.max(Y, U);
|
|
2350
|
+
x[A >>> 2 >>> 0] = s * 60, Z[g >>> 2 >>> 0] = +(Y != U);
|
|
2351
2351
|
var S = (J) => {
|
|
2352
2352
|
var f = J >= 0 ? "-" : "+", l = Math.abs(J), gA = String(Math.floor(l / 60)).padStart(2, "0"), QA = String(l % 60).padStart(2, "0");
|
|
2353
2353
|
return `UTC${f}${gA}${QA}`;
|
|
2354
|
-
}, t = S(
|
|
2355
|
-
U <
|
|
2354
|
+
}, t = S(Y), P = S(U);
|
|
2355
|
+
U < Y ? (_A(t, I, 17), _A(P, D, 17)) : (_A(t, D, 17), _A(P, I, 17));
|
|
2356
2356
|
}, cC = () => Date.now();
|
|
2357
2357
|
function LC(A) {
|
|
2358
2358
|
return A >>>= 0, a(nA(A));
|
|
@@ -2420,11 +2420,11 @@ ${S}
|
|
|
2420
2420
|
}
|
|
2421
2421
|
var tC = (A, g, I, D) => {
|
|
2422
2422
|
for (var N = 0, K = 0; K < I; K++) {
|
|
2423
|
-
var M = x[g >>> 2 >>> 0],
|
|
2423
|
+
var M = x[g >>> 2 >>> 0], Y = x[g + 4 >>> 2 >>> 0];
|
|
2424
2424
|
g += 8;
|
|
2425
|
-
var U = o.read(A, e, M,
|
|
2425
|
+
var U = o.read(A, e, M, Y, D);
|
|
2426
2426
|
if (U < 0) return -1;
|
|
2427
|
-
if (N += U, U <
|
|
2427
|
+
if (N += U, U < Y) break;
|
|
2428
2428
|
}
|
|
2429
2429
|
return N;
|
|
2430
2430
|
};
|
|
@@ -2451,11 +2451,11 @@ ${S}
|
|
|
2451
2451
|
}
|
|
2452
2452
|
var WC = (A, g, I, D) => {
|
|
2453
2453
|
for (var N = 0, K = 0; K < I; K++) {
|
|
2454
|
-
var M = x[g >>> 2 >>> 0],
|
|
2454
|
+
var M = x[g >>> 2 >>> 0], Y = x[g + 4 >>> 2 >>> 0];
|
|
2455
2455
|
g += 8;
|
|
2456
|
-
var U = o.write(A, e, M,
|
|
2456
|
+
var U = o.write(A, e, M, Y, D);
|
|
2457
2457
|
if (U < 0) return -1;
|
|
2458
|
-
if (N += U, U <
|
|
2458
|
+
if (N += U, U < Y)
|
|
2459
2459
|
break;
|
|
2460
2460
|
}
|
|
2461
2461
|
return N;
|
|
@@ -2492,13 +2492,13 @@ ${S}
|
|
|
2492
2492
|
function M(f) {
|
|
2493
2493
|
return g === "string" ? nA(f) : g === "pointer" ? f >>> 0 : g === "boolean" ? !!f : f;
|
|
2494
2494
|
}
|
|
2495
|
-
var
|
|
2495
|
+
var Y = Zg(A), U = [], s = 0;
|
|
2496
2496
|
if (D)
|
|
2497
2497
|
for (var S = 0; S < D.length; S++) {
|
|
2498
2498
|
var t = K[I[S]];
|
|
2499
2499
|
t ? (s === 0 && (s = sB()), U[S] = t(D[S])) : U[S] = D[S];
|
|
2500
2500
|
}
|
|
2501
|
-
var P =
|
|
2501
|
+
var P = Y(...U);
|
|
2502
2502
|
function J(f) {
|
|
2503
2503
|
return s !== 0 && r(s), M(f);
|
|
2504
2504
|
}
|
|
@@ -3168,6 +3168,8 @@ class EI {
|
|
|
3168
3168
|
return this.convertAlignedDimension(G, w);
|
|
3169
3169
|
if (F == d.DWG_TYPE_DIMENSION_ANG3PT)
|
|
3170
3170
|
return this.convert3PointAngularDimension(G, w);
|
|
3171
|
+
if (F == d.DWG_TYPE_DIMENSION_ANG2LN)
|
|
3172
|
+
return this.convert2LineAngularDimension(G, w);
|
|
3171
3173
|
if (F == d.DWG_TYPE_DIMENSION_DIAMETER)
|
|
3172
3174
|
return this.convertDiameterDimension(G, w);
|
|
3173
3175
|
if (F == d.DWG_TYPE_DIMENSION_ORDINATE)
|
|
@@ -3232,7 +3234,7 @@ class EI {
|
|
|
3232
3234
|
}
|
|
3233
3235
|
}
|
|
3234
3236
|
convert3dFace(B, E) {
|
|
3235
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "corner1"), w = Q.dwg_dynapi_entity_data(B, "corner2"), F = Q.dwg_dynapi_entity_data(B, "corner3"), i = Q.dwg_dynapi_entity_data(B, "corner4"),
|
|
3237
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "corner1"), w = Q.dwg_dynapi_entity_data(B, "corner2"), F = Q.dwg_dynapi_entity_data(B, "corner3"), i = Q.dwg_dynapi_entity_data(B, "corner4"), H = Q.dwg_dynapi_entity_data(B, "invis_flags");
|
|
3236
3238
|
return {
|
|
3237
3239
|
type: "3DFACE",
|
|
3238
3240
|
...E,
|
|
@@ -3240,28 +3242,28 @@ class EI {
|
|
|
3240
3242
|
corner2: w,
|
|
3241
3243
|
corner3: F,
|
|
3242
3244
|
corner4: i,
|
|
3243
|
-
flag:
|
|
3245
|
+
flag: H
|
|
3244
3246
|
};
|
|
3245
3247
|
}
|
|
3246
3248
|
convertArc(B, E) {
|
|
3247
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "center"), w = Q.dwg_dynapi_entity_data(B, "radius"), F = Q.dwg_dynapi_entity_data(B, "thickness"), i = Q.dwg_dynapi_entity_data(B, "extrusion"),
|
|
3249
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "center"), w = Q.dwg_dynapi_entity_data(B, "radius"), F = Q.dwg_dynapi_entity_data(B, "thickness"), i = Q.dwg_dynapi_entity_data(B, "extrusion"), H = Q.dwg_dynapi_entity_data(B, "start_angle"), h = Q.dwg_dynapi_entity_data(B, "end_angle");
|
|
3248
3250
|
return {
|
|
3249
3251
|
type: "ARC",
|
|
3250
3252
|
...E,
|
|
3251
3253
|
thickness: F,
|
|
3252
3254
|
center: G,
|
|
3253
3255
|
radius: w,
|
|
3254
|
-
startAngle:
|
|
3256
|
+
startAngle: H,
|
|
3255
3257
|
endAngle: h,
|
|
3256
3258
|
extrusionDirection: i
|
|
3257
3259
|
};
|
|
3258
3260
|
}
|
|
3259
3261
|
convertEmbeddedMText(B, E) {
|
|
3260
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_subclass_data(B, E, "attachment"), w = Q.dwg_dynapi_subclass_data(B, E, "ins_pt"), F = Q.dwg_dynapi_subclass_data(B, E, "x_axis_dir"), i = Q.dwg_dynapi_subclass_data(B, E, "rect_height"),
|
|
3262
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_subclass_data(B, E, "attachment"), w = Q.dwg_dynapi_subclass_data(B, E, "ins_pt"), F = Q.dwg_dynapi_subclass_data(B, E, "x_axis_dir"), i = Q.dwg_dynapi_subclass_data(B, E, "rect_height"), H = Q.dwg_dynapi_subclass_data(B, E, "rect_width"), h = Q.dwg_dynapi_subclass_data(B, E, "extents_height"), R = Q.dwg_dynapi_subclass_data(B, E, "extents_width");
|
|
3261
3263
|
return {
|
|
3262
3264
|
insertionPoint: w,
|
|
3263
3265
|
rectHeight: i,
|
|
3264
|
-
rectWidth:
|
|
3266
|
+
rectWidth: H,
|
|
3265
3267
|
extentsHeight: h,
|
|
3266
3268
|
extentsWidth: R,
|
|
3267
3269
|
attachmentPoint: G,
|
|
@@ -3278,14 +3280,14 @@ class EI {
|
|
|
3278
3280
|
convertAttdef(B, E) {
|
|
3279
3281
|
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "default_value"), w = this.convertTextBase(B);
|
|
3280
3282
|
w.text = G;
|
|
3281
|
-
const F = Q.dwg_dynapi_entity_data(B, "prompt"), i = Q.dwg_dynapi_entity_data(B, "tag"),
|
|
3283
|
+
const F = Q.dwg_dynapi_entity_data(B, "prompt"), i = Q.dwg_dynapi_entity_data(B, "tag"), H = Q.dwg_dynapi_entity_data(B, "flags"), h = Q.dwg_dynapi_entity_data(B, "field_length"), R = Q.dwg_dynapi_entity_data(B, "lock_position_flag"), y = Q.dwg_dynapi_entity_data(B, "keep_duplicate_records"), c = Q.dwg_dynapi_entity_data(B, "is_really_locked"), k = Q.dwg_dynapi_entity_data(B, "mtext_type"), O = Q.dwg_dynapi_entity_data(B, "alignment_pt");
|
|
3282
3284
|
return {
|
|
3283
3285
|
type: "ATTDEF",
|
|
3284
3286
|
...E,
|
|
3285
3287
|
text: this.convertTextBase(B),
|
|
3286
3288
|
prompt: F,
|
|
3287
3289
|
tag: i,
|
|
3288
|
-
flags:
|
|
3290
|
+
flags: H,
|
|
3289
3291
|
fieldLength: h,
|
|
3290
3292
|
lockPositionFlag: R > 0,
|
|
3291
3293
|
duplicateRecordCloningFlag: y > 0,
|
|
@@ -3300,7 +3302,7 @@ class EI {
|
|
|
3300
3302
|
};
|
|
3301
3303
|
}
|
|
3302
3304
|
convertAttrib(B, E) {
|
|
3303
|
-
const Q = this.libredwg, G = this.convertTextBase(B), w = Q.dwg_dynapi_entity_data(B, "tag"), F = Q.dwg_dynapi_entity_data(B, "flags"), i = Q.dwg_dynapi_entity_data(B, "field_length"),
|
|
3305
|
+
const Q = this.libredwg, G = this.convertTextBase(B), w = Q.dwg_dynapi_entity_data(B, "tag"), F = Q.dwg_dynapi_entity_data(B, "flags"), i = Q.dwg_dynapi_entity_data(B, "field_length"), H = Q.dwg_dynapi_entity_data(B, "lock_position_flag"), h = Q.dwg_dynapi_entity_data(B, "keep_duplicate_records"), R = Q.dwg_dynapi_entity_data(B, "mtext_type"), y = Q.dwg_dynapi_entity_data(B, "is_really_locked"), c = Q.dwg_dynapi_entity_data(B, "alignment_pt");
|
|
3304
3306
|
return {
|
|
3305
3307
|
type: "ATTRIB",
|
|
3306
3308
|
...E,
|
|
@@ -3308,7 +3310,7 @@ class EI {
|
|
|
3308
3310
|
tag: w,
|
|
3309
3311
|
flags: F,
|
|
3310
3312
|
fieldLength: i,
|
|
3311
|
-
lockPositionFlag: !!
|
|
3313
|
+
lockPositionFlag: !!H,
|
|
3312
3314
|
duplicateRecordCloningFlag: !!h,
|
|
3313
3315
|
mtextFlag: R,
|
|
3314
3316
|
isReallyLocked: !!y,
|
|
@@ -3336,7 +3338,7 @@ class EI {
|
|
|
3336
3338
|
};
|
|
3337
3339
|
}
|
|
3338
3340
|
convertAlignedDimension(B, E) {
|
|
3339
|
-
const Q = this.libredwg, G = this.getDimensionCommonAttrs(B), w = Q.dwg_dynapi_entity_data(B, "clone_ins_pt"), F = Q.dwg_dynapi_entity_data(B, "xline1_pt"), i = Q.dwg_dynapi_entity_data(B, "xline2_pt"),
|
|
3341
|
+
const Q = this.libredwg, G = this.getDimensionCommonAttrs(B), w = Q.dwg_dynapi_entity_data(B, "clone_ins_pt"), F = Q.dwg_dynapi_entity_data(B, "xline1_pt"), i = Q.dwg_dynapi_entity_data(B, "xline2_pt"), H = Q.dwg_dynapi_entity_data(B, "ins_rotation"), h = Q.dwg_dynapi_entity_data(B, "oblique_angle");
|
|
3340
3342
|
return {
|
|
3341
3343
|
subclassMarker: "AcDbAlignedDimension",
|
|
3342
3344
|
...E,
|
|
@@ -3344,12 +3346,12 @@ class EI {
|
|
|
3344
3346
|
insertionPoint: w,
|
|
3345
3347
|
subDefinitionPoint1: F,
|
|
3346
3348
|
subDefinitionPoint2: i,
|
|
3347
|
-
rotationAngle:
|
|
3349
|
+
rotationAngle: H ?? 0,
|
|
3348
3350
|
obliqueAngle: h
|
|
3349
3351
|
};
|
|
3350
3352
|
}
|
|
3351
3353
|
convert3PointAngularDimension(B, E) {
|
|
3352
|
-
const Q = this.libredwg, G = this.getDimensionCommonAttrs(B), w = Q.dwg_dynapi_entity_data(B, "xline1_pt"), F = Q.dwg_dynapi_entity_data(B, "xline2_pt"), i = Q.dwg_dynapi_entity_data(B, "center_pt"),
|
|
3354
|
+
const Q = this.libredwg, G = this.getDimensionCommonAttrs(B), w = Q.dwg_dynapi_entity_data(B, "xline1_pt"), F = Q.dwg_dynapi_entity_data(B, "xline2_pt"), i = Q.dwg_dynapi_entity_data(B, "center_pt"), H = Q.dwg_dynapi_entity_data(B, "xline2end_pt");
|
|
3353
3355
|
return {
|
|
3354
3356
|
subclassMarker: "AcDb3PointAngularDimension",
|
|
3355
3357
|
...E,
|
|
@@ -3357,7 +3359,19 @@ class EI {
|
|
|
3357
3359
|
subDefinitionPoint1: w,
|
|
3358
3360
|
subDefinitionPoint2: F,
|
|
3359
3361
|
centerPoint: i,
|
|
3360
|
-
arcPoint:
|
|
3362
|
+
arcPoint: H
|
|
3363
|
+
};
|
|
3364
|
+
}
|
|
3365
|
+
convert2LineAngularDimension(B, E) {
|
|
3366
|
+
const Q = this.libredwg, G = this.getDimensionCommonAttrs(B), w = Q.dwg_dynapi_entity_data(B, "xline1start_pt"), F = Q.dwg_dynapi_entity_data(B, "xline1end_pt"), i = Q.dwg_dynapi_entity_data(B, "xline2start_pt"), H = Q.dwg_dynapi_entity_data(B, "xline2end_pt"), h = Q.dwg_dynapi_entity_data(B, "def_pt");
|
|
3367
|
+
return H && (G.definitionPoint = H), {
|
|
3368
|
+
subclassMarker: "AcDb2LineAngularDimension",
|
|
3369
|
+
...E,
|
|
3370
|
+
...G,
|
|
3371
|
+
subDefinitionPoint1: w ?? F ?? h ?? H,
|
|
3372
|
+
subDefinitionPoint2: i ?? H ?? h ?? F,
|
|
3373
|
+
centerPoint: h ?? i ?? F ?? H,
|
|
3374
|
+
arcPoint: H ?? G.definitionPoint
|
|
3361
3375
|
};
|
|
3362
3376
|
}
|
|
3363
3377
|
convertDiameterDimension(B, E) {
|
|
@@ -3391,7 +3405,7 @@ class EI {
|
|
|
3391
3405
|
};
|
|
3392
3406
|
}
|
|
3393
3407
|
convertEllise(B, E) {
|
|
3394
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "center"), w = Q.dwg_dynapi_entity_data(B, "sm_axis"), F = Q.dwg_dynapi_entity_data(B, "extrusion"), i = Q.dwg_dynapi_entity_data(B, "axis_ratio"),
|
|
3408
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "center"), w = Q.dwg_dynapi_entity_data(B, "sm_axis"), F = Q.dwg_dynapi_entity_data(B, "extrusion"), i = Q.dwg_dynapi_entity_data(B, "axis_ratio"), H = Q.dwg_dynapi_entity_data(B, "start_angle"), h = Q.dwg_dynapi_entity_data(B, "end_angle");
|
|
3395
3409
|
return {
|
|
3396
3410
|
type: "ELLIPSE",
|
|
3397
3411
|
...E,
|
|
@@ -3399,14 +3413,14 @@ class EI {
|
|
|
3399
3413
|
majorAxisEndPoint: w,
|
|
3400
3414
|
extrusionDirection: F,
|
|
3401
3415
|
axisRatio: i,
|
|
3402
|
-
startAngle:
|
|
3416
|
+
startAngle: H,
|
|
3403
3417
|
endAngle: h
|
|
3404
3418
|
};
|
|
3405
3419
|
}
|
|
3406
3420
|
convertHatch(B, E) {
|
|
3407
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "extrusion"), w = Q.dwg_dynapi_entity_data(B, "name"), F = Q.dwg_dynapi_entity_data(B, "is_solid_fill"), i = Q.dwg_dynapi_entity_data(B, "is_associative"),
|
|
3421
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "extrusion"), w = Q.dwg_dynapi_entity_data(B, "name"), F = Q.dwg_dynapi_entity_data(B, "is_solid_fill"), i = Q.dwg_dynapi_entity_data(B, "is_associative"), H = Q.dwg_dynapi_entity_data(B, "num_paths"), h = Q.dwg_dynapi_entity_data(B, "paths"), R = Q.dwg_ptr_to_hatch_path_array(
|
|
3408
3422
|
h,
|
|
3409
|
-
|
|
3423
|
+
H
|
|
3410
3424
|
), y = Q.dwg_dynapi_entity_data(B, "style"), c = Q.dwg_dynapi_entity_data(B, "pattern_type"), k = Q.dwg_dynapi_entity_data(B, "angle"), O = Q.dwg_dynapi_entity_data(B, "scale_spacing"), a = Q.dwg_dynapi_entity_data(B, "num_deflines"), L = Q.dwg_dynapi_entity_data(B, "deflines"), q = Q.dwg_ptr_to_hatch_defline_array(
|
|
3411
3425
|
L,
|
|
3412
3426
|
a
|
|
@@ -3421,7 +3435,7 @@ class EI {
|
|
|
3421
3435
|
solidFill: F ? Rg.SolidFill : Rg.PatternFill,
|
|
3422
3436
|
// patternFillColor: number
|
|
3423
3437
|
associativity: i ? kg.Associative : kg.NonAssociative,
|
|
3424
|
-
numberOfBoundaryPaths:
|
|
3438
|
+
numberOfBoundaryPaths: H,
|
|
3425
3439
|
boundaryPaths: this.convertHatchBoundaryPaths(R),
|
|
3426
3440
|
hatchStyle: y,
|
|
3427
3441
|
patternType: c,
|
|
@@ -3529,7 +3543,7 @@ class EI {
|
|
|
3529
3543
|
});
|
|
3530
3544
|
}
|
|
3531
3545
|
convertImage(B, E) {
|
|
3532
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "class_version"), w = Q.dwg_dynapi_entity_data(B, "pt0"), F = Q.dwg_dynapi_entity_data(B, "uvec"), i = Q.dwg_dynapi_entity_data(B, "vvec"),
|
|
3546
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "class_version"), w = Q.dwg_dynapi_entity_data(B, "pt0"), F = Q.dwg_dynapi_entity_data(B, "uvec"), i = Q.dwg_dynapi_entity_data(B, "vvec"), H = Q.dwg_dynapi_entity_data(B, "image_size"), h = Q.dwg_dynapi_entity_data(B, "display_props"), R = Q.dwg_dynapi_entity_data(B, "clipping"), y = Q.dwg_dynapi_entity_data(B, "brightness"), c = Q.dwg_dynapi_entity_data(B, "contrast"), k = Q.dwg_dynapi_entity_data(B, "fade"), O = Q.dwg_dynapi_entity_data(B, "clip_mode"), a = Q.dwg_dynapi_entity_data(B, "clip_boundary_type"), L = Q.dwg_dynapi_entity_data(B, "num_clip_verts"), q = Q.dwg_dynapi_entity_data(B, "clip_verts"), z = Q.dwg_ptr_to_point3d_array(
|
|
3533
3547
|
q,
|
|
3534
3548
|
L
|
|
3535
3549
|
), p = Q.dwg_dynapi_entity_data(B, "imagedef"), W = Q.dwg_ref_get_id(p) ?? "", T = Q.dwg_dynapi_entity_data(B, "imagedefreactor"), X = Q.dwg_ref_get_id(T) ?? "";
|
|
@@ -3540,7 +3554,7 @@ class EI {
|
|
|
3540
3554
|
position: w,
|
|
3541
3555
|
uPixel: F,
|
|
3542
3556
|
vPixel: i,
|
|
3543
|
-
imageSize:
|
|
3557
|
+
imageSize: H,
|
|
3544
3558
|
imageDefHandle: W,
|
|
3545
3559
|
flags: h,
|
|
3546
3560
|
clipping: R,
|
|
@@ -3566,7 +3580,7 @@ class EI {
|
|
|
3566
3580
|
}
|
|
3567
3581
|
}
|
|
3568
3582
|
G || (G = Q.dwg_dynapi_entity_data(B, "block_name"));
|
|
3569
|
-
const F = Q.dwg_dynapi_entity_data(B, "ins_pt"), i = Q.dwg_dynapi_entity_data(B, "scale"),
|
|
3583
|
+
const F = Q.dwg_dynapi_entity_data(B, "ins_pt"), i = Q.dwg_dynapi_entity_data(B, "scale"), H = Q.dwg_dynapi_entity_data(B, "rotation"), h = Q.dwg_dynapi_entity_data(B, "num_cols"), R = Q.dwg_dynapi_entity_data(B, "num_rows"), y = Q.dwg_dynapi_entity_data(B, "col_spacing"), c = Q.dwg_dynapi_entity_data(B, "row_spacing"), k = Q.dwg_dynapi_entity_data(B, "extrusion"), O = Q.dwg_entity_insert_get_attribs(B), a = [];
|
|
3570
3584
|
return O.forEach((L) => {
|
|
3571
3585
|
const q = Q.dwg_object_to_entity(L), z = Q.dwg_object_to_entity_tio(L);
|
|
3572
3586
|
if (q && z) {
|
|
@@ -3581,7 +3595,7 @@ class EI {
|
|
|
3581
3595
|
xScale: i ? i.x : 1,
|
|
3582
3596
|
yScale: i ? i.y : 1,
|
|
3583
3597
|
zScale: i ? i.z : 1,
|
|
3584
|
-
rotation:
|
|
3598
|
+
rotation: H,
|
|
3585
3599
|
columnCount: h,
|
|
3586
3600
|
rowCount: R,
|
|
3587
3601
|
columnSpacing: y,
|
|
@@ -3591,7 +3605,7 @@ class EI {
|
|
|
3591
3605
|
};
|
|
3592
3606
|
}
|
|
3593
3607
|
convertLeader(B, E) {
|
|
3594
|
-
const Q = this.libredwg, G = Q.dwg_entity_mtext_get_style_name(B), w = Q.dwg_dynapi_entity_data(B, "arrowhead_type"), F = Q.dwg_dynapi_entity_data(B, "path_type"), i = Q.dwg_dynapi_entity_data(B, "annot_type"),
|
|
3608
|
+
const Q = this.libredwg, G = Q.dwg_entity_mtext_get_style_name(B), w = Q.dwg_dynapi_entity_data(B, "arrowhead_type"), F = Q.dwg_dynapi_entity_data(B, "path_type"), i = Q.dwg_dynapi_entity_data(B, "annot_type"), H = Q.dwg_dynapi_entity_data(B, "hookline_dir"), h = Q.dwg_dynapi_entity_data(B, "hookline_on"), R = Q.dwg_dynapi_entity_data(B, "box_height"), y = Q.dwg_dynapi_entity_data(B, "box_width"), c = Q.dwg_dynapi_entity_data(B, "num_points"), k = Q.dwg_dynapi_entity_data(B, "points"), O = c > 0 ? Q.dwg_ptr_to_point3d_array(k, c) : [], a = Q.dwg_dynapi_entity_data(B, "byblock_color"), L = Q.dwg_dynapi_entity_data(B, "extrusion"), q = Q.dwg_dynapi_entity_data(B, "x_direction"), z = Q.dwg_dynapi_entity_data(B, "inspt_offset"), p = Q.dwg_dynapi_entity_data(B, "endptproj");
|
|
3595
3609
|
return {
|
|
3596
3610
|
type: "LEADER",
|
|
3597
3611
|
...E,
|
|
@@ -3599,7 +3613,7 @@ class EI {
|
|
|
3599
3613
|
isArrowheadEnabled: w > 0,
|
|
3600
3614
|
isSpline: F > 0,
|
|
3601
3615
|
leaderCreationFlag: i,
|
|
3602
|
-
isHooklineSameDirection:
|
|
3616
|
+
isHooklineSameDirection: H > 0,
|
|
3603
3617
|
isHooklineExists: h > 0,
|
|
3604
3618
|
textHeight: R,
|
|
3605
3619
|
textWidth: y,
|
|
@@ -3624,7 +3638,7 @@ class EI {
|
|
|
3624
3638
|
};
|
|
3625
3639
|
}
|
|
3626
3640
|
convertLWPolyline(B, E) {
|
|
3627
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "num_points"), w = Q.dwg_dynapi_entity_data(B, "flag"), F = Q.dwg_dynapi_entity_data(B, "const_width"), i = Q.dwg_dynapi_entity_data(B, "elevation"),
|
|
3641
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "num_points"), w = Q.dwg_dynapi_entity_data(B, "flag"), F = Q.dwg_dynapi_entity_data(B, "const_width"), i = Q.dwg_dynapi_entity_data(B, "elevation"), H = Q.dwg_dynapi_entity_data(B, "thickness"), h = Q.dwg_dynapi_entity_data(B, "extrusion"), R = [], y = Q.dwg_dynapi_entity_data(B, "num_points"), c = Q.dwg_dynapi_entity_data(B, "points"), k = Q.dwg_ptr_to_point2d_array(c, y), O = Q.dwg_dynapi_entity_data(B, "num_bulges"), a = Q.dwg_dynapi_entity_data(B, "bulges"), L = Q.dwg_ptr_to_double_array(a, O);
|
|
3628
3642
|
return k.forEach((q, z) => {
|
|
3629
3643
|
R.push({
|
|
3630
3644
|
id: z,
|
|
@@ -3639,13 +3653,13 @@ class EI {
|
|
|
3639
3653
|
flag: w,
|
|
3640
3654
|
constantWidth: F,
|
|
3641
3655
|
elevation: i,
|
|
3642
|
-
thickness:
|
|
3656
|
+
thickness: H,
|
|
3643
3657
|
extrusionDirection: h,
|
|
3644
3658
|
vertices: R
|
|
3645
3659
|
};
|
|
3646
3660
|
}
|
|
3647
3661
|
convertMLine(B, E) {
|
|
3648
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "scale"), w = Q.dwg_dynapi_entity_data(B, "flags"), F = Q.dwg_dynapi_entity_data(B, "justification"), i = Q.dwg_dynapi_entity_data(B, "base_point"),
|
|
3662
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "scale"), w = Q.dwg_dynapi_entity_data(B, "flags"), F = Q.dwg_dynapi_entity_data(B, "justification"), i = Q.dwg_dynapi_entity_data(B, "base_point"), H = Q.dwg_dynapi_entity_data(B, "extrusion"), h = Q.dwg_dynapi_entity_data(B, "num_lines"), R = Q.dwg_dynapi_entity_data(B, "num_verts"), y = Q.dwg_dynapi_entity_data(B, "verts"), c = Q.dwg_ptr_to_mline_vertex_array(
|
|
3649
3663
|
y,
|
|
3650
3664
|
R
|
|
3651
3665
|
), k = [];
|
|
@@ -3669,7 +3683,7 @@ class EI {
|
|
|
3669
3683
|
flags: w,
|
|
3670
3684
|
justification: F,
|
|
3671
3685
|
startPoint: i,
|
|
3672
|
-
extrusionDirection:
|
|
3686
|
+
extrusionDirection: H,
|
|
3673
3687
|
numberOfLines: h,
|
|
3674
3688
|
numberOfVertices: R,
|
|
3675
3689
|
vertices: k,
|
|
@@ -3678,7 +3692,7 @@ class EI {
|
|
|
3678
3692
|
};
|
|
3679
3693
|
}
|
|
3680
3694
|
convertMultiLeader(B, E) {
|
|
3681
|
-
const Q = this.libredwg, G = (n) => Q.dwg_dynapi_entity_data(B, n), w = (n, _, mA) => Q.dwg_dynapi_subclass_data(n, _, mA), F = (n) => Q.dwg_ref_get_id(n), i = (n) => n > 0,
|
|
3695
|
+
const Q = this.libredwg, G = (n) => Q.dwg_dynapi_entity_data(B, n), w = (n, _, mA) => Q.dwg_dynapi_subclass_data(n, _, mA), F = (n) => Q.dwg_ref_get_id(n), i = (n) => n > 0, H = (n) => n != null ? wQ(n) : void 0, h = G("class_version"), R = F(G("mleaderstyle")), y = G("flags"), c = G("type"), k = H(G("line_color")), O = F(G("line_ltype")), a = G("line_linewt"), L = i(G("has_landing")), q = i(G("has_dogleg")), z = G("landing_dist"), p = F(G("arrow_handle")), W = G("arrow_size"), T = G("style_content"), X = F(G("text_style")), AA = G("text_left"), m = G("text_right"), MA = G("text_angletype"), u = G("text_alignment"), FA = H(G("text_color")), KA = i(G("has_text_frame")), iA = F(G("block_style")), cA = H(G("block_color")), pA = G("block_scale"), tA = G("block_rotation"), PA = G("style_attachment"), VA = i(G("is_annotative")), oA = i(G("is_neg_textdir")), Z = G("ipe_alignment");
|
|
3682
3696
|
let $ = G("justification");
|
|
3683
3697
|
const e = G("attach_dir"), WA = G("attach_bottom"), ZA = G("attach_top"), HA = G("scale_factor"), x = G("num_arrowheads"), TA = G("arrowheads"), GA = Q.dwg_dynapi_subclass_size("LEADER_ArrowHead"), SA = [];
|
|
3684
3698
|
for (let n = 0; n < x; n++) {
|
|
@@ -3807,7 +3821,7 @@ class EI {
|
|
|
3807
3821
|
r,
|
|
3808
3822
|
"MLEADER_Content_MText",
|
|
3809
3823
|
"flow"
|
|
3810
|
-
), IB =
|
|
3824
|
+
), IB = H(
|
|
3811
3825
|
w(
|
|
3812
3826
|
r,
|
|
3813
3827
|
"MLEADER_Content_MText",
|
|
@@ -3905,7 +3919,7 @@ class EI {
|
|
|
3905
3919
|
"MLEADER_Content_Block",
|
|
3906
3920
|
"rotation"
|
|
3907
3921
|
),
|
|
3908
|
-
color:
|
|
3922
|
+
color: H(
|
|
3909
3923
|
w(
|
|
3910
3924
|
r,
|
|
3911
3925
|
"MLEADER_Content_Block",
|
|
@@ -4063,7 +4077,7 @@ class EI {
|
|
|
4063
4077
|
};
|
|
4064
4078
|
}
|
|
4065
4079
|
convertOle2Frame(B, E) {
|
|
4066
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "oleversion"), w = Q.dwg_dynapi_entity_data(B, "oleclient"), F = Q.dwg_dynapi_entity_data(B, "data_size"), i = Q.dwg_dynapi_entity_data(B, "pt1"),
|
|
4080
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "oleversion"), w = Q.dwg_dynapi_entity_data(B, "oleclient"), F = Q.dwg_dynapi_entity_data(B, "data_size"), i = Q.dwg_dynapi_entity_data(B, "pt1"), H = Q.dwg_dynapi_entity_data(B, "pt2"), h = Q.dwg_dynapi_entity_data(B, "lock_aspect"), R = Q.dwg_dynapi_entity_data(B, "type"), y = Q.dwg_dynapi_entity_data(B, "mode"), c = Q.dwg_dynapi_entity_data(B, "data");
|
|
4067
4081
|
return {
|
|
4068
4082
|
type: "OLE2FRAME",
|
|
4069
4083
|
...E,
|
|
@@ -4071,7 +4085,7 @@ class EI {
|
|
|
4071
4085
|
oleClient: w,
|
|
4072
4086
|
dataSize: F,
|
|
4073
4087
|
leftUpPoint: i,
|
|
4074
|
-
rightDownPoint:
|
|
4088
|
+
rightDownPoint: H,
|
|
4075
4089
|
lockAspect: h,
|
|
4076
4090
|
oleObjectType: R,
|
|
4077
4091
|
tileModeDescriptor: y,
|
|
@@ -4090,7 +4104,7 @@ class EI {
|
|
|
4090
4104
|
};
|
|
4091
4105
|
}
|
|
4092
4106
|
convertMText(B, E) {
|
|
4093
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "ins_pt"), w = Q.dwg_dynapi_entity_data(B, "text_height"), F = Q.dwg_dynapi_entity_data(B, "rect_height"), i = Q.dwg_dynapi_entity_data(B, "rect_width"),
|
|
4107
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "ins_pt"), w = Q.dwg_dynapi_entity_data(B, "text_height"), F = Q.dwg_dynapi_entity_data(B, "rect_height"), i = Q.dwg_dynapi_entity_data(B, "rect_width"), H = Q.dwg_dynapi_entity_data(B, "extents_width"), h = Q.dwg_dynapi_entity_data(B, "extents_height"), R = Q.dwg_dynapi_entity_data(B, "attachment"), y = Q.dwg_dynapi_entity_data(B, "flow_dir"), c = Q.dwg_dynapi_entity_data(B, "text"), k = Q.dwg_entity_mtext_get_style_name(B), O = Q.dwg_dynapi_entity_data(B, "extrusion"), a = Q.dwg_dynapi_entity_data(B, "x_axis_dir"), L = Q.dwg_dynapi_entity_data(B, "linespace_style"), q = Q.dwg_dynapi_entity_data(B, "linespace_factor"), z = Q.dwg_dynapi_entity_data(B, "bg_fill_flag"), p = Q.dwg_dynapi_entity_data(B, "bg_fill_scale"), W = Q.dwg_dynapi_entity_data(B, "bg_fill_color"), T = Q.dwg_dynapi_entity_data(B, "bg_fill_trans"), X = Q.dwg_dynapi_entity_data(B, "column_type"), AA = Q.dwg_dynapi_entity_data(B, "flow_reversed"), m = Q.dwg_dynapi_entity_data(B, "auto_height"), MA = Q.dwg_dynapi_entity_data(B, "column_width"), u = Q.dwg_dynapi_entity_data(B, "gutter"), FA = Q.dwg_dynapi_entity_data(B, "num_column_heights"), KA = Q.dwg_dynapi_entity_data(B, "column_heights"), iA = Q.dwg_ptr_to_double_array(
|
|
4094
4108
|
KA,
|
|
4095
4109
|
FA
|
|
4096
4110
|
);
|
|
@@ -4102,7 +4116,7 @@ class EI {
|
|
|
4102
4116
|
rectHeight: F,
|
|
4103
4117
|
rectWidth: i,
|
|
4104
4118
|
extentsHeight: h,
|
|
4105
|
-
extentsWidth:
|
|
4119
|
+
extentsWidth: H,
|
|
4106
4120
|
attachmentPoint: R,
|
|
4107
4121
|
drawingDirection: y,
|
|
4108
4122
|
text: c,
|
|
@@ -4130,25 +4144,25 @@ class EI {
|
|
|
4130
4144
|
};
|
|
4131
4145
|
}
|
|
4132
4146
|
convertPoint(B, E) {
|
|
4133
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "x"), w = Q.dwg_dynapi_entity_data(B, "y"), F = Q.dwg_dynapi_entity_data(B, "z"), i = Q.dwg_dynapi_entity_data(B, "thickness"),
|
|
4147
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "x"), w = Q.dwg_dynapi_entity_data(B, "y"), F = Q.dwg_dynapi_entity_data(B, "z"), i = Q.dwg_dynapi_entity_data(B, "thickness"), H = Q.dwg_dynapi_entity_data(B, "extrusion"), h = Q.dwg_dynapi_entity_data(B, "x_ang");
|
|
4134
4148
|
return {
|
|
4135
4149
|
type: "POINT",
|
|
4136
4150
|
...E,
|
|
4137
4151
|
position: { x: G, y: w, z: F },
|
|
4138
4152
|
thickness: i,
|
|
4139
|
-
extrusionDirection:
|
|
4153
|
+
extrusionDirection: H,
|
|
4140
4154
|
angle: h
|
|
4141
4155
|
};
|
|
4142
4156
|
}
|
|
4143
4157
|
convertPolyline2d(B, E, Q) {
|
|
4144
|
-
const G = this.libredwg, w = G.dwg_dynapi_entity_data(B, "flag"), F = G.dwg_dynapi_entity_data(B, "curve_type"), i = G.dwg_dynapi_entity_data(B, "start_width"),
|
|
4158
|
+
const G = this.libredwg, w = G.dwg_dynapi_entity_data(B, "flag"), F = G.dwg_dynapi_entity_data(B, "curve_type"), i = G.dwg_dynapi_entity_data(B, "start_width"), H = G.dwg_dynapi_entity_data(B, "end_width"), h = G.dwg_dynapi_entity_data(B, "elevation"), R = G.dwg_dynapi_entity_data(B, "thickness"), y = G.dwg_dynapi_entity_data(B, "extrusion"), c = G.dwg_entity_polyline_2d_get_vertices(Q);
|
|
4145
4159
|
return {
|
|
4146
4160
|
type: "POLYLINE2D",
|
|
4147
4161
|
...E,
|
|
4148
4162
|
flag: w,
|
|
4149
4163
|
smoothType: F,
|
|
4150
4164
|
startWidth: i,
|
|
4151
|
-
endWidth:
|
|
4165
|
+
endWidth: H,
|
|
4152
4166
|
elevation: h,
|
|
4153
4167
|
thickness: R,
|
|
4154
4168
|
extrusionDirection: y,
|
|
@@ -4169,14 +4183,14 @@ class EI {
|
|
|
4169
4183
|
};
|
|
4170
4184
|
}
|
|
4171
4185
|
convertPolyline3d(B, E, Q) {
|
|
4172
|
-
const G = this.libredwg, w = G.dwg_dynapi_entity_data(B, "flag"), F = G.dwg_dynapi_entity_data(B, "curve_type"), i = G.dwg_dynapi_entity_data(B, "start_width"),
|
|
4186
|
+
const G = this.libredwg, w = G.dwg_dynapi_entity_data(B, "flag"), F = G.dwg_dynapi_entity_data(B, "curve_type"), i = G.dwg_dynapi_entity_data(B, "start_width"), H = G.dwg_dynapi_entity_data(B, "end_width"), h = G.dwg_dynapi_entity_data(B, "extrusion"), R = G.dwg_entity_polyline_3d_get_vertices(Q);
|
|
4173
4187
|
return {
|
|
4174
4188
|
type: "POLYLINE3D",
|
|
4175
4189
|
...E,
|
|
4176
4190
|
flag: w,
|
|
4177
4191
|
smoothType: F,
|
|
4178
4192
|
startWidth: i,
|
|
4179
|
-
endWidth:
|
|
4193
|
+
endWidth: H,
|
|
4180
4194
|
extrusionDirection: h,
|
|
4181
4195
|
vertices: R.map((y) => ({
|
|
4182
4196
|
x: y.point.x,
|
|
@@ -4187,7 +4201,7 @@ class EI {
|
|
|
4187
4201
|
};
|
|
4188
4202
|
}
|
|
4189
4203
|
convertProxyEntity(B, E, Q) {
|
|
4190
|
-
const G = this.libredwg, w = G.dwg_dynapi_entity_data(B, "proxy_id"), F = G.dwg_dynapi_entity_data(B, "class_id"), i = G.dwg_dynapi_entity_data(B, "data_numbits"),
|
|
4204
|
+
const G = this.libredwg, w = G.dwg_dynapi_entity_data(B, "proxy_id"), F = G.dwg_dynapi_entity_data(B, "class_id"), i = G.dwg_dynapi_entity_data(B, "data_numbits"), H = G.dwg_dynapi_entity_data(B, "version"), h = G.dwg_dynapi_entity_data(B, "from_dxf"), R = G.dwg_dynapi_entity_data(B, "num_objids"), y = G.dwg_entity_get_preview(Q), c = (y == null ? void 0 : y.length) ?? 0, k = G.dwg_entity_proxy_entity_get_entity_data(B), O = y ? QQ(y) : void 0, a = k ? QQ(k) : void 0;
|
|
4191
4205
|
let L;
|
|
4192
4206
|
if (R > 0) {
|
|
4193
4207
|
const p = G.dwg_dynapi_entity_data(B, "objids");
|
|
@@ -4203,7 +4217,7 @@ class EI {
|
|
|
4203
4217
|
proxyEntityClassId: w || 498,
|
|
4204
4218
|
applicationEntityClassId: F
|
|
4205
4219
|
};
|
|
4206
|
-
return q && (z.originalDxfName = q), c > 0 && (z.graphicsDataSize = c), O && (z.graphicsData = O), i > 0 && (z.entityDataSize = i), a && (z.entityData = a), L && L.length > 0 && (z.linkedObjectIds = L),
|
|
4220
|
+
return q && (z.originalDxfName = q), c > 0 && (z.graphicsDataSize = c), O && (z.graphicsData = O), i > 0 && (z.entityDataSize = i), a && (z.entityData = a), L && L.length > 0 && (z.linkedObjectIds = L), H && (z.objectDrawingFormat = H), (h === 0 || h === 1) && (z.originalDataFormat = h), z;
|
|
4207
4221
|
}
|
|
4208
4222
|
getOriginalDxfName(B) {
|
|
4209
4223
|
if (this.classes.length === 0 || B < 0)
|
|
@@ -4222,7 +4236,7 @@ class EI {
|
|
|
4222
4236
|
};
|
|
4223
4237
|
}
|
|
4224
4238
|
convertSection(B, E) {
|
|
4225
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "state"), w = Q.dwg_dynapi_entity_data(B, "flag"), F = Q.dwg_dynapi_entity_data(B, "name"), i = Q.dwg_dynapi_entity_data(B, "vert_dir"),
|
|
4239
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "state"), w = Q.dwg_dynapi_entity_data(B, "flag"), F = Q.dwg_dynapi_entity_data(B, "name"), i = Q.dwg_dynapi_entity_data(B, "vert_dir"), H = Q.dwg_dynapi_entity_data(B, "top_height"), h = Q.dwg_dynapi_entity_data(B, "bottom_height"), R = Q.dwg_dynapi_entity_data(B, "indicator_alpha"), y = Q.dwg_dynapi_entity_data(B, "indicator_color"), c = Q.dwg_dynapi_entity_data(B, "num_verts"), k = Q.dwg_dynapi_entity_data(B, "verts"), O = c > 0 ? Q.dwg_ptr_to_point3d_array(k, c) : [], a = Q.dwg_dynapi_entity_data(B, "num_blverts"), L = Q.dwg_dynapi_entity_data(B, "blverts"), q = a > 0 ? Q.dwg_ptr_to_point3d_array(
|
|
4226
4240
|
L,
|
|
4227
4241
|
a
|
|
4228
4242
|
) : [], z = Q.dwg_dynapi_entity_data(B, "geometrySettingHardId"), p = Q.dwg_ref_get_handle_absolute_ref(z) ?? 0n;
|
|
@@ -4233,7 +4247,7 @@ class EI {
|
|
|
4233
4247
|
flags: w,
|
|
4234
4248
|
name: F,
|
|
4235
4249
|
verticalDirection: i,
|
|
4236
|
-
topHeight:
|
|
4250
|
+
topHeight: H,
|
|
4237
4251
|
bottomHeight: h,
|
|
4238
4252
|
indicatorTransparency: R,
|
|
4239
4253
|
indicatorColor: y.rgb,
|
|
@@ -4245,7 +4259,7 @@ class EI {
|
|
|
4245
4259
|
};
|
|
4246
4260
|
}
|
|
4247
4261
|
convertShape(B, E) {
|
|
4248
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "ins_pt"), w = Q.dwg_dynapi_entity_data(B, "scale"), F = Q.dwg_dynapi_entity_data(B, "rotation"), i = Q.dwg_dynapi_entity_data(B, "width_factor"),
|
|
4262
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "ins_pt"), w = Q.dwg_dynapi_entity_data(B, "scale"), F = Q.dwg_dynapi_entity_data(B, "rotation"), i = Q.dwg_dynapi_entity_data(B, "width_factor"), H = Q.dwg_dynapi_entity_data(B, "oblique_angle"), h = Q.dwg_dynapi_entity_data(B, "thickness"), R = Q.dwg_dynapi_entity_data(B, "extrusion"), y = Q.dwg_dynapi_entity_data(B, "style_id"), c = Q.dwg_entity_text_get_style_name(B);
|
|
4249
4263
|
return {
|
|
4250
4264
|
type: "SHAPE",
|
|
4251
4265
|
subclassMarker: "AcDbShape",
|
|
@@ -4257,12 +4271,12 @@ class EI {
|
|
|
4257
4271
|
styleName: c,
|
|
4258
4272
|
rotation: F,
|
|
4259
4273
|
xScale: i,
|
|
4260
|
-
obliqueAngle:
|
|
4274
|
+
obliqueAngle: H,
|
|
4261
4275
|
extrusionDirection: R
|
|
4262
4276
|
};
|
|
4263
4277
|
}
|
|
4264
4278
|
convertSolid(B, E) {
|
|
4265
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "corner1"), w = Q.dwg_dynapi_entity_data(B, "corner2"), F = Q.dwg_dynapi_entity_data(B, "corner3"), i = Q.dwg_dynapi_entity_data(B, "corner4"),
|
|
4279
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "corner1"), w = Q.dwg_dynapi_entity_data(B, "corner2"), F = Q.dwg_dynapi_entity_data(B, "corner3"), i = Q.dwg_dynapi_entity_data(B, "corner4"), H = Q.dwg_dynapi_entity_data(B, "thickness"), h = Q.dwg_dynapi_entity_data(B, "extrusion");
|
|
4266
4280
|
return {
|
|
4267
4281
|
type: "SOLID",
|
|
4268
4282
|
...E,
|
|
@@ -4270,12 +4284,12 @@ class EI {
|
|
|
4270
4284
|
corner2: w,
|
|
4271
4285
|
corner3: F,
|
|
4272
4286
|
corner4: i,
|
|
4273
|
-
thickness:
|
|
4287
|
+
thickness: H,
|
|
4274
4288
|
extrusionDirection: h
|
|
4275
4289
|
};
|
|
4276
4290
|
}
|
|
4277
4291
|
convertSpline(B, E) {
|
|
4278
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "splineflags"), w = Q.dwg_dynapi_entity_data(B, "degree"), F = Q.dwg_dynapi_entity_data(B, "knot_tol"), i = Q.dwg_dynapi_entity_data(B, "num_knots"),
|
|
4292
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "splineflags"), w = Q.dwg_dynapi_entity_data(B, "degree"), F = Q.dwg_dynapi_entity_data(B, "knot_tol"), i = Q.dwg_dynapi_entity_data(B, "num_knots"), H = Q.dwg_dynapi_entity_data(B, "knots"), h = Q.dwg_ptr_to_double_array(H, i), R = Q.dwg_dynapi_entity_data(B, "fit_tol"), y = Q.dwg_dynapi_entity_data(B, "num_fit_pts"), c = Q.dwg_dynapi_entity_data(B, "fit_pts"), k = Q.dwg_ptr_to_point3d_array(
|
|
4279
4293
|
c,
|
|
4280
4294
|
y
|
|
4281
4295
|
), O = Q.dwg_dynapi_entity_data(B, "weighted"), a = Q.dwg_dynapi_entity_data(B, "ctrl_tol"), L = Q.dwg_dynapi_entity_data(B, "num_ctrl_pts"), q = Q.dwg_dynapi_entity_data(B, "ctrl_pts"), z = Q.dwg_ptr_to_point4d_array(
|
|
@@ -4307,9 +4321,9 @@ class EI {
|
|
|
4307
4321
|
};
|
|
4308
4322
|
}
|
|
4309
4323
|
convertTable(B, E) {
|
|
4310
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_subclass_data(B, "ldata", "name"), w = Q.dwg_dynapi_entity_data(B, "ins_pt"), F = Q.dwg_dynapi_entity_data(B, "horiz_direction"), i = Q.dwg_dynapi_entity_data(B, "flag_for_table_value"),
|
|
4324
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_subclass_data(B, "ldata", "name"), w = Q.dwg_dynapi_entity_data(B, "ins_pt"), F = Q.dwg_dynapi_entity_data(B, "horiz_direction"), i = Q.dwg_dynapi_entity_data(B, "flag_for_table_value"), H = Q.dwg_dynapi_entity_data(B, "num_rows"), h = Q.dwg_dynapi_entity_data(B, "num_cols"), R = Q.dwg_dynapi_entity_data(B, "row_heights"), y = Q.dwg_ptr_to_double_array(
|
|
4311
4325
|
R,
|
|
4312
|
-
|
|
4326
|
+
H
|
|
4313
4327
|
), c = Q.dwg_dynapi_entity_data(B, "col_widths"), k = Q.dwg_ptr_to_double_array(
|
|
4314
4328
|
c,
|
|
4315
4329
|
h
|
|
@@ -4322,7 +4336,7 @@ class EI {
|
|
|
4322
4336
|
directionVector: F,
|
|
4323
4337
|
// attachmentPoint: DwgAttachmentPoint
|
|
4324
4338
|
tableValue: i,
|
|
4325
|
-
rowCount:
|
|
4339
|
+
rowCount: H,
|
|
4326
4340
|
columnCount: h,
|
|
4327
4341
|
overrideFlag: z,
|
|
4328
4342
|
borderColorOverrideFlag: p,
|
|
@@ -4369,13 +4383,13 @@ class EI {
|
|
|
4369
4383
|
});
|
|
4370
4384
|
}
|
|
4371
4385
|
convertTextBase(B) {
|
|
4372
|
-
const E = this.libredwg, Q = E.dwg_dynapi_entity_data(B, "text_value"), G = E.dwg_dynapi_entity_data(B, "thickness"), w = E.dwg_dynapi_entity_data(B, "ins_pt"), F = E.dwg_dynapi_entity_data(B, "alignment_pt"), i = E.dwg_dynapi_entity_data(B, "rotation"),
|
|
4386
|
+
const E = this.libredwg, Q = E.dwg_dynapi_entity_data(B, "text_value"), G = E.dwg_dynapi_entity_data(B, "thickness"), w = E.dwg_dynapi_entity_data(B, "ins_pt"), F = E.dwg_dynapi_entity_data(B, "alignment_pt"), i = E.dwg_dynapi_entity_data(B, "rotation"), H = E.dwg_dynapi_entity_data(B, "height"), h = E.dwg_dynapi_entity_data(B, "width_factor"), R = E.dwg_dynapi_entity_data(B, "oblique_angle"), y = E.dwg_entity_text_get_style_name(B), c = E.dwg_dynapi_entity_data(B, "generation"), k = E.dwg_dynapi_entity_data(B, "horiz_alignment"), O = E.dwg_dynapi_entity_data(B, "vert_alignment"), a = E.dwg_dynapi_entity_data(B, "extrusion");
|
|
4373
4387
|
return {
|
|
4374
4388
|
text: Q,
|
|
4375
4389
|
thickness: G,
|
|
4376
4390
|
startPoint: w,
|
|
4377
4391
|
endPoint: F,
|
|
4378
|
-
textHeight:
|
|
4392
|
+
textHeight: H,
|
|
4379
4393
|
rotation: i,
|
|
4380
4394
|
xScale: h,
|
|
4381
4395
|
obliqueAngle: R,
|
|
@@ -4394,11 +4408,11 @@ class EI {
|
|
|
4394
4408
|
};
|
|
4395
4409
|
}
|
|
4396
4410
|
convertTolerance(B, E) {
|
|
4397
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "ins_pt"), w = Q.dwg_dynapi_entity_data(B, "text_value"), F = Q.dwg_dynapi_entity_data(B, "x_direction"), i = Q.dwg_dynapi_entity_data(B, "extrusion"),
|
|
4411
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "ins_pt"), w = Q.dwg_dynapi_entity_data(B, "text_value"), F = Q.dwg_dynapi_entity_data(B, "x_direction"), i = Q.dwg_dynapi_entity_data(B, "extrusion"), H = Q.dwg_entity_get_dimstyle_name(B);
|
|
4398
4412
|
return {
|
|
4399
4413
|
type: "TOLERANCE",
|
|
4400
4414
|
...E,
|
|
4401
|
-
styleName:
|
|
4415
|
+
styleName: H,
|
|
4402
4416
|
insertionPoint: G,
|
|
4403
4417
|
text: w,
|
|
4404
4418
|
extrusionDirection: i,
|
|
@@ -4406,7 +4420,7 @@ class EI {
|
|
|
4406
4420
|
};
|
|
4407
4421
|
}
|
|
4408
4422
|
convertViewport(B, E) {
|
|
4409
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "center"), w = Q.dwg_dynapi_entity_data(B, "width"), F = Q.dwg_dynapi_entity_data(B, "height"), i = Q.dwg_dynapi_entity_data(B, "on_off"),
|
|
4423
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "center"), w = Q.dwg_dynapi_entity_data(B, "width"), F = Q.dwg_dynapi_entity_data(B, "height"), i = Q.dwg_dynapi_entity_data(B, "on_off"), H = Q.dwg_dynapi_entity_data(B, "VIEWCTR"), h = Q.dwg_dynapi_entity_data(B, "SNAPBASE"), R = Q.dwg_dynapi_entity_data(B, "SNAPUNIT"), y = Q.dwg_dynapi_entity_data(B, "GRIDUNIT"), c = Q.dwg_dynapi_entity_data(B, "VIEWDIR"), k = Q.dwg_dynapi_entity_data(B, "view_target"), O = Q.dwg_dynapi_entity_data(B, "lens_length"), a = Q.dwg_dynapi_entity_data(B, "front_clip_z"), L = Q.dwg_dynapi_entity_data(B, "back_clip_z"), q = Q.dwg_dynapi_entity_data(B, "VIEWSIZE"), z = Q.dwg_dynapi_entity_data(B, "SNAPANG"), p = Q.dwg_dynapi_entity_data(B, "twist_angle"), W = Q.dwg_dynapi_entity_data(B, "circle_zoom"), T = Q.dwg_dynapi_entity_data(B, "status_flag"), X = Q.dwg_dynapi_entity_data(B, "style_sheet"), AA = Q.dwg_dynapi_entity_data(B, "render_mode"), m = Q.dwg_dynapi_entity_data(B, "UCSVP"), MA = Q.dwg_dynapi_entity_data(B, "ucsorg"), u = Q.dwg_dynapi_entity_data(B, "ucsxdir"), FA = Q.dwg_dynapi_entity_data(B, "ucsydir"), KA = Q.dwg_dynapi_entity_data(B, "named_ucs"), iA = Q.dwg_ref_get_id(KA), cA = Q.dwg_dynapi_entity_data(B, "base_ucs"), pA = Q.dwg_ref_get_id(cA), tA = Q.dwg_dynapi_entity_data(B, "UCSORTHOVIEW"), PA = Q.dwg_dynapi_entity_data(B, "ucs_elevation"), VA = Q.dwg_dynapi_entity_data(B, "shadeplot_mode"), oA = Q.dwg_dynapi_entity_data(B, "use_default_lights"), Z = Q.dwg_dynapi_entity_data(B, "default_lighting_type"), $ = Q.dwg_dynapi_entity_data(B, "brightness"), e = Q.dwg_dynapi_entity_data(B, "contrast"), WA = Q.dwg_dynapi_entity_data(B, "grid_major"), ZA = Q.dwg_dynapi_entity_data(B, "background"), HA = Q.dwg_ref_get_id(ZA), x = Q.dwg_dynapi_entity_data(B, "shadeplot"), TA = Q.dwg_ref_get_id(x), GA = Q.dwg_dynapi_entity_data(B, "visualstyle"), SA = Q.dwg_ref_get_id(GA), bA = Q.dwg_dynapi_entity_data(B, "sun"), AB = Q.dwg_ref_get_id(bA);
|
|
4410
4424
|
return {
|
|
4411
4425
|
type: "VIEWPORT",
|
|
4412
4426
|
...E,
|
|
@@ -4416,7 +4430,7 @@ class EI {
|
|
|
4416
4430
|
status: i,
|
|
4417
4431
|
viewportId: 0,
|
|
4418
4432
|
// Will be set later in LibreDwgConverter.convert
|
|
4419
|
-
displayCenter:
|
|
4433
|
+
displayCenter: H,
|
|
4420
4434
|
snapBase: h,
|
|
4421
4435
|
snapSpacing: R,
|
|
4422
4436
|
gridSpacing: y,
|
|
@@ -4453,7 +4467,7 @@ class EI {
|
|
|
4453
4467
|
};
|
|
4454
4468
|
}
|
|
4455
4469
|
convertWipeout(B, E) {
|
|
4456
|
-
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "class_version"), w = Q.dwg_dynapi_entity_data(B, "pt0"), F = Q.dwg_dynapi_entity_data(B, "uvec"), i = Q.dwg_dynapi_entity_data(B, "vvec"),
|
|
4470
|
+
const Q = this.libredwg, G = Q.dwg_dynapi_entity_data(B, "class_version"), w = Q.dwg_dynapi_entity_data(B, "pt0"), F = Q.dwg_dynapi_entity_data(B, "uvec"), i = Q.dwg_dynapi_entity_data(B, "vvec"), H = Q.dwg_dynapi_entity_data(B, "image_size"), h = Q.dwg_dynapi_entity_data(B, "display_props"), R = Q.dwg_dynapi_entity_data(B, "clipping"), y = Q.dwg_dynapi_entity_data(B, "brightness"), c = Q.dwg_dynapi_entity_data(B, "contrast"), k = Q.dwg_dynapi_entity_data(B, "fade"), O = Q.dwg_dynapi_entity_data(B, "clip_mode"), a = Q.dwg_dynapi_entity_data(B, "clip_boundary_type"), L = Q.dwg_dynapi_entity_data(B, "num_clip_verts"), q = Q.dwg_dynapi_entity_data(B, "clip_verts"), z = Q.dwg_ptr_to_point2d_array(
|
|
4457
4471
|
q,
|
|
4458
4472
|
L
|
|
4459
4473
|
), p = Q.dwg_dynapi_entity_data(B, "imagedef"), W = Q.dwg_ref_get_absref(p) ?? 0, T = Q.dwg_dynapi_entity_data(B, "imagedefreactor"), X = Q.dwg_ref_get_absref(T) ?? 0;
|
|
@@ -4464,7 +4478,7 @@ class EI {
|
|
|
4464
4478
|
position: w,
|
|
4465
4479
|
uPixel: F,
|
|
4466
4480
|
vPixel: i,
|
|
4467
|
-
imageSize:
|
|
4481
|
+
imageSize: H,
|
|
4468
4482
|
imageDefHandle: W,
|
|
4469
4483
|
flags: h,
|
|
4470
4484
|
clipping: R,
|
|
@@ -4488,14 +4502,14 @@ class EI {
|
|
|
4488
4502
|
};
|
|
4489
4503
|
}
|
|
4490
4504
|
getDimensionCommonAttrs(B) {
|
|
4491
|
-
const E = this.libredwg, Q = E.dwg_dynapi_entity_data(B, "class_version"), G = E.dwg_entity_get_block_name(B, "block"), w = E.dwg_dynapi_entity_data(B, "def_pt"), F = E.dwg_dynapi_entity_data(B, "text_midpt"), i = E.dwg_dynapi_entity_data(B, "attachmentPoint"),
|
|
4505
|
+
const E = this.libredwg, Q = E.dwg_dynapi_entity_data(B, "class_version"), G = E.dwg_entity_get_block_name(B, "block"), w = E.dwg_dynapi_entity_data(B, "def_pt"), F = E.dwg_dynapi_entity_data(B, "text_midpt"), i = E.dwg_dynapi_entity_data(B, "attachmentPoint"), H = E.dwg_dynapi_entity_data(B, "flag"), h = E.dwg_dynapi_entity_data(B, "lspace_factor"), R = E.dwg_dynapi_entity_data(B, "lspace_factor"), y = E.dwg_dynapi_entity_data(B, "act_measurement"), c = E.dwg_dynapi_entity_data(B, "user_text"), k = E.dwg_dynapi_entity_data(B, "text_rotation"), O = E.dwg_dynapi_entity_data(B, "ins_rotation"), a = E.dwg_dynapi_entity_data(B, "extrusion"), L = E.dwg_entity_get_dimstyle_name(B);
|
|
4492
4506
|
return {
|
|
4493
4507
|
type: "DIMENSION",
|
|
4494
4508
|
version: Q,
|
|
4495
4509
|
name: G,
|
|
4496
4510
|
definitionPoint: w,
|
|
4497
4511
|
textPoint: F,
|
|
4498
|
-
dimensionType:
|
|
4512
|
+
dimensionType: H,
|
|
4499
4513
|
attachmentPoint: i,
|
|
4500
4514
|
textLineSpacingStyle: h,
|
|
4501
4515
|
textLineSpacingFactor: R || 1,
|
|
@@ -4511,9 +4525,9 @@ class EI {
|
|
|
4511
4525
|
const E = this.libredwg, Q = E.dwg_object_entity_get_color_object(B), G = Q.method, w = Q.index;
|
|
4512
4526
|
let F;
|
|
4513
4527
|
(G == 194 || (Q.rgb >>> 24 & 255) === 194) && (F = Q.rgb & 16777215);
|
|
4514
|
-
const i = this.getLayerName(B),
|
|
4528
|
+
const i = this.getLayerName(B), H = E.dwg_object_entity_get_handle_object(B), h = E.dwg_object_entity_get_ownerhandle_object(B), R = E.dwg_object_entity_get_xdicobjhandle_object(B), y = this.getLtypeName(B), c = E.dwg_object_entity_get_line_weight(B), k = E.dwg_object_entity_get_ltype_scale(B), O = !E.dwg_object_entity_get_invisible(B), a = E.dwg_object_entity_get_xdata(B);
|
|
4515
4529
|
return {
|
|
4516
|
-
handle: aA(
|
|
4530
|
+
handle: aA(H.value),
|
|
4517
4531
|
ownerDictionaryHardId: aA(R.absolute_ref),
|
|
4518
4532
|
ownerBlockRecordSoftId: aA(h.absolute_ref),
|
|
4519
4533
|
layer: i,
|
|
@@ -4584,18 +4598,18 @@ class CQ {
|
|
|
4584
4598
|
for (let F = 0; F < G; F++) {
|
|
4585
4599
|
const i = Q.dwg_get_object(B, F);
|
|
4586
4600
|
if (i) {
|
|
4587
|
-
const
|
|
4588
|
-
if (
|
|
4601
|
+
const H = this.safeObjectTio(i);
|
|
4602
|
+
if (H)
|
|
4589
4603
|
switch (Q.dwg_object_get_fixedtype(i)) {
|
|
4590
4604
|
case d.DWG_TYPE_LAYER:
|
|
4591
4605
|
{
|
|
4592
|
-
const R = this.convertLayer(
|
|
4606
|
+
const R = this.convertLayer(H, i);
|
|
4593
4607
|
E.tables.LAYER.entries.push(R), this.entityConverter.layers.set(R.handle, R.name);
|
|
4594
4608
|
}
|
|
4595
4609
|
break;
|
|
4596
4610
|
case d.DWG_TYPE_LTYPE:
|
|
4597
4611
|
{
|
|
4598
|
-
const R = this.convertLineType(
|
|
4612
|
+
const R = this.convertLineType(H, i);
|
|
4599
4613
|
E.tables.LTYPE.entries.push(R), this.entityConverter.ltypes.set(R.handle, R.name);
|
|
4600
4614
|
}
|
|
4601
4615
|
break;
|
|
@@ -4605,15 +4619,15 @@ class CQ {
|
|
|
4605
4619
|
for (let F = 0; F < G; F++) {
|
|
4606
4620
|
const i = Q.dwg_get_object(B, F);
|
|
4607
4621
|
if (i) {
|
|
4608
|
-
const
|
|
4609
|
-
if (
|
|
4622
|
+
const H = this.safeObjectTio(i);
|
|
4623
|
+
if (H)
|
|
4610
4624
|
switch (Q.dwg_object_get_fixedtype(i)) {
|
|
4611
4625
|
case d.DWG_TYPE_APPID:
|
|
4612
|
-
E.tables.APPID.entries.push(this.convertAppId(
|
|
4626
|
+
E.tables.APPID.entries.push(this.convertAppId(H));
|
|
4613
4627
|
break;
|
|
4614
4628
|
case d.DWG_TYPE_BLOCK_HEADER:
|
|
4615
4629
|
{
|
|
4616
|
-
const R = this.convertBlockRecord(
|
|
4630
|
+
const R = this.convertBlockRecord(H, i);
|
|
4617
4631
|
E.tables.BLOCK_RECORD.entries.push(R), (oQ(R.name) || II(R.name)) && R.entities.forEach((y) => {
|
|
4618
4632
|
E.entities.push(y), y.type === "INSERT" && y.attribs.forEach((c) => {
|
|
4619
4633
|
E.entities.push(c);
|
|
@@ -4622,29 +4636,29 @@ class CQ {
|
|
|
4622
4636
|
}
|
|
4623
4637
|
break;
|
|
4624
4638
|
case d.DWG_TYPE_DIMSTYLE:
|
|
4625
|
-
E.tables.DIMSTYLE.entries.push(this.convertDimStyle(
|
|
4639
|
+
E.tables.DIMSTYLE.entries.push(this.convertDimStyle(H, i));
|
|
4626
4640
|
break;
|
|
4627
4641
|
case d.DWG_TYPE_STYLE:
|
|
4628
|
-
E.tables.STYLE.entries.push(this.convertStyle(
|
|
4642
|
+
E.tables.STYLE.entries.push(this.convertStyle(H, i));
|
|
4629
4643
|
break;
|
|
4630
4644
|
case d.DWG_TYPE_VPORT:
|
|
4631
|
-
E.tables.VPORT.entries.push(this.convertViewport(
|
|
4645
|
+
E.tables.VPORT.entries.push(this.convertViewport(H, i));
|
|
4632
4646
|
break;
|
|
4633
4647
|
case d.DWG_TYPE_DICTIONARY:
|
|
4634
|
-
E.objects.DICTIONARY.push(this.convertDictionary(
|
|
4648
|
+
E.objects.DICTIONARY.push(this.convertDictionary(H, i));
|
|
4635
4649
|
break;
|
|
4636
4650
|
case d.DWG_TYPE_IMAGEDEF:
|
|
4637
|
-
E.objects.IMAGEDEF.push(this.convertImageDef(
|
|
4651
|
+
E.objects.IMAGEDEF.push(this.convertImageDef(H, i));
|
|
4638
4652
|
break;
|
|
4639
4653
|
case d.DWG_TYPE_LAYOUT:
|
|
4640
|
-
E.objects.LAYOUT.push(this.convertLayout(
|
|
4654
|
+
E.objects.LAYOUT.push(this.convertLayout(H, i));
|
|
4641
4655
|
break;
|
|
4642
4656
|
case d.DWG_TYPE_MLEADERSTYLE:
|
|
4643
|
-
E.objects.MLEADERSTYLE.push(this.convertMLeaderStyle(
|
|
4657
|
+
E.objects.MLEADERSTYLE.push(this.convertMLeaderStyle(H, i));
|
|
4644
4658
|
break;
|
|
4645
4659
|
case d.DWG_TYPE_SPATIAL_FILTER:
|
|
4646
4660
|
E.objects.SPATIAL_FILTER.push(
|
|
4647
|
-
this.convertSpatialFilter(
|
|
4661
|
+
this.convertSpatialFilter(H, i)
|
|
4648
4662
|
);
|
|
4649
4663
|
break;
|
|
4650
4664
|
}
|
|
@@ -4654,8 +4668,8 @@ class CQ {
|
|
|
4654
4668
|
(F) => F.type === "VIEWPORT"
|
|
4655
4669
|
);
|
|
4656
4670
|
return w.sort((F, i) => {
|
|
4657
|
-
const
|
|
4658
|
-
return
|
|
4671
|
+
const H = parseInt(F.handle, 16), h = parseInt(i.handle, 16);
|
|
4672
|
+
return H - h;
|
|
4659
4673
|
}), w.forEach((F, i) => {
|
|
4660
4674
|
F.viewportId = i + 1;
|
|
4661
4675
|
}), E;
|
|
@@ -4712,7 +4726,7 @@ class CQ {
|
|
|
4712
4726
|
convertBlockRecord(B, E) {
|
|
4713
4727
|
const Q = this.libredwg, G = this.getCommonTableEntryAttrs(B, E), w = Q.dwg_entity_block_header_get_block(B);
|
|
4714
4728
|
w.name && (G.name = w.name);
|
|
4715
|
-
const F = Q.dwg_dynapi_entity_data(B, "num_owned"), i = Q.dwg_dynapi_entity_data(B, "flag"),
|
|
4729
|
+
const F = Q.dwg_dynapi_entity_data(B, "num_owned"), i = Q.dwg_dynapi_entity_data(B, "flag"), H = Q.dwg_dynapi_entity_data(B, "description"), h = Q.dwg_dynapi_entity_data(B, "base_pt"), R = Q.dwg_dynapi_entity_data(B, "insert_units"), y = Q.dwg_dynapi_entity_data(B, "explodable"), c = Q.dwg_dynapi_entity_data(B, "block_scaling"), k = Q.dwg_dynapi_entity_data(B, "layout"), O = Q.dwg_ref_get_id(k) ?? "";
|
|
4716
4730
|
let a = "";
|
|
4717
4731
|
const L = (p) => {
|
|
4718
4732
|
const W = new Array(p.length);
|
|
@@ -4741,7 +4755,7 @@ class CQ {
|
|
|
4741
4755
|
return {
|
|
4742
4756
|
...G,
|
|
4743
4757
|
flags: i,
|
|
4744
|
-
description:
|
|
4758
|
+
description: H,
|
|
4745
4759
|
basePoint: h,
|
|
4746
4760
|
layout: O,
|
|
4747
4761
|
insertionUnits: R,
|
|
@@ -4761,7 +4775,7 @@ class CQ {
|
|
|
4761
4775
|
return w;
|
|
4762
4776
|
}
|
|
4763
4777
|
convertDimStyle(B, E) {
|
|
4764
|
-
const Q = this.libredwg, G = this.getCommonTableEntryAttrs(B, E), w = Q.dwg_dynapi_entity_data(B, "DIMTOL"), F = Q.dwg_dynapi_entity_data(B, "DIMLIM"), i = Q.dwg_dynapi_entity_data(B, "DIMTIH"),
|
|
4778
|
+
const Q = this.libredwg, G = this.getCommonTableEntryAttrs(B, E), w = Q.dwg_dynapi_entity_data(B, "DIMTOL"), F = Q.dwg_dynapi_entity_data(B, "DIMLIM"), i = Q.dwg_dynapi_entity_data(B, "DIMTIH"), H = Q.dwg_dynapi_entity_data(B, "DIMTOH"), h = Q.dwg_dynapi_entity_data(B, "DIMSE1"), R = Q.dwg_dynapi_entity_data(B, "DIMSE2"), y = Q.dwg_dynapi_entity_data(B, "DIMALT"), c = Q.dwg_dynapi_entity_data(B, "DIMTOFL"), k = Q.dwg_dynapi_entity_data(B, "DIMSAH"), O = Q.dwg_dynapi_entity_data(B, "DIMTIX"), a = Q.dwg_dynapi_entity_data(B, "DIMSOXD"), L = Q.dwg_dynapi_entity_data(B, "DIMALTD"), q = Q.dwg_dynapi_entity_data(B, "DIMZIN"), z = Q.dwg_dynapi_entity_data(B, "DIMSD1"), p = Q.dwg_dynapi_entity_data(B, "DIMSD2"), W = Q.dwg_dynapi_entity_data(B, "DIMTOLJ"), T = Q.dwg_dynapi_entity_data(B, "DIMJUST"), X = Q.dwg_dynapi_entity_data(B, "DIMFIT"), AA = Q.dwg_dynapi_entity_data(B, "DIMUPT"), m = Q.dwg_dynapi_entity_data(B, "DIMTZIN"), MA = Q.dwg_dynapi_entity_data(B, "DIMALTZ"), u = Q.dwg_dynapi_entity_data(B, "DIMALTTZ"), FA = Q.dwg_dynapi_entity_data(B, "DIMTAD"), KA = Q.dwg_dynapi_entity_data(B, "DIMUNIT"), iA = Q.dwg_dynapi_entity_data(B, "DIMAUNIT"), cA = Q.dwg_dynapi_entity_data(B, "DIMDEC"), pA = Q.dwg_dynapi_entity_data(B, "DIMTDEC"), tA = Q.dwg_dynapi_entity_data(B, "DIMALTU"), PA = Q.dwg_dynapi_entity_data(B, "DIMALTTD"), VA = Q.dwg_dynapi_entity_data(B, "DIMSCALE"), oA = Q.dwg_dynapi_entity_data(B, "DIMASZ"), Z = Q.dwg_dynapi_entity_data(B, "DIMEXO"), $ = Q.dwg_dynapi_entity_data(B, "DIMDLI"), e = Q.dwg_dynapi_entity_data(B, "DIMEXE"), WA = Q.dwg_dynapi_entity_data(B, "DIMRND"), ZA = Q.dwg_dynapi_entity_data(B, "DIMDLE"), HA = Q.dwg_dynapi_entity_data(B, "DIMTP"), x = Q.dwg_dynapi_entity_data(B, "DIMTM"), TA = Q.dwg_dynapi_entity_data(B, "DIMFXL"), GA = Q.dwg_dynapi_entity_data(B, "DIMJOGANG"), SA = Q.dwg_dynapi_entity_data(B, "DIMTFILL"), bA = Q.dwg_dynapi_entity_data(B, "DIMTFILLCLR"), AB = Q.dwg_dynapi_entity_data(B, "DIMAZIN"), FB = Q.dwg_dynapi_entity_data(B, "DIMARCSYM"), BB = Q.dwg_dynapi_entity_data(B, "DIMTXT"), BA = Q.dwg_dynapi_entity_data(B, "DIMCEN"), r = Q.dwg_dynapi_entity_data(B, "DIMTSZ"), sB = Q.dwg_dynapi_entity_data(B, "DIMALTF"), aB = Q.dwg_dynapi_entity_data(B, "DIMLFAC"), SB = Q.dwg_dynapi_entity_data(B, "DIMTVP"), JB = Q.dwg_dynapi_entity_data(B, "DIMTFAC"), KB = Q.dwg_dynapi_entity_data(B, "DIMGAP"), qB = Q.dwg_dynapi_entity_data(B, "DIMPOST"), lA = Q.dwg_dynapi_entity_data(B, "DIMAPOST"), JA = Q.dwg_dynapi_entity_data(B, "DIMBLK_T"), j = Q.dwg_dynapi_entity_data(B, "DIMBLK1_T"), OB = Q.dwg_dynapi_entity_data(B, "DIMBLK2_T"), XA = Q.dwg_dynapi_entity_data(B, "DIMALTRND"), LA = Q.dwg_dynapi_entity_data(B, "DIMCLRD_N"), MB = Q.dwg_dynapi_entity_data(B, "DIMCLRE_N"), iB = Q.dwg_dynapi_entity_data(B, "DIMCLRT_N"), qA = Q.dwg_dynapi_entity_data(B, "DIMCLRD"), gB = Q.dwg_dynapi_entity_data(B, "DIMCLRE"), OA = Q.dwg_dynapi_entity_data(B, "DIMCLRT"), QB = Q.dwg_dynapi_entity_data(B, "DIMADEC"), rA = Q.dwg_dynapi_entity_data(B, "DIMFRAC"), HB = Q.dwg_dynapi_entity_data(B, "DIMLUNIT"), YA = Q.dwg_dynapi_entity_data(B, "DIMDSEP"), CB = Q.dwg_dynapi_entity_data(B, "DIMTMOVE"), V = Q.dwg_dynapi_entity_data(B, "DIMATFIT"), YB = Q.dwg_dynapi_entity_data(B, "DIMFXLON"), IB = Q.dwg_dynapi_entity_data(B, "DIMTXTDIRECTION"), jA = Q.dwg_dynapi_entity_data(B, "DIMALTMZF"), UB = Q.dwg_dynapi_entity_data(B, "DIMALTMZS"), hB = Q.dwg_dynapi_entity_data(B, "DIMMZF"), UA = Q.dwg_dynapi_entity_data(B, "DIMMZS"), zA = Q.dwg_dynapi_entity_data(B, "DIMLWD"), RB = Q.dwg_dynapi_entity_data(B, "DIMLWE"), kB = Q.dwg_dynapi_entity_data(B, "DIMTXSTY"), EB = Q.dwg_ref_get_absref(kB) ?? void 0, yB = Q.dwg_dynapi_entity_data(B, "DIMLDRBLK"), DB = Q.dwg_ref_get_absref(yB) ?? void 0;
|
|
4765
4779
|
return {
|
|
4766
4780
|
...G,
|
|
4767
4781
|
DIMPOST: qB,
|
|
@@ -4790,7 +4804,7 @@ class CQ {
|
|
|
4790
4804
|
DIMTOL: w,
|
|
4791
4805
|
DIMLIM: F,
|
|
4792
4806
|
DIMTIH: i,
|
|
4793
|
-
DIMTOH:
|
|
4807
|
+
DIMTOH: H,
|
|
4794
4808
|
DIMSE1: h,
|
|
4795
4809
|
DIMSE2: R,
|
|
4796
4810
|
DIMTAD: FA,
|
|
@@ -4847,7 +4861,7 @@ class CQ {
|
|
|
4847
4861
|
};
|
|
4848
4862
|
}
|
|
4849
4863
|
convertLayer(B, E) {
|
|
4850
|
-
const Q = this.libredwg, G = this.getCommonTableEntryAttrs(B, E), w = Q.dwg_dynapi_entity_data(B, "flag"), F = Q.dwg_dynapi_entity_data(B, "frozen"), i = Q.dwg_dynapi_entity_data(B, "off"),
|
|
4864
|
+
const Q = this.libredwg, G = this.getCommonTableEntryAttrs(B, E), w = Q.dwg_dynapi_entity_data(B, "flag"), F = Q.dwg_dynapi_entity_data(B, "frozen"), i = Q.dwg_dynapi_entity_data(B, "off"), H = Q.dwg_dynapi_entity_data(B, "frozen_in_new"), h = Q.dwg_dynapi_entity_data(B, "plotflockedlag"), R = Q.dwg_dynapi_entity_data(B, "plotflag"), y = Q.dwg_dynapi_entity_data(B, "linewt"), c = Q.dwg_dynapi_entity_data(B, "color"), k = Q.dwg_dynapi_entity_data(B, "ltype");
|
|
4851
4865
|
let O = "Continuous";
|
|
4852
4866
|
if (k)
|
|
4853
4867
|
try {
|
|
@@ -4866,7 +4880,7 @@ class CQ {
|
|
|
4866
4880
|
lineType: O,
|
|
4867
4881
|
frozen: F != 0,
|
|
4868
4882
|
off: i != 0,
|
|
4869
|
-
frozenInNew:
|
|
4883
|
+
frozenInNew: H != 0,
|
|
4870
4884
|
locked: h != 0,
|
|
4871
4885
|
plotFlag: R,
|
|
4872
4886
|
lineweight: y,
|
|
@@ -4875,13 +4889,13 @@ class CQ {
|
|
|
4875
4889
|
};
|
|
4876
4890
|
}
|
|
4877
4891
|
convertLineType(B, E) {
|
|
4878
|
-
const Q = this.libredwg, G = this.getCommonTableEntryAttrs(B, E), w = Q.dwg_dynapi_entity_data(B, "flag"), F = Q.dwg_dynapi_entity_data(B, "description"), i = Q.dwg_dynapi_entity_data(B, "numdashes"),
|
|
4892
|
+
const Q = this.libredwg, G = this.getCommonTableEntryAttrs(B, E), w = Q.dwg_dynapi_entity_data(B, "flag"), F = Q.dwg_dynapi_entity_data(B, "description"), i = Q.dwg_dynapi_entity_data(B, "numdashes"), H = Q.dwg_dynapi_entity_data(B, "pattern_len"), h = Q.dwg_dynapi_entity_data(B, "dashes"), R = h ? Q.dwg_ptr_to_ltype_dash_array(h, i) : [];
|
|
4879
4893
|
return {
|
|
4880
4894
|
...G,
|
|
4881
4895
|
description: F,
|
|
4882
4896
|
standardFlag: w,
|
|
4883
4897
|
numberOfLineTypes: i,
|
|
4884
|
-
totalPatternLength:
|
|
4898
|
+
totalPatternLength: H,
|
|
4885
4899
|
pattern: this.convertLineTypePattern(R)
|
|
4886
4900
|
};
|
|
4887
4901
|
}
|
|
@@ -4903,7 +4917,7 @@ class CQ {
|
|
|
4903
4917
|
}), E;
|
|
4904
4918
|
}
|
|
4905
4919
|
convertStyle(B, E) {
|
|
4906
|
-
const Q = this.libredwg, G = this.getCommonTableEntryAttrs(B, E), w = Q.dwg_dynapi_entity_data(B, "flag"), F = Q.dwg_dynapi_entity_data(B, "width_factor"), i = Q.dwg_dynapi_entity_data(B, "oblique_angle"),
|
|
4920
|
+
const Q = this.libredwg, G = this.getCommonTableEntryAttrs(B, E), w = Q.dwg_dynapi_entity_data(B, "flag"), F = Q.dwg_dynapi_entity_data(B, "width_factor"), i = Q.dwg_dynapi_entity_data(B, "oblique_angle"), H = Q.dwg_dynapi_entity_data(B, "generation"), h = Q.dwg_dynapi_entity_data(B, "last_height"), R = Q.dwg_dynapi_entity_data(B, "font_file"), y = Q.dwg_dynapi_entity_data(B, "bigfont_file");
|
|
4907
4921
|
return {
|
|
4908
4922
|
...G,
|
|
4909
4923
|
standardFlag: w,
|
|
@@ -4911,20 +4925,20 @@ class CQ {
|
|
|
4911
4925
|
// TODO: Set the correct value
|
|
4912
4926
|
widthFactor: F,
|
|
4913
4927
|
obliqueAngle: i,
|
|
4914
|
-
textGenerationFlag:
|
|
4928
|
+
textGenerationFlag: H,
|
|
4915
4929
|
lastHeight: h,
|
|
4916
4930
|
font: R,
|
|
4917
4931
|
bigFont: y
|
|
4918
4932
|
};
|
|
4919
4933
|
}
|
|
4920
4934
|
convertViewport(B, E) {
|
|
4921
|
-
const Q = this.libredwg, G = this.getCommonTableEntryAttrs(B, E), w = Q.dwg_dynapi_entity_data(B, "flag"), F = Q.dwg_dynapi_entity_data(B, "VIEWSIZE"), i = Q.dwg_dynapi_entity_data(B, "aspect_ratio"),
|
|
4935
|
+
const Q = this.libredwg, G = this.getCommonTableEntryAttrs(B, E), w = Q.dwg_dynapi_entity_data(B, "flag"), F = Q.dwg_dynapi_entity_data(B, "VIEWSIZE"), i = Q.dwg_dynapi_entity_data(B, "aspect_ratio"), H = Q.dwg_dynapi_entity_data(B, "VIEWCTR"), h = Q.dwg_dynapi_entity_data(B, "view_target"), R = Q.dwg_dynapi_entity_data(B, "VIEWDIR"), y = Q.dwg_dynapi_entity_data(B, "view_twist"), c = Q.dwg_dynapi_entity_data(B, "lens_length"), k = Q.dwg_dynapi_entity_data(B, "front_clip_z"), O = Q.dwg_dynapi_entity_data(B, "back_clip_z"), a = Q.dwg_dynapi_entity_data(B, "VIEWMODE"), L = Q.dwg_dynapi_entity_data(B, "render_mode"), q = Q.dwg_dynapi_entity_data(B, "use_default_lights") != 0, z = Q.dwg_dynapi_entity_data(B, "default_lightning_type"), p = Q.dwg_dynapi_entity_data(B, "brightness"), W = Q.dwg_dynapi_entity_data(B, "contrast"), T = Q.dwg_dynapi_entity_data(B, "ambient_color"), X = Q.dwg_dynapi_entity_data(B, "lower_left"), AA = Q.dwg_dynapi_entity_data(B, "upper_right"), m = Q.dwg_dynapi_entity_data(B, "circle_zoom"), MA = Q.dwg_dynapi_entity_data(B, "UCSICON"), u = Q.dwg_dynapi_entity_data(B, "GRIDUNIT"), FA = Q.dwg_dynapi_entity_data(B, "SNAPANG"), KA = Q.dwg_dynapi_entity_data(B, "SNAPBASE"), iA = Q.dwg_dynapi_entity_data(B, "SNAPUNIT"), cA = Q.dwg_dynapi_entity_data(B, "ucsorg"), pA = Q.dwg_dynapi_entity_data(B, "ucsxdir"), tA = Q.dwg_dynapi_entity_data(B, "ucsydir"), PA = Q.dwg_dynapi_entity_data(B, "ucs_elevation"), VA = Q.dwg_dynapi_entity_data(B, "grid_major"), oA = Q.dwg_dynapi_entity_data(B, "background"), Z = oA ? Q.dwg_ref_get_id(oA) ?? "" : void 0, $ = Q.dwg_dynapi_entity_data(B, "visualstyle"), e = $ ? Q.dwg_ref_get_id($) ?? "" : void 0;
|
|
4922
4936
|
return {
|
|
4923
4937
|
...G,
|
|
4924
4938
|
standardFlag: w,
|
|
4925
4939
|
lowerLeftCorner: X,
|
|
4926
4940
|
upperRightCorner: AA,
|
|
4927
|
-
center:
|
|
4941
|
+
center: H,
|
|
4928
4942
|
snapBasePoint: KA,
|
|
4929
4943
|
snapSpacing: iA,
|
|
4930
4944
|
gridSpacing: u,
|
|
@@ -4974,8 +4988,8 @@ class CQ {
|
|
|
4974
4988
|
};
|
|
4975
4989
|
}
|
|
4976
4990
|
convertDictionary(B, E) {
|
|
4977
|
-
const Q = this.libredwg, G = this.getCommonObjectAttrs(E), w = Q.dwg_dynapi_entity_data(B, "is_hardowner"), F = Q.dwg_dynapi_entity_data(B, "cloning"), i = Q.dwg_dynapi_entity_data(B, "numitems"),
|
|
4978
|
-
|
|
4991
|
+
const Q = this.libredwg, G = this.getCommonObjectAttrs(E), w = Q.dwg_dynapi_entity_data(B, "is_hardowner"), F = Q.dwg_dynapi_entity_data(B, "cloning"), i = Q.dwg_dynapi_entity_data(B, "numitems"), H = Q.dwg_dynapi_entity_data(B, "itemhandles"), h = Q.dwg_ptr_to_object_ref_array(
|
|
4992
|
+
H,
|
|
4979
4993
|
i
|
|
4980
4994
|
), R = Q.dwg_object_dictionary_get_texts(E), y = {};
|
|
4981
4995
|
return h.forEach(
|
|
@@ -4988,18 +5002,18 @@ class CQ {
|
|
|
4988
5002
|
};
|
|
4989
5003
|
}
|
|
4990
5004
|
convertImageDef(B, E) {
|
|
4991
|
-
const Q = this.libredwg, G = this.getCommonObjectAttrs(E), w = Q.dwg_dynapi_entity_data(B, "image_size"), F = Q.dwg_dynapi_entity_data(B, "file_path"), i = Q.dwg_dynapi_entity_data(B, "is_loaded"),
|
|
5005
|
+
const Q = this.libredwg, G = this.getCommonObjectAttrs(E), w = Q.dwg_dynapi_entity_data(B, "image_size"), F = Q.dwg_dynapi_entity_data(B, "file_path"), i = Q.dwg_dynapi_entity_data(B, "is_loaded"), H = Q.dwg_dynapi_entity_data(B, "pixel_size"), h = Q.dwg_dynapi_entity_data(B, "resunits");
|
|
4992
5006
|
return {
|
|
4993
5007
|
...G,
|
|
4994
5008
|
fileName: F,
|
|
4995
5009
|
size: w,
|
|
4996
|
-
sizeOfOnePixel:
|
|
5010
|
+
sizeOfOnePixel: H,
|
|
4997
5011
|
isLoaded: i,
|
|
4998
5012
|
resolutionUnits: h
|
|
4999
5013
|
};
|
|
5000
5014
|
}
|
|
5001
5015
|
convertLayout(B, E) {
|
|
5002
|
-
const Q = this.libredwg, G = this.getCommonObjectAttrs(E), w = Q.dwg_dynapi_entity_data(B, "layout_name"), F = Q.dwg_dynapi_entity_data(B, "tab_order"), i = Q.dwg_dynapi_entity_data(B, "layout_flags"),
|
|
5016
|
+
const Q = this.libredwg, G = this.getCommonObjectAttrs(E), w = Q.dwg_dynapi_entity_data(B, "layout_name"), F = Q.dwg_dynapi_entity_data(B, "tab_order"), i = Q.dwg_dynapi_entity_data(B, "layout_flags"), H = Q.dwg_dynapi_entity_data(B, "INSBASE"), h = Q.dwg_dynapi_entity_data(B, "LIMMIN"), R = Q.dwg_dynapi_entity_data(B, "LIMMAX"), y = Q.dwg_dynapi_entity_data(B, "UCSORG"), c = Q.dwg_dynapi_entity_data(B, "UCSXDIR"), k = Q.dwg_dynapi_entity_data(B, "UCSYDIR"), O = Q.dwg_dynapi_entity_data(B, "UCSORTHOVIEW"), a = Q.dwg_dynapi_entity_data(B, "EXTMIN"), L = Q.dwg_dynapi_entity_data(B, "EXTMAX"), q = Q.dwg_dynapi_entity_data(B, "ucs_elevation"), z = Q.dwg_dynapi_entity_data(B, "block_header"), p = Q.dwg_ref_get_id(z) ?? "", W = Q.dwg_dynapi_entity_data(B, "active_viewport"), T = Q.dwg_ref_get_id(W) ?? "", X = Q.dwg_dynapi_entity_data(B, "named_ucs"), AA = X ? Q.dwg_ref_get_id(X) ?? "" : void 0;
|
|
5003
5017
|
return {
|
|
5004
5018
|
...G,
|
|
5005
5019
|
layoutName: w,
|
|
@@ -5007,7 +5021,7 @@ class CQ {
|
|
|
5007
5021
|
tabOrder: F,
|
|
5008
5022
|
minLimit: h,
|
|
5009
5023
|
maxLimit: R,
|
|
5010
|
-
insertionPoint:
|
|
5024
|
+
insertionPoint: H,
|
|
5011
5025
|
minExtent: a,
|
|
5012
5026
|
maxExtent: L,
|
|
5013
5027
|
elevation: q,
|
|
@@ -5024,7 +5038,7 @@ class CQ {
|
|
|
5024
5038
|
};
|
|
5025
5039
|
}
|
|
5026
5040
|
convertMLeaderStyle(B, E) {
|
|
5027
|
-
const Q = this.libredwg, G = this.getCommonObjectAttrs(E), w = (h) => Q.dwg_dynapi_entity_data(B, h), F = (h) => Q.dwg_ref_get_id(h), i = (h) => h > 0,
|
|
5041
|
+
const Q = this.libredwg, G = this.getCommonObjectAttrs(E), w = (h) => Q.dwg_dynapi_entity_data(B, h), F = (h) => Q.dwg_ref_get_id(h), i = (h) => h > 0, H = (h) => h != null ? wQ(h) : void 0;
|
|
5028
5042
|
return {
|
|
5029
5043
|
...G,
|
|
5030
5044
|
subclassMarker: "AcDbMLeaderStyle",
|
|
@@ -5036,7 +5050,7 @@ class CQ {
|
|
|
5036
5050
|
firstSegmentAngleConstraint: w("first_seg_angle"),
|
|
5037
5051
|
secondSegmentAngleConstraint: w("second_seg_angle"),
|
|
5038
5052
|
leaderLineType: w("type"),
|
|
5039
|
-
leaderLineColor:
|
|
5053
|
+
leaderLineColor: H(w("line_color")),
|
|
5040
5054
|
leaderLineTypeId: F(w("line_type")),
|
|
5041
5055
|
leaderLineWeight: w("linewt"),
|
|
5042
5056
|
landingEnabled: i(w("has_landing")),
|
|
@@ -5052,13 +5066,13 @@ class CQ {
|
|
|
5052
5066
|
textAngleType: w("text_angle_type"),
|
|
5053
5067
|
textAlignmentType: w("text_align_type"),
|
|
5054
5068
|
textRightAttachmentType: w("attach_right"),
|
|
5055
|
-
textColor:
|
|
5069
|
+
textColor: H(w("text_color")),
|
|
5056
5070
|
textHeight: w("text_height"),
|
|
5057
5071
|
textFrameEnabled: i(w("has_text_frame")),
|
|
5058
5072
|
textAlignAlwaysLeft: i(w("text_always_left")),
|
|
5059
5073
|
alignSpace: w("align_space"),
|
|
5060
5074
|
blockContentId: F(w("block")),
|
|
5061
|
-
blockContentColor:
|
|
5075
|
+
blockContentColor: H(w("block_color")),
|
|
5062
5076
|
blockContentScale: w("block_scale"),
|
|
5063
5077
|
blockContentScaleEnabled: i(w("use_block_scale")),
|
|
5064
5078
|
blockContentRotation: w("block_rotation"),
|
|
@@ -5075,7 +5089,7 @@ class CQ {
|
|
|
5075
5089
|
};
|
|
5076
5090
|
}
|
|
5077
5091
|
convertSpatialFilter(B, E) {
|
|
5078
|
-
const Q = this.libredwg, G = this.getCommonObjectAttrs(E), w = Q.dwg_dynapi_entity_data(B, "origin"), F = Q.dwg_dynapi_entity_data(B, "num_clip_verts"), i = Q.dwg_dynapi_entity_data(B, "clip_verts"),
|
|
5092
|
+
const Q = this.libredwg, G = this.getCommonObjectAttrs(E), w = Q.dwg_dynapi_entity_data(B, "origin"), F = Q.dwg_dynapi_entity_data(B, "num_clip_verts"), i = Q.dwg_dynapi_entity_data(B, "clip_verts"), H = Q.dwg_ptr_to_point2d_array(
|
|
5079
5093
|
i,
|
|
5080
5094
|
F
|
|
5081
5095
|
), h = Q.dwg_dynapi_entity_data(B, "extrusion"), R = Q.dwg_dynapi_entity_data(B, "display_boundary_on"), y = Q.dwg_dynapi_entity_data(B, "front_clip_on"), c = Q.dwg_dynapi_entity_data(B, "front_clip_z"), k = Q.dwg_dynapi_entity_data(B, "back_clip_on"), O = Q.dwg_dynapi_entity_data(B, "back_clip_z"), a = Q.dwg_dynapi_entity_data(B, "transform"), L = Q.dwg_ptr_to_double_array(a, 12), q = Q.dwg_dynapi_entity_data(B, "inverse_transform"), z = Q.dwg_ptr_to_double_array(
|
|
@@ -5086,7 +5100,7 @@ class CQ {
|
|
|
5086
5100
|
...G,
|
|
5087
5101
|
origin: w,
|
|
5088
5102
|
numberOfPointsOnClipBoundary: F,
|
|
5089
|
-
vertices:
|
|
5103
|
+
vertices: H,
|
|
5090
5104
|
extrusionDirection: h,
|
|
5091
5105
|
clipBoundaryVisible: !!R,
|
|
5092
5106
|
frontClippingPlaneFlag: !!y,
|
|
@@ -5144,10 +5158,10 @@ class kA {
|
|
|
5144
5158
|
*/
|
|
5145
5159
|
rotate(B, E) {
|
|
5146
5160
|
const Q = Math.cos(B), G = Math.sin(B), w = this.getCorners().map((F) => {
|
|
5147
|
-
const i = F.x - E.x,
|
|
5161
|
+
const i = F.x - E.x, H = F.y - E.y;
|
|
5148
5162
|
return {
|
|
5149
|
-
x: E.x + i * Q -
|
|
5150
|
-
y: E.y + i * G +
|
|
5163
|
+
x: E.x + i * Q - H * G,
|
|
5164
|
+
y: E.y + i * G + H * Q
|
|
5151
5165
|
};
|
|
5152
5166
|
});
|
|
5153
5167
|
this.reset();
|
|
@@ -5195,18 +5209,18 @@ function DI(C, B, E, Q, G) {
|
|
|
5195
5209
|
throw new Error("degree must be at least 1 (linear)");
|
|
5196
5210
|
if (B > w - 1)
|
|
5197
5211
|
throw new Error("degree must be less than or equal to point count - 1");
|
|
5198
|
-
const i = G ?? new Array(w).fill(1),
|
|
5212
|
+
const i = G ?? new Array(w).fill(1), H = Q ?? (() => {
|
|
5199
5213
|
const a = [];
|
|
5200
5214
|
for (let L = 0; L < w + B + 1; L++)
|
|
5201
5215
|
a.push(L);
|
|
5202
5216
|
return a;
|
|
5203
5217
|
})();
|
|
5204
|
-
if (
|
|
5218
|
+
if (H.length !== w + B + 1)
|
|
5205
5219
|
throw new Error("bad knot vector length");
|
|
5206
|
-
const h = [B,
|
|
5220
|
+
const h = [B, H.length - 1 - B], R = H[h[0]], y = H[h[1]];
|
|
5207
5221
|
C = C * (y - R) + R, C = Math.max(C, R), C = Math.min(C, y);
|
|
5208
5222
|
let c = h[0];
|
|
5209
|
-
for (; c < h[1] && !(C >=
|
|
5223
|
+
for (; c < h[1] && !(C >= H[c] && C <= H[c + 1]); c++)
|
|
5210
5224
|
;
|
|
5211
5225
|
const k = new Array(w);
|
|
5212
5226
|
for (let a = 0; a < w; a++) {
|
|
@@ -5217,7 +5231,7 @@ function DI(C, B, E, Q, G) {
|
|
|
5217
5231
|
}
|
|
5218
5232
|
for (let a = 1; a <= B + 1; a++)
|
|
5219
5233
|
for (let L = c; L > c - B - 1 + a; L--) {
|
|
5220
|
-
const q =
|
|
5234
|
+
const q = H[L + B + 1 - a] - H[L], z = q === 0 ? 0 : (C - H[L]) / q;
|
|
5221
5235
|
for (let p = 0; p < F + 1; p++)
|
|
5222
5236
|
k[L][p] = (1 - z) * k[L - 1][p] + z * k[L][p];
|
|
5223
5237
|
}
|
|
@@ -5776,7 +5790,7 @@ class yA {
|
|
|
5776
5790
|
function GI(C, B, E, Q = 5) {
|
|
5777
5791
|
let G, w, F;
|
|
5778
5792
|
E < 0 ? (G = Math.atan(-E) * 4, w = new yA(C.x, C.y), F = new yA(B.x, B.y)) : (G = Math.atan(E) * 4, w = new yA(B.x, B.y), F = new yA(C.x, C.y));
|
|
5779
|
-
const i = F.sub(w),
|
|
5793
|
+
const i = F.sub(w), H = i.length(), h = w.add(i.multiply(0.5)), R = Math.abs(H / 2 / Math.tan(G / 2)), y = i.norm(), c = new yA(
|
|
5780
5794
|
y.x * Math.cos(Math.PI / 2) - y.y * Math.sin(Math.PI / 2),
|
|
5781
5795
|
y.y * Math.cos(Math.PI / 2) + y.x * Math.sin(Math.PI / 2)
|
|
5782
5796
|
), k = G < Math.PI ? h.add(c.multiply(-R)) : h.add(c.multiply(R)), O = Math.atan2(F.y - k.y, F.x - k.x) / Math.PI * 180;
|
|
@@ -5831,14 +5845,14 @@ class FI {
|
|
|
5831
5845
|
interpolateBSpline(B, E, Q, G = 25, w) {
|
|
5832
5846
|
const F = [], i = B.map(
|
|
5833
5847
|
(R) => [R.x, R.y]
|
|
5834
|
-
),
|
|
5848
|
+
), H = [Q[E]], h = [
|
|
5835
5849
|
Q[E],
|
|
5836
5850
|
Q[Q.length - 1 - E]
|
|
5837
5851
|
];
|
|
5838
5852
|
for (let R = E + 1; R < Q.length - E; ++R)
|
|
5839
|
-
|
|
5840
|
-
for (let R = 1; R <
|
|
5841
|
-
const y =
|
|
5853
|
+
H[H.length - 1] !== Q[R] && H.push(Q[R]);
|
|
5854
|
+
for (let R = 1; R < H.length; ++R) {
|
|
5855
|
+
const y = H[R - 1], c = H[R];
|
|
5842
5856
|
for (let k = 0; k <= G; ++k) {
|
|
5843
5857
|
let a = (k / G * (c - y) + y - h[0]) / (h[1] - h[0]);
|
|
5844
5858
|
a = Math.max(0, Math.min(1, a));
|
|
@@ -5896,9 +5910,9 @@ class FI {
|
|
|
5896
5910
|
}).expandByPoint({
|
|
5897
5911
|
x: Q.x + G,
|
|
5898
5912
|
y: Q.y - B.length * E * 1.5
|
|
5899
|
-
}), i = B.map((
|
|
5913
|
+
}), i = B.map((H, h) => {
|
|
5900
5914
|
const R = Q.x, y = Q.y - h * E * 1.5, c = `translate(${R},${y}) scale(1,-1) translate(${-R},${-y})`;
|
|
5901
|
-
return `<text x="${R}" y="${y}" font-size="${E}" text-anchor="${w}" transform="${c}">${
|
|
5915
|
+
return `<text x="${R}" y="${y}" font-size="${E}" text-anchor="${w}" transform="${c}">${H}</text>`;
|
|
5902
5916
|
});
|
|
5903
5917
|
return { bbox: F, element: i.join(`
|
|
5904
5918
|
`) };
|
|
@@ -5922,10 +5936,10 @@ class FI {
|
|
|
5922
5936
|
columnWidthArr: w,
|
|
5923
5937
|
startPoint: F,
|
|
5924
5938
|
cells: i
|
|
5925
|
-
} = B,
|
|
5939
|
+
} = B, H = F.x, h = F.y, R = [];
|
|
5926
5940
|
for (let L = 0, q = h; L < E; L++) {
|
|
5927
5941
|
const z = G[L];
|
|
5928
|
-
let p =
|
|
5942
|
+
let p = H;
|
|
5929
5943
|
for (let W = 0; W < Q; W++) {
|
|
5930
5944
|
const T = L * Q + W, X = i[T], AA = w[W];
|
|
5931
5945
|
R.push({ x: p, y: q, width: AA, height: z, cell: X, row: L, col: W }), p += AA;
|
|
@@ -5947,8 +5961,8 @@ class FI {
|
|
|
5947
5961
|
return [...T, m].join(`
|
|
5948
5962
|
`);
|
|
5949
5963
|
}).join(`
|
|
5950
|
-
`), c = w.reduce((L, q) => L + q, 0), k = G.reduce((L, q) => L + q, 0), O = new kA().expandByPoint({ x:
|
|
5951
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${c}" height="${k}" viewBox="${
|
|
5964
|
+
`), c = w.reduce((L, q) => L + q, 0), k = G.reduce((L, q) => L + q, 0), O = new kA().expandByPoint({ x: H, y: h }).expandByPoint({ x: H + c, y: h + k }), a = `
|
|
5965
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${c}" height="${k}" viewBox="${H} ${h} ${c} ${k}">
|
|
5952
5966
|
${y}
|
|
5953
5967
|
</svg>
|
|
5954
5968
|
`.trim();
|
|
@@ -5986,7 +6000,7 @@ class FI {
|
|
|
5986
6000
|
};
|
|
5987
6001
|
}
|
|
5988
6002
|
ellipseOrArc(B, E, Q, G, w, F, i) {
|
|
5989
|
-
const
|
|
6003
|
+
const H = Math.sqrt(Q * Q + G * G), h = w * H, R = -Math.atan2(-G, Q), y = this.bboxEllipseOrArc(
|
|
5990
6004
|
B,
|
|
5991
6005
|
E,
|
|
5992
6006
|
Q,
|
|
@@ -5996,34 +6010,34 @@ class FI {
|
|
|
5996
6010
|
i
|
|
5997
6011
|
);
|
|
5998
6012
|
if (Math.abs(F - i) < 1e-9 || Math.abs(F - i + Math.PI * 2) < 1e-9) {
|
|
5999
|
-
const c = `<g transform="rotate(${R / Math.PI * 180} ${B}, ${E})"><ellipse cx="${B}" cy="${E}" rx="${
|
|
6013
|
+
const c = `<g transform="rotate(${R / Math.PI * 180} ${B}, ${E})"><ellipse cx="${B}" cy="${E}" rx="${H}" ry="${h}" /></g>`;
|
|
6000
6014
|
return { bbox: y, element: c };
|
|
6001
6015
|
} else {
|
|
6002
6016
|
const c = this.rotate(
|
|
6003
|
-
{ x: Math.cos(F) *
|
|
6017
|
+
{ x: Math.cos(F) * H, y: Math.sin(F) * h },
|
|
6004
6018
|
R
|
|
6005
6019
|
), k = { x: B + c.x, y: E + c.y }, O = this.rotate(
|
|
6006
|
-
{ x: Math.cos(i) *
|
|
6020
|
+
{ x: Math.cos(i) * H, y: Math.sin(i) * h },
|
|
6007
6021
|
R
|
|
6008
|
-
), a = { x: B + O.x, y: E + O.y }, q = (i < F ? i + Math.PI * 2 : i) - F < Math.PI ? 0 : 1, p = `<path d="${`M ${k.x} ${k.y} A ${
|
|
6022
|
+
), a = { x: B + O.x, y: E + O.y }, q = (i < F ? i + Math.PI * 2 : i) - F < Math.PI ? 0 : 1, p = `<path d="${`M ${k.x} ${k.y} A ${H} ${h} ${R / Math.PI * 180} ${q} 1 ${a.x} ${a.y}`}" />`;
|
|
6009
6023
|
return { bbox: y, element: p };
|
|
6010
6024
|
}
|
|
6011
6025
|
}
|
|
6012
6026
|
bboxEllipseOrArc(B, E, Q, G, w, F, i) {
|
|
6013
6027
|
for (; F < 0; ) F += Math.PI * 2;
|
|
6014
6028
|
for (; i <= F; ) i += Math.PI * 2;
|
|
6015
|
-
const
|
|
6029
|
+
const H = [];
|
|
6016
6030
|
if (Math.abs(Q) < 1e-12 || Math.abs(G) < 1e-12)
|
|
6017
6031
|
for (let k = 0; k < 4; k++)
|
|
6018
|
-
|
|
6032
|
+
H.push(k / 2 * Math.PI);
|
|
6019
6033
|
else
|
|
6020
|
-
|
|
6034
|
+
H[0] = Math.atan(-G * w / Q) - Math.PI, H[1] = Math.atan(Q * w / G) - Math.PI, H[2] = H[0] - Math.PI, H[3] = H[1] - Math.PI;
|
|
6021
6035
|
for (let k = 4; k >= 0; k--) {
|
|
6022
|
-
for (;
|
|
6023
|
-
|
|
6036
|
+
for (; H[k] < F; ) H[k] += Math.PI * 2;
|
|
6037
|
+
H[k] > i && H.splice(k, 1);
|
|
6024
6038
|
}
|
|
6025
|
-
|
|
6026
|
-
const h =
|
|
6039
|
+
H.push(F), H.push(i);
|
|
6040
|
+
const h = H.map((k) => ({ x: Math.cos(k), y: Math.sin(k) })), R = [
|
|
6027
6041
|
[Q, -G * w],
|
|
6028
6042
|
[G, Q * w]
|
|
6029
6043
|
];
|
|
@@ -6089,9 +6103,9 @@ class FI {
|
|
|
6089
6103
|
block(B, E) {
|
|
6090
6104
|
const Q = B.entities, { bbox: G, elements: w } = Q.reduce(
|
|
6091
6105
|
(F, i) => {
|
|
6092
|
-
const
|
|
6093
|
-
if (
|
|
6094
|
-
const { bbox: h, element: R } =
|
|
6106
|
+
const H = this.entityToBoundsAndElement(i);
|
|
6107
|
+
if (H) {
|
|
6108
|
+
const { bbox: h, element: R } = H;
|
|
6095
6109
|
h.valid && (F.bbox.expandByPoint(h.min), F.bbox.expandByPoint(h.max));
|
|
6096
6110
|
const y = this.getEntityColor(E.tables.LAYER.entries, i), c = i.type == "TEXT" || i.type == "MTEXT" ? y.cssColor : "none";
|
|
6097
6111
|
y.isByBlock ? F.elements.push(`<g id="${i.handle}">${R}</g>`) : F.elements.push(
|
|
@@ -6565,8 +6579,8 @@ const FQ = class KQ {
|
|
|
6565
6579
|
dwg_getall_object_by_type(B, E) {
|
|
6566
6580
|
const Q = this.wasmInstance, G = Q.dwg_get_num_objects(B), w = [];
|
|
6567
6581
|
for (let F = 0; F < G; F++) {
|
|
6568
|
-
const i = Q.dwg_get_object(B, F),
|
|
6569
|
-
|
|
6582
|
+
const i = Q.dwg_get_object(B, F), H = Q.dwg_object_to_object_tio(i);
|
|
6583
|
+
H && Q.dwg_object_get_fixedtype(i) == E && w.push(H);
|
|
6570
6584
|
}
|
|
6571
6585
|
return w;
|
|
6572
6586
|
}
|
|
@@ -6580,8 +6594,8 @@ const FQ = class KQ {
|
|
|
6580
6594
|
dwg_getall_entity_by_type(B, E) {
|
|
6581
6595
|
const Q = this.wasmInstance, G = Q.dwg_get_num_objects(B), w = [];
|
|
6582
6596
|
for (let F = 0; F < G; F++) {
|
|
6583
|
-
const i = Q.dwg_get_object(B, F),
|
|
6584
|
-
|
|
6597
|
+
const i = Q.dwg_get_object(B, F), H = Q.dwg_object_to_entity_tio(i);
|
|
6598
|
+
H && Q.dwg_object_get_fixedtype(i) == E && w.push(H);
|
|
6585
6599
|
}
|
|
6586
6600
|
return w;
|
|
6587
6601
|
}
|