drilling arcs

Here's the place for discussion related to CAM/CNC and the development of the Path module.
User avatar
rmu
Posts: 40
Joined: Wed Aug 02, 2017 6:09 am

drilling arcs

Postby rmu » Wed Aug 02, 2017 6:35 am

I'm relatively new to FreeCAD and Path module, but I wondered why it is possible to specify "points" as drill-targets, but not the center of Arcs? The obvious use case is drilling pilot-holes for some other tool that does not like to cut in the center. Also, models imported via DXF or STP often contain arc-segments instead of circles, those can not be drilled easily it seems.
User avatar
sliptonic
Posts: 1562
Joined: Tue Oct 25, 2011 10:46 pm

Re: drilling arcs

Postby sliptonic » Wed Aug 02, 2017 1:39 pm

This can be added to the manual selection process. It won't be part of the automatic selection though.
Added issue #3147
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: drilling arcs

Postby roivai » Wed Aug 02, 2017 3:02 pm

I was thinking about this when I worked with PathDrilling some time ago. I don't know why I did not implement it. Probably laziness :D

I will look into this.
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: drilling arcs

Postby roivai » Wed Aug 02, 2017 4:13 pm

I think that is done, selecting an arc edge and adding it to the list should now be supported on my branch: https://github.com/pekkaroi/FreeCAD/tree/drilling_arcs

Could you please check if it makes sense and I can create a PR.
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: drilling arcs

Postby Konstantin » Wed Aug 02, 2017 5:28 pm

Drilling in arc center is a must. But please don't forget to add to this one more thing: if I select Arc and something else, like on attached picture, then center must be calculated somewhere in widest area between arcs wall and another side. Hard to imagine all usecases, but I had such problems before.
Attachments
Screenshot_20170802_202457.png
Screenshot_20170802_202457.png (11.19 KiB) Viewed 639 times
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: drilling arcs

Postby roivai » Wed Aug 02, 2017 5:46 pm

Konstantin wrote:
Wed Aug 02, 2017 5:28 pm
Drilling in arc center is a must. But please don't forget to add to this one more thing: if I select Arc and something else, like on attached picture, then center must be calculated somewhere in widest area between arcs wall and another side. Hard to imagine all usecases, but I had such problems before.
That would be excellent, but I think it is very difficult to create such an artificial intelligence which would guess the place where the user wants to drill based on multiple edges/faces. For example. If you have selected two adjacent edges which both are arcs: do you want to drill centers of both arcs or the widest point in the shape formed by those arcs? Like you say, imagining all the use cases is hard.
chrisb
Posts: 18926
Joined: Tue Mar 17, 2015 9:14 am

Re: drilling arcs

Postby chrisb » Wed Aug 02, 2017 6:24 pm

Of course can this be done, but as roivai said, it is not simple. You would have to calculate something like the center of mass of the pocket - something for the anti-matter path workbench :shock: .

Let's do other things first with easier achievable greater benefit to the user.
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: drilling arcs

Postby Konstantin » Wed Aug 02, 2017 6:27 pm

roivai wrote:
Wed Aug 02, 2017 5:46 pm
That would be excellent, but I think it is very difficult to create such an artificial intelligence which would guess the place where the user wants to drill based on multiple edges/faces. For example. If you have selected two adjacent edges which both are arcs: do you want to drill centers of both arcs or the widest point in the shape formed by those arcs? Like you say, imagining all the use cases is hard.
In theory, you should find the place, where biggest circle fits between selected faces and then it's center. But I am not a programmer, I'm just theorising.
[EDIT}
Even cooler, if walls goes not strictly vertical, it might not work. Better to look for biggest cilinder.
User avatar
sliptonic
Posts: 1562
Joined: Tue Oct 25, 2011 10:46 pm

Re: drilling arcs

Postby sliptonic » Wed Aug 02, 2017 6:46 pm

roivai wrote:
Wed Aug 02, 2017 5:46 pm
Konstantin wrote:
Wed Aug 02, 2017 5:28 pm
Drilling in arc center is a must. But please don't forget to add to this one more thing: if I select Arc and something else, like on attached picture, then center must be calculated somewhere in widest area between arcs wall and another side. Hard to imagine all usecases, but I had such problems before.
That would be excellent, but I think it is very difficult to create such an artificial intelligence which would guess the place where the user wants to drill based on multiple edges/faces. For example. If you have selected two adjacent edges which both are arcs: do you want to drill centers of both arcs or the widest point in the shape formed by those arcs? Like you say, imagining all the use cases is hard.
I agree. Arc centers are unambiguous. Keep It Simple!

I would still like to see the ability to pick an arbitrary point as a location though. The user shouldn't have to add a vertex just to select it as a location. He should be able to click 'add point' and then click a spot on the model to add those coordinates to the list. This can be easily added with the draft snapper getPoint() function. See PathProfile line 400 for reference
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: drilling arcs

Postby roivai » Wed Aug 02, 2017 8:35 pm

sliptonic wrote:
Wed Aug 02, 2017 6:46 pm
I would still like to see the ability to pick an arbitrary point as a location though. The user shouldn't have to add a vertex just to select it as a location. He should be able to click 'add point' and then click a spot on the model to add those coordinates to the list. This can be easily added with the draft snapper getPoint() function. See PathProfile line 400 for reference
This would be a good addition. I'll try to implement this. Just tried to play with the getPoint(). I got the dialog to appear, but all I got from that was a Segfault.. :)