1

I've been trying to add the Combined Manipulator to my model but Nothing seems to work, I use the Bind method to attached it but it doesn't show up.

Hope you can help me out.

public Impresion()
    {
        InitializeComponent();
        ModelVisual3D device3D = new ModelVisual3D();
        device3D.Content = Display3d(MODEL_PATH);            

        CombinedManipulator manipulator = new CombinedManipulator();
        manipulator.Bind(device3D);
        viewPort3d.Children.Add(device3D);

    }

1 Answers1

0

you are using it right,however you need to specify additional information - you need to enable the transformations that a manipulator can perform , there is a bool property for each transformation (translation and rotation) on each plane(x,y,z) you need to enable the required transformations (CanTranslateX,....) - set the diameter of the manipulator

  • Thanks. I add the following but it displays the manipulator very far from the model that I load. Also it doesn't work. Hope you can help me. CombinedManipulator manipulator = new CombinedManipulator(); manipulator.CanRotateX = true; manipulator.CanRotateY = true; manipulator.CanRotateZ = true; manipulator.Bind(device3D); viewPort3d.Children.Add(manipulator); viewPort3d.Children.Add(device3D); I'm missing something? – Alfonso José Cabrera López Feb 19 '16 at 23:51
  • No , it the same I use ( in addition to specifying a diameter) are you sure you are not moving the "device3D" using its Position property? – Issa Mouawad Feb 21 '16 at 16:44
  • Thanks. I think that is the problem. But I really don't know where to add the manipulator. [link] (http://pastebin.com/aCZqMJpa) Here is my code and here is my xaml code. [link] (http://pastebin.com/KXPRi8KL) – Alfonso José Cabrera López Feb 22 '16 at 17:26
  • you probably shouldn't place that code in the constructor of the window, you should rather put it on the (Load) event, during the constructor the Window object is initialized, but it is not rendered to the displaying device until page load is called ,try putting the code in the (Load) event handler or on any button handler, and It will work hopefully – Issa Mouawad Feb 22 '16 at 17:52
  • Hi Issa, I changed the code and moved it to a boton event click, it displays the combined manipulator but I can't move the model. What I'm doing wrong? http://pastebin.com/aCZqMJpa – Alfonso José Cabrera López Feb 22 '16 at 23:53