mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0030066: Data Exchange - Fail to load VRML from ArcGIS
Fixed VrmlData_Scene::readHeader method
This commit is contained in:
parent
e3841f9ffe
commit
945e309564
@ -314,12 +314,23 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadLine (VrmlData_InBuffer& theBuffer)
|
|||||||
|
|
||||||
VrmlData_ErrorStatus VrmlData_Scene::readHeader (VrmlData_InBuffer& theBuffer)
|
VrmlData_ErrorStatus VrmlData_Scene::readHeader (VrmlData_InBuffer& theBuffer)
|
||||||
{
|
{
|
||||||
VrmlData_ErrorStatus aStat = readLine (theBuffer);
|
VrmlData_ErrorStatus aStat = readLine(theBuffer);
|
||||||
if (aStat == VrmlData_StatusOK &&
|
if (aStat != VrmlData_StatusOK)
|
||||||
!VRMLDATA_LCOMPARE(theBuffer.LinePtr, "#VRML V2.0"))
|
{
|
||||||
aStat = VrmlData_NotVrmlFile;
|
return VrmlData_NotVrmlFile;
|
||||||
else
|
}
|
||||||
|
TCollection_AsciiString aHeader(theBuffer.LinePtr);
|
||||||
|
// The max possible header size is 25 (with spaces)
|
||||||
|
// 4 (max BOM size) + 11 (search string) + 9 (max size for encoding)
|
||||||
|
if (aHeader.Length() <= 25 &&
|
||||||
|
aHeader.Search("#VRML V2.0") != -1)
|
||||||
|
{
|
||||||
aStat = readLine(theBuffer);
|
aStat = readLine(theBuffer);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
aStat = VrmlData_NotVrmlFile;
|
||||||
|
}
|
||||||
return aStat;
|
return aStat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
tests/bugs/stlvrml/bug30066
Normal file
6
tests/bugs/stlvrml/bug30066
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "0030066: Data Exchange - Fail to load VRML from ArcGIS"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
loadvrml sh [locate_data_file bug30066.wrl]
|
Loading…
x
Reference in New Issue
Block a user