mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-22 17:57:43 +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,
|
||||
"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"
|
||||
" -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"
|
||||
" Unit (\"mm\") can optionally be specified\n"
|
||||
" xy_speed cutting speed, in mm/s\n"
|
||||
@ -206,13 +207,18 @@ int main(int argc, char *const *argv)
|
||||
double p[3];
|
||||
int c;
|
||||
|
||||
while ((c = getopt(argc, argv, "s:")) != EOF)
|
||||
while ((c = getopt(argc, argv, "s:t:")) != EOF)
|
||||
switch (c) {
|
||||
case 's':
|
||||
z_scale = strtod(optarg &end);
|
||||
z_scale = strtod(optarg, &end);
|
||||
if (*end)
|
||||
usage(*argv);
|
||||
break;
|
||||
case 't':
|
||||
z_max = strtod(optarg, &end);
|
||||
if (*end && !strcmp(end, "mm"))
|
||||
usage(*argv);
|
||||
break;
|
||||
default:
|
||||
usage(*argv);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user