[fixed] Ticket #3851 - missing material card name

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
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

[fixed] Ticket #3851 - missing material card name

Post by uwestoehr »

- open material task dialog
- select there the material card Concrete-Generic
- now use the button "use FreeCAD material editor"

result: there is no material card name and despite there the combo box at the top of the dialog has the name Concrete-generic, ist is not shown as being the active one:
FreeCAD_pmqM0Xftrg.png
FreeCAD_pmqM0Xftrg.png (31.48 KiB) Viewed 13781 times
Last edited by uwestoehr on Sat Oct 24, 2020 10:16 pm, edited 2 times in total.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: missing material card name

Post by uwestoehr »

Also after opening a custom material card, the combo box at the top of the dialog does not show the name of the now displayed card.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: missing material card name

Post by bernd »

see comments I added to the source code https://github.com/FreeCAD/FreeCAD/pull ... d4109e936f
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: missing material card name

Post by bernd »

uwestoehr wrote: Wed Feb 20, 2019 1:55 am Also after opening a custom material card, the combo box at the top of the dialog does not show the name of the now displayed card.
this should be fixed, because if a file is opened we gone have a card name, thus we should display it. ATM the combo box is only initialized once on init of the editor https://github.com/berndhahnebach/FreeC ... tor.py#L80 this should be done after reading again. But for this the updateCards needs changes. Might be best to leave this for 0.18 ?!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: missing material card name

Post by uwestoehr »

bernd wrote: Wed Feb 20, 2019 6:49 am this should be fixed, because if a file is opened we gone have a card name, thus we should display it.
OK, this is now issue #3851.

bernd wrote: Wed Feb 20, 2019 6:36 am see comments I added to the source code https://github.com/FreeCAD/FreeCAD/pull ... d4109e936f
I see this different because at first I explicitly selected the card for concrete. Then I open the material editor that shows me the contents of the card of concrete.
So what is the difference to loading a card in the material editor dialog? In both cases I explicitly loaded a specific material card that is displayed in the dialog.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: missing material card name

Post by bernd »

uwestoehr wrote: Wed Feb 20, 2019 11:29 am I see this different because at first I explicitly selected the card for concrete. Then I open the material editor that shows me the contents of the card of concrete.
So what is the difference to loading a card in the material editor dialog? In both cases I explicitly loaded a specific material card that is displayed in the dialog.
From user point you are right, but from developer point of view the material editor is called with edit from material task panel. See https://github.com/FreeCAD/FreeCAD/blob ... al.py#L249 and in https://github.com/FreeCAD/FreeCAD/blob ... or.py#L646 (link to PR because of the comments) With this method the material editor does not know the card where the material data was taken from. Thus the material editor can not display a card name. see https://github.com/FreeCAD/FreeCAD/blob ... or.py#L650
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: missing material card name

Post by bernd »

BTW: there is another problem in the material editor. As soon as a material property has been changed, the material card name should be empty or user defined, because the material data does not fit anymore with the material card.

Seams there is a lot air for improvements ...
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: missing material card name

Post by Jee-Bee »

But after creating a new material. Than adding a property because it was unknown before would be a nightmare because of loosing its relation.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: missing material card name

Post by Jee-Bee »

But after creating a new material. Than adding a property because it was unknown before would be a nightmare because of loosing its relation.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: missing material card name

Post by bernd »

adding a new property is different from changing a property, because it does not change the material ... mhh seams we need to realy disscuss all the possibilities and the workflows with materials ...
Post Reply