drilling arcs

Here's the place for discussion related to CAM/CNC and the development of the Path module.
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: drilling arcs

Postby roivai » Fri Aug 04, 2017 9:13 am

After some more experiments, I was able to add custom points using that getPoint(). It is great for that. But I still have one problem. As the getPoint() is implemented as task panel, the drilling task panel will be closed when the point selection is activated. I'm not sure if the panel changes are accepted or rejected when doing that? I suppose I should manually accept the panel when point selection is clicked? Now when the point selection is done, the location is successfully added to the list of drill locations, but I don't know how to reopen the task panel. I suppose there is a way to do it from python? Now it is quite clumsy to use as you need to double click the drilling op again to open the task panel after adding a new point..
mlampert
Posts: 1345
Joined: Fri Sep 16, 2016 9:28 pm

Re: drilling arcs

Postby mlampert » Fri Aug 04, 2017 5:15 pm

roivai wrote:
Fri Aug 04, 2017 9:13 am
It is great for that. But I still have one problem. As the getPoint() is implemented as task panel, the drilling task panel will be closed when the point selection is activated. I'm not sure if the panel changes are accepted or rejected when doing that? I suppose I should manually accept the panel when point selection is clicked?
I ran into the same issue - it's a bit of a pain but not too hard. Look at TaskPanel in PathDressupTagGui.py - it loads both task panels (the real one and one for getPoint) and switches between the two. It's still awkward from a UX perspective but it works.
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: drilling arcs

Postby roivai » Fri Aug 11, 2017 6:05 pm

Hi and sorry for a short absence.

Uh, it was a bit painful but seems to work.. And as I copied your implementation to Drilling, it is now duplicated. I tried implementing it as separate class as I could, so maybe it should be moved to some other place and shared with Tags one day.. But right now it is in https://github.com/pekkaroi/FreeCAD/tree/drilling_arcs
mlampert
Posts: 1345
Joined: Fri Sep 16, 2016 9:28 pm

Re: drilling arcs

Postby mlampert » Fri Aug 11, 2017 6:33 pm

Had a quick look and it looks good. I only had one question, if it would make sense to implement the arc-detection in PathUtils.isDrillable and add a flag to enable/disable. OTOH, this behaviour is pretty drilling specific so it can also stay in PathDrilling.

Can you get the PR ready and try to get it merged ASAP? I have a change I'm currently running through the works that consolidates a lot of the code including the UI and it would be a bit harsh on you if you would have to rebase your change onto that ;) .

PS: I think this is a great feature :)
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: drilling arcs

Postby roivai » Fri Aug 11, 2017 7:10 pm

mlampert wrote:
Fri Aug 11, 2017 6:33 pm
Had a quick look and it looks good. I only had one question, if it would make sense to implement the arc-detection in PathUtils.isDrillable and add a flag to enable/disable. OTOH, this behaviour is pretty drilling specific so it can also stay in PathDrilling.
I was thinking that, just wasn't sure about all the places where that isDrillable is used so I didn't dare to modify it. Adding a flag with a default would have worked of course.. Based on the name, the whole isDrillable is very drilling-specific, so it might make sense to implement it there, but for now it is that way..
mlampert wrote:
Fri Aug 11, 2017 6:33 pm
Can you get the PR ready and try to get it merged ASAP? I have a change I'm currently running through the works that consolidates a lot of the code including the UI and it would be a bit harsh on you if you would have to rebase your change onto that ;) .
I created a pull request. https://github.com/FreeCAD/FreeCAD/pull/924
mlampert
Posts: 1345
Joined: Fri Sep 16, 2016 9:28 pm

Re: drilling arcs

Postby mlampert » Fri Aug 11, 2017 7:33 pm

roivai wrote:
Fri Aug 11, 2017 7:10 pm
I created a pull request. https://github.com/FreeCAD/FreeCAD/pull/924
awesome!