improve keycad retention, cable hole size 7mm
This commit is contained in:
parent
a1bfc86374
commit
05c67b79aa
11 changed files with 841 additions and 2376 deletions
841
cad/20250510_keycap-Parthandcontroller_buttonV2.step
Normal file
841
cad/20250510_keycap-Parthandcontroller_buttonV2.step
Normal file
|
@ -0,0 +1,841 @@
|
|||
ISO-10303-21;
|
||||
HEADER;
|
||||
FILE_DESCRIPTION(('FreeCAD Model'),'2;1');
|
||||
FILE_NAME('Open CASCADE Shape Model','2025-05-11T12:15:39',(''),(''),
|
||||
'Open CASCADE STEP processor 7.8','FreeCAD','Unknown');
|
||||
FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }'));
|
||||
ENDSEC;
|
||||
DATA;
|
||||
#1 = APPLICATION_PROTOCOL_DEFINITION('international standard',
|
||||
'automotive_design',2000,#2);
|
||||
#2 = APPLICATION_CONTEXT(
|
||||
'core data for automotive mechanical design processes');
|
||||
#3 = SHAPE_DEFINITION_REPRESENTATION(#4,#10);
|
||||
#4 = PRODUCT_DEFINITION_SHAPE('','',#5);
|
||||
#5 = PRODUCT_DEFINITION('design','',#6,#9);
|
||||
#6 = PRODUCT_DEFINITION_FORMATION('','',#7);
|
||||
#7 = PRODUCT('handcontroller_buttonV2','handcontroller_buttonV2','',(#8)
|
||||
);
|
||||
#8 = PRODUCT_CONTEXT('',#2,'mechanical');
|
||||
#9 = PRODUCT_DEFINITION_CONTEXT('part definition',#2,'design');
|
||||
#10 = ADVANCED_BREP_SHAPE_REPRESENTATION('',(#11,#15),#801);
|
||||
#11 = AXIS2_PLACEMENT_3D('',#12,#13,#14);
|
||||
#12 = CARTESIAN_POINT('',(0.,0.,0.));
|
||||
#13 = DIRECTION('',(0.,0.,1.));
|
||||
#14 = DIRECTION('',(1.,0.,-0.));
|
||||
#15 = MANIFOLD_SOLID_BREP('',#16);
|
||||
#16 = CLOSED_SHELL('',(#17,#45,#70,#95,#120,#150,#175,#184,#204,#229,
|
||||
#254,#361,#392,#424,#456,#480,#512,#544,#568,#600,#632,#656,#688,
|
||||
#713,#730,#765,#777,#789));
|
||||
#17 = ADVANCED_FACE('',(#18,#29),#40,.F.);
|
||||
#18 = FACE_BOUND('',#19,.T.);
|
||||
#19 = EDGE_LOOP('',(#20));
|
||||
#20 = ORIENTED_EDGE('',*,*,#21,.F.);
|
||||
#21 = EDGE_CURVE('',#22,#22,#24,.T.);
|
||||
#22 = VERTEX_POINT('',#23);
|
||||
#23 = CARTESIAN_POINT('',(0.,8.,16.));
|
||||
#24 = CIRCLE('',#25,8.);
|
||||
#25 = AXIS2_PLACEMENT_3D('',#26,#27,#28);
|
||||
#26 = CARTESIAN_POINT('',(0.,0.,16.));
|
||||
#27 = DIRECTION('',(0.,0.,-1.));
|
||||
#28 = DIRECTION('',(0.,1.,0.));
|
||||
#29 = FACE_BOUND('',#30,.T.);
|
||||
#30 = EDGE_LOOP('',(#31));
|
||||
#31 = ORIENTED_EDGE('',*,*,#32,.T.);
|
||||
#32 = EDGE_CURVE('',#33,#33,#35,.T.);
|
||||
#33 = VERTEX_POINT('',#34);
|
||||
#34 = CARTESIAN_POINT('',(0.,5.5,16.));
|
||||
#35 = CIRCLE('',#36,5.5);
|
||||
#36 = AXIS2_PLACEMENT_3D('',#37,#38,#39);
|
||||
#37 = CARTESIAN_POINT('',(0.,0.,16.));
|
||||
#38 = DIRECTION('',(0.,0.,-1.));
|
||||
#39 = DIRECTION('',(0.,1.,0.));
|
||||
#40 = PLANE('',#41);
|
||||
#41 = AXIS2_PLACEMENT_3D('',#42,#43,#44);
|
||||
#42 = CARTESIAN_POINT('',(0.,0.,16.));
|
||||
#43 = DIRECTION('',(-0.,-0.,-1.));
|
||||
#44 = DIRECTION('',(0.,1.,0.));
|
||||
#45 = ADVANCED_FACE('',(#46),#65,.T.);
|
||||
#46 = FACE_BOUND('',#47,.T.);
|
||||
#47 = EDGE_LOOP('',(#48,#56,#57,#58));
|
||||
#48 = ORIENTED_EDGE('',*,*,#49,.F.);
|
||||
#49 = EDGE_CURVE('',#22,#50,#52,.T.);
|
||||
#50 = VERTEX_POINT('',#51);
|
||||
#51 = CARTESIAN_POINT('',(0.,9.,15.));
|
||||
#52 = LINE('',#53,#54);
|
||||
#53 = CARTESIAN_POINT('',(0.,9.,15.));
|
||||
#54 = VECTOR('',#55,1.);
|
||||
#55 = DIRECTION('',(0.,0.707106781187,-0.707106781187));
|
||||
#56 = ORIENTED_EDGE('',*,*,#21,.T.);
|
||||
#57 = ORIENTED_EDGE('',*,*,#49,.T.);
|
||||
#58 = ORIENTED_EDGE('',*,*,#59,.F.);
|
||||
#59 = EDGE_CURVE('',#50,#50,#60,.T.);
|
||||
#60 = CIRCLE('',#61,9.);
|
||||
#61 = AXIS2_PLACEMENT_3D('',#62,#63,#64);
|
||||
#62 = CARTESIAN_POINT('',(0.,0.,15.));
|
||||
#63 = DIRECTION('',(0.,0.,-1.));
|
||||
#64 = DIRECTION('',(0.,1.,0.));
|
||||
#65 = CONICAL_SURFACE('',#66,9.,0.785398163397);
|
||||
#66 = AXIS2_PLACEMENT_3D('',#67,#68,#69);
|
||||
#67 = CARTESIAN_POINT('',(0.,0.,15.));
|
||||
#68 = DIRECTION('',(0.,0.,-1.));
|
||||
#69 = DIRECTION('',(0.,1.,0.));
|
||||
#70 = ADVANCED_FACE('',(#71),#90,.T.);
|
||||
#71 = FACE_BOUND('',#72,.T.);
|
||||
#72 = EDGE_LOOP('',(#73,#82,#88,#89));
|
||||
#73 = ORIENTED_EDGE('',*,*,#74,.T.);
|
||||
#74 = EDGE_CURVE('',#75,#75,#77,.T.);
|
||||
#75 = VERTEX_POINT('',#76);
|
||||
#76 = CARTESIAN_POINT('',(0.,5.5,22.));
|
||||
#77 = CIRCLE('',#78,5.5);
|
||||
#78 = AXIS2_PLACEMENT_3D('',#79,#80,#81);
|
||||
#79 = CARTESIAN_POINT('',(0.,0.,22.));
|
||||
#80 = DIRECTION('',(0.,0.,-1.));
|
||||
#81 = DIRECTION('',(0.,1.,0.));
|
||||
#82 = ORIENTED_EDGE('',*,*,#83,.T.);
|
||||
#83 = EDGE_CURVE('',#75,#33,#84,.T.);
|
||||
#84 = LINE('',#85,#86);
|
||||
#85 = CARTESIAN_POINT('',(0.,5.5,22.));
|
||||
#86 = VECTOR('',#87,1.);
|
||||
#87 = DIRECTION('',(0.,0.,-1.));
|
||||
#88 = ORIENTED_EDGE('',*,*,#32,.F.);
|
||||
#89 = ORIENTED_EDGE('',*,*,#83,.F.);
|
||||
#90 = CYLINDRICAL_SURFACE('',#91,5.5);
|
||||
#91 = AXIS2_PLACEMENT_3D('',#92,#93,#94);
|
||||
#92 = CARTESIAN_POINT('',(0.,0.,22.));
|
||||
#93 = DIRECTION('',(-0.,-0.,-1.));
|
||||
#94 = DIRECTION('',(0.,1.,0.));
|
||||
#95 = ADVANCED_FACE('',(#96),#115,.T.);
|
||||
#96 = FACE_BOUND('',#97,.T.);
|
||||
#97 = EDGE_LOOP('',(#98,#106,#107,#108));
|
||||
#98 = ORIENTED_EDGE('',*,*,#99,.F.);
|
||||
#99 = EDGE_CURVE('',#50,#100,#102,.T.);
|
||||
#100 = VERTEX_POINT('',#101);
|
||||
#101 = CARTESIAN_POINT('',(0.,9.,8.));
|
||||
#102 = LINE('',#103,#104);
|
||||
#103 = CARTESIAN_POINT('',(0.,9.,16.));
|
||||
#104 = VECTOR('',#105,1.);
|
||||
#105 = DIRECTION('',(0.,0.,-1.));
|
||||
#106 = ORIENTED_EDGE('',*,*,#59,.T.);
|
||||
#107 = ORIENTED_EDGE('',*,*,#99,.T.);
|
||||
#108 = ORIENTED_EDGE('',*,*,#109,.F.);
|
||||
#109 = EDGE_CURVE('',#100,#100,#110,.T.);
|
||||
#110 = CIRCLE('',#111,9.);
|
||||
#111 = AXIS2_PLACEMENT_3D('',#112,#113,#114);
|
||||
#112 = CARTESIAN_POINT('',(0.,0.,8.));
|
||||
#113 = DIRECTION('',(0.,0.,-1.));
|
||||
#114 = DIRECTION('',(0.,1.,0.));
|
||||
#115 = CYLINDRICAL_SURFACE('',#116,9.);
|
||||
#116 = AXIS2_PLACEMENT_3D('',#117,#118,#119);
|
||||
#117 = CARTESIAN_POINT('',(0.,0.,16.));
|
||||
#118 = DIRECTION('',(-0.,-0.,-1.));
|
||||
#119 = DIRECTION('',(0.,1.,0.));
|
||||
#120 = ADVANCED_FACE('',(#121),#141,.F.);
|
||||
#121 = FACE_BOUND('',#122,.F.);
|
||||
#122 = EDGE_LOOP('',(#123,#124,#133,#140));
|
||||
#123 = ORIENTED_EDGE('',*,*,#74,.T.);
|
||||
#124 = ORIENTED_EDGE('',*,*,#125,.T.);
|
||||
#125 = EDGE_CURVE('',#75,#126,#128,.T.);
|
||||
#126 = VERTEX_POINT('',#127);
|
||||
#127 = CARTESIAN_POINT('',(0.,1.,23.5));
|
||||
#128 = CIRCLE('',#129,7.5);
|
||||
#129 = AXIS2_PLACEMENT_3D('',#130,#131,#132);
|
||||
#130 = CARTESIAN_POINT('',(0.,1.,16.));
|
||||
#131 = DIRECTION('',(1.,0.,0.));
|
||||
#132 = DIRECTION('',(0.,1.,0.));
|
||||
#133 = ORIENTED_EDGE('',*,*,#134,.F.);
|
||||
#134 = EDGE_CURVE('',#126,#126,#135,.T.);
|
||||
#135 = CIRCLE('',#136,1.);
|
||||
#136 = AXIS2_PLACEMENT_3D('',#137,#138,#139);
|
||||
#137 = CARTESIAN_POINT('',(0.,0.,23.5));
|
||||
#138 = DIRECTION('',(0.,0.,-1.));
|
||||
#139 = DIRECTION('',(0.,1.,0.));
|
||||
#140 = ORIENTED_EDGE('',*,*,#125,.F.);
|
||||
#141 = SURFACE_OF_REVOLUTION('',#142,#147);
|
||||
#142 = CIRCLE('',#143,7.5);
|
||||
#143 = AXIS2_PLACEMENT_3D('',#144,#145,#146);
|
||||
#144 = CARTESIAN_POINT('',(0.,1.,16.));
|
||||
#145 = DIRECTION('',(1.,0.,0.));
|
||||
#146 = DIRECTION('',(0.,1.,0.));
|
||||
#147 = AXIS1_PLACEMENT('',#148,#149);
|
||||
#148 = CARTESIAN_POINT('',(0.,0.,0.));
|
||||
#149 = DIRECTION('',(-0.,-0.,-1.));
|
||||
#150 = ADVANCED_FACE('',(#151),#170,.T.);
|
||||
#151 = FACE_BOUND('',#152,.T.);
|
||||
#152 = EDGE_LOOP('',(#153,#161,#162,#163));
|
||||
#153 = ORIENTED_EDGE('',*,*,#154,.F.);
|
||||
#154 = EDGE_CURVE('',#100,#155,#157,.T.);
|
||||
#155 = VERTEX_POINT('',#156);
|
||||
#156 = CARTESIAN_POINT('',(0.,8.,7.));
|
||||
#157 = LINE('',#158,#159);
|
||||
#158 = CARTESIAN_POINT('',(0.,9.,8.));
|
||||
#159 = VECTOR('',#160,1.);
|
||||
#160 = DIRECTION('',(0.,-0.707106781187,-0.707106781187));
|
||||
#161 = ORIENTED_EDGE('',*,*,#109,.T.);
|
||||
#162 = ORIENTED_EDGE('',*,*,#154,.T.);
|
||||
#163 = ORIENTED_EDGE('',*,*,#164,.F.);
|
||||
#164 = EDGE_CURVE('',#155,#155,#165,.T.);
|
||||
#165 = CIRCLE('',#166,8.);
|
||||
#166 = AXIS2_PLACEMENT_3D('',#167,#168,#169);
|
||||
#167 = CARTESIAN_POINT('',(0.,0.,7.));
|
||||
#168 = DIRECTION('',(0.,0.,-1.));
|
||||
#169 = DIRECTION('',(0.,1.,0.));
|
||||
#170 = CONICAL_SURFACE('',#171,9.,0.785398163397);
|
||||
#171 = AXIS2_PLACEMENT_3D('',#172,#173,#174);
|
||||
#172 = CARTESIAN_POINT('',(0.,0.,8.));
|
||||
#173 = DIRECTION('',(-0.,-0.,1.));
|
||||
#174 = DIRECTION('',(0.,1.,0.));
|
||||
#175 = ADVANCED_FACE('',(#176),#179,.F.);
|
||||
#176 = FACE_BOUND('',#177,.F.);
|
||||
#177 = EDGE_LOOP('',(#178));
|
||||
#178 = ORIENTED_EDGE('',*,*,#134,.T.);
|
||||
#179 = PLANE('',#180);
|
||||
#180 = AXIS2_PLACEMENT_3D('',#181,#182,#183);
|
||||
#181 = CARTESIAN_POINT('',(0.,0.,23.5));
|
||||
#182 = DIRECTION('',(-0.,-0.,-1.));
|
||||
#183 = DIRECTION('',(0.,1.,0.));
|
||||
#184 = ADVANCED_FACE('',(#185,#188),#199,.T.);
|
||||
#185 = FACE_BOUND('',#186,.T.);
|
||||
#186 = EDGE_LOOP('',(#187));
|
||||
#187 = ORIENTED_EDGE('',*,*,#164,.T.);
|
||||
#188 = FACE_BOUND('',#189,.T.);
|
||||
#189 = EDGE_LOOP('',(#190));
|
||||
#190 = ORIENTED_EDGE('',*,*,#191,.F.);
|
||||
#191 = EDGE_CURVE('',#192,#192,#194,.T.);
|
||||
#192 = VERTEX_POINT('',#193);
|
||||
#193 = CARTESIAN_POINT('',(0.,5.5,7.));
|
||||
#194 = CIRCLE('',#195,5.5);
|
||||
#195 = AXIS2_PLACEMENT_3D('',#196,#197,#198);
|
||||
#196 = CARTESIAN_POINT('',(0.,0.,7.));
|
||||
#197 = DIRECTION('',(0.,0.,-1.));
|
||||
#198 = DIRECTION('',(0.,1.,0.));
|
||||
#199 = PLANE('',#200);
|
||||
#200 = AXIS2_PLACEMENT_3D('',#201,#202,#203);
|
||||
#201 = CARTESIAN_POINT('',(0.,0.,7.));
|
||||
#202 = DIRECTION('',(-0.,-0.,-1.));
|
||||
#203 = DIRECTION('',(0.,1.,0.));
|
||||
#204 = ADVANCED_FACE('',(#205),#224,.T.);
|
||||
#205 = FACE_BOUND('',#206,.T.);
|
||||
#206 = EDGE_LOOP('',(#207,#215,#216,#217));
|
||||
#207 = ORIENTED_EDGE('',*,*,#208,.F.);
|
||||
#208 = EDGE_CURVE('',#192,#209,#211,.T.);
|
||||
#209 = VERTEX_POINT('',#210);
|
||||
#210 = CARTESIAN_POINT('',(0.,5.5,4.));
|
||||
#211 = LINE('',#212,#213);
|
||||
#212 = CARTESIAN_POINT('',(0.,5.5,7.));
|
||||
#213 = VECTOR('',#214,1.);
|
||||
#214 = DIRECTION('',(0.,0.,-1.));
|
||||
#215 = ORIENTED_EDGE('',*,*,#191,.T.);
|
||||
#216 = ORIENTED_EDGE('',*,*,#208,.T.);
|
||||
#217 = ORIENTED_EDGE('',*,*,#218,.F.);
|
||||
#218 = EDGE_CURVE('',#209,#209,#219,.T.);
|
||||
#219 = CIRCLE('',#220,5.5);
|
||||
#220 = AXIS2_PLACEMENT_3D('',#221,#222,#223);
|
||||
#221 = CARTESIAN_POINT('',(0.,0.,4.));
|
||||
#222 = DIRECTION('',(0.,0.,-1.));
|
||||
#223 = DIRECTION('',(0.,1.,0.));
|
||||
#224 = CYLINDRICAL_SURFACE('',#225,5.5);
|
||||
#225 = AXIS2_PLACEMENT_3D('',#226,#227,#228);
|
||||
#226 = CARTESIAN_POINT('',(0.,0.,7.));
|
||||
#227 = DIRECTION('',(-0.,-0.,-1.));
|
||||
#228 = DIRECTION('',(0.,1.,0.));
|
||||
#229 = ADVANCED_FACE('',(#230),#249,.T.);
|
||||
#230 = FACE_BOUND('',#231,.T.);
|
||||
#231 = EDGE_LOOP('',(#232,#240,#241,#242));
|
||||
#232 = ORIENTED_EDGE('',*,*,#233,.F.);
|
||||
#233 = EDGE_CURVE('',#209,#234,#236,.T.);
|
||||
#234 = VERTEX_POINT('',#235);
|
||||
#235 = CARTESIAN_POINT('',(0.,4.5,3.));
|
||||
#236 = LINE('',#237,#238);
|
||||
#237 = CARTESIAN_POINT('',(0.,5.5,4.));
|
||||
#238 = VECTOR('',#239,1.);
|
||||
#239 = DIRECTION('',(0.,-0.707106781187,-0.707106781187));
|
||||
#240 = ORIENTED_EDGE('',*,*,#218,.T.);
|
||||
#241 = ORIENTED_EDGE('',*,*,#233,.T.);
|
||||
#242 = ORIENTED_EDGE('',*,*,#243,.F.);
|
||||
#243 = EDGE_CURVE('',#234,#234,#244,.T.);
|
||||
#244 = CIRCLE('',#245,4.5);
|
||||
#245 = AXIS2_PLACEMENT_3D('',#246,#247,#248);
|
||||
#246 = CARTESIAN_POINT('',(0.,0.,3.));
|
||||
#247 = DIRECTION('',(0.,0.,-1.));
|
||||
#248 = DIRECTION('',(0.,1.,0.));
|
||||
#249 = CONICAL_SURFACE('',#250,5.5,0.785398163397);
|
||||
#250 = AXIS2_PLACEMENT_3D('',#251,#252,#253);
|
||||
#251 = CARTESIAN_POINT('',(0.,0.,4.));
|
||||
#252 = DIRECTION('',(-0.,-0.,1.));
|
||||
#253 = DIRECTION('',(0.,1.,0.));
|
||||
#254 = ADVANCED_FACE('',(#255,#258),#356,.T.);
|
||||
#255 = FACE_BOUND('',#256,.F.);
|
||||
#256 = EDGE_LOOP('',(#257));
|
||||
#257 = ORIENTED_EDGE('',*,*,#243,.F.);
|
||||
#258 = FACE_BOUND('',#259,.F.);
|
||||
#259 = EDGE_LOOP('',(#260,#270,#278,#286,#294,#302,#310,#318,#326,#334,
|
||||
#342,#350));
|
||||
#260 = ORIENTED_EDGE('',*,*,#261,.T.);
|
||||
#261 = EDGE_CURVE('',#262,#264,#266,.T.);
|
||||
#262 = VERTEX_POINT('',#263);
|
||||
#263 = CARTESIAN_POINT('',(-2.95,-0.6,3.));
|
||||
#264 = VERTEX_POINT('',#265);
|
||||
#265 = CARTESIAN_POINT('',(-2.95,0.6,3.));
|
||||
#266 = LINE('',#267,#268);
|
||||
#267 = CARTESIAN_POINT('',(-2.95,-0.6,3.));
|
||||
#268 = VECTOR('',#269,1.);
|
||||
#269 = DIRECTION('',(0.,1.,0.));
|
||||
#270 = ORIENTED_EDGE('',*,*,#271,.T.);
|
||||
#271 = EDGE_CURVE('',#264,#272,#274,.T.);
|
||||
#272 = VERTEX_POINT('',#273);
|
||||
#273 = CARTESIAN_POINT('',(-0.6,0.6,3.));
|
||||
#274 = LINE('',#275,#276);
|
||||
#275 = CARTESIAN_POINT('',(-2.95,0.6,3.));
|
||||
#276 = VECTOR('',#277,1.);
|
||||
#277 = DIRECTION('',(1.,0.,0.));
|
||||
#278 = ORIENTED_EDGE('',*,*,#279,.T.);
|
||||
#279 = EDGE_CURVE('',#272,#280,#282,.T.);
|
||||
#280 = VERTEX_POINT('',#281);
|
||||
#281 = CARTESIAN_POINT('',(-0.6,2.95,3.));
|
||||
#282 = LINE('',#283,#284);
|
||||
#283 = CARTESIAN_POINT('',(-0.6,0.6,3.));
|
||||
#284 = VECTOR('',#285,1.);
|
||||
#285 = DIRECTION('',(0.,1.,0.));
|
||||
#286 = ORIENTED_EDGE('',*,*,#287,.T.);
|
||||
#287 = EDGE_CURVE('',#280,#288,#290,.T.);
|
||||
#288 = VERTEX_POINT('',#289);
|
||||
#289 = CARTESIAN_POINT('',(0.6,2.95,3.));
|
||||
#290 = LINE('',#291,#292);
|
||||
#291 = CARTESIAN_POINT('',(-0.6,2.95,3.));
|
||||
#292 = VECTOR('',#293,1.);
|
||||
#293 = DIRECTION('',(1.,0.,0.));
|
||||
#294 = ORIENTED_EDGE('',*,*,#295,.T.);
|
||||
#295 = EDGE_CURVE('',#288,#296,#298,.T.);
|
||||
#296 = VERTEX_POINT('',#297);
|
||||
#297 = CARTESIAN_POINT('',(0.6,0.6,3.));
|
||||
#298 = LINE('',#299,#300);
|
||||
#299 = CARTESIAN_POINT('',(0.6,2.95,3.));
|
||||
#300 = VECTOR('',#301,1.);
|
||||
#301 = DIRECTION('',(0.,-1.,0.));
|
||||
#302 = ORIENTED_EDGE('',*,*,#303,.T.);
|
||||
#303 = EDGE_CURVE('',#296,#304,#306,.T.);
|
||||
#304 = VERTEX_POINT('',#305);
|
||||
#305 = CARTESIAN_POINT('',(2.95,0.6,3.));
|
||||
#306 = LINE('',#307,#308);
|
||||
#307 = CARTESIAN_POINT('',(0.6,0.6,3.));
|
||||
#308 = VECTOR('',#309,1.);
|
||||
#309 = DIRECTION('',(1.,0.,0.));
|
||||
#310 = ORIENTED_EDGE('',*,*,#311,.T.);
|
||||
#311 = EDGE_CURVE('',#304,#312,#314,.T.);
|
||||
#312 = VERTEX_POINT('',#313);
|
||||
#313 = CARTESIAN_POINT('',(2.95,-0.6,3.));
|
||||
#314 = LINE('',#315,#316);
|
||||
#315 = CARTESIAN_POINT('',(2.95,0.6,3.));
|
||||
#316 = VECTOR('',#317,1.);
|
||||
#317 = DIRECTION('',(0.,-1.,0.));
|
||||
#318 = ORIENTED_EDGE('',*,*,#319,.T.);
|
||||
#319 = EDGE_CURVE('',#312,#320,#322,.T.);
|
||||
#320 = VERTEX_POINT('',#321);
|
||||
#321 = CARTESIAN_POINT('',(0.6,-0.6,3.));
|
||||
#322 = LINE('',#323,#324);
|
||||
#323 = CARTESIAN_POINT('',(2.95,-0.6,3.));
|
||||
#324 = VECTOR('',#325,1.);
|
||||
#325 = DIRECTION('',(-1.,0.,0.));
|
||||
#326 = ORIENTED_EDGE('',*,*,#327,.T.);
|
||||
#327 = EDGE_CURVE('',#320,#328,#330,.T.);
|
||||
#328 = VERTEX_POINT('',#329);
|
||||
#329 = CARTESIAN_POINT('',(0.6,-2.95,3.));
|
||||
#330 = LINE('',#331,#332);
|
||||
#331 = CARTESIAN_POINT('',(0.6,-0.6,3.));
|
||||
#332 = VECTOR('',#333,1.);
|
||||
#333 = DIRECTION('',(0.,-1.,0.));
|
||||
#334 = ORIENTED_EDGE('',*,*,#335,.T.);
|
||||
#335 = EDGE_CURVE('',#328,#336,#338,.T.);
|
||||
#336 = VERTEX_POINT('',#337);
|
||||
#337 = CARTESIAN_POINT('',(-0.6,-2.95,3.));
|
||||
#338 = LINE('',#339,#340);
|
||||
#339 = CARTESIAN_POINT('',(0.6,-2.95,3.));
|
||||
#340 = VECTOR('',#341,1.);
|
||||
#341 = DIRECTION('',(-1.,0.,0.));
|
||||
#342 = ORIENTED_EDGE('',*,*,#343,.T.);
|
||||
#343 = EDGE_CURVE('',#336,#344,#346,.T.);
|
||||
#344 = VERTEX_POINT('',#345);
|
||||
#345 = CARTESIAN_POINT('',(-0.6,-0.6,3.));
|
||||
#346 = LINE('',#347,#348);
|
||||
#347 = CARTESIAN_POINT('',(-0.6,-2.95,3.));
|
||||
#348 = VECTOR('',#349,1.);
|
||||
#349 = DIRECTION('',(0.,1.,0.));
|
||||
#350 = ORIENTED_EDGE('',*,*,#351,.T.);
|
||||
#351 = EDGE_CURVE('',#344,#262,#352,.T.);
|
||||
#352 = LINE('',#353,#354);
|
||||
#353 = CARTESIAN_POINT('',(-0.6,-0.6,3.));
|
||||
#354 = VECTOR('',#355,1.);
|
||||
#355 = DIRECTION('',(-1.,0.,0.));
|
||||
#356 = PLANE('',#357);
|
||||
#357 = AXIS2_PLACEMENT_3D('',#358,#359,#360);
|
||||
#358 = CARTESIAN_POINT('',(0.,0.,3.));
|
||||
#359 = DIRECTION('',(-0.,-0.,-1.));
|
||||
#360 = DIRECTION('',(0.,1.,0.));
|
||||
#361 = ADVANCED_FACE('',(#362),#387,.T.);
|
||||
#362 = FACE_BOUND('',#363,.T.);
|
||||
#363 = EDGE_LOOP('',(#364,#372,#373,#381));
|
||||
#364 = ORIENTED_EDGE('',*,*,#365,.T.);
|
||||
#365 = EDGE_CURVE('',#366,#262,#368,.T.);
|
||||
#366 = VERTEX_POINT('',#367);
|
||||
#367 = CARTESIAN_POINT('',(-2.95,-0.6,1.5));
|
||||
#368 = LINE('',#369,#370);
|
||||
#369 = CARTESIAN_POINT('',(-2.95,-0.6,0.));
|
||||
#370 = VECTOR('',#371,1.);
|
||||
#371 = DIRECTION('',(0.,0.,1.));
|
||||
#372 = ORIENTED_EDGE('',*,*,#261,.T.);
|
||||
#373 = ORIENTED_EDGE('',*,*,#374,.F.);
|
||||
#374 = EDGE_CURVE('',#375,#264,#377,.T.);
|
||||
#375 = VERTEX_POINT('',#376);
|
||||
#376 = CARTESIAN_POINT('',(-2.95,0.6,1.5));
|
||||
#377 = LINE('',#378,#379);
|
||||
#378 = CARTESIAN_POINT('',(-2.95,0.6,0.));
|
||||
#379 = VECTOR('',#380,1.);
|
||||
#380 = DIRECTION('',(0.,0.,1.));
|
||||
#381 = ORIENTED_EDGE('',*,*,#382,.F.);
|
||||
#382 = EDGE_CURVE('',#366,#375,#383,.T.);
|
||||
#383 = LINE('',#384,#385);
|
||||
#384 = CARTESIAN_POINT('',(-2.95,-0.6,1.5));
|
||||
#385 = VECTOR('',#386,1.);
|
||||
#386 = DIRECTION('',(0.,1.,0.));
|
||||
#387 = PLANE('',#388);
|
||||
#388 = AXIS2_PLACEMENT_3D('',#389,#390,#391);
|
||||
#389 = CARTESIAN_POINT('',(-2.95,-0.6,0.));
|
||||
#390 = DIRECTION('',(-1.,0.,0.));
|
||||
#391 = DIRECTION('',(0.,1.,0.));
|
||||
#392 = ADVANCED_FACE('',(#393),#419,.T.);
|
||||
#393 = FACE_BOUND('',#394,.T.);
|
||||
#394 = EDGE_LOOP('',(#395,#396,#404,#412,#418));
|
||||
#395 = ORIENTED_EDGE('',*,*,#365,.F.);
|
||||
#396 = ORIENTED_EDGE('',*,*,#397,.T.);
|
||||
#397 = EDGE_CURVE('',#366,#398,#400,.T.);
|
||||
#398 = VERTEX_POINT('',#399);
|
||||
#399 = CARTESIAN_POINT('',(-1.45,-0.6,0.));
|
||||
#400 = LINE('',#401,#402);
|
||||
#401 = CARTESIAN_POINT('',(-1.6125,-0.6,0.1625));
|
||||
#402 = VECTOR('',#403,1.);
|
||||
#403 = DIRECTION('',(0.707106781187,0.,-0.707106781187));
|
||||
#404 = ORIENTED_EDGE('',*,*,#405,.F.);
|
||||
#405 = EDGE_CURVE('',#406,#398,#408,.T.);
|
||||
#406 = VERTEX_POINT('',#407);
|
||||
#407 = CARTESIAN_POINT('',(-0.6,-0.6,0.));
|
||||
#408 = LINE('',#409,#410);
|
||||
#409 = CARTESIAN_POINT('',(-0.6,-0.6,0.));
|
||||
#410 = VECTOR('',#411,1.);
|
||||
#411 = DIRECTION('',(-1.,0.,0.));
|
||||
#412 = ORIENTED_EDGE('',*,*,#413,.T.);
|
||||
#413 = EDGE_CURVE('',#406,#344,#414,.T.);
|
||||
#414 = LINE('',#415,#416);
|
||||
#415 = CARTESIAN_POINT('',(-0.6,-0.6,0.));
|
||||
#416 = VECTOR('',#417,1.);
|
||||
#417 = DIRECTION('',(0.,0.,1.));
|
||||
#418 = ORIENTED_EDGE('',*,*,#351,.T.);
|
||||
#419 = PLANE('',#420);
|
||||
#420 = AXIS2_PLACEMENT_3D('',#421,#422,#423);
|
||||
#421 = CARTESIAN_POINT('',(-0.6,-0.6,0.));
|
||||
#422 = DIRECTION('',(0.,-1.,0.));
|
||||
#423 = DIRECTION('',(-1.,0.,0.));
|
||||
#424 = ADVANCED_FACE('',(#425),#451,.T.);
|
||||
#425 = FACE_BOUND('',#426,.T.);
|
||||
#426 = EDGE_LOOP('',(#427,#435,#436,#437,#445));
|
||||
#427 = ORIENTED_EDGE('',*,*,#428,.T.);
|
||||
#428 = EDGE_CURVE('',#429,#336,#431,.T.);
|
||||
#429 = VERTEX_POINT('',#430);
|
||||
#430 = CARTESIAN_POINT('',(-0.6,-2.95,1.5));
|
||||
#431 = LINE('',#432,#433);
|
||||
#432 = CARTESIAN_POINT('',(-0.6,-2.95,0.));
|
||||
#433 = VECTOR('',#434,1.);
|
||||
#434 = DIRECTION('',(0.,0.,1.));
|
||||
#435 = ORIENTED_EDGE('',*,*,#343,.T.);
|
||||
#436 = ORIENTED_EDGE('',*,*,#413,.F.);
|
||||
#437 = ORIENTED_EDGE('',*,*,#438,.F.);
|
||||
#438 = EDGE_CURVE('',#439,#406,#441,.T.);
|
||||
#439 = VERTEX_POINT('',#440);
|
||||
#440 = CARTESIAN_POINT('',(-0.6,-1.45,0.));
|
||||
#441 = LINE('',#442,#443);
|
||||
#442 = CARTESIAN_POINT('',(-0.6,-2.95,0.));
|
||||
#443 = VECTOR('',#444,1.);
|
||||
#444 = DIRECTION('',(0.,1.,0.));
|
||||
#445 = ORIENTED_EDGE('',*,*,#446,.F.);
|
||||
#446 = EDGE_CURVE('',#429,#439,#447,.T.);
|
||||
#447 = LINE('',#448,#449);
|
||||
#448 = CARTESIAN_POINT('',(-0.6,-2.2,0.75));
|
||||
#449 = VECTOR('',#450,1.);
|
||||
#450 = DIRECTION('',(0.,0.707106781187,-0.707106781187));
|
||||
#451 = PLANE('',#452);
|
||||
#452 = AXIS2_PLACEMENT_3D('',#453,#454,#455);
|
||||
#453 = CARTESIAN_POINT('',(-0.6,-2.95,0.));
|
||||
#454 = DIRECTION('',(-1.,0.,0.));
|
||||
#455 = DIRECTION('',(0.,1.,0.));
|
||||
#456 = ADVANCED_FACE('',(#457),#475,.T.);
|
||||
#457 = FACE_BOUND('',#458,.T.);
|
||||
#458 = EDGE_LOOP('',(#459,#467,#468,#469));
|
||||
#459 = ORIENTED_EDGE('',*,*,#460,.T.);
|
||||
#460 = EDGE_CURVE('',#461,#328,#463,.T.);
|
||||
#461 = VERTEX_POINT('',#462);
|
||||
#462 = CARTESIAN_POINT('',(0.6,-2.95,1.5));
|
||||
#463 = LINE('',#464,#465);
|
||||
#464 = CARTESIAN_POINT('',(0.6,-2.95,0.));
|
||||
#465 = VECTOR('',#466,1.);
|
||||
#466 = DIRECTION('',(0.,0.,1.));
|
||||
#467 = ORIENTED_EDGE('',*,*,#335,.T.);
|
||||
#468 = ORIENTED_EDGE('',*,*,#428,.F.);
|
||||
#469 = ORIENTED_EDGE('',*,*,#470,.F.);
|
||||
#470 = EDGE_CURVE('',#461,#429,#471,.T.);
|
||||
#471 = LINE('',#472,#473);
|
||||
#472 = CARTESIAN_POINT('',(0.6,-2.95,1.5));
|
||||
#473 = VECTOR('',#474,1.);
|
||||
#474 = DIRECTION('',(-1.,0.,0.));
|
||||
#475 = PLANE('',#476);
|
||||
#476 = AXIS2_PLACEMENT_3D('',#477,#478,#479);
|
||||
#477 = CARTESIAN_POINT('',(0.6,-2.95,0.));
|
||||
#478 = DIRECTION('',(0.,-1.,0.));
|
||||
#479 = DIRECTION('',(-1.,0.,0.));
|
||||
#480 = ADVANCED_FACE('',(#481),#507,.T.);
|
||||
#481 = FACE_BOUND('',#482,.T.);
|
||||
#482 = EDGE_LOOP('',(#483,#484,#492,#500,#506));
|
||||
#483 = ORIENTED_EDGE('',*,*,#460,.F.);
|
||||
#484 = ORIENTED_EDGE('',*,*,#485,.T.);
|
||||
#485 = EDGE_CURVE('',#461,#486,#488,.T.);
|
||||
#486 = VERTEX_POINT('',#487);
|
||||
#487 = CARTESIAN_POINT('',(0.6,-1.45,0.));
|
||||
#488 = LINE('',#489,#490);
|
||||
#489 = CARTESIAN_POINT('',(0.6,-1.6125,0.1625));
|
||||
#490 = VECTOR('',#491,1.);
|
||||
#491 = DIRECTION('',(0.,0.707106781187,-0.707106781187));
|
||||
#492 = ORIENTED_EDGE('',*,*,#493,.F.);
|
||||
#493 = EDGE_CURVE('',#494,#486,#496,.T.);
|
||||
#494 = VERTEX_POINT('',#495);
|
||||
#495 = CARTESIAN_POINT('',(0.6,-0.6,0.));
|
||||
#496 = LINE('',#497,#498);
|
||||
#497 = CARTESIAN_POINT('',(0.6,-0.6,0.));
|
||||
#498 = VECTOR('',#499,1.);
|
||||
#499 = DIRECTION('',(0.,-1.,0.));
|
||||
#500 = ORIENTED_EDGE('',*,*,#501,.T.);
|
||||
#501 = EDGE_CURVE('',#494,#320,#502,.T.);
|
||||
#502 = LINE('',#503,#504);
|
||||
#503 = CARTESIAN_POINT('',(0.6,-0.6,0.));
|
||||
#504 = VECTOR('',#505,1.);
|
||||
#505 = DIRECTION('',(0.,0.,1.));
|
||||
#506 = ORIENTED_EDGE('',*,*,#327,.T.);
|
||||
#507 = PLANE('',#508);
|
||||
#508 = AXIS2_PLACEMENT_3D('',#509,#510,#511);
|
||||
#509 = CARTESIAN_POINT('',(0.6,-0.6,0.));
|
||||
#510 = DIRECTION('',(1.,0.,0.));
|
||||
#511 = DIRECTION('',(0.,-1.,0.));
|
||||
#512 = ADVANCED_FACE('',(#513),#539,.T.);
|
||||
#513 = FACE_BOUND('',#514,.T.);
|
||||
#514 = EDGE_LOOP('',(#515,#523,#524,#525,#533));
|
||||
#515 = ORIENTED_EDGE('',*,*,#516,.T.);
|
||||
#516 = EDGE_CURVE('',#517,#312,#519,.T.);
|
||||
#517 = VERTEX_POINT('',#518);
|
||||
#518 = CARTESIAN_POINT('',(2.95,-0.6,1.5));
|
||||
#519 = LINE('',#520,#521);
|
||||
#520 = CARTESIAN_POINT('',(2.95,-0.6,0.));
|
||||
#521 = VECTOR('',#522,1.);
|
||||
#522 = DIRECTION('',(0.,0.,1.));
|
||||
#523 = ORIENTED_EDGE('',*,*,#319,.T.);
|
||||
#524 = ORIENTED_EDGE('',*,*,#501,.F.);
|
||||
#525 = ORIENTED_EDGE('',*,*,#526,.F.);
|
||||
#526 = EDGE_CURVE('',#527,#494,#529,.T.);
|
||||
#527 = VERTEX_POINT('',#528);
|
||||
#528 = CARTESIAN_POINT('',(1.45,-0.6,0.));
|
||||
#529 = LINE('',#530,#531);
|
||||
#530 = CARTESIAN_POINT('',(2.95,-0.6,0.));
|
||||
#531 = VECTOR('',#532,1.);
|
||||
#532 = DIRECTION('',(-1.,0.,0.));
|
||||
#533 = ORIENTED_EDGE('',*,*,#534,.F.);
|
||||
#534 = EDGE_CURVE('',#517,#527,#535,.T.);
|
||||
#535 = LINE('',#536,#537);
|
||||
#536 = CARTESIAN_POINT('',(2.2,-0.6,0.75));
|
||||
#537 = VECTOR('',#538,1.);
|
||||
#538 = DIRECTION('',(-0.707106781187,-0.,-0.707106781187));
|
||||
#539 = PLANE('',#540);
|
||||
#540 = AXIS2_PLACEMENT_3D('',#541,#542,#543);
|
||||
#541 = CARTESIAN_POINT('',(2.95,-0.6,0.));
|
||||
#542 = DIRECTION('',(0.,-1.,0.));
|
||||
#543 = DIRECTION('',(-1.,0.,0.));
|
||||
#544 = ADVANCED_FACE('',(#545),#563,.T.);
|
||||
#545 = FACE_BOUND('',#546,.T.);
|
||||
#546 = EDGE_LOOP('',(#547,#555,#556,#557));
|
||||
#547 = ORIENTED_EDGE('',*,*,#548,.T.);
|
||||
#548 = EDGE_CURVE('',#549,#304,#551,.T.);
|
||||
#549 = VERTEX_POINT('',#550);
|
||||
#550 = CARTESIAN_POINT('',(2.95,0.6,1.5));
|
||||
#551 = LINE('',#552,#553);
|
||||
#552 = CARTESIAN_POINT('',(2.95,0.6,0.));
|
||||
#553 = VECTOR('',#554,1.);
|
||||
#554 = DIRECTION('',(0.,0.,1.));
|
||||
#555 = ORIENTED_EDGE('',*,*,#311,.T.);
|
||||
#556 = ORIENTED_EDGE('',*,*,#516,.F.);
|
||||
#557 = ORIENTED_EDGE('',*,*,#558,.F.);
|
||||
#558 = EDGE_CURVE('',#549,#517,#559,.T.);
|
||||
#559 = LINE('',#560,#561);
|
||||
#560 = CARTESIAN_POINT('',(2.95,0.6,1.5));
|
||||
#561 = VECTOR('',#562,1.);
|
||||
#562 = DIRECTION('',(0.,-1.,0.));
|
||||
#563 = PLANE('',#564);
|
||||
#564 = AXIS2_PLACEMENT_3D('',#565,#566,#567);
|
||||
#565 = CARTESIAN_POINT('',(2.95,0.6,0.));
|
||||
#566 = DIRECTION('',(1.,0.,0.));
|
||||
#567 = DIRECTION('',(0.,-1.,0.));
|
||||
#568 = ADVANCED_FACE('',(#569),#595,.T.);
|
||||
#569 = FACE_BOUND('',#570,.T.);
|
||||
#570 = EDGE_LOOP('',(#571,#572,#580,#588,#594));
|
||||
#571 = ORIENTED_EDGE('',*,*,#548,.F.);
|
||||
#572 = ORIENTED_EDGE('',*,*,#573,.T.);
|
||||
#573 = EDGE_CURVE('',#549,#574,#576,.T.);
|
||||
#574 = VERTEX_POINT('',#575);
|
||||
#575 = CARTESIAN_POINT('',(1.45,0.6,0.));
|
||||
#576 = LINE('',#577,#578);
|
||||
#577 = CARTESIAN_POINT('',(1.6125,0.6,0.1625));
|
||||
#578 = VECTOR('',#579,1.);
|
||||
#579 = DIRECTION('',(-0.707106781187,0.,-0.707106781187));
|
||||
#580 = ORIENTED_EDGE('',*,*,#581,.F.);
|
||||
#581 = EDGE_CURVE('',#582,#574,#584,.T.);
|
||||
#582 = VERTEX_POINT('',#583);
|
||||
#583 = CARTESIAN_POINT('',(0.6,0.6,0.));
|
||||
#584 = LINE('',#585,#586);
|
||||
#585 = CARTESIAN_POINT('',(0.6,0.6,0.));
|
||||
#586 = VECTOR('',#587,1.);
|
||||
#587 = DIRECTION('',(1.,0.,0.));
|
||||
#588 = ORIENTED_EDGE('',*,*,#589,.T.);
|
||||
#589 = EDGE_CURVE('',#582,#296,#590,.T.);
|
||||
#590 = LINE('',#591,#592);
|
||||
#591 = CARTESIAN_POINT('',(0.6,0.6,0.));
|
||||
#592 = VECTOR('',#593,1.);
|
||||
#593 = DIRECTION('',(0.,0.,1.));
|
||||
#594 = ORIENTED_EDGE('',*,*,#303,.T.);
|
||||
#595 = PLANE('',#596);
|
||||
#596 = AXIS2_PLACEMENT_3D('',#597,#598,#599);
|
||||
#597 = CARTESIAN_POINT('',(0.6,0.6,0.));
|
||||
#598 = DIRECTION('',(0.,1.,0.));
|
||||
#599 = DIRECTION('',(1.,0.,0.));
|
||||
#600 = ADVANCED_FACE('',(#601),#627,.T.);
|
||||
#601 = FACE_BOUND('',#602,.T.);
|
||||
#602 = EDGE_LOOP('',(#603,#611,#612,#613,#621));
|
||||
#603 = ORIENTED_EDGE('',*,*,#604,.T.);
|
||||
#604 = EDGE_CURVE('',#605,#288,#607,.T.);
|
||||
#605 = VERTEX_POINT('',#606);
|
||||
#606 = CARTESIAN_POINT('',(0.6,2.95,1.5));
|
||||
#607 = LINE('',#608,#609);
|
||||
#608 = CARTESIAN_POINT('',(0.6,2.95,0.));
|
||||
#609 = VECTOR('',#610,1.);
|
||||
#610 = DIRECTION('',(0.,0.,1.));
|
||||
#611 = ORIENTED_EDGE('',*,*,#295,.T.);
|
||||
#612 = ORIENTED_EDGE('',*,*,#589,.F.);
|
||||
#613 = ORIENTED_EDGE('',*,*,#614,.F.);
|
||||
#614 = EDGE_CURVE('',#615,#582,#617,.T.);
|
||||
#615 = VERTEX_POINT('',#616);
|
||||
#616 = CARTESIAN_POINT('',(0.6,1.45,0.));
|
||||
#617 = LINE('',#618,#619);
|
||||
#618 = CARTESIAN_POINT('',(0.6,2.95,0.));
|
||||
#619 = VECTOR('',#620,1.);
|
||||
#620 = DIRECTION('',(0.,-1.,0.));
|
||||
#621 = ORIENTED_EDGE('',*,*,#622,.F.);
|
||||
#622 = EDGE_CURVE('',#605,#615,#623,.T.);
|
||||
#623 = LINE('',#624,#625);
|
||||
#624 = CARTESIAN_POINT('',(0.6,2.2,0.75));
|
||||
#625 = VECTOR('',#626,1.);
|
||||
#626 = DIRECTION('',(0.,-0.707106781187,-0.707106781187));
|
||||
#627 = PLANE('',#628);
|
||||
#628 = AXIS2_PLACEMENT_3D('',#629,#630,#631);
|
||||
#629 = CARTESIAN_POINT('',(0.6,2.95,0.));
|
||||
#630 = DIRECTION('',(1.,0.,0.));
|
||||
#631 = DIRECTION('',(0.,-1.,0.));
|
||||
#632 = ADVANCED_FACE('',(#633),#651,.T.);
|
||||
#633 = FACE_BOUND('',#634,.T.);
|
||||
#634 = EDGE_LOOP('',(#635,#643,#644,#645));
|
||||
#635 = ORIENTED_EDGE('',*,*,#636,.T.);
|
||||
#636 = EDGE_CURVE('',#637,#280,#639,.T.);
|
||||
#637 = VERTEX_POINT('',#638);
|
||||
#638 = CARTESIAN_POINT('',(-0.6,2.95,1.5));
|
||||
#639 = LINE('',#640,#641);
|
||||
#640 = CARTESIAN_POINT('',(-0.6,2.95,0.));
|
||||
#641 = VECTOR('',#642,1.);
|
||||
#642 = DIRECTION('',(0.,0.,1.));
|
||||
#643 = ORIENTED_EDGE('',*,*,#287,.T.);
|
||||
#644 = ORIENTED_EDGE('',*,*,#604,.F.);
|
||||
#645 = ORIENTED_EDGE('',*,*,#646,.F.);
|
||||
#646 = EDGE_CURVE('',#637,#605,#647,.T.);
|
||||
#647 = LINE('',#648,#649);
|
||||
#648 = CARTESIAN_POINT('',(-0.6,2.95,1.5));
|
||||
#649 = VECTOR('',#650,1.);
|
||||
#650 = DIRECTION('',(1.,0.,0.));
|
||||
#651 = PLANE('',#652);
|
||||
#652 = AXIS2_PLACEMENT_3D('',#653,#654,#655);
|
||||
#653 = CARTESIAN_POINT('',(-0.6,2.95,0.));
|
||||
#654 = DIRECTION('',(0.,1.,0.));
|
||||
#655 = DIRECTION('',(1.,0.,0.));
|
||||
#656 = ADVANCED_FACE('',(#657),#683,.T.);
|
||||
#657 = FACE_BOUND('',#658,.T.);
|
||||
#658 = EDGE_LOOP('',(#659,#660,#668,#676,#682));
|
||||
#659 = ORIENTED_EDGE('',*,*,#636,.F.);
|
||||
#660 = ORIENTED_EDGE('',*,*,#661,.T.);
|
||||
#661 = EDGE_CURVE('',#637,#662,#664,.T.);
|
||||
#662 = VERTEX_POINT('',#663);
|
||||
#663 = CARTESIAN_POINT('',(-0.6,1.45,0.));
|
||||
#664 = LINE('',#665,#666);
|
||||
#665 = CARTESIAN_POINT('',(-0.6,1.6125,0.1625));
|
||||
#666 = VECTOR('',#667,1.);
|
||||
#667 = DIRECTION('',(-0.,-0.707106781187,-0.707106781187));
|
||||
#668 = ORIENTED_EDGE('',*,*,#669,.F.);
|
||||
#669 = EDGE_CURVE('',#670,#662,#672,.T.);
|
||||
#670 = VERTEX_POINT('',#671);
|
||||
#671 = CARTESIAN_POINT('',(-0.6,0.6,0.));
|
||||
#672 = LINE('',#673,#674);
|
||||
#673 = CARTESIAN_POINT('',(-0.6,0.6,0.));
|
||||
#674 = VECTOR('',#675,1.);
|
||||
#675 = DIRECTION('',(0.,1.,0.));
|
||||
#676 = ORIENTED_EDGE('',*,*,#677,.T.);
|
||||
#677 = EDGE_CURVE('',#670,#272,#678,.T.);
|
||||
#678 = LINE('',#679,#680);
|
||||
#679 = CARTESIAN_POINT('',(-0.6,0.6,0.));
|
||||
#680 = VECTOR('',#681,1.);
|
||||
#681 = DIRECTION('',(0.,0.,1.));
|
||||
#682 = ORIENTED_EDGE('',*,*,#279,.T.);
|
||||
#683 = PLANE('',#684);
|
||||
#684 = AXIS2_PLACEMENT_3D('',#685,#686,#687);
|
||||
#685 = CARTESIAN_POINT('',(-0.6,0.6,0.));
|
||||
#686 = DIRECTION('',(-1.,0.,0.));
|
||||
#687 = DIRECTION('',(0.,1.,0.));
|
||||
#688 = ADVANCED_FACE('',(#689),#708,.T.);
|
||||
#689 = FACE_BOUND('',#690,.T.);
|
||||
#690 = EDGE_LOOP('',(#691,#692,#693,#694,#702));
|
||||
#691 = ORIENTED_EDGE('',*,*,#374,.T.);
|
||||
#692 = ORIENTED_EDGE('',*,*,#271,.T.);
|
||||
#693 = ORIENTED_EDGE('',*,*,#677,.F.);
|
||||
#694 = ORIENTED_EDGE('',*,*,#695,.F.);
|
||||
#695 = EDGE_CURVE('',#696,#670,#698,.T.);
|
||||
#696 = VERTEX_POINT('',#697);
|
||||
#697 = CARTESIAN_POINT('',(-1.45,0.6,0.));
|
||||
#698 = LINE('',#699,#700);
|
||||
#699 = CARTESIAN_POINT('',(-2.95,0.6,0.));
|
||||
#700 = VECTOR('',#701,1.);
|
||||
#701 = DIRECTION('',(1.,0.,0.));
|
||||
#702 = ORIENTED_EDGE('',*,*,#703,.F.);
|
||||
#703 = EDGE_CURVE('',#375,#696,#704,.T.);
|
||||
#704 = LINE('',#705,#706);
|
||||
#705 = CARTESIAN_POINT('',(-2.2,0.6,0.75));
|
||||
#706 = VECTOR('',#707,1.);
|
||||
#707 = DIRECTION('',(0.707106781187,0.,-0.707106781187));
|
||||
#708 = PLANE('',#709);
|
||||
#709 = AXIS2_PLACEMENT_3D('',#710,#711,#712);
|
||||
#710 = CARTESIAN_POINT('',(-2.95,0.6,0.));
|
||||
#711 = DIRECTION('',(0.,1.,0.));
|
||||
#712 = DIRECTION('',(1.,0.,0.));
|
||||
#713 = ADVANCED_FACE('',(#714),#725,.F.);
|
||||
#714 = FACE_BOUND('',#715,.T.);
|
||||
#715 = EDGE_LOOP('',(#716,#717,#718,#719));
|
||||
#716 = ORIENTED_EDGE('',*,*,#397,.F.);
|
||||
#717 = ORIENTED_EDGE('',*,*,#382,.T.);
|
||||
#718 = ORIENTED_EDGE('',*,*,#703,.T.);
|
||||
#719 = ORIENTED_EDGE('',*,*,#720,.F.);
|
||||
#720 = EDGE_CURVE('',#398,#696,#721,.T.);
|
||||
#721 = LINE('',#722,#723);
|
||||
#722 = CARTESIAN_POINT('',(-1.45,-0.6,0.));
|
||||
#723 = VECTOR('',#724,1.);
|
||||
#724 = DIRECTION('',(0.,1.,0.));
|
||||
#725 = PLANE('',#726);
|
||||
#726 = AXIS2_PLACEMENT_3D('',#727,#728,#729);
|
||||
#727 = CARTESIAN_POINT('',(-2.2,-0.6,0.75));
|
||||
#728 = DIRECTION('',(0.707106781187,0.,0.707106781187));
|
||||
#729 = DIRECTION('',(-0.,-1.,-0.));
|
||||
#730 = ADVANCED_FACE('',(#731),#760,.F.);
|
||||
#731 = FACE_BOUND('',#732,.F.);
|
||||
#732 = EDGE_LOOP('',(#733,#734,#735,#736,#737,#743,#744,#745,#751,#752,
|
||||
#753,#759));
|
||||
#733 = ORIENTED_EDGE('',*,*,#695,.F.);
|
||||
#734 = ORIENTED_EDGE('',*,*,#720,.F.);
|
||||
#735 = ORIENTED_EDGE('',*,*,#405,.F.);
|
||||
#736 = ORIENTED_EDGE('',*,*,#438,.F.);
|
||||
#737 = ORIENTED_EDGE('',*,*,#738,.F.);
|
||||
#738 = EDGE_CURVE('',#486,#439,#739,.T.);
|
||||
#739 = LINE('',#740,#741);
|
||||
#740 = CARTESIAN_POINT('',(0.6,-1.45,0.));
|
||||
#741 = VECTOR('',#742,1.);
|
||||
#742 = DIRECTION('',(-1.,0.,0.));
|
||||
#743 = ORIENTED_EDGE('',*,*,#493,.F.);
|
||||
#744 = ORIENTED_EDGE('',*,*,#526,.F.);
|
||||
#745 = ORIENTED_EDGE('',*,*,#746,.F.);
|
||||
#746 = EDGE_CURVE('',#574,#527,#747,.T.);
|
||||
#747 = LINE('',#748,#749);
|
||||
#748 = CARTESIAN_POINT('',(1.45,0.6,0.));
|
||||
#749 = VECTOR('',#750,1.);
|
||||
#750 = DIRECTION('',(0.,-1.,0.));
|
||||
#751 = ORIENTED_EDGE('',*,*,#581,.F.);
|
||||
#752 = ORIENTED_EDGE('',*,*,#614,.F.);
|
||||
#753 = ORIENTED_EDGE('',*,*,#754,.F.);
|
||||
#754 = EDGE_CURVE('',#662,#615,#755,.T.);
|
||||
#755 = LINE('',#756,#757);
|
||||
#756 = CARTESIAN_POINT('',(-0.6,1.45,0.));
|
||||
#757 = VECTOR('',#758,1.);
|
||||
#758 = DIRECTION('',(1.,0.,0.));
|
||||
#759 = ORIENTED_EDGE('',*,*,#669,.F.);
|
||||
#760 = PLANE('',#761);
|
||||
#761 = AXIS2_PLACEMENT_3D('',#762,#763,#764);
|
||||
#762 = CARTESIAN_POINT('',(-2.8E-16,3.8E-16,0.));
|
||||
#763 = DIRECTION('',(0.,0.,1.));
|
||||
#764 = DIRECTION('',(1.,0.,0.));
|
||||
#765 = ADVANCED_FACE('',(#766),#772,.F.);
|
||||
#766 = FACE_BOUND('',#767,.T.);
|
||||
#767 = EDGE_LOOP('',(#768,#769,#770,#771));
|
||||
#768 = ORIENTED_EDGE('',*,*,#485,.F.);
|
||||
#769 = ORIENTED_EDGE('',*,*,#470,.T.);
|
||||
#770 = ORIENTED_EDGE('',*,*,#446,.T.);
|
||||
#771 = ORIENTED_EDGE('',*,*,#738,.F.);
|
||||
#772 = PLANE('',#773);
|
||||
#773 = AXIS2_PLACEMENT_3D('',#774,#775,#776);
|
||||
#774 = CARTESIAN_POINT('',(0.6,-2.2,0.75));
|
||||
#775 = DIRECTION('',(0.,0.707106781187,0.707106781187));
|
||||
#776 = DIRECTION('',(1.,0.,0.));
|
||||
#777 = ADVANCED_FACE('',(#778),#784,.F.);
|
||||
#778 = FACE_BOUND('',#779,.T.);
|
||||
#779 = EDGE_LOOP('',(#780,#781,#782,#783));
|
||||
#780 = ORIENTED_EDGE('',*,*,#573,.F.);
|
||||
#781 = ORIENTED_EDGE('',*,*,#558,.T.);
|
||||
#782 = ORIENTED_EDGE('',*,*,#534,.T.);
|
||||
#783 = ORIENTED_EDGE('',*,*,#746,.F.);
|
||||
#784 = PLANE('',#785);
|
||||
#785 = AXIS2_PLACEMENT_3D('',#786,#787,#788);
|
||||
#786 = CARTESIAN_POINT('',(2.2,0.6,0.75));
|
||||
#787 = DIRECTION('',(-0.707106781187,0.,0.707106781187));
|
||||
#788 = DIRECTION('',(0.,1.,0.));
|
||||
#789 = ADVANCED_FACE('',(#790),#796,.F.);
|
||||
#790 = FACE_BOUND('',#791,.T.);
|
||||
#791 = EDGE_LOOP('',(#792,#793,#794,#795));
|
||||
#792 = ORIENTED_EDGE('',*,*,#661,.F.);
|
||||
#793 = ORIENTED_EDGE('',*,*,#646,.T.);
|
||||
#794 = ORIENTED_EDGE('',*,*,#622,.T.);
|
||||
#795 = ORIENTED_EDGE('',*,*,#754,.F.);
|
||||
#796 = PLANE('',#797);
|
||||
#797 = AXIS2_PLACEMENT_3D('',#798,#799,#800);
|
||||
#798 = CARTESIAN_POINT('',(-0.6,2.2,0.75));
|
||||
#799 = DIRECTION('',(0.,-0.707106781187,0.707106781187));
|
||||
#800 = DIRECTION('',(-1.,-0.,-0.));
|
||||
#801 = ( GEOMETRIC_REPRESENTATION_CONTEXT(3)
|
||||
GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#805)) GLOBAL_UNIT_ASSIGNED_CONTEXT
|
||||
((#802,#803,#804)) REPRESENTATION_CONTEXT('Context #1',
|
||||
'3D Context with UNIT and UNCERTAINTY') );
|
||||
#802 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) );
|
||||
#803 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) );
|
||||
#804 = ( NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT() );
|
||||
#805 = UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-07),#802,
|
||||
'distance_accuracy_value','confusion accuracy');
|
||||
#806 = PRODUCT_RELATED_PRODUCT_CATEGORY('part',$,(#7));
|
||||
#807 = MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION('',(#808)
|
||||
,#801);
|
||||
#808 = STYLED_ITEM('color',(#809),#15);
|
||||
#809 = PRESENTATION_STYLE_ASSIGNMENT((#810,#816));
|
||||
#810 = SURFACE_STYLE_USAGE(.BOTH.,#811);
|
||||
#811 = SURFACE_SIDE_STYLE('',(#812));
|
||||
#812 = SURFACE_STYLE_FILL_AREA(#813);
|
||||
#813 = FILL_AREA_STYLE('',(#814));
|
||||
#814 = FILL_AREA_STYLE_COLOUR('',#815);
|
||||
#815 = COLOUR_RGB('',0.800000010877,0.800000010877,0.901960800373);
|
||||
#816 = CURVE_STYLE('',#817,POSITIVE_LENGTH_MEASURE(0.1),#818);
|
||||
#817 = DRAUGHTING_PRE_DEFINED_CURVE_FONT('continuous');
|
||||
#818 = COLOUR_RGB('',9.803921802644E-02,9.803921802644E-02,
|
||||
9.803921802644E-02);
|
||||
ENDSEC;
|
||||
END-ISO-10303-21;
|
|
@ -1,750 +0,0 @@
|
|||
/*******************************************************************************
|
||||
TITLE:
|
||||
Stable and waterproof OpenSCAD case by pbtec
|
||||
|
||||
DESCRIPTION:
|
||||
|
||||
highly scalable case for 3D printing. Try it out!
|
||||
|
||||
Optimized for Openscad Customizer. Activate it under view/customizer and play around ;-)
|
||||
|
||||
No Support needed to print
|
||||
|
||||
- for waterproof cases you can use silicone sealing cord with diameters from 1 to 3mm
|
||||
- to use also without sealing cord. The groove and ridge gives the housing a high stability and tightness.
|
||||
- Use of regular nuts or square nuts
|
||||
- define outer vertical radius of corners
|
||||
- echo output in console shows inner and outer size and more
|
||||
- echo output shows the needed length of the screws
|
||||
- use screws from m2 up to m5
|
||||
- default are 4 screws at each corner. For large cases add addtional ones in the middle of both x and y sides if needed
|
||||
- use several predefined wall mount holder, some with multiple mounting holes (up to 3)
|
||||
|
||||
Important!
|
||||
- If you use standard nuts you need to pause the printer a certain level to insert the nuts
|
||||
- If you need a stable and waterproof case please print with 100% infill
|
||||
- I'm aware that sometimes, when using too big or too small parameters, there are some rendering issues.
|
||||
To prevent such issues change only one parameter at once and check the result.
|
||||
|
||||
for waterproofness see https://blog.prusaprinters.org/watertight-3d-printing-part-2_53638/
|
||||
|
||||
AUTHOR:
|
||||
pbtec / pb-tec.ch
|
||||
|
||||
use https://paypal.me/pbtec if you want to spend me a coold beer. Thanks in advance :-)
|
||||
|
||||
|
||||
VERSION:
|
||||
V KZZ DATE COMMENT
|
||||
6.0 pb 31.07.21 First Version to share
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
/* [View settings] */
|
||||
// Shows the Bottom of the case
|
||||
ShowBottom = true;
|
||||
// Shows the top of the case
|
||||
ShowTop = true;
|
||||
// Distance between top and bottom (if both are side by side displayed)
|
||||
DistanceBetweenObjects = 10;
|
||||
// Shows the housing assembled
|
||||
ShowCaseAssembled = false;
|
||||
|
||||
|
||||
/* [Control cuts (use only one at a time)] */
|
||||
|
||||
// To see the nuts inside (best view if not assembled showed)
|
||||
SeeNutCut = false;
|
||||
// To see the groove, ridge and Screw (best view if assembled showed)
|
||||
SeeGrooveRidgeScrew = false;
|
||||
|
||||
|
||||
/* [Case settings] */
|
||||
|
||||
// Length of the case
|
||||
Caselength = 60;
|
||||
// Width of the case
|
||||
CaseWidth = 100;
|
||||
// Height of the case
|
||||
CaseHeight = 40;
|
||||
// Splitt the Case height into bottom and top, check for the needed screws in echo output (console)
|
||||
CutFromTop = 10.0;
|
||||
// Thickness for the bottom and top wall (vertical walls needs to be calculated)
|
||||
BottomTopThickness = 3.0;
|
||||
// If this is bigger than the needed cylinder around the screw it will be ignored
|
||||
CaseRadius = 12.0;
|
||||
|
||||
/* [Case Screw settings] */
|
||||
|
||||
//2=m2/2.5=m2.5/3=m3/4=m4/5=m5 // max m5, larger sizes do not fit
|
||||
CountersinkScrew = 3.0; // [2:m2, 2.5: m2.5, 3: m3, 4: m4, 5: m5]
|
||||
|
||||
// Adds additional Screws on X axis (for large cases) --> Try it out
|
||||
XAdditionalScrew = false; // can be true or false / Adds additional Screws on X axis (for large cases) --> Try it out
|
||||
// Adds additional Screws on Y axis (for large cases) --> Try it out
|
||||
YAdditionalScrew = false; // can be true or false / Adds additional Screws on Y axis (for large cases) --> Try it out
|
||||
|
||||
/* [Groove settings] */
|
||||
|
||||
// If using a SealingCord use the SealingCord diameter, otherwise x-times of your 3D Printer Nozzle (0.8/1.2/...) --> Ridge gets perfect for printing
|
||||
GrooveWidth = 1.2; // [0.8:0.1:3]
|
||||
|
||||
// Not less than 1mm (for stability) and not more than 3mm --> Best 2mm
|
||||
GrooveDepth = 2.0; // [1.0:0.1:3]
|
||||
|
||||
// Space between Groove and Ridge for a perfect fit, usualy 0.2 or 0.3 for FDM depending on your printer quality
|
||||
Space = 0.3; // [0.0:0.1:0.4]
|
||||
|
||||
// Addtional vertical room for the pressed sealing Cord. For sealing cord 1.5mm -->0.5 // for 2mm -->0.8 // for 2.5 -->1.0 // If no sealing cord then set this parameter to 0.
|
||||
AddGrooveDepthForSealing = 0.8; // [0.0:0.1:3]
|
||||
|
||||
// Range Inside groove/ridge. Usualy 2 times or more the printer nozzle. For best stability at least 0.8
|
||||
InnerBorder = 0.8; // [0.8:0.1:4]
|
||||
|
||||
|
||||
// Range Outside groove/ridge . Usualy 2 times or more the printer nozzle. For best stability at least 0.8
|
||||
OuterBorder = 0.8; // [0.8:0.1:4]
|
||||
|
||||
/* [Nut general settings] */
|
||||
|
||||
// Size of material (plastic) above nut/square nut (3mm or more). The more, the more stable but need longer screw.
|
||||
NutSink = 4.0;
|
||||
|
||||
/* [Standard nut settings] */
|
||||
|
||||
// Nut Settings / As there are (or I have) many different nuts dimensions, the size must be specified / Do not add separation space, only the real measurement // m2=1.5 // m2.5=1.9 // m3=2.4 // m4=3.2 // n5=3.8
|
||||
NutHigh = 2.4;
|
||||
|
||||
// Distance between the paralell sides / Do not add separation space, only the real measurement // m2=3.8 // m2.5=4.9 // m3=5.4 // m4=6.9 // m5=7.9
|
||||
NutDia = 5.4;
|
||||
|
||||
/* [Square Nut settings] */
|
||||
|
||||
// Select if you want to use square nuts instead of normal nuts
|
||||
UseSquareNutInsteadOfNut = false;
|
||||
|
||||
// Select the high of the square nut / Do not add separation space, only the real measurement
|
||||
SquareNutHigh = 1.9;
|
||||
|
||||
// Select the size of the square nut / Do not add separation space, only the real measurement
|
||||
SquareNutSize = 5.4;
|
||||
|
||||
// Square nut insert from which side
|
||||
EdgeSquareNutInsertFrom_X = true;
|
||||
|
||||
/* [Wall mount holder settings] */
|
||||
|
||||
// Select if you need a mount holder
|
||||
EnableMountHolder = false;
|
||||
|
||||
// Chose your desired wall mount style
|
||||
MountHolderStyle = 5; // [1:Style 1, 2: Style 2, 3: Style 3, 4 : Style 4, 5 : Style 5]
|
||||
|
||||
// Some styles (1-3) allow more than one hole
|
||||
CountOfMountHolderHoles = 1; // [1:One hole centered, 2: Two holes, 3: Three holes]
|
||||
MountHolderHoleDiameter = 5; // [1:0.1:10]
|
||||
MountHolderThickness = 4.0; // [2:0.1:10]
|
||||
|
||||
/* [PCB/Device holder settings] */
|
||||
// Activate customizable PCB/Device holder
|
||||
ShowDeviceHolder = false;
|
||||
// Hole in the cylinder for the screw // 2.9 Screw = 2mm hole
|
||||
ScrewHoleDiameter = 2.6;
|
||||
// The diamter of the screw cylinder
|
||||
ScrewCylinderDiameter = 7;
|
||||
// The height of the screw cylinders (also the deepness for the screw hole)
|
||||
ScrewCylinderHeight = 8.0;
|
||||
// Distance between the holders in X direction
|
||||
DeviceHolder_X_Distance = 60;
|
||||
// Distance between the holders in Y direction
|
||||
DeviceHolder_y_Distance = 80;
|
||||
// Move all holders in X direction
|
||||
Offset_X = 0;
|
||||
// Move all holders in Y direction
|
||||
Offset_Y = -20;
|
||||
|
||||
/* [Wall Holes settings (for cable gland cut)] */
|
||||
// Activate customizable holes for cable gland or similar
|
||||
ShowSideWallHoles = false;
|
||||
// Holes on X or Y side of the housing
|
||||
SideWallHolesOn_X = false;
|
||||
// Count of holes, if there is an additional screw on X or Y side the hole in the middle is not showed
|
||||
CountOfSideWallHoles = 1; //[1:1:3]
|
||||
// Diameter of the holes
|
||||
SideWallHoleDiameter = 16.5; //[1:0.1:80]
|
||||
// Add or decrease height position
|
||||
SiedWallHoleOffset_Z = 0;
|
||||
|
||||
|
||||
|
||||
/* [Render quality settings] */
|
||||
// Set to at least to 150 before render and save as .stl file, otherwise you can go down to 40 for quick 3D view
|
||||
$fn = 60; // [20:1:300]
|
||||
|
||||
// ========================= C A L C U L A T E D S E T T I N G S (do not change!!!) ===================================
|
||||
|
||||
// Calculated Screw settings (do not change!!!)
|
||||
ScrewHoleDia = CountersinkScrew+1;
|
||||
ScrewHeadDia = CountersinkScrew*2;
|
||||
ScrewCountersink = (CountersinkScrew+8)/14-0.5;
|
||||
|
||||
// Calculated settings for Ridge (do not change!!!)
|
||||
RidgeHeight = GrooveDepth-Space;
|
||||
RidgeWidth = GrooveWidth-Space;
|
||||
|
||||
// Calculated settings for case (do not change!!!)
|
||||
SideWallThickness = InnerBorder+GrooveWidth+OuterBorder;
|
||||
CaseRoundingRadius = ScrewHoleDia/2+InnerBorder+GrooveWidth+OuterBorder;
|
||||
ScrewCornerPos = [Caselength/2-CaseRoundingRadius,CaseWidth/2-CaseRoundingRadius,0];
|
||||
ScrewAddXPos = [0,CaseWidth/2-CaseRoundingRadius,0];
|
||||
ScrewAddYPos = [Caselength/2-CaseRoundingRadius,0,0];
|
||||
|
||||
// Calculated settings for wall mount holder
|
||||
MountHolderLenght = MountHolderHoleDiameter*3;
|
||||
|
||||
// if both objects showed
|
||||
X_ObjectPosition = ((ShowBottom)&&(ShowTop)&&(!ShowCaseAssembled)) ? Caselength/2+DistanceBetweenObjects/2:0;
|
||||
|
||||
// If the case is assembled showed
|
||||
Y_TopRotation = ShowCaseAssembled ? 180:0;
|
||||
Z_TopHigh = ShowCaseAssembled ? CaseHeight:0;
|
||||
|
||||
ShowSizes(); // Show the calculated sizes
|
||||
|
||||
//===============================================================================
|
||||
// M A I N
|
||||
//===============================================================================
|
||||
|
||||
// --> Show the bottom of the case
|
||||
translate([X_ObjectPosition,0,0]) rotate([0,0,0]) difference(){
|
||||
union(){
|
||||
BodyBottom();
|
||||
// **** Add your bottom case additions here ****
|
||||
//cylinder(h=20,d=15,center = true); // Example
|
||||
translate([-15,0,18/2+2]) rotate([90,0,0]) cylinder(h=70,d=18,center=true); //battery
|
||||
cube([18,35,26]);
|
||||
}
|
||||
// **** Add your bottom case cuts here ****
|
||||
//cylinder(h=15,d=20,center = true); // Example
|
||||
}
|
||||
|
||||
// --> Show the top of the case
|
||||
translate([-X_ObjectPosition,0,Z_TopHigh+0.03]) rotate([0,Y_TopRotation,0]) difference(){
|
||||
union(){
|
||||
BodyTop();
|
||||
// **** Add your bottom top additions here ****
|
||||
//cylinder(h=18,d=10,center = true); // Example
|
||||
}
|
||||
// **** Add your top case cuts here ****
|
||||
//cylinder(h=20,d=5,center = true); // Example
|
||||
}
|
||||
|
||||
//===============================================================================
|
||||
// M O D U L E S
|
||||
//===============================================================================
|
||||
|
||||
module BodyBottom () {
|
||||
if(ShowBottom)
|
||||
{
|
||||
difference(){
|
||||
union()
|
||||
{
|
||||
rotate([ 0, 0, 0]) BodyQuarterBottom(Caselength,CaseWidth,CaseHeight-CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
rotate([ 0, 0,180]) BodyQuarterBottom(Caselength,CaseWidth,CaseHeight-CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
mirror([ 0, 1, 0]) BodyQuarterBottom(Caselength,CaseWidth,CaseHeight-CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
mirror([ 1, 0 ,0]) BodyQuarterBottom(Caselength,CaseWidth,CaseHeight-CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
|
||||
if (EnableMountHolder)
|
||||
{
|
||||
color("SteelBlue")
|
||||
if (MountHolderStyle!=5)
|
||||
{
|
||||
translate([0,CaseWidth/2,0]) MountHolder(MountHolderThickness,MountHolderHoleDiameter);
|
||||
rotate([0,0,180]) translate([0,CaseWidth/2,0]) MountHolder(MountHolderThickness,MountHolderHoleDiameter);
|
||||
}
|
||||
else
|
||||
{
|
||||
translate([0,CaseWidth/2,0]) MountHolder(MountHolderThickness,MountHolderHoleDiameter);
|
||||
}
|
||||
|
||||
}
|
||||
if (ShowDeviceHolder)
|
||||
{
|
||||
|
||||
translate([DeviceHolder_X_Distance/2+Offset_X,DeviceHolder_y_Distance/2+Offset_Y,-0.01]) DeviceHolder();
|
||||
translate([-DeviceHolder_X_Distance/2+Offset_X,-DeviceHolder_y_Distance/2+Offset_Y,-0.01]) DeviceHolder();
|
||||
translate([DeviceHolder_X_Distance/2+Offset_X,-DeviceHolder_y_Distance/2+Offset_Y,-0.01]) DeviceHolder();
|
||||
translate([-DeviceHolder_X_Distance/2+Offset_X,DeviceHolder_y_Distance/2+Offset_Y,-0.01]) DeviceHolder();
|
||||
|
||||
}
|
||||
}
|
||||
if (SeeNutCut) { color("red") translate([0,0,CaseHeight/2+CaseHeight-CutFromTop-NutSink]) cube([Caselength+0.1,CaseWidth+0.1,CaseHeight],center=true);}
|
||||
if (SeeGrooveRidgeScrew) { color("red") translate([CaseRoundingRadius+50,0,(CaseHeight+0.1)/2-0.05]) cube([Caselength+0.1,CaseWidth*2+0.1,CaseHeight+0.1],center=true);}
|
||||
if (ShowSideWallHoles)
|
||||
{
|
||||
color("Yellow")
|
||||
if(SideWallHolesOn_X)
|
||||
{
|
||||
|
||||
if ((CountOfSideWallHoles==1)||(CountOfSideWallHoles==3)&&(!XAdditionalScrew))
|
||||
{
|
||||
if ((CountOfSideWallHoles==1)&&(!XAdditionalScrew))
|
||||
{
|
||||
translate([0,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
if ((CountOfSideWallHoles==3)&&(!XAdditionalScrew))
|
||||
{
|
||||
translate([0,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ((CountOfSideWallHoles==1)&&(XAdditionalScrew))
|
||||
{
|
||||
translate([Caselength/4-CaseRoundingRadius/2,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((CountOfSideWallHoles==2)||(CountOfSideWallHoles==3))
|
||||
{
|
||||
translate([Caselength/4-CaseRoundingRadius/2,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
translate([-Caselength/4+CaseRoundingRadius/2,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((CountOfSideWallHoles==1)||(CountOfSideWallHoles==3)&&(!YAdditionalScrew))
|
||||
{
|
||||
if ((CountOfSideWallHoles==1)&&(!YAdditionalScrew))
|
||||
{
|
||||
translate([Caselength/2-SideWallThickness/2,0,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
if ((CountOfSideWallHoles==3)&&(!YAdditionalScrew))
|
||||
{
|
||||
translate([Caselength/2-SideWallThickness/2,0,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ((CountOfSideWallHoles==1)&&(YAdditionalScrew))
|
||||
{
|
||||
translate([Caselength/2-SideWallThickness/2,-CaseWidth/4+CaseRoundingRadius/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((CountOfSideWallHoles==2)||(CountOfSideWallHoles==3))
|
||||
{
|
||||
translate([Caselength/2-SideWallThickness/2,CaseWidth/4-CaseRoundingRadius/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
translate([Caselength/2-SideWallThickness/2,-CaseWidth/4+CaseRoundingRadius/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module BodyTop () {
|
||||
if (ShowTop)
|
||||
{
|
||||
difference(){
|
||||
union(){
|
||||
rotate([ 0, 0, 0]) BodyQuarterTop(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
rotate([ 0, 0,180]) BodyQuarterTop(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
mirror([ 0, 1, 0]) BodyQuarterTop(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
mirror([ 1, 0 ,0]) BodyQuarterTop(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
}
|
||||
if (SeeGrooveRidgeScrew) { color("red") translate([-CaseRoundingRadius-50,0,(CaseHeight+0.1)/2-0.05]) cube([Caselength+0.1,CaseWidth+0.1,CaseHeight+0.1],center=true);}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module MountHolder (Thick,Hole) {
|
||||
|
||||
translate([0,0,0.005]) difference(){
|
||||
|
||||
if (MountHolderStyle==1){
|
||||
$fn=40;
|
||||
roundedBox([Caselength, MountHolderLenght*2, Thick*2], Thick/3, 0);
|
||||
}
|
||||
if (MountHolderStyle==2){
|
||||
$fn=60;
|
||||
roundedBox([Caselength, MountHolderLenght*2, Thick*2],CaseRoundingRadius , 1);
|
||||
}
|
||||
if (MountHolderStyle==3){
|
||||
roundedBox([Caselength, MountHolderLenght*2, Thick*2],0 , 2);
|
||||
}
|
||||
if((MountHolderStyle>0)&&(MountHolderStyle<4)){
|
||||
translate([0,0,-Thick/2-0.02]) cube([Caselength+0.02,MountHolderLenght*2+0.02,Thick+0.04],center=true);
|
||||
translate([0,-MountHolderLenght/2-CaseRoundingRadius,Thick/2+0.02]) cube([Caselength+0.02,MountHolderLenght+0.02,Thick+0.08],center=true);
|
||||
translate([0,-MountHolderLenght/2,Thick/2+0.02]) cube([Caselength-2*CaseRoundingRadius+0.02,MountHolderLenght+0.02,Thick+0.08],center=true);
|
||||
translate([0,-CaseRoundingRadius,MountHolderThickness/2-0.02]) translate(ScrewAddYPos) cylinder(h=MountHolderThickness+0.06,d=ScrewHoleDia,center = true);
|
||||
mirror([ 1, 0, 0]) translate([0,-CaseRoundingRadius,MountHolderThickness/2-0.02]) translate(ScrewAddYPos) cylinder(h=MountHolderThickness+0.06,d=ScrewHoleDia,center = true);
|
||||
|
||||
if (CountOfMountHolderHoles>1){
|
||||
translate([Caselength/2-Hole-Thick/3,Hole*1.5,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
translate([-Caselength/2+Hole+Thick/3,Hole*1.5,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
if (CountOfMountHolderHoles!=2){
|
||||
translate([0,Hole*1.5,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
if (MountHolderStyle==4){
|
||||
HolderRad=Hole/2;
|
||||
HolderWidth=4*Hole;
|
||||
translate([0,MountHolderLenght,0]) difference(){
|
||||
union(){
|
||||
translate([0,-MountHolderLenght+HolderRad,0]) roundedBox([HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([-HolderWidth/2+HolderRad,0,0]) rotate([0,0,-45]) translate([HolderWidth-HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([ HolderWidth/2-HolderRad,0,0]) rotate([0,0,45]) translate([-HolderWidth+HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
}
|
||||
translate([0,-(3*HolderWidth)/2-MountHolderLenght,-0.02]) cube([10*HolderWidth,3*HolderWidth,Thick*2+0.06],center=true);
|
||||
translate([0,-(3*HolderWidth)/2,-Thick-0.02]) cube([4*HolderWidth,4*HolderWidth,Thick*2],center=true);
|
||||
translate([0,-MountHolderLenght+Hole*1.8,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (MountHolderStyle==5){
|
||||
HolderRad=Hole/2;
|
||||
HolderWidth=4*Hole;
|
||||
translate([0,MountHolderLenght,0]) difference()
|
||||
{
|
||||
union(){
|
||||
$fn=40;
|
||||
translate([0,-MountHolderLenght+HolderRad,0]) roundedBox([HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([-HolderWidth/2+HolderRad,0,0]) rotate([0,0,-45]) translate([HolderWidth-HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([ HolderWidth/2-HolderRad,0,0]) rotate([0,0,45]) translate([-HolderWidth+HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
}
|
||||
translate([0,-(3*HolderWidth)/2-MountHolderLenght,-0.02]) cube([10*HolderWidth,3*HolderWidth,Thick*4+0.06],center=true);
|
||||
translate([0,-(3*HolderWidth)/2,-Thick-0.02]) cube([4*HolderWidth,4*HolderWidth,Thick*2],center=true);
|
||||
hull(){
|
||||
translate([-Hole/1.1,-MountHolderLenght+Hole*1.6,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
translate([+Hole/1.1,-MountHolderLenght+Hole*1.6,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
}
|
||||
|
||||
rotate([0,0,180]) translate([0,MountHolderLenght+CaseWidth,0]) difference()
|
||||
{
|
||||
union(){
|
||||
$fn=40;
|
||||
translate([0,-MountHolderLenght+HolderRad,0]) roundedBox([HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([-HolderWidth/2+HolderRad,0,0]) rotate([0,0,-45]) translate([HolderWidth-HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([ HolderWidth/2-HolderRad,0,0]) rotate([0,0,45]) translate([-HolderWidth+HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
}
|
||||
translate([0,-(3*HolderWidth)/2-MountHolderLenght,-0.02]) cube([10*HolderWidth,3*HolderWidth,Thick*2+0.06],center=true);
|
||||
translate([0,-(3*HolderWidth)/2,-Thick-0.02]) cube([4*HolderWidth,4*HolderWidth,Thick*2],center=true);
|
||||
hull(){
|
||||
translate([0,-MountHolderLenght+Hole*1.6+Hole/1.8,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
translate([0,-MountHolderLenght+Hole*1.6-Hole/1.8,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
module ShowSizes () {
|
||||
echo ();
|
||||
echo (str(" Stable and waterproof OpenSCAD case by pbtec V6.0"));
|
||||
echo ();
|
||||
echo (str(" Render quality : ",$fn));
|
||||
echo ();
|
||||
echo (str(" --> Case outer dimensions: "));
|
||||
echo (str(" Length : ",Caselength,"mm "));
|
||||
echo (str(" Width : ",CaseWidth,"mm "));
|
||||
echo (str(" High : ",CaseHeight,"mm "));
|
||||
echo (str(" Top (upper piece) high : ",CutFromTop,"mm "));
|
||||
echo (str(" Bottom (lower piece) high : ",CaseHeight-CutFromTop,"mm "));
|
||||
echo (str(" Side wall thickness : ",SideWallThickness,"mm "));
|
||||
echo (str(" Bottom & top wall thickness : ",BottomTopThickness,"mm "));
|
||||
echo (str(" Case rounding radius : ",CaseRoundingRadius,"mm "));
|
||||
echo ();
|
||||
echo (str(" --> Case inner dimensions : "));
|
||||
echo (str(" X : Wall to wall : ",Caselength-2*SideWallThickness,"mm "));
|
||||
echo (str(" X : Screw cylinder to screw cylinder : ",Caselength-4*CaseRoundingRadius,"mm "));
|
||||
echo (str(" Y : Wall to wall : ",CaseWidth-2*SideWallThickness,"mm "));
|
||||
echo (str(" Y : Screw cylinder to screw cylinder : ",CaseWidth-4*CaseRoundingRadius,"mm "));
|
||||
echo (str(" Top to bottom : ",CaseHeight-2*BottomTopThickness,"mm "));
|
||||
echo ();
|
||||
echo (str(" <b>Screw dimensions : "));
|
||||
echo (str(" Metric Screw size: m",CountersinkScrew));
|
||||
echo (str(" Screw hole diameter : ",ScrewHoleDia,"mm "));
|
||||
echo (str(" Screw head diameter : ",ScrewHeadDia,"mm "));
|
||||
echo (str(" X : Additional screw (3rd)) : ",XAdditionalScrew));
|
||||
echo (str(" Y : Additional screws (3rd) : ",YAdditionalScrew));
|
||||
echo (str(" --> Check if you have screws within the following size : "));
|
||||
echo (str(" --> Screw m",CountersinkScrew , " max length : ",CaseHeight-BottomTopThickness, "mm"));
|
||||
if(UseSquareNutInsteadOfNut) { echo (str(" --> Screw m",CountersinkScrew , " min length : ",CutFromTop+NutSink+SquareNutHigh, "mm")); }
|
||||
else { echo (str(" --> Screw m",CountersinkScrew , " min length : ",CutFromTop+NutSink+NutHigh, "mm")); }
|
||||
}
|
||||
|
||||
module GrooveStraight (length) {
|
||||
color("orange") translate([length/2,0,-(GrooveDepth+AddGrooveDepthForSealing)/2]) cube([length,GrooveWidth,GrooveDepth+AddGrooveDepthForSealing],center=true);
|
||||
}
|
||||
|
||||
module GrooveCurved (Angle,Rad) {
|
||||
color("orange") difference(){
|
||||
translate([0,0,-(GrooveDepth+AddGrooveDepthForSealing)]) pie(Rad+(GrooveWidth)/2, Angle, GrooveDepth+AddGrooveDepthForSealing, spin=0);
|
||||
translate([-0.01,-0.01,-(GrooveDepth+AddGrooveDepthForSealing+0.02)]) pie(Rad-(GrooveWidth)/2, Angle, GrooveDepth+AddGrooveDepthForSealing+0.04, spin=0);
|
||||
}
|
||||
}
|
||||
|
||||
module RidgeStraight (length) {
|
||||
color("orange") translate([length/2,0,(RidgeHeight)/2]) cube([length,RidgeWidth,RidgeHeight],center=true);
|
||||
}
|
||||
|
||||
module RidgeCurved (Angle,Rad) {
|
||||
color("orange") difference(){
|
||||
translate([0,0,0]) pie(Rad+(RidgeWidth)/2, Angle, RidgeHeight, spin=0);
|
||||
translate([-0.01,-0.01,-0.02]) pie(Rad-(RidgeWidth)/2, Angle, RidgeHeight+0.04, spin=0);
|
||||
}
|
||||
}
|
||||
|
||||
module BodyQuarterBottom (Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness) {
|
||||
difference(){
|
||||
union(){
|
||||
color("SteelBlue")BodyQuarter(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
|
||||
translate([CaseRoundingRadius+ScrewHoleDia/2-0.01,CaseWidth/2-OuterBorder-GrooveWidth/2-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,0]) RidgeStraight(Caselength/2-3*CaseRoundingRadius-ScrewHoleDia+0.03);
|
||||
translate([Caselength/2-OuterBorder-GrooveWidth/2-0.01,CaseRoundingRadius+ScrewHoleDia/2-0.02,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,90]) RidgeStraight(CaseWidth/2-3*CaseRoundingRadius-ScrewHoleDia+0.04);
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,180]) RidgeCurved(90,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-ScrewHoleDia-SideWallThickness+0.02,-0.01,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,0]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([-0.01,-ScrewHoleDia-SideWallThickness+0.00,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,0]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
|
||||
|
||||
|
||||
if (XAdditionalScrew){
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,180]) RidgeCurved(180,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-ScrewHoleDia-SideWallThickness+0.04,-0.01,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,0]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([ScrewHoleDia+SideWallThickness,-0.01,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,90]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
}
|
||||
else{
|
||||
translate([-0.01,CaseWidth/2-OuterBorder-GrooveWidth/2-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,0]) RidgeStraight(Caselength/2-2*CaseRoundingRadius-ScrewHoleDia/2+0.05);
|
||||
}
|
||||
if (YAdditionalScrew){
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,90]) RidgeCurved(180,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-0.01,-ScrewHoleDia-SideWallThickness-0.01,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,0]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([-0.01,ScrewHoleDia+SideWallThickness-0.01,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,270]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
}
|
||||
else{translate([Caselength/2-OuterBorder-GrooveWidth/2-0.01,-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,90]) RidgeStraight(CaseWidth/2-2*CaseRoundingRadius-ScrewHoleDia/2+0.05);}
|
||||
}
|
||||
|
||||
|
||||
if(UseSquareNutInsteadOfNut)
|
||||
{
|
||||
if (EdgeSquareNutInsertFrom_X) {translate(ScrewCornerPos) translate([0,0,CutFromTop+0.01]) rotate([0,0, 0]) SquareNutCut(CutFromTop,SquareNutHigh,SquareNutSize);}
|
||||
else {translate(ScrewCornerPos) translate([0,0,CutFromTop+0.01]) rotate([0,0,90]) SquareNutCut(CutFromTop,SquareNutHigh,SquareNutSize);}
|
||||
}
|
||||
else {translate(ScrewCornerPos) translate([0,0,CutFromTop+0.01]) NutCut(CutFromTop,NutHigh,NutDia);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (XAdditionalScrew){
|
||||
if(UseSquareNutInsteadOfNut) {translate(ScrewAddXPos) translate([0,0,CutFromTop+0.01]) rotate([0,0,90]) SquareNutCut(CutFromTop,SquareNutHigh,SquareNutSize);}
|
||||
else {translate(ScrewAddXPos) translate([0,0,CutFromTop+0.01]) NutCut(CutFromTop,NutHigh,NutDia);}
|
||||
}
|
||||
if (YAdditionalScrew){
|
||||
if(UseSquareNutInsteadOfNut) {translate(ScrewAddYPos) translate([0,0,CutFromTop+0.01]) SquareNutCut(CutFromTop,SquareNutHigh,SquareNutSize);}
|
||||
else {translate(ScrewAddYPos) translate([0,0,CutFromTop+0.01]) NutCut(CutFromTop,NutHigh,NutDia);}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module BodyQuarterTop (Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness) {
|
||||
|
||||
difference()
|
||||
{
|
||||
union(){
|
||||
color("DarkCyan")BodyQuarter(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
}
|
||||
translate(ScrewCornerPos) ScrewCut(CountersinkScrew,CutFromTop+0.01,0);
|
||||
if (XAdditionalScrew){
|
||||
translate(ScrewAddXPos) ScrewCut(CountersinkScrew,CutFromTop+0.01,0);
|
||||
}
|
||||
if (YAdditionalScrew){
|
||||
translate(ScrewAddYPos) ScrewCut(CountersinkScrew,CutFromTop+0.01,0);
|
||||
}
|
||||
translate([CaseRoundingRadius+ScrewHoleDia/2-0.01,CaseWidth/2-OuterBorder-GrooveWidth/2-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,0]) GrooveStraight(Caselength/2-3*CaseRoundingRadius-ScrewHoleDia+0.03);
|
||||
translate([Caselength/2-OuterBorder-GrooveWidth/2-0.01,CaseRoundingRadius+ScrewHoleDia/2-0.02,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,90]) GrooveStraight(CaseWidth/2-3*CaseRoundingRadius-ScrewHoleDia+0.04);
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,180]) GrooveCurved(90,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-ScrewHoleDia-SideWallThickness+0.02,-0.01,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,0]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([-0.01,-ScrewHoleDia-SideWallThickness+0.0,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,0]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
if (XAdditionalScrew){
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,180]) GrooveCurved(180,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-ScrewHoleDia-SideWallThickness+0.04,-0.01,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,0]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([ScrewHoleDia+SideWallThickness,-0.01,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,90]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
}
|
||||
else{
|
||||
translate([-0.01,CaseWidth/2-OuterBorder-GrooveWidth/2-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,0]) GrooveStraight(Caselength/2-2*CaseRoundingRadius-ScrewHoleDia/2+0.07);
|
||||
}
|
||||
|
||||
if (YAdditionalScrew){
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,90]) GrooveCurved(180,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-0.01,-ScrewHoleDia-SideWallThickness-0.01,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,0]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([-0.01,ScrewHoleDia+SideWallThickness-0.01,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,270]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
}
|
||||
else{
|
||||
translate([Caselength/2-OuterBorder-GrooveWidth/2-0.01,-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,90]) GrooveStraight(CaseWidth/2-2*CaseRoundingRadius-ScrewHoleDia/2+0.057);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module BodyQuarter (L,W,H,Rad,Rand){
|
||||
cube([L/2-Rad,W/2,BottomTopThickness],center=false); // Ground
|
||||
cube([L/2,W/2-Rad,BottomTopThickness],center=false); // Ground
|
||||
if (CaseRadius < CaseRoundingRadius)
|
||||
{
|
||||
translate([0,W/2-Rand,0]) cube([L/2-CaseRadius,Rand,H],center=false); // Wall
|
||||
translate([L/2-Rand,0,0]) cube([Rand,W/2-CaseRadius,H],center=false); // Wall
|
||||
translate([L/2-CaseRadius,W/2-CaseRadius,H/2]) cylinder(h=H,r=CaseRadius,center = true);
|
||||
}
|
||||
else
|
||||
{
|
||||
translate([0,W/2-Rand,0]) cube([L/2-Rad,Rand,H],center=false); // Wall
|
||||
translate([L/2-Rand,0,0]) cube([Rand,W/2-Rad,H],center=false); // Wall
|
||||
}
|
||||
|
||||
translate(ScrewCornerPos) cylinder(h=H,r=Rad,center = false); // Cylinder
|
||||
translate([L/2-3*Rad+Rand,W/2-Rad,0]) rotate([0,0, 0]) HolderGap(H,Rad,Rand); // Gap between wall and Cylinder
|
||||
translate([L/2-Rad,W/2-Rad-Rand,0]) rotate([0,0,-90]) HolderGap(H,Rad,Rand); // Gap Between wall and Cylinder
|
||||
|
||||
if (XAdditionalScrew) {
|
||||
translate(ScrewAddXPos) cylinder(h=H,r=Rad,center = false); // Cylinder
|
||||
translate([Rand,W/2-Rad,0]) rotate([0,0,0]) HolderGap(H,Rad,Rand);
|
||||
translate([Rand-2*CaseRoundingRadius,W/2-Rad,0]) rotate([0,0,0]) HolderGap(H,Rad,Rand);
|
||||
}
|
||||
|
||||
if (YAdditionalScrew) {
|
||||
translate(ScrewAddYPos) cylinder(h=H,r=Rad,center = false); // Cylinder
|
||||
translate([L/2-3*Rad+2*CaseRoundingRadius,-Rand+2*CaseRoundingRadius,0]) rotate([0,0, 270]) HolderGap(H,Rad,Rand);
|
||||
translate([L/2-3*Rad+2*CaseRoundingRadius,-Rand,0]) rotate([0,0, 270]) HolderGap(H,Rad,Rand);
|
||||
}
|
||||
}
|
||||
|
||||
module NutCut(TotalHigh,High,Dia){
|
||||
AdditionalGap=0.3;
|
||||
translate([0,0,-(High+2*AdditionalGap)/2-NutSink]) cylinder($fn=6,h=High+2*AdditionalGap,d=2*sqrt(((Dia/2)*(Dia/2))+((Dia/4)*(Dia/4)))+Dia/26+2*AdditionalGap,center = true);
|
||||
translate([0,0,-(TotalHigh-SideWallThickness)/2]) cylinder(h=TotalHigh-SideWallThickness,d=ScrewHoleDia,center = true);
|
||||
}
|
||||
|
||||
module SquareNutCut (TotalHigh,High,Size) {
|
||||
AdditionalGap=0.5;
|
||||
SquareNutInsertReduction= 0.2;
|
||||
|
||||
translate([0,0,-(High+2*AdditionalGap)/2-NutSink])cube([Size+2*AdditionalGap,Size+2*AdditionalGap,High+2*AdditionalGap],center=true);
|
||||
translate([CaseRoundingRadius/2+0.02,0,-(High+2*AdditionalGap)/2-NutSink+SquareNutInsertReduction/2]) cube([CaseRoundingRadius+0.04,Size+2*AdditionalGap,High+2*AdditionalGap-SquareNutInsertReduction],center=true);
|
||||
translate([0,0,-(TotalHigh-SideWallThickness)/2]) cylinder(h=TotalHigh-SideWallThickness,d=ScrewHoleDia,center = true);
|
||||
}
|
||||
|
||||
module SideWallHoles () {
|
||||
cylinder(h=20,d1=10,d2=15,center = true);
|
||||
}
|
||||
|
||||
|
||||
module ScrewCut(m,h,v){
|
||||
// m = 3=M3 4=M4 5=M5 6=M6 usw...
|
||||
// h = High of the screw inkl. head
|
||||
// v = if screw head is to be sunk deeper
|
||||
|
||||
ScrewHeadDia=m*2; // Berechnung des Schraubenkopf Durchmessers
|
||||
//ScrewCountersink=(m+8)/14-0.7; // Leichte ScrewCountersink damit Schraube nicht vorsteht
|
||||
ScrewHoleDia=m+1; // ScrewHoleDiadurchmesser
|
||||
|
||||
translate([0,0,-0.01]) union(){ // Ganze Schraube
|
||||
|
||||
translate([0,0,ScrewCountersink-0.01])cylinder( h = ScrewHeadDia/4,d1=ScrewHeadDia,d2=ScrewHeadDia/2,center=false); // Kegel (Abschraegung)
|
||||
translate([0,0,0]) cylinder( h = ScrewCountersink,d=ScrewHeadDia,center=false); // ScrewCountersink
|
||||
translate([0,0,0.01])rotate([180,0,0])cylinder(h=v,d=ScrewHeadDia,center = false); // Versenkung
|
||||
translate([0,0,0.01])cylinder( h = h,d=ScrewHoleDia,center=false); //Loch fuer Gewinde
|
||||
}
|
||||
}
|
||||
|
||||
module HolderGap (H,Rad,Rand) {
|
||||
difference(){
|
||||
translate([0,0,0]) cube([Rad*2-2*Rand,Rad-Rand,H],center=false);
|
||||
translate([0,0,-0.02]) cylinder(h=H+0.04,r=Rad-Rand,center = false);
|
||||
translate([2*(Rad-Rand),0,-0.02]) cylinder(h=H+0.04,r=Rad-Rand,center = false);
|
||||
}
|
||||
}
|
||||
|
||||
module DeviceHolder () {
|
||||
color("yellow")translate([0,0,ScrewCylinderHeight/2+BottomTopThickness]) difference(){
|
||||
cylinder(h=ScrewCylinderHeight,d=ScrewCylinderDiameter,center = true);
|
||||
translate([0,0,0]) cylinder(h=ScrewCylinderHeight+0.05,d=ScrewHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module pie(radius, angle, height, spin=0) {
|
||||
// Negative angles shift direction of rotation
|
||||
clockwise = (angle < 0) ? true : false;
|
||||
// Support angles < 0 and > 360
|
||||
normalized_angle = abs((angle % 360 != 0) ? angle % 360 : angle % 360 + 360);
|
||||
// Select rotation direction
|
||||
rotation = clockwise ? [0, 180 - normalized_angle] : [180, normalized_angle];
|
||||
// Render
|
||||
if (angle != 0) {
|
||||
rotate([0,0,spin]) linear_extrude(height=height)
|
||||
difference() {
|
||||
circle(radius);
|
||||
if (normalized_angle < 180) {
|
||||
union() for(a = rotation)
|
||||
rotate(a) translate([-radius, 0, 0]) square(radius * 2);
|
||||
}
|
||||
else if (normalized_angle != 360) {
|
||||
intersection_for(a = rotation)
|
||||
rotate(a) translate([-radius, 0, 0]) square(radius * 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module roundedBox(size, radius, sidesonly) // Laenge, Breite, Hoehe, Radius, 0/1
|
||||
{
|
||||
rot = [ [0,0,0], [90,0,90], [90,90,0] ];
|
||||
if (sidesonly) {
|
||||
cube(size - [2*radius,0,0], true);
|
||||
cube(size - [0,2*radius,0], true);
|
||||
for (x = [radius-size[0]/2, -radius+size[0]/2],
|
||||
y = [radius-size[1]/2, -radius+size[1]/2]) {
|
||||
translate([x,y,0]) cylinder(r=radius, h=size[2], center=true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
cube([size[0], size[1]-radius*2, size[2]-radius*2], center=true);
|
||||
cube([size[0]-radius*2, size[1], size[2]-radius*2], center=true);
|
||||
cube([size[0]-radius*2, size[1]-radius*2, size[2]], center=true);
|
||||
|
||||
for (axis = [0:2]) {
|
||||
for (x = [radius-size[axis]/2, -radius+size[axis]/2],
|
||||
y = [radius-size[(axis+1)%3]/2, -radius+size[(axis+1)%3]/2]) {
|
||||
rotate(rot[axis])
|
||||
translate([x,y,0])
|
||||
cylinder(h=size[(axis+2)%3]-2*radius, r=radius, center=true);
|
||||
}
|
||||
}
|
||||
for (x = [radius-size[0]/2, -radius+size[0]/2],
|
||||
y = [radius-size[1]/2, -radius+size[1]/2],
|
||||
z = [radius-size[2]/2, -radius+size[2]/2]) {
|
||||
translate([x,y,z]) sphere(radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,788 +0,0 @@
|
|||
/*******************************************************************************
|
||||
TITLE:
|
||||
Stable and waterproof OpenSCAD case by pbtec
|
||||
|
||||
DESCRIPTION:
|
||||
|
||||
highly scalable case for 3D printing. Try it out!
|
||||
|
||||
Optimized for Openscad Customizer. Activate it under view/customizer and play around ;-)
|
||||
|
||||
No Support needed to print
|
||||
|
||||
- for waterproof cases you can use silicone sealing cord with diameters from 1 to 3mm
|
||||
- to use also without sealing cord. The groove and ridge gives the housing a high stability and tightness.
|
||||
- Use of regular nuts or square nuts
|
||||
- define outer vertical radius of corners
|
||||
- echo output in console shows inner and outer size and more
|
||||
- echo output shows the needed length of the screws
|
||||
- use screws from m2 up to m5
|
||||
- default are 4 screws at each corner. For large cases add addtional ones in the middle of both x and y sides if needed
|
||||
- use several predefined wall mount holder, some with multiple mounting holes (up to 3)
|
||||
|
||||
Important!
|
||||
- If you use standard nuts you need to pause the printer a certain level to insert the nuts
|
||||
- If you need a stable and waterproof case please print with 100% infill
|
||||
- I'm aware that sometimes, when using too big or too small parameters, there are some rendering issues.
|
||||
To prevent such issues change only one parameter at once and check the result.
|
||||
|
||||
for waterproofness see https://blog.prusaprinters.org/watertight-3d-printing-part-2_53638/
|
||||
|
||||
AUTHOR:
|
||||
pbtec / pb-tec.ch
|
||||
|
||||
use https://paypal.me/pbtec if you want to spend me a coold beer. Thanks in advance :-)
|
||||
|
||||
|
||||
VERSION:
|
||||
V KZZ DATE COMMENT
|
||||
6.0 pb 31.07.21 First Version to share
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
/* [View settings] */
|
||||
// Shows the Bottom of the case
|
||||
ShowBottom = true;
|
||||
// Shows the top of the case
|
||||
ShowTop = true;
|
||||
// Distance between top and bottom (if both are side by side displayed)
|
||||
DistanceBetweenObjects = 10;
|
||||
// Shows the housing assembled
|
||||
ShowCaseAssembled = false;
|
||||
|
||||
|
||||
/* [Control cuts (use only one at a time)] */
|
||||
|
||||
// To see the nuts inside (best view if not assembled showed)
|
||||
SeeNutCut = false;
|
||||
// To see the groove, ridge and Screw (best view if assembled showed)
|
||||
SeeGrooveRidgeScrew = false;
|
||||
|
||||
|
||||
/* [Case settings] */
|
||||
|
||||
// Length of the case
|
||||
Caselength = 60;
|
||||
// Width of the case
|
||||
CaseWidth = 100;
|
||||
// Height of the case
|
||||
CaseHeight = 40;
|
||||
// Splitt the Case height into bottom and top, check for the needed screws in echo output (console)
|
||||
CutFromTop = 5.0;
|
||||
// Thickness for the bottom and top wall (vertical walls needs to be calculated)
|
||||
BottomTopThickness = 2.0;
|
||||
// If this is bigger than the needed cylinder around the screw it will be ignored
|
||||
CaseRadius = 12.0;
|
||||
|
||||
/* [Case Screw settings] */
|
||||
|
||||
//2=m2/2.5=m2.5/3=m3/4=m4/5=m5 // max m5, larger sizes do not fit
|
||||
CountersinkScrew = 3.0; // [2:m2, 2.5: m2.5, 3: m3, 4: m4, 5: m5]
|
||||
|
||||
// Adds additional Screws on X axis (for large cases) --> Try it out
|
||||
XAdditionalScrew = false; // can be true or false / Adds additional Screws on X axis (for large cases) --> Try it out
|
||||
// Adds additional Screws on Y axis (for large cases) --> Try it out
|
||||
YAdditionalScrew = false; // can be true or false / Adds additional Screws on Y axis (for large cases) --> Try it out
|
||||
|
||||
/* [Groove settings] */
|
||||
|
||||
// If using a SealingCord use the SealingCord diameter, otherwise x-times of your 3D Printer Nozzle (0.8/1.2/...) --> Ridge gets perfect for printing
|
||||
GrooveWidth = 1.2; // [0.8:0.1:3]
|
||||
|
||||
// Not less than 1mm (for stability) and not more than 3mm --> Best 2mm
|
||||
GrooveDepth = 2.0; // [1.0:0.1:3]
|
||||
|
||||
// Space between Groove and Ridge for a perfect fit, usualy 0.2 or 0.3 for FDM depending on your printer quality
|
||||
Space = 0.3; // [0.0:0.1:0.4]
|
||||
|
||||
// Addtional vertical room for the pressed sealing Cord. For sealing cord 1.5mm -->0.5 // for 2mm -->0.8 // for 2.5 -->1.0 // If no sealing cord then set this parameter to 0.
|
||||
AddGrooveDepthForSealing = 0.8; // [0.0:0.1:3]
|
||||
|
||||
// Range Inside groove/ridge. Usualy 2 times or more the printer nozzle. For best stability at least 0.8
|
||||
InnerBorder = 0.8; // [0.8:0.1:4]
|
||||
|
||||
|
||||
// Range Outside groove/ridge . Usualy 2 times or more the printer nozzle. For best stability at least 0.8
|
||||
OuterBorder = 0.8; // [0.8:0.1:4]
|
||||
|
||||
/* [Nut general settings] */
|
||||
|
||||
// Size of material (plastic) above nut/square nut (3mm or more). The more, the more stable but need longer screw.
|
||||
NutSink = 4.0;
|
||||
|
||||
/* [Standard nut settings] */
|
||||
|
||||
// Nut Settings / As there are (or I have) many different nuts dimensions, the size must be specified / Do not add separation space, only the real measurement // m2=1.5 // m2.5=1.9 // m3=2.4 // m4=3.2 // n5=3.8
|
||||
NutHigh = 2.4;
|
||||
|
||||
// Distance between the paralell sides / Do not add separation space, only the real measurement // m2=3.8 // m2.5=4.9 // m3=5.4 // m4=6.9 // m5=7.9
|
||||
NutDia = 5.4;
|
||||
|
||||
/* [Square Nut settings] */
|
||||
|
||||
// Select if you want to use square nuts instead of normal nuts
|
||||
UseSquareNutInsteadOfNut = false;
|
||||
|
||||
// Select the high of the square nut / Do not add separation space, only the real measurement
|
||||
SquareNutHigh = 1.9;
|
||||
|
||||
// Select the size of the square nut / Do not add separation space, only the real measurement
|
||||
SquareNutSize = 5.4;
|
||||
|
||||
// Square nut insert from which side
|
||||
EdgeSquareNutInsertFrom_X = true;
|
||||
|
||||
/* [Wall mount holder settings] */
|
||||
|
||||
// Select if you need a mount holder
|
||||
EnableMountHolder = false;
|
||||
|
||||
// Chose your desired wall mount style
|
||||
MountHolderStyle = 5; // [1:Style 1, 2: Style 2, 3: Style 3, 4 : Style 4, 5 : Style 5]
|
||||
|
||||
// Some styles (1-3) allow more than one hole
|
||||
CountOfMountHolderHoles = 1; // [1:One hole centered, 2: Two holes, 3: Three holes]
|
||||
MountHolderHoleDiameter = 5; // [1:0.1:10]
|
||||
MountHolderThickness = 4.0; // [2:0.1:10]
|
||||
|
||||
/* [PCB/Device holder settings] */
|
||||
// Activate customizable PCB/Device holder
|
||||
ShowDeviceHolder = false;
|
||||
// Hole in the cylinder for the screw // 2.9 Screw = 2mm hole
|
||||
ScrewHoleDiameter = 2.6;
|
||||
// The diamter of the screw cylinder
|
||||
ScrewCylinderDiameter = 7;
|
||||
// The height of the screw cylinders (also the deepness for the screw hole)
|
||||
ScrewCylinderHeight = 8.0;
|
||||
// Distance between the holders in X direction
|
||||
DeviceHolder_X_Distance = 60;
|
||||
// Distance between the holders in Y direction
|
||||
DeviceHolder_y_Distance = 80;
|
||||
// Move all holders in X direction
|
||||
Offset_X = 0;
|
||||
// Move all holders in Y direction
|
||||
Offset_Y = -20;
|
||||
|
||||
/* [Wall Holes settings (for cable gland cut)] */
|
||||
// Activate customizable holes for cable gland or similar
|
||||
ShowSideWallHoles = false;
|
||||
// Holes on X or Y side of the housing
|
||||
SideWallHolesOn_X = false;
|
||||
// Count of holes, if there is an additional screw on X or Y side the hole in the middle is not showed
|
||||
CountOfSideWallHoles = 1; //[1:1:3]
|
||||
// Diameter of the holes
|
||||
SideWallHoleDiameter = 16.5; //[1:0.1:80]
|
||||
// Add or decrease height position
|
||||
SiedWallHoleOffset_Z = 0;
|
||||
|
||||
|
||||
|
||||
/* [Render quality settings] */
|
||||
// Set to at least to 150 before render and save as .stl file, otherwise you can go down to 40 for quick 3D view
|
||||
$fn = 60; // [20:1:300]
|
||||
|
||||
// ========================= C A L C U L A T E D S E T T I N G S (do not change!!!) ===================================
|
||||
|
||||
// Calculated Screw settings (do not change!!!)
|
||||
ScrewHoleDia = CountersinkScrew+1;
|
||||
ScrewHeadDia = CountersinkScrew*2;
|
||||
ScrewCountersink = (CountersinkScrew+8)/14-0.5;
|
||||
|
||||
// Calculated settings for Ridge (do not change!!!)
|
||||
RidgeHeight = GrooveDepth-Space;
|
||||
RidgeWidth = GrooveWidth-Space;
|
||||
|
||||
// Calculated settings for case (do not change!!!)
|
||||
SideWallThickness = InnerBorder+GrooveWidth+OuterBorder;
|
||||
CaseRoundingRadius = ScrewHoleDia/2+InnerBorder+GrooveWidth+OuterBorder;
|
||||
ScrewCornerPos = [Caselength/2-CaseRoundingRadius,CaseWidth/2-CaseRoundingRadius,0];
|
||||
ScrewAddXPos = [0,CaseWidth/2-CaseRoundingRadius,0];
|
||||
ScrewAddYPos = [Caselength/2-CaseRoundingRadius,0,0];
|
||||
|
||||
// Calculated settings for wall mount holder
|
||||
MountHolderLenght = MountHolderHoleDiameter*3;
|
||||
|
||||
// if both objects showed
|
||||
X_ObjectPosition = ((ShowBottom)&&(ShowTop)&&(!ShowCaseAssembled)) ? Caselength/2+DistanceBetweenObjects/2:0;
|
||||
|
||||
// If the case is assembled showed
|
||||
Y_TopRotation = ShowCaseAssembled ? 180:0;
|
||||
Z_TopHigh = ShowCaseAssembled ? CaseHeight:0;
|
||||
|
||||
ShowSizes(); // Show the calculated sizes
|
||||
|
||||
//===============================================================================
|
||||
// M A I N
|
||||
//===============================================================================
|
||||
|
||||
|
||||
|
||||
// --> Show the bottom of the case
|
||||
translate([X_ObjectPosition,0,0]) rotate([0,0,0]) difference(){
|
||||
union(){
|
||||
BodyBottom();
|
||||
// **** Add your bottom case additions here ****
|
||||
//cylinder(h=20,d=15,center = true); // Example
|
||||
//#translate([-18,0,18/2+2]) rotate([90,0,0]) cylinder(h=70,d=18,center=true); //battery mockup
|
||||
translate([-6,0,20/2+0.1]) cube([2,CaseWidth-4,20],center=true); //battery divider
|
||||
translate([-15,CaseWidth/2-5.5,20/2+0.1]) cube([16,7,20],center=true); //battery ends
|
||||
translate([-15,-(CaseWidth/2-5.5),20/2+0.1]) cube([16,7,20],center=true); //battery ends
|
||||
//#translate([10,20,18/2+3+17-3]) cube([26,35,18],center=true); //wemos mockupo
|
||||
ButtonSides(4,-(15+2)*2);
|
||||
ButtonSides(4,-(15+2)*1);
|
||||
//ButtonSides(4,0);
|
||||
//ButtonSides(4,(15+2)*1);
|
||||
ButtonSides(4,(15+2)*2);
|
||||
|
||||
|
||||
}
|
||||
// **** Add your bottom case cuts here ****
|
||||
//cylinder(h=15,d=20,center = true); // Example
|
||||
ButtonCut(4,-(15+2)*2);
|
||||
ButtonCut(4,-(15+2)*1);
|
||||
//ButtonCut(4,0);
|
||||
//ButtonCut(4,(15+2)*1);
|
||||
ButtonCut(4,(15+2)*2);
|
||||
|
||||
translate([20,0,10]) rotate([0,90,0]) cylinder(h=20,d=6); //on off switch
|
||||
|
||||
translate([27,6.5,10]) cube([2,2,2],center=true); //on off switch notch
|
||||
}
|
||||
|
||||
// --> Show the top of the case
|
||||
translate([-X_ObjectPosition,0,Z_TopHigh+0.03]) rotate([0,Y_TopRotation,0]) difference(){
|
||||
union(){
|
||||
BodyTop();
|
||||
// **** Add your bottom top additions here ****
|
||||
//cylinder(h=18,d=10,center = true); // Example
|
||||
}
|
||||
// **** Add your top case cuts here ****
|
||||
//cylinder(h=20,d=5,center = true); // Example
|
||||
}
|
||||
|
||||
//===============================================================================
|
||||
// M O D U L E S
|
||||
//===============================================================================
|
||||
|
||||
module ButtonCut(xpos,ypos) {
|
||||
translate([xpos,ypos,17/2+BottomTopThickness+0.4])
|
||||
{
|
||||
cube([15.5,15,17],center=true);//key
|
||||
translate([0,0,-17/2-2.5]) cylinder(d=10.5,h=5);
|
||||
translate([0,0,-17/2-2.5+5/2+0.5]) rotate([0,0,45]) cube([5,14,5],center=true);
|
||||
}
|
||||
}
|
||||
|
||||
module ButtonSides (xpos,ypos) {
|
||||
translate([xpos,ypos,17/2+2.5-0.1])
|
||||
{
|
||||
|
||||
translate([0,0,-7+BottomTopThickness-0.1]) cube([15.5+2*2,15+2*2,7],center=true);//key
|
||||
}
|
||||
}
|
||||
|
||||
module BodyBottom () {
|
||||
if(ShowBottom)
|
||||
{
|
||||
difference(){
|
||||
union()
|
||||
{
|
||||
rotate([ 0, 0, 0]) BodyQuarterBottom(Caselength,CaseWidth,CaseHeight-CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
rotate([ 0, 0,180]) BodyQuarterBottom(Caselength,CaseWidth,CaseHeight-CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
mirror([ 0, 1, 0]) BodyQuarterBottom(Caselength,CaseWidth,CaseHeight-CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
mirror([ 1, 0 ,0]) BodyQuarterBottom(Caselength,CaseWidth,CaseHeight-CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
|
||||
if (EnableMountHolder)
|
||||
{
|
||||
color("SteelBlue")
|
||||
if (MountHolderStyle!=5)
|
||||
{
|
||||
translate([0,CaseWidth/2,0]) MountHolder(MountHolderThickness,MountHolderHoleDiameter);
|
||||
rotate([0,0,180]) translate([0,CaseWidth/2,0]) MountHolder(MountHolderThickness,MountHolderHoleDiameter);
|
||||
}
|
||||
else
|
||||
{
|
||||
translate([0,CaseWidth/2,0]) MountHolder(MountHolderThickness,MountHolderHoleDiameter);
|
||||
}
|
||||
|
||||
}
|
||||
if (ShowDeviceHolder)
|
||||
{
|
||||
|
||||
translate([DeviceHolder_X_Distance/2+Offset_X,DeviceHolder_y_Distance/2+Offset_Y,-0.01]) DeviceHolder();
|
||||
translate([-DeviceHolder_X_Distance/2+Offset_X,-DeviceHolder_y_Distance/2+Offset_Y,-0.01]) DeviceHolder();
|
||||
translate([DeviceHolder_X_Distance/2+Offset_X,-DeviceHolder_y_Distance/2+Offset_Y,-0.01]) DeviceHolder();
|
||||
translate([-DeviceHolder_X_Distance/2+Offset_X,DeviceHolder_y_Distance/2+Offset_Y,-0.01]) DeviceHolder();
|
||||
|
||||
}
|
||||
}
|
||||
if (SeeNutCut) { color("red") translate([0,0,CaseHeight/2+CaseHeight-CutFromTop-NutSink]) cube([Caselength+0.1,CaseWidth+0.1,CaseHeight],center=true);}
|
||||
if (SeeGrooveRidgeScrew) { color("red") translate([CaseRoundingRadius+50,0,(CaseHeight+0.1)/2-0.05]) cube([Caselength+0.1,CaseWidth*2+0.1,CaseHeight+0.1],center=true);}
|
||||
if (ShowSideWallHoles)
|
||||
{
|
||||
color("Yellow")
|
||||
if(SideWallHolesOn_X)
|
||||
{
|
||||
|
||||
if ((CountOfSideWallHoles==1)||(CountOfSideWallHoles==3)&&(!XAdditionalScrew))
|
||||
{
|
||||
if ((CountOfSideWallHoles==1)&&(!XAdditionalScrew))
|
||||
{
|
||||
translate([0,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
if ((CountOfSideWallHoles==3)&&(!XAdditionalScrew))
|
||||
{
|
||||
translate([0,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ((CountOfSideWallHoles==1)&&(XAdditionalScrew))
|
||||
{
|
||||
translate([Caselength/4-CaseRoundingRadius/2,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((CountOfSideWallHoles==2)||(CountOfSideWallHoles==3))
|
||||
{
|
||||
translate([Caselength/4-CaseRoundingRadius/2,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
translate([-Caselength/4+CaseRoundingRadius/2,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((CountOfSideWallHoles==1)||(CountOfSideWallHoles==3)&&(!YAdditionalScrew))
|
||||
{
|
||||
if ((CountOfSideWallHoles==1)&&(!YAdditionalScrew))
|
||||
{
|
||||
translate([Caselength/2-SideWallThickness/2,0,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
if ((CountOfSideWallHoles==3)&&(!YAdditionalScrew))
|
||||
{
|
||||
translate([Caselength/2-SideWallThickness/2,0,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ((CountOfSideWallHoles==1)&&(YAdditionalScrew))
|
||||
{
|
||||
translate([Caselength/2-SideWallThickness/2,-CaseWidth/4+CaseRoundingRadius/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((CountOfSideWallHoles==2)||(CountOfSideWallHoles==3))
|
||||
{
|
||||
translate([Caselength/2-SideWallThickness/2,CaseWidth/4-CaseRoundingRadius/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
translate([Caselength/2-SideWallThickness/2,-CaseWidth/4+CaseRoundingRadius/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module BodyTop () {
|
||||
if (ShowTop)
|
||||
{
|
||||
difference(){
|
||||
union(){
|
||||
rotate([ 0, 0, 0]) BodyQuarterTop(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
rotate([ 0, 0,180]) BodyQuarterTop(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
mirror([ 0, 1, 0]) BodyQuarterTop(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
mirror([ 1, 0 ,0]) BodyQuarterTop(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
}
|
||||
if (SeeGrooveRidgeScrew) { color("red") translate([-CaseRoundingRadius-50,0,(CaseHeight+0.1)/2-0.05]) cube([Caselength+0.1,CaseWidth+0.1,CaseHeight+0.1],center=true);}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module MountHolder (Thick,Hole) {
|
||||
|
||||
translate([0,0,0.005]) difference(){
|
||||
|
||||
if (MountHolderStyle==1){
|
||||
$fn=40;
|
||||
roundedBox([Caselength, MountHolderLenght*2, Thick*2], Thick/3, 0);
|
||||
}
|
||||
if (MountHolderStyle==2){
|
||||
$fn=60;
|
||||
roundedBox([Caselength, MountHolderLenght*2, Thick*2],CaseRoundingRadius , 1);
|
||||
}
|
||||
if (MountHolderStyle==3){
|
||||
roundedBox([Caselength, MountHolderLenght*2, Thick*2],0 , 2);
|
||||
}
|
||||
if((MountHolderStyle>0)&&(MountHolderStyle<4)){
|
||||
translate([0,0,-Thick/2-0.02]) cube([Caselength+0.02,MountHolderLenght*2+0.02,Thick+0.04],center=true);
|
||||
translate([0,-MountHolderLenght/2-CaseRoundingRadius,Thick/2+0.02]) cube([Caselength+0.02,MountHolderLenght+0.02,Thick+0.08],center=true);
|
||||
translate([0,-MountHolderLenght/2,Thick/2+0.02]) cube([Caselength-2*CaseRoundingRadius+0.02,MountHolderLenght+0.02,Thick+0.08],center=true);
|
||||
translate([0,-CaseRoundingRadius,MountHolderThickness/2-0.02]) translate(ScrewAddYPos) cylinder(h=MountHolderThickness+0.06,d=ScrewHoleDia,center = true);
|
||||
mirror([ 1, 0, 0]) translate([0,-CaseRoundingRadius,MountHolderThickness/2-0.02]) translate(ScrewAddYPos) cylinder(h=MountHolderThickness+0.06,d=ScrewHoleDia,center = true);
|
||||
|
||||
if (CountOfMountHolderHoles>1){
|
||||
translate([Caselength/2-Hole-Thick/3,Hole*1.5,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
translate([-Caselength/2+Hole+Thick/3,Hole*1.5,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
if (CountOfMountHolderHoles!=2){
|
||||
translate([0,Hole*1.5,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
if (MountHolderStyle==4){
|
||||
HolderRad=Hole/2;
|
||||
HolderWidth=4*Hole;
|
||||
translate([0,MountHolderLenght,0]) difference(){
|
||||
union(){
|
||||
translate([0,-MountHolderLenght+HolderRad,0]) roundedBox([HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([-HolderWidth/2+HolderRad,0,0]) rotate([0,0,-45]) translate([HolderWidth-HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([ HolderWidth/2-HolderRad,0,0]) rotate([0,0,45]) translate([-HolderWidth+HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
}
|
||||
translate([0,-(3*HolderWidth)/2-MountHolderLenght,-0.02]) cube([10*HolderWidth,3*HolderWidth,Thick*2+0.06],center=true);
|
||||
translate([0,-(3*HolderWidth)/2,-Thick-0.02]) cube([4*HolderWidth,4*HolderWidth,Thick*2],center=true);
|
||||
translate([0,-MountHolderLenght+Hole*1.8,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (MountHolderStyle==5){
|
||||
HolderRad=Hole/2;
|
||||
HolderWidth=4*Hole;
|
||||
translate([0,MountHolderLenght,0]) difference()
|
||||
{
|
||||
union(){
|
||||
$fn=40;
|
||||
translate([0,-MountHolderLenght+HolderRad,0]) roundedBox([HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([-HolderWidth/2+HolderRad,0,0]) rotate([0,0,-45]) translate([HolderWidth-HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([ HolderWidth/2-HolderRad,0,0]) rotate([0,0,45]) translate([-HolderWidth+HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
}
|
||||
translate([0,-(3*HolderWidth)/2-MountHolderLenght,-0.02]) cube([10*HolderWidth,3*HolderWidth,Thick*4+0.06],center=true);
|
||||
translate([0,-(3*HolderWidth)/2,-Thick-0.02]) cube([4*HolderWidth,4*HolderWidth,Thick*2],center=true);
|
||||
hull(){
|
||||
translate([-Hole/1.1,-MountHolderLenght+Hole*1.6,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
translate([+Hole/1.1,-MountHolderLenght+Hole*1.6,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
}
|
||||
|
||||
rotate([0,0,180]) translate([0,MountHolderLenght+CaseWidth,0]) difference()
|
||||
{
|
||||
union(){
|
||||
$fn=40;
|
||||
translate([0,-MountHolderLenght+HolderRad,0]) roundedBox([HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([-HolderWidth/2+HolderRad,0,0]) rotate([0,0,-45]) translate([HolderWidth-HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([ HolderWidth/2-HolderRad,0,0]) rotate([0,0,45]) translate([-HolderWidth+HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
}
|
||||
translate([0,-(3*HolderWidth)/2-MountHolderLenght,-0.02]) cube([10*HolderWidth,3*HolderWidth,Thick*2+0.06],center=true);
|
||||
translate([0,-(3*HolderWidth)/2,-Thick-0.02]) cube([4*HolderWidth,4*HolderWidth,Thick*2],center=true);
|
||||
hull(){
|
||||
translate([0,-MountHolderLenght+Hole*1.6+Hole/1.8,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
translate([0,-MountHolderLenght+Hole*1.6-Hole/1.8,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
module ShowSizes () {
|
||||
echo ();
|
||||
echo (str(" Stable and waterproof OpenSCAD case by pbtec V6.0"));
|
||||
echo ();
|
||||
echo (str(" Render quality : ",$fn));
|
||||
echo ();
|
||||
echo (str(" --> Case outer dimensions: "));
|
||||
echo (str(" Length : ",Caselength,"mm "));
|
||||
echo (str(" Width : ",CaseWidth,"mm "));
|
||||
echo (str(" High : ",CaseHeight,"mm "));
|
||||
echo (str(" Top (upper piece) high : ",CutFromTop,"mm "));
|
||||
echo (str(" Bottom (lower piece) high : ",CaseHeight-CutFromTop,"mm "));
|
||||
echo (str(" Side wall thickness : ",SideWallThickness,"mm "));
|
||||
echo (str(" Bottom & top wall thickness : ",BottomTopThickness,"mm "));
|
||||
echo (str(" Case rounding radius : ",CaseRoundingRadius,"mm "));
|
||||
echo ();
|
||||
echo (str(" --> Case inner dimensions : "));
|
||||
echo (str(" X : Wall to wall : ",Caselength-2*SideWallThickness,"mm "));
|
||||
echo (str(" X : Screw cylinder to screw cylinder : ",Caselength-4*CaseRoundingRadius,"mm "));
|
||||
echo (str(" Y : Wall to wall : ",CaseWidth-2*SideWallThickness,"mm "));
|
||||
echo (str(" Y : Screw cylinder to screw cylinder : ",CaseWidth-4*CaseRoundingRadius,"mm "));
|
||||
echo (str(" Top to bottom : ",CaseHeight-2*BottomTopThickness,"mm "));
|
||||
echo ();
|
||||
echo (str(" <b>Screw dimensions : "));
|
||||
echo (str(" Metric Screw size: m",CountersinkScrew));
|
||||
echo (str(" Screw hole diameter : ",ScrewHoleDia,"mm "));
|
||||
echo (str(" Screw head diameter : ",ScrewHeadDia,"mm "));
|
||||
echo (str(" X : Additional screw (3rd)) : ",XAdditionalScrew));
|
||||
echo (str(" Y : Additional screws (3rd) : ",YAdditionalScrew));
|
||||
echo (str(" --> Check if you have screws within the following size : "));
|
||||
echo (str(" --> Screw m",CountersinkScrew , " max length : ",CaseHeight-BottomTopThickness, "mm"));
|
||||
if(UseSquareNutInsteadOfNut) { echo (str(" --> Screw m",CountersinkScrew , " min length : ",CutFromTop+NutSink+SquareNutHigh, "mm")); }
|
||||
else { echo (str(" --> Screw m",CountersinkScrew , " min length : ",CutFromTop+NutSink+NutHigh, "mm")); }
|
||||
}
|
||||
|
||||
module GrooveStraight (length) {
|
||||
color("orange") translate([length/2,0,-(GrooveDepth+AddGrooveDepthForSealing)/2]) cube([length,GrooveWidth,GrooveDepth+AddGrooveDepthForSealing],center=true);
|
||||
}
|
||||
|
||||
module GrooveCurved (Angle,Rad) {
|
||||
color("orange") difference(){
|
||||
translate([0,0,-(GrooveDepth+AddGrooveDepthForSealing)]) pie(Rad+(GrooveWidth)/2, Angle, GrooveDepth+AddGrooveDepthForSealing, spin=0);
|
||||
translate([-0.01,-0.01,-(GrooveDepth+AddGrooveDepthForSealing+0.02)]) pie(Rad-(GrooveWidth)/2, Angle, GrooveDepth+AddGrooveDepthForSealing+0.04, spin=0);
|
||||
}
|
||||
}
|
||||
|
||||
module RidgeStraight (length) {
|
||||
color("orange") translate([length/2,0,(RidgeHeight)/2]) cube([length,RidgeWidth,RidgeHeight],center=true);
|
||||
}
|
||||
|
||||
module RidgeCurved (Angle,Rad) {
|
||||
color("orange") difference(){
|
||||
translate([0,0,0]) pie(Rad+(RidgeWidth)/2, Angle, RidgeHeight, spin=0);
|
||||
translate([-0.01,-0.01,-0.02]) pie(Rad-(RidgeWidth)/2, Angle, RidgeHeight+0.04, spin=0);
|
||||
}
|
||||
}
|
||||
|
||||
module BodyQuarterBottom (Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness) {
|
||||
difference(){
|
||||
union(){
|
||||
color("SteelBlue")BodyQuarter(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
|
||||
translate([CaseRoundingRadius+ScrewHoleDia/2-0.01,CaseWidth/2-OuterBorder-GrooveWidth/2-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,0]) RidgeStraight(Caselength/2-3*CaseRoundingRadius-ScrewHoleDia+0.03);
|
||||
translate([Caselength/2-OuterBorder-GrooveWidth/2-0.01,CaseRoundingRadius+ScrewHoleDia/2-0.02,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,90]) RidgeStraight(CaseWidth/2-3*CaseRoundingRadius-ScrewHoleDia+0.04);
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,180]) RidgeCurved(90,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-ScrewHoleDia-SideWallThickness+0.02,-0.01,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,0]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([-0.01,-ScrewHoleDia-SideWallThickness+0.00,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,0]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
|
||||
|
||||
|
||||
if (XAdditionalScrew){
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,180]) RidgeCurved(180,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-ScrewHoleDia-SideWallThickness+0.04,-0.01,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,0]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([ScrewHoleDia+SideWallThickness,-0.01,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,90]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
}
|
||||
else{
|
||||
translate([-0.01,CaseWidth/2-OuterBorder-GrooveWidth/2-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,0]) RidgeStraight(Caselength/2-2*CaseRoundingRadius-ScrewHoleDia/2+0.05);
|
||||
}
|
||||
if (YAdditionalScrew){
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,90]) RidgeCurved(180,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-0.01,-ScrewHoleDia-SideWallThickness-0.01,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,0]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([-0.01,ScrewHoleDia+SideWallThickness-0.01,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,270]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
}
|
||||
else{translate([Caselength/2-OuterBorder-GrooveWidth/2-0.01,-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,90]) RidgeStraight(CaseWidth/2-2*CaseRoundingRadius-ScrewHoleDia/2+0.05);}
|
||||
}
|
||||
|
||||
|
||||
if(UseSquareNutInsteadOfNut)
|
||||
{
|
||||
if (EdgeSquareNutInsertFrom_X) {translate(ScrewCornerPos) translate([0,0,CutFromTop+0.01]) rotate([0,0, 0]) SquareNutCut(CutFromTop,SquareNutHigh,SquareNutSize);}
|
||||
else {translate(ScrewCornerPos) translate([0,0,CutFromTop+0.01]) rotate([0,0,90]) SquareNutCut(CutFromTop,SquareNutHigh,SquareNutSize);}
|
||||
}
|
||||
else {translate(ScrewCornerPos) translate([0,0,CutFromTop+0.01]) NutCut(CutFromTop,NutHigh,NutDia);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (XAdditionalScrew){
|
||||
if(UseSquareNutInsteadOfNut) {translate(ScrewAddXPos) translate([0,0,CutFromTop+0.01]) rotate([0,0,90]) SquareNutCut(CutFromTop,SquareNutHigh,SquareNutSize);}
|
||||
else {translate(ScrewAddXPos) translate([0,0,CutFromTop+0.01]) NutCut(CutFromTop,NutHigh,NutDia);}
|
||||
}
|
||||
if (YAdditionalScrew){
|
||||
if(UseSquareNutInsteadOfNut) {translate(ScrewAddYPos) translate([0,0,CutFromTop+0.01]) SquareNutCut(CutFromTop,SquareNutHigh,SquareNutSize);}
|
||||
else {translate(ScrewAddYPos) translate([0,0,CutFromTop+0.01]) NutCut(CutFromTop,NutHigh,NutDia);}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module BodyQuarterTop (Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness) {
|
||||
|
||||
difference()
|
||||
{
|
||||
union(){
|
||||
color("DarkCyan")BodyQuarter(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
}
|
||||
translate(ScrewCornerPos) ScrewCut(CountersinkScrew,CutFromTop+0.01,0);
|
||||
if (XAdditionalScrew){
|
||||
translate(ScrewAddXPos) ScrewCut(CountersinkScrew,CutFromTop+0.01,0);
|
||||
}
|
||||
if (YAdditionalScrew){
|
||||
translate(ScrewAddYPos) ScrewCut(CountersinkScrew,CutFromTop+0.01,0);
|
||||
}
|
||||
translate([CaseRoundingRadius+ScrewHoleDia/2-0.01,CaseWidth/2-OuterBorder-GrooveWidth/2-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,0]) GrooveStraight(Caselength/2-3*CaseRoundingRadius-ScrewHoleDia+0.03);
|
||||
translate([Caselength/2-OuterBorder-GrooveWidth/2-0.01,CaseRoundingRadius+ScrewHoleDia/2-0.02,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,90]) GrooveStraight(CaseWidth/2-3*CaseRoundingRadius-ScrewHoleDia+0.04);
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,180]) GrooveCurved(90,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-ScrewHoleDia-SideWallThickness+0.02,-0.01,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,0]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([-0.01,-ScrewHoleDia-SideWallThickness+0.0,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,0]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
if (XAdditionalScrew){
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,180]) GrooveCurved(180,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-ScrewHoleDia-SideWallThickness+0.04,-0.01,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,0]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([ScrewHoleDia+SideWallThickness,-0.01,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,90]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
}
|
||||
else{
|
||||
translate([-0.01,CaseWidth/2-OuterBorder-GrooveWidth/2-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,0]) GrooveStraight(Caselength/2-2*CaseRoundingRadius-ScrewHoleDia/2+0.07);
|
||||
}
|
||||
|
||||
if (YAdditionalScrew){
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,90]) GrooveCurved(180,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-0.01,-ScrewHoleDia-SideWallThickness-0.01,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,0]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([-0.01,ScrewHoleDia+SideWallThickness-0.01,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,270]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
}
|
||||
else{
|
||||
translate([Caselength/2-OuterBorder-GrooveWidth/2-0.01,-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,90]) GrooveStraight(CaseWidth/2-2*CaseRoundingRadius-ScrewHoleDia/2+0.057);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module BodyQuarter (L,W,H,Rad,Rand){
|
||||
cube([L/2-Rad,W/2,BottomTopThickness],center=false); // Ground
|
||||
cube([L/2,W/2-Rad,BottomTopThickness],center=false); // Ground
|
||||
if (CaseRadius < CaseRoundingRadius)
|
||||
{
|
||||
translate([0,W/2-Rand,0]) cube([L/2-CaseRadius,Rand,H],center=false); // Wall
|
||||
translate([L/2-Rand,0,0]) cube([Rand,W/2-CaseRadius,H],center=false); // Wall
|
||||
translate([L/2-CaseRadius,W/2-CaseRadius,H/2]) cylinder(h=H,r=CaseRadius,center = true);
|
||||
}
|
||||
else
|
||||
{
|
||||
translate([0,W/2-Rand,0]) cube([L/2-Rad,Rand,H],center=false); // Wall
|
||||
translate([L/2-Rand,0,0]) cube([Rand,W/2-Rad,H],center=false); // Wall
|
||||
}
|
||||
|
||||
translate(ScrewCornerPos) cylinder(h=H,r=Rad,center = false); // Cylinder
|
||||
translate([L/2-3*Rad+Rand,W/2-Rad,0]) rotate([0,0, 0]) HolderGap(H,Rad,Rand); // Gap between wall and Cylinder
|
||||
translate([L/2-Rad,W/2-Rad-Rand,0]) rotate([0,0,-90]) HolderGap(H,Rad,Rand); // Gap Between wall and Cylinder
|
||||
|
||||
if (XAdditionalScrew) {
|
||||
translate(ScrewAddXPos) cylinder(h=H,r=Rad,center = false); // Cylinder
|
||||
translate([Rand,W/2-Rad,0]) rotate([0,0,0]) HolderGap(H,Rad,Rand);
|
||||
translate([Rand-2*CaseRoundingRadius,W/2-Rad,0]) rotate([0,0,0]) HolderGap(H,Rad,Rand);
|
||||
}
|
||||
|
||||
if (YAdditionalScrew) {
|
||||
translate(ScrewAddYPos) cylinder(h=H,r=Rad,center = false); // Cylinder
|
||||
translate([L/2-3*Rad+2*CaseRoundingRadius,-Rand+2*CaseRoundingRadius,0]) rotate([0,0, 270]) HolderGap(H,Rad,Rand);
|
||||
translate([L/2-3*Rad+2*CaseRoundingRadius,-Rand,0]) rotate([0,0, 270]) HolderGap(H,Rad,Rand);
|
||||
}
|
||||
}
|
||||
|
||||
module NutCut(TotalHigh,High,Dia){
|
||||
AdditionalGap=0.3;
|
||||
translate([0,0,-(High+2*AdditionalGap)/2-NutSink]) cylinder($fn=6,h=High+2*AdditionalGap,d=2*sqrt(((Dia/2)*(Dia/2))+((Dia/4)*(Dia/4)))+Dia/26+2*AdditionalGap,center = true);
|
||||
translate([0,0,-(TotalHigh-SideWallThickness)/2]) cylinder(h=TotalHigh-SideWallThickness,d=ScrewHoleDia,center = true);
|
||||
}
|
||||
|
||||
module SquareNutCut (TotalHigh,High,Size) {
|
||||
AdditionalGap=0.5;
|
||||
SquareNutInsertReduction= 0.2;
|
||||
|
||||
translate([0,0,-(High+2*AdditionalGap)/2-NutSink])cube([Size+2*AdditionalGap,Size+2*AdditionalGap,High+2*AdditionalGap],center=true);
|
||||
translate([CaseRoundingRadius/2+0.02,0,-(High+2*AdditionalGap)/2-NutSink+SquareNutInsertReduction/2]) cube([CaseRoundingRadius+0.04,Size+2*AdditionalGap,High+2*AdditionalGap-SquareNutInsertReduction],center=true);
|
||||
translate([0,0,-(TotalHigh-SideWallThickness)/2]) cylinder(h=TotalHigh-SideWallThickness,d=ScrewHoleDia,center = true);
|
||||
}
|
||||
|
||||
module SideWallHoles () {
|
||||
cylinder(h=20,d1=10,d2=15,center = true);
|
||||
}
|
||||
|
||||
|
||||
module ScrewCut(m,h,v){
|
||||
// m = 3=M3 4=M4 5=M5 6=M6 usw...
|
||||
// h = High of the screw inkl. head
|
||||
// v = if screw head is to be sunk deeper
|
||||
|
||||
ScrewHeadDia=m*2; // Berechnung des Schraubenkopf Durchmessers
|
||||
//ScrewCountersink=(m+8)/14-0.7; // Leichte ScrewCountersink damit Schraube nicht vorsteht
|
||||
ScrewHoleDia=m+1; // ScrewHoleDiadurchmesser
|
||||
|
||||
translate([0,0,-0.01]) union(){ // Ganze Schraube
|
||||
|
||||
translate([0,0,ScrewCountersink-0.01])cylinder( h = ScrewHeadDia/4,d1=ScrewHeadDia,d2=ScrewHeadDia/2,center=false); // Kegel (Abschraegung)
|
||||
translate([0,0,0]) cylinder( h = ScrewCountersink,d=ScrewHeadDia,center=false); // ScrewCountersink
|
||||
translate([0,0,0.01])rotate([180,0,0])cylinder(h=v,d=ScrewHeadDia,center = false); // Versenkung
|
||||
translate([0,0,0.01])cylinder( h = h,d=ScrewHoleDia,center=false); //Loch fuer Gewinde
|
||||
}
|
||||
}
|
||||
|
||||
module HolderGap (H,Rad,Rand) {
|
||||
difference(){
|
||||
translate([0,0,0]) cube([Rad*2-2*Rand,Rad-Rand,H],center=false);
|
||||
translate([0,0,-0.02]) cylinder(h=H+0.04,r=Rad-Rand,center = false);
|
||||
translate([2*(Rad-Rand),0,-0.02]) cylinder(h=H+0.04,r=Rad-Rand,center = false);
|
||||
}
|
||||
}
|
||||
|
||||
module DeviceHolder () {
|
||||
color("yellow")translate([0,0,ScrewCylinderHeight/2+BottomTopThickness]) difference(){
|
||||
cylinder(h=ScrewCylinderHeight,d=ScrewCylinderDiameter,center = true);
|
||||
translate([0,0,0]) cylinder(h=ScrewCylinderHeight+0.05,d=ScrewHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module pie(radius, angle, height, spin=0) {
|
||||
// Negative angles shift direction of rotation
|
||||
clockwise = (angle < 0) ? true : false;
|
||||
// Support angles < 0 and > 360
|
||||
normalized_angle = abs((angle % 360 != 0) ? angle % 360 : angle % 360 + 360);
|
||||
// Select rotation direction
|
||||
rotation = clockwise ? [0, 180 - normalized_angle] : [180, normalized_angle];
|
||||
// Render
|
||||
if (angle != 0) {
|
||||
rotate([0,0,spin]) linear_extrude(height=height)
|
||||
difference() {
|
||||
circle(radius);
|
||||
if (normalized_angle < 180) {
|
||||
union() for(a = rotation)
|
||||
rotate(a) translate([-radius, 0, 0]) square(radius * 2);
|
||||
}
|
||||
else if (normalized_angle != 360) {
|
||||
intersection_for(a = rotation)
|
||||
rotate(a) translate([-radius, 0, 0]) square(radius * 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module roundedBox(size, radius, sidesonly) // Laenge, Breite, Hoehe, Radius, 0/1
|
||||
{
|
||||
rot = [ [0,0,0], [90,0,90], [90,90,0] ];
|
||||
if (sidesonly) {
|
||||
cube(size - [2*radius,0,0], true);
|
||||
cube(size - [0,2*radius,0], true);
|
||||
for (x = [radius-size[0]/2, -radius+size[0]/2],
|
||||
y = [radius-size[1]/2, -radius+size[1]/2]) {
|
||||
translate([x,y,0]) cylinder(r=radius, h=size[2], center=true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
cube([size[0], size[1]-radius*2, size[2]-radius*2], center=true);
|
||||
cube([size[0]-radius*2, size[1], size[2]-radius*2], center=true);
|
||||
cube([size[0]-radius*2, size[1]-radius*2, size[2]], center=true);
|
||||
|
||||
for (axis = [0:2]) {
|
||||
for (x = [radius-size[axis]/2, -radius+size[axis]/2],
|
||||
y = [radius-size[(axis+1)%3]/2, -radius+size[(axis+1)%3]/2]) {
|
||||
rotate(rot[axis])
|
||||
translate([x,y,0])
|
||||
cylinder(h=size[(axis+2)%3]-2*radius, r=radius, center=true);
|
||||
}
|
||||
}
|
||||
for (x = [radius-size[0]/2, -radius+size[0]/2],
|
||||
y = [radius-size[1]/2, -radius+size[1]/2],
|
||||
z = [radius-size[2]/2, -radius+size[2]/2]) {
|
||||
translate([x,y,z]) sphere(radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,838 +0,0 @@
|
|||
/*******************************************************************************
|
||||
TITLE:
|
||||
Stable and waterproof OpenSCAD case by pbtec
|
||||
|
||||
DESCRIPTION:
|
||||
|
||||
highly scalable case for 3D printing. Try it out!
|
||||
|
||||
Optimized for Openscad Customizer. Activate it under view/customizer and play around ;-)
|
||||
|
||||
No Support needed to print
|
||||
|
||||
- for waterproof cases you can use silicone sealing cord with diameters from 1 to 3mm
|
||||
- to use also without sealing cord. The groove and ridge gives the housing a high stability and tightness.
|
||||
- Use of regular nuts or square nuts
|
||||
- define outer vertical radius of corners
|
||||
- echo output in console shows inner and outer size and more
|
||||
- echo output shows the needed length of the screws
|
||||
- use screws from m2 up to m5
|
||||
- default are 4 screws at each corner. For large cases add addtional ones in the middle of both x and y sides if needed
|
||||
- use several predefined wall mount holder, some with multiple mounting holes (up to 3)
|
||||
|
||||
Important!
|
||||
- If you use standard nuts you need to pause the printer a certain level to insert the nuts
|
||||
- If you need a stable and waterproof case please print with 100% infill
|
||||
- I'm aware that sometimes, when using too big or too small parameters, there are some rendering issues.
|
||||
To prevent such issues change only one parameter at once and check the result.
|
||||
|
||||
for waterproofness see https://blog.prusaprinters.org/watertight-3d-printing-part-2_53638/
|
||||
|
||||
AUTHOR:
|
||||
pbtec / pb-tec.ch
|
||||
|
||||
use https://paypal.me/pbtec if you want to spend me a coold beer. Thanks in advance :-)
|
||||
|
||||
|
||||
VERSION:
|
||||
V KZZ DATE COMMENT
|
||||
6.0 pb 31.07.21 First Version to share
|
||||
|
||||
*******************************************************************************/
|
||||
use <fillets3d.scad>;
|
||||
|
||||
/* [View settings] */
|
||||
// Shows the Bottom of the case
|
||||
ShowBottom = true;
|
||||
// Shows the top of the case
|
||||
ShowTop = true;
|
||||
// Distance between top and bottom (if both are side by side displayed)
|
||||
DistanceBetweenObjects = 10;
|
||||
// Shows the housing assembled
|
||||
ShowCaseAssembled = false;
|
||||
|
||||
|
||||
/* [Control cuts (use only one at a time)] */
|
||||
|
||||
// To see the nuts inside (best view if not assembled showed)
|
||||
SeeNutCut = false;
|
||||
// To see the groove, ridge and Screw (best view if assembled showed)
|
||||
SeeGrooveRidgeScrew = false;
|
||||
|
||||
|
||||
/* [Case settings] */
|
||||
|
||||
// Length of the case
|
||||
Caselength = 60;
|
||||
// Width of the case
|
||||
CaseWidth = 100;
|
||||
// Height of the case
|
||||
CaseHeight = 28;
|
||||
// Splitt the Case height into bottom and top, check for the needed screws in echo output (console)
|
||||
CutFromTop = 5.0;
|
||||
// Thickness for the bottom and top wall (vertical walls needs to be calculated)
|
||||
BottomTopThickness = 2.0;
|
||||
// If this is bigger than the needed cylinder around the screw it will be ignored
|
||||
CaseRadius = 12.0;
|
||||
|
||||
/* [Case Screw settings] */
|
||||
|
||||
//2=m2/2.5=m2.5/3=m3/4=m4/5=m5 // max m5, larger sizes do not fit
|
||||
CountersinkScrew = 3.0; // [2:m2, 2.5: m2.5, 3: m3, 4: m4, 5: m5]
|
||||
|
||||
// Adds additional Screws on X axis (for large cases) --> Try it out
|
||||
XAdditionalScrew = false; // can be true or false / Adds additional Screws on X axis (for large cases) --> Try it out
|
||||
// Adds additional Screws on Y axis (for large cases) --> Try it out
|
||||
YAdditionalScrew = false; // can be true or false / Adds additional Screws on Y axis (for large cases) --> Try it out
|
||||
|
||||
/* [Groove settings] */
|
||||
|
||||
// If using a SealingCord use the SealingCord diameter, otherwise x-times of your 3D Printer Nozzle (0.8/1.2/...) --> Ridge gets perfect for printing
|
||||
GrooveWidth = 1.2; // [0.8:0.1:3]
|
||||
|
||||
// Not less than 1mm (for stability) and not more than 3mm --> Best 2mm
|
||||
GrooveDepth = 2.0; // [1.0:0.1:3]
|
||||
|
||||
// Space between Groove and Ridge for a perfect fit, usualy 0.2 or 0.3 for FDM depending on your printer quality
|
||||
Space = 0.3; // [0.0:0.1:0.4]
|
||||
|
||||
// Addtional vertical room for the pressed sealing Cord. For sealing cord 1.5mm -->0.5 // for 2mm -->0.8 // for 2.5 -->1.0 // If no sealing cord then set this parameter to 0.
|
||||
AddGrooveDepthForSealing = 0.8; // [0.0:0.1:3]
|
||||
|
||||
// Range Inside groove/ridge. Usualy 2 times or more the printer nozzle. For best stability at least 0.8
|
||||
InnerBorder = 0.8; // [0.8:0.1:4]
|
||||
|
||||
|
||||
// Range Outside groove/ridge . Usualy 2 times or more the printer nozzle. For best stability at least 0.8
|
||||
OuterBorder = 0.8; // [0.8:0.1:4]
|
||||
|
||||
/* [Nut general settings] */
|
||||
|
||||
// Size of material (plastic) above nut/square nut (3mm or more). The more, the more stable but need longer screw.
|
||||
NutSink = 4.0;
|
||||
|
||||
/* [Standard nut settings] */
|
||||
|
||||
// Nut Settings / As there are (or I have) many different nuts dimensions, the size must be specified / Do not add separation space, only the real measurement // m2=1.5 // m2.5=1.9 // m3=2.4 // m4=3.2 // n5=3.8
|
||||
NutHigh = 2.4;
|
||||
|
||||
// Distance between the paralell sides / Do not add separation space, only the real measurement // m2=3.8 // m2.5=4.9 // m3=5.4 // m4=6.9 // m5=7.9
|
||||
NutDia = 5.4;
|
||||
|
||||
/* [Square Nut settings] */
|
||||
|
||||
// Select if you want to use square nuts instead of normal nuts
|
||||
UseSquareNutInsteadOfNut = true;
|
||||
|
||||
// Select the high of the square nut / Do not add separation space, only the real measurement
|
||||
SquareNutHigh = 1.9;
|
||||
|
||||
// Select the size of the square nut / Do not add separation space, only the real measurement
|
||||
SquareNutSize = 5.4;
|
||||
|
||||
// Square nut insert from which side
|
||||
EdgeSquareNutInsertFrom_X = true;
|
||||
|
||||
/* [Wall mount holder settings] */
|
||||
|
||||
// Select if you need a mount holder
|
||||
EnableMountHolder = false;
|
||||
|
||||
// Chose your desired wall mount style
|
||||
MountHolderStyle = 5; // [1:Style 1, 2: Style 2, 3: Style 3, 4 : Style 4, 5 : Style 5]
|
||||
|
||||
// Some styles (1-3) allow more than one hole
|
||||
CountOfMountHolderHoles = 1; // [1:One hole centered, 2: Two holes, 3: Three holes]
|
||||
MountHolderHoleDiameter = 5; // [1:0.1:10]
|
||||
MountHolderThickness = 4.0; // [2:0.1:10]
|
||||
|
||||
/* [PCB/Device holder settings] */
|
||||
// Activate customizable PCB/Device holder
|
||||
ShowDeviceHolder = false;
|
||||
// Hole in the cylinder for the screw // 2.9 Screw = 2mm hole
|
||||
ScrewHoleDiameter = 2.6;
|
||||
// The diamter of the screw cylinder
|
||||
ScrewCylinderDiameter = 7;
|
||||
// The height of the screw cylinders (also the deepness for the screw hole)
|
||||
ScrewCylinderHeight = 8.0;
|
||||
// Distance between the holders in X direction
|
||||
DeviceHolder_X_Distance = 60;
|
||||
// Distance between the holders in Y direction
|
||||
DeviceHolder_y_Distance = 80;
|
||||
// Move all holders in X direction
|
||||
Offset_X = 0;
|
||||
// Move all holders in Y direction
|
||||
Offset_Y = -20;
|
||||
|
||||
/* [Wall Holes settings (for cable gland cut)] */
|
||||
// Activate customizable holes for cable gland or similar
|
||||
ShowSideWallHoles = false;
|
||||
// Holes on X or Y side of the housing
|
||||
SideWallHolesOn_X = false;
|
||||
// Count of holes, if there is an additional screw on X or Y side the hole in the middle is not showed
|
||||
CountOfSideWallHoles = 1; //[1:1:3]
|
||||
// Diameter of the holes
|
||||
SideWallHoleDiameter = 16.5; //[1:0.1:80]
|
||||
// Add or decrease height position
|
||||
SiedWallHoleOffset_Z = 0;
|
||||
|
||||
|
||||
|
||||
/* [Render quality settings] */
|
||||
// Set to at least to 150 before render and save as .stl file, otherwise you can go down to 40 for quick 3D view
|
||||
$fn = 60; // [20:1:300]
|
||||
|
||||
// ========================= C A L C U L A T E D S E T T I N G S (do not change!!!) ===================================
|
||||
|
||||
// Calculated Screw settings (do not change!!!)
|
||||
ScrewHoleDia = CountersinkScrew+1;
|
||||
ScrewHeadDia = CountersinkScrew*2;
|
||||
ScrewCountersink = (CountersinkScrew+8)/14-0.5;
|
||||
|
||||
// Calculated settings for Ridge (do not change!!!)
|
||||
RidgeHeight = GrooveDepth-Space;
|
||||
RidgeWidth = GrooveWidth-Space;
|
||||
|
||||
// Calculated settings for case (do not change!!!)
|
||||
SideWallThickness = InnerBorder+GrooveWidth+OuterBorder;
|
||||
CaseRoundingRadius = ScrewHoleDia/2+InnerBorder+GrooveWidth+OuterBorder;
|
||||
ScrewCornerPos = [Caselength/2-CaseRoundingRadius,CaseWidth/2-CaseRoundingRadius,0];
|
||||
ScrewAddXPos = [0,CaseWidth/2-CaseRoundingRadius,0];
|
||||
ScrewAddYPos = [Caselength/2-CaseRoundingRadius,0,0];
|
||||
|
||||
// Calculated settings for wall mount holder
|
||||
MountHolderLenght = MountHolderHoleDiameter*3;
|
||||
|
||||
// if both objects showed
|
||||
X_ObjectPosition = ((ShowBottom)&&(ShowTop)&&(!ShowCaseAssembled)) ? Caselength/2+DistanceBetweenObjects/2:0;
|
||||
|
||||
// If the case is assembled showed
|
||||
Y_TopRotation = ShowCaseAssembled ? 180:0;
|
||||
Z_TopHigh = ShowCaseAssembled ? CaseHeight:0;
|
||||
|
||||
ShowSizes(); // Show the calculated sizes
|
||||
|
||||
//===============================================================================
|
||||
// M A I N
|
||||
//===============================================================================
|
||||
/*
|
||||
translate([X_ObjectPosition,0,0]) rotate([0,0,0]) difference(){
|
||||
RoundCaselength=Caselength+0.1;
|
||||
RoundCaseWidth=CaseWidth+0.1;
|
||||
RoundCaseRadius=CaseRadius*0.8;
|
||||
|
||||
shellthickness=5;
|
||||
|
||||
casebottomradius=3;
|
||||
|
||||
difference(){
|
||||
translate([0,0,casebottomradius/2]) cube([RoundCaselength+2*shellthickness,RoundCaseWidth+2*shellthickness,casebottomradius+shellthickness],center=true);
|
||||
{
|
||||
topBottomFillet(t=CaseHeight,b=0, r=casebottomradius, s=10)
|
||||
minkowski()
|
||||
{
|
||||
translate([0,0,CaseHeight/2]) cube([RoundCaselength-RoundCaseRadius,RoundCaseWidth-RoundCaseRadius,CaseHeight],center=true);
|
||||
cylinder(r=RoundCaseRadius/2,h=1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
// Button Bar
|
||||
|
||||
translate([X_ObjectPosition+21.5,0,0]) rotate([0,0,0])
|
||||
{
|
||||
translate([-7.5,0,20/2+0.1]) cube([11,CaseWidth-2.9*2,5], center=true);
|
||||
}
|
||||
|
||||
// --> Show the bottom of the case
|
||||
|
||||
translate([X_ObjectPosition,0,0]) rotate([0,0,0])
|
||||
//topBottomFillet(t=CaseHeight,b=0, r=3, s=15)
|
||||
difference(){
|
||||
|
||||
union(){
|
||||
BodyBottom();
|
||||
// **** Add your bottom case additions here ****
|
||||
//cylinder(h=20,d=15,center = true); // Example
|
||||
//#translate([-18,0,18/2+2]) rotate([90,0,0]) cylinder(h=70,d=18,center=true); //battery mockup
|
||||
translate([-7.5,0,20/2+0.1]) cube([2,CaseWidth-4,20],center=true); //battery divider
|
||||
translate([-18,CaseWidth/2-12, 20/2+0.1]) cube([20,4,20],center=true); //battery ends
|
||||
translate([-18,-(CaseWidth/2-12),20/2+0.1]) cube([20,4,20],center=true); //battery ends
|
||||
translate([0,10,16/2+BottomTopThickness]) cube([6,26+4,16],center=true); //wemos walls
|
||||
translate([20.75,10,16/2+BottomTopThickness]) cube([6,26+4,16],center=true); //wemos walls
|
||||
|
||||
translate([-7.5+2+1,-(CaseWidth/2-31/2-0.1),15/2+0.1]) cube([5,31,15],center=true); //charge board wall
|
||||
ButtonSides(14,-(15+2)*2);
|
||||
ButtonSides(14,-(15+2)*1);
|
||||
//ButtonSides(14,0);
|
||||
//ButtonSides(14,(15+2)*1);
|
||||
ButtonSides(14,(15+2)*2);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
// **** Add your bottom case cuts here ****
|
||||
//cylinder(h=15,d=20,center = true); // Example
|
||||
ButtonCut(14,-(15+2)*2);
|
||||
ButtonCut(14,-(15+2)*1);
|
||||
//ButtonCut(14,0);
|
||||
//ButtonCut(14,(15+2)*1);
|
||||
ButtonCut(14,(15+2)*2);
|
||||
|
||||
translate([0,-14,-4+13]) {
|
||||
//#translate([20,0,10]) cube([15,14,8],center=true); //switch case mockup
|
||||
translate([20,0,10]) rotate([0,90,0]) cylinder(h=20,d=6); //on off switch
|
||||
translate([27,6.5,10]) cube([2,2,2],center=true); //on off switch notch
|
||||
}
|
||||
|
||||
translate([10-0.1,10,18/2+BottomTopThickness+0.1]) cube([34.5,26,18.1],center=true); //wemos
|
||||
|
||||
translate([-7.5+2,-(CaseWidth/2-28/2-0.5),17.5/2+BottomTopThickness+0.1]) cube([1.5,28,17.5],center=true); //charge board pcb
|
||||
translate([-7.5+2.5,-(CaseWidth/2-4/2+0.1),17.5/2+BottomTopThickness+0.1]) cube([5,4,10],center=true); //charge board usb
|
||||
translate([-7.5+2.5+0.01,-(CaseWidth/2-40/2-3),17.5/2+BottomTopThickness+0.1]) cube([3,40,17.5],center=true); //charge board
|
||||
|
||||
|
||||
}
|
||||
|
||||
// --> Show the top of the case
|
||||
translate([-X_ObjectPosition,0,Z_TopHigh+0.03]) rotate([0,Y_TopRotation,0]) difference(){
|
||||
union(){
|
||||
BodyTop();
|
||||
// **** Add your bottom top additions here ****
|
||||
//cylinder(h=18,d=10,center = true); // Example
|
||||
}
|
||||
// **** Add your top case cuts here ****
|
||||
//cylinder(h=20,d=5,center = true); // Example
|
||||
}
|
||||
|
||||
|
||||
//===============================================================================
|
||||
// M O D U L E S
|
||||
//===============================================================================
|
||||
|
||||
module ButtonCut(xpos,ypos) {
|
||||
translate([xpos,ypos,17/2+BottomTopThickness+0.39])
|
||||
{
|
||||
cube([15.5,15,17],center=true);//key
|
||||
translate([0,0,-17/2-2.5]) cylinder(d=10.5,h=5);
|
||||
translate([0,0,-17/2-2.5+5/2+0.5]) rotate([0,0,45]) cube([5,14,5],center=true);
|
||||
}
|
||||
}
|
||||
|
||||
module ButtonSides (xpos,ypos) {
|
||||
translate([xpos,ypos,17/2+2.5-0.1])
|
||||
{
|
||||
|
||||
translate([0,0,-7+BottomTopThickness-0.1]) cube([15.5+2*2,15+2*2,7],center=true);//key
|
||||
}
|
||||
}
|
||||
|
||||
module BodyBottom () {
|
||||
if(ShowBottom)
|
||||
{
|
||||
difference(){
|
||||
union()
|
||||
{
|
||||
rotate([ 0, 0, 0]) BodyQuarterBottom(Caselength,CaseWidth,CaseHeight-CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
rotate([ 0, 0,180]) BodyQuarterBottom(Caselength,CaseWidth,CaseHeight-CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
mirror([ 0, 1, 0]) BodyQuarterBottom(Caselength,CaseWidth,CaseHeight-CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
mirror([ 1, 0 ,0]) BodyQuarterBottom(Caselength,CaseWidth,CaseHeight-CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
|
||||
if (EnableMountHolder)
|
||||
{
|
||||
color("SteelBlue")
|
||||
if (MountHolderStyle!=5)
|
||||
{
|
||||
translate([0,CaseWidth/2,0]) MountHolder(MountHolderThickness,MountHolderHoleDiameter);
|
||||
rotate([0,0,180]) translate([0,CaseWidth/2,0]) MountHolder(MountHolderThickness,MountHolderHoleDiameter);
|
||||
}
|
||||
else
|
||||
{
|
||||
translate([0,CaseWidth/2,0]) MountHolder(MountHolderThickness,MountHolderHoleDiameter);
|
||||
}
|
||||
|
||||
}
|
||||
if (ShowDeviceHolder)
|
||||
{
|
||||
|
||||
translate([DeviceHolder_X_Distance/2+Offset_X,DeviceHolder_y_Distance/2+Offset_Y,-0.01]) DeviceHolder();
|
||||
translate([-DeviceHolder_X_Distance/2+Offset_X,-DeviceHolder_y_Distance/2+Offset_Y,-0.01]) DeviceHolder();
|
||||
translate([DeviceHolder_X_Distance/2+Offset_X,-DeviceHolder_y_Distance/2+Offset_Y,-0.01]) DeviceHolder();
|
||||
translate([-DeviceHolder_X_Distance/2+Offset_X,DeviceHolder_y_Distance/2+Offset_Y,-0.01]) DeviceHolder();
|
||||
|
||||
}
|
||||
}
|
||||
if (SeeNutCut) { color("red") translate([0,0,CaseHeight/2+CaseHeight-CutFromTop-NutSink]) cube([Caselength+0.1,CaseWidth+0.1,CaseHeight],center=true);}
|
||||
if (SeeGrooveRidgeScrew) { color("red") translate([CaseRoundingRadius+50,0,(CaseHeight+0.1)/2-0.05]) cube([Caselength+0.1,CaseWidth*2+0.1,CaseHeight+0.1],center=true);}
|
||||
if (ShowSideWallHoles)
|
||||
{
|
||||
color("Yellow")
|
||||
if(SideWallHolesOn_X)
|
||||
{
|
||||
|
||||
if ((CountOfSideWallHoles==1)||(CountOfSideWallHoles==3)&&(!XAdditionalScrew))
|
||||
{
|
||||
if ((CountOfSideWallHoles==1)&&(!XAdditionalScrew))
|
||||
{
|
||||
translate([0,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
if ((CountOfSideWallHoles==3)&&(!XAdditionalScrew))
|
||||
{
|
||||
translate([0,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ((CountOfSideWallHoles==1)&&(XAdditionalScrew))
|
||||
{
|
||||
translate([Caselength/4-CaseRoundingRadius/2,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((CountOfSideWallHoles==2)||(CountOfSideWallHoles==3))
|
||||
{
|
||||
translate([Caselength/4-CaseRoundingRadius/2,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
translate([-Caselength/4+CaseRoundingRadius/2,CaseWidth/2-SideWallThickness/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,0]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((CountOfSideWallHoles==1)||(CountOfSideWallHoles==3)&&(!YAdditionalScrew))
|
||||
{
|
||||
if ((CountOfSideWallHoles==1)&&(!YAdditionalScrew))
|
||||
{
|
||||
translate([Caselength/2-SideWallThickness/2,0,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
if ((CountOfSideWallHoles==3)&&(!YAdditionalScrew))
|
||||
{
|
||||
translate([Caselength/2-SideWallThickness/2,0,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ((CountOfSideWallHoles==1)&&(YAdditionalScrew))
|
||||
{
|
||||
translate([Caselength/2-SideWallThickness/2,-CaseWidth/4+CaseRoundingRadius/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((CountOfSideWallHoles==2)||(CountOfSideWallHoles==3))
|
||||
{
|
||||
translate([Caselength/2-SideWallThickness/2,CaseWidth/4-CaseRoundingRadius/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
translate([Caselength/2-SideWallThickness/2,-CaseWidth/4+CaseRoundingRadius/2,SiedWallHoleOffset_Z+ BottomTopThickness+(CaseHeight-CutFromTop-BottomTopThickness)/2 ]) rotate([90,0,90]) cylinder(h=SideWallThickness+0.04,d=SideWallHoleDiameter,center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module BodyTop () {
|
||||
if (ShowTop)
|
||||
{
|
||||
difference(){
|
||||
union(){
|
||||
rotate([ 0, 0, 0]) BodyQuarterTop(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
rotate([ 0, 0,180]) BodyQuarterTop(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
mirror([ 0, 1, 0]) BodyQuarterTop(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
mirror([ 1, 0 ,0]) BodyQuarterTop(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
}
|
||||
if (SeeGrooveRidgeScrew) { color("red") translate([-CaseRoundingRadius-50,0,(CaseHeight+0.1)/2-0.05]) cube([Caselength+0.1,CaseWidth+0.1,CaseHeight+0.1],center=true);}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module MountHolder (Thick,Hole) {
|
||||
|
||||
translate([0,0,0.005]) difference(){
|
||||
|
||||
if (MountHolderStyle==1){
|
||||
$fn=40;
|
||||
roundedBox([Caselength, MountHolderLenght*2, Thick*2], Thick/3, 0);
|
||||
}
|
||||
if (MountHolderStyle==2){
|
||||
$fn=60;
|
||||
roundedBox([Caselength, MountHolderLenght*2, Thick*2],CaseRoundingRadius , 1);
|
||||
}
|
||||
if (MountHolderStyle==3){
|
||||
roundedBox([Caselength, MountHolderLenght*2, Thick*2],0 , 2);
|
||||
}
|
||||
if((MountHolderStyle>0)&&(MountHolderStyle<4)){
|
||||
translate([0,0,-Thick/2-0.02]) cube([Caselength+0.02,MountHolderLenght*2+0.02,Thick+0.04],center=true);
|
||||
translate([0,-MountHolderLenght/2-CaseRoundingRadius,Thick/2+0.02]) cube([Caselength+0.02,MountHolderLenght+0.02,Thick+0.08],center=true);
|
||||
translate([0,-MountHolderLenght/2,Thick/2+0.02]) cube([Caselength-2*CaseRoundingRadius+0.02,MountHolderLenght+0.02,Thick+0.08],center=true);
|
||||
translate([0,-CaseRoundingRadius,MountHolderThickness/2-0.02]) translate(ScrewAddYPos) cylinder(h=MountHolderThickness+0.06,d=ScrewHoleDia,center = true);
|
||||
mirror([ 1, 0, 0]) translate([0,-CaseRoundingRadius,MountHolderThickness/2-0.02]) translate(ScrewAddYPos) cylinder(h=MountHolderThickness+0.06,d=ScrewHoleDia,center = true);
|
||||
|
||||
if (CountOfMountHolderHoles>1){
|
||||
translate([Caselength/2-Hole-Thick/3,Hole*1.5,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
translate([-Caselength/2+Hole+Thick/3,Hole*1.5,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
if (CountOfMountHolderHoles!=2){
|
||||
translate([0,Hole*1.5,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
if (MountHolderStyle==4){
|
||||
HolderRad=Hole/2;
|
||||
HolderWidth=4*Hole;
|
||||
translate([0,MountHolderLenght,0]) difference(){
|
||||
union(){
|
||||
translate([0,-MountHolderLenght+HolderRad,0]) roundedBox([HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([-HolderWidth/2+HolderRad,0,0]) rotate([0,0,-45]) translate([HolderWidth-HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([ HolderWidth/2-HolderRad,0,0]) rotate([0,0,45]) translate([-HolderWidth+HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
}
|
||||
translate([0,-(3*HolderWidth)/2-MountHolderLenght,-0.02]) cube([10*HolderWidth,3*HolderWidth,Thick*2+0.06],center=true);
|
||||
translate([0,-(3*HolderWidth)/2,-Thick-0.02]) cube([4*HolderWidth,4*HolderWidth,Thick*2],center=true);
|
||||
translate([0,-MountHolderLenght+Hole*1.8,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (MountHolderStyle==5){
|
||||
HolderRad=Hole/2;
|
||||
HolderWidth=4*Hole;
|
||||
translate([0,MountHolderLenght,0]) difference()
|
||||
{
|
||||
union(){
|
||||
$fn=40;
|
||||
translate([0,-MountHolderLenght+HolderRad,0]) roundedBox([HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([-HolderWidth/2+HolderRad,0,0]) rotate([0,0,-45]) translate([HolderWidth-HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([ HolderWidth/2-HolderRad,0,0]) rotate([0,0,45]) translate([-HolderWidth+HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
}
|
||||
translate([0,-(3*HolderWidth)/2-MountHolderLenght,-0.02]) cube([10*HolderWidth,3*HolderWidth,Thick*4+0.06],center=true);
|
||||
translate([0,-(3*HolderWidth)/2,-Thick-0.02]) cube([4*HolderWidth,4*HolderWidth,Thick*2],center=true);
|
||||
hull(){
|
||||
translate([-Hole/1.1,-MountHolderLenght+Hole*1.6,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
translate([+Hole/1.1,-MountHolderLenght+Hole*1.6,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
}
|
||||
|
||||
rotate([0,0,180]) translate([0,MountHolderLenght+CaseWidth,0]) difference()
|
||||
{
|
||||
union(){
|
||||
$fn=40;
|
||||
translate([0,-MountHolderLenght+HolderRad,0]) roundedBox([HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([-HolderWidth/2+HolderRad,0,0]) rotate([0,0,-45]) translate([HolderWidth-HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
translate([ HolderWidth/2-HolderRad,0,0]) rotate([0,0,45]) translate([-HolderWidth+HolderRad,-MountHolderLenght+HolderRad,0]) roundedBox([2*HolderWidth, MountHolderLenght*2, Thick*2],HolderRad , 0);
|
||||
}
|
||||
translate([0,-(3*HolderWidth)/2-MountHolderLenght,-0.02]) cube([10*HolderWidth,3*HolderWidth,Thick*2+0.06],center=true);
|
||||
translate([0,-(3*HolderWidth)/2,-Thick-0.02]) cube([4*HolderWidth,4*HolderWidth,Thick*2],center=true);
|
||||
hull(){
|
||||
translate([0,-MountHolderLenght+Hole*1.6+Hole/1.8,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
translate([0,-MountHolderLenght+Hole*1.6-Hole/1.8,MountHolderThickness/2-0.02]) cylinder(h=MountHolderThickness+0.06,d=Hole,center = true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
module ShowSizes () {
|
||||
echo ();
|
||||
echo (str(" Stable and waterproof OpenSCAD case by pbtec V6.0"));
|
||||
echo ();
|
||||
echo (str(" Render quality : ",$fn));
|
||||
echo ();
|
||||
echo (str(" --> Case outer dimensions: "));
|
||||
echo (str(" Length : ",Caselength,"mm "));
|
||||
echo (str(" Width : ",CaseWidth,"mm "));
|
||||
echo (str(" High : ",CaseHeight,"mm "));
|
||||
echo (str(" Top (upper piece) high : ",CutFromTop,"mm "));
|
||||
echo (str(" Bottom (lower piece) high : ",CaseHeight-CutFromTop,"mm "));
|
||||
echo (str(" Side wall thickness : ",SideWallThickness,"mm "));
|
||||
echo (str(" Bottom & top wall thickness : ",BottomTopThickness,"mm "));
|
||||
echo (str(" Case rounding radius : ",CaseRoundingRadius,"mm "));
|
||||
echo ();
|
||||
echo (str(" --> Case inner dimensions : "));
|
||||
echo (str(" X : Wall to wall : ",Caselength-2*SideWallThickness,"mm "));
|
||||
echo (str(" X : Screw cylinder to screw cylinder : ",Caselength-4*CaseRoundingRadius,"mm "));
|
||||
echo (str(" Y : Wall to wall : ",CaseWidth-2*SideWallThickness,"mm "));
|
||||
echo (str(" Y : Screw cylinder to screw cylinder : ",CaseWidth-4*CaseRoundingRadius,"mm "));
|
||||
echo (str(" Top to bottom : ",CaseHeight-2*BottomTopThickness,"mm "));
|
||||
echo ();
|
||||
echo (str(" <b>Screw dimensions : "));
|
||||
echo (str(" Metric Screw size: m",CountersinkScrew));
|
||||
echo (str(" Screw hole diameter : ",ScrewHoleDia,"mm "));
|
||||
echo (str(" Screw head diameter : ",ScrewHeadDia,"mm "));
|
||||
echo (str(" X : Additional screw (3rd)) : ",XAdditionalScrew));
|
||||
echo (str(" Y : Additional screws (3rd) : ",YAdditionalScrew));
|
||||
echo (str(" --> Check if you have screws within the following size : "));
|
||||
echo (str(" --> Screw m",CountersinkScrew , " max length : ",CaseHeight-BottomTopThickness, "mm"));
|
||||
if(UseSquareNutInsteadOfNut) { echo (str(" --> Screw m",CountersinkScrew , " min length : ",CutFromTop+NutSink+SquareNutHigh, "mm")); }
|
||||
else { echo (str(" --> Screw m",CountersinkScrew , " min length : ",CutFromTop+NutSink+NutHigh, "mm")); }
|
||||
}
|
||||
|
||||
module GrooveStraight (length) {
|
||||
color("orange") translate([length/2,0,-(GrooveDepth+AddGrooveDepthForSealing)/2]) cube([length,GrooveWidth,GrooveDepth+AddGrooveDepthForSealing],center=true);
|
||||
}
|
||||
|
||||
module GrooveCurved (Angle,Rad) {
|
||||
color("orange") difference(){
|
||||
translate([0,0,-(GrooveDepth+AddGrooveDepthForSealing)]) pie(Rad+(GrooveWidth)/2, Angle, GrooveDepth+AddGrooveDepthForSealing, spin=0);
|
||||
translate([-0.01,-0.01,-(GrooveDepth+AddGrooveDepthForSealing+0.02)]) pie(Rad-(GrooveWidth)/2, Angle, GrooveDepth+AddGrooveDepthForSealing+0.04, spin=0);
|
||||
}
|
||||
}
|
||||
|
||||
module RidgeStraight (length) {
|
||||
color("orange") translate([length/2,0,(RidgeHeight)/2]) cube([length,RidgeWidth,RidgeHeight],center=true);
|
||||
}
|
||||
|
||||
module RidgeCurved (Angle,Rad) {
|
||||
color("orange") difference(){
|
||||
translate([0,0,0]) pie(Rad+(RidgeWidth)/2, Angle, RidgeHeight, spin=0);
|
||||
translate([-0.01,-0.01,-0.02]) pie(Rad-(RidgeWidth)/2, Angle, RidgeHeight+0.04, spin=0);
|
||||
}
|
||||
}
|
||||
|
||||
module BodyQuarterBottom (Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness) {
|
||||
difference(){
|
||||
union(){
|
||||
color("SteelBlue")BodyQuarter(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
|
||||
translate([CaseRoundingRadius+ScrewHoleDia/2-0.01,CaseWidth/2-OuterBorder-GrooveWidth/2-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,0]) RidgeStraight(Caselength/2-3*CaseRoundingRadius-ScrewHoleDia+0.03);
|
||||
translate([Caselength/2-OuterBorder-GrooveWidth/2-0.01,CaseRoundingRadius+ScrewHoleDia/2-0.02,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,90]) RidgeStraight(CaseWidth/2-3*CaseRoundingRadius-ScrewHoleDia+0.04);
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,180]) RidgeCurved(90,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-ScrewHoleDia-SideWallThickness+0.02,-0.01,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,0]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([-0.01,-ScrewHoleDia-SideWallThickness+0.00,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,0]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
|
||||
|
||||
|
||||
if (XAdditionalScrew){
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,180]) RidgeCurved(180,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-ScrewHoleDia-SideWallThickness+0.04,-0.01,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,0]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([ScrewHoleDia+SideWallThickness,-0.01,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,90]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
}
|
||||
else{
|
||||
translate([-0.01,CaseWidth/2-OuterBorder-GrooveWidth/2-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,0]) RidgeStraight(Caselength/2-2*CaseRoundingRadius-ScrewHoleDia/2+0.05);
|
||||
}
|
||||
if (YAdditionalScrew){
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,90]) RidgeCurved(180,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-0.01,-ScrewHoleDia-SideWallThickness-0.01,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,0]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([-0.01,ScrewHoleDia+SideWallThickness-0.01,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,270]) RidgeCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
}
|
||||
else{translate([Caselength/2-OuterBorder-GrooveWidth/2-0.01,-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,90]) RidgeStraight(CaseWidth/2-2*CaseRoundingRadius-ScrewHoleDia/2+0.05);}
|
||||
}
|
||||
|
||||
|
||||
if(UseSquareNutInsteadOfNut)
|
||||
{
|
||||
if (EdgeSquareNutInsertFrom_X) {translate(ScrewCornerPos) translate([0,0,CutFromTop+0.01]) rotate([0,0, 0]) SquareNutCut(CutFromTop,SquareNutHigh,SquareNutSize);}
|
||||
else {translate(ScrewCornerPos) translate([0,0,CutFromTop+0.01]) rotate([0,0,90]) SquareNutCut(CutFromTop,SquareNutHigh,SquareNutSize);}
|
||||
}
|
||||
else {translate(ScrewCornerPos) translate([0,0,CutFromTop+0.01]) NutCut(CutFromTop,NutHigh,NutDia);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (XAdditionalScrew){
|
||||
if(UseSquareNutInsteadOfNut) {translate(ScrewAddXPos) translate([0,0,CutFromTop+0.01]) rotate([0,0,90]) SquareNutCut(CutFromTop,SquareNutHigh,SquareNutSize);}
|
||||
else {translate(ScrewAddXPos) translate([0,0,CutFromTop+0.01]) NutCut(CutFromTop,NutHigh,NutDia);}
|
||||
}
|
||||
if (YAdditionalScrew){
|
||||
if(UseSquareNutInsteadOfNut) {translate(ScrewAddYPos) translate([0,0,CutFromTop+0.01]) SquareNutCut(CutFromTop,SquareNutHigh,SquareNutSize);}
|
||||
else {translate(ScrewAddYPos) translate([0,0,CutFromTop+0.01]) NutCut(CutFromTop,NutHigh,NutDia);}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module BodyQuarterTop (Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness) {
|
||||
|
||||
difference()
|
||||
{
|
||||
union(){
|
||||
color("DarkCyan")BodyQuarter(Caselength,CaseWidth,CutFromTop,CaseRoundingRadius,SideWallThickness);
|
||||
}
|
||||
translate(ScrewCornerPos) ScrewCut(CountersinkScrew,CutFromTop+0.01,0);
|
||||
if (XAdditionalScrew){
|
||||
translate(ScrewAddXPos) ScrewCut(CountersinkScrew,CutFromTop+0.01,0);
|
||||
}
|
||||
if (YAdditionalScrew){
|
||||
translate(ScrewAddYPos) ScrewCut(CountersinkScrew,CutFromTop+0.01,0);
|
||||
}
|
||||
translate([CaseRoundingRadius+ScrewHoleDia/2-0.01,CaseWidth/2-OuterBorder-GrooveWidth/2-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,0]) GrooveStraight(Caselength/2-3*CaseRoundingRadius-ScrewHoleDia+0.03);
|
||||
translate([Caselength/2-OuterBorder-GrooveWidth/2-0.01,CaseRoundingRadius+ScrewHoleDia/2-0.02,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,90]) GrooveStraight(CaseWidth/2-3*CaseRoundingRadius-ScrewHoleDia+0.04);
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,180]) GrooveCurved(90,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-ScrewHoleDia-SideWallThickness+0.02,-0.01,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,0]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([-0.01,-ScrewHoleDia-SideWallThickness+0.0,CutFromTop+0.01]) translate(ScrewCornerPos) rotate([0,0,0]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
if (XAdditionalScrew){
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,180]) GrooveCurved(180,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-ScrewHoleDia-SideWallThickness+0.04,-0.01,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,0]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([ScrewHoleDia+SideWallThickness,-0.01,CutFromTop+0.01]) translate(ScrewAddXPos) rotate([0,0,90]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
}
|
||||
else{
|
||||
translate([-0.01,CaseWidth/2-OuterBorder-GrooveWidth/2-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,0]) GrooveStraight(Caselength/2-2*CaseRoundingRadius-ScrewHoleDia/2+0.07);
|
||||
}
|
||||
|
||||
if (YAdditionalScrew){
|
||||
translate([0,0,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,90]) GrooveCurved(180,ScrewHoleDia/2+OuterBorder+GrooveWidth/2);
|
||||
translate([-0.01,-ScrewHoleDia-SideWallThickness-0.01,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,0]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
translate([-0.01,ScrewHoleDia+SideWallThickness-0.01,CutFromTop+0.01]) translate(ScrewAddYPos) rotate([0,0,270]) GrooveCurved(90,ScrewHoleDia/2+InnerBorder+GrooveWidth/2);
|
||||
}
|
||||
else{
|
||||
translate([Caselength/2-OuterBorder-GrooveWidth/2-0.01,-0.01,CutFromTop+0.01]) translate([0,0,0]) rotate([0,0,90]) GrooveStraight(CaseWidth/2-2*CaseRoundingRadius-ScrewHoleDia/2+0.057);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module BodyQuarter (L,W,H,Rad,Rand){
|
||||
cube([L/2-Rad,W/2,BottomTopThickness],center=false); // Ground
|
||||
cube([L/2,W/2-Rad,BottomTopThickness],center=false); // Ground
|
||||
if (CaseRadius < CaseRoundingRadius)
|
||||
{
|
||||
translate([0,W/2-Rand,0]) cube([L/2-CaseRadius,Rand,H],center=false); // Wall
|
||||
translate([L/2-Rand,0,0]) cube([Rand,W/2-CaseRadius,H],center=false); // Wall
|
||||
translate([L/2-CaseRadius,W/2-CaseRadius,H/2]) cylinder(h=H,r=CaseRadius,center = true);
|
||||
}
|
||||
else
|
||||
{
|
||||
translate([0,W/2-Rand,0]) cube([L/2-Rad,Rand,H],center=false); // Wall
|
||||
translate([L/2-Rand,0,0]) cube([Rand,W/2-Rad,H],center=false); // Wall
|
||||
}
|
||||
|
||||
translate(ScrewCornerPos) cylinder(h=H,r=Rad,center = false); // Cylinder
|
||||
translate([L/2-3*Rad+Rand,W/2-Rad,0]) rotate([0,0, 0]) HolderGap(H,Rad,Rand); // Gap between wall and Cylinder
|
||||
translate([L/2-Rad,W/2-Rad-Rand,0]) rotate([0,0,-90]) HolderGap(H,Rad,Rand); // Gap Between wall and Cylinder
|
||||
|
||||
if (XAdditionalScrew) {
|
||||
translate(ScrewAddXPos) cylinder(h=H,r=Rad,center = false); // Cylinder
|
||||
translate([Rand,W/2-Rad,0]) rotate([0,0,0]) HolderGap(H,Rad,Rand);
|
||||
translate([Rand-2*CaseRoundingRadius,W/2-Rad,0]) rotate([0,0,0]) HolderGap(H,Rad,Rand);
|
||||
}
|
||||
|
||||
if (YAdditionalScrew) {
|
||||
translate(ScrewAddYPos) cylinder(h=H,r=Rad,center = false); // Cylinder
|
||||
translate([L/2-3*Rad+2*CaseRoundingRadius,-Rand+2*CaseRoundingRadius,0]) rotate([0,0, 270]) HolderGap(H,Rad,Rand);
|
||||
translate([L/2-3*Rad+2*CaseRoundingRadius,-Rand,0]) rotate([0,0, 270]) HolderGap(H,Rad,Rand);
|
||||
}
|
||||
}
|
||||
|
||||
module NutCut(TotalHigh,High,Dia){
|
||||
AdditionalGap=0.3;
|
||||
translate([0,0,-(High+2*AdditionalGap)/2-NutSink]) cylinder($fn=6,h=High+2*AdditionalGap,d=2*sqrt(((Dia/2)*(Dia/2))+((Dia/4)*(Dia/4)))+Dia/26+2*AdditionalGap,center = true);
|
||||
translate([0,0,-(TotalHigh-SideWallThickness)/2]) cylinder(h=TotalHigh-SideWallThickness,d=ScrewHoleDia,center = true);
|
||||
}
|
||||
|
||||
module SquareNutCut (TotalHigh,High,Size) {
|
||||
AdditionalGap=0.5;
|
||||
SquareNutInsertReduction= 0.2;
|
||||
|
||||
translate([0,0,-(High+2*AdditionalGap)/2-NutSink])cube([Size+2*AdditionalGap,Size+2*AdditionalGap,High+2*AdditionalGap],center=true);
|
||||
translate([CaseRoundingRadius/2+0.02,0,-(High+2*AdditionalGap)/2-NutSink+SquareNutInsertReduction/2]) cube([CaseRoundingRadius+0.04,Size+2*AdditionalGap,High+2*AdditionalGap-SquareNutInsertReduction],center=true);
|
||||
translate([0,0,-(TotalHigh-SideWallThickness)/2]) cylinder(h=TotalHigh-SideWallThickness,d=ScrewHoleDia,center = true);
|
||||
}
|
||||
|
||||
module SideWallHoles () {
|
||||
cylinder(h=20,d1=10,d2=15,center = true);
|
||||
}
|
||||
|
||||
|
||||
module ScrewCut(m,h,v){
|
||||
// m = 3=M3 4=M4 5=M5 6=M6 usw...
|
||||
// h = High of the screw inkl. head
|
||||
// v = if screw head is to be sunk deeper
|
||||
|
||||
ScrewHeadDia=m*2; // Berechnung des Schraubenkopf Durchmessers
|
||||
//ScrewCountersink=(m+8)/14-0.7; // Leichte ScrewCountersink damit Schraube nicht vorsteht
|
||||
ScrewHoleDia=m+1; // ScrewHoleDiadurchmesser
|
||||
|
||||
translate([0,0,-0.01]) union(){ // Ganze Schraube
|
||||
|
||||
translate([0,0,ScrewCountersink-0.01])cylinder( h = ScrewHeadDia/4,d1=ScrewHeadDia,d2=ScrewHeadDia/2,center=false); // Kegel (Abschraegung)
|
||||
translate([0,0,0]) cylinder( h = ScrewCountersink,d=ScrewHeadDia,center=false); // ScrewCountersink
|
||||
translate([0,0,0.01])rotate([180,0,0])cylinder(h=v,d=ScrewHeadDia,center = false); // Versenkung
|
||||
translate([0,0,0.01])cylinder( h = h,d=ScrewHoleDia,center=false); //Loch fuer Gewinde
|
||||
}
|
||||
}
|
||||
|
||||
module HolderGap (H,Rad,Rand) {
|
||||
difference(){
|
||||
translate([0,0,0]) cube([Rad*2-2*Rand,Rad-Rand,H],center=false);
|
||||
translate([0,0,-0.02]) cylinder(h=H+0.04,r=Rad-Rand,center = false);
|
||||
translate([2*(Rad-Rand),0,-0.02]) cylinder(h=H+0.04,r=Rad-Rand,center = false);
|
||||
}
|
||||
}
|
||||
|
||||
module DeviceHolder () {
|
||||
color("yellow")translate([0,0,ScrewCylinderHeight/2+BottomTopThickness]) difference(){
|
||||
cylinder(h=ScrewCylinderHeight,d=ScrewCylinderDiameter,center = true);
|
||||
translate([0,0,0]) cylinder(h=ScrewCylinderHeight+0.05,d=ScrewHoleDiameter,center = true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module pie(radius, angle, height, spin=0) {
|
||||
// Negative angles shift direction of rotation
|
||||
clockwise = (angle < 0) ? true : false;
|
||||
// Support angles < 0 and > 360
|
||||
normalized_angle = abs((angle % 360 != 0) ? angle % 360 : angle % 360 + 360);
|
||||
// Select rotation direction
|
||||
rotation = clockwise ? [0, 180 - normalized_angle] : [180, normalized_angle];
|
||||
// Render
|
||||
if (angle != 0) {
|
||||
rotate([0,0,spin]) linear_extrude(height=height)
|
||||
difference() {
|
||||
circle(radius);
|
||||
if (normalized_angle < 180) {
|
||||
union() for(a = rotation)
|
||||
rotate(a) translate([-radius, 0, 0]) square(radius * 2);
|
||||
}
|
||||
else if (normalized_angle != 360) {
|
||||
intersection_for(a = rotation)
|
||||
rotate(a) translate([-radius, 0, 0]) square(radius * 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module roundedBox(size, radius, sidesonly) // Laenge, Breite, Hoehe, Radius, 0/1
|
||||
{
|
||||
rot = [ [0,0,0], [90,0,90], [90,90,0] ];
|
||||
if (sidesonly) {
|
||||
cube(size - [2*radius,0,0], true);
|
||||
cube(size - [0,2*radius,0], true);
|
||||
for (x = [radius-size[0]/2, -radius+size[0]/2],
|
||||
y = [radius-size[1]/2, -radius+size[1]/2]) {
|
||||
translate([x,y,0]) cylinder(r=radius, h=size[2], center=true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
cube([size[0], size[1]-radius*2, size[2]-radius*2], center=true);
|
||||
cube([size[0]-radius*2, size[1], size[2]-radius*2], center=true);
|
||||
cube([size[0]-radius*2, size[1]-radius*2, size[2]], center=true);
|
||||
|
||||
for (axis = [0:2]) {
|
||||
for (x = [radius-size[axis]/2, -radius+size[axis]/2],
|
||||
y = [radius-size[(axis+1)%3]/2, -radius+size[(axis+1)%3]/2]) {
|
||||
rotate(rot[axis])
|
||||
translate([x,y,0])
|
||||
cylinder(h=size[(axis+2)%3]-2*radius, r=radius, center=true);
|
||||
}
|
||||
}
|
||||
for (x = [radius-size[0]/2, -radius+size[0]/2],
|
||||
y = [radius-size[1]/2, -radius+size[1]/2],
|
||||
z = [radius-size[2]/2, -radius+size[2]/2]) {
|
||||
translate([x,y,z]) sphere(radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
cad/keycap.FCStd
BIN
cad/keycap.FCStd
Binary file not shown.
Binary file not shown.
BIN
models/Scaniverse 2025-03-21 213733_edited_V2.3mf
Normal file
BIN
models/Scaniverse 2025-03-21 213733_edited_V2.3mf
Normal file
Binary file not shown.
BIN
models/Scaniverse 2025-03-21 213733_edited_V2.blend
Normal file
BIN
models/Scaniverse 2025-03-21 213733_edited_V2.blend
Normal file
Binary file not shown.
BIN
models/Scaniverse 2025-03-21 213733_edited_V2.stl
Normal file
BIN
models/Scaniverse 2025-03-21 213733_edited_V2.stl
Normal file
Binary file not shown.
BIN
models/Scaniverse 2025-03-21 213733_edited_V2_1-2.stl
Normal file
BIN
models/Scaniverse 2025-03-21 213733_edited_V2_1-2.stl
Normal file
Binary file not shown.
BIN
models/Scaniverse 2025-03-21 213733_edited_V2_2-2.stl
Normal file
BIN
models/Scaniverse 2025-03-21 213733_edited_V2_2-2.stl
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue