mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-29 09:19:59 +02:00
move
This commit is contained in:
31
examples/tiles/tiled_line_torus.scad
Normal file
31
examples/tiles/tiled_line_torus.scad
Normal file
@@ -0,0 +1,31 @@
|
||||
use <experimental/tile_truchet.scad>;
|
||||
use <hull_polyline3d.scad>;
|
||||
use <ptf/ptf_torus.scad>;
|
||||
|
||||
size = [20, 50];
|
||||
line_diameter = 1;
|
||||
twist = 180;
|
||||
$fn = 4;
|
||||
|
||||
module tiled_line_torus(size, twist, line_diameter = 1) {
|
||||
lines = [
|
||||
for(tile = tile_truchet(size))
|
||||
let(
|
||||
x = tile[0],
|
||||
y = tile[1],
|
||||
i = tile[2]
|
||||
)
|
||||
i <= 1 ? [[x, y], [x + 1, y + 1]] : [[x + 1, y], [x, y + 1]]
|
||||
];
|
||||
|
||||
for(line = lines) {
|
||||
pts = [for(p = line) ptf_torus(size, p, [size[0], size[0] / 2], twist = twist)];
|
||||
hull_polyline3d(pts, diameter = line_diameter);
|
||||
}
|
||||
}
|
||||
|
||||
tiled_line_torus(size, twist, line_diameter);
|
||||
color("black")
|
||||
rotate_extrude($fn = 36)
|
||||
translate([size[0] * 1.5, 0, 0])
|
||||
circle(size[0] / 2);
|
Reference in New Issue
Block a user