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

Face Area Problem.

Anonymous's picture
Forums: 

Hi.

Recently , I'm trying some routines that check the area of a face. this is my code. ================================================ double area_result = 0; TopoDS_Face F; // some routines that make F .... if(!F.IsNull()) { GProp_GProps Props; try{

BRepGProp::SurfaceProperties(F,Props); } catch(Standard_Failure e){

return 0; } area_result = Props.Mass(); } return area_result; =================================================

Most case, I works fine. but sometimes BRepGProp::SurfaceProperties(F,Props) function didn't work, and throw exception in lower function level, but i can't catch the exception.

I tried like this code above, but it doesn't work.

How can I catch the exception? Wait for your answer. thanks..