5 Replies Latest reply on Mar 4, 2016 7:23 AM by Brad Phelan

    Temporary body won't redraw when using ApplyTransform within ManipulatorHandler.

    Brad Phelan

      I have a class implementing the triad manipulator callbacks. I successfully create the triad and get the callbacks.

       

      public class ManipulatorHandler : SwManipulatorHandler2

       

              <snip>

       

              public override bool OnDoubleValueChanged(object pManipulator, int handleIndex, ref double Value)

              {

           

                  var xAxis = (MathVector)_Math.CreateVector(new[] {1, 0, 0});

                  var yAxis = (MathVector)_Math.CreateVector(new[] {0, 1, 0});

                  var zAxis = (MathVector)_Math.CreateVector(new[] {0, 0, 1});

                  var value = Value;

                  var translate =(MathVector)_Math.CreateVector(new[] {handleIndex == 1 ? value : 0, handleIndex == 2 ? value : 0, handleIndex == 3 ? value : 0});

                  var transform = _Math.ComposeTransform(xAxis, yAxis, zAxis, translate,1);

                  if(!Body.ApplyTransform(transform))

                      throw new Exception("Unable to shift");

              

                  IModelView view = ((IModelView)_ModelDoc.ActiveView);

       

                  view.GraphicsRedraw(null);

                

                  return true;

              }

       

              <snip>

       

       

          };

       

      However the body does not redraw. The temporary body has been previously inserted when the manipulator was created and even though the body is transformed it maintains it's original inserted position in the view. Any ideas?