View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023123 | Community | OCCT:Visualization | public | 2012-04-27 15:34 | 2012-11-16 13:16 |
Reporter | Pawel | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2008 | ||
Product Version | 6.5.3 | ||||
Target Version | 6.5.4 | Fixed in Version | 6.5.4 | ||
Summary | 0023123: Bug/Regression in visualization of XDE documents in shaded mode | ||||
Description | When displaying an XDE document in shaded mode incorrect colors are used (use the attached STEP file, Draw reproducer below). In OCCT 6.5.2 the visualization is OK (see attached picture: left - OCCT 6.5.2, right - OCCT 6.5.3). | ||||
Steps To Reproduce | Draw reproducer: ReadStep D test.step XShow D vfit vsetdispmode 1 | ||||
Additional information and documentation updates | Code to construct the sample XDE document: // TopoDS_Shape s1 = BRepPrimAPI_MakeBox(gp_Pnt(0, 0, 0), gp_Pnt(10, 30, 20)); TopoDS_Shape s2 = BRepPrimAPI_MakeBox(gp_Pnt(50, 50, 50), gp_Pnt(10, 20, 20)); TopoDS_Shape s3 = BRepPrimAPI_MakeBox(gp_Pnt(0, 0, 0), gp_Pnt(-10, -20, -20)); TopoDS_Shape s4 = BRepBuilderAPI_MakeEdge(gp_Lin(gp_Pnt(0,0,100), gp_Dir(1, 0, 0)), gp_Pnt(-100, 0, 100), gp_Pnt(-50,0,100)); // Standard_Boolean makeAssembly = Standard_True; //============ gp_Trsf t0/*identity*/, t1, t2, t3; t1.SetTranslation(gp_Vec(-25, 0, 0)); t2.SetTranslation(gp_Vec( 25, 0, 0)); t3.SetTranslation(gp_Vec( 25, 50, 0)); TopLoc_Location location0(t0); TopLoc_Location location1(t1); TopLoc_Location location2(t2); TopLoc_Location location3(t3); //=========== TDF_Label lab1 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->NewShape(); XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->SetShape(lab1, s1); TDataStd_Name::Set(lab1, "Box1"); TDF_Label lab2 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->NewShape(); XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->SetShape(lab2, s2); TDataStd_Name::Set(lab2, "Box2"); TDF_Label lab3 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->NewShape(); XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->SetShape(lab3, s3); TDataStd_Name::Set(lab3, "Box3"); TDF_Label lab4 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->NewShape(); XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->SetShape(lab4, s4); TDataStd_Name::Set(lab4, "Edge4"); TDF_Label labelA02 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->NewShape(); TDataStd_Name::Set(labelA02, "ASSEMBLY02"); TDF_Label labelA01 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->NewShape(); TDataStd_Name::Set(labelA01, "ASSEMBLY01"); TDF_Label labelA0 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->NewShape(); TDataStd_Name::Set(labelA0, "ASSEMBLY"); TDF_Label component03 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->AddComponent(labelA0, lab2, location1); TDF_Label component04 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->AddComponent(labelA0, lab2, location2); TDF_Label component05 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->AddComponent(labelA0, lab4, location0); XCAFDoc_DocumentTool::ShapeTool (labelA02)->AddComponent(labelA02, lab3, location1); XCAFDoc_DocumentTool::ShapeTool (labelA02)->AddComponent(labelA02, lab3, location2); XCAFDoc_DocumentTool::ShapeTool (labelA02)->AddComponent(labelA02, lab1, location2); TDF_Label componentA02 = XCAFDoc_DocumentTool::ShapeTool (labelA01)->AddComponent(labelA01, labelA02, location1); // TDF_Label component11 = XCAFDoc_DocumentTool::ShapeTool (labelA01)->AddComponent(labelA01, lab1, location2); XCAFDoc_DocumentTool::ShapeTool (labelA0)->AddComponent(labelA0, labelA01, location2); // Quantity_Color blue(0,0,1, Quantity_TOC_RGB); Quantity_Color green(0,1,0, Quantity_TOC_RGB); XCAFDoc_DocumentTool::ColorTool (labelA0)->AddColor(blue); XCAFDoc_DocumentTool::ColorTool (labelA0)->AddColor(green); XCAFDoc_DocumentTool::ColorTool (labelA0)->SetColor(component05, blue, XCAFDoc_ColorGen); XCAFDoc_DocumentTool::ColorTool (labelA0)->SetColor(component03, green, XCAFDoc_ColorGen); XCAFDoc_DocumentTool::ColorTool (labelA0)->SetColor(component04, blue, XCAFDoc_ColorGen); | ||||
Tags | No tags attached. | ||||
Test case number | chl 935 T0 | ||||
|
test.step (60,664 bytes) |
|
test.png (14,062 bytes) |
|
Dear Dimitry. I made preliminary analysis of this bug and found that attached test file read in document correctly in version OCC6.5.3. It is possible to note in the structure obtained document represented on DFBrowser (please see attached picture). Seems that this bug in the visualization due to that both boxes have the same TShape. |
2012-06-22 13:49 developer |
DFB.JPG (63,599 bytes) |
|
Dear Galina, thank you for the analysis, the bug was actually in the visualization. In XCAFPrs_AISObject::Compute method it is necessary to create new group before adding styled item. Otherwise last style will be applied to both shapes. Fix has been pushed to the git branch CR23123. Please review. |
|
Hello guys, can you please check if this issue/solution is related to 0023236? I'm still a bit overwhelmed with the diversity of OCCT and wasn't sure where to look. Thanks! Pawel |
|
Dear Bugmaster. Could you please to test branch CR23123 |
|
Dear BugMaster, The workbenches KAS:dev:mkv-23123-occt (GIT branch CR23123) KAS:dev:mkv-23123-products (GIT master) were compiled on Linux platform and tested. Regression: Not detected Improvements: chl 934 R6 Testing case: chl 935 T0 testing case was created for issue. It is OK in this branch. It is FAULTY in in current master (KAS:dev:products-20120622-opt). See results in /QADisk/occttests/results/KAS/dev/mkv-23123-products_04072012/lin See reference results in /QADisk/occttests/results/KAS/dev/products-20120622-opt_22062012/lin See test cases in /QADisk/occttests/tests/ED N.B. In order to launch testing case you can make use the following instructions http://doc/doku.php?id=occt:certification |
2012-07-05 15:29 tester |
T0 (1,568 bytes) |
|
Fix positively tested. The issue can be closed. |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-04-27 15:34 | Pawel | New Issue | |
2012-04-27 15:34 | Pawel | Assigned To | => bugmaster |
2012-04-27 15:34 | Pawel | File Added: test.step | |
2012-04-27 15:35 | Pawel | Description Updated | |
2012-04-27 15:35 | Pawel | File Added: test.png | |
2012-04-27 15:36 | Pawel | Description Updated | |
2012-04-27 15:49 |
|
Assigned To | bugmaster => gka |
2012-04-27 15:49 |
|
Status | new => assigned |
2012-06-22 10:43 |
|
Assigned To | gka => dbv |
2012-06-22 13:47 |
|
Note Added: 0020764 | |
2012-06-22 13:49 |
|
File Added: DFB.JPG | |
2012-07-03 19:07 |
|
Note Added: 0020854 | |
2012-07-03 19:07 |
|
Assigned To | dbv => gka |
2012-07-03 19:07 |
|
Status | assigned => resolved |
2012-07-04 00:17 | Pawel | Note Added: 0020855 | |
2012-07-04 17:23 |
|
Note Added: 0020857 | |
2012-07-04 17:23 |
|
Status | resolved => reviewed |
2012-07-04 17:31 |
|
Assigned To | gka => mkv |
2012-07-05 15:28 |
|
Note Added: 0020861 | |
2012-07-05 15:29 |
|
File Added: T0 | |
2012-07-05 15:30 |
|
Test case number | => chl 935 T0 |
2012-07-05 15:30 |
|
Assigned To | mkv => bugmaster |
2012-07-05 15:30 |
|
Status | reviewed => tested |
2012-07-09 13:40 | Pawel | Note Added: 0020880 | |
2012-07-10 14:33 |
|
Changeset attached | => occt master c983f722 |
2012-07-10 14:33 |
|
Assigned To | bugmaster => dbv |
2012-07-10 14:33 |
|
Status | tested => verified |
2012-07-10 14:33 |
|
Resolution | open => fixed |
2012-07-10 14:54 | Pawel | Target Version | => 6.5.4 |
2012-11-16 13:15 | bugmaster | Fixed in Version | => 6.5.4 |
2012-11-16 13:16 | bugmaster | Status | verified => closed |