mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 22:28:16 +01:00
use rails2sections
This commit is contained in:
parent
569a0091c3
commit
2a4bd4c006
@ -1,7 +1,7 @@
|
|||||||
use <ellipse_extrude.scad>;
|
use <ellipse_extrude.scad>;
|
||||||
use <curve.scad>;
|
use <curve.scad>;
|
||||||
use <sweep.scad>;
|
use <sweep.scad>;
|
||||||
use <paths2sections.scad>;
|
use <rails2sections.scad>;
|
||||||
use <shape_trapezium.scad>;
|
use <shape_trapezium.scad>;
|
||||||
use <ptf/ptf_rotate.scad>;
|
use <ptf/ptf_rotate.scad>;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ module dragon_head() {
|
|||||||
|
|
||||||
translate([0, 0, -2])
|
translate([0, 0, -2])
|
||||||
rotate([90, 0, -90])
|
rotate([90, 0, -90])
|
||||||
sweep(paths2sections([path1, path2, path3, path4, path5]));
|
sweep(rails2sections([path1, path2, path3, path4, path5]));
|
||||||
|
|
||||||
translate([0, 0, -3.25])
|
translate([0, 0, -3.25])
|
||||||
rotate([90, 0, -90])
|
rotate([90, 0, -90])
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use <hull_polyline3d.scad>;
|
use <hull_polyline3d.scad>;
|
||||||
use <bezier_curve.scad>;
|
use <bezier_curve.scad>;
|
||||||
use <ptf/ptf_rotate.scad>;
|
use <ptf/ptf_rotate.scad>;
|
||||||
use <paths2sections.scad>;
|
use <rails2sections.scad>;
|
||||||
use <experimental/hollow_out_sweep.scad>;
|
use <experimental/hollow_out_sweep.scad>;
|
||||||
use <experimental/tri_bisectors.scad>;
|
use <experimental/tri_bisectors.scad>;
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ module hollow_out_vase(ctrl_pts, t_step, line_diameter, fn, line_style) {
|
|||||||
fpt = ctrl_pts[len(ctrl_pts) - 1];
|
fpt = ctrl_pts[len(ctrl_pts) - 1];
|
||||||
|
|
||||||
a_step = 360 / fn;
|
a_step = 360 / fn;
|
||||||
sects = paths2sections([
|
sects = rails2sections([
|
||||||
for(a = [0:a_step:360 - a_step])
|
for(a = [0:a_step:360 - a_step])
|
||||||
[for(p = bezier) ptf_rotate(p, [0, 0, a])]
|
[for(p = bezier) ptf_rotate(p, [0, 0, a])]
|
||||||
]);
|
]);
|
||||||
|
@ -4,7 +4,7 @@ use <hull_polyline3d.scad>;
|
|||||||
use <experimental/tri_bisectors.scad>;
|
use <experimental/tri_bisectors.scad>;
|
||||||
|
|
||||||
// style: LINES or HULL_LINES
|
// style: LINES or HULL_LINES
|
||||||
module hollow_out_sweep(sections, thickness, closed = false, style = "LINES") {
|
module hollow_out_sweep(sections, diameter, closed = false, style = "LINES") {
|
||||||
function rects(sects) =
|
function rects(sects) =
|
||||||
let(
|
let(
|
||||||
sects_leng = len(sects),
|
sects_leng = len(sects),
|
||||||
@ -41,7 +41,7 @@ module hollow_out_sweep(sections, thickness, closed = false, style = "LINES") {
|
|||||||
line3d(
|
line3d(
|
||||||
p1 = line[0],
|
p1 = line[0],
|
||||||
p2 = line[1],
|
p2 = line[1],
|
||||||
thickness = thickness,
|
diameter = diameter,
|
||||||
p1Style = "CAP_SPHERE",
|
p1Style = "CAP_SPHERE",
|
||||||
p2Style = "CAP_SPHERE"
|
p2Style = "CAP_SPHERE"
|
||||||
);
|
);
|
||||||
@ -49,7 +49,7 @@ module hollow_out_sweep(sections, thickness, closed = false, style = "LINES") {
|
|||||||
}
|
}
|
||||||
else if(style == "HULL_LINES") {
|
else if(style == "HULL_LINES") {
|
||||||
for(line = lines) {
|
for(line = lines) {
|
||||||
hull_polyline3d(line, thickness = thickness);
|
hull_polyline3d(line, diameter = diameter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user