build-dxf 0.0.46 → 0.0.47

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.0.46",
3
+ "version": "0.0.47",
4
4
  "description": "线段构建双线墙壁的dxf版本",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/build.js CHANGED
@@ -1065,7 +1065,7 @@ class E {
1065
1065
  projectPoint(t, e = !0) {
1066
1066
  const [n, s] = this.points, i = new D(s.x - n.x, s.y - n.y);
1067
1067
  if (i.x === 0 && i.y === 0)
1068
- throw new Error("投影目标线段的两个点不能重合");
1068
+ return null;
1069
1069
  let o = ((h) => {
1070
1070
  const c = new D(h.x - n.x, h.y - n.y), d = i.x * i.x + i.y * i.y, p = (c.x * i.x + c.y * i.y) / d, y = n.x + p * i.x, g = n.y + p * i.y;
1071
1071
  return new D(y, g);