mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-08 15:56:42 +02:00
format
This commit is contained in:
@@ -16,8 +16,8 @@ module tiled_line_ring(radius, height, line_diameter) {
|
||||
lines = [
|
||||
for(tile = tile_truchet(size))
|
||||
let(
|
||||
x = tile[0],
|
||||
y = tile[1],
|
||||
x = tile.x,
|
||||
y = tile.y,
|
||||
i = tile[2]
|
||||
)
|
||||
if(i <= 1) [
|
||||
|
@@ -11,11 +11,10 @@ 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]
|
||||
x = tile.x,
|
||||
y = tile.y
|
||||
)
|
||||
i <= 1 ? [[x, y], [x + 1, y + 1]] : [[x + 1, y], [x, y + 1]]
|
||||
tile[2] <= 1 ? [[x, y], [x + 1, y + 1]] : [[x + 1, y], [x, y + 1]]
|
||||
];
|
||||
|
||||
half_line_diameter = line_diameter / 2;
|
||||
|
@@ -6,11 +6,10 @@ tile_width = 5;
|
||||
line_width = 1;
|
||||
|
||||
for(tile = tile_truchet(size)) {
|
||||
x = tile[0];
|
||||
y = tile[1];
|
||||
i = tile[2];
|
||||
x = tile.x;
|
||||
y = tile.y;
|
||||
|
||||
if(i <= 1) {
|
||||
if(tile[2] <= 1) {
|
||||
line2d([x, y] * tile_width , [x + 1, y + 1] * tile_width, width = line_width);
|
||||
}
|
||||
else {
|
||||
|
@@ -8,10 +8,9 @@ line_width = 1;
|
||||
$fn = 4; // 4, 8, 12 ....
|
||||
|
||||
for(tile = tile_truchet(size)) {
|
||||
x = tile[0];
|
||||
y = tile[1];
|
||||
i = tile[2];
|
||||
if(i <= 1) {
|
||||
x = tile.x;
|
||||
y = tile.y;
|
||||
if(tile[2] <= 1) {
|
||||
translate([x, y] * tile_width)
|
||||
arc(0.5 * tile_width, [0, 90], line_width);
|
||||
translate([x + 1, y + 1] * tile_width)
|
||||
|
@@ -32,13 +32,11 @@ draw_tubes(
|
||||
module draw_tubes(tiles, tileW) {
|
||||
rows = len(tiles);
|
||||
columns = len(tiles[0]);
|
||||
for(y = [0:rows - 1]) {
|
||||
for(x = [0:columns - 1]) {
|
||||
for(y = [0:rows - 1], x = [0:columns - 1]) {
|
||||
translate([x, rows - y - 1] * tileW)
|
||||
tube_tile(tiles[y][x], tileW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module tube_tile(n, width) {
|
||||
half_w = width / 2;
|
||||
|
@@ -15,11 +15,8 @@ module tube_box(size, tile_width) {
|
||||
|
||||
translate([eighth_w, eighth_w, eighth_w] + [tile_width, tile_width, 0] / 2)
|
||||
for(tile = tile_w2e(size)) {
|
||||
x = tile[0];
|
||||
y = tile[1];
|
||||
i = tile[2];
|
||||
translate([x, y] * tile_width)
|
||||
tube_tile(i, tile_width);
|
||||
translate([tile.x, tile.y] * tile_width)
|
||||
tube_tile(tile[2], tile_width);
|
||||
}
|
||||
|
||||
box_extrude(height = tile_width, shell_thickness = eighth_w)
|
||||
|
@@ -23,8 +23,7 @@ pts_angles = golden_spiral(
|
||||
|
||||
a_step = 360 / spirals;
|
||||
cells = [
|
||||
for(i = [0:spirals - 1])
|
||||
for(pt_angle = pts_angles)
|
||||
for(i = [0:spirals - 1], pt_angle = pts_angles)
|
||||
ptf_rotate(pt_angle[0], i * a_step)
|
||||
];
|
||||
noised = [
|
||||
|
@@ -19,10 +19,8 @@ module voronoi_holder() {
|
||||
|
||||
difference() {
|
||||
bend_extrude(size = size, thickness = thickness * 3, angle = 360, frags = frags)
|
||||
render()
|
||||
difference() {
|
||||
square(size);
|
||||
render()
|
||||
for(cell = cells) {
|
||||
offset(-half_spacing)
|
||||
polygon(cell[1]);
|
||||
|
Reference in New Issue
Block a user