KiCad PCB EDA Suite
Loading...
Searching...
No Matches
rs274x.cpp File Reference
#include <base_units.h>
#include <math/util.h>
#include <gerbview.h>
#include <gerber_file_image.h>
#include <core/ignore.h>
#include <macros.h>
#include <string_utils.h>
#include <X2_gerber_attributes.h>
#include <gbr_metadata.h>
#include <wx/log.h>

Go to the source code of this file.

Macros

#define CODE(x, y)   ( ( (x) << 8 ) + (y) )
 

Enumerations

enum  RS274X_PARAMETERS {
  AXIS_SELECT = CODE( 'A', 'S' ) , FORMAT_STATEMENT = CODE( 'F', 'S' ) , MIRROR_IMAGE = CODE( 'M', 'I' ) , MODE_OF_UNITS = CODE( 'M', 'O' ) ,
  INCH = CODE( 'I', 'N' ) , MILLIMETER = CODE( 'M', 'M' ) , OFFSET = CODE( 'O', 'F' ) , SCALE_FACTOR = CODE( 'S', 'F' ) ,
  IMAGE_JUSTIFY = CODE( 'I', 'J' ) , IMAGE_NAME = CODE( 'I', 'N' ) , IMAGE_OFFSET = CODE( 'I', 'O' ) , IMAGE_POLARITY = CODE( 'I', 'P' ) ,
  IMAGE_ROTATION = CODE( 'I', 'R' ) , AP_DEFINITION = CODE( 'A', 'D' ) , AP_MACRO = CODE( 'A', 'M' ) , FILE_ATTRIBUTE = CODE( 'T', 'F' ) ,
  NET_ATTRIBUTE = CODE( 'T', 'O' ) , APERTURE_ATTRIBUTE = CODE( 'T', 'A' ) , REMOVE_APERTURE_ATTRIBUTE = CODE( 'T', 'D' ) , KNOCKOUT = CODE( 'K', 'O' ) ,
  STEP_AND_REPEAT = CODE( 'S', 'R' ) , ROTATE = CODE( 'R', 'O' ) , LOAD_POLARITY = CODE( 'L', 'P' ) , LOAD_NAME = CODE( 'L', 'N' )
}
 

Functions

int ReadInt (char *&text, bool aSkipSeparator=true)
 Read an integer from an ASCII character buffer.
 
double ReadDouble (char *&text, bool aSkipSeparator=true)
 Read a double precision floating point number from an ASCII character buffer.
 

Macro Definition Documentation

◆ CODE

#define CODE (   x,
 
)    ( ( (x) << 8 ) + (y) )

Definition at line 42 of file rs274x.cpp.

Enumeration Type Documentation

◆ RS274X_PARAMETERS

Enumerator
AXIS_SELECT 
FORMAT_STATEMENT 
MIRROR_IMAGE 
MODE_OF_UNITS 
INCH 
MILLIMETER 
OFFSET 
SCALE_FACTOR 
IMAGE_JUSTIFY 
IMAGE_NAME 
IMAGE_OFFSET 
IMAGE_POLARITY 
IMAGE_ROTATION 
AP_DEFINITION 
AP_MACRO 
FILE_ATTRIBUTE 
NET_ATTRIBUTE 
APERTURE_ATTRIBUTE 
REMOVE_APERTURE_ATTRIBUTE 
KNOCKOUT 
STEP_AND_REPEAT 
ROTATE 
LOAD_POLARITY 
LOAD_NAME 

Definition at line 55 of file rs274x.cpp.

Function Documentation

◆ ReadDouble()

double ReadDouble ( char *&  text,
bool  aSkipSeparator = true 
)

Read a double precision floating point number from an ASCII character buffer.

If there is a comma after the number, then skip over that.

Parameters
textis a reference to a character pointer from which the ASCII double is read from and the pointer advanced for each character read.
aSkipSeparatorset to true (default) to skip comma.
Returns
number read.

Definition at line 303 of file rs274_read_XY_and_IJ_coordinates.cpp.

◆ ReadInt()

int ReadInt ( char *&  text,
bool  aSkipSeparator = true 
)

Read an integer from an ASCII character buffer.

If there is a comma after the integer, then skip over that.

Parameters
textis a reference to a character pointer from which bytes are read and the pointer is advanced for each byte read.
aSkipSeparatorset to true (default) to skip comma.
Returns
The integer read in.

Definition at line 266 of file rs274_read_XY_and_IJ_coordinates.cpp.