mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-09 02:17:26 +05:00
Consider OCCT version
This commit is contained in:
parent
057dae0b9e
commit
12cf1a48c8
@ -1265,7 +1265,9 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
|||||||
RemoveSubMeshElementsAndNodes();
|
RemoveSubMeshElementsAndNodes();
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
if (!algo->NeedDescretBoundary() && !algo->OnlyUnaryInput())
|
if (!algo->NeedDescretBoundary() && !algo->OnlyUnaryInput())
|
||||||
ret = ApplyToCollection( algo, GetCollection( gen, algo ) );
|
ret = ApplyToCollection( algo, GetCollection( gen, algo ) );
|
||||||
else
|
else
|
||||||
|
@ -1055,7 +1055,9 @@ void SMESH_MeshEditor_i::ExtrusionSweep(const SMESH::long_array & theIDsOfElemen
|
|||||||
myLastCreatedNodes = new SMESH::long_array();
|
myLastCreatedNodes = new SMESH::long_array();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
SMESHDS_Mesh* aMesh = GetMeshDS();
|
SMESHDS_Mesh* aMesh = GetMeshDS();
|
||||||
|
|
||||||
map<int,const SMDS_MeshElement*> elements;
|
map<int,const SMDS_MeshElement*> elements;
|
||||||
|
@ -49,7 +49,9 @@ bool Function::value( const double, double& f ) const
|
|||||||
if( myConv==0 )
|
if( myConv==0 )
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
f = pow( 10, f );
|
f = pow( 10, f );
|
||||||
}
|
}
|
||||||
catch(Standard_Failure)
|
catch(Standard_Failure)
|
||||||
@ -173,7 +175,9 @@ FunctionExpr::FunctionExpr( const char* str, const int conv )
|
|||||||
{
|
{
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
myExpr = ExprIntrp_GenExp::Create();
|
myExpr = ExprIntrp_GenExp::Create();
|
||||||
myExpr->Process( ( Standard_CString )str );
|
myExpr->Process( ( Standard_CString )str );
|
||||||
}
|
}
|
||||||
@ -209,7 +213,9 @@ bool FunctionExpr::value( const double t, double& f ) const
|
|||||||
( ( TColStd_Array1OfReal& )myValues ).ChangeValue( 1 ) = t;
|
( ( TColStd_Array1OfReal& )myValues ).ChangeValue( 1 ) = t;
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
f = myExpr->Expression()->Evaluate( myVars, myValues );
|
f = myExpr->Expression()->Evaluate( myVars, myValues );
|
||||||
}
|
}
|
||||||
catch(Standard_Failure) {
|
catch(Standard_Failure) {
|
||||||
@ -226,7 +232,9 @@ double FunctionExpr::integral( const double a, const double b ) const
|
|||||||
{
|
{
|
||||||
double res = 0.0;
|
double res = 0.0;
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
math_GaussSingleIntegration _int( ( math_Function& )*this, a, b, 20 );
|
math_GaussSingleIntegration _int( ( math_Function& )*this, a, b, 20 );
|
||||||
if( _int.IsDone() )
|
if( _int.IsDone() )
|
||||||
res = _int.Value();
|
res = _int.Value();
|
||||||
|
@ -220,7 +220,9 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const std::vector<double>& ta
|
|||||||
if( _convMode==0 )
|
if( _convMode==0 )
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
val = pow( 10.0, val );
|
val = pow( 10.0, val );
|
||||||
}
|
}
|
||||||
catch(Standard_Failure)
|
catch(Standard_Failure)
|
||||||
@ -314,7 +316,9 @@ bool process( const TCollection_AsciiString& str, int convMode,
|
|||||||
bool parsed_ok = true;
|
bool parsed_ok = true;
|
||||||
Handle( ExprIntrp_GenExp ) myExpr;
|
Handle( ExprIntrp_GenExp ) myExpr;
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
myExpr = ExprIntrp_GenExp::Create();
|
myExpr = ExprIntrp_GenExp::Create();
|
||||||
myExpr->Process( str.ToCString() );
|
myExpr->Process( str.ToCString() );
|
||||||
}
|
}
|
||||||
|
@ -575,7 +575,9 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh
|
|||||||
if ( !_mainEdge.IsNull() )
|
if ( !_mainEdge.IsNull() )
|
||||||
reversed = aMesh.IsReversedInChain( EE, _mainEdge );
|
reversed = aMesh.IsReversedInChain( EE, _mainEdge );
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
if ( ! computeInternalParameters( E, params, reversed )) {
|
if ( ! computeInternalParameters( E, params, reversed )) {
|
||||||
//cout << "computeInternalParameters() failed" <<endl;
|
//cout << "computeInternalParameters() failed" <<endl;
|
||||||
return false;
|
return false;
|
||||||
|
@ -243,7 +243,9 @@ void StdMeshersGUI_DistrPreview::update()
|
|||||||
x = y = 0;
|
x = y = 0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
replot();
|
replot();
|
||||||
}
|
}
|
||||||
catch(Standard_Failure)
|
catch(Standard_Failure)
|
||||||
@ -288,7 +290,9 @@ bool StdMeshersGUI_DistrPreview::init( const QString& str )
|
|||||||
{
|
{
|
||||||
bool parsed_ok = true;
|
bool parsed_ok = true;
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
myExpr = ExprIntrp_GenExp::Create();
|
myExpr = ExprIntrp_GenExp::Create();
|
||||||
myExpr->Process( ( Standard_CString ) str.latin1() );
|
myExpr->Process( ( Standard_CString ) str.latin1() );
|
||||||
}
|
}
|
||||||
@ -330,7 +334,9 @@ double StdMeshersGUI_DistrPreview::calc( bool& ok )
|
|||||||
|
|
||||||
ok = true;
|
ok = true;
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
res = myExpr->Expression()->Evaluate( myVars, myValues );
|
res = myExpr->Expression()->Evaluate( myVars, myValues );
|
||||||
}
|
}
|
||||||
catch(Standard_Failure) {
|
catch(Standard_Failure) {
|
||||||
@ -355,7 +361,9 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const
|
|||||||
case EXPONENT:
|
case EXPONENT:
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
// in StdMeshers_NumberOfSegments.cc
|
// in StdMeshers_NumberOfSegments.cc
|
||||||
// const double PRECISION = 1e-7;
|
// const double PRECISION = 1e-7;
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user