How to activate openCamLib after compiling it

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!
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: How to activate openCamLib after compiling it

Post by chrisb »

herbk wrote: Sat Dec 09, 2017 7:53 am Hi Chris,
I'l try if there are not to much dependencies.... You know i use OpenSuse... there is no package "texlive-latex-base", so i have to compile it by myself to (with resolving the dependencies... and so on..).
Hi Herbert, I see the problems and I can understand that you don't really enjoy going through this searching for dependencies and eliminating them.
I searched the suse software for the packages and found the following:

- texlive-latex, I guess that's all it needs. I think it is used for the creation of the documentation only.
- doxygen exists for Suse as well
- boost contains the boost libraries, be sure to get the development version
- git exists of course as well

I would give it a try with these.
Chris
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: How to activate openCamLib after compiling it

Post by chrisb »

you can minimize the dependencies if you don't prepare to create the docs. They are not created with the default make anyway, only if you explicitely 'make doc'.

The minimized procedure is:
- install cmake, git and boost developer version. This is on Ubuntu/Debian like systems: 'apt-get install cmake git libboost-all-dev'
- git clone https://github.com/aewallin/opencamlib
- cd opencamlib/src
- edit the file CMakeLists.txt and change the option value of BUILD_DOC from ON to OFF
- cmake .
- make
- sudo make install
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: How to activate openCamLib after compiling it

Post by herbk »

Hi Chris,
thx, i will try, but not before today evening.
boost-dev i have ollready installed, doxygen is just a "documentation creater" maybe i can switch it off to

In that moment (better: since 3 hours) runs a 3D poket operation on my machine. Only a little part, but i want to have a nice surface of a round object and so i work with 0,1mm stepdown only.

The operation shows some foults, but for that i will open a new thread an show some pics.
Gruß Herbert
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: How to activate openCamLib after compiling it

Post by herbk »

Hi Chris,
again about my OCL problem...

Where is FC surching for OCL? Its installed on my system to that folders:

/usr/lib/opencamlib
/usr/lib/opencamlib/libocl.so.11.10.84
/usr/lib/python2.7/site-packages/STLTools.py
/usr/lib/python2.7/site-packages/STLTools.pyc
/usr/lib/python2.7/site-packages/STLTools.pyo
/usr/lib/python2.7/site-packages/camvtk.py
/usr/lib/python2.7/site-packages/camvtk.pyc
/usr/lib/python2.7/site-packages/camvtk.pyo
/usr/lib/python2.7/site-packages/procmemory.py
/usr/lib/python2.7/site-packages/procmemory.pyc
/usr/lib/python2.7/site-packages/procmemory.pyo
/usr/lib/python2.7/site-packages/pyocl.py
/usr/lib/python2.7/site-packages/pyocl.pyc
/usr/lib/python2.7/site-packages/pyocl.pyo
/usr/lib64/python2.7/site-packages/ocl.so


But FC did not find it. All things you are postet before are done, but no effect.
/usr/local/lib/ exists, but it's a emphty folder...

Where is FC searching for OCL?
Gruß Herbert
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: How to activate openCamLib after compiling it

Post by chrisb »

I will check later.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: How to activate openCamLib after compiling it

Post by chrisb »

Is there a symbolic link libocl.so in the directory /usr/lib/opencamlib/ pointing to the library file? If not create it (see below).

On my system the library is not in the ldconfig path, which is strange, because it works out of the box. Perhaps FreeCAD is looking directly in the directory.
Please try the following:

- create a directory /usr/local/lib/opencamlib
- copy the file libocl.so.11.10.84 into that directory
- create a link inside that directory: ln -s libocl.so.11.10.84 libocl.so
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
bmsleight
Posts: 1
Joined: Sat Apr 14, 2018 9:34 am

Re: How to activate openCamLib after compiling it

Post by bmsleight »

Any tips on what I am doing wrong ?
"operation requires OpenCamLib"

Installed openCamLib via git & Make (as per instruction in this thread no errors). Using the latest "AppImage"

Code: Select all

bms@FortBoyard:~/FreeCAD-App$ ls /usr/local/lib/opencamlib/ -l
total 492
lrwxrwxrwx 1 root root     18 Apr 14 10:26 libocl.so -> libocl.so.11.10.92
-rw-r--r-- 1 root root 502040 Apr 14 10:25 libocl.so.11.10.92
bms@FortBoyard:~/FreeCAD-App$ ./FreeCAD_0.17.13509.glibc2.17-x86_64.AppImage 
FreeCAD 0.17, Libs: 0.17R13509 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2018
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Path workbench activated
PathOpGui.INFO: Title: 'Surface'
Surfacing Select Mode
Free Select
This operation requires OpenCamLib to be installed.
bms@FortBoyard:~/FreeCAD-App$
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: How to activate openCamLib after compiling it

