build-dxf 0.1.116 → 0.1.117

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "build-dxf",
3
- "version": "0.1.116",
3
+ "version": "0.1.117",
4
4
  "description": "线段构建双线墙壁的dxf版本",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/build.js CHANGED
@@ -7,7 +7,7 @@ import Drawing from "dxf-writer";
7
7
  import { Brush, Evaluator, SUBTRACTION } from "three-bvh-csg";
8
8
  import { OBJExporter } from "three/examples/jsm/exporters/OBJExporter.js";
9
9
  const VITE_OSS_BASEURL = "https://image.cnyang.cn/common-assets/".endsWith("/") ? "https://image.cnyang.cn/common-assets/" : "https://image.cnyang.cn/common-assets//";
10
- const DEFAULT_WALL_WIDTH = 0.24;
10
+ const DEFAULT_WALL_WIDTH = 0.12;
11
11
  const DEFAULT_WALL_HEIGHT = 2.8;
12
12
  const DEFAULT_DOOR_HEIGHT = 2.1;
13
13
  const DOOR_GROUND_CLEARANCE_HEIGHT = 0;
@@ -1,6 +1,6 @@
1
1
  export declare const API_BASE_URL = "";
2
2
  export declare const VITE_OSS_BASEURL: any;
3
- export declare const DEFAULT_WALL_WIDTH = 0.24;
3
+ export declare const DEFAULT_WALL_WIDTH = 0.12;
4
4
  export declare const DEFAULT_WALL_HEIGHT = 2.8;
5
5
  export declare const DOUBLE_WALL_FIND_WIDTH = 0.4;
6
6
  export declare const DEFAULT_DOOR_HEIGHT = 2.1;
@@ -13,6 +13,7 @@ export interface DrawHoleData {
13
13
  export declare class DrawHole extends Command<{
14
14
  pointerMove: {
15
15
  point: THREE.Vector3;
16
+ line?: LineSegment | null;
16
17
  };
17
18
  }> {
18
19
  static name: string;
package/src/index.css CHANGED
@@ -1268,10 +1268,10 @@ button[data-v-7a78abcb]:active {
1268
1268
  color: #a7a7a7
1269
1269
  }
1270
1270
 
1271
- [data-v-835cd80b] {
1271
+ [data-v-6beef164] {
1272
1272
  font-family: 宋体;
1273
1273
  }
1274
- .button[data-v-835cd80b] {
1274
+ .button[data-v-6beef164] {
1275
1275
  padding: 5px 10px;
1276
1276
  border: none;
1277
1277
  background: var(--primary-color);
package/src/index3.js CHANGED
@@ -13365,7 +13365,10 @@ class DrawHole extends Command {
13365
13365
  wall.position.z = 0.01;
13366
13366
  const {
13367
13367
  pageDestroy
13368
- } = createPage$2(this.domElement, this.editWidth.bind(this));
13368
+ } = createPage$2(this.domElement, async () => {
13369
+ await this.editWidth();
13370
+ holeLine.setLength(this.defaultWidth);
13371
+ });
13369
13372
  const lineSelector = new LineSelector(this.editor).setType("wall");
13370
13373
  lineSelector.onPointerMove = (line3, result) => {
13371
13374
  this.domElement.style.cursor = line3 ? "move" : "no-drop";
@@ -13392,7 +13395,8 @@ class DrawHole extends Command {
13392
13395
  wall.visible = true;
13393
13396
  this.dispatchEvent({
13394
13397
  type: "pointerMove",
13395
- point: result.point
13398
+ point: result.point,
13399
+ line: line3
13396
13400
  });
13397
13401
  };
13398
13402
  this.addCommandEndHandle().add(() => {
@@ -13408,6 +13412,7 @@ class DrawHole extends Command {
13408
13412
  if (lineSelector.paused) return;
13409
13413
  lineSelector.pause();
13410
13414
  await this.editWidth();
13415
+ holeLine.setLength(this.defaultWidth);
13411
13416
  lineSelector.resume();
13412
13417
  });
13413
13418
  const line2 = await lineSelector.getLines();
@@ -17217,18 +17222,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
17217
17222
  shortcut: ClippingLine.shortcutKeys.join(" + ")
17218
17223
  },
17219
17224
  {
17220
- command: RayDistance.commandName,
17221
- name: "射线测距",
17225
+ command: ManualDistance.commandName,
17226
+ name: "手动测距",
17222
17227
  show: true,
17223
17228
  src: images["../assets/images/激光测距.svg"].default,
17224
- shortcut: RayDistance.shortcutKeys.join(" + ")
17229
+ shortcut: ManualDistance.shortcutKeys.join(" + ")
17225
17230
  },
17226
17231
  {
17227
- command: ManualDistance.commandName,
17228
- name: "手动测距",
17232
+ command: RayDistance.commandName,
17233
+ name: "射线测距",
17229
17234
  show: true,
17230
17235
  src: images["../assets/images/激光测距.svg"].default,
17231
- shortcut: ManualDistance.shortcutKeys.join(" + ")
17236
+ shortcut: RayDistance.shortcutKeys.join(" + ")
17232
17237
  }
17233
17238
  ], otherCommandList = [
17234
17239
  {
@@ -17797,7 +17802,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
17797
17802
  };
17798
17803
  }
17799
17804
  });
17800
- const EditorToolContent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-835cd80b"]]);
17805
+ const EditorToolContent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6beef164"]]);
17801
17806
  class StorageHelper {
17802
17807
  static get(key, defaultValue = void 0) {
17803
17808
  const value = localStorage.getItem(key);