create#

CoordinateSystem.create(origin=None, reference_cs='Global', name=None, mode='axis', view='iso', x_pointing=None, y_pointing=None, phi=0, theta=0, psi=0, u=None)#

Create a coordinate system.

Parameters:
originlist

List of [x, y, z] coordinates for the origin of the coordinate system. The default is None, in which case [0, 0, 0] is used.

reference_csstr, optional

Name of the reference coordinate system. The default is "Global".

namestr

Name of the coordinate system. The default is None.

modestr, optional

Definition mode. Options are "view", "axis", "zxz", "zyz", and "axisrotation". The default is "axis".

  • If mode="view", specify view.

  • If mode="axis", specify x_pointing and y_pointing.

  • If mode="zxz" or mode="zyz", specify phi, theta, and psi.

  • If mode="axisrotation", specify theta and u.

Parameters not needed by the specified mode are ignored. For back compatibility, view="rotate" is the same as mode="axis". The mode "axisrotation" is a coordinate system parallel to the global coordinate system centered in the global origin.

viewstr, optional

View for the coordinate system if mode="view". Options are "XY", "XZ", "XY", "iso", None, and "rotate" (obsolete). The default is "iso".

Note

Because the "rotate" option is obsolete, use mode="axis" instead.

x_pointinglist, optional

List of the [x, y, z] coordinates specifying the X axis pointing in the local coordinate system if mode="axis". The default is [1, 0, 0].

y_pointinglist, optional

List of the [x, y, z] coordinates specifying the Y axis pointing in the local coordinate system if mode="axis". The default is [0, 1, 0].

phifloat, optional

Euler angle phi in degrees if mode="zxz" or mode="zyz". The default is 0.

thetafloat, optional

Euler angle theta or rotation angle in degrees if mode="zxz", mode="zyz", or mode="axisrotation". The default is 0.

psifloat, optional

Euler angle psi in degrees if mode="zxz" or mode="zyz". The default is 0.

ulist

List of the [ux, uy, uz] coordinates for the rotation axis if mode="zxz". The default is [1, 0, 0].

Returns:
bool

True when successful, False when failed.