evil-mad / axidraw

Software for the AxiDraw drawing machine
GNU General Public License v2.0
432 stars 131 forks source link

Add certain manual commands to the AxiDraw submenu in Inkscape #48

Closed MartyMacGyver closed 5 years ago

MartyMacGyver commented 6 years ago

Manual AxiDraw commands require up to five clicks to access in Inkscape. This could be made much easier by having certain commands activate directly from the cascading extension menus (e.g., pen control, motor control, and version info). PR #46 illustrates this.

oskay commented 6 years ago

Thanks for these suggestions! I appreciate the effort that you are putting in here.

About this topic in general: I can see a reasonable argument for having a few extra top-level commands of this nature, however, there's a solid argument for not adding them as well. For the vast majority of AxiDraw users, having to look through the list and pick which AxiDraw item to select is a bit of added user-interface friction, and one would need to argue that the added utility of these items is worth that cost. The way that we've handled this need for additional "utility" extensions in other contexts (such on the EggBot) is to put them into an additional submenu in extensions, that might be called "AxiDraw Utilities" for example. One of the ways that this kind of thing can get super-useful is that you can actually custom assign keyboard shortcuts to each extension.

Is there already quite a bit of UI friction on these particular commands? Yes indeed. However, it is my view that this is reasonable and appropriate for infrequently accessed menu items like these; that's why they're hidden away in the manual tab. One alternative idea might be to almost entirely eliminate the manual tab, in favor of independent utility functions. However, the pen lift and lower commands really should stay in the main extension, for reasons that we'll get to shortly.

I'll also note that we have occasionally built custom extensions of this type for end users-- a separate menu item to do a particular command (for example, manual move X 1 cm right or left) that they would use every day. However, none of them yet has risen to the level of utility that we thought justified the additional UI friction.

About the individual extensions:

On the coding of these extensions: It appears to me that each of these extensions can be written without changes to axidraw.py, simply making use of using existing functionality. I'm attaching two example extensions that show how one can do this. Nothing in this issue description suggests that any changes to axidraw.py are likely to be required, even if the full proposal were to be accepted.

added extensions.zip

MartyMacGyver commented 6 years ago

Except for conditions that would have an actual need for specific options being set I see all these and more as top-level menu items. Clicking twice to open the control, then finding the tab, then selecting from a dropdown, and finally clicking apply should not be necessary for trivial operations. Indeed, I'd remove the dropdown entirely and replace it with single commands such as these (except for walking the carriage).

Enabling motors: complementary commands aren't a bad thing - if you disable motors to position the pen holder, you may wish to re-enable them so you don't lose your place as you, say, replace a pen. I'd suggest toggle pen/toggle motor state buttons instead, but as they may not be aware of the current state they'd only work right some of the time on the first click.

I didn't know that about the pens and the extension settings - as I find myself doing that frequently, it seemed useful, but obviously it could be tricky for custom settings.

The ones I'd add to this list include starting a plot, resuming an interrupted plot, and returning to home after interruption. (Edit: but if Inkscape's settings are as inflexible and limited as they apparently are, then perhaps that won't work...)

If the extensions work fine as-is, then indeed the code may not need updating for this. I see from the attached examples how this ought to work. However, if the changes are undesirable on the main then I'll just keep using them on my own branch.

oskay commented 6 years ago

Again, I have built extensions like this quite a few times in the past; these do occasionally come in handy for folks. Accordingly, it may make sense to add the ones that will consistently work as expected to the repository and keep them up to date as optional add-ons for people who want them.

I'm not certain that there's no way to access the preferences from out of scope. They are stored in an accessible location on the computer, and one might possibly be able to "cheat" and just read them anyway: http://wiki.inkscape.org/wiki/index.php/Preferences_subsystem

oskay commented 5 years ago

Of the ones under discussion, I've added a "disable motors" extension in the repository and it will be making its way into the installers and documentation this week.

The others are more challenging for the reasons noted above; I am closing this for now but please feel free to revisit if you are so inclined.