View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000818 | FreeCAD | Patch | public | 2012-08-28 13:08 | 2012-09-06 10:12 |
Reporter | pperisin | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.12 | ||||
Fixed in Version | 0.13 | ||||
Summary | 0000818: [PATCH] added new page to "Customize" dialog for space navigator | ||||
Description | Hi, 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. https://dl.dropbox.com/u/36707971/SpNavSettings.wmv Regards Petar | ||||
Additional Information | It 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. Regards, Petar | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
2012-08-28 13:08
|
|
2012-08-30 06:27
|
|
|
ok, new patch added. please do not combine two patches. these two patches are individual, and second one replaces first one. |
|
git show 57b633f |
|
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: http://forum.freecadweb.org/viewtopic.php?f=10&t=2923&p=22585#p22585 |
|
Having tabs instead of space don't make a difference actually. |
|
git show 6b929c7 |
|
Hi, 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. Regards, Petar |
2012-09-03 19:01
|
|
|
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]; importSettings(values); setMotionData(values[0],values[1],values[2],values[3],values[4],values[5]); * 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 |
|
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]; importSettings(values); setMotionData(values[0],values[1],values[2],values[3],values[4],values[5]); do I place this in GuiApplicationNaitiveEventAware.cpp I could call it explicitly from it, and make it to work on current settings like this: GuiApplicationNaitiveEventAware.cpp: 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). Regards, Petar |
2012-09-06 04:03
|
|
|
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? |
|
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
|
|
|
git show 2d172cd |
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 |