OpenCamLib: Difference between revisions

From FreeCAD Documentation
No edit summary
(Marked this version for translation)
Line 2: Line 2:
<translate>
<translate>


<!--T:1-->
OpenCamLib (OCL) is an open source library aiming to provide computer aided manufacturing (CAM) algorithms. FreeCAD uses OCL in the experimental [[Path_3DSurface|3D surface]] path operations and other experimental features.
OpenCamLib (OCL) is an open source library aiming to provide computer aided manufacturing (CAM) algorithms. FreeCAD uses OCL in the experimental [[Path_3DSurface|3D surface]] path operations and other experimental features.


==Installing==
==Installing== <!--T:2-->


=== Windows ===
=== Windows === <!--T:3-->


<!--T:4-->
'''Note:''' Beginning with FreeCAD version 0.19, OCL should be included with all Windows distribution packages.
'''Note:''' Beginning with FreeCAD version 0.19, OCL should be included with all Windows distribution packages.


<!--T:5-->
To install OCL on Windows, follow these instructions.
To install OCL on Windows, follow these instructions.
# Obtain the Python version of OpenCamLib (OCL).
# Obtain the Python version of OpenCamLib (OCL).
Line 32: Line 35:
##** Verify the Python version used to build the OCL library is the same as that of your FreeCAD software - 2.7 or 3.6 currently
##** Verify the Python version used to build the OCL library is the same as that of your FreeCAD software - 2.7 or 3.6 currently


=== Linux ===
=== Linux === <!--T:6-->


