KiCad PCB EDA Suite
Loading...
Searching...
No Matches
fab_pad_geometry.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 modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * 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 <pad.h>
24
25#include <memory>
26
27
30{
31public:
32 bool IsEmpty() const { return m_empty; }
33 const PAD& Pad() const { return *m_pad; }
34 VECTOR2I Margin() const { return m_margin; }
35 int CornerRadius() const { return m_cornerRadius; }
36 const SHAPE_POLY_SET& Contour() const { return m_contour; }
37 SHAPE_POLY_SET Polygon() const;
38
39private:
41 PAD_LAYER_GEOMETRY( const PAD& aPad, PCB_LAYER_ID aLayer );
42
43 std::unique_ptr<PAD> m_pad;
47 bool m_empty = false;
48 int m_maxError = 0;
50};
51
52
54VECTOR2I ResolvePadMargin( const PAD& aPad, PCB_LAYER_ID aLayer );
55
57PAD_LAYER_GEOMETRY ResolvePadLayer( const PAD& aPad, PCB_LAYER_ID aLayer, int aMaxError );
A pad's resolved artwork on one fabrication layer.
PAD_LAYER_GEOMETRY(const PAD &aPad, PCB_LAYER_ID aLayer)
friend PAD_LAYER_GEOMETRY ResolvePadLayer(const PAD &, PCB_LAYER_ID, int)
Artwork on one layer as plotted by PlotStandardLayer; keep the plotter independent as the parity orac...
const SHAPE_POLY_SET & Contour() const
SHAPE_POLY_SET Polygon() const
SHAPE_POLY_SET m_contour
std::unique_ptr< PAD > m_pad
VECTOR2I Margin() const
const PAD & Pad() const
Definition pad.h:61
Represent a set of closed polygons.
PAD_LAYER_GEOMETRY ResolvePadLayer(const PAD &aPad, PCB_LAYER_ID aLayer, int aMaxError)
Artwork on one layer as plotted by PlotStandardLayer; keep the plotter independent as the parity orac...
VECTOR2I ResolvePadMargin(const PAD &aPad, PCB_LAYER_ID aLayer)
Per-side mask or paste margin as PlotStandardLayer applies it.
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708