File: pcbfile.texi

package info (click to toggle)
pcb 1%3A4.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 29,760 kB
  • sloc: ansic: 138,451; sh: 8,447; yacc: 5,135; pascal: 4,820; makefile: 2,039; perl: 580; lex: 439; awk: 116; lisp: 86; tcl: 63; xml: 20
file content (1213 lines) | stat: -rw-r--r-- 27,659 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
@c key pcbfile
@c ./../src/parse_y.y 146

A special note about units: Older versions of @code{pcb} used mils
(1/1000 inch) as the base unit; a value of 500 in the file meant
half an inch.  Newer versions uses a "high resolution" syntax,
where the base unit is 1/100 of a mil (0.000010 inch); a value of 500 in
the file means 5 mils.  As a general rule, the variants of each entry
listed below which use square brackets are the high resolution formats
and use the 1/100 mil units, and the ones with parentheses are the older
variants and use 1 mil units.  Note that when multiple variants
are listed, the most recent (and most preferred) format is the first
listed.

The square bracket syntax specifies only the enclosed values as high
resolution. Whenever child elements need high resolution, they have to
use square brackets on their own, as in this example:

@example  
   Symbol['!' 12]                       # 12 is a high resolution value
   (  # <--- this pair is only for grouping and can never be a square
           SymbolLine[0 4500 0 5000 8]  # high resolution
           SymbolLine(0   10 0   35 8)  # standard resolution
@end example

Symbolic and numeric flags (SFlags and NFlags) are described in
@ref{Object Flags}.

@menu
* Arc syntax::
* Attribute syntax::
* Connect syntax::
* Cursor syntax::
* DRC syntax::
* Element syntax::
* ElementArc syntax::
* ElementLine syntax::
* FileVersion syntax::
* Flags syntax::
* Grid syntax::
* Groups syntax::
* Layer syntax::
* Line syntax::
* Mark syntax::
* Net syntax::
* Netlist syntax::
* Pad syntax::
* PCB syntax::
* Pin syntax::
* PolyArea syntax::
* Polygon syntax::
* Rat syntax::
* Styles syntax::
* Symbol syntax::
* SymbolLine syntax::
* Text syntax::
* Thermal syntax::
* Via syntax::
@end menu
@c pcbfile Arc
@node Arc syntax
@subsection Arc
@c ./../src/parse_y.y 708

@noindent
Current syntax:

@cartouche
@format
Arc [X Y RadiusX RadiusY Thickness Clearance StartAngle DeltaAngle SFlags]
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
Arc (X Y RadiusX RadiusY Thickness Clearance StartAngle DeltaAngle NFlags)
Arc (X Y RadiusX RadiusY Thickness StartAngle DeltaAngle NFlags)
@end format
@end cartouche

@table @var
@item X Y
Coordinates of the center of the arc.
@item RadiusX RadiusY
The RadiusX and RadiusY, from the center to the edge (centerline of the
trace).  The bounds of the circle of which this arc is a segment, is
thus @math{2*RadiusX} by @math{2*RadiusY}.
@item Thickness
The width of the copper trace which forms the arc.
@item Clearance
The amount of space cleared around the arc when the line passes
through a polygon.  The clearance is added to the thickness to get the
thickness of the clear; thus the space between the arc and the polygon
is @math{Clearance/2} wide.
@item StartAngle
The angle of one end of the arc, in degrees.  In PCB, an angle of zero
points left (negative X direction), and 90 degrees points down
(positive Y direction).
@item DeltaAngle
The sweep of the arc.  This may be negative.  Positive angles sweep
counterclockwise.
@item SFlags
Symbolic or numeric flags.
@item NFlags
Numeric flags.
@end table

@c pcbfile Attribute
@node Attribute syntax
@subsection Attribute
@c ./../src/parse_y.y 1312

@cartouche
@format
Attribute ("Name" "Value")
@end format
@end cartouche

Attributes allow boards and elements to have arbitrary data attached
to them, which may or may not be used by PCB itself, but may be of use by
other programs or users.

@table @var
@item Name
The name of the attribute

@item Value
The value of the attribute.  Values are always stored as strings, even
if the value is interpreted as, for example, a number.

@end table

Below are some examples of global (board wide) attributes:

@example

Attribute("PCB::grid::unit" "mil")

Attribute("PCB::grid::size" "39.37mil")

Attribute("PCB::grid::unit" "mm")

@end example

and some examples for attributes in an element (local):

@example

Element["lock" "BGA676N100P26X26-2700X2700X260" "U?" "FG676" 20.0000mm 20.0000mm 0.0000 -631.49mil 0 100 ""]
(
	Attribute("author" "PCB Contributors")
	Attribute("dist-license" "GPL2")
	Attribute("use-license" "unlimited2")
	Attribute("status" "Experimental")
	Attribute("attributes in footprint" "1")
	Attribute("package body length" "27.000000")
	Attribute("package body width" "27.000000")
	Attribute("package height" "2.600000")

@end example

@c pcbfile Connect
@node Connect syntax
@subsection Connect
@c ./../src/parse_y.y 1302

@cartouche
@format
Connect ("PinPad")
@end format
@end cartouche

@table @var
@item PinPad
The name of a pin or pad which is included in this net.  Pin and Pad
names are named by the refdes and pin name, like @code{"U14-7"} for
pin 7 of U14, or @code{"T4-E"} for pin E of T4.
@end table

@c pcbfile Cursor
@node Cursor syntax
@subsection Cursor
@c ./../src/parse_y.y 339

@noindent
Legacy syntax:

@cartouche
@format
Cursor [X Y Zoom]
Cursor (X Y Zoom)
@end format
@end cartouche

@table @var
@item X Y
Location of the cursor when the board was saved.
As of November 2012 the cursor position is not written to file anymore.
Older versions of pcb ignore the absence of this line in the pcb file.
@item Zoom
The current zoom factor.  Note that a zoom factor of "0" means 1 mil
per screen pixel, N means @math{2^N} mils per screen pixel, etc.  The
first variant accepts floating point numbers.  The special value
"1000" means "zoom to fit"

This field is ignored by PCB.
@end table

@c pcbfile DRC
@node DRC syntax
@subsection DRC
@c ./../src/parse_y.y 378

@cartouche
@format
DRC [Bloat Shrink Line Silk Drill Ring]
DRC [Bloat Shrink Line Silk]
DRC [Bloat Shrink Line]
@end format
@end cartouche

@table @var
@item Bloat
Minimum spacing between copper.
@item Shrink
Minimum copper overlap to guarantee connectivity.
@item Line
Minimum line thickness.
@item Silk
Minimum silk thickness.
@item Drill
Minimum drill size.
@item Ring
Minimum width of the annular ring around pins and vias.
@end table

@c pcbfile Element
@node Element syntax
@subsection Element
@c ./../src/parse_y.y 865

@noindent
Current syntax:

@cartouche
@format
Element [SFlags "Desc" "Name" "Value" MX MY TX TY TDir TScale TSFlags] (
@ @ @ @dots{} contents @dots{}
)
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
Element (NFlags "Desc" "Name" "Value" MX MY TX TY TDir TScale TNFlags) (
Element (NFlags "Desc" "Name" "Value" TX TY TDir TScale TNFlags) (
Element (NFlags "Desc" "Name" TX TY TDir TScale TNFlags) (
Element ("Desc" "Name" TX TY TDir TScale TNFlags) (
@ @ @ @dots{} contents @dots{}
)
@end format
@end cartouche

@table @var
@item SFlags
Symbolic or numeric flags, for the element as a whole.
@item NFlags
Numeric flags, for the element as a whole.
@item Desc
The description of the element.  This is one of the three strings
which can be displayed on the screen.
@item Name
The name of the element, usually the reference designator.
@item Value
The value of the element.
@item MX MY
The location of the element's mark.  This is the reference point
for placing the element and its pins and pads.
@item TX TY
The upper left corner of the text (one of the three strings).
@item TDir
The relative direction of the text.  0 means left to right for
an unrotated element, 1 means up, 2 left, 3 down.
@item TScale
Size of the text, as a percentage of the ``default'' size of of the
font (the default font is about 40 mils high).  Default is 100 (40
mils).
@item TSFlags
Symbolic or numeric flags, for the text.
@item TNFlags
Numeric flags, for the text.
@end table

Elements may contain pins, pads, element lines, element arcs,
attributes, and (for older elements) an optional mark.  Note that
element definitions that have the mark coordinates in the element
line, only support pins and pads which use relative coordinates.  The
pin and pad coordinates are relative to the mark.  Element definitions
which do not include the mark coordinates in the element line, may
have a Mark definition in their contents, and only use pin and pad
definitions which use absolute coordinates.

@c pcbfile ElementArc
@node ElementArc syntax
@subsection ElementArc
@c ./../src/parse_y.y 976

@noindent
Current syntax:

@cartouche
@format
ElementArc [X Y Width Height StartAngle DeltaAngle Thickness]
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
ElementArc (X Y Width Height StartAngle DeltaAngle Thickness)
@end format
@end cartouche

@table @var
@item X Y
Coordinates of the center of the arc.  These are relative to the
Element's mark point for new element formats, or absolute for older
formats.
@item Width Height
The width and height, from the center to the edge.  The bounds of the
circle of which this arc is a segment, is thus @math{2*Width} by
@math{2*Height}.
@item StartAngle
The angle of one end of the arc, in degrees.  In PCB, an angle of zero
points left (negative X direction), and 90 degrees points down
(positive Y direction).
@item DeltaAngle
The sweep of the arc.  This may be negative.  Positive angles sweep
counterclockwise.
@item Thickness
The width of the silk line which forms the arc.
@end table

@c pcbfile ElementLine
@node ElementLine syntax
@subsection ElementLine
@c ./../src/parse_y.y 974

@noindent
Current syntax:

@cartouche
@format
ElementLine [X1 Y1 X2 Y2 Thickness]
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
ElementLine (X1 Y1 X2 Y2 Thickness)
@end format
@end cartouche

@table @var
@item X1 Y1 X2 Y2
Coordinates of the endpoints of the line.  These are relative to the
Element's mark point for new element formats, or absolute for older
formats.
@item Thickness
The width of the silk for this line.
@end table

@c pcbfile FileVersion
@node FileVersion syntax
@subsection FileVersion
@c ./../src/parse_y.y 262

@cartouche
@format
FileVersion[Version]
@end format
@end cartouche

@table @var
@item Version
File format version.  This version number represents the date when the pcb file
format was last changed.
@end table

Any version of pcb build from sources equal to or newer
than this number should be able to read the file.  If this line is not present
in the input file then file format compatibility is not checked.


@c pcbfile Flags
@node Flags syntax
@subsection Flags
@c ./../src/parse_y.y 420

@cartouche
@format
Flags(Number)
@end format
@end cartouche

@table @var
@item Number
A number, whose value is normally given in hex, individual bits of which
represent pcb-wide flags as defined in @ref{PCBFlags}.

@end table

@c pcbfile Grid
@node Grid syntax
@subsection Grid
@c ./../src/parse_y.y 298

@noindent
Current syntax:

@cartouche
@format
Grid [Step OffsetX OffsetY Visible]
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
Grid (Step OffsetX OffsetY Visible)
Grid (Step OffsetX OffsetY)
@end format
@end cartouche

@table @var
@item Step
Distance from one grid point to adjacent points.  This value may be a
floating point number for the first two variants.
@item OffsetX OffsetY
The "origin" of the grid.  Normally zero.
@item Visible
If non-zero, the grid will be visible on the screen.
@end table

@c pcbfile Groups
@node Groups syntax
@subsection Groups
@c ./../src/parse_y.y 435

@cartouche
@format
Groups("String")
@end format
@end cartouche

@table @var
@item String

Encodes the layer grouping information.  Each group is separated by a
colon, each member of each group is separated by a comma.  Group
members are either numbers from @code{1}..@var{N} for each layer, and
the letters @code{c} or @code{s} representing the component side and
solder side of the board.  Including @code{c} or @code{s} marks that
group as being the top or bottom side of the board.

@example
Groups("1,2,c:3:4:5,6,s:7,8")
@end example

@end table

@c pcbfile Layer
@node Layer syntax
@subsection Layer
@c ./../src/parse_y.y 615

@cartouche
@format
Layer (LayerNum "Name" "Flags") (
@ @ @ @dots{} contents @dots{}
)
@end format
@end cartouche

@table @var
@item LayerNum
The layer number.  Layers are numbered sequentially, starting with 1.
The last two layers (9 and 10 by default) are solder-side silk and
component-side silk, in that order. The two silk layers also mark top and
bottom side; the layer group where the solder-side silk layer is member in
is the solder side group. Analogous for the other side.
@item Name
The layer name.

For layout files predating layer flags the name also defines
the layer type in some situations. For example, a layer named @emph{outline}
was considered to be the layer defining the extents of the board.
@item Flags
Layer flags. Currently this is the layer type, like @emph{copper}, @emph{silk}
or @emph{outline}. For a complete list see layertype_name[] in layerflags.c.

With layer flags missing, the type of layer is guessed at load time, mostly by
the layer name. This mechanism ensures compatibility with older layouts.
@item contents
The contents of the layer, which may include attributes, lines, arcs, rectangles,
text, and polygons.
@end table

@c pcbfile Line
@node Line syntax
@subsection Line
@c ./../src/parse_y.y 677

@noindent
Current syntax:

@cartouche
@format
Line [X1 Y1 X2 Y2 Thickness Clearance SFlags]
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
Line (X1 Y1 X2 Y2 Thickness Clearance NFlags)
Line (X1 Y1 X2 Y2 Thickness NFlags)
@end format
@end cartouche

@table @var
@item X1 Y1 X2 Y2
The end points of the line
@item Thickness
The width of the line
@item Clearance
The amount of space cleared around the line when the line passes
through a polygon.  The clearance is added to the thickness to get the
thickness of the clear; thus the space between the line and the
polygon is @math{Clearance/2} wide.
@item SFlags
Symbolic or numeric flags
@item NFlags
Numeric flags.
@end table

@c pcbfile Mark
@node Mark syntax
@subsection Mark
@c ./../src/parse_y.y 978

@noindent
Legacy syntax:

@cartouche
@format
Mark [X Y]
Mark (X Y)
@end format
@end cartouche

@table @var
@item X Y
Coordinates of the Mark, for older element formats that don't have
the mark as part of the Element line.
@end table

@c pcbfile Net
@node Net syntax
@subsection Net
@c ./../src/parse_y.y 1279

@cartouche
@format
Net ("Name" "Style") (
@ @ @ @dots{} connects @dots{}
)
@end format
@end cartouche

@table @var
@item Name
The name of this net.
@item Style
The routing style that should be used when autorouting this net.
@end table

@c pcbfile Netlist
@node Netlist syntax
@subsection Netlist
@c ./../src/parse_y.y 1258

@cartouche
@format
Netlist ( ) (
@ @ @ @dots{} nets @dots{}
)
@end format
@end cartouche

@c pcbfile Pad
@node Pad syntax
@subsection Pad
@c ./../src/parse_y.y 1130

@noindent
Current syntax:

@cartouche
@format
Pad [rX1 rY1 rX2 rY2 Thickness Clearance Mask "Name" "Number" SFlags]
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
Pad (rX1 rY1 rX2 rY2 Thickness Clearance Mask "Name" "Number" NFlags)
Pad (aX1 aY1 aX2 aY2 Thickness "Name" "Number" NFlags)
Pad (aX1 aY1 aX2 aY2 Thickness "Name" NFlags)
@end format
@end cartouche

@table @var
@item rX1 rY1 rX2 rY2
Coordinates of the endpoints of the pad, relative to the element's
mark.  Note that the copper extends beyond these coordinates by half
the thickness.  To make a square or round pad, specify the same
coordinate twice.
@item aX1 aY1 aX2 aY2
Same, but absolute coordinates of the endpoints of the pad.
@item Thickness
width of the pad.
@item Clearance
add to thickness to get clearance width.
@item Mask
width of solder mask opening.
@item Name
name of pin
@item Number
number of pin
@item SFlags
symbolic or numerical flags
@item NFlags
numerical flags only
@end table

@c pcbfile PCB
@node PCB syntax
@subsection PCB
@c ./../src/parse_y.y 275

@noindent
Current syntax:

@cartouche
@format
PCB ["Name" Width Height]
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
PCB ("Name" Width Height)
PCB ("Name")
@end format
@end cartouche

@table @var
@item Name
Name of the PCB project
@item Width Height
Size of the board
@end table

If you don't specify the size of the board, a very large default is
chosen.

@c pcbfile Pin
@node Pin syntax
@subsection Pin
@c ./../src/parse_y.y 1062

@noindent
Current syntax:

@cartouche
@format
Pin [rX rY Thickness Clearance Mask Drill "Name" "Number" SFlags]
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
Pin (rX rY Thickness Clearance Mask Drill "Name" "Number" NFlags)
Pin (aX aY Thickness Drill "Name" "Number" NFlags)
Pin (aX aY Thickness Drill "Name" NFlags)
Pin (aX aY Thickness "Name" NFlags)
@end format
@end cartouche

@table @var
@item rX rY
coordinates of center, relative to the element's mark
@item aX aY
absolute coordinates of center.
@item Thickness
outer diameter of copper annulus
@item Clearance
add to thickness to get clearance diameter
@item Mask
diameter of solder mask opening
@item Drill
diameter of drill
@item Name
name of pin
@item Number
number of pin
@item SFlags
symbolic or numerical flags
@item NFlags
numerical flags only
@end table

@c pcbfile PolyArea
@node PolyArea syntax
@subsection PolyArea
@c ./../src/parse_y.y 355

@cartouche
@format
PolyArea [Area]
@end format
@end cartouche

@table @var
@item Area 
Minimum area of polygon island to retain. If a polygon has clearances that cause an isolated island to be created, then will only be retained if the area exceeds this minimum area.
@end table

@c pcbfile Polygon
@node Polygon syntax
@subsection Polygon
@c ./../src/parse_y.y 791

@noindent
Current syntax:

@cartouche
@format
Polygon (SFlags) (
@ @ @ @dots{} [X Y] @dots{}
@ @ @ Hole (
@ @ @ @ @ @ @dots{} [X Y] @dots{}
@ @ @ )
@ @ @ @dots{}
)
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
Polygon (SFlags) (
@ @ @ @dots{} (X Y) @dots{}
@ @ @ Hole (
@ @ @ @ @ @ @dots{} (X Y) @dots{}
@ @ @ )
@ @ @ @dots{}
)
@end format
@end cartouche

@table @var
@item SFlags
Symbolic or numeric flags.
@item X Y
Coordinates of each vertex.  You must list at least three coordinates.
@item Hole (...)
Defines a hole within the polygon's outer contour. There may be zero or more such sections.
@end table

@c pcbfile Rat
@node Rat syntax
@subsection Rat
@c ./../src/parse_y.y 600

@noindent
Current syntax:

@cartouche
@format
Rat [X1 Y1 Group1 X2 Y2 Group2 SFlags]
@end format
@end cartouche

@noindent
Legacy Syntax:

@cartouche
@format
Rat (X1 Y1 Group1 X2 Y2 Group2 NFlags)
@end format
@end cartouche

@table @var
@item X1 Y1 X2 Y2
The endpoints of the rat line.
@item Group1 Group2
The layer group each end is connected on.
@item SFlags
Symbolic or numeric flags.
@item NFlags
Numeric flags.
@end table

@c pcbfile Styles
@node Styles syntax
@subsection Styles
@c ./../src/parse_y.y 450

@cartouche
@format
Styles("String")
@end format
@end cartouche

@table @var
@item String

Encodes the four routing styles @code{pcb} knows about.  The four styles
are separated by colons.  Each style consists of five parameters as follows:

@table @var
@item Name
The name of the style.
@item Thickness
Width of lines and arcs.
@item Diameter
Copper diameter of pins and vias.
@item Drill
Drill diameter of pins and vias.
@item Keepaway
Minimum spacing to other nets.  If omitted, 10 mils is the default.
@item Via Mask Aperture (optional)
The diameter of the solder mask opening around vias. A value of 0 produces a
tented via. This parameter is omitted if 0 for backwards compatibility.

@end table

@end table

@noindent
Current syntax example:

@example
Styles["Logic,1000,3600,2000,1000,0:Power,2500,6000,3500,1000,70mil:
@ @ @ Line,4000,6000,3500,1000:Breakout,600,2402,1181,600"]
@end example

@noindent
Legacy syntax example:

@example
Styles("Signal,10,40,20:Power,25,60,35:Fat,40,60,35:Skinny,8,36,20")
@end example

@noindent
Note that strings in actual files cannot span lines; the above example
is split across lines only to make it readable.

@c pcbfile Symbol
@node Symbol syntax
@subsection Symbol
@c ./../src/parse_y.y 1192

@noindent
Current syntax:

@cartouche
@format
Symbol [Char Delta] (
@ @ @ @dots{} symbol lines @dots{}
)
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
Symbol (Char Delta) (
@ @ @ @dots{} symbol lines @dots{}
)
@end format
@end cartouche

@table @var
@item Char
The character or numerical character value this symbol represents.
Characters must be in single quotes.
@item Delta
Additional space to allow after this character.
@end table

@c pcbfile SymbolLine
@node SymbolLine syntax
@subsection SymbolLine
@c ./../src/parse_y.y 1241

@noindent
Current syntax:

@cartouche
@format
SymbolLine [X1 Y1 X2 Y2 Thickness]
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
SymbolLine (X1 Y1 X2 Y2 Thickness)
@end format
@end cartouche

@table @var
@item X1 Y1 X2 Y2
The endpoints of this line.
@item Thickness
The width of this line.
@end table

@c pcbfile Text
@node Text syntax
@subsection Text
@c ./../src/parse_y.y 737

@noindent
Current syntax:

@cartouche
@format
Text [X Y Direction Scale "String" SFlags]
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
Text (X Y Direction Scale "String" NFlags)
Text (X Y Direction "String" NFlags)
@end format
@end cartouche

@table @var
@item X Y
The location of the upper left corner of the text.
@item Direction
0 means text is drawn left to right, 1 means up, 2 means right to left
(i.e. upside down), and 3 means down.
@item Scale
Size of the text, as a percentage of the ``default'' size of of the
font (the default font is about 40 mils high).  Default is 100 (40
mils).
@item String
The string to draw.
@item SFlags
Symbolic or numeric flags.
@item NFlags
Numeric flags.
@end table

@c pcbfile Thermal
@node Thermal syntax
@subsection Thermal
@c ./../src/parse_y.y 367

@cartouche
@format
Thermal [Scale]
@end format
@end cartouche

@table @var
@item Scale
Relative size of thermal fingers.  A value of 1.0 makes the finger
width twice the clearance gap width (measured across the gap, not
diameter).  The normal value is 0.5, which results in a finger width
the same as the clearance gap width.
@end table

@c pcbfile Via
@node Via syntax
@subsection Via
@c ./../src/parse_y.y 535

@noindent
Current syntax:

@cartouche
@format
Via [X Y Thickness Clearance Mask Drill BuriedFrom BuriedTo "Name" SFlags]
Via [X Y Thickness Clearance Mask Drill "Name" SFlags]
@end format
@end cartouche

@noindent
Legacy syntax:

@cartouche
@format
Via (X Y Thickness Clearance Mask Drill "Name" NFlags)
Via (X Y Thickness Clearance Drill "Name" NFlags)
Via (X Y Thickness Drill "Name" NFlags)
Via (X Y Thickness "Name" NFlags)
@end format
@end cartouche

@table @var
@item X Y
coordinates of center
@item Thickness
outer diameter of copper annulus
@item Clearance
add to thickness to get clearance diameter
@item Mask
diameter of solder mask opening
@item Drill
diameter of drill
@item BuriedFrom
upper layer from which the buried via starts
@item BuriedTo
lower layer to which the buried via ends
@item Name
string, name of via (vias have names?)
@item SFlags
symbolic or numerical flags
@item NFlags
numerical flags only
@end table

Example:

@example
Via[15.0000mm 11.0000mm 24.00mil 12.00mil 0.0000 11.81mil 0 5 "" ""]
@end example

The above example gives a via at coordinates x=15.0000 mm, y=11.0000mm,
with a 24.00mil thickness, a 6.00mil clearance, a 0.0000 gap,
a -12.00mil mask (tented), a 11.81mil drill width, starting at the top
layer ("0"), ending at the 3rd copper layer ("2"), and has no names and
no flags.

@c pcbfile ~objectflags
@c ./../src/const.h 160
@node Object Flags
@section Object Flags

Note that object flags can be given numerically (like @code{0x0147})
or symbolically (like @code{"found,showname,square"}.  Some numeric
values are reused for different object types.  The table below lists
the numeric value followed by the symbolic name.

@table @code
@item 0x0001 pin
If set, this object is a pin.  This flag is for internal use only.
@item 0x0002 via
Likewise, for vias.
@item 0x0004 found
If set, this object has been found by @code{FindConnection()}.
@item 0x0008 hole
For pins and vias, this flag means that the pin or via is a hole
without a copper annulus.
@item 0x0008 nopaste
For pads, set to prevent a solderpaste stencil opening for the
pad.  Primarily used for pads used as fiducials.
@item 0x0010 rat
If set for a line, indicates that this line is a rat line instead of a
copper trace.
@item 0x0010 pininpoly
For pins and pads, this flag is used internally to indicate that the
pin or pad overlaps a polygon on some layer.
@item 0x0010 clearpoly
For polygons, this flag means that pins and vias will normally clear
these polygons (thus, thermals are required for electrical
connection).  When clear, polygons will solidly connect to pins and
vias.
@item 0x0010 hidename
For elements, when set the name of the element is hidden.
@item 0x0020 showname
For elements, when set the names of pins are shown.
@item 0x0020 clearline
For lines and arcs, the line/arc will clear polygons instead of
connecting to them.
@item 0x0020 fullpoly
For polygons, the full polygon is drawn (i.e. all parts instead of only the biggest one).
@item 0x0040 selected
Set when the object is selected.
@item 0x0080 onsolder
For elements and pads, indicates that they are on the solder side.
@item 0x0080 auto
For lines and vias, indicates that these were created by the
autorouter.
@item 0x0100 square
For pins and pads, indicates a square (vs round) pin/pad.
@item 0x0200 rubberend
For lines, used internally for rubber band moves.
@item 0x0200 warn
For pins, vias, and pads, set to indicate a warning.
@item 0x0400 usetherm
Obsolete, indicates that pins/vias should be drawn with thermal
fingers.
@item 0x0400
Obsolete, old files used this to indicate lines drawn on silk.
@item 0x0800 octagon
Draw pins and vias as octagons.
@item 0x1000 drc
Set for objects that fail DRC.
@item 0x2000 lock
Set for locked objects.
@item 0x4000 edge2
For pads, indicates that the second point is closer to the edge.  For
pins, indicates that the pin is closer to a horizontal edge and thus
pinout text should be vertical.
@item 0x8000 marker
Marker used internally to avoid revisiting an object.
@item 0x10000 connected
If set, this object has been as physically connected by @code{FindConnection()}.
@end table
@c pcbfile ~pcbflags
@c ./../src/const.h 204
@node PCBFlags
@section PCBFlags
@table @code
@item 0x00001
Pinout displays pin numbers instead of pin names.
@item 0x00002
Use local reference for moves, by setting the mark at the beginning of
each move.
@item 0x00004
When set, only polygons and their clearances are drawn, to see if
polygons have isolated regions.
@item 0x00008
Display DRC region on crosshair.
@item 0x00010
Do all move, mirror, rotate with rubberband connections.
@item 0x00020
Display descriptions of elements, instead of refdes.
@item 0x00040
Display names of elements, instead of refdes.
@item 0x00080
Auto-DRC flag.  When set, PCB doesn't let you place copper that
violates DRC.
@item 0x00100
Enable 'all-direction' lines.
@item 0x00200
Switch starting angle after each click.
@item 0x00400
Force unique names on board.
@item 0x00800
New lines/arc clear polygons.
@item 0x01000
Crosshair snaps to pins and pads.
@item 0x02000
Show the solder mask layer.
@item 0x04000
Draw with thin lines.
@item 0x08000
Move items orthogonally.
@item 0x10000
Draw autoroute paths real-time.
@item 0x20000
New polygons are full ones.
@item 0x40000
Names are locked, the mouse cannot select them.
@item 0x80000
Everything but names are locked, the mouse cannot select anything else.
@item 0x100000
New polygons are full polygons.
@item 0x200000
When set, element names are not drawn.
@end table