103x
005567
3. Juli 2024

Verformte Geometrie exportieren

Wie kann ich die verformte Geometrie eines RFEM-6-Modells exportieren?


Antwort:

Sie können die verformte Geometrie eines RFEM-6-Modells exportieren, indem Sie mithilfe der Webservices-Schnittstelle und nachfolgendem Python-Skript das verformte Netz als CSV-Dateien exportieren:


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

#Establish connection to currently active model
connectToServer()
connectionGlobals.client.service.get_active_model()
Model(False,'')

#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"

#Read out deformed geometry
deformedNodes = pandas.DataFrame(MeshTables.GetAllFENodesDeformed())
deformedNodes = deformedNodes[["x", "y", "z"]]
deformedNodes.to_csv(path + "\\" + deformedNodesTableName + ".csv", index=False)

deformedMembersRaw = MeshTables.GetAllFE1DElements()
if(len(deformedMembersRaw) != 0):
    deformedMembers = pandas.DataFrame(deformedMembersRaw)
    deformedMembers = deformedMembers[["member_no","FE_node1_no", "FE_node2_no"]].astype(int)
    deformedMembers.to_csv(path + "\\" + memberTableName + ".csv", index=False)

deformedSurfacesRaw = MeshTables.GetAllFE2DElements()
if(len(deformedSurfacesRaw) != 0):
    deformedSurfaces = pandas.DataFrame(deformedSurfacesRaw)
    deformedSurfaces = deformedSurfaces[["surface_no","FE_node1_no", "FE_node2_no", "FE_node3_no", "FE_node4_no"]].astype(int)
    deformedSurfaces.to_csv(path + "\\" + surfaceTableName + ".csv", index=False)

Autor

Herr Gutmann ist zuständig für die Betreuung der Anwender im Kundensupport.



;