MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031990Open CASCADE[OCCT] OCCT:Codingpublic2020-12-09 16:052021-02-21 11:43
Reporterasuraven 
Assigned Tobugmaster 
PrioritynormalSeverityintegration request 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.6.0*Fixed in Version 
Summary0031990: Coding, Draw Harness - Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
DescriptionDraw_SaveAndRestore class uses pointers to function in C-like style. Would be useful replace it with virtual C++ like function. This can be achieved by creating an abstract base class and subclasses with implementation in virtual functions.
Steps To ReproduceNot required
TagsNo tags attached.
Test case numberNot required
Attached Files

- Relationships
related to 0031946verifiedbugmaster Modeling Data - replace version numbers with enumerations in TopTools and BinTools 
related to 0029723verifiedbugmaster Modeling Data - Get rid of second writing format (additional save of UV points) 
related to 0031136verifiedbugmaster Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces 
related to 0027264closedbugmaster Weird difference between two BRepTools::Write() overloads 

-  Notes
(0097451)
git (administrator)
2020-12-09 18:39

Branch CR31990 has been created by asuraven.

SHA-1: b76405a6483e687d9d324ec8435919351281fb32


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031990: Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
(0097584)
git (administrator)
2020-12-14 17:15

Branch CR31990 has been deleted by asuraven.

SHA-1: b76405a6483e687d9d324ec8435919351281fb32
(0097587)
git (administrator)
2020-12-14 17:57

Branch CR31990 has been created by asuraven.

SHA-1: 8f760b873d3b9cd7decdea78c0a28551246e2df4


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031990: Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
(0097605)
asuraven (developer)
2020-12-15 12:21

Tests results: http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31990-master-ASURAVEN/view/COMPARE/ [^]
(0098788)
git (administrator)
2021-02-09 15:31

Branch CR31990 has been deleted by asuraven.

SHA-1: 8f760b873d3b9cd7decdea78c0a28551246e2df4
(0098789)
git (administrator)
2021-02-09 15:31

Branch CR31990 has been created by asuraven.

SHA-1: 17d97f12a1ef68cdf4479bb80ca1f7646a9e1484


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031990: Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
(0098790)
asuraven (developer)
2021-02-09 15:36

(0098798)
kgv (developer)
2021-02-09 19:15

It is desired moving generating classes into dedicated header files and putting a small description to each one on it's purpose.
(0098814)
asuraven (developer)
2021-02-10 18:06

(0098831)
asuraven (developer)
2021-02-11 22:54

(0098849)
asuraven (developer)
2021-02-12 18:45

(0098887)
asuraven (developer)
2021-02-16 12:10

(0098905)
git (administrator)
2021-02-16 19:40

Branch CR31990_1 has been created by asuraven.

SHA-1: 76c5bf3b3b0eef97e8bae47e1a4a27f36b2907ff


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031990: Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
    
    Create generating classes into dedicated header files
    Create a singleton Draw_Params class for DRAW parameters
    Create a singleton Draw_SaveAndRestoreTools class instead of self-registration list of ..SaveAndRestore objects
(0098924)
git (administrator)
2021-02-17 17:02

Branch CR31990_1 has been deleted by asuraven.

SHA-1: 76c5bf3b3b0eef97e8bae47e1a4a27f36b2907ff
(0098925)
git (administrator)
2021-02-17 17:03

Branch CR31990_1 has been created by asuraven.

SHA-1: 9f428ff6d9d0156b0f24a06f85bc8fd340ac0c84


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031990: Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
    
    Create generating classes into dedicated header files
    Create a singleton Draw_Params class for DRAW parameters
    Create a singleton Draw_SaveAndRestoreTools class instead of self-registration list of ..SaveAndRestore objects
(0098930)
asuraven (developer)
2021-02-17 17:30

(0098947)
asuraven (developer)
2021-02-18 11:38

Tests result: http://jenkins-test-12.nnov.opencascade.com/view/CR31990_1-master-ASURAVEN/view/COMPARE/ [^]
(0098948)
kgv (developer)
2021-02-18 11:47

