discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Inputdriver on MacOS

TP
Torsten Paul
Sun, Feb 24, 2019 4:56 PM

The tracing is now included and Marius has updated the MacOS
snapshot again, so please give that one a try.

Here's how it is supposed to work:

  • Enable the HIDAPI tracing via Preferences -> Advanced
    At the very bottom there's a new section "Debugging"
    which has only this one option for HIDAPI tracing
  • Restart OpenSCAD so the setting will be effective
  • Open some file (or just use a single cube();) and press
    all buttons and move the mouse into various directions
  • Check the Backup-File folder for a file called hidapi.log
    (The actual folder is shown in the Help->Library Info
    screen as "Backup Path")

If everything goes as planned that file should have some info
similar to the data I get on my system:

HidApiInputDriver::open()
Enumerating HID devices...
D: 256f:c62f | path = 0001:0013:00, serial = <null>, manufacturer = 3Dconnexion, product = SpaceMouse Wireless Receiver
P: 256f:c62f | 0001:0013:00
R: 256f:c62f | <null>
?: 0
Done enumerating (status = ok).
HidApiInputDriver::open(): HidApiInputDriver (256f:c62f - 3Dconnexion Space Mouse Wireless)
R: 13/0d: 01 fd ff 00 00 00 00 00 00 1f 00 00 00
R: 13/0d: 01 f9 ff 00 00 00 00 00 00 27 00 00 00
R: 13/0d: 01 fd ff 02 00 00 00 04 00 1b 00 00 00
R: 13/0d: 01 00 00 05 00 00 00 07 00 0e 00 00 00
R:  3/03: 17 01 00
R: 13/0d: 01 00 00 00 00 00 00 00 00 00 00 04 00
R: 13/0d: 01 00 00 00 00 00 00 00 00 00 00 10 00

The first part is the device enumeration info, after that
it just dumps the data coming in when using the mouse.

ciao,
Torsten.

The tracing is now included and Marius has updated the MacOS snapshot again, so please give that one a try. Here's how it is supposed to work: - Enable the HIDAPI tracing via Preferences -> Advanced At the very bottom there's a new section "Debugging" which has only this one option for HIDAPI tracing - Restart OpenSCAD so the setting will be effective - Open some file (or just use a single cube();) and press all buttons and move the mouse into various directions - Check the Backup-File folder for a file called hidapi.log (The actual folder is shown in the Help->Library Info screen as "Backup Path") If everything goes as planned that file should have some info similar to the data I get on my system: HidApiInputDriver::open() Enumerating HID devices... D: 256f:c62f | path = 0001:0013:00, serial = <null>, manufacturer = 3Dconnexion, product = SpaceMouse Wireless Receiver P: 256f:c62f | 0001:0013:00 R: 256f:c62f | <null> ?: 0 Done enumerating (status = ok). HidApiInputDriver::open(): HidApiInputDriver (256f:c62f - 3Dconnexion Space Mouse Wireless) R: 13/0d: 01 fd ff 00 00 00 00 00 00 1f 00 00 00 R: 13/0d: 01 f9 ff 00 00 00 00 00 00 27 00 00 00 R: 13/0d: 01 fd ff 02 00 00 00 04 00 1b 00 00 00 R: 13/0d: 01 00 00 05 00 00 00 07 00 0e 00 00 00 R: 3/03: 17 01 00 R: 13/0d: 01 00 00 00 00 00 00 00 00 00 00 04 00 R: 13/0d: 01 00 00 00 00 00 00 00 00 00 00 10 00 The first part is the device enumeration info, after that it just dumps the data coming in when using the mouse. ciao, Torsten.
DA
D. A. Karp
Sun, Feb 24, 2019 11:08 PM

Terrific - thanks. I've attached hidapi.log:

On Feb 24, 2019, at 8:56 AM, Torsten Paul wrote:

The tracing is now included and Marius has updated the MacOS
snapshot again, so please give that one a try.

Here's how it is supposed to work:

  • Enable the HIDAPI tracing via Preferences -> Advanced
    At the very bottom there's a new section "Debugging"
    which has only this one option for HIDAPI tracing
  • Restart OpenSCAD so the setting will be effective
  • Open some file (or just use a single cube();) and press
    all buttons and move the mouse into various directions
  • Check the Backup-File folder for a file called hidapi.log
    (The actual folder is shown in the Help->Library Info
    screen as "Backup Path")

If everything goes as planned that file should have some info
similar to the data I get on my system:

The first part is the device enumeration info, after that
it just dumps the data coming in when using the mouse.

ciao,
Torsten.

Terrific - thanks. I've attached hidapi.log: > On Feb 24, 2019, at 8:56 AM, Torsten Paul wrote: > > The tracing is now included and Marius has updated the MacOS > snapshot again, so please give that one a try. > > Here's how it is supposed to work: > > - Enable the HIDAPI tracing via Preferences -> Advanced > At the very bottom there's a new section "Debugging" > which has only this one option for HIDAPI tracing > - Restart OpenSCAD so the setting will be effective > - Open some file (or just use a single cube();) and press > all buttons and move the mouse into various directions > - Check the Backup-File folder for a file called hidapi.log > (The actual folder is shown in the Help->Library Info > screen as "Backup Path") > > If everything goes as planned that file should have some info > similar to the data I get on my system: > > > The first part is the device enumeration info, after that > it just dumps the data coming in when using the mouse. > > ciao, > Torsten. >
TP
Torsten Paul
Sun, Feb 24, 2019 11:27 PM

On 25.02.19 00:08, D. A. Karp wrote:

Terrific - thanks. I've attached hidapi.log

Nice, thanks. Actually that looks promising, the 7 byte
long sequences seem to match one of the ways of handling
the data we already have implemented, so maybe it's just
a matter of switching to that.

