OpenCAMlib for Windows

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!
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: OpenCAMlib for Windows

Post by RatonLaveur »

It's as if you spoke from experience...
You win this one. Although the drape anomaly might be of the best effect in a more artistic mindset. I'll keep you updated on my first machining result.

Thank you Walter

Jerry.
User avatar
roerich_64
Veteran
Posts: 1465
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: OpenCAMlib for Windows

Post by roerich_64 »

Jerry,
please do a test:

load the file from me and do nothing. You find it here: https://forum.freecadweb.org/viewtopic. ... 40#p298411
But do:
- say "import ocl" and enter in the python console
- right click at surface in job001
- click "mark to recalculate"
- click recompute

What is your result?
Die Liebe wird siegen, denn sie ist unzerstörbar :) ;)
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: OpenCAMlib for Windows

Post by RatonLaveur »

Good morning Walter, (and everyone)

Was home for the night, so I could only run your test now,

Once I recompute the file, the tool path is right back at stock Z position as shown in attached screenshots.
Seems to me that the value OpFinalDepth is saved locally somehow, and recomputing forces it to read the value and overrides what the file initially had as input. See further screens.

Keep your questions coming, I'm happy to give back.

Note: I got a few crashes to desktop yesterday while playing around with the tool path. Nothing I worry about but where should I share the issue once I can repeat/document ?

EDIT: Supplementary information regarding artifacts at the edges of protruding or depressed geometry.

I read through the other topic you linked here pertaining to this issue
https://forum.freecadweb.org/viewtopic. ... 10#p297828

I can confirm that rounding, chamfering, sampling rate and tool diameter do not remove the behavior, as suggested in the other post. It can only suppress it partially. Hope that is useful.

Jerry.
Attachments
OpFinalDepth_after.png
OpFinalDepth_after.png (19.07 KiB) Viewed 2373 times
OpFinalDepth_Before.png
OpFinalDepth_Before.png (19.11 KiB) Viewed 2373 times
AfterRecompute.png
AfterRecompute.png (190.06 KiB) Viewed 2373 times
BeforeRecompute.png
BeforeRecompute.png (192.81 KiB) Viewed 2373 times
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: OpenCAMlib for Windows

Post by RatonLaveur »

Gentlemen,

I have done few more experiments on the topic:

With Walter's kind feedback and work on https://forum.freecadweb.org/viewtopic. ... &start=120
The keywords "mesh" and "resolution" entered the discussion
I have searched FreeCAD for the exporting behavior pertaining to mesh: https://forum.freecadweb.org/viewtopic.php?t=13658
then I was on my way:

Attached you will find an example of a splined element made in Part_Design. The 3D surface algorithm is not quite right.
I took the part, and exported to .stl with two different resolutions: standard(0.5%;28°) and fine (0.1%;15°) in Edit\Preference\PartDesign\ShapeView.
I'm not sure if this is the right approach.

Regardless: both meshing operations to .STL files were reconverted via "Create shape from mesh": the result is stunning, the path looks fine. No particular effect of the Standard or Fine approach i mention is found. Both cases work.

Hopefully this contributes to the conversation.
Attachments
FromPartDesign.png
FromPartDesign.png (272.77 KiB) Viewed 2348 times
AfterSTLconversion_Reconvertedtoshape.png
AfterSTLconversion_Reconvertedtoshape.png (399.06 KiB) Viewed 2348 times
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: OpenCAMlib for Windows

Post by Russ4262 »

Evening Gentlemen,
Great news! Great news! openCamLib (OCL) for Python 3.6 is doable. I just finished compiling and testing in a recent FC Conda PY3-Qt5 release!

First, I would like to thank
sgrogan wrote: Sun Jul 09, 2017 6:24 pm@Sgrogan
for his provision of the Python 2.7 OCL package he has had available for a while now. It has allowed me to assist in with the development of the PathWB and enjoy the wonderful CAM features in FC.


Furthurmore, I would like to thank
peterl94 wrote: Sat Jul 08, 2017 10:57 pm@PeterL94
for his update to the OCL source and making the Windows MSVS project files available.

I second, SGrogan's, "Thank-you very, very much peterl94!!! :D :D :D"

