ribbon simple
This commit is contained in:
parent
b0dc60fec0
commit
876f4b98c9
|
@ -0,0 +1,24 @@
|
||||||
|
from __future__ import division, print_function
|
||||||
|
|
||||||
|
import axi
|
||||||
|
import math
|
||||||
|
import random
|
||||||
|
import sys
|
||||||
|
|
||||||
|
BOUNDS = axi.A3_BOUNDS
|
||||||
|
|
||||||
|
def main():
|
||||||
|
d = axi.Drawing.load(sys.argv[1]).scale(1, -1)
|
||||||
|
print(len(d.paths))
|
||||||
|
d = d.join_paths(0.01)
|
||||||
|
d = d.rotate_and_scale_to_fit(*BOUNDS[-2:])
|
||||||
|
d = d.sort_paths()
|
||||||
|
d = d.join_paths(0.01)
|
||||||
|
d = d.simplify_paths(0.001)
|
||||||
|
print(len(d.paths))
|
||||||
|
print(d.bounds)
|
||||||
|
d.dump('out.axi')
|
||||||
|
d.render(bounds=BOUNDS).write_to_png('out.png')
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
Loading…
Reference in New Issue