Creating a thread: Unexpected results

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
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!
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Creating a thread: Unexpected results

Post by abdullah »

Dear Ulrich,

I can confirm that this macro works for me. I have read your python code to create it. I recognise that a different method for threading is used here.

Just for the reference of others reading this thread (correct me if I am wrong). In order to cut the thread, a single revolution is first created. To create this single revolution, an ISO profile is created and swept along an helix. This cutting operation is then copied and placed on the previous one until the desired thread length is obtained.

If you (wiki mantainers) would allow me a suggestion. Please link this version 1.7 macro in this wiki page. I think this is important because versions 1.2 and 1.6 do not longer work with the option real thread set (at least for me).

Thanks!!
ulrich1a wrote:
ulrich1a wrote: I will have a look and report later.
I recently worked at my macro. So I now did upload this new version here: viewtopic.php?f=22&t=6558#p52887

(ISO4017-M10x20) works for me with this new version .

Ulrich
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Creating a thread: Unexpected results

Post by abdullah »

If you are thinking on deprecating it and removing it, it is at least used in makebottle.py macro that is in the git source.

Maybe I am entering banned terrein, but if someone created that thread that way, and it managed to make it to the master git branch of FreeCAD, maybe probably possibly this behaviour was intended. If the person who created it is still around, he might be able to tell us the reason why it was created, the intended use, how to set the parameters... or confirm that it should be deprecated. Then it might be decided to maintain it, rename it, document the parameters,... My idea here is not to lose some code that may be useful (for example to make a plastic bottle thread).

Thanks!

wandererfan wrote:
jmaustpc wrote:The last time I looked at it, it did not work....it probably should be removed
It tries to loft between 2 helical profiles to produce the thread, but how to set the parameters is not obvious.

The thread doesn't match ISO or UN or anything else I recognize. Maybe a bottle top thread? It is an interesting solid though.

Could add a "deprecated" msg telling people to use Ulrich1a's method, prior to removing the Part.makeThread method.

wf
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Creating a thread: Unexpected results

Post by jmaustpc »

abdullah wrote:If you are thinking on deprecating it and removing it, it is at least used in makebottle.py macro that is in the git source.

Maybe I am entering banned terrein, but if someone created that thread that way, and it managed to make it to the master git branch of FreeCAD, maybe probably possibly this behaviour was intended. If the person who created it is still around, he might be able to tell us the reason why it was created, the intended use, how to set the parameters... or confirm that it should be deprecated. Then it might be decided to maintain it, rename it, document the parameters,... My idea here is not to lose some code that may be useful (for example to make a plastic bottle thread).

Thanks!

wandererfan wrote:
jmaustpc wrote:The last time I looked at it, it did not work....it probably should be removed
It tries to loft between 2 helical profiles to produce the thread, but how to set the parameters is not obvious.

The thread doesn't match ISO or UN or anything else I recognize. Maybe a bottle top thread? It is an interesting solid though.

Could add a "deprecated" msg telling people to use Ulrich1a's method, prior to removing the Part.makeThread method.

wf
Hi Abdulla

That's been in the code for a very, very, very long time, it pre-dates all the gui tools that we now use to make threads. I have not looked it up, but off the top of my head, I am sure it was created as part of the bottle demo, and only works for that specific thread, in the bottle demo. The last time I looked at it the parameters did not seem to work as expected, and from memory it was pretty useless for anything much other than where it is used in the one specific bottle demo. In fact if my memory is correct, that code is so old that it pre-dates almost all of the gui tools in FreeCAD.

However threads in general are not usually modelled. We have discussed, in this forum, in the recent past, what FreeCAD should do for most threads. For threads used on incidental bolts screws etc.. You would want to model a thread or a helical shape, for some specific situations. Like if you wanted to 3d print something with a thread like the "bottle". However for incidental fasteners the processing power required to actually model the thread would bring most models on most computers to a stand still for no real practical advantage. Hence we need to have a thread visualisation of some sort ...........in summary this is an import discussion which you should feel free to bring up again some time after 0.14 has been released, which hopefully will be very soon now.

