[vtk-developers] BUG: Translation mode needs to be set for PlaceWidget to ensure that user setting is passed through.

Michael Jeulinl michael.jeulinl at kitware.com
Wed Oct 19 16:59:08 EDT 2011

Hi Shashwath,

To my mind the fix is could be more global than just being in the
PlaceWidget method. We have to forward the modification as soon as possible
which mean when we set the "*TranslationMode*" within the "*
vtkPointHandleRepresentation3D*"; then as Julien mentionned this fix has
already been proposed in VTK by Chris Kruszynski in 2007 and works well for
this problem. <http://www.vtk.org/Bug/view.php?id=5896>

Furthermore, the patch makes sens with the On/Off maccro which are defined

> virtual void name##On () { this->Set##name(static_cast<type>(1));}
The patch will then be also pass with.

A test has been added to illustrate the illustrate the behavior.

PS: I have also found an other bug when creating the test which is about
setting the vtkProperty of the Handle which is not applying when used
through vtkSeedWidget.
I have add to the vtkHandlePointRepresentation3D the missing(?!) method
DeepCopy which is used by

Please find the published changes here:

Best Regards,
Michael Jeulin-L.

On Wed, Oct 19, 2011 at 10:04 AM, Julien Finet <julien.finet at kitware.com>wrote:

> Hi Shashwath,
> I just wanted to let you know that we are currently looking at the
> issue. We'll keep you posted with any progress we make.
> Please note that someone submitted  a different patch than yours:
> http://www.vtk.org/Bug/view.php?id=5896
> Regards,
> julien.
> On Tue, Oct 18, 2011 at 5:25 AM, Shashwath T.R. <trshash at gmail.com> wrote:
> > Hi all,
> > My colleagues and I found a small bug in vtkPointHandleRepresentation3D,
> > which prevents its behavior from mimicking the behavior of vtkPointWidget
> > from the old widgets hierarchy. Basically, if TranslationMode is set to
> > False from outside, and PlaceWidget is called, the crosshair should be
> > placed at the center of the bounds passed to PlaceWidget. If
> TranslationMode
> > is true, the bounds should be translated to fit around the position.
> > In vtkPointHandleRepresentation3D, the current behavior is that this
> > property is not set to the Cursor3D instance until the first interaction.
> > Thus, it's impossible to set TranslationMode to false (which is our case)
> > before the first interaction. The fix is simple: In PlaceWidget, we
> update
> > the Cursor3D object with the appropriate translation mode.
> > The changes are published
> > here: http://review.source.kitware.com/#change,3106
> > Thanks and Regards,
> > Shash
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtk-developers
> >
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20111019/28385fa5/attachment.html>

More information about the vtk-developers mailing list