$wdth = 12; $height = 9; $len = 15; $internal_radius = 7.7/2; $fn=100; module sector(radius, angles, fn = 174) { r = radius / cos(180 / fn); step = -360 / fn; points = concat([[0, 0]], [for(a = [angles[0] : step : angles[1] - 360]) [r * cos(a), r * sin(a)] ], [[r * cos(angles[1]), r * sin(angles[1])]] ); difference() { circle(radius, $fn = fn); polygon(points); } } module cablemount(width,height,length,int){ difference(){ union(){ cube([15,width,height/2]); translate([0,width/2,$height/2]) rotate([90,0,90]) linear_extrude(length) sector(width/2,[0,180]); } //Hole rotate([0,90,0]) translate([-0.5-(height/2),width/2,-0.0005]) cylinder(length+0.001,r=int/2); } } //cablemount(12,$height,$len,7.7);