KiCad PCB EDA Suite
pcbnew.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) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
29 #ifndef PCBNEW_H
30 #define PCBNEW_H
31 
32 
33 #include <fctsys.h> // wxWidgets include.
34 #include <base_struct.h> // IS_DRAGGED and IN_EDIT definitions.
35 #include <dlist.h>
36 #include <convert_to_biu.h> // to define Mils2iu() conversion function
38 
39 // Arcs are approximated by segments: define the number of segments per 360 deg (KiCad uses 0.1
40 // deg approximation). Be aware 3600 / ARC_APPROX_SEGMENTS_COUNT_LOW_DEF is an integer.
41 #define ARC_APPROX_SEGMENTS_COUNT_LOW_DEF 16
42 #define ARC_APPROX_SEGMENTS_COUNT_HIGH_DEF 32
43 
44 // The new absolute-error-based algorithm uses the stored segment count as a hint on whether
45 // to use ARC_HIGH_DEF or ARC_LOW_DEF. This defines the crossover point.
46 #define SEGMENT_COUNT_CROSSOVER 24
47 
48 /* Flag used in locate functions. The locate ref point is the on grid cursor or the off
49  * grid mouse cursor. */
50 #define CURSEUR_ON_GRILLE (0 << 0)
51 #define CURSEUR_OFF_GRILLE (1 << 0)
52 
53 #define IGNORE_LOCKED (1 << 1)
54 #define MATCH_LAYER (1 << 2)
55 #define VISIBLE_ONLY (1 << 3)
56 
57 #define DIM_ANCRE_MODULE 3 // Anchor size (footprint center)
58 
59 
60 // These are only here for algorithmic safety, not to tell the user what to do
61 #define TEXTS_MIN_SIZE Mils2iu( 1 )
62 #define TEXTS_MAX_SIZE Mils2iu( 10000 )
63 #define TEXTS_MAX_WIDTH Mils2iu( 10000 )
64 
65 
66 // Flag to force the SKETCH mode to display items (.m_Flags member)
67 #define FORCE_SKETCH ( IS_DRAGGED | IN_EDIT )
68 
69 /* Name of the document footprint list
70  * usually located in share/modules/footprints_doc
71  * this is of the responsibility to users to create this file
72  * if they want to have a list of footprints
73  * default is "footprints_doc/footprints.pdf"
74  */
75 extern wxString g_DocModulesFileName;
76 
77 // variables
78 extern bool g_Raccord_45_Auto;
79 extern bool g_Alternate_Track_Posture;
80 // Layer pair for auto routing and switch layers by hotkey
83 
84 extern wxPoint g_Offset_Module; // Offset trace when moving footprint.
85 
87 class TRACK;
89 #define g_CurrentTrackSegment g_CurrentTrackList.GetLast()
90 #define g_FirstTrackSegment g_CurrentTrackList.GetFirst()
91 
92 
93 
102 
103 
104 #endif // PCBNEW_H
wxPoint g_Offset_Module
Definition: pcbnew.cpp:76
wxString g_DocModulesFileName
Definition: pcbnew.cpp:83
PCB_LAYER_ID
A quick note on layer IDs:
DLIST< TRACK > g_CurrentTrackList
Definition: pcbnew.cpp:91
void PythonPluginsReloadBase()
Helper function PythonPluginsReloadBase Reload Python plugins if they are newer than the already load...
Definition: pcbnew.cpp:304
bool g_Alternate_Track_Posture
Definition: pcbnew.cpp:73
Board layer functions and definitions.
bool g_Raccord_45_Auto
Definition: pcbnew.cpp:74
Basic classes for most KiCad items.
PCB_LAYER_ID g_Route_Layer_BOTTOM
Definition: pcbnew.cpp:72
PCB_LAYER_ID g_Route_Layer_TOP
Definition: pcbnew.cpp:71