MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031136Open CASCADE[OCCT] OCCT:Modeling Datapublic2019-11-06 18:512020-03-19 11:36
Reporterkgv 
Assigned Tomsv 
PrioritynormalSeverityminor 
StatusresolvedResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 6.3.1 
Target Version[OCCT] 7.5.0*Fixed in Version 
Summary0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
DescriptionBinXCAF 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.
Steps To Reproduce
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
TagsNo tags attached.
Test case number
Attached Filespng file icon cad_ref_OK.png (35,177 bytes) 2019-11-06 18:52
png file icon cad_xcaf_KO.png (37,223 bytes) 2019-11-06 18:52

- Relationships
related to 0031137verifiedbugmaster Modeling Data, BinTools_ShapeSet - avoid allocation of temporary arrays 
related to 0027835closedbugmaster Application Framework, BinXCAF - handle correctly faces with NULL surface within BinTools_ShapeSet 
related to 0031382newgka 0031136: Modeling Data - BinXCAF should preserve length unit information 
child of 0028125newmsv Modeling Algorithms - support of BRep shapes based on tessellated geometry 

-  Notes
(0088756)
git (administrator)
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 (administrator)
2020-02-10 10:21

Branch CR31136 has been deleted by kgv.

SHA-1: b9e59ab73fd56c77484a2e80cde9df77d01fe97a
(0090800)
git (administrator)
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 (administrator)
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 (developer)
2020-03-15 11:17

+  *  @f$ f_{3} @f$ -- IGNORED(version 1 olny) \\ checked (version 2 or later); 

olny
(0090970)
asuraven (developer)
2020-03-16 15:13

http://jenkins-test-12.nnov.opencascade.com/view/CR31136-master-ASURAVEN/view/COMPARE/ [^]
Pleace review
(0090972)
asuraven (developer)
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 (developer)
2020-03-19 11:36

+enum class BinLDrivers_FormatVersion : Standard_Integer

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

- Issue History
Date Modified Username Field Change
2019-11-06 18:51 kgv New Issue
2019-11-06 18:51 kgv Assigned To => gka
2019-11-06 18:52 kgv File Added: cad_ref_OK.png
2019-11-06 18:52 kgv File Added: cad_xcaf_KO.png
2019-11-06 18:53 kgv Assigned To gka => kgv
2019-11-06 18:53 kgv Category OCCT:Data Exchange => OCCT:Modeling Data
2019-11-06 18:53 kgv Product Version 7.3.0 => 6.3.1
2019-11-06 18:53 kgv Summary Data Exchange - BinXCAF persistence loses normals from triangulation-only Faces => Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
2019-11-06 19:27 git Note Added: 0088756
2019-11-07 11:25 kgv Relationship added related to 0031137
2019-11-07 11:26 kgv Relationship added related to 0027835
2019-11-07 11:26 kgv Relationship added child of 0028125
2019-11-07 11:30 kgv Steps to Reproduce Updated View Revisions
2020-02-10 10:21 git Note Added: 0090439
2020-02-10 15:31 asuraven Assigned To kgv => asuraven
2020-02-18 17:30 kgv Relationship added related to 0031382
2020-03-03 16:52 git Note Added: 0090800
2020-03-04 12:35 szy Status new => assigned
2020-03-13 15:45 git Note Added: 0090929
2020-03-15 11:17 kgv Note Added: 0090946
2020-03-16 15:13 asuraven Note Added: 0090970
2020-03-16 15:13 asuraven Assigned To asuraven => msv
2020-03-16 15:13 asuraven Status assigned => resolved
2020-03-16 16:07 asuraven Note Added: 0090972
2020-03-19 11:36 kgv Note Added: 0091046


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker