Sam Jones Posted November 13, 2020 Share Posted November 13, 2020 Thank you to Patrick Stanford and Raymond Mullins for answering my question about getting a point along a 3D Poly. I have just ran into the need (that I was hoping to avoid) of needing to find the 3D coordinates of a point that lies a specified distance along a NURBS curve. Given a specified distance, can I get the location, X,Y,Z, of a point a specified distance along a NURBS curve? Also, how does VS get the length of a NURBS curve. The length in listed in the OIP does not seem to be accessible. As so often in the past TIA, Sam Quote Link to comment
Pat Stanford Posted November 13, 2020 Share Posted November 13, 2020 HLength seems to return the total length of a NURBS curve, but returns inches if the units are Feet & Inches. Since I know you like long names, try: GetPointAndParameterOnNurbsCurveAtGivenLength(Handle1, DesiredDistance/HLength(Handle1)/12, X1,Y1,Z1,R1,Index1); Where DesiredDistance is in feet. Quote Link to comment
Sam Jones Posted November 13, 2020 Author Share Posted November 13, 2020 41 minutes ago, Pat Stanford said: GetPointAndParameterOnNurbsCurveAtGivenLength(Handle1, DesiredDistance/HLength(Handle1)/12, X1,Y1,Z1,R1,Index1); inNurbCurveHandle to the NURBS curve. I know what this is. inPercentOfLengthSpecify location on curve as percent of total length. (0 - 1) I understand this. I thing HLength yields inches but I will check pPoint of specified location. Cool, this is the needed coordinate outParamParametric parameter of location. What is this (R1) and where do I get it from outIndex0-based index of piece for piecewise NURBS curve. What is this (Index1) and where do I get it from Quote Link to comment
Sam Jones Posted November 14, 2020 Author Share Posted November 14, 2020 Forget I asked. R1 and Index1 are unneeded VARs. Routine works wonderfully. Thanks. Quote Link to comment
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.