Main Content

gerberWrite

Generate Gerber files

Description

gerberWrite(designObject) creates Gerber-format files based on multilayer 2.5D design from PCB component stack up.

gerberWrite(designObject,writer) creates a Gerber-format files based on multilayer 2.5D design from PCB component using specified PCB writer services.

gerberWrite(designObject,writer,rfConnector) creates Gerber-format files based on multilayer 2.5D design from PCB component using a writer object and an RF connector object.

example

[a,g] = gerberWrite(designObject,writer,rfConnector) returns the PCBWriter object , a and the path to the location of the Gerber files.

Examples

collapse all

Create a default PCB component.

 p = pcbComponent;

Use 2 Cinch SMA connectors and the Mayhew Labs PCB viewer.

 W = PCBServices.MayhewWriter;
 C1 = PCBConnectors.SMA_Cinch;
 C2 = PCBConnectors.SMA_Cinch;

Generate the Gerber-format files.

[A,g] = gerberWrite(p,W,{C1,C2})
A = 
  PCBWriter with properties:

                        Design: [1x1 struct]
                        Writer: [1x1 PCBServices.MayhewWriter]
                     Connector: {1x2 cell}
           UseDefaultConnector: 0
    ComponentBoundaryLineWidth: 8
         ComponentNameFontSize: []
            DesignInfoFontSize: []
                          Font: 'Arial'
                     PCBMargin: 5.0000e-04
                    Soldermask: 'both'
                   Solderpaste: 1

   See info for details
g = 
'/tmp/Bdoc22a_1891349_63565/tp2aa4529a/rfpcb-ex06685827/untitled'

Input Arguments

collapse all

PCB design geometry file, specified as a PCBWriter object.

Example: a = PCBWriter(p1) creates a PCBWriter object, a. gerberWrite(a) creates a Gerber file using a.

RF connector type, specified as a PCBConnectors object.

Example: c = PCBConnectors.SMA_Cinch; gerberWrite(p1,c) uses SMA_Cinch RF connector at the feedpoint.

PCB service, specified as a PCBServices object.

Example: s = PCBServices.MayhewWriter; gerberWrite(p1,s) uses Mayhew Labs PCB service to create and view the PCB design.

Output Arguments

collapse all

PCB writer that generated the Gerber files, returned as a PCBWriter object.

Path to generated Gerber files folder, returned as a character vector.

Version History

Introduced in R2021b