pyNastran
pyNastran copied to clipboard
BDF.get_cards_by_card_types method does not return for MOMENTs
For a model imported as punch file, when i try to get MOMENT cards with get_cards_by_card_types() method, list is empty. I am not sure which cards also not listed properly.
Here is an example of punch to be read:
FORCE 1001 47 1.0 444. 555. 666.
MOMENT 1001 47 1.0 777. 888. 999.
Sample script:
from pyNastran.bdf.bdf import BDF
model = BDF(debug=False)
model.read_bdf("loads.bdf", punch=True, xref=False)
print(model.card_count)
print("FORCES:", model.get_cards_by_card_types(["FORCE"])["FORCE"])
print("MOMENTS:", model.get_cards_by_card_types(["MOMENT"])["MOMENT"])
Output:
{'FORCE': 1, 'MOMENT': 1}
FORCES: [FORCE 1001 47 1. 444. 555. 666.]
MOMENTS: []
platform.python_version() : '3.11.5' pyNastran.version : '1.4.1'