Measurement Class¶
-
class
NXOpen.
Measurement
¶ Bases:
object
Provides methods for calculating and displaying the measurement information.
To obtain an instance of this class, refer to
NXOpen.Session
New in version NX3.0.0.
Methods¶
Method | Description |
---|---|
DisplayAngle | Calculates and displays ‘Angle’ between objects. |
DisplayArcLength | Calculates and displays ‘Total Arc Length’ of all the selected objects. |
DisplayArcLengthBetweenPoints | Calculates and displays the arc length between two points on curves. |
DisplayDeviationChecking | Checks deviations between curves (curve to curve),and displays the report. |
DisplayMinimumDistance | Calculates and displays ‘Minimum Distance between objects. |
DisplayRoutingPathLength | Calculates and displays the Routing path length. |
GetAngle | Calculates and returns ‘True Angle’ between objects. |
GetArcLength | Calculates and returns ‘Total Arc Length’ of all the selected objects. |
GetArcLengthBetweenPoints | Calculates and returns the arc length between two points on curves. |
GetMinimumDistance | Calculates and returns ‘Minimum Distance between objects. |
GetMinimumOrthogonalDistance | Calculates and returns ‘Minimum Orthogonal Distance’ between input point and face or edge. |
GetRoutingPathLength | Calculates and returns the Routing path length. |
Enumerations¶
MeasurementDeviationReportType Enumeration | Describes type of the ‘Deviation Checking’ report. |
Method Detail¶
DisplayAngle¶
-
Measurement.
DisplayAngle
¶ Calculates and displays ‘Angle’ between objects.
Features.SewBuilder.Type of allowed input objects are - Edge, Face, Body, Curve, Direction or Feature etc.
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayAngle(object1, position1, object2, position2)
Parameters: - object1 (
NXOpen.NXObject
) – First object - position1 (
NXOpen.Point3d
) – Point position on first object - object2 (
NXOpen.NXObject
) – Second object - position2 (
NXOpen.Point3d
) – Point position on second object
New in version NX3.0.0.
License requirements: None.
- object1 (
DisplayArcLength¶
-
Measurement.
DisplayArcLength
¶ Calculates and displays ‘Total Arc Length’ of all the selected objects.
Features.SewBuilder.Type of allowed input objects are -
NXOpen.Edge
,:py:class:NXOpen.Line,:py:class:NXOpen.Arc,:py:class:NXOpen.Spline,andNXOpen.Curve
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayArcLength(selectedObjects)
Parameters: selectedObjects (list of NXOpen.DisplayableObject
) – Array of objects for which length to be calculatedNew in version NX3.0.0.
License requirements: None.
DisplayArcLengthBetweenPoints¶
-
Measurement.
DisplayArcLengthBetweenPoints
¶ Calculates and displays the arc length between two points on curves.
The points may be on a single curve or a set of connected curves.
Features.SewBuilder.Type of allowed input objects is
NXOpen.Point
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayArcLengthBetweenPoints(point1, point2)
Parameters: - point1 (
NXOpen.Point
) – First point on curve - point2 (
NXOpen.Point
) – Second point on curve
New in version NX6.0.0.
License requirements: None.
- point1 (
DisplayDeviationChecking¶
-
Measurement.
DisplayDeviationChecking
¶ Overloaded method DisplayDeviationChecking
DisplayDeviationChecking(curve1, curve2, numOfCheckPoints, distanceTolerance, angularTolerance, reportType)
DisplayDeviationChecking(curve1, face2, numOfCheckPoints, distanceTolerance, angularTolerance, reportType)
DisplayDeviationChecking(face1, edge1, face2, numOfCheckPoints, distanceTolerance, angularTolerance, reportType)
DisplayDeviationChecking(face1, face2, numOfCheckPointsU, numOfCheckPointsV, distanceTolerance, angularTolerance, reportType)
DisplayDeviationChecking(face1, edge1, face2, edge2, numOfCheckPoints, distanceTolerance, angularTolerance, reportType)
-------------------------------------
Checks deviations between curves (curve to curve),and displays the report.
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayDeviationChecking(curve1, curve2, numOfCheckPoints, distanceTolerance, angularTolerance, reportType)
Parameters: - curve1 (
NXOpen.ICurve
) – Curve used for deviation checking - curve2 (
NXOpen.ICurve
) – Curve used for deviation checking - numOfCheckPoints (int) – Number of equally spaced sample check points
- distanceTolerance (float) – Distance Tolerance
- angularTolerance (float) – Angle Tolerance
- reportType (
NXOpen.MeasurementDeviationReportType
) – Type of the report
New in version NX3.0.0.
License requirements: None.
-------------------------------------
Checks deviations between a curve and a face (curve to face), and displays the report.
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayDeviationChecking(curve1, face2, numOfCheckPoints, distanceTolerance, angularTolerance, reportType)
Parameters: - curve1 (
NXOpen.Curve
) – Curve used for deviation checking - face2 (
NXOpen.Face
) – Face used for deviation checking - numOfCheckPoints (int) – Number of equally spaced sample check points
- distanceTolerance (float) – Distance Tolerance
- angularTolerance (float) – Angle Tolerance
- reportType (
NXOpen.MeasurementDeviationReportType
) – Type of the report
New in version NX3.0.0.
License requirements: None.
-------------------------------------
Checks deviations between a edge and a face (edge to face), and displays the report.
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayDeviationChecking(face1, edge1, face2, numOfCheckPoints, distanceTolerance, angularTolerance, reportType)
Parameters: - face1 (
NXOpen.Face
) – Face on which edge1 lies - edge1 (
NXOpen.Edge
) – Edge used for deviation checking - face2 (
NXOpen.Face
) – Face used for deviation checking - numOfCheckPoints (int) – Number of equally spaced sample check points
- distanceTolerance (float) – Distance Tolerance
- angularTolerance (float) – Angle Tolerance
- reportType (
NXOpen.MeasurementDeviationReportType
) – Type of the report
New in version NX3.0.0.
License requirements: None.
-------------------------------------
Checks deviations between faces (face to face), and displays the report.
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayDeviationChecking(face1, face2, numOfCheckPointsU, numOfCheckPointsV, distanceTolerance, angularTolerance, reportType)
Parameters: - face1 (
NXOpen.Face
) – First face used for deviation checking - face2 (
NXOpen.Face
) – Second face used for deviation checking - numOfCheckPointsU (int) – Number of equally spaced sample check points in u direction
- numOfCheckPointsV (int) – Number of equally spaced sample check points in v direction
- distanceTolerance (float) – Distance Tolerance
- angularTolerance (float) – Angle Tolerance
- reportType (
NXOpen.MeasurementDeviationReportType
) – Type of the report
New in version NX3.0.0.
License requirements: None.
-------------------------------------
Checks deviations between edges (edge to edge), and displays the report.
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayDeviationChecking(face1, edge1, face2, edge2, numOfCheckPoints, distanceTolerance, angularTolerance, reportType)
Parameters: - face1 (
NXOpen.Face
) – Face on which edge1 lies - edge1 (
NXOpen.Edge
) – First edge used for deviation checking - face2 (
NXOpen.Face
) – Face on which edge2 lies - edge2 (
NXOpen.Edge
) – Second edge used for deviation checking - numOfCheckPoints (int) – Number of equally spaced sample check points
- distanceTolerance (float) – Distance Tolerance
- angularTolerance (float) – Angle Tolerance
- reportType (
NXOpen.MeasurementDeviationReportType
) – Type of the report
New in version NX3.0.0.
License requirements: None.
-------------------------------------
DisplayMinimumDistance¶
-
Measurement.
DisplayMinimumDistance
¶ Overloaded method DisplayMinimumDistance
DisplayMinimumDistance(object1, object2)
DisplayMinimumDistance(object1, startPointForObject1, object2, startPointForObject2)
DisplayMinimumDistance(object1, startPointForObject1, object2)
DisplayMinimumDistance(object1, object2, startPointForObject2)
-------------------------------------
Calculates and displays ‘Minimum Distance ” between objects. Start points are NOT specified for any of the objects.
Features.SewBuilder.Type of allowed input objects are - Curve, Edge, Face, Body, Plane, or Csys etc.
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayMinimumDistance(object1, object2)
Parameters: - object1 (
NXOpen.DisplayableObject
) – First object - object2 (
NXOpen.DisplayableObject
) – Second object
Returns: a tuple
Return type: A tuple consisting of (closePoint1, closePoint2). closePoint1 is a
NXOpen.Point3d
. Close point on first object closePoint2 is aNXOpen.Point3d
. Close point on second objectNew in version NX3.0.0.
License requirements: None.
-------------------------------------
Calculates and displays ‘Minimum Distance’ between objects. Start points are specified for both the objects. If any of object is Point,Pass None to the object and pass a point co-ordinates as a start point.
Features.SewBuilder.Type of allowed input objects are - Point, Curve, Edge, Face, Body, Plane, or Csys etc.
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayMinimumDistance(object1, startPointForObject1, object2, startPointForObject2)
Parameters: - object1 (
NXOpen.NXObject
) – First object - startPointForObject1 (
NXOpen.Point3d
) – Start point for first object - object2 (
NXOpen.NXObject
) – Second object - startPointForObject2 (
NXOpen.Point3d
) – Start point for second object
Returns: a tuple
Return type: A tuple consisting of (closePoint1, closePoint2). closePoint1 is a
NXOpen.Point3d
. Close point on first object closePoint2 is aNXOpen.Point3d
. Close point on second objectNew in version NX3.0.0.
License requirements: None.
-------------------------------------
Calculates and displays ‘Minimum Distance’ between objects. Start points are specified only for object1.If any of object is Point,Pass None to the object1 and pass a point co-ordinates as a start_point_for_object_1.
Features.SewBuilder.Type of allowed input objects are - Point, Curve, Edge, Face, Body, Plane, or Csys etc.
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayMinimumDistance(object1, startPointForObject1, object2)
Parameters: - object1 (
NXOpen.NXObject
) – First object - startPointForObject1 (
NXOpen.Point3d
) – Start point for first object - object2 (
NXOpen.NXObject
) – Second object
Returns: a tuple
Return type: A tuple consisting of (closePoint1, closePoint2). closePoint1 is a
NXOpen.Point3d
. Close point on first object closePoint2 is aNXOpen.Point3d
. Close point on second objectNew in version NX3.0.0.
License requirements: None.
-------------------------------------
Calculates and displays ‘Minimum Distance’ between objects. Start points are specified only for object2.If any of object is Point,Pass None to the object2 and pass a point co-ordinates as a start_point_for_object_2.
Features.SewBuilder.Type of allowed input objects are - Point, Curve, Edge, Face, Body, Plane, or Csys etc.
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayMinimumDistance(object1, object2, startPointForObject2)
Parameters: - object1 (
NXOpen.NXObject
) – First object - object2 (
NXOpen.NXObject
) – Second object - startPointForObject2 (
NXOpen.Point3d
) – Start point for second object
Returns: a tuple
Return type: A tuple consisting of (closePoint1, closePoint2). closePoint1 is a
NXOpen.Point3d
. Close point on first object closePoint2 is aNXOpen.Point3d
. Close point on second objectNew in version NX3.0.0.
License requirements: None.
-------------------------------------
DisplayRoutingPathLength¶
-
Measurement.
DisplayRoutingPathLength
¶ Calculates and displays the Routing path length.
If the path is disconnected, not all of the :py:class:`NXOpen.Routing.ISegment`s can be arranged end to end, the length returned is the sum of the lengths of the segments.
NXOpen.Features.SewBuilder.Type of allowed input objects is
NXOpen.Routing.ISegment
In Interactive mode, output will be displayed in the listing window
In Batch mode, output will be displayed to the standard output (stdout)
Signature
DisplayRoutingPathLength(selectedObjects)
Parameters: selectedObjects (list of NXOpen.Routing.ISegment
) – Array of :py:class:`NXOpen.Routing.ISegment`s for which length is calculatedReturns: Array of USED :py:class:`NXOpen.Routing.ISegment`s for which length is calculated Return type: list of NXOpen.Routing.ISegment
New in version NX6.0.0.
License requirements: None.
GetAngle¶
-
Measurement.
GetAngle
¶ Calculates and returns ‘True Angle’ between objects.
Features.SewBuilder.Type of allowed input objects are - Edge, Face, Body, Curve, Direction or Feature etc.
Signature
GetAngle(object1, position1, object2, position2)
Parameters: - object1 (
NXOpen.NXObject
) – First object - position1 (
NXOpen.Point3d
) – Point position on first object - object2 (
NXOpen.NXObject
) – Second object - position2 (
NXOpen.Point3d
) – Point position on second object
Returns: Angle between object1 and object2
Return type: float
New in version NX3.0.0.
License requirements: None.
- object1 (
GetArcLength¶
-
Measurement.
GetArcLength
¶ Calculates and returns ‘Total Arc Length’ of all the selected objects.
Features.SewBuilder.Type of allowed input objects are -
NXOpen.Edge
,:py:class:NXOpen.Line,:py:class:NXOpen.Arc,:py:class:NXOpen.Spline,andNXOpen.Curve
Signature
GetArcLength(selectedObjects)
Parameters: selectedObjects (list of NXOpen.DisplayableObject
) – Array of objects for which length to be calculatedReturns: Total Arc Length Return type: float New in version NX3.0.0.
License requirements: None.
GetArcLengthBetweenPoints¶
-
Measurement.
GetArcLengthBetweenPoints
¶ Calculates and returns the arc length between two points on curves.
The points may be on a single curve or a set of connected curves. Also returns the curves that is the shortest path between the two points.
NXOpen.Features.SewBuilder.Type of allowed input objects is
NXOpen.Point
Signature
GetArcLengthBetweenPoints(point1, point2)
Parameters: - point1 (
NXOpen.Point
) – First point on curve - point2 (
NXOpen.Point
) – Second point on curve
Returns: a tuple
Return type: A tuple consisting of (length, curves). length is a float. Arc length between the two pointscurves is a list of
NXOpen.Curve
. The curves of the shortest pathNew in version NX6.0.0.
License requirements: None.
- point1 (
GetMinimumDistance¶
-
Measurement.
GetMinimumDistance
¶ Overloaded method GetMinimumDistance
GetMinimumDistance(object1, object2)
GetMinimumDistance(object1, startPointForObject1, object2, startPointForObject2)
GetMinimumDistance(object1, startPointForObject1, object2)
GetMinimumDistance(object1, object2, startPointForObject2)
-------------------------------------
Calculates and returns ‘Minimum Distance ” between objects. Start points are NOT specified for any of the objects.
Features.SewBuilder.Type of allowed input objects are - Curve, Edge, Face, Body, Plane, or Csys etc.
Signature
GetMinimumDistance(object1, object2)
Parameters: - object1 (
NXOpen.NXObject
) – First object - object2 (
NXOpen.NXObject
) – Second object
Returns: a tuple
Return type: A tuple consisting of (distance, closePoint1, closePoint2, accuracy). distance is a float. minimum distance between two objectsclosePoint1 is a
NXOpen.Point3d
. Close point on first object closePoint2 is aNXOpen.Point3d
. Close point on second object accuracy is a float. Accuracy of calculationNew in version NX3.0.0.
License requirements: None.
-------------------------------------
Calculates and returns ‘Minimum Distance ” between objects. Start points are specified for both the objects. If any of object is Point,Pass None to the object and pass a point co-ordinates as a start point.
Features.SewBuilder.Type of allowed input objects are - Point, Curve, Edge, Face, Body, Plane, or Csys etc.
Signature
GetMinimumDistance(object1, startPointForObject1, object2, startPointForObject2)
Parameters: - object1 (
NXOpen.NXObject
) – First object - startPointForObject1 (
NXOpen.Point3d
) – Start point for first object - object2 (
NXOpen.NXObject
) – Second object - startPointForObject2 (
NXOpen.Point3d
) – Start point for second object
Returns: a tuple
Return type: A tuple consisting of (distance, closePoint1, closePoint2, accuracy). distance is a float. minimum distance between two objectsclosePoint1 is a
NXOpen.Point3d
. Close point on first object closePoint2 is aNXOpen.Point3d
. Close point on second object accuracy is a float. Accuracy of calculationNew in version NX3.0.0.
License requirements: None.
-------------------------------------
Calculates and returns ‘Minimum Distance ” between objects. Start points are specified only for first object. If any of object is Point,Pass None to the object1 and pass a point co-ordinates as a start_point_for_object_1.
Features.SewBuilder.Type of allowed input objects are - Point, Curve, Edge, Face, Body, Plane, or Csys etc.
Signature
GetMinimumDistance(object1, startPointForObject1, object2)
Parameters: - object1 (
NXOpen.NXObject
) – First object - startPointForObject1 (
NXOpen.Point3d
) – Start point for first object - object2 (
NXOpen.NXObject
) – Second object
Returns: a tuple
Return type: A tuple consisting of (distance, closePoint1, closePoint2, accuracy). distance is a float. minimum distance between two objectsclosePoint1 is a
NXOpen.Point3d
. Close point on first object closePoint2 is aNXOpen.Point3d
. Close point on second object accuracy is a float. Accuracy of calculationNew in version NX3.0.0.
License requirements: None.
-------------------------------------
Calculates and returns ‘Minimum Distance ” between objects. Start points are specified only for second object. If any of object is Point,Pass None to the object2 and pass a point co-ordinates as a start_point_for_object_2.
Features.SewBuilder.Type of allowed input objects are - Point, Curve, Edge, Face, Body, Plane, or Csys etc.
Signature
GetMinimumDistance(object1, object2, startPointForObject2)
Parameters: - object1 (
NXOpen.NXObject
) – First object - object2 (
NXOpen.NXObject
) – Second object - startPointForObject2 (
NXOpen.Point3d
) – Start point for second object
Returns: a tuple
Return type: A tuple consisting of (distance, closePoint1, closePoint2, accuracy). distance is a float. Minimum distance between two objectsclosePoint1 is a
NXOpen.Point3d
. Close point on first object closePoint2 is aNXOpen.Point3d
. Close point on second object accuracy is a float. Accuracy of calculationNew in version NX3.0.0.
License requirements: None.
-------------------------------------
GetMinimumOrthogonalDistance¶
-
Measurement.
GetMinimumOrthogonalDistance
¶ Calculates and returns ‘Minimum Orthogonal Distance’ between input point and face or edge.
Signature
GetMinimumOrthogonalDistance(object1, object2)
Parameters: - object1 (
NXOpen.DisplayableObject
) – input point - object2 (
NXOpen.DisplayableObject
) – face or edge
Returns: a tuple
Return type: A tuple consisting of (distance, closestOrthogonalPoint). distance is a float. Minimum orthogonal distance between input point and face or edgeclosestOrthogonalPoint is a
NXOpen.Point3d
. Closest orthogonal point on face or edgeNew in version NX10.0.3.
License requirements: None.
- object1 (
GetRoutingPathLength¶
-
Measurement.
GetRoutingPathLength
¶ Calculates and returns the Routing path length.
If the path is disconnected, not all of the :py:class:`NXOpen.Routing.ISegment`s can be arranged end to end, the length returned is the sum of the lengths of the segments.
NXOpen.Features.SewBuilder.Type of allowed input objects is
NXOpen.Routing.ISegment
Signature
GetRoutingPathLength(selectedObjects)
Parameters: selectedObjects (list of NXOpen.NXObject
) – Array of :py:class:`NXOpen.Routing.ISegment`s and :py:class:`NXOpen.Assemblies.Component`s for which length is calculatedReturns: a tuple Return type: A tuple consisting of (length, usedObjects, individualLengths). length is a float. Sum of the individual lengths usedObjects is a list of NXOpen.NXObject
. The routing objects used in the path length computation individualLengths is a list of float.New in version NX6.0.0.
License requirements: None.