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

file photon/cbddlp converted to cbt not printed #41

Closed
winso2018 opened this issue May 16, 2020 · 6 comments
Closed

file photon/cbddlp converted to cbt not printed #41

winso2018 opened this issue May 16, 2020 · 6 comments

Comments

@winso2018
Copy link

winso2018 commented May 16, 2020

cbddlp file (printed by old chituboard EPAX-X1), converted to cbt by uv3dp-v0.5.3, not printed on new chituboard (firmware 4.3.4, printer EPAX-X1-N). printer speak "unknown file". No preview image on screen
converted cbt file opened by chitubox 1.6.4.3
command line:
uv3dp.exe w1.cbddlp wk.ctb
Convert sliced (printed ok) ctb file to ctb - new ctb not printable.
uv3dp.exe _TEST_2018_01.ctb _TEST_2018_01XX.ctb
file - difefrent
187 119 bytes _TEST_2018_01.ctb
164 257 bytes _TEST_2018_01XX.ctb
ctb_to_ctb.zip
Why? What to do? What way to convert old (printed) cbddlp to new (printable) .ctb file?

@winso2018
Copy link
Author

i compare 2 file _TEST_2018_01.ctb original and _TEST_2018_01XX.ctb converted by catibo-inspect
all found difference on pic
DIFF
left original - right converted
what to fix?

@winso2018
Copy link
Author

sorry, i analyse by catibo-inspect and found solution.
i minor update ctb/format.go with

header := ctbHeader{
	Magic:          defaultHeaderMagic,
	Version:        2,
	EncryptionSeed: 3092495361, // old = 0 // Force encryption off, so we can de-duplicate layers
}

.....
machineBase := slicerBase + uint32(slicerSize)
machine := "EPAX X1"
machineSize := len(machine)
......
// ctbSlicer
param.Unknown38 = 0x1234
slicer.MachineOffset = machineBase
slicer.MachineSize = uint32(machineSize)
slicer.EncryptionMode = 7 // old 0xf // Magic!
slicer.TimeSeconds = 26494107
slicer.ChiTuBoxVersion[0] = 1 // Magic!
slicer.ChiTuBoxVersion[1] = 6
slicer.ChiTuBoxVersion[2] = 4
slicer.ChiTuBoxVersion[3] = 3
slicer.Unknown34 = 0 // old 0x200 // Magic?
slicer.Unknown2C = 1 // OLD - NO. aNTIALIASING? // 2c: Always 1?
.....
now, converted file printable.
Thanks for code!!!

@ezrec
Copy link
Owner

ezrec commented May 17, 2020

Thanks for the bug report!

Is it printable if EncryptionSeed=0, but keeping the rest of those changes?

(Which is what I’d prefer, since it allows for much smaller file size for mechanical prints by using the same image for multiple layers)

@winso2018
Copy link
Author

winso2018 commented May 17, 2020

not. if EncryptionSeed=0 - printer report "unknown format"
now i convert and test 17 cbddlp to ctb. all work fine

ezrec added a commit that referenced this issue May 17, 2020
Summary:
- Fixes #41
- Force encryption seed to be non-zero
- Allow specifying ecryption seed on the command line
- Initialize the 'rand' package in the command's init
- Use the correct image type code (0x07, not 0x0f)
@ezrec ezrec closed this as completed in d13b431 May 17, 2020
@ezrec
Copy link
Owner

ezrec commented May 17, 2020

Should be fixed in release v0.5.5

@X3msnake
Copy link
Collaborator

X3msnake commented May 17, 2020 via email

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

3 participants