Pcbnew: add user defined layers and allow all layers to have user names.

This changes the file format.  All previous copper layers that had a user
defined name are forced back to the canonical name and the user defined
name is stored as an optional quoted string in the layer definition and
only used for UI and plotting purposes.  All copper object layer names
are now the canonical name for internal file use.

ADDED: Nine new user definable non-copper layers that can be optionally
added to the board layer stack.

CHANGED: All board layers can now be renamed by the user.

CHANGED: User defined layer names can now contain space characters.

Fixes https://gitlab.com/kicad/code/kicad/issues/1969
This commit is contained in:
Wayne Stambaugh 2020-09-22 17:50:59 -04:00
parent 660cdcb056
commit 188232de6f
16 changed files with 2820 additions and 747 deletions

View File

@ -83,9 +83,20 @@ wxString LayerName( int aLayer )
case F_Fab: return _( "F.Fab" );
case B_Fab: return _( "B.Fab" );
// User definable layers.
case User_1: return _( "User.1" );
case User_2: return _( "User.2" );
case User_3: return _( "User.3" );
case User_4: return _( "User.4" );
case User_5: return _( "User.5" );
case User_6: return _( "User.6" );
case User_7: return _( "User.7" );
case User_8: return _( "User.8" );
case User_9: return _( "User.9" );
// Rescue
case Rescue: return _( "Rescue" );
// SCH_LAYER_ID
case LAYER_WIRE: return _( "Wire" );
@ -156,12 +167,6 @@ wxString LayerName( int aLayer )
case LAYER_SELECT_OVERLAY: return _( "Selection highlight" );
default:
#if DEBUG
wxString str;
str.Printf( "Unknown: ID %d", aLayer );
return str;
#else
return wxEmptyString;
#endif
wxCHECK_MSG( false, wxEmptyString, wxString::Format( "Unknown layer ID %d", aLayer ) );
}
}

View File

