Hi everyone!
We’ve just published v0.3.1, the 2nd public alpha of the SoulCrafted Slicer. It’s a small release, mostly made of fixes, but it also brings an improvement to the mesh repair tool that deserves a few more words.
Mesh repair
Every 3D model the Slicer opens is a surface made of triangles, and sometimes a few of those triangles are “degenerate” (they aren’t really triangles).
There are many ways in which a triangle can be degenerate:
- At least one edge has length 0 (and consequentially, we have area 0): we already had a partial solution for this case.
- Their 3 vertices lie on the same straight line. In other words, the vertex touching the 2 shortest edges sits right on top of the opposite side, the longest edge. The practical consequence is almost the same as in the previous case, we have a zero-area triangle.
That’s the kind of defect that can make a Slicer fail. The repair tool could already remove triangles with 2 corners in the same place, but until now it left the second case alone.
Starting with v0.3.1, Repair meshes removes them too, and it adapts the
triangles around each one so the surface stays closed.
Depending on what surrounds the removed triangle, it either merges the 2 triangles next to its short sides into one, or it splits the neighbour that shares its long side into 2 triangles. Either way, your model keeps its shape.
There are a few cases it won’t touch, when removing one of these triangles would break the mesh somewhere else. When this happens the Slicer will tell you if any of these zero-area triangles are left after a repair. If you come across a model that keeps some of them, please let us know.
STL to 3MF conversion
Converting some models from STL to 3MF used to leave some of them in a state the Slicer couldn’t slice anymore. The cause was the normal vectors. Next to each triangle, STL files store a vector telling which way it faces. That information isn’t too reliable because some programs leave it empty and others get it wrong, but the Slicer was relying on it more than it should.
3MF files don’t store normal vectors at all, so we lost them when we converted a model. When the Slicer opened the 3MF file, it had to work them out again from the vertices of each triangle, and that’s impossible for a triangle with no area, like the ones we described in the repair section. Just one of those triangles could be enough to make the slicing fail.
Now the Slicer no longer depends on the normal vectors. When it needs to know which way a triangle faces, it works it out from the triangle itself. We still keep the vectors that came with your STL file, though, and we now save them inside the 3MF file too, so they come back if you export the model as STL again (as long as its triangles haven’t changed in between).
Opening 3MF files
We’ve made the Slicer stricter at opening 3MF files. A 3MF file is a ZIP archive with several files inside (mostly XML), and the format has rules about how those files must be named and put together. Until now, the Slicer accepted some files that broke those rules.
For example, the archive could contain 2 files whose names only differ in upper and lower case, which the format treats as the same name. There’s no way to tell which of the 2 is the real one, so different programs may pick different ones, and the model you see in one program may not be the one that gets sliced in another. Someone could build a file like that on purpose and share it online, where most of us get the models we print.
Another case is a 3MF file where the description of the model is cut off before the end. The Slicer used to load the part of the model it could read, as if nothing were wrong, so you could end up with an incomplete model and no hint that the file itself was damaged. Now it refuses both kinds of files, along with a few others that break the rules of the format.
While we were at it, we also fixed the opposite problem. Some valid 3MF files were being rejected because of how the files inside them were named, and now they load as they should.
Languages and translations
Just before the 0.3.0-alpha release I introduced a “small” regression by accident: The Slicer had stopped “remembering” the language you chose in the Preferences.
After a restart, it came back in your system’s language (or in English). The cause was an update to one of our main dependencies (Slint), the library we use to build the interface, which now makes the translations available later than before. The Slicer was applying your choice too early, when there was nothing to apply it to yet. That’s fixed now, and your choice sticks again.
We also found that quite a few texts (mostly error messages and the contents of some dialogs) never reached our translators. They lived in parts of the code that didn’t go through the translation system at all, so they showed up in English no matter which language you had picked. Now most texts in the Slicer can be translated.
Most of those texts still need to be translated, though, so you’ll keep seeing some English here and there for a while. If you’d like to help with that, translations are managed on Codeberg’s Weblate. You don’t have to know how to code to be able to contribute.
To everyone who has already been translating the Slicer, thank you!
Interface fixes
- The gizmo, the set of handles you drag to transform a model, changed its size on screen depending on how far the model was from the camera. Now it keeps the same size wherever the model is.
- Some dialogs ignored the light or dark theme you picked in the Preferences. Now they follow it, even if you change it while they’re open.
- Long resin names didn’t fit in their space in the resin list, now they wrap onto the next line.
Under the hood
The rest of the work in this release won’t show on your screen.
We spent a good part of the last few weeks tidying up the code, removing import cycles between modules and splitting some very big modules into smaller ones.
We also started using mutation testing, which introduces small bugs into the code on purpose (flipping a condition, changing a number…) and checks that at least one of our tests detects each of them. None of this changes how the Slicer behaves, but it makes it easier to detect subtle bugs before they happen.
Trying it out
As always, you can download it from our main page or from its release page on Codeberg.
Keep in mind that the Slicer is still in alpha. We advise to try it with small models first, so you won’t waste much time and/or resin if something goes wrong.
If you find a bug, or a model that the Slicer can’t handle, please tell us in our issue tracker.
Thank you for reading, and happy printing!