mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0023328: Importing VRML files with "scaleOrientation" not possible
If-else blocks "scale" and "scaleOrientation" was swapped. Now the comparing and interpretation of these key-words is correct. Added test case bugs/xde/bug23328
This commit is contained in:
parent
2157cfd0ef
commit
4366363b04
@ -276,15 +276,7 @@ VrmlData_ErrorStatus VrmlData_Group::Read (VrmlData_InBuffer& theBuffer)
|
|||||||
aStatus = VrmlData_VrmlFormatError;
|
aStatus = VrmlData_VrmlFormatError;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "scale")) {
|
else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "scaleOrientation"))
|
||||||
if (myIsTransform)
|
|
||||||
aStatus = Scene().ReadXYZ (theBuffer, aScale,
|
|
||||||
Standard_False, Standard_True);
|
|
||||||
else {
|
|
||||||
aStatus = VrmlData_VrmlFormatError;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "scaleOrientation"))
|
|
||||||
if (myIsTransform) {
|
if (myIsTransform) {
|
||||||
if (OK(aStatus, Scene().ReadXYZ (theBuffer, aScaleAxis,
|
if (OK(aStatus, Scene().ReadXYZ (theBuffer, aScaleAxis,
|
||||||
Standard_False, Standard_False)))
|
Standard_False, Standard_False)))
|
||||||
@ -294,6 +286,14 @@ VrmlData_ErrorStatus VrmlData_Group::Read (VrmlData_InBuffer& theBuffer)
|
|||||||
aStatus = VrmlData_VrmlFormatError;
|
aStatus = VrmlData_VrmlFormatError;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "scale"))
|
||||||
|
if (myIsTransform)
|
||||||
|
aStatus = Scene().ReadXYZ (theBuffer, aScale,
|
||||||
|
Standard_False, Standard_True);
|
||||||
|
else {
|
||||||
|
aStatus = VrmlData_VrmlFormatError;
|
||||||
|
break;
|
||||||
|
}
|
||||||
else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "translation"))
|
else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "translation"))
|
||||||
if (myIsTransform)
|
if (myIsTransform)
|
||||||
aStatus = Scene().ReadXYZ (theBuffer, aTrans,
|
aStatus = Scene().ReadXYZ (theBuffer, aTrans,
|
||||||
|
17
tests/bugs/xde/bug23328
Normal file
17
tests/bugs/xde/bug23328
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
puts "=========="
|
||||||
|
puts "OCC23328"
|
||||||
|
puts "=========="
|
||||||
|
puts ""
|
||||||
|
#######################################################################################
|
||||||
|
# Importing VRML files with "scaleOrientation" not possible
|
||||||
|
#######################################################################################
|
||||||
|
|
||||||
|
set aFile [locate_data_file bug23328_occ23328.vrml]
|
||||||
|
set aLog [loadvrml test ${aFile}]
|
||||||
|
set aLength [string length ${aLog}]
|
||||||
|
|
||||||
|
if { ${aLength} == 0 } {
|
||||||
|
puts "OK: Importing VRML files with scaleOrientation is possible"
|
||||||
|
} else {
|
||||||
|
puts "Error: Importing VRML files with scaleOrientation is not possible"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user