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:
- origin
list List of
[x, y, z]coordinates for the origin of the coordinate system. The default isNone, in which case[0, 0, 0]is used.- reference_cs
str,optional Name of the reference coordinate system. The default is
"Global".- name
str Name of the coordinate system. The default is
None.- mode
str,optional Definition mode. Options are
"view","axis","zxz","zyz", and"axisrotation". The default is"axis".If
mode="view", specifyview.If
mode="axis", specifyx_pointingandy_pointing.If
mode="zxz"ormode="zyz", specifyphi,theta, andpsi.If
mode="axisrotation", specifythetaandu.
Parameters not needed by the specified mode are ignored. For back compatibility,
view="rotate"is the same asmode="axis". The mode"axisrotation"is a coordinate system parallel to the global coordinate system centered in the global origin.- view
str,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, usemode="axis"instead.- x_pointing
list,optional List of the
[x, y, z]coordinates specifying the X axis pointing in the local coordinate system ifmode="axis". The default is[1, 0, 0].- y_pointing
list,optional List of the
[x, y, z]coordinates specifying the Y axis pointing in the local coordinate system ifmode="axis". The default is[0, 1, 0].- phi
float,optional Euler angle phi in degrees if
mode="zxz"ormode="zyz". The default is0.- theta
float,optional Euler angle theta or rotation angle in degrees if
mode="zxz",mode="zyz", ormode="axisrotation". The default is0.- psi
float,optional Euler angle psi in degrees if
mode="zxz"ormode="zyz". The default is0.- u
list List of the
[ux, uy, uz]coordinates for the rotation axis ifmode="zxz". The default is[1, 0, 0].
- origin
- Returns:
- bool
Truewhen successful,Falsewhen failed.