MantisBT - Community
View Issue Details
0023328Community[OCCT] OCCT:Data Exchangepublic2012-07-19 02:542015-05-14 15:32
tholmer 
bugmaster 
normalmajor 
closedfixed 
WindowsVC++ 200832 bit
[OCCT] 6.5.3 
[OCCT] 6.9.0[OCCT] 6.9.0 
bugs xde bug23328
0023328: Importing VRML files with "scaleOrientation" not possible
Its not possible to import VRML files withe the VRMLData_Scene::<< operator which contains a "scaleOrientation" property in a (i.e.) "Transform" node.

The problem is in VRMLData_Group.cxx file:

VrmlData_ErrorStatus VrmlData_Group::Read (VrmlData_InBuffer& theBuffer)

VRMLDATA_LCOMPARE (theBuffer.LinePtr, "scaleOrientation") compares the two arguments with a count of the length of "scaleOrientation" (see strcmp()). But before this is done VRMLDATA_LCOMPARE (theBuffer.LinePtr, "scale") is called! And it will be compared "scaleOrientation" and "scale" but only the first five characters. So "scaleOrientation" will handled as an "scale" -> VRMLData_NumericInputError.

Solution: Swap the "scale" and "scaleOrientation" else if - block. Now "scaleOrientation" will be compared at first. Was testet.
Write a simple file with "scaleOrientation" and import it with the VRMLData_Scene::<< operator. A VRMLData_NumericInputError will be returned. I tested it with a large complexe file and that simple file:

#VRML V2.0 utf8

DEF SCS_TRANS_2716156_traeger_prt Transform {
    translation 0.000000 0.790000 0.030500
    rotation 4.32964e-017 0.707107 0.707107 3.142
    scaleOrientation 1 6.61192e-005 0.000159626 -0.785398
}

---------------------------------------------------------------------
Test script "bug23328" was added with data file "occ23328.vrml"
No tags attached.
child of 0025279closed bugmaster Open CASCADE OCCT fails to read VRML file created by OCCT 
? occ23328.vrml (2,335) 2015-01-23 13:29
https://tracker.dev.opencascade.org/
? bug23328 (552) 2015-01-23 13:29
https://tracker.dev.opencascade.org/
Issue History
2012-07-19 02:54tholmerNew Issue
2012-07-19 02:54tholmerAssigned To => gka
2015-01-14 15:45oanRelationship addedchild of 0025279
2015-01-22 10:57gkaAssigned Togka => akz
2015-01-22 10:57gkaStatusnew => assigned
2015-01-23 13:29gitNote Added: 0036434
2015-01-23 13:29akzFile Added: occ23328.vrml
2015-01-23 13:29akzFile Added: bug23328
2015-01-23 13:31akzNote Added: 0036435
2015-01-23 13:31akzAssigned Toakz => gka
2015-01-23 13:31akzStatusassigned => resolved
2015-01-23 13:31akzSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=9157#r9157
2015-01-23 14:01gkaNote Added: 0036436
2015-01-23 14:01gkaAssigned Togka => bugmaster
2015-01-23 14:01gkaStatusresolved => reviewed
2015-01-28 14:41apnAssigned Tobugmaster => apn
2015-01-28 14:46gitNote Added: 0036757
2015-01-29 12:50gitNote Added: 0036804
2015-01-29 14:18apnNote Added: 0036820
2015-01-29 14:19apnTest case number => bugs xde bug23328
2015-01-29 14:19apnAssigned Toapn => bugmaster
2015-01-29 14:19apnStatusreviewed => tested
2015-01-29 14:19apnTarget Version => 6.9.0
2015-01-30 14:00bugmasterChangeset attached => occt master 4366363b
2015-01-30 14:00bugmasterStatustested => verified
2015-01-30 14:00bugmasterResolutionopen => fixed
2015-03-18 13:31gitNote Added: 0038473
2015-05-14 15:29aivStatusverified => closed
2015-05-14 15:32aivFixed in Version => 6.9.0

Notes
(0036434)
git   
2015-01-23 13:29   
Branch CR23328 has been created by akz.

SHA-1: 9abd1c430b0bf8024050d294260b272953b7841d


Detailed log of new commits:

Author: akz
Date: Fri Jan 23 13:28:13 2015 +0300

    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.
(0036435)
akz   
2015-01-23 13:31   
Branch CR23328 is ready to be reviewed
(0036436)
gka   
2015-01-23 14:01   
Branch CR23328 is ready to be tested
(0036757)
git   
2015-01-28 14:46   
Branch CR23328 has been updated forcibly by apn.

SHA-1: f916d4d62fb2696c7ad2b1bf1120db1c0f63b23e
(0036804)
git   
2015-01-29 12:50   
Branch CR23328 has been updated by apn.

SHA-1: 3506044c83f5e7f541708e38ed8ccbdc269176ef


Detailed log of new commits:

Author: apn
Date: Thu Jan 29 12:49:56 2015 +0300

    Added test case bugs/xde/bug23328

(0036820)
apn   
2015-01-29 14:18   
Dear BugMaster,
Branch CR23328 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested in Release mode.
SHA-1: f916d4d62fb2696c7ad2b1bf1120db1c0f63b23e

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions

Testing cases:
bugs xde bug23328 - OK
http://occt-tests/CR23328-master-occt/Debian60-64/bugs/xde/bug23328.html [^]
http://occt-tests/CR23328-master-occt/Windows-32-VC10/bugs/xde/bug23328.html [^]

Testing on Linux:
Total MEMORY difference: 369560932 / 370114884
Total CPU difference: 54432.75999999984 / 51750.710000000094

Testing on Windows:
Total MEMORY difference: 275915592 / 275761696
Total CPU difference: 35950.953125 / 38148.203125

There are not differences in images found by testdiff.
(0038473)
git   
2015-03-18 13:31   
Branch CR23328 has been deleted by inv.

SHA-1: 3506044c83f5e7f541708e38ed8ccbdc269176ef