MantisBT - Open CASCADE
View Issue Details
0031136Open CASCADE[OCCT] OCCT:Modeling Datapublic2019-11-06 18:512020-03-19 11:36
kgv 
msv 
normalminor 
resolvedopen 
[OCCT] 6.3.1 
[OCCT] 7.5.0* 
0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
BinXCAF persistence (BinTools_ShapeSet) does not store per-vertex normal information.

This is a problem in case of triangulation-only Faces, as there is no analytical geometry to restore normals.
pload MODELING XDE OCAF VISUALIZATION
source $env(CSF_OCCTSamplesPath)/tcl/cad.tcl
trinfo res
wavefront res o
readobj o o.obj
binsave o b.bbrep
binrestore b.bbrep b
# same for ASCII format
#save o b.brep
#restore b.brep b
# and for XBF (using BinTools_ShapeSet internally)
#XSave D1 b.xbf
#XOpen b.xbf D2

vclear
vclose ALL

vinit v1/v1
vfront
vdisplay -dispMode 1 res
vfit
vrenderparams -shadingModel phong

vinit v2/v2
vbottom
vdisplay -dispMode 1 b
vfit
vrenderparams -shadingModel phong
No tags attached.
related to 0031137verified bugmaster Modeling Data, BinTools_ShapeSet - avoid allocation of temporary arrays 
related to 0027835closed bugmaster Application Framework, BinXCAF - handle correctly faces with NULL surface within BinTools_ShapeSet 
related to 0031382new gka 0031136: Modeling Data - BinXCAF should preserve length unit information 
child of 0028125new msv Modeling Algorithms - support of BRep shapes based on tessellated geometry 
png cad_ref_OK.png (35,177) 2019-11-06 18:52
https://tracker.dev.opencascade.org/
png cad_xcaf_KO.png (37,223) 2019-11-06 18:52
https://tracker.dev.opencascade.org/
Issue History
2019-11-06 18:51kgvNew Issue
2019-11-06 18:51kgvAssigned To => gka
2019-11-06 18:52kgvFile Added: cad_ref_OK.png
2019-11-06 18:52kgvFile Added: cad_xcaf_KO.png
2019-11-06 18:53kgvAssigned Togka => kgv
2019-11-06 18:53kgvCategoryOCCT:Data Exchange => OCCT:Modeling Data
2019-11-06 18:53kgvProduct Version7.3.0 => 6.3.1
2019-11-06 18:53kgvSummaryData Exchange - BinXCAF persistence loses normals from triangulation-only Faces => Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
2019-11-06 19:27gitNote Added: 0088756
2019-11-07 11:25kgvRelationship addedrelated to 0031137
2019-11-07 11:26kgvRelationship addedrelated to 0027835
2019-11-07 11:26kgvRelationship addedchild of 0028125
2019-11-07 11:30kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22168#r22168
2020-02-10 10:21gitNote Added: 0090439
2020-02-10 15:31asuravenAssigned Tokgv => asuraven
2020-02-18 17:30kgvRelationship addedrelated to 0031382
2020-03-03 16:52gitNote Added: 0090800
2020-03-04 12:35szyStatusnew => assigned
2020-03-13 15:45gitNote Added: 0090929
2020-03-15 11:17kgvNote Added: 0090946
2020-03-16 15:13asuravenNote Added: 0090970
2020-03-16 15:13asuravenAssigned Toasuraven => msv
2020-03-16 15:13asuravenStatusassigned => resolved
2020-03-16 16:07asuravenNote Added: 0090972
2020-03-19 11:36kgvNote Added: 0091046

Notes
(0088756)
git   
2019-11-06 19:27   
Branch CR31136 has been created by kgv.

SHA-1: b9e59ab73fd56c77484a2e80cde9df77d01fe97a


Detailed log of new commits:

