Releasing "BodyBuilder", a PartDesign macro for assembling bodies
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Releasing "BodyBuilder", a PartDesign macro for assembling bodies
OK, Git now has BodyBuilder4.1, some instructions, and an image of the dialog menus. I will do a couple videos of the basics.
https://github.com/Freedman-CB1/BodyBuilder
Thanks, edwilliams16 for the code that allows me to get Body selections from a 3D face selection.
Thanks, dtay for the matrix idea.
Here is an earlier discussion:
viewtopic.php?t=75597&start=10
Thanks all
https://github.com/Freedman-CB1/BodyBuilder
Thanks, edwilliams16 for the code that allows me to get Body selections from a 3D face selection.
Thanks, dtay for the matrix idea.
Here is an earlier discussion:
viewtopic.php?t=75597&start=10
Thanks all
Re: Releasing "BodyBuilder", a PartDesign macro for assembling bodies
I have made a few changes to BodyBuilder, all in the GUI and object selection area. Version 4.3
https://github.com/Freedman-CB1/BodyBuilder
I also did some testing with Clones and they seem to work just like a Body. That capability can help decrease file size and adds a lot of structure to a model with many identical shapes i.e. if you want to design a deck, all the deck plates could be clones so they can be copies but still be individually edited if needed.
https://github.com/Freedman-CB1/BodyBuilder
I also did some testing with Clones and they seem to work just like a Body. That capability can help decrease file size and adds a lot of structure to a model with many identical shapes i.e. if you want to design a deck, all the deck plates could be clones so they can be copies but still be individually edited if needed.
Re: Releasing "BodyBuilder", a PartDesign macro for assembling bodies
I just got an error when tried to run it with latest FreeCAD 0.21.0 weekly build:freedman wrote: ↑Sat Mar 18, 2023 8:38 pm I have made a few changes to BodyBuilder, all in the GUI and object selection area. Version 4.3
https://github.com/Freedman-CB1/BodyBuilder
Code: Select all
23:35:22 <class 'SyntaxError'>: ('unterminated string literal (detected at line 14)', ('/home/user/.FreeCAD/Macro/BodyBuilder.FCMacro', 14, 16, '__Requires__ = "Built on 21.', 14, 16))
N.B. Maybe it would be good to add extension to macro file name ("BodyBuilder.FCMacro") and not change that filename on each update.
Re: Releasing "BodyBuilder", a PartDesign macro for assembling bodies
I fixed it, forgot to commit, again. They should put the commit button at the top of page.
Thanks
Thanks
I'm new to Git so I don't know how the updating is supposed to keep up with new version vs the old. I removed the rev number from the name so the file is always BodyBuilder. As I rev it with small changes the title bar is my way of showing the rev #. I'm not sure what the user should be doing if they want an old version. I have put little effort in Git, will do some reading.Maybe it would be good to add extension to macro file name ("BodyBuilder.FCMacro") and not change that filename on each update.
Re: Releasing "BodyBuilder", a PartDesign macro for assembling bodies
Thanks for hotfix! You may just edit macro file on GitHub like in text editor: https://docs.github.com/en/repositories ... ting-filesfreedman wrote: ↑Sat Mar 18, 2023 9:58 pm I fixed it, forgot to commit, again. They should put the commit button at the top of page.
Thanks
I'm new to Git so I don't know how the updating is supposed to keep up with new version vs the old. I removed the rev number from the name so the file is always BodyBuilder. As I rev it with small changes the title bar is my way of showing the rev #. I'm not sure what the user should be doing if they want an old version. I have put little effort in Git, will do some reading.Maybe it would be good to add extension to macro file name ("BodyBuilder.FCMacro") and not change that filename on each update.
Also, I just created a pull request to fix extension name (*.macro

.
Re: Releasing "BodyBuilder", a PartDesign macro for assembling bodies
After following this thread:
"The need for a default assembly workbench"
viewtopic.php?t=76799
I believe this could be a possible new Gui to code-up for PartDesign. Here is a procedure to make an assembly connection:
1) In the Tree, Select a Body and CTL select a Sketch (obviously from a different body). Click the new make attachment icon.
With the assembly engine running the Body origin would be aligned to the selected Sketch origin immediately. The next issue is rotating the attached Body so the user gets what they want.
2) Add 2 icons +View and -View, as the icons are clicked the Body will change to different rotations. The user would click these until they get the one they want. Once set the data will be saved in Properties.
Edit: If parts are designed using standard planes there are only approx. 12 rotation possibilities, all at 90 degree increments.
3)If the user needs some sort of offset there will be custom Properties in the property panel. This is where they do adjustments.
This is the simplest Assembly I can think of, so far....
"The need for a default assembly workbench"
viewtopic.php?t=76799
I believe this could be a possible new Gui to code-up for PartDesign. Here is a procedure to make an assembly connection:
1) In the Tree, Select a Body and CTL select a Sketch (obviously from a different body). Click the new make attachment icon.
With the assembly engine running the Body origin would be aligned to the selected Sketch origin immediately. The next issue is rotating the attached Body so the user gets what they want.
2) Add 2 icons +View and -View, as the icons are clicked the Body will change to different rotations. The user would click these until they get the one they want. Once set the data will be saved in Properties.
Edit: If parts are designed using standard planes there are only approx. 12 rotation possibilities, all at 90 degree increments.
3)If the user needs some sort of offset there will be custom Properties in the property panel. This is where they do adjustments.
This is the simplest Assembly I can think of, so far....
-
- Posts: 63
- Joined: Tue Jan 21, 2020 1:11 pm
Re: Releasing "BodyBuilder", a PartDesign macro for assembling bodies
Is there are a simply demonstration video from begin how to use this macro?
Re: Releasing "BodyBuilder", a PartDesign macro for assembling bodies
Maybe this will get you started. I turned the origins on so you can see the objects base placement. So, two Bodies placed randomly, I click on To Positioning and then to Edit Binding. I click the cylinder and then a sketch ( in another Body) to create a binding. I then show how to click the cylinder and remove the binding and properties, and then apply them once again. Then change to Positioning and move the cylinder around with binding constraints. Then switch the dialog back to it's minimal state.
As long as the macro runs the objects will be bound together.
As long as the macro runs the objects will be bound together.
- Attachments
-
- GIF 3-23-2023 4-08-44 PM.gif (542.48 KiB) Viewed 271 times
Re: Releasing "BodyBuilder", a PartDesign macro for assembling bodies
If you can achieve that instead of bodies to have external files (their file name in the tree of course) for manipulation with "BodyBuilder", a statue will be erected in your honor.

- Attachments
-
- QHsDg8r.jpeg (32.99 KiB) Viewed 212 times
Re: Releasing "BodyBuilder", a PartDesign macro for assembling bodies
Lonfor, that would be something for a more powerful assembler. Darn I really like the armor with the 3D guys on it.
My goals are like this:
1) Make BodyBuilder (BB) icon pop-up driven.
2) Make the BB core run as a resident macro i.e. the portion of the code (about 30 python lines) that keep objects attached. I tried this and it worked but I need more testing. BB only runs when required by callbacks so it's very low overhead. I did something similar here.
My goals are like this:
1) Make BodyBuilder (BB) icon pop-up driven.
2) Make the BB core run as a resident macro i.e. the portion of the code (about 30 python lines) that keep objects attached. I tried this and it worked but I need more testing. BB only runs when required by callbacks so it's very low overhead. I did something similar here.
3) I want to get to sketch based manipulation. Adding a sketch with geometry that is read by BB, this will feed data to the Body Positioning variables. For instance; you draw a sketch of a circle, then an angled line with a circle on the end; when ran the Body (with all the attachments) would move the line angle and distance while rotating. The circle sizes would be the rotation speed, something like that. I think sketches would be perfect for the source of 2D sims.