mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-09-09 06:11:01 +02:00
change param name
This commit is contained in:
@@ -5,7 +5,7 @@ use <ptf/ptf_bend.scad>;
|
||||
|
||||
size = [100, 40];
|
||||
pt_nums = 20;
|
||||
thickness = 1;
|
||||
line_diameter = 1;
|
||||
radius = 15;
|
||||
fn = 12;
|
||||
|
||||
@@ -35,7 +35,7 @@ for(line = bisectors) {
|
||||
pts = [for(p = line) ptf_bend(size, p, radius, 360)];
|
||||
hull_polyline3d(
|
||||
concat(pts, [pts[0]]),
|
||||
thickness = thickness,
|
||||
line_diameter = line_diameter,
|
||||
$fn = 4
|
||||
);
|
||||
}
|
@@ -7,7 +7,7 @@ columns = 30;
|
||||
rows = 15;
|
||||
radius = 30;
|
||||
angle = 360;
|
||||
thickness = 2;
|
||||
diameter = 2;
|
||||
|
||||
lines = concat(
|
||||
hollow_out_square([columns, rows], width),
|
||||
@@ -18,10 +18,10 @@ lines = concat(
|
||||
|
||||
for(line = lines) {
|
||||
transformed = [for(pt = line) ptf_bend([columns * width, rows * width], pt, radius, angle)];
|
||||
hull_polyline3d(transformed, thickness, $fn = 4);
|
||||
hull_polyline3d(transformed, diameter, $fn = 4);
|
||||
}
|
||||
|
||||
translate([0, 0, -thickness / 2])
|
||||
linear_extrude(thickness)
|
||||
translate([0, 0, -diameter / 2])
|
||||
linear_extrude(diameter)
|
||||
rotate(180 / columns)
|
||||
circle(radius + thickness / 2, $fn = columns);
|
||||
circle(radius + diameter / 2, $fn = columns);
|
@@ -6,10 +6,10 @@ r1 = 30;
|
||||
r2 = 12;
|
||||
h = 10;
|
||||
n = 5;
|
||||
thickness = 1.75;
|
||||
line_diameter = 1.75;
|
||||
half = true;
|
||||
|
||||
module hollow_out_starburst(r1, r2, h, n, thickness, half = false) {
|
||||
module hollow_out_starburst(r1, r2, h, n, line_diameter, half = false) {
|
||||
star = [for(p = shape_starburst(r1, r2, n)) [p[0], p[1], 0]];
|
||||
leng = len(star);
|
||||
tris = concat(
|
||||
@@ -19,9 +19,9 @@ module hollow_out_starburst(r1, r2, h, n, thickness, half = false) {
|
||||
|
||||
module half_star() {
|
||||
for(tri = tris) {
|
||||
hull_polyline3d(concat(tri, [tri[0]]), thickness = thickness);
|
||||
hull_polyline3d(concat(tri, [tri[0]]), line_diameter = line_diameter);
|
||||
for(line = tri_bisectors(tri)) {
|
||||
hull_polyline3d(concat(line, [line[0]]), thickness = thickness);
|
||||
hull_polyline3d(concat(line, [line[0]]), line_diameter = line_diameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,4 +32,4 @@ module hollow_out_starburst(r1, r2, h, n, thickness, half = false) {
|
||||
}
|
||||
}
|
||||
|
||||
hollow_out_starburst(r1, r2, h, n, thickness, half);
|
||||
hollow_out_starburst(r1, r2, h, n, line_diameter, half);
|
@@ -6,14 +6,14 @@ width = 5;
|
||||
columns = 10;
|
||||
rows = 30;
|
||||
radius = 30;
|
||||
thickness = 2;
|
||||
line_diameter = 2;
|
||||
twist = 0;
|
||||
|
||||
lines = hollow_out_square([columns, rows], width);
|
||||
|
||||
for(line = lines) {
|
||||
transformed = [for(pt = line) ptf_torus([columns * width, rows * width], pt, [radius, radius / 2], twist = twist)];
|
||||
hull_polyline3d(transformed, thickness, $fn = 4);
|
||||
hull_polyline3d(transformed, line_diameter, $fn = 4);
|
||||
}
|
||||
|
||||
color("black")
|
||||
|
@@ -6,7 +6,7 @@ use <experimental/hollow_out_sweep.scad>;
|
||||
use <experimental/tri_bisectors.scad>;
|
||||
|
||||
t_step = 0.1;
|
||||
width = 3;
|
||||
line_diameter = 3;
|
||||
fn = 18;
|
||||
line_style = "HULL_LINES"; // [LINES, HULL_LINES]
|
||||
|
||||
@@ -16,9 +16,9 @@ p2 = [0, 0, 60];
|
||||
p3 = [25, 0, 120];
|
||||
p4 = [35, 0, 130];
|
||||
|
||||
hollow_out_vase([p0, p1, p2, p3, p4], t_step, width, fn, line_style);
|
||||
hollow_out_vase([p0, p1, p2, p3, p4], t_step, line_diameter, fn, line_style);
|
||||
|
||||
module hollow_out_vase(ctrl_pts, t_step, width, fn, line_style) {
|
||||
module hollow_out_vase(ctrl_pts, t_step, line_diameter, fn, line_style) {
|
||||
bezier = bezier_curve(t_step,
|
||||
ctrl_pts
|
||||
);
|
||||
@@ -32,7 +32,7 @@ module hollow_out_vase(ctrl_pts, t_step, width, fn, line_style) {
|
||||
]);
|
||||
|
||||
// body
|
||||
hollow_out_sweep(sects, thickness = width, style = line_style, $fn = 4);
|
||||
hollow_out_sweep(sects, diameter = line_diameter, style = line_style, $fn = 4);
|
||||
|
||||
leng_sect = len(sects[0]);
|
||||
|
||||
@@ -45,9 +45,9 @@ module hollow_out_vase(ctrl_pts, t_step, width, fn, line_style) {
|
||||
for(tri = fst_tris) {
|
||||
lines = tri_bisectors(tri);
|
||||
for(line = lines) {
|
||||
hull_polyline3d(line, thickness = width, $fn = 4);
|
||||
hull_polyline3d(line, diameter = line_diameter, $fn = 4);
|
||||
}
|
||||
hull_polyline3d([lines[2][1], [0, 0, 0]], thickness = width, $fn = 4);
|
||||
hull_polyline3d([lines[2][1], [0, 0, 0]], diameter = line_diameter, $fn = 4);
|
||||
}
|
||||
|
||||
// mouth
|
||||
@@ -57,9 +57,9 @@ module hollow_out_vase(ctrl_pts, t_step, width, fn, line_style) {
|
||||
[[[0, 0, fpt[2]], lst_sect[leng_sect - 1], lst_sect[0]]]
|
||||
);
|
||||
dangling_pts = [for(tri = lst_tris) tri_bisectors(tri)[1][1]];
|
||||
offset_z = [0, 0, width];
|
||||
offset_z = [0, 0, line_diameter];
|
||||
for(i = [0: leng_sect - 1]) {
|
||||
hull_polyline3d([lst_sect[i] + offset_z, dangling_pts[i]], thickness = width, $fn = 4);
|
||||
hull_polyline3d([lst_sect[(i + 1) % leng_sect] + offset_z, dangling_pts[i]], thickness = width, $fn = 4);
|
||||
hull_polyline3d([lst_sect[i] + offset_z, dangling_pts[i]], diameter = line_diameter, $fn = 4);
|
||||
hull_polyline3d([lst_sect[(i + 1) % leng_sect] + offset_z, dangling_pts[i]], diameter = line_diameter, $fn = 4);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user