-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 #4385 from Paulwhy2/hull-example
Add a hull example to basic examples. Closes #355.
- Loading branch information
Showing
3 changed files
with
49 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Hull Example | ||
// The hull of a toy sailboat | ||
$fs = .1; | ||
hull(){ | ||
#translate([0,30,2.5]) sphere(1); //bow | ||
#translate([0,10,-1]) cube([20,1,8],true); //1st bulkhead | ||
#translate([0,10,-5]) cube([1,1,8],true); //1st keel | ||
#translate([0,-8,-1]) cube([20,1,8],true); //2nd bulkhead | ||
#translate([0,-8,-5]) cube([1,1,8],true); //2nd keel | ||
#translate([0,-30,1]) cube([16,1,4],true); //stern | ||
} | ||
cylinder(40,1,1); //Mast | ||
|
||
|
||
// written by Paul Young, 2022 | ||
// paulwhy.2@gmail.com | ||
|
||
// To the extent possible under law, the author(s) have dedicated all | ||
// copyright and related and neighboring rights to this software to the | ||
// public domain worldwide. This software is distributed without any | ||
// warranty. | ||
// | ||
// You should have received a copy of the CC0 Public Domain | ||
// Dedication along with this software. | ||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. |
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,22 @@ | ||
hull() { | ||
# multmatrix([[1, 0, 0, 0], [0, 1, 0, 30], [0, 0, 1, 2.5], [0, 0, 0, 1]]) { | ||
sphere($fn = 0, $fa = 12, $fs = 0.1, r = 1); | ||
} | ||
# multmatrix([[1, 0, 0, 0], [0, 1, 0, 10], [0, 0, 1, -1], [0, 0, 0, 1]]) { | ||
cube(size = [20, 1, 8], center = true); | ||
} | ||
# multmatrix([[1, 0, 0, 0], [0, 1, 0, 10], [0, 0, 1, -5], [0, 0, 0, 1]]) { | ||
cube(size = [1, 1, 8], center = true); | ||
} | ||
# multmatrix([[1, 0, 0, 0], [0, 1, 0, -8], [0, 0, 1, -1], [0, 0, 0, 1]]) { | ||
cube(size = [20, 1, 8], center = true); | ||
} | ||
# multmatrix([[1, 0, 0, 0], [0, 1, 0, -8], [0, 0, 1, -5], [0, 0, 0, 1]]) { | ||
cube(size = [1, 1, 8], center = true); | ||
} | ||
# multmatrix([[1, 0, 0, 0], [0, 1, 0, -30], [0, 0, 1, 1], [0, 0, 0, 1]]) { | ||
cube(size = [16, 1, 4], center = true); | ||
} | ||
} | ||
cylinder($fn = 0, $fa = 12, $fs = 0.1, h = 40, r1 = 1, r2 = 1, center = false); | ||
|