OpenCAMLib for Master (0.20)

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
falviani
Posts: 253
Joined: Tue May 07, 2019 8:49 pm

OpenCAMLib for Master (0.20)

Post by falviani »

Hi,

When I finally got a good build of master (a separate saga :lol: ) I saw that openCAMlib had been built with an earlier Python version (3.6 vs current 3.8). Is anyone building a version that's compatible with 0.20 (using Python 3.8), and if so how could I get a copy?

Thanks in advance,
Frank Alviani
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: OpenCAMLib for Master (0.20)

Post by Kunda1 »

Please always post your full About info. In this case it would've helped us understand at least what OS you were on
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Syres
Veteran
Posts: 2898
Joined: Thu Aug 09, 2018 11:14 am

Re: OpenCAMLib for Master (0.20)

Post by Syres »

A Windows ocl.pyd built for Python 3.8.x is in the Win LP build (src\bin\Lib\site-packages) at https://github.com/FreeCAD/FreeCAD-Bund ... kly-builds
falviani
Posts: 253
Joined: Tue May 07, 2019 8:49 pm

Re: OpenCAMLib for Master (0.20)

Post by falviani »

Thanks very much for your assistance.

Frank
Zivatar
Posts: 23
Joined: Thu Nov 12, 2020 5:31 pm

Re: OpenCAMLib for Master (0.20)

Post by Zivatar »

Hello Guys,

I am using OpenSUSE Leap 15.2 (15.3 also), but until now I could not manage to make OpenCamLib work on my system.
My FreeCAD is: 25927 (Git) (master) - compiled without any error
OpenCamLib is compiled without any error with these flags:

Code: Select all

 cmake -DBUILD_PY_LIB=ON -DUSE_PY_3=ON -DCMAKE_BUILD_TYPE=Release ../../src -Wno-dev
Cmake output:

Code: Select all

