From f1284bd73c175ecf0895f27452afc12322a4c860 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 29 May 2012 13:10:56 -0500 Subject: [PATCH] Mostly EAGLE_PLUGIN work: * Derive the pcbnew copper zone and non-copper zone dialog windows from DIAG_SHIM, which injects some template code. * Update UIpolicies.txt to talk about DIALOG_SHIM support. * Add zone support to eagle_plugin. * Organize ZONE_CONTAINER class declaration for future privacy and accessors. --- Documentation/guidelines/UIpolicies.txt | 8 + pcbnew/class_board.cpp | 2 +- pcbnew/class_zone.cpp | 8 +- pcbnew/class_zone.h | 114 +- pcbnew/dialogs/dialog_copper_zones.cpp | 23 +- pcbnew/dialogs/dialog_copper_zones_base.cpp | 524 +- pcbnew/dialogs/dialog_copper_zones_base.fbp | 6933 ++++++++--------- pcbnew/dialogs/dialog_copper_zones_base.h | 263 +- ...ialog_non_copper_zones_properties_base.cpp | 11 +- ...ialog_non_copper_zones_properties_base.fbp | 1544 ++-- .../dialog_non_copper_zones_properties_base.h | 21 +- pcbnew/eagle_plugin.cpp | 484 +- pcbnew/eagle_plugin.h | 24 +- pcbnew/specctra_export.cpp | 2 +- pcbnew/zones_by_polygon.cpp | 2 +- pcbnew/zones_non_copper_type_functions.cpp | 1 - pcbnew/zones_test_and_combine_areas.cpp | 6 +- 17 files changed, 5236 insertions(+), 4734 deletions(-) diff --git a/Documentation/guidelines/UIpolicies.txt b/Documentation/guidelines/UIpolicies.txt index 60d3ded9e3..f0de9f7d3b 100644 --- a/Documentation/guidelines/UIpolicies.txt +++ b/Documentation/guidelines/UIpolicies.txt @@ -42,6 +42,14 @@ Dialogs: leaving them all bundled tightly together. The dialog box should look nice at any size large enough to show all the components. + When using wxFormBuilder, please add the following settings to the + "Dialog" node: + subclass.name <- DIALOG_SHIM + subclass.header <- dialog_shim.h + + This will provide for an override of the Show( bool ) wxWindow() function + and provide retentitive size and position for the session. + Use tooltips to explain the functionality of each non-obvious control. This is important because the help files and the wiki often lag behind the source code. diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 38f8d95828..3756e8d380 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1468,7 +1468,7 @@ int BOARD::SetAreasNetCodesFromNetNames( void ) if( GetArea( ii )->GetNet() != 0 ) // i.e. if this zone is connected to a net { - const NETINFO_ITEM* net = FindNet( GetArea( ii )->m_Netname ); + const NETINFO_ITEM* net = FindNet( GetArea( ii )->GetNetName() ); if( net ) { diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index d6e2b1c1e3..635d08160b 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -74,6 +74,7 @@ ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) : // For corner moving, corner index to drag, or -1 if no selection m_CornerSelection = -1; + m_IsFilled = aZone.m_IsFilled; m_ZoneClearance = aZone.m_ZoneClearance; // clearance value m_ZoneMinThickness = aZone.m_ZoneMinThickness; m_FillMode = aZone.m_FillMode; // Filling mode (segments/polygons) @@ -84,6 +85,11 @@ ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) : m_ThermalReliefCopperBridge = aZone.m_ThermalReliefCopperBridge; m_FilledPolysList = aZone.m_FilledPolysList; m_FillSegmList = aZone.m_FillSegmList; + + cornerSmoothingType = aZone.cornerSmoothingType; + cornerRadius = aZone.cornerRadius; + utility = aZone.utility; + utility2 = aZone.utility; } @@ -717,7 +723,7 @@ void ZONE_CONTAINER::DisplayInfo( EDA_DRAW_FRAME* frame ) frame->AppendMsgPanel( _( "Corners" ), msg, BLUE ); if( m_FillMode ) - msg.Printf( _( "Segments" ), m_FillMode ); + msg = _( "Segments" ); else msg = _( "Polygons" ); diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index 645e3bad85..1b80fc8173 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -77,58 +77,7 @@ struct SEGMENT class ZONE_CONTAINER : public BOARD_CONNECTED_ITEM { public: - wxString m_Netname; // Net Name - CPolyLine* m_Poly; // outlines - // For corner moving, corner index to drag, or -1 if no selection. - int m_CornerSelection; - int m_ZoneClearance; // clearance value - int m_ZoneMinThickness; // Min thickness value in filled areas - - // How to fill areas: 0 = use filled polygons, != 0 fill with segments. - int m_FillMode; - - // number of segments to convert a circle to a polygon (uses - //ARC_APPROX_SEGMENTS_COUNT_LOW_DEF or ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF) - int m_ArcToSegmentsCount; - - // thickness of the gap in thermal reliefs. - int m_ThermalReliefGap; - - // thickness of the copper bridge in thermal reliefs - int m_ThermalReliefCopperBridge; - int utility, utility2; // flags used in polygon calculations - - // true when a zone was filled, false after deleting the filled areas - bool m_IsFilled; - - /* set of filled polygons used to draw a zone as a filled area. - * from outlines (m_Poly) but unlike m_Poly these filled polygons have no hole - * (they are* all in one piece) In very simple cases m_FilledPolysList is same - * as m_Poly. In less simple cases (when m_Poly has holes) m_FilledPolysList is - * a polygon equivalent to m_Poly, without holes but with extra outline segment - * connecting "holes" with external main outline. In complex cases an outline - * described by m_Poly can have many filled areas - */ - std::vector m_FilledPolysList; - - /* set of segments used to fill area, when fill zone by segment is used. - * ( m_FillMode == 1 ) - * in this case segments have m_ZoneMinThickness width - */ - std::vector m_FillSegmList; - -private: - CPolyLine* smoothedPoly; // Corner-smoothed version of m_Poly - int cornerSmoothingType; - unsigned int cornerRadius; - // Priority: when a zone outline is inside and other zone, if its priority is higher - // the other zone priority, it will be created inside. - // if priorities are equal, a DRC error is set - unsigned m_priority; - ZoneConnection m_PadConnection; - -public: ZONE_CONTAINER( BOARD* parent ); ZONE_CONTAINER( const ZONE_CONTAINER& aZone ); @@ -257,13 +206,13 @@ public: * returns the net name. * @return const wxString& - The net name. */ - const wxString& GetNetName() const { return m_Netname; }; - void SetNetName( const wxString& aName ) { m_Netname = aName; } + const wxString& GetNetName() const { return m_Netname; }; + void SetNetName( const wxString& aName ) { m_Netname = aName; } - void SetFillMode( int aFillMode ) { m_FillMode = aFillMode; } - int GetFillMode() const { return m_FillMode; } + void SetFillMode( int aFillMode ) { m_FillMode = aFillMode; } + int GetFillMode() const { return m_FillMode; } - void SetThermalReliefGap( int aThermalReliefGap ) { m_ThermalReliefGap = aThermalReliefGap; } + void SetThermalReliefGap( int aThermalReliefGap ) { m_ThermalReliefGap = aThermalReliefGap; } int GetThermalReliefGap( D_PAD* aPad = NULL ) const; void SetThermalReliefCopperBridge( int aThermalReliefCopperBridge ) @@ -547,6 +496,59 @@ public: #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif + + + CPolyLine* m_Poly; // outlines + + // For corner moving, corner index to drag, or -1 if no selection. + int m_CornerSelection; + int m_ZoneClearance; // clearance value + int m_ZoneMinThickness; // Min thickness value in filled areas + + // How to fill areas: 0 = use filled polygons, != 0 fill with segments. + int m_FillMode; + + // number of segments to convert a circle to a polygon (uses + //ARC_APPROX_SEGMENTS_COUNT_LOW_DEF or ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF) + int m_ArcToSegmentsCount; + + // thickness of the gap in thermal reliefs. + int m_ThermalReliefGap; + + // thickness of the copper bridge in thermal reliefs + int m_ThermalReliefCopperBridge; + int utility, utility2; // flags used in polygon calculations + + // true when a zone was filled, false after deleting the filled areas + bool m_IsFilled; + + /* set of filled polygons used to draw a zone as a filled area. + * from outlines (m_Poly) but unlike m_Poly these filled polygons have no hole + * (they are* all in one piece) In very simple cases m_FilledPolysList is same + * as m_Poly. In less simple cases (when m_Poly has holes) m_FilledPolysList is + * a polygon equivalent to m_Poly, without holes but with extra outline segment + * connecting "holes" with external main outline. In complex cases an outline + * described by m_Poly can have many filled areas + */ + std::vector m_FilledPolysList; + + /* set of segments used to fill area, when fill zone by segment is used. + * ( m_FillMode == 1 ) + * in this case segments have m_ZoneMinThickness width + */ + std::vector m_FillSegmList; + + +private: + wxString m_Netname; // Net Name + CPolyLine* smoothedPoly; // Corner-smoothed version of m_Poly + int cornerSmoothingType; + unsigned int cornerRadius; + // Priority: when a zone outline is inside and other zone, if its priority is higher + // the other zone priority, it will be created inside. + // if priorities are equal, a DRC error is set + unsigned m_priority; + ZoneConnection m_PadConnection; }; diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index 4a047dd6f0..ac4f324cf1 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -56,9 +56,6 @@ private: wxListView* m_LayerSelectionCtrl; - static wxPoint prevPosition; ///< Dialog position & size - static wxSize prevSize; - /** * Function initDialog * fills in the dialog controls using the current settings. @@ -108,8 +105,6 @@ private: // Initialize static member variables wxString DIALOG_COPPER_ZONE::m_netNameShowFilter( wxT( "*" ) ); -wxPoint DIALOG_COPPER_ZONE::prevPosition( -1, -1 ); -wxSize DIALOG_COPPER_ZONE::prevSize; ZONE_EDIT_T InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings ) @@ -157,11 +152,7 @@ DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* GetSizer()->SetSizeHints( this ); - if( prevPosition.x != -1 ) - SetSize( prevPosition.x, prevPosition.y, - prevSize.x, prevSize.y ); - else - Center(); + Center(); } @@ -169,8 +160,6 @@ void DIALOG_COPPER_ZONE::initDialog() { BOARD* board = m_Parent->GetBoard(); - SetFocus(); // Required under wxGTK if we want to demiss the dialog with the ESC key - wxString msg; if( m_settings.m_Zone_45_Only ) @@ -297,8 +286,6 @@ void DIALOG_COPPER_ZONE::OnButtonCancelClick( wxCommandEvent& event ) void DIALOG_COPPER_ZONE::OnButtonOkClick( wxCommandEvent& event ) { m_netNameShowFilter = m_ShowNetNameFilter->GetValue(); - prevPosition = GetPosition(); - prevSize = GetSize(); if( AcceptOptions( true ) ) { @@ -311,9 +298,6 @@ void DIALOG_COPPER_ZONE::OnButtonOkClick( wxCommandEvent& event ) // called on system close button void DIALOG_COPPER_ZONE::OnClose( wxCloseEvent& event ) { - prevPosition = GetPosition(); - prevSize = GetSize(); - if( m_OnExitCode != ZONE_ABORT ) *m_ptr = m_settings; @@ -384,7 +368,7 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab wxString txtvalue = m_ZoneClearanceCtrl->GetValue(); m_settings.m_ZoneClearance = ReturnValueFromString( g_UserUnit, txtvalue ); - // Test if this is a reasonnable value for this parameter + // Test if this is a reasonable value for this parameter // A too large value can hang Pcbnew #define CLEARANCE_MAX_VALUE 5000 // in 1/10000 inch if( m_settings.m_ZoneClearance > CLEARANCE_MAX_VALUE ) @@ -519,9 +503,6 @@ void DIALOG_COPPER_ZONE::OnNetSortingOptionSelected( wxCommandEvent& event ) void DIALOG_COPPER_ZONE::ExportSetupToOtherCopperZones( wxCommandEvent& event ) { - prevPosition = GetPosition(); - prevSize = GetSize(); - if( !AcceptOptions( true, true ) ) return; diff --git a/pcbnew/dialogs/dialog_copper_zones_base.cpp b/pcbnew/dialogs/dialog_copper_zones_base.cpp index 3a8f99b575..b793d06e6c 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.cpp +++ b/pcbnew/dialogs/dialog_copper_zones_base.cpp @@ -1,256 +1,268 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 30 2011) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "dialog_copper_zones_base.h" - -/////////////////////////////////////////////////////////////////////////// - -BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, wxDialog ) - EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose ) - EVT_SIZE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnSize ) - EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected ) - EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) - EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) - EVT_BUTTON( wxID_APPLY_FILTERS, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) - EVT_CHOICE( ID_CORNER_SMOOTHING, DIALOG_COPPER_ZONE_BASE::_wxFB_OnCornerSmoothingModeChoice ) - EVT_CHOICE( ID_M_PADINZONEOPT, DIALOG_COPPER_ZONE_BASE::_wxFB_OnPadsInZoneClick ) - EVT_BUTTON( wxID_BUTTON_EXPORT, DIALOG_COPPER_ZONE_BASE::_wxFB_ExportSetupToOtherCopperZones ) - EVT_BUTTON( wxID_OK, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonOkClick ) - EVT_BUTTON( wxID_CANCEL, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonCancelClick ) -END_EVENT_TABLE() - -DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - m_MainBoxSizer = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* m_OptionsBoxSizer; - m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL ); - - m_layerSizer = new wxBoxSizer( wxVERTICAL ); - - m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText17->Wrap( -1 ); - m_layerSizer->Add( m_staticText17, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer7; - bSizer7 = new wxBoxSizer( wxVERTICAL ); - - m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText2->Wrap( -1 ); - bSizer7->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer7->Add( m_ListNetNameSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_OptionsBoxSizer->Add( bSizer7, 1, wxEXPAND, 5 ); - - wxStaticBoxSizer* m_NetSortOptSizer; - m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL ); - - m_staticText16 = new wxStaticText( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16->Wrap( -1 ); - m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (advanced)"), _("Filtered (alphabetical)"), _("Filtered (advanced)") }; - int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString ); - m_NetDisplayOption = new wxChoice( this, ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 ); - m_NetDisplayOption->SetSelection( 0 ); - m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_staticText5 = new wxStaticText( this, wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText5->Wrap( -1 ); - m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_DoNotShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") ); - - m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_staticText51 = new wxStaticText( this, wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText51->Wrap( -1 ); - m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") ); - - m_NetSortOptSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_buttonRunFilter = new wxButton( this, wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 ); - m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 ); - - m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxALL, 5 ); - - m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxALL|wxEXPAND, 5 ); - - wxStaticBoxSizer* m_ExportableSetupSizer; - m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL ); - - wxBoxSizer* bSizer9; - bSizer9 = new wxBoxSizer( wxVERTICAL ); - - m_ClearanceValueTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ClearanceValueTitle->Wrap( -1 ); - bSizer9->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ZoneClearanceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer9->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 ); - m_MinThicknessValueTitle->Wrap( -1 ); - m_MinThicknessValueTitle->SetToolTip( _("Minimun thickness of filled areas.") ); - - bSizer9->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer9->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_staticText151 = new wxStaticText( this, wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText151->Wrap( -1 ); - bSizer9->Add( m_staticText151, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") }; - int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString ); - m_cornerSmoothingChoice = new wxChoice( this, ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 ); - m_cornerSmoothingChoice->SetSelection( 0 ); - bSizer9->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_cornerSmoothingTitle = new wxStaticText( this, wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_cornerSmoothingTitle->Wrap( -1 ); - bSizer9->Add( m_cornerSmoothingTitle, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_cornerSmoothingCtrl = new wxTextCtrl( this, ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer9->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_ExportableSetupSizer->Add( bSizer9, 0, wxEXPAND, 5 ); - - wxBoxSizer* m_LeftBox; - m_LeftBox = new wxBoxSizer( wxVERTICAL ); - - m_staticText13 = new wxStaticText( this, wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText13->Wrap( -1 ); - m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("None") }; - int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString ); - m_PadInZoneOpt = new wxChoice( this, ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 ); - m_PadInZoneOpt->SetSelection( 0 ); - m_LeftBox->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - wxStaticBoxSizer* m_ThermalShapesParamsSizer; - m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Thermal Reliefs") ), wxVERTICAL ); - - m_AntipadSizeText = new wxStaticText( this, wxID_ANY, _("Antipad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); - m_AntipadSizeText->Wrap( -1 ); - m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_AntipadSizeValue = new wxTextCtrl( this, wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") ); - - m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_CopperBridgeWidthText = new wxStaticText( this, wxID_ANY, _("Spoke width"), wxDefaultPosition, wxDefaultSize, 0 ); - m_CopperBridgeWidthText->Wrap( -1 ); - m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_CopperWidthValue = new wxTextCtrl( this, wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") ); - - m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_LeftBox->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 ); - - m_ExportableSetupSizer->Add( m_LeftBox, 0, wxEXPAND, 5 ); - - wxBoxSizer* m_MiddleBox; - m_MiddleBox = new wxBoxSizer( wxVERTICAL ); - - m_staticText171 = new wxStaticText( this, wxID_ANY, _("Priority level:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText171->Wrap( -1 ); - m_staticText171->SetToolTip( _("On each copper layer, zones are filled by priority order.\nSo when a zone is inside an other zone:\n* If its priority is highter: its outlines are removed from the other layer.\n* If its priority is equal: a DRC error is set.") ); - - m_MiddleBox->Add( m_staticText171, 0, wxRIGHT|wxLEFT, 5 ); - - m_PriorityLevelCtrl = new wxSpinCtrl( this, ID_M_PRIORITYLEVELCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 ); - m_MiddleBox->Add( m_PriorityLevelCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_staticText11 = new wxStaticText( this, wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText11->Wrap( -1 ); - m_MiddleBox->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") }; - int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString ); - m_FillModeCtrl = new wxChoice( this, ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 ); - m_FillModeCtrl->SetSelection( 0 ); - m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_staticText12 = new wxStaticText( this, wxID_ANY, _("Segments / 360 deg:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText12->Wrap( -1 ); - m_MiddleBox->Add( m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_ArcApproximationOptChoices[] = { _("16"), _("32") }; - int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString ); - m_ArcApproximationOpt = new wxChoice( this, ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 ); - m_ArcApproximationOpt->SetSelection( 0 ); - m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer81; - bSizer81 = new wxBoxSizer( wxVERTICAL ); - - m_staticText14 = new wxStaticText( this, wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText14->Wrap( -1 ); - bSizer81->Add( m_staticText14, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") }; - int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString ); - m_OrientEdgesOpt = new wxChoice( this, ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 ); - m_OrientEdgesOpt->SetSelection( 0 ); - bSizer81->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_staticText15 = new wxStaticText( this, wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText15->Wrap( -1 ); - bSizer81->Add( m_staticText15, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") }; - int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString ); - m_OutlineAppearanceCtrl = new wxChoice( this, ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 ); - m_OutlineAppearanceCtrl->SetSelection( 0 ); - bSizer81->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_ExportableSetupSizer->Add( bSizer81, 0, wxEXPAND, 5 ); - - m_MainBoxSizer->Add( m_ExportableSetupSizer, 1, wxALL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer10; - bSizer10 = new wxBoxSizer( wxHORIZONTAL ); - - m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") ); - - bSizer10->Add( m_ExportSetupButton, 0, wxALL|wxEXPAND, 5 ); - - m_OkButton = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 ); - m_OkButton->SetDefault(); - bSizer10->Add( m_OkButton, 0, wxALL|wxEXPAND, 5 ); - - m_ButtonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer10->Add( m_ButtonCancel, 0, wxALL|wxEXPAND, 5 ); - - m_MainBoxSizer->Add( bSizer10, 0, wxALIGN_RIGHT|wxALL, 5 ); - - this->SetSizer( m_MainBoxSizer ); - this->Layout(); -} - -DIALOG_COPPER_ZONE_BASE::~DIALOG_COPPER_ZONE_BASE() -{ -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 11 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_copper_zones_base.h" + +/////////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, DIALOG_SHIM ) + EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose ) + EVT_SIZE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnSize ) + EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected ) + EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) + EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) + EVT_BUTTON( wxID_APPLY_FILTERS, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) + EVT_CHOICE( ID_CORNER_SMOOTHING, DIALOG_COPPER_ZONE_BASE::_wxFB_OnCornerSmoothingModeChoice ) + EVT_CHOICE( ID_M_PADINZONEOPT, DIALOG_COPPER_ZONE_BASE::_wxFB_OnPadsInZoneClick ) + EVT_BUTTON( wxID_BUTTON_EXPORT, DIALOG_COPPER_ZONE_BASE::_wxFB_ExportSetupToOtherCopperZones ) + EVT_BUTTON( wxID_OK, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonOkClick ) + EVT_BUTTON( wxID_CANCEL, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonCancelClick ) +END_EVENT_TABLE() + +DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + m_MainBoxSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* m_OptionsBoxSizer; + m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_layerSizer = new wxBoxSizer( wxVERTICAL ); + + m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText17->Wrap( -1 ); + m_layerSizer->Add( m_staticText17, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + + m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + bSizer7->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer7->Add( m_ListNetNameSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + m_OptionsBoxSizer->Add( bSizer7, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* m_NetSortOptSizer; + m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL ); + + m_staticText16 = new wxStaticText( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16->Wrap( -1 ); + m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (advanced)"), _("Filtered (alphabetical)"), _("Filtered (advanced)") }; + int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString ); + m_NetDisplayOption = new wxChoice( this, ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 ); + m_NetDisplayOption->SetSelection( 0 ); + m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_staticText5 = new wxStaticText( this, wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5->Wrap( -1 ); + m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_DoNotShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") ); + + m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_staticText51 = new wxStaticText( this, wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText51->Wrap( -1 ); + m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") ); + + m_NetSortOptSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_buttonRunFilter = new wxButton( this, wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 ); + m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 ); + + + m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxALL, 5 ); + + + m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* m_ExportableSetupSizer; + m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL ); + + wxBoxSizer* bSizer9; + bSizer9 = new wxBoxSizer( wxVERTICAL ); + + m_ClearanceValueTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ClearanceValueTitle->Wrap( -1 ); + bSizer9->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ZoneClearanceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer9->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_MinThicknessValueTitle->Wrap( -1 ); + m_MinThicknessValueTitle->SetToolTip( _("Minimun thickness of filled areas.") ); + + bSizer9->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer9->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_staticText151 = new wxStaticText( this, wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText151->Wrap( -1 ); + bSizer9->Add( m_staticText151, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") }; + int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString ); + m_cornerSmoothingChoice = new wxChoice( this, ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 ); + m_cornerSmoothingChoice->SetSelection( 0 ); + bSizer9->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_cornerSmoothingTitle = new wxStaticText( this, wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cornerSmoothingTitle->Wrap( -1 ); + bSizer9->Add( m_cornerSmoothingTitle, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_cornerSmoothingCtrl = new wxTextCtrl( this, ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer9->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + m_ExportableSetupSizer->Add( bSizer9, 0, wxEXPAND, 5 ); + + wxBoxSizer* m_LeftBox; + m_LeftBox = new wxBoxSizer( wxVERTICAL ); + + m_staticText13 = new wxStaticText( this, wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText13->Wrap( -1 ); + m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("None") }; + int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString ); + m_PadInZoneOpt = new wxChoice( this, ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 ); + m_PadInZoneOpt->SetSelection( 0 ); + m_LeftBox->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + wxStaticBoxSizer* m_ThermalShapesParamsSizer; + m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Thermal Reliefs") ), wxVERTICAL ); + + m_AntipadSizeText = new wxStaticText( this, wxID_ANY, _("Antipad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); + m_AntipadSizeText->Wrap( -1 ); + m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_AntipadSizeValue = new wxTextCtrl( this, wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") ); + + m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_CopperBridgeWidthText = new wxStaticText( this, wxID_ANY, _("Spoke width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_CopperBridgeWidthText->Wrap( -1 ); + m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_CopperWidthValue = new wxTextCtrl( this, wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") ); + + m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + m_LeftBox->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 ); + + + m_ExportableSetupSizer->Add( m_LeftBox, 0, wxEXPAND, 5 ); + + wxBoxSizer* m_MiddleBox; + m_MiddleBox = new wxBoxSizer( wxVERTICAL ); + + m_staticText171 = new wxStaticText( this, wxID_ANY, _("Priority level:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText171->Wrap( -1 ); + m_staticText171->SetToolTip( _("On each copper layer, zones are filled by priority order.\nSo when a zone is inside an other zone:\n* If its priority is highter: its outlines are removed from the other layer.\n* If its priority is equal: a DRC error is set.") ); + + m_MiddleBox->Add( m_staticText171, 0, wxRIGHT|wxLEFT, 5 ); + + m_PriorityLevelCtrl = new wxSpinCtrl( this, ID_M_PRIORITYLEVELCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 ); + m_MiddleBox->Add( m_PriorityLevelCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_staticText11 = new wxStaticText( this, wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + m_MiddleBox->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") }; + int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString ); + m_FillModeCtrl = new wxChoice( this, ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 ); + m_FillModeCtrl->SetSelection( 0 ); + m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_staticText12 = new wxStaticText( this, wxID_ANY, _("Segments / 360 deg:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12->Wrap( -1 ); + m_MiddleBox->Add( m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_ArcApproximationOptChoices[] = { _("16"), _("32") }; + int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString ); + m_ArcApproximationOpt = new wxChoice( this, ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 ); + m_ArcApproximationOpt->SetSelection( 0 ); + m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer81; + bSizer81 = new wxBoxSizer( wxVERTICAL ); + + m_staticText14 = new wxStaticText( this, wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText14->Wrap( -1 ); + bSizer81->Add( m_staticText14, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") }; + int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString ); + m_OrientEdgesOpt = new wxChoice( this, ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 ); + m_OrientEdgesOpt->SetSelection( 0 ); + bSizer81->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_staticText15 = new wxStaticText( this, wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText15->Wrap( -1 ); + bSizer81->Add( m_staticText15, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") }; + int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString ); + m_OutlineAppearanceCtrl = new wxChoice( this, ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 ); + m_OutlineAppearanceCtrl->SetSelection( 0 ); + bSizer81->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + m_ExportableSetupSizer->Add( bSizer81, 0, wxEXPAND, 5 ); + + + m_MainBoxSizer->Add( m_ExportableSetupSizer, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxHORIZONTAL ); + + m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") ); + + bSizer10->Add( m_ExportSetupButton, 0, wxALL|wxEXPAND, 5 ); + + m_OkButton = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 ); + m_OkButton->SetDefault(); + bSizer10->Add( m_OkButton, 0, wxALL|wxEXPAND, 5 ); + + m_ButtonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer10->Add( m_ButtonCancel, 0, wxALL|wxEXPAND, 5 ); + + + m_MainBoxSizer->Add( bSizer10, 0, wxALIGN_RIGHT|wxALL, 5 ); + + + this->SetSizer( m_MainBoxSizer ); + this->Layout(); +} + +DIALOG_COPPER_ZONE_BASE::~DIALOG_COPPER_ZONE_BASE() +{ +} diff --git a/pcbnew/dialogs/dialog_copper_zones_base.fbp b/pcbnew/dialogs/dialog_copper_zones_base.fbp index 02a43cca91..bb67a02271 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.fbp +++ b/pcbnew/dialogs/dialog_copper_zones_base.fbp @@ -1,3515 +1,3418 @@ - - - - - - C++ - 1 - source_name - 0 - res - UTF-8 - table - dialog_copper_zones_base - 1000 - none - 1 - dialog_copper_zones_base - - . - - 1 - 1 - 1 - 0 - - 1 - 1 - 1 - 1 - 0 - - - - - 1 - - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - impl_virtual - - - 1 - - 0 - 0 - ID_DIALOG_COPPER_ZONE_BASE - - - 0 - - - 0 - - 1 - DIALOG_COPPER_ZONE_BASE - 1 - - - 1 - - - Resizable - - 1 - 550,500 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - Zone Properties - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - OnClose - - - - - - - - - - - - - - - - - - - - - - - - - OnSize - - - - m_MainBoxSizer - wxVERTICAL - protected - - 5 - wxALL|wxEXPAND - 1 - - - m_OptionsBoxSizer - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - - m_layerSizer - wxVERTICAL - protected - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Layer: - - - 0 - - - 0 - - 1 - m_staticText17 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizer7 - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Net: - - - 0 - - - 0 - - 1 - m_staticText2 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_NETNAME_SELECTION - - - 0 - - - 0 - -1,-1 - 1 - m_ListNetNameSelection - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - wxID_ANY - Net Filtering - - m_NetSortOptSizer - wxVERTICAL - none - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Display: - - - 0 - - - 0 - - 1 - m_staticText16 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Show all (alphabetical)" "Show all (advanced)" "Filtered (alphabetical)" "Filtered (advanced)" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_NETDISPLAYOPTION - - - 0 - - - 0 - - 1 - m_NetDisplayOption - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnNetSortingOptionSelected - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Hidden net filter: - - - 0 - - - 0 - - 1 - m_staticText5 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_TEXTCTRL_NETNAMES_FILTER - - - 0 - - 0 - - 0 - - 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 - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Visible net filter: - - - 0 - - - 0 - - 1 - m_staticText51 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 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 - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - wxID_ANY - Settings - - m_ExportableSetupSizer - wxHORIZONTAL - none - - - 5 - wxEXPAND - 0 - - - bSizer9 - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Clearance - - - 0 - - - 0 - - 1 - m_ClearanceValueTitle - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_ZoneClearanceCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Minimum width - - - 0 - - - 0 - - 1 - m_MinThicknessValueTitle - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Minimun thickness of filled areas. - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_ZoneMinThicknessCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Corner smoothing: - - - 0 - - - 0 - - 1 - m_staticText151 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 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 - - - - - - OnCornerSmoothingModeChoice - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Chamfer distance (mm): - - - 0 - - - 0 - - 1 - m_cornerSmoothingTitle - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_CORNERSMOOTHINGCTRL - - - 0 - - 0 - - 0 - - 1 - m_cornerSmoothingCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - m_LeftBox - wxVERTICAL - none - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pad connection: - - - 0 - - - 0 - - 1 - m_staticText13 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Solid" "Thermal relief" "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 - - - - - - OnPadsInZoneClick - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - Thermal Reliefs - - m_ThermalShapesParamsSizer - wxVERTICAL - none - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Antipad clearance - - - 0 - - - 0 - - 1 - m_AntipadSizeText - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANTIPAD_SIZE - - - 0 - - 0 - - 0 - - 1 - m_AntipadSizeValue - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Clearance between pads in the same net and filled areas. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Spoke width - - - 0 - - - 0 - - 1 - m_CopperBridgeWidthText - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_COPPER_BRIDGE_VALUE - - - 0 - - 0 - - 0 - - 1 - m_CopperWidthValue - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Width of copper in thermal reliefs. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - m_MiddleBox - wxVERTICAL - none - - 5 - wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Priority level: - - - 0 - - - 0 - - 1 - m_staticText171 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - On each copper layer, zones are filled by priority order. So when a zone is inside an other zone: * If its priority is highter: its outlines are removed from the other layer. * If its priority is equal: a DRC error is set. - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 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 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Fill mode: - - - 0 - - - 0 - - 1 - m_staticText11 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Polygon" "Segment" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_FILLMODECTRL - - - 0 - - - 0 - - 1 - m_FillModeCtrl - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Segments / 360 deg: - - - 0 - - - 0 - - 1 - m_staticText12 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "16" "32" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_ARCAPPROXIMATIONOPT - - - 0 - - - 0 - - 1 - m_ArcApproximationOpt - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - bSizer81 - wxVERTICAL - none - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Outline slope: - - - 0 - - - 0 - - 1 - m_staticText14 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Arbitrary" "H, V, and 45 deg only" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_ORIENTEDGESOPT - - - 0 - - - 0 - - 1 - m_OrientEdgesOpt - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Outline style: - - - 0 - - - 0 - - 1 - m_staticText15 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_RIGHT|wxALL - 0 - - - bSizer10 - wxHORIZONTAL - none - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_OK - Ok - - - 0 - - - 0 - - 1 - m_OkButton - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnButtonOkClick - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_CANCEL - Cancel - - - 0 - - - 0 - - 1 - m_ButtonCancel - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnButtonCancelClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + table + dialog_copper_zones_base + 1000 + none + 1 + dialog_copper_zones_base + + . + + 1 + 1 + 1 + 1 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + ID_DIALOG_COPPER_ZONE_BASE + + + DIALOG_COPPER_ZONE_BASE + + 550,500 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Zone Properties + + + + + + + + + + + + + + OnClose + + + + + + + + + + + + + + + + + + + + + + + + + OnSize + + + + m_MainBoxSizer + wxVERTICAL + protected + + 5 + wxALL|wxEXPAND + 1 + + + m_OptionsBoxSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + m_layerSizer + wxVERTICAL + protected + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Layer: + + 0 + + + 0 + + 1 + m_staticText17 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer7 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Net: + + 0 + + + 0 + + 1 + m_staticText2 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_NETNAME_SELECTION + + 0 + + + 0 + -1,-1 + 1 + m_ListNetNameSelection + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + wxID_ANY + Net Filtering + + m_NetSortOptSizer + wxVERTICAL + none + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Display: + + 0 + + + 0 + + 1 + m_staticText16 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Show all (alphabetical)" "Show all (advanced)" "Filtered (alphabetical)" "Filtered (advanced)" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_NETDISPLAYOPTION + + 0 + + + 0 + + 1 + m_NetDisplayOption + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnNetSortingOptionSelected + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Hidden net filter: + + 0 + + + 0 + + 1 + m_staticText5 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_TEXTCTRL_NETNAMES_FILTER + + 0 + + 0 + + 0 + + 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 + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Visible net filter: + + 0 + + + 0 + + 1 + m_staticText51 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 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 + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + wxID_ANY + Settings + + m_ExportableSetupSizer + wxHORIZONTAL + none + + + 5 + wxEXPAND + 0 + + + bSizer9 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Clearance + + 0 + + + 0 + + 1 + m_ClearanceValueTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ZoneClearanceCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Minimum width + + 0 + + + 0 + + 1 + m_MinThicknessValueTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Minimun thickness of filled areas. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ZoneMinThicknessCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Corner smoothing: + + 0 + + + 0 + + 1 + m_staticText151 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 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 + + + + + + OnCornerSmoothingModeChoice + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Chamfer distance (mm): + + 0 + + + 0 + + 1 + m_cornerSmoothingTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_CORNERSMOOTHINGCTRL + + 0 + + 0 + + 0 + + 1 + m_cornerSmoothingCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + m_LeftBox + wxVERTICAL + none + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pad connection: + + 0 + + + 0 + + 1 + m_staticText13 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Solid" "Thermal relief" "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 + + + + + + OnPadsInZoneClick + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Thermal Reliefs + + m_ThermalShapesParamsSizer + wxVERTICAL + none + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Antipad clearance + + 0 + + + 0 + + 1 + m_AntipadSizeText + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANTIPAD_SIZE + + 0 + + 0 + + 0 + + 1 + m_AntipadSizeValue + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Clearance between pads in the same net and filled areas. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Spoke width + + 0 + + + 0 + + 1 + m_CopperBridgeWidthText + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_COPPER_BRIDGE_VALUE + + 0 + + 0 + + 0 + + 1 + m_CopperWidthValue + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Width of copper in thermal reliefs. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + m_MiddleBox + wxVERTICAL + none + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Priority level: + + 0 + + + 0 + + 1 + m_staticText171 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + On each copper layer, zones are filled by priority order. So when a zone is inside an other zone: * If its priority is highter: its outlines are removed from the other layer. * If its priority is equal: a DRC error is set. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Fill mode: + + 0 + + + 0 + + 1 + m_staticText11 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Polygon" "Segment" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_FILLMODECTRL + + 0 + + + 0 + + 1 + m_FillModeCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Segments / 360 deg: + + 0 + + + 0 + + 1 + m_staticText12 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "16" "32" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_ARCAPPROXIMATIONOPT + + 0 + + + 0 + + 1 + m_ArcApproximationOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer81 + wxVERTICAL + none + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Outline slope: + + 0 + + + 0 + + 1 + m_staticText14 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Arbitrary" "H, V, and 45 deg only" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_ORIENTEDGESOPT + + 0 + + + 0 + + 1 + m_OrientEdgesOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Outline style: + + 0 + + + 0 + + 1 + m_staticText15 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer10 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_OK + Ok + + 0 + + + 0 + + 1 + m_OkButton + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnButtonOkClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_CANCEL + Cancel + + 0 + + + 0 + + 1 + m_ButtonCancel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnButtonCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_copper_zones_base.h b/pcbnew/dialogs/dialog_copper_zones_base.h index 0df2b42f94..14617522f2 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.h +++ b/pcbnew/dialogs/dialog_copper_zones_base.h @@ -1,131 +1,132 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 30 2011) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __DIALOG_COPPER_ZONES_BASE_H__ -#define __DIALOG_COPPER_ZONES_BASE_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_COPPER_ZONE_BASE -/////////////////////////////////////////////////////////////////////////////// -class DIALOG_COPPER_ZONE_BASE : public wxDialog -{ - DECLARE_EVENT_TABLE() - private: - - // Private event handlers - void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); } - void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); } - void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); } - void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); } - void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); } - void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); } - void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); } - void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); } - void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); } - - - protected: - enum - { - ID_DIALOG_COPPER_ZONE_BASE = 1000, - ID_NETNAME_SELECTION, - ID_M_NETDISPLAYOPTION, - ID_TEXTCTRL_NETNAMES_FILTER, - wxID_APPLY_FILTERS, - ID_CORNER_SMOOTHING, - ID_M_CORNERSMOOTHINGCTRL, - ID_M_PADINZONEOPT, - wxID_ANTIPAD_SIZE, - wxID_COPPER_BRIDGE_VALUE, - ID_M_PRIORITYLEVELCTRL, - ID_M_FILLMODECTRL, - ID_M_ARCAPPROXIMATIONOPT, - ID_M_ORIENTEDGESOPT, - ID_M_OUTLINEAPPEARANCECTRL, - wxID_BUTTON_EXPORT, - }; - - wxBoxSizer* m_MainBoxSizer; - wxBoxSizer* m_layerSizer; - wxStaticText* m_staticText17; - wxStaticText* m_staticText2; - wxListBox* m_ListNetNameSelection; - wxStaticText* m_staticText16; - wxChoice* m_NetDisplayOption; - wxStaticText* m_staticText5; - wxTextCtrl* m_DoNotShowNetNameFilter; - wxStaticText* m_staticText51; - wxTextCtrl* m_ShowNetNameFilter; - wxButton* m_buttonRunFilter; - wxStaticText* m_ClearanceValueTitle; - wxTextCtrl* m_ZoneClearanceCtrl; - wxStaticText* m_MinThicknessValueTitle; - wxTextCtrl* m_ZoneMinThicknessCtrl; - wxStaticText* m_staticText151; - wxChoice* m_cornerSmoothingChoice; - wxStaticText* m_cornerSmoothingTitle; - wxTextCtrl* m_cornerSmoothingCtrl; - wxStaticText* m_staticText13; - wxChoice* m_PadInZoneOpt; - wxStaticText* m_AntipadSizeText; - wxTextCtrl* m_AntipadSizeValue; - wxStaticText* m_CopperBridgeWidthText; - wxTextCtrl* m_CopperWidthValue; - wxStaticText* m_staticText171; - wxSpinCtrl* m_PriorityLevelCtrl; - wxStaticText* m_staticText11; - wxChoice* m_FillModeCtrl; - wxStaticText* m_staticText12; - wxChoice* m_ArcApproximationOpt; - wxStaticText* m_staticText14; - wxChoice* m_OrientEdgesOpt; - wxStaticText* m_staticText15; - wxChoice* m_OutlineAppearanceCtrl; - wxButton* m_ExportSetupButton; - wxButton* m_OkButton; - wxButton* m_ButtonCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnSize( wxSizeEvent& event ) { event.Skip(); } - virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); } - virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); } - virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ) { event.Skip(); } - virtual void OnButtonOkClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } - - - public: - - DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_COPPER_ZONE_BASE(); - -}; - -#endif //__DIALOG_COPPER_ZONES_BASE_H__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 11 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_COPPER_ZONES_BASE_H__ +#define __DIALOG_COPPER_ZONES_BASE_H__ + +#include +#include +#include +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_COPPER_ZONE_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM +{ + DECLARE_EVENT_TABLE() + private: + + // Private event handlers + void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); } + void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); } + void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); } + void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); } + void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); } + void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); } + void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); } + void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); } + void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); } + + + protected: + enum + { + ID_DIALOG_COPPER_ZONE_BASE = 1000, + ID_NETNAME_SELECTION, + ID_M_NETDISPLAYOPTION, + ID_TEXTCTRL_NETNAMES_FILTER, + wxID_APPLY_FILTERS, + ID_CORNER_SMOOTHING, + ID_M_CORNERSMOOTHINGCTRL, + ID_M_PADINZONEOPT, + wxID_ANTIPAD_SIZE, + wxID_COPPER_BRIDGE_VALUE, + ID_M_PRIORITYLEVELCTRL, + ID_M_FILLMODECTRL, + ID_M_ARCAPPROXIMATIONOPT, + ID_M_ORIENTEDGESOPT, + ID_M_OUTLINEAPPEARANCECTRL, + wxID_BUTTON_EXPORT + }; + + wxBoxSizer* m_MainBoxSizer; + wxBoxSizer* m_layerSizer; + wxStaticText* m_staticText17; + wxStaticText* m_staticText2; + wxListBox* m_ListNetNameSelection; + wxStaticText* m_staticText16; + wxChoice* m_NetDisplayOption; + wxStaticText* m_staticText5; + wxTextCtrl* m_DoNotShowNetNameFilter; + wxStaticText* m_staticText51; + wxTextCtrl* m_ShowNetNameFilter; + wxButton* m_buttonRunFilter; + wxStaticText* m_ClearanceValueTitle; + wxTextCtrl* m_ZoneClearanceCtrl; + wxStaticText* m_MinThicknessValueTitle; + wxTextCtrl* m_ZoneMinThicknessCtrl; + wxStaticText* m_staticText151; + wxChoice* m_cornerSmoothingChoice; + wxStaticText* m_cornerSmoothingTitle; + wxTextCtrl* m_cornerSmoothingCtrl; + wxStaticText* m_staticText13; + wxChoice* m_PadInZoneOpt; + wxStaticText* m_AntipadSizeText; + wxTextCtrl* m_AntipadSizeValue; + wxStaticText* m_CopperBridgeWidthText; + wxTextCtrl* m_CopperWidthValue; + wxStaticText* m_staticText171; + wxSpinCtrl* m_PriorityLevelCtrl; + wxStaticText* m_staticText11; + wxChoice* m_FillModeCtrl; + wxStaticText* m_staticText12; + wxChoice* m_ArcApproximationOpt; + wxStaticText* m_staticText14; + wxChoice* m_OrientEdgesOpt; + wxStaticText* m_staticText15; + wxChoice* m_OutlineAppearanceCtrl; + wxButton* m_ExportSetupButton; + wxButton* m_OkButton; + wxButton* m_ButtonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnSize( wxSizeEvent& event ) { event.Skip(); } + virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); } + virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonOkClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_COPPER_ZONE_BASE(); + +}; + +#endif //__DIALOG_COPPER_ZONES_BASE_H__ diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp index e31779ac72..a27b59790a 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Apr 11 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -9,12 +9,12 @@ /////////////////////////////////////////////////////////////////////////// -BEGIN_EVENT_TABLE( DialogNonCopperZonesPropertiesBase, wxDialog ) +BEGIN_EVENT_TABLE( DialogNonCopperZonesPropertiesBase, DIALOG_SHIM ) EVT_BUTTON( wxID_OK, DialogNonCopperZonesPropertiesBase::_wxFB_OnOkClick ) EVT_BUTTON( wxID_CANCEL, DialogNonCopperZonesPropertiesBase::_wxFB_OnCancelClick ) END_EVENT_TABLE() -DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); @@ -40,6 +40,7 @@ DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); sbLeftSizer_->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_UpperSizer->Add( sbLeftSizer_, 0, 0, 5 ); wxStaticBoxSizer* m_OutilinesBoxOpt; @@ -57,6 +58,7 @@ DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow m_OutlineAppearanceCtrl->SetSelection( 1 ); m_OutilinesBoxOpt->Add( m_OutlineAppearanceCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_UpperSizer->Add( m_OutilinesBoxOpt, 0, 0, 5 ); wxBoxSizer* m_ButtonsSizer; @@ -69,8 +71,10 @@ DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); m_ButtonsSizer->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_UpperSizer->Add( m_ButtonsSizer, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_MainSizer->Add( m_UpperSizer, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); m_staticTextLayerSelection = new wxStaticText( this, wxID_ANY, _("Layer selection:"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -80,6 +84,7 @@ DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow m_LayerSelectionCtrl = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); m_MainSizer->Add( m_LayerSelectionCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + this->SetSizer( m_MainSizer ); this->Layout(); diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp index 9065fe7f94..6562e17508 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp @@ -1,606 +1,938 @@ - - - - - - C++ - 1 - UTF-8 - table - dialog_non_copper_zones_properties_base - 1000 - none - 1 - dialog_non_copper_zones_properties_base - - . - - 1 - 1 - 0 - - - wxBOTH - - 1 - - - - 0 - wxID_ANY - - - DialogNonCopperZonesPropertiesBase - - 416,287 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - Non Copper Zones Properties - - - - wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - m_MainSizer - wxVERTICAL - none - - 5 - wxEXPAND|wxALIGN_CENTER_HORIZONTAL - 1 - - - m_UpperSizer - wxHORIZONTAL - none - - 5 - - 0 - - wxID_ANY - Zone Fill Options: - - sbLeftSizer_ - wxVERTICAL - none - - - 5 - wxALL|wxEXPAND - 0 - - - "Use polygons" "Use segments" - - 1 - - - 0 - wxID_ANY - Filling Mode: - 1 - - - m_FillModeCtrl - protected - - 0 - - wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Zone min thickness value - - - m_MinThicknessValueTitle - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_ZoneMinThicknessCtrl - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - wxID_ANY - Outlines Options: - - m_OutilinesBoxOpt - wxVERTICAL - none - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - "Any" "H, V and 45 deg" - - 1 - - - 0 - wxID_ANY - Zone Edges Orient - 1 - - - m_OrientEdgesOpt - protected - - 0 - - wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - "Line" "Hatched Outline" "Full Hatched" - - 1 - - - 0 - wxID_ANY - Outlines Appearence - 1 - - - m_OutlineAppearanceCtrl - protected - - 1 - - wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL - 1 - - - m_ButtonsSizer - wxVERTICAL - none - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL - 0 - - - - 1 - 1 - - - 0 - wxID_OK - OK - - - m_buttonOk - protected - - - - - - - - - OnOkClick - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL - 0 - - - - 0 - 1 - - - 0 - wxID_CANCEL - Cancel - - - m_buttonCancel - protected - - - - - - - - - OnCancelClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Layer selection: - - - m_staticTextLayerSelection - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - - - - 1 - - - 0 - wxID_ANY - - - m_LayerSelectionCtrl - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + table + dialog_non_copper_zones_properties_base + 1000 + none + 1 + dialog_non_copper_zones_properties_base + + . + + 1 + 1 + 1 + 1 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DialogNonCopperZonesPropertiesBase + + 416,287 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Non Copper Zones Properties + + + + wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + m_MainSizer + wxVERTICAL + none + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL + 1 + + + m_UpperSizer + wxHORIZONTAL + none + + 5 + + 0 + + wxID_ANY + Zone Fill Options: + + sbLeftSizer_ + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Use polygons" "Use segments" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Filling Mode: + 1 + + 0 + + + 0 + + 1 + m_FillModeCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Zone min thickness value + + 0 + + + 0 + + 1 + m_MinThicknessValueTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ZoneMinThicknessCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + wxID_ANY + Outlines Options: + + m_OutilinesBoxOpt + wxVERTICAL + none + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Any" "H, V and 45 deg" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Zone Edges Orient + 1 + + 0 + + + 0 + + 1 + m_OrientEdgesOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Line" "Hatched Outline" "Full Hatched" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Outlines Appearence + 1 + + 0 + + + 0 + + 1 + m_OutlineAppearanceCtrl + 1 + + + protected + 1 + + Resizable + 1 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 1 + + + m_ButtonsSizer + wxVERTICAL + none + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_OK + OK + + 0 + + + 0 + + 1 + m_buttonOk + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnOkClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_CANCEL + Cancel + + 0 + + + 0 + + 1 + m_buttonCancel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Layer selection: + + 0 + + + 0 + + 1 + m_staticTextLayerSelection + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_LayerSelectionCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h index a2f7db34a2..d0aba70995 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h @@ -1,15 +1,17 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Apr 11 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __dialog_non_copper_zones_properties_base__ -#define __dialog_non_copper_zones_properties_base__ +#ifndef __DIALOG_NON_COPPER_ZONES_PROPERTIES_BASE_H__ +#define __DIALOG_NON_COPPER_ZONES_PROPERTIES_BASE_H__ +#include +#include #include - +#include "dialog_shim.h" #include #include #include @@ -29,7 +31,7 @@ /////////////////////////////////////////////////////////////////////////////// /// Class DialogNonCopperZonesPropertiesBase /////////////////////////////////////////////////////////////////////////////// -class DialogNonCopperZonesPropertiesBase : public wxDialog +class DialogNonCopperZonesPropertiesBase : public DIALOG_SHIM { DECLARE_EVENT_TABLE() private: @@ -51,14 +53,15 @@ class DialogNonCopperZonesPropertiesBase : public wxDialog wxListBox* m_LayerSelectionCtrl; // Virtual event handlers, overide them in your derived class - virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } public: - DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Non Copper Zones Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 416,287 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER ); + + DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Non Copper Zones Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 416,287 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER ); ~DialogNonCopperZonesPropertiesBase(); }; -#endif //__dialog_non_copper_zones_properties_base__ +#endif //__DIALOG_NON_COPPER_ZONES_PROPERTIES_BASE_H__ diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index 503adcc2ac..3fc9c3cfd0 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -55,6 +55,8 @@ Load() TODO's *) fix text twisting and final location issues. *) netclass info? *) code factoring, for polygon at least +*) zone fill clearances +*) package rectangles */ @@ -92,7 +94,9 @@ typedef MODULE_MAP::const_iterator MODULE_CITER; typedef boost::optional opt_string; typedef boost::optional opt_int; typedef boost::optional opt_double; -typedef boost::optional opt_cptree; +typedef boost::optional opt_bool; +//typedef boost::optional opt_cptree; + /// Eagle wire struct EWIRE @@ -179,9 +183,8 @@ struct ETEXT opt_string font; opt_double ratio; opt_erot erot; - opt_int align; - enum { + enum { // for align CENTER, CENTER_LEFT, TOP_CENTER, @@ -194,6 +197,78 @@ struct ETEXT BOTTOM_LEFT = -TOP_RIGHT, BOTTOM_RIGHT = -TOP_LEFT, }; + + opt_int align; +}; + +/// Eagle thru hol pad +struct EPAD +{ + std::string name; + double x; + double y; + double drill; + opt_double diameter; + + // for shape: (square | round | octagon | long | offset) + enum { + SQUARE, + ROUND, + OCTAGON, + LONG, + OFFSET, + }; + + opt_int shape; + + opt_erot erot; + + opt_bool stop; + opt_bool thermals; + opt_bool first; +}; + + +/// Eagle SMD pad +struct ESMD +{ + std::string name; + double x; + double y; + double dx; + double dy; + int layer; + opt_int roundness; + opt_erot erot; + opt_bool stop; + opt_bool thermals; + opt_bool cream; +}; + +struct EVERTEX +{ + double x; + double y; +}; + +// Eagle polygon, without vertices which are parsed as needed +struct EPOLYGON +{ + double width; + int layer; + opt_double spacing; + + enum { // for pour + SOLID, + HATCH, + CUTOUT, + }; + + opt_int pour; + opt_double isolate; + opt_bool orphans; + opt_bool thermals; + opt_int rank; }; @@ -212,6 +287,18 @@ static inline unsigned long timeStamp( CPTREE& aTree ) } +static opt_bool parseOptionalBool( CPTREE& attribs, const char* aName ) +{ + opt_bool ret; + opt_string stemp = attribs.get_optional( aName ); + + if( stemp ) + ret = !stemp->compare( "yes" ); + + return ret; +} + + EAGLE_PLUGIN::EAGLE_PLUGIN() { init( NULL ); @@ -459,40 +546,31 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics, const std::string& aXpath ) // net related info on it from the DTD. else if( !gr->first.compare( "rectangle" ) ) { -#if 0 ERECT r = erect( gr->second ); int layer = kicad_layer( r.layer ); - // hope the angle of rotation is zero. - - // might be better off making this into a ZONE: - if( IsValidCopperLayerIndex( layer ) ) { - auto_ptr dseg = new DRAWSEGMENT( m_board ); + // use a "netcode = 0" type ZONE: + ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board ); + m_board->Add( zone, ADD_APPEND ); - dseg->SetTimeStamp( timeStamp( gr->second ) ); - dseg->SetLayer( layer ); - dseg->SetShape( S_POLYGON ); - dseg->SetWidth( Mils2iu( 12 ) ); + zone->SetTimeStamp( timeStamp( gr->second ) ); + zone->SetLayer( layer ); + zone->SetNet( 0 ); - std::vector pts; + int outline_hatch = CPolyLine::DIAGONAL_EDGE; - pts.push_back( wxPoint( kicad_x( r.x1 ), kicad_y( r.y1 ) ) ); - pts.push_back( wxPoint( kicad_x( r.x2 ), kicad_y( r.y1 ) ) ); - pts.push_back( wxPoint( kicad_x( r.x2 ), kicad_y( r.y2 ) ) ); - pts.push_back( wxPoint( kicad_x( r.x1 ), kicad_y( r.y2 ) ) ); - dseg->SetPolyPoints( pts ); + zone->m_Poly->Start( layer, kicad_x( r.x1 ), kicad_y( r.y1 ), outline_hatch ); + zone->AppendCorner( wxPoint( kicad_x( r.x2 ), kicad_y( r.y1 ) ) ); + zone->AppendCorner( wxPoint( kicad_x( r.x2 ), kicad_y( r.y2 ) ) ); + zone->AppendCorner( wxPoint( kicad_x( r.x1 ), kicad_y( r.y2 ) ) ); + zone->m_Poly->Close(); - m_board->Add( dseg.release(), ADD_APPEND ); + // this is not my fault: + zone->m_Poly->SetHatch( outline_hatch, + Mils2iu( zone->m_Poly->GetDefaultHatchPitchMils() ) ); } -#elif 0 - // use a "netcode = 0" type ZONE: - auto_ptr zone = new ZONE_CONTAINER( m_board ); - - ; - m_board->Add( zone.release(), ADD_APPEND ); -#endif } else if( !gr->first.compare( "hole" ) ) { @@ -630,18 +708,13 @@ void EAGLE_PLUGIN::loadElements( CPTREE& aElements, const std::string& aXpath ) for( D_PAD* pad = m->m_Pads; pad; pad = pad->Next() ) { - const ENET& enet = m_pads_to_nets[ makeKey( name, TO_UTF8( pad->GetPadName())) ]; + std::string key = makeKey( name, TO_UTF8( pad->GetPadName() ) ); - D(printf( "refname:'%s' pad:'%s' netcode:%d netname:'%s'\n", - name.c_str(), TO_UTF8( pad->GetPadName() ), - enet.netcode, - enet.netname.c_str() - );) - - if( enet.netname.size() ) + NET_MAP_CITER ni = m_pads_to_nets.find( key ); + if( ni != m_pads_to_nets.end() ) { - pad->SetNetname( FROM_UTF8( enet.netname.c_str() ) ); - pad->SetNet( enet.netcode ); + pad->SetNetname( FROM_UTF8( ni->second.netname.c_str() ) ); + pad->SetNet( ni->second.netcode ); } } @@ -808,7 +881,7 @@ ERECT EAGLE_PLUGIN::erect( CPTREE& aRect ) const r.y2 = attribs.get( "y2" ); r.layer = attribs.get( "layer" ); - // @todo: hoping that rot is not used + // @todo: stop hoping that rot is not used return r; } @@ -883,7 +956,11 @@ EROT EAGLE_PLUGIN::erot( const std::string& aRot ) const rot.spin = aRot.find( 'S' ) != aRot.npos; rot.mirror = aRot.find( 'M' ) != aRot.npos; - rot.degrees = strtod( aRot.c_str() + 1 + int( rot.spin || rot.mirror ), NULL ); + rot.degrees = strtod( aRot.c_str() + + 1 // skip leading 'R' + + int( rot.spin ) // skip optional leading 'S' + + int( rot.mirror ), // skip optional leading 'M' + NULL ); return rot; } @@ -947,6 +1024,173 @@ EATTR EAGLE_PLUGIN::eattr( CPTREE& aAttribute ) const } +EPAD EAGLE_PLUGIN::epad( CPTREE& aPad ) const +{ + EPAD p; + CPTREE& attribs = aPad.get_child( "" ); + + /* + + + */ + + // the DTD says these must be present, throw exception if not found + p.name = attribs.get( "name" ); + p.x = attribs.get( "x" ); + p.y = attribs.get( "y" ); + p.drill = attribs.get( "drill" ); + + p.diameter = attribs.get_optional( "diameter" ); + + opt_string s = attribs.get_optional( "shape" ); + if( s ) + { + // (square | round | octagon | long | offset) + if( !s->compare( "square" ) ) + p.shape = EPAD::SQUARE; + else if( !s->compare( "round" ) ) + p.shape = EPAD::ROUND; + else if( !s->compare( "octagon" ) ) + p.shape = EPAD::OCTAGON; + else if( !s->compare( "long" ) ) + p.shape = EPAD::LONG; + else if( !s->compare( "offset" ) ) + p.shape = EPAD::OFFSET; + } + + opt_string rot = attribs.get_optional( "rot" ); + if( rot ) + { + p.erot = erot( *rot ); + } + + p.stop = parseOptionalBool( attribs, "stop" ); + p.thermals = parseOptionalBool( attribs, "thermals" ); + p.first = parseOptionalBool( attribs, "first" ); + + return p; +} + + +ESMD EAGLE_PLUGIN::esmd( CPTREE& aSMD ) const +{ + ESMD s; + CPTREE& attribs = aSMD.get_child( "" ); + + /* + + */ + + // the DTD says these must be present, throw exception if not found + s.name = attribs.get( "name" ); + s.x = attribs.get( "x" ); + s.y = attribs.get( "y" ); + s.dx = attribs.get( "dx" ); + s.dy = attribs.get( "dy" ); + s.layer = attribs.get( "layer" ); + + opt_string rot = attribs.get_optional( "rot" ); + if( rot ) + { + s.erot = erot( *rot ); + } + + s.roundness = attribs.get_optional( "roundness" ); + s.thermals = parseOptionalBool( attribs, "thermals" ); + s.stop = parseOptionalBool( attribs, "stop" ); + s.thermals = parseOptionalBool( attribs, "thermals" ); + s.cream = parseOptionalBool( attribs, "cream" ); + + return s; +} + + +EVERTEX EAGLE_PLUGIN::evertex( CPTREE& aVertex ) const +{ + EVERTEX v; + CPTREE& attribs = aVertex.get_child( "" ); + + /* + + + */ + + v.x = attribs.get( "x" ); + v.y = attribs.get( "y" ); + + return v; +} + + +EPOLYGON EAGLE_PLUGIN::epolygon( CPTREE& aPolygon ) const +{ + EPOLYGON p; + CPTREE& attribs = aPolygon.get_child( "" ); + + /* + or context -- + orphans %Bool; "no" -- only in context -- + thermals %Bool; "yes" -- only in context -- + rank %Int; "0" -- 1..6 in context, 0 or 7 in context -- + > + */ + + p.width = attribs.get( "width" ); + p.layer = attribs.get( "layer" ); + p.spacing = attribs.get_optional( "spacing" ); + + opt_string s = attribs.get_optional( "pour" ); + if( s ) + { + // (solid | hatch | cutout) + if( !s->compare( "hatch" ) ) + p.pour = EPOLYGON::HATCH; + else if( !s->compare( "cutout" ) ) + p.pour = EPOLYGON::CUTOUT; + else + p.pour = EPOLYGON::SOLID; + } + + p.orphans = parseOptionalBool( attribs, "orphans" ); + p.thermals = parseOptionalBool( attribs, "thermals" ); + p.rank = attribs.get_optional( "rank" ); + + return p; +} + + MODULE* EAGLE_PLUGIN::makeModule( CPTREE& aPackage, const std::string& aPkgName ) const { std::auto_ptr m( new MODULE( NULL ) ); @@ -1014,11 +1258,10 @@ void EAGLE_PLUGIN::packageWire( MODULE* aModule, CPTREE& aTree ) const void EAGLE_PLUGIN::packagePad( MODULE* aModule, CPTREE& aTree ) const { - // pay for this tree traversal only once - CPTREE& attrs = aTree.get_child( "" ); + // this is thru hole technology here, no SMDs + EPAD e = epad( aTree ); /* from /doc/eagle.dtd - m_Pads.PushBack( pad ); - // the DTD says these must be present, throw exception if not found - const std::string& name = attrs.get( "name" ); - - double x = attrs.get( "x" ); - double y = attrs.get( "y" ); - double drill = attrs.get( "drill" ); + pad->SetPadName( FROM_UTF8( e.name.c_str() ) ); // pad's "Position" is not relative to the module's, // whereas Pos0 is relative to the module's but is the unrotated coordinate. - pad->SetPadName( FROM_UTF8( name.c_str() ) ); - - wxPoint padpos( kicad_x( x ), kicad_y( y ) ); + wxPoint padpos( kicad_x( e.x ), kicad_y( e.y ) ); pad->SetPos0( padpos ); @@ -1057,34 +1293,31 @@ void EAGLE_PLUGIN::packagePad( MODULE* aModule, CPTREE& aTree ) const pad->SetPosition( padpos + aModule->GetPosition() ); - pad->SetDrillSize( wxSize( kicad( drill ), kicad( drill ) ) ); + pad->SetDrillSize( wxSize( kicad( e.drill ), kicad( e.drill ) ) ); - pad->SetLayerMask( 0x00C0FFFF ); // should tell it to go through all layers + pad->SetLayerMask( ALL_CU_LAYERS | SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ); - // Optional according to DTD. - opt_double diameter = attrs.get_optional( "diameter" ); - opt_string shape = attrs.get_optional( "shape" ); - opt_string rot = attrs.get_optional( "rot" ); - /* - opt_string stop = attrs.get_optional( "stop" ); - opt_string thermals = attrs.get_optional( "thermals" ); - opt_string first = attrs.get_optional( "first" ); - */ - - if( diameter ) + if( e.diameter ) { - int kidiam = kicad( *diameter ); - pad->SetSize( wxSize( kidiam, kidiam ) ); + int diameter = kicad( *e.diameter ); + pad->SetSize( wxSize( diameter, diameter ) ); + } + else + { + // the pad size is optional in the eagle DTD, supply something here that is a + // 6 mil copper surround as a minimum. + int drillz = pad->GetDrillSize().x; + int diameter = std::max( drillz + 2 * Mils2iu( 6 ), int( drillz * 1.2 ) ); + pad->SetSize( wxSize( diameter, diameter ) ); } - if( shape ) // if not shape, our default is circle and that matches their default "round" + if( e.shape ) // if not shape, our default is circle and that matches their default "round" { // - - if( !shape->compare( "round" ) ) + if( *e.shape == EPAD::ROUND ) wxASSERT( pad->GetShape()==PAD_CIRCLE ); // verify set in D_PAD constructor - else if( !shape->compare( "octagon" ) ) + else if( *e.shape == EPAD::OCTAGON ) { wxASSERT( pad->GetShape()==PAD_CIRCLE ); // verify set in D_PAD constructor @@ -1092,7 +1325,7 @@ void EAGLE_PLUGIN::packagePad( MODULE* aModule, CPTREE& aTree ) const // pad->SetShape( PAD_OCTAGON ); } - else if( !shape->compare( "long" ) ) + else if( *e.shape == EPAD::LONG ) { pad->SetShape( PAD_OVAL ); @@ -1100,19 +1333,18 @@ void EAGLE_PLUGIN::packagePad( MODULE* aModule, CPTREE& aTree ) const z.x *= 2; pad->SetSize( z ); } - else if( !shape->compare( "square" ) ) + else if( *e.shape == EPAD::SQUARE ) { pad->SetShape( PAD_RECT ); } } - if( rot ) + if( e.erot ) { - EROT r = erot( *rot ); - pad->SetOrientation( r.degrees * 10 ); + pad->SetOrientation( e.erot->degrees * 10 ); } - // don't know what stop and thermals should look like now. + // @todo: handle stop and thermal } @@ -1236,32 +1468,8 @@ void EAGLE_PLUGIN::packageHole( MODULE* aModule, CPTREE& aTree ) const void EAGLE_PLUGIN::packageSMD( MODULE* aModule, CPTREE& aTree ) const { - // pay for this tree traversal only once - CPTREE& attrs = aTree.get_child( "" ); - - /* - - */ - - // the DTD says these must be present, throw exception if not found - const std::string& name = attrs.get( "name" ); - double x = attrs.get( "x" ); - double y = attrs.get( "y" ); - double dx = attrs.get( "dx" ); - double dy = attrs.get( "dy" ); - int layer = attrs.get( "layer" ); + ESMD e = esmd( aTree ); + int layer = kicad_layer( e.layer ); if( !IsValidCopperLayerIndex( layer ) ) { @@ -1271,15 +1479,14 @@ void EAGLE_PLUGIN::packageSMD( MODULE* aModule, CPTREE& aTree ) const D_PAD* pad = new D_PAD( aModule ); aModule->m_Pads.PushBack( pad ); - - pad->SetPadName( FROM_UTF8( name.c_str() ) ); + pad->SetPadName( FROM_UTF8( e.name.c_str() ) ); pad->SetShape( PAD_RECT ); pad->SetAttribute( PAD_SMD ); // pad's "Position" is not relative to the module's, // whereas Pos0 is relative to the module's but is the unrotated coordinate. - wxPoint padpos( kicad_x( x ), kicad_y( y ) ); + wxPoint padpos( kicad_x( e.x ), kicad_y( e.y ) ); pad->SetPos0( padpos ); @@ -1287,33 +1494,26 @@ void EAGLE_PLUGIN::packageSMD( MODULE* aModule, CPTREE& aTree ) const pad->SetPosition( padpos + aModule->GetPosition() ); - pad->SetSize( wxSize( kicad( dx ), kicad( dy ) ) ); + pad->SetSize( wxSize( kicad( e.dx ), kicad( e.dy ) ) ); - pad->SetLayer( kicad_layer( layer ) ); - pad->SetLayerMask( 0x00888000 ); + pad->SetLayer( layer ); + pad->SetLayerMask( LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT ); // Optional according to DTD - opt_double roundness = attrs.get_optional( "roundness" ); - opt_string rot = attrs.get_optional( "rot" ); - opt_string stop = attrs.get_optional( "stop" ); - opt_string thermals = attrs.get_optional( "thermals" ); - opt_string cream = attrs.get_optional( "cream" ); - - if( roundness ) // set set shape to PAD_RECT above, in case roundness is not present + if( e.roundness ) // set set shape to PAD_RECT above, in case roundness is not present { - if( *roundness >= 75 ) // roundness goes from 0-100% + if( *e.roundness >= 75 ) // roundness goes from 0-100% as integer { - if( dy == dx ) + if( e.dy == e.dx ) pad->SetShape( PAD_ROUND ); else pad->SetShape( PAD_OVAL ); } } - if( rot ) + if( e.erot ) { - EROT r = erot( *rot ); - pad->SetOrientation( r.degrees * 10 ); + pad->SetOrientation( e.erot->degrees * 10 ); } // don't know what stop, thermals, and cream should look like now. @@ -1413,14 +1613,54 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals, const std::string& aXpath ) std::string key = makeKey( reference, pad ) ; - D(printf( "adding refname:'%s' pad:'%s' netcode:%d netname:'%s'\n", - reference.c_str(), pad.c_str(), netCode, nname.c_str() );) + // D(printf( "adding refname:'%s' pad:'%s' netcode:%d netname:'%s'\n", reference.c_str(), pad.c_str(), netCode, nname.c_str() );) m_pads_to_nets[ key ] = ENET( netCode, nname ); } else if( !it->first.compare( "polygon" ) ) { + EPOLYGON p = epolygon( it->second ); + int layer = kicad_layer( p.layer ); + + if( IsValidCopperLayerIndex( layer ) ) + { + // use a "netcode = 0" type ZONE: + ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board ); + m_board->Add( zone, ADD_APPEND ); + + zone->SetTimeStamp( timeStamp( it->second ) ); + zone->SetLayer( layer ); + zone->SetNet( netCode ); + zone->SetNetName( netName ); + + + + int outline_hatch = CPolyLine::DIAGONAL_EDGE; + + bool first = true; + for( CITER vi = it->second.begin(); vi != it->second.end(); ++vi ) + { + if( vi->first.compare( "vertex" ) ) // skip node + continue; + + EVERTEX v = evertex( vi->second ); + + // the ZONE_CONTAINER API needs work, as you can see: + if( first ) + { + zone->m_Poly->Start( layer, kicad_x( v.x ), kicad_y( v.y ), outline_hatch ); + first = false; + } + else + zone->AppendCorner( wxPoint( kicad_x( v.x ), kicad_y( v.y ) ) ); + } + + zone->m_Poly->Close(); + + zone->m_Poly->SetHatch( outline_hatch, + Mils2iu( zone->m_Poly->GetDefaultHatchPitchMils() ) ); + } } } } diff --git a/pcbnew/eagle_plugin.h b/pcbnew/eagle_plugin.h index 032fd6952e..bba024013b 100644 --- a/pcbnew/eagle_plugin.h +++ b/pcbnew/eagle_plugin.h @@ -57,6 +57,7 @@ struct ENET }; typedef std::map< std::string, ENET > NET_MAP; +typedef NET_MAP::const_iterator NET_MAP_CITER; /* #include @@ -81,7 +82,10 @@ struct EATTR; struct ECIRCLE; struct ETEXT; struct ERECT; - +struct EPAD; +struct ESMD; +struct EVERTEX; +struct EPOLYGON; /** * Class EAGLE_PLUGIN @@ -190,20 +194,26 @@ private: void loadElements( CPTREE& aElements, const std::string& aXpath ); + // none of the 'e'funcs do any "to KiCad" conversion, they merely read the XML into binary: + /** * Function ewire * converts a 's xml attributes to binary without additional conversion. * @param aResult is an EWIRE to fill in with the data converted to binary. */ - EWIRE ewire( CPTREE& aWire ) const; + EWIRE ewire( CPTREE& aWire ) const; - EVIA evia( CPTREE& aVia ) const; + EVIA evia( CPTREE& aVia ) const; - ECIRCLE ecircle( CPTREE& aCircle ) const; - ETEXT etext( CPTREE& aText ) const; - ERECT erect( CPTREE& aRect ) const; + ECIRCLE ecircle( CPTREE& aCircle ) const; + ETEXT etext( CPTREE& aText ) const; + ERECT erect( CPTREE& aRect ) const; - EROT erot( const std::string& aRot ) const; + EROT erot( const std::string& aRot ) const; + EPAD epad( CPTREE& aPad ) const; + ESMD esmd( CPTREE& aSMD ) const; + EVERTEX evertex( CPTREE& aVertex ) const; + EPOLYGON epolygon( CPTREE& aPolygon ) const; /** * Function eattr diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 3ced90fe48..d00185fbd0 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -1152,7 +1152,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) PATH* mainPolygon = new PATH( plane, T_polygon ); plane->SetShape( mainPolygon ); - plane->name = TO_UTF8( item->m_Netname ); + plane->name = TO_UTF8( item->GetNetName() ); if( plane->name.size() == 0 ) { diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 3695d87797..b543640cb5 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -800,7 +800,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone ) NETINFO_ITEM* net = GetBoard()->FindNet( zoneInfo.m_NetcodeSelection ); if( net ) // net == NULL should not occur - aZone->m_Netname = net->GetNetname(); + aZone->SetNetName( net->GetNetname() ); // Combine zones if possible GetBoard()->AreaPolygonModified( &_AuxiliaryList, aZone, true, s_Verbose ); diff --git a/pcbnew/zones_non_copper_type_functions.cpp b/pcbnew/zones_non_copper_type_functions.cpp index 9911a254be..28af1f3fdb 100644 --- a/pcbnew/zones_non_copper_type_functions.cpp +++ b/pcbnew/zones_non_copper_type_functions.cpp @@ -74,7 +74,6 @@ DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME* void DIALOG_NON_COPPER_ZONES_EDITOR::Init() { - SetFocus(); SetReturnCode( ZONE_ABORT ); // Will be changed on button click m_FillModeCtrl->SetSelection( m_settings.m_FillMode ? 1 : 0 ); diff --git a/pcbnew/zones_test_and_combine_areas.cpp b/pcbnew/zones_test_and_combine_areas.cpp index fb6d206d08..c9b1bf5fc0 100644 --- a/pcbnew/zones_test_and_combine_areas.cpp +++ b/pcbnew/zones_test_and_combine_areas.cpp @@ -282,7 +282,7 @@ int BOARD::ClipAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList, { wxString str; str.Printf( wxT( "Area %08lX of net \"%s\" has arcs intersecting other sides.\n" ), - aCurrArea->GetTimeStamp(), GetChars( aCurrArea->m_Netname ) ); + aCurrArea->GetTimeStamp(), GetChars( aCurrArea->GetNetName() ) ); str += wxT( "This may cause problems with other editing operations,\n" ); str += wxT( "such as adding cutouts. It can't be fixed automatically.\n" ); str += wxT( "Manual correction is recommended." ); @@ -305,7 +305,7 @@ int BOARD::ClipAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList, { wxString str; str.Printf( wxT( "Area %08lX of net \"%s\" is self-intersecting and will be clipped.\n" ), - aCurrArea->GetTimeStamp(), GetChars( aCurrArea->m_Netname ) ); + aCurrArea->GetTimeStamp(), GetChars( aCurrArea->GetNetName() ) ); str += wxT( "This may result in splitting the area.\n" ); str += wxT( "If the area is complex, this may take a few seconds." ); wxMessageBox( str ); @@ -482,7 +482,7 @@ int BOARD::CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList, int aNetCode, str.Printf( wxT( "Areas %d and %d of net \"%s\" intersect, but some of the intersecting sides are arcs.\n" ), ia1 + 1, ia2 + 1, - GetChars( curr_area->m_Netname ) ); + GetChars( curr_area->GetNetName() ) ); str += wxT( "Therefore, these areas can't be combined." ); wxMessageBox( str ); }