Bizarre Generated Code from Millface Operation?

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!
falviani
Posts: 253
Joined: Tue May 07, 2019 8:49 pm

Bizarre Generated Code from Millface Operation?

Post by falviani »

Hi,

I generated a simple surfacing toolpath for my new CNC router using the mill surfacing operation. The area is 30" square. The generated gcode is 1053MB, too large to attach. As far as I can see, it shouldn't contain more than a few hundred lines of gcode. I cancelled the run after it had completed a single pass over the wasteboard and was very close. A pocket operation of the same size generates a file of the same size. What is going on here? This seems like a serious bug.

Thanks in advance,
Frank
Attachments
SurfacingTest.FCStd
(217.78 KiB) Downloaded 30 times
Last edited by falviani on Thu Apr 09, 2020 9:02 pm, edited 1 time in total.
m0n5t3r
Posts: 138
Joined: Fri Feb 03, 2017 2:55 pm

Re: Bizarre Generated Code from Surfacing Operation?

Post by m0n5t3r »

using the current 0.19 (freecad-daily PPA), it's nowhere near 1 GB:

Code: Select all

-rw-rw-r-- 1 iacobs iacobs 1.1M Apr  9 20:44 SurfacingTest.nc
can you post a screenshot / how it looks in the simulator?
falviani
Posts: 253
Joined: Tue May 07, 2019 8:49 pm

Re: Bizarre Generated Code from Surfacing Operation?

Post by falviani »

I watched the simulation and stopped it after it had repeated the same path at least 8 times. The path is like this:
SurfacePath.png
SurfacePath.png (9.25 KiB) Viewed 1313 times
.
There are 28094 lines in the generated code. The nightly is from 08Apr2020. As noted in the setup data copied from the about box, I'm running 64-bit Windows 10, fully patched.
User avatar
roerich_64
Veteran
Posts: 1465
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: Bizarre Generated Code from Surfacing Operation?

Post by roerich_64 »

Hi falviani,

i switched back from 'ZigZagOffset' to 'ZigZag':
Surface_I.jpg
Surface_I.jpg (329.78 KiB) Viewed 1302 times
Now no problem:

Code: Select all

