exporting gcode fails

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!
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: exporting gcode fails

Post by GeneFC »

I just tried the newest compiled Windows version available, presumably with the "fix" included. (tracker #2789 PR: #344)

The same error still occurs.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8972 (Git)
Build type: Release
Branch: master
Hash: 14594dde32d3af23d496a0b630db18480e618249
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0


I have always used the "old way", and I do not like the action of the "new way". In past I could click the "Post Process" icon and get a quick look to see if the G-code looked reasonable. Now the icon tries to immediately export the G-code without offering a chance to look.

Gene
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: exporting gcode fails

Post by mlampert »

Interesting, your version should have the fix. I'll check it out later today and have a look.
GeneFC wrote:I have always used the "old way", and I do not like the action of the "new way". In past I could click the "Post Process" icon and get a quick look to see if the G-code looked reasonable. Now the icon tries to immediately export the G-code without offering a chance to look.
This functionality hasn't changed recently. If you press the post-process icon you still get the dialog, at least with most post-porcessors.

Bringing up an editor or not is currently a feature of each individual post-processor script. I was thinking about pulling that into FC proper so we can have the same functionality for all of them (and less work if one creates a new post processor script). Haven't gotten around to that yet though.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: exporting gcode fails

Post by mlampert »

I checked out the sources and it seems to work correctly. Unfortunately I don't have access to Windows so I cannot try it directly.

Which post-proccessor are you using?
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: exporting gcode fails

Post by sgrogan »

mlampert wrote:I checked out the sources and it seems to work correctly. Unfortunately I don't have access to Windows so I cannot try it directly.
Sorry guys, win building/packaging error. I didn't notice the change to .ui file. I need to make clean the Path project.
"fight the good fight"
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: exporting gcode fails

Post by GeneFC »

mlampert wrote: Which post-proccessor are you using?
I am using a customized post processor based on linuxcnc_post. It has been a while, but I do not think I changed any functionality. I just put in the correct parameters for my mill, and adjusted some of the output text to meet my needs. I am almost certain I did not do anything that would have changed the call-up of an editor versus directly saving the G-code.

I just tried a test using each of the standard post processors supplied with the current master version of FC, and the behavior was the same in all cases. Clicking the Post Process (P,P) icon immediately calls up a save output dialog.

Gene
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: exporting gcode fails

Post by sgrogan »

GeneFC wrote:Sorry guys, win building/packaging error. I didn't notice the change to .ui file. I need to make clean the Path project.
ui changes should be fixed https://github.com/FreeCAD/FreeCAD/rele ... g/0.17_pre 0.17.8975 I overwrote an incremental build of the same version.
"fight the good fight"
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: exporting gcode fails

Post by mlampert »

sgrogan wrote:Sorry guys, win building/packaging error. I didn't notice the change to .ui file. I need to make clean the Path project.
Thanks for the quick fix!

Question, should I note it in the PR if there are .ui changes ?
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: exporting gcode fails

Post by GeneFC »

I tried the new version 0.17.8975, but the result is the same. I still get the error about three arguments for "export" versus two required. I edited PathPost.py and PathPostProcessor.py to remove the third argument, and everything works as normal. Of course that is not the point of adding the post processor arguments to the export function. I could not trace the cause, as my python-fu is weak.

Gene
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: exporting gcode fails

Post by mlampert »

GeneFC wrote:I tried the new version 0.17.8975, but the result is the same. I still get the error about three arguments for "export" versus two required...
Ah, this is different. It means your post processor script follows the old convention. You have to add a 3rd parameter to your export function in your post processor script. The funciont prototype should look like this

Code: Select all

   def export(objectlist, filename, arguments):
Since your script obviously doesn't support parameters you can just ignore it.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: exporting gcode fails

Post by GeneFC »

I rebased my custom post processor on the new version of linuxcnc_post.py, and the "three-two error" went away.

However, another message pops up saying, ". . . PathScripts\PathJob.py", line 270, in updateTooltips self.form.cboPostProcessorArgs.setText(self.obj.PostProcessorArgs) <type 'exceptions.AttributeError'>: 'FeaturePython' object has no attribute 'PostProcessorArgs' "

I can export the G-code, and it is correct, so I do not know the real significance of the message. I have not tried to add any actual arguments such as "--header" or "--comments" in the Job task setup, so perhaps that generates the message.

OS: Windows
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8975 (Git)
Build type: Release
Branch: master
Hash: 3e06d0a09077ea0e719ae1970cfbe6426ea87fa1
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0

By the way, I am not trying to complain about anything. I presume that since you issued a pull request that you are interested in test results. I have several older versions of FC in routine use for my work, and these issues are not causing any problem for me. Just trying to help make the future better.

Gene
Post Reply