From de40ffb095f2b14fa34b1437da92a4adf87e375f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 12 Feb 2016 00:49:47 +0000 Subject: [PATCH] bike-lipo-box: wip --- bike-lipo-box.scad.m4 | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/bike-lipo-box.scad.m4 b/bike-lipo-box.scad.m4 index 1879221..ba4e387 100644 --- a/bike-lipo-box.scad.m4 +++ b/bike-lipo-box.scad.m4 @@ -56,16 +56,17 @@ module TestWall(){ } } -floorth = 1.5; -ceilth = 1.5; +floorth = 2.5; +ceilth = 2.5; +innertube = 1.0 + 0.2; +lidoverlap = 1.5; +lidoverhang = 4; ts_xbox = 30; ts_ybox = 25; ts_cnrrad = 10; ts_zbox = 15; -ts_innertube = 0.1; - m4_dnl Box_Part($1=transl_x,$2=transl_y, $3=rot_z,$4=mirror_xy) m4_dnl $5=kind, $6=kindargs, $7=profile(profileargsargs)) m4_define(`Box_Part',` @@ -125,7 +126,7 @@ m4_define(`TestSealDoBoxShape',` m4_dnl ' module WallProfile(){ - z = ts_zbox - ts_innertube - wallthick/2; + z = ts_zbox - innertube - wallthick/2; translate([0, -0.1]) square([wallthick, z]); translate([wallthick/2, z]) circle(r = wallthick/2, $fn=20); } @@ -134,6 +135,27 @@ module FloorProfile(){ mirror([0,1]) square([wallthick, floorth]); } +module LidProfile(){ + rad = wallthick/2 + innertube; + morex = wallthick; + difference(){ + translate([-lidoverlap - innertube, + ts_zbox - lidoverhang - innertube]) + square([lidoverlap + innertube + wallthick + morex, + lidoverhang + innertube + ceilth]); + hull(){ + translate([wallthick/2, ts_zbox - innertube - wallthick/2]) + for (t=[ [0,0], + [morex*2, 0], + [0, -ts_zbox] + ]) { + translate(t) + circle(r= wallthick/2 + innertube, $fn=20); + } + } + } +} + module TestSealBox(){ TestSealDoBoxShape(WallProfile();); hull(){ TestSealDoBoxShape(FloorProfile();); } @@ -143,6 +165,7 @@ module ProfileDemos(){ WallProfile(); color("blue") FloorProfile(); + LidProfile(); } //TestWall(); -- 2.30.2