mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Compare commits
1 Commits
CR31373
...
CR0_IntSeg
Author | SHA1 | Date | |
---|---|---|---|
|
cb2e41f927 |
@@ -108,7 +108,6 @@ n BRepMesh
|
|||||||
n BRepMeshData
|
n BRepMeshData
|
||||||
n BRepOffset
|
n BRepOffset
|
||||||
n BRepOffsetAPI
|
n BRepOffsetAPI
|
||||||
n BRepPreviewAPI
|
|
||||||
n BRepPrim
|
n BRepPrim
|
||||||
n BRepPrimAPI
|
n BRepPrimAPI
|
||||||
n BRepProj
|
n BRepProj
|
||||||
|
@@ -130,9 +130,7 @@ elseif ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
|
|||||||
if (APPLE)
|
if (APPLE)
|
||||||
# CLang can be used with both libstdc++ and libc++, however on OS X libstdc++ is outdated.
|
# CLang can be used with both libstdc++ and libc++, however on OS X libstdc++ is outdated.
|
||||||
set (CMAKE_CXX_FLAGS "-std=c++0x -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
|
set (CMAKE_CXX_FLAGS "-std=c++0x -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
|
||||||
elseif(NOT WIN32)
|
else()
|
||||||
# CLang for Windows (at least CLang 8.0 distributed with VS 2019)
|
|
||||||
# does not support option "-std=c++0x"
|
|
||||||
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
|
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
@@ -7,8 +7,7 @@ if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "")
|
|||||||
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME)
|
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME)
|
||||||
|
|
||||||
if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "")
|
if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "")
|
||||||
set (3RDPARTY_QT_DIR "" CACHE PATH "The directory containing qt")
|
message (FATAL_ERROR "... Qt root directory was not found")
|
||||||
message (FATAL_ERROR "Could not find used third-party product: 3RDPARTY_QT_DIR")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Combine directory name with absolute path and show in GUI
|
# Combine directory name with absolute path and show in GUI
|
||||||
@@ -32,10 +31,4 @@ if (NOT ${Qt5_FOUND})
|
|||||||
#message (STATUS "Qt4 cmake configuration")
|
#message (STATUS "Qt4 cmake configuration")
|
||||||
else()
|
else()
|
||||||
#message (STATUS "Qt5 cmake configuration")
|
#message (STATUS "Qt5 cmake configuration")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (3RDPARTY_QT_DIR OR EXISTS "${3RDPARTY_QT_DIR}")
|
|
||||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_QT_DIR}/bin")
|
|
||||||
else()
|
|
||||||
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_QT_DLL_DIR)
|
|
||||||
endif()
|
|
@@ -82,11 +82,6 @@ if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Micr
|
|||||||
lappend ::SYS_VC_LIST "vc142-uwp"
|
lappend ::SYS_VC_LIST "vc142-uwp"
|
||||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
|
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
|
||||||
}
|
}
|
||||||
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] } {
|
|
||||||
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset ClangCL)"
|
|
||||||
lappend ::SYS_VC_LIST "vclang"
|
|
||||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
|
|
||||||
}
|
|
||||||
|
|
||||||
# detect installed Visual Studio instances from global environment
|
# detect installed Visual Studio instances from global environment
|
||||||
if { [info exists ::env(VS140COMNTOOLS)] } {
|
if { [info exists ::env(VS140COMNTOOLS)] } {
|
||||||
@@ -198,11 +193,7 @@ proc wokdep:gui:UpdateList {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if { "$::HAVE_ZLIB" == "true" } {
|
if { "$::HAVE_ZLIB" == "true" } {
|
||||||
set aCheckLib "z"
|
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "zlib" "zlib.h" "zlib" {"zlib"}
|
||||||
if { "$::tcl_platform(platform)" == "windows" } {
|
|
||||||
set aCheckLib "zlib"
|
|
||||||
}
|
|
||||||
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "zlib" "zlib.h" "$aCheckLib" {"zlib"}
|
|
||||||
}
|
}
|
||||||
if { "$::HAVE_LIBLZMA" == "true" } {
|
if { "$::HAVE_LIBLZMA" == "true" } {
|
||||||
set aCheckLib "lzma"
|
set aCheckLib "lzma"
|
||||||
|
@@ -241,11 +241,7 @@ proc wokdep:Preferred {theList theCmpl theArch} {
|
|||||||
|
|
||||||
# keep only two first digits in "vc141"
|
# keep only two first digits in "vc141"
|
||||||
if { ! [regexp {^vc[0-9][0-9]} $theCmpl aCmpl] } {
|
if { ! [regexp {^vc[0-9][0-9]} $theCmpl aCmpl] } {
|
||||||
if { [regexp {^vclang} $theCmpl] } {
|
set aCmpl $theCmpl
|
||||||
set aCmpl vc14
|
|
||||||
} else {
|
|
||||||
set aCmpl $theCmpl
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set aShortList {}
|
set aShortList {}
|
||||||
@@ -635,11 +631,7 @@ proc wokdep:SearchTBB {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
|
|||||||
|
|
||||||
# keep only two first digits in "vc141"
|
# keep only two first digits in "vc141"
|
||||||
if { ! [regexp {^vc[0-9][0-9]} ${::VCVER} aVcLib] } {
|
if { ! [regexp {^vc[0-9][0-9]} ${::VCVER} aVcLib] } {
|
||||||
if { [regexp {^vclang} ${::VCVER}] } {
|
set aVcLib ${::VCVER}
|
||||||
set aVcLib vc14
|
|
||||||
} else {
|
|
||||||
set aVcLib ${::VCVER}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set isFound "true"
|
set isFound "true"
|
||||||
|
@@ -256,7 +256,7 @@ proc genAllResources {} {
|
|||||||
|
|
||||||
# Wrapper-function to generate VS project files
|
# Wrapper-function to generate VS project files
|
||||||
proc genproj {theFormat args} {
|
proc genproj {theFormat args} {
|
||||||
set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "vclang" "cbp" "xcd" "pro"}
|
set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "cbp" "xcd" "pro"}
|
||||||
set aSupportedPlatforms { "wnt" "uwp" "lin" "mac" "ios" "qnx" }
|
set aSupportedPlatforms { "wnt" "uwp" "lin" "mac" "ios" "qnx" }
|
||||||
set isHelpRequire false
|
set isHelpRequire false
|
||||||
|
|
||||||
@@ -320,7 +320,6 @@ proc genproj {theFormat args} {
|
|||||||
vc14 - Visual Studio 2015
|
vc14 - Visual Studio 2015
|
||||||
vc141 - Visual Studio 2017
|
vc141 - Visual Studio 2017
|
||||||
vc142 - Visual Studio 2019
|
vc142 - Visual Studio 2019
|
||||||
vclang - Visual Studio with ClangCL toolset
|
|
||||||
cbp - CodeBlocks
|
cbp - CodeBlocks
|
||||||
xcd - XCode
|
xcd - XCode
|
||||||
pro - Qt Creator
|
pro - Qt Creator
|
||||||
@@ -530,8 +529,7 @@ proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl theSolution }
|
|||||||
"vc12" -
|
"vc12" -
|
||||||
"vc14" -
|
"vc14" -
|
||||||
"vc141" -
|
"vc141" -
|
||||||
"vc142" -
|
"vc142" { OS:MKVC $anOutDir $aModules $theSolution $theFormat $isUWP}
|
||||||
"vclang" { OS:MKVC $anOutDir $aModules $theSolution $theFormat $isUWP}
|
|
||||||
"cbp" { OS:MKCBP $anOutDir $aModules $theSolution $thePlatform $theCmpl }
|
"cbp" { OS:MKCBP $anOutDir $aModules $theSolution $thePlatform $theCmpl }
|
||||||
"xcd" {
|
"xcd" {
|
||||||
set ::THE_GUIDS_LIST($::aTKNullKey) "000000000000000000000000"
|
set ::THE_GUIDS_LIST($::aTKNullKey) "000000000000000000000000"
|
||||||
@@ -986,8 +984,7 @@ proc osutils:vcsolution:header { vcversion } {
|
|||||||
append var \
|
append var \
|
||||||
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
|
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
|
||||||
"# Visual Studio 2013\n"
|
"# Visual Studio 2013\n"
|
||||||
} elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" ||
|
} elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" || "$vcversion" == "vc142" } {
|
||||||
"$vcversion" == "vc142" || "$vcversion" == "vclang" } {
|
|
||||||
append var \
|
append var \
|
||||||
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
|
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
|
||||||
"# Visual Studio 14\n"
|
"# Visual Studio 14\n"
|
||||||
@@ -1228,9 +1225,6 @@ proc osutils:vcproj:readtemplate {theVcVer isUWP isExec} {
|
|||||||
} elseif { $theVcVer == "vc142" } {
|
} elseif { $theVcVer == "vc142" } {
|
||||||
set aVCRTVer "vc14"
|
set aVCRTVer "vc14"
|
||||||
set aToolset "v142"
|
set aToolset "v142"
|
||||||
} elseif { $theVcVer == "vclang" } {
|
|
||||||
set aVCRTVer "vc14"
|
|
||||||
set aToolset "ClangCL"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set what "$theVcVer"
|
set what "$theVcVer"
|
||||||
@@ -1371,7 +1365,7 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if { "$::HAVE_ZLIB" == "true" } {
|
if { "$::HAVE_ZLIB" == "true" } {
|
||||||
set aLibsMap(CSF_ZLIB) "z"
|
set aLibsMap(CSF_ZLIB) "zlib"
|
||||||
}
|
}
|
||||||
if { "$::HAVE_LIBLZMA" == "true" } {
|
if { "$::HAVE_LIBLZMA" == "true" } {
|
||||||
set aLibsMap(CSF_LIBLZMA) "liblzma"
|
set aLibsMap(CSF_LIBLZMA) "liblzma"
|
||||||
@@ -1408,10 +1402,6 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
|
|||||||
|
|
||||||
# tbb headers define different pragma lib depending on debug/release
|
# tbb headers define different pragma lib depending on debug/release
|
||||||
set aLibsMap(CSF_TBB) ""
|
set aLibsMap(CSF_TBB) ""
|
||||||
|
|
||||||
if { "$::HAVE_ZLIB" == "true" } {
|
|
||||||
set aLibsMap(CSF_ZLIB) "zlib"
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
set aLibsMap(CSF_dl) "dl"
|
set aLibsMap(CSF_dl) "dl"
|
||||||
if { "$theOS" == "mac" || "$theOS" == "ios" } {
|
if { "$theOS" == "mac" || "$theOS" == "ios" } {
|
||||||
|
@@ -77,9 +77,6 @@ if "%VCVER:~-4%" == "-uwp" (
|
|||||||
set VCLIB=%VCLIB%-uwp
|
set VCLIB=%VCLIB%-uwp
|
||||||
set VCPROP=Universal
|
set VCPROP=Universal
|
||||||
)
|
)
|
||||||
if "%VCFMT%" == "vclang" (
|
|
||||||
set VCLIB=vc14
|
|
||||||
)
|
|
||||||
rem echo VCVER=%VCVER% VCFMT=%VCFMT% VCLIB=%VCLIB% VCPROP=%VCPROP%
|
rem echo VCVER=%VCVER% VCFMT=%VCFMT% VCLIB=%VCLIB% VCPROP=%VCPROP%
|
||||||
|
|
||||||
rem ----- Parsing of Visual Studio platform -----
|
rem ----- Parsing of Visual Studio platform -----
|
||||||
@@ -109,10 +106,6 @@ if not "%DevEnvDir%" == "" (
|
|||||||
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
||||||
set "DevEnvDir=%%i\Common7\IDE\"
|
set "DevEnvDir=%%i\Common7\IDE\"
|
||||||
)
|
)
|
||||||
) else if /I "%VCFMT%" == "vclang" (
|
|
||||||
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
|
||||||
set "DevEnvDir=%%i\Common7\IDE\"
|
|
||||||
)
|
|
||||||
) else if /I "%VCFMT%" == "gcc" (
|
) else if /I "%VCFMT%" == "gcc" (
|
||||||
rem MinGW
|
rem MinGW
|
||||||
) else (
|
) else (
|
||||||
@@ -125,7 +118,6 @@ if not "%DevEnvDir%" == "" (
|
|||||||
echo vc14 = VS 2015
|
echo vc14 = VS 2015
|
||||||
echo vc141 = VS 2017
|
echo vc141 = VS 2017
|
||||||
echo vc142 = VS 2019
|
echo vc142 = VS 2019
|
||||||
echo vclang = VS 2019 with ClangCL toolset
|
|
||||||
exit /B
|
exit /B
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -155,11 +147,6 @@ if /I "%VCFMT%" == "vc9" (
|
|||||||
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
|
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
|
||||||
)
|
)
|
||||||
set "VCPlatformToolSet=v142"
|
set "VCPlatformToolSet=v142"
|
||||||
) else if /I "%VCFMT%" == "vclang" (
|
|
||||||
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
|
||||||
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
|
|
||||||
)
|
|
||||||
set "VCPlatformToolSet=ClangCL"
|
|
||||||
) else if /I "%VCFMT%" == "gcc" (
|
) else if /I "%VCFMT%" == "gcc" (
|
||||||
rem MinGW
|
rem MinGW
|
||||||
) else (
|
) else (
|
||||||
|
@@ -64,7 +64,7 @@ Then makefiles will appear in the build folder (e.g. <i> D:/occt/build-android <
|
|||||||
|
|
||||||
Alternatively one may specify the values without a toolchain file:
|
Alternatively one may specify the values without a toolchain file:
|
||||||
|
|
||||||
> cmake -G "MinGW Makefiles" -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=D:/DevTools/android-ndk-r13b -DCMAKE_ANDROID_STL_TYPE=gnustl_shared -DCMAKE_SYSTEM_VERSION=21 -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_MAKE_PROGRAM=D:/DevTools/MinGW/bin/mingw32-make.exe -D3RDPARTY_DIR=D:/occt-3rdparty D:/occt
|
> cmake -G "MinGW Makefiles" -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=D:/DevTools/android-ndk-r13b -DCMAKE_ANDROID_STL_TYPE=gnustl_shared -DCMAKE_SYSTEM_VERSION=15 -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_MAKE_PROGRAM=D:/DevTools/MinGW/bin/mingw32-make.exe -D3RDPARTY_DIR=D:/occt-3rdparty D:/occt
|
||||||
|
|
||||||
@figure{/dev_guides/building/android/images/android_image006.png}
|
@figure{/dev_guides/building/android/images/android_image006.png}
|
||||||
|
|
||||||
|
@@ -150,8 +150,7 @@ Steps to prepare dump of the object into json:
|
|||||||
1. Create method <b>DumpJson</b>. The method should accept the output stream and the depth for the fields dump.
|
1. Create method <b>DumpJson</b>. The method should accept the output stream and the depth for the fields dump.
|
||||||
Depth, equal to zero means that only fields of this class should be dumped. Default value -1 means that whole tree of dump will be built recursively calling dump of all fields.
|
Depth, equal to zero means that only fields of this class should be dumped. Default value -1 means that whole tree of dump will be built recursively calling dump of all fields.
|
||||||
|
|
||||||
2. Put into the first row of the method <b>OCCT_DUMP_CLASS_BEGIN</b> or <b>OCCT_DUMP_TRANSIENT_CLASS_BEGIN</b> (for Standard_Transient objects).
|
2. Put into the first row of the method <b>OCCT_DUMP_CLASS_BEGIN</b>. This macro creates a local variable, that will open Json structure on start, and close on exit from this method.
|
||||||
This macro appends class name into output stream.
|
|
||||||
|
|
||||||
3. Add several macro to store field values.
|
3. Add several macro to store field values.
|
||||||
|
|
||||||
@@ -369,53 +368,3 @@ Each counter has its name shown when the collected statistics are printed.
|
|||||||
In DRAW, use command *dperf* to print all performance statistics.
|
In DRAW, use command *dperf* to print all performance statistics.
|
||||||
|
|
||||||
Note that performance counters are not thread-safe.
|
Note that performance counters are not thread-safe.
|
||||||
|
|
||||||
@section occt_debug_sanitizers Use of compiler sanitizers
|
|
||||||
|
|
||||||
GCC and Clang compilers provide options for instrumenting the code with the tools intended for detection of run-time errors, called sanitizers.
|
|
||||||
This section provides some hints for using sanitizers for detecting possible errors in OCCT code.
|
|
||||||
|
|
||||||
@subsection occt_debug_sanitizers_linux Linux
|
|
||||||
|
|
||||||
Example of configuration steps for Ubuntu:
|
|
||||||
|
|
||||||
1. In CMake configuration:
|
|
||||||
|
|
||||||
- Use up-to-date version of the GCC or CLang compiler; make sure that if CMAKE_CXX_COMPILER is set to C++ compiler (e.g. "clang++-6.0") and CMAKE_C_COMPILER is set to C compiler (e.g. "clang-6.0")
|
|
||||||
- Ensure that CMAKE_LINKER is set to the C++ linker bundled with compiler (e.g. clang++-6.0); this is important to avoid linking problems
|
|
||||||
- For building with Address sanitizer, set CMAKE_CXX_FLAGS and CMAKE_C_FLAGS to "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls"
|
|
||||||
- For building with Undefined Behavior sanitizer, set CMAKE_CXX_FLAGS and CMAKE_C_FLAGS to "-fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls"
|
|
||||||
- Set CMAKE_BUILD_TYPE to RelWithDebInfo to get more informative stack traces on errors
|
|
||||||
|
|
||||||
2. Build as usual (make)
|
|
||||||
|
|
||||||
Be prepared that it works much slower than normal build and consumes more disk space.
|
|
||||||
|
|
||||||
3. Before running executable, make sure that "llvm-symbolizer" is in PATH; this is necessary to get human-readable stack traces. The tool must have exactly that name.
|
|
||||||
|
|
||||||
If it is installed in common folder (/usr/bin or similar) with different name, one option is to create a symlink, for instance:
|
|
||||||
> sudo ln -s /usr/bin/llvm-symbolizer-6.0 /usr/bin/llvm-symbolizer
|
|
||||||
|
|
||||||
Alternatively, add directory where actual llvm-symbolizer is located (such as /usr/lib/llvm-6.0/bin) to the PATH variable.
|
|
||||||
|
|
||||||
4. Set environment variable to disable memory leaks detection (they seem to be reported for every global variable at exit, not much useful):
|
|
||||||
> export ASAN_OPTIONS=detect_leaks=0
|
|
||||||
|
|
||||||
5. Set environment variable CSF_CPULIMIT_FACTOR to reasonably large number to increase the time limits for program execution (used by OCCT tests) to compensate the performance penalty introduced by sanitizers:
|
|
||||||
> export CSF_CPULIMIT_FACTOR=20
|
|
||||||
|
|
||||||
6. When using UBSan, set environment variable UBSAN_OPTIONS to get stack traces:
|
|
||||||
> export UBSAN_OPTIONS=print_stacktrace=1
|
|
||||||
|
|
||||||
7. Run DRAW and perform tests as usual, keeping in mind that running with sanitizer is much heavier than normal build:
|
|
||||||
> ./draw.sh relwithdeb <br>
|
|
||||||
> Draw[]> testgrid -parallel 0
|
|
||||||
|
|
||||||
Note that when running tests under sanitizers, behavior may be different.
|
|
||||||
Known problems (as of CLang 6.0) are:
|
|
||||||
- Software signals (access violation etc.) are not handled
|
|
||||||
- Heap memory usage always reports zero
|
|
||||||
|
|
||||||
@subsection occt_debug_sanitizers_windows Windows
|
|
||||||
|
|
||||||
Though CLang toolset is available in Visual Studio 2015 and newer, sanitizer do not seem to be available out of the box (last tested with VS 2019 16.2.3).
|
|
||||||
|
@@ -1888,7 +1888,3 @@ Unexpected const-ness of Aspect_Window::DoResize() method has been removed, so t
|
|||||||
@subsection upgrade_750_rename Renaming of types
|
@subsection upgrade_750_rename Renaming of types
|
||||||
|
|
||||||
Enumeration BRepOffset_Type is renamed to ChFiDS_TypeOfConcavity.
|
Enumeration BRepOffset_Type is renamed to ChFiDS_TypeOfConcavity.
|
||||||
|
|
||||||
@subsection upgrade_750_sensitiveEntity Select3D_SensitiveEntity interface change
|
|
||||||
|
|
||||||
The method Select3D_SensitiveEntity::NbSubElements() has been changed to be constant. Select3D_SensitiveEntity subclasses at application level should be updated accordingly.
|
|
||||||
|
@@ -210,7 +210,7 @@ for which OCCT is certified to work.
|
|||||||
|
|
||||||
| OS | Compiler |
|
| OS | Compiler |
|
||||||
| --------- | ----------- |
|
| --------- | ----------- |
|
||||||
| Windows | Microsoft Visual Studio: 2008 SP1, 2010 SP1, 2012 Update 4, 2013 Update 5, 2015 Update 3, 2017 <sup>1</sup>, 2019 <br>, LLVM (ClangCL), GCC 4.3+ (Mingw-w64)|
|
| Windows | Microsoft Visual Studio: 2008 SP1, 2010 SP1, 2012 Update 4, 2013 Update 5, 2015 Update 3, 2017 <sup>1</sup>, 2019 <br> GCC 4.3+ (Mingw-w64)|
|
||||||
| Linux | GNU gcc 4.3+ <br> LLVM CLang 3.6+ |
|
| Linux | GNU gcc 4.3+ <br> LLVM CLang 3.6+ |
|
||||||
| OS X / macOS | XCode 6 or newer |
|
| OS X / macOS | XCode 6 or newer |
|
||||||
| Android | NDK r10, GNU gcc 4.8 or newer |
|
| Android | NDK r10, GNU gcc 4.8 or newer |
|
||||||
|
@@ -86,7 +86,7 @@ sage " Fusion of this prism with the original part "
|
|||||||
sage " fuse result rr result"
|
sage " fuse result rr result"
|
||||||
sage " "
|
sage " "
|
||||||
fuse result rr result
|
fuse result rr result
|
||||||
donly result
|
donl result
|
||||||
nexplode result f
|
nexplode result f
|
||||||
erase result
|
erase result
|
||||||
fit
|
fit
|
||||||
@@ -108,13 +108,13 @@ ttranslate cyl cyl 0 7.5 0
|
|||||||
sage " Display the Shape on Hidden Line Mode "
|
sage " Display the Shape on Hidden Line Mode "
|
||||||
sage " hlr hid r"
|
sage " hlr hid r"
|
||||||
sage ""
|
sage ""
|
||||||
donly r
|
donl r
|
||||||
hlr hid r
|
hlr hid r
|
||||||
sage " Display the Shape on HLR Mode "
|
sage " Display the Shape on HLR Mode "
|
||||||
sage " hlr nohid r"
|
sage " hlr nohid r"
|
||||||
sage " hlr hlr r"
|
sage " hlr hlr r"
|
||||||
sage ""
|
sage ""
|
||||||
donly r
|
donl r
|
||||||
hlr nohid r
|
hlr nohid r
|
||||||
hlr hlr r
|
hlr hlr r
|
||||||
sage "Demo completed"
|
sage "Demo completed"
|
||||||
|
@@ -57,10 +57,11 @@ for {set i 0} {$i < 12} {incr i} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Configure light sources
|
# Configure light sources
|
||||||
vlight -change 0 -head 0
|
vlight del 1
|
||||||
vlight -change 0 -direction -0.25 -1 -1
|
vlight change 0 head 0
|
||||||
vlight -change 0 -sm 0.3
|
vlight change 0 direction -0.25 -1 -1
|
||||||
vlight -change 0 -int 10.0
|
vlight change 0 sm 0.3
|
||||||
|
vlight change 0 int 10
|
||||||
|
|
||||||
# Load environment map
|
# Load environment map
|
||||||
vtextureenv on 1
|
vtextureenv on 1
|
||||||
|
@@ -12,8 +12,11 @@ vinit name=View1 w=512 h=512
|
|||||||
vglinfo
|
vglinfo
|
||||||
|
|
||||||
# setup light sources
|
# setup light sources
|
||||||
vlight -clear
|
vlight del 0
|
||||||
vlight -add positional -head 0 -pos 0.5 0.5 0.85 -sm 0.06 -int 30.0
|
vlight del 1
|
||||||
|
vlight add positional head 0 pos 0.5 0.5 0.85
|
||||||
|
vlight change 0 sm 0.06
|
||||||
|
vlight change 0 int 30.0
|
||||||
|
|
||||||
vvbo 0
|
vvbo 0
|
||||||
vsetdispmode 1
|
vsetdispmode 1
|
||||||
|
@@ -208,9 +208,8 @@ vviewparams -eye 139.412 -1.62643 178.037
|
|||||||
vviewparams -size 170.508
|
vviewparams -size 170.508
|
||||||
|
|
||||||
# Restore light source parameters
|
# Restore light source parameters
|
||||||
vlight -clear
|
vlight clear
|
||||||
vlight -add ambient
|
vlight add directional direction -0.303949 -0.434084 -0.848048 smoothness 0.3 intensity 12
|
||||||
vlight -add directional -direction -0.303949 -0.434084 -0.848048 -smoothness 0.3 -intensity 12
|
|
||||||
|
|
||||||
# Load environment map
|
# Load environment map
|
||||||
vtextureenv on 1
|
vtextureenv on 1
|
||||||
|
@@ -1,91 +0,0 @@
|
|||||||
# Script demonstrating PBR metallic-roughness material properties
|
|
||||||
#Category: Visualization
|
|
||||||
#Title: PBR metallic-rougness spheres
|
|
||||||
|
|
||||||
pload XDE OCAF MODELING VISUALIZATION
|
|
||||||
psphere s 0.35
|
|
||||||
|
|
||||||
catch { Close D }
|
|
||||||
XNewDoc D
|
|
||||||
|
|
||||||
# grid of spheres
|
|
||||||
set THE_UPPER 6
|
|
||||||
foreach i [list 0 3] {
|
|
||||||
set aPrefix ""
|
|
||||||
set aColor "GRAY80"
|
|
||||||
if { $i != 0 } {
|
|
||||||
set aPrefix "g_";
|
|
||||||
set aColor "CCB11D"
|
|
||||||
}
|
|
||||||
set aColShapes {}
|
|
||||||
for { set m 0 } { $m <= $THE_UPPER } { incr m } {
|
|
||||||
set aRowShapes {}
|
|
||||||
for { set r 0 } { $r <= $THE_UPPER } { incr r } {
|
|
||||||
set aName ${aPrefix}m${m}r${r}
|
|
||||||
copy s $aName
|
|
||||||
lappend aRowShapes $aName
|
|
||||||
ttranslate $aName ${r} ${i} ${m}
|
|
||||||
}
|
|
||||||
set aName ${aPrefix}m${m}
|
|
||||||
compound {*}$aRowShapes $aName
|
|
||||||
lappend aColShapes $aName
|
|
||||||
}
|
|
||||||
set aName ${aPrefix}spheres
|
|
||||||
compound {*}$aColShapes $aName
|
|
||||||
set aLabName "Gray Spheres"
|
|
||||||
if { $i != 0 } { set aLabName "Golden Spheres" }
|
|
||||||
set aLabComp [XAddShape D $aName 0]
|
|
||||||
SetName D $aLabComp $aLabName
|
|
||||||
|
|
||||||
for { set m 0 } { $m <= $THE_UPPER } { incr m } {
|
|
||||||
set aMet [expr 100 * ${m}/$THE_UPPER]
|
|
||||||
set aName ${aPrefix}m${m}
|
|
||||||
XAddComponent D $aLabComp $aName
|
|
||||||
set aLabCompCol [XFindShape D $aName]
|
|
||||||
SetName D $aLabCompCol "${aPrefix}m${aMet}%"
|
|
||||||
SetName D {*}[XFindComponent D $aName] "${aPrefix}m${aMet}%"
|
|
||||||
for { set r 0 } { $r <= $THE_UPPER } { incr r } {
|
|
||||||
set aRoug [expr 100 * ${r}/$THE_UPPER]
|
|
||||||
set aName ${aPrefix}m${m}r${r}
|
|
||||||
XAddComponent D $aLabCompCol $aName
|
|
||||||
set aLab [XFindComponent D $aName]
|
|
||||||
SetName D {*}$aLab "${aPrefix}m${aMet}%_r${aRoug}%"
|
|
||||||
XAddVisMaterial D $aName -baseColor $aColor -metallic ${m}/$THE_UPPER -roughness ${r}/$THE_UPPER
|
|
||||||
XSetVisMaterial D {*}$aLab $aName
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set aLab [XFindShape D s]
|
|
||||||
SetName D {*}$aLab "Sphere"
|
|
||||||
|
|
||||||
XGetAllVisMaterials D
|
|
||||||
|
|
||||||
# labels
|
|
||||||
text2brep tm "Metal" -plane 0 -1 0 0 0 -1 -height 0.5 -pos -0.5 0 6.5 -halign left -valign top -font monospace
|
|
||||||
text2brep tnm "Non-metal" -plane 0 -1 0 0 0 -1 -height 0.5 -pos -0.5 0 -0.5 -halign right -valign top -font monospace
|
|
||||||
text2brep ts "Smooth" -plane 0 -1 0 1 0 0 -height 0.5 -pos -0.5 0 -0.5 -halign left -valign top -font monospace
|
|
||||||
text2brep tr "Rough" -plane 0 -1 0 1 0 0 -height 0.5 -pos 6.5 0 -0.5 -halign right -valign top -font monospace
|
|
||||||
compound tm tnm ts tr labs
|
|
||||||
set aLab [XAddShape D labs 0]
|
|
||||||
SetName D $aLab "Labels"
|
|
||||||
XAddComponent D $aLab tm
|
|
||||||
XAddComponent D $aLab tnm
|
|
||||||
XAddComponent D $aLab ts
|
|
||||||
XAddComponent D $aLab tr
|
|
||||||
SetName D {*}[XFindComponent D tm] "Metal"
|
|
||||||
SetName D [XFindShape D tm] "Metal"
|
|
||||||
SetName D {*}[XFindComponent D tnm] "Non-metal"
|
|
||||||
SetName D [XFindShape D tnm] "Non-metal"
|
|
||||||
SetName D {*}[XFindComponent D ts] "Smooth"
|
|
||||||
SetName D [XFindShape D ts] "Smooth"
|
|
||||||
SetName D {*}[XFindComponent D tr] "Rough"
|
|
||||||
SetName D [XFindShape D tr] "Rough"
|
|
||||||
|
|
||||||
vclear
|
|
||||||
vinit View1 -width 768 -height 768
|
|
||||||
vfront
|
|
||||||
vrenderparams -shadingModel PBR
|
|
||||||
vlight -change 0 -intensity 2.5
|
|
||||||
XDisplay -dispMode 1 D
|
|
||||||
vcamera -ortho
|
|
||||||
vfit
|
|
@@ -52,14 +52,6 @@ namespace
|
|||||||
return aDevicePixelRatio;
|
return aDevicePixelRatio;
|
||||||
});
|
});
|
||||||
|
|
||||||
/*EM_JS(void, jsSetOcctCamera, (float theFOV, float theAspect, float theNear, float theFar), {
|
|
||||||
setOcctCamera();
|
|
||||||
});*/
|
|
||||||
|
|
||||||
EM_JS(void, jsPostFrameRender, (), {
|
|
||||||
postFrameRender();
|
|
||||||
});
|
|
||||||
|
|
||||||
//! Return cavas size in pixels.
|
//! Return cavas size in pixels.
|
||||||
static Graphic3d_Vec2i jsCanvasSize()
|
static Graphic3d_Vec2i jsCanvasSize()
|
||||||
{
|
{
|
||||||
@@ -344,13 +336,7 @@ void WasmOcctView::handleViewRedraw (const Handle(AIS_InteractiveContext)& theCt
|
|||||||
const Handle(V3d_View)& theView)
|
const Handle(V3d_View)& theView)
|
||||||
{
|
{
|
||||||
myUpdateRequests = 0;
|
myUpdateRequests = 0;
|
||||||
|
|
||||||
theView->Invalidate(); /// Three.js cannot be rendered properly without full redraw
|
|
||||||
glEnable (GL_POLYGON_OFFSET_FILL); /// reset defaults Graphic3d_PolygonOffset after Three.js
|
|
||||||
glPolygonOffset (1.0f, 1.0f);
|
|
||||||
|
|
||||||
AIS_ViewController::handleViewRedraw (theCtx, theView);
|
AIS_ViewController::handleViewRedraw (theCtx, theView);
|
||||||
jsPostFrameRender();
|
|
||||||
if (myToAskNextFrame)
|
if (myToAskNextFrame)
|
||||||
{
|
{
|
||||||
// ask more frames
|
// ask more frames
|
||||||
|
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include <Message.hxx>
|
#include <Message.hxx>
|
||||||
#include <Message_Messenger.hxx>
|
#include <Message_Messenger.hxx>
|
||||||
#include <Message_PrinterSystemLog.hxx>
|
|
||||||
#include <OSD_MemInfo.hxx>
|
#include <OSD_MemInfo.hxx>
|
||||||
#include <OSD_Parallel.hxx>
|
#include <OSD_Parallel.hxx>
|
||||||
|
|
||||||
@@ -57,8 +56,6 @@ static void onFileReadFailed (void* theOpaque)
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
Message::DefaultMessenger()->Printers().First()->SetTraceLevel (Message_Trace);
|
Message::DefaultMessenger()->Printers().First()->SetTraceLevel (Message_Trace);
|
||||||
Handle(Message_PrinterSystemLog) aJSConsolePrinter = new Message_PrinterSystemLog ("webgl-sample", Message_Trace);
|
|
||||||
Message::DefaultMessenger()->AddPrinter (aJSConsolePrinter); // open JavaScript console within the Browser to see this output
|
|
||||||
Message::DefaultMessenger()->Send (TCollection_AsciiString("NbLogicalProcessors: ") + OSD_Parallel::NbLogicalProcessors(), Message_Trace);
|
Message::DefaultMessenger()->Send (TCollection_AsciiString("NbLogicalProcessors: ") + OSD_Parallel::NbLogicalProcessors(), Message_Trace);
|
||||||
aViewer.run();
|
aViewer.run();
|
||||||
Message::DefaultMessenger()->Send (OSD_MemInfo::PrintInfo(), Message_Trace);
|
Message::DefaultMessenger()->Send (OSD_MemInfo::PrintInfo(), Message_Trace);
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
<div><label for="fileInput">Choose BREP file to upload: </label><input type="file" id="fileInput" accept=".brep"></div>
|
<div><label for="fileInput">Choose BREP file to upload: </label><input type="file" id="fileInput" accept=".brep"></div>
|
||||||
<h4>Console output:</h4>
|
<h4>Console output:</h4>
|
||||||
<p id="output"></p>
|
<p id="output"></p>
|
||||||
<script src="three.min.js"></script>
|
|
||||||
<script>
|
<script>
|
||||||
//! Resize canvas to fit into window.
|
//! Resize canvas to fit into window.
|
||||||
function updateCanvasSize()
|
function updateCanvasSize()
|
||||||
@@ -58,7 +57,6 @@ if (!isWasmSupported())
|
|||||||
{
|
{
|
||||||
var anElement = document.getElementById('output');
|
var anElement = document.getElementById('output');
|
||||||
anElement.innerHTML += "Browser is too old - WebAssembly support is missing!<br>Please check updates or install a modern browser.<br>";
|
anElement.innerHTML += "Browser is too old - WebAssembly support is missing!<br>Please check updates or install a modern browser.<br>";
|
||||||
throw new Error();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Define OCCT WebGL Viewer module.
|
//! Define OCCT WebGL Viewer module.
|
||||||
@@ -78,44 +76,6 @@ var Module =
|
|||||||
})()
|
})()
|
||||||
};
|
};
|
||||||
|
|
||||||
var aCanvas = document.getElementById ('canvas');
|
|
||||||
var aGlCtx = aCanvas.getContext ('webgl2', { alpha: false, depth: true, antialias: false, preserveDrawingBuffer: true } );
|
|
||||||
if (aGlCtx == null)
|
|
||||||
{
|
|
||||||
aGlCtx = aCanvas.getContext ('webgl', { alpha: false, depth: true, antialias: false, preserveDrawingBuffer: true } );
|
|
||||||
}
|
|
||||||
var aScene = new THREE.Scene();
|
|
||||||
var aCamera = new THREE.PerspectiveCamera (75, window.innerWidth / window.innerHeight);
|
|
||||||
//var aRenderer = new THREE.WebGLRenderer ({antialias: true});
|
|
||||||
var aRenderer = new THREE.WebGLRenderer ({antialias: false, canvas: aCanvas, context: aGlCtx});
|
|
||||||
aRenderer.autoClear = false;
|
|
||||||
aRenderer.autoClearColor = false;
|
|
||||||
aRenderer.autoClearDepth = false;
|
|
||||||
aRenderer.autoClearStencil = false;
|
|
||||||
aRenderer.setSize (window.innerWidth,window.innerHeight);
|
|
||||||
//document.body.appendChild (aRenderer.domElement);
|
|
||||||
var aGeom = new THREE.BoxGeometry (1,1,1);
|
|
||||||
var aMat = new THREE.MeshBasicMaterial ({color: 0xff0000});
|
|
||||||
var aCube = new THREE.Mesh (aGeom, aMat);
|
|
||||||
aScene.add (aCube);
|
|
||||||
aCube.position.z = -5; aCube.rotation.x = 10; aCube.rotation.y = 5;
|
|
||||||
/*aRenderer.render (aScene, aCamera);
|
|
||||||
var anAnimate = function(){
|
|
||||||
aCube.rotation.x += 0.01;
|
|
||||||
aRenderer.state.reset();
|
|
||||||
aRenderer.render (aScene, aCamera);
|
|
||||||
requestAnimationFrame (anAnimate);
|
|
||||||
}
|
|
||||||
anAnimate();*/
|
|
||||||
|
|
||||||
function postFrameRender()
|
|
||||||
{
|
|
||||||
//console.log("postFrameRender()"); ///
|
|
||||||
//aCamera.
|
|
||||||
aRenderer.state.reset();
|
|
||||||
aRenderer.render (aScene, aCamera)
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Handle file uploading.
|
//! Handle file uploading.
|
||||||
fileInput.onchange = function()
|
fileInput.onchange = function()
|
||||||
{
|
{
|
||||||
|
@@ -197,7 +197,7 @@ void AIS_Circle::UnsetColor()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Quantity_Color CC = Quantity_NOC_YELLOW;
|
Quantity_Color CC = Quantity_NOC_YELLOW;;
|
||||||
if( HasColor() ) CC = myDrawer->Color();
|
if( HasColor() ) CC = myDrawer->Color();
|
||||||
else if (myDrawer->HasLink()) AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
|
else if (myDrawer->HasLink()) AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
|
||||||
myDrawer->LineAspect()->SetColor(CC);
|
myDrawer->LineAspect()->SetColor(CC);
|
||||||
|
@@ -300,7 +300,7 @@ void AIS_FixRelation::ComputeVertex(const TopoDS_Vertex& /*FixVertex*/,
|
|||||||
gp_Pln pln(myPlane->Pln());
|
gp_Pln pln(myPlane->Pln());
|
||||||
gp_Dir dir(pln.XAxis().Direction());
|
gp_Dir dir(pln.XAxis().Direction());
|
||||||
gp_Vec transvec = gp_Vec(dir)*myArrowSize;
|
gp_Vec transvec = gp_Vec(dir)*myArrowSize;
|
||||||
curpos = myPntAttach.Translated(transvec);
|
curpos = myPntAttach.Translated(transvec);;
|
||||||
myPosition = curpos;
|
myPosition = curpos;
|
||||||
myAutomaticPosition = Standard_True;
|
myAutomaticPosition = Standard_True;
|
||||||
}
|
}
|
||||||
|
@@ -65,7 +65,7 @@ public:
|
|||||||
|
|
||||||
//! Returns true if the Interactive Objects in the relation
|
//! Returns true if the Interactive Objects in the relation
|
||||||
//! are movable.
|
//! are movable.
|
||||||
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; }
|
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! computes the presentation according to a point of view
|
//! computes the presentation according to a point of view
|
||||||
//! given by <aProjector>.
|
//! given by <aProjector>.
|
||||||
@@ -109,4 +109,6 @@ private:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#include <AIS_FixRelation.lxx>
|
||||||
|
|
||||||
#endif // _AIS_FixRelation_HeaderFile
|
#endif // _AIS_FixRelation_HeaderFile
|
||||||
|
24
src/AIS/AIS_FixRelation.lxx
Normal file
24
src/AIS/AIS_FixRelation.lxx
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
// Created on: 1997-02-28
|
||||||
|
// Created by: Jean-Pierre COMBE
|
||||||
|
// Copyright (c) 1997-1999 Matra Datavision
|
||||||
|
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// This file is part of Open CASCADE Technology software library.
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify it under
|
||||||
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||||
|
// by the Free Software Foundation, with special exception defined in the file
|
||||||
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||||
|
// distribution for complete text of the license and disclaimer of any warranty.
|
||||||
|
//
|
||||||
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsMovable
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
inline Standard_Boolean AIS_FixRelation::IsMovable() const
|
||||||
|
{
|
||||||
|
return Standard_True;
|
||||||
|
}
|
@@ -92,7 +92,7 @@ Aspect_TypeOfLine AIS_GraphicTool::GetLineType (const Handle(Prs3d_Drawer)& Dr,
|
|||||||
const AIS_TypeOfAttribute Att)
|
const AIS_TypeOfAttribute Att)
|
||||||
{
|
{
|
||||||
Handle(Prs3d_LineAspect) LA = GetLineAspect(Dr,Att);
|
Handle(Prs3d_LineAspect) LA = GetLineAspect(Dr,Att);
|
||||||
return LA->Aspect()->Type();
|
return LA->Aspect()->Type();;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -560,7 +560,7 @@ void AIS_IdenticRelation::ComputeTwoLinesPresentation(const Handle(Prs3d_Present
|
|||||||
gp_Pln pln(myPlane->Pln());
|
gp_Pln pln(myPlane->Pln());
|
||||||
gp_Dir dir(pln.XAxis().Direction());
|
gp_Dir dir(pln.XAxis().Direction());
|
||||||
gp_Vec transvec = gp_Vec(dir)*myArrowSize;
|
gp_Vec transvec = gp_Vec(dir)*myArrowSize;
|
||||||
curpos = myFAttach.Translated(transvec);
|
curpos = myFAttach.Translated(transvec);;
|
||||||
myPosition = curpos;
|
myPosition = curpos;
|
||||||
myAutomaticPosition = Standard_True;
|
myAutomaticPosition = Standard_True;
|
||||||
}
|
}
|
||||||
|
@@ -58,7 +58,7 @@ public:
|
|||||||
void ClearUsers() { myUsers.Clear(); }
|
void ClearUsers() { myUsers.Clear(); }
|
||||||
|
|
||||||
//! Returns true if the interactive object is movable.
|
//! Returns true if the interactive object is movable.
|
||||||
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; }
|
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! computes the presentation according to a point of view
|
//! computes the presentation according to a point of view
|
||||||
//! given by <aProjector>.
|
//! given by <aProjector>.
|
||||||
@@ -134,4 +134,11 @@ private:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#include <AIS_IdenticRelation.lxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _AIS_IdenticRelation_HeaderFile
|
#endif // _AIS_IdenticRelation_HeaderFile
|
||||||
|
24
src/AIS/AIS_IdenticRelation.lxx
Normal file
24
src/AIS/AIS_IdenticRelation.lxx
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
// Created on: 1997-03-04
|
||||||
|
// Created by: Jean-Pierre COMBE
|
||||||
|
// Copyright (c) 1997-1999 Matra Datavision
|
||||||
|
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// This file is part of Open CASCADE Technology software library.
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify it under
|
||||||
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||||
|
// by the Free Software Foundation, with special exception defined in the file
|
||||||
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||||
|
// distribution for complete text of the license and disclaimer of any warranty.
|
||||||
|
//
|
||||||
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsMovable
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
inline Standard_Boolean AIS_IdenticRelation::IsMovable() const
|
||||||
|
{
|
||||||
|
return Standard_True;
|
||||||
|
}
|
@@ -65,15 +65,13 @@ namespace
|
|||||||
typedef NCollection_DataMap<Handle(SelectMgr_SelectableObject), Handle(SelectMgr_IndexedMapOfOwner)>::Iterator AIS_MapIteratorOfMapOfObjectOwners;
|
typedef NCollection_DataMap<Handle(SelectMgr_SelectableObject), Handle(SelectMgr_IndexedMapOfOwner)>::Iterator AIS_MapIteratorOfMapOfObjectOwners;
|
||||||
|
|
||||||
//! Initialize default highlighting attributes.
|
//! Initialize default highlighting attributes.
|
||||||
static void initDefaultHilightAttributes (const Handle(Prs3d_Drawer)& theDrawer,
|
static void initDefaultHilightAttributes (const Handle(Prs3d_Drawer)& theDrawer)
|
||||||
const Quantity_Color& theColor)
|
|
||||||
{
|
{
|
||||||
theDrawer->SetMethod (Aspect_TOHM_COLOR);
|
theDrawer->SetMethod (Aspect_TOHM_COLOR);
|
||||||
theDrawer->SetDisplayMode (0);
|
theDrawer->SetDisplayMode (0);
|
||||||
theDrawer->SetColor (theColor);
|
|
||||||
|
|
||||||
theDrawer->SetupOwnShadingAspect();
|
theDrawer->SetPointAspect (new Prs3d_PointAspect (Aspect_TOM_POINT, Quantity_NOC_BLACK, 1.0));
|
||||||
theDrawer->SetupOwnPointAspect();
|
*theDrawer->PointAspect()->Aspect() = *theDrawer->Link()->PointAspect()->Aspect();
|
||||||
theDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0));
|
theDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0));
|
||||||
*theDrawer->LineAspect()->Aspect() = *theDrawer->Link()->LineAspect()->Aspect();
|
*theDrawer->LineAspect()->Aspect() = *theDrawer->Link()->LineAspect()->Aspect();
|
||||||
theDrawer->SetWireAspect (new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0));
|
theDrawer->SetWireAspect (new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0));
|
||||||
@@ -84,24 +82,6 @@ namespace
|
|||||||
*theDrawer->FreeBoundaryAspect()->Aspect() = *theDrawer->Link()->FreeBoundaryAspect()->Aspect();
|
*theDrawer->FreeBoundaryAspect()->Aspect() = *theDrawer->Link()->FreeBoundaryAspect()->Aspect();
|
||||||
theDrawer->SetUnFreeBoundaryAspect (new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0));
|
theDrawer->SetUnFreeBoundaryAspect (new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0));
|
||||||
*theDrawer->UnFreeBoundaryAspect()->Aspect() = *theDrawer->Link()->UnFreeBoundaryAspect()->Aspect();
|
*theDrawer->UnFreeBoundaryAspect()->Aspect() = *theDrawer->Link()->UnFreeBoundaryAspect()->Aspect();
|
||||||
theDrawer->SetDatumAspect (new Prs3d_DatumAspect());
|
|
||||||
|
|
||||||
theDrawer->ShadingAspect()->SetColor (theColor);
|
|
||||||
theDrawer->WireAspect()->SetColor (theColor);
|
|
||||||
theDrawer->LineAspect()->SetColor (theColor);
|
|
||||||
theDrawer->PlaneAspect()->ArrowAspect()->SetColor (theColor);
|
|
||||||
theDrawer->PlaneAspect()->IsoAspect()->SetColor (theColor);
|
|
||||||
theDrawer->PlaneAspect()->EdgesAspect()->SetColor (theColor);
|
|
||||||
theDrawer->FreeBoundaryAspect()->SetColor (theColor);
|
|
||||||
theDrawer->UnFreeBoundaryAspect()->SetColor (theColor);
|
|
||||||
theDrawer->PointAspect()->SetColor (theColor);
|
|
||||||
for (Standard_Integer aPartIter = 0; aPartIter < Prs3d_DP_None; ++aPartIter)
|
|
||||||
{
|
|
||||||
if (Handle(Prs3d_LineAspect) aLineAsp = theDrawer->DatumAspect()->LineAspect ((Prs3d_DatumParts )aPartIter))
|
|
||||||
{
|
|
||||||
aLineAsp->SetColor (theColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
theDrawer->WireAspect()->SetWidth (2.0);
|
theDrawer->WireAspect()->SetWidth (2.0);
|
||||||
theDrawer->LineAspect()->SetWidth (2.0);
|
theDrawer->LineAspect()->SetWidth (2.0);
|
||||||
@@ -150,26 +130,30 @@ myIsAutoActivateSelMode(Standard_True)
|
|||||||
{
|
{
|
||||||
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_Dynamic];
|
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_Dynamic];
|
||||||
aStyle->Link (myDefaultDrawer);
|
aStyle->Link (myDefaultDrawer);
|
||||||
initDefaultHilightAttributes (aStyle, Quantity_NOC_CYAN1);
|
initDefaultHilightAttributes (aStyle);
|
||||||
aStyle->SetZLayer(Graphic3d_ZLayerId_Top);
|
aStyle->SetZLayer(Graphic3d_ZLayerId_Top);
|
||||||
|
aStyle->SetColor (Quantity_NOC_CYAN1);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_LocalDynamic];
|
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_LocalDynamic];
|
||||||
aStyle->Link (myDefaultDrawer);
|
aStyle->Link (myDefaultDrawer);
|
||||||
initDefaultHilightAttributes (aStyle, Quantity_NOC_CYAN1);
|
initDefaultHilightAttributes (aStyle);
|
||||||
aStyle->SetZLayer(Graphic3d_ZLayerId_Topmost);
|
aStyle->SetZLayer(Graphic3d_ZLayerId_Topmost);
|
||||||
|
aStyle->SetColor (Quantity_NOC_CYAN1);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_Selected];
|
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_Selected];
|
||||||
aStyle->Link (myDefaultDrawer);
|
aStyle->Link (myDefaultDrawer);
|
||||||
initDefaultHilightAttributes (aStyle, Quantity_NOC_GRAY80);
|
initDefaultHilightAttributes (aStyle);
|
||||||
aStyle->SetZLayer(Graphic3d_ZLayerId_UNKNOWN);
|
aStyle->SetZLayer(Graphic3d_ZLayerId_UNKNOWN);
|
||||||
|
aStyle->SetColor (Quantity_NOC_GRAY80);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_LocalSelected];
|
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_LocalSelected];
|
||||||
aStyle->Link (myDefaultDrawer);
|
aStyle->Link (myDefaultDrawer);
|
||||||
initDefaultHilightAttributes (aStyle, Quantity_NOC_GRAY80);
|
initDefaultHilightAttributes (aStyle);
|
||||||
aStyle->SetZLayer(Graphic3d_ZLayerId_UNKNOWN);
|
aStyle->SetZLayer(Graphic3d_ZLayerId_UNKNOWN);
|
||||||
|
aStyle->SetColor (Quantity_NOC_GRAY80);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_SubIntensity];
|
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_SubIntensity];
|
||||||
|
@@ -1216,9 +1216,6 @@ public: //! @name sub-intensity management (deprecated)
|
|||||||
//! @param theSelection an instance of the selection
|
//! @param theSelection an instance of the selection
|
||||||
void SetSelection (const Handle(AIS_Selection)& theSelection) { mySelection = theSelection; }
|
void SetSelection (const Handle(AIS_Selection)& theSelection) { mySelection = theSelection; }
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
|
|
||||||
|
|
||||||
protected: //! @name internal methods
|
protected: //! @name internal methods
|
||||||
|
|
||||||
Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const;
|
Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const;
|
||||||
|
@@ -86,42 +86,3 @@ void AIS_InteractiveContext::PolygonOffsets(
|
|||||||
anObj->PolygonOffsets( aMode, aFactor, aUnits );
|
anObj->PolygonOffsets( aMode, aFactor, aUnits );
|
||||||
}
|
}
|
||||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void AIS_InteractiveContext::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myObjects.Size())
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mgrSelector.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainPM.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainVwr.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainSel.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastActiveView)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastPicked.get())
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToHilightSelected)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mySelection.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myFilters.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myDefaultDrawer.get())
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_Selected])
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_Dynamic])
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_LocalSelected])
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_LocalDynamic])
|
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_SubIntensity])
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedSeq.Size())
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurDetected)
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurHighlighted)
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPickingStrategy)
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAutoHilight)
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAutoActivateSelMode)
|
|
||||||
}
|
|
||||||
|
@@ -148,11 +148,11 @@ void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& theAspect
|
|||||||
//function : DumpJson
|
//function : DumpJson
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void AIS_InteractiveObject::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
void AIS_InteractiveObject::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
|
||||||
{
|
{
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
OCCT_DUMP_CLASS_BEGIN (theOStream, AIS_InteractiveObject);
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_SelectableObject)
|
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_SelectableObject);
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCTXPtr)
|
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCTXPtr);
|
||||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOwner)
|
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOwner);
|
||||||
}
|
}
|
||||||
|
@@ -119,7 +119,7 @@ public:
|
|||||||
Standard_EXPORT void SetAspect (const Handle(Prs3d_BasicAspect)& anAspect);
|
Standard_EXPORT void SetAspect (const Handle(Prs3d_BasicAspect)& anAspect);
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
//! Dumps the content of me into the stream
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
//! The TypeOfPresention3d means that the interactive object
|
//! The TypeOfPresention3d means that the interactive object
|
||||||
|
@@ -30,8 +30,7 @@
|
|||||||
#include <V3d_View.hxx>
|
#include <V3d_View.hxx>
|
||||||
#include <Standard_Version.hxx>
|
#include <Standard_Version.hxx>
|
||||||
#include <Standard_DefineHandle.hxx>
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
NCOLLECTION_HSEQUENCE(AIS_ManipulatorObjectSequence, Handle(AIS_InteractiveObject));
|
||||||
NCOLLECTION_HSEQUENCE(AIS_ManipulatorObjectSequence, Handle(AIS_InteractiveObject))
|
|
||||||
|
|
||||||
DEFINE_STANDARD_HANDLE (AIS_Manipulator, AIS_InteractiveObject)
|
DEFINE_STANDARD_HANDLE (AIS_Manipulator, AIS_InteractiveObject)
|
||||||
|
|
||||||
|
@@ -168,7 +168,7 @@ void AIS_OffsetDimension::ComputeSelection(const Handle(SelectMgr_Selection)& aS
|
|||||||
gp_Pnt myTSAttach = mySAttach.Transformed (myRelativePos);
|
gp_Pnt myTSAttach = mySAttach.Transformed (myRelativePos);
|
||||||
gp_Dir myTDirAttach = myDirAttach.Transformed (myRelativePos);
|
gp_Dir myTDirAttach = myDirAttach.Transformed (myRelativePos);
|
||||||
gp_Dir myTDirAttach2 = myDirAttach2.Transformed (myRelativePos);
|
gp_Dir myTDirAttach2 = myDirAttach2.Transformed (myRelativePos);
|
||||||
gp_Pnt Tcurpos = myPosition.Transformed (myRelativePos);
|
gp_Pnt Tcurpos = myPosition.Transformed (myRelativePos);;
|
||||||
|
|
||||||
gp_Lin L1 (myTFAttach,myTDirAttach);
|
gp_Lin L1 (myTFAttach,myTDirAttach);
|
||||||
gp_Lin L2 (myTSAttach,myTDirAttach2);
|
gp_Lin L2 (myTSAttach,myTDirAttach2);
|
||||||
|
@@ -990,19 +990,3 @@ Standard_Boolean AIS_Shape::OwnHLRDeviationAngle ( Standard_Real & anAngle,
|
|||||||
aPreviousAngle = myDrawer->PreviousHLRDeviationAngle ();
|
aPreviousAngle = myDrawer->PreviousHLRDeviationAngle ();
|
||||||
return myDrawer->HasOwnHLRDeviationAngle();
|
return myDrawer->HasOwnHLRDeviationAngle();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void AIS_Shape::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, AIS_InteractiveObject)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myshape)
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBB)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myInitAng)
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCompBB)
|
|
||||||
}
|
|
||||||
|
@@ -325,9 +325,6 @@ public:
|
|||||||
const TopoDS_Shape& theShape,
|
const TopoDS_Shape& theShape,
|
||||||
const Handle(Prs3d_Drawer)& theDrawer);
|
const Handle(Prs3d_Drawer)& theDrawer);
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
TopoDS_Shape myshape; //!< shape to display
|
TopoDS_Shape myshape; //!< shape to display
|
||||||
|
@@ -32,7 +32,6 @@
|
|||||||
#include <Prs3d_DatumAspect.hxx>
|
#include <Prs3d_DatumAspect.hxx>
|
||||||
#include <Prs3d_Drawer.hxx>
|
#include <Prs3d_Drawer.hxx>
|
||||||
#include <Prs3d_LineAspect.hxx>
|
#include <Prs3d_LineAspect.hxx>
|
||||||
#include <Prs3d_PointAspect.hxx>
|
|
||||||
#include <Prs3d_Presentation.hxx>
|
#include <Prs3d_Presentation.hxx>
|
||||||
#include <Prs3d_Projector.hxx>
|
#include <Prs3d_Projector.hxx>
|
||||||
#include <Prs3d_ShadingAspect.hxx>
|
#include <Prs3d_ShadingAspect.hxx>
|
||||||
@@ -60,8 +59,6 @@ AIS_Trihedron::AIS_Trihedron (const Handle(Geom_Axis2Placement)& theComponent)
|
|||||||
myTrihDispMode (Prs3d_DM_WireFrame),
|
myTrihDispMode (Prs3d_DM_WireFrame),
|
||||||
myComponent (theComponent)
|
myComponent (theComponent)
|
||||||
{
|
{
|
||||||
myAutoHilight = Standard_False;
|
|
||||||
|
|
||||||
// selection priorities
|
// selection priorities
|
||||||
mySelectionPriority.Bind (Prs3d_DP_None, 5); // complete triedron: priority 5 (same as faces)
|
mySelectionPriority.Bind (Prs3d_DP_None, 5); // complete triedron: priority 5 (same as faces)
|
||||||
mySelectionPriority.Bind (Prs3d_DP_Origin, 8); // origin: priority 8
|
mySelectionPriority.Bind (Prs3d_DP_Origin, 8); // origin: priority 8
|
||||||
@@ -73,7 +70,6 @@ AIS_Trihedron::AIS_Trihedron (const Handle(Geom_Axis2Placement)& theComponent)
|
|||||||
{
|
{
|
||||||
mySelectionPriority.Bind ((Prs3d_DatumParts )aPartIter, 5); // planes: priority: 5
|
mySelectionPriority.Bind ((Prs3d_DatumParts )aPartIter, 5); // planes: priority: 5
|
||||||
}
|
}
|
||||||
myHiddenLineAspect = new Graphic3d_AspectLine3d (Quantity_NOC_WHITE, Aspect_TOL_EMPTY, 1.0f);
|
|
||||||
|
|
||||||
// trihedron labels
|
// trihedron labels
|
||||||
myLabel.Bind (Prs3d_DP_XAxis, "X");
|
myLabel.Bind (Prs3d_DP_XAxis, "X");
|
||||||
@@ -139,6 +135,7 @@ void AIS_Trihedron::SetSize(const Standard_Real aValue)
|
|||||||
myDrawer->DatumAspect()->SetAxisLength(aValue, aValue, aValue);
|
myDrawer->DatumAspect()->SetAxisLength(aValue, aValue, aValue);
|
||||||
|
|
||||||
SetToUpdate();
|
SetToUpdate();
|
||||||
|
UpdatePresentations();
|
||||||
UpdateSelection();
|
UpdateSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,6 +163,7 @@ void AIS_Trihedron::UnsetSize()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetToUpdate();
|
SetToUpdate();
|
||||||
|
UpdatePresentations();
|
||||||
}
|
}
|
||||||
UpdateSelection();
|
UpdateSelection();
|
||||||
}
|
}
|
||||||
@@ -312,37 +310,36 @@ void AIS_Trihedron::HilightOwnerWithColor (const Handle(PrsMgr_PresentationManag
|
|||||||
aPresentation->Clear();
|
aPresentation->Clear();
|
||||||
const Prs3d_DatumParts aPart = anOwner->DatumPart();
|
const Prs3d_DatumParts aPart = anOwner->DatumPart();
|
||||||
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (aPresentation);
|
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (aPresentation);
|
||||||
|
Handle(Prs3d_DatumAspect) anAspect = myDrawer->DatumAspect();
|
||||||
if (aPart >= Prs3d_DP_XOYAxis && aPart <= Prs3d_DP_XOZAxis)
|
if (aPart >= Prs3d_DP_XOYAxis && aPart <= Prs3d_DP_XOZAxis)
|
||||||
{
|
{
|
||||||
// planes selection is equal in both shading and wireframe mode
|
// planes selection is equal in both shading and wireframe mode
|
||||||
aGroup->SetGroupPrimitivesAspect (theStyle->LineAspect()->Aspect());
|
aGroup->SetGroupPrimitivesAspect (getHighlightLineAspect()->Aspect());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (myTrihDispMode == Prs3d_DM_Shaded)
|
if (myTrihDispMode == Prs3d_DM_Shaded)
|
||||||
{
|
{
|
||||||
aGroup->SetGroupPrimitivesAspect (theStyle->ShadingAspect()->Aspect());
|
aGroup->SetGroupPrimitivesAspect (anAspect->ShadingAspect(aPart)->Aspect());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (aPart == Prs3d_DP_Origin)
|
if (aPart == Prs3d_DP_Origin)
|
||||||
{
|
{
|
||||||
aGroup->SetGroupPrimitivesAspect (theStyle->PointAspect()->Aspect());
|
aGroup->SetGroupPrimitivesAspect (getHighlightPointAspect()->Aspect());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aGroup->SetGroupPrimitivesAspect(theStyle->LineAspect()->Aspect());
|
aGroup->SetGroupPrimitivesAspect (anAspect->LineAspect(aPart)->Aspect());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aGroup->AddPrimitiveArray (arrayOfPrimitives(aPart));
|
aGroup->AddPrimitiveArray (arrayOfPrimitives(aPart));
|
||||||
|
|
||||||
const Graphic3d_ZLayerId aLayer = theStyle->ZLayer() != Graphic3d_ZLayerId_UNKNOWN ? theStyle->ZLayer() : myDrawer->ZLayer();
|
if (aPresentation->GetZLayer() != theStyle->ZLayer())
|
||||||
if (aPresentation->GetZLayer() != aLayer)
|
|
||||||
{
|
{
|
||||||
aPresentation->SetZLayer (aLayer);
|
aPresentation->SetZLayer (theStyle->ZLayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
aPresentation->Highlight (theStyle);
|
aPresentation->Highlight (theStyle);
|
||||||
thePM->AddToImmediateList (aPresentation);
|
thePM->AddToImmediateList (aPresentation);
|
||||||
}
|
}
|
||||||
@@ -359,22 +356,25 @@ void AIS_Trihedron::HilightSelected (const Handle(PrsMgr_PresentationManager3d)&
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Handle(Prs3d_DatumAspect) anAspect = myDrawer->DatumAspect();
|
||||||
const bool isShadingMode = myTrihDispMode == Prs3d_DM_Shaded;
|
const bool isShadingMode = myTrihDispMode == Prs3d_DM_Shaded;
|
||||||
|
|
||||||
Handle(Prs3d_Drawer) anAspect = !myHilightDrawer.IsNull() ? myHilightDrawer : GetContext()->SelectionStyle();
|
const Handle(Prs3d_Drawer)& aContextSelStyle = GetContext()->SelectionStyle();
|
||||||
|
const Quantity_Color& aSelectionColor = aContextSelStyle->Color();
|
||||||
for (SelectMgr_SequenceOfOwner::Iterator anIterator (theOwners); anIterator.More(); anIterator.Next())
|
for (SelectMgr_SequenceOfOwner::Iterator anIterator (theOwners); anIterator.More(); anIterator.Next())
|
||||||
{
|
{
|
||||||
const Handle(SelectMgr_EntityOwner)& anOwner = anIterator.Value();
|
const Handle(SelectMgr_EntityOwner)& anOwner = anIterator.Value();
|
||||||
Handle(AIS_TrihedronOwner) aTrihedronOwner = Handle(AIS_TrihedronOwner)::DownCast(anOwner);
|
Handle(AIS_TrihedronOwner) aTrihedronOwner = Handle(AIS_TrihedronOwner)::DownCast(anOwner);
|
||||||
if (aTrihedronOwner.IsNull())
|
if (aTrihedronOwner.IsNull())
|
||||||
{
|
{
|
||||||
thePM->Color (this, anAspect, 0);
|
thePM->Color (this, aContextSelStyle, 0);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Prs3d_DatumParts aPart = aTrihedronOwner->DatumPart();
|
const Prs3d_DatumParts aPart = aTrihedronOwner->DatumPart();
|
||||||
Handle(Graphic3d_Group) aGroup;
|
Handle(Graphic3d_Group) aGroup;
|
||||||
if (mySelectedParts.Contains (aPart) || !myPartToGroup.Find (aPart, aGroup))
|
if (mySelectedParts.Contains (aPart)
|
||||||
|
|| !myPartToGroup.Find (aPart, aGroup))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -382,23 +382,27 @@ void AIS_Trihedron::HilightSelected (const Handle(PrsMgr_PresentationManager3d)&
|
|||||||
if (aPart >= Prs3d_DP_XOYAxis
|
if (aPart >= Prs3d_DP_XOYAxis
|
||||||
&& aPart <= Prs3d_DP_XOZAxis)
|
&& aPart <= Prs3d_DP_XOZAxis)
|
||||||
{
|
{
|
||||||
aGroup->SetGroupPrimitivesAspect (anAspect->LineAspect()->Aspect());
|
getHighlightLineAspect()->SetColor (aSelectionColor);
|
||||||
|
aGroup->SetGroupPrimitivesAspect (getHighlightLineAspect()->Aspect());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (isShadingMode)
|
if (isShadingMode)
|
||||||
{
|
{
|
||||||
aGroup->SetGroupPrimitivesAspect (anAspect->ShadingAspect()->Aspect());
|
getHighlightAspect()->SetColor (aSelectionColor);
|
||||||
|
aGroup->SetGroupPrimitivesAspect (getHighlightAspect()->Aspect());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (aPart == Prs3d_DP_Origin)
|
if (aPart == Prs3d_DP_Origin)
|
||||||
{
|
{
|
||||||
aGroup->SetGroupPrimitivesAspect (anAspect->PointAspect()->Aspect());
|
getHighlightPointAspect()->SetColor (aSelectionColor);
|
||||||
|
aGroup->SetGroupPrimitivesAspect (getHighlightPointAspect()->Aspect());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aGroup->SetGroupPrimitivesAspect (anAspect->LineAspect()->Aspect());
|
getHighlightLineAspect()->SetColor (aSelectionColor);
|
||||||
|
aGroup->SetGroupPrimitivesAspect (getHighlightLineAspect()->Aspect());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -422,9 +426,9 @@ void AIS_Trihedron::ClearSelected()
|
|||||||
if (aPart >= Prs3d_DP_XOYAxis
|
if (aPart >= Prs3d_DP_XOYAxis
|
||||||
&& aPart <= Prs3d_DP_XOZAxis)
|
&& aPart <= Prs3d_DP_XOZAxis)
|
||||||
{
|
{
|
||||||
aGroup->SetGroupPrimitivesAspect (myHiddenLineAspect);
|
aGroup->SetGroupPrimitivesAspect (anAspect->LineAspect (aPart)->Aspect());
|
||||||
}
|
}
|
||||||
else if (isShadingMode)
|
if (isShadingMode)
|
||||||
{
|
{
|
||||||
aGroup->SetGroupPrimitivesAspect (anAspect->ShadingAspect (aPart)->Aspect());
|
aGroup->SetGroupPrimitivesAspect (anAspect->ShadingAspect (aPart)->Aspect());
|
||||||
}
|
}
|
||||||
@@ -549,8 +553,11 @@ void AIS_Trihedron::computePresentation (const Handle(PrsMgr_PresentationManager
|
|||||||
Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePrs);
|
Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePrs);
|
||||||
myPartToGroup.Bind (aPart, aGroup);
|
myPartToGroup.Bind (aPart, aGroup);
|
||||||
|
|
||||||
|
const Handle(Graphic3d_AspectLine3d)& aLineAspect = anAspect->LineAspect (aPart)->Aspect();
|
||||||
|
aLineAspect->SetType (Aspect_TOL_EMPTY);
|
||||||
|
|
||||||
aGroup->AddPrimitiveArray (arrayOfPrimitives (aPart));
|
aGroup->AddPrimitiveArray (arrayOfPrimitives (aPart));
|
||||||
aGroup->SetGroupPrimitivesAspect (myHiddenLineAspect);
|
aGroup->SetGroupPrimitivesAspect (aLineAspect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -927,19 +934,64 @@ void AIS_Trihedron::updatePrimitives(const Handle(Prs3d_DatumAspect)& theAspect,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
// =======================================================================
|
||||||
//function : DumpJson
|
// function : getHighlightAspect
|
||||||
//purpose :
|
// purpose :
|
||||||
//=======================================================================
|
// =======================================================================
|
||||||
void AIS_Trihedron::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
Handle(Prs3d_ShadingAspect) AIS_Trihedron::getHighlightAspect()
|
||||||
{
|
{
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
if (!myHighlightAspect.IsNull())
|
||||||
|
return myHighlightAspect;
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, AIS_InteractiveObject)
|
Quantity_Color aHighlightColor = Quantity_NOC_GRAY80;
|
||||||
|
if (!myHilightDrawer.IsNull())
|
||||||
|
aHighlightColor = myHilightDrawer->Color();
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnSize)
|
myHighlightAspect = new Prs3d_ShadingAspect();
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnTextColor)
|
myHighlightAspect->Aspect()->SetInteriorStyle (Aspect_IS_SOLID);
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnArrowColor)
|
myHighlightAspect->SetColor (aHighlightColor);
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDatumAspect)
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTrihDispMode)
|
Graphic3d_MaterialAspect aHighlightMaterial;
|
||||||
|
aHighlightMaterial.SetColor (aHighlightColor);
|
||||||
|
myHighlightAspect->SetMaterial (aHighlightMaterial);
|
||||||
|
|
||||||
|
return myHighlightAspect;
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : getHighlightLineAspect
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Handle(Prs3d_LineAspect) AIS_Trihedron::getHighlightLineAspect()
|
||||||
|
{
|
||||||
|
if (!myHighlightLineAspect.IsNull())
|
||||||
|
return myHighlightLineAspect;
|
||||||
|
|
||||||
|
Quantity_Color aHighlightColor = Quantity_NOC_GRAY80;
|
||||||
|
if (!myHilightDrawer.IsNull())
|
||||||
|
aHighlightColor = myHilightDrawer->Color();
|
||||||
|
|
||||||
|
Handle(Prs3d_DatumAspect) aDatumAspect = Attributes()->DatumAspect();
|
||||||
|
Handle(Prs3d_LineAspect) aLineAspect = aDatumAspect->LineAspect(Prs3d_DP_XAxis);
|
||||||
|
myHighlightLineAspect = new Prs3d_LineAspect (aHighlightColor, aLineAspect->Aspect()->Type(),
|
||||||
|
aLineAspect->Aspect()->Width());
|
||||||
|
|
||||||
|
return myHighlightLineAspect;
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : getHighlightPointAspect
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Handle(Prs3d_PointAspect) AIS_Trihedron::getHighlightPointAspect()
|
||||||
|
{
|
||||||
|
if (!myHighlightPointAspect.IsNull())
|
||||||
|
return myHighlightPointAspect;
|
||||||
|
|
||||||
|
Quantity_Color aHighlightColor = Quantity_NOC_GRAY80;
|
||||||
|
if (!myHilightDrawer.IsNull())
|
||||||
|
aHighlightColor = myHilightDrawer->Color();
|
||||||
|
myHighlightPointAspect = new Prs3d_PointAspect (Aspect_TOM_PLUS, aHighlightColor, 1.0);
|
||||||
|
|
||||||
|
return myHighlightPointAspect;
|
||||||
}
|
}
|
||||||
|
@@ -186,6 +186,9 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//! Disables auto highlighting to use HilightSelected() and HilightOwnerWithColor() overridden methods.
|
||||||
|
virtual Standard_Boolean IsAutoHilight() const Standard_OVERRIDE { return false; }
|
||||||
|
|
||||||
//! Method which clear all selected owners belonging
|
//! Method which clear all selected owners belonging
|
||||||
//! to this selectable object ( for fast presentation draw ).
|
//! to this selectable object ( for fast presentation draw ).
|
||||||
Standard_EXPORT virtual void ClearSelected() Standard_OVERRIDE;
|
Standard_EXPORT virtual void ClearSelected() Standard_OVERRIDE;
|
||||||
@@ -219,9 +222,6 @@ protected:
|
|||||||
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
|
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
|
||||||
const Standard_Integer theMode) Standard_OVERRIDE;
|
const Standard_Integer theMode) Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
//! Creates a sensitive entity for the datum part that will be used in selection owner creation.
|
//! Creates a sensitive entity for the datum part that will be used in selection owner creation.
|
||||||
@@ -248,6 +248,13 @@ protected:
|
|||||||
const gp_Dir& theYDir,
|
const gp_Dir& theYDir,
|
||||||
const gp_Dir& theZDir);
|
const gp_Dir& theZDir);
|
||||||
|
|
||||||
|
//! Returns highlight line aspect , create if it is the first call
|
||||||
|
Handle(Prs3d_ShadingAspect) getHighlightAspect();
|
||||||
|
//! Returns highlight line aspect , create if it is the first call
|
||||||
|
Handle(Prs3d_LineAspect) getHighlightLineAspect();
|
||||||
|
//! Returns highlight line aspect , create if it is the first call
|
||||||
|
Handle(Prs3d_PointAspect) getHighlightPointAspect();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Standard_Boolean myHasOwnSize;
|
Standard_Boolean myHasOwnSize;
|
||||||
Standard_Boolean myHasOwnTextColor;
|
Standard_Boolean myHasOwnTextColor;
|
||||||
@@ -262,7 +269,10 @@ protected:
|
|||||||
|
|
||||||
NCollection_DataMap<Prs3d_DatumParts, Handle(Graphic3d_Group)> myPartToGroup;
|
NCollection_DataMap<Prs3d_DatumParts, Handle(Graphic3d_Group)> myPartToGroup;
|
||||||
NCollection_List<Prs3d_DatumParts> mySelectedParts;
|
NCollection_List<Prs3d_DatumParts> mySelectedParts;
|
||||||
Handle(Graphic3d_AspectLine3d) myHiddenLineAspect;
|
|
||||||
|
Handle(Prs3d_ShadingAspect) myHighlightAspect;
|
||||||
|
Handle(Prs3d_LineAspect) myHighlightLineAspect;
|
||||||
|
Handle(Prs3d_PointAspect) myHighlightPointAspect;
|
||||||
|
|
||||||
NCollection_DataMap<Prs3d_DatumParts, Handle(Graphic3d_ArrayOfPrimitives)> myPrimitives;
|
NCollection_DataMap<Prs3d_DatumParts, Handle(Graphic3d_ArrayOfPrimitives)> myPrimitives;
|
||||||
};
|
};
|
||||||
|
@@ -113,15 +113,6 @@ AIS_ViewController::AIS_ViewController()
|
|||||||
myMouseGestureMap.Bind (Aspect_VKeyMouse_MiddleButton | Aspect_VKeyFlags_CTRL, AIS_MouseGesture_Pan);
|
myMouseGestureMap.Bind (Aspect_VKeyMouse_MiddleButton | Aspect_VKeyFlags_CTRL, AIS_MouseGesture_Pan);
|
||||||
}
|
}
|
||||||
|
|
||||||
// =======================================================================
|
|
||||||
// function : ~AIS_ViewController
|
|
||||||
// purpose :
|
|
||||||
// =======================================================================
|
|
||||||
AIS_ViewController::~AIS_ViewController()
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
// function : ResetViewInput
|
// function : ResetViewInput
|
||||||
// purpose :
|
// purpose :
|
||||||
|
@@ -51,9 +51,6 @@ public:
|
|||||||
//! Empty constructor.
|
//! Empty constructor.
|
||||||
Standard_EXPORT AIS_ViewController();
|
Standard_EXPORT AIS_ViewController();
|
||||||
|
|
||||||
//! Destructor.
|
|
||||||
Standard_EXPORT virtual ~AIS_ViewController();
|
|
||||||
|
|
||||||
//! Return input buffer.
|
//! Return input buffer.
|
||||||
const AIS_ViewInputBuffer& InputBuffer (AIS_ViewInputBufferType theType) const { return theType == AIS_ViewInputBufferType_UI ? myUI : myGL; }
|
const AIS_ViewInputBuffer& InputBuffer (AIS_ViewInputBufferType theType) const { return theType == AIS_ViewInputBufferType_UI ? myUI : myGL; }
|
||||||
|
|
||||||
|
@@ -69,12 +69,14 @@ AIS_ExclusionFilter.hxx
|
|||||||
AIS_ExclusionFilter.lxx
|
AIS_ExclusionFilter.lxx
|
||||||
AIS_FixRelation.cxx
|
AIS_FixRelation.cxx
|
||||||
AIS_FixRelation.hxx
|
AIS_FixRelation.hxx
|
||||||
|
AIS_FixRelation.lxx
|
||||||
AIS_GlobalStatus.cxx
|
AIS_GlobalStatus.cxx
|
||||||
AIS_GlobalStatus.hxx
|
AIS_GlobalStatus.hxx
|
||||||
AIS_GraphicTool.cxx
|
AIS_GraphicTool.cxx
|
||||||
AIS_GraphicTool.hxx
|
AIS_GraphicTool.hxx
|
||||||
AIS_IdenticRelation.cxx
|
AIS_IdenticRelation.cxx
|
||||||
AIS_IdenticRelation.hxx
|
AIS_IdenticRelation.hxx
|
||||||
|
AIS_IdenticRelation.lxx
|
||||||
AIS_IndexedDataMapOfOwnerPrs.hxx
|
AIS_IndexedDataMapOfOwnerPrs.hxx
|
||||||
AIS_InteractiveContext.cxx
|
AIS_InteractiveContext.cxx
|
||||||
AIS_InteractiveContext.hxx
|
AIS_InteractiveContext.hxx
|
||||||
|
@@ -530,7 +530,7 @@ gp_Circ2d Adaptor2d_OffsetCurve::Circle() const
|
|||||||
gp_Elips2d Adaptor2d_OffsetCurve::Ellipse() const
|
gp_Elips2d Adaptor2d_OffsetCurve::Ellipse() const
|
||||||
{
|
{
|
||||||
if (myCurve->GetType() == GeomAbs_Ellipse && myOffset == 0.) {
|
if (myCurve->GetType() == GeomAbs_Ellipse && myOffset == 0.) {
|
||||||
return myCurve->Ellipse();
|
return myCurve->Ellipse();;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw Standard_NoSuchObject("Adaptor2d_OffsetCurve:Ellipse");
|
throw Standard_NoSuchObject("Adaptor2d_OffsetCurve:Ellipse");
|
||||||
@@ -656,16 +656,19 @@ static Standard_Integer nbPoints(const Handle(Adaptor2d_HCurve2d)& theCurve)
|
|||||||
|
|
||||||
Standard_Integer nbs = 20;
|
Standard_Integer nbs = 20;
|
||||||
|
|
||||||
if (theCurve->GetType() == GeomAbs_BezierCurve)
|
if (theCurve->GetType() == GeomAbs_Line)
|
||||||
|
nbs = 2;
|
||||||
|
else if (theCurve->GetType() == GeomAbs_BezierCurve)
|
||||||
{
|
{
|
||||||
nbs = Max(nbs, 3 + theCurve->NbPoles());
|
nbs = 3 + theCurve->NbPoles();
|
||||||
}
|
}
|
||||||
else if (theCurve->GetType() == GeomAbs_BSplineCurve) {
|
else if (theCurve->GetType() == GeomAbs_BSplineCurve) {
|
||||||
nbs = Max(nbs, theCurve->NbKnots() * theCurve->Degree());
|
nbs = theCurve->NbKnots();
|
||||||
|
nbs *= theCurve->Degree();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nbs > 300)
|
if (nbs > 200)
|
||||||
nbs = 300;
|
nbs = 200;
|
||||||
return nbs;
|
return nbs;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -540,7 +540,7 @@ Standard_Boolean Adaptor3d_TopolTool::IsThePointOn(const gp_Pnt2d& P,
|
|||||||
if (surumin || survmin || surumax || survmax) {
|
if (surumin || survmin || surumax || survmax) {
|
||||||
return(Standard_True);
|
return(Standard_True);
|
||||||
}
|
}
|
||||||
return Standard_False;
|
return(Standard_False);;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,8 +16,12 @@
|
|||||||
#define AdvApp2Var_SysBase_HeaderFile
|
#define AdvApp2Var_SysBase_HeaderFile
|
||||||
|
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#include <Standard_TypeDef.hxx>
|
|
||||||
#include <AdvApp2Var_Data_f2c.hxx>
|
#include <AdvApp2Var_Data_f2c.hxx>
|
||||||
|
#if _MSC_VER
|
||||||
|
#include <stddef.h>
|
||||||
|
#else
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
class AdvApp2Var_SysBase {
|
class AdvApp2Var_SysBase {
|
||||||
public:
|
public:
|
||||||
|
@@ -374,7 +374,7 @@ void AppBlend_AppSurf::InternalPerform(const Handle(TheLine)& Lin,
|
|||||||
Standard_Real Uf = F.Parameter(Lin->Point(1));
|
Standard_Real Uf = F.Parameter(Lin->Point(1));
|
||||||
Standard_Real Ul = F.Parameter(Lin->Point(NbPoint))-Uf;
|
Standard_Real Ul = F.Parameter(Lin->Point(NbPoint))-Uf;
|
||||||
for (i=2; i<NbPoint; i++) {
|
for (i=2; i<NbPoint; i++) {
|
||||||
theParams(i) = (F.Parameter(Lin->Point(i))-Uf)/Ul;
|
theParams(i) = (F.Parameter(Lin->Point(i))-Uf)/Ul;;
|
||||||
}
|
}
|
||||||
AppDef_Compute theAppDef(theParams,dmin,dmax,tol3d,tol2d,nbit,
|
AppDef_Compute theAppDef(theParams,dmin,dmax,tol3d,tol2d,nbit,
|
||||||
Standard_True, Standard_True);
|
Standard_True, Standard_True);
|
||||||
@@ -426,7 +426,7 @@ void AppBlend_AppSurf::InternalPerform(const Handle(TheLine)& Lin,
|
|||||||
Standard_Real Uf = F.Parameter(Lin->Point(1));
|
Standard_Real Uf = F.Parameter(Lin->Point(1));
|
||||||
Standard_Real Ul = F.Parameter(Lin->Point(NbPoint))-Uf;
|
Standard_Real Ul = F.Parameter(Lin->Point(NbPoint))-Uf;
|
||||||
for (i=2; i<NbPoint; i++) {
|
for (i=2; i<NbPoint; i++) {
|
||||||
theParams(i) = (F.Parameter(Lin->Point(i))-Uf)/Ul;
|
theParams(i) = (F.Parameter(Lin->Point(i))-Uf)/Ul;;
|
||||||
}
|
}
|
||||||
|
|
||||||
theapprox.Init(dmin,dmax,tol3d,tol2d,nbit,Standard_True,
|
theapprox.Init(dmin,dmax,tol3d,tol2d,nbit,Standard_True,
|
||||||
|
@@ -452,7 +452,7 @@ AppCont_LeastSquare::AppCont_LeastSquare(const AppCont_Function& SSP,
|
|||||||
myDone = Standard_True;
|
myDone = Standard_True;
|
||||||
for (i = bdeb; i <= bfin; i++) {
|
for (i = bdeb; i <= bfin; i++) {
|
||||||
for (j = bdeb; j <= bfin; j++) {
|
for (j = bdeb; j <= bfin; j++) {
|
||||||
IBPij = IBP(i, j);
|
IBPij = IBP(i, j);;
|
||||||
for (k = 1; k<= nbcol; k++) {
|
for (k = 1; k<= nbcol; k++) {
|
||||||
myPoles(i, k) += IBPij * B2(j, k);
|
myPoles(i, k) += IBPij * B2(j, k);
|
||||||
}
|
}
|
||||||
|
@@ -65,7 +65,7 @@ void AppParCurves::Bernstein(const Standard_Integer NbPoles,
|
|||||||
math_Matrix& DA) {
|
math_Matrix& DA) {
|
||||||
|
|
||||||
Standard_Integer i, j, id, Ndeg = NbPoles-1;
|
Standard_Integer i, j, id, Ndeg = NbPoles-1;
|
||||||
Standard_Real u0, u1, y0, y1, xs, bj, bj1;
|
Standard_Real u0, u1, y0, y1, xs, bj, bj1;;
|
||||||
Standard_Integer first = U.Lower(), last = U.Upper();
|
Standard_Integer first = U.Lower(), last = U.Upper();
|
||||||
math_Vector B(1, NbPoles-1);
|
math_Vector B(1, NbPoles-1);
|
||||||
|
|
||||||
|
@@ -1272,7 +1272,7 @@ const AppParCurves_MultiBSpCurve& AppParCurves_LeastSquare::BSplineValue()
|
|||||||
{
|
{
|
||||||
if (!done) {throw StdFail_NotDone();}
|
if (!done) {throw StdFail_NotDone();}
|
||||||
|
|
||||||
Standard_Integer i, j, j2, npoints = nbP+nbP2d;
|
Standard_Integer i, j, j2, npoints = nbP+nbP2d;;
|
||||||
gp_Pnt Pt;
|
gp_Pnt Pt;
|
||||||
gp_Pnt2d Pt2d;
|
gp_Pnt2d Pt2d;
|
||||||
Standard_Integer ideb = resinit, ifin = resfin;
|
Standard_Integer ideb = resinit, ifin = resfin;
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
//AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support
|
//AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support
|
||||||
|
|
||||||
#include <AppStd_Application.hxx>
|
#include <AppStd_Application.hxx>
|
||||||
#include <Standard_Dump.hxx>
|
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application)
|
IMPLEMENT_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application)
|
||||||
|
|
||||||
@@ -30,13 +29,3 @@ Standard_CString AppStd_Application::ResourcesName() {
|
|||||||
return aRes;
|
return aRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void AppStd_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDocStd_Application)
|
|
||||||
}
|
|
||||||
|
@@ -35,9 +35,6 @@ public:
|
|||||||
//! resources
|
//! resources
|
||||||
Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE;
|
Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
|
|
||||||
|
|
||||||
DEFINE_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application)
|
DEFINE_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
//AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support
|
//AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support
|
||||||
|
|
||||||
#include <AppStdL_Application.hxx>
|
#include <AppStdL_Application.hxx>
|
||||||
#include <Standard_Dump.hxx>
|
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application)
|
IMPLEMENT_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application)
|
||||||
|
|
||||||
@@ -31,13 +30,3 @@ Standard_CString AppStdL_Application::ResourcesName()
|
|||||||
return aRes;
|
return aRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void AppStdL_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDocStd_Application)
|
|
||||||
}
|
|
||||||
|
@@ -34,9 +34,6 @@ public:
|
|||||||
//! resources
|
//! resources
|
||||||
Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE;
|
Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
|
|
||||||
|
|
||||||
DEFINE_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application)
|
DEFINE_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -27,7 +27,6 @@
|
|||||||
#include <Geom2d_BSplineCurve.hxx>
|
#include <Geom2d_BSplineCurve.hxx>
|
||||||
#include <Geom2dAdaptor_HCurve.hxx>
|
#include <Geom2dAdaptor_HCurve.hxx>
|
||||||
#include <Geom_BSplineCurve.hxx>
|
#include <Geom_BSplineCurve.hxx>
|
||||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
|
||||||
#include <Geom_TrimmedCurve.hxx>
|
#include <Geom_TrimmedCurve.hxx>
|
||||||
#include <GeomAdaptor_HCurve.hxx>
|
#include <GeomAdaptor_HCurve.hxx>
|
||||||
#include <GeomAdaptor_HSurface.hxx>
|
#include <GeomAdaptor_HSurface.hxx>
|
||||||
@@ -612,69 +611,15 @@ Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d
|
|||||||
gp_Pnt2d aF2d = theC2D->Value(theC2D->FirstParameter());
|
gp_Pnt2d aF2d = theC2D->Value(theC2D->FirstParameter());
|
||||||
gp_Pnt2d aL2d = theC2D->Value(theC2D->LastParameter());
|
gp_Pnt2d aL2d = theC2D->Value(theC2D->LastParameter());
|
||||||
|
|
||||||
Standard_Boolean isToTrim = Standard_True;
|
|
||||||
Standard_Real U1, U2, V1, V2;
|
|
||||||
aSurf->Bounds(U1, U2, V1, V2);
|
|
||||||
|
|
||||||
if (theIsU)
|
if (theIsU)
|
||||||
{
|
{
|
||||||
Standard_Real aV1Param = Min(aF2d.Y(), aL2d.Y());
|
|
||||||
Standard_Real aV2Param = Max(aF2d.Y(), aL2d.Y());
|
|
||||||
if (aV2Param < V1 - myTol || aV1Param > V2 + myTol)
|
|
||||||
{
|
|
||||||
return Standard_False;
|
|
||||||
}
|
|
||||||
else if (Precision::IsInfinite(V1) || Precision::IsInfinite(V2))
|
|
||||||
{
|
|
||||||
if (Abs(aV2Param - aV1Param) < Precision::PConfusion())
|
|
||||||
{
|
|
||||||
return Standard_False;
|
|
||||||
}
|
|
||||||
aSurf = new Geom_RectangularTrimmedSurface(aSurf, U1, U2, aV1Param, aV2Param);
|
|
||||||
isToTrim = Standard_False;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aV1Param = Max(aV1Param, V1);
|
|
||||||
aV2Param = Min(aV2Param, V2);
|
|
||||||
if (Abs(aV2Param - aV1Param) < Precision::PConfusion())
|
|
||||||
{
|
|
||||||
return Standard_False;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
aC3d = aSurf->UIso(theParam);
|
aC3d = aSurf->UIso(theParam);
|
||||||
if (isToTrim)
|
aC3d = new Geom_TrimmedCurve(aC3d, aF2d.Y(), aL2d.Y());
|
||||||
aC3d = new Geom_TrimmedCurve(aC3d, aV1Param, aV2Param);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Standard_Real aU1Param = Min(aF2d.X(), aL2d.X());
|
|
||||||
Standard_Real aU2Param = Max(aF2d.X(), aL2d.X());
|
|
||||||
if (aU2Param < U1 - myTol || aU1Param > U2 + myTol)
|
|
||||||
{
|
|
||||||
return Standard_False;
|
|
||||||
}
|
|
||||||
else if (Precision::IsInfinite(U1) || Precision::IsInfinite(U2))
|
|
||||||
{
|
|
||||||
if (Abs(aU2Param - aU1Param) < Precision::PConfusion())
|
|
||||||
{
|
|
||||||
return Standard_False;
|
|
||||||
}
|
|
||||||
aSurf = new Geom_RectangularTrimmedSurface(aSurf, aU1Param, aU2Param, V1, V2);
|
|
||||||
isToTrim = Standard_False;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aU1Param = Max(aU1Param, U1);
|
|
||||||
aU2Param = Min(aU2Param, U2);
|
|
||||||
if (Abs(aU2Param - aU1Param) < Precision::PConfusion())
|
|
||||||
{
|
|
||||||
return Standard_False;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
aC3d = aSurf->VIso(theParam);
|
aC3d = aSurf->VIso(theParam);
|
||||||
if (isToTrim)
|
aC3d = new Geom_TrimmedCurve(aC3d, aF2d.X(), aL2d.X());
|
||||||
aC3d = new Geom_TrimmedCurve(aC3d, aU1Param, aU2Param);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert arbitrary curve type to the b-spline.
|
// Convert arbitrary curve type to the b-spline.
|
||||||
|
@@ -462,7 +462,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
|
|||||||
myC3d->D0(pc3d[ii],Pc3d);
|
myC3d->D0(pc3d[ii],Pc3d);
|
||||||
dist2 = Pcons.SquareDistance(Pc3d);
|
dist2 = Pcons.SquareDistance(Pc3d);
|
||||||
use_parameter = (dist2 <= Tol2 && (pc3d[ii] > pc3d[count-1] + deltamin)) ;
|
use_parameter = (dist2 <= Tol2 && (pc3d[ii] > pc3d[count-1] + deltamin)) ;
|
||||||
Standard_Real aDistMin = RealLast();
|
Standard_Real aDistMin = RealLast();;
|
||||||
if(use_parameter) {
|
if(use_parameter) {
|
||||||
|
|
||||||
if(dist2 > dmax2) dmax2 = dist2;
|
if(dist2 > dmax2) dmax2 = dist2;
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
#include <BOPTest.hxx>
|
#include <BOPTest.hxx>
|
||||||
#include <BRepTest.hxx>
|
#include <BRepTest.hxx>
|
||||||
#include <DBRep.hxx>
|
#include <DBRep.hxx>
|
||||||
#include <Draw.hxx>
|
|
||||||
#include <Draw_Interpretor.hxx>
|
#include <Draw_Interpretor.hxx>
|
||||||
#include <Draw_PluginMacro.hxx>
|
#include <Draw_PluginMacro.hxx>
|
||||||
#include <GeometryTest.hxx>
|
#include <GeometryTest.hxx>
|
||||||
@@ -137,8 +136,7 @@ void BOPTest::ReportAlerts(const Handle(Message_Report)& theReport)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// output message with list of shapes
|
// output message with list of shapes
|
||||||
Draw_Interpretor& aDrawInterpretor = Draw::GetInterpretor();
|
Message::DefaultMessenger()->Send (aText, anAlertTypes[iGravity]);
|
||||||
aDrawInterpretor << aText << "\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -813,7 +813,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
|
|||||||
{
|
{
|
||||||
if (myCref.IsNull())
|
if (myCref.IsNull())
|
||||||
return;
|
return;
|
||||||
Standard_Boolean ok = Standard_True;
|
Standard_Boolean ok=Standard_True;;
|
||||||
|
|
||||||
Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&myShape.TShape());
|
Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&myShape.TShape());
|
||||||
Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Edge(myShape));
|
Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Edge(myShape));
|
||||||
|
@@ -92,16 +92,3 @@ Handle(BRep_CurveRepresentation) BRep_Curve3D::Copy() const
|
|||||||
C->SetRange(First(), Last());
|
C->SetRange(First(), Last());
|
||||||
return C;
|
return C;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_Curve3D::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_GCurve)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myCurve.get())
|
|
||||||
}
|
|
||||||
|
@@ -54,9 +54,6 @@ public:
|
|||||||
//! Return a copy of this representation.
|
//! Return a copy of this representation.
|
||||||
Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -147,20 +147,3 @@ Handle(BRep_CurveRepresentation) BRep_CurveOn2Surfaces::Copy() const
|
|||||||
myContinuity);
|
myContinuity);
|
||||||
return C;
|
return C;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_CurveOn2Surfaces::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface2.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation2)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContinuity)
|
|
||||||
}
|
|
||||||
|
@@ -66,9 +66,6 @@ public:
|
|||||||
//! Return a copy of this representation.
|
//! Return a copy of this representation.
|
||||||
Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -180,20 +180,4 @@ void BRep_CurveOnClosedSurface::Update()
|
|||||||
BRep_CurveOnSurface::Update();
|
BRep_CurveOnSurface::Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_CurveOnClosedSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveOnSurface)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPCurve2.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContinuity)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV21)
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV22)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -78,9 +78,6 @@ public:
|
|||||||
//! This is called when the range is modified.
|
//! This is called when the range is modified.
|
||||||
Standard_EXPORT virtual void Update() Standard_OVERRIDE;
|
Standard_EXPORT virtual void Update() Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -146,20 +146,4 @@ void BRep_CurveOnSurface::Update()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_CurveOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_GCurve)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV1)
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV2)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPCurve.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -71,9 +71,6 @@ public:
|
|||||||
//! This is called when the range is modified.
|
//! This is called when the range is modified.
|
||||||
Standard_EXPORT virtual void Update() Standard_OVERRIDE;
|
Standard_EXPORT virtual void Update() Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -426,13 +426,3 @@ void BRep_CurveRepresentation::Polygon2(const Handle(Poly_Polygon2D)&)
|
|||||||
throw Standard_DomainError("BRep_CurveRepresentation");
|
throw Standard_DomainError("BRep_CurveRepresentation");
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_CurveRepresentation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
|
|
||||||
}
|
|
||||||
|
@@ -144,9 +144,6 @@ public:
|
|||||||
//! Return a copy of this representation.
|
//! Return a copy of this representation.
|
||||||
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const = 0;
|
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const = 0;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -46,16 +46,3 @@ void BRep_GCurve::Update()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_GCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst)
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast)
|
|
||||||
}
|
|
||||||
|
@@ -57,9 +57,6 @@ public:
|
|||||||
//! This is called when the range is modified.
|
//! This is called when the range is modified.
|
||||||
Standard_EXPORT virtual void Update();
|
Standard_EXPORT virtual void Update();
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -80,16 +80,4 @@ void BRep_PointOnCurve::Curve(const Handle(Geom_Curve)& C)
|
|||||||
myCurve = C;
|
myCurve = C;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_PointOnCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurve.get())
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -48,9 +48,6 @@ public:
|
|||||||
|
|
||||||
Standard_EXPORT virtual void Curve (const Handle(Geom_Curve)& C) Standard_OVERRIDE;
|
Standard_EXPORT virtual void Curve (const Handle(Geom_Curve)& C) Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -84,16 +84,4 @@ void BRep_PointOnCurveOnSurface::PCurve(const Handle(Geom2d_Curve)& C)
|
|||||||
myPCurve = C;
|
myPCurve = C;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_PointOnCurveOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPCurve.get())
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -50,9 +50,6 @@ public:
|
|||||||
|
|
||||||
Standard_EXPORT virtual void PCurve (const Handle(Geom2d_Curve)& C) Standard_OVERRIDE;
|
Standard_EXPORT virtual void PCurve (const Handle(Geom2d_Curve)& C) Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -197,15 +197,4 @@ void BRep_PointRepresentation::Surface(const Handle(Geom_Surface)& )
|
|||||||
throw Standard_DomainError("BRep_PointRepresentation");
|
throw Standard_DomainError("BRep_PointRepresentation");
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_PointRepresentation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myParameter)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -84,9 +84,6 @@ public:
|
|||||||
|
|
||||||
Standard_EXPORT virtual void Surface (const Handle(Geom_Surface)& S);
|
Standard_EXPORT virtual void Surface (const Handle(Geom_Surface)& S);
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -56,17 +56,4 @@ void BRep_PointsOnSurface::Surface(const Handle(Geom_Surface)& S)
|
|||||||
mySurface = S;
|
mySurface = S;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_PointsOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -40,9 +40,6 @@ public:
|
|||||||
|
|
||||||
Standard_EXPORT virtual void Surface (const Handle(Geom_Surface)& S) Standard_OVERRIDE;
|
Standard_EXPORT virtual void Surface (const Handle(Geom_Surface)& S) Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -76,15 +76,3 @@ Handle(BRep_CurveRepresentation) BRep_Polygon3D::Copy() const
|
|||||||
return P;
|
return P;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_Polygon3D::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon3D.get())
|
|
||||||
}
|
|
||||||
|
@@ -50,9 +50,6 @@ public:
|
|||||||
//! Return a copy of this representation.
|
//! Return a copy of this representation.
|
||||||
Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -79,16 +79,3 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedSurface::Copy() const
|
|||||||
return P;
|
return P;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_PolygonOnClosedSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PolygonOnSurface)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2.get())
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -51,9 +51,6 @@ public:
|
|||||||
//! Return a copy of this representation.
|
//! Return a copy of this representation.
|
||||||
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -84,15 +84,3 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedTriangulation::Copy() const
|
|||||||
return P;
|
return P;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_PolygonOnClosedTriangulation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PolygonOnTriangulation)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2.get())
|
|
||||||
}
|
|
||||||
|
@@ -51,9 +51,6 @@ public:
|
|||||||
//! Return a copy of this representation.
|
//! Return a copy of this representation.
|
||||||
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -102,16 +102,3 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnSurface::Copy() const
|
|||||||
return P;
|
return P;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_PolygonOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2D.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
|
|
||||||
}
|
|
||||||
|
@@ -59,9 +59,6 @@ public:
|
|||||||
//! Return a copy of this representation.
|
//! Return a copy of this representation.
|
||||||
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -104,17 +104,3 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnTriangulation::Copy() const
|
|||||||
|
|
||||||
return P;
|
return P;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_PolygonOnTriangulation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTriangulation.get())
|
|
||||||
}
|
|
||||||
|
@@ -58,9 +58,6 @@ public:
|
|||||||
//! Return a copy of this representation.
|
//! Return a copy of this representation.
|
||||||
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -141,22 +141,3 @@ Handle(TopoDS_TShape) BRep_TEdge::EmptyCopy() const
|
|||||||
return TE;
|
return TE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_TEdge::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TEdge)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags)
|
|
||||||
|
|
||||||
for (BRep_ListIteratorOfListOfCurveRepresentation itr(myCurves); itr.More(); itr.Next())
|
|
||||||
{
|
|
||||||
const Handle(BRep_CurveRepresentation)& aCurveRepresentation = itr.Value();
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aCurveRepresentation.get())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@@ -81,9 +81,6 @@ public:
|
|||||||
//! Returns a copy of the TShape with no sub-shapes.
|
//! Returns a copy of the TShape with no sub-shapes.
|
||||||
Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
|
Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -50,21 +50,3 @@ Handle(TopoDS_TShape) BRep_TFace::EmptyCopy() const
|
|||||||
TF->Tolerance(myTolerance);
|
TF->Tolerance(myTolerance);
|
||||||
return TF;
|
return TF;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_TFace::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TFace)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTriangulation.get())
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNaturalRestriction)
|
|
||||||
}
|
|
||||||
|
@@ -88,9 +88,6 @@ public:
|
|||||||
//! The new Face has no triangulation.
|
//! The new Face has no triangulation.
|
||||||
Standard_EXPORT virtual Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
|
Standard_EXPORT virtual Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -47,21 +47,3 @@ Handle(TopoDS_TShape) BRep_TVertex::EmptyCopy() const
|
|||||||
return TV;
|
return TV;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : DumpJson
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRep_TVertex::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
||||||
{
|
|
||||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
||||||
|
|
||||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TVertex)
|
|
||||||
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPnt)
|
|
||||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
|
|
||||||
for (BRep_ListIteratorOfListOfPointRepresentation itr(myPoints); itr.More(); itr.Next())
|
|
||||||
{
|
|
||||||
const Handle(BRep_PointRepresentation)& aPointRepresentation = itr.Value();
|
|
||||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointRepresentation.get())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@@ -62,9 +62,6 @@ public:
|
|||||||
//! Returns a copy of the TShape with no sub-shapes.
|
//! Returns a copy of the TShape with no sub-shapes.
|
||||||
Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
|
Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Dumps the content of me into the stream
|
|
||||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -361,7 +361,7 @@ static void BuildFaceIn( TopoDS_Face& F,
|
|||||||
else {
|
else {
|
||||||
TopoDS_Shape aLocalShape = Faces.First().EmptyCopied();
|
TopoDS_Shape aLocalShape = Faces.First().EmptyCopied();
|
||||||
TopoDS_Face NF = TopoDS::Face(aLocalShape);
|
TopoDS_Face NF = TopoDS::Face(aLocalShape);
|
||||||
// TopoDS_Face NF = TopoDS::Face(Faces.First().EmptyCopied());
|
// TopoDS_Face NF = TopoDS::Face(Faces.First().EmptyCopied());;
|
||||||
B.Add (NF,WI);
|
B.Add (NF,WI);
|
||||||
Faces.Append (NF);
|
Faces.Append (NF);
|
||||||
BuildFaceIn (NF, WI, KeyContains, KeyIsIn, TopAbs_FORWARD,Faces);
|
BuildFaceIn (NF, WI, KeyContains, KeyIsIn, TopAbs_FORWARD,Faces);
|
||||||
|
@@ -309,55 +309,3 @@ void BRepAlgo_Image::Filter(const TopoDS_Shape& S,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : RemoveRoot
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRepAlgo_Image::RemoveRoot (const TopoDS_Shape& Root)
|
|
||||||
{
|
|
||||||
Standard_Boolean isRemoved = Standard_False;
|
|
||||||
for (TopTools_ListOfShape::Iterator it (roots); it.More(); it.Next())
|
|
||||||
{
|
|
||||||
if (Root.IsSame (it.Value()))
|
|
||||||
{
|
|
||||||
roots.Remove (it);
|
|
||||||
isRemoved = Standard_True;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isRemoved)
|
|
||||||
return;
|
|
||||||
|
|
||||||
const TopTools_ListOfShape* pNewS = down.Seek (Root);
|
|
||||||
if (pNewS)
|
|
||||||
{
|
|
||||||
for (TopTools_ListOfShape::Iterator it (*pNewS); it.More(); it.Next())
|
|
||||||
{
|
|
||||||
const TopoDS_Shape *pOldS = up.Seek (it.Value());
|
|
||||||
if (pOldS && pOldS->IsSame (Root))
|
|
||||||
up.UnBind (it.Value());
|
|
||||||
}
|
|
||||||
down.UnBind (Root);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : ReplaceRoot
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void BRepAlgo_Image::ReplaceRoot (const TopoDS_Shape& OldRoot,
|
|
||||||
const TopoDS_Shape& NewRoot)
|
|
||||||
{
|
|
||||||
if (!HasImage (OldRoot))
|
|
||||||
return;
|
|
||||||
|
|
||||||
const TopTools_ListOfShape& aLImage = Image (OldRoot);
|
|
||||||
if (HasImage (NewRoot))
|
|
||||||
Add (NewRoot, aLImage);
|
|
||||||
else
|
|
||||||
Bind (NewRoot, aLImage);
|
|
||||||
|
|
||||||
SetRoot (NewRoot);
|
|
||||||
RemoveRoot (OldRoot);
|
|
||||||
}
|
|
||||||
|
@@ -60,14 +60,6 @@ public:
|
|||||||
//! Remove <S> to set of images.
|
//! Remove <S> to set of images.
|
||||||
Standard_EXPORT void Remove (const TopoDS_Shape& S);
|
Standard_EXPORT void Remove (const TopoDS_Shape& S);
|
||||||
|
|
||||||
//! Removes the root <theRoot> from the list of roots and up and down maps.
|
|
||||||
Standard_EXPORT void RemoveRoot (const TopoDS_Shape& Root);
|
|
||||||
|
|
||||||
//! Replaces the <OldRoot> with the <NewRoot>, so all images
|
|
||||||
//! of the <OldRoot> become the images of the <NewRoot>.
|
|
||||||
//! The <OldRoot> is removed.
|
|
||||||
Standard_EXPORT void ReplaceRoot (const TopoDS_Shape& OldRoot, const TopoDS_Shape& NewRoot);
|
|
||||||
|
|
||||||
Standard_EXPORT const TopTools_ListOfShape& Roots() const;
|
Standard_EXPORT const TopTools_ListOfShape& Roots() const;
|
||||||
|
|
||||||
Standard_EXPORT Standard_Boolean IsImage (const TopoDS_Shape& S) const;
|
Standard_EXPORT Standard_Boolean IsImage (const TopoDS_Shape& S) const;
|
||||||
|
@@ -280,7 +280,7 @@ void BRepAlgoAPI_DumpOper::Dump(const TopoDS_Shape& theShape1,
|
|||||||
fprintf(afile,"%s\n","# Result is Null ");
|
fprintf(afile,"%s\n","# Result is Null ");
|
||||||
|
|
||||||
fprintf(afile, "%s %s %s\n","restore", aName1.ToCString(), "arg1");
|
fprintf(afile, "%s %s %s\n","restore", aName1.ToCString(), "arg1");
|
||||||
fprintf(afile, "%s %s %s\n","restore", aName2.ToCString(), "arg2");
|
fprintf(afile, "%s %s %s\n","restore", aName2.ToCString(), "arg2");;
|
||||||
TCollection_AsciiString aBopString;
|
TCollection_AsciiString aBopString;
|
||||||
switch (theOperation)
|
switch (theOperation)
|
||||||
{
|
{
|
||||||
|
@@ -878,7 +878,7 @@ Standard_Boolean BRepBlend_SurfRstConstRad::Section
|
|||||||
|
|
||||||
gp_Vec d1u1,d1v1,d2u1,d2v1,d2uv1,d1;
|
gp_Vec d1u1,d1v1,d2u1,d2v1,d2uv1,d1;
|
||||||
gp_Vec ns,ns2,dnplan,dnw,dn2w; //,np2,dnp2;
|
gp_Vec ns,ns2,dnplan,dnw,dn2w; //,np2,dnp2;
|
||||||
gp_Vec ncrossns;
|
gp_Vec ncrossns;;
|
||||||
gp_Vec resulu,resulv,temp,tgct,resul;
|
gp_Vec resulu,resulv,temp,tgct,resul;
|
||||||
gp_Vec d1urst,d1vrst;
|
gp_Vec d1urst,d1vrst;
|
||||||
gp_Pnt Center,bid;
|
gp_Pnt Center,bid;
|
||||||
|
@@ -887,7 +887,7 @@ TColStd_Array1OfReal& DWeigths)
|
|||||||
|
|
||||||
gp_Vec d1u1,d1v1,d2u1,d2v1,d2uv1,d1;
|
gp_Vec d1u1,d1v1,d2u1,d2v1,d2uv1,d1;
|
||||||
gp_Vec ns,ns2,dnplan,dnw,dn2w;//,np2,dnp2;
|
gp_Vec ns,ns2,dnplan,dnw,dn2w;//,np2,dnp2;
|
||||||
gp_Vec ncrossns;
|
gp_Vec ncrossns;;
|
||||||
gp_Vec resulu,resulv,temp,tgct,resul;
|
gp_Vec resulu,resulv,temp,tgct,resul;
|
||||||
gp_Vec d1urst,d1vrst;
|
gp_Vec d1urst,d1vrst;
|
||||||
gp_Pnt Center,bid;
|
gp_Pnt Center,bid;
|
||||||
|
@@ -653,7 +653,7 @@ Standard_Boolean IsModifySize(const BRepAdaptor_Surface& theBS,
|
|||||||
{
|
{
|
||||||
if(anExtr.NbExt() > 0)
|
if(anExtr.NbExt() > 0)
|
||||||
{
|
{
|
||||||
Standard_Integer i, imin = 0;
|
Standard_Integer i, imin = 0;;
|
||||||
Standard_Real dmin = RealLast();
|
Standard_Real dmin = RealLast();
|
||||||
Standard_Real uextr = 0., vextr = 0.;
|
Standard_Real uextr = 0., vextr = 0.;
|
||||||
Extrema_POnSurf P1, P2;
|
Extrema_POnSurf P1, P2;
|
||||||
|
@@ -27,7 +27,6 @@
|
|||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
#include <Geom2dAPI_ProjectPointOnCurve.hxx>
|
|
||||||
|
|
||||||
static const Standard_Real Probing_Start = 0.123;
|
static const Standard_Real Probing_Start = 0.123;
|
||||||
static const Standard_Real Probing_End = 0.7;
|
static const Standard_Real Probing_End = 0.7;
|
||||||
@@ -141,7 +140,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
|||||||
gp_Lin2d& L,
|
gp_Lin2d& L,
|
||||||
Standard_Real& Par)
|
Standard_Real& Par)
|
||||||
{
|
{
|
||||||
TopExp_Explorer anExpF(myFace, TopAbs_EDGE);
|
TopExp_Explorer anExpF(myFace,TopAbs_EDGE);
|
||||||
Standard_Integer i;
|
Standard_Integer i;
|
||||||
Standard_Real aFPar;
|
Standard_Real aFPar;
|
||||||
Standard_Real aLPar;
|
Standard_Real aLPar;
|
||||||
@@ -154,7 +153,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
|||||||
if (i != myCurEdgeInd)
|
if (i != myCurEdgeInd)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const TopoDS_Shape &aLocalShape = anExpF.Current();
|
const TopoDS_Shape &aLocalShape = anExpF.Current();
|
||||||
const TopAbs_Orientation anOrientation = aLocalShape.Orientation();
|
const TopAbs_Orientation anOrientation = aLocalShape.Orientation();
|
||||||
|
|
||||||
if (anOrientation == TopAbs_FORWARD || anOrientation == TopAbs_REVERSED) {
|
if (anOrientation == TopAbs_FORWARD || anOrientation == TopAbs_REVERSED) {
|
||||||
@@ -163,29 +162,27 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
|||||||
aC2d = BRep_Tool::CurveOnSurface(anEdge, myFace, aFPar, aLPar);
|
aC2d = BRep_Tool::CurveOnSurface(anEdge, myFace, aFPar, aLPar);
|
||||||
|
|
||||||
if (!aC2d.IsNull()) {
|
if (!aC2d.IsNull()) {
|
||||||
// Treatment of infinite cases.
|
// Treatment of infinite cases.
|
||||||
if (Precision::IsNegativeInfinite(aFPar)) {
|
if (Precision::IsNegativeInfinite(aFPar)) {
|
||||||
if (Precision::IsPositiveInfinite(aLPar)) {
|
if (Precision::IsPositiveInfinite(aLPar)) {
|
||||||
aFPar = -1.;
|
aFPar = -1.;
|
||||||
aLPar = 1.;
|
aLPar = 1.;
|
||||||
}
|
} else {
|
||||||
else {
|
aFPar = aLPar - 1.;
|
||||||
aFPar = aLPar - 1.;
|
}
|
||||||
}
|
} else if (Precision::IsPositiveInfinite(aLPar))
|
||||||
}
|
aLPar = aFPar + 1.;
|
||||||
else if (Precision::IsPositiveInfinite(aLPar))
|
|
||||||
aLPar = aFPar + 1.;
|
|
||||||
|
|
||||||
for (; myCurEdgePar < Probing_End; myCurEdgePar += Probing_Step) {
|
for (; myCurEdgePar < Probing_End ;myCurEdgePar += Probing_Step) {
|
||||||
aParamIn = myCurEdgePar*aFPar + (1. - myCurEdgePar)*aLPar;
|
aParamIn = myCurEdgePar*aFPar + (1. - myCurEdgePar)*aLPar;
|
||||||
|
|
||||||
gp_Vec2d aTanVec;
|
gp_Vec2d aTanVec;
|
||||||
aC2d->D1(aParamIn, aPOnC, aTanVec);
|
aC2d->D1(aParamIn, aPOnC, aTanVec);
|
||||||
Par = aPOnC.SquareDistance(P);
|
Par = aPOnC.SquareDistance(P);
|
||||||
|
|
||||||
if (Par > aTolParConf2) {
|
if (Par > aTolParConf2) {
|
||||||
gp_Vec2d aLinVec(P, aPOnC);
|
gp_Vec2d aLinVec(P, aPOnC);
|
||||||
gp_Dir2d aLinDir(aLinVec);
|
gp_Dir2d aLinDir(aLinVec);
|
||||||
|
|
||||||
Standard_Real aTanMod = aTanVec.SquareMagnitude();
|
Standard_Real aTanMod = aTanVec.SquareMagnitude();
|
||||||
if (aTanMod < aTolParConf2)
|
if (aTanMod < aTolParConf2)
|
||||||
@@ -193,10 +190,8 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
|||||||
aTanVec /= Sqrt(aTanMod);
|
aTanVec /= Sqrt(aTanMod);
|
||||||
Standard_Real aSinA = aTanVec.Crossed(aLinDir.XY());
|
Standard_Real aSinA = aTanVec.Crossed(aLinDir.XY());
|
||||||
const Standard_Real SmallAngle = 0.001;
|
const Standard_Real SmallAngle = 0.001;
|
||||||
Standard_Boolean isSmallAngle = Standard_False;
|
|
||||||
if (Abs(aSinA) < SmallAngle)
|
if (Abs(aSinA) < SmallAngle)
|
||||||
{
|
{
|
||||||
isSmallAngle = Standard_True;
|
|
||||||
// The line from the input point P to the current point on edge
|
// The line from the input point P to the current point on edge
|
||||||
// is tangent to the edge curve. This condition is bad for classification.
|
// is tangent to the edge curve. This condition is bad for classification.
|
||||||
// Therefore try to go to another point in the hope that there will be
|
// Therefore try to go to another point in the hope that there will be
|
||||||
@@ -206,66 +201,28 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
L = gp_Lin2d(P, aLinDir);
|
L = gp_Lin2d(P, aLinDir);
|
||||||
|
|
||||||
// Check if ends of a curve lie on a line.
|
// Check if ends of a curve lie on a line.
|
||||||
aC2d->D0(aFPar, aPOnC);
|
aC2d->D0(aFPar, aPOnC);
|
||||||
gp_Pnt2d aFPOnC = aPOnC;
|
|
||||||
if (L.SquareDistance(aPOnC) > aTolParConf2) {
|
|
||||||
aC2d->D0(aLPar, aPOnC);
|
|
||||||
if (L.SquareDistance(aPOnC) > aTolParConf2) {
|
|
||||||
|
|
||||||
if (isSmallAngle)
|
if (L.SquareDistance(aPOnC) > aTolParConf2) {
|
||||||
{
|
aC2d->D0(aLPar, aPOnC);
|
||||||
//Try to find minimal distance between curve and line
|
|
||||||
|
|
||||||
Geom2dAPI_ProjectPointOnCurve aProj;
|
if (L.SquareDistance(aPOnC) > aTolParConf2) {
|
||||||
aProj.Init(P, aC2d, aFPar, aLPar);
|
myCurEdgePar += Probing_Step;
|
||||||
if (aProj.NbPoints() > 0)
|
|
||||||
{
|
|
||||||
gp_Pnt2d aLPOnC = aPOnC;
|
|
||||||
Standard_Real aFDist = P.SquareDistance(aFPOnC);
|
|
||||||
Standard_Real aLDist = P.SquareDistance(aLPOnC);
|
|
||||||
Standard_Real aMinDist = aProj.LowerDistance();
|
|
||||||
aMinDist *= aMinDist;
|
|
||||||
aPOnC = aProj.NearestPoint();
|
|
||||||
if (aMinDist > aFDist)
|
|
||||||
{
|
|
||||||
aMinDist = aFDist;
|
|
||||||
aPOnC = aFPOnC;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
if (aMinDist > aLDist)
|
|
||||||
{
|
|
||||||
aMinDist = aLDist;
|
|
||||||
aPOnC = aLPOnC;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
if (aMinDist < Par)
|
|
||||||
{
|
|
||||||
Par = aMinDist;
|
|
||||||
if (Par < aTolParConf2)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
aLinVec.SetXY((aPOnC.XY() - P.XY()));
|
|
||||||
aLinDir.SetXY(aLinVec.XY());
|
|
||||||
L = gp_Lin2d(P, aLinDir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
myCurEdgePar += Probing_Step;
|
|
||||||
if (myCurEdgePar >= Probing_End) {
|
|
||||||
myCurEdgeInd++;
|
|
||||||
myCurEdgePar = Probing_Start;
|
|
||||||
}
|
|
||||||
|
|
||||||
Par = Sqrt(Par);
|
if (myCurEdgePar >= Probing_End) {
|
||||||
return Standard_True;
|
myCurEdgeInd++;
|
||||||
}
|
myCurEdgePar = Probing_Start;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
Par = Sqrt(Par);
|
||||||
|
return Standard_True;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} // if (!aC2d.IsNull()) {
|
} // if (!aC2d.IsNull()) {
|
||||||
} // if (anOrientation == TopAbs_FORWARD ...
|
} // if (anOrientation == TopAbs_FORWARD ...
|
||||||
|
|
||||||
@@ -276,7 +233,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
|||||||
|
|
||||||
// nothing found, return an horizontal line
|
// nothing found, return an horizontal line
|
||||||
Par = RealLast();
|
Par = RealLast();
|
||||||
L = gp_Lin2d(P, gp_Dir2d(1, 0));
|
L = gp_Lin2d(P,gp_Dir2d(1,0));
|
||||||
|
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user