WCS Class

class NXOpen.WCS

Bases: object

Represents the World Coordinate System.

The origin coordinates and orientation matrix are always relative to the absolute coordinate system.

In order to use any of the WCS methods, the display part must be the part that owns the WCS.

To obtain an instance of this class, refer to NXOpen.BasePart

New in version NX3.0.0.

Properties

Property Description
CoordinateSystem Returns the CartesianCoordinateSystem associated with the WCS
Origin Returns or sets the origin of the WCS
Visibility Returns or sets the visibility of the WCS

Methods

Method Description
Rotate Rotates the WCS about the specified axis.
Save Saves the WCS.
SetCoordinateSystem Changes the coordinate system of the WCS to a new coordinate system.
SetCoordinateSystemCartesianAtCsys Creates a WCS at a new coordinate system.
SetOriginAndMatrix Sets the origin and orientation matrix of the WCS

Enumerations

WCSAxis Enumeration Specifies the X, Y, or Z axis

Property Detail

CoordinateSystem

WCS.CoordinateSystem

Returns the CartesianCoordinateSystem associated with the WCS

-------------------------------------

Getter Method

Signature CoordinateSystem

Returns:
Return type:NXOpen.CartesianCoordinateSystem

New in version NX3.0.0.

License requirements: None.

Origin

WCS.Origin

Returns or sets the origin of the WCS

-------------------------------------

Getter Method

Signature Origin

Returns:
Return type:NXOpen.Point3d

New in version NX3.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Origin

Parameters:origin (NXOpen.Point3d) –

New in version NX3.0.0.

License requirements: None.

Visibility

WCS.Visibility

Returns or sets the visibility of the WCS

-------------------------------------

Getter Method

Signature Visibility

Returns:
Return type:bool

New in version NX3.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Visibility

Parameters:isVisible (bool) –

New in version NX3.0.0.

License requirements: None.

Method Detail

Rotate

WCS.Rotate

Rotates the WCS about the specified axis.

The angle is in degrees.

Signature Rotate(rotationAxis, angle)

Parameters:
  • rotationAxis (NXOpen.WCSAxis) – Which WCS axis to rotate about (X, Y, or Z)
  • angle (float) – Angle of rotation in degrees

New in version NX3.0.0.

License requirements: None.

Save

WCS.Save

Saves the WCS.

A new cartesian coordinate system is created in the **work</b> part, even though the WCS is owned by the display part.

Signature Save()

Returns:The saved coordinate system
Return type:NXOpen.CartesianCoordinateSystem

New in version NX3.0.0.

License requirements: None.

SetCoordinateSystem

WCS.SetCoordinateSystem

Changes the coordinate system of the WCS to a new coordinate system.

The return value is the old coordinate system. The old coordinate system will be displayed after the WCS is moved to the location of the new coordinate system.

Signature SetCoordinateSystem(newCs)

Parameters:newCs (NXOpen.CartesianCoordinateSystem) – The new coordinate system for the WCS
Returns:The old coordinate system for the WCS
Return type:NXOpen.CartesianCoordinateSystem

New in version NX4.0.0.

License requirements: None.

SetCoordinateSystemCartesianAtCsys

WCS.SetCoordinateSystemCartesianAtCsys

Creates a WCS at a new coordinate system.

The return value is the old coordinate system of wcs.

Signature SetCoordinateSystemCartesianAtCsys(newCs)

Parameters:newCs (NXOpen.CartesianCoordinateSystem) – New coordinate system location for the WCS
Returns:The old coordinate system for the WCS
Return type:NXOpen.CartesianCoordinateSystem

New in version NX7.5.0.

License requirements: None.

SetOriginAndMatrix

WCS.SetOriginAndMatrix

Sets the origin and orientation matrix of the WCS

Signature SetOriginAndMatrix(origin, matrix)

Parameters:
  • origin (NXOpen.Point3d) – Origin relative to the absolute coordinate system
  • matrix (NXOpen.Matrix3x3) – Orientation relative to the absolute coordinate system. Must be orthonormal.

New in version NX3.0.0.

License requirements: None.