Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
72b90c6a
Commit
72b90c6a
authored
Mar 01, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
see change_log.txt
parent
fcc86fb0
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
222 additions
and
70 deletions
+222
-70
change_log.txt
change_log.txt
+20
-0
pcbstruct.h
include/pcbstruct.h
+33
-1
class_board.cpp
pcbnew/class_board.cpp
+26
-4
class_board.h
pcbnew/class_board.h
+46
-2
ioascii.cpp
pcbnew/ioascii.cpp
+95
-63
specctra_export.cpp
pcbnew/specctra_export.cpp
+2
-0
No files found.
change_log.txt
View file @
72b90c6a
...
@@ -5,6 +5,26 @@ Started 2007-June-11
...
@@ -5,6 +5,26 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
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>
2008-Feb-29 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
================================================================================
+pcbnew
+pcbnew
...
...
include/pcbstruct.h
View file @
72b90c6a
...
@@ -148,6 +148,38 @@ struct CHEVELU;
...
@@ -148,6 +148,38 @@ struct CHEVELU;
/* Class to handle a board */
/* Class to handle a board */
#include "class_board.h"
#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
// Class for handle current printed board design settings
#define HISTORY_NUMBER 8
#define HISTORY_NUMBER 8
class
EDA_BoardDesignSettings
class
EDA_BoardDesignSettings
...
@@ -266,7 +298,7 @@ public:
...
@@ -266,7 +298,7 @@ public:
#include "class_zone.h"
#include "class_zone.h"
class
DISPLAY_OPTIONS
class
DISPLAY_OPTIONS
{
{
public
:
public
:
bool
DisplayPadFill
;
bool
DisplayPadFill
;
...
...
pcbnew/class_board.cpp
View file @
72b90c6a
...
@@ -84,6 +84,27 @@ wxString BOARD::GetLayerName( int aLayerIndex ) const
...
@@ -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
int
BOARD
::
GetCopperLayerCount
()
const
{
{
return
m_BoardSettings
->
m_CopperLayerCount
;
return
m_BoardSettings
->
m_CopperLayerCount
;
...
@@ -624,7 +645,8 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData,
...
@@ -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
// see pcbstruct.h
BOARD_ITEM* BOARD::FindPadOrModule( const wxPoint& refPos, int layer )
BOARD_ITEM* BOARD::FindPadOrModule( const wxPoint& refPos, int layer )
{
{
...
@@ -993,13 +1015,13 @@ void BOARD::Show( int nestLevel, std::ostream& os )
...
@@ -993,13 +1015,13 @@ void BOARD::Show( int nestLevel, std::ostream& os )
for
(
;
p
;
p
=
p
->
Next
()
)
for
(
;
p
;
p
=
p
->
Next
()
)
p
->
Show
(
nestLevel
+
2
,
os
);
p
->
Show
(
nestLevel
+
2
,
os
);
NestedSpace
(
nestLevel
+
1
,
os
)
<<
"</zones>
\n
"
;
NestedSpace
(
nestLevel
+
1
,
os
)
<<
"</zones>
\n
"
;
/*
/*
NestedSpace( nestLevel+1, os ) << "<zone_container>\n";
NestedSpace( nestLevel+1, os ) << "<zone_container>\n";
for( ZONE_CONTAINERS::iterator i=m_ZoneDescriptorList.begin(); i!=m_ZoneDescriptorList.end(); ++i )
for( ZONE_CONTAINERS::iterator i=m_ZoneDescriptorList.begin(); i!=m_ZoneDescriptorList.end(); ++i )
(*i)->Show( nestLevel+2, os );
(*i)->Show( nestLevel+2, os );
NestedSpace( nestLevel+1, os ) << "</zone_container>\n";
NestedSpace( nestLevel+1, os ) << "</zone_container>\n";
*/
*/
p
=
(
BOARD_ITEM
*
)
m_Son
;
p
=
(
BOARD_ITEM
*
)
m_Son
;
for
(
;
p
;
p
=
p
->
Next
()
)
for
(
;
p
;
p
=
p
->
Next
()
)
{
{
...
...
pcbnew/class_board.h
View file @
72b90c6a
...
@@ -8,6 +8,19 @@
...
@@ -8,6 +8,19 @@
class
ZONE_CONTAINER
;
class
ZONE_CONTAINER
;
class
EDA_BoardDesignSettings
;
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 */
/* class BOARD : handle datas to build a board */
/***********************************************/
/***********************************************/
...
@@ -134,14 +147,45 @@ public:
...
@@ -134,14 +147,45 @@ public:
/**
/**
* Function GetLayerName
* Function GetLayerName
* returns the name of the requested layer. Hopefully layer names will
* returns the name of the copper layer given by aLayerIndex.
* be stored in the BOARD. This function anticipates that.
*
*
* @param aLayerIndex A layer index, like COPPER_LAYER_N, etc.
* @param aLayerIndex A layer index, like COPPER_LAYER_N, etc.
* @return wxString - the layer name.
* @return wxString - the layer name.
*/
*/
wxString
GetLayerName
(
int
aLayerIndex
)
const
;
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 */
/* Routines de calcul des nombres de segments pistes et zones */
int
GetNumSegmTrack
();
int
GetNumSegmTrack
();
int
GetNumSegmZone
();
int
GetNumSegmZone
();
...
...
pcbnew/ioascii.cpp
View file @
72b90c6a
This diff is collapsed.
Click to expand it.
pcbnew/specctra_export.cpp
View file @
72b90c6a
...
@@ -640,6 +640,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule )
...
@@ -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
};
static
const
KICAD_T
scanEDGEs
[]
=
{
TYPEEDGEMODULE
,
EOT
};
// get all the MODULE's EDGE_MODULEs and convert those to DSN outlines.
// 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 )
...
@@ -707,6 +708,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule )
continue
;
continue
;
}
}
}
}
#endif
return
image
;
return
image
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment