CNC Lathe and 4th-axis milling...

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: CNC Lathe and 4th-axis milling...

Post by JoshM »

So, I think I'm starting to get somewhere with this. There's still a bunch to do, but I thought I'd show what I'm working on...

4th Axis is a special--and simpler--case, where the work can be constrained to repeated cuts along the X-axis, while looping through the A-axis rotation.

More generally, 3d surfacing should provide XY and Z motion, while respecting the geometry of the Base-Model, and the Tool. Moreover, unlike OCL, which--as integrated into FC--the entire Base-Model is the input, and finish passes are generated, without apparent control for step-over, step-down, or avoidance of fixtures, etc... I believe better utility will be achieved by bounding select operations, consistent with FC-Path 2.5d milling.

So far, I have implemented geometry tool-path generation for Ballnose, Square Endmill, and Rounded-Edge mills. Most other mills are special cases. You would not typically use a chamfer mill or a corner rounding mill, or dovetail mill except to operate on specific areas.

The paths I am generating are still along the X-axis, but I will move towards more meaningful tool paths as I go further.

I am posting an images of processing an example 3d shape--not 4th-axis--that I have configured for a Ball-nose mill, with 1mm Y-axis steps, from -53mm to +53mm, on a +/-50mm Y object. Shown in the 2nd image, are Draft-Path-Arrays for each generated Path where the common-volume intersection with the Base-Model have been calculated. Process time was 120 seconds. 95% of the time used is in the collision detection.

For contrast, I show the same object processed with a 9.525mm square-Endmill, from +/-55mm, at 5mm steps.

Also not yet implemented, is correction of finish passes where over-cutting occurs. Further, I am only testing the tool-tip for collision ATM, not the tool-cutting-edge, shank, spindle, or spindle-block, though all are generated from inputs in a spreadsheet.

If anyone is interested in this, I have saved the base project containing a couple of Base-Models, and a spreadsheet containing various tool definitions--only Endmills, Rounded-Edge, and Ballnose are implemented. Selection of tool is hard-coded in line 1167 as:

spreadsheetToolTarget = '_PathToolDef_004'

The processing parameters are at the end of the macro in the For loop definitions as:

for OpY in range(-55,55,5):

Early attempt still...

Regards,
Josh
Attachments
PathToolModelsParametric.FCMACRO
(86.43 KiB) Downloaded 67 times
3d_Milling_InitialAttempts2.png
3d_Milling_InitialAttempts2.png (135.67 KiB) Viewed 1764 times
Example000.FCStd
(136.31 KiB) Downloaded 49 times
3d_Milling_InitialAttempts1.png
3d_Milling_InitialAttempts1.png (190.43 KiB) Viewed 1764 times
3d_Milling_InitialAttempts0.png
3d_Milling_InitialAttempts0.png (170.01 KiB) Viewed 1764 times
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: CNC Lathe and 4th-axis milling...

Post by herbk »

i Josh,
hm, looks like the "3D Surfacing" Operation... It works without OCL? That would be great.

A suggestion to 2.5D operations: On your eyample (and on most other "2.5D parts" to) the most things could be made with existing operations, only the "spherical" areas are the problem.
In my mind it should be posible to select only the "spherical" areas for this type of path, because it needs a lot of milling time at its very small step overs which are not necessary at all flat areas.
Gruß Herbert
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: CNC Lathe and 4th-axis milling...

Post by JoshM »

Hi Herb,
Thank you for your thoughts. Yes, that’s a macro I’m working on, no OCL.

I agree with you completely that spherical shapes require greater resolution. It’s a matter of bounding/selection. ATM I’m using the models bound plus extra length, but the input must switch to sections next.

Note too that while the test points are discrete, the contours tested are continuous.
Best,
Josh
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: CNC Lathe and 4th-axis milling...

Post by JoshM »

Here's an example, showing a spherical shape--still not ideally bounded since the results mill an overall square selection area. Time to generate each pass is about 1.8 seconds, without error checking.
-Josh
Attachments
3d_Milling_InitialAttempts3.png
3d_Milling_InitialAttempts3.png (296.08 KiB) Viewed 1718 times
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: CNC Lathe and 4th-axis milling...

Post by JoshM »

I had tried a similar shape, that I generated with a Groove of a BSpline shape on a Padded Cube shape, and out of 206 generated passes, there were consistent errors generated at Y= 0, +/-58, +/-60, and +/-69. I traced the issue to Path-Area, where I am generating the Offset for the Ballnose, but I'm not clear why it fails. I tried playing with inputs to see if anything shifted with tolerances, etc... but no dice. The profile is symmetric, but fails on one side.

