0026457: Failed build with OCCT_DEBUG enabled
authorabv <abv@opencascade.com>
Fri, 17 Jul 2015 16:20:06 +0000 (19:20 +0300)
committerabv <abv@opencascade.com>
Fri, 17 Jul 2015 16:20:06 +0000 (19:20 +0300)
Debug code enabled with OCCT_DEBUG macro corrected for compiling with new handles.

QANCollection_Handle.cxx simplified so as to avoid need of using /bigobj option when building by Visual Studio; templates of project files, CMake projects, and test perf fclasses handle corrected accordingly.

Script genproj corrected to recognize VTK and to build DRAWEXE as executable (rather than DLL).

15 files changed:
adm/genproj.tcl
adm/templates/template.vc10
adm/templates/template.vc11
adm/templates/template.vc12
adm/templates/template.vc9
src/DNaming/DNaming_RevolutionDriver.cxx
src/DNaming/DNaming_SelectionDriver.cxx
src/QANCollection/QANCollection_Handle.cxx
src/STEPCAFControl/STEPCAFControl_Reader.cxx
src/STEPConstruct/STEPConstruct_ValidationProps.cxx
src/TKQADraw/CMakeLists.txt
src/TNaming/TNaming.cxx
src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx
src/UnitsAPI/UnitsAPI.cxx
tests/perf/fclasses/handle

index 0adf812..06e187d 100644 (file)
@@ -1066,6 +1066,9 @@ proc osutils:csfList { theOS  theCsfMap } {
     # Note: Tcl library name depends on version and is chosen by #pragma
     set aCsfMap(CSF_QT)         "QtCore4.lib QtGui4.lib"
 
+    #-- VTK
+    set aCsfMap(CSF_VTK)         [osutils:vtkCsf "wnt"]
+
   } else {
 
     #-- Tcl/Tk configuration
@@ -1108,10 +1111,42 @@ proc osutils:csfList { theOS  theCsfMap } {
     set aCsfMap(CSF_GL2PS)          "gl2ps"
 
     #-- VTK
-    set aCsfMap(CSF_VTK)         "vtkCommonCore-6.1 vtkCommonDataModel-6.1 vtkCommonExecutionModel-6.1 vtkCommonMath-6.1 vtkCommonTransforms-6.1 vtkRenderingCore-6.1"
+    set aCsfMap(CSF_VTK)         [osutils:vtkCsf "unix"]
   }
 }
 
+# Returns string of library dependencies for generation of Visual Studio project or make lists.
+proc osutils:vtkCsf {{theOS ""}} {
+  set aVtkVer "6.1"
+
+  set aLibSuffix ""
+  set aPathSplitter ":"
+  
+  if {"$theOS" == "wnt"} {
+    set aPathSplitter ";"
+    set aLibSuffix ".lib"
+  }
+
+  set anOptIncs [split $::env(CSF_OPT_INC) "$aPathSplitter"]
+  foreach anIncItem $anOptIncs {
+    if {[regexp -- "vtk-(.*)$" [file tail $anIncItem] dummy aFoundVtkVer]} {
+      set aVtkVer $aFoundVtkVer
+    }
+  }
+
+  set aLibArray [list vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkCommonMath vtkCommonTransforms vtkRenderingCore \
+                      vtkRenderingOpenGL  vtkFiltersGeneral vtkIOCore vtkIOImage vtkImagingCore vtkInteractionStyle]
+
+  # Additional suffices for the libraries
+  set anIdx 0
+  foreach anItem $aLibArray {
+    lset aLibArray $anIdx $anItem-$aVtkVer$aLibSuffix
+    incr anIdx
+  }
+
+  return [join $aLibArray " "]
+}
+
 proc osutils:usedOsLibs { theToolKit theOS } {
   global path
   set aUsedLibs [list]
@@ -1603,13 +1638,6 @@ proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {}
     }
 
     set aUsedToolKits [concat $aCommonUsedTK [osutils:usedOsLibs $theToolKit "wnt"]]
-       #puts "\t 7 $WOKSteps_exec_link($theToolKit)"
-    if { [regexp {WOKStep_DLLink} [_get_options wnt WOKSteps_exec_link $theToolKit]] || [regexp {WOKStep_Libink} [_get_options wnt WOKSteps_exec_link $theToolKit]] } {
-      set aUsedToolKits [concat $aUsedToolKits "\/dll"]
-      set binext 2
-    } else {
-      set binext 1
-    }
 
     # correct names of referred third-party libraries that are named with suffix
     # depending on VC version
