features module#

Soldermask, legend and paste files.

The queried shapes are the content directly: the transformer layer already synthesizes mask openings from untented vias and pad soldermask definitions, so there is no board-minus-openings subtraction anywhere.

A feature’s side is relative to its placement - Bottom means the opposite side from where the owning landpattern sits - so the side comes off the composed transform like every other side question here.

Soldermask files image the openings and are therefore TF.FilePolarity, Negative with their objects drawn dark. Legend and paste are positive.

MATERIAL = ('.AperFunction', ('Material',))#

5.6.10’s function for openings on the extra layers. The reference export omits it, so it is not a guide here; the spec is.

LEGEND_TEXT = ('.AperFunction', ('NonMaterial',))#

drawing elements rather than physical material.

Stroked legend text is a drawing element on a layer that is otherwise material, which is exactly the case the value exists for.

Type:

5.6.10

class Features(files=dict())[source]#

Bases: object

The mask, legend and paste files a design actually needs.

Files are created only where content exists, which is the same content-driven policy the ODB++ exporter uses: a design with no paste features gets no paste file rather than an empty one.

Parameters:

files (dict[tuple[str, Side], GerberFile])

files: dict[tuple[str, Side], GerberFile]#
ordered()[source]#
Return type:

list[GerberFile]

build(design, components)[source]#

Walk the surface features into per-side files.

Parameters:
  • components (ComponentIndex) – the component index, for the TO.C a mask opening, paste deposit or legend mark carries when it belongs to a component. CAM uses it, and it costs nothing once the index that the component layers need already exists.

  • design (RuntimeDesign)

Return type:

Features