Mostly, I should thank @AeWallin (don't know his FC handle) for the wonderful OCL library. It works wonders! Thanks!

I compiled from source, combining AeWallin's active GH repo, with the Windows files from PeterLama's GH fork. I used Boost 1.70. I followed the instructions in PeterLama's README file in his Windows directory. I had to learn a hard lesson with the user-config.jam file !! PLACE YOUR BOOST AND PYTHON LIBRARIES IN PATHS THAT CONTAIN NO SPACES. If someone can tell me how to use paths with spaces in the .jam file for Boost on Windows, I'd really appreciate it. Also, you do not need to compile all of the Boost libraries. You only need the python library. You can limit this at the command line and save lots, and lots, and lots, and lots of time.

My next goal is to learn to compile FreeCAD from source, using APeltauer's resources for Windows users.

Thanks and good-night,
Russell


OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16267 (Git)
Build type: Release
Branch: master
Hash: ddb335cfe057336f1958d68126bb0471328d735c
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

MSVS 2017-Community Ed.
Microsoft Visual Studio Community 2017
Version 15.9.11
VisualStudio.15.Release/15.9.11+28307.586
Microsoft .NET Framework
Version 4.7.03190

Installed Version: Community

Visual C++ 2017 00369-60000-00001-AA693
Microsoft Visual C++ 2017

Application Insights Tools for Visual Studio Package 8.14.20131.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017 15.9.04012.0
ASP.NET and Web Tools 2017

Azure App Service Tools v3.0.0 15.9.03024.0
Azure App Service Tools v3.0.0

C# Tools 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Cookiecutter 15.9.18254.1
Provides tools for finding, instantiating and customizing templates in cookiecutter format.

IncrediBuild Build Acceleration 1.5.0.3
IncrediBuild effectively reduces compilation and development times by up to 90%.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

JavaScript UWP Project System 2.0
JavaScript UWP Project System

Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.0.0

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package

MLGen Package Extension 1.0
MLGen Package Visual Studio Extension Detailed Info

NuGet Package Manager 4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Python 15.9.18254.1
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

Python - Django support 15.9.18254.1
Provides templates and integration for the Django web framework.

Python - IronPython support 15.9.18254.1
Provides templates and integration for IronPython-based projects.

Python - Profiling support 15.9.18254.1
Profiling support for Python projects.

ResourcePackage Extension 1.0
ResourcePackage Visual Studio Extension Detailed Info

Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.

TypeScript Tools 15.9.20918.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for CMake 1.0
Visual Studio Tools for CMake

Visual Studio Tools for Universal Windows Apps 15.0.28307.556
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
Attachments
MSVS 2017 info
MSVS 2017 info
MSVS2017-communityED.png (26.71 KiB) Viewed 2247 times
OCL for Python 3.6 x64 arch. - Let's build!
OCL for Python 3.6 x64 arch. - Let's build!
OCL_Python36_x64.png (95.04 KiB) Viewed 2247 times
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: OpenCAMlib for Windows

Post by chrisb »

Russ4262 wrote: Tue Apr 16, 2019 4:55 am Great news! Great news! openCamLib (OCL) for Python 3.6 is doable.
Great news, indeed! Is the Python3 version available for other OSs as well?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: OpenCAMlib for Windows

Post by Russ4262 »

chrisb wrote: Tue Apr 16, 2019 5:38 am... Is the Python3 version available for other OSs as well?
Chris,
I don't know. I am not familiar with cross-platform compiling. I only have a windows machine at the moment. I could attempt to compile the 32 bit version for windows users.

I need more education on licensing before I can post any compiled packages. I'll gladly post what I have for windows users when I know I am not breaking any licensing restrictions.

I can post the instructions(process) I followed, with a list of resources used. I'll have to type that up.

Russ
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: OpenCAMlib for Windows

Post by chrisb »

Some time back the authors of OCL have agreed to put it under the same license as FreeCAD, so we even could distribute it in a package.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: OpenCAMlib for Windows

Post by sgrogan »

Russ4262 wrote: Tue Apr 16, 2019 3:03 pm I need more education on licensing before I can post any compiled packages. I'll gladly post what I have for windows users when I know I am not breaking any licensing restrictions.
OCL is LPGL like FreeCAD so if you include the copyright file we should be good. I looked at the copyright file from kkremitzki on the community extras PPA and it looks like this when I open in win

Code: Select all

Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: OpenCAMLib
Upstream-Contact: Anders Wallin <anders.e.e.wallin@gmail.com>
Source: https://github.com/aewallin/opencamlib
Comment: The following files were removed because
 Windows: Windows cruft
Files-Excluded: Windows

Files: *
Copyright: 2011-2018 Anders Wallin <anders.e.e.wallin@gmail.com>
License: LGPL-2.1

License: LGPL-2.1
  On Debian systems, the complete text of the GNU Lesser General Public
  License version 2 can be found in `/usr/share/common-licenses/LGPL-2.1'.
If you include this with ocl.pyd file you've done better than me. kkremitzki is an upstream Debian packager, therefor he is well versed in honoring license requirements.
Russ4262 wrote: Tue Apr 16, 2019 3:03 pm I can post the instructions(process) I followed, with a list of resources used. I'll have to type that up.
I'd be very interested in this. There should be no reason to compile a new boost-python, we should be able to just link against the one we are using to compile FreeCAD. If you want you can PM me the ocl.pyd and I can test if it works without the boost-python you used. I think the lib is statically linked but I'm not sure.

And yes, peterl94 is awesome :)
"fight the good fight"
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: OpenCAMlib for Windows

Post by sgrogan »

chrisb wrote: Tue Apr 16, 2019 5:38 am Great news, indeed! Is the Python3 version available for other OSs as well?
See here for Debian based systems https://forum.freecadweb.org/viewtopic.php?f=4&t=35522
"fight the good fight"
Post Reply