mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Added corner_edges()
This commit is contained in:
parent
7d6fca27a6
commit
4f3baccec7
2 changed files with 11 additions and 1 deletions
10
edges.scad
10
edges.scad
|
@ -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:
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,422];
|
BOSL_VERSION = [2,0,423];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
|
Loading…
Reference in a new issue