pot purri of path issues

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Erich Schulz
Posts: 135
Joined: Tue May 07, 2019 10:50 pm
Location: Brisbane, Australia

pot purri of path issues

Postby Erich Schulz » Tue Jul 02, 2019 7:34 am

Heya

This could be quite curly...

So I've made myself a parametised pin-board. The number of pins and size of the board is driven from a spreadsheet.

Now I'm trying to make a path (something I'm just starting to play with.

several issues.

Firstly when I a make the job the model clone fails to fully represent the multi-select (so rather than having a grid of holes, the path model onlyl has the first column)

Secondly at one point I had a very hard time getting one of my paths to dissapear - setting the operation to invisible or even the job to invisible failed to hide it. Eventually I saved and reopened the file a few times and the paths dissapeared.

Finally when I selected a few of my holes and tried to make a drill operation I got the following err

Code: Select all

Drilling Select Mode
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOp.py", line 270, in onChanged
    self.updateDepths(obj, True)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOp.py", line 382, in updateDepths
    fbb = base.Shape.getElement(sub).BoundBox
<class 'Part.OCCError'>: NCollection_IndexedMap::FindKey
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOpGui.py", line 172, in updateData
    self.panel.updateData(obj, prop)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOpGui.py", line 963, in updateData
    page.pageUpdateData(obj, prop)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOpGui.py", line 493, in pageUpdateData
    self.setFields(obj)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathCircularHoleBaseGui.py", line 84, in setFields
    item = QtGui.QTableWidgetItem("{:.3f}".format(obj.Proxy.holeDiameter(obj, base, sub)))
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathCircularHoleBase.py", line 110, in holeDiameter
    shape = base.Shape.getElement(sub)
<class 'Part.OCCError'>: NCollection_IndexedMap::FindKey
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOp.py", line 270, in onChanged
    self.updateDepths(obj, True)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOp.py", line 382, in updateDepths
    fbb = base.Shape.getElement(sub).BoundBox
<class 'Part.OCCError'>: NCollection_IndexedMap::FindKey
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOpGui.py", line 172, in updateData
    self.panel.updateData(obj, prop)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOpGui.py", line 963, in updateData
    page.pageUpdateData(obj, prop)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOpGui.py", line 493, in pageUpdateData
    self.setFields(obj)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathCircularHoleBaseGui.py", line 84, in setFields
    item = QtGui.QTableWidgetItem("{:.3f}".format(obj.Proxy.holeDiameter(obj, base, sub)))
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathCircularHoleBase.py", line 110, in holeDiameter
    shape = base.Shape.getElement(sub)
<class 'Part.OCCError'>: NCollection_IndexedMap::FindKey
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOp.py", line 270, in onChanged
    self.updateDepths(obj, True)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOp.py", line 382, in updateDepths
    fbb = base.Shape.getElement(sub).BoundBox
<class 'Part.OCCError'>: NCollection_IndexedMap::FindKey
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOpGui.py", line 172, in updateData
    self.panel.updateData(obj, prop)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOpGui.py", line 963, in updateData
    page.pageUpdateData(obj, prop)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOpGui.py", line 493, in pageUpdateData
    self.setFields(obj)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathCircularHoleBaseGui.py", line 84, in setFields
    item = QtGui.QTableWidgetItem("{:.3f}".format(obj.Proxy.holeDiameter(obj, base, sub)))
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathCircularHoleBase.py", line 110, in holeDiameter
    shape = base.Shape.getElement(sub)
<class 'Part.OCCError'>: NCollection_IndexedMap::FindKey
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOp.py", line 270, in onChanged
    self.updateDepths(obj, True)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOp.py", line 382, in updateDepths
    fbb = base.Shape.getElement(sub).BoundBox
<class 'Part.OCCError'>: NCollection_IndexedMap::FindKey
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOpGui.py", line 172, in updateData
    self.panel.updateData(obj, prop)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOpGui.py", line 963, in updateData
    page.pageUpdateData(obj, prop)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOpGui.py", line 493, in pageUpdateData
    self.setFields(obj)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathCircularHoleBaseGui.py", line 84, in setFields
    item = QtGui.QTableWidgetItem("{:.3f}".format(obj.Proxy.holeDiameter(obj, base, sub)))
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathCircularHoleBase.py", line 110, in holeDiameter
    shape = base.Shape.getElement(sub)
<class 'Part.OCCError'>: NCollection_IndexedMap::FindKey
OS: Ubuntu 18.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)


I'll keep playing but thought I'd share the little experiences in case anyone can make anything of them... especially after advice on the first issue.
Attachments
pintable.FCStd
(57.71 KiB) Downloaded 10 times
User avatar
Russ4262
Posts: 203
Joined: Sat Jun 30, 2018 3:22 pm

Re: pot purri of path issues

Postby Russ4262 » Tue Jul 02, 2019 11:08 pm

Mr. Schultz,
Your version number is truncated at the major release, 0.19. This seems to happen regularly on some Linux distros. Please provide us with the minor version number so we can better assist.

Also, if you have a list of steps used to reproduce the error, we would appreciate it.

Thanks,
Russ
User avatar
kkremitzki
Posts: 1650
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: pot purri of path issues

Postby kkremitzki » Tue Jul 02, 2019 11:19 pm

