Creating CNC roughing and finishing passes

Here's the place for discussion related to CAM/CNC and the development of the Path module.
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: Creating CNC roughing and finishing passes

Postby roivai » Thu Aug 30, 2018 5:02 am

Hi,

The changes that included the StepOver parameter also made the operation to respect the Finish Depth (edit: or is it Final Depth..? cant check now) Is that set correctly? For me at least, the guess that FreeCAD makes for that by default is often at the surface of the object, which seems to be the case here as well.
prius06
Posts: 30
Joined: Thu Aug 23, 2018 6:29 pm

Re: Creating CNC roughing and finishing passes

Postby prius06 » Thu Aug 30, 2018 1:00 pm

roivai wrote:
Thu Aug 30, 2018 5:02 am
Hi,

The changes that included the StepOver parameter also made the operation to respect the Finish Depth (edit: or is it Final Depth..? cant check now) Is that set correctly? For me at least, the guess that FreeCAD makes for that by default is often at the surface of the object, which seems to be the case here as well.
I will check that when I get home. The default behavior definitely changed though as I explained it in my previous post...

Thanks
prius06
Posts: 30
Joined: Thu Aug 23, 2018 6:29 pm

Re: Creating CNC roughing and finishing passes

Postby prius06 » Thu Aug 30, 2018 11:16 pm

roivai wrote:
Thu Aug 30, 2018 5:02 am
Hi,

The changes that included the StepOver parameter also made the operation to respect the Finish Depth (edit: or is it Final Depth..? cant check now) Is that set correctly? For me at least, the guess that FreeCAD makes for that by default is often at the surface of the object, which seems to be the case here as well.
Confirmed. Setting the final depth to a lower value (in my case 0) seems to take care of that problem. So I guess the only problem is that the default value for final depth is too high.

Thanks!
prius06
Posts: 30
Joined: Thu Aug 23, 2018 6:29 pm

Re: Creating CNC roughing and finishing passes

Postby prius06 » Tue Sep 04, 2018 10:51 pm

I was playing some more with the 3D Surface and came across something completely unexpected. I took the outline of the Japanese kanji "Ai" and extruded it up 2mm and fused it with a cube of appropriate size. Here is a picture (disregard the profile lines that go around the perimeter).
Ai_Capture.PNG
Ai_Capture.PNG (76.55 KiB) Viewed 279 times
At first I thought that it is just odd that the generated"3D Surface" lines above the lower portion of the kanji disappear in some areas and though that it is a matter of rendering but then I looked at the generated file with another program (CAMotics) and here is what I saw:
Ai_Capture2.PNG
Ai_Capture2.PNG (34.05 KiB) Viewed 279 times
Basically the path climbs on top of the material and shortly after that plunges back in,

Let me know if I can help with better screenshots or something.

Thanks!
chrisb
Posts: 18223
Joined: Tue Mar 17, 2015 9:14 am

Re: Creating CNC roughing and finishing passes

Postby chrisb » Tue Sep 04, 2018 11:04 pm

prius06 wrote:
Tue Sep 04, 2018 10:51 pm
Let me know if I can help with better screenshots or something.
Can you upload the file?
prius06
Posts: 30
Joined: Thu Aug 23, 2018 6:29 pm

Re: Creating CNC roughing and finishing passes

Postby prius06 » Tue Sep 04, 2018 11:41 pm

File was too large with all the paths, so I had to remove them

Here is how to reproduce it:

Create a path job for "Ai Fusion".
Add a 3mm ballnose endmill tool (remove the default tool)
Create 3D surface.
Change Final Depth to 0
Change the Drop cutter from X to Y (so lines are horizontal... or should I say along the X axis)

You will see that path lines disappear in the lower half. Toggle visibility of Ai Fusion to see the lines diving into the material.

At one point I thought that the 3D Surface treats the extrusion as hollow object but notice how the lines stay on above the object in the upper half of the kanji.

Correction: It seems like 3D Surface does treat the extrusion as a hollow object (missing the top surface). The upper half (where the diving does not occur) is probably too narrow and the cutter would crash in the walls if it dives deeper. Any thoughts on what causes that (or rather how to avoid it)?

