[vtkusers] Normals

Louis Desjardins lost_bits1110 at hotmail.com
Tue Aug 9 15:03:45 EDT 2005


okay thanks everyone
the safedowncast worked,
thanks
ld

>From: François Bertel <francois.bertel at kitware.com>
>To: Louis Desjardins <lost_bits1110 at hotmail.com>
>CC: vtkusers at vtk.org
>Subject: Re: [vtkusers] Normals
>Date: Tue, 09 Aug 2005 14:28:28 -0400
>
>* Solution: Add #include "vtkFloatArray.h"
>* Rational: See the following links:
>
>http://www.vtk.org/Wiki/VTK_FAQ#The_C.2B.2B_compiler_cannot_convert_some_pointer_type_to_another_pointer_type_in_my_little_program
>
>or
>
>http://www.vtk.org/Wiki/VTK_FAQ#Forward_declaration_in_VTK_4.x
>
>Regards
>
>Louis Desjardins wrote:
> > Hi Experts,
> >
> > I am trying to get the normals of my data set using the following code,
> > where CellNormals and PointNormals are of type vtkFloatArray
> >
> > GeometryFilter->SetInput( UnstructuredGrid );
> > PolyDataNormals_orig->SetInput( GeometryFilter->GetOutput() );
> > CellNormals =
> > PolyDataNormals_orig->GetOutput()->GetCellData()->GetNormals();
> > PointNormals =
> > PolyDataNormals_orig->GetOutput()->GetPointData()->GetNormals();
> >
> > However I get the error:
> > invalid conversion from `vtkDataArray*' to `vtkFloatArray*'
> >
> > ?? Why do I get this? vtkFloatArray *is* a vtkDataArray.. so whats the
> > problem? Should I not be using vtkFloatArray? and of course vtkDataArray
> > is an abstract class..
> > anwyyas i know htis is silly but your help is appreciated
> > thanks
> >
> > ld
> >
> >
> > _______________________________________________
> > This is the private VTK discussion list. Please keep messages on-topic.
> > Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
>
>--
>François Bertel, PhD  | Kitware Inc. Suite 204
>1 (518) 371 3971 x113 | 28 Corporate Drive
>                       | Clifton Park NY 12065, USA
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the 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