KiCad PCB EDA Suite
Loading...
Searching...
No Matches
generated_table_schema.cpp File Reference
#include <board_tables/generated_table_schema.h>
#include <algorithm>
#include <set>
#include <base_units.h>
#include <layer_ids.h>
#include <wx/translation.h>

Go to the source code of this file.

Functions

LSET DocumentationLayers ()
 Layers a drill chart or drill map may live on.
 
wxString FormatGeneratedTableLength (int aValue, GENERATED_TABLE_UNITS aUnits, int aPrecision)
 Render a length the way a generated table's cell shows it.
 
const char * GeneratedTableUnitsToken (GENERATED_TABLE_UNITS aUnits)
 Stable file tokens, independent of enum ordering so inserting a value later cannot change what an existing board file means.
 
bool GeneratedTableUnitsFromToken (const wxString &aToken, GENERATED_TABLE_UNITS &aUnits)
 
const char * GeneratedTableAlignToken (GENERATED_TABLE_ALIGN aAlign)
 
bool GeneratedTableAlignFromToken (const wxString &aToken, GENERATED_TABLE_ALIGN &aAlign)
 

Function Documentation

◆ DocumentationLayers()

LSET DocumentationLayers ( )

Layers a drill chart or drill map may live on.

Manufacturing layers would be corrupted.

Excludes copper, silkscreen, mask, paste, adhesive, Edge.Cuts, Margin, courtyard and rescue layers. Chart artwork and hole symbols must not alter fabrication outputs or DRC constraints.

Definition at line 126 of file generated_table_schema.cpp.

References LSET::AllNonCuMask(), B_CrtYd, Edge_Cuts, F_CrtYd, Margin, Rescue, and BASE_SET::reset().

Referenced by PCB_DRILL_MAP::Deserialize(), DIALOG_GENERATED_TABLE_PROPERTIES::DIALOG_GENERATED_TABLE_PROPERTIES(), PCB_IO_KICAD_SEXPR_PARSER::parseGeneratedTable(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_DRILL_MAP(), PCB_CONTROL::pickDocumentationLayer(), PCB_CONTROL::PlaceDrillMap(), PCB_CONTROL::placeGeneratedTable(), and UnpackGeneratedTable().

◆ FormatGeneratedTableLength()

wxString FormatGeneratedTableLength ( int aValue,
GENERATED_TABLE_UNITS aUnits,
int aPrecision )

Render a length the way a generated table's cell shows it.

INCH and MILS both derive their decimal count from aPrecision, so a table can switch units without needing a second precision setting.

Definition at line 142 of file generated_table_schema.cpp.

References INCH, MILS, MM, and pcbIUScale.

Referenced by PCB_DRILL_CHART::generate().

◆ GeneratedTableAlignFromToken()

bool GeneratedTableAlignFromToken ( const wxString & aToken,
GENERATED_TABLE_ALIGN & aAlign )

◆ GeneratedTableAlignToken()

const char * GeneratedTableAlignToken ( GENERATED_TABLE_ALIGN aAlign)

◆ GeneratedTableUnitsFromToken()

bool GeneratedTableUnitsFromToken ( const wxString & aToken,
GENERATED_TABLE_UNITS & aUnits )

◆ GeneratedTableUnitsToken()

const char * GeneratedTableUnitsToken ( GENERATED_TABLE_UNITS aUnits)

Stable file tokens, independent of enum ordering so inserting a value later cannot change what an existing board file means.

Definition at line 214 of file generated_table_schema.cpp.

Referenced by PCB_IO_KICAD_SEXPR::format(), and DRILL_CHART_TEMPLATE::SaveToFile().