View Issue Details

IDProjectCategoryView StatusLast Update
0031969CommunityOCCT:Application Frameworkpublic2020-12-11 11:59
ReporterNickZ Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionno change required 
Platformx64OSWindows 
Product Version7.5.0 
Target Version7.6.0 
Summary0031969: Application Framework - cannot read .std files created by OCCT 6.9.1
DescriptionI am upgrading from 6.9.1 to 7.5.0. To implement any backward compatibility in my app I need to be able at least to load .std files.
Loading .std files as described in
https://documentation.help/Open-Cascade/occt_dev_guides__upgrade.html#upgrade_720_persistence
"Restore OCCT 6.9.1 persistence" section
does not seem to be working for the attached and similar files. The file loads OK in OCAF sample of v6.9.1
Steps To ReproduceInstall official 7.5.0 release.
Try to repeat https://documentation.help/Open-Cascade/occt_dev_guides__upgrade.html#upgrade_720_persistence
"Restore OCCT 6.9.1 persistence" section:
Start Draw. Enter
fsdread D:\Temp\OCC.std D
command, with a path to the attached file. The response is:
Storage error: unknown error code
Additional information
and documentation updates
The code in the "Restore OCCT 6.9.1 persistence" section does not work either, because the
Handle(ShapePersistent_TopoDS::HShape) aHShape = Handle(ShapePersistent_TopoDS::HShape)::DownCast(aPObject);

line returns null in the case. The actual type of aPObject is StdLPersistent_Document
TagsNo tags attached.
Test case number

Attached Files

  • OCC.std (7,197 bytes)

Relationships

related to 0031968 closedbugmaster Community EXCEPTION IN STDSTORAGE::READ() 
child of 0026961 closedabv Open CASCADE Recover possibility to read files in old persistence format 
child of 0024927 closedbugmaster Open CASCADE Getting rid of old "Persistent" functionality 
child of 0025812 closedabv Open CASCADE Replace dynamic loading mechanism of OCAF persistence with dynamic-link one 

Activities

NickZ

2020-12-02 02:38

reporter  

OCC.std (7,197 bytes)

NickZ

2020-12-02 09:06

reporter   ~0097229

I just have solved my main problem by adding StdDrivers::DefineFormat(myApp); so the normal persistence worked. For now I do not really care about the StdStorage::Read()
Thank you

mpv

2020-12-02 18:23

developer   ~0097251

  Dear NickZ,

fsdread DRAW command is used for loading file in legacy format that contains pure shapes, not document. It is described in help page you have provided and in help to this command in DRAW.

OCC.std is not a shape, but std document file. So, in DRAW you may use standard open document command to load it:
Open D:\Temp\OCC.std D

And yes, "StdDrivers::DefineFormat(myApp);" should also work in C++.

NickZ

2020-12-03 02:19

reporter   ~0097256

Thank you, mpv
So, https://dev.opencascade.org/doc/overview/html/occt__upgrade.html#upgrade_720_persistence should not mention fsdread? Or should mention Open?

Open D:\Temp\OCC.std D
Does not work either

The file is just a box. Nothing else

I am OK for now. My problem is solved

mpv

2020-12-03 10:24

developer   ~0097258

https://dev.opencascade.org/doc/overview/html/occt__upgrade.html#upgrade_720_persistence mentions Storage_ShapeSchema functionality - this is related to the shapes open/save, not OCAF document.

Open D:\Temp\OCC.std D
- exception on Windows is fixed in 0031972
GetShape D 0:1:1 s
- returns a box shape
GetName D 0:1:1
- returns a name string

mpv

2020-12-03 10:25

developer   ~0097259

Please, close this issue. No fix is needed.

Issue History

Date Modified Username Field Change
2020-12-02 02:38 NickZ New Issue
2020-12-02 02:38 NickZ Assigned To => gka
2020-12-02 02:38 NickZ File Added: OCC.std
2020-12-02 09:06 NickZ Note Added: 0097229
2020-12-02 14:53 kgv Assigned To gka => mpv
2020-12-02 14:53 kgv Category OCCT:Data Exchange => OCCT:Application Framework
2020-12-02 14:53 kgv Target Version => 7.6.0
2020-12-02 14:53 kgv Summary Can not read .std files created with v6.9.1 => Application Framework - cannot read .std files created by OCCT 6.9.1
2020-12-02 14:55 kgv Relationship added child of 0026961
2020-12-02 14:55 kgv Relationship added child of 0024927
2020-12-02 14:56 kgv Steps to Reproduce Updated
2020-12-02 14:56 kgv Additional Information Updated
2020-12-02 14:57 kgv Relationship added child of 0025812
2020-12-02 14:57 kgv Severity major => minor
2020-12-02 18:23 mpv Note Added: 0097251
2020-12-02 18:23 mpv Assigned To mpv => NickZ
2020-12-02 18:23 mpv Status new => feedback
2020-12-02 20:01 kgv Resolution open => no change required
2020-12-03 02:19 NickZ Note Added: 0097256
2020-12-03 09:38 kgv Relationship added related to 0031968
2020-12-03 10:24 mpv Note Added: 0097258
2020-12-03 10:24 mpv Assigned To NickZ => mpv
2020-12-03 10:24 mpv Status feedback => resolved
2020-12-03 10:25 mpv Note Added: 0097259
2020-12-03 10:25 mpv Assigned To mpv => bugmaster
2020-12-03 10:25 mpv Status resolved => reviewed
2020-12-03 10:28 kgv Status reviewed => feedback
2020-12-11 11:59 bugmaster Status feedback => closed