-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloset_rod_endcap.scad
66 lines (50 loc) · 1.57 KB
/
closet_rod_endcap.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
/********************************************************
* Closet Rod Endcap - vsergeev
* https://github.com/vsergeev/3d-closet-rod-endcap
* CC-BY-4.0
*
* Release Notes
* * v1.0 - 06/20/2023
* * Initial release.
********************************************************/
// in mm
base_xy_diameter = 32.25;
// in mm
base_xy_z_thickness = 3;
// in mm
insert_xy_diameter = 30.25;
// in mm
insert_xy_thickness = 3;
// in mm
insert_z_height = 10;
/* [Hidden] */
$fn = 100;
overlap_epsilon = 0.01;
/******************************************************************************/
/* 2D Profiles */
/******************************************************************************/
module profile_base_footprint() {
circle(d = base_xy_diameter);
}
module profile_insert_footprint() {
difference() {
circle(d = insert_xy_diameter);
circle(d = insert_xy_diameter - insert_xy_thickness * 2);
}
}
/******************************************************************************/
/* 3D Extrusions */
/******************************************************************************/
module endcap() {
union() {
linear_extrude(base_xy_z_thickness)
profile_base_footprint();
translate([0, 0, base_xy_z_thickness - overlap_epsilon])
linear_extrude(insert_z_height + overlap_epsilon)
profile_insert_footprint();
}
}
/******************************************************************************/
/* Top Level */
/******************************************************************************/
endcap();