Merge branch 'master' into revarbat_dev

This commit is contained in:
Revar Desmera 2021-02-20 22:49:57 -08:00 committed by GitHub
commit 6db9ec6f17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 14 deletions

View file

@ -701,6 +701,8 @@ function offset(
:
[for(i=[0:len(goodsegs)-1])
let(prevseg=select(goodsegs,i-1))
i==0 && !closed ? false // In open case first entry is bogus
:
(goodsegs[i][1]-goodsegs[i][0]) * (goodsegs[i][0]-sharpcorners[i]) > 0
&& (prevseg[1]-prevseg[0]) * (sharpcorners[i]-prevseg[1]) > 0
],

View file

@ -376,9 +376,11 @@ function _rounding_offsets(edgespec,z_dir=1) =
r = struct_val(edgespec,"r"),
cut = struct_val(edgespec,"cut"),
k = struct_val(edgespec,"k"),
radius = in_list(edgetype,["circle","teardrop"])?
(is_def(cut) ? cut/(sqrt(2)-1) : r) :
edgetype=="chamfer"? first_defined([sqrt(2)*cut,r]) : undef,
radius = in_list(edgetype,["circle","teardrop"])
? (is_def(cut) ? cut/(sqrt(2)-1) : r)
:edgetype=="chamfer"
? (is_def(cut) ? sqrt(2)*cut : r)
: undef,
chamf_angle = struct_val(edgespec, "angle"),
cheight = struct_val(edgespec, "chamfer_height"),
cwidth = struct_val(edgespec, "chamfer_width"),

View file

@ -310,7 +310,9 @@ function _screw_info_english(diam, threadcount, head, thread, drive) =
[2, [ 3, 1.5, undef, undef, undef]],
],
entry = struct_val(UTS_socket, diam),
hexdepth = is_def(entry[3]) ? entry[3] : if_def(diam) ? diam/2 : undef,
hexdepth = is_def(entry[3]) ? entry[3]
: is_def(diam) ? diam/2
: undef,
drive_size = drive=="hex" ? [["drive_size",inch*entry[1]], ["drive_depth",inch*hexdepth]] :
drive=="torx" ? [["drive_size",entry[2]],["drive_depth",inch*entry[4]]] : []
)

View file

@ -801,8 +801,7 @@ function associate_vertices(polygons, split, curpoly=0) =
curpoly==len(polygons)-1 ? polygons :
let(
polylen = len(polygons[curpoly]),
cursplit = force_list(split[curpoly]),
fdsa= echo(cursplit=cursplit)
cursplit = force_list(split[curpoly])
)
assert(len(split)==len(polygons)-1,str(split,"Split list length mismatch: it has length ", len(split)," but must have length ",len(polygons)-1))
assert(polylen<=len(polygons[curpoly+1]),str("Polygon ",curpoly," has more vertices than the next one."))

View file

@ -6,7 +6,7 @@
//////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,562];
BOSL_VERSION = [2,0,565];
// Section: BOSL Library Version Functions