[Solved] export STL file

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
stellr
Posts: 5
Joined: Thu Oct 21, 2021 7:26 pm

[Solved] export STL file

Post by stellr »

New to freecad. I was wanting to export an STL file on an Ubuntu 20.04. When I do the export I get the following error msg:
libnglib.so cannot open shared object file: No such file or directory.
I installed the shared library, so I'm thinking it doesn't have /x86_64-linux-gnu/netgen/libnglib.so in some path var. Suggestions? Thanks.
User avatar
Shalmeneser
Veteran
Posts: 9551
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: export STL file

Post by Shalmeneser »

No file, no picture, no version, no above PINK banner = no solution !
User avatar
Shalmeneser
Veteran
Posts: 9551
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: export STL file

Post by Shalmeneser »

Try 0.20
stellr
Posts: 5
Joined: Thu Oct 21, 2021 7:26 pm

Re: export STL file

Post by stellr »

Shalmeneser wrote: Fri Oct 22, 2021 3:24 pm No file, no picture, no version, no above PINK banner = no solution !
Right, should have posted the version, sorry.

Ubuntu seems to have 0.18.4 in it's repo, so that's what I installed. I'll check the release notes of 0.20 if I can find them wrt saving STL. In this case I can't image a file/picture would have much to do with the issue. It seems any model would bring the same result. It looks like the env is not set to find the shared lib, no?

I'm not familiar with your reference to "above PINK banner." Mind explaining that for future reference?
Attachments
Screenshot from 2021-10-21 15-21-12.png
Screenshot from 2021-10-21 15-21-12.png (13.22 KiB) Viewed 1567 times
User avatar
M4x
Veteran
Posts: 1480
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: export STL file

Post by M4x »

Go all the way up on this page. The banner is under the thread title. Service: You're able to follow the link in my current signature.

After you've read the thread, you're going to understand which version we're looking for and how to get this information.

You shouldn't use the FreeCAD version provided by Ubuntu because that version is very outdated. General.advice for Ubuntu LTS users: Check if the version provided by Ubuntu is something you really want to use.

I recommend using the AppImage. There's an actively maintained PPA available too if that's more your thing.

https://github.com/FreeCAD/FreeCAD-Bund ... kly-builds

Installing_on_Linux
User avatar
Shalmeneser
Veteran
Posts: 9551
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: export STL file

Post by Shalmeneser »

stellr wrote: Sat Oct 23, 2021 3:30 pm I'm not familiar with your reference to "above PINK banner." Mind explaining that for future reference?
In the top of this page, there is a pink banner ;)

0.20 : https://www.freecadweb.org/downloads.php > FreeCAD weekly builds page
Just give permission to the appimage.
wmayer
Founder
Posts: 20301
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: export STL file

Post by wmayer »

libnglib.so cannot open shared object file: No such file or directory.
You should have a look at the installed freecad package whether it or its dependencies include this file or not. If not then IMO one of the packages is broken.

If it's there then check in which location it puts the file. It may put it to a file that is not listed in the files under ld.so.conf.d and thus the linker won't be able to find it. So, either extend the file and update the cache or set the environment variable

Code: Select all

export LD_LIBRARY_PATH=directory_to_the_libnglib.so
EDIT:
According to https://packages.ubuntu.com/focal/amd64 ... 8/filelist it installs the file /usr/lib/freecad-python3/lib/libNETGENPlugin.so and that depends on nglib. However, https://packages.ubuntu.com/focal/libfr ... thon3-0.18 doesn't list libnglib-6.2.1804 as a dependency (which looks like a bug to me) and that's why it cannot load the FEM workbench and the MeshPart module.

Have you installed the package libnglib-6.2.1804? Because it puts the file under /usr/lib/x86_64-linux-gnu/netgen/libnglib.so it's rather unlikely that the linker will find it automatically. So, try to set

Code: Select all

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/netgen
wmayer
Founder
Posts: 20301
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: export STL file

Post by wmayer »

Other people have found this bug, too:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1866914
stellr
Posts: 5
Joined: Thu Oct 21, 2021 7:26 pm

Re: export STL file

Post by stellr »

Thank you for the pointer to 1866914. That workaround repairs the STL export in 0.18.4. +1 for 0.20 and the forum tips. Now I'm in the pink. :roll:
rek
Posts: 71
Joined: Thu Sep 09, 2021 6:56 pm

Re: export STL file

Post by rek »

I have had an insane amount of success exporting STL files from FreeCAD... (EDIT: AS .AMF) I am not an expert but I will say, keep pressing on it seems like you have some kind of missing dependency. I am a near-total noob and exporting an STL was one of the first things I was able to do, and once you get it working and are making good geometry, your slicer will more than likely thank you. Much, much better than trying to use sketchup or blender, so hang in there.

Edit, I'm sorry I completely lied there. I forgot that in FreeCAD I have been exporting as the extension *.amf which is read perfectly by Prusa Slicer.

Please try using .amf for now.
Post Reply