diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2fa80d6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.png + diff --git a/README.md b/README.md index cd33ec4..d6de7db 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # fondlecube +![](./fondlecube.gif) + A housing for an Aqara "magic cube" that makes it look like a companion cube that uses some M6 fasteners to bolt it together. Quickly hacked out by taking a companion cube stl and butchering it. diff --git a/fondlecube.gif b/fondlecube.gif new file mode 100644 index 0000000..66ce9c1 Binary files /dev/null and b/fondlecube.gif differ diff --git a/fondlecube.scad b/fondlecube.scad index 204feaa..eb6d325 100644 --- a/fondlecube.scad +++ b/fondlecube.scad @@ -1,4 +1,4 @@ -$fn = 120; +$fn = 30; fondleCubeDims = [45,45,45]; companionCubeDims = [100,100,100]; @@ -17,36 +17,40 @@ module companionCube(){ } module body(){ - difference(){ - companionCube(); - mirrorCopy([1,0,0],[0,0,1],[0,1,0]){ - translate([35,-35.5,35]) - rotate([90,0,0]) - metricCapheadAndBolt(6, 20, chamfer=false,recessCap=1); - // bolt finger holes - hull(){ - translate([35,-22,35]) - rotate([90,0,0])cylinder(h=1,d=15, center=true); - translate([35,0,35]) - rotate([90,0,0])cylinder(h=1,d=15, center=true); - translate([0,-22,0]) - rotate([90,0,0])cylinder(h=1,d=15, center=true); - translate([0,0,0]) - rotate([90,0,0])cylinder(h=1,d=15, center=true); + render(){ + union(){ + difference(){ + companionCube(); + mirrorCopy([1,0,0],[0,0,1],[0,1,0]){ + translate([35,-35.5,35]) + rotate([90,0,0]) + metricCapheadAndBolt(6, 20, chamfer=false,recessCap=1); + // bolt finger holes + hull(){ + translate([35,-22,35]) + rotate([90,0,0])cylinder(h=1,d=15, center=true); + translate([35,0,35]) + rotate([90,0,0])cylinder(h=1,d=15, center=true); + translate([0,-22,0]) + rotate([90,0,0])cylinder(h=1,d=15, center=true); + translate([0,0,0]) + rotate([90,0,0])cylinder(h=1,d=15, center=true); + } + } } + + // Heart-removers + rotate([0,0,0]) + mirrorCopy([0,0,1]) + translate([0,0,46.337-2])cylinder(h=5,d=30, center=true); + rotate([90,0,0]) + mirrorCopy([0,0,1]) + translate([0,0,46.337-2])cylinder(h=5,d=30, center=true); + rotate([0,90,0]) + mirrorCopy([0,0,1]) + translate([0,0,46.337-2])cylinder(h=5,d=30, center=true); } } - - // Heart-removers - rotate([0,0,0]) - mirrorCopy([0,0,1]) - translate([0,0,46.337-2])cylinder(h=5,d=30, center=true); - rotate([90,0,0]) - mirrorCopy([0,0,1]) - translate([0,0,46.337-2])cylinder(h=5,d=30, center=true); - rotate([0,90,0]) - mirrorCopy([0,0,1]) - translate([0,0,46.337-2])cylinder(h=5,d=30, center=true); } @@ -85,8 +89,20 @@ module rear(){ body(); rearSlice(); } -} +} +y=($t*2); +u=y>1?1-(y-1):y; + +echo("t=", str($t), "y=",str(y), "u=", str(u)); + + +render()rotate([0,0,360*$t]){ + center(); + translate([0,-50*u,0])front(); + translate([0,+50*u,0])rear(); +} +/* if(!$preview){ center(); translate([0,-50,0])front();