@@ -1647,12 +1675,9 @@ proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {}
     regsub -all -- {__TKINC__}  $aProjTmpl $anIncPaths    aProjTmpl
     regsub -all -- {__TKDEFS__} $aProjTmpl $aTKDefines    aProjTmpl
     regsub -all -- {__FILES__}  $aProjTmpl $aFilesSection aProjTmpl
-    regsub -all -- {__CONF__}   $aProjTmpl $binext        aProjTmpl
-    if { $binext == 2 } {
-      regsub -all -- {__XQTEXT__} $aProjTmpl "dll" aProjTmpl
-    } else {
-      regsub -all -- {__XQTEXT__} $aProjTmpl "exe" aProjTmpl
-    }
+    regsub -all -- {__CONF__}   $aProjTmpl Application    aProjTmpl
+
+    regsub -all -- {__XQTEXT__} $aProjTmpl "exe" aProjTmpl
 
     set aFile [open [set aVcFilePath [file join $theOutDir ${aProjName}.[osutils:vcproj:ext $theVcVer]]] w]
     fconfigure $aFile -translation crlf
index 61b3790..ee763ae 100644 (file)
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>Disabled</Optimization>
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>MaxSpeed</Optimization>
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>Disabled</Optimization>
index 876dade..5c09f22 100644 (file)
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>Disabled</Optimization>
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>MaxSpeed</Optimization>
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>Disabled</Optimization>
index 7cbdfed..6e180d9 100644 (file)
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>Disabled</Optimization>
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>MaxSpeed</Optimization>
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>Disabled</Optimization>
index 69cbaaf..9bd7358 100644 (file)
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalOptions="-MP /bigobj"
+                               AdditionalOptions="-MP"
                                AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
                                Optimization="0"
                                InlineFunctionExpansion="1"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalOptions="-MP -favor:blend /bigobj"
+                               AdditionalOptions="-MP -favor:blend"
                                AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
                                Optimization="2"
                                InlineFunctionExpansion="1"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalOptions="-MP -favor:blend /bigobj"
+                               AdditionalOptions="-MP -favor:blend"
                                AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
                                Optimization="0"
                                InlineFunctionExpansion="1"
index b8d0509..ca86865 100644 (file)
@@ -418,7 +418,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
          else {
            if(MS.HasDegenerated())
              cout <<"mkRevol has degenerated" <<endl;
-           cout << "BRep_Tool found degenerated edge (from Vfirst) TS = " << it.Value().TShape() <<endl;
+           cout << "BRep_Tool found degenerated edge (from Vfirst) TS = " << it.Value().TShape().get() <<endl;
          }
 #endif
        }
@@ -435,7 +435,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
          else {
            if(MS.HasDegenerated())
              cout <<"mkRevol has degenerated" <<endl;
-           cout << "BRep_Tool found degenerated edge (from Vlast) TS = " << it.Value().TShape() <<endl;
+           cout << "BRep_Tool found degenerated edge (from Vlast) TS = " << it.Value().TShape().get() <<endl;
          }
 #endif
        }
@@ -504,7 +504,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
          else {
            if(MS.HasDegenerated())
              cout <<"mkRevol has degenerated" <<endl;
-           cout << "BRep_Tool found degenerated edge (from Vfirst) TS = " << it.Value().TShape() <<endl;
+           cout << "BRep_Tool found degenerated edge (from Vfirst) TS = " << it.Value().TShape().get() <<endl;
          }
 #endif
        }
@@ -520,7 +520,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
          else {
            if(MS.HasDegenerated())
              cout <<"mkRevol has degenerated" <<endl;
-           cout << "BRep_Tool found degenerated edge (from Vlast) TS = " << it.Value().TShape() <<endl;
+           cout << "BRep_Tool found degenerated edge (from Vlast) TS = " << it.Value().TShape().get() <<endl;
          }
 #endif
        }
