Puede exportar la geometría deformada de su modelo de RFEM 6 exportando la malla deformada como un archivo CSV utilizando la interfaz del Servicio web y la siguiente secuencia de comandos (script) de Python:
- code.python#
- 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"y", "z"
deformedNodes.to_csv(path + "\\" + deformedNodesTableName + ".csv", index=False)
deformedMembersRaw = MeshTables.GetAllFE1DElements()
if(len(deformedMembersRaw) != 0):
- deformedMembers = pandas.DataFrame(deformedMembersRaw)
- deformedMembers = deformedMembers"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"FE_node2_no", "FE_node3_no", "FE_node4_no".astype(int)
- deformedSurfaces.to_csv(path + "\\" + surfaceTableName + ".csv", index=False)
- /código#