From 6833ee2b3e774239b93e4d3ea1b2c3c9dfde61d3 Mon Sep 17 00:00:00 2001 From: skv Date: Fri, 4 Apr 2014 10:44:39 +0400 Subject: [PATCH] 0022373: EDF 2691 GEOM: Publish the shapes with error in Check Shape --- doc/salome/examples/check_shape.py | 3 +- doc/salome/gui/GEOM/images/measures9.png | Bin 16618 -> 26026 bytes doc/salome/gui/GEOM/input/check_shape.doc | 33 +- idl/GEOM_Gen.idl | 93 ++- src/GEOMGUI/GEOM_msg_en.ts | 183 ++++- src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx | 776 +++++++++--------- src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx | 52 +- src/GEOM_I/GEOM_Gen_i.cc | 1 + src/GEOM_I/GEOM_Gen_i.hh | 1 + src/GEOM_I/GEOM_IMeasureOperations_i.cc | 354 +++++++- src/GEOM_I/GEOM_IMeasureOperations_i.hh | 14 +- src/GEOM_SWIG/GEOM_TestMeasures.py | 3 +- src/GEOM_SWIG/geomBuilder.py | 70 +- src/MeasureGUI/CMakeLists.txt | 1 + ...sureGUI_1Sel1Check1TextView2ListBox_QTD.ui | 138 ++++ .../MeasureGUI_CheckCompoundOfBlocksDlg.cxx | 16 +- src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx | 527 +++++++++++- src/MeasureGUI/MeasureGUI_CheckShapeDlg.h | 32 +- src/MeasureGUI/MeasureGUI_Widgets.cxx | 15 + src/MeasureGUI/MeasureGUI_Widgets.h | 16 + 20 files changed, 1803 insertions(+), 525 deletions(-) mode change 100644 => 100755 src/GEOM_I/GEOM_Gen_i.cc create mode 100644 src/MeasureGUI/MeasureGUI_1Sel1Check1TextView2ListBox_QTD.ui diff --git a/doc/salome/examples/check_shape.py b/doc/salome/examples/check_shape.py index 30793345e..a0e728967 100644 --- a/doc/salome/examples/check_shape.py +++ b/doc/salome/examples/check_shape.py @@ -8,8 +8,9 @@ geompy = geomBuilder.New(salome.myStudy) # create a box box = geompy.MakeBoxDXDYDZ(100,30,100) -IsValid = geompy.CheckShape(box) +(IsValid, err) = geompy.CheckShape(box, 0, 2) if IsValid == 0: + geompy.PrintShapeError(box, err) raise RuntimeError, "Invalid box created" else: print "\nBox is valid" diff --git a/doc/salome/gui/GEOM/images/measures9.png b/doc/salome/gui/GEOM/images/measures9.png index 38a29bb171abc2e51a1c41814920cb1d69b987da..c5d7d331d33658ff289db3a69b01c143c9208a1b 100755 GIT binary patch literal 26026 zcmbSz1yogCyDk_YAfTkQh=82mzVB0$04WI}WJFv<7#J92;jjEMFfg#u;A`{+95^yWzqbqifwhql z;)5v~#NPrh;B-WV_+cI%|Nd^wjsQmxEWaw-z`&riKYqbRQK8_0gYdS(;sWr{XHSvf zUMRv6dV@nawgO7FUo6bb^vrExzF6yN+vtJMS_*O_*TuSi=3N{SPTNq*f&vK5l zyATJpsI!NMqb?j%0sL+(HGe9H=d|N;_)#PV=k%Ev;<7)=EaFIPNVSaDKM1ko7P-@i zk41aBWYp??5QWw2{%JLMfV$lM<0(GI%QL%X$Y6-gpq=``j$31~&0xgEjhk=UQfnsL zy|YBnE4~*;-*r+-ogQkQ)m;sg5YpHPd|{8o#?w z@8bU-e zSCeq^YvL^Hr#a5;E0s={o-vf~FSD|5!g`Wcufj*i1;Ek#o_L~C!Zf9mr!YFn9D0~A zAzULH(qE5jZCw$YV`G(<&iVZWDO10}BBCW08 z2Bha3;<`J=1Jnif-EgI{eMD=<--DrJlML zF*Z7LwMB_OlxUy0gX@ttld>){95LJ51 zT)TL)TqmQA9x&Hj12Z0jV~wgp&~qXI9T^64iKNu}YV3Q9(8W26=9auVFKIJH6*r_? z8)xhpTuzM(0wdcyQIqs83MI4%^YB<((F@P`Bw3ZAdTXz>8Cu=m`Qzb~9i)lk3Yc!) z(a5k%!~1Wu73W%OWz~*15IuZerynSL@nwe41SOSto85LNsFQ_LxGoEi5=K%AUa`11 zt<#gT5R)hCS-ALx7AL_jaAxs!S}Vh^E7egM%17CqEa7=~uOgc17Wnc%cFc@KXHc_J z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c8A{^qCw$cVwrykzM*dvy=Evb^jClFJVbx8_r+dM`?`aZIhym zvOVeZTFi=st=zRnTA%g`GCI-l7)&=~^Tv}C6DizIozbX7WnMI`qX=F*x_Q+p{dSuqq)A`O$k?|G4pi#pB~&>Z7;?s9!Y{?du251^LN+!M zvTF-#Ef=xzH|&!Z=<=zIx9O5y$-?wGEs}5biDz4b8SmeRha!T&>4i@;m=!^=%?pVB z0L&=llHfeMtHYtLs}mZAmP~}_d9RigX?$Y|E?J_R_&j;E)A@9B<;bEl>LkBbVZ-XT0+}M)e`69Ssc-Wt1ep?$y;t12b z31~@hweV^(Jh}ZPW+X-*R|W`HGN5x{FC8Result: Boolean. -\n TUI Command: geompy.CheckShape(theShape, theIsCheckGeom = 0), -where \em theShape is the shape checked for validity. - +\n Result: Boolean; highlight in the viewer. +\n TUI Commands: +

    +
  • +geompy.CheckShape(theShape, theIsCheckGeom = 0, theReturnStatus = 0), \n +where \n +\em theShape is the shape checked for validity. \n +\em theIsCheckGeom is the flag that tells if geometry should be checked also.\n +\em theReturnStatus is the flag that can have the following values: +
      +
    • 0 - Means that if theShape is invalid, a description of problem is printed. +IsValid status is returned.
    • +
    • 1 - Means that IsValid status and the description of problem are returned.
    • +
    • 2 - Means that IsValid status and the list of error data are returned.
    • +
    +
  • +
  • +geompy.PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0), \n +where \n +\em theShape Shape that was checked. \n +\em theShapeErrors the shape errors obtained by CheckShape. \n +\em theReturnStatus is the flag that can have the following values: +
      +
    • 0 - Means that a description of problem is printed. +IsValid status is returned.
    • +
    • 1 - Means that the description of problem is returned.
    • +
    +
  • +
