[vtkusers] vtkCutter->Update doesn't update the vtkCutter->GetOutput()

Nicolas Sarrasin nsarrasin at phenix-systems.com
Tue Nov 2 11:59:19 EDT 2010


Thanks for your reply,

but i still have the same result.

To force the update I have to use a temporary vtkPolyData with deepcopy 
such as :

for(int step=0; step<nbsteps; step++)
{
        cutter->Update();

        vtkPolyData* tmp = vtkpolyData::New();
        tmp->DeepCopy( cutter->GetOutput() );

        vtkAppendpolyData->AddInput( tmp ); //here it's updated

But it's increase the time of execution and I'd like to optimize it as 
much as possible.

I thought Update() was called everytime GetOutput() was called, isn't it 
the case ?


Le 02/11/2010 15:42, Jothy a écrit :
> I think you need to update the plane "Origin" as well by 
> plane->Setorigin(x,x,x).
>
> Jothy
>
> On Tue, Nov 2, 2010 at 1:35 PM, nsarrasin 
> <nsarrasin at phenix-systems.com <mailto:nsarrasin at phenix-systems.com>> 
> wrote:
>
>
>     Hi all,
>
>     Why the output of vtkCutter isn't update when I do Update()?
>     I always get the same slice (the first to be compute).
>
>
>     cutter->SetInput(polydata);
>     cutter->SetCutFunction(plane);
>
>     for(int step=0; step<nbsteps; step++)
>     {
>            cutter->Update();
>            vtkAppendpolyData->AddInput( cutter->GetOutput() ); //here
>     it's not updated
>     !!!
>
>            //rotation of the plane normal
>            vtkMatrix4x4->MultiplyPoint(plane->GetNormal(), new_normal);
>
>            //update the plane
>            plane->SetNormal(new_normal);
>     }
>
>     Thanks for explaining me.
>
>     --
>     View this message in context:
>     http://vtk.1045678.n5.nabble.com/vtkCutter-Update-doesn-t-update-the-vtkCutter-GetOutput-tp3246712p3246712.html
>     Sent from the VTK - Users mailing list archive at Nabble.com.
>     _______________________________________________
>     Powered by www.kitware.com <http://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
>
>

-- 
------------------------------------------------------------------------
Logo Phenix Systems <www.phenix-systems.com> 	Nicolas Sarrasin - 
Ingénieur Developpement 3D CFAO
Phenix systems <www.phenix-systems.com>
Parc Européen d'Entreprises
rue Richard Wagner - 63200 Riom FRANCE
tel : +33 (0)4 73 33 45 85 | fax : +33 (0)4 73 33 45 86
Pensez environnement !
N'imprimez ce mail que si c'est vraiment nécessaire


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101102/77b2e31b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_contact.gif
Type: image/gif
Size: 2985 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101102/77b2e31b/attachment.gif>


More information about the vtkusers mailing list