[fixed]STL files loading is wrong

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
SergeyM
Posts: 2
Joined: Mon Oct 22, 2012 12:59 pm

[fixed]STL files loading is wrong

Post by SergeyM »

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
Image

When I applied this fix inside my local branch everything seems to be good, I was able to load bottle.stl.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: STL files loading is wrong (on trunk and 1.7.3)

Post by hendu »

The preferred format for patches is text, not image ;)
hybrid
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)

Post by hybrid »

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.
SergeyM
Posts: 2
Joined: Mon Oct 22, 2012 12:59 pm

Re: [fixed]STL files loading is wrong

Post by SergeyM »

hendu wrote:The preferred format for patches is text, not image ;)
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:)
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.
Thanks, quite fast response:) yes, seek(0) is useless.
Post Reply