This commit is contained in:
paolo.iocco
2023-03-09 10:24:21 +00:00
parent 1b2787b9ad
commit ab6f495c89
575 changed files with 173384 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
# -*- Mode: Eagle -*-
#
# Sample drill rack file.
#
# drill_size is the size of the drill bit.
# minimum is the smallest hole the bit will be used for.
# maximum is the largest hole the bit will be used for.
#
# Each value can have a "unit of measure" added to it,
# such as 0.500mm . If you do not provide the unit of measure,
# values over 0.250 are considered millimeters, and
# values under 0.250 are considered inches. For example:
# 0.400 would be considered 0.400 mm.
# 0.125 would be considered 0.125 inches.
#
# Please note that you must use a TAB character
# between each setting on a line.
#
# Tip: Set the TAB size of your editor to 12 characters.
#
tool drill_size minimum maximum length
T01 0.500mm 0.000in 0.025in 1.5in
T02 0.032in 0.025in 0.035in 1.5in
T03 0.040in 0.035in 0.039in 1.5in
T04 0.050in 0.045in 0.055in 1.5in
T05 0.062in 0.055in 0.070in 1.5in
T06 0.125in 0.100in 0.125in 1.5in

View File

@@ -0,0 +1,130 @@
//
// Options for pcb-gcode.ulp.
// Often used options are at the top of the file.
// Copied to gcode-defaults.h by the setup program.
//
// author=John Johnson
// description=Tries to be very compatible
//
int FILENAMES_8_CHARACTERS = NO;
//
// Comments.
//
string COMMENT_BEGIN = "(";
string COMMENT_END = ")";
//
// Format strings for coordinates, etc.
//
string FORMAT = "%-6.4f "; /* coordinate format */
string FR_FORMAT = "F%-5.2f "; /* feedrate format */
string IJ_FORMAT = "I" + FORMAT + "J" + FORMAT;
string EOL = "\n"; /* standard line ending */
string PARAM = "P"; /* some use P, some # for parameters */
//
// Modes
//
string INCH_MODE = "G20" + EOL;
string INCH_MODE_COMMENT = COMMENT_BEGIN + "Inch Mode" + COMMENT_END + EOL;
string METRIC_MODE = "G21" + EOL;
string METRIC_MODE_COMMENT = COMMENT_BEGIN + "Metric Mode" + COMMENT_END + EOL;
string MIL_MODE = "M02 (Please setup MIL_MODE in gcode-defaults.h)" + EOL;
string MICRON_MODE = "M02 (Please setup MICRON_MODE in gcode-defaults.h)" + EOL;
string ABSOLUTE_MODE = COMMENT_BEGIN + "Absolute Coordinates" + COMMENT_END + EOL + "G90" + EOL;
//
// G codes
//
string RAPID = "G00 ";
string FEED = "G01 ";
string ARC_CW = "G02 ";
string ARC_CCW = "G03 ";
string DWELL = "G04 " + PARAM + "%f" + EOL;
//
// M codes
//
string SPINDLE_ON = "M03" + EOL + DWELL;
string SPINDLE_OFF = "M05" + EOL;
string END_PROGRAM = "M02" + EOL;
string OPERATOR_PAUSE = "M06 ";
//
// Coordinates
//
string MOVE_X = "X" + FORMAT;
string MOVE_Y = "Y" + FORMAT;
string MOVE_XY = "X" + FORMAT + "Y" + FORMAT;
string MOVE_Z = "Z" + FORMAT;
string MOVE_XYZ = MOVE_XY + MOVE_Z;
//
// Rapids
//
string RAPID_MOVE_X = RAPID + MOVE_X;
string RAPID_MOVE_Y = RAPID + MOVE_Y;
string RAPID_MOVE_XY = RAPID + MOVE_XY;
string RAPID_MOVE_XY_HOME = RAPID + "X0 Y0";
string RAPID_MOVE_Z = RAPID + MOVE_Z;
string RAPID_MOVE_XYZ = RAPID + MOVE_XYZ;
//
// Feeds
//
string FEED_MOVE_X = FEED + MOVE_X;
string FEED_MOVE_Y = FEED + MOVE_Y;
string FEED_MOVE_XY = FEED + MOVE_XY;
string FEED_MOVE_XY_WITH_RATE = FEED + MOVE_XY + FR_FORMAT;
string FEED_MOVE_Z = FEED + MOVE_Z;
string FEED_MOVE_Z_WITH_RATE = FEED + MOVE_Z + FR_FORMAT;
string FEED_MOVE_XYZ = FEED + MOVE_XYZ;
//
// Drilling holes
//
// Not using G82 so it will be very generic.
//
string DRILL_CODE = ";( G82 not used )";
string RELEASE_PLANE = "R" + FORMAT;
string DWELL_TIME = PARAM + "%f";
string DRILL_FIRST_HOLE = RAPID + "Z" + real_to_string(DEFAULT_Z_UP) + EOL
+ RAPID + MOVE_XY + EOL
+ FEED + MOVE_Z + FR_FORMAT + EOL
+ FEED + "Z" + real_to_string(DEFAULT_Z_UP) + EOL
+ COMMENT_BEGIN + RELEASE_PLANE + " " + DWELL_TIME + COMMENT_END + EOL;
string DRILL_HOLE = COMMENT_BEGIN + RAPID + "Z" + real_to_string(DEFAULT_Z_UP) + COMMENT_END + EOL
+ RAPID + MOVE_XY + EOL
+ FEED + "Z" + real_to_string(DRILL_DEPTH) + EOL
+ FEED + "Z" + real_to_string(DEFAULT_Z_UP) + EOL;
//
// Tool change
//
string TOOL_CODE = "T%02d ";
string TOOL_MM_FORMAT = "%1.3fmm";
string TOOL_INCH_FORMAT = "%1.4fin";
string TOOL_CHANGE = OPERATOR_PAUSE + TOOL_CODE + " ; " + FORMAT + EOL;
string TOOL_CHANGE_TABLE_HEADER = COMMENT_BEGIN +
" Tool| Size | Min Sub | Max Sub | Count " + COMMENT_END + EOL;
string TOOL_CHANGE_TABLE_FORMAT(int tool_number, real size_mm, real size_inch, real min_drill, real max_drill, int count)
{
string formatted;
sprintf(formatted, COMMENT_BEGIN + " " + TOOL_CODE + " " + TOOL_MM_FORMAT + " " +
TOOL_INCH_FORMAT + " " + TOOL_INCH_FORMAT + " " + TOOL_INCH_FORMAT + " " + COMMENT_END + EOL,
tool_number, size_mm, size_inch, min_drill, max_drill);
return(formatted);
}
//
// Circles / Arcs
//
string CIRCLE_TOP = ARC_CW + MOVE_XY + IJ_FORMAT + EOL;
string CIRCLE_BOTTOM = ARC_CCW + MOVE_XY + IJ_FORMAT + EOL;

