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

34 lines
868 B
Markdown
Raw Normal View History

2020-05-20 17:11:06 +08:00
# vx_cylinder
Returns points that can be used to draw a voxel-style cylinder.
**Since:** 2.4
## 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. Values must be an integer.
- `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`. The value must be an integer.
## Examples
use <voxel/vx_cylinder.scad>;
for(pt = vx_cylinder([10, 15], 10)) {
translate(pt)
cube(1, center = true);
}
2021-02-24 21:09:54 +08:00
![vx_cylinder](images/lib3x-vx_cylinder-1.JPG)
2020-05-20 17:11:06 +08:00
use <voxel/vx_cylinder.scad>;
for(pt = vx_cylinder([20, 15], h = 10, thickness = 3)) {
translate(pt)
cube(1, center = true);
}
2021-02-24 21:09:54 +08:00
![vx_cylinder](images/lib3x-vx_cylinder-2.JPG)
2020-05-20 17:11:06 +08:00