KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pns_sizes_settings.cpp
Go to the documentation of this file.
1
/*
2
* KiRouter - a push-and-(sometimes-)shove PCB router
3
*
4
* Copyright (C) 2014 CERN
5
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
6
* Author: Tomasz Wlostowski <
[email protected]
>
7
*
8
* This program is free software: you can redistribute it and/or modify it
9
* under the terms of the GNU General Public License as published by the
10
* Free Software Foundation, either version 3 of the License, or (at your
11
* option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful, but
14
* WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License along
19
* with this program. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
22
#include <
board.h
>
23
24
#include "
pns_item.h
"
25
#include "
pns_sizes_settings.h
"
26
27
namespace
PNS
{
28
29
30
void
SIZES_SETTINGS::ClearLayerPairs
()
31
{
32
m_layerPairs
.clear();
33
}
34
35
36
void
SIZES_SETTINGS::AddLayerPair
(
int
aL1,
int
aL2 )
37
{
38
int
top = std::min( aL1, aL2 );
39
int
bottom = std::max( aL1, aL2 );
40
41
m_layerPairs
[bottom] = top;
42
m_layerPairs
[top] = bottom;
43
}
44
45
46
int
SIZES_SETTINGS::GetLayerTop
()
const
47
{
48
if
(
m_layerPairs
.empty() )
49
return
F_Cu
;
50
else
51
return
m_layerPairs
.begin()->first;
52
}
53
54
55
int
SIZES_SETTINGS::GetLayerBottom
()
const
56
{
57
if
(
m_layerPairs
.empty() )
58
return
B_Cu
;
59
else
60
return
m_layerPairs
.begin()->second;
61
}
62
63
}
board.h
PNS::SIZES_SETTINGS::ClearLayerPairs
void ClearLayerPairs()
Definition:
pns_sizes_settings.cpp:30
PNS::SIZES_SETTINGS::m_layerPairs
std::map< int, int > m_layerPairs
Definition:
pns_sizes_settings.h:156
PNS::SIZES_SETTINGS::AddLayerPair
void AddLayerPair(int aL1, int aL2)
Definition:
pns_sizes_settings.cpp:36
PNS::SIZES_SETTINGS::GetLayerBottom
int GetLayerBottom() const
Definition:
pns_sizes_settings.cpp:55
PNS::SIZES_SETTINGS::GetLayerTop
int GetLayerTop() const
Definition:
pns_sizes_settings.cpp:46
B_Cu
@ B_Cu
Definition:
layer_ids.h:65
F_Cu
@ F_Cu
Definition:
layer_ids.h:64
PNS
Push and Shove diff pair dimensions (gap) settings dialog.
Definition:
dialog_pns_diff_pair_dimensions.h:33
pns_item.h
pns_sizes_settings.h
src
pcbnew
router
pns_sizes_settings.cpp
Generated on Sun Dec 22 2024 00:05:29 for KiCad PCB EDA Suite by
1.9.6