XformCollection Class

class NXOpen.XformCollection

Bases: object

Represents a collection of NXOpen.Xform objects.

Iterating this collection only returns live uncondemned objects contained in the owning part of the collection. Note that NXOpen.Xform is a smart object and many smart objects are condemned as they only exist to support other objects and are not displayed. To obtain an instance of this class, refer to NXOpen.BasePart

New in version NX3.0.0.

Methods

Method Description
CreateExtractXform Creates an extract Xform based on an object.
CreateXform Creates a Xform without parameters.
CreateXformAngleAxis Creates a Motion Xform based on the axis and angle.
CreateXformAxisVector Creates a Motion Xform based on a axis and vector.
CreateXformByDynamicOffset Creates an Xform whose location and orientation are determined by applying a specified origin offset and transformation matrix to an existing coordinate system.
CreateXformByPlaneXDirPoint Creates an Xform based on a planar face or datum plane, an X-axis vector direction, and a point.
CreateXformByPlaneYDirPoint Creates an Xform based on a planar face or datum plane, a Y-axis vector direction, and a point.
CreateXformByPointXDirZDir Creates an Xform based on a point and two vectors.
CreateXformByPointYDirZDir Creates an Xform based on a point and two vectors.
CreateXformCsysToCsys Creates a Motion Xform based on two csys.
CreateXformDeltaXyz Creates a Motion Xform based on delta x, y, and z values where the x, y, and z directions are relative to a reference coordinate system.
CreateXformDistanceAngle Creates a Motion Xform based on the distance and angle on object.
CreateXformDistanceBetweenPoints Creates a Motion Xform based on the direction and points.
CreateXformDistanceDirection Creates a Motion Xform based on the direction and distance.
CreateXformDistanceRadial Creates a Motion Xform based on the axis and points.
CreateXformDynamic Creates a Motion Xform based on the manip.
CreateXformFromCurrentView Creates an XForm using the current viewing coordinate system.
CreateXformRotateThreePoints Creates a Motion Xform based on the three points and vector.
CreateXformTwoPoints Creates a Motion Xform based on two points.
CreateXformWithReverseNormal Creates an Xform based on the delta difference between the source and destination components in the explosion.
CreateXformWithView Creates a Xform with an existing view

Method Detail

CreateExtractXform

XformCollection.CreateExtractXform

Creates an extract Xform based on an object.

Signature CreateExtractXform(object, updateOption, forceXformCreation)

Parameters:
Returns:

a tuple

Return type:

A tuple consisting of (xform, proto). xform is a NXOpen.Xform. Xform proto is a NXOpen.NXObject. Prototype of the object being extracted

New in version NX5.0.0.

License requirements: None.

CreateXform

XformCollection.CreateXform

Overloaded method CreateXform

  • CreateXform(origin, xDirection, yDirection, updateOption, scale)
  • CreateXform(origin, orientation, update, scale)
  • CreateXform(updateOption, scale)
  • CreateXform(point1, point2, point3, updateOption, scale)
  • CreateXform(plane1, plane2, plane3, updateOption, scale)
  • CreateXform(csys, point0, point1, rotationScalarX, rotationScalarY, rotationScalarZ, rotationOption, updateOption, scale)
  • CreateXform(csys, point0, point1, rotationScalarX, rotationScalarY, rotationScalarZ, rotationOption, updateOption, scale)
  • CreateXform(origin, xDirection, yDirection, updateOption, scale)
  • CreateXform(xDirection, yDirection, updateOption, scale)
  • CreateXform(plane, axis, updateOption, scale)
  • CreateXform(xPoint, zAxis, updateOption)
  • CreateXform(point, helperPoint, curve, updateOption)
  • CreateXform(workOcc, contextObject, updateOption)
  • CreateXform(object, updateOption)
  • CreateXform(object, explosion, updateOption)
  • CreateXform(explosion, sourceComponent, destComponent, updateOption)
  • CreateXform(origin, axis, direction, scale, updateOption)

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

Creates a Xform without parameters.

Signature CreateXform(origin, xDirection, yDirection, updateOption, scale)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX3.0.0.

License requirements: None.

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

Creates an Xform

Signature CreateXform(origin, orientation, update, scale)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX5.0.1.

License requirements: None.

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

Creates an Xform that is based off the model space coordinate system. The X and Y Axes are the X and Y Axes of the absolute transform. The origin is the origin of the absolute transform.

Signature CreateXform(updateOption, scale)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX3.0.0.

License requirements: None.

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

Create an Xform based on three points. The origin is the first point, the X-Axis is the vector from the first to the second point, and the Y-Axis is the vector from the first to the third point.

Signature CreateXform(point1, point2, point3, updateOption, scale)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX3.0.0.

License requirements: None.

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

Creates an Xform by three planes. Defines an xform based on the input of three planes. These can be either planar faces, datum planes or plane objects. The X-Axis is normal of the first plane, the Y-Axis is normal of the second plane, the origin is the intersection of the three plane. The plane can either be a planar NXOpen.Face, a NXOpen.DatumPlane or a a NXOpen.Plane. If the xform is to be used to create a CSYS, then the planes should be NXOpen.Plane objects.

