OrcaSlicer
OrcaSlicer copied to clipboard
Port EditGCodeDialog from PrusaSlicer
This is a port of the EditGCodeDialog from PrusaSlicer 2.7.x. There were a few changes made to make it a bit more functional. Also, it isn't quite fully complete, but it should be in a very usable state.
General Changes:
- Implement UndoValueUIManager and EditValueUI in Field
- Implement EditGCodeDialog and add buttons to the tabs
- Other minor changes to accommodate the new classes
Differences from PrusaSlicer's Implementation:
- backported to wxWidgets 3.1.5 (reverse commit 8770c4b7 after updating to 3.2.x)
- icons have been updated to use Orca colors
- improve the report that tells you if certain placeholders have not been defined properly for the dialog. It now shows all issues at once rather than having to fix then recompile to see the next issue.
- allow the use of the cmake option
ORCA_CHECK_GCODE_PLACEHOLDERS
to toggle the above report since our workflow rarely uses debug mode. - if a custom gcode value is not set when checking gcode placeholders, a testing value is set. Custom gcode is not parsed if it is empty, and the only way to check if the placeholders are all defined is by running the placeholder operation on the custom gcode.
- some calls to
print.config()
in Gcode.cpp were changed tom_config
to support the above testing values feature (only m_config is modified with the placeholders andprint.config()
would return an empty string) - a macro has been added to quickly add a definition to SlicingStatesConfigDefs with less boiler plate (it could technically be used for any ConfigOptionDef, but that would hurt interoperability with PS. I tried to not use the macro for too many PS defined definitions.)
- the presets are now also categorized by the page they are on in their tab
Prusa | Orca |
|
|
TODO:
- [x] Make sure all linux fixes have been applied
- [x] Finish adding "universal" gcode options
- [ ] add search function to dataview (maybe?)
- [ ] determine if any options are being left out of the preset categories by getting options from Tab rather than Presets. If so, consider adding outside of the groupings
sorry about the couple of extra PRs created. I had merged some of the changes from the wx upgrade ahead of time and it cause issues because of the reversion. Some cherry picking magic later, new branch!
@Ocraftyone and @SoftFever, I noticed your check builds were failing. I ran into the same issue here today and found that it's because the site hosting Boost (https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz) was returning "409 Conflict". Now it's prompting for the original registrant's email address to be added.
TL;DR, I got a copy of Boost from here: https://sourceforge.net/projects/boost/files/boost/1.78.0/boost_1_78_0.tar.gz
I put it in the OrcaSlicer\deps\DL_CACHE\Boost directory and after that, I could successfully compile. Just a PITA. lol
@Ocraftyone and @SoftFever, I noticed your check builds were failing. I ran into the same issue here today and found that it's because the site hosting Boost (https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz) was returning "409 Conflict". Now it's prompting for the original registrant's email address to be added.
TL;DR, I got a copy of Boost from here: https://sourceforge.net/projects/boost/files/boost/1.78.0/boost_1_78_0.tar.gz
I put it in the OrcaSlicer\deps\DL_CACHE\Boost directory and after that, I could successfully compile. Just a PITA. lol
yeah, we noticed that too. Lmao, let's see how long boost.org will recover it. If not, we will switch to github
Just curious, why did we not use GitHub in the first place? Seems to be a very reliable source and more well known.
Just curious, why did we not use GitHub in the first place? Seems to be a very reliable source and more well known.
Because Boost doesn't use github and we just download from their official links.
I guess it doesn't matter because the link is back up! π
I guess it doesn't matter because the link is back up! π
lmao, just 1 hour after I changed to github cache
I guess it doesn't matter because the link is back up!
lmao, just 1 hour after I changed to github cache
That is expected behavior, much like finding a lost item after buying a replacement. π
@SoftFever I believe we are good to go on the features. I have tested a bit in windows and I am about to do some testing in ubuntu. @Noisyfox , @discip , @igiannakas , and any other testers, if you don't mind giving it a quick overview and LMK if there are any improvements or bugs to address, that would be awesome!
Good morning @Ocraftyone, First and foremost: Thank you for this contribution! If you wouldn't have done this I would probably never now there was a g-code-editor in Orca. π
The only thing I noticed using Windows: The plus symbol in the middle jumps up and down when selecting different entries on the left side.
Will test Linux later.
I see what is happening. It is when the description text goes longer than a single line an it wraps. I will see if I can hardcode a position for the button to try and prevent that during resizing
If you wouldn't have done this I would probably never now there was a g-code-editor in Orca. π
There isn't. Now there is π
@discip I got that change implemented. It now is positioned half way down the original height of the parameter list. This should be fine for now, but I did also identify another bug in the process. The window is resizable and the text field properly resizes, but the param list does not resize vertically. I am thinking that this is due to a wxWidgets change though because I am not able to identify any code that relates to that.
Latest commit removes the ability to resize the border. It solves a few issues that are laid out in the commit message
@SoftFever I believe we are good to go on the features. I have tested a bit in windows and I am about to do some testing in ubuntu. @Noisyfox , @discip , @igiannakas , and any other testers, if you don't mind giving it a quick overview and LMK if there are any improvements or bugs to address, that would be awesome!
Thanks @Ocraftyone ! I should be able to start to review PRs again from tomorrow. Was fully occupied with until todayπ
@SoftFever I believe we are good to go on the features. I have tested a bit in windows and I am about to do some testing in ubuntu. @Noisyfox , @discip , @igiannakas , and any other testers, if you don't mind giving it a quick overview and LMK if there are any improvements or bugs to address, that would be awesome!
Thanks @Ocraftyone ! I should be able to start to review PRs again from tomorrow. Was fully occupied with until todayπ
No problem! I am trying to do some more tests in the mean time. I would ideally like someone to test on mac too, which is why I pinged @igiannakas
@Ocraftyone Finally I had time to test this on Linux (Manjaro) but unfortunately it doesn't work at all. As soon as I click on the corresponding icon, it asks me to either wait or to force quit, but even if I choose "Wait" it crashes.
Also I'm not sure where to find the related logfile.
setup
CPU | GPU | RAM | SSD |
---|---|---|---|
Ryzen 9 7950X3D | XFX 7900 XTX | G.Skill Flare X5 32 GB (EXPO I enabled) | Samsung 990 Pro 2 TB |
Nice one this PR! There are so many gcode options that knowing them all is impossible!
UI wise on an M1 Pro MacBook Pro
https://github.com/SoftFever/OrcaSlicer/assets/59056762/81c7c3e0-a5ab-4323-ba36-eb705fea43e6
When clicking an option the list is momentarily refreshed displaying that option as a label for all Gcode placeholders. Once the tree loads, the correct values are displayed.
@igiannakas would mind trying PrusaSlicer and see if it does something similar?
@igiannakas would mind trying PrusaSlicer and see if it does something similar?
Yeap it does exactly the same... It's cosmetic so no real issue, but was the only thing I could see!
Another thing to consider is possibly filtering the list by the options available to the current print model - for example ramming doesn't apply to BBL printers etc. Again, that is polishing type stuff.
Another thing to consider is possibly filtering the list by the options available to the current print model - for example ramming doesn't apply to BBL printers etc. Again, that is polishing type stuff.
That would be nice, but it would be a pretty manual process of determining all of the options that don't apply to BBL printers. Unless there is somewhere that specifies the options that are disabled or there are only a handful of options that would need to be disabled, I am hesitant to do that.
As for the dataview issue, do you have the same issue with the object list dataview? Maybe it has some logic to alleviate this. While building this, I saw that there were some options indicating that you can set an animation for expanding and collapsing items, but I did not mess with them. Maybe it has to be explicitly disabled for mac.
Finally I had time to test this on Linux (Manjaro) but unfortunately it doesn't work at all. As soon as I click on the corresponding icon, it asks me to either wait or to force quit, but even if I choose "Wait" it crashes.
Just got a chance to test on ubuntu and I am getting a seg fault. I am having trouble building it in my test environment with github codespaces, so I still haven't been able to debug it yet.
@discip I fixed that linux crash. It was one of the STUPIDEST mistake I have ever made, but its fixed now! π€¦
@discip I fixed that linux crash. It was one of the STUPIDEST mistake I have ever made, but its fixed now! π€¦
@Ocraftyone People who don't make mistakes never learn anything and are most likely doing nothing. You're doing fine. π
@discip I fixed that linux crash. It was one of the STUPIDEST mistake I have ever made, but its fixed now! π€¦
@Ocraftyone People who don't make mistakes never learn anything and are most likely doing nothing. You're doing fine. π
Ain't that the truth!
@Ocraftyone Sorry for the late answer. π
Indeed, it works now on Linux as well, but I think the color of the text is definitely too dim:
Just that. Otherwise: Much appreciated!
@Ocraftyone @SoftFever
Sorry to bother, but unfortunately this issue persists.
the color of the text is definitely too dim:
setup
CPU | GPU | RAM | SSD |
---|---|---|---|
Ryzen 9 7950X3D | XFX 7900 XTX | G.Skill Flare X5 32 GB (EXPO I enabled) | Samsung 990 Pro 2 TB |
@discip I'll take a look when I get a chance. I had meant to before merging but I will try to get a patch together.
Thank you! ππ»
I just noticed there are even more cases where the font is to dark:
Maybe there is even more. π€·π»ββοΈ
@Ocraftyone Have you had time to look into that by any chance?
@Ocraftyone Have you had time to look into that by any chance?
Is the text really that dark on Linux? Is there a light mode or similar available?