KiCad PCB EDA Suite
Loading...
Searching...
No Matches
drill_chart_model.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 The 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#ifndef DRILL_CHART_MODEL_H
21#define DRILL_CHART_MODEL_H
22
23#include <string>
24#include <vector>
25
29
30class BOARD;
31
32
89
90
92{
93 int m_Operations = 0;
94 int m_Sites = 0;
95 int m_Groups = 0;
96};
97
98
116
117
119{
120public:
121 DRILL_CHART_MODEL( const DRILL_SYMBOL_PROFILE& aProfile );
122
123 void Build( const BOARD& aBoard, const std::vector<DRILL_SPAN>& aSpans );
124
125 void Build( const BOARD& aBoard, const std::vector<DRILL_SPAN>& aSpans,
126 const DRILL_CHART_ROW_SPEC& aSpec );
127
128 const std::vector<DRILL_CHART_GROUP>& Groups() const { return m_groups; }
129 const DRILL_CHART_TOTALS& Totals() const { return m_totals; }
130
131private:
133
134 std::vector<DRILL_CHART_GROUP> m_groups;
136};
137
138
145std::vector<DRILL_SPAN> EnumerateDrillSpans( const BOARD& aBoard );
146
147#endif // DRILL_CHART_MODEL_H
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:409
DRILL_CHART_TOTALS m_totals
DRILL_CHART_MODEL(const DRILL_SYMBOL_PROFILE &aProfile)
void Build(const BOARD &aBoard, const std::vector< DRILL_SPAN > &aSpans)
const std::vector< DRILL_CHART_GROUP > & Groups() const
std::vector< DRILL_CHART_GROUP > m_groups
const DRILL_SYMBOL_PROFILE & m_profile
const DRILL_CHART_TOTALS & Totals() const
Grouping rules and symbol assignments, shared by reference so a chart and its map can never disagree ...
std::vector< DRILL_SPAN > EnumerateDrillSpans(const BOARD &aBoard)
Every drill span present on the board, through-holes first.
DRILL_OP_KIND
Which of the padstack's drill props produced the operation.
HOLE_ATTRIBUTE
Definition drill_span.h:36
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
@ B_Cu
Definition layer_ids.h:61
@ F_Cu
Definition layer_ids.h:60
Which holes a chart reports on.
std::string m_Key
Identity of this row.
DRILL_POST_MACHINING m_BackPostMachining
std::vector< VECTOR2I > m_Sites
Distinct hole locations, kept so totals can union them rather than sum site counts.
PCB_LAYER_ID m_TopLayer
std::string m_SymbolKey
Identity of the symbol, which always belongs to the profile's grouping.
HOLE_ATTRIBUTE m_Attribute
std::vector< DRILL_OPERATION_ID > m_Members
std::optional< int > m_StubLength
DRILL_SYMBOL_ASSIGNMENT m_Symbol
DRILL_POST_MACHINING m_FrontPostMachining
PCB_LAYER_ID m_BottomLayer
Turns the board's drill operations into chart rows for one symbol profile.
DRILL_CHART_FILTER m_Filter
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683