OSD::SetSignal() called with Standard_False argument to have FPEs disabled.
Test cased modification:
de step_4 G7 - fixed reference data.
de iges_2 H9 - Fixed reference data. According to input file, there are big tolerance edge and surface, which leads to big tolerance in ref data, result and image has changed due to usage of these shapes instead of omitting them.
de end - changed behavior in case of big isolines, now isolines not break fit command in certain places.
Modeling algorithms:
Fixed 0.0 / 0.0 uncertainty in circle to quasi-angular bspline conversion.
Correction of test cases for issue CR24589
alpha_2 = alpha * 0.5e0 ;
p_param = - 1.0e0 / (alpha_2 * alpha_2) ;
- if (alpha_2 < M_PI * 0.5e0) {
- tan_alpha_2 = Tan(alpha_2) ;
- value1 = 3.0e0 * (tan_alpha_2 - alpha_2) ;
- value1 = alpha_2 / value1 ;
- p_param += value1 ;
+ if (alpha_2 < M_PI * 0.5e0)
+ {
+ if (alpha_2 < 1.0e-7)
+ {
+ // Fixed degenerate case, when obtain 0 / 0 uncertainty.
+ // According to Taylor aprroximation:
+ // b (gamma) = -6.0 / 15.0 + o(gamma^2)
+ p_param = -6.0 / 15.0;
+ }
+ else
+ {
+ tan_alpha_2 = Tan(alpha_2) ;
+ value1 = 3.0e0 * (tan_alpha_2 - alpha_2) ;
+ value1 = alpha_2 / value1 ;
+ p_param += value1 ;
+ }
}
q_param = (1.0e0 / 3.0e0) + p_param ;
// *****************************************************************
// set signals
// *****************************************************************
- OSD::SetSignal();
+ OSD::SetSignal(Standard_False);
#ifdef _WIN32
// in interactive mode, force Windows to report dll loading problems interactively
#endif //#ifdef _TK
// set signal handler in the new thread
- OSD::SetSignal();
+ OSD::SetSignal(Standard_False);
// inform the others that we have started
isTkLoopStarted = true;
#include <BRepFeat_SplitShape.hxx>
#include <BRepAlgoAPI_Section.hxx>
-#if ! defined(WNT)
+#if ! defined(_WIN32)
extern ViewerTest_DoubleMapOfInteractiveAndName& GetMapOfAIS();
#else
Standard_EXPORT ViewerTest_DoubleMapOfInteractiveAndName& GetMapOfAIS();
return 0;
}
-#ifdef WNT
+// stack overflow can be successfully handled only on 32-bit Windows
+#if defined(_WIN32) && !defined(_WIN64)
static int StackOverflow (int i = -1)
{
char arr[2000];
StackOverflow(i-1);
return i;
}
+#endif
// this code does not work with optimize mode on Windows
+#ifdef _WIN32
#pragma optimize( "", off )
#endif
static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
di << " 4 / 0 = " << res << " Does not Caught... KO"<< "\n";
Succes = Standard_False;
}
-#if defined(SOLARIS) || defined(WNT)
+#if defined(SOLARIS) || defined(_WIN32)
catch(Standard_DivideByZero)
#else
catch(Standard_NumericError)
di << "\n";
Standard_Real res, a= 4.0, b=0.0;
res = a / b;
- di << " 4.0 / 0.0 = " << res << " Does not Caught... KO"<< "\n";
- Succes = Standard_False;
+ di << " 4.0 / 0.0 = " << res << " Does not Caught... OK"<< "\n";
}
catch(Standard_DivideByZero) // Solaris, Windows w/o SSE2
{
- di << " Ok" << "\n";
+ di << " KO" << "\n";
+ Succes = Standard_False;
}
catch(Standard_NumericError) // Linux, Windows with SSE2
{
- di << " Ok" << "\n";
+ di << " KO" << "\n";
+ Succes = Standard_False;
}
catch(Standard_Failure) {
//cout << " Caught (" << Standard_Failure::Caught() << ")... KO" << endl;
(void)sin(1.); //this function tests FPU flags and raises signal (tested on LINUX).
- di << "-- "<<res<<"="<<r<<"*"<<r<<" Does not Caught... KO"<< "\n";
- Succes = Standard_False;
+ di << "-- "<<res<<"="<<r<<"*"<<r<<" Does not Caught... OK"<< "\n";
}
catch(Standard_Overflow) // Solaris, Windows w/o SSE2
{
- di << " Ok" << "\n";
+ di << " KO" << "\n";
+ Succes = Standard_False;
}
catch(Standard_NumericError) // Linux, Windows with SSE2
{
- di << " Ok" << "\n";
+ di << " KO" << "\n";
+ Succes = Standard_False;
}
catch(Standard_Failure) {
//cout << " Caught (" << Standard_Failure::Caught() << ")... KO" << endl;
}
catch(Standard_Underflow) // could be on Solaris, Windows w/o SSE2
{
- di << " Ok" << "\n";
+ di << " KO" << "\n";
+ Succes = Standard_False;
}
catch(Standard_NumericError) // could be on Linux, Windows with SSE2
{
- di << " Ok" << "\n";
+ di << " KO" << "\n";
+ Succes = Standard_False;
}
catch(Standard_Failure) {
//cout << " Caught (" << Standard_Failure::Caught() << ")... KO" << endl;
di << "\n";
Standard_Real res, r=-1;
res = sqrt(r);
- di<<" "<<res<<"=sqrt("<<r<<") Does not Caught... KO"<<"\n";
- Succes = Standard_False;
+ di<<" "<<res<<"=sqrt("<<r<<") Does not Caught... OK"<<"\n";
}
catch(Standard_NumericError) {
- di << " Ok"<< "\n";
+ di << " KO"<< "\n";
+ Succes = Standard_False;
}
catch(Standard_Failure) {
//cout << " Caught (" << Standard_Failure::Caught() << ")... KO" << endl;
di << " Does not Caught... KO"<<"\n";
Succes = Standard_False;
}
-#ifdef WNT
+#ifdef _WIN32
catch(OSD_Exception_ACCESS_VIOLATION)
#else
catch(OSD_SIGSEGV)
}
}
-#ifdef WNT
+#if defined(_WIN32) && !defined(_WIN64)
{//==== Test Stack Overflow ===============================================
try {
OCC_CATCH_SIGNALS
return 0;
}
-#ifdef WNT
+#ifdef _WIN32
#pragma optimize( "", on )
#endif
clear
smallview
if { $mist < 1 } {
- if { [info exists res_2] && [isdraw res_2] } {
- donly res_2
- }
+ if { [info exists res_2] && [isdraw res_2] } {
+ donly res_2
+ isos res_2 0
+ fit
+ isos res_2 2
+ }
+} else {
+ fit
}
-fit
xwd $imagedir/${test_image}.png
if { $mist < 1 } {
if { [catch { Close D_Second } catch_result] } {
# !!!! This file is generated automatically, do not edit manually! See end script
-puts "TODO CR23096 ALL: CHECKSHAPE : Faulty"
puts "TODO CR23096 ALL: NBSHAPES : Faulty"
+puts "TODO CR23096 ALL: TOLERANCE : Faulty"
puts "TODO CR23096 ALL: LABELS : Faulty"
puts "TODO CR23096 ALL: COLORS : Faulty"
-puts "TODO CR23096 Mandriva2010: STATSHAPE : Faulty "
-puts "TODO CR23096 Mandriva2010: Error : 4 differences with reference data found :"
-
puts "TODO DEBUG_OCC24121 Debian60-64 Windows: Warning: ShapeAnalysis_Surface"
set LinuxDiff 4
set ref_data {
DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 )
TPSTAT : Faulties = 0 ( 3 ) Warnings = 274 ( 4465 ) Summary = 274 ( 4468 )
-CHECKSHAPE : Wires = 1 ( 1 ) Faces = 3 ( 2 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
-NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1627 ( 1627 ) Summary = 39245 ( 39252 )
-STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1627 ( 1627 ) FreeWire = 22 ( 26 ) FreeEdge = 135 ( 135 ) SharedEdge = 17932 ( 17933 )
-TOLERANCE : MaxTol = 0.1961320506 ( 992.8187669 ) AvgTol = 0.0003490038155 ( 0.2648369601 )
-LABELS : N0Labels = 6 ( 6 ) N1Labels = 1642 ( 9636 ) N2Labels = 0 ( 0 ) TotalLabels = 1648 ( 9642 ) NameLabels = 1648 ( 2888 ) ColorLabels = 1644 ( 9641 ) LayerLabels = 488 ( 3995 )
+CHECKSHAPE : Wires = 2 ( 2 ) Faces = 3 ( 3 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
+NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1628 ( 1628 ) Summary = 39243 ( 39275 )
+STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1628 ( 1628 ) FreeWire = 22 ( 26 ) FreeEdge = 135 ( 135 ) SharedEdge = 17944 ( 17947 )
+TOLERANCE : MaxTol = 4.337400808e+088 ( 8.082392835e+086 ) AvgTol = 2.040579288e+085 ( 5.099401401e+083 )
+LABELS : N0Labels = 6 ( 6 ) N1Labels = 1643 ( 9638 ) N2Labels = 0 ( 0 ) TotalLabels = 1649 ( 9644 ) NameLabels = 1649 ( 2890 ) ColorLabels = 1645 ( 9643 ) LayerLabels = 489 ( 3997 )
PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 )
NCOLORS : NColors = 4 ( 5 )
COLORS : Colors = BLUE1 CYAN1 GOLD3 GREEN ( BLUE1 CYAN1 GOLD3 GREEN YELLOW )
puts "TODO CR23096 ALL: NBSHAPES : Faulty"
puts "TODO CR23096 ALL: TOLERANCE : Faulty"
-
-puts "TODO CR23096 Mandriva2010: Error : 2 differences with reference data found :"
-puts "TODO CR23096 Debian60-64: Error : 2 differences with reference data found :"
-
set LinuxDiff 2
set filename BUC61004.stp
DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 )
TPSTAT : Faulties = 0 ( 0 ) Warnings = 5 ( 43 ) Summary = 5 ( 43 )
CHECKSHAPE : Wires = 1 ( 0 ) Faces = 1 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
-NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 2523 ( 2523 ) Summary = 16186 ( 16187 )
-STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 2523 ( 2523 ) FreeWire = 0 ( 0 ) FreeEdge = 0 ( 0 ) SharedEdge = 6807 ( 6808 )
+NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 2523 ( 2523 ) Summary = 16185 ( 16187 )
+STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 2523 ( 2523 ) FreeWire = 0 ( 0 ) FreeEdge = 0 ( 0 ) SharedEdge = 6806 ( 6808 )
TOLERANCE : MaxTol = 9.829787663 ( 7.812889886 ) AvgTol = 0.01764242132 ( 0.01681498017 )
LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 )
PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 )