smoothed out the corners between catears and headband

This commit is contained in:
tessaK9 2026-07-16 23:05:38 +02:00
commit 8c0588eaf5
3 changed files with 49 additions and 1 deletions

18
scad/base/smoothing.scad Normal file
View file

@ -0,0 +1,18 @@
//smoothing smooths a corner, spanned by v1, v2 and v3 with radius r
module smoothing(v1, v2, v3, r, th = 0){
n1 = (v1-v2)/norm(v1-v2);
n2 = (v3-v2)/norm(v3-v2);
alpha = acos(n1*n2)/2;
n3 = (n1+n2)/norm(n1+n2);
centre = v2+n3*(r/sin(alpha));
l = r*sqrt((1/sin(alpha)^2)-1);
translate(th*n3){
difference(){
polygon([v2+l*n1,v2,v2+l*n2]);
translate(centre)
circle(r = r, $fn = 64);
}
}
}