FreeCAD / FreeCAD-Bundle

Stand-alone repo to Build and Deploy installable FreeCAD images. Do not open general FreeCAD issues here.
https://freecad.org
GNU Lesser General Public License v2.1
321 stars 64 forks source link

Support for newer 3DConnexion Devices in MacOS #146

Closed steffenxx closed 8 months ago

steffenxx commented 1 year ago

Apparently there is no 3DConnexion support implemented in the ARM version like in the x86 version. Is this planned?

luzpaz commented 1 year ago

Please open discussion on the forum and x-post back here

steffenxx commented 1 year ago

https://forum.freecadweb.org/viewtopic.php?f=3&t=74534

steffenxx commented 1 year ago

I have already opened a discussion on 17 Dec. (See link) Unfortunately, so far without success.

adrianinsaval commented 1 year ago

for clarity this issue is in relation to the macOS arm version, in the forum @looooo mentioned that we needed a download link for an ARM driver, looking here: https://3dconnexion.com/us/wp-content/uploads/sites/27/2023/01/Release_Notes-Mac-20230109.pdf it seems they have ARM support since January 2022, from version 10.7.0 if I'm reading it correctly, currently we are using the older 10.6.6 so it might work by just switching to the latest release: https://download.3dconnexion.com/drivers/mac/10-7-4_C5CD2A0D-58B6-4A8F-AFD1-54D5EB1BD29C/3DxWareMac_v10-7-4_r3493.dmg

they don't mention separate files for each architecture in their download page so I think the same bundle includes both (I've heard this is possible in macOS)

steffenxx commented 1 year ago

I have been struggling with this problem for much longer and unfortunately there is no continuous development of FreeCAD in terms of 3DConnexion support. Maybe there are not enough Mac users with such devices.

The current, very unsatisfactory state is that: The only working combination of 3DConnexion driver and FreeCAD is the driver version v10.7.0 and FreeCAD for x86 MAC. All older and newer drivers do not work with the current FreeCAD MAC x86 builds either.

With FreeCAD for ARM, I have not been able to get the SpaceMouse to work with any driver version from 3DConnexion. Not even with the new one from his post.

I think this is totally crazy, the only working driver is the beta driver v10.7.0 that was available after the release of BigSur. At that time all older drivers could not be installed under BigSur.

adrianinsaval commented 1 year ago

It's not about you updating the driver, we need the correct driver at compile time

Maybe there are not enough Mac users with such devices.

More importantly, there aren't many developers using macOS to begin with then I don't know of someone using 3d mouse plus they'll have to ve using arm... It's a very niche case @chennes do you happen to have a 3d mouse to try and get it working on your Mac?

steffenxx commented 1 year ago

I understand that. Since Apple no longer builds x86 Macs, the ARM version will become more and more important in the future. Is there anything I can do to help ?

adrianinsaval commented 1 year ago

Can you confirm that the link I posted contains a driver for the ARM architecture too? Are you able to build FreeCAD in your machine in order to test it?

chennes commented 1 year ago

I don't own one, but TBH I have been pondering their merits for some time. Maybe this can be my excuse 😄 . Which one should I get?

steffenxx commented 1 year ago

I use the Space Mouse Wireless and the CAD Mouse Wireless. There was once a bundle to buy. I find the handling of the devices very good.

steffenxx commented 1 year ago

Can you confirm that the link I posted contains a driver for the ARM architecture too? Are you able to build FreeCAD in your machine in order to test it?

The release notes do not explicitly mention the ARM architecture. There is only a reference to the macOS version and the supported devices. But I can say that all versions since 10.7.0 basically run on MAC Studio and are supported by products like Prusa Slicer.

I do not have a development environment installed. What would I need to create a FreeCad build?

adrianinsaval commented 1 year ago

Hard for me to answer since I'm not a mac user, in the interest of testing as closely to our packaging environment it would be ideal for you to build on a conda environment, perhaps looo can provide better instructions. My understanding is that you need to install conda, then create an environment for FreeCAD, install all it's dependencies and then you can build it inside that environment. Have look at https://wiki.freecad.org/Conda and here: https://github.com/looooo/freecad-feedstock/blob/d5cb2fd87de08e5b29b2ab4cd07448cefb6d898a/recipe/meta.yaml#L50-L95 for the dependencies and here: https://github.com/looooo/freecad-feedstock/blob/development/recipe/build.sh for a reference on building it, you would need to adapt the download link for the driver and remove the if statement that makes that exclusively used on intel architecture

looooo commented 1 year ago

