-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpuck_cores.scad
77 lines (64 loc) · 3.48 KB
/
puck_cores.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
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
$fn = 100;
puck_lead_core(bevel = false, core_version = LEAD_CORE_SIMMS_V3());
core_measures = [ //max_diameter, middle_height, inner_diameter, hole_diameter, total_height
[ 74, 21.4, 63.6 , 7.5, 28.2], // SIMMS V1
[ 72.3, 21.2, 64.4 , 7.5, 28.2], // SIMMS V2
[ 72.2, 21.0, 65.0 , 7.5, 28.2], // SIMMS V3
];
function LEAD_CORE_SIMMS_V1() = 0;
function LEAD_CORE_SIMMS_V2() = 1;
function LEAD_CORE_SIMMS_V3() = 2;
/*
//SIM V1
function lead_core_max_diameter() = 74;
function lead_core_middle_height() = 21.4;
function lead_core_inner_diameter() = 63.6;;
//SIM V2
function lead_core_max_diameter() = 72.3;
function lead_core_middle_height() = 21.2;
function lead_core_inner_diameter() = 64.4;
*/
function lead_core_max_diameter(version) = core_measures[version][0];
function lead_core_max_radius(version) = core_measures[version][0]/2;
function lead_core_middle_height(version) = core_measures[version][1];
function lead_core_inner_diameter(version) = core_measures[version][2];
function lead_core_inner_radius(version) = core_measures[version][2]/2;
function lead_core_hole_diameter(version) = core_measures[version][3];
function lead_core_hole_radius(version) = core_measures[version][3]/2;
function lead_core_total_height(version) = core_measures[version][4];
//lead core, 1 piece
module puck_lead_core( offset_tolerance = 0, hole_tolerance = 0, bevel = true, core_version = LEAD_CORE_SIMMS_V2() ) {
core_rounded_radius = 1;
core_outer_diameter = lead_core_max_diameter( core_version ) - offset_tolerance;
core_inner_diameter = lead_core_inner_diameter( core_version ) - 2*core_rounded_radius - offset_tolerance;
core_bevel_diameter = 50 - 2*core_rounded_radius - offset_tolerance;
core_total_height = lead_core_total_height( core_version ) - 2*core_rounded_radius - offset_tolerance;
core_beveled_height = 27 - 2*core_rounded_radius - offset_tolerance;
core_middle_height = lead_core_middle_height( core_version ) - offset_tolerance;
// the hole and locks, need a negative offset, so the "hole" is generated bigger
core_central_hole_diameter = lead_core_hole_diameter( core_version ) + hole_tolerance;
core_edge_locks_diameter = 1.5 + hole_tolerance;
difference(){
union(){
cylinder(r = core_outer_diameter/2, h = core_middle_height, center =true);
minkowski() {
if ( bevel==true ) {
union() {
cylinder(r = core_inner_diameter/2, h = core_beveled_height, center =true);
translate([0,0, core_beveled_height/2]) cylinder(r1 = core_inner_diameter/2, r2=core_bevel_diameter/2, h = (core_total_height-core_beveled_height)/2);
translate([0,0,-core_total_height/2]) cylinder(r2 = core_inner_diameter/2, r1=core_bevel_diameter/2, h = (core_total_height-core_beveled_height)/2);
}
}
else
{
cylinder(r = core_inner_diameter/2, h = core_total_height, center =true);
}
sphere(r=core_rounded_radius);
}
}
cylinder(r=core_central_hole_diameter/2, h = 2*core_total_height, center=true);
for (i = [0,120,240]) {
rotate(i) translate([core_outer_diameter/2,0,0]) cylinder(r=core_edge_locks_diameter/2, h = core_total_height, center=true);
}
}
}