I haven&#39;t looked at the cutter code, but it is likely that changing the parameters to the cutting plane doesn&#39;t cause a Modified event to be made to the cutter code.  Try calling cutter-&gt;Modified to force the cutter to be stale before calling cutter-&gt;Update().<div>

<br></div><div>- Wes<br><br><div class="gmail_quote">On Wed, Nov 3, 2010 at 8:35 AM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Inside the loop you must disconnect the input to append from the<br>
output of cutter. One way to do that is to use DeepCopy as you<br>
discovered.<br>
<br>
Another is to create the cutter inside the loop and Delete it after<br>
adding its output to append If you use SmartPointer&#39;s you need not<br>
delete). This should be faster than the DeepCopy, depending on the<br>
size of the models.<br>
<br>
If you do not disconnect the input to append, then all of the inputs<br>
will be the same (should be the last cutter output).<br>
<div><div></div><div class="h5"><br>
<br>
On Wed, Nov 3, 2010 at 5:00 AM, nsarrasin &lt;<a href="mailto:nsarrasin@phenix-systems.com">nsarrasin@phenix-systems.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Thanks for your reply,<br>
&gt;<br>
&gt; I followed your advice and used GetOutputPort() but the result stays the<br>
&gt; same.<br>
&gt;<br>
&gt; I post a (light, simple and commented) code which illustrates the problem,<br>
&gt; maybe i&#39;m doing something wrong .<br>
&gt;<br>
&gt; Thanks a lot for helping me.<br>
&gt;<br>
&gt; //slicing of a sphere by a plane. the plane is iteratively rotated all<br>
&gt; around the sphere<br>
&gt;<br>
&gt; #include &lt;vtkSmartPointer.h&gt;<br>
&gt; #include &lt;vtkPolyData.h&gt;<br>
&gt; #include &lt;vtkTransform.h&gt;<br>
&gt; #include &lt;vtkPlane.h&gt;<br>
&gt; #include &lt;vtkCutter.h&gt;<br>
&gt; #include &lt;vtkMath.h&gt;<br>
&gt; #include &lt;vtkAppendPolyData.h&gt;<br>
&gt; #include &lt;vtkPolyDataMapper.h&gt;<br>
&gt; #include &lt;vtkActor.h&gt;<br>
&gt; #include &lt;vtkProperty.h&gt;<br>
&gt; #include &lt;vtkRenderer.h&gt;<br>
&gt; #include &lt;vtkRenderWindow.h&gt;<br>
&gt; #include &lt;vtkRenderWindowInteractor.h&gt;<br>
&gt; #include &lt;vtkSphereSource.h&gt;<br>
&gt; #include &lt;vtkInteractorStyleTrackballCamera.h&gt;<br>
&gt; #include &lt;vector&gt;<br>
&gt;<br>
&gt; int main (int argc, char *argv[])<br>
&gt; {<br>
&gt;        //the object to cut<br>
&gt;        vtkSphereSource* sph = vtkSphereSource::New();<br>
&gt;        sph-&gt;SetRadius(25.);<br>
&gt;        sph-&gt;SetPhiResolution(50.);<br>
&gt;        sph-&gt;SetThetaResolution(50.);<br>
&gt;<br>
&gt;        vtkPolyData *polydata = sph-&gt;GetOutput();<br>
&gt;<br>
&gt;        //init the cutting plane<br>
&gt;        double bounds[6], center[3];<br>
&gt;        polydata-&gt;GetBounds(bounds);<br>
&gt;        polydata-&gt;GetCenter(center);<br>
&gt;<br>
&gt;        vtkPlane* plane = vtkPlane::New();<br>
&gt;        plane-&gt;SetOrigin(center);<br>
&gt;        plane-&gt;SetNormal(bounds[0]-center[0], bounds[2]-center[1], 0.);<br>
&gt;<br>
&gt;        int nbsections = 10;<br>
&gt;        double angle = 360./(double)nbsections;<br>
&gt;        double normal[3]={0,0,1};<br>
&gt;<br>
&gt;        //init the transformation<br>
&gt;        vtkTransform* transf = vtkTransform::New();<br>
&gt;        transf-&gt;RotateWXYZ(angle, normal[0], normal[1], normal[2]);<br>
&gt;<br>
&gt;        vtkMatrix4x4* mat = vtkMatrix4x4::New();<br>
&gt;        transf-&gt;GetMatrix(mat);<br>
&gt;<br>
&gt;        vtkAppendPolyData* appdata = vtkAppendPolyData::New();<br>
&gt;        vtkCutter* cutter = vtkCutter::New();<br>
&gt;        cutter-&gt;SetInput(polydata);<br>
&gt;        cutter-&gt;SetCutFunction(plane);<br>
&gt;<br>
&gt;        double new_normal[4];<br>
&gt;<br>
&gt;        for(int step=0; step&lt;nbsections; step++)<br>
&gt;        {<br>
&gt;                //// Code works but need Update + DeppCopy<br>
&gt;                cutter-&gt;Update();<br>
&gt;                vtkPolyData* tmp_result=vtkPolyData::New();<br>
&gt;                tmp_result-&gt;DeepCopy( cutter-&gt;GetOutput());<br>
&gt;                appdata-&gt;AddInput(tmp_result);<br>
&gt;<br>
&gt;                //// Code doesn&#39;t update though GetOutputPort()<br>
&gt;                //appdata-&gt;AddInputConnection(cutter-&gt;GetOutputPort());<br>
&gt;<br>
&gt;                //rotation of the cutting plane around normal<br>
&gt;                mat-&gt;MultiplyPoint(plane-&gt;GetNormal(), new_normal);<br>
&gt;                plane-&gt;SetNormal(new_normal);<br>
&gt;                plane-&gt;SetOrigin(center);<br>
&gt;        }<br>
&gt;<br>
&gt;        //visualisation<br>
&gt;        //1. All slices<br>
&gt;        vtkSmartPointer&lt;vtkPolyDataMapper&gt; appmapper =<br>
&gt; vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();<br>
&gt;        appmapper-&gt;SetInput(appdata-&gt;GetOutput());<br>
&gt;<br>
&gt;        vtkSmartPointer&lt;vtkActor&gt; appactor = vtkSmartPointer&lt;vtkActor&gt;::New();<br>
&gt;        appactor-&gt;SetMapper(appmapper);<br>
&gt;        appactor-&gt;GetProperty()-&gt;SetColor(1,0,0);<br>
&gt;<br>
&gt;        //2. polydata<br>
&gt;        vtkSmartPointer&lt;vtkPolyDataMapper&gt; teethmapper =<br>
&gt; vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();<br>
&gt;        teethmapper-&gt;SetInput(polydata);<br>
&gt;<br>
&gt;        vtkSmartPointer&lt;vtkActor&gt; teethactor = vtkSmartPointer&lt;vtkActor&gt;::New();<br>
&gt;        teethactor-&gt;SetMapper(teethmapper);<br>
&gt;        teethactor-&gt;GetProperty()-&gt;SetColor(0.8,0.8,0.8);<br>
&gt;<br>
&gt;        // The usual renderer, render window and interactor<br>
&gt;        vtkSmartPointer&lt;vtkRenderer&gt; ren1 =     vtkSmartPointer&lt;vtkRenderer&gt;::New();<br>
&gt;        vtkSmartPointer&lt;vtkRenderWindow&gt; renWin =<br>
&gt; vtkSmartPointer&lt;vtkRenderWindow&gt;::New();<br>
&gt;        vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;      iren =<br>
&gt; vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New();<br>
&gt;<br>
&gt;        ren1-&gt;SetBackground(.1, .2, .3);<br>
&gt;        renWin-&gt;AddRenderer(ren1);<br>
&gt;        iren-&gt;SetRenderWindow(renWin);<br>
&gt;<br>
&gt;        ren1-&gt;AddActor(appactor);<br>
&gt;        ren1-&gt;AddActor(teethactor);<br>
&gt;<br>
&gt;        renWin-&gt;Render();<br>
&gt;        iren-&gt;Start();<br>
&gt; }<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtkCutter-Update-doesn-t-update-the-vtkCutter-GetOutput-tp3246712p3248103.html" target="_blank">http://vtk.1045678.n5.nabble.com/vtkCutter-Update-doesn-t-update-the-vtkCutter-GetOutput-tp3246712p3248103.html</a><br>


&gt; Sent from the VTK - Users mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<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 <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: <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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>Technical Leader<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4920<br>
</div>