PCB格式
EasyEDA PCB File Format
Head
Head information for PCB.
"head":"3~1.7.5~Author`Dillon`"
Format:
- document type :
3
- document version:
1.7.5
- custom attributes: key: value pairs, separate with `, added via Add new parameter
Head information for PCB footprint
"4~1.7.5~400~300~`pre`U?`Contributor`Dillon"
Format:
- document type :
4
- document version:
1.7.5
- origin x position. Reserved field, can't be changeded
- origin y position. Reserved field, can't be changeded
- custom attributes: key: value pairs, separate with `, added via Add new parameter.
pre:U? , when place to PCB, will be marked as U1, U2.
Contributor:Dillon
sourceId:xxxxxxxxx (just for Footprint)
2
3
Parameters Dimensions
EasyEDA support millimeter, inch and millimeter, but when these items are stored to a file, all of them will be expressed as 10X mil. Taking line lengths or widths for examples, stroke width equal 1, stands 10mil.
Canvas
"CA~2400~2400~#000000~yes~#FFFFFF~10~1200~1200~line~1~mil~1~45~visible~0.5~400~300"
Format:
- command: CA
- view box width: 2400(24000 mil), View Box Width / Canvas width = scaleX = 2
- view box height: 2400(24000 mil),View Box Height / Canvas Height = scaleY = 2
- back ground: #000000
- grid visible: yes/none
- grid color: #FFFFFF
- grid size: 10(100 mil)
- canvas width: 1200 (12000 mil)
- canvas height: 1200 (12000 mil)
- grid style: line/dot
- snap size: 1 (10 mil)
- unit: mil(inch, mil, mm)
- routing width: 1 (10mil)
- routing angle: 45 degree( 45 90 free)
- copper area: visible/invisible
- ALT snap size: 0.5 ( 5 mil Snap Size when pressing the
ALT
Key) - origin x position
- origin y position
Canvas setting image
System Color
"#000000~#FFFFFF~#FFFFFF~#000000~#FFFFFF"
Format:
- future use: #000000
- future use: #FFFFFF
- future use: #FFFFFF
- hole Color: #000000
- DRC error: #FFFFFF
Layers config
layers is an array, each layer is an item of the layers.
"layers":[
"1~TopLayer~#FF0000~true~true~true",
"2~BottomLayer~#0000FF~true~false~true",
"3~TopSilkLayer~#FFFF00~true~false~true",
"4~BottomSilkLayer~#808000~true~false~true",
"5~TopPasterLayer~#808080~false~false~false",
"6~BottomPasterLayer~#800000~false~false~false",
"7~TopSolderLayer~#800080~false~false~false",
"8~BottomSolderLayer~#AA00FF~false~false~false",
"9~Ratlines~#6464FF~true~false~true",
"10~BoardOutline~#FF00FF~true~false~true",
"11~Multi-Layer~#C0C0C0~true~false~true",
"12~Document~#FFFFFF~true~false~true",
"21~Inner1~#800000~false~false~false",
"22~Inner2~#008000~false~false~false",
"23~Inner3~#00FF00~false~false~false",
"24~Inner4~#000080~false~false~false"
]
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Format:
- layer id: 1
- layer name: TopLayer
- layer color: #FF0000
- visible: true, hints the objects in this layer show or hide
- active: false. active layer
- config: true. if be set false, you can't see it on the layer toolbar.
Preference
"preference":{
"hideFootprints":"gge118~gge221~gge227~gge233",
"hideNets":"BSYNC~DREQ~GPIO0~MICP~GND"
}
2
3
4
hideFootprints
: when the id of the footprints in here, you can't see them on canvas. hideNets
: when the net name in here, you can't see them on canvas, you can hide the ratline at here too. There are some guys would like to hide then GND ratline, then use copper area to connect all the GND pad.
DRC Rule
"DRCRULE":{
"trackWidth":0.7,
"track2Track":0.7,
"pad2Pad":0.8,
"track2Pad":0.8,
"hole2Hole":1,
"holeSize":1.6
}
2
3
4
5
6
7
8
trackWidth
: 0.7 (7 mil) track width track2Track
: 0.7 (7 mil) track to track distance pad2Pad
: 0.8(8 mil) pad to pad distance track2Pad
: 0.8(8 mil) track to pad distance hole2Hole
: 1(10 mil) hole to hole distance holeSize
: 1.6(16 mil) hole diameter
This is a simple DRC, more later.
Shapes
The shape is an array. EasyEDA store various shape in this field, they are different with a command which locate at the begin of the string.
"shape":[
"TRACK~1~1~S$19~311 175 351 175 352 174~gge18",
"PAD~ELLIPSE~329~185~6~6~11~~1~1.8~~0~gge20",
"VIA~329~202~3.2~~0.8~gge23",
"COPPERAREA~2px~1~GND~349 247 492 261 457 314 339 329~1~solid~gge27~spoke~none~[]",
"SOLIDREGION~1~~350 146 483 146 447 228 371 220~solid~gge26"
]
2
3
4
5
6
7
Unit
EasyEDA takes 10 mil as a basic factor, when a stroke width is 1, we can take it as 1*10mil = 10mil, is 2, we can take it as 2*10mil = 20mil
TRACK
"TRACK~1~1~S$8~311 175 351 175 352 174~gge18"
Format: Check Polyline element of SVG out.
- command: TRACK
- stroke Width: 1 (10 mil)
- layer id: 1 (TopLayer)
- net: "S$8"
- points: 311 175 351 175 352 174
- id : gge18
- locked: null
TRACK's attributes and image looks like bellow image:
COPPERAREA
"COPPERAREA~2px~1~GND~349 247 492 261 457 314 339 329~1~solid~gge27~spoke~yes~[[\"M339,329 349,247 492,261 457,314z\"]]"
Format:
- command: COPPERAREA
- stroke Width: 2 (20 mil)
- layer id: 1 (TopLayer)
- net: GND
- points: 349 247 492 261 457 314 339 329
- clearance Width : 1 (10 mil)
- fill style: solid/none
- id: gge27
- thermal: spoke/direct
- keep island: none/yes
- copper zone: [["M339,329 349,247 492,261 457,314z"]] rings and holes
- locked: null
COPPERAREA's attributes and image looks like bellow image:
RECT
"RECT~406~220~105~52~1~gge32"
Format:
Check Rect element of SVG out.
- command: RECT
- x: 406
- y: 220
- width: 105
- height: 52
- layer id:1
- id: gge36
- locked:null
Rect's attributes and image looks like bellow image:
CIRCLE
"CIRCLE~363~273~42~1~3~gge33"
Format: Check Circle element of SVG out.
- command: CIRCLE
- cx:363 (3630 mil)
- cy:273
- r:42 (420 mil)
- stroke width: 1 (10mil)
- layer id: 3 (Top silk layer)
- id: gge33
- locked:null
CIRCLE's attributes and image looks like bellow image:
SOLIDREGION
"SOLIDREGION~1~GND~322 256 376 317 447 250 353 231~solid~gge34"
Format:
- command: SOLIDREGION
- layer id: 1 (Toplayer)
- net: GND
- points:322 256 376 317 447 250 353 231
- type: solid/cutout/npth
- id: gge34
- locked:null
SOLIDREGION's attributes and image looks like bellow image:
TEXT
"TEXT~L~351~252~0.8~0~none~1~~8~TEXT~M 352.55 250.64 L 352.55 258.27 M 350 250.64 L 355.09 250.64 M 357.49 250.64 L 357.49 258.27 M 357.49 250.64 L 362.22 250.64 M 357.49 254.27 L 360.4 254.27 M 357.49 258.27 L 362.22 258.27 M 364.62 250.64 L 369.71 258.27 M 369.71 250.64 L 364.62 258.27 M 374.65 250.64 L 374.65 258.27 M 372.11 250.64 L 377.2 250.64~~gge35"
Format:
- command: TEXT
- type: L/P (L = label, P = prefix)
- position x: 351 (3510 mil)
- position y: 252 (2520 mil)
- stroke width: 0.8 (8 mil)
- rotation: 0
- mirror : none ( not user now)
- layer id: 1 (Toplayer)
- net: ''
- font size: 8 (80 mil in height)
- string: TEXT
- text path: M 352.55 250.64 L 352.55 258.27 M 350 250.64 L 355.09 250.64 M 357.49 250.64 L 357.49 258.27 M 357.49 250.64 L 362.22 250.64 M 357.49 254.27 L 360.4 254.27 M 357.49 258.27 L 362.22 258.27 M 364.62 250.64 L 369.71 258.27 M 369.71 250.64 L 364.62 258.27 M 374.65 250.64 L 374.65 258.27 M 372.11 250.64 L 377.2 250.64
- display: '' (none = hide, other = show)
- id: gge35
- locked: null
TEXT's attributes and image looks like bellow image:
Arc
"ARC~1~1~S$19~M329,274 A26.95,26.95 0 0 1 370,309~~gge50"
Format: Arc is a Path element, Check Path element of SVG out.
- command: ARC
- stroke width: 1 (10 mil)
- layer id: 1 (Toplayer)
- net: S$19
- path string: M329,274 A26.95,26.95 0 0 1 370,309
- helper dots: the four green dots, no need in PCB, keep it blank
- id: gge19
- locked:null
ARC's attributes and image looks like bellow image:
PAD
"PAD~OVAL~814~371~6~16~11~~1~1.8~814 366 814 376~0~gge5~11~814 374.7 814 367.3~N"
Format:
- command: PAD
- shape: ELLIPSE/RECT/OVAL/POLYGON
- center x: 814
- center y: 371
- width: 6 (60 mil)
- height: 16 (160 mil)
- layer id: 11 (All)
- net: ''
- number: 1
- hole radius: 1.8 (18 mil)
- points: '' (ELLIPSE = '', RECT = outline points)
- rotation: 0 [0 - 360]
- id: gge19
- Hole(Length): 11 (110mil)
- Hole Points: 814 374.7 814 367.3 // slot hole from to point
- Plated:Y/N
- locked:null
PAD's attributes and image looks like bellow image:
VIA
"VIA~432~215~3.2~~0.8~gge5"
Format:
- command: VIA
- center x: 432
- center y: 215
- diameter: 3.2
- net : ''
- hole radius: 0.8 (8 mil)
- id: gge5
- locked:null
VIA's attributes and image looks like bellow image:
HOLE
"HOLE~284~255~4~gge5"
Format:
- command: HOLE
- center x: 284
- center y: 255
- diameter: 4
- id: gge5
- locked:null
HOLE's attributes and image looks like bellow image:
DIMENSION
"DIMENSION~3~M 301 217 L 442 217 M 306 220 L 301 217 L 306 214 M 437 220 L 442 217 L 437 214 M 369.5 209.82 L 370.05 209.55 L 370.86 208.73 L 370.86 214.45 M 372.94 213.09 L 372.66 213.36 L 372.94 213.64 L 373.21 213.36 L 372.94 213.09 M 377.74 208.73 L 375.01 212.55 L 379.1 212.55 M 377.74 208.73 L 377.74 214.45 M 380.9 209.82 L 381.45 209.55 L 382.26 208.73 L 382.26 214.45 M 384.06 208.73 L 384.06 210.64 M 386.25 208.73 L 386.25 210.64~gge8"
Format:
- command: DIMENSION
- layer id: 3 (Top Silk layer)
- path: M 301 217 L 442 217 M 306 220 L 301 217 L 306 214 M 437 220 L 442 217 L 437 214 M 369.5 209.82 L 370.05 209.55 L 370.86 208.73 L 370.86 214.45 M 372.94 213.09 L 372.66 213.36 L 372.94 213.64 L 373.21 213.36 L 372.94 213.09 M 377.74 208.73 L 375.01 212.55 L 379.1 212.55 M 377.74 208.73 L 377.74 214.45 M 380.9 209.82 L 381.45 209.55 L 382.26 208.73 L 382.26 214.45 M 384.06 208.73 L 384.06 210.64 M 386.25 208.73 L 386.25 210.64
- id: gge5
- locked:null
DIMENSION's attributes and image looks like bellow image:
DIMENSION just allows to change it layer id, if you don't accept this DIMENSION, delete it and redraw again.
Footprint
"LIB~245~240~package`CK17-B`~~~gge15~1#@$TEXT~P~295~219.5~0.7~0~~3~~4.5~C1~M 298.07 218.07L297.86 217.66 L297.45 217.25 L297.05 217.05 L296.23 217.05 L295.82 217.25 L295.41 217.66 L295.2 218.07 L295 218.68 L295 219.7 L295.2 220.32 L295.41 220.73 L295.82 221.14 L296.23 221.34 L297.05 221.34 L297.45 221.14 L297.86 220.73 L298.07 220.32 M 299.42 217.86L299.83 217.66 L300.44 217.05 L300.44 221.34 ~~gge16#@$TRACK~0.9~3~~257.5 224.5 332.5 224.5 332.5 255.5 257.5 255.5 257.5 224.5~gge17#@$PAD~ELLIPSE~245~240~9.4~9.4~11~~1~2.25~~0~gge18#@$PAD~ELLIPSE~345~240~9.4~9.4~11~~2~2.25~~0~gge19"
A Footprint has several shapes, join these shapes with #@$(Octothorpe Ampersat Dollar) as a string like above.
configure
LIB~245~240~package`CK17-B`~0~~gge15~1
- command: LIB
- position x: 270
- position y: 140
- rotation: 0, can be [0 - 360 ]
- import flag: '', just used in import from eagle
- id: gge115
- locked: null
shapes
All other items are shapes.
Footprints' image looks like bellow image: