// -*- C -*- include wall_th = 2; plug_l_d = [[ 27.78, 10.62 + 0.50 ], [ 40.88, 8.56 + 0.50 ], ]; plug_stem = [ 2.72 + 0.50, 5.20 + 0.50 ]; module PlugMainPlan() { for (l_d = plug_l_d) { l = l_d[0]; d = l_d[1]; rectfromto([ -l, -d/2 ], [ 0, +d/2 ]); } } module PlugHolderPlan() { intersection(){ hull() offset(r= wall_th) PlugMainPlan(); rectfromto([-100,-100], [-0.1,+100]); } } module DemoPlan() { translate([0,0,-5]) color("grey") PlugHolderPlan(); PlugMainPlan(); } module RotateIntersect(n=6){ intersection_for (r = [0:n-1]) { rotate([r/n * 360,0,0]) linextr(-100,100) children(0); } } module PlugHolder(){ difference(){ RotateIntersect(8) PlugHolderPlan(); RotateIntersect(6) PlugMainPlan(); linextr(-plug_stem[1]/2, 100) rectfromto([ -100, -plug_stem[0]/2 ], [ +100, +plug_stem[0]/2 ]); } } //DemoPlan(); render() PlugHolder();