diff --git a/README.txt b/README.txt index bb5295f066..3ea49163aa 100644 --- a/README.txt +++ b/README.txt @@ -20,6 +20,8 @@ Subdirectories -------------- 3d-viewer - Sourcecode of 3D viewer bitmaps - Menu and program icons +bitmap2component - Sourcecode of a small application to create a footprint or a component from a B&W bitmap + this component or footprint has just graphic items that show the bitmap CMakeModules - Modules for the CMAKE build tool common - Sourcecode of the common library (common functions shared across whole suite) cvpcb - Sourcecode of CvPCB, tool to link components with footprints sourcecode diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 009343013a..355f77826a 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -655,7 +655,6 @@ public: void ListNetsAndSelect( wxCommandEvent& event ); void Swap_Layers( wxCommandEvent& event ); - void Install_Test_DRC_Frame( wxDC* DC ); // Handling texts on the board void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); diff --git a/pcbnew/dialog_pad_properties.cpp b/pcbnew/dialog_pad_properties.cpp index 98af884bd2..63110a20ea 100644 --- a/pcbnew/dialog_pad_properties.cpp +++ b/pcbnew/dialog_pad_properties.cpp @@ -232,8 +232,7 @@ void DIALOG_PAD_PROPERTIES::initValues() m_PadShapeSizeY_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_PadShapeOffsetX_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_PadShapeOffsetY_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); - m_PadShapeDeltaX_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); - m_PadShapeDeltaY_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); + m_PadShapeDelta_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_NetClearanceUnits->SetLabel( GetUnitsLabel( g_UserUnit ) ); // Display current pad masks clearances units @@ -254,8 +253,16 @@ void DIALOG_PAD_PROPERTIES::initValues() PutValueInLocalUnits( *m_ShapeOffset_X_Ctrl, m_dummyPad->m_Offset.x, internalUnits ); PutValueInLocalUnits( *m_ShapeOffset_Y_Ctrl, m_dummyPad->m_Offset.y, internalUnits ); - PutValueInLocalUnits( *m_ShapeDelta_X_Ctrl, m_dummyPad->m_DeltaSize.x, internalUnits ); - PutValueInLocalUnits( *m_ShapeDelta_Y_Ctrl, m_dummyPad->m_DeltaSize.y, internalUnits ); + if( m_dummyPad->m_DeltaSize.x ) + { + PutValueInLocalUnits( *m_ShapeDelta_Ctrl, m_dummyPad->m_DeltaSize.x, internalUnits ); + m_radioBtnDeltaXdir->SetValue(true); + } + else + { + PutValueInLocalUnits( *m_ShapeDelta_Ctrl, m_dummyPad->m_DeltaSize.y, internalUnits ); + m_radioBtnDeltaYdir->SetValue(true); + } PutValueInLocalUnits( *m_NetClearanceValueCtrl, m_dummyPad->m_LocalClearance, internalUnits ); PutValueInLocalUnits( *m_SolderMaskMarginCtrl, @@ -391,26 +398,30 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event ) switch( m_PadShape->GetSelection() ) { case 0: //CIRCLE: - m_ShapeDelta_X_Ctrl->Enable( false ); - m_ShapeDelta_Y_Ctrl->Enable( false ); + m_ShapeDelta_Ctrl->Enable( false ); + m_radioBtnDeltaXdir->Enable( false ); + m_radioBtnDeltaYdir->Enable( false ); m_ShapeSize_Y_Ctrl->Enable( false ); break; case 1: //OVALE: - m_ShapeDelta_X_Ctrl->Enable( false ); - m_ShapeDelta_Y_Ctrl->Enable( false ); + m_ShapeDelta_Ctrl->Enable( false ); + m_radioBtnDeltaXdir->Enable( false ); + m_radioBtnDeltaYdir->Enable( false ); m_ShapeSize_Y_Ctrl->Enable( true ); break; case 2: // PAD_RECT: - m_ShapeDelta_X_Ctrl->Enable( false ); - m_ShapeDelta_Y_Ctrl->Enable( false ); + m_ShapeDelta_Ctrl->Enable( false ); + m_radioBtnDeltaXdir->Enable( false ); + m_radioBtnDeltaYdir->Enable( false ); m_ShapeSize_Y_Ctrl->Enable( true ); break; case 3: //TRAPEZE: - m_ShapeDelta_X_Ctrl->Enable( true ); - m_ShapeDelta_Y_Ctrl->Enable( true ); + m_ShapeDelta_Ctrl->Enable( true ); + m_radioBtnDeltaXdir->Enable( true ); + m_radioBtnDeltaYdir->Enable( true ); m_ShapeSize_Y_Ctrl->Enable( true ); break; } @@ -704,11 +715,15 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError // Read pad shape delta size: // m_DeltaSize.x or m_DeltaSize.y must be NULL. for a trapezoid. - aPad->m_DeltaSize.x = ReturnValueFromTextCtrl( *m_ShapeDelta_X_Ctrl, internalUnits ); - aPad->m_DeltaSize.y = ReturnValueFromTextCtrl( *m_ShapeDelta_Y_Ctrl, internalUnits ); + wxSize delta; + if( m_radioBtnDeltaXdir->GetValue() ) + delta.x = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl, internalUnits ); + else + delta.y = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl, internalUnits ); + aPad->m_DeltaSize = delta; // Test bad values (be sure delta values are not to large) - // rememver DeltaSize.x is the Y size variation + // remember DeltaSize.x is the Y size variation bool error = false; if( (aPad->m_DeltaSize.x < 0) && (aPad->m_DeltaSize.x <= -aPad->m_Size.y) ) { @@ -848,12 +863,6 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError DisplayError( this, _( "Too large value for pad delta size" ) ); return false; } - - if( aPad->m_DeltaSize.x && aPad->m_DeltaSize.y ) - { - DisplayError( this, _( "Incorrect value for pad delta size: X or Y value must be NULL" ) ); - return false; - } } return true; diff --git a/pcbnew/dialog_pad_properties_base.cpp b/pcbnew/dialog_pad_properties_base.cpp index c8a429bc6e..30d98348ad 100644 --- a/pcbnew/dialog_pad_properties_base.cpp +++ b/pcbnew/dialog_pad_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -150,27 +150,36 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_PadShapeOffsetY_Unit->Wrap( -1 ); fgSizerGeometry->Add( m_PadShapeOffsetY_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText21 = new wxStaticText( this, wxID_ANY, _("Shape delta X"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21 = new wxStaticText( this, wxID_ANY, _("Shape Delta Dim"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText21->Wrap( -1 ); fgSizerGeometry->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - m_ShapeDelta_X_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerGeometry->Add( m_ShapeDelta_X_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_ShapeDelta_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerGeometry->Add( m_ShapeDelta_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - m_PadShapeDeltaX_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadShapeDeltaX_Unit->Wrap( -1 ); - fgSizerGeometry->Add( m_PadShapeDeltaX_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + m_PadShapeDelta_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_PadShapeDelta_Unit->Wrap( -1 ); + fgSizerGeometry->Add( m_PadShapeDelta_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText23 = new wxStaticText( this, wxID_ANY, _("Shape delta Y"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText23 = new wxStaticText( this, wxID_ANY, _("Trap. Direction"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText23->Wrap( -1 ); fgSizerGeometry->Add( m_staticText23, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); - m_ShapeDelta_Y_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerGeometry->Add( m_ShapeDelta_Y_Ctrl, 0, wxALL, 5 ); + wxBoxSizer* bSizerbdir; + bSizerbdir = new wxBoxSizer( wxHORIZONTAL ); - m_PadShapeDeltaY_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadShapeDeltaY_Unit->Wrap( -1 ); - fgSizerGeometry->Add( m_PadShapeDeltaY_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_radioBtnDeltaXdir = new wxRadioButton( this, wxID_DDIRX, _(">"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_radioBtnDeltaXdir->SetValue( true ); + bSizerbdir->Add( m_radioBtnDeltaXdir, 0, wxALL, 5 ); + + m_radioBtnDeltaYdir = new wxRadioButton( this, wxID_DDIRY, _("^"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerbdir->Add( m_radioBtnDeltaYdir, 0, wxALL, 5 ); + + fgSizerGeometry->Add( bSizerbdir, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticTextDDirInfo = new wxStaticText( this, wxID_ANY, _("Rot 0"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDDirInfo->Wrap( -1 ); + fgSizerGeometry->Add( m_staticTextDDirInfo, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); sbSizer2->Add( fgSizerGeometry, 1, wxEXPAND, 5 ); @@ -354,58 +363,45 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL ); m_PadLayerCmp = new wxCheckBox( this, wxID_ANY, _("Component layer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerCu = new wxCheckBox( this, wxID_ANY, _("Copper layer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerCu, 0, wxALL, 5 ); m_LayersSizer->Add( 0, 8, 1, wxEXPAND, 5 ); m_PadLayerAdhCmp = new wxCheckBox( this, wxID_ANY, _("Adhesive Cmp"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerAdhCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerAdhCu = new wxCheckBox( this, wxID_ANY, _("Adhesive Copper"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerAdhCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerPateCmp = new wxCheckBox( this, wxID_ANY, _("Solder paste Cmp"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerPateCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerPateCu = new wxCheckBox( this, wxID_ANY, _("Solder paste Copper"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerPateCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerSilkCmp = new wxCheckBox( this, wxID_ANY, _("Silkscreen Cmp"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerSilkCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerSilkCu = new wxCheckBox( this, wxID_ANY, _("Silkscreen Copper"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerSilkCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerMaskCmp = new wxCheckBox( this, wxID_ANY, _("Solder mask Cmp"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerMaskCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerMaskCu = new wxCheckBox( this, wxID_ANY, _("Solder mask Copper"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerMaskCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerDraft = new wxCheckBox( this, wxID_ANY, _("Draft layer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerDraft, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerECO1 = new wxCheckBox( this, wxID_ANY, _("E.C.O.1 layer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerECO1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerECO2 = new wxCheckBox( this, wxID_ANY, _("E.C.O.2 layer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerECO2, 0, wxALL, 5 ); m_RightBoxSizer->Add( m_LayersSizer, 0, 0, 5 ); @@ -436,8 +432,9 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_ShapeSize_Y_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_ShapeOffset_X_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_ShapeOffset_Y_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_ShapeDelta_X_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_ShapeDelta_Y_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_ShapeDelta_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_radioBtnDeltaXdir->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_radioBtnDeltaYdir->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_PadShape->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPadShapeSelection ), NULL, this ); m_DrillShapeCtrl->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this ); m_PadOrient->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this ); @@ -473,8 +470,9 @@ DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE() m_ShapeSize_Y_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_ShapeOffset_X_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_ShapeOffset_Y_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_ShapeDelta_X_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_ShapeDelta_Y_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_ShapeDelta_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_radioBtnDeltaXdir->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_radioBtnDeltaYdir->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_PadShape->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPadShapeSelection ), NULL, this ); m_DrillShapeCtrl->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this ); m_PadOrient->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this ); @@ -497,4 +495,5 @@ DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE() m_PadLayerECO2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this ); m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadPropertiesAccept ), NULL, this ); + } diff --git a/pcbnew/dialog_pad_properties_base.fbp b/pcbnew/dialog_pad_properties_base.fbp index 3e24019079..4cf8586330 100644 --- a/pcbnew/dialog_pad_properties_base.fbp +++ b/pcbnew/dialog_pad_properties_base.fbp @@ -2,9 +2,11 @@ - + C++ 1 + source_name + 0 UTF-8 connect dialog_pad_properties_base @@ -12,66 +14,73 @@ none 1 dialog_pad_properties_base - + . - + 1 + 1 1 0 - + wxBOTH - + + 1 1 - - - + impl_virtual + + + 0 wxID_DIALOG_EDIT_PAD - - + + DIALOG_PAD_PROPERTIES_BASE - + 733,486 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - + Pad Properties - - - + + + wxFILTER_NONE + wxDefaultValidator + + + wxSUNKEN_BORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + m_MainSizer wxVERTICAL none @@ -80,7 +89,7 @@ wxEXPAND 1 - + bGeneralSizer wxHORIZONTAL none @@ -89,7 +98,7 @@ wxBOTTOM|wxLEFT|wxEXPAND 0 - + m_LeftBoxSizer wxVERTICAL none @@ -98,50 +107,55 @@ wxTOP|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY Pad Num : - - + + m_PadNumText protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -149,54 +163,59 @@ wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND 0 - - + + + 1 1 - - + + 0 wxID_PADNUMCTRL - + 0 - + m_PadNumCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -204,50 +223,55 @@ wxTOP|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY Pad Net Name : - - + + m_PadNameText protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -255,54 +279,59 @@ wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_PADNETNAMECTRL - + 0 - + m_PadNetNameCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -312,11 +341,11 @@ wxID_ANY Pad Geometry: - + sbSizer2 wxVERTICAL none - + 5 wxEXPAND @@ -324,10 +353,10 @@ 3 wxBOTH - - + + 0 - + fgSizerGeometry wxFLEX_GROWMODE_SPECIFIED none @@ -338,50 +367,55 @@ wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY Pad pos X - - + + m_staticText4 protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -389,54 +423,59 @@ wxTOP|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_PadPosition_X_Ctrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -444,50 +483,55 @@ wxALIGN_CENTER_VERTICAL|wxRIGHT 0 - - + + + 1 1 - - + + 0 wxID_ANY Inch - - + + m_PadPosX_Unit protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -495,50 +539,55 @@ wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 0 - - + + + 1 1 - - + + 0 wxID_ANY Pad pos Y - - + + m_staticText41 protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -546,54 +595,59 @@ wxALL 0 - - + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_PadPosition_Y_Ctrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -601,50 +655,55 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 0 - - + + + 1 1 - - + + 0 wxID_ANY Inch - - + + m_PadPosY_Unit protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -652,48 +711,53 @@ wxEXPAND | wxALL 0 - - + + + 1 1 - - + + 0 wxID_ANY - - + + m_staticline7 protected - - + + wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -701,48 +765,53 @@ wxEXPAND | wxALL 0 - - + + + 1 1 - - + + 0 wxID_ANY - - + + m_staticline8 protected - - + + wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -750,48 +819,53 @@ wxEXPAND | wxALL 0 - - + + + 1 1 - - + + 0 wxID_ANY - - + + m_staticline9 protected - - + + wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -799,50 +873,55 @@ wxALIGN_CENTER_VERTICAL|wxLEFT|wxALIGN_RIGHT 0 - - + + + 1 1 - - + + 0 wxID_ANY Pad Drill X - - + + m_textPadDrillX protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -850,54 +929,59 @@ wxALL 0 - - + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_PadDrill_X_Ctrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -905,50 +989,55 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 0 - - + + + 1 1 - - + + 0 wxID_ANY Inch - - + + m_PadDrill_X_Unit protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -956,50 +1045,55 @@ wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY Pad Drill Y - - + + m_textPadDrillY protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1007,54 +1101,59 @@ wxALL 0 - - + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_PadDrill_Y_Ctrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -1062,50 +1161,55 @@ wxALIGN_CENTER_VERTICAL|wxRIGHT 0 - - + + + 1 1 - - + + 0 wxID_ANY Inch - - + + m_PadDrill_Y_Unit protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1113,48 +1217,53 @@ wxEXPAND | wxALL 0 - - + + + 1 1 - - + + 0 wxID_ANY - - + + m_staticline4 protected - - + + wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1162,48 +1271,53 @@ wxEXPAND | wxALL 0 - - + + + 1 1 - - + + 0 wxID_ANY - - + + m_staticline5 protected - - + + wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1211,48 +1325,53 @@ wxEXPAND | wxALL 0 - - + + + 1 1 - - + + 0 wxID_ANY - - + + m_staticline6 protected - - + + wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1260,50 +1379,55 @@ wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 0 - - + + + 1 1 - - + + 0 wxID_ANY Shape size X - - + + m_staticText12 protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1311,54 +1435,59 @@ wxTOP|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_ShapeSize_X_Ctrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -1366,50 +1495,55 @@ wxALIGN_CENTER_VERTICAL|wxRIGHT 0 - - + + + 1 1 - - + + 0 wxID_ANY Inch - - + + m_PadShapeSizeX_Unit protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1417,50 +1551,55 @@ wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 0 - - + + + 1 1 - - + + 0 wxID_ANY Shape size Y - - + + m_staticText15 protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1468,54 +1607,59 @@ wxALL 0 - - + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_ShapeSize_Y_Ctrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -1523,50 +1667,55 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 0 - - + + + 1 1 - - + + 0 wxID_ANY Inch - - + + m_PadShapeSizeY_Unit protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1574,50 +1723,55 @@ wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY Shape Offset X - - + + m_staticText17 protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1625,54 +1779,59 @@ wxTOP|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_ShapeOffset_X_Ctrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -1680,50 +1839,55 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 0 - - + + + 1 1 - - + + 0 wxID_ANY Inch - - + + m_PadShapeOffsetX_Unit protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1731,50 +1895,55 @@ wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 0 - - + + + 1 1 - - + + 0 wxID_ANY Shape Offset Y - - + + m_staticText19 protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1782,54 +1951,59 @@ wxALL 0 - - + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_ShapeOffset_Y_Ctrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -1837,50 +2011,55 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 0 - - + + + 1 1 - - + + 0 wxID_ANY Inch - - + + m_PadShapeOffsetY_Unit protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1888,50 +2067,55 @@ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY - Shape delta X - - + Shape Delta Dim + + m_staticText21 protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1939,54 +2123,59 @@ wxTOP|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY - + 0 - - m_ShapeDelta_X_Ctrl + + m_ShapeDelta_Ctrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -1994,50 +2183,55 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 0 - - + + + 1 1 - - + + 0 wxID_ANY Inch - - - m_PadShapeDeltaX_Unit + + + m_PadShapeDelta_Unit protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2045,105 +2239,180 @@ wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 0 - - + + + 1 1 - - + + 0 wxID_ANY - Shape delta Y - - + Trap. Direction + + m_staticText23 protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + 5 - wxALL + wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_ShapeDelta_Y_Ctrl - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OnValuesChanged - - - - + + + bSizerbdir + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_DDIRX + > + + + m_radioBtnDeltaXdir + protected + + + wxRB_GROUP + + + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + + + + + + + + + + + + + + + OnValuesChanged + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_DDIRY + ^ + + + m_radioBtnDeltaYdir + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + OnValuesChanged + + + + + + + + @@ -2151,50 +2420,55 @@ wxALIGN_CENTER_VERTICAL|wxRIGHT 0 - - + + + 1 1 - - + + 0 wxID_ANY - Inch - - - m_PadShapeDeltaY_Unit + Rot 0 + + + m_staticTextDDirInfo protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2208,7 +2482,7 @@ wxEXPAND 1 - + bMiddleSizer wxVERTICAL none @@ -2217,7 +2491,7 @@ wxEXPAND 1 - + bMiddleUpperSizer wxHORIZONTAL none @@ -2226,7 +2500,7 @@ wxBOTTOM 0 - + m_DrillShapeBoxSizer wxVERTICAL protected @@ -2235,53 +2509,58 @@ wxALL|wxEXPAND 0 - + "Circle" "Oval" "Rect" "Trapezoidal" - + + 1 1 - - + + 0 ID_LISTBOX_SHAPE_PAD Pad Shape: 1 - - + + m_PadShape protected - + 0 - + wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + OnPadShapeSelection - - - - - - + + + + + + @@ -2289,53 +2568,58 @@ wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 - + "Circle" "Oval" - + + 1 1 - - + + 0 ID_RADIOBOX_DRILL_SHAPE Drill Shape: 1 - - + + m_DrillShapeCtrl protected - + 0 - + wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + OnDrillShapeSelected - - - - - - + + + + + + @@ -2345,7 +2629,7 @@ wxBOTTOM 0 - + m_MiddleRightBoxSizer wxVERTICAL none @@ -2354,53 +2638,58 @@ wxALL|wxEXPAND 0 - + "0" "90" "-90" "180" "Custom" - + + 1 1 - - + + 0 ID_LISTBOX_ORIENT_PAD Pad Orient: 1 - - + + m_PadOrient protected - + 0 - + wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + PadOrientEvent - - - - - - + + + + + + @@ -2408,50 +2697,55 @@ wxTOP|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY Pad Orient (0.1 deg) - - + + m_PadOrientText protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2459,54 +2753,59 @@ wxBOTTOM|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_PadOrientCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -2517,46 +2816,51 @@ 1 0,0,0 - + + 1 1 - - + + 0 wxID_ANY - - + + m_panelShowPad protected - - - - - - + + + + + + wxFILTER_NONE + wxDefaultValidator + + + wxFULL_REPAINT_ON_RESIZE|wxSIMPLE_BORDER|wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + OnPaintShowPanel - - - - - - + + + + + + @@ -2568,11 +2872,11 @@ wxID_ANY Footprint orientation - + sbSizeModuleInfo wxHORIZONTAL none - + 5 wxEXPAND @@ -2581,9 +2885,9 @@ 2 wxBOTH 1 - + 0 - + fgSizer4 wxFLEX_GROWMODE_SPECIFIED none @@ -2594,50 +2898,55 @@ wxALIGN_RIGHT|wxTOP|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY Rotation: - - + + m_staticTitleModuleRot protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2645,50 +2954,55 @@ wxTOP|wxRIGHT|wxLEFT|wxEXPAND 0 - - + + + 1 1 - - + + 0 wxID_ANY 0 - - + + m_staticModuleRotValue protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2696,50 +3010,55 @@ wxALL|wxALIGN_RIGHT 0 - - + + + 1 1 - - + + 0 wxID_ANY Board side: - - + + m_staticTitleModuleSide protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2747,50 +3066,55 @@ wxALL|wxEXPAND 0 - - + + + 1 1 - - + + 0 wxID_ANY Front side - - + + m_staticModuleSideValue protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2800,50 +3124,55 @@ wxALIGN_CENTER_VERTICAL 0 - - + + + 1 1 - + ,90,92,-1,70,0 0 wxID_ANY Warning: This pad is flipped on board. Back and front layers will be swapped. - - + + m_staticTextWarningPadFlipped protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2852,854 +3181,934 @@ 5 wxEXPAND|wxRIGHT|wxLEFT 0 - + wxID_ANY Clearances: - + sbClearancesSizer wxVERTICAL none - - + + 5 wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT 0 - - - + + + + 1 1 - + ,90,92,-1,70,0 0 wxID_ANY Set these values to 0 to use Parent footprint or global values - - + + m_staticTextWarning protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxEXPAND 1 - + 3 wxBOTH - - + + 0 - + fgClearancesGridSizer wxFLEX_GROWMODE_SPECIFIED none 5 0 - + 5 wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL 0 - - - + + + + 1 1 - - + + 0 wxID_ANY Net pad clearance - - + + m_staticTextNetClearance protected - - - - + + + + This is the local net clearance for pad. If 0, the footprint local value or the Netclass value is used - - - + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxALL 0 - - - + + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_NetClearanceValueCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + - + 5 wxRIGHT|wxALIGN_CENTER_VERTICAL 0 - - - + + + + 1 1 - - + + 0 wxID_ANY Inch - - + + m_NetClearanceUnits protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxEXPAND|wxRIGHT|wxLEFT 0 - - - + + + + 1 1 - - + + 0 wxID_ANY - - + + m_staticline1 protected - - + + wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxEXPAND|wxRIGHT|wxLEFT 0 - - - + + + + 1 1 - - + + 0 wxID_ANY - - + + m_staticline2 protected - - + + wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxEXPAND|wxRIGHT|wxLEFT 0 - - - + + + + 1 1 - - + + 0 wxID_ANY - - + + m_staticline3 protected - - + + wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 0 - - - + + + + 1 1 - - + + 0 wxID_ANY Solder mask clearance: - - + + m_MaskClearanceTitle protected - - - - + + + + This is the local clearance between this pad and the solder mask If 0, the footprint local value or the global value is used - - - + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxALL 0 - - - + + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_SolderMaskMarginCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxRIGHT|wxALIGN_CENTER_VERTICAL 0 - - - + + + + 1 1 - - + + 0 wxID_ANY Inch - - + + m_SolderMaskMarginUnits protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL 0 - - - + + + + 1 1 - - + + 0 wxID_ANY Solder paste clearance: - - + + m_staticTextSolderPaste protected - - - - + + + + This is the local clearance between this pad and the solder paste. If 0 the footprint value or the global value is used.. The final clearance value is the sum of this value and the clearance value ratio A negative value means a smaller mask size than pad size - - - + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxTOP|wxRIGHT|wxLEFT 0 - - - + + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_SolderPasteMarginCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxRIGHT|wxALIGN_CENTER_VERTICAL 0 - - - + + + + 1 1 - - + + 0 wxID_ANY Inch - - + + m_SolderPasteMarginUnits protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 0 - - - + + + + 1 1 - - + + 0 wxID_ANY Solder mask ratio clearance: - - + + m_staticTextRatio protected - - - - + + + + This is the local clearance ratio in per cent between this pad and the solder paste. A value of 10 means the clearance value is 10 per cent of the pad size If 0 the footprint value or the global value is used.. The final clearance value is the sum of this value and the clearance value A negative value means a smaller mask size than pad size. - - - + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxALL 0 - - - + + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_SolderPasteMarginRatioCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxRIGHT|wxALIGN_CENTER_VERTICAL 0 - - - + + + + 1 1 - - + + 0 wxID_ANY % - - + + m_SolderPasteRatioMarginUnits protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -3713,760 +4122,830 @@ wxBOTTOM|wxRIGHT|wxEXPAND 0 - + m_RightBoxSizer wxVERTICAL none - + 5 wxALL|wxEXPAND 0 - - + + "Standard" "SMD" "Conn" - + + 1 1 - - + + 0 ID_LISTBOX_TYPE_PAD Pad Type: 1 - - + + m_PadType protected - + 0 - + wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + PadTypeSelected - - - - - - + + + + + + - + 5 - + 0 - + wxID_ANY Layers: - + m_LayersSizer wxVERTICAL none - - + + 5 wxTOP|wxRIGHT|wxLEFT 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY Component layer - - + + m_PadLayerCmp protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 5 wxALL 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY Copper layer - - + + m_PadLayerCu protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 5 wxEXPAND 1 - + 8 protected 0 - + 5 wxTOP|wxRIGHT|wxLEFT 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY Adhesive Cmp - - + + m_PadLayerAdhCmp protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 5 wxTOP|wxRIGHT|wxLEFT 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY Adhesive Copper - - + + m_PadLayerAdhCu protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 5 wxTOP|wxRIGHT|wxLEFT 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY Solder paste Cmp - - + + m_PadLayerPateCmp protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 5 wxTOP|wxRIGHT|wxLEFT 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY Solder paste Copper - - + + m_PadLayerPateCu protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 5 wxTOP|wxRIGHT|wxLEFT 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY Silkscreen Cmp - - + + m_PadLayerSilkCmp protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 5 wxTOP|wxRIGHT|wxLEFT 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY Silkscreen Copper - - + + m_PadLayerSilkCu protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 5 wxTOP|wxRIGHT|wxLEFT 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY Solder mask Cmp - - + + m_PadLayerMaskCmp protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 5 wxTOP|wxRIGHT|wxLEFT 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY Solder mask Copper - - + + m_PadLayerMaskCu protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 5 wxTOP|wxRIGHT|wxLEFT 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY Draft layer - - + + m_PadLayerDraft protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 5 wxTOP|wxRIGHT|wxLEFT 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY E.C.O.1 layer - - + + m_PadLayerECO1 protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 5 wxALL 0 - - + + 0 - + + 1 1 - - + + 0 wxID_ANY E.C.O.2 layer - - + + m_PadLayerECO2 protected - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSetLayer - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -4488,17 +4967,17 @@ 1 0 0 - + m_sdbSizer1 protected - + OnCancelButtonClick - - - + + + PadPropertiesAccept - - + + diff --git a/pcbnew/dialog_pad_properties_base.h b/pcbnew/dialog_pad_properties_base.h index 38d41b6992..ab9530776b 100644 --- a/pcbnew/dialog_pad_properties_base.h +++ b/pcbnew/dialog_pad_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -41,6 +42,8 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog wxID_DIALOG_EDIT_PAD = 1000, wxID_PADNUMCTRL, wxID_PADNETNAMECTRL, + wxID_DDIRX, + wxID_DDIRY, ID_LISTBOX_SHAPE_PAD, ID_RADIOBOX_DRILL_SHAPE, ID_LISTBOX_ORIENT_PAD, @@ -82,11 +85,12 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog wxTextCtrl* m_ShapeOffset_Y_Ctrl; wxStaticText* m_PadShapeOffsetY_Unit; wxStaticText* m_staticText21; - wxTextCtrl* m_ShapeDelta_X_Ctrl; - wxStaticText* m_PadShapeDeltaX_Unit; + wxTextCtrl* m_ShapeDelta_Ctrl; + wxStaticText* m_PadShapeDelta_Unit; wxStaticText* m_staticText23; - wxTextCtrl* m_ShapeDelta_Y_Ctrl; - wxStaticText* m_PadShapeDeltaY_Unit; + wxRadioButton* m_radioBtnDeltaXdir; + wxRadioButton* m_radioBtnDeltaYdir; + wxStaticText* m_staticTextDDirInfo; wxBoxSizer* m_DrillShapeBoxSizer; wxRadioBox* m_PadShape; wxRadioBox* m_DrillShapeCtrl; @@ -135,18 +139,19 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog wxButton* m_sdbSizer1Cancel; // Virtual event handlers, overide them in your derived class - virtual void OnValuesChanged( wxCommandEvent& event ){ event.Skip(); } - virtual void OnPadShapeSelection( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDrillShapeSelected( wxCommandEvent& event ){ event.Skip(); } - virtual void PadOrientEvent( wxCommandEvent& event ){ event.Skip(); } - virtual void OnPaintShowPanel( wxPaintEvent& event ){ event.Skip(); } - virtual void PadTypeSelected( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSetLayer( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancelButtonClick( wxCommandEvent& event ){ event.Skip(); } - virtual void PadPropertiesAccept( wxCommandEvent& event ){ event.Skip(); } + virtual void OnValuesChanged( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPadShapeSelection( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDrillShapeSelected( wxCommandEvent& event ) { event.Skip(); } + virtual void PadOrientEvent( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); } + virtual void PadTypeSelected( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSetLayer( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); } + virtual void PadPropertiesAccept( wxCommandEvent& event ) { event.Skip(); } public: + DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 733,486 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSUNKEN_BORDER ); ~DIALOG_PAD_PROPERTIES_BASE(); diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index b36ada87ea..a7d524e309 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -46,14 +46,6 @@ #include "dialog_drc.h" -/******************************************************/ -void WinEDA_PcbFrame::Install_Test_DRC_Frame( wxDC* DC ) -/******************************************************/ -{ - m_drc->ShowDialog(); -} - - void DRC::ShowDialog() { if( !m_ui ) @@ -63,11 +55,14 @@ void DRC::ShowDialog() // copy data retained in this DRC object into the m_ui DrcPanel: - PutValueInLocalUnits( *m_ui->m_SetTrackMinWidthCtrl, m_pcb->GetBoardDesignSettings()->m_TrackMinWidth, + PutValueInLocalUnits( *m_ui->m_SetTrackMinWidthCtrl, + m_pcb->GetBoardDesignSettings()->m_TrackMinWidth, m_mainWindow->m_InternalUnits );; - PutValueInLocalUnits( *m_ui->m_SetViaMinSizeCtrl, m_pcb->GetBoardDesignSettings()->m_ViasMinSize, + PutValueInLocalUnits( *m_ui->m_SetViaMinSizeCtrl, + m_pcb->GetBoardDesignSettings()->m_ViasMinSize, m_mainWindow->m_InternalUnits );; - PutValueInLocalUnits( *m_ui->m_SetMicroViakMinSizeCtrl, m_pcb->GetBoardDesignSettings()->m_MicroViasMinSize, + PutValueInLocalUnits( *m_ui->m_SetMicroViakMinSizeCtrl, + m_pcb->GetBoardDesignSettings()->m_MicroViasMinSize, m_mainWindow->m_InternalUnits );; m_ui->m_CreateRptCtrl->SetValue( m_doCreateRptFile ); @@ -87,8 +82,8 @@ void DRC::DestroyDialog( int aReason ) if( aReason == wxID_OK ) { // if user clicked OK, save his choices in this DRC object. - m_doCreateRptFile = m_ui->m_CreateRptCtrl->GetValue(); - m_rptFilename = m_ui->m_RptFilenameCtrl->GetValue(); + m_doCreateRptFile = m_ui->m_CreateRptCtrl->GetValue(); + m_rptFilename = m_ui->m_RptFilenameCtrl->GetValue(); } m_ui->Destroy(); @@ -191,14 +186,14 @@ int DRC::Drc( ZONE_CONTAINER* aArea, int CornerIndex ) * will actually run all the tests specified with a previous call to * SetSettings() */ -void DRC::RunTests( wxTextCtrl * aMessages ) +void DRC::RunTests( wxTextCtrl* aMessages ) { // Ensure ratsnest is up to date: if( (m_pcb->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 ) { if( aMessages ) { - aMessages->AppendText( _("Compile ratsnest...\n") ); + aMessages->AppendText( _( "Compile ratsnest...\n" ) ); wxSafeYield(); } @@ -214,7 +209,7 @@ void DRC::RunTests( wxTextCtrl * aMessages ) // class (a NET) will cause its items such as tracks, vias, and pads // to also fail. So quit after *all* netclass errors have been reported. if( aMessages ) - aMessages->AppendText( _("Aborting\n") ); + aMessages->AppendText( _( "Aborting\n" ) ); // update the m_ui listboxes updatePointers(); @@ -227,7 +222,7 @@ void DRC::RunTests( wxTextCtrl * aMessages ) { if( aMessages ) { - aMessages->AppendText( _("Pad clearances...\n") ); + aMessages->AppendText( _( "Pad clearances...\n" ) ); wxSafeYield(); } @@ -237,7 +232,7 @@ void DRC::RunTests( wxTextCtrl * aMessages ) // test track and via clearances to other tracks, pads, and vias if( aMessages ) { - aMessages->AppendText( _("Track clearances...\n") ); + aMessages->AppendText( _( "Track clearances...\n" ) ); wxSafeYield(); } @@ -247,15 +242,15 @@ void DRC::RunTests( wxTextCtrl * aMessages ) // this is a good caution, because filled areas can be outdated. if( aMessages ) { - aMessages->AppendText( _("Fill zones...\n") ); + aMessages->AppendText( _( "Fill zones...\n" ) ); wxSafeYield(); } m_mainWindow->Fill_All_Zones( false ); // test zone clearances to other zones, pads, tracks, and vias - if( aMessages && m_doZonesTest) + if( aMessages && m_doZonesTest ) { - aMessages->AppendText( _("Test zones...\n") ); + aMessages->AppendText( _( "Test zones...\n" ) ); wxSafeYield(); } @@ -266,7 +261,7 @@ void DRC::RunTests( wxTextCtrl * aMessages ) { if( aMessages ) { - aMessages->AppendText( _("Unconnected pads...\n") ); + aMessages->AppendText( _( "Unconnected pads...\n" ) ); wxSafeYield(); } @@ -280,7 +275,7 @@ void DRC::RunTests( wxTextCtrl * aMessages ) { // no newline on this one because it is last, don't want the window // to unnecessarily scroll. - aMessages->AppendText( _("Finished") ); + aMessages->AppendText( _( "Finished" ) ); } } @@ -317,16 +312,16 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) const BOARD_DESIGN_SETTINGS& g = *m_pcb->GetBoardDesignSettings(); -#define FmtVal( x ) GetChars( ReturnStringFromValue( g_UserUnit, x, PCB_INTERNAL_UNIT ) ) +#define FmtVal( x ) GetChars( ReturnStringFromValue( g_UserUnit, x, PCB_INTERNAL_UNIT ) ) #if 0 // set to 1 when (if...) BOARD_DESIGN_SETTINGS has a m_MinClearance value if( nc->GetClearance() < g.m_MinClearance ) { - msg.Printf( _("NETCLASS: '%s' has Clearance:%s which is less than global:%s"), - GetChars( nc->GetName() ), - FmtVal( nc->GetClearance() ), - FmtVal( g.m_TrackClearance ) - ); + msg.Printf( _( "NETCLASS: '%s' has Clearance:%s which is less than global:%s" ), + GetChars( nc->GetName() ), + FmtVal( nc->GetClearance() ), + FmtVal( g.m_TrackClearance ) + ); m_currentMarker = fillMarker( DRCE_NETCLASS_CLEARANCE, msg, m_currentMarker ); m_pcb->Add( m_currentMarker ); @@ -337,11 +332,11 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) if( nc->GetTrackWidth() < g.m_TrackMinWidth ) { - msg.Printf( _("NETCLASS: '%s' has TrackWidth:%s which is less than global:%s"), - GetChars( nc->GetName() ), - FmtVal( nc->GetTrackWidth() ), - FmtVal( g.m_TrackMinWidth ) - ); + msg.Printf( _( "NETCLASS: '%s' has TrackWidth:%s which is less than global:%s" ), + GetChars( nc->GetName() ), + FmtVal( nc->GetTrackWidth() ), + FmtVal( g.m_TrackMinWidth ) + ); m_currentMarker = fillMarker( DRCE_NETCLASS_TRACKWIDTH, msg, m_currentMarker ); m_pcb->Add( m_currentMarker ); @@ -351,11 +346,11 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) if( nc->GetViaDiameter() < g.m_ViasMinSize ) { - msg.Printf( _("NETCLASS: '%s' has Via Dia:%s which is less than global:%s"), - GetChars( nc->GetName() ), - FmtVal( nc->GetViaDiameter() ), - FmtVal( g.m_ViasMinSize ) - ); + msg.Printf( _( "NETCLASS: '%s' has Via Dia:%s which is less than global:%s" ), + GetChars( nc->GetName() ), + FmtVal( nc->GetViaDiameter() ), + FmtVal( g.m_ViasMinSize ) + ); m_currentMarker = fillMarker( DRCE_NETCLASS_VIASIZE, msg, m_currentMarker ); m_pcb->Add( m_currentMarker ); @@ -365,11 +360,11 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) if( nc->GetViaDrill() < g.m_ViasMinDrill ) { - msg.Printf( _("NETCLASS: '%s' has Via Drill:%s which is less than global:%s"), - GetChars( nc->GetName() ), - FmtVal( nc->GetViaDrill() ), - FmtVal( g.m_ViasMinDrill ) - ); + msg.Printf( _( "NETCLASS: '%s' has Via Drill:%s which is less than global:%s" ), + GetChars( nc->GetName() ), + FmtVal( nc->GetViaDrill() ), + FmtVal( g.m_ViasMinDrill ) + ); m_currentMarker = fillMarker( DRCE_NETCLASS_VIADRILLSIZE, msg, m_currentMarker ); m_pcb->Add( m_currentMarker ); @@ -379,11 +374,11 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) if( nc->GetuViaDiameter() < g.m_MicroViasMinSize ) { - msg.Printf( _("NETCLASS: '%s' has uVia Dia:%s which is less than global:%s"), - GetChars( nc->GetName() ), - FmtVal( nc->GetuViaDiameter() ), - FmtVal( g.m_MicroViasMinSize ) - ); + msg.Printf( _( "NETCLASS: '%s' has uVia Dia:%s which is less than global:%s" ), + GetChars( nc->GetName() ), + FmtVal( nc->GetuViaDiameter() ), + FmtVal( g.m_MicroViasMinSize ) + ); m_currentMarker = fillMarker( DRCE_NETCLASS_uVIASIZE, msg, m_currentMarker ); m_pcb->Add( m_currentMarker ); @@ -393,11 +388,11 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) if( nc->GetuViaDrill() < g.m_MicroViasMinDrill ) { - msg.Printf( _("NETCLASS: '%s' has uVia Drill:%s which is less than global:%s"), - GetChars( nc->GetName() ), - FmtVal( nc->GetuViaDrill() ), - FmtVal( g.m_MicroViasMinDrill ) - ); + msg.Printf( _( "NETCLASS: '%s' has uVia Drill:%s which is less than global:%s" ), + GetChars( nc->GetName() ), + FmtVal( nc->GetuViaDrill() ), + FmtVal( g.m_MicroViasMinDrill ) + ); m_currentMarker = fillMarker( DRCE_NETCLASS_uVIADRILLSIZE, msg, m_currentMarker ); m_pcb->Add( m_currentMarker ); @@ -411,7 +406,7 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) bool DRC::testNetClasses() { - bool ret = true; + bool ret = true; NETCLASSES& netclasses = m_pcb->m_NetClasses; @@ -472,8 +467,8 @@ void DRC::testPad2Pad() { D_PAD* pad = sortedPads[i]; - int x_limit = max_size + pad->GetClearance() + - pad->m_Rayon + pad->GetPosition().x; + int x_limit = max_size + pad->GetClearance() + + pad->m_Rayon + pad->GetPosition().x; if( !doPadToPadsDrc( pad, &sortedPads[i], listEnd, x_limit ) ) { @@ -622,11 +617,11 @@ MARKER_PCB* DRC::fillMarker( TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, M { if( aItem ) fillMe = new MARKER_PCB( aErrorCode, position, - textA, aTrack->GetPosition(), - textB, posB ); + textA, aTrack->GetPosition(), + textB, posB ); else fillMe = new MARKER_PCB( aErrorCode, position, - textA, aTrack->GetPosition() ); + textA, aTrack->GetPosition() ); } return fillMe; @@ -666,9 +661,9 @@ MARKER_PCB* DRC::fillMarker( ZONE_CONTAINER* aArea, int aErrorCode, MARKER_PCB* MARKER_PCB* DRC::fillMarker( const ZONE_CONTAINER* aArea, - const wxPoint& aPos, - int aErrorCode, - MARKER_PCB* fillMe ) + const wxPoint& aPos, + int aErrorCode, + MARKER_PCB* fillMe ) { wxString textA = aArea->MenuText( m_pcb ); @@ -685,7 +680,7 @@ MARKER_PCB* DRC::fillMarker( const ZONE_CONTAINER* aArea, MARKER_PCB* DRC::fillMarker( int aErrorCode, const wxString& aMessage, MARKER_PCB* fillMe ) { - wxPoint posA; // not displayed + wxPoint posA; // not displayed if( fillMe ) fillMe->SetData( aErrorCode, posA, aMessage, posA ); @@ -702,18 +697,18 @@ MARKER_PCB* DRC::fillMarker( int aErrorCode, const wxString& aMessage, MARKER_PC bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) /***********************************************************************/ { - TRACK* track; - int dx, dy; // utilise pour calcul des dim x et dim y des segments - int layerMask; - int net_code_ref; - wxPoint shape_pos; + TRACK* track; + int dx, dy; // utilise pour calcul des dim x et dim y des segments + int layerMask; + int net_code_ref; + wxPoint shape_pos; - NETCLASS* netclass = aRefSeg->GetNetClass(); + NETCLASS* netclass = aRefSeg->GetNetClass(); // Origine sur le PCB des axes du repere centre sur // l'origine du segment de reference - int org_X = aRefSeg->m_Start.x; - int org_Y = aRefSeg->m_Start.y; + int org_X = aRefSeg->m_Start.x; + int org_Y = aRefSeg->m_Start.y; m_finx = dx = aRefSeg->m_End.x - org_X; m_finy = dy = aRefSeg->m_End.y - org_Y; @@ -771,7 +766,8 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) // test: if( layer1 == LAYER_N_BACK && layer2 == LAYER_N_2 ) err = false; - if( layer1 == (m_pcb->GetBoardDesignSettings()->GetCopperLayerCount() - 2 ) && layer2 == LAYER_N_FRONT ) + if( layer1 == (m_pcb->GetBoardDesignSettings()->GetCopperLayerCount() - 2 ) + && layer2 == LAYER_N_FRONT ) err = false; if( err ) { @@ -812,7 +808,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) D_PAD pseudo_pad( (MODULE*) NULL ); // construct this once outside following loop // Compute the min distance to pads - int refsegm_half_width = aRefSeg->m_Width >> 1; + int refsegm_half_width = aRefSeg->m_Width >> 1; if( testPads ) { @@ -841,7 +837,8 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) m_spotcx = pseudo_pad.GetPosition().x - org_X; m_spotcy = pseudo_pad.GetPosition().y - org_Y; - if( !checkClearanceSegmToPad( &pseudo_pad, refsegm_half_width, netclass->GetClearance() )) + if( !checkClearanceSegmToPad( &pseudo_pad, refsegm_half_width, + netclass->GetClearance() ) ) { m_currentMarker = fillMarker( aRefSeg, pad, DRCE_TRACK_NEAR_THROUGH_HOLE, m_currentMarker ); @@ -897,7 +894,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) // the minimum distance = clearance plus half the reference track // width plus half the other track's width int w_dist = aRefSeg->GetClearance( track ); - w_dist += (aRefSeg->m_Width + track->m_Width)/2; + w_dist += (aRefSeg->m_Width + track->m_Width) / 2; // If the reference segment is a via, we test it here if( aRefSeg->Type() == TYPE_VIA ) @@ -1135,7 +1132,6 @@ bool DRC::doPadToPadsDrc( D_PAD* aRefPad, LISTE_PAD* aStart, LISTE_PAD* aEnd, dummypad.m_Masque_Layer = ALL_CU_LAYERS; - for( LISTE_PAD* pad_list = aStart; pad_listm_Drill.x ) // pad under testing has a hole, test this hole against pad reference { - dummypad.SetPosition( pad->GetPosition() ); + dummypad.SetPosition( pad->GetPosition() ); dummypad.m_Size = pad->m_Drill; dummypad.m_PadShape = pad->m_DrillShape == PAD_OVAL ? PAD_OVAL : PAD_CIRCLE; dummypad.m_Orient = pad->m_Orient; @@ -1184,7 +1180,7 @@ bool DRC::doPadToPadsDrc( D_PAD* aRefPad, LISTE_PAD* aStart, LISTE_PAD* aEnd, if( aRefPad->m_Drill.x ) // pad reference has a hole { - dummypad.SetPosition( aRefPad->GetPosition() ); + dummypad.SetPosition( aRefPad->GetPosition() ); dummypad.m_Size = aRefPad->m_Drill; dummypad.m_PadShape = aRefPad->m_DrillShape == PAD_OVAL ? PAD_OVAL : PAD_CIRCLE; dummypad.m_Orient = aRefPad->m_Orient; @@ -1233,8 +1229,9 @@ bool DRC::doPadToPadsDrc( D_PAD* aRefPad, LISTE_PAD* aStart, LISTE_PAD* aEnd, wxPoint rotate( wxPoint p, int angle ) { wxPoint n; - double theta = M_PI * (double) angle / 1800.0; - n.x = wxRound( (double ) p.x * cos( theta ) - (double) p.y * sin( theta ) ); + double theta = M_PI * (double) angle / 1800.0; + + n.x = wxRound( (double) p.x * cos( theta ) - (double) p.y * sin( theta ) ); n.y = wxRound( p.x * sin( theta ) + p.y * cos( theta ) ); return n; } @@ -1253,7 +1250,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad ) rel_pos = aPad->ReturnShapePos(); shape_pos = aRefPad->ReturnShapePos(); - // rel_pos is pad position relative to the aRefPad position + // rel_pos is the aPad position relative to the aRefPad position rel_pos -= shape_pos; dist = (int) hypot( rel_pos.x, rel_pos.y ); @@ -1264,8 +1261,8 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad ) if( (dist - aRefPad->m_Rayon - aPad->m_Rayon) >= dist_min ) goto exit; - /* Ici les pads sont proches et les cercles exinxcrits sont trop proches - * Selon les formes relatives il peut y avoir ou non erreur */ + /* Here, pads are near and DRC depend on the pad shapes + * We must compare distance using a fine shape analysis */ bool swap_pads; swap_pads = false; @@ -1280,6 +1277,11 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad ) rel_pos = -rel_pos; } + /* Because pad exchange, aRefPad shape is PAD_CIRCLE or PAD_OVAL, + * if one of the 2 pads was a PAD_CIRCLE or PAD_OVAL. + * Therefore, if aRefPad is a PAD_RECT or a PAD_TRAPEZOID, + * the other pad is also a PAD_RECT or a PAD_TRAPEZOID + */ switch( aRefPad->m_PadShape ) { case PAD_CIRCLE: // aRefPad is like a track segment with a null lenght @@ -1296,16 +1298,21 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad ) case PAD_RECT: RotatePoint( &rel_pos.x, &rel_pos.y, aRefPad->m_Orient ); - pad_angle = aRefPad->m_Orient + aPad->m_Orient; // pad_angle = pad orient relative to the aRefPad orient + + // pad_angle = pad orient relative to the aRefPad orient + pad_angle = aRefPad->m_Orient + aPad->m_Orient; NORMALIZE_ANGLE_POS( pad_angle ); if( aPad->m_PadShape == PAD_RECT ) { wxSize size = aPad->m_Size; - // The trivial case is if both rects are rotated by multiple of 90° - if( ((aRefPad->m_Orient == 0) || (aRefPad->m_Orient == 900) || (aRefPad->m_Orient == 1800) - || (aRefPad->m_Orient == 2700)) && - ((aPad->m_Orient == 0) || (aPad->m_Orient == 900) || (aPad->m_Orient == 1800) - || (aPad->m_Orient == 2700)) ) + + // The trivial case is if both rects are rotated by multiple of 90 deg + // Most of time this is the case, and the test is fast + if( ( (aRefPad->m_Orient == 0) || (aRefPad->m_Orient == 900) + || (aRefPad->m_Orient == 1800) + || (aRefPad->m_Orient == 2700) ) + && ( (aPad->m_Orient == 0) || (aPad->m_Orient == 900) || (aPad->m_Orient == 1800) + || (aPad->m_Orient == 2700) ) ) { if( (pad_angle == 900) || (pad_angle == 2700) ) { @@ -1324,7 +1331,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad ) if( ( rel_pos.y - ( (size.y + aRefPad->m_Size.y) / 2 ) ) >= dist_min ) diag = true; } - else // Any other orient + else // al least on pad has any other orient. Test is more tricky { /* Use TestForIntersectionOfStraightLineSegments() for all 4 edges (segments).*/ @@ -1332,81 +1339,109 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad ) * This case is not covered by the following check if one pad is * completely contained in the other (because edges don't intersect)! */ - if( ( (dist < aPad->m_Size.x) && (dist < aPad->m_Size.y) )|| - ( (dist < aRefPad->m_Size.x) && (dist < aRefPad->m_Size.y) )){ + if( ( (dist < aPad->m_Size.x) && (dist < aPad->m_Size.y) ) + || ( (dist < aRefPad->m_Size.x) && (dist < aRefPad->m_Size.y) ) ) + { diag = false; } // Vectors from center to corner - wxPoint aPad_c2c = wxPoint(aPad->m_Size.x/2, aPad->m_Size.y/2); - wxPoint aRefPad_c2c = wxPoint(aRefPad->m_Size.x/2, aRefPad->m_Size.y/2); + wxPoint aPad_c2c = wxPoint( aPad->m_Size.x / 2, aPad->m_Size.y / 2 ); + wxPoint aRefPad_c2c = wxPoint( aRefPad->m_Size.x / 2, aRefPad->m_Size.y / 2 ); + + for( int i = 0; i<4; i++ ) // for all edges in aPad + { + wxPoint p11 = aPad->ReturnShapePos() + rotate( aPad_c2c, aPad->m_Orient ); - for (int i=0; i<4; i++){ // for all edges in aPad - wxPoint p11 = aPad->ReturnShapePos() + rotate(aPad_c2c, aPad->m_Orient); // flip the center-to-corner vector - if(i%2 == 0){ + if( i % 2 == 0 ) + { aPad_c2c.x = -aPad_c2c.x; - }else{ + } + else + { aPad_c2c.y = -aPad_c2c.y; } - wxPoint p12 = aPad->ReturnShapePos() + rotate(aPad_c2c, aPad->m_Orient); + wxPoint p12 = aPad->ReturnShapePos() + rotate( aPad_c2c, aPad->m_Orient ); + + for( int j = 0; j<4; j++ ) // for all edges in aRefPad + { + wxPoint p21 = aRefPad->ReturnShapePos() + rotate( aRefPad_c2c, + aRefPad->m_Orient ); - for (int j=0; j<4; j++){// for all edges in aRefPad - wxPoint p21 = aRefPad->ReturnShapePos() + rotate(aRefPad_c2c, aRefPad->m_Orient); // flip the center-to-corner vector - if(j%2 == 0){ + if( j % 2 == 0 ) + { aRefPad_c2c.x = -aRefPad_c2c.x; - }else{ + } + else + { aRefPad_c2c.y = -aRefPad_c2c.y; } - wxPoint p22 = aRefPad->ReturnShapePos() + rotate(aRefPad_c2c, aRefPad->m_Orient); + wxPoint p22 = aRefPad->ReturnShapePos() + rotate( aRefPad_c2c, + aRefPad->m_Orient ); - int x,y; - double d; - int intersect = TestForIntersectionOfStraightLineSegments( p11.x, p11.y, p12.x, p12.y, - p21.x, p21.y, p22.x, p22.y, - &x, &y, &d); - ; + int x, y; + double d; + int intersect = TestForIntersectionOfStraightLineSegments( p11.x, + p11.y, + p12.x, + p12.y, + p21.x, + p21.y, + p22.x, + p22.y, + &x, + &y, + &d ); + ; if( intersect || (d< dist_min) ) { - diag=false; + diag = false; } } } } - }else{ - // TODO: Pad -> other shape! + } + else + { + // TODO: Pad -> other shape! (PAD_TRAPEZOID) } break; case PAD_OVAL: /* an oval pad is like a track segment */ { - /* Create and test a track segment with same dimensions */ + /* Create a track segment with same dimensions as the oval aRefPad + * and use checkClearanceSegmToPad function to test aPad to aRefPad clearance + */ int segm_width; - m_segmAngle = aRefPad->m_Orient; // Segment orient. - if( aRefPad->m_Size.y < aRefPad->m_Size.x ) /* We suppose the pad is an horizontal oval */ + m_segmAngle = aRefPad->m_Orient; // Segment orient. + if( aRefPad->m_Size.y < aRefPad->m_Size.x ) // Build an horizontal equiv segment { segm_width = aRefPad->m_Size.y; m_segmLength = aRefPad->m_Size.x - aRefPad->m_Size.y; } - else // it was a vertical oval, change to a rotated horizontal one + else // Vertical oval: build an horizontal equiv segment and rotate 90.0 deg { segm_width = aRefPad->m_Size.x; m_segmLength = aRefPad->m_Size.y - aRefPad->m_Size.x; m_segmAngle += 900; } - /* the start point must be 0,0 and currently rel_pos is relative the center of pad coordinate */ - int sx = -m_segmLength / 2, sy = 0; // Start point coordinate of the horizontal equivalent segment + /* the start point must be 0,0 and currently rel_pos + * is relative the center of pad coordinate */ + wxPoint segstart; + segstart.x = -m_segmLength / 2; // Start point coordinate of the horizontal equivalent segment - RotatePoint( &sx, &sy, m_segmAngle ); // True start point coordinate of the equivalent segment + RotatePoint( &segstart, m_segmAngle ); // True start point coordinate of the equivalent segment - m_spotcx = rel_pos.x - sx; - m_spotcy = rel_pos.y - sy; // pad position / segment origin - - m_finx = - 2 * sx; - m_finy = - 2 * sy; // end of segment coordinate - diag = checkClearanceSegmToPad( aPad, segm_width / 2, dist_min ); + // move pad position relative to the segment origin + m_spotcx = rel_pos.x - segstart.x; + m_spotcy = rel_pos.y - segstart.y; + // Calculate segment end + m_finx = -2 * segstart.x; + m_finy = -2 * segstart.y; // end of segment coordinate + diag = checkClearanceSegmToPad( aPad, segm_width / 2, dist_min ); break; } @@ -1576,6 +1611,9 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int aMi } break; + + case PAD_TRAPEZOID: //TODO + break; } } return true; diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 2a923c3dda..476e27db3e 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -17,6 +17,8 @@ #include "autorout.h" #include "protos.h" +#include "dialog_drc.h" + #include "kicad_device_context.h" #include "dialog_global_edit_tracks_and_vias.h" @@ -213,7 +215,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) break; case ID_DRC_CONTROL: - Install_Test_DRC_Frame( &dc ); + m_drc->ShowDialog();; break; case ID_GET_NETLIST: