Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
How to find partial length of edge
konstantin_shiriazdanov
Member Posts: 1,221 ✭✭✭✭✭
I obtain a distance from point to some edge using evDistance, and then i need to evaluate a length of arc of this edge between the starting point of edge and the point defined by parameter from DistanceResult, but sadly DistanceResult doesnt use arc length parametrization, so the task is somehow to convert parameter value to the arc length parametrized format
0
Comments
When evDistance was first released there were tolerance issues with our implementation of arcLengthParameterization that would have made inverting it on our end a poor idea. However those issues have since been fixed so we should have the right tools to support that option now.
In the meantime, a parameter search with evEdgeTangentLine seems like your best option. A binary (or 10-ary) search is the most obvious starting strategy, but once you're in a range that's somewhat linear (i.e. euclidian distance between two points is within some factor of edge length between those points), you can iterate to a new point by moving forward the euclidian distance along the edge and evaluating at that point. Since sane edges become more and more linear at smaller scales, that should converge very quickly.