<html><div style='background-color:'><P>Louis,</P>
<P> vtkImplicitDataSet interpolates the scalar data associated with its input (PolyDataA) at any given geometrical position (points in PolyDataB). This will not give you the geometrical intersection of the two sets of PolyData. I am not sure what you want mean by intersection: is it the set of lines (and points) that lie at the intersection of two polygonal surfaces? If so, I do not think there is any way to do this (generally) in vtk. </P>
<P>The class I have created, vtkImplicitPolyData, can be used to clip one PolyData with another, although with some error. The error will be dependant on the relative resolution (point density) of the two data sets, and the limitations of linear interpolation generally used in vtk. The output will generally be polygons, not lines. Here is a simple example: PolyData A (1) is overlapped by a similarly shaped PolyData B (2). The class vtkImplicitPolyData is used to clip PolyData A, using PolyData B as an implicit surface (3).</P><PRE><BR> A A B A'<BR> /\ /\/\ /\<BR>/ \ / /\ \ /<BR>\ / \ \/ / \<BR> \/ \/\/ \/<BR>1. 2. 3.<BR></PRE><PRE>If you think this might be useful to you I can send you the code for vtkImplicitPolyData.</PRE><PRE> regards</PRE><PRE> Dave Pont</PRE><PRE> </PRE>>From: louis@itri.org.tw
<DIV></DIV>>To: david_pont@hotmail.com
<DIV></DIV>>Subject: About Clipping PolyData with PolyData!!
<DIV></DIV>>Date: Wed, 5 Dec 2001 11:21:37 +0800
<DIV></DIV>>
<DIV></DIV>>Hi Dave Pont:
<DIV></DIV>>May I ask you about vtk problem? I had seen your mail about "Clipping
<DIV></DIV>>PolyData with PolyData" in vtk mailing list.
<DIV></DIV>>
<DIV></DIV>>My problem:
<DIV></DIV>>I have two PolyData surfaces(PolyDataA and PolyDataB),I want to find the
<DIV></DIV>>intersection of two PolyData surfaces. This problem like Chris's problem in
<DIV></DIV>>vtk mailing list. I had written some code in C++. Coulde you give me some
<DIV></DIV>>ideas?
<DIV></DIV>>
<DIV></DIV>>vtkImplicitDataSet* ImplicitDataSet=vtkImplicitDataSet::New();
<DIV></DIV>>ImplicitDataSet->SetDataSet( PolyDataA );
<DIV></DIV>>vtkClipPolyData* ClipPolyData=vtkClipPolyData::New();
<DIV></DIV>>ClipPolyData->SetInput( PolyDataB );
<DIV></DIV>>ClipPolyData->SetClipFunction( ImplicitDataSet );
<DIV></DIV>>ClipPolyData->InsideOutOff();
<DIV></DIV>>
<DIV></DIV>>My program will make mistakes in "ImplicitDataSet->SetDataSet(
<DIV></DIV>>PolyDataA->GetOutput())". Hope you can know my problem. My English is very
<DIV></DIV>>poor. ^_^
<DIV></DIV>>
<DIV></DIV>>thanks with regards
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>Louis Lee
<DIV></DIV>>Color Technology Section
<DIV></DIV>>Industrial Technology Research Institute
<DIV></DIV>>louis@itri.org.tw
<DIV></DIV>>03-5913714
<DIV></DIV>>
<DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html>