build-dxf 0.0.51 → 0.0.52
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/package.json +1 -1
- package/src/{selectLocalFile.js → DomEventRegister.js} +738 -806
- package/src/build.d.ts +2 -2
- package/src/build.js +2174 -1691
- package/src/index.js +6 -6
- package/src/index2.js +8 -8
- package/src/index3.js +297 -428
- package/src/utils/DxfSystem/DxfSystem.d.ts +10 -0
- package/src/utils/DxfSystem/components/ThreeVJia.d.ts +7 -45
- package/src/utils/DxfSystem/index.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/index.d.ts +1 -0
- package/src/utils/DxfSystem/utils/BoundExt.d.ts +27 -1
- package/src/utils/DxfSystem/utils/DoubleWallHelper.d.ts +15 -0
- package/src/utils/DxfSystem/utils/buildGroup.d.ts +12 -0
- package/src/utils/DxfSystem/utils/clippingDoubleWall.d.ts +1 -6
- package/src/utils/DxfSystem/utils/findDiscretePointLine.d.ts +7 -0
- package/src/utils/DxfSystem/utils/index.d.ts +7 -1
- package/src/utils/DxfSystem/utils/lineDataToThreeVJiaJson.d.ts +46 -0
- package/src/utils/LineSegment.d.ts +7 -2
- package/src/utils/Point.d.ts +4 -1
- package/src/utils/PointVirtualGrid/index.d.ts +1 -1
- package/src/utils/UndirectedGraph.d.ts +13 -0
- package/src/utils/index.d.ts +3 -3
- /package/src/utils/DxfSystem/utils/{findClosedPolygons01.d.ts → findClosedPolygons.d.ts} +0 -0
package/src/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "three";
|
|
2
|
-
import {
|
|
2
|
+
import { j as e, D as l, k as o, m as i, g as m, h as r, i as D, l as f } from "./build.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
4
|
+
e as Dxf,
|
|
5
5
|
l as DxfSystem,
|
|
6
6
|
o as ModelDataPlugin,
|
|
7
7
|
i as components,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
m as createEditor,
|
|
9
|
+
r as getFileAll,
|
|
10
|
+
D as getGlobalDxfSystem,
|
|
11
|
+
f as utils
|
|
12
12
|
};
|
package/src/index2.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as P,
|
|
1
|
+
import { C as P, L as U, P as $, V as W, D as Z, M as J, a as H, W as q, S as A } from "./build.js";
|
|
2
2
|
import * as d from "three";
|
|
3
|
-
import { Group as
|
|
3
|
+
import { Group as Q } from "three";
|
|
4
4
|
import "clipper-lib";
|
|
5
5
|
import "dxf-writer";
|
|
6
|
-
import { E as w, R as E,
|
|
6
|
+
import { E as w, R as E, D as O, a as S, b as G } from "./DomEventRegister.js";
|
|
7
7
|
import { defineComponent as K, createElementBlock as R, openBlock as k, createElementVNode as y, toDisplayString as X, createVNode as x, unref as m, withCtx as D, createTextVNode as M, createApp as Y, ref as L, watch as C, onMounted as ee, onUnmounted as te, createCommentVNode as ie, createStaticVNode as ne } from "vue";
|
|
8
8
|
function oe(p, e, i, t = "#fff", n = 2) {
|
|
9
9
|
const o = document.createElement("canvas"), a = o.getContext("2d");
|
|
@@ -106,7 +106,7 @@ class I extends P {
|
|
|
106
106
|
const a = new d.Mesh(new d.SphereGeometry(0.05), new d.MeshBasicMaterial({ color: 65280 }));
|
|
107
107
|
a.position.copy(i), this.rayLineGroup.add(a);
|
|
108
108
|
}
|
|
109
|
-
const o = new
|
|
109
|
+
const o = new U([i, t], n % 2 === 0 ? 16711680 : 65280);
|
|
110
110
|
this.rayLineGroup.add(o);
|
|
111
111
|
});
|
|
112
112
|
}
|
|
@@ -205,7 +205,7 @@ class j extends P {
|
|
|
205
205
|
const n = new Float32Array(e.flatMap(({ start: o, end: a }, s) => {
|
|
206
206
|
const c = o.x + (a.x - o.x) * 0.5, u = o.y + (a.y - o.y) * 0.5;
|
|
207
207
|
return t.createText(s, new d.Vector3(c, u, i.originalZAverage), { fontSize: "10px", color: "#ffff00" }, this.textGroup), t.createText(
|
|
208
|
-
Number(
|
|
208
|
+
Number($.prototype.distance.call(o, a).toFixed(2)),
|
|
209
209
|
new d.Vector3(c, u, i.originalZAverage),
|
|
210
210
|
{ fontSize: "10px", color: "#00ff00" },
|
|
211
211
|
this.distanceGroup
|
|
@@ -237,7 +237,7 @@ class z extends P {
|
|
|
237
237
|
i.container.add(n.dxfModelGroup), t.addEventListener("dxfVisible", (s) => {
|
|
238
238
|
n.dxfModelGroup.visible = s.value;
|
|
239
239
|
});
|
|
240
|
-
let a = new
|
|
240
|
+
let a = new Q();
|
|
241
241
|
n.dxfModelGroup.add(a), t?.addEventListener("currentKeyUp", (s) => {
|
|
242
242
|
s.value === "w" && t.set("dxfVisible", !t.dxfVisible), s.value === "b" && (a.visible ? a.visible = !1 : (a.visible = !0, a.clear(), o.wallsGroup.forEach((c, u) => {
|
|
243
243
|
c.forEach((b, h) => {
|
|
@@ -265,7 +265,7 @@ class F extends P {
|
|
|
265
265
|
* @param parent
|
|
266
266
|
*/
|
|
267
267
|
onAddFromParent(e) {
|
|
268
|
-
const i = e.findComponentByType(
|
|
268
|
+
const i = e.findComponentByType(W);
|
|
269
269
|
i.addEventListener("currentMouseDown", (t) => {
|
|
270
270
|
this.mouseList.has(t.value) || (this.mouseList.add(t.value), this.dispatchEvent({ type: "codeChange", code: t.value, mode: "down" }));
|
|
271
271
|
}), i.addEventListener("currentMouseUp", (t) => {
|
|
@@ -377,7 +377,7 @@ const Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
377
377
|
},
|
|
378
378
|
setup(p) {
|
|
379
379
|
d.Object3D.DEFAULT_UP = new d.Vector3(0, 0, 1);
|
|
380
|
-
const e = p, i = L(), t = L(!0), n = L(!0), o = L(!0), a = L(!1), s = new
|
|
380
|
+
const e = p, i = L(), t = L(!0), n = L(!0), o = L(!0), a = L(!1), s = new Z().usePlugin(J).usePlugin(fe), c = s.findComponentByType(H), u = s.findComponentByType(S), b = s.findComponentByType(q);
|
|
381
381
|
C(() => e.lines, () => e.lines && h(e.lines)), C(() => e.detailsPoint, () => e.detailsPoint && c?.set(e.detailsPoint));
|
|
382
382
|
function h(r) {
|
|
383
383
|
if (r) {
|