Brought slice() in line with select() indexing, without wrapping. Replaced a lot of select() and slice() calls with last(), list_head(), and list_tail() calls.

This commit is contained in:
Garth Minette
2021-03-30 00:46:59 -07:00
parent cf58ee6f33
commit 0b17bf5930
24 changed files with 250 additions and 186 deletions

View File

@@ -968,7 +968,7 @@ module rabbit_clip(type, length, width, snap, thickness, depth, compression=0.1
);
assert(fullpath[4].y < fullpath[3].y, "Pin is too wide for its length");
snapmargin = -snap + select(sidepath,-1).x;// - compression;
snapmargin = -snap + last(sidepath).x;// - compression;
if (is_pin){
if (snapmargin<0) echo("WARNING: The snap is too large for the clip to squeeze to fit its socket")
echo(snapmargin=snapmargin);