37 changed files with 884 additions and 739 deletions
-
26CHANGELOG.txt
-
2common/CMakeLists.txt
-
10common/pcbcommon.cpp
-
19include/class_board_design_settings.h
-
5include/wxBasePcbFrame.h
-
18include/wxPcbStruct.h
-
14pcbnew/basepcbframe.cpp
-
27pcbnew/class_board.cpp
-
8pcbnew/class_board.h
-
11pcbnew/class_board_design_settings.cpp
-
15pcbnew/class_netclass.cpp
-
2pcbnew/class_netclass.h
-
119pcbnew/class_pcb_layer_widget.cpp
-
67pcbnew/class_pcb_layer_widget.h
-
8pcbnew/class_zone.cpp
-
2pcbnew/class_zone.h
-
93pcbnew/class_zone_setting.h
-
49pcbnew/class_zone_settings.cpp
-
96pcbnew/class_zone_settings.h
-
290pcbnew/dialogs/dialog_copper_zones.cpp
-
88pcbnew/dialogs/dialog_copper_zones.h
-
2pcbnew/drc.cpp
-
12pcbnew/edit_track_width.cpp
-
23pcbnew/files.cpp
-
7pcbnew/ioascii.cpp
-
10pcbnew/item_io.cpp
-
20pcbnew/kicad_plugin.cpp
-
2pcbnew/layer_widget.cpp
-
3pcbnew/layer_widget.h
-
9pcbnew/moduleframe.cpp
-
17pcbnew/pcbframe.cpp
-
12pcbnew/pcbnew_config.cpp
-
4pcbnew/zone_filling_algorithm.cpp
-
66pcbnew/zones.h
-
329pcbnew/zones_by_polygon.cpp
-
28pcbnew/zones_by_polygon_fill_functions.cpp
-
110pcbnew/zones_non_copper_type_functions.cpp
@ -1,93 +0,0 @@ |
|||
/** |
|||
* @file class_zone_setting.h |
|||
* @brief Class ZONE_SETTING used to handle zones parameters in dialogs. |
|||
*/ |
|||
|
|||
#ifndef ZONE_SETTING_H |
|||
#define ZONE_SETTING_H |
|||
|
|||
|
|||
class ZONE_CONTAINER; |
|||
|
|||
|
|||
#define MAX_ZONE_CORNER_RADIUS 4000 |
|||
|
|||
|
|||
/** |
|||
* Class ZONE_SETTING |
|||
* handles zones parameters. |
|||
*/ |
|||
class ZONE_SETTING |
|||
{ |
|||
public: |
|||
enum { |
|||
SMOOTHING_NONE, |
|||
SMOOTHING_CHAMFER, |
|||
SMOOTHING_FILLET, |
|||
SMOOTHING_LAST |
|||
}; |
|||
|
|||
// Mode for filling zone : 1 use segments, 0 use polygons |
|||
int m_FillMode; |
|||
|
|||
int m_ZonePriority; // Priority (0 ... N) of the zone |
|||
|
|||
int m_ZoneClearance; // Clearance value |
|||
int m_ZoneMinThickness; // Min thickness value in filled areas |
|||
int m_NetcodeSelection; // Net code selection for the current zone |
|||
int m_CurrentZone_Layer; // Layer used to create the current zone |
|||
|
|||
// Option to show the zone area (outlines only, short hatches or full hatches |
|||
int m_Zone_HatchingStyle; |
|||
|
|||
// Option to select number of segments to approximate a circle 16 or 32 segments. |
|||
int m_ArcToSegmentsCount; |
|||
|
|||
long m_ThermalReliefGap; // thickness of the gap in thermal reliefs |
|||
long m_ThermalReliefCopperBridge; // thickness of the copper bridge in thermal reliefs |
|||
int m_Zone_Pad_Options; // How pads are covered by copper in zone |
|||
|
|||
private: |
|||
int cornerSmoothingType; // Corner smoothing type |
|||
unsigned int cornerRadius; // Corner chamfer distance / fillet radius |
|||
|
|||
public: |
|||
ZONE_SETTING( void ); |
|||
|
|||
/** |
|||
* Function ImportSetting |
|||
* copy settings from a given zone |
|||
* @param aSource: the given zone |
|||
*/ |
|||
void ImportSetting( const ZONE_CONTAINER& aSource ); |
|||
|
|||
/** |
|||
* Function ExportSetting |
|||
* copy settings to a given zone |
|||
* @param aTarget: the given zone |
|||
* @param aFullExport: if false: some parameters are NOT exported |
|||
* because they must not be exported when export settings from a zone to others zones |
|||
* Currently: |
|||
* m_NetcodeSelection |
|||
*/ |
|||
void ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport = true); |
|||
|
|||
void SetCornerSmoothingType( int aType) { cornerSmoothingType = aType; }; |
|||
|
|||
int GetCornerSmoothingType() const { return cornerSmoothingType; }; |
|||
|
|||
void SetCornerRadius( int aRadius ) |
|||
{ |
|||
if( aRadius > MAX_ZONE_CORNER_RADIUS ) |
|||
cornerRadius = MAX_ZONE_CORNER_RADIUS; |
|||
else if( aRadius < 0 ) |
|||
cornerRadius = 0; |
|||
else |
|||
cornerRadius = aRadius; |
|||
}; |
|||
|
|||
unsigned int GetCornerRadius() const { return cornerRadius; }; |
|||
}; |
|||
|
|||
|
|||
#endif // ifndef ZONE_SETTING_H |
|||
@ -0,0 +1,96 @@ |
|||
/** |
|||
* @file class_zone_settings.h |
|||
* @brief Class ZONE_SETTINGS used to handle zones parameters in dialogs. |
|||
*/ |
|||
|
|||
#ifndef ZONE_SETTINGS_H_ |
|||
#define ZONE_SETTINGS_H_ |
|||
|
|||
|
|||
class ZONE_CONTAINER; |
|||
|
|||
|
|||
#define MAX_ZONE_CORNER_RADIUS 4000 |
|||
|
|||
|
|||
/** |
|||
* Class ZONE_SETTINGS |
|||
* handles zones parameters. |
|||
*/ |
|||
class ZONE_SETTINGS |
|||
{ |
|||
public: |
|||
enum { |
|||
SMOOTHING_NONE, |
|||
SMOOTHING_CHAMFER, |
|||
SMOOTHING_FILLET, |
|||
SMOOTHING_LAST |
|||
}; |
|||
|
|||
/// Mode for filling zone : 1 use segments, 0 use polygons |
|||
int m_FillMode; |
|||
|
|||
int m_ZonePriority; ///< Priority (0 ... N) of the zone |
|||
|
|||
int m_ZoneClearance; ///< Clearance value |
|||
int m_ZoneMinThickness; ///< Min thickness value in filled areas |
|||
int m_NetcodeSelection; ///< Net code selection for the current zone |
|||
int m_CurrentZone_Layer; ///< Layer used to create the current zone |
|||
|
|||
/// Option to show the zone area (outlines only, short hatches or full hatches |
|||
int m_Zone_HatchingStyle; |
|||
|
|||
/// Option to select number of segments to approximate a circle 16 or 32 segments. |
|||
int m_ArcToSegmentsCount; |
|||
|
|||
long m_ThermalReliefGap; ///< thickness of the gap in thermal reliefs |
|||
long m_ThermalReliefCopperBridge; ///< thickness of the copper bridge in thermal reliefs |
|||
int m_Zone_Pad_Options; ///< How pads are covered by copper in zone |
|||
|
|||
bool m_Zone_45_Only; |
|||
|
|||
private: |
|||
int cornerSmoothingType; ///< Corner smoothing type |
|||
unsigned int cornerRadius; ///< Corner chamfer distance / fillet radius |
|||
|
|||
public: |
|||
ZONE_SETTINGS(); |
|||
|
|||
/** |
|||
* operator << ( const ZONE_CONTAINER& ) |
|||
* was Function ImportSetting |
|||
* copies settings from a given zone into this object. |
|||
* @param aSource: the given zone |
|||
*/ |
|||
ZONE_SETTINGS& operator << ( const ZONE_CONTAINER& aSource ); |
|||
|
|||
/** |
|||
* Function ExportSetting |
|||
* copy settings to a given zone |
|||
* @param aTarget: the given zone |
|||
* @param aFullExport: if false: some parameters are NOT exported |
|||
* because they must not be exported when export settings from a zone to others zones |
|||
* Currently: |
|||
* m_NetcodeSelection |
|||
*/ |
|||
void ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport = true ) const; |
|||
|
|||
void SetCornerSmoothingType( int aType) { cornerSmoothingType = aType; }; |
|||
|
|||
int GetCornerSmoothingType() const { return cornerSmoothingType; }; |
|||
|
|||
void SetCornerRadius( int aRadius ) |
|||
{ |
|||
if( aRadius > MAX_ZONE_CORNER_RADIUS ) |
|||
cornerRadius = MAX_ZONE_CORNER_RADIUS; |
|||
else if( aRadius < 0 ) |
|||
cornerRadius = 0; |
|||
else |
|||
cornerRadius = aRadius; |
|||
}; |
|||
|
|||
unsigned int GetCornerRadius() const { return cornerRadius; }; |
|||
}; |
|||
|
|||
|
|||
#endif // ZONE_SETTINGS_H_ |
|||
@ -1,88 +0,0 @@ |
|||
/* dialog_copper_zones.h */ |
|||
|
|||
#ifndef DIALOG_COPPER_ZONES_ |
|||
#define DIALOG_COPPER_ZONES_ |
|||
|
|||
#include <wx/wx.h> |
|||
#include <wx/listctrl.h> |
|||
#include <dialog_copper_zones_base.h> |
|||
|
|||
/** |
|||
* Class DIALOG_COPPER_ZONE |
|||
* is the derivated class from dialog_copper_zone_frame created by wxFormBuilder |
|||
*/ |
|||
class DIALOG_COPPER_ZONE : public DIALOG_COPPER_ZONE_BASE |
|||
{ |
|||
private: |
|||
PCB_EDIT_FRAME* m_Parent; |
|||
wxConfig* m_Config; ///< Current config |
|||
|
|||
int m_OnExitCode; ///< exit code: ZONE_ABORT if no change, |
|||
///< ZONE_OK if new values accepted |
|||
///< ZONE_EXPORT_VALUES if values are exported to others zones |
|||
|
|||
ZONE_SETTING* m_Zone_Setting; |
|||
|
|||
bool m_NetSortingByPadCount; ///< false = alphabetic sort. |
|||
///< true = pad count sort. |
|||
|
|||
long m_NetFiltering; |
|||
std::vector<int> m_LayerId; ///< Handle the real layer number from layer |
|||
///< name position in m_LayerSelectionCtrl |
|||
|
|||
static wxString m_netNameShowFilter; ///< the filter to show nets (default * "*"). |
|||
///< static to keep this pattern for an entire pcbnew session |
|||
|
|||
wxListView* m_LayerSelectionCtrl; |
|||
|
|||
static wxPoint prevPosition; ///< Dialog position & size |
|||
static wxSize prevSize; |
|||
|
|||
public: |
|||
DIALOG_COPPER_ZONE( PCB_EDIT_FRAME* parent, ZONE_SETTING* zone_setting ); |
|||
private: |
|||
|
|||
/** |
|||
* Function initDialog |
|||
* fills in the dialog controls using the current settings. |
|||
*/ |
|||
void initDialog(); |
|||
|
|||
void OnButtonOkClick( wxCommandEvent& event ); |
|||
void OnButtonCancelClick( wxCommandEvent& event ); |
|||
void OnClose( wxCloseEvent& event ); |
|||
void OnSize( wxSizeEvent& event ); |
|||
void OnCornerSmoothingModeChoice( wxCommandEvent& event ); |
|||
|
|||
/** |
|||
* Function AcceptOptions |
|||
* @param aPromptForErrors is true to prompt user on incorrect params. |
|||
* @param aUseExportableSetupOnly is true to use exportable parametres only (used to export this setup to other zones). |
|||
* @return bool - false if incorrect options, true if ok. |
|||
*/ |
|||
bool AcceptOptions( bool aPromptForErrors, bool aUseExportableSetupOnly = false ); |
|||
|
|||
void OnNetSortingOptionSelected( wxCommandEvent& event ); |
|||
void ExportSetupToOtherCopperZones( wxCommandEvent& event ); |
|||
void OnPadsInZoneClick( wxCommandEvent& event ); |
|||
void OnRunFiltersButtonClick( wxCommandEvent& event ); |
|||
|
|||
|
|||
void buildAvailableListOfNets(); |
|||
|
|||
/** |
|||
* Function initListNetsParams |
|||
* initializes m_NetSortingByPadCount and m_NetFiltering values |
|||
* according to m_NetDisplayOption selection. |
|||
*/ |
|||
void initListNetsParams(); |
|||
|
|||
/** |
|||
* Function makeLayerBitmap |
|||
* creates the colored rectangle bitmaps used in the layer selection widget. |
|||
* @param aColor is the color to fill the rectangle with. |
|||
*/ |
|||
wxBitmap makeLayerBitmap( int aColor ); |
|||
}; |
|||
|
|||
#endif // DIALOG_COPPER_ZONES_ |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue