Edge Concavity or Convexity

Hi,
Is there an easy way to know if an edge (of a solid) is Convex or Concave in Opencascade?
Is there any function for that?

jelle's picture

just sample the gaussian curvature; the sign will tell you whether its [locally] convex or concave.

ataeft's picture

Thanks, do you know the function for that?

jelle's picture

see the LProps class...

ataeft's picture

Thanks, I found that,

here is my code:

GeomLProp_CLProps aCurrentCurve_Props(aCurrentCurve, 1, gp::Resolution());
Standard_Real aCurrentCurve_Curvature = aCurrentCurve_Props.Curvature();

But the curvature is always 0!! do you know what is the problem here?

jelle's picture

gauss curv. 0 means you're sampling either a developable surface, or in case of an edge, its a straight line.

Roman Lygin's picture

... or forgot to call SetParameter() before calling Curvature() ;-)

ataeft's picture

Ok, I was trying to capture concavity or convexity of an edge (lets say in a polyhedral).
So I think it is not possible to do that with this approach? if all the edges are line segments..

jelle's picture

correct. however the topic is "Edge Concavity or Convexity", so this is a completely different question ;)
though TopoDS_Shape offers a "Convex" method

ataeft's picture

I used Convex method, but it is not working..
I always shows a constant number!

ataeft's picture

Convex method in "TopoDS_Edge"