Skip to content

Commit 8fb18af

Browse files
authored
Merge pull request #391 from smkent/oven
Add power cord grommet to reflow-oven-parts
2 parents 6e0800d + cdd4743 commit 8fb18af

File tree

3 files changed

+185
-14
lines changed

3 files changed

+185
-14
lines changed

electronics/reflow-oven-parts/SConscript

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
Import("env")
22
b = ModelBuilder(env)
33

4-
panel_model = "panel-grommet.scad"
4+
panel_grommet_model = "panel-grommet.scad"
55
enclosure_mount_model = "enclosure-mount.scad"
6+
power_cord_grommet_model = "power-cord-grommet.scad"
67

7-
b.STL("panel-grommet.stl", panel_model)
8+
b.STL("panel-grommet.stl", panel_grommet_model)
9+
b.STL("power-cord-grommet.stl", power_cord_grommet_model)
810
b.STL("enclosure-mount.stl", enclosure_mount_model)
9-
b.Image("demo.png", panel_model)
11+
b.Image("demo.png", panel_grommet_model)
1012

1113
b.add_default_targets()
1214

electronics/reflow-oven-parts/panel-grommet.scad

+13-11
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
/* [Size] */
1010
// All units in millimeters
1111

12-
Thickness = 3; // [1.5:0.1:10]
1312
Diameter = 35;
1413
Hole_Diameter = 16; // [10:0.1:30]
14+
Thickness = 3; // [1.5:0.1:10]
1515
Screw_Hole_Diameter = 3; // [2:0.1:5]
1616
Screw_Hole_Offset = 14;
1717
Grommet_Thickness = 3; // [0.8:0.1:5]
@@ -77,6 +77,17 @@ module at_panel_grommet_screw_holes() {
7777
children();
7878
}
7979

