[vtkusers] Using "Boolean Operations on Surfaces" on arbitrary mesh (stl) files

Cory Quammen cquammen at cs.unc.edu
Wed Aug 10 10:17:51 EDT 2011


Doyoung,

I checked your STL files in ParaView, and it looks like it is a fully
connected triangle mesh, so I would expect the boolean filter to work.

It appears that one object is a translated version of the other
object, so there is no overlap. I think the filter works appropriately
in this case. I'll see if I can reproduce your error.

Thanks,
Cory

On Wed, Aug 10, 2011 at 10:09 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:
> On Wed, Aug 10, 2011 at 8:56 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> You probably need to run vtkCleanPolyData on the output of the reader. I
>> think the STL reader creates triangles that each have their own sets of
>> points.
>
> Yes, the triangles in a surface need to be connected so that the
> inside/outside tests works. This filter won't work on polygon soup.
>
> - Cory
>
>>
>> On Tue, Aug 9, 2011 at 12:13 AM, louis10th <doyoungchang at gmail.com> wrote:
>>>
>>> The program compiles with no error :)
>>> But when I execute the exe it crashes.
>>>
>>> I did try the following and the file looks reasonable.
>>> I will also try Paraview.
>>>
>>> Thanks!
>>>
>>> --------------------
>>>
>>>        vtkSTLReader *volumeReader = vtkSTLReader::New();
>>>                volumeReader->SetFileName("test.stl");
>>>
>>>        vtkPolyDataMapper *stlMapper=vtkPolyDataMapper::New();
>>>        stlMapper->SetInputConnection (volumeReader->GetOutputPort());
>>>
>>>        vtkLODActor *stlActor=vtkLODActor::New();
>>>        stlActor->SetMapper(stlMapper);
>>>
>>>        renderer->AddActor( stlActor );
>>>
>>>        volumeReader-> Delete(); stlMapper->Delete(); stlActor->Delete();
>>>
>>>        renWin->Render();
>>>        renWinInteractor->Start();
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://vtk.1045678.n5.nabble.com/Using-Boolean-Operations-on-Surfaces-on-arbitrary-mesh-stl-files-tp4680076p4680676.html
>>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> 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
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
>
>
> --
> Cory Quammen
> Research Associate
> Department of Computer Science
> The University of North Carolina at Chapel Hill
>



-- 
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill



More information about the vtkusers mailing list