mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-13 18:24:28 +02:00
add doc
This commit is contained in:
BIN
docs/images/lib2-px_cylinder-1.JPG
Normal file
BIN
docs/images/lib2-px_cylinder-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
BIN
docs/images/lib2-px_cylinder-2.JPG
Normal file
BIN
docs/images/lib2-px_cylinder-2.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
33
docs/lib2-px_cylinder.md
Normal file
33
docs/lib2-px_cylinder.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# px_cylinder
|
||||
|
||||
Returns points that can be used to draw a pixel-style cylinder.
|
||||
|
||||
**Since:** 2.0
|
||||
|
||||
## Parameters
|
||||
|
||||
- `radius` : The radius of the cylinder. It also accepts a vector `[r1, r2]`. `r1` is the bottom radius and `r2` is the top radius of a cone.
|
||||
- `h` : The height of the cylinder or cone.
|
||||
- `filled` : Default to `false`. Set it `true` if you want a filled cylinder.
|
||||
- `thickness`: Default to 1. The thickness when `filled` is `false`.
|
||||
|
||||
## Examples
|
||||
|
||||
include <pixel/px_cylinder.scad>;
|
||||
|
||||
for(pt = px_cylinder([10, 15], 10)) {
|
||||
translate(pt)
|
||||
cube(1, center = true);
|
||||
}
|
||||
|
||||

|
||||
|
||||
include <pixel/px_cylinder.scad>;
|
||||
|
||||
for(pt = px_cylinder([20, 15], h = 10, thickness = 3)) {
|
||||
translate(pt)
|
||||
cube(1, center = true);
|
||||
}
|
||||
|
||||

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