34 std::set<int> usedShapes;
35 std::set<wxString> usedLetters;
43 group.m_Symbol = *existing;
46 usedShapes.insert( existing->m_ShapeIndex );
48 usedLetters.insert( existing->m_Letter );
56 for(
int i = 0; i < 26 * 27; ++i )
61 candidate = wxString::Format(
"%c",
'A' + i );
63 candidate = wxString::Format(
"%c%c",
'A' + ( i / 26 ) - 1,
'A' + ( i % 26 ) );
65 if( !usedLetters.count( candidate ) )
88 usedLetters.insert( assignment.
m_Letter );
96 for(
int i = 0; i < shapeCount; ++i )
98 if( !usedShapes.count( i ) )
109 usedShapes.insert( shape );
115 usedLetters.insert( assignment.
m_Letter );
129 group.m_Symbol = assignment;
142 std::vector<DRILL_CHART_GROUP> groups =
model.Groups();
145 std::map<std::string, DRILL_SYMBOL_ASSIGNMENT> resolved;
155 const BOARD& aBoard,
const std::map<std::string, DRILL_SYMBOL_ASSIGNMENT>& aResolved )
159 std::map<KIID, std::vector<DRILL_SYMBOL_ENTRY>> byItem;
172 if( it == aResolved.end() )
185 byItem[op.m_SourceId].push_back( entry );
DRILL_SYMBOL_PROFILE & GetDrillSymbolProfile()
Information pertinent to a Pcbnew printed circuit board.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Grouping rules and symbol assignments, shared by reference so a chart and its map can never disagree ...
std::string GroupKeyString(const DRILL_OPERATION &aOperation) const
Stable identity for a group under the currently enabled keys.
const DRILL_SYMBOL_ASSIGNMENT * GetAssignment(const std::string &aKey) const
bool GetFreezeAssignments() const
void SetAssignment(const std::string &aKey, const DRILL_SYMBOL_ASSIGNMENT &aAssignment)
DRILL_MARK_POLICY GetMarkPolicy() const
std::vector< DRILL_SPAN > EnumerateDrillSpans(const BOARD &aBoard)
Every drill span present on the board, through-holes first.
std::vector< DRILL_OPERATION > EnumerateDrillOperations(const BOARD &aBoard, const DRILL_QUERY &aQuery)
The one place that decides what the board's holes are.
std::map< KIID, std::vector< DRILL_SYMBOL_ENTRY > > ResolveDrillSymbolsByItem(const BOARD &aBoard, const std::map< std::string, DRILL_SYMBOL_ASSIGNMENT > &aResolved)
The same answer keyed by the item that owns the holes.
std::map< std::string, DRILL_SYMBOL_ASSIGNMENT > ResolveDrillSymbols(const BOARD &aBoard)
The symbol every hole should carry, without touching the board.
void AssignDrillSymbols(std::vector< DRILL_CHART_GROUP > &aGroups, DRILL_SYMBOL_PROFILE &aProfile)
Give every group a mark, keeping the ones the profile already records.
int CuratedShapeCount()
Marks that stay legible at chart size and in monochrome.
One machining action, which is also one NC hit and one tool assignment.
Selects which operations EnumerateDrillOperations() returns.
bool m_MergePTHNPTH
Emit plated and non-plated together, as the merged drill file does.
DRILL_MARK_MODE m_MarkMode
One drawable mark, with the geometry the renderer needs to place it.
VECTOR2I m_Position
Where the mark is drawn, which is the hole itself.
DRILL_SYMBOL_ASSIGNMENT m_Symbol