-
Notifications
You must be signed in to change notification settings - Fork 303
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 #4783
base: master
Are you sure you want to change the base?
Support for SimplyPrint cloud integration #4783
Conversation
* 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 <[email protected]>
* 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 <[email protected]>
Cherry-picked commits from prusa3d/PrusaSlicer related to the new system for UI Jobs OrcaSlicer's port of this rework by noisyfox was also used at times as a reference to help with the BBL specific changes needed for the port. The OrcaSlicer port is part of commit 933aa3050bf5297b3714fb59575b3ec86e017112. Commits included: Add comments, remove some redundant template fiddling Also make ThreadSafeQueueSPSC not copyable and non movable (cherry picked from commit 7975dfab26e7cc0d1d5c0070e369a4f0777131b7) Log time for loading fonts (cherry picked from commit fe90a88b4d3b6c51e28161ff06bc8f8deb6fb592) log as info job processing time (cherry picked from commit 2d66607440b3ae821bd0559d84a3308e4296045f) Fix crash in gcc on Linux (cherry picked from commit 155b152637b843fac06c8c71300b6e2da793ff5c) 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 ca824e095e9a0ead367b3f1929c49d40cc21e7e0) Fix return value when create job (cherry picked from commit 95178a2ba3943e20cfd56d1dd6fbb71d2027064c) Let's not call yield in PlaterWorker Not worth the risk, needs further investigation (cherry picked from commit 345ee7cf28442980009ed790edc44c7bf40e7a11) Fix PlaterWorker not calling yield from main thread Also fix UIThreadWorker not setting busy cursor (cherry picked from commit cf16dafad943b6869cc93ffa4b8c7440b6b21a09) Add UIThreadWorker for debugging and profiling purposes (cherry picked from commit 98928935877b3ec25a62c8fec1fc28642fff6b23) Clarify comments for thread safe queue Cleanup (cherry picked from commit 3a1eee0f219a1cafebae37ea5107fa7af45397ab) Add possibility to wait for current job to stop. (cherry picked from commit 43f5e61b5f602e0bc33a3b4a1724123768871614) Replace std::variant with boost::variant Unavailable on MacOS < 1.14 (cherry picked from commit 4d0088e72f029c1dcafec99a1306ef0fc601bda6) Rename start_next() to push PlaterJob refinements (cherry picked from commit 583c123c9703d95a4ae944c981554e7fda3a57d0) Fix issue with non atomic transition to running state After popping a job from input queue (cherry picked from commit 7e070d393ec536682bfa34fbd6bd7cf661353f8f) Avoid issue with invisible status indication. (cherry picked from commit 17f4b1bea317a0cf59762ce830cc6439c18058c1) Make a PlaterWorker to handle PlaterJobs (cherry picked from commit 3be7d5f0dc864a54ba646d643f397c6e67790dfd) Prevent accidental stopping of BoostThreadWorker before destruction (cherry picked from commit a802bdc764d4319af2aaaaca3d9adaa7c2aa9dd4) Rework UI jobs to make them more understandable and flexible. (cherry picked from commit b53ff75cf460d0bc5404729c1d02dddf3a6224d5) Co-authored-by: Filip Sykala - NTB T15p <[email protected]> Co-authored-by: Noisyfox <[email protected]> Co-authored-by: Ocraftyone <[email protected]>
Reimplements `clear_percent()` and `show_error_info()` from the old job system into the new job Ctl interface
Update UpgradeNetworkJob to reworked job system Update SendJob to reworked job system Update OrientJob to reworked job system Update PrintJob to reworked job system Update BindJob to reworked job system
(cherry picked from commit adec6b7ebdd91a71c61505dd4e1cc5ee9e17afcc)
One of the commits from SoftFever/OrcaSlicer#2819 (933aa3050bf5297b3714fb59575b3ec86e017112) Co-authored-by: Ocraftyone <[email protected]>
One of the commits from SoftFever/OrcaSlicer#2819 (933aa3050bf5297b3714fb59575b3ec86e017112)
…egration # Conflicts: # src/slic3r/GUI/Plater.cpp
Albert from SimplyPrint here. Let me know if there are any questions to us as a company about this integration! |
What will this PR actually add? Send a job to the SimplyPrint cloud? Would be nice for everyone if you'd add some UI Screenshots and an extensive functional description. |
Agreed! Good idea! We'll add some screenshots and a better description of what exactly our integration does. In short, you're right in the assumption that it'll simply let you send your prints through the SimplyPrint Cloud, the same way as other "Print host" services such as the OctoPrint or AstroPrint service works. |
@lanewei120 @MklBambu Please feel free to ping me if you have any questions during review |
Let us know if there's anything we can do on our end to help this get merged :) We have a lot of users eagerly awaiting being able to use this. @lanewei120 @MklBambu |
Hello @AlbertMN @Ocraftyone Thanks very much for doing this~ Sorry for the late reply as we are busy on the release of version 1.10. This patch involves significant changes, including uploading data to SimplyPrint's cloud, so we need to do careful review and testing. Although BambuStudio is open-source software, we are a commercial company, so we need to be cautious with operations that involve uploading data to third-party clouds: Additionally, this part of the code includes some updates related to UI jobs and other changes, which have a wider impact. We will also carry out further checks and testing, which will take more time BTW, could you rebase to the newest codes? we will try it soon |
Hello @lanewei120 and the Bambu Lab Team, Thank you for getting back to us and for considering our PR. We understand that integrating third-party cloud operations requires careful evaluation, especially given your commitment to protecting user data and complying with legal agreements. We hoped this PR would fall into the same category as other, already-implemented, third-party integrations, like the third-party cloud service, AstroPrint's "AstroBox" option in the "Print Host upload" settings, which originated from PrusaSlicer/Slic3r. Our integration is designed to be privacy-friendly: SimplyPrint servers are never contacted unless a user explicitly selects us as their "Print Host type." You can review our data handling practices in our privacy policy. The motivation for this integration comes from substantial user demand. Our Cura and OrcaSlicer integrations have been a huge success, helping print farms streamline operations. For now, we’ve recommended OrcaSlicer to our users, but we’d love to give them the flexibility to use BambuStudio without losing SimplyPrint functionality. We’ve documented user interest here: User Comments & Upvotes. We understand this PR has complexities, but if there are any specific changes we can make to address concerns or make it less invasive, we’re eager to collaborate and adjust. We’re also ready to assist with testing, legal questions, or anything else needed. Furthermore, we'll get on the rebase ASAP. Thanks again, and please let us know how we can support moving this forward. |
Port new UI Jobs and related commits from PrusaSlicer
Make httpserver more generic and reusable
Add OAuthJob
Add support for cloud-based print hosts
Add SimplyPrint as a print host
Allow BBL printers to use 3rd party print hosts (via an option under Printer settings/Basic Information/Advanced)