From 4e5a94efb736e6f974cccead4b006fe7fb6d2271 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 30 Apr 2019 13:16:29 +0200 Subject: [PATCH] Pcbnew, non copper zones: fix 2 issues. 1 - For debug purposes, the code to fill non copper zones was disabled and the copper zone code was uses instead. It creates issues with pad clearance areas, because a non copper zone has no clearance areas. 2 - The non copper zone dialog had no option to set the outline smoothing option. Unfortunately, this parameter was inherited from the last edited copper zone. And therefore the non copper zone can have a non wanted outline smoothing option. This option is now added to the dialog. Fixes: lp:1826952 https://bugs.launchpad.net/kicad/+bug/1826952 --- pcbnew/dialogs/dialog_copper_zones.cpp | 6 +- pcbnew/dialogs/dialog_copper_zones_base.fbp | 5086 ++++++++--------- .../dialog_non_copper_zones_properties.cpp | 31 +- ...ialog_non_copper_zones_properties_base.cpp | 49 +- ...ialog_non_copper_zones_properties_base.fbp | 473 +- .../dialog_non_copper_zones_properties_base.h | 10 +- pcbnew/zone_filler.cpp | 14 +- 7 files changed, 3114 insertions(+), 2555 deletions(-) diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index 56a79320f1..dc02e889af 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -246,6 +246,8 @@ void DIALOG_COPPER_ZONE::OnUpdateUI( wxUpdateUIEvent& ) else m_cornerRadiusLabel->SetLabel( _( "Fillet radius:" ) ); } + + m_cornerRadiusCtrl->Enable(m_cornerSmoothingType > ZONE_SETTINGS::SMOOTHING_NONE ); } @@ -342,7 +344,9 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aUseExportableSetupOnly ) m_settings.m_ZoneMinThickness = m_minWidth.GetValue(); m_settings.SetCornerSmoothingType( m_cornerSmoothingChoice->GetSelection() ); - m_settings.SetCornerRadius( m_cornerRadius.GetValue() ); + + m_settings.SetCornerRadius( m_settings.GetCornerSmoothingType() == ZONE_SETTINGS::SMOOTHING_NONE + ? 0 : m_cornerRadius.GetValue() ); m_settings.m_ZonePriority = m_PriorityLevelCtrl->GetValue(); diff --git a/pcbnew/dialogs/dialog_copper_zones_base.fbp b/pcbnew/dialogs/dialog_copper_zones_base.fbp index 291af7c597..9987fa3f4e 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.fbp +++ b/pcbnew/dialogs/dialog_copper_zones_base.fbp @@ -1,8 +1,8 @@ - + - + C++ 1 source_name @@ -16,9 +16,9 @@ none 1 dialog_copper_zones_base - + . - + 1 1 1 @@ -29,67 +29,67 @@ 0 wxAUI_MGR_DEFAULT - - - + + + 1 1 impl_virtual - - - + + + 0 ID_DIALOG_COPPER_ZONE_BASE - - + + DIALOG_COPPER_ZONE_BASE - + 825,528 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Copper Zone Properties - - - - - - - - - - - - - + + + + + + + + + + + + + OnClose - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + OnUpdateUI - + m_MainBoxSizer wxVERTICAL protected @@ -98,7 +98,7 @@ wxEXPAND|wxRIGHT|wxLEFT 1 - + m_OptionsBoxSizer wxHORIZONTAL none @@ -109,78 +109,78 @@ wxID_ANY Layer - + sbSizer2 wxVERTICAL 1 none - + 5 wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 1 - - + + 1 1 - - + + 0 wxID_ANY - + 120,-1 m_layers protected - - + + wxDV_NO_HEADER ; forward_declare - - - + + + wxBORDER_SIMPLE - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + OnLayerSelection - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -192,12 +192,12 @@ wxID_ANY Net - + sbSizer3 wxHORIZONTAL 1 none - + 5 wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT @@ -207,83 +207,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 - + 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 ID_NETNAME_SELECTION - + 0 - - + + 0 - + 1 m_ListNetNameSelection 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -291,7 +291,7 @@ wxEXPAND 0 - + bFilteringSizer wxVERTICAL none @@ -304,78 +304,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Hide nets matching: - + 0 - - + + 0 - + 1 m_staticTextDisplay 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -387,86 +387,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 ID_TEXTCTRL_NETNAMES_FILTER - + 0 - + 0 - + 0 180,-1 1 m_DoNotShowNetNameFilter 1 - - + + protected 1 - + Resizable 1 - + wxTE_PROCESS_ENTER - + 0 Pattern to filter net names in filtered list. Net names matching this pattern are not displayed. - + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnRunFiltersButtonClick - - - + + + @@ -478,78 +478,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Show nets matching: - + 0 - - + + 0 - + 1 m_staticTextVFilter 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -561,86 +561,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 ID_TEXTCTRL_NETNAMES_FILTER - + 0 - + 0 - + 0 - + 1 m_ShowNetNameFilter 1 - - + + protected 1 - + Resizable 1 - + wxTE_PROCESS_ENTER - + 0 Pattern to filter net names in filtered list. Only net names matching this pattern are displayed. - + wxFILTER_NONE wxDefaultValidator - + * - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + OnRunFiltersButtonClick - - - + + + @@ -652,17 +652,17 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 0 @@ -670,65 +670,65 @@ 0 Left 1 - + 1 - + 0 0 wxID_APPLY_FILTERS Apply Filters - + 0 - - + + 0 - + 1 m_buttonRunFilter 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnRunFiltersButtonClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -750,83 +750,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Show all nets - + 0 - - + + 0 - + 1 m_showAllNetsOpt 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + OnNetSortingOptionSelected - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -848,83 +848,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Sort nets by pad count - + 0 - - + + 0 - + 1 m_sortByPadsOpt 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + OnNetSortingOptionSelected - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -932,7 +932,7 @@ wxEXPAND|wxRESERVE_SPACE_EVEN_IF_HIDDEN|wxTOP 1 - + m_bNoNetWarning wxHORIZONTAL protected @@ -945,76 +945,76 @@ 1 1 1 - - - - - - - - + + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_bitmapNoNetWarning 1 - - + + protected 1 - + Resizable 1 - + ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1026,78 +1026,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY No net will result in an unconnected copper island. - + 0 - - + + 0 - + 1 m_staticText18 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1113,7 +1113,7 @@ wxEXPAND 0 - + bSizerMiddle wxHORIZONTAL none @@ -1124,23 +1124,23 @@ wxID_ANY Settings - + m_ExportableSetupSizer wxHORIZONTAL 1 none - + 5 wxEXPAND|wxRIGHT|wxLEFT 0 - + wxBOTH 1 - + 0 - + gbSizer1 wxFLEX_GROWMODE_SPECIFIED none @@ -1157,83 +1157,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Constrain outline to H, V and 45 degrees - + 0 - - + + 0 - + 1 m_constrainOutline 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1248,78 +1248,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Corner smoothing: - + 0 - - + + 0 - + 1 m_staticTextSmoothing 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1334,83 +1334,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 "None" "Chamfer" "Fillet" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 ID_CORNER_SMOOTHING - + 0 - - + + 0 - + 1 m_cornerSmoothingChoice 1 - - + + protected 1 - + Resizable 0 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1425,78 +1425,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Chamfer distance: - + 0 - - + + 0 - + 1 m_cornerRadiusLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1511,86 +1511,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 ID_M_CORNERSMOOTHINGCTRL - + 0 - + 0 - + 0 -1,-1 1 m_cornerRadiusCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1605,78 +1605,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY units - + 0 - - + + 0 - + 1 m_cornerRadiusUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1691,78 +1691,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Zone priority level: - + 0 - - + + 0 - + 1 m_staticTextPriorityLevel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Zones are filled by priority level, level 3 has higher priority than level 2. When a zone is inside another zone: * If its priority is higher, its outlines are removed from the other zone. * If its priority is equal, a DRC error is set. - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1777,83 +1777,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 ID_M_PRIORITYLEVELCTRL 0 100 - + 0 - + 0 - + 0 - + 1 m_PriorityLevelCtrl 1 - - + + protected 1 - + Resizable 1 - + wxSP_ARROW_KEYS - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1868,78 +1868,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Outline display: - + 0 - - + + 0 - + 1 m_staticTextStyle 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1954,83 +1954,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 "Line" "Hatched" "Fully hatched" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 ID_M_OUTLINEAPPEARANCECTRL - + 0 - - + + 0 - + 1 m_OutlineAppearanceCtrl 1 - - + + protected 1 - + Resizable 0 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2040,12 +2040,12 @@ wxEXPAND|wxRIGHT|wxLEFT 0 - + wxBOTH 1 - + 0 - + gbSizerSettings wxFLEX_GROWMODE_SPECIFIED none @@ -2062,78 +2062,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Clearance: - + 0 - - + + 0 - + 1 m_clearanceLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2148,86 +2148,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 -1,-1 1 m_clearanceCtrl 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2242,78 +2242,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY units - + 0 - - + + 0 - + 1 m_clearanceUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2328,78 +2328,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Minimum width: - + 0 - - + + 0 - + 1 m_minWidthLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Minimum thickness of filled areas. - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2414,86 +2414,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_minWidthCtrl 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2508,78 +2508,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY units - + 0 - - + + 0 - + 1 m_minWidthUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2594,78 +2594,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Pad connections: - + 0 - - + + 0 - + 1 m_connectionLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Default pad connection type to zone. This setting can be overridden by local pad settings - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2680,83 +2680,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 "Solid" "Thermal reliefs" "Reliefs for PTH" "None" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 ID_M_PADINZONEOPT - + 0 - - + + 0 - + 1 m_PadInZoneOpt 1 - - + + protected 1 - + Resizable 0 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2771,78 +2771,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Thermal clearance: - + 0 - - + + 0 - + 1 m_antipadLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2857,86 +2857,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANTIPAD_SIZE - + 0 - + 0 - + 0 - + 1 m_antipadCtrl 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Clearance between pads in the same net and filled areas. - + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2951,78 +2951,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY units - + 0 - - + + 0 - + 1 m_antipadUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -3037,78 +3037,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Thermal spoke width: - + 0 - - + + 0 - + 1 m_spokeWidthLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -3123,86 +3123,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_COPPER_BRIDGE_VALUE - + 0 - + 0 - + 0 - + 1 m_spokeWidthCtrl 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Width of copper in thermal reliefs. - + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3217,78 +3217,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY units - + 0 - - + + 0 - + 1 m_spokeWidthUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -3302,12 +3302,12 @@ wxID_ANY Style - + sbSizerZoneStyle wxVERTICAL 1 none - + 5 wxEXPAND @@ -3316,9 +3316,9 @@ 3 wxBOTH 1 - + 0 - + fgSizerZoneStyle wxFLEX_GROWMODE_SPECIFIED none @@ -3333,78 +3333,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Fill type: - + 0 - - + + 0 - + 1 m_staticTextGridFillType 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -3416,83 +3416,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 "Solid shape" "Hatch pattern" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_GridStyleCtrl 1 - - + + protected 1 - + Resizable 0 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + OnStyleSelection - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -3514,78 +3514,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Orientation: - + 0 - - + + 0 - + 1 m_staticTextGrindOrient 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -3597,86 +3597,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_tcGridStyleOrientation 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3688,78 +3688,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY degree - + 0 - - + + 0 - + 1 m_staticTextRotUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -3771,78 +3771,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Hatch width: - + 0 - - + + 0 - + 1 m_staticTextStyleThickness 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -3854,86 +3854,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_tcGridStyleThickness 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3945,78 +3945,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY units - + 0 - - + + 0 - + 1 m_GridStyleThicknessUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -4028,78 +4028,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Hatch gap: - + 0 - - + + 0 - + 1 m_staticTextGridGap 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -4111,86 +4111,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_tcGridStyleGap 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4202,78 +4202,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY units - + 0 - - + + 0 - + 1 m_GridStyleGapUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -4285,78 +4285,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Smoothing effort: - + 0 - - + + 0 - + 1 m_staticTextGridSmoothingLevel 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 Value of smoothing effort 0 = no smoothing 1 = chamfer 2 = round corners 3 = round corners (finer shape) - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -4368,83 +4368,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY 0 3 - + 0 - + 0 - + 0 - + 1 m_spinCtrlSmoothLevel 1 - - + + protected 1 - + Resizable 1 - + wxSP_ARROW_KEYS ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4466,78 +4466,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Smooth value (0..1): - + 0 - - + + 0 - + 1 m_staticTextGridSmootingVal 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 Ratio between smoothed corners size and the gap between lines 0 = no smoothing 1.0 = max radius/chamfer size (half gap value) - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -4549,82 +4549,82 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY 0.1 0.100000 1 - + 0 - + 0 - + 0 - + 1 m_spinCtrlSmoothValue 1 - - + + protected 1 - + Resizable 1 - + wxSP_ARROW_KEYS ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4648,7 +4648,7 @@ wxEXPAND|wxLEFT 0 - + bSizerbottom wxHORIZONTAL none @@ -4661,17 +4661,17 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 0 @@ -4679,65 +4679,65 @@ 0 Left 1 - + 1 - + 0 0 wxID_BUTTON_EXPORT Export Settings to Other Zones - + 0 - - + + 0 - + 1 m_ExportSetupButton 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Export this zone setup (excluding layer and net selection) to all other copper zones. - + wxFILTER_NONE wxDefaultValidator - - - - + + + + ExportSetupToOtherCopperZones - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -4753,17 +4753,17 @@ 1 0 0 - + m_sdbSizer protected - + OnButtonCancelClick - - - - - - + + + + + + diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp index 84d71fd7d9..36632bc8a9 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp @@ -47,12 +47,15 @@ private: UNIT_BINDER m_gridStyleRotation; UNIT_BINDER m_gridStyleThickness; UNIT_BINDER m_gridStyleGap; + int m_cornerSmoothingType; + UNIT_BINDER m_cornerRadius; bool TransferDataToWindow() override; bool TransferDataFromWindow() override; void OnStyleSelection( wxCommandEvent& event ) override; void OnLayerSelection( wxDataViewEvent& event ) override; + void OnUpdateUI( wxUpdateUIEvent& ) override; public: DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings ); @@ -76,7 +79,9 @@ DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME* false ), m_gridStyleThickness( aParent, m_staticTextStyleThickness, m_tcGridStyleThickness, m_GridStyleThicknessUnits, false), - m_gridStyleGap( aParent, m_staticTextGridGap, m_tcGridStyleGap, m_GridStyleGapUnits, false ) + m_gridStyleGap( aParent, m_staticTextGridGap, m_tcGridStyleGap, m_GridStyleGapUnits, false ), + m_cornerSmoothingType( ZONE_SETTINGS::SMOOTHING_UNDEFINED ), + m_cornerRadius( aParent, m_cornerRadiusLabel, m_cornerRadiusCtrl, m_cornerRadiusUnits, true ) { m_parent = aParent; @@ -90,8 +95,27 @@ DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME* } +void DIALOG_NON_COPPER_ZONES_EDITOR::OnUpdateUI( wxUpdateUIEvent& ) +{ + if( m_cornerSmoothingType != m_cornerSmoothingChoice->GetSelection() ) + { + m_cornerSmoothingType = m_cornerSmoothingChoice->GetSelection(); + + if( m_cornerSmoothingChoice->GetSelection() == ZONE_SETTINGS::SMOOTHING_CHAMFER ) + m_cornerRadiusLabel->SetLabel( _( "Chamfer distance:" ) ); + else + m_cornerRadiusLabel->SetLabel( _( "Fillet radius:" ) ); + } + + m_cornerRadiusCtrl->Enable(m_cornerSmoothingType > ZONE_SETTINGS::SMOOTHING_NONE ); +} + + bool DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow() { + m_cornerSmoothingChoice->SetSelection( m_settings.GetCornerSmoothingType() ); + m_cornerRadius.SetValue( m_settings.GetCornerRadius() ); + m_minWidth.SetValue( m_settings.m_ZoneMinThickness ); m_ConstrainOpt->SetValue( m_settings.m_Zone_45_Only ); @@ -182,6 +206,11 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::OnLayerSelection( wxDataViewEvent& event ) bool DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataFromWindow() { + m_settings.SetCornerSmoothingType( m_cornerSmoothingChoice->GetSelection() ); + + m_settings.SetCornerRadius( m_settings.GetCornerSmoothingType() == ZONE_SETTINGS::SMOOTHING_NONE + ? 0 : m_cornerRadius.GetValue() ); + if( !m_gridStyleRotation.Validate( -1800, 1800 ) ) return false; diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp index df6dfe4b1d..c96aa9e896 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp @@ -153,7 +153,52 @@ DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( fgSizer1->Add( m_spinCtrlSmoothValue, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - bSizerMiddle->Add( fgSizer1, 1, wxEXPAND, 5 ); + bSizerMiddle->Add( fgSizer1, 0, wxEXPAND, 5 ); + + m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerMiddle->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 ); + + m_staticTextOutlineSmooth = new wxStaticText( this, wxID_ANY, _("Zone Outline Smooth:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextOutlineSmooth->Wrap( -1 ); + m_staticTextOutlineSmooth->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + + bSizerMiddle->Add( m_staticTextOutlineSmooth, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxFlexGridSizer* fgSizerOutlineSettings; + fgSizerOutlineSettings = new wxFlexGridSizer( 0, 3, 0, 0 ); + fgSizerOutlineSettings->AddGrowableCol( 1 ); + fgSizerOutlineSettings->SetFlexibleDirection( wxBOTH ); + fgSizerOutlineSettings->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticTextSmoothing = new wxStaticText( this, wxID_ANY, _("Outline smooth:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSmoothing->Wrap( -1 ); + fgSizerOutlineSettings->Add( m_staticTextSmoothing, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") }; + int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString ); + m_cornerSmoothingChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 ); + m_cornerSmoothingChoice->SetSelection( 0 ); + fgSizerOutlineSettings->Add( m_cornerSmoothingChoice, 0, wxALL|wxEXPAND, 5 ); + + + fgSizerOutlineSettings->Add( 0, 0, 0, 0, 5 ); + + m_cornerRadiusLabel = new wxStaticText( this, wxID_ANY, _("Chamfer distance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cornerRadiusLabel->Wrap( -1 ); + fgSizerOutlineSettings->Add( m_cornerRadiusLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_cornerRadiusCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerOutlineSettings->Add( m_cornerRadiusCtrl, 0, wxALL|wxEXPAND, 5 ); + + m_cornerRadiusUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cornerRadiusUnits->Wrap( -1 ); + fgSizerOutlineSettings->Add( m_cornerRadiusUnits, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + + fgSizerOutlineSettings->Add( 0, 0, 0, 0, 5 ); + + + bSizerMiddle->Add( fgSizerOutlineSettings, 0, wxEXPAND, 5 ); m_UpperSizer->Add( bSizerMiddle, 0, wxEXPAND|wxALL, 10 ); @@ -180,6 +225,7 @@ DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( this->Centre( wxBOTH ); // Connect Events + this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnUpdateUI ) ); m_layers->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnLayerSelection ), NULL, this ); m_GridStyleCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnStyleSelection ), NULL, this ); } @@ -187,6 +233,7 @@ DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::~DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE() { // Disconnect Events + this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnUpdateUI ) ); m_layers->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnLayerSelection ), NULL, this ); m_GridStyleCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnStyleSelection ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp index 27f0146070..3074e42d75 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp @@ -45,7 +45,7 @@ DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE - 547,379 + 595,491 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Non Copper Zones Properties @@ -53,6 +53,7 @@ wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN + OnUpdateUI m_MainSizer @@ -708,7 +709,7 @@ 5 wxEXPAND - 1 + 0 3 wxBOTH @@ -1675,6 +1676,474 @@ + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline3 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; ; forward_declare + 0 + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,-1,70,0 + 0 + 0 + wxID_ANY + Zone Outline Smooth: + 0 + + 0 + + + 0 + + 1 + m_staticTextOutlineSmooth + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND + 0 + + 3 + wxBOTH + 1 + + 0 + + fgSizerOutlineSettings + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Outline smooth: + 0 + + 0 + + + 0 + + 1 + m_staticTextSmoothing + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "None" "Chamfer" "Fillet" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_cornerSmoothingChoice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + + 0 + + 0 + protected + 0 + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Chamfer distance: + 0 + + 0 + + + 0 + + 1 + m_cornerRadiusLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_cornerRadiusCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + units + 0 + + 0 + + + 0 + + 1 + m_cornerRadiusUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + + 0 + + 0 + protected + 0 + + + + diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h index 0d3ece8b6e..6d7c92995e 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h @@ -63,19 +63,27 @@ class DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE : public DIALOG_SHIM wxSpinCtrl* m_spinCtrlSmoothLevel; wxStaticText* m_staticTextGridSmootingVal; wxSpinCtrlDouble* m_spinCtrlSmoothValue; + wxStaticLine* m_staticline3; + wxStaticText* m_staticTextOutlineSmooth; + wxStaticText* m_staticTextSmoothing; + wxChoice* m_cornerSmoothingChoice; + wxStaticText* m_cornerRadiusLabel; + wxTextCtrl* m_cornerRadiusCtrl; + wxStaticText* m_cornerRadiusUnits; wxStaticLine* m_staticline1; wxStdDialogButtonSizer* m_sdbSizerButtons; wxButton* m_sdbSizerButtonsOK; wxButton* m_sdbSizerButtonsCancel; // Virtual event handlers, overide them in your derived class + virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnLayerSelection( wxDataViewEvent& event ) { event.Skip(); } virtual void OnStyleSelection( wxCommandEvent& event ) { event.Skip(); } public: - DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Non Copper Zones Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 547,379 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN ); + DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Non Copper Zones Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 595,491 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN ); ~DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE(); }; diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index 3e2e3fec54..497eeaa52c 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -847,21 +847,23 @@ bool ZONE_FILLER::fillSingleZone( ZONE_CONTAINER* aZone, SHAPE_POLY_SET& aRawPol if ( !aZone->BuildSmoothedPoly( smoothedPoly ) ) return false; -#if 0 if( aZone->IsOnCopperLayer() ) { computeRawFilledAreas( aZone, smoothedPoly, aRawPolys, aFinalPolys ); } else { + aFinalPolys.Inflate( -aZone->GetMinThickness() / 2, ARC_APPROX_SEGMENTS_COUNT_HIGH_DEF ); + + // Remove the non filled areas due to the hatch pattern + if( aZone->GetFillMode() == ZFM_HATCH_PATTERN ) + addHatchFillTypeOnZone( aZone, smoothedPoly ); + aRawPolys = smoothedPoly; aFinalPolys = smoothedPoly; - aFinalPolys.Inflate( -aZone->GetMinThickness() / 2, ARC_APPROX_SEGMENTS_COUNT_HIGH_DEF ); - aFinalPolys.Fracture( SHAPE_POLY_SET::PM_FAST ); + aFinalPolys.Fracture( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE ); } -#else - computeRawFilledAreas( aZone, smoothedPoly, aRawPolys, aFinalPolys ); -#endif + aZone->SetNeedRefill( false ); return true; }