Signature CreateXform(plane1, plane2, plane3, updateOption, scale)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX3.0.0.

License requirements: None.

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

Creates a Xform by picking up a point from an existing coordinate system

Signature CreateXform(csys, point0, point1, rotationScalarX, rotationScalarY, rotationScalarZ, rotationOption, updateOption, scale)

Parameters:
  • csys (NXOpen.CoordinateSystem) – Existing coordinate system
  • point0 (NXOpen.Point) – Start point
  • point1 (NXOpen.Point) – End point
  • rotationScalarX (NXOpen.Scalar) – Scalar of X rotation
  • rotationScalarY (NXOpen.Scalar) – Scalar of Y rotation
  • rotationScalarZ (NXOpen.Scalar) – Scalar of Z rotation
  • rotationOption (int) – Determine the sequence of applying rotation and translation. If the value is 0, then a translation is first applied. Otherwise, a roation is first applied.
  • updateOption (NXOpen.SmartObjectUpdateOption) – Update option of smart object
  • scale (float) – Xform scalar
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX4.0.0.

License requirements: None.

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

Creates a Xform by offsetting an existing coordinate system through a translation and a rotation

Signature CreateXform(csys, point0, point1, rotationScalarX, rotationScalarY, rotationScalarZ, rotationOption, updateOption, scale)

Parameters:
  • csys (NXOpen.CoordinateSystem) – Existing coordinate system
  • point0 (NXOpen.Offset) – Start point
  • point1 (NXOpen.Offset) – End point
  • rotationScalarX (NXOpen.Scalar) – Scalar of X rotation
  • rotationScalarY (NXOpen.Scalar) – Scalar of Y rotation
  • rotationScalarZ (NXOpen.Scalar) – Scalar of Z rotation
  • rotationOption (int) – Determine the sequence of applying rotation and translation. If the value is 0, then a translation is first applied. Otherwise, a roation is first applied.
  • updateOption (NXOpen.SmartObjectUpdateOption) – Update option of smart object
  • scale (float) – Xform scalar
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX4.0.0.

License requirements: None.

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

Creates an Xform based on a point and two vectors. The X and Y Axes are the vectors.

Signature CreateXform(origin, xDirection, yDirection, updateOption, scale)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX3.0.0.

License requirements: None.

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

Creates an Xform based on two vectors. The X and Y Axes are vectors, with the origin being the vector intersection point.

Signature CreateXform(xDirection, yDirection, updateOption, scale)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX3.0.0.

License requirements: None.

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

Creates a Xform based on a plane and a vector. The X-Axis is the plane normal direction, the Y-Axis is the direction of the projection of the vector onto the plane, and the origin is the intersection of the plane and the vector. The plane can either be a planar NXOpen.Face or a NXOpen.DatumPlane.

Signature CreateXform(plane, axis, updateOption, scale)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX3.0.0.

License requirements: None.

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

Creates an Xform using a Z axis and X point The X-Axis is the vector from the Z-Axis vector to the point; the Y-Axis is computed from the X and Z axis; the origin is the intersection of the three vectors.

Signature CreateXform(xPoint, zAxis, updateOption)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX5.0.0.

License requirements: None.

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

Creates an Xform through a point and perpendicular to a curve or edge. The Z-axis is tangent to the curve or edge, and the X-Y plane goes through the point. When you select a linear curve, the X-Axis is a perpendicular vector from the curve to the point. When you select a non-linear curve, the X-Axis points in an arbitrary orientation and not towards the selected point.

Signature CreateXform(point, helperPoint, curve, updateOption)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX5.0.0.

License requirements: None.

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

Creates an Xform in the context of the given NXOpen.Assemblies.Component.

Signature CreateXform(workOcc, contextObject, updateOption)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX5.0.0.

License requirements: None.

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

Creates an Xform from the Xform of a selected curve, plane, or drafting object. If the selected curve is non-planar an error will be thrown. If the curve is an arc, ellipse, hyperbola, parabola, or circle, the origin will be at the respective curve’s center. If the object is a planar face or a datum plane, the Z-axis is the normal vector of the plane.

Signature CreateXform(object, updateOption)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX5.0.0.

License requirements: None.

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

Creates an Xform based on an object and an explosion.

