View Issue Details

IDProjectCategoryView StatusLast Update
0025229Open CASCADEOCCT:DRAWpublic2014-11-11 12:59
ReporteraplAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.7.1 
Target Version6.8.0Fixed in Version6.8.0 
Summary0025229: Cappings have gray tint if setting color with vclipplane command
DescriptionDRAW "vclipplane" command is normally used to test cappings with DRAW.

Typing the command below used to set capping color to pure white:

> vclipplane change pln1 capping color 1.0 1.0 1.0

On current version the color remains gray.

The following actions are proposed:
1. Investigate reasons and root of the problem - whether it is only in DRAW command or on the level of capping algorithm.
2. Fix problem by either extending DRAW command or patching algorithm.
3. Prepare new test case to ensure that this problem will be never reproduced.
Steps To Reproducepload MODELING AISV
restore data\\occ\\Bottom.brep
vinit
vsetdispmode 1
vdisplay Bottom
vclipplane create pln1
vclipplane change pln1 equation 0 0 -1 20
vclipplane set pln1 object Bottom
vclipplane change pln1 capping on
vclipplane change pln1 capping color 1.0 1.0 1.0

BUG > clip plane remains gray
TagsNo tags attached.
Test case numberbugs vis(004) bug25229

Activities

apl

2014-09-10 13:06

developer   ~0031554

The reason is that the capping planes have gray tint is that code of command previously utilized for setting color is changed.

