I'm attempting to use BSplineCurve.EvaluatePointTangent. It seems to yield incorrect results.
I want to find curve parameters at a point on a B-Spline curve. EvaluatePointTangent computes a point in some unexpected way. The result looks correct when parameter u is 0 or 1, but not between those values.
The attached VBA project lets you pick a B-Spline curve element, then it attempts to find the tangent at the hit point. It marks the point that EvaluatePointTangent returns, but it is visibly incorrect.
[View:/cfs-file/__key/communityserver-discussions-components-files/343173/TangentCalculator.mvba:235:0]
- Copy the project to a well-known location, such as \Workspace\Standards\VBA
- Run the macro using key-in:
vba run [TangentCalculator]modMain.Main - Select a B-spline curve and compare the marker point with your pick location
- Look at the information in VBA's Immediate window