MantisBT - VTK | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0011988 | VTK | (No Category) | public | 2011-03-18 17:56 | 2016-08-12 09:55 |
| Reporter | Ronald Römer | ||||
| Assigned To | Will Schroeder | ||||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | moved | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Project | TBD | ||||
| Type | incorrect functionality | ||||
| Summary | 0011988: vtkPolygon::ComputeNormal returns wrong directed normal if polygon has more concave than convex vertices | ||||
| Description | Hello, the methods in vtkPolygon that are purposed for computing the normal of a polygon does not work, if the polygon has more concave than convex vertices. The normal there is an average from all cross-products, that cause a wrong sign of the normal. In Graphics Gems III there is an interesting method from Nevell, that should replace the actual versions of ComputeNormal. A lite version, without optimation for triangles, I provide below: void ComputeNormal(vtkPoints *pts, vtkIdList *poly, double *n) { n[0] = 0; n[1] = 0; n[2] = 0; double pt0[3], pt1[3]; pts->GetPoint(poly->GetId(0), pt0); unsigned int nbr = poly->GetNumberOfIds(); for(unsigned int i = 0; i < nbr; i++) { pts->GetPoint(poly->GetId((i+1)%nbr), pt1); n[0] += (pt0[1]-pt1[1])*(pt0[2]+pt1[2]); n[1] += (pt0[2]-pt1[2])*(pt0[0]+pt1[0]); n[2] += (pt0[0]-pt1[0])*(pt0[1]+pt1[1]); pt0[0] = pt1[0]; pt0[1] = pt1[1]; pt0[2] = pt1[2]; } vtkMath::Normalize(n); } | ||||
| Steps To Reproduce | |||||
| Additional Information | |||||
| Tags | ComputeNormal, concave vertices, normal of polygon, vtkPolygon | ||||
| Relationships | |||||
| Attached Files | https://www.vtk.org/Bug/file/9521/a.vtk https://www.vtk.org/Bug/file/9522/test.cxx https://www.vtk.org/Bug/file/9750/TestComputeNormal.cxx https://www.vtk.org/Bug/file/9854/polygon.vtk https://www.vtk.org/Bug/file/9855/CMakeLists.txt | ||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2011-03-18 17:56 | Ronald Römer | New Issue | |||
| 2011-03-18 19:05 | Ronald Römer | Tag Attached: ComputeNormal | |||
| 2011-03-18 19:05 | Ronald Römer | Tag Attached: concave vertices | |||
| 2011-03-18 19:05 | Ronald Römer | Tag Attached: normal | |||
| 2011-03-18 19:05 | Ronald Römer | Tag Attached: vtkPolygon | |||
| 2011-03-18 19:05 | Ronald Römer | Tag Detached: normal | |||
| 2011-03-18 19:05 | Ronald Römer | Tag Attached: normal of polygon | |||
| 2013-06-05 15:40 | Jean-Christophe Fillion-Robin | Note Added: 0030912 | |||
| 2013-07-22 18:35 | Dave DeMarle | Note Added: 0031198 | |||
| 2013-07-22 18:35 | Dave DeMarle | Status | backlog => expired | ||
| 2013-07-22 18:35 | Dave DeMarle | Assigned To | => Dave DeMarle | ||
| 2013-09-12 17:28 | Ronald Römer | File Added: a.vtk | |||
| 2013-09-12 17:29 | Ronald Römer | File Added: test.cxx | |||
| 2013-09-12 17:38 | Ronald Römer | Note Added: 0031567 | |||
| 2013-09-12 17:40 | Ronald Römer | Note Edited: 0031567 | bug_revision_view_page.php?bugnote_id=31567#r653 | ||
| 2013-12-11 15:59 | Ronald Römer | Status | expired => backlog | ||
| 2013-12-11 15:59 | Ronald Römer | Resolution | open => reopened | ||
| 2014-09-30 10:56 | Dave DeMarle | Project | => TBD | ||
| 2014-09-30 10:56 | Dave DeMarle | Type | => incorrect functionality | ||
| 2014-09-30 10:56 | Dave DeMarle | Assigned To | Dave DeMarle => | ||
| 2014-10-02 09:42 | Will Schroeder | Assigned To | => Will Schroeder | ||
| 2014-10-08 08:34 | Will Schroeder | Note Added: 0033617 | |||
| 2014-10-08 08:34 | Will Schroeder | Status | backlog => active development | ||
| 2014-10-09 16:58 | Will Schroeder | Note Added: 0033620 | |||
| 2014-10-09 16:58 | Will Schroeder | Status | active development => closed | ||
| 2014-10-09 16:58 | Will Schroeder | Resolution | reopened => fixed | ||
| 2014-10-09 16:58 | Will Schroeder | Note Edited: 0033620 | bug_revision_view_page.php?bugnote_id=33620#r878 | ||
| 2014-10-09 16:59 | Will Schroeder | File Added: TestComputeNormal.cxx | |||
| 2015-07-20 17:01 | David Gobbi | Note Added: 0034811 | |||
| 2015-07-20 17:01 | David Gobbi | Status | closed => backlog | ||
| 2015-07-20 17:01 | David Gobbi | Resolution | fixed => reopened | ||
| 2015-07-20 17:02 | David Gobbi | File Added: polygon.vtk | |||
| 2015-07-20 17:05 | David Gobbi | File Added: CMakeLists.txt | |||
| 2016-08-12 09:55 | Kitware Robot | Note Added: 0037226 | |||
| 2016-08-12 09:55 | Kitware Robot | Status | backlog => closed | ||
| 2016-08-12 09:55 | Kitware Robot | Resolution | reopened => moved | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||