Hello
It says Translation is Successful, but i dont't see the any out , am i doing something horribly wrong or missing some setup ?
Python Caller
import fme
import fmeobjects
import numpy as np
class FeatureProcessor(object):
def __init__(self):
pass
def input(self, feature):
def myfunction(L, F, DX, DY, DZ):
DLF = [0,0,-1]
ULF = [0,0,1]
NLF = [0,1,0]
SLF = [0,-1,0]
ELF = [1,0,0]
WLF = [-1,0,0]
if L == "D":
UAP = DLF
elif L == "U":
UAP = ULF
elif L == "N":
UAP = NLF
elif L == "S":
UAP = SLF
elif L == "E":
UAP = ELF
elif L == "W":
UAP = WLF
if F == "D":
FAP = DLF
elif F == "U":
FAP = ULF
elif F == "N":
FAP = NLF
elif F == "S":
FAP = SLF
elif F == "E":
FAP = ELF
elif F == "W":
FAP = WLF
VAP = np.cross(FAP, UAP)
DU,DV,DN = np.linalg.inv(np.column_stack((UAP, VAP, FAP))).dot(np.array(DX,DY,DZ))
return DU,DV,DN
self.pyoutput(feature)
def close(self):
pass
import fme
import fmeobjects
import numpy as np
class FeatureProcessor(object):
def __init__(self):
pass
def input(self, feature):
feature = myfunction(L, F, DX, DY, DZ)
self.pyoutput(feature)
def close(self):
pass
def myfunction(L, F, DX, DY, DZ):
DLF = [0,0,-1]
ULF = [0,0,1]
NLF = [0,1,0]
SLF = [0,-1,0]
ELF = [1,0,0]
WLF = [-1,0,0]
if L == "D":
UAP = DLF
elif L == "U":
UAP = ULF
elif L == "N":
UAP = NLF
elif L == "S":
UAP = SLF
elif L == "E":
UAP = ELF
elif L == "W":
UAP = WLF
if F == "D":
FAP = DLF
elif F == "U":
FAP = ULF
elif F == "N":
FAP = NLF
elif F == "S":
FAP = SLF
elif F == "E":
FAP = ELF
elif F == "W":
FAP = WLF
VAP = np.cross(FAP, UAP)
DU,DV,DN = np.linalg.inv(np.column_stack((UAP, VAP, FAP))).dot(np.array(DX,DY,DZ))
return L,F,DX,DY,DZ,DU,DV,DN
self.pyoutput(feature)