-module spin(weight_radius,
- weight_thickness,
- bearing_radius,
- bearing_thickness,
- weight_lip_overhang = 0.3,
- bearing_lip_overhang = 0.3,
- wall = 3,
- arms = 3,
- layer_height = 0.15) {
- layer_height = 0.15;
+module spin_slice(weight_radius,
+ bearing_radius,
+ round_extra,
+ wall,
+ arms) {
+ joiner_radius = (bearing_radius + weight_radius) / 2;
+
+ bearing_xy = [0, 0];
+ // a = side along x axis
+ a = bearing_radius + weight_radius + wall;
+ // b = side from center to joiner
+ b = bearing_radius + joiner_radius + round_extra;
+ // c = side between joiner and arm center
+ c = joiner_radius + weight_radius + round_extra;
+
+ weight_xy = [a, 0];
+
+ cos_C = (pow(a, 2) + pow(b, 2) - pow(c, 2)) / (2 * a * b);
+ sin_C = sqrt(1 - pow(cos_C, 2));
+
+ joiner_xy = [cos_C, sin_C] * b;
+
+ for(arm = [0 : arms - 1]) {
+ rotate(arm * (360 / arms)) {
+ difference() {
+ union() {
+ translate(bearing_xy) {
+ circle(bearing_radius + round_extra); }
+ translate(weight_xy) {
+ circle(weight_radius + round_extra); }
+ mirrored([0, 1]) {
+ polygon([bearing_xy, weight_xy, joiner_xy]); } }
+ mirrored([0, 1]) {
+ translate(joiner_xy) {
+ circle(joiner_radius); } } } } } }
+
+module spin_slices(weight_radius,
+ weight_thickness,
+ bearing_radius,
+ bearing_thickness,
+ weight_lip_overhang = 0.3,
+ bearing_lip_overhang = 0.3,
+ wall = 3,
+ arms = 3,
+ layer_height = 0.15) {