Two bugs when using Profile Faces.

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!
Russ4262
Posts: 953
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Two bugs when using Profile Faces.

Post by Russ4262 »

nahshon wrote: Mon Jul 01, 2019 9:35 pm Trying the very latest GIT commits gave me an exception when I try to open the JOB Gui.
Recompiling latest commit from Sunday to try find where thee problem started.

Code: Select all

PathJobGui.ERROR: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/home/itai/Freecad-src/build/Mod/Path/PathScripts/PathJobGui.py", line 1273, in Create
    obj.ViewObject.Proxy.editObject(obj.Stock)
  File "/home/itai/Freecad-src/build/Mod/Path/PathScripts/PathJobGui.py", line 175, in editObject
    return self.openTaskPanel('Stock')
  File "/home/itai/Freecad-src/build/Mod/Path/PathScripts/PathJobGui.py", line 155, in openTaskPanel
    self.taskPanel = TaskPanel(self.vobj, self.deleteObjectsOnReject())
  File "/home/itai/Freecad-src/build/Mod/Path/PathScripts/PathJobGui.py", line 529, in __init__
    self.template = PathJobDlg.JobTemplateExport(self.obj, self.form.jobBox.widget(1))
  File "/home/itai/Freecad-src/build/Mod/Path/PathScripts/PathJobDlg.py", line 289, in __init__
    self.updateUI()
  File "/home/itai/Freecad-src/build/Mod/Path/PathScripts/PathJobDlg.py", line 323, in updateUI
    opsWithSettings = job.SetupSheet.Proxy.operationsWithSettings()
  File "/home/itai/Freecad-src/build/Mod/Path/PathScripts/PathSetupSheet.py", line 248, in operationsWithSettings
    for prop in value.registeredPropertyNames(name):
  File "/home/itai/Freecad-src/build/Mod/Path/PathScripts/PathSetupSheet.py", line 278, in registeredPropertyNames
    return [OpPropertyName(name, prop) for prop in self.properties()]
TypeError: 'NoneType' object is not iterable
I will take a look this evening. I may have missed something. I do appreciate the feedback.

Russ
Russ4262
Posts: 953
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Two bugs when using Profile Faces.

Post by Russ4262 »

Found the issue. I used incorrect syntax to append a list.

Fix is in the cue, PR #2315 - [Path] PathPocket: Fix SetupProperties() syntax issue.

Dancing anyone. Lately, I've got one step forward and two steps back...

Thanks for the patience and feedback. My apologies for the frustration.

Russ
m0n5t3r
Posts: 138
Joined: Fri Feb 03, 2017 2:55 pm

Re: Two bugs when using Profile Faces.

Post by m0n5t3r »

nahshon wrote: Sat Jun 29, 2019 8:39 pm Maybe the simplest way is to sort the paths by their size (can use the area). A path with small area cannot contain a path with a larger area. If the paths cannot touch then sorting by XMax-XMin or YMax-YMin may be more efficient. Then process them in order - smaller to larger.

When ordering the paths we also want to plan for minimal jogging (G0 moves) between paths. This calls for topological sorting - actually build a dependency graph. When that dependency graph is sparse there is still some freedom to optimize moves.

Code for playing with is in https://github.com/itain/FreeCAD/tree/PathTopoSort. Branch PathTopoSort. It's not ready for PR yet. Asking for more ideas and some feedback.
I always do the holes as a separate operation[1], so probably that's why I didn't hit this while developing the sort stuff; it's pretty dumb sorting actually, so someone making it smarter is always a welcome addition :)

[1] ... because there's "holes" and "circles" and "circles" don't do the helix thing and I usually want different dressups for perimeter, etc.;
nahshon
Posts: 225
Joined: Wed Jul 24, 2013 8:06 pm

Re: Two bugs when using Profile Faces.

Post by nahshon »

m0n5t3r wrote: Thu Jul 04, 2019 7:06 pmI always do the holes as a separate operation[1], so probably that's why I didn't hit this while developing the sort stuff; it's pretty dumb sorting actually, so someone making it smarter is always a welcome addition :)
I usually do a single operation when I do not need different handling. Same parameters for all the cuts saves me time and mistakes. In this case when I saw the wrong order problem I tried a separate operation and hit the other bug (which is already fixed).
Anyways, I have added topological sorting in https://github.com/itain/FreeCAD branch PathTopoSort and I'm trying to get some feedback for it. Just fixed a bug caused by a bad merge and also commented out things that were used just for debugging.

I see some weird behavior when there are multiple shapes and "Handle multiple features" is "Collectively". The perimeters (only the perimeters!) are treated as a single shape, meaning that their order cannot be calculated. I need to understand the meaning (new feature).

-- Itai
Post Reply