fine tune ear headband defaults as globals

This commit is contained in:
user 2025-07-06 02:48:14 +02:00
commit d47be5dbc6
4 changed files with 42 additions and 6 deletions

View file

@ -1,7 +1,16 @@
use <catear_headband.scad>
include <headband.scad>
module bunnyear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND, ear_scale=0.5, ear_bend_factor=1.2, ear_stretch_factor=8, ear_angle=30, ear_version=3, ear_skew=1.2) {
EAR_VERSION = 3;
EAR_SKEW = 1;
EAR_SCALE = 0.5;
EAR_BEND_FACTOR = 1.0;
EAR_STRETCH_FACTOR = 8;
EAR_ANGLE = 30;
WITH_RAKE = true;
DETAILS = true;
module bunnyear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND, ear_scale=EAR_SCALE, ear_bend_factor=EAR_BEND_FACTOR, ear_stretch_factor=EAR_STRETCH_FACTOR, ear_angle=EAR_ANGLE, ear_version=EAR_VERSION, ear_skew=EAR_SKEW) {
catear_headband(
debug=debug,
size=size,

View file

@ -4,6 +4,15 @@ include <primitives.scad>;
use <headband.scad>;
use <chamfer.scad>;
EAR_VERSION = 3;
EAR_SKEW = 0.6;
EAR_SCALE = 1.4;
EAR_BEND_FACTOR = 0.04;
EAR_STRETCH_FACTOR = 1.2;
EAR_ANGLE = 42;
WITH_RAKE = true;
DETAILS = true;
/**
* unsupported parameters: chamfer, chamfer_shape, details, end_caps
*/
@ -130,7 +139,7 @@ module catear_v1(height, thickness, fractal=0, side_len=30, bend_factor=0.15, st
}
}
module catear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND, ear_scale=1.5, ear_bend_factor=0.15, ear_stretch_factor=1.2, ear_angle=42, chamfer=CHAMFER, chamfer_shape=CHAMFER_SHAPE, with_rake=true, details=true, ear_skew=2.0, ear_version=3) {
module catear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND, ear_scale=EAR_SCALE, ear_bend_factor=EAR_BEND_FACTOR, ear_stretch_factor=EAR_STRETCH_FACTOR, ear_angle=EAR_ANGLE, chamfer=CHAMFER, chamfer_shape=CHAMFER_SHAPE, with_rake=WITH_RAKE, details=DETAILS, ear_skew=EAR_SKEW, ear_version=EAR_VERSION) {
$a=size/2*ear_scale;
$delta=2*(acos($a/(size*2))-90);

View file

@ -1,7 +1,16 @@
use <catear_headband.scad>
include <headband.scad>
module foxear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND, ear_scale=1.2, ear_bend_factor=0.0, ear_stretch_factor=1.2, ear_angle=30, ear_version=3, ear_skew=1.0) {
EAR_VERSION = 3;
EAR_SKEW = 1;
EAR_SCALE = 1.2;
EAR_BEND_FACTOR = 0.00;
EAR_STRETCH_FACTOR = 1.2;
EAR_ANGLE = 30;
WITH_RAKE = true;
DETAILS = true;
module foxear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND, ear_scale=EAR_SCALE, ear_bend_factor=EAR_BEND_FACTOR, ear_stretch_factor=EAR_STRETCH_FACTOR, ear_angle=EAR_ANGLE, ear_version=EAR_VERSION, ear_skew=EAR_SKEW) {
catear_headband(
debug=debug,
size=size,
@ -19,4 +28,4 @@ module foxear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNES
ear_skew=ear_skew);
}
rotate(-90) foxear_headband(debug=true);
rotate(-90) foxear_headband();

View file

@ -1,7 +1,16 @@
use <catear_headband.scad>
include <headband.scad>
module mouseear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND, ear_scale=1, ear_bend_factor=0.65, ear_stretch_factor=1, ear_angle=40) {
EAR_VERSION = 3;
EAR_SKEW = 0;
EAR_SCALE = 1;
EAR_BEND_FACTOR = 0.5;
EAR_STRETCH_FACTOR = 1;
EAR_ANGLE = 40;
WITH_RAKE = true;
DETAILS = true;
module mouseear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND, ear_scale=EAR_SCALE, ear_bend_factor=EAR_BEND_FACTOR, ear_stretch_factor=EAR_STRETCH_FACTOR, ear_angle=EAR_ANGLE) {
catear_headband(
debug=debug,
size=size,
@ -17,4 +26,4 @@ module mouseear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKN
ear_angle=ear_angle);
}
mouseear_headband();
rotate(-90) mouseear_headband();