diff --git a/boxes/generators/zbeam.py b/boxes/generators/zbeam.py
new file mode 100644
index 00000000..cd7cf33a
--- /dev/null
+++ b/boxes/generators/zbeam.py
@@ -0,0 +1,65 @@
+# 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 .
+
+from boxes import *
+
+
+class ZBeam(Boxes):
+ """Z-Beam (or U-Beam): three pieces joined at right angles"""
+ description = """
+With the "flanged_ubeam" option, there is a fourth piece the length of "y".
+![U-Beam with flange](static/samples/ZBeam-flanged-ubeam.jpg)
+"""
+
+ ui_group = "Part"
+
+ def __init__(self) -> None:
+ Boxes.__init__(self)
+ self.argparser.add_argument(
+ "--top_edge", action="store", type=ArgparseEdgeType("Ffe"),
+ choices=list("Ffe"), default="e", help="edge type for top edge")
+ self.argparser.add_argument(
+ "--bottom_edge", action="store", type=ArgparseEdgeType("Ffe"),
+ choices=list("Ffe"), default="e", help="edge type for bottom edge")
+ self.buildArgParser("x", "y")
+ self.argparser.add_argument(
+ "--z", action="store", type=float, default=100.0,
+ help="inner depth in mm")
+ self.argparser.add_argument(
+ "--flanged_ubeam", action="store", type=boolarg, default=False,
+ help="Add a fourth piece to make a U-Beam with a flange")
+ self.buildArgParser("h", "outside")
+ self.addSettingsArgs(edges.FingerJointSettings)
+
+ def render(self):
+ x, y, z, h = self.x, self.y, self.z, self.h
+ t = self.thickness
+
+ if self.outside:
+ x = self.adjustSize(x, False)
+ y = self.adjustSize(y, False)
+ z = self.adjustSize(z, False)
+
+ self.rectangularWall(
+ x, h, self.bottom_edge + "F" + self.top_edge + "e", move="right")
+ self.rectangularWall(
+ y, h, self.bottom_edge + "f" + self.top_edge + "f", move="right")
+ if self.flanged_ubeam:
+ self.rectangularWall(
+ z, h, self.bottom_edge + "F" + self.top_edge + "F", move="right")
+ self.rectangularWall(
+ y + self.thickness, h, self.bottom_edge + "e" + self.top_edge + "f")
+ else:
+ self.rectangularWall(z, h, self.bottom_edge + "e" + self.top_edge + "F")
diff --git a/examples/ZBeam.svg b/examples/ZBeam.svg
new file mode 100644
index 00000000..47d28abf
--- /dev/null
+++ b/examples/ZBeam.svg
@@ -0,0 +1,45 @@
+
+
\ No newline at end of file
diff --git a/static/samples/ZBeam-flanged-ubeam-thumb.jpg b/static/samples/ZBeam-flanged-ubeam-thumb.jpg
new file mode 100644
index 00000000..12f36be8
Binary files /dev/null and b/static/samples/ZBeam-flanged-ubeam-thumb.jpg differ
diff --git a/static/samples/ZBeam-flanged-ubeam.jpg b/static/samples/ZBeam-flanged-ubeam.jpg
new file mode 100644
index 00000000..27eddda9
Binary files /dev/null and b/static/samples/ZBeam-flanged-ubeam.jpg differ
diff --git a/static/samples/ZBeam-thumb.jpg b/static/samples/ZBeam-thumb.jpg
new file mode 100644
index 00000000..f3034f94
Binary files /dev/null and b/static/samples/ZBeam-thumb.jpg differ
diff --git a/static/samples/ZBeam.jpg b/static/samples/ZBeam.jpg
new file mode 100644
index 00000000..dc7b04d5
Binary files /dev/null and b/static/samples/ZBeam.jpg differ
diff --git a/static/samples/samples.sha256 b/static/samples/samples.sha256
index 07d57d89..175e03f7 100644
--- a/static/samples/samples.sha256
+++ b/static/samples/samples.sha256
@@ -191,3 +191,5 @@ fec237bd76c18f1cad18a888f57299e5ff5033ab8032e7a26ea0b1259a42d150 ../static/samp
ca53e3c8b9ba8d46ca2d6fdff24865514dde27380b409fef82f0b87ac0bada2d ../static/samples/HobbyCase.jpg
47910e8cf07e0339437d441b0fe270b05973317462495a7bb122bbcb779b135c ../static/samples/WallHopper.jpg
478769d7f422d0e47d50c7c1476b72a269f9acd03042d2d16dc0c00fa80941f6 ../static/samples/WallStackableBin.jpg
+fe3b0c23e7fb2fa4b2ede51a312794ff1a689e99af9feec7752b8ed87962f3a7 ../static/samples/ZBeam.jpg
+f8b2daab68479c4bdd59ac1da1d2cb31ab567f96bfef111fb1687d65b8233108 ../static/samples/ZBeam-flanged-ubeam.jpg