OpenCAMLib for Master (0.20)

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!
Zivatar
Posts: 23
Joined: Thu Nov 12, 2020 5:31 pm

Re: OpenCAMLib for Master (0.20)

Post by Zivatar »

chrisb wrote: Thu Sep 30, 2021 6:00 pm
Zivatar wrote: Thu Sep 30, 2021 5:55 pm Problem solved, everything is fine!
Good to hear. Did it come as OCL or was this a name given by you - which you fixed later? I ask because if it's the former, I could add it to the known issues.
I followed this wiki - https://wiki.freecadweb.org/OpenCamLib - but the linux part does not mention the symlinking procedure and which folder to put the symlink in neither. Because of this reason I tried the recommendations in the Windows section of the wiki page, which is about 'OCL' folder. After compilation of opencamlib I created the OCL folder and the symlink inside.

Thanks again!
chrisb
Veteran
Posts: 54207
Joined: Tue Mar 17, 2015 9:14 am

Re: OpenCAMLib for Master (0.20)

Post by chrisb »

A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Zivatar
Posts: 23
Joined: Thu Nov 12, 2020 5:31 pm

Re: OpenCAMLib for Master (0.20)

Post by Zivatar »

There is a different problem with my ocl:

Code: Select all

Traceback (most recent call last):
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathUtils.py", line 60, in new_function
    res = function(*args, **kwargs)
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathOp.py", line 760, in execute
    result = self.opExecute(obj)  # pylint: disable=assignment-from-no-return
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathSurface.py", line 510, in opExecute
    self.cutter = oclTool.getOclTool()
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathSurfaceSupport.py", line 2649, in getOclTool
    oclToolMethod()
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathSurfaceSupport.py", line 2559, in _oclBallCutter
    self.oclTool = self.ocl.BallCutter(
<class 'AttributeError'>: module 'ocl' has no attribute 'BallCutter'
And then I tried:

Code: Select all

>>> import ocl
>>> dir(ocl)
['__doc__', '__loader__', '__name__', '__package__', '__path__', '__spec__']
>>> 
... Because I found the topic https://forum.freecadweb.org/viewtopic.php?t=57381 and the checkbox is checked: Enable OCL dependent features.

Do You have ideas?

Edited: All tools throws error, even the endmill also...
Zivatar
Posts: 23
Joined: Thu Nov 12, 2020 5:31 pm

Re: OpenCAMLib for Master (0.20)

Post by Zivatar »

Hello guys,

I have been investigated the situation as I could, and the following additions I have:
The most commands of the Path workbench of the Appimage:

Code: Select all

OS: openSUSE Leap 15.3 (GNOME/default)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.19.2)
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
does not work for me, either. (e.g the drilling function, which is not related to opencamlib I think),
while the Path commands of the compiled version:

Code: Select all

OS: openSUSE Leap 15.3 (GNOME/default)
Word size of FreeCAD: 64-bit
Version: 0.20.25935 (Git)
Build type: Unknown
Branch: master
Hash: 745f8e044d6bef5fe33a75828dfd63dafb500984
Python version: 3.6.13
Qt version: 5.12.7
Coin version: 3.1.3
OCC version: 7.5.3
works pretty well. I mean all commands of the compiled are working in Path wb, except the Opencamlib related ones, and all of opencamlib related commands give similar errors to:
e.g: Waterline:

Code: Select all

File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathOpGui.py", line 1156, in clicked
    self.panelGetFields()
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathOpGui.py", line 1171, in panelGetFields
    page.pageGetFields()
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathOpGui.py", line 236, in pageGetFields
    self.getFields(self.obj)
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathWaterlineGui.py", line 68, in getFields
    PathGui.updateInputField(obj, 'BoundaryAdjustment', self.form.boundaryAdjustment)
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathGui.py", line 57, in updateInputField
    if not PathGeom.isRoughly(attrValue, value):
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathGeom.py", line 92, in isRoughly
    return math.fabs(float1 - float2) <= error
<class 'TypeError'>: unsupported operand type(s) for -: 'float' and 'NoneType'
the 3D Surface:

Code: Select all

