/* * Copyleft 2012 Sergio García-Cuevas González * * This work is licensed under the Creative Commons * Attribution-ShareAlike 3.0 Unported License. * To view a copy of this license, visit * http://creativecommons.org/licenses/by-sa/3.0/ * or send a letter to Creative Commons, * 444 Castro Street, Suite 900, Mountain View, * California, 94041, USA. */ /* * Bead spinner bowl * * A bead spinner is a tool for stringing beads. It has a rotating * bowl that is filled with beads. To use it, rotate the spindle * of the bowl with one hand while holding a needle with string or * a piece of wire on the other hand. The trick is to get the beads * going towards the tip of the needle or piece of wire; they will * happily jump and string themselves in a matter of seconds. * * This bead spinner has two parts: a base and a bowl. This file * contains the model of the bowl. See the bottom of the file. */ module sector (radius, angle) { $fn = $fn * 360 / angle; intersection () { circle (r = radius); if (angle <= 90) { polygon (points = [[0, 0], [radius, 0], [radius, radius], [radius * cos (angle), radius * sin (angle)]]); } else if (angle <= 180) { polygon (points = [[0, 0], [radius, 0], [radius, radius], [-radius, radius], [radius * cos (angle), radius * sin (angle)]]); } else if (angle <= 270) { polygon (points = [[0, 0], [radius, 0], [radius, radius], [-radius, radius], [-radius, -radius], [radius * cos (angle), radius * sin (angle)]]); } else if (angle < 360) { polygon (points = [[0, 0], [radius, 0], [radius, radius], [-radius, radius], [-radius, -radius], [radius, -radius], [radius * cos (angle), radius * sin (angle)]]); } } } module fillet (radius) { translate (v = [radius, radius]) { rotate (a = [0, 0, 180]) { difference () { square (size = radius * 1.001); circle (r = radius, $fn = $fn * 4); } } } } module round (radius) { translate (v = [-radius, -radius]) { difference () { square (size = radius * 1.001); circle (r = radius, $fn = $fn * 4); } } } module rounded_wall (radius, angle, thickness) { difference () { sector (radius = radius, angle = angle); circle (r = radius - thickness, $fn = $fn * 360 / angle); } } module bowl (radius, height, thickness, lower_wall_radius, upper_wall_radius, spindle_radius, spindle_height) { rotate_extrude () { assign (theta = asin ((height - lower_wall_radius - thickness / 2) / (upper_wall_radius - thickness / 2))) { union () { difference () { union () { square (size = [radius - lower_wall_radius, thickness]); difference () { square (size = [spindle_radius, spindle_height]); translate (v = [spindle_radius, spindle_height]) { round (radius = spindle_radius); } } } union () { difference () { square (size = [spindle_radius - thickness, spindle_height - thickness]); translate (v = [spindle_radius - thickness, spindle_height - thickness]) { round (radius = spindle_radius - thickness); } } translate (v = [spindle_radius - thickness, 0]) { fillet (radius = thickness); } } } translate (v = [spindle_radius, thickness, 0]) { fillet (radius = spindle_radius); } translate (v = [radius - lower_wall_radius, lower_wall_radius]) { rotate (a = [0, 0, -90]) { rounded_wall (radius = lower_wall_radius, angle = 90, thickness = thickness); } } translate (v = [radius - upper_wall_radius, lower_wall_radius]) { union () { rounded_wall (radius = upper_wall_radius, angle = theta, thickness = thickness); translate (v = [(upper_wall_radius - thickness / 2) * cos (theta), (upper_wall_radius - thickness / 2) * sin (theta), 0]) { circle (r = thickness / 2); } } } } } } } /* Model generation. * * The bowl is a body of revolution and has several parameters: * * - radius: radius of the greatest parallel; * - height: height of the wall; * - thickness: wall thickness; * - lower_wall_radius: meridian radius of the lower part of the wall; * - upper_wall_radius: meridian radius of the upper part of the wall; * - spindle_radius: radius of the spindle (it should be slightly * larger than the radius of the axis of the base * plus the wall thickness;) * - spindle_height: height of the spindle. */ bowl (radius = 40.0, height = 25.0, thickness = 2.0, lower_wall_radius = 12.5, upper_wall_radius = 17.5, spindle_radius = 6.0, spindle_height = 70.0, $fs = 0.3, $fa = 10);