View File

@@ -0,0 +1,39 @@
//
// Default values for generating gcode from a PCB.
//
// These settings were last changed with pcb-gcode-setup: 07/07/20 00:45
//
//
// Changes you make in this file will be overwritten if you use pcb-gcode-setup.
//
int SINGLE_PASS = YES;
real ISO_MIN = 1.000000;
real ISO_MAX = 0.508000;
real ISO_STEP = 0.127000;
int GENERATE_TOP_OUTLINES = YES;
int GENERATE_TOP_DRILL = YES;
int GENERATE_TOP_FILL = NO;
int GENERATE_BOTTOM_OUTLINES = YES;
int GENERATE_BOTTOM_DRILL = YES;
int GENERATE_BOTTOM_FILL = NO;
int MIRROR_BOTTOM = NO;
int SIMPLE_DRILL_CODE = NO;
int GENERATE_MILLING = NO;
int GENERATE_TEXT = NO;
int SPOT_DRILL = YES;
real SPOT_DRILL_DEPTH = -0.279400;
int DO_TOOL_CHANGE_WITH_ZERO_STEP = YES;
int FLIP_BOARD_IN_Y = NO;
//int OUTPUT_UNITS = U_MICRONS;
int OUTPUT_UNITS = U_MILLIMETERS;
//int OUTPUT_UNITS = U_MILS;
//int OUTPUT_UNITS = U_INCHES;

View File

@@ -0,0 +1,34 @@
//
// General Options // Your edits to this file will be overwritten by the setup program.
//
int SHOW_PROGRESS = NO;
string RESTORE_MENU_FILE = "pcb-gcode-menu.scr";
int NC_FILE_COMMENT_FROM_BOARD = YES;
int NC_FILE_COMMENT_DATE = YES;
int NC_FILE_COMMENT_MACHINE_SETTINGS = YES;
int NC_FILE_COMMENT_PCB_DEFAULTS_SETTINGS = YES;
int USER_GCODE = NO;
int g_debug_flag = YES;
int COMPACT_GCODE = NO;
int USE_LINE_NUMBERS = NO;
string LINE_NUMBER_FORMAT = "N%05d ";
int SHOW_PREVIEW = YES;
string FILENAME_BASE = "$BOARD_PATH/$BOARD_NAME";
string FILENAME_TOP_ETCH_FILE = ".$SIDE.$FILE.$EXT";
string FILENAME_TOP_DRILL_FILE = ".$SIDE.$FILE.$EXT";
string FILENAME_TOP_MILL_FILE = ".$SIDE.$FILE.$EXT";
string FILENAME_TOP_TEXT_FILE = ".$SIDE.$FILE.$EXT";
string FILENAME_TOP_FILL_FILE = "";
string FILENAME_BOT_ETCH_FILE = ".$SIDE.$FILE.$EXT";
string FILENAME_BOT_DRILL_FILE = ".$SIDE.$FILE.$EXT";
string FILENAME_BOT_MILL_FILE = ".$SIDE.$FILE.$EXT";
string FILENAME_BOT_TEXT_FILE = ".$SIDE.$FILE.$EXT";
string FILENAME_BOT_FILL_FILE = "";
string ETCH_FILE_NAME = "etch";
string DRILL_FILE_NAME = "drill";
string MILL_FILE_NAME = "mill";
string TEXT_FILE_NAME = "text";
string TOP_FILE_NAME = "top";
string BOT_FILE_NAME = "bot";
string DEFAULT_EXTENSION = "tap";
string DEFAULT_DRILL_FILE = "";

