Isaac's next layer selection and configuration work step
This commit is contained in:
parent
07ae161527
commit
25973e5608
|
@ -149,7 +149,38 @@ enum ELEMENTS_NUMBERS
|
||||||
PAD_CMP_VISIBLE
|
PAD_CMP_VISIBLE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function IsValidLayerIndex
|
||||||
|
* tests whether a given integer is a valid layer index
|
||||||
|
* @param aLayerIndex = Layer index to test
|
||||||
|
* @return true if aLayerIndex is a valid layer index
|
||||||
|
*/
|
||||||
|
inline bool IsValidLayerIndex( int aLayerIndex )
|
||||||
|
{
|
||||||
|
return aLayerIndex >= 0 && aLayerIndex < NB_LAYERS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function IsValidCopperLayerIndex
|
||||||
|
* tests whether an integer is a valid copper layer index
|
||||||
|
* @param aLayerIndex = Layer index to test
|
||||||
|
* @return true if aLayerIndex is a valid copper layer index
|
||||||
|
*/
|
||||||
|
inline bool IsValidCopperLayerIndex( int aLayerIndex )
|
||||||
|
{
|
||||||
|
return aLayerIndex >= FIRST_COPPER_LAYER && aLayerIndex <= LAST_COPPER_LAYER;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function IsValidNonCopperLayerIndex
|
||||||
|
* tests whether an integer is a valid non copper layer index
|
||||||
|
* @param aLayerIndex = Layer index to test
|
||||||
|
* @return true if aLayerIndex is a valid non copper layer index
|
||||||
|
*/
|
||||||
|
inline bool IsValidNonCopperLayerIndex( int aLayerIndex )
|
||||||
|
{
|
||||||
|
return aLayerIndex >= FIRST_NO_COPPER_LAYER && aLayerIndex <= LAST_NO_COPPER_LAYER;
|
||||||
|
}
|
||||||
|
|
||||||
// Class for handle current printed board design settings
|
// Class for handle current printed board design settings
|
||||||
class EDA_BoardDesignSettings
|
class EDA_BoardDesignSettings
|
||||||
|
@ -176,25 +207,17 @@ public:
|
||||||
int m_MaskMargin; // Solder mask margin
|
int m_MaskMargin; // Solder mask margin
|
||||||
int m_LayerThickness; // Layer Thickness for 3D viewer
|
int m_LayerThickness; // Layer Thickness for 3D viewer
|
||||||
|
|
||||||
|
protected:
|
||||||
|
int m_EnabledLayers; // Bit-mask for layer enabling
|
||||||
|
int m_VisibleLayers; // Bit-mask for layer visibility
|
||||||
|
int m_VisibleElements; // Bit-mask for element category visibility
|
||||||
|
|
||||||
|
public:
|
||||||
// Color options for screen display of the Printed Board:
|
// Color options for screen display of the Printed Board:
|
||||||
//@@IMB: Not used int m_PcbGridColor; // Grid color
|
|
||||||
|
|
||||||
int m_EnabledLayers; // IMB: Paving the road
|
|
||||||
int m_VisibleLayers; // IMB: Bit-mask for layer visibility
|
|
||||||
int m_VisibleElements; // IMB: Bit-mask for elements visibility
|
|
||||||
|
|
||||||
int m_LayerColor[32]; // Layer colors (tracks and graphic items)
|
int m_LayerColor[32]; // Layer colors (tracks and graphic items)
|
||||||
|
|
||||||
int m_ViaColor[4]; // Via color (depending on is type)
|
int m_ViaColor[4]; // Via color (depending on is type)
|
||||||
|
|
||||||
//@@IMB: Not used int m_ModuleTextCMPColor; // Text module color for modules on the COMPONENT layer
|
|
||||||
//@@IMB: Not used int m_ModuleTextCUColor; // Text module color for modules on the COPPER layer
|
|
||||||
//@@IMB: Not used int m_ModuleTextNOVColor; // Text module color for "invisible" texts (must be BLACK if really not displayed)
|
|
||||||
//@@IMB: Not used int m_AnchorColor; // Anchor color for modules and texts
|
|
||||||
|
|
||||||
//@@IMB: Not used int m_PadCUColor; // Pad color for the COPPER side of the pad
|
|
||||||
//@@IMB: Not used int m_PadCMPColor; // Pad color for the COMPONENT side of the pad
|
|
||||||
|
|
||||||
// Pad color for the pads of both sides is m_PadCUColor OR m_PadCMPColor (in terms of colors)
|
// Pad color for the pads of both sides is m_PadCUColor OR m_PadCMPColor (in terms of colors)
|
||||||
|
|
||||||
int m_RatsnestColor; // Ratsnest color
|
int m_RatsnestColor; // Ratsnest color
|
||||||
|
@ -205,40 +228,134 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetVisibleLayers
|
* Function GetVisibleLayers
|
||||||
* returns a bit-map of all the layers that are visible.
|
* returns a bit-mask of all the layers that are visible
|
||||||
* @return int - the visible layers in bit-mapped form.
|
* @return int - the visible layers in bit-mapped form.
|
||||||
*/
|
*/
|
||||||
int GetVisibleLayers() const;
|
int GetVisibleLayers() const;
|
||||||
|
|
||||||
void SetVisibleLayers( int Mask );
|
/**
|
||||||
|
* Function SetVisibleLayers
|
||||||
|
* changes the bit-mask of visible layers
|
||||||
|
* @param aMask = The new bit-mask of visible layers
|
||||||
|
*/
|
||||||
|
void SetVisibleLayers( int aMask );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function IsLayerVisible
|
* Function IsLayerVisible
|
||||||
* @param LayerNumber The number of the layer to be tested.
|
* tests whether a given layer is visible
|
||||||
|
* @param aLayerIndex = The index of the layer to be tested
|
||||||
* @return bool - true if the layer is visible.
|
* @return bool - true if the layer is visible.
|
||||||
*/
|
*/
|
||||||
inline bool IsLayerVisible( int LayerNumber ) const
|
inline bool IsLayerVisible( int aLayerIndex ) const
|
||||||
{
|
{
|
||||||
if( LayerNumber < 0 || LayerNumber >= 32 ) //@@IMB: Altough Pcbnew uses only 29, Gerbview uses all 32 layers
|
if( aLayerIndex < 0 || aLayerIndex >= 32 ) //@@IMB: Altough Pcbnew uses only 29, Gerbview uses all 32 layers
|
||||||
return false;
|
return false;
|
||||||
return (bool)( m_VisibleLayers & 1 << LayerNumber );
|
// If a layer is disabled, it is automatically invisible
|
||||||
|
return (bool)( m_VisibleLayers & m_EnabledLayers & 1 << aLayerIndex );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetLayerVisibility( int LayerNumber, bool State );
|
/**
|
||||||
|
* Function SetLayerVisibility
|
||||||
|
* changes the visibility of a given layer
|
||||||
|
* @param aLayerIndex = The index of the layer to be changed
|
||||||
|
* @param aNewState = The new visibility state of the layer
|
||||||
|
*/
|
||||||
|
void SetLayerVisibility( int aLayerIndex, bool aNewState );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function GetVisibleElements
|
||||||
|
* returns a bit-mask of all the element categories that are visible
|
||||||
|
* @return int - the visible element categories in bit-mapped form.
|
||||||
|
*/
|
||||||
|
inline int GetVisibleElements() const
|
||||||
|
{
|
||||||
|
return m_VisibleElements;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function SetVisibleElements
|
||||||
|
* changes the bit-mask of visible element categories
|
||||||
|
* @param aMask = The new bit-mask of visible element categories
|
||||||
|
*/
|
||||||
|
inline void SetVisibleElements( int aMask )
|
||||||
|
{
|
||||||
|
m_VisibleElements = aMask;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function IsElementVisible
|
* Function IsElementVisible
|
||||||
* @param ElementNumber The number of the element to be tested.
|
* tests whether a given element category is visible
|
||||||
* @return bool - true if the elememt is visible.
|
* @param aCategoryIndex = The index of the element category to be tested.
|
||||||
|
* @return bool - true if the element is visible.
|
||||||
*/
|
*/
|
||||||
inline bool IsElementVisible( int ElementNumber ) const
|
inline bool IsElementVisible( int aCategoryIndex ) const
|
||||||
{
|
{
|
||||||
if( ElementNumber < 0 || ElementNumber > PAD_CMP_VISIBLE )
|
if( aCategoryIndex < 0 || aCategoryIndex > PAD_CMP_VISIBLE )
|
||||||
return false;
|
return false;
|
||||||
return (bool)( m_VisibleElements & 1 << ElementNumber );
|
return (bool)( m_VisibleElements & 1 << aCategoryIndex );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetElementVisibility( int ElementNumber, bool State );
|
/**
|
||||||
|
* Function SetElementVisibility
|
||||||
|
* changes the visibility of an element category
|
||||||
|
* @param aCategoryIndex = The index of the element category to be changed
|
||||||
|
* @param aNewState = The new visibility state of the element category
|
||||||
|
*/
|
||||||
|
void SetElementVisibility( int aCategoryIndex, bool aNewState );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function GetEnabledLayers
|
||||||
|
* returns a bit-mask of all the layers that are enabled
|
||||||
|
* @return int - the enabled layers in bit-mapped form.
|
||||||
|
*/
|
||||||
|
inline int GetEnabledLayers() const
|
||||||
|
{
|
||||||
|
return m_EnabledLayers;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function SetEnabledLayers
|
||||||
|
* changes the bit-mask of enabled layers
|
||||||
|
* @param aMask = The new bit-mask of enabled layers
|
||||||
|
*/
|
||||||
|
void SetEnabledLayers( int aMask )
|
||||||
|
{
|
||||||
|
// TODO; ensure consistency with m_CopperLayerCount
|
||||||
|
m_EnabledLayers = aMask;
|
||||||
|
// A disabled layer cannot be visible
|
||||||
|
m_VisibleLayers &= aMask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function IsLayerEnabled
|
||||||
|
* tests whether a given layer is enabled
|
||||||
|
* @param aLayerIndex = The index of the layer to be tested
|
||||||
|
* @return bool - true if the layer is enabled
|
||||||
|
*/
|
||||||
|
inline bool IsLayerEnabled( int aLayerIndex )
|
||||||
|
{
|
||||||
|
return (bool)( m_EnabledLayers & 1 << aLayerIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function GetCopperLayerCount
|
||||||
|
* @return int - the number of neabled copper layers
|
||||||
|
*/
|
||||||
|
inline int GetCopperLayerCount() const
|
||||||
|
{
|
||||||
|
return m_CopperLayerCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function SetCopperLayerCount
|
||||||
|
* do what its name says...
|
||||||
|
* @param aNewLayerCount = The new number of enabled copper layers
|
||||||
|
*/
|
||||||
|
inline void SetCopperLayerCount( int aNewLayerCount )
|
||||||
|
{
|
||||||
|
// TODO; ensure consistency with the m_EnabledLayers member
|
||||||
|
m_CopperLayerCount = aNewLayerCount;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ set(PCBNEW_SRCS
|
||||||
cross-probing.cpp
|
cross-probing.cpp
|
||||||
debug_kbool_key_file_fct.cpp
|
debug_kbool_key_file_fct.cpp
|
||||||
deltrack.cpp
|
deltrack.cpp
|
||||||
dialog_copper_layers_setup_base.cpp
|
# dialog_copper_layers_setup_base.cpp
|
||||||
dialog_copper_layers_setup.cpp
|
# dialog_copper_layers_setup.cpp
|
||||||
dialog_copper_zones.cpp
|
dialog_copper_zones.cpp
|
||||||
dialog_copper_zones_base.cpp
|
dialog_copper_zones_base.cpp
|
||||||
dialog_design_rules.cpp
|
dialog_design_rules.cpp
|
||||||
|
@ -50,6 +50,7 @@ set(PCBNEW_SRCS
|
||||||
dialog_graphic_item_properties.cpp
|
dialog_graphic_item_properties.cpp
|
||||||
dialog_graphic_item_properties_base.cpp
|
dialog_graphic_item_properties_base.cpp
|
||||||
# dialog_initpcb.cpp
|
# dialog_initpcb.cpp
|
||||||
|
dialog_layers_setup.cpp
|
||||||
dialog_netlist.cpp
|
dialog_netlist.cpp
|
||||||
dialog_netlist_fbp.cpp
|
dialog_netlist_fbp.cpp
|
||||||
dialog_pcb_text_properties.cpp
|
dialog_pcb_text_properties.cpp
|
||||||
|
|
|
@ -129,9 +129,11 @@ BOARD::~BOARD()
|
||||||
|
|
||||||
wxString BOARD::GetLayerName( int aLayerIndex ) const
|
wxString BOARD::GetLayerName( int aLayerIndex ) const
|
||||||
{
|
{
|
||||||
|
if( ! IsValidLayerIndex( aLayerIndex ))
|
||||||
|
return wxEmptyString;
|
||||||
|
|
||||||
// copper layer names are stored in the BOARD.
|
// copper layer names are stored in the BOARD.
|
||||||
if( (unsigned) aLayerIndex < (unsigned) GetCopperLayerCount()
|
if( IsValidCopperLayerIndex( aLayerIndex ) && m_BoardSettings->IsLayerEnabled( aLayerIndex ))
|
||||||
|| aLayerIndex == LAST_COPPER_LAYER )
|
|
||||||
{
|
{
|
||||||
// default names were set in BOARD::BOARD() but they may be
|
// default names were set in BOARD::BOARD() but they may be
|
||||||
// over-ridden by BOARD::SetLayerName()
|
// over-ridden by BOARD::SetLayerName()
|
||||||
|
@ -144,30 +146,30 @@ wxString BOARD::GetLayerName( int aLayerIndex ) const
|
||||||
|
|
||||||
bool BOARD::SetLayerName( int aLayerIndex, const wxString& aLayerName )
|
bool BOARD::SetLayerName( int aLayerIndex, const wxString& aLayerName )
|
||||||
{
|
{
|
||||||
if( (unsigned) aLayerIndex < (unsigned) GetCopperLayerCount()
|
if( ! IsValidCopperLayerIndex( aLayerIndex ))
|
||||||
|| aLayerIndex==LAST_COPPER_LAYER )
|
return false;
|
||||||
|
|
||||||
|
if( aLayerName == wxEmptyString || aLayerName.Len() > 20 )
|
||||||
|
return 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( m_BoardSettings->IsLayerEnabled( aLayerIndex ))
|
||||||
{
|
{
|
||||||
if( aLayerName == wxEmptyString || aLayerName.Len() > 20 )
|
for( int i = 0; i < NB_COPPER_LAYERS; i++ )
|
||||||
return false;
|
|
||||||
|
|
||||||
// no quote chars in the name allowed
|
|
||||||
if( aLayerName.Find( wxChar( '"' ) ) != wxNOT_FOUND )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// ensure unique-ness of layer names
|
|
||||||
for( int layer = 0; layer<GetCopperLayerCount() || layer==LAST_COPPER_LAYER; )
|
|
||||||
{
|
{
|
||||||
if( layer!=aLayerIndex && aLayerName == m_Layer[layer].m_Name )
|
if( i != aLayerIndex && m_BoardSettings->IsLayerEnabled( i ) && NameTemp == m_Layer[i].m_Name )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( ++layer == GetCopperLayerCount() )
|
|
||||||
layer = LAST_COPPER_LAYER;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Layer[aLayerIndex].m_Name = aLayerName;
|
m_Layer[aLayerIndex].m_Name = NameTemp;
|
||||||
|
|
||||||
// replace any spaces with underscores
|
|
||||||
m_Layer[aLayerIndex].m_Name.Replace( wxT( " " ), wxT( "_" ) );
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +180,12 @@ bool BOARD::SetLayerName( int aLayerIndex, const wxString& aLayerName )
|
||||||
|
|
||||||
LAYER_T BOARD::GetLayerType( int aLayerIndex ) const
|
LAYER_T BOARD::GetLayerType( int aLayerIndex ) const
|
||||||
{
|
{
|
||||||
if( (unsigned) aLayerIndex < (unsigned) GetCopperLayerCount() )
|
if( ! IsValidCopperLayerIndex( aLayerIndex ))
|
||||||
|
return LT_SIGNAL;
|
||||||
|
|
||||||
|
//@@IMB: The original test was broken due to the discontinuity
|
||||||
|
// in the layer sequence.
|
||||||
|
if( m_BoardSettings->IsLayerEnabled( aLayerIndex ))
|
||||||
return m_Layer[aLayerIndex].m_Type;
|
return m_Layer[aLayerIndex].m_Type;
|
||||||
return LT_SIGNAL;
|
return LT_SIGNAL;
|
||||||
}
|
}
|
||||||
|
@ -186,7 +193,12 @@ LAYER_T BOARD::GetLayerType( int aLayerIndex ) const
|
||||||
|
|
||||||
bool BOARD::SetLayerType( int aLayerIndex, LAYER_T aLayerType )
|
bool BOARD::SetLayerType( int aLayerIndex, LAYER_T aLayerType )
|
||||||
{
|
{
|
||||||
if( (unsigned) aLayerIndex < (unsigned) GetCopperLayerCount() )
|
if( ! IsValidCopperLayerIndex( aLayerIndex ))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
//@@IMB: The original test was broken due to the discontinuity
|
||||||
|
// in the layer sequence.
|
||||||
|
if( m_BoardSettings->IsLayerEnabled( aLayerIndex ))
|
||||||
{
|
{
|
||||||
m_Layer[aLayerIndex].m_Type = aLayerType;
|
m_Layer[aLayerIndex].m_Type = aLayerType;
|
||||||
return true;
|
return true;
|
||||||
|
@ -239,6 +251,36 @@ int BOARD::GetCopperLayerCount() const
|
||||||
return m_BoardSettings->m_CopperLayerCount;
|
return m_BoardSettings->m_CopperLayerCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int BOARD::GetEnabledLayers() const
|
||||||
|
{
|
||||||
|
return m_BoardSettings->GetEnabledLayers();
|
||||||
|
}
|
||||||
|
|
||||||
|
int BOARD::GetVisibleLayers() const
|
||||||
|
{
|
||||||
|
return m_BoardSettings->GetVisibleLayers();
|
||||||
|
}
|
||||||
|
|
||||||
|
void BOARD::SetEnabledLayers( int aLayerMask )
|
||||||
|
{
|
||||||
|
m_BoardSettings->SetEnabledLayers( aLayerMask );
|
||||||
|
}
|
||||||
|
|
||||||
|
void BOARD::SetVisibleLayers( int aLayerMask )
|
||||||
|
{
|
||||||
|
m_BoardSettings->SetVisibleLayers( aLayerMask );
|
||||||
|
}
|
||||||
|
|
||||||
|
void BOARD::SetVisibleElements( int aMask )
|
||||||
|
{
|
||||||
|
m_BoardSettings->SetVisibleElements( aMask );
|
||||||
|
}
|
||||||
|
|
||||||
|
int BOARD::GetVisibleElements() const
|
||||||
|
{
|
||||||
|
return m_BoardSettings->GetVisibleElements();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
wxPoint& BOARD::GetPosition()
|
wxPoint& BOARD::GetPosition()
|
||||||
{
|
{
|
||||||
|
|
|
@ -207,6 +207,55 @@ public:
|
||||||
*/
|
*/
|
||||||
int GetCopperLayerCount() const;
|
int GetCopperLayerCount() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function GetEnabledLayers
|
||||||
|
* is a proxy function that calls the correspondent function in m_BoardSettings
|
||||||
|
* Returns a bit-mask of all the layers that are enabled
|
||||||
|
* @return int - the enabled layers in bit-mapped form.
|
||||||
|
*/
|
||||||
|
int GetEnabledLayers() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function GetVisibleLayers
|
||||||
|
* is 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.
|
||||||
|
*/
|
||||||
|
int GetVisibleLayers() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function SetEnabledLayers
|
||||||
|
* is a proxy function that calls the correspondent function in m_BoardSettings
|
||||||
|
* Changes the bit-mask of enabled layers
|
||||||
|
* @param aMask = The new bit-mask of enabled layers
|
||||||
|
*/
|
||||||
|
void SetEnabledLayers( int aLayerMask );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function SetVisibleLayers
|
||||||
|
* is a proxy function that calls the correspondent function in m_BoardSettings
|
||||||
|
* changes the bit-mask of visible layers
|
||||||
|
* @param aMask = The new bit-mask of visible layers
|
||||||
|
*/
|
||||||
|
void SetVisibleLayers( int aLayerMask );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function SetVisibleElements
|
||||||
|
* is 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 categories
|
||||||
|
*/
|
||||||
|
void SetVisibleElements( int aMask );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function GetVisibleElements
|
||||||
|
* is a proxy function that calls the correspondent function in m_BoardSettings
|
||||||
|
* returns a bit-mask of all the element categories that are visible
|
||||||
|
* @return int - the visible element categories in bit-mapped form.
|
||||||
|
*/
|
||||||
|
int GetVisibleElements() const;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetLayerName
|
* Function GetLayerName
|
||||||
* returns the name of the copper layer given by aLayerIndex.
|
* returns the name of the copper layer given by aLayerIndex.
|
||||||
|
@ -555,10 +604,10 @@ public:
|
||||||
* @param bMessageBoxInt == true, shows message when clipping occurs.
|
* @param bMessageBoxInt == true, shows message when clipping occurs.
|
||||||
* @param bMessageBoxArc == true, shows message when clipping can't be done due to arcs.
|
* @param bMessageBoxArc == true, shows message when clipping can't be done due to arcs.
|
||||||
* @param bRetainArcs = true to handle arcs (not really used in kicad)
|
* @param bRetainArcs = true to handle arcs (not really used in kicad)
|
||||||
* @return:
|
* @return :
|
||||||
* -1 if arcs intersect other sides, so polygon can't be clipped
|
* -1 if arcs intersect other sides, so polygon can't be clipped
|
||||||
* 0 if no intersecting sides
|
* 0 if no intersecting sides
|
||||||
* 1 if intersecting sides
|
* 1 if intersecting sides
|
||||||
* Also sets areas->utility1 flags if areas are modified
|
* Also sets areas->utility1 flags if areas are modified
|
||||||
*/
|
*/
|
||||||
int ClipAreaPolygon( PICKED_ITEMS_LIST* aNewZonesList,
|
int ClipAreaPolygon( PICKED_ITEMS_LIST* aNewZonesList,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/* fonctions membres des classes utilisees dans pcbnew (voir pcbstruct.h */
|
/* fonctions membres des classes utilisees dans pcbnew (voir pcbstruct.h */
|
||||||
/* sauf routines relatives aux pistes (voir class_track.cpp) */
|
/* sauf routines relatives aux pistes (voir class_track.cpp) */
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
@ -198,31 +198,31 @@ EDA_BoardDesignSettings::EDA_BoardDesignSettings()
|
||||||
LIGHTGRAY
|
LIGHTGRAY
|
||||||
};
|
};
|
||||||
|
|
||||||
m_CopperLayerCount = 2; // Default design is a double sided board
|
m_CopperLayerCount = 2; // Default design is a double sided board
|
||||||
m_ViaDrill = 250; // defualt via drill (for the entire board)
|
m_ViaDrill = 250; // defualt via drill (for the entire board)
|
||||||
m_ViaDrillCustomValue = 250; // via drill for vias which must have a defined drill value
|
m_ViaDrillCustomValue = 250; // via drill for vias which must have a defined drill value
|
||||||
m_CurrentViaSize = 450; // Current via size
|
m_CurrentViaSize = 450; // Current via size
|
||||||
m_CurrentViaType = VIA_THROUGH; // via type (VIA_BLIND_BURIED, VIA_THROUGH VIA_MICROVIA)
|
m_CurrentViaType = VIA_THROUGH; // via type (VIA_BLIND_BURIED, VIA_THROUGH VIA_MICROVIA)
|
||||||
m_CurrentTrackWidth = 170; // current track width
|
m_CurrentTrackWidth = 170; // current track width
|
||||||
m_UseConnectedTrackWidth = false; // if true, when creating a new track starting on an existing track, use this track width
|
m_UseConnectedTrackWidth = false; // if true, when creating a new track starting on an existing track, use this track width
|
||||||
m_MicroViaDrill = 50; // micro via drill (for the entire board)
|
m_MicroViaDrill = 50; // micro via drill (for the entire board)
|
||||||
m_CurrentMicroViaSize = 150; // Current micro via size
|
m_CurrentMicroViaSize = 150; // Current micro via size
|
||||||
m_MicroViasAllowed = false; // true to allow micro vias
|
m_MicroViasAllowed = false; // true to allow micro vias
|
||||||
m_DrawSegmentWidth = 100; // current graphic line width (not EDGE layer)
|
m_DrawSegmentWidth = 100; // current graphic line width (not EDGE layer)
|
||||||
m_EdgeSegmentWidth = 100; // current graphic line width (EDGE layer only)
|
m_EdgeSegmentWidth = 100; // current graphic line width (EDGE layer only)
|
||||||
m_PcbTextWidth = 100; // current Pcb (not module) Text width
|
m_PcbTextWidth = 100; // current Pcb (not module) Text width
|
||||||
m_PcbTextSize = wxSize( 500, 500 ); // current Pcb (not module) Text size
|
m_PcbTextSize = wxSize( 500, 500 ); // current Pcb (not module) Text size
|
||||||
m_TrackClearance = 100; // track to track and track to pads clearance
|
m_TrackClearance = 100; // track to track and track to pads clearance
|
||||||
m_TrackMinWidth = 80; // track min value for width ((min copper size value
|
m_TrackMinWidth = 80; // track min value for width ((min copper size value
|
||||||
m_ViasMinSize = 350; // vias (not micro vias) min diameter
|
m_ViasMinSize = 350; // vias (not micro vias) min diameter
|
||||||
m_MicroViasMinSize = 200; // micro vias (not vias) min diameter
|
m_MicroViasMinSize = 200; // micro vias (not vias) min diameter
|
||||||
m_MaskMargin = 150; // Solder mask margin
|
m_MaskMargin = 150; // Solder mask margin
|
||||||
/* Color options for screen display of the Printed Board: */
|
/* Color options for screen display of the Printed Board: */
|
||||||
|
|
||||||
|
|
||||||
//@@IMB: Not used m_PcbGridColor = DARKGRAY; // Grid color
|
//@@IMB: Not used m_PcbGridColor = DARKGRAY; // Grid color
|
||||||
|
|
||||||
m_EnabledLayers = 0x1fffffff; // IMB: All layers enabled at first. TODO: Use a macro for the initial value.
|
m_EnabledLayers = ALL_LAYERS; // All layers enabled at first.
|
||||||
m_VisibleLayers = 0xffffffff; // IMB: All layers visible at first. TODO: Use a macro for the initial value.
|
m_VisibleLayers = 0xffffffff; // IMB: All layers visible at first. TODO: Use a macro for the initial value.
|
||||||
m_VisibleElements = 0x00000fff; // IMB: All elements visible at first. TODO: Use a macro for the initial value.
|
m_VisibleElements = 0x00000fff; // IMB: All elements visible at first. TODO: Use a macro for the initial value.
|
||||||
|
|
||||||
|
@ -252,45 +252,28 @@ int EDA_BoardDesignSettings::GetVisibleLayers() const
|
||||||
return m_VisibleLayers;
|
return m_VisibleLayers;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EDA_BoardDesignSettings::SetVisibleLayers( int Mask )
|
void EDA_BoardDesignSettings::SetVisibleLayers( int aMask )
|
||||||
{
|
{
|
||||||
m_VisibleLayers = Mask & 0x1fffffff;
|
m_VisibleLayers = aMask & m_EnabledLayers & ALL_LAYERS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* //@@IMB: Made inline
|
void EDA_BoardDesignSettings::SetLayerVisibility( int aLayerIndex, bool aNewState )
|
||||||
bool EDA_BoardDesignSettings::IsLayerVisible( int LayerNumber ) const
|
|
||||||
{
|
{
|
||||||
if( LayerNumber < 0 || LayerNumber >= 32 ) //@@IMB: Altough Pcbnew uses only 29, Gerbview uses all 32 layers
|
// Altough Pcbnew uses only 29, Gerbview uses all 32 layers
|
||||||
return false;
|
if( aLayerIndex < 0 || aLayerIndex >= 32 )
|
||||||
return (bool)( m_VisibleLayers & 1 << LayerNumber );
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void EDA_BoardDesignSettings::SetLayerVisibility( int LayerNumber, bool State )
|
|
||||||
{
|
|
||||||
if( LayerNumber < 0 || LayerNumber >= 32 ) //@@IMB: Altough Pcbnew uses only 29, Gerbview uses all 32 layers
|
|
||||||
return;
|
return;
|
||||||
if( State )
|
if( aNewState && IsLayerEnabled( aLayerIndex ))
|
||||||
m_VisibleLayers |= 1 << LayerNumber;
|
m_VisibleLayers |= 1 << aLayerIndex;
|
||||||
else
|
else
|
||||||
m_VisibleLayers &= ~( 1 << LayerNumber );
|
m_VisibleLayers &= ~( 1 << aLayerIndex );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* //@@IMB: Made inline
|
void EDA_BoardDesignSettings::SetElementVisibility( int aElementCategory, bool aNewState )
|
||||||
bool EDA_BoardDesignSettings::IsElementVisible( int ElementNumber ) const
|
|
||||||
{
|
{
|
||||||
if( ElementNumber < 0 || ElementNumber > PAD_CMP_VISIBLE )
|
if( aElementCategory < 0 || aElementCategory > PAD_CMP_VISIBLE )
|
||||||
return false;
|
|
||||||
return (bool)( m_VisibleElements & 1 << ElementNumber );
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void EDA_BoardDesignSettings::SetElementVisibility( int ElementNumber, bool State )
|
|
||||||
{
|
|
||||||
if( ElementNumber < 0 || ElementNumber > PAD_CMP_VISIBLE )
|
|
||||||
return;
|
return;
|
||||||
if( State )
|
if( aNewState )
|
||||||
m_VisibleElements |= 1 << ElementNumber;
|
m_VisibleElements |= 1 << aElementCategory;
|
||||||
else
|
else
|
||||||
m_VisibleElements &= ~( 1 << ElementNumber );
|
m_VisibleElements &= ~( 1 << aElementCategory );
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ void Dialog_GeneralOptions::init()
|
||||||
wxString timevalue;
|
wxString timevalue;
|
||||||
timevalue << g_TimeOut / 60;
|
timevalue << g_TimeOut / 60;
|
||||||
m_SaveTime->SetValue( timevalue );
|
m_SaveTime->SetValue( timevalue );
|
||||||
|
/*
|
||||||
int layer_count[] = {1,2,4,6,8,10,12,14,16};
|
int layer_count[] = {1,2,4,6,8,10,12,14,16};
|
||||||
m_LayerNumber->SetSelection(1);
|
m_LayerNumber->SetSelection(1);
|
||||||
for ( unsigned ii = 0; ii < sizeof(layer_count); ii++ )
|
for ( unsigned ii = 0; ii < sizeof(layer_count); ii++ )
|
||||||
|
@ -54,7 +55,7 @@ void Dialog_GeneralOptions::init()
|
||||||
m_LayerNumber->SetSelection(ii);
|
m_LayerNumber->SetSelection(ii);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
m_MaxShowLinks->SetValue( g_MaxLinksShowed );
|
m_MaxShowLinks->SetValue( g_MaxLinksShowed );
|
||||||
|
|
||||||
m_DrcOn->SetValue( Drc_On );
|
m_DrcOn->SetValue( Drc_On );
|
||||||
|
@ -103,10 +104,11 @@ void Dialog_GeneralOptions::OnOkClick( wxCommandEvent& event )
|
||||||
g_TimeOut = 60 * m_SaveTime->GetValue();
|
g_TimeOut = 60 * m_SaveTime->GetValue();
|
||||||
|
|
||||||
/* Mise a jour de la combobox d'affichage de la couche active */
|
/* Mise a jour de la combobox d'affichage de la couche active */
|
||||||
|
/*
|
||||||
int layer_count[] = {1,2,4,6,8,10,12,14,16};
|
int layer_count[] = {1,2,4,6,8,10,12,14,16};
|
||||||
g_DesignSettings.m_CopperLayerCount = layer_count[m_LayerNumber->GetSelection()];
|
g_DesignSettings.m_CopperLayerCount = layer_count[m_LayerNumber->GetSelection()];
|
||||||
m_Parent->ReCreateLayerBox( NULL );
|
m_Parent->ReCreateLayerBox( NULL );
|
||||||
|
*/
|
||||||
g_MaxLinksShowed = m_MaxShowLinks->GetValue();
|
g_MaxLinksShowed = m_MaxShowLinks->GetValue();
|
||||||
Drc_On = m_DrcOn->GetValue();
|
Drc_On = m_DrcOn->GetValue();
|
||||||
if( g_Show_Ratsnest != m_ShowGlobalRatsnest->GetValue() )
|
if( g_Show_Ratsnest != m_ShowGlobalRatsnest->GetValue() )
|
||||||
|
|
|
@ -11,164 +11,165 @@
|
||||||
|
|
||||||
DialogGeneralOptionsBoardEditor_base::DialogGeneralOptionsBoardEditor_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
DialogGeneralOptionsBoardEditor_base::DialogGeneralOptionsBoardEditor_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
||||||
{
|
{
|
||||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||||
|
|
||||||
wxBoxSizer* bMainSizer;
|
wxBoxSizer* bMainSizer;
|
||||||
bMainSizer = new wxBoxSizer( wxHORIZONTAL );
|
bMainSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
wxBoxSizer* bLeftSizer;
|
wxBoxSizer* bLeftSizer;
|
||||||
bLeftSizer = new wxBoxSizer( wxVERTICAL );
|
bLeftSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
wxString m_PolarDisplayChoices[] = { _("No Display"), _("Display") };
|
wxString m_PolarDisplayChoices[] = { _("No Display"), _("Display") };
|
||||||
int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
|
int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
|
||||||
m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Display Polar Coord"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
|
m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Display Polar Coord"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
m_PolarDisplay->SetSelection( 1 );
|
m_PolarDisplay->SetSelection( 1 );
|
||||||
m_PolarDisplay->SetToolTip( _("Activates the display of relative coordinates from relative origin (set by the space key)\nto the cursor, in polar coordinates (angle and distance)") );
|
m_PolarDisplay->SetToolTip( _("Activates the display of relative coordinates from relative origin (set by the space key)\nto the cursor, in polar coordinates (angle and distance)") );
|
||||||
|
|
||||||
bLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 );
|
bLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") };
|
wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") };
|
||||||
int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString );
|
int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString );
|
||||||
m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS );
|
m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
m_UnitsSelection->SetSelection( 1 );
|
m_UnitsSelection->SetSelection( 1 );
|
||||||
m_UnitsSelection->SetToolTip( _("Selection of units used to display dimensions and positions of items") );
|
m_UnitsSelection->SetToolTip( _("Selection of units used to display dimensions and positions of items") );
|
||||||
|
|
||||||
bLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 );
|
bLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
wxString m_CursorShapeChoices[] = { _("Small cross"), _("Full screen cursor") };
|
wxString m_CursorShapeChoices[] = { _("Small cross"), _("Full screen cursor") };
|
||||||
int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString );
|
int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString );
|
||||||
m_CursorShape = new wxRadioBox( this, wxID_CURSOR_SHAPE, _("Cursor"), wxDefaultPosition, wxDefaultSize, m_CursorShapeNChoices, m_CursorShapeChoices, 1, wxRA_SPECIFY_COLS );
|
m_CursorShape = new wxRadioBox( this, wxID_CURSOR_SHAPE, _("Cursor"), wxDefaultPosition, wxDefaultSize, m_CursorShapeNChoices, m_CursorShapeChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
m_CursorShape->SetSelection( 0 );
|
m_CursorShape->SetSelection( 0 );
|
||||||
m_CursorShape->SetToolTip( _("Main cursor shape selection (small cross or large cursor)") );
|
m_CursorShape->SetToolTip( _("Main cursor shape selection (small cross or large cursor)") );
|
||||||
|
|
||||||
bLeftSizer->Add( m_CursorShape, 0, wxALL|wxEXPAND, 5 );
|
bLeftSizer->Add( m_CursorShape, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
bMainSizer->Add( bLeftSizer, 1, wxEXPAND, 5 );
|
bMainSizer->Add( bLeftSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bMiddleLeftSizer;
|
wxBoxSizer* bMiddleLeftSizer;
|
||||||
bMiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
|
bMiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
wxString m_LayerNumberChoices[] = { _("1"), _("2"), _("4"), _("6"), _("8"), _("10"), _("12"), _("14"), _("16") };
|
/*
|
||||||
int m_LayerNumberNChoices = sizeof( m_LayerNumberChoices ) / sizeof( wxString );
|
wxString m_LayerNumberChoices[] = { _("1"), _("2"), _("4"), _("6"), _("8"), _("10"), _("12"), _("14"), _("16") };
|
||||||
m_LayerNumber = new wxRadioBox( this, wxID_LAYER_NUMBER, _("Layers:"), wxDefaultPosition, wxDefaultSize, m_LayerNumberNChoices, m_LayerNumberChoices, 3, wxRA_SPECIFY_COLS );
|
int m_LayerNumberNChoices = sizeof( m_LayerNumberChoices ) / sizeof( wxString );
|
||||||
m_LayerNumber->SetSelection( 1 );
|
m_LayerNumber = new wxRadioBox( this, wxID_LAYER_NUMBER, _("Layers:"), wxDefaultPosition, wxDefaultSize, m_LayerNumberNChoices, m_LayerNumberChoices, 3, wxRA_SPECIFY_COLS );
|
||||||
m_LayerNumber->SetToolTip( _("Active copper layers count selection") );
|
m_LayerNumber->SetSelection( 1 );
|
||||||
|
m_LayerNumber->SetToolTip( _("Active copper layers count selection") );
|
||||||
|
|
||||||
bMiddleLeftSizer->Add( m_LayerNumber, 0, wxALL|wxEXPAND, 5 );
|
bMiddleLeftSizer->Add( m_LayerNumber, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
*/
|
||||||
|
m_staticTextmaxlinks = new wxStaticText( this, wxID_ANY, _("Max Links:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextmaxlinks->Wrap( -1 );
|
||||||
|
bMiddleLeftSizer->Add( m_staticTextmaxlinks, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_staticTextmaxlinks = new wxStaticText( this, wxID_ANY, _("Max Links:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_MaxShowLinks = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 5, 1 );
|
||||||
m_staticTextmaxlinks->Wrap( -1 );
|
m_MaxShowLinks->SetToolTip( _("Adjust the number of ratsnets shown from cursor to closest pads") );
|
||||||
bMiddleLeftSizer->Add( m_staticTextmaxlinks, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
|
||||||
m_MaxShowLinks = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 5, 1 );
|
bMiddleLeftSizer->Add( m_MaxShowLinks, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||||
m_MaxShowLinks->SetToolTip( _("Adjust the number of ratsnets shown from cursor to closest pads") );
|
|
||||||
|
|
||||||
bMiddleLeftSizer->Add( m_MaxShowLinks, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
m_staticTextautosave = new wxStaticText( this, wxID_ANY, _("Auto Save (minuts):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextautosave->Wrap( -1 );
|
||||||
|
bMiddleLeftSizer->Add( m_staticTextautosave, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_staticTextautosave = new wxStaticText( this, wxID_ANY, _("Auto Save (minuts):"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_SaveTime = new wxSpinCtrl( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 60, 0 );
|
||||||
m_staticTextautosave->Wrap( -1 );
|
m_SaveTime->SetToolTip( _("Delay after the first change to create a backup file of the board on disk.") );
|
||||||
bMiddleLeftSizer->Add( m_staticTextautosave, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
|
||||||
|
|
||||||
m_SaveTime = new wxSpinCtrl( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 60, 0 );
|
bMiddleLeftSizer->Add( m_SaveTime, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||||
m_SaveTime->SetToolTip( _("Delay after the first change to create a backup file of the board on disk.") );
|
|
||||||
|
|
||||||
bMiddleLeftSizer->Add( m_SaveTime, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
bMainSizer->Add( bMiddleLeftSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
bMainSizer->Add( bMiddleLeftSizer, 1, wxEXPAND, 5 );
|
wxStaticBoxSizer* bMiddleRightBoxSizer;
|
||||||
|
bMiddleRightBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL );
|
||||||
|
|
||||||
wxStaticBoxSizer* bMiddleRightBoxSizer;
|
m_DrcOn = new wxCheckBox( this, wxID_DRC_ONOFF, _("Drc ON"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bMiddleRightBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL );
|
m_DrcOn->SetValue(true);
|
||||||
|
|
||||||
m_DrcOn = new wxCheckBox( this, wxID_DRC_ONOFF, _("Drc ON"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_DrcOn->SetToolTip( _("Enable/disable the DRC control.\nWhen DRC is disable, all connections are allowed.") );
|
||||||
m_DrcOn->SetValue(true);
|
|
||||||
|
|
||||||
m_DrcOn->SetToolTip( _("Enable/disable the DRC control.\nWhen DRC is disable, all connections are allowed.") );
|
bMiddleRightBoxSizer->Add( m_DrcOn, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
bMiddleRightBoxSizer->Add( m_DrcOn, 0, wxALL|wxEXPAND, 5 );
|
m_ShowGlobalRatsnest = new wxCheckBox( this, wxID_GENERAL_RATSNEST, _("Show Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
||||||
m_ShowGlobalRatsnest = new wxCheckBox( this, wxID_GENERAL_RATSNEST, _("Show Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_ShowGlobalRatsnest->SetToolTip( _("Show (or not) the full rastnest.") );
|
||||||
|
|
||||||
m_ShowGlobalRatsnest->SetToolTip( _("Show (or not) the full rastnest.") );
|
bMiddleRightBoxSizer->Add( m_ShowGlobalRatsnest, 0, wxALL, 5 );
|
||||||
|
|
||||||
bMiddleRightBoxSizer->Add( m_ShowGlobalRatsnest, 0, wxALL, 5 );
|
m_ShowModuleRatsnest = new wxCheckBox( this, wxID_RATSNEST_MODULE, _("Show Mod Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
||||||
m_ShowModuleRatsnest = new wxCheckBox( this, wxID_RATSNEST_MODULE, _("Show Mod Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_ShowModuleRatsnest->SetToolTip( _("Shows (or not) the local ratsnest relative to a footprint, when moving it.\nThis ratsnest is useful to place a footprint.") );
|
||||||
|
|
||||||
m_ShowModuleRatsnest->SetToolTip( _("Shows (or not) the local ratsnest relative to a footprint, when moving it.\nThis ratsnest is useful to place a footprint.") );
|
bMiddleRightBoxSizer->Add( m_ShowModuleRatsnest, 0, wxALL, 5 );
|
||||||
|
|
||||||
bMiddleRightBoxSizer->Add( m_ShowModuleRatsnest, 0, wxALL, 5 );
|
m_TrackAutodel = new wxCheckBox( this, wxID_TRACK_AUTODEL, _("Tracks Auto Del"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
||||||
m_TrackAutodel = new wxCheckBox( this, wxID_TRACK_AUTODEL, _("Tracks Auto Del"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_TrackAutodel->SetToolTip( _("Enable/disable the automatic track deletion when recreating a track.") );
|
||||||
|
|
||||||
m_TrackAutodel->SetToolTip( _("Enable/disable the automatic track deletion when recreating a track.") );
|
bMiddleRightBoxSizer->Add( m_TrackAutodel, 0, wxALL, 5 );
|
||||||
|
|
||||||
bMiddleRightBoxSizer->Add( m_TrackAutodel, 0, wxALL, 5 );
|
m_Track_45_Only_Ctrl = new wxCheckBox( this, wxID_TRACKS45, _("Track only 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
||||||
m_Track_45_Only_Ctrl = new wxCheckBox( this, wxID_TRACKS45, _("Track only 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_Track_45_Only_Ctrl->SetToolTip( _("If enabled, force tracks directions to H, V or 45 degrees, when creating a track.") );
|
||||||
|
|
||||||
m_Track_45_Only_Ctrl->SetToolTip( _("If enabled, force tracks directions to H, V or 45 degrees, when creating a track.") );
|
bMiddleRightBoxSizer->Add( m_Track_45_Only_Ctrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
bMiddleRightBoxSizer->Add( m_Track_45_Only_Ctrl, 0, wxALL, 5 );
|
m_Segments_45_Only_Ctrl = new wxCheckBox( this, wxID_SEGMENTS45, _("Segments 45 Only"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
||||||
m_Segments_45_Only_Ctrl = new wxCheckBox( this, wxID_SEGMENTS45, _("Segments 45 Only"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_Segments_45_Only_Ctrl->SetToolTip( _("If enabled, force segments directions to H, V or 45 degrees, when creating a segment on technical layers.") );
|
||||||
|
|
||||||
m_Segments_45_Only_Ctrl->SetToolTip( _("If enabled, force segments directions to H, V or 45 degrees, when creating a segment on technical layers.") );
|
bMiddleRightBoxSizer->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
bMiddleRightBoxSizer->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 );
|
m_AutoPANOpt = new wxCheckBox( this, wxID_AUTOPAN, _("Auto PAN"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
||||||
m_AutoPANOpt = new wxCheckBox( this, wxID_AUTOPAN, _("Auto PAN"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_AutoPANOpt->SetToolTip( _("Allows auto pan when creating a track, or moving an item.") );
|
||||||
|
|
||||||
m_AutoPANOpt->SetToolTip( _("Allows auto pan when creating a track, or moving an item.") );
|
bMiddleRightBoxSizer->Add( m_AutoPANOpt, 0, wxALL, 5 );
|
||||||
|
|
||||||
bMiddleRightBoxSizer->Add( m_AutoPANOpt, 0, wxALL, 5 );
|
m_Track_DoubleSegm_Ctrl = new wxCheckBox( this, wxID_ANY, _("Double Segm Track"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
||||||
m_Track_DoubleSegm_Ctrl = new wxCheckBox( this, wxID_ANY, _("Double Segm Track"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_Track_DoubleSegm_Ctrl->SetToolTip( _("If enabled, uses two track segments, with 45 degrees angle between them when creating a new track ") );
|
||||||
|
|
||||||
m_Track_DoubleSegm_Ctrl->SetToolTip( _("If enabled, uses two track segments, with 45 degrees angle between them when creating a new track ") );
|
bMiddleRightBoxSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
bMiddleRightBoxSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxALL, 5 );
|
bMainSizer->Add( bMiddleRightBoxSizer, 1, 0, 5 );
|
||||||
|
|
||||||
bMainSizer->Add( bMiddleRightBoxSizer, 1, 0, 5 );
|
wxBoxSizer* bRightSizer;
|
||||||
|
bRightSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
wxBoxSizer* bRightSizer;
|
wxString m_MagneticPadOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
|
||||||
bRightSizer = new wxBoxSizer( wxVERTICAL );
|
int m_MagneticPadOptCtrlNChoices = sizeof( m_MagneticPadOptCtrlChoices ) / sizeof( wxString );
|
||||||
|
m_MagneticPadOptCtrl = new wxRadioBox( this, wxID_ANY, _("Magnetic Pads"), wxDefaultPosition, wxDefaultSize, m_MagneticPadOptCtrlNChoices, m_MagneticPadOptCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
|
m_MagneticPadOptCtrl->SetSelection( 0 );
|
||||||
|
m_MagneticPadOptCtrl->SetToolTip( _("control the capture of the pcb cursor when the mouse cursor enters a pad area") );
|
||||||
|
|
||||||
wxString m_MagneticPadOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
|
bRightSizer->Add( m_MagneticPadOptCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||||
int m_MagneticPadOptCtrlNChoices = sizeof( m_MagneticPadOptCtrlChoices ) / sizeof( wxString );
|
|
||||||
m_MagneticPadOptCtrl = new wxRadioBox( this, wxID_ANY, _("Magnetic Pads"), wxDefaultPosition, wxDefaultSize, m_MagneticPadOptCtrlNChoices, m_MagneticPadOptCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
|
||||||
m_MagneticPadOptCtrl->SetSelection( 0 );
|
|
||||||
m_MagneticPadOptCtrl->SetToolTip( _("control the capture of the pcb cursor when the mouse cursor enters a pad area") );
|
|
||||||
|
|
||||||
bRightSizer->Add( m_MagneticPadOptCtrl, 0, wxALL|wxEXPAND, 5 );
|
wxString m_MagneticTrackOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
|
||||||
|
int m_MagneticTrackOptCtrlNChoices = sizeof( m_MagneticTrackOptCtrlChoices ) / sizeof( wxString );
|
||||||
|
m_MagneticTrackOptCtrl = new wxRadioBox( this, wxID_MAGNETIC_TRACKS, _("Magnetic Tracks"), wxDefaultPosition, wxDefaultSize, m_MagneticTrackOptCtrlNChoices, m_MagneticTrackOptCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
|
m_MagneticTrackOptCtrl->SetSelection( 0 );
|
||||||
|
m_MagneticTrackOptCtrl->SetToolTip( _("Control the capture of the pcb cursor when the mouse cursor enters a track") );
|
||||||
|
|
||||||
wxString m_MagneticTrackOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
|
bRightSizer->Add( m_MagneticTrackOptCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||||
int m_MagneticTrackOptCtrlNChoices = sizeof( m_MagneticTrackOptCtrlChoices ) / sizeof( wxString );
|
|
||||||
m_MagneticTrackOptCtrl = new wxRadioBox( this, wxID_MAGNETIC_TRACKS, _("Magnetic Tracks"), wxDefaultPosition, wxDefaultSize, m_MagneticTrackOptCtrlNChoices, m_MagneticTrackOptCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
|
||||||
m_MagneticTrackOptCtrl->SetSelection( 0 );
|
|
||||||
m_MagneticTrackOptCtrl->SetToolTip( _("Control the capture of the pcb cursor when the mouse cursor enters a track") );
|
|
||||||
|
|
||||||
bRightSizer->Add( m_MagneticTrackOptCtrl, 0, wxALL|wxEXPAND, 5 );
|
m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_buttonOK->SetDefault();
|
||||||
|
bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_buttonOK->SetDefault();
|
bRightSizer->Add( m_buttonCANCEL, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
|
||||||
bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
|
||||||
|
|
||||||
m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
|
bMainSizer->Add( bRightSizer, 1, wxEXPAND, 5 );
|
||||||
bRightSizer->Add( m_buttonCANCEL, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
|
|
||||||
|
|
||||||
bMainSizer->Add( bRightSizer, 1, wxEXPAND, 5 );
|
this->SetSizer( bMainSizer );
|
||||||
|
this->Layout();
|
||||||
|
|
||||||
this->SetSizer( bMainSizer );
|
// Connect Events
|
||||||
this->Layout();
|
m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnOkClick ), NULL, this );
|
||||||
|
m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnCancelClick ), NULL, this );
|
||||||
// Connect Events
|
|
||||||
m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnOkClick ), NULL, this );
|
|
||||||
m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnCancelClick ), NULL, this );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogGeneralOptionsBoardEditor_base::~DialogGeneralOptionsBoardEditor_base()
|
DialogGeneralOptionsBoardEditor_base::~DialogGeneralOptionsBoardEditor_base()
|
||||||
{
|
{
|
||||||
// Disconnect Events
|
// Disconnect Events
|
||||||
m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnOkClick ), NULL, this );
|
m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnOkClick ), NULL, this );
|
||||||
m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnCancelClick ), NULL, this );
|
m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnCancelClick ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,54 +31,54 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
class DialogGeneralOptionsBoardEditor_base : public wxDialog
|
class DialogGeneralOptionsBoardEditor_base : public wxDialog
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
wxID_POLAR_CTRL = 1000,
|
wxID_POLAR_CTRL = 1000,
|
||||||
wxID_UNITS,
|
wxID_UNITS,
|
||||||
wxID_CURSOR_SHAPE,
|
wxID_CURSOR_SHAPE,
|
||||||
wxID_LAYER_NUMBER,
|
// wxID_LAYER_NUMBER,
|
||||||
wxID_DRC_ONOFF,
|
wxID_DRC_ONOFF,
|
||||||
wxID_GENERAL_RATSNEST,
|
wxID_GENERAL_RATSNEST,
|
||||||
wxID_RATSNEST_MODULE,
|
wxID_RATSNEST_MODULE,
|
||||||
wxID_TRACK_AUTODEL,
|
wxID_TRACK_AUTODEL,
|
||||||
wxID_TRACKS45,
|
wxID_TRACKS45,
|
||||||
wxID_SEGMENTS45,
|
wxID_SEGMENTS45,
|
||||||
wxID_AUTOPAN,
|
wxID_AUTOPAN,
|
||||||
wxID_MAGNETIC_TRACKS,
|
wxID_MAGNETIC_TRACKS,
|
||||||
};
|
};
|
||||||
|
|
||||||
wxRadioBox* m_PolarDisplay;
|
wxRadioBox* m_PolarDisplay;
|
||||||
wxRadioBox* m_UnitsSelection;
|
wxRadioBox* m_UnitsSelection;
|
||||||
wxRadioBox* m_CursorShape;
|
wxRadioBox* m_CursorShape;
|
||||||
wxRadioBox* m_LayerNumber;
|
//wxRadioBox* m_LayerNumber;
|
||||||
wxStaticText* m_staticTextmaxlinks;
|
wxStaticText* m_staticTextmaxlinks;
|
||||||
wxSpinCtrl* m_MaxShowLinks;
|
wxSpinCtrl* m_MaxShowLinks;
|
||||||
wxStaticText* m_staticTextautosave;
|
wxStaticText* m_staticTextautosave;
|
||||||
wxSpinCtrl* m_SaveTime;
|
wxSpinCtrl* m_SaveTime;
|
||||||
wxCheckBox* m_DrcOn;
|
wxCheckBox* m_DrcOn;
|
||||||
wxCheckBox* m_ShowGlobalRatsnest;
|
wxCheckBox* m_ShowGlobalRatsnest;
|
||||||
wxCheckBox* m_ShowModuleRatsnest;
|
wxCheckBox* m_ShowModuleRatsnest;
|
||||||
wxCheckBox* m_TrackAutodel;
|
wxCheckBox* m_TrackAutodel;
|
||||||
wxCheckBox* m_Track_45_Only_Ctrl;
|
wxCheckBox* m_Track_45_Only_Ctrl;
|
||||||
wxCheckBox* m_Segments_45_Only_Ctrl;
|
wxCheckBox* m_Segments_45_Only_Ctrl;
|
||||||
wxCheckBox* m_AutoPANOpt;
|
wxCheckBox* m_AutoPANOpt;
|
||||||
wxCheckBox* m_Track_DoubleSegm_Ctrl;
|
wxCheckBox* m_Track_DoubleSegm_Ctrl;
|
||||||
wxRadioBox* m_MagneticPadOptCtrl;
|
wxRadioBox* m_MagneticPadOptCtrl;
|
||||||
wxRadioBox* m_MagneticTrackOptCtrl;
|
wxRadioBox* m_MagneticTrackOptCtrl;
|
||||||
wxButton* m_buttonOK;
|
wxButton* m_buttonOK;
|
||||||
wxButton* m_buttonCANCEL;
|
wxButton* m_buttonCANCEL;
|
||||||
|
|
||||||
// Virtual event handlers, overide them in your derived class
|
// Virtual event handlers, overide them in your derived class
|
||||||
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
|
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
|
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DialogGeneralOptionsBoardEditor_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("General settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 585,280 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DialogGeneralOptionsBoardEditor_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("General settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 585,280 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
~DialogGeneralOptionsBoardEditor_base();
|
~DialogGeneralOptionsBoardEditor_base();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
/* Routines de lecture et sauvegarde des structures en format ASCii */
|
/* Routines de lecture et sauvegarde des structures en format ASCii */
|
||||||
/* Fichier common a PCBNEW et CVPCB */
|
/* Fichier common a PCBNEW et CVPCB */
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
|
|
||||||
/* ioascii.cpp */
|
/* ioascii.cpp */
|
||||||
|
@ -32,12 +32,12 @@
|
||||||
|
|
||||||
$PAD
|
$PAD
|
||||||
Sh "name" forme dimv dimH dV dH orient :forme generale dV, dH = delta dimensions
|
Sh "name" forme dimv dimH dV dH orient :forme generale dV, dH = delta dimensions
|
||||||
Dr diam, dV dH :drill : diametre offsets de percage
|
Dr diam, dV dH :drill : diametre offsets de percage
|
||||||
At type S/N layers : type standard,cms,conn,hole,meca.,
|
At type S/N layers : type standard,cms,conn,hole,meca.,
|
||||||
Stack/Normal,
|
Stack/Normal,
|
||||||
Hexadecimal 32 bits: occupation des couches
|
Hexadecimal 32 bits: occupation des couches
|
||||||
Nm net_code netname
|
Nm net_code netname
|
||||||
Po posrefX posrefy : position refX,Y (= position orient 0 / ancre)
|
Po posrefX posrefy : position refX,Y (= position orient 0 / ancre)
|
||||||
$EndPAD
|
$EndPAD
|
||||||
|
|
||||||
****** Structure module ***********
|
****** Structure module ***********
|
||||||
|
@ -51,12 +51,12 @@
|
||||||
m_TimeCode a usage interne (groupements)
|
m_TimeCode a usage interne (groupements)
|
||||||
Li <namelib>
|
Li <namelib>
|
||||||
|
|
||||||
Cd <text> Description du composant (Composant Doc)
|
Cd <text> Description du composant (Composant Doc)
|
||||||
Kw <text> Liste des mots cle
|
Kw <text> Liste des mots cle
|
||||||
|
|
||||||
Sc schematimestamp de reference schematique
|
Sc schematimestamp de reference schematique
|
||||||
|
|
||||||
Op rot90 rot180 Options de placement auto (cout rot 90, 180 )
|
Op rot90 rot180 Options de placement auto (cout rot 90, 180 )
|
||||||
rot90 est sur 2x4 bits:
|
rot90 est sur 2x4 bits:
|
||||||
lsb = cout rot 90, msb = cout rot -90;
|
lsb = cout rot 90, msb = cout rot -90;
|
||||||
|
|
||||||
|
@ -70,9 +70,9 @@
|
||||||
edge: segment coord ox,oy a fx,fy, relatives
|
edge: segment coord ox,oy a fx,fy, relatives
|
||||||
a l'ancre et orient 0
|
a l'ancre et orient 0
|
||||||
epaisseur w
|
epaisseur w
|
||||||
DC ox oy fx fy w descr cercle (centre, 1 point, epaisseur)
|
DC ox oy fx fy w descr cercle (centre, 1 point, epaisseur)
|
||||||
$PAD
|
$PAD
|
||||||
$EndPAD section pads s'il y en a
|
$EndPAD section pads s'il y en a
|
||||||
$EndMODULE
|
$EndMODULE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ int WinEDA_BasePcbFrame::ReadGeneralDescrPcb( FILE* File, int* LineNum )
|
||||||
sscanf( data, "%X", &EnabledLayers );
|
sscanf( data, "%X", &EnabledLayers );
|
||||||
|
|
||||||
// Setup layer visibility
|
// Setup layer visibility
|
||||||
GetBoard()->m_BoardSettings->m_EnabledLayers = EnabledLayers;
|
GetBoard()->SetEnabledLayers( EnabledLayers );
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -208,7 +208,7 @@ int WinEDA_BasePcbFrame::ReadGeneralDescrPcb( FILE* File, int* LineNum )
|
||||||
sscanf( data, "%X", &VisibleLayers );
|
sscanf( data, "%X", &VisibleLayers );
|
||||||
|
|
||||||
// Setup layer visibility
|
// Setup layer visibility
|
||||||
GetBoard()->m_BoardSettings->m_VisibleLayers = VisibleLayers;
|
GetBoard()->SetVisibleLayers( VisibleLayers );
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ int WinEDA_BasePcbFrame::ReadGeneralDescrPcb( FILE* File, int* LineNum )
|
||||||
sscanf( data, "%X", &VisibleElements );
|
sscanf( data, "%X", &VisibleElements );
|
||||||
|
|
||||||
// Setup elements visibility
|
// Setup elements visibility
|
||||||
GetBoard()->m_BoardSettings->m_VisibleElements = VisibleElements;
|
GetBoard()->SetVisibleElements( VisibleElements );
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -665,9 +665,9 @@ bool WinEDA_PcbFrame::WriteGeneralDescrPcb( FILE* File )
|
||||||
|
|
||||||
// Write old format for Layer count (for compatibility with old versions of pcbnew
|
// Write old format for Layer count (for compatibility with old versions of pcbnew
|
||||||
fprintf( File, "Ly %8X\n", g_TabAllCopperLayerMask[NbLayers - 1] | ALL_NO_CU_LAYERS ); // For compatibility with old version of pcbnew
|
fprintf( File, "Ly %8X\n", g_TabAllCopperLayerMask[NbLayers - 1] | ALL_NO_CU_LAYERS ); // For compatibility with old version of pcbnew
|
||||||
fprintf( File, "EnabledLayers %08X\n", GetBoard()->m_BoardSettings->m_EnabledLayers );
|
fprintf( File, "EnabledLayers %08X\n", GetBoard()->GetEnabledLayers() );
|
||||||
fprintf( File, "VisibleLayers %08X\n", GetBoard()->m_BoardSettings->m_VisibleLayers );
|
fprintf( File, "VisibleLayers %08X\n", GetBoard()->GetVisibleLayers() );
|
||||||
fprintf( File, "VisibleElements %08X\n", GetBoard()->m_BoardSettings->m_VisibleElements );
|
fprintf( File, "VisibleElements %08X\n", GetBoard()->GetVisibleElements() );
|
||||||
fprintf( File, "Links %d\n", GetBoard()->GetRatsnestsCount() );
|
fprintf( File, "Links %d\n", GetBoard()->GetRatsnestsCount() );
|
||||||
fprintf( File, "NoConn %d\n", GetBoard()->m_NbNoconnect );
|
fprintf( File, "NoConn %d\n", GetBoard()->m_NbNoconnect );
|
||||||
|
|
||||||
|
|
|
@ -213,10 +213,18 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
|
||||||
item->SetBitmap( hammer_xpm );
|
item->SetBitmap( hammer_xpm );
|
||||||
designRulesMenu->Append( item );
|
designRulesMenu->Append( item );
|
||||||
|
|
||||||
|
/*
|
||||||
item = new wxMenuItem( designRulesMenu, ID_PCB_COPPER_LAYERS_SETUP, _( "Copper &Layers" ),
|
item = new wxMenuItem( designRulesMenu, ID_PCB_COPPER_LAYERS_SETUP, _( "Copper &Layers" ),
|
||||||
_( "Select copper layers count and layers names" ) );
|
_( "Select copper layers count and layers names" ) );
|
||||||
item->SetBitmap( copper_layers_setup_xpm );
|
item->SetBitmap( copper_layers_setup_xpm );
|
||||||
designRulesMenu->Append( item );
|
designRulesMenu->Append( item );
|
||||||
|
*/
|
||||||
|
|
||||||
|
item = new wxMenuItem( configmenu, ID_PCB_LAYERS_SETUP, _( "&Layers Setup" ),
|
||||||
|
_( "Enable and set properties of layers" ) );
|
||||||
|
item->SetBitmap( copper_layers_setup_xpm );
|
||||||
|
designRulesMenu->Append( item );
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Ajustage de dimensions: //
|
// Ajustage de dimensions: //
|
||||||
|
@ -274,10 +282,10 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
|
||||||
postprocess_menu->Append( item );
|
postprocess_menu->Append( item );
|
||||||
|
|
||||||
item = new wxMenuItem( postprocess_menu, ID_PCB_GEN_BOM_FILE_FROM_BOARD,
|
item = new wxMenuItem( postprocess_menu, ID_PCB_GEN_BOM_FILE_FROM_BOARD,
|
||||||
_( "Create &BOM File" ),
|
_( "Create &BOM File" ),
|
||||||
_( "Recreate .csv file for CvPcb" ) );
|
_( "Recreate .csv file for CvPcb" ) );
|
||||||
item->SetBitmap( tools_xpm );
|
item->SetBitmap( tools_xpm );
|
||||||
postprocess_menu->Append( item );
|
postprocess_menu->Append( item );
|
||||||
|
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
// Menu d'outils divers //
|
// Menu d'outils divers //
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/***********************************/
|
/***********************************/
|
||||||
/** pcbcfg() : configuration **/
|
/** pcbcfg() : configuration **/
|
||||||
/***********************************/
|
/***********************************/
|
||||||
|
|
||||||
/* lit ou met a jour la configuration de PCBNEW */
|
/* lit ou met a jour la configuration de PCBNEW */
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
#include "pcbnew_id.h"
|
#include "pcbnew_id.h"
|
||||||
#include "hotkeys.h"
|
#include "hotkeys.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
#include "dialog_copper_layers_setup.h"
|
//#include "dialog_copper_layers_setup.h"
|
||||||
|
|
||||||
/* Routines Locales */
|
/* Routines Locales */
|
||||||
|
|
||||||
|
@ -49,12 +49,18 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
|
||||||
DisplayColorSetupFrame( this, pos );
|
DisplayColorSetupFrame( this, pos );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/*
|
||||||
case ID_PCB_COPPER_LAYERS_SETUP:
|
case ID_PCB_COPPER_LAYERS_SETUP:
|
||||||
{
|
{
|
||||||
DIALOG_COPPER_LAYERS_SETUP dialog( this );
|
DIALOG_COPPER_LAYERS_SETUP dialog( this );
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
|
|
||||||
|
case ID_PCB_LAYERS_SETUP:
|
||||||
|
DisplayDialogLayerSetup( this );
|
||||||
|
break;
|
||||||
|
|
||||||
case ID_CONFIG_REQ: // Creation de la fenetre de configuration
|
case ID_CONFIG_REQ: // Creation de la fenetre de configuration
|
||||||
InstallConfigFrame( pos );
|
InstallConfigFrame( pos );
|
||||||
|
|
|
@ -84,7 +84,8 @@ EVT_MENU_RANGE( ID_CONFIG_AND_PREFERENCES_START,
|
||||||
|
|
||||||
EVT_MENU( ID_COLORS_SETUP, WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_COLORS_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_OPTIONS_SETUP, WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_OPTIONS_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_PCB_COPPER_LAYERS_SETUP, WinEDA_PcbFrame::Process_Config )
|
//EVT_MENU( ID_PCB_COPPER_LAYERS_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||||
|
EVT_MENU( ID_PCB_LAYERS_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_PCB_TRACK_SIZE_SETUP, WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_PCB_TRACK_SIZE_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_PCB_PAD_SETUP, WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_PCB_PAD_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||||
|
|
|
@ -23,7 +23,8 @@ enum pcbnew_ids
|
||||||
ID_PCB_MIRE_BUTT,
|
ID_PCB_MIRE_BUTT,
|
||||||
ID_PCB_SHOW_1_RATSNEST_BUTT,
|
ID_PCB_SHOW_1_RATSNEST_BUTT,
|
||||||
ID_PCB_PLACE_OFFSET_COORD_BUTT,
|
ID_PCB_PLACE_OFFSET_COORD_BUTT,
|
||||||
ID_PCB_COPPER_LAYERS_SETUP,
|
// ID_PCB_COPPER_LAYERS_SETUP,
|
||||||
|
ID_PCB_LAYERS_SETUP,
|
||||||
ID_PCB_ADD_LINE_BUTT,
|
ID_PCB_ADD_LINE_BUTT,
|
||||||
ID_PCB_ADD_TEXT_BUTT,
|
ID_PCB_ADD_TEXT_BUTT,
|
||||||
|
|
||||||
|
|
|
@ -385,4 +385,10 @@ void DisplayColorSetupFrame( WinEDA_PcbFrame* parent,
|
||||||
const wxPoint& framepos );
|
const wxPoint& framepos );
|
||||||
|
|
||||||
|
|
||||||
|
/***************************/
|
||||||
|
/* DIALOG_LAYERS_SETUP.CPP */
|
||||||
|
/***************************/
|
||||||
|
|
||||||
|
void DisplayDialogLayerSetup( WinEDA_PcbFrame* parent );
|
||||||
|
|
||||||
#endif /* #define PROTO_H */
|
#endif /* #define PROTO_H */
|
||||||
|
|
|
@ -582,7 +582,7 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
|
||||||
wxSize( LISTBOX_WIDTH + 20, -1 ),
|
wxSize( LISTBOX_WIDTH + 20, -1 ),
|
||||||
wxTE_READONLY );
|
wxTE_READONLY );
|
||||||
m_ClearanceBox->SetToolTip(_("Current NetClass clearance value") );
|
m_ClearanceBox->SetToolTip(_("Current NetClass clearance value") );
|
||||||
m_AuxiliaryToolBar->AddControl( m_ClearanceBox );
|
m_AuxiliaryToolBar->AddControl( m_ClearanceBox );
|
||||||
m_AuxiliaryToolBar->AddSeparator();
|
m_AuxiliaryToolBar->AddSeparator();
|
||||||
|
|
||||||
// Creates box to display the current NetClass:
|
// Creates box to display the current NetClass:
|
||||||
|
@ -591,7 +591,7 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
|
||||||
wxSize( LISTBOX_WIDTH, -1 ),
|
wxSize( LISTBOX_WIDTH, -1 ),
|
||||||
wxTE_READONLY );
|
wxTE_READONLY );
|
||||||
m_NetClassSelectedBox->SetToolTip(_("Name of the current NetClass") );
|
m_NetClassSelectedBox->SetToolTip(_("Name of the current NetClass") );
|
||||||
m_AuxiliaryToolBar->AddControl( m_NetClassSelectedBox );
|
m_AuxiliaryToolBar->AddControl( m_NetClassSelectedBox );
|
||||||
m_AuxiliaryToolBar->AddSeparator();
|
m_AuxiliaryToolBar->AddSeparator();
|
||||||
|
|
||||||
// Creates box to display and choose strategy to handle tracks an
|
// Creates box to display and choose strategy to handle tracks an
|
||||||
|
@ -729,11 +729,12 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent )
|
||||||
parent->AddControl( m_SelLayerBox );
|
parent->AddControl( m_SelLayerBox );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
int layer_mask = g_TabAllCopperLayerMask[g_DesignSettings.m_CopperLayerCount - 1];
|
int layer_mask = g_TabAllCopperLayerMask[g_DesignSettings.m_CopperLayerCount - 1];
|
||||||
|
|
||||||
layer_mask |= ALL_NO_CU_LAYERS;
|
layer_mask |= ALL_NO_CU_LAYERS;
|
||||||
|
*/
|
||||||
|
int layer_mask = g_DesignSettings.GetEnabledLayers();
|
||||||
unsigned length = 0;
|
unsigned length = 0;
|
||||||
|
|
||||||
m_SelLayerBox->Clear();
|
m_SelLayerBox->Clear();
|
||||||
|
|
Loading…
Reference in New Issue