<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=FR link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 color=navy
face="Times New Roman"><span lang=EN-GB style='font-size:10.0pt;color:navy'>Dear,
<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 color=navy
face="Times New Roman"><span lang=EN-GB style='font-size:10.0pt;color:navy'>Thanks
for this helpful remark… it works now but finally that’s not at all
what I am looking for …<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 color=navy
face="Times New Roman"><span lang=EN-GB style='font-size:10.0pt;color:navy'>In
fact, I would like to find the contour of several polygons … just like a
boolean operation of “union”, so all points of all polygons have
the same scalar value. I was hoping that vtkContour would assume something like
this ….<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 color=navy
face="Times New Roman"><span lang=EN-GB style='font-size:10.0pt;color:navy'>Have
you any idea to do this ? … <o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 color=navy
face="Times New Roman"><span lang=EN-GB style='font-size:10.0pt;color:navy'>Thanks,<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 color=navy
face="Times New Roman"><span lang=EN-GB style='font-size:10.0pt;color:navy'>Fred.<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 color=navy
face="Times New Roman"><span lang=EN-GB style='font-size:10.0pt;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span lang=EN-GB style='font-size:12.0pt'>You're setting
the value of all 4 points to "1", and then taking a contour of
1. It doesn't intersect anywhere, so I </span>think it's working just
right.<br>
<br>
Change the scalars to:<br>
for (int i =0; i <4; i++) scalars->InsertNextValue(i); <br>
<br>
And then you'll have 4 different values.<o:p></o:p></font></p>
<div>
<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 2/1/06, <b><span style='font-weight:bold'>Frederic
DANESI</span></b> <<a href="mailto:fred.danesi@netcourrier.com">fred.danesi@netcourrier.com
</a>> wrote:</span></font></span><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Dear vtkusers,<br>
<br>
I am trying something that I believe quite simple, but without any success. <br>
<br>
I would like to build some vtkPolygons (2D) and then to use vtkContourFilter<br>
to obtain an isoline (which I assume to match with the boundary of all<br>
polygons together) ...<br>
<br>
Even with only one polygon, vtkContourFilter does not do anything <br>
(vtkContourFilter (09981DD8): Created: 0 points, 0 verts, 0 lines, 0<br>
triangles) ...<br>
<br>
I enclosed my code hereafter.<br>
<br>
I will really appreciate any idea, tips on what I missed or what I'm doing<br>
wrong, or any code example... <br>
<br>
Thanks,<br>
Fred.<br>
<br>
----<br>
<br>
vtkPolygon *polygon = vtkPolygon::New();<br>
<br>
polygon->GetPointIds()->SetNumberOfIds(4);<br>
polygon->GetPointIds()->SetId(0,0);<br>
polygon->GetPointIds()->SetId(1,1); <br>
polygon->GetPointIds()->SetId(2,2);<br>
polygon->GetPointIds()->SetId(3,3);<br>
<br>
polygon->GetPoints()->SetNumberOfPoints(4);<br>
polygon->GetPoints()->SetPoint(0, 0.0, 0.0, 0.0);<br>
polygon->GetPoints()->SetPoint(1, 10.0, 0.0, 0.0);<br>
polygon->GetPoints()->SetPoint(2, 10.0, 10.0, 0.0);<br>
polygon->GetPoints()->SetPoint(3, 0.0, 10.0, 0.0);<br>
<br>
vtkIntArray * scalars = vtkIntArray::New();<br>
scalars->Allocate(5000,10000); <br>
for (int i =0; i <4; i++) scalars->InsertNextValue(1);<br>
<br>
vtkPolyData * polygonPolyData = vtkPolyData::New();<br>
polygonPolyData->Allocate(1,1);<br>
polygonPolyData->InsertNextCell(polygon->GetCellType(), <br>
polygon->GetPointIds());<br>
polygonPolyData->SetPoints(polygon->GetPoints());<br>
polygonPolyData->GetPointData()->SetScalars(scalars);<br>
<br>
// mapping and rendering "polygonPolyData" ==> OK ... <br>
<br>
vtkContourFilter * flt = vtkContourFilter ::New();<br>
flt->SetInput((vtkDataSet *)output);<br>
flt->DebugOn();<br>
flt->SetValue(0,1);<br>
<br>
//+ mapping and rendering ==> vtkContourFilter
(09981DD8): Created: 0 <br>
points, 0 verts, 0 lines, 0 triangles ... empty ...<br>
<br>
--<br>
Responsable Département DINCCS<br>
(Département Ingénierie Numérique Conception Collaborative et Simulation)<br>
Pole de Haute Technologie<br>
08000 Charleville-Mézières <br>
Tél. 03.24.37.89.89<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a
href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br clear=all>
<br>
-- <br>
Randall Hand<br>
Visualization Scientist, <br>
ERDC-MSRC Vicksburg, MS<br>
Homepage: <a href="http://www.yeraze.com">http://www.yeraze.com</a> <o:p></o:p></span></font></p>
</div>
</body>
</html>