ThreadProfile Workbench

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
bavariaSHAPE
Posts: 406
Joined: Tue Jun 10, 2014 8:31 am
Contact:

Re: ThreadProfile Workbench

Post by bavariaSHAPE »

TheMarkster wrote: Tue Jul 30, 2019 4:01 am Possibly. I want to add some more thread profile types. I'm looking at buttress threads. I think these could be ideal for 3d printing for a number of reasons. Because the angle is mostly in one direction there won't be much overhang. They are stronger, much stronger in one direction than in the other, which can be useful for plastic materials.
Sounds good for us. Just one more small wish for the finishing touch.
Due to the tolerances in 3D printing, it would be helpful if the parameters for minor diameter and nominal diameter could still be adjusted for later. Thus the flank angle does not change. I could imagine that one percentage would be sufficient for both values. That is, of course, within your discretion as to whether that would be feasible.

Anyway, I like it already very much. I will "play around" with it a little bit to see how the suitable workflow is for me.

:idea: Achim
… for a happy FreeCAD-World … JM2C …
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: ThreadProfile Workbench

Post by TheMarkster »

The minor diameter is adjustable, as is the pitch, even if you use one of the presets. The nominal diameter listed in the preset is just a text label. What's actually used is the minor diameter and the pitch in constructing the profile. If you're printing both parts, the screw and the nut, it's recommended to take a cross-cut of both parts to see the fit, then adjust the minor diameters as needed.
User avatar
bavariaSHAPE
Posts: 406
Joined: Tue Jun 10, 2014 8:31 am
Contact:

Re: ThreadProfile Workbench

Post by bavariaSHAPE »

TheMarkster wrote: Tue Jul 30, 2019 6:52 pm The minor diameter is adjustable, as is the pitch, even if you use one of the presets. The nominal diameter listed in the preset is just a text label. What's actually used is the minor diameter and the pitch in constructing the profile. If you're printing both parts, the screw and the nut, it's recommended to take a cross-cut of both parts to see the fit, then adjust the minor diameters as needed.
Thanks, I'm will run some printing tests on these infos.

:idea: Achim
… for a happy FreeCAD-World … JM2C …
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: ThreadProfile Workbench

Post by TheMarkster »

I added buttress threads. These are ANSI 7 degree / 45 degree threads. Basically, 52 degrees compared to 60 degrees for v threads, but these are angled in such a way as to increase strength in one direction, at the expense of the other.
buttress.png
buttress.png (79.95 KiB) Viewed 2273 times
User avatar
bavariaSHAPE
Posts: 406
Joined: Tue Jun 10, 2014 8:31 am
Contact:

Re: ThreadProfile Workbench

Post by bavariaSHAPE »

TheMarkster wrote: Wed Jul 31, 2019 10:00 pm I added buttress threads. These are ANSI 7 degree / 45 degree threads. Basically, 52 degrees compared to 60 degrees for v threads, but these are angled in such a way as to increase strength in one direction, at the expense of the other.
Very nice, and with extensive thread list. Also the threads for camera tripods are included.

When I call »Create Buttress thread…« I get an error:

Code: Select all

Running the Python command 'ThreadProfileCreateButtressObject' failed:
Traceback (most recent call last):
  File "C:\Users\AchimK\AppData\Roaming\FreeCAD\Mod\ThreadProfile\ThreadProfileCmd.py", line 722, in Activated
    self.makeButtressThreadProfile()
  File "C:\Users\AchimK\AppData\Roaming\FreeCAD\Mod\ThreadProfile\ThreadProfileCmd.py", line 785, in makeButtressThreadProfile
    ThreadProfileCreateObjectCommandClass.makeThreadProfile(self,name="BThreadProfile",internal_data = internal_buttress_data, external_data = external_buttress_data, presets = buttress_presets_data,minor_diameter=buttress_presets_data[13][2],pitch=25.4/10,internal_or_external="External",thread_count=10)

