View Issue Details

IDProjectCategoryView StatusLast Update
0029570Open CASCADEOCCT:Visualizationpublic2020-06-11 09:52
Reporterkgv Assigned Toapn  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
Target Version7.4.0Fixed in Version7.4.0 
Summary0029570: Visualization, Graphic3d_Aspect - merge Graphic3d_Group aspects
DescriptionHistorically, OCCT declares dedicated aspects per rendered primitive type:
- Graphic3d_AspectFillArea3d / OpenGl_AspectFace for rendering Triangles/Quads.
- Graphic3d_AspectLine3d / OpenGl_AspectLine for rendering Lines.
- Graphic3d_AspectMarker3d / OpenGl_AspectMarker for rendering Points/Markers.
- Graphic3d_AspectText3d / OpenGl_AspectText for rendering text labels.

As consequence, OpenGl_Group stores 4 aspects at once (myAspectLine, myAspectFace, myAspectMarker, myAspectText) and OpenGl_Workspace provides 4 sets of methods for managing aspects of different kind.

In reality, such differentiation leads to redundancy of information and ambiguity, because final GLSL programs are based not on primitive type, but rather on combination of attributes (the only special case is a program for Point/Marker implying gl_PointCoord/gl_PointSize in its syntax).

E.g., lighting can be enabled for Lines and Points when vertex attributes include normals, however material and shading properties are defined only within Graphic3d_AspectFillArea3d, while Line width within Graphic3d_AspectLine3d and Point size within Graphic3d_AspectMarker3d - hence, explosive combination of parameters is cherry-picked from various aspects.

At the same time, all aspects define own Color property, as well as GLSL Program, making final definition ambiguous, when combination of aspects is in effect. And all 4 aspects should be applied somehow at once before rendering, to avoid unexpected behavior - e.g. active GLSL Program should be clearly specified, and properties like Alpha test and Blending (which currently buried within Graphic3d_AspectFillArea3d) affect ALL rendered primitives regardless of their type.

Therefore, it is proposed to merge all 4 aspects into single one combining all properties, so that only 1 aspect can be active at the same moment within OpenGl_Context/OpenGl_Workspace/OpenGl_Group/Graphic3d_Group.

Graphic3d_Group::SetGroupPrimitivesAspect() will disallow setting 4 aspects at once - only 1 aspect will be associated with Group, while multiple aspects can be specified sequentially through Graphic3d_Group::SetPrimitivesAspect().

Differentiated classes per primitive type can be preserved for compatibility (and clarity) as sub-classes of new consolidated base class.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0030124 closedapn Open CASCADE Visualization, AIS_InteractiveObject - clean up confusing Presentation invalidation logic 
parent of 0030566 closedbugmaster Community Visualization - Prs3d_PointAspect never take affect on Android. 
parent of 0031607 newvpozdyayev Open CASCADE Visualization, Graphic3d_Aspects - store Front/Back shading materials via Handles 
related to 0030571 closedapn Open CASCADE Visualization, TKOpenGl - mapped texture is ignored while drawing points 
Not all the children of this issue are yet resolved or closed.

Activities

git

2019-03-03 21:41

administrator   ~0082566

Branch CR29570 has been created by kgv.

SHA-1: 8ae17650ced1d4a6cd8d327b22d61aa648b07a57


Detailed log of new commits:

Author: kgv
Date: Sun Mar 3 21:07:55 2019 +0300

    0029570: Visualization, Graphic3d_Aspect - merge Graphic3d_Group aspects

git

2019-03-03 23:58

administrator   ~0082567

Branch CR29570 has been deleted by kgv.

SHA-1: 8ae17650ced1d4a6cd8d327b22d61aa648b07a57

git

2019-03-03 23:58

administrator   ~0082568

Branch CR29570 has been created by kgv.

SHA-1: a0c7f42d87f8d1afa6f4929fe2d1e9d493e1bc7a


Detailed log of new commits:

Author: kgv
Date: Sun Mar 3 21:07:55 2019 +0300

    0029570: Visualization, Graphic3d_Aspect - merge Graphic3d_Group aspects
    
    Graphic3d_AspectFillArea3d, Graphic3d_AspectLine3d and Graphic3d_AspectMarker3d
    have been merged into new class Graphic3d_Aspects.
    The old classes are preserved as dummy sub-classes of Graphic3d_Aspects.
    
    Methods IsGroupPrimitivesAspectSet(), GroupPrimitivesAspect(), FillAreaAspect(),
    LineAspect() and MarkerAspect() have been removed from Graphic3d_Group.
    Instead, a new method Graphic3d_Group::ReplaceAspects() has been introduced
    for replacing existing group aspects.
    
    AIS_Shape now uses new method AIS_InteractiveObject::replaceAspects()
    for updating computed groups with new aspects without presentation recomputation
    in places where SynchronizeAspects() is not applicable.
    
    OpenGl_AspectFace, OpenGl_AspectLine and OpenGl_AspectMarker have been merged into new class OpenGl_Aspects.

git

2019-03-04 01:39

administrator   ~0082570

Branch CR29570 has been updated forcibly by kgv.

SHA-1: 6adb986337063a5b0550734c981518e496696afb

git

2019-03-04 08:12

administrator   ~0082571

Branch CR29570 has been updated forcibly by kgv.

SHA-1: 1e6bf871e093edb13db5fc16b9a66afafe901598

git

2019-03-04 12:35

administrator   ~0082576

Branch CR29570_1 has been created by kgv.

SHA-1: 0f5ffbd655d291cf5a5b63c1f6e706821a4f50e4


Detailed log of new commits:

Author: kgv
Date: Sun Mar 3 21:07:55 2019 +0300

    0029570: Visualization, Graphic3d_Aspect - merge Graphic3d_Group aspects
    
    Graphic3d_AspectFillArea3d, Graphic3d_AspectLine3d and Graphic3d_AspectMarker3d
    have been merged into new class Graphic3d_Aspects.
    The old classes are preserved as dummy sub-classes of Graphic3d_Aspects.
    
    Methods IsGroupPrimitivesAspectSet(), GroupPrimitivesAspect(), FillAreaAspect(),
    LineAspect() and MarkerAspect() have been removed from Graphic3d_Group.
    Instead, a new method Graphic3d_Group::ReplaceAspects() has been introduced
    for replacing existing group aspects.
    
    AIS_Shape now uses new method AIS_InteractiveObject::replaceAspects()
    for updating computed groups with new aspects without presentation recomputation
    in places where SynchronizeAspects() is not applicable.
    
    OpenGl_AspectFace, OpenGl_AspectLine and OpenGl_AspectMarker have been merged into new class OpenGl_Aspects.
    
    ViewerTest::parseColor() - fix uninitialized alpha component.

git

2019-03-04 12:55

administrator   ~0082578

Branch CR29570_1 has been updated forcibly by kgv.

SHA-1: 6d65158c4ca128a4b73db5f625fd9ed1a0ce26f1

git

2019-03-04 14:07

administrator   ~0082581

Branch CR29570_1 has been updated forcibly by kgv.

SHA-1: 4762f2d4462562c675cc91e810f73e36cd03749c

git

2019-03-04 14:58

administrator   ~0082586

Branch CR29570_1 has been updated forcibly by kgv.

SHA-1: 561b8ad69b0689b099e30727319c7f206265aaa1

git

2019-03-04 15:28

administrator   ~0082591

Branch CR29570_1 has been updated forcibly by kgv.

SHA-1: 036c08640589ea83759bcc384643ca0bef667a4c

kgv

2019-03-04 18:10

developer   ~0082595

Last edited: 2019-03-06 10:08

Patch is ready for review.

Suspicions changes on screenshots are due to:
- v3d/glsl/interior1,interior2
  Shrunk presentation when using glPolygonMode() is now simulated
  by mesh edges with background color for more consistent result
  to GLSL program (although it is still broken, anyway).
- bugs/vis/bug26959
  Changing line width does not require recomputing entire presentation,
  so that screenshot with line width 3 corresponds to original presentation
  with line width 1.
  Why recomputing presentation fixes unconnected edges
  is a subject for dedicated issue.
