build-dxf 0.1.133 → 0.1.135

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.133",
3
+ "version": "0.1.135",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/build.js CHANGED
@@ -10810,8 +10810,11 @@ function innerWallLine(lines, trajectory2) {
10810
10810
  }
10811
10811
  singleLine.push(...temLine.setLength(temLine.length + 1e-4).toRectangle(wallWidth, "butt").toLines());
10812
10812
  });
10813
- const [p1, ...pn2] = Polygon.multipleFromByLines(singleLine);
10814
- singleLine = Polygon.booleanOp(p1, pn2, { type: "Union", scale: 1e4 }).flatMap((p2) => p2.toLines());
10813
+ const paths = Polygon.multipleFromByLines(singleLine);
10814
+ if (paths.length > 1) {
10815
+ const [p1, ...pn2] = paths;
10816
+ singleLine = Polygon.booleanOp(p1, pn2, { type: "Union", scale: 1e4 }).flatMap((p2) => p2.toLines());
10817
+ }
10815
10818
  singleLine = singleLine.filter((line) => line.length > 0.2);
10816
10819
  singleLine = LineSegmentUtils.deduplicate(
10817
10820
  LineSegmentUtils.splitIntersections(singleLine, {
@@ -22971,8 +22974,6 @@ class ThreeVJia extends Component {
22971
22974
  angleCorrectionDxf.addEventListener("cadChange", async () => {
22972
22975
  this.neededUpdate = true;
22973
22976
  this.trajectory = angleCorrectionDxf.options.trajectory;
22974
- const json = ThreeVJiaPipeline.appendPlaceHolders(this.toJson(), angleCorrectionDxf.options.publicInfo, angleCorrectionDxf.options.originalZ);
22975
- console.log(json);
22976
22977
  });
22977
22978
  }
22978
22979
  cacheJson;
package/src/index3.js CHANGED
@@ -16813,7 +16813,7 @@ class PointDrag extends Command {
16813
16813
  const wallObj = new Wall2D(wallLine, 0.02).setColor(new THREE.Color(65280));
16814
16814
  this.container.add(wallObj);
16815
16815
  const lineSelector = new LineSelector(this.editor);
16816
- lineSelector.onPointerMove = (line22) => {
16816
+ lineSelector.onPointerMove = (_, line22) => {
16817
16817
  if (line22) {
16818
16818
  wallLine.copy(line22);
16819
16819
  wallObj.visible = true;
@@ -16853,6 +16853,8 @@ class PointDrag extends Command {
16853
16853
  line2.start.copy(newData.start);
16854
16854
  line2.end.copy(newData.end);
16855
16855
  WallHole.filterIllegal([line2]);
16856
+ this.renderManager.removeLine(line2);
16857
+ this.renderManager.addLine(line2);
16856
16858
  });
16857
16859
  }
16858
16860
  this.renderManager.draw();
@@ -16870,6 +16872,8 @@ class PointDrag extends Command {
16870
16872
  line2.start.copy(newData.start);
16871
16873
  line2.end.copy(newData.end);
16872
16874
  WallHole.filterIllegal([line2]);
16875
+ this.renderManager.removeLine(line2);
16876
+ this.renderManager.addLine(line2);
16873
16877
  });
16874
16878
  }
16875
16879
  this.renderManager.draw();