1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-29 10:09:50 +02:00

Added list and string slicing.

This commit is contained in:
Chris Palmer
2020-11-04 21:44:07 +00:00
parent b5fe03fcb2
commit df43fe7dc6
3 changed files with 29 additions and 0 deletions

View File

@@ -5856,11 +5856,13 @@ Global constants, functions and modules. This file is used directly or indirectl
| ```foot(x)``` | Foot to mm conversion |
| ```in(list, x)``` | Returns true if ```x``` is an element in the ```list``` |
| ```inch(x)``` | Inch to mm conversion (For fractional inches, 'inch(1 + 7/8)' will work as expected.) |
| ```limit(x, min, max)``` | Force x in range min <= x <= max |
| ```m(x)``` | m to mm conversion |
| ```mm(x)``` | Explicit mm specified |
| ```no_point(str)``` | Replace decimal point in string with 'p' |
| ```r2sides(r)``` | Replicates the OpenSCAD logic to calculate the number of sides from the radius |
| ```r2sides4n(r)``` | Round up the number of sides to a multiple of 4 to ensure points land on all axes |
| ```slice(list, start = 0, end = undef)``` | Slice a list or string with Python type semantics |
| ```sqr(x)``` | Returns the square of ```x``` |
| ```yard(x)``` | Yard to mm conversion |