prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.71k stars 1.93k forks source link

Wipe tower GCode has double spaces #7503

Closed fpikus closed 2 years ago

fpikus commented 2 years ago

Version

Version of PrusaSlicer used goes here 2.3.3 Use About->About PrusaSlicer for release versions

For -dev versions, use git describe --tag or get the hash value for the version you downloaded or git rev-parse HEAD

Operating system type + version

What OS are you using, and state any version #s In case of 3D rendering issues, please attach the content of menu Help -> System Info dialog Windows 10

3D printer brand / version + firmware version (if known)

What 3D printer brand / version are you printing on, is it a stock model or did you modify the printer, what firmware is running on your printer, version of the firmware #s Lotmaxx Shark V1

Behavior

lukasmatena commented 2 years ago

You are correct. It is like this for a really, really long time, I see some double spaces in 2.0.0. This should be fixed, but not now before 2.4.0 release. The G-Code should be valid, it is just a bit longer than it needs to be.

fpikus commented 2 years ago

"Should" is an operative word. Prusa printers accept it just fine. Lotmaxx printers ignore all lines with double spaces so I have to edit GCode in VIM every time.

lukasmatena commented 2 years ago

@fpikus Well, according to https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=823374:

Spaces and tabs are allowed anywhere on a line of code and do not change the meaning of the
line, except inside comments. This makes some strange-looking input legal. The line “g0x +0. 12
34y 7” is equivalent to “g0 x+0.1234 y7”, for example.

Unless i misunderstand something, the G-Code should be valid and if some firmware rejects it, it is its fault and I would report it to the author. We will remove the extra space in PrusaSlicer (it is not needed), but not before 2.4.0.

bubnikv commented 2 years ago
G1  X147.774  E2.2424 F1584

is a perfectly valid G-code. It is true that we should not emit double spaces, but as @lukasmatena noted, we need to release PrusaSlicer 2.4.0 thus we will fix it in 2.5.

Please notice your 3D printer vendor to fix their firmware for now.

bubnikv commented 2 years ago

We are not going to fix it for PrusaSlicer 2.4.0. We will fix it after the release.

You can write yourself a simple post processing script, even a simple

sed 's/  / /g'

will likely work

fpikus commented 2 years ago

I know it's valid. It's just you guys have your act together, and if Lotmaxx knew how to write non-crap firmware, this wouldn't even be the top problem on their list. I understand that 2.4.0 has to be released now. I was hoping for 2.4.x.

DeeKay64 commented 2 years ago

Well, I've reported this bug (and many others!) to Lotmaxx when the printer had basically just been released and I did my first slices in Prusaslicer. I think I was the first one to figure out what was happening. But -as many other bugs- it never got fixed, and it seems we won't be getting more firmware updates for the printer, so it would be great if you guys could fix this on your end, even though the Gcode should be valid with double spaces, there's really no reason to use them in the purge block code! ;-)

DeeKay64 commented 2 years ago

It should be pointed out that some lines even have triple spaces, infront of the E value, it seems to be only the lines that have both X and Y coordinates!...

f1vefour commented 2 years ago

Lotmaxx will never fix this or any other reported issue because the firmware is a hacked mess. The source is available for the v1 and every issue I've tried to fix has broken something else due to the developer hard coding various bits of code to just get the firmware in a 'workable' state.

DeeKaye64 has gotten many users to switch from Cura to PrusaSlicer and goes out of his way to help each and every one, he wants this fixed not for himself but for them.

lukasmatena commented 2 years ago

PrusaSlicer 2.4.1 allows to define G-Code substitutions. You can use regular expression [ ]{2,} to match any number of spaces higher than one and replace them with a single space. The repeated space in the wipe tower code will not be fixed before 2.5.0. The G-Code is composed in several steps and it is internally post-processed later, there is a risk that a space will become missing in some scenario if the fix is not perfect. It is not an issue for any decent firmware. Also, I suggest to not buy printers you yourself describe as crap. There are other solutions on the market, for example I heard Prusa is not bad.

f1vefour commented 2 years ago

We didn't purchase a printer which is bad, we backed a Kickstarter with hopes it would be good and was promised more than what was delivered.

lukasmatena commented 2 years ago

Could you please try the following build? It might be fixed, but I'm not sure what else I broke:

macOS-lm-wipe-tower-base-and-spaces-gaab92df84 Linux-lm-wipe-tower-base-and-spaces-gaab92df84 Windows-lm-wipe-tower-base-and-spaces-gaab92df84

user: prusaslicer, password: slicer, if you are asked about it. Thanks.

fpikus commented 2 years ago

Could not get far enough. 1) When started, it shows a dialog box: [image: image.png]

2) After I click OK, the main platter window is empty, no bed, nothing. I tried blindly dropping a model there, got this: [image: image.png]

I can close it but without anything drawn in the window, I have no idea what is happening.

On Wed, Feb 9, 2022 at 6:48 AM Lukáš Matěna @.***> wrote:

Could you please try the following build? It might be fixed, but I'm not sure what else I broke:

macOS-lm-wipe-tower-base-and-spaces-gaab92df84 @./files/lm/PrusaSlicer-2.5.0-alpha0+11-lm-wipe-tower-base-and-spaces-universal-asan-gaab92df84-202202091418.dmg> Linux-lm-wipe-tower-base-and-spaces-gaab92df84 @./files/lm/PrusaSlicer-2.5.0-alpha0+11-lm-wipe-tower-base-and-spaces-linux-x64-asan-GTK2-gaab92df-202202091410.AppImage> Windows-lm-wipe-tower-base-and-spaces-gaab92df84 @.***/files/lm/PrusaSlicer-2.5.0-alpha0+11-lm-wipe-tower-base-and-spaces-win64-gaab92df84-202202091410.zip>