(Exported by FreeCAD)
(Post Processor: grbl_post)
(Output Time:2020-04-09 21:32:05.728467)
(Begin preamble)
G17 G90
G21
(Begin operation: Fixture)
(Path: Fixture)
G54
(Finish operation: Fixture)
(Begin operation: T9: Surfacing)
(Path: T9: Surfacing)
(T9: Surfacing)
(Begin toolchange)
(M6 T9.0)
M3 S22000.0
(Finish operation: T9: Surfacing)
(Begin operation: MillFace)
(Path: MillFace)
(MillFace)
G0 Z6.000
G0 X749.300 Y12.700
G0 Z4.000
G1 X749.300 Y12.700 Z-0.500 F180.000
G1 X749.300 Y30.661 Z-0.500 F660.000
G1 X731.339 Y12.700 Z-0.500 F660.000
G1 X713.379 Y12.700 Z-0.500 F660.000
G1 X749.300 Y48.621 Z-0.500 F660.000
G1 X749.300 Y66.582 Z-0.500 F660.000
G1 X695.418 Y12.700 Z-0.500 F660.000
G1 X677.458 Y12.700 Z-0.500 F660.000
G1 X749.300 Y84.542 Z-0.500 F660.000
G1 X749.300 Y102.503 Z-0.500 F660.000
G1 X659.497 Y12.700 Z-0.500 F660.000
G1 X641.537 Y12.700 Z-0.500 F660.000
G1 X749.300 Y120.463 Z-0.500 F660.000
G1 X749.300 Y138.424 Z-0.500 F660.000
G1 X623.576 Y12.700 Z-0.500 F660.000
G1 X605.616 Y12.700 Z-0.500 F660.000
G1 X749.300 Y156.384 Z-0.500 F660.000
G1 X749.300 Y174.345 Z-0.500 F660.000
G1 X587.655 Y12.700 Z-0.500 F660.000
G1 X569.695 Y12.700 Z-0.500 F660.000
G1 X749.300 Y192.305 Z-0.500 F660.000
G1 X749.300 Y210.266 Z-0.500 F660.000
G1 X551.734 Y12.700 Z-0.500 F660.000
G1 X533.774 Y12.700 Z-0.500 F660.000
G1 X749.300 Y228.226 Z-0.500 F660.000
G1 X749.300 Y246.187 Z-0.500 F660.000
G1 X515.813 Y12.700 Z-0.500 F660.000
G1 X497.853 Y12.700 Z-0.500 F660.000
G1 X749.300 Y264.147 Z-0.500 F660.000
G1 X749.300 Y282.108 Z-0.500 F660.000
G1 X479.892 Y12.700 Z-0.500 F660.000
G1 X461.932 Y12.700 Z-0.500 F660.000
G1 X749.300 Y300.068 Z-0.500 F660.000
G1 X749.300 Y318.029 Z-0.500 F660.000
G1 X443.971 Y12.700 Z-0.500 F660.000
G1 X426.011 Y12.700 Z-0.500 F660.000
G1 X749.300 Y335.989 Z-0.500 F660.000
G1 X749.300 Y353.950 Z-0.500 F660.000
G1 X408.050 Y12.700 Z-0.500 F660.000
G1 X390.090 Y12.700 Z-0.500 F660.000
G1 X749.300 Y371.910 Z-0.500 F660.000
G1 X749.300 Y389.871 Z-0.500 F660.000
G1 X372.129 Y12.700 Z-0.500 F660.000
G1 X354.169 Y12.700 Z-0.500 F660.000
G1 X749.300 Y407.831 Z-0.500 F660.000
G1 X749.300 Y425.792 Z-0.500 F660.000
G1 X336.208 Y12.700 Z-0.500 F660.000
G1 X318.248 Y12.700 Z-0.500 F660.000
G1 X749.300 Y443.752 Z-0.500 F660.000
G1 X749.300 Y461.713 Z-0.500 F660.000
G1 X300.287 Y12.700 Z-0.500 F660.000
G1 X282.327 Y12.700 Z-0.500 F660.000
G1 X749.300 Y479.673 Z-0.500 F660.000
G1 X749.300 Y497.634 Z-0.500 F660.000
G1 X264.366 Y12.700 Z-0.500 F660.000
G1 X246.406 Y12.700 Z-0.500 F660.000
G1 X749.300 Y515.594 Z-0.500 F660.000
G1 X749.300 Y533.555 Z-0.500 F660.000
G1 X228.445 Y12.700 Z-0.500 F660.000
G1 X210.485 Y12.700 Z-0.500 F660.000
G1 X749.300 Y551.515 Z-0.500 F660.000
G1 X749.300 Y569.476 Z-0.500 F660.000
G1 X192.524 Y12.700 Z-0.500 F660.000
G1 X174.564 Y12.700 Z-0.500 F660.000
G1 X749.300 Y587.436 Z-0.500 F660.000
G1 X749.300 Y605.397 Z-0.500 F660.000
G1 X156.603 Y12.700 Z-0.500 F660.000
G1 X138.643 Y12.700 Z-0.500 F660.000
G1 X749.300 Y623.357 Z-0.500 F660.000
G1 X749.300 Y641.318 Z-0.500 F660.000
G1 X120.682 Y12.700 Z-0.500 F660.000
G1 X102.722 Y12.700 Z-0.500 F660.000
G1 X749.300 Y659.278 Z-0.500 F660.000
G1 X749.300 Y677.239 Z-0.500 F660.000
G1 X84.761 Y12.700 Z-0.500 F660.000
G1 X66.801 Y12.700 Z-0.500 F660.000
G1 X749.300 Y695.199 Z-0.500 F660.000
G1 X749.300 Y713.160 Z-0.500 F660.000
G1 X48.840 Y12.700 Z-0.500 F660.000
G1 X30.880 Y12.700 Z-0.500 F660.000
G1 X749.300 Y731.120 Z-0.500 F660.000
G1 X749.300 Y749.081 Z-0.500 F660.000
G1 X12.919 Y12.700 Z-0.500 F660.000
G1 X12.700 Y12.700 Z-0.500 F660.000
G1 X12.700 Y30.442 Z-0.500 F660.000
G1 X731.558 Y749.300 Z-0.500 F660.000
G1 X713.598 Y749.300 Z-0.500 F660.000
G1 X12.700 Y48.402 Z-0.500 F660.000
G1 X12.700 Y66.363 Z-0.500 F660.000
G1 X695.637 Y749.300 Z-0.500 F660.000
G1 X677.677 Y749.300 Z-0.500 F660.000
G1 X12.700 Y84.323 Z-0.500 F660.000
G1 X12.700 Y102.284 Z-0.500 F660.000
G1 X659.716 Y749.300 Z-0.500 F660.000
G1 X641.756 Y749.300 Z-0.500 F660.000
G1 X12.700 Y120.244 Z-0.500 F660.000
G1 X12.700 Y138.205 Z-0.500 F660.000
G1 X623.795 Y749.300 Z-0.500 F660.000
G1 X605.835 Y749.300 Z-0.500 F660.000
G1 X12.700 Y156.165 Z-0.500 F660.000
G1 X12.700 Y174.126 Z-0.500 F660.000
G1 X587.874 Y749.300 Z-0.500 F660.000
G1 X569.914 Y749.300 Z-0.500 F660.000
G1 X12.700 Y192.086 Z-0.500 F660.000
G1 X12.700 Y210.047 Z-0.500 F660.000
G1 X551.953 Y749.300 Z-0.500 F660.000
G1 X533.993 Y749.300 Z-0.500 F660.000
G1 X12.700 Y228.007 Z-0.500 F660.000
G1 X12.700 Y245.968 Z-0.500 F660.000
G1 X516.032 Y749.300 Z-0.500 F660.000
G1 X498.072 Y749.300 Z-0.500 F660.000
G1 X12.700 Y263.928 Z-0.500 F660.000
G1 X12.700 Y281.889 Z-0.500 F660.000
G1 X480.111 Y749.300 Z-0.500 F660.000
G1 X462.151 Y749.300 Z-0.500 F660.000
G1 X12.700 Y299.849 Z-0.500 F660.000
G1 X12.700 Y317.810 Z-0.500 F660.000
G1 X444.190 Y749.300 Z-0.500 F660.000
G1 X426.230 Y749.300 Z-0.500 F660.000
G1 X12.700 Y335.770 Z-0.500 F660.000
G1 X12.700 Y353.731 Z-0.500 F660.000
G1 X408.269 Y749.300 Z-0.500 F660.000
G1 X390.309 Y749.300 Z-0.500 F660.000
G1 X12.700 Y371.691 Z-0.500 F660.000
G1 X12.700 Y389.652 Z-0.500 F660.000
G1 X372.348 Y749.300 Z-0.500 F660.000
G1 X354.388 Y749.300 Z-0.500 F660.000
G1 X12.700 Y407.612 Z-0.500 F660.000
G1 X12.700 Y425.573 Z-0.500 F660.000
G1 X336.427 Y749.300 Z-0.500 F660.000
G1 X318.467 Y749.300 Z-0.500 F660.000
G1 X12.700 Y443.533 Z-0.500 F660.000
G1 X12.700 Y461.494 Z-0.500 F660.000
G1 X300.506 Y749.300 Z-0.500 F660.000
G1 X282.546 Y749.300 Z-0.500 F660.000
G1 X12.700 Y479.454 Z-0.500 F660.000
G1 X12.700 Y497.415 Z-0.500 F660.000
G1 X264.585 Y749.300 Z-0.500 F660.000
G1 X246.625 Y749.300 Z-0.500 F660.000
G1 X12.700 Y515.375 Z-0.500 F660.000
G1 X12.700 Y533.336 Z-0.500 F660.000
G1 X228.664 Y749.300 Z-0.500 F660.000
G1 X210.704 Y749.300 Z-0.500 F660.000
G1 X12.700 Y551.296 Z-0.500 F660.000
G1 X12.700 Y569.257 Z-0.500 F660.000
G1 X192.743 Y749.300 Z-0.500 F660.000
G1 X174.783 Y749.300 Z-0.500 F660.000
G1 X12.700 Y587.217 Z-0.500 F660.000
G1 X12.700 Y605.178 Z-0.500 F660.000
G1 X156.822 Y749.300 Z-0.500 F660.000
G1 X138.862 Y749.300 Z-0.500 F660.000
G1 X12.700 Y623.138 Z-0.500 F660.000
G1 X12.700 Y641.099 Z-0.500 F660.000
G1 X120.901 Y749.300 Z-0.500 F660.000
G1 X102.941 Y749.300 Z-0.500 F660.000
G1 X12.700 Y659.059 Z-0.500 F660.000
G1 X12.700 Y677.020 Z-0.500 F660.000
G1 X84.980 Y749.300 Z-0.500 F660.000
G1 X67.020 Y749.300 Z-0.500 F660.000
G1 X12.700 Y694.980 Z-0.500 F660.000
G1 X12.700 Y712.941 Z-0.500 F660.000
G1 X49.059 Y749.300 Z-0.500 F660.000
G1 X31.099 Y749.300 Z-0.500 F660.000
G1 X12.700 Y730.901 Z-0.500 F660.000
G1 X12.700 Y748.862 Z-0.500 F660.000
G1 X12.700 Y749.300 Z-0.500 F660.000
G1 X13.138 Y749.300 Z-0.500 F660.000
G1 X12.700 Y748.862 Z-0.500 F660.000
G0 Z6.000
(Finish operation: MillFace)
(Begin postamble)
M5
G17 G90
M2

