1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 22:28:16 +01:00
dotSCAD/docs/lib3x-rounded_square.md

44 lines
1.1 KiB
Markdown
Raw Normal View History

2017-04-22 15:33:14 +08:00
# rounded_square
2021-02-17 11:41:21 +08:00
Creates a rounded square or rectangle in the first quadrant.
2017-04-22 15:33:14 +08:00
## Parameters
- `size` : Accepts single value, square with both sides this length. It also accepts 2 value array `[x, y]`, rectangle with dimensions `x` and `y`.
- `corner_r` : The corner is one-quarter of a circle (quadrant). The `corner_r` parameter determines the circle radius.
- `center` : `false` (default), 1st (positive) quadrant, one corner at (0,0). `true`, square is centered at (0,0).
2017-05-14 13:10:15 +08:00
- `$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.
2017-04-22 15:33:14 +08:00
## Examples
2020-01-28 17:51:20 +08:00
use <rounded_square.scad>;
2017-04-22 15:33:14 +08:00
rounded_square(size = 50, corner_r = 5);
2021-02-17 11:41:21 +08:00
![rounded_square](images/lib3x-rounded_square-1.JPG)
2017-04-22 15:33:14 +08:00
2020-01-28 17:51:20 +08:00
use <rounded_square.scad>;
2017-04-22 15:33:14 +08:00
rounded_square(
size = [50, 25],
corner_r = 5,
center = true
);
2021-02-17 11:41:21 +08:00
![rounded_square](images/lib3x-rounded_square-2.JPG)
2017-04-22 15:33:14 +08:00
2020-01-28 17:51:20 +08:00
use <rounded_square.scad>;
2017-04-22 15:33:14 +08:00
$fn = 4;
rounded_square(
size = [50, 25],
corner_r = 5,
center = true
);
2021-02-17 11:41:21 +08:00
![rounded_square](images/lib3x-rounded_square-3.JPG)
2017-04-22 15:33:14 +08:00