user: prusaslicer, password: slicer, if you are asked about it. Thanks.

— Reply to this email directly, view it on GitHub https://github.com/prusa3d/PrusaSlicer/issues/7503#issuecomment-1033830649, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJLCEYVZI6CBAH6CM3IF7JDU2J4CDANCNFSM5KFJWCTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- Fedor G Pikus @.***) http://www.pikus.net http://wild-light.com

lukasmatena commented 2 years ago

@fpikus Thanks. I do not see your images. The version I sent here loads its configuration from PrusaSlicer-alpha folder. If you can still run the 2.4.0, there may be something rotten in the configuration. Either that, or some other change caused it. Either way, it's worth investigation. Could you please:

Thanks.

fpikus commented 2 years ago

image1 image2

Dropped the files directly into Github, hopefully, this works better than the email gateway.

I removed the PrusaSlicer-alpha folder but I still cannot run the build, I get exact same errors. I tried to answer Yes or No to importing configuration (removed the alpha folder every time), it makes no difference to the errors. The wizard will run if I don't import, and it has the usual choices of printers, but no images of the printers. Instead, there is a gray rectangle with text NO IMAGE.

lukasmatena commented 2 years ago

@fpikus Interesting. The error with missing shaders would happen if you used old resources directory and the new binary, that is, if you only unpacked the binaries and placed them alongside the old resources. Anyway, to be save, here is a Windows build that is based on 2.4.1-beta1, with no other development but my wipe tower fix: Windows-lm-wipe-tower-base-and-spaces-g618ae6ade

fpikus commented 2 years ago

I unzipped the archive in its own directory and ran from there, so everything that was in the zip file is unpacked together. I tried the new build, got "Unhandled unknown exception; terminating the application." then "Internal error: Could not load bitmap." There were "details" on the second box: 10:19:10: can't open file 'E:\Downloads\PrusaSlicer-2.4.1-beta1+179-lm-wipe-tower-base-and-spaces-win64-g618ae6ade-202202111024\resources\icons\PrusaSlicer.png' (error 2: The system cannot find the file specified.) 10:19:10: Failed to load image from file "E:\Downloads\PrusaSlicer-2.4.1-beta1+179-lm-wipe-tower-base-and-spaces-win64-g618ae6ade-202202111024\resources\icons\PrusaSlicer.png". 10:19:10: Internal error: Could not load bitmap: PrusaSlicer

On Fri, Feb 11, 2022 at 3:12 AM Lukáš Matěna @.***> wrote:

@fpikus https://github.com/fpikus Interesting. The error with missing shaders would happen if you used old resources directory and the new binary, that is, if you only unpacked the binaries and placed them alongside the old resources. Anyway, to be save, here is a Windows build that is based on 2.4.1-beta1, with no other development but my wipe tower fix: Windows-lm-wipe-tower-base-and-spaces-g618ae6ade @.***/files/lm/PrusaSlicer-2.4.1-beta1+179-lm-wipe-tower-base-and-spaces-win64-g618ae6ade-202202111024.zip>

— Reply to this email directly, view it on GitHub https://github.com/prusa3d/PrusaSlicer/issues/7503#issuecomment-1036095938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJLCEYRU6XFCYVY6AQUENU3U2TVILANCNFSM5KFJWCTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- Fedor G Pikus @.***) http://www.pikus.net http://wild-light.com

lukasmatena commented 2 years ago

@DeeKay64 @f1vefour Were you guys able to run and test that build? Thanks.

@fpikus

10:19:10: can't open file 'E:\Downloads\PrusaSlicer-2.4.1-beta1+179-lm-wipe-tower-base-and-spaces-win64-g618ae6ade-202202111024\resources\icons\PrusaSlicer.png'

Does that file exist in that location or not?

fpikus commented 2 years ago

All files starting with "p" and later were missing. When I unzipped the file again, I saw why: Windows Defender demanded a cloud scan of some file, I must have refused the first time so it aborted extraction.

Now it runs and the tower gcode is fine, I checked with vim and did a search, no double/triple spaces anywhere.

It does have the error about demanding G92 E0 in layer change code, but I assume it's a feature.

Fedor

On Mon, Feb 14, 2022 at 3:49 AM Lukáš Matěna @.***> wrote:

@DeeKay64 https://github.com/DeeKay64 @f1vefour https://github.com/f1vefour Were you guys able to run and test that build? Thanks.

@fpikus https://github.com/fpikus

10:19:10: can't open file

'E:\Downloads\PrusaSlicer-2.4.1-beta1+179-lm-wipe-tower-base-and-spaces-win64-g618ae6ade-202202111024\resources\icons\PrusaSlicer.png'

Does that file exist in that location or not?

— Reply to this email directly, view it on GitHub https://github.com/prusa3d/PrusaSlicer/issues/7503#issuecomment-1038973087, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJLCEYUOBBHBWUM6U7SDIDLU3DRLZANCNFSM5KFJWCTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- Fedor G Pikus @.***) http://www.pikus.net http://wild-light.com

lukasmatena commented 2 years ago

@fpikus Thanks. Yes, that is a feature to prevent loss of precision in printer fw with long prints.

f1vefour commented 2 years ago

Thank you @lukasmatena for the build, I apologize for not responding sooner. I concur with fpikus that it fixes the issue.

lukasmatena commented 2 years ago

Thank you both for the testing. The fix is now in master for the 2.5 release. Closing.

DeeKay64 commented 2 years ago

I just tried out PS 2.5.0 alpha3 and unfortunately the multiple spaces are still in the purge block code. Would be awesome if we could fix this in the release version!