Path Operations refactor branch.

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!
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Path Operations refactor branch.

Post by mlampert »

chrisb wrote: Sun Aug 27, 2017 11:57 am I am sorry for buzzing so much around, but I found something more: I have added a PocketFromFace for the outer frame (no letters at all). The generated path contains very small bits of the letters, which happen to have the same depth as the outer frame.
The letters themselves have ProfileFromFaces paths.
This is the type of pattern I would expect if the tool is too big. It can mill a little piece where the leg intersections make the letter big enough for the tool to get in, but not on the legs - could you check your tool size?
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Path Operations refactor branch.

Post by mlampert »

chrisb wrote: Sun Aug 27, 2017 10:47 am On Ubuntu 0.17.11919 I can edit an existing Drilling object, i.e. remove or add elements etc. Same version on MacOS I get only the Transform panel which allows to move an Element in the coordinate system. The other panels I tried don't have that problem. It might be a locale or Qt 5 problem.
Is there by any chance an exception happening? You might be running into the issue Konstantiin noticed where there is an API change between Qt 4 and 5 - I have yet to submit the fix for that.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Path Operations refactor branch.

Post by mlampert »

chrisb wrote: Sun Aug 27, 2017 8:03 am I am (re-)building the paths of an object using ShapeStrings. Using "Pocket from face" I get unexpected results:
  • Pocket from face contains all numbers from the upper line, alas, 6 and 0 are missing. I guess it's the already known problem from the U-shape.
  • I get an error message in the report view:

    Code: Select all

    Exception (Sun Aug 27 08:00:07 2017): failed to get bound box  
    {'swhat': 'failed to get bound box', 'sfunction': '', 'btranslatable': False, 'sfile': '', 'sclassname': 'N4Base10ValueErrorE', 'breported': True, 'sErrMsg': 'failed to get bound box', 'iline': 0}Something unexpected happened. Check project and tool config.
  • Using the Line pattern I get lots of vertical rapids - which is probably correct; the islands inside of the 8 are pocketed as well
  • Using Offset pattern creates a path for the 0 respecting the island. The islands inside of the 8 are still ignored
  • Switching back to linear: now the path for 0 is created.
  • Spiral pattern respects the islands in 8 and 0,but not in 6.
realthunder wrote: ping
These are libarea or Path.Area issues - realthunder could you have a look at these please? I've noticed that as well that the different patterns don't always produce correct or consistent results.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Path Operations refactor branch.

Post by realthunder »

chrisb wrote: Sun Aug 27, 2017 8:03 am I am (re-)building the paths of an object using ShapeStrings. Using "Pocket from face" I get unexpected results:
Could you please attach the project file showing the problem you described? I'll take a look.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Path Operations refactor branch.

Post by chrisb »

mlampert wrote: Sun Aug 27, 2017 6:03 pm
chrisb wrote: I have added a PocketFromFace for the outer frame (no letters at all). The generated path contains very small bits of the letters, which happen to have the same depth as the outer frame.
The letters themselves have ProfileFromFaces paths.
This is the type of pattern I would expect if the tool is too big. It can mill a little piece where the leg intersections make the letter big enough for the tool to get in, but not on the legs - could you check your tool size?
I agree, if I had selected one of the letters, but I didn't. I selected only the slots and the outer frame.
I have tried hard to shrink the file, but it is still too big to be attached here, please follow this link: https://owncloud-shib.gwdg.de/index.php ... P9zOHyyneE
The pocket in question is Pocket007.
realthunder wrote: Sun Aug 27, 2017 6:33 pm Could you please attach the project file showing the problem you described? I'll take a look.
Thanks for looking, the link is the same as above.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Path Operations refactor branch.

Post by chrisb »

mlampert wrote: Sun Aug 27, 2017 6:05 pm
chrisb wrote: Sun Aug 27, 2017 10:47 am On Ubuntu 0.17.11919 I can edit an existing Drilling object, i.e. remove or add elements etc. Same version on MacOS I get only the Transform panel which allows to move an Element in the coordinate system. The other panels I tried don't have that problem. It might be a locale or Qt 5 problem.
Is there by any chance an exception happening? You might be running into the issue Konstantiin noticed where there is an API change between Qt 4 and 5 - I have yet to submit the fix for that.
I had missed the exeception, here it is:

Code: Select all

Traceback (most recent call last):
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Mod/Path/PathScripts/PathOpGui.py", line 94, in setEdit
    self.setupTaskPanel(TaskPanel(vobj.Object, self.deleteObjectsOnReject(), page, selection))
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Mod/Path/PathScripts/PathOpGui.py", line 599, in __init__
    self.featurePages.append(TaskPanelBaseLocationPage(obj, features))
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Mod/Path/PathScripts/PathOpGui.py", line 157, in __init__
    self.form = self.getForm()
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Mod/Path/PathScripts/PathOpGui.py", line 409, in getForm
    self.formLoc.baseList.horizontalHeader().setResizeMode(QtGui.QHeaderView.Stretch)
<type 'exceptions.AttributeError'>: 'PySide2.QtWidgets.QHeaderView' object has no attribute 'setResizeMode'
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Path Operations refactor branch.

Post by mlampert »

chrisb wrote: Sun Aug 27, 2017 10:38 pm I had missed the exeception, here it is:

Code: Select all

Traceback (most recent call last):
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Mod/Path/PathScripts/PathOpGui.py", line 94, in setEdit
    self.setupTaskPanel(TaskPanel(vobj.Object, self.deleteObjectsOnReject(), page, selection))
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Mod/Path/PathScripts/PathOpGui.py", line 599, in __init__
    self.featurePages.append(TaskPanelBaseLocationPage(obj, features))
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Mod/Path/PathScripts/PathOpGui.py", line 157, in __init__
    self.form = self.getForm()
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Mod/Path/PathScripts/PathOpGui.py", line 409, in getForm
    self.formLoc.baseList.horizontalHeader().setResizeMode(QtGui.QHeaderView.Stretch)
<type 'exceptions.AttributeError'>: 'PySide2.QtWidgets.QHeaderView' object has no attribute 'setResizeMode'
Yes that's the same one Konstantine ran into, I submitted PR-955 which fixes the issue
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Path Operations refactor branch.

Post by realthunder »

chrisb wrote: Sun Aug 27, 2017 10:34 pm Thanks for looking, the link is the same as above.
The missing pocket faces is caused by OCC section tolerance problem. Because you used default step down (1.0mm), the section operation hits the bottom, and Path.Area's default section tolerance is 1e-6, so the section (i.e. slicing) operation is done at 2.9+1e-6. For simple geometry, this tolerance works fine, but for some, apparently, this causes missing sections. I guess for your shapes, the pocketing faces are not all at exact 2.9, some up while some below, and that's why you have missing faces. The solution is to simply specify a sensible step down value.
mlampert wrote: Sun Aug 27, 2017 6:12 pm These are libarea or Path.Area issues - realthunder could you have a look at these please? I've noticed that as well that the different patterns don't always produce correct or consistent results.
I'd suggest that the solution here, with the perspective of the developer, is to improve the auto derivation of depth value from the removal shapes, code in PathUtils.depth_params, perhaps?
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Path Operations refactor branch.

Post by chrisb »

@mlampert: I will simplify the problem with the additional pockets.
@realthunder: Thanks for the investigation, I will change the model accordingly and report back.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: Path Operations refactor branch.

Post by Konstantin »

[Edited] It seems that I have again that problem, when I pull from git, but somehow old version remains.
Post Reply