Coding - Temporary remove samples from the repository (#960)
- Moved tcl samples to resource folder. - Clean up cmake from samples related settings. - Removed CSharp samples from the repository. - Removed MFC samples from the repository. - Removed Qt samples from the repository. - Removed Inspector samples from the repository. - Removed glwin samples from the repository. - Removed webgl samples from the repository. - Removed xaml samples from the repository. - Removed Java samples from the repository.
57
.github/actions/build-sample-csharp/action.yml
vendored
@@ -1,57 +0,0 @@
|
|||||||
name: 'Build CSharp Sample'
|
|
||||||
description: 'Build CSharp sample using OCCT installation'
|
|
||||||
|
|
||||||
inputs:
|
|
||||||
platform:
|
|
||||||
description: 'Build platform (windows)'
|
|
||||||
required: true
|
|
||||||
install-artifact-name:
|
|
||||||
description: 'OCCT installation artifact name'
|
|
||||||
required: true
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Download OCCT installation
|
|
||||||
uses: ./.github/actions/download-artifacts
|
|
||||||
with:
|
|
||||||
name: ${{ inputs.install-artifact-name }}
|
|
||||||
path: occt-install
|
|
||||||
|
|
||||||
- name: Build CSharp Sample
|
|
||||||
if: inputs.platform == 'windows'
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
REM Setup environment
|
|
||||||
call "${{ github.workspace }}\occt-install\env.bat" vc14 win64 Release
|
|
||||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" x64
|
|
||||||
set "PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE;%PATH%"
|
|
||||||
|
|
||||||
cd ${{ github.workspace }}/samples/CSharp
|
|
||||||
|
|
||||||
REM First upgrade solutions to VS2022
|
|
||||||
echo "Upgrading solution files to VS2022..."
|
|
||||||
devenv.exe CSharp.sln /upgrade
|
|
||||||
devenv.exe CSharp_D3D.sln /upgrade
|
|
||||||
|
|
||||||
REM Update project platform toolset
|
|
||||||
powershell -Command "(Get-Content OCCTProxy\OCCTProxy.vcxproj) -replace '<PlatformToolset>v100</PlatformToolset>', '<PlatformToolset>v143</PlatformToolset>' | Set-Content OCCTProxy\OCCTProxy.vcxproj"
|
|
||||||
powershell -Command "(Get-Content OCCTProxy_D3D\OCCTProxy_D3D.vcxproj) -replace '<PlatformToolset>v100</PlatformToolset>', '<PlatformToolset>v143</PlatformToolset>' | Set-Content OCCTProxy_D3D\OCCTProxy_D3D.vcxproj"
|
|
||||||
|
|
||||||
REM Restore NuGet packages
|
|
||||||
echo "Upgrading solution files..."
|
|
||||||
msbuild.exe CSharp.sln -t:Restore -p:Configuration=Release -p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=restore_csharp.log;Verbosity=detailed
|
|
||||||
msbuild.exe CSharp_D3D.sln -t:Restore -p:Configuration=Release -p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=restore_d3d.log;Verbosity=detailed
|
|
||||||
|
|
||||||
REM Build solutions with real-time console output
|
|
||||||
echo "Building CSharp.sln..."
|
|
||||||
msbuild.exe CSharp.sln /p:Configuration=Release /p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=build_csharp.log;Verbosity=detailed /m
|
|
||||||
echo "Building CSharp_D3D.sln..."
|
|
||||||
msbuild.exe CSharp_D3D.sln /p:Configuration=Release /p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=build_d3d.log;Verbosity=detailed /m
|
|
||||||
|
|
||||||
- name: Upload CSharp Sample
|
|
||||||
uses: actions/upload-artifact@v4.6.2
|
|
||||||
with:
|
|
||||||
name: csharp-sample-${{ inputs.platform }}-x64
|
|
||||||
path: samples/CSharp
|
|
||||||
retention-days: 7
|
|
||||||
54
.github/actions/build-sample-mfc/action.yml
vendored
@@ -1,54 +0,0 @@
|
|||||||
name: 'Build MFC Sample'
|
|
||||||
description: 'Build MFC sample using OCCT installation'
|
|
||||||
|
|
||||||
inputs:
|
|
||||||
platform:
|
|
||||||
description: 'Build platform (windows)'
|
|
||||||
required: true
|
|
||||||
install-artifact-name:
|
|
||||||
description: 'OCCT installation artifact name'
|
|
||||||
required: true
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Download OCCT installation
|
|
||||||
uses: ./.github/actions/download-artifacts
|
|
||||||
with:
|
|
||||||
name: ${{ inputs.install-artifact-name }}
|
|
||||||
path: occt-install
|
|
||||||
|
|
||||||
- name: Build MFC Sample
|
|
||||||
if: inputs.platform == 'windows'
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
REM Setup environment
|
|
||||||
call "${{ github.workspace }}\occt-install\env.bat" vc14 win64 Release
|
|
||||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" x64
|
|
||||||
|
|
||||||
cd ${{ github.workspace }}/samples/mfc/standard
|
|
||||||
set "PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE;%PATH%"
|
|
||||||
|
|
||||||
REM First restore the solution
|
|
||||||
echo "Restoring solution..."
|
|
||||||
msbuild.exe ALL-vc14.sln -t:Restore -p:Configuration=Release -p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=restore.log;Verbosity=detailed
|
|
||||||
|
|
||||||
REM Build solution with detailed logging
|
|
||||||
echo "Building solution..."
|
|
||||||
msbuild.exe ALL-vc14.sln /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v143 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=build.log;Verbosity=detailed /m
|
|
||||||
|
|
||||||
REM Display logs if build fails
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo "Build failed. Contents of restore.log:"
|
|
||||||
type restore.log
|
|
||||||
echo "Contents of build.log:"
|
|
||||||
type build.log
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
- name: Upload MFC Sample
|
|
||||||
uses: actions/upload-artifact@v4.6.2
|
|
||||||
with:
|
|
||||||
name: mfc-sample-${{ inputs.platform }}-x64
|
|
||||||
path: samples/mfc/
|
|
||||||
retention-days: 7
|
|
||||||
125
.github/actions/build-sample-qt/action.yml
vendored
@@ -1,125 +0,0 @@
|
|||||||
name: 'Build Qt Sample'
|
|
||||||
description: 'Build Qt samples using OCCT installation'
|
|
||||||
|
|
||||||
inputs:
|
|
||||||
platform:
|
|
||||||
description: 'Build platform (windows/linux)'
|
|
||||||
required: true
|
|
||||||
install-artifact-name:
|
|
||||||
description: 'OCCT installation artifact name'
|
|
||||||
required: true
|
|
||||||
thirdparty_url:
|
|
||||||
description: 'URL to download 3rdparty dependencies'
|
|
||||||
required: false
|
|
||||||
default: 'https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip'
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Download OCCT installation
|
|
||||||
uses: ./.github/actions/download-artifacts
|
|
||||||
with:
|
|
||||||
name: ${{ inputs.install-artifact-name }}
|
|
||||||
path: occt-install
|
|
||||||
|
|
||||||
- name: Download vcpkg cache
|
|
||||||
uses: ./.github/actions/download-vcpkg-cache
|
|
||||||
with:
|
|
||||||
artifact-name: ${{ inputs.install-artifact-name }}-cache
|
|
||||||
|
|
||||||
- name: Install Windows dependencies
|
|
||||||
if: inputs.platform == 'windows'
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Invoke-WebRequest -Uri ${{ inputs.thirdparty_url }} -OutFile 3rdparty-vc14-64.zip
|
|
||||||
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
|
|
||||||
Remove-Item 3rdparty-vc14-64.zip
|
|
||||||
|
|
||||||
- name: Install Linux dependencies
|
|
||||||
if: inputs.platform == 'linux'
|
|
||||||
shell: bash
|
|
||||||
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev qtbase5-dev qt5-qmake qtbase5-dev-tools qtdeclarative5-dev qttools5-dev qttools5-dev-tools
|
|
||||||
|
|
||||||
- name: Setup MSBuild
|
|
||||||
if: inputs.platform == 'windows'
|
|
||||||
uses: microsoft/setup-msbuild@v2
|
|
||||||
|
|
||||||
- name: Build Qt Samples - Windows
|
|
||||||
if: inputs.platform == 'windows'
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
REM Setup environment
|
|
||||||
cd ${{ github.workspace }}/occt-install/
|
|
||||||
call env.bat vc14 win64 Release
|
|
||||||
|
|
||||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" x64
|
|
||||||
|
|
||||||
REM Setup Qt environment
|
|
||||||
set "QTDIR=${{ github.workspace }}\3rdparty-vc14-64\qt5.11.2-vc14-64"
|
|
||||||
set "PATH=%QTDIR%\bin;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE;%PATH%"
|
|
||||||
|
|
||||||
cd ${{ github.workspace }}/samples/qt
|
|
||||||
|
|
||||||
for %%s in (IESample Tutorial FuncDemo) do (
|
|
||||||
cd %%s
|
|
||||||
echo "Generating project for %%s..."
|
|
||||||
qmake -tp vc -r -o %%s.sln %%s0.pro
|
|
||||||
|
|
||||||
echo "Restoring %%s..."
|
|
||||||
msbuild.exe %%s.sln -t:Restore -p:Configuration=Release -p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=%%s_restore.log;Verbosity=detailed
|
|
||||||
|
|
||||||
echo "Building %%s..."
|
|
||||||
msbuild.exe %%s.sln /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v143 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=%%s_build.log;Verbosity=detailed /m
|
|
||||||
|
|
||||||
REM Display logs if build fails
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo "Build failed for %%s. Contents of restore log:"
|
|
||||||
type %%s_restore.log
|
|
||||||
echo "Contents of build log:"
|
|
||||||
type %%s_build.log
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
)
|
|
||||||
|
|
||||||
- name: Build Qt Samples - Linux
|
|
||||||
if: inputs.platform == 'linux'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/occt-install/bin
|
|
||||||
source env.sh
|
|
||||||
|
|
||||||
# Set library paths for vcpkg dependencies
|
|
||||||
export LD_LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib:${{ github.workspace }}/occt-install/lib:$LD_LIBRARY_PATH"
|
|
||||||
export LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib:${{ github.workspace }}/occt-install/lib:$LIBRARY_PATH"
|
|
||||||
export PKG_CONFIG_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
||||||
|
|
||||||
cd ${{ github.workspace }}/samples/qt
|
|
||||||
|
|
||||||
for sample in IESample Tutorial FuncDemo; do
|
|
||||||
cd $sample
|
|
||||||
aQMakePath=`which qmake`
|
|
||||||
host=`uname -s`
|
|
||||||
export STATION=$host
|
|
||||||
export RES_DIR="${{ github.workspace }}/samples/qt/${sample}/result"
|
|
||||||
|
|
||||||
# Configure qmake with vcpkg paths
|
|
||||||
qmake $sample.pro \
|
|
||||||
"LIBS += -L${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib" \
|
|
||||||
"LIBS += -Wl,-rpath,${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib" \
|
|
||||||
"INCLUDEPATH += ${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/include"
|
|
||||||
|
|
||||||
aNbJobs="$(getconf _NPROCESSORS_ONLN)"
|
|
||||||
make -j$aNbJobs release
|
|
||||||
cd ..
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Upload Qt Samples
|
|
||||||
uses: actions/upload-artifact@v4.6.2
|
|
||||||
with:
|
|
||||||
name: qt-samples-${{ inputs.platform }}-x64
|
|
||||||
path: |
|
|
||||||
samples/qt/
|
|
||||||
samples/qt/
|
|
||||||
retention-days: 7
|
|
||||||
111
.github/actions/build-tinspector/action.yml
vendored
@@ -1,111 +0,0 @@
|
|||||||
name: 'Build TInspector'
|
|
||||||
description: 'Build TInspector using OCCT installation as a separate job'
|
|
||||||
|
|
||||||
inputs:
|
|
||||||
platform:
|
|
||||||
description: 'Build platform (windows/linux)'
|
|
||||||
required: true
|
|
||||||
install-artifact-name:
|
|
||||||
description: 'OCCT installation artifact name'
|
|
||||||
required: true
|
|
||||||
thirdparty_url:
|
|
||||||
description: 'URL to download 3rdparty dependencies'
|
|
||||||
required: false
|
|
||||||
default: 'https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip'
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Download OCCT installation
|
|
||||||
uses: ./.github/actions/download-artifacts
|
|
||||||
with:
|
|
||||||
name: ${{ inputs.install-artifact-name }}
|
|
||||||
path: occt-install
|
|
||||||
|
|
||||||
- name: Download vcpkg cache
|
|
||||||
uses: ./.github/actions/download-vcpkg-cache
|
|
||||||
with:
|
|
||||||
artifact-name: ${{ inputs.install-artifact-name }}-cache
|
|
||||||
|
|
||||||
- name: Install Windows dependencies
|
|
||||||
if: inputs.platform == 'windows'
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Invoke-WebRequest -Uri ${{ inputs.thirdparty_url }} -OutFile 3rdparty-vc14-64.zip
|
|
||||||
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
|
|
||||||
Remove-Item 3rdparty-vc14-64.zip
|
|
||||||
|
|
||||||
- name: Install Linux dependencies
|
|
||||||
if: inputs.platform == 'linux'
|
|
||||||
shell: bash
|
|
||||||
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev qtbase5-dev qt5-qmake qtbase5-dev-tools qtdeclarative5-dev qttools5-dev qttools5-dev-tools
|
|
||||||
|
|
||||||
- name: Checkout TInspector
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/Open-Cascade-SAS/Inspector.git inspector
|
|
||||||
cd inspector
|
|
||||||
git checkout efe00930adc2130a91744ba950c5270986d19739
|
|
||||||
|
|
||||||
- name: Configure TInspector - Windows
|
|
||||||
if: inputs.platform == 'windows'
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
cd inspector
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -G "Visual Studio 17 2022" -A x64 `
|
|
||||||
-D CMAKE_BUILD_TYPE=Release `
|
|
||||||
-D BUILD_SHARED_LIBS=ON `
|
|
||||||
-D QtX=Qt5 `
|
|
||||||
-D 3RDPARTY_DIR=${{ github.workspace }}//3rdparty-vc14-64 `
|
|
||||||
-D OpenCASCADE_DIR=${{ github.workspace }}/occt-install `
|
|
||||||
-D INSTALL_DIR=${{ github.workspace }}/inspector/install `
|
|
||||||
-D CMAKE_POLICY_VERSION_MINIMUM=3.5 `
|
|
||||||
..
|
|
||||||
|
|
||||||
- name: Configure TInspector - Linux
|
|
||||||
if: inputs.platform == 'linux'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd inspector
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
export LD_LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib:${{ github.workspace }}/occt-install/lib:$LD_LIBRARY_PATH"
|
|
||||||
cmake -G "Unix Makefiles" \
|
|
||||||
-D CMAKE_BUILD_TYPE=Release \
|
|
||||||
-D BUILD_SHARED_LIBS=ON \
|
|
||||||
-D OpenCASCADE_DIR=${{ github.workspace }}/occt-install \
|
|
||||||
-D INSTALL_DIR=${{ github.workspace }}/inspector/install \
|
|
||||||
-D QtX=Qt5 \
|
|
||||||
-D CMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
|
||||||
-D CMAKE_LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib" \
|
|
||||||
-D CMAKE_INCLUDE_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/include" \
|
|
||||||
-D CMAKE_EXE_LINKER_FLAGS="-L${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib -Wl,-rpath,${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib" \
|
|
||||||
-D CMAKE_SHARED_LINKER_FLAGS="-L${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib -Wl,-rpath,${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib" \
|
|
||||||
..
|
|
||||||
|
|
||||||
- name: Build TInspector - Windows
|
|
||||||
if: inputs.platform == 'windows'
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
cd inspector/build
|
|
||||||
cmake --build . --config Release --target install
|
|
||||||
|
|
||||||
- name: Build TInspector - Linux
|
|
||||||
if: inputs.platform == 'linux'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd inspector/build
|
|
||||||
# Set library paths for build and runtime
|
|
||||||
export LD_LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib:${{ github.workspace }}/occt-install/lib:$LD_LIBRARY_PATH"
|
|
||||||
export LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib:${{ github.workspace }}/occt-install/lib:$LIBRARY_PATH"
|
|
||||||
export PKG_CONFIG_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
||||||
make install -j$(nproc)
|
|
||||||
|
|
||||||
- name: Upload TInspector installation
|
|
||||||
uses: actions/upload-artifact@v4.6.2
|
|
||||||
with:
|
|
||||||
name: inspector-${{ inputs.platform }}-x64
|
|
||||||
path: inspector/install
|
|
||||||
retention-days: 7
|
|
||||||
@@ -57,12 +57,6 @@ jobs:
|
|||||||
needs:
|
needs:
|
||||||
- clang-format
|
- clang-format
|
||||||
- ascii-check
|
- ascii-check
|
||||||
- build-inspector-windows
|
|
||||||
- build-inspector-linux
|
|
||||||
- build-csharp-windows
|
|
||||||
- build-mfc-windows
|
|
||||||
- build-qt-windows
|
|
||||||
- build-qt-linux
|
|
||||||
- retest-windows-x64
|
- retest-windows-x64
|
||||||
- retest-macos-x64
|
- retest-macos-x64
|
||||||
- retest-linux-clang-x64
|
- retest-linux-clang-x64
|
||||||
@@ -147,96 +141,6 @@ jobs:
|
|||||||
cmake-build-type: 'Debug'
|
cmake-build-type: 'Debug'
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
build-inspector-windows:
|
|
||||||
name: Build TInspector on Windows
|
|
||||||
needs: prepare-and-build-windows-x64
|
|
||||||
runs-on: windows-2025
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4.2.2
|
|
||||||
|
|
||||||
- name: Build TInspector
|
|
||||||
uses: ./.github/actions/build-tinspector
|
|
||||||
with:
|
|
||||||
platform: windows
|
|
||||||
install-artifact-name: install-windows-x64
|
|
||||||
|
|
||||||
build-inspector-linux:
|
|
||||||
name: Build TInspector on Linux
|
|
||||||
needs: prepare-and-build-linux-clang-x64
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4.2.2
|
|
||||||
|
|
||||||
- name: Build TInspector
|
|
||||||
uses: ./.github/actions/build-tinspector
|
|
||||||
with:
|
|
||||||
platform: linux
|
|
||||||
install-artifact-name: install-linux-clang-x64
|
|
||||||
|
|
||||||
build-csharp-windows:
|
|
||||||
name: Build CSharp Sample on Windows
|
|
||||||
needs: prepare-and-build-windows-x64
|
|
||||||
runs-on: windows-2025
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4.2.2
|
|
||||||
|
|
||||||
- name: Build CSharp Sample
|
|
||||||
uses: ./.github/actions/build-sample-csharp
|
|
||||||
with:
|
|
||||||
platform: windows
|
|
||||||
install-artifact-name: install-windows-x64
|
|
||||||
|
|
||||||
build-mfc-windows:
|
|
||||||
name: Build MFC Sample on Windows
|
|
||||||
needs: prepare-and-build-windows-x64
|
|
||||||
runs-on: windows-2025
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4.2.2
|
|
||||||
|
|
||||||
- name: Build MFC Sample
|
|
||||||
uses: ./.github/actions/build-sample-mfc
|
|
||||||
with:
|
|
||||||
platform: windows
|
|
||||||
install-artifact-name: install-windows-x64
|
|
||||||
|
|
||||||
build-qt-windows:
|
|
||||||
name: Build Qt Sample on Windows
|
|
||||||
needs: prepare-and-build-windows-x64
|
|
||||||
runs-on: windows-2025
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4.2.2
|
|
||||||
|
|
||||||
- name: Build Qt Sample
|
|
||||||
uses: ./.github/actions/build-sample-qt
|
|
||||||
with:
|
|
||||||
platform: windows
|
|
||||||
install-artifact-name: install-windows-x64
|
|
||||||
|
|
||||||
build-qt-linux:
|
|
||||||
name: Build Qt Sample on Linux
|
|
||||||
needs: prepare-and-build-linux-clang-x64
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4.2.2
|
|
||||||
|
|
||||||
- name: Build Qt Sample
|
|
||||||
uses: ./.github/actions/build-sample-qt
|
|
||||||
with:
|
|
||||||
platform: linux
|
|
||||||
install-artifact-name: install-linux-clang-x64
|
|
||||||
|
|
||||||
test-windows-x64:
|
test-windows-x64:
|
||||||
name: Test on Windows (x64)
|
name: Test on Windows (x64)
|
||||||
runs-on: windows-2025
|
runs-on: windows-2025
|
||||||
|
|||||||
1
.gitignore
vendored
@@ -18,7 +18,6 @@
|
|||||||
!/cmake/
|
!/cmake/
|
||||||
!/data/
|
!/data/
|
||||||
!/dox/
|
!/dox/
|
||||||
!/samples/
|
|
||||||
!/src/
|
!/src/
|
||||||
!/tests/
|
!/tests/
|
||||||
!/tools/
|
!/tools/
|
||||||
|
|||||||
163
CMakeLists.txt
@@ -241,9 +241,6 @@ if (CMAKE_VERSION VERSION_LESS "3.14")
|
|||||||
OCCT_CHECK_AND_UNSET (BUILD_INCLUDE_SYMLINK)
|
OCCT_CHECK_AND_UNSET (BUILD_INCLUDE_SYMLINK)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# copy samples to install directory
|
|
||||||
set (INSTALL_SAMPLES OFF CACHE BOOL "${INSTALL_SAMPLES_DESCR}")
|
|
||||||
|
|
||||||
# install dir of the project
|
# install dir of the project
|
||||||
if (NOT DEFINED INSTALL_DIR)
|
if (NOT DEFINED INSTALL_DIR)
|
||||||
# set default install directory for Windows
|
# set default install directory for Windows
|
||||||
@@ -369,11 +366,6 @@ endif()
|
|||||||
set (BUILD_ADDITIONAL_TOOLKITS "" CACHE STRING "${BUILD_ADDITIONAL_TOOLKITS_DESCR}")
|
set (BUILD_ADDITIONAL_TOOLKITS "" CACHE STRING "${BUILD_ADDITIONAL_TOOLKITS_DESCR}")
|
||||||
separate_arguments (BUILD_ADDITIONAL_TOOLKITS)
|
separate_arguments (BUILD_ADDITIONAL_TOOLKITS)
|
||||||
|
|
||||||
if (MSVC)
|
|
||||||
set (BUILD_SAMPLES_MFC OFF CACHE BOOL "${BUILD_SAMPLES_MFC_DESCR}")
|
|
||||||
endif()
|
|
||||||
set (BUILD_SAMPLES_QT OFF CACHE BOOL "${BUILD_SAMPLES_QT_DESCR}")
|
|
||||||
|
|
||||||
# uwp sample
|
# uwp sample
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
||||||
@@ -834,18 +826,6 @@ else()
|
|||||||
OCCT_CHECK_AND_UNSET ("INSTALL_GTEST")
|
OCCT_CHECK_AND_UNSET ("INSTALL_GTEST")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# qt for samples
|
|
||||||
if (BUILD_SAMPLES_QT)
|
|
||||||
# check qt 3rdparty path
|
|
||||||
add_definitions (-DHAVE_QT)
|
|
||||||
list (APPEND OCCT_3RDPARTY_CMAKE_LIST "adm/cmake/qt")
|
|
||||||
message (STATUS "Info: Qt is used by OCCT")
|
|
||||||
else()
|
|
||||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_QT")
|
|
||||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TQTMALLOC")
|
|
||||||
OCCT_CHECK_AND_UNSET ("INSTALL_QT")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# VCPKG require delayed processing of 3rdparty.
|
# VCPKG require delayed processing of 3rdparty.
|
||||||
# That is why we delay the creating project and setting up
|
# That is why we delay the creating project and setting up
|
||||||
# the platform specific variables.
|
# the platform specific variables.
|
||||||
@@ -937,20 +917,6 @@ if (NOT DEFINED INSTALL_DIR_DATA)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# OCCT samples
|
|
||||||
if (NOT DEFINED INSTALL_DIR_SAMPLES)
|
|
||||||
if (LAYOUT_IS_UNIX)
|
|
||||||
set (INSTALL_DIR_SAMPLES "share/opencascade/samples" CACHE PATH "${INSTALL_DIR_SAMPLES_DESCR}")
|
|
||||||
if (INSTALL_DIR_WITH_VERSION)
|
|
||||||
set (INSTALL_DIR_SAMPLES "share/opencascade-${OCC_VERSION_STRING_EXT}/samples" CACHE PATH "${INSTALL_DIR_SAMPLES_DESCR}" FORCE)
|
|
||||||
endif()
|
|
||||||
elseif (LAYOUT_IS_VCPKG)
|
|
||||||
set (INSTALL_DIR_SAMPLES "share/${OCCT_PROJECT_NAME}/samples" CACHE PATH "${INSTALL_DIR_SAMPLES_DESCR}")
|
|
||||||
else()
|
|
||||||
set (INSTALL_DIR_SAMPLES "samples" CACHE PATH "${INSTALL_DIR_SAMPLES_DESCR}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# OCCT tests
|
# OCCT tests
|
||||||
if (NOT DEFINED INSTALL_DIR_TESTS)
|
if (NOT DEFINED INSTALL_DIR_TESTS)
|
||||||
if (LAYOUT_IS_UNIX)
|
if (LAYOUT_IS_UNIX)
|
||||||
@@ -1143,58 +1109,20 @@ CONFIGURE_AND_INSTALL_VERSION_HEADER()
|
|||||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||||
message (STATUS "Info: \(${CURRENT_TIME}\) End the collecting")
|
message (STATUS "Info: \(${CURRENT_TIME}\) End the collecting")
|
||||||
|
|
||||||
list (FIND BUILD_TOOLKITS DRAWEXE DRAWEXE_INDEX)
|
|
||||||
if (${DRAWEXE_INDEX} GREATER -1)
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("data/" "${INSTALL_DIR_DATA}")
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR_SAMPLES}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set (SCRIPT_EXT bat)
|
set (SCRIPT_EXT bat)
|
||||||
else()
|
else()
|
||||||
set (SCRIPT_EXT sh)
|
set (SCRIPT_EXT sh)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# OCCT samples
|
|
||||||
# get absolute path from INSTALL_DIR
|
|
||||||
set (INSTALL_DIR_ABSOLUTE "${INSTALL_DIR}")
|
|
||||||
if(NOT IS_ABSOLUTE "${INSTALL_DIR_ABSOLUTE}")
|
|
||||||
get_filename_component(INSTALL_DIR_ABSOLUTE "${CMAKE_BINARY_DIR}/${INSTALL_DIR}" ABSOLUTE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (INSTALL_SAMPLES)
|
|
||||||
OCCT_CONFIGURE ("adm/templates/env.samples.${SCRIPT_EXT}.in" "env.samples.${SCRIPT_EXT}")
|
|
||||||
if (WIN32)
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/CSharp" "${INSTALL_DIR_SAMPLES}")
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/mfc" "${INSTALL_DIR_SAMPLES}")
|
|
||||||
|
|
||||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/xaml" "${INSTALL_DIR_SAMPLES}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/CSharp" RENAME "env.${SCRIPT_EXT}")
|
|
||||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/mfc/standard" RENAME "env.${SCRIPT_EXT}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/java" "${INSTALL_DIR_SAMPLES}")
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/ocafsamples" "${INSTALL_DIR_SAMPLES}")
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt" "${INSTALL_DIR_SAMPLES}")
|
|
||||||
|
|
||||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/FuncDemo" RENAME "env.${SCRIPT_EXT}")
|
|
||||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/IESample" RENAME "env.${SCRIPT_EXT}")
|
|
||||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/OCCTOverview" RENAME "env.${SCRIPT_EXT}")
|
|
||||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/Tutorial" RENAME "env.${SCRIPT_EXT}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (INSTALL_TEST_CASES)
|
if (INSTALL_TEST_CASES)
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("tests/" "${INSTALL_DIR_TESTS}")
|
OCCT_INSTALL_FILE_OR_DIR ("tests/" "${INSTALL_DIR_TESTS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list (FIND BUILD_TOOLKITS DRAWEXE DRAWEXE_INDEX)
|
list (FIND BUILD_TOOLKITS DRAWEXE DRAWEXE_INDEX)
|
||||||
if (${DRAWEXE_INDEX} GREATER -1)
|
if (${DRAWEXE_INDEX} GREATER -1)
|
||||||
# copy data and samples/tcl folders to install script folder
|
# copy data folder (includes tcl samples) to install folder
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("data/" "${INSTALL_DIR_DATA}")
|
OCCT_INSTALL_FILE_OR_DIR ("data/" "${INSTALL_DIR_DATA}")
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR_SAMPLES}")
|
|
||||||
|
|
||||||
install (FILES "${OCCT_ROOT_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
|
install (FILES "${OCCT_ROOT_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||||
@@ -1259,7 +1187,6 @@ if (LAYOUT_IS_VCPKG)
|
|||||||
set \"CSF_OCCTIncludePath=%CASCONTENTROOT%\\include\"
|
set \"CSF_OCCTIncludePath=%CASCONTENTROOT%\\include\"
|
||||||
set \"CSF_OCCTResourcePath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\"
|
set \"CSF_OCCTResourcePath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\"
|
||||||
set \"CSF_OCCTDataPath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\"
|
set \"CSF_OCCTDataPath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\"
|
||||||
set \"CSF_OCCTSamplesPath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\\samples\"
|
|
||||||
set \"CSF_OCCTTestsPath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\\tests\"
|
set \"CSF_OCCTTestsPath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\\tests\"
|
||||||
set \"CSF_OCCTDocPath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\\doc\"")
|
set \"CSF_OCCTDocPath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\\doc\"")
|
||||||
else()
|
else()
|
||||||
@@ -1273,7 +1200,6 @@ if (LAYOUT_IS_VCPKG)
|
|||||||
export CSF_OCCTIncludePath=\"\${CASCONTENTROOT}/include\"
|
export CSF_OCCTIncludePath=\"\${CASCONTENTROOT}/include\"
|
||||||
export CSF_OCCTResourcePath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}\"
|
export CSF_OCCTResourcePath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}\"
|
||||||
export CSF_OCCTDataPath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}\"
|
export CSF_OCCTDataPath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}\"
|
||||||
export CSF_OCCTSamplesPath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}/samples\"
|
|
||||||
export CSF_OCCTTestsPath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}/tests\"
|
export CSF_OCCTTestsPath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}/tests\"
|
||||||
export CSF_OCCTDocPath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}/doc\"")
|
export CSF_OCCTDocPath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}/doc\"")
|
||||||
endif()
|
endif()
|
||||||
@@ -1288,7 +1214,6 @@ else()
|
|||||||
set (OCCT_CUSTOM_ADDITIONAL_PATHS "set \"CSF_OCCTIncludePath=%CASROOT%/${INSTALL_DIR_INCLUDE}\"
|
set (OCCT_CUSTOM_ADDITIONAL_PATHS "set \"CSF_OCCTIncludePath=%CASROOT%/${INSTALL_DIR_INCLUDE}\"
|
||||||
set \"CSF_OCCTResourcePath=%CASROOT%/${INSTALL_DIR_RESOURCE}\"
|
set \"CSF_OCCTResourcePath=%CASROOT%/${INSTALL_DIR_RESOURCE}\"
|
||||||
set \"CSF_OCCTDataPath=%CASROOT%/${INSTALL_DIR_DATA}\"
|
set \"CSF_OCCTDataPath=%CASROOT%/${INSTALL_DIR_DATA}\"
|
||||||
set \"CSF_OCCTSamplesPath=%CASROOT%/${INSTALL_DIR_SAMPLES}\"
|
|
||||||
set \"CSF_OCCTTestsPath=%CASROOT%/${INSTALL_DIR_TESTS}\"
|
set \"CSF_OCCTTestsPath=%CASROOT%/${INSTALL_DIR_TESTS}\"
|
||||||
set \"CSF_OCCTDocPath=%CASROOT%/${INSTALL_DIR_DOC}\"")
|
set \"CSF_OCCTDocPath=%CASROOT%/${INSTALL_DIR_DOC}\"")
|
||||||
else()
|
else()
|
||||||
@@ -1297,7 +1222,6 @@ else()
|
|||||||
set (OCCT_CUSTOM_ADDITIONAL_PATHS "export CSF_OCCTIncludePath=\"\${CASROOT}/${INSTALL_DIR_INCLUDE}\"
|
set (OCCT_CUSTOM_ADDITIONAL_PATHS "export CSF_OCCTIncludePath=\"\${CASROOT}/${INSTALL_DIR_INCLUDE}\"
|
||||||
export CSF_OCCTResourcePath=\"\${CASROOT}/${INSTALL_DIR_RESOURCE}\"
|
export CSF_OCCTResourcePath=\"\${CASROOT}/${INSTALL_DIR_RESOURCE}\"
|
||||||
export CSF_OCCTDataPath=\"\${CASROOT}/${INSTALL_DIR_DATA}\"
|
export CSF_OCCTDataPath=\"\${CASROOT}/${INSTALL_DIR_DATA}\"
|
||||||
export CSF_OCCTSamplesPath=\"\${CASROOT}/${INSTALL_DIR_SAMPLES}\"
|
|
||||||
export CSF_OCCTTestsPath=\"\${CASROOT}/${INSTALL_DIR_TESTS}\"
|
export CSF_OCCTTestsPath=\"\${CASROOT}/${INSTALL_DIR_TESTS}\"
|
||||||
export CSF_OCCTDocPath=\"\${CASROOT}/${INSTALL_DIR_DOC}\"")
|
export CSF_OCCTDocPath=\"\${CASROOT}/${INSTALL_DIR_DOC}\"")
|
||||||
endif()
|
endif()
|
||||||
@@ -1342,11 +1266,6 @@ endif()
|
|||||||
# write current custom.bat/sh (for build directory)
|
# write current custom.bat/sh (for build directory)
|
||||||
OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
|
OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
|
||||||
|
|
||||||
if (BUILD_SAMPLES_MFC OR BUILD_SAMPLES_QT)
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}")
|
|
||||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
# Set custom script path variable for Windows template
|
# Set custom script path variable for Windows template
|
||||||
if (LAYOUT_IS_VCPKG)
|
if (LAYOUT_IS_VCPKG)
|
||||||
@@ -1405,24 +1324,6 @@ foreach(RESOURCE ${RESOURCES})
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if (BUILD_SAMPLES_QT)
|
|
||||||
FILE_TO_LIST ("adm/SAMPLES_RESOURCES" SAMPLES_RESOURCES)
|
|
||||||
foreach(RESOURCE ${SAMPLES_RESOURCES})
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/${RESOURCE}" "${INSTALL_DIR_RESOURCE}/samples")
|
|
||||||
#message("Copy Sample resources: samples/${RESOURCE} into ${INSTALL_DIR_RESOURCE}/samples")
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
## Copy sources of OCCTOverview for using in the sample
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/DataExchangeSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/OcafSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/GeometrySamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/TopologySamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/TriangulationSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/Viewer2dSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/Viewer3dSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
# patch installed DrawDefault file if BUILD_SHARED_LIBRARY_NAME_POSTFIX is changed
|
# patch installed DrawDefault file if BUILD_SHARED_LIBRARY_NAME_POSTFIX is changed
|
||||||
if (NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
if (NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||||
OCCT_UPDATE_DRAW_DEFAULT_FILE()
|
OCCT_UPDATE_DRAW_DEFAULT_FILE()
|
||||||
@@ -1477,68 +1378,6 @@ if (MSVC AND 3RDPARTY_DLL_DIRS)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message (STATUS "Info: \(${CURRENT_TIME}\) OCCT toolkits processed")
|
|
||||||
# samples do not support patch usage
|
|
||||||
if (BUILD_SAMPLES_MFC OR BUILD_SAMPLES_QT)
|
|
||||||
set (OCCT_ROOT ${OCCT_ROOT_DIR})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (BUILD_SAMPLES_MFC)
|
|
||||||
set (MFC_STANDARD_SAMPLES_DIR ${OCCT_ROOT}/samples/mfc/standard)
|
|
||||||
set (COMMON_WINMAIN_FILE ${MFC_STANDARD_SAMPLES_DIR}/Common/Winmain.cpp)
|
|
||||||
|
|
||||||
add_subdirectory(samples/mfc/standard/mfcsample)
|
|
||||||
add_subdirectory(samples/mfc/standard/01_Geometry)
|
|
||||||
add_subdirectory(samples/mfc/standard/02_Modeling)
|
|
||||||
add_subdirectory(samples/mfc/standard/03_ImportExport)
|
|
||||||
add_subdirectory(samples/mfc/standard/04_HLR)
|
|
||||||
|
|
||||||
message (STATUS "Info: \(${CURRENT_TIME}\) MFC Sample projects added")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
OCCT_MODULES_AND_TOOLKITS (SAMPLES "SAMPLES_TOOLKITS" OCCT_SAMPLES)
|
|
||||||
|
|
||||||
# Load sample configuration files
|
|
||||||
foreach (OCCT_SAMPLE ${OCCT_SAMPLES})
|
|
||||||
foreach (BUILD_SAMPLE_TOOLKIT ${${OCCT_SAMPLE}_SAMPLES_TOOLKITS})
|
|
||||||
OCCT_INCLUDE_CMAKE_FILE (samples/${OCCT_SAMPLE}/${BUILD_SAMPLE_TOOLKIT}/PACKAGES)
|
|
||||||
OCCT_INCLUDE_CMAKE_FILE (samples/${OCCT_SAMPLE}/${BUILD_SAMPLE_TOOLKIT}/EXTERNLIB)
|
|
||||||
OCCT_INCLUDE_CMAKE_FILE (samples/${OCCT_SAMPLE}/${BUILD_SAMPLE_TOOLKIT}/FILES)
|
|
||||||
foreach (PACKAGE ${OCCT_${BUILD_SAMPLE_TOOLKIT}_LIST_OF_PACKAGES})
|
|
||||||
OCCT_INCLUDE_CMAKE_FILE (samples/${OCCT_SAMPLE}/${PACKAGE}/FILES)
|
|
||||||
endforeach()
|
|
||||||
endforeach()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
if (BUILD_SAMPLES_QT)
|
|
||||||
if (BUILD_SAMPLES_QT)
|
|
||||||
if (NOT Qt5_FOUND OR "${Qt5Gui_EGL_INCLUDE_DIRS}" STREQUAL "" OR NOT WIN32)
|
|
||||||
list (REMOVE_ITEM qt_SAMPLES_TOOLKITS AndroidQt)
|
|
||||||
message (STATUS "Info: AndroidQt sample excluded due to OS is not Windows or Qt is configured without ANGLE")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
list (REMOVE_ITEM OCCT_SAMPLES qt)
|
|
||||||
message (STATUS "Info: qt samples excluded due to BUILD_SAMPLES_QT is disabled")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
foreach (OCCT_SAMPLE ${OCCT_SAMPLES})
|
|
||||||
list (APPEND BUILD_SAMPLE_TOOLKITS ${${OCCT_SAMPLE}_SAMPLES_TOOLKITS})
|
|
||||||
|
|
||||||
# collect all the headers to <binary dir>/inc/samples folder
|
|
||||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
|
||||||
message (STATUS "Info: \(${CURRENT_TIME}\) ${OCCT_SAMPLE} Sample projects added")
|
|
||||||
|
|
||||||
# include patched toolkit projects or original ones
|
|
||||||
foreach (BUILD_SAMPLE_TOOLKIT ${${OCCT_SAMPLE}_SAMPLES_TOOLKITS})
|
|
||||||
OCCT_ADD_SUBDIRECTORY ("samples/${OCCT_SAMPLE}/${BUILD_SAMPLE_TOOLKIT}")
|
|
||||||
endforeach()
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (BUILD_MODULE_UwpSample)
|
|
||||||
add_subdirectory(samples/xaml)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Prepare variables for configuration of OpenCASCADE cmake config file
|
# Prepare variables for configuration of OpenCASCADE cmake config file
|
||||||
set (OCCT_MODULES_ENABLED)
|
set (OCCT_MODULES_ENABLED)
|
||||||
set (OCCT_LIBRARIES)
|
set (OCCT_LIBRARIES)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
DrawResources
|
DrawResources
|
||||||
|
samples/tcl
|
||||||
StdResource
|
StdResource
|
||||||
SHMessage
|
SHMessage
|
||||||
Textures
|
Textures
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
qt AndroidQt FuncDemo IESample Tutorial OCCTOverview
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
qt/Common/res/
|
|
||||||
qt/Tutorial/res/
|
|
||||||
qt/OCCTOverview/res/
|
|
||||||
@@ -388,9 +388,6 @@ function(OCCT_DOC_CONFIGURE_DOXYGEN OUTPUT_DIR CONFIG_FILE DOC_TYPE)
|
|||||||
else()
|
else()
|
||||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${OCCT_ROOT_DIR}/dox/resources\n")
|
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${OCCT_ROOT_DIR}/dox/resources\n")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Example paths
|
|
||||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXAMPLE_PATH = ${OCCT_ROOT_DIR}/src ${OCCT_ROOT_DIR}/samples\n")
|
|
||||||
else()
|
else()
|
||||||
# Settings for Reference Manual
|
# Settings for Reference Manual
|
||||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_NAME = \"Open CASCADE Technology Reference Manual\"\n")
|
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_NAME = \"Open CASCADE Technology Reference Manual\"\n")
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ function(OCCT_SET_GTEST_ENVIRONMENT)
|
|||||||
"CSF_OCCTResourcePath=${OCCT_ROOT_DIR}/resources"
|
"CSF_OCCTResourcePath=${OCCT_ROOT_DIR}/resources"
|
||||||
"CSF_OCCTDataPath=${OCCT_ROOT_DIR}/data"
|
"CSF_OCCTDataPath=${OCCT_ROOT_DIR}/data"
|
||||||
"CSF_OCCTDocPath=${OCCT_ROOT_DIR}/doc"
|
"CSF_OCCTDocPath=${OCCT_ROOT_DIR}/doc"
|
||||||
"CSF_OCCTSamplesPath=${OCCT_ROOT_DIR}/samples"
|
|
||||||
"CSF_OCCTTestsPath=${OCCT_ROOT_DIR}/tests"
|
"CSF_OCCTTestsPath=${OCCT_ROOT_DIR}/tests"
|
||||||
"CSF_OCCTBinPath=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
|
"CSF_OCCTBinPath=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
|
||||||
"CSF_OCCTLibPath=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}"
|
"CSF_OCCTLibPath=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}"
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ macro (OCCT_CHECK_AND_UNSET_INSTALL_DIR_SUBDIRS)
|
|||||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_INCLUDE)
|
OCCT_CHECK_AND_UNSET (INSTALL_DIR_INCLUDE)
|
||||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_RESOURCE)
|
OCCT_CHECK_AND_UNSET (INSTALL_DIR_RESOURCE)
|
||||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_DATA)
|
OCCT_CHECK_AND_UNSET (INSTALL_DIR_DATA)
|
||||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_SAMPLES)
|
|
||||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_TESTS)
|
OCCT_CHECK_AND_UNSET (INSTALL_DIR_TESTS)
|
||||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_DOC)
|
OCCT_CHECK_AND_UNSET (INSTALL_DIR_DOC)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|||||||
@@ -50,10 +50,10 @@ OFF - using a reference file with direct include to the origin,
|
|||||||
ON - symbolic link to the origin file are created")
|
ON - symbolic link to the origin file are created")
|
||||||
|
|
||||||
# install variables
|
# install variables
|
||||||
set (INSTALL_DIR_DESCR
|
set (INSTALL_DIR_DESCR
|
||||||
"The place where built OCCT libraries, headers, test cases (INSTALL_TEST_CASES variable),
|
"The place where built OCCT libraries, headers, test cases (INSTALL_TEST_CASES variable),
|
||||||
samples (INSTALL_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_TBB and
|
and certain 3rdparties (INSTALL_TBB and other similar variables) will be placed
|
||||||
other similar variables) will be placed during the installation process (building INSTALL project)")
|
during the installation process (building INSTALL project)")
|
||||||
|
|
||||||
set (INSTALL_DIR_WITH_VERSION_DESCR
|
set (INSTALL_DIR_WITH_VERSION_DESCR
|
||||||
"Use OCCT version number as suffix for names of directories")
|
"Use OCCT version number as suffix for names of directories")
|
||||||
@@ -73,10 +73,8 @@ set (INSTALL_DIR_DOC_DESCR
|
|||||||
"Subdirectory of INSTALL_DIR where documentation will be installed")
|
"Subdirectory of INSTALL_DIR where documentation will be installed")
|
||||||
set (INSTALL_DIR_LIB_DESCR
|
set (INSTALL_DIR_LIB_DESCR
|
||||||
"Subdirectory of INSTALL_DIR where libraries (.so on Linux, .lib on Windows) will be installed")
|
"Subdirectory of INSTALL_DIR where libraries (.so on Linux, .lib on Windows) will be installed")
|
||||||
set (INSTALL_DIR_RESOURCE_DESCR
|
set (INSTALL_DIR_RESOURCE_DESCR
|
||||||
"Subdirectory of INSTALL_DIR where OCCT resource files will be installed")
|
"Subdirectory of INSTALL_DIR where OCCT resource files will be installed")
|
||||||
set (INSTALL_DIR_SAMPLES_DESCR
|
|
||||||
"Subdirectory of INSTALL_DIR where samples will be installed")
|
|
||||||
set (INSTALL_DIR_TESTS_DESCR
|
set (INSTALL_DIR_TESTS_DESCR
|
||||||
"Subdirectory of INSTALL_DIR where test scripts will be installed")
|
"Subdirectory of INSTALL_DIR where test scripts will be installed")
|
||||||
set (INSTALL_DIR_SCRIPT_DESCR
|
set (INSTALL_DIR_SCRIPT_DESCR
|
||||||
@@ -91,7 +89,6 @@ set (${INSTALL_TARGET_VARIABLE}_DESCR
|
|||||||
project) into the installation directory (INSTALL_DIR variable)")
|
project) into the installation directory (INSTALL_DIR variable)")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
INSTALL_MESSAGE (INSTALL_SAMPLES "OCCT samples")
|
|
||||||
INSTALL_MESSAGE (INSTALL_TEST_CASES "non-regression OCCT test scripts")
|
INSTALL_MESSAGE (INSTALL_TEST_CASES "non-regression OCCT test scripts")
|
||||||
INSTALL_MESSAGE (INSTALL_DOC_Overview "OCCT overview documentation (HTML format)")
|
INSTALL_MESSAGE (INSTALL_DOC_Overview "OCCT overview documentation (HTML format)")
|
||||||
INSTALL_MESSAGE (INSTALL_FFMPEG "FFmpeg binaries")
|
INSTALL_MESSAGE (INSTALL_FFMPEG "FFmpeg binaries")
|
||||||
@@ -130,19 +127,6 @@ want to build some particular libraries (toolkits) only, then you may uncheck
|
|||||||
all modules in the corresponding BUILD_MODUE_* options and provide the list of
|
all modules in the corresponding BUILD_MODUE_* options and provide the list of
|
||||||
necessary libraries here. Of course, all dependencies will be resolved automatically")
|
necessary libraries here. Of course, all dependencies will be resolved automatically")
|
||||||
|
|
||||||
set (BUILD_SAMPLES_MFC_DESCR
|
|
||||||
"Indicates whether OCCT MFC samples should be built together with OCCT.
|
|
||||||
These samples show some possibilities of using OCCT and they can be executed
|
|
||||||
with script samples.bat from the installation directory (INSTALL_DIR)")
|
|
||||||
|
|
||||||
set (BUILD_SAMPLES_QT_DESCR
|
|
||||||
"Indicates whether OCCT Qt samples should be built together with OCCT.
|
|
||||||
These samples show some possibilities of using OCCT and they can be executed
|
|
||||||
with script samples.bat from the installation directory (INSTALL_DIR)")
|
|
||||||
|
|
||||||
set (BUILD_MODULE_UwpSample_DESCR
|
|
||||||
"Indicates whether OCCT UWP sample should be built together with OCCT.")
|
|
||||||
|
|
||||||
set (BUILD_DOC_Overview_DESCR
|
set (BUILD_DOC_Overview_DESCR
|
||||||
"Indicates whether OCCT overview documentation project (Markdown format) should be
|
"Indicates whether OCCT overview documentation project (Markdown format) should be
|
||||||
created together with OCCT. It is not built together with OCCT. Checking this options
|
created together with OCCT. It is not built together with OCCT. Checking this options
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
|||||||
CSF_OCCTResourcePath=@OCCT_ROOT_DIR@/resources
|
CSF_OCCTResourcePath=@OCCT_ROOT_DIR@/resources
|
||||||
DRAWHOME=@OCCT_ROOT_DIR@/resources/DrawResources
|
DRAWHOME=@OCCT_ROOT_DIR@/resources/DrawResources
|
||||||
CSF_OCCTDataPath=@OCCT_ROOT_DIR@/data
|
CSF_OCCTDataPath=@OCCT_ROOT_DIR@/data
|
||||||
CSF_OCCTSamplesPath=@OCCT_ROOT_DIR@/samples
|
|
||||||
CSF_OCCTTestsPath=@OCCT_ROOT_DIR@/tests
|
CSF_OCCTTestsPath=@OCCT_ROOT_DIR@/tests
|
||||||
CSF_OCCTDocPath=@OCCT_ROOT_DIR@/doc
|
CSF_OCCTDocPath=@OCCT_ROOT_DIR@/doc
|
||||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||||
@@ -19,7 +18,6 @@ PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
|||||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||||
CSF_OCCTResourcePath=@OCCT_ROOT_DIR@/resources
|
CSF_OCCTResourcePath=@OCCT_ROOT_DIR@/resources
|
||||||
CSF_OCCTDataPath=@OCCT_ROOT_DIR@/data
|
CSF_OCCTDataPath=@OCCT_ROOT_DIR@/data
|
||||||
CSF_OCCTSamplesPath=@OCCT_ROOT_DIR@/samples
|
|
||||||
CSF_OCCTTestsPath=@OCCT_ROOT_DIR@/tests
|
CSF_OCCTTestsPath=@OCCT_ROOT_DIR@/tests
|
||||||
CSF_OCCTDocPath=@OCCT_ROOT_DIR@/doc
|
CSF_OCCTDocPath=@OCCT_ROOT_DIR@/doc
|
||||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||||
@@ -33,7 +31,6 @@ CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
|||||||
DRAWHOME=@OCCT_ROOT_DIR@/resources/DrawResources
|
DRAWHOME=@OCCT_ROOT_DIR@/resources/DrawResources
|
||||||
CSF_OCCTResourcePath=@OCCT_ROOT_DIR@/resources
|
CSF_OCCTResourcePath=@OCCT_ROOT_DIR@/resources
|
||||||
CSF_OCCTDataPath=@OCCT_ROOT_DIR@/data
|
CSF_OCCTDataPath=@OCCT_ROOT_DIR@/data
|
||||||
CSF_OCCTSamplesPath=@OCCT_ROOT_DIR@/samples
|
|
||||||
CSF_OCCTTestsPath=@OCCT_ROOT_DIR@/tests
|
CSF_OCCTTestsPath=@OCCT_ROOT_DIR@/tests
|
||||||
CSF_OCCTDocPath=@OCCT_ROOT_DIR@/doc
|
CSF_OCCTDocPath=@OCCT_ROOT_DIR@/doc
|
||||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ if /I "%VCVER%" == "@COMPILER@" (
|
|||||||
set "CSF_OCCTIncludePath=@CMAKE_BINARY_DIR@/@INSTALL_DIR_INCLUDE@"
|
set "CSF_OCCTIncludePath=@CMAKE_BINARY_DIR@/@INSTALL_DIR_INCLUDE@"
|
||||||
set "CSF_OCCTResourcePath=@OCCT_ROOT_DIR@/resources"
|
set "CSF_OCCTResourcePath=@OCCT_ROOT_DIR@/resources"
|
||||||
set "CSF_OCCTDataPath=@OCCT_ROOT_DIR@/data"
|
set "CSF_OCCTDataPath=@OCCT_ROOT_DIR@/data"
|
||||||
set "CSF_OCCTSamplesPath=@OCCT_ROOT_DIR@/samples"
|
|
||||||
set "CSF_OCCTTestsPath=@OCCT_ROOT_DIR@/tests"
|
set "CSF_OCCTTestsPath=@OCCT_ROOT_DIR@/tests"
|
||||||
set "CSF_OCCTDocPath=@OCCT_ROOT_DIR@/doc"
|
set "CSF_OCCTDocPath=@OCCT_ROOT_DIR@/doc"
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ if [ "$1" == "@BIN_LETTER@" ]; then
|
|||||||
export CSF_OCCTIncludePath="@CMAKE_BINARY_DIR@/@INSTALL_DIR_INCLUDE@"
|
export CSF_OCCTIncludePath="@CMAKE_BINARY_DIR@/@INSTALL_DIR_INCLUDE@"
|
||||||
export CSF_OCCTResourcePath="@OCCT_ROOT_DIR@/resources"
|
export CSF_OCCTResourcePath="@OCCT_ROOT_DIR@/resources"
|
||||||
export CSF_OCCTDataPath="@OCCT_ROOT_DIR@/data"
|
export CSF_OCCTDataPath="@OCCT_ROOT_DIR@/data"
|
||||||
export CSF_OCCTSamplesPath="@OCCT_ROOT_DIR@/samples"
|
|
||||||
export CSF_OCCTTestsPath="@OCCT_ROOT_DIR@/tests"
|
export CSF_OCCTTestsPath="@OCCT_ROOT_DIR@/tests"
|
||||||
export CSF_OCCTDocPath="@OCCT_ROOT_DIR@/doc"
|
export CSF_OCCTDocPath="@OCCT_ROOT_DIR@/doc"
|
||||||
|
|
||||||
|
|||||||
@@ -257,7 +257,6 @@ set "CSF_OPT_LNK64I=%CSF_OPT_LNK64I% %OPT_LIB64%"
|
|||||||
rem ----- Default paths to sub-folders (can be different in install env) -----
|
rem ----- Default paths to sub-folders (can be different in install env) -----
|
||||||
if "%CSF_OCCTIncludePath%" == "" set "CSF_OCCTIncludePath=%CASROOT%\inc"
|
if "%CSF_OCCTIncludePath%" == "" set "CSF_OCCTIncludePath=%CASROOT%\inc"
|
||||||
if "%CSF_OCCTResourcePath%" == "" set "CSF_OCCTResourcePath=%CASROOT%\src"
|
if "%CSF_OCCTResourcePath%" == "" set "CSF_OCCTResourcePath=%CASROOT%\src"
|
||||||
if "%CSF_OCCTSamplesPath%" == "" set "CSF_OCCTSamplesPath=%CASROOT%\samples"
|
|
||||||
if "%CSF_OCCTDataPath%" == "" set "CSF_OCCTDataPath=%CASROOT%\data"
|
if "%CSF_OCCTDataPath%" == "" set "CSF_OCCTDataPath=%CASROOT%\data"
|
||||||
if "%CSF_OCCTTestsPath%" == "" set "CSF_OCCTTestsPath=%CASROOT%\tests"
|
if "%CSF_OCCTTestsPath%" == "" set "CSF_OCCTTestsPath=%CASROOT%\tests"
|
||||||
if "%CSF_OCCTBinPath%" == "" set "CSF_OCCTBinPath=%CASROOT%\win%ARCH%\%VCLIB%\bin%CASDEB%"
|
if "%CSF_OCCTBinPath%" == "" set "CSF_OCCTBinPath=%CASROOT%\win%ARCH%\%VCLIB%\bin%CASDEB%"
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
@echo off
|
|
||||||
|
|
||||||
if exist "%~dp0custom.bat" (
|
|
||||||
call "%~dp0custom.bat" %1 %2 %3
|
|
||||||
)
|
|
||||||
|
|
||||||
call "@INSTALL_DIR_ABSOLUTE@\@INSTALL_DIR_SCRIPT@\env.bat" %1 %2 %3
|
|
||||||
if /I ["%1"] == ["vc141"] set "VCVER=vc141"
|
|
||||||
if /I ["%1"] == ["vc142"] set "VCVER=vc142"
|
|
||||||
if /I ["%1"] == ["vc143"] set "VCVER=vc143"
|
|
||||||
set "BIN_DIR=win%ARCH%\%VCVER%\bind"
|
|
||||||
set "LIB_DIR=win%ARCH%\%VCVER%\libd"
|
|
||||||
|
|
||||||
if ["%CASDEB%"] == [""] (
|
|
||||||
set "BIN_DIR=win%ARCH%\%VCVER%\bin"
|
|
||||||
set "LIB_DIR=win%ARCH%\%VCVER%\lib"
|
|
||||||
)
|
|
||||||
|
|
||||||
set "PATH=%~dp0%BIN_DIR%;%PATH%"
|
|
||||||
|
|
||||||
if not "%QTDIR%" == "" (
|
|
||||||
set "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
|
|
||||||
|
|
||||||
set "CSF_ResourcesDefaults=!RES_DIR!"
|
|
||||||
set "CSF_TutorialResourcesDefaults=!RES_DIR!"
|
|
||||||
set "CSF_IEResourcesDefaults=!RES_DIR!"
|
|
||||||
|
|
||||||
set "PATH=%QTDIR%/bin;%PATH%"
|
|
||||||
set "QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%\plugins\platforms"
|
|
||||||
)
|
|
||||||
|
|
||||||
set "CSF_OCCTOverviewSampleCodePath=%~dp0..\..\OCCTOverview\code"
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
if [ -e "custom.sh" ]; then
|
|
||||||
source "custom.sh";
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -e "@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SCRIPT@/env.sh" ]; then
|
|
||||||
source "@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SCRIPT@/env.sh";
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${QTDIR}" == ""; then
|
|
||||||
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
host=`uname -s`
|
|
||||||
export STATION=$host
|
|
||||||
export RES_DIR=${aSamplePath}/${STATION}/res
|
|
||||||
|
|
||||||
export PATH=${QTDIR}/bin:${PATH}
|
|
||||||
|
|
||||||
export "CSF_OCCTOverviewSampleCodePath=${aSamplePath}/../../qt/OCCTOverview/code"
|
|
||||||
@@ -188,7 +188,6 @@ fi
|
|||||||
# ----- Default paths to sub-folders (can be different in install env) -----
|
# ----- Default paths to sub-folders (can be different in install env) -----
|
||||||
export CSF_OCCTIncludePath="${CSF_OCCTIncludePath:-$CASROOT/inc}"
|
export CSF_OCCTIncludePath="${CSF_OCCTIncludePath:-$CASROOT/inc}"
|
||||||
export CSF_OCCTResourcePath="${CSF_OCCTResourcePath:-$CASROOT/src}"
|
export CSF_OCCTResourcePath="${CSF_OCCTResourcePath:-$CASROOT/src}"
|
||||||
export CSF_OCCTSamplesPath="${CSF_OCCTSamplesPath:-$CASROOT/samples}"
|
|
||||||
export CSF_OCCTDataPath="${CSF_OCCTDataPath:-$CASROOT/data}"
|
export CSF_OCCTDataPath="${CSF_OCCTDataPath:-$CASROOT/data}"
|
||||||
export CSF_OCCTTestsPath="${CSF_OCCTTestsPath:-$CASROOT/tests}"
|
export CSF_OCCTTestsPath="${CSF_OCCTTestsPath:-$CASROOT/tests}"
|
||||||
|
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
@echo off
|
|
||||||
|
|
||||||
if ["%1"] == [""] (
|
|
||||||
echo Launch selected sample as follows:
|
|
||||||
echo sample.bat SampleName vc10 win32 d
|
|
||||||
echo or to use last sample build configuration:
|
|
||||||
echo sample.bat SampleName
|
|
||||||
echo available samples:
|
|
||||||
echo Geometry
|
|
||||||
echo Modeling
|
|
||||||
echo Viewer2d
|
|
||||||
echo Viewer3d
|
|
||||||
echo ImportExport
|
|
||||||
echo Ocaf
|
|
||||||
echo Triangulation
|
|
||||||
echo HLR
|
|
||||||
echo Animation
|
|
||||||
echo Convert
|
|
||||||
echo AndroidQt
|
|
||||||
echo FuncDemo
|
|
||||||
echo IESample
|
|
||||||
echo OCCTOverview
|
|
||||||
echo Tutorial
|
|
||||||
PAUSE
|
|
||||||
exit /B
|
|
||||||
)
|
|
||||||
|
|
||||||
call "%~dp0env.bat" %2 %3 %4
|
|
||||||
if not ["%QTDIR%"] == [""] if exist "%QTDIR%\qml" if ["%QML2_IMPORT_PATH%"] == [""] set "QML2_IMPORT_PATH=%QTDIR%/qml"
|
|
||||||
set "EXE_PATH=%CSF_OCCTBinPath%/%1.exe"
|
|
||||||
|
|
||||||
if not exist "%EXE_PATH%" (
|
|
||||||
echo Executable %EXE_PATH% not found.
|
|
||||||
echo Probably you didn't compile the application.
|
|
||||||
PAUSE
|
|
||||||
exit /B
|
|
||||||
)
|
|
||||||
|
|
||||||
rem Set path to location where sample code is installed
|
|
||||||
set "CSF_OCCTOverviewSampleCodePath=%CSF_OCCTSamplesPath%\OCCTOverview\code"
|
|
||||||
|
|
||||||
"%EXE_PATH%"
|
|
||||||
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ "$1" == "" ]; then
|
|
||||||
echo Launch selected sample as follows:
|
|
||||||
echo sample.sh SampleName d
|
|
||||||
echo or to use last sample build configuration:
|
|
||||||
echo sample.sh SampleName
|
|
||||||
echo available samples:
|
|
||||||
echo FuncDemo
|
|
||||||
echo IESample
|
|
||||||
echo OCCTOverview
|
|
||||||
echo Tutorial
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
aCurrentPath="$PWD"
|
|
||||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
|
||||||
|
|
||||||
source "${aScriptPath}/env.sh" "$2"
|
|
||||||
|
|
||||||
if test "${QTDIR}" == ""; then
|
|
||||||
if [ -d "$QTDIR%\qml" ];
|
|
||||||
then export QML2_IMPORT_PATH="$QTDIR\qml";
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
export "EXE_PATH=$CSF_OCCTBinPath/$1"
|
|
||||||
|
|
||||||
if [ ! -f "$EXE_PATH" ]; then
|
|
||||||
echo "Executable \"$EXE_PATH\" not found."
|
|
||||||
echo "Probably you didn't compile the application."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
export CSF_OCCTOverviewSampleCodePath="${CSF_OCCTSamplesPath}/qt/OCCTOverview/code"
|
|
||||||
|
|
||||||
cd ${aCurrentPath}
|
|
||||||
"$EXE_PATH"
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# A toolchain file to configure a Visual Studio generator for a Windows 10 Universal Application (UWP)
|
|
||||||
# Specify the CMAKE_SYSTEM_VERSION variable to be 10.0 to build with the latest available Windows 10 SDK.
|
|
||||||
|
|
||||||
set (CMAKE_SYSTEM_NAME WindowsStore)
|
|
||||||
set (CMAKE_SYSTEM_VERSION 10.0)
|
|
||||||
@@ -143,7 +143,6 @@ The following table gives the full list of environment variables used at the con
|
|||||||
| INSTALL_DIR_RESOURCE | Path | Relative path to the resources installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}) |
|
| INSTALL_DIR_RESOURCE | Path | Relative path to the resources installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}) |
|
||||||
| INSTALL_DIR_LAYOUT | String | Defines the structure of OCCT files (binaries, resources, headers, etc.) for the install directory. Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout). If needed, the layout can be customized with INSTALL_DIR_* variables |
|
| INSTALL_DIR_LAYOUT | String | Defines the structure of OCCT files (binaries, resources, headers, etc.) for the install directory. Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout). If needed, the layout can be customized with INSTALL_DIR_* variables |
|
||||||
| INSTALL_DIR_DATA | Path | Relative path to the data files installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DATA}) |
|
| INSTALL_DIR_DATA | Path | Relative path to the data files installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DATA}) |
|
||||||
| INSTALL_DIR_SAMPLES | Path | Relative path to the samples installation directory. Note that only "samples/tcl" folder will be installed. (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}) |
|
|
||||||
| INSTALL_DIR_TESTS | Path | Relative path to the tests installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_TESTS}) |
|
| INSTALL_DIR_TESTS | Path | Relative path to the tests installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_TESTS}) |
|
||||||
| INSTALL_DIR_DOC | Path | Relative path to the documentation installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DOC}) |
|
| INSTALL_DIR_DOC | Path | Relative path to the documentation installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DOC}) |
|
||||||
| INSTALL_FREETYPE | Boolean | Indicates whether FreeType binaries should be installed into the installation directory |
|
| INSTALL_FREETYPE | Boolean | Indicates whether FreeType binaries should be installed into the installation directory |
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
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
|
All demo scripts are provided with OCCT sources and locate in <i>CASROOT/resources/samples/tcl</i>. To play around them please
|
||||||
follow the steps below:
|
follow the steps below:
|
||||||
|
|
||||||
1. Start DRAWEXE
|
1. Start DRAWEXE
|
||||||
2. Type *cd ../..* to return to the root directory
|
2. Type *cd ../..* to return to the root directory
|
||||||
3. Type *cd samples/tcl* to reach the *DrawResources* directory
|
3. Type *cd resources/samples/tcl* to reach the demo scripts directory
|
||||||
4. Type *source \<demo_file\>* to run the demonstration file provided with Open CASCADE. The following demonstration
|
4. Type *source \<demo_file\>* to run the demonstration file provided with Open CASCADE. The following demonstration
|
||||||
files are available:
|
files are available:
|
||||||
* <b>DataExchangeDemo.tcl</b>: demonstrates sample sequence of operations with writing and reading IGES file
|
* <b>DataExchangeDemo.tcl</b>: demonstrates sample sequence of operations with writing and reading IGES file
|
||||||
@@ -105,7 +105,7 @@ Type pload ALL
|
|||||||
**Running demonstration files**
|
**Running demonstration files**
|
||||||
|
|
||||||
1. Type *cd ../..* to return to the root directory
|
1. Type *cd ../..* to return to the root directory
|
||||||
2. Type *cd samples/tcl* to reach the *DrawResources* directory
|
2. Type *cd resources/samples/tcl* to reach the demo scripts directory
|
||||||
3. Type *source \<demo_file\>* to run the demonstration file provided with Open CASCADE. The following demonstration files are available:
|
3. Type *source \<demo_file\>* to run the demonstration file provided with Open CASCADE. The following demonstration files are available:
|
||||||
* DataExchangeDemo.tcl: demonstrates sample sequence of operations with writing and reading IGES file
|
* DataExchangeDemo.tcl: demonstrates sample sequence of operations with writing and reading IGES file
|
||||||
* ModelingDemo.tcl: demonstrates creation of simple shape and displaying it in HLR mode
|
* ModelingDemo.tcl: demonstrates creation of simple shape and displaying it in HLR mode
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
This directory provides a set of demo scripts for using OCCT functionality from
|
This directory provides a set of demo scripts for using OCCT functionality from
|
||||||
within DRAW Test Harness. Call the scripts from DRAW prompt, e.g.:
|
within DRAW Test Harness. Call the scripts from DRAW prompt, e.g.:
|
||||||
|
|
||||||
Draw[]> source samples/tcl/VisualizationDemo.tcl
|
Draw[]> source resources/samples/tcl/VisualizationDemo.tcl
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
|
||||||
# Visual Studio 2010
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IE_WPF_WinForms", "WPF_WinForms\IE_WPF_WinForms.csproj", "{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IE_WinForms", "WinForms\IE_WinForms.csproj", "{B9914BB3-B886-4B41-B48D-350EBEBEFD1F}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OCCTProxy", "OCCTProxy\OCCTProxy.vcxproj", "{969912D9-78E7-4AB8-B4FF-6B52B4F03991}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Win32 = Debug|Win32
|
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Release|Win32 = Release|Win32
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Debug|Win32.ActiveCfg = Debug|x86
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Debug|Win32.Build.0 = Debug|x86
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Release|Win32.ActiveCfg = Release|x86
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Release|Win32.Build.0 = Release|x86
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Release|x64.Build.0 = Release|x64
|
|
||||||
{B9914BB3-B886-4B41-B48D-350EBEBEFD1F}.Debug|Win32.ActiveCfg = Debug|x86
|
|
||||||
{B9914BB3-B886-4B41-B48D-350EBEBEFD1F}.Debug|Win32.Build.0 = Debug|x86
|
|
||||||
{B9914BB3-B886-4B41-B48D-350EBEBEFD1F}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{B9914BB3-B886-4B41-B48D-350EBEBEFD1F}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{B9914BB3-B886-4B41-B48D-350EBEBEFD1F}.Release|Win32.ActiveCfg = Release|x86
|
|
||||||
{B9914BB3-B886-4B41-B48D-350EBEBEFD1F}.Release|Win32.Build.0 = Release|x86
|
|
||||||
{B9914BB3-B886-4B41-B48D-350EBEBEFD1F}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{B9914BB3-B886-4B41-B48D-350EBEBEFD1F}.Release|x64.Build.0 = Release|x64
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Debug|Win32.Build.0 = Debug|Win32
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Release|Win32.ActiveCfg = Release|Win32
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Release|Win32.Build.0 = Release|Win32
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Release|x64.Build.0 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
|
||||||
# Visual Studio 2010
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IE_WPF_D3D", "WPF_D3D\IE_WPF_D3D.csproj", "{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OCCTProxy_D3D", "OCCTProxy_D3D\OCCTProxy_D3D.vcxproj", "{969912D9-78E7-4AB8-B4FF-6B52B4F03991}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Win32 = Debug|Win32
|
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Release|Win32 = Release|Win32
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Debug|Win32.ActiveCfg = Debug|x86
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Debug|Win32.Build.0 = Debug|x86
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Release|Win32.ActiveCfg = Release|x86
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Release|Win32.Build.0 = Release|x86
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}.Release|x64.Build.0 = Release|x64
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Debug|Win32.Build.0 = Debug|Win32
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Release|Win32.ActiveCfg = Release|Win32
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Release|Win32.Build.0 = Release|Win32
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{969912D9-78E7-4AB8-B4FF-6B52B4F03991}.Release|x64.Build.0 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -1,367 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="windows-1251"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="9,00"
|
|
||||||
Name="OCCTProxy"
|
|
||||||
ProjectGUID="{969912D9-78E7-4AB8-B4FF-6B52B4F03991}"
|
|
||||||
RootNamespace="OCCTProxy"
|
|
||||||
Keyword="Win32Proj"
|
|
||||||
TargetFrameworkVersion="131072"
|
|
||||||
>
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"
|
|
||||||
/>
|
|
||||||
<Platform
|
|
||||||
Name="x64"
|
|
||||||
/>
|
|
||||||
</Platforms>
|
|
||||||
<ToolFiles>
|
|
||||||
</ToolFiles>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory="..\win32\$(VCVER)\bind"
|
|
||||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
ManagedExtensions="1"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="..\OCC\;$(CSF_OCCTIncludePath)"
|
|
||||||
MinimalRebuild="false"
|
|
||||||
BasicRuntimeChecks="0"
|
|
||||||
RuntimeLibrary="3"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="$(OutDir)/OCCTProxy.dll"
|
|
||||||
LinkIncremental="2"
|
|
||||||
AdditionalLibraryDirectories="$(CSF_OCCTLibPath)"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
AssemblyDebug="1"
|
|
||||||
ProgramDatabaseFile="$(OutDir)/OCCTProxy.pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
RandomizedBaseAddress="1"
|
|
||||||
DataExecutionPrevention="0"
|
|
||||||
ImportLibrary="$(OutDir)/OCCTProxy.lib"
|
|
||||||
TargetMachine="1"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|x64"
|
|
||||||
OutputDirectory="..\win64\$(VCVER)\bind"
|
|
||||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
ManagedExtensions="1"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
TargetEnvironment="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="..\OCC\;$(CSF_OCCTIncludePath)"
|
|
||||||
MinimalRebuild="false"
|
|
||||||
BasicRuntimeChecks="0"
|
|
||||||
RuntimeLibrary="3"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="$(OutDir)/OCCTProxy.dll"
|
|
||||||
LinkIncremental="2"
|
|
||||||
AdditionalLibraryDirectories="$(CSF_OCCTLibPath)"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
AssemblyDebug="1"
|
|
||||||
ProgramDatabaseFile="$(OutDir)/OCCTProxy.pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
RandomizedBaseAddress="1"
|
|
||||||
DataExecutionPrevention="0"
|
|
||||||
ImportLibrary="$(OutDir)/OCCTProxy.lib"
|
|
||||||
TargetMachine="17"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory="..\win32\$(VCVER)\bin"
|
|
||||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
ManagedExtensions="1"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories="..\OCC\;$(CSF_OCCTIncludePath)"
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="$(OutDir)/OCCTProxy.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
AdditionalLibraryDirectories="$(CSF_OCCTLibPath)"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
RandomizedBaseAddress="1"
|
|
||||||
DataExecutionPrevention="0"
|
|
||||||
ImportLibrary="$(OutDir)/OCCTProxy.lib"
|
|
||||||
TargetMachine="1"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|x64"
|
|
||||||
OutputDirectory="..\win64\$(VCVER)\bin"
|
|
||||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
ManagedExtensions="1"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
TargetEnvironment="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories="..\OCC\;$(CSF_OCCTIncludePath)"
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="$(OutDir)/OCCTProxy.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
AdditionalLibraryDirectories="$(CSF_OCCTLibPath)"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
RandomizedBaseAddress="1"
|
|
||||||
DataExecutionPrevention="0"
|
|
||||||
ImportLibrary="$(OutDir)/OCCTProxy.lib"
|
|
||||||
TargetMachine="17"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath=".\OCCTProxy.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
|
||||||
>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Resource Files"
|
|
||||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
|
||||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
|
||||||
>
|
|
||||||
</Filter>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
||||||
@@ -1,199 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>{969912D9-78E7-4AB8-B4FF-6B52B4F03991}</ProjectGuid>
|
|
||||||
<RootNamespace>OCCTProxy</RootNamespace>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<CLRSupport>true</CLRSupport>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<CLRSupport>true</CLRSupport>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<CLRSupport>true</CLRSupport>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<CLRSupport>true</CLRSupport>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\win32\$(VCVER)\bind\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\win64\$(VCVER)\bind\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\win32\$(VCVER)\bin\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\win64\$(VCVER)\bin\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>..\OCC\;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
|
||||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<OutputFile>$(OutDir)OCCTProxy.dll</OutputFile>
|
|
||||||
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AssemblyDebug>true</AssemblyDebug>
|
|
||||||
<ProgramDatabaseFile>$(OutDir)OCCTProxy.pdb</ProgramDatabaseFile>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<ImportLibrary>$(OutDir)OCCTProxy.lib</ImportLibrary>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Midl>
|
|
||||||
<TargetEnvironment>X64</TargetEnvironment>
|
|
||||||
</Midl>
|
|
||||||
<ClCompile>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>..\OCC\;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
|
||||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<OutputFile>$(OutDir)OCCTProxy.dll</OutputFile>
|
|
||||||
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AssemblyDebug>true</AssemblyDebug>
|
|
||||||
<ProgramDatabaseFile>$(OutDir)OCCTProxy.pdb</ProgramDatabaseFile>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<ImportLibrary>$(OutDir)OCCTProxy.lib</ImportLibrary>
|
|
||||||
<TargetMachine>MachineX64</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<AdditionalIncludeDirectories>..\OCC\;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<OutputFile>$(OutDir)OCCTProxy.dll</OutputFile>
|
|
||||||
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<ImportLibrary>$(OutDir)OCCTProxy.lib</ImportLibrary>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Midl>
|
|
||||||
<TargetEnvironment>X64</TargetEnvironment>
|
|
||||||
</Midl>
|
|
||||||
<ClCompile>
|
|
||||||
<AdditionalIncludeDirectories>..\OCC\;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<OutputFile>$(OutDir)OCCTProxy.dll</OutputFile>
|
|
||||||
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<ImportLibrary>$(OutDir)OCCTProxy.lib</ImportLibrary>
|
|
||||||
<TargetMachine>MachineX64</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="OCCTProxy.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,989 +0,0 @@
|
|||||||
// Prevent Windows from defining min/max macros
|
|
||||||
#ifndef NOMINMAX
|
|
||||||
#define NOMINMAX
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <d3d9.h>
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
// include required OCCT headers
|
|
||||||
#include <Standard_Version.hxx>
|
|
||||||
#include <Message_ProgressIndicator.hxx>
|
|
||||||
#include <Message_ProgressScope.hxx>
|
|
||||||
//for OCC graphic
|
|
||||||
#include <WNT_Window.hxx>
|
|
||||||
#include <WNT_WClass.hxx>
|
|
||||||
#include <Graphic3d_CView.hxx>
|
|
||||||
#include <Graphic3d_Camera.hxx>
|
|
||||||
#include <Graphic3d_TextureParams.hxx>
|
|
||||||
#include <D3DHost_GraphicDriver.hxx>
|
|
||||||
#include <D3DHost_View.hxx>
|
|
||||||
//for object display
|
|
||||||
#include <V3d_Viewer.hxx>
|
|
||||||
#include <V3d_View.hxx>
|
|
||||||
#include <AIS_InteractiveContext.hxx>
|
|
||||||
#include <AIS_Shape.hxx>
|
|
||||||
//topology
|
|
||||||
#include <TopoDS_Shape.hxx>
|
|
||||||
#include <TopoDS_Compound.hxx>
|
|
||||||
//brep tools
|
|
||||||
#include <BRep_Builder.hxx>
|
|
||||||
#include <BRepTools.hxx>
|
|
||||||
// iges I/E
|
|
||||||
#include <IGESControl_Reader.hxx>
|
|
||||||
#include <IGESControl_Controller.hxx>
|
|
||||||
#include <IGESControl_Writer.hxx>
|
|
||||||
#include <IFSelect_ReturnStatus.hxx>
|
|
||||||
#include <Interface_Static.hxx>
|
|
||||||
//step I/E
|
|
||||||
#include <STEPControl_Reader.hxx>
|
|
||||||
#include <STEPControl_Writer.hxx>
|
|
||||||
//for stl export
|
|
||||||
#include <StlAPI_Writer.hxx>
|
|
||||||
//for vrml export
|
|
||||||
#include <VrmlAPI_Writer.hxx>
|
|
||||||
//wrapper of pure C++ classes to ref classes
|
|
||||||
#include <NCollection_Haft.h>
|
|
||||||
|
|
||||||
#include <vcclr.h>
|
|
||||||
|
|
||||||
// list of required OCCT libraries
|
|
||||||
#pragma comment(lib, "TKernel.lib")
|
|
||||||
#pragma comment(lib, "TKMath.lib")
|
|
||||||
#pragma comment(lib, "TKBRep.lib")
|
|
||||||
#pragma comment(lib, "TKXSBase.lib")
|
|
||||||
#pragma comment(lib, "TKService.lib")
|
|
||||||
#pragma comment(lib, "TKV3d.lib")
|
|
||||||
#pragma comment(lib, "TKOpenGl.lib")
|
|
||||||
#pragma comment(lib, "TKD3dHost.lib")
|
|
||||||
#pragma comment(lib, "TKDEIGES.lib")
|
|
||||||
#pragma comment(lib, "TKDESTEP.lib")
|
|
||||||
#pragma comment(lib, "TKDESTL.lib")
|
|
||||||
#pragma comment(lib, "TKDEVRML.lib")
|
|
||||||
#pragma comment(lib, "TKLCAF.lib")
|
|
||||||
|
|
||||||
#pragma comment(lib, "D3D9.lib")
|
|
||||||
|
|
||||||
//! Auxiliary tool for converting C# string into UTF-8 string.
|
|
||||||
static TCollection_AsciiString toAsciiString (String^ theString)
|
|
||||||
{
|
|
||||||
if (theString == nullptr)
|
|
||||||
{
|
|
||||||
return TCollection_AsciiString();
|
|
||||||
}
|
|
||||||
|
|
||||||
pin_ptr<const wchar_t> aPinChars = PtrToStringChars (theString);
|
|
||||||
const wchar_t* aWCharPtr = aPinChars;
|
|
||||||
if (aWCharPtr == NULL
|
|
||||||
|| *aWCharPtr == L'\0')
|
|
||||||
{
|
|
||||||
return TCollection_AsciiString();
|
|
||||||
}
|
|
||||||
return TCollection_AsciiString (aWCharPtr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Proxy class encapsulating calls to OCCT C++ classes within
|
|
||||||
/// C++/CLI class visible from .Net (CSharp)
|
|
||||||
/// </summary>
|
|
||||||
public ref class OCCTProxyD3D
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
OCCTProxyD3D() {}
|
|
||||||
|
|
||||||
// ============================================
|
|
||||||
// Viewer functionality
|
|
||||||
// ============================================
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Initialize a viewer
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theWnd">System.IntPtr that contains the window handle (HWND) of the control</param>
|
|
||||||
bool InitViewer()
|
|
||||||
{
|
|
||||||
myGraphicDriver() = new D3DHost_GraphicDriver();
|
|
||||||
myGraphicDriver()->ChangeOptions().buffersNoSwap = true;
|
|
||||||
//myGraphicDriver()->ChangeOptions().contextDebug = true;
|
|
||||||
|
|
||||||
myViewer() = new V3d_Viewer (myGraphicDriver());
|
|
||||||
myViewer()->SetDefaultLights();
|
|
||||||
myViewer()->SetLightOn();
|
|
||||||
myView() = myViewer()->CreateView();
|
|
||||||
|
|
||||||
static Handle(WNT_WClass) aWClass = new WNT_WClass ("OCC_Viewer", NULL, CS_OWNDC);
|
|
||||||
Handle(WNT_Window) aWNTWindow = new WNT_Window ("OCC_Viewer", aWClass, WS_POPUP, 64, 64, 64, 64);
|
|
||||||
aWNTWindow->SetVirtual (Standard_True);
|
|
||||||
myView()->SetWindow(aWNTWindow);
|
|
||||||
myAISContext() = new AIS_InteractiveContext (myViewer());
|
|
||||||
myAISContext()->UpdateCurrentViewer();
|
|
||||||
myView()->MustBeResized();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Resizes custom FBO for Direct3D output. </summary>
|
|
||||||
System::IntPtr ResizeBridgeFBO (int theWinSizeX,
|
|
||||||
int theWinSizeY)
|
|
||||||
{
|
|
||||||
Handle(WNT_Window) aWNTWindow = Handle(WNT_Window)::DownCast (myView()->Window());
|
|
||||||
aWNTWindow->SetPos (0, 0, theWinSizeX, theWinSizeY);
|
|
||||||
myView()->MustBeResized();
|
|
||||||
myView()->Invalidate();
|
|
||||||
return System::IntPtr(Handle(D3DHost_View)::DownCast (myView()->View())->D3dColorSurface());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Make dump of current view to file
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theFileName">Name of dump file</param>
|
|
||||||
bool Dump (const TCollection_AsciiString& theFileName)
|
|
||||||
{
|
|
||||||
if (myView().IsNull())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
myView()->Redraw();
|
|
||||||
return myView()->Dump (theFileName.ToCString()) != Standard_False;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Redraw view
|
|
||||||
/// </summary>
|
|
||||||
void RedrawView()
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->Redraw();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Update view
|
|
||||||
/// </summary>
|
|
||||||
void UpdateView(void)
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->MustBeResized();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Set computed mode in false
|
|
||||||
/// </summary>
|
|
||||||
void SetDegenerateModeOn()
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->SetComputedMode (Standard_False);
|
|
||||||
myView()->Redraw();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Set computed mode in true
|
|
||||||
/// </summary>
|
|
||||||
void SetDegenerateModeOff()
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->SetComputedMode (Standard_True);
|
|
||||||
myView()->Redraw();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Fit all
|
|
||||||
/// </summary>
|
|
||||||
void WindowFitAll (int theXmin, int theYmin,
|
|
||||||
int theXmax, int theYmax)
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->WindowFitAll (theXmin, theYmin, theXmax, theYmax);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Current place of window
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theZoomFactor">Current zoom</param>
|
|
||||||
void Place (int theX, int theY, float theZoomFactor)
|
|
||||||
{
|
|
||||||
Standard_Real aZoomFactor = theZoomFactor;
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->Place (theX, theY, aZoomFactor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Set Zoom
|
|
||||||
/// </summary>
|
|
||||||
void Zoom (int theX1, int theY1, int theX2, int theY2)
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->Zoom (theX1, theY1, theX2, theY2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Set Pan
|
|
||||||
/// </summary>
|
|
||||||
void Pan (int theX, int theY)
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->Pan (theX, theY);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Rotation
|
|
||||||
/// </summary>
|
|
||||||
void Rotation (int theX, int theY)
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->Rotation (theX, theY);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Start rotation
|
|
||||||
/// </summary>
|
|
||||||
void StartRotation (int theX, int theY)
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->StartRotation (theX, theY);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Select by rectangle
|
|
||||||
/// </summary>
|
|
||||||
void Select (int theX1, int theY1, int theX2, int theY2)
|
|
||||||
{
|
|
||||||
if (!myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
myAISContext()->SelectRectangle (Graphic3d_Vec2i (theX1, theY1),
|
|
||||||
Graphic3d_Vec2i (theX2, theY2),
|
|
||||||
myView());
|
|
||||||
myAISContext()->UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Select by click
|
|
||||||
/// </summary>
|
|
||||||
void Select()
|
|
||||||
{
|
|
||||||
if (!myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
myAISContext()->SelectDetected();
|
|
||||||
myAISContext()->UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Move view
|
|
||||||
/// </summary>
|
|
||||||
void MoveTo (int theX, int theY)
|
|
||||||
{
|
|
||||||
if (!myAISContext().IsNull() && !myView().IsNull())
|
|
||||||
{
|
|
||||||
myAISContext()->MoveTo (theX, theY, myView(), Standard_True);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Select by rectangle with pressed "Shift" key
|
|
||||||
/// </summary>
|
|
||||||
void ShiftSelect (int theX1, int theY1, int theX2, int theY2)
|
|
||||||
{
|
|
||||||
if (!myAISContext().IsNull() && !myView().IsNull())
|
|
||||||
{
|
|
||||||
myAISContext()->SelectRectangle (Graphic3d_Vec2i (theX1, theY1),
|
|
||||||
Graphic3d_Vec2i (theX2, theY2),
|
|
||||||
myView(),
|
|
||||||
AIS_SelectionScheme_XOR);
|
|
||||||
myAISContext()->UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Select by "Shift" key
|
|
||||||
/// </summary>
|
|
||||||
void ShiftSelect()
|
|
||||||
{
|
|
||||||
if (!myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
myAISContext()->SelectDetected (AIS_SelectionScheme_XOR);
|
|
||||||
myAISContext()->UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Set background color
|
|
||||||
/// </summary>
|
|
||||||
void BackgroundColor (int& theRed, int& theGreen, int& theBlue)
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
Quantity_Color aColor = myView()->BackgroundColor();
|
|
||||||
theRed = (int )aColor.Red() * 255;
|
|
||||||
theGreen = (int )aColor.Green() * 255;
|
|
||||||
theBlue = (int )aColor.Blue() * 255;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Get background color Red
|
|
||||||
/// </summary>
|
|
||||||
int GetBGColR()
|
|
||||||
{
|
|
||||||
int anRgb[3];
|
|
||||||
BackgroundColor (anRgb[0], anRgb[1], anRgb[2]);
|
|
||||||
return anRgb[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Get background color Green
|
|
||||||
/// </summary>
|
|
||||||
int GetBGColG()
|
|
||||||
{
|
|
||||||
int anRgb[3];
|
|
||||||
BackgroundColor (anRgb[0], anRgb[1], anRgb[2]);
|
|
||||||
return anRgb[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Get background color Blue
|
|
||||||
/// </summary>
|
|
||||||
int GetBGColB()
|
|
||||||
{
|
|
||||||
int anRgb[3];
|
|
||||||
BackgroundColor (anRgb[0], anRgb[1], anRgb[2]);
|
|
||||||
return anRgb[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Update current viewer
|
|
||||||
/// </summary>
|
|
||||||
void UpdateCurrentViewer()
|
|
||||||
{
|
|
||||||
if (!myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
myAISContext()->UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Front side
|
|
||||||
/// </summary>
|
|
||||||
void FrontView()
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->SetProj (V3d_Yneg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Top side
|
|
||||||
/// </summary>
|
|
||||||
void TopView()
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->SetProj (V3d_Zpos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Left side
|
|
||||||
/// </summary>
|
|
||||||
void LeftView()
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->SetProj (V3d_Xneg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Back side
|
|
||||||
/// </summary>
|
|
||||||
void BackView()
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->SetProj (V3d_Ypos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Right side
|
|
||||||
/// </summary>
|
|
||||||
void RightView()
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->SetProj (V3d_Xpos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Bottom side
|
|
||||||
/// </summary>
|
|
||||||
void BottomView()
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->SetProj (V3d_Zneg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Axo side
|
|
||||||
/// </summary>
|
|
||||||
void AxoView()
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->SetProj (V3d_XposYnegZpos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Scale
|
|
||||||
/// </summary>
|
|
||||||
float Scale()
|
|
||||||
{
|
|
||||||
return myView().IsNull()
|
|
||||||
? -1.0f
|
|
||||||
: float(myView()->Scale());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Zoom in all view
|
|
||||||
/// </summary>
|
|
||||||
void ZoomAllView()
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->FitAll();
|
|
||||||
myView()->ZFitAll();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Reset view
|
|
||||||
/// </summary>
|
|
||||||
void Reset()
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->Reset();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Set display mode of objects
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theMode">Set current mode</param>
|
|
||||||
void SetDisplayMode (int theMode)
|
|
||||||
{
|
|
||||||
if (myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
AIS_DisplayMode aCurrentMode = theMode == 0
|
|
||||||
? AIS_WireFrame
|
|
||||||
: AIS_Shaded;
|
|
||||||
if (myAISContext()->NbSelected() == 0)
|
|
||||||
{
|
|
||||||
myAISContext()->SetDisplayMode (aCurrentMode, Standard_False);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
|
||||||
{
|
|
||||||
myAISContext()->SetDisplayMode (myAISContext()->SelectedInteractive(), theMode, Standard_False);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
myAISContext()->UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Set color
|
|
||||||
/// </summary>
|
|
||||||
void SetColor (int theR, int theG, int theB)
|
|
||||||
{
|
|
||||||
if (myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Quantity_Color aCol (theR / 255.0, theG / 255.0, theB / 255.0, Quantity_TOC_RGB);
|
|
||||||
for (; myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
|
||||||
{
|
|
||||||
myAISContext()->SetColor (myAISContext()->SelectedInteractive(), aCol, false);
|
|
||||||
}
|
|
||||||
myAISContext()->UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Get object color red
|
|
||||||
/// </summary>
|
|
||||||
int GetObjColR()
|
|
||||||
{
|
|
||||||
int anRgb[3];
|
|
||||||
ObjectColor (anRgb[0], anRgb[1], anRgb[2]);
|
|
||||||
return anRgb[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Get object color green
|
|
||||||
/// </summary>
|
|
||||||
int GetObjColG()
|
|
||||||
{
|
|
||||||
int anRgb[3];
|
|
||||||
ObjectColor (anRgb[0], anRgb[1], anRgb[2]);
|
|
||||||
return anRgb[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Get object color blue
|
|
||||||
/// </summary>
|
|
||||||
int GetObjColB()
|
|
||||||
{
|
|
||||||
int anRgb[3];
|
|
||||||
ObjectColor (anRgb[0], anRgb[1], anRgb[2]);
|
|
||||||
return anRgb[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Get object color R/G/B
|
|
||||||
/// </summary>
|
|
||||||
void ObjectColor (int& theRed, int& theGreen, int& theBlue)
|
|
||||||
{
|
|
||||||
if (myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
theRed = 255;
|
|
||||||
theGreen = 255;
|
|
||||||
theBlue = 255;
|
|
||||||
myAISContext()->InitSelected();
|
|
||||||
if (!myAISContext()->MoreSelected())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Handle(AIS_InteractiveObject) aCurrent = myAISContext()->SelectedInteractive();
|
|
||||||
if (aCurrent->HasColor())
|
|
||||||
{
|
|
||||||
Quantity_Color anObjCol;
|
|
||||||
myAISContext()->Color (aCurrent, anObjCol);
|
|
||||||
theRed = int(anObjCol.Red() * 255.0);
|
|
||||||
theGreen = int(anObjCol.Green() * 255.0);
|
|
||||||
theBlue = int(anObjCol.Blue() * 255.0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Set background color R/G/B
|
|
||||||
/// </summary>
|
|
||||||
void SetBackgroundColor (int theRed, int theGreen, int theBlue)
|
|
||||||
{
|
|
||||||
if (!myView().IsNull())
|
|
||||||
{
|
|
||||||
myView()->SetBackgroundColor (Quantity_TOC_RGB, theRed / 255.0, theGreen / 255.0, theBlue / 255.0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Erase objects
|
|
||||||
/// </summary>
|
|
||||||
void EraseObjects()
|
|
||||||
{
|
|
||||||
if (myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
myAISContext()->EraseSelected (Standard_False);
|
|
||||||
myAISContext()->ClearSelected (Standard_True);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Get version
|
|
||||||
/// </summary>
|
|
||||||
float GetOCCVersion()
|
|
||||||
{
|
|
||||||
return (float )OCC_VERSION;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///set material
|
|
||||||
/// </summary>
|
|
||||||
void SetMaterial (int theMaterial)
|
|
||||||
{
|
|
||||||
if (myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
|
||||||
{
|
|
||||||
myAISContext()->SetMaterial (myAISContext()->SelectedInteractive(), (Graphic3d_NameOfMaterial )theMaterial, Standard_False);
|
|
||||||
}
|
|
||||||
myAISContext()->UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///set transparency
|
|
||||||
/// </summary>
|
|
||||||
void SetTransparency (int theTrans)
|
|
||||||
{
|
|
||||||
if (myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
|
||||||
{
|
|
||||||
myAISContext()->SetTransparency (myAISContext()->SelectedInteractive(), ((Standard_Real )theTrans) / 10.0, Standard_False);
|
|
||||||
}
|
|
||||||
myAISContext()->UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Return true if object is selected
|
|
||||||
/// </summary>
|
|
||||||
bool IsObjectSelected()
|
|
||||||
{
|
|
||||||
if (myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
myAISContext()->InitSelected();
|
|
||||||
return myAISContext()->MoreSelected() != Standard_False;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Return display mode
|
|
||||||
/// </summary>
|
|
||||||
int DisplayMode()
|
|
||||||
{
|
|
||||||
if (myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isOneOrMoreInShading = false;
|
|
||||||
bool isOneOrMoreInWireframe = false;
|
|
||||||
for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
|
||||||
{
|
|
||||||
if (myAISContext()->IsDisplayed (myAISContext()->SelectedInteractive(), AIS_Shaded))
|
|
||||||
{
|
|
||||||
isOneOrMoreInShading = true;
|
|
||||||
}
|
|
||||||
if (myAISContext()->IsDisplayed (myAISContext()->SelectedInteractive(), AIS_WireFrame))
|
|
||||||
{
|
|
||||||
isOneOrMoreInWireframe = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isOneOrMoreInShading
|
|
||||||
&& isOneOrMoreInWireframe)
|
|
||||||
{
|
|
||||||
return 10;
|
|
||||||
}
|
|
||||||
else if (isOneOrMoreInShading)
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else if (isOneOrMoreInWireframe)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Set AISContext
|
|
||||||
/// </summary>
|
|
||||||
bool SetAISContext (OCCTProxyD3D^ theViewer)
|
|
||||||
{
|
|
||||||
this->myAISContext() = theViewer->GetContext();
|
|
||||||
if (myAISContext().IsNull())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Get AISContext
|
|
||||||
/// </summary>
|
|
||||||
Handle(AIS_InteractiveContext) GetContext()
|
|
||||||
{
|
|
||||||
return myAISContext();
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
// ============================================
|
|
||||||
// Import / export functionality
|
|
||||||
// ============================================
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Import BRep file
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theFileName">Name of import file</param>
|
|
||||||
bool ImportBrep (System::String^ theFileName)
|
|
||||||
{
|
|
||||||
return ImportBrep (toAsciiString (theFileName));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Import BRep file
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theFileName">Name of import file</param>
|
|
||||||
bool ImportBrep (const TCollection_AsciiString& theFileName)
|
|
||||||
{
|
|
||||||
TopoDS_Shape aShape;
|
|
||||||
BRep_Builder aBuilder;
|
|
||||||
if (!BRepTools::Read (aShape, theFileName.ToCString(), aBuilder))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Handle(AIS_Shape) aPrs = new AIS_Shape (aShape);
|
|
||||||
myAISContext()->SetMaterial (aPrs, Graphic3d_NameOfMaterial_Gold, Standard_False);
|
|
||||||
myAISContext()->SetDisplayMode(aPrs, AIS_Shaded, Standard_False);
|
|
||||||
myAISContext()->Display (aPrs, Standard_True);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Import Step file
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theFileName">Name of import file</param>
|
|
||||||
bool ImportStep (const TCollection_AsciiString& theFileName)
|
|
||||||
{
|
|
||||||
STEPControl_Reader aReader;
|
|
||||||
if (aReader.ReadFile (theFileName.ToCString()) != IFSelect_RetDone)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isFailsonly = false;
|
|
||||||
aReader.PrintCheckLoad( isFailsonly, IFSelect_ItemsByEntity );
|
|
||||||
|
|
||||||
int aNbRoot = aReader.NbRootsForTransfer();
|
|
||||||
aReader.PrintCheckTransfer (isFailsonly, IFSelect_ItemsByEntity);
|
|
||||||
for (Standard_Integer aRootIter = 1; aRootIter <= aNbRoot; ++aRootIter)
|
|
||||||
{
|
|
||||||
aReader.TransferRoot (aRootIter);
|
|
||||||
int aNbShap = aReader.NbShapes();
|
|
||||||
if (aNbShap > 0)
|
|
||||||
{
|
|
||||||
for (int aShapeIter = 1; aShapeIter <= aNbShap; ++aShapeIter)
|
|
||||||
{
|
|
||||||
myAISContext()->Display (new AIS_Shape (aReader.Shape (aShapeIter)), Standard_False);
|
|
||||||
}
|
|
||||||
myAISContext()->UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Import Iges file
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theFileName">Name of import file</param>
|
|
||||||
bool ImportIges (const TCollection_AsciiString& theFileName)
|
|
||||||
{
|
|
||||||
IGESControl_Reader aReader;
|
|
||||||
if (aReader.ReadFile (theFileName.ToCString()) != IFSelect_RetDone)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
aReader.TransferRoots();
|
|
||||||
TopoDS_Shape aShape = aReader.OneShape();
|
|
||||||
myAISContext()->Display (new AIS_Shape (aShape), Standard_False);
|
|
||||||
myAISContext()->UpdateCurrentViewer();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Export BRep file
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theFileName">Name of export file</param>
|
|
||||||
bool ExportBRep (const TCollection_AsciiString& theFileName)
|
|
||||||
{
|
|
||||||
myAISContext()->InitSelected();
|
|
||||||
if (!myAISContext()->MoreSelected())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->SelectedInteractive());
|
|
||||||
return !anIS.IsNull()
|
|
||||||
&& BRepTools::Write (anIS->Shape(), theFileName.ToCString());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Export Step file
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theFileName">Name of export file</param>
|
|
||||||
bool ExportStep (const TCollection_AsciiString& theFileName)
|
|
||||||
{
|
|
||||||
STEPControl_StepModelType aType = STEPControl_AsIs;
|
|
||||||
STEPControl_Writer aWriter;
|
|
||||||
for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
|
||||||
{
|
|
||||||
Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->SelectedInteractive());
|
|
||||||
if (anIS.IsNull())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
TopoDS_Shape aShape = anIS->Shape();
|
|
||||||
if (aWriter.Transfer (aShape, aType) != IFSelect_RetDone)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return aWriter.Write (theFileName.ToCString()) == IFSelect_RetDone;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Export Iges file
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theFileName">Name of export file</param>
|
|
||||||
bool ExportIges (const TCollection_AsciiString& theFileName)
|
|
||||||
{
|
|
||||||
IGESControl_Controller::Init();
|
|
||||||
IGESControl_Writer aWriter (Interface_Static::CVal ("XSTEP.iges.unit"),
|
|
||||||
Interface_Static::IVal ("XSTEP.iges.writebrep.mode"));
|
|
||||||
for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
|
||||||
{
|
|
||||||
Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->SelectedInteractive());
|
|
||||||
if (anIS.IsNull())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
aWriter.AddShape (anIS->Shape());
|
|
||||||
}
|
|
||||||
|
|
||||||
aWriter.ComputeModel();
|
|
||||||
return aWriter.Write (theFileName.ToCString()) != Standard_False;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Export Vrml file
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theFileName">Name of export file</param>
|
|
||||||
bool ExportVrml (const TCollection_AsciiString& theFileName)
|
|
||||||
{
|
|
||||||
TopoDS_Compound aRes;
|
|
||||||
BRep_Builder aBuilder;
|
|
||||||
aBuilder.MakeCompound (aRes);
|
|
||||||
for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
|
||||||
{
|
|
||||||
Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->SelectedInteractive());
|
|
||||||
if (anIS.IsNull())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
aBuilder.Add (aRes, anIS->Shape());
|
|
||||||
}
|
|
||||||
|
|
||||||
VrmlAPI_Writer aWriter;
|
|
||||||
aWriter.Write (aRes, theFileName.ToCString());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Export Stl file
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theFileName">Name of export file</param>
|
|
||||||
bool ExportStl (const TCollection_AsciiString& theFileName)
|
|
||||||
{
|
|
||||||
TopoDS_Compound aComp;
|
|
||||||
BRep_Builder aBuilder;
|
|
||||||
aBuilder.MakeCompound (aComp);
|
|
||||||
for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
|
||||||
{
|
|
||||||
Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->SelectedInteractive());
|
|
||||||
if (anIS.IsNull())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
aBuilder.Add (aComp, anIS->Shape());
|
|
||||||
}
|
|
||||||
|
|
||||||
StlAPI_Writer aWriter;
|
|
||||||
aWriter.Write (aComp, theFileName.ToCString());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Define which Import/Export function must be called
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="theFileName">Name of Import/Export file</param>
|
|
||||||
/// <param name="theFormat">Determines format of Import/Export file</param>
|
|
||||||
/// <param name="theIsImport">Determines is Import or not</param>
|
|
||||||
bool TranslateModel (System::String^ theFileName, int theFormat, bool theIsImport)
|
|
||||||
{
|
|
||||||
bool isResult = false;
|
|
||||||
const TCollection_AsciiString aFilename = toAsciiString (theFileName);
|
|
||||||
if (theIsImport)
|
|
||||||
{
|
|
||||||
switch (theFormat)
|
|
||||||
{
|
|
||||||
case 0: isResult = ImportBrep (aFilename); break;
|
|
||||||
case 1: isResult = ImportStep (aFilename); break;
|
|
||||||
case 2: isResult = ImportIges (aFilename); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
switch (theFormat)
|
|
||||||
{
|
|
||||||
case 0: isResult = ExportBRep (aFilename); break;
|
|
||||||
case 1: isResult = ExportStep (aFilename); break;
|
|
||||||
case 2: isResult = ExportIges (aFilename); break;
|
|
||||||
case 3: isResult = ExportVrml (aFilename); break;
|
|
||||||
case 4: isResult = ExportStl (aFilename); break;
|
|
||||||
case 5: isResult = Dump (aFilename); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return isResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///Initialize OCCTProxyD3D
|
|
||||||
/// </summary>
|
|
||||||
void InitOCCTProxy()
|
|
||||||
{
|
|
||||||
myGraphicDriver().Nullify();
|
|
||||||
myViewer().Nullify();
|
|
||||||
myView().Nullify();
|
|
||||||
myAISContext().Nullify();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
NCollection_Haft<Handle(V3d_Viewer)> myViewer;
|
|
||||||
NCollection_Haft<Handle(V3d_View)> myView;
|
|
||||||
NCollection_Haft<Handle(AIS_InteractiveContext)> myAISContext;
|
|
||||||
NCollection_Haft<Handle(D3DHost_GraphicDriver)> myGraphicDriver;
|
|
||||||
|
|
||||||
};
|
|
||||||
@@ -1,369 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="windows-1251"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="9.00"
|
|
||||||
Name="OCCTProxy_D3D"
|
|
||||||
ProjectGUID="{969912D9-78E7-4AB8-B4FF-6B52B4F03991}"
|
|
||||||
RootNamespace="OCCTProxy_D3D"
|
|
||||||
Keyword="Win32Proj"
|
|
||||||
TargetFrameworkVersion="131072"
|
|
||||||
>
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"
|
|
||||||
/>
|
|
||||||
<Platform
|
|
||||||
Name="x64"
|
|
||||||
/>
|
|
||||||
</Platforms>
|
|
||||||
<ToolFiles>
|
|
||||||
</ToolFiles>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory="..\win32\$(VCVER)\bind"
|
|
||||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
ManagedExtensions="1"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="..\OCC\;$(CSF_OCCTIncludePath);"$(DXSDK_DIR)Include""
|
|
||||||
PreprocessorDefinitions="_DEBUG"
|
|
||||||
MinimalRebuild="false"
|
|
||||||
BasicRuntimeChecks="0"
|
|
||||||
RuntimeLibrary="3"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="$(OutDir)/OCCTProxy_D3D.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
AdditionalLibraryDirectories="$(CSF_OCCTLibPath)"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
AssemblyDebug="1"
|
|
||||||
ProgramDatabaseFile="$(OutDir)/OCCTProxy_D3D.pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
RandomizedBaseAddress="1"
|
|
||||||
DataExecutionPrevention="0"
|
|
||||||
ImportLibrary="$(OutDir)/OCCTProxy_D3D.lib"
|
|
||||||
TargetMachine="1"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|x64"
|
|
||||||
OutputDirectory="..\win64\$(VCVER)\bind"
|
|
||||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
ManagedExtensions="1"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
TargetEnvironment="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="..\OCC\;$(CSF_OCCTIncludePath);"$(DXSDK_DIR)Include""
|
|
||||||
PreprocessorDefinitions="_DEBUG"
|
|
||||||
MinimalRebuild="false"
|
|
||||||
BasicRuntimeChecks="0"
|
|
||||||
RuntimeLibrary="3"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="$(OutDir)/OCCTProxy_D3D.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
AdditionalLibraryDirectories="$(CSF_OCCTLibPath)"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
AssemblyDebug="1"
|
|
||||||
ProgramDatabaseFile="$(OutDir)/OCCTProxy_D3D.pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
RandomizedBaseAddress="1"
|
|
||||||
DataExecutionPrevention="0"
|
|
||||||
ImportLibrary="$(OutDir)/OCCTProxy_D3D.lib"
|
|
||||||
TargetMachine="17"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory="..\win32\$(VCVER)\bin"
|
|
||||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
ManagedExtensions="1"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories="..\OCC\;$(CSF_OCCTIncludePath);"$(DXSDK_DIR)Include""
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="$(OutDir)/OCCTProxy_D3D.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
AdditionalLibraryDirectories="$(CSF_OCCTLibPath)"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
RandomizedBaseAddress="1"
|
|
||||||
DataExecutionPrevention="0"
|
|
||||||
ImportLibrary="$(OutDir)/OCCTProxy_D3D.lib"
|
|
||||||
TargetMachine="1"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|x64"
|
|
||||||
OutputDirectory="..\win64\$(VCVER)\bin"
|
|
||||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
ManagedExtensions="1"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
TargetEnvironment="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories="..\OCC\;$(CSF_OCCTIncludePath);"$(DXSDK_DIR)Include""
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="$(OutDir)/OCCTProxy_D3D.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
AdditionalLibraryDirectories="$(CSF_OCCTLibPath)"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
RandomizedBaseAddress="1"
|
|
||||||
DataExecutionPrevention="0"
|
|
||||||
ImportLibrary="$(OutDir)/OCCTProxy_D3D.lib"
|
|
||||||
TargetMachine="17"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath=".\OCCTProxyD3D.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
|
||||||
>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Resource Files"
|
|
||||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
|
||||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
|
||||||
>
|
|
||||||
</Filter>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
||||||
@@ -1,201 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>{969912D9-78E7-4AB8-B4FF-6B52B4F03991}</ProjectGuid>
|
|
||||||
<RootNamespace>OCCTProxy_D3D</RootNamespace>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
<ProjectName>OCCTProxy_D3D</ProjectName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<CLRSupport>true</CLRSupport>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<CLRSupport>true</CLRSupport>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<CLRSupport>true</CLRSupport>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<CLRSupport>true</CLRSupport>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\win32\$(VCVER)\bind\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\win64\$(VCVER)\bind\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\win32\$(VCVER)\bin\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\win64\$(VCVER)\bin\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>..\OCC\;$(CSF_OCCTIncludePath);$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
|
||||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<OutputFile>$(OutDir)OCCTProxy_D3D.dll</OutputFile>
|
|
||||||
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AssemblyDebug>true</AssemblyDebug>
|
|
||||||
<ProgramDatabaseFile>$(OutDir)OCCTProxy_D3D.pdb</ProgramDatabaseFile>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<ImportLibrary>$(OutDir)OCCTProxy_D3D.lib</ImportLibrary>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
<AdditionalDependencies>d3d9.lib;d3dx9d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Midl>
|
|
||||||
<TargetEnvironment>X64</TargetEnvironment>
|
|
||||||
</Midl>
|
|
||||||
<ClCompile>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>..\OCC\;$(CSF_OCCTIncludePath);$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
|
||||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<OutputFile>$(OutDir)OCCTProxy_D3D.dll</OutputFile>
|
|
||||||
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AssemblyDebug>true</AssemblyDebug>
|
|
||||||
<ProgramDatabaseFile>$(OutDir)OCCTProxy_D3D.pdb</ProgramDatabaseFile>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<ImportLibrary>$(OutDir)OCCTProxy_D3D.lib</ImportLibrary>
|
|
||||||
<TargetMachine>MachineX64</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<AdditionalIncludeDirectories>..\OCC\;$(CSF_OCCTIncludePath);$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<OutputFile>$(OutDir)OCCTProxy_D3D.dll</OutputFile>
|
|
||||||
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<ImportLibrary>$(OutDir)OCCTProxy_D3D.lib</ImportLibrary>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Midl>
|
|
||||||
<TargetEnvironment>X64</TargetEnvironment>
|
|
||||||
</Midl>
|
|
||||||
<ClCompile>
|
|
||||||
<AdditionalIncludeDirectories>..\OCC\;$(CSF_OCCTIncludePath);$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<OutputFile>$(OutDir)OCCTProxy_D3D.dll</OutputFile>
|
|
||||||
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<ImportLibrary>$(OutDir)OCCTProxy_D3D.lib</ImportLibrary>
|
|
||||||
<TargetMachine>MachineX64</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="OCCTProxyD3D.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
.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
|
|
||||||
encapsulating OCCT viewer and providing the functionality to manipulate this viewer
|
|
||||||
and to import / export OCCT shapes from / to several supported CAD file formats (IGES, STEP, BREP).
|
|
||||||
|
|
||||||
The sample implements two approaches to the development of a user interface with C#.
|
|
||||||
Both applications provide the same functionality as the standard OCCT Import/Export sample.
|
|
||||||
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;
|
|
||||||
|
|
||||||
- It is necessary to explicitly set the target platform for C# assemblies to *x86*
|
|
||||||
in project **Properties - Build** to work consistently on 64-bit systems with OCCT libraries built in 32-bit mode;
|
|
||||||
|
|
||||||
- this sample demonstrates indirect method of wrapping C++ to C# using a manually
|
|
||||||
created proxy library. There is an alternative method of wrapping individual
|
|
||||||
OCCT classes to C# equivalents to make their full API available to a C# user
|
|
||||||
and to let the code be programmed on C# level similarly to C++ one. See the description
|
|
||||||
of **OCCT C# Wrapper** in **Advanced Samples and Tools** at
|
|
||||||
http://www.opencascade.org/support/products/advsamples
|
|
||||||
|
|
||||||
- in WPF sample, **WinForms** control is used to encapsulate OCC viewer since WPF
|
|
||||||
does not provide the necessary interface to embed OpenGl view. Other possible
|
|
||||||
solution could be to render OpenGl scene in an off-screen buffer and to map it
|
|
||||||
to WPF control as an image. That approach would allow using all WPF features to
|
|
||||||
control the OCCT viewer.
|
|
||||||
|
|
||||||
Run *msvc.bat* to start MS Visual Studio for building the sample.
|
|
||||||
Note that project files are provided only for VS 2010, you can open them in
|
|
||||||
newer versions of Visual Studio the using automatic converter.
|
|
||||||
|
|
||||||
After conversion check option **Target framework** in the properties of C# projects
|
|
||||||
(tab **Application**) to make sure that it corresponds to the version set in
|
|
||||||
the properties of C++ projects (e.g. <b>.Net Framework 4.0</b> for VS 2010).
|
|
||||||
|
|
||||||
Run *run_winforms.bat* or *run_wpf.bat* to launch the corresponding sample.
|
|
||||||
|
|
||||||
Note that all batch scripts use the configuration defined in OCCT *custom.bat* file
|
|
||||||
as default; you can provide arguments specifying VS version, bitness, and mode
|
|
||||||
to override these settings, e.g.:
|
|
||||||
|
|
||||||
> msvc.bat vc10 win64 Debug
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
.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
|
|
||||||
*ref* class encapsulating OCCT viewer and providing the functionality to manipulate this viewer
|
|
||||||
and to import / export OCCT shapes from / to several supported CAD file formats (IGES, STEP,
|
|
||||||
BREP). The proxy library **D3DProxy** contains helper methods for rendering via DirectX.
|
|
||||||
|
|
||||||
The user interface in this sample is based on Windows Presentation Foundation (WPF).
|
|
||||||
It has the same functionality as the standard OCCT Import/Export sample. The project is
|
|
||||||
called *IE_WPF_D3D*.
|
|
||||||
|
|
||||||
Note a few important details:
|
|
||||||
|
|
||||||
- to build this sample you should to download and install DirectX SDK
|
|
||||||
http://www.microsoft.com/en-us/download/details.aspx?id=6812
|
|
||||||
|
|
||||||
- OCCT template class *NCollection_Haft* is used to encapsulate C++ class into a field of *ref* class;
|
|
||||||
|
|
||||||
- It is necessary to explicitly set the target platform for C# assemblies to *x86*
|
|
||||||
in project **Properties - Build** to work consistently on 64-bit systems with OCCT libraries built in 32-bit mode;
|
|
||||||
|
|
||||||
- this sample demonstrates indirect method of wrapping C++ to C# using a manually
|
|
||||||
created proxy library. There is an alternative method of wrapping individual
|
|
||||||
OCCT classes to C# equivalents to make their full API available to a C# user
|
|
||||||
and to let the code be programmed on C# level similarly to C++ one. See the description
|
|
||||||
of **OCCT C# Wrapper** in **Advanced Samples and Tools** at
|
|
||||||
http://www.opencascade.org/support/products/advsamples
|
|
||||||
|
|
||||||
- in WPF sample, **WinForms** control is used to encapsulate OCC viewer since WPF
|
|
||||||
does not provide the necessary interface to embed OpenGl view. Other possible
|
|
||||||
solution could be to render OpenGl scene in an off-screen buffer and to map it
|
|
||||||
to WPF control as an image. That approach would allow using all WPF features to
|
|
||||||
control the OCCT viewer.
|
|
||||||
|
|
||||||
Run *msvc.bat* to start MS Visual Studio for building the sample.
|
|
||||||
Note that project files are provided only for VS 2010, you can open them in
|
|
||||||
newer versions of Visual Studio using an automatic converter.
|
|
||||||
|
|
||||||
After conversion check option **Target framework** in the properties of C# projects
|
|
||||||
(tab **Application**) to make sure that it corresponds to the version set in
|
|
||||||
the properties of C++ projects (e.g. <b>.Net Framework 4.0</b> for VS 2010).
|
|
||||||
|
|
||||||
Run *run_wpf-D3D.bat* to launch the corresponding sample.
|
|
||||||
|
|
||||||
Note that all batch scripts use the configuration defined in OCCT *custom.bat* file
|
|
||||||
as default; you can provide arguments specifying VS version, bitness, and mode
|
|
||||||
to override these settings, e.g.:
|
|
||||||
|
|
||||||
> msvc.bat vc10 win64 Debug
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<Window
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
x:Class="IE_WPF_D3D.AboutDialog"
|
|
||||||
x:Name="Window"
|
|
||||||
xmlns:local="clr-namespace:IE_WPF_D3D"
|
|
||||||
Title="About Import/Export Sample"
|
|
||||||
Width="312" Height="285">
|
|
||||||
|
|
||||||
<StackPanel Orientation="Vertical">
|
|
||||||
<Label Content="Import/Export Sample," HorizontalAlignment="Center"/>
|
|
||||||
<Label Content="Open CASCADE Technology " HorizontalAlignment="Center"/>
|
|
||||||
<Image Source="occ_logo.bmp" Width="194" Height="100" />
|
|
||||||
<Label Content="Copyright (C) 2004-2013, Open CASCADE S.A.S" HorizontalAlignment="Center"/>
|
|
||||||
<Label Content="http://www.opencascade.com" HorizontalAlignment="Center"/>
|
|
||||||
<Button Content="OK" HorizontalAlignment="Center" Width="75" Command="local:IECommands.AboutOk"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Window>
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace IE_WPF_D3D
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaction logic for About.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class AboutDialog : Window
|
|
||||||
{
|
|
||||||
public AboutDialog()
|
|
||||||
{
|
|
||||||
this.InitializeComponent();
|
|
||||||
|
|
||||||
CommandBinding aBind_Ok = new CommandBinding( IECommands.AboutOk );
|
|
||||||
aBind_Ok.Executed += OkCommand_Executed;
|
|
||||||
aBind_Ok.CanExecute += OkCommand_CanExecute;
|
|
||||||
CommandBindings.Add( aBind_Ok );
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OkCommand_Executed( object sender, ExecutedRoutedEventArgs e )
|
|
||||||
{
|
|
||||||
this.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OkCommand_CanExecute( object sender, CanExecuteRoutedEventArgs e )
|
|
||||||
{
|
|
||||||
e.CanExecute = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
<Application x:Class="IE_WPF_D3D.App"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
StartupUri="MainWindow.xaml">
|
|
||||||
<Application.Resources>
|
|
||||||
|
|
||||||
<ResourceDictionary>
|
|
||||||
<ResourceDictionary.MergedDictionaries>
|
|
||||||
<ResourceDictionary Source="Simple Styles.xaml"/>
|
|
||||||
</ResourceDictionary.MergedDictionaries>
|
|
||||||
</ResourceDictionary>
|
|
||||||
|
|
||||||
</Application.Resources>
|
|
||||||
</Application>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Data;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
namespace IE_WPF_D3D
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaction logic for App.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class App : Application
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,136 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Interop;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace IE_WPF_D3D
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Tool object for output OCCT rendering with Direct3D.
|
|
||||||
/// </summary>
|
|
||||||
class D3DViewer
|
|
||||||
{
|
|
||||||
/// <summary> Direct3D output image. </summary>
|
|
||||||
private D3DImage myD3DImage = new D3DImage ();
|
|
||||||
|
|
||||||
/// <summary> Direct3D color surface. </summary>
|
|
||||||
private IntPtr myColorSurf;
|
|
||||||
|
|
||||||
public OCCViewer Viewer;
|
|
||||||
|
|
||||||
/// <summary> Creates new Direct3D-based OCCT viewer. </summary>
|
|
||||||
public D3DViewer ()
|
|
||||||
{
|
|
||||||
myD3DImage.IsFrontBufferAvailableChanged
|
|
||||||
+= new DependencyPropertyChangedEventHandler (OnIsFrontBufferAvailableChanged);
|
|
||||||
|
|
||||||
BeginRenderingScene ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Creates new Direct3D-based OCCT viewer. </summary>
|
|
||||||
private void OnIsFrontBufferAvailableChanged (object sender, DependencyPropertyChangedEventArgs e)
|
|
||||||
{
|
|
||||||
// If the front buffer is available, then WPF has just created a new
|
|
||||||
// Direct3D device, thus we need to start rendering our custom scene
|
|
||||||
if (myD3DImage.IsFrontBufferAvailable)
|
|
||||||
{
|
|
||||||
BeginRenderingScene ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// If the front buffer is no longer available, then WPF has lost Direct3D
|
|
||||||
// device, thus we need to stop rendering until the new device is created
|
|
||||||
StopRenderingScene ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool myIsFailed = false;
|
|
||||||
|
|
||||||
/// <summary> Initializes Direct3D-OCCT rendering. </summary>
|
|
||||||
private void BeginRenderingScene ()
|
|
||||||
{
|
|
||||||
if (myIsFailed)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (myD3DImage.IsFrontBufferAvailable)
|
|
||||||
{
|
|
||||||
Viewer = new OCCViewer();
|
|
||||||
|
|
||||||
if (!Viewer.InitViewer())
|
|
||||||
{
|
|
||||||
MessageBox.Show ("Failed to initialize OpenGL-Direct3D interoperability!",
|
|
||||||
"Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
|
||||||
|
|
||||||
myIsFailed = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Leverage the Rendering event of WPF composition
|
|
||||||
// target to update the our custom Direct3D scene
|
|
||||||
CompositionTarget.Rendering += OnRendering;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Releases Direct3D-OCCT rendering. </summary>
|
|
||||||
public void StopRenderingScene ()
|
|
||||||
{
|
|
||||||
// This method is called when WPF loses its Direct3D device,
|
|
||||||
// so we should just release our custom Direct3D scene
|
|
||||||
CompositionTarget.Rendering -= OnRendering;
|
|
||||||
myColorSurf = IntPtr.Zero;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Performs Direct3D-OCCT rendering. </summary>
|
|
||||||
private void OnRendering (object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
UpdateScene ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Performs Direct3D-OCCT rendering. </summary>
|
|
||||||
private void UpdateScene ()
|
|
||||||
{
|
|
||||||
if (!myIsFailed
|
|
||||||
&& myD3DImage.IsFrontBufferAvailable
|
|
||||||
&& myColorSurf != IntPtr.Zero
|
|
||||||
&& (myD3DImage.PixelWidth != 0 && myD3DImage.PixelHeight != 0))
|
|
||||||
{
|
|
||||||
myD3DImage.Lock ();
|
|
||||||
{
|
|
||||||
// Update the scene (via a call into our custom library)
|
|
||||||
Viewer.View.RedrawView ();
|
|
||||||
|
|
||||||
// Invalidate the updated region of the D3DImage
|
|
||||||
myD3DImage.AddDirtyRect(new Int32Rect(0, 0, myD3DImage.PixelWidth, myD3DImage.PixelHeight));
|
|
||||||
}
|
|
||||||
myD3DImage.Unlock ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Resizes Direct3D surfaces and OpenGL FBO. </summary>
|
|
||||||
public void Resize (int theSizeX, int theSizeY)
|
|
||||||
{
|
|
||||||
if (!myIsFailed && myD3DImage.IsFrontBufferAvailable)
|
|
||||||
{
|
|
||||||
// Set the back buffer for Direct3D WPF image
|
|
||||||
myD3DImage.Lock ();
|
|
||||||
{
|
|
||||||
myD3DImage.SetBackBuffer (D3DResourceType.IDirect3DSurface9, IntPtr.Zero);
|
|
||||||
myColorSurf = Viewer.View.ResizeBridgeFBO (theSizeX, theSizeY);
|
|
||||||
myD3DImage.SetBackBuffer (D3DResourceType.IDirect3DSurface9, myColorSurf);
|
|
||||||
}
|
|
||||||
myD3DImage.Unlock ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public D3DImage Image
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return myD3DImage;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Input;
|
|
||||||
|
|
||||||
namespace IE_WPF_D3D
|
|
||||||
{
|
|
||||||
public class IECommands
|
|
||||||
{
|
|
||||||
public static RoutedUICommand New { get; private set; }
|
|
||||||
public static RoutedUICommand Close { get; private set; }
|
|
||||||
public static RoutedUICommand Quit { get; private set; }
|
|
||||||
public static RoutedUICommand About { get; private set; }
|
|
||||||
public static RoutedUICommand AboutOk { get; private set; }
|
|
||||||
|
|
||||||
static IECommands()
|
|
||||||
{
|
|
||||||
#region menu
|
|
||||||
|
|
||||||
InputGestureCollection inputsNew = new InputGestureCollection();
|
|
||||||
inputsNew.Add( new KeyGesture( Key.N, ModifierKeys.Control, "Ctrl + N" ) );
|
|
||||||
New = new RoutedUICommand( "New", "New", typeof(IECommands), inputsNew );
|
|
||||||
|
|
||||||
Close = new RoutedUICommand( "Close", "Close", typeof(IECommands) );
|
|
||||||
|
|
||||||
InputGestureCollection inputsQuit = new InputGestureCollection();
|
|
||||||
inputsQuit.Add( new KeyGesture( Key.F4, ModifierKeys.Alt, "Alt + F4" ) );
|
|
||||||
Quit = new RoutedUICommand( "Quit", "Quit", typeof(IECommands), inputsQuit );
|
|
||||||
|
|
||||||
InputGestureCollection inputsAbout = new InputGestureCollection();
|
|
||||||
inputsAbout.Add( new KeyGesture( Key.F1 ) );
|
|
||||||
About = new RoutedUICommand( "About", "About", typeof(IECommands), inputsAbout );
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region aboutDlg
|
|
||||||
InputGestureCollection inputsAboutOk = new InputGestureCollection();
|
|
||||||
inputsAboutOk.Add( new KeyGesture( Key.Enter ) );
|
|
||||||
AboutOk = new RoutedUICommand( "AboutOk", "AboutOk", typeof(IECommands), inputsAboutOk );
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,268 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProductVersion>9.0.30729</ProductVersion>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectGuid>{D12A8897-5BF8-4345-BBB0-8ADE4B9FB9A7}</ProjectGuid>
|
|
||||||
<OutputType>WinExe</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>IE_WPF_D3D</RootNamespace>
|
|
||||||
<AssemblyName>IE_WPF_D3D</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<ExpressionBlendVersion>3.0.1927.0</ExpressionBlendVersion>
|
|
||||||
<FileUpgradeFlags>
|
|
||||||
</FileUpgradeFlags>
|
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
|
||||||
<UpgradeBackupLocation />
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
|
||||||
<PublishUrl>publish\</PublishUrl>
|
|
||||||
<Install>true</Install>
|
|
||||||
<InstallFrom>Disk</InstallFrom>
|
|
||||||
<UpdateEnabled>false</UpdateEnabled>
|
|
||||||
<UpdateMode>Foreground</UpdateMode>
|
|
||||||
<UpdateInterval>7</UpdateInterval>
|
|
||||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
|
||||||
<UpdatePeriodically>false</UpdatePeriodically>
|
|
||||||
<UpdateRequired>false</UpdateRequired>
|
|
||||||
<MapFileExtensions>true</MapFileExtensions>
|
|
||||||
<ApplicationRevision>0</ApplicationRevision>
|
|
||||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
|
||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>..\win32\$(VCVER)\bind\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
|
||||||
<OutputPath>..\win32\$(VCVER)\bin\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>..\win64\$(VCVER)\bind\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
|
||||||
<OutputPath>..\win64\$(VCVER)\bin\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Core">
|
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xaml" />
|
|
||||||
<Reference Include="System.Xml.Linq">
|
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.DataSetExtensions">
|
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="UIAutomationProvider">
|
|
||||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="WindowsBase">
|
|
||||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PresentationCore">
|
|
||||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PresentationFramework">
|
|
||||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="WindowsFormsIntegration">
|
|
||||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ApplicationDefinition Include="App.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</ApplicationDefinition>
|
|
||||||
<Page Include="About.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Include="MaterialDlg.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Simple Styles.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Include="MainWindow.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Compile Include="App.xaml.cs">
|
|
||||||
<DependentUpon>App.xaml</DependentUpon>
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="MainWindow.xaml.cs">
|
|
||||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="About.xaml.cs">
|
|
||||||
<DependentUpon>About.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="D3DViewer.cs" />
|
|
||||||
<Compile Include="IECommands.cs" />
|
|
||||||
<Compile Include="MaterialDlg.xaml.cs">
|
|
||||||
<DependentUpon>MaterialDlg.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Properties\Settings.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="OCCViewer.cs">
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="TransparencyDialog.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="TransparencyDialog.resx">
|
|
||||||
<DependentUpon>TransparencyDialog.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="Properties\Settings.settings">
|
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
|
||||||
</None>
|
|
||||||
<AppDesigner Include="Properties\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="res\help.png" />
|
|
||||||
<Resource Include="res\lamp.png" />
|
|
||||||
<Resource Include="res\MainFrame.ico" />
|
|
||||||
<Resource Include="res\new.png" />
|
|
||||||
<Resource Include="res\tool_color.png" />
|
|
||||||
<Resource Include="res\tool_delete.png" />
|
|
||||||
<Resource Include="res\tool_material.png" />
|
|
||||||
<Resource Include="res\tool_shading.png" />
|
|
||||||
<Resource Include="res\tool_transparency.png" />
|
|
||||||
<Resource Include="res\tool_wireframe.png" />
|
|
||||||
<Resource Include="res\view_axo.png" />
|
|
||||||
<Resource Include="res\view_back.png" />
|
|
||||||
<Resource Include="res\view_bottom.png" />
|
|
||||||
<Resource Include="res\view_comp_off.png" />
|
|
||||||
<Resource Include="res\view_comp_on.png" />
|
|
||||||
<Resource Include="res\view_fitall.png" />
|
|
||||||
<Resource Include="res\view_fitarea.png" />
|
|
||||||
<Resource Include="res\view_front.png" />
|
|
||||||
<Resource Include="res\view_glpan.png" />
|
|
||||||
<Resource Include="res\view_left.png" />
|
|
||||||
<Resource Include="res\view_pan.png" />
|
|
||||||
<Resource Include="res\view_reset.png" />
|
|
||||||
<Resource Include="res\view_right.png" />
|
|
||||||
<Resource Include="res\view_rotate.png" />
|
|
||||||
<Resource Include="res\view_top.png" />
|
|
||||||
<Resource Include="res\view_zoom.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="res\occ_logo.bmp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
|
|
||||||
<Install>true</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>Windows Installer 3.1</ProductName>
|
|
||||||
<Install>true</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\OCCTProxy_D3D\OCCTProxy_D3D.vcxproj">
|
|
||||||
<Project>{969912D9-78E7-4AB8-B4FF-6B52B4F03991}</Project>
|
|
||||||
<Name>OCCTProxy_D3D</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
</Project>
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
<Window
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
x:Class="IE_WPF_D3D.MainWindow"
|
|
||||||
xmlns:local="clr-namespace:IE_WPF_D3D"
|
|
||||||
Title="Sample Import/Export" Height="600" Width="900" Icon="res/MainFrame.ico">
|
|
||||||
|
|
||||||
<Window.Background>
|
|
||||||
<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ControlDarkColorKey}}"/>
|
|
||||||
</Window.Background>
|
|
||||||
|
|
||||||
<Window.Resources>
|
|
||||||
<BooleanToVisibilityConverter x:Key="boolToVisibilityConverter"/>
|
|
||||||
</Window.Resources>
|
|
||||||
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="auto"/>
|
|
||||||
<RowDefinition Height="auto"/>
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition Height="auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<Menu Height="25" Grid.Row="0">
|
|
||||||
<MenuItem Header="File">
|
|
||||||
<MenuItem Command="local:IECommands.New"/>
|
|
||||||
<MenuItem Command="local:IECommands.Close"/>
|
|
||||||
<MenuItem Header="Import" IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsDocumentOpen}">
|
|
||||||
<MenuItem Name="ImportBrep" Header="BRep..." Click="ImportBRep_Click"/>
|
|
||||||
<MenuItem Name="ImportIges" Header="Iges..." Click="ImportIges_Click"/>
|
|
||||||
<MenuItem Name="ImportStep" Header="Step..." Click="ImportStep_Click"/>
|
|
||||||
</MenuItem>
|
|
||||||
<MenuItem Header="Export" IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsDocumentOpen}">
|
|
||||||
<MenuItem Name="ExportBrep" Header="BRep..." Click="ExportBRep_Click"/>
|
|
||||||
<MenuItem Name="ExportIges" Header="Iges..." Click="ExportIges_Click"/>
|
|
||||||
<MenuItem Name="ExportStep" Header="Step..." Click="ExportStep_Click"/>
|
|
||||||
<MenuItem Name="ExportStl" Header="Stl..." Click="ExportStl_Click"/>
|
|
||||||
<MenuItem Name="ExportVrml" Header="Vrml..." Click="ExportVrml_Click"/>
|
|
||||||
<Separator/>
|
|
||||||
<MenuItem Name="ExportImage" Header="Image..." Click="ExportImage_Click"/>
|
|
||||||
</MenuItem>
|
|
||||||
<Separator/>
|
|
||||||
<MenuItem Command="local:IECommands.Quit"/>
|
|
||||||
</MenuItem>
|
|
||||||
<MenuItem Header="View">
|
|
||||||
<MenuItem Name="ActivateToolbar" IsCheckable="True" IsChecked="True" Header="Toolbar"/>
|
|
||||||
<MenuItem Name="ActivateStatusbar" IsCheckable="True" IsChecked="True" Header="Statusbar"/>
|
|
||||||
</MenuItem>
|
|
||||||
<MenuItem Header="Help">
|
|
||||||
<MenuItem Header="About" Command="local:IECommands.About"/>
|
|
||||||
</MenuItem>
|
|
||||||
</Menu>
|
|
||||||
|
|
||||||
<ToolBarTray Background="White" Grid.Row="1">
|
|
||||||
<ToolBar Name="ToolBar" Band="1" BandIndex="1"
|
|
||||||
Visibility="{Binding ElementName=ActivateToolbar, Path=IsChecked, Converter={StaticResource boolToVisibilityConverter}}"
|
|
||||||
MouseEnter="ToolBar_MouseEnter" MouseLeave="ToolBar_MouseLeave">
|
|
||||||
<Button ToolTip="New" Command="local:IECommands.New">
|
|
||||||
<Image Source="res/new.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="About" Command="local:IECommands.About">
|
|
||||||
<Image Source="res/help.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
</ToolBar>
|
|
||||||
<ToolBar Name="DocumentToolBar" Band="1" BandIndex="2"
|
|
||||||
Visibility="{Binding ElementName=ActivateToolbar, Path=IsChecked, Converter={StaticResource boolToVisibilityConverter}}"
|
|
||||||
IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsDocumentOpen}"
|
|
||||||
MouseEnter="DocumentToolBar_MouseEnter" MouseLeave="ToolBar_MouseLeave">
|
|
||||||
<Button ToolTip="Wireframe" Click="Wireframe_Click"
|
|
||||||
IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsWireframeEnabled}">
|
|
||||||
<Image Source="res/tool_wireframe.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Shading" Click="Shading_Click"
|
|
||||||
IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsShadingEnabled}">
|
|
||||||
<Image Source="res/tool_shading.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Color" Click="Color_Click"
|
|
||||||
IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsColorEnabled}">
|
|
||||||
<Image Source="res/tool_color.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Material" Click="Material_Click"
|
|
||||||
IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsMaterialEnabled}">
|
|
||||||
<Image Source="res/tool_material.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Transparency" Click="Transparency_Click"
|
|
||||||
IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsTransparencyEnabled}">
|
|
||||||
<Image Source="res/tool_transparency.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Delete" Click="Delete_Click"
|
|
||||||
IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsDeleteEnabled}">
|
|
||||||
<Image Source="res/tool_delete.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
</ToolBar>
|
|
||||||
<ToolBar Name="ViewToolBar" Band="1" BandIndex="1"
|
|
||||||
Visibility="{Binding ElementName=ActivateToolbar, Path=IsChecked, Converter={StaticResource boolToVisibilityConverter}}"
|
|
||||||
IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsDocumentOpen}"
|
|
||||||
MouseEnter="ViewToolBar_MouseEnter" MouseLeave="ToolBar_MouseLeave">
|
|
||||||
<Button ToolTip="FitAll" Name="FitAllBtn" Click="FitAllBtn_Click">
|
|
||||||
<Image Source="res/view_fitall.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Zoom Window" Name="ZoomWindowBtn" Click="ZoomWindowBtn_Click"
|
|
||||||
IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsZoomWinEnabled}">
|
|
||||||
<Image Source="res/view_fitarea.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Dynamic Zooming" Name="DynamicZoomingBtn" Click="DynamicZoomingBtn_Click">
|
|
||||||
<Image Source="res/view_zoom.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Dynamic Panning" Name="DynamicPanningBtn" Click="DynamicPanningBtn_Click">
|
|
||||||
<Image Source="res/view_pan.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Global Panning" Name="GlobalPanningBtn" Click="GlobalPanningBtn_Click">
|
|
||||||
<Image Source="res/view_glpan.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Front" Name="FrontBtn" Click="FrontBtn_Click">
|
|
||||||
<Image Source="res/view_front.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Back" Name="BackBtn" Click="BackBtn_Click">
|
|
||||||
<Image Source="res/view_back.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Top" Name="TopBtn" Click="TopBtn_Click">
|
|
||||||
<Image Source="res/view_top.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Bottom" Name="BottomBtn" Click="BottomBtn_Click">
|
|
||||||
<Image Source="res/view_bottom.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Left" Name="LeftBtn" Click="LeftBtn_Click">
|
|
||||||
<Image Source="res/view_left.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Right" Name="RightBtn" Click="RightBtn_Click">
|
|
||||||
<Image Source="res/view_right.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Axo" Name="AxoBtn" Click="AxoBtn_Click">
|
|
||||||
<Image Source="res/view_axo.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Dynamic Rotation" Name="DynamicRotationBtn" Click="DynamicRotationBtn_Click">
|
|
||||||
<Image Source="res/view_rotate.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Reset" Name="ResetBtn" Click="ResetBtn_Click">
|
|
||||||
<Image Source="res/view_reset.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Hidden Off" Name="HiddenOffBtn" Click="HiddenOffBtn_Click"
|
|
||||||
IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsHlrOnPushed}">
|
|
||||||
<Image Source="vres/iew_comp_on.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="Hidden On" Name="HiddenOnBtn" Click="HiddenOnBtn_Click"
|
|
||||||
IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsHlrOffPushed}">
|
|
||||||
<Image Source="res/view_comp_off.png" Style="{StaticResource toolbarImageStyle}"/>
|
|
||||||
</Button>
|
|
||||||
</ToolBar>
|
|
||||||
</ToolBarTray>
|
|
||||||
|
|
||||||
<TabControl Name="ViewPanel" Grid.Row="2"
|
|
||||||
SelectionChanged="OnViewerChanged"
|
|
||||||
Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=IsDocumentOpen, Converter={StaticResource boolToVisibilityConverter}}">
|
|
||||||
|
|
||||||
<TabControl.ContextMenu>
|
|
||||||
<ContextMenu Opened="OnContextOpened">
|
|
||||||
<MenuItem Name="WireframeItem" Header="Wireframe" Click="Wireframe_Click" Style="{StaticResource popupItem}"/>
|
|
||||||
<MenuItem Name="ShadingItem" Header="Shading" Click="Shading_Click" Style="{StaticResource popupItem}"/>
|
|
||||||
<MenuItem Name="ColorItem" Header="Color" Click="Color_Click" Style="{StaticResource popupItem}"/>
|
|
||||||
<MenuItem Name="MaterialItem" Header="Material" Click="Material_Click" Style="{StaticResource popupItem}"/>
|
|
||||||
<MenuItem Name="TransparencyItem" Header="Transparency" Click="Transparency_Click" Style="{StaticResource popupItem}"/>
|
|
||||||
<MenuItem Name="DeleteItem" Header="Delete" Click="Delete_Click" Style="{StaticResource popupItem}"/>
|
|
||||||
<MenuItem Name="BackgroundItem" Header="Background" Click="Background_Click" Style="{StaticResource popupItem}"/>
|
|
||||||
<Separator/>
|
|
||||||
<MenuItem Command="local:IECommands.New" Style="{StaticResource popupItem}"/>
|
|
||||||
<MenuItem Command="local:IECommands.Close" Style="{StaticResource popupItem}"/>
|
|
||||||
</ContextMenu>
|
|
||||||
</TabControl.ContextMenu>
|
|
||||||
|
|
||||||
</TabControl>
|
|
||||||
|
|
||||||
<StatusBar Background="White" Grid.Row="3" Visibility="{Binding ElementName=ActivateStatusbar, Path=IsChecked, Converter={StaticResource boolToVisibilityConverter}}">
|
|
||||||
<TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=StatusBarText}"/>
|
|
||||||
</StatusBar>
|
|
||||||
</Grid>
|
|
||||||
</Window>
|
|
||||||
@@ -1,695 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Windows.Forms.Integration;
|
|
||||||
using System.Windows.Interop;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace IE_WPF_D3D
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaction logic for MainWindow.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class MainWindow : Window, INotifyPropertyChanged
|
|
||||||
{
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
|
||||||
protected void RaisePropertyChanged (string thePropertyName)
|
|
||||||
{
|
|
||||||
if (PropertyChanged != null)
|
|
||||||
{
|
|
||||||
PropertyChanged (this, new PropertyChangedEventArgs (thePropertyName));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public MainWindow ()
|
|
||||||
{
|
|
||||||
InitializeComponent ();
|
|
||||||
|
|
||||||
StatusBarText = String.Empty;
|
|
||||||
IsHlrOffPushed = false;
|
|
||||||
IsHlrOnPushed = true;
|
|
||||||
IsZoomWinEnabled = true;
|
|
||||||
|
|
||||||
#region menu operations
|
|
||||||
|
|
||||||
CommandBinding aBind_New = new CommandBinding (IECommands.New);
|
|
||||||
aBind_New.Executed += NewCommand_Executed;
|
|
||||||
CommandBindings.Add (aBind_New);
|
|
||||||
|
|
||||||
CommandBinding aBind_Close = new CommandBinding (IECommands.Close);
|
|
||||||
aBind_Close.Executed += CloseCommand_Executed;
|
|
||||||
aBind_Close.CanExecute += CloseCommand_CanExecute;
|
|
||||||
CommandBindings.Add (aBind_Close);
|
|
||||||
|
|
||||||
CommandBinding aBind_Quit = new CommandBinding (IECommands.Quit);
|
|
||||||
aBind_Quit.Executed += QuitCommand_Executed;
|
|
||||||
CommandBindings.Add (aBind_Quit);
|
|
||||||
|
|
||||||
CommandBinding aBind_About = new CommandBinding (IECommands.About);
|
|
||||||
aBind_About.Executed += AboutCommand_Executed;
|
|
||||||
CommandBindings.Add (aBind_About);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
|
|
||||||
private String myStatusBarText;
|
|
||||||
public String StatusBarText
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return myStatusBarText;
|
|
||||||
}
|
|
||||||
private set
|
|
||||||
{
|
|
||||||
myStatusBarText = value;
|
|
||||||
RaisePropertyChanged ("StatusBarText");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool isHlrOffPushed;
|
|
||||||
public Boolean IsHlrOffPushed
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return isHlrOffPushed;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
isHlrOffPushed = value;
|
|
||||||
RaisePropertyChanged ("isHlrOffPushed");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool isHlrOnPushed;
|
|
||||||
public Boolean IsHlrOnPushed
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return isHlrOnPushed;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
isHlrOnPushed = value;
|
|
||||||
RaisePropertyChanged ("IsHlrOnPushed");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool isZoomWinEnabled;
|
|
||||||
public Boolean IsZoomWinEnabled
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return isZoomWinEnabled;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
isZoomWinEnabled = value;
|
|
||||||
RaisePropertyChanged ("IsZoomWinEnabled");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private OCCViewer ActiveViewer
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (!IsDocumentOpen)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
Grid aGrid = (ViewPanel.SelectedContent) as Grid;
|
|
||||||
|
|
||||||
if (aGrid == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Map[aGrid].Viewer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean IsDocumentOpen
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return ViewPanel.Items.Count > 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private int myDocumentCounter = 1;
|
|
||||||
|
|
||||||
Dictionary<Grid, D3DViewer> Map = new Dictionary<Grid, D3DViewer> ();
|
|
||||||
|
|
||||||
private void NewCommand_Executed (object sender, ExecutedRoutedEventArgs e)
|
|
||||||
{
|
|
||||||
D3DViewer aViwer = new D3DViewer ();
|
|
||||||
|
|
||||||
Grid g = new Grid ();
|
|
||||||
|
|
||||||
Map.Add (g, aViwer);
|
|
||||||
|
|
||||||
ImageBrush anImage = new ImageBrush (aViwer.Image);
|
|
||||||
|
|
||||||
//anImage.RelativeTransform = new ScaleTransform (1.0, -1.0, 0.5, 0.5);
|
|
||||||
|
|
||||||
g.Background = anImage;
|
|
||||||
g.MouseMove += new MouseEventHandler (g_MouseMove);
|
|
||||||
g.MouseDown += new MouseButtonEventHandler (g_MouseDown);
|
|
||||||
g.MouseUp += new MouseButtonEventHandler (g_MouseUp);
|
|
||||||
|
|
||||||
g.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
|
|
||||||
|
|
||||||
|
|
||||||
TabItem aNewTab = new TabItem ();
|
|
||||||
aNewTab.Content = g;
|
|
||||||
|
|
||||||
aNewTab.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
|
|
||||||
aNewTab.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch;
|
|
||||||
aNewTab.VerticalContentAlignment = System.Windows.VerticalAlignment.Stretch;
|
|
||||||
|
|
||||||
g.SizeChanged += new SizeChangedEventHandler (g_SizeChanged);
|
|
||||||
|
|
||||||
aNewTab.IsSelected = true;
|
|
||||||
aNewTab.Header = "Document " + myDocumentCounter.ToString ();
|
|
||||||
myDocumentCounter++;
|
|
||||||
|
|
||||||
ViewPanel.Items.Add (aNewTab);
|
|
||||||
|
|
||||||
ViewPanel.Focus ();
|
|
||||||
|
|
||||||
// update XAML property
|
|
||||||
RaisePropertyChanged ("IsDocumentOpen");
|
|
||||||
}
|
|
||||||
|
|
||||||
void g_SizeChanged (object sender, SizeChangedEventArgs e)
|
|
||||||
{
|
|
||||||
if (!IsDocumentOpen)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Grid aGrid = (ViewPanel.SelectedContent) as Grid;
|
|
||||||
|
|
||||||
if (aGrid == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Map[aGrid].Resize (Convert.ToInt32 (e.NewSize.Width),
|
|
||||||
Convert.ToInt32 (e.NewSize.Height));
|
|
||||||
}
|
|
||||||
|
|
||||||
void g_MouseUp (object sender, MouseButtonEventArgs e)
|
|
||||||
{
|
|
||||||
Grid aGrid = (ViewPanel.SelectedContent) as Grid;
|
|
||||||
|
|
||||||
if (aGrid != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.OnMouseUp(aGrid, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void g_MouseDown (object sender, MouseButtonEventArgs e)
|
|
||||||
{
|
|
||||||
Grid aGrid = (ViewPanel.SelectedContent) as Grid;
|
|
||||||
|
|
||||||
if (aGrid != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.OnMouseDown(ViewPanel, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void g_MouseMove (object sender, MouseEventArgs e)
|
|
||||||
{
|
|
||||||
Grid aGrid = (ViewPanel.SelectedContent) as Grid;
|
|
||||||
|
|
||||||
if (aGrid != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.OnMouseMove (aGrid, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CloseCommand_Executed (object sender, ExecutedRoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ViewPanel.Items.Count > 0)
|
|
||||||
{
|
|
||||||
Grid aGrid = (ViewPanel.SelectedContent) as Grid;
|
|
||||||
|
|
||||||
if (aGrid == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Map[aGrid].StopRenderingScene ();
|
|
||||||
|
|
||||||
ViewPanel.Items.Remove (ViewPanel.SelectedItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
// update XAML property
|
|
||||||
RaisePropertyChanged ("IsDocumentOpen");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CloseCommand_CanExecute (object sender, CanExecuteRoutedEventArgs e)
|
|
||||||
{
|
|
||||||
e.CanExecute = IsDocumentOpen;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void QuitCommand_Executed (object sender, ExecutedRoutedEventArgs e)
|
|
||||||
{
|
|
||||||
this.Close ();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ImportBRep_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.ImportModel (ModelFormat.BREP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ImportIges_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.ImportModel (ModelFormat.IGES);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ImportStep_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.ImportModel (ModelFormat.STEP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ExportBRep_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.ExportModel (ModelFormat.BREP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ExportStep_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.ExportModel (ModelFormat.STEP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ExportIges_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.ExportModel (ModelFormat.IGES);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ExportStl_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.ExportModel (ModelFormat.STL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ExportVrml_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.ExportModel (ModelFormat.VRML);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ExportImage_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.ExportModel (ModelFormat.IMAGE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FitAllBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.FitAll ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ZoomWindowBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
IsZoomWinEnabled = false;
|
|
||||||
ActiveViewer.ZoomWindow ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DynamicZoomingBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.DynamicZooming ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DynamicPanningBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.DynamicPanning ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void GlobalPanningBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.GlobalPanning ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FrontBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.FrontView ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BackBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.BackView ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void TopBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.TopView ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BottomBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.BottomView ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void LeftBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.LeftView ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RightBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.RightView ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AxoBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.AxoView ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ResetBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.Reset ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DynamicRotationBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.DynamicRotation ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HiddenOffBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
IsHlrOffPushed = true;
|
|
||||||
IsHlrOnPushed = false;
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.HiddenOff ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HiddenOnBtn_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
IsHlrOffPushed = false;
|
|
||||||
IsHlrOnPushed = true;
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.HiddenOn ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AboutCommand_Executed (object sender, ExecutedRoutedEventArgs e)
|
|
||||||
{
|
|
||||||
AboutDialog aDlg = new AboutDialog ();
|
|
||||||
aDlg.ShowDialog ();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ToolBar_MouseEnter (object sender, MouseEventArgs e)
|
|
||||||
{
|
|
||||||
StatusBarText = "Toolbar";
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DocumentToolBar_MouseEnter (object sender, MouseEventArgs e)
|
|
||||||
{
|
|
||||||
StatusBarText = "Document toolbar";
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ViewToolBar_MouseEnter (object sender, MouseEventArgs e)
|
|
||||||
{
|
|
||||||
StatusBarText = "View toolbar";
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ToolBar_MouseLeave (object sender, MouseEventArgs e)
|
|
||||||
{
|
|
||||||
StatusBarText = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnZoomingFinished (object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
IsZoomWinEnabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsWireframeEnabled
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
return ActiveViewer.IsWireframeEnabled;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Wireframe_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.Wireframe ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Shading_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.Shading ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsShadingEnabled
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
return ActiveViewer.IsShadingEnabled;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Color_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.Color ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsColorEnabled
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
return ActiveViewer.IsColorEnabled;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Material_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.Material ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsMaterialEnabled
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
return ActiveViewer.IsMaterialEnabled;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Transparency_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.Transparency ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsTransparencyEnabled
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
return ActiveViewer.IsTransparencyEnabled;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Delete_Click (object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.Delete ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Background_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
ActiveViewer.Background();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsDeleteEnabled
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (ActiveViewer != null)
|
|
||||||
{
|
|
||||||
return ActiveViewer.IsDeleteEnabled;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AvaliabiltyOfOperationToolbarChanged ()
|
|
||||||
{
|
|
||||||
RaisePropertyChanged ("IsWireframeEnabled");
|
|
||||||
RaisePropertyChanged ("IsShadingEnabled");
|
|
||||||
RaisePropertyChanged ("IsTransparencyEnabled");
|
|
||||||
RaisePropertyChanged ("IsColorEnabled");
|
|
||||||
RaisePropertyChanged ("IsMaterialEnabled");
|
|
||||||
RaisePropertyChanged ("IsDeleteEnabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnAvaliabiltyOfOperationsChanged (object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
AvaliabiltyOfOperationToolbarChanged ();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnViewerChanged (object sender, SelectionChangedEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.RemovedItems.Count > 0)
|
|
||||||
{
|
|
||||||
Grid aHost = ((e.RemovedItems[0] as TabItem).Content) as Grid;
|
|
||||||
if (aHost == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
OCCViewer aViewer = Map[aHost].Viewer;
|
|
||||||
if (aViewer != null)
|
|
||||||
{
|
|
||||||
aViewer.ZoomingFinished -= new EventHandler (OnZoomingFinished);
|
|
||||||
aViewer.AvaliabiltyOfOperationsChanged -= new EventHandler (OnAvaliabiltyOfOperationsChanged);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.AddedItems.Count > 0)
|
|
||||||
{
|
|
||||||
Grid aHost = ((e.AddedItems[0] as TabItem).Content) as Grid;
|
|
||||||
if (aHost == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
OCCViewer aViewer = Map[aHost].Viewer;
|
|
||||||
if (aViewer != null)
|
|
||||||
{
|
|
||||||
aViewer.ZoomingFinished += new EventHandler (OnZoomingFinished);
|
|
||||||
aViewer.AvaliabiltyOfOperationsChanged += new EventHandler (OnAvaliabiltyOfOperationsChanged);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
AvaliabiltyOfOperationToolbarChanged ();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnContextOpened(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
this.WireframeItem.IsEnabled = IsWireframeEnabled;
|
|
||||||
this.ShadingItem.IsEnabled = IsShadingEnabled;
|
|
||||||
this.ColorItem.IsEnabled = IsColorEnabled;
|
|
||||||
this.MaterialItem.IsEnabled = IsMaterialEnabled;
|
|
||||||
this.TransparencyItem.IsEnabled = IsTransparencyEnabled;
|
|
||||||
this.DeleteItem.IsEnabled = IsDeleteEnabled;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<Window
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
x:Class="IE_WPF_D3D.MaterialDlg"
|
|
||||||
x:Name="Window"
|
|
||||||
Title="Material"
|
|
||||||
Width="133" Height="181" mc:Ignorable="d">
|
|
||||||
|
|
||||||
<StackPanel Orientation="Vertical" d:LayoutOverrides="Height" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
||||||
<RadioButton Name="PlasterBtn" Content="Plaster" Checked="PlasterBtn_Checked"/>
|
|
||||||
<RadioButton Name="BrassBtn" Content="Brass" Checked="BrassBtn_Checked"/>
|
|
||||||
<RadioButton Name="BronzeBtn" Content="Bronze" Checked="BronzeBtn_Checked"/>
|
|
||||||
<RadioButton Name="CopperBtn" Content="Copper" Checked="CopperBtn_Checked"/>
|
|
||||||
<RadioButton Name="GoldBtn" Content="Gold" Checked="GoldBtn_Checked"/>
|
|
||||||
<RadioButton Name="PewterBtn" Content="Pewter" Checked="PewterBtn_Checked"/>
|
|
||||||
<RadioButton Name="PlasticBtn" Content="Plastic" Checked="PlasticBtn_Checked"/>
|
|
||||||
<RadioButton Name="SilverBtn" Content="Silver" Checked="SilverBtn_Checked"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Window>
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace IE_WPF_D3D
|
|
||||||
{
|
|
||||||
public enum Material
|
|
||||||
{
|
|
||||||
Brass,
|
|
||||||
Bronze,
|
|
||||||
Copper,
|
|
||||||
Gold,
|
|
||||||
Pewter,
|
|
||||||
Plaster,
|
|
||||||
Plastic,
|
|
||||||
Silver
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Interaction logic for MaterialDlg.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class MaterialDlg : Window
|
|
||||||
{
|
|
||||||
public MaterialDlg( OCCTProxyD3D theView )
|
|
||||||
{
|
|
||||||
this.InitializeComponent();
|
|
||||||
|
|
||||||
if ( theView == null )
|
|
||||||
{
|
|
||||||
MessageBox.Show( "Fatal Error during the graphic initialisation", "Error!" );
|
|
||||||
}
|
|
||||||
|
|
||||||
View = theView;
|
|
||||||
|
|
||||||
SetInitialState();
|
|
||||||
}
|
|
||||||
|
|
||||||
public OCCTProxyD3D View { get; private set; }
|
|
||||||
|
|
||||||
private void PlasterBtn_Checked( object sender, RoutedEventArgs e )
|
|
||||||
{
|
|
||||||
View.SetMaterial( (int)Material.Plaster );
|
|
||||||
View.UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BrassBtn_Checked( object sender, RoutedEventArgs e )
|
|
||||||
{
|
|
||||||
View.SetMaterial( (int)Material.Brass );
|
|
||||||
View.UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BronzeBtn_Checked( object sender, RoutedEventArgs e )
|
|
||||||
{
|
|
||||||
View.SetMaterial( (int)Material.Bronze );
|
|
||||||
View.UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CopperBtn_Checked( object sender, RoutedEventArgs e )
|
|
||||||
{
|
|
||||||
View.SetMaterial( (int)Material.Copper );
|
|
||||||
View.UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void GoldBtn_Checked( object sender, RoutedEventArgs e )
|
|
||||||
{
|
|
||||||
View.SetMaterial( (int)Material.Gold );
|
|
||||||
View.UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void PewterBtn_Checked( object sender, RoutedEventArgs e )
|
|
||||||
{
|
|
||||||
View.SetMaterial( (int)Material.Pewter );
|
|
||||||
View.UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void PlasticBtn_Checked( object sender, RoutedEventArgs e )
|
|
||||||
{
|
|
||||||
View.SetMaterial( (int)Material.Plastic );
|
|
||||||
View.UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SilverBtn_Checked( object sender, RoutedEventArgs e )
|
|
||||||
{
|
|
||||||
View.SetMaterial( (int)Material.Silver );
|
|
||||||
View.UpdateCurrentViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetInitialState()
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,665 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Drawing;
|
|
||||||
|
|
||||||
namespace IE_WPF_D3D
|
|
||||||
{
|
|
||||||
public enum CurrentAction3d
|
|
||||||
{
|
|
||||||
CurAction3d_Nothing,
|
|
||||||
CurAction3d_DynamicZooming,
|
|
||||||
CurAction3d_WindowZooming,
|
|
||||||
CurAction3d_DynamicPanning,
|
|
||||||
CurAction3d_GlobalPanning,
|
|
||||||
CurAction3d_DynamicRotation
|
|
||||||
}
|
|
||||||
public enum CurrentPressedKey
|
|
||||||
{
|
|
||||||
CurPressedKey_Nothing,
|
|
||||||
CurPressedKey_Ctrl,
|
|
||||||
CurPressedKey_Shift
|
|
||||||
}
|
|
||||||
public enum ModelFormat
|
|
||||||
{
|
|
||||||
BREP,
|
|
||||||
STEP,
|
|
||||||
IGES,
|
|
||||||
VRML,
|
|
||||||
STL,
|
|
||||||
IMAGE
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum DisplayMode
|
|
||||||
{
|
|
||||||
Wireframe,
|
|
||||||
Shading
|
|
||||||
}
|
|
||||||
|
|
||||||
public class OCCViewer
|
|
||||||
{
|
|
||||||
public event EventHandler ZoomingFinished;
|
|
||||||
protected void RaiseZoomingFinished ()
|
|
||||||
{
|
|
||||||
if (ZoomingFinished != null)
|
|
||||||
{
|
|
||||||
ZoomingFinished (this, EventArgs.Empty);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public event EventHandler AvaliabiltyOfOperationsChanged;
|
|
||||||
protected void RaiseAvaliabiltyOfOperationsChanged ()
|
|
||||||
{
|
|
||||||
if (AvaliabiltyOfOperationsChanged != null)
|
|
||||||
{
|
|
||||||
AvaliabiltyOfOperationsChanged (this, EventArgs.Empty);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public OCCTProxyD3D View { get; private set; }
|
|
||||||
public CurrentAction3d CurrentMode { get; private set; }
|
|
||||||
private bool IsRectVisible { get; set; }
|
|
||||||
public bool DegenerateMode { get; private set; }
|
|
||||||
|
|
||||||
public bool IsWireframeEnabled { get; private set; }
|
|
||||||
public bool IsShadingEnabled { get; private set; }
|
|
||||||
public bool IsTransparencyEnabled { get; private set; }
|
|
||||||
public bool IsColorEnabled { get; private set; }
|
|
||||||
public bool IsMaterialEnabled { get; private set; }
|
|
||||||
public bool IsDeleteEnabled { get; private set; }
|
|
||||||
|
|
||||||
private float myCurZoom;
|
|
||||||
private int myXmin;
|
|
||||||
private int myYmin;
|
|
||||||
private int myXmax;
|
|
||||||
private int myYmax;
|
|
||||||
private int myButtonDownX;
|
|
||||||
private int myButtonDownY;
|
|
||||||
public OCCViewer()
|
|
||||||
{
|
|
||||||
View = new OCCTProxyD3D ();
|
|
||||||
View.InitOCCTProxy ();
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_Nothing;
|
|
||||||
IsRectVisible = false;
|
|
||||||
DegenerateMode = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool InitViewer()
|
|
||||||
{
|
|
||||||
return View.InitViewer();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ImportModel (ModelFormat theFormat)
|
|
||||||
{
|
|
||||||
int aFormat = 10;
|
|
||||||
OpenFileDialog anOpenDialog = new OpenFileDialog ();
|
|
||||||
string aDataDir = Environment.GetEnvironmentVariable ("CSF_OCCTDataPath");
|
|
||||||
string aFilter = "";
|
|
||||||
|
|
||||||
switch (theFormat)
|
|
||||||
{
|
|
||||||
case ModelFormat.BREP:
|
|
||||||
anOpenDialog.InitialDirectory = (aDataDir + "\\occ");
|
|
||||||
aFormat = 0;
|
|
||||||
aFilter = "BREP Files (*.brep *.rle)|*.brep; *.rle";
|
|
||||||
break;
|
|
||||||
case ModelFormat.STEP:
|
|
||||||
anOpenDialog.InitialDirectory = (aDataDir + "\\step");
|
|
||||||
aFormat = 1;
|
|
||||||
aFilter = "STEP Files (*.stp *.step)|*.stp; *.step";
|
|
||||||
break;
|
|
||||||
case ModelFormat.IGES:
|
|
||||||
anOpenDialog.InitialDirectory = (aDataDir + "\\iges");
|
|
||||||
aFormat = 2;
|
|
||||||
aFilter = "IGES Files (*.igs *.iges)|*.igs; *.iges";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
anOpenDialog.Filter = aFilter + "|All files (*.*)|*.*";
|
|
||||||
if (anOpenDialog.ShowDialog () == DialogResult.OK)
|
|
||||||
{
|
|
||||||
string aFileName = anOpenDialog.FileName;
|
|
||||||
if (aFileName == "")
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!View.TranslateModel (aFileName, aFormat, true))
|
|
||||||
{
|
|
||||||
MessageBox.Show ("Can't read this file", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
View.ZoomAllView ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ExportModel (ModelFormat theFormat)
|
|
||||||
{
|
|
||||||
int aFormat = 10;
|
|
||||||
SaveFileDialog saveDialog = new SaveFileDialog ();
|
|
||||||
string aDataDir = Environment.GetEnvironmentVariable ("CSF_OCCTDataPath");
|
|
||||||
string aFilter = "";
|
|
||||||
|
|
||||||
switch (theFormat)
|
|
||||||
{
|
|
||||||
case ModelFormat.BREP:
|
|
||||||
saveDialog.InitialDirectory = (aDataDir + "\\occ");
|
|
||||||
aFormat = 0;
|
|
||||||
aFilter = "BREP Files (*.brep *.rle)|*.brep; *.rle";
|
|
||||||
break;
|
|
||||||
case ModelFormat.STEP:
|
|
||||||
saveDialog.InitialDirectory = (aDataDir + "\\step");
|
|
||||||
aFormat = 1;
|
|
||||||
aFilter = "STEP Files (*.stp *.step)|*.step; *.stp";
|
|
||||||
break;
|
|
||||||
case ModelFormat.IGES:
|
|
||||||
saveDialog.InitialDirectory = (aDataDir + "\\iges");
|
|
||||||
aFormat = 2;
|
|
||||||
aFilter = "IGES Files (*.igs *.iges)| *.iges; *.igs";
|
|
||||||
break;
|
|
||||||
case ModelFormat.VRML:
|
|
||||||
saveDialog.InitialDirectory = (aDataDir + "\\vrml");
|
|
||||||
aFormat = 3;
|
|
||||||
aFilter = "VRML Files (*.vrml)|*.vrml";
|
|
||||||
break;
|
|
||||||
case ModelFormat.STL:
|
|
||||||
saveDialog.InitialDirectory = (aDataDir + "\\stl");
|
|
||||||
aFormat = 4;
|
|
||||||
aFilter = "STL Files (*.stl)|*.stl";
|
|
||||||
break;
|
|
||||||
case ModelFormat.IMAGE:
|
|
||||||
saveDialog.InitialDirectory = (aDataDir + "\\images");
|
|
||||||
aFormat = 5;
|
|
||||||
aFilter = "Images Files (*.bmp)|*.bmp";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
saveDialog.Filter = aFilter;
|
|
||||||
if (saveDialog.ShowDialog () == DialogResult.OK)
|
|
||||||
{
|
|
||||||
string aFileName = saveDialog.FileName;
|
|
||||||
if (aFileName == "")
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!View.TranslateModel (aFileName, aFormat, false))
|
|
||||||
{
|
|
||||||
MessageBox.Show ("Can not write this file", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void FitAll ()
|
|
||||||
{
|
|
||||||
View.ZoomAllView ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ZoomWindow ()
|
|
||||||
{
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_WindowZooming;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DynamicZooming ()
|
|
||||||
{
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_DynamicZooming;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DynamicPanning ()
|
|
||||||
{
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_DynamicPanning;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void GlobalPanning ()
|
|
||||||
{
|
|
||||||
myCurZoom = View.Scale ();
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_GlobalPanning;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AxoView ()
|
|
||||||
{
|
|
||||||
View.AxoView ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void FrontView ()
|
|
||||||
{
|
|
||||||
View.FrontView ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void TopView ()
|
|
||||||
{
|
|
||||||
View.TopView ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LeftView ()
|
|
||||||
{
|
|
||||||
View.LeftView ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void BackView ()
|
|
||||||
{
|
|
||||||
View.BackView ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RightView ()
|
|
||||||
{
|
|
||||||
View.RightView ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Reset ()
|
|
||||||
{
|
|
||||||
View.Reset ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void BottomView ()
|
|
||||||
{
|
|
||||||
View.BottomView ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void HiddenOff ()
|
|
||||||
{
|
|
||||||
View.SetDegenerateModeOff ();
|
|
||||||
DegenerateMode = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void HiddenOn ()
|
|
||||||
{
|
|
||||||
View.SetDegenerateModeOn ();
|
|
||||||
DegenerateMode = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DynamicRotation ()
|
|
||||||
{
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_DynamicRotation;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectionChanged ()
|
|
||||||
{
|
|
||||||
switch (View.DisplayMode ())
|
|
||||||
{
|
|
||||||
case -1:
|
|
||||||
IsShadingEnabled = false;
|
|
||||||
IsWireframeEnabled = false;
|
|
||||||
break;
|
|
||||||
case 0:
|
|
||||||
IsWireframeEnabled = false;
|
|
||||||
IsShadingEnabled = true;
|
|
||||||
IsTransparencyEnabled = false;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
IsWireframeEnabled = true;
|
|
||||||
IsShadingEnabled = false;
|
|
||||||
IsTransparencyEnabled = true;
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
IsWireframeEnabled = true;
|
|
||||||
IsShadingEnabled = true;
|
|
||||||
IsTransparencyEnabled = true;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (View.IsObjectSelected ())
|
|
||||||
{
|
|
||||||
IsColorEnabled = true;
|
|
||||||
IsMaterialEnabled = true;
|
|
||||||
IsDeleteEnabled = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
IsColorEnabled = false;
|
|
||||||
IsMaterialEnabled = false;
|
|
||||||
IsTransparencyEnabled = false;
|
|
||||||
IsDeleteEnabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
RaiseAvaliabiltyOfOperationsChanged ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ChangeColor (bool IsObjectColor)
|
|
||||||
{
|
|
||||||
int r, g, b;
|
|
||||||
if (IsObjectColor)
|
|
||||||
{
|
|
||||||
r = View.GetObjColR ();
|
|
||||||
g = View.GetObjColG ();
|
|
||||||
b = View.GetObjColB ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
r = View.GetBGColR ();
|
|
||||||
g = View.GetBGColG ();
|
|
||||||
b = View.GetBGColB ();
|
|
||||||
}
|
|
||||||
System.Windows.Forms.ColorDialog ColDlg = new System.Windows.Forms.ColorDialog ();
|
|
||||||
ColDlg.Color = System.Drawing.Color.FromArgb (r, g, b);
|
|
||||||
if (ColDlg.ShowDialog () == System.Windows.Forms.DialogResult.OK)
|
|
||||||
{
|
|
||||||
System.Drawing.Color c = ColDlg.Color;
|
|
||||||
r = c.R;
|
|
||||||
g = c.G;
|
|
||||||
b = c.B;
|
|
||||||
if (IsObjectColor)
|
|
||||||
{
|
|
||||||
View.SetColor (r, g, b);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
View.SetBackgroundColor (r, g, b);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
View.UpdateCurrentViewer ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Wireframe ()
|
|
||||||
{
|
|
||||||
View.SetDisplayMode ((int)DisplayMode.Wireframe);
|
|
||||||
View.UpdateCurrentViewer ();
|
|
||||||
|
|
||||||
SelectionChanged ();
|
|
||||||
RaiseZoomingFinished ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Shading ()
|
|
||||||
{
|
|
||||||
View.SetDisplayMode ((int)DisplayMode.Shading);
|
|
||||||
View.UpdateCurrentViewer ();
|
|
||||||
|
|
||||||
SelectionChanged ();
|
|
||||||
RaiseZoomingFinished ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Color ()
|
|
||||||
{
|
|
||||||
ChangeColor (true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Background ()
|
|
||||||
{
|
|
||||||
ChangeColor (false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Material ()
|
|
||||||
{
|
|
||||||
MaterialDlg aDlg = new MaterialDlg (View);
|
|
||||||
aDlg.ShowDialog ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Transparency ()
|
|
||||||
{
|
|
||||||
TransparencyDialog dlg = new TransparencyDialog ();
|
|
||||||
dlg.View = View;
|
|
||||||
dlg.ShowDialog ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Delete ()
|
|
||||||
{
|
|
||||||
View.EraseObjects ();
|
|
||||||
SelectionChanged ();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void MultiDragEvent (int x, int y, int theState)
|
|
||||||
{
|
|
||||||
if (theState == -1) //mouse is down
|
|
||||||
{
|
|
||||||
myButtonDownX = x;
|
|
||||||
myButtonDownY = y;
|
|
||||||
}
|
|
||||||
else if (theState == 1) //mouse is up
|
|
||||||
{
|
|
||||||
View.ShiftSelect (Math.Min (myButtonDownX, x), Math.Min (myButtonDownY, y),
|
|
||||||
Math.Max (myButtonDownX, x), Math.Max (myButtonDownY, y));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void DragEvent (int x, int y, int theState)
|
|
||||||
{
|
|
||||||
if (theState == -1) //mouse is down
|
|
||||||
{
|
|
||||||
myButtonDownX = x;
|
|
||||||
myButtonDownY = y;
|
|
||||||
}
|
|
||||||
else if (theState == 1) //mouse is up
|
|
||||||
{
|
|
||||||
View.Select (Math.Min (myButtonDownX, x), Math.Min (myButtonDownY, y),
|
|
||||||
Math.Max (myButtonDownX, x), Math.Max (myButtonDownY, y));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnMouseDown (System.Windows.IInputElement sender, MouseButtonEventArgs e)
|
|
||||||
{
|
|
||||||
System.Windows.Controls.TabControl aTabControl = sender as System.Windows.Controls.TabControl;
|
|
||||||
System.Windows.Controls.Grid aGrid = aTabControl.SelectedContent as System.Windows.Controls.Grid;
|
|
||||||
|
|
||||||
Point p = new Point((int)e.GetPosition(aGrid).X, (int)e.GetPosition(aGrid).Y);
|
|
||||||
|
|
||||||
// to avoid the context menu opening
|
|
||||||
aTabControl.ContextMenu.Visibility = System.Windows.Visibility.Collapsed;
|
|
||||||
aTabControl.ContextMenu.IsOpen = false;
|
|
||||||
|
|
||||||
if (e.LeftButton == MouseButtonState.Pressed)
|
|
||||||
{
|
|
||||||
myXmin = p.X;
|
|
||||||
myXmax = p.X;
|
|
||||||
myYmin = p.Y;
|
|
||||||
myYmax = p.Y;
|
|
||||||
|
|
||||||
if (Keyboard.IsKeyDown (Key.LeftCtrl) || Keyboard.IsKeyDown (Key.RightCtrl))
|
|
||||||
{
|
|
||||||
// start the dynamic zooming....
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_DynamicZooming;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
switch (CurrentMode)
|
|
||||||
{
|
|
||||||
case CurrentAction3d.CurAction3d_Nothing:
|
|
||||||
if (Keyboard.IsKeyDown (Key.LeftShift) || Keyboard.IsKeyDown (Key.RightShift))
|
|
||||||
{
|
|
||||||
MultiDragEvent (myXmax, myYmax, -1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DragEvent (myXmax, myYmax, -1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case CurrentAction3d.CurAction3d_DynamicRotation:
|
|
||||||
if (!DegenerateMode)
|
|
||||||
{
|
|
||||||
View.SetDegenerateModeOn ();
|
|
||||||
}
|
|
||||||
View.StartRotation (p.X, p.Y);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.RightButton == MouseButtonState.Pressed)
|
|
||||||
{
|
|
||||||
if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
|
|
||||||
{
|
|
||||||
if (!DegenerateMode)
|
|
||||||
{
|
|
||||||
View.SetDegenerateModeOn();
|
|
||||||
}
|
|
||||||
View.StartRotation(p.X, p.Y);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// show context menu only in this case
|
|
||||||
aTabControl.ContextMenu.Visibility = System.Windows.Visibility.Visible;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnMouseUp(System.Windows.IInputElement sender, MouseButtonEventArgs e)
|
|
||||||
{
|
|
||||||
Point p = new Point((int)e.GetPosition(sender).X, (int)e.GetPosition(sender).Y);
|
|
||||||
|
|
||||||
if (e.ChangedButton == MouseButton.Left)
|
|
||||||
{
|
|
||||||
if (Keyboard.IsKeyDown (Key.LeftCtrl) || Keyboard.IsKeyDown (Key.RightCtrl))
|
|
||||||
{
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_Nothing;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
switch (CurrentMode)
|
|
||||||
{
|
|
||||||
case CurrentAction3d.CurAction3d_Nothing:
|
|
||||||
if (p.X == myXmin && p.Y == myYmin)
|
|
||||||
{
|
|
||||||
myXmax = p.X;
|
|
||||||
myYmax = p.Y;
|
|
||||||
if (Keyboard.IsKeyDown (Key.LeftShift) || Keyboard.IsKeyDown (Key.RightShift))
|
|
||||||
{
|
|
||||||
View.ShiftSelect ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
View.Select ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
myXmax = p.X;
|
|
||||||
myYmax = p.Y;
|
|
||||||
if (Keyboard.IsKeyDown (Key.LeftShift) || Keyboard.IsKeyDown (Key.RightShift))
|
|
||||||
{
|
|
||||||
MultiDragEvent (myXmax, myYmax, 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DragEvent (myXmax, myYmax, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case CurrentAction3d.CurAction3d_DynamicZooming:
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_Nothing;
|
|
||||||
break;
|
|
||||||
case CurrentAction3d.CurAction3d_WindowZooming:
|
|
||||||
myXmax = p.X;
|
|
||||||
myYmax = p.Y;
|
|
||||||
int ValZWMin = 1;
|
|
||||||
if (Math.Abs (myXmax - myXmin) > ValZWMin &&
|
|
||||||
Math.Abs (myXmax - myYmax) > ValZWMin)
|
|
||||||
{
|
|
||||||
View.WindowFitAll (myXmin, myYmin, myXmax, myYmax);
|
|
||||||
}
|
|
||||||
RaiseZoomingFinished ();
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_Nothing;
|
|
||||||
break;
|
|
||||||
case CurrentAction3d.CurAction3d_DynamicPanning:
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_Nothing;
|
|
||||||
break;
|
|
||||||
case CurrentAction3d.CurAction3d_GlobalPanning:
|
|
||||||
View.Place (p.X, p.Y, myCurZoom);
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_Nothing;
|
|
||||||
break;
|
|
||||||
case CurrentAction3d.CurAction3d_DynamicRotation:
|
|
||||||
CurrentMode = CurrentAction3d.CurAction3d_Nothing;
|
|
||||||
if (!DegenerateMode)
|
|
||||||
{
|
|
||||||
View.SetDegenerateModeOff ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
View.SetDegenerateModeOn ();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.ChangedButton == MouseButton.Right)
|
|
||||||
{
|
|
||||||
if (!DegenerateMode)
|
|
||||||
{
|
|
||||||
View.SetDegenerateModeOff ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
View.SetDegenerateModeOn ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SelectionChanged ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnMouseMove (System.Windows.IInputElement sender, System.Windows.Input.MouseEventArgs e)
|
|
||||||
{
|
|
||||||
Point p = new Point ((int)e.GetPosition (sender).X, (int)e.GetPosition (sender).Y);
|
|
||||||
|
|
||||||
if (e.LeftButton == MouseButtonState.Pressed) //left button is pressed
|
|
||||||
{
|
|
||||||
if (Keyboard.IsKeyDown (Key.LeftCtrl) || Keyboard.IsKeyDown (Key.RightCtrl))
|
|
||||||
{
|
|
||||||
View.Zoom (myXmax, myYmax, p.X, p.Y);
|
|
||||||
myXmax = p.X;
|
|
||||||
myYmax = p.Y;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
switch (CurrentMode)
|
|
||||||
{
|
|
||||||
case CurrentAction3d.CurAction3d_Nothing:
|
|
||||||
myXmax = p.X;
|
|
||||||
myYmax = p.Y;
|
|
||||||
break;
|
|
||||||
case CurrentAction3d.CurAction3d_DynamicZooming:
|
|
||||||
View.Zoom (myXmax, myYmax, p.X, p.Y);
|
|
||||||
myXmax = p.X;
|
|
||||||
myYmax = p.Y;
|
|
||||||
break;
|
|
||||||
case CurrentAction3d.CurAction3d_WindowZooming:
|
|
||||||
myXmax = p.X;
|
|
||||||
myYmax = p.Y;
|
|
||||||
break;
|
|
||||||
case CurrentAction3d.CurAction3d_DynamicPanning:
|
|
||||||
View.Pan (p.X - myXmax, myYmax - p.Y);
|
|
||||||
myXmax = p.X;
|
|
||||||
myYmax = p.Y;
|
|
||||||
break;
|
|
||||||
case CurrentAction3d.CurAction3d_GlobalPanning:
|
|
||||||
break;
|
|
||||||
case CurrentAction3d.CurAction3d_DynamicRotation:
|
|
||||||
View.Rotation (p.X, p.Y);
|
|
||||||
View.RedrawView ();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.MiddleButton == MouseButtonState.Pressed) //middle button is pressed
|
|
||||||
{
|
|
||||||
if (Keyboard.IsKeyDown (Key.LeftCtrl) || Keyboard.IsKeyDown (Key.RightCtrl))
|
|
||||||
{
|
|
||||||
View.Pan (p.X - myXmax, myYmax - p.Y);
|
|
||||||
myXmax = p.X;
|
|
||||||
myYmax = p.Y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.RightButton == MouseButtonState.Pressed) //right button is pressed
|
|
||||||
{
|
|
||||||
if (Keyboard.IsKeyDown (Key.LeftCtrl) || Keyboard.IsKeyDown (Key.RightCtrl))
|
|
||||||
{
|
|
||||||
View.Rotation (p.X, p.Y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // no buttons are pressed
|
|
||||||
{
|
|
||||||
myXmax = p.X;
|
|
||||||
myYmax = p.Y;
|
|
||||||
View.MoveTo (p.X, p.Y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
using System.Reflection;
|
|
||||||
using System.Resources;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
[assembly: AssemblyTitle("IE")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("IE")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2013")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||||
// to COM components. If you need to access a type in this assembly from
|
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
//In order to begin building localizable applications, set
|
|
||||||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
|
||||||
//inside a <PropertyGroup>. For example, if you are using US english
|
|
||||||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
|
||||||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
|
||||||
//the line below to match the UICulture setting in the project file.
|
|
||||||
|
|
||||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
|
||||||
|
|
||||||
|
|
||||||
[assembly: ThemeInfo(
|
|
||||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
|
||||||
//(used if a resource is not found in the page,
|
|
||||||
// or application resource dictionaries)
|
|
||||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
|
||||||
//(used if a resource is not found in the page,
|
|
||||||
// app, or any theme specific resource dictionaries)
|
|
||||||
)]
|
|
||||||
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
|
||||||
// by using the '*' as shown below:
|
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.18444
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace IE_WPF_D3D.Properties {
|
|
||||||
using System;
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
|
||||||
/// </summary>
|
|
||||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
|
||||||
// class via a tool like ResGen or Visual Studio.
|
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
|
||||||
// with the /str option, or rebuild your VS project.
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
internal class Resources {
|
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
|
||||||
internal Resources() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
|
||||||
get {
|
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IE_WPF_D3D.Properties.Resources", typeof(Resources).Assembly);
|
|
||||||
resourceMan = temp;
|
|
||||||
}
|
|
||||||
return resourceMan;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
|
||||||
/// resource lookups using this strongly typed resource class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
internal static global::System.Globalization.CultureInfo Culture {
|
|
||||||
get {
|
|
||||||
return resourceCulture;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
resourceCulture = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.18444
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace IE_WPF_D3D.Properties {
|
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
|
||||||
|
|
||||||
public static Settings Default {
|
|
||||||
get {
|
|
||||||
return defaultInstance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
|
||||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
|
||||||
<Profiles>
|
|
||||||
<Profile Name="(Default)" />
|
|
||||||
</Profiles>
|
|
||||||
<Settings />
|
|
||||||
</SettingsFile>
|
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Collections;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace IE_WPF_D3D
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Summary description for TransparencyDialog.
|
|
||||||
/// </summary>
|
|
||||||
public class TransparencyDialog : System.Windows.Forms.Form
|
|
||||||
{
|
|
||||||
private System.Windows.Forms.NumericUpDown MyTransparency;
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.Container components = null;
|
|
||||||
private OCCTProxyD3D myView;
|
|
||||||
|
|
||||||
public TransparencyDialog()
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// Required for Windows Form Designer support
|
|
||||||
//
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
//
|
|
||||||
// TODO: Add any constructor code after InitializeComponent call
|
|
||||||
//
|
|
||||||
myView = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing)
|
|
||||||
{
|
|
||||||
if (components != null)
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TransparencyDialog));
|
|
||||||
this.MyTransparency = new System.Windows.Forms.NumericUpDown();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.MyTransparency)).BeginInit();
|
|
||||||
this.SuspendLayout();
|
|
||||||
//
|
|
||||||
// MyTransparency
|
|
||||||
//
|
|
||||||
this.MyTransparency.Location = new System.Drawing.Point(16, 16);
|
|
||||||
this.MyTransparency.Maximum = new System.Decimal(new int[] {
|
|
||||||
10,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0});
|
|
||||||
this.MyTransparency.Name = "MyTransparency";
|
|
||||||
this.MyTransparency.Size = new System.Drawing.Size(96, 20);
|
|
||||||
this.MyTransparency.TabIndex = 0;
|
|
||||||
this.MyTransparency.ValueChanged += new System.EventHandler(this.MyTransparency_ValueChanged);
|
|
||||||
//
|
|
||||||
// TransparencyDialog
|
|
||||||
//
|
|
||||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
|
||||||
this.ClientSize = new System.Drawing.Size(128, 53);
|
|
||||||
this.Controls.Add(this.MyTransparency);
|
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
|
||||||
this.MaximizeBox = false;
|
|
||||||
this.MinimizeBox = false;
|
|
||||||
this.Name = "TransparencyDialog";
|
|
||||||
this.Text = "TransparencyDialog";
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.MyTransparency)).EndInit();
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private void MyTransparency_ValueChanged(object sender, System.EventArgs e)
|
|
||||||
{
|
|
||||||
if (this.myView == null)
|
|
||||||
return;
|
|
||||||
int transp = (int)this.MyTransparency.Value;
|
|
||||||
this.myView.SetTransparency(transp);
|
|
||||||
}
|
|
||||||
|
|
||||||
public OCCTProxyD3D View
|
|
||||||
{
|
|
||||||
set
|
|
||||||
{
|
|
||||||
this.myView = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,206 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 1.3
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">1.3</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1">this is my long string</data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
[base64 mime encoded serialized .NET Framework object]
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used forserialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>1.3</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<data name="MyTransparency.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>False</value>
|
|
||||||
</data>
|
|
||||||
<data name="MyTransparency.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>Private</value>
|
|
||||||
</data>
|
|
||||||
<data name="MyTransparency.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>Private</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>False</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>(Default)</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>False</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>False</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>8, 8</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>80</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>Private</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.Name">
|
|
||||||
<value>TransparencyDialog</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
AAABAAEAMDAAAAAAAACoDgAAFgAAACgAAAAwAAAAYAAAAAEACAAAAAAAgAoAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAMDcwADwyqYABAQEAAgICAAMDAwAERERABYW
|
|
||||||
FgAcHBwAIiIiACkpKQBVVVUATU1NAEJCQgA5OTkAgHz/AFBQ/wCTANYA/+zMAMbW7wDW5+cAkKmtAAAA
|
|
||||||
MwAAAGYAAACZAAAAzAAAMwAAADMzAAAzZgAAM5kAADPMAAAz/wAAZgAAAGYzAABmZgAAZpkAAGbMAABm
|
|
||||||
/wAAmQAAAJkzAACZZgAAmZkAAJnMAACZ/wAAzAAAAMwzAADMZgAAzJkAAMzMAADM/wAA/2YAAP+ZAAD/
|
|
||||||
zAAzAAAAMwAzADMAZgAzAJkAMwDMADMA/wAzMwAAMzMzADMzZgAzM5kAMzPMADMz/wAzZgAAM2YzADNm
|
|
||||||
ZgAzZpkAM2bMADNm/wAzmQAAM5kzADOZZgAzmZkAM5nMADOZ/wAzzAAAM8wzADPMZgAzzJkAM8zMADPM
|
|
||||||
/wAz/zMAM/9mADP/mQAz/8wAM///AGYAAABmADMAZgBmAGYAmQBmAMwAZgD/AGYzAABmMzMAZjNmAGYz
|
|
||||||
mQBmM8wAZjP/AGZmAABmZjMAZmZmAGZmmQBmZswAZpkAAGaZMwBmmWYAZpmZAGaZzABmmf8AZswAAGbM
|
|
||||||
MwBmzJkAZszMAGbM/wBm/wAAZv8zAGb/mQBm/8wAzAD/AP8AzACZmQAAmTOZAJkAmQCZAMwAmQAAAJkz
|
|
||||||
MwCZAGYAmTPMAJkA/wCZZgAAmWYzAJkzZgCZZpkAmWbMAJkz/wCZmTMAmZlmAJmZmQCZmcwAmZn/AJnM
|
|
||||||
AACZzDMAZsxmAJnMmQCZzMwAmcz/AJn/AACZ/zMAmcxmAJn/mQCZ/8wAmf//AMwAAACZADMAzABmAMwA
|
|
||||||
mQDMAMwAmTMAAMwzMwDMM2YAzDOZAMwzzADMM/8AzGYAAMxmMwCZZmYAzGaZAMxmzACZZv8AzJkAAMyZ
|
|
||||||
MwDMmWYAzJmZAMyZzADMmf8AzMwAAMzMMwDMzGYAzMyZAMzMzADMzP8AzP8AAMz/MwCZ/2YAzP+ZAMz/
|
|
||||||
zADM//8AzAAzAP8AZgD/AJkAzDMAAP8zMwD/M2YA/zOZAP8zzAD/M/8A/2YAAP9mMwDMZmYA/2aZAP9m
|
|
||||||
zADMZv8A/5kAAP+ZMwD/mWYA/5mZAP+ZzAD/mf8A/8wAAP/MMwD/zGYA/8yZAP/MzAD/zP8A//8zAMz/
|
|
||||||
ZgD//5kA///MAGZm/wBm/2YAZv//AP9mZgD/Zv8A//9mACEApQBfX18Ad3d3AIaGhgCWlpYAy8vLALKy
|
|
||||||
sgDX19cA3d3dAOPj4wDq6uoA8fHxAPj4+ADw+/8ApKCgAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
|
|
||||||
AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMT
|
|
||||||
ExMTExMTEyIiQiI8HTyCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALwDODg4Nzc4MQMdAAAA
|
|
||||||
AADDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOw4ODgyOCQAAAAdAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODIyMSIAHewAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAA7DI3MSIdCwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAADEyMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAs4JAALAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALwxJAAhAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4IgC8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAJAxJB0LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
ALwLCx0dIh0dCwATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACx0dAB0dIiIiIiId
|
|
||||||
CxMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvAsdAB0dIiQkAyQkIiIiHSIAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAIgMxMVhZmZqZAyQiHR0AAAAAkAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAvAsdISIDMThZWVmgvaCZWVIkIh0AAB0dIh0hCwALCwALtgAAAAAAAAAAAAAAAOwAAB0iMTEx
|
|
||||||
ODhYWZrDw8Ofn1hSJCIAHQAdACIAHSIkAwsdOAAAAADeExMTCwsLIiIkMTEyODg3MllZmprDw8PDwllS
|
|
||||||
MSQdHQAAAB0AIiQkAAAAvDi8AAAxAzExMTExMTI4Nzg4ODc4ODhZXpnDw8PDml1YNwMkIh0AAB0hIiQA
|
|
||||||
AAAAACIAAAA4ODc4Nzg4ODg4ODg4ODg4ODhZWV6avb2gmllZODcxJCIAAAAdIgMLAAAAACIAAACGE0+G
|
|
||||||
T4bs7Oy8vLy8vAAxODg4ODg4NzIyMSQdHQAAvADsCwAiJDExAAAAwjjsAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAALMSQAAAAAAAAAAAAAAAAAEyI4MQsiOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALMSQAAAAA
|
|
||||||
AAAAAAAAAAAAAAC8CwsAEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8AAsAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD///////8AAP///////wAA////////
|
|
||||||
AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP//
|
|
||||||
/////wAA//8AAH//AAD//wAAf/8AAP//4AP//wAA///4B///AAD///gP//8AAP///B///wAA///8H///
|
|
||||||
AAD///wf//8AAP///h///wAA///8H///AAD//+AD//8AAP//wAD//wAA//4AAD//AAD//AAAB/8AAP/w
|
|
||||||
AAAAAwAA/8AAAAABAADAAAAAADgAAMAAAAAAPAAAwAAAAAA8AADAAAAAIDgAAP///j/+AQAA///+P/+D
|
|
||||||
AAD///4///8AAP///////wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP//
|
|
||||||
/////wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<configuration>
|
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
|
||||||
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 241 B |
|
Before Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 177 B |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 283 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 283 B |
|
Before Width: | Height: | Size: 256 B |
|
Before Width: | Height: | Size: 234 B |
|
Before Width: | Height: | Size: 186 B |
|
Before Width: | Height: | Size: 262 B |
|
Before Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 199 B |
|
Before Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 231 B |