2016-07-11 23:01:57 +02:00
|
|
|
#!/usr/bin/env python3
|
2014-03-16 18:26:12 +01:00
|
|
|
# Copyright (C) 2013-2014 Florian Festi
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2013-07-01 20:23:56 +02:00
|
|
|
from boxes import *
|
|
|
|
|
2016-08-17 15:07:41 +02:00
|
|
|
|
2013-07-01 20:23:56 +02:00
|
|
|
class FlexTest(Boxes):
|
2016-03-15 21:03:05 +01:00
|
|
|
"Piece for testing different flex settings"
|
2016-08-17 15:07:41 +02:00
|
|
|
|
2017-02-13 17:31:58 +01:00
|
|
|
ui_group = "Part"
|
|
|
|
|
2016-03-03 13:27:22 +01:00
|
|
|
def __init__(self):
|
|
|
|
Boxes.__init__(self)
|
2016-11-01 14:03:07 +01:00
|
|
|
self.addSettingsArgs(edges.FlexSettings)
|
2016-03-03 13:27:22 +01:00
|
|
|
self.buildArgParser("x", "y")
|
2013-07-01 20:23:56 +02:00
|
|
|
|
2016-03-03 13:27:22 +01:00
|
|
|
def render(self):
|
|
|
|
x, y = self.x, self.y
|
2016-06-07 20:20:35 +02:00
|
|
|
self.open()
|
2016-03-03 13:27:22 +01:00
|
|
|
|
2013-07-01 20:23:56 +02:00
|
|
|
self.moveTo(5, 5)
|
|
|
|
self.edge(10)
|
2016-05-20 21:33:22 +02:00
|
|
|
self.edges["X"](x, y)
|
2013-07-01 20:23:56 +02:00
|
|
|
self.edge(10)
|
|
|
|
self.corner(90)
|
|
|
|
self.edge(y)
|
|
|
|
self.corner(90)
|
2016-08-17 15:07:41 +02:00
|
|
|
self.edge(x + 20)
|
2013-07-01 20:23:56 +02:00
|
|
|
self.corner(90)
|
|
|
|
self.edge(y)
|
|
|
|
self.corner(90)
|
|
|
|
|
2014-03-21 21:08:54 +01:00
|
|
|
self.close()
|
2013-07-01 20:23:56 +02:00
|
|
|
|
2016-08-17 15:07:41 +02:00
|
|
|
|