build-dxf 0.0.59 → 0.0.61

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.61",
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" });
@@ -13691,7 +13690,7 @@ class WhiteModel extends Component {
13691
13690
  this.whiteModelGroup.add(this.whiteModelLineGroup);
13692
13691
  this.whiteModelGroup.position.z = dxf.originalZAverage;
13693
13692
  this.originalWhiteMode.position.z = dxf.originalZAverage;
13694
- const lines = dxfSystem.Dxf.getLineSegments(false);
13693
+ const lines = dxfSystem.Dxf.getLineSegments(true);
13695
13694
  if (typeof window !== "undefined") {
13696
13695
  const globalScenario = Scenario.Instance ?? new Scenario(new THREE.Scene(), {}, {}, {});
13697
13696
  const group2 = await globalScenario?.drawGraphics(
@@ -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
+ }