For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Edge Concavity or Convexity

Ata's picture
Forums: 

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.

Ata's picture

Thanks, do you know the function for that?

jelle's picture

see the LProps class...

Ata'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() ;-)

Ata'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

Ata's picture

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

Ata's picture

Convex method in "TopoDS_Edge"