Commit 72b90c6a authored by dickelbeck's avatar dickelbeck

see change_log.txt

parent fcc86fb0
......@@ -5,6 +5,26 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2008-Mar-1 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
Changed ioascii.cpp to save and load board specific layer names, for DEBUG
build only. I want to add class LAYER, see below. Added
BOARD::SetLayerName(), BOARD::SetLayerType(), and BOARD::GetLayerType().
Will add a UI for editing those soon as soon class LAYER is stable. The
BOARD::SetLayerXXXX( int layerNdx, VALUE ) functions would simply route to
LAYER::SetXXXX( VALUE ). Then layer specific global variables would migrate
to the BOARD::LAYER[]s.
Jean-Pierre please have a look at pcbstruct.h's class LAYER which is just a
prototype for now. EDA_BoardDesignSettings::m_LayerColor would go away,
and then I would add ptr_vector<LAYER> to EDA_BoardDesignSettings or BOARD.
Whether EDA_BoardDesignSettings or BOARD I don't have a strong preference.
I understand this is a bunch of work, and there are tricks needed to handle
adding and deleting the number of layers....
2008-Feb-29 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
......
......@@ -148,6 +148,38 @@ struct CHEVELU;
/* Class to handle a board */
#include "class_board.h"
/**
* Class LAYER
* holds information pertinent to a layer of a BOARD.
*/
class LAYER
{
wxString m_Name;
LAYER_T m_Type;
int m_Color;
bool m_Visible; // ? use flags in m_Color instead ?
public:
bool SetName( const wxString& aLayerName );
const wxString& GetName();
bool SetType( LAYER_T aLayerType );
LAYER_T GetType();
int GetColor() { return m_Color; }
void SetColor( int aColor ) { m_Color = aColor; }
bool IsVisible();
void SetVisible( bool isVisible );
};
// Class for handle current printed board design settings
#define HISTORY_NUMBER 8
class EDA_BoardDesignSettings
......@@ -266,7 +298,7 @@ public:
#include "class_zone.h"
class DISPLAY_OPTIONS
class DISPLAY_OPTIONS
{
public:
bool DisplayPadFill;
......
......@@ -84,6 +84,27 @@ wxString BOARD::GetLayerName( int aLayerIndex ) const
}
bool BOARD::SetLayerName( int aLayerIndex, const wxString& aLayerName )
{
// a dummy temporarily.
D(printf("SetLayerName( %d, %s )\n", aLayerIndex, CONV_TO_UTF8(aLayerName) );)
return true;
}
LAYER_T BOARD::GetLayerType( int aLayerIndex ) const
{
return LT_SIGNAL;
}
bool BOARD::SetLayerType( int aLayerIndex, LAYER_T aLayerType )
{
// a dummy temporarily.
return true;
}
int BOARD::GetCopperLayerCount() const
{
return m_BoardSettings->m_CopperLayerCount;
......@@ -624,7 +645,8 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData,
}
/* now using PcbGeneralLocateAndDisplay()
/* now using PcbGeneralLocateAndDisplay(), but this remains a useful example
of how the INSPECTOR can be used in a lightweight way.
// see pcbstruct.h
BOARD_ITEM* BOARD::FindPadOrModule( const wxPoint& refPos, int layer )
{
......@@ -993,13 +1015,13 @@ void BOARD::Show( int nestLevel, std::ostream& os )
for( ; p; p = p->Next() )
p->Show( nestLevel+2, os );
NestedSpace( nestLevel+1, os ) << "</zones>\n";
/*
/*
NestedSpace( nestLevel+1, os ) << "<zone_container>\n";
for( ZONE_CONTAINERS::iterator i=m_ZoneDescriptorList.begin(); i!=m_ZoneDescriptorList.end(); ++i )
(*i)->Show( nestLevel+2, os );
NestedSpace( nestLevel+1, os ) << "</zone_container>\n";
*/
*/
p = (BOARD_ITEM*) m_Son;
for( ; p; p = p->Next() )
{
......
......@@ -8,6 +8,19 @@
class ZONE_CONTAINER;
class EDA_BoardDesignSettings;
/**
* Enum LAYER_T
* gives the allowed types of layers, same as Specctra DSN spec.
*/
enum LAYER_T
{
LT_SIGNAL,
LT_POWER,
LT_MIXED,
};
/***********************************************/
/* class BOARD : handle datas to build a board */
/***********************************************/
......@@ -134,14 +147,45 @@ public:
/**
* Function GetLayerName
* returns the name of the requested layer. Hopefully layer names will
* be stored in the BOARD. This function anticipates that.
* returns the name of the copper layer given by aLayerIndex.
*
* @param aLayerIndex A layer index, like COPPER_LAYER_N, etc.
* @return wxString - the layer name.
*/
wxString GetLayerName( int aLayerIndex ) const;
/**
* Function SetLayerName
* changes the name of the layer given by aLayerIndex.
*
* @param aLayerIndex A layer index, like COPPER_LAYER_N, etc.
* @param aLayerName The new layer name
* @return bool - true if aLayerName was legal and unique amoung other
* layer names at other layer indices and aLayerIndex was within range, else false.
*/
bool SetLayerName( int aLayerIndex, const wxString& aLayerName );
/**
* Function GetLayerType
* returns the type of the copper layer given by aLayerIndex.
*
* @param aLayerIndex A layer index, like COPPER_LAYER_N, etc.
* @return LAYER_T - the layer type, or LAYER_T(-1) if the
* index was out of range.
*/
LAYER_T GetLayerType( int aLayerIndex ) const;
/**
* Function SetLayerName
* changes the name of the layer given by aLayerIndex.
*
* @param aLayerIndex A layer index, like COPPER_LAYER_N, etc.
* @param aLayerType The new layer type.
* @return bool - true if aLayerType was legal and aLayerIndex was within range, else false.
*/
bool SetLayerType( int aLayerIndex, LAYER_T aLayerType );
/* Routines de calcul des nombres de segments pistes et zones */
int GetNumSegmTrack();
int GetNumSegmZone();
......
This diff is collapsed.
......@@ -640,6 +640,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule )
}
}
#if 1 // enable image (outline) scopes.
static const KICAD_T scanEDGEs[] = { TYPEEDGEMODULE, EOT };
// get all the MODULE's EDGE_MODULEs and convert those to DSN outlines.
......@@ -707,6 +708,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule )
continue;
}
}
#endif
return image;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment