MantisBT - Community
View Issue Details
0023021Community[OCCT] OCCT:Visualizationpublic2012-03-13 14:232012-11-16 13:16
WindowsVC++ 200832 bit
[OCCT] 6.5.3 
[OCCT] 6.5.4[OCCT] 6.5.4 
Not needed
0023021: MeshVS_DataSource::GetNormalsByElement returns Standard_False and gives no result even when all normals are OK
If all normals are correctly computed using GetNodeNormal the variable 'res' is never set to Standard_True and the normals are not passed to the variable 'Normals' that is supposed to hold the result of the computation.

Suggested solution: changing the four last lines (194-197) of the method to:

  if ( res || allNormals )
    Normals = aNormals;

  return ( res || allNormals );

Patch attached.
No tags attached.
zip MeshVS_DataSource_patch.ZIP (4,647) 2012-03-13 14:23
Issue History
2012-03-13 14:23PawelNew Issue
2012-03-13 14:23PawelAssigned To => san
2012-03-13 14:23PawelFile Added: MeshVS_DataSource_patch.ZIP
2012-04-13 15:45PawelAssigned Tosan => Pawel
2012-04-13 15:46PawelNote Added: 0020384
2012-04-13 15:46PawelStatusnew => resolved
2012-04-13 15:46PawelAssigned ToPawel => bugmaster
2012-04-27 12:09PawelTarget Version6.5.3 => 6.5.4
2012-05-12 15:10mkvAssigned Tobugmaster => abv
2012-05-12 16:04abvNote Added: 0020516
2012-05-12 16:05abvAssigned Toabv => san
2012-05-18 14:40sanNote Added: 0020555
2012-05-18 14:40sanAssigned Tosan => bugmaster
2012-05-18 14:40sanStatusresolved => reviewed
2012-05-18 17:57mkvAssigned Tobugmaster => mkv
2012-05-21 17:25mkvNote Added: 0020563
2012-05-21 17:26mkvTest case number => Not needed
2012-05-21 17:26mkvAssigned Tomkv => bugmaster
2012-05-21 17:26mkvStatusreviewed => tested
2012-05-28 14:31dbvChangeset attached => occt master c1338f4f
2012-05-28 14:31dbvAssigned Tobugmaster => dbv
2012-05-28 14:31dbvStatustested => verified
2012-05-28 14:31dbvResolutionopen => fixed
2012-11-16 13:15bugmasterFixed in Version => 6.5.4
2012-11-16 13:16bugmasterStatusverified => closed

2012-04-13 15:46   
Corresponding branch pushed to the git repository. Please review.
2012-05-12 16:04   
The fix looks Ok, however it seems that cycle on line 163 in MeshVS_DataSource.cxx should start with k=1, not k=2. Also, having a test case is desirable.
2012-05-18 14:40   
The loop index is initialized correctly by 2 at line 163: there is no need to assign the first normal in aNormals (already computed by preceding call to GetNormal()) to itself.

As for the test case, there is no easy way to implement it: meshfromstl DRAW command and related ones rely on StlMesh_MeshTriangle when getting triangle vertices and the normals, and this class does not support individual normals per vertex. Thus the only way is to implement some synthetic test command anew that generates different kinds of normals (one per node, one per element).

Branch CR23021 reviewed without remarks, ready for testing.
2012-05-21 17:25   
Dear BugMaster,
Workbench KAS:dev:mkv-23021-occt was created from git branch CR23021
(and mkv-23021-products from svn trunk) and compiled on Linux platform.

There are not regressions in mkv-23021-products regarding to KAS:dev:products--opt
There are not improvements in mkv-23021-products regarding to KAS:dev:products--opt

See results in /QADisk/occttests/results/KAS/dev/mkv-23021-products_18052012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120415-opt_13042012/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 [^]