if you want to build freecad locally and want to test things it's best to use conda debug. So you first get the freecad-feedstock repo, then you cd into the feedstock repo and call conda debug . -m .ci_support/osx_arm64_python3.11.____cpython.yaml. At the end of this step there are some commands printed which you have to copy and paste to activate the build-env. Once the build env is activated you can call the script to build freecad (bash conda_build.sh)

if you want to use your own branch you need to change the directory in the conda_build.sh file.

steffenxx commented 1 year ago

Thanks for the tips. I'm afraid this is a bit beyond what I can do, not being a developer myself. I was hoping that 3DConnexion support could be implemented in the ARM version in the same way as it is already in the x86 macOS. I currently have both versions on my Mac. With the current x86 version the SpaceMouse works, with the latest ARM version not at all. I wonder what I would have to do if I were to install the development environment on my machine? I would not be able to build the 3DConnexion support myself. My offer of help was rather aimed at that I would test versions if necessary. I would also donate a few EUR's via PayPal to a developer if he buys the devices and builds a full ARM version.

chennes commented 1 year ago

I've ordered one, it should get here this week. I don't know if I'll get a chance to work on this before FreeCAD Day/FOSDEM, though, so there will be a bit of a delay.

looooo commented 1 year ago

hey @chennes, I will be also at FOSDEM, maybe we can work on this if there is some time.

chennes commented 1 year ago

@looooo do you have an ARM laptop? Mine is a desktop, so though I could bring the SpaceMouse, I can't easily bring the M1 :).

looooo commented 1 year ago

Yes I have a M1 laptop which I bring with me.

steffenxx commented 1 year ago

Is there already anything new ? :-)

chennes commented 1 year ago

Well, I now have a SpaceMouse sitting next to my M2 laptop... I have the driver installed, but have not yet had a chance to see why it doesn't work in FreeCAD.

steffenxx commented 1 year ago

It is already good that my problem can be reproduced. As I wrote above, my last working combination of driver and FreeCAD on macOS is FreeCAD for x86 and the old driver version V10.7.0.

chennes commented 1 year ago

Are you self-compiled, or using one of the pre-built binaries?

steffenxx commented 1 year ago

I use the binaries from this site.

chennes commented 1 year ago

It's very strange, all of the setup code is working fine, we are making connection to the 3DConnexion daemon and connecting to its events, but the function that is supposed to be getting called just never is. I tried to take a look at how PrusaSlicer does it, but they use a totally different technique, apparently not using the 3DConnexion API at all (??).

chennes commented 1 year ago

Well, the good news is that it can be made to work: I have a functional self-compiled spacemouse-enabled version on my M2 right not. The bad news is, I don't know why it's not working on the downloadable bundle. @looooo any clue here?

adrianinsaval commented 1 year ago

as I understand it the current conda build script is completely skipping building this for arm right now: https://github.com/looooo/freecad-feedstock/blob/b749bd16e65e7caac430aa88699464e693bfc206/recipe/build.sh#L26-L47

the script has to be updated to download the newer driver and compile this stuff for arm too

steffenxx commented 1 year ago

Well, the good news is that it can be made to work: I have a functional self-compiled spacemouse-enabled version on my M2 right not. The bad news is, I don't know why it's not working on the downloadable bundle. @looooo any clue here?

But it sounds like there will be a downloadable solution for an ARM version with 3DConnexion support soon. Great :-)

looooo commented 1 year ago

does anyone know which version is osx-arm compatible? https://3dconnexion.com/de/archived-drivers/

chennes commented 1 year ago

I was able to use the latest version from their website, 10.7.4, on my M2.

steffenxx commented 1 year ago

Well, the good news is that it can be made to work: I have a functional self-compiled spacemouse-enabled version on my M2 right not. The bad news is, I don't know why it's not working on the downloadable bundle. @looooo any clue here?

Would it be possible for you to provide me with your working version? It would make me very happy.

I like FreeCAD very much, but I also like my MAC. I am a bit disappointed that the last x86 version was updated 2 days ago and the ARM version was last updated on Jan 7.. Apple Silicon processors are the new standard for MAC's I hope FreeCAD will soon be maintained for the ARM processor by default.

adrianinsaval commented 1 year ago

unfortunately the infrastructure is not in place so that we can easily make regular arm releases as we do for other platforms, AFAIK the CI services we use still don't provide mac arm environments.

steffenxx commented 1 year ago

unfortunately the infrastructure is not in place so that we can easily make regular arm releases as we do for other platforms, AFAIK the CI services we use still don't provide mac arm environments.

Okay, I understand that. The number of ARM users will probably increase steadily and I really don't want to have to switch to another CAD software just because I have a modern computer. ;-)

