Summary
gerbv currently skips Gerber X2 attributes (%TF%, %TA%, %TO%, %TD%) with a NOTE-level message. These are metadata extensions to RS-274X that don't affect rendering but carry useful information about what features represent.
X2 Attribute Types
- %TF (File) — file-level metadata: generation date, project name, creator tool, layer function (e.g. copper top, solder mask bottom)
- %TA (Aperture) — aperture properties: function (via pad, SMD pad, conductor), drill tolerance
- %TO (Object) — object context: component refdes, pin number, net name
- %TD (Delete) — clear a previously set attribute
Potential Uses
Parsing these would enable features like:
- Display component refdes/pin/net on hover or click
- Automatic layer identification (copper, mask, silk, paste) from
%TF.FileFunction
- Filter or highlight by net name
- BOM cross-referencing from
%TO.C (component) attributes
- Export netlist or component placement data extracted from Gerber X2 metadata
Current Behavior
Attributes are detected and skipped gracefully — geometry renders correctly since X2 is backwards-compatible with RS-274X. The skip messages are at NOTE level, which is appropriate.
Scope
This would involve:
- Data model for attribute state (file attributes are global, aperture/object attributes follow a stack-like set/delete lifecycle)
- Parser updates in
gerber.c to store rather than skip the attributes
- UI to surface the information (tooltips, info panel, layer properties)
Opening for discussion — interested to hear if others would find this useful and what subset of X2 would be most valuable to start with.
Summary
gerbv currently skips Gerber X2 attributes (
%TF%,%TA%,%TO%,%TD%) with a NOTE-level message. These are metadata extensions to RS-274X that don't affect rendering but carry useful information about what features represent.X2 Attribute Types
Potential Uses
Parsing these would enable features like:
%TF.FileFunction%TO.C(component) attributesCurrent Behavior
Attributes are detected and skipped gracefully — geometry renders correctly since X2 is backwards-compatible with RS-274X. The skip messages are at NOTE level, which is appropriate.
Scope
This would involve:
gerber.cto store rather than skip the attributesOpening for discussion — interested to hear if others would find this useful and what subset of X2 would be most valuable to start with.