mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-06 14:56:47 +02:00
rename variables
This commit is contained in:
@@ -2,12 +2,12 @@ use <__comm__/__frags.scad>;
|
|||||||
|
|
||||||
module r_union2(radius = 1) {
|
module r_union2(radius = 1) {
|
||||||
module _r_union2(r = 1) {
|
module _r_union2(r = 1) {
|
||||||
fn = __frags(r);
|
frags = __frags(r);
|
||||||
step = 90 / fn;
|
a_step = 90 / frags;
|
||||||
rx = is_list(r) ? r[1] : r;
|
rx = is_list(r) ? r[1] : r;
|
||||||
ry = is_list(r) ? r[0] : r;
|
ry = is_list(r) ? r[0] : r;
|
||||||
|
|
||||||
for(a = [0:step:step * (fn - 1)]) {
|
for(a = [0:a_step:a_step * (frags - 1)]) {
|
||||||
hull() {
|
hull() {
|
||||||
intersection() {
|
intersection() {
|
||||||
offset(rx - sin(a) * rx)
|
offset(rx - sin(a) * rx)
|
||||||
@@ -16,9 +16,9 @@ module r_union2(radius = 1) {
|
|||||||
children(1);
|
children(1);
|
||||||
}
|
}
|
||||||
intersection() {
|
intersection() {
|
||||||
offset(rx - sin(a + step) * rx)
|
offset(rx - sin(a + a_step) * rx)
|
||||||
children(0);
|
children(0);
|
||||||
offset(ry - cos(a + step) * ry)
|
offset(ry - cos(a + a_step) * ry)
|
||||||
children(1);
|
children(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,12 +9,12 @@ module r_union3(radius = 1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn = __frags(r);
|
frags = __frags(r);
|
||||||
step = 90 / fn;
|
a_step = 90 / frags;
|
||||||
rx = is_list(r) ? r[1] : r;
|
rx = is_list(r) ? r[1] : r;
|
||||||
ry = is_list(r) ? r[0] : r;
|
ry = is_list(r) ? r[0] : r;
|
||||||
|
|
||||||
for(a = [0:step:step * (fn - 1)]) {
|
for(a = [0:a_step:a_step * (frags - 1)]) {
|
||||||
hull() {
|
hull() {
|
||||||
intersection() {
|
intersection() {
|
||||||
dilate(rx - sin(a) * rx)
|
dilate(rx - sin(a) * rx)
|
||||||
@@ -23,9 +23,9 @@ module r_union3(radius = 1) {
|
|||||||
children(1);
|
children(1);
|
||||||
}
|
}
|
||||||
intersection() {
|
intersection() {
|
||||||
dilate(rx - sin(a + step) * rx)
|
dilate(rx - sin(a + a_step) * rx)
|
||||||
children(0);
|
children(0);
|
||||||
dilate(ry - cos(a + step) * ry)
|
dilate(ry - cos(a + a_step) * ry)
|
||||||
children(1);
|
children(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user