1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-07 15:26:39 +02:00
This commit is contained in:
Justin Lin
2019-09-26 08:14:36 +08:00
parent 19e57f965e
commit 348f04b10f

View File

@@ -29,24 +29,24 @@ module bend(size, angle, frags = 24) {
module triangle_frag() { module triangle_frag() {
translate([0, -z, 0]) translate([0, -z, 0])
linear_extrude(y) linear_extrude(y)
polygon(tri_frag_pts); polygon(tri_frag_pts);
} }
module get_frag(i) { module get_frag(i) {
translate([-frag_width * i - half_frag_width, -h + z, 0]) translate([-frag_width * i - half_frag_width, -h + z, 0])
intersection() { intersection() {
translate([frag_width * i, 0, 0]) translate([frag_width * i, 0, 0])
triangle_frag(); triangle_frag();
rotate([90, 0, 0]) rotate([90, 0, 0])
children(); children();
} }
} }
rotate(90) for(i = [0 : frags - 1]) { rotate(90) for(i = [0 : frags - 1]) {
rotate(i * frag_angle + half_frag_angle) rotate(i * frag_angle + half_frag_angle)
get_frag(i) get_frag(i)
children(); children();
} }
// hook for testing // hook for testing