build-dxf 0.0.59 → 0.0.60

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.0.59",
3
+ "version": "0.0.60",
4
4
  "description": "线段构建双线墙壁的dxf版本",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/build.js CHANGED
@@ -4,7 +4,6 @@ import ClipperLib from "clipper-lib";
4
4
  import Drawing from "dxf-writer";
5
5
  import { OBJExporter } from "three/examples/jsm/exporters/OBJExporter.js";
6
6
  import { Brush, Evaluator, SUBTRACTION } from "three-bvh-csg";
7
- (void 0).endsWith("/") ? void 0 : "undefined/";
8
7
  const DEFAULT_WALL_WIDTH = 0.12;
9
8
  const DEFAULT_DOOR_HEIGHT = 2.1;
10
9
  const DOOR_GROUND_CLEARANCE_HEIGHT = 0;
@@ -5706,7 +5705,7 @@ class CorrectionDxf extends Component {
5706
5705
  * @param filename
5707
5706
  */
5708
5707
  async downloadOriginalData(filename) {
5709
- const data = lineDataToOriginalData(this.getLineSegments());
5708
+ const data = lineDataToOriginalData(this.getLineSegments(), this.originalZAverage);
5710
5709
  const content = JSON.stringify(data);
5711
5710
  if (typeof window !== "undefined") {
5712
5711
  const blob = new Blob([content], { type: "application/json" });
@@ -6491,7 +6490,7 @@ class Dxf extends Component {
6491
6490
  * @param filename
6492
6491
  */
6493
6492
  async downloadOriginalData(filename) {
6494
- const data = lineDataToOriginalData(this.getLineSegments());
6493
+ const data = lineDataToOriginalData(this.getLineSegments(), this.originalZAverage);
6495
6494
  const content = JSON.stringify(data);
6496
6495
  if (typeof window !== "undefined") {
6497
6496
  const blob = new Blob([content], { type: "application/json" });
@@ -0,0 +1,17 @@
1
+ import { Group } from 'three';
2
+ import { LineSegment } from '../LineSegment';
3
+ import * as THREE from "three";
4
+ export declare class SceneAutoGenerat {
5
+ lines: LineSegment[];
6
+ itemList: any[];
7
+ z: number;
8
+ scene: Group<THREE.Object3DEventMap>;
9
+ constructor(lines: LineSegment[], itemList: any[], z: number);
10
+ buildPlane(): void;
11
+ init(): Promise<void>;
12
+ wallGroup: Group | null;
13
+ buildWall(): Promise<void>;
14
+ isCloseEnough(box3: THREE.Box3, wallBox: THREE.Box3, threshold: number): boolean;
15
+ adsorption(walls: THREE.Mesh[], box3: THREE.Box3, proximityThreshold?: number): void;
16
+ buildItem(): Promise<void>;
17
+ }