forked from XAMPPRocky/tokei
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add OpenSCAD * update README.md * test data
- Loading branch information
1 parent
7fa90f2
commit 8712a95
Showing
3 changed files
with
42 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -467,6 +467,7 @@ ObjectiveC | |
ObjectiveCpp | ||
OCaml | ||
Odin | ||
OpenSCAD | ||
OpenQASM | ||
Org | ||
Oz | ||
|
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//! 34 lines 15 code 16 comments 3 blanks | ||
// https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Commented_Example_Projects | ||
// The idea is to twist a translated circle: | ||
// - | ||
/* | ||
linear_extrude(height = 10, twist = 360, scale = 0) | ||
translate([1,0]) | ||
circle(r = 1); | ||
*/ | ||
|
||
module horn(height = 10, radius = 6, | ||
twist = 720, $fn = 50) | ||
{ | ||
// A centered circle translated by 1xR and | ||
// twisted by 360° degrees, covers a 2x(2xR) space. | ||
// - | ||
radius = radius/4; | ||
// De-translate. | ||
// - | ||
translate([-radius,0]) | ||
// The actual code. | ||
// - | ||
linear_extrude(height = height, twist = twist, | ||
scale=0, $fn = $fn) | ||
translate([radius,0]) | ||
circle(r=radius); | ||
} | ||
|
||
translate([3,0]) | ||
mirror() | ||
horn(); | ||
|
||
translate([-3,0]) | ||
horn(); |