TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
refill.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2#pragma once
3// Zone refill in the engine (doc 05 §36): the fills KiCad 10's zone filler would draw for the board's current
4// copper, so connectivity can be judged as `kicad-cli pcb drc --refill-zones` judges it. The fills are not
5// written to files.
6#include <string>
7#include <vector>
8
9#include "model/board.hpp"
10#include "model/rules.hpp"
11
12namespace tmk::drc {
13
15 model::Board board; // the input with every copper zone refilled
16 int zones = 0; // copper zones refilled
17 int islands_removed = 0; // fill islands no pad reaches, removed by the zones' island settings
18 std::vector<std::string> warnings;
19};
20
21// Follows ZONE_FILLER::fillCopperZone: outline within the board, thermal gaps around same-net pads, every other
22// item knocked out at its clearance, spokes that reach the fill, minimum-width pruning, then islands without a pad
23// removed by each zone's island_removal_mode. Teardrop zones lose their fill: kicad-cli's refill first rebuilds
24// teardrops (TEARDROP_MANAGER::UpdateTeardrops), and a rebuilt teardrop joins a pad to a track that already
25// touches it. Hatched zones are not redrawn: their stored fill is kept where the new solid fill still is (warning).
27
28} // namespace tmk::drc
The board model (design doc 02 §3): every object TraceMaker reads from a .kicad_pcb,...
RefillResult refill_zones(const model::Board &b, const model::DesignRules &r)
Follows ZONE_FILLER::fillCopperZone: outline within the board, thermal gaps around same-net pads,...
Design rules as KiCad defines them (design doc 08 §3–4): board minimums and net classes from the ....
int zones
copper zones refilled
Definition refill.hpp:16
int islands_removed
fill islands no pad reaches, removed by the zones' island settings
Definition refill.hpp:17
model::Board board
the input with every copper zone refilled
Definition refill.hpp:15
std::vector< std::string > warnings
Definition refill.hpp:18