[WIP] Joint Macro
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
[WIP] Joint Macro
With this macro you can create different kinds of joints on a selected face. It is still a work in progress. There will likely be changes coming that will break existing models.
https://github.com/mwganson/joint
Some joint types are fairly easy to use, like mortise, tenon, box joint. The others are more complicated and will require some fiddling and experimentation. The Finger Joint is really a dovetail joint with some different property settings.
Usage: select a face and run the macro, select the type of joint. Then edit the joint object properties to your satisfaction. Symmetric is currently the default and will need to be set to false for most cases. Reversed can be toggled if the object points in the wrong direction.
None of these have been printed and tested. Do not rely upon the defaults to create usable mates. This is all "by guess and by gosh" at this point.
https://github.com/mwganson/joint
Some joint types are fairly easy to use, like mortise, tenon, box joint. The others are more complicated and will require some fiddling and experimentation. The Finger Joint is really a dovetail joint with some different property settings.
Usage: select a face and run the macro, select the type of joint. Then edit the joint object properties to your satisfaction. Symmetric is currently the default and will need to be set to false for most cases. Reversed can be toggled if the object points in the wrong direction.
None of these have been printed and tested. Do not rely upon the defaults to create usable mates. This is all "by guess and by gosh" at this point.
- Attachments
-
- Joint.FCMacro
- (67.63 KiB) Downloaded 81 times
-
- Posts: 327
- Joined: Tue May 28, 2019 10:51 am
Re: [WIP] Joint Macro
Very nice work, especially the range of joints and even more especially being fully parametric AFTER joint creation. Looking forward to watching this evolve even further!TheMarkster wrote: ↑Sun Dec 05, 2021 9:33 pm With this macro you can create different kinds of joints on a selected face. It is still a work in progress. There will likely be changes coming that will break existing models.
Re: [WIP] Joint Macro
Trying to test your macro, I can't start it. Got message:
...
OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.26761 (Git)
Build type: Release
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: French/France (fr_FR)
Code: Select all
22:47:04 Traceback (most recent call last):
File "C:/Users/vince/AppData/Roaming/FreeCAD/Macro/joint.py", line 1110, in <module>
FreeCAD.Console.PrintMessage("Please run "+BASENAME+".FCMacro rather than this file.\n")
<class 'NameError'>: name 'BASENAME' is not defined
OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.26761 (Git)
Build type: Release
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: French/France (fr_FR)
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: [WIP] Joint Macro
Thanks for the report. You need to run the Joint.FCMacro file, not the joint.py file.
Re: [WIP] Joint Macro
OK for that.
...
I gave 4mm as width, got 5mm for length of the tenon.
and 1 mm as length got it for the width.
Could be swap, isn't it?
...
I gave 4mm as width, got 5mm for length of the tenon.
and 1 mm as length got it for the width.
Could be swap, isn't it?
- Attachments
-
- Capture.JPG (59.47 KiB) Viewed 2825 times
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: [WIP] Joint Macro
Try setting Angle to 90 degrees.
Scratch that. I misunderstood the question.
I had to look at the source code to refresh my memory. This is the width:
The Length distance determines the radius of the arcs, so the actual width is Width+Length.
Scratch that. I misunderstood the question.
I had to look at the source code to refresh my memory. This is the width:
The Length distance determines the radius of the arcs, so the actual width is Width+Length.
Re: [WIP] Joint Macro
Thank you very much for the macro to create joint, It's great!
Could it be possible to add the Bridle joint?
Could it be possible to add the Bridle joint?
- Attachments
-
- Bridle joint.png (7.09 KiB) Viewed 2116 times
-
- Bridle joint.FCStd
- (41.55 KiB) Downloaded 45 times
Concevoir en bois avec FreeCAD: https://www.lairdubois.fr/pas-a-pas/114 ... -bois.html
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: [WIP] Joint Macro
You should be able to do it with the mortise and tenon joint types.
Edit: The problem with that is the mortise and tenon types have rounded ends. I am updating the macro to include a new boolean property "Rounded" for mortise and tenon types. This will default to True. If set to False the ends will not be rounded. New version will be 0.2022.04.28. Should be up soon on the addon manager, within the next few minutes.
Edit: The problem with that is the mortise and tenon types have rounded ends. I am updating the macro to include a new boolean property "Rounded" for mortise and tenon types. This will default to True. If set to False the ends will not be rounded. New version will be 0.2022.04.28. Should be up soon on the addon manager, within the next few minutes.
Re: [WIP] Joint Macro
Thank for the update
I have done the update
I can't run the macro anymore...
14:16:59 Traceback (most recent call last):
File "C:/Users/Administrator/AppData/Roaming/FreeCAD/Macro/Joint.FCMacro", line 1276, in <module>
import joint as FP
<class 'ModuleNotFoundError'>: No module named 'joint'
I have done the update
I can't run the macro anymore...
14:16:59 Traceback (most recent call last):
File "C:/Users/Administrator/AppData/Roaming/FreeCAD/Macro/Joint.FCMacro", line 1276, in <module>
import joint as FP
<class 'ModuleNotFoundError'>: No module named 'joint'
Code: Select all
OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.28671 (Git)
Build type: Release
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: English/United States (en_US)
Installed mods:
* A2plus 0.4.56
* Assembly3 0.11.3
* BOLTSFC
* CurvedShapes 1.0.2
* dxf-library
* frame
* parts_library
* Reporting
Concevoir en bois avec FreeCAD: https://www.lairdubois.fr/pas-a-pas/114 ... -bois.html
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am