diff --git a/common/gr_text.cpp b/common/gr_text.cpp index 55ec6553ec..16e2a2b12d 100644 --- a/common/gr_text.cpp +++ b/common/gr_text.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2012 Wayne Stambaugh - * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -43,12 +43,24 @@ int GetPenSizeForBold( int aTextSize ) } +int GetPenSizeForDemiBold( int aTextSize ) +{ + return KiROUND( aTextSize / 6 ); +} + + int GetPenSizeForBold( const wxSize& aTextSize ) { return GetPenSizeForBold( std::min( aTextSize.x, aTextSize.y ) ); } +int GetPenSizeForDemiBold( const wxSize& aTextSize ) +{ + return GetPenSizeForDemiBold( std::min( aTextSize.x, aTextSize.y ) ); +} + + int GetPenSizeForNormal( int aTextSize ) { return KiROUND( aTextSize / 8.0 ); diff --git a/common/layer_id.cpp b/common/layer_id.cpp index 3b21389880..0e3b79a786 100644 --- a/common/layer_id.cpp +++ b/common/layer_id.cpp @@ -147,6 +147,8 @@ wxString LayerName( int aLayer ) case LAYER_SELECTION_SHADOWS: return _( "Selection highlight" ); case LAYER_SCHEMATIC_DRAWINGSHEET: return _( "Drawing sheet" ); case LAYER_SCHEMATIC_PAGE_LIMITS: return _( "Page limits" ); + case LAYER_OP_VOLTAGES: return _( "Operating point voltages" ); + case LAYER_OP_CURRENTS: return _( "Operating point currents" ); // GAL_LAYER_ID diff --git a/common/settings/builtin_color_themes.h b/common/settings/builtin_color_themes.h index 0dfe77a62c..7ceb89fae3 100644 --- a/common/settings/builtin_color_themes.h +++ b/common/settings/builtin_color_themes.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2020 Jon Evans - * Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -73,6 +73,8 @@ static const std::map s_defaultTheme = { LAYER_WIRE, CSS_COLOR( 0, 150, 0, 1 ) }, { LAYER_SCHEMATIC_DRAWINGSHEET, CSS_COLOR( 132, 0, 0, 1 ) }, { LAYER_SCHEMATIC_PAGE_LIMITS, CSS_COLOR( 181, 181, 181, 1 ) }, + { LAYER_OP_VOLTAGES, CSS_COLOR( 132, 0, 50, 1 ) }, + { LAYER_OP_CURRENTS, CSS_COLOR( 224, 0, 12, 1 ) }, { LAYER_GERBVIEW_AXES, CSS_COLOR( 0, 0, 132, 1 ) }, { LAYER_GERBVIEW_BACKGROUND, CSS_COLOR( 0, 0, 0, 1 ) }, @@ -287,6 +289,8 @@ static const std::map s_classicTheme = { LAYER_VALUEPART, COLOR4D( CYAN ) }, { LAYER_WIRE, COLOR4D( GREEN ) }, { LAYER_SCHEMATIC_DRAWINGSHEET, COLOR4D( RED ) }, + { LAYER_OP_VOLTAGES, COLOR4D( DARKMAGENTA ) }, + { LAYER_OP_CURRENTS, COLOR4D( RED ) }, { LAYER_GERBVIEW_AXES, COLOR4D( BLUE ) }, { LAYER_GERBVIEW_BACKGROUND, COLOR4D( BLACK ) }, diff --git a/common/settings/color_settings.cpp b/common/settings/color_settings.cpp index d5a752de8c..0050f68454 100644 --- a/common/settings/color_settings.cpp +++ b/common/settings/color_settings.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2020 Jon Evans - * Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2021-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -94,6 +94,8 @@ COLOR_SETTINGS::COLOR_SETTINGS( const wxString& aFilename, bool aAbsolutePath ) CLR( "schematic.wire", LAYER_WIRE ); CLR( "schematic.worksheet", LAYER_SCHEMATIC_DRAWINGSHEET ); CLR( "schematic.page_limits", LAYER_SCHEMATIC_PAGE_LIMITS ); + CLR( "schematic.op_voltages", LAYER_OP_VOLTAGES ); + CLR( "schematic.op_currents", LAYER_OP_CURRENTS ); CLR( "gerbview.axes", LAYER_GERBVIEW_AXES ); CLR( "gerbview.background", LAYER_GERBVIEW_BACKGROUND ); diff --git a/eeschema/dialogs/dialog_sim_format_value_base.cpp b/eeschema/dialogs/dialog_sim_format_value_base.cpp index 600b7e7f87..2e726aeb2e 100644 --- a/eeschema/dialogs/dialog_sim_format_value_base.cpp +++ b/eeschema/dialogs/dialog_sim_format_value_base.cpp @@ -33,7 +33,7 @@ DIALOG_SIM_FORMAT_VALUE_BASE::DIALOG_SIM_FORMAT_VALUE_BASE( wxWindow* parent, wx m_rangeLabel->Wrap( -1 ); fgSizer->Add( m_rangeLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - wxString m_rangeCtrlChoices[] = { _("auto"), _("f"), _("p"), _("n"), _("u"), _("m"), wxEmptyString, _("K"), _("M"), _("G"), _("T"), _("P") }; + wxString m_rangeCtrlChoices[] = { _("Auto"), _("f"), _("p"), _("n"), _("u"), _("m"), wxEmptyString, _("K"), _("M"), _("G"), _("T"), _("P") }; int m_rangeCtrlNChoices = sizeof( m_rangeCtrlChoices ) / sizeof( wxString ); m_rangeCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_rangeCtrlNChoices, m_rangeCtrlChoices, 0 ); m_rangeCtrl->SetSelection( 0 ); diff --git a/eeschema/dialogs/dialog_sim_format_value_base.fbp b/eeschema/dialogs/dialog_sim_format_value_base.fbp index 008719c7ed..5b97d04412 100644 --- a/eeschema/dialogs/dialog_sim_format_value_base.fbp +++ b/eeschema/dialogs/dialog_sim_format_value_base.fbp @@ -279,7 +279,7 @@ 1 0 - "auto" "f" "p" "n" "u" "m" "" "K" "M" "G" "T" "P" + "Auto" "f" "p" "n" "u" "m" "" "K" "M" "G" "T" "P" 1 1 diff --git a/eeschema/dialogs/panel_eeschema_display_options.cpp b/eeschema/dialogs/panel_eeschema_display_options.cpp index 24bdbe756d..142c361e29 100644 --- a/eeschema/dialogs/panel_eeschema_display_options.cpp +++ b/eeschema/dialogs/panel_eeschema_display_options.cpp @@ -58,6 +58,8 @@ void PANEL_EESCHEMA_DISPLAY_OPTIONS::loadEEschemaSettings( EESCHEMA_SETTINGS* cf m_checkShowERCErrors->SetValue( cfg->m_Appearance.show_erc_errors ); m_checkShowERCWarnings->SetValue( cfg->m_Appearance.show_erc_warnings ); m_checkShowERCExclusions->SetValue( cfg->m_Appearance.show_erc_exclusions ); + m_checkShowOPVoltages->SetValue( cfg->m_Appearance.show_op_voltages ); + m_checkShowOPCurrents->SetValue( cfg->m_Appearance.show_op_currents ); m_checkPageLimits->SetValue( cfg->m_Appearance.show_page_limits ); m_checkSelDrawChildItems->SetValue( cfg->m_Selection.draw_selected_children ); @@ -98,6 +100,8 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow() cfg->m_Appearance.show_erc_warnings = m_checkShowERCWarnings->GetValue(); cfg->m_Appearance.show_erc_errors = m_checkShowERCErrors->GetValue(); cfg->m_Appearance.show_erc_exclusions = m_checkShowERCExclusions->GetValue(); + cfg->m_Appearance.show_op_voltages = m_checkShowOPVoltages->GetValue(); + cfg->m_Appearance.show_op_currents = m_checkShowOPCurrents->GetValue(); cfg->m_Appearance.show_page_limits = m_checkPageLimits->GetValue(); cfg->m_Selection.draw_selected_children = m_checkSelDrawChildItems->GetValue(); diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.cpp b/eeschema/dialogs/panel_eeschema_display_options_base.cpp index 5640ea46ea..d29c2bc340 100644 --- a/eeschema/dialogs/panel_eeschema_display_options_base.cpp +++ b/eeschema/dialogs/panel_eeschema_display_options_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -65,6 +65,12 @@ PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE( wxWind m_checkShowERCExclusions = new wxCheckBox( this, wxID_ANY, _("Show ERC exclusions"), wxDefaultPosition, wxDefaultSize, 0 ); bAppearanceSizer->Add( m_checkShowERCExclusions, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_checkShowOPVoltages = new wxCheckBox( this, wxID_ANY, _("Show OP voltages"), wxDefaultPosition, wxDefaultSize, 0 ); + bAppearanceSizer->Add( m_checkShowOPVoltages, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_checkShowOPCurrents = new wxCheckBox( this, wxID_ANY, _("Show OP currents"), wxDefaultPosition, wxDefaultSize, 0 ); + bAppearanceSizer->Add( m_checkShowOPCurrents, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_checkPageLimits = new wxCheckBox( this, wxID_ANY, _("Show page limi&ts"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkPageLimits->SetValue(true); bAppearanceSizer->Add( m_checkPageLimits, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.fbp b/eeschema/dialogs/panel_eeschema_display_options_base.fbp index 48b269b48e..0c363925eb 100644 --- a/eeschema/dialogs/panel_eeschema_display_options_base.fbp +++ b/eeschema/dialogs/panel_eeschema_display_options_base.fbp @@ -661,6 +661,134 @@ + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Show OP voltages + + 0 + + + 0 + + 1 + m_checkShowOPVoltages + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Show OP currents + + 0 + + + 0 + + 1 + m_checkShowOPCurrents + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + 5 wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.h b/eeschema/dialogs/panel_eeschema_display_options_base.h index a2c7979a35..9d81725335 100644 --- a/eeschema/dialogs/panel_eeschema_display_options_base.h +++ b/eeschema/dialogs/panel_eeschema_display_options_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -47,6 +47,8 @@ class PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE : public RESETTABLE_PANEL wxCheckBox* m_checkShowERCErrors; wxCheckBox* m_checkShowERCWarnings; wxCheckBox* m_checkShowERCExclusions; + wxCheckBox* m_checkShowOPVoltages; + wxCheckBox* m_checkShowOPCurrents; wxCheckBox* m_checkPageLimits; wxStaticText* m_selectionLabel; wxStaticLine* m_staticline2; diff --git a/eeschema/dialogs/panel_setup_formatting.cpp b/eeschema/dialogs/panel_setup_formatting.cpp index 800e8dc4b5..d4000cfd26 100644 --- a/eeschema/dialogs/panel_setup_formatting.cpp +++ b/eeschema/dialogs/panel_setup_formatting.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -116,6 +116,11 @@ bool PANEL_SETUP_FORMATTING::TransferDataToWindow() #undef SET_VALUE + m_vPrecisionCtrl->SetValue( settings.m_OPO_VPrecision ); + m_vRangeCtrl->SetStringSelection( settings.m_OPO_VRange ); + m_iPrecisionCtrl->SetValue( settings.m_OPO_IPrecision ); + m_iRangeCtrl->SetStringSelection( settings.m_OPO_IRange ); + return true; } @@ -167,6 +172,20 @@ bool PANEL_SETUP_FORMATTING::TransferDataFromWindow() #undef GET_VALUE + settings.m_OPO_VPrecision = m_vPrecisionCtrl->GetValue(); + + if( m_vRangeCtrl->GetSelection() == 0 ) + settings.m_OPO_VRange = wxS( "~V" ); + else + settings.m_OPO_VRange = m_vRangeCtrl->GetStringSelection(); + + settings.m_OPO_IPrecision = m_iPrecisionCtrl->GetValue(); + + if( m_iRangeCtrl->GetSelection() == 0 ) + settings.m_OPO_IRange = wxS( "~A" ); + else + settings.m_OPO_IRange = m_iRangeCtrl->GetStringSelection(); + return true; } diff --git a/eeschema/dialogs/panel_setup_formatting_base.cpp b/eeschema/dialogs/panel_setup_formatting_base.cpp index bbe175b403..38a0027f9a 100644 --- a/eeschema/dialogs/panel_setup_formatting_base.cpp +++ b/eeschema/dialogs/panel_setup_formatting_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -247,7 +247,60 @@ PANEL_SETUP_FORMATTING_BASE::PANEL_SETUP_FORMATTING_BASE( wxWindow* parent, wxWi sbSizer6->Add( m_dashedLineHelp, 0, wxALL, 5 ); - bRightColumn->Add( sbSizer6, 1, wxEXPAND|wxALL, 5 ); + bRightColumn->Add( sbSizer6, 0, wxEXPAND|wxALL, 5 ); + + wxStaticBoxSizer* sbSizer7; + sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Operating-point Overlay") ), wxVERTICAL ); + + wxFlexGridSizer* fgSizer; + fgSizer = new wxFlexGridSizer( 4, 2, 6, 0 ); + fgSizer->AddGrowableCol( 1 ); + fgSizer->SetFlexibleDirection( wxBOTH ); + fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + wxStaticText* vPrecisionLabel; + vPrecisionLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("Significant digits (voltages):"), wxDefaultPosition, wxDefaultSize, 0 ); + vPrecisionLabel->Wrap( -1 ); + fgSizer->Add( vPrecisionLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_vPrecisionCtrl = new wxSpinCtrl( sbSizer7->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 10, 3 ); + fgSizer->Add( m_vPrecisionCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxStaticText* vRangeLabel; + vRangeLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("Range (voltages):"), wxDefaultPosition, wxDefaultSize, 0 ); + vRangeLabel->Wrap( -1 ); + fgSizer->Add( vRangeLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + wxString m_vRangeCtrlChoices[] = { _("Auto"), _("fV"), _("pV"), _("nV"), _("uV"), _("mV"), _("V"), _("KV"), _("MV"), _("GV"), _("TV"), _("PV") }; + int m_vRangeCtrlNChoices = sizeof( m_vRangeCtrlChoices ) / sizeof( wxString ); + m_vRangeCtrl = new wxChoice( sbSizer7->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_vRangeCtrlNChoices, m_vRangeCtrlChoices, 0 ); + m_vRangeCtrl->SetSelection( 0 ); + fgSizer->Add( m_vRangeCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + wxStaticText* iPrecisionLabel; + iPrecisionLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("Significant digits (currents):"), wxDefaultPosition, wxDefaultSize, 0 ); + iPrecisionLabel->Wrap( -1 ); + fgSizer->Add( iPrecisionLabel, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_iPrecisionCtrl = new wxSpinCtrl( sbSizer7->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 10, 3 ); + fgSizer->Add( m_iPrecisionCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxStaticText* iRangeLabel; + iRangeLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("Range (currents):"), wxDefaultPosition, wxDefaultSize, 0 ); + iRangeLabel->Wrap( -1 ); + fgSizer->Add( iRangeLabel, 0, wxRIGHT|wxLEFT, 5 ); + + wxString m_iRangeCtrlChoices[] = { _("Auto"), _("fA"), _("pA"), _("nA"), _("uA"), _("mA"), _("A"), _("KA"), _("MA"), _("GA"), _("TA"), _("PA") }; + int m_iRangeCtrlNChoices = sizeof( m_iRangeCtrlChoices ) / sizeof( wxString ); + m_iRangeCtrl = new wxChoice( sbSizer7->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_iRangeCtrlNChoices, m_iRangeCtrlChoices, 0 ); + m_iRangeCtrl->SetSelection( 0 ); + fgSizer->Add( m_iRangeCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + + sbSizer7->Add( fgSizer, 1, wxEXPAND, 5 ); + + + bRightColumn->Add( sbSizer7, 1, wxEXPAND|wxALL, 5 ); bPanelSizer->Add( bRightColumn, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); diff --git a/eeschema/dialogs/panel_setup_formatting_base.fbp b/eeschema/dialogs/panel_setup_formatting_base.fbp index 62d5446580..7db8ebc6fb 100644 --- a/eeschema/dialogs/panel_setup_formatting_base.fbp +++ b/eeschema/dialogs/panel_setup_formatting_base.fbp @@ -1924,7 +1924,7 @@ 5 wxEXPAND|wxALL - 1 + 0 wxID_ANY Dashed Lines @@ -2264,6 +2264,534 @@ + + 5 + wxEXPAND|wxALL + 1 + + wxID_ANY + Operating-point Overlay + + sbSizer7 + wxVERTICAL + 1 + none + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 0 + + fgSizer + wxFLEX_GROWMODE_SPECIFIED + none + 4 + 6 + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Significant digits (voltages): + 0 + + 0 + + + 0 + + 1 + vPrecisionLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 3 + 10 + + 0 + + 1 + + 0 + + 1 + m_vPrecisionCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS + ; ; forward_declare + 0 + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Range (voltages): + 0 + + 0 + + + 0 + + 1 + vRangeLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Auto" "fV" "pV" "nV" "uV" "mV" "V" "KV" "MV" "GV" "TV" "PV" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_vRangeCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Significant digits (currents): + 0 + + 0 + + + 0 + + 1 + iPrecisionLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 3 + 10 + + 0 + + 1 + + 0 + + 1 + m_iPrecisionCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS + ; ; forward_declare + 0 + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Range (currents): + 0 + + 0 + + + 0 + + 1 + iRangeLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Auto" "fA" "pA" "nA" "uA" "mA" "A" "KA" "MA" "GA" "TA" "PA" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_iRangeCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + diff --git a/eeschema/dialogs/panel_setup_formatting_base.h b/eeschema/dialogs/panel_setup_formatting_base.h index 0a94a4849a..479a433846 100644 --- a/eeschema/dialogs/panel_setup_formatting_base.h +++ b/eeschema/dialogs/panel_setup_formatting_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -22,6 +22,7 @@ #include #include #include +#include #include /////////////////////////////////////////////////////////////////////////// @@ -71,6 +72,10 @@ class PANEL_SETUP_FORMATTING_BASE : public wxPanel wxStaticText* gapLengthLabel; wxTextCtrl* m_gapLengthCtrl; wxStaticText* m_dashedLineHelp; + wxSpinCtrl* m_vPrecisionCtrl; + wxChoice* m_vRangeCtrl; + wxSpinCtrl* m_iPrecisionCtrl; + wxChoice* m_iRangeCtrl; // Virtual event handlers, override them in your derived class virtual void onCheckBoxIref( wxCommandEvent& event ) { event.Skip(); } diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 3f80d2cd7e..39ee825596 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -102,6 +102,7 @@ void SCH_EDIT_FRAME::ShowSchematicSetupDialog( const wxString& aInitialPage ) GetCanvas()->GetView()->MarkDirty(); GetCanvas()->GetView()->UpdateAllItems( KIGFX::REPAINT ); + RefreshOperatingPointDisplay(); GetCanvas()->Refresh(); } } diff --git a/eeschema/eeschema_settings.cpp b/eeschema/eeschema_settings.cpp index fd6951219f..2e3dcbe85d 100644 --- a/eeschema/eeschema_settings.cpp +++ b/eeschema/eeschema_settings.cpp @@ -133,6 +133,12 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() : m_params.emplace_back( new PARAM( "appearance.show_erc_exclusions", &m_Appearance.show_erc_exclusions, false ) ); + m_params.emplace_back( new PARAM( "appearance.show_op_voltages", + &m_Appearance.show_op_voltages, true ) ); + + m_params.emplace_back( new PARAM( "appearance.show_op_currents", + &m_Appearance.show_op_currents, true ) ); + m_params.emplace_back( new PARAM( "appearance.show_illegal_symbol_lib_dialog", &m_Appearance.show_illegal_symbol_lib_dialog, true ) ); diff --git a/eeschema/eeschema_settings.h b/eeschema/eeschema_settings.h index cbf5c14fde..d52bab1158 100644 --- a/eeschema/eeschema_settings.h +++ b/eeschema/eeschema_settings.h @@ -63,6 +63,8 @@ public: bool show_erc_warnings; bool show_erc_errors; bool show_erc_exclusions; + bool show_op_voltages; + bool show_op_currents; bool show_illegal_symbol_lib_dialog; bool show_page_limits; bool show_sexpr_file_convert_warning; diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index e74b291b71..e3c92aaaa8 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2015 Wayne Stambaugh - * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -1187,12 +1187,13 @@ const BOX2I LIB_PIN::ViewBBox() const void LIB_PIN::ViewGetLayers( int aLayers[], int& aCount ) const { - aCount = 3; + aCount = 4; aLayers[0] = LAYER_DANGLING; // We don't really show dangling vs non-dangling (since there // are no connections in the symbol editor), but it's still // a good visual indication of which end of the pin is which. aLayers[1] = LAYER_DEVICE; aLayers[2] = LAYER_SELECTION_SHADOWS; + aLayers[3] = LAYER_OP_CURRENTS; } diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h index 993e2e636c..7d8afeb420 100644 --- a/eeschema/lib_pin.h +++ b/eeschema/lib_pin.h @@ -3,7 +3,7 @@ * * Copyright (C) 2015 Jean-Pierre Charras, jaen-pierre.charras at wanadoo.fr * Copyright (C) 2015 Wayne Stambaugh - * Copyright (C) 2004-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2004-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -166,6 +166,11 @@ public: // Do not create a copy constructor. The one generated by the compiler is adequate. + // No, LIB_PINs don't really have operating poinst. But we draw SCH_PINs through their LIB_PIN + // counterparts, so here we are.... + const wxString& GetOperatingPoint() const { return m_operatingPoint; } + void SetOperatingPoint( const wxString& aText ) { m_operatingPoint = aText; } + #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const override; #endif @@ -299,6 +304,10 @@ protected: int m_nameTextSize; std::map m_alternates; // Map of alternate name to ALT structure + + wxString m_operatingPoint; // No, LIB_PINs don't really have operating points. + // But we draw SCH_PINs through their LIB_PIN + // counterparts, so here we are.... }; diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 4f7d318e66..7f724f855c 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -207,6 +207,8 @@ void SCH_EDIT_FRAME::doReCreateMenuBar() viewMenu->Add( EE_ACTIONS::toggleERCErrors, ACTION_MENU::CHECK ); viewMenu->Add( EE_ACTIONS::toggleERCWarnings, ACTION_MENU::CHECK ); viewMenu->Add( EE_ACTIONS::toggleERCExclusions, ACTION_MENU::CHECK ); + viewMenu->Add( EE_ACTIONS::toggleOPVoltages, ACTION_MENU::CHECK ); + viewMenu->Add( EE_ACTIONS::toggleOPCurrents, ACTION_MENU::CHECK ); #ifdef __APPLE__ viewMenu->AppendSeparator(); diff --git a/eeschema/sch_draw_panel.cpp b/eeschema/sch_draw_panel.cpp index f987c6cc56..7423904bdd 100644 --- a/eeschema/sch_draw_panel.cpp +++ b/eeschema/sch_draw_panel.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2014-2019 CERN * @author Maciej Suminski - * Copyright (C) 2019-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2019-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -168,6 +168,11 @@ void SCH_DRAW_PANEL::setDefaultLayerDeps() m_view->SetLayerTarget( LAYER_DRAWINGSHEET, KIGFX::TARGET_NONCACHED ); m_view->SetLayerDisplayOnly( LAYER_DRAWINGSHEET ) ; + m_view->SetLayerTarget( LAYER_OP_VOLTAGES, KIGFX::TARGET_OVERLAY ); + m_view->SetLayerDisplayOnly( LAYER_OP_VOLTAGES ); + m_view->SetLayerTarget( LAYER_OP_CURRENTS, KIGFX::TARGET_OVERLAY ); + m_view->SetLayerDisplayOnly( LAYER_OP_CURRENTS ); + // m_view->SetLayerTarget( LAYER_SELECTION_SHADOWS, KIGFX::TARGET_NONCACHED ); // m_view->SetLayerDisplayOnly( LAYER_SELECTION_SHADOWS ) ; } diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index eb7d5eeae7..bde425c8c3 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -248,6 +248,12 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : LoadProjectSettings(); + view->SetLayerVisible( LAYER_ERC_ERR, cfg->m_Appearance.show_erc_errors ); + view->SetLayerVisible( LAYER_ERC_WARN, cfg->m_Appearance.show_erc_warnings ); + view->SetLayerVisible( LAYER_ERC_EXCLUSION, cfg->m_Appearance.show_erc_exclusions ); + view->SetLayerVisible( LAYER_OP_VOLTAGES, cfg->m_Appearance.show_op_voltages ); + view->SetLayerVisible( LAYER_OP_CURRENTS, cfg->m_Appearance.show_op_currents ); + initScreenZoom(); m_hierarchy->Connect( wxEVT_SIZE, @@ -496,6 +502,20 @@ void SCH_EDIT_FRAME::setupUIConditions() return cfg && cfg->m_Appearance.show_erc_exclusions; }; + auto showOPVoltagesCond = + [this]( const SELECTION& ) + { + EESCHEMA_SETTINGS* cfg = eeconfig(); + return cfg && cfg->m_Appearance.show_op_voltages; + }; + + auto showOPCurrentsCond = + [this]( const SELECTION& ) + { + EESCHEMA_SETTINGS* cfg = eeconfig(); + return cfg && cfg->m_Appearance.show_op_currents; + }; + auto showAnnotateAutomaticallyCond = [this]( const SELECTION& ) { @@ -554,6 +574,8 @@ void SCH_EDIT_FRAME::setupUIConditions() mgr->SetConditions( EE_ACTIONS::toggleERCErrors, CHECK( showERCErrorsCond ) ); mgr->SetConditions( EE_ACTIONS::toggleERCWarnings, CHECK( showERCWarningsCond ) ); mgr->SetConditions( EE_ACTIONS::toggleERCExclusions, CHECK( showERCExclusionsCond ) ); + mgr->SetConditions( EE_ACTIONS::toggleOPVoltages, CHECK( showOPVoltagesCond ) ); + mgr->SetConditions( EE_ACTIONS::toggleOPCurrents, CHECK( showOPCurrentsCond ) ); mgr->SetConditions( EE_ACTIONS::toggleAnnotateAuto, CHECK( showAnnotateAutomaticallyCond ) ); mgr->SetConditions( ACTIONS::toggleBoundingBoxes, CHECK( cond.BoundingBoxes() ) ); @@ -1258,6 +1280,11 @@ void SCH_EDIT_FRAME::PrintPage( const RENDER_SETTINGS* aSettings ) void SCH_EDIT_FRAME::RefreshOperatingPointDisplay() { + SCHEMATIC_SETTINGS& settings = m_schematic->Settings(); + SIM_LIB_MGR simLibMgr( &Prj() ); + + // Update items which may have ${OP} text variables + // GetCanvas()->GetView()->UpdateAllItemsConditionally( [&]( KIGFX::VIEW_ITEM* aItem ) -> int { @@ -1291,6 +1318,89 @@ void SCH_EDIT_FRAME::RefreshOperatingPointDisplay() return flags; } ); + // Update OP overlay items + // + for( SCH_ITEM* item : GetScreen()->Items() ) + { + if( item->Type() == SCH_LINE_T ) + { + static_cast( item )->SetOperatingPoint( wxEmptyString ); + // update value from netlist, below + } + else if( item->Type() == SCH_SYMBOL_T ) + { + SCH_SYMBOL* symbol = static_cast( item ); + wxString ref = symbol->GetRef( &GetCurrentSheet() ); + std::vector pins = symbol->GetPins( &GetCurrentSheet() ); + + for( SCH_PIN* pin : pins ) + pin->SetOperatingPoint( wxEmptyString ); + + if( pins.size() == 2 ) + { + wxString op = m_schematic->GetOperatingPoint( ref, settings.m_OPO_IPrecision, + settings.m_OPO_IRange ); + + if( !op.IsEmpty() && op != wxS( "?" ) ) + pins[0]->SetOperatingPoint( op ); + } + else + { + SIM_MODEL& model = simLibMgr.CreateModel( &GetCurrentSheet(), *symbol ).model; + + for( const auto& modelPin : model.GetPins() ) + { + SCH_PIN* symbolPin = symbol->GetPin( modelPin.get().symbolPinNumber ); + wxString signalName = ref + wxS( ":" ) + modelPin.get().name; + wxString op = m_schematic->GetOperatingPoint( signalName, + settings.m_OPO_IPrecision, + settings.m_OPO_IRange ); + + if( symbolPin && !op.IsEmpty() && op != wxS( "?" ) ) + { + symbolPin->SetOperatingPoint( op ); + GetCanvas()->GetView()->Update( symbol ); + } + } + } + } + } + + for( const auto& [ key, subgraphList ] : m_schematic->m_connectionGraph->GetNetMap() ) + { + wxString op = m_schematic->GetOperatingPoint( key.Name, settings.m_OPO_VPrecision, + settings.m_OPO_VRange ); + + if( !op.IsEmpty() ) + { + for( CONNECTION_SUBGRAPH* subgraph : subgraphList ) + { + SCH_LINE* longestWire = nullptr; + double length = 0.0; + + for( SCH_ITEM* item : subgraph->m_items ) + { + if( item->IsType( { SCH_ITEM_LOCATE_WIRE_T } ) ) + { + SCH_LINE* wire = static_cast( item ); + + if( wire->GetLength() > length ) + { + longestWire = wire; + length = wire->GetLength(); + } + } + } + + if( longestWire ) + { + longestWire->SetOperatingPoint( op ); + GetCanvas()->GetView()->Update( longestWire ); + } + } + } + } + GetCanvas()->ForceRefresh(); } @@ -1603,6 +1713,10 @@ void SCH_EDIT_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVars view->SetLayerVisible( LAYER_ERC_ERR, cfg->m_Appearance.show_erc_errors ); view->SetLayerVisible( LAYER_ERC_WARN, cfg->m_Appearance.show_erc_warnings ); view->SetLayerVisible( LAYER_ERC_EXCLUSION, cfg->m_Appearance.show_erc_exclusions ); + view->SetLayerVisible( LAYER_OP_VOLTAGES, cfg->m_Appearance.show_op_voltages ); + view->SetLayerVisible( LAYER_OP_CURRENTS, cfg->m_Appearance.show_op_currents ); + + RefreshOperatingPointDisplay(); settings.m_TemplateFieldNames.DeleteAllFieldNameTemplates( true /* global */ ); @@ -1871,6 +1985,7 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet() // update the References GetCurrentSheet().UpdateAllScreenReferences(); SetSheetNumberAndCount(); + RefreshOperatingPointDisplay(); EE_SELECTION_TOOL* selectionTool = m_toolManager->GetTool(); diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp index 99bae09c1a..e9f608ebb1 100644 --- a/eeschema/sch_line.cpp +++ b/eeschema/sch_line.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -85,8 +85,11 @@ SCH_LINE::SCH_LINE( const SCH_LINE& aLine ) : m_lastResolvedLineStyle = aLine.m_lastResolvedLineStyle; m_lastResolvedWidth = aLine.m_lastResolvedWidth; m_lastResolvedColor = aLine.m_lastResolvedColor; + + m_operatingPoint = aLine.m_operatingPoint; } + wxString SCH_LINE::GetNetname( const SCH_SHEET_PATH& aSheet ) { std::list checkedLines; @@ -94,6 +97,7 @@ wxString SCH_LINE::GetNetname( const SCH_SHEET_PATH& aSheet ) return FindWireSegmentNetNameRecursive( this, checkedLines, aSheet ); } + wxString SCH_LINE::FindWireSegmentNetNameRecursive( SCH_LINE *line, std::list &checkedLines, const SCH_SHEET_PATH& aSheet ) const @@ -125,6 +129,7 @@ wxString SCH_LINE::FindWireSegmentNetNameRecursive( SCH_LINE *line, return ""; } + EDA_ITEM* SCH_LINE::Clone() const { return new SCH_LINE( *this ); @@ -181,10 +186,36 @@ void SCH_LINE::Show( int nestLevel, std::ostream& os ) const void SCH_LINE::ViewGetLayers( int aLayers[], int& aCount ) const { - aCount = 3; + aCount = 4; aLayers[0] = LAYER_DANGLING; aLayers[1] = m_layer; aLayers[2] = LAYER_SELECTION_SHADOWS; + aLayers[3] = LAYER_OP_VOLTAGES; +} + + +double SCH_LINE::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const +{ + constexpr double HIDE = std::numeric_limits::max(); + constexpr double SHOW = 0.0; + + if( aLayer == LAYER_OP_VOLTAGES ) + { + if( m_start == m_end ) + return HIDE; + + int height = std::abs( m_end.y - m_start.y ); + int width = std::abs( m_end.x - m_start.x ); + + // Operating points will be shown only if zoom is appropriate + if( height == 0 ) + return (double) schIUScale.mmToIU( 15 ) / width; + else + return (double) schIUScale.mmToIU( 5 ) / height; + } + + // Other layers are always drawn. + return SHOW; } diff --git a/eeschema/sch_line.h b/eeschema/sch_line.h index 3559872fa1..803d7157f8 100644 --- a/eeschema/sch_line.h +++ b/eeschema/sch_line.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -197,6 +197,8 @@ public: void ViewGetLayers( int aLayers[], int& aCount ) const override; + double ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override; + const BOX2I GetBoundingBox() const override; /** @@ -295,6 +297,9 @@ public: void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) override; + const wxString& GetOperatingPoint() const { return m_operatingPoint; } + void SetOperatingPoint( const wxString& aText ) { m_operatingPoint = aText; } + #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const override; #endif @@ -347,6 +352,8 @@ private: mutable PLOT_DASH_TYPE m_lastResolvedLineStyle; mutable int m_lastResolvedWidth; mutable COLOR4D m_lastResolvedColor; + + wxString m_operatingPoint; }; diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 480004cacb..129d89e7b0 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2014 CERN - * Copyright (C) 2019-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2019-2023 KiCad Developers, see AUTHORS.txt for contributors. * * @author Tomasz Wlostowski * @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -565,6 +566,16 @@ float SCH_PAINTER::getTextThickness( const EDA_ITEM* aItem ) const } +int SCH_PAINTER::getOperatingPointTextSize() const +{ + int docTextSize = schIUScale.MilsToIU( 50 ); + int screenTextSize = std::abs( (int) m_gal->GetScreenWorldMatrix().GetScale().y * 7 ); + + // 66% zoom-relative + return KiROUND( ( docTextSize + screenTextSize * 2 ) / 3 ); +} + + static VECTOR2D mapCoords( const VECTOR2D& aCoord ) { return VECTOR2D( aCoord.x, -aCoord.y ); @@ -617,6 +628,52 @@ void SCH_PAINTER::bitmapText( const wxString& aText, const VECTOR2D& aPosition, } +void SCH_PAINTER::knockoutText( const wxString& aText, const VECTOR2D& aPosition, + const TEXT_ATTRIBUTES& aAttrs ) +{ + TEXT_ATTRIBUTES attrs( aAttrs ); + KIFONT::FONT* font = aAttrs.m_Font; + + if( !font ) + { + font = KIFONT::FONT::GetFont( eeconfig()->m_Appearance.default_font, attrs.m_Bold, + attrs.m_Italic ); + } + + KIGFX::GAL_DISPLAY_OPTIONS empty_opts; + SHAPE_POLY_SET knockouts; + + CALLBACK_GAL callback_gal( empty_opts, + // Polygon callback + [&]( const SHAPE_LINE_CHAIN& aPoly ) + { + knockouts.AddOutline( aPoly ); + } ); + + callback_gal.SetIsFill( false ); + callback_gal.SetIsStroke( true ); + callback_gal.SetLineWidth( (float) attrs.m_StrokeWidth ); + font->Draw( &callback_gal, aText, aPosition, attrs ); + + BOX2I bbox = knockouts.BBox( attrs.m_StrokeWidth * 2 ); + SHAPE_POLY_SET finalPoly; + + finalPoly.NewOutline(); + finalPoly.Append( bbox.GetLeft(), bbox.GetTop() ); + finalPoly.Append( bbox.GetRight(), bbox.GetTop() ); + finalPoly.Append( bbox.GetRight(), bbox.GetBottom() ); + finalPoly.Append( bbox.GetLeft(), bbox.GetBottom() ); + + finalPoly.BooleanSubtract( knockouts, SHAPE_POLY_SET::PM_FAST ); + finalPoly.Fracture( SHAPE_POLY_SET::PM_FAST ); + + m_gal->SetIsStroke( false ); + m_gal->SetIsFill( true ); + m_gal->SetFillColor( attrs.m_Color ); + m_gal->DrawPolygon( finalPoly ); +} + + void SCH_PAINTER::boxText( const wxString& aText, const VECTOR2D& aPosition, const TEXT_ATTRIBUTES& aAttrs ) { @@ -1232,6 +1289,7 @@ void SCH_PAINTER::draw( const LIB_PIN *aPin, int aLayer, bool aDimmed ) bool drawingShadows = aLayer == LAYER_SELECTION_SHADOWS; bool drawingDangling = aLayer == LAYER_DANGLING; + bool drawingOP = aLayer == LAYER_OP_CURRENTS; bool isDangling = m_schSettings.m_IsSymbolEditor || aPin->HasFlag( IS_DANGLING ); if( drawingShadows && !( aPin->IsBrightened() || aPin->IsSelected() ) ) @@ -1292,6 +1350,40 @@ void SCH_PAINTER::draw( const LIB_PIN *aPin, int aLayer, bool aDimmed ) break; } + if( drawingOP && !aPin->GetOperatingPoint().IsEmpty() ) + { + int textSize = getOperatingPointTextSize(); + VECTOR2I mid = ( p0 + pos ) / 2; + int textOffset = KiROUND( textSize * 0.22 ); + TEXT_ATTRIBUTES attrs; + + if( len > KiROUND( textSize * 1.8 ) ) + { + if( dir.x == 0 ) + { + mid.x += KiROUND( textOffset * 1.2 ); + attrs.m_Angle = ANGLE_HORIZONTAL; + } + else + { + mid.y -= KiROUND( textOffset * 1.2 ); + attrs.m_Angle = ANGLE_VERTICAL; + } + + attrs.m_Halign = GR_TEXT_H_ALIGN_LEFT; + attrs.m_Valign = GR_TEXT_V_ALIGN_CENTER; + + attrs.m_Font = KIFONT::FONT::GetFont(); // always use stroke font for performance + attrs.m_Size = VECTOR2I( textSize, textSize ); + attrs.m_StrokeWidth = GetPenSizeForDemiBold( textSize ); + attrs.m_Color = m_schSettings.GetLayerColor( LAYER_OP_CURRENTS ); + + knockoutText( aPin->GetOperatingPoint(), mid, attrs ); + } + + return; + } + VECTOR2D pc; m_gal->SetIsStroke( true ); @@ -1706,6 +1798,7 @@ void SCH_PAINTER::draw( const SCH_LINE *aLine, int aLayer ) { bool drawingShadows = aLayer == LAYER_SELECTION_SHADOWS; bool drawingDangling = aLayer == LAYER_DANGLING; + bool drawingOP = aLayer == LAYER_OP_VOLTAGES; if( drawingShadows && !( aLine->IsBrightened() || aLine->IsSelected() ) ) return; @@ -1747,6 +1840,35 @@ void SCH_PAINTER::draw( const SCH_LINE *aLine, int aLayer ) if( drawingDangling ) return; + if( drawingOP && !aLine->GetOperatingPoint().IsEmpty() ) + { + int textSize = getOperatingPointTextSize(); + VECTOR2I pos = aLine->GetMidPoint(); + int textOffset = KiROUND( textSize * 0.22 ); + TEXT_ATTRIBUTES attrs; + + if( aLine->GetStartPoint().y == aLine->GetEndPoint().y ) + { + pos.y -= textOffset; + attrs.m_Halign = GR_TEXT_H_ALIGN_CENTER; + attrs.m_Valign = GR_TEXT_V_ALIGN_BOTTOM; + } + else + { + pos.x += KiROUND( textOffset * 1.2 ); + attrs.m_Halign = GR_TEXT_H_ALIGN_LEFT; + attrs.m_Valign = GR_TEXT_V_ALIGN_CENTER; + } + + attrs.m_Font = KIFONT::FONT::GetFont(); // always use stroke font for performance + attrs.m_Size = VECTOR2I( textSize, textSize ); + attrs.m_StrokeWidth = GetPenSizeForDemiBold( textSize ); + attrs.m_Color = m_schSettings.GetLayerColor( LAYER_OP_VOLTAGES ); + + knockoutText( aLine->GetOperatingPoint(), pos, attrs ); + return; + } + m_gal->SetIsStroke( true ); m_gal->SetStrokeColor( color ); m_gal->SetLineWidth( width ); @@ -2300,6 +2422,8 @@ void SCH_PAINTER::draw( const SCH_SYMBOL* aSymbol, int aLayer ) tempPin->SetFlags( IS_DANGLING ); else tempPin->ClearFlags( IS_DANGLING ); + + tempPin->SetOperatingPoint( symbolPin->GetOperatingPoint() ); } draw( &tempSymbol, aLayer, false, aSymbol->GetUnit(), aSymbol->GetConvert(), aSymbol->GetDNP() ); diff --git a/eeschema/sch_painter.h b/eeschema/sch_painter.h index b4dc8c5786..20ac4a0239 100644 --- a/eeschema/sch_painter.h +++ b/eeschema/sch_painter.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2019-2020 CERN - * Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors. * * @author Tomasz Wlostowski * @@ -189,6 +189,8 @@ private: float getLineWidth( const EDA_ITEM* aItem, bool aDrawingShadows ) const; float getTextThickness( const EDA_ITEM* aItem ) const; + int getOperatingPointTextSize() const; + bool setDeviceColors( const LIB_ITEM* aItem, int aLayer, bool aDimmed ); void triLine( const VECTOR2D &a, const VECTOR2D &b, const VECTOR2D &c ); @@ -196,7 +198,10 @@ private: const TEXT_ATTRIBUTES& aAttributes ); void bitmapText( const wxString& aText, const VECTOR2D& aPosition, const TEXT_ATTRIBUTES& aAttributes ); - void boxText( const wxString& aText, const VECTOR2D& aPosition, const TEXT_ATTRIBUTES& aAttrs ); + void knockoutText( const wxString& aText, const VECTOR2D& aPosition, + const TEXT_ATTRIBUTES& aAttrs ); + void boxText( const wxString& aText, const VECTOR2D& aPosition, + const TEXT_ATTRIBUTES& aAttrs ); public: static std::vector g_ScaledSelectionTypes; diff --git a/eeschema/sch_pin.cpp b/eeschema/sch_pin.cpp index 3decd1bf39..7e74fa6e3e 100644 --- a/eeschema/sch_pin.cpp +++ b/eeschema/sch_pin.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2018 CERN - * Copyright (C) 2019-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2019-2023 KiCad Developers, see AUTHORS.txt for contributors. * @author Jon Evans * * This program is free software; you can redistribute it and/or @@ -152,10 +152,11 @@ const BOX2I SCH_PIN::ViewBBox() const void SCH_PIN::ViewGetLayers( int aLayers[], int& aCount ) const { - aCount = 3; + aCount = 4; aLayers[0] = LAYER_DANGLING; aLayers[1] = LAYER_DEVICE; aLayers[2] = LAYER_SELECTION_SHADOWS; + aLayers[3] = LAYER_OP_CURRENTS; } diff --git a/eeschema/sch_pin.h b/eeschema/sch_pin.h index 1c53c6f8e6..d5252a7ff5 100644 --- a/eeschema/sch_pin.h +++ b/eeschema/sch_pin.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2018 CERN - * Copyright (C) 2019-2021 KiCad Developers, see AUTHOR.txt for contributors. + * Copyright (C) 2019-2023 KiCad Developers, see AUTHOR.txt for contributors. * @author Jon Evans * * This program is free software; you can redistribute it and/or @@ -159,6 +159,8 @@ public: bool ConnectionPropagatesTo( const EDA_ITEM* aItem ) const override; + const wxString& GetOperatingPoint() const { return m_operatingPoint; } + void SetOperatingPoint( const wxString& aText ) { m_operatingPoint = aText; } #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const override {} @@ -175,6 +177,8 @@ private: /// The name that this pin connection will drive onto a net. std::recursive_mutex m_netmap_mutex; std::map> m_net_name_map; + + wxString m_operatingPoint; }; #endif diff --git a/eeschema/sch_symbol.cpp b/eeschema/sch_symbol.cpp index c58fe37c5c..7e20258a95 100644 --- a/eeschema/sch_symbol.cpp +++ b/eeschema/sch_symbol.cpp @@ -244,15 +244,16 @@ bool SCH_SYMBOL::IsMissingLibSymbol() const void SCH_SYMBOL::ViewGetLayers( int aLayers[], int& aCount ) const { - aCount = 7; + aCount = 8; aLayers[0] = LAYER_DANGLING; // Pins are drawn by their parent symbol, so the parent // symbol needs to draw to LAYER_DANGLING - aLayers[1] = LAYER_DEVICE; - aLayers[2] = LAYER_REFERENCEPART; - aLayers[3] = LAYER_VALUEPART; - aLayers[4] = LAYER_FIELDS; - aLayers[5] = LAYER_DEVICE_BACKGROUND; - aLayers[6] = LAYER_SELECTION_SHADOWS; + aLayers[1] = LAYER_OP_CURRENTS; // Same for pin operating points + aLayers[2] = LAYER_DEVICE; + aLayers[3] = LAYER_REFERENCEPART; + aLayers[4] = LAYER_VALUEPART; + aLayers[5] = LAYER_FIELDS; + aLayers[6] = LAYER_DEVICE_BACKGROUND; + aLayers[7] = LAYER_SELECTION_SHADOWS; } diff --git a/eeschema/sch_view.h b/eeschema/sch_view.h index 322fd70f46..4549833c4b 100644 --- a/eeschema/sch_view.h +++ b/eeschema/sch_view.h @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2018-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -46,6 +46,7 @@ static const int SCH_LAYER_ORDER[] = { LAYER_GP_OVERLAY, LAYER_SELECT_OVERLAY, LAYER_ERC_ERR, LAYER_ERC_WARN, LAYER_ERC_EXCLUSION, LAYER_DANGLING, + LAYER_OP_VOLTAGES, LAYER_OP_CURRENTS, LAYER_REFERENCEPART, LAYER_VALUEPART, LAYER_FIELDS, LAYER_INTERSHEET_REFS, LAYER_NETCLASS_REFS, LAYER_BUS_JUNCTION, LAYER_JUNCTION, LAYER_NOCONNECT, diff --git a/eeschema/schematic.cpp b/eeschema/schematic.cpp index c93e9ba914..85f1a2352c 100644 --- a/eeschema/schematic.cpp +++ b/eeschema/schematic.cpp @@ -32,6 +32,7 @@ #include #include #include +#include SCHEMATIC::SCHEMATIC( PROJECT* aPrj ) : EDA_ITEM( nullptr, SCHEMATIC_T ), @@ -629,7 +630,13 @@ void SCHEMATIC::RecomputeIntersheetRefs( const std::functionsecond ).ToString( aPrecision, aRange ); diff --git a/eeschema/schematic_settings.cpp b/eeschema/schematic_settings.cpp index 625333d8ef..c54055208a 100644 --- a/eeschema/schematic_settings.cpp +++ b/eeschema/schematic_settings.cpp @@ -52,6 +52,10 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin m_IntersheetRefsSuffix( DEFAULT_IREF_SUFFIX ), m_DashedLineDashRatio( 12.0 ), m_DashedLineGapRatio( 3.0 ), + m_OPO_VPrecision( 3 ), + m_OPO_VRange( wxS( "~V" ) ), + m_OPO_IPrecision( 3 ), + m_OPO_IRange( wxS( "~A" ) ), m_SpiceCurSheetAsRoot( false ), m_SpiceSaveAllVoltages( false ), m_SpiceSaveAllCurrents( false ), @@ -100,6 +104,18 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin m_params.emplace_back( new PARAM( "drawing.dashed_lines_gap_length_ratio", &m_DashedLineGapRatio, 3.0 ) ); // Default from ISO 128-2 + m_params.emplace_back( new PARAM( "drawing.operating_point_overlay_v_precision", + &m_OPO_VPrecision, 3 ) ); + + m_params.emplace_back( new PARAM( "drawing.operating_point_overlay_v_range", + &m_OPO_VRange, wxS( "~V" ) ) ); + + m_params.emplace_back( new PARAM( "drawing.operating_point_overlay_i_precision", + &m_OPO_VPrecision, 3 ) ); + + m_params.emplace_back( new PARAM( "drawing.operating_point_overlay_i_range", + &m_OPO_VRange, wxS( "~A" ) ) ); + m_params.emplace_back( new PARAM_SCALED( "drawing.default_line_thickness", &m_DefaultLineWidth, schIUScale.MilsToIU( defaultLineThickness ), schIUScale.MilsToIU( 5 ), schIUScale.MilsToIU( 1000 ), 1 / schIUScale.IU_PER_MILS ) ); diff --git a/eeschema/schematic_settings.h b/eeschema/schematic_settings.h index ef81ad9248..acdd4b0f35 100644 --- a/eeschema/schematic_settings.h +++ b/eeschema/schematic_settings.h @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -63,6 +63,11 @@ public: double m_DashedLineDashRatio; // Dash length as ratio of the lineWidth double m_DashedLineGapRatio; // Gap length as ratio of the lineWidth + int m_OPO_VPrecision; // Operating-point overlay voltage significant digits + wxString m_OPO_VRange; // Operating-point overlay voltage range + int m_OPO_IPrecision; // Operating-point overlay current significant digits + wxString m_OPO_IRange; // Operating-point overlay current range + wxString m_SchDrawingSheetFileName; wxString m_PlotDirectoryName; diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index d695a61180..cd532629ae 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -2002,8 +2002,9 @@ void SIM_PLOT_FRAME::onSimFinished( wxCommandEvent& aEvent ) signal = signal.SubString( 2, signal.Length() - 2 ); schematic.SetOperatingPoint( signal, val_list.at( 0 ) ); - m_schematicFrame->RefreshOperatingPointDisplay(); } + + m_schematicFrame->RefreshOperatingPointDisplay(); } m_lastSimPlot = plotPanelWindow; diff --git a/eeschema/tools/ee_actions.cpp b/eeschema/tools/ee_actions.cpp index 9450d4798f..dcabe70963 100644 --- a/eeschema/tools/ee_actions.cpp +++ b/eeschema/tools/ee_actions.cpp @@ -704,6 +704,16 @@ TOOL_ACTION EE_ACTIONS::toggleERCExclusions( "eeschema.EditorControl.showERCExcl _( "Show ERC Exclusions" ), _( "Show markers for excluded electrical rules checker violations" ) ); +TOOL_ACTION EE_ACTIONS::toggleOPVoltages( "eeschema.EditorControl.showOperatingPointVoltages", + AS_GLOBAL, 0, "", + _( "Show OP Voltages" ), + _( "Show operating point voltage data from simulation" ) ); + +TOOL_ACTION EE_ACTIONS::toggleOPCurrents( "eeschema.EditorControl.showOperatingPointCurrents", + AS_GLOBAL, 0, "", + _( "Show OP Currents" ), + _( "Show operating point current data from simulation" ) ); + TOOL_ACTION EE_ACTIONS::lineModeFree( "eeschema.EditorControl.lineModeFree", AS_GLOBAL, 0, "", _( "Line Mode for Wires and Buses" ), _( "Draw and drag at any angle" ), diff --git a/eeschema/tools/ee_actions.h b/eeschema/tools/ee_actions.h index 54a42c116b..c79cd9f88f 100644 --- a/eeschema/tools/ee_actions.h +++ b/eeschema/tools/ee_actions.h @@ -215,6 +215,8 @@ public: static TOOL_ACTION toggleERCWarnings; static TOOL_ACTION toggleERCErrors; static TOOL_ACTION toggleERCExclusions; + static TOOL_ACTION toggleOPVoltages; + static TOOL_ACTION toggleOPCurrents; static TOOL_ACTION toggleSyncedPinsMode; static TOOL_ACTION restartMove; static TOOL_ACTION selectOnPCB; diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 85bd3a6e60..67db7b17b4 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -2153,6 +2153,30 @@ int SCH_EDITOR_CONTROL::ToggleERCExclusions( const TOOL_EVENT& aEvent ) } +int SCH_EDITOR_CONTROL::ToggleOPVoltages( const TOOL_EVENT& aEvent ) +{ + EESCHEMA_SETTINGS* cfg = m_frame->eeconfig(); + cfg->m_Appearance.show_op_voltages = !cfg->m_Appearance.show_op_voltages; + + getView()->SetLayerVisible( LAYER_OP_VOLTAGES, cfg->m_Appearance.show_op_voltages ); + m_frame->RefreshOperatingPointDisplay(); + + return 0; +} + + +int SCH_EDITOR_CONTROL::ToggleOPCurrents( const TOOL_EVENT& aEvent ) +{ + EESCHEMA_SETTINGS* cfg = m_frame->eeconfig(); + cfg->m_Appearance.show_op_currents = !cfg->m_Appearance.show_op_currents; + + getView()->SetLayerVisible( LAYER_OP_CURRENTS, cfg->m_Appearance.show_op_currents ); + m_frame->RefreshOperatingPointDisplay(); + + return 0; +} + + int SCH_EDITOR_CONTROL::ChangeLineMode( const TOOL_EVENT& aEvent ) { m_frame->eeconfig()->m_Drawing.line_mode = aEvent.Parameter(); @@ -2347,6 +2371,8 @@ void SCH_EDITOR_CONTROL::setTransitions() Go( &SCH_EDITOR_CONTROL::ToggleERCWarnings, EE_ACTIONS::toggleERCWarnings.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::ToggleERCErrors, EE_ACTIONS::toggleERCErrors.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::ToggleERCExclusions, EE_ACTIONS::toggleERCExclusions.MakeEvent() ); + Go( &SCH_EDITOR_CONTROL::ToggleOPVoltages, EE_ACTIONS::toggleOPVoltages.MakeEvent() ); + Go( &SCH_EDITOR_CONTROL::ToggleOPCurrents, EE_ACTIONS::toggleOPCurrents.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::ChangeLineMode, EE_ACTIONS::lineModeFree.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::ChangeLineMode, EE_ACTIONS::lineMode90.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::ChangeLineMode, EE_ACTIONS::lineMode45.MakeEvent() ); diff --git a/eeschema/tools/sch_editor_control.h b/eeschema/tools/sch_editor_control.h index 9af5be103d..e185f8a5e5 100644 --- a/eeschema/tools/sch_editor_control.h +++ b/eeschema/tools/sch_editor_control.h @@ -132,6 +132,8 @@ public: int ToggleERCWarnings( const TOOL_EVENT& aEvent ); int ToggleERCErrors( const TOOL_EVENT& aEvent ); int ToggleERCExclusions( const TOOL_EVENT& aEvent ); + int ToggleOPVoltages( const TOOL_EVENT& aEvent ); + int ToggleOPCurrents( const TOOL_EVENT& aEvent ); int ChangeLineMode( const TOOL_EVENT& aEvent ); int NextLineMode( const TOOL_EVENT& aEvent ); int ToggleAnnotateAuto( const TOOL_EVENT& aEvent ); diff --git a/include/gr_text.h b/include/gr_text.h index ed96009c64..843a035673 100644 --- a/include/gr_text.h +++ b/include/gr_text.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2009-2014 Jerry Jacobs - * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -71,6 +71,13 @@ int Clamp_Text_PenSize( int aPenSize, const VECTOR2I& aSize, bool aStrict = fals int GetPenSizeForBold( int aTextSize ); int GetPenSizeForBold( const wxSize& aTextSize ); +/** + * @param aTextSize the char size (height or width). + * @return the "best" value for a pen size to draw/plot a demibold text. + */ +int GetPenSizeForDemiBold( int aTextSize ); +int GetPenSizeForDemiBold( const wxSize& aTextSize ); + /** * @param aTextSize = the char size (height or width). * @return the "best" value for a pen size to draw/plot a non-bold text. diff --git a/include/layer_ids.h b/include/layer_ids.h index d89c103660..02b889e7c8 100644 --- a/include/layer_ids.h +++ b/include/layer_ids.h @@ -384,6 +384,8 @@ enum SCH_LAYER_ID: int LAYER_BUS_JUNCTION, LAYER_SCHEMATIC_AUX_ITEMS, LAYER_SCHEMATIC_ANCHOR, + LAYER_OP_VOLTAGES, + LAYER_OP_CURRENTS, SCH_LAYER_ID_END }; diff --git a/qa/data/eeschema/spice_netlists/potentiometers/potentiometers.kicad_pro b/qa/data/eeschema/spice_netlists/potentiometers/potentiometers.kicad_pro index af760ac99a..9e5b6db8b7 100644 --- a/qa/data/eeschema/spice_netlists/potentiometers/potentiometers.kicad_pro +++ b/qa/data/eeschema/spice_netlists/potentiometers/potentiometers.kicad_pro @@ -209,25 +209,30 @@ "rule_severities": { "bus_definition_conflict": "error", "bus_entry_needed": "error", - "bus_label_syntax": "error", "bus_to_bus_conflict": "error", "bus_to_net_conflict": "error", + "conflicting_netclasses": "error", "different_unit_footprint": "error", "different_unit_net": "error", "duplicate_reference": "error", "duplicate_sheet_names": "error", + "endpoint_off_grid": "warning", "extra_units": "error", "global_label_dangling": "warning", "hier_label_mismatch": "error", "label_dangling": "error", "lib_symbol_issues": "warning", + "missing_bidi_pin": "warning", + "missing_input_pin": "warning", + "missing_power_pin": "error", + "missing_unit": "warning", "multiple_net_names": "warning", "net_not_bus_member": "warning", "no_connect_connected": "warning", "no_connect_dangling": "warning", "pin_not_connected": "error", "pin_not_driven": "error", - "pin_to_pin": "warning", + "pin_to_pin": "error", "power_pin_not_driven": "error", "similar_labels": "warning", "simulation_model_issue": "error", @@ -298,6 +303,10 @@ "intersheets_ref_suffix": "", "junction_size_choice": 3, "label_size_ratio": 0.375, + "operating_point_overlay_i_precision": 3, + "operating_point_overlay_i_range": "~V", + "operating_point_overlay_v_precision": 3, + "operating_point_overlay_v_range": "~V", "pin_symbol_size": 25.0, "text_offset_ratio": 0.15 }, @@ -319,7 +328,9 @@ "page_layout_descr_file": "", "plot_directory": "", "spice_adjust_passive_values": false, + "spice_current_sheet_as_root": false, "spice_external_command": "spice \"%I\"", + "spice_model_current_sheet_as_root": true, "spice_save_all_currents": false, "spice_save_all_voltages": false, "subpart_first_id": 65,