<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=GB2312" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
Can GetGetProducerPort of vtkPolydata work? My source code are
as follows:<br>
<br>
<br>
<font color="#3333ff"><br>
CVtkArchitectureDoc* pDoc = GetDocument();<br>
<br>
double normalViewPlane[3];<br>
<br>
pvtkRenderer->GetActiveCamera()->GetViewPlaneNormal(normalViewPlane);<br>
vtkPolyData* polydata = pDoc->m_polyData;<br>
m_ImplicitSelectionLoop->SetLoop(m_pointLoop);<br>
m_ImplicitSelectionLoop->SetNormal(normalViewPlane);<br>
<br>
m_extractPolyDataGemetry->SetInputConnection(polydata->GetProducerPort());<br>
m_extractPolyDataGemetry->SetImplicitFunction(m_ImplicitSelectionLoop);<br>
<br>
m_polyDataMapper->SetInputConnection(m_extractPolyDataGemetry->GetOutputPort());<br>
....................................<br>
<br>
<br>
<br>
</font> But i can't see the clip result? Who can tell me why? I use
the following code to build the vtkPolydata object:<br>
<br>
<font color="#000099"><br>
for (int n=0;n<m_nPts;n++)<br>
{<br>
libraryFile.Read(p,24); <br>
m_points->InsertPoint(n,p[0],p[1],p[2]);<br>
}<br>
<br>
m_polyData->SetPoints(m_points);<br>
<br>
int* ptId = new int[m_nPts];<br>
<br>
for (n=0;n<m_nPts;n++)<br>
{ <br>
ptId[n]=n;<br>
}<br>
<br>
m_cellArray->InsertNextCell(m_nPts, ptId);<br>
<br>
delete []ptId;<br>
<br>
//¹¹½¨ÍØÆ˽ṹ<br>
<br>
m_polyData->SetVerts(m_cellArray);<br>
</font><br>
</body>
</html>