Archived issue #0030820

Draw Harness, ViewerTest - vsetcolor has no effect on objects created by vsegment and vtriangle

Open CASCADEOCCT:DRAWclosed6 public notes

Search issues

Description

If a segment or a triangle is created in the viewer with vsegment or vtriangle command correspondingly, it is impossible to set a color to this interactive object.

Steps to reproduce

pload MODELING VISUALIZATION
vclear
vinit View1
vaxo
vrenderparams -shadingModel unlit
vpoint p1 -2 -1  0
vpoint p2  2 -1  0
vpoint p3  0  2  0
vtriangle t p1 p2 p3
vfit
vsetcolor t RED



Create a segment with vsegment command or a triangle with vtriangle command and try to change its color with

vsetcolor anObjectName aColor

or with

vaspects anObjectName -setColor aColor

Nothing will happen.

Public activity

6 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: tiv
Date: Mon Jul 1 11:51:35 2019 +0300

    0030820: DRAW - A color can't be set for objects created with commands vsegment and vtriangle
    
    MyPArrayObject class (an interactive object representing some array of primitives) is improved: a possibility of color changing is added to it. Corresponding test cases (for segment and triangle) are added.
02Commenter 3
+  myDrawer->SetupOwnShadingAspect();

This should be moved to MyPArrayObject::SetColor():
if (myDrawer->SetupOwnShadingAspect())
{
  Graphic3d_MapOfAspectsToAspects aReplaceMap;
  aReplaceMap.Bind (myDrawer->Link()->ShadingAspect()->Aspect(), myDrawer->ShadingAspect()->Aspect());
  replaceAspects (aReplaceMap);
}
myDrawer->ShadingAspect()->SetColor (theColor);
SynchronizeAspects();


Test case is redundant for this test functionality.

03Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
04Commenter 4
05Commenter 1
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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: 16470.060000000143 / 16485.620000000054 [-0.09%]
Products
Total CPU difference: 10523.650000000047 / 10512.000000000038 [+0.11%]
Windows-64-VC14:
OCCT
Total CPU difference: 17845.84375 / 17868.765625 [-0.13%]
Products
Total CPU difference: 12083.25 / 12192.9375 [-0.90%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
06Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]