Author: kgv
Date: Wed Nov 6 19:26:24 2019 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    BinTools - added missing tools for reading/writing short reals.
    BinTools_ShapeSet now defines maps with proper types instead of Standard_Transient.
    BinTools_ShapeSet::ReadTriangulation() - fixed inefficient reading of triangulation data
    with allocation or redundant temporary arrays.
    wavefront command - export "f" instead of obsolete "fo" keys into file.
(0090439)
git   
2020-02-10 10:21   
Branch CR31136 has been deleted by kgv.

SHA-1: b9e59ab73fd56c77484a2e80cde9df77d01fe97a
(0090800)
git   
2020-03-03 16:52   
Branch CR31136 has been created by asuraven.

SHA-1: bee13ef1cf7c244bcdf0592f42cf2b5e124c95fd


No new revisions were added by this update.
(0090929)
git   
2020-03-13 15:45   
Branch CR31136 has been updated by asuraven.

SHA-1: 3f104410c39099cdda90d0f8dbaa7c7c333a3ae9


Detailed log of new commits:

Author: asuraven
Date: Fri Mar 13 15:42:53 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces

(0090946)
kgv   
2020-03-15 11:17   
+  *  @f$ f_{3} @f$ -- IGNORED(version 1 olny) \\ checked (version 2 or later); 

olny
(0090970)
asuraven   
2020-03-16 15:13   
http://jenkins-test-12.nnov.opencascade.com/view/CR31136-master-ASURAVEN/view/COMPARE/ [^]
Pleace review
(0090972)
asuraven   
2020-03-16 16:07   
Details:
*** Binary Document ***
BinLDrivers_FormatVersion.hxx (added)
- enum class BinLDrivers_FormatVersion added

BinDrivers
- BinDrivers::StorageVersion() changed

BinLDrivers
- Current version type changed from #define to static const BinLDrivers_FormatVersion class member
- Current version value increased from 10 to 11
- BinLDrivers::StorageVersion() changed to BinLDrivers::StringStorageVersion()

BinLDrivers_DocumentRetrievalDriver
BinLDrivers_DocumentSection
BinMDataStd
BinMDataStd_AsciiStringDriver
BinMDataStd_ByteArrayDriver
BinMDataStd_ExtStringArrayDriver
BinMDataStd_IntegerArrayDriver
BinMDataStd_IntegerDriver
BinMDataStd_IntPackedMapDriver
BinMDataStd_NameDriver
BinMDataStd_RealArrayDriver
BinMDataStd_RealDriver
- Magic constants changed to BinLDrivers_FormatVersion enum

*** Binary Shape ***
BinTools_ShapeSet
- enum class BinTools_FormatVersion added
- Function SetFormatNb() is replaced by SetFormat() (behavior changed)
- Type of myTriangulations changed from NCollection_IndexedMap to NCollection_IndexedDataMap (for store info about the need to write normals into a file)
- Version info strings moved from global area to class private section
- Magic constants changed to BinTools_FormatVersion enum
- WriteTriangulation() / ReadTriangulation()
  * Save/Read NeedToWriteNormals for every triangulation (only for VERSION_4)
  * Save/Read triangulation's normals values if it needs (only for VERSION_4)

BinMNaming_NamedShapeDriver
- Current version type changed from #define to static const BinTools_FormatVersion class member
- Current version value increased from 3 to 4

BinMNaming_NamingDriver
BinMXCAFDoc_LocationDriver
BRepTools_ShapeSet
- Magic constants changed to BinTools_FormatVersion enum

BinTools
- added theVersion parameter to Write() functions

*** Text Shape ***
TopTools_ShapeSet
- enum class TopTools_FormatVersion added
- Function SetFormatNb() is replaced by SetFormat() (behavior changed)
- Current version value increased from 2 to 3
- Version info strings moved from global area to class private section

