mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-13 10:14:41 +02:00
refactored before adding test
This commit is contained in:
@@ -22,17 +22,17 @@ module bend(size, angle, frags = 24) {
|
|||||||
r = half_frag_width / sin(half_frag_angle);
|
r = half_frag_width / sin(half_frag_angle);
|
||||||
h = r * cos(half_frag_angle);
|
h = r * cos(half_frag_angle);
|
||||||
|
|
||||||
|
tri_frag_pts = [
|
||||||
|
[0, 0],
|
||||||
|
[half_frag_width, h],
|
||||||
|
[frag_width, 0],
|
||||||
|
[0, 0]
|
||||||
|
];
|
||||||
|
|
||||||
module triangle_frag() {
|
module triangle_frag() {
|
||||||
translate([0, -z, 0])
|
translate([0, -z, 0])
|
||||||
linear_extrude(y)
|
linear_extrude(y)
|
||||||
polygon(
|
polygon(tri_frag_pts);
|
||||||
[
|
|
||||||
[0, 0],
|
|
||||||
[half_frag_width, h],
|
|
||||||
[frag_width, 0],
|
|
||||||
[0, 0]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module get_frag(i) {
|
module get_frag(i) {
|
||||||
|
Reference in New Issue
Block a user