3d milling algo

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
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: 3d milling algo

Post by JoshM »

I fixed the bug I had where extraneous faces were processed. Dumb things still get me because I'm new to Python.
Job17.png
Job17.png (268.91 KiB) Viewed 784 times
This cuts the time down. I will still need to figure out how to step up the surfacing pass that is now in place. Does it even makes sense to bother since roughing can be used to clear the stock above the face already?
Attachments
SquareEndmillMillingToolpath.FCMACRO
(18.36 KiB) Downloaded 38 times
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: 3d milling algo

Post by JoshM »

I tried preliminary work adding in Cones. It looks hopeful, though it highlights an area I have a bug, not parsing through all faces when a single input-face is split when selecting the millable portion. This also shows why this will ultimately need some better degree of targeting, or correction of cuts where conflicts result. For example, here the cone open angle face is overshadowed by the cone itself--a problem...
Job18.png
Job18.png (183.73 KiB) Viewed 774 times
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: 3d milling algo

Post by JoshM »

I've pushed this a bit further, and mostly good results. I still need to implement a Cut Tool to eliminate contentions including overshadowing
Job19.png
Job19.png (175.27 KiB) Viewed 721 times
and faces cutting into other faces.


I am a bit perplexed about where I'm going wrong in generating an offset face for a Cone.
Job20.png
Job20.png (160.8 KiB) Viewed 721 times
The general algo works, but there's an error at the offset Face generation which is then propagated through.
Job21.png
Job21.png (186.82 KiB) Viewed 721 times

I'm curious if it's a precision error? Any advice is appreciated.
Attachments
Dev001.FCStd
(47.7 KiB) Downloaded 33 times
SquareEndmillMillingToolpath.FCMACRO
(18.81 KiB) Downloaded 37 times
dino
Posts: 113
Joined: Mon Sep 22, 2014 11:28 pm

Re: 3d milling algo

Post by dino »

I have tried to use your script on FC 0.19 but not working, there is a new one or the project is dead?
Can explain how to use it?

Thank you
Dino

OS: Devuan GNU/Linux 3 (beowulf)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19667 (Git) AppImage
Build type: Release
Branch: master
Hash: 97de09ad6f1bc642d1f1e322d07e537c96cdb760
Python version: 3.8.1
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: Italian/Italy (it_IT)
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: 3d milling algo

Post by JoshM »

Hi Dino,
I worked on that in v17. It's been a while, and I stopped work on it a while ago. If I recall, the idea was to select an object, then run the script, but it's been a while... Sorry. I'm curious what your interest is, as Russ has really made OCL very functional for 3d CAM in Path WB?
Best,
Josh
Post Reply