<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Georgia, sans-serif; ">
<div>If you needed to make a generic polyhedron that wasn't in the vtkPlatonicSolidSource, you'd do something like this:</div>
<div><br>
</div>
<div>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #b933a1">import<span style="color: #000000"> vtk</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008210"># This is a Rhombic Dodecahedron.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008210"># First, you need to store the vertex locations.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations = vtk.vtkPoints()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetNumberOfPoints(<span style="color: #2038d6">14</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(
<span style="color: #2038d6">0</span>, (-<span style="color: #2038d6">0.816497</span>, -<span style="color: #2038d6">0.816497</span>,
<span style="color: #2038d6">0.00000</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(
<span style="color: #2038d6">1</span>, (-<span style="color: #2038d6">0.816497</span>,
<span style="color: #2038d6">0.000000</span>, -<span style="color: #2038d6">0.57735</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(
<span style="color: #2038d6">2</span>, (-<span style="color: #2038d6">0.816497</span>,
<span style="color: #2038d6">0.000000</span>, <span style="color: #2038d6">0.57735</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(
<span style="color: #2038d6">3</span>, (-<span style="color: #2038d6">0.816497</span>,
<span style="color: #2038d6">0.816497</span>, <span style="color: #2038d6">0.00000</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(
<span style="color: #2038d6">4</span>, ( <span style="color: #2038d6">0.000000</span>, -<span style="color: #2038d6">0.816497</span>, -<span style="color: #2038d6">0.57735</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(
<span style="color: #2038d6">5</span>, ( <span style="color: #2038d6">0.000000</span>, -<span style="color: #2038d6">0.816497</span>,
<span style="color: #2038d6">0.57735</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(
<span style="color: #2038d6">6</span>, ( <span style="color: #2038d6">0.000000</span>,
<span style="color: #2038d6">0.000000</span>, -<span style="color: #2038d6">1.15470</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(
<span style="color: #2038d6">7</span>, ( <span style="color: #2038d6">0.000000</span>,
<span style="color: #2038d6">0.000000</span>, <span style="color: #2038d6">1.15470</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(
<span style="color: #2038d6">8</span>, ( <span style="color: #2038d6">0.000000</span>,
<span style="color: #2038d6">0.816497</span>, -<span style="color: #2038d6">0.57735</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(
<span style="color: #2038d6">9</span>, ( <span style="color: #2038d6">0.000000</span>,
<span style="color: #2038d6">0.816497</span>, <span style="color: #2038d6">0.57735</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(<span style="color: #2038d6">10</span>, (
<span style="color: #2038d6">0.816497</span>, -<span style="color: #2038d6">0.816497</span>,
<span style="color: #2038d6">0.00000</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(<span style="color: #2038d6">11</span>, (
<span style="color: #2038d6">0.816497</span>, <span style="color: #2038d6">0.000000</span>, -<span style="color: #2038d6">0.57735</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(<span style="color: #2038d6">12</span>, (
<span style="color: #2038d6">0.816497</span>, <span style="color: #2038d6">0.000000</span>,
<span style="color: #2038d6">0.57735</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">vertex_locations.SetPoint(<span style="color: #2038d6">13</span>, (
<span style="color: #2038d6">0.816497</span>, <span style="color: #2038d6">0.816497</span>,
<span style="color: #2038d6">0.00000</span>))</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008210"># Next, you describe the polygons that represent the faces using the vertex</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008210"># indices in the vtkPoints that stores the vertex locations. There are a number</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008210"># of ways to do this that you can find in examples on the Wiki.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces = vtk.vtkCellArray()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q = vtk.vtkQuad()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">0</span>,
<span style="color: #2038d6">7</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">1</span>,
<span style="color: #2038d6">12</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">2</span>,
<span style="color: #2038d6">10</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">3</span>,
<span style="color: #2038d6">5</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces.InsertNextCell(q)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q = vtk.vtkQuad()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">0</span>,
<span style="color: #2038d6">7</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">1</span>,
<span style="color: #2038d6">12</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">2</span>,
<span style="color: #2038d6">13</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">3</span>,
<span style="color: #2038d6">9</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces.InsertNextCell(q)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q = vtk.vtkQuad()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">0</span>,
<span style="color: #2038d6">7</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">1</span>,
<span style="color: #2038d6">9</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">2</span>,
<span style="color: #2038d6">3</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">3</span>,
<span style="color: #2038d6">2</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces.InsertNextCell(q)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q = vtk.vtkQuad()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">0</span>,
<span style="color: #2038d6">7</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">1</span>,
<span style="color: #2038d6">2</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">2</span>,
<span style="color: #2038d6">0</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">3</span>,
<span style="color: #2038d6">5</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces.InsertNextCell(q)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q = vtk.vtkQuad()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">0</span>,
<span style="color: #2038d6">6</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">1</span>,
<span style="color: #2038d6">11</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">2</span>,
<span style="color: #2038d6">10</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">3</span>,
<span style="color: #2038d6">4</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces.InsertNextCell(q)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q = vtk.vtkQuad()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">0</span>,
<span style="color: #2038d6">6</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">1</span>,
<span style="color: #2038d6">4</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">2</span>,
<span style="color: #2038d6">0</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">3</span>,
<span style="color: #2038d6">1</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces.InsertNextCell(q)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q = vtk.vtkQuad()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">0</span>,
<span style="color: #2038d6">6</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">1</span>,
<span style="color: #2038d6">1</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">2</span>,
<span style="color: #2038d6">3</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">3</span>,
<span style="color: #2038d6">8</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces.InsertNextCell(q)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q = vtk.vtkQuad()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">0</span>,
<span style="color: #2038d6">6</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">1</span>,
<span style="color: #2038d6">8</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">2</span>,
<span style="color: #2038d6">13</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">3</span>,
<span style="color: #2038d6">11</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces.InsertNextCell(q)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q = vtk.vtkQuad()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">0</span>,
<span style="color: #2038d6">10</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">1</span>,
<span style="color: #2038d6">11</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">2</span>,
<span style="color: #2038d6">13</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">3</span>,
<span style="color: #2038d6">12</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces.InsertNextCell(q)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q = vtk.vtkQuad()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">0</span>,
<span style="color: #2038d6">13</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">1</span>,
<span style="color: #2038d6">8</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">2</span>,
<span style="color: #2038d6">3</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">3</span>,
<span style="color: #2038d6">9</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces.InsertNextCell(q)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q = vtk.vtkQuad()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">0</span>,
<span style="color: #2038d6">3</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">1</span>,
<span style="color: #2038d6">1</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">2</span>,
<span style="color: #2038d6">0</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">3</span>,
<span style="color: #2038d6">2</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces.InsertNextCell(q)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q = vtk.vtkQuad()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">0</span>,
<span style="color: #2038d6">0</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">1</span>,
<span style="color: #2038d6">4</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">2</span>,
<span style="color: #2038d6">10</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">q.GetPointIds().SetId(<span style="color: #2038d6">3</span>,
<span style="color: #2038d6">5</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">polygon_faces.InsertNextCell(q)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008210"># Next you create a vtkPolyData to store your face and vertex information that</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008210"># represents your polyhedron.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">pd = vtk.vtkPolyData()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">pd.SetPoints(vertex_locations)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">pd.SetPolys(polygon_faces)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008210">#---------------------#</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008210"># visualization stuff #</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008210">#---------------------#</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">mapper = vtk.vtkPolyDataMapper()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">mapper.SetInputData(pd)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">actor = vtk.vtkActor()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">actor.SetMapper(mapper)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">ren = vtk.vtkRenderer()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">ren.AddActor(actor)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">renw = vtk.vtkRenderWindow()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">renw.AddRenderer(ren)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">iren = vtk.vtkRenderWindowInteractor()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">iren.SetRenderWindow(renw)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px">
<br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">ren.ResetCamera()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">renw.Render()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo">iren.Start()</p>
</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Christopher Mullins <<a href="mailto:christopher.mullins@kitware.com">christopher.mullins@kitware.com</a>><br>
<span style="font-weight:bold">Date: </span>Tuesday, September 9, 2014 1:28 PM<br>
<span style="font-weight:bold">To: </span>George <<a href="mailto:george.gerber@gmail.com">george.gerber@gmail.com</a>><br>
<span style="font-weight:bold">Cc: </span>VTK <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [vtkusers] polyhedron in python<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">The Geometric Objects examples (c++[1] and python[2]) might be what you're looking for.
<div><br>
</div>
<div>[1] <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx#Geometric_Objects">http://www.vtk.org/Wiki/VTK/Examples/Cxx#Geometric_Objects</a></div>
<div>[2] <a href="http://www.vtk.org/Wiki/VTK/Examples/Python#Geometric_Objects">http://www.vtk.org/Wiki/VTK/Examples/Python#Geometric_Objects</a></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Sep 9, 2014 at 4:19 PM, George <span dir="ltr"><<a href="mailto:george.gerber@gmail.com" target="_blank">george.gerber@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Good day,<br>
<br>
Would somebody be so kind as to give a basic example of creating a<br>
polyhedron in python (or c++ if necessary)? I have searched google<br>
extensively, without any luck.<br>
<br>
Best regards,<br>
George<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643.html" target="_blank">
http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
Christopher Mullins
<div>R&D Engineer</div>
<div>Kitware Inc.,</div>
<div>919.869.8871</div>
</div>
</div>
</div>
</span>
</body>
</html>