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
8080a2c9
Commit
8080a2c9
authored
Jul 31, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleaning and a bug in eeschema (print all not working) solved
parent
5a27f272
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
823 additions
and
512 deletions
+823
-512
change_log.txt
change_log.txt
+9
-0
worksheet.cpp
common/worksheet.cpp
+61
-6
rdpcad.cpp
cvpcb/rdpcad.cpp
+277
-238
readschematicnetlist.cpp
cvpcb/readschematicnetlist.cpp
+2
-2
build_BOM.cpp
eeschema/build_BOM.cpp
+16
-2
eeredraw.cpp
eeschema/eeredraw.cpp
+9
-5
hierarch.cpp
eeschema/hierarch.cpp
+216
-194
netform.cpp
eeschema/netform.cpp
+8
-5
build_version.h
include/build_version.h
+1
-1
pad_shapes.h
include/pad_shapes.h
+1
-2
wxstruct.h
include/wxstruct.h
+8
-0
class_pad.cpp
pcbnew/class_pad.cpp
+7
-11
dialog_pad_edit.cpp
pcbnew/dialog_pad_edit.cpp
+9
-11
dialog_pad_edit.h
pcbnew/dialog_pad_edit.h
+6
-7
dialog_pad_edit.pjd
pcbnew/dialog_pad_edit.pjd
+161
-3
editpads.cpp
pcbnew/editpads.cpp
+20
-19
files.cpp
pcbnew/files.cpp
+1
-0
librairi.cpp
pcbnew/librairi.cpp
+2
-0
pcbnew.h
pcbnew/pcbnew.h
+2
-4
plotgerb.cpp
pcbnew/plotgerb.cpp
+5
-0
plothpgl.cpp
pcbnew/plothpgl.cpp
+1
-0
router.cpp
pcbnew/router.cpp
+1
-2
No files found.
change_log.txt
View file @
8080a2c9
...
@@ -5,6 +5,15 @@ Started 2007-June-11
...
@@ -5,6 +5,15 @@ 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-Juil-31 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+eeschema:
Added component sheet X,Y location in BOM.
Netlist generation: now spaces in names are replaced by '_' for pcbnew (which does not accept spaces)
Bug: print all pages did not work.
Please note in complex hierarchy, the current "Print All" function needs to be enhanced,
because it does not draw all sheets but only all different sheets
2008-Jule-08 UPDATE Andrey Fedorushkov <andrf@mail.ru>
2008-Jule-08 UPDATE Andrey Fedorushkov <andrf@mail.ru>
================================================================================
================================================================================
+pcbnew:
+pcbnew:
...
...
common/worksheet.cpp
View file @
8080a2c9
...
@@ -30,18 +30,18 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
...
@@ -30,18 +30,18 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
wxString
Line
;
wxString
Line
;
Ki_WorkSheetData
*
WsItem
;
Ki_WorkSheetData
*
WsItem
;
int
scale
=
m_InternalUnits
/
1000
;
int
scale
=
m_InternalUnits
/
1000
;
wxSize
size
(
SIZETEXT
*
scale
,
SIZETEXT
*
scale
);
wxSize
size
(
SIZETEXT
*
scale
,
SIZETEXT
*
scale
);
wxSize
size_ref
(
SIZETEXT_REF
*
scale
,
SIZETEXT_REF
*
scale
);
wxSize
size_ref
(
SIZETEXT_REF
*
scale
,
SIZETEXT_REF
*
scale
);
wxString
msg
;
wxString
msg
;
int
UpperLimit
=
VARIABLE_BLOCK_START_POSITION
;
int
UpperLimit
=
VARIABLE_BLOCK_START_POSITION
;
int
width
=
line_width
;
int
width
=
line_width
;
Color
=
RED
;
Color
=
RED
;
if
(
Sheet
==
NULL
)
if
(
Sheet
==
NULL
)
{
{
DisplayError
(
this
,
DisplayError
(
this
,
wxT
(
"WinEDA_DrawFrame::TraceWorkSheet() error:
m_CurrentSheet NULL
"
)
);
wxT
(
"WinEDA_DrawFrame::TraceWorkSheet() error:
NULL Sheet
"
)
);
return
;
return
;
}
}
...
@@ -315,6 +315,61 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
...
@@ -315,6 +315,61 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
}
}
/************************************************************************************************/
wxString
WinEDA_DrawFrame
::
GetXYSheetReferences
(
BASE_SCREEN
*
aScreen
,
const
wxPoint
&
aPosition
)
/************************************************************************************************/
/** Function GetXYSheetReferences
* Return the X,Y sheet references where the point position is located
* @param aScreen = screen to use
* @param aPosition = position to identify by YX ref
* @return a wxString containing the message locator like A3 or B6 (or ?? if out of page limits)
*/
{
Ki_PageDescr
*
Sheet
=
aScreen
->
m_CurrentSheetDesc
;
int
ii
,
xg
,
yg
,
ipas
,
gxpas
,
gypas
;
int
refx
,
refy
;
wxString
msg
;
if
(
Sheet
==
NULL
)
{
DisplayError
(
this
,
wxT
(
"WinEDA_DrawFrame::GetXYSheetReferences() error: NULL Sheet"
)
);
return
msg
;
}
refx
=
Sheet
->
m_LeftMargin
;
refy
=
Sheet
->
m_TopMargin
;
/* Upper left corner */
xg
=
Sheet
->
m_Size
.
x
-
Sheet
->
m_RightMargin
;
yg
=
Sheet
->
m_Size
.
y
-
Sheet
->
m_BottomMargin
;
/* lower right corner */
/* Get the Y axis identifier (A symbol A ... Z) */
if
(
aPosition
.
y
<
refy
||
aPosition
.
y
>
yg
)
// Ouside of Y limits
msg
<<
wxT
(
"?"
);
else
{
ipas
=
(
yg
-
refy
)
/
PAS_REF
;
// ipas = Y count sections
gypas
=
(
yg
-
refy
)
/
ipas
;
// gypas = Y section size
ii
=
(
aPosition
.
y
-
refy
)
/
gypas
;
msg
.
Printf
(
wxT
(
"%c"
),
'A'
+
ii
);
}
/* Get the X axis identifier (A number 1 ... n) */
if
(
aPosition
.
x
<
refx
||
aPosition
.
x
>
xg
)
// Ouside of X limits
msg
<<
wxT
(
"?"
);
else
{
ipas
=
(
xg
-
refx
)
/
PAS_REF
;
// ipas = X count sections
gxpas
=
(
xg
-
refx
)
/
ipas
;
// gxpas = X section size
ii
=
(
aPosition
.
x
-
refx
)
/
gxpas
;
msg
<<
ii
+
1
;
}
return
msg
;
}
/*********************************************************************/
/*********************************************************************/
wxString
WinEDA_DrawFrame
::
GetScreenDesc
()
wxString
WinEDA_DrawFrame
::
GetScreenDesc
()
/*********************************************************************/
/*********************************************************************/
...
...
cvpcb/rdpcad.cpp
View file @
8080a2c9
This diff is collapsed.
Click to expand it.
cvpcb/readschematicnetlist.cpp
View file @
8080a2c9
...
@@ -57,7 +57,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
...
@@ -57,7 +57,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
/* Read the file header (must be "( { OrCAD PCB" or "({ OrCAD PCB" )
/* Read the file header (must be "( { OrCAD PCB" or "({ OrCAD PCB" )
* or "# EESchema Netliste"
* or "# EESchema Netliste"
*/
*/
fgets
(
Line
,
255
,
source
);
fgets
(
Line
,
BUFFER_CHAR_SIZE
,
source
);
/* test for netlist type PCB2 */
/* test for netlist type PCB2 */
i
=
strnicmp
(
Line
,
"( {"
,
3
);
i
=
strnicmp
(
Line
,
"( {"
,
3
);
if
(
i
!=
0
)
if
(
i
!=
0
)
...
@@ -310,7 +310,7 @@ int ReadPinConnection( STORECMP* Cmp )
...
@@ -310,7 +310,7 @@ int ReadPinConnection( STORECMP* Cmp )
memset
(
net
,
0
,
sizeof
(
net
)
);
memset
(
net
,
0
,
sizeof
(
net
)
);
memset
(
numpin
,
0
,
sizeof
(
numpin
)
);
memset
(
numpin
,
0
,
sizeof
(
numpin
)
);
/* Read pi name , 4 letters */
/* Read pi
n
name , 4 letters */
for
(
jj
=
0
;
jj
<
4
;
jj
++
,
i
++
)
for
(
jj
=
0
;
jj
<
4
;
jj
++
,
i
++
)
{
{
if
(
Line
[
i
]
==
' '
)
if
(
Line
[
i
]
==
' '
)
...
...
eeschema/build_BOM.cpp
View file @
8080a2c9
...
@@ -312,8 +312,8 @@ int BuildComponentsListFromSchematic( ListComponent* aList )
...
@@ -312,8 +312,8 @@ int BuildComponentsListFromSchematic( ListComponent* aList )
CONV_TO_UTF8
(
DrawLibItem
->
GetRef
(
sheet
)
),
CONV_TO_UTF8
(
DrawLibItem
->
GetRef
(
sheet
)
),
sizeof
(
aList
->
m_Ref
)
);
sizeof
(
aList
->
m_Ref
)
);
//
@todo the above line is probably a bug, because it will not
always nul terminate m_Ref.
//
Ensure
always nul terminate m_Ref.
aList
->
m_Ref
[
sizeof
(
aList
->
m_Ref
)
-
1
]
=
0
;
aList
++
;
aList
++
;
}
}
}
}
...
@@ -670,7 +670,11 @@ int WinEDA_Build_BOM_Frame::PrintComponentsListByRef( FILE* f,
...
@@ -670,7 +670,11 @@ int WinEDA_Build_BOM_Frame::PrintComponentsListByRef( FILE* f,
fprintf
(
f
,
"ref%cvalue"
,
s_ExportSeparatorSymbol
);
fprintf
(
f
,
"ref%cvalue"
,
s_ExportSeparatorSymbol
);
if
(
aIncludeSubComponents
)
if
(
aIncludeSubComponents
)
{
fprintf
(
f
,
"%csheet path"
,
s_ExportSeparatorSymbol
);
fprintf
(
f
,
"%csheet path"
,
s_ExportSeparatorSymbol
);
fprintf
(
f
,
"%clocation"
,
s_ExportSeparatorSymbol
);
}
if
(
m_AddFootprintField
->
IsChecked
()
)
if
(
m_AddFootprintField
->
IsChecked
()
)
fprintf
(
f
,
"%cfootprint"
,
s_ExportSeparatorSymbol
);
fprintf
(
f
,
"%cfootprint"
,
s_ExportSeparatorSymbol
);
...
@@ -737,9 +741,17 @@ int WinEDA_Build_BOM_Frame::PrintComponentsListByRef( FILE* f,
...
@@ -737,9 +741,17 @@ int WinEDA_Build_BOM_Frame::PrintComponentsListByRef( FILE* f,
{
{
msg
=
aList
[
ii
].
m_SheetList
.
PathHumanReadable
();
msg
=
aList
[
ii
].
m_SheetList
.
PathHumanReadable
();
if
(
CompactForm
)
if
(
CompactForm
)
{
fprintf
(
f
,
"%c%s"
,
s_ExportSeparatorSymbol
,
CONV_TO_UTF8
(
msg
)
);
fprintf
(
f
,
"%c%s"
,
s_ExportSeparatorSymbol
,
CONV_TO_UTF8
(
msg
)
);
msg
=
m_Parent
->
GetXYSheetReferences
(
(
BASE_SCREEN
*
)
DrawLibItem
->
m_Parent
,
DrawLibItem
->
m_Pos
);
fprintf
(
f
,
"%c%s)"
,
s_ExportSeparatorSymbol
,
CONV_TO_UTF8
(
msg
)
);
}
else
else
{
fprintf
(
f
,
" (Sheet %s)"
,
CONV_TO_UTF8
(
msg
)
);
fprintf
(
f
,
" (Sheet %s)"
,
CONV_TO_UTF8
(
msg
)
);
msg
=
m_Parent
->
GetXYSheetReferences
(
(
BASE_SCREEN
*
)
DrawLibItem
->
m_Parent
,
DrawLibItem
->
m_Pos
);
fprintf
(
f
,
" (loc %s)"
,
CONV_TO_UTF8
(
msg
)
);
}
}
}
PrintFieldData
(
f
,
DrawLibItem
,
CompactForm
);
PrintFieldData
(
f
,
DrawLibItem
,
CompactForm
);
...
@@ -811,6 +823,8 @@ int WinEDA_Build_BOM_Frame::PrintComponentsListByVal( FILE* f,
...
@@ -811,6 +823,8 @@ int WinEDA_Build_BOM_Frame::PrintComponentsListByVal( FILE* f,
{
{
msg
=
aList
[
ii
].
m_SheetList
.
PathHumanReadable
();
msg
=
aList
[
ii
].
m_SheetList
.
PathHumanReadable
();
fprintf
(
f
,
" (Sheet %s)"
,
CONV_TO_UTF8
(
msg
)
);
fprintf
(
f
,
" (Sheet %s)"
,
CONV_TO_UTF8
(
msg
)
);
msg
=
m_Parent
->
GetXYSheetReferences
(
(
BASE_SCREEN
*
)
DrawLibItem
->
m_Parent
,
DrawLibItem
->
m_Pos
);
fprintf
(
f
,
" (loc %s)"
,
CONV_TO_UTF8
(
msg
)
);
}
}
PrintFieldData
(
f
,
DrawLibItem
);
PrintFieldData
(
f
,
DrawLibItem
);
...
...
eeschema/eeredraw.cpp
View file @
8080a2c9
...
@@ -137,16 +137,20 @@ void WinEDA_SchematicFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
...
@@ -137,16 +137,20 @@ void WinEDA_SchematicFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
/*******************************************************************************/
/*******************************************************************************/
void
WinEDA_DrawPanel
::
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
PrintMask
)
void
WinEDA_DrawPanel
::
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
PrintMask
)
/*******************************************************************************/
/*******************************************************************************/
/** PrintPage
* used to print a page.
* Print the page pointed by ActiveScreen, set by the calling print function
* @param DC = wxDC given by the calling print function
* @param Print_Sheet_Ref = true to print page references
* @param PrintMask = not used here
*/
{
{
BASE_SCREEN
*
screen
;
wxBeginBusyCursor
();
wxBeginBusyCursor
();
ActiveScreen
=
screen
=
m_Parent
->
GetBaseScreen
();
RedrawStructList
(
this
,
DC
,
ActiveScreen
->
EEDrawList
,
GR_COPY
);
RedrawStructList
(
this
,
DC
,
screen
->
EEDrawList
,
GR_COPY
);
if
(
Print_Sheet_Ref
)
if
(
Print_Sheet_Ref
)
m_Parent
->
TraceWorkSheet
(
DC
,
s
creen
,
g_DrawMinimunLineWidth
);
m_Parent
->
TraceWorkSheet
(
DC
,
ActiveS
creen
,
g_DrawMinimunLineWidth
);
wxEndBusyCursor
();
wxEndBusyCursor
();
}
}
...
...
eeschema/hierarch.cpp
View file @
8080a2c9
This diff is collapsed.
Click to expand it.
eeschema/netform.cpp
View file @
8080a2c9
...
@@ -236,11 +236,13 @@ static wxString ReturnPinNetName( ObjetNetListStruct* Pin,
...
@@ -236,11 +236,13 @@ static wxString ReturnPinNetName( ObjetNetListStruct* Pin,
{
{
if
(
g_TabObjNet
[
jj
].
m_Type
!=
NET_PINLABEL
)
if
(
g_TabObjNet
[
jj
].
m_Type
!=
NET_PINLABEL
)
{
{
NetName
=
g_TabObjNet
[
jj
].
m_SheetList
.
PathHumanReadable
()
wxString
lnet
=
NetName
;
+
NetName
;
NetName
=
g_TabObjNet
[
jj
].
m_SheetList
.
PathHumanReadable
();
// If sheet path is too long, use the time stamp name insteed
if
(
NetName
.
Length
()
>
32
)
NetName
=
g_TabObjNet
[
jj
].
m_SheetList
.
Path
();
NetName
+=
lnet
;
}
}
//NetName << wxT("_") << g_TabObjNet[jj].m_SheetList.PathHumanReadable();
}
}
else
else
{
{
...
@@ -619,7 +621,8 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with
...
@@ -619,7 +621,8 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with
continue
;
continue
;
wxString
netname
=
ReturnPinNetName
(
Pin
,
wxT
(
"N-%.6d"
)
);
wxString
netname
=
ReturnPinNetName
(
Pin
,
wxT
(
"N-%.6d"
)
);
if
(
netname
.
IsEmpty
()
)
if
(
netname
.
IsEmpty
()
)
netname
=
wxT
(
" ?"
);
netname
=
wxT
(
"?"
);
netname
.
Replace
(
wxT
(
" "
),
wxT
(
"_"
)
);
fprintf
(
f
,
" ( %4.4s %s )
\n
"
,
(
char
*
)
&
Pin
->
m_PinNum
,
fprintf
(
f
,
" ( %4.4s %s )
\n
"
,
(
char
*
)
&
Pin
->
m_PinNum
,
CONV_TO_UTF8
(
netname
)
);
CONV_TO_UTF8
(
netname
)
);
}
}
...
...
include/build_version.h
View file @
8080a2c9
...
@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion
...
@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion
# include "config.h"
# include "config.h"
(
wxT
(
KICAD_SVN_VERSION
))
(
wxT
(
KICAD_SVN_VERSION
))
# else
# else
(
wxT
(
"(200807
1
5"
))
(
wxT
(
"(200807
31.r117
5"
))
# endif
# endif
#endif
#endif
;
;
...
...
include/pad_shapes.h
View file @
8080a2c9
...
@@ -20,8 +20,7 @@
...
@@ -20,8 +20,7 @@
#define PAD_SMD 1 // Smd pad, appears on the layer paste (default)
#define PAD_SMD 1 // Smd pad, appears on the layer paste (default)
#define PAD_CONN 2 // Like smd, does not appear on the layer paste (default)
#define PAD_CONN 2 // Like smd, does not appear on the layer paste (default)
// reserved, but not yet really used:
// reserved, but not yet really used:
#define PAD_P_HOLE 3 // trou simple, utile sur pad stack
#define PAD_HOLE_NOT_PLATED 3 // like PAD_STANDARD, but not plated (no connection between copper layers)
#define PAD_MECA 4 // PAD "mecanique" (fixation, zone cuivre...)
#endif // PAD_SHAPES_H_
#endif // PAD_SHAPES_H_
...
...
include/wxstruct.h
View file @
8080a2c9
...
@@ -298,6 +298,14 @@ public:
...
@@ -298,6 +298,14 @@ public:
void
OnActivate
(
wxActivateEvent
&
event
);
void
OnActivate
(
wxActivateEvent
&
event
);
void
ReDrawPanel
();
void
ReDrawPanel
();
void
TraceWorkSheet
(
wxDC
*
DC
,
BASE_SCREEN
*
screen
,
int
line_width
);
void
TraceWorkSheet
(
wxDC
*
DC
,
BASE_SCREEN
*
screen
,
int
line_width
);
/** Function GetXYSheetReferences
* Return the X,Y sheet references where the point position is located
* @param aScreen = screen to use
* @param aPosition = position to identify by YX ref
* @return a wxString containing the message locator like A3 or B6 (or ?? if out of page limits)
*/
wxString
GetXYSheetReferences
(
BASE_SCREEN
*
aScreen
,
const
wxPoint
&
aPosition
);
void
DisplayToolMsg
(
const
wxString
msg
);
void
DisplayToolMsg
(
const
wxString
msg
);
void
Process_Zoom
(
wxCommandEvent
&
event
);
void
Process_Zoom
(
wxCommandEvent
&
event
);
void
Process_Grid
(
wxCommandEvent
&
event
);
void
Process_Grid
(
wxCommandEvent
&
event
);
...
...
pcbnew/class_pad.cpp
View file @
8080a2c9
...
@@ -94,7 +94,7 @@ EDA_Rect D_PAD::GetBoundingBox()
...
@@ -94,7 +94,7 @@ EDA_Rect D_PAD::GetBoundingBox()
EDA_Rect
area
;
EDA_Rect
area
;
area
.
SetOrigin
(
m_Pos
);
area
.
SetOrigin
(
m_Pos
);
area
.
Inflate
(
m_Rayon
,
m_Rayon
);
area
.
Inflate
(
m_Rayon
,
m_Rayon
);
return
area
;
return
area
;
}
}
...
@@ -256,7 +256,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
...
@@ -256,7 +256,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
int
zoom
;
int
zoom
;
int
fillpad
=
0
;
int
fillpad
=
0
;
wxPoint
shape_pos
;
wxPoint
shape_pos
;
if
(
m_Flags
&
DO_NOT_DRAW
)
if
(
m_Flags
&
DO_NOT_DRAW
)
return
;
return
;
...
@@ -747,9 +747,7 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
...
@@ -747,9 +747,7 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
if
(
strncmp
(
BufLine
,
"CONN"
,
4
)
==
0
)
if
(
strncmp
(
BufLine
,
"CONN"
,
4
)
==
0
)
m_Attribut
=
PAD_CONN
;
m_Attribut
=
PAD_CONN
;
if
(
strncmp
(
BufLine
,
"HOLE"
,
4
)
==
0
)
if
(
strncmp
(
BufLine
,
"HOLE"
,
4
)
==
0
)
m_Attribut
=
PAD_P_HOLE
;
m_Attribut
=
PAD_HOLE_NOT_PLATED
;
if
(
strncmp
(
BufLine
,
"MECA"
,
4
)
==
0
)
m_Attribut
=
PAD_MECA
;
break
;
break
;
case
'N'
:
/* Lecture du netname */
case
'N'
:
/* Lecture du netname */
...
@@ -777,7 +775,9 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
...
@@ -777,7 +775,9 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
}
}
/*************************************/
bool
D_PAD
::
Save
(
FILE
*
aFile
)
const
bool
D_PAD
::
Save
(
FILE
*
aFile
)
const
/*************************************/
{
{
int
cshape
;
int
cshape
;
const
char
*
texttype
;
const
char
*
texttype
;
...
@@ -833,12 +833,9 @@ bool D_PAD::Save( FILE* aFile ) const
...
@@ -833,12 +833,9 @@ bool D_PAD::Save( FILE* aFile ) const
case
PAD_CONN
:
case
PAD_CONN
:
texttype
=
"CONN"
;
break
;
texttype
=
"CONN"
;
break
;
case
PAD_
P_HOLE
:
case
PAD_
HOLE_NOT_PLATED
:
texttype
=
"HOLE"
;
break
;
texttype
=
"HOLE"
;
break
;
case
PAD_MECA
:
texttype
=
"MECA"
;
break
;
default
:
default
:
texttype
=
"STD"
;
texttype
=
"STD"
;
DisplayError
(
NULL
,
wxT
(
"Invalid Pad attribute"
)
);
DisplayError
(
NULL
,
wxT
(
"Invalid Pad attribute"
)
);
...
@@ -1144,8 +1141,7 @@ static const char* ShowPadAttr( int aPadAttr )
...
@@ -1144,8 +1141,7 @@ static const char* ShowPadAttr( int aPadAttr )
case
PAD_STANDARD
:
return
"STD"
;
case
PAD_STANDARD
:
return
"STD"
;
case
PAD_SMD
:
return
"SMD"
;
case
PAD_SMD
:
return
"SMD"
;
case
PAD_CONN
:
return
"CONN"
;
case
PAD_CONN
:
return
"CONN"
;
case
PAD_P_HOLE
:
return
"HOLE"
;
case
PAD_HOLE_NOT_PLATED
:
return
"HOLE"
;
case
PAD_MECA
:
return
"MECA"
;
default
:
return
"??unkown??"
;
default
:
return
"??unkown??"
;
}
}
}
}
...
...
pcbnew/dialog_pad_edit.cpp
View file @
8080a2c9
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_pad_edit.cpp
// Name: dialog_pad_edit.cpp
// Purpose:
// Purpose:
// Author: jean-pierre Charras
// Author: jean-pierre Charras
// Modified by:
// Modified by:
// Created: 28/02/2006 13:34:48
// Created: 28/02/2006 13:34:48
// RCS-ID:
// RCS-ID:
// Copyright: License GNU
// Copyright: License GNU
// Licence:
// Licence:
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 28/02/2006 13:34:48
// Generated by DialogBlocks (unregistered), 28/02/2006 13:34:48
...
@@ -141,10 +141,10 @@ bool WinEDA_PadPropertiesFrame::Create( wxWindow* parent, wxWindowID id, const w
...
@@ -141,10 +141,10 @@ bool WinEDA_PadPropertiesFrame::Create( wxWindow* parent, wxWindowID id, const w
*/
*/
void
WinEDA_PadPropertiesFrame
::
CreateControls
()
void
WinEDA_PadPropertiesFrame
::
CreateControls
()
{
{
SetFont
(
*
g_DialogFont
);
SetFont
(
*
g_DialogFont
);
////@begin WinEDA_PadPropertiesFrame content construction
////@begin WinEDA_PadPropertiesFrame content construction
// Generated by DialogBlocks,
27/08/2007 21:03:5
9 (unregistered)
// Generated by DialogBlocks,
30/07/2008 22:05:1
9 (unregistered)
WinEDA_PadPropertiesFrame
*
itemDialog1
=
this
;
WinEDA_PadPropertiesFrame
*
itemDialog1
=
this
;
...
@@ -205,8 +205,6 @@ void WinEDA_PadPropertiesFrame::CreateControls()
...
@@ -205,8 +205,6 @@ void WinEDA_PadPropertiesFrame::CreateControls()
m_PadTypeStrings
.
Add
(
_
(
"Standard"
));
m_PadTypeStrings
.
Add
(
_
(
"Standard"
));
m_PadTypeStrings
.
Add
(
_
(
"SMD"
));
m_PadTypeStrings
.
Add
(
_
(
"SMD"
));
m_PadTypeStrings
.
Add
(
_
(
"Conn"
));
m_PadTypeStrings
.
Add
(
_
(
"Conn"
));
m_PadTypeStrings
.
Add
(
_
(
"Hole"
));
m_PadTypeStrings
.
Add
(
_
(
"Mechanical"
));
m_PadType
=
new
wxRadioBox
(
itemDialog1
,
ID_LISTBOX_TYPE_PAD
,
_
(
"Pad Type:"
),
wxDefaultPosition
,
wxDefaultSize
,
m_PadTypeStrings
,
1
,
wxRA_SPECIFY_COLS
);
m_PadType
=
new
wxRadioBox
(
itemDialog1
,
ID_LISTBOX_TYPE_PAD
,
_
(
"Pad Type:"
),
wxDefaultPosition
,
wxDefaultSize
,
m_PadTypeStrings
,
1
,
wxRA_SPECIFY_COLS
);
m_PadType
->
SetSelection
(
0
);
m_PadType
->
SetSelection
(
0
);
m_PadOptSizer
->
Add
(
m_PadType
,
0
,
wxGROW
|
wxALL
,
5
);
m_PadOptSizer
->
Add
(
m_PadType
,
0
,
wxGROW
|
wxALL
,
5
);
...
@@ -234,7 +232,7 @@ void WinEDA_PadPropertiesFrame::CreateControls()
...
@@ -234,7 +232,7 @@ void WinEDA_PadPropertiesFrame::CreateControls()
m_PadLayerCmp
->
SetValue
(
false
);
m_PadLayerCmp
->
SetValue
(
false
);
itemStaticBoxSizer18
->
Add
(
m_PadLayerCmp
,
0
,
wxGROW
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
itemStaticBoxSizer18
->
Add
(
m_PadLayerCmp
,
0
,
wxGROW
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
itemStaticBoxSizer18
->
Add
(
5
,
5
,
0
,
wx
ALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
itemStaticBoxSizer18
->
Add
(
5
,
5
,
0
,
wx
GROW
|
wxALL
,
5
);
m_PadLayerAdhCmp
=
new
wxCheckBox
(
itemDialog1
,
ID_CHECKBOX2
,
_
(
"Adhesive Cmp"
),
wxDefaultPosition
,
wxDefaultSize
,
wxCHK_2STATE
);
m_PadLayerAdhCmp
=
new
wxCheckBox
(
itemDialog1
,
ID_CHECKBOX2
,
_
(
"Adhesive Cmp"
),
wxDefaultPosition
,
wxDefaultSize
,
wxCHK_2STATE
);
m_PadLayerAdhCmp
->
SetValue
(
false
);
m_PadLayerAdhCmp
->
SetValue
(
false
);
...
@@ -337,7 +335,7 @@ void WinEDA_PadPropertiesFrame::OnCancelClick( wxCommandEvent& event )
...
@@ -337,7 +335,7 @@ void WinEDA_PadPropertiesFrame::OnCancelClick( wxCommandEvent& event )
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PadPropertiesFrame.
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PadPropertiesFrame.
// Before editing this code, remove the block markers.
// Before editing this code, remove the block markers.
event
.
Skip
();
event
.
Skip
();
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PadPropertiesFrame.
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PadPropertiesFrame.
}
}
...
@@ -386,7 +384,7 @@ void WinEDA_PadPropertiesFrame::OnListboxShapePadSelected( wxCommandEvent& event
...
@@ -386,7 +384,7 @@ void WinEDA_PadPropertiesFrame::OnListboxShapePadSelected( wxCommandEvent& event
void
WinEDA_PadPropertiesFrame
::
OnListboxTypePadSelected
(
wxCommandEvent
&
event
)
void
WinEDA_PadPropertiesFrame
::
OnListboxTypePadSelected
(
wxCommandEvent
&
event
)
{
{
PadTypeSelected
Event
(
event
);
PadTypeSelected
(
);
}
}
...
...
pcbnew/dialog_pad_edit.h
View file @
8080a2c9
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_pad_edit.h
// Name: dialog_pad_edit.h
// Purpose:
// Purpose:
// Author: jean-pierre Charras
// Author: jean-pierre Charras
// Modified by:
// Modified by:
// Created: 28/02/2006 13:34:48
// Created: 28/02/2006 13:34:48
// RCS-ID:
// RCS-ID:
// Copyright: License GNU
// Copyright: License GNU
// Licence:
// Licence:
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 28/02/2006 13:34:48
// Generated by DialogBlocks (unregistered), 28/02/2006 13:34:48
...
@@ -58,7 +58,7 @@ class wxBoxSizer;
...
@@ -58,7 +58,7 @@ class wxBoxSizer;
#define ID_CHECKBOX10 10016
#define ID_CHECKBOX10 10016
#define ID_CHECKBOX11 10017
#define ID_CHECKBOX11 10017
#define ID_CHECKBOX12 10018
#define ID_CHECKBOX12 10018
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX
|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_TITLE _("Pad properties")
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_TITLE _("Pad properties")
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_SIZE wxSize(400, 300)
...
@@ -78,7 +78,7 @@ class wxBoxSizer;
...
@@ -78,7 +78,7 @@ class wxBoxSizer;
*/
*/
class
WinEDA_PadPropertiesFrame
:
public
wxDialog
class
WinEDA_PadPropertiesFrame
:
public
wxDialog
{
{
DECLARE_DYNAMIC_CLASS
(
WinEDA_PadPropertiesFrame
)
DECLARE_DYNAMIC_CLASS
(
WinEDA_PadPropertiesFrame
)
DECLARE_EVENT_TABLE
()
DECLARE_EVENT_TABLE
()
...
@@ -131,7 +131,6 @@ public:
...
@@ -131,7 +131,6 @@ public:
void
PadPropertiesAccept
(
wxCommandEvent
&
event
);
void
PadPropertiesAccept
(
wxCommandEvent
&
event
);
void
PadTypeSelected
();
void
PadTypeSelected
();
void
PadTypeSelectedEvent
(
wxCommandEvent
&
event
);
void
PadOrientEvent
(
wxCommandEvent
&
event
);
void
PadOrientEvent
(
wxCommandEvent
&
event
);
void
SetPadLayersList
(
long
layer_mask
);
void
SetPadLayersList
(
long
layer_mask
);
void
SetOthersControls
();
void
SetOthersControls
();
...
...
pcbnew/dialog_pad_edit.pjd
View file @
8080a2c9
This diff is collapsed.
Click to expand it.
pcbnew/editpads.cpp
View file @
8080a2c9
...
@@ -26,22 +26,26 @@ int CodeShape[NBSHAPES] = /* forme des pads */
...
@@ -26,22 +26,26 @@ int CodeShape[NBSHAPES] = /* forme des pads */
};
};
#define NBTYPES
5
#define NBTYPES
4
int
CodeType
[
NBTYPES
]
=
int
CodeType
[
NBTYPES
]
=
{
{
PAD_STANDARD
,
PAD_SMD
,
PAD_CONN
,
PAD_
P_HOLE
,
PAD_MECA
PAD_STANDARD
,
PAD_SMD
,
PAD_CONN
,
PAD_
HOLE_NOT_PLATED
};
};
// Default mask layers for pads according to the pas type
static
long
Std_Pad_Layers
[
NBTYPES
]
=
static
long
Std_Pad_Layers
[
NBTYPES
]
=
{
{
// PAD_STANDARD:
ALL_CU_LAYERS
|
SILKSCREEN_LAYER_CMP
|
SOLDERMASK_LAYER_CU
|
SOLDERMASK_LAYER_CMP
,
ALL_CU_LAYERS
|
SILKSCREEN_LAYER_CMP
|
SOLDERMASK_LAYER_CU
|
SOLDERMASK_LAYER_CMP
,
// PAD_CONN:
CMP_LAYER
|
SOLDERPASTE_LAYER_CMP
|
SOLDERMASK_LAYER_CMP
,
CMP_LAYER
|
SOLDERPASTE_LAYER_CMP
|
SOLDERMASK_LAYER_CMP
,
// PAD_SMD:
CMP_LAYER
|
SOLDERMASK_LAYER_CMP
,
CMP_LAYER
|
SOLDERMASK_LAYER_CMP
,
ALL_CU_LAYERS
|
SILKSCREEN_LAYER_CU
|
SILKSCREEN_LAYER_CMP
|
SOLDERMASK_LAYER_CU
|
SOLDERMASK_LAYER_CMP
,
//PAD_HOLE_NOT_PLATED:
ALL_CU_LAYERS
|
SILKSCREEN_LAYER_CU
|
SILKSCREEN_LAYER_CMP
|
ALL_CU_LAYERS
|
SILKSCREEN_LAYER_CMP
|
SOLDERMASK_LAYER_CU
|
SOLDERMASK_LAYER_CMP
SOLDERMASK_LAYER_CU
|
SOLDERMASK_LAYER_CMP
};
};
...
@@ -247,18 +251,12 @@ void WinEDA_PadPropertiesFrame::PadOrientEvent( wxCommandEvent& event )
...
@@ -247,18 +251,12 @@ void WinEDA_PadPropertiesFrame::PadOrientEvent( wxCommandEvent& event )
}
}
/**************************************************************************/
void
WinEDA_PadPropertiesFrame
::
PadTypeSelectedEvent
(
wxCommandEvent
&
event
)
/**************************************************************************/
/* calcule un layer_mask type selon la selection du type du pad
*/
{
PadTypeSelected
();
}
/************************************************/
void
WinEDA_PadPropertiesFrame
::
PadTypeSelected
()
void
WinEDA_PadPropertiesFrame
::
PadTypeSelected
()
/************************************************/
/* Adjust the better mask layer according to the selected pad type
*/
{
{
long
layer_mask
;
long
layer_mask
;
int
ii
;
int
ii
;
...
@@ -524,8 +522,11 @@ void WinEDA_PadPropertiesFrame::PadPropertiesAccept( wxCommandEvent& event )
...
@@ -524,8 +522,11 @@ void WinEDA_PadPropertiesFrame::PadPropertiesAccept( wxCommandEvent& event )
CurrentPad
->
m_Drill
=
wxSize
(
0
,
0
);
CurrentPad
->
m_Drill
=
wxSize
(
0
,
0
);
break
;
break
;
case
PAD_P_HOLE
:
case
PAD_HOLE_NOT_PLATED
:
case
PAD_MECA
:
break
;
default
:
DisplayError
(
this
,
wxT
(
"Error: unknown pad type"
));
break
;
break
;
}
}
...
...
pcbnew/files.cpp
View file @
8080a2c9
...
@@ -132,6 +132,7 @@ int WinEDA_PcbFrame::LoadOnePcbFile( const wxString& FullFileName, bool Append )
...
@@ -132,6 +132,7 @@ int WinEDA_PcbFrame::LoadOnePcbFile( const wxString& FullFileName, bool Append )
int
ii
;
int
ii
;
FILE
*
source
;
FILE
*
source
;
wxString
msg
;
wxString
msg
;
char
cbuf
[
1024
];
ActiveScreen
=
GetScreen
();
ActiveScreen
=
GetScreen
();
...
...
pcbnew/librairi.cpp
View file @
8080a2c9
...
@@ -794,6 +794,7 @@ int WinEDA_ModuleEditFrame::Create_Librairie( const wxString& LibName )
...
@@ -794,6 +794,7 @@ int WinEDA_ModuleEditFrame::Create_Librairie( const wxString& LibName )
{
{
FILE
*
lib_module
;
FILE
*
lib_module
;
wxString
msg
;
wxString
msg
;
char
cbuf
[
256
];
if
(
wxFileExists
(
LibName
)
)
if
(
wxFileExists
(
LibName
)
)
{
{
...
@@ -835,6 +836,7 @@ static bool CreateDocLibrary( const wxString& LibName )
...
@@ -835,6 +836,7 @@ static bool CreateDocLibrary( const wxString& LibName )
*/
*/
{
{
char
Line
[
1024
];
char
Line
[
1024
];
char
cbuf
[
256
];
wxString
Name
,
Doc
,
KeyWord
;
wxString
Name
,
Doc
,
KeyWord
;
wxString
LibDocName
;
wxString
LibDocName
;
FILE
*
LibMod
,
*
LibDoc
;
FILE
*
LibMod
,
*
LibDoc
;
...
...
pcbnew/pcbnew.h
View file @
8080a2c9
...
@@ -212,10 +212,7 @@ eda_global char* adr_himem; /* adresse haute limite de la memoire disponible
...
@@ -212,10 +212,7 @@ eda_global char* adr_himem; /* adresse haute limite de la memoire disponible
eda_global
char
*
adr_max
;
/* adresse haute maxi utilisee pour la memoire */
eda_global
char
*
adr_max
;
/* adresse haute maxi utilisee pour la memoire */
/* variables g�erales */
/* variables generales */
eda_global
char
cbuf
[
1024
];
/* buffer for some text printing */
eda_global
BOARD
*
g_ModuleEditor_Pcb
;
/* board used to edit footprints (used by modedit)*/
eda_global
int
g_TimeOut
;
// Timer for automatic saving
eda_global
int
g_TimeOut
;
// Timer for automatic saving
eda_global
int
g_SaveTime
;
// Time for next saving
eda_global
int
g_SaveTime
;
// Time for next saving
...
@@ -320,6 +317,7 @@ eda_global int g_PadCMPColor;
...
@@ -320,6 +317,7 @@ eda_global int g_PadCMPColor;
#endif
#endif
eda_global
PCB_SCREEN
*
ScreenPcb
;
/* Ecran principal */
eda_global
PCB_SCREEN
*
ScreenPcb
;
/* Ecran principal */
eda_global
BOARD
*
g_ModuleEditor_Pcb
;
/* board used to edit footprints (used by modedit)*/
eda_global
PCB_SCREEN
*
ScreenModule
;
/* Ecran de l'editeur de modules */
eda_global
PCB_SCREEN
*
ScreenModule
;
/* Ecran de l'editeur de modules */
...
...
pcbnew/plotgerb.cpp
View file @
8080a2c9
...
@@ -367,6 +367,7 @@ void trace_1_pastille_OVALE_GERBER( wxPoint pos, wxSize size, int orient )
...
@@ -367,6 +367,7 @@ void trace_1_pastille_OVALE_GERBER( wxPoint pos, wxSize size, int orient )
*/
*/
{
{
D_CODE
*
dcode_ptr
;
D_CODE
*
dcode_ptr
;
char
cbuf
[
256
];
int
x0
,
y0
,
x1
,
y1
,
delta
;
int
x0
,
y0
,
x1
,
y1
,
delta
;
if
(
orient
==
900
||
orient
==
2700
)
/* orient tournee de 90 deg */
if
(
orient
==
900
||
orient
==
2700
)
/* orient tournee de 90 deg */
...
@@ -420,6 +421,7 @@ void Plot_1_CIRCLE_pad_GERBER( wxPoint pos, int diametre )
...
@@ -420,6 +421,7 @@ void Plot_1_CIRCLE_pad_GERBER( wxPoint pos, int diametre )
*/
*/
{
{
D_CODE
*
dcode_ptr
;
D_CODE
*
dcode_ptr
;
char
cbuf
[
256
];
wxSize
size
(
diametre
,
diametre
);
wxSize
size
(
diametre
,
diametre
);
...
@@ -451,6 +453,7 @@ void PlotRectangularPad_GERBER( wxPoint pos, wxSize size, int orient )
...
@@ -451,6 +453,7 @@ void PlotRectangularPad_GERBER( wxPoint pos, wxSize size, int orient )
*/
*/
{
{
D_CODE
*
dcode_ptr
;
D_CODE
*
dcode_ptr
;
char
cbuf
[
256
];
/* Trace de la forme flashee */
/* Trace de la forme flashee */
switch
(
orient
)
switch
(
orient
)
...
@@ -630,6 +633,7 @@ void PlotGERBERLine( wxPoint start, wxPoint end, int large )
...
@@ -630,6 +633,7 @@ void PlotGERBERLine( wxPoint start, wxPoint end, int large )
*/
*/
{
{
D_CODE
*
dcode_ptr
;
D_CODE
*
dcode_ptr
;
char
cbuf
[
256
];
UserToDeviceCoordinate
(
start
);
UserToDeviceCoordinate
(
start
);
UserToDeviceCoordinate
(
end
);
UserToDeviceCoordinate
(
end
);
...
@@ -865,6 +869,7 @@ int WinEDA_BasePcbFrame::Gen_D_CODE_File( FILE* penfile )
...
@@ -865,6 +869,7 @@ int WinEDA_BasePcbFrame::Gen_D_CODE_File( FILE* penfile )
*/
*/
{
{
D_CODE
*
ptr_tool
;
D_CODE
*
ptr_tool
;
char
cbuf
[
1024
];
int
nb_dcodes
=
0
;
int
nb_dcodes
=
0
;
/* Init : */
/* Init : */
...
...
pcbnew/plothpgl.cpp
View file @
8080a2c9
...
@@ -499,6 +499,7 @@ void trace_1_pastille_RONDE_HPGL( wxPoint pos, int diametre, int modetrace )
...
@@ -499,6 +499,7 @@ void trace_1_pastille_RONDE_HPGL( wxPoint pos, int diametre, int modetrace )
/**************************************************************************/
/**************************************************************************/
/* Trace 1 pastille RONDE (via,pad rond) en position pos */
/* Trace 1 pastille RONDE (via,pad rond) en position pos */
{
{
char
cbuf
[
1024
];
int
rayon
,
delta
;
int
rayon
,
delta
;
UserToDeviceCoordinate
(
pos
);
UserToDeviceCoordinate
(
pos
);
...
...
pcbnew/router.cpp
View file @
8080a2c9
...
@@ -237,8 +237,7 @@ void Out_Pads( BOARD* Pcb, FILE* outfile )
...
@@ -237,8 +237,7 @@ void Out_Pads( BOARD* Pcb, FILE* outfile )
fprintf
(
outfile
,
" %d"
,
2
);
fprintf
(
outfile
,
" %d"
,
2
);
break
;
break
;
case
PAD_P_HOLE
:
case
PAD_HOLE_NOT_PLATED
:
case
PAD_MECA
:
fprintf
(
outfile
,
" %d"
,
4
);
fprintf
(
outfile
,
" %d"
,
4
);
break
;
break
;
}
}
...
...
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