mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0026457: Failed build with OCCT_DEBUG enabled
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).
This commit is contained in:
parent
52f7e0d0a8
commit
1c29294ea0
@ -1066,6 +1066,9 @@ proc osutils:csfList { theOS theCsfMap } {
|
|||||||
# Note: Tcl library name depends on version and is chosen by #pragma
|
# Note: Tcl library name depends on version and is chosen by #pragma
|
||||||
set aCsfMap(CSF_QT) "QtCore4.lib QtGui4.lib"
|
set aCsfMap(CSF_QT) "QtCore4.lib QtGui4.lib"
|
||||||
|
|
||||||
|
#-- VTK
|
||||||
|
set aCsfMap(CSF_VTK) [osutils:vtkCsf "wnt"]
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
#-- Tcl/Tk configuration
|
#-- Tcl/Tk configuration
|
||||||
@ -1108,10 +1111,42 @@ proc osutils:csfList { theOS theCsfMap } {
|
|||||||
set aCsfMap(CSF_GL2PS) "gl2ps"
|
set aCsfMap(CSF_GL2PS) "gl2ps"
|
||||||
|
|
||||||
#-- VTK
|
#-- 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 } {
|
proc osutils:usedOsLibs { theToolKit theOS } {
|
||||||
global path
|
global path
|
||||||
set aUsedLibs [list]
|
set aUsedLibs [list]
|
||||||
@ -1603,13 +1638,6 @@ proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {}
|
|||||||
}
|
}
|
||||||
|
|
||||||
set aUsedToolKits [concat $aCommonUsedTK [osutils:usedOsLibs $theToolKit "wnt"]]
|
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
|
# correct names of referred third-party libraries that are named with suffix
|
||||||
# depending on VC version
|
# depending on VC version
|
||||||
@ -1647,12 +1675,9 @@ proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {}
|
|||||||
regsub -all -- {__TKINC__} $aProjTmpl $anIncPaths aProjTmpl
|
regsub -all -- {__TKINC__} $aProjTmpl $anIncPaths aProjTmpl
|
||||||
regsub -all -- {__TKDEFS__} $aProjTmpl $aTKDefines aProjTmpl
|
regsub -all -- {__TKDEFS__} $aProjTmpl $aTKDefines aProjTmpl
|
||||||
regsub -all -- {__FILES__} $aProjTmpl $aFilesSection aProjTmpl
|
regsub -all -- {__FILES__} $aProjTmpl $aFilesSection aProjTmpl
|
||||||
regsub -all -- {__CONF__} $aProjTmpl $binext aProjTmpl
|
regsub -all -- {__CONF__} $aProjTmpl Application aProjTmpl
|
||||||
if { $binext == 2 } {
|
|
||||||
regsub -all -- {__XQTEXT__} $aProjTmpl "dll" aProjTmpl
|
regsub -all -- {__XQTEXT__} $aProjTmpl "exe" aProjTmpl
|
||||||
} else {
|
|
||||||
regsub -all -- {__XQTEXT__} $aProjTmpl "exe" aProjTmpl
|
|
||||||
}
|
|
||||||
|
|
||||||
set aFile [open [set aVcFilePath [file join $theOutDir ${aProjName}.[osutils:vcproj:ext $theVcVer]]] w]
|
set aFile [open [set aVcFilePath [file join $theOutDir ${aProjName}.[osutils:vcproj:ext $theVcVer]]] w]
|
||||||
fconfigure $aFile -translation crlf
|
fconfigure $aFile -translation crlf
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
</HeaderFileName>
|
</HeaderFileName>
|
||||||
</Midl>
|
</Midl>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
@ -166,7 +166,7 @@
|
|||||||
</HeaderFileName>
|
</HeaderFileName>
|
||||||
</Midl>
|
</Midl>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
@ -209,7 +209,7 @@
|
|||||||
</HeaderFileName>
|
</HeaderFileName>
|
||||||
</Midl>
|
</Midl>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
</HeaderFileName>
|
</HeaderFileName>
|
||||||
</Midl>
|
</Midl>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
@ -168,7 +168,7 @@
|
|||||||
</HeaderFileName>
|
</HeaderFileName>
|
||||||
</Midl>
|
</Midl>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
@ -211,7 +211,7 @@
|
|||||||
</HeaderFileName>
|
</HeaderFileName>
|
||||||
</Midl>
|
</Midl>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
</HeaderFileName>
|
</HeaderFileName>
|
||||||
</Midl>
|
</Midl>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
@ -168,7 +168,7 @@
|
|||||||
</HeaderFileName>
|
</HeaderFileName>
|
||||||
</Midl>
|
</Midl>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
@ -211,7 +211,7 @@
|
|||||||
</HeaderFileName>
|
</HeaderFileName>
|
||||||
</Midl>
|
</Midl>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
|
@ -146,7 +146,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="-MP /bigobj"
|
AdditionalOptions="-MP"
|
||||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
@ -244,7 +244,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="-MP -favor:blend /bigobj"
|
AdditionalOptions="-MP -favor:blend"
|
||||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
@ -339,7 +339,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="-MP -favor:blend /bigobj"
|
AdditionalOptions="-MP -favor:blend"
|
||||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
|
@ -418,7 +418,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
|
|||||||
else {
|
else {
|
||||||
if(MS.HasDegenerated())
|
if(MS.HasDegenerated())
|
||||||
cout <<"mkRevol has degenerated" <<endl;
|
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
|
#endif
|
||||||
}
|
}
|
||||||
@ -435,7 +435,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
|
|||||||
else {
|
else {
|
||||||
if(MS.HasDegenerated())
|
if(MS.HasDegenerated())
|
||||||
cout <<"mkRevol has degenerated" <<endl;
|
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
|
#endif
|
||||||
}
|
}
|
||||||
@ -504,7 +504,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
|
|||||||
else {
|
else {
|
||||||
if(MS.HasDegenerated())
|
if(MS.HasDegenerated())
|
||||||
cout <<"mkRevol has degenerated" <<endl;
|
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
|
#endif
|
||||||
}
|
}
|
||||||
@ -520,7 +520,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
|
|||||||
else {
|
else {
|
||||||
if(MS.HasDegenerated())
|
if(MS.HasDegenerated())
|
||||||
cout <<"mkRevol has degenerated" <<endl;
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -142,8 +142,7 @@ Standard_Integer DNaming_SelectionDriver::Execute(TFunction_Logbook& theLog) con
|
|||||||
} else {
|
} else {
|
||||||
#ifdef OCCT_DEBUG
|
#ifdef OCCT_DEBUG
|
||||||
Write(aNS->Get(), "Selection_Result.brep");
|
Write(aNS->Get(), "Selection_Result.brep");
|
||||||
Handle(TopoDS_TShape) aTS = aNS->Get().TShape();
|
cout << "TShape = " << aNS->Get().TShape().get() <<endl;
|
||||||
cout << "TShape = " << (Standard_Address)aTS <<endl;
|
|
||||||
#endif
|
#endif
|
||||||
if(aIsWire && aNS->Get().ShapeType()== TopAbs_COMPOUND) {
|
if(aIsWire && aNS->Get().ShapeType()== TopAbs_COMPOUND) {
|
||||||
TopoDS_Shape aWireShape;
|
TopoDS_Shape aWireShape;
|
||||||
|
@ -478,16 +478,8 @@ namespace
|
|||||||
{
|
{
|
||||||
#define QA_TEST_CAST10(theTens, theDoCast) \
|
#define QA_TEST_CAST10(theTens, theDoCast) \
|
||||||
QACast<QA_HANDLE_NAME(theTens ## 0)>::theDoCast(theDI, theNbIters, aPtr); \
|
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 ## 5)>::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);
|
|
||||||
|
|
||||||
typedef typename TAs::element_type aPtrType;
|
typedef typename TAs::element_type aPtrType;
|
||||||
TAs aDummy (new aPtrType());
|
TAs aDummy (new aPtrType());
|
||||||
theDI << "Making a pointer:\n";
|
theDI << "Making a pointer:\n";
|
||||||
@ -582,26 +574,9 @@ static Standard_Integer QAHandleCast (Draw_Interpretor& theDI,
|
|||||||
std::ios::fmtflags aFlags = std::cout.flags();
|
std::ios::fmtflags aFlags = std::cout.flags();
|
||||||
std::cout.precision (5);
|
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)
|
switch (aPtrTo)
|
||||||
{
|
{
|
||||||
// vc11 requires /bigobj option
|
// 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 0: qaCastAs<Handle(qaclass00_50)>(theDI, *aHandle, aNbIters); break;
|
||||||
case 10: qaCastAs<Handle(qaclass10_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;
|
case 20: qaCastAs<Handle(qaclass20_50)>(theDI, *aHandle, aNbIters); break;
|
||||||
|
@ -184,7 +184,7 @@ TCollection_AsciiString AddrToString(const TopoDS_Shape& theShape)
|
|||||||
{
|
{
|
||||||
std::string anAddrStr;
|
std::string anAddrStr;
|
||||||
std::ostringstream ost;
|
std::ostringstream ost;
|
||||||
ost << theShape.TShape().Access();
|
ost << theShape.TShape().get();
|
||||||
anAddrStr = ost.str();
|
anAddrStr = ost.str();
|
||||||
|
|
||||||
TCollection_AsciiString aStr =
|
TCollection_AsciiString aStr =
|
||||||
|
@ -673,7 +673,7 @@ Standard_Boolean STEPConstruct_ValidationProps::GetPropReal (const Handle(StepRe
|
|||||||
else if ( Name == "VOLUME_MEASURE" ) isArea = Standard_False;
|
else if ( Name == "VOLUME_MEASURE" ) isArea = Standard_False;
|
||||||
else {
|
else {
|
||||||
#ifdef OCCT_DEBUG
|
#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
|
#endif
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
@ -696,7 +696,7 @@ Standard_Boolean STEPConstruct_ValidationProps::GetPropPnt (const Handle(StepRep
|
|||||||
Handle(StepGeom_CartesianPoint) P = Handle(StepGeom_CartesianPoint)::DownCast ( item );
|
Handle(StepGeom_CartesianPoint) P = Handle(StepGeom_CartesianPoint)::DownCast ( item );
|
||||||
if ( P.IsNull() || P->NbCoordinates() != 3 ) {
|
if ( P.IsNull() || P->NbCoordinates() != 3 ) {
|
||||||
#ifdef OCCT_DEBUG
|
#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
|
#endif
|
||||||
return Standard_False;;
|
return Standard_False;;
|
||||||
}
|
}
|
||||||
|
@ -21,11 +21,4 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
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)
|
include(${OCCT_SOURCE_DIR}/adm/cmake/BuildToolkit.cmake)
|
||||||
|
@ -831,8 +831,8 @@ TopoDS_Shape TNaming::FindUniqueContext(const TopoDS_Shape& Selection, const Top
|
|||||||
#ifdef OCCT_DEBUG
|
#ifdef OCCT_DEBUG
|
||||||
TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape it (aMap);
|
TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape it (aMap);
|
||||||
for (;it.More();it.Next()) {
|
for (;it.More();it.Next()) {
|
||||||
cout <<"FindUniqueContext: Key - " <<it.Key().ShapeType()<< " " << it.Key().TShape() <<" OR = " <<it.Key().Orientation() <<
|
cout <<"FindUniqueContext: Key - " <<it.Key().ShapeType()<< " " << it.Key().TShape().get() <<" OR = " <<it.Key().Orientation() <<
|
||||||
" Context - " << it.Value().ShapeType() << " " << it.Value().TShape() << " OR = " <<it.Value().Orientation() <<endl;
|
" Context - " << it.Value().ShapeType() << " " << it.Value().TShape().get() << " OR = " <<it.Value().Orientation() <<endl;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if(aMap.IsBound(Selection))
|
if(aMap.IsBound(Selection))
|
||||||
|
@ -271,7 +271,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace,
|
|||||||
if (MkWire.IsDone()) Loop = Handle(StepShape_Loop)::DownCast(MkWire.Value());
|
if (MkWire.IsDone()) Loop = Handle(StepShape_Loop)::DownCast(MkWire.Value());
|
||||||
else {
|
else {
|
||||||
#ifdef OCCT_DEBUG
|
#ifdef OCCT_DEBUG
|
||||||
cout << TopoDSToStep::DecodeWireError(MkWire.Error()) << endl;
|
cout << TopoDSToStep::DecodeWireError(MkWire.Error())->String() << endl;
|
||||||
#endif
|
#endif
|
||||||
FP->AddWarning(errShape, " a Wire not mapped");
|
FP->AddWarning(errShape, " a Wire not mapped");
|
||||||
continue;
|
continue;
|
||||||
|
@ -359,7 +359,7 @@ Standard_Real UnitsAPI::AnyToLS(const Standard_Real aData,
|
|||||||
}
|
}
|
||||||
#ifdef OCCT_DEBUG
|
#ifdef OCCT_DEBUG
|
||||||
else
|
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
|
#endif
|
||||||
return aValue;
|
return aValue;
|
||||||
}
|
}
|
||||||
|
@ -23,31 +23,26 @@ if { $ratio > 1.05 } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Check performance of down casting at different nesting depths.
|
# Check performance of down casting at different nesting depths.
|
||||||
# OCCT is expected to be at least twice faster on deep nesting on x64,
|
# OCCT is expected to be the same as C++
|
||||||
# however can be slower on 32-bit
|
|
||||||
set depths {3 5 10 50}
|
set depths {3 5 10 50}
|
||||||
if { [regexp x86 [dversion]] } {
|
set threshold_std 1.15
|
||||||
set thresholds {2. 1.5 1. 1.2}
|
set threshold_ptr 1.05
|
||||||
} else {
|
|
||||||
set thresholds {1.6 1.1 0.7 0.5}
|
|
||||||
}
|
|
||||||
for {set i 0} {$i < [llength $depths]} {incr i} {
|
for {set i 0} {$i < [llength $depths]} {incr i} {
|
||||||
set depth [lindex $depths $i]
|
set depth [lindex $depths $i]
|
||||||
set threshold [lindex $thresholds $i]
|
|
||||||
puts "\nTesting DownCast at nesting depth $depth"
|
puts "\nTesting DownCast at nesting depth $depth"
|
||||||
|
|
||||||
set res [QAHandleCast $depth 0 100000]
|
set res [QAHandleCast $depth 0 100000]
|
||||||
set res_lines [split $res \n]
|
set res_lines [split $res \n]
|
||||||
set time_occt [lindex [lindex [split [lindex $res_lines end-2] :] 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] $depth]
|
set time_std [lindex [lindex [split [lindex $res_lines end-1] :] end] end]
|
||||||
set time_ptr [lindex [lindex [split [lindex $res_lines end ] :] end] $depth]
|
set time_ptr [lindex [lindex [split [lindex $res_lines end ] :] end] end]
|
||||||
set ratio_std [expr $time_occt / $time_std]
|
set ratio_std [expr $time_occt / $time_std]
|
||||||
set ratio_ptr [expr $time_occt / $time_ptr]
|
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_cast<>: $ratio_std"
|
||||||
puts "Ratio of time of OCCT DownCast() to dynamic_pointer_cast<>: $ratio_ptr"
|
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!"
|
puts "Error: OCCT DownCast() is expected to be faster!"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user