Traceback (most recent call last):
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathUtils.py", line 60, in new_function
    res = function(*args, **kwargs)
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathOp.py", line 760, in execute
    result = self.opExecute(obj)  # pylint: disable=assignment-from-no-return
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathSurface.py", line 510, in opExecute
    self.cutter = oclTool.getOclTool()
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathSurfaceSupport.py", line 2649, in getOclTool
    oclToolMethod()
  File "/home/zivatarw/MyDev/freecad-build/Mod/Path/PathScripts/PathSurfaceSupport.py", line 2559, in _oclBallCutter
    self.oclTool = self.ocl.BallCutter(
<class 'AttributeError'>: module 'ocl' has no attribute 'BallCutter'
for me it smells like something symlink is not present at its place, or folder/file name is all lowercase and the PathScripts can not find their needed content. Unfortunately i am not good in python (YET), so this is why I ask others who are better than me in this topic. :)
All the files in the compiled OpenCamLib folder are lowercase in spite of the FreeCAD's camelCase style. I don't know whether it is a useful information.

Kind Regards,
Tivadar
Zivatar
Posts: 23
Joined: Thu Nov 12, 2020 5:31 pm

Re: OpenCAMLib for Master (0.20)

Post by Zivatar »

Update:
Drilling on the mentioned AppImage says:

Code: Select all

'FeaturePython' object has no attribute 'EnableRotation'
Zivatar
Posts: 23
Joined: Thu Nov 12, 2020 5:31 pm

Re: OpenCAMLib for Master (0.20)

Post by Zivatar »

Does anyone have the same issue? Can someone help me to solve this? I am very interested to try these awesome features!
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: OpenCAMLib for Master (0.20)

Post by GeneFC »

I think you will need to explain better what you are seeing.

A sample FCStd file would be very useful.

Gene
Zivatar
Posts: 23
Joined: Thu Nov 12, 2020 5:31 pm

Re: OpenCAMLib for Master (0.20)

Post by Zivatar »

GeneFC wrote: Fri Oct 08, 2021 11:45 pm I think you will need to explain better what you are seeing.

A sample FCStd file would be very useful.

Gene
Dear Gene,
Thank You for Your attention! I attached the FCStd file
Test.FCStd
(34.6 KiB) Downloaded 48 times
, and now my FreeCAD is:
OS: openSUSE Leap 15.3 (GNOME/default)
Word size of FreeCAD: 64-bit
Version: 0.20.25996 (Git)
Build type: Unknown
Branch: master
Hash: 5bb00636d53732e2026d2096889c86f18ac590cb
Python version: 3.6.13
Qt version: 5.12.7
Coin version: 3.1.3
OCC version: 7.5.3

Story:
I intend to use the 3d surface milling command, with the ocl installed (I am not sure whether every ocl related file is at its place, but I can access the command 3dSurface operation, and it looks like it works.)
the report I got after I apply the setup:

Code: Select all

17:37:56  Failed to map selected tool to an OCL tool type.
17:37:56  PathSurface.ERROR: Canceling 3D Surface operation. Error creating OCL cutter.
Earlier I tried this with an earlier version of FreeCAD, details can be read in this thread above.

Thank You,Zivatar
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: OpenCAMLib for Master (0.20)

Post by GeneFC »

When I tried to run your file I got an error message that the tool Shape File could not be found. That is why the selection of the OCL tool cannot work.

When I added my own tool of the same size and type (6mm ballend) the surface worked as expected.

I cannot really say exactly what is happening in your installation. My guess is that the names do not match correctly. Make sure the exact spelling is used for the tool consistently.

For example your tool is called ZWBallendD6. Does that match the files in the tool library?

Another possibility is that there are some non-ASCII characters in the file path. It should work, but sometimes those non-ASCII characters can cause problems.

Gene
Zivatar
Posts: 23
Joined: Thu Nov 12, 2020 5:31 pm

Re: OpenCAMLib for Master (0.20)

Post by Zivatar »

GeneFC wrote: Sun Oct 10, 2021 4:49 pm When I tried to run your file I got an error message that the tool Shape File could not be found. That is why the selection of the OCL tool cannot work.

When I added my own tool of the same size and type (6mm ballend) the surface worked as expected.

I cannot really say exactly what is happening in your installation. My guess is that the names do not match correctly. Make sure the exact spelling is used for the tool consistently.

For example your tool is called ZWBallendD6. Does that match the files in the tool library?

Another possibility is that there are some non-ASCII characters in the file path. It should work, but sometimes those non-ASCII characters can cause problems.

Gene
Thank You Gene,

I did not think about the filename mismatch, and now I double checked. Everything seems to be ok, however in the attached file there is a mismatch at tools! After that I rebuilt everything (FreeCAD itself also), because the problem is still active. Every directories are clean now. I rebuilt the tools dictionaries and made doublecheck on tool files (which are now the defaults, and I set default tools in the settings of the command's panel...

Could you tell me what files are in Your FreeCAD/Mod/ocl/ folder? I think something is wrong there on my computer.

Thanks,
Zivatar
Post Reply