XML for Cura rotation

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
RsX
Posts: 2
Joined: Wed Apr 11, 2018 11:42 am

XML for Cura rotation

Post by RsX »

Hi all,
i just wanted to share what i've written to use the Space Navigator in Cura
It just controls zoom and rotations with arrows and +/-
maybe with your help it will also be possible to pan around the model, that would be awsome :D

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!--
(c) Copyright 3Dconnexion. All rights reserved. 
$Revision: 14618 $
-->
<AppCfg Default="true" xmlns="" CfgFormatVersion="1.2" ThisFileVersion="1.8">
  <AppInfo>
    <Signature>
      <Name>Cura</Name>
      <ExecutableName>cura.EXE</ExecutableName>
      <Transport>KMJ</Transport>
    </Signature>
  </AppInfo>
  <AuthorInfo>
    <DriverVersion>17.5.5</DriverVersion>
    <Created>
      <Tool>3DxService.exe</Tool>
      <Version>17.5.5</Version>
      <Date>2017:11:2:28:10:58:11:745</Date>
      <User>3DxCfgAdmin</User>
    </Created>
  </AuthorInfo>
  <Settings>
    <ResponseCurve>1.00</ResponseCurve>
    <!--<OverallScale>0.68</OverallScale>-->
  </Settings>
  <Devices>
    <Device>
      <Name>Standard 3D Mouse</Name>
      <VendorID>0</VendorID>
      <ProductID>0</ProductID>
      <AxisFilter>None</AxisFilter>
      <CurrentButtonBank>Default</CurrentButtonBank>
      <CurrentAxisBank>Default</CurrentAxisBank>
      <AxisBank Default="true">
        <Name>STR_DEFAULT_BANK</Name>
        <ID>Default</ID>
	  <!--zoom-->
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Y</ActionID>
          <Min>0</Min>
          <Max>511</Max>
          <Deadband>200</Deadband>
        </Input>
        <Output>
          <ActionID>KB_Keystroke</ActionID>
          <RepeatStyle>Auto</RepeatStyle>
          <MaxEventRate>30.00</MaxEventRate>
          <KeyStroke>
            <Key>56</Key><!--avanti-->
          </KeyStroke>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Y</ActionID>
          <Min>-512</Min>
          <Max>0</Max>
          <Deadband>200</Deadband>
        </Input>
        <Output>
          <ActionID>KB_Keystroke</ActionID>
          <RepeatStyle>Auto</RepeatStyle>
          <MaxEventRate>30.00</MaxEventRate>
          <KeyStroke>
            <Key>57</Key><!--indietro-->
          </KeyStroke>
        </Output>
      </Axis>
	  <!--rotazione X-->
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Rx</ActionID>
          <Min>0</Min>
          <Max>511</Max>
          <Deadband>10</Deadband>
        </Input>
        <Output>
          <ActionID>KB_Keystroke</ActionID>
          <RepeatStyle>Auto</RepeatStyle>
          <MaxEventRate>30.00</MaxEventRate>
          <KeyStroke>
            <Key>52</Key><!--avanti-->
          </KeyStroke>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Rx</ActionID>
          <Min>-512</Min>
          <Max>0</Max>
          <Deadband>10</Deadband>
        </Input>
        <Output>
          <ActionID>KB_Keystroke</ActionID>
          <RepeatStyle>Auto</RepeatStyle>
          <MaxEventRate>30.00</MaxEventRate>
          <KeyStroke>
            <Key>51</Key><!--indietro-->
          </KeyStroke>
        </Output>
      </Axis>
	  <!--rotazione Z-->
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Rz</ActionID>
          <Min>0</Min>
          <Max>511</Max>
          <Deadband>10</Deadband>
        </Input>
        <Output>
          <ActionID>KB_Keystroke</ActionID>
          <RepeatStyle>Auto</RepeatStyle>
          <MaxEventRate>30.00</MaxEventRate>
          <KeyStroke>
            <Key>4F</Key><!--orario-->
          </KeyStroke>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Rz</ActionID>
          <Min>-512</Min>
          <Max>0</Max>
          <Deadband>10</Deadband>
        </Input>
        <Output>
          <ActionID>KB_Keystroke</ActionID>
          <RepeatStyle>Auto</RepeatStyle>
          <MaxEventRate>30.00</MaxEventRate>
          <KeyStroke>
            <Key>50</Key><!--anti-orario-->
          </KeyStroke>
        </Output>
      </Axis>
      </AxisBank>
      <ButtonBank Default="true">
        <Name>STR_DEFAULT_BUTTONBANK</Name>
        <ID>Default</ID>
      </ButtonBank>
    </Device>
    <Device>
      <Name>Standard 2D Mouse</Name>
      <VendorID>0</VendorID>
      <ProductID>0</ProductID>
      <ButtonBank Default="true">
        <Name>STR_DEFAULT_BUTTONBANK</Name>
        <ID>Default</ID>
      </ButtonBank>
    </Device>
  </Devices>
</AppCfg>
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: XML for Cura rotation

Post by jwick »

I don't know the application, but a lot of the time holding down a mouse button with or without a modifier key can do panning.
teos81
Posts: 7
Joined: Thu Mar 07, 2019 7:03 pm

Re: XML for Cura rotation

Post by teos81 »

Hi,
I'm working into a similar application like Cura..
As you wrote Jwick i need exactly the mouse button down with the mouse movement for pan and tilt..
I have search for some wiki or doc that explain how to do macro or explain the xml.. but dind't find any..

Could you please tell me how to add to a macro that do a
<MouseButton>Left</MouseButton> and <ActionID>HIDMouse_X</ActionID> as output for a <Input> of <ActionID>HIDMultiAxis_Ry</ActionID> ??

Thanks a lot and sorry if it's a stupid question.. But i got mad to find some documentation.... :(
Why you dind't wrote a miny howto or at least some basic info for the xml file??

Bye
Matteo
Post Reply