KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pads_parser.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2025 KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#include <string>
23#include <vector>
24#include <map>
25#include <optional>
26#include <wx/string.h>
27#include <wx/gdicmn.h>
28#include <math/vector2d.h>
29
30namespace PADS_IO
31{
32
33enum class UNIT_TYPE
34{
38};
39
40struct POINT
41{
42 double x;
43 double y;
44};
45
49struct ARC
50{
51 double cx;
52 double cy;
53 double radius;
56};
57
64{
65 double x;
66 double y;
67 bool is_arc;
69
71 x( 0 ),
72 y( 0 ),
73 is_arc( false ),
74 arc{ 0, 0, 0, 0, 0 }
75 {
76 }
77 ARC_POINT( double aX, double aY ) :
78 x( aX ),
79 y( aY ),
80 is_arc( false ),
81 arc{ 0, 0, 0, 0, 0 }
82 {
83 }
84 ARC_POINT( double aX, double aY, const ARC& aArc ) :
85 x( aX ),
86 y( aY ),
87 is_arc( true ),
88 arc( aArc )
89 {
90 }
91};
92
101
103{
104 std::string product;
105 std::string version;
106 std::string units;
107 std::string mode;
108 std::string encoding;
110};
111
113{
115 int layer_count = 2;
116 POINT origin = {0, 0};
117 double user_grid = 0.0;
118
119 double thermal_line_width = 30.0;
120 double thermal_smd_width = 20.0;
124
125 double drill_oversize = 0.0;
126
127 std::string default_signal_via;
128};
129
130enum class DESIGN_RULE_FIELD : unsigned
131{
132 MIN_CLEARANCE = 1u << 0,
136 MIN_VIA_SIZE = 1u << 4,
138 MIN_VIA_DRILL = 1u << 6,
140 HOLE_TO_HOLE = 1u << 8,
141 SILK_CLEARANCE = 1u << 9,
142 MASK_CLEARANCE = 1u << 10,
144};
145
151{
152 double min_clearance = 8.0;
153 double default_clearance = 10.0;
154 double min_track_width = 6.0;
155 double default_track_width = 10.0;
156 double min_via_size = 20.0;
157 double default_via_size = 40.0;
158 double min_via_drill = 10.0;
159 double default_via_drill = 20.0;
160 double hole_to_hole = 10.0;
161 double silk_clearance = 5.0;
162 double mask_clearance = 3.0;
163 double copper_edge_clearance = 10.0;
164
165 unsigned specified = 0;
166
167 void MarkSpecified( DESIGN_RULE_FIELD aField ) { specified |= static_cast<unsigned>( aField ); }
168
169 bool IsSpecified( DESIGN_RULE_FIELD aField ) const { return ( specified & static_cast<unsigned>( aField ) ) != 0; }
170};
171
173{
174 // Line 1
175 bool visible = true;
176 double x = 0.0;
177 double y = 0.0;
178 double orientation = 0.0;
179 int level = 0;
180 double height = 0.0;
181 double width = 0.0;
182 bool mirrored = false;
183 std::string hjust;
184 std::string vjust;
185 bool right_reading = false;
186
187 // Line 2
188 std::string font_info;
189
190 // Line 3
191 std::string name; // "Ref.Des.", "Part Type", "VALUE", etc.
192};
193
194struct PART
195{
196 std::string name;
197 std::string decal;
198 std::string part_type;
199 std::vector<std::string> alternate_decals;
201 std::string value;
202 std::string units;
204 double rotation = 0.0;
205 bool bottom_layer = false;
206 bool glued = false;
207 bool explicit_decal = false;
208 std::vector<ATTRIBUTE> attributes;
209 std::string reuse_instance;
210 std::string reuse_part;
211};
212
214{
215 std::string ref_des;
216 std::string pin_name;
217 std::string reuse_instance;
218 std::string reuse_signal;
219};
220
221struct NET
222{
223 std::string name;
224 std::vector<NET_PIN> pins;
225 std::vector<std::string> component_refs;
226};
227
229{
230 std::string name;
231 double clearance = 0.0;
232 double track_width = 0.0;
233 double via_size = 0.0;
234 double via_drill = 0.0;
235 double diff_pair_gap = 0.0;
236 double diff_pair_width = 0.0;
237 std::vector<std::string> net_names;
238};
239
241{
242 std::string name;
243 std::string positive_net;
244 std::string negative_net;
245 double gap = 0.0;
246 double width = 0.0;
247};
248
250{
251 double pad_width = 0.0;
252 double pad_length = 0.0;
253 int pad_flags = 0;
254 double net_width = 0.0;
255 double net_length = 0.0;
256 int net_flags = 0;
257 bool has_pad_teardrop = false;
258 bool has_net_teardrop = false;
259};
260
262{
263 std::string name;
264 bool is_start = false;
265 double x = 0.0;
266 double y = 0.0;
267};
268
270{
271 std::string name;
272 bool via_enabled = false;
273 bool wirebond = false;
274 bool display_silk = false;
275 bool glued = false;
276 double min_length = 0.0;
277 double max_length = 0.0;
278 double length_increment = 0.0;
279 std::string padstack;
280 std::string end_padstack;
281 std::vector<ATTRIBUTE> labels;
282};
283
284struct TRACK
285{
286 int layer = 0;
287 double width = 0.0;
288 std::vector<ARC_POINT> points;
289};
290
292{
293 int layer = 0;
294 std::string shape;
295 double sizeA = 0.0;
296 double sizeB = 0.0;
297 double offsetX = 0.0;
298 double offsetY = 0.0;
299 double rotation = 0.0;
300 double drill = 0.0;
301 bool plated = true;
302 double inner_diameter = 0.0;
303 double corner_radius = 0.0;
304 bool chamfered = false;
305 double finger_offset = 0.0;
306
307 double slot_orientation = 0.0;
308 double slot_length = 0.0;
309 double slot_offset = 0.0;
310
311 // RT/ST shapes
316};
317
321bool IsThermalReliefPadRow( const PAD_STACK_LAYER& aLayer );
322
326bool IsAntiPadRow( const PAD_STACK_LAYER& aLayer );
327
332bool IsCopperPadRow( const PAD_STACK_LAYER& aLayer );
333
341
343{
344 std::string name;
345 double drill = 0.0;
346 double size = 0.0;
347 std::vector<PAD_STACK_LAYER> stack;
348 int start_layer = 0;
349 int end_layer = 0;
351 int drill_start = 0;
352 int drill_end = 0;
353 bool has_mask_front = false;
354 bool has_mask_back = false;
355};
356
357struct VIA
358{
359 std::string name;
361 std::vector<PAD_STACK_LAYER> stack;
362 int start_layer = 0;
363 int end_layer = 0;
364};
365
372
373enum class THERMAL_TYPE
374{
378};
379
380struct POUR
381{
382 std::string name;
383 std::string net_name;
384 int layer = 0;
385 int priority = 0;
386 double width = 0.0;
387 std::vector<ARC_POINT> points;
388 bool is_cutout = false;
389 std::string owner_pour;
391 double hatch_grid = 0.0;
392 double hatch_width = 0.0;
393
397 double thermal_gap = 0.0;
398};
399
401{
402 std::string type;
403 int layer = 0;
404 double width = 0.0;
405 std::vector<ARC_POINT> points;
406 int pinnum = -1;
407 std::string restrictions;
408 bool is_tag_open = false;
409 bool is_tag_close = false;
410};
411
413{
414 int pin_number; // 0 for default
416 std::string name; // e.g. "1", "A1"
417 std::vector<PAD_STACK_LAYER> stack;
418 bool custom_stack = false;
419};
420
421
423{
424 double x;
425 double y;
426 std::string name; // Pin number
427};
428
430{
431 std::string name;
432 std::string units; // M, I, U, etc.
433 std::vector<DECAL_ITEM> items;
434 std::vector<ATTRIBUTE> attributes;
435 std::vector<TERMINAL> terminals;
436 std::map<int, std::vector<PAD_STACK_LAYER>> pad_stacks;
437 std::map<int, std::pair<int, int>> drill_spans;
438};
439
440struct SIGPIN
441{
442 std::string pin_number;
443 double width = 0.0;
444 std::string signal_name;
445};
446
459
467
469{
471 std::vector<GATE_PIN> pins;
472};
473
475{
476 std::string name;
477 std::string decal_name;
478 std::map<std::string, int> pin_pad_map;
479 std::map<std::string, std::string> attributes;
480 std::vector<SIGPIN> signal_pins;
481 std::vector<GATE_DEF> gates;
482};
483
484struct ROUTE
485{
486 std::string net_name;
487 std::vector<TRACK> tracks;
488 std::vector<VIA> vias;
489 std::vector<NET_PIN> pins;
490 std::vector<TEARDROP> teardrops;
491 std::vector<JUMPER_MARKER> jumpers;
492};
493
494struct TEXT
495{
496 std::string content;
498 double height = 0.0;
499 double width = 0.0;
500 int layer = 0;
501 double rotation = 0.0;
502 bool mirrored = false;
503 std::string hjust;
504 std::string vjust;
505 int ndim = 0;
506 std::string reuse_instance;
507 std::string font_style;
508 double font_height = 0.0;
509 double font_descent = 0.0;
510 std::string font_face;
511};
512
513struct LINE
514{
515 int layer;
516 double width;
519};
520
529
534{
535 std::string name;
536 int layer = 0;
537 double width = 0.0;
539 bool closed = false;
540 bool filled = false;
541 std::vector<ARC_POINT> points;
542 std::string reuse_instance;
543};
544
549{
550 int layer;
551 double width;
552 bool closed;
553 std::vector<ARC_POINT> points;
554};
555
557{
558 // Base for board outline, etc.
559};
560
565{
566 std::string name;
567 std::string net_name;
568 int layer = 0;
569 double width = 0.0;
570 bool filled = false;
571 bool is_cutout = false;
572 std::vector<ARC_POINT> outline;
573};
574
589
602
604{
605 bool merge = false;
606 std::string name;
607};
608
610{
611 std::string instance_name;
612 std::string part_naming;
613 std::string net_naming;
615 double rotation = 0.0;
616 bool glued = false;
617};
618
623{
624 std::string name;
625 long timestamp = 0;
626 std::string part_naming;
627 std::string net_naming;
628 std::vector<std::string> part_names;
629 std::vector<REUSE_NET> nets;
630 std::vector<REUSE_INSTANCE> instances;
631};
632
634{
635 std::string name;
636 int id = 0;
637 std::vector<std::string> net_names;
638 std::vector<std::string> segment_refs;
639};
640
642{
643 std::string type;
644 double x = 0.0;
645 double y = 0.0;
646 int side = 0;
647 std::string net_name;
648 std::string symbol_name;
649};
650
652{
653 std::string name;
654 double x = 0.0;
655 double y = 0.0;
656 double crossbar_pos = 0.0;
657 bool is_horizontal = true;
658 int layer = 0;
659 std::vector<POINT> points;
660 std::string text;
661 double text_height = 0.0;
662 double text_width = 0.0;
663 double rotation = 0.0;
664};
665
674
676{
678 std::vector<ARC_POINT> outline;
679 std::vector<int> layers;
680 bool no_traces = true;
681 bool no_vias = true;
682 bool no_copper = true;
683 bool no_components = false;
684 bool height_restriction = false;
685 double max_height = 0.0;
686 bool no_test_points = false;
687 bool no_accordion = false;
688};
689
691{
692public:
693 PARSER();
694 ~PARSER();
695
696 void Parse( const wxString& aFileName );
697
698 const PARAMETERS& GetParameters() const { return m_parameters; }
699 const std::vector<PART>& GetParts() const { return m_parts; }
700 const std::vector<NET>& GetNets() const { return m_nets; }
701 const std::vector<ROUTE>& GetRoutes() const { return m_routes; }
702 const std::vector<TEXT>& GetTexts() const { return m_texts; }
703 const std::vector<LINE>& GetLines() const { return m_lines; }
704 const std::vector<POLYLINE>& GetBoardOutlines() const { return m_board_outlines; }
705 const std::vector<POUR>& GetPours() const { return m_pours; }
706 const std::map<std::string, VIA_DEF>& GetViaDefs() const { return m_via_defs; }
707 const std::map<std::string, PART_DECAL>& GetPartDecals() const { return m_decals; }
708 const std::map<std::string, PART_TYPE>& GetPartTypes() const { return m_part_types; }
709 const std::map<std::string, std::map<std::string, std::string>>& GetPartInstanceAttrs() const
710 {
712 }
713 const std::map<std::string, REUSE_BLOCK>& GetReuseBlocks() const { return m_reuse_blocks; }
714 const std::vector<CLUSTER>& GetClusters() const { return m_clusters; }
715 const std::vector<TEST_POINT>& GetTestPoints() const { return m_test_points; }
716 const std::vector<DIMENSION>& GetDimensions() const { return m_dimensions; }
717 const DESIGN_RULES& GetDesignRules() const { return m_design_rules; }
718 const std::vector<NET_CLASS_DEF>& GetNetClasses() const { return m_net_classes; }
719 const std::vector<DIFF_PAIR_DEF>& GetDiffPairs() const { return m_diff_pairs; }
720 const std::vector<KEEPOUT>& GetKeepouts() const { return m_keepouts; }
721 const std::vector<JUMPER_DEF>& GetJumperDefs() const { return m_jumper_defs; }
722 const std::vector<COPPER_SHAPE>& GetCopperShapes() const { return m_copper_shapes; }
723 const std::vector<GRAPHIC_LINE>& GetGraphicLines() const { return m_graphic_lines; }
724 const FILE_HEADER& GetFileHeader() const { return m_file_header; }
725 bool IsBasicUnits() const { return m_is_basic_units; }
726
730 std::vector<LAYER_INFO> GetLayerInfos() const;
731
732private:
733 void parseLine( const std::string& aLine );
734 void parseSectionPCB( std::ifstream& aStream );
735 void parseSectionPARTS( std::ifstream& aStream );
736 void parseSectionNETS( std::ifstream& aStream );
737 void parseSectionROUTES( std::ifstream& aStream );
738 void parseSectionTEXT( std::ifstream& aStream );
739 void parseSectionBOARD( std::ifstream& aStream );
740 void parseSectionLINES( std::ifstream& aStream );
741 void parseSectionVIA( std::ifstream& aStream );
742 void parseSectionPOUR( std::ifstream& aStream );
743 void parseSectionPARTDECAL( std::ifstream& aStream );
744 void parseSectionPARTTYPE( std::ifstream& aStream );
745 void parseSectionREUSE( std::ifstream& aStream );
746 void parseSectionCLUSTER( std::ifstream& aStream );
747 void parseSectionJUMPER( std::ifstream& aStream );
748 void parseSectionTESTPOINT( std::ifstream& aStream );
749 void parseSectionNETCLASS( std::ifstream& aStream );
750 void parseSectionDIFFPAIR( std::ifstream& aStream );
751 void parseSectionLAYERDEFS( std::ifstream& aStream );
752 void parseSectionMISC( std::ifstream& aStream );
754
755 // Read next line, skipping comments and empty lines
756 bool readLine( std::ifstream& aStream, std::string& aLine );
757 void pushBackLine( const std::string& aLine );
758
766 int parseMajorVersion() const;
767
769 std::vector<PART> m_parts;
770 std::vector<NET> m_nets;
771 std::vector<ROUTE> m_routes;
772 std::vector<TEXT> m_texts;
773 std::vector<LINE> m_lines;
774 std::vector<POLYLINE> m_board_outlines;
775 std::vector<POUR> m_pours;
776 std::map<std::string, VIA_DEF> m_via_defs;
777 std::map<std::string, PART_DECAL> m_decals;
778 std::map<std::string, PART_TYPE> m_part_types;
779
781 std::map<std::string, std::map<std::string, std::string>> m_part_instance_attrs;
782 std::map<std::string, REUSE_BLOCK> m_reuse_blocks;
783 std::vector<CLUSTER> m_clusters;
784 std::vector<TEST_POINT> m_test_points;
785 std::vector<DIMENSION> m_dimensions;
787 std::vector<NET_CLASS_DEF> m_net_classes;
788 std::vector<DIFF_PAIR_DEF> m_diff_pairs;
789 std::vector<KEEPOUT> m_keepouts;
790 std::vector<JUMPER_DEF> m_jumper_defs;
791 std::vector<COPPER_SHAPE> m_copper_shapes;
792 std::vector<GRAPHIC_LINE> m_graphic_lines;
793 std::map<int, LAYER_INFO> m_layer_defs;
795 bool m_is_basic_units = false;
796 bool m_has_font_lines = true;
797
798 std::string m_current_section;
799 std::optional<std::string> m_pushed_line;
800};
801
802} // namespace PADS_IO
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
Jumper definitions from JUMPER section.
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)
PARAMETERS m_parameters
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
Copper shapes from LINES section.
std::map< std::string, PART_TYPE > m_part_types
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
Per-instance attribute overrides from PART <name> {...} blocks in PARTTYPE section.
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
Parsed file header info.
std::vector< GRAPHIC_LINE > m_graphic_lines
2D graphic lines from LINES section
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
Parsed layer definitions 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.
Definition pads_parser.h:98
@ LIB_LINE
Library line items (drafting)
Definition pads_parser.h:96
bool IsCopperPadRow(const PAD_STACK_LAYER &aLayer)
True when the row describes pad or via copper.
@ SOLID
POUROUT, POLY.
PADS_LAYER_FUNCTION
ARC arc
Only valid when is_arc is true.
Definition pads_parser.h:68
ARC_POINT(double aX, double aY, const ARC &aArc)
Definition pads_parser.h:84
ARC_POINT(double aX, double aY)
Definition pads_parser.h:77
Arc as center, radius and angles.
Definition pads_parser.h:50
double radius
Definition pads_parser.h:53
double delta_angle
Definition pads_parser.h:55
double start_angle
Definition pads_parser.h:54
std::string font_info
std::string hjust
std::string vjust
std::vector< std::string > segment_refs
std::string name
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
Board design rules.
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.
bool IsSpecified(DESIGN_RULE_FIELD aField) const
void MarkSpecified(DESIGN_RULE_FIELD aField)
double mask_clearance
MASKCLEAR.
double x
Origin.
double crossbar_pos
Y for horizontal, X for vertical.
std::vector< POINT > points
Measurement endpoints.
std::string product
POWERPCB, PADS, LAYOUT, PADS-LIBRARY-*.
PADS_FILE_TYPE file_type
std::string units
MILS, MM, INCH, BASIC.
int gate_swap_type
0 = not swappable
std::vector< GATE_PIN > pins
std::string func_name
int swap_type
0 = not swappable
std::string pin_number
PIN_ELEC_TYPE elec_type
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.
bool wirebond
W flag.
std::string end_padstack
End pin, optional.
bool display_silk
D flag.
std::vector< ATTRIBUTE > labels
bool via_enabled
V flag.
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.
KEEPOUT_TYPE type
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.
double via_size
VIASIZE.
std::string pin_name
std::string reuse_instance
std::string ref_des
std::string reuse_signal
std::string name
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.
double drill
0 for SMD
std::string shape
R, S, A, O, OF, RF, RT, ST, RA, SA, RC, OC.
bool plated
PTH vs NPTH.
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 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 decal_name
std::string part_type
Part type name when using PARTTYPE@DECAL syntax.
bool explicit_decal
Decal given explicitly with @ syntax.
std::string reuse_instance
std::string value
std::string decal
Primary decal (first in colon-separated list)
std::string name
int alt_decal_index
ALT field from placement (-1 = use primary decal)
std::vector< ATTRIBUTE > attributes
std::string reuse_part
Original part ref des inside the reuse block.
std::string units
std::vector< std::string > alternate_decals
Alternate decals (remaining after ':' splits)
A polyline that may contain arc segments, used for board outlines and graphics.
std::vector< ARC_POINT > points
int thermal_spoke_count
std::string name
bool is_cutout
POCUT piece.
POUR_STYLE style
std::string net_name
std::string owner_pour
Parent pour, 7th header field.
double thermal_spoke_width
double hatch_grid
std::vector< ARC_POINT > points
THERMAL_TYPE thermal_type
double thermal_gap
double hatch_width
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 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< VIA > vias
std::vector< TEARDROP > teardrops
std::vector< TRACK > tracks
std::vector< NET_PIN > pins
From pin pair lines.
std::vector< JUMPER_MARKER > jumpers
std::string net_name
std::string pin_number
double width
Track width for connections.
std::string signal_name
e.g. VCC, GND
std::string name
std::string type
VIA or PIN.
std::string net_name
int side
0=through, 1=top, 2=bottom
std::string symbol_name
std::string font_face
std::string vjust
UP, CENTER, DOWN.
std::string content
std::string reuse_instance
int ndim
Auto-dimensioning text number, 0 if unused.
std::string hjust
LEFT, CENTER, RIGHT.
double font_descent
double font_height
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
std::string name
bool has_mask_back
Stack includes bottom soldermask, layer 28.
std::vector< PAD_STACK_LAYER > stack
std::string name