discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

dovetail.scad usage

RT
Richard Thomas
Wed, Nov 20, 2024 5:48 PM

Hi,

I am trying to use the module
https://github.com/hugokernel/OpenSCAD_Dovetail/blob/master/dovetail.scad

I have written two modules part1 and part2, which I was hoping would be 2
parts that have been cut using dovetail somewhere down the vertical part of
the square tube.

It hasn't come out like I wanted.

Does anybody have any idea why it's not worked or can give me any kind of
advice please?

Thanks,

Richard.

Hi, I am trying to use the module https://github.com/hugokernel/OpenSCAD_Dovetail/blob/master/dovetail.scad I have written two modules part1 and part2, which I was hoping would be 2 parts that have been cut using dovetail somewhere down the vertical part of the square tube. It hasn't come out like I wanted. Does anybody have any idea why it's not worked or can give me any kind of advice please? Thanks, Richard.
JB
Jordan Brown
Wed, Nov 20, 2024 6:21 PM

On 11/20/2024 9:48 AM, Richard Thomas via Discuss wrote:

I am trying to use the
module https://github.com/hugokernel/OpenSCAD_Dovetail/blob/master/dovetail.scad

I have written two modules part1 and part2, which I was hoping would
be 2 parts that have been cut using dovetail somewhere down the
vertical part of the square tube.

It hasn't come out like I wanted.

Does anybody have any idea why it's not worked or can give me any kind
of advice please?

And how are you calling it?

Does your program look something like the example given at
https://github.com/hugokernel/OpenSCAD_Dovetail/tree/master
?

On 11/20/2024 9:48 AM, Richard Thomas via Discuss wrote: > I am trying to use the > module https://github.com/hugokernel/OpenSCAD_Dovetail/blob/master/dovetail.scad > > I have written two modules part1 and part2, which I was hoping would > be 2 parts that have been cut using dovetail somewhere down the > vertical part of the square tube. > > It hasn't come out like I wanted. > > Does anybody have any idea why it's not worked or can give me any kind > of advice please? And how are you calling it? Does your program look something like the example given at https://github.com/hugokernel/OpenSCAD_Dovetail/tree/master ?
RT
Richard Thomas
Wed, Nov 20, 2024 8:19 PM

Hi,

Yes, I'm calling it like in that example.  I hoped my attachment of my scad
file came through.

Here's an extract of my code:

// Extract the first part...
module part1() {

intersection() {
whole_model();
cutter(position=[0, 0, 0], dimension=dimension, teeths=teeth,
male=false);
}

}

// ... and the second part
module part2() {

intersection() {
whole_model();
cutter(position=[0, 0, 0], dimension=dimension, teeths=teeth,
male=true);
}

}

part1();
part2();

Any ideas?

Thanks,

Richard.

On Wed, 20 Nov 2024 at 18:21, Jordan Brown openscad@jordan.maileater.net
wrote:

On 11/20/2024 9:48 AM, Richard Thomas via Discuss wrote:

I am trying to use the module
https://github.com/hugokernel/OpenSCAD_Dovetail/blob/master/dovetail.scad

I have written two modules part1 and part2, which I was hoping would be 2
parts that have been cut using dovetail somewhere down the vertical part of
the square tube.

It hasn't come out like I wanted.

Does anybody have any idea why it's not worked or can give me any kind of
advice please?

And how are you calling it?

Does your program look something like the example given at
https://github.com/hugokernel/OpenSCAD_Dovetail/tree/master
?

Hi, Yes, I'm calling it like in that example. I hoped my attachment of my scad file came through. Here's an extract of my code: // Extract the first part... module part1() { intersection() { whole_model(); cutter(position=[0, 0, 0], dimension=dimension, teeths=teeth, male=false); } } // ... and the second part module part2() { intersection() { whole_model(); cutter(position=[0, 0, 0], dimension=dimension, teeths=teeth, male=true); } } part1(); part2(); Any ideas? Thanks, Richard. On Wed, 20 Nov 2024 at 18:21, Jordan Brown <openscad@jordan.maileater.net> wrote: > On 11/20/2024 9:48 AM, Richard Thomas via Discuss wrote: > > I am trying to use the module > https://github.com/hugokernel/OpenSCAD_Dovetail/blob/master/dovetail.scad > > I have written two modules part1 and part2, which I was hoping would be 2 > parts that have been cut using dovetail somewhere down the vertical part of > the square tube. > > It hasn't come out like I wanted. > > Does anybody have any idea why it's not worked or can give me any kind of > advice please? > > > And how are you calling it? > > Does your program look something like the example given at > https://github.com/hugokernel/OpenSCAD_Dovetail/tree/master > ? >
JB
Jordan Brown
Thu, Nov 21, 2024 1:04 AM

I missed the attachment, sorry.

TL;DR:  put # in front of each cutter() invocation, and then look
carefully at the top of the transparent pink cutter.

First, I suggest that you carefully examine your base model.  It has a
bunch of Z-fighting in the funnel section that makes it unclear what's
really going on, but when you render it it looks like one side is
totally open.  Then the bottom of the funnel appears to be blocked.  (Or
is it just a shovel, not a funnel?)

Then... remember how you're asking it to cut.  You're going to end up
with a cut line roughly along the YZ plane, the X=0 plane, with the +Y
stuff in one part and the -Y stuff in the other part.  But look at your
model - it has almost nothing in -Y.  I suspect that you really want to
rotate the model 90° around X before cutting.

Next, put # in front of one of the cutter() invocations, and look
carefully at the shape it makes.

