Move all Slatwall generators to new WallEdges infrastructure

Add "plain" and "plain reenforced" wall styles with straight back
This commit is contained in:
Florian Festi 2022-02-20 21:18:28 +01:00
parent 362dd54e09
commit 7d7e0a5c9f
24 changed files with 71 additions and 167 deletions

View File

@ -33,7 +33,7 @@ ui_groups = [
UIGroup("FlexBox", "Boxes with flex", image="RoundedBox"),
UIGroup("Tray", "Trays and Drawer Inserts", image="TypeTray"),
UIGroup("Shelf", "Shelves", image="DisplayShelf"),
UIGroup("SlatWall", image="SlatwallTypeTray"),
UIGroup("WallMounted", image="WallTypeTray"),
UIGroup("Holes", "Hole patterns", image=""),
UIGroup("Part", "Parts and Samples", image="BurnTest"),
UIGroup("Misc", image="TrafficLight"),

View File

@ -15,17 +15,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from boxes import *
from boxes.walledges import WallMountedBox
class SlatwallCaliper(Boxes):
"""Holds a single caliper to a slat wall"""
ui_group = "SlatWall"
class WallCaliper(WallMountedBox):
"""Holds a single caliper to a wall"""
def __init__(self):
Boxes.__init__(self)
self.addSettingsArgs(edges.FingerJointSettings)
self.addSettingsArgs(edges.SlatWallSettings)
super().__init__()
# remove cli params you do not need
self.buildArgParser(h=100)
@ -56,11 +52,7 @@ class SlatwallCaliper(Boxes):
self.move(tw, h, move)
def render(self):
# Add slat wall edges
s = edges.SlatWallSettings(self.thickness, True,
**self.edgesettings.get("SlatWall", {}))
s.edgeObjects(self)
self.slatWallHolesAt = edges.SlatWallHoles(self, s)
self.generateWallEdges()
t = self.thickness
h = self.h
@ -70,4 +62,4 @@ class SlatwallCaliper(Boxes):
w = self.width
self.flangedWall(w, h, flanges=[0, 2*t, 0, 2*t], edges="eeee",
r=2*t,
callback=[lambda:(self.slatWallHolesAt(1.5*t, 0, h, 90), self.slatWallHolesAt(w+2.5*t, 0, h, 90))])
callback=[lambda:(self.wallHolesAt(1.5*t, 0, h, 90), self.wallHolesAt(w+2.5*t, 0, h, 90))])

View File

@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from boxes import *
from boxes.walledges import WallMountedBox
class FrontEdge(edges.Edge):
@ -32,16 +33,11 @@ class FrontEdge(edges.Edge):
class SlatwallChiselHolder(Boxes):
"""Slat wall tool holder for chisels, files and similar tools"""
ui_group = "SlatWall"
class WallChiselHolder(WallMountedBox):
"""Wall tool holder for chisels, files and similar tools"""
def __init__(self):
Boxes.__init__(self)
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1.0)
self.addSettingsArgs(edges.SlatWallSettings)
super().__init__()
self.buildArgParser(h=120)
@ -92,12 +88,12 @@ class SlatwallChiselHolder(Boxes):
t = self.thickness
d = min(2*t, (wt-rt)/4.)
self.slatWallHolesAt(d, 0, self.h, 90)
self.slatWallHolesAt(n*wt-d, 0, self.h, 90)
self.wallHolesAt(d, 0, self.h, 90)
self.wallHolesAt(n*wt-d, 0, self.h, 90)
for i in range(1, n):
if self.brace(i):
self.slatWallHolesAt(i*wt, 0, self.h, 90)
self.wallHolesAt(i*wt, 0, self.h, 90)
def topCB(self):
n = self.number
@ -115,12 +111,7 @@ class SlatwallChiselHolder(Boxes):
self.fingerHolesAt(i*wt, 0, l, 90)
def render(self):
# Add slat wall edges
s = edges.SlatWallSettings(self.thickness, True,
**self.edgesettings.get("SlatWall", {}))
s.edgeObjects(self)
self.slatWallHolesAt = edges.SlatWallHoles(self, s)
self.generateWallEdges()
t = self.thickness
wt = self.tooldiameter

