@tscircuit/circuit-json-util 0.0.89 → 0.0.91

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.d.ts CHANGED
@@ -1494,16 +1494,20 @@ declare const transformSchematicElement: (elm: AnyCircuitElement, matrix: Matrix
1494
1494
  width: number;
1495
1495
  layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
1496
1496
  route_type: "wire";
1497
+ copper_pour_id?: string | undefined;
1498
+ is_inside_copper_pour?: boolean | undefined;
1497
1499
  start_pcb_port_id?: string | undefined;
1498
1500
  end_pcb_port_id?: string | undefined;
1499
1501
  } | {
1500
1502
  x: number;
1501
1503
  y: number;
1502
- to_layer: string;
1504
+ to_layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
1503
1505
  route_type: "via";
1504
- from_layer: string;
1506
+ from_layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
1505
1507
  hole_diameter?: number | undefined;
1506
1508
  outer_diameter?: number | undefined;
1509
+ copper_pour_id?: string | undefined;
1510
+ is_inside_copper_pour?: boolean | undefined;
1507
1511
  })[];
1508
1512
  pcb_component_id?: string | undefined;
1509
1513
  subcircuit_id?: string | undefined;
@@ -1742,6 +1746,7 @@ declare const transformSchematicElement: (elm: AnyCircuitElement, matrix: Matrix
1742
1746
  type: "pcb_panel";
1743
1747
  width: number;
1744
1748
  height: number;
1749
+ thickness: number;
1745
1750
  center: {
1746
1751
  x: number;
1747
1752
  y: number;
@@ -1914,6 +1919,7 @@ declare const transformSchematicElement: (elm: AnyCircuitElement, matrix: Matrix
1914
1919
  pcb_silkscreen_circle_id: string;
1915
1920
  subcircuit_id?: string | undefined;
1916
1921
  pcb_group_id?: string | undefined;
1922
+ is_filled?: boolean | undefined;
1917
1923
  } | {
1918
1924
  type: "pcb_silkscreen_oval";
1919
1925
  layer: "top" | "bottom";
@@ -2081,6 +2087,7 @@ declare const transformSchematicElement: (elm: AnyCircuitElement, matrix: Matrix
2081
2087
  } | {
2082
2088
  type: "pcb_note_text";
2083
2089
  font: "tscircuit2024";
2090
+ layer: "top" | "bottom";
2084
2091
  anchor_position: {
2085
2092
  x: number;
2086
2093
  y: number;
@@ -2098,6 +2105,7 @@ declare const transformSchematicElement: (elm: AnyCircuitElement, matrix: Matrix
2098
2105
  type: "pcb_note_rect";
2099
2106
  width: number;
2100
2107
  height: number;
2108
+ layer: "top" | "bottom";
2101
2109
  center: {
2102
2110
  x: number;
2103
2111
  y: number;
@@ -2116,6 +2124,7 @@ declare const transformSchematicElement: (elm: AnyCircuitElement, matrix: Matrix
2116
2124
  color?: string | undefined;
2117
2125
  } | {
2118
2126
  type: "pcb_note_path";
2127
+ layer: "top" | "bottom";
2119
2128
  route: {
2120
2129
  x: number;
2121
2130
  y: number;
@@ -2130,6 +2139,7 @@ declare const transformSchematicElement: (elm: AnyCircuitElement, matrix: Matrix
2130
2139
  color?: string | undefined;
2131
2140
  } | {
2132
2141
  type: "pcb_note_line";
2142
+ layer: "top" | "bottom";
2133
2143
  stroke_width: number;
2134
2144
  x1: number;
2135
2145
  y1: number;
@@ -2146,6 +2156,7 @@ declare const transformSchematicElement: (elm: AnyCircuitElement, matrix: Matrix
2146
2156
  } | {
2147
2157
  type: "pcb_note_dimension";
2148
2158
  font: "tscircuit2024";
2159
+ layer: "top" | "bottom";
2149
2160
  font_size: number;
2150
2161
  from: {
2151
2162
  x: number;
@@ -2186,6 +2197,13 @@ declare const transformSchematicElement: (elm: AnyCircuitElement, matrix: Matrix
2186
2197
  pcb_plated_hole_ids?: string[] | undefined;
2187
2198
  pcb_hole_ids?: string[] | undefined;
2188
2199
  pcb_keepout_ids?: string[] | undefined;
2200
+ } | {
2201
+ message: string;
2202
+ type: "pcb_courtyard_overlap_error";
2203
+ error_type: "pcb_courtyard_overlap_error";
2204
+ pcb_component_ids: [string, string];
2205
+ pcb_error_id: string;
2206
+ is_fatal?: boolean | undefined;
2189
2207
  } | {
2190
2208
  x: number;
2191
2209
  y: number;
@@ -2394,6 +2412,7 @@ declare const transformSchematicElement: (elm: AnyCircuitElement, matrix: Matrix
2394
2412
  pcb_courtyard_rect_id: string;
2395
2413
  subcircuit_id?: string | undefined;
2396
2414
  pcb_group_id?: string | undefined;
2415
+ ccw_rotation?: number | undefined;
2397
2416
  color?: string | undefined;
2398
2417
  } | {
2399
2418
  type: "pcb_courtyard_outline";
@@ -4142,7 +4161,7 @@ declare const transformSchematicElement: (elm: AnyCircuitElement, matrix: Matrix
4142
4161
  type: "cad_component";
4143
4162
  pcb_component_id: string;
4144
4163
  source_component_id: string;
4145
- anchor_alignment: "center" | "xy_center_z_board";
4164
+ anchor_alignment: "center" | "center_of_component_on_board_surface";
4146
4165
  position: {
4147
4166
  x: number;
4148
4167
  y: number;
@@ -4176,13 +4195,13 @@ declare const transformSchematicElement: (elm: AnyCircuitElement, matrix: Matrix
4176
4195
  mimetype: string;
4177
4196
  } | undefined;
4178
4197
  model_unit_to_mm_scale_factor?: number | undefined;
4179
- model_board_normal_direction?: "y+" | "z+" | undefined;
4198
+ model_board_normal_direction?: "x-" | "x+" | "y+" | "y-" | "z+" | "z-" | undefined;
4180
4199
  model_origin_position?: {
4181
4200
  x: number;
4182
4201
  y: number;
4183
4202
  z: number;
4184
4203
  } | undefined;
4185
- model_origin_alignment?: "unknown" | "center" | "center_of_component_on_board_surface" | undefined;
4204
+ model_origin_alignment?: "unknown" | "center" | "center_of_component_on_board_surface" | "bottom_center_of_component" | undefined;
4186
4205
  model_jscad?: any;
4187
4206
  show_as_translucent_model?: boolean | undefined;
4188
4207
  } | {
@@ -5713,16 +5732,20 @@ declare const transformSchematicElements: (elms: AnyCircuitElement[], matrix: Ma
5713
5732
  width: number;
5714
5733
  layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
5715
5734
  route_type: "wire";
5735
+ copper_pour_id?: string | undefined;
5736
+ is_inside_copper_pour?: boolean | undefined;
5716
5737
  start_pcb_port_id?: string | undefined;
5717
5738
  end_pcb_port_id?: string | undefined;
5718
5739
  } | {
5719
5740
  x: number;
5720
5741
  y: number;
5721
- to_layer: string;
5742
+ to_layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
5722
5743
  route_type: "via";
5723
- from_layer: string;
5744
+ from_layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
5724
5745
  hole_diameter?: number | undefined;
5725
5746
  outer_diameter?: number | undefined;
5747
+ copper_pour_id?: string | undefined;
5748
+ is_inside_copper_pour?: boolean | undefined;
5726
5749
  })[];
5727
5750
  pcb_component_id?: string | undefined;
5728
5751
  subcircuit_id?: string | undefined;
@@ -5961,6 +5984,7 @@ declare const transformSchematicElements: (elms: AnyCircuitElement[], matrix: Ma
5961
5984
  type: "pcb_panel";
5962
5985
  width: number;
5963
5986
  height: number;
5987
+ thickness: number;
5964
5988
  center: {
5965
5989
  x: number;
5966
5990
  y: number;
@@ -6133,6 +6157,7 @@ declare const transformSchematicElements: (elms: AnyCircuitElement[], matrix: Ma
6133
6157
  pcb_silkscreen_circle_id: string;
6134
6158
  subcircuit_id?: string | undefined;
6135
6159
  pcb_group_id?: string | undefined;
6160
+ is_filled?: boolean | undefined;
6136
6161
  } | {
6137
6162
  type: "pcb_silkscreen_oval";
6138
6163
  layer: "top" | "bottom";
@@ -6300,6 +6325,7 @@ declare const transformSchematicElements: (elms: AnyCircuitElement[], matrix: Ma
6300
6325
  } | {
6301
6326
  type: "pcb_note_text";
6302
6327
  font: "tscircuit2024";
6328
+ layer: "top" | "bottom";
6303
6329
  anchor_position: {
6304
6330
  x: number;
6305
6331
  y: number;
@@ -6317,6 +6343,7 @@ declare const transformSchematicElements: (elms: AnyCircuitElement[], matrix: Ma
6317
6343
  type: "pcb_note_rect";
6318
6344
  width: number;
6319
6345
  height: number;
6346
+ layer: "top" | "bottom";
6320
6347
  center: {
6321
6348
  x: number;
6322
6349
  y: number;
@@ -6335,6 +6362,7 @@ declare const transformSchematicElements: (elms: AnyCircuitElement[], matrix: Ma
6335
6362
  color?: string | undefined;
6336
6363
  } | {
6337
6364
  type: "pcb_note_path";
6365
+ layer: "top" | "bottom";
6338
6366
  route: {
6339
6367
  x: number;
6340
6368
  y: number;
@@ -6349,6 +6377,7 @@ declare const transformSchematicElements: (elms: AnyCircuitElement[], matrix: Ma
6349
6377
  color?: string | undefined;
6350
6378
  } | {
6351
6379
  type: "pcb_note_line";
6380
+ layer: "top" | "bottom";
6352
6381
  stroke_width: number;
6353
6382
  x1: number;
6354
6383
  y1: number;
@@ -6365,6 +6394,7 @@ declare const transformSchematicElements: (elms: AnyCircuitElement[], matrix: Ma
6365
6394
  } | {
6366
6395
  type: "pcb_note_dimension";
6367
6396
  font: "tscircuit2024";
6397
+ layer: "top" | "bottom";
6368
6398
  font_size: number;
6369
6399
  from: {
6370
6400
  x: number;
@@ -6405,6 +6435,13 @@ declare const transformSchematicElements: (elms: AnyCircuitElement[], matrix: Ma
6405
6435
  pcb_plated_hole_ids?: string[] | undefined;
6406
6436
  pcb_hole_ids?: string[] | undefined;
6407
6437
  pcb_keepout_ids?: string[] | undefined;
6438
+ } | {
6439
+ message: string;
6440
+ type: "pcb_courtyard_overlap_error";
6441
+ error_type: "pcb_courtyard_overlap_error";
6442
+ pcb_component_ids: [string, string];
6443
+ pcb_error_id: string;
6444
+ is_fatal?: boolean | undefined;
6408
6445
  } | {
6409
6446
  x: number;
6410
6447
  y: number;
@@ -6613,6 +6650,7 @@ declare const transformSchematicElements: (elms: AnyCircuitElement[], matrix: Ma
6613
6650
  pcb_courtyard_rect_id: string;
6614
6651
  subcircuit_id?: string | undefined;
6615
6652
  pcb_group_id?: string | undefined;
6653
+ ccw_rotation?: number | undefined;
6616
6654
  color?: string | undefined;
6617
6655
  } | {
6618
6656
  type: "pcb_courtyard_outline";
@@ -8361,7 +8399,7 @@ declare const transformSchematicElements: (elms: AnyCircuitElement[], matrix: Ma
8361
8399
  type: "cad_component";
8362
8400
  pcb_component_id: string;
8363
8401
  source_component_id: string;
8364
- anchor_alignment: "center" | "xy_center_z_board";
8402
+ anchor_alignment: "center" | "center_of_component_on_board_surface";
8365
8403
  position: {
8366
8404
  x: number;
8367
8405
  y: number;
@@ -8395,13 +8433,13 @@ declare const transformSchematicElements: (elms: AnyCircuitElement[], matrix: Ma
8395
8433
  mimetype: string;
8396
8434
  } | undefined;
8397
8435
  model_unit_to_mm_scale_factor?: number | undefined;
8398
- model_board_normal_direction?: "y+" | "z+" | undefined;
8436
+ model_board_normal_direction?: "x-" | "x+" | "y+" | "y-" | "z+" | "z-" | undefined;
8399
8437
  model_origin_position?: {
8400
8438
  x: number;
8401
8439
  y: number;
8402
8440
  z: number;
8403
8441
  } | undefined;
8404
- model_origin_alignment?: "unknown" | "center" | "center_of_component_on_board_surface" | undefined;
8442
+ model_origin_alignment?: "unknown" | "center" | "center_of_component_on_board_surface" | "bottom_center_of_component" | undefined;
8405
8443
  model_jscad?: any;
8406
8444
  show_as_translucent_model?: boolean | undefined;
8407
8445
  } | {
@@ -9932,16 +9970,20 @@ declare const transformPCBElement: (elm: AnyCircuitElement, matrix: Matrix) => {
9932
9970
  width: number;
9933
9971
  layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
9934
9972
  route_type: "wire";
9973
+ copper_pour_id?: string | undefined;
9974
+ is_inside_copper_pour?: boolean | undefined;
9935
9975
  start_pcb_port_id?: string | undefined;
9936
9976
  end_pcb_port_id?: string | undefined;
9937
9977
  } | {
9938
9978
  x: number;
9939
9979
  y: number;
9940
- to_layer: string;
9980
+ to_layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
9941
9981
  route_type: "via";
9942
- from_layer: string;
9982
+ from_layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
9943
9983
  hole_diameter?: number | undefined;
9944
9984
  outer_diameter?: number | undefined;
9985
+ copper_pour_id?: string | undefined;
9986
+ is_inside_copper_pour?: boolean | undefined;
9945
9987
  })[];
9946
9988
  pcb_component_id?: string | undefined;
9947
9989
  subcircuit_id?: string | undefined;
@@ -10180,6 +10222,7 @@ declare const transformPCBElement: (elm: AnyCircuitElement, matrix: Matrix) => {
10180
10222
  type: "pcb_panel";
10181
10223
  width: number;
10182
10224
  height: number;
10225
+ thickness: number;
10183
10226
  center: {
10184
10227
  x: number;
10185
10228
  y: number;
@@ -10352,6 +10395,7 @@ declare const transformPCBElement: (elm: AnyCircuitElement, matrix: Matrix) => {
10352
10395
  pcb_silkscreen_circle_id: string;
10353
10396
  subcircuit_id?: string | undefined;
10354
10397
  pcb_group_id?: string | undefined;
10398
+ is_filled?: boolean | undefined;
10355
10399
  } | {
10356
10400
  type: "pcb_silkscreen_oval";
10357
10401
  layer: "top" | "bottom";
@@ -10519,6 +10563,7 @@ declare const transformPCBElement: (elm: AnyCircuitElement, matrix: Matrix) => {
10519
10563
  } | {
10520
10564
  type: "pcb_note_text";
10521
10565
  font: "tscircuit2024";
10566
+ layer: "top" | "bottom";
10522
10567
  anchor_position: {
10523
10568
  x: number;
10524
10569
  y: number;
@@ -10536,6 +10581,7 @@ declare const transformPCBElement: (elm: AnyCircuitElement, matrix: Matrix) => {
10536
10581
  type: "pcb_note_rect";
10537
10582
  width: number;
10538
10583
  height: number;
10584
+ layer: "top" | "bottom";
10539
10585
  center: {
10540
10586
  x: number;
10541
10587
  y: number;
@@ -10554,6 +10600,7 @@ declare const transformPCBElement: (elm: AnyCircuitElement, matrix: Matrix) => {
10554
10600
  color?: string | undefined;
10555
10601
  } | {
10556
10602
  type: "pcb_note_path";
10603
+ layer: "top" | "bottom";
10557
10604
  route: {
10558
10605
  x: number;
10559
10606
  y: number;
@@ -10568,6 +10615,7 @@ declare const transformPCBElement: (elm: AnyCircuitElement, matrix: Matrix) => {
10568
10615
  color?: string | undefined;
10569
10616
  } | {
10570
10617
  type: "pcb_note_line";
10618
+ layer: "top" | "bottom";
10571
10619
  stroke_width: number;
10572
10620
  x1: number;
10573
10621
  y1: number;
@@ -10584,6 +10632,7 @@ declare const transformPCBElement: (elm: AnyCircuitElement, matrix: Matrix) => {
10584
10632
  } | {
10585
10633
  type: "pcb_note_dimension";
10586
10634
  font: "tscircuit2024";
10635
+ layer: "top" | "bottom";
10587
10636
  font_size: number;
10588
10637
  from: {
10589
10638
  x: number;
@@ -10624,6 +10673,13 @@ declare const transformPCBElement: (elm: AnyCircuitElement, matrix: Matrix) => {
10624
10673
  pcb_plated_hole_ids?: string[] | undefined;
10625
10674
  pcb_hole_ids?: string[] | undefined;
10626
10675
  pcb_keepout_ids?: string[] | undefined;
10676
+ } | {
10677
+ message: string;
10678
+ type: "pcb_courtyard_overlap_error";
10679
+ error_type: "pcb_courtyard_overlap_error";
10680
+ pcb_component_ids: [string, string];
10681
+ pcb_error_id: string;
10682
+ is_fatal?: boolean | undefined;
10627
10683
  } | {
10628
10684
  x: number;
10629
10685
  y: number;
@@ -10832,6 +10888,7 @@ declare const transformPCBElement: (elm: AnyCircuitElement, matrix: Matrix) => {
10832
10888
  pcb_courtyard_rect_id: string;
10833
10889
  subcircuit_id?: string | undefined;
10834
10890
  pcb_group_id?: string | undefined;
10891
+ ccw_rotation?: number | undefined;
10835
10892
  color?: string | undefined;
10836
10893
  } | {
10837
10894
  type: "pcb_courtyard_outline";
@@ -12580,7 +12637,7 @@ declare const transformPCBElement: (elm: AnyCircuitElement, matrix: Matrix) => {
12580
12637
  type: "cad_component";
12581
12638
  pcb_component_id: string;
12582
12639
  source_component_id: string;
12583
- anchor_alignment: "center" | "xy_center_z_board";
12640
+ anchor_alignment: "center" | "center_of_component_on_board_surface";
12584
12641
  position: {
12585
12642
  x: number;
12586
12643
  y: number;
@@ -12614,13 +12671,13 @@ declare const transformPCBElement: (elm: AnyCircuitElement, matrix: Matrix) => {
12614
12671
  mimetype: string;
12615
12672
  } | undefined;
12616
12673
  model_unit_to_mm_scale_factor?: number | undefined;
12617
- model_board_normal_direction?: "y+" | "z+" | undefined;
12674
+ model_board_normal_direction?: "x-" | "x+" | "y+" | "y-" | "z+" | "z-" | undefined;
12618
12675
  model_origin_position?: {
12619
12676
  x: number;
12620
12677
  y: number;
12621
12678
  z: number;
12622
12679
  } | undefined;
12623
- model_origin_alignment?: "unknown" | "center" | "center_of_component_on_board_surface" | undefined;
12680
+ model_origin_alignment?: "unknown" | "center" | "center_of_component_on_board_surface" | "bottom_center_of_component" | undefined;
12624
12681
  model_jscad?: any;
12625
12682
  show_as_translucent_model?: boolean | undefined;
12626
12683
  } | {
@@ -14151,16 +14208,20 @@ declare const transformPCBElements: (elms: AnyCircuitElement[], matrix: Matrix)
14151
14208
  width: number;
14152
14209
  layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
14153
14210
  route_type: "wire";
14211
+ copper_pour_id?: string | undefined;
14212
+ is_inside_copper_pour?: boolean | undefined;
14154
14213
  start_pcb_port_id?: string | undefined;
14155
14214
  end_pcb_port_id?: string | undefined;
14156
14215
  } | {
14157
14216
  x: number;
14158
14217
  y: number;
14159
- to_layer: string;
14218
+ to_layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
14160
14219
  route_type: "via";
14161
- from_layer: string;
14220
+ from_layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
14162
14221
  hole_diameter?: number | undefined;
14163
14222
  outer_diameter?: number | undefined;
14223
+ copper_pour_id?: string | undefined;
14224
+ is_inside_copper_pour?: boolean | undefined;
14164
14225
  })[];
14165
14226
  pcb_component_id?: string | undefined;
14166
14227
  subcircuit_id?: string | undefined;
@@ -14399,6 +14460,7 @@ declare const transformPCBElements: (elms: AnyCircuitElement[], matrix: Matrix)
14399
14460
  type: "pcb_panel";
14400
14461
  width: number;
14401
14462
  height: number;
14463
+ thickness: number;
14402
14464
  center: {
14403
14465
  x: number;
14404
14466
  y: number;
@@ -14571,6 +14633,7 @@ declare const transformPCBElements: (elms: AnyCircuitElement[], matrix: Matrix)
14571
14633
  pcb_silkscreen_circle_id: string;
14572
14634
  subcircuit_id?: string | undefined;
14573
14635
  pcb_group_id?: string | undefined;
14636
+ is_filled?: boolean | undefined;
14574
14637
  } | {
14575
14638
  type: "pcb_silkscreen_oval";
14576
14639
  layer: "top" | "bottom";
@@ -14738,6 +14801,7 @@ declare const transformPCBElements: (elms: AnyCircuitElement[], matrix: Matrix)
14738
14801
  } | {
14739
14802
  type: "pcb_note_text";
14740
14803
  font: "tscircuit2024";
14804
+ layer: "top" | "bottom";
14741
14805
  anchor_position: {
14742
14806
  x: number;
14743
14807
  y: number;
@@ -14755,6 +14819,7 @@ declare const transformPCBElements: (elms: AnyCircuitElement[], matrix: Matrix)
14755
14819
  type: "pcb_note_rect";
14756
14820
  width: number;
14757
14821
  height: number;
14822
+ layer: "top" | "bottom";
14758
14823
  center: {
14759
14824
  x: number;
14760
14825
  y: number;
@@ -14773,6 +14838,7 @@ declare const transformPCBElements: (elms: AnyCircuitElement[], matrix: Matrix)
14773
14838
  color?: string | undefined;
14774
14839
  } | {
14775
14840
  type: "pcb_note_path";
14841
+ layer: "top" | "bottom";
14776
14842
  route: {
14777
14843
  x: number;
14778
14844
  y: number;
@@ -14787,6 +14853,7 @@ declare const transformPCBElements: (elms: AnyCircuitElement[], matrix: Matrix)
14787
14853
  color?: string | undefined;
14788
14854
  } | {
14789
14855
  type: "pcb_note_line";
14856
+ layer: "top" | "bottom";
14790
14857
  stroke_width: number;
14791
14858
  x1: number;
14792
14859
  y1: number;
@@ -14803,6 +14870,7 @@ declare const transformPCBElements: (elms: AnyCircuitElement[], matrix: Matrix)
14803
14870
  } | {
14804
14871
  type: "pcb_note_dimension";
14805
14872
  font: "tscircuit2024";
14873
+ layer: "top" | "bottom";
14806
14874
  font_size: number;
14807
14875
  from: {
14808
14876
  x: number;
@@ -14843,6 +14911,13 @@ declare const transformPCBElements: (elms: AnyCircuitElement[], matrix: Matrix)
14843
14911
  pcb_plated_hole_ids?: string[] | undefined;
14844
14912
  pcb_hole_ids?: string[] | undefined;
14845
14913
  pcb_keepout_ids?: string[] | undefined;
14914
+ } | {
14915
+ message: string;
14916
+ type: "pcb_courtyard_overlap_error";
14917
+ error_type: "pcb_courtyard_overlap_error";
14918
+ pcb_component_ids: [string, string];
14919
+ pcb_error_id: string;
14920
+ is_fatal?: boolean | undefined;
14846
14921
  } | {
14847
14922
  x: number;
14848
14923
  y: number;
@@ -15051,6 +15126,7 @@ declare const transformPCBElements: (elms: AnyCircuitElement[], matrix: Matrix)
15051
15126
  pcb_courtyard_rect_id: string;
15052
15127
  subcircuit_id?: string | undefined;
15053
15128
  pcb_group_id?: string | undefined;
15129
+ ccw_rotation?: number | undefined;
15054
15130
  color?: string | undefined;
15055
15131
  } | {
15056
15132
  type: "pcb_courtyard_outline";
@@ -16799,7 +16875,7 @@ declare const transformPCBElements: (elms: AnyCircuitElement[], matrix: Matrix)
16799
16875
  type: "cad_component";
16800
16876
  pcb_component_id: string;
16801
16877
  source_component_id: string;
16802
- anchor_alignment: "center" | "xy_center_z_board";
16878
+ anchor_alignment: "center" | "center_of_component_on_board_surface";
16803
16879
  position: {
16804
16880
  x: number;
16805
16881
  y: number;
@@ -16833,13 +16909,13 @@ declare const transformPCBElements: (elms: AnyCircuitElement[], matrix: Matrix)
16833
16909
  mimetype: string;
16834
16910
  } | undefined;
16835
16911
  model_unit_to_mm_scale_factor?: number | undefined;
16836
- model_board_normal_direction?: "y+" | "z+" | undefined;
16912
+ model_board_normal_direction?: "x-" | "x+" | "y+" | "y-" | "z+" | "z-" | undefined;
16837
16913
  model_origin_position?: {
16838
16914
  x: number;
16839
16915
  y: number;
16840
16916
  z: number;
16841
16917
  } | undefined;
16842
- model_origin_alignment?: "unknown" | "center" | "center_of_component_on_board_surface" | undefined;
16918
+ model_origin_alignment?: "unknown" | "center" | "center_of_component_on_board_surface" | "bottom_center_of_component" | undefined;
16843
16919
  model_jscad?: any;
16844
16920
  show_as_translucent_model?: boolean | undefined;
16845
16921
  } | {
package/dist/index.js CHANGED
@@ -1369,6 +1369,20 @@ var getBoundsOfPcbElements = (elements) => {
1369
1369
  maxX = Math.max(maxX, point.x);
1370
1370
  maxY = Math.max(maxY, point.y);
1371
1371
  }
1372
+ } else if (elm.type === "pcb_courtyard_outline") {
1373
+ for (const point of elm.outline) {
1374
+ minX = Math.min(minX, point.x);
1375
+ minY = Math.min(minY, point.y);
1376
+ maxX = Math.max(maxX, point.x);
1377
+ maxY = Math.max(maxY, point.y);
1378
+ }
1379
+ } else if (elm.type === "pcb_courtyard_polygon") {
1380
+ for (const point of elm.points) {
1381
+ minX = Math.min(minX, point.x);
1382
+ minY = Math.min(minY, point.y);
1383
+ maxX = Math.max(maxX, point.x);
1384
+ maxY = Math.max(maxY, point.y);
1385
+ }
1372
1386
  }
1373
1387
  }
1374
1388
  return { minX, minY, maxX, maxY };
@@ -1982,6 +1996,10 @@ function getElementRenderLayers(element) {
1982
1996
  const layer = element.layer;
1983
1997
  return [`${layer}_courtyard`];
1984
1998
  }
1999
+ if (element.type === "pcb_note_rect" || element.type === "pcb_note_path" || element.type === "pcb_note_text" || element.type === "pcb_note_line" || element.type === "pcb_note_dimension") {
2000
+ const layer = element.layer;
2001
+ return [`${layer}_user_note`];
2002
+ }
1985
2003
  return [];
1986
2004
  }
1987
2005