fondlecube/fondlecube.scad

113 lines
2.8 KiB
OpenSCAD
Raw Normal View History

2024-06-20 02:31:34 +00:00
$fn = 30;
2024-06-20 02:01:12 +00:00
fondleCubeDims = [45,45,45];
companionCubeDims = [100,100,100];
use <lib/mirrorcopy.scad>
use <lib/metric_bolts.scad>
//cube(fondleCubeDims,center=true);
//#cube(companionCubeDims, center=true);
module companionCube(){
scale([10,10,10])
scale([1/2.54,1/2.54,1/2.54])
translate([-25.4/2,-25.4/2,-25.4/2])
2024-06-20 02:02:11 +00:00
import("original_sources/Weighted_Companion_Cube.stl");
2024-06-20 02:01:12 +00:00
}
module body(){
2024-06-20 02:31:34 +00:00
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);
}
}
2024-06-20 02:01:12 +00:00
}
2024-06-20 02:31:34 +00:00
// 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);
2024-06-20 02:01:12 +00:00
}
}
}
module centerSlice(){
cube([100,75,110], center=true);
}
module frontSlice(){
cube([100,75,110], center=true);
translate([0,75,0])cube([100,75,110], center=true);
}
module rearSlice(){
cube([100,75,110], center=true);
translate([0,-75,0])cube([100,75,110], center=true);
}
// center part
module center(){
intersection(){
difference(){
body();
cube(fondleCubeDims + [0,500,0], center=true);
}
centerSlice();
}
}
module front(){
difference(){
body();
frontSlice();
}
}
module rear(){
difference(){
body();
rearSlice();
}
2024-06-20 02:31:34 +00:00
}
y=($t*2);
u=y>1?1-(y-1):y;
echo("t=", str($t), "y=",str(y), "u=", str(u));
2024-06-20 02:01:12 +00:00
2024-06-20 02:31:34 +00:00
render()rotate([0,0,360*$t]){
center();
translate([0,-50*u,0])front();
translate([0,+50*u,0])rear();
}
/*
2024-06-20 02:01:12 +00:00
if(!$preview){
center();
translate([0,-50,0])front();
translate([0,+50,0])rear();
}else{
#body();
2024-06-20 02:02:11 +00:00
}/**/