Jim
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Creating a thread: Unexpected results

Post by abdullah »

It was just a simple innocent remark to see if someone is interested in that code.
jmaustpc wrote: However threads in general are not usually modelled. We have discussed, in this forum, in the recent past, what FreeCAD should do for most threads. For threads used on incidental bolts screws etc.. You would want to model a thread or a helical shape, for some specific situations. Like if you wanted to 3d print something with a thread like the "bottle". However for incidental fasteners the processing power required to actually model the thread would bring most models on most computers to a stand still for no real practical advantage. Hence we need to have a thread visualisation of some sort ...........
Jim
I know that threads are not usually represented. My use case scenario is mainly 3D printing, but also substractive manufacturing (I will get soon a 4-Axis hobbyist machine). As I have zero experience as machinist, you can see this as no more than a personal challenge to get some experience.
jmaustpc wrote: in summary this is an import discussion which you should feel free to bring up again some time after 0.14 has been released, which hopefully will be very soon now.
Jim
Sorry, I do not understand what you want to say with this sentence (I am not an english native speaker). But thanks for all the help you have offered me.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Creating a thread: Unexpected results

Post by abdullah »

I have summarised my experiences trying to build a thread in FreeCAD in this post.

It is much less complete than I expected to but if I put a single image more, the blogger interface crashes.

I hope it might be useful for newbies like me.

Regards,
Abdullah
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Creating a thread: Unexpected results

Post by NormandC »

Ulrich,

Try as I may I do not understand the reason for having so many colinear and joined construction lines. Could you explain it to me please?

Thanks!

Image
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Creating a thread: Unexpected results

Post by ulrich1a »

normandc wrote:Try as I may I do not understand the reason for having so many colinear and joined construction lines. Could you explain it to me please?
I wanted to have one sixteens of the pitch length or alternative the H-length of the thread profile. The one sixteens is used to define the position of vertical line of the profile. Then I also needed one third of the "H-length". So I looked for a way to make this in a resilient way. Tanderson69 told me this way. See here: viewtopic.php?f=3&t=6424#p51779

At working for the sketcher tutorial I realized that symmetry constraints do the job better. But it is needed to avoid redundant constraints. So do not combine symmetry constraints with parallel and or equality constraints.

So here is a faster version with symmetry constraints.

Ulrich
Attachments
Thread_cut_profile_published2.fcstd
(3.56 KiB) Downloaded 93 times
arcol
Posts: 223
Joined: Sun Nov 10, 2013 9:02 am

Re: Creating a thread: Unexpected results

Post by arcol »

6. cut the face with the sweep profile
I stuck at this point.

Am I supposed to cut a planar with the boolean cut tool? "Make a cut of two shapes"

Can somebody explain a bit more this step?
Screenshot after step 5, before Cut the face
Screenshot after step 5, before Cut the face
screenshot_cut_face.png (178.43 KiB) Viewed 2674 times
I figured, maybe the freecad file is needed to play with.
thread_before_step6.fcstd
Freecad file
(16.67 KiB) Downloaded 66 times
arcol
Posts: 223
Joined: Sun Nov 10, 2013 9:02 am

Re: Creating a thread: Unexpected results

Post by arcol »

Nevermind, I watched this video, and got it:
https://www.youtube.com/watch?v=fxKxSOGbDYs

It was the boolean function indeed.

(The video is annoying without any sound at all.)

Thread with double top
Thread with double top
thread_double_top.png (125.23 KiB) Viewed 2665 times
What I don't know, why I ended up, with touble thread top.
arcol
Posts: 223
Joined: Sun Nov 10, 2013 9:02 am

Re: Creating a thread: Unexpected results

Post by arcol »

How am I supposed to join the thread with a cylinder?
I try to make a part which looks like this:
(Thread) - (cylinder) - (thread)

I used boolean union, but it only succeeded unioning one cylinder with one thread.
The other thread I'm unable to union.
Also each union takes about 10 minutes on a fairly modern laptop (8 cores i7 cpu).

Also I'm absolutely unable to generate any drawings.
Post Reply