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 does "face" parameter in evEdgeTangentLine work
johannes_w
Member Posts: 32 PRO
I wrote a script which divides a curve into single sections and returns the point vectors next to each other. I try to transform a body along the curve.
Now I ran into the problem that evEdgeTangentLine lists my vectors from the wrong side. As I've understood this, the face parameter is used to define the direction. But I can't quite understand how to use it. And the documentation description about this parameter is a little riddle in my opinion.
If anyone could give me a hint, I'd be very thankful!
0
Best Answer
-
Jake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646Hi @johannes_w !
Sorry for the confusion here. I'll attempt to explain the documentation in a more human-centric way. When you supply a face to evEdgeTangentLines, imagine that you are standing on that face, at the midpoint of the edge you care about. Because you are standing on that face, "up" (from your point of view) is the face normal. Now turn around in a circle until the face is on your left, and a large cliff is on your right. The way you are facing ("forward" from your point of view) will be the positive direction of evEdgeTangentLines.
Here are a couple examples:
Notice that selecting a different face changes the edge direction of the top-right edge, because keeping this face to the "left" (in relation to the selected face normal being "up"), requires a different "forward".
If this is just completely confusing and didn't help, you can also just use the right-hand rule. Using your thumb as the face normal of the selected face, the edge directions will curl around in the direction of the curl of your fingers.Jake Rosenfeld - Modeling Team5
Answers
Sorry for the confusion here. I'll attempt to explain the documentation in a more human-centric way. When you supply a face to evEdgeTangentLines, imagine that you are standing on that face, at the midpoint of the edge you care about. Because you are standing on that face, "up" (from your point of view) is the face normal. Now turn around in a circle until the face is on your left, and a large cliff is on your right. The way you are facing ("forward" from your point of view) will be the positive direction of evEdgeTangentLines.
Here are a couple examples:
Notice that selecting a different face changes the edge direction of the top-right edge, because keeping this face to the "left" (in relation to the selected face normal being "up"), requires a different "forward".
If this is just completely confusing and didn't help, you can also just use the right-hand rule. Using your thumb as the face normal of the selected face, the edge directions will curl around in the direction of the curl of your fingers.
This is what the documentation means when it says the face "Must be adjacent to edge". I can see how this is confusing, because adjacent may be interpreted as just "touching", but throughout the documentation, when we say "adjacent", we mean "topologically connected".
An example of what we mean by adjacency:
https://cad.onshape.com/FsDoc/library.html#qVertexAdjacent-Query-EntityType
https://cad.onshape.com/FsDoc/library.html#constructPath-Context-Query-
Are you taking sketch edges as input to your function, or creating sketches within your function to then use? If you are taking them as input, you may just want to provide your user with a flipper to flip the interpretation of the edge (like we do for linear pattern). If you can give more detail about your inputs/outputs and what you are trying to do, I can try to give some suggestions of solutions.
Sounds great! Let us know if you need any more hints!