1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-04-13 18:51:53 +02:00

performance improved

This commit is contained in:
Justin Lin 2021-09-07 15:59:11 +08:00
parent 657c10a9cc
commit 23ed306148

View File

@ -8,6 +8,13 @@
*
**/
use <../__comm__/_pt3_hash.scad>;
use <../util/dedup.scad>;
function vx_union(points1, points2) = dedup(concat(points1, points2));
function vx_union(points1, points2) =
let(
pts = concat(points1, points2),
number_of_buckets = ceil(sqrt(len(pts))),
hash = _pt3_hash(number_of_buckets)
)
dedup(pts, hash = hash, number_of_buckets = number_of_buckets);