mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-16 22:33:57 +02:00
Rename to entry_slot_length and add get_slop() to it
Should have always had get_slop().
This commit is contained in:
18
joiners.scad
18
joiners.scad
@@ -559,7 +559,7 @@ module joiner(l=40, w=10, base=10, ang=30, screwsize, anchor=CENTER, spin=0, ori
|
||||
// See Also: joiner(), snap_pin(), rabbit_clip(), partition(), partition_mask(), partition_cut_mask()
|
||||
//
|
||||
// Usage:
|
||||
// dovetail(gender, w=|width, h=|height, slide|thickness=, [slope=|angle=], [taper=|back_width=], [chamfer=], [r=|radius=], [round=], [extra=], [escapement_length=], [$slop=])
|
||||
// dovetail(gender, w=|width, h=|height, slide|thickness=, [slope=|angle=], [taper=|back_width=], [chamfer=], [r=|radius=], [round=], [extra=], [entry_slot_length=], [$slop=])
|
||||
//
|
||||
// Description:
|
||||
// Produces a possibly tapered dovetail joint shape to attach to or subtract from two parts you wish to join together.
|
||||
@@ -570,8 +570,8 @@ module joiner(l=40, w=10, base=10, ang=30, screwsize, anchor=CENTER, spin=0, ori
|
||||
// in the positive Y direction. The gender determines whether the shape is meant to be added to your model or
|
||||
// differenced, and it also changes the anchor and orientation. The default anchor for dovetails is BOTTOM;
|
||||
// the default orientation depends on the gender, with male dovetails oriented UP and female ones DOWN. For a male
|
||||
// untapered dovetail of length X to slide into a female dovetail, there must be at least X open space past the
|
||||
// end of the dovetail; setting escapement_length to X will add a mask sticking out X forward to provide it.
|
||||
// untapered dovetail of length X to slide into a female dovetail, there must be at least X free space past the
|
||||
// end of the dovetail; setting entry_slot_length to X will add a mask sticking out X forward to provide it.
|
||||
// .
|
||||
// The dovetails by default have extra extension of 0.01 for unions and differences.
|
||||
// You should ensure that attachment is done with overlap=0 to ensure
|
||||
@@ -593,7 +593,7 @@ module joiner(l=40, w=10, base=10, ang=30, screwsize, anchor=CENTER, spin=0, ori
|
||||
// round = true to round both corners of the dovetail and give it a puzzle piece look. Default: false.
|
||||
// $slop = Increase the width of socket by double this amount and depth by this amount to allow adjustment of the fit.
|
||||
// extra = amount of extra length and base extension added to dovetails for unions and differences. Default: 0.01
|
||||
// escapement_length = length of a mask of sufficient width and depth for a male dovetail to fit ahead of the female dovetail. Ignored when gender == "male".
|
||||
// entry_slot_length = length of a mask of sufficient width and depth for a male dovetail to fit ahead of the female dovetail. Ignored when gender == "male".
|
||||
// Example: Ordinary straight dovetail, male version (sticking up) and female version (below the xy plane)
|
||||
// dovetail("male", width=15, height=8, slide=30);
|
||||
// right(20) dovetail("female", width=15, height=8, slide=30);
|
||||
@@ -645,11 +645,11 @@ module joiner(l=40, w=10, base=10, ang=30, screwsize, anchor=CENTER, spin=0, ori
|
||||
// diff("remove")
|
||||
// cuboid([50,30,10])
|
||||
// tag("remove")position(TOP+BACK) xcopies(10,5) dovetail("female", slide=10, width=7, taper=4, height=4, anchor=BOTTOM+FRONT,spin=180);
|
||||
// Example: Housed sliding dovetail (similar to okuri ari). If the left piece is rotated 90 degrees clockwise, it can be inserted downward with the male dovetail entering the escapement, then slid backward, making a 40x40x20 cuboid with no visible connectors. In this case, the opening is made slightly longer than the male dovetail (17 vs 15) so it's easier to assemble.
|
||||
// Example: Housed sliding dovetail (similar to okuri ari). If the left piece is rotated 90 degrees clockwise, it can be inserted downward with the male dovetail entering the entry slot, then slid backward, making a 40x40x20 cuboid with no visible connectors. In this case, the opening is made slightly longer than the male dovetail (17 vs 15) so it's easier to assemble.
|
||||
// left(30) cuboid([10,40,40]) attach(RIGHT,BOT,align=BACK,spin=90,inset=5) dovetail("male", slide=15, width=20, height=8, slope=2);
|
||||
// right(30) diff() cuboid([40,40,10]) attach(TOP,BOT,align=BACK,inside=true,inset=5) tag("remove") dovetail("female", slide=15, width=20, height=8, slope=2, escapement_length=17);
|
||||
function dovetail(gender, width, height, slide, h, w, angle, slope, thickness, taper, back_width, chamfer, extra=0.01, escapement_length=0, r, radius, round=false, anchor=BOTTOM, spin=0, orient) = no_function("dovetail");
|
||||
module dovetail(gender, width, height, slide, h, w, angle, slope, thickness, taper, back_width, chamfer, extra=0.01, escapement_length=0, r, radius, round=false, anchor=BOTTOM, spin=0, orient)
|
||||
// right(30) diff() cuboid([40,40,10]) attach(TOP,BOT,align=BACK,inside=true,inset=5) tag("remove") dovetail("female", slide=15, width=20, height=8, slope=2, entry_slot_length=17);
|
||||
function dovetail(gender, width, height, slide, h, w, angle, slope, thickness, taper, back_width, chamfer, extra=0.01, entry_slot_length=0, r, radius, round=false, anchor=BOTTOM, spin=0, orient) = no_function("dovetail");
|
||||
module dovetail(gender, width, height, slide, h, w, angle, slope, thickness, taper, back_width, chamfer, extra=0.01, entry_slot_length=0, r, radius, round=false, anchor=BOTTOM, spin=0, orient)
|
||||
{
|
||||
radius = get_radius(r1=radius,r2=r);
|
||||
slide = one_defined([slide,thickness],"slide,thickness");
|
||||
@@ -738,7 +738,7 @@ module dovetail(gender, width, height, slide, h, w, angle, slope, thickness, tap
|
||||
reverse(concat(smallend_points, xflip(p=reverse(smallend_points))))
|
||||
],
|
||||
slices=0, convexity=4
|
||||
) if(escapement_length>0 && gender=="female") align(FWD,TOP) cuboid([width-2*extra_offset,escapement_length,height]);
|
||||
) if(entry_slot_length>0 && gender=="female") align(FWD,TOP) cuboid([width-2*extra_offset,entry_slot_length+get_slop(),height]);
|
||||
}
|
||||
children();
|
||||
}
|
||||
|
Reference in New Issue
Block a user