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, optional

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, optional

Name of the coordinate system. The default is None.

modestr, optional

Definition mode. Options are "axis", "axisrotation", "view", "zxz", and "zyz" The default is "axis". You can also use the pyaedt.generic.constants.CSMODE enumerator.

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

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

  • If mode="view", specify the view parameter.

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

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 "iso", None, "XY", "XZ", and "XY". The default is "iso". the "rotate" option is obsolete. You can also use the pyaedt.generic.constants.VIEW enumerator.

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