kunekainen Posted June 6, 2015 Share Posted June 6, 2015 Hi there; I'm trying to find distance of a specified point on a 3d polyline with "getdistatpoint" function. sometimes it works properly but sometimes it gives einvalidinput error. I searched web and found this function: Public Shared Function GetDistanceToPoint(curve As Curve, pt As Point3d) As Double Dim ptOnCurve As Point3d = curve.GetClosestPointTo(pt, False) Dim ptparam As Double = curve.GetParameterAtPoint(ptOnCurve) Dim a As Double = curve.GetDistanceAtParameter(ptparam) Dim b As Double = curve.GetDistanceAtParameter(curve.StartParam) Return a - b End Function This works better than "getdistatpoint" function but it gives "einvalidinput" error too. I really need help, thanks in advance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.