80+
module panel_grommet_hole() {
81+
dd = Hole_Diameter - Grommet_Thickness * 2;
82+
translate([0, 0, slop])
83+
linear_extrude(height=Thickness + Grommet_Depth + slop * 2)
84+
circle(d=dd);
85+
translate([0, 0, -slop])
86+
cylinder(d2=dd, d1=dd + Edge_Radius * 2, h=Edge_Radius);
87+
translate([0, 0, Thickness + Grommet_Depth - Edge_Radius + slop])
88+
cylinder(d1=dd, d2=dd + Edge_Radius * 2, h=Edge_Radius);
89+
}
90+
8091
module panel_grommet_body() {
8192
difference() {
8293
translate([0, 0, Edge_Radius])
@@ -88,16 +99,7 @@ module panel_grommet_body() {
8899
linear_extrude(height=Thickness + Grommet_Depth - Edge_Radius * 2)
89100
circle(d=Hole_Diameter - Edge_Radius * 2);
90101
}
91-
union() {
92-
dd = Hole_Diameter - Grommet_Thickness * 2;
93-
translate([0, 0, slop])
94-
linear_extrude(height=Thickness + Grommet_Depth + slop * 2)
95-
circle(d=dd);
96-
translate([0, 0, -slop])
97-
cylinder(d2=dd, d1=dd + Edge_Radius * 2, h=Edge_Radius);
98-
translate([0, 0, Thickness + Grommet_Depth - Edge_Radius + slop])
99-
cylinder(d1=dd, d2=dd + Edge_Radius * 2, h=Edge_Radius);
100-
}
102+
panel_grommet_hole();
101103
}
102104
}
103105

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
/*
2+
* Controleo3 reflow oven add-ons
3+
* Power cord grommet
4+
* By smkent (GitHub) / bulbasaur0 (Printables)
5+
*
6+
* Licensed under Creative Commons (4.0 International License) Attribution-ShareAlike
7+
*/
8+
9+
/* [Rendering Options] */
10+
Print_Orientation = true;
11+
12+
/* [Size] */
13+
// All units in millimeters
14+
15+
Dimensions = [15, 10.2]; // [5:0.1:20]
16+
Radius = 3.5; // [0:0.1:5]
17+
Thickness = 3; // [1.5:0.1:10]
18+
Cord_Diameter = 9.5; // [5:0.05:20]
19+
20+
Screw_Hole_Diameter = 3; // [2:0.1:5]
21+
Screw_Hole_Offset = 5;
22+
Grommet_Thickness = 3; // [0.8:0.1:5]
23+
Grommet_Depth = 6; // [0.4:0.1:5]
24+
25+
/* [Advanced Options] */
26+
Vertical_Overlap = 8; // [0:0.1:10]
27+
Screw_Hole_Fit = 0.2; // [0:0.05:1]
28+
Screw_Hole_Style = "inset"; // [flat: Flat, countersink: Countersink, inset: Inset]
29+
Edge_Radius = 0.4; // [0:0.1:3]
30+
31+
/* [Development Toggles] */
32+
33+
module __end_customizer_options__() { }
34+
35+
// Constants //
36+
37+
$fa = $preview ? $fa : 2;
38+
$fs = $preview ? $fs / 4 : 0.4;
39+
40+
shd = Screw_Hole_Diameter + Screw_Hole_Fit;
41+
soff = shd * 2 + Grommet_Thickness;
42+
43+
slop = 0.001;
44+
45+
// Functions //
46+
47+
function vec_add(vector, add) = [for (v = vector) v + add];
48+
49+
// Modules //
50+
51+
module _round_3d(radius = Edge_Radius) {
52+
if (radius == 0) {
53+
children();
54+
} else {
55+
render()
56+
minkowski() {
57+
children();
58+
for (mz = [0, 1])
59+
mirror([0, 0, mz])
60+
cylinder(r1=radius, r2=0, h=radius);
61+
}
62+
}
63+
}
64+
65+
module _screw_hole(d, h, fit=0, style="flat", print_upside_down=false) {
66+
inset_bare_min_h = 1.4;
67+
inset_min_h = (style == "inset") ? max((h - d), inset_bare_min_h) - (h - d) : 0;
68+
translate([0, 0, -slop])
69+
cylinder(d=(d + fit), h=h + slop * 2);
70+
if (style == "countersink" || style == "inset") {
71+
translate([0, 0, h + inset_min_h + slop * 2])
72+
mirror([0, 0, 1])
73+
cylinder(d1=d * 2, d2=d * (style == "inset" ? 2 : 1), h=d);
74+
}
75+
if (style == "inset" && print_upside_down) {
76+
layer_height = 0.2;
77+
translate([0, 0, (h + inset_min_h) - d - layer_height])
78+
linear_extrude(height=layer_height + slop * 2)
79+
intersection() {
80+
square([d * 2, d + fit], center=true);
81+
circle(d=d*2);
82+
}
83+
}
84+
}
85+
86+
module _round_hole(r=Radius) {
87+
offset(r=r)
88+
offset(r=-r)
89+
children();
90+
}
91+
92+
93+
module at_power_cord_grommet_screw_holes() {
94+
for (mx = [0, 1])
95+
mirror([mx, 0])
96+
translate([Dimensions[0] / 2 + Screw_Hole_Offset / 2, 0])
97+
children();
98+
}
99+
100+
module power_cord_grommet_hole() {
101+
dd = Cord_Diameter;
102+
translate([0, 0, slop])
103+
linear_extrude(height=Thickness + Grommet_Depth + slop * 2)
104+
circle(d=dd);
105+
translate([0, 0, -slop])
106+
cylinder(d2=dd, d1=dd + Edge_Radius * 2, h=Edge_Radius);
107+
translate([0, 0, Thickness + Grommet_Depth - Edge_Radius + slop])
108+
cylinder(d1=dd, d2=dd + Edge_Radius * 2, h=Edge_Radius);
109+
}
110+
111+
module power_cord_grommet_screw_holes() {
112+
translate([0, 0, Thickness])
113+
mirror([0, 0, 1])
114+
at_power_cord_grommet_screw_holes()
115+
_screw_hole(
116+
d=Screw_Hole_Diameter,
117+
h=Thickness,
118+
fit=Screw_Hole_Fit,
119+
style=Screw_Hole_Style,
120+
print_upside_down=true
121+
);
122+
}
123+
124+
module power_cord_grommet_body() {
125+
difference() {
126+
translate([0, 0, Edge_Radius])
127+
union() {
128+
_round_3d()
129+
linear_extrude(height=Thickness + Grommet_Depth - Edge_Radius * 2)
130+
_round_hole(Radius - Edge_Radius)
131+
square(vec_add(Dimensions, -Edge_Radius * 2), center=true);
132+
133+
_round_3d()
134+
linear_extrude(height=Thickness - Edge_Radius * 2) {
135+
cd = max(3, shd / 2);
136+
hull() {
137+
_round_hole(Radius - Edge_Radius)
138+
square(
139+
vec_add(Dimensions, -Edge_Radius * 2)
140+
+ [
141+
Screw_Hole_Offset + Screw_Hole_Diameter * 2,
142+
Vertical_Overlap
143+
],
144+
center=true
145+
);
146+
at_power_cord_grommet_screw_holes()
147+
translate([Screw_Hole_Diameter, 0])
148+
circle(d=cd);
149+
}
150+
}
151+
}
152+
power_cord_grommet_hole();
153+
power_cord_grommet_screw_holes();
154+
}
155+
}
156+
157+
module power_cord_grommet() {
158+
render()
159+
power_cord_grommet_body();
160+
}
161+
162+
module main() {
163+
color("lightsteelblue", 0.8)
164+
power_cord_grommet();
165+
}
166+
167+
main();

0 commit comments

Comments
 (0)