Improvements to Tool Handling (and other fixes) #628

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!
gdo35
Posts: 189
Joined: Wed Jan 25, 2012 7:25 pm

Re: Improvements to Tool Handling (and other fixes) #628

Post by gdo35 »

Hi all,

Thx for that work ! Good job !

I just get a bug with drilling, I cannot add any hole. If I set depth, even with no hole selected I get the following error :

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/freecad-daily/Mod/Path/PathScripts/PathDrilling.py", line 368, in getFields
    self.obj.Proxy.execute(self.obj)
  File "/usr/lib/freecad-daily/Mod/Path/PathScripts/PathDrilling.py", line 131, in execute
    holes = self.findHoles(obj, baseobject.Shape)
  File "/usr/lib/freecad-daily/Mod/Path/PathScripts/PathDrilling.py", line 221, in findHoles
    if PathUtils.isDrillable(obj, f, tooldiameter):
  File "/usr/lib/freecad-daily/Mod/Path/PathScripts/PathUtils.py", line 104, in isDrillable
    if obj.isInside(lsp, 0, False) or obj.isInside(lep, 0, False):
    AttributeError: 'FeaturePython' object has no attribute 'isInside'
OS: Ubuntu 16.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10600 (Git)
Build type: None
Branch: master
Hash: 4d9169faf778e9716fc647fb3fcf46462b5d99a4
Python version: 2.7.12+
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Improvements to Tool Handling (and other fixes) #628

Post by sliptonic »

I found this and about four more bugs recording the video. Pr is waiting for merge.
gdo35
Posts: 189
Joined: Wed Jan 25, 2012 7:25 pm

Re: Improvements to Tool Handling (and other fixes) #628

Post by gdo35 »

Ok ! Thank you ! ;)
Linden
Posts: 109
Joined: Wed Aug 19, 2015 10:35 pm
Location: Canada/Philippines

Re: Improvements to Tool Handling (and other fixes) #628

Post by Linden »

First off Thanks Sliptonic for all your work in coding and keeping us updated with screen casts and scribe notes documenting the progress of the path work bench.
In the last video you posted showing panels in the arch workbench being used made me think a nesting function could be quite a useful tool not only for the path workbench but in other arias of free cad as well.
Has any one played with this in the past or see a use for this type of functionality? What I had in mind is something like http://svgnest.com/ here is a port someone has done to python on git hub https://github.com/Jack000/SVGnest/comm ... de94718925
My understanding of python is minuscule at best but this may give some one some inspiration to have a poke around and see what other’s have done. There is also a nest function in Blendercam. I think this is the code for it https://github.com/vilemnovak/blenderca ... _init__.py but I may be wrong as I said my Python and programming skills in general leave a lot to be desired. If some one needs a guinea pig or a crash test dummy I dont mind volunteering that is some thing I can help with;-)

thanks again Linden
Linden
gdo35
Posts: 189
Joined: Wed Jan 25, 2012 7:25 pm

Re: Improvements to Tool Handling (and other fixes) #628

Post by gdo35 »

sliptonic wrote:I found this and about four more bugs recording the video. Pr is waiting for merge.
@sliptonic, could you please point me to the right PR for that corrections ?
(I found this one from you : https://github.com/FreeCAD/FreeCAD/pull/637)
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Improvements to Tool Handling (and other fixes) #628

Post by sliptonic »

Linden wrote: Has any one played with this in the past or see a use for this type of functionality? What I had in mind is something like http://svgnest.com/ here is a port someone has done to python on git hub https://github.com/Jack000/SVGnest/comm ... de94718925
I've definitely been thinking about this and looking at svgnest. It's MIT license so compatible with FreeCAD but I was unaware of the python port. Thanks for that.

I'd also like to implement a 'Traveling Salesman Problem' solver for ordering drilling locations and I've hacked out a couple crude experiments on that already. You should try the same thing with the nesting. Even if you never get it to work or get it merged with FreeCAD, you'll learn a ton about Python and FreeCAD and you'll have plenty of folks willing to offer help :-)

@gdo35 Yes, that's the one.
gdo35
Posts: 189
Joined: Wed Jan 25, 2012 7:25 pm

Re: Improvements to Tool Handling (and other fixes) #628

Post by gdo35 »

@sliptonic, thx. It is already in the PPA so it does not solve my drilling problem :(. I will post my FreeCAD file in few hours.
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Improvements to Tool Handling (and other fixes) #628

Post by sliptonic »

gdo35 wrote:@sliptonic, thx. It is already in the PPA so it does not solve my drilling problem :(. I will post my FreeCAD file in few hours.
Sorry. Missed one case. New PR #645
gdo35
Posts: 189
Joined: Wed Jan 25, 2012 7:25 pm

Re: Improvements to Tool Handling (and other fixes) #628

Post by gdo35 »

sliptonic wrote:Sorry. Missed one case. New PR #645
Thank you ! Exactly the one needed. ;)

I have another one for you :

Code: Select all

Path workbench activated
[<Document object>, <Document object>, <Document object>]
Job008
Running the Python command 'PathDressup_Dogbone' failed:
Traceback (most recent call last):
  File "/usr/lib/freecad-daily/Mod/Path/PathScripts/PathDressupDogbone.py", line 1020, in Activated
    FreeCADGui.doCommand('dbo.setup(obj)')
  File "<string>", line 1, in <module>
  File "/usr/lib/freecad-daily/Mod/Path/PathScripts/PathDressupDogbone.py", line 783, in setup
    toolLoad = PathUtils.getLastToolLoad(obj)

'module' object has no attribute 'getLastToolLoad'
I think you did not have time to fix the different dressups.
vk3uao
Posts: 4
Joined: Tue Feb 28, 2017 11:40 am
Location: Australia

Re: Improvements to Tool Handling (and other fixes) #628

Post by vk3uao »

Thanks for the new improvements in this area.

I have found a few small problems that seem to have been introduced.

When exporting the path as G-Code. It is setting the units to G20 (imperial) but all co-ordinates are in metric (as intended as I work in metric)

Also the feed rate in the generated G-code is now different from what is set in the tool controller.

I have it set to 200mm/s in the tool controller and when I export it as G-Code, the value goes to 472.44
If I change it to 400mms in the tool controller, the export value is 944.88.

Perhaps this is related to the metric/imperial issue?

OS: Linux Mint 18.1 Serena
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10611 (Git)
Build type: None
Branch: master
Hash: 44a9ecd25f27ec3efe52c9de9c95ef2b3e19dd17
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0

Image
Post Reply