build-dxf 0.1.110 → 0.1.112

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "build-dxf",
3
- "version": "0.1.110",
3
+ "version": "0.1.112",
4
4
  "description": "线段构建双线墙壁的dxf版本",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/build.js CHANGED
@@ -9652,7 +9652,7 @@ class ThreeVJiaPipeline extends Pipeline {
9652
9652
  newLine = new LineSegment(line1.center.clone(), line2.center.clone());
9653
9653
  wallWidth = line1.length();
9654
9654
  mergeLineUserData(newLine, lines2);
9655
- newLine.userData.wallWidth = wallWidth;
9655
+ newLine.userData.wallWidth = wallWidth + 2e-3;
9656
9656
  return [newLine];
9657
9657
  });
9658
9658
  this.manager.add({ type: "wallHole", lines: windowLines });
@@ -9833,17 +9833,27 @@ class ThreeVJiaPipeline extends Pipeline {
9833
9833
  if (roomPloys.length === 0) return json;
9834
9834
  publicInfo.itemInfo.forEach((item, i) => {
9835
9835
  if (!placeHoldersMap[item.category]) return;
9836
- const contour = item.quadContour ?? item.contour, itemPoly = new Polygon(contour.map((p2) => Point.from(p2).rotate(json.center, json.angle))), center = itemPoly.getCenter(), index2 = roomPloys.findIndex((poly) => poly.pointWithin(center));
9836
+ const contour = item.quadContour ?? item.contour;
9837
+ if (contour.length === 0) {
9838
+ console.warn(`第${i}个物品轮廓为空`);
9839
+ return;
9840
+ }
9841
+ const itemPoly = new Polygon(contour.map((p2) => Point.from(p2).rotate(json.center, json.angle))), center = itemPoly.getCenter(), index2 = roomPloys.findIndex((poly) => poly.pointWithin(center));
9837
9842
  if (index2 < 0) return;
9838
- json.placeHolders.push({
9839
- name: placeHoldersMap[item.category],
9840
- polygon: itemPoly.getMinimumBoundingRectangle().map((p2) => p2.toJson2D()),
9841
- direction: Point.from(item.direction).rotate(Point.zero(), json.angle),
9842
- height: item.box.max.z - item.box.min.z,
9843
- sillHeight: item.box.min.z - z,
9844
- roomId: rooms[index2].roomTypeId,
9845
- id: i
9846
- });
9843
+ try {
9844
+ const rect = itemPoly.getMinimumBoundingRectangle().map((p2) => p2.toJson2D());
9845
+ json.placeHolders.push({
9846
+ name: placeHoldersMap[item.category],
9847
+ polygon: rect,
9848
+ direction: Point.from(item.direction).rotate(Point.zero(), json.angle),
9849
+ height: item.box.max.z - item.box.min.z,
9850
+ sillHeight: item.box.min.z - z,
9851
+ roomId: rooms[index2].roomTypeId,
9852
+ id: i
9853
+ });
9854
+ } catch (error) {
9855
+ console.warn(`第${i}个物品解析异常`);
9856
+ }
9847
9857
  });
9848
9858
  return json;
9849
9859
  }
package/src/index.css CHANGED
@@ -157,6 +157,10 @@
157
157
  top: calc(var(--spacing) * 0);
158
158
  }
159
159
 
160
+ .top-2\.5 {
161
+ top: calc(var(--spacing) * 2.5);
162
+ }
163
+
160
164
  .top-\[10px\] {
161
165
  top: 10px;
162
166
  }
@@ -173,6 +177,10 @@
173
177
  right: calc(var(--spacing) * 0);
174
178
  }
175
179
 
180
+ .right-2\.5 {
181
+ right: calc(var(--spacing) * 2.5);
182
+ }
183
+
176
184
  .right-\[10px\] {
177
185
  right: 10px;
178
186
  }
@@ -291,6 +299,10 @@
291
299
  margin: 10px 0;
292
300
  }
293
301
 
302
+ .mt-2\.5 {
303
+ margin-top: calc(var(--spacing) * 2.5);
304
+ }
305
+
294
306
  .mt-\[5px\] {
295
307
  margin-top: 5px;
296
308
  }
@@ -299,6 +311,10 @@
299
311
  margin-top: 10px;
300
312
  }
301
313
 
314
+ .mr-2\.5 {
315
+ margin-right: calc(var(--spacing) * 2.5);
316
+ }
317
+
302
318
  .mr-\[5px\] {
303
319
  margin-right: 5px;
304
320
  }
@@ -543,6 +559,10 @@
543
559
  gap: calc(var(--spacing) * 0);
544
560
  }
545
561
 
562
+ .gap-2\.5 {
563
+ gap: calc(var(--spacing) * 2.5);
564
+ }
565
+
546
566
  .gap-\[5px\] {
547
567
  gap: 5px;
548
568
  }
@@ -710,6 +730,10 @@
710
730
  padding: calc(var(--spacing) * 0);
711
731
  }
712
732
 
733
+ .p-1\.25 {
734
+ padding: calc(var(--spacing) * 1.25);
735
+ }
736
+
713
737
  .p-\[0_5px\], .p-\[0px_5px\] {
714
738
  padding: 0 5px;
715
739
  }