[vtkusers] Cuttin a tube

igorznt igorznt at gmail.com
Wed Feb 9 17:00:35 EST 2011


I created a tube and have cutterer it with vtkCutter.

tubeFilter = vtk.vtkTubeFilter()
tubeFilter.SetNumberOfSides(50)
tubeFilter.SetRadius(self.radius)
tubeFilter.SetInputConnection(pfs.GetOutputPort())

cutter = vtk.vtkCutter()
cutter.SetCutFunction(plane)
cutter.GenerateCutScalarsOn()
cutter.SetInputConnection(tubeFilter.GetOutputPort())
cutter.Update()
    
filter = vtk.vtkRuledSurfaceFilter()
filter.CloseSurfaceOn()
filter.PassLinesOn()
filter.OrientLoopsOn()

filter.SetRuledModeToResample()
filter.Update()
filter.SetInputConnection(cutter.GetOutputPort())
            
mapper = vtk.vtkPolyDataMapper()
mapper.SetInputConnection(filter.GetOutputPort())
mapper.GlobalImmediateModeRenderingOn()
        
tubeActor = vtk.vtkActor()
tubeActor.SetMapper(mapper)

As result I have this red line at the image bellow that are the borders of
the tube, now I want to color inside the two lines generate.

http://vtk.1045678.n5.nabble.com/file/n3378386/error.png 

Anyone knows how o do that?
-- 
View this message in context: http://vtk.1045678.n5.nabble.com/Cuttin-a-tube-tp3378386p3378386.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list