1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-22 14:23:23 +02:00

add rail_extruded_sections

This commit is contained in:
Justin Lin
2021-08-14 09:10:11 +08:00
parent 249cced4c7
commit c58e019b69
7 changed files with 177 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
use <shape_circle.scad>;
use <bezier_curve.scad>;
use <sweep.scad>;
use <path_scaling_sections.scad>;
use <rail_extruded_sections.scad>;
use <bijection_offset.scad>;
use <util/rand.scad>;
use <noise/nz_perlin2s.scad>;
@@ -36,7 +36,7 @@ module distorted_vase(beginning_radius, thickness, fn, amplitude,curve_step, smo
]);
sections = path_scaling_sections(section, edge_path);
sections = rail_extruded_sections(section, edge_path);
noise = perlin == 2 ? function(pts, seed) nz_perlin2s(pts, seed) :
function(pts, seed) nz_perlin3s(pts, seed);

View File

@@ -5,7 +5,7 @@ use <curve.scad>;
use <sweep.scad>;
use <shape_circle.scad>;
use <bezier_curve.scad>;
use <path_scaling_sections.scad>;
use <rail_extruded_sections.scad>;
use <noise/nz_perlin2s.scad>;
use <dragon_head.scad>;
use <dragon_scales.scad>;
@@ -103,7 +103,7 @@ module flame_mountain(beginning_radius, fn, amplitude,curve_step, smoothness) {
]);
sections = path_scaling_sections(section, edge_path);
sections = rail_extruded_sections(section, edge_path);
noise = function(pts, seed) nz_perlin2s(pts, seed);

View File

@@ -1,6 +1,6 @@
use <trim_shape.scad>;
use <bezier_curve.scad>;
use <path_scaling_sections.scad>;
use <rail_extruded_sections.scad>;
use <sweep.scad>;
use <ptf/ptf_rotate.scad>;
use <bijection_offset.scad>;
@@ -27,7 +27,7 @@ module superformula_vase(phi_step, m, n, n3, d, r1, r2, h1, h2, t_step, twist) {
function cal_sections(shapt_pts, edge_path, twist) =
let(
sects = path_scaling_sections(shapt_pts, edge_path),
sects = rail_extruded_sections(shapt_pts, edge_path),
leng = len(sects),
twist_step = twist / leng
)
@@ -50,7 +50,7 @@ module superformula_vase(phi_step, m, n, n3, d, r1, r2, h1, h2, t_step, twist) {
[r2, 0, h2],
]);
offseted = bijection_offset(superformula, d);
offseted = bijection_offset(superformula, d, epsilon = 0.0000001);
edge_path2 = [for(p = edge_path) p + [d, 0, 0]];
superformula2 = trim_shape(offseted, 3, len(offseted) - 1, epsilon = 0.0001);

View File

@@ -1,7 +1,7 @@
use <trim_shape.scad>;
use <bezier_curve.scad>;
use <shape_taiwan.scad>;
use <path_scaling_sections.scad>;
use <rail_extruded_sections.scad>;
use <sweep.scad>;
use <ptf/ptf_rotate.scad>;
use <bijection_offset.scad>;
@@ -19,7 +19,7 @@ module dancing_formosan(x1, x2, x3, y1, y2, y3, twist, t_step) {
function cal_sections(shapt_pts, edge_path, twist) =
let(
sects = path_scaling_sections(shapt_pts, edge_path),
sects = rail_extruded_sections(shapt_pts, edge_path),
leng = len(sects),
twist_step = twist / leng
)