KiCad PCB EDA Suite
zones.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) 2008-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 1992-2022 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
25#ifndef ZONES_H_
26#define ZONES_H_
27
28#include <wx/translation.h>
29
30struct CONVERT_SETTINGS;
31
32// Default values in mils for parameters in ZONE
33#define ZONE_THERMAL_RELIEF_GAP_MIL 20 // default value for ZONE_SETTINGS::m_ThermalReliefGap
34#define ZONE_THERMAL_RELIEF_COPPER_WIDTH_MIL 20 // default value for ZONE_SETTINGS::m_ThermalReliefCopperBridge
35#define ZONE_THICKNESS_MIL 10 // default value for ZONE_SETTINGS::m_ZoneMinThickness
36#define ZONE_THICKNESS_MIN_VALUE_MIL 1 // minimum acceptable value for ZONE_SETTINGS::m_ZoneMinThickness
37#define ZONE_CLEARANCE_MIL 20 // default value for ZONE_SETTINGS::m_ZoneClearance
38#define ZONE_CLEARANCE_MAX_VALUE_MIL 500 // maximum acceptable value for ZONE_SETTINGS::m_ZoneClearance
39#define ZONE_BORDER_HATCH_DIST_MIL 20 // default distance between hatches to draw hatched outlines
40#define ZONE_BORDER_HATCH_MINDIST_MM 0.1 // min distance between hatches to draw hatched outlines
41#define ZONE_BORDER_HATCH_MAXDIST_MM 2.0 // min distance between hatches to draw hatched outlines
42
43
44#define ZONE_EXPORT_VALUES 1004 // Copper zone dialog reports wxID_OK, wxID_CANCEL or
45 // ZONE_EXPORT_VALUES
46
47
50{
51 INHERITED = -1,
52 NONE,
53 THERMAL,
54 FULL,
56};
57
58
59inline wxString PrintZoneConnection( ZONE_CONNECTION aConnection )
60{
61 switch( aConnection )
62 {
63 default:
64 case ZONE_CONNECTION::INHERITED: return _( "inherited" );
65 case ZONE_CONNECTION::NONE: return _( "none" );
66 case ZONE_CONNECTION::THERMAL: return _( "thermal reliefs" );
67 case ZONE_CONNECTION::FULL: return _( "solid" );
68 case ZONE_CONNECTION::THT_THERMAL: return _( "thermal reliefs for PTH" );
69 }
70}
71
72
73class ZONE;
74class ZONE_SETTINGS;
75class PCB_BASE_FRAME;
76
87 CONVERT_SETTINGS* aConvertSettings = nullptr );
88
99 CONVERT_SETTINGS* aConvertSettings = nullptr );
100
110int InvokeRuleAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings,
111 CONVERT_SETTINGS* aConvertSettings = nullptr );
112
113#endif // ZONES_H_
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
ZONE_SETTINGS handles zones parameters.
Definition: zone_settings.h:70
Handle a list of polygons defining a copper zone.
Definition: zone.h:57
#define _(s)
wxString PrintZoneConnection(ZONE_CONNECTION aConnection)
Definition: zones.h:59
int InvokeNonCopperZonesEditor(PCB_BASE_FRAME *aParent, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings=nullptr)
Function InvokeNonCopperZonesEditor invokes up a modal dialog window for non-copper zone editing.
int InvokeRuleAreaEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings=nullptr)
Function InvokeRuleAreaEditor invokes up a modal dialog window for copper zone editing.
ZONE_CONNECTION
How pads are covered by copper in zone.
Definition: zones.h:50
@ THERMAL
Use thermal relief for pads.
@ THT_THERMAL
Thermal relief only for THT pads.
@ NONE
Pads are not covered.
@ FULL
pads are covered by copper
int InvokeCopperZonesEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings=nullptr)
Function InvokeCopperZonesEditor invokes up a modal dialog window for copper zone editing.