mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-23 03:59:00 +02:00
gp2rml/gp2rml.c: new option "-t top" to manually set z_max
This commit is contained in:
parent
efe5f38eb4
commit
d3bccb6bfc
@ -189,6 +189,7 @@ static void usage(const char *name)
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage: %s [-s z_scale] z_clear[mm] xy_speed z_speed [file]\n\n"
|
"usage: %s [-s z_scale] z_clear[mm] xy_speed z_speed [file]\n\n"
|
||||||
" -s z_scale scale Z axis by z_scale (default: 1.0)\n"
|
" -s z_scale scale Z axis by z_scale (default: 1.0)\n"
|
||||||
|
" -t top set the top elevation, in mm (default: auto-detect)\n"
|
||||||
" z_clear clearance above the highest peak, in mm (must be > 0)\n"
|
" z_clear clearance above the highest peak, in mm (must be > 0)\n"
|
||||||
" Unit (\"mm\") can optionally be specified\n"
|
" Unit (\"mm\") can optionally be specified\n"
|
||||||
" xy_speed cutting speed, in mm/s\n"
|
" xy_speed cutting speed, in mm/s\n"
|
||||||
@ -206,13 +207,18 @@ int main(int argc, char *const *argv)
|
|||||||
double p[3];
|
double p[3];
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "s:")) != EOF)
|
while ((c = getopt(argc, argv, "s:t:")) != EOF)
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 's':
|
case 's':
|
||||||
z_scale = strtod(optarg &end);
|
z_scale = strtod(optarg, &end);
|
||||||
if (*end)
|
if (*end)
|
||||||
usage(*argv);
|
usage(*argv);
|
||||||
break;
|
break;
|
||||||
|
case 't':
|
||||||
|
z_max = strtod(optarg, &end);
|
||||||
|
if (*end && !strcmp(end, "mm"))
|
||||||
|
usage(*argv);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage(*argv);
|
usage(*argv);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user