Hi,<br><br> Can GetGetProducerPort of vtkPolydata work? My source code are as follows:<br><br> <br><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> But i can't see the clip result? Who can tell me why? I use the following code to build <br><br>the vtkPolydata object:<br><br><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><br><br> BoShi
<br>