<HTML><HEAD><TITLE>Mail</TITLE>
<META name=GENERATOR
content="KsDHTMLEDLib.ocx, FreeWare HTML Editor 1.164.2, ?Kurt Senfer">
<META content="text/html; charset=GB2312" http-equiv=Content-Type></HEAD>
<BODY style="FONT-FAMILY: ÐÂËÎÌå; FONT-SIZE: 9pt" leftMargin=5 topMargin=5 #ffffff>
<DIV>hi guys,</DIV>
<DIV>I used a vtkClipPolyData to clip polydata, and I found that the
color of surfaces after clipping is changed.</DIV>
<DIV>So,dose anybody know the reason?</DIV>
<DIV>here is my code.</DIV>
<DIV> </DIV>
<DIV>//////////////////////code/////////////////////////////</DIV>
<DIV><FONT color=#003366> </FONT><FONT style="BACKGROUND-COLOR: #cce8cf"
color=#003366>vtkPolyDataReader
*reader=vtkPolyDataReader::New();<BR> reader->SetFileName(FILENAME);<BR> reader->Update();</FONT></DIV>
<DIV><BR><FONT style="BACKGROUND-COLOR: #cce8cf"
color=#003366> vtkClipPolyData *
clipper=vtkClipPolyData::New();<BR> clipper->SetInput(normals->GetOutput());</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #cce8cf" color=#003366> vtkPlane *
plane =
vtkPlane::New();<BR> plane->SetOrigin(0.5,0,0);<BR> plane->SetNormal(1,1,1);</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #cce8cf"
color=#003366> clipper->SetClipFunction(plane);<BR> clipper->SetValue(0.5);<BR> clipper->SetInsideOut(1);<BR> clipper->Update();</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #cce8cf" color=#003366></FONT> </DIV>
<DIV><FONT style="BACKGROUND-COLOR: #cce8cf"
color=#003366> vtkPolyDataMapper
*mapper=vtkPolyDataMapper::New();<BR> mapper->SetInput(clipper->GetOutput());<BR> vtkActor
*actor=vtkActor::New();<BR> actor->SetMapper(mapper);<BR> vtkRenderer
*ren1= vtkRenderer::New();<BR> ren1->AddActor( actor
);<BR> ren1->SetBackground( 0.1, 0.2, 0.4 );<BR> vtkRenderWindow
*renWin = vtkRenderWindow::New();<BR> renWin->AddRenderer( ren1
);<BR> renWin->SetSize( 600, 600 );<BR> vtkRenderWindowInteractor
*iren =
vtkRenderWindowInteractor::New();<BR> iren->SetRenderWindow(renWin);<BR> vtkInteractorStyleTrackballCamera
*style =
vtkInteractorStyleTrackballCamera::New();<BR> iren->SetInteractorStyle(style);<BR> iren->Initialize();<BR> iren->Start();</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #cce8cf"
color=#003366>///////////////////////////////////////////////</FONT></DIV>
<DIV>And here is the pic: <A
href="http://p13.freep.cn/p.aspx?u=v20_p13_photo_1212121410379520_0.jpg">http://p13.freep.cn/p.aspx?u=v20_p13_photo_1212121410379520_0.jpg</A></DIV>
<DIV> </DIV>
<DIV>I will appreciate any suggestion very much!</DIV>
<DIV> </DIV></BODY></HTML>