From: Ian Jackson Date: Sun, 8 Oct 2017 01:37:38 +0000 (+0100) Subject: poster-tube-lid: BayonetCutout abstract out polygon as child (nfc) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=27a879e342a9e8fa0b6b261e5da33f982d6f1976;p=reprap-play.git poster-tube-lid: BayonetCutout abstract out polygon as child (nfc) --- diff --git a/poster-tube-lid.scad b/poster-tube-lid.scad index 86c1483..eaa686d 100644 --- a/poster-tube-lid.scad +++ b/poster-tube-lid.scad @@ -112,14 +112,14 @@ module MainProfile(){ ]); } -module RotateProjectSlice(offset, poly, slice_size, nom_rad, real_rad){ +module RotateProjectSlice(offset, slice_size, nom_rad, real_rad){ // nom_rad > real_rad rotate([0,0, atan2(offset, nom_rad) ]){ intersection(){ translate([-offset, -10, 0]) rotate([90,0,0]) linear_extrude(height= nom_rad*2) - polygon(poly); + children(0); translate([0,0, -25]) cylinder(h=50, r= real_rad); translate([0,0, -25]) @@ -131,20 +131,21 @@ module RotateProjectSlice(offset, poly, slice_size, nom_rad, real_rad){ } } -module RotateProject(poly, x_min, x_max, slice_size, nom_rad, real_rad){ +module RotateProject(x_min, x_max, slice_size, nom_rad, real_rad){ offs = [ for (i=[ x_min : slice_size : x_max + slice_size ]) i ]; echo (offs); for (off=offs) - RotateProjectSlice(off, poly, slice_size, nom_rad, real_rad); + RotateProjectSlice(off, slice_size, nom_rad, real_rad) + children(0); } module BayonetCutout(){ - RotateProject(bayo_polygon, - bayo_c[0], bayo_i[0], bayo_slice_size, + RotateProject(bayo_c[0], bayo_i[0], bayo_slice_size, main_dia/2 + side_thick, - main_dia/2 + rivet_tall); + main_dia/2 + rivet_tall) + polygon(bayo_polygon); } module ProfilesDemo(){