chiark / gitweb /
sleepphone-cable-box: from v1, adjust wall_bot
[reprap-play.git] / ring-tests.scad
1 // -*- C -*-
2
3 thick = 3.5;
4 width = 5;
5
6 centre_dia = 21;
7
8 // calculated
9
10 ellipse_width = width / 0.90;
11
12 module Profile(){
13   intersection(){
14     scale([thick, ellipse_width]) circle(r=0.5, $fn=50);
15     square([thick*2, width], center=true);
16   }
17 }
18
19 module Ring(dia){
20   rotate_extrude($fn=100){
21     translate([dia/2 + thick/2, 0]){
22       Profile();
23     }
24   }
25 }
26
27 //Profile();
28 //Ring(centre_dia);
29
30 module Tests(){
31   min_dia = 19;
32   max_dia = 22;
33   dia_step = .25;
34   n_dias = (max_dia - min_dia)/dia_step;
35   for (i= [ 0 : n_dias ]) {
36     echo(i);
37     rotate([0,0, i*360 / (n_dias+2)])
38       translate([80,0,0])
39       Ring(min_dia + (max_dia-min_dia)*(i/n_dias));
40   }
41 }
42
43 Tests();