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.
Get vector for edge direction
DSPuzzles
Member Posts: 17 EDU
I am writing a feature that requires me to select a vertex and returns the vectors corresponding to the direction of the edges that meet at that vertex. Is this possible?
Thank you.
Thank you.
Tagged:
0
Comments
PhD, Mechanical Engineering, Stanford University
https://cad.onshape.com/documents/71cf88a8c2e0951f0f60de72/w/8c5180c50706c37a3c028753/e/eb84571c61056de69feff247
The underlying functions here are qVertexAdjacent and evEdgeTangentLine.
Let us know if you have more questions!
A follow-up question for the same feature, how do I specify in a query for vertices that I want to allow the selection of midpoints of edges? Whenever I use "Filter: EntityType.VERTEX" I can never select these, while in OnShape features like the transform tool in translation mode I am able to select these points. I've looked through the source code but cannot seem to find a reason for these
For various development reasons edge points (our internal name for edge midpoints) are only created if edges are selectable into the box in question. The filter "Filter: EntityType.VERTEX || EntityType.EDGE" will allow you to select those edge points that you want to get at. It will also allow you to select edges, which may not be desirable for your feature. The following code may be helpful:
This bug is on our radar, but you can help by clicking "report a bug" from the "?" menu in your Part Studio.
Hope this helps!