circuit-json 0.0.522 → 0.0.524

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
@@ -113,6 +113,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
113
113
  - [CAD Components](#cad-components)
114
114
  - [CadCable](#cadcable)
115
115
  - [CadComponent](#cadcomponent)
116
+ - [CadReferenceSurface](#cadreferencesurface)
116
117
  - [PCB Elements](#pcb-elements)
117
118
  - [PcbFabricatorExtraChargeWarning](#pcbfabricatorextrachargewarning)
118
119
  - [PcbAutoroutingError](#pcbautoroutingerror)
@@ -187,6 +188,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
187
188
  - [PcbTraceTooLongError](#pcbtracetoolongerror)
188
189
  - [PcbTraceTooLongWarning](#pcbtracetoolongwarning)
189
190
  - [PcbTraceTooManyViasWarning](#pcbtracetoomanyviaswarning)
191
+ - [PcbTraceStyleWarning](#pcbtracestylewarning)
190
192
  - [PcbTraceWarning](#pcbtracewarning)
191
193
  - [PcbVia](#pcbvia)
192
194
  - [PcbViaClearanceError](#pcbviaclearanceerror)
@@ -1524,6 +1526,32 @@ interface CadComponent {
1524
1526
  }
1525
1527
  ```
1526
1528
 
1529
+ ### CadReferenceSurface
1530
+
1531
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/cad/cad_reference_surface.ts)
1532
+
1533
+ ```typescript
1534
+ /** Resolved reference frame in right-handed circuit world: +X right, +Y top,
1535
+ * +Z above. Center and extents are mm; normal and x_axis are dimensionless,
1536
+ * perpendicular unit directions, within 1e-6 numerical tolerance. The frame's
1537
+ * Y direction is normal cross x_axis. Names are unique within source_component_id.
1538
+ * Width and height are both present or both omitted; omission adds no default.
1539
+ * This record describes mounting reference geometry for optional visualization. */
1540
+ interface CadReferenceSurface {
1541
+ type: "cad_reference_surface"
1542
+ cad_reference_surface_id: string
1543
+ source_component_id: string
1544
+ name: string
1545
+ shape: "rect"
1546
+ center: Point3
1547
+ normal: Point3
1548
+ x_axis: Point3
1549
+ width?: number
1550
+ height?: number
1551
+ subcircuit_id?: string
1552
+ }
1553
+ ```
1554
+
1527
1555
  ## PCB Elements
1528
1556
 
1529
1557
  ### PcbFabricatorExtraChargeWarning
@@ -3407,6 +3435,38 @@ interface PcbTraceTooManyViasWarning {
3407
3435
  }
3408
3436
  ```
3409
3437
 
3438
+ ### PcbTraceStyleWarning
3439
+
3440
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_trace_style_warning.ts)
3441
+
3442
+ A long segment at an odd angle, identified by its trace and route endpoints.
3443
+
3444
+ ```typescript
3445
+ /** A long segment at an odd angle, identified by its trace and route endpoints. */
3446
+ interface PcbTraceStyleWarning {
3447
+ type: "pcb_trace_style_warning"
3448
+ pcb_trace_style_warning_id: string
3449
+ warning_type: "pcb_trace_style_warning"
3450
+ message: string
3451
+ styling_issue_type: "long_segment_at_odd_angle"
3452
+ pcb_trace_id: string
3453
+ source_trace_id?: string
3454
+ subcircuit_id?: string
3455
+ layer: LayerRef
3456
+ start_route_index: number
3457
+ end_route_index: number
3458
+ segment_start: Point
3459
+ segment_end: Point
3460
+ center: Point
3461
+ segment_length: Distance
3462
+ minimum_segment_length: Distance
3463
+ angle_degrees: number
3464
+ nearest_allowed_angle_degrees: number
3465
+ angle_deviation_degrees: number
3466
+ angle_tolerance_degrees: number
3467
+ }
3468
+ ```
3469
+
3410
3470
  ### PcbTraceWarning
3411
3471
 
3412
3472
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_trace_warning.ts)