It's probably the daily builds PPA. You can make sure you have a recent version by checking the output of dpkg -l | grep freecad-daily.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: pot purri of path issues

Postby quick61 » Wed Jul 03, 2019 11:55 am

The last couple of days, the Path workbench in the PPA Daily builds has been broken. (at least here it has) When trying to start a new path job, Creates a new path job object, I get...

Code: Select all

Running the Python command 'Path_Job' failed:
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathJobCmd.py", line 71, in Activated
    dialog.setupModel()
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathJobDlg.py", line 90, in setupModel
    self.candidates = sorted(PathJob.ObjectJob.baseCandidates(), key=lambda o: o.Label)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathJob.py", line 395, in baseCandidates
    return sorted([obj for obj in FreeCAD.ActiveDocuemnt.Objects if cls.isBaseCandidate(obj)], key=lambda o: o.Label)

module 'FreeCAD' has no attribute 'ActiveDocuemnt'
...and yes, the daily PPA builds don't have a revision number, haven't sense day 1 of the 0.19 build cycle. Either it's a problem that can not be fixed, or no one has bothered, don't know. I have just been using the build date, which is in the Help > About but dose not get copied to the clipboard, so one has to type it in manually.

** Release date 2019/07/02 21:54:33 **

OS: Kubuntu 18.04.2 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
sliptonic
Posts: 1552
Joined: Tue Oct 25, 2011 10:46 pm

Re: pot purri of path issues

Postby sliptonic » Wed Jul 03, 2019 2:59 pm

quick61 wrote:
Wed Jul 03, 2019 11:55 am
The last couple of days, the Path workbench in the PPA Daily builds has been broken.
Fixed with PR #2317 merged this morning.
User avatar
Russ4262
Posts: 203
Joined: Sat Jun 30, 2018 3:22 pm

Re: pot purri of path issues

Postby Russ4262 » Wed Jul 03, 2019 8:20 pm

Erich Schulz wrote:
Tue Jul 02, 2019 7:34 am
...Firstly when I a make the job the model clone fails to fully represent the multi-select (so rather than having a grid of holes, the path model onlyl has the first column)
I did verify this problem. I would say it is a bug in the clone tool/command, if I had to guess. This is independent of the PathWB. This is verified by going to the `Part` workbench, selecting the `Body` in the object tree, and running the `Part-->Create simple copy` command. The copy is created, but lacks all the holes as desired.

We'll have to investigate or test a little more to pin down the exact bug to report.

On the other hand, you can achieve the same pin/peg board layout with work arounds to the `Multitransform feature` tool. If you would like some assistance getting to the same result, let me know. Once you get the new version of the pin board, PathWB should handle it well.

Thanks for the feedback.
Russ
User avatar
Russ4262
Posts: 203
Joined: Sat Jun 30, 2018 3:22 pm

Re: pot purri of path issues

Postby Russ4262 » Thu Jul 04, 2019 3:28 am

Erich Schulz wrote:
Tue Jul 02, 2019 7:34 am
...
So I've made myself a parametised pin-board. The number of pins and size of the board is driven from a spreadsheet.
Now I'm trying to make a path (something I'm just starting to play with.
...
Had a some time this afternoon. Put together your pin-board with alternative CAD tools since the PartDesign-->Multitransform Feature did not work as intended.

I attached the model file and a screenshot. You've got two options for creating the holes: Drilling, or use Profile Faces with `processPerimeter` flag off.

Have fun.

Russ
Attachments
pintable_2.FCStd
alternative CAD tools to create pin-board
(80.93 KiB) Downloaded 2 times
pintable_2a.png
result with 2 options for holes
pintable_2a.png (167.22 KiB) Viewed 299 times
herbk
Posts: 1401
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: pot purri of path issues

Postby herbk » Thu Jul 04, 2019 7:14 pm

Hi Erich,

btw: for drilling this holes you don't need to do it that way... If you make only one hole into your sheet, create a drilling operation for this hole and use the Path Array for the repeats... It saves a lot of calculation time... ;) ;)
Gruß Herbert
chrisb
Posts: 16914
Joined: Tue Mar 17, 2015 9:14 am

Re: pot purri of path issues

Postby chrisb » Fri Jul 05, 2019 10:24 am

Some posts from this topic where split to wiki subforum. Splitting topics that go over more than one page is a difficult task, authors please veryfy that I was successful.
Chris
Erich Schulz
Posts: 135
Joined: Tue May 07, 2019 10:50 pm
Location: Brisbane, Australia

Re: pot purri of path issues

Postby Erich Schulz » Fri Jul 05, 2019 9:50 pm

chrisb wrote:
Fri Jul 05, 2019 10:24 am
Some posts from this topic where split to wiki subforum. Splitting topics that go over more than one page is a difficult task, authors please veryfy that I was successful.
Chris
Thanks!
herbk wrote:
Thu Jul 04, 2019 7:14 pm
Hi Erich,

btw: for drilling this holes you don't need to do it that way... If you make only one hole into your sheet, create a drilling operation for this hole and use the Path Array for the repeats... It saves a lot of calculation time... ;) ;)
Wow. that's an intriguing work flow. The being able to generate parts based on paths could be much simpler than attempting to generate efficient paths based on parts I am thinking. It also has the benefit of allowing quirks of the milling process to potentially become "features"... It's not really calculation time ththat worries me as much as machine time (noise, power, wear etc)