Commit fe10a993 authored by charras's avatar charras

Removed global default clearance, track size and vias drill. Use netclasses values only.

parent dbc736b3
......@@ -4,6 +4,29 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with
email address.
2009-oct-20 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
Replace component library editor draw item dialog box.
* Created new component library editor draw item dialog box with
wxFormBuilder.
* Removed previous DialogBlocks version of the draw item dialog box.
* Removed some additional global variables used in component library
editor.
* Add IsFillable() method to draw item base object.
wxWidgets 2.9 string fixes and other minor updates.
* Replace all known instances of (const wxChar*) casts to GetChars() for
wxWidgets 2.9 compatibility.
* Cleaned up get component dialog so last part gets saved on wild card
selections.
* Remove redundant schematic component drawing code.
* Added SCH_COMPONENT constructor to create new component from library
component object.
* Add message panel helpers to WinEDA_DrawFrame and update old message
panel access code.
* Using library viewer to add component to schematic now respects unit
and body style selection.
2009-oct-14 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
Fix save last grid size and other minor updates.
......
......@@ -526,6 +526,21 @@ bool EDA_Rect::Intersects( const EDA_Rect aRect ) const
}
/**************************************************/
EDA_Rect& EDA_Rect::Inflate( int aDelta )
/**************************************************/
/** Function Inflate
* Inflate "this": move each horizontal edgeand each vertical edge by aDelta
* toward rect outside
* if aDelta is negative, move toward rect inside (deflate)
* Works for positive and negative rect size
*
*/
{
Inflate( aDelta, aDelta );
}
/**************************************************/
EDA_Rect& EDA_Rect::Inflate( wxCoord dx, wxCoord dy )
/**************************************************/
......
......@@ -12,7 +12,7 @@ may choose to document this corresponding work in the CHANGELOG.txt file.
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 1992-2008 Jean-Pierre Charras, jean-pierre.charras@inpg.fr
* Copyright (C) 1992-2008 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr
* Copyright (C) 1992-2008 Kicad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
......
......@@ -207,8 +207,22 @@ public:
*/
operator wxRect() const { return wxRect( m_Pos, m_Size ); }
/** Inflate
* Inflate this object: move each horizontal edge by dx and each vertical edge by dy
* toward rect outside
* if dx and/or dy is negative, move toward rect inside (deflate)
* Works for positive and negative rect size
*/
EDA_Rect& Inflate( wxCoord dx, wxCoord dy );
/** Inflate
* Inflate this object: move each horizontal edge and each vertical edge by aDelta
* toward rect outside
* if aDelta is negative, move toward rect inside (deflate)
* Works for positive and negative rect size
*/
EDA_Rect& Inflate( int aDelta );
/** Function Merge
* Modify Position and Size of this in order to contain the given rect
* mainly used to calculate bounding boxes
......
......@@ -224,7 +224,8 @@ class NETCLASS;
/**
* Class BOARD_CONNECTED_ITEM
* This is a base class derived from BOARD_ITEM for items that can be connected
* mainly: tracks and pads
* and have a net, a netname, a clearance ...
* mainly: tracks, pads and zones
* Handle connection info
*/
class BOARD_CONNECTED_ITEM : public BOARD_ITEM
......@@ -248,7 +249,7 @@ public:
* @return int - the net code.
*/
int GetNet() const;
void SetNet( int aNetCode );
virtual void SetNet( int aNetCode );
/**
* Function GetSubNet
......@@ -289,6 +290,10 @@ public:
};
/*
* class BOARD_ITEM_LIST
* Handles a collection of BOARD_ITEM elements
*/
class BOARD_ITEM_LIST : public BOARD_ITEM
{
typedef boost::ptr_vector<BOARD_ITEM> ITEM_ARRAY;
......
......@@ -7,7 +7,7 @@
#include "base_struct.h"
#include "class_base_screen.h"
#include "board_item_struct.h"
#include "class_board_item.h"
// Definitions relatives aux libariries
#define ENTETE_LIBRAIRIE "PCBNEW-LibModule-V1"
......@@ -187,9 +187,7 @@ class EDA_BoardDesignSettings
{
public:
int m_CopperLayerCount; // Number of copper layers for this design
int m_ViaDrill; // via drill (for the entire board)
int m_ViaDrillCustomValue; // via drill for vias which must have a defined drill value
int m_MicroViaDrill; // micro via drill (for the entire board)
int m_ViaDrillCustomValue; // via drill for vias that have a specific drill value
int m_CurrentViaSize; // Current via size
int m_CurrentMicroViaSize; // Current micro via size
bool m_MicroViasAllowed; // true to allow micro vias
......@@ -200,10 +198,11 @@ public:
int m_EdgeSegmentWidth; // current graphic line width (EDGE layer only)
int m_PcbTextWidth; // current Pcb (not module) Text width
wxSize m_PcbTextSize; // current Pcb (not module) Text size
int m_TrackClearance; // track to track and track to pads clearance
int m_TrackMinWidth; // track min value for width ((min copper size value
int m_ViasMinSize; // vias (not micro vias) min diameter
int m_ViasMinDrill; // vias (not micro vias) min drill diameter
int m_MicroViasMinSize; // micro vias (not vias) min diameter
int m_MicroViasMinDrill; // micro vias (not vias) min drill diameter
int m_MaskMargin; // Solder mask margin
int m_LayerThickness; // Layer Thickness for 3D viewer
......
......@@ -87,6 +87,15 @@ public:
void InstallConfigFrame( const wxPoint& pos );
void Process_Config( wxCommandEvent& event );
void Update_config( wxWindow* displayframe );
/** Function Read_Config
* Read the project configuration file
* @param projectFileName = the config filename
* if not found use kicad.pro
* if not found : initialize default values
* @return true if the current config is modified, false if no change
*/
bool Read_Config( const wxString& projectFileName );
void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct );
bool OnHotkeyDeleteItem( wxDC* DC, EDA_BaseStruct* DrawStruct );
......
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -127,6 +127,22 @@ BOARD::~BOARD()
return lists_sizes_modified;
}
/** function GetBiggestClearanceValue
* @return the biggest clerance value found in NetClasses list
*/
int BOARD::GetBiggestClearanceValue()
{
int clearance = m_NetClasses.GetDefault()->GetClearance();
//Read list of Net Classes
for( NETCLASSES::const_iterator nc = m_NetClasses.begin(); nc != m_NetClasses.end(); nc++ )
{
NETCLASS* netclass = nc->second;
clearance = MAX( clearance, netclass->GetClearance() );
}
return clearance;
}
wxString BOARD::GetLayerName( int aLayerIndex ) const
{
if( ! IsValidLayerIndex( aLayerIndex ))
......
......@@ -297,7 +297,7 @@ public:
bool SetLayerType( int aLayerIndex, LAYER_T aLayerType );
/* Routines de calcul des nombres de segments pistes et zones */
/* Functions to get some items count */
int GetNumSegmTrack();
int GetNumSegmZone();
unsigned GetNoconnectCount(); // retourne le nombre de connexions manquantes
......@@ -404,6 +404,7 @@ public:
*/
int ReturnSortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount );
/****** function relative to NetClasses: */
/**
* Function SynchronizeNetsAndNetClasses
* copies NETCLASS info to each NET, based on NET membership in a NETCLASS.
......@@ -425,6 +426,13 @@ public:
*/
bool SetCurrentNetClass( const wxString& aNetClassName );
/** function GetBiggestClearanceValue
* @return the biggest clerance value found in NetClasses list
*/
int GetBiggestClearanceValue();
/***************************************************************************/
/**
* Function Save
* writes the data structures for this object out to a FILE in "*.brd" format.
......@@ -714,6 +722,7 @@ public:
* @param aNetcode = netcode to analyse. if -1, analyse all nets
*/
void Test_Connections_To_Copper_Areas( int aNetcode = -1 );
};
#endif // #ifndef CLASS_BOARD_H
......@@ -111,6 +111,11 @@ int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const
}
/** return a pointer to the netclass of the zone
* if the net is not found (can happen when a netlist is reread,
* and the net name is not existant, return the default net class
* So should not return a null pointer
*/
NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const
{
// It is important that this be implemented without any sequential searching.
......@@ -118,33 +123,35 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const
BOARD* board = GetBoard();
// DO NOT use wxASSERT, because GetNetClass is called inside an OnPaint event
// and a call to wxASSERT can crash the application.
if( board )
if( board == NULL ) // Should not occurs
{
#ifdef __WXDEBUG__
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetNetClass(): NULL board, type %d"), Type() );
#endif
return NULL;
}
NETCLASS* netclass = NULL;
NETINFO_ITEM* net = board->FindNet( GetNet() );
if( net )
{
NETCLASS* netclass = net->GetNetClass();
netclass = net->GetNetClass();
#ifdef __WXDEBUG__
if( netclass == NULL )
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetNetClass(): NULL netclass") );
#endif
return netclass;
}
else
{
#ifdef __WXDEBUG__
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetNetClass(): NULL net") );
#endif
}
}
else
{
#ifdef __WXDEBUG__
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetNetClass(): NULL board, type %d"), Type() );
#endif
}
return NULL;
if( netclass )
return netclass;
else
return board->m_NetClasses.GetDefault();
}
/** function GetNetClassName
......
......@@ -782,7 +782,8 @@ EDA_Rect MODULE::GetBoundingBox()
// Add the Clearence shape size: (shape around the pads when the clearence is shown
// Not optimized, but the draw cost is small (perhaps smaller than optimization)
area.Inflate(g_DesignSettings.m_TrackClearance, g_DesignSettings.m_TrackClearance);
int biggest_clearance = GetBoard()->GetBiggestClearanceValue();
area.Inflate(biggest_clearance);
return area;
}
......
......@@ -33,6 +33,10 @@
// This will get mapped to "kicad_default" in the specctra_export.
const wxString NETCLASS::Default = wxT("Default");
// Initial values for netclass initialization
int NETCLASS::DEFAULT_CLEARANCE = 100; // track to track and track to pads clearance
int NETCLASS::DEFAULT_VIA_DRILL = 250; // default via drill
int NETCLASS::DEFAULT_UVIA_DRILL = 50; // micro via drill
NETCLASS::NETCLASS( BOARD* aParent, const wxString& aName, const NETCLASS* initialParameters ) :
......@@ -60,12 +64,13 @@ void NETCLASS::SetParams( const NETCLASS* defaults )
{
const EDA_BoardDesignSettings& g = g_DesignSettings;
SetClearance( g.m_TrackClearance );
SetTrackWidth( g.m_TrackMinWidth );
SetViaDiameter( g.m_ViasMinSize );
SetViaDrill( g.m_ViaDrill );
SetuViaDiameter(g.m_MicroViasMinSize );
SetuViaDrill( g.m_MicroViaDrill );
// Use default values for next parameters:
SetClearance( DEFAULT_CLEARANCE );
SetViaDrill( DEFAULT_VIA_DRILL );
SetuViaDrill( DEFAULT_UVIA_DRILL );
}
}
......
......@@ -37,8 +37,15 @@
* handles a collection of nets and the parameters used to route or
* test these nets.
*/
class NETCLASS
{
private:
// Default values used to init a NETCLASS
static int DEFAULT_CLEARANCE;
static int DEFAULT_VIA_DRILL;
static int DEFAULT_UVIA_DRILL;
protected:
BOARD* m_Parent;
......@@ -213,7 +220,7 @@ public:
/**
* Class NETCLASSES
* is a containter for NETCLASS instances. It owns all its NETCLASSes
* is a container for NETCLASS instances. It owns all its NETCLASSes
* (=> it will delete them at time of destruction). This container will always have
* a default NETCLASS with the name given by const NETCLASS::Default.
*/
......
......@@ -14,7 +14,8 @@
/*******************************************************************************************/
void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoint& offset )
void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode,
const wxPoint& offset )
/*******************************************************************************************/
/** Draw a pad:
......@@ -34,6 +35,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
wxPoint coord[4];
int fillpad = 0;
wxPoint shape_pos;
int mask_margin = 0; // margin (clearance) used for some non copper layers
if( m_Flags & DO_NOT_DRAW )
return;
......@@ -56,6 +58,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( color == 0 ) /* Not on copper layer */
{
// If the pad in on only one tech layer, use the layer color
// else use DARKGRAY
switch( m_Masque_Layer & ~ALL_CU_LAYERS )
{
case ADHESIVE_LAYER_CU:
......@@ -160,12 +164,26 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
}
}
// if Contrast mode and a technical layer active, show pads on this layer
// if Contrast mode is ON and a technical layer active, show pads on this layer
// so we can see pads on paste or solder layer
if( DisplayOpt.ContrastModeDisplay && screen->m_Active_Layer > LAST_COPPER_LAYER )
{
if( IsOnLayer( screen->m_Active_Layer ) )
{
color = g_DesignSettings.m_LayerColor[screen->m_Active_Layer];
// In hight contrast mode, and if the active layer is the mask layer
// shows the pad size with the mask clearance
switch( screen->m_Active_Layer )
{
case SOLDERMASK_N_CU:
case SOLDERMASK_N_CMP:
mask_margin = g_DesignSettings.m_MaskMargin;
break;
default:
break;
}
}
else
color = DARKDARKGRAY;
}
......@@ -191,8 +209,6 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
xc = ux0;
yc = uy0;
/* le trace depend de la rotation de l'empreinte */
dx = dx0 = m_Size.x >> 1;
dy = dy0 = m_Size.y >> 1; /* demi dim dx et dy */
......@@ -215,9 +231,9 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
{
case PAD_CIRCLE:
if( fillpad )
GRFilledCircle( &panel->m_ClipBox, DC, xc, yc, dx, 0, color, color );
GRFilledCircle( &panel->m_ClipBox, DC, xc, yc, dx + mask_margin, 0, color, color );
else
GRCircle( &panel->m_ClipBox, DC, xc, yc, dx, 0, color );
GRCircle( &panel->m_ClipBox, DC, xc, yc, dx + mask_margin, 0, color );
if( DisplayIsol )
{
......@@ -249,14 +265,16 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( fillpad )
{
GRFillCSegm( &panel->m_ClipBox, DC, ux0 + delta_cx, uy0 + delta_cy,
ux0 - delta_cx, uy0 - delta_cy,
GRFillCSegm( &panel->m_ClipBox, DC,
ux0 + delta_cx + mask_margin, uy0 + delta_cy + mask_margin,
ux0 - delta_cx - mask_margin, uy0 - delta_cy - mask_margin,
rotdx, color );
}
else
{
GRCSegm( &panel->m_ClipBox, DC, ux0 + delta_cx, uy0 + delta_cy,
ux0 - delta_cx, uy0 - delta_cy,
GRCSegm( &panel->m_ClipBox, DC,
ux0 + delta_cx + mask_margin, uy0 + delta_cy + mask_margin,
ux0 - delta_cx - mask_margin, uy0 - delta_cy - mask_margin,
rotdx, color );
}
......@@ -275,8 +293,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
case PAD_TRAPEZOID:
{
int ddx, ddy;
ddx = m_DeltaSize.x >> 1;
ddy = m_DeltaSize.y >> 1; /* demi dim dx et dy */
ddx = (m_DeltaSize.x >> 1) + mask_margin;
ddy = (m_DeltaSize.y >> 1) + mask_margin; /* demi dim dx et dy */
coord[0].x = -dx - ddy;
coord[0].y = +dy + ddx;
......@@ -301,8 +319,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( DisplayIsol )
{
dx += padClearance;
dy += padClearance;
dx += padClearance - mask_margin;
dy += padClearance - mask_margin;
coord[0].x = -dx - ddy;
coord[0].y = dy + ddx;
......
......@@ -108,7 +108,7 @@ TRACK* TRACK::Copy() const
/**
* Function GetDrillValue
* calculate the drill value for vias (m-Drill if > 0, or default drill value for the board
* calculate the drill value for vias (m_Drill if > 0, or default drill value for the Netclass
* @return real drill_value
*/
int TRACK::GetDrillValue() const
......@@ -116,25 +116,18 @@ int TRACK::GetDrillValue() const
if( Type() != TYPE_VIA )
return 0;
if( m_Drill >= 0 )
if( m_Drill > 0 ) // Use the specific value.
return m_Drill;
// Use the default value from the Netclass
NETCLASS* netclass = GetNetClass();
if( m_Shape == VIA_MICROVIA )
return g_DesignSettings.m_MicroViaDrill;
return netclass->GetuViaDrill();
return g_DesignSettings.m_ViaDrill;
return netclass->GetViaDrill();
}
/**
* Function GetLength
* returns the position of this object.
* @return the length of the track segment (0 for a via).
*/
double TRACK::GetLength()
{
wxPoint delta = m_End - m_Start;
return sqrt( ((double)delta.x*delta.x) + ((double)delta.y*delta.y ) );
}
/***********************/
bool TRACK::IsNull()
......
......@@ -96,12 +96,6 @@ public:
return m_Start; // it had to be start or end.
}
/**
* Function GetLength
* returns the position of this object.
* @return the length of the track segment (0 for a via).
*/
double GetLength();
EDA_Rect GetBoundingBox();
......
......@@ -22,7 +22,7 @@
/************************/
ZONE_CONTAINER::ZONE_CONTAINER( BOARD* parent ) :
BOARD_ITEM( parent, TYPE_ZONE_CONTAINER )
BOARD_CONNECTED_ITEM( parent, TYPE_ZONE_CONTAINER )
{
m_NetCode = -1; // Net number for fast comparisons
......@@ -42,6 +42,7 @@ ZONE_CONTAINER::~ZONE_CONTAINER()
}
/** virtual function GetPosition
* @return a wxPoint, position of the first point of the outline
*/
......@@ -71,21 +72,14 @@ void ZONE_CONTAINER::SetNet( int anet_code )
if( anet_code < 0 )
return;
if( m_Parent )
BOARD* board = GetBoard();
if( board )
{
BOARD* board = (BOARD*) m_Parent;
NETINFO_ITEM* net = board->FindNet( anet_code );
if( net )
m_Netname = net->GetNetname();
else
m_Netname.Empty();
// Set corresponding SEGZONE items if this zone uses fill areas by segments
for( SEGZONE* zseg = board->m_Zone; zseg; zseg = zseg->Next() )
{
if ( zseg->m_TimeStamp == m_TimeStamp )
zseg->SetNet(GetNet());
}
}
else
m_Netname.Empty();
......
......@@ -33,7 +33,7 @@ public:
* others polygons inside this main polygon are holes.
*/
class ZONE_CONTAINER : public BOARD_ITEM
class ZONE_CONTAINER : public BOARD_CONNECTED_ITEM
{
public:
wxString m_Netname; // Net Name
......@@ -60,10 +60,6 @@ public:
* in this case segments have m_ZoneMinThickness width
*/
private:
int m_NetCode; // Net number for fast comparisons
int m_ZoneSubnet; // variable used in rastnest computations:handle block number in zone connection calculations
public:
ZONE_CONTAINER( BOARD* parent );
~ZONE_CONTAINER();
......@@ -154,21 +150,7 @@ public:
return ( GetLayer() < FIRST_NO_COPPER_LAYER ) ? true : false;
}
/**
* Function GetZoneSubNet
* @return int - the sub net code in zone connections.
*/
int GetZoneSubNet() const { return m_ZoneSubnet; }
void SetZoneSubNet( int aSubNetCode ) { m_ZoneSubnet = aSubNetCode; }
int GetNet( void ) const
{
return m_NetCode;
}
void SetNet( int anet_code );
virtual void SetNet( int anet_code );
/**
* Function SetNetNameFromNetCode
......
......@@ -199,23 +199,22 @@ EDA_BoardDesignSettings::EDA_BoardDesignSettings()
};
m_CopperLayerCount = 2; // Default design is a double sided board
m_ViaDrill = 250; // defualt via drill (for the entire board)
m_ViaDrillCustomValue = 250; // via drill for vias which must have a defined drill value
m_CurrentViaSize = 450; // Current via size
m_CurrentViaType = VIA_THROUGH; // via type (VIA_BLIND_BURIED, VIA_THROUGH VIA_MICROVIA)
m_CurrentTrackWidth = 170; // current track width
m_UseConnectedTrackWidth = false; // if true, when creating a new track starting on an existing track, use this track width
m_MicroViaDrill = 50; // micro via drill (for the entire board)
m_CurrentMicroViaSize = 150; // Current micro via size
m_MicroViasAllowed = false; // true to allow micro vias
m_DrawSegmentWidth = 100; // current graphic line width (not EDGE layer)
m_EdgeSegmentWidth = 100; // current graphic line width (EDGE layer only)
m_PcbTextWidth = 100; // current Pcb (not module) Text width
m_PcbTextSize = wxSize( 500, 500 ); // current Pcb (not module) Text size
m_TrackClearance = 100; // track to track and track to pads clearance
m_TrackMinWidth = 80; // track min value for width ((min copper size value
m_ViasMinSize = 350; // vias (not micro vias) min diameter
m_ViasMinDrill = 200; // vias (not micro vias) min drill diameter
m_MicroViasMinSize = 200; // micro vias (not vias) min diameter
m_MicroViasMinDrill = 80; // micro vias (not vias) min drill diameter
m_MaskMargin = 150; // Solder mask margin
/* Color options for screen display of the Printed Board: */
......
......@@ -5,7 +5,7 @@
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2004-2009 Jean-Pierre Charras, jean-pierre.charras@inpg.fr
* Copyright (C) 2004-2009 Jean-Pierre Charras, jean-pierre.charras@gpisa-lab.inpg.fr
* Copyright (C) 2009 Dick Hollenbeck, dick@softplc.com
* Copyright (C) 2009 Kicad Developers, see change_log.txt for contributors.
*
......@@ -62,6 +62,7 @@ DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES( WinEDA_PcbFrame* parent ) :
/***********************************************************************************/
{
m_Parent = parent;
SetAutoLayout( true );
wxListItem column0;
wxListItem column1;
......@@ -87,7 +88,7 @@ DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES( WinEDA_PcbFrame* parent ) :
InitDialogRules();
SetAutoLayout( true );
Layout();
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
}
......@@ -161,11 +162,37 @@ void DIALOG_DESIGN_RULES::InitDialogRules()
}
InitializeRulesSelectionBoxes();
InitGlobalRules();
PrintCurrentSettings( );
}
// Sort comparison function
/*******************************************/
void DIALOG_DESIGN_RULES::InitGlobalRules()
/*******************************************/
{
AddUnitSymbol( *m_ViaMinTitle );
AddUnitSymbol( *m_ViaMinDrillTitle );
AddUnitSymbol( *m_MicroViaMinSizeTitle );
AddUnitSymbol( *m_MicroViaMinDrillTitle );
AddUnitSymbol( *m_TrackMinWidthTitle );
int Internal_Unit = m_Parent->m_InternalUnits;
PutValueInLocalUnits( *m_SetViasMinSizeCtrl, g_DesignSettings.m_ViasMinSize, Internal_Unit );
PutValueInLocalUnits( *m_SetViasMinDrillCtrl, g_DesignSettings.m_ViasMinDrill, Internal_Unit );
if( g_DesignSettings.m_CurrentViaType != VIA_THROUGH )
m_OptViaType->SetSelection( 1 );
m_AllowMicroViaCtrl->SetSelection( g_DesignSettings.m_MicroViasAllowed ? 1 : 0);
PutValueInLocalUnits( *m_SetMicroViasMinSizeCtrl, g_DesignSettings.m_MicroViasMinSize, Internal_Unit );
PutValueInLocalUnits( *m_SetMicroViasMinDrillCtrl, g_DesignSettings.m_MicroViasMinDrill, Internal_Unit );
PutValueInLocalUnits( *m_SetTrackMinWidthCtrl, g_DesignSettings.m_TrackMinWidth, Internal_Unit );
}
// Sort comparison function (helper for makePointers() )
static bool sortByClassThenName( NETCUP* a, NETCUP* b )
{
// return a < b
......@@ -404,6 +431,35 @@ void DIALOG_DESIGN_RULES::CopyRulesListToBoard()
m_Pcb->SynchronizeNetsAndNetClasses();
}
/*************************************************/
bool DIALOG_DESIGN_RULES::CopyGlobalRulesToBoard()
/*************************************************/
{
g_DesignSettings.m_CurrentViaType = VIA_THROUGH;
if( m_OptViaType->GetSelection() > 0 )
g_DesignSettings.m_CurrentViaType = VIA_BLIND_BURIED;
// Update vias minimum values for DRC
g_DesignSettings.m_ViasMinSize =
ReturnValueFromTextCtrl( *m_SetViasMinSizeCtrl, m_Parent->m_InternalUnits );
g_DesignSettings.m_ViasMinDrill =
ReturnValueFromTextCtrl( *m_SetViasMinDrillCtrl, m_Parent->m_InternalUnits );
g_DesignSettings.m_MicroViasAllowed = m_AllowMicroViaCtrl->GetSelection() == 1;
// Update microvias minimum values for DRC
g_DesignSettings.m_MicroViasMinSize =
ReturnValueFromTextCtrl( *m_SetMicroViasMinSizeCtrl, m_Parent->m_InternalUnits );
g_DesignSettings.m_MicroViasMinDrill =
ReturnValueFromTextCtrl( *m_SetMicroViasMinDrillCtrl, m_Parent->m_InternalUnits );
// Update tracks minimum values for DRC
g_DesignSettings.m_TrackMinWidth =
ReturnValueFromTextCtrl( *m_SetTrackMinWidthCtrl, m_Parent->m_InternalUnits );
return true;
}
/*****************************************************************/
void DIALOG_DESIGN_RULES::OnCancelButtonClick( wxCommandEvent& event )
......@@ -424,8 +480,11 @@ void DIALOG_DESIGN_RULES::OnOkButtonClick( wxCommandEvent& event )
}
CopyRulesListToBoard();
CopyGlobalRulesToBoard();
EndModal( wxID_OK );
m_Parent->AuxiliaryToolBar_Update_UI();
}
......@@ -458,19 +517,19 @@ void DIALOG_DESIGN_RULES::OnAddNetclassClick( wxCommandEvent& event )
m_grid->GetNumberRows() - 1,
class_name );
// Copy values of the previous class:
// Copy values of the default class:
int irow = m_grid->GetNumberRows() - 1;
for( int icol = 0; icol < m_grid->GetNumberCols(); icol++ )
{
wxString value;
value = m_grid->GetCellValue( irow - 1, icol );
value = m_grid->GetCellValue( 0, icol );
m_grid->SetCellValue( irow, icol, value );
}
InitializeRulesSelectionBoxes();
}
// Sort function for wxArrayInt. Itelms (ints) are sorted by decreasing value
// Sort function for wxArrayInt. Items (ints) are sorted by decreasing value
// used in DIALOG_DESIGN_RULES::OnRemoveNetclassClick
int sort_int(int *first, int *second)
{
......@@ -683,12 +742,17 @@ bool DIALOG_DESIGN_RULES::TestDataValidity()
wxString msg;
int minViaDrill = ReturnValueFromTextCtrl( *m_SetViasMinDrillCtrl, m_Parent->m_InternalUnits );
int minUViaDrill = ReturnValueFromTextCtrl( *m_SetMicroViasMinDrillCtrl, m_Parent->m_InternalUnits );
int minTrackWidth = ReturnValueFromTextCtrl( *m_SetTrackMinWidthCtrl, m_Parent->m_InternalUnits );
for( int row = 0; row < m_grid->GetNumberRows(); row++ )
{
int tracksize = ReturnValueFromString( g_UnitMetric,
m_grid->GetCellValue( row, GRID_TRACKSIZE ),
m_Parent->m_InternalUnits );
if( tracksize < g_DesignSettings.m_TrackMinWidth )
if( tracksize < minTrackWidth )
{
result = false;
msg.Printf( _( "%s: <b>Track Size</b> &lt; <b>Min Track Size</b><br>" ),
......@@ -714,7 +778,7 @@ bool DIALOG_DESIGN_RULES::TestDataValidity()
int viadrill = ReturnValueFromString( g_UnitMetric,
m_grid->GetCellValue( row, GRID_VIADRILL ),
m_Parent->m_InternalUnits );
if( viadrill && viadrill >= viadia )
if( viadrill >= viadia )
{
result = false;
msg.Printf( _( "%s: <b>Via Drill</b> &ge; <b>Via Dia</b><br>" ),
......@@ -723,6 +787,15 @@ bool DIALOG_DESIGN_RULES::TestDataValidity()
m_MessagesList->AppendToPage( msg );
}
if( viadrill < minViaDrill )
{
result = false;
msg.Printf( _( "%s: <b>Via Drill</b> &lt; <b>Min Via Drill</b><br>" ),
GetChars( m_grid->GetRowLabelValue(row)) );
m_MessagesList->AppendToPage( msg );
}
// Test Micro vias
int muviadia = ReturnValueFromString( g_UnitMetric,
m_grid->GetCellValue( row, GRID_uVIASIZE ),
......@@ -731,7 +804,7 @@ bool DIALOG_DESIGN_RULES::TestDataValidity()
if( muviadia < g_DesignSettings.m_MicroViasMinSize )
{
result = false;
msg.Printf( _( "%s: <b>MicroVia Diameter</b> &lt; <b>Minimun MicroVia Diameter</b><br>" ),
msg.Printf( _( "%s: <b>MicroVia Diameter</b> &lt; <b>MicroVia Min Diameter</b><br>" ),
GetChars( m_grid->GetRowLabelValue(row)) );
m_MessagesList->AppendToPage( msg );
......@@ -740,7 +813,7 @@ bool DIALOG_DESIGN_RULES::TestDataValidity()
int muviadrill = ReturnValueFromString( g_UnitMetric,
m_grid->GetCellValue( row, GRID_uVIADRILL ),
m_Parent->m_InternalUnits );
if( muviadrill && muviadrill >= muviadia )
if( muviadrill >= muviadia )
{
result = false;
msg.Printf( _( "%s: <b>MicroVia Drill</b> &ge; <b>MicroVia Dia</b><br>" ),
......@@ -748,6 +821,15 @@ bool DIALOG_DESIGN_RULES::TestDataValidity()
m_MessagesList->AppendToPage( msg );
}
if( muviadrill < minUViaDrill )
{
result = false;
msg.Printf( _( "%s: <b>MicroVia Drill</b> &ge; <b>MicroVia Min Drill</b><br>" ),
GetChars( m_grid->GetRowLabelValue(row)) );
m_MessagesList->AppendToPage( msg );
}
}
return result;
......
......@@ -58,9 +58,11 @@ private:
void OnRightSelectAllButton( wxCommandEvent& event );
bool TestDataValidity( );
void InitDialogRules();
void InitGlobalRules();
void InitRulesList();
void InitializeRulesSelectionBoxes();
void CopyRulesListToBoard();
bool CopyGlobalRulesToBoard();
void SetRoutableLayerStatus();
void FillListBoxWithNetNames( wxListCtrl* aListCtrl, const wxString& aNetClass );
void PrintCurrentSettings( );
......
......@@ -16,10 +16,15 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
m_DRnotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_LEFT );
m_panelNetClassesEditor = new wxPanel( m_DRnotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
wxBoxSizer* bpanelNetClassesSizer;
bpanelNetClassesSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizer1;
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Classes:") ), wxVERTICAL );
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_panelNetClassesEditor, wxID_ANY, _("Net Classes:") ), wxVERTICAL );
m_grid = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL );
m_grid = new wxGrid( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL );
// Grid
m_grid->CreateGrid( 1, 6 );
......@@ -64,56 +69,64 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
wxBoxSizer* buttonBoxSizer;
buttonBoxSizer = new wxBoxSizer( wxHORIZONTAL );
m_addButton = new wxButton( this, wxID_ADD_NETCLASS, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
m_addButton = new wxButton( m_panelNetClassesEditor, wxID_ADD_NETCLASS, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
m_addButton->SetToolTip( _("Add another Net Class") );
buttonBoxSizer->Add( m_addButton, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
m_removeButton = new wxButton( this, wxID_REMOVE_NETCLASS, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
m_removeButton->SetToolTip( _("Remove the currently select Net Class") );
m_removeButton = new wxButton( m_panelNetClassesEditor, wxID_REMOVE_NETCLASS, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
m_removeButton->SetToolTip( _("Remove the currently select Net Class\nThe default Net Class cannot be removed") );
buttonBoxSizer->Add( m_removeButton, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
m_moveUpButton = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
m_moveUpButton = new wxButton( m_panelNetClassesEditor, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
m_moveUpButton->SetToolTip( _("Move the currently selected Net Class up one row") );
buttonBoxSizer->Add( m_moveUpButton, 0, wxRIGHT|wxLEFT, 5 );
sbSizer1->Add( buttonBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
bMainSizer->Add( sbSizer1, 1, wxEXPAND|wxALL, 5 );
bpanelNetClassesSizer->Add( sbSizer1, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbSizer4;
sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Membership:") ), wxHORIZONTAL );
sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_panelNetClassesEditor, wxID_ANY, _("Membership:") ), wxHORIZONTAL );
wxBoxSizer* leftNetSelectBoxSizer;
leftNetSelectBoxSizer = new wxBoxSizer( wxVERTICAL );
wxArrayString m_leftClassChoiceChoices;
m_leftClassChoice = new wxChoice( this, ID_LEFT_CHOICE_CLICK, wxDefaultPosition, wxDefaultSize, m_leftClassChoiceChoices, 0 );
m_leftClassChoice = new wxChoice( m_panelNetClassesEditor, ID_LEFT_CHOICE_CLICK, wxDefaultPosition, wxDefaultSize, m_leftClassChoiceChoices, 0 );
m_leftClassChoice->SetSelection( 0 );
leftNetSelectBoxSizer->Add( m_leftClassChoice, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
leftNetSelectBoxSizer->Add( m_leftClassChoice, 0, wxEXPAND, 5 );
m_leftListCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VRULES|wxSUNKEN_BORDER );
m_leftListCtrl = new wxListCtrl( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VRULES|wxSUNKEN_BORDER );
m_leftListCtrl->SetMinSize( wxSize( 220,300 ) );
leftNetSelectBoxSizer->Add( m_leftListCtrl, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
leftNetSelectBoxSizer->Add( m_leftListCtrl, 1, wxEXPAND|wxTOP, 5 );
sbSizer4->Add( leftNetSelectBoxSizer, 1, wxALL|wxEXPAND, 5 );
wxBoxSizer* bmiddleSizerNetSelect;
bmiddleSizerNetSelect = new wxBoxSizer( wxVERTICAL );
m_buttonRightToLeft = new wxButton( this, ID_LEFT_TO_RIGHT_COPY, _("<<<"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonRightToLeft = new wxButton( m_panelNetClassesEditor, ID_LEFT_TO_RIGHT_COPY, _("<<<"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonRightToLeft->SetToolTip( _("Move the selected nets in the right list to the left list") );
bmiddleSizerNetSelect->Add( m_buttonRightToLeft, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonLeftToRight = new wxButton( this, ID_RIGHT_TO_LEFT_COPY, _(">>>"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonLeftToRight = new wxButton( m_panelNetClassesEditor, ID_RIGHT_TO_LEFT_COPY, _(">>>"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonLeftToRight->SetToolTip( _("Move the selected nets in the left list to the right list") );
bmiddleSizerNetSelect->Add( m_buttonLeftToRight, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonLeftSelAll = new wxButton( this, wxID_ANY, _("<< Select All"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonLeftSelAll = new wxButton( m_panelNetClassesEditor, wxID_ANY, _("<< Select All"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonLeftSelAll->SetToolTip( _("Select all nets in the left list") );
bmiddleSizerNetSelect->Add( m_buttonLeftSelAll, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonRightSelAll = new wxButton( this, wxID_ANY, _("Select All >>"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonRightSelAll = new wxButton( m_panelNetClassesEditor, wxID_ANY, _("Select All >>"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonRightSelAll->SetToolTip( _("Select all nets in the right list") );
bmiddleSizerNetSelect->Add( m_buttonRightSelAll, 0, wxALIGN_BOTTOM|wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
sbSizer4->Add( bmiddleSizerNetSelect, 0, wxALIGN_CENTER_VERTICAL, 5 );
......@@ -122,18 +135,133 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
rghtNetSelectBoxSizer = new wxBoxSizer( wxVERTICAL );
wxArrayString m_rightClassChoiceChoices;
m_rightClassChoice = new wxChoice( this, ID_RIGHT_CHOICE_CLICK, wxDefaultPosition, wxDefaultSize, m_rightClassChoiceChoices, 0 );
m_rightClassChoice = new wxChoice( m_panelNetClassesEditor, ID_RIGHT_CHOICE_CLICK, wxDefaultPosition, wxDefaultSize, m_rightClassChoiceChoices, 0 );
m_rightClassChoice->SetSelection( 0 );
rghtNetSelectBoxSizer->Add( m_rightClassChoice, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
rghtNetSelectBoxSizer->Add( m_rightClassChoice, 0, wxEXPAND, 5 );
m_rightListCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VRULES|wxSUNKEN_BORDER );
m_rightListCtrl = new wxListCtrl( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VRULES|wxSUNKEN_BORDER );
m_rightListCtrl->SetMinSize( wxSize( 220,-1 ) );
rghtNetSelectBoxSizer->Add( m_rightListCtrl, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
rghtNetSelectBoxSizer->Add( m_rightListCtrl, 1, wxEXPAND|wxTOP, 5 );
sbSizer4->Add( rghtNetSelectBoxSizer, 1, wxALL|wxEXPAND, 5 );
bMainSizer->Add( sbSizer4, 2, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bpanelNetClassesSizer->Add( sbSizer4, 2, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_panelNetClassesEditor->SetSizer( bpanelNetClassesSizer );
m_panelNetClassesEditor->Layout();
bpanelNetClassesSizer->Fit( m_panelNetClassesEditor );
m_DRnotebook->AddPage( m_panelNetClassesEditor, _("Net Classes Editor"), true );
m_panelGolbalDesignRules = new wxPanel( m_DRnotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
wxBoxSizer* bpanelGlobRulesSizer;
bpanelGlobRulesSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bDesignRulesUpperSizer;
bDesignRulesUpperSizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sbViasOptionSizer;
sbViasOptionSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Vias Options:") ), wxVERTICAL );
wxString m_OptViaTypeChoices[] = { _("Through via"), _("Blind or buried via") };
int m_OptViaTypeNChoices = sizeof( m_OptViaTypeChoices ) / sizeof( wxString );
m_OptViaType = new wxRadioBox( m_panelGolbalDesignRules, wxID_ANY, _("Default Via Type"), wxDefaultPosition, wxDefaultSize, m_OptViaTypeNChoices, m_OptViaTypeChoices, 1, wxRA_SPECIFY_COLS );
m_OptViaType->SetSelection( 0 );
m_OptViaType->SetToolTip( _("Select the current via type.\nTrough via is the usual selection") );
sbViasOptionSizer->Add( m_OptViaType, 0, wxALL|wxEXPAND, 5 );
wxFlexGridSizer* fgViasMinValuesSizer;
fgViasMinValuesSizer = new wxFlexGridSizer( 1, 2, 0, 0 );
fgViasMinValuesSizer->AddGrowableCol( 1 );
fgViasMinValuesSizer->SetFlexibleDirection( wxBOTH );
fgViasMinValuesSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_ViaMinTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Via Min Diameter"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaMinTitle->Wrap( -1 );
fgViasMinValuesSizer->Add( m_ViaMinTitle, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_SetViasMinSizeCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgViasMinValuesSizer->Add( m_SetViasMinSizeCtrl, 0, wxEXPAND|wxALL, 5 );
m_ViaMinDrillTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Via Min Drill"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaMinDrillTitle->Wrap( -1 );
fgViasMinValuesSizer->Add( m_ViaMinDrillTitle, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT, 5 );
m_SetViasMinDrillCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgViasMinValuesSizer->Add( m_SetViasMinDrillCtrl, 0, wxALL|wxEXPAND, 5 );
sbViasOptionSizer->Add( fgViasMinValuesSizer, 0, wxEXPAND, 5 );
bDesignRulesUpperSizer->Add( sbViasOptionSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
wxStaticBoxSizer* sbuViasSizer;
sbuViasSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Micro Vias Options:") ), wxVERTICAL );
wxString m_AllowMicroViaCtrlChoices[] = { _("Do not allow micro vias"), _("Allow micro vias") };
int m_AllowMicroViaCtrlNChoices = sizeof( m_AllowMicroViaCtrlChoices ) / sizeof( wxString );
m_AllowMicroViaCtrl = new wxRadioBox( m_panelGolbalDesignRules, wxID_ANY, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, m_AllowMicroViaCtrlNChoices, m_AllowMicroViaCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AllowMicroViaCtrl->SetSelection( 0 );
m_AllowMicroViaCtrl->SetToolTip( _("Allows or do not allow use of micro vias\nThey are very small vias only from an external copper layer to its near neightbour") );
sbuViasSizer->Add( m_AllowMicroViaCtrl, 0, wxALL|wxEXPAND, 5 );
wxFlexGridSizer* fgMinMicroviasValuesSizer;
fgMinMicroviasValuesSizer = new wxFlexGridSizer( 1, 2, 0, 0 );
fgMinMicroviasValuesSizer->AddGrowableCol( 1 );
fgMinMicroviasValuesSizer->SetFlexibleDirection( wxBOTH );
fgMinMicroviasValuesSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_MicroViaMinSizeTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("MicroVia Min Diameter"), wxDefaultPosition, wxDefaultSize, 0 );
m_MicroViaMinSizeTitle->Wrap( -1 );
fgMinMicroviasValuesSizer->Add( m_MicroViaMinSizeTitle, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_SetMicroViasMinSizeCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgMinMicroviasValuesSizer->Add( m_SetMicroViasMinSizeCtrl, 0, wxALL|wxEXPAND, 5 );
m_MicroViaMinDrillTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("MicroVia Min Drill"), wxDefaultPosition, wxDefaultSize, 0 );
m_MicroViaMinDrillTitle->Wrap( -1 );
fgMinMicroviasValuesSizer->Add( m_MicroViaMinDrillTitle, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_SetMicroViasMinDrillCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgMinMicroviasValuesSizer->Add( m_SetMicroViasMinDrillCtrl, 0, wxALL|wxEXPAND, 5 );
sbuViasSizer->Add( fgMinMicroviasValuesSizer, 1, wxEXPAND, 5 );
bDesignRulesUpperSizer->Add( sbuViasSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
wxStaticBoxSizer* sbMinSizesSizer;
sbMinSizesSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Minimal Values Allowed:") ), wxVERTICAL );
wxFlexGridSizer* fgMinValuesSizer;
fgMinValuesSizer = new wxFlexGridSizer( 1, 2, 0, 0 );
fgMinValuesSizer->AddGrowableCol( 1 );
fgMinValuesSizer->SetFlexibleDirection( wxBOTH );
fgMinValuesSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_TrackMinWidthTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Track Min Width"), wxDefaultPosition, wxDefaultSize, 0 );
m_TrackMinWidthTitle->Wrap( -1 );
fgMinValuesSizer->Add( m_TrackMinWidthTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_SetTrackMinWidthCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgMinValuesSizer->Add( m_SetTrackMinWidthCtrl, 0, wxALL, 5 );
sbMinSizesSizer->Add( fgMinValuesSizer, 0, 0, 5 );
bDesignRulesUpperSizer->Add( sbMinSizesSizer, 0, wxEXPAND, 5 );
bpanelGlobRulesSizer->Add( bDesignRulesUpperSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bDesignRulesLowerSizer;
bDesignRulesLowerSizer = new wxBoxSizer( wxHORIZONTAL );
bpanelGlobRulesSizer->Add( bDesignRulesLowerSizer, 1, wxEXPAND, 5 );
m_panelGolbalDesignRules->SetSizer( bpanelGlobRulesSizer );
m_panelGolbalDesignRules->Layout();
bpanelGlobRulesSizer->Fit( m_panelGolbalDesignRules );
m_DRnotebook->AddPage( m_panelGolbalDesignRules, _("Global Design Rules"), false );
bMainSizer->Add( m_DRnotebook, 1, wxEXPAND | wxALL, 5 );
wxStaticBoxSizer* sbSizer2;
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages:") ), wxHORIZONTAL );
......
......@@ -32,7 +32,7 @@
<property name="minimum_size">600,520</property>
<property name="name">DIALOG_DESIGN_RULES_BASE</property>
<property name="pos"></property>
<property name="size">750,692</property>
<property name="size">792,692</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">Design Rules Editor</property>
......@@ -77,7 +77,108 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="flag">wxEXPAND | wxALL</property>
<property name="proportion">1</property>
<object class="wxNotebook" expanded="1">
<property name="bg"></property>
<property name="bitmapsize"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_DRnotebook</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style">wxNB_LEFT</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnNotebookPageChanged"></event>
<event name="OnNotebookPageChanging"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="notebookpage" expanded="1">
<property name="bitmap"></property>
<property name="label">Net Classes Editor</property>
<property name="select">1</property>
<object class="wxPanel" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_panelNetClassesEditor</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxSUNKEN_BORDER|wxTAB_TRAVERSAL</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bpanelNetClassesSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
......@@ -281,7 +382,7 @@
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Remove the currently select Net Class</property>
<property name="tooltip">Remove the currently select Net Class&#x0A;The default Net Class cannot be removed</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -390,7 +491,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="1">
<property name="bg"></property>
......@@ -441,7 +542,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">1</property>
<object class="wxListCtrl" expanded="1">
<property name="bg"></property>
......@@ -541,7 +642,7 @@
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="tooltip">Move the selected nets in the right list to the left list</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -593,7 +694,7 @@
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="tooltip">Move the selected nets in the left list to the right list</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -645,7 +746,7 @@
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="tooltip">Select all nets in the left list</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -697,7 +798,7 @@
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="tooltip">Select all nets in the right list</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -740,7 +841,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="1">
<property name="bg"></property>
......@@ -791,7 +892,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">1</property>
<object class="wxListCtrl" expanded="1">
<property name="bg"></property>
......@@ -862,6 +963,821 @@
</object>
</object>
</object>
</object>
</object>
</object>
<object class="notebookpage" expanded="1">
<property name="bitmap"></property>
<property name="label">Global Design Rules</property>
<property name="select">0</property>
<object class="wxPanel" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_panelGolbalDesignRules</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxSUNKEN_BORDER|wxTAB_TRAVERSAL</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bpanelGlobRulesSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bDesignRulesUpperSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Vias Options:</property>
<property name="minimum_size"></property>
<property name="name">sbViasOptionSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Through via&quot; &quot;Blind or buried via&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Default Via Type</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_OptViaType</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip">Select the current via type.&#x0A;Trough via is the usual selection</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
<property name="name">fgViasMinValuesSizer</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">1</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Via Min Diameter</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ViaMinTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_SetViasMinSizeCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Via Min Drill</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ViaMinDrillTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_SetViasMinDrillCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Micro Vias Options:</property>
<property name="minimum_size"></property>
<property name="name">sbuViasSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Do not allow micro vias&quot; &quot;Allow micro vias&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Micro Vias:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_AllowMicroViaCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip">Allows or do not allow use of micro vias&#x0A;They are very small vias only from an external copper layer to its near neightbour</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
<property name="name">fgMinMicroviasValuesSizer</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">1</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">MicroVia Min Diameter</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_MicroViaMinSizeTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_SetMicroViasMinSizeCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">MicroVia Min Drill</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_MicroViaMinDrillTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_SetMicroViasMinDrillCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Minimal Values Allowed:</property>
<property name="minimum_size"></property>
<property name="name">sbMinSizesSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
<property name="name">fgMinValuesSizer</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">1</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Track Min Width</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_TrackMinWidthTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_SetTrackMinWidthCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bDesignRulesLowerSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
......
......@@ -21,6 +21,14 @@
#include <wx/statbox.h>
#include <wx/choice.h>
#include <wx/listctrl.h>
#include <wx/panel.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/radiobox.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/notebook.h>
#include <wx/html/htmlwin.h>
#include <wx/dialog.h>
......@@ -44,6 +52,8 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
ID_RIGHT_CHOICE_CLICK,
};
wxNotebook* m_DRnotebook;
wxPanel* m_panelNetClassesEditor;
wxGrid* m_grid;
wxButton* m_addButton;
wxButton* m_removeButton;
......@@ -56,6 +66,19 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
wxButton* m_buttonRightSelAll;
wxChoice* m_rightClassChoice;
wxListCtrl* m_rightListCtrl;
wxPanel* m_panelGolbalDesignRules;
wxRadioBox* m_OptViaType;
wxStaticText* m_ViaMinTitle;
wxTextCtrl* m_SetViasMinSizeCtrl;
wxStaticText* m_ViaMinDrillTitle;
wxTextCtrl* m_SetViasMinDrillCtrl;
wxRadioBox* m_AllowMicroViaCtrl;
wxStaticText* m_MicroViaMinSizeTitle;
wxTextCtrl* m_SetMicroViasMinSizeCtrl;
wxStaticText* m_MicroViaMinDrillTitle;
wxTextCtrl* m_SetMicroViasMinDrillCtrl;
wxStaticText* m_TrackMinWidthTitle;
wxTextCtrl* m_SetTrackMinWidthCtrl;
wxHtmlWindow* m_MessagesList;
wxStdDialogButtonSizer* m_sdbButtonsSizer;
wxButton* m_sdbButtonsSizerOK;
......@@ -78,7 +101,7 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
public:
DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,692 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 792,692 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DESIGN_RULES_BASE();
};
......
......@@ -22,7 +22,7 @@ DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL( DRC* aTester, WinEDA_PcbFrame* parent )
m_tester = aTester;
m_Parent = parent;
Init();
InitValues();
if( GetSizer() )
{
GetSizer()->SetSizeHints( this );
......@@ -30,7 +30,7 @@ DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL( DRC* aTester, WinEDA_PcbFrame* parent )
}
void DIALOG_DRC_CONTROL::Init()
void DIALOG_DRC_CONTROL::InitValues()
{
// Connect events and objects
m_ClearanceListBox->Connect( ID_CLEARANCE_LIST, wxEVT_LEFT_DCLICK,
......@@ -46,10 +46,10 @@ void DIALOG_DRC_CONTROL::Init()
wxMouseEventHandler(
DIALOG_DRC_CONTROL::OnRightUpUnconnected ), NULL, this );
AddUnitSymbol( *m_ClearenceTitle );
AddUnitSymbol( *m_TrackMinWidthTitle );
AddUnitSymbol( *m_ViaMinTitle );
AddUnitSymbol( *m_MicroViaMinTitle );
m_SetClearance->SetValue( _("Use netclasses values"));
Layout(); // adding the units above expanded Clearance text, now resize.
......@@ -69,8 +69,6 @@ void DIALOG_DRC_CONTROL::Init()
*/
void DIALOG_DRC_CONTROL::SetDrcParmeters( )
{
g_DesignSettings.m_TrackClearance =
ReturnValueFromTextCtrl( *m_SetClearance, m_Parent->m_InternalUnits );
g_DesignSettings.m_TrackMinWidth =
ReturnValueFromTextCtrl( *m_SetTrackMinWidthCtrl, m_Parent->m_InternalUnits );
g_DesignSettings.m_ViasMinSize =
......
......@@ -51,7 +51,7 @@ private:
*/
void writeReport( FILE* fpOut );
void Init( );
void InitValues( );
void SetDrcParmeters( );
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 9 2009)
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -32,17 +32,20 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
fgMinValuesSizer->SetFlexibleDirection( wxBOTH );
fgMinValuesSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_ClearenceTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 );
m_ClearenceTitle->Wrap( -1 );
fgMinValuesSizer->Add( m_ClearenceTitle, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT, 5 );
m_ClearanceTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 );
m_ClearanceTitle->Wrap( -1 );
fgMinValuesSizer->Add( m_ClearanceTitle, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT, 5 );
m_SetClearance = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SetClearance->Enable( false );
m_SetClearance->SetToolTip( _("In the clearance units, enter the clearance distance") );
fgMinValuesSizer->Add( m_SetClearance, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_ViaMinTitle = new wxStaticText( this, wxID_ANY, _("Via Min Size"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaMinTitle->Wrap( -1 );
m_ViaMinTitle->Enable( false );
fgMinValuesSizer->Add( m_ViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT, 5 );
m_SetViaMinSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
......@@ -50,12 +53,9 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
fgMinValuesSizer->Add( m_SetViaMinSizeCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_TrackMinWidthTitle
= new wxStaticText( this, wxID_ANY, _("Track Min Width"), wxDefaultPosition, wxDefaultSize, 0 );
m_TrackMinWidthTitle
->Wrap( -1 );
fgMinValuesSizer->Add( m_TrackMinWidthTitle
, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_TrackMinWidthTitle = new wxStaticText( this, wxID_ANY, _("Track Min Width"), wxDefaultPosition, wxDefaultSize, 0 );
m_TrackMinWidthTitle->Wrap( -1 );
fgMinValuesSizer->Add( m_TrackMinWidthTitle, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_SetTrackMinWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SetTrackMinWidthCtrl->SetToolTip( _("In the clearance units, enter the clearance distance") );
......@@ -77,6 +77,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
ReportFileSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Create Report File") ), wxHORIZONTAL );
m_CreateRptCtrl = new wxCheckBox( this, ID_CHECKBOX_RPT_FILE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_CreateRptCtrl->SetToolTip( _("Enable writing report to this file") );
ReportFileSizer->Add( m_CreateRptCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
......@@ -214,5 +215,4 @@ DIALOG_DRC_CONTROL_BASE::~DIALOG_DRC_CONTROL_BASE()
m_UnconnectedListBox->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( DIALOG_DRC_CONTROL_BASE::OnRightUpUnconnected ), NULL, this );
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnCancelClick ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnOkClick ), NULL, this );
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="10" />
<FileVersion major="1" minor="9" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_python_events">0</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_drc_base</property>
......@@ -18,16 +16,13 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_python_events">1</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
<property name="bg"></property>
<property name="center"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
......@@ -42,10 +37,6 @@
<property name="subclass"></property>
<property name="title">DRC Control</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -137,7 +128,6 @@
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -146,17 +136,13 @@
<property name="label">Clearance</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ClearenceTitle</property>
<property name="name">m_ClearanceTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -193,8 +179,7 @@
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="enabled">0</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
......@@ -209,10 +194,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">In the clearance units, enter the clearance distance</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
......@@ -253,8 +234,7 @@
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="enabled">0</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
......@@ -269,10 +249,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -309,7 +285,6 @@
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -325,10 +300,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">In the clearance units, enter the clearance distance</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
......@@ -369,7 +340,6 @@
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -378,17 +348,13 @@
<property name="label">Track Min Width</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_TrackMinWidthTitle&#x0A;</property>
<property name="name">m_TrackMinWidthTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -425,7 +391,6 @@
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -441,10 +406,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">In the clearance units, enter the clearance distance</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
......@@ -485,7 +446,6 @@
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -501,10 +461,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -541,7 +497,6 @@
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -557,10 +512,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">In the clearance units, enter the clearance distance</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
......@@ -616,7 +567,6 @@
<property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -632,10 +582,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Enable writing report to this file</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -672,7 +618,6 @@
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -688,10 +633,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Enter the report filename</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
......@@ -732,7 +673,6 @@
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
......@@ -749,10 +689,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -804,7 +740,6 @@
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -820,10 +755,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -860,7 +791,6 @@
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -876,10 +806,6 @@
<property name="style">wxHSCROLL|wxTE_MULTILINE|wxTE_READONLY</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
......@@ -931,7 +857,6 @@
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
......@@ -948,10 +873,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Start the Design Rule Checker</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -988,7 +909,6 @@
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
......@@ -1005,10 +925,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">List unconnected pads or tracks</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -1045,7 +961,6 @@
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
......@@ -1062,10 +977,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Delete every marker</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -1102,7 +1013,6 @@
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
......@@ -1119,10 +1029,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Delete the marker selected in the listBox below</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -1163,7 +1069,6 @@
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -1179,10 +1084,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -1220,7 +1121,6 @@
<property name="bg"></property>
<property name="bitmapsize"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -1235,10 +1135,6 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -1274,7 +1170,6 @@
<object class="wxPanel" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -1288,10 +1183,6 @@
<property name="size"></property>
<property name="subclass">; </property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property>
......@@ -1331,7 +1222,6 @@
<property name="bg"></property>
<property name="choices"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -1346,10 +1236,6 @@
<property name="style"></property>
<property name="subclass">DRCLISTBOX; dialog_drc.h</property>
<property name="tooltip">MARKERs, double click any to go there in PCB, right click for popup menu</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -1390,7 +1276,6 @@
<object class="wxPanel" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -1404,10 +1289,6 @@
<property name="size"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property>
......@@ -1447,7 +1328,6 @@
<property name="bg"></property>
<property name="choices"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
......@@ -1462,10 +1342,6 @@
<property name="style"></property>
<property name="subclass">DRCLISTBOX; </property>
<property name="tooltip">A list of unconnected pads, right click for popup menu</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 9 2009)
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -50,10 +50,9 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog
private:
protected:
wxStaticText* m_ClearenceTitle;
wxStaticText* m_ClearanceTitle;
wxStaticText* m_ViaMinTitle;
wxStaticText* m_TrackMinWidthTitle
;
wxStaticText* m_TrackMinWidthTitle;
wxStaticText* m_MicroViaMinTitle;
wxButton* m_BrowseButton;
wxStaticText* m_staticText6;
......@@ -71,18 +70,18 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
virtual void OnReportCheckBoxClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonBrowseRptFileClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnStartdrcClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnListUnconnectedClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDeleteAllClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDeleteOneClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnLeftDClickClearance( wxMouseEvent& event ) { event.Skip(); }
virtual void OnRightUpClearance( wxMouseEvent& event ) { event.Skip(); }
virtual void OnLeftDClickUnconnected( wxMouseEvent& event ) { event.Skip(); }
virtual void OnRightUpUnconnected( wxMouseEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnReportCheckBoxClicked( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonBrowseRptFileClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnStartdrcClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnListUnconnectedClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnDeleteAllClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnDeleteOneClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnLeftDClickClearance( wxMouseEvent& event ){ event.Skip(); }
virtual void OnRightUpClearance( wxMouseEvent& event ){ event.Skip(); }
virtual void OnLeftDClickUnconnected( wxMouseEvent& event ){ event.Skip(); }
virtual void OnRightUpUnconnected( wxMouseEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
public:
......@@ -94,7 +93,6 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog
wxTextCtrl* m_RptFilenameCtrl;
DRCLISTBOX* m_ClearanceListBox;
DRCLISTBOX* m_UnconnectedListBox;
DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("DRC Control"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800,508 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DRC_CONTROL_BASE();
......
......@@ -38,15 +38,10 @@ void DIALOG_TRACKS_OPTIONS::MyInit()
AddUnitSymbol( *m_MaskClearanceTitle );
int Internal_Unit = m_Parent->m_InternalUnits;
PutValueInLocalUnits( *m_OptViaDrill, g_DesignSettings.m_ViaDrill, Internal_Unit );
PutValueInLocalUnits( *m_OptCustomViaDrill,
g_DesignSettings.m_ViaDrillCustomValue,
Internal_Unit );
PutValueInLocalUnits( *m_OptMaskMargin, g_DesignSettings.m_MaskMargin, Internal_Unit );
if( g_DesignSettings.m_CurrentViaType != VIA_THROUGH )
m_OptViaType->SetSelection( 1 );
m_AllowMicroViaCtrl->SetSelection( g_DesignSettings.m_MicroViasAllowed ? 1 : 0);
// Vias and Tracks sizes values.
// note we display only extra values, never the current netclass value.
......@@ -200,15 +195,8 @@ void DIALOG_TRACKS_OPTIONS::InitDimensionsLists()
void DIALOG_TRACKS_OPTIONS::OnButtonOkClick( wxCommandEvent& event )
/*******************************************************************/
{
g_DesignSettings.m_CurrentViaType = VIA_THROUGH;
if( m_OptViaType->GetSelection() > 0 )
g_DesignSettings.m_CurrentViaType = VIA_BLIND_BURIED;
g_DesignSettings.m_ViaDrill =
ReturnValueFromTextCtrl( *m_OptViaDrill, m_Parent->m_InternalUnits );
g_DesignSettings.m_ViaDrillCustomValue =
ReturnValueFromTextCtrl( *m_OptCustomViaDrill, m_Parent->m_InternalUnits );
g_DesignSettings.m_MicroViasAllowed = m_AllowMicroViaCtrl->GetSelection() == 1;
g_DesignSettings.m_MaskMargin =
ReturnValueFromTextCtrl( *m_OptMaskMargin, m_Parent->m_InternalUnits );
......
......@@ -35,7 +35,7 @@ DIALOG_TRACKS_OPTIONS_BASE::DIALOG_TRACKS_OPTIONS_BASE( wxWindow* parent, wxWind
sViaSizeBox = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Vias Custom Sizes List:") ), wxHORIZONTAL );
m_ViaSizeListCtrl = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
sViaSizeBox->Add( m_ViaSizeListCtrl, 1, wxALL|wxEXPAND, 5 );
sViaSizeBox->Add( m_ViaSizeListCtrl, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizeViasListButtons;
bSizeViasListButtons = new wxBoxSizer( wxVERTICAL );
......@@ -50,15 +50,6 @@ DIALOG_TRACKS_OPTIONS_BASE::DIALOG_TRACKS_OPTIONS_BASE( wxWindow* parent, wxWind
sbLeftSizer->Add( sViaSizeBox, 1, wxEXPAND, 5 );
m_ViaDefaultDrillValueTitle = new wxStaticText( this, wxID_ANY, _("Default Via Drill"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaDefaultDrillValueTitle->Wrap( -1 );
sbLeftSizer->Add( m_ViaDefaultDrillValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_OptViaDrill = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_OptViaDrill->SetToolTip( _("Enter the default via drill diameter\nAll vias drills not set to a specific drill value will have this drill value.") );
sbLeftSizer->Add( m_OptViaDrill, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_ViaAltDrillValueTitle = new wxStaticText( this, wxID_ANY, _("Specific Via Drill"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaAltDrillValueTitle->Wrap( -1 );
sbLeftSizer->Add( m_ViaAltDrillValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
......@@ -70,30 +61,6 @@ DIALOG_TRACKS_OPTIONS_BASE::DIALOG_TRACKS_OPTIONS_BASE( wxWindow* parent, wxWind
bMainUpperSizer->Add( sbLeftSizer, 1, wxEXPAND, 5 );
wxStaticBoxSizer* sbMiddleLeftSizer;
sbMiddleLeftSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Vias Options:") ), wxVERTICAL );
wxString m_OptViaTypeChoices[] = { _("Through via"), _("Blind or buried via") };
int m_OptViaTypeNChoices = sizeof( m_OptViaTypeChoices ) / sizeof( wxString );
m_OptViaType = new wxRadioBox( this, wxID_ANY, _("Default Via Type"), wxDefaultPosition, wxDefaultSize, m_OptViaTypeNChoices, m_OptViaTypeChoices, 1, wxRA_SPECIFY_COLS );
m_OptViaType->SetSelection( 0 );
m_OptViaType->SetToolTip( _("Select the current via type.\nTrough via is the usual selection") );
sbMiddleLeftSizer->Add( m_OptViaType, 0, wxALL|wxEXPAND, 5 );
sbMiddleLeftSizer->Add( 10, 10, 0, 0, 5 );
wxString m_AllowMicroViaCtrlChoices[] = { _("Do not allow micro vias"), _("Allow micro vias") };
int m_AllowMicroViaCtrlNChoices = sizeof( m_AllowMicroViaCtrlChoices ) / sizeof( wxString );
m_AllowMicroViaCtrl = new wxRadioBox( this, wxID_ALLOW_MICROVIA, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, m_AllowMicroViaCtrlNChoices, m_AllowMicroViaCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AllowMicroViaCtrl->SetSelection( 0 );
m_AllowMicroViaCtrl->SetToolTip( _("Allows or do not allow use of micro vias\nThey are very small vias only from an external copper layer to its near neightbour") );
sbMiddleLeftSizer->Add( m_AllowMicroViaCtrl, 0, wxALL, 5 );
bMainUpperSizer->Add( sbMiddleLeftSizer, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbMiddleRightSizer;
sbMiddleRightSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Dimensions:") ), wxVERTICAL );
......@@ -101,7 +68,7 @@ DIALOG_TRACKS_OPTIONS_BASE::DIALOG_TRACKS_OPTIONS_BASE( wxWindow* parent, wxWind
sbTracksListSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Tracks Custom Widths List:") ), wxHORIZONTAL );
m_TrackWidthListCtrl = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
sbTracksListSizer->Add( m_TrackWidthListCtrl, 1, wxALL|wxEXPAND, 5 );
sbTracksListSizer->Add( m_TrackWidthListCtrl, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerTacksButtSizer;
bSizerTacksButtSizer = new wxBoxSizer( wxVERTICAL );
......
......@@ -32,7 +32,7 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_TRACKS_OPTIONS_BASE</property>
<property name="pos"></property>
<property name="size">627,351</property>
<property name="size">500,351</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">Tracks and Vias Sizes</property>
......@@ -110,7 +110,7 @@
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxListBox" expanded="1">
<property name="bg"></property>
......@@ -279,108 +279,12 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Default Via Drill</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ViaDefaultDrillValueTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_OptViaDrill</property>
<object class="spacer" expanded="1">
<property name="height">10</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Enter the default via drill diameter&#x0A;All vias drills not set to a specific drill value will have this drill value.</property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
<property name="width">10</property>
</object>
</object>
<object class="sizeritem" expanded="1">
......@@ -491,138 +395,6 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Vias Options:</property>
<property name="minimum_size"></property>
<property name="name">sbMiddleLeftSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Through via&quot; &quot;Blind or buried via&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Default Via Type</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_OptViaType</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip">Select the current via type.&#x0A;Trough via is the usual selection</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">10</property>
<property name="permission">protected</property>
<property name="width">10</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Do not allow micro vias&quot; &quot;Allow micro vias&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ALLOW_MICROVIA</property>
<property name="label">Micro Vias:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_AllowMicroViaCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip">Allows or do not allow use of micro vias&#x0A;They are very small vias only from an external copper layer to its near neightbour</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
......@@ -649,7 +421,7 @@
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxListBox" expanded="1">
<property name="bg"></property>
......
......@@ -21,7 +21,6 @@
#include <wx/statbox.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/radiobox.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
......@@ -48,7 +47,6 @@ class DIALOG_TRACKS_OPTIONS_BASE : public wxDialog
{
wxID_ADD_VIA_SIZE = 1000,
wxID_DELETED_WIA_SIEZ,
wxID_ALLOW_MICROVIA,
wxID_ADD_TRACK_WIDTH,
wxID_DELETED_TRACK_WIDTH,
};
......@@ -56,13 +54,8 @@ class DIALOG_TRACKS_OPTIONS_BASE : public wxDialog
wxListBox* m_ViaSizeListCtrl;
wxButton* m_buttonAddViasSize;
wxButton* m_button4;
wxStaticText* m_ViaDefaultDrillValueTitle;
wxTextCtrl* m_OptViaDrill;
wxStaticText* m_ViaAltDrillValueTitle;
wxTextCtrl* m_OptCustomViaDrill;
wxRadioBox* m_OptViaType;
wxRadioBox* m_AllowMicroViaCtrl;
wxListBox* m_TrackWidthListCtrl;
wxButton* m_buttonAddTrackSize;
wxButton* m_buttonDeleteTrackWidth;
......@@ -83,7 +76,7 @@ class DIALOG_TRACKS_OPTIONS_BASE : public wxDialog
public:
DIALOG_TRACKS_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Tracks and Vias Sizes"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 627,351 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_TRACKS_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Tracks and Vias Sizes"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,351 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_TRACKS_OPTIONS_BASE();
};
......
......@@ -62,8 +62,6 @@ void DRC::ShowDialog()
// copy data retained in this DRC object into the m_ui DrcPanel:
PutValueInLocalUnits( *m_ui->m_SetClearance, g_DesignSettings.m_TrackClearance,
m_mainWindow->m_InternalUnits );;
PutValueInLocalUnits( *m_ui->m_SetTrackMinWidthCtrl, g_DesignSettings.m_TrackMinWidth,
m_mainWindow->m_InternalUnits );;
PutValueInLocalUnits( *m_ui->m_SetViaMinSizeCtrl, g_DesignSettings.m_ViasMinSize,
......@@ -320,7 +318,8 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg )
#define FmtVal( x ) GetChars( ReturnStringFromValue( g_UnitMetric, x, PCB_INTERNAL_UNIT ) )
if( nc->GetClearance() < g.m_TrackClearance )
#if 0 // set to 1 when (if...) EDA_BoardDesignSettings has a m_MinClearance value
if( nc->GetClearance() < g.m_MinClearance )
{
msg.Printf( _("NETCLASS: '%s' has Clearance:%s which is less than global:%s"),
GetChars( nc->GetName() ),
......@@ -333,6 +332,7 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg )
m_currentMarker = 0;
ret = false;
}
#endif
if( nc->GetTrackWidth() < g.m_TrackMinWidth )
{
......@@ -362,12 +362,12 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg )
ret = false;
}
if( nc->GetViaDrill() < g.m_ViaDrill )
if( nc->GetViaDrill() < g.m_ViasMinDrill )
{
msg.Printf( _("NETCLASS: '%s' has Via Drill:%s which is less than global:%s"),
GetChars( nc->GetName() ),
FmtVal( nc->GetViaDrill() ),
FmtVal( g.m_ViaDrill )
FmtVal( g.m_ViasMinDrill )
);
m_currentMarker = fillMarker( DRCE_NETCLASS_VIADRILLSIZE, msg, m_currentMarker );
......@@ -390,12 +390,12 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg )
ret = false;
}
if( nc->GetuViaDrill() < g.m_MicroViaDrill )
if( nc->GetuViaDrill() < g.m_MicroViasMinDrill )
{
msg.Printf( _("NETCLASS: '%s' has uVia Drill:%s which is less than global:%s"),
GetChars( nc->GetName() ),
FmtVal( nc->GetuViaDrill() ),
FmtVal( g.m_MicroViaDrill )
FmtVal( g.m_MicroViasMinDrill )
);
m_currentMarker = fillMarker( DRCE_NETCLASS_uVIADRILLSIZE, msg, m_currentMarker );
......
......@@ -619,7 +619,7 @@ void CreateRoutesSection( FILE* file, BOARD* pcb )
fprintf( file, "VIA viapad%d %d %d ALL %d via%d\n",
track->m_Width,
mapXto( track->m_Start.x ), mapYto( track->m_Start.y ),
g_DesignSettings.m_ViaDrill, vianum++ );
track->GetDrillValue(), vianum++ );
}
}
......
......@@ -80,27 +80,19 @@ void WinEDA_DrillFrame::InitDisplayParams( void )
{
wxString msg;
if( s_Zeros_Format==DECIMAL_FORMAT )
if( s_Zeros_Format == DECIMAL_FORMAT )
m_Choice_Precision->Enable( false );
if( DrillOriginIsAuxAxis )
m_Choice_Drill_Offset->SetSelection( 1 );
msg << s_Precision.m_lhs << wxT( ":" ) << s_Precision.m_rhs;
m_Choice_Precision->SetStringSelection( msg );
if( s_Zeros_Format==DECIMAL_FORMAT )
if( s_Zeros_Format == DECIMAL_FORMAT )
m_Choice_Precision->Enable( false );
msg = ReturnStringFromValue( g_UnitMetric,
g_DesignSettings.m_ViaDrill,
m_Parent->m_InternalUnits );
msg += ReturnUnitSymbol( g_UnitMetric );
m_ViaDrillValue->SetLabel( msg );
m_ViaDrillValue->SetLabel( _( "Use Netclasses values" ) );
msg = ReturnStringFromValue( g_UnitMetric,
g_DesignSettings.m_MicroViaDrill,
m_Parent->m_InternalUnits );
msg += ReturnUnitSymbol( g_UnitMetric );
m_MicroViaDrillValue->SetLabel( msg );
m_MicroViaDrillValue->SetLabel( _( "Use Netclasses values" ) );
msg.Empty();
msg << g_pcb_plot_options.HPGL_Pen_Num;
......@@ -322,7 +314,7 @@ void WinEDA_DrillFrame::GenDrillFiles( wxCommandEvent& event )
if( dlg.ShowModal() == wxID_CANCEL )
break;
FILE *excellon_dest = wxFopen( dlg.GetPath(), wxT( "w" ) );
FILE* excellon_dest = wxFopen( dlg.GetPath(), wxT( "w" ) );
if( excellon_dest == 0 )
{
......@@ -332,7 +324,7 @@ void WinEDA_DrillFrame::GenDrillFiles( wxCommandEvent& event )
return;
}
Create_Drill_File_EXCELLON(excellon_dest, s_HoleListBuffer, s_ToolListBuffer );
Create_Drill_File_EXCELLON( excellon_dest, s_HoleListBuffer, s_ToolListBuffer );
switch( m_Choice_Drill_Map->GetSelection() )
{
......@@ -393,7 +385,8 @@ void WinEDA_DrillFrame::UpdatePrecisionOptions( wxCommandEvent& event )
/********************************************************************/
{
if( m_Choice_Unit->GetSelection()==1 )
{ /* inch options */
{
/* inch options */
m_Choice_Precision->SetString( 0, _( "2:3" ) );
m_Choice_Precision->SetString( 1, _( "2:4" ) );
}
......@@ -411,7 +404,7 @@ void WinEDA_DrillFrame::UpdatePrecisionOptions( wxCommandEvent& event )
/**********************************************************************************/
int WinEDA_DrillFrame::Create_Drill_File_EXCELLON(FILE *excellon_dest,
int WinEDA_DrillFrame::Create_Drill_File_EXCELLON( FILE* excellon_dest,
std::vector<HOLE_INFO>& aHoleListBuffer,
std::vector<DRILL_TOOL>& aToolListBuffer )
/**********************************************************************************/
......@@ -541,7 +534,7 @@ int WinEDA_DrillFrame::Create_Drill_File_EXCELLON(FILE *excellon_dest,
fputs( line, excellon_dest );
fputs( "G85",excellon_dest ); // add the "G85" command
fputs( "G85", excellon_dest ); // add the "G85" command
xt = float (xf) * s_ConversionUnits; yt = float (yf) * s_ConversionUnits;
if( s_Unit_Drill_is_Inch )
......@@ -663,15 +656,17 @@ void WinEDA_DrillFrame::Write_Excellon_Header( FILE* aFile )
{
int ii = m_Choice_Zeros_Format->GetSelection();
DateAndTime( Line );
// The next 2 lines in EXCELLON files are comments:
wxString msg = wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion();
fprintf( aFile, ";DRILL file {%s} date %s\n", CONV_TO_UTF8( msg ), Line );
msg = wxT( ";FORMAT={" );
// Print precision:
if ( ii > 0 )
if( ii > 0 )
msg << m_Choice_Precision->GetStringSelection();
else
msg << wxT("-.-"); // in decimal format the precision is irrelevant
msg << wxT( "-.-" ); // in decimal format the precision is irrelevant
msg << wxT( "/ absolute / " );
msg << ( s_Unit_Drill_is_Inch ? wxT( "inch" ) : wxT( "metric" ) );
......@@ -782,7 +777,7 @@ void WinEDA_DrillFrame::GenDrillMap( const wxString aFileName,
if( dlg.ShowModal() == wxID_CANCEL )
return;
FILE *drillplot_dest = wxFopen( dlg.GetPath(), wxT( "wt" ) );
FILE* drillplot_dest = wxFopen( dlg.GetPath(), wxT( "wt" ) );
if( drillplot_dest == 0 )
{
......@@ -826,7 +821,7 @@ void WinEDA_DrillFrame::GenDrillReport( const wxString aFileName )
if( dlg.ShowModal() == wxID_CANCEL )
return;
FILE *report_dest = wxFopen( dlg.GetPath(), wxT( "w" ) );
FILE* report_dest = wxFopen( dlg.GetPath(), wxT( "w" ) );
if( report_dest == 0 )
{
......
......@@ -324,6 +324,8 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
char Line[1024];
char* data;
NETCLASS * netclass_default = GetBoard()->m_NetClasses.GetDefault();
while( GetLine( File, Line, LineNum ) != NULL )
{
strtok( Line, " =\n\r" );
......@@ -405,7 +407,7 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
if( stricmp( Line, "TrackClearence" ) == 0 )
{
g_DesignSettings.m_TrackClearance = atoi( data );
netclass_default->SetClearance( atoi( data ) );
continue;
}
......@@ -421,12 +423,6 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
continue;
}
if( stricmp( Line, "ZoneGridSize" ) == 0 )
{
g_GridRoutingSize = atoi( data );
continue;
}
if( stricmp( Line, "DrawSegmWidth" ) == 0 )
{
g_DesignSettings.m_DrawSegmentWidth = atoi( data );
......@@ -472,7 +468,8 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
if( stricmp( Line, "ViaDrill" ) == 0 )
{
g_DesignSettings.m_ViaDrill = atoi( data );
int diameter = atoi( data );
netclass_default->SetViaDrill( diameter );
continue;
}
......@@ -482,9 +479,23 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
continue;
}
if( stricmp( Line, "ViaMinDrill" ) == 0 )
{
g_DesignSettings.m_ViasMinDrill = atoi( data );
continue;
}
if( stricmp( Line, "MicroViaDrill" ) == 0 )
{
g_DesignSettings.m_MicroViaDrill = atoi( data );
int diameter = atoi( data );
netclass_default->SetuViaDrill( diameter );
continue;
}
if( stricmp( Line, "MicroViaMinDrill" ) == 0 )
{
int diameter = atoi( data );
g_DesignSettings.m_MicroViasMinDrill = diameter;
continue;
}
......@@ -582,6 +593,7 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
static int WriteSetup( FILE* aFile, WinEDA_BasePcbFrame* aFrame, BOARD* aBoard )
/******************************************************************************/
{
NETCLASS * netclass_default = aFrame->GetBoard()->m_NetClasses.GetDefault();
char text[1024];
fprintf( aFile, "$SETUP\n" );
......@@ -610,25 +622,27 @@ static int WriteSetup( FILE* aFile, WinEDA_BasePcbFrame* aFrame, BOARD* aBoard )
fprintf( aFile, "TrackWidthList %d\n", aBoard->m_TrackWidthList[ii] );
fprintf( aFile, "TrackClearence %d\n", g_DesignSettings.m_TrackClearance );
fprintf( aFile, "TrackClearence %d\n", netclass_default->GetClearance() );
fprintf( aFile, "ZoneClearence %d\n", g_Zone_Default_Setting.m_ZoneClearance );
fprintf( aFile, "TrackMinWidth %d\n" , g_DesignSettings.m_TrackMinWidth );
fprintf( aFile, "DrawSegmWidth %d\n", g_DesignSettings.m_DrawSegmentWidth );
fprintf( aFile, "EdgeSegmWidth %d\n", g_DesignSettings.m_EdgeSegmentWidth );
fprintf( aFile, "ViaSize %d\n", g_DesignSettings.m_CurrentViaSize );
fprintf( aFile, "ViaDrill %d\n", g_DesignSettings.m_ViaDrill );
fprintf( aFile, "ViaDrill %d\n", netclass_default->GetViaDrill() );
fprintf( aFile, "ViaAltDrill %d\n", g_DesignSettings.m_ViaDrillCustomValue );
fprintf( aFile, "ViaMinSize %d\n", g_DesignSettings.m_ViasMinSize );
fprintf( aFile, "ViaMinDrill %d\n", g_DesignSettings.m_ViasMinDrill );
// Save custom vias diameters list (the first is not saved here: this is the netclass value
for( unsigned ii = 1; ii < aBoard->m_ViaSizeList.size(); ii++ )
fprintf( aFile, "ViaSizeList %d\n", aBoard->m_ViaSizeList[ii] );
fprintf( aFile, "MicroViaSize %d\n", g_DesignSettings.m_CurrentMicroViaSize);
fprintf( aFile, "MicroViaDrill %d\n", g_DesignSettings.m_MicroViaDrill);
fprintf( aFile, "MicroViaDrill %d\n", netclass_default->GetuViaDrill());
fprintf( aFile, "MicroViasAllowed %d\n", g_DesignSettings.m_MicroViasAllowed);
fprintf( aFile, "MicroViaMinSize %d\n" , g_DesignSettings.m_MicroViasMinSize );
fprintf( aFile, "MicroViaMinDrill %d\n", g_DesignSettings.m_MicroViasMinDrill );
fprintf( aFile, "TextPcbWidth %d\n", g_DesignSettings.m_PcbTextWidth );
fprintf( aFile, "TextPcbSize %d %d\n",
......
......@@ -49,15 +49,6 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
DisplayColorSetupFrame( this, pos );
break;
/*
case ID_PCB_COPPER_LAYERS_SETUP:
{
DIALOG_COPPER_LAYERS_SETUP dialog( this );
dialog.ShowModal();
}
break;
*/
case ID_PCB_LAYERS_SETUP:
DisplayDialogLayerSetup( this );
break;
......@@ -163,17 +154,14 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
}
/**************************************************************************/
bool Read_Config( const wxString& projectFileName )
/*************************************************************************/
/* lit la configuration, si elle n'a pas deja ete lue
* 1 - lit <nom fichier brd>.pro
* 2 - si non trouve lit <chemin de *.exe>/kicad.pro
* 3 - si non trouve: init des variables aux valeurs par defaut
*
* Retourne TRUE si lu, FALSE si config non lue ou non modifie
/** Function Read_Config
* Read the project configuration file
* @param projectFileName = the config filename
* if not found use kicad.pro
* if not found : initialize default values
* @return true if the current config is modified, false if no change
*/
bool WinEDA_PcbFrame::Read_Config( const wxString& projectFileName )
{
wxFileName fn = projectFileName;
int ii;
......@@ -192,7 +180,7 @@ bool Read_Config( const wxString& projectFileName )
/* User library path takes precedent over default library search paths. */
wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1 );
/* Reset the ITEM*NOT*SHOW flag when loading a new config
/* Reset the items visibility flag when loading a new config
* Because it could creates SERIOUS mistakes for the user,
* if some items are not visible after loading a board...
*/
......@@ -201,10 +189,6 @@ bool Read_Config( const wxString& projectFileName )
DisplayOpt.Show_Modules_Cmp = true;
DisplayOpt.Show_Modules_Cu = true;
// These parameters could be left in their previous state, or resetted
// Comment or uncomment to keep or reset this option after loading a board
g_DesignSettings.SetElementVisibility( MODULE_TEXT_NOV_VISIBLE, true );
g_DesignSettings.SetElementVisibility( MODULE_TEXT_CMP_VISIBLE, true );
g_DesignSettings.SetElementVisibility( MODULE_TEXT_CU_VISIBLE, true );
......@@ -213,6 +197,8 @@ bool Read_Config( const wxString& projectFileName )
g_DesignSettings.SetElementVisibility( VIA_THROUGH_VISIBLE, true );
g_DesignSettings.SetElementVisibility( VIA_BLIND_BURIED_VISIBLE, true );
g_DesignSettings.SetElementVisibility( VIA_MICROVIA_VISIBLE, true );
// Items that can remain not visible: comment them if you want.
g_DesignSettings.SetElementVisibility( ANCHOR_VISIBLE, true );
DisplayOpt.DisplayPadNoConn = true;
......
......@@ -64,21 +64,6 @@ static PARAM_CFG_INT ViaDiametreCfg
0, 0xFFFF /* Min and max values*/
);
static PARAM_CFG_INT ViaDrillCfg
(
wxT( "ViaDril" ), /* Keyword */
&g_DesignSettings.m_ViaDrill, /* Parameter address */
250, /* Default value */
0, 0xFFFF /* Min and max values*/
);
static PARAM_CFG_INT ViaAltDrillCfg
(
wxT( "ViaAltD" ), /* Keyword */
&g_DesignSettings.m_ViaDrillCustomValue, /* Parameter address */
250, /* Default value */
0, 0xFFFF /* Min and max values*/
);
static PARAM_CFG_INT LayerThicknessCfg
(
wxT( "LayerThickness" ), /* Keyword */
......@@ -95,14 +80,6 @@ static PARAM_CFG_INT MicroViaDiametreCfg
0, 1000 /* Min and max values*/
);
static PARAM_CFG_INT MicroViaDrillCfg
(
wxT( "MViaDrl" ), /* Keyword */
&g_DesignSettings.m_MicroViaDrill, /* Parameter address */
80, /* Default value */
0, 800 /* Min and max values*/
);
static PARAM_CFG_INT ViaShowHoleCfg
(
INSETUP,
......@@ -123,30 +100,6 @@ static PARAM_CFG_INT ShowNetNamesModeCfg
3 /* Min and max values*/
);
static PARAM_CFG_INT TrackClearenceCfg
(
wxT( "Isol" ), /* Keyword */
&g_DesignSettings.m_TrackClearance, /* Parameter address */
120, /* Default value */
0, 0xFFFF /* Min and max values*/
);
static PARAM_CFG_INT LayerCountCfg // Mask Working Layers
(
wxT( "Countlayer" ), /* Keyword */
&g_DesignSettings.m_CopperLayerCount, /* Parameter address */
2, /* Default value */
1, NB_COPPER_LAYERS /* Min and max values*/
);
static PARAM_CFG_INT TrackWidthCfg
(
wxT( "Lpiste" ), /* Keyword */
&g_DesignSettings.m_CurrentTrackWidth, /* Parameter address */
170, /* Default value */
2, 0xFFFF /* Min and max values*/
);
static PARAM_CFG_INT RouteLayTopCfg // First current working layer
(
wxT( "RouteTo" ), /* Keyword */
......@@ -163,14 +116,6 @@ static PARAM_CFG_INT RouteLayBotCfg // second current working layer
0, 15 /* Min and max values*/
);
static PARAM_CFG_INT TypeViaCfg
(
wxT( "TypeVia" ), /* Keyword */
&g_DesignSettings.m_CurrentViaType, /* Parameter address */
VIA_THROUGH, /* Default value */
0, 3 /* Min and max values*/
);
static PARAM_CFG_BOOL Segm45Cfg // Segm Pistes a 0, 45, 90 degres uniquement
(
wxT( "Segm45" ), /* Keyword */
......@@ -801,26 +746,19 @@ PARAM_CFG_BASE* ParamCfgList[] =
&PadDimHCfg,
&PadDimVCfg,
&ViaDiametreCfg,
&ViaDrillCfg,
&ViaAltDrillCfg,
&MicroViaDiametreCfg,
&MicroViaDrillCfg,
&ViaShowHoleCfg,
&ShowNetNamesModeCfg,
&TrackClearenceCfg,
&LayerThicknessCfg,
&LayerCountCfg,
&TrackWidthCfg,
&RouteLayTopCfg,
&RouteLayBotCfg,
&TypeViaCfg,
&Segm45Cfg,
&Raccord45Cfg,
&UnitCfg,
&SegmFillCfg,
&TrackDisplayClearanceCfg,
&PadFillCfg,
&ViaFillCfg, //TODO: Will adding this line break tha pcbnew file compatibility?
&ViaFillCfg,
&PadAfficheGardeCfg,
&PadShowNumCfg,
&AfficheContourModuleCfg,
......
......@@ -123,7 +123,7 @@ Changing extension to .brd." ),
SetupServerFunction( RemoteCommand );
}
Read_Config( fn.GetFullPath() );
frame->Read_Config( fn.GetFullPath() );
frame->Zoom_Automatique( true );
......
......@@ -147,7 +147,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMa
continue;
if( pt_piste->Type() == TYPE_VIA ) /* VIA rencontree */
{
int rayon = g_DesignSettings.m_ViaDrill / 2;
int rayon = pt_piste->GetDrillValue() / 2;
GRFilledCircle( &m_ClipBox, aDC, pt_piste->m_Start.x, pt_piste->m_Start.y,
rayon, 0, color, color );
}
......
......@@ -50,7 +50,6 @@ void CreateSortedPadListByXCoord( BOARD* aBoard, std::vector<D_PAD*>* aVector );
/**************/
/* PCBCFG.CPP */
/**************/
bool Read_Config( const wxString& project_name );
bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose );
......
......@@ -31,6 +31,7 @@ static int segm_oX, segm_oY;
static int segm_fX, segm_fY; /* Origine et fin de la piste en cours de trace */
static RATSNEST_ITEM* pt_cur_ch;
static int Ncurrent; /* measures of progress */
static int s_Clearance; // Clerance value used in autorouter
#define NOSUCCESS 0
......@@ -219,6 +220,8 @@ int WinEDA_PcbFrame::Solve( wxDC* DC, int two_sides )
DrawPanel->m_AbortRequest = FALSE;
DrawPanel->m_AbortEnable = TRUE;
s_Clearance = GetBoard()->m_NetClasses.GetDefault()->GetClearance();
Ncurrent = 0;
MsgPanel->EraseMsgBox();
msg.Printf( wxT( "%d " ), GetBoard()->m_NbNoconnect );
......@@ -355,8 +358,8 @@ static int Autoroute_One_Track( WinEDA_PcbFrame* pcbframe, wxDC* DC,
result = NOSUCCESS;
marge = g_DesignSettings.m_TrackClearance + (g_DesignSettings.m_CurrentTrackWidth / 2);
via_marge = g_DesignSettings.m_TrackClearance + (g_DesignSettings.m_CurrentViaSize / 2);
marge = s_Clearance + (g_DesignSettings.m_CurrentTrackWidth / 2);
via_marge = s_Clearance + (g_DesignSettings.m_CurrentViaSize / 2);
/* clear direction flags */
i = Nrows * Ncols * sizeof(char);
......@@ -1048,8 +1051,8 @@ static void Place_Piste_en_Buffer( WinEDA_PcbFrame* pcbframe, wxDC* DC )
int marge, via_marge;
WinEDA_DrawPanel* panel = pcbframe->DrawPanel;
marge = g_DesignSettings.m_TrackClearance + (g_DesignSettings.m_CurrentTrackWidth / 2);
via_marge = g_DesignSettings.m_TrackClearance + (g_DesignSettings.m_CurrentViaSize / 2);
marge = s_Clearance + (g_DesignSettings.m_CurrentTrackWidth / 2);
via_marge = s_Clearance + (g_DesignSettings.m_CurrentViaSize / 2);
/* tst point d'arrivee : doit etre sur pad start */
......
......@@ -1113,10 +1113,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError )
std::string componentId;
// find the highest numbered netCode within the board.
int highestNetCode = -1;
// for( EQUIPOT* equipot = aBoard->m_Equipots; equipot; equipot = equipot->Next() )
// highestNetCode = MAX( highestNetCode, equipot->GetNet() );
highestNetCode = aBoard->m_NetInfo->GetCount() - 1;
int highestNetCode = aBoard->m_NetInfo->GetCount() - 1;
deleteNETs();
// expand the net vector to highestNetCode+1, setting empty to NULL
......@@ -1236,12 +1233,15 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError )
// Next we add the via's which may be used.
int defaultViaSize = aBoard->m_BoardSettings->m_CurrentViaSize;
// TODO: output vias sizes in NetClasses
int defaultViaDrill = aBoard->m_NetClasses.GetDefault()->GetViaDrill();
/**
*@todo: *** output vias sizes and drill in NetClasses ***
*/
/* I need at least one via for the (class...) scope below
if( defaultViaSize )
*/
{
PADSTACK* padstack = makeVia( defaultViaSize, g_DesignSettings.m_ViaDrill,
PADSTACK* padstack = makeVia( defaultViaSize, defaultViaDrill,
0, aBoard->GetCopperLayerCount()-1 );
pcb->library->AddPadstack( padstack );
......@@ -1258,7 +1258,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError )
if( viaSize == defaultViaSize )
continue;
PADSTACK* padstack = makeVia( viaSize, g_DesignSettings.m_ViaDrill,
PADSTACK* padstack = makeVia( viaSize, defaultViaDrill,
0, aBoard->GetCopperLayerCount()-1 );
pcb->library->AddPadstack( padstack );
}
......
......@@ -242,9 +242,9 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
// drillMils is not in the session units, but actual mils so we don't use scale()
drillDiam = (int) (drillMils * 10);
if( drillDiam == g_DesignSettings.m_ViaDrill ) // default
drillDiam = -1; // import as default
/** @todo: see if we use default netclass or specific value
*/
drillDiam = -1; // import as default: real drill is the netclass value
}
}
......
......@@ -193,23 +193,35 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
*/
CopyPolygonsFromFilledPolysListToBoolengine( booleng, GROUP_A );
// Calculates the clearance value that meet DRC requirements
int clearance = max( m_ZoneClearance, g_DesignSettings.m_TrackClearance );
clearance += m_ZoneMinThickness / 2;
/* Calculates the clearance value that meet DRC requirements
* from m_ZoneClearance and clearance from the corresponding netclass
* We have a "local" clearance in zones because most of time
* clearance between a zone and others items is bigger than the netclass clearance
* this is more true for small clearance values
* Note also the "local" clearance is used for clearance between non copper items
* or items like texts on copper layers
*/
int zone_clearance = max( m_ZoneClearance, GetClearance() );
zone_clearance += m_ZoneMinThickness / 2;
/* Add holes (i.e. tracks and pads areas as polygons outlines)
* in GroupB in Bool_Engine
*/
/* items ouside the zone bounding box are skipped */
/* items ouside the zone bounding box are skipped
* the bounding box is the zone bounding box + the biigest clearance found in Netclass list
*/
EDA_Rect item_boundingbox;
EDA_Rect zone_boundingbox = GetBoundingBox();
zone_boundingbox.Inflate( m_ZoneClearance, clearance );
int biggest_clearance = aPcb->GetBiggestClearanceValue();
biggest_clearance = MAX( biggest_clearance, zone_clearance );
zone_boundingbox.Inflate( biggest_clearance, biggest_clearance );
/*
* First : Add pads. Note: pads having the same net as zone are left in zone.
* Thermal shapes will be created later if necessary
*/
int item_clearance;
have_poly_to_substract = false;
for( MODULE* module = aPcb->m_Modules; module; module = module->Next() )
{
......@@ -220,18 +232,19 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
if( pad->GetNet() != GetNet() )
{
item_clearance = pad->GetClearance() + (m_ZoneMinThickness / 2);
item_boundingbox = pad->GetBoundingBox();
if( item_boundingbox.Intersects( zone_boundingbox ) )
{
AddPadWithClearancePolygon( booleng, *pad, clearance );
AddPadWithClearancePolygon( booleng, *pad, MAX(zone_clearance,item_clearance) );
have_poly_to_substract = true;
}
continue;
}
int gap = clearance;
int gap = zone_clearance;
#ifdef USE_STUBS_FOR_THERMAL
gap = MAX( clearance, m_ThermalReliefGapValue );
gap = MAX( zone_clearance, m_ThermalReliefGapValue );
#else
if( (m_PadOption == PAD_NOT_IN_ZONE)
|| (GetNet() == 0) || pad->m_PadShape == PAD_TRAPEZOID )
......@@ -259,10 +272,12 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
continue;
if( track->GetNet() == GetNet() && (GetNet() != 0) )
continue;
item_clearance = track->GetClearance() + (m_ZoneMinThickness / 2);
item_boundingbox = track->GetBoundingBox();
if( item_boundingbox.Intersects( zone_boundingbox ) )
{
AddTrackWithClearancePolygon( booleng, *track, clearance );
AddTrackWithClearancePolygon( booleng, *track, MAX(zone_clearance,item_clearance) );
have_poly_to_substract = true;
}
}
......
......@@ -846,6 +846,7 @@ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_E
{
wxString str;
long nerrors = 0;
int zone2zoneClearance;
// iterate through all areas
for( int ia = 0; ia < GetAreaCount(); ia++ )
......@@ -856,6 +857,7 @@ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_E
if( aArea_To_Examine && (aArea_To_Examine != Area_Ref) )
continue;
for( int ia2 = 0; ia2 < GetAreaCount(); ia2++ )
{
ZONE_CONTAINER* Area_To_Test = GetArea( ia2 );
......@@ -871,6 +873,14 @@ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_E
if( Area_Ref->GetNet() == Area_To_Test->GetNet() && Area_Ref->GetNet() >= 0 )
continue;
/* Examine a candidate zone: compare Area_To_Test to Area_Ref
*/
// Calculate the clearance used in zone to zone test:
zone2zoneClearance = Area_Ref->GetClearance(Area_To_Test);
zone2zoneClearance = MAX( zone2zoneClearance, Area_Ref->m_ZoneClearance );
zone2zoneClearance = MAX( zone2zoneClearance, Area_To_Test->m_ZoneClearance );
// test for some corners of Area_Ref inside Area_To_Test
for( int ic = 0; ic < Area_Ref->m_Poly->GetNumCorners(); ic++ )
{
......@@ -962,12 +972,10 @@ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_E
ax1, ay1, ax2,
ay2, astyle,
0,
// @todo: decide what to use here.
g_DesignSettings.m_TrackClearance,
zone2zoneClearance,
&x, &y );
if( d < g_DesignSettings.m_TrackClearance )
if( d < zone2zoneClearance )
{
// COPPERAREA_COPPERAREA error : intersect or too close
if( aCreate_Markers )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment