1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 17:24:20 +02:00

support x_twist

This commit is contained in:
Justin Lin
2020-03-25 17:41:04 +08:00
parent e35269a552
commit b12f6ee0d8

View File

@@ -1,13 +1,15 @@
use <hull_polyline3d.scad>;
use <experimental/mz_blocks.scad>;
use <experimental/mz_walls.scad>;
use <ptf/ptf_x_twist.scad>;
use <ptf/ptf_y_twist.scad>;
rows = 16;
columns = 8;
rows = 10;
columns = 10;
block_width = 4;
wall_thickness = 1;
angle = 180;
angle = 90;
axis = "X_AXIS"; // [X_AXIS, Y_AXIS]
// $fn = 24;
blocks = mz_blocks(
@@ -19,6 +21,6 @@ walls = mz_walls(blocks, rows, columns, block_width);
size = [columns * block_width, rows * block_width];
for(wall_pts = walls) {
transformed = [for(pt = wall_pts) ptf_y_twist(size, pt, angle)];
transformed = [for(pt = wall_pts) axis == "X_AXIS" ? ptf_x_twist(size, pt, angle) : ptf_y_twist(size, pt, angle)];
hull_polyline3d(transformed, wall_thickness);
}