View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029402 | Community | OCCT:Application Framework | public | 2017-12-25 18:13 | 2018-06-29 21:19 |
Reporter | Assigned To | apn | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.3.0 | ||||
Target Version | 7.3.0 | Fixed in Version | 7.3.0 | ||
Summary | 0029402: In OCCT7.2.1-dev the names written into a FSD_File are associated with the wrong shapes. | ||||
Description | Customer complaint: "I am still experiencing problem with fsd files written by the following code: Handle(StdStorage_Data) data = new StdStorage_Data(); .....adding a few roots to data ... NCollection_Handle<Storage_BaseDriver> fileDriver(new FSD_File()); fileDriver->Open(TCollection_ExtendedString(fileName), Storage_VSWrite); StdStorage::Write(*fileDriver, data); The file is written but names associated with different roots are not well preserved in a following StdStorage::Read. To be more precise the names are associated with wrong shapes in the sense that they are permuted. I have observed that the proper name association can be reestablished applying a small change to the function "Standard_Boolean StdStorage_RootData::Write(Storage_BaseDriver& theDriver)" which is defined in "src/StdStorage/StdStorage_RootData.cxx". The changed lines are the following: theDriver.SetRootSectionSize(NumberOfRoots()); int I=0; //HERE A COUNTER IS ADDED for (StdStorage_MapOfRoots::Iterator anIt(myObjects); anIt.More(); anIt.Next()) { const Handle(StdStorage_Root)& aRoot = anIt.Value(); try { OCC_CATCH_SIGNALS // theDriver.WriteRoot(aRoot->Name(), aRoot->Reference(), aRoot->Type()); I++; theDriver.WriteRoot(aRoot->Name(), I, aRoot->Type()); // HERE THE COUNTER IS USED IN PLACE OF aRoot->Reference() } catch (Storage_StreamTypeMismatchError) { myErrorStatus = Storage_VSTypeMismatch; myErrorStatusExt = "ReadRoot"; return Standard_False; } } With this change the arguments passed to the function "theDriver.WriteRoot(const TCollection_AsciiString& rootName, const Standard_Integer aRef, const TCollection_AsciiString& rootType)" are the same as it happens inside of the function "void Storage_Schema::Write(Storage_BaseDriver& f, const Handle(Storage_Data)& aData) const" which is defined in "src/Storage/Storage_Schema.cxx" " The problem is reproduced using Draw commands 'fsdwrite' & modified 'fsdread' . | ||||
Steps To Reproduce | The issue can be reproduced (tested) using new test case tests\persist\fsd\B2 and the modified Draw command "fsdread". | ||||
Tags | No tags attached. | ||||
Test case number | persist fsd B2 | ||||
|
Branch CR29402 has been created by szy. SHA-1: 68100ac965bb785a0e0ca6b2cddead9a2b60b821 Detailed log of new commits: Author: szy Date: Wed Dec 27 17:28:54 2017 +0300 0029402: In OCCT7.2.1-dev the names written into a FSD_File are associated with the wrong shapes. //the issue is fixed using another solution (changing DataMap to IndexedDataMap). |
|
The issue is fixed by replacing DataMap to IndexedDataMap and tested: - http://jenkins-test-10.nnov.opencascade.com:8080/job/CR29402-master-szy-OCCT-Windows-64-VC10-opt-tests-compare-windows/1/ - http://jenkins-test-10.nnov.opencascade.com:8080/job/CR29402-master-szy-OCCT-Debian70-64-opt-tests-compare-linux/1/ - http://jenkins-test-10.nnov.opencascade.com:8080/job/CR29402-master-szy-Products-Windows-64-VC10-opt-tests-compare-windows/1/ - http://jenkins-test-10.nnov.opencascade.com:8080/job/CR29402-master-szy-Products-Debian70-64-opt-tests-compare-linux/1/ |
|
Please, correct the usage-text in DDocStd_ShapeSchemaCommands.cxx DDocStd_fsdread method. |
|
Branch CR29402 has been updated by szy. SHA-1: b0c1144165b6e4895f3e462e8edadd9dc9589ab6 Detailed log of new commits: Author: szy Date: Thu Dec 28 11:21:04 2017 +0300 0029402: In OCCT7.2.1-dev the names written into a FSD_File are associated with the wrong shapes. //Fixed misprint in comments to Draw command fsdread. |
|
The misprint fixed. Review it, please. |
|
Branch CR29402_1 has been created by szy. SHA-1: 5dee3b206404004ac3cd0bf208a569d384225781 Detailed log of new commits: Author: szy Date: Wed Dec 27 17:28:54 2017 +0300 0029402: In OCCT7.2.1-dev the names written into a FSD_File are associated with the wrong shapes. //Fixed misprint in comments to Draw command fsdread. 0029402: In OCCT7.2.1-dev the names written into a FSD_File are associated with the wrong shapes. The issue of incorrect Roots indexing is fixed by changing DataMap to IndexedDataMap. //Also Draw command fsdread is improved to allow restoring of shapes with kept names. |
|
Combination - OCCT branch : CR29402 SHA - 68100ac965bb785a0e0ca6b2cddead9a2b60b821 Products branch : master SHA - 8cfd04a34de609800e36c28f29ee8e42919a0098 was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences Test case: persist fsd B2 - OK CPU differences: Debian70-64: OCCT Total CPU difference: 18443.819999999672 / 18513.219999999714 [-0.37%] Products Total CPU difference: 7502.219999999996 / 7509.620000000005 [-0.10%] Windows-64-VC10: OCCT Total CPU difference: 17890.272680498576 / 17919.33566679854 [-0.16%] Products Total CPU difference: 8078.090582299989 / 8016.251785899991 [+0.77%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR29402 has been deleted by kgv. SHA-1: b0c1144165b6e4895f3e462e8edadd9dc9589ab6 |
|
Branch CR29402_1 has been deleted by kgv. SHA-1: 5dee3b206404004ac3cd0bf208a569d384225781 |
occt: master 409095ba 2017-12-27 14:28:54
Committer: apn Details Diff |
0029402: In OCCT7.2.1-dev the names written into a FSD_File are associated with the wrong shapes. The issue of incorrect Roots indexing is fixed by changing DataMap to IndexedDataMap. Draw command fsdread was improved to allow restoring of shapes with kept names. |
Affected Issues 0029402 |
|
mod - src/DDocStd/DDocStd_ShapeSchemaCommands.cxx | Diff File | ||
mod - src/StdStorage/StdStorage_MapOfRoots.hxx | Diff File | ||
mod - src/StdStorage/StdStorage_RootData.cxx | Diff File | ||
add - tests/persist/fsd/B2 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-12-25 18:13 |
|
New Issue | |
2017-12-25 18:13 |
|
Assigned To | => szy |
2017-12-27 16:58 |
|
Status | new => assigned |
2017-12-27 17:29 | git | Note Added: 0073175 | |
2017-12-27 17:33 |
|
Steps to Reproduce Updated | |
2017-12-28 09:52 |
|
Note Added: 0073176 | |
2017-12-28 09:52 |
|
Assigned To | szy => mpv |
2017-12-28 09:52 |
|
Status | assigned => resolved |
2017-12-28 11:14 |
|
Note Added: 0073178 | |
2017-12-28 11:14 |
|
Assigned To | mpv => szy |
2017-12-28 11:14 |
|
Status | resolved => assigned |
2017-12-28 11:21 | git | Note Added: 0073179 | |
2017-12-28 11:22 |
|
Note Added: 0073180 | |
2017-12-28 11:22 |
|
Assigned To | szy => mpv |
2017-12-28 11:22 |
|
Status | assigned => resolved |
2017-12-28 11:33 |
|
Assigned To | mpv => bugmaster |
2017-12-28 11:33 |
|
Status | resolved => reviewed |
2017-12-28 11:42 | git | Note Added: 0073181 | |
2017-12-28 12:28 | apn | Test case number | => persist fsd B2 |
2017-12-28 12:28 | apn | Note Added: 0073182 | |
2017-12-28 12:28 | apn | Status | reviewed => tested |
2017-12-30 18:43 | apn | Changeset attached | => occt master 409095ba |
2017-12-30 18:43 | apn | Assigned To | bugmaster => apn |
2017-12-30 18:43 | apn | Status | tested => verified |
2017-12-30 18:43 | apn | Resolution | open => fixed |
2018-01-11 11:10 | git | Note Added: 0073335 | |
2018-01-11 11:10 | git | Note Added: 0073336 | |
2018-02-18 23:38 |
|
Target Version | 7.4.0 => 7.3.0 |
2018-06-29 21:15 |
|
Fixed in Version | => 7.3.0 |
2018-06-29 21:19 |
|
Status | verified => closed |