Signature CreateXform(object, explosion, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX4.0.0.

License requirements: None.

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

Creates an Xform based on the delta difference between the source and destination components in the explosion.

Signature CreateXform(explosion, sourceComponent, destComponent, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX4.0.0.

License requirements: None.

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

Creates an Xform based on origin and a direction. The direction passed is taken as the X, Y or Z axis based on the NXOpen.XYZAxis passed. The other two directions are evaluated from the cross product to a non-parallel global axis (global X, Y or Z)

Signature CreateXform(origin, axis, direction, scale, updateOption)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX5.0.0.

License requirements: None.

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

CreateXformAngleAxis

XformCollection.CreateXformAngleAxis

Creates a Motion Xform based on the axis and angle.

Signature CreateXformAngleAxis(axis, angle, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformAxisVector

XformCollection.CreateXformAxisVector

Creates a Motion Xform based on a axis and vector.

Signature CreateXformAxisVector(axis, vector, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformByDynamicOffset

XformCollection.CreateXformByDynamicOffset

Creates an Xform whose location and orientation are determined by applying a specified origin offset and transformation matrix to an existing coordinate system.

Signature CreateXformByDynamicOffset(csys, originOffset, trasformMatrix, updateOption, scale)

Parameters:
Returns:

created Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformByPlaneXDirPoint

XformCollection.CreateXformByPlaneXDirPoint

Creates an Xform based on a planar face or datum plane, an X-axis vector direction, and a point.

Signature CreateXformByPlaneXDirPoint(plane, xDirection, point, updateOption, scale, flipXDirection, flipZDirection)

Parameters:
Returns:

created Xform

Return type:

NXOpen.Xform

New in version NX7.5.0.

License requirements: None.

CreateXformByPlaneYDirPoint

XformCollection.CreateXformByPlaneYDirPoint

Creates an Xform based on a planar face or datum plane, a Y-axis vector direction, and a point.

Signature CreateXformByPlaneYDirPoint(plane, yDirection, point, updateOption, scale, flipYDirection, flipZDirection)

Parameters:
Returns:

created Xform

Return type:

NXOpen.Xform

New in version NX11.0.0.

License requirements: None.

CreateXformByPointXDirZDir

XformCollection.CreateXformByPointXDirZDir

Creates an Xform based on a point and two vectors.

The X and Z Axes are the vectors.

Signature CreateXformByPointXDirZDir(origin, xDirection, zDirection, updateOption, scale)

Parameters:
Returns:

created Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformByPointYDirZDir

XformCollection.CreateXformByPointYDirZDir

Creates an Xform based on a point and two vectors.

The Y and Z Axes are the vectors.

Signature CreateXformByPointYDirZDir(origin, yDirection, zDirection, updateOption, scale)

Parameters:
Returns:

created Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformCsysToCsys

XformCollection.CreateXformCsysToCsys

Creates a Motion Xform based on two csys.

Signature CreateXformCsysToCsys(from, to, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformDeltaXyz

XformCollection.CreateXformDeltaXyz

Creates a Motion Xform based on delta x, y, and z values where the x, y, and z directions are relative to a reference coordinate system.

Signature CreateXformDeltaXyz(delta, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX7.0.0.

License requirements: None.

CreateXformDistanceAngle

XformCollection.CreateXformDistanceAngle

Creates a Motion Xform based on the distance and angle on object.

Signature CreateXformDistanceAngle(distance, angle, dirr, angulardirr, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformDistanceBetweenPoints

XformCollection.CreateXformDistanceBetweenPoints

Creates a Motion Xform based on the direction and points.

Signature CreateXformDistanceBetweenPoints(origin, measure, vector, distance, originDistance, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformDistanceDirection

XformCollection.CreateXformDistanceDirection

Creates a Motion Xform based on the direction and distance.

Signature CreateXformDistanceDirection(direction, distance, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformDistanceRadial

XformCollection.CreateXformDistanceRadial

Creates a Motion Xform based on the axis and points.

Signature CreateXformDistanceRadial(axis, point, distance, originDistance, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformDynamic

XformCollection.CreateXformDynamic

Creates a Motion Xform based on the manip.

Signature CreateXformDynamic(org, mtx, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformFromCurrentView

XformCollection.CreateXformFromCurrentView

Creates an XForm using the current viewing coordinate system.

The X-Axis is parallel to the bottom of the view, the Y-Axis is parallel to the side of the view, and the origin is the origin of the view (the middle of the graphics screen). The coordinate system uses the right-hand rule so the Z-axis points out of the screen. Since the current viewing coordinate system does not exist if the NX session is running in batch mode, the absolute coordinate system will be returned instead.

Signature CreateXformFromCurrentView(updateOption, scale)

Parameters:
Returns:

Return type:

NXOpen.Xform

New in version NX4.0.0.

License requirements: None.

CreateXformRotateThreePoints

XformCollection.CreateXformRotateThreePoints

Creates a Motion Xform based on the three points and vector.

Signature CreateXformRotateThreePoints(vector, start, end, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformTwoPoints

XformCollection.CreateXformTwoPoints

Creates a Motion Xform based on two points.

Signature CreateXformTwoPoints(from, to, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.

CreateXformWithReverseNormal

XformCollection.CreateXformWithReverseNormal

Creates an Xform based on the delta difference between the source and destination components in the explosion.

Signature CreateXformWithReverseNormal(xform, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX5.0.0.

License requirements: None.

CreateXformWithView

XformCollection.CreateXformWithView

Creates a Xform with an existing view

Signature CreateXformWithView(view, updateOption)

Parameters:
Returns:

Xform

Return type:

NXOpen.Xform

New in version NX6.0.0.

License requirements: None.