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
cbb5159a
Commit
cbb5159a
authored
Dec 29, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
8d4a9b51
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
249 additions
and
260 deletions
+249
-260
CODING_GUIDELINES.txt
CODING_GUIDELINES.txt
+0
-30
rs274d.cpp
gerbview/rs274d.cpp
+15
-0
tracepcb.cpp
gerbview/tracepcb.cpp
+3
-1
trpiste.cpp
gerbview/trpiste.cpp
+231
-229
No files found.
CODING_GUIDELINES.txt
deleted
100644 → 0
View file @
8d4a9b51
== Spaces and Tabs ==
Try to use as many as can TABS instead of spaces, this makes indenting
much more easy.
== Function prototypes ==
The name of the function should be on a seperated line, this for easy
searching in long source files.
Each parameter should use a own line, aligned under the first parameter.
Below there is an example, this style is for reading and editing quick trough
sourcecode. Also indenting can be set with a good programmers editor
(visual spaces per tab, this because one tab is normaly 8 spaces on screen)
Example:
void
foo( int x,
int y,
int z )
{
function1();
if(var == 1)
{
dothis();
dothat();
}
}
gerbview/rs274d.cpp
View file @
cbb5159a
...
...
@@ -878,6 +878,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
SEGZONE
*
edge_poly
;
edge_poly
=
new
SEGZONE
(
pcb
);
pcb
->
m_Zone
.
Append
(
edge_poly
);
D
(
printf
(
"R:%p
\n
"
,
edge_poly
);)
edge_poly
->
SetLayer
(
activeLayer
);
edge_poly
->
m_Width
=
1
;
...
...
@@ -933,6 +934,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
case
GERB_INTERPOL_LINEAR_1X
:
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
fillLineTRACK
(
track
,
dcode
,
activeLayer
,
m_PreviousPos
,
m_CurrentPos
,
size
.
x
,
!
(
m_LayerNegative
^
m_ImageNegative
)
);
...
...
@@ -948,6 +950,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
case
GERB_INTERPOL_ARC_POS
:
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
fillArcTRACK
(
track
,
dcode
,
activeLayer
,
m_PreviousPos
,
m_CurrentPos
,
m_IJPos
,
size
.
x
,
m_Iterpolation
==
GERB_INTERPOL_ARC_NEG
?
false
:
true
,
...
...
@@ -984,6 +987,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
case
APT_CIRCLE
:
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
fillRoundFlashTRACK
(
track
,
dcode
,
activeLayer
,
m_CurrentPos
,
size
.
x
,
!
(
m_LayerNegative
^
m_ImageNegative
)
);
...
...
@@ -993,6 +997,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
case
APT_RECT
:
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
fillOvalOrRectFlashTRACK
(
track
,
dcode
,
activeLayer
,
m_CurrentPos
,
size
,
aperture
==
APT_RECT
?
S_SPOT_RECT
:
S_SPOT_OVALE
,
...
...
@@ -1020,6 +1025,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
fillRoundFlashTRACK
(
track
,
dcode
,
activeLayer
,
m_CurrentPos
,
diameter
,
exposure
);
...
...
@@ -1049,6 +1055,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
curPos
+=
midPoint
;
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
fillOvalOrRectFlashTRACK
(
track
,
dcode
,
activeLayer
,
curPos
,
size
,
S_SPOT_RECT
,
exposure
);
...
...
@@ -1064,6 +1071,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
curPos
+=
mapPt
(
p
->
params
[
3
].
GetValue
(
tool
),
p
->
params
[
4
].
GetValue
(
tool
),
m_GerbMetric
);
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
fillOvalOrRectFlashTRACK
(
track
,
dcode
,
activeLayer
,
curPos
,
size
,
S_SPOT_RECT
,
exposure
);
...
...
@@ -1083,6 +1091,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
curPos
.
x
+=
size
.
x
/
2
;
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
fillOvalOrRectFlashTRACK
(
track
,
dcode
,
activeLayer
,
curPos
,
size
,
S_SPOT_RECT
,
exposure
);
...
...
@@ -1098,11 +1107,13 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
fillRoundFlashTRACK
(
track
,
dcode
,
activeLayer
,
curPos
,
outerDiam
,
!
(
m_LayerNegative
^
m_ImageNegative
)
);
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
fillRoundFlashTRACK
(
track
,
dcode
,
activeLayer
,
curPos
,
innerDiam
,
(
m_LayerNegative
^
m_ImageNegative
)
);
...
...
@@ -1130,18 +1141,22 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
{
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
fillCircularTRACK
(
track
,
dcode
,
activeLayer
,
curPos
,
outerDiam
,
penThickness
,
!
(
m_LayerNegative
^
m_ImageNegative
)
);
}
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
fillOvalOrRectFlashTRACK
(
track
,
dcode
,
activeLayer
,
curPos
,
wxSize
(
crossHairThickness
,
crossHairLength
),
S_SPOT_RECT
,
!
(
m_LayerNegative
^
m_ImageNegative
)
);
track
=
new
TRACK
(
pcb
);
pcb
->
m_Track
.
Append
(
track
);
D
(
printf
(
"R:%p
\n
"
,
track
);)
// swap x and y in wxSize() for this one
fillOvalOrRectFlashTRACK
(
track
,
dcode
,
activeLayer
,
curPos
,
wxSize
(
crossHairLength
,
crossHairThickness
),
...
...
gerbview/tracepcb.cpp
View file @
cbb5159a
...
...
@@ -128,9 +128,11 @@ void WinEDA_GerberFrame::Trace_Gerber( wxDC* DC, int draw_mode, int printmasklay
if
(
!
(
track
->
ReturnMaskLayer
()
&
printmasklayer
)
)
continue
;
D
(
printf
(
"D:%p
\n
"
,
track
);)
if
(
track
->
GetNet
()
==
0
)
// StartPoint
{
if
(
points
.
size
()
)
// we have found a new polygon: Draw the old polygon
if
(
points
.
size
()
)
// we have found a new polygon: Draw the old polygon
{
if
(
erase
)
{
...
...
gerbview/trpiste.cpp
View file @
cbb5159a
This diff is collapsed.
Click to expand it.
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