View Issue Details

IDProjectCategoryView StatusLast Update
0028839CommunityOCCT:Application Frameworkpublic2017-07-11 10:59
ReporterVico Liang Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionno change required 
Product Version7.1.0 
Target Version7.2.0 
Summary0028839: TPrsStd_AISPresentation - Change material will change the transparency
DescriptionSteps to reproduce the issue:
1. AIS_Shape is bound to TPrsStd_AISPresentation,
2. Call TPrsStd_AISPresentation::SetMaterial(Graphic3d_NOM_TRANSPARENT)
3. Call TPrsStd_AISPresentation::Display(), Object will be transparent
4. Call TPrsStd_AISPresentation::Erase()
5. Call TPrsStd_AISPresentation::Display(), Object will be opaque
TagsNo tags attached.
Test case number

Activities

kgv

2017-06-13 09:35

developer   ~0067294

Last edited: 2017-06-13 09:35

TPrsStd_AISPresentation is not a normal AIS presentable object, it is not intended to be modified in this way.
All properties should be defined within OCAF document instead.

Vico Liang

2017-06-13 09:47

developer   ~0067295

But why the object status flip between transparent and opaque when calling Display and Erase?

kgv

2017-06-13 09:51

developer   ~0067296

Do you have this issue in OCCT 7.1.0 or on current master (or both)?

Vico Liang

2017-06-13 09:53

developer   ~0067297

The problem is caused by inconsistency of transparency property of below two casses:

Standard_Real AIS_Shape::Transparency() const
void AIS_Shape::SetTransparency (const Standard_Real theValue)

Standard_Real AIS_InteractiveObject::Transparency() const
void AIS_InteractiveObject::SetTransparency(const Standard_Real aValue)
Standard_Boolean AIS_InteractiveObject::IsTransparent() const { return myTransparency > 0.005; }

Vico Liang

2017-06-13 09:54

developer   ~0067298

I'm using OCCT 7.1.0

Vico Liang

2017-06-13 09:59

developer   ~0067299

The root problem occurs in method:

Standard_Boolean AIS_InteractiveObject::IsTransparent() const { return myTransparency > 0.005; }

This method don't consider the transparency changes when material has been changed.

kgv

2017-06-13 10:09

developer   ~0067300

Please check on current master - I can not reproduce the issue with the given code.

Vico Liang

2017-06-13 10:27

developer   ~0067302

Dear kgv,
I checked the source code, the code have been changed about transparency implementation in OCCT master. Though i don't get time to build the current master to run test, i believe this issue is fixed after code analysis.

kgv

2017-07-10 11:31

developer   ~0068149

Dear bugmaster, please close the issue.

Issue History

Date Modified Username Field Change
2017-06-13 09:31 Vico Liang New Issue
2017-06-13 09:31 Vico Liang Assigned To => kgv
2017-06-13 09:33 Vico Liang Product Version => 7.1.0
2017-06-13 09:33 kgv Assigned To kgv => mpv
2017-06-13 09:33 kgv Category OCCT:Visualization => OCCT:Application Framework
2017-06-13 09:35 kgv Note Added: 0067294
2017-06-13 09:35 kgv Note Edited: 0067294
2017-06-13 09:47 Vico Liang Note Added: 0067295
2017-06-13 09:51 kgv Note Added: 0067296
2017-06-13 09:53 Vico Liang Note Added: 0067297
2017-06-13 09:54 Vico Liang Note Added: 0067298
2017-06-13 09:59 Vico Liang Note Added: 0067299
2017-06-13 10:09 kgv Note Added: 0067300
2017-06-13 10:09 kgv Assigned To mpv => Vico Liang
2017-06-13 10:09 kgv Status new => feedback
2017-06-13 10:27 Vico Liang Note Added: 0067302
2017-07-10 11:31 kgv Note Added: 0068149
2017-07-10 11:31 kgv Assigned To Vico Liang => bugmaster
2017-07-10 11:31 kgv Resolution open => no change required
2017-07-11 10:59 bugmaster Status feedback => closed