mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-02 00:30:43 +02:00
Added corner_edges()
This commit is contained in:
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
|
||||||
|
Reference in New Issue
Block a user