Axis Modifications

More
3 years 5 months ago #270869 by D.L.
Replied by D.L. on topic Axis Modifications
A small improvement to my mod: icons have been added to show the enabling of the adaptive feed and the spindle-at-speed signal.

 

Attachment not found



The spindle-at-speed signal is connected only in the custom_postgui.hal file, for example:
Code:
net spindle-at-speed => axisui.display-spindle-at-speed

Mod links:
github.com/ddotldot/linuxcnc/tree/2.8-axis-mod
github.com/ddotldot/linuxcnc/tree/2.8-ax...-updated-mesa-driver

Please Log in to join the conversation.

More
3 years 2 months ago #277677 by Vector
Replied by Vector on topic Axis Modifications
Sorry to circle the discussion back to a very old question in this thread...

But I can't find the axis.py file.

I'm on LinuxCNC 2.9.0-pre1-1066-g8fd469d67 on Bookworm, using the update repository.

I found the source on github, at =11.0ptlinuxcnc/src/emc/usr_intf/axis/scripts,  so that's helpful

I found axis.tcl at /usr/share/axis/tcl/

Where does one go to figure out how to write/modify a custom layout python script? I thought those were the two pieces (axis.py and axis.tcl). I mainly want to make items bigger for ease on aging eyes and for clicking the right buttons. I'm having some success working from other axis examples, but they don't all hit the panel items I want to hit, so I need to know their names and properties.

That stuff is probably all in axis.tcl, but I feel somehow incomplete. :-/

 

Please Log in to join the conversation.

More
3 years 2 months ago #277683 by cakeslob
Replied by cakeslob on topic Axis Modifications

Sorry to circle the discussion back to a very old question in this thread...

But I can't find the axis.py file.

I'm on LinuxCNC 2.9.0-pre1-1066-g8fd469d67 on Bookworm, using the update repository.

I found the source on github, at =11.0ptlinuxcnc/src/emc/usr_intf/axis/scripts,  so that's helpful

I found axis.tcl at /usr/share/axis/tcl/

Where does one go to figure out how to write/modify a custom layout python script? I thought those were the two pieces (axis.py and axis.tcl). I mainly want to make items bigger for ease on aging eyes and for clicking the right buttons. I'm having some success working from other axis examples, but they don't all hit the panel items I want to hit, so I need to know their names and properties.

That stuff is probably all in axis.tcl, but I feel somehow incomplete. :-/


 

its mixed into both. the best, most mobile way to do it is with axisrc, or usercommand.py file
linuxcnc.org/docs/2.9/html/gui/axis.html#_user_command_file

(shameless self plug) check out this axis mod, i have a thing in there for text size. you can use it as reference
forum.linuxcnc.org/21-axis/49372-regular...od-based-on-plasmac2

Please Log in to join the conversation.

More
3 years 2 months ago #277693 by Vector
Replied by Vector on topic Axis Modifications
OMG, this is awesome! I was specifically working on making those darn buttons bigger, and you've already gone and solved that.

Thank you thank you.

I might tweak it ever-so-slightly, but you've saved me a boatload of squinting and suffering! Thank you.

Please Log in to join the conversation.

More
3 years 2 months ago #277748 by cakeslob
Replied by cakeslob on topic Axis Modifications
if you do something cool, post it up, or if you have any issues or questions about it feel free to ask in the other thread and we can take care of it probably

Please Log in to join the conversation.

More
2 years 3 weeks ago #311551 by freemoore
Replied by freemoore on topic Axis Modifications
Re: D.L.'s axis mods:
I tried installing the axis mod for spindle speed/feed per tooth etc. and found the following:

I followed the instruction here "1. Replace files(axis, axis.tcl and glcanon.py) in existing installation LinuxCNC v2.8.2, begins to work immediately."

and got the error 'option values must be strings'

traced that to lines 3100-3103 in the 2.9 branch of this code on github, each of which has False as the last term.
Added quotes to make them strings e.g.:

vars.show_spindle_rpm.set(ap.getpref("show_spindle_rpm", "False"))

and axis now starts without error. Haven't got the mod to work yet but still working on it.

Please Log in to join the conversation.

More
1 year 9 months ago #318500 by nawaf
Replied by nawaf on topic Axis Modifications
Hi, BigJohnT,

Thank you for the information about axis modification.

I have a question regarding 'Changing the size of the file open dialog.' I followed the instructions and successfully resized it.

However, is it possible to also change the size of the 'Open' and 'Cancel' buttons? How can I adjust their size?

Please Log in to join the conversation.

More
1 year 9 months ago #318600 by cakeslob
Replied by cakeslob on topic Axis Modifications
hmm i never realized thats what it meant, adjust the file dialog box.

I dont know how, but I want to know how. to resize buttons and everything else. or, even replace it with a different file dialog

I found the lib file that it uses
github.com/tcltk/tk/blob/main/library/tkfbox.tcl

github.com/tcltk/tk/blob/main/library/tkfbox.tcl#L446
here is the button
Code:
set data(okBtn) [::tk::AmpWidget ttk::button $f2.ok \ -text [mc "&OK"] -default active];# -pady 2p] bind $data(okBtn) <Destroy> [list ::tk::dialog::file::Destroyed $w] set data(cancelBtn) [::tk::AmpWidget ttk::button $f2.cancel \ -text [mc "&Cancel"] -default normal];# -pady 2p]

but now I dont know how to configure it in the bigfile.tcl

Please Log in to join the conversation.

More
1 year 9 months ago #318684 by phillc54
Replied by phillc54 on topic Axis Modifications
ttk buttons have no height or width configuration options so in this instance the easiest way is to add newlines and spaces around the text.
Something like the below inserted immediately before the return should look reasonable.
Code:
    after 0 {.__tk_filedialog.contents.f2.ok configure -text "\n          Open          \n"              .__tk_filedialog.contents.f2.cancel configure -text "\nCancel\n"             }

Please Log in to join the conversation.

More
1 year 9 months ago #318714 by cakeslob
Replied by cakeslob on topic Axis Modifications
that works, thanks phil.

when I say works, only the first time you open a filedialog (or multiple times within 1-2 seconds of opening axis) then it stops working.
Code:
root_window.tk.call("source","bigfileopen.tcl")
putting this line in my userlive_update makes it work only sometimes

possibly need to do a python instead having it inside of a separate tcl file?

Please Log in to join the conversation.

Time to create page: 0.148 seconds
Powered by Kunena Forum