1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-03-14 02:59:42 +01:00

update doc

This commit is contained in:
Justin Lin 2020-03-19 15:53:38 +08:00
parent eed92b5989
commit 007f7c618c
2 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,7 @@ Eliminating duplicate copies of repeating vectors. If `lt` has many elements, so
pts1 = px_circle(20, filled = true);
pts2 = [for(p = px_circle(10, filled = true)) p + [20, 0]];
// From dotSCAD 2.3, you can use sort(concat(pts1, pts2), by = "vt") instead.
sorted_pts = sort(sort(concat(pts1, pts2), by = "x"), by = "y");
// simple union

View File

@ -20,6 +20,7 @@ If `lt` contains `elem`, this function returns `true`. If you want to test eleme
assert(has(pts, [2, -10]));
assert(!has(pts, [0, 0]));
// From dotSCAD 2.3, you can use sort(pts, by = "vt") instead.
sorted_pts = sort(sort(pts, by = "x"), by = "y");
assert(has(sorted_pts, [2, -10]));
assert(!has(sorted_pts, [0, 0]));