|
(0014126)
|
|
Francesco
|
2008-11-17 11:48
(edited on: 2008-11-17 11:51) |
|
I've written a quick fix to this problem.
Here it is the result from the diff command against the official 3.4.0 release:
-----------------8<-------------------------------
[ParaView-3.4.0]$ diff VTK/IO/vtkSTLReader.cxx ../ParaView-3.4.0-release/VTK/IO/
313,316d312
< if ((strcmp(line, "COLOR") == 0) || (strcmp(line, "color") == 0))
< {
< done = (fscanf(fp,"%s %*s %f %f %f\n", line, x, x+1, x+2)==EOF);
< }
361,365d356
< if ((strstr(line, "COLOR") == 0) || (strstr(line, "color") == 0))
< {
< done = (fscanf(fp,"%f %f %f\n", x,x+1,x+2)==EOF);
< done = (fscanf(fp,"%s", line)==EOF);
< }
-----------------8<-------------------------------
Basically, the only routine changed is vtkSTLReader::ReadASCIISTL, adding the check on a possible "color" line just after every time the parsing of a solid block starts.
The proposed modification can read STL ascii files with and without the "color" line.
The modified file is attached.
I hope this helps and the fix, or a better version, could be eventually included in the next release.
Francesco
|
|