Helix Operation/Generator retract
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- sliptonic
- Veteran
- Posts: 3460
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Helix Operation/Generator retract
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?
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?
Re: Helix Operation/Generator retract
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.
- sliptonic
- Veteran
- Posts: 3460
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Helix Operation/Generator retract
Threadmilling will be a separate thing. Some work already done on it but not much in common with helix
Re: Helix Operation/Generator retract
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
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
- sliptonic
- Veteran
- Posts: 3460
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Helix Operation/Generator retract
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.
Re: Helix Operation/Generator retract
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.
Can you point me in the direction of some thread milling code or branch that I could look into.
Re: Helix Operation/Generator retract
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
- sliptonic
- Veteran
- Posts: 3460
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Helix Operation/Generator retract
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
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.Of course this is of much greater impact than just a helix. Many profile and pocket operations have the same issue with dwell marks.
Re: Helix Operation/Generator retract
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.
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/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- sliptonic
- Veteran
- Posts: 3460
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Helix Operation/Generator retract
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
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