+class HLRTest_SaveAndRestore : public Draw_SaveAndRestoreBase
+{
...
+  Handle(Draw_Drawable3D) Restore(std::istream& theIs) const Standard_OVERRIDE
+  {
+    //Standard_Boolean aPerspective;
+    //theIs >> aPerspective;
+    //Standard_Real focus = 1;
+    //if (aPerspective)

It seems there is a TODO in patch which has not been finished.
(0098951)
git (administrator)
2021-02-18 12:31

Branch CR31990_1 has been deleted by asuraven.

SHA-1: 9f428ff6d9d0156b0f24a06f85bc8fd340ac0c84
(0098952)
git (administrator)
2021-02-18 12:31

Branch CR31990_1 has been created by asuraven.

SHA-1: 5d2ea7c2e88e6004b6792d24f2125c6d7fea11b6


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031990: Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
    
    Create generating classes into dedicated header files
    Create a singleton Draw_Params class for DRAW parameters
    Create a singleton Draw_SaveAndRestoreTools class instead of self-registration list of ..SaveAndRestore objects
(0098953)
asuraven (developer)
2021-02-18 12:34

I'm sorry it was a temporary debug comments
(0098966)
git (administrator)
2021-02-18 18:18

Branch CR31990_1 has been updated by kgv.

SHA-1: 81c2d2c340f17caf89b42a460d67b8f23cb24a02


Detailed log of new commits:

Author: kgv
Date: Thu Feb 18 18:18:12 2021 +0300

    # kgv remarks

(0098969)
git (administrator)
2021-02-19 01:02

Branch CR31990_2 has been created by kgv.

SHA-1: ec325ff11b475bb73aa02366f490a56b87f015e4


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031990: Coding, Draw Harness - Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
    
    Save/Restore interface has been moved to Draw_Drawable3D base class.
    Create a singleton Draw_Params class for DRAW parameters
(0098970)
git (administrator)
2021-02-19 01:11

Branch CR31990_2 has been updated forcibly by kgv.

SHA-1: 96b9061d09eee557c18d221a15264b14d3ec0d45
(0098972)
kgv (developer)
2021-02-19 08:47
edited on: 2021-02-19 08:50

The following remarks have been pushed to CR31990_2:
- New classes based on Draw_SaveAndRestoreBase have been removed.
  Methods Save()/Restore() have been pushed to Draw_Drawable3D interface.
  It is unclear from patch why it was necessary creating a parallel hierarchy of classes for storing/restoring Draw_Drawable3D.
- New class Draw_SaveAndRestoreTools has been removed.
  The factory map has been added directly to class Draw_Drawable3D.
- Singleton method may not work as expected when it is defined inline in class header - DrawTrSurf_Params is now returned by DrawTrSurf::Parameters().
  Such methods are expected to be exported by .cxx file to ensure method/object has a single object file.
- Draw_Params renamed to DBRep_Params as it is used only within DBRep package, not Draw package.
- Removed dead code from HLRTest_SaveAndRestore.

Andrey, CR31990_2 has passed Jenkins tests, but could you please check this branch manually in case if you have prepared some extra test scenarios, as I'm not sure regression tests cover save/restore functionality for types other than shapes? (I've checked a couple of types manually).

(0098973)
kgv (developer)
2021-02-19 08:48
edited on: 2021-02-19 08:48

Patch to raise
- OCCT branch: CR31990_2.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31990_2-master-KGV/ [^]

(0098982)
kgv (developer)
2021-02-19 15:25

(0098998)
git (administrator)
2021-02-20 10:39

Branch CR31990_2 has been updated forcibly by kgv.

SHA-1: 1003e94f480e3e57e7b4304e2d6d888ed899ab60
(0099022)
bugmaster (administrator)
2021-02-21 11:32

Combination -
OCCT branch : IR-2021-02-20
master SHA - 127330f9d7ec8c87f4ec37ca8c93bbf65866cdee
a87b7ddc8cb44606b91e3f37113847c3f5f50fdc
Products branch : IR-2021-02-20 SHA - 7c8d26f00c77b65a9d6b04524d1c1dce225fa6d7
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

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17876.110000000237 / 17806.660000000233 [+0.39%]
Products
Total CPU difference: 11541.23000000011 / 11513.250000000124 [+0.24%]
Windows-64-VC14:
OCCT
Total CPU difference: 19352.0 / 19376.859375 [-0.13%]
Products
Total CPU difference: 12836.421875 / 12857.265625 [-0.16%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0099025)
git (administrator)
2021-02-21 11:43

Branch CR31990_2 has been deleted by inv.

SHA-1: 1003e94f480e3e57e7b4304e2d6d888ed899ab60
(0099028)
git (administrator)
2021-02-21 11:43

Branch CR31990_1 has been deleted by inv.

SHA-1: 81c2d2c340f17caf89b42a460d67b8f23cb24a02
(0099035)
git (administrator)
2021-02-21 11:43

Branch CR31990 has been deleted by inv.

SHA-1: 17d97f12a1ef68cdf4479bb80ca1f7646a9e1484

- Related Changesets
occt: master a13df0fe
Timestamp: 2020-11-03 14:22:14
Author: asuraven
Committer: bugmaster
Details ] Diff ]
0031990: Coding, Draw Harness - Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function

