[vtkusers] vtkClipClosedSurface problem

Bill Lorensen bill.lorensen at gmail.com
Mon Apr 2 13:45:37 EDT 2012


One of these days we should fix the SuperQuadricSource so that it
provides a valid polydata.

Randy, I don't see a link to your wiki page.

Bill

On Mon, Apr 2, 2012 at 7:49 AM, Randy Heiland <heiland at indiana.edu> wrote:
> Just to follow up on this thread, I did a lot of playing with this new filter that Bill mentioned, plus played with ellipsoid glyphs (transformed spheres) and posted some results on my same wiki page mentioned below.  Bottom line seems to be that using SuperQuadricSource as a glyph source has problems with any type of clipping filter.  Would be happy to be proven wrong, but for now I'll  probably just go with transformed spheres.
>
> -Randy
>
> On Mar 30, 2012, at 6:03 PM, Bill Lorensen wrote:
>
>> Randy,
>>
>> You might also look at the new class
>> vtkBooleanOperationPolyDataFilter. I don't know if it is applicable
>> for your application.
>>
>> Here is an example:
>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter
>>
>> Bill
>>
>> On Fri, Mar 30, 2012 at 1:32 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>> Hi Randy,
>>>
>>> It's not tricky, its picky, as in picky about its input.  Use
>>> vtkFeatureEdges as I mentioned in my earlier email to test your data
>>> to verify that it will work.  You might find some interesting things
>>> about your data if you do so.
>>>
>>> The vtkClipClosedSurface code uses a different clipping algorithm as
>>> compared to vtkClipPolyData.  The latter uses a vtkPointLocator to
>>> generate its output... this is a bit sloppy, because the point locator
>>> can sometimes merges points that shouldn't be merged, but it is
>>> forgiving, and doesn't require anything special about its input.  On
>>> the other hand, vtkClipClosedSurface does not use a vtkPointLocator,
>>> instead it uses an algorithm that will never accidentally merge points
>>> and therefore won't accidentally modify the topology of the data.  In
>>> other words, given a manifold surface as input, it will give a
>>> manifold surface as output, which is something that vtkClipPolyData
>>> cannot guarantee.
>>>
>>>  - David
>>>
>>>
>>>
>>> On Fri, Mar 30, 2012 at 2:11 PM, Randy Heiland <heiland at indiana.edu> wrote:
>>>> Sadly, the vtkCleanPolyData seems to only fix the problem some of the time.  I updated that web page to show another test case.  In addition to cleaning the output of the superquadsource, I also tried cleaning the output of the glyphs themselves, but it didn't seem to help.  The ClipClosedSurface seems to be one tricky filter.
>>>>
>>>> -Randy
>>>>
>>>> On Mar 29, 2012, at 10:36 PM, David Gobbi wrote:
>>>>
>>>>> Hi Randy,
>>>>>
>>>>> I tried it with vtkSphereSource and it worked perfectly.  Evidently
>>>>> vtkSuperquadricSource does not generate a closed surface.  You can
>>>>> test whether a surface is closed by using the vtkFeatureEdges filter
>>>>> to display free edges, i.e. edges that belong to only one polygon.
>>>>> In a closed surface, each edge belongs to exactly two polygons.
>>>>>
>>>>> feature = vtk.vtkFeatureEdges()
>>>>> feature.SetInputConnection(glyphs.GetOutputPort())
>>>>> feature.FeatureEdgesOff()
>>>>> feature.BoundaryEdgesOn()
>>>>> feature.NonManifoldEdgesOn()
>>>>>
>>>>> Try vtkCleanPolyData to clean the output of vtkSuperquadricSource.
>>>>> It isn't guaranteed to work, but it's worth a shot.
>>>>>
>>>>> - David
>>>>>
>>>>>
>>>>> On Thu, Mar 29, 2012 at 6:27 PM, Randy Heiland <heiland at indiana.edu> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I'm having a problem with this filter and would welcome any advice.  I've got a self-contained example here:
>>>>>>
>>>>>> http://old.compucell3d.org/mediawiki1.7/index.php/Vtk_clip_cap_glyphs
>>>>>>
>>>>>> thanks, Randy
>>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>



-- 
Unpaid intern in BillsBasement at noware dot com



More information about the vtkusers mailing list