From 56d26ee2591f509f3f9214c50060b8cfa83d5a48 Mon Sep 17 00:00:00 2001 From: Stephen J Carpenter Date: Tue, 5 Mar 2024 18:48:12 -0500 Subject: [PATCH] Basic Profile Profile is ok; needs refactoring. Alignment needs thought. --- beam.scad | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 beam.scad diff --git a/beam.scad b/beam.scad new file mode 100644 index 0000000..6074fb4 --- /dev/null +++ b/beam.scad @@ -0,0 +1,59 @@ +/* */ + +include +include +include +include + +/* [Box Dimensions] */ +PROFILE_SIDE = 36; + +// Window Thickness +WIN_LIP=10; +WIN_TRIM = 5; +WIN_THICK = 3; + +/* [Render Options] */ +render_fs=.4; +render_fn=0; +render_fa=.4; + +// Set Render Options +$fs= ($preview) ? $fs : render_fs; +$fn= ($preview) ? $fn : render_fn; +$fa= ($preview) ? $fa : render_fa; + +module profile(ps=PROFILE_SIDE, wlip=WIN_LIP, wtrim=WIN_TRIM, wt=WIN_THICK, l=200, align=V_CENTER, orient=ORIENT_Y) { + + pm = ps - 2*wt; + wx = pm - wlip; + lx = wx - wtrim; + pt = sqrt(2) * (ps - lx)/2; + px = ps; + echo("Thickness: ", pt, " mm"); + orient_and_align([ps, l, ps], orig_orient=ORIENT_Y, orient=orient) + difference() { + cuboid([ps,l,ps], align=V_TOP+V_RIGHT); + + right(pm-wlip) down(.1) cuboid([wlip+.1,l+.1,wt], align=V_TOP+V_RIGHT); + up(pm-wlip) left(.1) cuboid([wt,l+.1,wlip+.1], align=V_TOP+V_RIGHT); + color("green")right(px)yrot(45) { + cuboid([128,l+.1,128], align=V_TOP); + down(pt)cuboid([128,l+.1,128], align=V_BOTTOM); + } + // Max + right(pm) cuboid([pm,l+.1,128], align=V_RIGHT); + up(pm) cuboid([128,l+.1,pm], align=V_TOP); + } + +} + +module axis() { + back(200)profile(align=V_FWD); + right(0)profile(orient=ORIENT_Z_90, align=V_RIGHT); + up(200/2)profile(orient=ORIENT_X); +} + +profile(align=V_CENTER); + +//fwd(20)left(20)joiner(h=20, w=8, l=3);