- bugs/vis/bug27958
  This is a bugfix, test case explicitly sets arrow color to BLUE
  [vtrihedron t1 -arrowColor 0.0 0.0 1.0].

git

2019-03-04 21:03

administrator   ~0082598

Branch CR29570_1 has been updated forcibly by kgv.

SHA-1: 47d95227b6951907cd61b8e8a6b9e0cdb307e3d2

git

2019-03-05 22:42

administrator   ~0082705

Branch CR29570_2 has been created by kgv.

SHA-1: 193ffb8f9584255779bcc6ebf8bdaa7ae3486cbb


Detailed log of new commits:

Author: kgv
Date: Sun Mar 3 21:07:55 2019 +0300

    0029570: Visualization, Graphic3d_Aspect - merge Graphic3d_Group aspects
    
    Graphic3d_AspectFillArea3d, Graphic3d_AspectLine3d, Graphic3d_AspectMarker3d
    and Graphic3d_AspectText3d have been merged into new class Graphic3d_Aspects.
    The old classes are preserved as dummy sub-classes of Graphic3d_Aspects
    preserving different per-aspect defaults.
    
    Methods IsGroupPrimitivesAspectSet(), GroupPrimitivesAspect(), FillAreaAspect(),
    LineAspect() and MarkerAspect() have been removed from Graphic3d_Group.
    Instead, a new method Graphic3d_Group::ReplaceAspects() has been introduced
    for replacing existing group aspects.
    
    AIS_Shape now uses new method AIS_InteractiveObject::replaceAspects()
    for updating computed groups with new aspects without presentation recomputation
    in places where SynchronizeAspects() is not applicable.
    
    OpenGl_AspectFace, OpenGl_AspectLine, OpenGl_AspectMarker
    and OpenGl_AspectText have been merged into new class OpenGl_Aspects.
    
    ViewerTest::parseColor() - fix uninitialized alpha component.
    Graphic3d_AspectText3d/Prs3d_TextAspect - removed unused properties Space, ExpansionFactor, Angle.
    Remove getters Values() deprecated since OCCT 7.1.0.

git

2019-03-05 23:08

administrator   ~0082707

Branch CR29570_2 has been updated forcibly by kgv.

SHA-1: 02a19c33cc143fd19ebf878933470db524b78219

git

2019-03-06 06:49

administrator   ~0082709

Branch CR29570_2 has been updated forcibly by kgv.

SHA-1: 153e9ec4bfe9a6dedd6ba1cca6708bfee7d76f72

git

2019-03-06 07:03

administrator   ~0082710

Branch CR29570_2 has been updated forcibly by kgv.

SHA-1: 3ded56c7030ea15dd77cef2b6175a3a91e4d6d43

git

2019-03-06 07:44

administrator   ~0082712

Branch CR29570_2 has been updated forcibly by kgv.

SHA-1: 9ab7baa2e83d36472ed3592ea9af602f3f5c7ce7

git

2019-03-06 08:09

administrator   ~0082714

Branch CR29570_2 has been updated forcibly by kgv.

SHA-1: 9d9e2e68d0452a1bedc9902aa526461c217a7290

git

2019-03-06 08:13

administrator   ~0082715

Branch CR29570_2 has been updated forcibly by kgv.

SHA-1: 8ec22c4a7605a9fa374f465ca0ee94be6fb2d658

git

2019-03-06 09:59

administrator   ~0082719

Branch CR29570_2 has been updated forcibly by kgv.

SHA-1: 4c90de24c6eb177718c312f5e8e477e9b8572cd8

san

2019-03-06 14:27

developer   ~0082732

Branch CR29570_2 reviewed without remarks.

apn

2019-03-06 16:19

administrator   ~0082742

Combination -
OCCT branch : CR29570_2
master SHA - 8ec22c4a7605a9fa374f465ca0ee94be6fb2d658
d67d4b811012eef8913d3c535c29654d0acf3c4c
Products branch : CR29570_2 SHA - 7f1c5ae49cded957bddb8fe9ef0efd08ae087f80
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: 16554.75999999999 / 16562.049999999996 [-0.04%]
Products
Total CPU difference: 9079.120000000039 / 9082.700000000026 [-0.04%]
Windows-64-VC14:
OCCT
Total CPU difference: 17962.296875 / 17955.015625 [+0.04%]
Products
Total CPU difference: 10469.4375 / 10469.015625 [+0.00%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2019-03-07 18:06

administrator   ~0082780

Branch CR29570_2 has been updated by apn.

SHA-1: cd9da0eb421fabacedd4b28991428937d598e5c2


Detailed log of new commits:

Author: kgv
Date: Thu Mar 7 12:30:36 2019 +0300

    # 0029570 fix compilation on vc10

git

2019-03-11 14:01

administrator   ~0082817

Branch CR29570_2 has been deleted by inv.

SHA-1: cd9da0eb421fabacedd4b28991428937d598e5c2

git

2019-03-11 14:02

administrator   ~0082825

Branch CR29570_1 has been deleted by inv.

SHA-1: 47d95227b6951907cd61b8e8a6b9e0cdb307e3d2

git

2019-03-11 14:02

administrator   ~0082828

Branch CR29570 has been deleted by inv.

SHA-1: 1e6bf871e093edb13db5fc16b9a66afafe901598

Related Changesets

occt: master bf5f0ca2

2019-03-03 18:07:55

kgv


Committer: apn Details Diff
0029570: Visualization, Graphic3d_Aspect - merge Graphic3d_Group aspects

Graphic3d_AspectFillArea3d, Graphic3d_AspectLine3d, Graphic3d_AspectMarker3d
and Graphic3d_AspectText3d have been merged into new class Graphic3d_Aspects.
The old classes are preserved as dummy sub-classes of Graphic3d_Aspects
preserving different per-aspect defaults.

Methods IsGroupPrimitivesAspectSet(), GroupPrimitivesAspect(), FillAreaAspect(),
LineAspect() and MarkerAspect() have been removed from Graphic3d_Group.
Instead, a new method Graphic3d_Group::ReplaceAspects() has been introduced
for replacing existing group aspects.

AIS_Shape now uses new method AIS_InteractiveObject::replaceAspects()
for updating computed groups with new aspects without presentation recomputation
in places where SynchronizeAspects() is not applicable.

OpenGl_AspectFace, OpenGl_AspectLine, OpenGl_AspectMarker
and OpenGl_AspectText have been merged into new class OpenGl_Aspects.

ViewerTest::parseColor() - fix uninitialized alpha component.
Graphic3d_AspectText3d/Prs3d_TextAspect - removed unused properties Space, ExpansionFactor, Angle.
Remove getters Values() deprecated since OCCT 7.1.0.
Affected Issues
0029570
mod - dox/dev_guides/upgrade/upgrade.md Diff File
mod - src/AIS/AIS_CameraFrustum.cxx Diff File
mod - src/AIS/AIS_ColoredShape.cxx Diff File
mod - src/AIS/AIS_ColoredShape.hxx Diff File
mod - src/AIS/AIS_Dimension.cxx Diff File
mod - src/AIS/AIS_InteractiveObject.cxx Diff File
mod - src/AIS/AIS_InteractiveObject.hxx Diff File
mod - src/AIS/AIS_Manipulator.cxx Diff File
mod - src/AIS/AIS_PointCloud.cxx Diff File
mod - src/AIS/AIS_Relation.cxx Diff File
mod - src/AIS/AIS_RubberBand.cxx Diff File
mod - src/AIS/AIS_Shape.cxx Diff File
mod - src/AIS/AIS_Shape.hxx Diff File
mod - src/AIS/AIS_TexturedShape.cxx Diff File
mod - src/AIS/AIS_Triangulation.cxx Diff File
mod - src/DsgPrs/DsgPrs.cxx Diff File
mod - src/Graphic3d/FILES Diff File
mod - src/Graphic3d/Graphic3d_AspectFillArea3d.cxx Diff File
mod - src/Graphic3d/Graphic3d_AspectFillArea3d.hxx Diff File
mod - src/Graphic3d/Graphic3d_AspectLine3d.cxx Diff File
mod - src/Graphic3d/Graphic3d_AspectLine3d.hxx Diff File
mod - src/Graphic3d/Graphic3d_AspectMarker3d.cxx Diff File
mod - src/Graphic3d/Graphic3d_AspectMarker3d.hxx Diff File
add - src/Graphic3d/Graphic3d_Aspects.cxx Diff File
add - src/Graphic3d/Graphic3d_Aspects.hxx Diff File
mod - src/Graphic3d/Graphic3d_AspectText3d.cxx Diff File
mod - src/Graphic3d/Graphic3d_AspectText3d.hxx Diff File
rm - src/Graphic3d/Graphic3d_AspectTextDefinitionError.hxx Diff File
mod - src/Graphic3d/Graphic3d_Group.cxx Diff File
mod - src/Graphic3d/Graphic3d_Group.hxx Diff File
add - src/Graphic3d/Graphic3d_MapOfAspectsToAspects.hxx Diff File
mod - src/Graphic3d/Graphic3d_PolygonOffset.hxx Diff File
mod - src/MeshVS/MeshVS_TextPrsBuilder.cxx Diff File
mod - src/OpenGl/FILES Diff File
rm - src/OpenGl/OpenGl_AspectFace.cxx Diff File
rm - src/OpenGl/OpenGl_AspectFace.hxx Diff File
rm - src/OpenGl/OpenGl_AspectLine.cxx Diff File
rm - src/OpenGl/OpenGl_AspectLine.hxx Diff File
rm - src/OpenGl/OpenGl_AspectMarker.hxx Diff File
add - src/OpenGl/OpenGl_Aspects.cxx Diff File
add - src/OpenGl/OpenGl_Aspects.hxx Diff File
add - src/OpenGl/OpenGl_AspectsProgram.cxx Diff File
add - src/OpenGl/OpenGl_AspectsProgram.hxx Diff File
add - src/OpenGl/OpenGl_AspectsSprite.hxx Diff File
add - src/OpenGl/OpenGl_AspectsTextureSet.cxx Diff File
add - src/OpenGl/OpenGl_AspectsTextureSet.hxx Diff File
rm - src/OpenGl/OpenGl_AspectText.cxx Diff File
rm - src/OpenGl/OpenGl_AspectText.hxx Diff File
mod - src/OpenGl/OpenGl_BackgroundArray.cxx Diff File
mod - src/OpenGl/OpenGl_BackgroundArray.hxx Diff File
mod - src/OpenGl/OpenGl_CappingAlgo.cxx Diff File
mod - src/OpenGl/OpenGl_CappingPlaneResource.cxx Diff File
mod - src/OpenGl/OpenGl_CappingPlaneResource.hxx Diff File
mod - src/OpenGl/OpenGl_Context.cxx Diff File
mod - src/OpenGl/OpenGl_Context.hxx Diff File
mod - src/OpenGl/OpenGl_FrameStatsPrs.cxx Diff File
mod - src/OpenGl/OpenGl_FrameStatsPrs.hxx Diff File
mod - src/OpenGl/OpenGl_GraduatedTrihedron.cxx Diff File
mod - src/OpenGl/OpenGl_GraduatedTrihedron.hxx Diff File
mod - src/OpenGl/OpenGl_GraphicDriver.cxx Diff File
mod - src/OpenGl/OpenGl_Group.cxx Diff File
mod - src/OpenGl/OpenGl_Group.hxx Diff File
mod - src/OpenGl/OpenGl_PrimitiveArray.cxx Diff File
mod - src/OpenGl/OpenGl_PrimitiveArray.hxx Diff File
mod - src/OpenGl/OpenGl_ShaderManager.cxx Diff File
mod - src/OpenGl/OpenGl_ShaderManager.hxx Diff File
mod - src/OpenGl/OpenGl_Structure.cxx Diff File
mod - src/OpenGl/OpenGl_Structure.hxx Diff File
mod - src/OpenGl/OpenGl_Text.cxx Diff File
mod - src/OpenGl/OpenGl_Text.hxx Diff File
mod - src/OpenGl/OpenGl_View.cxx Diff File
mod - src/OpenGl/OpenGl_View.hxx Diff File
mod - src/OpenGl/OpenGl_View_Raytrace.cxx Diff File
mod - src/OpenGl/OpenGl_View_Redraw.cxx Diff File
mod - src/OpenGl/OpenGl_Workspace.cxx Diff File
mod - src/OpenGl/OpenGl_Workspace.hxx Diff File
mod - src/Prs3d/Prs3d_TextAspect.cxx Diff File
mod - src/Prs3d/Prs3d_TextAspect.hxx Diff File
mod - src/PrsMgr/PrsMgr_PresentableObject.cxx Diff File
mod - src/PrsMgr/PrsMgr_PresentableObject.hxx Diff File
mod - src/StdPrs/StdPrs_ShadedShape.cxx Diff File
mod - src/StdPrs/StdPrs_WFShape.cxx Diff File
mod - src/StdPrs/StdPrs_WFShape.hxx Diff File
mod - src/ViewerTest/ViewerTest.cxx Diff File
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff File
mod - src/ViewerTest/ViewerTest_OpenGlCommands.cxx Diff File

Issue History

Date Modified Username Field Change
2018-03-13 08:12 kgv New Issue
2018-03-13 08:12 kgv Assigned To => kgv
2018-03-13 08:14 kgv Description Updated
2019-03-03 21:41 git Note Added: 0082566
2019-03-03 23:58 git Note Added: 0082567
2019-03-03 23:58 git Note Added: 0082568
2019-03-04 01:39 git Note Added: 0082570
2019-03-04 08:12 git Note Added: 0082571
2019-03-04 12:35 git Note Added: 0082576
2019-03-04 12:55 git Note Added: 0082578
2019-03-04 14:07 git Note Added: 0082581
2019-03-04 14:58 git Note Added: 0082586
2019-03-04 15:28 git Note Added: 0082591
2019-03-04 18:10 kgv Note Added: 0082595
2019-03-04 18:10 kgv Assigned To kgv => san
2019-03-04 18:10 kgv Status new => resolved
2019-03-04 21:03 git Note Added: 0082598
2019-03-05 22:42 git Note Added: 0082705
2019-03-05 23:08 git Note Added: 0082707
2019-03-06 06:49 git Note Added: 0082709
2019-03-06 07:03 git Note Added: 0082710
2019-03-06 07:44 git Note Added: 0082712
2019-03-06 08:09 git Note Added: 0082714
2019-03-06 08:13 git Note Added: 0082715
2019-03-06 09:59 git Note Added: 0082719
2019-03-06 10:07 kgv Note Edited: 0082595
2019-03-06 10:08 kgv Note Edited: 0082595
2019-03-06 10:08 kgv Note Edited: 0082595
2019-03-06 14:27 san Note Added: 0082732
2019-03-06 14:27 san Assigned To san => bugmaster
2019-03-06 14:27 san Status resolved => reviewed
2019-03-06 16:19 apn Test case number => Not needed
2019-03-06 16:19 apn Note Added: 0082742
2019-03-06 16:19 apn Status reviewed => tested
2019-03-07 18:06 git Note Added: 0082780
2019-03-08 13:39 kgv Relationship added related to 0030124
2019-03-10 18:17 apn Changeset attached => occt master bf5f0ca2
2019-03-10 18:17 apn Assigned To bugmaster => apn
2019-03-10 18:17 apn Status tested => verified
2019-03-10 18:17 apn Resolution open => fixed
2019-03-11 14:01 git Note Added: 0082817
2019-03-11 14:02 git Note Added: 0082825
2019-03-11 14:02 git Note Added: 0082828
2019-03-13 11:02 kgv Relationship added parent of 0030566
2019-03-14 16:21 kgv Relationship added related to 0030571
2020-06-11 09:52 kgv Relationship added parent of 0031607