mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
more dosgen appeasement
This commit is contained in:
parent
1eac96f762
commit
67af8c01c9
2 changed files with 11 additions and 7 deletions
12
edges.scad
12
edges.scad
|
@ -155,12 +155,12 @@ function _edge_set(v) =
|
|||
|
||||
/// Internal Function: _normalize_edges()
|
||||
/// Topics: Edges
|
||||
// Usage:
|
||||
// edges = _normalize_edges(v);
|
||||
// Description:
|
||||
// Normalizes all values in an edge array to be `1`, if it was originally greater than `0`,
|
||||
// or `0`, if it was originally less than or equal to `0`.
|
||||
// See Also: edges(), EDGES_NONE, EDGES_ALL
|
||||
/// Usage:
|
||||
/// edges = _normalize_edges(v);
|
||||
/// Description:
|
||||
/// Normalizes all values in an edge array to be `1`, if it was originally greater than `0`,
|
||||
/// or `0`, if it was originally less than or equal to `0`.
|
||||
/// See Also: edges(), EDGES_NONE, EDGES_ALL
|
||||
function _normalize_edges(v) = [for (ax=v) [for (edge=ax) edge>0? 1 : 0]];
|
||||
|
||||
|
||||
|
|
|
@ -1021,7 +1021,11 @@ function _path_cuts_dir(path, cuts, closed=false, eps=1e-2) =
|
|||
function path_cut(path,cutdist,closed) =
|
||||
is_num(cutdist) ? path_cut(path,[cutdist],closed) :
|
||||
assert(is_vector(cutdist))
|
||||
assert(last(cutdist)<path_length(path,closed=closed),"Cut distances must be smaller than the path length")
|
||||
|
||||
assert(last(cutdist)<path_length(path,closed=closed),
|
||||
approx(last(cutdist),path_length(path,closed=closed)) ?
|
||||
"Last cut distance is the full path: don't include the final end as a cut" :
|
||||
"Cut distances must be smaller than the path length")
|
||||
assert(cutdist[0]>0, "Cut distances must be strictly positive")
|
||||
let(
|
||||
cutlist = path_cut_points(path,cutdist,closed=closed),
|
||||
|
|
Loading…
Reference in a new issue