Last active
March 26, 2022 15:45
-
-
Save patmandenver/0395db753108bea7474b688142b553e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Patrick Bailey iQless.com | |
// | |
//////////////////////////////////////// | |
$fn=200; | |
inner_dia = 33.7; | |
outer_dia = 44; | |
hole_depth = 30; | |
pipe_angle=10; | |
support_thickness=16; | |
2x4_thickness=7; | |
pvc_pipe_holder(pipe_angle, inner_dia, outer_dia, hole_depth, 2x4_thickness, support_thickness); | |
module pvc_pipe_holder(pipe_angle, inner_dia, outer_dia, hole_depth, 2x4_thickness, support_thickness){ | |
difference(){ | |
union(){ | |
base(outer_dia, 2x4_thickness); | |
pvc_cylinder(pipe_angle, outer_dia, hole_depth, 2x4_thickness, | |
2x4_thickness/10, 0); | |
braces(support_thickness, pipe_angle, outer_dia, hole_depth, | |
2x4_thickness, 2x4_thickness/10); | |
} | |
pvc_cylinder(pipe_angle, inner_dia, hole_depth, 2x4_thickness, -.5, 1); | |
} | |
} | |
module braces(support_thickness, pipe_angle, outer_dia, hole_depth, 2x4_thickness, nudge){ | |
mirror_copy([0,1,0]){ | |
brace(support_thickness, pipe_angle, outer_dia, hole_depth, | |
2x4_thickness, nudge); | |
} | |
} | |
module brace(support_thickness, pipe_angle, outer_dia, hole_depth, | |
2x4_thickness, nudge){ | |
x1 = sin(pipe_angle)*hole_depth; | |
z1 = cos(pipe_angle)*hole_depth + nudge; | |
x2 = cos(pipe_angle)*outer_dia/2; | |
z2 = sin(pipe_angle)*outer_dia/2; | |
left_x = -x1 - x2; | |
left_z = z1 - z2; | |
right_x = -x1 + x2; | |
right_z = z1 + z2; | |
color("purple"){ | |
translate([0,outer_dia/2, 2x4_thickness - nudge]){ | |
rotate([90,0,0]){ | |
linear_extrude(support_thickness){ | |
polygon(points = | |
[[-outer_dia, 0], | |
[left_x, left_z], | |
[right_x, right_z], | |
[outer_dia, 0] | |
]); | |
} | |
} | |
} | |
} | |
} | |
module mirror_copy(v = [1, 0, 0]) { | |
children(); | |
mirror(v) children(); | |
} | |
module pvc_cylinder(angle, dia, depth, 2x4_thickness, nudge, top_nudge){ | |
color("red"){ | |
difference(){ | |
extend = tan(angle)*(dia/2) + nudge; | |
nudge_x = extend*sin(angle); | |
nudge_z = -cos(angle)*extend; | |
translate([nudge_x,0,2x4_thickness + nudge_z]){ | |
rotate(angle, [0,-1,0]){ | |
linear_extrude(depth + extend + top_nudge){ | |
circle(d=dia); | |
} | |
} | |
} | |
translate([-1.5*dia, -1.5*dia, -3*dia + 2x4_thickness - nudge]){ | |
cube(3*dia); | |
} | |
} | |
} | |
} | |
module base(dia, thickness){ | |
color("orange"){ | |
difference(){ | |
linear_extrude(thickness){ | |
hull(){ | |
translate([dia,0,0]){ | |
circle(d = dia); | |
} | |
translate([-dia,0,0]){ | |
circle(d = dia); | |
} | |
} | |
} | |
//} | |
//color("blue"){ | |
//screw holes | |
translate([dia,0,-1]){ | |
cylinder(thickness+2, 2.5, 2.5, $fn=6); | |
translate([0,0, thickness/2+1]){ | |
cylinder(thickness/2+1, 5, 5, $fn=6); | |
} | |
} | |
translate([-dia,0,-1]){ | |
cylinder(thickness+2, 2.5, 2.5, $fn=6); | |
translate([0,0, thickness/2+1]){ | |
cylinder(thickness/2+1, 5, 5, $fn=6); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment