Compare commits
49 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d2abb6d844 | ||
|
e697b85307 | ||
|
9967602647 | ||
|
e1a92d9ef0 | ||
|
730b9ecc2d | ||
|
336e2cdeda | ||
|
e5021ff47f | ||
|
9735948819 | ||
|
660a8938a3 | ||
|
642ddd1253 | ||
|
03fc07c28b | ||
|
2e84f455db | ||
|
2d7f390051 | ||
|
80ffc5f84d | ||
|
d1069cad4b | ||
|
0c4931e873 | ||
|
3ea347e562 | ||
|
510d099d15 | ||
|
5bd54bef32 | ||
|
4f7ad5fb76 | ||
|
f706c128c2 | ||
|
209ae313a5 | ||
|
81f57d1135 | ||
|
9923f08703 | ||
|
5b756182c2 | ||
|
5f69cfa70c | ||
|
19da974edc | ||
|
bcb2a742a7 | ||
|
005caf39cf | ||
|
2c8c4b8086 | ||
|
7e63845c9e | ||
|
f8d8c3f2bc | ||
|
4e61131a1c | ||
|
4e2151f654 | ||
|
475da0f135 | ||
|
538700ffa2 | ||
|
eb78d737d4 | ||
|
c1638a8db8 | ||
|
0c9c466e9d | ||
|
16f9b46dbb | ||
|
34043fc845 | ||
|
56b495d93b | ||
|
96b92906de | ||
|
f1c209dc77 | ||
|
f9ae10ed21 | ||
|
956d91571c | ||
|
c2064b60e7 | ||
|
eba0379cde | ||
|
41fc11b056 |
@@ -661,8 +661,10 @@ endif()
|
||||
if (CAN_USE_GLES2)
|
||||
if (USE_GLES2)
|
||||
add_definitions (-DHAVE_GLES2_EXT)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
|
||||
if (NOT IOS)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EGL")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GLES2")
|
||||
|
@@ -63,30 +63,45 @@ set SYS_VC_LIST {}
|
||||
set SYS_VCVARS_LIST {}
|
||||
|
||||
# detect installed Visual Studio 2017+ instances by running vswhere.exe
|
||||
if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } {
|
||||
if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } {
|
||||
lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141)"
|
||||
lappend ::SYS_VC_LIST "vc141"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
|
||||
}
|
||||
if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] } {
|
||||
if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } {
|
||||
lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141) UWP"
|
||||
lappend ::SYS_VC_LIST "vc141-uwp"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
|
||||
}
|
||||
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } {
|
||||
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } {
|
||||
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142)"
|
||||
lappend ::SYS_VC_LIST "vc142"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
|
||||
}
|
||||
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] } {
|
||||
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } {
|
||||
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142) UWP"
|
||||
lappend ::SYS_VC_LIST "vc142-uwp"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
|
||||
}
|
||||
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] } {
|
||||
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] && "$res" != "" } {
|
||||
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset ClangCL)"
|
||||
lappend ::SYS_VC_LIST "vclang"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\Auxiliary\\Build\\vcvarsall.bat"
|
||||
}
|
||||
if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } {
|
||||
lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset v143)"
|
||||
lappend ::SYS_VC_LIST "vc143"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
|
||||
}
|
||||
if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } {
|
||||
lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset v143) UWP"
|
||||
lappend ::SYS_VC_LIST "vc143-uwp"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
|
||||
}
|
||||
if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] && "$res" != "" } {
|
||||
lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset ClangCL)"
|
||||
lappend ::SYS_VC_LIST "vclang"
|
||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
|
||||
}
|
||||
|
||||
# detect installed Visual Studio instances from global environment
|
||||
@@ -175,6 +190,16 @@ proc wokdep:gui:SwitchArch {} {
|
||||
grid .myFrame.myClose -row $::aRowIter -column 6 -columnspan 2
|
||||
}
|
||||
|
||||
# update label text and visibility
|
||||
font create wokdep:gui:EmptyFont -size -1
|
||||
proc wokdep:gui:SetLabelText {theLabel theText} {
|
||||
set aFont TkDefaultFont
|
||||
if { $theText == "" } {
|
||||
set aFont wokdep:gui:EmptyFont
|
||||
}
|
||||
$theLabel configure -text $theText -font $aFont
|
||||
}
|
||||
|
||||
proc wokdep:gui:UpdateList {} {
|
||||
set anIncErrs {}
|
||||
set anLib32Errs {}
|
||||
@@ -251,16 +276,18 @@ proc wokdep:gui:UpdateList {} {
|
||||
wokdep:SearchJDK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
|
||||
.myFrame.myIncErrLbl configure -text [join $anIncErrs "\n"]
|
||||
.myFrame.myLib32_ErrLbl configure -text [join $anLib32Errs "\n"]
|
||||
.myFrame.myLib64_ErrLbl configure -text [join $anLib64Errs "\n"]
|
||||
.myFrame.myBin32_ErrLbl configure -text [join $anBin32Errs "\n"]
|
||||
.myFrame.myBin64_ErrLbl configure -text [join $anBin64Errs "\n"]
|
||||
wokdep:gui:SetLabelText .myFrame.myIncErrLbl [join $anIncErrs "\n"]
|
||||
|
||||
.myFrame.myLib32D_ErrLbl configure -text [join $anLib32Errs "\n"]
|
||||
.myFrame.myLib64D_ErrLbl configure -text [join $anLib64Errs "\n"]
|
||||
.myFrame.myBin32D_ErrLbl configure -text [join $anBin32Errs "\n"]
|
||||
.myFrame.myBin64D_ErrLbl configure -text [join $anBin64Errs "\n"]
|
||||
wokdep:gui:SetLabelText .myFrame.myIncErrLbl [join $anIncErrs "\n"]
|
||||
wokdep:gui:SetLabelText .myFrame.myLib32_ErrLbl [join $anLib32Errs "\n"]
|
||||
wokdep:gui:SetLabelText .myFrame.myLib64_ErrLbl [join $anLib64Errs "\n"]
|
||||
wokdep:gui:SetLabelText .myFrame.myBin32_ErrLbl [join $anBin32Errs "\n"]
|
||||
wokdep:gui:SetLabelText .myFrame.myBin64_ErrLbl [join $anBin64Errs "\n"]
|
||||
|
||||
wokdep:gui:SetLabelText .myFrame.myLib32D_ErrLbl [join $anLib32Errs "\n"]
|
||||
wokdep:gui:SetLabelText .myFrame.myLib64D_ErrLbl [join $anLib64Errs "\n"]
|
||||
wokdep:gui:SetLabelText .myFrame.myBin32D_ErrLbl [join $anBin32Errs "\n"]
|
||||
wokdep:gui:SetLabelText .myFrame.myBin64D_ErrLbl [join $anBin64Errs "\n"]
|
||||
|
||||
# merge duplicates
|
||||
set ::CSF_OPT_LIB32 [lsort -unique $::CSF_OPT_LIB32]
|
||||
|
@@ -236,9 +236,11 @@ proc gendoc {args} {
|
||||
return -1
|
||||
}
|
||||
} elseif {$arg_n == "s"} {
|
||||
if { [ lsearch $args_names "pdf" ] == -1 } {
|
||||
if { [ lsearch $args_names "pdf" ] != -1 } {
|
||||
puts "Warning: search is not used with PDF and will be ignored."
|
||||
continue
|
||||
}
|
||||
|
||||
if {$args_values(s) != "NULL"} {
|
||||
set SEARCH_MODE $args_values(s)
|
||||
} else {
|
||||
@@ -247,16 +249,16 @@ proc gendoc {args} {
|
||||
}
|
||||
} elseif {$arg_n == "mathjax"} {
|
||||
if { [ lsearch $args_names "pdf" ] != -1 } {
|
||||
set possible_mathjax_loc $args_values(mathjax)
|
||||
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
|
||||
set MATHJAX_LOCATION $args_values(mathjax)
|
||||
puts "$MATHJAX_LOCATION"
|
||||
} else {
|
||||
puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc."
|
||||
puts " MathJax will be used from $MATHJAX_LOCATION"
|
||||
}
|
||||
puts "Warning: MathJax is not used with PDF and will be ignored."
|
||||
}
|
||||
|
||||
set possible_mathjax_loc $args_values(mathjax)
|
||||
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
|
||||
set MATHJAX_LOCATION $args_values(mathjax)
|
||||
puts "$MATHJAX_LOCATION"
|
||||
} else {
|
||||
puts "Warning: MathJax is not used with pdf and will be ignored."
|
||||
puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc."
|
||||
puts " MathJax will be used from $MATHJAX_LOCATION"
|
||||
}
|
||||
} else {
|
||||
puts "\nWrong argument: $arg_n"
|
||||
|
@@ -260,7 +260,7 @@ proc genAllResources { theSrcDir } {
|
||||
|
||||
# Wrapper-function to generate VS project files
|
||||
proc genproj {theFormat args} {
|
||||
set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "vclang" "cbp" "xcd" "pro"}
|
||||
set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "vc143" "vclang" "cbp" "xcd" "pro"}
|
||||
set aSupportedPlatforms { "wnt" "uwp" "lin" "mac" "ios" "qnx" }
|
||||
set isHelpRequire false
|
||||
|
||||
@@ -324,6 +324,7 @@ proc genproj {theFormat args} {
|
||||
vc14 - Visual Studio 2015
|
||||
vc141 - Visual Studio 2017
|
||||
vc142 - Visual Studio 2019
|
||||
vc143 - Visual Studio 2022
|
||||
vclang - Visual Studio with ClangCL toolset
|
||||
cbp - CodeBlocks
|
||||
xcd - XCode
|
||||
@@ -560,6 +561,7 @@ proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl theSolution }
|
||||
"vc14" -
|
||||
"vc141" -
|
||||
"vc142" -
|
||||
"vc143" -
|
||||
"vclang" { OS:MKVC $anOutDir $aModules $aTools $theSolution $theFormat $isUWP}
|
||||
"cbp" { OS:MKCBP $anOutDir $aModules $theSolution $thePlatform $theCmpl }
|
||||
"xcd" {
|
||||
@@ -1014,8 +1016,8 @@ proc osutils:vcsolution:header { vcversion } {
|
||||
append var \
|
||||
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
|
||||
"# Visual Studio 2013\n"
|
||||
} elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" ||
|
||||
"$vcversion" == "vc142" || "$vcversion" == "vclang" } {
|
||||
} elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" ||
|
||||
"$vcversion" == "vc142" || "$vcversion" == "vc143" || "$vcversion" == "vclang" } {
|
||||
append var \
|
||||
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
|
||||
"# Visual Studio 14\n"
|
||||
@@ -1290,6 +1292,9 @@ proc osutils:vcproj:readtemplate {theVcVer isUWP isExec} {
|
||||
} elseif { $theVcVer == "vc142" } {
|
||||
set aVCRTVer "vc14"
|
||||
set aToolset "v142"
|
||||
} elseif { $theVcVer == "vc143" } {
|
||||
set aVCRTVer "vc14"
|
||||
set aToolset "v143"
|
||||
} elseif { $theVcVer == "vclang" } {
|
||||
set aVCRTVer "vc14"
|
||||
set aToolset "ClangCL"
|
||||
|
@@ -38,6 +38,7 @@ rem Optional 3rd-party libraries to enable
|
||||
set "USE_FREETYPE=ON"
|
||||
set "USE_RAPIDJSON=OFF"
|
||||
set "USE_DRACO=OFF"
|
||||
set "USE_PTHREADS=OFF"
|
||||
|
||||
rem Archive tool
|
||||
set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on"
|
||||
@@ -59,9 +60,14 @@ for /f %%i in ('git symbolic-ref --short HEAD') do ( set "aGitBranch=%%i" )
|
||||
|
||||
set "aBuildType=Release"
|
||||
set "aBuildTypePrefix="
|
||||
set "anExtraCxxFlags="
|
||||
if /I ["%USE_PTHREADS%"] == ["ON"] (
|
||||
set "anExtraCxxFlags=-pthread"
|
||||
set "aBuildTypePrefix=%aBuildTypePrefix%-pthread"
|
||||
)
|
||||
if ["%toDebug%"] == ["1"] (
|
||||
set "aBuildType=Debug"
|
||||
set "aBuildTypePrefix=-debug"
|
||||
set "aBuildTypePrefix=%aBuildTypePrefix%-debug"
|
||||
)
|
||||
|
||||
call :cmakeGenerate
|
||||
@@ -159,6 +165,7 @@ if ["%toCMake%"] == ["1"] (
|
||||
-D CMAKE_TOOLCHAIN_FILE:FILEPATH="%aToolchain%" ^
|
||||
-D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^
|
||||
-D BUILD_LIBRARY_TYPE:STRING="Static" ^
|
||||
-D CMAKE_CXX_FLAGS="%anExtraCxxFlags%" ^
|
||||
-D INSTALL_DIR:PATH="%aDestDir%" ^
|
||||
-D INSTALL_DIR_INCLUDE:STRING="inc" ^
|
||||
-D INSTALL_DIR_RESOURCE:STRING="src" ^
|
||||
@@ -256,6 +263,7 @@ if ["%toCMake%"] == ["1"] (
|
||||
cmake -G "MinGW Makefiles" ^
|
||||
-D CMAKE_TOOLCHAIN_FILE:FILEPATH="%aToolchain%" ^
|
||||
-D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^
|
||||
-D CMAKE_CXX_FLAGS="%anExtraCxxFlags%" ^
|
||||
-D CMAKE_INSTALL_PREFIX:PATH="%aDestDirSmpl%" ^
|
||||
-D SOURCE_MAP_BASE:STRING="%sourceMapBase%" ^
|
||||
-D OpenCASCADE_DIR:PATH="%aDestDir%/lib/cmake/opencascade" ^
|
||||
|
@@ -24,5 +24,6 @@ rem set "BUILD_Visualization=ON"
|
||||
rem set "BUILD_ApplicationFramework=ON"
|
||||
rem set "BUILD_DataExchange=ON"
|
||||
|
||||
rem set "USE_RAPIDJSON=OFF"
|
||||
rem set "USE_RAPIDJSON=ON"
|
||||
rem set "USE_DRACO=ON"
|
||||
rem set "USE_PTHREADS=ON"
|
||||
|
@@ -21,6 +21,8 @@ set "toInstall=1"
|
||||
set "toDebug=0"
|
||||
set "sourceMapBase="
|
||||
|
||||
set "USE_PTHREADS=OFF"
|
||||
|
||||
rem Configuration file
|
||||
if exist "%~dp0wasm_custom.bat" call "%~dp0wasm_custom.bat"
|
||||
|
||||
@@ -30,9 +32,14 @@ if not ["%aCmakeBin%"] == [""] ( set "PATH=%aCmakeBin%;%PATH%" )
|
||||
|
||||
set "aBuildType=Release"
|
||||
set "aBuildTypePrefix="
|
||||
set "anExtraCxxFlags="
|
||||
if /I ["%USE_PTHREADS%"] == ["ON"] (
|
||||
set "anExtraCxxFlags=-pthread"
|
||||
set "aBuildTypePrefix=%aBuildTypePrefix%-pthread"
|
||||
)
|
||||
if ["%toDebug%"] == ["1"] (
|
||||
set "aBuildType=Debug"
|
||||
set "aBuildTypePrefix=-debug"
|
||||
set "aBuildTypePrefix=%aBuildTypePrefix%-debug"
|
||||
)
|
||||
|
||||
call :cmakeGenerate
|
||||
@@ -64,6 +71,7 @@ if ["%toCMake%"] == ["1"] (
|
||||
cmake -G "MinGW Makefiles" ^
|
||||
-D CMAKE_TOOLCHAIN_FILE:FILEPATH="%aToolchain%" ^
|
||||
-D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^
|
||||
-D CMAKE_CXX_FLAGS="%anExtraCxxFlags%" ^
|
||||
-D CMAKE_INSTALL_PREFIX:PATH="%aDestDirSmpl%" ^
|
||||
-D SOURCE_MAP_BASE:STRING="%sourceMapBase%" ^
|
||||
-D OpenCASCADE_DIR:PATH="%aDestDirOcct%/lib/cmake/opencascade" ^
|
||||
|
@@ -121,8 +121,12 @@ if not "%DevEnvDir%" == "" (
|
||||
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
||||
set "DevEnvDir=%%i\Common7\IDE\"
|
||||
)
|
||||
) else if /I "%VCFMT%" == "vc143" (
|
||||
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[17.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
||||
set "DevEnvDir=%%i\Common7\IDE\"
|
||||
)
|
||||
) else if /I "%VCFMT%" == "vclang" (
|
||||
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
||||
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
||||
set "DevEnvDir=%%i\Common7\IDE\"
|
||||
)
|
||||
) else if /I "%VCFMT%" == "gcc" (
|
||||
@@ -137,6 +141,7 @@ if not "%DevEnvDir%" == "" (
|
||||
echo vc14 = VS 2015
|
||||
echo vc141 = VS 2017
|
||||
echo vc142 = VS 2019
|
||||
echo vc143 = VS 2022
|
||||
echo vclang = VS 2019 with ClangCL toolset
|
||||
exit /B
|
||||
)
|
||||
@@ -167,10 +172,15 @@ if /I "%VCFMT%" == "vc9" (
|
||||
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
)
|
||||
set "VCPlatformToolSet=v142"
|
||||
) else if /I "%VCFMT%" == "vclang" (
|
||||
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
||||
) else if /I "%VCFMT%" == "vc143" (
|
||||
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[17.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
||||
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
)
|
||||
set "VCPlatformToolSet=v143"
|
||||
) else if /I "%VCFMT%" == "vclang" (
|
||||
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
||||
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
)
|
||||
set "VCPlatformToolSet=ClangCL"
|
||||
) else if /I "%VCFMT%" == "gcc" (
|
||||
rem MinGW
|
||||
|
@@ -12,7 +12,9 @@ samples/samples.md
|
||||
../samples/CSharp/ReadMe.md
|
||||
../samples/CSharp/ReadMe_D3D.md
|
||||
../samples/qt/AndroidQt/ReadMe.md
|
||||
../samples/qt/IESample/ReadMe.md
|
||||
../samples/qt/OCCTOverview/ReadMe.md
|
||||
../samples/qt/Tutorial/ReadMe.md
|
||||
../samples/java/jniviewer/ReadMe.md
|
||||
../samples/ios/UIKitSample/ReadMe.md
|
||||
../samples/webgl/ReadMe.md
|
||||
@@ -20,6 +22,7 @@ samples/ocaf.md
|
||||
samples/ocaf_func.md
|
||||
samples/draw_scripts.md
|
||||
|
||||
samples/novice_guide.md
|
||||
tutorial/tutorial.md
|
||||
|
||||
build/build_upgrade.md
|
||||
|
@@ -6,6 +6,8 @@
|
||||
|
||||
tutorial/tutorial.md
|
||||
|
||||
samples/novice_guide.md
|
||||
|
||||
upgrade/upgrade.md
|
||||
|
||||
user_guides/foundation_classes/foundation_classes.md
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Draw Demo Scripts {#samples__draw_scripts}
|
||||
Draw: Demo Scripts {#samples__draw_scripts}
|
||||
================
|
||||
|
||||
All demo scripts are provided with OCCT sources and locate in <i>CASROOT/samples/tcl</i>. To play around them please
|
||||
|
BIN
dox/samples/images/sample_overview_qt_geometry.png
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
dox/samples/images/sample_overview_qt_ocaf.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
dox/samples/images/sample_overview_qt_topology.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
dox/samples/images/sample_overview_qt_triangulation.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
dox/samples/images/sample_overview_qt_viewers.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
dox/samples/images/sample_overview_qt_xde.png
Normal file
After Width: | Height: | Size: 28 KiB |
115
dox/samples/novice_guide.md
Normal file
@@ -0,0 +1,115 @@
|
||||
Novice Guide {#samples__novice_guide}
|
||||
=======
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section diffs Modeling with OCCT: Key differences
|
||||
|
||||
Open CASCADE Technology (OCCT) is an object-oriented C++ framework designed for rapid production of sophisticated CAD/CAM/CAE applications.
|
||||
In other words, it provides endless possibilities for raw 2D and 3D modeling in C++ environment.
|
||||
Unlike end-user software, it is used by the application developers and therefore strongly differs from the most popular CAD/CAM/CAE software packages.
|
||||
OCCT provides building blocks enough for modeling, editing, visualization, and data interoperability of 2D and 3D objects.
|
||||
|
||||
By using OCCT, users can create the objects of their desire (or edit already existing ones) using raw code commands.
|
||||
It is a more complicated process than using GUI-based software, but it provides much more flexibility than even script-based manipulations that are available within existing CAD/CAM/CAE applications.
|
||||
However, to fully grasp the possibilities of OCCT it is best for the user to have previous experience in C++ at least at a basic level.
|
||||
|
||||
@section basics Understanding the principles
|
||||
|
||||
If you don't have any programming skills, grasping the full magnitude of OCCT workflow is still an option.
|
||||
The documentation for OCCT contains several entry points for new users.
|
||||
It will not explain all OCCT classes but will help to comprehend the workflow and help start thinking in terms of Open CASCADE Technology.
|
||||
|
||||
The most basic workflow is described in the @ref occt__tutorial "OCCT Tutorial" - this is an excellent starting point for new users.
|
||||
In this tutorial you will create a solid model step-by-step using different classes and methods.
|
||||
Each step of the tutorial contains code snippets and images.
|
||||
|
||||
The basics involved in the modeling process are explained.
|
||||
When the basics of OCCT are clear, the next logical step is to check out @ref samples "sample applications" and examine those that suit your needs.
|
||||
For these, the best starting point is **OCCTOverview** located in /samples/qt subfolder of OCCT installation.
|
||||
|
||||
This sample provides code examples for several actions as well as visualization of these code snippets output.
|
||||
The Overview interface is dynamically changing based on selected **Category** at the menu.
|
||||
Additional menu buttons will appear, providing users with subcategories and relevant commands to select one of the actions.
|
||||
The result will appear in the viewer window, the code will appear at the top right, and in several cases the output will be produced at the bottom right window.
|
||||
|
||||
@figure{sample_overview_qt_viewers.png,"Comparison of 3D and 2D viewer windows",240} height=420px
|
||||
|
||||
The 3D viewer window has a row of preset interface buttons to customize the visual output.
|
||||
|
||||
Those buttons can be grouped into three types, left to right:
|
||||
|
||||
- View controls: **Fit all** and **Isometric**, will center the view and reset the camera angles respectively;
|
||||
- Display mode customization: **HLR,** e.g. "Hidden line removal" (works only when shading is disabled) can be turned on and off;
|
||||
solid models may be displayed either in **Shading** or **Wireframe** modes. **Transparency** level may be set for models in shading mode;
|
||||
- The last four buttons in a row are beautifiers enabling Ray-tracing engine and configuring it's parameters.
|
||||
|
||||
At the bottom left of the screen the orientation cube (trihedron) is located.
|
||||
The trihedron interactively shows the position of the camera in relation to the XYZ axis of the displayed data.
|
||||
The sides of the trihedron are labeled to help with orientation.
|
||||
Click on a side of the box to orient the camera view along the preferred axis.
|
||||
|
||||
The 2D viewer window lacks most of these elements and only have **Fit all** button.
|
||||
|
||||
The **Geometry** category of the Overview focuses on primitive objects like dots, lines (including vectors) or planes.
|
||||
These objects will appear in the viewer after the subcategory is selected.
|
||||
This section will demonstrate these entities both in 2D and 3D view mode and provide basic examples of parametric creation and data analysis.
|
||||
|
||||
@figure{sample_overview_qt_geometry.png,"",240} height=440px
|
||||
|
||||
The usage of the functions shown in the Overview is described more thoroughly at the @ref occt_user_guides__modeling_data "Modeling data" section of the documentation.
|
||||
Additionally, @ref occt_user_guides__modeling_algos "Modeling Algorithms" are used in more complex cases.
|
||||
|
||||
The **Topology** section of the Overview demonstrates the functions used in 3D operations.
|
||||
Multiple use cases are provided, including different object intersections, modifying and calculations.
|
||||
Some of these use cases are described in the documentation, such as @ref occt_user_guides__inspector "Inspector" usage.
|
||||
|
||||
@figure{sample_overview_qt_topology.png,"",240} height=440px
|
||||
|
||||
The subsections are grouped as shown on the screenshot before.
|
||||
Most shapes and primitive objects are introduced and then followed by a set of operations and interactions.
|
||||
|
||||
The **Triangulation** segment allows computing the number of triangles on a shape.
|
||||
|
||||
This may be inspected via [Poly_Triangulation Class Reference](https://dev.opencascade.org/doc/refman/html/class_poly___triangulation.html) -
|
||||
a part of the [Reference manual](https://dev.opencascade.org/doc/refman/html/index.html),
|
||||
an overall Open CASCADE code guide that may be used to inspect the key points in classes and their connections.
|
||||
|
||||
@figure{sample_overview_qt_triangulation.png,"",240} height=440px
|
||||
|
||||
The triangulation uses some of Mesh-related classes - see full description at @ref occt_user_guides__mesh "Mesh" documentation section.
|
||||
|
||||
The **Data exchange** section provides examples of how to export and import files of several different formats.
|
||||
|
||||
@figure{sample_overview_qt_xde.png,"",240} height=440px
|
||||
|
||||
The **OCAF** section gives an introduction for the @ref intro_overview_ocaf "Open CASCADE Application Framework" functionality.
|
||||
To test these functions, create an object first (box or cylinder).
|
||||
After that, the object may be modified and saved. Actions are recorded and may be undone or redone.
|
||||
|
||||
@figure{sample_overview_qt_ocaf.png,"",240} height=440px
|
||||
|
||||
**Viewers** section demonstrates examples of the 2D and 3D visualization outputs.
|
||||
Check @ref occt_user_guides__visualization "Visualization" section of the documentation for a detailed description.
|
||||
In addition to these two samples, there are much more that might be of use to a new user based on their particular use case.
|
||||
|
||||
Check Readme files in the sample directories to learn more about samples compilation.
|
||||
|
||||
**Note:** source code for OCCTOverview is stored at 'samples/qt/OCCTOverview/src' folder in your OCCT root,
|
||||
and the source code files for examples presented in subsections are stored at 'samples/OCCTOverview/code folder'.
|
||||
Several utility classes that are not presented in the example window may be found in example source code files.
|
||||
|
||||
The overall classes introduction may be found in the @ref occt_user_guides__foundation_classes "Foundation Classes" section of the documentation.
|
||||
The "Introduction" section contains short descriptions of the most massive entries in the documentation.
|
||||
|
||||
@section helps Additional assistance
|
||||
|
||||
There are several places that may be of use for new users.
|
||||
The first one is [Training & E-learning](https://dev.opencascade.org/resources/trainings) page that lists available trainings and describes their specifics.
|
||||
|
||||
The second one is the Overview documentation (this document is a part of it) - here you can find information that suits most of the use cases.
|
||||
This may seem overwhelming at first, but if you have the clear understanding of what do you seek, you will most likely find the required information.
|
||||
|
||||
Aside from the Overview documentation itself, the [Reference manual](https://dev.opencascade.org/doc/refman/html/index.html) is present.
|
||||
Use it to check classes descriptions, dependencies and examples.
|
||||
Additionally, there is a [Forum](https://dev.opencascade.org/forums) where you can contact the OCCT community and developers.
|
@@ -1,4 +1,4 @@
|
||||
OCAF Usage {#samples__ocaf}
|
||||
OCAF: Usage Tutorial {#samples__ocaf}
|
||||
========
|
||||
|
||||
## Getting Started
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Function Mechanism Usage {#samples__ocaf_func}
|
||||
OCAF: Function Mechanism {#samples__ocaf_func}
|
||||
========================
|
||||
|
||||
Let us describe the usage of the "Function Mechanism" of Open CASCADE Application Framework on a simple example.
|
||||
|
@@ -1,176 +1,56 @@
|
||||
Tutorials and Samples {#samples}
|
||||
=====================
|
||||
|
||||
Tutorial: Modelling a Bottle
|
||||
----------------------------
|
||||
The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object.
|
||||
The purpose of the tutorial is not to explain all OCCT classes but
|
||||
to help start thinking in terms of the Open CASCADE Technology.
|
||||
- @subpage samples__tutorials
|
||||
* @ref samples__novice_guide
|
||||
<br>A document providing an introductory information to newcomers.
|
||||
* @ref samples__draw_scripts
|
||||
<br>A set of demo scripts demonstrating OCCT functionality from DRAW.
|
||||
These scripts can be also considered as a tutorials on **Tcl** usage within @ref occt_user_guides__test_harness "Draw Harness".
|
||||
* @ref occt__tutorial
|
||||
<br>A programming tutorial teaching how to use OCCT services to model a 3D object.
|
||||
See also @ref samples_qt_tutorial
|
||||
* @ref samples__ocaf
|
||||
<br>A set of code snippets performing typical actions with @ref occt_user_guides__ocaf "OCAF" services for newcomers.
|
||||
* @ref samples__ocaf_func
|
||||
<br>A simple example dedicated to the usage of "Function Mechanism" of @ref occt_user_guides__ocaf "OCCT Application Framework".
|
||||
- @subpage samples__projects
|
||||
* @ref samples_qt_iesample
|
||||
<br>A cross-platform multi-document 3D Viewer sample with CAD import / export functionality based on **Qt Widgets** framework.
|
||||
* @ref samples_qml_android_occt
|
||||
<br>A cross-platform 3D Viewer sample with CAD import based on **QtQuick** framework.
|
||||
* @ref samples_qt_tutorial
|
||||
<br>A cross-platform sample application based on **Qt Widgets** framework and implementing @ref occt__tutorial.
|
||||
* @ref samples_qt_overview
|
||||
<br>A sample application interactively demonstrating OCCT C++ usage with code snippets for newcomers.
|
||||
* @ref samples_mfc_standard
|
||||
<br>A set of projects for Windows platform demonstrating OCCT usage based on **Microsoft Foundation Class** (**MFC**) library.
|
||||
* @ref samples_csharp_occt
|
||||
<br>A Multi-document 3D Viewer sample with CAD import / export functionality based on .NET and **Windows Forms** or **WPF**.
|
||||
* @ref samples_csharp_direct3d
|
||||
<br>3D Viewer sample wrapped into Direct3D context based on .NET and **Windows Presentation Foundation** (**WPF**).
|
||||
* @ref occt_samples_webgl
|
||||
<br>3D Viewer sample based on **Emscripten SDK** representing a static HTML page to be opened in Web Browser.
|
||||
* @ref samples_java_android_occt
|
||||
<br>3D Viewer sample with CAD import for Android mobile platform based on Android SDK and JNI layer.
|
||||
* @ref occt_samples_ios_uikit
|
||||
<br>3D Viewer sample for iOS platform based on Apple **UIKit** framework.
|
||||
|
||||
This tutorial assumes that the user has experience in using and setting up C++.
|
||||
From the viewpoint of programming, Open CASCADE Technology is designed
|
||||
to enhance user's C++ tools with high performance modeling classes, methods and functions.
|
||||
The combination of these resources allows creating substantial applications.
|
||||
@page samples__tutorials Tutorials and Demos
|
||||
- @subpage samples__novice_guide
|
||||
- @subpage samples__draw_scripts
|
||||
- @subpage occt__tutorial
|
||||
- @subpage samples__ocaf
|
||||
- @subpage samples__ocaf_func
|
||||
|
||||
Read more about @subpage occt__tutorial
|
||||
|
||||
MFC
|
||||
---------
|
||||
|
||||
Visual C++ programming samples containing 10 Visual C++ projects
|
||||
illustrating how to use a particular module or functionality.
|
||||
|
||||
The list of MFC samples:
|
||||
|
||||
* Geometry
|
||||
* Modeling
|
||||
* Viewer2d
|
||||
* Viewer3d
|
||||
* ImportExport
|
||||
* Ocaf
|
||||
* Triangulation
|
||||
* HLR
|
||||
* Animation
|
||||
* Convert
|
||||
|
||||
@figure{/samples/images/samples_mvc.png}
|
||||
|
||||
**Remarks:**
|
||||
|
||||
* MFC samples are available only on Windows platform;
|
||||
* To start a sample use Open CASCADE Technology\\Samples\\Mfc\\ item of the Start\\Programs menu;
|
||||
* Read carefully readme.txt to learn about launching and compilation options.
|
||||
|
||||
See @subpage samples_mfc_standard "Readme" for details.
|
||||
|
||||
Qt
|
||||
---
|
||||
|
||||
OCCT includes several samples based on Qt application framework.
|
||||
These samples are available on all supported desktop platforms.
|
||||
|
||||
To start a sample on Windows use Open CASCADE Technology\\Samples\\Qt\\ item of the Start\\Programs menu.
|
||||
|
||||
Import Export
|
||||
-------------
|
||||
|
||||
Import Export programming sample contains 3D Viewer and Import / Export functionality.
|
||||
|
||||
@figure{/samples/images/samples_qt.png}
|
||||
|
||||
Tutorial
|
||||
---------
|
||||
|
||||
The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object.
|
||||
The purpose of the tutorial is not to explain all OCCT classes but
|
||||
to help start thinking in terms of the Open CASCADE Technology.
|
||||
|
||||
This tutorial assumes that the user has experience in using and setting up C++.
|
||||
From the viewpoint of programming, Open CASCADE Technology is designed
|
||||
to enhance user's C++ tools with high performance modeling classes, methods and functions.
|
||||
The combination of these resources allows creating substantial applications.
|
||||
|
||||
**See also:** @ref occt__tutorial "OCCT Tutorial"
|
||||
|
||||
Overview
|
||||
---------
|
||||
|
||||
The Qt application providing samples for basic usage of C++ API of various OCCT functionality.
|
||||
|
||||
The samples are organized in several categories according to relevant module of OCCT:
|
||||
|
||||
* Geometry
|
||||
* Topology,
|
||||
* Triangulation
|
||||
* DataExchange
|
||||
* OCAF
|
||||
* Viewer 2d
|
||||
* Viewer 3d
|
||||
|
||||
Each sample presents geometry view, C++ code fragment and sample output window.
|
||||
|
||||
@figure{/samples/images/sample_overview_qt.png}
|
||||
|
||||
See \subpage samples_qt_overview "Readme" for details.
|
||||
|
||||
C#
|
||||
---
|
||||
|
||||
C# sample demonstrates integration of OCCT 3D Viewer and Import / Export functionality into .NET applications (using Windows Forms and WPF front ends).
|
||||
|
||||
@figure{/samples/images/samples_c__ie.png}
|
||||
|
||||
Import:
|
||||
|
||||
* BRep
|
||||
* Iges
|
||||
* Step
|
||||
|
||||
Export:
|
||||
|
||||
* Brep
|
||||
* Iges
|
||||
* Step
|
||||
* Stl
|
||||
* Vrml
|
||||
|
||||
See @subpage samples_csharp_occt "C# sample Readme" for details.
|
||||
|
||||
There is also another C# example with the same functionality, which demonstrates the integration of Direct3D Viewer into .NET applications using WPF front end.
|
||||
|
||||
See @subpage samples_csharp_direct3d "Direct3D C# sample Readme" for details.
|
||||
|
||||
Android
|
||||
---------
|
||||
|
||||
There are two samples are representing usage OCCT framework on Android mobile platform. They represent an OCCT-based 3D-viewer with CAD import support in formats BREP, STEP and IGES: jniviewer (java) and AndroidQt (qt+qml)
|
||||
|
||||
jniviewer
|
||||
@figure{/samples/images/samples_java_android_occt.jpg}
|
||||
Java -- See @subpage samples_java_android_occt "Android Java sample Readme" for details.
|
||||
|
||||
AndroidQt
|
||||
@figure{/samples/images/samples_qml_android_occt.jpg}
|
||||
Qt -- See \subpage samples_qml_android_occt "Android Qt sample Readme" for details.
|
||||
|
||||
iOS
|
||||
---
|
||||
|
||||
There is a sample demonstrating usage of OCCT on iOS with Apple UIKit framework.
|
||||
|
||||
@figure{/samples/images/sample_ios_uikit.png}
|
||||
|
||||
See @subpage occt_samples_ios_uikit "iOS sample Readme" for details.
|
||||
|
||||
Web
|
||||
---------
|
||||
|
||||
WebGL Viewer sample demonstrating usage of OCCT 3D Viewer in Web browser with Emscripten SDK can be found in `samples/webgl`.
|
||||
|
||||
@figure{/samples/images/sample_webgl.png}
|
||||
|
||||
See @subpage occt_samples_webgl "WebGL sample Readme" for details.
|
||||
|
||||
OCAF Usage Sample
|
||||
------------------
|
||||
|
||||
The provided set of samples dedicates to get initial knowledge about typical actions with OCAF services. It may be
|
||||
useful for newcomers.
|
||||
|
||||
Read more about @subpage samples__ocaf
|
||||
|
||||
OCAF Function Mechanism Usage
|
||||
-----------------------------
|
||||
|
||||
This simple example dedicates to the usage of "Function Mechanism" of OCCT Application Framework. It represents a "nail"
|
||||
composed by a cone and two cylinders of different radius and height.
|
||||
|
||||
Read more about @subpage samples__ocaf_func
|
||||
|
||||
Draw Demo Scripts
|
||||
------------------
|
||||
|
||||
A set of demo scripts demonsrates using OCCT functionality from DRAW. These scripts can be also considered as a
|
||||
tutorials on tcl usage within Draw.
|
||||
|
||||
Read more about @subpage samples__draw_scripts
|
||||
@page samples__projects Sample Projects
|
||||
- @subpage samples_qt_iesample
|
||||
- @subpage samples_qml_android_occt
|
||||
- @subpage samples_qt_tutorial
|
||||
- @subpage samples_qt_overview
|
||||
- @subpage samples_mfc_standard
|
||||
- @subpage samples_csharp_occt
|
||||
- @subpage samples_csharp_direct3d
|
||||
- @subpage occt_samples_webgl
|
||||
- @subpage samples_java_android_occt
|
||||
- @subpage occt_samples_ios_uikit
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Tutorial {#occt__tutorial}
|
||||
Modeling: Bottle Tutorial {#occt__tutorial}
|
||||
=======
|
||||
|
||||
@tableofcontents
|
||||
|
@@ -1,8 +1,9 @@
|
||||
OCCT CSharp sample {#samples_csharp_occt}
|
||||
.NET: Import/Export (C#|C++/CLI|WinForms|WPF) {#samples_csharp_occt}
|
||||
==================
|
||||
|
||||
This sample demonstrates how to use OCCT libraries in <b>.Net</b> application
|
||||
written using **CSharp** and **Windows Forms** or **Windows Presentation Foundation** (WPF).
|
||||
The sample could be found within OCCT repository in folder `/samples/CSharp/`.
|
||||
|
||||
The connection between .Net and OCCT (C++) level is provided by proxy library
|
||||
**OCCProxy**, written in C++/CLI. The proxy library contains a single *ref* class
|
||||
@@ -14,6 +15,8 @@ Both applications provide the same functionality as the standard OCCT Import/Exp
|
||||
The first project is called *IE_WinForms* and uses Windows Forms for GUI.
|
||||
The second application is called *IE_WPF_WinForms* and uses Windows Presentation Foundation.
|
||||
|
||||
@figure{samples_c__ie.png}
|
||||
|
||||
Note a few important details:
|
||||
|
||||
- OCCT template class *NCollection_Haft* is used to encapsulate C++ class into a field of *ref* class;
|
||||
|
@@ -1,8 +1,9 @@
|
||||
Direct3D CSharp sample {#samples_csharp_direct3d}
|
||||
==================
|
||||
.NET: D3D/OpenGL Viewer (C#|C++/CLI|WPF) {#samples_csharp_direct3d}
|
||||
==================
|
||||
|
||||
This sample demonstrates how to use OCCT and DirectX libraries in <b>.Net</b> application
|
||||
written using **CSharp** and **Windows Presentation Foundation** (WPF).
|
||||
The sample could be found within OCCT repository in folder `/samples/CSharp/`.
|
||||
|
||||
The connection between .Net, OCCT (C++) and DirectX level is provided by proxy libraries,
|
||||
**OCCProxy** and **D3DProxy**, written in C++/CLI. The proxy library **OCCProxy** contains a single
|
||||
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
@@ -311,7 +311,7 @@ void OcafSamples::ModifyBoxOcafSample()
|
||||
Handle(TFunction_Function) aFunction;
|
||||
if (!aLabel.FindAttribute(TFunction_Function::GetID(), aFunction))
|
||||
{
|
||||
myResult << "Object cannot be modify.";
|
||||
myResult << "Object cannot be modified.";
|
||||
return;
|
||||
}
|
||||
// Get the Standard_GUID of the TFunction_FunctionDriver of the selected object TFunction_Function attribute
|
||||
@@ -413,7 +413,7 @@ void OcafSamples::ModifyCylinderOcafSample()
|
||||
Handle(TFunction_Function) aFunction;
|
||||
if (!aLabel.FindAttribute(TFunction_Function::GetID(), aFunction))
|
||||
{
|
||||
myResult << "Object cannot be modify.";
|
||||
myResult << "Object cannot be modified.";
|
||||
return;
|
||||
}
|
||||
// Get the Standard_GUID of the TFunction_FunctionDriver of the selected object TFunction_Function attribute
|
||||
|
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(glfw-occt-demo)
|
||||
|
||||
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/adm/cmake" ${CMAKE_MODULE_PATH})
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(APP_VERSION_MAJOR 1)
|
||||
set(APP_VERSION_MINOR 0)
|
||||
@@ -24,15 +26,14 @@ source_group ("Sources" FILES
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
# Open CASCADE Technology
|
||||
find_package(OpenCASCADE REQUIRED NO_DEFAULT_PATH)
|
||||
if (OpenCASCADE_FOUND)
|
||||
message (STATUS "Using OpenCASCADE from \"${OpenCASCADE_DIR}\"" )
|
||||
INCLUDE_DIRECTORIES(${OpenCASCADE_INCLUDE_DIR})
|
||||
LINK_DIRECTORIES(${OpenCASCADE_LIBRARY_DIR})
|
||||
find_package (OpenCASCADE REQUIRED)
|
||||
if (NOT OpenCASCADE_FOUND)
|
||||
message (FATAL_ERROR "coult not find OpenCASCADE, please set OpenCASCADE_DIR variable" )
|
||||
else()
|
||||
message (WARNING "Could not find OpenCASCADE, please set OpenCASCADE_DIR variable." )
|
||||
set (OCCT_LIBRARY_DIR)
|
||||
set (OCCT_BIN_DIR)
|
||||
message (STATUS "Using OpenCASCADE from \"${OpenCASCADE_INSTALL_PREFIX}\"" )
|
||||
message (STATUS "OpenCASCADE_INCLUDE_DIR=${OpenCASCADE_INCLUDE_DIR}")
|
||||
message (STATUS "OpenCASCADE_LIBRARY_DIR=${OpenCASCADE_LIBRARY_DIR}")
|
||||
INCLUDE_DIRECTORIES(${OpenCASCADE_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
SET(OpenCASCADE_LIBS
|
||||
|
@@ -55,7 +55,7 @@ GlfwOcctWindow::GlfwOcctWindow (int theWidth, int theHeight, const TCollection_A
|
||||
myYBottom = myYTop + aHeight;
|
||||
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
myDisplay = new Aspect_DisplayConnection (glfwGetX11Display());
|
||||
myDisplay = new Aspect_DisplayConnection ((Aspect_XDisplay* )glfwGetX11Display());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
157
samples/glfw/adm/cmake/FindOpenCASCADE.cmake
Normal file
@@ -0,0 +1,157 @@
|
||||
# This script finds OpenCASCADE Technology libraries.
|
||||
# The script requires:
|
||||
# OpenCASCADE_DIR - root OCCT folder or folder with CMake configuration files
|
||||
#
|
||||
# Script will define the following variables on success:
|
||||
# OpenCASCADE_FOUND - package is successfully found
|
||||
# OpenCASCADE_INCLUDE_DIR - directory with headers
|
||||
# OpenCASCADE_LIBRARY_DIR - directory with libraries for linker
|
||||
# OpenCASCADE_BINARY_DIR - directory with DLLs
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
# MY_PLATFORM variable
|
||||
math (EXPR MY_BITNESS "32 + 32*(${CMAKE_SIZEOF_VOID_P}/8)")
|
||||
if (WIN32)
|
||||
set (MY_PLATFORM "win${MY_BITNESS}")
|
||||
elseif(APPLE)
|
||||
set (MY_PLATFORM "mac")
|
||||
else()
|
||||
set (MY_PLATFORM "lin")
|
||||
endif()
|
||||
|
||||
# MY_PLATFORM_AND_COMPILER variable
|
||||
if (MSVC)
|
||||
if (MSVC90)
|
||||
set (MY_COMPILER vc9)
|
||||
elseif (MSVC10)
|
||||
set (MY_COMPILER vc10)
|
||||
elseif (MSVC11)
|
||||
set (MY_COMPILER vc11)
|
||||
elseif (MSVC12)
|
||||
set (MY_COMPILER vc12)
|
||||
elseif (MSVC14)
|
||||
set (MY_COMPILER vc14)
|
||||
else()
|
||||
set (MY_COMPILER vc15)
|
||||
message (WARNING "Unknown msvc version. $$MY_COMPILER is used")
|
||||
endif()
|
||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCC)
|
||||
set (MY_COMPILER gcc)
|
||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
||||
set (MY_COMPILER gcc)
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set (MY_COMPILER clang)
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
||||
set (MY_COMPILER icc)
|
||||
else()
|
||||
set (MY_COMPILER ${CMAKE_GENERATOR})
|
||||
string (REGEX REPLACE " " "" COMPILER ${MY_COMPILER})
|
||||
endif()
|
||||
set (MY_PLATFORM_AND_COMPILER "${MY_PLATFORM}/${MY_COMPILER}")
|
||||
|
||||
set (OpenCASCADE_DIR "" CACHE PATH "Path to Open CASCADE libraries.")
|
||||
|
||||
# default paths
|
||||
set (OpenCASCADE_INCLUDE_DIR "${OpenCASCADE_DIR}/inc")
|
||||
set (OpenCASCADE_LIBRARY_DIR "${OpenCASCADE_DIR}/${MY_PLATFORM_AND_COMPILER}/lib")
|
||||
set (OpenCASCADE_BINARY_DIR "${OpenCASCADE_DIR}/${MY_PLATFORM_AND_COMPILER}/bin")
|
||||
|
||||
# complete list of OCCT Toolkits (copy-paste from adm/UDLIST, since installed OCCT does not include UDLIST)
|
||||
set (OpenCASCADE_TKLIST "")
|
||||
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKernel TKMath) # FoundationClasses
|
||||
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKG2d TKG3d TKGeomBase TKBRep) # ModelingData
|
||||
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing) # ModelingAlgorithms
|
||||
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost) # Visualization
|
||||
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF) # ApplicationFramework
|
||||
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh) # DataExchange
|
||||
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKDraw TKViewerTest) # Draw
|
||||
|
||||
# validate location of OCCT libraries and headers
|
||||
set (OpenCASCADE_INCLUDE_DIR_FOUND)
|
||||
set (OpenCASCADE_LIBRARY_DIR_FOUND)
|
||||
set (OpenCASCADE_LIBRARY_DEBUG_DIR_FOUND)
|
||||
set (OpenCASCADE_IMPLIB_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
set (OpenCASCADE_SHAREDLIB_RELEASE_FOUND)
|
||||
set (OpenCASCADE_SHAREDLIB_DEBUG_FOUND)
|
||||
if (EXISTS "${OpenCASCADE_INCLUDE_DIR}/Standard.hxx")
|
||||
set (OpenCASCADE_INCLUDE_DIR_FOUND ON)
|
||||
endif()
|
||||
|
||||
if (EXISTS "${OpenCASCADE_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
set (OpenCASCADE_LIBRARY_DIR_FOUND ON)
|
||||
elseif (NOT WIN32 AND EXISTS "${OpenCASCADE_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set (OpenCASCADE_LIBRARY_DIR_FOUND ON)
|
||||
set (OpenCASCADE_IMPLIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
endif()
|
||||
|
||||
if (EXISTS "${OpenCASCADE_LIBRARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
set (OpenCASCADE_LIBRARY_DEBUG_DIR_FOUND ON)
|
||||
elseif (NOT WIN32 AND EXISTS "${OpenCASCADE_LIBRARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set (OpenCASCADE_LIBRARY_DEBUG_DIR_FOUND ON)
|
||||
set (OpenCASCADE_IMPLIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
elseif (OpenCASCADE_LIBRARY_DIR_FOUND)
|
||||
message (STATUS "Only release OpenCASCADE libraries have been found")
|
||||
endif()
|
||||
|
||||
if (NOT OpenCASCADE_LIBRARY_DIR_FOUND AND OpenCASCADE_LIBRARY_DEBUG_DIR_FOUND)
|
||||
set (OpenCASCADE_LIBRARY_DIR_FOUND ON)
|
||||
message (WARNING "Only debug OpenCASCADE libraries have been found")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (EXISTS "${OpenCASCADE_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set (OpenCASCADE_SHAREDLIB_RELEASE_FOUND ON)
|
||||
endif()
|
||||
if (EXISTS "${OpenCASCADE_BINARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set (OpenCASCADE_SHAREDLIB_DEBUG_FOUND ON)
|
||||
endif()
|
||||
else()
|
||||
if (EXISTS "${OpenCASCADE_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set (OpenCASCADE_SHAREDLIB_RELEASE_FOUND ON)
|
||||
endif()
|
||||
if (EXISTS "${OpenCASCADE_LIBRARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set (OpenCASCADE_SHAREDLIB_DEBUG_FOUND ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (OpenCASCADE_INCLUDE_DIR_FOUND AND OpenCASCADE_LIBRARY_DIR_FOUND)
|
||||
set (OpenCASCADE_FOUND ON)
|
||||
set (OpenCASCADE_INSTALL_PREFIX ${OpenCASCADE_DIR})
|
||||
|
||||
# Define OCCT toolkits so that CMake can put absolute paths to linker;
|
||||
# the library existance is not checked here, since modules can be disabled.
|
||||
foreach (aLibIter ${OpenCASCADE_TKLIST})
|
||||
add_library (${aLibIter} SHARED IMPORTED)
|
||||
|
||||
set_property (TARGET ${aLibIter} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties (${aLibIter} PROPERTIES IMPORTED_IMPLIB_RELEASE "${OpenCASCADE_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${aLibIter}${OpenCASCADE_IMPLIB_SUFFIX}")
|
||||
if (OpenCASCADE_SHAREDLIB_RELEASE_FOUND)
|
||||
if (WIN32)
|
||||
set_target_properties (${aLibIter} PROPERTIES IMPORTED_LOCATION_RELEASE "${OpenCASCADE_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${aLibIter}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
else()
|
||||
set_target_properties (${aLibIter} PROPERTIES IMPORTED_LOCATION_RELEASE "${OpenCASCADE_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${aLibIter}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (OpenCASCADE_LIBRARY_DEBUG_DIR_FOUND)
|
||||
set_property (TARGET ${aLibIter} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties (${aLibIter} PROPERTIES IMPORTED_IMPLIB_DEBUG "${OpenCASCADE_LIBRARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}${aLibIter}${OpenCASCADE_IMPLIB_SUFFIX}")
|
||||
if (OpenCASCADE_SHAREDLIB_DEBUG_FOUND)
|
||||
if (WIN32)
|
||||
set_target_properties (${aLibIter} PROPERTIES IMPORTED_LOCATION_DEBUG "${OpenCASCADE_BINARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}${aLibIter}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
else()
|
||||
set_target_properties (${aLibIter} PROPERTIES IMPORTED_LOCATION_DEBUG "${OpenCASCADE_LIBRARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}${aLibIter}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
# fallback searching for CMake configs
|
||||
if (NOT "${OpenCASCADE_DIR}" STREQUAL "")
|
||||
set (anOcctDirBak "${OpenCASCADE_DIR}")
|
||||
find_package (OpenCASCADE CONFIG QUIET PATHS "${OpenCASCADE_DIR}" NO_DEFAULT_PATH)
|
||||
set (OpenCASCADE_DIR "${anOcctDirBak}" CACHE PATH "Path to Open CASCADE libraries." FORCE)
|
||||
else()
|
||||
find_package (OpenCASCADE CONFIG QUIET)
|
||||
endif()
|
||||
endif()
|
@@ -1,12 +1,15 @@
|
||||
OCCT sample for iOS {#occt_samples_ios_uikit}
|
||||
iOS: 3D Viewer (Objective-C++|UIKit) {#occt_samples_ios_uikit}
|
||||
==================
|
||||
|
||||
UIKitSample consists of the Open CASCADE 3D Viewer which provides import of STEP files and toolbar with three buttons.
|
||||
The sample could be found within OCCT repository in folder `/samples/ios/UIKitSample/`.
|
||||
|
||||
The first and second buttons serve for import hardcoded STEP files. The third button displays "About" dialog.
|
||||
|
||||
The viewer supports zoom, pan and rotate actions. The viewer supports selection of solids as well.
|
||||
|
||||
@figure{sample_ios_uikit.png}
|
||||
|
||||
Installation and configuration:
|
||||
1. Make sure you are running Mac OS version 10.12.1 or above and properly installed XCode version 8.1 or above.
|
||||
2. Install Open CASCADE Technology (OCCT) and build static libraries for desired device or/and simulator on your workstation.
|
||||
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
@@ -1,7 +1,8 @@
|
||||
OCCT JniViewer sample for Android {#samples_java_android_occt}
|
||||
Android: 3D Viewer (Java|C++|Android SDK|JNI) {#samples_java_android_occt}
|
||||
==================
|
||||
|
||||
This sample demonstrates simple way of using OCCT libraries in Android application written using Java.
|
||||
The sample could be found within OCCT repository in folder `/samples/java/jniviewer/`.
|
||||
|
||||
The connection between Java and OCCT (C++) level is provided by proxy library, libTKJniSample.so, written in C++ with exported JNI methods of Java class OcctJniRenderer.
|
||||
The proxy library contains single C++ class OcctJni_Viewer encapsulating OCCT viewer and providing functionality to manipulate this viewer
|
||||
@@ -13,6 +14,8 @@ and the code can be programmed on Java level similarly to C++ one.
|
||||
See description of OCCT Java Wrapper in Advanced Samples and Tools on OCCT web site at
|
||||
https://www.opencascade.com/content/advanced-samples-and-tools
|
||||
|
||||
@figure{samples_java_android_occt.jpg}
|
||||
|
||||
Install Android Studio 4.0+ and install building tools (check Tools -> SDK Manager):
|
||||
- Android SDK (API level 21 or higher).
|
||||
- Android SDK build tools.
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -27,7 +27,7 @@ CSelectionDialog::CSelectionDialog (CHLRDoc* aDoc,CWnd* pParent /*=NULL*/)
|
||||
myDoc = aDoc;
|
||||
myIsDisplayed = false;
|
||||
//{{AFX_DATA_INIT(CSelectionDialog)
|
||||
m_Algo = 0;
|
||||
m_Algo = 1;
|
||||
m_DisplayMode = 0;
|
||||
m_NbIsos = 2;
|
||||
m_DrawHiddenLine = TRUE;
|
||||
|
@@ -1,6 +1,21 @@
|
||||
MFC samples {#samples_mfc_standard}
|
||||
MFC: OCCT Samples (C++|MFC) {#samples_mfc_standard}
|
||||
==========
|
||||
|
||||
Visual C++ programming samples for Windows platform containing illustrating how to use a particular module or functionality, including the following MFC samples:
|
||||
|
||||
* Geometry
|
||||
* Modeling
|
||||
* Viewer2d
|
||||
* Viewer3d
|
||||
* ImportExport
|
||||
* Ocaf
|
||||
* Triangulation
|
||||
* HLR
|
||||
* Animation
|
||||
* Convert
|
||||
|
||||
@figure{samples_mvc.png}
|
||||
|
||||
1. Contents
|
||||
-----------------------
|
||||
|
||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@@ -1,12 +1,15 @@
|
||||
OCCT AndroidQt sample for Android {#samples_qml_android_occt}
|
||||
Qt: 3D Viewer (C++|QtQuick|QML) {#samples_qml_android_occt}
|
||||
==================
|
||||
|
||||
This sample demonstrates a simple way of using OCCT libraries in Android application written using Qt/Qml.
|
||||
The sample could be found within OCCT repository in folder `/samples/qt/AndroidQt/`.
|
||||
|
||||
The connection between Qt/Qml and OCCT (C++) level is provided by proxy library, libAndroidQt.so, written in C++.
|
||||
The proxy library contains single C++ class AndroidQt encapsulating OCCT viewer and providing functionality to manipulate this viewer
|
||||
and to import OCCT shapes from supported format of CAD file (BREP).
|
||||
|
||||
@figure{samples_qml_android_occt.jpg}
|
||||
|
||||
Requirements for building sample:
|
||||
* Java Development Kit 1.7 or higher
|
||||
* Qt 5.3 or higher
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -95,6 +95,7 @@ View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent )
|
||||
myCurZoom = 0;
|
||||
setAttribute(Qt::WA_PaintOnScreen);
|
||||
setAttribute(Qt::WA_NoSystemBackground);
|
||||
setAttribute(Qt::WA_NativeWindow);
|
||||
|
||||
myDefaultGestures = myMouseGestureMap;
|
||||
myCurrentMode = CurAction3d_Nothing;
|
||||
@@ -106,8 +107,6 @@ View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent )
|
||||
setBackgroundRole( QPalette::NoRole );//NoBackground );
|
||||
// set focus policy to threat QContextMenuEvent from keyboard
|
||||
setFocusPolicy( Qt::StrongFocus );
|
||||
setAttribute( Qt::WA_PaintOnScreen );
|
||||
setAttribute( Qt::WA_NoSystemBackground );
|
||||
init();
|
||||
}
|
||||
|
||||
|
10
samples/qt/IESample/ReadMe.md
Normal file
@@ -0,0 +1,10 @@
|
||||
Qt: Import/Export (C++|Qt Widgets) {#samples_qt_iesample}
|
||||
==========
|
||||
|
||||
OCCT includes several samples based on Qt application framework.
|
||||
These samples are available on all supported desktop platforms.
|
||||
|
||||
This Import Export programming sample contains 3D Viewer and Import / Export functionality.
|
||||
The sample could be found within OCCT repository in folder `/samples/qt/IESample/`.
|
||||
|
||||
@figure{samples_qt.png}
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
@@ -1,6 +1,22 @@
|
||||
Qt OCCT Overview samples {#samples_qt_overview}
|
||||
Qt: OCCT Overview (C++|Qt Widgets) {#samples_qt_overview}
|
||||
==========
|
||||
|
||||
The Overview Qt application provides code snippets for basic usage of C++ API of various OCCT functionality.
|
||||
The samples are organized in several categories according to relevant module of OCCT:
|
||||
|
||||
* Geometry
|
||||
* Topology
|
||||
* Triangulation
|
||||
* DataExchange
|
||||
* OCAF
|
||||
* Viewer 2d
|
||||
* Viewer 3d
|
||||
|
||||
Each sample presents geometry view, C++ code fragment and sample output window.
|
||||
This sample is described in the @ref samples__novice_guide "Novice guide" for new users.
|
||||
|
||||
@figure{sample_overview_qt.png}
|
||||
|
||||
1. Contents
|
||||
-----------------------
|
||||
|
||||
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
11
samples/qt/Tutorial/ReadMe.md
Normal file
@@ -0,0 +1,11 @@
|
||||
Qt: Bottle Tutorial (C++|Qt Widgets) {#samples_qt_tutorial}
|
||||
==========
|
||||
|
||||
The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object.
|
||||
The purpose of the tutorial is not to explain all OCCT classes but to help start thinking in terms of the Open CASCADE Technology.
|
||||
|
||||
This tutorial assumes that the user has experience in using and setting up C++.
|
||||
From the viewpoint of programming, Open CASCADE Technology is designed to enhance user's C++ tools with high performance modeling classes, methods and functions.
|
||||
The combination of these resources allows creating substantial applications.
|
||||
|
||||
**See also:** @ref occt__tutorial "OCCT Tutorial"
|
@@ -77,5 +77,8 @@ if (NOT "${SOURCE_MAP_BASE}" STREQUAL "")
|
||||
endif()
|
||||
endif()
|
||||
install(FILES occt-webgl-sample.html DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(FILES ${OpenCASCADE_RESOURCE_DIR}/DrawResources/OCC_logo.png DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(FILES ${OpenCASCADE_RESOURCE_DIR}/DrawResources/lamp.ico DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(FILES ${OpenCASCADE_RESOURCE_DIR}/DrawResources/OCC_logo.png DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(FILES ${OpenCASCADE_RESOURCE_DIR}/DrawResources/lamp.ico DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
if (CMAKE_CXX_FLAGS MATCHES "-pthread")
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.worker.js DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
endif()
|
||||
|
@@ -1,4 +1,4 @@
|
||||
OCCT WebGL Viewer sample {#occt_samples_webgl}
|
||||
WebGL: 3D Viewer (JavaScript|C++|WebAssembly) {#occt_samples_webgl}
|
||||
==================
|
||||
|
||||
This sample demonstrates simple way of using OCCT libraries in Web application written in C++ and translated into WebAssembly module using Emscripten SDK (emsdk):
|
||||
@@ -6,6 +6,9 @@ https://emscripten.org/
|
||||
|
||||
Sample consists of the Open CASCADE 3D Viewer with a button for opening a model in BREP format.
|
||||
The sample requires a WebGL 2.0 capable browser supporting WebAssembly 1.0 (Wasm).
|
||||
The sample could be found within OCCT repository in folder `/samples/webgl/`.
|
||||
|
||||
@figure{sample_webgl.png,"",240} height=408px
|
||||
|
||||
Installation and configuration:
|
||||
1. Install Emscripten SDK and activate minimal configuration (Python, Java and CLang) following *emsdk* documentation. Activate also MinGW when building sample on Windows host.
|
||||
|
@@ -185,12 +185,16 @@ void WasmOcctView::initWindow()
|
||||
emscripten_set_resize_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, this, toUseCapture, onResizeCallback);
|
||||
|
||||
emscripten_set_mousedown_callback (aTargetId, this, toUseCapture, onMouseCallback);
|
||||
emscripten_set_mouseup_callback (aTargetId, this, toUseCapture, onMouseCallback);
|
||||
emscripten_set_mousemove_callback (aTargetId, this, toUseCapture, onMouseCallback);
|
||||
// bind these events to window to track mouse movements outside of canvas
|
||||
//emscripten_set_mouseup_callback (aTargetId, this, toUseCapture, onMouseCallback);
|
||||
//emscripten_set_mousemove_callback (aTargetId, this, toUseCapture, onMouseCallback);
|
||||
//emscripten_set_mouseleave_callback (aTargetId, this, toUseCapture, onMouseCallback);
|
||||
emscripten_set_mouseup_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, this, toUseCapture, onMouseCallback);
|
||||
emscripten_set_mousemove_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, this, toUseCapture, onMouseCallback);
|
||||
|
||||
emscripten_set_dblclick_callback (aTargetId, this, toUseCapture, onMouseCallback);
|
||||
emscripten_set_click_callback (aTargetId, this, toUseCapture, onMouseCallback);
|
||||
emscripten_set_mouseenter_callback (aTargetId, this, toUseCapture, onMouseCallback);
|
||||
emscripten_set_mouseleave_callback (aTargetId, this, toUseCapture, onMouseCallback);
|
||||
emscripten_set_wheel_callback (aTargetId, this, toUseCapture, onWheelCallback);
|
||||
|
||||
emscripten_set_touchstart_callback (aTargetId, this, toUseCapture, onTouchCallback);
|
||||
@@ -198,9 +202,12 @@ void WasmOcctView::initWindow()
|
||||
emscripten_set_touchmove_callback (aTargetId, this, toUseCapture, onTouchCallback);
|
||||
emscripten_set_touchcancel_callback(aTargetId, this, toUseCapture, onTouchCallback);
|
||||
|
||||
//emscripten_set_keypress_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, this, toUseCapture, onKeyCallback);
|
||||
emscripten_set_keydown_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, this, toUseCapture, onKeyDownCallback);
|
||||
emscripten_set_keyup_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, this, toUseCapture, onKeyUpCallback);
|
||||
//emscripten_set_keypress_callback (aTargetId, this, toUseCapture, onKeyCallback);
|
||||
emscripten_set_keydown_callback (aTargetId, this, toUseCapture, onKeyDownCallback);
|
||||
emscripten_set_keyup_callback (aTargetId, this, toUseCapture, onKeyUpCallback);
|
||||
//emscripten_set_focus_callback (aTargetId, this, toUseCapture, onFocusCallback);
|
||||
//emscripten_set_focusin_callback (aTargetId, this, toUseCapture, onFocusCallback);
|
||||
emscripten_set_focusout_callback (aTargetId, this, toUseCapture, onFocusCallback);
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
@@ -474,6 +481,21 @@ EM_BOOL WasmOcctView::onResizeEvent (int theEventType, const EmscriptenUiEvent*
|
||||
return EM_TRUE;
|
||||
}
|
||||
|
||||
//! Update canvas bounding rectangle.
|
||||
EM_JS(void, jsUpdateBoundingClientRect, (), {
|
||||
Module._myCanvasRect = Module.canvas.getBoundingClientRect();
|
||||
});
|
||||
|
||||
//! Get canvas bounding top.
|
||||
EM_JS(int, jsGetBoundingClientTop, (), {
|
||||
return Math.round(Module._myCanvasRect.top);
|
||||
});
|
||||
|
||||
//! Get canvas bounding left.
|
||||
EM_JS(int, jsGetBoundingClientLeft, (), {
|
||||
return Math.round(Module._myCanvasRect.left);
|
||||
});
|
||||
|
||||
// ================================================================
|
||||
// Function : onMouseEvent
|
||||
// Purpose :
|
||||
@@ -486,6 +508,18 @@ EM_BOOL WasmOcctView::onMouseEvent (int theEventType, const EmscriptenMouseEvent
|
||||
}
|
||||
|
||||
Handle(Wasm_Window) aWindow = Handle(Wasm_Window)::DownCast (myView->Window());
|
||||
if (theEventType == EMSCRIPTEN_EVENT_MOUSEMOVE
|
||||
|| theEventType == EMSCRIPTEN_EVENT_MOUSEUP)
|
||||
{
|
||||
// these events are bound to EMSCRIPTEN_EVENT_TARGET_WINDOW, and coordinates should be converted
|
||||
jsUpdateBoundingClientRect();
|
||||
EmscriptenMouseEvent anEvent = *theEvent;
|
||||
anEvent.targetX -= jsGetBoundingClientLeft();
|
||||
anEvent.targetY -= jsGetBoundingClientTop();
|
||||
aWindow->ProcessMouseEvent (*this, theEventType, &anEvent);
|
||||
return EM_FALSE;
|
||||
}
|
||||
|
||||
return aWindow->ProcessMouseEvent (*this, theEventType, theEvent) ? EM_TRUE : EM_FALSE;
|
||||
}
|
||||
|
||||
@@ -557,6 +591,24 @@ bool WasmOcctView::navigationKeyModifierSwitch (unsigned int theModifOld,
|
||||
return hasActions;
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
// Function : onFocusEvent
|
||||
// Purpose :
|
||||
// ================================================================
|
||||
EM_BOOL WasmOcctView::onFocusEvent (int theEventType, const EmscriptenFocusEvent* theEvent)
|
||||
{
|
||||
if (myView.IsNull()
|
||||
|| (theEventType != EMSCRIPTEN_EVENT_FOCUS
|
||||
&& theEventType != EMSCRIPTEN_EVENT_FOCUSIN // about to receive focus
|
||||
&& theEventType != EMSCRIPTEN_EVENT_FOCUSOUT))
|
||||
{
|
||||
return EM_FALSE;
|
||||
}
|
||||
|
||||
Handle(Wasm_Window) aWindow = Handle(Wasm_Window)::DownCast (myView->Window());
|
||||
return aWindow->ProcessFocusEvent (*this, theEventType, theEvent) ? EM_TRUE : EM_FALSE;
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
// Function : onKeyDownEvent
|
||||
// Purpose :
|
||||
|
@@ -181,6 +181,9 @@ private:
|
||||
//! Key up event.
|
||||
EM_BOOL onKeyUpEvent (int theEventType, const EmscriptenKeyboardEvent* theEvent);
|
||||
|
||||
//! Focus change event.
|
||||
EM_BOOL onFocusEvent (int theEventType, const EmscriptenFocusEvent* theEvent);
|
||||
|
||||
//! @name Emscripten callbacks (static functions)
|
||||
private:
|
||||
|
||||
@@ -205,6 +208,9 @@ private:
|
||||
static EM_BOOL onKeyUpCallback (int theEventType, const EmscriptenKeyboardEvent* theEvent, void* theView)
|
||||
{ return ((WasmOcctView* )theView)->onKeyUpEvent (theEventType, theEvent); }
|
||||
|
||||
static EM_BOOL onFocusCallback (int theEventType, const EmscriptenFocusEvent* theEvent, void* theView)
|
||||
{ return ((WasmOcctView* )theView)->onFocusEvent (theEventType, theEvent); }
|
||||
|
||||
private:
|
||||
|
||||
//! Register hot-keys for specified Action.
|
||||
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
@@ -42,6 +42,11 @@ function updateCanvasSize()
|
||||
window.onresize = updateCanvasSize;
|
||||
updateCanvasSize();
|
||||
|
||||
// capture keyboard input on mouse click
|
||||
occViewerCanvas.tabIndex = -1;
|
||||
occViewerCanvas.onclick = (theEvent) => { occViewerCanvas.focus() };
|
||||
occViewerCanvas.focus();
|
||||
|
||||
//! Check browser support.
|
||||
function isWasmSupported()
|
||||
{
|
||||
@@ -78,6 +83,7 @@ fileInput.onchange = function()
|
||||
OccViewerModule.openFromMemory (aFile.name, aDataBuffer, aDataArray.length, true);
|
||||
//OccViewerModule._free (aDataBuffer); will be freed by called method
|
||||
OccViewerModule.displayGround (true);
|
||||
occViewerCanvas.focus();
|
||||
};
|
||||
aReader.readAsArrayBuffer(aFile);
|
||||
};
|
||||
|
@@ -53,7 +53,6 @@ class TCollection_ExtendedString;
|
||||
class Prs3d_LineAspect;
|
||||
class Prs3d_BasicAspect;
|
||||
class TopoDS_Shape;
|
||||
class SelectMgr_EntityOwner;
|
||||
class SelectMgr_Filter;
|
||||
|
||||
//! The Interactive Context allows you to manage graphic behavior and selection of Interactive Objects in one or more viewers.
|
||||
|
@@ -22,9 +22,7 @@
|
||||
#include <SelectMgr_SelectableObject.hxx>
|
||||
|
||||
class AIS_InteractiveContext;
|
||||
class Graphic3d_MaterialAspect;
|
||||
class Prs3d_BasicAspect;
|
||||
class Bnd_Box;
|
||||
class V3d_View;
|
||||
|
||||
//! Defines a class of objects with display and selection services.
|
||||
|
@@ -257,27 +257,29 @@ Standard_Boolean AIS_LightSource::ProcessDragging (const Handle(AIS_InteractiveC
|
||||
{
|
||||
case AIS_DragAction_Start:
|
||||
{
|
||||
myStartTransform = theDragFrom;
|
||||
myLocTrsfStart = LocalTransformation();
|
||||
return Standard_True;
|
||||
}
|
||||
case AIS_DragAction_Update:
|
||||
{
|
||||
theCtx->MainSelector()->Pick (myStartTransform.x(), myStartTransform.y(), theView);
|
||||
mySensSphere->ResetLastDetectedPoint();
|
||||
SetLocalTransformation (myLocTrsfStart);
|
||||
theCtx->MainSelector()->Pick (theDragFrom.x(), theDragFrom.y(), theView);
|
||||
gp_Pnt aStartPosition = mySensSphere->LastDetectedPoint();
|
||||
|
||||
mySensSphere->ResetLastDetectedPoint();
|
||||
theCtx->MainSelector()->Pick (theDragTo.x(), theDragTo.y(), theView);
|
||||
gp_Pnt aCurrPosition = mySensSphere->LastDetectedPoint();
|
||||
if (aCurrPosition.X() != RealLast() && aStartPosition.Distance (aCurrPosition) > Precision::Confusion())
|
||||
if (aCurrPosition.X() != RealLast()
|
||||
&& aStartPosition.Distance (aCurrPosition) > Precision::Confusion())
|
||||
{
|
||||
gp_Quaternion aQRot;
|
||||
aQRot.SetRotation (gp_Vec (gp_Pnt (0, 0, 0), aStartPosition), gp_Vec (gp_Pnt (0, 0, 0), aCurrPosition));
|
||||
gp_Trsf aTrsf;
|
||||
aTrsf.SetRotation (aQRot);
|
||||
SetLocalTransformation (myLocTrsfStart * aTrsf);
|
||||
myLocTrsfStart = LocalTransformation();
|
||||
myStartTransform = theDragTo;
|
||||
theOwner->Selectable()->ClearDynamicHighlight (theCtx->MainPrsMgr());
|
||||
theCtx->HilightWithColor (this, Handle(Prs3d_Drawer)(), false);
|
||||
const Standard_Integer aHiMod = HasHilightMode() ? HilightMode() : 0;
|
||||
theOwner->UpdateHighlightTrsf (theCtx->CurrentViewer(), theCtx->MainPrsMgr(), aHiMod);
|
||||
}
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -475,7 +477,7 @@ void AIS_LightSource::updateLightLocalTransformation()
|
||||
// =======================================================================
|
||||
void AIS_LightSource::setLocalTransformation (const Handle(TopLoc_Datum3D)& theTrsf)
|
||||
{
|
||||
const gp_Trsf aTrsf = theTrsf->Transformation();
|
||||
const gp_Trsf aTrsf = !theTrsf.IsNull() ? theTrsf->Transformation() : gp_Trsf();
|
||||
switch (myLightSource->Type())
|
||||
{
|
||||
case Graphic3d_TypeOfLightSource_Ambient:
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#include <Graphic3d_CLight.hxx>
|
||||
#include <SelectMgr_EntityOwner.hxx>
|
||||
|
||||
class Prs3d_ShadingAspect;
|
||||
class Select3D_SensitiveSphere;
|
||||
|
||||
//! Interactive object for a light source.
|
||||
@@ -260,7 +259,6 @@ protected:
|
||||
Aspect_TypeOfMarker myCodirMarkerType; //!< icon of arrow co-directional to camera direction (look from)
|
||||
Aspect_TypeOfMarker myOpposMarkerType; //!< icon of arrow opposite to camera direction (look at)
|
||||
|
||||
Graphic3d_Vec2i myStartTransform; //!< position of starting transformation
|
||||
gp_Trsf myLocTrsfStart; //!< object transformation before transformation
|
||||
Standard_Real mySize; //!< presentation size
|
||||
Standard_Integer myNbArrows; //!< number of directional light arrows
|
||||
|
@@ -24,7 +24,6 @@
|
||||
|
||||
class Geom_Plane;
|
||||
class Geom_Axis2Placement;
|
||||
class gp_Pnt;
|
||||
|
||||
//! Constructs plane datums to be used in construction of
|
||||
//! composite shapes.
|
||||
|
@@ -41,7 +41,6 @@ class AIS_InteractiveContext;
|
||||
class AIS_Point;
|
||||
class AIS_RubberBand;
|
||||
class AIS_XRTrackedDevice;
|
||||
class Graphic3d_Camera;
|
||||
class SelectMgr_EntityOwner;
|
||||
class V3d_View;
|
||||
class WNT_HIDSpaceMouse;
|
||||
@@ -442,10 +441,13 @@ public: //! @name resize events
|
||||
virtual void ProcessInput() Standard_OVERRIDE {}
|
||||
|
||||
//! Handle focus event.
|
||||
//! Default implementation does nothing.
|
||||
//! Default implementation resets cached input state (pressed keys).
|
||||
virtual void ProcessFocus (bool theIsActivated) Standard_OVERRIDE
|
||||
{
|
||||
(void )theIsActivated;
|
||||
if (!theIsActivated)
|
||||
{
|
||||
ResetViewInput();
|
||||
}
|
||||
}
|
||||
|
||||
//! Handle window close event.
|
||||
|
@@ -27,13 +27,13 @@
|
||||
#include <Prs3d_Text.hxx>
|
||||
#include <Prs3d_ToolDisk.hxx>
|
||||
#include <Prs3d_ToolSphere.hxx>
|
||||
#include <Select3D_SensitivePrimitiveArray.hxx>
|
||||
#include <SelectMgr_SequenceOfOwner.hxx>
|
||||
#include <V3d.hxx>
|
||||
#include <V3d_View.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(AIS_ViewCube, AIS_InteractiveObject)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(AIS_ViewCubeOwner, SelectMgr_EntityOwner)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(AIS_ViewCubeSensitive, Select3D_SensitivePrimitiveArray)
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -56,46 +56,48 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
//! Simple sensitive element for picking by point only.
|
||||
class AIS_ViewCubeSensitive : public Select3D_SensitivePrimitiveArray
|
||||
//=======================================================================
|
||||
//function : AIS_ViewCubeSensitive
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
AIS_ViewCubeSensitive::AIS_ViewCubeSensitive (const Handle(SelectMgr_EntityOwner)& theOwner,
|
||||
const Handle(Graphic3d_ArrayOfTriangles)& theTris)
|
||||
: Select3D_SensitivePrimitiveArray (theOwner)
|
||||
{
|
||||
DEFINE_STANDARD_RTTI_INLINE(AIS_ViewCubeSensitive, Select3D_SensitivePrimitiveArray)
|
||||
public:
|
||||
//! Constructor.
|
||||
AIS_ViewCubeSensitive (const Handle(SelectMgr_EntityOwner)& theOwner,
|
||||
const Handle(Graphic3d_ArrayOfTriangles)& theTris)
|
||||
: Select3D_SensitivePrimitiveArray (theOwner)
|
||||
InitTriangulation (theTris->Attributes(), theTris->Indices(), TopLoc_Location());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Matches
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean AIS_ViewCubeSensitive::Matches (SelectBasics_SelectingVolumeManager& theMgr,
|
||||
SelectBasics_PickResult& thePickResult)
|
||||
{
|
||||
return isValidRay (theMgr) && Select3D_SensitivePrimitiveArray::Matches (theMgr, thePickResult);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : isValidRay
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
bool AIS_ViewCubeSensitive::isValidRay (const SelectBasics_SelectingVolumeManager& theMgr) const
|
||||
{
|
||||
if (theMgr.GetActiveSelectionType() != SelectMgr_SelectionType_Point)
|
||||
{
|
||||
InitTriangulation (theTris->Attributes(), theTris->Indices(), TopLoc_Location());
|
||||
// disallow rectangular selection
|
||||
return false;
|
||||
}
|
||||
|
||||
//! Checks whether element overlaps current selecting volume.
|
||||
virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
|
||||
SelectBasics_PickResult& thePickResult) Standard_OVERRIDE
|
||||
if (AIS_ViewCubeOwner* anOwner = dynamic_cast<AIS_ViewCubeOwner* >(myOwnerId.get()))
|
||||
{
|
||||
return isValidRay (theMgr)
|
||||
&& Select3D_SensitivePrimitiveArray::Matches (theMgr, thePickResult);
|
||||
const Standard_Real anAngleToler = 10.0 * M_PI / 180.0;
|
||||
const gp_Dir aRay = theMgr.GetViewRayDirection();
|
||||
const gp_Dir aDir = V3d::GetProjAxis (anOwner->MainOrientation());
|
||||
return !aRay.IsNormal (aDir, anAngleToler);
|
||||
}
|
||||
|
||||
//! Checks if picking ray can be used for detection.
|
||||
bool isValidRay (const SelectBasics_SelectingVolumeManager& theMgr) const
|
||||
{
|
||||
if (theMgr.GetActiveSelectionType() != SelectMgr_SelectionType_Point)
|
||||
{
|
||||
// disallow rectangular selection
|
||||
return false;
|
||||
}
|
||||
|
||||
if (AIS_ViewCubeOwner* anOwner = dynamic_cast<AIS_ViewCubeOwner* >(myOwnerId.get()))
|
||||
{
|
||||
const Standard_Real anAngleToler = 10.0 * M_PI / 180.0;
|
||||
const gp_Dir aRay = theMgr.GetViewRayDirection();
|
||||
const gp_Dir aDir = V3d::GetProjAxis (anOwner->MainOrientation());
|
||||
return !aRay.IsNormal (aDir, anAngleToler);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
return true;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsBoxSide
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <Prs3d_TextAspect.hxx>
|
||||
#include <SelectMgr_EntityOwner.hxx>
|
||||
#include <V3d_TypeOfOrientation.hxx>
|
||||
#include <Select3D_SensitivePrimitiveArray.hxx>
|
||||
|
||||
class AIS_AnimationCamera;
|
||||
class AIS_ViewCubeOwner;
|
||||
@@ -724,4 +725,25 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
//! Simple sensitive element for picking by point only.
|
||||
class AIS_ViewCubeSensitive : public Select3D_SensitivePrimitiveArray
|
||||
{
|
||||
DEFINE_STANDARD_RTTIEXT(AIS_ViewCubeSensitive, Select3D_SensitivePrimitiveArray)
|
||||
public:
|
||||
|
||||
//! Constructor.
|
||||
Standard_EXPORT AIS_ViewCubeSensitive (const Handle(SelectMgr_EntityOwner)& theOwner,
|
||||
const Handle(Graphic3d_ArrayOfTriangles)& theTris);
|
||||
|
||||
//! Checks whether element overlaps current selecting volume.
|
||||
Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
|
||||
SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
//! Checks if picking ray can be used for detection.
|
||||
Standard_EXPORT bool isValidRay (const SelectBasics_SelectingVolumeManager& theMgr) const;
|
||||
|
||||
};
|
||||
|
||||
#endif // _AIS_ViewCube_HeaderFile
|
||||
|
@@ -29,9 +29,6 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec2d;
|
||||
class Geom2d_BezierCurve;
|
||||
|
@@ -29,9 +29,6 @@
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class gp_Pnt2d;
|
||||
class gp_Dir2d;
|
||||
class gp_Lin2d;
|
||||
|
@@ -23,10 +23,6 @@
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_TypeMismatch;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec2d;
|
||||
class gp_Lin2d;
|
||||
|
@@ -29,9 +29,6 @@
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class Geom_BezierCurve;
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
|
||||
class gp_Pnt2d;
|
||||
|
||||
class Adaptor3d_HVertex;
|
||||
DEFINE_STANDARD_HANDLE(Adaptor3d_HVertex, Standard_Transient)
|
||||
|
@@ -34,8 +34,6 @@
|
||||
#include <TColGeom_HArray1OfSurface.hxx>
|
||||
#include <AdvApp2Var_EvaluatorFunc2Var.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_ConstructionError;
|
||||
class AdvApprox_Cutting;
|
||||
class AdvApp2Var_Criterion;
|
||||
class Geom_BSplineSurface;
|
||||
|
@@ -17,8 +17,8 @@
|
||||
| de l'approximation a deux variables
|
||||
| a utiliser dans AdvApp2Var
|
||||
|--------------------------------------------------------------*/
|
||||
#ifndef ApproxF2var_HeaderFile
|
||||
#define ApproxF2var_HeaderFile
|
||||
#ifndef AdvApp2Var_ApproxF2var_HeaderFile
|
||||
#define AdvApp2Var_ApproxF2var_HeaderFile
|
||||
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <AdvApp2Var_Data_f2c.hxx>
|
||||
|
@@ -12,8 +12,8 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
// AdvApp2Var_Data_f2c.hxx
|
||||
#ifndef Data_f2c_HeaderFile
|
||||
#define Data_f2c_HeaderFile
|
||||
#ifndef AdvApp2Var_Data_f2c_HeaderFile
|
||||
#define AdvApp2Var_Data_f2c_HeaderFile
|
||||
|
||||
#ifndef F2CTYPE_DEFINED
|
||||
typedef int integer;
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include <GeomAbs_IsoType.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
class Standard_NoSuchObject;
|
||||
class AdvApp2Var_Iso;
|
||||
class AdvApp2Var_Node;
|
||||
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class Standard_NoSuchObject;
|
||||
class AdvApp2Var_Patch;
|
||||
|
||||
|
||||
|
@@ -37,8 +37,6 @@
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_ConstructionError;
|
||||
class AdvApprox_Cutting;
|
||||
|
||||
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include <Standard_Real.hxx>
|
||||
#include <AdvApprox_Cutting.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_DomainError;
|
||||
|
||||
|
||||
|
||||
|
@@ -33,8 +33,6 @@
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
class PLib_JacobiPolynomial;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_ConstructionError;
|
||||
|
||||
|
||||
//! Approximate a function on an intervall [First,Last]
|
||||
|
@@ -29,9 +29,6 @@
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class StdFail_NotDone;
|
||||
class Standard_DomainError;
|
||||
class Standard_OutOfRange;
|
||||
|
||||
|
||||
//! Bspline approximation of a surface.
|
||||
|
@@ -12,8 +12,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef math_ContMatrices_HeaderFile
|
||||
#define math_ContMatrices_HeaderFile
|
||||
#ifndef AppCont_ContMatrices_HeaderFile
|
||||
#define AppCont_ContMatrices_HeaderFile
|
||||
#include <math_Vector.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
|
||||
|
@@ -31,9 +31,6 @@
|
||||
#include <math_Vector.hxx>
|
||||
class FEmTool_ElementaryCriterion;
|
||||
class FEmTool_Curve;
|
||||
class Standard_NotImplemented;
|
||||
class Standard_DomainError;
|
||||
class AppDef_MultiLine;
|
||||
class math_Matrix;
|
||||
|
||||
|
||||
|
@@ -28,9 +28,6 @@
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
class Standard_ConstructionError;
|
||||
class Standard_DimensionError;
|
||||
class Standard_OutOfRange;
|
||||
class AppDef_MultiPointConstraint;
|
||||
|
||||
|
||||
|
@@ -27,9 +27,6 @@
|
||||
#include <TColgp_HArray1OfVec.hxx>
|
||||
#include <TColgp_HArray1OfVec2d.hxx>
|
||||
|
||||
class Standard_OutOfRange;
|
||||
class Standard_ConstructionError;
|
||||
class Standard_DimensionError;
|
||||
class gp_Vec;
|
||||
class gp_Vec2d;
|
||||
|
||||
|
@@ -28,8 +28,6 @@
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
class Standard_NotImplemented;
|
||||
class Standard_DomainError;
|
||||
class FEmTool_Curve;
|
||||
class math_Matrix;
|
||||
|
||||
|
@@ -35,14 +35,6 @@
|
||||
#include <math_Vector.hxx>
|
||||
#include <AppParCurves_Constraint.hxx>
|
||||
class AppDef_SmoothCriterion;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_DimensionError;
|
||||
class Standard_DomainError;
|
||||
class Standard_ConstructionError;
|
||||
class StdFail_NotDone;
|
||||
class gp_VectorWithNullMagnitude;
|
||||
class AppDef_MultiLine;
|
||||
class AppParCurves_MultiBSpCurve;
|
||||
class math_Matrix;
|
||||
class FEmTool_Curve;
|
||||
class FEmTool_Assembly;
|
||||
|
@@ -26,23 +26,6 @@
|
||||
#include <Standard_Real.hxx>
|
||||
#include <math_IntegerVector.hxx>
|
||||
class math_Matrix;
|
||||
class AppParCurves_MultiPoint;
|
||||
class AppParCurves_MultiCurve;
|
||||
class AppParCurves_MultiBSpCurve;
|
||||
class AppParCurves_ConstraintCouple;
|
||||
class AppParCurves_LeastSquare;
|
||||
class AppParCurves_ResolConstraint;
|
||||
class AppParCurves_Function;
|
||||
class AppParCurves_BSpFunction;
|
||||
class AppParCurves_Gradient;
|
||||
class AppParCurves_Gradient_BFGS;
|
||||
class AppParCurves_ParLeastSquare;
|
||||
class AppParCurves_ResConstraint;
|
||||
class AppParCurves_ParFunction;
|
||||
class AppParCurves_BSpGradient;
|
||||
class AppParCurves_BSpGradient_BFGS;
|
||||
class AppParCurves_BSpParLeastSquare;
|
||||
class AppParCurves_BSpParFunction;
|
||||
|
||||
|
||||
//! Parallel Approximation in n curves.
|
||||
|
@@ -30,10 +30,6 @@
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_DimensionError;
|
||||
class Standard_ConstructionError;
|
||||
class AppParCurves_MultiCurve;
|
||||
class gp_Pnt;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec;
|
||||
|
@@ -28,9 +28,6 @@
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_DimensionError;
|
||||
class Standard_ConstructionError;
|
||||
class AppParCurves_MultiPoint;
|
||||
class gp_Pnt;
|
||||
class gp_Pnt2d;
|
||||
|
@@ -27,8 +27,6 @@
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
class Standard_Transient;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_DimensionError;
|
||||
class gp_Pnt;
|
||||
class gp_Pnt2d;
|
||||
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <AppParCurves_SequenceOfMultiCurve.hxx>
|
||||
class AppParCurves_MultiCurve;
|
||||
class AppParCurves_MultiBSpCurve;
|
||||
|
||||
|
||||
|
||||
|
@@ -44,9 +44,6 @@
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
class Approx_SweepFunction;
|
||||
class StdFail_NotDone;
|
||||
class Standard_DomainError;
|
||||
class Standard_OutOfRange;
|
||||
class AdvApprox_Cutting;
|
||||
|
||||
|
||||
|
@@ -31,8 +31,6 @@
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
class Standard_NotImplemented;
|
||||
class Standard_OutOfRange;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
|
@@ -22,7 +22,6 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Quantity_Color.hxx>
|
||||
class Quantity_Color;
|
||||
|
||||
|
||||
//! This class allows the definition of
|
||||
|
@@ -24,9 +24,6 @@
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Aspect_Grid.hxx>
|
||||
|
||||
class Standard_NegativeValue;
|
||||
class Standard_NullValue;
|
||||
class Standard_NumericError;
|
||||
|
||||
class Aspect_CircularGrid : public Aspect_Grid
|
||||
{
|
||||
|
@@ -11,8 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Aspect_DisplayConnection_H__
|
||||
#define _Aspect_DisplayConnection_H__
|
||||
#ifndef Aspect_DisplayConnection_HeaderFile
|
||||
#define Aspect_DisplayConnection_HeaderFile
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Aspect_XAtom.hxx>
|
||||
|
@@ -24,7 +24,6 @@
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_ListOfInteger.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Aspect_IdentDefinitionError;
|
||||
|
||||
|
||||
//! This class permits the creation and control of integer identifiers.
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef ASPECT_POLYGONOFFSETMODE_HEADER
|
||||
#define ASPECT_POLYGONOFFSETMODE_HEADER
|
||||
#ifndef Aspect_PolygonOffsetMode_HeaderFile
|
||||
#define Aspect_PolygonOffsetMode_HeaderFile
|
||||
|
||||
// Enumeration for polygon offset modes
|
||||
|
||||
|
@@ -23,9 +23,6 @@
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Aspect_Grid.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_NegativeValue;
|
||||
class Standard_NullValue;
|
||||
class Standard_NumericError;
|
||||
|
||||
class Aspect_RectangularGrid : public Aspect_Grid
|
||||
{
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#include <BOPAlgo_ListOfCheckResult.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
//! check the validity of argument(s) for Boolean Operations
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
class TopoDS_Shape;
|
||||
class BOPAlgo_PaveFiller;
|
||||
|
||||
//!
|
||||
|
@@ -38,8 +38,6 @@
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
class IntTools_Context;
|
||||
class TopoDS_Shape;
|
||||
class BOPAlgo_PaveFiller;
|
||||
class TopoDS_Solid;
|
||||
|
||||
//!
|
||||
//! The class is a General Fuse algorithm - base algorithm for the
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
#include <BOPAlgo_BuilderArea.hxx>
|
||||
#include <NCollection_BaseAllocator.hxx>
|
||||
class TopoDS_Face;
|
||||
|
||||
|
||||
//! The algorithm to build new faces from the given faces and
|
||||
|
@@ -24,7 +24,6 @@
|
||||
#include <BOPAlgo_CheckStatus.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
//! contains information about faulty shapes and faulty types
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#include <TopoDS_Solid.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
class TopoDS_Solid;
|
||||
class BOPAlgo_PaveFiller;
|
||||
|
||||
|
||||
|
@@ -53,10 +53,7 @@
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
class IntTools_Context;
|
||||
class BOPDS_DS;
|
||||
class BOPAlgo_SectionAttribute;
|
||||
class BOPDS_PaveBlock;
|
||||
class BOPDS_CommonBlock;
|
||||
class gp_Pnt;
|
||||
class BOPDS_Curve;
|
||||
class TopoDS_Vertex;
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include <NCollection_BaseAllocator.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
class BOPAlgo_PaveFiller;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#include <IntTools_Context.hxx>
|
||||
#include <NCollection_BaseAllocator.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
class BOPAlgo_WireEdgeSet;
|
||||
class TopoDS_Wire;
|
||||
class TopoDS_Face;
|
||||
|
||||
|