Axis/joint naming (lathe subspindle)

More
3 years 2 months ago #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.

 

Attachment not found



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.

 

Attachment not found



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.

Please Log in to join the conversation.

More
3 years 2 months ago #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 to join the conversation.

More
3 years 2 months ago #279482 by Aciera
Actually I think I may have found it in '/lib/python/glnav.py'

 

Attachment not found



[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.  

Please Log in to join the conversation.

More
3 years 1 month ago #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 to join the conversation.

More
3 years 1 month ago #279547 by Aciera
The end result for now is:
- custom views can be added to 'glnav.py' like this

 

Attachment not found



- 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:

 

Attachment not found




The example 'Y3' view looks like this:

 

Attachment not found

Please Log in to join the conversation.

More
3 years 1 month ago #279550 by Aciera
Optionally the above custom 'y3' view can easily be added to the 'View' menu by modifying 'axis.tcl':

 

Attachment not found



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

 

Attachment not found

Please Log in to join the conversation.

More
3 years 1 month ago #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 to join the conversation.

More
2 years 8 months ago #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.

Please Log in to join the conversation.

More
2 years 8 months ago #292485 by phillc54
I have managed to get this working as a  USER_COMMAND_FILE .

Please Log in to join the conversation.

Time to create page: 0.254 seconds
Powered by Kunena Forum