GCode Error generated in Pocket_3D 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!
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

GCode Error generated in Pocket_3D operation.

Post by JoshM »

Hi,
I just generated a job and ran it, and found the issues I'd missed with simulation. I tracked down the issue and found I could reproduce it reliably on my system. I was working on an older version () but checked on latest version and found it remains there as well, so thought I'd mention it.

What I found is that if I add geometry that Freecad isn't able to work with, it throws in the following GCode, either at the beginning or end of the operation--not sure what impacts where it is appended, as I've seen both:

G0 Z24.000000
G0
G0 Z0.000000
G0 Z24.000000

This had unpleasant results;)...

I had Base-Body-PotentiometerCap_Mold.Face4 included and that causes that GCode to be prepended or appended. BTW, it doesn't show up in the FC-Path lines. It was there when I ran GWizard simulation but I missed it in the mess of lines...

I can't append my project because it's too big--about 2.1 Megs. It doesn't compress much. Not sure how to do that, so am attaching a screenshot for now...

Thanks,
Josh

Found it using this version:

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12431 (Git)
Build type: Release
Branch: master
Hash: c397aee9ed3efcb2e33fa719313c98cc4867cf32
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)


Tested that it still exists in this version.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12560 (Git)
Build type: Release
Branch: master
Hash: 71836f4b37a29c1ee54b1bd681cb9b687901cc96
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
Attachments
FreeCadGcodeerror.jpg
FreeCadGcodeerror.jpg (136.03 KiB) Viewed 1716 times
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: GCode Error generated in Pocket_3D operation.

Post by Kunda1 »

JoshM wrote:I can't append my project because it's too big--about 2.1 Megs. It doesn't compress much. Not sure how to do that, so am attaching a screenshot for now...
You can use a 3rd party cloud-based service like dropbox etc...
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: GCode Error generated in Pocket_3D operation.

Post by JoshM »

Thanks Kunda1--appreciate you pointing me in the right direction.

I uploaded my project at: https://ln.sync.com/dl/f66a5ee70/p3grmq ... b-ud592abj

Best Regards,
Josh
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: GCode Error generated in Pocket_3D operation.

Post by mlampert »

I cannot reproduce this, running the following command should turn up at least one of those G0 commands in your design but doesn't:

Code: Select all

>>> [cmd for cmd in App.ActiveDocument.Job.Path.Commands if not cmd.Parameters and cmd.Name[0] is not '(' and cmd.Name not in ['G80', 'G90', 'G91', 'G98']]
[]
I presume the error happens in you post processor.
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: GCode Error generated in Pocket_3D operation.

Post by JoshM »

Thanks Mlampert. I'll dig into that Monday when I'm back at work. I appreciate your help.

I did successfully mill my mold on 2nd try--not bad for developmental software that's free. I'm really appreciative of the work you all have done. Right now it's a bit loose, but ultimately workable, and the improvements are fast.

Thanks,
Josh
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: GCode Error generated in Pocket_3D operation.

Post by chrisb »

Which postprocessor do you use? You can use the "Inspect GCode" tool to view the gcode before postprocessing.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: GCode Error generated in Pocket_3D operation.

Post by JoshM »

Thanks Chrisb. I caught that inspect-GCode later, will use it as you suggest.

I'm using LinuxCNC that I modified a bit: preamble, suppressing tool changes for sequential operations that use same tool, so only on new tool#... either I introduced a bug or it's there in Provided Post. I'll check Monday.
Best,
Josh
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: GCode Error generated in Pocket_3D operation.

Post by JoshM »

Hi Chrisb,
I figured for sure it would be something I messed up in the Post-Processor modification, but your suggestion of using the GCode-Inspection for a particular operation suggests its a bug on the Freecad-Path side of things...

I had selected 3 Faces for that operation, and only 1 was accepted--it appears that for each unaccepted Face, the incorrect GCode G0 Z0.0 is inserted, unless I'm reading into it too much...

Best Regards,
Josh
Attachments
FreeCad_GcodeError.jpg
FreeCad_GcodeError.jpg (243.05 KiB) Viewed 1580 times
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: GCode Error generated in Pocket_3D operation.

Post by chrisb »

In my view the problem is not the GCode, it is the fact that no message is shown for the problematic geometry.
You have a final depth of 0 and a clearance height of 24. If for some reason some geometry cannot be handled that is all what is left: Move down and up again.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: GCode Error generated in Pocket_3D operation.

Post by chrisb »

JoshM wrote: Mon Nov 13, 2017 2:08 pm I had selected 3 Faces for that operation, and only 1 was accepted
I investigated your model further: If you perform a "recompute all" there are errors shown in the model. This might be due to different versions but I don't think so. Perhaps the problem is out of the scope of Path Workbench.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply