MantisBT - Open CASCADE
View Issue Details
0032188Open CASCADE[OCCT] OCCT:Visualizationpublic2021-03-01 23:152021-04-03 12:52
kgv 
bugmaster 
normalfeature 
verifiedfixed 
 
[OCCT] 7.6.0* 
Not required
0032188: Visualization, Graphic3d_Aspects - define backface culling using Graphic3d_TypeOfBackfacingModel
Currently Graphic3d_Aspects::ToSuppressBackFaces() is defined as a Boolean value.
The meaning of this Boolean flag is confusing:
- FALSE means dualsided shading;
- TRUE means automatic backface culling enabled for Solids and disabled for Shells based on Graphic3d_Group::IsClosed() flag.

In some cases it is desired enabling backface culling regardless of closed flag.

It is proposed replacing a Boolean flag with Graphic3d_TypeOfBackfacingModel enumeration value stored as Graphic3d_Aspects::FaceCulling() property.
v3d/glsl/pbr_spheres - assigning visualization material to XCAF document no more automatically disables backface culling for Solids.
de_mesh/gltf_read - doubleSided=FALSE is now repsected on displaying glTF files (most noticeable on de_mesh/gltf_read/cubeemb).
v3d/viewcube/style - transparent AIS_ViewCube.
No tags attached.
related to 0026028closed bugmaster Option for drawing MeshVS_Mesh as closed object 
related to 0029517closed bugmaster Visualization - introduce AlphaMode property defining alpha value handling options 
child of 0024521closed bugmaster Visualization - automatic back face culling is not turned on for Solids packed into compound 
Issue History
2021-03-01 23:15kgvNew Issue
2021-03-01 23:15kgvAssigned To => kgv
2021-03-01 23:25gitNote Added: 0099258
2021-03-01 23:31kgvRelationship addedrelated to 0026028
2021-03-01 23:31kgvRelationship addedrelated to 0029517
2021-03-01 23:32kgvRelationship addedchild of 0024521
2021-03-02 07:54kgvNote Added: 0099261
2021-03-02 07:54kgvAssigned Tokgv => osa
2021-03-02 07:54kgvStatusnew => resolved
2021-03-02 08:07gitNote Added: 0099262
2021-03-02 08:12gitNote Added: 0099263
2021-03-02 08:20gitNote Added: 0099264
2021-03-02 08:23gitNote Added: 0099265
2021-03-02 08:38gitNote Added: 0099266
2021-03-02 09:54kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24657#r24657
2021-03-02 10:16gitNote Added: 0099267
2021-03-02 11:12gitNote Added: 0099274
2021-03-02 12:03kgvNote Deleted: 0099261
2021-03-02 12:03kgvNote Added: 0099276
2021-03-02 17:29osaNote Added: 0099309
2021-03-02 17:29osaAssigned Toosa => bugmaster
2021-03-02 17:29osaStatusresolved => reviewed
2021-03-06 12:15bugmasterNote Added: 0099470
2021-03-06 12:15bugmasterStatusreviewed => tested
2021-03-06 12:20bugmasterTest case number => Not required
2021-03-06 12:34bugmasterChangeset attached => occt master 7fd4958d
2021-03-06 12:34bugmasterStatustested => verified
2021-03-06 12:34bugmasterResolutionopen => fixed
2021-03-06 13:25gitNote Added: 0099496

Notes
(0099258)
git   
2021-03-01 23:25   
Branch CR32188 has been created by kgv.

SHA-1: 6a7d80bf387b8fcab942da5a5c9868055000ffe1


Detailed log of new commits:

Author: kgv
Date: Mon Mar 1 23:25:21 2021 +0300

    0032188: Visualization, Graphic3d_Aspects - define backface culling using Graphic3d_TypeOfBackfacingModel
    
    Graphic3d_Aspects::ToSuppressBackFaces() bool flag has been replaced by
    Graphic3d_Aspects::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.
    
    Graphic3d_TypeOfBackfacingModel_Auto corresponds to old ToSuppressBackFaces()==TRUE;
    Graphic3d_TypeOfBackfacingModel_DoubleSided corresponds to old ToSuppressBackFaces()==FALSE;
    Graphic3d_TypeOfBackfacingModel_BackCulled allows enabling back face culling regardless of Graphic3d_Group::IsClosed() flag.
    
    XCAFDoc_VisMaterial::IsDoubleSided() bool flag has been replaced by
    XCAFDoc_VisMaterial::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.
    
    glTF reader now maps "doubleSided" material flag into
    Graphic3d_TypeOfBackfacingModel_BackCulled (forced back face culling) and
    Graphic3d_TypeOfBackfacingModel_Auto (e.g. practically doubleSided as there is no closed/open info in glTF).
    
    glTF writer by default writes materials as "doubleSided" save the Graphic3d_TypeOfBackfacingModel_BackCulled property set
    (in future, extra logic might written for automatically defining singleSided materials for Solid B-Rep objects).
(0099262)
git   
2021-03-02 08:07   
Branch CR32188 has been updated forcibly by kgv.

SHA-1: b28743a3724583ab15777df2f64d4293fd36ac8f
(0099263)
git   
2021-03-02 08:12   
Branch CR32188 has been updated forcibly by kgv.

SHA-1: f9ead70128ddc3938b126bbbbae00c1d1817a4a1
(0099264)
git   
2021-03-02 08:20   
Branch CR32188 has been updated forcibly by kgv.

SHA-1: 18cc173d561db6f32418a1dee63097e2898aa456
(0099265)
git   
2021-03-02 08:23   
Branch CR32188 has been updated forcibly by kgv.

SHA-1: 0f4d51505d265285eac07fe2a5cce7b282ae03f7
(0099266)
git   
2021-03-02 08:38   
Branch CR32188 has been updated forcibly by kgv.

SHA-1: 3b7b2825308277ede030e9a18f3f5a5720a69646
(0099267)
git   
2021-03-02 10:16   
Branch CR32188 has been updated forcibly by kgv.

SHA-1: 779315cd2362ee035425b2e121e9b50a98e0848a
(0099274)
git   
2021-03-02 11:12   
Branch CR32188 has been updated forcibly by kgv.

SHA-1: 38c3a24ac74ca7b2817f84c3761fa4c5a40c4e4b
(0099276)
kgv   
2021-03-02 12:03   
Patch is ready for review
- OCCT: branch CR32188;
- OCC Products: branch CR32188.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR32188-master-KGV/ [^]
(0099309)
osa   
2021-03-02 17:29   
The patch was reviewed
(0099470)
bugmaster   
2021-03-06 12:15   
Combination -
OCCT branch : IR-2021-03-05
master SHA - 58210e5983a7986bc4cd1bec9c0b5cb29828fda4
a87b7ddc8cb44606b91e3f37113847c3f5f50fdc
Products branch : IR-2021-03-05 SHA - b3d022cfefe721ee2ad6db68ca360345d656610b
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: 17744.80000000016 / 17811.87000000015 [-0.38%]
Products
Total CPU difference: 11539.9800000001 / 11543.6500000001 [-0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.640625 / 19344.390625 [-0.12%]
Products
Total CPU difference: 12868.796875 / 12900.578125 [-0.25%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0099496)
git   
2021-03-06 13:25   
Branch CR32188 has been deleted by inv.

SHA-1: 38c3a24ac74ca7b2817f84c3761fa4c5a40c4e4b