Creating CNC roughing and finishing passes

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!
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Creating CNC roughing and finishing passes

Post by quick61 »

Giving the newest PathSurface.py a spin, I thought I found a bug in it, but as it turns out, it seems to of just exposed a bug elsewhere. This is what I was getting when I tried to load one of the tools from my tool library. -

Code: Select all

 Surfacing Select Mode
Traceback (most recent call last):
  File "/usr/share/freecad/Mod/Path/PathScripts/PathUtils.py", line 61, in new_function
    res = function(*args, **kwargs)
  File "/usr/share/freecad/Mod/Path/PathScripts/PathOp.py", line 477, in execute
    result = self.opExecute(obj)
  File "/usr/share/freecad/Mod/Path/PathScripts/PathSurface.py", line 250, in opExecute
    self.cutOut = (self.cutter.getDiameter() * (float(obj.StepOver) / 100.0))
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'getDiameter'
Turns out that when I was entering in my endmills, the tool type pulldown which displays EndMill, is not passed on when you click OK. I have to select any other tool type and change it back to EndMill before the Tool Type is entered into the library. Took a minute to figure out what was going on with that but once that got worked out...

Very nice job with the multipass (5th Element? :P ). Other than exposing that little bug in the tool library, so far so good.

Mark

OS: Kubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
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)
This post made with 0.0% Micro$oft products - GOT LINUX?
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Creating CNC roughing and finishing passes

Post by Russ4262 »

Afternoon, Nemesis.
I am glad you succeeded with multi-pass surface scans.
nemesis wrote: Sat Apr 13, 2019 7:21 amactivating it works just fine
I encourage you to download the latest release of the 3D Surface op script at this post: https://forum.freecadweb.org/viewtopic. ... 20#p299987
Russ4262 wrote: Tue Apr 09, 2019 4:44 am I'm attaching the updated Rev. 3t Usable script here also, for convenience. I will upload to my GitHub account also.
bonne chance,
Russell
Attachments
PathSurface_r3t-usable.py
PathSurface_r3t-usable.py
(87.74 KiB) Downloaded 44 times
User avatar
Wsk8
Posts: 182
Joined: Fri Dec 07, 2018 6:24 pm

Re: Creating CNC roughing and finishing passes

Post by Wsk8 »

quick61 wrote: Sat Apr 13, 2019 4:04 pm Giving the newest PathSurface.py a spin, I thought I found a bug in it, but as it turns out, it seems to of just exposed a bug elsewhere. This is what I was getting when I tried to load one of the tools from my tool library. -

Code: Select all

 Surfacing Select Mode
Traceback (most recent call last):
  File "/usr/share/freecad/Mod/Path/PathScripts/PathUtils.py", line 61, in new_function
    res = function(*args, **kwargs)
  File "/usr/share/freecad/Mod/Path/PathScripts/PathOp.py", line 477, in execute
    result = self.opExecute(obj)
  File "/usr/share/freecad/Mod/Path/PathScripts/PathSurface.py", line 250, in opExecute
    self.cutOut = (self.cutter.getDiameter() * (float(obj.StepOver) / 100.0))
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'getDiameter'
Turns out that when I was entering in my endmills, the tool type pulldown which displays EndMill, is not passed on when you click OK. I have to select any other tool type and change it back to EndMill before the Tool Type is entered into the library. Took a minute to figure out what was going on with that but once that got worked out...

Very nice job with the multipass (5th Element? :P ). Other than exposing that little bug in the tool library, so far so good.

Mark

OS: Kubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
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)
The whole tool controller seems faulty. A lot of tools (e.g. Centerdrill, chamfermill,...) don't save the entered values.

mfg
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Creating CNC roughing and finishing passes

Post by nemesis »

Russ4262 wrote: bonne chance,
Russell
thanks dor the updated script, it works much better.
it s really a good job!
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: Creating CNC roughing and finishing passes

Post by freman »

Just jumping in at the end of the very long thread having only read a few selected comments but ....

I terms of getting more evenly spaced paths to get a better finish on spherical / cylindrical objects would it be possible to calculate the offsets in spherical / cylindrical polar coordinates?

Instead of a fixed x or y increment, specifying an axis ( for cylinder ) or point for spherical would allow calculation of an array of offsets which could then be used to create cartesian paths in the customary way. Just I idea I thought I throw in for those who are looking improve this. This is the ultimate extension of earlier attempts to split the job to better deal with different parts of the sphere.

IMO one of the major defects in current 3D-paths is the lack of control over direction of cut. Alternating zig-zag cuts means the 50% of any job gets cut in a sub-optimal way. This really was the Achilles' heel when I was cutting a cylindrical section, especially when working with a ball-end tool. More rubbing than cutting going on.
Post Reply