-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
--  Note: will NOT build emscripten library
-- C++ compiler version: 7.5.0 [/usr/bin/c++]
-- setting gcc options: -Wall  -Wno-deprecated -pedantic-errors
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- found OpenMP, compiling with flags: -fopenmp
-- Found Git: /usr/bin/git (found version "2.26.2") 
-- version_string.cmake git set GIT_COMMIT_ID: 2019.07-27-gc189bd5
-- OpenCamLib version: 2019.07.27
--  configuring src/cutters
--  configuring src/geo
--  configuring src/algo
--  configuring src/dropcutter
--  configuring src/common
-- Found Boost: /usr/include (found version "1.66.0")  
-- CMake version >= 3.12.0
-- Found Python3: /usr/bin/python3.6 (found version "3.6.12") found components: Interpreter Development 
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1466 ] _boost_TEST_VERSIONS = "1.72.0;1.72;1.71.0;1.71;1.70.0;1.70;1.69.0;1.69;1.68.0;1.68;1.67.0;1.67;1.66.0;1.66;1.65.1;1.65.0;1.65;1.64.0;1.64;1.63.0;1.63;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1467 ] Boost_USE_MULTITHREADED = "TRUE"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1468 ] Boost_USE_STATIC_LIBS = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1469 ] Boost_USE_STATIC_RUNTIME = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1470 ] Boost_ADDITIONAL_VERSIONS = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1471 ] Boost_NO_SYSTEM_PATHS = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1503 ] BOOST_ROOT = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1504 ] ENV{BOOST_ROOT} = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1505 ] BOOST_INCLUDEDIR = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1506 ] ENV{BOOST_INCLUDEDIR} = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1507 ] BOOST_LIBRARYDIR = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1508 ] ENV{BOOST_LIBRARYDIR} = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1596 ] location of version.hpp: /usr/include/boost/version.hpp
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1636 ] Boost_VERSION = "106600"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1637 ] Boost_VERSION_STRING = "1.66.0"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1638 ] Boost_VERSION_MACRO = "106600"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1639 ] Boost_VERSION_MAJOR = "1"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1640 ] Boost_VERSION_MINOR = "66"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1641 ] Boost_VERSION_PATCH = "0"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1642 ] Boost_VERSION_COUNT = "3"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1659 ] Boost_LIB_PREFIX = ""
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1660 ] Boost_NAMESPACE = "boost"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:793 ] _boost_COMPILER = "-gcc75" (guessed)
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1696 ] _boost_MULTITHREADED = "-mt"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1773 ] _boost_ARCHITECTURE_TAG = "" (detected)
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1777 ] _boost_RELEASE_ABI_TAG = "-"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1778 ] _boost_DEBUG_ABI_TAG = "-d"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1838 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = "/usr/include/lib;/usr/include/../lib;/usr/include/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1839 ] _boost_LIBRARY_SEARCH_DIRS_DEBUG = "/usr/include/lib;/usr/include/../lib;/usr/include/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1964 ] Component-specific library search names for : python36;python3-py36;python-py36;python-3.6;python-36
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2024 ] Searching for PYTHON36_LIBRARY_RELEASE: boost_python36-gcc75-mt-1_66;boost_python36-gcc75-mt;boost_python36-gcc75-mt;boost_python36-mt-1_66;boost_python36-mt;boost_python36-mt;boost_python36-mt;boost_python36;boost_python3-py36-gcc75-mt-1_66;boost_python3-py36-gcc75-mt;boost_python3-py36-gcc75-mt;boost_python3-py36-mt-1_66;boost_python3-py36-mt;boost_python3-py36-mt;boost_python3-py36-mt;boost_python3-py36;boost_python-py36-gcc75-mt-1_66;boost_python-py36-gcc75-mt;boost_python-py36-gcc75-mt;boost_python-py36-mt-1_66;boost_python-py36-mt;boost_python-py36-mt;boost_python-py36-mt;boost_python-py36;boost_python-3.6-gcc75-mt-1_66;boost_python-3.6-gcc75-mt;boost_python-3.6-gcc75-mt;boost_python-3.6-mt-1_66;boost_python-3.6-mt;boost_python-3.6-mt;boost_python-3.6-mt;boost_python-3.6;boost_python-36-gcc75-mt-1_66;boost_python-36-gcc75-mt;boost_python-36-gcc75-mt;boost_python-36-mt-1_66;boost_python-36-mt;boost_python-36-mt;boost_python-36-mt;boost_python-36;boost_python36-gcc75-mt-1_66;boost_python36-gcc75-mt;boost_python36-gcc75-mt;boost_python36-mt-1_66;boost_python36-mt;boost_python36-mt;boost_python36-mt;boost_python36
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2079 ] Searching for PYTHON36_LIBRARY_DEBUG: boost_python36-gcc75-mt-d-1_66;boost_python36-gcc75-mt-d;boost_python36-gcc75-mt-d;boost_python36-mt-d-1_66;boost_python36-mt-d;boost_python36-mt-d;boost_python36-mt;boost_python36;boost_python3-py36-gcc75-mt-d-1_66;boost_python3-py36-gcc75-mt-d;boost_python3-py36-gcc75-mt-d;boost_python3-py36-mt-d-1_66;boost_python3-py36-mt-d;boost_python3-py36-mt-d;boost_python3-py36-mt;boost_python3-py36;boost_python-py36-gcc75-mt-d-1_66;boost_python-py36-gcc75-mt-d;boost_python-py36-gcc75-mt-d;boost_python-py36-mt-d-1_66;boost_python-py36-mt-d;boost_python-py36-mt-d;boost_python-py36-mt;boost_python-py36;boost_python-3.6-gcc75-mt-d-1_66;boost_python-3.6-gcc75-mt-d;boost_python-3.6-gcc75-mt-d;boost_python-3.6-mt-d-1_66;boost_python-3.6-mt-d;boost_python-3.6-mt-d;boost_python-3.6-mt;boost_python-3.6;boost_python-36-gcc75-mt-d-1_66;boost_python-36-gcc75-mt-d;boost_python-36-gcc75-mt-d;boost_python-36-mt-d-1_66;boost_python-36-mt-d;boost_python-36-mt-d;boost_python-36-mt;boost_python-36;boost_python36-gcc75-mt-d-1_66;boost_python36-gcc75-mt-d;boost_python36-gcc75-mt-d;boost_python36-mt-d-1_66;boost_python36-mt-d;boost_python36-mt-d;boost_python36-mt;boost_python36
-- Could NOT find Boost (missing: python36) (found version "1.66.0")
-- Boost_INCLUDE_DIR = /usr/include
-- Boost_INCLUDE_DIRS = /usr/include
-- Boost_LIBRARY_DIRS = 
-- Boost_LIBRARIES = 
-- PYTHON_SITE_PACKAGES = /usr/lib/python3.6/site-packages
-- PYTHON_ARCH_PACKAGES = /usr/lib64/python3.6/site-packages
-- PYTHON_INCLUDE_DIRS = /usr/include/python3.6m
-- PYTHON_LIBRARIES = /usr/lib64/libpython3.6m.so
-- PYTHON_SITE_PACKAGES = /usr/lib/python3.6/site-packages
-- PYTHON_ARCH_PACKAGES = /usr/lib64/python3.6/site-packages
-- linking python binary ocl.so with boost: 
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1466 ] _boost_TEST_VERSIONS = "1.72.0;1.72;1.71.0;1.71;1.70.0;1.70;1.69.0;1.69;1.68.0;1.68;1.67.0;1.67;1.66.0;1.66;1.65.1;1.65.0;1.65;1.64.0;1.64;1.63.0;1.63;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1467 ] Boost_USE_MULTITHREADED = "TRUE"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1468 ] Boost_USE_STATIC_LIBS = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1469 ] Boost_USE_STATIC_RUNTIME = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1470 ] Boost_ADDITIONAL_VERSIONS = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1471 ] Boost_NO_SYSTEM_PATHS = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1503 ] BOOST_ROOT = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1504 ] ENV{BOOST_ROOT} = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1505 ] BOOST_INCLUDEDIR = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1506 ] ENV{BOOST_INCLUDEDIR} = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1507 ] BOOST_LIBRARYDIR = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1508 ] ENV{BOOST_LIBRARYDIR} = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1596 ] location of version.hpp: /usr/include/boost/version.hpp
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1636 ] Boost_VERSION = "106600"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1637 ] Boost_VERSION_STRING = "1.66.0"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1638 ] Boost_VERSION_MACRO = "106600"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1639 ] Boost_VERSION_MAJOR = "1"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1640 ] Boost_VERSION_MINOR = "66"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1641 ] Boost_VERSION_PATCH = "0"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1642 ] Boost_VERSION_COUNT = "3"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1659 ] Boost_LIB_PREFIX = ""
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1660 ] Boost_NAMESPACE = "boost"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:793 ] _boost_COMPILER = "-gcc75" (guessed)
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1696 ] _boost_MULTITHREADED = "-mt"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1773 ] _boost_ARCHITECTURE_TAG = "" (detected)
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1777 ] _boost_RELEASE_ABI_TAG = "-"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1778 ] _boost_DEBUG_ABI_TAG = "-d"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1838 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = "/usr/include/lib;/usr/include/../lib;/usr/include/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1839 ] _boost_LIBRARY_SEARCH_DIRS_DEBUG = "/usr/include/lib;/usr/include/../lib;/usr/include/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.14") found components: doxygen dot 
-- Found doxygen. Documentation can be built with 'make doc' 
-- Found LATEX: /usr/bin/latex   
-- type:
--  'make' for a normal build
--  'make -j8' to build faster (if you have many cpus)
--  'make install' to install
--  'make package' to build a binary deb-packate
--  'make spackage' to build debian source-packages
--  'make test' to run the tests
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zivatarw/MyDev/opencamlib/build/freecad
I read the official guide here:
https://wiki.freecadweb.org/OpenCamLib

