670 void Parse(
const wxString& aFileName );
730 bool readLine( std::ifstream& aStream, std::string& aLine );
const PARAMETERS & GetParameters() const
const std::vector< TEXT > & GetTexts() const
bool readLine(std::ifstream &aStream, std::string &aLine)
std::map< std::string, PART_DECAL > m_decals
std::vector< CLUSTER > m_clusters
const DESIGN_RULES & GetDesignRules() const
std::map< std::string, REUSE_BLOCK > m_reuse_blocks
const std::map< std::string, std::map< std::string, std::string > > & GetPartInstanceAttrs() const
bool m_has_font_lines
True if text/label entries include a font line.
const std::vector< KEEPOUT > & GetKeepouts() const
std::vector< KEEPOUT > m_keepouts
std::vector< POUR > m_pours
const std::vector< NET_CLASS_DEF > & GetNetClasses() const
std::vector< JUMPER_DEF > m_jumper_defs
std::vector< TEXT > m_texts
void parseSectionPARTTYPE(std::ifstream &aStream)
void parseSectionJUMPER(std::ifstream &aStream)
const std::map< std::string, PART_TYPE > & GetPartTypes() const
const std::vector< NET > & GetNets() const
void parseSectionTESTPOINT(std::ifstream &aStream)
void parseSectionLINES(std::ifstream &aStream)
const FILE_HEADER & GetFileHeader() const
std::map< std::string, VIA_DEF > m_via_defs
const std::map< std::string, PART_DECAL > & GetPartDecals() const
const std::vector< LINE > & GetLines() const
void parseSectionBOARD(std::ifstream &aStream)
const std::vector< POUR > & GetPours() const
void parseSectionVIA(std::ifstream &aStream)
std::vector< COPPER_SHAPE > m_copper_shapes
std::map< std::string, PART_TYPE > m_part_types
Per-instance attribute overrides from PART <name> {...} blocks.
const std::map< std::string, REUSE_BLOCK > & GetReuseBlocks() const
std::vector< NET > m_nets
std::vector< LINE > m_lines
void parseSectionPARTS(std::ifstream &aStream)
const std::vector< COPPER_SHAPE > & GetCopperShapes() const
std::vector< ROUTE > m_routes
const std::vector< DIFF_PAIR_DEF > & GetDiffPairs() const
std::map< std::string, std::map< std::string, std::string > > m_part_instance_attrs
bool IsBasicUnits() const
std::vector< NET_CLASS_DEF > m_net_classes
void parseSectionNETCLASS(std::ifstream &aStream)
void parseSectionMISC(std::ifstream &aStream)
void parseSectionREUSE(std::ifstream &aStream)
void parseSectionCLUSTER(std::ifstream &aStream)
void parseSectionLAYERDEFS(std::ifstream &aStream)
std::vector< LAYER_INFO > GetLayerInfos() const
Get layer information for the layer mapping dialog.
const std::vector< ROUTE > & GetRoutes() const
const std::vector< DIMENSION > & GetDimensions() const
DESIGN_RULES m_design_rules
const std::vector< JUMPER_DEF > & GetJumperDefs() const
void parseSectionNETS(std::ifstream &aStream)
const std::map< std::string, VIA_DEF > & GetViaDefs() const
void Parse(const wxString &aFileName)
FILE_HEADER m_file_header
std::vector< GRAPHIC_LINE > m_graphic_lines
std::vector< DIMENSION > m_dimensions
std::vector< DIFF_PAIR_DEF > m_diff_pairs
std::string m_current_section
void parseSectionPCB(std::ifstream &aStream)
void clampDesignRuleSentinels()
void parseSectionTEXT(std::ifstream &aStream)
std::vector< POLYLINE > m_board_outlines
std::vector< PART > m_parts
const std::vector< GRAPHIC_LINE > & GetGraphicLines() const
int parseMajorVersion() const
Parse the major version number from the file header version string.
std::map< int, LAYER_INFO > m_layer_defs
Keyed by layer number.
void parseSectionROUTES(std::ifstream &aStream)
const std::vector< POLYLINE > & GetBoardOutlines() const
std::vector< TEST_POINT > m_test_points
std::optional< std::string > m_pushed_line
const std::vector< CLUSTER > & GetClusters() const
void pushBackLine(const std::string &aLine)
void parseLine(const std::string &aLine)
const std::vector< PART > & GetParts() const
void parseSectionDIFFPAIR(std::ifstream &aStream)
const std::vector< TEST_POINT > & GetTestPoints() const
void parseSectionPOUR(std::ifstream &aStream)
void parseSectionPARTDECAL(std::ifstream &aStream)
@ BURIED
Inner layers only.
@ THROUGH
Spans all copper layers.
@ BLIND
Surface to inner layer.
@ MICROVIA
Single-layer blind, typically HDI.
@ OPEN_COLLECTOR
C, open collector or or-tieable source.
bool IsAntiPadRow(const PAD_STACK_LAYER &aLayer)
RA and SA rows carry a plane's anti-pad clearance rather than the pad's own copper.
bool IsThermalReliefPadRow(const PAD_STACK_LAYER &aLayer)
RT and ST rows carry a plane's thermal-relief spoke pattern rather than the pad's own copper.
@ LIB_PCB_DECAL
Library footprints.
@ LIB_LINE
Library line items (drafting)
bool IsCopperPadRow(const PAD_STACK_LAYER &aLayer)
True when the row describes pad or via copper.
ARC arc
Only valid when is_arc is true.
ARC_POINT(double aX, double aY, const ARC &aArc)
ARC_POINT(double aX, double aY)
Arc as center, radius and angles.
std::vector< std::string > segment_refs
std::vector< std::string > net_names
Standalone copper area from the LINES section (type=COPPER), not part of a pour.
std::vector< ARC_POINT > outline
bool is_cutout
COPCUT, COPCCO.
std::string net_name
Empty if unconnected.
bool filled
COPCLS, COPCIR.
double width
For open polylines.
std::string restrictions
KPTCLS/KPTCIR keepout codes R,C,V,T,A.
bool is_tag_close
Closing TAG, level 0.
std::vector< ARC_POINT > points
int pinnum
Copper-piece pin association, -1 = none.
std::string type
CLOSED, OPEN, CIRCLE, COPCLS, TAG, etc.
bool is_tag_open
Opening TAG, level 1.
std::vector< PAD_STACK_LAYER > stack
double silk_clearance
SILKCLEAR.
double default_track_width
DEFAULTTRACKWID.
double default_via_drill
DEFAULTVIADRILL.
double min_track_width
MINTRACKWID.
double min_via_size
MINVIASIZE.
double min_via_drill
MINVIADRILL.
double min_clearance
MINCLEAR.
double default_via_size
DEFAULTVIASIZE.
double copper_edge_clearance
OUTLINE_TO_*.
double default_clearance
DEFAULTCLEAR.
double hole_to_hole
HOLEHOLE.
double mask_clearance
MASKCLEAR.
double crossbar_pos
Y for horizontal, X for vertical.
std::vector< POINT > points
Measurement endpoints.
int gate_swap_type
0 = not swappable
std::vector< GATE_PIN > pins
int swap_type
0 = not swappable
Non-electrical drawing item from the LINES section (type=LINES).
std::vector< ARC_POINT > points
std::string reuse_instance
std::string padstack
Start pin, or both if end_padstack empty.
std::string end_padstack
End pin, optional.
std::vector< ATTRIBUTE > labels
bool is_start
S = start, E = end.
std::vector< ARC_POINT > outline
bool no_vias
V restriction.
bool no_components
P restriction.
bool no_copper
C restriction.
bool no_accordion
A restriction.
bool height_restriction
H restriction.
bool no_traces
R restriction.
std::vector< int > layers
Empty = all.
bool no_test_points
T restriction.
PADS_LAYER_FUNCTION layer_type
bool required
Layer must be mapped.
int number
PADS layer number.
double layer_thickness
Dielectric, BASIC units.
double dielectric_constant
Er.
double copper_thickness
Copper foil, BASIC units.
int routing_direction
0=horizontal, 1=vertical, 2=no preference
double via_drill
VIADRILL.
double clearance
CLEARANCE.
std::vector< std::string > net_names
double track_width
TRACKWIDTH.
double diff_pair_width
DIFFPAIRWIDTH.
double diff_pair_gap
DIFFPAIRGAP.
std::string reuse_instance
std::vector< NET_PIN > pins
std::vector< std::string > component_refs
Section-24 endpoints whose terminal is unresolved.
bool chamfered
Negative corner value in PADS.
std::string shape
R, S, A, O, OF, RF, RT, ST, RA, SA, RC, OC.
double thermal_outer_diameter
Thermal or void in plane.
double slot_orientation
0-179.999 degrees
double thermal_spoke_orientation
First spoke.
double inner_diameter
Annular ring, 0 = solid.
double thermal_spoke_width
double finger_offset
Along orientation axis.
double sizeB
Height for rectangles/ovals.
double slot_offset
From electrical center.
double corner_radius
Always positive.
double sizeA
Diameter or width.
double drill_oversize
DRLOVERSIZE, plated holes.
double thermal_line_width
THERLINEWID, THT.
double thermal_smd_width
THERSMDWID, SMD.
double user_grid
USERGRID.
double thermal_min_clearance
STMINCLEAR.
int thermal_flags
THERFLAGS.
std::string default_signal_via
VIAPSHVIA.
int thermal_min_spokes
STMINSPOKES.
std::map< int, std::pair< int, int > > drill_spans
std::vector< DECAL_ITEM > items
std::vector< TERMINAL > terminals
std::vector< ATTRIBUTE > attributes
std::map< int, std::vector< PAD_STACK_LAYER > > pad_stacks
std::map< std::string, std::string > attributes
From {...} block.
std::map< std::string, int > pin_pad_map
Pin name to pad stack index.
std::vector< GATE_DEF > gates
std::vector< SIGPIN > signal_pins
std::string part_type
Used with PARTTYPE@DECAL syntax.
bool explicit_decal
Decal given explicitly with @ syntax.
std::string reuse_instance
std::string decal
Primary decal (first in colon-separated list)
int alt_decal_index
ALT placement field, -1 = use primary decal.
std::vector< ATTRIBUTE > attributes
std::string reuse_part
Original part ref des inside the reuse block.
std::vector< std::string > alternate_decals
Remaining decals after ':' splits.
A polyline that may contain arc segments, used for board outlines and graphics.
std::vector< ARC_POINT > points
bool is_cutout
POCUT piece.
std::string owner_pour
Parent pour, 7th header field.
double thermal_spoke_width
std::vector< ARC_POINT > points
THERMAL_TYPE thermal_type
A reuse block definition containing parts and routes that can be instantiated.
std::vector< REUSE_NET > nets
std::string net_naming
Default scheme.
std::string part_naming
Default scheme.
std::vector< std::string > part_names
std::vector< REUSE_INSTANCE > instances
Placements of this block.
std::string instance_name
std::string part_naming
May be multi-word like "PREFIX pref".
std::string net_naming
May be multi-word like "SUFFIX suf".
std::string name
Original net name from reuse definition.
bool merge
Merge nets vs rename.
std::vector< TEARDROP > teardrops
std::vector< TRACK > tracks
std::vector< NET_PIN > pins
From pin pair lines.
std::vector< JUMPER_MARKER > jumpers
double width
Track width for connections.
std::string signal_name
e.g. VCC, GND
std::string type
VIA or PIN.
int side
0=through, 1=top, 2=bottom
std::string vjust
UP, CENTER, DOWN.
std::string reuse_instance
int ndim
Auto-dimensioning text number, 0 if unused.
std::string hjust
LEFT, CENTER, RIGHT.
std::string font_style
Regular, Bold, Italic, Underline, or combinations.
std::vector< ARC_POINT > points
bool has_mask_front
Stack includes top soldermask, layer 25.
int drill_start
Drill span from file, for blind/buried.
int start_layer
First PADS layer in span.
int end_layer
Last PADS layer in span.
std::vector< PAD_STACK_LAYER > stack
bool has_mask_back
Stack includes bottom soldermask, layer 28.
std::vector< PAD_STACK_LAYER > stack