From f20cb0fda8cbde1d222de2f5d2bb3ebd7aff372d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 17 Jun 2022 19:41:53 +0200 Subject: [PATCH] Activate teardrops: remove advanced config option and add teardrop keywords in files. (the ability to read teardrop keywords was added some time ago) --- common/advanced_config.cpp | 4 ---- include/advanced_config.h | 5 ----- pcbnew/menubar_pcb_editor.cpp | 14 ++++---------- pcbnew/plugins/kicad/pcb_plugin.cpp | 5 ++--- pcbnew/plugins/kicad/pcb_plugin.h | 3 ++- 5 files changed, 8 insertions(+), 23 deletions(-) diff --git a/common/advanced_config.cpp b/common/advanced_config.cpp index 4067065d96..b6bdafe3bf 100644 --- a/common/advanced_config.cpp +++ b/common/advanced_config.cpp @@ -318,7 +318,6 @@ ADVANCED_CFG::ADVANCED_CFG() m_CompactSave = false; m_UpdateUIEventInterval = 0; - m_AllowTeardrops = false; m_ShowRepairSchematic = false; m_3DRT_BevelHeight_um = 30; @@ -453,9 +452,6 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg ) configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::AllowManualCanvasScale, &m_AllowManualCanvasScale, m_AllowManualCanvasScale ) ); - configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::AllowTeardrops, - &m_AllowTeardrops, m_AllowTeardrops ) ); - configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::V3DRT_BevelHeight_um, &m_3DRT_BevelHeight_um, m_3DRT_BevelHeight_um, 0, std::numeric_limits::max(), diff --git a/include/advanced_config.h b/include/advanced_config.h index 7006a7ee1f..c962321f3c 100644 --- a/include/advanced_config.h +++ b/include/advanced_config.h @@ -220,11 +220,6 @@ public: bool m_AllowManualCanvasScale; - /** - * Allows creating / deleting teardrops - */ - bool m_AllowTeardrops; - /** * 3D-Viewer, Raytracing * Bevel height of layer items. Controls the start of curvature normal on the edge. diff --git a/pcbnew/menubar_pcb_editor.cpp b/pcbnew/menubar_pcb_editor.cpp index 25ca1d62f4..bb1eed72e6 100644 --- a/pcbnew/menubar_pcb_editor.cpp +++ b/pcbnew/menubar_pcb_editor.cpp @@ -407,16 +407,10 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() toolsMenu->Add( ACTIONS::showFootprintEditor ); toolsMenu->Add( PCB_ACTIONS::updateFootprints ); - // Currently: available only with advanced_config m_AllowTeardrops = true - // (AllowTeardrops = 1) - if( ADVANCED_CFG::GetCfg().m_AllowTeardrops ) - { - toolsMenu->AppendSeparator(); - toolsMenu->Add( _( "Add Teardrops" ), "", - ID_RUN_TEARDROP_TOOL, BITMAPS::via ); - toolsMenu->Add( _( "Remove Teardrops" ), "", - ID_REMOVE_TEARDROP_TOOL, BITMAPS::via ); - } + // Add/remove teardrops menuitems: + toolsMenu->AppendSeparator(); + toolsMenu->Add( _( "Add Teardrops" ), "", ID_RUN_TEARDROP_TOOL, BITMAPS::via ); + toolsMenu->Add( _( "Remove Teardrops" ), "", ID_REMOVE_TEARDROP_TOOL, BITMAPS::via ); toolsMenu->AppendSeparator(); toolsMenu->Add( PCB_ACTIONS::cleanupTracksAndVias ); diff --git a/pcbnew/plugins/kicad/pcb_plugin.cpp b/pcbnew/plugins/kicad/pcb_plugin.cpp index b62e94e68e..c668f009ef 100644 --- a/pcbnew/plugins/kicad/pcb_plugin.cpp +++ b/pcbnew/plugins/kicad/pcb_plugin.cpp @@ -2092,8 +2092,7 @@ void PCB_PLUGIN::format( const ZONE* aZone, int aNestLevel ) const if( aZone->GetAssignedPriority() > 0 ) m_out->Print( aNestLevel+1, "(priority %d)\n", aZone->GetAssignedPriority() ); -// Disable teardrop keyword in file only temporarily (WIP) to avoid file format change -#if 0 + // Add teardrop keywords in file: (attr (teardrop (type xxx)))where xxx is the teardrop type if( aZone->IsTeardropArea() ) { const char* td_type; @@ -2112,7 +2111,7 @@ void PCB_PLUGIN::format( const ZONE* aZone, int aNestLevel ) const m_out->Print( aNestLevel+1, "(attr (teardrop (type %s)))\n", td_type ); } -#endif + m_out->Print( aNestLevel+1, "(connect_pads" ); switch( aZone->GetPadConnection() ) diff --git a/pcbnew/plugins/kicad/pcb_plugin.h b/pcbnew/plugins/kicad/pcb_plugin.h index 0a0a0439a3..a6cff10490 100644 --- a/pcbnew/plugins/kicad/pcb_plugin.h +++ b/pcbnew/plugins/kicad/pcb_plugin.h @@ -121,7 +121,8 @@ class SHAPE_LINE_CHAIN; //#define SEXPR_BOARD_FILE_VERSION 20220308 // Knockout text and Locked graphic text property saved //#define SEXPR_BOARD_FILE_VERSION 20220331 // Plot on all layers selection setting //#define SEXPR_BOARD_FILE_VERSION 20220417 // Automatic dimension precisions -#define SEXPR_BOARD_FILE_VERSION 20220427 // Exclude Edge.Cuts & Margin from fp private layers +//#define SEXPR_BOARD_FILE_VERSION 20220427 // Exclude Edge.Cuts & Margin from fp private layers +#define SEXPR_BOARD_FILE_VERSION 20220609 // Add teardrop keywords to identify teardrop zones #define BOARD_FILE_HOST_VERSION 20200825 ///< Earlier files than this include the host tag #define LEGACY_ARC_FORMATTING 20210925 ///< These were the last to use old arc formatting