I mean vtkDataSetSurfaceFilter (similar to vtkGeometryFilter).<br>At step 3, if i replace it with vtkGeometryFilter, i get only the outer.<br><br>vtkSmoothPolyDataFilter on which cells is applied? hexahedrons?<br><br><br>
<div class="gmail_quote">2009/12/11 David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;</span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">By &quot;vtkDataSurfaceFilter&quot; you mean &quot;vtkGeometryFilter&quot;, right?<br><br>And no, the interior hexahedrons are definitely not smoothed.  No way<br>
no how.  And because of this, some of the inside points might end up<br>on the outside after smoothing, resulting in an invalid data set.<br><br>You need a step 5 which smooths the interior points, based on the<br>connectivity information.  Such a filter does not exist in VTK, it<br>
would have to be written.<br><font color="#888888"><br>  David<br></font>
<div>
<div></div>
<div class="h5"><br><br>On Fri, Dec 11, 2009 at 9:04 AM, Bill Chivas &lt;<a href="mailto:noo134@googlemail.com">noo134@googlemail.com</a>&gt; wrote:<br>&gt; Thank you both.<br>&gt; I&#39;ll try out your suggestions.<br>&gt; By far, i tried the following pipeline:<br>
&gt; 1) UnstructuredGrid<br>&gt; 2) vtkShrinkFilter (so i can see the hexahedrons)<br>&gt; 3) vtkDataSetSurfaceFilter (!)<br>&gt; 4) vtkSmoothPolyDataFilter<br>&gt;<br>&gt; I get what i want. I&#39;m not really sure if ALL hexahedrons are smoothed (and<br>
&gt; not only the outer ones).<br>&gt; What do you think?<br>&gt;<br>&gt; Thanks,<br>&gt; Bill<br>&gt;<br>&gt;<br>&gt;<br>&gt; 2009/12/11 David Gobbi &lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;<br>
&gt;&gt;<br>&gt;&gt; Hmm... if GeometryFilter keeps all the points, then it&#39;s possible that<br>&gt;&gt; you could generate a new vtkDataSet that combines the points from the<br>&gt;&gt; smoothed polydata with the cells of your grid.  Something like this:<br>
&gt;&gt;<br>&gt;&gt; smoothFilter-&gt;Update();<br>&gt;&gt; gridProducer-&gt;Update();<br>&gt;&gt; vtkDataSet *newdata = vtkDataSet::New();<br>&gt;&gt; newdata-&gt;DeepCopy(gridProducer-&gt;GetOutput());<br>&gt;&gt; newdata-&gt;SetPoints(smoothFilter-&gt;GetOutput()-&gt;GetPoints());<br>
&gt;&gt;<br>&gt;&gt; Note that code like this can crash if the assumptions aren&#39;t correct.<br>&gt;&gt; Also, only the outer layer of points will be smoothed, so the<br>&gt;&gt; resulting data object might contain invalid cells.  But still, this<br>
&gt;&gt; should give you ideas about how to find a proper solution.<br>&gt;&gt;<br>&gt;&gt;    David<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; On Fri, Dec 11, 2009 at 8:40 AM, Bill Chivas &lt;<a href="mailto:noo134@googlemail.com">noo134@googlemail.com</a>&gt;<br>
&gt;&gt; wrote:<br>&gt;&gt; &gt; vtkGeometryFilter works fine. I wonder if i could get back to<br>&gt;&gt; &gt; unstructuredGrid and hexahedrons by using the points.<br>&gt;&gt; &gt; I noticed that the number of points are the same in unstructuredGrid and<br>
&gt;&gt; &gt; vtkGeometryFilter (vtkPolyData).<br>&gt;&gt; &gt; Could i &quot;reproduce&quot; the original hexahedron topology?<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Thanks,<br>&gt;&gt; &gt; Bill<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; 2009/12/11 David Gobbi &lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; On Fri, Dec 11, 2009 at 7:11 AM, Bill Chivas &lt;<a href="mailto:noo134@googlemail.com">noo134@googlemail.com</a>&gt;<br>&gt;&gt; &gt;&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt; Hello all,<br>
&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; I would like to use vtkSmoothPolyDataFilter  on an unstructuredGrid,<br>&gt;&gt; &gt;&gt; &gt; but<br>&gt;&gt; &gt;&gt; &gt; i<br>&gt;&gt; &gt;&gt; &gt; read the particular filter applies only to vtkPolyData.<br>
&gt;&gt; &gt;&gt; &gt; My unstructuredGrid consists of hexahedrons.<br>&gt;&gt; &gt;&gt; &gt; How could i use the filter?<br>&gt;&gt; &gt;&gt; &gt; One idea i thought is to extract the surface iterately and apply to<br>&gt;&gt; &gt;&gt; &gt; these<br>
&gt;&gt; &gt;&gt; &gt; surfaces, but i don&#39;t know if it&#39;s ok.<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; I&#39;ve seen some people create a &quot;skin&quot; polydata with vtkGeometryFilter,<br>&gt;&gt; &gt;&gt; apply the smoothing to the &quot;skin&quot; and then use a custom filter to<br>
&gt;&gt; &gt;&gt; propagate the smoothing throughout the interior of their mesh.  The<br>&gt;&gt; &gt;&gt; vtkGeometryFilter is a basic anything-to-polydata filter, so it is<br>&gt;&gt; &gt;&gt; easy to use.  The final step of using the smoothed polydata to create<br>
&gt;&gt; &gt;&gt; a smoothed mesh is nontrivial, though.<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;    David<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;<br>&gt;<br></div></div></blockquote></div><br>