View File

@ -15,17 +15,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from boxes import *
from boxes.walledges import WallMountedBox
class SlatwallConsole(Boxes):
class WallConsole(WallMountedBox):
"""Outset and angled plate to mount stuff to"""
ui_group = "SlatWall"
def __init__(self):
Boxes.__init__(self)
self.addSettingsArgs(edges.FingerJointSettings)
self.addSettingsArgs(edges.SlatWallSettings)
super().__init__()
self.buildArgParser(sx=100, h=100, outside=True)
@ -40,7 +36,7 @@ class SlatwallConsole(Boxes):
posx = -0.5 * self.thickness
for x in self.sx[:-1]:
posx += x + self.thickness
self.slatWallHolesAt(posx, 0, self.h, 90)
self.wallHolesAt(posx, 0, self.h, 90)
def frontHoles(self):
posx = -0.5 * self.thickness
@ -49,12 +45,8 @@ class SlatwallConsole(Boxes):
self.fingerHolesAt(posx, 0, self.front, 90)
def render(self):
# Add slat wall edges
s = edges.SlatWallSettings(self.thickness, True,
**self.edgesettings.get("SlatWall", {}))
s.edgeObjects(self)
self.slatWallHolesAt = edges.SlatWallHoles(self, s)
self.generateWallEdges()
if self.outside:
self.sx = self.adjustSize(self.sx)

View File

@ -16,17 +16,13 @@
from boxes import *
from .drillstand import DrillStand
from boxes.walledges import WallMountedBox
class SlatwallDrillBox(DrillStand):
class WallDrillBox(WallMountedBox, DrillStand):
"""Box for drills with each compartment with a different height"""
ui_group = "SlatWall"
def __init__(self):
Boxes.__init__(self)
self.addSettingsArgs(edges.FingerJointSettings)
self.addSettingsArgs(edges.SlatWallSettings)
super().__init__()
self.buildArgParser(sx="25*6", sy="10:20:30", sh="25:40:60")
self.argparser.add_argument(
@ -34,11 +30,7 @@ class SlatwallDrillBox(DrillStand):
help="height difference left to right")
def render(self):
# Add slat wall edges
s = edges.SlatWallSettings(self.thickness, True,
**self.edgesettings.get("SlatWall", {}))
s.edgeObjects(self)
self.slatWallHolesAt = edges.SlatWallHoles(self, s)
self.generateWallEdges()
t = self.thickness
sx, sy, sh = self.sx, self.sy, self.sh

View File

@ -15,32 +15,23 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from boxes import *
from boxes import walledges
from boxes.walledges import WallMountedBox
class SlatwallEdges(Boxes):
"""Shows the different edge types for slat walls"""
ui_group = "SlatWall" # see ./__init__.py for names
class WallEdges(WallMountedBox):
"""Shows the different edge types for wall systems"""
def __init__(self):
Boxes.__init__(self)
self.addSettingsArgs(edges.FingerJointSettings)
self.addSettingsArgs(walledges.SlatWallSettings)
super().__init__()
self.buildArgParser(h=120)
def render(self):
s = walledges.SlatWallSettings(self.thickness, True,
**self.edgesettings.get("SlatWall", {}))
s.edgeObjects(self)
self.wallHolesAt = self.edges["|"]
self.generateWallEdges()
h = self.h
for i, c in enumerate("aAbBcCdD"):
self.text(c, x=i*30+15, y=5)
self.text("slatWallHolesAt", 115, 15)
self.text("wallHolesAt", 115, 15)
self.moveTo(0, 25)
self.rectangularWall(40, h, "eAea", move="right")
self.rectangularWall(40, h, "eBeb", move="right")

View File

