piccolo

3d Printable Piccolo
git clone https://git.woozle.org/neale/piccolo.git

Neale Pickett  ·  2025-10-24

body.scad

 1include <common.scad>
 2use <MCAD/regular_shapes.scad>
 3
 4body_height = 189.68 + 25; // add 25 for built-in barrel
 5rev = "P"; // revision to stamp on the side
 6
 7module body() {
 8  d1 = 17.0;
 9  d2 = 20.4;
10  toneholes = [
11               [40, 7.0],
12               [66, 8.5],
13               [81, 7.0],
14               [106.5, 7.0],
15               [125.0, 7.5],
16               [144.4, 7.0],
17               ];
18
19
20  union() {
21    difference() {
22      // Combine cylinders to make it look curvy
23      union() {
24        bend = 80;
25        cylinder(h=body_height, d1=d1, d2=(d1+d2)/2);
26        translate([0, 0, body_height-bend]) cylinder(h=bend, d1=d1, d2=d2);
27      }
28
29      // Inner bore, the most important part of the whole instrument!
30      translate([0, 0, -1]) cylinder(h=body_height+2, d1=id_bot, d2=id_top);
31
32      // Tone holes
33      for (hole = toneholes) {
34        translate([0, 0, hole[0]]) tonehole(d=hole[1]);
35      }
36
37      // Mortise
38      translate([0, 0, body_height-25]) {
39        d = 16.9;
40        cylinder(h=25, d=d);
41        translate([0, 0, -d/2]) cylinder(h=d/2, d1=0, d2=d);
42      }
43
44      translate([0, 0, 4]) intersection() {
45        cylinder_tube(50, d1/2+0.5, 1);
46        union() {
47          rotate([90, 90, -90]) {
48            linear_extrude(height=d1, convexity=4) {
49              translate([-9, -5]) import("ruby.svg");
50            }
51          }
52          rotate([90, 90, -180]) {
53            linear_extrude(height=d1, convexity=10) {
54              text(rev, size=5, halign="right", valign="center");
55            }
56          }
57        }
58      }
59    }
60
61    // Rings
62    translate([0, 0, body_height-1.5]) torus((d2+3)/2, (d2-3)/2);
63    difference() {
64      // Fat one at the bottom, for good bed adhesion
65      translate([0, 0, 0]) torus((d1+3)/2, (d1-3)/2);
66      translate([0, 0, -25]) cube(50, center=true);
67    }
68  }
69}
70
71body();