use new rotation class
This commit is contained in:
parent
fff377de7f
commit
a8e8b75cc0
|
@ -52,13 +52,14 @@ parser.set_defaults(degrees = False,
|
||||||
if sum(x is not None for x in [options.rotation,options.eulers,options.matrix,options.quaternion]) != 1:
|
if sum(x is not None for x in [options.rotation,options.eulers,options.matrix,options.quaternion]) != 1:
|
||||||
parser.error('not exactly one rotation specified...')
|
parser.error('not exactly one rotation specified...')
|
||||||
|
|
||||||
eulers = np.array(damask.orientation.Orientation(
|
if options.quaternion is not None:
|
||||||
quaternion = np.array(options.quaternion) if options.quaternion else None,
|
eulers = damask.Rotation.fromQuaternion(np.array(options.quaternion)).asEulers(degrees=True)
|
||||||
angleAxis = np.array(options.rotation) if options.rotation else None,
|
if options.rotation is not None:
|
||||||
matrix = np.array(options.matrix) if options.matrix else None,
|
eulers = damask.Rotation.fromAxisAngle(np.array(options.rotation,degrees=True)).asEulers(degrees=True)
|
||||||
Eulers = np.array(options.eulers) if options.eulers else None,
|
if options.matrix is not None:
|
||||||
degrees = options.degrees,
|
eulers = damask.Rotation.fromMatrix(np.array(options.Matrix)).asEulers(degrees=True)
|
||||||
).asEulers(degrees=True))
|
if options.eulers is not None:
|
||||||
|
eulers = damask.Rotation.fromEulers(np.array(options.eulers),degrees=True).asEulers(degrees=True)
|
||||||
|
|
||||||
# --- loop over input files -------------------------------------------------------------------------
|
# --- loop over input files -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue