Milling an area with open edges

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!
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Milling an area with open edges

Post by chrisb »

MPC wrote: Fri Jun 11, 2021 8:57 am Is this worth raising as a bug?
Can you add the non working file as well?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
MPC
Posts: 14
Joined: Tue Mar 02, 2021 10:41 am

Re: Milling an area with open edges

Post by MPC »

The file I attached includes the working and failed bodies.

Body: Was done using sketch to provide the fillets and this works ok

Body001: Was done using Part Design to provide the fillets and this fails with MillFace.

Thanks,

MPC.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Milling an area with open edges

Post by chrisb »

Sorry, I missed the second body.

At least the front lines of the pockets are different: Body has 20 vertices and 30 edges, Body has 22 vertices and 32 edges.

When I open the file, the MillFace in Job is marked to be recomputed, and if I do so, it shows an error:

Code: Select all

  Traceback (most recent call last):
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/Mod/Path/PathScripts/PathUtils.py", line 60, in new_function
    res = function(*args, **kwargs)
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/Mod/Path/PathScripts/PathOp.py", line 552, in execute
    result = self.opExecute(obj)  # pylint: disable=assignment-from-no-return
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/Mod/Path/PathScripts/PathAreaOp.py", line 316, in opExecute
    aOS = self.areaOpShapes(obj) # pylint: disable=assignment-from-no-return
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/Mod/Path/PathScripts/PathMillFace.py", line 196, in areaOpShapes
    baseShape = oneBase[0].Shape
<class 'UnboundLocalError'>: local variable 'oneBase' referenced before assignment
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Milling an area with open edges

Post by GeneFC »

I may be out of date, but it seems that face milling may not be the correct operation. I tried the sample file "Test_using_sketch_fillet.FCStd", and both bodies worked just fine when I used "Pocket" operations with extensions checked.

Gene
MPC
Posts: 14
Joined: Tue Mar 02, 2021 10:41 am

Re: Milling an area with open edges

Post by MPC »

Pocket does not extend enough beyond the edge to correctly finish the fillet.

In the file attached Body001 uses a pocket to clear the area with edge extension but the operation does not complete the fillet correctly.

You are left with a small bit of material.

Millface does extend correctly but only if the fillets are done in sketch. If they are done in Part Design the mill face fails with errors.

PocketExtended edges.png
PocketExtended edges.png (15.25 KiB) Viewed 1708 times
Attachments
Test_using_sketch_fillet2.FCStd
(89.29 KiB) Downloaded 30 times
Russ4262
Posts: 953
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Milling an area with open edges

Post by Russ4262 »

MPC wrote: Tue Jun 15, 2021 8:49 am Pocket does not extend enough beyond the edge to correctly finish the fillet.
...
Afternoon sir.
In short, here is my recommended, verified solution using the last file you posted.
1. Download the Development AppImage of FreeCAD with instructions at AppImage. This contains recent upgrades to the Extensions feature.
2. Use either the Extensions feature with either the regular Pocket or the Adaptive operations.
3. Set the Extensions `Default Length` expression to only `OpToolDiameter` (This will be calculated to 5.0 mm for default tool.)
4. Select the `Extend_Face` extension option. Clicking on this option will add a bright pink visual extension preview to the viewport, as you are likely aware.
5. Press `Apply` button to inspect the result.

Thanks for the feedback and involvement in the forum.

Russell

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.25170 (Git)
Build type: Release
Branch: Master_c401e3
Hash: c401e3efe3756b8cab0c95bc3b8afa2e23e464a7
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
Attachments
Test_using_sketch_fillet2 - Copy.FCStd
(392.81 KiB) Downloaded 26 times
Snip macro screenshot-54636b.png
Snip macro screenshot-54636b.png (209.52 KiB) Viewed 1355 times
Snip macro screenshot-1dffd2.png
Snip macro screenshot-1dffd2.png (198.79 KiB) Viewed 1355 times
Snip macro screenshot-7d71ad.png
Snip macro screenshot-7d71ad.png (198.45 KiB) Viewed 1355 times
Snip macro screenshot-80c0a1.png
Snip macro screenshot-80c0a1.png (212.86 KiB) Viewed 1355 times
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Milling an area with open edges

Post by MRx »

This is super useful thank you.
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Milling an area with open edges

Post by MRx »

I have just built FC (git)

I did an adaptive clearance, with a 4mm endmill, and set the extension to 4mm.
0n6IpM.png
0n6IpM.png (11.76 KiB) Viewed 1114 times
2Ljhyx.png
2Ljhyx.png (3.15 KiB) Viewed 1114 times
Update:
got it work by setting the extension to 3,5mm, however the feature should also respect the spacing to the wall in the extension...
lUh8Ho.png
lUh8Ho.png (9.82 KiB) Viewed 1092 times
----

This green straight line doesn't seem good:
I25Rdn.png
I25Rdn.png (13.44 KiB) Viewed 1088 times
Update:
I'm using a smaller endmill now and that line is gone, so seems like it shows up with bigger diameters and some special pathways.

----

I'm getting this error in the logfile:
WjrTdm.png
WjrTdm.png (4.3 KiB) Viewed 1084 times
Russ4262
Posts: 953
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Milling an area with open edges

Post by Russ4262 »

Good morning, MRx.

MRx wrote: Sun Jul 11, 2021 9:21 am ... I'm getting this error in the logfile: ...
This has already been addressed in PR #4902, [Path] Downgrade Extensions error message priority. It is a leftover feedback message from coding the recent Extensions upgrades.

MRx wrote: Sun Jul 11, 2021 9:21 am ... I did an adaptive clearance, with a 4mm endmill, and set the extension to 4mm. ...
Update:
got it work by setting the extension to 3,5mm, however the feature should also respect the spacing to the wall in the extension...
... This green straight line doesn't seem good: ...
Yes, the availability of more complex shapes via the extensions upgrade is exposing some weaknesses within the Adaptive algorithm. There have been Adaptive bugs reported here in the forum prior to this Extensions upgrade, many related to complex curves/shapes. The use of the newly added Extensions feature in Adaptive is only going to increase the frequency of bug manifestations due to the increase in complex shapes passed thereto.

Yes, my tests also revealed that adjusting the length of the extension, like your 4.0mm to 3.5mm here, helps Adaptive correct the irregularities/failures in some of the situations.


Re: First image
I am curious about the actual extension face produced in that image. Are you able to share the model file you used for that image? It looks like a there is a double fillet, one on top and one directly below, the extension face. This might be negatively affecting the creation of the extension face. I would like to take a look if possible.

Thanks for reporting these issues.
Russell
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Milling an area with open edges

Post by MRx »

Hi,

I think I figured out what the problem is, I selected wire instead of extend face

Wire:
R2u0pE.png
R2u0pE.png (5.32 KiB) Viewed 1059 times
Face:
asIH9c.png
asIH9c.png (2 KiB) Viewed 1059 times

I just wanted to reproduce the first issue (wire vs face, but then I was able to reproduce the other issue which I mentioned):
ycnwQ1.png
ycnwQ1.png (11.06 KiB) Viewed 1059 times
the freecad file is attached. Please see my other forum post a serious issue got introduced with FC 0.20
https://forum.freecadweb.org/viewtopic.php?f=15&t=60037
Attachments
mpbug1.FCStd
(61.94 KiB) Downloaded 25 times
Post Reply