Hi, I am using vtk to slice a STL file. I want to load the file and slice it and after slicing it I want to store both the halves in different STL files and save it.
I am able to slice and store them in STL files but the problem is the size of the resulting files are huge.
My input file size is around 530MB while after slicing I am getting the output files of size of around 2.5GB and 700MB. I have tried decimation ,even though it reduces the resulting file sizes but the quality of the model is also reduced.
Is there any way to reduce the size of the resulting STL files in any way without affecting the models?
Is it writing the output as ASCII files instead of binary? Try the SetFileTypeToBinary method to specify binary output files.
1 Like
I’d say that you might also try doing your slice-and-save in ParaView first … to see if the files are any smaller. What you did is what I would have tried first (meaning I don’t know a lot more than you do).
Also, rather than clipping screenshots, you can mark down your code with triple single quote characters (‘’') to make nicer-looking blocks of code:
void nicer() {
std::cout << "nicer looking, right?" << std::endl;
}
There are lots of pages about Discourse markup around.
1 Like
The output files were in ASCII, saving them in binary reduced the size of the output files. Thanks.
1 Like
I will check .Thanks for the suggestion.