KiCad PCB EDA Suite
|
Used to create Gerber drill files. More...
#include <gerber_placefile_writer.h>
Public Member Functions | |
PLACEFILE_GERBER_WRITER (BOARD *aPcb) | |
virtual | ~PLACEFILE_GERBER_WRITER () |
void | SetOptions (const VECTOR2I &aOffset) |
Initialize internal parameters to match drill options. | |
int | CreatePlaceFile (const wxString &aFullFilename, PCB_LAYER_ID aLayer, bool aIncludeBrdEdges) |
Create an pnp gerber file. | |
const wxString | GetPlaceFileName (const wxString &aFullBaseFilename, PCB_LAYER_ID aLayer) const |
Private Member Functions | |
double | mapRotationAngle (double aAngle, bool aIsFlipped) |
Convert a KiCad footprint orientation to gerber rotation both are in degrees. | |
void | findPads1 (std::vector< PAD * > &aPadList, FOOTPRINT *aFootprint) const |
Find the pad(s) 1 (or pad "A1") of a footprint. | |
Private Attributes | |
BOARD * | m_pcb |
PCB_LAYER_ID | m_layer |
VECTOR2I | m_offset |
bool | m_plotPad1Marker |
bool | m_plotOtherPadsMarker |
Used to create Gerber drill files.
Definition at line 39 of file gerber_placefile_writer.h.
PLACEFILE_GERBER_WRITER::PLACEFILE_GERBER_WRITER | ( | BOARD * | aPcb | ) |
Definition at line 42 of file gerber_placefile_writer.cpp.
References m_layer, m_pcb, m_plotOtherPadsMarker, and m_plotPad1Marker.
|
inlinevirtual |
Definition at line 44 of file gerber_placefile_writer.h.
int PLACEFILE_GERBER_WRITER::CreatePlaceFile | ( | const wxString & | aFullFilename, |
PCB_LAYER_ID | aLayer, | ||
bool | aIncludeBrdEdges | ||
) |
Create an pnp gerber file.
aFullFilename | is the full filename. |
aLayer | is the layer (F_Cu or B_Cu) to generate. |
aIncludeBrdEdges | use true to include board outlines. |
Definition at line 51 of file gerber_placefile_writer.cpp.
References AddGerberX2Header(), PLOTTER::AddLineToHeader(), ANGLE_0, SHAPE_LINE_CHAIN::Append(), B_Cu, GERBER_PLOTTER::ClearAllAttributes(), GBR_NETLIST_METADATA::ClearExtraData(), ConvertNotAllowedCharsInGerber(), BOARD::Drawings(), Edge_Cuts, GERBER_PLOTTER::EndPlot(), FILLED, findPads1(), GERBER_PLOTTER::FlashPadCircle(), GERBER_PLOTTER::FlashRegularPolygon(), BOARD::Footprints(), GBR_CMP_PNP_METADATA::FormatCmpPnPMetadata(), FP_EXCLUDE_FROM_POS_FILES, FP_SMD, FP_THROUGH_HOLE, From_UTF8(), GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CMP_COURTYARD, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CMP_FOOTPRINT, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CMP_POSITION, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_PAD1_POS, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_PADOTHER_POS, GBR_NETLIST_METADATA::GBR_NETINFO_CMP, GBR_NETLIST_METADATA::GBR_NETINFO_PAD, BOARD_DESIGN_SETTINGS::GetAuxOrigin(), BOX2< Vec >::GetBottom(), BOARD::GetCopperLayerCount(), BOARD::GetDesignSettings(), BOX2< Vec >::GetLeft(), BOARD::GetPlotOptions(), BOX2< Vec >::GetRight(), BOX2< Vec >::GetTop(), PCB_PLOT_PARAMS::GetUseAuxOrigin(), EDA_IU_SCALE::IU_PER_MILS, GBR_CMP_PNP_METADATA::m_Footprint, m_layer, GBR_CMP_PNP_METADATA::m_LibraryName, GBR_CMP_PNP_METADATA::m_MountType, GBR_METADATA::m_NetlistMetadata, m_offset, GBR_CMP_PNP_METADATA::m_Orientation, m_pcb, m_plotOtherPadsMarker, m_plotPad1Marker, GBR_NETLIST_METADATA::m_TryKeepPreviousAttributes, GBR_CMP_PNP_METADATA::m_Value, MALFORMED_B_COURTYARD, MALFORMED_F_COURTYARD, mapRotationAngle(), EDA_IU_SCALE::mmToIU(), GBR_CMP_PNP_METADATA::MOUNT_TYPE_SMD, GBR_CMP_PNP_METADATA::MOUNT_TYPE_TH, GBR_CMP_PNP_METADATA::MOUNT_TYPE_UNSPECIFIED, SHAPE_LINE_CHAIN::Move(), PLOTTER::OpenFile(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), pad, PCB_SHAPE_T, pcbIUScale, BRDITEMS_PLOTTER::PlotBoardGraphicItem(), BRDITEMS_PLOTTER::PlotShape(), SHAPE_LINE_CHAIN::PointCount(), SHAPE_LINE_CHAIN::Rotate(), GBR_METADATA::SetApertureAttrib(), SHAPE_LINE_CHAIN::SetClosed(), GBR_METADATA::SetCmpReference(), PLOTTER::SetCreator(), GBR_NETLIST_METADATA::SetExtraData(), GERBER_PLOTTER::SetGerberCoordinatesFormat(), BRDITEMS_PLOTTER::SetLayerSet(), GBR_METADATA::SetNetAttribType(), GBR_METADATA::SetPadName(), GBR_METADATA::SetPadPinFunction(), GERBER_PLOTTER::SetViewport(), GERBER_PLOTTER::StartPlot(), text, GERBER_PLOTTER::UseX2format(), and GERBER_PLOTTER::UseX2NetAttributes().
Referenced by DIALOG_GEN_FOOTPRINT_POSITION::CreateGerberFiles(), and PCBNEW_JOBS_HANDLER::JobExportPos().
|
private |
Find the pad(s) 1 (or pad "A1") of a footprint.
Useful to plot a marker at this (these) position(s).
aPadList | is the list to fill. |
aFootprint | is the footprint to test, |
Definition at line 344 of file gerber_placefile_writer.cpp.
References m_layer, pad, and FOOTPRINT::Pads().
Referenced by CreatePlaceFile().
const wxString PLACEFILE_GERBER_WRITER::GetPlaceFileName | ( | const wxString & | aFullBaseFilename, |
PCB_LAYER_ID | aLayer | ||
) | const |
aFullBaseFilename | = a full filename. it will be modified to add "-pnp" and set the extension |
aLayer | = layer (F_Cu or B_Cu) to generate |
Definition at line 361 of file gerber_placefile_writer.cpp.
References B_Cu, and FILEEXT::GerberFileExtension.
Referenced by DIALOG_GEN_FOOTPRINT_POSITION::CreateGerberFiles().
|
private |
Convert a KiCad footprint orientation to gerber rotation both are in degrees.
aAngle | is the Pcbnew angle in degrees |
aIsFlipped | = false for footprints on top side, true on bottom side (flipped) |
Definition at line 317 of file gerber_placefile_writer.cpp.
Referenced by CreatePlaceFile().
|
inline |
Initialize internal parameters to match drill options.
aOffset | is the drill coordinates offset. |
Definition at line 56 of file gerber_placefile_writer.h.
References m_offset.
|
private |
Definition at line 102 of file gerber_placefile_writer.h.
Referenced by CreatePlaceFile(), findPads1(), and PLACEFILE_GERBER_WRITER().
|
private |
Definition at line 103 of file gerber_placefile_writer.h.
Referenced by CreatePlaceFile(), and SetOptions().
|
private |
Definition at line 101 of file gerber_placefile_writer.h.
Referenced by CreatePlaceFile(), and PLACEFILE_GERBER_WRITER().
|
private |
Definition at line 106 of file gerber_placefile_writer.h.
Referenced by CreatePlaceFile(), and PLACEFILE_GERBER_WRITER().
|
private |
Definition at line 105 of file gerber_placefile_writer.h.
Referenced by CreatePlaceFile(), and PLACEFILE_GERBER_WRITER().