@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from boxes import *
from boxes.walledges import WallMountedBox
class PinEdge(edges.BaseEdge):
def __call__(self, length, **kw):
@ -36,16 +37,11 @@ class PinEdge(edges.BaseEdge):
def margin(self):
return self.settings.thickness+self.settings.pinlength
class SlatwallPinRow(Boxes):
class WallPinRow(WallMountedBox):
"""Outset and angled plate to mount stuff to"""
ui_group = "SlatWall"
def __init__(self):
Boxes.__init__(self)
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.0)
self.addSettingsArgs(edges.SlatWallSettings)
super().__init__()
self.argparser.add_argument(
"--pins", action="store", type=int, default=8,
@ -68,7 +64,7 @@ class SlatwallPinRow(Boxes):
self.argparser.add_argument(
"--hooks", action="store", type=int, default=3,
help="number of hooks into the slatwall")
help="number of hooks into the wall")
self.argparser.add_argument(
"--h", action="store", type=float, default=50.0,
help="height of the front plate (in mm) - needs to be at least 7 time the thickness")
@ -158,11 +154,7 @@ class SlatwallPinRow(Boxes):
def render(self):
# Add slat wall edges
s = edges.SlatWallSettings(self.thickness, True,
**self.edgesettings.get("SlatWall", {}))
s.edgeObjects(self)
self.slatWallHolesAt = edges.SlatWallHoles(self, s)
self.generateWallEdges()
p = PinEdge(self, self)
n = self.pins

View File

