build-dxf 0.1.53 → 0.1.55

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 +8 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "build-dxf",
3
- "version": "0.1.53",
3
+ "version": "0.1.55",
4
4
  "description": "线段构建双线墙壁的dxf版本",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/build.js CHANGED
@@ -19867,7 +19867,14 @@ function getGlobalDxfSystem() {
19867
19867
  return gloabalDxfSystem;
19868
19868
  }
19869
19869
  function hasCircle(lineData, startIndex, direction) {
19870
- const lines = originalDataToLineData(lineData).lineSegments, miniCircles = new MiniCircles(), line = lines[startIndex], direct = Point.from(direction), entity = line.center.add(direct.multiplyScalar(1e-8)), path = /* @__PURE__ */ new Set([line]);
19870
+ let lines = originalDataToLineData(lineData).lineSegments;
19871
+ const center = lines[startIndex].center;
19872
+ lines = lineSegmentClipping(lines, 1e-9);
19873
+ let removeSet = findDiscretePointLine2(lines, /* @__PURE__ */ new Set(), true);
19874
+ lines = lines.filter((line2) => !removeSet.has(line2));
19875
+ const list = lines.filter((line2) => line2.userData.isBayWindow && line2.isPointOnSegment(center));
19876
+ if (list.length === 0) return false;
19877
+ const miniCircles = new MiniCircles(), line = list[0], direct = Point.from(direction), entity = line.center.add(direct.multiplyScalar(1e-8)), path = /* @__PURE__ */ new Set([line]);
19871
19878
  const result = miniCircles.findSameSidePath({
19872
19879
  line,
19873
19880
  currentPoint: line.start,