2019-06-11 23:11:12 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# Copyright (C) 2013-2016 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/>.
|
|
|
|
|
|
|
|
from boxes import *
|
2022-02-20 01:18:49 +01:00
|
|
|
from boxes import walledges
|
2019-06-11 23:11:12 +02:00
|
|
|
|
|
|
|
class SlatwallEdges(Boxes):
|
|
|
|
"""Shows the different edge types for slat walls"""
|
|
|
|
|
|
|
|
ui_group = "SlatWall" # see ./__init__.py for names
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
Boxes.__init__(self)
|
|
|
|
|
|
|
|
self.addSettingsArgs(edges.FingerJointSettings)
|
2022-02-20 01:18:49 +01:00
|
|
|
self.addSettingsArgs(walledges.SlatWallSettings)
|
2019-06-11 23:11:12 +02:00
|
|
|
self.buildArgParser(h=120)
|
|
|
|
|
|
|
|
def render(self):
|
|
|
|
|
2022-02-20 01:18:49 +01:00
|
|
|
s = walledges.SlatWallSettings(self.thickness, True,
|
|
|
|
**self.edgesettings.get("SlatWall", {}))
|
2019-06-11 23:11:12 +02:00
|
|
|
s.edgeObjects(self)
|
2022-02-20 01:18:49 +01:00
|
|
|
self.wallHolesAt = self.edges["|"]
|
2019-06-11 23:11:12 +02:00
|
|
|
|
|
|
|
h = self.h
|
|
|
|
|
2019-06-21 18:47:29 +02:00
|
|
|
for i, c in enumerate("aAbBcCdD"):
|
2019-06-11 23:11:12 +02:00
|
|
|
self.text(c, x=i*30+15, y=5)
|
|
|
|
self.text("slatWallHolesAt", 115, 15)
|
|
|
|
self.moveTo(0, 25)
|
|
|
|
self.rectangularWall(40, h, "eAea", move="right")
|
|
|
|
self.rectangularWall(40, h, "eBeb", move="right")
|
|
|
|
self.rectangularWall(40, h, "eCec", callback=[
|
2022-02-20 01:18:49 +01:00
|
|
|
lambda: self.wallHolesAt(20, 0, h, 90)], move="right")
|
2019-06-21 18:47:29 +02:00
|
|
|
self.moveTo(10)
|
|
|
|
self.rectangularWall(40, h, "eDed", move="right")
|