First I made method for making lines and it work as follows:
Code: Select all
k = greek(10000,20000,'x')
k.move(-15000)
But the main purpose is to create line in relation to previous line:
Code: Select all
k.move(5000, leftPattern)
And grande finale - in relation to second previous line. Said line will either zigzag or curl AKA will go in the same direction as previous parallel line or reverse AKA line with two previous will create either z or c.
Code: Select all
k.move(5000, zPattern)
k.move(5000, cPattern)
You can also turn right with a negative number and turn left.
Code: Select all
k.move(-5000, rightPattern)
Now you can create complex structures:
Code: Select all
k.teeth( 30000, 2, 7000, 5000, 4000, leftPattern)
Macro is available here. What do you guys think about it? If you like it I'll appreciate every star on Github.
https://github.com/karoldem/FreeCADbox