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
a28492f4
Commit
a28492f4
authored
Feb 26, 2009
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixing, gerbers, etc.
parent
16784384
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
613 additions
and
615 deletions
+613
-615
CHANGELOG.txt
CHANGELOG.txt
+8
-1
class_edge_mod.cpp
pcbnew/class_edge_mod.cpp
+0
-1
clean.cpp
pcbnew/clean.cpp
+1
-1
gen_self.h
pcbnew/gen_self.h
+0
-548
librairi.cpp
pcbnew/librairi.cpp
+1
-1
muonde.cpp
pcbnew/muonde.cpp
+539
-1
pcbcfg.cpp
pcbnew/pcbcfg.cpp
+5
-6
plot_rtn.cpp
pcbnew/plot_rtn.cpp
+22
-18
plotgerb.cpp
pcbnew/plotgerb.cpp
+37
-38
No files found.
CHANGELOG.txt
View file @
a28492f4
...
...
@@ -19,9 +19,16 @@ email address.
2009-Feb-25 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++pcbnew
Markers were now shown when on top of a high-lighted pad. Moved highlight
*
Markers were now shown when on top of a high-lighted pad. Moved highlight
drawing function into class BOARD and out of Frame. Call BOARD::DrawHighLight() from
within BOARD::Draw() to fix.
* Gerbers were not generated if you had EDGE_MODULEs on a copper layer, such as in
a MuWaveBasicShape. The line thickness was not being put into the gerber via a DCODE.
These gerber files were bad, and geda gerbv would also complain.
* A few window titles were not conformant with UIpolicies.txt.
* You could not load a *.pro file from another project into PCBNEW if your current
project had none. Changed wildcard mask.
* Deleted gen_self.h and moved that code into muonde.cpp
2009-Feb-24 UPDATE Dick Hollenbeck <dick@softplc.com>
...
...
pcbnew/class_edge_mod.cpp
View file @
a28492f4
...
...
@@ -51,7 +51,6 @@ void EDGE_MODULE:: Copy( EDGE_MODULE* source ) // copy structure
if
(
source
==
NULL
)
return
;
// @todo why not just use "*this = source;" ?
m_Start
=
source
->
m_Start
;
m_End
=
source
->
m_End
;
m_Shape
=
source
->
m_Shape
;
...
...
pcbnew/clean.cpp
View file @
a28492f4
...
...
@@ -420,7 +420,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
if
(
!
segment
->
IsNull
()
)
continue
;
/* Leng
ht
segment = 0; delete it */
/* Leng
th
segment = 0; delete it */
segment
->
Draw
(
frame
->
DrawPanel
,
DC
,
GR_XOR
);
segment
->
DeleteStructure
();
nbpoints_supprimes
++
;
...
...
pcbnew/gen_self.h
deleted
100644 → 0
View file @
16784384
This diff is collapsed.
Click to expand it.
pcbnew/librairi.cpp
View file @
a28492f4
...
...
@@ -722,7 +722,7 @@ MODULE* WinEDA_BasePcbFrame::Create_1_Module( wxDC* DC, const wxString& module_n
/* Ask fo the new module reference */
if
(
module_name
.
IsEmpty
()
)
{
if
(
Get_Message
(
_
(
"Module Reference:"
),
_
(
"Module Creation
:
"
),
Line
,
this
)
!=
0
)
if
(
Get_Message
(
_
(
"Module Reference:"
),
_
(
"Module Creation"
),
Line
,
this
)
!=
0
)
{
DisplayInfo
(
this
,
_
(
"No reference, aborted"
)
);
return
NULL
;
...
...
pcbnew/muonde.cpp
View file @
a28492f4
This diff is collapsed.
Click to expand it.
pcbnew/pcbcfg.cpp
View file @
a28492f4
...
...
@@ -69,11 +69,11 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
case
ID_CONFIG_READ
:
FullFileName
=
GetScreen
()
->
m_FileName
.
AfterLast
(
'/'
);
ChangeFileNameExt
(
FullFileName
,
g_Prj_Config_Filename_ext
);
FullFileName
=
EDA_FileSelector
(
_
(
"Read
config f
ile"
),
FullFileName
=
EDA_FileSelector
(
_
(
"Read
Config F
ile"
),
wxPathOnly
(
GetScreen
()
->
m_FileName
),
/* Chemin par defaut */
FullFileName
,
/* nom fichier par defaut */
g_Prj_Config_Filename_ext
,
/* extension par defaut */
FullFileName
,
/* Masque d'affichage */
wxString
(
wxT
(
"*"
))
+
g_Prj_Config_Filename_ext
,
this
,
wxFD_OPEN
,
TRUE
/* ne change pas de repertoire courant */
...
...
@@ -183,10 +183,9 @@ bool Read_Config( const wxString& project_name )
ScreenPcb
->
AddGrid
(
g_UserGrid
,
g_UserGrid_Unit
,
ID_POPUP_GRID_USER
);
}
g_DesignSettings
.
m_TrackWidthHistory
[
0
]
=
g_DesignSettings
.
m_CurrentTrackWidth
;
g_DesignSettings
.
m_ViaSizeHistory
[
0
]
=
g_DesignSettings
.
m_CurrentViaSize
;
g_DesignSettings
.
m_TrackWidthHistory
[
0
]
=
g_DesignSettings
.
m_CurrentTrackWidth
;
g_DesignSettings
.
m_ViaSizeHistory
[
0
]
=
g_DesignSettings
.
m_CurrentViaSize
;
for
(
ii
=
1
;
ii
<
HISTORY_NUMBER
;
ii
++
)
{
g_DesignSettings
.
m_TrackWidthHistory
[
ii
]
=
0
;
...
...
pcbnew/plot_rtn.cpp
View file @
a28492f4
...
...
@@ -321,7 +321,7 @@ static void PlotTextModule( TEXTE_MODULE* pt_texte, int format_plot )
SetCurrentLineWidthPS
(
thickness
);
break
;
}
PlotGraphicText
(
format_plot
,
pos
,
BLACK
,
pt_texte
->
m_Text
,
orient
,
size
,
...
...
@@ -429,22 +429,21 @@ void Plot_Edges_Modules( BOARD* pcb, int format_plot, int masque_layer )
/* Trace les contours des modules */
{
int
nb_items
;
/* Pour affichage activite: nbr modules traites */
MODULE
*
Module
;
EDGE_MODULE
*
PtEdge
;
wxString
msg
;
nb_items
=
0
;
Module
=
pcb
->
m_Modules
;
for
(
;
Module
!=
NULL
;
Module
=
Module
->
Next
()
)
for
(
MODULE
*
module
=
pcb
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
PtEdge
=
(
EDGE_MODULE
*
)
M
odule
->
m_Drawings
.
GetFirst
();
for
(
;
PtEdge
!=
NULL
;
PtEdge
=
PtE
dge
->
Next
()
)
EDGE_MODULE
*
edge
=
(
EDGE_MODULE
*
)
m
odule
->
m_Drawings
.
GetFirst
();
for
(
;
edge
;
edge
=
e
dge
->
Next
()
)
{
if
(
PtE
dge
->
Type
()
!=
TYPE_EDGE_MODULE
)
if
(
e
dge
->
Type
()
!=
TYPE_EDGE_MODULE
)
continue
;
if
(
(
g_TabOneLayerMask
[
PtEdge
->
GetLayer
()]
&
masque_layer
)
==
0
)
if
(
(
g_TabOneLayerMask
[
edge
->
GetLayer
()]
&
masque_layer
)
==
0
)
continue
;
Plot_1_EdgeModule
(
format_plot
,
PtEdge
);
Plot_1_EdgeModule
(
format_plot
,
edge
);
}
/* Affichage du nombre de modules traites */
...
...
@@ -470,8 +469,12 @@ void Plot_1_EdgeModule( int format_plot, EDGE_MODULE* PtEdge )
type_trace
=
PtEdge
->
m_Shape
;
thickness
=
PtEdge
->
m_Width
;
if
(
g_Plot_Mode
==
FILAIRE
)
{
thickness
=
g_PlotLine_Width
;
wxLogDebug
(
wxT
(
"changing edgemodule thickness to g_PlotLine_Width"
)
);
}
pos
=
PtEdge
->
m_Start
;
end
=
PtEdge
->
m_End
;
...
...
@@ -484,6 +487,7 @@ void Plot_1_EdgeModule( int format_plot, EDGE_MODULE* PtEdge )
switch
(
format_plot
)
{
case
PLOT_FORMAT_GERBER
:
SelectD_CODE_For_LineDraw
(
thickness
);
PlotGERBERLine
(
pos
,
end
,
thickness
);
break
;
...
...
@@ -577,16 +581,16 @@ void PlotTextePcb( TEXTE_PCB* pt_texte, int format_plot, int masque_layer )
switch
(
format_plot
)
{
case
PLOT_FORMAT_GERBER
:
SelectD_CODE_For_LineDraw
(
thickness
);
break
;
case
PLOT_FORMAT_GERBER
:
SelectD_CODE_For_LineDraw
(
thickness
);
break
;
case
PLOT_FORMAT_HPGL
:
break
;
case
PLOT_FORMAT_HPGL
:
break
;
case
PLOT_FORMAT_POST
:
SetCurrentLineWidthPS
(
thickness
);
break
;
case
PLOT_FORMAT_POST
:
SetCurrentLineWidthPS
(
thickness
);
break
;
}
PlotGraphicText
(
format_plot
,
pos
,
BLACK
,
...
...
pcbnew/plotgerb.cpp
View file @
a28492f4
...
...
@@ -84,10 +84,13 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
/* Calculate scaling from pcbnew units (in 0.1 mil or 0.0001 inch) to gerber units */
Gerb_scale_plot
=
1.0
;
/* for format 3.4 (4 digits for decimal format means 0.1 mil per gerber unit */
scale_x
=
Scale_X
*
Gerb_scale_plot
;
scale_y
=
Scale_Y
*
Gerb_scale_plot
;
g_PlotOffset
.
x
=
0
;
g_PlotOffset
.
y
=
0
;
if
(
PlotOriginIsAuxAxis
)
g_PlotOffset
=
m_Auxiliary_Axis_Position
;
...
...
@@ -175,35 +178,30 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
{
wxPoint
pos
;
wxSize
size
;
MODULE
*
Module
;
D_PAD
*
PtPad
;
TRACK
*
track
;
EDA_BaseStruct
*
PtStruct
;
wxString
msg
;
/* Draw items type Drawings Pcb matching with masque_layer: */
PtStruct
=
m_Pcb
->
m_Drawings
;
for
(
;
PtStruct
!=
NULL
;
PtStruct
=
PtStruct
->
Next
()
)
for
(
BOARD_ITEM
*
item
=
m_Pcb
->
m_Drawings
;
item
;
item
=
item
->
Next
()
)
{
switch
(
PtStruct
->
Type
()
)
switch
(
item
->
Type
()
)
{
case
TYPE_DRAWSEGMENT
:
PlotDrawSegment
(
(
DRAWSEGMENT
*
)
PtStruct
,
PLOT_FORMAT_GERBER
,
PlotDrawSegment
(
(
DRAWSEGMENT
*
)
item
,
PLOT_FORMAT_GERBER
,
masque_layer
);
break
;
case
TYPE_TEXTE
:
PlotTextePcb
(
(
TEXTE_PCB
*
)
PtStruct
,
PLOT_FORMAT_GERBER
,
PlotTextePcb
(
(
TEXTE_PCB
*
)
item
,
PLOT_FORMAT_GERBER
,
masque_layer
);
break
;
case
TYPE_COTATION
:
PlotCotation
(
(
COTATION
*
)
PtStruct
,
PLOT_FORMAT_GERBER
,
PlotCotation
(
(
COTATION
*
)
item
,
PLOT_FORMAT_GERBER
,
masque_layer
);
break
;
case
TYPE_MIRE
:
PlotMirePcb
(
(
MIREPCB
*
)
PtStruct
,
PLOT_FORMAT_GERBER
,
PlotMirePcb
(
(
MIREPCB
*
)
item
,
PLOT_FORMAT_GERBER
,
masque_layer
);
break
;
...
...
@@ -216,18 +214,16 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
}
}
/* Draw footprints shapes without pads (pads will plotted later) */
Module
=
m_Pcb
->
m_Modules
;
for
(
;
Module
!=
NULL
;
Module
=
(
MODULE
*
)
Module
->
Next
()
)
/* Draw footprint shapes without pads (pads will plotted later) */
for
(
MODULE
*
module
=
m_Pcb
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
PtStruct
=
Module
->
m_Drawings
;
for
(
;
PtStruct
!=
NULL
;
PtStruct
=
PtStruct
->
Next
()
)
for
(
BOARD_ITEM
*
item
=
module
->
m_Drawings
;
item
;
item
=
item
->
Next
()
)
{
switch
(
PtStruct
->
Type
()
)
switch
(
item
->
Type
()
)
{
case
TYPE_EDGE_MODULE
:
if
(
masque_layer
&
g_TabOneLayerMask
[(
(
EDGE_MODULE
*
)
PtStruct
)
->
GetLayer
()]
)
Plot_1_EdgeModule
(
PLOT_FORMAT_GERBER
,
(
EDGE_MODULE
*
)
PtStruct
);
if
(
masque_layer
&
g_TabOneLayerMask
[(
(
EDGE_MODULE
*
)
item
)
->
GetLayer
()]
)
Plot_1_EdgeModule
(
PLOT_FORMAT_GERBER
,
(
EDGE_MODULE
*
)
item
);
break
;
default
:
...
...
@@ -237,26 +233,25 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
}
/* Plot footprint pads */
Module
=
m_Pcb
->
m_Modules
;
for
(
;
Module
!=
NULL
;
Module
=
(
MODULE
*
)
Module
->
Next
()
)
for
(
MODULE
*
module
=
m_Pcb
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
PtPad
=
(
D_PAD
*
)
Module
->
m_Pads
;
for
(
;
PtPad
!=
NULL
;
PtPad
=
(
D_PAD
*
)
PtPad
->
Next
()
)
for
(
D_PAD
*
pad
=
module
->
m_Pads
;
pad
;
pad
=
pad
->
Next
()
)
{
wxPoint
shape_pos
;
if
(
(
PtP
ad
->
m_Masque_Layer
&
masque_layer
)
==
0
)
if
(
(
p
ad
->
m_Masque_Layer
&
masque_layer
)
==
0
)
continue
;
shape_pos
=
PtPad
->
ReturnShapePos
();
shape_pos
=
pad
->
ReturnShapePos
();
pos
=
shape_pos
;
size
.
x
=
PtP
ad
->
m_Size
.
x
+
2
*
garde
;
size
.
y
=
PtP
ad
->
m_Size
.
y
+
2
*
garde
;
size
.
x
=
p
ad
->
m_Size
.
x
+
2
*
garde
;
size
.
y
=
p
ad
->
m_Size
.
y
+
2
*
garde
;
/* Don't draw a null size item : */
if
(
size
.
x
<=
0
||
size
.
y
<=
0
)
continue
;
switch
(
PtP
ad
->
m_PadShape
)
switch
(
p
ad
->
m_PadShape
)
{
case
PAD_CIRCLE
:
Plot_1_CIRCLE_pad_GERBER
(
pos
,
size
.
x
);
...
...
@@ -268,20 +263,20 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
if
(
size
.
x
==
size
.
y
)
Plot_1_CIRCLE_pad_GERBER
(
pos
,
size
.
x
);
else
trace_1_pastille_OVALE_GERBER
(
pos
,
size
,
PtP
ad
->
m_Orient
);
trace_1_pastille_OVALE_GERBER
(
pos
,
size
,
p
ad
->
m_Orient
);
break
;
case
PAD_TRAPEZOID
:
{
wxSize
delta
=
PtP
ad
->
m_DeltaSize
;
wxSize
delta
=
p
ad
->
m_DeltaSize
;
trace_1_pad_TRAPEZE_GERBER
(
pos
,
size
,
delta
,
PtP
ad
->
m_Orient
,
FILLED
);
delta
,
p
ad
->
m_Orient
,
FILLED
);
}
break
;
case
PAD_RECT
:
default
:
PlotRectangularPad_GERBER
(
pos
,
size
,
PtP
ad
->
m_Orient
);
PlotRectangularPad_GERBER
(
pos
,
size
,
p
ad
->
m_Orient
);
break
;
}
}
...
...
@@ -290,39 +285,46 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
/* Plot vias : */
if
(
tracevia
)
{
for
(
track
=
m_Pcb
->
m_Track
;
track
!=
NULL
;
track
=
(
TRACK
*
)
track
->
Next
()
)
for
(
TRACK
*
track
=
m_Pcb
->
m_Track
;
track
;
track
=
track
->
Next
()
)
{
if
(
track
->
Type
()
!=
TYPE_VIA
)
continue
;
SEGVIA
*
Via
=
(
SEGVIA
*
)
track
;
// vias not plotted if not on selected layer, but if layer
// == SOLDERMASK_LAYER_CU or SOLDERMASK_LAYER_CMP, vias are drawn,
// if they are on a external copper layer
int
via_mask_layer
=
Via
->
ReturnMaskLayer
();
if
(
via_mask_layer
&
CUIVRE_LAYER
)
via_mask_layer
|=
SOLDERMASK_LAYER_CU
;
if
(
via_mask_layer
&
CMP_LAYER
)
via_mask_layer
|=
SOLDERMASK_LAYER_CMP
;
if
(
(
via_mask_layer
&
masque_layer
)
==
0
)
continue
;
pos
=
Via
->
m_Start
;
size
.
x
=
size
.
y
=
Via
->
m_Width
+
2
*
garde
;
/* Don't draw a null size item : */
if
(
size
.
x
<=
0
)
continue
;
Plot_1_CIRCLE_pad_GERBER
(
pos
,
size
.
x
);
}
}
/* Plot tracks (not vias) : */
for
(
track
=
m_Pcb
->
m_Track
;
track
!=
NULL
;
track
=
(
TRACK
*
)
track
->
Next
()
)
for
(
TRACK
*
track
=
m_Pcb
->
m_Track
;
track
;
track
=
track
->
Next
()
)
{
wxPoint
end
;
if
(
track
->
Type
()
==
TYPE_VIA
)
continue
;
if
(
(
g_TabOneLayerMask
[
track
->
GetLayer
()]
&
masque_layer
)
==
0
)
continue
;
...
...
@@ -335,7 +337,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
}
/* Plot zones: */
for
(
track
=
m_Pcb
->
m_Zone
;
track
!=
NULL
;
track
=
(
TRACK
*
)
track
->
Next
()
)
for
(
TRACK
*
track
=
m_Pcb
->
m_Zone
;
track
;
track
=
track
->
Next
()
)
{
wxPoint
end
;
...
...
@@ -781,9 +783,6 @@ int Gen_D_CODE_File( FILE* penfile )
/*****************************/
void
CloseFileGERBER
(
void
)
/****************************/
/** Function CloseFileGERBER
*/
{
char
line
[
1024
];
wxString
TmpFileName
,
msg
;
...
...
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