material editor

A forum to discuss the implementation of a good Materials system in FreeCAD
User avatar
bernd
Posts: 8475
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: material editor

Postby bernd » Sat Jun 02, 2018 11:46 am

Here we gone use this input fields for for editing material parameter with units in FEM https://github.com/FreeCAD/FreeCAD/blob ... aterial.py
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: material editor

Postby damian » Sat Jun 02, 2018 1:05 pm

bernd wrote:
Sat Jun 02, 2018 11:46 am
Here we gone use this input fields for for editing material parameter with units in FEM https://github.com/FreeCAD/FreeCAD/blob ... aterial.py
Yes, with a ui file: "Mod/Fem/Resources/ui/Material.ui"
I suppose that if the module is named UiLoader, effectively it must exist a ui file.
Later, on _ViewProviderFemMaterial.py, you use units parser operations. I know to do it, but the result is not so elegant due to a minor issue
units.png
units.png (304.17 KiB) Viewed 554 times
This is done without ui file
User avatar
yorik
Site Admin
Posts: 11577
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: material editor

Postby yorik » Sat Jun 02, 2018 5:07 pm

the ui loader serves mainly to load ui files, but it also has this other precious use to get a PySide version of the InputField.
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: material editor

Postby damian » Sun Jun 03, 2018 11:48 am

yorik wrote:
Sat Jun 02, 2018 5:07 pm
precious
Yes, thank you for the explanations.
I'll need some time because I don't have the previous experience with Qt Designer and ui files. I'm really interested to learn about this.
As always, if someone is in urgency perhaps he could make in a few minutes.
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: material editor

Postby damian » Tue Jun 05, 2018 9:50 pm

QTreeView.png
QTreeView.png (124.24 KiB) Viewed 478 times
User avatar
bernd
Posts: 8475
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: material editor

Postby bernd » Wed Jun 06, 2018 10:51 am

Would you exaplain this a bit? Inside the material editor is the IFC type? This makes no sense at all IMHO?
Jee-Bee
Posts: 1968
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: material editor

Postby Jee-Bee » Wed Jun 06, 2018 11:40 am

I have some comments.
I see in the material editor that Poisson ratio is a FEM property but i would say it is an mechanical property since it is the ratio between the ΔLength /ΔWidth. see also: https://en.wikipedia.org/wiki/Poisson's_ratio
another point is that when selecting a material card from FC it updates. but when selecting a custom material card don't update...
User avatar
bernd
Posts: 8475
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: material editor

Postby bernd » Wed Jun 06, 2018 11:46 am

have a bit of patience with the poisons ratio ... I have this in mind ...
Jee-Bee
Posts: 1968
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: material editor

Postby Jee-Bee » Wed Jun 06, 2018 12:53 pm

I do didn't know you/ somebody read it
User avatar
bernd
Posts: 8475
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: material editor

Postby bernd » Sat Jun 09, 2018 11:22 am

Jee-Bee wrote:
Wed Jun 06, 2018 11:40 am
I have some comments.
I see in the material editor that Poisson ratio is a FEM property but i would say it is an mechanical property since it is the ratio between the ΔLength /ΔWidth. see also: https://en.wikipedia.org/wiki/Poisson's_ratio
another point is that when selecting a material card from FC it updates. but when selecting a custom material card don't update...
git commit c3e64d28