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 lengths/position of points/lines from selected face?
Lauren_Froschauer
Member Posts: 10 EDU
I am trying to cut down on the number of user inputs for the box joint feature. I remember Kevin mentioning that I could query the length of an edge or the position of a point etc. from a selected face.
Kevin, which command were you referring to? Could you give me some example code using it?
Kevin, which command were you referring to? Could you give me some example code using it?
0
Comments
distance is ValueWithUnits = worldToPlane(plane, worldPoint)[2];
(this should probably just be in std)To get the length of an edge:
length is ValueWithUnits = evLength(context, {entities : edgeQuery});
Is there a way to return the coordinates of the two vertices that define an edge by selecting the face that the edge belongs to?
qEdgeAdjacent(face, EntityType.EDGE)
toevLength
. To get the vertices of an edge, query for them usingqVertexAdjacent(edge, EntityType.VERTEX)
and useevVertexPoint
using either the evaluated vertex query or usingqNthElement
.