Primitives and Records

PCB Primitives

ID 1 - Arc

Represents a footprint arc primitive. Contains only one Block with the following data:

Name

Size (Bytes)

Datatype

Comment

Primitive Header

13

PCB Primitive Header

Location

8

PCB Coordinate Point

Radius

4

Signed Integer (32-bit)

StartAngle

8

Double

EndAngle

8

Double

Width

4

Signed Integer (32-bit)

Unknown

4

Signed Integer (32-bit)

Only of length >= 56

Unknown

2

Signed Integer (16-bit)

Only of length >= 56

Unknown

1

Byte

Only of length >= 56

Unknown

4

Signed Integer (32-bit)

Only of length >= 56

ID 2 - Pad

Represents a footprint pad primitive. Structured as:

  1. Designator as PCB String Block

  2. Unknown as Block

  3. Unknown constant |&|0 as PCB String Block

  4. Unknown as Block

  5. First Block on information

  6. Second Block on information

First block on information:

Name

Size (Byte)

Datatype

Comment

Primitive Header

13

PCB Primitive Header

Location

8

PCB Coordinate Point

SizeTop

8

PCB Coordinate Point

SizeMiddle

8

PCB Coordinate Point

SizeBottom

8

PCB Coordinate Point

HoleSize

4

Signed Integer (32-bit)

ShapeTop

1

PCB Pad Shape

ShapeMiddle

1

PCB Pad Shape

ShapeBottom

1

PCB Pad Shape

Rotation

8

Double

IsPlated

1

Boolean

Unknown constant

1

Byte

Check Value #91 == 0?

StackMode

1

PCB Stack Mode

Unknown

1

Byte

Unknown

2 * 4

Signed Integer (32-bit)

Unknown constant

1

Byte

Check Value #102 == 4?

Unknown

3 * 4

Unsigned Integer (32-bit)

PasteMaskExpansion

4

Signed Integer (32-bit)

SolderMaskExpansion

4

Signed Integer (32-bit)

Unknown

7

Byte

PasteMaskExpansionManual

1

Byte

SolderMaskExpansionManual

1

Byte

Unknown

3

Byte

Unknown

4

Unsigned Integer (32-bit)

JumperId

2

Signed Integer (16-bit)

Unknown

2

Signed Integer (16-bit)

Second block on information:

Name

Size (Bytes)

Datatype

Comment

Pad X Size of Middle Layers

29 * 4

Signed Integer (32-bit)

Needs to be combined into array of SizeMiddleLayers

Pad Y Size of Middle Layers

29 * 4

Signed Integer (32-bit)

Needs to be combined into array of SizeMiddleLayers

SizeMiddleLayers

PCB Coordinate Point

Merge of previous fields

ShapeLayers

30 * 1

PCB Pad Shape

Unknown

1

Byte

HoleShape

1

PCB Hole Shape

HoleSlotLength

4

Signed Integer (32-bit)

HoleRotation

8

Double

Offset X from Hole Center

32 * 4

Signed Integer (32-bit)

Needs to be combined into array of OffsetsFromHoleCenter

Offset Y from Hole Center

32 * 4

Signed Integer (32-bit)

Needs to be combined into array of OffsetsFromHoleCenter

OffsetsFromHoleCenter

PCB Coordinate Point

Merge of previous fields

HasRoundedRect

1

Boolean

Shape Layers

32 * 1

Byte

Use only if HasRoundedRect, otherwise ignore

CornerRadiusPercentage

32 * 1

Byte

ID 3 - Via

Represents a footprint via primitive. Contains only one Block with the following data:

Name

Size (Bytes)

Datatype

Comment

Primitive Header

13

PCB Primitive Header

Location

8

PCB Coordinate Point

Diameter

4

Signed Integer (32-bit)

HoleSize

4

Signed Integer (32-bit)

FromLayer

1

Byte

ToLayer

1

Byte

Unknown

1

Byte

ThermalReliefAirGapWidth

4

Signed Integer (32-bit)

ThermalReliefConductors

1

Byte

Unknown

3 * 4

Signed Integer (32-bit)

SolderMaskExpansion

4

Signed Integer (32-bit)

Unknown

8 * 4

Signed Integer (32-bit)

SolderMaskExpansionManual

1

Byte

Unknown

1

Byte

Unknown

2

Signed Integer (16-bit)

Unknown

4

Signed Integer (32-bit)

DiameterStackMode

1

PCB Stack Mode

Diameter

32 * 4

Signed Integer (32-bit)

Iterate for each Layer

Unknown

2

Signed Integer (16-bit)

