How to reduce the size of the ASCII format stl files, made of *.vtp files in Paraview?

Hi All,

I want to reduce the number of figures when I Save Data to *.stl in paraview/5.15.1
However, there is no option to define the accuracy and teh default values are like this
solid Visualization Toolkit generated SLA File
facet normal -0.013389295051727881 0.0027716056821197022 -0.99990651812054931
outer loop
vertex 67.768898010253906 -95.073287963867188 -0.040442027151584625
vertex 67.221076965332031 -95.636665344238281 -0.034668009728193283
vertex 66.669998168945312 -95.067840576171875 -0.025712057948112488
facet normal -0.0055525086269436448 0.010364286584985546 -0.99993087321650986
which increase teh output file size in an inefficient way.
my ideal one would be something with 3 figures, like what follows
facet normal -0.0100.000 -0.999
outer loop
vertex 67.769 -96.235 -0.040
vertex 67.221 -95.636 -0.034
vertex 67.768 -95.073 -0.040

your help would be highly appreciated

Thanks in advance,

You should be able to write a Python script or help post-process your STL files by reducing the encoding of the float as ascii…

Such script should be fairly easy to write.

How about converting it to a binary STL file? Then your really long string numbers become 4 byte floats?

To convert to binary STL, I’d do it in python using PyMeshLab. Just the the binary flag in the save_current_mesh method to write a binary STL.