1 | #!/usr/bin/python |
---|
2 | import sys |
---|
3 | from subprocess import call |
---|
4 | |
---|
5 | # For a fixup_factor of 100, (leaving in the -J), I'm still getting wireframe stuff. |
---|
6 | # with 1000, it is _much_ better, but there is some extranious noise in the |
---|
7 | # output. 1500 still has a little noise along some edges. 1700 has a few |
---|
8 | # pixels of noise. |
---|
9 | # With 2000, it looks perfect. |
---|
10 | fixup_factor = 2000 |
---|
11 | def main(args): |
---|
12 | sys.stderr.write('called with %r\n' % args) |
---|
13 | for i, arg in enumerate(args): |
---|
14 | if arg.startswith('-ca'): |
---|
15 | args[i] = '-ca%0.1f' % (float(arg[3:]) * fixup_factor) |
---|
16 | elif arg.startswith('-cg'): |
---|
17 | parts = arg.split(',') |
---|
18 | parts[-1] = '%0.1f' % (float(parts[-1]) / fixup_factor) |
---|
19 | args[i] = ','.join(parts) |
---|
20 | sys.stderr.write('changed to %r\n' % args) |
---|
21 | call(['ldglite',] + args) |
---|
22 | |
---|
23 | if __name__ == '__main__': |
---|
24 | main(sys.argv[1:]) |
---|