|
1 | 1 | This folder contains a number of simulated lathe configs. |
2 | 2 |
|
3 | 3 | the "lathemacro" config offers a number of simple macros to perform |
4 | | -the most common lathe operations. |
| 4 | +the most common lathe operations. |
5 | 5 |
|
6 | 6 | The GUI that controls the macros can be viewed by clicking the "Cycles" |
7 | | -tab top left of the graphical preview window. |
| 7 | +tab top left of the graphical preview window. |
| 8 | + |
| 9 | +There are two load-time options to control the tab behaviour: |
| 10 | +1) norun will hide the action button, use this if you want to use only |
| 11 | +a physical button (connected to gladevcp.cycle-start) to start the macros |
| 12 | +(Strongly recommended, especially with Touchy) |
| 13 | +2) notouch will allow keyboard editing of the spinboxes. Otherwise the |
| 14 | +custom numeric keyboard will be shown. |
| 15 | + |
| 16 | +An example loadrt line, as used here in the Gmoccapy demo is: |
| 17 | + |
| 18 | +[DISPLAY] |
| 19 | +EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui |
| 20 | + |
| 21 | +The window will resize slowly if you grab the corner and move the mouse |
| 22 | +inside the window. It's not as bad as it was, but still needs work. |
| 23 | +You may need to click the unmaximise button in the toolbar to get a |
| 24 | +window border to be able to use the resize handles. |
| 25 | + |
| 26 | +Notes on the keyboard: |
| 27 | +As well as the obvious functions and unit conversions, it can be used to |
| 28 | +enter fractions. For example if you type 1.1/2 it will automatically |
| 29 | +update to display 1.5000 and 16.17/64 will show 16.2656. |
| 30 | +This can be used in a limited way to halve the onscreen value eg for |
| 31 | +entering radius instead of diameter. |
| 32 | +However it only works for whole numbers: 100/2 will become 50 but |
| 33 | +3.14149/2 is interpreted as 3 and 14 thousand halves so won't work. |
| 34 | + |
| 35 | +Notes on adding your own cycles: |
| 36 | +Greate a new G-code subroutine in the same format as the existing ones. |
| 37 | +In Glade add a new tab to the 'tabs1' notebook and give it a name matching |
| 38 | +the new cycle. |
| 39 | +Edit the action button (inside an eventbox) to call the new G-code sub. |
| 40 | +Rename the action button to match the tab name and append '.action' eg |
| 41 | +MyCycle.action |
| 42 | + |
| 43 | +Create new artwork. I used Fusion360, the models are here: |
| 44 | +https://a360.co/3uFPZNv |
| 45 | +and the drawings are here: |
| 46 | +https://a360.co/3uFPZNv |
| 47 | +Esport the drawing page as PDF and import into the lathemacro.svg file in |
| 48 | +Inkscape. You will need to resize. Add your own arrows and annotations. |
| 49 | + |
| 50 | +Save the new layer in a layer named "layerN" (lower case) where N is the |
| 51 | +tab number, starting at zero. You will need to invoke the XML editor for |
| 52 | +this (Shift-Cmd-X on Mac) |
| 53 | + |
| 54 | +The entry boxes are positioned relative to a 1500 x 1000 image; the |
| 55 | +original size of the SVG. So you can hover your mouse over the image in |
| 56 | +Inkscape to determine the coordinates. |
| 57 | +In the in the case of on-drawing controls the coordinates are entered as |
| 58 | +an XML comment in the Tooltip for the control in x,y format (The surface speed, |
| 59 | +tool and coolant do not need this, they are in a fixed table) |
| 60 | + |
| 61 | +An example: |
| 62 | + |
| 63 | +<!--300,711->Peck distance |
| 64 | + |
| 65 | +Make sure the comment has "use markup" selected for the tooltip. |
| 66 | +Also ensure that the control has the "show_keyb" function allocated for |
| 67 | +the Widget->button_press event. If you copy-paste a tab and copy-paste |
| 68 | +extra controls this should be automatic. |
| 69 | +_All_ your new spinboxes will need their own new Adjustment, or they will |
| 70 | +change value when you alter the original spinbox that they are a copy of. |
| 71 | + |
8 | 72 |
|
0 commit comments