OpenCAMlib for Windows

Here's the place for discussion related to CAM/CNC and the development of the Path module.
User avatar
JoshM
Posts: 420
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: OpenCAMlib for Windows

Postby JoshM » Mon Dec 04, 2017 8:39 pm

I was hoping for some help on this same topic.

I compiled the ocl.pyd VisualStudio2017.

I dropped ocl.pyd into Freecad-Path\MOD\Path\ folder for the version of FC I am currently using, but had no success. I also tried it in the C:\Users\........\AppData\Roaming\FreeCAD/Macro folder, and had no success getting the Surface Op to work on a simple shape.

Any advice is greatly appreciated.

Best Regards,
Josh


OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12643 (Git)
Build type: Release
Branch: master
Hash: 868d9cc6c215ce3a2ab20d454378ec00e1b9ed26
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
Microsoft Visual Studio Community 2017
Version 15.4.5
VisualStudio.15.Release/15.4.5+27004.2010
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Community

Visual Basic 2017 00369-60000-00001-AA031
Microsoft Visual Basic 2017

Visual C# 2017 00369-60000-00001-AA031
Microsoft Visual C# 2017

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

ASP.NET and Web Tools 2017 15.0.30925.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services 1.0
Provides languages services for ASP.NET Core Razor.

JavaScript Language Service 2.0
JavaScript Language Service

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

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
Attachments
FC_Test_Shape2.FCStd
(31.14 KiB) Downloaded 37 times
GeneFC
Posts: 1025
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: OpenCAMlib for Windows

Postby GeneFC » Tue Dec 05, 2017 1:58 am

I am not sure, but I suspect that compiling with VS 2017 may be a problem. FC is still compiled with VS2013.

I used the procedure outlined earlier in this thread to compile ocl.pyd (using VS 2013) and it works in the current versions of FC. However, ocl has not really been integrated into the Path workbench in a complete manner. There are no controls available for spacing of machining paths, for example. The attached image is from a very simple application of 3D-Surface to your file.

FC_Test_Shape2.jpg
FC_Test_Shape2.jpg (155.19 KiB) Viewed 948 times

Because of license issues the "management" of FC is reluctant to package and distribute ocl with the rest of the files. No license problem adding it yourself.

If you have VS 2013 then give it a try.

Gene
User avatar
JoshM
Posts: 420
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: OpenCAMlib for Windows

Postby JoshM » Tue Dec 05, 2017 2:31 am

Thanks Gene--appreciate your advice. I'll have to dig a bit harder and find our older VS.

I get the licensing issues, no complaints there.

Are you suggesting the utility added isn't something you use much because it's whole object, less controllable?

Best,
Josh
GeneFC
Posts: 1025
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: OpenCAMlib for Windows

Postby GeneFC » Tue Dec 05, 2017 3:16 pm

Josh,

I don't know whether the limitations are due primarily to an unfinished user interface (as reported by Sliptonic some time ago) or to fundamental deficiencies in the ocl primitives.

As shown in the image above, the tracks are pretty widely spaced. The resulting cut with an ordinary ball-end cutter would not be pretty. The spacing is hard-coded in the PathSurface.py file as a substantial fraction of the cutter diameter. I have played around with changing those stepover values, and improvement can be made. You could probably fake the cutter diameter to accomplish the same thing.

However, my Python-fu is too weak to make coherent improvements to the code which could then be added into FC.

Gene
User avatar
JoshM
Posts: 420
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: OpenCAMlib for Windows

Postby JoshM » Tue Dec 05, 2017 3:23 pm

That makes sense Gene. I'll back-burner this for the time-being then. That example shape is just a copy of what I've seen most examples, so I'm not really in need of making it--but, my guess is that using the FC-Path 3D pocket, and Outside Contour Cuts, you could probably get a decent job done... Best,
Josh
Fborato
Posts: 1
Joined: Mon Jun 04, 2018 8:24 pm
Location: Jundiaí, São Paulo, Brazil

Re: OpenCAMlib for Windows

Postby Fborato » Thu Jun 07, 2018 3:25 pm