Post by chrisb »

That's an Appimage problem. please search the forum for appimage related topics, I remember the problem was discussed there.
You didn't tell us much about your system. Can you install a "native" FreeCAD?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: How to activate openCamLib after compiling it

Post by quick61 »

I"m sure you all would love to go over this one more time, but...

When I try to enter import OCL in the Python console I get -

Code: Select all

>>> import OCL
Traceback (most recent call last):
  File "<input>", line 1, in <module>
ImportError: No module named OCL
>>> 
I have been through all 3 pages of this thread and have done / tried everything mentioned. Compiled and installed opencamlib

Code: Select all

Install the project...
/usr/bin/cmake -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: /usr/local/lib/opencamlib/libocl.so.2018.08.122
-- Up-to-date: /usr/local/lib/opencamlib/libocl.so
-- Up-to-date: /usr/local/include/opencamlib/arc.hpp
-- Up-to-date: /usr/local/include/opencamlib/bbox.hpp
-- Up-to-date: /usr/local/include/opencamlib/ccpoint.hpp
-- Up-to-date: /usr/local/include/opencamlib/clpoint.hpp
-- Up-to-date: /usr/local/include/opencamlib/line.hpp
-- Up-to-date: /usr/local/include/opencamlib/path.hpp
-- Up-to-date: /usr/local/include/opencamlib/stlreader.hpp
-- Up-to-date: /usr/local/include/opencamlib/stlsurf.hpp
-- Up-to-date: /usr/local/include/opencamlib/triangle.hpp
-- Up-to-date: /usr/local/include/opencamlib/point.hpp
-- Up-to-date: /usr/local/include/opencamlib/ballcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/bullcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/compositecutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/conecutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/cylcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/ellipseposition.hpp
-- Up-to-date: /usr/local/include/opencamlib/millingcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/ellipse.hpp
-- Up-to-date: /usr/local/include/opencamlib/adaptivepathdropcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/pathdropcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/batchdropcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/pointdropcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/brent_zero.hpp
-- Up-to-date: /usr/local/include/opencamlib/kdnode.hpp
-- Up-to-date: /usr/local/include/opencamlib/kdtree.hpp
-- Up-to-date: /usr/local/include/opencamlib/numeric.hpp
-- Up-to-date: /usr/local/include/opencamlib/lineclfilter.hpp
-- Up-to-date: /usr/local/include/opencamlib/clfilter.hpp
-- Up-to-date: /usr/local/include/opencamlib/halfedgediagram.hpp
-- Up-to-date: /usr/local/include/opencamlib/operation.hpp
-- Up-to-date: /usr/local/include/opencamlib/batchpushcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/fiberpushcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/fiber.hpp
-- Up-to-date: /usr/local/include/opencamlib/interval.hpp
-- Up-to-date: /usr/local/include/opencamlib/waterline.hpp
-- Up-to-date: /usr/local/include/opencamlib/adaptivewaterline.hpp
-- Up-to-date: /usr/local/include/opencamlib/weave.hpp
-- Up-to-date: /usr/local/include/opencamlib/simple_weave.hpp
-- Up-to-date: /usr/local/include/opencamlib/smart_weave.hpp
-- Up-to-date: /usr/local/include/opencamlib/weave_typedef.hpp
-- Up-to-date: /usr/local/include/opencamlib/tsp.hpp
Enabled Path_experimental as per - https://www.freecadweb.org/wiki/Path_experimental/en

Made sure there was a symbolic link in /usr/lib/opencamlib/

Code: Select all

:/usr/lib/opencamlib$ ls
libocl.so  libocl.so.2018.08
The strange thing is, when I run 3D Surface, it kind of works, i get no error messages like opencamlib needs to be installed for this operation, or any such, in face when I do run 3D surface on a part, the console output is -

Code: Select all

Surfacing Select Mode
StepOver is  50
base object: Clone
calculation took  4.24623012543  s
points received: 155367
points after optimization: 124
Though I don't get the expected results and FreeCAD will not allow me to select any faces from the model, telling me that selection is not allowed on whatever face/edge I hover the mouse over.

So, can someone tell me what I'm missing, or what is going on? My FC info -

OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16093 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 690774c0effe4fd7b8d2b5e2fb2b8c8d145e21ce
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
This post made with 0.0% Micro$oft products - GOT LINUX?
Post Reply