sfc/slicer.py: new option -m for model tolerance; correct usage

This commit is contained in:
Werner Almesberger 2015-05-22 10:00:16 -03:00
parent 096b91e93a
commit ecaffbb1fe
1 changed files with 6 additions and 3 deletions

View File

@ -92,8 +92,9 @@ def dump_level(wires, z):
def usage():
print >>sys.stderr, "usage:", sys.argv[0], \
"[-a (top|bottom)(+|-)offset] [-f] [-h height]" + \
"\t[-b piece_distance] [-o z_offset] [-s max_step] file.stl"
"[-a (top|bottom)(+|-)offset] [-f] [-h height]\n" + \
"\t[-m tolerance] [-p piece_distance] [-o z_offset] "+ \
"[-s max_step] file.stl"
sys.exit(1)
@ -106,7 +107,7 @@ stdout = os.dup(1)
os.dup2(2, 1)
sys.stdout = os.fdopen(stdout, "w")
opts, args = getopt.getopt(sys.argv[1:], "a:e:fh:o:p:s:")
opts, args = getopt.getopt(sys.argv[1:], "a:e:fh:m:o:p:s:")
for opt, arg in opts:
if opt == "-a":
if arg[0:3] == "top":
@ -115,6 +116,8 @@ for opt, arg in opts:
align_bottom = float(arg[6:])
else:
usage()
elif opt == "-m":
mech_eps = float(arg)
elif opt == "-o":
end = float(arg)
elif opt == "-f":