[vtkusers] vtkCutter->Update doesn't update the vtkCutter->GetOutput()
Jothy
jothybasu at gmail.com
Tue Nov 2 12:09:25 EDT 2010
Yes, you don't need to call update() everytime.
On Tue, Nov 2, 2010 at 3:59 PM, Nicolas Sarrasin <
nsarrasin at phenix-systems.com> wrote:
> 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>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
>>
>> 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
>>
>
>
> --
> ------------------------------
> [image: Logo Phenix Systems] <http://www.phenix-systems.com> Nicolas
> Sarrasin - Ingénieur Developpement 3D CFAO
> Phenix systems <http://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/cc6ea895/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2985 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101102/cc6ea895/attachment.gif>
More information about the vtkusers
mailing list