Remove a few coverity warnings. Fix some comments which were incorrect, due to the changes in code. Remove not compiled code (kept as comments), now outdated or useless
legacy plugin: better compatibility with old brd files (current track width and current vias size, stored in SETUP section, were not read from file and incorrectly set)
This commit is contained in:
parent
2427b40271
commit
9004ed8801
|
@ -38,6 +38,9 @@ using namespace KIGFX;
|
|||
OPENGL_COMPOSITOR::OPENGL_COMPOSITOR() :
|
||||
m_initialized( false ), m_current( 0 ), m_currentFbo( DIRECT_RENDERING )
|
||||
{
|
||||
// Avoid not initialized members:
|
||||
m_framebuffer = 0;
|
||||
m_depthBuffer = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
|||
|
||||
case SCH_BUS_BUS_ENTRY_T:
|
||||
case SCH_BUS_WIRE_ENTRY_T:
|
||||
AddMenusForBusEntry( PopMenu, dynamic_cast<SCH_BUS_ENTRY_BASE*>( item ) );
|
||||
AddMenusForBusEntry( PopMenu, static_cast<SCH_BUS_ENTRY_BASE*>( item ) );
|
||||
break;
|
||||
|
||||
case SCH_MARKER_T:
|
||||
|
@ -854,6 +854,7 @@ void AddMenusForMarkers( wxMenu* aPopMenu, SCH_MARKER* aMarker, SCH_EDIT_FRAME*
|
|||
void AddMenusForBitmap( wxMenu* aPopMenu, SCH_BITMAP * aBitmap )
|
||||
{
|
||||
wxString msg;
|
||||
|
||||
if( aBitmap->GetFlags() == 0 )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move Image" ), g_Schematic_Hokeys_Descr,
|
||||
|
@ -884,6 +885,7 @@ void AddMenusForBitmap( wxMenu* aPopMenu, SCH_BITMAP * aBitmap )
|
|||
void AddMenusForBusEntry( wxMenu* aPopMenu, SCH_BUS_ENTRY_BASE* aBusEntry )
|
||||
{
|
||||
wxString msg;
|
||||
|
||||
if( !aBusEntry->GetFlags() )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move Bus Entry" ), g_Schematic_Hokeys_Descr,
|
||||
|
|
|
@ -47,6 +47,12 @@
|
|||
#define DEFAULT_SOLDERMASK_CLEARANCE 0.2
|
||||
#define DEFAULT_SOLDERMASK_MIN_WIDTH Millimeter2iu( 0.0 )
|
||||
|
||||
#define DEFAULT_CUSTOMTRACKWIDTH 0.2
|
||||
#define DEFAULT_TRACKMINWIDTH 0.2 // track width min value
|
||||
#define DEFAULT_VIASMINSIZE 0.4 // vias (not micro vias) min diameter
|
||||
#define DEFAULT_VIASMINDRILL 0.3 // vias (not micro vias) min drill diameter
|
||||
#define DEFAULT_MICROVIASMINSIZE 0.2 // micro vias (not vias) min diameter
|
||||
#define DEFAULT_MICROVIASMINDRILL 0.1 // micro vias (not vias) min drill diameter
|
||||
|
||||
/**
|
||||
* Struct VIA_DIMENSION
|
||||
|
|
|
@ -331,7 +331,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx
|
|||
bool aErase )
|
||||
{
|
||||
BASE_SCREEN* screen = aPanel->GetScreen();
|
||||
FOOTPRINT_EDIT_FRAME* moduleEditFrame = dynamic_cast<FOOTPRINT_EDIT_FRAME*>( aPanel->GetParent() );
|
||||
FOOTPRINT_EDIT_FRAME* moduleEditFrame = static_cast<FOOTPRINT_EDIT_FRAME*>( aPanel->GetParent() );
|
||||
|
||||
wxASSERT( moduleEditFrame );
|
||||
MODULE* currentModule = moduleEditFrame->GetBoard()->m_Modules;
|
||||
|
|
|
@ -94,11 +94,9 @@ BOARD::BOARD() :
|
|||
m_Layer[layer].m_type = LT_UNDEFINED;
|
||||
}
|
||||
|
||||
// Initialize default netclass.
|
||||
NETCLASSPTR defaultClass = m_designSettings.GetDefault();
|
||||
defaultClass->SetDescription( _( "This is the default net class." ) );
|
||||
|
||||
// Initialize default values in default netclass.
|
||||
defaultClass->SetParams( m_designSettings );
|
||||
m_designSettings.SetCurrentNetClass( defaultClass->GetName() );
|
||||
|
||||
// Set sensible initial values for custom track width & via size
|
||||
|
|
|
@ -69,12 +69,12 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
|
|||
Millimeter2iu( DEFAULT_TEXT_PCB_SIZE ) ); // current Pcb (not module) Text size
|
||||
|
||||
m_useCustomTrackVia = false;
|
||||
m_customTrackWidth = DMils2iu( 100 );
|
||||
m_TrackMinWidth = DMils2iu( 100 ); // track min value for width (min copper size value)
|
||||
m_ViasMinSize = DMils2iu( 350 ); // vias (not micro vias) min diameter
|
||||
m_ViasMinDrill = DMils2iu( 200 ); // vias (not micro vias) min drill diameter
|
||||
m_MicroViasMinSize = DMils2iu( 200 ); // micro vias (not vias) min diameter
|
||||
m_MicroViasMinDrill = DMils2iu( 50 ); // micro vias (not vias) min drill diameter
|
||||
m_customTrackWidth = Millimeter2iu( DEFAULT_CUSTOMTRACKWIDTH );
|
||||
m_TrackMinWidth = Millimeter2iu( DEFAULT_TRACKMINWIDTH ); // track min width
|
||||
m_ViasMinSize = Millimeter2iu( DEFAULT_VIASMINSIZE ); // via (not uvia) min diam
|
||||
m_ViasMinDrill = Millimeter2iu( DEFAULT_VIASMINDRILL ); // via (not uvia) min drill diam
|
||||
m_MicroViasMinSize = Millimeter2iu( DEFAULT_MICROVIASMINSIZE );// uvia (not via) min diam
|
||||
m_MicroViasMinDrill = Millimeter2iu( DEFAULT_MICROVIASMINDRILL );// uvia (not via) min drill diam
|
||||
|
||||
// Global mask margins:
|
||||
m_SolderMaskMargin = Millimeter2iu( DEFAULT_SOLDERMASK_CLEARANCE ); // Solder mask margin
|
||||
|
|
|
@ -40,9 +40,12 @@
|
|||
const wxChar NETCLASS::Default[] = wxT( "Default" );
|
||||
|
||||
// Initial values for netclass initialization
|
||||
const int NETCLASS::DEFAULT_CLEARANCE = DMils2iu( 100 ); // track to track and track to pads clearance
|
||||
const int NETCLASS::DEFAULT_VIA_DRILL = DMils2iu( 250 ); // default via drill
|
||||
const int NETCLASS::DEFAULT_UVIA_DRILL = DMils2iu( 50 ); // micro via drill
|
||||
const int NETCLASS::DEFAULT_CLEARANCE = Millimeter2iu( 0.2 ); // track to track and track to pads clearance
|
||||
const int NETCLASS::DEFAULT_VIA_DIAMETER = Millimeter2iu( 0.6 );
|
||||
const int NETCLASS::DEFAULT_VIA_DRILL = Millimeter2iu( 0.4 );
|
||||
const int NETCLASS::DEFAULT_UVIA_DIAMETER = Millimeter2iu( 0.3 );
|
||||
const int NETCLASS::DEFAULT_UVIA_DRILL = Millimeter2iu( 0.1 );
|
||||
const int NETCLASS::DEFAULT_TRACK_WIDTH = Millimeter2iu( 0.25 );
|
||||
|
||||
|
||||
NETCLASS::NETCLASS( const wxString& aName ) :
|
||||
|
@ -52,6 +55,11 @@ NETCLASS::NETCLASS( const wxString& aName ) :
|
|||
SetClearance( DEFAULT_CLEARANCE );
|
||||
SetViaDrill( DEFAULT_VIA_DRILL );
|
||||
SetuViaDrill( DEFAULT_UVIA_DRILL );
|
||||
// These defaults will be overwritten by SetParams,
|
||||
// from the board design parameters, later
|
||||
SetTrackWidth( DEFAULT_TRACK_WIDTH );
|
||||
SetViaDiameter( DEFAULT_VIA_DIAMETER );
|
||||
SetuViaDiameter( DEFAULT_UVIA_DIAMETER );
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,20 +74,6 @@ void NETCLASS::SetParams( const NETCLASS& aDefaults )
|
|||
}
|
||||
|
||||
|
||||
void NETCLASS::SetParams( const BOARD_DESIGN_SETTINGS& aSettings )
|
||||
{
|
||||
SetTrackWidth( aSettings.m_TrackMinWidth );
|
||||
SetViaDiameter( aSettings.m_ViasMinSize );
|
||||
SetuViaDiameter( aSettings.m_MicroViasMinSize );
|
||||
|
||||
// TODO: BOARD_DESIGN_SETTINGS may provide the following parameters - should it?
|
||||
// Use default values for next parameters:
|
||||
SetClearance( DEFAULT_CLEARANCE );
|
||||
SetViaDrill( DEFAULT_VIA_DRILL );
|
||||
SetuViaDrill( DEFAULT_UVIA_DRILL );
|
||||
}
|
||||
|
||||
|
||||
NETCLASS::~NETCLASS()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -58,6 +58,9 @@ private:
|
|||
static const int DEFAULT_CLEARANCE;
|
||||
static const int DEFAULT_VIA_DRILL;
|
||||
static const int DEFAULT_UVIA_DRILL;
|
||||
static const int DEFAULT_VIA_DIAMETER;
|
||||
static const int DEFAULT_UVIA_DIAMETER;
|
||||
static const int DEFAULT_TRACK_WIDTH;
|
||||
|
||||
protected:
|
||||
wxString m_Name; ///< Name of the net class
|
||||
|
@ -67,7 +70,7 @@ protected:
|
|||
|
||||
STRINGSET m_Members; ///< names of NET members of this class
|
||||
|
||||
/// The units on these parameters is Internal Units (1 decimil or 1 nm)
|
||||
/// The units on these parameters is Internal Units (1 nm)
|
||||
|
||||
int m_Clearance; ///< clearance when routing
|
||||
|
||||
|
@ -186,14 +189,6 @@ public:
|
|||
*/
|
||||
void SetParams( const NETCLASS& aDefaults );
|
||||
|
||||
/**
|
||||
* Function SetParams
|
||||
* will set all the parameters by copying them from board design settings.
|
||||
* @param aSettings is a BOARD_DESIGN_SETTINGS object to copy from. Clearance, via drill and
|
||||
* microvia drill values are taken from the defaults.
|
||||
*/
|
||||
void SetParams( const BOARD_DESIGN_SETTINGS& aSettings );
|
||||
|
||||
/**
|
||||
* Function Format
|
||||
* outputs the net class to \a aFormatter in s-expression form.
|
||||
|
|
|
@ -299,6 +299,8 @@ public:
|
|||
*/
|
||||
GENERAL_COLLECTOR()
|
||||
{
|
||||
m_Guide = NULL;
|
||||
m_PrimaryLength = 0;
|
||||
SetScanTypes( AllBoardItems );
|
||||
}
|
||||
|
||||
|
|
|
@ -45,14 +45,15 @@ DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE( wxWindow* aParent, BOARD_DESIGN_SE
|
|||
m_trackWidthText->SetSelection( -1, -1 );
|
||||
m_stdButtonsOK->SetDefault();
|
||||
|
||||
GetSizer()->SetSizeHints( this );
|
||||
Centre();
|
||||
|
||||
// Pressing ENTER when any of the text input fields is active applies changes
|
||||
#if wxCHECK_VERSION( 3, 0, 0 )
|
||||
Connect( wxEVT_TEXT_ENTER, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE::onOkClick ), NULL, this );
|
||||
#else
|
||||
Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE::onOkClick ), NULL, this );
|
||||
#endif
|
||||
|
||||
Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_TRACK_VIA_SIZE::onClose ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 6 2014)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -11,13 +11,14 @@
|
|||
|
||||
DIALOG_TRACK_VIA_SIZE_BASE::DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxSize( 280,240 ), wxDefaultSize );
|
||||
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
||||
|
||||
wxBoxSizer* bSizes;
|
||||
bSizes = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer1;
|
||||
fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizer1->AddGrowableCol( 1 );
|
||||
fgSizer1->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
@ -28,7 +29,7 @@ DIALOG_TRACK_VIA_SIZE_BASE::DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWind
|
|||
m_trackWidthText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_trackWidthText, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
m_trackWidthLabel = new wxStaticText( this, wxID_ANY, _("inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_trackWidthLabel = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_trackWidthLabel->Wrap( -1 );
|
||||
fgSizer1->Add( m_trackWidthLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
@ -39,7 +40,7 @@ DIALOG_TRACK_VIA_SIZE_BASE::DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWind
|
|||
m_viaDiameterText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_viaDiameterText, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_viaDiameterLabel = new wxStaticText( this, wxID_ANY, _("u"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_viaDiameterLabel = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_viaDiameterLabel->Wrap( -1 );
|
||||
fgSizer1->Add( m_viaDiameterLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
@ -50,7 +51,7 @@ DIALOG_TRACK_VIA_SIZE_BASE::DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWind
|
|||
m_viaDrillText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_viaDrillText, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_viaDrillLabel = new wxStaticText( this, wxID_ANY, _("u"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_viaDrillLabel = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_viaDrillLabel->Wrap( -1 );
|
||||
fgSizer1->Add( m_viaDrillLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
@ -69,7 +70,6 @@ DIALOG_TRACK_VIA_SIZE_BASE::DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWind
|
|||
|
||||
this->SetSizer( bSizes );
|
||||
this->Layout();
|
||||
bSizes->Fit( this );
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
|
|
|
@ -41,12 +41,12 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size">280,240</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="name">DIALOG_TRACK_VIA_SIZE_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="size">303,168</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass">; </property>
|
||||
<property name="title">Track width and via size</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
|
@ -100,7 +100,7 @@
|
|||
<object class="wxFlexGridSizer" expanded="1">
|
||||
<property name="cols">3</property>
|
||||
<property name="flexible_direction">wxBOTH</property>
|
||||
<property name="growablecols"></property>
|
||||
<property name="growablecols">1</property>
|
||||
<property name="growablerows"></property>
|
||||
<property name="hgap">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -315,7 +315,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">inch</property>
|
||||
<property name="label">unit</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -572,7 +572,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">u</property>
|
||||
<property name="label">unit</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -829,7 +829,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">u</property>
|
||||
<property name="label">unit</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -848,7 +848,6 @@
|
|||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 6 2014)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -54,7 +54,7 @@ class DIALOG_TRACK_VIA_SIZE_BASE : public wxDialog
|
|||
|
||||
public:
|
||||
|
||||
DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Track width and via size"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||
DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Track width and via size"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 303,168 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_TRACK_VIA_SIZE_BASE();
|
||||
|
||||
};
|
||||
|
|
|
@ -70,15 +70,21 @@ public:
|
|||
double m_Hole_Orient; // Hole rotation (= pad rotation) for oblong holes
|
||||
int m_Hole_Shape; // hole shape: round (0) or oval (1)
|
||||
wxPoint m_Hole_Pos; // hole position
|
||||
LAYER_ID m_Hole_Bottom_Layer; // hole starting layer (usually back layer)
|
||||
LAYER_ID m_Hole_Top_Layer; // hole ending layer (usually front layer):
|
||||
// m_Hole_First_Layer < m_Hole_Last_Layer
|
||||
LAYER_ID m_Hole_Bottom_Layer; // hole ending layer (usually back layer)
|
||||
LAYER_ID m_Hole_Top_Layer; // hole starting layer (usually front layer):
|
||||
// m_Hole_Top_Layer < m_Hole_Bottom_Layer
|
||||
bool m_Hole_NotPlated; // hole not plated. Must be in a specific drill file
|
||||
|
||||
public:
|
||||
HOLE_INFO()
|
||||
{
|
||||
m_Hole_NotPlated = false;
|
||||
m_Hole_Diameter = 0;
|
||||
m_Tool_Reference = 0;
|
||||
m_Hole_Orient = 0.0;
|
||||
m_Hole_Shape = 0;
|
||||
m_Hole_Bottom_Layer = B_Cu;
|
||||
m_Hole_Top_Layer = F_Cu;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -152,6 +158,7 @@ public:
|
|||
m_mirror = false;
|
||||
m_mergePTHNPTH = false;
|
||||
m_minimalHeader = false;
|
||||
m_ShortHeader = false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -536,23 +536,6 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const
|
|||
m_out->Print( aNestLevel, "(layers\n" );
|
||||
|
||||
// Save only the used copper layers from front to back.
|
||||
#if 0 // was:
|
||||
for( LAYER_NUM layer = LAST_COPPER_LAYER; layer >= FIRST_COPPER_LAYER; --layer)
|
||||
{
|
||||
LSET mask = GetLayerSet( layer );
|
||||
if( mask & aBoard->GetEnabledLayers() )
|
||||
{
|
||||
m_out->Print( aNestLevel+1, "(%d %s %s", layer,
|
||||
m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str(),
|
||||
LAYER::ShowType( aBoard->GetLayerType( layer ) ) );
|
||||
|
||||
if( !( aBoard->GetVisibleLayers() & mask ) )
|
||||
m_out->Print( 0, " hide" );
|
||||
|
||||
m_out->Print( 0, ")\n" );
|
||||
}
|
||||
}
|
||||
#else
|
||||
LSET visible_layers = aBoard->GetVisibleLayers();
|
||||
|
||||
for( LSEQ cu = aBoard->GetEnabledLayers().CuStack(); cu; ++cu )
|
||||
|
@ -568,26 +551,8 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const
|
|||
|
||||
m_out->Print( 0, ")\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Save used non-copper layers in the order they are defined.
|
||||
#if 0 // was:
|
||||
for( LAYER_NUM layer = FIRST_NON_COPPER_LAYER; layer <= LAST_NON_COPPER_LAYER; ++layer)
|
||||
{
|
||||
LAYER_MSK mask = GetLayerMask( layer );
|
||||
if( mask & aBoard->GetEnabledLayers() )
|
||||
{
|
||||
m_out->Print( aNestLevel+1, "(%d %s user", layer,
|
||||
m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str() );
|
||||
|
||||
if( !( aBoard->GetVisibleLayers() & mask ) )
|
||||
m_out->Print( 0, " hide" );
|
||||
|
||||
m_out->Print( 0, ")\n" );
|
||||
}
|
||||
}
|
||||
#else
|
||||
// desired sequence for non Cu BOARD layers.
|
||||
static const LAYER_ID non_cu[] = {
|
||||
B_Adhes, // 32
|
||||
|
@ -622,7 +587,6 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const
|
|||
|
||||
m_out->Print( 0, ")\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
m_out->Print( aNestLevel, ")\n\n" );
|
||||
|
||||
|
@ -985,15 +949,6 @@ void PCB_IO::format( EDGE_MODULE* aModuleDrawing, int aNestLevel ) const
|
|||
if( aModuleDrawing->GetWidth() != 0 )
|
||||
m_out->Print( 0, " (width %s)", FMT_IU( aModuleDrawing->GetWidth() ).c_str() );
|
||||
|
||||
/* 11-Nov-2021 remove if no one whines after a couple of months. Simple graphic items
|
||||
perhaps do not need these.
|
||||
if( aModuleDrawing->GetTimeStamp() )
|
||||
m_out->Print( 0, " (tstamp %lX)", aModuleDrawing->GetTimeStamp() );
|
||||
|
||||
if( aModuleDrawing->GetStatus() )
|
||||
m_out->Print( 0, " (status %X)", aModuleDrawing->GetStatus() );
|
||||
*/
|
||||
|
||||
m_out->Print( 0, ")\n" );
|
||||
}
|
||||
|
||||
|
|
|
@ -254,16 +254,6 @@ static inline char* ReadLine( LINE_READER* rdr, const char* caller )
|
|||
#endif
|
||||
|
||||
|
||||
/* corrected old junk, element 14 was wrong. can delete.
|
||||
// Look up Table for conversion copper layer count -> general copper layer mask:
|
||||
static const LEG_MASK all_cu_mask[] = {
|
||||
0x0001, 0x8001, 0x8003, 0x8007,
|
||||
0x800F, 0x801F, 0x803F, 0x807F,
|
||||
0x80FF, 0x81FF, 0x83FF, 0x87FF,
|
||||
0x8FFF, 0x9FFF, 0xBFFF, 0xFFFF
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
using namespace std; // auto_ptr
|
||||
|
||||
|
@ -951,6 +941,12 @@ void LEGACY_PLUGIN::loadSETUP()
|
|||
}
|
||||
}
|
||||
|
||||
else if( TESTLINE( "TrackWidth" ) )
|
||||
{
|
||||
BIU tmp = biuParse( line + SZ( "TrackWidth" ) );
|
||||
netclass_default->SetTrackWidth( tmp );
|
||||
}
|
||||
|
||||
else if( TESTLINE( "TrackWidthList" ) )
|
||||
{
|
||||
BIU tmp = biuParse( line + SZ( "TrackWidthList" ) );
|
||||
|
@ -1020,6 +1016,12 @@ void LEGACY_PLUGIN::loadSETUP()
|
|||
drill ) );
|
||||
}
|
||||
|
||||
else if( TESTLINE( "ViaSize" ) )
|
||||
{
|
||||
BIU tmp = biuParse( line + SZ( "ViaSize" ) );
|
||||
netclass_default->SetViaDiameter( tmp );
|
||||
}
|
||||
|
||||
else if( TESTLINE( "ViaDrill" ) )
|
||||
{
|
||||
BIU tmp = biuParse( line + SZ( "ViaDrill" ) );
|
||||
|
@ -1032,6 +1034,12 @@ void LEGACY_PLUGIN::loadSETUP()
|
|||
bds.m_ViasMinDrill = tmp;
|
||||
}
|
||||
|
||||
else if( TESTLINE( "MicroViaSize" ) )
|
||||
{
|
||||
BIU tmp = biuParse( line + SZ( "MicroViaSize" ) );
|
||||
netclass_default->SetuViaDiameter( tmp );
|
||||
}
|
||||
|
||||
else if( TESTLINE( "MicroViaDrill" ) )
|
||||
{
|
||||
BIU tmp = biuParse( line + SZ( "MicroViaDrill" ) );
|
||||
|
@ -1142,22 +1150,14 @@ void LEGACY_PLUGIN::loadSETUP()
|
|||
m_board->SetDesignSettings( bds );
|
||||
m_board->SetZoneSettings( zs );
|
||||
|
||||
// Until such time as the *.brd file does not have the
|
||||
// global parameters:
|
||||
// "TrackWidth", "TrackMinWidth", "ViaSize", "ViaDrill",
|
||||
// "ViaMinSize", and "TrackClearence", put those same global
|
||||
// values into the default NETCLASS until later board load
|
||||
// Very old *.brd file does not have NETCLASSes
|
||||
// "TrackWidth", "ViaSize", "ViaDrill", "ViaMinSize",
|
||||
// and "TrackClearence", were defined in SETUP
|
||||
// these values are put into the default NETCLASS until later board load
|
||||
// code should override them. *.brd files which have been
|
||||
// saved with knowledge of NETCLASSes will override these
|
||||
// defaults, old boards will not.
|
||||
//
|
||||
// @todo: I expect that at some point we can remove said global
|
||||
// parameters from the *.brd file since the ones in the
|
||||
// default netclass serve the same purpose. If needed
|
||||
// at all, the global defaults should go into a preferences
|
||||
// file instead so they are there to start new board
|
||||
// projects.
|
||||
m_board->GetDesignSettings().GetDefault()->SetParams( m_board->GetDesignSettings() );
|
||||
// defaults, very old boards (before 2009) will not and use the setup values.
|
||||
// However these values should be the same as default NETCLASS.
|
||||
|
||||
return; // preferred exit
|
||||
}
|
||||
|
|
|
@ -615,8 +615,8 @@ void PCB::GetBoardOutline( wxXmlDocument* aXmlDoc, wxString aActualConversion )
|
|||
m_boardOutline.Add( new wxRealPoint( x, y ) );
|
||||
}
|
||||
|
||||
|
||||
pNode = pNode->GetNext();
|
||||
if( pNode )
|
||||
pNode = pNode->GetNext();
|
||||
|
||||
if( pNode )
|
||||
{
|
||||
|
|
|
@ -87,7 +87,8 @@ void PCB_ARC::Parse( XNODE* aNode,
|
|||
&m_startX, &m_startY, aActualConversion );
|
||||
|
||||
// end point
|
||||
lNode = lNode->GetNext();
|
||||
if( lNode )
|
||||
lNode = lNode->GetNext();
|
||||
|
||||
if( lNode )
|
||||
SetPosition( lNode->GetNodeContent(), aDefaultMeasurementUnit,
|
||||
|
|
|
@ -1164,23 +1164,6 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR )
|
|||
|
||||
m_board->SetDesignSettings( designSettings );
|
||||
m_board->SetZoneSettings( zoneSettings );
|
||||
|
||||
// Until such time as the *.brd file does not have the
|
||||
// global parameters:
|
||||
// "last_trace_width", "trace_min_width", "via_size", "via_drill",
|
||||
// "via_min_size", and "via_clearance", put those same global
|
||||
// values into the default NETCLASS until later board load
|
||||
// code should override them. *.kicad_pcb files which have been
|
||||
// saved with knowledge of NETCLASSes will override these
|
||||
// defaults, old boards will not.
|
||||
//
|
||||
// @todo: I expect that at some point we can remove said global
|
||||
// parameters from the *.brd file since the ones in the
|
||||
// default netclass serve the same purpose. If needed
|
||||
// at all, the global defaults should go into a preferences
|
||||
// file instead so they are there to start new board
|
||||
// projects.
|
||||
defaultNetClass->SetParams( m_board->GetDesignSettings() );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue