2014-10-22 15:51:34 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2019-06-04 07:23:12 +00:00
|
|
|
* Copyright (C) 2009-2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
2023-07-09 11:19:43 +00:00
|
|
|
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
2014-10-22 15:51:34 +00:00
|
|
|
*
|
|
|
|
* 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 Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
2009-10-28 11:48:47 +00:00
|
|
|
|
2012-02-06 07:14:51 +00:00
|
|
|
#ifndef BOARD_DESIGN_SETTINGS_H_
|
|
|
|
#define BOARD_DESIGN_SETTINGS_H_
|
2009-10-28 11:48:47 +00:00
|
|
|
|
2021-06-06 19:03:10 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2018-01-30 14:34:09 +00:00
|
|
|
#include <netclass.h>
|
2022-08-14 11:03:18 +00:00
|
|
|
#include <project/net_settings.h>
|
2021-04-16 21:07:06 +00:00
|
|
|
#include <board_stackup_manager/board_stackup.h>
|
2020-09-15 19:13:45 +00:00
|
|
|
#include <drc/drc_engine.h>
|
2020-05-31 21:42:04 +00:00
|
|
|
#include <settings/nested_settings.h>
|
|
|
|
#include <widgets/ui_common.h>
|
|
|
|
#include <zone_settings.h>
|
2022-01-22 19:26:58 +00:00
|
|
|
#include <teardrop/teardrop_parameters.h>
|
2023-10-06 18:40:49 +00:00
|
|
|
#include <router/pns_meander.h>
|
2020-05-15 23:25:33 +00:00
|
|
|
|
2010-01-21 07:41:30 +00:00
|
|
|
|
2023-01-29 23:20:40 +00:00
|
|
|
#define DEFAULT_SILK_LINE_WIDTH 0.1
|
|
|
|
#define DEFAULT_COPPER_LINE_WIDTH 0.2
|
2018-08-24 20:08:30 +00:00
|
|
|
#define DEFAULT_EDGE_WIDTH 0.05
|
|
|
|
#define DEFAULT_COURTYARD_WIDTH 0.05
|
2018-04-28 15:22:25 +00:00
|
|
|
#define DEFAULT_LINE_WIDTH 0.10
|
|
|
|
|
|
|
|
#define DEFAULT_SILK_TEXT_SIZE 1.0
|
|
|
|
#define DEFAULT_COPPER_TEXT_SIZE 1.5
|
|
|
|
#define DEFAULT_TEXT_SIZE 1.0
|
|
|
|
|
2023-01-29 23:20:40 +00:00
|
|
|
#define DEFAULT_SILK_TEXT_WIDTH 0.1
|
2018-04-28 15:22:25 +00:00
|
|
|
#define DEFAULT_COPPER_TEXT_WIDTH 0.30
|
|
|
|
#define DEFAULT_TEXT_WIDTH 0.15
|
2015-03-02 15:59:03 +00:00
|
|
|
|
2021-08-22 22:05:47 +00:00
|
|
|
#define DEFAULT_DIMENSION_ARROW_LENGTH 50 // mils, for legacy purposes
|
|
|
|
#define DEFAULT_DIMENSION_EXTENSION_OFFSET 0.5
|
2020-09-12 00:36:43 +00:00
|
|
|
|
2015-03-02 15:59:03 +00:00
|
|
|
// Board thickness, mainly for 3D view:
|
2021-08-22 22:05:47 +00:00
|
|
|
#define DEFAULT_BOARD_THICKNESS_MM 1.6
|
2015-03-02 15:59:03 +00:00
|
|
|
|
2021-08-22 22:05:47 +00:00
|
|
|
#define DEFAULT_PCB_EDGE_THICKNESS 0.15
|
2015-03-02 15:59:03 +00:00
|
|
|
|
2020-06-05 14:06:03 +00:00
|
|
|
// soldermask to pad clearance. The default is 0 because usually board houses
|
2021-08-22 22:05:47 +00:00
|
|
|
// create a clearance depending on their fab process: mask material, color, price, etc.
|
|
|
|
#define DEFAULT_SOLDERMASK_EXPANSION 0.0
|
2020-03-12 19:05:08 +00:00
|
|
|
|
2021-08-22 22:05:47 +00:00
|
|
|
#define DEFAULT_SOLDERMASK_TO_COPPER_CLEARANCE 0.0
|
2020-03-12 19:05:08 +00:00
|
|
|
|
2021-08-22 22:05:47 +00:00
|
|
|
#define DEFAULT_SOLDERMASK_MIN_WIDTH 0.0
|
|
|
|
|
|
|
|
#define DEFAULT_SOLDERPASTE_CLEARANCE 0.0
|
|
|
|
#define DEFAULT_SOLDERPASTE_RATIO 0.0
|
2015-03-02 15:59:03 +00:00
|
|
|
|
2018-04-28 15:22:25 +00:00
|
|
|
#define DEFAULT_CUSTOMTRACKWIDTH 0.2
|
|
|
|
#define DEFAULT_CUSTOMDPAIRWIDTH 0.125
|
|
|
|
#define DEFAULT_CUSTOMDPAIRGAP 0.18
|
|
|
|
#define DEFAULT_CUSTOMDPAIRVIAGAP 0.18
|
|
|
|
|
2024-02-19 14:59:09 +00:00
|
|
|
#define DEFAULT_MEANDER_SPACING 0.6
|
|
|
|
#define DEFAULT_DP_MEANDER_SPACING 1.0
|
|
|
|
|
2020-05-04 21:05:30 +00:00
|
|
|
#define DEFAULT_MINCLEARANCE 0.0 // overall min clearance
|
2022-07-11 19:26:56 +00:00
|
|
|
#define DEFAULT_MINCONNECTION 0.0 // overall min connection width
|
2023-01-29 23:20:40 +00:00
|
|
|
#define DEFAULT_TRACKMINWIDTH 0.0 // track width min value
|
|
|
|
#define DEFAULT_VIASMINSIZE 0.5 // vias (not micro vias) min diameter
|
2020-05-04 21:05:30 +00:00
|
|
|
#define DEFAULT_MINTHROUGHDRILL 0.3 // through holes (not micro vias) min drill diameter
|
2018-04-28 15:22:25 +00:00
|
|
|
#define DEFAULT_MICROVIASMINSIZE 0.2 // micro vias (not vias) min diameter
|
|
|
|
#define DEFAULT_MICROVIASMINDRILL 0.1 // micro vias (not vias) min drill diameter
|
2020-11-29 22:01:40 +00:00
|
|
|
#define DEFAULT_HOLETOHOLEMIN 0.25 // minimum web thickness between two drilled holes
|
2021-12-08 23:12:33 +00:00
|
|
|
#define DEFAULT_HOLECLEARANCE 0.25 // copper-to-hole clearance (from IPC level A)
|
2015-03-02 15:59:03 +00:00
|
|
|
|
2023-02-25 01:43:28 +00:00
|
|
|
#define DEFAULT_COPPEREDGECLEARANCE 0.5 // clearance between copper items and edge cuts
|
2019-04-05 16:10:59 +00:00
|
|
|
#define LEGACY_COPPEREDGECLEARANCE -0.01 // A flag to indicate the legacy method (based
|
|
|
|
// on edge cut line thicknesses) should be used.
|
2020-10-12 13:10:50 +00:00
|
|
|
#define DEFAULT_SILKCLEARANCE 0.0
|
2019-04-05 16:10:59 +00:00
|
|
|
|
2021-08-09 10:10:09 +00:00
|
|
|
#define DEFAULT_MINRESOLVEDSPOKES 2 // Fewer resolved spokes indicates a starved thermal
|
|
|
|
|
2023-12-06 15:39:29 +00:00
|
|
|
#define MINIMUM_ERROR_SIZE_MM 0.001 // For arc approximation
|
|
|
|
#define MAXIMUM_ERROR_SIZE_MM 0.1 // For arc approximation
|
|
|
|
|
|
|
|
// Min/max values used in dialogs to validate settings
|
|
|
|
#define MINIMUM_LINE_WIDTH_MM 0.005 // minimal line width entered in a dialog
|
|
|
|
#define MAXIMUM_LINE_WIDTH_MM 100.0 // max line width entered in a dialog
|
2019-05-22 14:47:38 +00:00
|
|
|
|
2024-03-02 00:13:39 +00:00
|
|
|
// Default pad properies
|
|
|
|
#define DEFAULT_PAD_WIDTH_MM 2.54 // master pad width
|
|
|
|
#define DEFAULT_PAD_HEIGTH_MM 1.27 // master pad heigth
|
|
|
|
#define DEFAULT_PAD_DRILL_DIAMETER_MM 0.8 // master pad drill diameter for PTH
|
|
|
|
#define DEFAULT_PAD_REACT_RADIUS 15 // master pad corner radius in percent
|
2020-06-04 17:28:08 +00:00
|
|
|
|
2014-05-13 09:22:51 +00:00
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Container to handle a stock of specific vias each with unique diameter and drill sizes
|
|
|
|
* in the #BOARD class.
|
2014-05-13 09:22:51 +00:00
|
|
|
*/
|
|
|
|
struct VIA_DIMENSION
|
|
|
|
{
|
|
|
|
int m_Diameter; // <= 0 means use Netclass via diameter
|
|
|
|
int m_Drill; // <= 0 means use Netclass via drill
|
|
|
|
|
|
|
|
VIA_DIMENSION()
|
|
|
|
{
|
|
|
|
m_Diameter = 0;
|
|
|
|
m_Drill = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
VIA_DIMENSION( int aDiameter, int aDrill )
|
|
|
|
{
|
|
|
|
m_Diameter = aDiameter;
|
|
|
|
m_Drill = aDrill;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator==( const VIA_DIMENSION& aOther ) const
|
|
|
|
{
|
|
|
|
return ( m_Diameter == aOther.m_Diameter ) && ( m_Drill == aOther.m_Drill );
|
|
|
|
}
|
|
|
|
|
2024-01-01 18:37:31 +00:00
|
|
|
bool operator!=( const VIA_DIMENSION& aOther ) const { return !operator==( aOther ); }
|
|
|
|
|
2014-05-13 09:22:51 +00:00
|
|
|
bool operator<( const VIA_DIMENSION& aOther ) const
|
|
|
|
{
|
|
|
|
if( m_Diameter != aOther.m_Diameter )
|
|
|
|
return m_Diameter < aOther.m_Diameter;
|
|
|
|
|
|
|
|
return m_Drill < aOther.m_Drill;
|
|
|
|
}
|
|
|
|
};
|
2012-02-19 04:02:19 +00:00
|
|
|
|
2014-06-24 16:17:18 +00:00
|
|
|
|
2018-04-28 15:22:25 +00:00
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Container to handle a stock of specific differential pairs each with unique track width,
|
|
|
|
* gap and via gap.
|
2018-04-28 15:22:25 +00:00
|
|
|
*/
|
|
|
|
struct DIFF_PAIR_DIMENSION
|
|
|
|
{
|
|
|
|
int m_Width; // <= 0 means use Netclass differential pair width
|
|
|
|
int m_Gap; // <= 0 means use Netclass differential pair gap
|
|
|
|
int m_ViaGap; // <= 0 means use Netclass differential pair via gap
|
|
|
|
|
|
|
|
DIFF_PAIR_DIMENSION()
|
|
|
|
{
|
|
|
|
m_Width = 0;
|
|
|
|
m_Gap = 0;
|
|
|
|
m_ViaGap = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
DIFF_PAIR_DIMENSION( int aWidth, int aGap, int aViaGap )
|
|
|
|
{
|
|
|
|
m_Width = aWidth;
|
|
|
|
m_Gap = aGap;
|
|
|
|
m_ViaGap = aViaGap;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator==( const DIFF_PAIR_DIMENSION& aOther ) const
|
|
|
|
{
|
|
|
|
return ( m_Width == aOther.m_Width )
|
|
|
|
&& ( m_Gap == aOther.m_Gap )
|
|
|
|
&& ( m_ViaGap == aOther.m_ViaGap );
|
|
|
|
}
|
|
|
|
|
2024-01-01 18:37:31 +00:00
|
|
|
bool operator!=( const DIFF_PAIR_DIMENSION& aOther ) const { return !operator==( aOther ); }
|
|
|
|
|
2018-04-28 15:22:25 +00:00
|
|
|
bool operator<( const DIFF_PAIR_DIMENSION& aOther ) const
|
|
|
|
{
|
|
|
|
if( m_Width != aOther.m_Width )
|
|
|
|
return m_Width < aOther.m_Width;
|
|
|
|
|
|
|
|
if( m_Gap != aOther.m_Gap )
|
|
|
|
return m_Gap < aOther.m_Gap;
|
|
|
|
|
|
|
|
return m_ViaGap < aOther.m_ViaGap;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
LAYER_CLASS_SILK = 0,
|
|
|
|
LAYER_CLASS_COPPER,
|
|
|
|
LAYER_CLASS_EDGES,
|
2018-08-24 20:08:30 +00:00
|
|
|
LAYER_CLASS_COURTYARD,
|
2020-05-01 16:24:01 +00:00
|
|
|
LAYER_CLASS_FAB,
|
2018-04-28 15:22:25 +00:00
|
|
|
LAYER_CLASS_OTHERS,
|
|
|
|
|
|
|
|
LAYER_CLASS_COUNT
|
|
|
|
};
|
|
|
|
|
2020-05-08 18:10:47 +00:00
|
|
|
|
|
|
|
struct TEXT_ITEM_INFO
|
|
|
|
{
|
|
|
|
wxString m_Text;
|
|
|
|
bool m_Visible;
|
|
|
|
int m_Layer;
|
|
|
|
|
|
|
|
TEXT_ITEM_INFO( const wxString& aText, bool aVisible, int aLayer )
|
|
|
|
{
|
|
|
|
m_Text = aText;
|
|
|
|
m_Visible = aVisible;
|
|
|
|
m_Layer = aLayer;
|
|
|
|
}
|
2024-01-01 18:37:31 +00:00
|
|
|
|
|
|
|
bool operator==( const TEXT_ITEM_INFO& aOther ) const
|
|
|
|
{
|
|
|
|
return m_Text.IsSameAs( aOther.m_Text )
|
|
|
|
&& ( m_Visible == aOther.m_Visible )
|
|
|
|
&& ( m_Layer == aOther.m_Layer );
|
|
|
|
}
|
2020-05-08 18:10:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-05-17 00:13:21 +00:00
|
|
|
// forward declaration from class_track.h
|
|
|
|
enum class VIATYPE : int;
|
2018-04-28 15:22:25 +00:00
|
|
|
|
2020-11-11 23:05:59 +00:00
|
|
|
// forward declarations from dimension.h
|
2020-09-12 00:36:43 +00:00
|
|
|
enum class DIM_UNITS_FORMAT : int;
|
|
|
|
enum class DIM_TEXT_POSITION : int;
|
|
|
|
enum class DIM_UNITS_MODE : int;
|
2023-03-05 13:27:22 +00:00
|
|
|
enum class DIM_PRECISION : int;
|
2020-09-12 00:36:43 +00:00
|
|
|
|
2021-06-06 19:03:10 +00:00
|
|
|
class PAD;
|
2020-05-15 23:25:33 +00:00
|
|
|
|
2012-02-19 04:02:19 +00:00
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Container for design settings for a #BOARD object.
|
2012-02-19 04:02:19 +00:00
|
|
|
*/
|
2020-05-31 21:42:04 +00:00
|
|
|
class BOARD_DESIGN_SETTINGS : public NESTED_SETTINGS
|
2009-10-28 11:48:47 +00:00
|
|
|
{
|
2015-01-30 18:42:46 +00:00
|
|
|
public:
|
2020-05-31 21:42:04 +00:00
|
|
|
BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
|
|
|
|
|
|
|
|
virtual ~BOARD_DESIGN_SETTINGS();
|
|
|
|
|
2024-01-01 18:37:31 +00:00
|
|
|
bool operator==( const BOARD_DESIGN_SETTINGS& aOther ) const;
|
|
|
|
bool operator!=( const BOARD_DESIGN_SETTINGS& aOther ) const
|
|
|
|
{
|
|
|
|
return !operator==( aOther );
|
|
|
|
}
|
|
|
|
|
2020-07-06 16:45:57 +00:00
|
|
|
BOARD_DESIGN_SETTINGS( const BOARD_DESIGN_SETTINGS& aOther);
|
|
|
|
|
2020-07-03 23:13:06 +00:00
|
|
|
BOARD_DESIGN_SETTINGS& operator=( const BOARD_DESIGN_SETTINGS& aOther );
|
|
|
|
|
2020-08-02 09:23:21 +00:00
|
|
|
bool LoadFromFile( const wxString& aDirectory = "" ) override;
|
2009-10-28 11:48:47 +00:00
|
|
|
|
2019-06-23 11:20:22 +00:00
|
|
|
BOARD_STACKUP& GetStackupDescriptor() { return m_stackup; }
|
2020-12-20 18:44:13 +00:00
|
|
|
const BOARD_STACKUP& GetStackupDescriptor() const { return m_stackup; }
|
2019-06-23 11:20:22 +00:00
|
|
|
|
2023-05-11 13:53:28 +00:00
|
|
|
TEARDROP_PARAMETERS_LIST* GetTeadropParamsList()
|
2022-01-22 19:26:58 +00:00
|
|
|
{
|
|
|
|
return &m_TeardropParamsList;
|
|
|
|
}
|
|
|
|
|
2020-12-14 13:33:51 +00:00
|
|
|
SEVERITY GetSeverity( int aDRCErrorCode );
|
2020-02-28 00:05:40 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Return true if the DRC error code's severity is SEVERITY_IGNORE.
|
2020-02-28 00:05:40 +00:00
|
|
|
*/
|
|
|
|
bool Ignore( int aDRCErrorCode );
|
|
|
|
|
2020-05-31 21:42:04 +00:00
|
|
|
ZONE_SETTINGS& GetDefaultZoneSettings()
|
|
|
|
{
|
|
|
|
return m_defaultZoneSettings;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetDefaultZoneSettings( const ZONE_SETTINGS& aSettings )
|
|
|
|
{
|
|
|
|
m_defaultZoneSettings = aSettings;
|
|
|
|
}
|
|
|
|
|
2014-05-13 09:22:51 +00:00
|
|
|
/**
|
|
|
|
* @return the current net class name.
|
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline const wxString& GetCurrentNetClassName() const
|
2014-05-15 08:51:08 +00:00
|
|
|
{
|
|
|
|
return m_currentNetClassName;
|
|
|
|
}
|
2014-05-13 09:22:51 +00:00
|
|
|
|
2014-06-03 14:09:27 +00:00
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Return true if netclass values should be used to obtain appropriate track width.
|
2014-06-03 14:09:27 +00:00
|
|
|
*/
|
|
|
|
inline bool UseNetClassTrack() const
|
|
|
|
{
|
|
|
|
return ( m_trackWidthIndex == 0 && !m_useCustomTrackVia );
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Return true if netclass values should be used to obtain appropriate via size.
|
2014-06-03 14:09:27 +00:00
|
|
|
*/
|
|
|
|
inline bool UseNetClassVia() const
|
|
|
|
{
|
|
|
|
return ( m_viaSizeIndex == 0 && !m_useCustomTrackVia );
|
|
|
|
}
|
|
|
|
|
2018-09-18 09:58:12 +00:00
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Return true if netclass values should be used to obtain appropriate diff pair dimensions.
|
2018-09-18 09:58:12 +00:00
|
|
|
*/
|
|
|
|
inline bool UseNetClassDiffPair() const
|
|
|
|
{
|
|
|
|
return ( m_diffPairIndex == 0 && !m_useCustomDiffPair );
|
|
|
|
}
|
|
|
|
|
2014-05-13 09:22:51 +00:00
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* @return the biggest clearance value found in NetClasses list.
|
2014-05-13 09:22:51 +00:00
|
|
|
*/
|
2021-03-05 14:09:24 +00:00
|
|
|
int GetBiggestClearanceValue() const;
|
2014-05-13 09:22:51 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* @return the smallest clearance value found in NetClasses list.
|
2014-05-13 09:22:51 +00:00
|
|
|
*/
|
2021-03-05 14:09:24 +00:00
|
|
|
int GetSmallestClearanceValue() const;
|
2014-05-13 09:22:51 +00:00
|
|
|
|
2014-05-13 09:22:51 +00:00
|
|
|
/**
|
|
|
|
* @return the current track width list index.
|
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline unsigned GetTrackWidthIndex() const { return m_trackWidthIndex; }
|
2014-05-13 09:22:51 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Set the current track width list index to \a aIndex.
|
2014-05-13 09:22:51 +00:00
|
|
|
*
|
|
|
|
* @param aIndex is the track width list index.
|
|
|
|
*/
|
|
|
|
void SetTrackWidthIndex( unsigned aIndex );
|
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* @return the current track width according to the selected options
|
2014-05-13 09:22:51 +00:00
|
|
|
* ( using the default netclass value or a preset/custom value )
|
|
|
|
* the default netclass is always in m_TrackWidthList[0]
|
|
|
|
*/
|
2020-10-10 23:50:56 +00:00
|
|
|
int GetCurrentTrackWidth() const;
|
2014-05-13 09:22:51 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Sets custom width for track (i.e. not available in netclasses or preset list).
|
|
|
|
*
|
|
|
|
* To have it returned with GetCurrentTrackWidth() you need to enable custom track &
|
|
|
|
* via sizes with #UseCustomTrackViaSize().
|
|
|
|
*
|
2014-05-13 09:22:51 +00:00
|
|
|
* @param aWidth is the new track width.
|
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline void SetCustomTrackWidth( int aWidth )
|
2014-05-13 09:22:51 +00:00
|
|
|
{
|
|
|
|
m_customTrackWidth = aWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Current custom width for a track.
|
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline int GetCustomTrackWidth() const
|
2014-05-13 09:22:51 +00:00
|
|
|
{
|
|
|
|
return m_customTrackWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return the current via size list index.
|
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline unsigned GetViaSizeIndex() const
|
|
|
|
{
|
|
|
|
return m_viaSizeIndex;
|
|
|
|
}
|
2014-05-13 09:22:51 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Set the current via size list index to \a aIndex.
|
2014-05-13 09:22:51 +00:00
|
|
|
*
|
|
|
|
* @param aIndex is the via size list index.
|
|
|
|
*/
|
|
|
|
void SetViaSizeIndex( unsigned aIndex );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return the current via size, according to the selected options
|
|
|
|
* ( using the default netclass value or a preset/custom value )
|
|
|
|
* the default netclass is always in m_TrackWidthList[0]
|
|
|
|
*/
|
2020-10-10 23:50:56 +00:00
|
|
|
int GetCurrentViaSize() const;
|
2014-05-13 09:22:51 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Set custom size for via diameter (i.e. not available in netclasses or preset list).
|
|
|
|
*
|
|
|
|
* To have it returned with GetCurrentViaSize() you need to enable custom track & via sizes
|
|
|
|
* with #UseCustomTrackViaSize().
|
|
|
|
*
|
2014-05-13 09:22:51 +00:00
|
|
|
* @param aSize is the new drill diameter.
|
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline void SetCustomViaSize( int aSize )
|
2014-05-13 09:22:51 +00:00
|
|
|
{
|
|
|
|
m_customViaSize.m_Diameter = aSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Current custom size for the via diameter.
|
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline int GetCustomViaSize() const
|
2014-05-13 09:22:51 +00:00
|
|
|
{
|
|
|
|
return m_customViaSize.m_Diameter;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return the current via size, according to the selected options
|
|
|
|
* ( using the default netclass value or a preset/custom value )
|
2020-12-18 14:04:03 +00:00
|
|
|
* the default netclass is always in m_TrackWidthList[0].
|
2014-05-13 09:22:51 +00:00
|
|
|
*/
|
|
|
|
int GetCurrentViaDrill() const;
|
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Sets custom size for via drill (i.e. not available in netclasses or preset list).
|
|
|
|
*
|
|
|
|
* To have it returned with GetCurrentViaDrill() you need to enable custom track & via
|
|
|
|
* sizes with #UseCustomTrackViaSize().
|
|
|
|
*
|
2014-05-13 09:22:51 +00:00
|
|
|
* @param aDrill is the new drill size.
|
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline void SetCustomViaDrill( int aDrill )
|
2014-05-13 09:22:51 +00:00
|
|
|
{
|
|
|
|
m_customViaSize.m_Drill = aDrill;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Current custom size for the via drill.
|
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline int GetCustomViaDrill() const
|
2014-05-13 09:22:51 +00:00
|
|
|
{
|
|
|
|
return m_customViaSize.m_Drill;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Enables/disables custom track/via size settings.
|
|
|
|
*
|
|
|
|
* If enabled, values set with #SetCustomTrackWidth(), #SetCustomViaSize(),
|
|
|
|
* and #SetCustomViaDrill() are used for newly created tracks and vias.
|
|
|
|
*
|
2014-05-13 09:22:51 +00:00
|
|
|
* @param aEnabled decides if custom settings should be used for new tracks/vias.
|
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline void UseCustomTrackViaSize( bool aEnabled )
|
2014-05-13 09:22:51 +00:00
|
|
|
{
|
|
|
|
m_useCustomTrackVia = aEnabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return True if custom sizes of tracks & vias are enabled, false otherwise.
|
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline bool UseCustomTrackViaSize() const
|
2014-05-13 09:22:51 +00:00
|
|
|
{
|
|
|
|
return m_useCustomTrackVia;
|
|
|
|
}
|
|
|
|
|
2018-04-14 14:58:01 +00:00
|
|
|
/**
|
2018-04-28 15:22:25 +00:00
|
|
|
* @return the current diff pair dimension list index.
|
|
|
|
*/
|
|
|
|
inline unsigned GetDiffPairIndex() const { return m_diffPairIndex; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param aIndex is the diff pair dimensions list index to set.
|
|
|
|
*/
|
|
|
|
void SetDiffPairIndex( unsigned aIndex );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets custom track width for differential pairs (i.e. not available in netclasses or
|
|
|
|
* preset list).
|
2020-12-18 14:04:03 +00:00
|
|
|
*
|
2018-04-28 15:22:25 +00:00
|
|
|
* @param aDrill is the new track wdith.
|
|
|
|
*/
|
|
|
|
inline void SetCustomDiffPairWidth( int aWidth )
|
|
|
|
{
|
|
|
|
m_customDiffPair.m_Width = aWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Current custom track width for differential pairs.
|
2018-04-14 14:58:01 +00:00
|
|
|
*/
|
2018-04-28 15:22:25 +00:00
|
|
|
inline int GetCustomDiffPairWidth()
|
|
|
|
{
|
|
|
|
return m_customDiffPair.m_Width;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets custom gap for differential pairs (i.e. not available in netclasses or preset
|
|
|
|
* list).
|
|
|
|
* @param aGap is the new gap.
|
|
|
|
*/
|
|
|
|
inline void SetCustomDiffPairGap( int aGap )
|
|
|
|
{
|
|
|
|
m_customDiffPair.m_Gap = aGap;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetCustomDiffPairGap
|
|
|
|
* @return Current custom gap width for differential pairs.
|
|
|
|
*/
|
|
|
|
inline int GetCustomDiffPairGap()
|
|
|
|
{
|
|
|
|
return m_customDiffPair.m_Gap;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets custom via gap for differential pairs (i.e. not available in netclasses or
|
|
|
|
* preset list).
|
2020-12-18 14:04:03 +00:00
|
|
|
*
|
2018-04-28 15:22:25 +00:00
|
|
|
* @param aGap is the new gap. Specify 0 to use the DiffPairGap for vias as well.
|
|
|
|
*/
|
|
|
|
inline void SetCustomDiffPairViaGap( int aGap )
|
|
|
|
{
|
|
|
|
m_customDiffPair.m_ViaGap = aGap;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Current custom via gap width for differential pairs.
|
|
|
|
*/
|
|
|
|
inline int GetCustomDiffPairViaGap()
|
|
|
|
{
|
|
|
|
return m_customDiffPair.m_ViaGap > 0 ? m_customDiffPair.m_ViaGap : m_customDiffPair.m_Gap;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enables/disables custom differential pair dimensions.
|
2020-12-18 14:04:03 +00:00
|
|
|
*
|
2018-04-28 15:22:25 +00:00
|
|
|
* @param aEnabled decides if custom settings should be used for new differential pairs.
|
|
|
|
*/
|
|
|
|
inline void UseCustomDiffPairDimensions( bool aEnabled )
|
|
|
|
{
|
|
|
|
m_useCustomDiffPair = aEnabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return True if custom sizes of diff pairs are enabled, false otherwise.
|
|
|
|
*/
|
|
|
|
inline bool UseCustomDiffPairDimensions() const
|
|
|
|
{
|
|
|
|
return m_useCustomDiffPair;
|
|
|
|
}
|
2018-04-14 14:58:01 +00:00
|
|
|
|
2018-09-18 19:37:00 +00:00
|
|
|
/**
|
|
|
|
* @return the current diff pair track width, according to the selected options
|
|
|
|
* ( using the default netclass value or a preset/custom value )
|
|
|
|
*/
|
2021-03-05 15:30:12 +00:00
|
|
|
int GetCurrentDiffPairWidth() const;
|
2018-09-18 19:37:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return the current diff pair gap, according to the selected options
|
|
|
|
* ( using the default netclass value or a preset/custom value )
|
|
|
|
*/
|
2021-03-05 15:30:12 +00:00
|
|
|
int GetCurrentDiffPairGap() const;
|
2018-09-18 19:37:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return the current diff pair via gap, according to the selected options
|
|
|
|
* ( using the default netclass value or a preset/custom value )
|
2020-12-18 14:04:03 +00:00
|
|
|
* the default netclass is always in m_DiffPairDimensionsList[0].
|
2018-09-18 19:37:00 +00:00
|
|
|
*/
|
2021-03-05 15:30:12 +00:00
|
|
|
int GetCurrentDiffPairViaGap() const;
|
2018-09-18 19:37:00 +00:00
|
|
|
|
2009-10-28 11:48:47 +00:00
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Return a bit-mask of all the layers that are enabled.
|
|
|
|
*
|
|
|
|
* @return the enabled layers in bit-mapped form.
|
2009-10-28 11:48:47 +00:00
|
|
|
*/
|
2014-06-24 16:17:18 +00:00
|
|
|
inline LSET GetEnabledLayers() const
|
2009-10-28 11:48:47 +00:00
|
|
|
{
|
2014-05-13 09:22:51 +00:00
|
|
|
return m_enabledLayers;
|
2009-10-28 11:48:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Change the bit-mask of enabled layers to \a aMask.
|
|
|
|
*
|
|
|
|
* @param aMask = The new bit-mask of enabled layers.
|
2009-10-28 11:48:47 +00:00
|
|
|
*/
|
2014-06-24 16:17:18 +00:00
|
|
|
void SetEnabledLayers( LSET aMask );
|
2009-10-28 11:48:47 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Test whether a given layer \a aLayerId is enabled.
|
|
|
|
*
|
|
|
|
* @param aLayerId The layer to be tested.
|
|
|
|
* @return true if the layer is enabled.
|
2009-10-28 11:48:47 +00:00
|
|
|
*/
|
2017-03-13 03:19:33 +00:00
|
|
|
inline bool IsLayerEnabled( PCB_LAYER_ID aLayerId ) const
|
2009-10-28 11:48:47 +00:00
|
|
|
{
|
2020-11-17 09:23:44 +00:00
|
|
|
if( aLayerId >= 0 && aLayerId < PCB_LAYER_ID_COUNT )
|
|
|
|
return m_enabledLayers[aLayerId];
|
|
|
|
|
|
|
|
return false;
|
2009-10-28 11:48:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* @return the number of enabled copper layers.
|
2009-10-28 11:48:47 +00:00
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline int GetCopperLayerCount() const
|
2009-10-28 11:48:47 +00:00
|
|
|
{
|
2014-05-13 09:22:51 +00:00
|
|
|
return m_copperLayerCount;
|
2009-10-28 11:48:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Set the copper layer count to \a aNewLayerCount.
|
|
|
|
*
|
|
|
|
* @param aNewLayerCount The new number of enabled copper layers.
|
2009-10-28 11:48:47 +00:00
|
|
|
*/
|
|
|
|
void SetCopperLayerCount( int aNewLayerCount );
|
|
|
|
|
2021-12-03 14:14:50 +00:00
|
|
|
/**
|
|
|
|
* The full thickness of the board including copper and masks.
|
|
|
|
* @return
|
|
|
|
*/
|
2014-06-03 14:09:27 +00:00
|
|
|
inline int GetBoardThickness() const { return m_boardThickness; }
|
|
|
|
inline void SetBoardThickness( int aThickness ) { m_boardThickness = aThickness; }
|
2012-06-09 17:00:13 +00:00
|
|
|
|
2020-06-04 17:28:08 +00:00
|
|
|
/*
|
2020-12-18 14:04:03 +00:00
|
|
|
* Return an epsilon which accounts for rounding errors, etc.
|
|
|
|
*
|
|
|
|
* While currently an advanced cfg, going through this API allows us to easily change
|
|
|
|
* it to board-specific if so desired.
|
2020-06-04 17:28:08 +00:00
|
|
|
*/
|
2020-09-02 22:15:30 +00:00
|
|
|
int GetDRCEpsilon() const;
|
2020-06-04 17:28:08 +00:00
|
|
|
|
2020-09-03 14:58:49 +00:00
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Pad & via drills are finish size.
|
|
|
|
*
|
|
|
|
* Adding the hole plating thickness gives you the actual hole size.
|
2020-09-03 14:58:49 +00:00
|
|
|
*/
|
|
|
|
int GetHolePlatingThickness() const;
|
|
|
|
|
2018-04-28 15:22:25 +00:00
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Return the default graphic segment thickness from the layer class for the given layer.
|
2018-04-28 15:22:25 +00:00
|
|
|
*/
|
|
|
|
int GetLineThickness( PCB_LAYER_ID aLayer ) const;
|
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Return the default text size from the layer class for the given layer.
|
2018-04-28 15:22:25 +00:00
|
|
|
*/
|
2023-02-19 03:40:07 +00:00
|
|
|
VECTOR2I GetTextSize( PCB_LAYER_ID aLayer ) const;
|
2018-04-28 15:22:25 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-18 14:04:03 +00:00
|
|
|
* Return the default text thickness from the layer class for the given layer.
|
2018-04-28 15:22:25 +00:00
|
|
|
*/
|
|
|
|
int GetTextThickness( PCB_LAYER_ID aLayer ) const;
|
|
|
|
|
|
|
|
bool GetTextItalic( PCB_LAYER_ID aLayer ) const;
|
|
|
|
bool GetTextUpright( PCB_LAYER_ID aLayer ) const;
|
|
|
|
|
|
|
|
int GetLayerClass( PCB_LAYER_ID aLayer ) const;
|
2020-12-18 14:04:03 +00:00
|
|
|
|
2021-12-29 21:30:11 +00:00
|
|
|
void SetAuxOrigin( const VECTOR2I& aOrigin ) { m_auxOrigin = aOrigin; }
|
|
|
|
const VECTOR2I& GetAuxOrigin() { return m_auxOrigin; }
|
2021-11-09 03:36:40 +00:00
|
|
|
|
2021-12-29 21:30:11 +00:00
|
|
|
void SetGridOrigin( const VECTOR2I& aOrigin ) { m_gridOrigin = aOrigin; }
|
|
|
|
const VECTOR2I& GetGridOrigin() { return m_gridOrigin; }
|
2021-11-09 03:36:40 +00:00
|
|
|
|
2024-03-02 00:13:39 +00:00
|
|
|
void SetDefaultMasterPad();
|
|
|
|
|
2020-12-18 14:04:03 +00:00
|
|
|
private:
|
|
|
|
void initFromOther( const BOARD_DESIGN_SETTINGS& aOther );
|
|
|
|
|
|
|
|
bool migrateSchema0to1();
|
|
|
|
|
|
|
|
public:
|
|
|
|
// Note: the first value in each dimensions list is the current netclass value
|
|
|
|
std::vector<int> m_TrackWidthList;
|
|
|
|
std::vector<VIA_DIMENSION> m_ViasDimensionsList;
|
|
|
|
std::vector<DIFF_PAIR_DIMENSION> m_DiffPairDimensionsList;
|
|
|
|
|
2022-01-22 19:26:58 +00:00
|
|
|
/** The parameters of teardrops for the different teardrop targets (via/pad, track end)
|
|
|
|
* 3 set of parameters always exist: for round shapes, for rect shapes, for track ends
|
|
|
|
*/
|
|
|
|
TEARDROP_PARAMETERS_LIST m_TeardropParamsList;
|
|
|
|
|
2024-01-30 12:45:37 +00:00
|
|
|
PNS::MEANDER_SETTINGS m_SingleTrackMeanderSettings;
|
|
|
|
PNS::MEANDER_SETTINGS m_DiffPairMeanderSettings;
|
|
|
|
PNS::MEANDER_SETTINGS m_SkewMeanderSettings;
|
2023-10-06 18:40:49 +00:00
|
|
|
|
2020-12-18 14:04:03 +00:00
|
|
|
VIATYPE m_CurrentViaType; ///< (VIA_BLIND_BURIED, VIA_THROUGH, VIA_MICROVIA)
|
|
|
|
|
|
|
|
bool m_UseConnectedTrackWidth; // use width of existing track when creating a new,
|
|
|
|
// connected track
|
2021-12-15 15:48:34 +00:00
|
|
|
bool m_TempOverrideTrackWidth; // use selected track width temporarily even when
|
|
|
|
// using connected track width
|
2020-12-18 14:04:03 +00:00
|
|
|
int m_MinClearance; // overall min clearance
|
2022-07-11 19:26:56 +00:00
|
|
|
int m_MinConn; // overall min connection width
|
2020-12-18 14:04:03 +00:00
|
|
|
int m_TrackMinWidth; // overall min track width
|
2021-06-26 09:11:22 +00:00
|
|
|
int m_ViasMinAnnularWidth; // overall minimum width of the via copper ring
|
2020-12-18 14:04:03 +00:00
|
|
|
int m_ViasMinSize; // overall vias (not micro vias) min diameter
|
|
|
|
int m_MinThroughDrill; // through hole (not micro vias) min drill diameter
|
|
|
|
int m_MicroViasMinSize; // micro vias min diameter
|
|
|
|
int m_MicroViasMinDrill; // micro vias min drill diameter
|
|
|
|
int m_CopperEdgeClearance;
|
|
|
|
int m_HoleClearance; // Hole to copper clearance
|
|
|
|
int m_HoleToHoleMin; // Min width of web between two drilled holes
|
2021-08-09 10:10:09 +00:00
|
|
|
int m_SilkClearance; // Min dist between two silk items
|
|
|
|
int m_MinResolvedSpokes; // Min spoke count to not be a starved thermal
|
2021-07-11 15:12:28 +00:00
|
|
|
int m_MinSilkTextHeight; // Min text height for silkscreen layers
|
|
|
|
int m_MinSilkTextThickness; // Min text thickness for silkscreen layers
|
2020-12-18 14:04:03 +00:00
|
|
|
|
2024-01-29 15:59:28 +00:00
|
|
|
std::shared_ptr<DRC_ENGINE> m_DRCEngine;
|
|
|
|
std::map<int, SEVERITY> m_DRCSeverities; // Map from DRCErrorCode to SEVERITY
|
|
|
|
std::set<wxString> m_DrcExclusions; // Serialized excluded DRC markers
|
|
|
|
std::map<wxString, wxString> m_DrcExclusionComments; // Map from serialization to comment
|
2020-12-18 14:04:03 +00:00
|
|
|
|
|
|
|
// When smoothing the zone's outline there's the question of external fillets (that is, those
|
|
|
|
// applied to concave corners). While it seems safer to never have copper extend outside the
|
|
|
|
// zone outline, 5.1.x and prior did indeed fill them so we leave the mode available.
|
|
|
|
bool m_ZoneKeepExternalFillets;
|
|
|
|
|
|
|
|
// Maximum error allowed when approximating circles and arcs to segments
|
|
|
|
int m_MaxError;
|
|
|
|
|
|
|
|
// Global mask margins:
|
2021-08-22 22:05:47 +00:00
|
|
|
int m_SolderMaskExpansion; // Solder mask inflation around the pad or via
|
|
|
|
int m_SolderMaskMinWidth; // Solder mask min width (2 areas closer than this
|
|
|
|
// width are merged)
|
|
|
|
int m_SolderMaskToCopperClearance; // Min distance allowed from copper to a mask
|
|
|
|
// aperture of another net
|
|
|
|
|
|
|
|
int m_SolderPasteMargin; // Solder paste margin absolute value
|
|
|
|
double m_SolderPasteMarginRatio; // Solder mask margin ratio value of pad size
|
|
|
|
// The final margin is the sum of these 2 values
|
2022-08-14 21:53:20 +00:00
|
|
|
bool m_AllowSoldermaskBridgesInFPs;
|
2024-06-09 22:28:19 +00:00
|
|
|
bool m_TentViasFront; // The default tenting option if not overridden on an
|
|
|
|
bool m_TentViasBack; // individual via
|
2020-12-18 14:04:03 +00:00
|
|
|
|
2022-08-14 11:03:18 +00:00
|
|
|
std::shared_ptr<NET_SETTINGS> m_NetSettings;
|
|
|
|
|
2020-12-18 14:04:03 +00:00
|
|
|
// Variables used in footprint editing (default value in item/footprint creation)
|
2022-08-14 11:03:18 +00:00
|
|
|
std::vector<TEXT_ITEM_INFO> m_DefaultFPTextItems;
|
2020-12-18 14:04:03 +00:00
|
|
|
|
|
|
|
// Arrays of default values for the various layer classes.
|
|
|
|
int m_LineThickness[ LAYER_CLASS_COUNT ];
|
2023-02-19 03:40:07 +00:00
|
|
|
VECTOR2I m_TextSize[LAYER_CLASS_COUNT];
|
2020-12-18 14:04:03 +00:00
|
|
|
int m_TextThickness[ LAYER_CLASS_COUNT ];
|
|
|
|
bool m_TextItalic[ LAYER_CLASS_COUNT ];
|
|
|
|
bool m_TextUpright[ LAYER_CLASS_COUNT ];
|
|
|
|
|
|
|
|
// Default values for dimension objects
|
|
|
|
DIM_UNITS_MODE m_DimensionUnitsMode;
|
2023-03-05 13:27:22 +00:00
|
|
|
DIM_PRECISION m_DimensionPrecision; ///< Number of digits after the decimal
|
2020-12-18 14:04:03 +00:00
|
|
|
DIM_UNITS_FORMAT m_DimensionUnitsFormat;
|
|
|
|
bool m_DimensionSuppressZeroes;
|
|
|
|
DIM_TEXT_POSITION m_DimensionTextPosition;
|
|
|
|
bool m_DimensionKeepTextAligned;
|
|
|
|
int m_DimensionArrowLength;
|
|
|
|
int m_DimensionExtensionOffset;
|
|
|
|
|
2023-10-02 21:10:13 +00:00
|
|
|
bool m_StyleFPFields;
|
|
|
|
bool m_StyleFPText;
|
|
|
|
bool m_StyleFPShapes;
|
|
|
|
|
2020-12-18 14:04:03 +00:00
|
|
|
// Miscellaneous
|
2021-06-06 19:03:10 +00:00
|
|
|
std::unique_ptr<PAD> m_Pad_Master; // A dummy pad to store all default parameters
|
|
|
|
// when importing values or creating a new pad
|
2020-12-18 14:04:03 +00:00
|
|
|
|
|
|
|
// Set to true if the board has a stackup management.
|
|
|
|
// If not set a default basic stackup will be used to generate the gbrjob file.
|
|
|
|
// Could be removed later, or at least always set to true
|
|
|
|
bool m_HasStackup;
|
|
|
|
|
2021-05-11 02:11:58 +00:00
|
|
|
/// Enable inclusion of stackup height in track length measurements and length tuning
|
|
|
|
bool m_UseHeightForLengthCalcs;
|
|
|
|
|
2020-12-18 14:04:03 +00:00
|
|
|
private:
|
2021-12-29 21:30:11 +00:00
|
|
|
VECTOR2I m_auxOrigin; ///< origin for plot exports
|
|
|
|
VECTOR2I m_gridOrigin; ///< origin for grid offsets
|
2021-11-09 03:36:40 +00:00
|
|
|
|
2020-12-18 14:04:03 +00:00
|
|
|
// Indices into the trackWidth, viaSizes and diffPairDimensions lists.
|
|
|
|
// The 0 index is always the current netclass value(s)
|
|
|
|
unsigned m_trackWidthIndex;
|
|
|
|
unsigned m_viaSizeIndex;
|
|
|
|
unsigned m_diffPairIndex;
|
|
|
|
|
|
|
|
// Custom values for track/via sizes (specified via dialog instead of netclass or lists)
|
|
|
|
bool m_useCustomTrackVia;
|
|
|
|
int m_customTrackWidth;
|
|
|
|
VIA_DIMENSION m_customViaSize;
|
|
|
|
|
|
|
|
// Custom values for differential pairs (specified via dialog instead of netclass/lists)
|
|
|
|
bool m_useCustomDiffPair;
|
|
|
|
DIFF_PAIR_DIMENSION m_customDiffPair;
|
|
|
|
|
|
|
|
int m_copperLayerCount; ///< Number of copper layers for this design
|
|
|
|
|
|
|
|
LSET m_enabledLayers; ///< Bit-mask for layer enabling
|
|
|
|
|
|
|
|
int m_boardThickness; ///< Board thickness for 3D viewer
|
|
|
|
|
|
|
|
/// Current net class name used to display netclass info.
|
|
|
|
/// This is also the last used netclass after starting a track.
|
|
|
|
wxString m_currentNetClassName;
|
|
|
|
|
|
|
|
/** the description of layers stackup, for board fabrication
|
|
|
|
* only physical layers are in layers stackup.
|
|
|
|
* It includes not only layers enabled for the board edition, but also dielectric layers
|
|
|
|
*/
|
|
|
|
BOARD_STACKUP m_stackup;
|
|
|
|
|
|
|
|
/// The default settings that will be used for new zones
|
|
|
|
ZONE_SETTINGS m_defaultZoneSettings;
|
2009-10-28 11:48:47 +00:00
|
|
|
};
|
2009-11-04 19:08:08 +00:00
|
|
|
|
2012-02-06 07:14:51 +00:00
|
|
|
#endif // BOARD_DESIGN_SETTINGS_H_
|