4357 |
jacho |
1 |
use <text/Write.scad> |
|
|
2 |
include <manufactury_conf.scad> |
|
|
3 |
include <../configuration.scad> |
|
|
4 |
/* |
|
|
5 |
pocet_der1=5; |
|
|
6 |
pocet_der2=3; |
|
|
7 |
radidus_hrany=5; |
|
|
8 |
vzdalenost_der=10.16; |
|
|
9 |
vzdalenost_od_okraje=8.8; |
|
|
10 |
prumer_sroubu=3.3; |
|
|
11 |
|
|
|
12 |
tloustka_plbase=2; |
|
|
13 |
prekryti_der=0.3; |
|
|
14 |
|
|
|
15 |
vyska_nozicky=5; |
|
|
16 |
|
|
|
17 |
vyska_hlavy = 3.5; |
|
|
18 |
prumer_hlavy=6; |
|
|
19 |
*/ |
|
|
20 |
|
|
|
21 |
//PLBASE ZAKLADNI |
|
|
22 |
//------------------------------------------------------------ |
|
|
23 |
module plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der,tloustka_bocnice){ |
|
|
24 |
|
|
|
25 |
difference () { |
|
|
26 |
//union () { |
|
|
27 |
translate([radidus_hrany,radidus_hrany,0]) |
|
|
28 |
minkowski() |
|
|
29 |
{ |
|
|
30 |
cube([(pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice,(pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice,tloustka_plbase]); // base plastics brick |
|
|
31 |
cylinder(r=radidus_hrany,h=0.1); |
|
|
32 |
} |
|
|
33 |
|
|
|
34 |
|
|
|
35 |
for (i = [0:1:pocet_der1-1]) { |
|
|
36 |
for (a = [0:1:pocet_der2-1]) { |
|
|
37 |
|
|
|
38 |
translate([vzdalenost_od_okraje+vzdalenost_der*i,vzdalenost_od_okraje+vzdalenost_der*a, (tloustka_plbase-prekryti_der)/2]) // center top screw |
|
|
39 |
cylinder(((tloustka_plbase-prekryti_der)), d=prumer_sroubu, center=true); |
|
|
40 |
} |
|
|
41 |
} |
|
|
42 |
|
|
|
43 |
|
|
|
44 |
} |
|
|
45 |
} |
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
//MODEL NOZICKY PRO PLBASE |
|
|
50 |
//----------------------------------------------------------- |
|
|
51 |
//průmer nozicky je roven vzdalenost_der |
|
|
52 |
module nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy) |
|
|
53 |
{ |
|
|
54 |
difference () { |
|
|
55 |
translate([0,0,-vyska_nozicky/2]) |
|
|
56 |
cylinder((vyska_nozicky), d=vzdalenost_der, center=true); |
|
|
57 |
translate([0,0,-(vyska_nozicky-vyska_hlavy/2)]) |
|
|
58 |
cylinder((vyska_hlavy), d=prumer_hlavy, center=true); |
|
|
59 |
translate([0,0,-vyska_nozicky/2]) |
|
|
60 |
cylinder((vyska_nozicky), d=prumer_sroubu, center=true); |
|
|
61 |
} |
|
|
62 |
} |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
//PLBASE S NOZICKAMA |
|
|
67 |
//----------------------------------------------------------- |
|
|
68 |
module plbase_s_nozickama(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der,vyska_nozicky,vyska_hlavy,prumer_hlavy){ |
|
|
69 |
|
|
|
70 |
plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der); |
|
|
71 |
|
|
|
72 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje, (tloustka_plbase)]) // center top screw |
|
|
73 |
rotate(a=[180,0,0]) |
|
|
74 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
|
|
75 |
|
|
|
76 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje, tloustka_plbase]) // center top screw |
|
|
77 |
rotate(a=[180,0,0]) |
|
|
78 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
|
|
79 |
|
|
|
80 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase)]) // center top screw |
|
|
81 |
rotate(a=[180,0,0]) |
|
|
82 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
|
|
83 |
|
|
|
84 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase)]) // center top screw |
|
|
85 |
rotate(a=[180,0,0]) |
|
|
86 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
|
|
87 |
|
|
|
88 |
|
|
|
89 |
} |
|
|
90 |
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
//PLBASE SE ZAPUSTENIM SROUBU |
|
|
94 |
//------------------------------------------------------ |
|
|
95 |
module plbase_zapustene_srouby(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,vyska_hlavy,prekryti_der,prumer_hlavy){ |
|
|
96 |
difference () { |
|
|
97 |
plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,(vyska_hlavy+1.5),prekryti_der); |
|
|
98 |
|
|
|
99 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje, 1.5+(vyska_hlavy/2)]) // center top screw |
|
|
100 |
cylinder(((vyska_hlavy+0.5)), d=prumer_hlavy, center=true); |
|
|
101 |
|
|
|
102 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje, 1.5+(vyska_hlavy/2)]) // center top screw |
|
|
103 |
cylinder(((vyska_hlavy+0.5)), d=prumer_hlavy, center=true); |
|
|
104 |
|
|
|
105 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, 1.5+(vyska_hlavy/2)]) // center top screw |
|
|
106 |
cylinder(((vyska_hlavy+0.5)), d=prumer_hlavy, center=true); |
|
|
107 |
|
|
|
108 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, 1.5+(vyska_hlavy/2)]) // center top screw |
|
|
109 |
cylinder(((vyska_hlavy+0.5)), d=prumer_hlavy, center=true); |
|
|
110 |
|
|
|
111 |
} |
|
|
112 |
} |
|
|
113 |
|
|
|
114 |
|
|
|
115 |
//PLBASE S NOZICKAMA polovicni pro tisk |
|
|
116 |
//----------------------------------------------------------- |
|
|
117 |
module plbase_s_nozickama_polovicni(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der,vyska_nozicky,vyska_hlavy,prumer_hlavy){ |
|
|
118 |
|
|
|
119 |
difference() |
|
|
120 |
{ |
|
|
121 |
plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der); |
|
|
122 |
|
|
|
123 |
|
|
|
124 |
translate([-1,-1, -1]) |
|
|
125 |
|
|
|
126 |
cube([(pocet_der1+1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany,1+((pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany)/2,tloustka_plbase+15]); |
|
|
127 |
} |
|
|
128 |
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase)]) // center top screw |
|
|
132 |
rotate(a=[180,0,0]) |
|
|
133 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
|
|
134 |
|
|
|
135 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase)]) // center top screw |
|
|
136 |
rotate(a=[180,0,0]) |
|
|
137 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
|
|
138 |
|
|
|
139 |
|
|
|
140 |
|
|
|
141 |
|
|
|
142 |
} |
|
|
143 |
|
|
|
144 |
//PLBASE polovicni pro tisk |
|
|
145 |
//----------------------------------------------------------- |
|
|
146 |
module plbase_polovicni(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der,vyska_nozicky,vyska_hlavy,prumer_hlavy){ |
|
|
147 |
|
|
|
148 |
difference() |
|
|
149 |
{ |
|
|
150 |
plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der); |
|
|
151 |
|
|
|
152 |
|
|
|
153 |
translate([-1,-1, -1]) |
|
|
154 |
|
|
|
155 |
cube([(pocet_der1+1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany,1+((pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany)/2,tloustka_plbase+15]); |
|
|
156 |
} |
|
|
157 |
|
|
|
158 |
|
|
|
159 |
} |
|
|
160 |
//PLBASE ZAKLADNI - bez der s napisem produktu |
|
|
161 |
//------------------------------------------------------------ |
|
|
162 |
module plbase_bez_der_napis(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der,box_jmeno,tloustka_bocnice){ |
|
|
163 |
|
|
|
164 |
|
|
|
165 |
|
|
|
166 |
difference () { |
|
|
167 |
//union () { |
|
|
168 |
translate([radidus_hrany,radidus_hrany,0]) |
|
|
169 |
minkowski() |
|
|
170 |
{ |
|
|
171 |
cube([(pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice,(pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice,tloustka_plbase]); // base plastics brick |
|
|
172 |
cylinder(r=radidus_hrany,h=0.1); |
|
|
173 |
} |
|
|
174 |
translate([radidus_hrany,radidus_hrany,0]) |
|
|
175 |
translate([ ((pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany)/2+tloustka_bocnice, ((pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany)/2+tloustka_bocnice, tloustka_plbase/2+1]) |
|
|
176 |
rotate([0,0,0]) |
|
|
177 |
write(box_jmeno,h=10,t=tloustka_plbase-1, space= 1.1, font = "Letters.dxf",center=true); |
|
|
178 |
|
|
|
179 |
|
|
|
180 |
translate([vzdalenost_od_okraje+tloustka_bocnice,vzdalenost_od_okraje+tloustka_bocnice, (tloustka_plbase/2)]) // center top screw |
|
|
181 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
|
|
182 |
|
|
|
183 |
translate([vzdalenost_od_okraje+tloustka_bocnice+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+tloustka_bocnice, (tloustka_plbase/2)]) // center top screw |
|
|
184 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
|
|
185 |
|
|
|
186 |
translate([vzdalenost_od_okraje+tloustka_bocnice+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+tloustka_bocnice+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
|
|
187 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
|
|
188 |
|
|
|
189 |
translate([vzdalenost_od_okraje+tloustka_bocnice,vzdalenost_od_okraje+tloustka_bocnice+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
|
|
190 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
|
|
191 |
|
|
|
192 |
} |
|
|
193 |
} |
|
|
194 |
|
|
|
195 |
|
|
|
196 |
|
|
|
197 |
|
|
|
198 |
|
|
|
199 |
|
|
|
200 |
|
|
|
201 |
|
|
|
202 |
|