1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-16 19:54:29 +02:00

added box_extrude

This commit is contained in:
Justin Lin
2017-03-26 16:51:41 +08:00
parent a96fc7cf17
commit 0cbdbc11f1
5 changed files with 52 additions and 1 deletions

View File

@@ -26,4 +26,7 @@ I've been using OpenSCAD for years and created some funny things. Some of them i
- Path
- [circle_path](https://openhome.cc/eGossip/OpenSCAD/lib-circle_path.html)
- [bezier](https://openhome.cc/eGossip/OpenSCAD/lib-bezier.html)
- [cylinder_spiral](https://openhome.cc/eGossip/OpenSCAD/lib-cylinder_spiral.html)
- [cylinder_spiral](https://openhome.cc/eGossip/OpenSCAD/lib-cylinder_spiral.html)
- Other
- [box_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-box_extrude.html)

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

21
docs/lib-box_extrude.md Normal file
View File

@@ -0,0 +1,21 @@
# box_extrude
Create a box (container) from a 2D object.
## Parameters
- `height` : The box height.
- `shell_thickness` : The thickness between the exterior and interior..
## Examples
box_extrude(height = 30, shell_thickness = 2)
circle(r = 30);
![box_extrude](images/lib-box_extrude-1.JPG)
box_extrude(height = 30, shell_thickness = 2)
text("XD", size = 40, font = "Cooper Black");
![box_extrude](images/lib-box_extrude-2.JPG)

27
src/box_extrude.scad Normal file
View File

@@ -0,0 +1,27 @@
/**
* box_extrude.scad
*
* Create a box (container) from a 2D object.
*
* @copyright Justin Lin, 2017
* @license https://opensource.org/licenses/lgpl-3.0.html
*
* @see https://openhome.cc/eGossip/OpenSCAD/lib-box_extrude.html
*
**/
module box_extrude(height, shell_thickness) {
linear_extrude(shell_thickness)
children();
linear_extrude(height)
difference() {
children();
offset(delta = -shell_thickness)
children();
}
}
box_extrude(height = 30, shell_thickness = 2)
text("XD", size = 40, font = "Cooper Black");