From: nbv Date: Fri, 23 Nov 2012 11:33:47 +0000 (+0400) Subject: 0023130: command "maxtolerance" doesn't work on Windows X-Git-Tag: V6_6_0_beta~215 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=581971fef386c7347e529b42aa7f487459df3788 0023130: command "maxtolerance" doesn't work on Windows maxtol command returns incorrect values of variables nbFaces, nbEdges and nbVtx. Test case for this bug --- diff --git a/src/BRepTest/BRepTest_BasicCommands.cxx b/src/BRepTest/BRepTest_BasicCommands.cxx index 3106726e0f..b1472a4d7a 100755 --- a/src/BRepTest/BRepTest_BasicCommands.cxx +++ b/src/BRepTest/BRepTest_BasicCommands.cxx @@ -58,12 +58,6 @@ #include #include -#include -#include -#include -#include -#include - #include Standard_IMPORT Draw_Viewer dout; @@ -545,45 +539,49 @@ static Standard_Integer maxtolerance(Draw_Interpretor& theCommands, Standard_Integer nbF,nbE,nbV; TMF=TME=TMV=-RealLast(); TmF=TmE=TmV=RealLast(); - nbF=nbE=nbV=0; + + TopTools_MapOfShape mapS; + mapS.Clear(); - TopExp_Explorer ExF; - for(ExF.Init(TheShape,TopAbs_FACE); - ExF.More(); - ExF.Next()) { - TopoDS_Face Face=TopoDS::Face(ExF.Current()); + for(TopExp_Explorer ex(TheShape,TopAbs_FACE); + ex.More(); + ex.Next()) { + TopoDS_Face Face=TopoDS::Face(ex.Current()); T=BRep_Tool::Tolerance(Face); if(T>TMF) TMF=T; if(TTME) TME=T; if(TTMV) TMV=T; if(T ${tol} } { + puts "Error: bad value of minF" +} +if { [expr (abs (${maxF} - ${goodTol}) )] > ${tol} } { + puts "Error: bad value of maxF" +} +if { [expr (abs (${minE} - ${goodTol}) )] > ${tol} } { + puts "Error: bad value of minE" +} +if { [expr (abs (${maxE} - ${goodTol}) )] > ${tol} } { + puts "Error: bad value of maxE" +} +if { [expr (abs (${minV} - ${goodTol}) )] > ${tol} } { + puts "Error: bad value of minV" +} +if { [expr (abs (${maxV} - ${goodTol}) )] > ${tol} } { + puts "Error: bad value of maxV" +}