Commit cdf111d6 authored by jean-pierre charras's avatar jean-pierre charras

Fixed errors in comments. no new code

parent 2dc53276
......@@ -20,14 +20,14 @@
* 1 to 999
*
* D_CODES:
* D01 ... D9 = action codes:
* D01 = activating light (lower pen) when di placement
* D02 = light extinction (lift pen) when di placement
* D03 Flash
* D09 = VAPE Flash
* D10 ... = Indentification Tool (Shape id)
* D01 ... D9 = command codes:
* D01 = activating light (pen down) while moving
* D02 = light extinction (pen up) while moving
* D03 = Flash
* D04 to D09 = non used
* D10 ... D999 = Indentification Tool (Shape id)
*
* For tools:
* For tools defining a shape):
* DCode min = D10
* DCode max = 999
*/
......
......@@ -17,12 +17,13 @@
* http://gerbv.sourceforge.net/docs/rs274xrevd_e.pdf
*/
enum APERTURE_T {
APT_CIRCLE = 'C',
APT_LINE = 'L',
APT_RECT = 'R',
APT_OVAL = '0',
APT_POLYGON = 'P',
APT_MACRO = 'M'
APT_CIRCLE = 'C', // Flashed shape: Circle with or without hole
APT_LINE = 'L', // tool to draw line. Not used to flash items
APT_RECT = 'R', // Flashed shape: Rectangle with or without hole
APT_OVAL = '0', // Flashed shape: Oval with or without hole
APT_POLYGON = 'P', // Flashed shape: Regular polygon (3 to 12 edges)
// 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
......@@ -101,18 +102,20 @@ private:
* Enum AM_PRIMITIVE_ID
* is the set of all "aperture macro primitives" (primitive numbers). See
* 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 {
AMP_CIRCLE = 1,
AMP_LINE2 = 2,
AMP_LINE20 = 20,
AMP_LINE_CENTER = 21,
AMP_LINE_LOWER_LEFT = 22,
AMP_EOF = 3,
AMP_OUTLINE = 4,
AMP_POLYGON = 5,
AMP_MOIRE = 6,
AMP_THERMAL = 7,
AMP_CIRCLE = 1, // Circle. (diameter and position)
AMP_LINE2 = 2, // Line with rectangle ends. (Width, start and end pos + rotation)
AMP_LINE20 = 20, // Same as AMP_LINE2
AMP_LINE_CENTER = 21, // Rectangle. (height, width and center pos + rotation)
AMP_LINE_LOWER_LEFT = 22, // Rectangle. (height, width and lrft bottom corner pos + rotation)
AMP_EOF = 3, // End Of File marquer: not really a shape
AMP_OUTLINE = 4, // Free polyline (n corners + rotation)
AMP_POLYGON = 5, // Closed regular polygon(diameter, number of vertices (3 to 10), rotation)
AMP_MOIRE = 6, // A cross hair with n concentric circles + rotation
AMP_THERMAL = 7, // Thermal shape (pos, outer and inner dioameter, cross hair thickness + rotation)
};
......@@ -197,9 +200,9 @@ class D_CODE
*/
DCODE_PARAMS m_am_params;
std::vector <wxPoint> m_PolyCorners; /* Polygon used to draw AMP_POLYGON shape and some other
std::vector <wxPoint> m_PolyCorners; /* Polygon used to draw APT_POLYGON shape and some other
* complex shapes which are converted to polygon
* (shapes with hole, rotated rectangles ...
* (shapes with hole )
*/
public:
......
......@@ -19,32 +19,26 @@
#define IsNumber( x ) ( ( ( (x) >= '0' ) && ( (x) <='9' ) ) \
|| ( (x) == '-' ) || ( (x) == '+' ) || ( (x) == '.' ) )
/* Format Gerber: NOTES:
* Functions history:
/* Gerber: NOTES about some important commands found in RS274D and RS274X (G codes):
* Gn =
* G01 linear interpolation (right trace)
* G02, G20, G21 Circular interpolation, meaning trig <0
* G03, G30, G31 Circular interpolation, meaning trigo> 0
* G04 review
* G04 = comment
* G06 parabolic interpolation
* G07 Cubic Interpolation
* G10 linear interpolation (scale x10)
* G11 linear interpolation (0.1x range)
* G12 linear interpolation (0.01x scale)
* G52 plot symbol reference code by Dnn
* G53 plot symbol reference by Dnn; symbol rotates from -90 degrees
* G36 Start polygon mode
* G37 Stop polygon mode (and close it)
* 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)
* G70 Units = Inches
* G71 Units = Millimeters
* G74 circular interpolation removes 360 degree, has returned G01
* Active G75 circular interpolation on 360 degree
* G70 Select Units = Inches
* G71 Select Units = Millimeters
* G74 circular interpolation removes 360 degree (arc draw mode) finishing by G01
* G75 circular interpolation on 360 degree
* G90 mode absolute coordinates
* G91 Fashion Related Contacts
*
* X, Y
* X and Y are followed by + or - and m + n digits (not separated)
......@@ -53,23 +47,20 @@
* Classic formats: m = 2, n = 3 (size 2.3)
* m = 3, n = 4 (size 3.4)
* eg
* G__ X00345Y-06123 * D__
* GxxX00345Y-06123*
*
* Tools and D_CODES
* Tool number (identification of shapes)
* 1 to 99 (Classical)
* 1 to 999
* 10 to 999
* D_CODES:
* D01 ... D9 = command codes:
* D01 = activating light (pen down) when placement
* D02 = light extinction (pen up) when placement
* D03 = Flash
* D09 = VAPE Flash (I never see this command in gerber file)
* D51 = G54 preceded by -> Select VAPE
*
* D01 ... D9 = action codes:
* D01 = activating light (lower pen) when placement
* D02 = light extinction (lift pen) when placement
* D03 = Flash
* D09 = VAPE Flash
* D51 = G54 preceded by -> Select VAPE
*
* D10 ... D255 = Identification Tool (Opening)
* Not tj in order (see table in PCBPLOT.H)
* D10 ... D999 = Identification Tool: tool selection
*/
// Photoplot actions:
......@@ -999,9 +990,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame,
NEGATE( gbritem->m_End.y );
gbritem->m_PolyCorners.push_back( gbritem->m_End );
// the first track of each polygon has a netcode of zero,
// otherwise one. Set the erasure flag in that special track,
// if a negative polygon.
// Set the erasure flag of gbritem if a negative polygon.
if( !m_PolygonFillModeState )
{
if( m_LayerNegative ^ m_ImageNegative )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment