Add params for flextest pattern
This commit is contained in:
parent
83c76f6fc7
commit
0a4c90e113
1
TODO.txt
1
TODO.txt
|
@ -6,7 +6,6 @@
|
|||
* Make settings nicer
|
||||
* offer a collection of different settings
|
||||
* Make bolts configurable (e.g. box2.py)
|
||||
* Make flextest.py pattern configurable
|
||||
* setup.py
|
||||
* Use other formatter (see mx param)
|
||||
* Fix error message on parsing error in web interface
|
||||
|
|
15
flextest.py
15
flextest.py
|
@ -17,16 +17,27 @@
|
|||
from boxes import *
|
||||
|
||||
class FlexTest(Boxes):
|
||||
"Piece for testing different flex settings"
|
||||
def __init__(self):
|
||||
Boxes.__init__(self)
|
||||
self.buildArgParser("x", "y")
|
||||
self.argparser.add_argument(
|
||||
"--fd", action="store", type=float, default=0.5,
|
||||
help="distance of flex cuts in multiples of thickness")
|
||||
self.argparser.add_argument(
|
||||
"--fc", action="store", type=float, default=1.0,
|
||||
help="connections of flex cuts in multiples of thickness")
|
||||
self.argparser.add_argument(
|
||||
"--fw", action="store", type=float, default=5.0,
|
||||
help="width of flex cuts in multiples of thickness")
|
||||
|
||||
def render(self):
|
||||
x, y = self.x, self.y
|
||||
self.open(x+60, y+20)
|
||||
|
||||
# (1.5, 3.0, 15.0) # line distance, connects, width
|
||||
self.flexSettings = (2, 4.0, 16.0)
|
||||
self.edges["X"].settings.setValues(
|
||||
self.thickness, relative=True,
|
||||
distance=self.fd, connection=self.fc, width=self.fw)
|
||||
|
||||
self.moveTo(5, 5)
|
||||
self.edge(10)
|
||||
|
|
Loading…
Reference in New Issue