Code: Select all

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20406 (Git) AppImage
Build type: Release
Branch: master
Hash: bb45a2b01f9aafeae00cdf60c87b43fc36ad28ad
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Germany (de_DE)
Bests
Walter
Last edited by roerich_64 on Thu Apr 09, 2020 7:49 pm, edited 1 time in total.
Die Liebe wird siegen, denn sie ist unzerstörbar :) ;)
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Bizarre Generated Code from Surfacing Operation?

Post by herbk »

Hi Frank,

i can't reproduce that...

If i export your Job to an gcode file, the filesize is about 7 KiB and a few lines only...
Attachments
SurfacingTest.nc.txt
(6.89 KiB) Downloaded 22 times
Gruß Herbert
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Bizarre Generated Code from Surfacing Operation?

Post by chrisb »

falviani wrote: Thu Apr 09, 2020 6:47 pm The nightly is from 08Apr2020. As noted in the setup data copied from the about box, I'm running 64-bit Windows 10, fully patched.
Please add your full FreeCAD infos, see http://forum.freecadweb.org/viewtopic.php?f=3&t=2264.
You may consider renaming the topic to contain "MillFace" instead of "Surfacing", because the latter suggests that it's about 3Dsurface.

Trying to export runs already for several minutes; still trying to show the post process preview window.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
falviani
Posts: 253
Joined: Tue May 07, 2019 8:49 pm

Re: Bizarre Generated Code from Surfacing Operation?

Post by falviani »

Sorry - I had copied it to the clipboard but forgot to paste :oops:

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20477 (Git)
Build type: Release
Branch: master
Hash: 7d8ab175a68e476427e6e337fe3099b52da49dc8
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Bizarre Generated Code from Millface Operation?

Post by chrisb »

Finally finished. The output contains 28000 lines. After adding the argument --no-show-editor the number of lines is reduced to 200 lines. Can you retry with adding this parameter?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sliptonic
Veteran
Posts: 3459
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Bizarre Generated Code from Millface Operation?

Post by sliptonic »

This might be a red herring but I noticed a weird effect yesterday that I've not had time to investigate. I was doing a contour operation and added 1mm of extra offset. Instead I got something like 10000000000mm and FreeCAD crashed. I repeated the same thing twice. When I entered the value through the data tab property, it worked fine but in the task panel I'd get bogus values.

You might make sure you're not getting something like a step down of some absurdly small amount so it's generating hundreds of passes over the same area.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Bizarre Generated Code from Millface Operation?

Post by chrisb »

Changing the parameter seems to have triggered a recompute.

Please try loading the file and perform a full recompute and report back if that solves the issue.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply