I cannot export with linuxcnc_post, neither with others posts
import linuxcnc_post
linuxcnc_post.export (myObjectName,"/path/to/outputFile.ncc", " ")
like explained in: https://www.freecadweb.org/wiki/Path_scripting
What I'm doing wrong?
cannot export with post_processor
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 24
- Joined: Tue Apr 17, 2018 12:57 pm
-
- Posts: 24
- Joined: Tue Apr 17, 2018 12:57 pm
cannot export with post_processor
I cannot export with linuxcnc_post, neither with others posts
import linuxcnc_post
linuxcnc_post.export (myObjectName,"/path/to/outputFile.ncc", " ")
like explained in: https://www.freecadweb.org/wiki/Path_scripting
What I'm doing wrong?
import linuxcnc_post
linuxcnc_post.export (myObjectName,"/path/to/outputFile.ncc", " ")
like explained in: https://www.freecadweb.org/wiki/Path_scripting
What I'm doing wrong?
Re: cannot export with post_processor
Which FreeCAD version do you use? Please post your FreeCAD info. Have you checked the wiki for Path Workbench?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: cannot export with post_processor
Please don't crosspost all over the forum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 24
- Joined: Tue Apr 17, 2018 12:57 pm
Re: cannot export with post_processor
OS: Windows 7chrisb wrote: ↑Tue Apr 17, 2018 9:47 pm Which FreeCAD version do you use? Please post your FreeCAD info. Have you checked the wiki for Path Workbench?
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13509 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 0258808ccb6ba3bd5ea9312f79cd023f1a8671b7
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)
Before the posting here I forgot to mention that with the GUI everything works perfectly. The reason of running the post export through the script is to build post processor (or to change one from existing) for 3D abrasive waterjet milling what practically could be done by two ways, activating/deactivating the abrasive mass flow or controlling the feed rate instead of controlling the Z axis position (when the jet moves slower, it erodes deeper). The F4 microwaterjet machine runs with flexium or beckhoff controllers. So I tried:
>>> import FreeCAD
>>> FreeCAD.open(u"C:/Users/ga/Desktop/test_fc.FCStd")
>>> App.setActiveDocument("test_fc")
>>> App.ActiveDocument=App.getDocument("test_fc")
>>> Gui.ActiveDocument=Gui.getDocument("test_fc")
>>> Gui.activateWorkbench("PathWorkbench")
>>> my_path = Path.Path("G0 X2 Y2 G1 X0 Y2")
>>> myPath = App.ActiveDocument.addObject("Path::Feature","myPathName")
>>> myPath.Path = my_path
>>> myPath
<Path::Feature object>
>>> my_path
Path [ size:2 length:4.8284 ]
>>> linuxcnc_post.export(myPath,"C:\Users\ga\Desktop\G_Code_Exp_2.ncc", "")
Show editor = 1
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Program Files\FreeCAD 0.17\Mod\Path\PathScripts\post\linuxcnc_post.py", line 158, in export
for obj in objectslist:
TypeError: 'App.DocumentObject' object is not iterable
OR
>>> linuxcnc_post.export(my_path,"C:\Users\ga\Desktop\G_Code_Exp_2.ncc", "")
Show editor = 1
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Program Files\FreeCAD 0.17\Mod\Path\PathScripts\post\linuxcnc_post.py", line 158, in export
for obj in objectslist:
TypeError: 'Path.Toolpath' object is not iterable
ps: pre-processing works well
Re: cannot export with post_processor
Thanks for giving the details. The quoted statement means that others have to take over.giedrius9999 wrote: ↑Wed Apr 18, 2018 6:31 am Before the posting here I forgot to mention that with the GUI everything works perfectly.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 24
- Joined: Tue Apr 17, 2018 12:57 pm
Re: cannot export with post_processor
I didn't mean that others have to take over...Sorry for do not follow the rules!!! I'll look into the rules more detail
Last edited by giedrius9999 on Wed Apr 18, 2018 12:16 pm, edited 1 time in total.
Re: cannot export with post_processor
I might have been not clear: I cannot contribute further if the post processors work from the GUI.giedrius9999 wrote: ↑Wed Apr 18, 2018 11:07 am I didn't mean take over...Sorry for do not follow the rules!!! I'll look into more detail
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.