Added corner_edges()

This commit is contained in:
Garth Minette 2020-09-22 00:21:12 -07:00
parent 7d6fca27a6
commit 4f3baccec7
2 changed files with 11 additions and 1 deletions

View file

@ -385,6 +385,16 @@ CORNER_OFFSETS = [ // Array of XYZ offsets to each corner.
]; ];
// Function: corner_edges()
// Description:
// Returns [XCOUNT,YCOUNT,ZCOUNT] where each is the count of edges aligned with that axis that are in the edge set and touch the given corner.
// Arguments:
// edges = Standard edges array.
// v = Vector pointing to the corner to count edge intersections at.
function corner_edges(edges, v) =
let(u = (v+[1,1,1])/2) [edges[0][u.y+u.z*2], edges[1][u.x+u.z*2], edges[2][u.x+u.y*2]];
// Function: corner_edge_count() // Function: corner_edge_count()
// Description: Counts how many given edges intersect at a specific corner. // Description: Counts how many given edges intersect at a specific corner.
// Arguments: // Arguments:

View file

@ -8,7 +8,7 @@
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,422]; BOSL_VERSION = [2,0,423];
// Section: BOSL Library Version Functions // Section: BOSL Library Version Functions