mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-06 14:56:47 +02:00
refactor: use hashset
This commit is contained in:
@@ -8,9 +8,13 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
use <../util/sort.scad>;
|
use <../util/set/hashset.scad>;
|
||||||
use <../util/has.scad>;
|
use <../util/set/hashset_has.scad>;
|
||||||
|
use <../__comm__/_pt3_hash.scad>;
|
||||||
|
|
||||||
function vx_difference(points1, points2) =
|
function vx_difference(points1, points2) =
|
||||||
let(sorted = sort(points2, by = "vt"))
|
let(
|
||||||
[for(p = points1) if(!has(sorted, p, sorted = true)) p];
|
hash = function(p) _pt3_hash(p),
|
||||||
|
set = hashset(points2, hash = hash)
|
||||||
|
)
|
||||||
|
[for(p = points1) if(!hashset_has(set, p, hash = hash)) p];
|
Reference in New Issue
Block a user