Footprint System
PCB footprints use a Master/Instance model, describing footprints through override rules with minimal redundancy.
COMPONENT Component Instance
Instances only contain attributes. Attributes with the same Key in the instance will override those in the FOOTPRINT.
json
{ "type": "COMPONENT", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.22,
"layerId":1,
"positionX":150,
"positionY":200,
"angle":45,
"attrs":{ "3D Model": "uuid", "3D Model Transform": "20,10,0,0,15,45,0,0,20" },
}|1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
- type instance
COMPONENT. - 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 (only top and bottom).
- positionX position X.
- positionY position Y.
- angle rotation angle.
- attrs custom attributes.
- Fixed
3D Modelis the uuid of the 3D model. This uuid represents a record with doctype = 16 in the components table. - Fixed
3D Model Transformis the 3D model transformation parameters.
- Fixed
json
["ATTR", "e102", 0, "e8", 1, "Designator", "U1", 0, 1, "SimSun", 50, 10, 0, 0, 0, 1, 2, 15, 1, 1]1
json
["ATTR", "e103", 0, "e8", 1, "Footprint", "footprint-uuid", 0, 1, "SimSun", 50, 10, 0, 0, 0, 1, 2, 15, 1, 1]1
json
["ATTR", "e104", 0, "e8", 1, "Device", "device-uuid", 0, 1, "SimSun", 50, 10, 0, 0, 0, 1, 2, 15, 1, 1]1
Pad-Net Mapping PAD_NET
json
{ "type": "PAD_NET", "id":"COMPONENT_UUID", "ticket": 1 }||
{
"padNum":"a1",
"padNet":"GND",
"padId":"e125",
}|1
2
3
4
5
6
2
3
4
5
6
- type pad-net mapping
PAD_NET. - id parent component instance ID.
- ticket logical clock.
- padNum pad number.
- padNet net name.
- padId pad ID inside the footprint (optional).
Reuse Block Information REUSE_BLOCK
json
{ "type": "REUSE_BLOCK", "id":"COMPONENT_UUID", "ticket": 1 }||
{
"groupId":"$1e16",
"channelId":"$2e5_$4e3",
}|1
2
3
4
5
2
3
4
5
- type reuse block information
REUSE_BLOCK. - id parent component instance ID.
- groupId group ID.
- channelId channel ID.
3D Model Transform Special Notes
json
{ "type": "COMPONENT", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.22,
"layerId":1,
"positionX":150,
"positionY":200,
"angle":45,
"attrs":{ "3D Model": "uuid", "3D Model Transform": "20,10,0,0,15,45,0,0,20" },
}|1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
In the device, 3D Model Transform is fixed as the transformation parameters required for the 3D model to match the device when it is [on the top layer], at [coordinates 0,0], and [rotation angle 0].
The parameters are:
- sizeX: X-axis size.
- sizeY: Y-axis size.
- sizeZ: Z-axis size. There is a compatibility handling here: if 0, height is automatically adapted.
- rotZ: rotation angle around Z axis.
- rotX: rotation angle around X axis.
- rotY: rotation angle around Y axis.
- offX: X-axis offset.
- offY: Y-axis offset.
- offZ: Z-axis offset.
The algorithm for generating the 3D model transformation matrix from the 3D model transform parameters is as follows:
python
cx = X-axis midpoint of the 3D model
cy = Y-axis midpoint of the 3D model
bz = minimum Z value of the 3D model
wx = X-axis width of the 3D model
wy = Y-axis width of the 3D model
wz = Z-axis width of the 3D model
ORIGIN = translate(-cx, -cy, -bz)
SCALE = scale(sizeX / wx, sizeY / wy, sizeZ / wz)
ROT = rotateZXY(rotZ, rotX, rotY)
OFFSET = translate(offX, offY, offZ)
MATRIX = OFFSET X ROT X SCALE X ORIGIN1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14