--- a/mouse-data/spacenav-hack.xml Tue Sep 03 23:28:46 2019 +0200
+++ b/mouse-data/spacenav-hack.xml Thu Sep 05 01:12:12 2019 +0200
@@ -8,7 +8,54 @@
<text xmlns="http://www.w3.org/1999/xhtml">
<p>
+ There are two ways how the <a href="http://spacenav.sourceforge.net/">Spacenav</a> client (e.g. Blender, OpenSCAD or FreeCAD) and the Spacenav server (Spacenav daemon connected to the 6DoF 3D mouse or our simulator)
+ can reach each other:
</p>
+
+ <ul>
+ <li>unix domain socket</li>
+ <li>X11</li>
+ </ul>
+
+ <p>
+ The client might be compiled with both options (like X11 with fallback to socket interface) or only with one (like X11 only).
+ The server can be configured to provide both interfaces (it needs the <code>~/.Xauthority</code> X11 magic cookie)
+ or only the socket interface (if the cookie is missing).
+ </p>
+
+ <p>
+ If we have socket-only server and X11-only client, we can of course recompile the client or reconfigure the server.
+ Or we can have some fun, hack it in the <code>LD_PRELOAD</code> fashion and translate the socket interface to the X11 one.
+ So we make X11 client talking to the socket server.
+ </p>
+
+ <m:img src="img/spacenavHack-freecad-v0.1.png"/>
+
+ <h2>Build and installation</h2>
+
+ <p>We use the CMake build system, so the steps are basically:</p>
+
+ <pre><![CDATA[mkdir build && cd build && cmake .. && make]]></pre>
+
+ <p>Required libraries:</p>
+
+ <ul>
+ <li>spnav</li>
+ </ul>
+
+ <h2>Usage</h2>
+
+ <p>We just run our favourite CAD with our hackish library preloaded:</p>
+
+ <pre>LD_PRELOAD="./libspnav-lib-hack.so" freecad</pre>
+
+ <p>and it translates the X11 API calls to the socket ones.</p>
+
+ <h2>3DConnexion SpaceMouse Wireless</h2>
+ <p>Our software works with this mouse:</p>
+ <m:img src="img/3DConnexion-SpaceMouse-1.jpeg"/>
+ <m:usb-id/>
+
</text>
</stránka>