Circle + Filled = wrong path

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
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Circle + Filled = wrong path

Post by MRx »

Hi,

First of all this object can be milled and it's okay, however when looking at the details the path is not okay and there are some optical issues in FreeCAD which should be fixed in the sourcecode.

first one is an example where the path is clearly a bit wrong:
circle_plus_chamfer.png
circle_plus_chamfer.png (38.99 KiB) Viewed 1777 times
wrong_path.png
wrong_path.png (31.84 KiB) Viewed 1777 times

second one is an extensions preview bug (but the actually generated surface seems to be okay):
circle_plus_chamfer1.png
circle_plus_chamfer1.png (77.16 KiB) Viewed 1777 times
OS: macOS 10.15
Word size of FreeCAD: 64-bit
Version: 0.20.25267 (Git)
Build type: Release
Branch: master
Hash: cfcf8df4cee1b467f51b7ad2903b4bd377d5a8c7
Python version: 3.9.0
Qt version: 5.15.2
Coin version: 4.0.0
OCC version: 7.5.0
Locale: English/Germany (en_DE)
Attachments
circlesurface.FCStd
(335.34 KiB) Downloaded 38 times
Last edited by MRx on Mon Oct 18, 2021 8:49 pm, edited 1 time in total.
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Circle + Filled = wrong path

Post by MRx »

circle_chamfer_top_corner.png
circle_chamfer_top_corner.png (23.67 KiB) Viewed 1768 times
(small update: this is wrong because the stock was not large enough in the sample, however if the stock is getting extended there will be a small circle added infront of the "nose")
circle4.png
circle4.png (22.87 KiB) Viewed 1727 times
Another object (source object not uploaded, but shows the "nose" effect more clear):
circle5.png
circle5.png (11.5 KiB) Viewed 1727 times
circle_chamfer3.png
circle_chamfer3.png (81.6 KiB) Viewed 1768 times
circlesurface.FCStd
(353.92 KiB) Downloaded 42 times
CoderMusashi
Posts: 92
Joined: Mon Nov 19, 2018 8:26 pm

Re: Circle + Filled = wrong path

Post by CoderMusashi »

Nothing is wrong with the source code. Simple operator error in this instance. Your stock is not set correctly. First I tried with just Create Box and after seeing that works just fine I changed it back to Extend Model's Bound Box and it centered itself just right. Your stock sets your Boundary Box for your Job. Hopefully in the future we can have more boundaries based on wires or polylines for individual operations.
circlesurface.png
circlesurface.png (136.2 KiB) Viewed 1665 times
Toolpath if I set the origin to top left corner of the Stock.... I stand by what I believe I don't think it is a source code error.. Even running in the emulator the toolpath looked good. I will admit there are some strange toolpaths generated but functional.
Attachments
circlesurface2.png
circlesurface2.png (72.09 KiB) Viewed 1582 times
Last edited by CoderMusashi on Tue Oct 19, 2021 6:39 am, edited 2 times in total.
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Circle + Filled = wrong path

Post by MRx »

Hi,

I disagree, it's definitely no user issue. I have also mentioned that the stock was not aligned in one case yes - but that's not the main issue here.

sorry your screenshot is a bit small (I took the screenshot from your picture), there's a path issue on the left top side:
2QMokp.png
2QMokp.png (12.25 KiB) Viewed 1619 times
why does it go down there? - there's no reason.
this issue is more severe with another object which I have (see circle5.png)

As mentioned in the first post I was able to mill it but there are several settings available which produce the wrong path.
Also look at: wrong_path.png

I've done a lot path source updates on my side in the past and I know that the code does not cover all situations properly.
This object is useful for testing and fixing recent issues which I have seen in the path workbench.
jescombe
Posts: 90
Joined: Tue Mar 09, 2021 4:19 pm

Re: Circle + Filled = wrong path

Post by jescombe »

Hi, regarding the problem in the 2nd image of your original post - I think if you set a tiny amount of stock to leave (0.001mm) in the adaptive toolpath & it will clear that up.

I see that quite often with adaptive, not sure why it is, perhaps someone more familiar can shed some light on it..?
CoderMusashi
Posts: 92
Joined: Mon Nov 19, 2018 8:26 pm

Re: Circle + Filled = wrong path

Post by CoderMusashi »

I did not mean to sound like I was making any personal attacks because we all need each others help and we don't know everything. If it came across that way, I am sorry it was not my intention. I know that every CAM package out there does not always do what we think it should but given the information the software only does what it does. You start to learn tricks to make your toolpath better then what you would have gotten had you not done the tricks.

For this model I used the Part workbench. From the Part menu I then used Shape Builder to create wires from the models edges. Once the wire was created I used 2D offset from the part menu to Offset the wire half of what the 5mm end mill diameter is. With the 2d offset wire I then used Shape builder again to create a face from edges. I did this so I would not need to use any extensions for the endmill to cut out to the edge of the model. Note that the tool path now does not need to go around the holes and the endmill will not try to go down into the holes since the Face that was created has no holes and it is this Face used to create the toolpath. What you end up with is a clean toolpath that with just a few minutes extra work makes all the differnce. I hope this can help you in your future toolpath making endeavors. I also hope I did not offend you because that is not what I intended and that is certainly not the spirit of the FreeCAD community. I have attached the modified file this time.
Attachments
circlesurface.FCStd
(323.09 KiB) Downloaded 24 times
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Circle + Filled = wrong path

Post by MRx »

@CoderMusashi, I did not see your post as an offence at all.
Maybe it was overlooked - but I successfully milled that part before I posted to the forum.

I just pointed out to some things that were not correct when generating the path.
"wrong_path.png" the issue doesn't matter for me because the outline would clear that area anyway, but it's just not right. Maybe in another drawing this issue might turn out to a more severe problem.
The attached design in the first post can be used for debugging this issue.
Post Reply