View Issue Details

IDProjectCategoryView StatusLast Update
0000818FreeCADPatchpublic2012-09-06 10:12
Reporterpperisin Assigned To 
Status closedResolutionfixed 
Product Version0.12 
Fixed in Version0.13 
Summary0000818: [PATCH] added new page to "Customize" dialog for space navigator

I have created new page in "Customize" dialog that handles space navigator options, because our events on win and Linux override drivers and do not apply same settings from 3D Connexion panel.

Here is the small video of how it looks. Note that it is laggy video, in real it works nicely.

Additional InformationIt should work on all platforms.

One small favor, if I may. I do not like rushing things, but I would appreciate if this could be merged soon, because I have access to space navigator in my current company and I am leaving for new job on October 1st. After that I have no chance to do any debugging on this.

TagsNo tags attached.
FreeCAD Information


2012-08-28 13:08


0001-Added-new-Customize-page-for-space-navigator-setting.patch (Attachment missing)

2012-08-30 06:27


0001-Added-new-Customize-page-for-space-navigator.patch (Attachment missing)


2012-08-30 06:28

reporter   ~0002329

ok, new patch added. please do not combine two patches. these two patches are individual, and second one replaces first one.


2012-08-30 07:41

administrator   ~0002330

git show 57b633f


2012-08-30 10:28

reporter   ~0002331

I was having small issue with CMakeLists.txt. It had tabs instead of spaces in it. So on win it did not compile.

new CMakeLists.txt is here:


2012-08-31 09:09

administrator   ~0002334

Having tabs instead of space don't make a difference actually.


2012-08-31 09:15

administrator   ~0002335

git show 6b929c7


2012-09-03 19:01

reporter   ~0002339


I have fixed some bugs that slipped through. I have also fixed settings on Ubuntu, so that default settings are same on ubuntu and on win.

This patch should be applied to the current master.


2012-09-03 19:01


0001-Fixed-some-Space-Navigator-bugs-and-modified-setting.patch (Attachment missing)


2012-09-05 10:24

administrator   ~0002343

Before applying this patch there should be fixed a couple of issues of your previous patch which I didn't realize before:

* copy constructor of MotionEvent uses importSettings() which however can lead to ugly side effects. Here the original behaviour should be restored because that's the way how copy constructors should work (OK your new patch fixes this again)

* MotionEvent::setMotionData() from your previous patch has a confusing semantic. It might be more logical and cleaner if importSettings() doesn't change any value but only returns the values from the preferences and that setMotionData() sets them directly.
So, the code could look like this:
void setMotionData(int xTrans, int yTrans, int zTrans, int xRot, int yRot, int zRot)
    this->xTrans = xTrans;
    this->yTrans = yTrans;
    this->zTrans = zTrans;
    this->xRot = xRot;
    this->yRot = yRot;
    this->zRot = zRot;

and to set it do it like this:
int values[6];

* MotionEvent::setTranslations() I think this should not call importSettings() because it makes the method not the behave the way it should

* MotionEvent::setRotations() see above


2012-09-05 11:11

reporter   ~0002345

Last edited: 2012-09-05 12:35

thanks for review

I was having issues with SetMotionData - because one of the options there is "Dominant" and to use it correctly I need all 6 dof.

I was passing it with array because it seemed faster to pass it by reference. If I set them like that, I do not understanw here do I need to place this part of code:

-int values[6];

do I place this in GuiApplicationNaitiveEventAware.cpp

I could call it explicitly from it, and make it to work on current settings like this:


Spaceball::MotionEvent *motionEvent = new Spaceball::MotionEvent();
motionEvent->setTranslations(navEvent.motion.x, navEvent.motion.y, navEvent.motion.z);
motionEvent->setRotations(navEvent.motion.rx, navEvent.motion.ry, navEvent.motion.rz);
motionEvent->importSettings(); // I should probably rename it to ImportPreferences

This would then import already set rotations and translations in an array, and apply preferences settings to it - would it be ok (SetMotionData could be removed).


2012-09-06 04:03


0002-further-bugfixes.patch (Attachment missing)


2012-09-06 04:06

reporter   ~0002349

Ok, so here is the second patch. this one needs to be applied to the one before it - so it is a diff file after 0001-Fixed-some-Space-Navigator-bugs-and-modified-setting.patch is applied

After I made it, I have had the idea of moving importSettings method from SpaceballEvent.cpp to GuiApplicationNaitiveEventAware.cpp - I think it would be a good idea to apply settings (do importSettings) in that class - what do you think?


2012-09-06 06:43

reporter   ~0002350

ok, so here is the third patch - this one moves importsettings to GuiApplicationNaitiveEventAware, and it should be applied after second patch.

2012-09-06 06:44


0003-reorganized-spnav-and-moved-importsettings-to-guiApp.patch (Attachment missing)


2012-09-06 10:12

administrator   ~0002352

git show 2d172cd

Issue History

Date Modified Username Field Change
2012-08-28 13:08 pperisin New Issue
2012-08-28 13:08 pperisin File Added: 0001-Added-new-Customize-page-for-space-navigator-setting.patch
2012-08-30 06:27 pperisin File Added: 0001-Added-new-Customize-page-for-space-navigator.patch
2012-08-30 06:28 pperisin Note Added: 0002329
2012-08-30 07:41 wmayer Note Added: 0002330
2012-08-30 07:41 wmayer Status new => closed
2012-08-30 07:41 wmayer Resolution open => fixed
2012-08-30 07:41 wmayer Fixed in Version => 0.13
2012-08-30 10:28 pperisin Note Added: 0002331
2012-08-30 10:28 pperisin Status closed => feedback
2012-08-30 10:28 pperisin Resolution fixed => reopened
2012-08-31 09:09 wmayer Note Added: 0002334
2012-08-31 09:15 wmayer Note Added: 0002335
2012-08-31 09:15 wmayer Status feedback => closed
2012-08-31 09:15 wmayer Resolution reopened => fixed
2012-09-03 19:01 pperisin Note Added: 0002339
2012-09-03 19:01 pperisin Status closed => feedback
2012-09-03 19:01 pperisin Resolution fixed => reopened
2012-09-03 19:01 pperisin File Added: 0001-Fixed-some-Space-Navigator-bugs-and-modified-setting.patch
2012-09-05 10:24 wmayer Note Added: 0002343
2012-09-05 11:11 pperisin Note Added: 0002345
2012-09-05 12:35 pperisin Note Edited: 0002345
2012-09-06 04:03 pperisin File Added: 0002-further-bugfixes.patch
2012-09-06 04:06 pperisin Note Added: 0002349
2012-09-06 06:43 pperisin Note Added: 0002350
2012-09-06 06:44 pperisin File Added: 0003-reorganized-spnav-and-moved-importsettings-to-guiApp.patch
2012-09-06 10:12 wmayer Note Added: 0002352
2012-09-06 10:12 wmayer Status feedback => closed
2012-09-06 10:12 wmayer Resolution reopened => fixed