Rethinking the "Part Library"
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Rethinking the "Part Library"
A few weeks ago we merged a new metadata file format for use with addons: in the current master this is only used for manually-installed Preference Packs, but I'm currently working on modifying the Addon Manager to make use of this new metadata information. In tandem with that development, we've gotten a few reports of problems installing the FreeCAD "Parts" addon, probably due to its huge size (the zip file is nearly 4gb).
I'd like to take this opportunity to brainstorm a better long-term solution to our Parts library. It's not getting any smaller! I'd bet that most users only use a few parts out of it, so I'm wondering if there's a better way to allow people to just download selected parts on-demand. Of course you can already do this by hand, but since the addon manager is getting some new capabilities right now, the time is right for considering new ways of thinking about the parts library.
One idea I have is to create a new type of addon called "part" -- this is in addition to the existing or forthcoming "workbench", "macro", and "preferencepack". The metadata file would list out the usual metadata for each part, and include a direct download link. Then, either the Addon manager, or some new "Part manager" would present this metadata for users, who could select one or more individual parts to download on-demand.
Another idea is to create a "partlibrary" package type -- the idea is similar to the above, but instead of being one part at a time, it's whole collections of parts. This is more difficult to implement because right now there's no mechanism to clone or download those folders: ideally we'd need to split them into their own git submodules.
Alternately, if we go the git submodule route, we could just stick with the existing addons setup (no new tag needed) but list out those part submodules instead of, or in addition to, having users download the whole thing.
There are probably hundreds of other possibilities, those are just the ones on my mind as I work on Addon Manager this afternoon. What are you ideas and thoughts on this?
I'd like to take this opportunity to brainstorm a better long-term solution to our Parts library. It's not getting any smaller! I'd bet that most users only use a few parts out of it, so I'm wondering if there's a better way to allow people to just download selected parts on-demand. Of course you can already do this by hand, but since the addon manager is getting some new capabilities right now, the time is right for considering new ways of thinking about the parts library.
One idea I have is to create a new type of addon called "part" -- this is in addition to the existing or forthcoming "workbench", "macro", and "preferencepack". The metadata file would list out the usual metadata for each part, and include a direct download link. Then, either the Addon manager, or some new "Part manager" would present this metadata for users, who could select one or more individual parts to download on-demand.
Another idea is to create a "partlibrary" package type -- the idea is similar to the above, but instead of being one part at a time, it's whole collections of parts. This is more difficult to implement because right now there's no mechanism to clone or download those folders: ideally we'd need to split them into their own git submodules.
Alternately, if we go the git submodule route, we could just stick with the existing addons setup (no new tag needed) but list out those part submodules instead of, or in addition to, having users download the whole thing.
There are probably hundreds of other possibilities, those are just the ones on my mind as I work on Addon Manager this afternoon. What are you ideas and thoughts on this?
Re: Adding Parts as a new type of add-on?
Did you have a look at how KiCad is doing the distribution of there footprints? They've changed it a while ago. I assume to solve basically the same problem.
Regards / Viele Grüße
Max
Max
Re: Adding Parts as a new type of add-on?
I think that your idea is great, but please choose another name as "part" because that one is used and abused all over in FreeCAD.
I prefer such a library to individual parts. What's more, it's quite straightforward to do in FreeCAD to have a single document containing many parts and bodies, and then copy or link only one of them
Re: Adding Parts as a new type of add-on?
True enough! Got a suggestion?
Re: Adding Parts as a new type of add-on?
FWIW
When I'm discussing FC I avoid using the word part, I specifically use a phrase; referring to Part workbench, Part Design workbench. I avoid using the word part to refer to a solid.
I typically use the word component. For instance a bolt is a component. A Body for use in an assembly, I refer to as a component.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
- adrianinsaval
- Veteran
- Posts: 5551
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Adding Parts as a new type of add-on?
is it posible to have a web interface for the library and use it in the app like this addon: https://forum.freecadweb.org/viewtopic.php?f=8&t=62131
Re: Adding Parts as a new type of add-on?
@Chennes - fantastic work with Add-on manager:) and of course fantastic work all Freecaders
I think it will be nice to include in Freecad:
- sheet metal (other story)
- bolts / nuts (Fastners)
or make new function on "Addon manager" - Library parts:
1) Add to "Addon manager" new type of add-ons "Library parts" - PICTURE 1
2) Include/merge to Freecad -> Freecad-library but empty version " - PICTURE 2
https://github.com/FreeCAD/FreeCAD-library
3) Add "Add part from library" to Assembly3 - PICTURE 3
How mechanical designer works? I create some parts +-10, then I assembly them, then I add some fasteners and make constrains - so "Add part from library" should be in assembly module.
What should be in Add-on manager - library to chose (separated)
-> Fasteners
-> Beams
-> Flanges
-> Piping elements
-> Architekture stuff
-> .....
If i don't need clamps, doors, roof I don't download them - only what I need
So in future: Add-on manager - Packages:
Freecad Mechanical - Package
include workbench: sheet metal, ...... ,....
include library: bolts, nuts, beams
Freecad Piping-Mechanical - Package
include workbench: dodo, ...... ,....
include library: pipes, flanges ATME, fitings
Freecad Offshre-Mechanical - Package
include workbench: dodo, ...... ,....
include library: lifting padeyes, .... ,.........
Freecad BIMguys - Package:
workbenches: Texture, ......
include library: doors, roofs, windows
Freecad Electricalguy - Package
include workbench: ...., ...... ,....
include library: electric connectors , .... ,.........
Have nice day!
Marcin
I think it will be nice to include in Freecad:
- sheet metal (other story)
- bolts / nuts (Fastners)
or make new function on "Addon manager" - Library parts:
1) Add to "Addon manager" new type of add-ons "Library parts" - PICTURE 1
2) Include/merge to Freecad -> Freecad-library but empty version " - PICTURE 2
https://github.com/FreeCAD/FreeCAD-library
3) Add "Add part from library" to Assembly3 - PICTURE 3
How mechanical designer works? I create some parts +-10, then I assembly them, then I add some fasteners and make constrains - so "Add part from library" should be in assembly module.
What should be in Add-on manager - library to chose (separated)
-> Fasteners
-> Beams
-> Flanges
-> Piping elements
-> Architekture stuff
-> .....
If i don't need clamps, doors, roof I don't download them - only what I need
So in future: Add-on manager - Packages:
Freecad Mechanical - Package
include workbench: sheet metal, ...... ,....
include library: bolts, nuts, beams
Freecad Piping-Mechanical - Package
include workbench: dodo, ...... ,....
include library: pipes, flanges ATME, fitings
Freecad Offshre-Mechanical - Package
include workbench: dodo, ...... ,....
include library: lifting padeyes, .... ,.........
Freecad BIMguys - Package:
workbenches: Texture, ......
include library: doors, roofs, windows
Freecad Electricalguy - Package
include workbench: ...., ...... ,....
include library: electric connectors , .... ,.........
Have nice day!
Marcin
- Attachments
-
- PIC3.PNG (67.63 KiB) Viewed 5018 times
-
- PIC2.PNG (391.12 KiB) Viewed 5018 times
-
- PIC1.PNG (43.31 KiB) Viewed 5018 times
Re: Adding Parts as a new type of add-on?
I am leaning in the direction of a "smarter" Parts Library addon. Right now it's just a blind download of all of these files. I think instead the Parts Library addon itself could be made more intelligent, and not actually download any part until it was told to do so. Maybe it could use the GitHub REST API to do the part fetching, and only use git to synchronize the list of available parts? The tree-based structure of the library would make it easy to download either individual components or entire tree branches. This doesn't require a new kind of addon, just some more structure to the parts library.
Re: Rethinking the "Part Library"
OK, I poked at this a little bit more this evening, and I'm getting closer to a concrete proposal for a "Component Library Manager". Here are my basic thoughts:
Design Goals
Design Goals
- No huge up-front download
- Only download the components you need, but batching enabled (e.g. "all doors", "all fasteners", etc.)
- Get component info/thumbnail image before downloading
- Support private local collections
- Support user-specified (possibly private) git repos
- Optional check for updated components
- Optional notice of new components added
- Easily create PR to have your component added to official library, from within FreeCAD
- Track license requirements so attribution is simple
- Internal API so other parts of FreeCAD can easily open dialog to grab parts