@ -142,6 +142,17 @@ const wxChar* LSET::Name( PCB_LAYER_ID aLayerId )
case F_Fab: txt = wxT( "F.Fab" ); break;
case B_Fab: txt = wxT( "B.Fab" ); break;
// User definable layers.
case User_1: txt = wxT( "User.1" ); break;
case User_2: txt = wxT( "User.2" ); break;
case User_3: txt = wxT( "User.3" ); break;
case User_4: txt = wxT( "User.4" ); break;
case User_5: txt = wxT( "User.5" ); break;
case User_6: txt = wxT( "User.6" ); break;
case User_7: txt = wxT( "User.7" ); break;
case User_8: txt = wxT( "User.8" ); break;
case User_9: txt = wxT( "User.9" ); break;
// Rescue
case Rescue: txt = wxT( "Rescue" ); break;
@ -304,7 +315,8 @@ std::string LSET::FmtHex() const
for( size_t nibble_bit = 0; nibble_bit < 4; ++nibble_bit )
{
size_t nibble_pos = nibble_bit + ( nibble * 4 );
// make sure it's not extra bits that dont exist in the bitset but need to in the hex format
// make sure it's not extra bits that don't exist in the bitset but need to in the
// hex format
if( nibble_pos >= size() )
break;
@ -517,7 +529,7 @@ PCB_LAYER_ID FlipLayer( PCB_LAYER_ID aLayerId, int aCopperLayersCount )
{
// internal copper layers count is aCopperLayersCount-2
PCB_LAYER_ID fliplayer = PCB_LAYER_ID(aCopperLayersCount - 2 - ( aLayerId - In1_Cu ) );
// Ensure fliplayer has a value which does not crash pcbnew:
// Ensure fliplayer has a value which does not crash Pcbnew:
if( fliplayer < F_Cu )
fliplayer = F_Cu;
@ -815,6 +827,24 @@ LSET LSET::UserMask()
}
LSET LSET::UserDefinedLayers()
{
static const LSET saved( 9,
User_1,
User_2,
User_3,
User_4,
User_5,
User_6,
User_7,
User_8,
User_9
);
return saved;
}
LSET LSET::FrontMask()
{
static const LSET saved = FrontTechMask().set( F_Cu );

View File

@ -3,7 +3,7 @@
*
* Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2010 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2007-2017 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2007-2020 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -36,12 +36,9 @@
#include <wx/string.h>
#include <macros.h>
class BOARD;
/**
* Type LAYER_NUM
* can be replaced with int and removed. Until then, it is something you can increment,
* This can be replaced with int and removed. Until then, it is something you can increment,
* and its meaning is only advisory but can extend beyond PCB layers into view layers
* and gerber layers.
*/
@ -51,7 +48,7 @@ typedef int LAYER_NUM;
* A quick note on layer IDs:
*
* The layers are stored in separate enums so that certain functions can
* take in the enums as datatypes and don't have to know about layers from
* take in the enums as data types and don't have to know about layers from
* other applications.
*
* Layers that are shared between applications should be in the GAL_LAYER_ID enum.
@ -64,11 +61,10 @@ typedef int LAYER_NUM;
/**
* Enum PCB_LAYER_ID
* This is the definition of all layers used in Pcbnew
* The PCB layer types are fixed at value 0 through LAYER_ID_COUNT,
* to ensure compatibility with legacy board files.
* This is the definition of all layers used in Pcbnew.
*
* The PCB layer types are fixed at value 0 through LAYER_ID_COUNT to ensure compatibility
* with legacy board files.
*/
enum PCB_LAYER_ID: int
{
@ -119,22 +115,35 @@ enum PCB_LAYER_ID: int
F_SilkS,
B_Mask,
F_Mask,
F_Mask, // 39
Dwgs_User,
Cmts_User,
Eco1_User,
Eco2_User,
Edge_Cuts,
Margin,
Margin, // 45
B_CrtYd,
F_CrtYd,
B_Fab,
F_Fab,
F_Fab, // 49
Rescue,
// User definable layers.
User_1,
User_2,
User_3,
User_4,
User_5,
User_6,
User_7,
User_8,
User_9,
Rescue, // 59
// Four reserved layers (60 - 63) for future expansion within the 64 bit integer limit.
PCB_LAYER_ID_COUNT
};
@ -204,7 +213,7 @@ enum GAL_LAYER_ID: int
LAYER_AUX_ITEMS, ///< Auxiliary items (guides, rule, etc)
LAYER_DRAW_BITMAPS, ///< to handle and draw images bitmaps
/// This is the end of the layers used for visibility bitmasks in Pcbnew
/// This is the end of the layers used for visibility bit masks in Pcbnew
/// There can be at most 32 layers above here.
GAL_LAYER_ID_BITMASK_END,
@ -424,8 +433,7 @@ typedef std::vector<PCB_LAYER_ID> BASE_SEQ;
/**
* LSEQ
* is a sequence (and therefore also a set) of PCB_LAYER_IDs. A sequence provides
* LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs. A sequence provides
* a certain order.
* <p>
* It can also be used as an iterator:
@ -474,8 +482,7 @@ typedef std::bitset<PCB_LAYER_ID_COUNT> BASE_SET;
/**
* LSET
* is a set of PCB_LAYER_IDs. It can be converted to numerous purpose LSEQs using
* LSET is a set of PCB_LAYER_IDs. It can be converted to numerous purpose LSEQs using
* the various member functions, most of which are based on Seq(). The advantage
* of converting to LSEQ using purposeful code, is it removes any dependency
* on order/sequence inherent in this set.
@ -488,15 +495,14 @@ public:
// That excludes "LSET s = 0;" and excludes "LSET s = -1;", etc.
// LSET s = 0; needs to be removed from the code, this accomplishes that.
// Remember LSET( PCB_LAYER_ID(0) ) sets bit 0, so "LSET s = 0;" is illegal
// to prevent that surprize. Therefore LSET's constructor suite is significantly
// to prevent that surprise. Therefore LSET's constructor suite is significantly
// different than the base class from which it is derived.
// Other member functions (non-constructor functions) are identical to the base
// class's and therefore are re-used from the base class.
/**
* Constructor LSET()
* creates an empty (cleared) set.
* Create an empty (cleared) set.
*/
LSET() :
BASE_SET() // all bits are set to zero in BASE_SET()
@ -509,8 +515,7 @@ public:
}
/**
* Constructor LSET( PCB_LAYER_ID )
* takes a PCB_LAYER_ID and sets that bit. This makes the following code into
* Take a PCB_LAYER_ID and sets that bit. This makes the following code into
* a bug:
*
* <code> LSET s = 0; </code>
@ -523,22 +528,20 @@ public:
*
* for an empty set.
*/
LSET( PCB_LAYER_ID aLayer ) : // PCB_LAYER_ID deliberately exludes int and relatives
LSET( PCB_LAYER_ID aLayer ) : // PCB_LAYER_ID deliberately excludes int and relatives
BASE_SET()
{
set( aLayer );
}
/**
* Constructor LSET( const PCB_LAYER_ID* aArray, unsigned aCount )
* works well with an array or LSEQ.
* Create an array or LSEQ.
*/
LSET( const PCB_LAYER_ID* aArray, unsigned aCount );
/**
* Constructor LSET( unsigned, PCB_LAYER_ID, ...)
* takes one or more PCB_LAYER_IDs in the argument list to construct
* the set. Typically only used in static construction.
* Take one or more PCB_LAYER_IDs in the argument list to construct the set. Typically
* only used in static construction.
*
* @param aIdCount is the number of PCB_LAYER_IDs which follow.
* @param aFirst is the first included in @a aIdCount and must always be present, and can
@ -547,7 +550,7 @@ public:
*
* Parameter is 'int' to avoid va_start undefined behavior.
*/
LSET( unsigned aIdCount, int aFirst, ... ); // args chosen to prevent LSET( int ) from compiling
LSET( unsigned aIdCount, int aFirst, ... ); // args chosen to prevent LSET( int ) from compiling
/**
* See if the layer set contains a PCB layer.
@ -561,106 +564,93 @@ public:
}
/**
* Function Name
* returns the fixed name association with aLayerId.
* Return the fixed name association with aLayerId.
*/
static const wxChar* Name( PCB_LAYER_ID aLayerId );
/**
* Function InternalCuMask()
* returns a complete set of internal copper layers, which is all Cu layers
* Return a complete set of internal copper layers which is all Cu layers
* except F_Cu and B_Cu.
*/
static LSET InternalCuMask();
/**
* Function FrontAssembly()
* returns a complete set of all top assembly layers, which is all F_SilkS
* and F_Mask
* Return a complete set of all top assembly layers which is all F_SilkS and F_Mask
*/
static LSET FrontAssembly();
/**
* Function BackAssembly()
* returns a complete set of all bottom assembly layers, which is all B_SilkS
* and B_Mask
* Return a complete set of all bottom assembly layers which is all B_SilkS and B_Mask
*/
static LSET BackAssembly();
/**
* Function AllCuMask
* returns a mask holding the requested number of Cu PCB_LAYER_IDs.
* Return a mask holding the requested number of Cu PCB_LAYER_IDs.
*/
static LSET AllCuMask( int aCuLayerCount = MAX_CU_LAYERS );
/**
* Function ExternalCuMask
* returns a mask holding the Front and Bottom layers.
* Return a mask holding the Front and Bottom layers.
*/
static LSET ExternalCuMask();
/**
* Function AllNonCuMask
* returns a mask holding all layer minus CU layers.
* Return a mask holding all layer minus CU layers.
*/
static LSET AllNonCuMask();
static LSET AllLayersMask();
/**
* Function FrontTechMask
* returns a mask holding all technical layers (no CU layer) on front side.
* Return a mask holding all technical layers (no CU layer) on front side.
*/
static LSET FrontTechMask();
/**
* Function FrontBoardTechMask
* returns a mask holding technical layers used in a board fabrication
* Return a mask holding technical layers used in a board fabrication
* (no CU layer) on front side.
*/
static LSET FrontBoardTechMask();
/**
* Function BackTechMask
* returns a mask holding all technical layers (no CU layer) on back side.
* Return a mask holding all technical layers (no CU layer) on back side.
*/
static LSET BackTechMask();
/**
* Function BackBoardTechMask
* returns a mask holding technical layers used in a board fabrication
* Return a mask holding technical layers used in a board fabrication
* (no CU layer) on Back side.
*/
static LSET BackBoardTechMask();
/**
* Function AllTechMask
* returns a mask holding all technical layers (no CU layer) on both side.
* Return a mask holding all technical layers (no CU layer) on both side.
*/
static LSET AllTechMask();
/**
* Function AllTechMask
* returns a mask holding board technical layers (no CU layer) on both side.
* Return a mask holding board technical layers (no CU layer) on both side.
*/
static LSET AllBoardTechMask();
/**
* Function FrontMask
* returns a mask holding all technical layers and the external CU layer on front side.
* Return a mask holding all technical layers and the external CU layer on front side.
*/
static LSET FrontMask();
/**
* Function BackMask
* returns a mask holding all technical layers and the external CU layer on back side.
* Return a mask holding all technical layers and the external CU layer on back side.
*/
static LSET BackMask();
static LSET UserMask();
/**
* Function ForbiddenFootprintLayers
* Return a mask with all of the allowable user defined layers.
*/
static LSET UserDefinedLayers();
/**
* Layers which are not allowed within footprint definitions. Currently internal
* copper layers, Edge.Cuts and Margin.
*/
@ -668,24 +658,21 @@ public:
static LSET ForbiddenFootprintLayers();
/**
* Function ForbiddenTextLayers
* Layers which are now allowed to have text on them. Currently Edge.Cuts and Margin.
* Layers which are allowed to have text on them. Currently Edge.Cuts and Margin.
*/
static LSET ForbiddenTextLayers();
/**
* Function CuStack
* returns a sequence of copper layers in starting from the front/top
* Return a sequence of copper layers in starting from the front/top
* and extending to the back/bottom. This specific sequence is depended upon
* in numerous places.
*/
LSEQ CuStack() const;
/**
* Function Technicals
* returns a sequence of technical layers. A sequence provides a certain
* order.
* @param aSubToOmit is the subset of the techical layers to omit, defaults to none.
* Return a sequence of technical layers. A sequence provides a certain order.
*
* @param aSubToOmit is the subset of the technical layers to omit, defaults to none.
*/
LSEQ Technicals( LSET aSubToOmit = LSET() ) const;
@ -698,8 +685,7 @@ public:
LSEQ UIOrder() const;
/**
* Function Seq
* returns an LSEQ from the union of this LSET and a desired sequence. The LSEQ
* Return an LSEQ from the union of this LSET and a desired sequence. The LSEQ
* element will be in the same sequence as aWishListSequence if they are present.
* @param aWishListSequence establishes the order of the returned LSEQ, and the LSEQ will only
* contain PCB_LAYER_IDs which are present in this set.
@ -708,8 +694,7 @@ public:
LSEQ Seq( const PCB_LAYER_ID* aWishListSequence, unsigned aCount ) const;
/**
* Function Seq
* returns a LSEQ from this LSET in ascending PCB_LAYER_ID order. Each LSEQ
* Return a LSEQ from this LSET in ascending PCB_LAYER_ID order. Each LSEQ
* element will be in the same sequence as in PCB_LAYER_ID and only present
* in the resultant LSEQ if present in this set. Therefore the sequence is
* subject to change, use it only when enumeration and not order is important.
@ -717,21 +702,18 @@ public:
LSEQ Seq() const;
/**
* Function SeqStackBottom2Top
* returns the sequence that is typical for a bottom-to-top stack-up.
* Return the sequence that is typical for a bottom-to-top stack-up.
* For instance, to plot multiple layers in a single image, the top layers output last.
*/
LSEQ SeqStackupBottom2Top() const;
/**
* Function FmtHex
* returns a hex string showing contents of this LSEQ.
* Return a hex string showing contents of this LSEQ.
*/
std::string FmtHex() const;
/**
* Function ParseHex
* understands the output of FmtHex() and replaces this set's values
* Convert the output of FmtHex() and replaces this set's values
* with those given in the input string. Parsing stops at the first
* non hex ASCII byte, except that marker bytes output from FmtHex are
* not terminators.
@ -740,8 +722,7 @@ public:
int ParseHex( const char* aStart, int aCount );
/**
* Function FmtBin
* returns a binary string showing contents of this LSEQ.
* Return a binary string showing contents of this LSEQ.
*/
std::string FmtBin() const;
@ -762,11 +743,10 @@ private:
/**
* Function IsValidLayer
* tests whether a given integer is a valid layer index, i.e. can
* Test whether a given integer is a valid layer index, i.e. can
* be safely put in a PCB_LAYER_ID
* @param aLayerId = Layer index to test. It can be an int, so its
* useful during I/O
*
* @param aLayerId = Layer index to test. It can be an int, so its useful during I/O
* @return true if aLayerIndex is a valid layer index
*/
inline bool IsValidLayer( LAYER_NUM aLayerId )
@ -775,10 +755,10 @@ inline bool IsValidLayer( LAYER_NUM aLayerId )
}
/**
* Function IsPcbLayer
* tests whether a layer is a valid layer for pcbnew
* Test whether a layer is a valid layer for Pcbnew
*
* @param aLayer = Layer to test
* @return true if aLayer is a layer valid in pcbnew
* @return true if aLayer is a layer valid in Pcbnew
*/
inline bool IsPcbLayer( LAYER_NUM aLayer )
{
@ -786,8 +766,8 @@ inline bool IsPcbLayer( LAYER_NUM aLayer )
}
/**
* Function IsCopperLayer
* tests whether a layer is a copper layer
* Tests whether a layer is a copper layer.
*
* @param aLayerId = Layer to test
* @return true if aLayer is a valid copper layer
*/
@ -797,8 +777,8 @@ inline bool IsCopperLayer( LAYER_NUM aLayerId )
}
/**
* Function IsNonCopperLayer
* tests whether a layer is a non copper layer
* Test whether a layer is a non copper layer.
*
* @param aLayerId = Layer to test
* @return true if aLayer is a non copper layer
*/
@ -808,8 +788,8 @@ inline bool IsNonCopperLayer( LAYER_NUM aLayerId )
}
/**
* Function IsUserLayer
* tests whether a layer is a non copper and a non tech layer
* Test whether a layer is a non copper and a non tech layer.
*
* @param aLayerId = Layer to test
* @return true if aLayer is a user layer
*/
@ -818,14 +798,18 @@ inline bool IsUserLayer( PCB_LAYER_ID aLayerId )
return aLayerId >= Dwgs_User && aLayerId <= Eco2_User;
}
/* IMPORTANT: If a layer is not a front layer not necessarily is true
/*
@todo Where does this comment actually belong?
IMPORTANT: If a layer is not a front layer not necessarily is true
the converse. The same hold for a back layer.
So a layer can be:
- Front
- Back
- Neither (internal or auxiliary)
The check most frequent is for back layers, since it involves flips */
The check most frequent is for back layers, since it involves flips
*/
/**
@ -875,7 +859,6 @@ inline bool IsBackLayer( PCB_LAYER_ID aLayerId )
/**
* Function FlippedLayerNumber
* @return the layer number after flipping an item
* some (not all) layers: external copper, and paired layers( Mask, Paste, solder ... )
* are swapped between front and back sides
@ -887,7 +870,8 @@ inline bool IsBackLayer( PCB_LAYER_ID aLayerId )
PCB_LAYER_ID FlipLayer( PCB_LAYER_ID aLayerId, int aCopperLayersCount = 0 );
/**
* Calculate the mask layer when flipping a footprint
* Calculate the mask layer when flipping a footprint.
*
* BACK and FRONT copper layers, mask, paste, solder layers are swapped
* internal layers are flipped only if the copper layers count is known
* @param aMask = the LSET to flip
@ -918,8 +902,8 @@ inline int GetNetnameLayer( int aLayer )
}
/**
* Function IsNetnameLayer
* tests whether a layer is a netname layer
* Test whether a layer is a netname layer.
*
* @param aLayer = Layer to test
* @return true if aLayer is a valid netname layer
*/
@ -944,7 +928,8 @@ inline bool IsDCodeLayer( int aLayer )
/**
* Checks if the given layer is "net copper", meaning it is eligible for net coloring
* Checks if the given layer is "net copper", meaning it is eligible for net coloring.
*
* @param aLayer is the layer to test
* @return true if the layer is one that participates in net coloring
*/

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2009-2019 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2009-2020 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -105,7 +105,8 @@ void BOARD_STACKUP_ITEM::RemoveDielectricPrms( int aDielectricPrmsIdx )
{
// Remove a DIELECTRIC_PRMS item from m_DielectricPrmsList if possible
if( GetSublayersCount() < 2 || aDielectricPrmsIdx < 0 || aDielectricPrmsIdx >= GetSublayersCount() )
if( GetSublayersCount() < 2 || aDielectricPrmsIdx < 0
|| aDielectricPrmsIdx >= GetSublayersCount() )
return;
m_DielectricPrmsList.erase( m_DielectricPrmsList.begin() + aDielectricPrmsIdx );
@ -126,6 +127,7 @@ int BOARD_STACKUP_ITEM::GetMaskDefaultThickness()
return Millimeter2iu( 0.01 );
}
// Getters:
int BOARD_STACKUP_ITEM::GetThickness( int aDielectricSubLayer ) const
{
@ -298,7 +300,7 @@ wxString BOARD_STACKUP_ITEM::FormatLossTangent( int aDielectricSubLayer ) const
wxString BOARD_STACKUP_ITEM::FormatDielectricLayerName() const
{
// return a wxString to print/display a dielectriv name
// return a wxString to print/display a dielectric name
wxString lname;
lname.Printf( _( "Dielectric %d" ), GetDielectricLayerId() );
@ -613,9 +615,8 @@ void BOARD_STACKUP::BuildDefaultStackupList( BOARD_DESIGN_SETTINGS* aSettings,
}
void BOARD_STACKUP::FormatBoardStackup( OUTPUTFORMATTER* aFormatter,
BOARD* aBoard, int aNestLevel ) const
BOARD* aBoard, int aNestLevel ) const
{
// Board stackup is the ordered list from top to bottom of
// physical layers and substrate used to build the board.
@ -632,11 +633,9 @@ void BOARD_STACKUP::FormatBoardStackup( OUTPUTFORMATTER* aFormatter,
wxString layer_name;
if( item->GetBrdLayerId() == UNDEFINED_LAYER )
{
layer_name.Printf( "dielectric %d", item->GetDielectricLayerId() );
}
else
layer_name = aBoard->GetLayerName( item->GetBrdLayerId() );
layer_name = LSET::Name( item->GetBrdLayerId() );
aFormatter->Print( nest_level, "(layer %s (type %s)",
aFormatter->Quotew( layer_name ).c_str(),

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2009-2019 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2009-2020 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -30,12 +30,13 @@
#include <wx/string.h>
#include <layers_id_colors_and_visibility.h>
class BOARD;
class BOARD_DESIGN_SETTINGS;
class OUTPUTFORMATTER;
// A enum to manage the different layers inside the stackup layers.
// Note the stackup layers include both dielectric and some layers handled by the board editor
// Therefore a stackup layer item is not exactely like a board layer
// Therefore a stackup layer item is not exactly like a board layer
enum BOARD_STACKUP_ITEM_TYPE
{
BS_ITEM_TYPE_UNDEFINED, // For not yet initialized BOARD_STACKUP_ITEM item
@ -53,7 +54,7 @@ enum BS_EDGE_CONNECTOR_CONSTRAINTS
{
BS_EDGE_CONNECTOR_NONE, // No edge connector in board
BS_EDGE_CONNECTOR_IN_USE, // some edge connector in board
BS_EDGE_CONNECTOR_BEVELLED // Some connector in board, and the connector must be bevelled
BS_EDGE_CONNECTOR_BEVELLED // Some connector in board, and the connector must be beveled
};
@ -68,7 +69,7 @@ private:
wxString m_Material; /// type of material (for dielectric and solder mask)
int m_Thickness; /// the physical layer thickness in internal units
bool m_ThicknessLocked; /// true for dielectric layers with a fixed thickness
/// (for impendace controled purposes), unused for other layers
/// (for impedance controlled purposes), unused for other layers
double m_EpsilonR; /// For dielectric (and solder mask) the dielectric constant
double m_LossTangent; /// For dielectric (and solder mask) the dielectric loss
@ -93,18 +94,18 @@ public:
private:
BOARD_STACKUP_ITEM_TYPE m_Type;
wxString m_LayerName; /// name of layer as shown in layer manager. Usefull to create reports
wxString m_LayerName; /// name of layer as shown in layer manager. Useful to create reports
wxString m_TypeName; /// type name of layer (copper, silk screen, core, prepreg ...)
wxString m_Color; /// mainly for silkscreen and solder mask
PCB_LAYER_ID m_LayerId; /// the layer id (F.Cu to B.Cu, F.Silk, B.silk, F.Mask, B.Mask)
/// and UNDEFINED_LAYER (-1) for dielectic layers that are not
/// and UNDEFINED_LAYER (-1) for dielectric layers that are not
/// really layers for the board editor
int m_DielectricLayerId;/// the "layer" id for dielectric layers,
/// from 1 (top) to 31 (bottom)
/// (only 31 dielectric layers for 32 copper layers)
/// List of dielectric parameters
/// usually only one item, but in complex (microwave) boards, one can have
/// more than one dielectic layer between 2 copper layers, and therfore
/// more than one dielectric layer between 2 copper layers, and therefore
/// more than one item in list
std::vector<DIELECTRIC_PRMS> m_DielectricPrmsList;
@ -127,11 +128,11 @@ public:
*/
void RemoveDielectricPrms( int aDielectricPrmsIdx );
/// @return true if the layer has a meaningfull Epsilon R parameter
/// @return true if the layer has a meaningful Epsilon R parameter
/// namely dielectric layers: dielectric and solder mask
bool HasEpsilonRValue() const;
/// @return true if the layer has a meaningfull Dielectric Loss parameter
/// @return true if the layer has a meaningfully Dielectric Loss parameter
/// namely dielectric layers: dielectric and solder mask
bool HasLossTangentValue() const;
@ -203,7 +204,7 @@ public:
* they are solder mask, silk screen, copper and dielectric
* Some other layers, used in fabrication, are not managed here because they
* are not used to make a physical board itself
* Note also there are a few other parameters realed to the physical stackup,
* Note also there are a few other parameters related to the physical stackup,
* like finish type, impedance control and a few others
*/
class BOARD_STACKUP
@ -229,11 +230,11 @@ public:
*/
bool m_HasThicknessConstrains;
/** If the board has edge connector cards, some constrains can be specifed
/** If the board has edge connector cards, some constrains can be specified
* in job file:
* BS_EDGE_CONNECTOR_NONE = no edge connector
* BS_EDGE_CONNECTOR_IN_USE = board has edge connectors
* BS_EDGE_CONNECTOR_BEVELLED = edge connectors are bevelled
* BS_EDGE_CONNECTOR_BEVELLED = edge connectors are beveled
*/
BS_EDGE_CONNECTOR_CONSTRAINTS m_EdgeConnectorConstraints;
@ -291,7 +292,8 @@ public:
* of copper layers to use to calculate a default dielectric thickness.
* ((<= 0 to use all copper layers)
*/
void BuildDefaultStackupList( BOARD_DESIGN_SETTINGS* aSettings, int aActiveCopperLayersCount = 0 );
void BuildDefaultStackupList( BOARD_DESIGN_SETTINGS* aSettings,
int aActiveCopperLayersCount = 0 );
/**
* Writes the stackup info on board file

View File

@ -158,7 +158,7 @@ void BOARD::SetProject( PROJECT* aProject )
if( m_LegacyNetclassesLoaded )
project.NetSettings().m_NetClasses = GetDesignSettings().GetNetClasses();
// Now update the DesignSettings' netclass pointer ot point into the project.
// Now update the DesignSettings' netclass pointer to point into the project.
GetDesignSettings().SetNetClasses( &project.NetSettings().m_NetClasses );
}
}
@ -278,14 +278,15 @@ bool BOARD::SetLayerDescr( PCB_LAYER_ID aIndex, const LAYER& aLayer )
const PCB_LAYER_ID BOARD::GetLayerID( const wxString& aLayerName ) const
{
// Look for the BOARD specific copper layer names
// Check the BOARD physical layer names.
for( LAYER_NUM layer = 0; layer < PCB_LAYER_ID_COUNT; ++layer )
{
if ( IsCopperLayer( layer ) && ( m_Layer[ layer ].m_name == aLayerName ) )
if ( ( m_Layer[ layer ].m_name == aLayerName )
|| ( m_Layer[ layer ].m_userName == aLayerName ) )
return ToLAYER_ID( layer );
}
// Otherwise fall back to the system standard layer names
// Otherwise fall back to the system standard layer names for virtual layers.
for( LAYER_NUM layer = 0; layer < PCB_LAYER_ID_COUNT; ++layer )
{
if( GetStandardLayerName( ToLAYER_ID( layer ) ) == aLayerName )
@ -295,42 +296,34 @@ const PCB_LAYER_ID BOARD::GetLayerID( const wxString& aLayerName ) const
return UNDEFINED_LAYER;
}
const wxString BOARD::GetLayerName( PCB_LAYER_ID aLayer ) const
{
// All layer names are stored in the BOARD.
if( IsLayerEnabled( aLayer ) )
{
// Standard names were set in BOARD::BOARD() but they may be
// over-ridden by BOARD::SetLayerName().
// For copper layers, return the actual copper layer name,
// otherwise return the Standard English layer name.
if( IsCopperLayer( aLayer ) )
return m_Layer[aLayer].m_name;
// Standard names were set in BOARD::BOARD() but they may be over-ridden by
// BOARD::SetLayerName(). For copper layers, return the user defined layer name,
// if it was set. Otherwise return the Standard English layer name.
if( !m_Layer[aLayer].m_userName.IsEmpty() )
return m_Layer[aLayer].m_userName;
}
return GetStandardLayerName( aLayer );
}
bool BOARD::SetLayerName( PCB_LAYER_ID aLayer, const wxString& aLayerName )
{
if( !IsCopperLayer( aLayer ) )
return false;
if( aLayerName == wxEmptyString )
return false;
wxCHECK( !aLayerName.IsEmpty(), false );
// no quote chars in the name allowed
if( aLayerName.Find( wxChar( '"' ) ) != wxNOT_FOUND )
return false;
wxString nameTemp = aLayerName;
// replace any spaces with underscores before we do any comparing
nameTemp.Replace( wxT( " " ), wxT( "_" ) );
if( IsLayerEnabled( aLayer ) )
{
m_Layer[aLayer].m_name = nameTemp;
m_Layer[aLayer].m_userName = aLayerName;
return true;
}
@ -1244,6 +1237,7 @@ MODULE* BOARD::FindModuleByPath( const KIID_PATH& aPath ) const
// This is needed by the sort function sortNetsByNodes()
static std::vector<int> padCountListByNet;
// Sort nets by decreasing pad count.
// For same pad count, sort by alphabetic names
static bool sortNetsByNodes( const NETINFO_ITEM* a, const NETINFO_ITEM* b )
@ -1257,12 +1251,14 @@ static bool sortNetsByNodes( const NETINFO_ITEM* a, const NETINFO_ITEM* b )
return countB < countA;
}
// Sort nets by alphabetic names
static bool sortNetsByNames( const NETINFO_ITEM* a, const NETINFO_ITEM* b )
{
return a->GetNetname() < b->GetNetname();
}
int BOARD::SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount )
{
if( m_NetInfo.GetNetCount() == 0 )
@ -1362,7 +1358,8 @@ void BOARD::SynchronizeNetsAndNetClasses()
BOARD_DESIGN_SETTINGS& bds = GetDesignSettings();
// Set initial values for custom track width & via size to match the default netclass settings
// Set initial values for custom track width & via size to match the default
// netclass settings
bds.UseCustomTrackViaSize( false );
bds.SetCustomTrackWidth( defaultNetClass->GetTrackWidth() );
bds.SetCustomViaSize( defaultNetClass->GetViaDiameter() );
@ -1554,8 +1551,8 @@ D_PAD* BOARD::GetPad( std::vector<D_PAD*>& aPadList, const wxPoint& aPosition, L
/**
* Function SortPadsByXCoord
* is used by GetSortedPadListByXCoord to Sort a pad list by x coordinate value.
* Used by #GetSortedPadListByXCoord to sort a pad list by X coordinate value.
*
* This function is used to build ordered pads lists
*/
bool sortPadsByXthenYCoord( D_PAD* const & ref, D_PAD* const & comp )
@ -1702,6 +1699,26 @@ MODULE* BOARD::GetFootprint( const wxPoint& aPosition, PCB_LAYER_ID aActiveLayer
}
std::list<ZONE_CONTAINER*> BOARD::GetZoneList( bool aIncludeZonesInFootprints )
{
std::list<ZONE_CONTAINER*> zones;
for( ZONE_CONTAINER* zone : Zones() )
zones.push_back( zone );
if( aIncludeZonesInFootprints )
{
for( MODULE* mod : m_modules )
{
for( MODULE_ZONE_CONTAINER* zone : mod->Zones() )
zones.push_back( zone );
}
}
return zones;
}
ZONE_CONTAINER* BOARD::AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode, PCB_LAYER_ID aLayer,
wxPoint aStartPointPosition, ZONE_BORDER_DISPLAY_STYLE aHatch )
{
@ -1949,6 +1966,7 @@ void BOARD::HighLightON( bool aValue )
}
}
PCB_GROUP* BOARD::TopLevelGroup( BOARD_ITEM* item, PCB_GROUP* scope )
{
PCB_GROUP* candidate = NULL;
@ -2113,7 +2131,8 @@ wxString BOARD::GroupsSanityCheckInternal( bool repair )
if( repair )
board.Groups().erase( board.Groups().begin() + idx );
return wxString::Format( _( "Group must have at least one member: %s" ), group.m_Uuid.AsString() );
return wxString::Format( _( "Group must have at least one member: %s" ),
group.m_Uuid.AsString() );
}
}
@ -2174,7 +2193,8 @@ wxString BOARD::GroupsSanityCheckInternal( bool repair )
}
}
// No cycles found in chain, so add it to set of groups we know don't participate in a cycle.
// No cycles found in chain, so add it to set of groups we know don't participate
// in a cycle.
knownCycleFreeGroups.insert( currentChainGroups.begin(), currentChainGroups.end() );
}
@ -2281,6 +2301,7 @@ BOARD::GroupLegalOpsField BOARD::GroupLegalOps( const PCBNEW_SELECTION& selectio
return legalOps;
}
void BOARD::GroupRemoveItems( const PCBNEW_SELECTION& selection, BOARD_COMMIT* commit )
{
std::unordered_set<BOARD_ITEM*> emptyGroups;

View File

@ -57,8 +57,7 @@ class PROJECT;
enum ENDPOINT_T : int;
/**
* Enum LAYER_T
* gives the allowed types of layers, same as Specctra DSN spec.
* The allowed types of layers, same as Specctra DSN spec.
*/
enum LAYER_T
{
@ -71,8 +70,7 @@ enum LAYER_T
/**
* LAYER
* holds information pertinent to a layer of a BOARD.
* Container to hold information pertinent to a layer of a BOARD.
*/
struct LAYER
{
@ -87,6 +85,7 @@ struct LAYER
m_visible = true;
m_number = 0;
m_name.clear();
m_userName.clear();
}
/*
@ -100,22 +99,23 @@ struct LAYER
}
*/
wxString m_name; ///< The name of the layer, there should be no spaces in this name.
LAYER_T m_type; ///< The type of the layer
wxString m_name; ///< The canonical name of the layer. @see #LSET::Name
wxString m_userName; ///< The user defined name of the layer.
LAYER_T m_type; ///< The type of the layer. @see #LAYER_T
bool m_visible;
int m_number;
int m_number; ///< The layer ID. @see PCB_LAYER_ID
/**
* Function ShowType
* converts a LAYER_T enum to a const char*
* @param aType The LAYER_T to convert
* Convert a #LAYER_T enum to a string representation of the layer type.
*
* @param aType The #LAYER_T to convert
* @return const char* - The string representation of the layer type.
*/
static const char* ShowType( LAYER_T aType );
/**
* Function ParseType
* converts a string to a LAYER_T
* Convert a string to a #LAYER_T
*
* @param aType The const char* to convert
* @return LAYER_T - The binary representation of the layer type, or
* LAYER_T(-1) if the string is invalid
@ -146,8 +146,7 @@ protected:
};
/**
* BOARD_LISTENER
* provides an interface to hook into board modifications and get callbacks
* Provides an interface to hook into board modifications and get callbacks
* on certain modifications that are made to the board. This allows updating
* auxiliary views other than the primary board editor view.
*/
@ -172,8 +171,7 @@ DECL_DEQ_FOR_SWIG( TRACKS, TRACK* )
DECL_DEQ_FOR_SWIG( GROUPS, PCB_GROUP* )
/**
* BOARD
* holds information pertinent to a Pcbnew printed circuit board.
* Information pertinent to a Pcbnew printed circuit board.
*/
class BOARD : public BOARD_ITEM_CONTAINER
{
@ -257,12 +255,12 @@ public:
MARKERS& Markers() { return m_markers; }
/**
* The groups must maintain the folowing invariants. These are checked by
* The groups must maintain the following invariants. These are checked by
* GroupsSanityCheck():
* - An item may appear in at most one group
* - Each gruop must contain at least one item
* - Each group must contain at least one item
* - If a group specifies a name, it must be unique
* - The graph of groups contianing subgroups must be acyclic.
* - The graph of groups containing subgroups must be acyclic.
*/
GROUPS& Groups() { return m_groups; }
@ -338,9 +336,8 @@ public:
wxString ConvertKIIDsToCrossReferences( const wxString& aSource );
/**
* Function GetConnectivity()
* returns list of missing connections between components/tracks.
* @return an object that contains informations about missing connections.
* Return a list of missing connections between components/tracks.
* @return an object that contains information about missing connections.
*/
std::shared_ptr<CONNECTIVITY_DATA> GetConnectivity() const { return m_connectivity; }
@ -352,8 +349,7 @@ public:
void BuildConnectivity();
/**
* Function DeleteMARKERs
* deletes ALL MARKERS from the board.
* Delete all MARKERS from the board.
*/
void DeleteMARKERs();
@ -371,13 +367,11 @@ public:
void ClearProject();
/**
* Function ResetNetHighLight
* Reset all high light data to the init state
*/
void ResetNetHighLight();
/**
* Function GetHighLightNetCode
* @return the set of net codes that should be highlighted
*/
const std::set<int>& GetHighLightNetCodes() const
@ -386,7 +380,6 @@ public:
}
/**
* Function SetHighLightNet
* Select the netcode to be highlighted.
* @param aNetCode is the net to highlight
* @param aMulti is true if you want to add a highlighted net without clearing the old one
@ -394,7 +387,6 @@ public:
void SetHighLightNet( int aNetCode, bool aMulti = false );
/**
* Function IsHighLightNetON
* @return true if a net is currently highlighted
*/
bool IsHighLightNetON() const { return m_highLight.m_highLightOn; }
@ -408,7 +400,6 @@ public:
void HighLightON( bool aValue = true );
/**
* Function HighLightOFF
* Disable net highlight.
*/
void HighLightOFF()
@ -417,31 +408,27 @@ public:
}
/**
* Function GetCopperLayerCount
* @return int - The number of copper layers in the BOARD.
*/
int GetCopperLayerCount() const;
void SetCopperLayerCount( int aCount );
/**
* Function GetEnabledLayers
* is a proxy function that calls the corresponding function in m_BoardSettings
* A proxy function that calls the corresponding function in m_BoardSettings
* Returns a bit-mask of all the layers that are enabled
* @return int - the enabled layers in bit-mapped form.
*/
LSET GetEnabledLayers() const;
/**
* Function SetEnabledLayers
* is a proxy function that calls the correspondent function in m_BoardSettings
* A proxy function that calls the correspondent function in m_BoardSettings
* Changes the bit-mask of enabled layers
* @param aLayerMask = The new bit-mask of enabled layers
*/
void SetEnabledLayers( LSET aLayerMask );
/**
* Function IsLayerEnabled
* is a proxy function that calls the correspondent function in m_BoardSettings
* A proxy function that calls the correspondent function in m_BoardSettings
* tests whether a given layer is enabled
* @param aLayer = The layer to be tested
* @return bool - true if the layer is visible.
@ -452,8 +439,7 @@ public:
}
/**
* Function IsLayerVisible
* is a proxy function that calls the correspondent function in m_BoardSettings
* A proxy function that calls the correspondent function in m_BoardSettings
* tests whether a given layer is visible
* @param aLayer = The layer to be tested
* @return bool - true if the layer is visible.
@ -461,16 +447,14 @@ public:
bool IsLayerVisible( PCB_LAYER_ID aLayer ) const;
/**
* Function GetVisibleLayers
* is a proxy function that calls the correspondent function in m_BoardSettings
* A proxy function that calls the correspondent function in m_BoardSettings
* Returns a bit-mask of all the layers that are visible
* @return int - the visible layers in bit-mapped form.
*/
LSET GetVisibleLayers() const;
/**
* Function SetVisibleLayers
* is a proxy function that calls the correspondent function in m_BoardSettings
* A proxy function that calls the correspondent function in m_BoardSettings
* changes the bit-mask of visible layers
* @param aLayerMask = The new bit-mask of visible layers
*/
@ -487,8 +471,7 @@ public:
GAL_SET GetVisibleElements() const;
/**
* Function SetVisibleElements
* is a proxy function that calls the correspondent function in m_BoardSettings
* A proxy function that calls the correspondent function in m_BoardSettings
* changes the bit-mask of visible element categories
* @param aMask = The new bit-mask of visible element bitmap or-ed from enum GAL_LAYER_ID
* @see enum GAL_LAYER_ID
@ -496,16 +479,13 @@ public:
void SetVisibleElements( const GAL_SET& aMask );
/**
* Function SetVisibleAlls
* changes the bit-mask of visible element categories and layers
* Change the bit-mask of visible element categories and layers
* @see enum GAL_LAYER_ID
*/
void SetVisibleAlls();
/**
* Function IsElementVisible
* tests whether a given element category is visible. Keep this as an
* inline function.
* Test whether a given element category is visible. Keep this as an inline function.
* @param aLayer is from the enum by the same name
* @return bool - true if the element is visible.
* @see enum GAL_LAYER_ID
@ -513,8 +493,7 @@ public:
bool IsElementVisible( GAL_LAYER_ID aLayer ) const;
/**
* Function SetElementVisibility
* changes the visibility of an element category
* Change the visibility of an element category.
* @param aLayer is from the enum by the same name
* @param aNewState = The new visibility state of the element category
* @see enum GAL_LAYER_ID
@ -522,8 +501,7 @@ public:
void SetElementVisibility( GAL_LAYER_ID aLayer, bool aNewState );
/**
* Function IsModuleLayerVisible
* expects either of the two layers on which a module can reside, and returns
* Expect either of the two layers on which a module can reside, and returns
* whether that layer is visible.
* @param aLayer One of the two allowed layers for modules: F_Cu or B_Cu
* @return bool - true if the layer is visible, else false.
@ -531,7 +509,6 @@ public:
bool IsModuleLayerVisible( PCB_LAYER_ID aLayer );
/**
* Function GetDesignSettings
* @return the BOARD_DESIGN_SETTINGS for this BOARD
*/
BOARD_DESIGN_SETTINGS& GetDesignSettings() const
@ -561,8 +538,7 @@ public:
wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
/**
* Function GetBoardPolygonOutlines
* Extracts the board outlines and build a closed polygon
* Extract the board outlines and build a closed polygon
* from lines, arcs and circle items on edge cut layer
* Any closed outline inside the main outline is a hole
* All contours should be closed, i.e. have valid vertices to build a closed polygon
@ -579,11 +555,10 @@ public:
wxPoint* aErrorLocation = nullptr );
/**
* Function ConvertBrdLayerToPolygonalContours
* Build a set of polygons which are the outlines of copper items
* (pads, tracks, vias, texts, zones)
* Holes in vias or pads are ignored
* Usefull to export the shape of copper layers to dxf polygons
* Useful to export the shape of copper layers to dxf polygons
* or 3D viewer
* the polygons are not merged.
* @param aLayer = A copper layer, like B_Cu, etc.
@ -592,20 +567,21 @@ public:
void ConvertBrdLayerToPolygonalContours( PCB_LAYER_ID aLayer, SHAPE_POLY_SET& aOutlines );
/**
* Function GetLayerID
* returns the ID of a layer. Copper layers may have custom names.
* Return the ID of a layer.
*/
const PCB_LAYER_ID GetLayerID( const wxString& aLayerName ) const;
/**
* Function GetLayerName
* returns the name of a layer. Copper layers may have custom names.
* Return the name of a \a aLayer.
*
* @param aLayer is the #PCB_LAYER_ID of the layer.
*
* @return a string containing the appropriate layer type.
*/
const wxString GetLayerName( PCB_LAYER_ID aLayer ) const;
/**
* Function SetLayerName
* changes the name of the layer given by aLayer.
* Changes the name of the layer given by aLayer.
*
* @param aLayer A layer, like B_Cu, etc.
* @param aLayerName The new layer name
@ -615,8 +591,7 @@ public:
bool SetLayerName( PCB_LAYER_ID aLayer, const wxString& aLayerName );
/**
* Function GetStandardLayerName
* returns an "English Standard" name of a PCB layer when given \a aLayerNumber.
* Return an "English Standard" name of a PCB layer when given \a aLayerNumber.
* This function is static so it can be called without a BOARD instance. Use
* GetLayerName() if want the layer names of a specific BOARD, which could
* be different than the default if the user has renamed any copper layers.
@ -632,8 +607,7 @@ public:
}
/**
* Function SetLayerDescr
* returns the type of the copper layer given by aLayer.
* Return the type of the copper layer given by aLayer.
*
* @param aIndex A layer index in m_Layer
* @param aLayer A reference to a LAYER description.
@ -642,8 +616,7 @@ public:
bool SetLayerDescr( PCB_LAYER_ID aIndex, const LAYER& aLayer );
/**
* Function GetLayerType
* returns the type of the copper layer given by aLayer.
* Return the type of the copper layer given by aLayer.
*
* @param aLayer A layer index, like B_Cu, etc.
* @return LAYER_T - the layer type, or LAYER_T(-1) if the
@ -652,8 +625,7 @@ public:
LAYER_T GetLayerType( PCB_LAYER_ID aLayer ) const;
/**
* Function SetLayerType
* changes the type of the layer given by aLayer.
* Change the type of the layer given by aLayer.
*
* @param aLayer A layer index, like B_Cu, etc.
* @param aLayerType The new layer type.
@ -662,29 +634,27 @@ public:
bool SetLayerType( PCB_LAYER_ID aLayer, LAYER_T aLayerType );
/**
* Function GetNodesCount
* @param aNet Only count nodes belonging to this net
* @return the number of pads members of nets (i.e. with netcode > 0)
*/
unsigned GetNodesCount( int aNet = -1 );
/**
* Function GetUnconnectedNetCount
* @return the number of unconnected nets in the current ratsnest.
*/
unsigned GetUnconnectedNetCount() const;
/**
* Function GetPadCount
* @return the number of pads in board
*/
unsigned GetPadCount();
/**
* Function GetPads
* returns a reference to a list of all the pads. The returned list is not
* sorted and contains pointers to PADS, but those pointers do not convey
* ownership of the respective PADs.
* Return a reference to a list of all the pads.
*
* The returned list is not sorted and contains pointers to PADS, but those pointers do
* not convey ownership of the respective PADs.
*
* @return D_PADS - a full list of pads
*/
const std::vector<D_PAD*> GetPads();
@ -695,16 +665,14 @@ public:
}
/**
* Function FindNet
* searches for a net with the given netcode.
* Search for a net with the given netcode.
* @param aNetcode A netcode to search for.
* @return NETINFO_ITEM_ITEM* - the net or NULL if not found.
*/
NETINFO_ITEM* FindNet( int aNetcode ) const;
/**
* Function FindNet overloaded
* searches for a net with the given name.
* Search for a net with the given name.
* @param aNetname A Netname to search for.
* @return NETINFO_ITEM* - the net or NULL if not found.
*/
@ -722,7 +690,6 @@ public:
#ifndef SWIG
/**
* Function BeginNets
* @return iterator to the first element of the NETINFO_ITEMs list
*/
NETINFO_LIST::iterator BeginNets() const
@ -731,7 +698,6 @@ public:
}
/**
* Function EndNets
* @return iterator to the last element of the NETINFO_ITEMs list
*/
NETINFO_LIST::iterator EndNets() const
@ -741,7 +707,6 @@ public:
#endif
/**
* Function GetNetCount
* @return the number of nets (NETINFO_ITEM)
*/
unsigned GetNetCount() const
@ -750,8 +715,8 @@ public:
}
/**
* Function ComputeBoundingBox
* calculates the bounding box containing all board items (or board edge segments).
* Calculate the bounding box containing all board items (or board edge segments).
*
* @param aBoardEdgesOnly is true if we are interested in board edge segments only.
* @return EDA_RECT - the board's bounding box
*/
@ -763,10 +728,12 @@ public:
}
/**
* Function GetBoardEdgesBoundingBox
* Returns the board bounding box calculated using exclusively the board edges (graphics
* on Edge.Cuts layer). If there are items outside of the area limited by Edge.Cuts graphics,
* the items will not be taken into account.
* on Edge.Cuts layer).
*
* If there are items outside of the area limited by Edge.Cuts graphics, the items will
* not be taken into account.
*
* @return bounding box calculated using exclusively the board edges.
*/
const EDA_RECT GetBoardEdgesBoundingBox() const
@ -777,8 +744,7 @@ public:
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
/**
* Function Visit
* may be re-implemented for each derived class in order to handle
* May be re-implemented for each derived class in order to handle
* all the types given by its member data. Implementations should call
* inspector->Inspect() on types in scanTypes[], and may use IterateForward()
* to do so on lists of such data.
@ -792,24 +758,24 @@ public:
SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
/**
* Function FindModuleByReference
* searches for a MODULE within this board with the given reference designator.
* Search for a MODULE within this board with the given reference designator.
*
* Finds only the first one, if there is more than one such MODULE.
*
* @param aReference The reference designator of the MODULE to find.
* @return MODULE* - If found, the MODULE having the given reference designator, else NULL.
*/
MODULE* FindModuleByReference( const wxString& aReference ) const;
/**
* Function FindModuleByPath
* searches for a MODULE within this board with the given path.
* Search for a MODULE within this board with the given path.
*
* @param aPath The path ([sheetUUID, .., symbolUUID]) to search for.
* @return MODULE* - If found, the MODULE having the given uuid, else NULL.
*/
MODULE* FindModuleByPath( const KIID_PATH& aPath ) const;
/**
* Function SortedNetnamesList
* @param aNames An array string to fill with net names.
* @param aSortbyPadsCount true = sort by active pads count, false = no sort (i.e.
* leave the sort by net names)
@ -818,15 +784,16 @@ public:
int SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount );
/**
* Function GetNetClassAssignmentCandidates
* Returns a list of name candidates for netclass assignment. Tokens may appear more
* than once if they were harvested from hierarchical nets (ie: /CLK, /sheet1/CLK).
* Return a list of name candidates for netclass assignment.
*
* Tokens may appear more than once if they were harvested from hierarchical nets
* (ie: /CLK, /sheet1/CLK).
*/
std::vector<wxString> GetNetClassAssignmentCandidates();
/**
* Function SynchronizeNetsAndNetClasses
* copies NETCLASS info to each NET, based on NET membership in a NETCLASS.
* Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.
*
* Must be called after a Design Rules edit, or after reading a netlist (or editing
* the list of nets) Also this function removes the non existing nets in netclasses
* and add net nets in default netclass (this happens after reading a netlist)
@ -834,8 +801,7 @@ public:
void SynchronizeNetsAndNetClasses();
/**
* Function SynchronizeProperties
* copies the current project's text variables into the boards property cache.
* Copy the current project's text variables into the boards property cache.
*/
void SynchronizeProperties();
@ -854,7 +820,6 @@ public:
/*************************/
/**
* Function SetAreasNetCodesFromNetNames
* Set the .m_NetCode member of all copper areas, according to the area Net Name
* The SetNetCodesFromNetNames is an equivalent to net name, for fast comparisons.
* However the Netcode is an arbitrary equivalence, it must be set after each netlist read
@ -866,8 +831,8 @@ public:
int SetAreasNetCodesFromNetNames();
/**
* Function GetArea
* returns the Area (Zone Container) at a given index.
* Return the Area (Zone Container) at a given index.
*
* @param index The array type index into a collection of ZONE_CONTAINER *.
* @return ZONE_CONTAINER* - a pointer to the Area or NULL if index out of range.
*/
@ -880,7 +845,11 @@ public:
}
/**
* Function GetAreaCount
* @return a std::list of pointers to all board zones (possibly including zones in footprints)
*/
std::list<ZONE_CONTAINER*> GetZoneList( bool aIncludeZonesInFootprints = false );
/**
* @return The number of Areas or ZONE_CONTAINER.
*/
int GetAreaCount() const
@ -891,8 +860,8 @@ public:
/* Functions used in test, merge and cut outlines */
/**
* Function AddArea
* Add an empty copper area to board areas list
* Add an empty copper area to board areas list.
*
* @param aNewZonesList = a PICKED_ITEMS_LIST * where to store new areas pickers (useful
* in undo commands) can be NULL
* @param aNetcode = the netcode of the copper area (0 = no net)
@ -905,7 +874,6 @@ public:
wxPoint aStartPointPosition, ZONE_BORDER_DISPLAY_STYLE aHatch );
/**
* Function NormalizeAreaPolygon
* Process an area that has been modified, by normalizing its polygon against itself.
* i.e. convert a self-intersecting polygon to one (or more) non self-intersecting polygon(s)
* This may change the number and order of copper areas in the net.
@ -916,7 +884,6 @@ public:
bool NormalizeAreaPolygon( PICKED_ITEMS_LIST* aNewZonesList, ZONE_CONTAINER* aCurrArea );
/**
* Function OnAreaPolygonModified
* Process an area that has been modified, by normalizing its polygon
* and merging the intersecting polygons for any other areas on the same net.
* This may change the number and order of copper areas in the net.
@ -929,8 +896,8 @@ public:
ZONE_CONTAINER* modified_area );
/**
* Function CombineAllAreasInNet
* Checks all copper areas in net for intersections, combining them if found
* Check all copper areas in net for intersections, combining them if found.
*
* @param aDeletedList = a PICKED_ITEMS_LIST * where to store deleted areas (useful
* in undo commands can be NULL
* @param aNetCode = net to consider
@ -943,8 +910,8 @@ public:
bool aUseLocalFlags );
/**
* Function RemoveArea
* remove copper area from net, and put it in a deleted list (if exists)
* Remove copper area from net, and put it in a deleted list (if exists).
*
* @param aDeletedList = a PICKED_ITEMS_LIST * where to store deleted areas (useful
* in undo commands can be NULL
* @param area_to_remove = area to delete or put in deleted list
@ -952,14 +919,12 @@ public:
void RemoveArea( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_to_remove );
/**
* Function TestAreaIntersections
* Check for intersection of a given copper area with other areas in same net
* @param area_to_test = area to compare to all other areas in the same net
*/
bool TestAreaIntersections( ZONE_CONTAINER* area_to_test );
/**
* Function TestAreaIntersection
* Test for intersection of 2 copper areas
* @param area_ref = area reference
* @param area_to_test = area to compare for intersection calculations
@ -968,7 +933,6 @@ public:
bool TestAreaIntersection( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_to_test );
/**
* Function CombineAreas
* If possible, combine 2 copper areas
* @param aDeletedList = a PICKED_ITEMS_LIST * where to store deleted areas
* (useful for undo).
@ -983,8 +947,7 @@ public:
ZONE_CONTAINER* area_to_combine );
/**
* Function GetPad
* finds a pad \a aPosition on \a aLayer.
* Find a pad \a aPosition on \a aLayer.
*
* @param aPosition A wxPoint object containing the position to hit test.
* @param aLayerMask A layer or layers to mask the hit test.
@ -997,8 +960,7 @@ public:
}
/**
* Function GetPad
* finds a pad connected to \a aEndPoint of \a aTrace.
* Find a pad connected to \a aEndPoint of \a aTrace.
*
* @param aTrace A pointer to a TRACK object to hit test against.
* @param aEndPoint The end point of \a aTrace the hit test against.
@ -1007,8 +969,7 @@ public:
D_PAD* GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint );
/**
* Function GetPadFast
* return pad found at \a aPosition on \a aLayerMask using the fast search method.
* Return pad found at \a aPosition on \a aLayerMask using the fast search method.
* <p>
* The fast search method only works if the pad list has already been built.
* </p>
@ -1019,8 +980,7 @@ public:
D_PAD* GetPadFast( const wxPoint& aPosition, LSET aLayerMask );
/**
* Function GetPad
* locates the pad connected at \a aPosition on \a aLayer starting at list position
* Locate the pad connected at \a aPosition on \a aLayer starting at list position
* \a aPad
* <p>
* This function uses a fast search in this sorted pad list and it is faster than
@ -1036,16 +996,14 @@ public:
D_PAD* GetPad( std::vector<D_PAD*>& aPadList, const wxPoint& aPosition, LSET aLayerMask );
/**
* Function PadDelete
* deletes a given bad from the BOARD by removing it from its module and
* Delete a given pad from the BOARD by removing it from its module and
* from the m_NetInfo. Makes no UI calls.
* @param aPad is the pad to delete.
*/
void PadDelete( D_PAD* aPad );
/**
* Function GetSortedPadListByXthenYCoord
* first empties then fills the vector with all pads and sorts them by
* First empties then fills the vector with all pads and sorts them by
* increasing x coordinate, and for increasing y coordinate for same values of x coordinates.
* The vector only holds pointers to the pads and
* those pointers are only references to pads which are owned by the BOARD
@ -1067,8 +1025,7 @@ public:
std::tuple<int, double, double> GetTrackLength( const TRACK& aTrack ) const;
/**
* Function TrackInNet
* collects all the TRACKs and VIAs that are members of a net given by aNetCode.
* Collect all the TRACKs and VIAs that are members of a net given by aNetCode.
* Used from python.
* @param aNetCode gives the id of the net.
* @return TRACKS - which are in the net identified by @a aNetCode.
@ -1076,8 +1033,7 @@ public:
TRACKS TracksInNet( int aNetCode );
/**
* Function GetFootprint
* get a footprint by its bounding rectangle at \a aPosition on \a aLayer.
* Get a footprint by its bounding rectangle at \a aPosition on \a aLayer.
* <p>
* If more than one footprint is at \a aPosition, then the closest footprint on the
* active layer is returned. The distance is calculated via manhattan distance from
@ -1093,8 +1049,7 @@ public:
bool aVisibleOnly, bool aIgnoreLocked = false );
/**
* Function ClearAllNetCodes()
* Resets all items' netcodes to 0 (no net).
* Reset all items' netcodes to 0 (no net).
*/
void ClearAllNetCodes();
@ -1110,7 +1065,7 @@ public:
/**
* Add a listener to the board to receive calls whenever something on the
* board has been modified. The board does not take ownership of the
* listener object. Make sure to call RemoveListener before deleing the
* listener object. Make sure to call RemoveListener before deleting the
* listener object. The order of listener invocations is not guaranteed.
* If the specified listener object has been added before, it will not be
* added again.

View File

@ -3,7 +3,7 @@
*
* Copyright (C) 2009 Isaac Marino Bavaresco, isaacbavaresco@yahoo.com.br
* Copyright (C) 2009 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2009-2018 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2009-2020 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -100,6 +100,16 @@ static LSEQ dlg_layers()
Eco1_User,
Cmts_User,
Dwgs_User,
User_1,
User_2,
User_3,
User_4,
User_5,
User_6,
User_7,
User_8,
User_9,
};
return LSEQ( layers, layers + arrayDim( layers ) );
@ -142,8 +152,8 @@ PANEL_SETUP_LAYERS::PANEL_SETUP_LAYERS( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* a
PANEL_SETUP_LAYERS_CTLs PANEL_SETUP_LAYERS::getCTLs( LAYER_NUM aLayerNumber )
{
#define RETURN_COPPER(x) return PANEL_SETUP_LAYERS_CTLs( x##Name, x##CheckBox, x##Choice )
#define RETURN_AUX(x) return PANEL_SETUP_LAYERS_CTLs( x##Name, x##CheckBox, x##StaticText )
#define RETURN_COPPER( x ) return PANEL_SETUP_LAYERS_CTLs( x##Name, x##CheckBox, x##Choice )
#define RETURN_AUX( x ) return PANEL_SETUP_LAYERS_CTLs( x##Name, x##CheckBox, x##StaticText )
switch( aLayerNumber )
{
@ -201,6 +211,17 @@ PANEL_SETUP_LAYERS_CTLs PANEL_SETUP_LAYERS::getCTLs( LAYER_NUM aLayerNumber )
case Eco1_User: RETURN_AUX( m_Eco1 );
case Cmts_User: RETURN_AUX( m_Comments );
case Dwgs_User: RETURN_AUX( m_Drawings );
case User_1: RETURN_AUX( m_User1 );
case User_2: RETURN_AUX( m_User2 );
case User_3: RETURN_AUX( m_User3 );
case User_4: RETURN_AUX( m_User4 );
case User_5: RETURN_AUX( m_User5 );
case User_6: RETURN_AUX( m_User6 );
case User_7: RETURN_AUX( m_User7 );
case User_8: RETURN_AUX( m_User8 );
case User_9: RETURN_AUX( m_User9 );
default:
wxASSERT_MSG( 0, wxT( "bad layer id" ) );
return PANEL_SETUP_LAYERS_CTLs( nullptr, nullptr, nullptr );
@ -238,6 +259,7 @@ bool PANEL_SETUP_LAYERS::TransferDataToWindow()
showPresets( m_enabledLayers );
showLayerTypes();
setMandatoryLayerCheckBoxes();
setUserDefinedLayerCheckBoxes();
return true;
}
@ -250,6 +272,35 @@ void PANEL_SETUP_LAYERS::setMandatoryLayerCheckBoxes()
}
void PANEL_SETUP_LAYERS::setUserDefinedLayerCheckBoxes()
{
for( LSEQ seq = LSET::UserDefinedLayers().Seq(); seq; ++seq )
{
PCB_LAYER_ID layer = *seq;
bool state = m_pcb->IsLayerEnabled( layer );
#ifdef HIDE_INACTIVE_LAYERS
// This code hides non-active copper layers, or redisplays hidden
// layers which are now needed.
PANEL_SETUP_LAYERS_CTLs ctl = getCTLs( layer );
ctl.name->Show( state );
ctl.checkbox->Show( state );
ctl.choice->Show( state );
#endif
setLayerCheckBox( layer, state );
}
#ifdef HIDE_INACTIVE_LAYERS
// Send an size event to force sizers to be updated,
// because the number of copper layers can have changed.
wxSizeEvent evt_size( m_LayersListPanel->GetSize() );
m_LayersListPanel->GetEventHandler()->ProcessEvent( evt_size );
#endif
}
void PANEL_SETUP_LAYERS::showCopperChoice( int copperCount )
{
if( copperCount > MAX_CU_LAYERS )
@ -557,18 +608,29 @@ bool PANEL_SETUP_LAYERS::TransferDataFromWindow()
m_pcb->SetVisibleLayers( m_enabledLayers );
}
for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq )
for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq )
{
PCB_LAYER_ID layer = *seq;
if( m_enabledLayers[layer] )
{
m_pcb->SetLayerName( layer, GetLayerName( layer ) );
LAYER_T t = (LAYER_T) getLayerTypeIndex( layer );
m_pcb->SetLayerType( layer, t );
// Only copper layers have a definable type.
if( LSET::AllCuMask().Contains( layer ) )
{
LAYER_T t = (LAYER_T) getLayerTypeIndex( layer );
m_pcb->SetLayerType( layer, t );
}
}
}
for( LSEQ seq = LSET::UserDefinedLayers().Seq(); seq; ++seq )
{
if( m_enabledLayers[*seq] )
m_pcb->SetLayerName( *seq, GetLayerName( *seq ) );
}
// If some board items are deleted: Rebuild the connectivity,
// because it is likely some tracks and vias were removed
if( hasRemovedBoardItems )
@ -618,7 +680,7 @@ bool PANEL_SETUP_LAYERS::testLayerNames()
std::vector<wxString> names;
wxTextCtrl* ctl;
for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq )
for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq )
{
PCB_LAYER_ID layer = *seq;
@ -780,4 +842,63 @@ bool PANEL_SETUP_LAYERS::CheckCopperLayerCount( BOARD* aWorkingBoard, BOARD* aIm
}
return okToDeleteCopperLayers;
}
}
void PANEL_SETUP_LAYERS::addUserDefinedLayer( wxCommandEvent& aEvent )
{
LSEQ seq;
wxArrayString availableUserDefinedLayers;
for( seq = LSET::UserDefinedLayers().Seq(); seq; ++seq )
{
wxCheckBox* checkBox = getCheckBox( *seq );
if( checkBox && checkBox->IsChecked() )
continue;
availableUserDefinedLayers.Add( LayerName( *seq ) );
}
wxCHECK( !availableUserDefinedLayers.IsEmpty(), /* void */ );
wxSingleChoiceDialog dlg( this, _( "Select user defined layer to add to board layer set" ),
_( "Select Layer" ), availableUserDefinedLayers );
if( dlg.ShowModal() == wxID_CANCEL || dlg.GetStringSelection().IsEmpty() )
return;
for( seq = LSET::UserDefinedLayers().Seq(); seq; ++seq )
{
if( LayerName( *seq ) == dlg.GetStringSelection() )
break;
}
wxCHECK( *seq >= User_1 && *seq <= User_9, /* void */ );
LSET newLayer( *seq );
m_enabledLayers |= newLayer;
PANEL_SETUP_LAYERS_CTLs ctl = getCTLs( *seq );
wxTextCtrl* textCtrl = dynamic_cast<wxTextCtrl*>( ctl.name );
wxCHECK( textCtrl, /* void */ );
textCtrl->ChangeValue( LSET::Name( *seq ) );
ctl.name->Show( true );
ctl.checkbox->Show( true );
ctl.choice->Show( true );
wxSizeEvent evt_size( m_LayersListPanel->GetSize() );
m_LayersListPanel->GetEventHandler()->ProcessEvent( evt_size );
setLayerCheckBox( *seq, true );
}
void PANEL_SETUP_LAYERS::onUpdateAddUserDefinedLayer( wxUpdateUIEvent& event )
{
event.Enable( m_PresetsChoice->GetSelection() == 0 );
}

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2018 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2018-2020 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -88,6 +88,7 @@ private:
void setLayerCheckBox( LAYER_NUM layer, bool isChecked );
void setCopperLayerCheckBoxes( int copperCount );
void setMandatoryLayerCheckBoxes();
void setUserDefinedLayerCheckBoxes();
void showCopperChoice( int copperCount );
void showBoardLayerNames();
@ -103,6 +104,9 @@ private:
void OnCopperLayersChoice( wxCommandEvent& event ) override;
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
virtual void addUserDefinedLayer( wxCommandEvent& aEvent ) override;
virtual void onUpdateAddUserDefinedLayer( wxUpdateUIEvent& event ) override;
bool testLayerNames();

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -27,7 +27,7 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
bSizerLayerCnt->Add( m_PresetsChoice, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
bSizerLayerCnt->Add( 15, 0, 0, 0, 5 );
bSizerLayerCnt->Add( 0, 0, 1, wxEXPAND, 5 );
m_staticTextCopperLayers = new wxStaticText( this, wxID_ANY, _("Copper layers:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextCopperLayers->Wrap( -1 );
@ -40,13 +40,16 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
bSizerLayerCnt->Add( m_CopperLayersChoice, 0, wxALL|wxALIGN_CENTER_VERTICAL, 3 );
bSizerLayerCnt->Add( 15, 0, 0, 0, 5 );
bSizerLayerCnt->Add( 0, 0, 1, wxEXPAND, 5 );
m_addUserDefinedLayerButton = new wxButton( this, wxID_ANY, _("Add User Defined Layer"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerLayerCnt->Add( m_addUserDefinedLayerButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
bSizerMargins->Add( bSizerLayerCnt, 0, wxEXPAND, 5 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMargins->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
bSizerMargins->Add( m_staticline2, 0, wxEXPAND|wxTOP, 5 );
m_LayersListPanel = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL|wxVSCROLL );
m_LayersListPanel->SetScrollRate( 0, 5 );
@ -61,11 +64,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_CrtYdFrontCheckBox, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxLEFT, 5 );
m_CrtYdFrontName = new wxStaticText( m_LayersListPanel, ID_CRTYDFRONTNAME, _("CrtYd_Front_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_CrtYdFrontName->Wrap( -1 );
m_CrtYdFrontName->SetMinSize( wxSize( 110,-1 ) );
m_LayerListFlexGridSizer->Add( m_CrtYdFrontName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_CrtYdFrontName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("CrtYd_Front"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_CrtYdFrontName, 0, wxEXPAND|wxRIGHT, 5 );
m_CrtYdFrontStaticText = new wxStaticText( m_LayersListPanel, ID_CRTYDFRONTCHOICE, _("Off-board, testing"), wxDefaultPosition, wxDefaultSize, 0 );
m_CrtYdFrontStaticText->Wrap( -1 );
@ -78,9 +78,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_FabFrontCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_FabFrontName = new wxStaticText( m_LayersListPanel, ID_FABFRONTNAME, _("Fab_Front_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_FabFrontName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_FabFrontName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_FabFrontName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("Fab_Front"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_FabFrontName, 0, wxEXPAND|wxRIGHT, 5 );
m_FabFrontStaticText = new wxStaticText( m_LayersListPanel, ID_FABFRONTCHOICE, _("Off-board, manufacturing"), wxDefaultPosition, wxDefaultSize, 0 );
m_FabFrontStaticText->Wrap( -1 );
@ -91,9 +90,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_AdhesFrontCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_AdhesFrontName = new wxStaticText( m_LayersListPanel, ID_ADHESFRONTNAME, _("Adhes_Front_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_AdhesFrontName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_AdhesFrontName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_AdhesFrontName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("Adhes_Front"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_AdhesFrontName, 0, wxEXPAND|wxRIGHT, 5 );
m_AdhesFrontStaticText = new wxStaticText( m_LayersListPanel, ID_ADHESFRONTCHOICE, _("On-board, non-copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_AdhesFrontStaticText->Wrap( -1 );
@ -104,9 +102,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_SoldPFrontCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_SoldPFrontName = new wxStaticText( m_LayersListPanel, ID_SOLDPFRONTNAME, _("SoldP_Front_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_SoldPFrontName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_SoldPFrontName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_SoldPFrontName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("SoldP_Front"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_SoldPFrontName, 0, wxEXPAND|wxRIGHT, 5 );
m_SoldPFrontStaticText = new wxStaticText( m_LayersListPanel, ID_SOLDPFRONTCHOICE, _("On-board, non-copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_SoldPFrontStaticText->Wrap( -1 );
@ -117,9 +114,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_SilkSFrontCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_SilkSFrontName = new wxStaticText( m_LayersListPanel, ID_SILKSFRONTNAME, _("SilkS_Front_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_SilkSFrontName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_SilkSFrontName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_SilkSFrontName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("SilkS_Front"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_SilkSFrontName, 0, wxEXPAND|wxRIGHT, 5 );
m_SilkSFrontStaticText = new wxStaticText( m_LayersListPanel, ID_SILKSFRONTCHOICE, _("On-board, non-copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_SilkSFrontStaticText->Wrap( -1 );
@ -130,9 +126,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_MaskFrontCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_MaskFrontName = new wxStaticText( m_LayersListPanel, ID_MASKFRONTNAME, _("Mask_Front_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskFrontName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_MaskFrontName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_MaskFrontName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("Mask_Front"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_MaskFrontName, 0, wxEXPAND|wxRIGHT, 5 );
m_MaskFrontStaticText = new wxStaticText( m_LayersListPanel, ID_MASKFRONTCHOICE, _("On-board, non-copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskFrontStaticText->Wrap( -1 );
@ -557,7 +552,7 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
wxString m_In29ChoiceChoices[] = { _("signal"), _("power plane"), _("mixed"), _("jumper") };
int m_In29ChoiceNChoices = sizeof( m_In29ChoiceChoices ) / sizeof( wxString );
m_In29Choice = new wxChoice( m_LayersListPanel, ID_IN29CHOICE, wxDefaultPosition, wxDefaultSize, m_In29ChoiceNChoices, m_In29ChoiceChoices, 0 );
m_In29Choice->SetSelection( 0 );
m_In29Choice->SetSelection( 1 );
m_In29Choice->SetToolTip( _("Copper layer type for Freerouter and other external routers.\nPower plane layers are removed from Freerouter's layer menus.") );
m_LayerListFlexGridSizer->Add( m_In29Choice, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
@ -571,7 +566,7 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
wxString m_In30ChoiceChoices[] = { _("signal"), _("power plane"), _("mixed"), _("jumper") };
int m_In30ChoiceNChoices = sizeof( m_In30ChoiceChoices ) / sizeof( wxString );
m_In30Choice = new wxChoice( m_LayersListPanel, ID_IN30CHOICE, wxDefaultPosition, wxDefaultSize, m_In30ChoiceNChoices, m_In30ChoiceChoices, 0 );
m_In30Choice->SetSelection( 0 );
m_In30Choice->SetSelection( 3 );
m_In30Choice->SetToolTip( _("Copper layer type for Freerouter and other external routers.\nPower plane layers are removed from Freerouter's layer menus.") );
m_LayerListFlexGridSizer->Add( m_In30Choice, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
@ -589,7 +584,7 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
wxString m_BackChoiceChoices[] = { _("signal"), _("power plane"), _("mixed"), _("jumper") };
int m_BackChoiceNChoices = sizeof( m_BackChoiceChoices ) / sizeof( wxString );
m_BackChoice = new wxChoice( m_LayersListPanel, ID_BACKCHOICE, wxDefaultPosition, wxDefaultSize, m_BackChoiceNChoices, m_BackChoiceChoices, 0 );
m_BackChoice->SetSelection( 0 );
m_BackChoice->SetSelection( 3 );
m_BackChoice->SetToolTip( _("Copper layer type for Freerouter and other external routers.\nPower plane layers are removed from Freerouter's layer menus.") );
m_LayerListFlexGridSizer->Add( m_BackChoice, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
@ -599,9 +594,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_MaskBackCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_MaskBackName = new wxStaticText( m_LayersListPanel, ID_MASKBACKNAME, _("Mask_Back_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskBackName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_MaskBackName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_MaskBackName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("SoldM_Back"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_MaskBackName, 0, wxEXPAND|wxRIGHT, 5 );
m_MaskBackStaticText = new wxStaticText( m_LayersListPanel, ID_MASKBACKCHOICE, _("On-board, non-copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskBackStaticText->Wrap( -1 );
@ -612,9 +606,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_SilkSBackCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_SilkSBackName = new wxStaticText( m_LayersListPanel, ID_SILKSBACKNAME, _("SilkS_Back_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_SilkSBackName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_SilkSBackName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_SilkSBackName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("SilkS_Back"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_SilkSBackName, 0, wxEXPAND|wxRIGHT, 5 );
m_SilkSBackStaticText = new wxStaticText( m_LayersListPanel, ID_SILKSBACKCHOICE, _("On-board, non-copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_SilkSBackStaticText->Wrap( -1 );
@ -625,9 +618,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_SoldPBackCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_SoldPBackName = new wxStaticText( m_LayersListPanel, ID_SOLDPBACKNAME, _("SoldP_Back_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_SoldPBackName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_SoldPBackName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_SoldPBackName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("SoldP_Back"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_SoldPBackName, 0, wxEXPAND|wxRIGHT, 5 );
m_SoldPBackStaticText = new wxStaticText( m_LayersListPanel, ID_SOLDPBACKCHOICE, _("On-board, non-copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_SoldPBackStaticText->Wrap( -1 );
@ -638,9 +630,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_AdhesBackCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_AdhesBackName = new wxStaticText( m_LayersListPanel, ID_ADHESBACKNAME, _("Adhes_Back_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_AdhesBackName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_AdhesBackName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_AdhesBackName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("Adhes_Back"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_AdhesBackName, 0, wxEXPAND|wxRIGHT, 5 );
m_AdhesBackStaticText = new wxStaticText( m_LayersListPanel, ID_ADHESBACKCHOICE, _("On-board, non-copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_AdhesBackStaticText->Wrap( -1 );
@ -651,9 +642,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_FabBackCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_FabBackName = new wxStaticText( m_LayersListPanel, ID_FABBACKNAME, _("Fab_Back_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_FabBackName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_FabBackName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_FabBackName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("Fab_Back"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_FabBackName, 0, wxEXPAND|wxRIGHT, 5 );
m_FabBackStaticText = new wxStaticText( m_LayersListPanel, ID_FABBACKCHOICE, _("Off-board, manufacturing"), wxDefaultPosition, wxDefaultSize, 0 );
m_FabBackStaticText->Wrap( -1 );
@ -664,9 +654,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_CrtYdBackCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_CrtYdBackName = new wxStaticText( m_LayersListPanel, ID_CRTYDBACKNAME, _("CrtYd_Back_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_CrtYdBackName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_CrtYdBackName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_CrtYdBackName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("CrtYd_Back"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_CrtYdBackName, 0, wxEXPAND|wxRIGHT, 5 );
m_CrtYdBackStaticText = new wxStaticText( m_LayersListPanel, ID_CRTYDBACKCHOICE, _("Off-board, testing"), wxDefaultPosition, wxDefaultSize, 0 );
m_CrtYdBackStaticText->Wrap( -1 );
@ -677,9 +666,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_PCBEdgesCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_PCBEdgesName = new wxStaticText( m_LayersListPanel, ID_PCBEDGESNAME, _("PCB_Edges_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_PCBEdgesName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_PCBEdgesName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_PCBEdgesName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("Pcb_Edges"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_PCBEdgesName, 0, wxEXPAND|wxRIGHT, 5 );
m_PCBEdgesStaticText = new wxStaticText( m_LayersListPanel, ID_PCBEDGESCHOICE, _("Board contour"), wxDefaultPosition, wxDefaultSize, 0 );
m_PCBEdgesStaticText->Wrap( -1 );
@ -688,9 +676,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_MarginCheckBox = new wxCheckBox( m_LayersListPanel, ID_MARGINCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_MarginCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_MarginName = new wxStaticText( m_LayersListPanel, ID_MARGINNAME, _("Margin_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_MarginName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_MarginName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_MarginName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("Margin"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_MarginName, 0, wxEXPAND|wxRIGHT, 5 );
m_MarginStaticText = new wxStaticText( m_LayersListPanel, ID_ECO2CHOICE, _("Edge_Cuts setback"), wxDefaultPosition, wxDefaultSize, 0 );
m_MarginStaticText->Wrap( -1 );
@ -699,9 +686,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_Eco1CheckBox = new wxCheckBox( m_LayersListPanel, ID_ECO2CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Eco1CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_Eco1Name = new wxStaticText( m_LayersListPanel, ID_ECO2NAME, _("Eco1_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_Eco1Name->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_Eco1Name, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_Eco1Name = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("Eco1"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Eco1Name, 0, wxEXPAND|wxRIGHT, 5 );
m_Eco1StaticText = new wxStaticText( m_LayersListPanel, ID_ECO2CHOICE, _("Auxiliary"), wxDefaultPosition, wxDefaultSize, 0 );
m_Eco1StaticText->Wrap( -1 );
@ -710,9 +696,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_Eco2CheckBox = new wxCheckBox( m_LayersListPanel, ID_ECO1CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Eco2CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_Eco2Name = new wxStaticText( m_LayersListPanel, ID_ECO1NAME, _("Eco2_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_Eco2Name->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_Eco2Name, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_Eco2Name = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("Eco2"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Eco2Name, 0, wxEXPAND|wxRIGHT, 5 );
m_Eco2StaticText = new wxStaticText( m_LayersListPanel, ID_ECO1CHOICE, _("Auxiliary"), wxDefaultPosition, wxDefaultSize, 0 );
m_Eco2StaticText->Wrap( -1 );
@ -723,9 +708,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_CommentsCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_CommentsName = new wxStaticText( m_LayersListPanel, ID_COMMENTSNAME, _("Comments_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_CommentsName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_CommentsName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_CommentsName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("Comments"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_CommentsName, 0, wxEXPAND|wxRIGHT, 5 );
m_CommentsStaticText = new wxStaticText( m_LayersListPanel, ID_COMMENTSCHOICE, _("Auxiliary"), wxDefaultPosition, wxDefaultSize, 0 );
m_CommentsStaticText->Wrap( -1 );
@ -736,22 +720,111 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
m_LayerListFlexGridSizer->Add( m_DrawingsCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_DrawingsName = new wxStaticText( m_LayersListPanel, ID_DRAWINGSNAME, _("Drawings_layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_DrawingsName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_DrawingsName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_DrawingsName = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("Drawings"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_DrawingsName, 0, wxEXPAND|wxRIGHT, 5 );
m_DrawingsStaticText = new wxStaticText( m_LayersListPanel, ID_DRAWINGSCHOICE, _("Auxiliary"), wxDefaultPosition, wxDefaultSize, 0 );
m_DrawingsStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_DrawingsStaticText, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_User1CheckBox = new wxCheckBox( m_LayersListPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User1CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_User1Name = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("User1"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User1Name, 0, wxEXPAND|wxRIGHT, 5 );
m_User1StaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("User defined layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_User1StaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_User1StaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_User2CheckBox = new wxCheckBox( m_LayersListPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User2CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_User2Name = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("User2"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User2Name, 0, wxEXPAND|wxRIGHT, 5 );
m_User2StaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("User defined layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_User2StaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_User2StaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_User3CheckBox = new wxCheckBox( m_LayersListPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User3CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_User3Name = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("User3"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User3Name, 0, wxEXPAND|wxRIGHT, 5 );
m_User3StaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("User defined layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_User3StaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_User3StaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_User4CheckBox = new wxCheckBox( m_LayersListPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User4CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_User4Name = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("User4"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User4Name, 0, wxEXPAND|wxRIGHT, 5 );
m_User4StaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("User defined layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_User4StaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_User4StaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_User5CheckBox = new wxCheckBox( m_LayersListPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User5CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_User5Name = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("User5"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User5Name, 0, wxEXPAND|wxRIGHT, 5 );
m_User5StaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("User defined layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_User5StaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_User5StaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_User6CheckBox = new wxCheckBox( m_LayersListPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User6CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_User6Name = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("User6"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User6Name, 0, wxEXPAND|wxRIGHT, 5 );
m_User6StaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("User defined layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_User6StaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_User6StaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_User7CheckBox = new wxCheckBox( m_LayersListPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User7CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_User7Name = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("User7"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User7Name, 0, wxEXPAND|wxRIGHT, 5 );
m_User7StaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("User defined layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_User7StaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_User7StaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_User8CheckBox = new wxCheckBox( m_LayersListPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User8CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_User8Name = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("User8"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User8Name, 0, wxEXPAND|wxRIGHT, 5 );
m_User8StaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("User defined layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_User8StaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_User8StaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_User9CheckBox = new wxCheckBox( m_LayersListPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User9CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_User9Name = new wxTextCtrl( m_LayersListPanel, wxID_ANY, _("User9"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_User9Name, 0, wxEXPAND|wxRIGHT, 5 );
m_User9StaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("User defined layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_User9StaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_User9StaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_LayersListPanel->SetSizer( m_LayerListFlexGridSizer );
m_LayersListPanel->Layout();
m_LayerListFlexGridSizer->Fit( m_LayersListPanel );
bSizerMargins->Add( m_LayersListPanel, 1, wxEXPAND|wxALL, 5 );
bSizerMargins->Add( m_LayersListPanel, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
bMainSizer->Add( bSizerMargins, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
bMainSizer->Add( bSizerMargins, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
this->SetSizer( bMainSizer );
@ -761,6 +834,8 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i
// Connect Events
m_PresetsChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_SETUP_LAYERS_BASE::OnPresetsChoice ), NULL, this );
m_CopperLayersChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_SETUP_LAYERS_BASE::OnCopperLayersChoice ), NULL, this );
m_addUserDefinedLayerButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_LAYERS_BASE::addUserDefinedLayer ), NULL, this );
m_addUserDefinedLayerButton->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_LAYERS_BASE::onUpdateAddUserDefinedLayer ), NULL, this );
m_CrtYdFrontCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SETUP_LAYERS_BASE::DenyChangeCheckBox ), NULL, this );
m_FabFrontCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SETUP_LAYERS_BASE::OnCheckBox ), NULL, this );
m_AdhesFrontCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SETUP_LAYERS_BASE::OnCheckBox ), NULL, this );
@ -818,6 +893,8 @@ PANEL_SETUP_LAYERS_BASE::~PANEL_SETUP_LAYERS_BASE()
// Disconnect Events
m_PresetsChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_SETUP_LAYERS_BASE::OnPresetsChoice ), NULL, this );
m_CopperLayersChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_SETUP_LAYERS_BASE::OnCopperLayersChoice ), NULL, this );
m_addUserDefinedLayerButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_LAYERS_BASE::addUserDefinedLayer ), NULL, this );
m_addUserDefinedLayerButton->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_LAYERS_BASE::onUpdateAddUserDefinedLayer ), NULL, this );
m_CrtYdFrontCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SETUP_LAYERS_BASE::DenyChangeCheckBox ), NULL, this );
m_FabFrontCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SETUP_LAYERS_BASE::OnCheckBox ), NULL, this );
m_AdhesFrontCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SETUP_LAYERS_BASE::OnCheckBox ), NULL, this );

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -17,6 +17,10 @@
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/stattext.h>
#include <wx/button.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/sizer.h>
#include <wx/statline.h>
#include <wx/checkbox.h>
@ -27,153 +31,135 @@
///////////////////////////////////////////////////////////////////////////
#define ID_CRTYDFRONTCHECKBOX 1000
#define ID_CRTYDFRONTNAME 1001
#define ID_CRTYDFRONTCHOICE 1002
#define ID_FABFRONTCHECKBOX 1003
#define ID_FABFRONTNAME 1004
#define ID_FABFRONTCHOICE 1005
#define ID_ADHESFRONTCHECKBOX 1006
#define ID_ADHESFRONTNAME 1007
#define ID_ADHESFRONTCHOICE 1008
#define ID_SOLDPFRONTCHECKBOX 1009
#define ID_SOLDPFRONTNAME 1010
#define ID_SOLDPFRONTCHOICE 1011
#define ID_SILKSFRONTCHECKBOX 1012
#define ID_SILKSFRONTNAME 1013
#define ID_SILKSFRONTCHOICE 1014
#define ID_MASKFRONTCHECKBOX 1015
#define ID_MASKFRONTNAME 1016
#define ID_MASKFRONTCHOICE 1017
#define ID_FRONTCHECKBOX 1018
#define ID_FRONTNAME 1019
#define ID_FRONTCHOICE 1020
#define ID_IN1CHECKBOX 1021
#define ID_IN1NAME 1022
#define ID_IN1CHOICE 1023
#define ID_IN2CHECKBOX 1024
#define ID_IN2NAME 1025
#define ID_IN2CHOICE 1026
#define ID_IN3CHECKBOX 1027
#define ID_IN3NAME 1028
#define ID_IN3CHOICE 1029
#define ID_IN4CHECKBOX 1030
#define ID_IN4NAME 1031
#define ID_IN4CHOICE 1032
#define ID_IN5CHECKBOX 1033
#define ID_IN5NAME 1034
#define ID_IN5CHOICE 1035
#define ID_IN6CHECKBOX 1036
#define ID_IN6NAME 1037
#define ID_IN6CHOICE 1038
#define ID_IN7CHECKBOX 1039
#define ID_IN7NAME 1040
#define ID_IN7CHOICE 1041
#define ID_IN8CHECKBOX 1042
#define ID_IN8NAME 1043
#define ID_IN8CHOICE 1044
#define ID_IN9CHECKBOX 1045
#define ID_IN9NAME 1046
#define ID_IN9CHOICE 1047
#define ID_IN10CHECKBOX 1048
#define ID_IN10NAME 1049
#define ID_IN10CHOICE 1050
#define ID_IN11CHECKBOX 1051
#define ID_IN11NAME 1052
#define ID_IN11CHOICE 1053
#define ID_IN12CHECKBOX 1054
#define ID_IN12NAME 1055
#define ID_IN12CHOICE 1056
#define ID_IN13CHECKBOX 1057
#define ID_IN13NAME 1058
#define ID_IN13CHOICE 1059
#define ID_IN14CHECKBOX 1060
#define ID_IN14NAME 1061
#define ID_IN14CHOICE 1062
#define ID_IN15CHECKBOX 1063
#define ID_IN15NAME 1064
#define ID_IN15CHOICE 1065
#define ID_IN16CHECKBOX 1066
#define ID_IN16NAME 1067
#define ID_IN16CHOICE 1068
#define ID_IN17CHECKBOX 1069
#define ID_IN17NAME 1070
#define ID_IN17CHOICE 1071
#define ID_IN18CHECKBOX 1072
#define ID_IN18NAME 1073
#define ID_IN18CHOICE 1074
#define ID_IN19CHECKBOX 1075
#define ID_IN19NAME 1076
#define ID_IN19CHOICE 1077
#define ID_IN20CHECKBOX 1078
#define ID_IN20NAME 1079
#define ID_IN20CHOICE 1080
#define ID_IN21CHECKBOX 1081
#define ID_IN21NAME 1082
#define ID_IN21CHOICE 1083
#define ID_IN22CHECKBOX 1084
#define ID_IN22NAME 1085
#define ID_IN22CHOICE 1086
#define ID_IN23CHECKBOX 1087
#define ID_IN23NAME 1088
#define ID_IN24CHECKBOX 1089
#define ID_IN24NAME 1090
#define ID_IN24CHOICE 1091
#define ID_IN25CHECKBOX 1092
#define ID_IN25NAME 1093
#define ID_IN25CHOICE 1094
#define ID_IN26CHECKBOX 1095
#define ID_IN26NAME 1096
#define ID_IN26CHOICE 1097
#define ID_IN27CHECKBOX 1098
#define ID_IN27NAME 1099
#define ID_IN27CHOICE 1100
#define ID_IN28CHECKBOX 1101
#define ID_IN28NAME 1102
#define ID_IN28CHOICE 1103
#define ID_IN29CHECKBOX 1104
#define ID_IN29NAME 1105
#define ID_IN29CHOICE 1106
#define ID_IN30CHECKBOX 1107
#define ID_IN30NAME 1108
#define ID_IN30CHOICE 1109
#define ID_BACKCHECKBOX 1110
#define ID_BACKNAME 1111
#define ID_BACKCHOICE 1112
#define ID_MASKBACKCHECKBOX 1113
#define ID_MASKBACKNAME 1114
#define ID_MASKBACKCHOICE 1115
#define ID_SILKSBACKCHECKBOX 1116
#define ID_SILKSBACKNAME 1117
#define ID_SILKSBACKCHOICE 1118
#define ID_SOLDPBACKCHECKBOX 1119
#define ID_SOLDPBACKNAME 1120
#define ID_SOLDPBACKCHOICE 1121
#define ID_ADHESBACKCHECKBOX 1122
#define ID_ADHESBACKNAME 1123
#define ID_ADHESBACKCHOICE 1124
#define ID_FABBACKCHECKBOX 1125
#define ID_FABBACKNAME 1126
#define ID_FABBACKCHOICE 1127
#define ID_CRTYDBACKCHECKBOX 1128
#define ID_CRTYDBACKNAME 1129
#define ID_CRTYDBACKCHOICE 1130
#define ID_PCBEDGESCHECKBOX 1131
#define ID_PCBEDGESNAME 1132
#define ID_PCBEDGESCHOICE 1133
#define ID_MARGINCHECKBOX 1134
#define ID_MARGINNAME 1135
#define ID_ECO2CHOICE 1136
#define ID_ECO2CHECKBOX 1137
#define ID_ECO2NAME 1138
#define ID_ECO1CHECKBOX 1139
#define ID_ECO1NAME 1140
#define ID_ECO1CHOICE 1141
#define ID_COMMENTSCHECKBOX 1142
#define ID_COMMENTSNAME 1143
#define ID_COMMENTSCHOICE 1144
#define ID_DRAWINGSCHECKBOX 1145
#define ID_DRAWINGSNAME 1146
#define ID_DRAWINGSCHOICE 1147
#define ID_CRTYDFRONTCHOICE 1001
#define ID_FABFRONTCHECKBOX 1002
#define ID_FABFRONTCHOICE 1003
#define ID_ADHESFRONTCHECKBOX 1004
#define ID_ADHESFRONTCHOICE 1005
#define ID_SOLDPFRONTCHECKBOX 1006
#define ID_SOLDPFRONTCHOICE 1007
#define ID_SILKSFRONTCHECKBOX 1008
#define ID_SILKSFRONTCHOICE 1009
#define ID_MASKFRONTCHECKBOX 1010
#define ID_MASKFRONTCHOICE 1011
#define ID_FRONTCHECKBOX 1012
#define ID_FRONTNAME 1013
#define ID_FRONTCHOICE 1014
#define ID_IN1CHECKBOX 1015
#define ID_IN1NAME 1016
#define ID_IN1CHOICE 1017
#define ID_IN2CHECKBOX 1018
#define ID_IN2NAME 1019
#define ID_IN2CHOICE 1020
#define ID_IN3CHECKBOX 1021
#define ID_IN3NAME 1022
#define ID_IN3CHOICE 1023
#define ID_IN4CHECKBOX 1024
#define ID_IN4NAME 1025
#define ID_IN4CHOICE 1026
#define ID_IN5CHECKBOX 1027
#define ID_IN5NAME 1028
#define ID_IN5CHOICE 1029
#define ID_IN6CHECKBOX 1030
#define ID_IN6NAME 1031
#define ID_IN6CHOICE 1032
#define ID_IN7CHECKBOX 1033
#define ID_IN7NAME 1034
#define ID_IN7CHOICE 1035
#define ID_IN8CHECKBOX 1036
#define ID_IN8NAME 1037
#define ID_IN8CHOICE 1038
#define ID_IN9CHECKBOX 1039
#define ID_IN9NAME 1040
#define ID_IN9CHOICE 1041
#define ID_IN10CHECKBOX 1042
#define ID_IN10NAME 1043
#define ID_IN10CHOICE 1044
#define ID_IN11CHECKBOX 1045
#define ID_IN11NAME 1046
#define ID_IN11CHOICE 1047
#define ID_IN12CHECKBOX 1048
#define ID_IN12NAME 1049
#define ID_IN12CHOICE 1050
#define ID_IN13CHECKBOX 1051
#define ID_IN13NAME 1052
#define ID_IN13CHOICE 1053
#define ID_IN14CHECKBOX 1054
#define ID_IN14NAME 1055
#define ID_IN14CHOICE 1056
#define ID_IN15CHECKBOX 1057
#define ID_IN15NAME 1058
#define ID_IN15CHOICE 1059
#define ID_IN16CHECKBOX 1060
#define ID_IN16NAME 1061
#define ID_IN16CHOICE 1062
#define ID_IN17CHECKBOX 1063
#define ID_IN17NAME 1064
#define ID_IN17CHOICE 1065
#define ID_IN18CHECKBOX 1066
#define ID_IN18NAME 1067
#define ID_IN18CHOICE 1068
#define ID_IN19CHECKBOX 1069
#define ID_IN19NAME 1070
#define ID_IN19CHOICE 1071
#define ID_IN20CHECKBOX 1072
#define ID_IN20NAME 1073
#define ID_IN20CHOICE 1074
#define ID_IN21CHECKBOX 1075
#define ID_IN21NAME 1076
#define ID_IN21CHOICE 1077
#define ID_IN22CHECKBOX 1078
#define ID_IN22NAME 1079
#define ID_IN22CHOICE 1080
#define ID_IN23CHECKBOX 1081
#define ID_IN23NAME 1082
#define ID_IN24CHECKBOX 1083
#define ID_IN24NAME 1084
#define ID_IN24CHOICE 1085
#define ID_IN25CHECKBOX 1086
#define ID_IN25NAME 1087
#define ID_IN25CHOICE 1088
#define ID_IN26CHECKBOX 1089
#define ID_IN26NAME 1090
#define ID_IN26CHOICE 1091
#define ID_IN27CHECKBOX 1092
#define ID_IN27NAME 1093
#define ID_IN27CHOICE 1094
#define ID_IN28CHECKBOX 1095
#define ID_IN28NAME 1096
#define ID_IN28CHOICE 1097
#define ID_IN29CHECKBOX 1098
#define ID_IN29NAME 1099
#define ID_IN29CHOICE 1100
#define ID_IN30CHECKBOX 1101
#define ID_IN30NAME 1102
#define ID_IN30CHOICE 1103
#define ID_BACKCHECKBOX 1104
#define ID_BACKNAME 1105
#define ID_BACKCHOICE 1106
#define ID_MASKBACKCHECKBOX 1107
#define ID_MASKBACKCHOICE 1108
#define ID_SILKSBACKCHECKBOX 1109
#define ID_SILKSBACKCHOICE 1110
#define ID_SOLDPBACKCHECKBOX 1111
#define ID_SOLDPBACKCHOICE 1112
#define ID_ADHESBACKCHECKBOX 1113
#define ID_ADHESBACKCHOICE 1114
#define ID_FABBACKCHECKBOX 1115
#define ID_FABBACKCHOICE 1116
#define ID_CRTYDBACKCHECKBOX 1117
#define ID_CRTYDBACKCHOICE 1118
#define ID_PCBEDGESCHECKBOX 1119
#define ID_PCBEDGESCHOICE 1120
#define ID_MARGINCHECKBOX 1121
#define ID_ECO2CHOICE 1122
#define ID_ECO2CHECKBOX 1123
#define ID_ECO1CHECKBOX 1124
#define ID_ECO1CHOICE 1125
#define ID_COMMENTSCHECKBOX 1126
#define ID_COMMENTSCHOICE 1127
#define ID_DRAWINGSCHECKBOX 1128
#define ID_DRAWINGSCHOICE 1129
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_SETUP_LAYERS_BASE
@ -186,26 +172,27 @@ class PANEL_SETUP_LAYERS_BASE : public wxPanel
wxChoice* m_PresetsChoice;
wxStaticText* m_staticTextCopperLayers;
wxChoice* m_CopperLayersChoice;
wxButton* m_addUserDefinedLayerButton;
wxStaticLine* m_staticline2;
wxScrolledWindow* m_LayersListPanel;
wxFlexGridSizer* m_LayerListFlexGridSizer;
wxCheckBox* m_CrtYdFrontCheckBox;
wxStaticText* m_CrtYdFrontName;
wxTextCtrl* m_CrtYdFrontName;
wxStaticText* m_CrtYdFrontStaticText;
wxCheckBox* m_FabFrontCheckBox;
wxStaticText* m_FabFrontName;
wxTextCtrl* m_FabFrontName;
wxStaticText* m_FabFrontStaticText;
wxCheckBox* m_AdhesFrontCheckBox;
wxStaticText* m_AdhesFrontName;
wxTextCtrl* m_AdhesFrontName;
wxStaticText* m_AdhesFrontStaticText;
wxCheckBox* m_SoldPFrontCheckBox;
wxStaticText* m_SoldPFrontName;
wxTextCtrl* m_SoldPFrontName;
wxStaticText* m_SoldPFrontStaticText;
wxCheckBox* m_SilkSFrontCheckBox;
wxStaticText* m_SilkSFrontName;
wxTextCtrl* m_SilkSFrontName;
wxStaticText* m_SilkSFrontStaticText;
wxCheckBox* m_MaskFrontCheckBox;
wxStaticText* m_MaskFrontName;
wxTextCtrl* m_MaskFrontName;
wxStaticText* m_MaskFrontStaticText;
wxCheckBox* m_FrontCheckBox;
wxTextCtrl* m_FrontName;
@ -304,45 +291,74 @@ class PANEL_SETUP_LAYERS_BASE : public wxPanel
wxTextCtrl* m_BackName;
wxChoice* m_BackChoice;
wxCheckBox* m_MaskBackCheckBox;
wxStaticText* m_MaskBackName;
wxTextCtrl* m_MaskBackName;
wxStaticText* m_MaskBackStaticText;
wxCheckBox* m_SilkSBackCheckBox;
wxStaticText* m_SilkSBackName;
wxTextCtrl* m_SilkSBackName;
wxStaticText* m_SilkSBackStaticText;
wxCheckBox* m_SoldPBackCheckBox;
wxStaticText* m_SoldPBackName;
wxTextCtrl* m_SoldPBackName;
wxStaticText* m_SoldPBackStaticText;
wxCheckBox* m_AdhesBackCheckBox;
wxStaticText* m_AdhesBackName;
wxTextCtrl* m_AdhesBackName;
wxStaticText* m_AdhesBackStaticText;
wxCheckBox* m_FabBackCheckBox;
wxStaticText* m_FabBackName;
wxTextCtrl* m_FabBackName;
wxStaticText* m_FabBackStaticText;
wxCheckBox* m_CrtYdBackCheckBox;
wxStaticText* m_CrtYdBackName;
wxTextCtrl* m_CrtYdBackName;
wxStaticText* m_CrtYdBackStaticText;
wxCheckBox* m_PCBEdgesCheckBox;
wxStaticText* m_PCBEdgesName;
wxTextCtrl* m_PCBEdgesName;
wxStaticText* m_PCBEdgesStaticText;
wxCheckBox* m_MarginCheckBox;
wxStaticText* m_MarginName;
wxTextCtrl* m_MarginName;
wxStaticText* m_MarginStaticText;
wxCheckBox* m_Eco1CheckBox;
wxStaticText* m_Eco1Name;
wxTextCtrl* m_Eco1Name;
wxStaticText* m_Eco1StaticText;
wxCheckBox* m_Eco2CheckBox;
wxStaticText* m_Eco2Name;
wxTextCtrl* m_Eco2Name;
wxStaticText* m_Eco2StaticText;
wxCheckBox* m_CommentsCheckBox;
wxStaticText* m_CommentsName;
wxTextCtrl* m_CommentsName;
wxStaticText* m_CommentsStaticText;
wxCheckBox* m_DrawingsCheckBox;
wxStaticText* m_DrawingsName;
wxTextCtrl* m_DrawingsName;
wxStaticText* m_DrawingsStaticText;
wxCheckBox* m_User1CheckBox;
wxTextCtrl* m_User1Name;
wxStaticText* m_User1StaticText;
wxCheckBox* m_User2CheckBox;
wxTextCtrl* m_User2Name;
wxStaticText* m_User2StaticText;
wxCheckBox* m_User3CheckBox;
wxTextCtrl* m_User3Name;
wxStaticText* m_User3StaticText;
wxCheckBox* m_User4CheckBox;
wxTextCtrl* m_User4Name;
wxStaticText* m_User4StaticText;
wxCheckBox* m_User5CheckBox;
wxTextCtrl* m_User5Name;
wxStaticText* m_User5StaticText;
wxCheckBox* m_User6CheckBox;
wxTextCtrl* m_User6Name;
wxStaticText* m_User6StaticText;
wxCheckBox* m_User7CheckBox;
wxTextCtrl* m_User7Name;
wxStaticText* m_User7StaticText;
wxCheckBox* m_User8CheckBox;
wxTextCtrl* m_User8Name;
wxStaticText* m_User8StaticText;
wxCheckBox* m_User9CheckBox;
wxTextCtrl* m_User9Name;
wxStaticText* m_User9StaticText;
// Virtual event handlers, overide them in your derived class
virtual void OnPresetsChoice( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCopperLayersChoice( wxCommandEvent& event ) { event.Skip(); }
virtual void addUserDefinedLayer( wxCommandEvent& event ) { event.Skip(); }
virtual void onUpdateAddUserDefinedLayer( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void DenyChangeCheckBox( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCheckBox( wxCommandEvent& event ) { event.Skip(); }

View File

@ -50,8 +50,7 @@ using namespace PCB_KEYS_T;
/**
* FP_CACHE_ITEM
* is helper class for creating a footprint library cache.
* Helper class for creating a footprint library cache.
*
* The new footprint library design is a file path of individual module files
* that contain a single module per file. This class is a helper only for the
@ -107,7 +106,6 @@ public:
// Catch these exceptions higher up please.
/**
* Function Save
* Save the footprint cache or a single module from it to disk
*
* @param aModule if set, save only this module, otherwise, save the full library
@ -119,7 +117,6 @@ public:
void Remove( const wxString& aFootprintName );
/**
* Function GetTimestamp
* Generate a timestamp representing all source files in the cache (including the
* parent directory).
* Timestamps should not be considered ordered. They either match or they don't.
@ -127,14 +124,12 @@ public:
static long long GetTimestamp( const wxString& aLibPath );
/**
* Function IsModified
* Return true if the cache is not up-to-date.
*/
bool IsModified();
/**
* Function IsPath
* checks if \a aPath is the same as the current cache path.
* Check if \a aPath is the same as the current cache path.
*
* This tests paths by converting \a aPath using the native separators. Internally
* #FP_CACHE stores the current path using native separators. This prevents path
@ -202,7 +197,7 @@ void FP_CACHE::Save( MODULE* aModule )
#ifdef USE_TMP_FILE
wxRemove( fn.GetFullPath() ); // it is not an error if this does not exist
// Even on linux you can see an _intermittent_ error when calling wxRename(),
// Even on Linux you can see an _intermittent_ error when calling wxRename(),
// and it is fully inexplicable. See if this dodges the error.
wxMilliSleep( 250L );
@ -456,15 +451,12 @@ void PCB_IO::Format( BOARD_ITEM* aItem, int aNestLevel ) const
void PCB_IO::formatLayer( const BOARD_ITEM* aItem ) const
{
if( m_ctl & CTL_STD_LAYER_NAMES )
{
PCB_LAYER_ID layer = aItem->GetLayer();
PCB_LAYER_ID layer = aItem->GetLayer();
// English layer names should never need quoting.
if( m_ctl & CTL_STD_LAYER_NAMES ) // English layer names should never need quoting.
m_out->Print( 0, " (layer %s)", TO_UTF8( BOARD::GetStandardLayerName( layer ) ) );
}
else
m_out->Print( 0, " (layer %s)", m_out->Quotew( aItem->GetLayerName() ).c_str() );
m_out->Print( 0, " (layer %s)", m_out->Quotew( LSET::Name( layer ) ).c_str() );
}
@ -524,9 +516,12 @@ void PCB_IO::formatBoardLayers( BOARD* aBoard, int aNestLevel ) const
PCB_LAYER_ID layer = *cu;
m_out->Print( aNestLevel+1, "(%d %s %s", layer,
m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str(),
m_out->Quotew( LSET::Name( layer ) ).c_str(),
LAYER::ShowType( aBoard->GetLayerType( layer ) ) );
if( LSET::Name( layer ) != m_board->GetLayerName( layer ) )
m_out->Print( 0, " %s", m_out->Quotew( m_board->GetLayerName( layer ) ).c_str() );
m_out->Print( 0, ")\n" );
}
@ -551,7 +546,16 @@ void PCB_IO::formatBoardLayers( BOARD* aBoard, int aNestLevel ) const
B_CrtYd,
F_CrtYd,
B_Fab,
F_Fab
F_Fab,
User_1,
User_2,
User_3,
User_4,
User_5,
User_6,
User_7,
User_8,
User_9
};
for( LSEQ seq = aBoard->GetEnabledLayers().Seq( non_cu, arrayDim( non_cu ) ); seq; ++seq )
@ -559,7 +563,10 @@ void PCB_IO::formatBoardLayers( BOARD* aBoard, int aNestLevel ) const
PCB_LAYER_ID layer = *seq;
m_out->Print( aNestLevel+1, "(%d %s user", layer,
m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str() );
m_out->Quotew( LSET::Name( layer ) ).c_str() );
if( m_board->GetLayerName( layer ) != LSET::Name( layer ) )
m_out->Print( 0, " %s", m_out->Quotew( m_board->GetLayerName( layer ) ).c_str() );
m_out->Print( 0, ")\n" );
}
@ -1210,12 +1217,7 @@ void PCB_IO::formatLayers( LSET aLayerMask, int aNestLevel ) const
{
if( aLayerMask[layer] )
{
if( m_board && !( m_ctl & CTL_STD_LAYER_NAMES ) )
layerName = m_board->GetLayerName( PCB_LAYER_ID( layer ) );
else // I am being called from FootprintSave()
layerName = BOARD::GetStandardLayerName( PCB_LAYER_ID( layer ) );
layerName = LSET::Name( PCB_LAYER_ID( layer ) );
output += ' ';
output += m_out->Quotew( layerName );
}
@ -1672,8 +1674,8 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const
m_out->Print( 0, " (drill %s)", FormatInternalUnits( via->GetDrill() ).c_str() );
m_out->Print( 0, " (layers %s %s)",
m_out->Quotew( m_board->GetLayerName( layer1 ) ).c_str(),
m_out->Quotew( m_board->GetLayerName( layer2 ) ).c_str() );
m_out->Quotew( LSET::Name( layer1 ) ).c_str(),
m_out->Quotew( LSET::Name( layer2 ) ).c_str() );
if( via->GetRemoveUnconnected() )
{
@ -1693,15 +1695,16 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const
FormatInternalUnits( arc->GetEnd() ).c_str(),
FormatInternalUnits( arc->GetWidth() ).c_str() );
m_out->Print( 0, " (layer %s)", m_out->Quotew( aTrack->GetLayerName() ).c_str() );
m_out->Print( 0, " (layer %s)", m_out->Quotew( LSET::Name( arc->GetLayer() ) ).c_str() );
}
else
{
m_out->Print( aNestLevel, "(segment (start %s) (end %s) (width %s)",
FormatInternalUnits( aTrack->GetStart() ).c_str(), FormatInternalUnits( aTrack->GetEnd() ).c_str(),
FormatInternalUnits( aTrack->GetStart() ).c_str(),
FormatInternalUnits( aTrack->GetEnd() ).c_str(),
FormatInternalUnits( aTrack->GetWidth() ).c_str() );
m_out->Print( 0, " (layer %s)", m_out->Quotew( aTrack->GetLayerName() ).c_str() );
m_out->Print( 0, " (layer %s)", m_out->Quotew( LSET::Name( aTrack->GetLayer() ) ).c_str() );
}
if( aTrack->IsLocked() )

View File

@ -86,9 +86,11 @@ class TEXTE_PCB;
//#define SEXPR_BOARD_FILE_VERSION 20200909 // Change DIMENSION format
//#define SEXPR_BOARD_FILE_VERSION 20200913 // Add leader dimension
//#define SEXPR_BOARD_FILE_VERSION 20200916 // Add center dimension
#define SEXPR_BOARD_FILE_VERSION 20200921 // Add orthogonal dimension
//#define SEXPR_BOARD_FILE_VERSION 20200921 // Add orthogonal dimension
#define SEXPR_BOARD_FILE_VERSION 20200922 // Add user name to layer definition.
#define BOARD_FILE_HOST_VERSION 20200825 ///< Earlier files than this include the host tag
#define BOARD_FILE_HOST_VERSION 20200825 ///< Earlier files than this include the host tag
#define CTL_STD_LAYER_NAMES (1 << 0) ///< Use English Standard layer names
#define CTL_OMIT_NETS (1 << 1) ///< Omit pads net names (useless in library)
@ -137,7 +139,7 @@ public:
{
// Would have used wildcards_and_files_ext.cpp's KiCadPcbFileExtension,
// but to be pure, a plugin should not assume that it will always be linked
// with the core of the pcbnew code. (Might someday be a DLL/DSO.) Besides,
// with the core of the Pcbnew code. (Might someday be a DLL/DSO.) Besides,
// file extension policy should be controlled by the plugin.
return wxT( "kicad_pcb" );
}
@ -171,9 +173,11 @@ public:
long long GetLibraryTimestamp( const wxString& aLibraryPath ) const override;
void FootprintLibCreate( const wxString& aLibraryPath, const PROPERTIES* aProperties = NULL) override;
void FootprintLibCreate( const wxString& aLibraryPath,
const PROPERTIES* aProperties = NULL) override;
bool FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* aProperties = NULL ) override;
bool FootprintLibDelete( const wxString& aLibraryPath,
const PROPERTIES* aProperties = NULL ) override;
bool IsFootprintLibWritable( const wxString& aLibraryPath ) override;
@ -184,8 +188,7 @@ public:
~PCB_IO();
/**
* Function Format
* outputs \a aItem to \a aFormatter in s-expression format.
* Output \a aItem to \a aFormatter in s-expression format.
*
* @param aItem A pointer the an #BOARD_ITEM object to format.
* @param aNestLevel The indentation nest level.

View File

@ -722,7 +722,7 @@ BOARD* PCB_PARSER::parseBOARD_unchecked()
}
// Now that we've parsed the other Uuids in the file we can resolve
// the uuids referrred to in the group declarations we saw.
// the uuids referred to in the group declarations we saw.
//
// First add all group objects so subsequent GetItem() calls for nested
// groups work.
@ -800,7 +800,7 @@ BOARD* PCB_PARSER::parseBOARD_unchecked()
dlg.SetOKLabel( _( "Attempt repair" ) );
if( dlg.ShowModal() == wxID_CANCEL )
THROW_IO_ERROR( _( "File read cancelled" ) );
THROW_IO_ERROR( _( "File read canceled" ) );
m_board->GroupsSanityCheck( true );
}
@ -1050,6 +1050,7 @@ void PCB_PARSER::parseLayer( LAYER* aLayer )
T token;
std::string name;
std::string userName;
std::string type;
bool isVisible = true;
@ -1069,20 +1070,35 @@ void PCB_PARSER::parseLayer( LAYER* aLayer )
token = NextTok();
// @todo Figure out why we are looking for a hide token in the layer definition.
if( token == T_hide )
{
isVisible = false;
NeedRIGHT();
}
else if( token == T_STRING )
{
userName = CurText();
NeedRIGHT();
}
else if( token != T_RIGHT )
{
Expecting( "hide or )" );
Expecting( "hide, user defined name, or )" );
}
aLayer->m_name = FROM_UTF8( name.c_str() );
aLayer->m_type = LAYER::ParseType( type.c_str() );
aLayer->m_number = layer_num;
aLayer->m_visible = isVisible;
if( !userName.empty() )
aLayer->m_userName = FROM_UTF8( userName.c_str() );
// The canonical name will get reset back to the default for copper layer on the next
// save. The user defined name is now a separate optional layer token from the canonical
// name.
if( aLayer->m_name != LSET::Name( static_cast<PCB_LAYER_ID>( aLayer->m_number ) ) )
aLayer->m_userName = aLayer->m_name;
}
@ -1223,7 +1239,7 @@ void PCB_PARSER::parseBoardStackup()
if( token == T_locked )
{
// Dielectric thickness can be locked (for impedance controled layers)
// Dielectric thickness can be locked (for impedance controlled layers)
if( type == BS_ITEM_TYPE_DIELECTRIC )
item->SetThicknessLocked( true, sublayer_idx );
@ -3065,7 +3081,7 @@ MODULE* PCB_PARSER::parseMODULE_unchecked( wxArrayString* aInitialComments )
// In legacy files the lack of attributes indicated a through-hole component which was by
// default excluded from pos files. However there was a hack to look for SMD pads and
// consider those "mislabelled through-hole components" and therefore include them in place
// consider those "mislabeled through-hole components" and therefore include them in place
// files. We probably don't want to get into that game so we'll just include them by
// default and let the user change it if required.
if( m_requiredVersion < 20200826 && attributes == 0 )
@ -3457,7 +3473,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
case T_roundrect:
// Note: the shape can be PAD_SHAPE_ROUNDRECT or PAD_SHAPE_CHAMFERED_RECT
// (if champfer parameters are found later in pad descr.)
// (if chamfer parameters are found later in pad descr.)
pad->SetShape( PAD_SHAPE_ROUNDRECT );
break;
@ -3893,7 +3909,7 @@ bool PCB_PARSER::parseD_PAD_option( D_PAD* aPad )
case T_clearance:
token = NextTok();
// Custom shaped pads have a clearance area that is the pad shape
// (like usual pads) or the convew hull of the pad shape.
// (like usual pads) or the convex hull of the pad shape.
switch( token )
{
case T_outline:

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2019 KiCad Developers, see CHANGELOG.TXT for contributors.
* Copyright (C) 2019-2020 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -35,13 +35,15 @@ struct LSETS_TO_TEST
std::string expectedFmtBin;
};
const static std::vector<LSETS_TO_TEST> type_to_ext_cases = {
{ LSET( 2, F_Cu, F_Fab ), "20000_00000001",
"010|0000_0000|0000_0000|0000_0000|0000_0000|0000_0000|0000_0001" },
{ LSET( 3, In14_Cu, B_Adhes, Rescue ), "40001_00004000",
"100|0000_0000|0000_0001|0000_0000|0000_0000|0100_0000|0000_0000" }
{ LSET( 2, F_Cu, F_Fab ), "0020000_00000001",
"0000|0000_0010|0000_0000|0000_0000|0000_0000|0000_0000|0000_0000|0000_0001" },
{ LSET( 3, In14_Cu, B_Adhes, Rescue ), "8000001_00004000",
"1000|0000_0000|0000_0000|0000_0001|0000_0000|0000_0000|0100_0000|0000_0000" }
};
BOOST_AUTO_TEST_CASE( FmtHex )
{
for( const auto& c : type_to_ext_cases )
@ -50,6 +52,7 @@ BOOST_AUTO_TEST_CASE( FmtHex )
}
}
BOOST_AUTO_TEST_CASE( FmtBin )
{
for( const auto& c : type_to_ext_cases )
@ -58,4 +61,5 @@ BOOST_AUTO_TEST_CASE( FmtBin )
}
}
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE_END()