KiCad PCB EDA Suite
Loading...
Searching...
No Matches
fab_layer_index.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#pragma once
21
22#include <layer_ids.h>
23#include <map>
24#include <vector>
25
26class BOARD;
27class BOARD_ITEM;
28class PCB_SHAPE;
29class PCB_TRACK;
30
31
34{
35public:
36 using NET_ITEMS = std::map<int, std::vector<BOARD_ITEM*>>;
37
38 explicit FAB_LAYER_INDEX( BOARD& aBoard );
39
40 const NET_ITEMS& Items( PCB_LAYER_ID aLayer ) const;
41
42private:
43 std::map<PCB_LAYER_ID, NET_ITEMS> m_items;
44};
45
46
48bool FabLayerHasVisibleItems( const BOARD& aBoard, PCB_LAYER_ID aLayer );
50int FabTrackWidth( const PCB_TRACK& aTrack, PCB_LAYER_ID aLayer );
52bool FabMaskShape( const PCB_SHAPE& aShape, PCB_LAYER_ID aLayer, PCB_SHAPE& aResult );
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:84
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:410
FAB_LAYER_INDEX(BOARD &aBoard)
const NET_ITEMS & Items(PCB_LAYER_ID aLayer) const
std::map< PCB_LAYER_ID, NET_ITEMS > m_items
std::map< int, std::vector< BOARD_ITEM * > > NET_ITEMS
int FabTrackWidth(const PCB_TRACK &aTrack, PCB_LAYER_ID aLayer)
Use only for traces and arcs; vias require a layer-specific width.
bool FabMaskShape(const PCB_SHAPE &aShape, PCB_LAYER_ID aLayer, PCB_SHAPE &aResult)
Build an expanded mask copy of an exposed copper shape when needed.
bool FabLayerHasVisibleItems(const BOARD &aBoard, PCB_LAYER_ID aLayer)
True if the board draws visible text, graphics or zones on aLayer.
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56