build-dxf 0.1.128 → 0.1.129

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 +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "build-dxf",
3
- "version": "0.1.128",
3
+ "version": "0.1.129",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/build.js CHANGED
@@ -22148,8 +22148,9 @@ class SceneAutoGenerat {
22148
22148
  await Promise.all(this.itemList.map(async (item) => await this.getModel(item)));
22149
22149
  }
22150
22150
  static itemParse(item) {
22151
- if (!Array.isArray(item.quadContour ?? item.contour) || !item.contour.length) return null;
22152
- const contour = Point.fromByList(item.contour ?? []), rectangle = new Polygon(Qa(contour.map((p2) => [p2.x, p2.y])).map((p2) => Point.from(p2)));
22151
+ const contourData = item.quadContour ?? item.contour;
22152
+ if (!Array.isArray(contourData) || contourData.length) return null;
22153
+ const contour = Point.fromByList(contourData), rectangle = new Polygon(Qa(contour.map((p2) => [p2.x, p2.y])).map((p2) => Point.from(p2)));
22153
22154
  rectangle.pop();
22154
22155
  const z = item.box.min.z, height = Math.abs(item.box.max.z - z), max = rectangle.getMaxLengthInfo(), min = rectangle.getMinLengthInfo(), direction = max.start.y < max.end.y ? max.start.directionFrom(max.end) : max.end.directionFrom(max.start), shape = new THREE.Shape();
22155
22156
  rectangle.forEach((p2, i) => {