View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0022583 | Open CASCADE | OCCT:Visualization | public | 2011-06-07 18:11 | 2012-07-04 17:15 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | trivial | ||
Status | closed | Resolution | fixed | ||
OS | All | ||||
Target Version | 6.5.2 | Fixed in Version | 6.5.2 | ||
Summary | 0022583: Graphic3d_ArrayOfPolygons is not displayed if it has both the bounds and edges | ||||
Description | This type of primitive arrays suggests that the polygons can be defined with a number of bounds and the number of edges per bound, but in that case the polygons are not displayed. It is also necessary to implement DRAW command to check all of the existing primitives array types. The example code to reproduce the problem: // create an array Handle (Graphic3d_ArrayOfPolygons) anArray = new Graphic3d_ArrayOfPolygons (4, 2, 6, 0, 0, 0, 0); anArray->AddVertex (1.0, 1.0, 1.0); anArray->AddVertex (3.0, 1.0, 1.0); anArray->AddVertex (3.0, 3.0, 1.0); anArray->AddVertex (6.0, 3.0, 1.0); // define polygons anArray->AddBound (3); anArray->AddEdge (1); anArray->AddEdge (2); anArray->AddEdge (3); anArray->AddBound (3); anArray->AddEdge (2); anArray->AddEdge (3); anArray->AddEdge (4); // add polygons array to the presentation Handle (Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (aPrs); aGroup->BeginPrimitives (); aGroup->AddPrimitiveArray (anArray); aGroup->EndPrimitives (); // display | ||||
Additional information and documentation updates | Changes: Validity checking procedure for primitives array has been corrected. Now it passes arrays that are correct and have defined verticies, "bounds" and "edges" together. Redundant logical blocks in Graphic3d_ArrayOfPrimitives::IsValid has been removed. DRAW command "vdrawparray" has been added to test all types of primitives arrays. This command draws primitives array of defined type by its verticies, bounds, edges passed in form of a string as input arguments. There are changes in the following packages: Graphic3d package: 1) In method Graphic3d_ArrayOfPrimitives::IsValid() checking procedure corrected to correctly pass arrays with bounds and edges together. ViewerTest package: 1) Draw command "vdrawparray" has been added to test primitive arrays building and display procedure. | ||||
Tags | No tags attached. | ||||
Test case number | chl 934 C2 | ||||
|
SVN branch http://svn/svn/occt/branches/OCC22583 is ready to be reviewed. |
|
Kirill, Please revise http://svn/svn/occt/branches/OCC22583 |
2011-08-08 12:25 developer |
test22583.tar.gz (2,837 bytes) |
|
SVN branch http://svn/svn/occt/branches/OCC22583 [^] reviewed without any remarks. |
|
>> // register the object in map >> GetMapOfAIS().Bind (aPObject, aName); will cause double-bind exception on second try (like BUG 0022522). Maybe write common procedure in ViewerTest to replace displayed AIS object in viewer? >> static int CheckElementCommand(...) this function seems to be should return boolean value rather than magic 0 and 1. >> // is argument list has an vbo flag >> Standard_Boolean hasFlagVbo = Standard_False; >> if (isdigit (argv[3][0]) && atoi (argv[3]) >= 0 && atoi (argv[3]) <= 1) >> hasFlagVbo = Standard_True; will be more clear like this: Standard_Boolean hasFlagVbo = (isdigit (argv[3][0]) && atoi (argv[3]) >= 0 && atoi (argv[3]) <= 1); >> if (!aDriver.IsNull()) >> aDriver->EnableVBO ((hasFlagVbo) ? (Standard_Boolean) atoi (argv[3]) : Standard_True); I think this code shouldn't change VBO state at all if hasFlagVbo is false. Isn't it? |
|
Dear bugmaster, Remarks from KGV has been corrected Applied to SVN branch http://svn/svn/occt/branches/OCC22583 |
|
Dear Kirill, I've added a new function in ViewerTest_ObjectCommands.cxx: RegisterInMapOfAIS; it binds input AIS object to the map of AIS and has options to handle old AIS object registered with same name (if there is one in map) - it can be kept without registering new object or simply replaced with removing it from AIS interactive context (otherwise, it is impossible to clear/erase such object in DRAW); This function can be used elsewhere, for example, for BUG 0022522 |
|
Dear Bugmaster, the branch is ready for testing. 2apl, I slightly modified this new function (add display call, check AIS context for NULL, do not display object if registration in map was failed). |
|
Dear Bugmaster, This fix tested. Regression was not found. |
|
Integration into trunk of occt repository Date: 2011-09-16 17:08:33 +0400 (Fri, 16 Sep 2011) New Revision: 9053 Modified: trunk/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx trunk/src/ViewerTest/ViewerTest.cxx trunk/src/ViewerTest/ViewerTest_ObjectCommands.cxx |
occt: master 9558a876 2011-09-16 13:08:33
Committer: bugmaster Details Diff |
0022583: Graphic3d_ArrayOfPolygons is not displayed if it has both the bounds and edges |
Affected Issues 0022583 |
|
mod - src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-07-26 16:13 | bugmaster | Assigned To | bugmaster => apl |
2011-07-26 16:13 | bugmaster | Status | new => assigned |
2011-08-02 11:24 | bugmaster | Category | OCCT:VIZ => OCCT:Visualization |
2011-08-05 13:09 |
|
Fixed in Version | EMPTY => |
2011-08-05 13:09 |
|
Description Updated | |
2011-08-05 13:09 |
|
Additional Information Updated | |
2011-08-05 13:12 |
|
Note Added: 0017919 | |
2011-08-05 13:44 | bugmaster | Assigned To | apl => kgv |
2011-08-05 13:45 | bugmaster | Note Added: 0017921 | |
2011-08-08 12:25 |
|
File Added: test22583.tar.gz | |
2011-09-14 13:01 |
|
Note Added: 0018150 | |
2011-09-14 13:01 |
|
Status | assigned => reviewed |
2011-09-14 13:03 |
|
Target Version | => 6.5.2 |
2011-09-14 13:33 | kgv | Note Added: 0018151 | |
2011-09-14 13:34 | kgv | Note Edited: 0018151 | |
2011-09-14 13:36 | kgv | Assigned To | kgv => apl |
2011-09-14 16:55 |
|
Status | reviewed => assigned |
2011-09-15 11:51 |
|
Note Added: 0018157 | |
2011-09-15 11:51 |
|
Status | assigned => resolved |
2011-09-15 11:56 |
|
Note Added: 0018158 | |
2011-09-15 13:46 | kgv | Note Added: 0018163 | |
2011-09-15 13:46 | kgv | Assigned To | apl => bugmaster |
2011-09-15 13:46 | kgv | Status | resolved => reviewed |
2011-09-16 16:39 |
|
Test case number | => chl 934 C2 |
2011-09-16 16:42 |
|
Note Added: 0018194 | |
2011-09-16 16:42 |
|
Status | reviewed => tested |
2011-09-16 17:09 | bugmaster | Note Added: 0018198 | |
2011-09-16 17:09 | bugmaster | Status | tested => verified |
2011-09-16 17:09 | bugmaster | Resolution | open => fixed |
2012-03-29 17:26 | bugmaster | Changeset attached | => occt master 9558a876 |