Shape Primitives
LINE Line
{ "type": "LINE", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":9.223,
"netName":"GND",
"layerId":1,
"startX":100,
"startY":200,
"endX":400,
"endY":300,
"width":0.7,
}|2
3
4
5
6
7
8
9
10
11
12
13
14
- type line
LINE. - id primitive ID, unique within the document.
- ticket logical clock.
- partitionId partition ID it belongs to, null means no partition. Ignored for footprints.
- groupId group ID: 0 no group, non-zero is the group flag, same flag means same group.
- locked whether locked.
- zIndex Z-axis height.
- netName net.
- layerId layer.
- startX start X.
- startY start Y.
- endX end X.
- endY end Y.
- width line width.
ARC/CARC Arc Line
The arc borrows Eagle's mathematical model, described based on start and end.
{ "type": "ARC", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":2.866,
"netName":"GND",
"layerId":1,
"startX":100,
"startY":200,
"endX":300,
"endY":400,
"angle":-170,
"width":10,
}|2
3
4
5
6
7
8
9
10
11
12
13
14
15
- type arc line.
ARCtwo-point interaction mode.CARCcenter-arc interaction mode.
- id primitive ID, unique within the document.
- ticket logical clock.
- partitionId partition ID it belongs to, null means no partition. Ignored for footprints.
- groupId group ID: 0 no group, non-zero is the group flag, same flag means same group.
- locked whether locked.
- zIndex Z-axis height.
- netName net.
- layerId layer.
- startX start X.
- startY start Y.
- endX end X.
- endY end Y.
- angle arc angle, positive counter-clockwise, negative clockwise.
- width line width.
Polygon System
SVG's path is an excellent abstraction for polygons. However, because relative position and other features are not needed in PCB, and a more convenient parsing method can be designed conditionally, a polygon expression similar to SVG path was created. Within the polygon system, POLY, REGION, and POUR support mutual conversion.
Single Polygon Definition
A single polygon is a region described by an uninterrupted line whose start and end coincide. If start and end do not coincide, they are automatically closed.
[300, 200, "L", 400, 200, "ARC", 400, 220, 15, "C", 200, 500, 400, 300, 100, 100]["R", 100, 200, 300, 300, 0]["CIRCLE", 100, 200, 5, 1]L Line Mode
X Y L X Y X Y ... mode is line mode. All coordinates are connected by straight lines.
ARC/CARC Arc Mode
startX startY ARC angle endX endY mode is arc mode.
- startX/startY start coordinates.
- angle: arc angle, positive counter-clockwise, negative clockwise.
- endX/endY end coordinates.
startX startY CARC angle endX endY center-arc interaction mode.
C Cubic Bezier Mode
X1 Y1 C X2 Y2 X3 Y3 X4 Y4 ... mode is cubic Bezier mode. All coordinates are control points.
R Rectangle Mode
R X Y width height rot isCCW round rectangle mode is independent from other modes.
- X/Y: top-left coordinate.
- width: width.
- height: height.
- rot: rotation angle.
- isCCW: whether counter-clockwise.
- round: corner radius.
CIRCLE Circle Mode
CIRCLE cx cy r isCCW circle mode is independent from other modes.
- cx/cy: center point coordinates.
- r: radius.
- isCCW: whether counter-clockwise.
Complex Polygon Definition
[[single polygon 1: outer frame], [single polygon 2: inner hole]]A complex polygon can contain multiple single polygons. The first polygon is clockwise and represents the outer frame; all subsequent polygons are counter-clockwise and represent inner holes.
POLY Polyline
The polyline is similar to LINE and ARC, but it preserves the concept of a continuous single line drawn at one time, and can be converted with REGION, FILL, and POUR.
{ "type": "POLY", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":6.417,
"netName":"GND",
"layerId":1,
"width":0.5,
"path":["single polygon"],
}|2
3
4
5
6
7
8
9
10
11
- type polyline
POLY. - id primitive ID, unique within the document.
- ticket logical clock.
- partitionId partition ID it belongs to, null means no partition. Ignored for footprints.
- groupId group ID: 0 no group, non-zero is the group flag, same flag means same group.
- locked whether locked.
- zIndex Z-axis height.
- netName net.
- layerId layer.
- width line width.
- path see single polygon.
FILL Fill
{ "type": "FILL", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex": 0.794,
"netName":"GND",
"layerId":3,
"width":10,
"fillStyle":0,
"path":["complex polygon"],
}|2
3
4
5
6
7
8
9
10
11
12
- type fill
FILL. - id primitive ID, unique within the document.
- ticket logical clock.
- partitionId partition ID it belongs to, null means no partition. Ignored for footprints.
- groupId group ID: 0 no group, non-zero is the group flag, same flag means same group.
- locked whether locked.
- zIndex Z-axis height.
- netName net.
- layerId layer.
- width line width.
- fillStyle fill style: 0 solid fill, 1 grid fill, 2 internal plane fill.
- path see complex polygon chapter.
- For a polygon drawn in one go, there is only one single polygon here.
- For polygons drawn in combination mode, there are multiple single polygons here.
REGION Region
Keepout regions are an important future feature. In addition to assisting manual design, they can also assist automatic placement and routing by providing automation tools with constraint information on area ranges in addition to design rules.
{ "type": "REGION", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.901,
"layerId":3,
"width":1,
"prohibitType":[1, 2, 5],
"path":["complex polygon"],
"name":"aa constraint",
}|2
3
4
5
6
7
8
9
10
11
12
13
- type region
REGION. - id primitive ID, unique within the document.
- ticket logical clock.
- partitionId partition ID it belongs to, null means no partition. Ignored for footprints.
- groupId group ID: 0 no group, non-zero is the group flag, same flag means same group.
- locked whether locked.
- zIndex Z-axis height.
- layerId layer.
- width line width.
- prohibitType prohibit types, multiple can exist simultaneously.
- *prohibit routing and placing fill regions (deprecated, but keep compatible when parsing)
- prohibit components
- prohibit vias
- *prohibit copper pours and internal planes (deprecated, but keep compatible when parsing)
- prohibit routing
- prohibit placing fill regions
- prohibit copper pours
- prohibit internal planes
- path see complex polygon chapter.
- For a polygon drawn in one go, there is only one single polygon here.
- For polygons drawn in combination mode, there are multiple single polygons here.
- name name (optional).
POUR Copper Pour Border
A substantial difference from previous copper pours is that complex polygons are supported, meaning copper pour regions can contain holes. In theory, polygons converted from text paths can be used as copper pour regions. Copper pours are filled in the order they appear in the format.
{ "type": "POUR", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.779,
"netName":"GND",
"layerId":1,
"width":1,
"name":"TOPGND",
"order":4,
"path":["complex polygon"],
"pourType":["pour type"],
"keepIsland":1,
}|
["POUR", "e100", 5, 1, 0.779, "GND", 1, 1, "TOPGND", 4, complex polygon, [pour type], 1]2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- type copper pour
POUR. - id primitive ID, unique within the document.
- ticket logical clock.
- partitionId partition ID it belongs to, null means no partition. Ignored for footprints.
- groupId group ID: 0 no group, non-zero is the group flag, same flag means same group.
- locked whether locked.
- zIndex Z-axis height.
- netName net.
- layerId layer.
- width line width.
- name copper pour name.
- order copper pour priority.
- path see complex polygon chapter.
- pourType see pour types.
- keepIsland whether to keep islands.
Pour Types
SOLID Solid Fill
["SOLID", 2]- solid fill
SOLID. - minimum copper pour neck width (production optimization; 0 means no production optimization).
["POUR", "e100", "GND", 1, "BOTGND", 2, complex polygon, ["SOLID", 2], 1, 0]["POUR", "e100", "GND", 1, "BOTGND", 2, complex polygon, ["SOLID", 0], 1, 0]LINE Line Fill
["LINE", 0, 0, 10, 20]- line fill
LINE. - fill mode:
0grid,1horizontal,2vertical. - rotation angle.
- line width.
- line spacing.
["POUR", "e100", "GND", 1, "", 9, complex polygon, ["LINE", 0, 0, 10, 20], 0.6, 1, 0, 0]POURED Copper Pour Result
{ "type": "POURED", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"targetId":"e100",
"strokeWidth":0,
"fill":1,
"path":["complex polygon"],
}|2
3
4
5
6
7
8
- type copper pour result
POURED. - id primitive ID.
- ticket logical clock.
- partitionId partition ID it belongs to, null means no partition. Ignored for footprints.
- targetId ID of the parent copper pour border
POUR. - strokeWidth stroke width: 0 means no stroke.
- fill whether filled.
- path path, complex polygon.
IMAGE Image
IMAGE is very similar to REGION, but in operation, IMAGE has no control points and cannot freely change its shape, only overall scaling, rotation, flipping, and translation. When IMAGE is on a signal layer, from the DRC perspective it is a net-less rectangular area defined by start, end, rotation angle, and whether mirrored.
{ "type": "IMAGE", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":5.5464,
"layerId":31,
"startX":200,
"startY":200,
"width":400,
"height":400,
"angle":45,
"mirror":1,
"path":["complex polygon"],
}|2
3
4
5
6
7
8
9
10
11
12
13
14
15
- type image
IMAGE. - id primitive ID, unique within the document.
- ticket logical clock.
- partitionId partition ID it belongs to, null means no partition. Ignored for footprints.
- groupId group ID: 0 no group, non-zero is the group flag, same flag means same group.
- locked whether locked.
- zIndex Z-axis height.
- layerId layer.
- startX top-left X.
- startY top-left Y.
- width width.
- height height.
- angle rotation angle, around
startpoint. - mirror whether the original image is horizontally mirrored. Mirroring is performed around the center of the original image's BBox.
- path multiple complex polygons, see complex polygon chapter. Raw data is stored here; no adjustment is needed throughout the lifecycle.
TEARDROP Teardrop
Teardrops cannot be selected or directly operated. When any associated primitive changes, EDA should automatically make them disappear.
{ "type": "TEARDROP", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"netName":"GND",
"layerId":3,
"path":"simple polygon",
"groupId":0,
}|2
3
4
5
6
7
8
- type teardrop
TEARDROP. - id ID.
- ticket logical clock.
- partitionId partition ID it belongs to, null means no partition. Ignored for footprints.
- netName net.
- layerId layer.
- path simple polygon.
- groupId group ID: 0 no group, non-zero is the group flag, same flag means same group.
FPC_FILL FPC Reinforcement Fill
{ "type": "FPC_FILL", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":7.7845,
"layerId":3,
"material":"3M468",
"thickness":7.874,
"path":"complex polygon",
}|2
3
4
5
6
7
8
9
10
11
- type fill
FPC_FILL. - id primitive ID, unique within the document.
- ticket logical clock.
- partitionId partition ID it belongs to, null means no partition. Ignored for footprints.
- groupId group ID: 0 no group, non-zero is the group flag, same flag means same group.
- locked whether locked.
- zIndex Z-axis height.
- layerId layer.
- material material.
- PI
- STEEL
- FR4
- 3M468
- 3M9077
- EMI_Shielding_Film
- thickness thickness (note the unit is the same as other primitives).
- path see complex polygon chapter.