[vtkusers] Re: Quadratic triangle + linear edge - cell scalars incorrect (vtk 4.5)

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon May 24 15:49:45 EDT 2004


John,

	This is the problem with using VC++6 for real development :)

	More seriously, VC++6 does not respect scoping for 'for', and thus lead 
people to make errors. Could you change your code :

    for ( int ptId = 0; ptId < 6; ptId++ )

into

    int ptId;
    for ( ptId = 0; ptId < 6; ptId++ )

Only then you can later reuse ptId.

HTH
Mathieu


John Platt wrote:
> Hi Users,
> 
>  
> 
> When I add a linear edge to an unstructured grid consisting of a single 
> quadratic triangle, the centre linear triangle of the triangulated 
> quadratic triangle and the edge have swapped cell scalars – see 
> attachment (triangle should be all red & edge blue).
> 
>  
> 
> When either of the cells is drawn in isolation there is no problem.
> 
>  
> 
> The cell scalars coming out of 
> vtkDataSetSurfaceFilter::UnstructuredGridExecute() appear OK.
> 
>  
> 
> Does anybody else have this problem? I have attached the c++ code just 
> in case it is a fault on my part.
> 
>  
> 
> Many thanks for your help.
> 
>  
> 
> John.
> 
> 
> ------------------------------------------------------------------------
> 






More information about the vtkusers mailing list