Implementing a Materials Database
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- Blacklight
- Posts: 41
- Joined: Sat Feb 25, 2023 12:10 pm
- Location: India
- Contact:
Implementing a Materials Database
So I had applied for GSoC, and wasn't selected. I had two project ideas - making a motor design workflow and a materials database.
I still want to contribute, and was asked to open a thread here. I was stressed out with a lot of stuff this month, and was also learning about ricing my Linux, so I just got free. I even missed the GSoC bonding period :v, but I'll try and go in the same spirit. I'll start with making a materials database since that seems simpler to start with, and I won't get burned out quickly. Maybe I'll start the other one too soon, depending on my mood.
So the plan is to continue with the plan from https://wiki.freecad.org/Material#Material_Database and store the data in an SQLite DB. I was thinking of using MySQL and hosting the database, but SQLite seems like a good option too. Well, even plaintext can work here if we go by the UNIX philosophy, like the current .FCMat files. But then more like a single file, because we have to organize the materials list.
Apparently we cannot use the data from MatWeb, which is listed in https://wiki.freecad.org/Material#Tools because of their license. I will have to find the data from other sources, such as Wikipedia for now.
I'm assuming the list will have a simple list for each category. For example, Aluminium will have alloys 6061, 7075, etc. and for Carbon Fiber, we'll have CFRC, CFRP 30%, CFRP 70% etc. or whatever's common. This is in contrast to MatWeb's database, which lists all commercially available products, and it makes it hard for us to choose an exact value. We'll just make it accurate enough for simulations, and the designer can fill in the actual values as they need it. The ordering could be done by using the Father property
When a material is applied to a part, it should have a different color or texture in the viewport for identification. Custom materials should also have textures, so it would be good to allow editing the material texture. According to the wiki this is done with the Coin3D color model.
For the values, depending on the material, we'll have the structural values - Young's Modulus, Ultimate and Yield Tensile Strength, Density. Specific Strength and Specific Stiffness will be examples of derived quantities. There'll also be values for other stuff like electromagnetic and thermal properties, and also materials like Rubber, Ceramic etc. and whatever they have. We'll also have an option to view the values in different units. We can certainly take some inspiration from Fusion360 here. I'm seeing a lot of ideas on the Wiki page too.
So that's the project introduction thread. I'm supposing this interface will belong in the Part (and PartDesign) workbench? We'll also require the data for the simulation workbenches like FEM and CFD. I'll also have to see how to standardize the values for FEM/CFD use too. For example, the stiffness can be different in X, Y and Z.
I think most of this is understood in the Wiki page too, I was just mentioning it for the thread's sake. Now I'll just have to learn about getting started. I still haven't explored the software on my own yet, but I plan to over the next few weeks alongside my Blender tutorials, making simple stuff.
I still want to contribute, and was asked to open a thread here. I was stressed out with a lot of stuff this month, and was also learning about ricing my Linux, so I just got free. I even missed the GSoC bonding period :v, but I'll try and go in the same spirit. I'll start with making a materials database since that seems simpler to start with, and I won't get burned out quickly. Maybe I'll start the other one too soon, depending on my mood.
So the plan is to continue with the plan from https://wiki.freecad.org/Material#Material_Database and store the data in an SQLite DB. I was thinking of using MySQL and hosting the database, but SQLite seems like a good option too. Well, even plaintext can work here if we go by the UNIX philosophy, like the current .FCMat files. But then more like a single file, because we have to organize the materials list.
Apparently we cannot use the data from MatWeb, which is listed in https://wiki.freecad.org/Material#Tools because of their license. I will have to find the data from other sources, such as Wikipedia for now.
I'm assuming the list will have a simple list for each category. For example, Aluminium will have alloys 6061, 7075, etc. and for Carbon Fiber, we'll have CFRC, CFRP 30%, CFRP 70% etc. or whatever's common. This is in contrast to MatWeb's database, which lists all commercially available products, and it makes it hard for us to choose an exact value. We'll just make it accurate enough for simulations, and the designer can fill in the actual values as they need it. The ordering could be done by using the Father property
When a material is applied to a part, it should have a different color or texture in the viewport for identification. Custom materials should also have textures, so it would be good to allow editing the material texture. According to the wiki this is done with the Coin3D color model.
For the values, depending on the material, we'll have the structural values - Young's Modulus, Ultimate and Yield Tensile Strength, Density. Specific Strength and Specific Stiffness will be examples of derived quantities. There'll also be values for other stuff like electromagnetic and thermal properties, and also materials like Rubber, Ceramic etc. and whatever they have. We'll also have an option to view the values in different units. We can certainly take some inspiration from Fusion360 here. I'm seeing a lot of ideas on the Wiki page too.
So that's the project introduction thread. I'm supposing this interface will belong in the Part (and PartDesign) workbench? We'll also require the data for the simulation workbenches like FEM and CFD. I'll also have to see how to standardize the values for FEM/CFD use too. For example, the stiffness can be different in X, Y and Z.
I think most of this is understood in the Wiki page too, I was just mentioning it for the thread's sake. Now I'll just have to learn about getting started. I still haven't explored the software on my own yet, but I plan to over the next few weeks alongside my Blender tutorials, making simple stuff.
Keep calm, and be nice to everyone!
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Implementing a Materials Database
Nice. Looking forward to seeing it.
Random first thoughts...
- shoot for a database agnostic solution (plugin?)
- don't force fit into Part module, keep (mostly) separate. have a toolbar that people can add to the gui.
- we could have an external material getter so we don't need to distribute proprietary content. If the user has a license for MatWeb then we're just providing an access tool, same as a browser.
Random first thoughts...
- shoot for a database agnostic solution (plugin?)
- don't force fit into Part module, keep (mostly) separate. have a toolbar that people can add to the gui.
- we could have an external material getter so we don't need to distribute proprietary content. If the user has a license for MatWeb then we're just providing an access tool, same as a browser.
Re: Implementing a Materials Database
@Blacklight Any effort to improve the material handling in FreeCAD will definitely be appreciated. Have you seen this thread ? viewtopic.php?t=78242 Perhaps some collaboration with @grandcross would be needed.
Re: Implementing a Materials Database
Indeed in the meantime, there has been a concurrent effort to redesign the materials system started by @grandcross. I think there is more than enough work for two people and it can be very interesting to split tasks. A project driven by several people usually reaches far further than a solo one. I suggest you guys have a chat about this!
Re: Implementing a Materials Database
Last edited by hholgi on Thu Jun 01, 2023 5:52 am, edited 1 time in total.
MTB racing service for TR in www.rsv-guetersloh.de; RC flight model in www.moewe-delbrueck.de
Uses Anycubic Kobra 2 Pro 3D Printer, FreeCad, CATIA V5, Cura
Uses Anycubic Kobra 2 Pro 3D Printer, FreeCad, CATIA V5, Cura
- Blacklight
- Posts: 41
- Joined: Sat Feb 25, 2023 12:10 pm
- Location: India
- Contact:
Re: Implementing a Materials Database
Seems like a good idea to have a database fetcher, since most sites are only free for personal use.wandererfan wrote: ↑Mon May 29, 2023 11:22 pm Random first thoughts...
- shoot for a database agnostic solution (plugin?)
- don't force fit into Part module, keep (mostly) separate. have a toolbar that people can add to the gui.
- we could have an external material getter so we don't need to distribute proprietary content. If the user has a license for MatWeb then we're just providing an access tool, same as a browser.
Makes sense comparing with how it's done in Blender. The Arch Texture Workbench also takes a similar approach, but we'll have to make it easier by reducing the extra step of adding the texture manually. It's now Part/PartDesign -> Arch -> Arch Texture.wandererfan wrote: ↑Mon May 29, 2023 11:22 pm - don't force fit into Part module, keep (mostly) separate. have a toolbar that people can add to the gui.
You must be referring to something like the Parts Library Addon? Makes sense, keeping it in a simple text format, which can also allow migrating to a database in the future if it gets large. But shouldn't materials also be a core part?
============================================================================
NewJoker wrote: ↑Tue May 30, 2023 8:17 am @Blacklight Any effort to improve the material handling in FreeCAD will definitely be appreciated. Have you seen this thread ? viewtopic.php?t=78242 Perhaps some collaboration with @grandcross would be needed.
I just saw the thread. Sure, I'll collab with him then.yorik wrote: ↑Tue May 30, 2023 2:02 pm Indeed in the meantime, there has been a concurrent effort to redesign the materials system started by @grandcross. I think there is more than enough work for two people and it can be very interesting to split tasks. A project driven by several people usually reaches far further than a solo one. I suggest you guys have a chat about this!
============================================================================
According to this, the data is only free for personal use use by personal visit, and we can't use a bot or scrape the data. Seems like @wandererfan's idea of using an external getter comes handy here.hholgi wrote: ↑Tue May 30, 2023 2:09 pm Is it allowed to propose Camous?
https://www.campusplastics.com/campus/list
Last edited by Blacklight on Mon Jun 12, 2023 4:01 pm, edited 2 times in total.
Keep calm, and be nice to everyone!
- adrianinsaval
- Veteran
- Posts: 5553
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Implementing a Materials Database
consider coordinating with viewtopic.php?p=684108
- Blacklight
- Posts: 41
- Joined: Sat Feb 25, 2023 12:10 pm
- Location: India
- Contact:
Re: Implementing a Materials Database
Mmmm i'm wondering ... because we use it in our company.Blacklight wrote: ↑Tue May 30, 2023 7:04 pm ....According to this, the data is only free for personal use. Seems like @wandererfan's idea of using an external getter comes handy here.
And this is Faurecia/Hella with more than 100000 Persons
We use the free version without any payment ...
MTB racing service for TR in www.rsv-guetersloh.de; RC flight model in www.moewe-delbrueck.de
Uses Anycubic Kobra 2 Pro 3D Printer, FreeCad, CATIA V5, Cura
Uses Anycubic Kobra 2 Pro 3D Printer, FreeCad, CATIA V5, Cura
- Blacklight
- Posts: 41
- Joined: Sat Feb 25, 2023 12:10 pm
- Location: India
- Contact:
Re: Implementing a Materials Database
It's free if they don't knowhholgi wrote: ↑Thu Jun 01, 2023 5:55 amMmmm i'm wondering ... because we use it in our company.Blacklight wrote: ↑Tue May 30, 2023 7:04 pm ....According to this, the data is only free for personal use. Seems like @wandererfan's idea of using an external getter comes handy here.
And this is Faurecia/Hella with more than 100000 Persons
We use the free version without any payment ...
But there is a chance that your company is subscribed to their premium plan.
Keep calm, and be nice to everyone!