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 do I get the length and vertex values of a simple edge
ron_moreland
Member Posts: 90 ✭✭
Is there a simple example of how to query an edge for length and vertices? I've looked through several .fs examples and I get lost on what is relevant to my question. In particular the concept of context. If I pass in the edge in precondition, what should the context be when I query that edge?
Tagged:
0
Best Answer
-
ilya_baran Onshape Employees, Developers, HDM Posts: 1,204If you haven't already, I really recommend going through the slot tutorial: https://cad.onshape.com/FsDoc/tutorials/create-a-slot-feature.html
That should orient you with respect to the right concepts and the second tutorial shows an example with qVertexAdjacent and evVertexPoint for grabbing edge endpoints and their coordinates. evLength can also be used directly on an edge.
There's usually only one relevant context -- the one passed into a feature is the one you pass to evaluation functions.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc5
Answers
That should orient you with respect to the right concepts and the second tutorial shows an example with qVertexAdjacent and evVertexPoint for grabbing edge endpoints and their coordinates. evLength can also be used directly on an edge.
There's usually only one relevant context -- the one passed into a feature is the one you pass to evaluation functions.
Thanks for the help.