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.
- package/package.json +1 -1
- package/src/build.js +3 -2
package/package.json
CHANGED
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
|
-
|
|
22152
|
-
|
|
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) => {
|