Replace most trivial uses of slice() with faster list_head() and list_tail()

This commit is contained in:
Garth Minette
2021-03-25 00:23:36 -07:00
parent e9e3616861
commit d7cb503ffc
10 changed files with 112 additions and 51 deletions

View File

@@ -413,7 +413,7 @@ function _rounding_offsets(edgespec,z_dir=1) =
assert(argsOK,str("Invalid specification with type ",edgetype))
let(
offsets =
edgetype == "profile"? scale([-1,z_dir], p=slice(points,1,-1)) :
edgetype == "profile"? scale([-1,z_dir], p=list_tail(points)) :
edgetype == "chamfer"? chamf_width==0 && chamf_height==0? [] : [[-chamf_width,z_dir*abs(chamf_height)]] :
edgetype == "teardrop"? (
radius==0? [] : concat(