circuit-json 0.0.523 → 0.0.525

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 CHANGED
@@ -188,6 +188,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
188
188
  - [PcbTraceTooLongError](#pcbtracetoolongerror)
189
189
  - [PcbTraceTooLongWarning](#pcbtracetoolongwarning)
190
190
  - [PcbTraceTooManyViasWarning](#pcbtracetoomanyviaswarning)
191
+ - [PcbTraceStyleWarning](#pcbtracestylewarning)
191
192
  - [PcbTraceWarning](#pcbtracewarning)
192
193
  - [PcbVia](#pcbvia)
193
194
  - [PcbViaClearanceError](#pcbviaclearanceerror)
@@ -914,6 +915,10 @@ Defines a 3D-printed part in an assembly.
914
915
  /** Defines a 3D-printed part in an assembly. */
915
916
  interface SourcePrintedPart extends SourceComponentBase {
916
917
  ftype: "printedpart"
918
+ /** Printable material, when specified by the author. */
919
+ material?: "pla" | "petg" | "nylon"
920
+ /** Author-specified print color; also carried on the CAD geometry. */
921
+ color?: string
917
922
  }
918
923
  ```
919
924
 
@@ -1488,6 +1493,7 @@ interface CadCable {
1488
1493
  CAD geometry, optionally associated with a PCB component.
1489
1494
 
1490
1495
  ```typescript
1496
+ /** CAD geometry, optionally associated with a PCB component. */
1491
1497
  interface CadComponent {
1492
1498
  type: "cad_component"
1493
1499
  cad_component_id: string
@@ -1496,6 +1502,10 @@ interface CadComponent {
1496
1502
  source_component_id: string
1497
1503
  position: Point3
1498
1504
  rotation?: Point3
1505
+ /** True for assembled folded position/rotation; false or omitted for flat.
1506
+ * PCB records stay flat. pcb_component_id identifies the mount/owning board. */
1507
+
1508
+ is_on_folded_board?: boolean
1499
1509
  size?: Point3
1500
1510
  layer?: LayerRef
1501
1511
  subcircuit_id?: string
@@ -1518,6 +1528,8 @@ interface CadComponent {
1518
1528
  | "bottom_center_of_component"
1519
1529
  model_object_fit: "contain_within_bounds" | "fill_bounds"
1520
1530
  model_jscad?: any
1531
+ /** Explicit CAD color override; omission preserves authored model materials. */
1532
+ color?: string
1521
1533
  show_as_translucent_model?: boolean
1522
1534
  show_as_bounding_box?: boolean
1523
1535
  show_hidden_edges?: boolean
@@ -3434,6 +3446,38 @@ interface PcbTraceTooManyViasWarning {
3434
3446
  }
3435
3447
  ```
3436
3448
 
3449
+ ### PcbTraceStyleWarning
3450
+
3451
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_trace_style_warning.ts)
3452
+
3453
+ A long segment at an odd angle, identified by its trace and route endpoints.
3454
+
3455
+ ```typescript
3456
+ /** A long segment at an odd angle, identified by its trace and route endpoints. */
3457
+ interface PcbTraceStyleWarning {
3458
+ type: "pcb_trace_style_warning"
3459
+ pcb_trace_style_warning_id: string
3460
+ warning_type: "pcb_trace_style_warning"
3461
+ message: string
3462
+ styling_issue_type: "long_segment_at_odd_angle"
3463
+ pcb_trace_id: string
3464
+ source_trace_id?: string
3465
+ subcircuit_id?: string
3466
+ layer: LayerRef
3467
+ start_route_index: number
3468
+ end_route_index: number
3469
+ segment_start: Point
3470
+ segment_end: Point
3471
+ center: Point
3472
+ segment_length: Distance
3473
+ minimum_segment_length: Distance
3474
+ angle_degrees: number
3475
+ nearest_allowed_angle_degrees: number
3476
+ angle_deviation_degrees: number
3477
+ angle_tolerance_degrees: number
3478
+ }
3479
+ ```
3480
+
3437
3481
  ### PcbTraceWarning
3438
3482
 
3439
3483
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_trace_warning.ts)