mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-01 13:50:33 +02:00
Make stroke() assert that path is 2D.
This commit is contained in:
@@ -33,6 +33,7 @@ module stroke(path, width=1, endcaps=true, close=false)
|
||||
{
|
||||
$fn = quantup(segs(width/2),4);
|
||||
path = close? concat(path,[path[0]]) : path;
|
||||
assert(is_list(path) && is_vector(path[0]) && len(path[0])==2, "path must be a 2D list of points.");
|
||||
segments = pair(path);
|
||||
segpairs = pair(segments);
|
||||
|
||||
|
Reference in New Issue
Block a user