Hello,
I tried to load stl file from http://people.sc.fsu.edu/~jburkardt/dat ... bottle.stl using irrlicht 1.7.3 but with no luck.
Digging in sources I have found that bug is in CSTLMeshFileLoader.cpp.
Before reading "solid" tag we should skip all whitespaces, in other case file will always be treated as binary
I propose the following fix:
Left pane: current situation in Irrlicht, Right pane - proposed fix
When I applied this fix inside my local branch everything seems to be good, I was able to load bottle.stl.
[fixed]STL files loading is wrong
Re: STL files loading is wrong (on trunk and 1.7.3)
The preferred format for patches is text, not image
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: STL files loading is wrong (on trunk and 1.7.3)
Yeah, correct, but for these few changes, I could work with it Anyway, I skipped the seek(0), as it is probably not necessary. Otherwise applied and fixed.
Re: [fixed]STL files loading is wrong
yes, I know, but the fix is too small and I thought that it would be much more simple to review it in this way:)hendu wrote:The preferred format for patches is text, not image
Thanks, quite fast response:) yes, seek(0) is useless.hybrid wrote:Yeah, correct, but for these few changes, I could work with it Anyway, I skipped the seek(0), as it is probably not necessary. Otherwise applied and fixed.