Parts library browser
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Parts library browser
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.
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.
Re: Parts library browser
Hi Normnormandc 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.
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
Re: Parts library browser
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 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?
Re: Parts library browser
Ah, I see, now I understand. I thought I must have it wrong.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.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 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.?
Re: Parts library browser
That´sound like a very good idea.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?
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
My GrabCAD FreeCAD-Projects
FreeCAD lessons for beginners in english
Native german speaker - so apologies for my english, no offense intended
Re: Parts library browser
Very good idea. Then we can store that value in FreeCAD itself with the preferences system.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?
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...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 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.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.
Re: Parts library browser
Hello.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.
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
My GrabCAD FreeCAD-Projects
FreeCAD lessons for beginners in english
Native german speaker - so apologies for my english, no offense intended
-
- Posts: 329
- Joined: Mon Sep 09, 2013 6:08 pm
Re: Parts library browser
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.
For screws there is also the screwmaker macro, which contains a few kinds of screws that are not yet in BOLTS.
Re: Parts library browser
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
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
My GrabCAD FreeCAD-Projects
FreeCAD lessons for beginners in english
Native german speaker - so apologies for my english, no offense intended
Re: Parts library browser
Good idea, I don't know why I didn't think of that