Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Querying points on a curve

darren_13darren_13 Member, Developers Posts: 119 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

Comments

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,210
    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 Inc
  • darren_13darren_13 Member, Developers Posts: 119 PRO
    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 Lynch
Sign In or Register to comment.