Axis/joint naming (lathe subspindle)

More
31 Aug 2023 13:19 #279470 by spumco

The problem with the preview/backplot window is the limited customization options which makes it quite useless in more complex setups. Would be nice to have the possibility to rotate and mirror through external commands.

I think that's what I stumbled across yesterday - external control of the backplot view.

I looked in the QtPyVCP tutorial and found the backplot setup page.  The tutorial describes creating buttons and linking them to the backplot view orientation and zoom controls.

 

I'm speculating that if we can do something with on-screen buttons, maybe we can do the same thing with external controls (i.e. an M-code or hal pin or similar).

And the LCNC user manual page for QtVCP has similar description of setting the view for the backplot widget used in QtVCP GUI's.

 

While it's likely going to be a pain to figure this out, it looks promising.  I'm envisioning the backplot automatically flipping between front tools and back tools (flip along Z), as well as main and subspindle views (flip along X) depending on what's being used at that point.
Attachments:
The following user(s) said Thank You: Aciera

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

More
31 Aug 2023 14:31 #279480 by Aciera

I'm envisioning the backplot automatically flipping between front tools and back tools (flip along Z), as well as main and subspindle views (flip along X) depending on what's being used at that point.

Yes that is what I'm thinking as well and I'm sure it can be done but I really can't find my way through the source code. Would be great if you could find the relevant sections.

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

More
31 Aug 2023 14:50 - 31 Aug 2023 18:17 #279482 by Aciera
Actually I think I may have found it in '/lib/python/glnav.py'

 

[Edit]
I have managed to modify 'axis.py' so I can use a motion.analog-out-NN pin to choose the preview orientation. So far only the predefined views from the gui buttons can be selected.  
Attachments:
Last edit: 31 Aug 2023 18:17 by Aciera.
The following user(s) said Thank You: spumco

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

More
31 Aug 2023 22:01 #279520 by spumco
Thanks for poking around in the code!

I'm not really ready to implement this stuff yet - or at least fiddle around in the code.  Not that I know anything about backstage code stuff, but my lathe is about 40% complete and the computer is hibernating in the operator panel (minus all wiring & electricity).

Looking at what you posted, I wonder if additional pre-defined views can be added?  Maybe a "Z3" or "X2" that can be called using the analog hal pin you used?

I also fear anything useful is going to be GUI-specific rather than a universal solution.  While looking around during my last post I did check the code in the qtpyvcp repo and found similar, but not identical, files/code in one of the widget folders.  Basically the same thing, with similar-named pre-defiend views.

Maybe a pull request, or a new topic in one of the GUI forums to get some developer help (or ideas) on how to achieve a more GUI-agnostic view flipping feature?  I'd really like to see something integrated with the tool table (or similar) so that calling a tool number with a back-tool flag set will automatically flip the view.

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

More
01 Sep 2023 07:05 - 01 Sep 2023 12:21 #279547 by Aciera
The end result for now is:
- custom views can be added to 'glnav.py' like this

 

- then use this modification of 'axis.py' to activate the above 'y3' view when 'tool_in_spindle' number is 2 and perspective view for all other tools:

 


The example 'Y3' view looks like this:

 
Attachments:
Last edit: 01 Sep 2023 12:21 by Aciera.

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

More
01 Sep 2023 07:24 - 01 Sep 2023 18:40 #279550 by Aciera
Optionally the above custom 'y3' view can easily be added to the 'View' menu by modifying 'axis.tcl':

 

and adding the y3 custom view to the TclCommand class in axis.py:

 
Attachments:
Last edit: 01 Sep 2023 18:40 by Aciera.
The following user(s) said Thank You: tommylight, spumco

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

More
01 Sep 2023 17:56 #279595 by spumco
You're awesome.  Bookmarked for future use.

Hoping I can get the rest of the hard parts machined this weekend and start assembling the lathe.

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

More
05 Feb 2024 03:56 - 05 Feb 2024 03:57 #292482 by spumco
Resurrecting this one as I'm at the point of fiddling with the GUI.

I've edited axis.py, glnav.py, and axis.tcl as indicated.  However, the additional view is not showing up in axis menu or view buttons.

Tried changing INI to [DISPLAY] LATHE=0, and [DISPLAY] GEOMETRY=XYZCV but still no joy.  Wonder if the preview takes the data from [TRAJ] and not [DISPLAY].

I suspect I'll have to sort this out for the particular GUI once I decide on one.
Last edit: 05 Feb 2024 03:57 by spumco. Reason: I can spells good

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

More
05 Feb 2024 05:52 - 07 Feb 2024 00:29 #292485 by phillc54
I have managed to get this working as a  USER_COMMAND_FILE .
Attachments:
Last edit: 07 Feb 2024 00:29 by phillc54.
The following user(s) said Thank You: Aciera, spumco

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

Time to create page: 0.334 seconds
Powered by Kunena Forum