forked from SolidCode/MCAD
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from Illusion65/cleanup
- Loading branch information
Showing
11 changed files
with
96 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
// Copyright 2011 Nophead (of RepRap fame) | ||
// This file is licensed under the terms of Creative Commons Attribution 3.0 Unported. | ||
|
||
// Using this holes should come out approximately right when printed | ||
module polyhole(h, d) { | ||
n = max(round(2 * d),3); | ||
rotate([0,0,180]) | ||
cylinder(h = h, r = (d / 2) / cos (180 / n), $fn = n); | ||
} | ||
|
||
module test_polyhole(){ | ||
difference() { | ||
cube(size = [100,27,3]); | ||
union() { | ||
for(i = [1:10]) { | ||
translate([(i * i + i)/2 + 3 * i , 8,-1]) | ||
polyhole(h = 5, d = i); | ||
|
||
assign(d = i + 0.5) | ||
translate([(d * d + d)/2 + 3 * d, 19,-1]) | ||
polyhole(h = 5, d = d); | ||
} | ||
} | ||
} | ||
} | ||
|
||
// Copyright 2011 Nophead (of RepRap fame) | ||
// This file is licensed under the terms of Creative Commons Attribution 3.0 Unported. | ||
|
||
// Using this holes should come out approximately right when printed | ||
module polyhole(h, d) { | ||
n = max(round(2 * d),3); | ||
rotate([0,0,180]) | ||
cylinder(h = h, r = (d / 2) / cos (180 / n), $fn = n); | ||
} | ||
|
||
module test_polyhole(){ | ||
difference() { | ||
cube(size = [100,27,3]); | ||
for(i = [1:10]) { | ||
translate([(i * i + i)/2 + 3 * i , 8,-1]) | ||
polyhole(h = 5, d = i); | ||
d = i + 0.5; | ||
translate([(d * d + d)/2 + 3 * d, 19,-1]) | ||
polyhole(h = 5, d = d); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.