squish 3030 outside corner and lock in tight fitting print settings
[ozzloy@gmail.com/3d-printables] / mk2-haribo-spool-holder.scad
index 1d5fda584c205733f09e2e74547ad9b354f965e0..e7d28d2cb993322b938ab033000f3363cefff8fb 100644 (file)
@@ -11,35 +11,50 @@ diagonal = sqrt(pow(30/2, 2) + pow(30/2, 2));
 opening_width = 8;
 inner_block = 12;
 
-major_block_corner_diameter = 4;
-major_block_corner_radius = major_block_corner_diameter / 2;
-
-corner_block_inner = (30 - 16.5) / 2;
+outer_block = (30 - 16.5) / 2;
 wall = 2;
 
-$fn = 40;
+$fn = 100;
 
 module arm_half(){
+  // inner block
   square(inner_block / 2);
+
+  // diagonal arms connecting inner block to outer blocks
   rotate(45) {
-    square([diagonal - major_block_corner_radius, wall / 2]); }
-  translate([x / 2 - corner_block_inner, y / 2 - corner_block_inner]) {
-    square(corner_block_inner - wall); }
-  translate([(opening_width + major_block_corner_diameter) / 2,
-             y/2 - wall]) {
-    square([(x - opening_width - 2 * major_block_corner_diameter) / 2,
-            wall]);
-    translate([0, wall/2]){
-      circle(wall / 2); } }
-  translate([(x - major_block_corner_diameter) / 2,
-             (y - major_block_corner_diameter) / 2]) {
-    circle(major_block_corner_radius); } }
-
-arms = 4;
-for(arm = [0:arms - 1]) {
-  rotate(arm * 360 / arms) {
-    arm_half();
-    mirror(){ arm_half(); } } }
+    square([diagonal - wall, wall / 2]); }
+
+  // outer block, without the wall part since wall has rounded corner
+  translate([x / 2 - outer_block, y / 2 - outer_block]) {
+    square(outer_block - wall); }
+
+  // outer arms covering the opening
+  translate([(opening_width + wall) / 2, y / 2 - wall]) {
+    square([(x - opening_width - wall) / 2 - wall, wall]); }
+  // rounded part at entrace to inside
+  translate([(opening_width + wall) / 2, (y - wall) / 2]){
+    circle(d = wall); }
+  // rounded part around outside of extrusion
+  corner_squish = 0.1;
+  translate([x / 2 - wall + corner_squish, y / 2 - wall + corner_squish]) {
+    circle(wall - corner_squish); } }
+
+module 3030_profile(){
+  arms = 4;
+  for(arm = [0:arms - 1]) {
+    rotate(arm * 360 / arms) {
+      arm_half();
+      mirror(){ arm_half(); } } } }
+
+linear_extrude(height = 35){
+  difference(){
+    minkowski(){
+      square(30, true);
+      circle(5);}
+    minkowski(){
+      3030_profile();
+      circle(0.2);} } }
+
 
 /*
   This file is part of 3d-printables.