index 0b79579..ad1e152 100644 (file)
@@ -142,8 +142,7 @@ Standard_Integer DNaming_SelectionDriver::Execute(TFunction_Logbook& theLog) con
        } else {
 #ifdef OCCT_DEBUG
          Write(aNS->Get(), "Selection_Result.brep");
-         Handle(TopoDS_TShape) aTS = aNS->Get().TShape();
-         cout << "TShape = " << (Standard_Address)aTS <<endl;
+         cout << "TShape = " << aNS->Get().TShape().get() <<endl;
 #endif 
          if(aIsWire && aNS->Get().ShapeType()== TopAbs_COMPOUND) {
            TopoDS_Shape aWireShape;
index c384668..06671fd 100644 (file)
@@ -478,16 +478,8 @@ namespace
   {
     #define QA_TEST_CAST10(theTens, theDoCast) \
       QACast<QA_HANDLE_NAME(theTens ## 0)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 1)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 2)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 3)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 4)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 5)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 6)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 7)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 8)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 9)>::theDoCast(theDI, theNbIters, aPtr);
-
+      QACast<QA_HANDLE_NAME(theTens ## 5)>::theDoCast(theDI, theNbIters, aPtr);
     typedef typename TAs::element_type aPtrType;
     TAs aDummy (new aPtrType());
     theDI << "Making a pointer:\n";
@@ -582,26 +574,9 @@ static Standard_Integer QAHandleCast (Draw_Interpretor& theDI,
   std::ios::fmtflags aFlags = std::cout.flags();
   std::cout.precision (5);
 
-  #define QA_TEST_CASTAS10(theTens) \
-    case 10 * theTens + 0: qaCastAs<QA_HANDLE_NAME(theTens ## 0)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 1: qaCastAs<QA_HANDLE_NAME(theTens ## 1)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 2: qaCastAs<QA_HANDLE_NAME(theTens ## 2)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 3: qaCastAs<QA_HANDLE_NAME(theTens ## 3)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 4: qaCastAs<QA_HANDLE_NAME(theTens ## 4)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 5: qaCastAs<QA_HANDLE_NAME(theTens ## 5)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 6: qaCastAs<QA_HANDLE_NAME(theTens ## 6)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 7: qaCastAs<QA_HANDLE_NAME(theTens ## 7)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 8: qaCastAs<QA_HANDLE_NAME(theTens ## 8)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 9: qaCastAs<QA_HANDLE_NAME(theTens ## 9)>(theDI, *aHandle, aNbIters); break;
-
   switch (aPtrTo)
   {
     // vc11 requires /bigobj option
-    //QA_TEST_CASTAS10(0)
-    //QA_TEST_CASTAS10(1)
-    //QA_TEST_CASTAS10(2)
-    //QA_TEST_CASTAS10(3)
-    //QA_TEST_CASTAS10(4)
     case 0:  qaCastAs<Handle(qaclass00_50)>(theDI, *aHandle, aNbIters); break;
     case 10: qaCastAs<Handle(qaclass10_50)>(theDI, *aHandle, aNbIters); break;
     case 20: qaCastAs<Handle(qaclass20_50)>(theDI, *aHandle, aNbIters); break;
index d3ab997..31a8e50 100644 (file)
@@ -184,7 +184,7 @@ TCollection_AsciiString AddrToString(const TopoDS_Shape& theShape)
 {
   std::string anAddrStr;
   std::ostringstream ost;
-  ost << theShape.TShape().Access();
+  ost << theShape.TShape().get();
   anAddrStr = ost.str();
 
   TCollection_AsciiString aStr =
index 6bd3aab..6df3c0a 100644 (file)
@@ -673,7 +673,7 @@ Standard_Boolean STEPConstruct_ValidationProps::GetPropReal (const Handle(StepRe
   else if ( Name == "VOLUME_MEASURE" ) isArea = Standard_False; 
   else {
 #ifdef OCCT_DEBUG
-    cout << "Warning: Measure " << Model()->StringLabel ( M ) << " is neither area not volume" << endl;
+    cout << "Warning: Measure " << Model()->StringLabel ( M )->String() << " is neither area not volume" << endl;
 #endif
     return Standard_False;
   }
@@ -696,7 +696,7 @@ Standard_Boolean STEPConstruct_ValidationProps::GetPropPnt (const Handle(StepRep
   Handle(StepGeom_CartesianPoint) P = Handle(StepGeom_CartesianPoint)::DownCast ( item );
   if ( P.IsNull() || P->NbCoordinates() != 3 ) {
 #ifdef OCCT_DEBUG
-    cout << "Warning: Point " << Model()->StringLabel ( P ) << " is not valid for centroid" << endl;
+    cout << "Warning: Point " << Model()->StringLabel ( P )->String() << " is not valid for centroid" << endl;
 #endif
     return Standard_False;;
   }
index 78c03b0..175f79a 100644 (file)
@@ -21,11 +21,4 @@ else()
   endif()
 endif()
 
-if(MSVC)
-  # /bigobj is required for windows builds because of the size of
-  # some object files (CastImage for instance)
-  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
-  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj")
-endif()
-
 include(${OCCT_SOURCE_DIR}/adm/cmake/BuildToolkit.cmake)
index 24691de..dfea6cb 100644 (file)
@@ -831,8 +831,8 @@ TopoDS_Shape TNaming::FindUniqueContext(const TopoDS_Shape& Selection, const Top
 #ifdef OCCT_DEBUG
   TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape it (aMap);
   for (;it.More();it.Next()) {
-    cout <<"FindUniqueContext: Key - " <<it.Key().ShapeType()<< " " << it.Key().TShape() <<" OR = " <<it.Key().Orientation() <<
-      "  Context - " << it.Value().ShapeType() << "  " << it.Value().TShape()  << " OR = " <<it.Value().Orientation() <<endl;
+    cout <<"FindUniqueContext: Key - " <<it.Key().ShapeType()<< " " << it.Key().TShape().get() <<" OR = " <<it.Key().Orientation() <<
+      "  Context - " << it.Value().ShapeType() << "  " << it.Value().TShape().get()  << " OR = " <<it.Value().Orientation() <<endl;
   }
 #endif
   if(aMap.IsBound(Selection))
index 3cbc391..9a63230 100644 (file)
@@ -271,7 +271,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace,
       if (MkWire.IsDone()) Loop = Handle(StepShape_Loop)::DownCast(MkWire.Value());
       else {
 #ifdef OCCT_DEBUG
-       cout << TopoDSToStep::DecodeWireError(MkWire.Error()) << endl;
+       cout << TopoDSToStep::DecodeWireError(MkWire.Error())->String() << endl;
 #endif
        FP->AddWarning(errShape, " a Wire not mapped");
        continue;
index a106d7b..aa3c37c 100644 (file)
@@ -359,7 +359,7 @@ Standard_Real UnitsAPI::AnyToLS(const Standard_Real aData,
   }
 #ifdef OCCT_DEBUG
   else
-    cout<<"Warning: BAD Quantity returns in UnitsAPI::AnyToLS(" << aData << "," << aUnit << "," << aDim << ")" << endl;
+    cout<<"Warning: BAD Quantity returns in UnitsAPI::AnyToLS(" << aData << "," << aUnit << "," << aDim.get() << ")" << endl;
 #endif
   return aValue;
 }
index 8cf2bda..9c24bbc 100644 (file)
@@ -23,31 +23,26 @@ if { $ratio > 1.05 } {
 }
 
 # Check performance of down casting at different nesting depths.
-# OCCT is expected to be at least twice faster on deep nesting on x64,
-# however can be slower on 32-bit
+# OCCT is expected to be the same as C++
 set depths {3 5 10 50}
-if { [regexp x86 [dversion]] } {
-  set thresholds {2. 1.5 1. 1.2}
-} else {
-  set thresholds {1.6 1.1 0.7 0.5}
-}
+set threshold_std 1.15
+set threshold_ptr 1.05
 for {set i 0} {$i < [llength $depths]} {incr i} {
   set depth [lindex $depths $i]
-  set threshold [lindex $thresholds $i]
   puts "\nTesting DownCast at nesting depth $depth"
 
   set res [QAHandleCast $depth 0 100000]
   set res_lines [split $res \n]
-  set time_occt [lindex [lindex [split [lindex $res_lines end-2] :] end] $depth]
-  set time_std  [lindex [lindex [split [lindex $res_lines end-1] :] end] $depth]
-  set time_ptr  [lindex [lindex [split [lindex $res_lines end  ] :] end] $depth]
+  set time_occt [lindex [lindex [split [lindex $res_lines end-2] :] end] end]
+  set time_std  [lindex [lindex [split [lindex $res_lines end-1] :] end] end]
+  set time_ptr  [lindex [lindex [split [lindex $res_lines end  ] :] end] end]
   set ratio_std [expr $time_occt / $time_std]
   set ratio_ptr [expr $time_occt / $time_ptr]
   
   puts "Ratio of time of OCCT DownCast() to dynamic_cast<>: $ratio_std"
   puts "Ratio of time of OCCT DownCast() to dynamic_pointer_cast<>: $ratio_ptr"
 
-  if { $ratio_std > $threshold || $ratio_ptr > $threshold } {
+  if { $ratio_std > $threshold_std || $ratio_ptr > $threshold_ptr } {
     puts "Error: OCCT DownCast() is expected to be faster!"
   }
 }
\ No newline at end of file