[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (9eede495c51ccf920224a5d93cdac763726921b4)
The branch, master has been updated
via 9eede495c51ccf920224a5d93cdac763726921b4 (commit)
via 530710fc2c8e75e9c9b0a45cf16d13abda760987 (commit)
via d400c61139d3b729103f18ada67e1b39c6931249 (commit)
via db3ee42f204c0d8b711ac72f4c3dff16b01827ad (commit)
from f60343f00fa3bccb0c212409e64dbaef96801d53 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gcode/gcode.c | 47 ++++++++++++++++++++++++++++++-----------------
1 files changed, 30 insertions(+), 17 deletions(-)
=================
Commit Messages
=================
commit 9eede495c51ccf920224a5d93cdac763726921b4
Author: Markus Hitter <mah@xxxxxxxxxxx>
Commit: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
HID-gcode: use drill cycles only for advanced G-code.
Not all machine controllers understand drill cycles, so a more common
denominatior is needed. Gladly, almost all the code was there in comments
already.
Affects-bug: lp-699497
:100644 100644 17b8b1f... d9f2ec1... M src/hid/gcode/gcode.c
commit 530710fc2c8e75e9c9b0a45cf16d13abda760987
Author: Markus Hitter <mah@xxxxxxxxxxx>
Commit: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
HID-gcode: simplify code a bit.
This is mostly for additional code coming soon.
Affects-bug: lp-699497
:100644 100644 6b45f66... 17b8b1f... M src/hid/gcode/gcode.c
commit d400c61139d3b729103f18ada67e1b39c6931249
Author: Markus Hitter <mah@xxxxxxxxxxx>
Commit: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
HID-gcode: add a comment about the tool diameter into the G-code file.
Affects-bug: lp-699497
:100644 100644 e45b21c... 6b45f66... M src/hid/gcode/gcode.c
commit db3ee42f204c0d8b711ac72f4c3dff16b01827ad
Author: Markus Hitter <mah@xxxxxxxxxxx>
Commit: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
HID-gcode: switch from tool-radius to tool-diameter in the user interface.
Affects-bug: lp-699497
:100644 100644 740b1ca... e45b21c... M src/hid/gcode/gcode.c
=========
Changes
=========
commit 9eede495c51ccf920224a5d93cdac763726921b4
Author: Markus Hitter <mah@xxxxxxxxxxx>
Commit: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
HID-gcode: use drill cycles only for advanced G-code.
Not all machine controllers understand drill cycles, so a more common
denominatior is needed. Gladly, almost all the code was there in comments
already.
Affects-bug: lp-699497
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index 17b8b1f..d9f2ec1 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -176,7 +176,7 @@ HID_Attribute gcode_attribute_list[] = {
#define HA_unit 6
{"advanced-gcode", "wether to produce G-code for advanced interpreters,\n"
- "like using variables for often used values. Not all\n"
+ "like using variables or drill cycles. Not all\n"
"machine controllers understand this, but it allows\n"
"better hand-editing of the resulting files",
HID_Boolean, 0, 0, {-1, 0, 0}, 0, 0},
@@ -633,7 +633,7 @@ gcode_do_export (HID_Attr_Val * options)
fprintf (gcode_f2, "G17\nG%d\nG90\nG64 P0.003\nM3 S3000\nM7\nF%d\n",
metric ? 21 : 20, metric ? 25 : 1);
}
-/* fprintf(gcode_f2,"G0 Z%s\n",variable_safeZ); */
+ fprintf (gcode_f2, "G0 Z%s\n", variable_safeZ);
for (r = 0; r < n_drill; r++)
{
double drillX, drillY;
@@ -648,11 +648,15 @@ gcode_do_export (HID_Attr_Val * options)
drillX = drill[r].x;
drillY = drill[r].y;
}
-/* fprintf(gcode_f2,"G0 X%f Y%f\n",drillX,drillY); */
- fprintf (gcode_f2, "G81 X%f Y%f Z%s R%s\n",
- drillX, drillY, variable_drilldepth, variable_safeZ);
-/* fprintf(gcode_f2,"G1 Z%s\n",variable_depth); */
-/* fprintf(gcode_f2,"G0 Z%s\n",variable_safeZ); */
+ if (gcode_advanced)
+ fprintf (gcode_f2, "G81 X%f Y%f Z%s R%s\n", drillX, drillY,
+ variable_drilldepth, variable_safeZ);
+ else
+ {
+ fprintf (gcode_f2, "G0 X%f Y%f\n", drillX, drillY);
+ fprintf (gcode_f2, "G1 Z%s\n", variable_drilldepth);
+ fprintf (gcode_f2, "G0 Z%s\n", variable_safeZ);
+ }
if (r > 0)
d +=
sqrt ((drill[r].x - drill[r - 1].x) * (drill[r].x -
commit 530710fc2c8e75e9c9b0a45cf16d13abda760987
Author: Markus Hitter <mah@xxxxxxxxxxx>
Commit: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
HID-gcode: simplify code a bit.
This is mostly for additional code coming soon.
Affects-bug: lp-699497
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index 6b45f66..17b8b1f 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -636,16 +636,21 @@ gcode_do_export (HID_Attr_Val * options)
/* fprintf(gcode_f2,"G0 Z%s\n",variable_safeZ); */
for (r = 0; r < n_drill; r++)
{
-/* if(metric) fprintf(gcode_f2,"G0 X%f Y%f\n",drill[r].x*25.4,drill[r].y*25.4); */
-/* else fprintf(gcode_f2,"G0 X%f Y%f\n",drill[r].x,drill[r].y); */
+ double drillX, drillY;
+
if (metric)
- fprintf (gcode_f2, "G81 X%f Y%f Z%s R%s\n",
- drill[r].x * 25.4, drill[r].y * 25.4,
- variable_drilldepth, variable_safeZ);
+ {
+ drillX = drill[r].x * 25.4;
+ drillY = drill[r].y * 25.4;
+ }
else
- fprintf (gcode_f2, "G81 X%f Y%f Z%s R%s\n",
- drill[r].x, drill[r].y,
- variable_drilldepth, variable_safeZ);
+ {
+ drillX = drill[r].x;
+ drillY = drill[r].y;
+ }
+/* fprintf(gcode_f2,"G0 X%f Y%f\n",drillX,drillY); */
+ fprintf (gcode_f2, "G81 X%f Y%f Z%s R%s\n",
+ drillX, drillY, variable_drilldepth, variable_safeZ);
/* fprintf(gcode_f2,"G1 Z%s\n",variable_depth); */
/* fprintf(gcode_f2,"G0 Z%s\n",variable_safeZ); */
if (r > 0)
commit d400c61139d3b729103f18ada67e1b39c6931249
Author: Markus Hitter <mah@xxxxxxxxxxx>
Commit: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
HID-gcode: add a comment about the tool diameter into the G-code file.
Affects-bug: lp-699497
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index e45b21c..6b45f66 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -122,7 +122,7 @@ static int gcode_dpi = -1;
static double gcode_cutdepth = 0; /* milling depth (inch) */
static double gcode_drilldepth = 0; /* drilling depth (inch) */
static double gcode_safeZ = 100; /* safe Z (inch) */
-static double gcode_toolradius = 0; /* tool radius(inch) */
+static double gcode_toolradius = 0; /* tool radius (1/100 mil) */
static char gcode_advanced = 0;
static int save_drill = 0;
static int n_drill = 0;
@@ -543,6 +543,9 @@ gcode_do_export (HID_Attr_Val * options)
fprintf (gcode_f2, "( %s )\n", filename);
fprintf (gcode_f2, "(%d dpi)\n", gcode_dpi);
fprintf (gcode_f2, "(Unit: %s)\n", metric ? "mm" : "inch");
+ fprintf (gcode_f2, "(Tool diameter: %f %s)\n",
+ options[HA_tooldiameter].real_value * scale,
+ metric ? "mm" : "inch");
if (metric)
pcb_fprintf (gcode_f2, "(Board size: %.2mmx%.2mm mm)", PCB->MaxWidth, PCB->MaxHeight);
else
commit db3ee42f204c0d8b711ac72f4c3dff16b01827ad
Author: Markus Hitter <mah@xxxxxxxxxxx>
Commit: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
HID-gcode: switch from tool-radius to tool-diameter in the user interface.
Affects-bug: lp-699497
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index 740b1ca..e45b21c 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -162,9 +162,10 @@ HID_Attribute gcode_attribute_list[] = {
HID_Real, -1000, 10000, {0, 0, 2}, 0, 0},
#define HA_safeZ 3
- {"tool-radius", "Milling tool radius compensation",
- HID_Real, 0, 10000, {0, 0, 0.1}, 0, 0},
-#define HA_toolradius 4
+ {"tool-diameter", "Milling tool diameter, or twice the offset of the\n"
+ "G-code track from the resulting copper track",
+ HID_Real, 0, 10000, {0, 0, 0.2}, 0, 0},
+#define HA_tooldiameter 4
{"drill-depth", "Drilling depth",
HID_Real, -10000, 10000, {0, 0, -2}, 0, 0},
@@ -458,8 +459,8 @@ gcode_do_export (HID_Attr_Val * options)
gcode_drilldepth = options[HA_drilldepth].real_value * scale;
gcode_safeZ = options[HA_safeZ].real_value * scale;
gcode_toolradius = metric
- ? MM_TO_COORD(options[HA_toolradius].real_value * scale)
- : INCH_TO_COORD(options[HA_toolradius].real_value * scale);
+ ? MM_TO_COORD(options[HA_tooldiameter].real_value / 2 * scale)
+ : INCH_TO_COORD(options[HA_tooldiameter].real_value / 2 * scale);
gcode_advanced = options[HA_advanced].int_value;
gcode_choose_groups ();
if (gcode_advanced)
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs