Skip to content

Commit 16e5c48

Browse files
authored
Merge pull request #3 from Irev-Dev/organise-examples-and-improve-naming
Organise examples and improve naming
2 parents 41cfc7c + f4a75dd commit 16e5c48

File tree

3 files changed

+316
-240
lines changed

3 files changed

+316
-240
lines changed

MinkowskiRound.scad

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ Both this modules do the same thing as minkowskiRound() but focus on either insi
3232
// }
3333
//}
3434

35-
//minkowskiRound(0.5,2,1,[50,50,50])union(){//--example in the thiniverse thumbnail/main image
35+
// $fn=20;
36+
// minkowskiRound(0.7,1.5,1,[50,50,50])union(){//--example in the thiniverse thumbnail/main image
3637
// cube([6,6,22]);
37-
// rotate([30,45,10])cylinder(h=22,d=10);
38-
//}//--I rendered this out with a $fn=25 and it took more than 12 hours on my computer
38+
// rotate([30,45,10])cylinder(h=22,d=10);
39+
// }//--I rendered this out with a $fn=25 and it took more than 12 hours on my computer
3940

4041

4142
module round2d(OR=3,IR=1){
@@ -48,16 +49,16 @@ module round2d(OR=3,IR=1){
4849
}
4950
}
5051

51-
module minkowskiRound(OR=1,IR=1,enable=1,cubeSize=[500,500,500]){
52+
module minkowskiRound(OR=1,IR=1,enable=1,boundingEnvelope=[500,500,500]){
5253
if(enable==0){//do nothing if not enabled
5354
children();
5455
} else {
5556
minkowski(){//expand the now positive shape back out
5657
difference(){//make the negative shape positive again
57-
cube(cubeSize-[0.1,0.1,0.1],center=true);
58+
cube(boundingEnvelope-[0.1,0.1,0.1],center=true);
5859
minkowski(){//expand the negative shape inwards
5960
difference(){//create a negative of the children
60-
cube(cubeSize,center=true);
61+
cube(boundingEnvelope,center=true);
6162
minkowski(){//expand the children
6263
children();
6364
sphere(IR);
@@ -71,16 +72,16 @@ module minkowskiRound(OR=1,IR=1,enable=1,cubeSize=[500,500,500]){
7172
}
7273
}
7374

74-
module minkowskiOutsideRound(r=1,enable=1,cubeSize=[500,500,500]){
75+
module minkowskiOutsideRound(r=1,enable=1,boundingEnvelope=[500,500,500]){
7576
if(enable==0){//do nothing if not enabled
7677
children();
7778
} else {
7879
minkowski(){//expand the now positive shape
7980
difference(){//make the negative positive
80-
cube(cubeSize-[0.1,0.1,0.1],center=true);
81+
cube(boundingEnvelope-[0.1,0.1,0.1],center=true);
8182
minkowski(){//expand the negative inwards
8283
difference(){//create a negative of the children
83-
cube(cubeSize,center=true);
84+
cube(boundingEnvelope,center=true);
8485
children();
8586
}
8687
sphere(r);
@@ -91,15 +92,15 @@ module minkowskiOutsideRound(r=1,enable=1,cubeSize=[500,500,500]){
9192
}
9293
}
9394

94-
module minkowskiInsideRound(r=1,enable=1,cubeSize=[500,500,500]){
95+
module minkowskiInsideRound(r=1,enable=1,boundingEnvelope=[500,500,500]){
9596
if(enable==0){//do nothing if not enabled
9697
children();
9798
} else {
9899
difference(){//make the negative positive again
99-
cube(cubeSize-[0.1,0.1,0.1],center=true);
100+
cube(boundingEnvelope-[0.1,0.1,0.1],center=true);
100101
minkowski(){//expand the negative shape inwards
101102
difference(){//make the expanded children a negative shape
102-
cube(cubeSize,center=true);
103+
cube(boundingEnvelope,center=true);
103104
minkowski(){//expand the children
104105
children();
105106
sphere(r);

0 commit comments

Comments
 (0)