107 lines
2.4 KiB
OpenSCAD
107 lines
2.4 KiB
OpenSCAD
$fn = 300;
|
|
|
|
// * c w
|
|
part = "w";
|
|
|
|
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);
|
|
|
|
bearing_radius = 8.1;
|
|
bearing_underhang = 1;
|
|
bulk_radius = 4;
|
|
|
|
bearing_height = 5;
|
|
bearing_count = 2;
|
|
|
|
core_radius = 9.5;
|
|
core_bump_radius = 1;
|
|
core_bump_height = 2;
|
|
|
|
e = 0.02;
|
|
|
|
inner_radius = bearing_radius - bearing_underhang;
|
|
echo("inner_radius=", inner_radius);
|
|
|
|
outer_radius = inner_radius + bulk_radius;
|
|
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);
|
|
|
|
bearing_portion = mid / bearing_count;
|
|
|
|
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],
|
|
|
|
[core_radius + core_bump_radius, 0 - e],
|
|
[core_radius + core_bump_radius, 0],
|
|
[core_radius, core_bump_height],
|
|
[core_radius, total_height - core_bump_height],
|
|
[core_radius + core_bump_radius, total_height],
|
|
[core_radius + core_bump_radius, total_height + e],
|
|
]);
|
|
}
|
|
|
|
module wheel() {
|
|
// deramp
|
|
// ramp
|
|
// [tip]
|
|
// ramp
|
|
// mid
|
|
// ramp
|
|
// [tip]
|
|
// ramp
|
|
// deramp
|
|
|
|
difference() {
|
|
rotate_extrude()
|
|
polygon([
|
|
[inner_radius, total_height],
|
|
[inner_radius, 0],
|
|
|
|
[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],
|
|
]);
|
|
|
|
|
|
for (b = [0 : bearing_count - 1]) {
|
|
translate([0, 0, deramp_height + ramp_height + (b * bearing_portion)])
|
|
translate([0, 0, bearing_portion / 2 - bearing_height / 2])
|
|
cylinder(h=bearing_height, r=bearing_radius);
|
|
}
|
|
}
|
|
} |