BRepTools_ShapeSet
- Type of myTriangulations changed from TColStd_IndexedMapOfTransient to NCollection_IndexedDataMap (for store info about the need to write normals into a file)
- WriteTriangulation() / ReadTriangulation()
  * Save/Read NeedToWriteNormals for every triangulation (only for VERSION_3)
  * Save/Read triangulation's normals values if it needs (only for VERSION_3)
  
Draw_SaveAndRestoreBase (added)
- Class Draw_SaveAndRestoreBase declaration moved from Draw_Appli.hxx and changed to abstract base class
- Class Draw_SaveAndRestoreBase realization moved from Draw_VariableCommands.cxx
- Draw_First static pointer moved from Draw_VariableCommands.cxx as static member
- GetFirst() static function added
- Derived class Draw_SaveAndRestoreNumber added

DBRep
- Draw_SaveAndRestoreDBRep derived from Draw_SaveAndRestoreBase class added
- Named argument "-version" added to global binsave() function
- static non-member functions changed to Draw_SaveAndRestoreDBRep overrided virtual functions

DrawTrSurf
- Following derived from Draw_SaveAndRestoreBase classes added:
  * Draw_SaveAndRestoreCurve
  * Draw_SaveAndRestoreBezierCurve
  * Draw_SaveAndRestoreBSplineCurve
  * Draw_SaveAndRestoreCurve2d
  * Draw_SaveAndRestoreBezierCurve2d
  * Draw_SaveAndRestoreBSplineCurve2d
  * Draw_SaveAndRestoreSurface
  * Draw_SaveAndRestoreBezierSurface
  * Draw_SaveAndRestoreBSplineSurface
  * Draw_SaveAndRestorePoint
  * Draw_SaveAndRestoreTriangulation
  * Draw_SaveAndRestorePolygon3D
  * Draw_SaveAndRestorePolygon2D
- static non-member functions changed to derived classes overrided virtual functions

HLRTest
- Derived class Draw_SaveAndRestoreHLRTest added
- static non-member functions changed to derived classes overrided virtual functions

Poly_Triangulation
- Poly_Triangulation constructor with "hasNormals" parameter added

StandardCommands
- Named argument "-version" added to tcl save() DRAW command
  
  
*** XML Document ***
XmlLDrivers_FormatVersion (added)
- enum class XmlLDrivers_FormatVersion added

XmlLDrivers
- Current version type changed from #define to static const XmlLDrivers_FormatVersion class member
- Current version value changed from 9 to 10
- int StorageVersion() replaced by TCollection_AsciiString XmlLDrivers::StringFormatVersion()

CDM_Document
XmlLDrivers_DocumentRetrievalDriver
XmlLDrivers_DocumentStorageDriver
XmlMDataStd_ByteArrayDriver
XmlMDataStd_ExtStringArrayDriver
XmlMDataStd_IntegerArrayDriver
XmlMDataStd_IntPackedMapDriver
XmlMDataStd_RealArrayDriver
XmlMDataStd_TreeNodeDriver
XmlMDF
XmlMNaming_NamedShapeDriver
XmlMNaming_NamingDriver
XmlMXCAFDoc_LocationDriver
- Magic constants changed to XmlLDrivers_FormatVersion enum

CDM_Document
- myStorageFormatVersion type changed from Standard_Integer to XmlLDrivers_FormatVersion


*** Common ***
Storage_HeaderData
- StorageVersion() string function replaced by StringStorageVersion(), BinStorageVersion() and XmlStorageVersion() for compatibility with format version`s enum classes
- SetStorageVersion(const BinLDrivers_FormatVersion&) and SetStorageVersion (const XmlLDrivers_FormatVersion&) overloaded fuctions added

*** Documentation ***
brep_wp.md
- Info about changes in BRep format added
upgrade.md
- Info about changes in API added
(0091046)
kgv   
2020-03-19 11:36   
+enum class BinLDrivers_FormatVersion : Standard_Integer

OCCT has to be compilable by some old compilers not supporting enum class.