Ticket #3851 - missing material card name

A forum to discuss the implementation of a good Materials system in FreeCAD
User avatar
uwestoehr
Posts: 753
Joined: Sun Jan 27, 2019 3:21 am

Ticket #3851 - missing material card name

Postby uwestoehr » Wed Feb 20, 2019 1:47 am

- 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 594 times
Last edited by Kunda1 on Thu Jun 20, 2019 1:48 am, edited 1 time in total.
Reason: Added ticket number to thread title
User avatar
uwestoehr
Posts: 753
Joined: Sun Jan 27, 2019 3:21 am

Re: missing material card name

Postby uwestoehr » 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.
User avatar
bernd
Posts: 8443
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: missing material card name

Postby bernd » Wed Feb 20, 2019 6:36 am

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

Re: missing material card name

Postby bernd » Wed Feb 20, 2019 6:49 am

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
Posts: 753
Joined: Sun Jan 27, 2019 3:21 am

Re: missing material card name

Postby uwestoehr » Wed Feb 20, 2019 11:29 am

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

Re: missing material card name

Postby bernd » Wed Feb 20, 2019 1:35 pm

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

Re: missing material card name

Postby bernd » Wed Feb 20, 2019 1:38 pm

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
Posts: 1962
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: missing material card name

Postby Jee-Bee » Wed Feb 20, 2019 2:15 pm

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
Posts: 1962
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: missing material card name

Postby Jee-Bee » Wed Feb 20, 2019 2:16 pm

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

Re: missing material card name

Postby bernd » Wed Feb 20, 2019 5:04 pm

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 ...