SoftFever / OrcaSlicer

G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
https://discord.gg/P4VE9UY9gJ
GNU Affero General Public License v3.0
7.43k stars 890 forks source link

Web Interface - Ability to control OrcaSlicer from a web browser, upload files from device to project, etc #7359

Open MistressPlague opened 3 weeks ago

MistressPlague commented 3 weeks ago

Is there an existing issue for this feature request?

Is your feature request related to a problem?

Ish - There's no use of orcaslicer for mobile users or people not near a computer. A web interface would solve that entirely.

Which printers will be beneficial to this feature?

All

Describe the solution you'd like

It should host the same ui as on computer onto a web interface, based on capture of its own window for example, and allow full control of it through said web ui. It should have a added handler for drag and drop as well as a overlay upload button to upload files to the currently open project. This would open up using the slicer entirely, even on a phone.

Describe alternatives you've considered

No response

Additional context

I can assist further with technical ideas, as I do programming myself, feel free to ask for elaborations.

MistressPlague commented 3 weeks ago

Effectively the software would act as the server, and serve a image as the html, and wherever clicked is then sent to server, where it will figure out what control to click on, and will programmatically click on that control.

Do not use windows api level clicking, as that would inhibit use of said computer while the slicer is in use. This opens up someone else using said computer while someone else in the household could slice something. While the web ui is in use, it would also be worthwhile to suppress any focus calls or similar so the orca is effectively silent on the computer, not disturbing the computer, but instead using the js alert function for notifications, etc.

I truly believe this as a feature would be MASSIVE. It would make orcaslicer effectively all-platform, as all it needs is a server system to host it; for example someone could host it in a docker container on a server or in homeassistant (when someone makes a hacs addon for it or just uses docker in it) and then use orca on any device on the local network.

In the future, too; authentication to drive multi-instance could be added so it could be even public-facing provided the person doing such as isolated the host system access outside of the scope of the container, effectively implying each new login is a new orcaslicer instance started for their usage; killed after 1 hour of continuous inactivity (configurable delay)

Ambitious, but a very important feature for the future of orca's relevance, as it would be quite difficult for competition to keep up with such compatibility and expandability.

MistressPlague commented 3 weeks ago

So, to summarize the steps for a initial build of this, this is what is needed to be done:

  1. Host a TCP server for the web interface
  2. Reply with a window capture of orca slicer
  3. Have JS on the client side send the x & y of where they selected, and send both clickdown and clickup to account for hold clicking / dragging
  4. Handle such on server, if down and up was within a tolerance of time, click the control at the location, otherwise calculate the start and end location and handle such on server.

Potential expandable parts:

MuldersMakes commented 3 weeks ago

wouldnt this be as viable? https://github.com/linuxserver/docker-orcaslicer

B4sicallyF0x commented 3 weeks ago

wouldnt this be as viable? https://github.com/linuxserver/docker-orcaslicer

That would work, but people would need to install docker and then orcaSlicer. The idea is to have an integrated web server on the actual orcaSlicer, so it's more accessible for people to use it, wasting less resources

MuldersMakes commented 3 weeks ago

wouldnt this be as viable? https://github.com/linuxserver/docker-orcaslicer

That would work, but people would need to install docker and then orcaSlicer. The idea is to have an integrated web server on the actual orcaSlicer, so it's more accessible for people to use it, wasting less resources

its bloated and lags as it is, with only really having 4 workable instances already, doesnt need more bloat.

B4sicallyF0x commented 3 weeks ago

wouldnt this be as viable? https://github.com/linuxserver/docker-orcaslicer

That would work, but people would need to install docker and then orcaSlicer. The idea is to have an integrated web server on the actual orcaSlicer, so it's more accessible for people to use it, wasting less resources

its bloated and lags as it is, with only really having 4 workable instances already, doesnt need more bloat.

Idk, works fine for me on desktop

MuldersMakes commented 3 weeks ago

wouldnt this be as viable? https://github.com/linuxserver/docker-orcaslicer

That would work, but people would need to install docker and then orcaSlicer. The idea is to have an integrated web server on the actual orcaSlicer, so it's more accessible for people to use it, wasting less resources

its bloated and lags as it is, with only really having 4 workable instances already, doesnt need more bloat.

Idk, works fine for me on desktop

with 4-6 instances?

B4sicallyF0x commented 3 weeks ago

wouldnt this be as viable? https://github.com/linuxserver/docker-orcaslicer

That would work, but people would need to install docker and then orcaSlicer. The idea is to have an integrated web server on the actual orcaSlicer, so it's more accessible for people to use it, wasting less resources

its bloated and lags as it is, with only really having 4 workable instances already, doesnt need more bloat.

Idk, works fine for me on desktop

with 4-6 instances?

I never needed 6 instances, but I'll try later and will let you know

B4sicallyF0x commented 1 week ago

wouldnt this be as viable? https://github.com/linuxserver/docker-orcaslicer

That would work, but people would need to install docker and then orcaSlicer. The idea is to have an integrated web server on the actual orcaSlicer, so it's more accessible for people to use it, wasting less resources

its bloated and lags as it is, with only really having 4 workable instances already, doesnt need more bloat.

Idk, works fine for me on desktop

with 4-6 instances?

Just tried. 6 OrcaSlicer instances opened with projects loaded, works perfectly. They do took a long time to boot, but once opened, they work just fine. Using OrcaSlicer 2.1.1 on a Intel i7-1255U with 16GB RAM