I symlinked the libocl.so into the freecad-build/Mod/OCL folder. Now I got report "OpenCamLib is not working!", when I switch to Path Toolbar. Do I miss something other file to link there, or something else could be the problem? Can someone help me to make it work?

THANK YOU!
Zivatar
chrisb
Veteran
Posts: 54144
Joined: Tue Mar 17, 2015 9:14 am

Re: OpenCAMLib for Master (0.20)

Post by chrisb »

Is it working with the precompiled AppImage?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Zivatar
Posts: 23
Joined: Thu Nov 12, 2020 5:31 pm

Re: OpenCAMLib for Master (0.20)

Post by Zivatar »

chrisb wrote: Thu Sep 30, 2021 12:40 pm Is it working with the precompiled AppImage?
Dear Chrisb,
Thank you for Your attention! Yes, it seems to work.
One of the main reasons why I want to compile things myself is that I would like to understand this engine because I am interested in use OpenCamLib with Blender also. I tried the concerning procedure there with no luck.

Kind Regards,
Zivatar
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: OpenCAMLib for Master (0.20)

Post by sgrogan »

Zivatar wrote: Thu Sep 30, 2021 1:12 pm Kind Regards,
Zivatar
Can you try

Code: Select all

import ocl
in the FreeCAD python console?
"fight the good fight"
Zivatar
Posts: 23
Joined: Thu Nov 12, 2020 5:31 pm

Re: OpenCAMLib for Master (0.20)

Post by Zivatar »

First I tried to write ocl (lowercase), then as uppercase:

Code: Select all

>>> import ocl
Traceback (most recent call last):
  File "<input>", line 1, in <module>
ModuleNotFoundError: No module named 'ocl'
>>> import OCL
>>> 
Then I changed the folder name from 'OCL' to 'ocl' in freecad-build/Mod, and everything is perfect now!
Thank You very much guys!!! :)

Problem solved, everything is fine!
chrisb
Veteran
Posts: 54144
Joined: Tue Mar 17, 2015 9:14 am

Re: OpenCAMLib for Master (0.20)

Post by chrisb »

Zivatar wrote: Thu Sep 30, 2021 5:55 pm Problem solved, everything is fine!
Good to hear. Did it come as OCL or was this a name given by you - which you fixed later? I ask because if it's the former, I could add it to the known issues.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply