create_coordinate_system#

Modeler3D.create_coordinate_system(origin=None, reference_cs='Global', name=None, mode='axis', view='iso', x_pointing=None, y_pointing=None, psi=0, theta=0, phi=0, u=None)[source]#

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". Enumerator pyaedt.generic.constants.CSMODE can be used.

  • 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. The default mode, "axis", is a coordinate system parallel to the global coordinate system centered in the global origin.

viewstr, int optional

View for the coordinate system if mode="view". Options are "XY", "XZ", "XY", "iso", None, and "rotate" (obsolete). The default is "iso". Enumerator pyaedt.generic.constants.VIEW can be used.

Note

For backward compatibility, mode="view" and view="rotate" are the same as mode="axis". Because the “rotate” option in the “view” mode is obsolete, use mode="axis" instead.

x_pointinglist, optional

List of the [x, y, z] coordinates specifying the X axis pointing in the global 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 global 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:
pyaedt.modeler.Modeler.CoordinateSystem

Created coordinate system.

References

>>> oEditor.CreateRelativeCS