# Is this the best way to do what I want?

11 messages
Open this post in threaded view
|

## Is this the best way to do what I want?

 I had need to basically slice apart my frame that I was making.I wanted to create as much surface area as possible for the pvc glue to take hold.So Instead of just creating 2 cubes to glue together I made a set of dovetail cubes.I figured that any way that gets the job done is a good way (like any landing you walk away from is a good landing sort of thing).But, since I have not been doing this too long. And am only part time at it, I would ask if there was a better way I could have done what I did, or would most people have done something similar?Anyway, here is the code:// dovetail cubes: a male that fits into a female // in the following two modules://   w = width of cubes//   l = the length of the cubes//   t = the thicknessmodule malecube(w=4, l=5, t=1) {translate([0,0,-l/2]) cube([t,w,l], center=true);translate([-t*0.5,w/2,0]) rotate([90,0,0]) linear_extrude(height=w)   polygon(    points=[[0,0],[t*0.5,t*0.5],[t,0]]  );}module femalecube(w=4, l=5, t=1) {    difference() {        cube([t,w,l], center=true);        translate([-t/2,w/2+0.1,-l/2-0.01])           rotate([90,0,0]) linear_extrude(height=w+0.2)             polygon(              points=[[0,0],[t*0.5,t*0.5],[t,0]]            );    }}// tests://translate([0,0,0]) femalecube(14, 14, 6);//translate([0,0,-15]) malecube(14, 10, 6);--Extra Ham Operator: K7AZJRegistered Linux User: 275424Raspberry Pi and Arduino developer The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".- Isaac. AsimovIf you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime. - AnonymousIf writing good code requires very little comments, then writing really excellent code requires no comments at all!- Ken Thompson _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Is this the best way to do what I want?

 Looks OK to me - lots of ways to skin a cat (what an awful expression!) with Openscad. I'd be tempted to remove redundancy by defining the female in terms of the male e.g module femalecube(w,l,t) {  difference() {     translate([0,0,l/2]) cube([t,w,l],center=true);     malecube(w,l,t);   } }
Open this post in threaded view
|

## Re: Is this the best way to do what I want?

Open this post in threaded view
|

## Re: Is this the best way to do what I want?

 In reply to this post by jdawgaz jdawgaz wrote I had need to basically slice apart my frame that I was making. I wanted to create as much surface area as possible for the pvc glue to take hold. If the objective is to increase contact surface, a tongue-and-groove joint might be better: This belongs to the edge-to-edge joint category. If interested in all kinds of possible joints, check out this book (online): good_wood_joints. The cover page of the book shows what's usually called a dovetail joint in woodworking. \$ Runsun Pan, PhD \$ libs: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); \$ Tips; \$ Snippets
Open this post in threaded view
|

## Re: Is this the best way to do what I want?

Open this post in threaded view
|

## Re: Is this the best way to do what I want?

 In reply to this post by jdawgaz Remember you may need a little bit of clearance, so they will slide together without forcing out all of the glue. Larry
Open this post in threaded view
|

## Re: Is this the best way to do what I want?

Open this post in threaded view
|

## Re: Is this the best way to do what I want?

 Tongue and groove is a joint intended to not-be-glued, as it makes for  poor joint strength in tensile loading across the joint, but good strength without glueing transverse to the tongue. Wood joints have in the past been developed with the properties of hide glue in mind, and that means a very brittle joint that cracks easily along the joint line. Luthiers use this brittleness on purpose; when they need to open e.g. a violin for repairs, a slight hit with a hammer on a glue line will separate  the top plate from the carcass without damaging the wood, try that with a more modern glue such as PVA (white glue). Since the PVC glueyou want to use is rather brittle when dry, and because it shrinks while the solvent evaporates, a tongue-and-groove joint with play between tongue and groove would be a weak joint as it is susceptible to impact failure. If you can, use a tapered joint, such as this:and clamp firmly until the glue has set. There is no need to slavishly follow this design, all that is needed is that the long sides of the taper are 5-10 times the dimension of the short side to make a joint at least as strong as the base material. I have built masts that way for wooden sailing boats. The example picture is from a commercial wood joint, where knot-free wood has been created by cutting out the knots, and jointing the remainder with minimum loss of material.
Open this post in threaded view
|

## Re: Is this the best way to do what I want?

 Hi wolf, very helpful tips. Do you have a blog ? \$ Runsun Pan, PhD \$ libs: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); \$ Tips; \$ Snippets