X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FBRepGProp%2FBRepGProp.cxx;h=14dca7b99bb46a0d0aebfee1ba41f79dea919589;hb=4d19a2c5e73415f81c1e3cae34bdd0fe1ddd0b66;hpb=ee5befae97566611223b30bcb6f803c2d2e6b314 diff --git a/src/BRepGProp/BRepGProp.cxx b/src/BRepGProp/BRepGProp.cxx index ecaed92cc1..14dca7b99b 100644 --- a/src/BRepGProp/BRepGProp.cxx +++ b/src/BRepGProp/BRepGProp.cxx @@ -91,6 +91,7 @@ static Standard_Real surfaceProperties(const TopoDS_Shape& S, GProp_GProps& Prop BRepGProp_Face BF; BRepGProp_Domain BD; TopTools_MapOfShape aFMap; + TopLoc_Location aLocDummy; for (ex.Init(S,TopAbs_FACE), i = 1; ex.More(); ex.Next(), i++) { const TopoDS_Face& F = TopoDS::Face(ex.Current()); @@ -98,6 +99,16 @@ static Standard_Real surfaceProperties(const TopoDS_Shape& S, GProp_GProps& Prop { continue; } + + { + const Handle(Geom_Surface)& aSurf = BRep_Tool::Surface (F, aLocDummy); + if (aSurf.IsNull()) + { + // skip faces without geometry + continue; + } + } + BF.Load(F); TopoDS_Iterator aWIter(F); Standard_Boolean IsNatRestr = !aWIter.More();