material editor

A forum to discuss the implementation of a good Materials system in FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: material editor

Post by bernd »

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

Post by damian »

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 10398 times
This is done without ui file
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: material editor

Post by yorik »

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

Post by damian »

yorik wrote: Sat Jun 02, 2018 5:07 pmprecious
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

Post by damian »

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

Re: material editor

Post by bernd »

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

Re: material editor

Post by Jee-Bee »

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
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: material editor

Post by bernd »

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

Re: material editor

Post by Jee-Bee »

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

Re: material editor

Post by bernd »

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
Post Reply