SteveDoyle2 / pyNastran

A Python-based interface tool for Nastran's file formats
Other
385 stars 148 forks source link

How to change the node ids in a certain element(cquad, cbeam....)? #705

Closed weiweiisok closed 2 years ago

weiweiisok commented 2 years ago

Hi, dear SteveDoyle, I want to change the node ids in an element, I had tried '_update_field_helper' method, but it seems that nothing happened, the node ids in that element haven't been changed, so is there any other ways to do this? Thank you very much for helping me.

SteveDoyle2 commented 2 years ago

So that’s an internal method due to the leading underscore.

The answer depends on if you’re cross referenced or not and if you also want to change the referenced node id or not.

On Wed, Sep 14, 2022 at 7:03 AM Glassy sky @.***> wrote:

Hi, dear SteveDoyle, I want to change the node ids in an element, I had tried '_update_field_helper' method, but it seems that nothing happened, the node ids in that element haven't been changed, so is there any other ways to do this? Thank you very much for helping me.

— Reply to this email directly, view it on GitHub https://github.com/SteveDoyle2/pyNastran/issues/705, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAICUWM2ERZC6BRYB5MSAVDV6HLJNANCNFSM6AAAAAAQMONNR4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

weiweiisok commented 2 years ago

So that’s an internal method due to the leading underscore. The answer depends on if you’re cross referenced or not and if you also want to change the referenced node id or not. On Wed, Sep 14, 2022 at 7:03 AM Glassy sky @.> wrote: Hi, dear SteveDoyle, I want to change the node ids in an element, I had tried '_update_field_helper' method, but it seems that nothing happened, the node ids in that element haven't been changed, so is there any other ways to do this? Thank you very much for helping me. — Reply to this email directly, view it on GitHub <#705>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAICUWM2ERZC6BRYB5MSAVDV6HLJNANCNFSM6AAAAAAQMONNR4 . You are receiving this because you are subscribed to this thread.Message ID: @.>

Thanks for your quick reply, the problem had been solved. Use 'update_field_helper()' or 'elem.nodes=....' may not work when I read a bdf file by model = read_bdf(). But the two ways above-mentioned worked well when I continue use the code model_new = model. So I means that we could change the parameter of model_new instead of model. This makes me feel very confused. Anyway, the problem has been solved. Thanks for your help.

SteveDoyle2 commented 1 year ago

I think you’re confused because you’re dealing with a cross referencing issue. I don’t understand what outcome you want so I can’t tell you what you should do.

On Thu, Sep 15, 2022 at 11:55 PM Glassy sky @.***> wrote:

Closed #705 https://github.com/SteveDoyle2/pyNastran/issues/705 as completed.

— Reply to this email directly, view it on GitHub https://github.com/SteveDoyle2/pyNastran/issues/705#event-7400564448, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAICUWPVVPGQ5RZS54KZXT3V6QKUTANCNFSM6AAAAAAQMONNR4 . You are receiving this because you commented.Message ID: @.***>