create_coordinate_system#
- Modeler2D.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)#
Create a coordinate system.
- Parameters:
- origin
list,optional 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,optional Name of the coordinate system. The default is
None.- mode
str,optional Definition mode. Options are
"axis","axisrotation","view","zxz", and"zyz"The default is"axis". You can also use theansys.aedt.core.generic.constants.CSModeenumerator.If
mode="axis", specify thex_pointingandy_pointingparameters.If
mode="axisrotation", specify thethetaanduparameters.If
mode="view", specify theviewparameter.If
mode="zxz"ormode="zyz", specify thephi,theta, andpsiparameters.
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.- view
str,intoptional 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 theansys.aedt.core.generic.constants.Viewenumerator.Note
For backward compatibility,
mode="view", view="rotate"are the same asmode="axis". Because the “rotate” option in the “view” mode is obsolete, usemode="axis"instead.- x_pointing
list,optional List of the
[x, y, z]coordinates specifying the X axis pointing in the global 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 global 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:
ansys.aedt.core.modeler.Modeler.CoordinateSystemCreated coordinate system.
References
>>> oEditor.CreateRelativeCS