Introduction: ArtSoft / Mach3 forum drove me here

More
26 Jan 2021 21:35 - 26 Jan 2021 21:41 #196666 by Etaoin

Yes, absolute and relative mean referenced from machine origin, relative is referenced from current user origin.

It's common labels on DROs that machinists might use.
It's also slightly more informative the obscure G code labels - at least untill you are used to the gcode labels.


Yep, I think REL and ABS are much clearer than G53/G54. In Mach3 you can toggle "machine coordinates", on = ABS, off = REL. I am used to this. I understand some people use additional coordinate system slots (e.g. G55-G59) but it is something I struggle to see the need for. Would you agree that the ability to select a different coordinate system than G53 and G54 does not warrant an on-screen widget? I am including a DMI input in the layuout...

i would think you should switch to a toolkit that linuxcnc actually supports before spending a lot of time tweaking your code. Linuxcnc's toolkits use special widgets for many functions that makes coding much easier.
If you build a screen completely with plain widgets you will have a lot of cranky python code to add to make it work.


Yes, I should really, shouldn't I... I looked at some screenshots of GladeVCP for LinuxCNC and saw the goodies in the widget palettes, and I've skimmed through the documentation for it - so I understand there are dedicated widgets for a lot of stuff. Quite look forward to trying it out! BUT. My plan is to stick the LinuxCNC ISO on an old Thinkpad X61 I have here, so I don't have to deal with building/configuring my main laptop for LinuxCNC - aaaand the power supply for that laptop is in storage. Once I've fetched it I will switch over. That said, I don't feel like I'm wasting my time working on the layout in plain Glade/GTK3; I haven't spent any time writing Python (main.py is only about 100 lines, and most of that deals with the feedback sounds), 99% of the effort has gone into the grids and the CSS for the widgets, both of which should be mostly reusable - or at least the hard won knowledge will be transferable.
Last edit: 26 Jan 2021 21:41 by Etaoin.

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

More
26 Jan 2021 21:49 #196667 by cmorley
Convenience buttons such as user system picking is highly a personal choices.
If you change user systems alot then a button is much nicer. I bet most don't often.
These are the things that can be easily changed later.

Css is not supported in gtk2 - the version of GTK linuxcnc currently supports
If you wish to target the released 2.8 version GTK2 is what's used.

It's an unfortunate time to pick GTK for a new screen.
We use a very old version in linuxcnc and there are people apparently working on a GTK3 update but no idea on when that would be incorporated into linuxcnc.
At that point though GTK2 will not be supported in the development version anymore.

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

More
26 Jan 2021 21:50 - 26 Jan 2021 21:51 #196668 by rodw
I have found touching off to G54 has worked much better for me on my plasma cutter. I think this is the intended use.

If you had a large milling machine with say 8 fixtures or say multiple vices on the table, the G54 et al offsets make sense.

If you run up the Gmoccapy sim, different modes are enabled if you click on the DRO's. I still don't understand what its doing...
Last edit: 26 Jan 2021 21:51 by rodw.

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

More
26 Jan 2021 21:53 #196669 by cmorley
GMoccpy shows absolute, relative and distance to go.
clicking the DRO just cycles which is shown in large font.

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

More
27 Jan 2021 01:32 - 27 Jan 2021 11:45 #196695 by Etaoin

Css is not supported in gtk2 - the version of GTK linuxcnc currently supports
If you wish to target the released 2.8 version GTK2 is what's used.

It's an unfortunate time to pick GTK for a new screen.
We use a very old version in linuxcnc and there are people apparently working on a GTK3 update but no idea on when that would be incorporated into linuxcnc.
At that point though GTK2 will not be supported in the development version anymore.


Crikey. That changes things. I'm not sure porting GladeVCP to GTK3 is even worth the effort now, seeing as GTK4 is already out . And having looked at some of the attempts, the changes involved - and what has been skipped - I'm inclined to say it would be better to start from scratch. In any case, this definitely dampens my enthusiasm somewhat.

And I was so chuffed with the " Tellite " style button I'd just designed :pinch:



It's made from two toggleButtons, which when placed in a grid with the class "tellite" will make them both depress and alternate regardless of where you click on the buttons. The styling too is automatic, thanks to the power of CSS. Just had to be done :) Here's the Python, it sets and clears the "inconsistent" state (":indeterminate" in the CSS) on the half that wasn't clicked to trigger the depressed styling, and forces the buttons to swap state:

  def onTellitePress(self, button, *args):
    self.get_twin(button).set_inconsistent(True)

  def onTelliteRelease(self, button, *args):
    self.get_twin(button).set_inconsistent(False)
  
  def onTelliteToggle(self, button, *args):
    self.get_twin(button).set_active(not button.get_active())

  def get_twin(self, button):
    siblings = set(button.get_parent().get_children())
    return siblings.difference({button}).pop()

