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

Cory Quammen cquammen at cs.unc.edu
Wed Aug 10 10:09:40 EDT 2011


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



More information about the vtkusers mailing list