103x
005567
3.7.2024

Export deformované geometrie

Jak mohu exportovat deformovanou geometrii modelu z programu RFEM 6?


Odpověď:

Deformovanou geometrii modelu z programu RFEM 6 můžete exportovat tak, že vyexportujete deformovanou síť prvků jako soubor CSV pomocí rozhraní webových služeb a následujícího skriptu v Pythonu:

  1. code.python#
  2. References

from RFEM.initModel import *
from RFEM import *
from RFEM.Results.meshTables import *
import pandas

  1. Establish connection to currently active model

connectToServer()
connectionGlobals.client.service.get_active_model()
Model(False,)

  1. Query save directory and define name for csv files

path = input("Save directory for csv files:")
path = path.removeprefix("\"")
path = path.removesuffix("\"")

deformedNodesTableName = "deformed_nodes"
memberTableName = "members"
surfaceTableName = "surfaces"

  1. Read out deformed geometry

deformedNodes = pandas.DataFrame(MeshTables.GetAllFENodesDeformed())
deformedNodes = deformedNodes"y", "z"
deformedNodes.to_csv(path + "\\" + deformedNodesTableName + ".csv", index=False)

deformedMembersRaw = MeshTables.GetAllFE1DElements()
if(len(deformedMembersRaw) != 0):

  1. deformedMembers = pandas.DataFrame(deformedMembersRaw)
  2. deformedMembers = deformedMembers"FE_node2_no".astype(int)
  3. deformedMembers.to_csv(path + "\\" + memberTableName + ".csv", index=False)

deformedSurfacesRaw = MeshTables.GetAllFE2DElements()
if(len(deformedSurfacesRaw) != 0):

  1. deformedSurfaces = pandas.DataFrame(deformedSurfacesRaw)
  2. deformedSurfaces = deformedSurfaces"FE_node2_no", "FE_node3_no", "FE_node4_no".astype(int)
  3. deformedSurfaces.to_csv(path + "\\" + surfaceTableName + ".csv", index=False)
  4. /kód#

Autor

Ing. Gutmann zajišťuje technickou podporu zákazníkům společnosti Dlubal Software.



;