rounded off the intersections of ears and headbands

This commit is contained in:
tessaK9 2026-04-06 02:12:12 +02:00
commit 5c27b0651d
3 changed files with 26 additions and 2 deletions

View file

@ -1,9 +1,26 @@
use <hinge.scad>;
include <bezier_extrusion.scad>;
//these values were mostly determined by manually finetuning them
t = 5;
a = 41.186; //arctan(7/8)
mod = function (t) 12*t^2*(1-t)^2+1;
ctrl_0 = angl_to_ctrl([-30.5,0]+t*[1,0], 180, [-30.5,0]+t*[-cos(a-25),-sin(a-25)], a-25, mod = 0.5);
ctrl_1 = angl_to_ctrl([-23.6,7]+t*[1,0], 180, [-23.6,7]+t*[-cos(a+180), -sin(a+180)], a+180);
ctrl_2 = angl_to_ctrl([-8,37]+t*[1,0], 180, [-8.5,37]+t*[0,-1], 75, mod = 0.5);
ctrl_3 = angl_to_ctrl([-7.3,44]+t*[1,0], 180, [-7.3,44]+t*[0,1], 270, mod = 0.5);
rectangle_r = [[1.5,0],[1.5,6],[0,6],[0,0]];
rectangle_l = [[0,0],[0,6],[-1.5,6],[-1.5,0]];
//a1, a2, a3, a4 are the four angles of the pairs of hinges on the ear from bottom to tip
module dogearAllOptions(a1, a2, a3, a4){
translate([25,0,0]){
union(){
bezier_extrude(ctrl = ctrl_0, shape = rectangle_r, sections = 8);
bezier_extrude(ctrl = ctrl_1, shape = rectangle_l, mod_x = mod, sections = 8);
bezier_extrude(ctrl = ctrl_2, shape = rectangle_r, mod_x = mod, sections = 8);
bezier_extrude(ctrl = ctrl_3, shape = rectangle_l, mod_x = mod, sections = 8);
//translate([-8,37,0]) cube([10,10,20]);
linear_extrude(height = 6, center = false, convexity = 10){
polygon(points = [[-33,0],[-25,0],[-25,7]]);
}