Thanks!
Attachments
Aikido3_small.FCStd
(377.2 KiB) Downloaded 11 times
chrisb
Posts: 18223
Joined: Tue Mar 17, 2015 9:14 am

Re: Creating CNC roughing and finishing passes

Postby chrisb » Wed Sep 05, 2018 7:28 am

I get an error message in report view:

Code: Select all

MEFISTO_2D failed on sub-shape #302 with error 13 "Error in Triangulation (aptrte())"
I attach the simplified model with the complete path showing the same issue.
Attachments
AiSmall.fcstd
(248.49 KiB) Downloaded 6 times
chrisb
Posts: 18223
Joined: Tue Mar 17, 2015 9:14 am

Re: Creating CNC roughing and finishing passes

Postby chrisb » Wed Sep 05, 2018 7:39 am

I did the following:
- convert the Path4541 to a sketch
- use validate sketch to find missing coincidences
- found 2 of them, let it fix by the tool
- sketch shows errors, open it and remove the redundant constraint. I did not investigate this further, probably some tangency problem.
- pad the sketch, this succeded despite the missing coincidence
- create path as before.
I attach the file containing both variants.
Attachments
Bildschirmfoto 2018-09-05 um 09.32.47.png
Bildschirmfoto 2018-09-05 um 09.32.47.png (44.39 KiB) Viewed 246 times
AiSmall_cb.fcstd
(488.89 KiB) Downloaded 8 times
prius06
Posts: 30
Joined: Thu Aug 23, 2018 6:29 pm

Re: Creating CNC roughing and finishing passes

Postby prius06 » Wed Sep 05, 2018 1:31 pm

chrisb wrote:
Wed Sep 05, 2018 7:39 am
I did the following:
- convert the Path4541 to a sketch
- use validate sketch to find missing coincidences
- found 2 of them, let it fix by the tool
- sketch shows errors, open it and remove the redundant constraint. I did not investigate this further, probably some tangency problem.
- pad the sketch, this succeded despite the missing coincidence
- create path as before.
I attach the file containing both variants.
Thanks!
prius06
Posts: 30
Joined: Thu Aug 23, 2018 6:29 pm

Re: Creating CNC roughing and finishing passes

Postby prius06 » Wed Sep 05, 2018 3:27 pm

I no longer see that problem but... the gcode created by surface path is huge and it is actually very inefficient.

Here is an example: The following section:
G1 X-31.0000 Y15.1064 Z-2.0000 F300.00
G1 X-31.0000 Y16.6170 Z-2.0000 F300.00
G1 X-30.9600 Y16.6170 Z-2.0000 F300.00
G1 X-30.9201 Y16.6170 Z-2.0000 F300.00
G1 X-30.8801 Y16.6170 Z-2.0000 F300.00
G1 X-30.8401 Y16.6170 Z-2.0000 F300.00
G1 X-30.8001 Y16.6170 Z-2.0000 F300.00
G1 X-30.7602 Y16.6170 Z-2.0000 F300.00
G1 X-30.7202 Y16.6170 Z-2.0000 F300.00
G1 X-30.6802 Y16.6170 Z-2.0000 F300.00
G1 X-30.6402 Y16.6170 Z-2.0000 F300.00
G1 X-30.6003 Y16.6170 Z-2.0000 F300.00
G1 X-30.5603 Y16.6170 Z-2.0000 F300.00
G1 X-30.5203 Y16.6170 Z-1.9931 F300.00

Can be replaced with four lines:
G1 X-31.0000 Y15.1064 Z-2.0000 F300.00
G1 X-31.0000 Y16.6170 Z-2.0000 F300.00
G1 X-30.5603 Y16.6170 Z-2.0000 F300.00
G1 X-30.5203 Y16.6170 Z-1.9931 F300.00

That is because all but the first two and last two lines are simply moving in a straight line along the X axis without changing Y or Z

Is there a way to optimize that?
I mean even outside the scope of FreeCAD, is there something that could eliminate redundant gcode lines like the ones in the above example?