mirror of
https://github.com/Irev-Dev/Round-Anything.git
synced 2025-08-01 13:40:14 +02:00
Major restructuring unifying 2 space indentation and putting each child on new line to be better for git, still need to decise what to do with for loops inside arrays and turnerary opperators
This commit is contained in:
committed by
Kurt Charlie Hutten
parent
4e08261f37
commit
41cfc7c322
7
LICENSE
Normal file
7
LICENSE
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright 2020 Kurt Hutten
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -1,8 +1,8 @@
|
||||
// Library: MinkowskiRound.scad
|
||||
// Version: 1.0
|
||||
// Author: IrevDev
|
||||
// Copyright: 2017
|
||||
// License: GPL 3
|
||||
// Copyright: 2020
|
||||
// License: MIT
|
||||
|
||||
/*
|
||||
---Modules
|
||||
@@ -38,71 +38,75 @@ Both this modules do the same thing as minkowskiRound() but focus on either insi
|
||||
//}//--I rendered this out with a $fn=25 and it took more than 12 hours on my computer
|
||||
|
||||
|
||||
|
||||
|
||||
module round2d(OR=3,IR=1){
|
||||
offset(OR)offset(-IR-OR)offset(IR)children();
|
||||
offset(OR){
|
||||
offset(-IR-OR){
|
||||
offset(IR){
|
||||
children();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module minkowskiRound(OR=1,IR=1,enable=1,cubeSize=[500,500,500]){
|
||||
if(enable==0){//do nothing if not enabled
|
||||
children();
|
||||
} else {
|
||||
minkowski(){//expand the now positive shape back out
|
||||
difference(){//make the negative shape positive again
|
||||
cube(cubeSize-[0.1,0.1,0.1],center=true);
|
||||
minkowski(){//expand the negative shape inwards
|
||||
difference(){//create a negative of the children
|
||||
cube(cubeSize,center=true);
|
||||
minkowski(){//expand the children
|
||||
children();
|
||||
sphere(IR);
|
||||
}
|
||||
}
|
||||
sphere(OR+IR);
|
||||
}
|
||||
if(enable==0){//do nothing if not enabled
|
||||
children();
|
||||
} else {
|
||||
minkowski(){//expand the now positive shape back out
|
||||
difference(){//make the negative shape positive again
|
||||
cube(cubeSize-[0.1,0.1,0.1],center=true);
|
||||
minkowski(){//expand the negative shape inwards
|
||||
difference(){//create a negative of the children
|
||||
cube(cubeSize,center=true);
|
||||
minkowski(){//expand the children
|
||||
children();
|
||||
sphere(IR);
|
||||
}
|
||||
sphere(OR);
|
||||
}
|
||||
sphere(OR+IR);
|
||||
}
|
||||
}
|
||||
sphere(OR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module minkowskiOutsideRound(r=1,enable=1,cubeSize=[500,500,500]){
|
||||
if(enable==0){//do nothing if not enabled
|
||||
children();
|
||||
} else {
|
||||
minkowski(){//expand the now positive shape
|
||||
difference(){//make the negative positive
|
||||
cube(cubeSize-[0.1,0.1,0.1],center=true);
|
||||
minkowski(){//expand the negative inwards
|
||||
difference(){//create a negative of the children
|
||||
cube(cubeSize,center=true);
|
||||
children();
|
||||
}
|
||||
sphere(r);
|
||||
}
|
||||
}
|
||||
sphere(r);
|
||||
if(enable==0){//do nothing if not enabled
|
||||
children();
|
||||
} else {
|
||||
minkowski(){//expand the now positive shape
|
||||
difference(){//make the negative positive
|
||||
cube(cubeSize-[0.1,0.1,0.1],center=true);
|
||||
minkowski(){//expand the negative inwards
|
||||
difference(){//create a negative of the children
|
||||
cube(cubeSize,center=true);
|
||||
children();
|
||||
}
|
||||
sphere(r);
|
||||
}
|
||||
}
|
||||
sphere(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module minkowskiInsideRound(r=1,enable=1,cubeSize=[500,500,500]){
|
||||
if(enable==0){//do nothing if not enabled
|
||||
children();
|
||||
} else {
|
||||
difference(){//make the negative positive again
|
||||
cube(cubeSize-[0.1,0.1,0.1],center=true);
|
||||
minkowski(){//expand the negative shape inwards
|
||||
difference(){//make the expanded children a negative shape
|
||||
cube(cubeSize,center=true);
|
||||
minkowski(){//expand the children
|
||||
children();
|
||||
sphere(r);
|
||||
}
|
||||
}
|
||||
sphere(r);
|
||||
}
|
||||
if(enable==0){//do nothing if not enabled
|
||||
children();
|
||||
} else {
|
||||
difference(){//make the negative positive again
|
||||
cube(cubeSize-[0.1,0.1,0.1],center=true);
|
||||
minkowski(){//expand the negative shape inwards
|
||||
difference(){//make the expanded children a negative shape
|
||||
cube(cubeSize,center=true);
|
||||
minkowski(){//expand the children
|
||||
children();
|
||||
sphere(r);
|
||||
}
|
||||
}
|
||||
sphere(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
975
polyround.scad
975
polyround.scad
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user