-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Can be a Z-Beam or a U-Beam depending on the orientation of the pieces. With the --flanged_ubeam option, a 4th piece is added for a flange.
- Loading branch information
1 parent
30bee5a
commit 6c55261
Showing
2 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# 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/>. | ||
|
||
from boxes import * | ||
|
||
|
||
class ZBeam(Boxes): | ||
"""Simple Z-Beam (or U-Beam): three pieces joined at right angles""" | ||
|
||
ui_group = "Part" | ||
|
||
def __init__(self) -> None: | ||
Boxes.__init__(self) | ||
self.buildArgParser("x", "y") | ||
self.argparser.add_argument( | ||
"--z", action="store", type=float, default=100.0) | ||
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, "eFee", move="right") | ||
self.rectangularWall(y, h, "efef", move="right") | ||
if self.flanged_ubeam: | ||
self.rectangularWall(y, h, "eFeF", move="right") | ||
self.rectangularWall(z + self.thickness, h, "eeef") | ||
else: | ||
self.rectangularWall(z, h, "eeeF") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.