mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-01 20:40:28 +02:00
add hollow_out_torus
This commit is contained in:
22
examples/hollow_out/hollow_out_torus.scad
Normal file
22
examples/hollow_out/hollow_out_torus.scad
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
use <hull_polyline3d.scad>;
|
||||||
|
use <experimental/ptf_torus.scad>;
|
||||||
|
use <hollow_out_square.scad>;
|
||||||
|
|
||||||
|
width = 5;
|
||||||
|
columns = 10;
|
||||||
|
rows = 30;
|
||||||
|
radius = 30;
|
||||||
|
thickness = 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
color("black")
|
||||||
|
rotate_extrude($fn = 36)
|
||||||
|
translate([radius * 1.5, 0, 0])
|
||||||
|
circle(radius / 2);
|
Reference in New Issue
Block a user