This commit is contained in:
parent
8d4a9b510d
commit
cbb5159a07
|
@ -1,30 +0,0 @@
|
||||||
== 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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -878,6 +878,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
|
||||||
SEGZONE* edge_poly;
|
SEGZONE* edge_poly;
|
||||||
edge_poly = new SEGZONE( pcb );
|
edge_poly = new SEGZONE( pcb );
|
||||||
pcb->m_Zone.Append( edge_poly );
|
pcb->m_Zone.Append( edge_poly );
|
||||||
|
D(printf("R:%p\n", edge_poly );)
|
||||||
|
|
||||||
edge_poly->SetLayer( activeLayer );
|
edge_poly->SetLayer( activeLayer );
|
||||||
edge_poly->m_Width = 1;
|
edge_poly->m_Width = 1;
|
||||||
|
@ -933,6 +934,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
|
||||||
case GERB_INTERPOL_LINEAR_1X:
|
case GERB_INTERPOL_LINEAR_1X:
|
||||||
track = new TRACK( pcb );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
fillLineTRACK( track, dcode, activeLayer,
|
fillLineTRACK( track, dcode, activeLayer,
|
||||||
m_PreviousPos, m_CurrentPos,
|
m_PreviousPos, m_CurrentPos,
|
||||||
size.x, !(m_LayerNegative ^ m_ImageNegative) );
|
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:
|
case GERB_INTERPOL_ARC_POS:
|
||||||
track = new TRACK( pcb );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
fillArcTRACK( track, dcode, activeLayer,
|
fillArcTRACK( track, dcode, activeLayer,
|
||||||
m_PreviousPos, m_CurrentPos, m_IJPos,
|
m_PreviousPos, m_CurrentPos, m_IJPos,
|
||||||
size.x, m_Iterpolation==GERB_INTERPOL_ARC_NEG ? false : true,
|
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:
|
case APT_CIRCLE:
|
||||||
track = new TRACK( pcb );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
fillRoundFlashTRACK( track, dcode, activeLayer,
|
fillRoundFlashTRACK( track, dcode, activeLayer,
|
||||||
m_CurrentPos,
|
m_CurrentPos,
|
||||||
size.x, !(m_LayerNegative ^ m_ImageNegative) );
|
size.x, !(m_LayerNegative ^ m_ImageNegative) );
|
||||||
|
@ -993,6 +997,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
|
||||||
case APT_RECT:
|
case APT_RECT:
|
||||||
track = new TRACK( pcb );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
|
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
|
||||||
m_CurrentPos, size,
|
m_CurrentPos, size,
|
||||||
aperture == APT_RECT ? S_SPOT_RECT : S_SPOT_OVALE,
|
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 );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
fillRoundFlashTRACK( track, dcode, activeLayer,
|
fillRoundFlashTRACK( track, dcode, activeLayer,
|
||||||
m_CurrentPos,
|
m_CurrentPos,
|
||||||
diameter, exposure );
|
diameter, exposure );
|
||||||
|
@ -1049,6 +1055,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
|
||||||
curPos += midPoint;
|
curPos += midPoint;
|
||||||
track = new TRACK( pcb );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
|
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
|
||||||
curPos, size, S_SPOT_RECT,
|
curPos, size, S_SPOT_RECT,
|
||||||
exposure );
|
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 );
|
curPos += mapPt( p->params[3].GetValue( tool ), p->params[4].GetValue( tool ), m_GerbMetric );
|
||||||
track = new TRACK( pcb );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
|
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
|
||||||
curPos, size, S_SPOT_RECT,
|
curPos, size, S_SPOT_RECT,
|
||||||
exposure );
|
exposure );
|
||||||
|
@ -1083,6 +1091,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
|
||||||
curPos.x += size.x/2;
|
curPos.x += size.x/2;
|
||||||
track = new TRACK( pcb );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
|
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
|
||||||
curPos, size, S_SPOT_RECT,
|
curPos, size, S_SPOT_RECT,
|
||||||
exposure );
|
exposure );
|
||||||
|
@ -1098,11 +1107,13 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
|
||||||
|
|
||||||
track = new TRACK( pcb );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
fillRoundFlashTRACK( track, dcode, activeLayer, curPos,
|
fillRoundFlashTRACK( track, dcode, activeLayer, curPos,
|
||||||
outerDiam, !(m_LayerNegative ^ m_ImageNegative) );
|
outerDiam, !(m_LayerNegative ^ m_ImageNegative) );
|
||||||
|
|
||||||
track = new TRACK( pcb );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
fillRoundFlashTRACK( track, dcode, activeLayer, curPos,
|
fillRoundFlashTRACK( track, dcode, activeLayer, curPos,
|
||||||
innerDiam, (m_LayerNegative ^ m_ImageNegative) );
|
innerDiam, (m_LayerNegative ^ m_ImageNegative) );
|
||||||
|
|
||||||
|
@ -1130,18 +1141,22 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
|
||||||
{
|
{
|
||||||
track = new TRACK( pcb );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
fillCircularTRACK( track, dcode, activeLayer, curPos, outerDiam,
|
fillCircularTRACK( track, dcode, activeLayer, curPos, outerDiam,
|
||||||
penThickness, !(m_LayerNegative ^ m_ImageNegative) );
|
penThickness, !(m_LayerNegative ^ m_ImageNegative) );
|
||||||
}
|
}
|
||||||
|
|
||||||
track = new TRACK( pcb );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
|
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
|
||||||
curPos, wxSize(crossHairThickness,crossHairLength),
|
curPos, wxSize(crossHairThickness,crossHairLength),
|
||||||
S_SPOT_RECT, !(m_LayerNegative ^ m_ImageNegative) );
|
S_SPOT_RECT, !(m_LayerNegative ^ m_ImageNegative) );
|
||||||
|
|
||||||
track = new TRACK( pcb );
|
track = new TRACK( pcb );
|
||||||
pcb->m_Track.Append( track );
|
pcb->m_Track.Append( track );
|
||||||
|
D(printf("R:%p\n", track );)
|
||||||
|
|
||||||
// swap x and y in wxSize() for this one
|
// swap x and y in wxSize() for this one
|
||||||
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
|
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
|
||||||
curPos, wxSize(crossHairLength,crossHairThickness),
|
curPos, wxSize(crossHairLength,crossHairThickness),
|
||||||
|
|
|
@ -128,6 +128,8 @@ void WinEDA_GerberFrame::Trace_Gerber( wxDC* DC, int draw_mode, int printmasklay
|
||||||
if( !(track->ReturnMaskLayer() & printmasklayer) )
|
if( !(track->ReturnMaskLayer() & printmasklayer) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
D(printf("D:%p\n", track );)
|
||||||
|
|
||||||
if( track->GetNet() == 0 ) // StartPoint
|
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
|
||||||
|
|
|
@ -41,6 +41,8 @@ void Draw_Track_Buffer( WinEDA_DrawPanel* panel, wxDC* DC, BOARD* Pcb, int draw_
|
||||||
if( !(track->ReturnMaskLayer() & printmasklayer) )
|
if( !(track->ReturnMaskLayer() & printmasklayer) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
D(printf("D:%p\n", track );)
|
||||||
|
|
||||||
if( dcode_hightlight == track->GetNet() && track->GetLayer()==layer )
|
if( dcode_hightlight == track->GetNet() && track->GetLayer()==layer )
|
||||||
Trace_Segment( panel, DC, track, draw_mode | GR_SURBRILL );
|
Trace_Segment( panel, DC, track, draw_mode | GR_SURBRILL );
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue