-
Notifications
You must be signed in to change notification settings - Fork 19
/
wall_pipe_support.scad
119 lines (100 loc) · 3.25 KB
/
wall_pipe_support.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
$fn = 60;
LENGTH = 180;
WIDTH = 150;
THICKNESS = 5;
OBLONG_DIAMETER = 5.5;
OBLONG_LENGTH = 15;
TUBE_DIAMETER = 26.9;
BOLT_DIAMETER = 4.5;
BOLT_HEAD_DIAMETER = 9;
NUT_DIAMETER = 8.25;
NUT_HEIGHT = 6;
module roundedBox(w,h,d,f){
difference(){
cube(size=[w, h, d], center=true);
translate([-w/2,h/2,0]) cube(w/(f/2),true);
translate([w/2,h/2,0]) cube(w/(f/2),true);
translate([-w/2,-h/2,0]) cube(w/(f/2),true);
translate([w/2,-h/2,0]) cube(w/(f/2),true);
}
translate([-w/2+w/f,h/2-w/f,-d/2]) cylinder(d,w/f, w/f);
translate([w/2-w/f,h/2-w/f,-d/2]) cylinder(d,w/f, w/f);
translate([-w/2+w/f,-h/2+w/f,-d/2]) cylinder(d,w/f, w/f);
translate([w/2-w/f,-h/2+w/f,-d/2]) cylinder(d,w/f, w/f);
}
module oblong(diameter, length, thickness) {
translate([-length / 2, 0, 0]) {
hull() {
cylinder(d=diameter, h=thickness);
translate([length, 0, 0]) {
cylinder(d=diameter, h=thickness);
}
}
}
}
module nut(diameter, height) {
cylinder(d=diameter, h=height, $fn=6);
//%cylinder(d=7.8, h=height, $fn=40);
}
module tube_holder(diameter, length) {
difference() {
hull() {
cube(size=[diameter * 3, length, 1], center=true);
translate([0, length / 2, diameter]) {
rotate([90, 0, 0]) {
cylinder(d=diameter * 2, h=length);
}
}
}
translate([0, length, diameter]) {
rotate([90, 0, 0]) {
cylinder(d=diameter, h=length * 2);
}
}
translate([0, 0, diameter * 2 - 3]) {
cylinder(d=BOLT_HEAD_DIAMETER, h=diameter);
}
cylinder(d=BOLT_DIAMETER, h=diameter * 2);
}
}
module main() {
item_position = LENGTH / 2 - 35;
difference() {
union() {
difference() {
roundedBox(LENGTH, WIDTH, THICKNESS, 10);
for (position = [
[item_position, WIDTH / 2 - 15, 0],
[-item_position, WIDTH / 2 - 15, 0],
[item_position, -(WIDTH / 2 - 15), 0],
[-item_position, -(WIDTH / 2 - 15), 0],
]) {
translate(position) {
translate([0, 0, -THICKNESS]) {
oblong(OBLONG_DIAMETER, OBLONG_LENGTH, THICKNESS * 2);
}
}
}
roundedBox(LENGTH / 3.5, WIDTH / 1.8, THICKNESS * 2, 10);
}
for (x=[item_position, -item_position]) {
translate([x, 0, 0]) {
rotate([0, 0, 90]) {
tube_holder(TUBE_DIAMETER, 30);
}
}
}
}
for (x=[item_position, -item_position]) {
translate([x, 0, -THICKNESS / 2 - .1]) {
nut(NUT_DIAMETER, NUT_HEIGHT);
}
}
}
}
// Test
intersection() { translate([0, 0, 27]) cube(size=[43, 50, 35], center=true); tube_holder(TUBE_DIAMETER, 30); }
tube_holder(TUBE_DIAMETER, 30);
oblong(OBLONG_DIAMETER, OBLONG_LENGTH, THICKNESS);
difference() { cylinder(d=15, h=10); translate([0, 0, -.1]) nut(NUT_DIAMETER, NUT_HEIGHT); cylinder(d=BOLT_DIAMETER, h=100); }
!main();