Archived issue #0027860
Visualization - clean up Transformation Persistence API
Description
Transformation Persistence API should be cleaned up in the following way:
- Graphic3d_TransformPers should become a handle class.
Graphic3d_CStructure::TransformPersistence and PrsMgr_PresentableObject::myTransformPersistence should not be allocated by default.
Since majority of presentations are expected to be without transformation persistence it sounds reasonable to allocate this property dynamically.
- Graphic3d_TransModeFlags should be defined as enumeration.
Majority of flags can not be combined, so current definition as a bitmask is confusing.
- Graphic3d_TMF_PanPers should be removed as actually unsupported and making no sense.
The appropriate alternative is Graphic3d_TMF_TriedronPers, which should be probably extended to define independent offset in pixels within X and Y coordinate.
- Graphic3d_TMF_FullPers should be removed as actually unsupported and making no sense.
The appropriate replacement is Graphic3d_TMF_2d.
- Combination of Graphic3d_TMF_ZoomPers + Graphic3d_TMF_RotatePers should re-defined by dedicated value.
- Graphic3d_TransformPers should be extended by new methods
making different meaning of Point depending on persistence mode more straightforward.
Projection state changes should be removed OpenGl_Structure::Render() then:
- Graphic3d_TransformPers should become a handle class.
Graphic3d_CStructure::TransformPersistence and PrsMgr_PresentableObject::myTransformPersistence should not be allocated by default.
Since majority of presentations are expected to be without transformation persistence it sounds reasonable to allocate this property dynamically.
- Graphic3d_TransModeFlags should be defined as enumeration.
Majority of flags can not be combined, so current definition as a bitmask is confusing.
- Graphic3d_TMF_PanPers should be removed as actually unsupported and making no sense.
The appropriate alternative is Graphic3d_TMF_TriedronPers, which should be probably extended to define independent offset in pixels within X and Y coordinate.
- Graphic3d_TMF_FullPers should be removed as actually unsupported and making no sense.
The appropriate replacement is Graphic3d_TMF_2d.
- Combination of Graphic3d_TMF_ZoomPers + Graphic3d_TMF_RotatePers should re-defined by dedicated value.
- Graphic3d_TransformPers should be extended by new methods
making different meaning of Point depending on persistence mode more straightforward.
Projection state changes should be removed OpenGl_Structure::Render() then:
aCtx->ProjectionState.Push();
aCtx->ApplyProjectionMatrix();
...
aCtx->ProjectionState.Pop();
aCtx->ApplyProjectionMatrix();
Steps to reproduce
Transformation persistence float precision issues:
pload MODELING VISUALIZATION box b 0 0 0 1 2 3 vclear vinit View1 vaxo vpoint p0 0 0 0 vpoint p1 1 0 0 vpoint p2 2 0 0 vfit vtrih t vdisplay -dispMode 1 b vdisplay -trsfPers trihedron -trsfPersPos 1 -1 80 t vzoom 100000
Public activity
26 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sat Sep 17 19:33:53 2016 +0300
0027860: Visualization - clean up Transformation Persistence API
Graphic3d_Camera::TransformMatrices redundant NCollection_Handle usage
has been replaced with validity flags.
Graphic3d_TransModeFlags now defined as enumeration, not integer bit flags.
Graphic3d_TMF_PanPers and Graphic3d_TMF_FullPers have been removed.
Graphic3d_TMF_ZoomRotatePers has been introduced.
Graphic3d_TransformPers is now inherits Standard_Transient.
Graphic3d_TransformPers now defines dedicated constructors
for 3D persistence (zoom / rotate) and 2D persistence (2d / trihedron).
2D persistence now supports dedicated values for X and Y offsets.
The corner is now specified by enumeration Aspect_TypeOfTriedronPosition
instead of indirect interpretation of anchor point values.
PrsMgr_PresentableObject, Graphic3d_CStructure now hold
Handle(Graphic3d_TransformPers) instead of a value.
Method ::SetTransformPersistence(), ::TransformPersistence()
now works with Handle(Graphic3d_TransformPers).
Old methods have been marked deprecated.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sat Sep 17 19:33:53 2016 +0300
0027860: Visualization - clean up Transformation Persistence API
Graphic3d_Camera::TransformMatrices redundant NCollection_Handle usage
has been replaced with validity flags.
Graphic3d_TransModeFlags now defined as enumeration, not integer bit flags.
Graphic3d_TMF_PanPers and Graphic3d_TMF_FullPers have been removed.
Graphic3d_TMF_ZoomRotatePers has been introduced.
Graphic3d_TransformPers is now inherits Standard_Transient.
Graphic3d_TransformPers now defines dedicated constructors
for 3D persistence (zoom / rotate) and 2D persistence (2d / trihedron).
2D persistence now supports dedicated values for X and Y offsets.
The corner is now specified by enumeration Aspect_TypeOfTriedronPosition
instead of indirect interpretation of anchor point values.
PrsMgr_PresentableObject, Graphic3d_CStructure now hold
Handle(Graphic3d_TransformPers) instead of a value.
Method ::SetTransformPersistence(), ::TransformPersistence()
now works with Handle(Graphic3d_TransformPers).
Old methods have been marked deprecated.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been updated by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sat Sep 17 19:33:53 2016 +0300
Graphic3d_TransformPers - fixed handling of Graphic3d_TMF_ZoomRotatePers.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sat Sep 17 19:33:53 2016 +0300
Graphic3d_TransformPers - fixed handling of Graphic3d_TMF_ZoomRotatePers.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sat Sep 17 19:33:53 2016 +0300
0027860: Visualization - clean up Transformation Persistence API
Graphic3d_Camera::TransformMatrices redundant NCollection_Handle usage
has been replaced with validity flags.
Graphic3d_TransModeFlags now defined as enumeration, not integer bit flags.
Graphic3d_TMF_PanPers and Graphic3d_TMF_FullPers have been removed.
Graphic3d_TMF_ZoomRotatePers has been introduced.
Graphic3d_TransformPers is now inherits Standard_Transient.
Graphic3d_TransformPers now defines dedicated constructors
for 3D persistence (zoom / rotate) and 2D persistence (2d / trihedron).
2D persistence now supports dedicated values for X and Y offsets.
The corner is now specified by enumeration Aspect_TypeOfTriedronPosition
instead of indirect interpretation of anchor point values.
Fixed handling of Graphic3d_TMF_ZoomRotatePers (combination of Graphic3d_TMF_RotatePers + Graphic3d_TMF_ZoomPers).
PrsMgr_PresentableObject, Graphic3d_CStructure now hold
Handle(Graphic3d_TransformPers) instead of a value.
Method ::SetTransformPersistence(), ::TransformPersistence()
now works with Handle(Graphic3d_TransformPers).
Old methods have been marked deprecated.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sat Sep 17 19:33:53 2016 +0300
0027860: Visualization - clean up Transformation Persistence API
Graphic3d_Camera::TransformMatrices redundant NCollection_Handle usage
has been replaced with validity flags.
Graphic3d_TransModeFlags now defined as enumeration, not integer bit flags.
Graphic3d_TMF_PanPers and Graphic3d_TMF_FullPers have been removed.
Graphic3d_TMF_ZoomRotatePers has been introduced.
Graphic3d_TransformPers is now inherits Standard_Transient.
Graphic3d_TransformPers now defines dedicated constructors
for 3D persistence (zoom / rotate) and 2D persistence (2d / trihedron).
2D persistence now supports dedicated values for X and Y offsets.
The corner is now specified by enumeration Aspect_TypeOfTriedronPosition
instead of indirect interpretation of anchor point values.
Fixed handling of Graphic3d_TMF_ZoomRotatePers (combination of Graphic3d_TMF_RotatePers + Graphic3d_TMF_ZoomPers).
PrsMgr_PresentableObject, Graphic3d_CStructure now hold
Handle(Graphic3d_TransformPers) instead of a value.
Method ::SetTransformPersistence(), ::TransformPersistence()
now works with Handle(Graphic3d_TransformPers).
Old methods have been marked deprecated.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Patch is ready for review.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Dear Commenter 1,
Please test branch CR27860_1.
Please test branch CR27860_1.
Dear Commenter 1,
Branch CR27860_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 2 (0 on master)
Windows: 0 (0 on master)
MasOS: 2 (0 on master)
products component:
Linux: 64
Windows: 0
MacOS: 1133
New warnings have been detected during OCCT component building
on Linux:
http://jenkins-test-05.nnov.opencascade.com/view/CR27860_1-master/job/CR27860_1-master-OCCT-Debian70-64-opt-compile/1/warnings17Result/
on MacOS:
http://jenkins-test-05.nnov.opencascade.com/view/CR27860_1-master/job/CR27860_1-master-OCCT-MacOS-opt-compile/1/warnings7Result/
Compilation error has been detected during building of
CSharp Products samples on Windows:
http://jenkins-test-05.nnov.opencascade.com/view/CR27860_1-master/job/CR27860_1-master-Products-Windows-64-VC10-csharp-samples/1/parsed_console/
Java Products samples on Windows:
http://jenkins-test-05.nnov.opencascade.com/view/CR27860_1-master/job/CR27860_1-master-Products-Windows-64-VC10-java-samples/1/parsed_console/
Regressions/Differences:
http://occt-tests/CR27860_1-master-OCCT/Debian70-64/summary.html
http://occt-tests/CR27860_1-master-OCCT/Windows-64-VC10/summary.html
bugs vis bug22906, bug23484_2, bug24224, bug24522, bug24717, bug24901, bug24902_1, bug24902_2, bug25052, bug25060, bug25132, bug25229, bug25778, bug26028, bug26940, bug26973, bug27751_capping
demo samples dimensions, dimensionsglsl
v3d glsl distinguish_off
Testing on Linux:
Total MEMORY difference: 89202093 / 89648669 [-0.50%]
Total CPU difference: 19385.870000000108 / 19203.02999999994 [+0.95%]
Testing on Windows:
Total MEMORY difference: 57202413 / 57211877 [-0.02%]
Total CPU difference: 18317.26301759879 / 18509.12864749872 [-1.04%]
There are differences in images found by testdiff:
http://occt-tests/CR27860_1-master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27860_1-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html
v3d glsl tiles
demo samples penrose
bugs vis bug26344
Branch CR27860_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 2 (0 on master)
Windows: 0 (0 on master)
MasOS: 2 (0 on master)
products component:
Linux: 64
Windows: 0
MacOS: 1133
New warnings have been detected during OCCT component building
on Linux:
http://jenkins-test-05.nnov.opencascade.com/view/CR27860_1-master/job/CR27860_1-master-OCCT-Debian70-64-opt-compile/1/warnings17Result/
on MacOS:
http://jenkins-test-05.nnov.opencascade.com/view/CR27860_1-master/job/CR27860_1-master-OCCT-MacOS-opt-compile/1/warnings7Result/
Compilation error has been detected during building of
CSharp Products samples on Windows:
http://jenkins-test-05.nnov.opencascade.com/view/CR27860_1-master/job/CR27860_1-master-Products-Windows-64-VC10-csharp-samples/1/parsed_console/
Java Products samples on Windows:
http://jenkins-test-05.nnov.opencascade.com/view/CR27860_1-master/job/CR27860_1-master-Products-Windows-64-VC10-java-samples/1/parsed_console/
Regressions/Differences:
http://occt-tests/CR27860_1-master-OCCT/Debian70-64/summary.html
http://occt-tests/CR27860_1-master-OCCT/Windows-64-VC10/summary.html
bugs vis bug22906, bug23484_2, bug24224, bug24522, bug24717, bug24901, bug24902_1, bug24902_2, bug25052, bug25060, bug25132, bug25229, bug25778, bug26028, bug26940, bug26973, bug27751_capping
demo samples dimensions, dimensionsglsl
v3d glsl distinguish_off
Testing on Linux:
Total MEMORY difference: 89202093 / 89648669 [-0.50%]
Total CPU difference: 19385.870000000108 / 19203.02999999994 [+0.95%]
Testing on Windows:
Total MEMORY difference: 57202413 / 57211877 [-0.02%]
Total CPU difference: 18317.26301759879 / 18509.12864749872 [-1.04%]
There are differences in images found by testdiff:
http://occt-tests/CR27860_1-master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27860_1-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html
v3d glsl tiles
demo samples penrose
bugs vis bug26344
Dear Kirill,
Branch [archived branch] has been rejected due to:
- compilation errors
- additional warnings
- regressions/differences/improvements
- differences in images
Branch [archived branch] has been rejected due to:
- compilation errors
- additional warnings
- regressions/differences/improvements
- differences in images
Branch [archived branch] has been updated by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Wed Sep 21 11:56:06 2016 +0300
fix regressions
Test case v3d/glsl/tiles has been updated.
Removed MSVC warnings suppression from ViewerTest_ObjectCommands.cxx.
OpenGl_Structure::Render() - fixed misprint in condition.
Graphic3d_Camera::SetFOVy() - fixed misprint in assignment.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Wed Sep 21 11:56:06 2016 +0300
fix regressions
Test case v3d/glsl/tiles has been updated.
Removed MSVC warnings suppression from ViewerTest_ObjectCommands.cxx.
OpenGl_Structure::Render() - fixed misprint in condition.
Graphic3d_Camera::SetFOVy() - fixed misprint in assignment.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Mon Sep 19 23:40:07 2016 +0300
0027860: Visualization - clean up Transformation Persistence API
Graphic3d_Camera::TransformMatrices redundant NCollection_Handle usage
has been replaced with validity flags.
Graphic3d_TransModeFlags now defined as enumeration, not integer bit flags.
Graphic3d_TMF_PanPers and Graphic3d_TMF_FullPers have been removed.
Graphic3d_TMF_ZoomRotatePers has been introduced.
Graphic3d_TransformPers is now inherits Standard_Transient.
Graphic3d_TransformPers now defines dedicated constructors
for 3D persistence (zoom / rotate) and 2D persistence (2d / trihedron).
2D persistence now supports dedicated values for X and Y offsets.
The corner is now specified by enumeration Aspect_TypeOfTriedronPosition
instead of indirect interpretation of anchor point values.
Fixed handling of Graphic3d_TMF_ZoomRotatePers (combination of Graphic3d_TMF_RotatePers + Graphic3d_TMF_ZoomPers).
PrsMgr_PresentableObject, Graphic3d_CStructure now hold
Handle(Graphic3d_TransformPers) instead of a value.
Method ::SetTransformPersistence(), ::TransformPersistence()
now works with Handle(Graphic3d_TransformPers).
Old methods have been marked deprecated.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Mon Sep 19 23:40:07 2016 +0300
0027860: Visualization - clean up Transformation Persistence API
Graphic3d_Camera::TransformMatrices redundant NCollection_Handle usage
has been replaced with validity flags.
Graphic3d_TransModeFlags now defined as enumeration, not integer bit flags.
Graphic3d_TMF_PanPers and Graphic3d_TMF_FullPers have been removed.
Graphic3d_TMF_ZoomRotatePers has been introduced.
Graphic3d_TransformPers is now inherits Standard_Transient.
Graphic3d_TransformPers now defines dedicated constructors
for 3D persistence (zoom / rotate) and 2D persistence (2d / trihedron).
2D persistence now supports dedicated values for X and Y offsets.
The corner is now specified by enumeration Aspect_TypeOfTriedronPosition
instead of indirect interpretation of anchor point values.
Fixed handling of Graphic3d_TMF_ZoomRotatePers (combination of Graphic3d_TMF_RotatePers + Graphic3d_TMF_ZoomPers).
PrsMgr_PresentableObject, Graphic3d_CStructure now hold
Handle(Graphic3d_TransformPers) instead of a value.
Method ::SetTransformPersistence(), ::TransformPersistence()
now works with Handle(Graphic3d_TransformPers).
Old methods have been marked deprecated.
Please test branches CR27860_2 in OCCT and Products.
> There are differences in images found by testdiff:
> bugs vis bug26344
This change is expected - test case was modified.
> There are differences in images found by testdiff:
> bugs vis bug26344
This change is expected - test case was modified.
Dear Commenter 1,
Branch CR27860_2 from occt git-repository (and CR27860_2 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
[revision removed]
Number of compiler warnings:
occt component:
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MasOS: 0 (0 on master)
products component:
Linux: 64
Windows: 0
MacOS: 1147
Regressions/Differences:
http://occt-tests/CR27860_2-CR27860_2-OCCT/Debian70-64/summary.html
http://occt-tests/CR27860_2-CR27860_2-OCCT/Windows-64-VC10/summary.html
3rdparty fonts A7
bugs vis bug22879, bug25121
v3d raytrace bug24819
Testing on Linux:
occt component:
Total MEMORY difference: 89678945 / 89800351 [-0.14%]
Total CPU difference: 19500.380000000143 / 19210.349999999937 [+1.51%]
products component:
Total MEMORY difference: 30032279 / 29998572 [+0.11%]
Total CPU difference: 5105.789999999979 / 5119.779999999977 [-0.27%]
Testing on Windows:
occt component:
Total MEMORY difference: 57204817 / 57211877 [-0.01%]
Total CPU difference: 18076.740675798912 / 18509.12864749872 [-2.34%]
products component:
Total MEMORY difference: 21268599 / 21232183 [+0.17%]
Total CPU difference: 4874.906449199955 / 4959.0221883999575 [-1.70%]
Branch CR27860_2 from occt git-repository (and CR27860_2 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
[revision removed]
Number of compiler warnings:
occt component:
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MasOS: 0 (0 on master)
products component:
Linux: 64
Windows: 0
MacOS: 1147
Regressions/Differences:
http://occt-tests/CR27860_2-CR27860_2-OCCT/Debian70-64/summary.html
http://occt-tests/CR27860_2-CR27860_2-OCCT/Windows-64-VC10/summary.html
3rdparty fonts A7
bugs vis bug22879, bug25121
v3d raytrace bug24819
Testing on Linux:
occt component:
Total MEMORY difference: 89678945 / 89800351 [-0.14%]
Total CPU difference: 19500.380000000143 / 19210.349999999937 [+1.51%]
products component:
Total MEMORY difference: 30032279 / 29998572 [+0.11%]
Total CPU difference: 5105.789999999979 / 5119.779999999977 [-0.27%]
Testing on Windows:
occt component:
Total MEMORY difference: 57204817 / 57211877 [-0.01%]
Total CPU difference: 18076.740675798912 / 18509.12864749872 [-2.34%]
products component:
Total MEMORY difference: 21268599 / 21232183 [+0.17%]
Total CPU difference: 4874.906449199955 / 4959.0221883999575 [-1.70%]
Dear Kirill,
Branches CR27860_2 (from occt git-repository) and CR27860_2 (from products git-repository) have been rejected due to:
- regressions/differences/improvements
Branches CR27860_2 (from occt git-repository) and CR27860_2 (from products git-repository) have been rejected due to:
- regressions/differences/improvements
Branch [archived branch] has been updated by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Thu Sep 22 12:11:45 2016 +0300
Graphic3d_TransformPers - added extra constructor to avoid ambiguity.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Thu Sep 22 12:11:45 2016 +0300
Graphic3d_TransformPers - added extra constructor to avoid ambiguity.
Please check updated patch.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Braches CR27860_2 from occt and products git-repositories have been rebased on the current masters.
Dear Commenter 1,
Branch CR27860_2 from occt git-repository (and CR27860_2 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
[revision removed]
Number of compiler warnings:
occt component:
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MasOS: 0 (0 on master)
products component:
Linux: 64
Windows: 0
MacOS: 1148
Regressions/Differences:
Not detected
Testing cases:
Not needed
Testing on Linux:
occt component:
Total MEMORY difference: 90462748 / 90146572 [+0.35%]
Total CPU difference: 19451.88999999998 / 19251.849999999875 [+1.04%]
products component:
Total MEMORY difference: 30085562 / 30046985 [+0.13%]
Total CPU difference: 5157.149999999979 / 5151.099999999975 [+0.12%]
Testing on Windows:
occt component:
Total MEMORY difference: 57216002 / 57221541 [-0.01%]
Total CPU difference: 17947.337846298764 / 18310.78897609872 [-1.98%]
products component:
Total MEMORY difference: 21272111 / 21235672 [+0.17%]
Total CPU difference: 4877.854868099951 / 4988.631178199945 [-2.22%]
Branch CR27860_2 from occt git-repository (and CR27860_2 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
[revision removed]
Number of compiler warnings:
occt component:
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MasOS: 0 (0 on master)
products component:
Linux: 64
Windows: 0
MacOS: 1148
Regressions/Differences:
Not detected
Testing cases:
Not needed
Testing on Linux:
occt component:
Total MEMORY difference: 90462748 / 90146572 [+0.35%]
Total CPU difference: 19451.88999999998 / 19251.849999999875 [+1.04%]
products component:
Total MEMORY difference: 30085562 / 30046985 [+0.13%]
Total CPU difference: 5157.149999999979 / 5151.099999999975 [+0.12%]
Testing on Windows:
occt component:
Total MEMORY difference: 57216002 / 57221541 [-0.01%]
Total CPU difference: 17947.337846298764 / 18310.78897609872 [-1.98%]
products component:
Total MEMORY difference: 21272111 / 21235672 [+0.17%]
Total CPU difference: 4877.854868099951 / 4988.631178199945 [-2.22%]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Related records
- #0027836 · related to · closedVisualization, TKOpenGl - gradient background is lost at some camera positions
- #0027817 · related to · closedVisualization, StdSelect_BRepOwner - copy transformation persistence flag
- #0027796 · related to · closedVisualization - allow 3D objects with Graphic3d_TMF_2d flag
- #0022582 · related to · closedVisualization - provide an API for dumping a sub-region of the viewport
- #0032056 · parent of · closedCoding Rules - remove package MMgt and other types deprecated since OCCT 7.2.0
- #0025180 · related to · closedVisualization - Homogeneous transformation API in TKV3d