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
cdf111d6
Commit
cdf111d6
authored
Sep 29, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed errors in comments. no new code
parent
2dc53276
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
54 deletions
+46
-54
dcode.cpp
gerbview/dcode.cpp
+7
-7
dcode.h
gerbview/dcode.h
+21
-18
rs274d.cpp
gerbview/rs274d.cpp
+18
-29
No files found.
gerbview/dcode.cpp
View file @
cdf111d6
...
@@ -20,14 +20,14 @@
...
@@ -20,14 +20,14 @@
* 1 to 999
* 1 to 999
*
*
* D_CODES:
* D_CODES:
* D01 ... D9 =
action
codes:
* D01 ... D9 =
command
codes:
*
D01 = activating light (lower pen) when di placement
*
D01 = activating light (pen down) while moving
*
D02 = light extinction (lift pen) when di placement
*
D02 = light extinction (pen up) while moving
*
D03
Flash
*
D03 =
Flash
*
D09 = VAPE Flash
*
D04 to D09 = non used
* D10 ... = Indentification Tool (Shape id)
* D10 ...
D999
= Indentification Tool (Shape id)
*
*
* For tools:
* For tools
defining a shape)
:
* DCode min = D10
* DCode min = D10
* DCode max = 999
* DCode max = 999
*/
*/
...
...
gerbview/dcode.h
View file @
cdf111d6
...
@@ -17,12 +17,13 @@
...
@@ -17,12 +17,13 @@
* http://gerbv.sourceforge.net/docs/rs274xrevd_e.pdf
* http://gerbv.sourceforge.net/docs/rs274xrevd_e.pdf
*/
*/
enum
APERTURE_T
{
enum
APERTURE_T
{
APT_CIRCLE
=
'C'
,
APT_CIRCLE
=
'C'
,
// Flashed shape: Circle with or without hole
APT_LINE
=
'L'
,
APT_LINE
=
'L'
,
// tool to draw line. Not used to flash items
APT_RECT
=
'R'
,
APT_RECT
=
'R'
,
// Flashed shape: Rectangle with or without hole
APT_OVAL
=
'0'
,
APT_OVAL
=
'0'
,
// Flashed shape: Oval with or without hole
APT_POLYGON
=
'P'
,
APT_POLYGON
=
'P'
,
// Flashed shape: Regular polygon (3 to 12 edges)
APT_MACRO
=
'M'
// with or without hole. Can be rotated
APT_MACRO
=
'M'
// Complex shape given by a macro definition (see AM_PRIMITIVE_ID)
};
};
// In aperture definition, round, oval and rectangular flashed shapes
// In aperture definition, round, oval and rectangular flashed shapes
...
@@ -101,18 +102,20 @@ private:
...
@@ -101,18 +102,20 @@ private:
* Enum AM_PRIMITIVE_ID
* Enum AM_PRIMITIVE_ID
* is the set of all "aperture macro primitives" (primitive numbers). See
* is the set of all "aperture macro primitives" (primitive numbers). See
* Table 3 in http://gerbv.sourceforge.net/docs/rs274xrevd_e.pdf
* Table 3 in http://gerbv.sourceforge.net/docs/rs274xrevd_e.pdf
* aperture macro primitives are basic shapes which can be combined to create a complex shape
* This complex shape is flashed.
*/
*/
enum
AM_PRIMITIVE_ID
{
enum
AM_PRIMITIVE_ID
{
AMP_CIRCLE
=
1
,
AMP_CIRCLE
=
1
,
// Circle. (diameter and position)
AMP_LINE2
=
2
,
AMP_LINE2
=
2
,
// Line with rectangle ends. (Width, start and end pos + rotation)
AMP_LINE20
=
20
,
AMP_LINE20
=
20
,
// Same as AMP_LINE2
AMP_LINE_CENTER
=
21
,
AMP_LINE_CENTER
=
21
,
// Rectangle. (height, width and center pos + rotation)
AMP_LINE_LOWER_LEFT
=
22
,
AMP_LINE_LOWER_LEFT
=
22
,
// Rectangle. (height, width and lrft bottom corner pos + rotation)
AMP_EOF
=
3
,
AMP_EOF
=
3
,
// End Of File marquer: not really a shape
AMP_OUTLINE
=
4
,
AMP_OUTLINE
=
4
,
// Free polyline (n corners + rotation)
AMP_POLYGON
=
5
,
AMP_POLYGON
=
5
,
// Closed regular polygon(diameter, number of vertices (3 to 10), rotation)
AMP_MOIRE
=
6
,
AMP_MOIRE
=
6
,
// A cross hair with n concentric circles + rotation
AMP_THERMAL
=
7
,
AMP_THERMAL
=
7
,
// Thermal shape (pos, outer and inner dioameter, cross hair thickness + rotation)
};
};
...
@@ -197,9 +200,9 @@ class D_CODE
...
@@ -197,9 +200,9 @@ class D_CODE
*/
*/
DCODE_PARAMS
m_am_params
;
DCODE_PARAMS
m_am_params
;
std
::
vector
<
wxPoint
>
m_PolyCorners
;
/* Polygon used to draw A
MP
_POLYGON shape and some other
std
::
vector
<
wxPoint
>
m_PolyCorners
;
/* Polygon used to draw A
PT
_POLYGON shape and some other
* complex shapes which are converted to polygon
* complex shapes which are converted to polygon
* (shapes with hole
, rotated rectangles ...
* (shapes with hole
)
*/
*/
public
:
public
:
...
...
gerbview/rs274d.cpp
View file @
cdf111d6
...
@@ -19,32 +19,26 @@
...
@@ -19,32 +19,26 @@
#define IsNumber( x ) ( ( ( (x) >= '0' ) && ( (x) <='9' ) ) \
#define IsNumber( x ) ( ( ( (x) >= '0' ) && ( (x) <='9' ) ) \
|| ( (x) == '-' ) || ( (x) == '+' ) || ( (x) == '.' ) )
|| ( (x) == '-' ) || ( (x) == '+' ) || ( (x) == '.' ) )
/* Format Gerber: NOTES:
/* Gerber: NOTES about some important commands found in RS274D and RS274X (G codes):
* Functions history:
* Gn =
* Gn =
* G01 linear interpolation (right trace)
* G01 linear interpolation (right trace)
* G02, G20, G21 Circular interpolation, meaning trig <0
* G02, G20, G21 Circular interpolation, meaning trig <0
* G03, G30, G31 Circular interpolation, meaning trigo> 0
* G03, G30, G31 Circular interpolation, meaning trigo> 0
* G04
review
* G04
= comment
* G06 parabolic interpolation
* G06 parabolic interpolation
* G07 Cubic Interpolation
* G07 Cubic Interpolation
* G10 linear interpolation (scale x10)
* G10 linear interpolation (scale x10)
* G11 linear interpolation (0.1x range)
* G11 linear interpolation (0.1x range)
* G12 linear interpolation (0.01x scale)
* G12 linear interpolation (0.01x scale)
* G
52 plot symbol reference code by Dnn
* G
36 Start polygon mode
* G
53 plot symbol reference by Dnn; symbol rotates from -90 degrees
* G
37 Stop polygon mode (and close it)
* G54 Selection Tool
* G54 Selection Tool
* G55 Fashion photo exhibition
* G56 plot symbol reference code for DNN
* G57 displays the symbol link to the console
* G58 plot displays the symbol and link to the console
* G60 linear interpolation (scale x100)
* G60 linear interpolation (scale x100)
* G70 Units = Inches
* G70
Select
Units = Inches
* G71 Units = Millimeters
* G71
Select
Units = Millimeters
* G74 circular interpolation removes 360 degree
, has returned
G01
* G74 circular interpolation removes 360 degree
(arc draw mode) finishing by
G01
*
Active
G75 circular interpolation on 360 degree
* G75 circular interpolation on 360 degree
* G90 mode absolute coordinates
* G90 mode absolute coordinates
* G91 Fashion Related Contacts
*
*
* X, Y
* X, Y
* X and Y are followed by + or - and m + n digits (not separated)
* X and Y are followed by + or - and m + n digits (not separated)
...
@@ -53,23 +47,20 @@
...
@@ -53,23 +47,20 @@
* Classic formats: m = 2, n = 3 (size 2.3)
* Classic formats: m = 2, n = 3 (size 2.3)
* m = 3, n = 4 (size 3.4)
* m = 3, n = 4 (size 3.4)
* eg
* eg
* G
__ X00345Y-06123 * D__
* G
xxX00345Y-06123*
*
*
* Tools and D_CODES
* Tools and D_CODES
* Tool number (identification of shapes)
* Tool number (identification of shapes)
* 1 to 99 (Classical)
* 10 to 999
* 1 to 999
* D_CODES:
* D_CODES:
*
* D01 ... D9 = command codes:
* D01 ... D9 = action codes:
* D01 = activating light (pen down) when placement
* D01 = activating light (lower pen) when placement
* D02 = light extinction (pen up) when placement
* D02 = light extinction (lift pen) when placement
* D03 = Flash
* D03 = Flash
*
D09 = VAPE Flash
*
D09 = VAPE Flash (I never see this command in gerber file)
* D51 = G54 preceded by -> Select VAPE
* D51 = G54 preceded by -> Select VAPE
*
*
* D10 ... D255 = Identification Tool (Opening)
* D10 ... D999 = Identification Tool: tool selection
* Not tj in order (see table in PCBPLOT.H)
*/
*/
// Photoplot actions:
// Photoplot actions:
...
@@ -999,9 +990,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame,
...
@@ -999,9 +990,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame,
NEGATE
(
gbritem
->
m_End
.
y
);
NEGATE
(
gbritem
->
m_End
.
y
);
gbritem
->
m_PolyCorners
.
push_back
(
gbritem
->
m_End
);
gbritem
->
m_PolyCorners
.
push_back
(
gbritem
->
m_End
);
// the first track of each polygon has a netcode of zero,
// Set the erasure flag of gbritem if a negative polygon.
// otherwise one. Set the erasure flag in that special track,
// if a negative polygon.
if
(
!
m_PolygonFillModeState
)
if
(
!
m_PolygonFillModeState
)
{
{
if
(
m_LayerNegative
^
m_ImageNegative
)
if
(
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