<div dir="ltr">Got it Bill!<br><br>There is a trick<br><br>pipeline is as I uesd before from capCow.tcl but introducin vtkfeatureEdges after vtkCutter and setting the stripper input from cutter not from featureEdges.<br><br>
I am bit confused, does this featureedges modifies the cutter output<br> and makes this modified outpur available to cutter->GetOutput()<br><br>Seems to be special type of operation ( or is it a bug!).<br><br>Here is the screenshot<br>
<br>I will add an example to wiki.<br><br><br>Thanks,<br><br><br><div class="gmail_quote">On Sat, Jun 5, 2010 at 5:03 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Can you post an image of what you get?<br>
<div><div></div><div class="h5"><br>
On Sat, Jun 5, 2010 at 11:34 AM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>
> Here is it!<br>
><br>
> # A simple script to demonstrate the vtkCutter function<br>
> import vtk<br>
><br>
><br>
> #Create a cube<br>
> cube=vtk.vtkSphereSource()<br>
> cube.SetRadius(50)<br>
> cube.SetThetaResolution(200)<br>
> cube.SetPhiResolution(200)<br>
> cubeMapper=vtk.vtkPolyDataMapper()<br>
> cubeMapper.SetInputConnection(cube.GetOutputPort())<br>
><br>
> #create a plane to cut,here it cuts in the XZ direction (xz<br>
> normal=(1,0,0);XY =(0,0,1),YZ =(0,1,0)<br>
> plane=vtk.vtkPlane()<br>
> plane.SetOrigin(10,0,0)<br>
> plane.SetNormal(1,0,0)<br>
><br>
> #create cutter<br>
> cutter=vtk.vtkCutter()<br>
> cutter.SetCutFunction(plane)<br>
> cutter.SetInput(cubeMapper.GetInput())<br>
> cutter.Update()<br>
><br>
> FeatureEdges=vtk.vtkFeatureEdges()<br>
> FeatureEdges.SetInputConnection(cutter.GetOutputPort())<br>
> FeatureEdges.BoundaryEdgesOn()<br>
> FeatureEdges.FeatureEdgesOff()<br>
> FeatureEdges.NonManifoldEdgesOff()<br>
> FeatureEdges.ManifoldEdgesOff()<br>
> FeatureEdges.Update()<br>
><br>
><br>
><br>
><br>
> cutMapper=vtk.vtkPolyDataMapper()<br>
> cutMapper.SetInput(FeatureEdges.GetOutput())<br>
> cutActor=vtk.vtkActor()<br>
> cutActor.GetProperty().SetColor(1,1,0)<br>
> cutActor.GetProperty().SetEdgeColor(1,0.5,0)<br>
> cutActor.GetProperty().SetLineWidth(2)<br>
> cutActor.GetProperty().EdgeVisibilityOn()<br>
> cutActor.GetProperty().SetOpacity(0.7)<br>
> cutActor.SetMapper(cutMapper)<br>
><br>
><br>
> #create renderers and add actors of plane and cube<br>
> ren = vtk.vtkRenderer()<br>
> ren.AddActor(cutActor)<br>
><br>
><br>
> #Add renderer to renderwindow and render<br>
> renWin = vtk.vtkRenderWindow()<br>
> renWin.AddRenderer(ren)<br>
> renWin.SetSize(600, 600)<br>
> iren = vtk.vtkRenderWindowInteractor()<br>
> iren.SetRenderWindow(renWin)<br>
> ren.SetBackground(0,0,0)<br>
> renWin.Render()<br>
><br>
> On Fri, Jun 4, 2010 at 10:07 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
> wrote:<br>
>><br>
>> From the output of vtkCutter, insert vtkFeatureEdges with<br>
>> BoundaryEdgesOn()<br>
>> FeatureEdgesOff()<br>
>> NonManifoldEdgesOff()<br>
>> ManifoldEdgesOff()<br>
>><br>
>><br>
>><br>
>> On Fri, Jun 4, 2010 at 4:16 PM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>
>> > Hi all,<br>
>> ><br>
>> > With the help of CapCow.tcl example I am able to fill the contour I got<br>
>> > from<br>
>> > vtkCutter. But, the problem is I am the edge to be visible, so I set<br>
>> > edge<br>
>> > visibility on, it makes all the triangle edges on. I want only the<br>
>> > outline<br>
>> > on.<br>
>> ><br>
>> > Any suggestions?<br>
>> ><br>
>> > Thanks,<br>
>> ><br>
>> > Jothy<br>
>> ><br>
>> > _______________________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Please keep messages on-topic and check the VTK FAQ at:<br>
>> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>