@tscircuit/3d-viewer 0.0.413 → 0.0.414
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/dist/index.js +19 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26576,7 +26576,7 @@ import * as THREE13 from "three";
|
|
|
26576
26576
|
// package.json
|
|
26577
26577
|
var package_default = {
|
|
26578
26578
|
name: "@tscircuit/3d-viewer",
|
|
26579
|
-
version: "0.0.
|
|
26579
|
+
version: "0.0.413",
|
|
26580
26580
|
main: "./dist/index.js",
|
|
26581
26581
|
module: "./dist/index.js",
|
|
26582
26582
|
type: "module",
|
|
@@ -28555,7 +28555,11 @@ var BoardGeomBuilder = class {
|
|
|
28555
28555
|
let cyGeom = null;
|
|
28556
28556
|
if (ph.shape === "circular_hole_with_rect_pad") {
|
|
28557
28557
|
cyGeom = (0, import_primitives6.cylinder)({
|
|
28558
|
-
center: [
|
|
28558
|
+
center: [
|
|
28559
|
+
ph.x + (ph.hole_offset_x || 0),
|
|
28560
|
+
ph.y + (ph.hole_offset_y || 0),
|
|
28561
|
+
0
|
|
28562
|
+
],
|
|
28559
28563
|
radius: ph.hole_diameter / 2 + M,
|
|
28560
28564
|
// Add margin for subtraction
|
|
28561
28565
|
height: this.ctx.pcbThickness * 1.5
|
|
@@ -28590,17 +28594,21 @@ var BoardGeomBuilder = class {
|
|
|
28590
28594
|
if (ph.shape === "pill_hole_with_rect_pad") {
|
|
28591
28595
|
pillHole = (0, import_booleans3.union)(
|
|
28592
28596
|
(0, import_primitives6.cuboid)({
|
|
28593
|
-
center: [
|
|
28597
|
+
center: [
|
|
28598
|
+
ph.x + (ph.hole_offset_x || 0),
|
|
28599
|
+
ph.y + (ph.hole_offset_y || 0),
|
|
28600
|
+
0
|
|
28601
|
+
],
|
|
28594
28602
|
size: shouldRotate ? [holeHeight, rectLength, this.ctx.pcbThickness * 1.5] : [rectLength, holeHeight, this.ctx.pcbThickness * 1.5]
|
|
28595
28603
|
}),
|
|
28596
28604
|
(0, import_primitives6.cylinder)({
|
|
28597
28605
|
center: shouldRotate ? [
|
|
28598
|
-
ph.x + ph.hole_offset_x,
|
|
28599
|
-
ph.y + ph.hole_offset_y - rectLength / 2,
|
|
28606
|
+
ph.x + (ph.hole_offset_x || 0),
|
|
28607
|
+
ph.y + (ph.hole_offset_y || 0) - rectLength / 2,
|
|
28600
28608
|
0
|
|
28601
28609
|
] : [
|
|
28602
|
-
ph.x + ph.hole_offset_x - rectLength / 2,
|
|
28603
|
-
ph.y + ph.hole_offset_y,
|
|
28610
|
+
ph.x + (ph.hole_offset_x || 0) - rectLength / 2,
|
|
28611
|
+
ph.y + (ph.hole_offset_y || 0),
|
|
28604
28612
|
0
|
|
28605
28613
|
],
|
|
28606
28614
|
radius: holeRadius,
|
|
@@ -28608,12 +28616,12 @@ var BoardGeomBuilder = class {
|
|
|
28608
28616
|
}),
|
|
28609
28617
|
(0, import_primitives6.cylinder)({
|
|
28610
28618
|
center: shouldRotate ? [
|
|
28611
|
-
ph.x + ph.hole_offset_x,
|
|
28612
|
-
ph.y + ph.hole_offset_y + rectLength / 2,
|
|
28619
|
+
ph.x + (ph.hole_offset_x || 0),
|
|
28620
|
+
ph.y + (ph.hole_offset_y || 0) + rectLength / 2,
|
|
28613
28621
|
0
|
|
28614
28622
|
] : [
|
|
28615
|
-
ph.x + ph.hole_offset_x + rectLength / 2,
|
|
28616
|
-
ph.y + ph.hole_offset_y,
|
|
28623
|
+
ph.x + (ph.hole_offset_x || 0) + rectLength / 2,
|
|
28624
|
+
ph.y + (ph.hole_offset_y || 0),
|
|
28617
28625
|
0
|
|
28618
28626
|
],
|
|
28619
28627
|
radius: holeRadius,
|