Helix Operation/Generator retract

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!
Post Reply
User avatar
sliptonic
Veteran
Posts: 3453
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Helix Operation/Generator retract

Post by sliptonic »

I've been doing some work on moving the helix logic into a new generator. This is preparation for refactoring the helix op itself.

Looking at the code, I noticed that when a helix completes, it retracts vertically from the end position. I believe this will always result in a dwell mark on the wall of the hole.

My first thought was that at the end of the helix, the tool should move laterally to the center of the hole so that retraction doesn't touch the wall. This won't work though because if the hole is more than 2X the cutter diameter, it will leave a 'plug' behind which would potentially break the cutter.

So we could test if the hole diameter is less than 2X cutter and, if so, move to center. otherwise we have to retract in place?

Am I missing anything? Are there other options? How should we handle retraction?
MrZando
Posts: 3
Joined: Tue Sep 21, 2021 3:59 pm

Re: Helix Operation/Generator retract

Post by MrZando »

It would be nice if helix can be used for thread milling. For thread milling you will need to retract the depth of the thread + clearance.
User avatar
sliptonic
Veteran
Posts: 3453
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Helix Operation/Generator retract

Post by sliptonic »

MrZando wrote: Mon Jan 17, 2022 6:46 pm It would be nice if helix can be used for thread milling. For thread milling you will need to retract the depth of the thread + clearance.
Threadmilling will be a separate thing. Some work already done on it but not much in common with helix
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Helix Operation/Generator retract

Post by Russ4262 »

I suggest a "Z" retraction, referring to the shape, not the axis. This solution assumes a multi-pass helix (greater than cutter diameter).
1.) small lateral jog toward center, to pull away from wall
2.) vertical retraction to safe height
3.) jog to center of helix path - the (x, y) for center of helix

If helix path is only a single-pass, then a retraction in place is the solution, otherwise, use the "Z" shape.

I suppose the initial lateral jog and the retraction to safe height could be combined into a single motion (a slanted retraction of sorts).

Just my theoretical opinion, nothing more.

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

Re: Helix Operation/Generator retract

Post by sliptonic »

Russ4262 wrote: Mon Jan 17, 2022 8:21 pm 1.) small lateral jog toward center, to pull away from wall
It's unlikely but possible that the helix does not go full depth. In other words, it cut an annular slot tangent to the wall but left the plug in place. A move to the center at depth would be a full depth cut and likely break the cutter.
MrZando
Posts: 3
Joined: Tue Sep 21, 2021 3:59 pm

Re: Helix Operation/Generator retract

Post by MrZando »

You say that some work is already done on thread milling. Searching the forum I see a little chatter about something malmpert is working on, but not much more than that.

Can you point me in the direction of some thread milling code or branch that I could look into.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Helix Operation/Generator retract

Post by GeneFC »

sliptonic wrote: Mon Jan 17, 2022 6:30 pm Am I missing anything? Are there other options? How should we handle retraction?
At the risk of increasing Task Panel complexity it could be an option to pull back or not. I would guess that some fixed small value of pull-back would be acceptable.

Sometimes I care about the dwell mark and sometimes I do not. Sometimes I make an annular cut and sometimes a full cut to clear the entire cylinder.

Of course this is of much greater impact than just a helix. Many profile and pocket operations have the same issue with dwell marks.

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

Re: Helix Operation/Generator retract

Post by sliptonic »

GeneFC wrote: Mon Jan 17, 2022 9:51 pm At the risk of increasing Task Panel complexity it could be an option to pull back or not. I would guess that some fixed small value of pull-back would be acceptable.
I don't mind making it an option if it adds value to the user. I don't think that 's the case here. It feels like punting because we don't want to make a decision.

I think the safest thing is to check if it's safe to move to center (hole <= 2X cutter diameter) and move if safe. Otherwise retract in position.

If someone can show a use-case for something else, we can implement it
Of course this is of much greater impact than just a helix. Many profile and pocket operations have the same issue with dwell marks.
True, but we have lead in/out to help with profiles. A pocket where the user cares about surface finish could be done leaving a bit of material and then a finish profile with a lead in/out.
User avatar
onekk
Veteran
Posts: 6094
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Helix Operation/Generator retract

Post by onekk »

it will suffice to add some clearance property so if the helix is more than two diameter the operation would do two passes one with clearance and the other witout clearance adding som room to retract safely without mark.

adding another property like (clear holel will make an helical pocket as seen in other CAM that could make holes eith an helical movement.

in this case you have to calculate how many helix are needed to clear the hole with maybe a (stepover) fixed or variable to overlap the cut.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
sliptonic
Veteran
Posts: 3453
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Helix Operation/Generator retract

Post by sliptonic »

As I said, I don't mind adding properties that add value to the user but I resist adding them to resolve problems the programmer should solve.

In this case, there's either a safe place for the cutter to move to for retraction or there isn't. If there is, then we should go there. If there isnt, we can't.

In my current version of the generator (pr pending), I account for two of the three safe cases that I can think of. The third is trickier so I documented it but left it unfinished.

https://github.com/FreeCAD/FreeCAD/blob ... or.py#L231
Post Reply