static int VClipPlane (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const char** theArgVec)
{
...

        Graphic3d_MaterialAspect aMat = aClipPlane->CappingMaterial();
        aMat->SetColor(Quantity_Color(aRed, aGrn, aBlu, Quantity_TOC_RGB))
        aClipPlane->SetCappingMaterial (aMat);
...

"SetColor" now uses coefficient 0.25 to scale the given color and set it instead of ambient combient, while it did not scale the color before.

Thus, we can conclude that patch is required only for DRAW command.

The call to "vclipplane change pln1 capping color" should provide the same results as before changes to "SetColor", e.g. modify ambient and diffuse components either at once or separately by passing new argument.

Another option is also wanted to be able to set material by name instead as it is done by vaspect -setmaterial command.

apl

2014-09-10 13:10

developer   ~0031555

Dear Ivan,

Could you please fix this issue?

apl

2014-09-10 16:12

developer   ~0031578

Adding selection of material is an another option. Considering this change it looks like it make sense to rewrite interface of the command - shall be done, of course, in another issue. The color option is enough to test that capping aspects works, so we have no necessity to add the material option right now.

git

2014-09-10 16:14

administrator   ~0031579

Branch CR25229 has been created by isz.

SHA-1: 111ea300b61528957ad6c87438d8313559c940ce


Detailed log of new commits:

Author: isz
Date: Wed Sep 10 16:14:25 2014 +0400

    0025229: Cappings have gray tint if setting color with vclipplane command
    
    -Now Graphic3d_TypeOfMaterial::SetAmbientColor() and
     Graphic3d_TypeOfMaterial::SetDiffuseColor() are used instead of
     Graphic3d_TypeOfMaterial::SetColor()
    -New test case added: tests\bugs\vis\bug25229

git

2014-09-10 16:45

administrator   ~0031584

Branch CR25229_1 has been created by isz.

SHA-1: 733850727a268bfb637a1c2098eb3154996a9bd5


Detailed log of new commits:

Author: isz
Date: Wed Sep 10 16:45:28 2014 +0400

    0025229: Cappings have gray tint if setting color with vclipplane command
    
        -Now in ViewerTest_ViewerCommands's method VClipPlane() Graphic3d_TypeOfMaterial::SetAmbientColor() and
         Graphic3d_TypeOfMaterial::SetDiffuseColor() are used instead of
         Graphic3d_TypeOfMaterial::SetColor()
        -New test case added: tests\bugs\vis\bug25229

git

2014-09-10 16:47

administrator   ~0031585

Branch CR25229_1 has been updated forcibly by isz.

SHA-1: 57536014dca639f3404c0c353b4c685a18382ce1

git

2014-09-10 16:59

administrator   ~0031586

Branch CR25229_1 has been updated by isz.

SHA-1: bcfcfcafb44aef56ad683f2512fc08931488a78b


Detailed log of new commits:

Author: isz
Date: Wed Sep 10 16:59:33 2014 +0400

    -Formatting

isz

2014-09-10 17:02

developer   ~0031589

Dear apl,
please review my changes in branch CR25229_1.

apl

2014-09-10 17:08

developer   ~0031590

Dear Ivan,

I have a minor remark:

- Comment for the second commit does not correspond to the modification you have pushed. Please try to provide more accurate commit messages in future.

apl

2014-09-10 17:09

developer   ~0031591

Dear Bugmaster,

The branch CR25229_1 is reviewed, please test.

mkv

2014-09-17 15:43

tester   ~0031810

Dear BugMaster,
Branch CR25229_1 from occt git-repository (and master from products git-repository) was compiled on Linux and Windows platforms and tested on Release mode.
SHA-1: bcfcfcafb44aef56ad683f2512fc08931488a78b

Number of compiler warnings:

occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR25229-1-master-occt/Debian60-64/bugs/vis/bug25229.html
http://occt-tests/CR25229-1-master-occt/Windows-32-VC10/bugs/vis/bug25229.html
bugs vis bug25229: OK - ?

Testing on Linux:
occt component :
Total MEMORY difference: 355305180 / 355209688
Total CPU difference: 46528.75000000005 / 45791.5700000001
products component :
Total MEMORY difference: 109694472 / 109576272
Total CPU difference: 18582.729999999974 / 18117.239999999958

Testing on Windows:
occt component :
Total MEMORY difference: 241667696 / 241837776
Total CPU difference: 33503.765625 / 36476.171875
products component :
Total MEMORY difference: 66412576 / 66458348
Total CPU difference: 13305.375 / 12369.875

There are following differences in images found by testdiff.
http://occt-tests/CR25229-1-master-occt/Debian60-64/diff-Debian60-64.html
http://occt-tests/CR25229-1-master-occt/Windows-32-VC10/diff-Windows-32-VC10.html
IMAGE bugs vis bug24902_2: bug24902_2_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug24224: bug24224_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug24902_1: bug24902_1_Driver1_Viewer1_View1.png differs

mkv

2014-09-17 15:43

tester   ~0031811

Dear BugMaster,
Branch CR25229_1 from occt git-repository (and master from products git-repository) was compiled on Linux and Windows platforms and tested on Debug mode.
SHA-1: bcfcfcafb44aef56ad683f2512fc08931488a78b

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR25229-1-master-occt-deb/Debian60-64/bugs/vis/bug25229.html
http://occt-tests/CR25229-1-master-occt-deb/Windows-32-VC10/bugs/vis/bug25229.html
bugs vis bug25229: OK - ?

Testing on Linux:
occt component :
Total MEMORY difference: 425506396 / 425750684
Total CPU difference: 135653.62999999872 / 156731.11999999927
products component :
Total MEMORY difference: 127590792 / 127592128
Total CPU difference: 35586.31000000002 / 38503.56999999995

Testing on Windows:
occt component :
Total MEMORY difference: 334600124 / 333611952
Total CPU difference: 116306.5625 / 104843.671875
products component :
Total MEMORY difference: 89115372 / 88954420
Total CPU difference: 22627.40625 / 27886.515625

There are following differences in images found by testdiff.
http://occt-tests/CR25229-1-master-occt-deb/Windows-32-VC10/diff-Windows-32-VC10.html
http://occt-tests/CR25229-1-master-occt-deb/Debian60-64/diff-Debian60-64.html
IMAGE bugs vis bug24902_2: bug24902_2_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug24224: bug24224_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug24902_1: bug24902_1_Driver1_Viewer1_View1.png differs

apl

2014-09-18 11:27

developer   ~0031849

Dear Mikhail,

The results are OK - exactly as expected to be.

mkv

2014-09-18 13:09

tester   ~0031857

OK.
CR25229_1 is TESTED.

git

2014-09-30 11:36

administrator   ~0032428

Branch CR25229 has been deleted by inv.

SHA-1: 111ea300b61528957ad6c87438d8313559c940ce

git

2014-09-30 11:36

administrator   ~0032429

Branch CR25229_1 has been deleted by inv.

SHA-1: bcfcfcafb44aef56ad683f2512fc08931488a78b

Related Changesets

occt: master 8aeeca44

2014-09-18 11:19:16

isz


Committer: bugmaster Details Diff
0025229: Cappings have gray tint if setting color with vclipplane command

-Now in ViewerTest_ViewerCommands's method VClipPlane() Graphic3d_TypeOfMaterial::SetAmbientColor() and
Graphic3d_TypeOfMaterial::SetDiffuseColor() are used instead of
Graphic3d_TypeOfMaterial::SetColor()
-New test case added: tests\bugs\vis\bug25229

-Formatting
Affected Issues
0025229
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
add - tests/bugs/vis/bug25229 Diff File

Issue History

Date Modified Username Field Change
2014-09-10 11:24 apl New Issue
2014-09-10 11:24 apl Assigned To => apl
2014-09-10 13:06 apl Note Added: 0031554
2014-09-10 13:10 apl Note Added: 0031555
2014-09-10 13:10 apl Assigned To apl => isz
2014-09-10 13:10 apl Status new => assigned
2014-09-10 13:10 apl Category OCCT:Visualization => OCCT:DRAW
2014-09-10 16:12 apl Note Added: 0031578
2014-09-10 16:14 git Note Added: 0031579
2014-09-10 16:45 git Note Added: 0031584
2014-09-10 16:47 git Note Added: 0031585
2014-09-10 16:59 git Note Added: 0031586
2014-09-10 17:02 isz Note Added: 0031589
2014-09-10 17:02 isz Status assigned => resolved
2014-09-10 17:05 apl Assigned To isz => apl
2014-09-10 17:08 apl Note Added: 0031590
2014-09-10 17:09 apl Note Added: 0031591
2014-09-10 17:09 apl Assigned To apl => bugmaster
2014-09-10 17:09 apl Status resolved => reviewed
2014-09-10 19:18 mkv Assigned To bugmaster => mkv
2014-09-17 15:43 mkv Note Added: 0031810
2014-09-17 15:43 mkv Note Added: 0031811
2014-09-17 15:44 mkv Test case number => bugs vis(004) bug25229
2014-09-17 15:44 mkv Assigned To mkv => isz
2014-09-17 15:44 mkv Status reviewed => feedback
2014-09-18 11:27 apl Note Added: 0031849
2014-09-18 11:27 apl Assigned To isz => mkv
2014-09-18 11:27 apl Status feedback => reviewed
2014-09-18 13:09 mkv Note Added: 0031857
2014-09-18 13:10 mkv Assigned To mkv => bugmaster
2014-09-18 13:10 mkv Status reviewed => tested
2014-09-19 13:42 bugmaster Changeset attached => occt master 8aeeca44
2014-09-19 13:42 bugmaster Status tested => verified
2014-09-19 13:42 bugmaster Resolution open => fixed
2014-09-30 11:36 git Note Added: 0032428
2014-09-30 11:36 git Note Added: 0032429
2014-10-02 16:27 bugmaster Target Version 7.0.0 => 6.8.0
2014-11-11 12:44 aiv Fixed in Version => 6.8.0
2014-11-11 12:59 aiv Status verified => closed