FS#64355 - [OpenSCAD] Missing support for 3MF import / export
Attached to Project:
Community Packages
Opened by Kevin Cole (ubuntourist) - Saturday, 02 November 2019, 12:40 GMT
Last edited by Kyle Keen (keenerd) - Thursday, 21 November 2019, 05:37 GMT
Opened by Kevin Cole (ubuntourist) - Saturday, 02 November 2019, 12:40 GMT
Last edited by Kyle Keen (keenerd) - Thursday, 21 November 2019, 05:37 GMT
|
Details
According to the official documentation, OpenSCAD has
supported 3MF import and export since version 2019.05.
I'm running the community OpenSCAD which claims to be version 2019.05, but under "Export..." I see no option for 3MF. (I have not attempted to use the import() function with a 3MF file yet.) |
This task depends upon
Closed by Kyle Keen (keenerd)
Thursday, 21 November 2019, 05:37 GMT
Reason for closing: Fixed
Additional comments about closing: openscad 2019.05-4
Thursday, 21 November 2019, 05:37 GMT
Reason for closing: Fixed
Additional comments about closing: openscad 2019.05-4
git clone https://github.com/3MFConsortium/lib3mf.git
cd cmake
chmod 755 GenerateMake.sh
./GenerateMake.sh -DLIB3MF_TESTS=FALSE
cd ../build
make
**NOTE:** Without the `-DLIB3MF_TESTS=FALSE` the script complains:
CMake Error at Tests/CMakeLists.txt:1 (ADD_SUBDIRECTORY):
The source directory
.../lib3mf/Tests/googletest
does not contain a CMakeLists.txt file.
CMake Error at Tests/CMakeLists.txt:4 (SET_TARGET_PROPERTIES):
SET_TARGET_PROPERTIES Can not find target to add properties to: gtest
CMake Error at Tests/CMakeLists.txt:5 (SET_TARGET_PROPERTIES):
SET_TARGET_PROPERTIES Can not find target to add properties to: gtest_main
-- Configuring incomplete, errors occurred!
1. "GenerateMake.sh" is only a think wrapper around cmake, it is easier to leave it out and directly create a subdirectory "build" and run "cmake .." in there.
2. To get the tests working, you need to fetch the Git submodule by running "git submodule init && git submodule update".
To sum up, the build process should be
git clone https://github.com/3MFConsortium/lib3mf.git
git submodule init
git submodule update
mkdir build
cd build
cmake ..
make
ctest
You might want to have a look at https://wiki.archlinux.org/index.php/Creating_packages and https://wiki.archlinux.org/index.php/AUR_submission_guidelines on how to create a PKGBUILD and upload it to the AUR. (For the Git submodule stuff in particular, also see https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git_Submodules) This would make it easier for maintainers to adopt lib3MF to the repositories, therefore increasing the chances of getting 3MF import/export for OpenSCAD.
All that is left is to rebuild openscad with lib3mf-1 added to the depends array. I feel this should be done by the openscad maintainer himself if possible, since he knows the software better than me. I can confirm that with this addition 3MF export works fine for me.