60 lines
1.4 KiB
OpenSCAD
60 lines
1.4 KiB
OpenSCAD
|
|
/* */
|
||
|
|
|
||
|
|
include <BOSL/constants.scad>
|
||
|
|
include <BOSL/shapes.scad>
|
||
|
|
include <BOSL/transforms.scad>
|
||
|
|
include <BOSL/joiners.scad>
|
||
|
|
|
||
|
|
/* [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);
|