[vtkusers] About vtkPolyDataNormals....

Bill Lorensen bill.lorensen at gmail.com
Thu Nov 19 00:12:13 EST 2009


Your code says:
triangleCellNormals->ComputeCellNormalsOff() ;
so there will not be any cell normals computed.
Try
triangleCellNormals->ComputeCellNormalsOn() ;

On Wed, Nov 18, 2009 at 11:50 PM, renlishen <renlishen at gmail.com> wrote:
>
> I have seen the post "How to extract the average normal from
> vtkPolyDataNormals",
> and I try to do the same thing
> ------------------------------------------------------
>        vtkPolyDataNormals *triangleCellNormals = vtkPolyDataNormals::New() ;
>        triangleCellNormals->SetInput(
> triangleCellDataSetSurfaceFilter->GetOutput() ) ;
>        triangleCellNormals->ComputeCellNormalsOff() ;
>        triangleCellNormals->ComputePointNormalsOn() ;
>        triangleCellNormals->ConsistencyOn() ;
>        triangleCellNormals->AutoOrientNormalsOn() ;
>        triangleCellNormals->Update() ;
>
>        vtkFloatArray *PointNormalArray = vtkFloatArray::SafeDownCast(
> triangleCellNormals->GetOutput()->GetCellData()->GetNormals() ) ;
> -------------------------------------------------------
> My question is ..I can't connect GetCellData() to GetNormals()..
> If the method is wrong, how can I do to get normals?
>
> I can display, but my goal is to get points' normal....
> p.s. I am using VTK5.4.2...
>
> thanks for your help~!!
> http://old.nabble.com/file/p26420378/1.png
> --
> View this message in context: http://old.nabble.com/About-vtkPolyDataNormals....-tp26420378p26420378.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list