unbound method makeThreadProfile() must be called with ThreadProfileCreateObjectCommandClass instance as first argument (got ThreadProfileCreateButtressObjectCommandClass instance instead)
Greetings Achim

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17352 (Git)
Build type: Release
Branch: master
Hash: ec0049921b813ee78c1fd4ea304e70904a3208f7
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
… for a happy FreeCAD-World … JM2C …
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: ThreadProfile Workbench

Post by TheMarkster »

Thanks for reporting this. There is another bug I am also working on where upon restarting FreeCAD an opening an existing file the presets are not able to be changed.
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: ThreadProfile Workbench

Post by TheMarkster »

bavariaSHAPE wrote: Thu Aug 01, 2019 8:13 am
TheMarkster wrote: Wed Jul 31, 2019 10:00 pm I added buttress threads. These are ANSI 7 degree / 45 degree threads. Basically, 52 degrees compared to 60 degrees for v threads, but these are angled in such a way as to increase strength in one direction, at the expense of the other.
Very nice, and with extensive thread list. Also the threads for camera tripods are included.

When I call »Create Buttress thread…« I get an error:

Code: Select all

Running the Python command 'ThreadProfileCreateButtressObject' failed:
Traceback (most recent call last):
  File "C:\Users\AchimK\AppData\Roaming\FreeCAD\Mod\ThreadProfile\ThreadProfileCmd.py", line 722, in Activated
    self.makeButtressThreadProfile()
  File "C:\Users\AchimK\AppData\Roaming\FreeCAD\Mod\ThreadProfile\ThreadProfileCmd.py", line 785, in makeButtressThreadProfile
    ThreadProfileCreateObjectCommandClass.makeThreadProfile(self,name="BThreadProfile",internal_data = internal_buttress_data, external_data = external_buttress_data, presets = buttress_presets_data,minor_diameter=buttress_presets_data[13][2],pitch=25.4/10,internal_or_external="External",thread_count=10)

unbound method makeThreadProfile() must be called with ThreadProfileCreateObjectCommandClass instance as first argument (got ThreadProfileCreateButtressObjectCommandClass instance instead)
Greetings Achim

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17352 (Git)
Build type: Release
Branch: master
Hash: ec0049921b813ee78c1fd4ea304e70904a3208f7
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
This is python2. I've been testing on python3, which is why I didn't catch it. Hopefully it is fixed now in version 1.42.
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: ThreadProfile Workbench

Post by TheMarkster »

Some recent fixes will most likely break compatibility with profiles created with previous versions.
User avatar
bavariaSHAPE
Posts: 406
Joined: Tue Jun 10, 2014 8:31 am
Contact:

Re: ThreadProfile Workbench

Post by bavariaSHAPE »

TheMarkster wrote: Thu Aug 01, 2019 5:40 pm Thanks for reporting this. There is another bug I am also working on where upon restarting FreeCAD an opening an existing file the presets are not able to be changed.

This is python2. I've been testing on python3, which is why I didn't catch it. Hopefully it is fixed now in version 1.42.
The first test was successful. I will test a few 3d prints this weekend.
… for a happy FreeCAD-World … JM2C …
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: ThreadProfile Workbench

Post by TheMarkster »

Version 1.50 -- Sweep tool added.

To use this tool, select the ThreadProfile object and the Helix (or ShapeBinder) first, then run the command.

If the Helix was selected then you get a Part Workbench Sweep, solid = True, frenet = True. This is for both internal and external threads. For internal threads you still need to cut the Sweep object out of some other material, such as an extruded hexagon.

If the ShapeBinder is selected and if there is an active body, then the Part Design AdditivePipe (for external threads) or the Part Design SubtractivePipe (for internal threads) is used, again with frenet mode selected.

If you have trouble cutting the internal thread it will very probably be because of FreeCAD's issues with coplanar boolean operations. Try moving either the ThreadProfile object or the material the thread is being cut from so that the faces are not coplanar. I suggest moving the ThreadProfile object to -1mm in the z direction.
Locked