<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Monaco;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=FR link=blue vlink=purple style='word-wrap: break-word;-webkit-nbsp-mode: space;
-webkit-line-break: after-white-space'>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It should be easier if you build directly a polydata …<o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'># Create an unstructured
grids containing a triangle cell.</span></span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'>vtkPoints trianglePoints</span></span><span
lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'> trianglePoints
SetNumberOfPoints 3</span></span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'> trianglePoints
InsertPoint 0 0 0 0</span></span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'> trianglePoints
InsertPoint 1 1 0 0</span></span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'> trianglePoints
InsertPoint 2 .5 .5 0</span></span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'>vtkTriangle aTriangle</span></span><span
lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'> [aTriangle
GetPointIds] SetId 0 0</span></span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'> [aTriangle
GetPointIds] SetId 1 1</span></span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'> [aTriangle
GetPointIds] SetId 2 2</span></span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>vtkPolyData aTrianglePoly<o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'> aTrianglePoly
Allocate 1 1</span></span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'> aTrianglePoly
InsertNextCell [aTriangle GetCellType] [aTriangle GetPointIds]</span></span><span
lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span class=apple-style-span><span lang=EN-US
style='font-size:7.5pt;font-family:"Monaco","serif"'> </span></span><span
class=apple-style-span><span style='font-size:7.5pt;font-family:"Monaco","serif"'>aTrianglePoly
SetPoints trianglePoints</span></span><o:p></o:p></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Fred.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De :</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
vtkusers-bounces@vtk.org [mailto:vtkusers-bounces@vtk.org] <b>De la part de</b>
Elvis Dowson<br>
<b>Envoyé :</b> jeudi 9 octobre 2008 07:13<br>
<b>À :</b> VTK Users<br>
<b>Objet :</b> [vtkusers] How to extract poly data from an unstructured
grid<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Hi,<o:p></o:p></p>
<div>
<p class=MsoNormal> I have an example code
fragment shown below. How can I extract vtkPolyData from the
vtkUnstructuredGrid?<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'># Create an unstructured grids containing a
triangle cell.</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'>vtkPoints trianglePoints</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'> trianglePoints SetNumberOfPoints 3</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'> trianglePoints InsertPoint 0 0 0 0</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'> trianglePoints InsertPoint 1 1 0 0</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'> trianglePoints InsertPoint 2 .5 .5 0</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'>vtkTriangle aTriangle</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'> [aTriangle GetPointIds] SetId 0 0</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'> [aTriangle GetPointIds] SetId 1 1</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'> [aTriangle GetPointIds] SetId 2 2</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'>vtkUnstructuredGrid aTriangleGrid</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'> aTriangleGrid Allocate 1 1</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'> aTriangleGrid InsertNextCell
[aTriangle GetCellType] [aTriangle GetPointIds]</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:7.5pt;
font-family:"Monaco","serif"'> aTriangleGrid SetPoints
trianglePoints</span></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>I want to get a vtkPolyData object so that I can pass it
along to vtkPolyDataNormals.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Best regards,<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Elvis Dowson<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>