build-dxf 0.0.51 → 0.0.53

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.
Files changed (31) hide show
  1. package/README.md +167 -156
  2. package/package.json +45 -45
  3. package/src/{selectLocalFile.js → DomEventRegister.js} +738 -806
  4. package/src/build.d.ts +2 -2
  5. package/src/build.js +2254 -1691
  6. package/src/index.css +1 -1
  7. package/src/index.js +10 -9
  8. package/src/index2.js +8 -8
  9. package/src/index3.js +297 -429
  10. package/src/utils/DxfSystem/DxfSystem.d.ts +10 -0
  11. package/src/utils/DxfSystem/components/Dxf.d.ts +1 -1
  12. package/src/utils/DxfSystem/components/ThreeVJia.d.ts +7 -45
  13. package/src/utils/DxfSystem/index.d.ts +1 -1
  14. package/src/utils/DxfSystem/plugin/Editor/components/Editor.d.ts +1 -1
  15. package/src/utils/DxfSystem/plugin/Editor/components/index.d.ts +0 -1
  16. package/src/utils/DxfSystem/plugin/Editor/index.d.ts +1 -0
  17. package/src/utils/DxfSystem/utils/BoundExt.d.ts +27 -1
  18. package/src/utils/DxfSystem/utils/CAD.d.ts +17 -0
  19. package/src/utils/DxfSystem/utils/DoubleWallHelper.d.ts +15 -0
  20. package/src/utils/DxfSystem/utils/buildGroup.d.ts +12 -0
  21. package/src/utils/DxfSystem/utils/clippingDoubleWall.d.ts +1 -6
  22. package/src/utils/DxfSystem/utils/findDiscretePointLine.d.ts +7 -0
  23. package/src/utils/DxfSystem/utils/index.d.ts +8 -1
  24. package/src/utils/DxfSystem/utils/lineDataToThreeVJiaJson.d.ts +46 -0
  25. package/src/utils/LineSegment.d.ts +12 -2
  26. package/src/utils/Point.d.ts +4 -1
  27. package/src/utils/PointVirtualGrid/index.d.ts +1 -1
  28. package/src/utils/Polygon.d.ts +11 -1
  29. package/src/utils/UndirectedGraph.d.ts +13 -0
  30. package/src/utils/index.d.ts +3 -3
  31. /package/src/utils/DxfSystem/utils/{findClosedPolygons01.d.ts → findClosedPolygons.d.ts} +0 -0
package/src/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import "three";
2
- import { h as t, D as l, M as o, i, e as f, g as m, f as r, j as D } from "./build.js";
2
+ import { j as l, D as o, k as i, m, g as r, h as D, i as f, l as g } from "./build.js";
3
+ import "clipper-lib";
3
4
  export {
4
- t as Dxf,
5
- l as DxfSystem,
6
- o as ModelDataPlugin,
7
- i as components,
8
- f as createEditor,
9
- m as getFileAll,
10
- r as getGlobalDxfSystem,
11
- D as utils
5
+ l as Dxf,
6
+ o as DxfSystem,
7
+ i as ModelDataPlugin,
8
+ m as components,
9
+ r as createEditor,
10
+ D as getFileAll,
11
+ f as getGlobalDxfSystem,
12
+ g as utils
12
13
  };
package/src/index2.js CHANGED
@@ -1,9 +1,9 @@
1
- import { C as P, P as U, V as $, D as W, M as Z, a as J, W as H } from "./build.js";
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 q } from "three";
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, L as Q, D as O, a as S, b as G, S as A } from "./selectLocalFile.js";
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 Q([i, t], n % 2 === 0 ? 16711680 : 65280);
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(U.prototype.distance.call(o, a).toFixed(2)),
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 q();
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 W().usePlugin(Z).usePlugin(fe), c = s.findComponentByType(J), u = s.findComponentByType(S), b = s.findComponentByType(H);
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) {