Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for SimplyPrint cloud integration #4387

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

Ocraftyone
Copy link

  • Port new UI Jobs and related commits from PrusaSlicer

  • Add HttpServer from Orca/BBL and remove BBL specific logic

  • Add OAuthJob

  • Add support for cloud-based print hosts

  • Add SimplyPrint as a print host

Noisyfox and others added 21 commits July 22, 2024 20:55
Note: This does not compile. This is an initial port of the commit.

* Make httpserver more generic and reusable

* Add OAuthJob

* Fix issue caused by the fact that the backing widget of the `TextCtrl` is no longer `wxTextCtrl`

* Implement login and token refresh

* Implement file upload

* Try fix build error

* Support BBL printers

* Show error message if user hasn't done OAuth

* Fix typo

* Update error message

* Disable unsupported options when SimplyPrint is selected

(cherry picked from commit e29bbac1933b9b10b24421757c5165d9b1702d06)
Co-authored-by: Ocraftyone <ocraftyone@users.noreply.github.com>
…#4831)

Note: Does not compile.

* Allow using BBL's device tab when 3rd party print host is used

* Add option to open SimplyPrint panel in device tab after uploading

* Fix default print host for prusa connect

* Do not set api key in device view when SimplyPrint is used

* Sending 3mf file to SimplyPrint when using BBL printers

* Fix file extension when uploading 3mf

* Prepare for large file uploading

* Implement chunk upload

* Fix file uploading exceeding content size

* Fix wrong field type

* Add `temp=true` to all chunk upload calls

* Add macro to enable test api

* Merge branch 'main' into dev/simplyprint-improve

* Fix another missing `temp=true`

* Add delete token

* Try fixing build error on *nix systems

* Merge branch 'main' into dev/simplyprint-improve

* Merge branch 'main' into dev/simplyprint-improve

* Merge remote-tracking branch 'remote/main' into dev/simplyprint-improve

# Conflicts:
#	src/slic3r/GUI/BackgroundSlicingProcess.cpp

* Move the `bbl_use_print_host_webui` option to print host dialog. Also make it a derived option of `print_host_webui` instead.

* Merge branch 'main' into dev/simplyprint-improve

# Conflicts:
#	src/slic3r/GUI/MainFrame.cpp
#	src/slic3r/GUI/Plater.cpp

* Merge branch 'main' into dev/simplyprint-improve

# Conflicts:
#	src/slic3r/GUI/Plater.cpp

* Use a more generic option instead of SimplyPrint specific

* Merge branch 'main' into dev/simplyprint-improve

* Merge branch 'main' into dev/simplyprint-improve

(cherry picked from commit cd6cd0786fc494d2f1e2fd2123e791f65fbcc97a)
Co-authored-by: Ocraftyone <ocraftyone@users.noreply.github.com>
Cherry-picked commits from prusa3d/PrusaSlicer related to the new system for UI Jobs

Commits included:

Add comments, remove some redundant template fiddling

Also make ThreadSafeQueueSPSC not copyable and non movable

(cherry picked from commit 7975dfa)

Log time for loading fonts

(cherry picked from commit fe90a88)

log as info job processing time

(cherry picked from commit 2d66607)

Fix crash in gcc on Linux

(cherry picked from commit 155b152)

Trying to fix hanging job tests on windows

The issue might be that the worker's m_running flag is not set atomically. It is possible that the finalize message is pushed and is consumed before setting the running flag to false. See the loop in BoostThreadWorker::run

(cherry picked from commit ca824e0)

Fix return value when create job

(cherry picked from commit 95178a2)

Let's not call yield in PlaterWorker

Not worth the risk, needs further investigation

(cherry picked from commit 345ee7c)

Fix PlaterWorker not calling yield from main thread

Also fix UIThreadWorker not setting busy cursor

(cherry picked from commit cf16daf)

Add UIThreadWorker for debugging and profiling purposes

(cherry picked from commit 9892893)

Clarify comments for thread safe queue

Cleanup

(cherry picked from commit 3a1eee0)

Add possibility to wait for current job to stop.

(cherry picked from commit 43f5e61)

Replace std::variant with boost::variant

Unavailable on MacOS < 1.14

(cherry picked from commit 4d0088e)

Rename start_next() to push

PlaterJob refinements

(cherry picked from commit 583c123)

Fix issue with non atomic transition to running state

After popping a job from input queue

(cherry picked from commit 7e070d3)

Avoid issue with invisible status indication.

(cherry picked from commit 17f4b1b)

Make a PlaterWorker to handle PlaterJobs

(cherry picked from commit 3be7d5f)

Prevent accidental stopping of BoostThreadWorker before destruction

(cherry picked from commit a802bdc)

Rework UI jobs to make them more understandable and flexible.

(cherry picked from commit b53ff75)

Co-authored-by: Filip Sykala - NTB T15p <filip.sykala@prusa3d.cz>
Co-authored-by: Ocraftyone <ocraftyone@users.noreply.github.com>
A copy of PlaterWorker.hpp, but it is for any generic wxWindow
…/OrcaSlicer#5992)

(cherry picked from commit adec6b7ebdd91a71c61505dd4e1cc5ee9e17afcc)
Currently, there is no functionality
The version of Boost used by SuperSlicer does not have this type defined
…TextCtrl` is no longer `wxTextCtrl`"

SuperSlicer still uses wxTextCtrl as the sole backing widget of text fields
-Remove BBL specific logic

-Add check for valid request handler on start. With BBL no longer the default, it is possible for a request handler to not be set during development. There is now a check that will throw a RuntimeException if it is not valid.
@supermerill
Copy link
Owner

I didn't have much time rn, maybe next week.

@Ocraftyone
Copy link
Author

I didn't have much time rn, maybe next week.

No worries!

@Ocraftyone
Copy link
Author

Hey @supermerill. Just checking in on this. Do you have any questions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants