KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 The 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, see <https://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
23#include <wx/translation.h>
24
25struct CONVERT_SETTINGS;
26
27// Default values in mm for parameters in ZONE_SETTINGS
28#define ZONE_THERMAL_RELIEF_GAP_MM 0.5 // ZONE_SETTINGS::m_ThermalReliefGap
29#define ZONE_THERMAL_RELIEF_COPPER_WIDTH_MM 0.5 // ZONE_SETTINGS::m_ThermalReliefCopperBridge
30#define ZONE_THICKNESS_MM 0.25 // ZONE_SETTINGS::m_ZoneMinThickness
31#define ZONE_THICKNESS_MIN_VALUE_MM 0.025 // Minimum for ZONE_SETTINGS::m_ZoneMinThickness
32#define ZONE_CLEARANCE_MM 0.5 // ZONE_SETTINGS::m_ZoneClearance
33#define ZONE_CLEARANCE_MAX_VALUE_MM 100 // Maximum for ZONE_SETTINGS::m_ZoneClearance
34#define ZONE_BORDER_HATCH_DIST_MM 0.5 // ZONE_SETTINGS::m_BorderHatchPitch
35#define ZONE_BORDER_HATCH_MINDIST_MM 0.1 // Minimum for ZONE_SETTINGS::m_BorderHatchPitch
36#define ZONE_BORDER_HATCH_MAXDIST_MM 2.0 // Maximum for ZONE_SETTINGS::m_BorderHatchPitch
37
38
39#define ZONE_MANAGER_REPOUR 1005 //Reported if repour option is checked while clicking OK
40
50
51
52inline wxString PrintZoneConnection( ZONE_CONNECTION aConnection )
53{
54 switch( aConnection )
55 {
56 default:
57 case ZONE_CONNECTION::INHERITED: return _( "inherited" );
58 case ZONE_CONNECTION::NONE: return _( "none" );
59 case ZONE_CONNECTION::THERMAL: return _( "thermal reliefs" );
60 case ZONE_CONNECTION::FULL: return _( "solid" );
61 case ZONE_CONNECTION::THT_THERMAL: return _( "thermal reliefs for PTH" );
62 }
63}
64
65
66class ZONE;
67class ZONE_SETTINGS;
68class PCB_BASE_FRAME;
69class BOARD;
70
81 CONVERT_SETTINGS* aConvertSettings = nullptr );
82
93int InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE* aZone, ZONE_SETTINGS* aSettings,
94 CONVERT_SETTINGS* aConvertSettings = nullptr );
95
105int InvokeRuleAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings,
106 BOARD* aBoard = nullptr, CONVERT_SETTINGS* aConvertSettings = nullptr );
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:372
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
ZONE_SETTINGS handles zones parameters.
Handle a list of polygons defining a copper zone.
Definition zone.h:70
#define _(s)
@ NONE
Definition eda_shape.h:72
wxString PrintZoneConnection(ZONE_CONNECTION aConnection)
Definition zones.h:52
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.
ZONE_CONNECTION
How pads are covered by copper in zone.
Definition zones.h:43
@ THERMAL
Use thermal relief for pads.
Definition zones.h:46
@ THT_THERMAL
Thermal relief only for THT pads.
Definition zones.h:48
@ NONE
Pads are not covered.
Definition zones.h:45
@ FULL
pads are covered by copper
Definition zones.h:47
int InvokeRuleAreaEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aSettings, BOARD *aBoard=nullptr, CONVERT_SETTINGS *aConvertSettings=nullptr)
Function InvokeRuleAreaEditor invokes up a modal dialog window for copper zone editing.
int InvokeCopperZonesEditor(PCB_BASE_FRAME *aCaller, ZONE *aZone, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings=nullptr)
Function InvokeCopperZonesEditor invokes up a modal dialog window for copper zone editing.