mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-09-09 14:20:46 +02:00
added rounded_cube
This commit is contained in:
BIN
docs/images/lib-rounded_cube-1.JPG
Normal file
BIN
docs/images/lib-rounded_cube-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
docs/images/lib-rounded_cube-2.JPG
Normal file
BIN
docs/images/lib-rounded_cube-2.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
docs/images/lib-rounded_cube-3.JPG
Normal file
BIN
docs/images/lib-rounded_cube-3.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
44
docs/lib-rounded_cube.md
Normal file
44
docs/lib-rounded_cube.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# rounded_cube
|
||||
|
||||
Creates a cube in the first octant. When center is true, the cube is centered on the origin.
|
||||
|
||||
## Parameters
|
||||
|
||||
- `size` : Accepts a single value, cube with all sides this length. It also accepts 3 value array `[x, y, z]`, cube with dimensions `x`, `y` and `z`.
|
||||
- `corner_r` : The corner is one-eight of a sphere. The `corner_r` parameter determines the sphere radius.
|
||||
- `center` : `false` (default), 1st (positive) octant, one corner at (0,0,0). `true`, cube is centered at (0,0).
|
||||
- `$fa`, `$fs`, `$fn` : Used to control the four quadrants. Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) for more details. The final fragments of a sphere will be a multiple of 4 to fit edges.
|
||||
|
||||
## Examples
|
||||
|
||||
include <rounded_cube.scad>;
|
||||
|
||||
rounded_cube(20, 5);
|
||||
|
||||

|
||||
|
||||
include <rounded_cube.scad>;
|
||||
|
||||
rounded_cube(
|
||||
size = [50, 25, 15],
|
||||
corner_r = 5,
|
||||
center = true
|
||||
);
|
||||
|
||||

|
||||
|
||||
include <rounded_cube.scad>;
|
||||
|
||||
$fn = 8;
|
||||
|
||||
rounded_cube(
|
||||
size = [50, 25, 15],
|
||||
corner_r = 5,
|
||||
center = true
|
||||
);
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user