@ -15,17 +15,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from boxes import *
from boxes.walledges import WallMountedBox
class SlatwallPlaneHolder(Boxes):
"""Hold a plane to a slatwall"""
ui_group = "SlatWall"
class WallPlaneHolder(WallMountedBox):
"""Hold a plane to a wall"""
def __init__(self):
Boxes.__init__(self)
self.addSettingsArgs(edges.FingerJointSettings)
self.addSettingsArgs(edges.SlatWallSettings)
super().__init__()
self.argparser.add_argument(
"--width", action="store", type=float, default=80,
@ -50,11 +46,7 @@ class SlatwallPlaneHolder(Boxes):
self.fingerHolesAt(2*t, 1.5*t, h+2*t, 0)
def render(self):
# Add slat wall edges
s = edges.SlatWallSettings(self.thickness, True,
**self.edgesettings.get("SlatWall", {}))
s.edgeObjects(self)
self.slatWallHolesAt = edges.SlatWallHoles(self, s)
self.generateWallEdges()
l, w, h = self.length, self.width, self.height
t = self.thickness

View File

@ -15,17 +15,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from boxes import *
from boxes.walledges import WallMountedBox
class SlatwallPliersHolder(Boxes):
class WallPliersHolder(WallMountedBox):
"""Bar to hang pliers on"""
ui_group = "SlatWall"
def __init__(self):
Boxes.__init__(self)
super().__init__()
self.addSettingsArgs(edges.FingerJointSettings)
self.buildArgParser(sx="100*3", y=50, h=50, outside=True)
self.argparser.add_argument(
@ -71,17 +68,14 @@ class SlatwallPliersHolder(Boxes):
posx = -t
for dx in self.sx[:-1]:
posx += dx + t
self.slatWallHolesAt(posx, 0, self.h_t, 90)
self.wallHolesAt(posx, 0, self.h_t, 90)
def render(self):
self.generateWallEdges()
if self.outside:
self.sx = self.adjustSize(self.sx)
s = edges.SlatWallSettings(self.thickness)
s.edgeObjects(self)
self.slatWallHolesAt = edges.SlatWallHoles(self, s)
sx, y, h = self.sx, self.y, self.h
t = self.thickness

View File

@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from boxes import *
from boxes.walledges import WallMountedBox
class FrontEdge(edges.Edge):
@ -29,16 +30,11 @@ class FrontEdge(edges.Edge):
self.polyline(w, (90, r1), ds-r1-r2, (-90, r2), ws-2*r2,
(-90, r2), ds-r1-r2, (90, r1), w)
class SlatwallSlottedHolder(Boxes):
"""Slat wall tool holder with slots"""
ui_group = "SlatWall"
class WallSlottedHolder(WallMountedBox):
"""Wall tool holder with slots"""
def __init__(self):
Boxes.__init__(self)
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1.0)
self.addSettingsArgs(edges.SlatWallSettings)
super().__init__()
self.buildArgParser(h=120)
@ -92,12 +88,12 @@ class SlatwallSlottedHolder(Boxes):
t = self.thickness
d = min(2*t, (wt-ws)/4.)
self.slatWallHolesAt(d, 0, self.h, 90)
self.slatWallHolesAt(n*wt-d, 0, self.h, 90)
self.wallHolesAt(d, 0, self.h, 90)
self.wallHolesAt(n*wt-d, 0, self.h, 90)
for i in range(1, n):
if self.brace(i):
self.slatWallHolesAt(i*wt, 0, self.h, 90)
self.wallHolesAt(i*wt, 0, self.h, 90)
def topCB(self):
n = self.number
@ -115,12 +111,7 @@ class SlatwallSlottedHolder(Boxes):
self.fingerHolesAt(i*wt, 0, l, 90)
def render(self):
# Add slat wall edges
s = edges.SlatWallSettings(self.thickness, True,
**self.edgesettings.get("SlatWall", {}))
s.edgeObjects(self)
self.slatWallHolesAt = edges.SlatWallHoles(self, s)
self.generateWallEdges()
t = self.thickness
l1, l2 = self.additional_depth, self.slot_depth

View File

@ -15,21 +15,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from boxes import *
from boxes.walledges import WallMountedBox
class SlatwallStairs(Boxes):
class WallStairs(WallMountedBox):
"""Platforms in different heights e.g. for screw drivers"""
description = """You are supposed to add holes or slots to the stair tops yourself using Inkscape or another vector drawing or CAD program.
sh gives height of the stairs from front to back. Note that the overall width and height is bigger than the nominal values as walls and the protrusions are not included in the measurements.
"""
ui_group = "SlatWall"
def __init__(self):
Boxes.__init__(self)
self.addSettingsArgs(edges.FingerJointSettings)
self.addSettingsArgs(edges.SlatWallSettings)
super().__init__()
self.buildArgParser(sx="250/3", sy="40*3", sh="30:100:180")
self.argparser.add_argument(
@ -67,11 +63,7 @@ sh gives height of the stairs from front to back. Note that the overall width an
def render(self):
# Add slat wall edges
s = edges.SlatWallSettings(self.thickness, True,
**self.edgesettings.get("SlatWall", {}))
s.edgeObjects(self)
self.slatWallHolesAt = edges.SlatWallHoles(self, s)
self.generateWallEdges()
self.extra_height = 20
t = self.thickness

View File

@ -16,17 +16,14 @@
from boxes import *
from boxes.lids import _TopEdge
from boxes.walledges import WallMountedBox
class SlatwallTypeTray(_TopEdge):
class WallTypeTray(WallMountedBox, _TopEdge):
"""Type tray - allows only continuous walls"""
ui_group = "SlatWall"
def __init__(self):
Boxes.__init__(self)
self.addSettingsArgs(edges.FingerJointSettings)
super().__init__()
self.addSettingsArgs(edges.StackableSettings)
self.addSettingsArgs(edges.SlatWallSettings)
self.buildArgParser("sx", "sy", "h", "hi", "outside", "bottom_edge")
self.argparser.add_argument(
"--back_height", action="store", type=float, default=0.0,
@ -68,12 +65,7 @@ class SlatwallTypeTray(_TopEdge):
def render(self):
# Add slat wall edges
s = edges.SlatWallSettings(self.thickness, True,
**self.edgesettings.get("SlatWall", {}))
s.edgeObjects(self)
self.slatWallHolesAt = edges.SlatWallHoles(self, s)
self.generateWallEdges()
b = self.bottom_edge
if self.outside:

View File

@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from boxes import *
from boxes.walledges import WallMountedBox
class SlottedEdge(edges.Edge):
@ -41,16 +42,12 @@ class SlottedEdge(edges.Edge):
self.polyline(0, -45)
self.edge(length-l)
class SlatwallWrenchHolder(Boxes):
"""Hold a set of wrenches at a slat wall"""
class WallWrenchHolder(WallMountedBox):
"""Hold a set of wrenches at a wall"""
ui_group = "SlatWall"
def __init__(self):
Boxes.__init__(self)
self.addSettingsArgs(edges.FingerJointSettings)
self.addSettingsArgs(edges.SlatWallSettings)
super().__init__()
# remove cli params you do not need
self.buildArgParser(x=100)
@ -79,11 +76,7 @@ class SlatwallWrenchHolder(Boxes):
def render(self):
# Add slat wall edges
s = edges.SlatWallSettings(self.thickness, True,
**self.edgesettings.get("SlatWall", {}))
s.edgeObjects(self)
self.slatWallHolesAt = edges.SlatWallHoles(self, s)
self.generateWallEdges()
h = ((self.min_strength + self.max_strength) * self.number * 2**0.5
+ self.extra_distance * (self.number - 1)

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 966 KiB

After

Width:  |  Height:  |  Size: 966 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 733 KiB

After

Width:  |  Height:  |  Size: 733 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 983 KiB

After

Width:  |  Height:  |  Size: 983 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 710 KiB

After

Width:  |  Height:  |  Size: 710 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 587 KiB

After

Width:  |  Height:  |  Size: 587 KiB

View File

@ -63,11 +63,6 @@ db81bb75c30252359493e48d968268d15d28586a0cf9db125e2ccc44a8e846c6 ../static/samp
261531111eb52c5e32bcb989d74933e3177050d11361db3fbfad8193584d6980 ../static/samples/PhoneHolder.jpg
ee66b1bd13c0d6b57cd796e33c1e69d53432beeda8105f8b1d7b34f2c180a8b4 ../static/samples/BurnTest.jpg
63881837da3b7e59a4b4e72574d03a3350ec719c3fcffd6f786c8f0e02212946 ../static/samples/CoffeeCapsuleHolder.jpg
3735a8b49edf905d11384ee50b49a543245bf21c1640672887208cdee8dae393 ../static/samples/SlatwallSlottedHolder.jpg
b843c04a6ec530afaf40c664479c6f1eeadc9d48f1ff7ca99bea3575da733144 ../static/samples/SlatwallDrillBox.jpg
42aee460ccffbd7487f748e917f9083fb768a7e2b5f3012f57f8f55c20425ea6 ../static/samples/SlatwallPliersHolder.jpg
4fc47992ce325ec7418ce8d23d6daaeeb273f5e7bf20b7bf675617ee900ebf81 ../static/samples/SlatwallCaliper.jpg
8083dbf31bc17ad19823be48ead7bfc45b03c024ead9b598c08bf390ea193ccd ../static/samples/SlatwallTypeTray.jpg
7ad90b16ee3c976171f5445bb4dd2cedb8652dbdc9f03e8e73040371cca76a97 ../static/samples/Platonic.jpg
003d6a7fc0dd1f3179900dc45c77f943064ed0a1177d8c56947ca6d0d4dc6a2b ../static/samples/DoubleFlexDoorBox.jpg
cc3bcb52886cd96614c5064554f573826ebba8c14468553cd9778e774ca0778b ../static/samples/AngledCutJig.jpg
@ -92,3 +87,8 @@ b7b0f7f6de158ffa8a9480f3785f4c1e43adef9aeb888e45247701d39ffd5f0a ../static/samp
eb4ae243297daf6d21bbfd82414d65f24940f71f1739d5945d461a5e8e0f365f ../static/samples/Silverware.jpg
435d0be38c2b0f3acf39417213d2d19143cff920139c09ce20fabb8bc091e0bd ../static/samples/AllEdges.jpg
1125e013dd4bc226cd7730c29b22d949cbb084b163f0c5e045d3f3ee8cc51cdf ../static/samples/JointPanel.jpg
4fc47992ce325ec7418ce8d23d6daaeeb273f5e7bf20b7bf675617ee900ebf81 ../static/samples/WallCaliper.jpg
b843c04a6ec530afaf40c664479c6f1eeadc9d48f1ff7ca99bea3575da733144 ../static/samples/WallDrillBox.jpg
8083dbf31bc17ad19823be48ead7bfc45b03c024ead9b598c08bf390ea193ccd ../static/samples/WallTypeTray.jpg
3735a8b49edf905d11384ee50b49a543245bf21c1640672887208cdee8dae393 ../static/samples/WallSlottedHolder.jpg
42aee460ccffbd7487f748e917f9083fb768a7e2b5f3012f57f8f55c20425ea6 ../static/samples/WallPliersHolder.jpg