[vtkusers] Re: Help!What's going wrong?

Goodwin Lawlor goodwin.lawlor at ucd.ie
Fri Dec 15 11:37:23 EST 2006


shamima yasmin wrote:
> Dear friends,
> 
>                 Again asking for help.Whenever I use the following to 
> compute normal at a specific point id:
> 
> ---------------------------------------------------------------------------------------------------------------------------         
> 
> 
> float *n = (float*) Polys->GetPointData()->GetNormals()->GetTuple(pointID);
> 
> ------------------------------------------------------------------------------------------------
> 
> my program crashes.Error message is :

The above is fine... looking at your last post, you have:

float* normals = 
(float*)cow->GetOutput()->GetPointData()->GetNormals()->GetTuple(pointID)

but the cow doesn't have any normals (not till downstream in pipeline 
anyway)- try:


cowNormals->Update();
float* normals = 
(float*)cowNormals->GetOutput()->GetPointData()->GetNormals()->GetTuple(pointID)


hth

Goodwin




More information about the vtkusers mailing list