mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-14 10:44:48 +02:00
use x, y attrs
This commit is contained in:
@@ -4,7 +4,7 @@ use <experimental/convex_centroid.scad>;
|
|||||||
function convex_ct_clk_order(points) =
|
function convex_ct_clk_order(points) =
|
||||||
let(
|
let(
|
||||||
cpt = convex_centroid(points),
|
cpt = convex_centroid(points),
|
||||||
pts_as = [for(p = points) [p, atan2(p[1] - cpt[1], p[0] - cpt[0])]],
|
pts_as = [for(p = points) [p, atan2(p.y - cpt.y, p.x - cpt.x)]],
|
||||||
sorted = sort(pts_as, by = "idx", idx = 1)
|
sorted = sort(pts_as, by = "idx", idx = 1)
|
||||||
)
|
)
|
||||||
[for(v = sorted) v[0]];
|
[for(v = sorted) v[0]];
|
Reference in New Issue
Block a user