See also a \ref tui_check_shape_page "TUI example". \image html measures9.png diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl index 9950494cb..ecf0308db 100644 --- a/idl/GEOM_Gen.idl +++ b/idl/GEOM_Gen.idl @@ -4002,23 +4002,104 @@ module GEOM out double EdgeMin, out double EdgeMax, out double VertMin, out double VertMax); + /*! + * \brief Enumeration of Shape defects coming from CheckShape algorithms. + */ + enum ShapeErrorType + { + /* for vertices */ + InvalidPointOnCurve, + InvalidPointOnCurveOnSurface, + InvalidPointOnSurface, + + /* for edges */ + No3DCurve, + Multiple3DCurve, + Invalid3DCurve, + NoCurveOnSurface, + InvalidCurveOnSurface, + InvalidCurveOnClosedSurface, + InvalidSameRangeFlag, + InvalidSameParameterFlag, + InvalidDegeneratedFlag, + + FreeEdge, + InvalidMultiConnexity, + InvalidRange, + + /* for wires */ + EmptyWire, + RedundantEdge, + SelfIntersectingWire, /* on a face */ + + /* for faces */ + NoSurface, + InvalidWire, + RedundantWire, + IntersectingWires, + InvalidImbricationOfWires, + + /* for shells */ + EmptyShell, + RedundantFace, + + /* for shapes */ + UnorientableShape, + NotClosed, + NotConnected, + + SubshapeNotInShape, + + BadOrientation, + BadOrientationOfSubshape, + + InvalidToleranceValue, + + /* for exception */ + CheckFail + }; + + /*! + * \brief Description of a shape defect: type and incriminated sub-shapes. + */ + struct ShapeError + { + ShapeErrorType error; + ListOfLong incriminated; + }; + + /*! + * \brief Sequence of all shape defects. + */ + typedef sequence ShapeErrors; + /*! * \brief Check a topology of the given shape. * \param theShape Shape to check validity of. - * \param theDescription Output. Description of problems in the shape, if they are. + * \param theErrors Structure, containing discovered errors and incriminated sub-shapes. * \return TRUE, if the shape "seems to be valid" from the topological point of view. */ - boolean CheckShape (in GEOM_Object theShape, - out string theDescription); + boolean CheckShape (in GEOM_Object theShape, + out ShapeErrors theErrors); /*! * \brief Check a topology and a geometry of the given shape. * \param theShape Shape to check validity of. - * \param theDescription Output. Description of problems in the shape, if they are. + * \param theErrors Structure, containing discovered errors and incriminated sub-shapes. * \return TRUE, if the shape "seems to be valid". */ - boolean CheckShapeWithGeometry (in GEOM_Object theShape, - out string theDescription); + boolean CheckShapeWithGeometry (in GEOM_Object theShape, + out ShapeErrors theErrors); + + /*! + * \brief Convert sequence of shape errors, returned by + * CheckShape() or CheckShapeWithGeometry(), into string. + * \param theShape the invalid shape. + * \param theErrors The sequence of \a theShape errors. + * \return String, describing all the errors in form, suitable for printing. + */ + string PrintShapeErrors (in GEOM_Object theShape, + in ShapeErrors theErrors); /*! * \brief Check a topology of the given shape on self-intersections presence. diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index 35cf49d7f..797c629ff 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -375,6 +375,26 @@ Please, select face, shell or solid and try again GEOM_CHECK_BLOCKS_COMPOUND_SUBSHAPES Incriminated Sub-shapes + + GEOM_CHECK_BLOCKS_NOT_BLOCK + Not a Block + + + GEOM_CHECK_BLOCKS_EXTRA_EDGE + Extra Edge + + + GEOM_CHECK_BLOCKS_INVALID_CONNECTION + Invalid Connection # %1 + + + GEOM_CHECK_BLOCKS_NOT_CONNECTED + Not Connected + + + GEOM_CHECK_BLOCKS_NOT_GLUED + Not Glued # %1 + GEOM_GETNONBLOCKS_TITLE Get non-hexahedral solids and non-quadrangular faces @@ -391,14 +411,6 @@ Please, select face, shell or solid and try again GEOM_CHECK_INFOS Object And Its Topological Information - - GEOM_CHECK_SHAPE - Check Shape - - - GEOM_CHECK_TITLE - Check Shape Information - GEOM_CHECK_SELF_INTERSECTIONS Detect Self-intersections @@ -6314,6 +6326,161 @@ Do you want to continue? Please specify suitable arguments. + + MeasureGUI_CheckShapeDlg + + GEOM_CHECK_TITLE + Check Shape Information + + + GEOM_CHECK_SHAPE + Check Shape + + + GEOM_CHECK_SHAPE_NAME + Faulty + + + GEOM_CHECK_SHAPE_VALID + This Shape seems to be valid + + + GEOM_CHECK_SHAPE_NOT_VALID + This Shape has errors: + + + CHECK_ERROR_INVALID_POINT_ON_CURVE + Invalid Point on Curve + + + CHECK_ERROR_INVALID_POINT_ON_CURVE_ON_SURFACE + Invalid Point on Curve on Surface + + + CHECK_ERROR_INVALID_POINT_ON_SURFACE + Invalid Point on Surface + + + CHECK_ERROR_NO_3D_CURVE + No 3D Curve + + + CHECK_ERROR_MULTIPLE_3D_CURVE + Multiple 3D Curve + + + CHECK_ERROR_INVALID_3D_CURVE + Invalid 3D Curve + + + CHECK_ERROR_NO_CURVE_ON_SURFACE + No Curve on Surface + + + CHECK_ERROR_INVALID_CURVE_ON_SURFACE + Invalid Curve on Surface + + + CHECK_ERROR_INVALID_CURVE_ON_CLOSED_SURFACE + Invalid Curve on Closed Surface + + + CHECK_ERROR_INVALID_SAME_RANGE_FLAG + Invalid Same Range Flag + + + CHECK_ERROR_INVALID_SAME_PARAMETER_FLAG + Invalid Same Parameter Flag + + + CHECK_ERROR_INVALID_DEGENERATED_FLAG + Invalid Degenerated Flag + + + CHECK_ERROR_FREE_EDGE + Free Edge + + + CHECK_ERROR_INVALID_MULTI_CONNEXITY + Invalid Multi Connexity + + + CHECK_ERROR_INVALID_RANGE + Invalid Range + + + CHECK_ERROR_EMPTY_WIRE + Empty Wire + + + CHECK_ERROR_REDUNDANT_EDGE + Redundant Edge + + + CHECK_ERROR_SELF_INTERSECTING_WIRE + Self-Intersecting Wire + + + CHECK_ERROR_NO_SURFACE + No Surface + + + CHECK_ERROR_INVALID_WIRE + Invalid Wire + + + CHECK_ERROR_REDUNDANT_WIRE + Redundant Wire + + + CHECK_ERROR_INTERSECTING_WIRES + Intersecting Wires + + + CHECK_ERROR_INVALID_IMBRICATION_OF_WIRES + Invalid Imbrication of Wires + + + CHECK_ERROR_EMPTY_SHELL + Empty Shell + + + CHECK_ERROR_REDUNDANT_FACE + Redundant Face + + + CHECK_ERROR_UNORIENTABLE_SHAPE + Unorientable Shape + + + CHECK_ERROR_NOT_CLOSED + Not Closed + + + CHECK_ERROR_NOT_CONNECTED + Not Connected + + + CHECK_ERROR_SUBSHAPE_NOT_IN_SHAPE + Subshape not in Shape + + + CHECK_ERROR_BAD_ORIENTATION + Bad Orientation + + + CHECK_ERROR_BAD_ORIENTATION_OF_SUBSHAPE + Bad Orientation of Subshape + + + CHECK_ERROR_INVALID_TOLERANCE_VALUE + Invalid Tolerance Value + + + CHECK_ERROR_CHECK_FAIL + Check Fail + + OperationGUI_ChamferDlg diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index 5a191cd6b..bc7111cb2 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -20,96 +20,56 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include - #include - -#include -#include #include -#include +#include +#include #include -#include +#include +#include #include -#include #include -#include - #include -#include -#include // OCCT Includes -#include -#include -#include -#include - +#include +#include +#include +#include +#include #include -#include -#include -#include -#include #include -#include +#include #include -#include #include #include #include #include #include #include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include +#include +#include #include #include - -#include - -#include -#include - #include #include - #include #include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC //============================================================================= @@ -1298,11 +1258,12 @@ void GEOMImpl_IMeasureOperations::GetTolerance * CheckShape */ //============================================================================= -bool GEOMImpl_IMeasureOperations::CheckShape (Handle(GEOM_Object) theShape, - const Standard_Boolean theIsCheckGeom, - TCollection_AsciiString& theDump) +bool GEOMImpl_IMeasureOperations::CheckShape (Handle(GEOM_Object) theShape, + const Standard_Boolean theIsCheckGeom, + std::list &theErrors) { SetErrorCode(KO); + theErrors.clear(); if (theShape.IsNull()) return false; @@ -1323,10 +1284,9 @@ bool GEOMImpl_IMeasureOperations::CheckShape (Handle(GEOM_Object) theShape, #endif BRepCheck_Analyzer ana (aShape, theIsCheckGeom); if (ana.IsValid()) { - theDump.Clear(); isValid = true; } else { - StructuralDump(ana, aShape, theDump); + FillErrors(ana, aShape, theErrors); } } catch (Standard_Failure) { @@ -1339,6 +1299,223 @@ bool GEOMImpl_IMeasureOperations::CheckShape (Handle(GEOM_Object) theShape, return isValid; } +//============================================================================= +/*! + * PrintShapeErrors + */ +//============================================================================= +TCollection_AsciiString GEOMImpl_IMeasureOperations::PrintShapeErrors + (Handle(GEOM_Object) theShape, + const std::list &theErrors) +{ + TCollection_AsciiString aDump; + + if (theShape.IsNull()) { + return aDump; + } + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + + if (aRefShape.IsNull()) { + return aDump; + } + + TopoDS_Shape aShape = aRefShape->GetValue(); + + if (aShape.IsNull()) { + SetErrorCode("The Objects has NULL Shape"); + return aDump; + } + + if (!theErrors.empty()) { + // The shape is not valid. Prepare errors for dump. + TopTools_IndexedMapOfShape anIndices; + std::list::const_iterator anIter = theErrors.begin(); + Standard_Integer nbv, nbe, nbw, nbf, nbs, nbo; + nbv = nbe = nbw = nbf = nbs = nbo = 0; + + // Map sub-shapes and their indices + TopExp::MapShapes(aShape, anIndices); + + const Standard_Integer aNbSubShapes = anIndices.Extent(); + TColStd_MapOfInteger aMapPbInd; + + aDump += " -- The Shape has problems :\n"; + aDump += " Check Count\n"; + aDump += " ------------------------------------------------\n"; + + for (; anIter != theErrors.end(); anIter++) { + Standard_Integer aNbShapes = anIter->incriminated.size(); + + switch(anIter->error) { + case BRepCheck_InvalidPointOnCurve: + aDump += " Invalid Point on Curve ................... "; + break; + case BRepCheck_InvalidPointOnCurveOnSurface: + aDump += " Invalid Point on CurveOnSurface .......... "; + break; + case BRepCheck_InvalidPointOnSurface: + aDump += " Invalid Point on Surface ................. "; + break; + case BRepCheck_No3DCurve: + aDump += " No 3D Curve .............................. "; + break; + case BRepCheck_Multiple3DCurve: + aDump += " Multiple 3D Curve ........................ "; + break; + case BRepCheck_Invalid3DCurve: + aDump += " Invalid 3D Curve ......................... "; + break; + case BRepCheck_NoCurveOnSurface: + aDump += " No Curve on Surface ...................... "; + break; + case BRepCheck_InvalidCurveOnSurface: + aDump += " Invalid Curve on Surface ................. "; + break; + case BRepCheck_InvalidCurveOnClosedSurface: + aDump += " Invalid Curve on closed Surface .......... "; + break; + case BRepCheck_InvalidSameRangeFlag: + aDump += " Invalid SameRange Flag ................... "; + break; + case BRepCheck_InvalidSameParameterFlag: + aDump += " Invalid SameParameter Flag ............... "; + break; + case BRepCheck_InvalidDegeneratedFlag: + aDump += " Invalid Degenerated Flag ................. "; + break; + case BRepCheck_FreeEdge: + aDump += " Free Edge ................................ "; + break; + case BRepCheck_InvalidMultiConnexity: + aDump += " Invalid MultiConnexity ................... "; + break; + case BRepCheck_InvalidRange: + aDump += " Invalid Range ............................ "; + break; + case BRepCheck_EmptyWire: + aDump += " Empty Wire ............................... "; + break; + case BRepCheck_RedundantEdge: + aDump += " Redundant Edge ........................... "; + break; + case BRepCheck_SelfIntersectingWire: + aDump += " Self Intersecting Wire ................... "; + break; + case BRepCheck_NoSurface: + aDump += " No Surface ............................... "; + break; + case BRepCheck_InvalidWire: + aDump += " Invalid Wire ............................. "; + break; + case BRepCheck_RedundantWire: + aDump += " Redundant Wire ........................... "; + break; + case BRepCheck_IntersectingWires: + aDump += " Intersecting Wires ....................... "; + break; + case BRepCheck_InvalidImbricationOfWires: + aDump += " Invalid Imbrication of Wires ............. "; + break; + case BRepCheck_EmptyShell: + aDump += " Empty Shell .............................. "; + break; + case BRepCheck_RedundantFace: + aDump += " Redundant Face ........................... "; + break; + case BRepCheck_UnorientableShape: + aDump += " Unorientable Shape ....................... "; + break; + case BRepCheck_NotClosed: + aDump += " Not Closed ............................... "; + break; + case BRepCheck_NotConnected: + aDump += " Not Connected ............................ "; + break; + case BRepCheck_SubshapeNotInShape: + aDump += " Sub-shape not in Shape ................... "; + break; + case BRepCheck_BadOrientation: + aDump += " Bad Orientation .......................... "; + break; + case BRepCheck_BadOrientationOfSubshape: + aDump += " Bad Orientation of Sub-shape ............. "; + break; + case BRepCheck_InvalidToleranceValue: + aDump += " Invalid Tolerance Value .................. "; + break; + case BRepCheck_CheckFail: + aDump += " Check Shape Failure ...................... "; + break; + default: + break; + } + + aDump += TCollection_AsciiString(aNbShapes) + "\n"; + + // Count types of shape. + std::list::const_iterator aShIter = anIter->incriminated.begin(); + + for (; aShIter != anIter->incriminated.end(); aShIter++) { + const Standard_Integer anIndex = *aShIter; + + if (anIndex > 0 && anIndex <= aNbSubShapes && aMapPbInd.Add(anIndex)) { + const TopoDS_Shape &aSubShape = anIndices.FindKey(anIndex); + const TopAbs_ShapeEnum aType = aSubShape.ShapeType(); + + switch (aType) { + case TopAbs_VERTEX : nbv++; break; + case TopAbs_EDGE : nbe++; break; + case TopAbs_WIRE : nbw++; break; + case TopAbs_FACE : nbf++; break; + case TopAbs_SHELL : nbs++; break; + case TopAbs_SOLID : nbo++; break; + default : break; + } + } + } + } + + const Standard_Integer aNbFaultyShapes = nbv + nbe + nbw + nbf + nbs + nbo; + aDump += " ------------------------------------------------\n"; + aDump += "*** Shapes with problems : "; + aDump += TCollection_AsciiString(aNbFaultyShapes) + "\n"; + + if (nbv > 0) { + aDump += "VERTEX : "; + if (nbv < 10) aDump += " "; + aDump += TCollection_AsciiString(nbv) + "\n"; + } + if (nbe > 0) { + aDump += "EDGE : "; + if (nbe < 10) aDump += " "; + aDump += TCollection_AsciiString(nbe) + "\n"; + } + if (nbw > 0) { + aDump += "WIRE : "; + if (nbw < 10) aDump += " "; + aDump += TCollection_AsciiString(nbw) + "\n"; + } + if (nbf > 0) { + aDump += "FACE : "; + if (nbf < 10) aDump += " "; + aDump += TCollection_AsciiString(nbf) + "\n"; + } + if (nbs > 0) { + aDump += "SHELL : "; + if (nbs < 10) aDump += " "; + aDump += TCollection_AsciiString(nbs) + "\n"; + } + if (nbo > 0) { + aDump += "SOLID : "; + if (nbo < 10) aDump += " "; + aDump += TCollection_AsciiString(nbo) + "\n"; + } + } + + return aDump; +} + //============================================================================= /*! * CheckSelfIntersections @@ -2297,362 +2474,157 @@ Standard_Real GEOMImpl_IMeasureOperations::MinSurfaceCurvatureByPoint return getSurfaceCurvatures(aSurf, UV.X(), UV.Y(), false); } - //======================================================================= -//function : StructuralDump -//purpose : Structural (data exchange) style of output. +//function : FillErrorsSub +//purpose : Fill the errors list of subshapes on shape. //======================================================================= -void GEOMImpl_IMeasureOperations::StructuralDump (const BRepCheck_Analyzer& theAna, - const TopoDS_Shape& theShape, - TCollection_AsciiString& theDump) +void GEOMImpl_IMeasureOperations::FillErrorsSub + (const BRepCheck_Analyzer &theAna, + const TopoDS_Shape &theShape, + const TopAbs_ShapeEnum theSubType, + TopTools_DataMapOfIntegerListOfShape &theMapErrors) const { - Standard_Integer i; - theDump.Clear(); - theDump += " -- The Shape has problems :\n"; - theDump += " Check Count\n"; - theDump += " ------------------------------------------------\n"; - - Standard_Integer last_stat = (Standard_Integer)BRepCheck_CheckFail; - Handle(TColStd_HArray1OfInteger) NbProblems = - new TColStd_HArray1OfInteger(1, last_stat); - for (i = 1; i <= last_stat; i++) - NbProblems->SetValue(i,0); - - Handle(TopTools_HSequenceOfShape) sl; - sl = new TopTools_HSequenceOfShape(); - TopTools_DataMapOfShapeListOfShape theMap; - theMap.Clear(); - GetProblemShapes(theAna, theShape, sl, NbProblems, theMap); - theMap.Clear(); - - Standard_Integer count = 0; - count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidPointOnCurve); - if (count > 0) { - theDump += " Invalid Point on Curve ................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidPointOnCurveOnSurface); - if (count > 0) { - theDump += " Invalid Point on CurveOnSurface .......... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidPointOnSurface); - if (count > 0) { - theDump += " Invalid Point on Surface ................. "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_No3DCurve); - if (count > 0) { - theDump += " No 3D Curve .............................. "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_Multiple3DCurve); - if (count > 0) { - theDump += " Multiple 3D Curve ........................ "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_Invalid3DCurve); - if (count > 0) { - theDump += " Invalid 3D Curve ......................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_NoCurveOnSurface); - if (count > 0) { - theDump += " No Curve on Surface ...................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidCurveOnSurface); - if (count > 0) { - theDump += " Invalid Curve on Surface ................. "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidCurveOnClosedSurface); - if (count > 0) { - theDump += " Invalid Curve on closed Surface .......... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidSameRangeFlag); - if (count > 0) { - theDump += " Invalid SameRange Flag ................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidSameParameterFlag); - if (count > 0) { - theDump += " Invalid SameParameter Flag ............... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidDegeneratedFlag); - if (count > 0) { - theDump += " Invalid Degenerated Flag ................. "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_FreeEdge); - if (count > 0) { - theDump += " Free Edge ................................ "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidMultiConnexity); - if (count > 0) { - theDump += " Invalid MultiConnexity ................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidRange); - if (count > 0) { - theDump += " Invalid Range ............................ "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_EmptyWire); - if (count > 0) { - theDump += " Empty Wire ............................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_RedundantEdge); - if (count > 0) { - theDump += " Redundant Edge ........................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_SelfIntersectingWire); - if (count > 0) { - theDump += " Self Intersecting Wire ................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_NoSurface); - if (count > 0) { - theDump += " No Surface ............................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidWire); - if (count > 0) { - theDump += " Invalid Wire ............................. "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_RedundantWire); - if (count > 0) { - theDump += " Redundant Wire ........................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_IntersectingWires); - if (count > 0) { - theDump += " Intersecting Wires ....................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidImbricationOfWires); - if (count > 0) { - theDump += " Invalid Imbrication of Wires ............. "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_EmptyShell); - if (count > 0) { - theDump += " Empty Shell .............................. "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_RedundantFace); - if (count > 0) { - theDump += " Redundant Face ........................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_UnorientableShape); - if (count > 0) { - theDump += " Unorientable Shape ....................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_NotClosed); - if (count > 0) { - theDump += " Not Closed ............................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_NotConnected); - if (count > 0) { - theDump += " Not Connected ............................ "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_SubshapeNotInShape); - if (count > 0) { - theDump += " Sub-shape not in Shape .................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_BadOrientation); - if (count > 0) { - theDump += " Bad Orientation .......................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_BadOrientationOfSubshape); - if (count > 0) { - theDump += " Bad Orientation of Sub-shape .............. "; - theDump += TCollection_AsciiString(count) + "\n"; - } - count = NbProblems->Value((Standard_Integer)BRepCheck_CheckFail); - if (count > 0) { - theDump += " checkshape failure ....................... "; - theDump += TCollection_AsciiString(count) + "\n"; - } - - theDump += " ------------------------------------------------\n"; - theDump += "*** Shapes with problems : "; - theDump += TCollection_AsciiString(sl->Length()) + "\n"; - - Standard_Integer nbv, nbe, nbw, nbf, nbs, nbo; - nbv = nbe = nbw = nbf = nbs = nbo = 0; - - for (i = 1; i <= sl->Length(); i++) { - TopoDS_Shape shi = sl->Value(i); - TopAbs_ShapeEnum sti = shi.ShapeType(); - switch (sti) { - case TopAbs_VERTEX : nbv++; break; - case TopAbs_EDGE : nbe++; break; - case TopAbs_WIRE : nbw++; break; - case TopAbs_FACE : nbf++; break; - case TopAbs_SHELL : nbs++; break; - case TopAbs_SOLID : nbo++; break; - default : break; - } - } + TopExp_Explorer anExp(theShape, theSubType); + TopTools_MapOfShape aMapSubShapes; - if (nbv > 0) { - theDump += "VERTEX : "; - if (nbv < 10) theDump += " "; - theDump += TCollection_AsciiString(nbv) + "\n"; - } - if (nbe > 0) { - theDump += "EDGE : "; - if (nbe < 10) theDump += " "; - theDump += TCollection_AsciiString(nbe) + "\n"; - } - if (nbw > 0) { - theDump += "WIRE : "; - if (nbw < 10) theDump += " "; - theDump += TCollection_AsciiString(nbw) + "\n"; - } - if (nbf > 0) { - theDump += "FACE : "; - if (nbf < 10) theDump += " "; - theDump += TCollection_AsciiString(nbf) + "\n"; - } - if (nbs > 0) { - theDump += "SHELL : "; - if (nbs < 10) theDump += " "; - theDump += TCollection_AsciiString(nbs) + "\n"; - } - if (nbo > 0) { - theDump += "SOLID : "; - if (nbo < 10) theDump += " "; - theDump += TCollection_AsciiString(nbo) + "\n"; - } -} + for (; anExp.More(); anExp.Next()) { + const TopoDS_Shape &aSubShape = anExp.Current(); + if (aMapSubShapes.Add(aSubShape)) { + const Handle(BRepCheck_Result) &aRes = theAna.Result(aSubShape); -//======================================================================= -//function : GetProblemShapes -// purpose : for StructuralDump -//======================================================================= -void GEOMImpl_IMeasureOperations::GetProblemShapes (const BRepCheck_Analyzer& theAna, - const TopoDS_Shape& theShape, - Handle(TopTools_HSequenceOfShape)& sl, - Handle(TColStd_HArray1OfInteger)& NbProblems, - TopTools_DataMapOfShapeListOfShape& theMap) -{ - for (TopoDS_Iterator iter(theShape); iter.More(); iter.Next()) { - GetProblemShapes(theAna, iter.Value(), sl, NbProblems, theMap); - } - TopAbs_ShapeEnum styp = theShape.ShapeType(); - BRepCheck_ListIteratorOfListOfStatus itl; - TopTools_ListOfShape empty; - if (!theMap.IsBound(theShape)) { - theMap.Bind(theShape,empty); - - if (!theAna.Result(theShape).IsNull()) { - itl.Initialize(theAna.Result(theShape)->Status()); - // !!! May be, we have to print all the problems, not only the first one ? - if (itl.Value() != BRepCheck_NoError) { - sl->Append(theShape); - BRepCheck_Status stat = itl.Value(); - NbProblems->SetValue((Standard_Integer)stat, - NbProblems->Value((Standard_Integer)stat) + 1); + for (aRes->InitContextIterator(); + aRes->MoreShapeInContext(); + aRes->NextShapeInContext()) { + if (aRes->ContextualShape().IsSame(theShape)) { + BRepCheck_ListIteratorOfListOfStatus itl(aRes->StatusOnShape()); + + if (itl.Value() != BRepCheck_NoError) { + // Add all errors for theShape and its sub-shape. + for (;itl.More(); itl.Next()) { + const Standard_Integer aStat = (Standard_Integer)itl.Value(); + + if (!theMapErrors.IsBound(aStat)) { + TopTools_ListOfShape anEmpty; + + theMapErrors.Bind(aStat, anEmpty); + } + + TopTools_ListOfShape &theShapes = theMapErrors.ChangeFind(aStat); + + theShapes.Append(aSubShape); + theShapes.Append(theShape); + } + } + } + + break; } } } - - switch (styp) { - case TopAbs_EDGE: - GetProblemSub(theAna, theShape, sl, NbProblems, TopAbs_VERTEX, theMap); - break; - case TopAbs_FACE: - GetProblemSub(theAna, theShape, sl, NbProblems, TopAbs_WIRE, theMap); - GetProblemSub(theAna, theShape, sl, NbProblems, TopAbs_EDGE, theMap); - GetProblemSub(theAna, theShape, sl, NbProblems, TopAbs_VERTEX, theMap); - break; - case TopAbs_SHELL: - break; - case TopAbs_SOLID: - GetProblemSub(theAna, theShape, sl, NbProblems, TopAbs_SHELL, theMap); - break; - default: - break; - } } //======================================================================= -//function : Contains +//function : FillErrors +//purpose : Fill the errors list. //======================================================================= -static Standard_Boolean Contains (const TopTools_ListOfShape& L, - const TopoDS_Shape& S) +void GEOMImpl_IMeasureOperations::FillErrors + (const BRepCheck_Analyzer &theAna, + const TopoDS_Shape &theShape, + TopTools_DataMapOfIntegerListOfShape &theMapErrors, + TopTools_MapOfShape &theMapShapes) const { - TopTools_ListIteratorOfListOfShape it; - for (it.Initialize(L); it.More(); it.Next()) { - if (it.Value().IsSame(S)) { - return Standard_True; + if (theMapShapes.Add(theShape)) { + // Fill errors of child shapes. + for (TopoDS_Iterator iter(theShape); iter.More(); iter.Next()) { + FillErrors(theAna, iter.Value(), theMapErrors, theMapShapes); + } + + // Fill errors of theShape. + const Handle(BRepCheck_Result) &aRes = theAna.Result(theShape); + + if (!aRes.IsNull()) { + BRepCheck_ListIteratorOfListOfStatus itl(aRes->Status()); + + if (itl.Value() != BRepCheck_NoError) { + // Add all errors for theShape. + for (;itl.More(); itl.Next()) { + const Standard_Integer aStat = (Standard_Integer)itl.Value(); + + if (!theMapErrors.IsBound(aStat)) { + TopTools_ListOfShape anEmpty; + + theMapErrors.Bind(aStat, anEmpty); + } + + theMapErrors.ChangeFind(aStat).Append(theShape); + } + } + } + + // Add errors of subshapes on theShape. + const TopAbs_ShapeEnum aType = theShape.ShapeType(); + + switch (aType) { + case TopAbs_EDGE: + FillErrorsSub(theAna, theShape, TopAbs_VERTEX, theMapErrors); + break; + case TopAbs_FACE: + FillErrorsSub(theAna, theShape, TopAbs_WIRE, theMapErrors); + FillErrorsSub(theAna, theShape, TopAbs_EDGE, theMapErrors); + FillErrorsSub(theAna, theShape, TopAbs_VERTEX, theMapErrors); + break; + case TopAbs_SOLID: + FillErrorsSub(theAna, theShape, TopAbs_SHELL, theMapErrors); + break; + default: + break; } } - return Standard_False; } //======================================================================= -//function : GetProblemSub -// purpose : for StructuralDump +//function : FillErrors +//purpose : Fill the errors list. //======================================================================= -void GEOMImpl_IMeasureOperations::GetProblemSub (const BRepCheck_Analyzer& theAna, - const TopoDS_Shape& theShape, - Handle(TopTools_HSequenceOfShape)& sl, - Handle(TColStd_HArray1OfInteger)& NbProblems, - const TopAbs_ShapeEnum Subtype, - TopTools_DataMapOfShapeListOfShape& theMap) +void GEOMImpl_IMeasureOperations::FillErrors + (const BRepCheck_Analyzer &theAna, + const TopoDS_Shape &theShape, + std::list &theErrors) const { - BRepCheck_ListIteratorOfListOfStatus itl; - TopExp_Explorer exp; - for (exp.Init(theShape, Subtype); exp.More(); exp.Next()) { - const TopoDS_Shape& sub = exp.Current(); - - const Handle(BRepCheck_Result)& res = theAna.Result(sub); - for (res->InitContextIterator(); - res->MoreShapeInContext(); - res->NextShapeInContext()) { - if (res->ContextualShape().IsSame(theShape) && !Contains(theMap(sub), theShape)) { - theMap(sub).Append(theShape); - itl.Initialize(res->StatusOnShape()); - - if (itl.Value() != BRepCheck_NoError) { - Standard_Integer ii = 0; - - for (ii = 1; ii <= sl->Length(); ii++) - if (sl->Value(ii).IsSame(sub)) break; - - if (ii > sl->Length()) { - sl->Append(sub); - BRepCheck_Status stat = itl.Value(); - NbProblems->SetValue((Standard_Integer)stat, - NbProblems->Value((Standard_Integer)stat) + 1); - } - for (ii = 1; ii <= sl->Length(); ii++) - if (sl->Value(ii).IsSame(theShape)) break; - if (ii > sl->Length()) { - sl->Append(theShape); - BRepCheck_Status stat = itl.Value(); - NbProblems->SetValue((Standard_Integer)stat, - NbProblems->Value((Standard_Integer)stat) + 1); - } - } - break; + // Fill the errors map. + TopTools_DataMapOfIntegerListOfShape aMapErrors; + TopTools_MapOfShape aMapShapes; + + FillErrors(theAna, theShape, aMapErrors, aMapShapes); + + // Map sub-shapes and their indices + TopTools_IndexedMapOfShape anIndices; + + TopExp::MapShapes(theShape, anIndices); + + TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape aMapIter(aMapErrors); + + for (; aMapIter.More(); aMapIter.Next()) { + ShapeError anError; + + anError.error = (BRepCheck_Status)aMapIter.Key(); + + TopTools_ListIteratorOfListOfShape aListIter(aMapIter.Value()); + TopTools_MapOfShape aMapUnique; + + for (; aListIter.More(); aListIter.Next()) { + const TopoDS_Shape &aShape = aListIter.Value(); + + if (aMapUnique.Add(aShape)) { + const Standard_Integer anIndex = anIndices.FindIndex(aShape); + + anError.incriminated.push_back(anIndex); } } + + if (!anError.incriminated.empty()) { + theErrors.push_back(anError); + } } } diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx index 45015b8cb..86d0a9c7b 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx @@ -26,13 +26,13 @@ #include "GEOM_IOperations.hxx" #include +#include #include -#include -#include #include #include #include -#include +#include +#include #include #include @@ -127,9 +127,18 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations { Standard_Real& EdgeMin, Standard_Real& EdgeMax, Standard_Real& VertMin, Standard_Real& VertMax); - Standard_EXPORT bool CheckShape (Handle(GEOM_Object) theShape, - const Standard_Boolean theIsCheckGeom, - TCollection_AsciiString& theDump); + struct ShapeError { + BRepCheck_Status error; + std::list incriminated; + }; + + Standard_EXPORT bool CheckShape (Handle(GEOM_Object) theShape, + const Standard_Boolean theIsCheckGeom, + std::list &theErrors); + + Standard_EXPORT TCollection_AsciiString PrintShapeErrors + (Handle(GEOM_Object) theShape, + const std::list &theErrors); Standard_EXPORT bool CheckSelfIntersections (Handle(GEOM_Object) theShape, Handle(TColStd_HSequenceOfInteger)& theIntersections); @@ -177,22 +186,21 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations { Handle(GEOM_Object) thePoint); private: - void StructuralDump (const BRepCheck_Analyzer& theAna, - const TopoDS_Shape& theShape, - TCollection_AsciiString& theDump); - - void GetProblemShapes (const BRepCheck_Analyzer& theAna, - const TopoDS_Shape& theShape, - Handle(TopTools_HSequenceOfShape)& sl, - Handle(TColStd_HArray1OfInteger)& NbProblems, - TopTools_DataMapOfShapeListOfShape& theMap); - - void GetProblemSub (const BRepCheck_Analyzer& theAna, - const TopoDS_Shape& theShape, - Handle(TopTools_HSequenceOfShape)& sl, - Handle(TColStd_HArray1OfInteger)& NbProblems, - const TopAbs_ShapeEnum Subtype, - TopTools_DataMapOfShapeListOfShape& theMap); + + void FillErrorsSub + (const BRepCheck_Analyzer &theAna, + const TopoDS_Shape &theShape, + const TopAbs_ShapeEnum theSubType, + TopTools_DataMapOfIntegerListOfShape &theMapErrors) const; + void FillErrors + (const BRepCheck_Analyzer &theAna, + const TopoDS_Shape &theShape, + TopTools_DataMapOfIntegerListOfShape &theMapErrors, + TopTools_MapOfShape &theMapShapes) const; + + void FillErrors (const BRepCheck_Analyzer &theAna, + const TopoDS_Shape &theShape, + std::list &theErrors) const; Standard_Real getSurfaceCurvatures (const Handle(Geom_Surface)& aSurf, Standard_Real theUParam, diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc old mode 100644 new mode 100755 index f51456c46..4732c1f5a --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -58,6 +58,7 @@ #include #include #include +#include #include #include diff --git a/src/GEOM_I/GEOM_Gen_i.hh b/src/GEOM_I/GEOM_Gen_i.hh index 4f12a3301..81771124b 100644 --- a/src/GEOM_I/GEOM_Gen_i.hh +++ b/src/GEOM_I/GEOM_Gen_i.hh @@ -60,6 +60,7 @@ //#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC +class TopTools_SequenceOfShape; //===================================================================== // Generic operations creator (for plugins mechanism) diff --git a/src/GEOM_I/GEOM_IMeasureOperations_i.cc b/src/GEOM_I/GEOM_IMeasureOperations_i.cc index 7f0d3cac4..b6785bda9 100644 --- a/src/GEOM_I/GEOM_IMeasureOperations_i.cc +++ b/src/GEOM_I/GEOM_IMeasureOperations_i.cc @@ -30,6 +30,291 @@ #include "GEOM_Engine.hxx" #include "GEOM_Object.hxx" +/** + * This function converts shape errors from theErrorsFrom to theErrorsTo. + * Note that theErrorsTo is not cleared at first. + * + * \param theErrorsFrom errors to be converted. + * \param theErrorsTo result errors. + */ +static void ConvertShapeError + (const GEOM::GEOM_IMeasureOperations::ShapeErrors &theErrorsFrom, + std::list &theErrorsTo) +{ + int aNbErr = theErrorsFrom.length(); + int i = 0; + + for (; i < aNbErr; i++) { + const GEOM::GEOM_IMeasureOperations::ShapeError anErr = theErrorsFrom[i]; + const GEOM::GEOM_IMeasureOperations::ShapeErrorType aType = anErr.error; + const GEOM::ListOfLong anIncrims = anErr.incriminated; + GEOMImpl_IMeasureOperations::ShapeError anErrStruct; + + switch (aType) { + case GEOM::GEOM_IMeasureOperations::InvalidPointOnCurve: + anErrStruct.error = BRepCheck_InvalidPointOnCurve; + break; + case GEOM::GEOM_IMeasureOperations::InvalidPointOnCurveOnSurface: + anErrStruct.error = BRepCheck_InvalidPointOnCurveOnSurface; + break; + case GEOM::GEOM_IMeasureOperations::InvalidPointOnSurface: + anErrStruct.error = BRepCheck_InvalidPointOnSurface; + break; + case GEOM::GEOM_IMeasureOperations::No3DCurve: + anErrStruct.error = BRepCheck_No3DCurve; + break; + case GEOM::GEOM_IMeasureOperations::Multiple3DCurve: + anErrStruct.error = BRepCheck_Multiple3DCurve; + break; + case GEOM::GEOM_IMeasureOperations::Invalid3DCurve: + anErrStruct.error = BRepCheck_Invalid3DCurve; + break; + case GEOM::GEOM_IMeasureOperations::NoCurveOnSurface: + anErrStruct.error = BRepCheck_NoCurveOnSurface; + break; + case GEOM::GEOM_IMeasureOperations::InvalidCurveOnSurface: + anErrStruct.error = BRepCheck_InvalidCurveOnSurface; + break; + case GEOM::GEOM_IMeasureOperations::InvalidCurveOnClosedSurface: + anErrStruct.error = BRepCheck_InvalidCurveOnClosedSurface; + break; + case GEOM::GEOM_IMeasureOperations::InvalidSameRangeFlag: + anErrStruct.error = BRepCheck_InvalidSameRangeFlag; + break; + case GEOM::GEOM_IMeasureOperations::InvalidSameParameterFlag: + anErrStruct.error = BRepCheck_InvalidSameParameterFlag; + break; + case GEOM::GEOM_IMeasureOperations::InvalidDegeneratedFlag: + anErrStruct.error = BRepCheck_InvalidDegeneratedFlag; + break; + case GEOM::GEOM_IMeasureOperations::FreeEdge: + anErrStruct.error = BRepCheck_FreeEdge; + break; + case GEOM::GEOM_IMeasureOperations::InvalidMultiConnexity: + anErrStruct.error = BRepCheck_InvalidMultiConnexity; + break; + case GEOM::GEOM_IMeasureOperations::InvalidRange: + anErrStruct.error = BRepCheck_InvalidRange; + break; + case GEOM::GEOM_IMeasureOperations::EmptyWire: + anErrStruct.error = BRepCheck_EmptyWire; + break; + case GEOM::GEOM_IMeasureOperations::RedundantEdge: + anErrStruct.error = BRepCheck_RedundantEdge; + break; + case GEOM::GEOM_IMeasureOperations::SelfIntersectingWire: + anErrStruct.error = BRepCheck_SelfIntersectingWire; + break; + case GEOM::GEOM_IMeasureOperations::NoSurface: + anErrStruct.error = BRepCheck_NoSurface; + break; + case GEOM::GEOM_IMeasureOperations::InvalidWire: + anErrStruct.error = BRepCheck_InvalidWire; + break; + case GEOM::GEOM_IMeasureOperations::RedundantWire: + anErrStruct.error = BRepCheck_RedundantWire; + break; + case GEOM::GEOM_IMeasureOperations::IntersectingWires: + anErrStruct.error = BRepCheck_IntersectingWires; + break; + case GEOM::GEOM_IMeasureOperations::InvalidImbricationOfWires: + anErrStruct.error = BRepCheck_InvalidImbricationOfWires; + break; + case GEOM::GEOM_IMeasureOperations::EmptyShell: + anErrStruct.error = BRepCheck_EmptyShell; + break; + case GEOM::GEOM_IMeasureOperations::RedundantFace: + anErrStruct.error = BRepCheck_RedundantFace; + break; + case GEOM::GEOM_IMeasureOperations::UnorientableShape: + anErrStruct.error = BRepCheck_UnorientableShape; + break; + case GEOM::GEOM_IMeasureOperations::NotClosed: + anErrStruct.error = BRepCheck_NotClosed; + break; + case GEOM::GEOM_IMeasureOperations::NotConnected: + anErrStruct.error = BRepCheck_NotConnected; + break; + case GEOM::GEOM_IMeasureOperations::SubshapeNotInShape: + anErrStruct.error = BRepCheck_SubshapeNotInShape; + break; + case GEOM::GEOM_IMeasureOperations::BadOrientation: + anErrStruct.error = BRepCheck_BadOrientation; + break; + case GEOM::GEOM_IMeasureOperations::BadOrientationOfSubshape: + anErrStruct.error = BRepCheck_BadOrientationOfSubshape; + break; + case GEOM::GEOM_IMeasureOperations::InvalidToleranceValue: + anErrStruct.error = BRepCheck_InvalidToleranceValue; + break; + case GEOM::GEOM_IMeasureOperations::CheckFail: + anErrStruct.error = BRepCheck_CheckFail; + break; + default: + break; + } + + int ii = 0; + int aLen = anIncrims.length(); + + for (; ii < aLen; ii++) { + anErrStruct.incriminated.push_back(anIncrims[ii]); + } + + theErrorsTo.push_back(anErrStruct); + } +} + +/** + * This function converts shape errors from theErrorsFrom to theErrorsTo. + * Note that theErrorsTo is not cleared at first. + * + * \param theErrorsFrom errors to be converted. + * \param theErrorsTo result errors. + */ +static void ConvertShapeError + (const std::list &theErrorsFrom, + GEOM::GEOM_IMeasureOperations::ShapeErrors_out &theErrorsTo) +{ + const int aNbErr = theErrorsFrom.size(); + GEOM::GEOM_IMeasureOperations::ShapeErrors_var anErrArray = + new GEOM::GEOM_IMeasureOperations::ShapeErrors; + + anErrArray->length(aNbErr); + + // fill the local CORBA array with values from lists + std::list::const_iterator + anIt = theErrorsFrom.begin(); + int i = 0; + + for (; anIt != theErrorsFrom.end(); i++, anIt++) { + GEOM::GEOM_IMeasureOperations::ShapeError_var anErrStruct = + new GEOM::GEOM_IMeasureOperations::ShapeError; + + switch (anIt->error) { + case BRepCheck_InvalidPointOnCurve: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidPointOnCurve; + break; + case BRepCheck_InvalidPointOnCurveOnSurface: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidPointOnCurveOnSurface; + break; + case BRepCheck_InvalidPointOnSurface: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidPointOnSurface; + break; + case BRepCheck_No3DCurve: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::No3DCurve; + break; + case BRepCheck_Multiple3DCurve: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::Multiple3DCurve; + break; + case BRepCheck_Invalid3DCurve: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::Invalid3DCurve; + break; + case BRepCheck_NoCurveOnSurface: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::NoCurveOnSurface; + break; + case BRepCheck_InvalidCurveOnSurface: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidCurveOnSurface; + break; + case BRepCheck_InvalidCurveOnClosedSurface: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidCurveOnClosedSurface; + break; + case BRepCheck_InvalidSameRangeFlag: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidSameRangeFlag; + break; + case BRepCheck_InvalidSameParameterFlag: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidSameParameterFlag; + break; + case BRepCheck_InvalidDegeneratedFlag: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidDegeneratedFlag; + break; + case BRepCheck_FreeEdge: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::FreeEdge; + break; + case BRepCheck_InvalidMultiConnexity: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidMultiConnexity; + break; + case BRepCheck_InvalidRange: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidRange; + break; + case BRepCheck_EmptyWire: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::EmptyWire; + break; + case BRepCheck_RedundantEdge: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::RedundantEdge; + break; + case BRepCheck_SelfIntersectingWire: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::SelfIntersectingWire; + break; + case BRepCheck_NoSurface: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::NoSurface; + break; + case BRepCheck_InvalidWire: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidWire; + break; + case BRepCheck_RedundantWire: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::RedundantWire; + break; + case BRepCheck_IntersectingWires: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::IntersectingWires; + break; + case BRepCheck_InvalidImbricationOfWires: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidImbricationOfWires; + break; + case BRepCheck_EmptyShell: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::EmptyShell; + break; + case BRepCheck_RedundantFace: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::RedundantFace; + break; + case BRepCheck_UnorientableShape: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::UnorientableShape; + break; + case BRepCheck_NotClosed: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::NotClosed; + break; + case BRepCheck_NotConnected: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::NotConnected; + break; + case BRepCheck_SubshapeNotInShape: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::SubshapeNotInShape; + break; + case BRepCheck_BadOrientation: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::BadOrientation; + break; + case BRepCheck_BadOrientationOfSubshape: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::BadOrientationOfSubshape; + break; + case BRepCheck_InvalidToleranceValue: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::InvalidToleranceValue; + break; + case BRepCheck_CheckFail: + anErrStruct->error = GEOM::GEOM_IMeasureOperations::CheckFail; + break; + default: + break; + } + + std::list aIndList = anIt->incriminated; + GEOM::ListOfLong_var anIncrims = new GEOM::ListOfLong(); + anIncrims->length(aIndList.size()); + + std::list::iterator anIndIt = aIndList.begin(); + int jj = 0; + + for (; anIndIt != aIndList.end(); jj++, anIndIt++) { + anIncrims[jj] = *anIndIt; + } + + anErrStruct->incriminated = anIncrims; + + anErrArray[i] = anErrStruct; + } + + // initialize out-parameter with local array + theErrorsTo = anErrArray._retn(); +} + //============================================================================= /*! * constructor: @@ -332,15 +617,15 @@ void GEOM_IMeasureOperations_i::GetTolerance * CheckShape */ //============================================================================= -CORBA::Boolean GEOM_IMeasureOperations_i::CheckShape (GEOM::GEOM_Object_ptr theShape, - CORBA::String_out theDescription) +CORBA::Boolean GEOM_IMeasureOperations_i::CheckShape + (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors) { //Set a not done flag GetOperations()->SetNotDone(); if (CORBA::is_nil(theShape)) { - theDescription = CORBA::string_dup("null"); return 0; } @@ -349,30 +634,26 @@ CORBA::Boolean GEOM_IMeasureOperations_i::CheckShape (GEOM::GEOM_Object_ptr theS if (aShape.IsNull()) { - theDescription = CORBA::string_dup("null2"); return 0; } - // Get shape parameters - TCollection_AsciiString aDump; - if (GetOperations()->CheckShape(aShape, /*check_geom = */false, aDump)) - { - theDescription = CORBA::string_dup("OK"); - return 1; - } - theDescription = CORBA::string_dup(aDump.ToCString()); - return 0; + std::list anErrList; + bool isOk = GetOperations()->CheckShape(aShape, false, anErrList); + + ConvertShapeError(anErrList, theErrors); + + return isOk; } -CORBA::Boolean GEOM_IMeasureOperations_i::CheckShapeWithGeometry (GEOM::GEOM_Object_ptr theShape, - CORBA::String_out theDescription) +CORBA::Boolean GEOM_IMeasureOperations_i::CheckShapeWithGeometry + (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors) { //Set a not done flag GetOperations()->SetNotDone(); if (CORBA::is_nil(theShape)) { - theDescription = CORBA::string_dup("null"); return 0; } @@ -381,19 +662,42 @@ CORBA::Boolean GEOM_IMeasureOperations_i::CheckShapeWithGeometry (GEOM::GEOM_Obj if (aShape.IsNull()) { - theDescription = CORBA::string_dup("null2"); return 0; } - // Get shape parameters - TCollection_AsciiString aDump; - if (GetOperations()->CheckShape(aShape, /*check_geom = */true, aDump)) - { - theDescription = CORBA::string_dup("OK"); - return 1; + std::list anErrList; + bool isOk = GetOperations()->CheckShape(aShape, true, anErrList); + + ConvertShapeError(anErrList, theErrors); + + return isOk; +} + +//============================================================================= +/*! + * PrintShapeErrors + */ +//============================================================================= +char* GEOM_IMeasureOperations_i::PrintShapeErrors + ( GEOM::GEOM_Object_ptr theShape, + const GEOM::GEOM_IMeasureOperations::ShapeErrors &theErrors) +{ + //Get the reference shape + Handle(GEOM_Object) aShape = GetObjectImpl(theShape); + + if (aShape.IsNull()) { + return NULL; } - theDescription = CORBA::string_dup(aDump.ToCString()); - return 0; + + // Convert the errors sequence + std::list anErrList; + + ConvertShapeError(theErrors, anErrList); + + TCollection_AsciiString aDescr = + GetOperations()->PrintShapeErrors(aShape, anErrList); + + return CORBA::string_dup(aDescr.ToCString()); } //============================================================================= diff --git a/src/GEOM_I/GEOM_IMeasureOperations_i.hh b/src/GEOM_I/GEOM_IMeasureOperations_i.hh index caa3de251..690ac5390 100644 --- a/src/GEOM_I/GEOM_IMeasureOperations_i.hh +++ b/src/GEOM_I/GEOM_IMeasureOperations_i.hh @@ -84,11 +84,17 @@ class GEOM_I_EXPORT GEOM_IMeasureOperations_i : CORBA::Double& EdgeMin, CORBA::Double& EdgeMax, CORBA::Double& VertMin, CORBA::Double& VertMax); - CORBA::Boolean CheckShape (GEOM::GEOM_Object_ptr theShape, - CORBA::String_out theDescription); + CORBA::Boolean CheckShape + (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors); - CORBA::Boolean CheckShapeWithGeometry (GEOM::GEOM_Object_ptr theShape, - CORBA::String_out theDescription); + CORBA::Boolean CheckShapeWithGeometry + (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors); + + char* PrintShapeErrors + ( GEOM::GEOM_Object_ptr theShape, + const GEOM::GEOM_IMeasureOperations::ShapeErrors &theErrors); CORBA::Boolean CheckSelfIntersections (GEOM::GEOM_Object_ptr theShape, GEOM::ListOfLong_out theIntersections); diff --git a/src/GEOM_SWIG/GEOM_TestMeasures.py b/src/GEOM_SWIG/GEOM_TestMeasures.py index 817a73082..2aed6d6a5 100644 --- a/src/GEOM_SWIG/GEOM_TestMeasures.py +++ b/src/GEOM_SWIG/GEOM_TestMeasures.py @@ -41,8 +41,9 @@ def TestMeasureOperations (geompy, math): ####### CheckShape ####### - IsValid = geompy.CheckShape(box) + (IsValid, err) = geompy.CheckShape(box, 0, 2) if IsValid == 0: + geompy.PrintShapeError(box, err) raise RuntimeError, "Invalid box created" else: print "\nBox is valid" diff --git a/src/GEOM_SWIG/geomBuilder.py b/src/GEOM_SWIG/geomBuilder.py index 057e6b064..74d835d0a 100644 --- a/src/GEOM_SWIG/geomBuilder.py +++ b/src/GEOM_SWIG/geomBuilder.py @@ -10142,15 +10142,52 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen): self._autoPublish(anObj, theName, "normal") return anObj + ## Print shape errors obtained from CheckShape. + # @param theShape Shape that was checked. + # @param theShapeErrors the shape errors obtained by CheckShape. + # @param theReturnStatus If 0 the description of problem is printed. + # If 1 the description of problem is returned. + # @return If theReturnStatus is equal to 1 the description is returned. + # Otherwise doesn't return anything. + # + # @ref tui_measurement_tools_page "Example" + def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0): + """ + Print shape errors obtained from CheckShape. + + Parameters: + theShape Shape that was checked. + theShapeErrors the shape errors obtained by CheckShape. + theReturnStatus If 0 the description of problem is printed. + If 1 the description of problem is returned. + + Returns: + If theReturnStatus is equal to 1 the description is returned. + Otherwise doesn't return anything. + """ + # Example: see GEOM_TestMeasures.py + Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors) + if theReturnStatus == 1: + return Descr + print Descr + pass + ## Check a topology of the given shape. # @param theShape Shape to check validity of. # @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n # if TRUE, the shape's geometry will be checked also. - # @param theReturnStatus If FALSE and if theShape is invalid, a description \n - # of problem is printed. - # if TRUE and if theShape is invalid, the description - # of problem is also returned. + # @param theReturnStatus If 0 and if theShape is invalid, a description + # of problem is printed. + # If 1 isValid flag and the description of + # problem is returned. + # If 2 isValid flag and the list of error data + # is returned. # @return TRUE, if the shape "seems to be valid". + # If theShape is invalid, prints a description of problem. + # If theReturnStatus is equal to 1 the description is returned + # along with IsValid flag. + # If theReturnStatus is equal to 2 the list of error data is + # returned along with IsValid flag. # # @ref tui_measurement_tools_page "Example" def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0): @@ -10161,28 +10198,37 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen): theShape Shape to check validity of. theIsCheckGeom If FALSE, only the shape's topology will be checked, if TRUE, the shape's geometry will be checked also. - theReturnStatus If FALSE and if theShape is invalid, a description + theReturnStatus If 0 and if theShape is invalid, a description of problem is printed. - if TRUE and if theShape is invalid, the description - of problem is returned. + If 1 IsValid flag and the description of + problem is returned. + If 2 IsValid flag and the list of error data + is returned. Returns: TRUE, if the shape "seems to be valid". If theShape is invalid, prints a description of problem. - This description can also be returned. + If theReturnStatus is equal to 1 the description is returned + along with IsValid flag. + If theReturnStatus is equal to 2 the list of error data is + returned along with IsValid flag. """ # Example: see GEOM_TestMeasures.py if theIsCheckGeom: - (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape) + (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape) RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp) else: - (IsValid, Status) = self.MeasuOp.CheckShape(theShape) + (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape) RaiseIfFailed("CheckShape", self.MeasuOp) if IsValid == 0: if theReturnStatus == 0: - print Status + Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors) + print Descr if theReturnStatus == 1: - return (IsValid, Status) + Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors) + return (IsValid, Descr) + elif theReturnStatus == 2: + return (IsValid, ShapeErrors) return IsValid ## Detect self-intersections in the given shape. diff --git a/src/MeasureGUI/CMakeLists.txt b/src/MeasureGUI/CMakeLists.txt index 20bacd209..8f57e40ad 100755 --- a/src/MeasureGUI/CMakeLists.txt +++ b/src/MeasureGUI/CMakeLists.txt @@ -66,6 +66,7 @@ SET(_uic_files MeasureGUI_1Sel12LineEdit_QTD.ui MeasureGUI_1Sel1TextView1Check_QTD.ui MeasureGUI_1Sel1TextView2ListBox_QTD.ui + MeasureGUI_1Sel1Check1TextView2ListBox_QTD.ui MeasureGUI_1Sel1TextView_QTD.ui MeasureGUI_1Sel3LineEdit_QTD.ui MeasureGUI_1Sel6LineEdit_QTD.ui diff --git a/src/MeasureGUI/MeasureGUI_1Sel1Check1TextView2ListBox_QTD.ui b/src/MeasureGUI/MeasureGUI_1Sel1Check1TextView2ListBox_QTD.ui new file mode 100644 index 000000000..aa6a3fa3d --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_1Sel1Check1TextView2ListBox_QTD.ui @@ -0,0 +1,138 @@ + + MeasureGUI_1Sel1Check1TextView2ListBox_QTD + + + + 0 + 0 + 235 + 274 + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 6 + + + 6 + + + + + + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + + + + + + + + + + 100 + 0 + + + + + + + + Check also geometry + + + + + + + + 300 + 0 + + + + + + + + TL2 + + + + + + + TL3 + + + + + + + TL1 + + + + + + + + 0 + 0 + + + + + + + + + + + + + + PushButton1 + LineEdit1 + CheckBox1 + TextView1 + + + + diff --git a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx index a0900cbc4..26763b814 100644 --- a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx @@ -299,25 +299,19 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::processObject() aErrStr = ""; switch ( aErrs[i].error ) { case GEOM::GEOM_IBlocksOperations::NOT_BLOCK : - aErrStr = "Not a Block"; + aErrStr = tr("GEOM_CHECK_BLOCKS_NOT_BLOCK"); break; case GEOM::GEOM_IBlocksOperations::EXTRA_EDGE : - aErrStr = "Extra Edge"; + aErrStr = tr("GEOM_CHECK_BLOCKS_EXTRA_EDGE"); break; case GEOM::GEOM_IBlocksOperations::INVALID_CONNECTION : - aErrStr = "Invalid Connection"; - aErrStr += aConSfx; - aErrStr += QString::number( aConNum ); - aConNum++; + aErrStr = tr("GEOM_CHECK_BLOCKS_INVALID_CONNECTION").arg(aConNum++); break; case GEOM::GEOM_IBlocksOperations::NOT_CONNECTED : - aErrStr = "Not Connected"; + aErrStr = tr("GEOM_CHECK_BLOCKS_NOT_CONNECTED"); break; case GEOM::GEOM_IBlocksOperations::NOT_GLUED : - aErrStr = "Not Glued"; - aErrStr += aGluedSfx; - aErrStr += QString::number( aGluedNum ); - aGluedNum++; + aErrStr = tr("GEOM_CHECK_BLOCKS_NOT_GLUED").arg(aGluedNum++); break; default : aErrStr = ""; diff --git a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx index 48836f74c..42b9e3abd 100644 --- a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx @@ -24,12 +24,24 @@ // File : MeasureGUI_CheckShapeDlg.cxx // Author : Nicolas REJNERI, Open CASCADE S.A.S. // +#include "MeasureGUI.h" #include "MeasureGUI_CheckShapeDlg.h" #include "MeasureGUI_Widgets.h" +#include +#include +#include +#include #include #include #include +#include +#include + +#include +#include +#include +#include #define TEXTEDIT_FONT_FAMILY "Courier" #define TEXTEDIT_FONT_SIZE 11 @@ -42,7 +54,7 @@ // true to construct a modal dialog. //================================================================================= MeasureGUI_CheckShapeDlg::MeasureGUI_CheckShapeDlg( GeometryGUI* GUI, QWidget* parent ) - : MeasureGUI_Skeleton( GUI, parent ) + : GEOMBase_Skeleton( GUI, parent, false ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CHECKSHAPE" ) ) ); @@ -55,8 +67,12 @@ MeasureGUI_CheckShapeDlg::MeasureGUI_CheckShapeDlg( GeometryGUI* GUI, QWidget* p mainFrame()->GroupConstructors->setTitle( tr( "GEOM_CHECK_SHAPE" ) ); mainFrame()->RadioButton1->setIcon( image0 ); + mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose ); + mainFrame()->RadioButton2->close(); + mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + mainFrame()->RadioButton3->close(); - myGrp = new MeasureGUI_1Sel1TextView1Check( centralWidget() ); + myGrp = new MeasureGUI_1Sel1Check1TextView2ListBox( centralWidget() ); myGrp->GroupBox1->setTitle( tr( "GEOM_CHECK_INFOS" ) ); myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); myGrp->TextView1->setReadOnly( true ); @@ -67,10 +83,18 @@ MeasureGUI_CheckShapeDlg::MeasureGUI_CheckShapeDlg( GeometryGUI* GUI, QWidget* p myGrp->PushButton1->setIcon( image1 ); myGrp->LineEdit1->setReadOnly( true ); + myGrp->TextLabel2->setText( tr( "GEOM_CHECK_BLOCKS_COMPOUND_ERRORS" ) ); + myGrp->TextLabel3->setText( tr( "GEOM_CHECK_BLOCKS_COMPOUND_SUBSHAPES" ) ); + + myGrp->ListBox2->setSelectionMode( QAbstractItemView::ExtendedSelection ); + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); layout->setMargin( 0 ); layout->setSpacing( 6 ); layout->addWidget( myGrp ); + connect( myGrp->ListBox1, SIGNAL( itemSelectionChanged() ), SLOT( onErrorsListSelectionChanged() ) ); + connect( myGrp->ListBox2, SIGNAL( itemSelectionChanged() ), SLOT( onSubShapesListSelectionChanged() ) ); + /***************************************************************/ myHelpFileName = "using_measurement_tools_page.html#check_anchor"; @@ -94,32 +118,167 @@ MeasureGUI_CheckShapeDlg::~MeasureGUI_CheckShapeDlg() //================================================================================= void MeasureGUI_CheckShapeDlg::Init() { - mySelBtn = myGrp->PushButton1; - mySelEdit = myGrp->LineEdit1; - MeasureGUI_Skeleton::Init(); + // signals and slots connections + connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); + connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); + + connect( myGrp->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); connect( myGrp->CheckBox1, SIGNAL( toggled( bool) ), this, SLOT( SelectionIntoArgument() ) ); + + initName( tr( "GEOM_CHECK_SHAPE_NAME") ); + buttonOk()->setEnabled( false ); + buttonApply()->setEnabled( false ); + activateSelection(); + SelectionIntoArgument(); } //================================================================================= -// function : getParameters +// function : ClickOnOk() // purpose : //================================================================================= -bool MeasureGUI_CheckShapeDlg::getParameters ( bool& theIsValid, QString& theMsg ) +void MeasureGUI_CheckShapeDlg::ClickOnOk() { - if ( myObj->_is_nil() ) + if ( ClickOnApply() ) + ClickOnCancel(); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool MeasureGUI_CheckShapeDlg::ClickOnApply() +{ + if ( !onAccept() ) return false; - else { + + initName(); + return true; +} + +//================================================================================= +// function : SelectionIntoArgument +// purpose : +//================================================================================= +bool MeasureGUI_CheckShapeDlg::extractPrefix() const +{ + return true; +} + +//================================================================================= +// function : SelectionIntoArgument +// purpose : +//================================================================================= +void MeasureGUI_CheckShapeDlg::SelectionIntoArgument() +{ + erasePreview(); + myObj = GEOM::GEOM_Object::_nil(); + + LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); + SALOME_ListIO aSelList; + aSelMgr->selectedObjects(aSelList); + + if (aSelList.Extent() != 1) { + myGrp->LineEdit1->setText( "" ); + processObject(); + return; + } + + GEOM::GEOM_Object_var aSelectedObject = + GEOMBase::ConvertIOinGEOMObject( aSelList.First() ); + + if ( aSelectedObject->_is_nil() ) { + myGrp->LineEdit1->setText( "" ); + processObject(); + return; + } + + myObj = aSelectedObject; + myGrp->LineEdit1->setText( GEOMBase::GetName( myObj ) ); + processObject(); + DISPLAY_PREVIEW_MACRO; +} + +//================================================================================= +// function : SetEditCurrentArgument +// purpose : +//================================================================================= +void MeasureGUI_CheckShapeDlg::SetEditCurrentArgument() +{ + myGrp->LineEdit1->setFocus(); + SelectionIntoArgument(); +} + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void MeasureGUI_CheckShapeDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + + LightApp_SelectionMgr* aSel = myGeomGUI->getApp()->selectionMgr(); + if ( aSel ) + connect( aSel, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + + activateSelection(); + DISPLAY_PREVIEW_MACRO +} + +//================================================================================= +// function : activateSelection +// purpose : activate selection of faces, shells, and solids +//================================================================================= +void MeasureGUI_CheckShapeDlg::activateSelection() +{ + globalSelection( GEOM_ALLSHAPES ); +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void MeasureGUI_CheckShapeDlg::enterEvent( QEvent* ) +{ + if ( !mainFrame()->GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool MeasureGUI_CheckShapeDlg::isValid( QString& ) +{ + return !myObj->_is_nil(); +} + +//================================================================================= +// function : getErrors +// purpose : +//================================================================================= +bool MeasureGUI_CheckShapeDlg::getErrors + ( bool& theIsValid, + GEOM::GEOM_IMeasureOperations::ShapeErrors& theErrors ) +{ + if ( myObj->_is_nil() ) { + return false; + } else { GEOM::GEOM_IMeasureOperations_var anOper = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() ); try { - char* aMsg; + GEOM::GEOM_IMeasureOperations::ShapeErrors_var aErrs; bool isCheckGeometry = myGrp->CheckBox1->isChecked(); if ( isCheckGeometry ) - theIsValid = anOper->CheckShapeWithGeometry( myObj, aMsg ); + theIsValid = anOper->CheckShapeWithGeometry( myObj, aErrs ); else - theIsValid = anOper->CheckShape( myObj, aMsg ); - theMsg = aMsg; + theIsValid = anOper->CheckShape( myObj, aErrs ); + + if (anOper->IsDone() && aErrs->length() > 0) + theErrors = aErrs; } catch( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); @@ -138,19 +297,343 @@ bool MeasureGUI_CheckShapeDlg::getParameters ( bool& theIsValid, QString& theMsg void MeasureGUI_CheckShapeDlg::processObject() { bool isShapeValid; - QString aMsg; - if ( !getParameters( isShapeValid, aMsg ) ) { + GEOM::GEOM_IMeasureOperations::ShapeErrors aErrs; + + if ( !getErrors( isShapeValid, aErrs ) ) { myGrp->TextView1->setText( "" ); + myGrp->ListBox1->clear(); + myGrp->ListBox2->clear(); + erasePreview(); + return; } if ( isShapeValid ) { - myGrp->TextView1->setText( "This Shape seems to be valid." ); - } - else { - QString aDescr ( "This Shape is not valid.\n" ); - aDescr += aMsg; - myGrp->TextView1->setText( aDescr ); -// myGrp->TextView1->setText("This Shape is not valid."); + myGrp->TextView1->setText(tr("GEOM_CHECK_SHAPE_VALID")); + buttonOk()->setEnabled( false ); + buttonApply()->setEnabled( false ); + } else { + myGrp->TextView1->setText(tr("GEOM_CHECK_SHAPE_NOT_VALID")); + buttonOk()->setEnabled( true ); + buttonApply()->setEnabled( true ); + } + + // Add Error groups + QStringList aErrList; + + for ( int i = 0, n = aErrs.length(); i < n; i++ ) { + QString aErrStr("CHECK_ERROR_"); + + switch ( aErrs[i].error ) { + case GEOM::GEOM_IMeasureOperations::InvalidPointOnCurve: + aErrStr += "INVALID_POINT_ON_CURVE"; + break; + case GEOM::GEOM_IMeasureOperations::InvalidPointOnCurveOnSurface: + aErrStr += "INVALID_POINT_ON_CURVE_ON_SURFACE"; + break; + case GEOM::GEOM_IMeasureOperations::InvalidPointOnSurface: + aErrStr += "INVALID_POINT_ON_SURFACE"; + break; + case GEOM::GEOM_IMeasureOperations::No3DCurve: + aErrStr += "NO_3D_CURVE"; + break; + case GEOM::GEOM_IMeasureOperations::Multiple3DCurve: + aErrStr += "MULTIPLE_3D_CURVE"; + break; + case GEOM::GEOM_IMeasureOperations::Invalid3DCurve: + aErrStr += "INVALID_3D_CURVE"; + break; + case GEOM::GEOM_IMeasureOperations::NoCurveOnSurface: + aErrStr += "NO_CURVE_ON_SURFACE"; + break; + case GEOM::GEOM_IMeasureOperations::InvalidCurveOnSurface: + aErrStr += "INVALID_CURVE_ON_SURFACE"; + break; + case GEOM::GEOM_IMeasureOperations::InvalidCurveOnClosedSurface: + aErrStr += "INVALID_CURVE_ON_CLOSED_SURFACE"; + break; + case GEOM::GEOM_IMeasureOperations::InvalidSameRangeFlag: + aErrStr += "INVALID_SAME_RANGE_FLAG"; + break; + case GEOM::GEOM_IMeasureOperations::InvalidSameParameterFlag: + aErrStr += "INVALID_SAME_PARAMETER_FLAG"; + break; + case GEOM::GEOM_IMeasureOperations::InvalidDegeneratedFlag: + aErrStr += "INVALID_DEGENERATED_FLAG"; + break; + case GEOM::GEOM_IMeasureOperations::FreeEdge: + aErrStr += "FREE_EDGE"; + break; + case GEOM::GEOM_IMeasureOperations::InvalidMultiConnexity: + aErrStr += "INVALID_MULTI_CONNEXITY"; + break; + case GEOM::GEOM_IMeasureOperations::InvalidRange: + aErrStr += "INVALID_RANGE"; + break; + case GEOM::GEOM_IMeasureOperations::EmptyWire: + aErrStr += "EMPTY_WIRE"; + break; + case GEOM::GEOM_IMeasureOperations::RedundantEdge: + aErrStr += "REDUNDANT_EDGE"; + break; + case GEOM::GEOM_IMeasureOperations::SelfIntersectingWire: + aErrStr += "SELF_INTERSECTING_WIRE"; + break; + case GEOM::GEOM_IMeasureOperations::NoSurface: + aErrStr += "NO_SURFACE"; + break; + case GEOM::GEOM_IMeasureOperations::InvalidWire: + aErrStr += "INVALID_WIRE"; + break; + case GEOM::GEOM_IMeasureOperations::RedundantWire: + aErrStr += "REDUNDANT_WIRE"; + break; + case GEOM::GEOM_IMeasureOperations::IntersectingWires: + aErrStr += "INTERSECTING_WIRES"; + break; + case GEOM::GEOM_IMeasureOperations::InvalidImbricationOfWires: + aErrStr += "INVALID_IMBRICATION_OF_WIRES"; + break; + case GEOM::GEOM_IMeasureOperations::EmptyShell: + aErrStr += "EMPTY_SHELL"; + break; + case GEOM::GEOM_IMeasureOperations::RedundantFace: + aErrStr += "REDUNDANT_FACE"; + break; + case GEOM::GEOM_IMeasureOperations::UnorientableShape: + aErrStr += "UNORIENTABLE_SHAPE"; + break; + case GEOM::GEOM_IMeasureOperations::NotClosed: + aErrStr += "NOT_CLOSED"; + break; + case GEOM::GEOM_IMeasureOperations::NotConnected: + aErrStr += "NOT_CONNECTED"; + break; + case GEOM::GEOM_IMeasureOperations::SubshapeNotInShape: + aErrStr += "SUBSHAPE_NOT_IN_SHAPE"; + break; + case GEOM::GEOM_IMeasureOperations::BadOrientation: + aErrStr += "BAD_ORIENTATION"; + break; + case GEOM::GEOM_IMeasureOperations::BadOrientationOfSubshape: + aErrStr += "BAD_ORIENTATION_OF_SUBSHAPE"; + break; + case GEOM::GEOM_IMeasureOperations::InvalidToleranceValue: + aErrStr += "INVALID_TOLERANCE_VALUE"; + break; + case GEOM::GEOM_IMeasureOperations::CheckFail: + aErrStr += "CHECK_FAIL"; + break; + default: + aErrStr.clear(); + break; + } + + if (!aErrStr.isEmpty()) { + aErrList.append(tr(aErrStr.toLatin1().constData())); + } } + + myGrp->ListBox1->clear(); + myGrp->ListBox2->clear(); + myGrp->ListBox1->addItems( aErrList ); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr MeasureGUI_CheckShapeDlg::createOperation() +{ + return getGeomEngine()->GetIMeasureOperations( getStudyId() ); +} + +//================================================================================= +// function : onErrorsListSelectionChanged +// purpose : +//================================================================================= +void MeasureGUI_CheckShapeDlg::onErrorsListSelectionChanged() +{ + erasePreview(); + + int aCurItem = myGrp->ListBox1->currentRow(); + + if ( aCurItem < 0 ) { + return; + } + + bool isShapeValid; + GEOM::GEOM_IMeasureOperations::ShapeErrors aErrs; + + if ( !getErrors( isShapeValid, aErrs ) ) { + myGrp->TextView1->setText( "" ); + myGrp->ListBox1->clear(); + myGrp->ListBox2->clear(); + + return; + } + + myGrp->ListBox2->clear(); + + if (aCurItem < aErrs.length()) { + GEOM::GEOM_IMeasureOperations::ShapeError aErr = aErrs[aCurItem]; + GEOM::ListOfLong aObjLst = aErr.incriminated; + QStringList aSubShapeList; + TopoDS_Shape aSelShape; + + if ( !myObj->_is_nil() && GEOMBase::GetShape( myObj, aSelShape ) ) { + TopTools_IndexedMapOfShape anIndices; + + TopExp::MapShapes( aSelShape, anIndices ); + + for ( int i = 0, n = aObjLst.length(); i < n; i++ ) { + TopoDS_Shape aSubShape = anIndices.FindKey( aObjLst[i] ); + QString aType = GEOMBase::GetShapeTypeString( aSubShape ); + + if ( !aType.isEmpty() ) { + aSubShapeList.append( QString( "%1_%2" ).arg( aType ).arg( aObjLst[i] ) ); + } + } + } + + myGrp->ListBox2->addItems( aSubShapeList ); + } +} + +//================================================================================= +// function : onSubShapesListSelectionChanged +// purpose : +//================================================================================= +void MeasureGUI_CheckShapeDlg::onSubShapesListSelectionChanged() +{ + erasePreview(); + + int aErrCurItem = myGrp->ListBox1->currentRow(); + + if (aErrCurItem < 0) { + return; + } + + QList aIds; + + for (int i = 0, n = myGrp->ListBox2->count(); i < n; i++) { + if (myGrp->ListBox2->item( i )->isSelected()) { + aIds.append(i); + } + } + + if (aIds.count() < 1) { + return; + } + + bool isShapeValid; + GEOM::GEOM_IMeasureOperations::ShapeErrors aErrs; + + if (!getErrors(isShapeValid, aErrs)) { + myGrp->TextView1->setText(""); + myGrp->ListBox1->clear(); + myGrp->ListBox2->clear(); + + return; + } + + GEOM::GEOM_IMeasureOperations::ShapeError aErr = aErrs[aErrCurItem]; + GEOM::ListOfLong aObjLst = aErr.incriminated; + TopoDS_Shape aSelShape; + TopoDS_Shape aSubShape; + TopTools_IndexedMapOfShape anIndices; + + if (!myObj->_is_nil() && GEOMBase::GetShape(myObj, aSelShape)) { + QString aMess; + + if (!isValid(aMess)) { + return; + } + + SALOME_Prs* aPrs = 0; + QList::iterator it; + + TopExp::MapShapes(aSelShape, anIndices); + + for (it = aIds.begin(); it != aIds.end(); ++it) { + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + int w = resMgr->integerValue("Geometry", "measures_line_width", 1); + + aSubShape = anIndices.FindKey(aObjLst[(*it)]); + + try { + getDisplayer()->SetColor( Quantity_NOC_RED ); + getDisplayer()->SetWidth( w ); + getDisplayer()->SetToActivate( false ); + aPrs = !aSubShape.IsNull() ? getDisplayer()->BuildPrs(aSubShape) : 0; + + if (aPrs) { + displayPreview(aPrs, true); + } + } + catch (const SALOME::SALOME_Exception& e) { + SalomeApp_Tools::QtCatchCorbaException(e); + } + } + } +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool MeasureGUI_CheckShapeDlg::execute( ObjectList& objects ) +{ + bool isShapeValid; + GEOM::GEOM_IMeasureOperations::ShapeErrors aErrs; + + if (!getErrors(isShapeValid, aErrs)) { + return false; + } + + const int aNbErrsSelected = myGrp->ListBox1->selectedItems().size(); + const bool isPublishAllErrors = (aNbErrsSelected < 1); + const bool isPublishAllShapes = + (aNbErrsSelected != 1 || myGrp->ListBox2->selectedItems().empty()); + TColStd_IndexedMapOfInteger aMapIndex; + const int aNbErrs = aErrs.length(); + int i; + + // Collect indices of shapes to be published. + for (i = 0; i < aNbErrs; i++) { + if (isPublishAllErrors || myGrp->ListBox1->item(i)->isSelected()) { + GEOM::ListOfLong aObjLst = aErrs[i].incriminated; + const int aNbShapes = aObjLst.length(); + int j; + + for (j = 0; j < aNbShapes; j++) { + if (isPublishAllShapes || myGrp->ListBox2->item(j)->isSelected()) { + aMapIndex.Add(aObjLst[j]); + } + } + } + } + + // Create objects. + GEOM::ListOfLong_var anArray = new GEOM::ListOfLong; + const int aNbShapes = aMapIndex.Extent(); + + anArray->length(aNbShapes); + + for (i = 1; i <= aNbShapes; i++) { + anArray[i - 1] = aMapIndex.FindKey(i); + } + + if (myShapesOper->_is_nil()) { + myShapesOper = getGeomEngine()->GetIShapesOperations(getStudyId()); + } + + GEOM::ListOfGO_var aList = myShapesOper->MakeSubShapes(myObj, anArray); + const int aNbObj = aList->length(); + + for (i = 0; i < aNbObj; i++) { + objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i])); + } + + return true; } diff --git a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h index ade60714d..a2ace0ae2 100644 --- a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h +++ b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h @@ -27,15 +27,15 @@ #ifndef MEASUREGUI_CHECKSHAPEDLG_H #define MEASUREGUI_CHECKSHAPEDLG_H -#include "MeasureGUI_Skeleton.h" +#include -class MeasureGUI_1Sel1TextView1Check; +class MeasureGUI_1Sel1Check1TextView2ListBox; //================================================================================= // class : MeasureGUI_CheckShapeDlg // purpose : //================================================================================= -class MeasureGUI_CheckShapeDlg : public MeasureGUI_Skeleton +class MeasureGUI_CheckShapeDlg : public GEOMBase_Skeleton { Q_OBJECT @@ -45,14 +45,32 @@ public: protected: // redefined from GEOMBase_Helper and MeasureGUI_Skeleton - virtual void processObject(); + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool execute( ObjectList& ); + virtual void processObject(); + virtual void activateSelection(); + virtual bool isValid( QString& ); + virtual bool extractPrefix() const; + +private slots: + void SelectionIntoArgument(); + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void SetEditCurrentArgument(); + void onErrorsListSelectionChanged(); + void onSubShapesListSelectionChanged(); private: - void Init(); - bool getParameters( bool&, QString& ); + void Init(); + void enterEvent( QEvent* ); + bool getErrors + ( bool&, GEOM::GEOM_IMeasureOperations::ShapeErrors&); private: - MeasureGUI_1Sel1TextView1Check* myGrp; + GEOM::GEOM_Object_var myObj; + MeasureGUI_1Sel1Check1TextView2ListBox* myGrp; + GEOM::GEOM_IShapesOperations_var myShapesOper; }; #endif // MEASUREGUI_CHECKSHAPEDLG_H diff --git a/src/MeasureGUI/MeasureGUI_Widgets.cxx b/src/MeasureGUI/MeasureGUI_Widgets.cxx index 2cbbeec46..77cdd68f3 100644 --- a/src/MeasureGUI/MeasureGUI_Widgets.cxx +++ b/src/MeasureGUI/MeasureGUI_Widgets.cxx @@ -65,6 +65,21 @@ MeasureGUI_1Sel1TextView2ListBox::~MeasureGUI_1Sel1TextView2ListBox() { } +////////////////////////////////////////// +// MeasureGUI_1Sel1Check1TextView2ListBox +////////////////////////////////////////// + +MeasureGUI_1Sel1Check1TextView2ListBox::MeasureGUI_1Sel1Check1TextView2ListBox( QWidget* parent, + Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +MeasureGUI_1Sel1Check1TextView2ListBox::~MeasureGUI_1Sel1Check1TextView2ListBox() +{ +} + ////////////////////////////////////////// // MeasureGUI_1Sel1TextView ////////////////////////////////////////// diff --git a/src/MeasureGUI/MeasureGUI_Widgets.h b/src/MeasureGUI/MeasureGUI_Widgets.h index 02fe6ea92..1f1f38824 100644 --- a/src/MeasureGUI/MeasureGUI_Widgets.h +++ b/src/MeasureGUI/MeasureGUI_Widgets.h @@ -71,6 +71,22 @@ public: ~MeasureGUI_1Sel1TextView2ListBox(); }; +////////////////////////////////////////// +// MeasureGUI_1Sel1Check1TextView2ListBox +////////////////////////////////////////// + +#include "ui_MeasureGUI_1Sel1Check1TextView2ListBox_QTD.h" + +class MeasureGUI_1Sel1Check1TextView2ListBox : public QWidget, + public Ui::MeasureGUI_1Sel1Check1TextView2ListBox_QTD +{ + Q_OBJECT + +public: + MeasureGUI_1Sel1Check1TextView2ListBox( QWidget* = 0, Qt::WindowFlags = 0 ); + ~MeasureGUI_1Sel1Check1TextView2ListBox(); +}; + ////////////////////////////////////////// // MeasureGUI_1Sel1TextView ////////////////////////////////////////// -- 2.39.2