1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-16 21:58:26 +01:00

refactor foot

This commit is contained in:
Justin Lin 2022-07-11 09:14:58 +08:00
parent 65b434878d
commit 32995370d0

View File

@ -109,7 +109,7 @@ module knee() {
}
}
module front_foot1() {
module foot() {
upper_arm_r = 3.6;
lower_arm_r = 2.7;
arm_fn = 6;
@ -135,110 +135,10 @@ module front_foot1() {
rotate([108, 9, 1])
knee();
translate([6.4, 18.95, .25])
rotate([11, 13, 185])
scale([1.2, 1.2, 1.2])
dragon_claw();
// claw
children();
}
module front_foot2() {
upper_arm_r = 3.6;
lower_arm_r = 2.7;
arm_fn = 6;
scale_fn = 4;
scale_tilt_a = 6;
upper_arm_path = [[.5, 1, 10], [1.25, 6.25, 11.25], [2, 11.5, 12.5], [2, 16.75, 13.75], [1.9, 20, 14.25]];
lower_arm_path = [[2, 22, 14], [3.5, 21, 10], [4.5, 20.3, 7]];
upper_arm_scale_data = one_body_scale(upper_arm_r, arm_fn, scale_fn, scale_tilt_a);
lower_arm_scale_data = one_body_scale(lower_arm_r, arm_fn, scale_fn, scale_tilt_a);
along_with(upper_arm_path, scale = 0.75, method = "EULER_ANGLE")
rotate([-90, 0, 0])
dragon_body_scales(upper_arm_r, arm_fn, upper_arm_scale_data);
along_with(lower_arm_path, scale = 0.7, method = "EULER_ANGLE")
rotate([-90, 0, 0])
dragon_body_scales(lower_arm_r, arm_fn, lower_arm_scale_data);
translate([2.25, 14.5, 12.75])
scale([0.7, 1.15, .8])
rotate([108, 9, 1])
knee();
translate([6.4, 19.25, .25])
rotate([-5, -10, 15])
scale([1.2, 1.2, 1.2])
dragon_claw();
}
module back_foot1() {
upper_arm_r = 3.6;
lower_arm_r = 2.7;
arm_fn = 6;
scale_fn = 4;
scale_tilt_a = 6;
upper_arm_path = [[.5, 1, 10], [1.25, 6.25, 11.25], [2, 11.5, 12.5], [2, 16.75, 13.75], [1.9, 20, 14.25]];
lower_arm_path = [[2, 22, 14], [3.5, 21, 10], [4.5, 20.3, 7]];
upper_arm_scale_data = one_body_scale(upper_arm_r, arm_fn, scale_fn, scale_tilt_a);
lower_arm_scale_data = one_body_scale(lower_arm_r, arm_fn, scale_fn, scale_tilt_a);
along_with(upper_arm_path, scale = 0.75, method = "EULER_ANGLE")
rotate([-90, 0, 0])
dragon_body_scales(upper_arm_r, arm_fn, upper_arm_scale_data);
along_with(lower_arm_path, scale = 0.7, method = "EULER_ANGLE")
rotate([-90, 0, 0])
dragon_body_scales(lower_arm_r, arm_fn, lower_arm_scale_data);
translate([2.25, 14.5, 12.75])
scale([0.7, 1.15, .8])
rotate([108, 9, 1])
knee();
translate([6.4, 18.95, .25])
rotate([-10, -10, 15])
scale([1.2, 1.2, 1.2])
dragon_claw();
}
module back_foot2() {
upper_arm_r = 3.6;
lower_arm_r = 2.7;
arm_fn = 6;
scale_fn = 4;
scale_tilt_a = 6;
upper_arm_path = [[.5, 1, 10], [1.25, 6.25, 11.25], [2, 11.5, 12.5], [2, 16.75, 13.75], [1.9, 20, 14.25]];
lower_arm_path = [[2, 22, 14], [3.5, 21, 10], [4.5, 20.3, 7]];
upper_arm_scale_data = one_body_scale(upper_arm_r, arm_fn, scale_fn, scale_tilt_a);
lower_arm_scale_data = one_body_scale(lower_arm_r, arm_fn, scale_fn, scale_tilt_a);
along_with(upper_arm_path, scale = 0.75, method = "EULER_ANGLE")
rotate([-90, 0, 0])
dragon_body_scales(upper_arm_r, arm_fn, upper_arm_scale_data);
along_with(lower_arm_path, scale = 0.7, method = "EULER_ANGLE")
rotate([-90, 0, 0])
dragon_body_scales(lower_arm_r, arm_fn, lower_arm_scale_data);
translate([2.25, 14.5, 12.75])
scale([0.7, 1.15, .8])
rotate([108, 9, 1])
knee();
translate([6.4, 19.25, .25])
rotate([-5, 10, 120])
scale([1.2, 1.2, 1.2])
dragon_claw();
}
module treble_clef_dragon() {
function __angy_angz(p1, p2) =
let(v = p2 - p1)
@ -304,22 +204,42 @@ module treble_clef_dragon() {
rotate([0, -20, 150])
mirror([1, 0, 0])
scale(.9)
front_foot1();
foot() {
translate([6.4, 18.95, .25])
rotate([11, 13, 185])
scale([1.2, 1.2, 1.2])
dragon_claw();
}
translate([8, -20, -21])
rotate([0, -20, 5])
mirror([1, 0, 0])
scale(.9)
front_foot2();
foot() {
translate([6.4, 19.25, .25])
rotate([-5, -10, 15])
scale([1.2, 1.2, 1.2])
dragon_claw();
}
translate([-5, 38, -18.5])
rotate([0, 0, -26])
scale(.725)
back_foot1();
foot() {
translate([6.4, 18.95, .25])
rotate([-10, -10, 15])
scale([1.2, 1.2, 1.2])
dragon_claw();
}
translate([-7, 38, -19.5])
rotate([0, 0, 125])
scale(.725)
mirror([1, 0, 0])
back_foot2();
foot() {
translate([6.4, 19.25, .25])
rotate([-5, 10, 120])
scale([1.2, 1.2, 1.2])
dragon_claw();
}
}