KiCad PCB EDA Suite
panel_setup_feature_constraints.cpp
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) 2018 KiCad Developers, see change_log.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 
25 #include <fctsys.h>
26 #include <pcb_edit_frame.h>
27 #include <board_design_settings.h>
28 
30 
31 
33  PCB_EDIT_FRAME* aFrame ) :
34  PANEL_SETUP_FEATURE_CONSTRAINTS_BASE( aParent->GetTreebook() ),
35  m_trackMinWidth( aFrame, m_TrackMinWidthTitle, m_TrackMinWidthCtrl, m_TrackMinWidthUnits, true, 0 ),
36  m_viaMinSize( aFrame, m_ViaMinTitle, m_SetViasMinSizeCtrl, m_ViaMinUnits, true, 0 ),
37  m_viaMinDrill( aFrame, m_ViaMinDrillTitle, m_SetViasMinDrillCtrl, m_ViaMinDrillUnits, true, 0 ),
38  m_uviaMinSize( aFrame, m_uviaMinSizeLabel, m_uviaMinSizeCtrl, m_uviaMinSizeUnits, true, 0 ),
39  m_uviaMinDrill( aFrame, m_uviaMinDrillLabel, m_uviaMinDrillCtrl, m_uviaMinDrillUnits, true, 0 ),
40  m_holeToHoleMin( aFrame, m_HoleToHoleTitle, m_SetHoleToHoleCtrl, m_HoleToHoleUnits, true, 0 )
41 {
42  m_Frame = aFrame;
44 }
45 
46 
48 {
52 
55 
58 
60 
63 
64  return true;
65 }
66 
67 
69 {
70  // Update tracks minimum values for DRC
72 
73  // Update vias minimum values for DRC
76 
79 
80  // Update microvias minimum values for DRC
83 
85 
88 
89  return true;
90 }
91 
92 
94 {
95  BOARD_DESIGN_SETTINGS* savedSettings = m_BrdSettings;
96 
97  m_BrdSettings = &aBoard->GetDesignSettings();
99 
100  m_BrdSettings = savedSettings;
101 }
bool m_ProhibitOverlappingCourtyards
check for overlapping courtyards in DRC
BOARD * GetBoard() const
virtual int GetValue()
Function GetValue Returns the current value in Internal Units.
int m_HoleToHoleMin
Min width of peninsula between two drilled holes.
void SetMinHoleSeparation(int aDistance)
Function SetMinHoleSeparation.
int m_TrackMinWidth
track min value for width ((min copper size value
int m_ViasMinSize
vias (not micro vias) min diameter
int m_ViasMinDrill
vias (not micro vias) min drill diameter
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:538
bool m_BlindBuriedViaAllowed
true to allow blind/buried vias
Class PANEL_SETUP_FEATURE_CONSTRAINTS_BASE.
int m_MicroViasMinSize
micro vias (not vias) min diameter
bool m_RequireCourtyards
require courtyard definitions in footprints
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:170
void SetProhibitOverlappingCourtyards(bool aProhibit)
Function SetProhibitOverlappingCourtyards.
virtual void SetValue(int aValue)
Function SetValue Sets new value (in Internal Units) for the text field, taking care of units convers...
Class PCB_EDIT_FRAME is the main frame for Pcbnew.
PANEL_SETUP_FEATURE_CONSTRAINTS(PAGED_DIALOG *aParent, PCB_EDIT_FRAME *aFrame)
bool m_MicroViasAllowed
true to allow micro vias
void SetRequireCourtyardDefinitions(bool aRequire)
Function SetRequireCourtyardDefinitions.
int m_MicroViasMinDrill
micro vias (not vias) min drill diameter
Class BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.