External Thread Milling

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!
Post Reply
jurij
Posts: 22
Joined: Tue Oct 23, 2018 11:37 am

External Thread Milling

Post by jurij »

Hi,

I think there are some bugs in External Thread Milling operation.

1) Selecting RightHand Orientation of the thread left handed thread is generated (see Job 1).
2) Major and Minor Diameter are swapped. In a single pass it just mills at major diameter (see Job 1), at Multi Passes it starts first milling internally and the going out to the major diameter (see Job2).
3) If Origin is selected at the bottom of the body, " Invalid value NaN" error is generated.
thread.FCStd
(31.07 KiB) Downloaded 31 times

Code: Select all

OS: Fedora 33 (Workstation Edition) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.20)
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.9.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * fasteners 0.3.50
  * FeedsAndSpeeds 0.4.0

The model is attached.

Jurij
Attachments
thread.png
thread.png (31.77 KiB) Viewed 1839 times
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: External Thread Milling

Post by mlampert »

Confirmed - I only looked at the first issue so far. 'seems it does everything in reverse. Left hand for Right hand and vice versa, and it mills from the bottom up. It does the right thing if the top face of the cylinder is used as the base geometry, in which case it only mills half a turn. If one sets the final depth manually it flips back to milling the wrong direction again.

I'll have a look, thanks for reporting.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: External Thread Milling

Post by mlampert »

There are a few things going on here. PR-7333 takes care of the functionality. In a bout of sheer madness I had compensated for external threads twice which led to this unfortunate behaviour.

There is an additional issue which affects the visualisation of Job2's resulting Path:
path.png
path.png (17.09 KiB) Viewed 1668 times
notice that there are only 1 and half passes, instead of 3. And that the Path just ends (red circle) without a move to safe height or even out of the thread. Looking at the Path commands though, the entire 3 passes are present. And using the Path Inspector and highlighting everything the entire Path shows up:
path-hl.png
path-hl.png (26.15 KiB) Viewed 1668 times
I don't know what's going on here - it's a separate issue I'll have to look into.

Finally, in case the values of the custom thread are not just for demonstration purposes, be aware that a thread like that is physically not possible.
jurij
Posts: 22
Joined: Tue Oct 23, 2018 11:37 am

Re: External Thread Milling

Post by jurij »

Thank you for the fixes.

Regarding Job2 I would like to apologize. I just wanted to show that the milling starts first inside and then go to the outer path which is wrong. Because of that I have in View set Show Count just up to 39. This has created the confusion.

Yes the model is made just for the demonstration. I have otherwise successfully machined 1/2'' BSP external thread but have found all these problems.

Jurij
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: External Thread Milling

Post by mlampert »

jurij wrote: Mon Aug 08, 2022 8:26 am Yes the model is made just for the demonstration. I have otherwise successfully machined 1/2'' BSP external thread but have found all these problems.

Jurij
Yay - that is awesome - in case you have a picture, would you mind posting it? AFAIK you're the first to mill an external thread! Very cool!
jurij
Posts: 22
Joined: Tue Oct 23, 2018 11:37 am

Re: External Thread Milling

Post by jurij »

Hi,

Here is the part, made from stainless steel:
thread.jpeg
thread.jpeg (38.39 KiB) Viewed 1522 times
Up to now I have used proper multi thread thread mills and code generator from Vardex. This time I have used a modified thread turning tool:
thread_mill.jpeg
thread_mill.jpeg (29.52 KiB) Viewed 1522 times
Jurij
jurij
Posts: 22
Joined: Tue Oct 23, 2018 11:37 am

Re: External Thread Milling

Post by jurij »

Hi,

I was doing again external thread milling. The code works better now but I found another issue. With two passes operation and enabled Lead In/Out the tool moves through the stock between the end of the first pass and the beginning of the second pass. In practice the tool would crash into material.

Jurij
test.png
test.png (45.31 KiB) Viewed 1266 times

Code: Select all

OS: Fedora 33 (Workstation Edition) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.20.1)
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * fasteners 0.3.50
  * FeedsAndSpeeds 0.4.0
Attachments
test.FCStd
(26.67 KiB) Downloaded 28 times
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: External Thread Milling

Post by mlampert »

that's bad - I'll have a look, will take a bit though, gotta compile an old branch to look at your file.
jurij
Posts: 22
Joined: Tue Oct 23, 2018 11:37 am

Re: External Thread Milling

Post by jurij »

Hi,

I have used the same model with the latest weekly build version. Still the same problem. Updated model is attached.

Code: Select all

OS: Fedora 33 (Workstation Edition) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.21.0.31340 (Git) AppImage
Build type: Release
Branch: master
Hash: 856af2a12287a2d7c0d5ab23646be43af26b14b1
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * fasteners 0.3.50
  * FeedsAndSpeeds 0.4.0
Attachments
test21.FCStd
(26.77 KiB) Downloaded 25 times
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: External Thread Milling

Post by mlampert »

The issue #7855 is still open. I'm working on it but can't assign issues to myself to reflect the status.
Post Reply