<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif}
@page WordSection1
{margin:70.85pt 70.85pt 70.85pt 70.85pt}
-->
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" lang="NL">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><span lang="nl"><font face="Tahoma" color="black" size="2"><span style="font-size:10pt;" dir="ltr">you are pretty close to the solution. Remember to set the "output dataset type"
to vtkUnstructuredGrid (at the top of the ProgrammaableSource panel, and substitute your code<br>
<div><font face="Times New Roman" size="2"><span style="font-size:16px;">
<div>
<div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt;"><i> </i></span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt;"><i># Add the points and hexahedron to an unstructured grid</i></span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt;"><i>uGrid = vtk.vtkUnstructuredGrid()</i></span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt;"><i>uGrid.Allocate(1,1)</i></span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt;"><i>uGrid.InsertNextCell(hex_.GetCellType(), hex_.GetPointIds())</i></span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt;"><i>uGrid.SetPoints(points)</i></span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt;"><i>uGrid.GetPointData().SetScalars(scalars)
</i></span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt;"><br>
</span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt;"><font face="Times New Roman,serif" size="3"><span style="font-size:12pt;">with this code, which makes use of the predefined object called 'output"</span></font><font face="Times New Roman,serif" size="3"><span style="font-size:12pt;"><br>
</span></font></span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt;"><br>
</span></font></div>
<div style="text-indent:0;margin:0;"><font face="Calibri"><i>output</i></font><font face="Calibri" color="#666666"><i>.</i></font><font face="Calibri"><i>Allocate(</i></font><font face="Calibri" color="#666666"><i>1</i></font><font face="Calibri"><i>,</i></font><font face="Calibri" color="#666666"><i>1</i></font><font face="Calibri"><i>)</i></font></div>
<pre style="text-indent:0;margin:0;"><font face="Calibri"><i>output</i></font><font face="Calibri" color="#666666"><i>.</i></font><font face="Calibri"><i>InsertNextCell(hex_</i></font><font face="Calibri" color="#666666"><i>.</i></font><font face="Calibri"><i>GetCellType(), hex_</i></font><font face="Calibri" color="#666666"><i>.</i></font><font face="Calibri"><i>GetPointIds())</i></font></pre>
<pre style="text-indent:0;margin:0;"><font face="Calibri"><i>output</i></font><font face="Calibri" color="#666666"><i>.</i></font><font face="Calibri"><i>Points </i></font><font face="Calibri" color="#666666"><i>=</i></font><font face="Calibri"><i> points</i></font></pre>
<pre style="text-indent:0;margin:0;"><font face="Calibri"><i>output</i></font><font face="Calibri" color="#666666"><i>.</i></font><font face="Calibri"><i>PointData</i></font><font face="Calibri" color="#666666"><i>.</i></font><font face="Calibri"><i>SetScalars(scalars)</i></font></pre>
<div><br>
<div>
<div><font size="2"><span style="font-size:10pt;">-----------------<br>
Jean/CSCS</span></font></div>
</div>
</div>
</div>
</div>
</span></font></div>
</span></font></span></div>
</body>
</html>