Save/Restore interface has been moved to Draw_Drawable3D base class.
Create a singleton Draw_Params class for DRAW parameters
mod - src/DBRep/DBRep.cxx Diff ] File ]
mod - src/DBRep/DBRep.hxx Diff ] File ]
mod - src/DBRep/DBRep_DrawableShape.cxx Diff ] File ]
mod - src/DBRep/DBRep_DrawableShape.hxx Diff ] File ]
add - src/DBRep/DBRep_Params.hxx Diff ] File ]
mod - src/DBRep/FILES Diff ] File ]
mod - src/Draw/Draw_Appli.hxx Diff ] File ]
mod - src/Draw/Draw_Drawable3D.cxx Diff ] File ]
mod - src/Draw/Draw_Drawable3D.hxx Diff ] File ]
rm - src/Draw/Draw_Drawable3D.lxx Diff ] File ]
mod - src/Draw/Draw_Number.cxx Diff ] File ]
mod - src/Draw/Draw_Number.hxx Diff ] File ]
mod - src/Draw/Draw_VariableCommands.cxx Diff ] File ]
mod - src/Draw/FILES Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf.hxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_BezierCurve.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_BezierCurve.hxx Diff ] File ]
rm - src/DrawTrSurf/DrawTrSurf_BezierCurve.lxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_BezierCurve2d.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_BezierCurve2d.hxx Diff ] File ]
rm - src/DrawTrSurf/DrawTrSurf_BezierCurve2d.lxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_BezierSurface.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_BezierSurface.hxx Diff ] File ]
rm - src/DrawTrSurf/DrawTrSurf_BezierSurface.lxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_BSplineCurve.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_BSplineCurve.hxx Diff ] File ]
rm - src/DrawTrSurf/DrawTrSurf_BSplineCurve.lxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_BSplineCurve2d.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_BSplineCurve2d.hxx Diff ] File ]
rm - src/DrawTrSurf/DrawTrSurf_BSplineCurve2d.lxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_BSplineSurface.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_BSplineSurface.hxx Diff ] File ]
rm - src/DrawTrSurf/DrawTrSurf_BSplineSurface.lxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Curve.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Curve.hxx Diff ] File ]
rm - src/DrawTrSurf/DrawTrSurf_Curve.lxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Curve2d.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Curve2d.hxx Diff ] File ]
rm - src/DrawTrSurf/DrawTrSurf_Curve2d.lxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Drawable.hxx Diff ] File ]
rm - src/DrawTrSurf/DrawTrSurf_Drawable.lxx Diff ] File ]
add - src/DrawTrSurf/DrawTrSurf_Params.hxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Point.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Point.hxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Polygon2D.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Polygon2D.hxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Polygon3D.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Polygon3D.hxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Surface.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Surface.hxx Diff ] File ]
rm - src/DrawTrSurf/DrawTrSurf_Surface.lxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Triangulation.cxx Diff ] File ]
mod - src/DrawTrSurf/DrawTrSurf_Triangulation.hxx Diff ] File ]
mod - src/DrawTrSurf/FILES Diff ] File ]
mod - src/HLRTest/FILES Diff ] File ]
mod - src/HLRTest/HLRTest.cxx Diff ] File ]
mod - src/HLRTest/HLRTest_Projector.cxx Diff ] File ]
mod - src/HLRTest/HLRTest_Projector.hxx Diff ] File ]
rm - src/HLRTest/HLRTest_Projector.lxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2020-12-09 16:05 asuraven New Issue
2020-12-09 16:05 asuraven Assigned To => asuraven
2020-12-09 16:06 asuraven Relationship added related to 0031946
2020-12-09 16:07 asuraven Relationship added related to 0029723
2020-12-09 16:07 asuraven Relationship added related to 0031136
2020-12-09 16:08 asuraven Status new => assigned
2020-12-09 18:39 git Note Added: 0097451
2020-12-14 17:15 git Note Added: 0097584
2020-12-14 17:57 git Note Added: 0097587
2020-12-15 12:21 asuraven Note Added: 0097605
2020-12-15 12:22 asuraven Assigned To asuraven => kgv
2020-12-15 12:22 asuraven Status assigned => resolved
2020-12-15 12:22 asuraven Steps to Reproduce Updated View Revisions
2021-02-09 15:31 git Note Added: 0098788
2021-02-09 15:31 git Note Added: 0098789
2021-02-09 15:36 asuraven Note Added: 0098790
2021-02-09 19:15 kgv Note Added: 0098798
2021-02-10 18:06 asuraven Note Added: 0098814
2021-02-11 14:59 kgv Summary Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function => Coding, Draw Harness - Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
2021-02-11 22:54 asuraven Note Added: 0098831
2021-02-12 11:31 kgv Assigned To kgv => asuraven
2021-02-12 11:31 kgv Status resolved => assigned
2021-02-12 11:31 kgv Severity minor => integration request
2021-02-12 18:45 asuraven Note Added: 0098849
2021-02-15 16:27 asuraven Relationship added related to 0027264
2021-02-16 12:10 asuraven Note Added: 0098887
2021-02-16 19:40 git Note Added: 0098905
2021-02-17 17:02 git Note Added: 0098924
2021-02-17 17:03 git Note Added: 0098925
2021-02-17 17:30 asuraven Note Added: 0098930
2021-02-18 11:38 asuraven Note Added: 0098947
2021-02-18 11:38 asuraven Assigned To asuraven => kgv
2021-02-18 11:38 asuraven Status assigned => resolved
2021-02-18 11:47 kgv Note Added: 0098948
2021-02-18 11:47 kgv Assigned To kgv => asuraven
2021-02-18 11:47 kgv Status resolved => assigned
2021-02-18 12:31 git Note Added: 0098951
2021-02-18 12:31 git Note Added: 0098952
2021-02-18 12:34 asuraven Note Added: 0098953
2021-02-18 12:34 asuraven Assigned To asuraven => kgv
2021-02-18 12:34 asuraven Status assigned => resolved
2021-02-18 18:18 git Note Added: 0098966
2021-02-19 01:02 git Note Added: 0098969
2021-02-19 01:11 git Note Added: 0098970
2021-02-19 08:47 kgv Note Added: 0098972
2021-02-19 08:48 kgv Note Added: 0098973
2021-02-19 08:48 kgv Assigned To kgv => bugmaster
2021-02-19 08:48 kgv Status resolved => reviewed
2021-02-19 08:48 kgv Note Edited: 0098973 View Revisions
2021-02-19 08:50 kgv Note Edited: 0098972 View Revisions
2021-02-19 15:25 kgv Note Added: 0098982
2021-02-20 10:39 git Note Added: 0098998
2021-02-21 11:32 bugmaster Note Added: 0099022
2021-02-21 11:32 bugmaster Status reviewed => tested
2021-02-21 11:37 bugmaster Test case number => Not required
2021-02-21 11:40 bugmaster Changeset attached => occt master a13df0fe
2021-02-21 11:40 bugmaster Status tested => verified
2021-02-21 11:40 bugmaster Resolution open => fixed
2021-02-21 11:43 git Note Added: 0099025
2021-02-21 11:43 git Note Added: 0099028
2021-02-21 11:43 git Note Added: 0099035


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker