Vendor Parts Workbench

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
alex_55
Posts: 62
Joined: Mon May 11, 2020 1:50 am

Re: McMaster-Carr Workbench

Post by alex_55 »

chrisb wrote: Sun Sep 12, 2021 7:16 am Great addon, thanks for sharing!

Could you tell something about the implementation? I ask because it could be interesting to adapt it to other hardware shops, e.g. for people where McMaster-Carr is not available.
Until now I have seen basically two possibilities for such downloads: direct download as STEP or as zipped STEP.
Adapting to other websites is very easy. The addon doesn't actually know anything about the site it's pointed at. It just opens whatever URL you give it.
QtWebTools is almost suspiciously good at getting this exact job done. It handles download requests and creates the files for us. We even get a nice Qt signal when a file finishes downloading. The addon connects that signal to a function that can import step files into FreeCAD

I threw together a new branch that can autogenerate Gui commands for a list of website URLs: https://github.com/alexneufeld/FreeCAD_ ... ultivendor

Image

Image

One caveat is that many suppliers just use CADENAS 3DFindIt (https://www.3dfindit.com/) to serve CAD models.
In this case, there is a dedicated addon that actually integrates with the 3DFindIt API here: https://github.com/cadenasgmbh/3dfindit ... ntegration
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: McMaster-Carr Workbench

Post by chrisb »

Thanks!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Anool
Posts: 12
Joined: Fri Feb 22, 2019 11:28 am
Location: Mumbai India
Contact:

Re: McMaster-Carr Workbench

Post by Anool »

alex_55 wrote: Sat Sep 11, 2021 1:53 am github repository: https://github.com/alexneufeld/FreeCAD_mcm_addon

I would appreciate it if some community members could give it a test drive. Once I know it works on other people's machines, I'll look at adding the tool to the addon Manager.
This is awesome - Thanks !

I tried it on FC 0.19 and RealThunder's Linkstage Stable 0.19, and this addon works as expected.

OS: Ubuntu 20.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.19.2)
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/India (en_IN)


OS: Ubuntu 20.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 2021.911.24301 +3846 (Git) AppImage
Build type: Release
Branch: LinkStage3
Hash: 426a333ced22218ed5f06ca8bb7e63ea8042fc2d
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.1
OCC version: 7.5.2
Locale: English/India (en_IN)

Screenshot from 2021-09-13 21-19-41.png
Screenshot from 2021-09-13 21-19-41.png (297.54 KiB) Viewed 3317 times
User avatar
Anool
Posts: 12
Joined: Fri Feb 22, 2019 11:28 am
Location: Mumbai India
Contact:

Re: McMaster-Carr Workbench

Post by Anool »

alex_55 wrote: Sat Sep 11, 2021 2:03 pm
Cekuhnen wrote: Sat Sep 11, 2021 1:31 pm Can you late edit the imported part ?

Glides for drawers for example I reposition
That depends somewhat on the quality of models that are provided, But generally yes. There are ~20 lines of code that try to make sure that imported objects don't get squashed to monolithic grey blobs. I tested out a drawer slide, and I am able to move the individual subcomponents after importing:
I can confirm this works too, as expected. I was able to extend / retract the slide position
User avatar
Anool
Posts: 12
Joined: Fri Feb 22, 2019 11:28 am
Location: Mumbai India
Contact:

Re: McMaster-Carr Workbench

Post by Anool »

TheMarkster wrote: Sun Sep 12, 2021 3:38 am Just installed. Looking forward to checking it out. If anybody wants to add it to the addon manager.

Click the configure button:

Add the github repo:

Might need to restart FreeCAD, not sure, but it will appear in the workbench section.
I didn't know about this method until now, so thanks - I was able to add the repo to the addon manager

Screenshot from 2021-09-13 21-20-32.png
Screenshot from 2021-09-13 21-20-32.png (413.78 KiB) Viewed 3301 times
User avatar
Anool
Posts: 12
Joined: Fri Feb 22, 2019 11:28 am
Location: Mumbai India
Contact:

Re: McMaster-Carr Workbench

Post by Anool »

alex_55 wrote: Sun Sep 12, 2021 8:32 pm
Adapting to other websites is very easy. The addon doesn't actually know anything about the site it's pointed at. It just opens whatever URL you give it.
QtWebTools is almost suspiciously good at getting this exact job done. It handles download requests and creates the files for us. We even get a nice Qt signal when a file finishes downloading. The addon connects that signal to a function that can import step files into FreeCAD
Get's even better. Using the multivendor branch, I am able to get parts from Misumi and GrabCad too.

Screenshot from 2021-09-13 22-10-57.png
Screenshot from 2021-09-13 22-10-57.png (321 KiB) Viewed 3221 times
drmacro
Veteran
Posts: 8864
Joined: Sun Mar 02, 2014 4:35 pm

Re: McMaster-Carr Workbench

Post by drmacro »

Hmm...I'm attempting to add as described to the Addon manager and then attempting to install the multivender version in linkstage.

The Addon manager window shows Cloning module... and a partially populated progress bar, but never completes.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: McMaster-Carr Workbench

Post by TheMarkster »

If it is to support multiple vendors, then perhaps a new name would be appropriate? Only a suggestion. Also, I think "freecad_mcm_addon" is not a great descriptive name to appear in the addon manager. "McMaster-Carr-Step-Downloader" or something similar would be a better attention-getter for those browsing through the addon manager. Perhaps "Multivender_STEP_Downloader"? Personally, I like "Step Fetcher" because it reminds of an old song, "Had 'em all out there steppin' and fetchin' like their heads were on fire and their [censored] was catchin'".
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: McMaster-Carr Workbench

Post by GeneFC »

I would strictly avoid any mention of a company name in the title or key description of the addon. I am a McMaster-Carr customer, but I have no idea what legal stuff they may want to enforce. They are certainly not "open source". Anything they created is probably copyright protected.

Their website exists to sell products, not to be the wikipedia or google of STEP files.

Keep it quiet.

Gene
LHC
Posts: 321
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canadian Coffee Shop

Re: McMaster-Carr Workbench

Post by LHC »

TheMarkster wrote: Mon Sep 13, 2021 6:31 pm If it is to support multiple vendors, then perhaps a new name would be appropriate? Only a suggestion. Also, I think "freecad_mcm_addon" is not a great descriptive name to appear in the addon manager. "McMaster-Carr-Step-Downloader" or something similar would be a better attention-getter for those browsing through the addon manager. Perhaps "Multivender_STEP_Downloader"? Personally, I like "Step Fetcher" because it reminds of an old song, "Had 'em all out there steppin' and fetchin' like their heads were on fire and their [censored] was catchin'".
Had to look up what song you were going on about and found myself listening to Charlie Daniels on you tube for 5 minutes :lol:
Post Reply