1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-30 09:49:59 +02:00

use ptf_rotate

This commit is contained in:
Justin Lin
2020-03-24 17:21:17 +08:00
parent ec0c1fa9ae
commit 55c9493fca
9 changed files with 119 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
use <hull_polyline3d.scad>;
use <bezier_curve.scad>;
use <rotate_p.scad>;
use <ptf/ptf_rotate.scad>;
use <paths2sections.scad>;
use <experimental/hollow_out_sweep.scad>;
use <experimental/tri_bisectors.scad>;
@@ -28,7 +28,7 @@ module hollow_out_vase(ctrl_pts, t_step, width, fn, line_style) {
a_step = 360 / fn;
sects = paths2sections([
for(a = [0:a_step:360 - a_step])
[for(p = bezier) rotate_p(p, [0, 0, a])]
[for(p = bezier) ptf_rotate(p, [0, 0, a])]
]);
// body

View File

@@ -1,4 +1,4 @@
use <rotate_p.scad>;
use <ptf/ptf_rotate.scad>;
use <hull_polyline2d.scad>;
use <bezier_curve.scad>;
use <ellipse_extrude.scad>;
@@ -16,7 +16,7 @@ module nautilus_shell(chambered_section_max_angle, steps, thickness) {
a_step = chambered_section_max_angle / steps;
spiral = [
for(a = [a_step:a_step:chambered_section_max_angle + 450])
rotate_p([r(a), 0], a)
ptf_rotate([r(a), 0], a)
];
render() {
@@ -25,9 +25,9 @@ module nautilus_shell(chambered_section_max_angle, steps, thickness) {
for(a = [a_step:a_step * 2:chambered_section_max_angle]) {
a2 = a + 360;
a3 = a + 420;
p1 = rotate_p([r(a), 0], a);
p2 = rotate_p((p1 + rotate_p([r(a2), 0], a2)) * .6, -5);
p3 = rotate_p([r(a3), 0], a3);
p1 = ptf_rotate([r(a), 0], a);
p2 = ptf_rotate((p1 + ptf_rotate([r(a2), 0], a2)) * .6, -5);
p3 = ptf_rotate([r(a3), 0], a3);
hull_polyline2d(bezier_curve(0.1,
[p1, p2, p3]

View File

@@ -1,5 +1,5 @@
use <shape_circle.scad>;
use <rotate_p.scad>;
use <ptf/ptf_rotate.scad>;
use <polysections.scad>;
r1 = 0.1;
@@ -24,7 +24,7 @@ module simple_seashell(r1, r2, a1, a2, steps) {
)
[
for(p = concat(shape_circle(r), shape_circle(r * 0.9)))
rotate_p([p[0], p[1], 0] + [r, 0, 0], [0, a, 0])
ptf_rotate([p[0], p[1], 0] + [r, 0, 0], [0, a, 0])
]
];

View File

@@ -2,7 +2,7 @@ use <trim_shape.scad>;
use <bezier_curve.scad>;
use <path_scaling_sections.scad>;
use <polysections.scad>;
use <rotate_p.scad>;
use <ptf/ptf_rotate.scad>;
use <bijection_offset.scad>;
use <shape_superformula.scad>;
@@ -35,7 +35,7 @@ module superformula_vase(phi_step, m, n, n3, d, r1, r2, h1, h2, t_step, twist) {
for(i = [0:leng - 1])
[
for(p = sects[i])
rotate_p(p, twist_step * i)
ptf_rotate(p, twist_step * i)
]
];

View File

@@ -3,7 +3,7 @@ use <bezier_curve.scad>;
use <shape_taiwan.scad>;
use <path_scaling_sections.scad>;
use <polysections.scad>;
use <rotate_p.scad>;
use <ptf/ptf_rotate.scad>;
use <bijection_offset.scad>;
x1 = 4; // [-20:4]
@@ -27,7 +27,7 @@ module dancing_formosan(x1, x2, x3, y1, y2, y3, twist, t_step) {
for(i = [0:leng - 1])
[
for(p = sects[i])
rotate_p(p, twist_step * i)
ptf_rotate(p, twist_step * i)
]
];

View File

@@ -1,5 +1,5 @@
use <golden_spiral.scad>;
use <rotate_p.scad>;
use <ptf/ptf_rotate.scad>;
use <hollow_out.scad>;
use <experimental/voronoi2d_cells.scad>;
@@ -27,7 +27,7 @@ module voronoi_fibonacci() {
pts = [
for(a = [0:a_step:360 - a_step])
each [for(p = spiral) rotate_p(p, a)]
each [for(p = spiral) ptf_rotate(p, a)]
];
half_line_thicness = line_thickness / 2;