mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2025-01-10 20:00:15 +02:00
sfc/slicer.py: new option -m for model tolerance; correct usage
This commit is contained in:
parent
096b91e93a
commit
ecaffbb1fe
@ -92,8 +92,9 @@ def dump_level(wires, z):
|
|||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
print >>sys.stderr, "usage:", sys.argv[0], \
|
print >>sys.stderr, "usage:", sys.argv[0], \
|
||||||
"[-a (top|bottom)(+|-)offset] [-f] [-h height]" + \
|
"[-a (top|bottom)(+|-)offset] [-f] [-h height]\n" + \
|
||||||
"\t[-b piece_distance] [-o z_offset] [-s max_step] file.stl"
|
"\t[-m tolerance] [-p piece_distance] [-o z_offset] "+ \
|
||||||
|
"[-s max_step] file.stl"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
@ -106,7 +107,7 @@ stdout = os.dup(1)
|
|||||||
os.dup2(2, 1)
|
os.dup2(2, 1)
|
||||||
sys.stdout = os.fdopen(stdout, "w")
|
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:
|
for opt, arg in opts:
|
||||||
if opt == "-a":
|
if opt == "-a":
|
||||||
if arg[0:3] == "top":
|
if arg[0:3] == "top":
|
||||||
@ -115,6 +116,8 @@ for opt, arg in opts:
|
|||||||
align_bottom = float(arg[6:])
|
align_bottom = float(arg[6:])
|
||||||
else:
|
else:
|
||||||
usage()
|
usage()
|
||||||
|
elif opt == "-m":
|
||||||
|
mech_eps = float(arg)
|
||||||
elif opt == "-o":
|
elif opt == "-o":
|
||||||
end = float(arg)
|
end = float(arg)
|
||||||
elif opt == "-f":
|
elif opt == "-f":
|
||||||
|
Loading…
Reference in New Issue
Block a user