NativeCam on LinuxCNC 2.9.3

More
11 Aug 2024 19:08 - 11 Aug 2024 19:10 #307489 by SilverRain
Удалось ли кому-нибудь установить NativeCam на LinuxCNC 2.9.3? Две недели бьюсь с проблемой Python 2.7, а теперь ругается на GTK... Сил нет.
Last edit: 11 Aug 2024 19:10 by SilverRain.

Please Log in or Create an account to join the conversation.

More
22 Sep 2024 16:20 - 23 Sep 2024 14:10 #310608 by juergen-home
I poked a bit around with linux2.9.3 and native cam. It is running, but not stable, sometimes the ncam window dissapers randomly.
Feel free to correct this list.
0. Axis 2.9.3 sim_mm running native on PC
1. download from github.com/BogdanTheGeek/NativeCAM
2. extract
3. copy to /home/cnc/linuxcnc/ncam/
4. open console in /home/cnc/linuxcnc/ncam/
5. sudo bash ncam_debsetup.txt *1
6. python3 ncam.py *2
7. sudo apt install python3-lxml
8. python3 ncam.py --> window:Create Standalone Directory /home/cnc/nativecam --> yes --> window:LinuxCNC needs to restart now --> window:NativeCam for LinuxCNC
9. python3 ncam.py --ini=/home/cnc/linuxcnc/configs/sim.axis/axis_mm.ini --catalog=mill *3
10. Start LinuxCNC --> dont start --> error (3)
11. Comment out # GLADEVCP = -U --catalog=mill /home/cnc/linuxcnc/ncam/ncam.ui in  axis_mm.ini
12. Start LinuxCNC
13.    start console in /home/cnc/linuxcnc/ncam/ python3 ncam.py -> no tool library in the tool menue    
14. start again console in /home/cnc/linuxcnc/ncam/ python3 ncam.py --ini=/home/cnc/linuxcnc/configs/sim.axis/axis_mm.ini --> tool library is now avalible in tool menu-

value 



*1 E: Paket nativecam kann nicht gefunden werden.
done.
ncam_debsetup.txt: Zeile 174: ncam: Kommando nicht gefunden.


*2
Traceback (most recent call last):
File "/home/cnc/linuxcnc/ncam/ncam.py", line 26, in <module>
from lxml import etree
ModuleNotFoundError: No module named 'lxml'


*3
Traceback (most recent call last):
  File "/home/cnc/linuxcnc/ncam/ncam.py", line 5942, in verify_ini
    print(_("Success in modifying inifile :\n  %s" % fname))
          ^
UnboundLocalError: cannot access local variable '_' where it is not associated with a value

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cnc/linuxcnc/ncam/ncam.py", line 6011, in <module>
    verify_ini(os.path.abspath(ini), catalog, in_tab)
  File "/home/cnc/linuxcnc/ncam/ncam.py", line 5946, in verify_ini
    _("Error modifying ini file\n%(err_details)s" % {"err_details": detail})
    ^
UnboundLocalError: cannot access local variable '_' where it is not associated with a
 
Attachments:
Last edit: 23 Sep 2024 14:10 by juergen-home.
The following user(s) said Thank You: freemoore

Please Log in or Create an account to join the conversation.

More
22 Sep 2024 19:09 #310616 by Giovanni
I am a beginner in Python, but I have fixed some problem (I think so) in the Bogdan's version, and I see that editing a parameter and closing the "calculator" make ncam crash cause a -11 error (segmentation fault).
I think there is something wrong related to gtk on closing dialogs.
The crash happens (on my computer) when the custom do_start_editing() function returns to the caller (I think that's gtk).
I have my modified version, if someone want to give it a try...
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
23 Sep 2024 14:13 #310651 by juergen-home
If you post your modified file I will give it a try.

Please Log in or Create an account to join the conversation.

More
23 Sep 2024 16:58 - 23 Sep 2024 17:46 #310660 by Giovanni
That's the file. Don't trust too much in it.
Please backup the original one and place the new one (uncompressed) in its place.

Regards
Giovanni

Edit: I see right now that the result of calculations are wrong.
They give a huge number maybe because the decimal point "." or "," in the locale.
Please insert numbers directly without any calculation.
Attachments:
Last edit: 23 Sep 2024 17:46 by Giovanni.

Please Log in or Create an account to join the conversation.

More
24 Sep 2024 14:24 #310711 by juergen-home
Thanks Giovanni
I'll try it next time, put it in with a long fork and a mask on :-)
Juergen

Please Log in or Create an account to join the conversation.

More
25 Sep 2024 10:54 #310764 by Giovanni

I forgot you may need the pref_edit file too.

Regards
Giovanni
Attachments:

Please Log in or Create an account to join the conversation.

More
29 Sep 2024 09:34 #311017 by Giovanni
Here is a more stable version (in my opinion).
But the calculation problem is still there (on my computer).
Attachments:
The following user(s) said Thank You: freemoore

Please Log in or Create an account to join the conversation.

More
30 Sep 2024 17:22 #311080 by freemoore
Hello all,
It's good to see you working on NativeCAM, I use it all the time and have got to the point where I need to update to lcnc 2.9.x and the lack of ncam is the main problem.

I followed juergen-home's instructions with a couple of changes:

step 3. copied to /home/freemoore/linuxcnc/ncam/
step 4. open console in /home/freemoore/linuxcnc/ncam/NativeCAM-master
step 5. sudo bash ncam_debsetup.txt
python3 ncam.py --ini=/home/freemoore/linuxcnc/configs/sim.axis.vismach.5axis.table-rotary-tilting/xyzbc-trt.ini --catalog=mill

After this I have run each further step down to 14 and reproduced the errors and results in Juergen's post, but without getting tool library to appear in ncam.

Next I copied Giovanni's ncam.py from above in place of the one in Bogdan's download.

I still don't have a tool library, but this is outputting a program to the simulated 5-axis machine config of lcnc that I've set it up with here. And the program is running OK.

Not sure I know what would be useful to you but I'm happy to test new versions of your code here!

great to see the familiar ncam on a 2.9 installation, it gives me hope :)

cheers, Andy

Please Log in or Create an account to join the conversation.

Time to create page: 0.158 seconds
Powered by Kunena Forum