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
ffec0b84
Commit
ffec0b84
authored
Oct 04, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gerbview: fixed an issue with arcs
parent
f3922c4c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
rs274d.cpp
gerbview/rs274d.cpp
+23
-12
No files found.
gerbview/rs274d.cpp
View file @
ffec0b84
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
/**** rs274d.cpp ****/
/**** rs274d.cpp ****/
/********************/
/********************/
#include "fctsys.h"
#include "fctsys.h"
#include "polygons_defs.h"
#include "polygons_defs.h"
#include "common.h"
#include "common.h"
...
@@ -36,8 +35,9 @@
...
@@ -36,8 +35,9 @@
* G60 linear interpolation (scale x100)
* G60 linear interpolation (scale x100)
* G70 Select Units = Inches
* G70 Select Units = Inches
* G71 Select Units = Millimeters
* G71 Select Units = Millimeters
* G74 circular interpolation removes 360 degree (arc draw mode) finishing by G01
* G74 disable 360 degrees circular interpolation (return to 90 deg mode)
* G75 circular interpolation on 360 degree
* and circular interpolation (return t linear)
* G75 enable 360 degrees circular interpolation
* G90 mode absolute coordinates
* G90 mode absolute coordinates
*
*
* X, Y
* X, Y
...
@@ -741,8 +741,9 @@ bool GERBER::Execute_G_Command( char*& text, int G_commande )
...
@@ -741,8 +741,9 @@ bool GERBER::Execute_G_Command( char*& text, int G_commande )
m_GerbMetric
=
true
;
// false = Inches, true = metric
m_GerbMetric
=
true
;
// false = Inches, true = metric
break
;
break
;
case
GC_TURN_OFF_360_INTERPOL
:
case
GC_TURN_OFF_360_INTERPOL
:
// disable Multi cadran arc and Arc interpol
m_360Arc_enbl
=
false
;
m_360Arc_enbl
=
false
;
m_Iterpolation
=
GERB_INTERPOL_LINEAR_1X
;
break
;
break
;
case
GC_TURN_ON_360_INTERPOL
:
case
GC_TURN_ON_360_INTERPOL
:
...
@@ -871,13 +872,14 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, char*& text, int
...
@@ -871,13 +872,14 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, char*& text, int
case
GERB_INTERPOL_ARC_NEG
:
case
GERB_INTERPOL_ARC_NEG
:
case
GERB_INTERPOL_ARC_POS
:
case
GERB_INTERPOL_ARC_POS
:
gbritem
=
(
GERBER_DRAW_ITEM
*
)(
pcb
->
m_Drawings
.
GetLast
()
);
gbritem
=
(
GERBER_DRAW_ITEM
*
)(
pcb
->
m_Drawings
.
GetLast
()
);
// D( printf( "Add arc poly %d,%d to %d,%d fill %d interpol %d 360_enb %d\n",
// D( printf( "Add arc poly %d,%d to %d,%d fill %d interpol %d 360_enb %d\n",
// m_PreviousPos.x, m_PreviousPos.y, m_CurrentPos.x,
// m_PreviousPos.x, m_PreviousPos.y, m_CurrentPos.x,
// m_CurrentPos.y, m_PolygonFillModeState, m_Iterpolation, m_360Arc_enbl ); )
// m_CurrentPos.y, m_PolygonFillModeState,
// m_Iterpolation, m_360Arc_enbl ); )
fillArcPOLY
(
pcb
,
gbritem
,
m_PreviousPos
,
fillArcPOLY
(
pcb
,
gbritem
,
m_PreviousPos
,
m_CurrentPos
,
m_IJPos
,
m_CurrentPos
,
m_IJPos
,
(
m_Iterpolation
==
GERB_INTERPOL_ARC_NEG
)
?
(
m_Iterpolation
==
GERB_INTERPOL_ARC_NEG
)
?
false
:
true
,
false
:
true
,
m_360Arc_enbl
,
m_LayerNegative
,
m_ImageNegative
);
m_360Arc_enbl
,
m_LayerNegative
,
m_ImageNegative
);
break
;
break
;
default
:
default
:
...
@@ -939,7 +941,9 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, char*& text, int
...
@@ -939,7 +941,9 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, char*& text, int
gbritem
=
new
GERBER_DRAW_ITEM
(
pcb
);
gbritem
=
new
GERBER_DRAW_ITEM
(
pcb
);
gbritem
->
m_UnitsMetric
=
m_GerbMetric
;
gbritem
->
m_UnitsMetric
=
m_GerbMetric
;
pcb
->
m_Drawings
.
Append
(
gbritem
);
pcb
->
m_Drawings
.
Append
(
gbritem
);
// D( printf( "R:%p\n", gbritem ); )
// D( printf( "Add line %d,%d to %d,%d\n",
// m_PreviousPos.x, m_PreviousPos.y,
// m_CurrentPos.x, m_CurrentPos.y ); )
fillLineGBRITEM
(
gbritem
,
dcode
,
activeLayer
,
m_PreviousPos
,
fillLineGBRITEM
(
gbritem
,
dcode
,
activeLayer
,
m_PreviousPos
,
m_CurrentPos
,
size
.
x
,
m_LayerNegative
,
m_ImageNegative
);
m_CurrentPos
,
size
.
x
,
m_LayerNegative
,
m_ImageNegative
);
break
;
break
;
...
@@ -955,7 +959,10 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, char*& text, int
...
@@ -955,7 +959,10 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, char*& text, int
gbritem
=
new
GERBER_DRAW_ITEM
(
pcb
);
gbritem
=
new
GERBER_DRAW_ITEM
(
pcb
);
gbritem
->
m_UnitsMetric
=
m_GerbMetric
;
gbritem
->
m_UnitsMetric
=
m_GerbMetric
;
pcb
->
m_Drawings
.
Append
(
gbritem
);
pcb
->
m_Drawings
.
Append
(
gbritem
);
// D( printf( "R:%p\n", gbritem ); )
// D( printf( "Add arc %d,%d to %d,%d center %d, %d interpol %d 360_enb %d\n",
// m_PreviousPos.x, m_PreviousPos.y, m_CurrentPos.x,
// m_CurrentPos.y, m_IJPos.x,
// m_IJPos.y, m_Iterpolation, m_360Arc_enbl ); )
fillArcGBRITEM
(
gbritem
,
dcode
,
activeLayer
,
m_PreviousPos
,
fillArcGBRITEM
(
gbritem
,
dcode
,
activeLayer
,
m_PreviousPos
,
m_CurrentPos
,
m_IJPos
,
size
.
x
,
m_CurrentPos
,
m_IJPos
,
size
.
x
,
(
m_Iterpolation
==
GERB_INTERPOL_ARC_NEG
)
?
(
m_Iterpolation
==
GERB_INTERPOL_ARC_NEG
)
?
...
@@ -975,6 +982,9 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, char*& text, int
...
@@ -975,6 +982,9 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, char*& text, int
case
2
:
// code D2: exposure OFF (i.e. "move to")
case
2
:
// code D2: exposure OFF (i.e. "move to")
m_Exposure
=
false
;
m_Exposure
=
false
;
// D( printf( "Move to %d,%d to %d,%d\n",
// m_PreviousPos.x, m_PreviousPos.y,
// m_CurrentPos.x, m_CurrentPos.y ); )
m_PreviousPos
=
m_CurrentPos
;
m_PreviousPos
=
m_CurrentPos
;
break
;
break
;
...
@@ -990,7 +1000,8 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, char*& text, int
...
@@ -990,7 +1000,8 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, char*& text, int
gbritem
=
new
GERBER_DRAW_ITEM
(
pcb
);
gbritem
=
new
GERBER_DRAW_ITEM
(
pcb
);
gbritem
->
m_UnitsMetric
=
m_GerbMetric
;
gbritem
->
m_UnitsMetric
=
m_GerbMetric
;
pcb
->
m_Drawings
.
Append
(
gbritem
);
pcb
->
m_Drawings
.
Append
(
gbritem
);
// D( printf( "R:%p dcode %d layer %d\n", gbritem, dcode, activeLayer ); )
// D( printf( "Add flashed dcode %d layer %d at %d %d\n", dcode, activeLayer,
// m_CurrentPos.x, m_CurrentPos.y ); )
fillFlashedGBRITEM
(
gbritem
,
aperture
,
fillFlashedGBRITEM
(
gbritem
,
aperture
,
dcode
,
activeLayer
,
m_CurrentPos
,
dcode
,
activeLayer
,
m_CurrentPos
,
size
,
m_LayerNegative
,
m_ImageNegative
);
size
,
m_LayerNegative
,
m_ImageNegative
);
...
...
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