Hi,
The dovetail was invented years ago, being a simple method of making a strong, interlocking joint in wood, using hand tools. In that situation, you are usually starting with two separate items to be joined. I expect, in 3d printing, you have one large item, that you need to split apart, so the parts fit into the printer. It is a different situation, using different materials, etc. There are better ways of doing that, and simpler methods of connecting plastic 3d printed parts.
However, I was not able to run your script, but I would suggest you add an adjustable tolerance/clearance factor if you want other users to be able to use it on other printers/materials. When you have the male part of the dovetail, use offset, to get a larger shape, and use that to generate the female part.
hth,
Best wishes,
Ray
--
You received this message because you are subscribed to the Google Groups "PythonSCAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pythonscad+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/70aed65c-8db7-403f-b5d7-fef4e93540dan%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You use tolerances as a parametric value. There are test prints, or simple enough to generate, for you to try with your printer. Then you use that as a default, but be prepared to vary it. No matter what you use, wood ground steel, titanium, concrete,you can never fit a rod into exactly the same diameter hole. In openscad, where that is tried, you sometimes get 'z-fighting'.
A stronger joint would be a mortice and tenon, with solvent adhesive or a peg through it. But, it depends on the shapes you are trying to join, and if it needs to be dismantled.
Here is a simple part solution, Parametric. The cylinders could be made into cones. Having multiple joints, instead of one large one, increases the surface area for adhesive, takes less length for the same interfacing length, etc. of course, instead of the cylinders, you could use dovetail shapes, but avoid sharp corners. (at a larger scale I'd fillet the sharp corners where the circles meet the slab).
############################################
from openscad import *
# circular lugs join
edge=50 #length of edge to be joined
leng= 30 # distance of overlap
num=5 # number of lugs
diam= edge/(num*2) #diameter of lugs
tol=0.2 # tolerance for fitting
th=10 # thickness of joint
dist= leng+(diam/4)
base= square([leng,edge])
fn=200
def lugs():
j = diam
all=[]
while j < edge:
all.append(
circle(d=diam).translate([leng + diam/3, j, 0])
)
j += diam * 2
return union(*all)
#lugs().show()
ma=union(base,lugs())
male=ma.linear_extrude(th)
male.show()
fe= ma.offset(tol)
#fe.show()
fe2= fe.linear_extrude(th+20)
female=
difference(base.right(leng).linear_extrude(th),fe2.down(10))
female.show()
##########################################################