Skip to content

Add a conventional UI layer #8

@tdeck

Description

@tdeck

Since most users have no experience with the command line, learning those skills presents a significant barrier to getting started with designing and printing using 3DMake. This issue is a place to discuss approaches.

Since the command line interaction is easy to automate, there's always the option for anyone to create a wrapper that calls the 3DMake commands. This could be written in any language and use almost any technology. For example, someone could write a hosted web editor and slicer that uses 3DMake. It would also be nice to have plugins for popular editors etc...

I'd like to explore the idea of adding a lightweight and functional GUI to 3DMake itself. Since @ashleycox interested as well, here's a brain dump from my point of view:

Functional requirements

  • Be able to work with both 3DMake projects (designing, slicing) and downloaded STL files
  • Be able to do the settings involved in 3dm setup
  • Natural interaction paradigm (
  • Cross platform. Largely (~90% or more) the same code for Windows, Linux, MacOS)
  • Obviously, works well popular screen readers
  • Should work well for sighted people as well
  • Graphical install and setup (I.E. no need to touch the CLI at all). Installer can be separate from main UI

Architecture goals

  • Keep the CLI working. It's useful and it lets other folks build different UIs in the future more easily.
  • Share as much logic as possible with the CLI implementation. Duplicated logic makes for a mess in the long term and becomes a burden.
  • UI is testable
  • Lightweight addition. As nice as web-based UI development can be, I'd prefer to not ship a whole browser runtime for 3DMake's straightforward UI needs
  • Maintainable strategy for the large number of slicer settings (see challenges section)(
  • I'd prefer not to maintain my own custom text editor as part of this. There are plenty of good editors out there already that are better than whatever would end up in 3DMake. Embedding something full-featured would be fine.
  • Something structured in a way where we can build it up gradually rather than adding the whole UI in one big commit is a must.

Challenges

  • Slicer settings. The simplest is to give people a set of name/value pairs, like the config files we currently have. A search box and categories would be trivial to add. But that's not a great experience. Settings have types, and allowed values. Some are enums. Some are integers. Some are floats. Some are multi-line GCode scripts. We can use an LLM to help with this to some extent, but I also feel like I'll need to check over it.
  • 3dm setup. This is one of the few interactive flows in 3DMake and its one-at-a-time question interaction paradigm doesn't translate very well to a GUI paradigm, where you'd like to see the different branches of options all at once and be able to toggle between things like Gemini and Ollama setup. I think this might be an area where we just duplicate the logic and write the file from the GUI.

Random thoughts

A VS code plugin would probably be a quick win to give a lot of the benefits for project-based work, although using VS code to print downloaded STLs would be a bit odd. It would also allow progressive enhancement as we go (e.g. first we just show a settings file, then add some kind of auto-complete or linting to it to help users edit their profile correctly).

If we build a wrapper, the CLI can be invoked in some mode where it presents certain output in a machine-readable way.

I haven't researched UI frameworks enough to have any opinion yet. My bias is toward something with Python bindings so that automated testing and packaging will be easier. I'm not sure which of the architectural goals we might have to trade off yet either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions