Created
June 28, 2023 00:55
-
-
Save jcorbin/e4746484aa54e55a4d81d0904d1dc1c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include <BOSL2/std.scad> | |
include <BOSL2/joiners.scad> | |
$eps = 0.01; | |
$fa = 4; | |
$fs = 0.2; | |
tolerance = 0.25; | |
stone_diameter = 380; | |
stone_thick = 13.2; | |
stone_chamfer = 1; | |
stone_chamfang = 70; | |
weight = [ | |
16.4 + 2*tolerance, | |
19.3 + 2*tolerance, | |
3.7 + 2*tolerance | |
]; | |
weight_round = 1; | |
weight_sep = 3; | |
foot_diameter = 12; | |
foot_depth = 3; | |
clip_length = 2 * 7; | |
clip_width = 2 * 7; | |
clip_depth = 3; | |
clip_snap = 0.75; | |
clip_thick = 1.6; | |
clip_compress = 0.2; | |
// TODO mode for generating the corresponding clip | |
// rabbit_clip( | |
// type="double", | |
// length=base_clip_length, | |
// width=base_clip_width, | |
// snap=base_clip_snap, | |
// thickness=base_clip_thick, | |
// depth=base_clip_depth, | |
// compression=base_clip_compress | |
// ); | |
extra = stone_diameter/5; | |
sink = stone_diameter/8; | |
under = extra - sink; | |
up(under) { | |
up(stone_diameter/2) | |
yrot(90) | |
%cyl( | |
h=stone_thick, | |
d=stone_diameter, | |
chamfer1=0, | |
chamfer2=stone_chamfer, | |
chamfang=stone_chamfang | |
); | |
diff("cutout weight foot half clip dev") { | |
th = stone_diameter/8; | |
td = stone_diameter/4; | |
tc = th/10; | |
ts = 3; | |
tx = td*0.01; | |
base_chamfer = tc * ts/2; | |
base_size = [ | |
th + 2*base_chamfer, | |
(td * ts) * 1.4709, | |
td/2 + extra | |
]; | |
weight_space = weight.z + weight_sep; | |
weight_layers = floor((under - weight_sep) / weight_space); | |
// base | |
up(td/2 + sink) | |
union() { | |
fwd(tx) | |
yscale(ts) | |
xrot(90) | |
zrot(90) | |
teardrop(h=th, d=td, chamfer=tc); | |
back(tx) | |
yscale(ts) | |
xrot(-90) | |
zrot(90) | |
teardrop(h=th, d=td, chamfer=tc); | |
down((td/2 + extra)/2) | |
cuboid( | |
base_size, | |
chamfer=base_chamfer, | |
edges=["Z", UP], | |
trimcorners=true | |
); | |
} | |
tag("cutout") | |
up(stone_diameter/2 + tolerance) | |
yrot(90) | |
cyl( | |
h=stone_thick + 2*tolerance, | |
d=stone_diameter + 2*tolerance | |
// NOTE: no chamfer -- the actual profile on my stone does not match well with bosl2 | |
// -- actual is deeper yet shallower, more like a slight ring has been subtracted | |
); | |
tag("weight") | |
down(under/2) | |
zcopies(spacing=weight_space, n=weight_layers) | |
render() | |
grid_copies( | |
spacing=[weight.x*1.2, weight.y*1.2], | |
size=[base_size.x, base_size.y] * 0.9, | |
stagger=$idx % 2 == 0 ? true : "alt" | |
) | |
cuboid(weight, rounding=weight_round); | |
tag("foot") | |
down(under - foot_depth/4) | |
grid_copies( | |
spacing=[ | |
base_size.x * 0.70, | |
base_size.y * 0.30 | |
], | |
size=[base_size.x, base_size.y] * 0.9 | |
) | |
cyl( | |
d1=foot_diameter + 4*tolerance, | |
d2=foot_diameter + 2*tolerance, | |
h=foot_depth/2 + 2*$eps); | |
tag("clip") | |
xcopies(spacing=[th * 0.3, th * -0.3]) | |
up(td*0.75) | |
zcopies(spacing=clip_width*2, l=td*1.2) | |
yrot(90) | |
rabbit_clip( | |
type="socket", | |
length=clip_length, | |
width=clip_width, | |
snap=clip_snap, | |
thickness=clip_thick, | |
depth=clip_depth, | |
compression=clip_compress, | |
orient=FRONT | |
); | |
tag("half") | |
back(td * ts) | |
cube(td * ts * 2, center=true); | |
// if ($preview) { | |
// tag("dev") | |
// right(td * ts) | |
// cube(td * ts * 2, center=true); | |
// } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment