Atom topic feed | site map | contact | login | Protection des données personnelles | Powered by FluxBB | réalisation artaban
You are not logged in.
Hello all,
i would like to ask if it is possible to export in a python script inside the .comm file the nodes or nodes coordinates.
Where should i search for this particular operation?Through the documentation i might have missed something, are there
any suggestions?
Thank you.
Last edited by GPSalachs (2019-12-04 09:36:33)
Offline
Hello,
you can access the nodes coordinates with the following commands:
DEBUT(PAR_LOT='NON')
from Utilitai import partition
mesh0 = LIRE_MAILLAGE(FORMAT='MED',
UNITE=2)
mesh0=DEFI_GROUP(reuse=mesh0,
MAILLAGE=mesh0,
CREA_GROUP_MA=_F(NOM='tout', TOUT='OUI',),);
mesh1 = partition.MAIL_PY()
mesh1.FromAster('mesh0')
el_no = mesh1.gma.get('tout')
for el in el_no:
for node in mesh1.co[el]:
print('Node number: {!s}, coordinates: {!s}'.format(node, mesh1.cn[node]))
FIN()
Konyaro
Related topics:
- https://code-aster.org/forum2/viewtopic.php?id=23914
- Jean-Pierre's book: §18.4
Last edited by konyaro (2019-11-05 16:06:19)
失敗は成功のもと (L'échec est la base de la réussite)
Offline
Thank you very much for the code and the reference provided.
I have read and still reading Jean Pierre's book but in a bible like that things are missed.
A question if i may. Since it is possible to extract node coordinates, is it also possible to extract the connecting lines coordinates too?
Thank you in advance!
Offline