PDA

View Full Version : CAM for CNC code for cutting trispokedovetiles (3-spoke dovetailing tiles)



Peter Dow
06-12-2016, 08:35 PM
For Computer-Aided Manufacturing of trispokedovetiles, I've published a Javascript web-page -

Trispokedovetiles: CNC code to cut tiles web-page G-code generator [LINK] (http://scot.tk/trispokedovetiles/trispokedovetiles-CNC.htm)

- which generates Computer Numerical Control (CNC) code which I've tested with CNC Simulator Pro [LINK] (http://cncsimulator.info/) but not on a real CNC cutter as yet.

In case you are wondering what a "trispokedovetile" is, it is the name I have given to a class of 3-spoke dovetailing tiles which fit together like this.

19833

magicniner
06-12-2016, 09:51 PM
Then image says Hexagon 100%

The parameters ask for a mm input????

John S
06-12-2016, 10:01 PM
Mach 3 can't read the code.

magicniner
06-12-2016, 10:02 PM
I edited out the stuff that stuffs Mach3's interpreter and the path looks OK but if I use a cutter with a positive diameter then there will be gaps of cutter width between the tiles once assembled, so for a router to cut the tiles they would need to be arranged as densely on the material as possible but not in their assembled pattern.

- Nick

Peter Dow
06-12-2016, 11:19 PM
Then image says Hexagon 100%
My method for specifying a particular shape of trispokedovetile is to specify the "CIRCLE" length as a percentage of the "HEXAGON" length, as illustrated in this diagram.

This image shows trispokedovetiles with CIRCLE = 130% - in other words the length of the diameter of the (partially drawn) circles is 1.3 times the maximal diameter of the (partially drawn) hexagons.

19844


The parameters ask for a mm input????
Yes of course. My CAM webpage needs to know what actual sizes are intended to be cut to generate the correct CNC code.

So you type in what is the length in mm of the HEXAGON maximal diameter, what length will be equal to "100%"?

It's like if I tell you "the width of a rectangle is to be 100% and the length 130%".

Fine but before you can cut the rectangle from a sheet you need to know what length 100% is to be in mm.

Peter Dow
06-12-2016, 11:25 PM
Mach 3 can't read the code.


I edited out the stuff that stuffs Mach3's interpreter

Yes there's text in there which is needed for CNC Simulator Pro, which won't mean anything to a CNC machine and should be edited out.


#region
$Millimeters
$AddEmbeddedRegPart 9
$SetCuttingWidth 1.2
#endregion

But I include it in my webpage code generation in case anyone wants to test the code on CNC Simulator Pro, which is the only place I've been able to test it.

UPDATE: I've updated my webpage to include a yes/no "+ simulator commands" option which if set to "no" will automatically edit out the text intended for CNC Simulator Pro.

Peter Dow
06-12-2016, 11:43 PM
and the path looks OK but if I use a cutter with a positive diameter then there will be gaps of cutter width between the tiles once assembled, so for a router to cut the tiles they would need to be arranged as densely on the material as possible but not in their assembled pattern.

- Nick
Yes that makes sense.

So to aid cutting with a milling router bit I should add a new code generator option for "densely arranged" as opposed to "as assembled".

I have read that with laser cutting, the kerf width can be of the order of 0.5mm or even narrower, is that right?

So it might it be the case that for some cutting methods, such as laser cutting, if the kerf width is narrow enough, the code as is, would allow the tiles to be cut in their assembled pattern?

Such interlocking tiles probably require to be slightly smaller than the mathematical shape to allow for tolerances because if the tiles are in any way too big, they definitely won't assemble wheres being slightly too small may be necessary?

On the other hand, if cutting very small tiles, then a laser cut kerf width would become relatively bigger and perhaps then the undersized tiles would not interlock together, being too loose, meaning that once again, a "densely arranged" cutting option would be needed?

magicniner
06-12-2016, 11:50 PM
It's like if I tell you "the width of a rectangle is to be 100% and the length 130%".

Fine but before you can cut the rectangle from a sheet you need to know what length 100% is to be in mm.

Now you explain it it makes no sense at all.

What about needing a near zero tool diameter?

This code kind of works for a single tile,
================================================== ====
(CNC program to cut Trispokedovetiles by Peter Dow.)
(© Peter Dow. Caution - no warranty! Use at your discretion.)

(CIRCLE % = 118%)
(HEXAGON Length = 20 mm)
(Number of Rows = 1)
(Number of Tiles per row = 1)

(CNC Code BASIC)

G00 X6.34 Y90.00 (Fast traverse)
M22 (start cutting)
G4 P100 (dwell 100 milliseconds)
G01 X6.34 Y88.20 (Linear Feed Traverse)
G03 X16.56 Y94.10 I0.00 J11.80 (Arc interpolation)
G01 X15.00 Y95.00 (Linear Feed Traverse)
G01 X15.00 Y96.80 (Linear Feed Traverse)
G02 X25.22 Y90.90 I0.00 J-11.80 (Arc interpolation)
G01 X23.66 Y90.00 (Linear Feed Traverse)
G01 X22.10 Y90.90 (Linear Feed Traverse)
G03 X22.10 Y79.10 I10.22 J-5.90 (Arc interpolation)
G01 X23.66 Y80.00 (Linear Feed Traverse)
G01 X25.22 Y79.10 (Linear Feed Traverse)
G02 X15.00 Y73.20 I-10.22 J5.90 (Arc interpolation)
G01 X15.00 Y75.00 (Linear Feed Traverse)
G01 X16.56 Y75.90 (Linear Feed Traverse)
G03 X6.34 Y81.80 I-10.22 J-5.90 (Arc interpolation)
G01 X6.34 Y80.00 (Linear Feed Traverse)
G01 X4.78 Y79.10 (Linear Feed Traverse)
G02 X4.78 Y90.90 I10.22 J5.90 (Arc interpolation)
G01 X6.34 Y90.00 (Linear Feed Traverse)
M00 (Stop cutting)

G00 X0.00 Y100.00 (Fast traverse)
M30 (Program End)
=============================================

except that the inside corners will have the radius of the cutter so the square outside corners will not fit together with them.

EDIT- yes, probably good for a laser cutter which uses G-Code, but the paths will not work for rotary tool machines because square outside corners will not fit radius inside corners

Neale
06-12-2016, 11:52 PM
Does the package allow for rounding external corners to match the inevitable rounded internal corners?

It all reminds me of this (http://danceswithferrets.org/geekblog/?p=154), again based on deformed hexagons but with no symmetry (although in that case the guy took a very roundabout route to generate his gcode). Both designs are necessarily a bit wasteful as you cannot cut the interlocked figures and you just have to try to fit them on the material as best you can. I recreated this latter design from scratch to use for sets of coasters which will then interlock across a table-top. The design in this thread would work quite well for the same kinds of things.

Peter Dow
07-12-2016, 12:40 AM
What about needing a near zero tool diameter?
...
except that the inside corners will have the radius of the cutter so the square outside corners will not fit together with them.

EDIT- yes, probably good for a laser cutter which uses G-Code, but the paths will not work for rotary tool machines because square outside corners will not fit radius inside corners


Does the package allow for rounding external corners to match the inevitable rounded internal corners?

What you see on that webpage is all that I have at the moment.

It is what it is and if that is of aid to someone in manufacturing some things in some ways but not other things in other ways then that's OK with me because I am not offering any warranty with the software.

magicniner
07-12-2016, 03:16 PM
What you see on that webpage is all that I have at the moment.

It is what it is and if that is of aid to someone in manufacturing some things in some ways but not other things in other ways then that's OK with me because I am not offering any warranty with the software.

It should have gone in Laser Cutters, or possibly Plasma, as it's currently of no use to anything else.

If instead of a single flavour of G-Code with no consideration for the cutter being used it generated a drawing of a single tile there would be the option for using CAM to generate G-Code suitable for the user's machine rather than that suitable only for a laser/plasma which uses the generated flavour of G-Code.

It might make a nice decorative pattern for Diamond Drag Engraving the surface of a plate prior to cutting a part though.

Neale
09-12-2016, 07:00 PM
I thought that this was quite an interesting design, so I looked at recreating it with Fusion 360:
19941
I have attached the F360 model. I have used the F360 User Parameter feature to allow the user to tweak dimensions easily. Outer_circle_dia gives the diameter of the tile. Hex_spacing gives the centre-centre spacing of the hexagons that make up the underlying structure. Corner_rad gives the fillet radius on internal and matching external corners. Yes, I tried to fix the "sharp internal corner" problem.

Obviously, you can just go straight from design to gcode using F360 CAM and choose your own cutter diameters. You could, if you wanted, export a DXF version of the basic sketch. Note that because I was having serious problems in F360 in trying to draw one spoke and then use a circular pattern at sketch level, I actually extruded one spoke and then built up the tile using a circular pattern at the solid body level. This might make sense to someone with F360 experience, and if any of those people can point me at what was going wrong, please do so!
19942

magicniner
09-12-2016, 07:51 PM
Nice job Neale!

- Nick

Peter Dow
11-12-2016, 04:17 AM
HOLES!
Now cut trispokedovetiles by CNC laser cutter with (or without) HOLES! (http://scot.tk/trispokedovetiles/trispokedovetiles-CNC.htm)

19949

Peter Dow
11-12-2016, 04:24 AM
I thought that this was quite an interesting design, so I looked at recreating it with Fusion 360:
19941
I have attached the F360 model. I have used the F360 User Parameter feature to allow the user to tweak dimensions easily. Outer_circle_dia gives the diameter of the tile. Hex_spacing gives the centre-centre spacing of the hexagons that make up the underlying structure. Corner_rad gives the fillet radius on internal and matching external corners. Yes, I tried to fix the "sharp internal corner" problem.

Obviously, you can just go straight from design to gcode using F360 CAM and choose your own cutter diameters. You could, if you wanted, export a DXF version of the basic sketch. Note that because I was having serious problems in F360 in trying to draw one spoke and then use a circular pattern at sketch level, I actually extruded one spoke and then built up the tile using a circular pattern at the solid body level. This might make sense to someone with F360 experience, and if any of those people can point me at what was going wrong, please do so!
19942
Thank you for your interest Neale.

I downloaded Fusion 360 to investigate your drawing but I didn't see any convenient way to get the full variety of trispokedovetile shapes, as is illustrated by the animation on my webpage, where CIRCLE varies from 100% to 150% of HEXAGON.

Neale
11-12-2016, 09:38 AM
Thank you for your interest Neale.

I downloaded Fusion 360 to investigate your drawing but I didn't see any convenient way to get the full variety of trispokedovetile shapes, as is illustrated by the animation on my webpage, where CIRCLE varies from 100% to 150% of HEXAGON.

Peter - when I first looked at your drawing, I couldn't work out what you meant by circle and hexagon. I think that it was a bit like those optical illusions where you can see two different things depending on how you focus your eyes. Having now drawn it myself, I see it differently and I think I know what those value refer to, although I'm not sure whether HEXAGON refers to length of side of a hexagon or a hexagon's width between opposite faces, or half that value (radius of inscribed circle) - I think the latter. As a result, I think that I have chosen two different measures, although these are equivalent to yours in terms of changing these design proportions. The other point is that I have expressed both parameters as absolute dimensions rather than one dimension and a percentage of that one. However, you can still tweak either or both parameters to give a full range. It's also interesting to change the corner radius parameter as this changes the general appearance quite significantly.

EDIT - now had a look at the website. I had just been working from the embedded image in your post which was less clear at first sight. I see that HEXAGON refers to the hexagon's circumscribed circle. Make hex_spacing equal to outer_circle_dia in my drawing and you will get the same effect as circle=100% in yours; change hex_spacing for the range of shapes. Adding holes (making them hexagonal?) is clearly trivial in F360 so I shall leave this as an exercise for the reader, as my old maths textbook used to say. Assuming that I have any readers, which seems unlikely for anything as esoteric as this!

At the end of the day, though, this looked like an interesting vehicle to try out a couple of aspects of Fusion 360 that I had not had an excuse to play with before. I think it shows the power of a modern, parametric, CAD package to do things that were once the province of custom code - and it goes direct to gcode with full control of all cutting parameters as well. I'm a bit of an F360 fan but I don't want to take anything away from the originality of your initial design.

Peter Dow
11-12-2016, 12:08 PM
Peter - when I first looked at your drawing, I couldn't work out what you meant by circle and hexagon. I think that it was a bit like those optical illusions where you can see two different things depending on how you focus your eyes. Having now drawn it myself, I see it differently and I think I know what those value refer to, although I'm not sure whether HEXAGON refers to length of side of a hexagon or a hexagon's width between opposite faces, or half that value (radius of inscribed circle) - I think the latter.
Or maybe it is more like you didn't read my number 5 post carefully enough?


My method for specifying a particular shape of trispokedovetile is to specify the "CIRCLE" length as a percentage of the "HEXAGON" length, as illustrated in this diagram.

This image shows trispokedovetiles with CIRCLE = 130% - in other words the length of the diameter of the (partially drawn) circles is 1.3 times the maximal diameter of the (partially drawn) hexagons.

19844



As a result, I think that I have chosen two different measures, although these are equivalent to yours in terms of changing these design proportions. The other point is that I have expressed both parameters as absolute dimensions rather than one dimension and a percentage of that one. However, you can still tweak either or both parameters to give a full range. It's also interesting to change the corner radius parameter as this changes the general appearance quite significantly.

EDIT - now had a look at the website. I had just been working from the embedded image in your post which was less clear at first sight. I see that HEXAGON refers to the hexagon's circumscribed circle. Make hex_spacing equal to outer_circle_dia in my drawing and you will get the same effect as circle=100% in yours; change hex_spacing for the range of shapes. Adding holes (making them hexagonal?) is clearly trivial in F360 so I shall leave this as an exercise for the reader, as my old maths textbook used to say. Assuming that I have any readers, which seems unlikely for anything as esoteric as this!

At the end of the day, though, this looked like an interesting vehicle to try out a couple of aspects of Fusion 360 that I had not had an excuse to play with before. I think it shows the power of a modern, parametric, CAD package to do things that were once the province of custom code - and it goes direct to gcode with full control of all cutting parameters as well. I'm a bit of an F360 fan but I don't want to take anything away from the originality of your initial design.
I'd like to know how to use Fusion 360 in that way, if you care to explain Neale, please?

I couldn't see the parameters you mentioned - "hex_spacing" or "outer_circle_dia" - I didn't even know where to look for them.

I found the data object tree obviously enough and had fun clicking through it, finding something new each time.
19953

OK found the parameters on the pull-down "MODIFY" menu.

Still finding my way around this software package.

This was the result of changing one parameter - "Outer_circle_rad" from 65mm to 70mm.

19957

Hmm. Not quite what I hoped for.

Neale
11-12-2016, 02:10 PM
Hmm. Not quite what I hoped for.

Nope - not quite what I would have hoped for either!

I've just had a look at what might have happened here, starting with a freshly-downloaded copy of my design. I suspect that what you have shown is not the very first operation that you carried out, and that at some point you changed one of the parameters to something that F360 did not like. If you open a fresh copy of the file and just change Outer_circle_dia to 70, you should see the correct result. I tried changing Hex_spacing to something less than Outer_circle_dia (which the comment in the parameter table tells you not to do, but the comments field is typically off-screen and need the table to scroll sideways to read). This gave a silly shape, but because it modifies some aspects of the drawing, when you change it back the drawing does not go back to where it was. What you end up with is something similar to your picture. It seems to be to do with the way that the corner fillets are calculated. They are tied to the corresponding sides and arcs by tangent constraints which manage to flip through 180deg under some circumstances. It's a F360 feature, I think. The kind of artefact that comes from using a general-purpose tool for a very specific purpose when a special-purpose tool like yours can trap and defend against this kind of thing. There's an awful lot of power in F360; sometimes this is a good thing and sometimes it turns round and bites you in the bum. You get the same result if you try, for example, to set the Corner_rad to zero; this fouls up the related geometry in the drawing as an arc with zero radius upsets things. Make the value very small (I have tested it with Corner_rad = 0.001mm, for example) and all is fine. I guess that it's all to do with getting used to the way the package works.

I had been going to post directions to find the parameters table but I see that you found it first. Well done - it took me ages! You will see from your view of the basic sketch (in your previous post) that creates one spoke that every dimension is parameterised (is preceded by "Fx:", which indicates that the dimension was not typed in as a value but is calculated from something else) except angles which are invariant as they are part of the basic geometry. However, you could play with some of these angles (another parameter?) to create an underlying "skewed" hexagon, which might give interesting results...

I did read your post 5, which is where I found the diagram that was my starting point. However, as I said before, there was this optical illusion effect that meant that I just could not see the shapes that your dimensions referred to. Going back to the diagram having spent time studying the basic geometry meant that it made sense, as did your description. The problem was my eye/brain view of the diagram and starting from a different view of that, the words made no sense to me. Mea culpa.

Nice design, and I shall probably have a go at making it once my new router (designed in F360, of course!) is fully commissioned.

Peter Dow
11-12-2016, 03:07 PM
OK I got this by discovering that it doesn't like big changes in parameters at once, but little by little.

To get it to Outer_circle_rad 57mm, I had to step from 65 mm to 61 mm and only then to 57 mm.

19968

If I tried a bigger change directly from 65 mm to 60 mm the design went crazy.

19969

So it seems temperamental but with a bit of coaxing you can get it there.

Neale
11-12-2016, 04:05 PM
Absolutely right, Peter - I had not tried this particular dimension change (I had just fiddled with Hex_spacing to change the proportions). I've had a closer look, and what seems to be happening is that as you reduce that parameter, F360 starts to modify the drawing to suit. However, it can make these changes in a non-obvious order, and depending on how things have been set up, the intermediate stages while it is applying changes and recalculating dependent features get distorted. It tries to redraw the large arcs, for example, with the new parameter-based dimension, then puts the fillets back in. But at this point, it has not yet moved the other line to which the fillet connects, so it starts drawing the corner fillets in the wrong direction. Make smaller incremental changes, and it manages to get the thing right at each stage.

F360 is most definitely history line-based so things get applied in the order in which they were created. It might be possible to redraw this shape so that the ordering is better but as F360 does not display this level of detail in a sketch, it's very difficult to track back exactly what happened. And that sketch had quite a lot of add/delete/change operations, so it's anyone's guess what's actually behind it.

That has been a really instructive little episode and I shall remember this "feature" in case it comes up again! Just goes to show that you always need your work examined by a third party to find the errors you would not even have looked for yourself:beer:

I started this exercise as an excuse to play with F360 and I have learnt more than I expected.

needleworks
11-12-2016, 04:16 PM
After following this thread for a while and being completely baffled by the circle/hexagon thing, I then had a look at Neale`s fusion drawing, and decided to try cutting a few of these dovetails out. Although I have fusion 360, I still find it easier to work in solidworks so, I downloaded Neale`s fusion 3D drawing and exported it as a iges file. Then in solidworks I opened it up, seperated a single tile from the three, and saved it. After opening it back up as a single file I then shrunk it down to a maximum outer diameter of 48mm, (the width of the piece of scrap chopping board I had lying around was 50mm) and saved it as a dxf. I am now about to go out to the mill and try cutting a few out:nevreness:

If this works, I will take a couple of pics to let you see the results. Just to add, I cannot take any credit at all as I am using both Neale`s drawings, and Peters original input for this experiment. So, big thanks to you both as I think it is a very nice looking and unusual joint !

Neale
11-12-2016, 04:20 PM
It will be great to see an academic exercise turn into reality! Out of curiosity, what CAM package will you use to go from dxf to gcode?

needleworks
11-12-2016, 04:22 PM
It will be great to see an academic exercise turn into reality! Out of curiosity, what CAM package will you use to go from dxf to gcode?

I`ll be using cambam, just going to try it right now, back in 10 mins:encouragement:

needleworks
11-12-2016, 04:49 PM
Well that was quick & painless, seems to have worked a treat:peaceful:
19970

19971

19973

Thanks to Neale & Peter.

Neale
11-12-2016, 05:12 PM
Excellent. Good to see that it all works. I think that the corner radius was a good plan as it makes the design accessible to those with routers but not laser/plasma/water jet cutters (which probably means most of us) but thanks to Peter for the initial idea and doing the bulk of the leg work.

Needleworks - you need to make another 3 or 4 more. People see them sitting on a flat surface and can't help picking up a tile, turning it round, and dropping it back in somewhere else. At least, they do with my Escher reptile-based design, and I can't see why these shouldn't work as well.
19974

Peter Dow
11-12-2016, 05:44 PM
Well that was quick & painless, seems to have worked a treat:peaceful:
19970

19971

19973

Thanks to Neale & Peter.
Very nice! The first ever trispokedovetiles to make it off the drawing board into real life!
:biggrin: :pride:

Peter Dow
18-12-2016, 01:13 PM
TRISPOKEDOVETILES ROUTER CUTTING (http://scot.tk/trispokedovetiles/trispokedovetiles-CNC.htm)

My trispokedovetile CAD-CAM webpage now offers an (X,Y,Z) option for router cutting using rotary tool paths between spaced out tiles -
20025

I've simulated the CNC router code -
20026

magicniner
18-12-2016, 01:21 PM
Excellent!
It now merits the designation CAM ;-)

- Nick