forked from ostat/vacuum-hose-adapter-openscad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vacuum-hose-adapter-openscad.scad
259 lines (235 loc) · 9.72 KB
/
vacuum-hose-adapter-openscad.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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
// Hose connector
// version 2023-02-25
include <vacuum-hose-adapter-modules.scad>
/* [Connector 1] */
//Wall thickness
End1_Wall_Thickness = 2; //0.01
//The style of the end
End1_Style="flange"; // [mag: Magnetic Flange, flange: Flange, hose: Hose connector, dyson: Dyson connector]
// Is the measurement the adapter's outside or inside diameter?
End1_Measurement = "inner"; //[inner, outer]
// End 1 diameter of the adapter (mm)
End1_Diameter = 50; //0.1
//Length of the start connector (including the flange).
End1_Length= 15; //0.1
//Taper of the start connector, use negative to taper other direction.
End1_Taper = 0; //0.1
/* [Connector 1 - Hose connector] */
//Thickness of hose stop
End1_StopThickness = 0; //1
//Length of hose stop
End1_StopLength = 0; //1
//Should the stop be tapered both sides. Might easier to print.
End1_Stop_Symmetrical = 0;
//Number of barbs
End1_Barbs_Count = 0;
//Thickness of the barbs, default is half wall thickness
End1_Barbs_Thickness = 0; //0.1
//Should the barbes be tapered both sides. Might be easier to print.
End1_Barbs_Symmetrical = 0; //[0,1]
//End Cap Inner Diameter.
End1_Hose_EndCap_Diameter = 0; //0.1
//Thickness of endcap.
End1_Hose_EndCap_Thickness = 0; //0.1
/* [Connector 1 - Flange] */
//Width of Flange added to the connector diamater
End1_Flange_Width = 20;
//Thickness of the flange
End1_Flange_Thickness = 5;
//Position of the screws added to the connector diamater, 0 = middle of flange
End1_Flange_Screw_Position= 0;
//Minium amount of the material around the magnets (mm), 0 = End1_Flange_Width / 4
End1_Flange_Screw_Border = 5; //0.1
//Number of Screw holes flange
End1_Flange_Screw_Count = 4;
//The diameter of the screws (mm)
End1_Flange_Screw_Diameter = 5; //0.1
/* [Connector 1 - Magnetic Connector] */
//Number of magnets in the connector
End1_Magnets_Count = 8;
//The diameter of the magnets (mm)
End1_Magnet_Diameter = 10.5; //0.1
//The thickness of the magnets (mm)
End1_Magnet_Thickness = 2.5; //0.1
//Minium amount of the material around the magnets (mm)
End1_Magnet_Border = 2; //0.1
// Thickness of the magnet flange (mm)
End1_Magnet_Flange_Thickness = 6; //0.1
// Include a flange alignment ring
End1_Ring = "no"; //[no: No alignment ring, protruding: protruding ring, recessed: Recessed ring]
/* [Transition] */
// tapered for hose connections, flat for attaching to a device
Transition_Style = "bend+taper"; //[flat, taper+bend: Taper then bend, bend+taper: Bend then taper, taperedbend: Tapered bend, hull: For multiple end count]
//Length of the transition between the two ends
Transition_Length = 10; //1
// Radius of transition bend (mm)
Transition_Bend_Radius = 0; //1
//Angle of bend through the transition section.
Transition_Angle = 0; //1
// Dupliacte the second connector. Adjust angle and bend radius to make it work.
Transition_End2_Count = 1; //[1, 2, 3, 4, 5, 6]
// X offset for the connector, not supported on taperedbend.
Transition_xOffset = 0; // 0.1
// Y offset for the connector, not supported on taperedbend.
Transition_yOffset = 0; // 0.1
Transition_HullLength = 0; // 0.1
Transition_HullyOffset = 0; // 0.1
/* [Transition Support For Angled Pipes] */
// Include a flate section on the transition to assist with printing
Transition_Base_Type="none"; // [none, oval, rectangle]
//Support Base Additional Thickness;
Transition_Base_Thickness=0;
//Support Base Width, Default is half diameter;
Transition_Base_Width=0;
// Support Base Length Default is 2/3 diameter;;
Transition_Base_Length=0;
// Support Base Angle position, default half of Bend Radius;
Transition_Base_Angle=0;
/* [Connector 2] */
//Wall thickness
End2_Wall_Thickness = 2; //0.01
End2_Style="nozzle"; // [mag: Magnetic Flange, hose: Hose connector, nozzle: Nozzle attachement]
// Is the measurement the adapter's outside or inside diameter?
End2_Measurement = "outer"; //[inner, outer]
// End 2 diameter of the adapter (mm)
End2_Diameter = 40; //0.1
//Length of the pipe coming out of the flange.
End2_Length= 40; //1
//Taper of the start connector, use negative to taper other direction.
End2_Taper = 0; //0.1
/*[Connector 2 - Hose connector] */
//Thickness of hose stop
End2_StopThickness = 0; //1
//Length of hose stop
End2_StopLength = 0; //1
//Should the stop be tapered both sides. Might easier to print.
End2_Stop_Symmetrical = 0;
//Number of barbs
End2_Barbs_Count = 0;
//Thickness of the barbs, default is half wall thickness
End2_Barbs_Thickness = 0; //0.1
//Should the barbes be tapered both sides. Might be easier to print.
End2_Barbs_Symmetrical = 0; //[0,1]
//End Cap Inner Diameter.
End2_Hose_EndCap_Diameter = 0; //0.1
//Thickness of endcap.
End2_Hose_EndCap_Thickness = 0; //0.1
/* [Connector 2 - Magnetic Flange] */
//Number of magnets in the flange
End2_Magnets_Count = 6; //1
//The diameter of the magnets
End2_Magnet_Diameter = 12; //0.1
//The thickness of the magnets
End2_Magnet_Thickness = 3; //0.1
//Size of the material around the magnets
End2_Magnet_Border = 2; //0.1
// Inner diameter of the Magnet flange
End2_Magnet_Flange_Thickness = 10; //0.1
// Include a flange alignment ring
End2_Ring = "no"; //[no: No alignment ring, protruding: Protruding ring, recessed: Recessed ring]
/* [Connector 2 - Nozzle] */
// Is the measurement the adapter's outside or inside diameter?
End2_Nozzle_Shape = "square"; //[square, circle]
End2_Nozzle_Square_Width = 10; //0.1
End2_Nozzle_Square_Depth = 5; //0.1
End2_Nozzle_Tip_Wall_Thickness = 0; //0.1
End2_Nozzle_Radius = 0; //0.1
End2_Nozzle_Length = 10;
End2_Nozzle_xOffset = 0; //0.1
End2_Nozzle_yOffset = 0; //0.1
End2_Nozzle_Chamfer_Percentage = 0; //0.1
End2_Nozzle_Chamfer_Angle = 0; //0.1
/* [Alignment Ring] */
//draw just the alignment ring
Draw_Alignment_Ring = "no"; //[end1: Draw end 1, end2: Draw end 2, no: Don't draw]
//Alignment depth in to flange (mm)
Alignment_Depth = 2; //0.1
//Alignment upper width at widest part (mm)
Alignment_Upper_Width = 3; //0.1
//Alignment lower width at narrowest part (mm)
Alignment_Lower_Width = 0.5; //0.1
//Alignment side clearance, to give nice fit (mm).
Alignment_Side_Clearance = 0.25; //0.01
//Alignment Depth Clearance, to prevent hitting bottom (mm).
Alignment_Depth_Clearance = .75; //0.01
/* [Hidden] */
//Detail
$fn=120;
HoseAdapter(
drawAlignmentRing = Draw_Alignment_Ring,
alignmentDepth = Alignment_Depth,
alignmentUpperWidth = Alignment_Upper_Width,
alignmentLowerWidth = Alignment_Lower_Width,
alignmentSideClearance = Alignment_Side_Clearance,
alignmentDepthClearance = Alignment_Depth_Clearance,
connector1Style = End1_Style,
connector1WallThickness = End1_Wall_Thickness,
connector1Measurement = End1_Measurement,
connector1Diameter = End1_Diameter,
connector1Length = End1_Length,
connector1Taper = End1_Taper,
connector1EndCapDiameter = End1_Hose_EndCap_Diameter,
connector1EndCapThickness = End1_Hose_EndCap_Thickness,
connector1StopThickness = End1_StopThickness,
connector1StopLength = End1_StopLength,
connector1StopSymmetrical = End1_Stop_Symmetrical,
connector1BarbsCount = End1_Barbs_Count,
connector1BarbsThickness = End1_Barbs_Thickness,
connector1BarbsSymmetrical = End1_Barbs_Symmetrical,
connector1MagnetCount = End1_Magnets_Count,
connector1MagnetDiameter = End1_Magnet_Diameter,
connector1MagnetThickness = End1_Magnet_Thickness,
connector1MagnetBorder = End1_Magnet_Border,
connector1MagnetFlangeThickness = End1_Magnet_Flange_Thickness,
connector1Ring = End1_Ring,
connector1FlangeWidth = End1_Flange_Width,
connector1FlangeThickness = End1_Flange_Thickness,
connector1FlangeScrewPosition = End1_Flange_Screw_Position,
connector1FlangeScrewBorder = End1_Flange_Screw_Border,
connector1FlangeScrewCount = End1_Flange_Screw_Count,
connector1FlangeScrewDiameter = End1_Flange_Screw_Diameter,
transitionStyle = Transition_Style,
transitionLength = Transition_Length,
transitionBendRadius = Transition_Bend_Radius,
transitionAngle = Transition_Angle,
transitionXOffset = Transition_xOffset,
transitionYOffset = Transition_yOffset,
transitionBaseType = Transition_Base_Type,
transitionBaseThickness = Transition_Base_Thickness,
transitionBaseWidth = Transition_Base_Width,
transitionBaseLength = Transition_Base_Length,
transitionBaseAngle = Transition_Base_Angle,
transitionEnd2Count = Transition_End2_Count,
transitionHullLength = Transition_HullLength,
transitionHullyOffset = Transition_HullyOffset,
connector2Style = End2_Style,
connector2WallThickness = End2_Wall_Thickness,
connector2Measurement = End2_Measurement,
connector2Diameter = End2_Diameter,
connector2Length = End2_Length,
connector2Taper = End2_Taper,
connector2EndCapDiameter = End2_Hose_EndCap_Diameter,
connector2EndCapThickness = End2_Hose_EndCap_Thickness,
connector2StopThickness = End2_StopThickness,
connector2StopLength = End2_StopLength,
connector2StopSymmetrical = End2_Stop_Symmetrical,
connector2BarbsCount = End2_Barbs_Count,
connector2BarbsThickness = End2_Barbs_Thickness,
connector2BarbsSymmetrical = End2_Barbs_Symmetrical,
connector2MagnetCount = End2_Magnets_Count,
connector2MagnetDiameter = End2_Magnet_Diameter,
connector2MagnetThickness = End2_Magnet_Thickness,
connector2MagnetBorder = End2_Magnet_Border,
connector2MagnetFlangeThickness = End2_Magnet_Flange_Thickness,
connector2Ring = End2_Ring,
connector2NozzleShape = End2_Nozzle_Shape,
connector2NozzleSquareWidth = End2_Nozzle_Square_Width,
connector2NozzleSquareDepth = End2_Nozzle_Square_Depth,
connector2NozzleTipWallThickness = End2_Nozzle_Tip_Wall_Thickness,
connector2NozzleRadius = End2_Nozzle_Radius,
connector2NozzleLength = End2_Nozzle_Length,
connector2NozzlexOffset = End2_Nozzle_xOffset,
connector2NozzleyOffset = End2_Nozzle_yOffset,
connector2NozzleChamferPercentage = End2_Nozzle_Chamfer_Percentage,
connector2NozzleChamferAngle = End2_Nozzle_Chamfer_Angle
);