I may have some time tomorrow to have a closer look. It
would be great to enable support for this device too.

ciao,
Torsten.

On 25.02.19 00:08, D. A. Karp wrote: > Terrific - thanks. I've attached hidapi.log Nice, thanks. Actually that looks promising, the 7 byte long sequences seem to match one of the ways of handling the data we already have implemented, so maybe it's just a matter of switching to that. I may have some time tomorrow to have a closer look. It would be great to enable support for this device too. ciao, Torsten.
MF
Michael Frey
Mon, Feb 25, 2019 7:07 PM

On 20.02.19 22:16, Hans L wrote:

I haven't tried the input devices stuff personally, but I think if you
just make sure your user is added to the group "input" , it should
work without requiring sudo

adduser USER GROUP

That was the right track, thank you for that, but not the the complete
picture.

For those interested:

For ubuntu 18.10 this here
https://stackoverflow.com/questions/3738173/why-does-pyusb-libusb-require-root-sudo-permissions-on-linux/32022908#32022908
worked, after off-course adjusting it for the device in question.

With kind regards,

Michael Frey

On 20.02.19 22:16, Hans L wrote: > I haven't tried the input devices stuff personally, but I think if you > just make sure your user is added to the group "input" , it should > work without requiring sudo > > adduser USER GROUP That was the right track, thank you for that, but not the the complete picture. For those interested: For ubuntu 18.10 this here https://stackoverflow.com/questions/3738173/why-does-pyusb-libusb-require-root-sudo-permissions-on-linux/32022908#32022908 worked, after off-course adjusting it for the device in question. With kind regards, Michael Frey
DA
D. A. Karp
Mon, Mar 4, 2019 2:27 AM

Quick update - just installed OpenSCAD 2019.03.03, and my SpaceMouse Compact works perfectly on MacOS. Didn't have to do a thing apart from enabling the HIDAPI option. Thanks so much team!

Quick update - just installed OpenSCAD 2019.03.03, and my SpaceMouse Compact works perfectly on MacOS. Didn't have to do a thing apart from enabling the HIDAPI option. Thanks so much team!
DA
D. A. Karp
Mon, Mar 4, 2019 7:16 PM

Now that I've got my SpaceMouse working with OpenSCAD, I've noticed that the translation is absolute. That is, if I rotate the model 180 degrees about the Z axis, then the left-right translation is backwards. Is there any way to to use relative translation so left is always left?

Now that I've got my SpaceMouse working with OpenSCAD, I've noticed that the translation is absolute. That is, if I rotate the model 180 degrees about the Z axis, then the left-right translation is backwards. Is there any way to to use relative translation so left is always left?
MF
Michael Frey
Tue, Mar 5, 2019 4:58 PM

On 04.03.19 20:16, D. A. Karp wrote:

Now that I've got my SpaceMouse working with OpenSCAD, I've noticed that the translation is absolute. That is, if I rotate the model 180 degrees about the Z axis, then the left-right translation is backwards. Is there any way to to use relative translation so left is always left?


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Sure. Go to the preferences, copy the axis settings from translation to
"viewport rel. translation"

then set the translation to none.

If the rotation also feels wrong, you can also try viewport relative
rotation:

Note: I am not useing a 3D mice (I use various Game Pads under linux),
so try what axis mapping feels natural for you.

Also note that you can use the axis inverted, if the axis "feels" inverted.

with kind regards,

Michael Frey

On 04.03.19 20:16, D. A. Karp wrote: > Now that I've got my SpaceMouse working with OpenSCAD, I've noticed that the translation is absolute. That is, if I rotate the model 180 degrees about the Z axis, then the left-right translation is backwards. Is there any way to to use relative translation so left is always left? > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > Sure. Go to the preferences, copy the axis settings from translation to "viewport rel. translation" then set the translation to none. If the rotation also feels wrong, you can also try viewport relative rotation: Note: I am not useing a 3D mice (I use various Game Pads under linux), so try what axis mapping feels natural for you. Also note that you can use the axis inverted, if the axis "feels" inverted. with kind regards, Michael Frey
DA
D. A. Karp
Sat, Mar 9, 2019 7:44 PM

Thanks - just tried it on  2019.03.03 (MacOS). The rotation seems to behave as expected, but the translation is totally dead. (The blue Axis Setup bars still react to translation gestures however.) Any suggestions?

On Mar 5, 2019, at 8:58 AM, Michael Frey michael.frey@gmx.ch wrote:

Sure. Go to the preferences, copy the axis settings from translation to "viewport rel. translation"
then set the translation to none.

<ibjdgpclmpnaclea.png>

If the rotation also feels wrong, you can also try viewport relative rotation:

<lhogeicecmgjncci.png>

Note: I am not useing a 3D mice (I use various Game Pads under linux), so try what axis mapping feels natural for you.

Also note that you can use the axis inverted, if the axis "feels" inverted.

with kind regards,

Michael Frey

Thanks - just tried it on 2019.03.03 (MacOS). The rotation seems to behave as expected, but the translation is totally dead. (The blue Axis Setup bars still react to translation gestures however.) Any suggestions? > On Mar 5, 2019, at 8:58 AM, Michael Frey <michael.frey@gmx.ch> wrote: > > Sure. Go to the preferences, copy the axis settings from translation to "viewport rel. translation" > then set the translation to none. > > <ibjdgpclmpnaclea.png> > > If the rotation also feels wrong, you can also try viewport relative rotation: > > <lhogeicecmgjncci.png> > > Note: I am not useing a 3D mice (I use various Game Pads under linux), so try what axis mapping feels natural for you. > > Also note that you can use the axis inverted, if the axis "feels" inverted. > > > > with kind regards, > > Michael Frey