Files
clawmachine/2020-wheel/2020-wheel.scad
T

96 lines
2.1 KiB
OpenSCAD
Raw Normal View History

2026-07-12 11:43:06 -07:00
$fn = 300;
// * c w
2026-07-21 08:04:19 -07:00
part = "w";
2026-07-12 11:43:06 -07:00
slot_center_spacing = 25.4;
ramp_height = 5;
ramp_slot_mid = 4.25;
ramp_depth = 2.5;
deramp_height = 1;
deramp_depth = (ramp_depth / ramp_height) * (ramp_height - deramp_height);
2026-07-20 21:48:13 -07:00
bulk_radius = 2;
2026-07-12 11:43:06 -07:00
2026-07-20 21:48:13 -07:00
rod_radius = 4.2;
bearing_radius = 4;
bearing_cut_depth = 2;
2026-07-12 11:43:06 -07:00
core_bump_radius = 1;
core_bump_height = 2;
e = 0.02;
2026-07-20 21:48:13 -07:00
outer_radius = rod_radius + bearing_radius + bulk_radius;
2026-07-12 11:43:06 -07:00
echo("outer_radius=", outer_radius);
echo("max_radius=", outer_radius + ramp_depth);
mid = slot_center_spacing - ramp_slot_mid - ramp_slot_mid;
total_height = deramp_height + ramp_height + mid + ramp_height + deramp_height;
echo("total_height=", total_height);
if (part == "*" || part == "c") {
color("grey", 0.6)
intersection() {
wheel();
core_mask();
}
}
if (part == "*" || part == "w") {
color("red", 0.6)
difference() {
wheel();
core_mask();
}
}
module core_mask() {
rotate_extrude()
polygon([
[0, total_height + e],
[0, 0 - e],
2026-07-20 21:48:13 -07:00
[rod_radius + bearing_radius + core_bump_radius, 0 - e],
[rod_radius + bearing_radius + core_bump_radius, 0],
[rod_radius + bearing_radius, core_bump_height],
2026-07-21 08:04:19 -07:00
[rod_radius + bearing_radius, total_height + e],
2026-07-12 11:43:06 -07:00
]);
}
module wheel() {
// deramp
// ramp
// [tip]
// ramp
// mid
// ramp
// [tip]
// ramp
// deramp
difference() {
rotate_extrude()
polygon([
2026-07-20 21:48:13 -07:00
[rod_radius, total_height],
[rod_radius, 0],
2026-07-12 11:43:06 -07:00
[outer_radius + deramp_depth, 0],
[outer_radius + ramp_depth, deramp_height],
[outer_radius, deramp_height + ramp_height],
[outer_radius, deramp_height + ramp_height + mid],
[outer_radius + ramp_depth, deramp_height + ramp_height + mid + ramp_height],
[outer_radius + deramp_depth, total_height],
]);
2026-07-20 21:48:13 -07:00
for (a=[0:45:360]) {
translate([0, 0, -e])
rotate([0, 0, a])
cube([rod_radius + bearing_cut_depth, 1, e + total_height + e]);
2026-07-12 11:43:06 -07:00
}
}
}