# - evalPosition (pyTree) - import RigidMotion.PyTree as R import KCore.test as test # Utilise le RigidMotion du solveur try: import Cassiopee as K import elsA_user as E except: # no error in this case import sys sys.exit() def F(a): a = R.setPrescribedMotion2(a, 'rotor', transl_speed=(0.1, 0, 0)) b = R.evalPosition(a, time=0.1) return b test.stdTestT(F)
# - convertArray2Node (pyTree) - import Converter.PyTree as C import KCore.test as test test.stdTestT(C.convertArray2Node)
# - barycenter (pyTree) - import Generator.PyTree as G import KCore.test as test test.stdTestT(G.barycenter)
# - convertArray2Hexa (pyTree) - import Converter.PyTree as C import Generator.PyTree as G import KCore.test as test test.stdTestT(C.convertArray2Hexa)
# - evalPosition (PyTree) - import RigidMotion.PyTree as R import Converter.PyTree as C import KCore.test as test from math import cos, sin # Coordonnees du centre de rotation dans le repere absolu def centerAbs(t): return [t, 0, 0] # Coordonnees du centre de la rotation dans le repere entraine def centerRel(t): return [5, 5, 0] # Matrice de rotation def rot(t): omega = 0.1 m = [[cos(omega*t), -sin(omega*t), 0], [sin(omega*t), cos(omega*t), 0], [0, 0, 1]] return m # Mouvement complet def F(t): return (centerAbs(t), centerRel(t), rot(t)) test.stdTestT(R.evalPosition, 3., F)
# - randomizeVar (pyTree) - import Converter.PyTree as C import KCore.test as test test.stdTestT(C.randomizeVar, 'CoordinateZ', 0.1, 0.1)
# - convertArray2NGon(pyTree) - import Converter.PyTree as C import KCore.test as test test.stdTestT(C.convertArray2NGon, 0)
# - rotate (pyTree) - import Transform.PyTree as T import KCore.test as test test.stdTestT(T.rotate, (0., 0., 0.), (0., 0., 1.), 30.)
# - translate (pyTree) - import Transform.PyTree as T import KCore.test as test test.stdTestT(T.translate, (-1, 0, 0))