chiark / gitweb /
distort-stl: Break out project_cylinder_triangle_need_subdivide
[reprap-play.git] / shelf-label-holder.scad
1 // -*- C -*-
2
3 prong_nomdepth = 15;
4 prong_curverad = 30;
5 prong_thick = 0.7;
6 prong_maxdepth = 18;
7
8 front_thick = 2.5;
9
10 //nom_shelf = 14.54 + 0.5;
11 nom_shelf = 20.315 + 0.5;
12
13 interference = 0.75;
14
15 length = 60;
16
17 // calculated
18
19 interference_angle = atan2(interference, prong_nomdepth);
20
21 module ProngElevationUnrotated(){
22   intersection(){
23     union(){
24       translate([ prong_nomdepth, prong_curverad ])
25         circle( prong_curverad , $fa=0.5 );
26       translate([ -10, 0 ])
27         square([ prong_nomdepth + 10, 10 ]);
28     }
29     translate([-5, -5])
30       square([ prong_maxdepth + 5, prong_thick + 5]);
31   }
32 }
33
34 module Elevation(){
35   difference(){
36     union(){
37       rotate(-interference_angle)
38         ProngElevationUnrotated();
39       translate([0, -nom_shelf])
40         mirror([0,1])
41         rotate(-interference_angle)
42         ProngElevationUnrotated();
43       translate([-10, -nom_shelf - prong_thick/2])
44         square([10, nom_shelf + prong_thick]);
45     }
46     mirror([1,0])
47       translate([ front_thick, -100 ])
48       square([ 50, 200 ]);
49   }
50 }
51
52 module Main(){
53   linear_extrude(height=length)
54     Elevation();
55 }
56
57 module Print(){
58   rotate([0,-90,0])
59     Main();
60 }
61
62 //ProngElevationUnrotated();
63 //Elevation();
64 Main();
65 //Print();