Dump mesh stl binary

richti83's picture
Submitted by richti83 on Mon, 03/02/2015 - 15:53

There is a bug when one tries to dump binary stl files. The dump class opens the file in textmode and not in binary mode.
I fixed this with an own openfile method in dump_mesh_stl.cpp which checks for writeBinarySTL_ flag.
if (filewriter) {
if (writeBinarySTL_) {
fp = fopen(filecurrent,"wb");
} else {
fp = fopen(filecurrent,"w");
}

everything else is like in the parent class.

On my case with 1570 triangles the dump binary stl is two times faster than ASCII dump !

Best,
Christian.

ckloss's picture

ckloss | Tue, 03/10/2015 - 09:39

Hi Christian,

thanks for posting this!I'll have a detailed look in the frame of the next release! (scheduled for end of April)

Thanks and Best wishes
Christoph

ckloss's picture

ckloss | Fri, 04/24/2015 - 14:12

Hi Christian,

I fixed the bug you reported, and also another one. "Multifile" was not working correctly for binary. Both fixes will be in next week's release
Best wishes
Christoph