It is quite challenging for me to get the face from the edge on to which the dimension is applied.
for ex: if we take a block in drawing and dimension it by selecting 2 edges (top - bottom). I need to get the right face from the edge to which dimension is applied.
Challenge: from edge i get 2 faces, top face(this is correct face which i need ) and the normal face which is visible in 2-D view.
the index of the face edges are not constant so i am failing to get the correct face
any help which is greatly appreciated.
You could calculate the angle between the face normal and view normal.
I think you won't find an universal solution for that problem. You dimensioned the edges and not the faces.
You may come up with a solution for some special cases. If the face you look on is always perpendicular to the direction of the view, you can use that to rule it out (as Technisites suggested). If the faces on the side of the block are always perpedicular to the views plane, you can use that to find them. If there is always only one face you look on, the face having both dimensioned edges as boundaries is not the one you search ....
But you can think of many cases where even a human can't decide which face to use.
you rightly said it.
but le me tell you that. i am developing an application for GD&T legality validation.
here there are concepts like feature and feature of size.
a feature could be just any face to which a reference is made (an arrow directed to face, here i could say in 2D view the arrow is directed to an projected edge.)
and feature of size: 2 opposed faces with a size dimension is called feature of size.
chellenge: the dimension is placed to projected edges in 2D view, but the edge referenced will give me 2 faces, and the face index is not always constant so i am worried on how to get the right face.
So do it as Technisites suggests. Alternativly, if the two dimensioned faces are always planar and parallel, select those faces of the 3 (or 4) faces in question that have a parallel but opposite normal.