chiark / gitweb /
poster-tube-lid: convert to oring: introduce some difference/union (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Oct 2017 00:53:37 +0000 (01:53 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Oct 2017 00:53:37 +0000 (01:53 +0100)
poster-tube-lid.scad

index 4ea02d9..10eb603 100644 (file)
@@ -111,27 +111,31 @@ echo(bayo_polygon);
 
 module MainProfile(){
   main_cnr_pos = [ side_thick, top_z ] - [1,1]*main_cnr;
-  translate(main_cnr_pos){
-    intersection(){
-      difference(){
-       circle(r = main_cnr);
-       circle(r = main_cnr * 0.5);
+  difference(){
+    union(){
+      translate(main_cnr_pos){
+       intersection(){
+         difference(){
+           circle(r = main_cnr);
+           circle(r = main_cnr * 0.5);
+         }
+         square([10,10]);
+       }
       }
-      square([10,10]);
+      polygon([[ -1,                    seal_thick        ],
+              [ -1,                    top_z             ],
+              [ main_cnr_pos[0],       top_z             ],
+              [ side_thick,            main_cnr_pos[1]   ],
+              [ side_thick,            -side_height      ],
+              [ side_taper,            -side_height      ],
+              [ 0,                     -rivet_posn       ],
+              [ 0,                     -(seal_recess[0] + seal_recess[1]) ],
+              [ seal_recess[0],        -(seal_recess[0]) ],
+              [ seal_recess[0],        seal_thick        ],
+              ],
+             convexity=10);
     }
   }
-  polygon([[ -1,                    seal_thick        ],
-          [ -1,                    top_z             ],
-          [ main_cnr_pos[0],       top_z             ],
-          [ side_thick,            main_cnr_pos[1]   ],
-          [ side_thick,            -side_height      ],
-          [ side_taper,            -side_height      ],
-          [ 0,                     -rivet_posn       ],
-          [ 0,                     -(seal_recess[0] + seal_recess[1]) ],
-          [ seal_recess[0],        -(seal_recess[0]) ],
-          [ seal_recess[0],        seal_thick        ],
-          ],
-         convexity=10);
 }
 
 module RotateProjectSlice(offset, slice_size, nom_rad, real_rad){