Unknown

4

Signed Integer (32-bit)

ID 4 - Track

Represents a footprint track primitive. Contains only one Block with the following data:

Name

Size (Bytes)

Datatype

Comment

Primitive Header

13

PCB Primitive Header

Start

8

PCB Coordinate Point

X/Y PCBCoordinate

End

8

PCB Coordinate Point

X/Y PCBCoordinate

Width

4

Signed Integer (32-bit)

Unknown

3 * 1

Byte

Unknown

1

Byte

Only of length >= 41

Unknown

4

Signed Integer (32-bit)

Only of length >= 41

Unknown

4

Signed Integer (32-bit)

Only of length >= 45

ID 5 - String

Represents a footprint string primitive. Structured as:

  1. Information as Block

  2. ASCII text as PCB String Block

If the variable WideStringsIndex is set, read WideStrings

The information are structured as follows:

Name

Size (Bytes)

Datatype

Comment

Primitive Header

13

PCB Primitive Header

Corner

8

PCB Coordinate Point

Height

4

Signed Integer (32-bit)

StrokeFont

2

PCB Text Stroke Font

Rotation

8

Double

Mirrored

1

Boolean

StrokeWidth

4

Signed Integer (32-bit)

Unknown

2

Signed Integer (16-bit)

Only of length >= 123

Unknown

1

Byte

Only of length >= 123

TextKind

1

PCB Text Kind

Only of length >= 123

FontBold

1

Boolean

Only of length >= 123

FontItalic

1

Boolean

Only of length >= 123

FontName

32

Byte

Only of length >= 123, Unknown Definition

BarcodeLRMargin

4

Signed Integer (32-bit)

Only of length >= 123

BarcodeTBMargin

4

Signed Integer (32-bit)

Only of length >= 123

Unknown

24 * 1

Byte

Only of length >= 123

FontInverted

1

Boolean

Only of length >= 123

FontInvertedBorder

4

Signed Integer (32-bit)

Only of length >= 123

WideStringsIndex

4

Signed Integer (32-bit)

Only of length >= 123

Unknown

4

Signed Integer (32-bit)

Only of length >= 123

FontInvertedRect

1

Boolean

Only of length >= 123

FontInvertedRectWidth

4

Signed Integer (32-bit)

Only of length >= 123

FontInvertedRectHeight

4

Signed Integer (32-bit)

Only of length >= 123

FontInvertedRectJustification

1

PCB Text Justification

Only of length >= 123

FontInvertedRectTextOffset

4

Signed Integer (32-bit)

Only of length >= 123

ID 6 - Fill

Represents a footprint fill primitive. Contains only one Block with the following data:

Name

Size (Bytes)

Datatype

Comment

Primitive Header

13

PCB Primitive Header

Corner1

8

PCB Coordinate Point

Corner2

8

PCB Coordinate Point

Rotation

8

Double

Unknown

4

Signed Integer (32-bit)

Only of length >= 41

Unknown

1

Byte

Only of length >= 46

Unknown

4

Signed Integer (32-bit)

Only of length >= 46

ID 11 - Region

Represents a footprint region primitive. Contains only one Block with the following data:

Name

Size (Bytes)

Datatype

Comment

Primitive Header

13

PCB Primitive Header

Unknown

4

Signed Integer (32-bit)

Unknown

1

Byte

Parameters

Parameter Collection

outlineSize

4

Unsigned Integer (32-bit)

Number of outline points

Outline X Point

8

Double

Needs to be combined into array of Outline

Outline Y Point

8

Double

Needs to be combined into array of Outline

Outline

n * 8

PCB Coordinate Point

ID 12 - Component Body

Represents a footprint component body primitive.

Schematic Records

ID 1 - Component

Set up schematic component part. Other objects, such as lines, pins and labels exist, which are “owned” by the component. The component object seems to occur before any of its child objects.

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

LibReference

String

Symbol Name

ComponentDescription

String

optional Symbol Description

PartCount

Signed Integer (32-bit)

Number of separated parts within component + 1

AllPinCount

Signed Integer (32-bit)

Number of Pins

DisplayModeCount

Signed Integer (32-bit)

Number of alternative symbols for part

ID 2 - Pin

Component pin, including line, name and number.

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter as binary type Schematic Binary Pin. Some additional parameter are stored in a seperate

and the following parameters:

Parameter

Datatype

Comment

Symbol_InnerEdge

Schematic Pin Symbol

see ID 3 - IEEE Symbol

Symbol_OuterEdge

Schematic Pin Symbol

see ID 3 - IEEE Symbol