And the CSS isn't too complicated either (this is only the "Tellite" specific bit - the rest of the styling is inherited from the regular toggleButtons):

button.toggle:active, button.toggle:indeterminate {
background-image: url("images/toggle_overlay_down.png");
}
  button.toggle:active label, button.toggle:indeterminate label {
  margin: 2px -2px -2px 2px;
  }

grid.tellite button {
padding: 0;
}
  grid.tellite button:first-child {
  border-bottom: none;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  }
  grid.tellite button:last-child {
  border-top: none;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
  }

Edit: Ah, problem. discourse.gnome.org/t/glade-for-gtk4/4877
Attachments:
Last edit: 27 Jan 2021 11:45 by Etaoin.

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

More
27 Jan 2021 02:38 #196698 by rodw
you might like to look at QTvcp that Chris and Phill et al are working on and is part of the linuxcnc distro

Or as an alternative, try qtpyvcp which is not part of the distro but lives here
www.qtpyvcp.com/
They have a very active chat I follow a bit on riot.im
They would probably be receptive to new widgets to do what you want.
The following user(s) said Thank You: Etaoin

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

More
27 Jan 2021 08:01 - 27 Jan 2021 08:22 #196707 by robertspark

help...{linux noob}
rob@RobsCNC:~/Downloads$ python3 main.py
Traceback (most recent call last):
  File "main.py", line 3, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'


Hmm. Looks like you don't have PyGObject installed (the language bindings between Python3 and GTK3). Try running "sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0" to get the dependencies. What Linux distribution are you using?


I installed via the linuxcnc iso (Debian buster, linuxcnc 2.8), upgraded linuxcnc to master, installed mate-desktop-envionment, installed glade-gtk2 from linuxcnc repository

forum.linuxcnc.org/48-gladevcp/40971-how...-get-gladevcp#196434

I am really playing with QT as glade does not seem to be the current recommended route for newer guis I think (I dabble and I'm a noob)
Last edit: 27 Jan 2021 08:22 by robertspark.
The following user(s) said Thank You: Etaoin

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

More
27 Jan 2021 12:57 - 27 Jan 2021 13:04 #196750 by Etaoin

I installed via the linuxcnc iso (Debian buster, linuxcnc 2.8), upgraded linuxcnc to master, installed mate-desktop-envionment, installed glade-gtk2 from linuxcnc repository


Seems the best way to ensure you get the correct packages, and package versions, to support LinuxCNC. Also saves you having to swap out the kernel. But I may have to do things manually since I would prefer to keep SystemD out. As you may know Debian forces SystemD on its users since Debian 9 ("Stretch"), so many people have jumped ship to a fork of Debian called Devuan , which does not have this hard dependency. Might seem like an insignificant issue to some - and if you don't care you don't care, that's not a problem. Thankfully, those who do care usually have a deep enough understanding of Linux/Unix to help themselves :)

I am really playing with QT as glade does not seem to be the current recommended route for newer guis I think (I dabble and I'm a noob)


I have a lot of respect for theoretical knowledge, but all I know I have learned through doing. And you have to start somewhere.
Last edit: 27 Jan 2021 13:04 by Etaoin.

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

More
27 Jan 2021 14:18 - 27 Jan 2021 14:20 #196762 by robertspark
didn't know anything about systemD

www.linux.com/training-tutorials/underst...g-and-using-systemd/

to be fair, I can't be bothered either.... does it work? {like arguing which is better, ford or gm?} ... does it really matter in the world of LinuxCNC where all you want is to machine / cut something out .... as long as it works and the cake tastes good, it doesn't matter what the baking tin or oven looks like or how it works. :)

(Lots of the software that linuxcnc runs on / requires is a little behind the newest, latest and greatest releases)
Last edit: 27 Jan 2021 14:20 by robertspark.
The following user(s) said Thank You: Etaoin

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

More
27 Jan 2021 14:50 #196769 by tommylight

Seems the best way to ensure you get the correct packages, and package versions, to support LinuxCNC. Also saves you having to swap out the kernel. But I may have to do things manually since I would prefer to keep SystemD out. As you may know Debian forces SystemD on its users since Debian 9 ("Stretch"), so many people have jumped ship to a fork of Debian called Devuan , which does not have this hard dependency. Might seem like an insignificant issue to some - and if you don't care you don't care, that's not a problem. Thankfully, those who do care usually have a deep enough understanding of Linux/Unix to help themselves :)

Removed:
forum.linuxcnc.org/18-computer/38342-iso...ysvinit-distribution
Still available:
forum.linuxcnc.org/9-installing-linuxcnc...tools-and-no-systemd
I hated Mint for that, but it is by far the best distro, so i continued using it. Then they refused Snap, so i started loving them again and send them some money whenever i can afford it.
The following user(s) said Thank You: Etaoin

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

Time to create page: 0.213 seconds
Powered by Kunena Forum