1
0
mirror of https://github.com/Irev-Dev/Round-Anything.git synced 2025-08-09 09:26:46 +02:00

option to not _includeOperands_ and just render fillet

This commit is contained in:
TLC123
2021-08-23 16:38:30 +02:00
parent dd05f2e441
commit 0fbca7c2d5

View File

@@ -32,20 +32,20 @@
// Demo code // Demo code
demo= false; demo= false;
if (demo) if (demo)
unionRoundMask(1.5, 5) { unionRoundMask( r=1.5 , detail= 5 , q=70, includeOperands = true) {
cube([10,10,2],true); cube([10,10,2],true);
rotate([20,-10,0])cylinder(5,1,1,$fn=12); rotate([20,-10,0])cylinder(5,1,1,$fn=12);
cube([1.5,10,6],center=true); //mask translate([0,0,1.5])cube([1.5,10,3],center=true); //mask
rotate(90) rotate(90)
cube([1.5,10,6],center=true); //mask translate([0,0,1.5])cube([3,10,3],center=true); //mask
} }
// end of demo code // end of demo code
// //
module unionRoundMask(r=1, detail = 5,q=70, epsilon = 1e-6, showMask = true) { module unionRoundMask(r=1, detail = 5,q=70, epsilon = 1e-6, showMask = true, includeOperands = true) {
//automask if none //automask if none
if($children <=2){ if($children <=2){
unionRoundMask(r,detail,q,epsilon,showMask) unionRoundMask(r,detail,q,epsilon,showMask, includeOperands)
{ {
children(0); children(0);
children(1); children(1);
@@ -57,8 +57,10 @@
} }
else { else {
union() { union() {
if(includeOperands){
children(0); children(0);
children(1); children(1);
}
if (showMask && $children > 2) % if (showMask && $children > 2) %
for (i = [2: max(2, $children - 1)]) children(i); for (i = [2: max(2, $children - 1)]) children(i);
@@ -67,7 +69,7 @@
intersection() { intersection() {
children(i); children(i);
unionRound(r, detail,q, epsilon) { unionRound(r, detail,q, epsilon,includeOperands) {
intersection() { intersection() {
children(0); children(0);
children(i); // mask children(i); // mask
@@ -84,10 +86,11 @@
} }
module unionRound(r=1, detail = 5,q=70, epsilon = 1e-6) { module unionRound(r=1, detail = 5,q=70, epsilon = 1e-6, includeOperands=true) {
if(includeOperands){
children(0); children(0);
children(1); children(1);
}
step = 90 / detail; step = 90 / detail;
union()for (i = [0: detail-1]) { union()for (i = [0: detail-1]) {
{ {