Click or drag to resize
CollisionDetectorPointDistance Method (Vector3, ProjectObject, Vector3, Part)
Calculates the shortest distance from a point to a graphic object, as well as the closest point on the object.

Namespace:  ABB.Robotics.RobotStudio.Stations
Assembly:  ABB.Robotics.RobotStudio.Stations (in ABB.Robotics.RobotStudio.Stations.dll) Version: 7.0.8747.636
Syntax
C#
public static double PointDistance(
	Vector3 testPoint,
	ProjectObject testObject,
	out Vector3 hitPoint,
	out Part hitPart
)

Parameters

testPoint
Type: ABB.Robotics.MathVector3
Point to test (in world coordinates)
testObject
Type: ABB.Robotics.RobotStudioProjectObject
Object to test. Must be GraphicComponent, Body or Face.
hitPoint
Type: ABB.Robotics.MathVector3
Returns the closest point on the object.
hitPart
Type: ABB.Robotics.RobotStudio.StationsPart
Returns the part where the closest point is.

Return Value

Type: Double
The shortest distance between the point and the objects, or -1 if the calculation fails.
Remarks
The algorithm uses the graphical representation of objects, so the result is an approximation.
Version Information

Supported in: 1.0.0.0
See Also