[vtkusers] RE: vtkMergeCells/corrupt k-d tree

Katie Grayshan kgrayshan at hotmail.com
Fri Jun 30 11:46:46 EDT 2006


Upon setting the point merge tolerance to an extraordinarily low value, I was able to use the vtk Mergecell method with MergeDuplicatePointsOn().
So, the final code included: vtk_merge.SetPointMergeTolerance( 10e-47 ).

Katie Grayshan

> To follow-up:
> I have found that the program works if you turn the MergeDuplicatePoints mode off; however, the resulting contours are disconnected. Aside from the small set of n for which the program fails when MergeDuplicatePoints is on, it produces smooth, connected contours which I want. I would prefer to keep this feature 'on' for this reason, but I also need the program to work for all n. 
>  
> Why does turning the MergeDuplicatePoints on cause a corrupt vtkKdTree?
>
> > " ERROR: vtkKdTree:: BuildMapForDuplicatePoints corrupt k-d tree"
>>
> 
> > vtk_merge = vtk.vtkMergeCells( )
> > vtk_merge.SetUnstructuredGrid( vtk_USGrid ) 
> > vtk_merge.SetPointMergeTolerance(10e-4)
> > vtk_merge.MergeDuplicatePointsOn( )
> > vtk_merge.SetTotalNumberOfPoints( n**2 )
> > vtk_merge.SetTotalNumberOfCells( ( n-1 )**2 )
> > vtk_merge.SetTotalNumberOfDataSets( 1 )
> ****FAILS HERE if MergeDuplicatePoints is On*****************
> > vtk_merge.MergeDataSet( vtk_SGrid )
> > vtk_merge.Finish( )
> > //cut//
> >/////See Previous Email for details//////

_________________________________________________________________
Express yourself: design your homepage the way you want it with Live.com. 
http://www.live.com/getstarted


More information about the vtkusers mailing list