Creating CNC roughing and finishing passes

Here's the place for discussion related to CAM/CNC and the development of the Path module.
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Creating CNC roughing and finishing passes

Postby quick61 » 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)
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
Russ4262
Posts: 360
Joined: Sat Jun 30, 2018 3:22 pm

Re: Creating CNC roughing and finishing passes

Postby Russ4262 » Sat Apr 13, 2019 9:18 pm

Afternoon, Nemesis.
I am glad you succeeded with multi-pass surface scans.
nemesis wrote:
Sat Apr 13, 2019 7:21 am
activating 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 14 times
User avatar
Wsk8
Posts: 83
Joined: Fri Dec 07, 2018 6:24 pm

Re: Creating CNC roughing and finishing passes

Postby Wsk8 » Sun Apr 14, 2019 9:31 am

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: 350
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Creating CNC roughing and finishing passes

Postby nemesis » Mon Apr 15, 2019 11:05 am

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

Re: Creating CNC roughing and finishing passes

Postby freman » Thu Dec 19, 2019 10:01 am

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.