point's coordinates changement not applied!!! help

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

point's coordinates changement not applied!!! help

cerina
Good morning vtkUsers,
I tried to change point's coordinates in my mesh by interactionStyle, but this modification wasn't applied!!!
here is my code:
polydata->GetPoints()->SetPoint(1,0.00472708,0.1,-0.000833515 );
 
        polydata->Modified();
        polydata->Update();
       
Any suggestion to resolve this problem pleeease, and thanks.
Regards,
Cerina
Reply | Threaded
Open this post in threaded view
|

Re: point's coordinates changement not applied!!! help

Tasnim
Good morning Cerina,
just you do like this:

polydata->GetPoints()->SetPoint(1,0.00472708,0.1,-0.000833515 );
 polydata->getPoints()->modified();
        polydata->Modified();
        polydata->Update();

Good luck,
Tasnim
Reply | Threaded
Open this post in threaded view
|

Re: point's coordinates changement not applied!!! help

cerina
Tasnim wrote
Good morning Cerina,
just you do like this:

polydata->GetPoints()->SetPoint(1,0.00472708,0.1,-0.000833515 );
 polydata->getPoints()->modified();
        polydata->Modified();
        polydata->Update();

Good luck,
Tasnim
Thanks Tasnim for replying. Finally,this suggestion resolve my problem
Reply | Threaded
Open this post in threaded view
|

Re: point's coordinates changement not applied!!! help

neollie
In reply to this post by Tasnim
Hi Tasnim, 
could I ask you, why polydata->Modified is not enough ?

Thanks
Jana

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: point's coordinates changement not applied!!! help

Tasnim
neollie wrote
Hi Tasnim,
could I ask you, why polydata->Modified is not enough ?

Thanks
Jana
well, i'm not sure if my answer is enough, because i'm newer also in vtk, but i think that the polydata is considered as a tree ( cell, edge, vertex), so in order to modify one of its node ( such vertex), you have to access to it, modify it, then apply the modification on it locally ( polydata->GetPoints()->modified();) then, apply it to the polydata and finally update it, in order to visualize the new mesh

Tasnim