build-dxf 0.1.134 → 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.134",
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, {
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();