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
12
namespace
tmk::drc
{
13
14
struct
RefillResult
{
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).
26
RefillResult
refill_zones
(
const
model::Board
& b,
const
model::DesignRules
& r);
27
28
}
// namespace tmk::drc
board.hpp
The board model (design doc 02 §3): every object TraceMaker reads from a .kicad_pcb,...
tmk::drc
Definition
connectivity.hpp:13
tmk::drc::refill_zones
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,...
rules.hpp
Design rules as KiCad defines them (design doc 08 §3–4): board minimums and net classes from the ....
tmk::drc::RefillResult
Definition
refill.hpp:14
tmk::drc::RefillResult::zones
int zones
copper zones refilled
Definition
refill.hpp:16
tmk::drc::RefillResult::islands_removed
int islands_removed
fill islands no pad reaches, removed by the zones' island settings
Definition
refill.hpp:17
tmk::drc::RefillResult::board
model::Board board
the input with every copper zone refilled
Definition
refill.hpp:15
tmk::drc::RefillResult::warnings
std::vector< std::string > warnings
Definition
refill.hpp:18
tmk::model::Board
Definition
board.hpp:186
tmk::model::DesignRules
Definition
rules.hpp:62
drc
refill.hpp
Generated by
1.15.0