Spencer Barton

23 Jan 2014

A customizable #OpenSCAD braille fridge magnet

magnetG

magnetS

magnetZ

2014-01-23 00.15.27

A customizable #OpenSCAD braille fridge magnet

The advantage of parametric CAD design is flexibility. I decided I should work with forms where there was a need for translation between data and a physical shape. Braille presented itself as a unique opportunity to create something useful. I ran into some major limitations with openSCAD, in particular its strange use of variables . Currently my sketches can only convert letters but not numbers because I had difficulty updating variables during execution. I liked utilizing braille since there is a real potential need. I however have limited experience with the blind so I took a stab in the dark when creating an object that I though had some value. Bilingual fridge magnets (since both the braille and the regular letter are there) may be nice for some people but certainly are not a necessary item.

Github
Thingiverse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*
    Braille Fridge Magnet
    Spencer Barton
 
    based on http://www.thingiverse.com/thing:47411 by kitwallace
 
    Directions: Upload your alphebetic character [A-Z,a-z] to be converted to braille and placed on a tag
 
*/
 
use <write .scad>
 
/*===================================================
  Global Vars
  =================================================== */
 
// encodings
font_charKeys = ["a", "A", "b", "B", "c", "C", "d", "D", "e", "E", "f", "F", "g", "G", "h", "H", "i", "I", "j", "J", "k", "K", "l", "L", "m", "M", "n", "N", "o", "O", "p", "P", "q", "Q", "r", "R", "s", "S", "t", "T", "u", "U", "v", "V", "w", "W", "x", "X", "y", "Y", "z", "Z", ",", ";", ":", ".", "!", "(", ")", "?", "\"", "*", "'", "-"];
font_charValues = [[1], [1], [1, 2], [1, 2], [1, 4], [1, 4], [1, 4, 5], [1, 4, 5], [1, 5], [1, 5], [1, 2, 4], [1, 2, 4], [1, 2, 4, 5], [1, 2, 4, 5], [1, 2, 5], [1, 2, 5], [2, 4], [2, 4], [2, 4, 5], [2, 4, 5], [1, 3], [1, 3], [1, 2, 3], [1, 2, 3], [1, 3, 4], [1, 3, 4], [1, 3, 4, 5], [1, 3, 4, 5], [1, 3, 5], [1, 3, 5], [1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 5], [1, 2, 3, 5], [2, 3, 4], [2, 3, 4], [2, 3, 4, 5], [2, 3, 4, 5], [1, 3, 6], [1, 3, 6], [1, 2, 3, 6], [1, 2, 3, 6], [2, 4, 5, 6], [2, 4, 5, 6], [1, 3, 4, 6], [1, 3, 4, 6], [1, 3, 4, 5, 6], [1, 3, 4, 5, 6], [1, 3, 5, 6], [1, 3, 5, 6], [2], [2, 3], [2, 5], [2, 5, 6], [2, 3, 5], [2, 3, 5, 6], [2, 3, 5, 6], [2, 3, 6], [2, 3, 6], [3, 5], [3], [3, 6]];
 
// compile vars
$fa = 0.01; $fs = 0.5; 
 
// global dimensions from http://www.brailleauthority.org/sizespacingofbraille/sizespacingofbraille.pdf
 
// these dimensions for braille letters
font_dotHeight = 0.7;
font_dotBase = 1.6;  
font_dotRadius = font_dotBase /2;
font_dotWidth= 2.54;
font_charWidth = 7.62;
font_lineHeight = 11; 
 
// compute the sphere to make the raised dot
font_dotSphereRadius =  chord_radius(font_dotBase,font_dotHeight);
font_dotSphereOffset = -(cylinderDepth - 2.0)/2.0 + font_dotSphereRadius - font_dotHeight;
 
// inputs
letter = "C"; 
cylinderRadius = 8.0;
cylinderDepth = 2.0;
magnetRadius = 2.0;
magnetDepth = 1.0;
guideDots = true;
cylinderMagnet = false;
 
/*===================================================
  Functions
  =================================================== */
 
// dot is not a hemisphere 
function chord_radius(length,height) = ( length * length /(4 * height) + height)/2;
 
/*===================================================
  Modules
  =================================================== */
 
module drawDot(location, radius) {  
    translate(location) 
       translate ([0,0, -font_dotSphereOffset ]) 
			sphere(radius);
}
 
module drawCharacter(charMap) {
     for(i = [0: len(charMap)-1]) 
        assign(dot = charMap[i] - 1)
        drawDot(   [floor(dot / 3) * font_dotWidth,  -((dot %3) * font_dotWidth),   0],  font_dotRadius );
}
 
 
module transcribeChar(char) {
    // match with one from alphabet
    for(j = [0:len(font_charKeys)-1]) {
        if(font_charKeys[j] == char) {
            drawCharacter(font_charValues[j]);
				echo(font_charKeys[j]);
        }
    }
}
 
module drawGuideDots() {
	  assign( charMap = [1,2,3,4,5,6] )
     for(i = [0: len(charMap)-1]) 
        assign(dot = charMap[i] - 1)
        drawDot(   [floor(dot / 3) * font_dotWidth,  -((dot %3) * font_dotWidth),   0],  font_dotRadius * .5 );
}
 
module magnet(letter) {
 
     difference () {
        union() {
            // main rectangle
            if (cylinderMagnet == true) {
					cylinder(r = cylinderRadius,h = cylinderDepth);
				} else {
					translate([0,0,cylinderDepth/2])
						resize(newsize=[cylinderRadius*2.5,cylinderRadius*2,cylinderDepth]) sphere(r=cylinderRadius);  
				}
            // write regular letter
            translate([-cylinderRadius/3.0,0,cylinderDepth])
					write(letter,t=font_dotSphereOffset,h=cylinderRadius,center=true, font = "orbitron.dxf");
				// chars
				translate([cylinderRadius/4.0,font_dotWidth,cylinderDepth])
            	transcribeChar(letter);
				// indicators
				if (guideDots == true) {
					translate([cylinderRadius/4.0,font_dotWidth,cylinderDepth])
						drawGuideDots();
				}
        } // end union
 
        // hole for magnet
		  translate([0,0,-.5])
            cylinder(r=magnetRadius,h=magnetDepth+1);  
    }
 
}
 
/*===================================================
  Run Main Module
  =================================================== */
 
magnet(letter);
</write>