[WIP][DEBUG]
This commit is contained in:
parent
cfc13bbc13
commit
519a41c7a4
4 changed files with 71 additions and 24 deletions
|
@ -1,5 +1,7 @@
|
|||
include <globals.scad>;
|
||||
include <primitives.scad>;
|
||||
|
||||
use <headband.scad>;
|
||||
use <catear_headband.scad>;
|
||||
use <pressfit_headband.scad>;
|
||||
use <chamfer.scad>;
|
||||
|
@ -7,9 +9,9 @@ use <chamfer.scad>;
|
|||
EAR_SCALE = 1.5;
|
||||
EAR_BEND_FACTOR = 0.15;
|
||||
EAR_STRETCH_FACTOR = 1.2;
|
||||
STEP_SIZE = 1;
|
||||
STEP_SIZE = 100;
|
||||
|
||||
difference() {
|
||||
translate([50, 0, 0]) difference() {
|
||||
translate([20*pow(0.99, SIZE/2*EAR_SCALE-1-THICKNESS), 0, -THICKNESS/2])
|
||||
union() for (i=[0:STEP_SIZE:SIZE/2*EAR_SCALE-1]) {
|
||||
j=pow(0.99, i);
|
||||
|
@ -32,3 +34,25 @@ difference() {
|
|||
translate([0, 0, -THICKNESS]) cube([100, 100, THICKNESS], center=true);
|
||||
scale([1, 1, 2]) inserticle();
|
||||
}
|
||||
|
||||
side_len=SIZE/2*EAR_SCALE;
|
||||
r=side_len/2;
|
||||
E=1.6*EAR_STRETCH_FACTOR;
|
||||
e=E*(r+THICKNESS/4)/(r-THICKNESS/4);
|
||||
T=side_len+THICKNESS;
|
||||
S=side_len-THICKNESS;
|
||||
xremap = function (x) pow(x, EAR_STRETCH_FACTOR);
|
||||
yremap = function (y) pow(y, 1);
|
||||
//f = function (p) [j((p.x+T/2)/T)*T-T/2, pow(p.y, 2)/r*E, p.z];
|
||||
//g = function (p) [j((p.x+S/2)/S)*S-S/2, pow(p.y, 2)/r*E*(T+THICKNESS)/S, p.z];
|
||||
f = function (p) [scalc(xremap, p.x, -T/2, T/2), scalc(yremap, p.y, 0, T/2)*E, p.z];
|
||||
g = function (p) [scalc(xremap, p.x, -S/2, S/2), scalc(yremap, p.y, 0, S/2)*e, p.z];
|
||||
|
||||
rotate([0, 90, 0]) color("yellow") arc(0.5, r, THICKNESS, HEIGHT, outer_remap=f, inner_remap=g);
|
||||
|
||||
color("red") catear_v2(HEIGHT, THICKNESS, side_len=SIZE/2*EAR_SCALE, stretch_factor=EAR_STRETCH_FACTOR);
|
||||
|
||||
// a = b + c
|
||||
// x * a = y * b + c
|
||||
// y / x = a /(b + c)
|
||||
// y = x * a /(b + c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue