mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 14:18:13 +01:00
add doc
This commit is contained in:
parent
1132451009
commit
675f80159e
37
docs/lib3x-select.md
Normal file
37
docs/lib3x-select.md
Normal file
@ -0,0 +1,37 @@
|
||||
# select
|
||||
|
||||
Selects module objects.
|
||||
|
||||
**Since:** 3.2
|
||||
|
||||
## Parameters
|
||||
|
||||
- `i` : An index value, range, or list. Select all module objects if `i` is ignored.
|
||||
|
||||
## Examples
|
||||
|
||||
If you write code like this:
|
||||
|
||||
i = 0;
|
||||
|
||||
if(i == 0) {
|
||||
sphere(1);
|
||||
}
|
||||
else if(i == 1) {
|
||||
cube(1);
|
||||
}
|
||||
else if(i == 2) {
|
||||
cylinder(1, 1);
|
||||
}
|
||||
|
||||
You may use `select`:
|
||||
|
||||
use <select.scad>;
|
||||
|
||||
i = 0;
|
||||
|
||||
select(i) {
|
||||
sphere(1);
|
||||
cube(1);
|
||||
cylinder(1, 1);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user