| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0007796 | VTK | (No Category) | public | 2008-10-09 10:01 | 2016-08-12 09:55 | ||||
| Reporter | Elvis John Dowson | ||||||||
| Assigned To | Kitware Robot | ||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||
| Status | closed | Resolution | moved | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0007796: Problem vtkPolyDataNormal::ComputeCellNormalsOn() doesn't work | ||||||||
| Description | I am trying to generate a cell normal for a triangle, but vtkPolyDataNormal::ComputeCellNormalsOn() doesn't work. Instead of generating a single surface normal, the function generates three normals all oriented in the wrong direction. I have attached an image screenshot with this defect report. You can find the Tcl code that was used to generate the image in the additional information section of this report. | ||||||||
| Additional Information | # This example shows how to manually construct triangle cell using unstructured grids # and display its surface normal. # package require vtk package require vtkinteraction # Create an unstructured grids containing a triangle cell. vtkPoints trianglePoints trianglePoints SetNumberOfPoints 3 trianglePoints InsertPoint 0 0 0 0 trianglePoints InsertPoint 1 1 0 0 trianglePoints InsertPoint 2 .5 .5 0 vtkTriangle aTriangle [aTriangle GetPointIds] SetId 0 0 [aTriangle GetPointIds] SetId 1 1 [aTriangle GetPointIds] SetId 2 2 vtkUnstructuredGrid aTriangleGrid aTriangleGrid Allocate 1 1 aTriangleGrid InsertNextCell [aTriangle GetCellType] [aTriangle GetPointIds] aTriangleGrid SetPoints trianglePoints vtkDataSetMapper aTriangleMapper aTriangleMapper SetInput aTriangleGrid vtkActor aTriangleActor aTriangleActor SetMapper aTriangleMapper [aTriangleActor GetProperty] SetDiffuseColor .3 1 .5 # Create an arrow glyph to represent the surface normal for the triangle cell. vtkDataSetSurfaceFilter triangleCellDataSetSurfaceFilter triangleCellDataSetSurfaceFilter SetInput aTriangleGrid vtkPolyDataNormals triangleCellNormals triangleCellNormals SetInputConnection [triangleCellDataSetSurfaceFilter GetOutputPort] triangleCellNormals ComputePointNormalsOff triangleCellNormals ComputeCellNormalsOn triangleCellNormals ConsistencyOn triangleCellNormals AutoOrientNormalsOn # Specify the shape of the glyph vtkArrowSource arrowSource vtkGlyph3D arrowGlyph arrowGlyph ScalingOn arrowGlyph SetScaleFactor 0.7 arrowGlyph SetVectorModeToUseNormal arrowGlyph SetScaleModeToScaleByVector arrowGlyph OrientOn arrowGlyph SetSourceConnection [arrowSource GetOutputPort] arrowGlyph SetInputConnection [triangleCellNormals GetOutputPort] vtkDataSetMapper arrowGlyphMapper arrowGlyphMapper SetInputConnection [arrowGlyph GetOutputPort] vtkActor glyphActor glyphActor SetMapper arrowGlyphMapper # Create the usual rendering stuff. vtkRenderer ren1 vtkRenderWindow renWin renWin AddRenderer ren1 renWin SetSize 300 150 vtkRenderWindowInteractor iren iren SetRenderWindow renWin ren1 SetBackground .1 .2 .4 ren1 AddActor aTriangleActor ren1 AddActor glyphActor ren1 ResetCamera ren1 ResetCameraClippingRange renWin Render # render the image # iren AddObserver UserEvent {wm deiconify .vtkInteract} iren Initialize wm withdraw . | ||||||||
| Tags | No tags attached. | ||||||||
| Project | |||||||||
| Type | |||||||||
| Attached Files | ![]() | ||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0037027) Kitware Robot (administrator) 2016-08-12 09:55 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2008-10-09 10:01 | Elvis John Dowson | New Issue | |
| 2008-10-09 10:01 | Elvis John Dowson | File Added: Problem triangle cell with incorrectly rendered surface normals.png | |
| 2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
| 2016-08-12 09:55 | Kitware Robot | Note Added: 0037027 | |
| 2016-08-12 09:55 | Kitware Robot | Status | expired => closed |
| 2016-08-12 09:55 | Kitware Robot | Resolution | open => moved |
| 2016-08-12 09:55 | Kitware Robot | Assigned To | => Kitware Robot |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |