COMPERR_EXCEPTION , // other exception raised
COMPERR_MEMORY_PB , // memory allocation problem
COMPERR_ALGO_FAILED , // computation failed
- COMPERR_BAD_SHAPE // bad geometry
+ COMPERR_BAD_SHAPE , // bad geometry
+ COMPERR_BAD_FACE // bad geometry
};
struct ComputeError
{
COMPERR_EXCEPTION = -6, //!< other exception raised
COMPERR_MEMORY_PB = -7, //!< std::bad_alloc exception
COMPERR_ALGO_FAILED = -8, //!< algo failed for some reason
- COMPERR_BAD_SHAPE = -9 //!< bad geometry
+ COMPERR_BAD_SHAPE = -9, //!< bad geometry
+ COMPERR_BAD_FACE = -10 //!< incorrect face type (Radial Algorithms)
};
// =============================================================
_case2char(COMPERR_EXCEPTION );
_case2char(COMPERR_MEMORY_PB );
_case2char(COMPERR_ALGO_FAILED );
+ _case2char(COMPERR_BAD_SHAPE );
+ _case2char(COMPERR_BAD_FACE );
default:;
}
return "";
CASE2TEXT( COMPERR_EXCEPTION );
CASE2TEXT( COMPERR_MEMORY_PB );
CASE2TEXT( COMPERR_BAD_SHAPE );
+ CASE2TEXT( COMPERR_BAD_FACE );
case SMESH::COMPERR_ALGO_FAILED:
if ( strlen(comment) == 0 )
text = QObject::tr("COMPERR_ALGO_FAILED");
<source>COMPERR_BAD_SHAPE</source>
<translation>Unexpected geometry</translation>
</message>
+ <message>
+ <source>COMPERR_BAD_FACE</source>
+ <translation>The face must be a full circle or a part of circle
+(i.e. the number of edges is less or equal to 3 and one of them is a circle curve)</translation>
+ </message>
<message>
<source>COMPERR_EXCEPTION</source>
<translation>Unknown exception</translation>
TopoDS_Edge CircEdge, LinEdge1, LinEdge2;
int nbe = analyseFace( aShape, CircEdge, LinEdge1, LinEdge2 );
if( nbe>3 || nbe < 1 || CircEdge.IsNull() )
- return error(COMPERR_BAD_SHAPE);
+ return error(COMPERR_BAD_FACE);
gp_Pnt P0,P1;
// points for rotation