build-dxf 0.0.38 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/package.json +1 -1
- package/src/build.js +571 -566
- package/src/index.css +1 -1
- package/src/index3.js +66 -64
- package/src/utils/DxfSystem/plugin/RenderPlugin/pages/Dxf.vue.d.ts +1 -1
- package/src/utils/Quadtree/LineSegment.d.ts +1 -0
package/src/index3.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as u from "three";
|
|
2
|
-
import { i as ut, n as pt, r as Ue, t as qe, c as Pe, d as gt, e as vt, f as De, g as Q, _ as Ze, u as ft, h as fe, j as
|
|
3
|
-
import { C as Ae, P as M, L as N, B as Ye, E as Xe, b as ze, Q as Fe, u as At, A as
|
|
2
|
+
import { i as ut, n as pt, r as Ue, t as qe, c as Pe, d as gt, e as vt, f as De, g as Q, _ as Ze, u as ft, h as fe, j as _e, w as yt, k as wt, l as bt, p as xt, m as Ct, o as Et, T as Ne, q as Be, s as Mt, v as Lt, x as Re, y as Ie, z as Le, A as kt, B as It, L as ye, D as Pt, b as Oe, E as re, S as Dt } from "./selectLocalFile.js";
|
|
3
|
+
import { C as Ae, P as M, L as N, B as Ye, E as Xe, b as ze, Q as Fe, u as At, A as St, r as Ke, W as _t, T as Nt } from "./build.js";
|
|
4
4
|
import "clipper-lib";
|
|
5
5
|
import "dxf-writer";
|
|
6
6
|
import "three/addons/controls/OrbitControls.js";
|
|
7
|
-
import { watch as J, ref as
|
|
7
|
+
import { watch as J, ref as _, defineComponent as me, computed as A, createElementBlock as R, openBlock as D, normalizeClass as j, unref as v, renderSlot as be, createVNode as F, Transition as xe, withCtx as V, withDirectives as $e, createElementVNode as P, normalizeStyle as Se, createTextVNode as X, toDisplayString as de, vShow as et, shallowReactive as Bt, onMounted as tt, createBlock as ge, createCommentVNode as q, resolveDynamicComponent as Rt, Fragment as ve, withModifiers as Ot, nextTick as we, isVNode as nt, render as Te, toRaw as zt, onUnmounted as Ft, renderList as ke, createStaticVNode as Kt, TransitionGroup as Tt, createApp as Vt } from "vue";
|
|
8
8
|
function ot(d) {
|
|
9
9
|
var e;
|
|
10
10
|
const t = Ue(d);
|
|
11
11
|
return (e = t?.$el) != null ? e : t;
|
|
12
12
|
}
|
|
13
13
|
const st = Pe ? window : void 0;
|
|
14
|
-
function
|
|
14
|
+
function jt(...d) {
|
|
15
15
|
let e, t, n, o;
|
|
16
16
|
if (ut(d[0]) || Array.isArray(d[0]) ? ([t, n, o] = d, e = st) : [e, t, n, o] = d, !e)
|
|
17
17
|
return pt;
|
|
@@ -26,11 +26,11 @@ function Vt(...d) {
|
|
|
26
26
|
return qe(i), i;
|
|
27
27
|
}
|
|
28
28
|
function Gt(d, e = !1) {
|
|
29
|
-
const t =
|
|
29
|
+
const t = _(), n = () => t.value = !!d();
|
|
30
30
|
return n(), gt(n, e), t;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
je
|
|
32
|
+
const Ve = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, je = "__vueuse_ssr_handlers__";
|
|
33
|
+
Ve[je] = Ve[je] || {};
|
|
34
34
|
var Ge = Object.getOwnPropertySymbols, Qt = Object.prototype.hasOwnProperty, Ht = Object.prototype.propertyIsEnumerable, Wt = (d, e) => {
|
|
35
35
|
var t = {};
|
|
36
36
|
for (var n in d)
|
|
@@ -140,8 +140,8 @@ const $t = (d) => d, en = {
|
|
|
140
140
|
return [
|
|
141
141
|
{
|
|
142
142
|
backgroundColor: t.color,
|
|
143
|
-
marginRight:
|
|
144
|
-
marginTop:
|
|
143
|
+
marginRight: _e(-((l = (a = t.offset) == null ? void 0 : a[0]) != null ? l : 0)),
|
|
144
|
+
marginTop: _e((i = (r = t.offset) == null ? void 0 : r[1]) != null ? i : 0)
|
|
145
145
|
},
|
|
146
146
|
(c = t.badgeStyle) != null ? c : {}
|
|
147
147
|
];
|
|
@@ -149,16 +149,16 @@ const $t = (d) => d, en = {
|
|
|
149
149
|
return e({
|
|
150
150
|
content: o
|
|
151
151
|
}), (a, l) => (D(), R("div", {
|
|
152
|
-
class:
|
|
152
|
+
class: j(v(n).b())
|
|
153
153
|
}, [
|
|
154
154
|
be(a.$slots, "default"),
|
|
155
155
|
F(xe, {
|
|
156
156
|
name: `${v(n).namespace.value}-zoom-in-center`,
|
|
157
157
|
persisted: ""
|
|
158
158
|
}, {
|
|
159
|
-
default:
|
|
159
|
+
default: V(() => [
|
|
160
160
|
$e(P("sup", {
|
|
161
|
-
class:
|
|
161
|
+
class: j([
|
|
162
162
|
v(n).e("content"),
|
|
163
163
|
v(n).em("content", a.type),
|
|
164
164
|
v(n).is("fixed", !!a.$slots.default),
|
|
@@ -166,7 +166,7 @@ const $t = (d) => d, en = {
|
|
|
166
166
|
v(n).is("hide-zero", !a.showZero && t.value === 0),
|
|
167
167
|
a.badgeClass
|
|
168
168
|
]),
|
|
169
|
-
style:
|
|
169
|
+
style: Se(v(s))
|
|
170
170
|
}, [
|
|
171
171
|
be(a.$slots, "content", { value: v(o) }, () => [
|
|
172
172
|
X(de(v(o)), 1)
|
|
@@ -330,7 +330,7 @@ const at = [
|
|
|
330
330
|
props: dn,
|
|
331
331
|
emits: ln,
|
|
332
332
|
setup(d, { expose: e, emit: t }) {
|
|
333
|
-
const n = d, { Close: o } = Mt, s =
|
|
333
|
+
const n = d, { Close: o } = Mt, s = _(!1), { ns: a, zIndex: l } = Et("message"), { currentZIndex: r, nextZIndex: i } = l, c = _(), m = _(!1), y = _(0);
|
|
334
334
|
let f;
|
|
335
335
|
const g = A(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), h = A(() => {
|
|
336
336
|
const b = n.type;
|
|
@@ -341,31 +341,31 @@ const at = [
|
|
|
341
341
|
}));
|
|
342
342
|
function Z() {
|
|
343
343
|
n.duration !== 0 && ({ stop: f } = Lt(() => {
|
|
344
|
-
|
|
344
|
+
S();
|
|
345
345
|
}, n.duration));
|
|
346
346
|
}
|
|
347
347
|
function G() {
|
|
348
348
|
f?.();
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function S() {
|
|
351
351
|
m.value = !1, we(() => {
|
|
352
352
|
var b;
|
|
353
353
|
s.value || ((b = n.onClose) == null || b.call(n), t("destroy"));
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
356
|
function L({ code: b }) {
|
|
357
|
-
b === en.esc &&
|
|
357
|
+
b === en.esc && S();
|
|
358
358
|
}
|
|
359
359
|
return tt(() => {
|
|
360
360
|
Z(), i(), m.value = !0;
|
|
361
361
|
}), J(() => n.repeatNum, () => {
|
|
362
362
|
G(), Z();
|
|
363
|
-
}),
|
|
363
|
+
}), jt(document, "keydown", L), Jt(c, () => {
|
|
364
364
|
y.value = c.value.getBoundingClientRect().height;
|
|
365
365
|
}), e({
|
|
366
366
|
visible: m,
|
|
367
367
|
bottom: K,
|
|
368
|
-
close:
|
|
368
|
+
close: S
|
|
369
369
|
}), (b, z) => (D(), ge(xe, {
|
|
370
370
|
name: v(a).b("fade"),
|
|
371
371
|
onBeforeEnter: (W) => s.value = !0,
|
|
@@ -373,19 +373,19 @@ const at = [
|
|
|
373
373
|
onAfterLeave: (W) => b.$emit("destroy"),
|
|
374
374
|
persisted: ""
|
|
375
375
|
}, {
|
|
376
|
-
default:
|
|
376
|
+
default: V(() => [
|
|
377
377
|
$e(P("div", {
|
|
378
378
|
id: b.id,
|
|
379
379
|
ref_key: "messageRef",
|
|
380
380
|
ref: c,
|
|
381
|
-
class:
|
|
381
|
+
class: j([
|
|
382
382
|
v(a).b(),
|
|
383
383
|
{ [v(a).m(b.type)]: b.type },
|
|
384
384
|
v(a).is("closable", b.showClose),
|
|
385
385
|
v(a).is("plain", b.plain),
|
|
386
386
|
b.customClass
|
|
387
387
|
]),
|
|
388
|
-
style:
|
|
388
|
+
style: Se(v(Y)),
|
|
389
389
|
role: "alert",
|
|
390
390
|
onMouseenter: G,
|
|
391
391
|
onMouseleave: Z
|
|
@@ -394,13 +394,13 @@ const at = [
|
|
|
394
394
|
key: 0,
|
|
395
395
|
value: b.repeatNum,
|
|
396
396
|
type: v(g),
|
|
397
|
-
class:
|
|
397
|
+
class: j(v(a).e("badge"))
|
|
398
398
|
}, null, 8, ["value", "type", "class"])) : q("v-if", !0),
|
|
399
399
|
v(E) ? (D(), ge(v(Be), {
|
|
400
400
|
key: 1,
|
|
401
|
-
class:
|
|
401
|
+
class: j([v(a).e("icon"), v(h)])
|
|
402
402
|
}, {
|
|
403
|
-
default:
|
|
403
|
+
default: V(() => [
|
|
404
404
|
(D(), ge(Rt(v(E))))
|
|
405
405
|
]),
|
|
406
406
|
_: 1
|
|
@@ -409,20 +409,20 @@ const at = [
|
|
|
409
409
|
b.dangerouslyUseHTMLString ? (D(), R(ve, { key: 1 }, [
|
|
410
410
|
q(" Caution here, message could've been compromised, never use user's input as message "),
|
|
411
411
|
P("p", {
|
|
412
|
-
class:
|
|
412
|
+
class: j(v(a).e("content")),
|
|
413
413
|
innerHTML: b.message
|
|
414
414
|
}, null, 10, ["innerHTML"])
|
|
415
415
|
], 2112)) : (D(), R("p", {
|
|
416
416
|
key: 0,
|
|
417
|
-
class:
|
|
417
|
+
class: j(v(a).e("content"))
|
|
418
418
|
}, de(b.message), 3))
|
|
419
419
|
]),
|
|
420
420
|
b.showClose ? (D(), ge(v(Be), {
|
|
421
421
|
key: 2,
|
|
422
|
-
class:
|
|
423
|
-
onClick: Ot(
|
|
422
|
+
class: j(v(a).e("closeBtn")),
|
|
423
|
+
onClick: Ot(S, ["stop"])
|
|
424
424
|
}, {
|
|
425
|
-
default:
|
|
425
|
+
default: V(() => [
|
|
426
426
|
F(v(o))
|
|
427
427
|
]),
|
|
428
428
|
_: 1
|
|
@@ -1007,9 +1007,9 @@ const En = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
1007
1007
|
}, Symbol.toStringTag, { value: "Module" })), Dn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M909.050991%20169.476903l-217.554898%200%200-31.346939c0-39.5866-32.205493-71.792093-71.793116-71.792093L408.15591%2066.337871c-39.5866%200-71.792093%2032.205493-71.792093%2071.792093l0%2031.346939L113.349581%20169.476903c-11.013845%200-19.942191%208.940626-19.942191%2019.954471s8.928347%2019.954471%2019.942191%2019.954471l84.264149%200%200%20640.687918c0%2060.479443%2049.203632%20109.683075%20109.683075%20109.683075l416.474366%200c60.479443%200%20109.683075-49.203632%20109.683075-109.683075L833.454246%20209.385844l75.595722%200c11.012821%200%2019.942191-8.940626%2019.942191-19.954471S920.063813%20169.476903%20909.050991%20169.476903zM376.2482%20138.130987c0-17.593703%2014.314007-31.907711%2031.907711-31.907711l211.547067%200c17.593703%200%2031.907711%2014.314007%2031.907711%2031.907711l0%2031.346939L376.2482%20169.477926%20376.2482%20138.130987zM793.569864%20850.074785c0%2038.486546-31.312146%2069.798692-69.798692%2069.798692L307.297828%20919.873478c-38.486546%200-69.798692-31.312146-69.798692-69.798692L237.499136%20211.042577l556.070728%200L793.569864%20850.074785zM510.662539%20861.276918c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L530.61701%20294.912753c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191L490.708068%20841.334727C490.708068%20852.347548%20499.649717%20861.276918%20510.662539%20861.276918zM374.562814%20801.449321c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L394.517285%20354.74035c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191l0%20426.76678C354.608344%20792.519951%20363.549993%20801.449321%20374.562814%20801.449321zM649.832182%20801.449321c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L669.786653%20354.74035c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191l0%20426.76678C629.877711%20792.519951%20638.81936%20801.449321%20649.832182%20801.449321z'%20%3e%3c/path%3e%3c/svg%3e", An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1008
1008
|
__proto__: null,
|
|
1009
1009
|
default: Dn
|
|
1010
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1010
|
+
}, Symbol.toStringTag, { value: "Module" })), Sn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M220.451548%20913.518482V318.145854c0-27.62038%2022.505495-50.125874%2050.125875-50.125874H865.95005c27.62038%200%2050.125874%2022.505495%2050.125874%2050.125874v218.917083h59.332667V318.145854c0-60.355644-49.102897-109.458541-109.458541-109.458541h-39.896104v-99.228772C826.053946%2049.102897%20776.951049%200%20716.595405%200H121.222777C60.867133%200%2011.764236%2049.102897%2011.764236%20109.458541V705.854146c0%2060.355644%2049.102897%20109.458541%20109.458541%20109.458541h39.896104v99.228772c0%2060.355644%2049.102897%20109.458541%20109.458542%20109.458541h257.790209v-59.332667H269.554446c-26.597403-1.022977-49.102897-23.528472-49.102898-51.148851z%20m-59.332667-595.372628v436.811189h-39.896104c-27.62038%200-50.125874-22.505495-50.125874-50.125874V109.458541c0-27.62038%2022.505495-50.125874%2050.125874-50.125874H716.595405c27.62038%200%2050.125874%2022.505495%2050.125874%2050.125874v99.228772H269.554446c-59.332667%200-108.435564%2049.102897-108.435565%20109.458541z'%20%3e%3c/path%3e%3cpath%20d='M902.777223%20854.185814l98.205794-98.205794c15.344655-15.344655%2015.344655-40.919081%200-56.263736s-40.919081-15.344655-56.263736%200L846.513487%20797.922078%20747.284715%20699.716284c-15.344655-15.344655-40.919081-15.344655-56.263736%200s-15.344655%2040.919081%200%2056.263736l98.205794%2098.205794-98.205794%2098.205794c-15.344655%2015.344655-15.344655%2040.919081%200%2056.263737s40.919081%2015.344655%2056.263736%200l98.205794-98.205795%2098.205795%2098.205795c15.344655%2015.344655%2040.919081%2015.344655%2056.263736%200s15.344655-40.919081%200-56.263737l-97.182817-98.205794z'%20%3e%3c/path%3e%3c/svg%3e", _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1011
1011
|
__proto__: null,
|
|
1012
|
-
default:
|
|
1012
|
+
default: Sn
|
|
1013
1013
|
}, Symbol.toStringTag, { value: "Module" })), Nn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902601497'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='9801'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M761.344%20119.296H226.816c-18.944%200-39.424%2011.776-39.424%2030.72V921.6h614.4V148.48c0.512-18.944-22.016-29.184-40.448-29.184z%20m-537.6%20768c-2.048%200-2.048%200%200%200L221.696%20163.84c0-5.12%205.12-10.24%2010.24-10.24h522.24c8.704%200%2013.824%205.12%2013.824%2013.824v720.384s0%201.536-1.536%201.536h-15.36V194.56c0-16.896-8.704-24.064-29.184-24.064H266.24c-18.944%200-27.136%208.704-27.136%2024.064v692.736h-15.36z%20m49.152%200V204.8H716.8v682.496H272.896z'%20p-id='9802'%3e%3c/path%3e%3cpath%20d='M648.704%20508.416c-16.896%200-32.256%2013.824-32.256%2032.256%200%2016.896%2013.824%2032.256%2032.256%2032.256s32.256-13.824%2032.256-32.256c0-16.896-13.824-32.256-32.256-32.256z'%20p-id='9803'%3e%3c/path%3e%3c/svg%3e", Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1014
1014
|
__proto__: null,
|
|
1015
1015
|
default: Nn
|
|
@@ -1022,9 +1022,9 @@ const En = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
1022
1022
|
}, Symbol.toStringTag, { value: "Module" })), Kn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M114.176%2046.528h618.496c37.312%200.064%2067.584%2030.336%2067.648%2067.648v618.56c0%2037.248-30.336%2067.584-67.648%2067.584H114.176A67.776%2067.776%200%200%201%2046.528%20732.8V114.176c0-37.312%2030.336-67.648%2067.648-67.648z%20m2.176%20686.208l616.32-2.24-2.176-616.32-614.144%202.176v616.32zM907.648%20291.2l2.176%20616.32H291.264a34.88%2034.88%200%201%200%200%2069.888h618.56c37.312%200%2067.648-30.336%2067.648-67.648V291.264a34.88%2034.88%200%201%200-69.824%200z'%20%3e%3c/path%3e%3c/svg%3e", Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1023
1023
|
__proto__: null,
|
|
1024
1024
|
default: Kn
|
|
1025
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1025
|
+
}, Symbol.toStringTag, { value: "Module" })), Vn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201029%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M788.17984%2016l-55.424%2060.672%20116.48%20106.56H418.13184a410.816%20410.816%200%201%200%200%20821.632h547.712v-82.176H418.13184a328.64%20328.64%200%200%201%200-657.28l441.792-0.128-124.8%2098.368%2050.752%2064.512%20243.328-191.488L788.17984%2016z'%3e%3c/path%3e%3c/svg%3e", jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1026
1026
|
__proto__: null,
|
|
1027
|
-
default:
|
|
1027
|
+
default: Vn
|
|
1028
1028
|
}, Symbol.toStringTag, { value: "Module" })), Gn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201048%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M310.04722%20451.334244A49.95122%2049.95122%200%200%201%20239.416195%20521.990244L27.473171%20310.04722a49.95122%2049.95122%200%200%201%200-70.631025L239.416195%2027.473171a49.95122%2049.95122%200%200%201%2070.631025%2070.631024l-126.651318%20126.626342L649.365854%20224.780488c220.709463%200%20399.609756%20178.900293%20399.609756%20399.609756s-178.900293%20399.609756-399.609756%20399.609756H124.878049a49.95122%2049.95122%200%201%201%200-99.902439h524.487805c165.513366%200%20299.707317-134.193951%20299.707317-299.707317s-134.193951-299.707317-299.707317-299.707317H183.395902l126.651318%20126.651317z'%3e%3c/path%3e%3c/svg%3e", Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1029
1029
|
__proto__: null,
|
|
1030
1030
|
default: Gn
|
|
@@ -1604,7 +1604,7 @@ class le extends O {
|
|
|
1604
1604
|
*/
|
|
1605
1605
|
axisAlignmentCorrection(e) {
|
|
1606
1606
|
const t = [...this.renderManager.lines];
|
|
1607
|
-
return { newLines:
|
|
1607
|
+
return { newLines: St.correction(t, e, { groupMethod: "cross", fittingMethod: "max", crossAxistThreshold: 0.08 }), oldLines: t };
|
|
1608
1608
|
}
|
|
1609
1609
|
/** 开始
|
|
1610
1610
|
* @param next
|
|
@@ -1960,14 +1960,14 @@ class ae extends O {
|
|
|
1960
1960
|
const [n, o] = t, s = Math.min(n.length() * 0.8, o.length() * 0.8);
|
|
1961
1961
|
let a, l, r, i = 0, c = 0;
|
|
1962
1962
|
n.sameEndpointAsStart(o) ? (a = n.start, l = n.end) : (a = n.end, l = n.start), o.sameEndpointAsStart(n) ? r = o.end : r = o.start;
|
|
1963
|
-
function m(
|
|
1964
|
-
const b = L.x -
|
|
1963
|
+
function m(S, L) {
|
|
1964
|
+
const b = L.x - S.x, z = L.y - S.y;
|
|
1965
1965
|
let W = Math.atan2(z, b) * (180 / Math.PI);
|
|
1966
1966
|
return W < 0 && (W += 360), W;
|
|
1967
1967
|
}
|
|
1968
1968
|
const y = m(a, l), f = m(a, r), g = Math.min(y, f), h = Math.max(y, f), E = [];
|
|
1969
|
-
function x(
|
|
1970
|
-
for (let b =
|
|
1969
|
+
function x(S, L) {
|
|
1970
|
+
for (let b = S; b <= L; b++) {
|
|
1971
1971
|
const z = Math.cos(b * Math.PI / 180) * s + a.x, W = Math.sin(b * Math.PI / 180) * s + a.y, he = Math.cos((b + 1) * Math.PI / 180) * s + a.x, Ce = Math.sin((b + 1) * Math.PI / 180) * s + a.y;
|
|
1972
1972
|
E.push(z, W, 0, he, Ce, 0);
|
|
1973
1973
|
}
|
|
@@ -2098,7 +2098,7 @@ const ro = {
|
|
|
2098
2098
|
class: "text-[#999]"
|
|
2099
2099
|
}, wo = {
|
|
2100
2100
|
style: { "--el-color-primary": "var(--primary-color)" },
|
|
2101
|
-
class: "flex flex-row items-center justify-between gap-[
|
|
2101
|
+
class: "flex flex-row items-center justify-between gap-[5px] mt-[10px] text-[10px]"
|
|
2102
2102
|
}, bo = {
|
|
2103
2103
|
key: 0,
|
|
2104
2104
|
class: "flex flex-row items-center flex-wrap justify-between gap-[10px] mt-[10px] text-[10px]"
|
|
@@ -2111,7 +2111,7 @@ const ro = {
|
|
|
2111
2111
|
setup(d) {
|
|
2112
2112
|
function e(C, p, w = m.value.getBoundingClientRect(), U = y.value.getBoundingClientRect()) {
|
|
2113
2113
|
const ue = w.width - U.width, pe = 0, Me = w.height - U.height;
|
|
2114
|
-
C = Math.max(0, Math.min(C, ue)), p = Math.max(pe, Math.min(p, Me)),
|
|
2114
|
+
C = Math.max(0, Math.min(C, ue)), p = Math.max(pe, Math.min(p, Me)), S.value = { left: C, top: p };
|
|
2115
2115
|
}
|
|
2116
2116
|
function t(C) {
|
|
2117
2117
|
g.value !== C.command && (g.value !== "default" && x.commandManager.cancel(), setTimeout(() => x.commandManager.start(C.command)));
|
|
@@ -2147,7 +2147,7 @@ const ro = {
|
|
|
2147
2147
|
};
|
|
2148
2148
|
document.body.addEventListener("mousemove", U), document.addEventListener("mouseup", Ee);
|
|
2149
2149
|
}
|
|
2150
|
-
const a = d, l =
|
|
2150
|
+
const a = d, l = _(!0), r = _(!0), i = _(!0), c = _(!1), m = _(), y = _(), f = _(!0), g = _(""), h = zt(a.dxfSystem), E = h.findComponentByType(Pt), x = h.findComponentByType(lt), I = h.findComponentByType(rt), K = h.findComponentByType(_t), Y = h.findComponentByType(Nt), Z = _(0), G = _(0), S = _({ left: 10, top: 100 }), L = /* @__PURE__ */ Object.assign({ "./assets/images/angle.svg": Mn, "./assets/images/connection.svg": kn, "./assets/images/cutLine.svg": Pn, "./assets/images/deleteSelectLine.svg": An, "./assets/images/deleteSelectWindow.svg": _n, "./assets/images/door.svg": Bn, "./assets/images/intersectionConnection.svg": On, "./assets/images/line.svg": Fn, "./assets/images/mergeLine.svg": Tn, "./assets/images/revokeRollback.svg": jn, "./assets/images/rollback.svg": Qn, "./assets/images/selectAll.svg": Wn, "./assets/images/selectPoint.svg": Un, "./assets/images/verticalCorrection.svg": Zn, "./assets/images/verticalLine.svg": Xn, "./assets/images/window.svg": eo }), b = _(!1), z = _(0), W = _(!1), he = new ResizeObserver(() => e(S.value.left, S.value.top)), Ce = [
|
|
2151
2151
|
{ name: "开启绘制线段命令", shortcut: "Ctrl + L" },
|
|
2152
2152
|
{ name: "开启绘制门线命令", shortcut: "Ctrl + M" },
|
|
2153
2153
|
{ name: "开启绘制窗户线命令", shortcut: "Ctrl + Q" },
|
|
@@ -2300,9 +2300,11 @@ const ro = {
|
|
|
2300
2300
|
shortcut: "Delete"
|
|
2301
2301
|
}
|
|
2302
2302
|
];
|
|
2303
|
-
J(
|
|
2304
|
-
localStorage.setItem("toolBarExpand", f.value + ""), f.value && we(() => e(
|
|
2305
|
-
}), J(l, () => h.Variable.set("originalLineVisible", l.value)), J(r, () =>
|
|
2303
|
+
J(S, () => localStorage.setItem("editorToolPosition", JSON.stringify(S.value))), J(b, () => localStorage.setItem("showShortcutKey", b.value + "")), J(f, () => {
|
|
2304
|
+
localStorage.setItem("toolBarExpand", f.value + ""), f.value && we(() => e(S.value.left, S.value.top));
|
|
2305
|
+
}), J(l, () => h.Variable.set("originalLineVisible", l.value)), J(r, () => {
|
|
2306
|
+
localStorage.setItem("dxfVisible", r.value + ""), h.Variable.set("dxfVisible", r.value);
|
|
2307
|
+
}), J(i, () => h.Variable.set("whiteModelVisible", i.value)), h.Variable.addEventListener("isLook", (C) => c.value = C.value), h.Variable.addEventListener("originalLineVisible", (C) => l.value = C.value), h.Variable.addEventListener("dxfVisible", (C) => r.value = C.value), h.Variable.addEventListener("whiteModelVisible", (C) => i.value = C.value);
|
|
2306
2308
|
const ht = x.commandManager.addEventListener("started", (C) => {
|
|
2307
2309
|
g.value = C.name;
|
|
2308
2310
|
});
|
|
@@ -2321,7 +2323,7 @@ const ro = {
|
|
|
2321
2323
|
Z.value = x.commandManager.operationList.length, G.value = x.commandManager.rollbackList.length;
|
|
2322
2324
|
});
|
|
2323
2325
|
});
|
|
2324
|
-
});
|
|
2326
|
+
}), localStorage.getItem("dxfVisible") && (r.value = localStorage.getItem("dxfVisible") == "true");
|
|
2325
2327
|
}), Ft(() => {
|
|
2326
2328
|
E.mouseMoveEventProxylock = !1, ht(), he.disconnect();
|
|
2327
2329
|
}), (C, p) => (D(), R("div", {
|
|
@@ -2330,7 +2332,7 @@ const ro = {
|
|
|
2330
2332
|
class: "editorTool pointer-events-none overflow-hidden absolute left-0 top-0 w-full h-full z-[20] flex flex-row justify-between p-[5px] box-border select-none pointer-events-[all]"
|
|
2331
2333
|
}, [
|
|
2332
2334
|
F(xe, null, {
|
|
2333
|
-
default:
|
|
2335
|
+
default: V(() => [
|
|
2334
2336
|
b.value ? (D(), R("div", ro, [
|
|
2335
2337
|
(D(), R(ve, null, ke(Ce, (w) => P("div", {
|
|
2336
2338
|
class: "p-[4px_0px] flex justify-between text-right border-b-1 border-b-[rgba(255,255,255,0.1)] last-of-type:border-b-0",
|
|
@@ -2346,15 +2348,15 @@ const ro = {
|
|
|
2346
2348
|
P("div", {
|
|
2347
2349
|
ref_key: "toolBarRef",
|
|
2348
2350
|
ref: y,
|
|
2349
|
-
style:
|
|
2350
|
-
class:
|
|
2351
|
+
style: Se({ left: S.value.left + "px", top: S.value.top + "px" }),
|
|
2352
|
+
class: j(["overflow-hidden pointer-events-auto w-fit max-w-[260px] transition-[border-radius] text-[#333] absolute z-[11] bg-white select-none", { "rounded-[8px] ": f.value }]),
|
|
2351
2353
|
onMousedown: p[10] || (p[10] = (w) => w.stopPropagation())
|
|
2352
2354
|
}, [
|
|
2353
2355
|
P("div", {
|
|
2354
2356
|
onMousedown: s,
|
|
2355
|
-
class:
|
|
2357
|
+
class: j([{ "border-b-[#eee] border-b-1": f.value }, "flex flex-row justify-between header text-[14px] font-bold p-[10px 0px]"])
|
|
2356
2358
|
}, [
|
|
2357
|
-
p[12] || (p[12] = Kt('<div class="flex flex-row" data-v-
|
|
2359
|
+
p[12] || (p[12] = Kt('<div class="flex flex-row" data-v-1a5a6c9b><div class="p-[2px_5px] flex items-center pointer-events-none" data-v-1a5a6c9b><svg fill="#aaa" width="20" height="20" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-1a5a6c9b><path d="M341.333333 298.666667a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m0 298.666666a85.333333 85.333333 0 1 0 0-170.666666 85.333333 85.333333 0 0 0 0 170.666666z m85.333334 213.333334a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m256-512a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m85.333333 213.333333a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m-85.333333 384a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z" data-v-1a5a6c9b></path></svg></div><h5 class="flex text-nowrap text-[12px] items-center pointer-events-none" data-v-1a5a6c9b>绘制工具</h5></div>', 1)),
|
|
2358
2360
|
P("div", {
|
|
2359
2361
|
onMousedown: p[0] || (p[0] = (w) => w.stopPropagation()),
|
|
2360
2362
|
onClick: p[1] || (p[1] = (w) => f.value = !f.value),
|
|
@@ -2362,7 +2364,7 @@ const ro = {
|
|
|
2362
2364
|
}, [
|
|
2363
2365
|
(D(), R("svg", {
|
|
2364
2366
|
fill: "#666",
|
|
2365
|
-
class:
|
|
2367
|
+
class: j([{ "rotate-90": f.value }, "transition-all"]),
|
|
2366
2368
|
viewBox: "0 0 1024 1024",
|
|
2367
2369
|
version: "1.1",
|
|
2368
2370
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2381,7 +2383,7 @@ const ro = {
|
|
|
2381
2383
|
w.show ? (D(), R("li", {
|
|
2382
2384
|
key: 0,
|
|
2383
2385
|
onClick: (U) => t(w),
|
|
2384
|
-
class:
|
|
2386
|
+
class: j([{
|
|
2385
2387
|
"!bg-[var(--primary-color)] text-[#fff]": g.value === w.command
|
|
2386
2388
|
// '!cursor-no-drop': currentCommand !== item.command && currentCommand !== 'default',
|
|
2387
2389
|
}, "gap-[10px] text-[12px] hover:bg-[#ddd] transition-all rounded-[6px] p-[5px] flex flex-row items-center justify-between cursor-pointer"])
|
|
@@ -2439,7 +2441,7 @@ const ro = {
|
|
|
2439
2441
|
type: "success",
|
|
2440
2442
|
onClick: o
|
|
2441
2443
|
}, {
|
|
2442
|
-
default:
|
|
2444
|
+
default: V(() => p[14] || (p[14] = [
|
|
2443
2445
|
X(" 选择文件 ", -1)
|
|
2444
2446
|
])),
|
|
2445
2447
|
_: 1,
|
|
@@ -2451,7 +2453,7 @@ const ro = {
|
|
|
2451
2453
|
type: "primary",
|
|
2452
2454
|
onClick: p[5] || (p[5] = (w) => v(h).Dxf.downloadOriginalData("json.json"))
|
|
2453
2455
|
}, {
|
|
2454
|
-
default:
|
|
2456
|
+
default: V(() => p[15] || (p[15] = [
|
|
2455
2457
|
X(" 下载Json ", -1)
|
|
2456
2458
|
])),
|
|
2457
2459
|
_: 1,
|
|
@@ -2463,7 +2465,7 @@ const ro = {
|
|
|
2463
2465
|
type: "primary",
|
|
2464
2466
|
onClick: p[6] || (p[6] = (w) => v(h).AngleCorrectionDxf.download("test.dxf"))
|
|
2465
2467
|
}, {
|
|
2466
|
-
default:
|
|
2468
|
+
default: V(() => p[16] || (p[16] = [
|
|
2467
2469
|
X(" 下载DXF ", -1)
|
|
2468
2470
|
])),
|
|
2469
2471
|
_: 1,
|
|
@@ -2475,7 +2477,7 @@ const ro = {
|
|
|
2475
2477
|
type: "primary",
|
|
2476
2478
|
onClick: p[7] || (p[7] = (w) => v(h).AngleCorrectionDxf.downloadImage("dxf.jpg"))
|
|
2477
2479
|
}, {
|
|
2478
|
-
default:
|
|
2480
|
+
default: V(() => p[17] || (p[17] = [
|
|
2479
2481
|
X(" 下载JPG ", -1)
|
|
2480
2482
|
])),
|
|
2481
2483
|
_: 1,
|
|
@@ -2487,7 +2489,7 @@ const ro = {
|
|
|
2487
2489
|
type: "primary",
|
|
2488
2490
|
onClick: p[8] || (p[8] = (w) => v(K).downloadGltf("test.glb", !0))
|
|
2489
2491
|
}, {
|
|
2490
|
-
default:
|
|
2492
|
+
default: V(() => p[18] || (p[18] = [
|
|
2491
2493
|
X(" 下载白膜 ", -1)
|
|
2492
2494
|
])),
|
|
2493
2495
|
_: 1,
|
|
@@ -2499,7 +2501,7 @@ const ro = {
|
|
|
2499
2501
|
type: "primary",
|
|
2500
2502
|
onClick: p[9] || (p[9] = (w) => v(Y).download())
|
|
2501
2503
|
}, {
|
|
2502
|
-
default:
|
|
2504
|
+
default: V(() => p[19] || (p[19] = [
|
|
2503
2505
|
X(" 下载三维家JSON ", -1)
|
|
2504
2506
|
])),
|
|
2505
2507
|
_: 1,
|
|
@@ -2507,14 +2509,14 @@ const ro = {
|
|
|
2507
2509
|
})
|
|
2508
2510
|
])) : q("", !0),
|
|
2509
2511
|
F(xe, null, {
|
|
2510
|
-
default:
|
|
2512
|
+
default: V(() => [
|
|
2511
2513
|
P("div", xo, [
|
|
2512
2514
|
F(Tt, null, {
|
|
2513
|
-
default:
|
|
2515
|
+
default: V(() => [
|
|
2514
2516
|
(D(), R(ve, null, ke(mt, (w) => P("div", {
|
|
2515
2517
|
onClick: (U) => w.show.value && g.value === "default" && (w.action ? w.action() : v(x).commandManager.start(w.command, [...v(I).selectLines])),
|
|
2516
2518
|
title: `${w.name}(${w.shortcut})`,
|
|
2517
|
-
class:
|
|
2519
|
+
class: j(["size-[20px] flex justify-center items-center relative overflow-hidden active:scale-[0.8] border-1 border-[#ccc] rounded-[4px] transition-all cursor-pointer", {
|
|
2518
2520
|
"opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !w.show.value || g.value !== "default",
|
|
2519
2521
|
[w.class ?? ""]: !0
|
|
2520
2522
|
}]),
|
|
@@ -2541,7 +2543,7 @@ const ro = {
|
|
|
2541
2543
|
for (const [n, o] of e)
|
|
2542
2544
|
t[n] = o;
|
|
2543
2545
|
return t;
|
|
2544
|
-
}, ko = /* @__PURE__ */ Lo(Mo, [["__scopeId", "data-v-
|
|
2546
|
+
}, ko = /* @__PURE__ */ Lo(Mo, [["__scopeId", "data-v-1a5a6c9b"]]);
|
|
2545
2547
|
let lt = class extends Ae {
|
|
2546
2548
|
static name = "Editor";
|
|
2547
2549
|
container = new u.Group();
|
|
@@ -2596,7 +2598,7 @@ let lt = class extends Ae {
|
|
|
2596
2598
|
this.domContainer.domElement.parentElement && (this.domContainer.domElement.parentElement.appendChild(this.domElement), this.domContainer.domElement.parentElement.appendChild(this.imgEl), n());
|
|
2597
2599
|
});
|
|
2598
2600
|
setTimeout(() => {
|
|
2599
|
-
this.app =
|
|
2601
|
+
this.app = Vt(ko, { dxfSystem: this.parent, permission: this.viewPermission }), this.app.mount(this.domElement);
|
|
2600
2602
|
}), e.AngleCorrectionDxf.addEventListener("lineOffset", async () => {
|
|
2601
2603
|
this.imgEl.src && URL.revokeObjectURL(this.imgEl.src), setTimeout(async () => {
|
|
2602
2604
|
this.imgEl.src = URL.createObjectURL(await e.AngleCorrectionDxf.toDxfImageBlob("Centimeters", "image/png", "transparent"));
|
|
@@ -11,6 +11,7 @@ export declare class LineSegment<T = Record<string, any>> {
|
|
|
11
11
|
get end(): Point<Record<string, any>>;
|
|
12
12
|
constructor(p1?: Point, p2?: Point);
|
|
13
13
|
set(p1: Point, p2: Point): this;
|
|
14
|
+
getAnotherPoint(point: Point): Point<Record<string, any>>;
|
|
14
15
|
/**
|
|
15
16
|
* 是否有相同端点
|
|
16
17
|
* @param line
|