mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-22 18:45:38 +05:00
NPAL18017: EDF GEOM V3.2.9rc1 : Exception raised when getShapeOn... function return empty list.
This commit is contained in:
parent
a3f643f22c
commit
5ce2c158cc
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#define OK "PAL_NO_ERROR"
|
#define OK "PAL_NO_ERROR"
|
||||||
#define KO "PAL_NOT_DONE_ERROR"
|
#define KO "PAL_NOT_DONE_ERROR"
|
||||||
|
#define NOT_FOUND_ANY "NOT_FOUND_ANY"
|
||||||
#define ALREADY_PRESENT "PAL_ELEMENT_ALREADY_PRESENT"
|
#define ALREADY_PRESENT "PAL_ELEMENT_ALREADY_PRESENT"
|
||||||
#define NOT_EXISTS "PAL_ELEMENT_DOES_NOT_EXISTS"
|
#define NOT_EXISTS "PAL_ELEMENT_DOES_NOT_EXISTS"
|
||||||
#define INVALID_TYPE "INVALID_TYPE_OF_ELEMENT"
|
#define INVALID_TYPE "INVALID_TYPE_OF_ELEMENT"
|
||||||
|
@ -780,7 +780,8 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (listShape.IsEmpty()) {
|
if (listShape.IsEmpty()) {
|
||||||
SetErrorCode("The given shape has no sub-shapes of the requested type");
|
//SetErrorCode("The given shape has no sub-shapes of the requested type");
|
||||||
|
SetErrorCode(NOT_FOUND_ANY); // NPAL18017
|
||||||
return aSeq;
|
return aSeq;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -825,7 +826,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* GetSubShapeAllIDs
|
* SubShapeAllIDs
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::SubShapeAllIDs
|
Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::SubShapeAllIDs
|
||||||
@ -864,7 +865,8 @@ Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::SubShapeAllIDs
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (listShape.IsEmpty()) {
|
if (listShape.IsEmpty()) {
|
||||||
SetErrorCode("The given shape has no sub-shapes of the requested type");
|
//SetErrorCode("The given shape has no sub-shapes of the requested type");
|
||||||
|
SetErrorCode(NOT_FOUND_ANY); // NPAL18017
|
||||||
return aSeq;
|
return aSeq;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1480,7 +1482,8 @@ Handle(TColStd_HSequenceOfInteger)
|
|||||||
const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result
|
const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result
|
||||||
|
|
||||||
if (listSS.Extent() < 1) {
|
if (listSS.Extent() < 1) {
|
||||||
SetErrorCode("Not a single sub-shape of the requested type found on the given surface");
|
//SetErrorCode("Not a single sub-shape of the requested type found on the given surface");
|
||||||
|
SetErrorCode(NOT_FOUND_ANY); // NPAL18017
|
||||||
return aSeqOfIDs;
|
return aSeqOfIDs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1654,7 +1657,8 @@ Handle(TColStd_HSequenceOfInteger)
|
|||||||
const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result
|
const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result
|
||||||
|
|
||||||
if (listSS.Extent() < 1) {
|
if (listSS.Extent() < 1) {
|
||||||
SetErrorCode("Not a single sub-shape of the requested type found on the given surface");
|
//SetErrorCode("Not a single sub-shape of the requested type found on the given surface");
|
||||||
|
SetErrorCode(NOT_FOUND_ANY); // NPAL18017
|
||||||
return aSeqOfIDs;
|
return aSeqOfIDs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2281,7 +2285,8 @@ Handle(TColStd_HSequenceOfInteger)
|
|||||||
const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result
|
const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result
|
||||||
|
|
||||||
if (listSS.Extent() < 1) {
|
if (listSS.Extent() < 1) {
|
||||||
SetErrorCode("Not a single sub-shape of the requested type found on the given surface");
|
//SetErrorCode("Not a single sub-shape of the requested type found on the given surface");
|
||||||
|
SetErrorCode(NOT_FOUND_ANY); // NPAL18017
|
||||||
return aSeqOfIDs;
|
return aSeqOfIDs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,8 @@ ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE"
|
|||||||
# Raise an Error Function if Operation is Failed
|
# Raise an Error Function if Operation is Failed
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
def RaiseIfFailed (Method_name, Operation):
|
def RaiseIfFailed (Method_name, Operation):
|
||||||
if Operation.IsDone() == 0:
|
#NPAL18017#if Operation.IsDone() == 0:
|
||||||
|
if operation.IsDone() == 0 and operation.GetErrorCode() != "NOT_FOUND_ANY":
|
||||||
raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
|
raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user