Tool Path to Create Screw Pocket Hole

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!
Samu
Posts: 51
Joined: Fri Jan 29, 2021 2:16 pm

Re: Tool Path to Create Screw Pocket Hole

Post by Samu »

dschultz wrote: Fri Feb 03, 2023 12:42 pm
Samu wrote: Thu Feb 02, 2023 10:02 am
dschultz wrote: Thu Feb 02, 2023 4:15 am It all is working fine and the results in the 3d display look perfect, however, I can't get it to post process (at least with linuxcnc)
linuxcnc only postprocesses active operations. Just add the following lines to your macro:

Code: Select all

    o.addProperty('App::PropertyBool', 'Active', 'Path')
    o.Active = True
Got a chance to add that last night and it worked great, Thanks for the solution!
It still causes a "No Tool Controller, Op Aborted" issue if I want to add another operation after I add this PocketHole operation.
If I do the Profile or Pocket operation (or whatever operation) before I run the macro, there's no issues.
It seems that something in the macro is removing the tool controller or disabling it.
If I delete the PocketHole operation, I'm back in business.

Thanks,
I can replicate this behaviour but I can't find anything interacting with the tool controller in your code.
To get the operations in the order you want, you can first add your profile and pocket operations and run your macro afterwards. Then re-organise your Ops in the 'workplan' tab of your job.
dschultz
Posts: 7
Joined: Fri Jan 06, 2023 6:18 pm

Re: Tool Path to Create Screw Pocket Hole

Post by dschultz »

Ok, yeah, it works as is so I'm happy!
Thanks for your help.
Samu
Posts: 51
Joined: Fri Jan 29, 2021 2:16 pm

Re: Tool Path to Create Screw Pocket Hole

Post by Samu »

dschultz wrote: Fri Feb 03, 2023 12:42 pm
Samu wrote: Thu Feb 02, 2023 10:02 am
dschultz wrote: Thu Feb 02, 2023 4:15 am It all is working fine and the results in the 3d display look perfect, however, I can't get it to post process (at least with linuxcnc)
linuxcnc only postprocesses active operations. Just add the following lines to your macro:

Code: Select all

    o.addProperty('App::PropertyBool', 'Active', 'Path')
    o.Active = True
Got a chance to add that last night and it worked great, Thanks for the solution!
It still causes a "No Tool Controller, Op Aborted" issue if I want to add another operation after I add this PocketHole operation.
If I do the Profile or Pocket operation (or whatever operation) before I run the macro, there's no issues.
It seems that something in the macro is removing the tool controller or disabling it.
If I delete the PocketHole operation, I'm back in business.

Thanks,
I did a bit of digging and it seems all operations in the job need a tool controller assigned.
If you add the following lines, your problem should be solved:

Code: Select all

 tc =  FreeCAD.ActiveDocument.Tools.Group[1]
 o.addProperty("App::PropertyLink", "ToolController", "Path")
 o.ToolController = tc
Another bonus of this approach is that you can make your feedrate fully parametric like so:

Code: Select all

horizFeed = tc.HorizFeed.Value
dschultz
Posts: 7
Joined: Fri Jan 06, 2023 6:18 pm

Re: Tool Path to Create Screw Pocket Hole

Post by dschultz »

I've done some tinkering with custom path operations scripted with Python and I was wondering what the process is to be able to 'edit' a custom operation?
For example other mainstream operations that ship with FreeCAD Path allow you to either double click or right-click and edit them.
I'm wondering how to implement that on a custom operation.
Post Reply