This is just part2(), with # in front of the cutter() call:

See those skinny triangular-ish shapes?  Those are dovetails.  But
there's only one tooth, and it's very wide and very shallow.

// Finally, setup the dovetail:
// - Teeth count
// - Teeth height
// - Teeth Clearance
teeth = [1, 8, 0];

Yep, one tooth, 8 units tall, and 250 units wide in X.  Something funky
is going on with those teeth, probably caused by the various ratios.

Let's flop the model on its back and try some different dovetail parameters.

In both part1() and part2():

    rotate([-90,0,0]) whole_model();

That requires rotating the bounding box too:

dimension = [250, 600, 150];

You kind of have to have the bounding box that big, so that the funnel
is inside of it, but it means that to get a reasonable tooth size you
have to have a lot more teeth.

teeth = [5, 8, 0];

Looking from +Z, orthogonal:

Hey, getting close.

Let's look at the two resulting parts, zoomed in on the joint, from +Z
in orthogonal mode...

Looking plausible.  I would be happier if the dovetail tooth was
narrower, but I don't immediately see a way to do that using this library.

You have it set for zero clearance.  Mathematically correct, but your
printer has slop; if you have zero clearance you'll never get the parts
together.  Experiment, but my guess is that you want about 0.1mm or
0.2mm.  The library's example is 0.5mm; that seems like more than
necessary.  You want a tight fit, especially on something like this
that's thin.

Actually printing this is not going to be fun, because those teeth are
going to be all overhang, not even bridges.  Unless you really intended
that funnel to be open on one side, it's not going to be fun in this
orientation.  The tube is better; 40mm is for me a long ways to bridge,
but not completely implausible.

You could print it vertically, and rotate the cutter so that it cuts
along the XY, Z=0 plane.  That might make it easier to print.

What I would probably do, though, is to take some design hints from
plastic rain downspouts.  Design in a couple of segments, printed
vertically (to avoid bridging).  Print the bottom part, with the angled
tube, upside-down so that the angled part is an overhang, but not an
awful one. Have the lower segments widen out a little at the top so that
the upper segments nest inside them.  (Not the other way 'round, if you
might handle water; you want the water to fall past the joint before it
has a chance to sneak through it.)  That gets you lots of surface to
glue, and may make it a support-free print.  I'm not sure what the
"resting block" is for; you might want to design so that it is at the
(as-printed) bottom of one segment or another, to avoid needing to
support it.

I hope that moves you along...

I missed the attachment, sorry. TL;DR:  put # in front of each cutter() invocation, and then look carefully at the top of the transparent pink cutter. First, I suggest that you carefully examine your base model.  It has a bunch of Z-fighting in the funnel section that makes it unclear what's really going on, but when you render it it looks like one side is totally open.  Then the bottom of the funnel appears to be blocked.  (Or is it just a shovel, not a funnel?) Then... remember how you're asking it to cut.  You're going to end up with a cut line roughly along the YZ plane, the X=0 plane, with the +Y stuff in one part and the -Y stuff in the other part.  But look at your model - it has almost nothing in -Y.  I suspect that you really want to rotate the model 90° around X before cutting. Next, put # in front of one of the cutter() invocations, and look carefully at the shape it makes. This is just part2(), with # in front of the cutter() call: See those skinny triangular-ish shapes?  Those are dovetails.  But there's only one tooth, and it's very wide and very shallow. // Finally, setup the dovetail: // - Teeth count // - Teeth height // - Teeth Clearance teeth = [1, 8, 0]; Yep, one tooth, 8 units tall, and 250 units wide in X.  Something funky is going on with those teeth, probably caused by the various ratios. Let's flop the model on its back and try some different dovetail parameters. In both part1() and part2():     rotate([-90,0,0]) whole_model(); That requires rotating the bounding box too: dimension = [250, 600, 150]; You kind of have to have the bounding box that big, so that the funnel is inside of it, but it means that to get a reasonable tooth size you have to have a lot more teeth. teeth = [5, 8, 0]; Looking from +Z, orthogonal: Hey, getting close. Let's look at the two resulting parts, zoomed in on the joint, from +Z in orthogonal mode... Looking plausible.  I would be happier if the dovetail tooth was narrower, but I don't immediately see a way to do that using this library. You have it set for zero clearance.  Mathematically correct, but your printer has slop; if you have zero clearance you'll never get the parts together.  Experiment, but my guess is that you want about 0.1mm or 0.2mm.  The library's example is 0.5mm; that seems like more than necessary.  You want a tight fit, especially on something like this that's thin. Actually *printing* this is not going to be fun, because those teeth are going to be all overhang, not even bridges.  Unless you really intended that funnel to be open on one side, it's not going to be fun in this orientation.  The tube is better; 40mm is for me a long ways to bridge, but not completely implausible. You could print it vertically, and rotate the cutter so that it cuts along the XY, Z=0 plane.  That might make it easier to print. What I would probably do, though, is to take some design hints from plastic rain downspouts.  Design in a couple of segments, printed vertically (to avoid bridging).  Print the bottom part, with the angled tube, upside-down so that the angled part is an overhang, but not an awful one. Have the lower segments widen out a little at the top so that the upper segments nest inside them.  (Not the other way 'round, if you might handle water; you want the water to fall past the joint before it has a chance to sneak through it.)  That gets you lots of surface to glue, and may make it a support-free print.  I'm not sure what the "resting block" is for; you might want to design so that it is at the (as-printed) bottom of one segment or another, to avoid needing to support it. I hope that moves you along...