Symbol_Inside

Schematic Pin Symbol

see ID 3 - IEEE Symbol

Symbol_Outside

Schematic Pin Symbol

see ID 3 - IEEE Symbol

Symbol_LineWdith

Schematic Line Width

Name

String

Designator

String

Description

String

FormalType

Signed Integer (32-bit)

Electrical

Schematic Pin Electrical Type

PinConglomerate

Schematic Pin Flags

PinLength; PinLength_Frac

Schematic Coordinate Point

ID 3 - IEEE Symbol

Located near some component pins (see ID 2 - Pin)

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

Symbol

Schematic Pin Symbol

IsMirrored

Boolean

LineWidth

Schematic Line Width

ScaleFactor

Signed Integer (32-bit)

ID 4 - Label

Text Note

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

Orientation

Schematic Text Orientation

Justification

Schematic Text Justification

FontId

Signed Integer (32-bit)

Text

String

IsMirrored

Boolean

IsHidden

Boolean

ID 5 - Bezier

Bezier curve for component symbol. Similar structure as ID 6 - Polyline.

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

LineStyle

Schematic Line Style

LineWidth

Schematic Line Width

IsSolid

Boolean

LocationCount

Signed Integer (32-bit)

Number of vertices

X; X_Frac; Y; Y_Frac

Schematic Coordinate Point

Transparent

Boolean

ID 6 - Polyline

Polyline for component symbol. Similar structure as ID 5 - Bezier.

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

LineStyle

Schematic Line Style

LineWidth

Schematic Line Width

IsSolid

Boolean

LocationCount

Signed Integer (32-bit)

Number of vertices

X; X_Frac; Y; Y_Frac

Schematic Coordinate Point

Transparent

Boolean

StartLineShape

Schematic Line Shape

EndLineShape

Schematic Line Shape

LineShapeSize

Signed Integer (32-bit)

ID 7 - Polygon

Polygon for component symbol. Similar structure as ID 6 - Polyline.

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

LineWidth

Schematic Line Width

IsSolid

Boolean

LocationCount

Signed Integer (32-bit)

Number of vertices

X; X_Frac; Y; Y_Frac

Schematic Coordinate Point

Transparent

Boolean

ID 8 - Ellipse

Ellipse for component symbol. Inherits Circle/Pie properties

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

Radius

Schematic Coordinate Point

one coordinate for X-direction

SecondaryRadius

Schematic Coordinate Point

one coordinate for Y-direction

IsSolid

Boolean

Linewidth

Schematic Line Width

X; X_Frac; Y; Y_Frac

Schematic Coordinate Point

Transparent

Boolean

ID 9 - Pie

Same as Arc component (ID = 12). Start Angle is 0 degree and End Angle is 360 Degree

ID 10 - Rounded Rectangle

Similar to Rectangle for component symbol. One corner radius paraneter added

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

Corner

Schematic Coordinate Point

Second Coordinate

IsSolid

Boolean

Linewidth

Schematic Line Width

Transparent

Boolean

CornerXRadius

Schematic Coordinate Point

CornerYRadius

Schematic Coordinate Point

ID 11 - Elliptical Arc

Elliptical Arc for component symbol. Inherits Arc properties.

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

Radius

Schematic Coordinate Point

one coordinate for X-direction

SecondaryRadius

Schematic Coordinate Point

one coordinate for Y-direction

StartAngle

Double

EndAngle

Double

Linewidth

Schematic Line Width

Transparent

Boolean

ID 12 - Arc

Arc for component symbol.

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

Radius

Schematic Coordinate Point

one coordinate for X-direction

StartAngle

Double

EndAngle

Double

Linewidth

Schematic Line Width

Transparent

Boolean

ID 13 - Line

Line for component symbol

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

Corner

Schematic Coordinate Point

LineStyle

Schematic Line Style

Linewidth

Schematic Line Width

ID 14 - Rectangle

Rectangle for component symbol.

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

Corner

Schematic Coordinate Point

Second Coordinate

IsSolid

Boolean

Linewidth

Schematic Line Width

Transparent

Boolean

ID 34 - Designator

Designator record for component symbol.

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

FontId

Signed Integer (32-bit)

Text

String

IsMirrored

Boolean

IsHidden

Boolean

ID 41 - Parameter

Parameter record for component symbol.

The parameters of this record are given a Schematic Record. This collection includes the default parameters Schematic Common Parameter and the following parameters:

Parameter

Datatype

Comment

FontId

Signed Integer (32-bit)

Name

String

Text

String

IsMirrored

Boolean

IsHidden

Boolean