chennes commented 1 year ago

I have no idea if my builds are portable (I don't do any packaging). Can I just zip up my build directory?

luzpaz commented 1 year ago

Aside: https://github.com/FreeCAD/FreeCAD-snap/issues/9 ARM builds for Snap packages (this is still a WIP)

adrianinsaval commented 1 year ago

I suggest renaming this issue to make it clear it is about MacOS and not arm in general...

Kurdie2023 commented 1 year ago

Are there any news regarding this topic? I use Freecad on a macbook pro m1 with 3d connexion driver 3.7.4 without success. With the driver 3.7.0 the body moves, but only in one direction, independent which axis I push.

Thanks!!

fpetzold commented 1 year ago

Besides having no luck using my SpaceMouse with the ARM weekly build, I wonder why the latest is more than 3 months old, and from last year. I have also tried (and failed) to compile FreeCAD using conda. Please provide detailed build instructions for creating the weekly ARM Disk image. Starting from a freshly installed macOS preferably. That is, including how exactly to install and configure conda (and any other dependencies). I would assume Xcode already installed though.

I am happy to test such instructions and verify that such a build would also support the connexion devices.

Or another helpful answer would be, how was the last ARM image built, exactly?

Thanks for any help!

JohnOCFII commented 1 year ago

@fpetzold - Another user is making great progress in getting a build environment working for macOS arm. I was able to follow his build instructions to get a working version of FreeCAD Arm. He's working to better integrate with the official build process, but for now, you might want to give it a shot and offer him additional feedback.

https://github.com/oursland/FreeCAD-Build-Notes

https://forum.freecad.org/viewtopic.php?t=76777&start=20

steffenxx commented 1 year ago

...a lot of time has passed... apparently nothing further is happening in the matter of MacOS Arm for the time being. :-(

luzpaz commented 1 year ago

It's probably been de-prioritized with all the release stuff happening. PRs are welcome!

adrianinsaval commented 1 year ago

I have just uploaded a new arm bundle that was compiled with the driver version that was reported as working for arm, please try it: https://github.com/FreeCAD/FreeCAD-Bundle/releases/download/weekly-builds/FreeCAD_weekly-builds-33447-2023-06-26-conda-macOS-arm-py310.dmg

steffenxx commented 1 year ago

Quick test :-) FreeCAD starts on a Mac Studio, my 3DConnexion devices (SpaceMouse) is directly supported. Files can be opened and creating a MESH is really fast in this version. You are my hero. Thanks a lot

DanielPa commented 1 year ago

@steffenxx did you install a specific version of the driver? On MacBook Pro a quick try did not work with my SpaceMouse Compact 😕

steffenxx commented 1 year ago

yes, 3DWare 10.7.0. This is the last driver that worked with FreeCAD. All the following drivers have never worked.

DanielPa commented 1 year ago

Awesome! Just works like charm ❤️ Driver Archive of 3Dconnexion

Kurdie2023 commented 1 year ago

Thank you so much, Adrian. It works great! Might there be a way, that it will also work with the current 3Dconnexion driver version? I need the current version due to some other applications...

Is there a way to install this freeCAD version "permanently". Every app start I have to got to the settings to allow it.

Thanks!!

adrianinsaval commented 1 year ago

What version of the driver? I need a direct link for download and I can make a bundle so you can test, but other people reported that later versions of the driver didn't work, there isn't much I can do since I don't have neither a mac nor a 3d mouse.

About permanent installation, I have no idea, consider asking for help on the forum or google search about it.

Kurdie2023 commented 1 year ago

Hi Adrian, Sorry for the late answer. I just downloaded the 0.21 version for mac M1 from the website (build 33675). Unfortunately it says „No Spaceball Present“, with both driver version (10.7.0 and current version 10.8.1).

Please find the link to the current driver version below: https://3dconnexion.com/de/drivers/

Is your adaption not implemented into this build?

Thank you!!!

best regards,

Rouven

biogoo commented 1 year ago

Confirmed - my 3Dconnexion device is not working on my M1 mini with the 0.21.0-33675 arm64 build, but does work with the intel build (the github variant, since the version on the download page fails with a Rosetta error on launch as per https://forum.freecad.org/viewtopic.php?t=80126)

ancher1912 commented 1 year ago

The FreeCAD_weekly-builds-33798-2023-08-13-conda-macOS-x86_64-py310 in combination with 10.8.1 of 3DxWare recognises the mouse (the configuration stuff appears in the Customise menu). However, the mouse itself is still not working...

[edit] The usual trick of reverting to 10.7.0 of 3DxWare solves the problem...