tEDAx - PCB layer

purpose

Focus is describing a single PCB drawing layer in a portable way.

drawing primitives

line

A line is a round end cap line of a specified line width and x1;y1 x2;y2 endpoint coordinates. The line is emulated to be drawn with a round aperture pen with diameter of the line width. Thus the endpoint specifies the end of the centerline - the line extends half-width beyond the endpoint (as if a circle with diameter of the line width was placed on the endpoint).

Special case: if the endpoints of a line are the same, the result is a regular filled circle with a diameter of the line width.

The clearance is provided as a hint.

arc

An arc is draw the same way as a line. An arc is specified by its center cx;cy, radius, a start angle and a delta angle. As a hint, to avoid broken traces because of rounding errors the end coordinates are also stored. Software writing tEDAx files shall write the endpoint coords. Software reading tEDAx files may use the endpoints to tune the other parameters (or may ignore the endpoint fields).

Only circular arcs are supported. Radius can not be negative. Start angle is between [0..360), delta angle is between [-360..+360]. Angles are specified as real numbers in degrees.

Special cases: if delta angle is 0 or radius is 0, the arc is a filled circle (at the matching endpoints) with a diameter of the arc width.

The clearance is provided as a hint.

polygon

Due to different polygon models in different cads, a tEDAx polygon is always specified 'as rendered', with the clearance cutouts ironed in. There are no user drawn polygon holes: if a larger logical polygon ends up having holes, it is split up and stored as multiple, hole-free tEDAx polygon. There are no islands either: if a logical polygon has fallen apart into multiple detached islands, they are each stored as a separate, independent tEDAx polygon. There are no negative copper layers and no planes: every layer is positive. A "power plane" is just a large polygon drawn on a "normal" layer.

text

Text objects are rendered with different font and style in different CAD software. To make sure text objects appear approximately properly, tEDAx specifies the text string and the bounding box within the text is to be drawn. The software loading a tEDAx layer is responsible for choosing internal text parameters so that the given text string renders within the bounding box. If the rendered text is smaller than the bounding box, it should be centered (in all directions).

As a hint, the text object also contains a relative size field. Software loading tEDAx layers can use this value mainly to track which text objects should be rendered at the same size or how two text objects compare in size. However, size considerations should never override bounding box considerations. Relative size is a numeric value of unspecified units (to be interpreted only in text vs. text comparisons).

Only 7 bit ASCII characters are supported in text strings.

The text rotation is given in degrees. For portability, the only permitted values are 0, 90, 180 and 270. Value 0 is the neutral position, written left-to-right; 90 is 90 degree rotated in CCW. The bounding box specified with the text is the rotated bounding box.

The clearance is provided as a hint.

global objects: footprints

In some cases, e.g. when loading a board, the final content of a layer is a combination of layer local objects (specified by the current document, the tEDAx layer block) and global objects such as footprints.

Since footprints are not layer objects but global objects, they have no lines within the layer block. They can have implicit effect on layers, e.g. when the board is rendered.

Some layers of a layer stackup, such as umech, pmech and vcut, may affect other layers, because their location is 'all'. This does not mean a copper layer gets more copper objects because of a vcut layer, but does mean that some copper is affected (e.g. cut through) by an object on another layer.

Any kind of hole or cut is a global. Thus there is no explicit hole object on the layer level. Instead a hole is either expressed as a 0-length line on a mech or cut layer or as a hole in a footprint.

There are no padstacks, but they can be emulated by using footprints.

Layer block, drawing primitives

A layer consists of unordered drawing primitives with a tEDAx layer block. The layer block is called layer and has the version v1. The unique identifier is the layer's name. The drawing primitives are:

command parameter names explanation
line x1 y1 x2 y2 width clear Round-cap line segment between two points.
arc cx cy rad startang endang width clear sx sy ex ey Round-cap arc segment; endpoint hints are: sx;sy for startang and ex;ey for endang
text x1 y1 x2 y2 relsiz rot clear textstring A text rendered in the bounding box specified by coords. The text string must be a single field.
poly id ox oy Instantiate (paste) a polyline identified by its id. Poly coordinates are offset with ox;oy on instantiation. The actual polygon is specified in a polygon block. The instantiated polygon is always filled.

Examples

The following png, rendered at 1800 DPI, is specified by the tEDAx blocks below:

layer example with a polygon, a line, an arc and a text object

tEDAx v1
begin polyline v1 pllay_3_8_0
 v 0.635 1.905
 v 2.54 1.905
 v 2.54 5.715
 v 0.635 5.715
end polyline
begin layer v1 top_copper
 line 1.905 1.905 11.43 1.905 0.254 0.0
 arc 11.43 3.81 1.905 90.000000 180.000000 0.254 0.508 11.43 5.715 11.43 1.905
 text 3.048 2.7432 12.712712 4.318001 130 0.000000 0.000001 hello\ world
 poly pllay_3_8_0 0 0
end layer