This commit is contained in:
Adrian Mariano 2021-09-17 20:53:52 -04:00
parent 67af8c01c9
commit 703c2693a4

View file

@ -111,12 +111,12 @@ EDGE_OFFSETS = [
/// Internal Function: _is_edge_array() /// Internal Function: _is_edge_array()
/// Topics: Edges, Type Checking /// Topics: Edges, Type Checking
// Usage: /// Usage:
// bool = _is_edge_array(x); /// bool = _is_edge_array(x);
// Description: /// Description:
// Returns true if the given value has the form of an edge array. /// Returns true if the given value has the form of an edge array.
/// Arguments: /// Arguments:
// x = The item to check the type of. /// x = The item to check the type of.
/// See Also: edges(), EDGES_NONE, EDGES_ALL /// See Also: edges(), EDGES_NONE, EDGES_ALL
function _is_edge_array(x) = is_list(x) && is_vector(x[0]) && len(x)==3 && len(x[0])==4; function _is_edge_array(x) = is_list(x) && is_vector(x[0]) && len(x)==3 && len(x[0])==4;
@ -508,25 +508,25 @@ function corners(v, except=[]) =
/// Internal Function: _corner_edges() /// Internal Function: _corner_edges()
/// Topics: Corners /// Topics: Corners
// Description: /// Description:
// Returns [XCOUNT,YCOUNT,ZCOUNT] where each is the count of edges aligned with that /// 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. /// axis that are in the edge set and touch the given corner.
// Arguments: /// Arguments:
// edges = Standard edges array. /// edges = Standard edges array.
// v = Vector pointing to the corner to count edge intersections at. /// v = Vector pointing to the corner to count edge intersections at.
// See Also: CORNERS_NONE, CORNERS_ALL, corners() /// See Also: CORNERS_NONE, CORNERS_ALL, corners()
function _corner_edges(edges, v) = 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]]; 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]];
/// InternalFunction: _corner_edge_count() /// InternalFunction: _corner_edge_count()
/// Topics: Corners /// Topics: Corners
// Description: /// Description:
// Counts how many given edges intersect at a specific corner. /// Counts how many given edges intersect at a specific corner.
// Arguments: /// Arguments:
// edges = Standard edges array. /// edges = Standard edges array.
// v = Vector pointing to the corner to count edge intersections at. /// v = Vector pointing to the corner to count edge intersections at.
// See Also: CORNERS_NONE, CORNERS_ALL, corners() /// See Also: CORNERS_NONE, CORNERS_ALL, corners()
function _corner_edge_count(edges, v) = function _corner_edge_count(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]; 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];