Drillbit tip compensation
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 261
- Joined: Wed Jul 23, 2014 10:10 am
Drillbit tip compensation
Don't know how, but after some forking/deleting of freecad git I finaly made a tiny pull request, which must be fixed.
https://github.com/FreeCAD/FreeCAD/pull/926
https://github.com/FreeCAD/FreeCAD/pull/926
Re: Drillbit tip compensation
How is the tip compensation supposed to work? For simplicity let's assume that we have a 10mm twist drill with 45deg angle (typically it is 59deg I think, but math is easy with 45..) That means that the conical shape or the tip of the drill is 5mm long. Now you want to drill a hole from starting depth of 20mm to finish depth of 0mm, i.e a 20mm deep hole. What is the expected outcome? That the actual, full 10mm hole is 20mm deep? If yes then I think we should move the drill from z=20 to z=-5. And that is FinishDepth MINUS tiplength. Is that correct? In that commit, you changed the sign from minus to plus, which is a bit strange to me if my previous assumptions are correct? Or do I get the whole compensation wrong?
Re: Drillbit tip compensation
I'm with roivai, in my understanding the previous logic was correct - Konstantin could you explain why "tip compensation" means making the hole shorter?
-
- Posts: 261
- Joined: Wed Jul 23, 2014 10:10 am
Re: Drillbit tip compensation
Tip angle is always calculated on both sides, so it is 118°, not 59. Now if I create 10mm tool with 118° angle, add a tip lenght compensation, export it, And I get Z2.66, so it is higher then should be. I checked and rechecked again, it always goes higher. With new way I get Z-2.66. So, where am I wrong?roivai wrote: ↑Sun Aug 13, 2017 5:32 pm How is the tip compensation supposed to work? For simplicity let's assume that we have a 10mm twist drill with 45deg angle (typically it is 59deg I think, but math is easy with 45..) That means that the conical shape or the tip of the drill is 5mm long. Now you want to drill a hole from starting depth of 20mm to finish depth of 0mm, i.e a 20mm deep hole. What is the expected outcome? That the actual, full 10mm hole is 20mm deep? If yes then I think we should move the drill from z=20 to z=-5. And that is FinishDepth MINUS tiplength. Is that correct? In that commit, you changed the sign from minus to plus, which is a bit strange to me if my previous assumptions are correct? Or do I get the whole compensation wrong?
just calculate
Code: Select all
obj.FinalDepth.Value + tiplength
Code: Select all
obj.FinalDepth.Value - tiplength
- Attachments
-
- drill_example.FCStd
- (12.98 KiB) Downloaded 54 times
Last edited by Konstantin on Sun Aug 13, 2017 7:40 pm, edited 1 time in total.
Re: Drillbit tip compensation
But you want it to lower so you get the full width of the hole all the way through - right?Konstantin wrote: ↑Sun Aug 13, 2017 7:33 pm Tip angle is always calculated on both sides, so it is 118°, not 59. Now if I create 10mm tool with 118° angle, add a tip lenght compensation, export it, And I get Z2.66, so it is higher then should be. I checked and rechecked again, it always goes higher.
just calculatevsCode: Select all
obj.FinalDepth.Value + tiplength
Code: Select all
obj.FinalDepth.Value - tiplength
-
- Posts: 261
- Joined: Wed Jul 23, 2014 10:10 am
Re: Drillbit tip compensation
Yes, I just fixed my previous post.mlampert wrote: ↑Sun Aug 13, 2017 7:39 pmBut you want it to lower so you get the full width of the hole all the way through - right?Konstantin wrote: ↑Sun Aug 13, 2017 7:33 pm Tip angle is always calculated on both sides, so it is 118°, not 59. Now if I create 10mm tool with 118° angle, add a tip lenght compensation, export it, And I get Z2.66, so it is higher then should be. I checked and rechecked again, it always goes higher.
just calculatevsCode: Select all
obj.FinalDepth.Value + tiplength
Code: Select all
obj.FinalDepth.Value - tiplength
Re: Drillbit tip compensation
Ah, the problem is actually your tool definition. The cutting edge angle is to be expected as the angle specified in the datasheet, and `PathUtils.drillTipLength()` automatically doubles that angle. But because you have manually doubled it to 118° the resulting tooltip calculation returns a negative value - hence the reverted tooltip compensation.
We should probably put a safeguard in there, issuing an error if the resulting tool tip length ends up being negative. Or maybe put a value restriction on the cutting edge angle input field, having an angle >=90° (or <0° which is currently also possible) doesn't make any sense.
Good catch, I created an issue for the value restriction (issue #3158). I'll also create a PR for dealing with the compensation and adding an error message into PathUtils.
I forgot one thing which I should have mentioned right at the start: Konstantin, congrats on your first PR! That's quite an accomplishment.
Re: Drillbit tip compensation
See attached image for the calculation of the tip length. Using 59° seems to be correct if using the cotangens. And sorry for the handwriting, it was so much faster then creating a pdf.
- Attachments
-
- 20170814_012255.jpg (40.52 KiB) Viewed 2646 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Drillbit tip compensation
I did a little searching, and it turns out that most manufacturer actually specify the full point angle, at least for drill, counter sink and v-bits. So maybe we should change how we calculate the tip length and let the users specify the point angle instead of the cut edge angle.mlampert wrote: ↑Sun Aug 13, 2017 11:02 pm Ah, the problem is actually your tool definition. The cutting edge angle is to be expected as the angle specified in the datasheet, and `PathUtils.drillTipLength()` automatically doubles that angle. But because you have manually doubled it to 118° the resulting tooltip calculation returns a negative value - hence the reverted tooltip compensation.
We should probably put a safeguard in there, issuing an error if the resulting tool tip length ends up being negative. Or maybe put a value restriction on the cutting edge angle input field, having an angle >=90° (or <0° which is currently also possible) doesn't make any sense.
Opinions?
- sliptonic
- Veteran
- Posts: 3459
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Drillbit tip compensation
We need to make sure we're consistent with other cutter types. We're re-using the cutting edge angle and I I'm not sure how that attribute should be interpreted for end-mills, face-mills, etc. I assumed it was 1/2 the tip angle and doubled it for the drillTipLenght() because that's how heekscnc did it.mlampert wrote: ↑Mon Aug 14, 2017 12:15 amI did a little searching, and it turns out that most manufacturer actually specify the full point angle, at least for drill, counter sink and v-bits. So maybe we should change how we calculate the tip length and let the users specify the point angle instead of the cut edge angle.mlampert wrote: ↑Sun Aug 13, 2017 11:02 pm Ah, the problem is actually your tool definition. The cutting edge angle is to be expected as the angle specified in the datasheet, and `PathUtils.drillTipLength()` automatically doubles that angle. But because you have manually doubled it to 118° the resulting tooltip calculation returns a negative value - hence the reverted tooltip compensation.
We should probably put a safeguard in there, issuing an error if the resulting tool tip length ends up being negative. Or maybe put a value restriction on the cutting edge angle input field, having an angle >=90° (or <0° which is currently also possible) doesn't make any sense.
Opinions?