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

Converting .photon files always fails with panic: Layer 0: Z value of 0.00mm is too close to the screen #144

Open
Jochen-Scharr opened this issue Jul 25, 2021 · 3 comments

Comments

@Jochen-Scharr
Copy link

Hi,

first of all: Great work! Thanks a lot for it! It could help me very much - if it worked for .photon files (having a Photon printer myself).

The issue is: No matter what .photon file I try to convert, no matter what file version (1 or 2) it always produces the mentioned error.

This is because in photon files the first layer always starts at z = 0 (and the layer thickness is added). I also found that a strange way of counting (I was developing routines in C# for reading/writing photon files myself). IMO that shouldn't be too hard to fix.

My test files (see attachments) all were sliced using Anycubic Photon Workshop (or, for file version1 its predecessor).

PhotonTestFiles.zip

I'd appreciate it a lot if you could fix that quickly.

Many thanks

Jochen

@sn4k3
Copy link

sn4k3 commented Jul 26, 2021

If you good with C# you can use UVtools.Core which you can get directly from nuget or VS package manager.
About that Z0 if you open those files in UVtools, they will be auto fixed and offset all Z's by layer height, just need to open and close the file there - simple as that.

About uv3dp, it makes that check and then halts. Maybe it would be good to auto fix the file like UVtools, by offset all layers by layer height if layer0.Z == 0

Here my sanitizer:

https://github.com/sn4k3/UVtools/blob/d104dc84f28a4709332a81700ff3a4058ebb946b/UVtools.Core/Layer/LayerManager.cs#L430

@Jochen-Scharr
Copy link
Author

@sn4k3: Thanks for the hint. I've seen UVtools, it seems to be great and exactly what I need, but unfortunately I cannot use it because of its license (cannot make my project AGPL, too).

The auto-fix you propose is a good idea and if I already had the right setup and a little GO experience, I'd implement it myself in uv3dp. But that's very big effort for just a little change like that... So I hope that the makers of uv3dp will quickly fix it. Btw.: When writing back a photon file, one shouldn't forget to do the inverse.

@sn4k3
Copy link

sn4k3 commented Jul 26, 2021

If your project is for yourself and without intention to distribute/share/put online you can use AGPL dependencies without the need of publish your work.

I'd implement it myself in uv3dp

You can give it a try, it should be about 4 lines, not a lot of effort

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

No branches or pull requests

2 participants