diff --git a/src/voxel/vx_intersection.scad b/src/voxel/vx_intersection.scad index f89391e6..ef264881 100644 --- a/src/voxel/vx_intersection.scad +++ b/src/voxel/vx_intersection.scad @@ -8,14 +8,16 @@ * **/ -use <../util/sort.scad>; -use <../util/has.scad>; +use <../util/set/hashset.scad>; +use <../util/set/hashset_has.scad>; +use <../__comm__/_pt3_hash.scad>; function vx_intersection(points1, points2) = let( leng1 = len(points1), leng2 = len(points2), pts_pair = leng1 > leng2 ? [points1, points2] : [points2, points1], - sorted = sort(pts_pair[1], by = "vt") + hash = function(p) _pt3_hash(p), + sorted = hashset(pts_pair[1], hash = hash) ) - [for(p = pts_pair[0]) if(has(sorted, p, sorted = true)) p]; \ No newline at end of file + [for(p = pts_pair[0]) if(hashset_has(sorted, p, hash = hash)) p]; \ No newline at end of file