Parts library browser

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Parts library browser

Post by NormandC »

Yorik, I just got around to trying this, and it is so cool! Well done! :)

And the best of this, you only need a "git pull" to refresh your local Parts library with the latest additions. I wonder, would it be a good idea to add the "git pull" command to the macro so it updates the library when launched? Would it work inside FreeCAD?

As for r-frank's request, maybe there could be a check for the path when the macro is run, and if the path is missing or wrong, a dialog would open with a browse button to locate the folder?

As for STEP files, I've been wondering if it would be possible to add them as well as other file formats to FreeCAD, so we could have at least a custom icon, for example the generic FreeCAD document icon with a "STP" at the upper right corner... And double-clicking on a STEP file (or IGES, STL, ...) would launch FreeCAD.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Parts library browser

Post by jmaustpc »

normandc wrote:As for STEP files, I've been wondering if it would be possible to add them as well as other file formats to FreeCAD, so we could have at least a custom icon, for example the generic FreeCAD document icon with a "STP" at the upper right corner... And double-clicking on a STEP file (or IGES, STL, ...) would launch FreeCAD.
Hi Norm
If I am understanding you correctly here there are two issues. Firstly the last one :-) double clicking to open a STEP file etc. in FreeCAD, this already works already you just have to configure the O/S to open the files with whatever extension to open in FreeCAD. But I think you would already know that, so I suspect I am misunderstanding you there?

The second part i.e. the first part, I think you mean have a custom icon in the treeView and other appropriate places in FreeCAD?
I think the problem is that you never really have STEP or IGES etc. items in FreeCAD (except meshes). They (except meshes) are imported, but what that means is the STEP, or whatever, file is read and a native FreeCAD object is then created from the information contained within the STEP, or other, file. So you end up with a FreeCAD object in treeview, not the STEP file its self.

Jim
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Parts library browser

Post by NormandC »

jmaustpc wrote:in FreeCAD, this already works already you just have to configure the O/S to open the files with whatever extension to open in FreeCAD. But I think you would already know that, so I suspect I am misunderstanding you there?
That's just it, I would like FreeCAD to set this up automatically when it installs. A bunch of software do this... And with FreeCAD registering .stp, .step extensions as FreeCAD formats, we could have a custom document icon.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Parts library browser

Post by jmaustpc »

normandc wrote:
jmaustpc wrote:in FreeCAD, this already works already you just have to configure the O/S to open the files with whatever extension to open in FreeCAD. But I think you would already know that, so I suspect I am misunderstanding you there?
That's just it, I would like FreeCAD to set this up automatically when it installs. A bunch of software do this... And with FreeCAD registering .stp, .step extensions as FreeCAD formats, we could have a custom document icon.
Ah, I see, now I understand. I thought I must have it wrong.

That would be a function of the installer on different platforms, right? (e.g. the deb package for ubuntu)

With regards to the icon....could one put STP or whatever on a similar to normal FreeCAD icon,... or would that be a problem for other than English languages? I guess the other Latin languages would still use STP like French/German/etc. but what about Japanese etc.?
User avatar
r-frank
Veteran
Posts: 2180
Joined: Thu Jan 24, 2013 6:26 pm
Location: Möckmühl, Germany
Contact:

Re: Parts library browser

Post by r-frank »

normandc wrote: As for r-frank's request, maybe there could be a check for the path when the macro is run, and if the path is missing or wrong, a dialog would open with a browse button to locate the folder?
That´sound like a very good idea.
Let the entry in the macro on github point to something irregular.
Scan on opening of macro for existance of Directory and if not pop up Error Message or (more conveniant) display
Browse Button for location of Folder.

I have another question about Usage of Macro:
As far as i can see, you run the macro, the window pops up and closes if you click somewhere in the main graphic
window.
I think it would be better if the window stays permanently open until closed by Button
or
if you would have a possibility to minimize/maxime this Window.

Have a great Day.

Roland
Deutsche FreeCAD Tutorials auf Youtube
My GrabCAD FreeCAD-Projects
FreeCAD lessons for beginners in english

Native german speaker - so apologies for my english, no offense intended :)
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Parts library browser

Post by yorik »

normandc wrote:As for r-frank's request, maybe there could be a check for the path when the macro is run, and if the path is missing or wrong, a dialog would open with a browse button to locate the folder?
Very good idea. Then we can store that value in FreeCAD itself with the preferences system.
normandc wrote:That's just it, I would like FreeCAD to set this up automatically when it installs. A bunch of software do this... And with FreeCAD registering .stp, .step extensions as FreeCAD formats, we could have a custom document icon.
Actually there is no need to do that for the library, because the qtreewidget I used doesn read system icons, so I had to add the freecad icon manually. We can do that for the step files too. For the rest, I don't know if I like the idea of FreeCAD "taking ownership" (I know it's not really taking ownership) over step files. On linux it's ok, it's one of the only apps around that reads it, but on windows that's not the case, and I always hated when apps were doing that... Plus, we would need to give and maintain an icon for it, which would not be "standard", people would complain, etc...
r-frank wrote:As far as i can see, you run the macro, the window pops up and closes if you click somewhere in the main graphic
window.
Actually it is a dock widget... It is not supposed to hover on top of your screen but integrate on the right side. Don't know why it didn't happen for you, but normally you can just drag it until it enters the FreeCAD interface.
User avatar
r-frank
Veteran
Posts: 2180
Joined: Thu Jan 24, 2013 6:26 pm
Location: Möckmühl, Germany
Contact:

Re: Parts library browser

Post by r-frank »

yorik wrote: Actually it is a dock widget... It is not supposed to hover on top of your screen but integrate on the right side. Don't know why it didn't happen for you, but normally you can just drag it until it enters the FreeCAD interface.
Hello.

Did some more Test ...
Now everything behaves as it should (and described) by you.
Cant imagine/reproduce wht i did worng the first Time i used this ...

Very very cool ...
I already can see myself browsing through a comfortable Nuts/Bolts/Screws-Library.
Next Target is to spend some spare-Time on modelling parts and then i am hopefully ready to ask
for git-permission to contribute ...

Happy Freecading ..

Roland
Deutsche FreeCAD Tutorials auf Youtube
My GrabCAD FreeCAD-Projects
FreeCAD lessons for beginners in english

Native german speaker - so apologies for my english, no offense intended :)
jreinhardt
Posts: 329
Joined: Mon Sep 09, 2013 6:08 pm

Re: Parts library browser

Post by jreinhardt »

Have you tried BOLTS? It is a bit closer to a Nuts/Bolts/Screws library than the Parts library browser.

For screws there is also the screwmaker macro, which contains a few kinds of screws that are not yet in BOLTS.
BOLTS, standard parts library for FreeCAD Thread, Help with Translation
User avatar
r-frank
Veteran
Posts: 2180
Joined: Thu Jan 24, 2013 6:26 pm
Location: Möckmühl, Germany
Contact:

Re: Parts library browser

Post by r-frank »

Hello Yorik.

Since the Bolts-Macro is on the Makros Recipes-Page, why not putting your Parts Library Browser there also ?
I would put it in the "utility"-section.

Greetings
Roland
Deutsche FreeCAD Tutorials auf Youtube
My GrabCAD FreeCAD-Projects
FreeCAD lessons for beginners in english

Native german speaker - so apologies for my english, no offense intended :)
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Parts library browser

Post by yorik »

Good idea, I don't know why I didn't think of that :)
Post Reply