Updating the material name

Moderator: GiD Team

fcdiass
Posts: 11
Joined: Fri Nov 08, 2019 8:04 pm

Updating the material name

Postby fcdiass » Thu Dec 17, 2020 7:50 pm

Hello,

I am developing a problem type with customlib. It is based on the 'cmas2d_customlib' example and inherited a problem with updating the material name.
For example, in the 'cmas2d_customlib' problem type:

  • When applying a 'Shells' condition, you need to choose a material in the list and apply it to a group:
    001.png
    'Shells' condition
    001.png (17.07 KiB) Viewed 779 times

  • The resulting data tree is the following:
    002.png
    Data tree after applying 'Shells' condition
    002.png (44.26 KiB) Viewed 779 times

  • But, if you change the name of the material after that, the 'Shells' condition does not automatically update:

    003.png
    Data tree after changing the material name
    003.png (52.52 KiB) Viewed 779 times

  • To update the material name in the 'Shells' condition, it is necessary to open 'Shells' and select the material again in the list:

    004.png
    Choosing again the material name in the list
    004.png (17.15 KiB) Viewed 779 times

  • And only after that, the data tree is correct again:

    005.png
    Finally the correct data tree with updated material name
    005.png (51.56 KiB) Viewed 779 times
The same issue is found in the Kratos problem type, with the 'Parts' condition and the materials, but in this case, it is worse because the parameters are not updated too.
There is a more elegant way to update the 'Shells' condition automatically with the changes made in the materials?
There is a way to adapt the *.spd file (maybe with some help of TCL) to avoid this behavior?

Regards,
Francisco Dias
User avatar
escolano
Posts: 1699
Joined: Thu Sep 18, 2014 3:31 pm

Re: Updating the material name

Postby escolano » Fri Dec 18, 2020 1:36 pm

Probably this better behaviour could be implemented in the problemtype with some dependency...

But it is not so common to rename an existing material that has been assigned.
e.g.
if you assign as 'concrete' an entity, and this 'concrete' is renamed to 'steel' and its properties are changed to steel values,
probably the user don't wanted this entity being like steel.

The common way is to create a new material, copying another (click the rigth-button-mouse over the material and select copy)
and then set the name an properties you want, and assign it to entities.

but I agree that renaming something the 'pointing' uses must be updated, if possible.

Return to “Customization”

Who is online

Users browsing this forum: No registered users and 3 guests