Don't worry @jonasloenartz , your help has been very useful. In the end, I performed the calculations using the PROJ_CHAMP. Since I needed the stress along a non-linear path, I calculated the stress along several straight lines defined by three points and took the stress at the last point of each line, where the last point of each line represents my desired path. It's not efficient at all, but I managed to solve it this way. Here’s the code I used:
for i in range(n):
table = MACR_LIGN_COUPE(LIGN_COUPE=_F(COOR_EXTR=(Z,x2,y2),
COOR_ORIG=(Z,X ,Y),
NB_POINTS=3,
OPERATION='EXTRACTION',
TYPE='SEGMENT'),
NOM_CHAM='SIEQ_ELNO',
RESULTAT=RE_VISU)
Esf = table.EXTR_TABLE()
P_V_Ks[i,:] = [TablaK.ABSC_CURV, Esf.VMIS[-1], TablaK.K1, TablaK.K2, TablaK.K3]