1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0029734: minor correction for compatibility with old version of OCCT

This commit is contained in:
asl
2018-06-19 11:54:21 +03:00
parent 8667456518
commit c9339e5a17

View File

@@ -168,7 +168,10 @@ static Standard_Real surfaceProperties(const TopoDS_Shape& S, GProp_GProps& Prop
else
{
BF.Load(F);
Standard_Boolean IsNatRestr = (F.NbChildren() == 0);
//Standard_Boolean IsNatRestr = (F.NbChildren() == 0);
TopoDS_Iterator aWIter(F);
Standard_Boolean IsNatRestr = !aWIter.More();
if (!IsNatRestr) BD.Init(F);
if (Eps < 1.0) {
G.Perform(BF, BD, Eps);
@@ -282,7 +285,10 @@ static Standard_Real volumeProperties(const TopoDS_Shape& S, GProp_GProps& Props
else
{
BF.Load(F);
Standard_Boolean IsNatRestr = (F.NbChildren () == 0);
//Standard_Boolean IsNatRestr = (F.NbChildren () == 0);
TopoDS_Iterator aWIter(F);
Standard_Boolean IsNatRestr = !aWIter.More();
if (!IsNatRestr) BD.Init(F);
if (Eps < 1.0) {
G.Perform(BF, BD, Eps);