<!--T:7-->
The repository is [https://github.com/aewallin/opencamlib here] and contains basic installation instructions.
The repository is [https://github.com/aewallin/opencamlib here] and contains basic installation instructions.


<!--T:8-->
Before beginning installation, or during the installation process, you will probably find you need to install some additional packages:
Before beginning installation, or during the installation process, you will probably find you need to install some additional packages:


<!--T:9-->
For example:
For example:
</translate>
</translate>
Line 45: Line 51:
sudo apt-get install texlive-full
sudo apt-get install texlive-full
<translate>
<translate>
<!--T:10-->
Note: the "libboost-program-options-dev" may be substituted with "libboost-all-dev".
Note: the "libboost-program-options-dev" may be substituted with "libboost-all-dev".


If you are struggling, carefully review any error messages you get during the cmake and make phases as you may need to install additional packages.
If you are struggling, carefully review any error messages you get during the cmake and make phases as you may need to install additional packages.
==== Python 3 ====
==== Python 3 ==== <!--T:11-->


<!--T:12-->
In order to make a python 3 version you may need to upgrade to the latest version of [https://cmake.org/download/ cmake], as version 3.10 from the standard package does not make the appropriate python 3 files. Version 3.14 is known to work. (Run `cmake --version` to confirm you are on a later version).
In order to make a python 3 version you may need to upgrade to the latest version of [https://cmake.org/download/ cmake], as version 3.10 from the standard package does not make the appropriate python 3 files. Version 3.14 is known to work. (Run `cmake --version` to confirm you are on a later version).


<!--T:13-->
Use these flags in the make phase:
Use these flags in the make phase:
</translate>
</translate>
cmake -DBUILD_PY_LIB=ON -DUSE_PY_3=ON ../src -Wno-dev
cmake -DBUILD_PY_LIB=ON -DUSE_PY_3=ON ../src -Wno-dev
<translate>
<translate>
<!--T:14-->
See the FreeCAD forum at, [https://forum.freecadweb.org/viewtopic.php?p=316970#p316988 Re: How to activate openCamLib after compiling it], and a few posts following.
See the FreeCAD forum at, [https://forum.freecadweb.org/viewtopic.php?p=316970#p316988 Re: How to activate openCamLib after compiling it], and a few posts following.


=== Mac ===
=== Mac === <!--T:15-->
(No entry)
(No entry)




== More help ==
== More help == <!--T:16-->


<!--T:17-->
In case you run into difficulties, you may find additional help at these forum posts:
In case you run into difficulties, you may find additional help at these forum posts:


<!--T:18-->
* [https://forum.freecadweb.org/viewtopic.php?t=19205 Windows]
* [https://forum.freecadweb.org/viewtopic.php?t=19205 Windows]
* [https://forum.freecadweb.org/viewtopic.php?t=18017 Linux]
* [https://forum.freecadweb.org/viewtopic.php?t=18017 Linux]


== Acknowledgments ==
== Acknowledgments == <!--T:19-->


<!--T:20-->
Thank you to [http://www.anderswallin.net/about/ Dr. Anders Wallin] for providing OCL to the public.
Thank you to [http://www.anderswallin.net/about/ Dr. Anders Wallin] for providing OCL to the public.


<!--T:21-->
[[Category:User Documentation]]
[[Category:User Documentation]]



Revision as of 07:29, 28 July 2019

OpenCamLib (OCL) is an open source library aiming to provide computer aided manufacturing (CAM) algorithms. FreeCAD uses OCL in the experimental 3D surface path operations and other experimental features.

Installing

Windows

Note: Beginning with FreeCAD version 0.19, OCL should be included with all Windows distribution packages.

To install OCL on Windows, follow these instructions.

  1. Obtain the Python version of OpenCamLib (OCL).
    • Build from source using the Python version used by your FreeCAD version. Peter Lama's fork of the same source has project files for a MSVC build.
    • Download the Python 2.7 x86/x64 binary by sgrogan on GitHub.
    • Download the Python 3.6 x64 binary by sgrogan on GitHub.
  2. Navigate to your OCL build or binary folder
  3. Copy the ocl.pyd library file
  4. Proceed with one of the following four(4) options:
    • Navigate to your FreeCAD\lib folder, and paste the ocl.pyd file there. (This is the preferred option.)
    • Navigate to your FreeCAD\bin folder, and paste the ocl.pyd file there.
    • Navigate to your FreeCAD\Mod folder. Create a new folder, OCL. Enter the OCL folder and paste the ocl.pyd file.
    • Navigate to your %USERPROFILE%\AppData\Roaming\FreeCAD folder. Create a new folder, Mod. Enter the Mod folder. Create a new OCL folder. Enter the OCL folder and paste the ocl.pyd file. (This is the least preferred option.)
  5. Restart FreeCAD
  6. Verify proper installation
    1. Click ViewPanelsPython console.
    2. Type "import ocl" into the Python console and press the enter key.
    3. If no error appears, you have correctly installed OCL
      • If you receive an error:
        • Check the placement and name of the ocl.pyd file as instructed above
        • Verify the correct architecture type of the OCL library you installed - x86 or x64
        • Verify the Python version used to build the OCL library is the same as that of your FreeCAD software - 2.7 or 3.6 currently

Linux

The repository is here and contains basic installation instructions.

Before beginning installation, or during the installation process, you will probably find you need to install some additional packages:

For example:

   sudo apt install cmake
   sudo apt install libboost-program-options-dev
   sudo apt-get install doxygen
   sudo apt-get install texlive-full

Note: the "libboost-program-options-dev" may be substituted with "libboost-all-dev".

If you are struggling, carefully review any error messages you get during the cmake and make phases as you may need to install additional packages.

Python 3

In order to make a python 3 version you may need to upgrade to the latest version of cmake, as version 3.10 from the standard package does not make the appropriate python 3 files. Version 3.14 is known to work. (Run `cmake --version` to confirm you are on a later version).

Use these flags in the make phase:

   cmake -DBUILD_PY_LIB=ON -DUSE_PY_3=ON ../src -Wno-dev

See the FreeCAD forum at, Re: How to activate openCamLib after compiling it, and a few posts following.

Mac

(No entry)


More help

In case you run into difficulties, you may find additional help at these forum posts:

Acknowledgments

Thank you to Dr. Anders Wallin for providing OCL to the public.