Reusable Features in Part Design

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!
SarenT
Posts: 50
Joined: Sat Jan 12, 2019 2:30 pm

Reusable Features in Part Design

Post by SarenT »

Most likely this was asked and answered before but I was not able to find it.
I often use certain features/shapes in different places, which require multiple steps in the part design. For instance, a hex-nut holder requires a hexagonal pocket with a depth of 3mm and a cylindrical pocket (2 steps). These 2 steps can be aligned. What I mean by that is that their centers are coincidental and they are on the same plane.
So my question is... Can I combine these 2 or more steps into one "feature" or function, to reuse? I really don't mean patterns. Sometimes, I would like to reuse this in places, where I can't make a pattern for. Even if I could, I would still need to make a pattern for each step.
My second question is: Can these features be parametric. e.g. Can I define the depth of hexagonal each time I would be using this feature? e.g. edge length 3mm, 3 mm deep and the hole diameter 2mm (3mm, 3mm, 2mm) or another time with (4mm, 4mm, 2.5mm)?
Is it possible to do this in PartDesign without Macros?

PS: All I was able to find was about reusable parts and sketches, which is not what I am looking for.
Attachments
Test.FCStd
(24.11 KiB) Downloaded 23 times
Workshop_Notes
Posts: 612
Joined: Wed Sep 29, 2021 8:35 am

Re: Reusable Features in Part Design

Post by Workshop_Notes »

SarenT wrote: Fri May 26, 2023 2:30 pm...Can these features be parametric
Have a look at 'Configuration tables' in the Spreadsheet workbench.

https://wiki.freecad.org/Spreadsheet_Wo ... ion_tables

The hexagon and cylinder automagically fuse if you pad them (using parameters from the configuration table), so to save making two pockets, a single Boolean subtract of the pad from the other object might work.
User avatar
onekk
Veteran
Posts: 6205
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Reusable Features in Part Design

Post by onekk »

Maybe it worth to inspect even Shapebinder and Subshapebinder.

Regards

Carlo D.
Last edited by onekk on Sat May 27, 2023 7:16 am, edited 1 time in total.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
chrisb
Veteran
Posts: 54186
Joined: Tue Mar 17, 2015 9:14 am

Re: Reusable Features in Part Design

Post by chrisb »

I once had a similar task for a 3D print: slit axles with a retaining ring at the end to clip gears into them.
I haven't found a solution yet.
I don't see that configuration tables or (Sub)ShapeBinders solve the job, although they both can help, because it would still be necessary to construct all the features. A configuration table would not really help, because the sizes are for this use case always identical and only the Placement/AttachmentOffset varies. A ShapeBinder has the minor disadvantage to be affected by the topological naming problem - which is already worse enough - and the major disadvantage that there is no possibility to make it immediately solid.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
thomas-neemann
Veteran
Posts: 11911
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Reusable Features in Part Design

Post by thomas-neemann »

SarenT wrote: Fri May 26, 2023 2:30 pm
If I understood it correctly, I would create something like this in part as "factory standard punching tools" which I would save in individual files. these parts are parametric
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
SarenT
Posts: 50
Joined: Sat Jan 12, 2019 2:30 pm

Re: Reusable Features in Part Design

Post by SarenT »

Workshop_Notes wrote: Fri May 26, 2023 2:43 pm Have a look at 'Configuration tables' in the Spreadsheet workbench.

https://wiki.freecad.org/Spreadsheet_Wo ... ion_tables
I have just looked into this and it is really close. As @chrisb said the only caveat being that it requires separate spreadsheets for each configuration, if you intend to use the same "Part" or operation with different configurations. Because it does configure the part itself and not where you want to apply it. e.g. I can't have a single hex nut pocket for M2, M3 and M4 bolts in my design. I need to make them separately and use in my part design. Then I can as well not use a config table.
Last edited by SarenT on Wed May 31, 2023 10:35 am, edited 1 time in total.
SarenT
Posts: 50
Joined: Sat Jan 12, 2019 2:30 pm

Re: Reusable Features in Part Design

Post by SarenT »

onekk wrote: Fri May 26, 2023 9:06 pm Maybe it worth to inspect even Shapebinder and Subshapebinder.
This also comes very close! The only caveat as the one above, I can't configure the operations, when I am applying them on my PartDesign. But it definitely simplifies it.
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Reusable Features in Part Design

Post by saso »

In commercial cad's this are called "power copies" and "user defined features"...

https://www.youtube.com/watch?v=vfMDKk9DMKY
https://www.youtube.com/watch?v=eR1rdfhdbjc
https://www.youtube.com/watch?v=86o7f4tlfBQ
https://www.youtube.com/watch?v=4OmdSvQQ2JU

Here is an old post that demonstrates a bit how this idea sort of works in FC, but it does not really support all the options the user has in the full implementations of this in commercial cad's...

viewtopic.php?p=387863#p387863

This example is sort of also following this idea (test.FCStd file of this example is available in a posts above the linked post)

viewtopic.php?p=444230#p444230
Last edited by saso on Wed May 31, 2023 12:01 pm, edited 4 times in total.
SarenT
Posts: 50
Joined: Sat Jan 12, 2019 2:30 pm

Re: Reusable Features in Part Design

Post by SarenT »

thomas-neemann wrote: Sat May 27, 2023 6:00 am If I understood it correctly, I would create something like this in part as "factory standard punching tools" which I would save in individual files. these parts are parametric
Hi @thomas-neemann , how does that work? By naively googling it, I did not find anything.
User avatar
thomas-neemann
Veteran
Posts: 11911
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Reusable Features in Part Design

Post by thomas-neemann »

SarenT wrote: Wed May 31, 2023 10:45 am
there is no macro or function for this. you create normal geometries that can be used as cutting tools (boolean cut) and save them in a central location with meaningful names
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
Post Reply