mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-17 20:11:50 +02:00
refactor
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
use <shape_circle.scad>;
|
use <shape_circle.scad>;
|
||||||
|
use <shear.scad>;
|
||||||
use <polyhedron_hull.scad>;
|
use <polyhedron_hull.scad>;
|
||||||
use <ptf/ptf_rotate.scad>;
|
use <ptf/ptf_rotate.scad>;
|
||||||
use <experimental/convex_hull3.scad>;
|
use <experimental/convex_hull3.scad>;
|
||||||
@@ -41,3 +42,25 @@ module dragon_body_scales(body_r, body_fn, one_scale_points_faces) {
|
|||||||
ring_scales();
|
ring_scales();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module tail_scales(ang, leng, radius, height, thickness) {
|
||||||
|
module one_scale() {
|
||||||
|
rotate([0, ang, 0])
|
||||||
|
shear(sx = [0, -1.5])
|
||||||
|
linear_extrude(thickness, center = true)
|
||||||
|
scale([leng, 1])
|
||||||
|
circle(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(a = [0:30:330]) {
|
||||||
|
hull() {
|
||||||
|
rotate(a)
|
||||||
|
translate([radius, 0, height])
|
||||||
|
one_scale();
|
||||||
|
|
||||||
|
rotate(a + 15)
|
||||||
|
translate([radius, 0, height + 1.75])
|
||||||
|
one_scale();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -8,35 +8,13 @@ use <bezier_curve.scad>;
|
|||||||
use <path_scaling_sections.scad>;
|
use <path_scaling_sections.scad>;
|
||||||
use <noise/nz_perlin2s.scad>;
|
use <noise/nz_perlin2s.scad>;
|
||||||
use <dragon_head.scad>;
|
use <dragon_head.scad>;
|
||||||
use <dragon_body_scales.scad>;
|
use <dragon_scales.scad>;
|
||||||
|
|
||||||
r1 = 25;
|
r1 = 25;
|
||||||
r2 = 15;
|
r2 = 15;
|
||||||
levels = 3;
|
levels = 3;
|
||||||
level_dist = 20;
|
level_dist = 20;
|
||||||
|
|
||||||
module tail_scales(ang, leng, radius, height, thickness) {
|
|
||||||
module one_scale() {
|
|
||||||
rotate([0, ang, 0])
|
|
||||||
shear(sx = [0, -1.5])
|
|
||||||
linear_extrude(thickness, center = true)
|
|
||||||
scale([leng, 1])
|
|
||||||
circle(1, $fn = 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(a = [0:30:330]) {
|
|
||||||
hull() {
|
|
||||||
rotate(a)
|
|
||||||
translate([radius, 0, height])
|
|
||||||
one_scale();
|
|
||||||
|
|
||||||
rotate(a + 15)
|
|
||||||
translate([radius, 0, height + 1.75])
|
|
||||||
one_scale();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module one_segment(body_r, body_fn, one_scale_data) {
|
module one_segment(body_r, body_fn, one_scale_data) {
|
||||||
// scales
|
// scales
|
||||||
rotate([-90, 0, 0])
|
rotate([-90, 0, 0])
|
||||||
@@ -58,6 +36,7 @@ module one_segment(body_r, body_fn, one_scale_data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module tail() {
|
module tail() {
|
||||||
|
$fn = 4;
|
||||||
scale([1,0.85, 1]) union() {
|
scale([1,0.85, 1]) union() {
|
||||||
tail_scales(75, 2.5, 4.25, -4, 1.25);
|
tail_scales(75, 2.5, 4.25, -4, 1.25);
|
||||||
tail_scales(100, 1.25, 4.5, -7, 1);
|
tail_scales(100, 1.25, 4.5, -7, 1);
|
||||||
|
@@ -3,7 +3,7 @@ use <shear.scad>;
|
|||||||
use <along_with.scad>;
|
use <along_with.scad>;
|
||||||
use <util/reverse.scad>;
|
use <util/reverse.scad>;
|
||||||
use <dragon_head.scad>;
|
use <dragon_head.scad>;
|
||||||
use <dragon_body_scales.scad>;
|
use <dragon_scales.scad>;
|
||||||
|
|
||||||
torus_knot_dragon();
|
torus_knot_dragon();
|
||||||
|
|
||||||
@@ -41,35 +41,13 @@ module torus_knot_dragon() {
|
|||||||
|
|
||||||
t_angy_angz = __angy_angz(d_path[1], d_path[0]);
|
t_angy_angz = __angy_angz(d_path[1], d_path[0]);
|
||||||
|
|
||||||
translate([2.17, 1.53, -.775])
|
translate([2.1, 1.55, -.80])
|
||||||
rotate([0, t_angy_angz[0], t_angy_angz[1]])
|
rotate([0, t_angy_angz[0], t_angy_angz[1]])
|
||||||
rotate([0, -85, -90])
|
rotate([0, -95, -75])
|
||||||
scale(0.055)
|
scale([0.055, 0.055, 0.065])
|
||||||
tail();
|
tail();
|
||||||
}
|
}
|
||||||
|
|
||||||
module tail_scales(ang, leng, radius, height, thickness) {
|
|
||||||
module one_scale() {
|
|
||||||
rotate([0, ang, 0])
|
|
||||||
shear(sx = [0, -1.5])
|
|
||||||
linear_extrude(thickness, center = true)
|
|
||||||
scale([leng, 1])
|
|
||||||
circle(1, $fn = 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(a = [0:30:330]) {
|
|
||||||
hull() {
|
|
||||||
rotate(a)
|
|
||||||
translate([radius, 0, height])
|
|
||||||
one_scale();
|
|
||||||
|
|
||||||
rotate(a + 15)
|
|
||||||
translate([radius, 0, height + 1.75])
|
|
||||||
one_scale();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module one_segment(body_r, body_fn, one_scale_data) {
|
module one_segment(body_r, body_fn, one_scale_data) {
|
||||||
// scales
|
// scales
|
||||||
rotate([-90, 0, 0])
|
rotate([-90, 0, 0])
|
||||||
@@ -91,6 +69,7 @@ module one_segment(body_r, body_fn, one_scale_data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module tail() {
|
module tail() {
|
||||||
|
$fn = 8;
|
||||||
tail_scales(75, 2.5, 5, -4, 1.25);
|
tail_scales(75, 2.5, 5, -4, 1.25);
|
||||||
tail_scales(100, 1.25, 4.5, -7, 1);
|
tail_scales(100, 1.25, 4.5, -7, 1);
|
||||||
tail_scales(110, 1.25, 3, -9, 1);
|
tail_scales(110, 1.25, 3, -9, 1);
|
||||||
|
Reference in New Issue
Block a user