circuit-json 0.0.496 → 0.0.498
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/README.md +87 -1
- package/dist/index.d.mts +948 -12
- package/dist/index.mjs +873 -789
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -111,6 +111,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
111
111
|
- [PCB Elements](#pcb-elements)
|
|
112
112
|
- [PcbFabricatorExtraChargeWarning](#pcbfabricatorextrachargewarning)
|
|
113
113
|
- [PcbAutoroutingError](#pcbautoroutingerror)
|
|
114
|
+
- [PcbBend](#pcbbend)
|
|
114
115
|
- [PcbBoard](#pcbboard)
|
|
115
116
|
- [PcbBreakoutPoint](#pcbbreakoutpoint)
|
|
116
117
|
- [PcbBusLengthSkewError](#pcbbuslengthskewerror)
|
|
@@ -169,6 +170,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
169
170
|
- [PcbSilkscreenRect](#pcbsilkscreenrect)
|
|
170
171
|
- [PcbSilkscreenText](#pcbsilkscreentext)
|
|
171
172
|
- [PcbSolderPaste](#pcbsolderpaste)
|
|
173
|
+
- [PcbStiffener](#pcbstiffener)
|
|
172
174
|
- [PcbText](#pcbtext)
|
|
173
175
|
- [PcbThermalSpoke](#pcbthermalspoke)
|
|
174
176
|
- [PcbTrace](#pcbtrace)
|
|
@@ -1330,11 +1332,14 @@ interface UnknownErrorFindingPart extends BaseCircuitJsonError {
|
|
|
1330
1332
|
|
|
1331
1333
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/cad/cad_component.ts)
|
|
1332
1334
|
|
|
1335
|
+
CAD geometry, optionally associated with a PCB component.
|
|
1336
|
+
|
|
1333
1337
|
```typescript
|
|
1334
1338
|
interface CadComponent {
|
|
1335
1339
|
type: "cad_component"
|
|
1336
1340
|
cad_component_id: string
|
|
1337
|
-
|
|
1341
|
+
/** Omit for CAD geometry that has no corresponding PCB component. */
|
|
1342
|
+
pcb_component_id?: string
|
|
1338
1343
|
source_component_id: string
|
|
1339
1344
|
position: Point3
|
|
1340
1345
|
rotation?: Point3
|
|
@@ -1362,6 +1367,7 @@ interface CadComponent {
|
|
|
1362
1367
|
model_jscad?: any
|
|
1363
1368
|
show_as_translucent_model?: boolean
|
|
1364
1369
|
show_as_bounding_box?: boolean
|
|
1370
|
+
show_hidden_edges?: boolean
|
|
1365
1371
|
anchor_alignment: CadComponentAnchorAlignment
|
|
1366
1372
|
}
|
|
1367
1373
|
```
|
|
@@ -1416,6 +1422,36 @@ interface PcbAutoroutingErrorInterface extends BaseCircuitJsonError {
|
|
|
1416
1422
|
}
|
|
1417
1423
|
```
|
|
1418
1424
|
|
|
1425
|
+
### PcbBend
|
|
1426
|
+
|
|
1427
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_bend.ts)
|
|
1428
|
+
|
|
1429
|
+
Defines a bend without changing the flat PCB layout or stored CAD poses.
|
|
1430
|
+
|
|
1431
|
+
```typescript
|
|
1432
|
+
/** Defines a bend without changing the flat PCB layout or stored CAD poses. */
|
|
1433
|
+
interface PcbBend {
|
|
1434
|
+
type: "pcb_bend"
|
|
1435
|
+
pcb_bend_id: string
|
|
1436
|
+
pcb_board_id: string
|
|
1437
|
+
/** Ownership only; group transforms are already resolved into board coordinates. */
|
|
1438
|
+
pcb_group_id?: string
|
|
1439
|
+
subcircuit_id?: string
|
|
1440
|
+
name?: string
|
|
1441
|
+
/** Bend-zone centerline endpoints, relative to the flat board center, in mm. */
|
|
1442
|
+
start: Point
|
|
1443
|
+
end: Point
|
|
1444
|
+
/** Target angle in signed degrees; positive folds the moving side toward local top. Zero is flat. */
|
|
1445
|
+
bend_angle: Rotation
|
|
1446
|
+
/** Positive radius at the neutral surface, in mm. Zone width is radius times absolute angle in radians. */
|
|
1447
|
+
bend_radius: Length
|
|
1448
|
+
/** Moving side looking from start toward end in the flat top view. */
|
|
1449
|
+
bend_side: "left" | "right"
|
|
1450
|
+
}
|
|
1451
|
+
```
|
|
1452
|
+
|
|
1453
|
+
[Examples and coordinate/rendering semantics](docs/pcb-flex.md)
|
|
1454
|
+
|
|
1419
1455
|
### PcbBoard
|
|
1420
1456
|
|
|
1421
1457
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_board.ts)
|
|
@@ -2920,6 +2956,56 @@ interface PcbSolderPasteCircle {
|
|
|
2920
2956
|
}
|
|
2921
2957
|
```
|
|
2922
2958
|
|
|
2959
|
+
### PcbStiffener
|
|
2960
|
+
|
|
2961
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_stiffener.ts)
|
|
2962
|
+
|
|
2963
|
+
Defines bonded mechanical reinforcement with rectangular or polygon geometry.
|
|
2964
|
+
|
|
2965
|
+
```typescript
|
|
2966
|
+
interface PcbStiffenerBase {
|
|
2967
|
+
type: "pcb_stiffener"
|
|
2968
|
+
pcb_stiffener_id: string
|
|
2969
|
+
pcb_board_id: string
|
|
2970
|
+
/** Ownership only; geometry is already resolved into board coordinates. */
|
|
2971
|
+
pcb_group_id?: string
|
|
2972
|
+
subcircuit_id?: string
|
|
2973
|
+
name?: string
|
|
2974
|
+
/** Attachment face, not an additional copper layer. */
|
|
2975
|
+
layer: "top" | "bottom"
|
|
2976
|
+
material: "fr4" | "polyimide" | "stainless_steel" | "aluminum"
|
|
2977
|
+
/** Material thickness in mm, excluding the PCB and adhesive. */
|
|
2978
|
+
thickness: Length
|
|
2979
|
+
/** Adhesive thickness in mm; omission means unspecified, not zero. */
|
|
2980
|
+
adhesive_thickness?: Length
|
|
2981
|
+
}
|
|
2982
|
+
|
|
2983
|
+
interface PcbStiffenerRect extends PcbStiffenerBase {
|
|
2984
|
+
shape: "rect"
|
|
2985
|
+
/** Relative to the flat board center, in mm. */
|
|
2986
|
+
center: Point
|
|
2987
|
+
/** Degrees counterclockwise in the flat top view; omission means zero. */
|
|
2988
|
+
rotation?: Rotation
|
|
2989
|
+
width: Length
|
|
2990
|
+
height: Length
|
|
2991
|
+
outline?: never
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
interface PcbStiffenerPolygon extends PcbStiffenerBase {
|
|
2995
|
+
shape: "polygon"
|
|
2996
|
+
/** Implicitly closed vertices relative to the flat board center, in mm. All placement/rotation is baked in. */
|
|
2997
|
+
outline: Point[]
|
|
2998
|
+
center?: never
|
|
2999
|
+
rotation?: never
|
|
3000
|
+
width?: never
|
|
3001
|
+
height?: never
|
|
3002
|
+
}
|
|
3003
|
+
|
|
3004
|
+
type PcbStiffener = PcbStiffenerRect | PcbStiffenerPolygon
|
|
3005
|
+
```
|
|
3006
|
+
|
|
3007
|
+
[Examples and coordinate/rendering semantics](docs/pcb-flex.md)
|
|
3008
|
+
|
|
2923
3009
|
### PcbText
|
|
2924
3010
|
|
|
2925
3011
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_text.ts)
|