I have attached a simple example of the shape that fails, isolated from the rest of the parts/pieces if it can help isolate the issue.
-Josh
Attachments
3d_Milling_InitialAttempts4a.png
3d_Milling_InitialAttempts4a.png (153.9 KiB) Viewed 1705 times
Example000.FCStd
(79.24 KiB) Downloaded 73 times
3d_Milling_InitialAttempts4b.png
3d_Milling_InitialAttempts4b.png (108.28 KiB) Viewed 1712 times
3d_Milling_InitialAttempts4.png
3d_Milling_InitialAttempts4.png (166.61 KiB) Viewed 1712 times
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: CNC Lathe and 4th-axis milling...

Post by herbk »

Hi Josh,

I think you takes my "spherical" a little to literally... :D :D ;) I took it as synonym for all round, rounded or not flat (planar) features of a part.

In my mind are parts like that:
3D_1.jpg
3D_1.jpg (46.98 KiB) Viewed 1697 times
Parts like that, with a lot of features which can be done by regular milling operations an only one which needs a 3D operation.

If i mill the whole part with a 3D pathes like you show an the pics, the part need a loot of Milling time, because of the little stepovers.
If the 3D Surfacing pazh generation is not based on base object, rather at on (or more) faces, it can save a lot of milling time.
Last edited by herbk on Sun Mar 18, 2018 6:32 pm, edited 1 time in total.
Gruß Herbert
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: CNC Lathe and 4th-axis milling...

Post by JoshM »

That’s a great example Herb. And, what you’re suggesting is exactly where I want to get to next, for the reason you mention.

I like how PathWB builds jobs with discrete Ops, and I agree that any additional functionality should follow the philosophy. Path does 88% of what I need now.

I appreciate your feedback. I wanted to get input to see if this seemed promising, and if so, what to aim for next.

Let me see if I can polish things a bit to better select target Geometry.

I also need to work out how to further modify proposed path sections that generate collisions due to proximity to shifting geometry, as well as shank, spindle, spindle-block.

Thanks so much,
J
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: CNC Lathe and 4th-axis milling...

Post by JoshM »

Hi Herb,
You got me off the couch today :lol: ...

Here's my first pass at improving this as you'd suggested. I selected the two faces for the "spherical section" and I used the bounds of each Face (plus pad lengths for each Axis min/max as a multiple of tool diameter). I hard-coded the extra lengths, and also the Y-Stepover at 0.2mm, and this is what I got for a 2.38125mm Ballnose.

I tried to make a shape like what you showed me to try out--wasn't sure dimensions, but should be representative.

One image shows proposed tool-paths, the other with the Draft-Path-Arrays of the Ballnose tool-tip visible. I wasn't running the volume calculation for collisions--which is most time consumption--and it took about 9 seconds without it.

What do you think?

Best,
Josh
Attachments
Example001.FCStd
(35.92 KiB) Downloaded 71 times
PathToolModelsParametric.FCMACRO
(86.97 KiB) Downloaded 66 times
3d_Milling_InitialAttempts5b.png
3d_Milling_InitialAttempts5b.png (140.02 KiB) Viewed 1673 times
3d_Milling_InitialAttempts5a.png
3d_Milling_InitialAttempts5a.png (108.89 KiB) Viewed 1673 times
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: CNC Lathe and 4th-axis milling...

Post by herbk »

Hi Josh,
that looks very promising. - cool...
JoshM wrote: Sun Mar 18, 2018 8:13 pm I tried to make a shape like what you showed me to try out--wasn't sure dimensions, but should be representative.
Dimensions are not needed, because it's a part i made sometime last year only for testing the 3D operatins...

I'm looking at the path since some minutes now, and i come in mind, that there is no need for the extension to the vertikal and horizontal ares near the half cylinder ("spherical section" ;) ), because all this areas will be done by other operations (contour, facing...).

If the 3D Surface path ends at the left wall without "going up" there will be left a little bit more material, but it can be removed with a other type of path creation i miss: path along a edge or line...

And a other thing has to be solved for the 3D operation: it needs something like a rowing operation in front of this pathes you show (but i'm sure you know... :lol: ).
Gruß Herbert
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: CNC Lathe and 4th-axis milling...

Post by JoshM »

Hi Herb,
It’s early steps here still, but in my mind the hard coded extra area is analogous to the Extra-Pass, and is useful for some operations. For now though, I hard coded for testing, where ideally it would shift to a user input.

I am not sure the last part with “rowing”? Could you expand on that so I can get on same page with you?
EDIT: roughing?


Thanks,
J
Post Reply