mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-18 12:31:17 +02:00
format
This commit is contained in:
@@ -21,14 +21,14 @@ module bend_extrude(size, thickness, angle, frags = 24) {
|
|||||||
module get_frag(i) {
|
module get_frag(i) {
|
||||||
offsetX = i * frag_width;
|
offsetX = i * frag_width;
|
||||||
linear_extrude(thickness, scale = [s, 1])
|
linear_extrude(thickness, scale = [s, 1])
|
||||||
translate([-offsetX - half_frag_width, 0, 0])
|
translate([-offsetX - half_frag_width, 0, 0])
|
||||||
intersection() {
|
intersection() {
|
||||||
translate([x, 0, 0])
|
translate([x, 0, 0])
|
||||||
mirror([1, 0, 0])
|
mirror([1, 0, 0])
|
||||||
children();
|
children();
|
||||||
translate([offsetX, 0, 0])
|
translate([offsetX, 0, 0])
|
||||||
square([frag_width, y]);
|
square([frag_width, y]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
offsetY = -r * cos(half_frag_angle) ;
|
offsetY = -r * cos(half_frag_angle) ;
|
||||||
@@ -36,11 +36,11 @@ module bend_extrude(size, thickness, angle, frags = 24) {
|
|||||||
rotate(angle - 90)
|
rotate(angle - 90)
|
||||||
mirror([0, 1, 0])
|
mirror([0, 1, 0])
|
||||||
mirror([0, 0, 1])
|
mirror([0, 0, 1])
|
||||||
for(i = [0 : frags - 1]) {
|
for(i = [0 : frags - 1]) {
|
||||||
rotate(i * frag_angle + half_frag_angle)
|
rotate(i * frag_angle + half_frag_angle)
|
||||||
translate([0, offsetY, 0])
|
translate([0, offsetY, 0])
|
||||||
rotate([-90, 0, 0])
|
rotate([-90, 0, 0])
|
||||||
get_frag(i)
|
get_frag(i)
|
||||||
children();
|
children();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,9 +15,7 @@ function curve(t_step, points, tightness = 0) =
|
|||||||
[
|
[
|
||||||
each [
|
each [
|
||||||
for(i = [0:leng - 4])
|
for(i = [0:leng - 4])
|
||||||
let(
|
let(pts = _catmull_rom_spline_4pts(t_step, [for(j = [i:i + 3]) points[j]], tightness))
|
||||||
pts = _catmull_rom_spline_4pts(t_step, [for(j = [i:i + 3]) points[j]], tightness)
|
|
||||||
)
|
|
||||||
for(i = [0:len(pts) - 2]) pts[i]
|
for(i = [0:len(pts) - 2]) pts[i]
|
||||||
],
|
],
|
||||||
points[leng - 2]
|
points[leng - 2]
|
||||||
|
Reference in New Issue
Block a user