-
Notifications
You must be signed in to change notification settings - Fork 4
/
calGrid.scad
42 lines (30 loc) · 1.23 KB
/
calGrid.scad
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
// calibration pattern B?
hr=5/cos(30);
spc=30;
spcX=spc/2;
spcY=spc*sin(60);
module marker(rot=0) { rotate([0,0,rot?30:0]) cylinder(r=hr,h=3.5,$fn=6); }
module calGrid() {
marker(0);
for (a=[ 0:60:359]) rotate([0,0,a]) translate([ spc ,0,0]) marker(1);
for (a=[30:60:359]) rotate([0,0,a]) translate([2*spcY,0,0]) marker(1);
for (a=[ 0:60:359]) rotate([0,0,a]) translate([2*spc ,0,0]) marker(1);
%for (a=[ 0:60:359]) rotate([0,0,a]) translate([3*spc ,0,0]) marker(1);
#for (a=[-60:60:66]) rotate([0,0,a])
translate([0,0,.5]) cube([4*spc,3,1],center=true);
for (a=[30:60:359]) rotate([0,0,a])
translate([2*spcY,0,.5]) cube([3,2*spc,1],center=true);
for (a=[0:120:355]) rotate([0,0,a])
translate([0,spcY,.5]) cube([spc,3,1],center=true);
translate([0,spcY,0]) cylinder(r=4,h=1,$fn=4); // fiducial for +y direction
// These are all radius 2.64575131106459*spc
for (a=[-1,1]) for (b=[-1,1])
%translate([2.5*spc*a,spcY*b,0]) marker(0);
for (a=[-1,1]) for (b=[-1,1])
%translate([2*spc*a,2*spcY*b,0]) marker(0);
for (a=[-1,1]) for (b=[-1,1])
%translate([0.5*spc*a,3*spcY*b,0]) marker(0);
}
%translate([0,0,-1]) cylinder(r=70/cos(30),h=1,$fn=60);
//projection(cut=true) translate([0,0,-0.1])
calGrid();