From: pkv Date: Thu, 11 Dec 2014 13:53:12 +0000 (+0300) Subject: 0025509: Wrong shape considered as valid by checkshape X-Git-Tag: V6_9_0_beta~233 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=949df2b64ba7a924ae600f2b5c0d72e9e38431e4;p=occt-copy.git 0025509: Wrong shape considered as valid by checkshape New features: 1. class BRepCheck_Solid The class is to check a solid per se. The scan area is: i. Shells that overlaps each other Status: BRepCheck_InvalidImbricationOfShells ii. Detached parts of the solid (vertices, edges) that have non-internal orientation Status: BRepCheck_BadOrientationOfSubshape iii. For closed, non-internal shells: iii.1 Shells containing entities of the solid that are outside towards the shells Status: BRepCheck_SubshapeNotInShape iii.2 Shells that encloses other Shells (for non-holes) Status: BRepCheck_EnclosedRegion Changes: 1. enumeration BRepCheck_Status members: InvalidImbricationOfShells, EnclosedRegion, has been added 2. class BRepCheck method: void BRepCheck::Print(const BRepCheck_Status stat, Standard_OStream& OS) has been modified to take into account II.1 3. class BRepCheck_Analyzer method: void BRepCheck_Analyzer::Put(const TopoDS_Shape& S, const Standard_Boolean B) has been modified to take into account I.1 4. class BRepTest function: void StructuralDump(Draw_Interpretor& theCommands, const BRepCheck_Analyzer &theAna, const Standard_CString ShName, const Standard_CString Pref, const TopoDS_Shape &theShape) has been modified to take into account I.1, II.1 Test cases for issue CR25509 Correction of test cases for issue CR25509 --- diff --git a/src/BRepCheck/BRepCheck.cdl b/src/BRepCheck/BRepCheck.cdl index 56519a352b..73f2bc028b 100644 --- a/src/BRepCheck/BRepCheck.cdl +++ b/src/BRepCheck/BRepCheck.cdl @@ -16,8 +16,8 @@ package BRepCheck - ---Purpose: This package provides tools to check the validity - -- of the BRep. + ---Purpose: This package provides tools to check the validity + -- of the BRep. uses MMgt, StdFail, @@ -41,9 +41,9 @@ is class Face; -- inherits Shape class Shell; -- inherits Shape - --- class Solid; -- inherits Shape - + + class Solid; + class Analyzer; @@ -87,6 +87,8 @@ is EmptyShell, RedundantFace, + -- for solids + InvalidImbricationOfShells, -- for shapes UnorientableShape, @@ -100,11 +102,14 @@ is InvalidPolygonOnTriangulation, - InvalidToleranceValue, - + InvalidToleranceValue, + + EnclosedRegion, + -- for exception CheckFail - + + end Status; @@ -113,16 +118,16 @@ is class DataMapOfShapeListOfStatus instantiates DataMap from TCollection (Shape from TopoDS, - ListOfStatus from BRepCheck, + ListOfStatus from BRepCheck, ShapeMapHasher from TopTools); - - + + class DataMapOfShapeResult instantiates DataMap from TCollection - (Shape from TopoDS, - Result from BRepCheck, + (Shape from TopoDS, + Result from BRepCheck, OrientedShapeMapHasher from TopTools); - - + + -- Package method Add(List: in out ListOfStatus from BRepCheck; @@ -134,7 +139,7 @@ is OS: in out OStream from Standard); SelfIntersection(W : Wire from TopoDS; - F : Face from TopoDS; + F : Face from TopoDS; E1 : out Edge from TopoDS; E2 : out Edge from TopoDS) returns Boolean from Standard; diff --git a/src/BRepCheck/BRepCheck.cxx b/src/BRepCheck/BRepCheck.cxx index 5bda9870bb..003f64e34c 100644 --- a/src/BRepCheck/BRepCheck.cxx +++ b/src/BRepCheck/BRepCheck.cxx @@ -29,7 +29,6 @@ //function : Add //purpose : //======================================================================= - void BRepCheck::Add(BRepCheck_ListOfStatus& lst, const BRepCheck_Status stat) { BRepCheck_ListIteratorOfListOfStatus it(lst); @@ -39,40 +38,32 @@ void BRepCheck::Add(BRepCheck_ListOfStatus& lst, const BRepCheck_Status stat) } else { if (it.Value() == stat) { - return; + return; } it.Next(); } } lst.Append(stat); } - - - //======================================================================= //function : SelfIntersection //purpose : //======================================================================= - Standard_Boolean BRepCheck::SelfIntersection(const TopoDS_Wire& W, - const TopoDS_Face& myFace, - TopoDS_Edge& RetE1, - TopoDS_Edge& RetE2) + const TopoDS_Face& myFace, + TopoDS_Edge& RetE1, + TopoDS_Edge& RetE2) { - Handle(BRepCheck_Wire) chkw = new BRepCheck_Wire(W); BRepCheck_Status stat = chkw->SelfIntersect(myFace,RetE1,RetE2); return (stat == BRepCheck_SelfIntersectingWire); } - - //======================================================================= //function : Print //purpose : //======================================================================= - void BRepCheck::Print(const BRepCheck_Status stat, - Standard_OStream& OS) + Standard_OStream& OS) { switch (stat) { @@ -181,7 +172,12 @@ void BRepCheck::Print(const BRepCheck_Status stat, case BRepCheck_InvalidToleranceValue: OS << "BRepCheck_InvalidToleranceValue\n"; break; - + case BRepCheck_InvalidImbricationOfShells: + OS << "BRepCheck_InvalidImbricationOfShells\n"; + break; + case BRepCheck_EnclosedRegion: + OS << "BRepCheck_EnclosedRegion\n"; + break; default: break; } diff --git a/src/BRepCheck/BRepCheck_Analyzer.cxx b/src/BRepCheck/BRepCheck_Analyzer.cxx index 9713af7d46..d34736f653 100644 --- a/src/BRepCheck/BRepCheck_Analyzer.cxx +++ b/src/BRepCheck/BRepCheck_Analyzer.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -33,13 +34,15 @@ #include #include + + + //======================================================================= //function : Init //purpose : //======================================================================= - void BRepCheck_Analyzer::Init(const TopoDS_Shape& S, - const Standard_Boolean B) + const Standard_Boolean B) { if (S.IsNull()) { Standard_NullObject::Raise(); @@ -49,16 +52,12 @@ void BRepCheck_Analyzer::Init(const TopoDS_Shape& S, Put(S,B); Perform(S); } - - - //======================================================================= //function : Put //purpose : //======================================================================= - void BRepCheck_Analyzer::Put(const TopoDS_Shape& S, - const Standard_Boolean B) + const Standard_Boolean B) { if (!myMap.IsBound(S)) { Handle(BRepCheck_Result) HR; @@ -82,6 +81,8 @@ void BRepCheck_Analyzer::Put(const TopoDS_Shape& S, HR = new BRepCheck_Shell(TopoDS::Shell(S)); break; case TopAbs_SOLID: + HR = new BRepCheck_Solid(TopoDS::Solid(S)); + break; case TopAbs_COMPSOLID: case TopAbs_COMPOUND: break; @@ -94,13 +95,10 @@ void BRepCheck_Analyzer::Put(const TopoDS_Shape& S, } } } - - //======================================================================= //function : Perform //purpose : //======================================================================= - void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S) { for(TopoDS_Iterator theIterator(S);theIterator.More();theIterator.Next()) @@ -118,7 +116,7 @@ void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S) // modified by NIZHNY-MKK Wed May 19 16:56:16 2004.BEGIN // There is no need to check anything. // if (myShape.IsSame(S)) { - // myMap(S)->Blind(); + // myMap(S)->Blind(); // } // modified by NIZHNY-MKK Wed May 19 16:56:23 2004.END @@ -393,43 +391,41 @@ void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S) break; case TopAbs_SHELL: - //modified by NIZNHY-PKV Mon Oct 13 14:23:53 2008f - //modified by NIZNHY-PKV Mon Oct 13 14:24:04 2008t break; case TopAbs_SOLID: { - exp.Init(S,TopAbs_SHELL); + exp.Init(S,TopAbs_SHELL); for (; exp.More(); exp.Next()) - { - const TopoDS_Shape& aShell=exp.Current(); - try - { - OCC_CATCH_SIGNALS - myMap(aShell)->InContext(S); - } - catch(Standard_Failure) { + const TopoDS_Shape& aShell=exp.Current(); + try + { + OCC_CATCH_SIGNALS + myMap(aShell)->InContext(S); + } + catch(Standard_Failure) + { #ifdef OCCT_DEBUG - cout<<"BRepCheck_Analyzer : "; - Standard_Failure::Caught()->Print(cout); - cout<Print(cout); + cout<SetFailStatus(S); - } - - // - Handle(BRepCheck_Result) aRes = myMap(aShell); - if (!aRes.IsNull() ) - { - aRes->SetFailStatus(exp.Current()); - aRes->SetFailStatus(S); - } - }//catch(Standard_Failure) - }//for (; exp.More(); exp.Next()) - } + if ( ! myMap(S).IsNull() ) + { + myMap(S)->SetFailStatus(S); + } + + // + Handle(BRepCheck_Result) aRes = myMap(aShell); + if (!aRes.IsNull() ) + { + aRes->SetFailStatus(exp.Current()); + aRes->SetFailStatus(S); + } + }//catch(Standard_Failure) + }//for (; exp.More(); exp.Next()) + } break;//case TopAbs_SOLID default: break; @@ -503,10 +499,10 @@ Standard_Boolean BRepCheck_Analyzer::ValidSub // for (TopExp_Explorer exp(S,SubType);exp.More(); exp.Next()) { const Handle(BRepCheck_Result)& RV = myMap(exp.Current()); for (RV->InitContextIterator(); - RV->MoreShapeInContext(); - RV->NextShapeInContext()) { + RV->MoreShapeInContext(); + RV->NextShapeInContext()) { if (RV->ContextualShape().IsSame(S)) { - break; + break; } } @@ -514,7 +510,7 @@ Standard_Boolean BRepCheck_Analyzer::ValidSub for (itl.Initialize(RV->StatusOnShape()); itl.More(); itl.Next()) { if (itl.Value() != BRepCheck_NoError) { - return Standard_False; + return Standard_False; } } } diff --git a/src/BRepCheck/BRepCheck_Solid.cdl b/src/BRepCheck/BRepCheck_Solid.cdl new file mode 100644 index 0000000000..432f779240 --- /dev/null +++ b/src/BRepCheck/BRepCheck_Solid.cdl @@ -0,0 +1,70 @@ +-- Created by: Peter KURNEV +-- Copyright (c) 2014 OPEN CASCADE SAS +-- +-- This file is part of Open CASCADE Technology software library. +-- +-- This library is free software; you can redistribute it and/or modify it under +-- the terms of the GNU Lesser General Public License version 2.1 as published +-- by the Free Software Foundation, with special exception defined in the file +-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +-- distribution for complete text of the license and disclaimer of any warranty. +-- +-- Alternatively, this file may be used under the terms of Open CASCADE +-- commercial license or contractual agreement. + + +class Solid from BRepCheck + inherits Result from BRepCheck + + ---Purpose: The class is to check a solid. + +uses + Shape from TopoDS, + Solid from TopoDS + +is + Create(theS: Solid from TopoDS) + returns Solid from BRepCheck; + ---Purpose: + -- Constructor + -- is the solid to check + + InContext(me: mutable; + theContextShape: Shape from TopoDS) + is redefined; + ---Purpose: + -- Checks the solid in context of + -- the shape + + Minimum(me: mutable) + is redefined; + ---Purpose: + -- Checks the solid per se. + -- + -- The scan area is: + -- 1. Shells that overlaps each other + -- Status: BRepCheck_InvalidImbricationOfShells + -- + -- 2. Detached parts of the solid (vertices, edges) + -- that have non-internal orientation + -- Status: BRepCheck_BadOrientationOfSubshape + -- + -- + -- 3. For closed, non-internal shells: + -- 3.1 Shells containing entities of the solid that + -- are outside towards the shells + -- Status: BRepCheck_SubshapeNotInShape + -- + -- 3.2 Shells that encloses other Shells + -- (for non-holes) + -- Status: BRepCheck_EnclosedRegion + -- + + Blind(me: mutable) + is redefined; + ---Purpose: + -- see the parent class for more details + +--fields + +end Solid; diff --git a/src/BRepCheck/BRepCheck_Solid.cxx b/src/BRepCheck/BRepCheck_Solid.cxx new file mode 100644 index 0000000000..170f142b59 --- /dev/null +++ b/src/BRepCheck/BRepCheck_Solid.cxx @@ -0,0 +1,315 @@ +// Created by: Peter KURNEV +// Copyright (c) 2014 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +// +#include +#include +// +#include +#include +// +#include +// +#include +// +#include +#include +#include +#include +#include +#include +// +#include +// +#include +#include +// +#include +// +#include +#include + + +DEFINE_STANDARD_HANDLE(BRepCheck_HSC, MMgt_TShared); +//======================================================================= +//class : BRepCheck_HSC +//purpose : +//======================================================================= +class BRepCheck_HSC : public MMgt_TShared { + public: + // + Standard_EXPORT + BRepCheck_HSC(){ + }; + // + Standard_EXPORT + virtual ~BRepCheck_HSC(){ + }; + // + Standard_EXPORT + BRepClass3d_SolidClassifier& SolidClassifier(){ + return mySC; + }; + // + DEFINE_STANDARD_RTTI(BRepCheck_HSC); + + protected: + BRepClass3d_SolidClassifier mySC; +}; +IMPLEMENT_STANDARD_HANDLE(BRepCheck_HSC, MMgt_TShared); +IMPLEMENT_STANDARD_RTTIEXT(BRepCheck_HSC, MMgt_TShared); +// +//======================================================================= +//class : BRepCheck_ToolSolid +//purpose : +//======================================================================= +class BRepCheck_ToolSolid { + + public: + DEFINE_STANDARD_ALLOC + + BRepCheck_ToolSolid() { + myIsHole=Standard_False; + myPnt.SetCoord(-1.,-1.,-1.); + }; + + virtual ~BRepCheck_ToolSolid() { + }; + // + void SetSolid(const TopoDS_Solid& aZ) { + mySolid=aZ; + }; + // + const TopoDS_Solid& Solid()const { + return mySolid; + }; + // + Standard_Boolean IsHole() const { + return myIsHole; + }; + // + const gp_Pnt& InnerPoint() { + return myPnt; + } + // + // IsOut + Standard_Boolean IsOut(BRepCheck_ToolSolid& aOther) { + Standard_Boolean bFlag; + TopAbs_State aState; + // + BRepClass3d_SolidClassifier& aSC=myHSC->SolidClassifier(); + // + aSC.Perform(aOther.myPnt, ::RealSmall()); + aState=aSC.State(); + bFlag=(aState==TopAbs_OUT); + // + return bFlag; + }; + // + // Init + void Init() { + Standard_Real aT, aT1, aT2, aPAR_T; + TopExp_Explorer aExp; + // + // 0.myHSC + myHSC=new BRepCheck_HSC(); + // + BRepClass3d_SolidClassifier& aSC=myHSC->SolidClassifier(); + // 1. Load + aSC.Load(mySolid); + // + // 2. myIsHole + aSC.PerformInfinitePoint(::RealSmall()); + myIsHole=(aSC.State()==TopAbs_IN); + // + // 3. myPnt + aPAR_T=0.43213918; // 10*e^(-PI) + aExp.Init(mySolid, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + const TopoDS_Edge& aE=*((TopoDS_Edge*)&aExp.Current()); + if (!BRep_Tool::Degenerated(aE)) { + Handle(Geom_Curve) aC3D=BRep_Tool::Curve(aE, aT1, aT2); + aT=(1.-aPAR_T)*aT1 + aPAR_T*aT2; + myPnt=aC3D->Value(aT); + break; + } + } + }; + // + protected: + Standard_Boolean myIsHole; + gp_Pnt myPnt; + TopoDS_Solid mySolid; + Handle(BRepCheck_HSC) myHSC; +}; +// +typedef NCollection_Vector + BRepCheck_VectorOfToolSolid; +// + +//======================================================================= +//function : BRepCheck_Solid +//purpose : +//======================================================================= +BRepCheck_Solid::BRepCheck_Solid (const TopoDS_Solid& S) +{ + Init(S); +} +//======================================================================= +//function : Blind +//purpose : +//======================================================================= +void BRepCheck_Solid::Blind() +{ + if (!myBlind) { + // nothing more than in the minimum + myBlind = Standard_True; + } +} +//======================================================================= +//function : InContext +//purpose : +//======================================================================= +void BRepCheck_Solid::InContext(const TopoDS_Shape& ) +{ +} +//======================================================================= +//function : Minimum +//purpose : +//======================================================================= +void BRepCheck_Solid::Minimum() +{ + if (myMin) { + return; + } + myMin = Standard_True; + // + Standard_Boolean bFound, bIsHole, bFlag; + Standard_Integer i, j, aNbVTS, aNbVTS1; + TopoDS_Solid aZ; + TopoDS_Iterator aIt, aItF; + TopoDS_Builder aBB; + TopExp_Explorer aExp; + TopTools_MapOfShape aMSS; + TopAbs_Orientation aOr; + BRepCheck_VectorOfToolSolid aVTS; + BRepCheck_ListOfStatus thelist; + // + myMap.Bind(myShape, thelist); + BRepCheck_ListOfStatus& aLST = myMap(myShape); + aLST.Append(BRepCheck_NoError); + // + //------------------------------------------------- + // 1. InvalidImbricationOfShells + bFound=Standard_False; + aExp.Init(myShape, TopAbs_FACE); + for (; !bFound && aExp.More(); aExp.Next()) { + const TopoDS_Shape& aF=aExp.Current(); + if (!aMSS.Add(aF)) { + BRepCheck::Add(myMap(myShape), + BRepCheck_InvalidImbricationOfShells); + bFound=!bFound; + } + } + // + //------------------------------------------------- + // 2. + // - Too many growths, + // - There is smt of the solid that is out of solid + aIt.Initialize(myShape); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aSx=aIt.Value(); + // + if (aSx.ShapeType()!=TopAbs_SHELL) { + aOr=aSx.Orientation(); + if (aOr!=TopAbs_INTERNAL) { + BRepCheck::Add(myMap(myShape), + BRepCheck_BadOrientationOfSubshape); + } + continue; + } + // + const TopoDS_Shell& aSh=*((TopoDS_Shell*)&aSx); + // + // Skip internal shells + bFound=Standard_False; + aItF.Initialize(aSh); + for (; !bFound && aItF.More(); aItF.Next()) { + const TopoDS_Shape& aF=aItF.Value(); + aOr=aF.Orientation(); + if (aOr==TopAbs_INTERNAL) { + bFound=!bFound; + } + } + if (bFound) { + continue; + } + // + // Skip not closed shells + if (!BRep_Tool::IsClosed(aSh)) { + continue; + } + // + aBB.MakeSolid(aZ); + aBB.Add(aZ, aSh); + // + BRepCheck_ToolSolid aTS; + // + aTS.SetSolid(aZ); + aVTS.Append(aTS); + }//for (; aIt.More(); aIt.Next()) { + // + aNbVTS=aVTS.Size(); + if (aNbVTS<2) { + return; + } + // + aNbVTS1=0; + for (i=0; i1) { + // Too many growths + BRepCheck::Add(myMap(myShape), + BRepCheck_EnclosedRegion); + break; + } + } + } + // + bFound=Standard_False; + aNbVTS1=aNbVTS-1; + for (i=0; !bFound && iValue(aProblemID)>0) theCommands<<" Invalid polygon on triangulation.......... "<Value(aProblemID)<<"\n"; + aProblemID = static_cast(BRepCheck_InvalidImbricationOfShells); + if(NbProblems->Value(aProblemID)>0) + theCommands<<" Invalid Imbrication of Shells............. "<Value(aProblemID)<<"\n"; + + aProblemID = static_cast(BRepCheck_EnclosedRegion); + if(NbProblems->Value(aProblemID)>0) + theCommands<<" Enclosed Region........................... "<Value(aProblemID)<<"\n"; + aProblemID = static_cast(BRepCheck_CheckFail); if(NbProblems->Value(aProblemID)>0) theCommands<<" checkshape failure........................ "<Value(aProblemID)<<"\n"; + + theCommands<<" ------------------------------------------------"<<"\n"; theCommands<<"*** Shapes with problems : "<Length()<<"\n"; diff --git a/tests/bugs/modalg_5/bug25509_1 b/tests/bugs/modalg_5/bug25509_1 new file mode 100755 index 0000000000..473d9a1117 --- /dev/null +++ b/tests/bugs/modalg_5/bug25509_1 @@ -0,0 +1,30 @@ +puts "============" +puts "OCC25509" +puts "============" +puts "" +###################################################### +# Wrong shape considered as valid by checkshape +###################################################### + +# 01 +# A solid with 2 shells that are regular +# and the SAME +# + +box b 10 10 10 +explode b +shape result so +add b_1 result +add b_1 result + +decho off +set info [checkshape result] +decho on + +if { [regexp "Faulty shapes in variables faulty_1" ${info}] != 1 } { + puts "Error : There are no mistakes by checkshape-command" +} else { + puts "OK : There are mistakes by checkshape-command" +} + +set 2dviewer 1 diff --git a/tests/bugs/modalg_5/bug25509_2 b/tests/bugs/modalg_5/bug25509_2 new file mode 100755 index 0000000000..7f3f0487ca --- /dev/null +++ b/tests/bugs/modalg_5/bug25509_2 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC25509" +puts "============" +puts "" +###################################################### +# Wrong shape considered as valid by checkshape +###################################################### + +# 02 Inverted solid with 3 shells growth + 2 holes +# +# +restore [locate_data_file bug25509_r7.brep] result +invert result + +decho off +set info [checkshape result] +decho on + +if { [regexp "Faulty shapes in variables faulty_1" ${info}] != 1 } { + puts "Error : There are no mistakes by checkshape-command" +} else { + puts "OK : There are mistakes by checkshape-command" +} + +set 2dviewer 1 diff --git a/tests/bugs/modalg_5/bug25509_3 b/tests/bugs/modalg_5/bug25509_3 new file mode 100755 index 0000000000..91c951710c --- /dev/null +++ b/tests/bugs/modalg_5/bug25509_3 @@ -0,0 +1,29 @@ +puts "============" +puts "OCC25509" +puts "============" +puts "" +###################################################### +# Wrong shape considered as valid by checkshape +###################################################### + +# 03. A solid with 2 growths +box b1 10 10 10 +box b2 4 4 4 4 4 4 +explode b1 +explode b2 + +shape result so +add b1_1 result +add b2_1 result + +decho off +set info [checkshape result] +decho on + +if { [regexp "Faulty shapes in variables faulty_1" ${info}] != 1 } { + puts "Error : There are no mistakes by checkshape-command" +} else { + puts "OK : There are mistakes by checkshape-command" +} + +set 2dviewer 1 diff --git a/tests/bugs/modalg_5/bug25509_4 b/tests/bugs/modalg_5/bug25509_4 new file mode 100755 index 0000000000..37a6bdf831 --- /dev/null +++ b/tests/bugs/modalg_5/bug25509_4 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC25509" +puts "============" +puts "" +###################################################### +# Wrong shape considered as valid by checkshape +###################################################### + +# 04 +# An edge FORWARD of the solid that is out of the growth +# +box b1 10 10 10 + +explode b1 + +vertex v1 11 11 0 +vertex v2 11 11 11 +edge e2 v1 v2 + +shape result so +add b1_1 result +add e2 result + +decho off +set info [checkshape result] +decho on + +if { [regexp "Faulty shapes in variables faulty_1" ${info}] != 1 } { + puts "Error : There are no mistakes by checkshape-command" +} else { + puts "OK : There are mistakes by checkshape-command" +} + +set 2dviewer 1 diff --git a/tests/bugs/modalg_5/bug25509_5 b/tests/bugs/modalg_5/bug25509_5 new file mode 100755 index 0000000000..b8ca0876f2 --- /dev/null +++ b/tests/bugs/modalg_5/bug25509_5 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC25509" +puts "============" +puts "" +###################################################### +# Wrong shape considered as valid by checkshape +###################################################### + +# 05 +# Two vertices FORWARD of the solid that is out of the growth +# +box b1 10 10 10 + +explode b1 + +vertex v1 11 11 0 +vertex v2 11 11 11 + +shape result so +add b1_1 result +add v1 result +add v2 result + +decho off +set info [checkshape result] +decho on + +if { [regexp "Faulty shapes in variables faulty_1" ${info}] != 1 } { + puts "Error : There are no mistakes by checkshape-command" +} else { + puts "OK : There are mistakes by checkshape-command" +} + +set 2dviewer 1 diff --git a/tests/bugs/modalg_5/bug25509_6 b/tests/bugs/modalg_5/bug25509_6 new file mode 100755 index 0000000000..4b1f7fab02 --- /dev/null +++ b/tests/bugs/modalg_5/bug25509_6 @@ -0,0 +1,47 @@ +puts "============" +puts "OCC25509" +puts "============" +puts "" +###################################################### +# Wrong shape considered as valid by checkshape +###################################################### + +# 06 +# Solid with Two vertices FORWARD that are out of the growth +# Solid with 2 growths +# Solid with 2 shells with imbrications +# + +box b1 10 10 10 + +explode b1 + +vertex v1 11 11 0 +vertex v2 11 11 11 + +box b3 3 3 3 4 4 4 +explode b3 + +explode b1_1 +orientation b1_1_1 I +shape x sh +add b1_1_1 x + +shape result so +add b1_1 result +add v1 result +add v2 result +add b3_1 result +add x result + +decho off +set info [checkshape result] +decho on + +if { [regexp "Faulty shapes in variables faulty_1" ${info}] != 1 } { + puts "Error : There are no mistakes by checkshape-command" +} else { + puts "OK : There are mistakes by checkshape-command" +} + +set 2dviewer 1 diff --git a/tests/bugs/modalg_5/bug25509_7 b/tests/bugs/modalg_5/bug25509_7 new file mode 100755 index 0000000000..8962fe2d08 --- /dev/null +++ b/tests/bugs/modalg_5/bug25509_7 @@ -0,0 +1,21 @@ +puts "============" +puts "OCC25509" +puts "============" +puts "" +###################################################### +# Wrong shape considered as valid by checkshape +###################################################### + +restore [locate_data_file bug25509_Aggreg_4.brep] result + +decho off +set info [checkshape result] +decho on + +if { [regexp "Faulty shapes in variables faulty_1" ${info}] != 1 } { + puts "Error : There are no mistakes by checkshape-command" +} else { + puts "OK : There are mistakes by checkshape-command" +} + +set 2dviewer 1 diff --git a/tests/bugs/modalg_5/bug25509_8 b/tests/bugs/modalg_5/bug25509_8 new file mode 100755 index 0000000000..9a826f5c6c --- /dev/null +++ b/tests/bugs/modalg_5/bug25509_8 @@ -0,0 +1,21 @@ +puts "============" +puts "OCC25509" +puts "============" +puts "" +###################################################### +# Wrong shape considered as valid by checkshape +###################################################### + +restore [locate_data_file bug25509_r_6.brep] result + +decho off +set info [checkshape result] +decho on + +if { [regexp "Faulty shapes in variables faulty_1" ${info}] != 1 } { + puts "Error : There are no mistakes by checkshape-command" +} else { + puts "OK : There are mistakes by checkshape-command" +} + +set 2dviewer 1 diff --git a/tests/bugs/step/bug24055 b/tests/bugs/step/bug24055 index 11f21c6d9d..22292b1ba6 100644 --- a/tests/bugs/step/bug24055 +++ b/tests/bugs/step/bug24055 @@ -1,3 +1,5 @@ +puts "TODO OCC25555 ALL: Faulty shapes in variables faulty_1 to faulty_" + puts "============" puts "OCC24055" puts "============" diff --git a/tests/bugs/step/bug55 b/tests/bugs/step/bug55 index 4785268388..eda4ba3184 100755 --- a/tests/bugs/step/bug55 +++ b/tests/bugs/step/bug55 @@ -1,3 +1,5 @@ +puts "TODO OCC25583 ALL: Faulty shapes in variables faulty_1 to faulty_" + puts "========================" puts " OCC55 " puts "========================" diff --git a/tests/de/step_3/D9 b/tests/de/step_3/D9 old mode 100644 new mode 100755 index 404b9244d1..e15b695983 --- a/tests/de/step_3/D9 +++ b/tests/de/step_3/D9 @@ -1,13 +1,13 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: STATSHAPE : Faulty" -set LinuxDiff 3 + set filename 53921163S0.stp set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) TPSTAT : Faulties = 0 ( 0 ) Warnings = 17 ( 27 ) Summary = 17 ( 27 ) -CHECKSHAPE : Wires = 6 ( 7 ) Faces = 6 ( 9 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) +CHECKSHAPE : Wires = 6 ( 7 ) Faces = 6 ( 9 ) Shells = 0 ( 0 ) Solids = 1 ( 1 ) NBSHAPES : Solid = 1 ( 1 ) Shell = 3 ( 3 ) Face = 558 ( 556 ) Summary = 3668 ( 3661 ) STATSHAPE : Solid = 1 ( 1 ) Shell = 3 ( 3 ) Face = 558 ( 556 ) FreeWire = 0 ( 0 ) FreeEdge = 0 ( 0 ) SharedEdge = 1527 ( 1526 ) TOLERANCE : MaxTol = 60.79282309 ( 60.87483475 ) AvgTol = 1.272227708 ( 1.266017009 )