How to activate openCamLib after compiling it

Here's the place for discussion related to CAM/CNC and the development of the Path module.
User avatar
nemesis
Posts: 351
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: How to activate openCamLib after compiling it

Postby nemesis » Tue Mar 26, 2019 9:27 pm

quick61 wrote:
Tue Mar 26, 2019 6:42 pm
I"m sure you all would love to go over this one more time, but...

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)
Check the final depth of the operation.
it is on the top of my stock by default, so need to lower it to make it take the surface correctly in account
User avatar
quick61
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: How to activate openCamLib after compiling it

Postby quick61 » Tue Mar 26, 2019 10:47 pm

nemesis wrote:
Tue Mar 26, 2019 9:27 pm
Check the final depth of the operation.
it is on the top of my stock by default, so need to lower it to make it take the surface correctly in account
Yup, that helped out allot. Thanks for the tip! :)

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
mlampert
Posts: 1478
Joined: Fri Sep 16, 2016 9:28 pm

Re: How to activate openCamLib after compiling it

Postby mlampert » Tue Mar 26, 2019 10:50 pm

quick61 wrote:
Tue Mar 26, 2019 6:42 pm
I have been through all 3 pages of this thread and have done / tried everything mentioned. Compiled and installed opencamlib
I have not used OCL with FC yet - gotta get my machine going first - so take this with a grain of salt.

Last time I compiled OCL you had to specifically enable building of the python library and at the same time disable build of the C++ library. It can only build one language binding at the time.

https://forum.freecadweb.org/viewtopic. ... on#p283569
User avatar
quick61
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: How to activate openCamLib after compiling it

Postby quick61 » Tue Mar 26, 2019 11:31 pm

mlampert wrote:
Tue Mar 26, 2019 10:50 pm
quick61 wrote:
Tue Mar 26, 2019 6:42 pm
I have been through all 3 pages of this thread and have done / tried everything mentioned. Compiled and installed opencamlib
I have not used OCL with FC yet - gotta get my machine going first - so take this with a grain of salt.

Last time I compiled OCL you had to specifically enable building of the python library and at the same time disable build of the C++ library. It can only build one language binding at the time.

https://forum.freecadweb.org/viewtopic. ... on#p283569
Thanks for that tip, went back and did a fresh build following the directions in the above linked post and i came up with one additional file that was installed, others were "up to date".

Code: Select all

/usr/bin/cmake -P cmake_install.cmake
-- Install configuration: ""
-- Installing: /usr/local/lib/python2.7/dist-packages/ocl.so
-- Up-to-date: /usr/local/lib/python2.7/dist-packages
-- Up-to-date: /usr/local/lib/python2.7/dist-packages/procmemory.py
-- Up-to-date: /usr/local/lib/python2.7/dist-packages/camvtk.py
-- Up-to-date: /usr/local/lib/python2.7/dist-packages/STLTools.py
-- Up-to-date: /usr/local/lib/python2.7/dist-packages/pyocl.py
Still no joy with the import OCL command on the python console. Still same error, but I do seem to have 3DSurface dropcutter and waterline working, so...

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
mlampert
Posts: 1478
Joined: Fri Sep 16, 2016 9:28 pm

Re: How to activate openCamLib after compiling it

Postby mlampert » Wed Mar 27, 2019 12:09 am

In noticed that ocl.so gets installed for python 2.7 - is your FC running python 2.7 or 3.x ?

Anyway - if it works now, awesome!
herbk
Posts: 1910
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: How to activate openCamLib after compiling it

Postby herbk » Tue Apr 09, 2019 7:39 am

Hi,
chrisb wrote:
Sun Jan 14, 2018 6:22 pm
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
I'm trying, but i get still the error message if a missing OpenCamLib.

The try to import ocl with the python console i get the message

Code: Select all

Traceback (most recent call last):
  File "<input>", line 1, in <module>
ModuleNotFoundError: No module named 'OCL'
like quick61, - but different to him FC dosn't find ocl.

Dosn't "File "<input>", line 1, in <module> ModuleNotFoundError: No module named 'OCL'" say that there should be a module OCL should be in the FreeCAD/mod folder?
Gruß Herbert
User avatar
roerich_64
Posts: 1256
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: How to activate openCamLib after compiling it

Postby roerich_64 » Tue Apr 09, 2019 7:51 am

Hi Herbert,

at windows i have installed the OCL library here:
C:\Users\User\AppData\Roaming\FreeCAD\Mod
OCL_Lib.jpg
OCL_Lib.jpg (52.5 KiB) Viewed 523 times
i hope it helps a little bit...

VG
Walter
huegene
Posts: 6
Joined: Wed Nov 14, 2018 8:41 pm

Re: How to activate openCamLib after compiling it

Postby huegene » Wed Apr 24, 2019 6:30 pm

Hi,
is it possible that you try to import opencamlib as: import OCL instead of: import ocl?
kind regards
huegene
herbk
Posts: 1910
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: How to activate openCamLib after compiling it

Postby herbk » Wed Apr 24, 2019 7:45 pm

Hi huegene,
huegene wrote:
Wed Apr 24, 2019 6:30 pm
Hi,
is it possible that you try to import opencamlib as: import OCL instead of: import ocl?
kind regards
huegene
I did, but get`s the same error..
Gruß Herbert
User avatar
quick61
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: How to activate openCamLib after compiling it

Postby quick61 » Thu May 02, 2019 5:23 pm

Would anyone have direct and specific instructions on building ocl for python 3? After the latest update for 0.18.1 and the 0.19 builds, ocl is not found anymore due to the move to py3

Really, this ocl thing should not be this hard. :(

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?