3Dconnexion mouse

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: 3Dconnexion mouse

Post by sgrogan »

@wmayer
Thanks for your attention to this!
@ektus
I'll build a snapshot from master as a final verification.
"fight the good fight"
foryou
Posts: 4
Joined: Fri Jan 02, 2015 4:04 pm

Re: 3Dconnexion mouse

Post by foryou »

Hi,
I made some modifications wihin GuiApplicationNativeEventAwareWin32.cpp to add the "3dconnexion space mouse wireless" device support.
I added the 3Dconnexion vendor ID, product ID, extended the strcut tag_VirtualKeys..etc.
The device is recognized now, but not working..
@wmayer: Therefore, can you post/send your source code modifications?
I would like to add them and test the "space mouse wireless" modifications in an Win32 environment.

Thanks
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 3Dconnexion mouse

Post by wmayer »

@wmayer: Therefore, can you post/send your source code modifications?
The actual fix was pretty easy: http://sourceforge.net/p/free-cad/code/ ... ce3248e17/

And in case you need the extra log messages have a look at this:
http://sourceforge.net/p/free-cad/code/ ... b3bd75e73/
http://sourceforge.net/p/free-cad/code/ ... 2776a622c/
User avatar
ektus
Posts: 141
Joined: Sat Sep 22, 2012 6:23 pm
Location: Germany

Re: 3Dconnexion mouse

Post by ektus »

wmayer wrote:
Something isn't quite right: FreeCAD is using 100% CPU time on one core, albeit sitting idle with no model active (test object has been closed).
In the report window do you get a flood of messages there? If yes, this might be the reason for the heavy CPU load.
Nope, only when I move the 3D device. Then I get

Code: Select all

GUIApplicationNativeEventAware::OnRawInput: Handle raw input event
Call of GUIApplicationNativeEventAware::On3dmouseInput()
Event is triggered in foreground
GUIApplicationNativeEventAware::Move3d:
Send motion event to widget: Gui::DockWnd::ReportOutput
motionEvent[0]: 0
motionEvent[1]: 0
motionEvent[2]: 0
motionEvent[3]: 0
motionEvent[4]: 0
motionEvent[5]: 0
I just started it again, and it instantly jumps to 100% CPU.


Regards
Ektus.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: 3Dconnexion mouse

Post by sgrogan »

I don't know if this helps but x32 and x64 snapshots from today's build from master (0.15.4646)
https://www.dropbox.com/sh/rj0idt7yj89d ... RdHca?dl=0
These are scripted builds so they should be the same as the official dev snapshots.
"fight the good fight"
User avatar
ektus
Posts: 141
Joined: Sat Sep 22, 2012 6:23 pm
Location: Germany

Re: 3Dconnexion mouse

Post by ektus »

This last build seems to be working okay in a brief test. Space Mouse is working, CPU load is back to normal, self test finishes without errors but generates some output in the log window:

Code: Select all

Exception (Thu Mar 12 06:17:11 2015): 'SurelyNotInThere!' is not part of the enumeration 
Call from Python thread (not synchronized): count=1
Call from Python thread (not synchronized): count=2
Call from Python thread (not synchronized): count=3
Call from Python thread (not synchronized): count=4
Call from Python thread (not synchronized): count=5
Call from Python thread (not synchronized): count=6
Call from Python thread (not synchronized): count=7
Call from Python thread (not synchronized): count=8
Call from Python thread (not synchronized): count=9
Call from Python thread (not synchronized): count=10
10
   Printing message
   Printing error
   Printing warning
Call from Python thread: count=1
Call from Python thread: count=2
Call from Python thread: count=3
Call from Python thread: count=4
Call from Python thread: count=5
Call from Python thread: count=6
Call from Python thread: count=7
Call from Python thread: count=8
Call from Python thread: count=9
Call from Python thread: count=10
10
Arch workbench activated
Arch workbench deactivated
OpenSCAD executable not found
Draft workbench activated
Draft workbench deactivated
Write mesh to c:\users\ekkehard\appdata\local\temp\mesh.stl
Create mesh instance
Mesh loaded successfully.
Create mesh instance
Mesh loaded successfully.
Create sphere (10.0,160)...
Create sphere (10.0,140)...
... destroy sphere
... destroy sphere
Traceback (most recent call last):
  File "C:\Program Files\FreeCAD_0.15.4646_x64_dev_bin\Mod\Draft\Draft.py", line 4191, in onChanged
    if obj.Length.Value != obj.Shape.Length:
<type 'exceptions.RuntimeError'>: shape is invalid
Entfernen der unterstützenden Skizze um Querverweise zu vermeiden
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4646 (Git)
Branch: master
Hash: 1676c032b9e539d474c210ae153540c8430d5bad
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1


I'm off to work again.

Regards
Ektus.
foryou
Posts: 4
Joined: Fri Jan 02, 2015 4:04 pm

Re: 3Dconnexion mouse

Post by foryou »

Hello,

@wmayer thanks for your support.
The "3dconnexion space mouse wireless" support seems to work (Windows).
May be I need to check if that the code changes have no side effects next.

I made all code changes within GuiApplicationNativeEventAwareWin32.cpp and did this in a privat copy, because I have no experience with Open Source code development.

I interested to propagate the wireless mouse support into FreeCad, but fear the expense of checking in code using the official way. Is there any "recipe" for doing it?

Regards
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 3Dconnexion mouse

Post by wmayer »

I made all code changes within GuiApplicationNativeEventAwareWin32.cpp and did this in a privat copy, because I have no experience with Open Source code development.
It is sufficient to share a patch with the modifications you did. If you don't know how you can upload your complete GuiApplicationNativeEventAwareWin32.cpp file.
foryou
Posts: 4
Joined: Fri Jan 02, 2015 4:04 pm

Re: 3Dconnexion mouse

Post by foryou »

Thanks,

I initiated a pull request at FreeCAD_sf_master (as github user getitzack, foryou was claimed) for the modified GuiApplicationNativeEventAwareWin32.cpp file.
Did some functonal tests before.

Regards
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: 3Dconnexion mouse

Post by shoogen »

git commit 041b8590d5dede102cf5f9414790d006675b186d from git://github.com/getitzack/FreeCAD_sf_master master
Post Reply