[vtkusers] How to generate a surface normal glyph for a triangle cell

Elvis Dowson elvis.dowson at mac.com
Thu Oct 9 10:55:33 EDT 2008


Hi,
      According to the documentation, vtkPolyDataNormals is a filter  
that computes point normals for a polygonal mesh.

The documentation doesn't make any reference to the capability of the  
method
vtkPolyDataNormals::ComputeCellNormalsOn	(		)  which is used to turn  
on  the computation of cell normals.

Looking at the source code for vtkPolyDataNormals very quickly, the  
ComputePointNormals is used. So, the question is if this functionality  
has been fully implemented and the documentation is correct, i.e it  
only computes point normals and not cell normals.

Anyone? :-)

Best regards,

Elvis Dowson


On Oct 9, 2008, at 6:00 PM, Elvis Dowson wrote:

> Hi,
>         I really need some help with this problem! :-)  Guys, I've  
> tried many things, first with a plane source and then with a  
> unstructured grid, converted it to a poly data and used  
> vtkPolyDataNormals and set ComputeCellNormalsOn. It still doesn't  
> give the desired results.
>
> <pastedGraphic.png>
> vtkDataSetSurfaceFilter triangleCellDataSetSurfaceFilter
>   triangleCellDataSetSurfaceFilter SetInput aTriangleGrid
>
> vtkPolyDataNormals triangleCellNormals
>   triangleCellNormals SetInputConnection  
> [triangleCellDataSetSurfaceFilter GetOutputPort]
>   triangleCellNormals ComputePointNormalsOff
>   triangleCellNormals ComputeCellNormalsOn
>   triangleCellNormals ConsistencyOn
>   triangleCellNormals AutoOrientNormalsOn
>
> vtkPolyDataNormal::ComputeCellNormalsOn() doesn't seem to be  
> working. There should only be 1 single cell normal, right? I created  
> this example to explicitly use a single triangle cell, to test this  
> funtion.
>
> I've been at this problem for 2 days straight and tried all sorts of  
> suggestions, but I still haven't found an explanation for describing  
> the above results. Please help!! :-)
>
> I've attached the full source code with this message.
>
> <TriangleWithSurfaceNormalGlyph2.tcl>
>
> Best regards,
>
> Elvis Dowson
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081009/ea78807f/attachment.htm>


More information about the vtkusers mailing list