[vtkusers] vtkMergePoints usage (Steve Boyd)

Turner, Wesley D (Research) turner at crd.ge.com
Thu Oct 9 10:54:53 EDT 2003


Did you try vtkCleanPolyData?

- Wes

-----Original Message-----
From: Doug McCorkle [mailto:mccdo at iastate.edu]
Sent: Thursday, October 09, 2003 8:02 AM
To: vtkusers at vtk.org
Cc: 'Steve Boyd'
Subject: [vtkusers] vtkMergePoints usage (Steve Boyd)


Steve,
     We also are having the same problems as you. I have been unable to
figure out how to use vtkMergePoints to accomplish this task. I have
also been unable to figure out an alternate way to remove coincident
points. If anyone has sample code that does this I would be interested
in the code.
Doug 

Message: 3
Date: Wed, 08 Oct 2003 15:05:55 -0700
From: Steve Boyd <skboyd at ucalgary.ca>
Organization: University of Calgary
To: vtk <vtkusers at public.kitware.com>
Subject: [vtkusers] vtkMergePoints usage

Hi,

I am trying to locate duplicate points using vtkMergePoints.  I am
successful at finding, for any given point, the closest point using
->FindClosestPoint(p1), but I when I try running ->IsUniquePoint(p1) I
get a runtime error (memory).  Am I using this class incorrectly?

    float p1[3];
    p1[0] = 2.0;
    p1[1] = 1.0;
    p1[2] = 0.5;

    vtkMergePoints *pointLocator = vtkMergePoints::New();
      pointLocator->SetDataSet(ug);	// ug is vtkUnstructuredGrid
data
      pointLocator->BuildLocator();

    // this line works fine
    cout << "Closest point is at id " <<
pointLocator->FindClosestPoint(p1) << endl;

    // this line gives a runtime error (regardless if p1 is unique or
not).
    cout << "Is it inserted? " << pointLocator->IsInsertedPoint(p1) <<
endl;

I'm guessing that this isn't a bug, but rather my incorrect usage of the
class.  Can somebody tell me how to use it properly?  

Regards,

Steve

-- 
Steven Boyd

PhD, PEng
Assistant Professor
Department of Mechanical and Manufacturing Engineering
University of Calgary
2500 University Drive, N.W.
Calgary, Alberta, Canada, T2N 1N4

tel. 1.403.220.4173  fax. 1.403.282.8406  skboyd at ucalgary.ca
-------------------------------------------------------------------




_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list