Fasteners workbench based on screw-maker
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Fasteners workbench based on screw-maker
@alex_55 I played around with the macro a bit. I noticed that when you overlay the internal threads with the external threads, the mesh of the peaks and valleys look good. However, the walls of the threads mesh perfectly with no tolerance. Does Ulrich's macro have a way to specify the class of the thread?
Re: Fasteners workbench based on screw-maker
Any volunteers want to work on the wiki documentation for Fasteners Workbench
We need several pages documented:
Fasteners_Flip
Fasteners_Move
Fasteners_Shape
Fasteners_MatchTypeInner
Fasteners_MatchTypeOuter
Fasteners_BOM
Fasteners_ScrewCalculator
Fasteners_ChamferHole
Fasteners_ChangeParameters
We need several pages documented:
Fasteners_Flip
Fasteners_Move
Fasteners_Shape
Fasteners_MatchTypeInner
Fasteners_MatchTypeOuter
Fasteners_BOM
Fasteners_ScrewCalculator
Fasteners_ChamferHole
Fasteners_ChangeParameters
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Fasteners workbench based on screw-maker
This is one of the key limitations of the macro. I works based on the nominal simplified spec that all common 60 degree screw threads (inch AND metric) use. This simplification makes the profile generation very easy.steve123 wrote: ↑Thu Feb 11, 2021 6:59 pm @alex_55 I played around with the macro a bit. I noticed that when you overlay the internal threads with the external threads, the mesh of the peaks and valleys look good. However, the walls of the threads mesh perfectly with no tolerance. Does Ulrich's macro have a way to specify the class of the thread?
https://en.wikipedia.org/wiki/Unified_Thread_Standard
"get toleranced threads into FastenersWB" is on my todo list for sure. Some implementation gremlins:
- Shia has already added a compensation setting that scales the threads, but this is meant for 3D printing purposes, and not made with machine tolerances in mind. How do we get two thread fitting systems working in harmony?
- UN and ISO threads use different designations for thread fit classes, even though mathematically they work the same AFAIK. Will have to set available fit classes for each screwtype
Find the settings in Edit > Preferences > Fasteners (the WB must be loaded) > Thread generation
A version of my macro that replicates the 3d printing compensation exactly:
Code: Select all
import ScrewMaker, Part, FreeCAD
# variables (units are mm):
Dia = 10
Pitch = 1.0
Length = 10
InnerThread = False
# thread compensation variables
comp_A_outer = 0.99
comp_B_outer = -0.05
comp_A_inner = 1.030
comp_B_inner = 0.1
# make the thread:
rots = round(Length/Pitch)
hrots = rots*2
generator = ScrewMaker.FSScrewMaker()
if InnerThread:
# tap object to cut internal thread
obj = generator.makeInnerThread_2(Dia*comp_A_inner+comp_B_inner,Pitch,rots,None,Dia)
else:
# external thread
# the function returns a shell object, but we can cap it
# and make it solid with a single circular face
cap = Part.makeFace(Part.makeCircle((Dia*comp_A_outer+comp_B_outer)/2,FreeCAD.Vector(0,0,2*Pitch)),"Part::FaceMakerSimple")
shellthread = generator.makeShellthread(Dia*comp_A_outer+comp_B_outer,Pitch,hrots,True,0)
obj = Part.makeSolid(Part.Shell(cap.Faces+shellthread.Faces))
Part.show(obj)
Re: Fasteners workbench based on screw-maker
Thank you very much for the update to the macro.alex_55 wrote: ↑Mon Feb 15, 2021 11:45 pm A version of my macro that replicates the 3d printing compensation exactly:Code: Select all
import ScrewMaker, Part, FreeCAD # variables (units are mm): Dia = 10 Pitch = 1.0 Length = 10 InnerThread = False # thread compensation variables comp_A_outer = 0.99 comp_B_outer = -0.05 comp_A_inner = 1.030 comp_B_inner = 0.1 # make the thread: rots = round(Length/Pitch) hrots = rots*2 generator = ScrewMaker.FSScrewMaker() if InnerThread: # tap object to cut internal thread obj = generator.makeInnerThread_2(Dia*comp_A_inner+comp_B_inner,Pitch,rots,None,Dia) else: # external thread # the function returns a shell object, but we can cap it # and make it solid with a single circular face cap = Part.makeFace(Part.makeCircle((Dia*comp_A_outer+comp_B_outer)/2,FreeCAD.Vector(0,0,2*Pitch)),"Part::FaceMakerSimple") shellthread = generator.makeShellthread(Dia*comp_A_outer+comp_B_outer,Pitch,hrots,True,0) obj = Part.makeSolid(Part.Shell(cap.Faces+shellthread.Faces)) Part.show(obj)
-
- Posts: 2
- Joined: Thu Feb 18, 2021 4:08 am
Fastener WB, clicking on "Counter Sunk" hangs FreeCAD
I have FreeCAD V0.19 installed. I used "Fastener WB" to make a counter sunk hole in my FreeCAD design. But when I click on the Diameter to change it to M4, The FreeCAD hangs.
Fastener WB was working fine on FreeCAD V0.18.
Fastener WB was working fine on FreeCAD V0.18.
Re: Fastener WB, clicking on "Counter Sunk" hangs FreeCAD
Please post your version data in the manner explained in the forum rules link above this forum.
The most likely reason for a 3rd party add on to fail in a newer FreeCAD is that the 3rd party may have not updated their code to keep it compliant with the newer version of Python used in the newer FreeCAD.
Over recent time, there has been a need to transition to Python 3 since Python two has long since passed end of life.
The most likely reason for a 3rd party add on to fail in a newer FreeCAD is that the 3rd party may have not updated their code to keep it compliant with the newer version of Python used in the newer FreeCAD.
Over recent time, there has been a need to transition to Python 3 since Python two has long since passed end of life.
Re: Fastener WB, clicking on "Counter Sunk" hangs FreeCAD
Please open a ticket on https://github.com/shaise/FreeCAD_FastenersWB/issues
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Fasteners workbench based on screw-maker
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Fasteners workbench based on screw-maker
Looks correct to me. Thanks!
Re: Fastener WB, clicking on "Counter Sunk" hangs FreeCAD
Here it works with FASTENERSWB_VERSION = 'V0.3.32'
OS: Windows 10 Version 2004
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: German/Switzerland (de_CH)
Regards
Hanspeter
OS: Windows 10 Version 2004
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: German/Switzerland (de_CH)
Regards
Hanspeter
- Attachments
-
- Countersunk.FCStd
- (12.81 KiB) Downloaded 48 times
-
- Countersunk.jpg (51.55 KiB) Viewed 2612 times