View File

@@ -0,0 +1,24 @@
//
// For ease of use, and to avoid overwritting your settings,
// use pcb-gcode-setup to make changes to these settings.
//
real DEFAULT_Z_HIGH = 12.700000;
real DEFAULT_Z_UP = 2.540000;
real DEFAULT_Z_DOWN = -0.177800;
real DRILL_DEPTH = -0.812800;
real DRILL_DWELL = 1.000000;
real SPINDLE_ON_TIME = 3.000000;
real MILLING_DEPTH = -0.254000;
real TEXT_DEPTH = -0.127000;
real TOOL_CHANGE_POS_X = 12.700000;
real TOOL_CHANGE_POS_Y = 15.240000;
real TOOL_CHANGE_POS_Z = 25.400000;
real FEED_RATE = 508.000000;
real FEED_RATE_Z = 254.000000;
real DEFAULT_WIDTH = 1.000000;
real X_OFFSET = 0.000000;
real Y_OFFSET = 0.000000;
real X_HOME = 0.000000;
real Y_HOME = 0.000000;
real EPSILON = 0.002540;

View File

@@ -0,0 +1,236 @@
//
// Define your own gcode sequences in this file.
//
// The settings are listed from most general, to most specific. The settings
// at the top of this file go into every file created, while the settings
// at the end of this file have to do with tool changes only.
//
// Note that each line ends with \n this is Geek Speak for newline.
// In other words, it's like hitting the Enter key at the end of a line.
// Notice also that the lines have a ; at the end.
//
// See the bottom of this file for an example of using multiple lines.
//
// Inserted into bottom, top or all files.
string FILE_BEGIN[] = { "", "", "", "" };
string FILE_END[] = { "", "", "", "" };
FILE_BEGIN[ALL] = "(Beginning of every file)\n";
FILE_END[ALL] = "(End of every file)\n";
FILE_BEGIN[BOTTOM] = "(Beginning of every bottom file)\n";
FILE_END[BOTTOM] = "(End of every bottom file)\n";
FILE_BEGIN[TOP] = "(Beginning of every top file)\n";
FILE_END[TOP] = "(End of every top file)\n";
// Inserted into outline files (track milling).
string OUTLINE_BEGIN[] = { "", "", "", "" };
string OUTLINE_BETWEEN[] = { "", "", "", "" };
string OUTLINE_END[] = { "", "", "", "" };
OUTLINE_BEGIN[ALL] = "(Outline Begin)\n";
OUTLINE_BETWEEN[ALL] = "(Between Passes)\n";
OUTLINE_END[ALL] = "(Outline End)\n";
OUTLINE_BEGIN[BOTTOM] = "(Bottom outline Begin)\n";
OUTLINE_BETWEEN[BOTTOM] = "(Bottom between passes)\n";
OUTLINE_END[BOTTOM] = "(Bottom outline End)\n";
OUTLINE_BEGIN[TOP] = "(Top outline Begin)\n";
OUTLINE_BETWEEN[TOP] = "(Top between passes)\n";
OUTLINE_END[TOP] = "(Top outline End)\n";
// Inserted into drill files.
string DRILL_BEGIN[] = { "", "", "", "" };
string DRILL_END[] = { "", "", "", "" };
DRILL_BEGIN[ALL] = "(Beginning of All Drill files)\n";
DRILL_END[ALL] = "(End of all Drill Files)\n";
DRILL_BEGIN[BOTTOM] = "(Bottom Drill Begin)\n";
DRILL_END[BOTTOM] = "(Bottom Drill End)\n";
DRILL_BEGIN[TOP] = "(Top Drill Begin)\n";
DRILL_END[TOP] = "(Top Drill End)\n";
// Inserted into fill files.
string FILL_BEGIN[] = { "", "", "", "" };
string FILL_END[] = { "", "", "", "" };
FILL_BEGIN[ALL] = "(Fill Begin)\n";
FILL_END[ALL] = "(Fill End)\n";
FILL_BEGIN[BOTTOM] = "(Bottom Fill Begin)\n";
FILL_END[BOTTOM] = "(Bottom Fill End)\n";
FILL_BEGIN[TOP] = "(Top Fill Begin)\n";
FILL_END[TOP] = "(Top Fill End)\n";
// Inserted into milling files.
string MILL_BEGIN[] = { "", "", "", "" };
string MILL_END[] = { "", "", "", "" };
MILL_BEGIN[ALL] = "(MILL Begin)\n";
MILL_END[ALL] = "(MILL End)\n";
MILL_BEGIN[BOTTOM] = "(Bottom MILL Begin)\n";
MILL_END[BOTTOM] = "(Bottom MILL End)\n";
MILL_BEGIN[TOP] = "(Top MILL Begin)\n";
MILL_END[TOP] = "(Top MILL End)\n";
// Tool change code.
string TOOL_CHANGE_BEGIN[] = { "", "", "", "" };
string TOOL_CHANGED[] = { "", "", "", "" };
string TOOL_ZERO_BEGIN[] = { "", "", "", "" };
string TOOL_ZERO_END[] = { "", "", "", "" };
string TOOL_CHANGE_END[] = { "", "", "", "" };
TOOL_CHANGE_BEGIN[ALL] = "(Tool Change Begin)\n";
TOOL_CHANGED[ALL] = "(Tool changed)\n";
TOOL_ZERO_BEGIN[ALL] = "(Tool zero begin)\n";
TOOL_ZERO_END[ALL] = "(Tool zero end)\n";
TOOL_CHANGE_END[ALL] = "(Tool Change End)\n";
TOOL_CHANGE_BEGIN[BOTTOM] = "(Bottom Tool Change Begin)\n";
TOOL_CHANGED[BOTTOM] = "(Bottom Tool changed)\n";
TOOL_ZERO_BEGIN[BOTTOM] = "(Bottom Tool zero begin)\n";
TOOL_ZERO_END[BOTTOM] = "(Bottom Tool zero end)\n";
TOOL_CHANGE_END[BOTTOM] = "(Bottom Tool Change End)\n";
TOOL_CHANGE_BEGIN[TOP] = "(Top Tool Change Begin)\n";
TOOL_CHANGED[TOP] = "(Top Tool changed)\n";
TOOL_ZERO_BEGIN[TOP] = "(Top Tool zero begin)\n";
TOOL_ZERO_END[TOP] = "(Top Tool zero end)\n";
TOOL_CHANGE_END[TOP] = "(Top Tool Changed End)\n";
//
// An example of using more than one line of gcode.
// Note that only the last line has a ; at the end.
//
string THIS_ISNT_USED[] = { "", "", "", "" }; // Don't change lines like this
THIS_ISNT_USED[BOTTOM] = "G20\n"
"G90\n"
"G01 Z0\n"
"G00 X0 Y0\n"
"M06 T2 ; 0.060\n"
"G04 P5\n";
/*
* The functions below should make it easier for folks outputing their own code, etc.
*
*/
/*
* Called after the gcode file has been opened.
* Mode can be
* "wt" (write a text file) when the file is first opened.
* "at" (append a text file) if the file is added to.
*
* You might want to check g_side to see which "side" you are working on.
* g_side can be TOP, BOTTOM or MILL.
*
*/
void user_file_opened(string name, string mode)
{
if (USER_GCODE == NO) {
return;
}
// your code here
}
/*
* Just before the gcode file is closed.
*
*/
void user_file_closing()
{
if (USER_GCODE == NO) {
return;
}
// your code here
}
/*
* Just after the gcode file is closed.
* See user_file_opened for information on the mode parameter.
*
*/
void user_file_closed(string name, string mode)
{
if (USER_GCODE == NO) {
return;
}
// your code here
}
/*
* The beginning of the outline of a track.
*
*/
void user_track_begin(real start_x, real start_y, real end_x, real end_y)
{
if (USER_GCODE == NO) {
return;
}
// your code here
}
/*
* An intermediate point on the outline of a track.
*
*/
int user_coord_cnt;
void user_track_continue(real start_x, real start_y, real end_x, real end_y)
{
if (USER_GCODE == NO) {
return;
}
// your code here
}
/*
* The end of the outline of a track.
*
*/
void user_track_end(real start_x, real start_y, real end_x, real end_y)
{
if (USER_GCODE == NO) {
return;
}
// your code here
}
/*
* The beginning of an arc.
*
*/
void user_arc_begin(real start_x, real start_y, real end_x, real end_y)
{
if (USER_GCODE == NO) {
return;
}
// your code here
}
/*
* The end of an arc.
*
*/
void user_arc_end(real start_x, real start_y, real end_x, real end_y)
{
if (USER_GCODE == NO) {
return;
}
// your code here
}