boolean cut off a piece of M30*1.5 threaded rod
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: boolean cut off a piece of M30*1.5 threaded rod
@tanderson69
Doing a single revolution will only get the user to make one (or more) revolution successfully. But resulting solid will not allow the user to do much with it (boolean operations). It will fail at first boolean operation like fusing it with cylinder or at second when cutting that out of for example a box.
I tried a few things but ATM i would say users won't succeed by modeling "threaded rod" and after trying to use that for cutting out the inner thread from solid.
On your image look at the inner face of the first revolution. This face and outer face of for example cylinder will never form "perfect face" after boolean operation and instead a lot of artifacts will corrupt it.
Until this gets resolved (geometric kernel or in FreeCAD tools) i don't think users should try to do this task in the first place as it won't work. I am wondering if some internal tolerance could be tweaked to get that "perfect face" after boolean. Maybe fuzzy boolean parameter avaliable in the future could help. As for the current possibilities from my point of view i will continue here:
viewtopic.php?f=3&t=12593
Doing a single revolution will only get the user to make one (or more) revolution successfully. But resulting solid will not allow the user to do much with it (boolean operations). It will fail at first boolean operation like fusing it with cylinder or at second when cutting that out of for example a box.
I tried a few things but ATM i would say users won't succeed by modeling "threaded rod" and after trying to use that for cutting out the inner thread from solid.
On your image look at the inner face of the first revolution. This face and outer face of for example cylinder will never form "perfect face" after boolean operation and instead a lot of artifacts will corrupt it.
Until this gets resolved (geometric kernel or in FreeCAD tools) i don't think users should try to do this task in the first place as it won't work. I am wondering if some internal tolerance could be tweaked to get that "perfect face" after boolean. Maybe fuzzy boolean parameter avaliable in the future could help. As for the current possibilities from my point of view i will continue here:
viewtopic.php?f=3&t=12593
- tanderson69
- Veteran
- Posts: 1624
- Joined: Thu Feb 18, 2010 1:07 am
Re: boolean cut off a piece of M30*1.5 threaded rod
What does this sentence even mean?triplus wrote:Doing a single revolution will only get the user to make one (or more) revolution successfully.
I didn't say I had all the answers. I was simply pointing out why that modeling operation won't work. I think a free-form(surface) approach is better suited. I have successfully made some threads, but it is always hit and miss and not easy.
Re: boolean cut off a piece of M30*1.5 threaded rod
ATM FreeCAD enables the end user to only produce the thread itself (solid). Going beyond that (additional boolean operation including this solid) will most likely fail.tanderson69 wrote:What does this sentence even mean?
I know and i am sorry if it sounded like that. You made a good introduction on the subject (from what usually works) and i went from that point on. As for using other approaches i am not sure if the resulting solid would be any more successful in boolean operations used after.I didn't say I had all the answers. I was simply pointing out why that modeling operation won't work. I think a free-form(surface) approach is better suited.
And standard procedure to make threads is to first create 2D profile on a mayor plane. I could be wrong but based on my experiments ATM that is more of an miss (going beyond the created thread solid).
Exactly.I have successfully made some threads, but it is always hit and miss and not easy.
- tanderson69
- Veteran
- Posts: 1624
- Joined: Thu Feb 18, 2010 1:07 am
Re: boolean cut off a piece of M30*1.5 threaded rod
It all depends. You just have to try it. Having pretty good luck with this one today.triplus wrote:ATM FreeCAD enables the end user to only produce the thread itself (solid). Going beyond that (additional boolean operation including this solid) will most likely fail.
- Attachments
-
- M28M30_ta5.FCStd
- (416.07 KiB) Downloaded 42 times
Re: boolean cut off a piece of M30*1.5 threaded rod
Yes that seems to produce a solid that can be used in boolean operation successfully. I am not sure why Common works the way it does as i would expect it would return threads only?
You used different modeling technique that avoids creating one issue that i do believe prevents FreeCAD users to create threads directly:
I used:
Therefore what would be interesting to know:
Is geometric kernel capable to achieve that task or not ATM (on first image Cut is used on second Common)? Could this be tested somehow without involving FreeCAD?
What leads me to believe this could be some internal tolerance (FreeCAD/OCC) issue is i got this result when using 100 nm as boolean tolerance:
Almost perfect.
You used different modeling technique that avoids creating one issue that i do believe prevents FreeCAD users to create threads directly:
I used:
- OCC 6.9.0
- dev-fuzzyboolean
- Helix
- Sketch Line
- Sweep
- Face of the Cylinder (Draft Downgrade)
Therefore what would be interesting to know:
Is geometric kernel capable to achieve that task or not ATM (on first image Cut is used on second Common)? Could this be tested somehow without involving FreeCAD?
What leads me to believe this could be some internal tolerance (FreeCAD/OCC) issue is i got this result when using 100 nm as boolean tolerance:
Almost perfect.
Re: boolean cut off a piece of M30*1.5 threaded rod
OK i read this:
viewtopic.php?f=3&t=12593#p101110
viewtopic.php?f=10&t=6355
Was the default tolerance changed to tolerance of 1e-7 instead of 1e-5? I am guessing it did? That would explain why i get the best result when i set boolean fuzzy tolerance to value 1e-7 (100 nm)?
What is default tolerance for sweep and boolean operations in FreeCAD?
viewtopic.php?f=3&t=12593#p101110
Therefore the reason why ATM users can't make threads (as we have discussed) directly in FreeCAD actually could be related to precision? More precisely helix precision? After i searched the forum and found this:Rule 2. Remember that helix in FreeCAD is an imprecise thing. As a consequence, a cylinder made to mate with the thread precisely is very likely to fail to fuse to the thread. In general, avoid geometry coincident to elements of the sweep, such as tangent faces, edges tangent to faces they are not connected to, coincident and tangent edges, etc.
viewtopic.php?f=10&t=6355
Was the default tolerance changed to tolerance of 1e-7 instead of 1e-5? I am guessing it did? That would explain why i get the best result when i set boolean fuzzy tolerance to value 1e-7 (100 nm)?
What is default tolerance for sweep and boolean operations in FreeCAD?
- tanderson69
- Veteran
- Posts: 1624
- Joined: Thu Feb 18, 2010 1:07 am
Re: boolean cut off a piece of M30*1.5 threaded rod
That is the "trick" for this method. Shape001 is what is call a "half space". I made it with the following python code:triplus wrote:Yes that seems to produce a solid that can be used in boolean operation successfully. I am not sure why Common works the way it does as i would expect it would return threads only?
Code: Select all
temp = App.ActiveDocument.Shell.Shape.copy()
halfSpace = temp.makeHalfSpace(FreeCAD.Vector(0.0, 0.0, 0.0))
Part.show(halfSpace)
Another thing that I think helps is the sweep having both a start and finish profile. I believe that this helps the sweep terminate at a position close enough to sew the next copy..... I just proved this out. look at the following 2 pictures. 1 picture is using 1 profile(just at beginning) and the other is using a profile at the start and end. You can see by the numbers that the distance measurement using 2 profiles is much closer.
Re: boolean cut off a piece of M30*1.5 threaded rod
Thanks for the explanation and i was thinking in this direction indeed as i remembered similar use case presented in "half space" debate. Anyway if it produces valid solid with threads and it can be after used in boolean operations it has my vote.
I still didn't give up on FreeCAD providing the user possibility to model the solid with threads directly and after to use it in boolean operation successfully. I can't fix that but i can provide a clue and hopefully things would evolve from there on. I think i found something worth "reporting" but need to do some tests first.
I still didn't give up on FreeCAD providing the user possibility to model the solid with threads directly and after to use it in boolean operation successfully. I can't fix that but i can provide a clue and hopefully things would evolve from there on. I think i found something worth "reporting" but need to do some tests first.
Re: boolean cut off a piece of M30*1.5 threaded rod
OK here it is. This was made on FreeCAD installed from Ubuntu Daily PPA:
If different approach is used or combination with the following objects:
Therefore this does not necessarily indicate geometric kernel can make perfect threads when using direct modeling approach but in my opinion this is encouraging and a good start.
Therefore:
Different objects like mentioned:
issue #0001739
P.S. And thinking about this further we probably often pinpointed boolean operations as the main reason for something to not work but instead objects made with sweep operations are very likely contributing to the issue (or at least in some use cases).
- Insert Helix and use Part Extrude on it (Z direction 0,2 mm).
- Insert Cylinder and use Draft Downgrade tool on it to get a face.
- Select them and use Boolean Cut.
If different approach is used or combination with the following objects:
- Create sketch with circle as 2D profile and use Part Extrude on it. And use that instead of Draft Downgrade face.
- Use Part Sweep with a line as 2D profile instead of using Part Extrude directly on helix.
Therefore this does not necessarily indicate geometric kernel can make perfect threads when using direct modeling approach but in my opinion this is encouraging and a good start.
Therefore:
- Boolean Cut can succeed
- Geometric kernel can produce correct result
- Helix precision by itself doesn't prevent Boolean Cut to succeed
Different objects like mentioned:
- Draft Downgraded Cylinder Face
- Extruded sketch based face
- Face made by using extrude tool on helix directly
- Sweeping the line and using helix as a path
- Boolean operation
- ...
issue #0001739
P.S. And thinking about this further we probably often pinpointed boolean operations as the main reason for something to not work but instead objects made with sweep operations are very likely contributing to the issue (or at least in some use cases).
- tanderson69
- Veteran
- Posts: 1624
- Joined: Thu Feb 18, 2010 1:07 am
Re: boolean cut off a piece of M30*1.5 threaded rod
Nice test!triplus wrote:OK here it is.
Can confirm your 'Perfect Cut' base case. CAN'T confirm the substitution of padded circle for cylinder face. It still works here. Can confirm substituting swept line for extruded helix does cause failure.triplus wrote: Perfect Cut!
If different approach is used or combination with the following objects:
Boolean Cut will fail.
- Create sketch with circle as 2D profile and use Part Extrude on it. And use that instead of Draft Downgrade face.
- Use Part Sweep with a line as 2D profile instead of using Part Extrude directly on helix.
I agree with this. Nice job! Boolean algorithms are not supported for non-solid objects, but I think we are safe to draw conclusions here.triplus wrote:Therefore:
[*]Helix precision by itself doesn't prevent Boolean Cut to succeed[/list]
Here is where you lost me. For me, the results of this test show the consistency of extrude vs sweep. What I am thinking, is the approximation of the spline helix combined with the freenet calculation is causing tiny oscillations (twisting if you will) of the profile geometry as it is swept along the spline. This causes the edges to the newly created face to go in and out of the face. Here is a picture of my boolean result here and you can see internal edges created through-out the face. What we need here is a deviation analysis tool to run on the edges to the face.triplus wrote:Therefore my conclusion would be this in the end is FreeCAD precision issue and it needs to be resolved in FreeCAD.