build-dxf 0.1.50 → 0.1.51

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/build.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "build-dxf",
3
- "version": "0.1.50",
3
+ "version": "0.1.51",
4
4
  "description": "线段构建双线墙壁的dxf版本",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/build.js CHANGED
@@ -5526,7 +5526,7 @@ function segmentationPath(lines, clipLine) {
5526
5526
  const points = [...findDiscretePoint(group2).keys()].sort((a2, b4) => a2.distance(queryLine.start, true) - b4.distance(queryLine.start, true));
5527
5527
  for (let i = 0; i < points.length; i += 2) {
5528
5528
  const p1 = points[i], p2 = points[i + 1];
5529
- group2.push(new LineSegment(p1.clone(), p2.clone()));
5529
+ if (p1 && p2) group2.push(new LineSegment(p1.clone(), p2.clone()));
5530
5530
  }
5531
5531
  newGroups.push(group2);
5532
5532
  });