dovetail() has too little slop

This commit is contained in:
Revar Desmera 2020-01-10 19:30:20 -08:00
parent 5ccf1e26bd
commit c6fc770008
2 changed files with 8 additions and 6 deletions

View file

@ -438,8 +438,13 @@ module joiner_quad(spacing1=undef, spacing2=undef, xspacing=undef, yspacing=unde
}
// Section: Dovetails
// Module: dovetail()
//
// Usage:
// dovetail(l|length, h|height, w|width, slope|angle, taper|width2, [chamfer], [r|radius], [round], [$slop])
//
// Description:
// Produces a possibly tapered dovetail joint shape to attach to or subtract from two parts you wish to join together.
// The tapered dovetail is particularly advantageous for long joints because the joint assembles without binding until
@ -448,9 +453,6 @@ module joiner_quad(spacing1=undef, spacing2=undef, xspacing=undef, yspacing=unde
// parallel to the X axis and projecting upwards, so in its default orientation it will slide together with a translation
// in the X direction.
//
// Usage:
// dovetail(l|length, h|height, w|width, slope|angle, taper|width2, chamfer, r|radius, round, anchor, orient, spin)
//
// Arguments:
// l / length = Length of the dovetail (amount the joint slides during assembly)
// h / height = Height of the dovetail
@ -534,8 +536,8 @@ module dovetail(gender, length, l, width, w, height, h, angle, slope, taper, wid
assert(count3<=1 || (radius==0 && chamfer==0), "Do not specify both chamfer and radius");
slope = is_def(slope) ? slope :
is_def(angle) ? 1/tan(angle) : 6;
width = gender == "male" ? w : w + $slop;
height = h + (gender == "female" ? $slop : 0);
width = gender == "male" ? w : w + 2*$slop;
height = h + (gender == "female" ? 2*$slop : 0);
front_offset = is_def(taper) ? extra * tan(taper) :
is_def(width2) ? extra * (width2-width)/length/2 : 0;

View file

@ -8,7 +8,7 @@
//////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,80];
BOSL_VERSION = [2,0,81];
// Section: BOSL Library Version Functions