A quick fix for PathDrilling

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!
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

A quick fix for PathDrilling

Post by roivai »

Hi,

I tried to create a toolpath for drilling and realized there are some things broken in PathDrilling. Adding and removing the features to drill were completely commented out, so current behavior is that all holes of the Base feature bigger than the tool diameter are drilled. Based on commit comments, these issues are already known by sliptronic at least I guess?

Anyway, to get the path done I modified the PathDrilling so that I am able to remove objects from the list, otherwise it would be impossible to drill with two different tools, for example. Also, I enabled the "Find All" -button in the Task Panel so that it resets the object list to contain all holes in the base feature. Adding features felt like out of my skills, so I didn't touch that.

I dont know if that is useful to merge, testing of it is very limited and as there are still broken features, a bigger overhaul should be done. But if someone happens to need drilling feature right now, here is a commit I made:
https://github.com/pekkaroi/FreeCAD/com ... dd64f32a7d
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: A quick fix for PathDrilling

Post by Kunda1 »

Please add your Help > About FreeCAD > copy to clipboard
Since this looks like your modifying 0.16 code
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: A quick fix for PathDrilling

Post by Kunda1 »

Also, feel free to checkout Path bugtracker: https://freecadweb.org/tracker/set_proj ... ct_id=4;15
And you're welcome submit PRs to https://github.com/FreeCAD/FreeCAD that way they have a higher chance of getting visibility and implemented. Cheers :)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: A quick fix for PathDrilling

Post by roivai »

Thanks for the comment, my repo branch was reset to master this morning, so it is 0.17.. Like I said, I don't feel like creating a pull request out of that, as it does not fix the functionality completely and quite frankly, I don't understand too much about how that PathDrilling even works, so I am quite sure there is something I missed.

Pekka

OS: Debian GNU/Linux 8.6 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10887 (Git)
Build type: Unknown
Branch: master
Hash: 67fc70dadae471cb3d77dcf5562b4a86ec79f95d
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.0
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: A quick fix for PathDrilling

Post by sliptonic »

roivai wrote:Hi,

I tried to create a toolpath for drilling and realized there are some things broken in PathDrilling. Adding and removing the features to drill were completely commented out, so current behavior is that all holes of the Base feature bigger than the tool diameter are drilled. Based on commit comments, these issues are already known by sliptronic at least I guess?
Yeah, you've stumbled into another half-finished area where my vision has out-paced my time. The problem I see is that drilling operations can sometimes have hundreds of locations. This really becomes apparent when we start working with Arch Panels Sheets. It's just not practical to ask the user to manually select and add them. On the other hand, drilling everything isn't right either. So, we need to automatically determine the set of drillable locations but give the user tools to effectively manage this list.

So my goal for this dialog is this:
  1. When creating the drilling operation, all drillalble locations bigger than the tool diameter are located and added to the list. DONE
  2. The user would never remove a location from the list but could disable items as desired THIS IS WHY FUNCTIONALITY IS COMMENTED OUT
  3. The list would be sortable by name and size. NOT DONE
  4. There would be a button to (de)select ALL
  5. Multi-select would be enabled so groups of locations could be selected by Ctrl+clicking, etc. NOT DONE
  6. A user can add a 'custom' location. This would allow picking a location on the canvas or entering the coordinates manually. NOT DONE
  7. Custom locations could be enabled and disabled like other locations. I haven't decided if they could be deleted though. NOT DONE
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: A quick fix for PathDrilling

Post by roivai »

Thanks for the explanation. I think your vision is really good!

One thing in my mind is that there should be a way to automatically detect not only holes that are bigger than the tool, but holes with certain diameter (with some tolerance of course). For example, if I have gazillion 5mm holes and 8mm holes in a plate, I could automatically generate two drilling operations, one for each hole size and not need to deselect the 8mm holes from the 5mm operation. Of course if the list is sortable, that is not a big improvement any more..

Implementing most of the things in your list could be in the reach of my skills and that could be a nice opportunity to study Path and FreeCAD in general, so I might give this a try, unless you ( or someone else) is working on this right now?

Pekka
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: A quick fix for PathDrilling

Post by sliptonic »

roivai wrote: Implementing most of the things in your list could be in the reach of my skills and that could be a nice opportunity to study Path and FreeCAD in general, so I might give this a try, unless you ( or someone else) is working on this right now?
Awesome! I'll help any way I can. My FreeCAD time has been really limited lately and I've spent most of it playing with the new PathArea stuff and Arch panels so this would be a huge help.
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: A quick fix for PathDrilling

Post by roivai »

I worked with this today, mainly fiddling with QT since it's been a while since doing that.. I came up with this kind of interface (I'm no UI designer at all :D ):
2017-05-01-230925_3840x1200_scrot.png
2017-05-01-230925_3840x1200_scrot.png (41.5 KiB) Viewed 2181 times
Both columns are sortable, you can enable/disable features to drill with either by clicking the checkbox or selecting one or many rows and using buttons below the list.

I also copied the the sorting algorithm developed by m0n5t3r in the PathHelix for drilling and it seems to work really well.

Here's what I did:
https://github.com/pekkaroi/FreeCAD/com ... 64e8c17d01
User avatar
bill
Posts: 376
Joined: Fri Jan 09, 2015 9:25 pm

Re: A quick fix for PathDrilling

Post by bill »

Does PATH:Drill Operation still have the ability to just drill a point; or is it all arc/hole/circle-based now? HMM?
Cant seem to generate a drill-path for the following:
The picture reflects the final part. The drill-points occur before any other machining!

Edit: I am trying to relieve these points with a pseudo-dogbone!
DBeffect.png
DBeffect.png (23.59 KiB) Viewed 2147 times
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: A quick fix for PathDrilling

Post by roivai »

bill wrote:Does PATH:Drill Operation still have the ability to just drill a point; or is it all arc/hole/circle-based now? HMM?
Cant seem to generate a drill-path for the following:
As far as I understand, that is not possible with the current implementation in master. And not with my version either. From sliptonic's list:
6. A user can add a 'custom' location. This would allow picking a location on the canvas or entering the coordinates manually. NOT DONE
would be the way to handle that. I am thinking that user could select the features (edges, points?) from the document and add those to the list of drilled points. I'll see if I can implement such a thing.

Edit: Typo
Post Reply