Sat, 09/22/2007 - 07:39

I have a big problem in my master thesis project unsing OpenCascade: I don't know hot to calculate the attribute of a edge (convex or concave).

This is the definiton of my problem:

Input: Two neighbor faces (they share a common edge)

Output: Are convex or concave?

In OpenCascade it is easy to make some reasoning about faces and edges. You can translate a face into a parametric surface (U,V domain), and an edge in to a parametric curve (U domain). I can map the curve with the surface too: U of the curve -> U,V of the surface. I know too the valid range of the U,V of the faces and valid range of U. in the curve. This is an easy task.

With this mapping I can calculate normals N of both faces, and derivate of U, V and the direction of the edge for a given (X,Y,Z) point or (U,V) parameters of one of the faces. The problem is, that I don't have enough information to obtain the attribute, because a pair of normals are always ambiguous. What I am doing wrong? I am looking in internet, and I don't find the method to use.

First thanks for the help... I appreciate very much your time

Mon, 09/24/2007 - 10:13

Not clear relatively what do you want to know the convexity of the edge: inside the contour of one of the faces (in 2d space) or relatively the volume restricted by these faces?

Mon, 09/24/2007 - 13:07

If the angle formed between the two faces is more than 180º is convex, otherwise concave. the edge can be smooth (=180º)

At one point of the curve, a need the normals of both faces and where resides the material (the orthognal direction of the curve pointing the material of one of the faces).

To calculate the normals is easy. The direction of the curve at the same point to, ...but the orthogonal direction pointing of the direction of the surface?

Thanks again

Thanks for the response

Mon, 09/24/2007 - 15:10

Now it is clear.

So, use the following rules:

1. Normal of face must be inversed if the orientation of the face is reversed.

2. Direction of curve must be inversed if the orientation of the edge in this face is reversed.

3. The material is always on the left of boundary curve (if normal is directed to us).

Mon, 09/24/2007 - 16:16

Thank you for the help!!!!! I did it!