<div>I am trying to display to create and display a polyhedron and a clipped polyhedron by a plane. Does anyone know of a simple example?</div><div><br></div><div>Also, I don&#39;t understand why I have to add the vtkPolyhedron to a vtkUnstructuredGrid to display the polyhedron.</div>
<div><br></div><div>Is this the best way to display a polyhedron?</div><div><br></div><div>  // Geometry</div><div><br></div><div>  VTK_CREATE(vtkPoints, points);</div><div>  points-&gt;InsertNextPoint(0.0, 0.0, 0.0);</div>
<div>  points-&gt;InsertNextPoint(1.0, 0.0, 0.0);</div><div>  points-&gt;InsertNextPoint(1.0, 1.0, 0.0);</div><div>  points-&gt;InsertNextPoint(0.0, 1.0, 0.0);</div><div>  points-&gt;InsertNextPoint(0.0, 0.0, 1.0);</div><div>
  points-&gt;InsertNextPoint(1.0, 0.0, 1.0);</div><div>  points-&gt;InsertNextPoint(1.0, 1.0, 1.0);</div><div>  points-&gt;InsertNextPoint(0.0, 1.0, 1.0);</div><div><br></div><div>  /*</div><div>  VTK_CREATE(vtkPolyhedron, polyhedron);</div>
<div>  polyhedron-&gt;GetPointIds()-&gt;SetNumberOfIds(8);</div><div>  polyhedron-&gt;GetPointIds()-&gt;SetId(0,0);</div><div>  polyhedron-&gt;GetPointIds()-&gt;SetId(1,1);</div><div>  polyhedron-&gt;GetPointIds()-&gt;SetId(2,2);</div>
<div>  polyhedron-&gt;GetPointIds()-&gt;SetId(3,3);</div><div>  polyhedron-&gt;GetPointIds()-&gt;SetId(4,4);</div><div>  polyhedron-&gt;GetPointIds()-&gt;SetId(5,5);</div><div>  polyhedron-&gt;GetPointIds()-&gt;SetId(6,6);</div>
<div>  polyhedron-&gt;GetPointIds()-&gt;SetId(7,7); </div><div>  */</div><div><br></div><div>  vtkIdType polyhedronPointsIds[8] = {0, 1, 2, 3, 4, 5, 6, 7};</div><div>  </div><div>  vtkIdType polyhedronFace[6][4] = {{0, 3, 2, 1}, {4, 5, 6, 7}, </div>
<div><span class="Apple-tab-span" style="white-space:pre">                                                                        </span>{1, 2, 6, 5}, {0, 4, 7, 3}, </div><div><span class="Apple-tab-span" style="white-space:pre">                                                        </span>        {0, 1, 5, 4}, {2, 3, 7, 6}};</div>
<div> </div><div>  VTK_CREATE(vtkCellArray, polyhedronFaces); </div><div>  for (int i = 0; i &lt; 6; i++)</div><div>  {</div><div>    polyhedronFaces-&gt;InsertNextCell(4, polyhedronFace[i]);</div><div>  }</div><div><br></div>
<div>  VTK_CREATE(vtkUnstructuredGrid, uGrid); </div><div>  uGrid-&gt;SetPoints(points);</div><div>  uGrid-&gt;InsertNextCell(VTK_POLYHEDRON, 8, polyhedronPointsIds, 6, polyhedronFaces-&gt;GetPointer());</div><div><br></div>
<div><br></div>