KiCad PCB EDA Suite
Loading...
Searching...
No Matches
drc_rule_editor_enums.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 (C) 2024 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, you may find one here:
18
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19
* or you may search the http://www.gnu.org website for the version 2 license,
20
* or you may write to the Free Software Foundation, Inc.,
21
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22
*/
23
24
#ifndef DRC_RULE_EDITOR_ENUMS_H_
25
#define DRC_RULE_EDITOR_ENUMS_H_
26
27
#include <wx/string.h>
28
#include <string>
29
#include <vector>
30
31
36
struct
VALIDATION_RESULT
37
{
38
bool
isValid
=
true
;
39
std::vector<std::string>
errors
;
40
41
void
AddError
(
const
std::string& aError )
42
{
43
isValid
=
false
;
44
errors
.push_back( aError );
45
}
46
47
void
Merge
(
const
VALIDATION_RESULT
& aOther )
48
{
49
if
( !aOther.
isValid
)
50
{
51
isValid
=
false
;
52
errors
.insert(
errors
.end(), aOther.
errors
.begin(), aOther.
errors
.end() );
53
}
54
}
55
};
56
57
58
struct
RULE_GENERATION_CONTEXT
59
{
60
wxString
ruleName
;
61
wxString
comment
;
62
wxString
conditionExpression
;
63
wxString
layerClause
;
64
wxString
constraintCode
;
65
};
66
67
68
enum
DRC_RULE_EDITOR_ITEM_TYPE
69
{
70
ROOT
= 0,
71
CATEGORY
,
72
RULE_TYPE
,
73
CONSTRAINT
,
74
RULE
,
75
};
76
77
enum
DRC_RULE_EDITOR_CONSTRAINT_NAME
78
{
79
BASIC_CLEARANCE
= 0,
80
BOARD_OUTLINE_CLEARANCE
,
81
MINIMUM_CLEARANCE
,
82
MINIMUM_ITEM_CLEARANCE
,
83
CREEPAGE_DISTANCE
,
84
MINIMUM_CONNECTION_WIDTH
,
85
MINIMUM_TRACK_WIDTH
,
86
COPPER_TO_HOLE_CLEARANCE
,
87
HOLE_TO_HOLE_CLEARANCE
,
88
MINIMUM_THERMAL_RELIEF_SPOKE_COUNT
,
89
MINIMUM_ANNULAR_WIDTH
,
90
COPPER_TO_EDGE_CLEARANCE
,
91
COURTYARD_CLEARANCE
,
92
PHYSICAL_CLEARANCE
,
93
MINIMUM_THROUGH_HOLE
,
94
HOLE_SIZE
,
95
HOLE_TO_HOLE_DISTANCE
,
96
MINIMUM_UVIA_HOLE
,
97
MINIMUM_UVIA_DIAMETER
,
98
MINIMUM_VIA_DIAMETER
,
99
VIA_STYLE
,
100
MINIMUM_TEXT_HEIGHT_AND_THICKNESS
,
101
SILK_TO_SILK_CLEARANCE
,
102
SILK_TO_SOLDERMASK_CLEARANCE
,
103
MINIMUM_SOLDERMASK_SILVER
,
104
SOLDERMASK_EXPANSION
,
105
SOLDERPASTE_EXPANSION
,
106
MAXIMUM_ALLOWED_DEVIATION
,
107
MINIMUM_ANGULAR_RING
,
108
MATCHED_LENGTH_DIFF_PAIR
,
109
ROUTING_DIFF_PAIR
,
110
ROUTING_WIDTH
,
111
MAXIMUM_VIA_COUNT
,
112
ABSOLUTE_LENGTH
,
113
PERMITTED_LAYERS
,
114
ALLOWED_ORIENTATION
,
115
VIAS_UNDER_SMD
,
116
CUSTOM_RULE
117
};
118
119
#endif
// DRC_RULE_EDITOR_ENUMS_H_
CATEGORY
SIM_MODEL::PARAM::CATEGORY CATEGORY
Definition
dialog_sim_model.cpp:51
DRC_RULE_EDITOR_CONSTRAINT_NAME
DRC_RULE_EDITOR_CONSTRAINT_NAME
Definition
drc_rule_editor_enums.h:78
MINIMUM_SOLDERMASK_SILVER
@ MINIMUM_SOLDERMASK_SILVER
Definition
drc_rule_editor_enums.h:103
ALLOWED_ORIENTATION
@ ALLOWED_ORIENTATION
Definition
drc_rule_editor_enums.h:114
MINIMUM_ITEM_CLEARANCE
@ MINIMUM_ITEM_CLEARANCE
Definition
drc_rule_editor_enums.h:82
SILK_TO_SILK_CLEARANCE
@ SILK_TO_SILK_CLEARANCE
Definition
drc_rule_editor_enums.h:101
MINIMUM_TRACK_WIDTH
@ MINIMUM_TRACK_WIDTH
Definition
drc_rule_editor_enums.h:85
ROUTING_DIFF_PAIR
@ ROUTING_DIFF_PAIR
Definition
drc_rule_editor_enums.h:109
HOLE_TO_HOLE_CLEARANCE
@ HOLE_TO_HOLE_CLEARANCE
Definition
drc_rule_editor_enums.h:87
SOLDERPASTE_EXPANSION
@ SOLDERPASTE_EXPANSION
Definition
drc_rule_editor_enums.h:105
SILK_TO_SOLDERMASK_CLEARANCE
@ SILK_TO_SOLDERMASK_CLEARANCE
Definition
drc_rule_editor_enums.h:102
MINIMUM_ANGULAR_RING
@ MINIMUM_ANGULAR_RING
Definition
drc_rule_editor_enums.h:107
VIAS_UNDER_SMD
@ VIAS_UNDER_SMD
Definition
drc_rule_editor_enums.h:115
MINIMUM_UVIA_HOLE
@ MINIMUM_UVIA_HOLE
Definition
drc_rule_editor_enums.h:96
BOARD_OUTLINE_CLEARANCE
@ BOARD_OUTLINE_CLEARANCE
Definition
drc_rule_editor_enums.h:80
COURTYARD_CLEARANCE
@ COURTYARD_CLEARANCE
Definition
drc_rule_editor_enums.h:91
HOLE_SIZE
@ HOLE_SIZE
Definition
drc_rule_editor_enums.h:94
MINIMUM_CONNECTION_WIDTH
@ MINIMUM_CONNECTION_WIDTH
Definition
drc_rule_editor_enums.h:84
SOLDERMASK_EXPANSION
@ SOLDERMASK_EXPANSION
Definition
drc_rule_editor_enums.h:104
MAXIMUM_VIA_COUNT
@ MAXIMUM_VIA_COUNT
Definition
drc_rule_editor_enums.h:111
MINIMUM_ANNULAR_WIDTH
@ MINIMUM_ANNULAR_WIDTH
Definition
drc_rule_editor_enums.h:89
PHYSICAL_CLEARANCE
@ PHYSICAL_CLEARANCE
Definition
drc_rule_editor_enums.h:92
MINIMUM_THROUGH_HOLE
@ MINIMUM_THROUGH_HOLE
Definition
drc_rule_editor_enums.h:93
CREEPAGE_DISTANCE
@ CREEPAGE_DISTANCE
Definition
drc_rule_editor_enums.h:83
ABSOLUTE_LENGTH
@ ABSOLUTE_LENGTH
Definition
drc_rule_editor_enums.h:112
MINIMUM_CLEARANCE
@ MINIMUM_CLEARANCE
Definition
drc_rule_editor_enums.h:81
MINIMUM_THERMAL_RELIEF_SPOKE_COUNT
@ MINIMUM_THERMAL_RELIEF_SPOKE_COUNT
Definition
drc_rule_editor_enums.h:88
BASIC_CLEARANCE
@ BASIC_CLEARANCE
Definition
drc_rule_editor_enums.h:79
PERMITTED_LAYERS
@ PERMITTED_LAYERS
Definition
drc_rule_editor_enums.h:113
MINIMUM_TEXT_HEIGHT_AND_THICKNESS
@ MINIMUM_TEXT_HEIGHT_AND_THICKNESS
Definition
drc_rule_editor_enums.h:100
COPPER_TO_HOLE_CLEARANCE
@ COPPER_TO_HOLE_CLEARANCE
Definition
drc_rule_editor_enums.h:86
MAXIMUM_ALLOWED_DEVIATION
@ MAXIMUM_ALLOWED_DEVIATION
Definition
drc_rule_editor_enums.h:106
MINIMUM_UVIA_DIAMETER
@ MINIMUM_UVIA_DIAMETER
Definition
drc_rule_editor_enums.h:97
HOLE_TO_HOLE_DISTANCE
@ HOLE_TO_HOLE_DISTANCE
Definition
drc_rule_editor_enums.h:95
ROUTING_WIDTH
@ ROUTING_WIDTH
Definition
drc_rule_editor_enums.h:110
MATCHED_LENGTH_DIFF_PAIR
@ MATCHED_LENGTH_DIFF_PAIR
Definition
drc_rule_editor_enums.h:108
COPPER_TO_EDGE_CLEARANCE
@ COPPER_TO_EDGE_CLEARANCE
Definition
drc_rule_editor_enums.h:90
VIA_STYLE
@ VIA_STYLE
Definition
drc_rule_editor_enums.h:99
MINIMUM_VIA_DIAMETER
@ MINIMUM_VIA_DIAMETER
Definition
drc_rule_editor_enums.h:98
CUSTOM_RULE
@ CUSTOM_RULE
Definition
drc_rule_editor_enums.h:116
DRC_RULE_EDITOR_ITEM_TYPE
DRC_RULE_EDITOR_ITEM_TYPE
Definition
drc_rule_editor_enums.h:69
CONSTRAINT
@ CONSTRAINT
Definition
drc_rule_editor_enums.h:73
ROOT
@ ROOT
Definition
drc_rule_editor_enums.h:70
RULE
@ RULE
Definition
drc_rule_editor_enums.h:74
RULE_TYPE
@ RULE_TYPE
Definition
drc_rule_editor_enums.h:72
RULE_GENERATION_CONTEXT
Definition
drc_rule_editor_enums.h:59
RULE_GENERATION_CONTEXT::ruleName
wxString ruleName
Definition
drc_rule_editor_enums.h:60
RULE_GENERATION_CONTEXT::comment
wxString comment
Definition
drc_rule_editor_enums.h:61
RULE_GENERATION_CONTEXT::layerClause
wxString layerClause
Definition
drc_rule_editor_enums.h:63
RULE_GENERATION_CONTEXT::constraintCode
wxString constraintCode
Definition
drc_rule_editor_enums.h:64
RULE_GENERATION_CONTEXT::conditionExpression
wxString conditionExpression
Definition
drc_rule_editor_enums.h:62
VALIDATION_RESULT
Result of a validation operation.
Definition
drc_rule_editor_enums.h:37
VALIDATION_RESULT::AddError
void AddError(const std::string &aError)
Definition
drc_rule_editor_enums.h:41
VALIDATION_RESULT::errors
std::vector< std::string > errors
Definition
drc_rule_editor_enums.h:39
VALIDATION_RESULT::isValid
bool isValid
Definition
drc_rule_editor_enums.h:38
VALIDATION_RESULT::Merge
void Merge(const VALIDATION_RESULT &aOther)
Definition
drc_rule_editor_enums.h:47
src
pcbnew
drc
rule_editor
drc_rule_editor_enums.h
Generated on Sun Feb 1 2026 00:08:31 for KiCad PCB EDA Suite by
1.13.2