X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FMeshTest%2FMeshTest.cxx;h=103ffc6988fc224d7299bb5403f68af41635371a;hp=cb030ebc651c76ca7909c18d2a712af5083930ba;hb=7693827d4a3127ac7e571af418a9fcdd42551ce3;hpb=97f3106c05d5052297bac39ed571c85c0ac32350 diff --git a/src/MeshTest/MeshTest.cxx b/src/MeshTest/MeshTest.cxx index cb030eb..103ffc6 100644 --- a/src/MeshTest/MeshTest.cxx +++ b/src/MeshTest/MeshTest.cxx @@ -81,6 +81,7 @@ #include #include #include +#include //epa Memory leaks test @@ -1590,6 +1591,31 @@ Standard_Integer triedgepoints(Draw_Interpretor& di, Standard_Integer nbarg, con } //======================================================================= +//function : correctnormals +//purpose : Corrects normals in shape triangulation nodes (...) +//======================================================================= +Standard_Integer correctnormals (Draw_Interpretor& theDI, + Standard_Integer /*theNArg*/, + const char** theArgVal) +{ + TopoDS_Shape S = DBRep::Get(theArgVal[1]); + + //Use "correctnormals shape" + + + if(!BRepLib::EnsureNormalConsistency(S)) + { + theDI << "Normals have not been changed!\n"; + } + else + { + theDI << "Some corrections in source shape have been made!\n"; + } + + return 0; +} + +//======================================================================= void MeshTest::Commands(Draw_Interpretor& theCommands) //======================================================================= { @@ -1623,6 +1649,8 @@ void MeshTest::Commands(Draw_Interpretor& theCommands) theCommands.Add("onetriangulation","onetriangulation name",__FILE__, onetriangulation, g); theCommands.Add("triepoints", "triepoints shape1 [shape2 ...]",__FILE__, triedgepoints, g); + theCommands.Add("correctnormals", "correctnormals shape",__FILE__, correctnormals, g); + #if 0 theCommands.Add("extrema","extrema ",__FILE__, extrema, g); theCommands.Add("vb","vb ",__FILE__, vb, g);