Hi,
I would like some help!! I'm new in this forum and i'd like know how can'i do it works on Freecad using the archives.
Do it work only pasting the ocl file inside the right place or is necessary something else?

Thanks in advance
sgrogan wrote:
Tue Jul 11, 2017 9:02 pm
peterl94 wrote:
Tue Jul 11, 2017 2:41 am
Licenses... :( Couldn't we just provide a windows build of ocl?
OK, how about something like this? https://github.com/sgrogan/opencamlib/r ... ag/8612634
chrisb
Posts: 22402
Joined: Tue Mar 17, 2015 9:14 am

Re: OpenCAMlib for Windows

Postby chrisb » Thu Jun 07, 2018 7:18 pm

Fborato wrote:
Thu Jun 07, 2018 3:25 pm
Hi,
I would like some help!! I'm new in this forum and i'd like know how can'i do it works on Freecad using the archives.
Do it work only pasting the ocl file inside the right place or is necessary something else?
Hi Fborato, welcome to the forum.
I don't understand what you mean by "using the archives", please explain in more detail.

For ocl to work you have to compile and install it yourself. Can you please post your FreeCAD info? In the Help section there is a link on a red banner telling you how to do so.
User avatar
sgrogan
Posts: 5634
Joined: Wed Oct 22, 2014 5:02 pm

Re: OpenCAMlib for Windows

Postby sgrogan » Thu Jun 07, 2018 9:42 pm

Hello Fborato and JoshM

An OCL build that works for FreeCAD 0.17 and 0.18 (VS2013) is available here: https://github.com/sgrogan/opencamlib/r ... ag/8612634
OCL module for windows using FreeCAD's Libpack for dependencies.
Download and extract to "C:\Users\USERNAME\AppData\Roaming\FreeCAD\Mod" directory
In the ..../Mod directory you will get a .../Mod/python27_x64-ocl sub-directory. The key file is ocl.pyd. After extraction re-start FreeCAD and in the python console enter

Code: Select all

import ocl
If there are no errors, then the library works and I defer to the Path guru's.

I think if I include a license file I may be able to move this to the FreeCAD releases page? Not sure how to handle this, that is why it's on my GitHub.
mlampert
Posts: 1460
Joined: Fri Sep 16, 2016 9:28 pm

Re: OpenCAMlib for Windows

Postby mlampert » Thu Jun 07, 2018 11:00 pm

sgrogan wrote:
Thu Jun 07, 2018 9:42 pm
I think if I include a license file I may be able to move this to the FreeCAD releases page? Not sure how to handle this, that is why it's on my GitHub.
Since this is GPLv3 library I would prefer it not being on the FC release page or its installation be automatically supported or facilitated.
RatonLaveur
Posts: 468
Joined: Wed Mar 27, 2019 10:45 am

Re: OpenCAMlib for Windows

Postby RatonLaveur » Thu Mar 28, 2019 1:56 pm

Hello gentlemen,

I'm sorry but I'm at a loss here, due, mainly, to a gross ineptitude in coding and understanding dependencies.
Issue: I canno't seem to build the ocl.pyd

OS: Windows 7
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: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Switzerland (fr_CH)

Method:
1. installed FreeCAD 0.18
2. check that I have (and I have) Python27 and Python33 (for other reasons) on my computer.
3. Pulled the https://github.com/fra589/opencamlib for Windows.
4. Followed the readme and compiled Boost 1.62.0 in the suggested path C:\Program Files\boost\boost_1_62_0
5. [Potential issue] don't exactly know where to place the suggested user-config.jam.
6. Download and installed Visual Studio 2013
7. Opened the OpenCamLib project in VS2013
8. Compiled:

[CORE ISSUE] I get 250 something errors LNK2001 unresolved external symbol linked to libboost_python-vc120-mt-1_62.lib

By looking online, it seems that I am not calling this library correctly. I checked that the library was there after my boost compile, and it is. I checked that the paths were setup in my computer and on Visual Studio 2013 according to fra589 readme, and they are.

Essentially I am at a loss. I anyone able to help with this?
If you need any further information don't hesitate to ask.
Thanks in advance!