mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-09-09 00:20:55 +02:00
Fix path_normals to handle 2d and better error message.
Improve error message for bogus endcaps to stroke() and running unit() on a zero vector
This commit is contained in:
@@ -108,7 +108,8 @@ module stroke(
|
||||
cap=="tail"? [[0,0], [w/2,l2], [w/2,l2-l], [0,-l], [-w/2,l2-l], [-w/2,l2]] :
|
||||
cap=="tail2"? [[w/2,0], [w/2,-l], [0,-l-l2], [-w/2,-l], [-w/2,0]] :
|
||||
is_path(cap)? cap :
|
||||
[]
|
||||
is_undef(cap)? [] :
|
||||
assert(false, str("Invalid endcap: ",cap))
|
||||
) * linewidth;
|
||||
|
||||
assert(is_bool(closed));
|
||||
|
Reference in New Issue
Block a user