PDA

View Full Version : Spiral toolpath to machine a cone?



Voicecoil
26-02-2021, 12:23 AM
Anyone know of an easy way to generate a spiral toolpath to machine a smooth (upwards pointing) cone please? Trying to do it the obvious way (3D model > .stl file > CAM > G-code) isn't cool as the polygons in the .stl seem to result in lots of G01 instructions rather than cutting it in arcs/helical sections. If all else fails I'll have to write a spreadsheet to do it, but I fancy it could be a bit of a ball-ache.

Kitwn
26-02-2021, 12:51 AM
Anyone know of an easy way to generate a spiral toolpath to machine a smooth (upwards pointing) cone please? Trying to do it the obvious way (3D model > .stl file > CAM > G-code) isn't cool as the polygons in the .stl seem to result in lots of G01 instructions rather than cutting it in arcs/helical sections. If all else fails I'll have to write a spreadsheet to do it, but I fancy it could be a bit of a ball-ache.

I'm afraid I cannot help with an answer to the question, but thanks for planting the idea that you can use a spreadsheet to calculate G-code moves of mathematical shapes. One of those little snippets of wisdom that might be the solution to a problem somewhere in the future. I hope someone else can be slightly more useful.

Kit

Doddy
26-02-2021, 08:25 AM
I thought, "pah!, 'tis just your post-processor", and spent the last twenty minutes trying to pursuade Fusion with the UCCNC post to generate a cone - cannot persuade it to move away from G1's - thought there was a hope with the minimum-arc-length but nada.

I still think it's a post-processor issue, and I wouldn't use an stl export (the stl generates a point-mesh resulting in a tessellated object, so doesn't lend itself to arc processing)... but real life (work) interrupts what was otherwise an interesting problem :(

Voicecoil
26-02-2021, 12:20 PM
Yes, I would agree that the .stl transfer is a problem, however that (and .3ds, another polygon based format) seems to be all that my CAM will accept. Are there any affordable CAM packages out there that will import an IGS or .step and that have a UCCNC post I wonder?

Neale
26-02-2021, 12:50 PM
There's an element of "I wouldn't have started from there!" unfortunately.

As Doddy says, the STL model is built from a series of flat planes and the CAM will try to reproduce that. If the mesh is fine enough, it may be that CV mode in the motion controller will smooth these out, with a bit of tinkering with the motion controller parameters.

You cannot, mathematically, generate a spiral with G2/3 codes as the radius of the curve is changing continually. Best you can do is a series of close-spaced circles, gradually moving up the cone. That lets you use G2/3 commands. However, you do need a circular model with smooth curves to start with. Personally, I would use F360 for something like this but even then, it often generates many short G1 moves where you might expect curves - but the motion controller seems to smooth them out.

The free version of F360 will import .step, I believe.

Voicecoil
26-02-2021, 02:46 PM
I realise it's not possible to do a true spiral, however it strikes me that an approximation done with a number of arcs per turn is going to be less lines of code and/or smoother than a series of straight lines.

Neale
26-02-2021, 04:00 PM
My feeling is that G1 straight-line segment approximations will be fine but you need to start with a smooth curve model, not faceted as per STL, so the CAM process can sort out better approximations. Not sure why you seem a bit "anti" G1? I know it feels counter-intuitive but having done a fair bit now with F360 I find it often produces lots of g1s where you would expect curves, but the only downside seems to be file size. I've ended up with gcode files for quite small parts which have maybe 75K lines of code which are generated by the adaptive cutting strategies, but after my initial surprise, I now just shrug! In the days when machines read files from floppy disk, that would have been pushing the storage limits but these days, even a smallish memory stick holds 10000 times that so it just ain't a problem. As long as your motion control software/hardware can then do the constant-velocity stuff to smooth out the corners and with decent MC hardware this isn't rocket science.

Or just build your spreadsheet to generate one G2 per vertical step, and calculate away! I'm sure that that will work. But my IT background says that if a machine can do the work for me, then I'm not going to spend brain cycles doing it by hand...

Good luck either way.

m_c
26-02-2021, 10:33 PM
I was going to write what Neale has said.

Pretty much any semi-decent motion controller will now handle multiple G1s, but for optimum finish/speed, you may have to play with the motion planner settings to improve smoothing/blending between the G1s.

If you want to get an idea of the process behind corner smoothing, this Dynomotion page explains it quite nicely with examples - https://dynomotion.com/Help/KMotionCNC/TrajectoryPlanner.htm
Most motion/trajectory planners will have similar settings (although maybe not the low pass filter bit near the bottom of that page).

Kitwn
26-02-2021, 11:50 PM
Or just build your spreadsheet to generate one G2 per vertical step, and calculate away! I'm sure that that will work. But my IT background says that if a machine can do the work for me, then I'm not going to spend brain cycles doing it by hand...

Good luck either way.

I was pondering along these lines as well, a good excuse to swot up on exactly how G2 and G3 instructions work and whether Excel will export files delimited with cariage returns. The arc centres are all the same and the end points progress outward in symetrical straight lines so it should not be too dificult. If the angles match then using a V-bit will help smooth the edges but that would only be possible for very short cones with most V-bits.

You're not going into competition with OMLCNC are you? http://www.mycncuk.com/threads/14408-Advice-on-4th-Axis?p=123632#post123632

Kit

Voicecoil
26-02-2021, 11:54 PM
Not sure why you seem a bit "anti" G1? I know it feels counter-intuitive but having done a fair bit now with F360 I find it often produces lots of g1s where you would expect curves, but the only downside seems to be file size.
Partly because it's counter intuitive (I like neat stuff!) and partly through prior jerky machining experiences. Also currently I have no way of generating it in CAM, F360 is out for me due to slow rural internet, OS and besides this is a work job. I will however research what UCCNC has in the way of smoothing for future reference.

Voicecoil
27-02-2021, 10:26 AM
You're not going into competition with OMLCNC are you? http://www.mycncuk.com/threads/14408-Advice-on-4th-Axis?p=123632#post123632

No :-) my cones are only going to be 2...3cm tall and made of 7075 ali :beer:

