//gemini // Module for perfect molding draft angles //$fn = 144; $fn = 36; // 8K Resin Optimized Settings //$fs = 0.05; // Minimum facet size in mm (matches 8K pixel pitch roughly) //$fa = 1.0; // Minimum angle in degrees //$fnc = 300; module drafted_extrude(height, draft_angle, r_corners=false, fn = 9) { // Calculate the total offset distance based on height and angle draft_offset = abs(height) * tan(draft_angle); echo(draft_offset); //$fn = fn; //$fs = 0.05; // Minimum facet size in mm (matches 8K pixel pitch roughly) //$fa = 1.0; // Minimum angle in degrees // Minkowski sweeps the base shape with the cone profile. minkowski() { // 1. Shrink the base shape by the draft amount linear_extrude(0.001) { if (r_corners) { offset(r=-draft_offset) children(); } else { offset(delta=-draft_offset) children(); } } if(height>0){ cylinder(r1=draft_offset, r2=0, h=height); } else { cylinder(r2=draft_offset, r1=0, h=abs(height)); } } } //cylinder(r1=draft_offset, r2=0, h=height, $fn=36); module round_all(r) { // round outter corners offset(r=r) offset(r=-2*r) // round inner corners //offset(r=-r) offset(r=r) children(); } or = 1; height = 5; r = 1; d = 0.1; module rtile(){ round_all(or) //scale([1.5,1.5,1.5]) import("/home/caan/Work/inkscape/hat-monotile-inset.svg", center = true); } module 2flat_tiles(){ s = 1.7; scale([s,s,s]) union(){ rtile(); translate([2,-25,0]) rotate([0,180,-60]) rtile(); } } eps = 0.1; w = 4; // wall draft = 10; translate([-11,10,0]) rotate([0,0,30]) difference(){ union(){ difference(){ linear_extrude(4*w) offset(r = 3*w) 2flat_tiles(); translate([0,0,w+eps]) drafted_extrude(-3*w, draft) offset(r = 2*w) 2flat_tiles(); } translate([0,0,w-eps*2]) drafted_extrude(2*w, draft) offset(r = 1*w) 2flat_tiles(); } //$fs = 0.05; // Minimum facet size in mm (matches 8K pixel pitch roughly) //$fa = 1.0; // Minimum angle in degrees s = 1.7; translate([0,0,2*w+eps]) drafted_extrude(-w, 10) // offset(r = 2*w) 2flat_tiles(); // scale([s,s,s]) //rtile(); } //%cube([120,220,32],center = true); // printer size 128,228,245