Querying points on a curve
darren_13
Member, Developers Posts: 120 PRO
Hi I am currently working on a script to auto spline between my aerofoils, but I am having trouble's.
I tried querying the vertices adjacent to the profile, however this only gave me the leading and trailing point.
I have now queried the upper and lower splines and attempted to do a line intersect but obviously a spline isn't a line and didn't work
any other suggestions?

Ps. Thank you for the debug webinar was really helpful, I really didn't even know it existed.
Kind regards,
Darren
I tried querying the vertices adjacent to the profile, however this only gave me the leading and trailing point.
I have now queried the upper and lower splines and attempted to do a line intersect but obviously a spline isn't a line and didn't work

Ps. Thank you for the debug webinar was really helpful, I really didn't even know it existed.
Kind regards,
Darren
Tagged:
0
Comments
-
Are you looking to query the vertices near the curve or are you looking to evaluate (get coordinate vectors) points on the curve? For the latter see https://cad.onshape.com/FsDoc/library.html#evEdgeTangentLine-Context-map
For the former, I don't have a better idea given the facilities currently available, than to iterate over the vertices and for each one, evaluate the coordinates and evaluate qContainsPoint(queryForEdgeCurve, coordinatesOfPoint) to check if it's on the curve. evCollision between all the points and the curve may be another possibility that might be faster.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc1 -
Cheers @ilya_baran, I hadn't considered the first one. This would be a lot more robust and would help me account for aerofoils with different numbers of points. Thank you!
Kind regards,
Darren Lynch0