Kit

OMLCNC
27-02-2021, 11:55 AM
I'm watching this thread with interest (obviously not understanding it fully) but if you can sort it out, it would be of great for cone lamps.
The lengths of lamp are 150mm, 300mm 500mm. I also do standard lamps at 1500mm length but that would be a complete new machine for that project.
I have played with Fusion 360 but Vetric Aspire gives the best results so far but by modelling.
29611

Voicecoil
28-02-2021, 08:38 PM
I was pondering along these lines as well, a good excuse to swot up on exactly how G2 and G3 instructions work and whether Excel will export files delimited with cariage returns. The arc centres are all the same and the end points progress outward in symetrical straight lines so it should not be too dificult. If the angles match then using a V-bit will help smooth the edges but that would only be possible for very short cones with most V-bits.

Kit

Did a bit more thinking about this and to get a smooth toolpath the arc centres aren't the same, you need to offset them ever so slightly to get the arc ends to join up and get the best approximation - as Neale pointed out, on a true spiral the radius is continually increasing, hence if you divide the circumference into a small-ish number of sections with the same centre there would be a slight bump in-between sections. In the end for prototyping I took the crude but simple approach, slicing the model to create a number of 2D toolpaths which I outputted together. Wasn't as much work as I thought thanks to the speediness of Generic CADD (actually took less time than I'd spent playing around with the maths of an elegant solution!), and has ended up greatly reducing the machining time as I've been able to include the flutes which I was going to cut into the cone as a separate operation. The 303 stainless cuts nicely on my little machine using blue-nano coated cutters, only running at 800mm/min at the mo but from the noise it feels like it could go a fair bit faster - but I'll leave pushing the limits until the development work is done!

Voicecoil
28-02-2021, 08:43 PM
I'm watching this thread with interest (obviously not understanding it fully) but if you can sort it out, it would be of great for cone lamps.
The lengths of lamp are 150mm, 300mm 500mm. I also do standard lamps at 1500mm length but that would be a complete new machine for that project.
I have played with Fusion 360 but Vetric Aspire gives the best results so far but by modelling.
29611

Mmmm, how are you machining your cones? From the height of your product I would have thought a horizontal/4th axis approach would work better than the vertical machining I'm doing - mine are only either 24 or 34mm tall. For even the 150mm high version you would need something like a 175mm cutter which is going to be neither particularly rigid or cheap I would guess.

Kitwn
28-02-2021, 11:16 PM
Did a bit more thinking about this and to get a smooth toolpath the arc centres aren't the same, you need to offset them ever so slightly to get the arc ends to join up and get the best approximation - as Neale pointed out, on a true spiral the radius is continually increasing, hence if you divide the circumference into a small-ish number of sections with the same centre there would be a slight bump in-between sections. In the end for prototyping I took the crude but simple approach, slicing the model to create a number of 2D toolpaths which I outputted together. Wasn't as much work as I thought thanks to the speediness of Generic CADD (actually took less time than I'd spent playing around with the maths of an elegant solution!), and has ended up greatly reducing the machining time as I've been able to include the flutes which I was going to cut into the cone as a separate operation. The 303 stainless cuts nicely on my little machine using blue-nano coated cutters, only running at 800mm/min at the mo but from the noise it feels like it could go a fair bit faster - but I'll leave pushing the limits until the development work is done!

I was thinking in terms of a series of 2D cuts rather than a true spiral. The maths would be a lot simpler, though I can see the desire for the best surface finish straight off the machine when you're cutting stainless. Not quite as easy to sand afterwards as hardwood!

Kit

OMLCNC
01-03-2021, 06:25 AM
Mmmm, how are you machining your cones? From the height of your product I would have thought a horizontal/4th axis approach would work better than the vertical machining I'm doing - mine are only either 24 or 34mm tall. For even the 150mm high version you would need something like a 175mm cutter which is going to be neither particularly rigid or cheap I would guess.

You are quite correct, I am working on a 4th Axis at the moment for my machine.
What I actually want to achieve is a cone with a slight twist, about half a turn over the length, but with the number of thread starts (flutes) converging to the top (small dia of cone) and fading outto a plane cone.
Hard to describe, but similar to a piece of cloth being wrung out when wet.

Probably should start a separate thread for this when I've got the 4th Axis on the machine working and just watch this thread