Main Content

gerberRead

Create PCBReader object with specified Gerber and drill files

Description

example

P = gerberRead(T) creates a PCBReader object with the top layer Gerber file specified in T.

Note

The PCBReader object reads RS-274X Gerber files. It does not support RS-274D Gerber files.

P = gerberRead([],B) creates a PCBReader object with the bottom layer Gerber file specified in B.

P = gerberRead(T,B) creates a PCBReader object with the specified top and bottom layer Gerber file names.

P = gerberRead(T,B,D) creates a PCBReader object with the specified top and bottom layer Gerber files and the drill file specified in D .

Examples

collapse all

Use the gerberRead function to import a top layer Gerber file.

P = gerberRead('interdigital_Capacitor.gtl');

Extract the metal layer from the file using the shapes function.

s = shapes(P);

View the top metal layer.

show(s)

Figure contains an axes object. The axes object contains 2 objects of type patch. This object represents PEC.

Input Arguments

collapse all

Top layer Gerber file, specified as a character vector or string scalar. The file must be saved as a GTL file.

Example: gerberRead('Filetop.gtl');

Bottom layer Gerber file, specified as a character vector or string scalar. The file must be saved as a GBL file.

Example: gerberRead([],'FileBottom.gbl');

Drill file, specified a character vector or string scalar. You can specify either a DRL or a TXT file.

Example: gerberRead('Filetop.gtl','FileBottom.gbl','FileDrill.txt');

Output Arguments

collapse all

Gerber and drill files read, returned as a PCBReader object.

Limitations

Limitations of the gerberRead function while reading a gtl or gbl file are:

CommandDescriptionComments
AMAperture MacroNot supported
ABAperture BlockNot supported
SRStep and RepeatNot supported
TFFile AttributesCommand is ignored and no error is thrown
TAAperture AttributesCommand is ignored and no error is thrown
TOObject AttributesCommand is ignored and no error is thrown
TDDelete AttributesCommand is ignored and no error is thrown

Cut-ins are not supported.

Version History

Introduced in R2021b