LibrePCB Developers Documentation
boarddesignrulechecksettings.h
Go to the documentation of this file.
1/*
2 * LibrePCB - Professional EDA for everyone!
3 * Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors.
4 * https://librepcb.org/
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (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 <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef LIBREPCB_CORE_BOARDDESIGNRULECHECKSETTINGS_H
21#define LIBREPCB_CORE_BOARDDESIGNRULECHECKSETTINGS_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "../../../types/length.h"
27
28#include <QtCore>
29
30/*******************************************************************************
31 * Namespace / Forward Declarations
32 ******************************************************************************/
33namespace librepcb {
34
35class SExpression;
36
37/*******************************************************************************
38 * Class BoardDesignRuleCheckSettings
39 ******************************************************************************/
40
45public:
46 // Types
47 enum class AllowedSlots : int {
48 None = 0,
49 SingleSegmentStraight = 1,
50 MultiSegmentStraight = 2,
51 Any = 3,
52 };
53
54 // Constructors / Destructor
57 const BoardDesignRuleCheckSettings& other) noexcept;
58 explicit BoardDesignRuleCheckSettings(const SExpression& node);
60
61 // Getters
64 }
67 }
68 const UnsignedLength& getMinCopperNpthClearance() const noexcept {
70 }
71 const UnsignedLength& getMinDrillDrillClearance() const noexcept {
73 }
74 const UnsignedLength& getMinDrillBoardClearance() const noexcept {
76 }
79 }
80 const UnsignedLength& getMinCopperWidth() const noexcept {
81 return mMinCopperWidth;
82 }
83 const UnsignedLength& getMinPthAnnularRing() const noexcept {
84 return mMinPthAnnularRing;
85 }
86 const UnsignedLength& getMinNpthDrillDiameter() const noexcept {
88 }
89 const UnsignedLength& getMinPthDrillDiameter() const noexcept {
91 }
92 const UnsignedLength& getMinNpthSlotWidth() const noexcept {
93 return mMinNpthSlotWidth;
94 }
95 const UnsignedLength& getMinPthSlotWidth() const noexcept {
96 return mMinPthSlotWidth;
97 }
98 const UnsignedLength& getMinSilkscreenWidth() const noexcept {
100 }
103 }
106 }
107 bool getBlindViasAllowed() const noexcept { return mBlindViasAllowed; }
108 bool getBuriedViasAllowed() const noexcept { return mBuriedViasAllowed; }
110 return mAllowedNpthSlots;
111 }
113
114 // Setters
115 void setMinCopperCopperClearance(const UnsignedLength& value) noexcept {
117 }
118 void setMinCopperBoardClearance(const UnsignedLength& value) noexcept {
120 }
121 void setMinCopperNpthClearance(const UnsignedLength& value) noexcept {
123 }
124 void setMinDrillDrillClearance(const UnsignedLength& value) noexcept {
126 }
127 void setMinDrillBoardClearance(const UnsignedLength& value) noexcept {
129 }
132 }
133 void setMinCopperWidth(const UnsignedLength& value) noexcept {
134 mMinCopperWidth = value;
135 }
136 void setMinPthAnnularRing(const UnsignedLength& value) noexcept {
137 mMinPthAnnularRing = value;
138 }
139 void setMinNpthDrillDiameter(const UnsignedLength& value) noexcept {
140 mMinNpthDrillDiameter = value;
141 }
142 void setMinPthDrillDiameter(const UnsignedLength& value) noexcept {
143 mMinPthDrillDiameter = value;
144 }
145 void setMinNpthSlotWidth(const UnsignedLength& value) noexcept {
146 mMinNpthSlotWidth = value;
147 }
148 void setMinPthSlotWidth(const UnsignedLength& value) noexcept {
149 mMinPthSlotWidth = value;
150 }
151 void setMinSilkscreenWidth(const UnsignedLength& value) noexcept {
152 mMinSilkscreenWidth = value;
153 }
154 void setMinSilkscreenTextHeight(const UnsignedLength& value) noexcept {
156 }
157 void setMinOutlineToolDiameter(const UnsignedLength& value) noexcept {
159 }
160 void setBlindViasAllowed(bool value) noexcept { mBlindViasAllowed = value; }
161 void setBuriedViasAllowed(bool value) noexcept { mBuriedViasAllowed = value; }
162 void setAllowedPthSlots(AllowedSlots value) noexcept {
163 mAllowedNpthSlots = value;
164 }
165 void setAllowedNpthSlots(AllowedSlots value) noexcept {
166 mAllowedPthSlots = value;
167 }
168
169 // General Methods
170
176 void serialize(SExpression& root) const;
177
178 // Operator Overloadings
180 const BoardDesignRuleCheckSettings& rhs) noexcept;
181 bool operator==(const BoardDesignRuleCheckSettings& rhs) const noexcept;
182 bool operator!=(const BoardDesignRuleCheckSettings& rhs) const noexcept {
183 return !(*this == rhs);
184 }
185
186private: // Data
187 // Clearances
194
195 // Minimum sizes
205
206 // Allowed features
211};
212
213/*******************************************************************************
214 * End of File
215 ******************************************************************************/
216
217} // namespace librepcb
218
220
221#endif
The BoardDesignRuleCheckSettings class.
Definition: boarddesignrulechecksettings.h:44
void setMinSilkscreenWidth(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:151
UnsignedLength mMinCopperBoardClearance
Definition: boarddesignrulechecksettings.h:189
bool operator!=(const BoardDesignRuleCheckSettings &rhs) const noexcept
Definition: boarddesignrulechecksettings.h:182
UnsignedLength mMinDrillDrillClearance
Definition: boarddesignrulechecksettings.h:191
void setAllowedNpthSlots(AllowedSlots value) noexcept
Definition: boarddesignrulechecksettings.h:165
void setMinNpthDrillDiameter(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:139
UnsignedLength mMinNpthDrillDiameter
Definition: boarddesignrulechecksettings.h:198
void setMinNpthSlotWidth(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:145
bool mBlindViasAllowed
Definition: boarddesignrulechecksettings.h:207
const UnsignedLength & getMinPthSlotWidth() const noexcept
Definition: boarddesignrulechecksettings.h:95
void setMinDrillDrillClearance(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:124
const UnsignedLength & getMinSilkscreenStopmaskClearance() const noexcept
Definition: boarddesignrulechecksettings.h:77
const UnsignedLength & getMinCopperWidth() const noexcept
Definition: boarddesignrulechecksettings.h:80
const UnsignedLength & getMinDrillBoardClearance() const noexcept
Definition: boarddesignrulechecksettings.h:74
UnsignedLength mMinDrillBoardClearance
Definition: boarddesignrulechecksettings.h:192
void setBuriedViasAllowed(bool value) noexcept
Definition: boarddesignrulechecksettings.h:161
const UnsignedLength & getMinSilkscreenWidth() const noexcept
Definition: boarddesignrulechecksettings.h:98
void setMinCopperNpthClearance(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:121
void setMinCopperWidth(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:133
AllowedSlots getAllowedPthSlots() const noexcept
Definition: boarddesignrulechecksettings.h:112
bool operator==(const BoardDesignRuleCheckSettings &rhs) const noexcept
Definition: boarddesignrulechecksettings.cpp:226
UnsignedLength mMinSilkscreenWidth
Definition: boarddesignrulechecksettings.h:202
bool getBuriedViasAllowed() const noexcept
Definition: boarddesignrulechecksettings.h:108
AllowedSlots mAllowedNpthSlots
Definition: boarddesignrulechecksettings.h:209
UnsignedLength mMinCopperNpthClearance
Definition: boarddesignrulechecksettings.h:190
AllowedSlots mAllowedPthSlots
Definition: boarddesignrulechecksettings.h:210
void setMinSilkscreenTextHeight(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:154
AllowedSlots getAllowedNpthSlots() const noexcept
Definition: boarddesignrulechecksettings.h:109
UnsignedLength mMinOutlineToolDiameter
Definition: boarddesignrulechecksettings.h:204
void setMinPthSlotWidth(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:148
UnsignedLength mMinSilkscreenStopmaskClearance
Definition: boarddesignrulechecksettings.h:193
const UnsignedLength & getMinNpthSlotWidth() const noexcept
Definition: boarddesignrulechecksettings.h:92
void setBlindViasAllowed(bool value) noexcept
Definition: boarddesignrulechecksettings.h:160
const UnsignedLength & getMinPthAnnularRing() const noexcept
Definition: boarddesignrulechecksettings.h:83
UnsignedLength mMinCopperWidth
Definition: boarddesignrulechecksettings.h:196
void setAllowedPthSlots(AllowedSlots value) noexcept
Definition: boarddesignrulechecksettings.h:162
const UnsignedLength & getMinCopperNpthClearance() const noexcept
Definition: boarddesignrulechecksettings.h:68
void setMinDrillBoardClearance(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:127
UnsignedLength mMinSilkscreenTextHeight
Definition: boarddesignrulechecksettings.h:203
const UnsignedLength & getMinNpthDrillDiameter() const noexcept
Definition: boarddesignrulechecksettings.h:86
UnsignedLength mMinNpthSlotWidth
Definition: boarddesignrulechecksettings.h:200
UnsignedLength mMinPthAnnularRing
Definition: boarddesignrulechecksettings.h:197
const UnsignedLength & getMinOutlineToolDiameter() const noexcept
Definition: boarddesignrulechecksettings.h:104
void setMinOutlineToolDiameter(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:157
AllowedSlots
Definition: boarddesignrulechecksettings.h:47
bool getBlindViasAllowed() const noexcept
Definition: boarddesignrulechecksettings.h:107
UnsignedLength mMinPthDrillDiameter
Definition: boarddesignrulechecksettings.h:199
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition: boarddesignrulechecksettings.cpp:155
const UnsignedLength & getMinCopperBoardClearance() const noexcept
Definition: boarddesignrulechecksettings.h:65
BoardDesignRuleCheckSettings & operator=(const BoardDesignRuleCheckSettings &rhs) noexcept
Definition: boarddesignrulechecksettings.cpp:202
BoardDesignRuleCheckSettings() noexcept
Definition: boarddesignrulechecksettings.cpp:77
void setMinPthAnnularRing(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:136
void setMinSilkscreenStopmaskClearance(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:130
const UnsignedLength & getMinPthDrillDiameter() const noexcept
Definition: boarddesignrulechecksettings.h:89
bool mBuriedViasAllowed
Definition: boarddesignrulechecksettings.h:208
UnsignedLength mMinCopperCopperClearance
Definition: boarddesignrulechecksettings.h:188
UnsignedLength mMinPthSlotWidth
Definition: boarddesignrulechecksettings.h:201
void setMinPthDrillDiameter(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:142
const UnsignedLength & getMinDrillDrillClearance() const noexcept
Definition: boarddesignrulechecksettings.h:71
const UnsignedLength & getMinCopperCopperClearance() const noexcept
Definition: boarddesignrulechecksettings.h:62
const UnsignedLength & getMinSilkscreenTextHeight() const noexcept
Definition: boarddesignrulechecksettings.h:101
void setMinCopperBoardClearance(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:118
void setMinCopperCopperClearance(const UnsignedLength &value) noexcept
Definition: boarddesignrulechecksettings.h:115
The SExpression class.
Definition: sexpression.h:69
Definition: occmodel.cpp:77
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition: length.h:696