X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FBRepMesh%2FBRepMesh_Deflection.cxx;h=776c7235bb3fbcbd5a4834344a5fae598fc1cdda;hb=0da2ecac41ffca078d2d4c6b46bafcea36445ec4;hpb=bdd09cfaf4fe4d7643d0c1c3d1d4cf9e8037a32a diff --git a/src/BRepMesh/BRepMesh_Deflection.cxx b/src/BRepMesh/BRepMesh_Deflection.cxx index 9110114056..776c7235bb 100644 --- a/src/BRepMesh/BRepMesh_Deflection.cxx +++ b/src/BRepMesh/BRepMesh_Deflection.cxx @@ -145,18 +145,22 @@ void BRepMesh_Deflection::ComputeDeflection ( } Standard_Real aFaceDeflection = 0.0; - if (theDFace->WiresNb () > 0) + if (!theParameters.ForceFaceDeflection) { - for (Standard_Integer aWireIt = 0; aWireIt < theDFace->WiresNb(); ++aWireIt) + if (theDFace->WiresNb () > 0) { - aFaceDeflection += theDFace->GetWire(aWireIt)->GetDeflection(); + for (Standard_Integer aWireIt = 0; aWireIt < theDFace->WiresNb (); ++aWireIt) + { + aFaceDeflection += theDFace->GetWire (aWireIt)->GetDeflection (); + } + + aFaceDeflection /= theDFace->WiresNb (); } - aFaceDeflection /= theDFace->WiresNb (); + aFaceDeflection = Max (2. * BRepMesh_ShapeTool::MaxFaceTolerance ( + theDFace->GetFace ()), aFaceDeflection); } + aFaceDeflection = Max (aDeflection, aFaceDeflection); - aFaceDeflection = Max(aDeflection, aFaceDeflection); - - theDFace->SetDeflection (Max(2.* BRepMesh_ShapeTool::MaxFaceTolerance( - theDFace->GetFace()), aFaceDeflection)); + theDFace->SetDeflection (aFaceDeflection); }