mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Compare commits
95 Commits
CR0_IntSeg
...
IR-2020-03
Author | SHA1 | Date | |
---|---|---|---|
|
d6e18114eb | ||
|
e5c11edd7b | ||
|
fffc249f21 | ||
|
739c7e5968 | ||
|
f732ea1ab5 | ||
|
ae87bb87d0 | ||
|
3d60d73f76 | ||
|
0950253ca6 | ||
|
f6d8ca74d5 | ||
|
00cdefc7a2 | ||
|
d850414af1 | ||
|
b380b06c5d | ||
|
c64efd9e30 | ||
|
cd43c08f2b | ||
|
28b13b31aa | ||
|
10ac040338 | ||
|
7e1c1e4869 | ||
|
a2803f37e7 | ||
|
18348b382e | ||
|
64e68ea690 | ||
|
bee13ef1cf | ||
|
e73ef9d219 | ||
|
8b3fbdef34 | ||
|
e2550e48f1 | ||
|
62beabff7c | ||
|
5e06dfcb32 | ||
|
35befde2ad | ||
|
bc73b00672 | ||
|
00ea7f2676 | ||
|
fe758dbe2c | ||
|
8811d6f2aa | ||
|
1939cfd9cb | ||
|
7860770232 | ||
|
6216ed573e | ||
|
973f7d55bd | ||
|
0c74168c42 | ||
|
3eba1c72ef | ||
|
e83d440f92 | ||
|
6558400123 | ||
|
389f5b59dd | ||
|
08353e37cf | ||
|
c8bead4752 | ||
|
9df71488b3 | ||
|
ef59b5e064 | ||
|
0c061f3d9d | ||
|
88b312d3a4 | ||
|
0858125fd4 | ||
|
89d855ba58 | ||
|
d415125a68 | ||
|
0da2ecac41 | ||
|
bdd09cfaf4 | ||
|
9504a30d15 | ||
|
9a1701fbcb | ||
|
c68c346d2b | ||
|
e2447a80ea | ||
|
936ce1f273 | ||
|
6ef7a1f9e5 | ||
|
23c2ae55c7 | ||
|
8bfae263c1 | ||
|
1c2ddf5612 | ||
|
5a8d30b87b | ||
|
b7b22996bb | ||
|
552a74d829 | ||
|
c37bd936c3 | ||
|
4e8c1d8666 | ||
|
72f6dc612c | ||
|
f051908edc | ||
|
420b38fde9 | ||
|
34e7ac6817 | ||
|
2b5a58a33c | ||
|
e513a6c538 | ||
|
8c2d331426 | ||
|
caee80f39f | ||
|
01b2f506d6 | ||
|
df8c7e3e18 | ||
|
3f1675c941 | ||
|
6a56fe9240 | ||
|
51ee6a7dbb | ||
|
14a356b178 | ||
|
4eff0c0480 | ||
|
8f00325d73 | ||
|
9a90a4524e | ||
|
31a5a359bb | ||
|
bf97419a18 | ||
|
4c26106f76 | ||
|
15e4e6a23e | ||
|
6b467e52bb | ||
|
08b438b076 | ||
|
a14f2b4722 | ||
|
a1a9b24952 | ||
|
f979709590 | ||
|
e9d05765c2 | ||
|
7756fc599d | ||
|
b31fbc832d | ||
|
1bd04b5a02 |
21
adm/UDLIST
21
adm/UDLIST
@@ -108,6 +108,7 @@ n BRepMesh
|
||||
n BRepMeshData
|
||||
n BRepOffset
|
||||
n BRepOffsetAPI
|
||||
n BRepPreviewAPI
|
||||
n BRepPrim
|
||||
n BRepPrimAPI
|
||||
n BRepProj
|
||||
@@ -443,3 +444,23 @@ t TKRWMesh
|
||||
n RWGltf
|
||||
n RWMesh
|
||||
n RWObj
|
||||
n DFBrowser
|
||||
n DFBrowserPane
|
||||
n DFBrowserPaneXDE
|
||||
n ShapeView
|
||||
n TInspector
|
||||
n TInspectorAPI
|
||||
x TInspectorEXE
|
||||
t TKDFBrowser
|
||||
t TKShapeView
|
||||
t TKTInspector
|
||||
t TKTInspectorAPI
|
||||
t TKToolsDraw
|
||||
t TKTreeModel
|
||||
t TKView
|
||||
t TKVInspector
|
||||
n ToolsDraw
|
||||
n TreeModel
|
||||
n View
|
||||
n ViewControl
|
||||
n VInspector
|
||||
|
@@ -130,7 +130,9 @@ elseif ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
|
||||
if (APPLE)
|
||||
# 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}")
|
||||
else()
|
||||
elseif(NOT WIN32)
|
||||
# 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}")
|
||||
endif()
|
||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
@@ -7,7 +7,8 @@ if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "")
|
||||
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME)
|
||||
|
||||
if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "")
|
||||
message (FATAL_ERROR "... Qt root directory was not found")
|
||||
set (3RDPARTY_QT_DIR "" CACHE PATH "The directory containing qt")
|
||||
message (FATAL_ERROR "Could not find used third-party product: 3RDPARTY_QT_DIR")
|
||||
endif()
|
||||
|
||||
# Combine directory name with absolute path and show in GUI
|
||||
@@ -31,4 +32,10 @@ if (NOT ${Qt5_FOUND})
|
||||
#message (STATUS "Qt4 cmake configuration")
|
||||
else()
|
||||
#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,6 +82,11 @@ if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Micr
|
||||
lappend ::SYS_VC_LIST "vc142-uwp"
|
||||
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
|
||||
if { [info exists ::env(VS140COMNTOOLS)] } {
|
||||
@@ -193,7 +198,11 @@ proc wokdep:gui:UpdateList {} {
|
||||
}
|
||||
|
||||
if { "$::HAVE_ZLIB" == "true" } {
|
||||
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "zlib" "zlib.h" "zlib" {"zlib"}
|
||||
set aCheckLib "z"
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aCheckLib "zlib"
|
||||
}
|
||||
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "zlib" "zlib.h" "$aCheckLib" {"zlib"}
|
||||
}
|
||||
if { "$::HAVE_LIBLZMA" == "true" } {
|
||||
set aCheckLib "lzma"
|
||||
@@ -214,9 +223,14 @@ proc wokdep:gui:UpdateList {} {
|
||||
wokdep:SearchRapidJson anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
|
||||
if { "$::CHECK_QT4" == "true" } {
|
||||
wokdep:SearchQt4 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
if {"$::BUILD_Inspector" == "true" } {
|
||||
set ::CHECK_QT "true"
|
||||
}
|
||||
|
||||
if { "$::CHECK_QT" == "true" } {
|
||||
wokdep:SearchQt anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
|
||||
if { "$::CHECK_JDK" == "true" } {
|
||||
wokdep:SearchJDK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
@@ -485,11 +499,16 @@ ttk::label .myFrame.myChecks.myLzmaLbl -text "Use liblzma"
|
||||
checkbutton .myFrame.myChecks.myE57Check -offvalue "false" -onvalue "true" -variable HAVE_E57 -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myE57Lbl -text "Use E57"
|
||||
|
||||
checkbutton .myFrame.myChecks.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myQt4Lbl -text "Search Qt4"
|
||||
checkbutton .myFrame.myChecks.myQtCheck -offvalue "false" -onvalue "true" -variable CHECK_QT -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myQtLbl -text "Search Qt"
|
||||
checkbutton .myFrame.myChecks.myJDKCheck -offvalue "false" -onvalue "true" -variable CHECK_JDK -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myJDKLbl -text "Search JDK"
|
||||
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
checkbutton .myFrame.myChecks.myInspectorBuild -offvalue "false" -onvalue "true" -variable BUILD_Inspector -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myInspectorLbl -text "Build Inspector"
|
||||
}
|
||||
|
||||
# Additional headers search paths
|
||||
ttk::label .myFrame.myIncLbl -text "Additional headers search paths:" -padding {5 5 80 5}
|
||||
scrollbar .myFrame.myIncScrl -command ".myFrame.myIncList yview"
|
||||
@@ -593,8 +612,8 @@ if { "$::tcl_platform(os)" != "Darwin" } {
|
||||
grid .myFrame.myChecks.myZLibCheck -row $aCheckRowIter -column 6 -sticky e
|
||||
grid .myFrame.myChecks.myZLibLbl -row $aCheckRowIter -column 7 -sticky w
|
||||
|
||||
grid .myFrame.myChecks.myQt4Check -row $aCheckRowIter -column 12 -sticky e
|
||||
grid .myFrame.myChecks.myQt4Lbl -row $aCheckRowIter -column 13 -sticky w
|
||||
grid .myFrame.myChecks.myQtCheck -row $aCheckRowIter -column 12 -sticky e
|
||||
grid .myFrame.myChecks.myQtLbl -row $aCheckRowIter -column 13 -sticky w
|
||||
|
||||
incr aCheckRowIter
|
||||
grid .myFrame.myChecks.myFFmpegCheck -row $aCheckRowIter -column 0 -sticky e
|
||||
@@ -619,6 +638,11 @@ grid .myFrame.myChecks.myRapidJsonLbl -row $aCheckRowIter -column 1 -sticky w
|
||||
grid .myFrame.myChecks.myE57Check -row $aCheckRowIter -column 6 -sticky e
|
||||
grid .myFrame.myChecks.myE57Lbl -row $aCheckRowIter -column 7 -sticky w
|
||||
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
grid .myFrame.myChecks.myInspectorBuild -row $aCheckRowIter -column 12 -sticky e
|
||||
grid .myFrame.myChecks.myInspectorLbl -row $aCheckRowIter -column 13 -sticky w
|
||||
}
|
||||
|
||||
incr aCheckRowIter
|
||||
|
||||
# Additional headers search paths
|
||||
|
@@ -68,7 +68,7 @@ if { [info exists ::env(SHORTCUT_HEADERS)] } {
|
||||
}
|
||||
|
||||
# fetch environment variables (e.g. set by custom.sh or custom.bat) and set them as tcl variables with the same name
|
||||
set THE_ENV_VARIABLES {HAVE_FREEIMAGE HAVE_FFMPEG HAVE_TBB HAVE_GLES2 HAVE_D3D HAVE_VTK HAVE_ZLIB HAVE_LIBLZMA HAVE_E57 HAVE_RAPIDJSON HAVE_OPENCL CHECK_QT4 CHECK_JDK MACOSX_USE_GLX HAVE_RelWithDebInfo}
|
||||
set THE_ENV_VARIABLES {HAVE_FREEIMAGE HAVE_FFMPEG HAVE_TBB HAVE_GLES2 HAVE_D3D HAVE_VTK HAVE_ZLIB HAVE_LIBLZMA HAVE_E57 HAVE_RAPIDJSON HAVE_OPENCL CHECK_QT4 CHECK_JDK MACOSX_USE_GLX HAVE_RelWithDebInfo BUILD_Inspector}
|
||||
foreach anEnvIter $THE_ENV_VARIABLES {
|
||||
set ${anEnvIter} "false"
|
||||
if { [info exists ::env(${anEnvIter})] } {
|
||||
@@ -241,7 +241,11 @@ proc wokdep:Preferred {theList theCmpl theArch} {
|
||||
|
||||
# keep only two first digits in "vc141"
|
||||
if { ! [regexp {^vc[0-9][0-9]} $theCmpl aCmpl] } {
|
||||
set aCmpl $theCmpl
|
||||
if { [regexp {^vclang} $theCmpl] } {
|
||||
set aCmpl vc14
|
||||
} else {
|
||||
set aCmpl $theCmpl
|
||||
}
|
||||
}
|
||||
|
||||
set aShortList {}
|
||||
@@ -631,7 +635,11 @@ proc wokdep:SearchTBB {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
|
||||
|
||||
# keep only two first digits in "vc141"
|
||||
if { ! [regexp {^vc[0-9][0-9]} ${::VCVER} aVcLib] } {
|
||||
set aVcLib ${::VCVER}
|
||||
if { [regexp {^vclang} ${::VCVER}] } {
|
||||
set aVcLib vc14
|
||||
} else {
|
||||
set aVcLib ${::VCVER}
|
||||
}
|
||||
}
|
||||
|
||||
set isFound "true"
|
||||
@@ -1014,8 +1022,8 @@ proc wokdep:SearchVTK {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
|
||||
return "$isFound"
|
||||
}
|
||||
|
||||
# Search Qt4 libraries placement
|
||||
proc wokdep:SearchQt4 {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
|
||||
# Search Qt libraries placement
|
||||
proc wokdep:SearchQt {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
|
||||
upvar $theErrInc anErrInc
|
||||
upvar $theErrLib32 anErrLib32
|
||||
upvar $theErrLib64 anErrLib64
|
||||
@@ -1023,53 +1031,46 @@ proc wokdep:SearchQt4 {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
|
||||
upvar $theErrBin64 anErrBin64
|
||||
|
||||
set isFound "true"
|
||||
set aQMsgBoxHPath [wokdep:SearchHeader "QtGui/qmessagebox.h"]
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{qt}*] "$::VCVER" "$::ARCH" ]
|
||||
set aQMsgBoxHPath [wokdep:SearchHeader "QtGui/qguiapplication.h"]
|
||||
if { "$aQMsgBoxHPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{qt4}*] "$::VCVER" "$::ARCH" ]
|
||||
if { "$aPath" != "" && [file exists "$aPath/include/QtGui/qmessagebox.h"] } {
|
||||
if { "$aPath" != "" && [file exists "$aPath/include/QtGui/qguiapplication.h"] } {
|
||||
lappend ::CSF_OPT_INC "$aPath/include"
|
||||
lappend ::CSF_OPT_INC "$aPath/include/Qt"
|
||||
lappend ::CSF_OPT_INC "$aPath/include/QtGui"
|
||||
lappend ::CSF_OPT_INC "$aPath/include/QtCore"
|
||||
lappend ::CSF_OPT_INC "$aPath/include/QtWidgets"
|
||||
lappend ::CSF_OPT_INC "$aPath/include/QtXml"
|
||||
} else {
|
||||
if { [file exists "/usr/include/qt4/QtGui/qmessagebox.h"] } {
|
||||
lappend ::CSF_OPT_INC "/usr/include/qt4"
|
||||
lappend ::CSF_OPT_INC "/usr/include/qt4/Qt"
|
||||
lappend ::CSF_OPT_INC "/usr/include/qt4/QtGui"
|
||||
lappend ::CSF_OPT_INC "/usr/include/qt4/QtCore"
|
||||
} else {
|
||||
lappend anErrInc "Error: 'QtGui/qmessagebox.h' not found (Qt4)"
|
||||
lappend anErrInc "Error: 'QtGui/qguiapplication.h' not found"
|
||||
set isFound "false"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set aQtGuiLibName "QtGui"
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aQtGuiLibName "QtGui4"
|
||||
set aQtGuiLibName "Qt5Gui"
|
||||
}
|
||||
|
||||
foreach anArchIter {64 32} {
|
||||
set aQMsgBoxLibPath [wokdep:SearchLib "${aQtGuiLibName}" "$anArchIter"]
|
||||
if { "$aQMsgBoxLibPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{qt4}*] "$::VCVER" "$anArchIter" ]
|
||||
set aQMsgBoxLibPath [wokdep:SearchLib "${aQtGuiLibName}" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aQMsgBoxLibPath" != "" } {
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib"
|
||||
} else {
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}${aQtGuiLibName}.${::SYS_LIB_SUFFIX}' not found (Qt4)"
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}${aQtGuiLibName}.${::SYS_LIB_SUFFIX}' not found (Qt)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aQMsgBoxDllPath [wokdep:SearchBin "QtGui4.dll" "$anArchIter"]
|
||||
set aQMsgBoxDllPath [wokdep:SearchBin "${aQtGuiLibName}.dll" "$anArchIter"]
|
||||
if { "$aQMsgBoxDllPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{qt4}*] "$::VCVER" "$anArchIter" ]
|
||||
set aQMsgBoxDllPath [wokdep:SearchBin "QtGui4.dll" "$anArchIter" "$aPath/bin"]
|
||||
set aQMsgBoxDllPath [wokdep:SearchBin "${aQtGuiLibName}.dll" "$anArchIter" "$aPath/bin"]
|
||||
if { "$aQMsgBoxDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
|
||||
} else {
|
||||
lappend anErrBin$anArchIter "Error: 'QtGui4.dll' not found (Qt4)"
|
||||
lappend anErrBin$anArchIter "Error: '${aQtGuiLibName}.dll' not found (Qt)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
|
527
adm/genproj.tcl
527
adm/genproj.tcl
File diff suppressed because it is too large
Load Diff
@@ -77,6 +77,9 @@ if "%VCVER:~-4%" == "-uwp" (
|
||||
set VCLIB=%VCLIB%-uwp
|
||||
set VCPROP=Universal
|
||||
)
|
||||
if "%VCFMT%" == "vclang" (
|
||||
set VCLIB=vc14
|
||||
)
|
||||
rem echo VCVER=%VCVER% VCFMT=%VCFMT% VCLIB=%VCLIB% VCPROP=%VCPROP%
|
||||
|
||||
rem ----- Parsing of Visual Studio platform -----
|
||||
@@ -106,6 +109,10 @@ if not "%DevEnvDir%" == "" (
|
||||
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
||||
set "DevEnvDir=%%i\Common7\IDE\"
|
||||
)
|
||||
) else if /I "%VCFMT%" == "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" (
|
||||
rem MinGW
|
||||
) else (
|
||||
@@ -118,6 +125,7 @@ if not "%DevEnvDir%" == "" (
|
||||
echo vc14 = VS 2015
|
||||
echo vc141 = VS 2017
|
||||
echo vc142 = VS 2019
|
||||
echo vclang = VS 2019 with ClangCL toolset
|
||||
exit /B
|
||||
)
|
||||
|
||||
@@ -147,6 +155,11 @@ if /I "%VCFMT%" == "vc9" (
|
||||
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
)
|
||||
set "VCPlatformToolSet=v142"
|
||||
) else if /I "%VCFMT%" == "vclang" (
|
||||
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
|
||||
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
)
|
||||
set "VCPlatformToolSet=ClangCL"
|
||||
) else if /I "%VCFMT%" == "gcc" (
|
||||
rem MinGW
|
||||
) else (
|
||||
|
@@ -159,7 +159,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
|
||||
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
|
||||
<OutputFile>.\..\..\..\win32\__VCVER__\bind\__TKNAM__.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -255,7 +255,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
|
||||
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
|
||||
<OutputFile>.\..\..\..\win64\__VCVER__\bind\__TKNAM__.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
|
@@ -149,7 +149,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
|
||||
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -238,7 +238,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
|
||||
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@@ -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:
|
||||
|
||||
> 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
|
||||
> 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
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image006.png}
|
||||
|
||||
|
@@ -150,7 +150,8 @@ 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.
|
||||
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>. This macro creates a local variable, that will open Json structure on start, and close on exit from this method.
|
||||
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).
|
||||
This macro appends class name into output stream.
|
||||
|
||||
3. Add several macro to store field values.
|
||||
|
||||
@@ -368,3 +369,53 @@ Each counter has its name shown when the collected statistics are printed.
|
||||
In DRAW, use command *dperf* to print all performance statistics.
|
||||
|
||||
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,3 +1888,17 @@ Unexpected const-ness of Aspect_Window::DoResize() method has been removed, so t
|
||||
@subsection upgrade_750_rename Renaming of types
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@subsection upgrade_750_Booleans Changes in Boolean operations algorithm
|
||||
|
||||
* TreatCompound method has been moved from *BOPAlgo_Tools* to *BOPTools_AlgoTools*. Additionally, the map parameter became optional:
|
||||
~~~~
|
||||
void BOPTools_AlgoTools::TreatCompound (const TopoDS_Shape& theS,
|
||||
TopTools_ListOfShape& theLS,
|
||||
TopTools_MapOfShape* theMap = NULL);
|
||||
~~~~
|
||||
|
@@ -210,7 +210,7 @@ for which OCCT is certified to work.
|
||||
|
||||
| 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> 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>, LLVM (ClangCL), GCC 4.3+ (Mingw-w64)|
|
||||
| Linux | GNU gcc 4.3+ <br> LLVM CLang 3.6+ |
|
||||
| OS X / macOS | XCode 6 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
|
||||
donl result
|
||||
donly result
|
||||
nexplode result f
|
||||
erase result
|
||||
fit
|
||||
@@ -108,13 +108,13 @@ ttranslate cyl cyl 0 7.5 0
|
||||
sage " Display the Shape on Hidden Line Mode "
|
||||
sage " hlr hid r"
|
||||
sage ""
|
||||
donl r
|
||||
donly r
|
||||
hlr hid r
|
||||
sage " Display the Shape on HLR Mode "
|
||||
sage " hlr nohid r"
|
||||
sage " hlr hlr r"
|
||||
sage ""
|
||||
donl r
|
||||
donly r
|
||||
hlr nohid r
|
||||
hlr hlr r
|
||||
sage "Demo completed"
|
||||
|
@@ -57,11 +57,10 @@ for {set i 0} {$i < 12} {incr i} {
|
||||
}
|
||||
|
||||
# Configure light sources
|
||||
vlight del 1
|
||||
vlight change 0 head 0
|
||||
vlight change 0 direction -0.25 -1 -1
|
||||
vlight change 0 sm 0.3
|
||||
vlight change 0 int 10
|
||||
vlight -change 0 -head 0
|
||||
vlight -change 0 -direction -0.25 -1 -1
|
||||
vlight -change 0 -sm 0.3
|
||||
vlight -change 0 -int 10.0
|
||||
|
||||
# Load environment map
|
||||
vtextureenv on 1
|
||||
|
@@ -12,11 +12,8 @@ vinit name=View1 w=512 h=512
|
||||
vglinfo
|
||||
|
||||
# setup light sources
|
||||
vlight del 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
|
||||
vlight -clear
|
||||
vlight -add positional -head 0 -pos 0.5 0.5 0.85 -sm 0.06 -int 30.0
|
||||
|
||||
vvbo 0
|
||||
vsetdispmode 1
|
||||
|
@@ -208,8 +208,9 @@ vviewparams -eye 139.412 -1.62643 178.037
|
||||
vviewparams -size 170.508
|
||||
|
||||
# Restore light source parameters
|
||||
vlight clear
|
||||
vlight add directional direction -0.303949 -0.434084 -0.848048 smoothness 0.3 intensity 12
|
||||
vlight -clear
|
||||
vlight -add ambient
|
||||
vlight -add directional -direction -0.303949 -0.434084 -0.848048 -smoothness 0.3 -intensity 12
|
||||
|
||||
# Load environment map
|
||||
vtextureenv on 1
|
||||
|
91
samples/tcl/vis_pbr_spheres.tcl
Normal file
91
samples/tcl/vis_pbr_spheres.tcl
Normal file
@@ -0,0 +1,91 @@
|
||||
# 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
|
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <Message.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Message_PrinterSystemLog.hxx>
|
||||
#include <OSD_MemInfo.hxx>
|
||||
#include <OSD_Parallel.hxx>
|
||||
|
||||
@@ -56,6 +57,8 @@ static void onFileReadFailed (void* theOpaque)
|
||||
int main()
|
||||
{
|
||||
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);
|
||||
aViewer.run();
|
||||
Message::DefaultMessenger()->Send (OSD_MemInfo::PrintInfo(), Message_Trace);
|
||||
|
@@ -197,7 +197,7 @@ void AIS_Circle::UnsetColor()
|
||||
}
|
||||
else
|
||||
{
|
||||
Quantity_Color CC = Quantity_NOC_YELLOW;;
|
||||
Quantity_Color CC = Quantity_NOC_YELLOW;
|
||||
if( HasColor() ) CC = myDrawer->Color();
|
||||
else if (myDrawer->HasLink()) AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
|
||||
myDrawer->LineAspect()->SetColor(CC);
|
||||
|
@@ -300,7 +300,7 @@ void AIS_FixRelation::ComputeVertex(const TopoDS_Vertex& /*FixVertex*/,
|
||||
gp_Pln pln(myPlane->Pln());
|
||||
gp_Dir dir(pln.XAxis().Direction());
|
||||
gp_Vec transvec = gp_Vec(dir)*myArrowSize;
|
||||
curpos = myPntAttach.Translated(transvec);;
|
||||
curpos = myPntAttach.Translated(transvec);
|
||||
myPosition = curpos;
|
||||
myAutomaticPosition = Standard_True;
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
//! Returns true if the Interactive Objects in the relation
|
||||
//! are movable.
|
||||
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE;
|
||||
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; }
|
||||
|
||||
//! computes the presentation according to a point of view
|
||||
//! given by <aProjector>.
|
||||
@@ -109,6 +109,4 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#include <AIS_FixRelation.lxx>
|
||||
|
||||
#endif // _AIS_FixRelation_HeaderFile
|
||||
|
@@ -1,24 +0,0 @@
|
||||
// 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)
|
||||
{
|
||||
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_Dir dir(pln.XAxis().Direction());
|
||||
gp_Vec transvec = gp_Vec(dir)*myArrowSize;
|
||||
curpos = myFAttach.Translated(transvec);;
|
||||
curpos = myFAttach.Translated(transvec);
|
||||
myPosition = curpos;
|
||||
myAutomaticPosition = Standard_True;
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ public:
|
||||
void ClearUsers() { myUsers.Clear(); }
|
||||
|
||||
//! Returns true if the interactive object is movable.
|
||||
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE;
|
||||
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; }
|
||||
|
||||
//! computes the presentation according to a point of view
|
||||
//! given by <aProjector>.
|
||||
@@ -134,11 +134,4 @@ private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <AIS_IdenticRelation.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _AIS_IdenticRelation_HeaderFile
|
||||
|
@@ -1,24 +0,0 @@
|
||||
// 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,13 +65,15 @@ namespace
|
||||
typedef NCollection_DataMap<Handle(SelectMgr_SelectableObject), Handle(SelectMgr_IndexedMapOfOwner)>::Iterator AIS_MapIteratorOfMapOfObjectOwners;
|
||||
|
||||
//! 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->SetDisplayMode (0);
|
||||
theDrawer->SetColor (theColor);
|
||||
|
||||
theDrawer->SetPointAspect (new Prs3d_PointAspect (Aspect_TOM_POINT, Quantity_NOC_BLACK, 1.0));
|
||||
*theDrawer->PointAspect()->Aspect() = *theDrawer->Link()->PointAspect()->Aspect();
|
||||
theDrawer->SetupOwnShadingAspect();
|
||||
theDrawer->SetupOwnPointAspect();
|
||||
theDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0));
|
||||
*theDrawer->LineAspect()->Aspect() = *theDrawer->Link()->LineAspect()->Aspect();
|
||||
theDrawer->SetWireAspect (new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0));
|
||||
@@ -82,6 +84,24 @@ namespace
|
||||
*theDrawer->FreeBoundaryAspect()->Aspect() = *theDrawer->Link()->FreeBoundaryAspect()->Aspect();
|
||||
theDrawer->SetUnFreeBoundaryAspect (new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0));
|
||||
*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->LineAspect()->SetWidth (2.0);
|
||||
@@ -130,30 +150,26 @@ myIsAutoActivateSelMode(Standard_True)
|
||||
{
|
||||
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_Dynamic];
|
||||
aStyle->Link (myDefaultDrawer);
|
||||
initDefaultHilightAttributes (aStyle);
|
||||
initDefaultHilightAttributes (aStyle, Quantity_NOC_CYAN1);
|
||||
aStyle->SetZLayer(Graphic3d_ZLayerId_Top);
|
||||
aStyle->SetColor (Quantity_NOC_CYAN1);
|
||||
}
|
||||
{
|
||||
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_LocalDynamic];
|
||||
aStyle->Link (myDefaultDrawer);
|
||||
initDefaultHilightAttributes (aStyle);
|
||||
initDefaultHilightAttributes (aStyle, Quantity_NOC_CYAN1);
|
||||
aStyle->SetZLayer(Graphic3d_ZLayerId_Topmost);
|
||||
aStyle->SetColor (Quantity_NOC_CYAN1);
|
||||
}
|
||||
{
|
||||
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_Selected];
|
||||
aStyle->Link (myDefaultDrawer);
|
||||
initDefaultHilightAttributes (aStyle);
|
||||
initDefaultHilightAttributes (aStyle, Quantity_NOC_GRAY80);
|
||||
aStyle->SetZLayer(Graphic3d_ZLayerId_UNKNOWN);
|
||||
aStyle->SetColor (Quantity_NOC_GRAY80);
|
||||
}
|
||||
{
|
||||
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_LocalSelected];
|
||||
aStyle->Link (myDefaultDrawer);
|
||||
initDefaultHilightAttributes (aStyle);
|
||||
initDefaultHilightAttributes (aStyle, Quantity_NOC_GRAY80);
|
||||
aStyle->SetZLayer(Graphic3d_ZLayerId_UNKNOWN);
|
||||
aStyle->SetColor (Quantity_NOC_GRAY80);
|
||||
}
|
||||
{
|
||||
const Handle(Prs3d_Drawer)& aStyle = myStyles[Prs3d_TypeOfHighlight_SubIntensity];
|
||||
|
@@ -1216,6 +1216,9 @@ public: //! @name sub-intensity management (deprecated)
|
||||
//! @param theSelection an instance of the selection
|
||||
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
|
||||
|
||||
Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const;
|
||||
|
@@ -86,3 +86,42 @@ void AIS_InteractiveContext::PolygonOffsets(
|
||||
anObj->PolygonOffsets( aMode, aFactor, aUnits );
|
||||
}
|
||||
// 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
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void AIS_InteractiveObject::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
|
||||
void AIS_InteractiveObject::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
||||
{
|
||||
OCCT_DUMP_CLASS_BEGIN (theOStream, AIS_InteractiveObject);
|
||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
||||
|
||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_SelectableObject);
|
||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCTXPtr);
|
||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOwner);
|
||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_SelectableObject)
|
||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCTXPtr)
|
||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOwner)
|
||||
}
|
||||
|
@@ -119,7 +119,7 @@ public:
|
||||
Standard_EXPORT void SetAspect (const Handle(Prs3d_BasicAspect)& anAspect);
|
||||
|
||||
//! Dumps the content of me into the stream
|
||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
||||
protected:
|
||||
|
||||
//! The TypeOfPresention3d means that the interactive object
|
||||
|
@@ -30,7 +30,8 @@
|
||||
#include <V3d_View.hxx>
|
||||
#include <Standard_Version.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)
|
||||
|
||||
|
@@ -168,7 +168,7 @@ void AIS_OffsetDimension::ComputeSelection(const Handle(SelectMgr_Selection)& aS
|
||||
gp_Pnt myTSAttach = mySAttach.Transformed (myRelativePos);
|
||||
gp_Dir myTDirAttach = myDirAttach.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 L2 (myTSAttach,myTDirAttach2);
|
||||
|
@@ -990,3 +990,19 @@ Standard_Boolean AIS_Shape::OwnHLRDeviationAngle ( Standard_Real & anAngle,
|
||||
aPreviousAngle = myDrawer->PreviousHLRDeviationAngle ();
|
||||
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,6 +325,9 @@ public:
|
||||
const TopoDS_Shape& theShape,
|
||||
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:
|
||||
|
||||
TopoDS_Shape myshape; //!< shape to display
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include <Prs3d_DatumAspect.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Prs3d_LineAspect.hxx>
|
||||
#include <Prs3d_PointAspect.hxx>
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
#include <Prs3d_Projector.hxx>
|
||||
#include <Prs3d_ShadingAspect.hxx>
|
||||
@@ -59,6 +60,8 @@ AIS_Trihedron::AIS_Trihedron (const Handle(Geom_Axis2Placement)& theComponent)
|
||||
myTrihDispMode (Prs3d_DM_WireFrame),
|
||||
myComponent (theComponent)
|
||||
{
|
||||
myAutoHilight = Standard_False;
|
||||
|
||||
// selection priorities
|
||||
mySelectionPriority.Bind (Prs3d_DP_None, 5); // complete triedron: priority 5 (same as faces)
|
||||
mySelectionPriority.Bind (Prs3d_DP_Origin, 8); // origin: priority 8
|
||||
@@ -70,6 +73,7 @@ AIS_Trihedron::AIS_Trihedron (const Handle(Geom_Axis2Placement)& theComponent)
|
||||
{
|
||||
mySelectionPriority.Bind ((Prs3d_DatumParts )aPartIter, 5); // planes: priority: 5
|
||||
}
|
||||
myHiddenLineAspect = new Graphic3d_AspectLine3d (Quantity_NOC_WHITE, Aspect_TOL_EMPTY, 1.0f);
|
||||
|
||||
// trihedron labels
|
||||
myLabel.Bind (Prs3d_DP_XAxis, "X");
|
||||
@@ -135,7 +139,6 @@ void AIS_Trihedron::SetSize(const Standard_Real aValue)
|
||||
myDrawer->DatumAspect()->SetAxisLength(aValue, aValue, aValue);
|
||||
|
||||
SetToUpdate();
|
||||
UpdatePresentations();
|
||||
UpdateSelection();
|
||||
}
|
||||
|
||||
@@ -163,7 +166,6 @@ void AIS_Trihedron::UnsetSize()
|
||||
else
|
||||
{
|
||||
SetToUpdate();
|
||||
UpdatePresentations();
|
||||
}
|
||||
UpdateSelection();
|
||||
}
|
||||
@@ -310,36 +312,37 @@ void AIS_Trihedron::HilightOwnerWithColor (const Handle(PrsMgr_PresentationManag
|
||||
aPresentation->Clear();
|
||||
const Prs3d_DatumParts aPart = anOwner->DatumPart();
|
||||
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (aPresentation);
|
||||
Handle(Prs3d_DatumAspect) anAspect = myDrawer->DatumAspect();
|
||||
if (aPart >= Prs3d_DP_XOYAxis && aPart <= Prs3d_DP_XOZAxis)
|
||||
{
|
||||
// planes selection is equal in both shading and wireframe mode
|
||||
aGroup->SetGroupPrimitivesAspect (getHighlightLineAspect()->Aspect());
|
||||
aGroup->SetGroupPrimitivesAspect (theStyle->LineAspect()->Aspect());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (myTrihDispMode == Prs3d_DM_Shaded)
|
||||
{
|
||||
aGroup->SetGroupPrimitivesAspect (anAspect->ShadingAspect(aPart)->Aspect());
|
||||
aGroup->SetGroupPrimitivesAspect (theStyle->ShadingAspect()->Aspect());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aPart == Prs3d_DP_Origin)
|
||||
{
|
||||
aGroup->SetGroupPrimitivesAspect (getHighlightPointAspect()->Aspect());
|
||||
aGroup->SetGroupPrimitivesAspect (theStyle->PointAspect()->Aspect());
|
||||
}
|
||||
else
|
||||
{
|
||||
aGroup->SetGroupPrimitivesAspect (anAspect->LineAspect(aPart)->Aspect());
|
||||
aGroup->SetGroupPrimitivesAspect(theStyle->LineAspect()->Aspect());
|
||||
}
|
||||
}
|
||||
}
|
||||
aGroup->AddPrimitiveArray (arrayOfPrimitives(aPart));
|
||||
|
||||
if (aPresentation->GetZLayer() != theStyle->ZLayer())
|
||||
const Graphic3d_ZLayerId aLayer = theStyle->ZLayer() != Graphic3d_ZLayerId_UNKNOWN ? theStyle->ZLayer() : myDrawer->ZLayer();
|
||||
if (aPresentation->GetZLayer() != aLayer)
|
||||
{
|
||||
aPresentation->SetZLayer (theStyle->ZLayer());
|
||||
aPresentation->SetZLayer (aLayer);
|
||||
}
|
||||
|
||||
aPresentation->Highlight (theStyle);
|
||||
thePM->AddToImmediateList (aPresentation);
|
||||
}
|
||||
@@ -356,25 +359,22 @@ void AIS_Trihedron::HilightSelected (const Handle(PrsMgr_PresentationManager3d)&
|
||||
return;
|
||||
}
|
||||
|
||||
Handle(Prs3d_DatumAspect) anAspect = myDrawer->DatumAspect();
|
||||
const bool isShadingMode = myTrihDispMode == Prs3d_DM_Shaded;
|
||||
|
||||
const Handle(Prs3d_Drawer)& aContextSelStyle = GetContext()->SelectionStyle();
|
||||
const Quantity_Color& aSelectionColor = aContextSelStyle->Color();
|
||||
Handle(Prs3d_Drawer) anAspect = !myHilightDrawer.IsNull() ? myHilightDrawer : GetContext()->SelectionStyle();
|
||||
for (SelectMgr_SequenceOfOwner::Iterator anIterator (theOwners); anIterator.More(); anIterator.Next())
|
||||
{
|
||||
const Handle(SelectMgr_EntityOwner)& anOwner = anIterator.Value();
|
||||
Handle(AIS_TrihedronOwner) aTrihedronOwner = Handle(AIS_TrihedronOwner)::DownCast(anOwner);
|
||||
if (aTrihedronOwner.IsNull())
|
||||
{
|
||||
thePM->Color (this, aContextSelStyle, 0);
|
||||
thePM->Color (this, anAspect, 0);
|
||||
continue;
|
||||
}
|
||||
|
||||
const Prs3d_DatumParts aPart = aTrihedronOwner->DatumPart();
|
||||
Handle(Graphic3d_Group) aGroup;
|
||||
if (mySelectedParts.Contains (aPart)
|
||||
|| !myPartToGroup.Find (aPart, aGroup))
|
||||
if (mySelectedParts.Contains (aPart) || !myPartToGroup.Find (aPart, aGroup))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -382,27 +382,23 @@ void AIS_Trihedron::HilightSelected (const Handle(PrsMgr_PresentationManager3d)&
|
||||
if (aPart >= Prs3d_DP_XOYAxis
|
||||
&& aPart <= Prs3d_DP_XOZAxis)
|
||||
{
|
||||
getHighlightLineAspect()->SetColor (aSelectionColor);
|
||||
aGroup->SetGroupPrimitivesAspect (getHighlightLineAspect()->Aspect());
|
||||
aGroup->SetGroupPrimitivesAspect (anAspect->LineAspect()->Aspect());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isShadingMode)
|
||||
{
|
||||
getHighlightAspect()->SetColor (aSelectionColor);
|
||||
aGroup->SetGroupPrimitivesAspect (getHighlightAspect()->Aspect());
|
||||
aGroup->SetGroupPrimitivesAspect (anAspect->ShadingAspect()->Aspect());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aPart == Prs3d_DP_Origin)
|
||||
{
|
||||
getHighlightPointAspect()->SetColor (aSelectionColor);
|
||||
aGroup->SetGroupPrimitivesAspect (getHighlightPointAspect()->Aspect());
|
||||
aGroup->SetGroupPrimitivesAspect (anAspect->PointAspect()->Aspect());
|
||||
}
|
||||
else
|
||||
{
|
||||
getHighlightLineAspect()->SetColor (aSelectionColor);
|
||||
aGroup->SetGroupPrimitivesAspect (getHighlightLineAspect()->Aspect());
|
||||
aGroup->SetGroupPrimitivesAspect (anAspect->LineAspect()->Aspect());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -426,9 +422,9 @@ void AIS_Trihedron::ClearSelected()
|
||||
if (aPart >= Prs3d_DP_XOYAxis
|
||||
&& aPart <= Prs3d_DP_XOZAxis)
|
||||
{
|
||||
aGroup->SetGroupPrimitivesAspect (anAspect->LineAspect (aPart)->Aspect());
|
||||
aGroup->SetGroupPrimitivesAspect (myHiddenLineAspect);
|
||||
}
|
||||
if (isShadingMode)
|
||||
else if (isShadingMode)
|
||||
{
|
||||
aGroup->SetGroupPrimitivesAspect (anAspect->ShadingAspect (aPart)->Aspect());
|
||||
}
|
||||
@@ -553,11 +549,8 @@ void AIS_Trihedron::computePresentation (const Handle(PrsMgr_PresentationManager
|
||||
Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePrs);
|
||||
myPartToGroup.Bind (aPart, aGroup);
|
||||
|
||||
const Handle(Graphic3d_AspectLine3d)& aLineAspect = anAspect->LineAspect (aPart)->Aspect();
|
||||
aLineAspect->SetType (Aspect_TOL_EMPTY);
|
||||
|
||||
aGroup->AddPrimitiveArray (arrayOfPrimitives (aPart));
|
||||
aGroup->SetGroupPrimitivesAspect (aLineAspect);
|
||||
aGroup->SetGroupPrimitivesAspect (myHiddenLineAspect);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -934,64 +927,19 @@ void AIS_Trihedron::updatePrimitives(const Handle(Prs3d_DatumAspect)& theAspect,
|
||||
}
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : getHighlightAspect
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Handle(Prs3d_ShadingAspect) AIS_Trihedron::getHighlightAspect()
|
||||
//=======================================================================
|
||||
//function : DumpJson
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void AIS_Trihedron::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
||||
{
|
||||
if (!myHighlightAspect.IsNull())
|
||||
return myHighlightAspect;
|
||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
||||
|
||||
Quantity_Color aHighlightColor = Quantity_NOC_GRAY80;
|
||||
if (!myHilightDrawer.IsNull())
|
||||
aHighlightColor = myHilightDrawer->Color();
|
||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, AIS_InteractiveObject)
|
||||
|
||||
myHighlightAspect = new Prs3d_ShadingAspect();
|
||||
myHighlightAspect->Aspect()->SetInteriorStyle (Aspect_IS_SOLID);
|
||||
myHighlightAspect->SetColor (aHighlightColor);
|
||||
|
||||
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;
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnSize)
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnTextColor)
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnArrowColor)
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDatumAspect)
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTrihDispMode)
|
||||
}
|
||||
|
@@ -186,9 +186,6 @@ 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
|
||||
//! to this selectable object ( for fast presentation draw ).
|
||||
Standard_EXPORT virtual void ClearSelected() Standard_OVERRIDE;
|
||||
@@ -222,6 +219,9 @@ protected:
|
||||
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
|
||||
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:
|
||||
|
||||
//! Creates a sensitive entity for the datum part that will be used in selection owner creation.
|
||||
@@ -248,13 +248,6 @@ protected:
|
||||
const gp_Dir& theYDir,
|
||||
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:
|
||||
Standard_Boolean myHasOwnSize;
|
||||
Standard_Boolean myHasOwnTextColor;
|
||||
@@ -269,10 +262,7 @@ protected:
|
||||
|
||||
NCollection_DataMap<Prs3d_DatumParts, Handle(Graphic3d_Group)> myPartToGroup;
|
||||
NCollection_List<Prs3d_DatumParts> mySelectedParts;
|
||||
|
||||
Handle(Prs3d_ShadingAspect) myHighlightAspect;
|
||||
Handle(Prs3d_LineAspect) myHighlightLineAspect;
|
||||
Handle(Prs3d_PointAspect) myHighlightPointAspect;
|
||||
Handle(Graphic3d_AspectLine3d) myHiddenLineAspect;
|
||||
|
||||
NCollection_DataMap<Prs3d_DatumParts, Handle(Graphic3d_ArrayOfPrimitives)> myPrimitives;
|
||||
};
|
||||
|
@@ -113,6 +113,15 @@ AIS_ViewController::AIS_ViewController()
|
||||
myMouseGestureMap.Bind (Aspect_VKeyMouse_MiddleButton | Aspect_VKeyFlags_CTRL, AIS_MouseGesture_Pan);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : ~AIS_ViewController
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
AIS_ViewController::~AIS_ViewController()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : ResetViewInput
|
||||
// purpose :
|
||||
|
@@ -51,6 +51,9 @@ public:
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT AIS_ViewController();
|
||||
|
||||
//! Destructor.
|
||||
Standard_EXPORT virtual ~AIS_ViewController();
|
||||
|
||||
//! Return input buffer.
|
||||
const AIS_ViewInputBuffer& InputBuffer (AIS_ViewInputBufferType theType) const { return theType == AIS_ViewInputBufferType_UI ? myUI : myGL; }
|
||||
|
||||
|
@@ -69,14 +69,12 @@ AIS_ExclusionFilter.hxx
|
||||
AIS_ExclusionFilter.lxx
|
||||
AIS_FixRelation.cxx
|
||||
AIS_FixRelation.hxx
|
||||
AIS_FixRelation.lxx
|
||||
AIS_GlobalStatus.cxx
|
||||
AIS_GlobalStatus.hxx
|
||||
AIS_GraphicTool.cxx
|
||||
AIS_GraphicTool.hxx
|
||||
AIS_IdenticRelation.cxx
|
||||
AIS_IdenticRelation.hxx
|
||||
AIS_IdenticRelation.lxx
|
||||
AIS_IndexedDataMapOfOwnerPrs.hxx
|
||||
AIS_InteractiveContext.cxx
|
||||
AIS_InteractiveContext.hxx
|
||||
|
@@ -530,7 +530,7 @@ gp_Circ2d Adaptor2d_OffsetCurve::Circle() const
|
||||
gp_Elips2d Adaptor2d_OffsetCurve::Ellipse() const
|
||||
{
|
||||
if (myCurve->GetType() == GeomAbs_Ellipse && myOffset == 0.) {
|
||||
return myCurve->Ellipse();;
|
||||
return myCurve->Ellipse();
|
||||
}
|
||||
else {
|
||||
throw Standard_NoSuchObject("Adaptor2d_OffsetCurve:Ellipse");
|
||||
@@ -656,19 +656,16 @@ static Standard_Integer nbPoints(const Handle(Adaptor2d_HCurve2d)& theCurve)
|
||||
|
||||
Standard_Integer nbs = 20;
|
||||
|
||||
if (theCurve->GetType() == GeomAbs_Line)
|
||||
nbs = 2;
|
||||
else if (theCurve->GetType() == GeomAbs_BezierCurve)
|
||||
if (theCurve->GetType() == GeomAbs_BezierCurve)
|
||||
{
|
||||
nbs = 3 + theCurve->NbPoles();
|
||||
nbs = Max(nbs, 3 + theCurve->NbPoles());
|
||||
}
|
||||
else if (theCurve->GetType() == GeomAbs_BSplineCurve) {
|
||||
nbs = theCurve->NbKnots();
|
||||
nbs *= theCurve->Degree();
|
||||
nbs = Max(nbs, theCurve->NbKnots() * theCurve->Degree());
|
||||
}
|
||||
|
||||
if (nbs > 200)
|
||||
nbs = 200;
|
||||
if (nbs > 300)
|
||||
nbs = 300;
|
||||
return nbs;
|
||||
|
||||
}
|
||||
|
@@ -540,7 +540,7 @@ Standard_Boolean Adaptor3d_TopolTool::IsThePointOn(const gp_Pnt2d& P,
|
||||
if (surumin || survmin || surumax || survmax) {
|
||||
return(Standard_True);
|
||||
}
|
||||
return(Standard_False);;
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -933,6 +933,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
||||
const Standard_Integer theNUmin,
|
||||
const Standard_Integer theNVmin)
|
||||
{
|
||||
const Standard_Integer aMaxPnts = 1001;
|
||||
const Handle(Geom_BSplineSurface)& aBS = myS->BSpline();
|
||||
Standard_Real uinf,usup,vinf,vsup;
|
||||
uinf = myS->FirstUParameter(); usup = myS->LastUParameter();
|
||||
@@ -999,11 +1000,20 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
||||
nbsu = theNUmin;
|
||||
bUuniform = Standard_True;
|
||||
}
|
||||
|
||||
else if (nbsu > aMaxPnts)
|
||||
{
|
||||
nbsu = aMaxPnts;
|
||||
bUuniform = Standard_True;
|
||||
}
|
||||
if(nbsv < theNVmin) {
|
||||
nbsv = theNVmin;
|
||||
bVuniform = Standard_True;
|
||||
}
|
||||
else if (nbsv > aMaxPnts)
|
||||
{
|
||||
nbsv = aMaxPnts;
|
||||
bVuniform = Standard_True;
|
||||
}
|
||||
|
||||
TColStd_Array1OfReal anUPars(1, nbsu);
|
||||
TColStd_Array1OfBoolean anUFlg(1, nbsu);
|
||||
|
@@ -16,12 +16,8 @@
|
||||
#define AdvApp2Var_SysBase_HeaderFile
|
||||
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <Standard_TypeDef.hxx>
|
||||
#include <AdvApp2Var_Data_f2c.hxx>
|
||||
#if _MSC_VER
|
||||
#include <stddef.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
class AdvApp2Var_SysBase {
|
||||
public:
|
||||
|
@@ -374,7 +374,7 @@ void AppBlend_AppSurf::InternalPerform(const Handle(TheLine)& Lin,
|
||||
Standard_Real Uf = F.Parameter(Lin->Point(1));
|
||||
Standard_Real Ul = F.Parameter(Lin->Point(NbPoint))-Uf;
|
||||
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,
|
||||
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 Ul = F.Parameter(Lin->Point(NbPoint))-Uf;
|
||||
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,
|
||||
|
@@ -452,7 +452,7 @@ AppCont_LeastSquare::AppCont_LeastSquare(const AppCont_Function& SSP,
|
||||
myDone = Standard_True;
|
||||
for (i = bdeb; i <= bfin; i++) {
|
||||
for (j = bdeb; j <= bfin; j++) {
|
||||
IBPij = IBP(i, j);;
|
||||
IBPij = IBP(i, j);
|
||||
for (k = 1; k<= nbcol; k++) {
|
||||
myPoles(i, k) += IBPij * B2(j, k);
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ void AppParCurves::Bernstein(const Standard_Integer NbPoles,
|
||||
math_Matrix& DA) {
|
||||
|
||||
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();
|
||||
math_Vector B(1, NbPoles-1);
|
||||
|
||||
|
@@ -1272,7 +1272,7 @@ const AppParCurves_MultiBSpCurve& AppParCurves_LeastSquare::BSplineValue()
|
||||
{
|
||||
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_Pnt2d Pt2d;
|
||||
Standard_Integer ideb = resinit, ifin = resfin;
|
||||
|
@@ -16,6 +16,7 @@
|
||||
//AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support
|
||||
|
||||
#include <AppStd_Application.hxx>
|
||||
#include <Standard_Dump.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application)
|
||||
|
||||
@@ -29,3 +30,13 @@ Standard_CString AppStd_Application::ResourcesName() {
|
||||
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,6 +35,9 @@ public:
|
||||
//! resources
|
||||
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)
|
||||
};
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
//AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support
|
||||
|
||||
#include <AppStdL_Application.hxx>
|
||||
#include <Standard_Dump.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application)
|
||||
|
||||
@@ -30,3 +31,13 @@ Standard_CString AppStdL_Application::ResourcesName()
|
||||
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,6 +34,9 @@ public:
|
||||
//! resources
|
||||
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)
|
||||
};
|
||||
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <GeomAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
@@ -611,15 +612,69 @@ Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d
|
||||
gp_Pnt2d aF2d = theC2D->Value(theC2D->FirstParameter());
|
||||
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)
|
||||
{
|
||||
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 = new Geom_TrimmedCurve(aC3d, aF2d.Y(), aL2d.Y());
|
||||
if (isToTrim)
|
||||
aC3d = new Geom_TrimmedCurve(aC3d, aV1Param, aV2Param);
|
||||
}
|
||||
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 = new Geom_TrimmedCurve(aC3d, aF2d.X(), aL2d.X());
|
||||
if (isToTrim)
|
||||
aC3d = new Geom_TrimmedCurve(aC3d, aU1Param, aU2Param);
|
||||
}
|
||||
|
||||
// Convert arbitrary curve type to the b-spline.
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -20,21 +20,17 @@
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class Geom2d_BSplineCurve;
|
||||
class Adaptor2d_HCurve2d;
|
||||
class Adaptor3d_HCurve;
|
||||
class Adaptor3d_HSurface;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_ConstructionError;
|
||||
class Geom_Curve;
|
||||
class Geom2d_Curve;
|
||||
class Geom_Surface;
|
||||
|
||||
|
||||
//! Approximation of a PCurve on a surface to make its
|
||||
//! Approximation of a PCurve on a surface to make its
|
||||
//! parameter be the same that the parameter of a given 3d
|
||||
//! reference curve.
|
||||
class Approx_SameParameter
|
||||
@@ -43,63 +39,149 @@ public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Warning: the C3D and C2D must have the same parametric domain.
|
||||
Standard_EXPORT Approx_SameParameter(const Handle(Geom_Curve)& C3D,
|
||||
const Handle(Geom2d_Curve)& C2D,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Warning: the C3D and C2D must have the same parametric domain.
|
||||
Standard_EXPORT Approx_SameParameter(const Handle(Geom_Curve)& C3D, const Handle(Geom2d_Curve)& C2D, const Handle(Geom_Surface)& S, const Standard_Real Tol);
|
||||
|
||||
Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D, const Handle(Geom2d_Curve)& C2D, const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol);
|
||||
|
||||
Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D,
|
||||
const Handle(Geom2d_Curve)& C2D,
|
||||
const Handle(Adaptor3d_HSurface)& S,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Warning: the C3D and C2D must have the same parametric domain.
|
||||
Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D, const Handle(Adaptor2d_HCurve2d)& C2D, const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol);
|
||||
|
||||
Standard_Boolean IsDone() const;
|
||||
|
||||
Standard_Real TolReached() const;
|
||||
|
||||
//! Tells whether the original data had already the same
|
||||
//! parameter up to the tolerance : in that case nothing
|
||||
Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D,
|
||||
const Handle(Adaptor2d_HCurve2d)& C2D,
|
||||
const Handle(Adaptor3d_HSurface)& S,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//!@Returns .false. if calculations failed,
|
||||
//! .true. if calculations succeed
|
||||
Standard_Boolean IsDone() const
|
||||
{
|
||||
return myDone;
|
||||
}
|
||||
|
||||
//!@Returns tolerance (maximal distance) between 3d curve
|
||||
//! and curve on surface, generated by 2d curve and surface.
|
||||
Standard_Real TolReached() const
|
||||
{
|
||||
return myTolReached;
|
||||
}
|
||||
|
||||
//! Tells whether the original data had already the same
|
||||
//! parameter up to the tolerance : in that case nothing
|
||||
//! is done.
|
||||
Standard_Boolean IsSameParameter() const;
|
||||
|
||||
//! Returns the 2D curve that has the same parameter as
|
||||
//! the 3D curve once evaluated on the surface up to the
|
||||
//! specified tolerance
|
||||
Handle(Geom2d_BSplineCurve) Curve2d() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean IsSameParameter() const
|
||||
{
|
||||
return mySameParameter;
|
||||
}
|
||||
|
||||
//! Returns the 2D curve that has the same parameter as
|
||||
//! the 3D curve once evaluated on the surface up to the
|
||||
//! specified tolerance.
|
||||
Handle(Geom2d_Curve) Curve2d() const
|
||||
{
|
||||
return myCurve2d;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Compute the Pcurve (internal use only).
|
||||
//! Internal data structure to unify access to the most actively used data.
|
||||
//! This structure is not intended to be class field since
|
||||
//! a lot of memory is used in intermediate computations.
|
||||
struct Approx_SameParameter_Data
|
||||
{
|
||||
Adaptor3d_CurveOnSurface myCOnS; // Curve on surface.
|
||||
Standard_Integer myNbPnt; // Number of points.
|
||||
Standard_Real *myPC3d; // Parameters on 3d curve.
|
||||
Standard_Real *myPC2d; // Parameters on 2d curve.
|
||||
|
||||
// Second data arrays. Used in loop over poles.
|
||||
Standard_Real *myNewPC3d; // Parameters on 3d curve.
|
||||
Standard_Real *myNewPC2d; // Parameters on 2d curve.
|
||||
|
||||
// Parameters ranges.
|
||||
Standard_Real myC3dPF; // Curve 3d Parameter First.
|
||||
Standard_Real myC3dPL; // Curve 3d Parameter Last.
|
||||
Standard_Real myC2dPF; // Curve 2d Parameter First.
|
||||
Standard_Real myC2dPL; // Curve 2d Parameter Last.
|
||||
|
||||
Standard_Real myTol; // Working tolerance.
|
||||
|
||||
// Swap data arrays and update number of points.
|
||||
void Swap(const Standard_Integer theNewNbPoints)
|
||||
{
|
||||
myNbPnt = theNewNbPoints;
|
||||
Standard_Real * temp;
|
||||
|
||||
// 3-D
|
||||
temp = myPC3d;
|
||||
myPC3d = myNewPC3d;
|
||||
myNewPC3d = temp;
|
||||
|
||||
// 2-D
|
||||
temp = myPC2d;
|
||||
myPC2d = myNewPC2d;
|
||||
myNewPC2d = temp;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Approx_SameParameter(const Approx_SameParameter &);
|
||||
Approx_SameParameter& operator=(const Approx_SameParameter &);
|
||||
|
||||
//! Computes the pcurve (internal use only).
|
||||
Standard_EXPORT void Build (const Standard_Real Tol);
|
||||
|
||||
//! Computes initial point distribution.
|
||||
Standard_Boolean BuildInitialDistribution(Approx_SameParameter_Data &theData) const;
|
||||
|
||||
//! Increases initial number of samples in case of the C0 continuity.
|
||||
//! Return new number of points and corresponding data arrays.
|
||||
//@return true if new number of samples is good and false otherwise.
|
||||
Standard_Boolean IncreaseInitialNbSamples(Approx_SameParameter_Data &theData) const;
|
||||
|
||||
//! Computes tangents on boundary points.
|
||||
//@return true if tangents are not null and false otherwise.
|
||||
Standard_Boolean ComputeTangents(const Adaptor3d_CurveOnSurface & theCOnS,
|
||||
Standard_Real &theFirstTangent,
|
||||
Standard_Real &theLastTangent) const;
|
||||
|
||||
//! Method to check same parameter state
|
||||
//! and build dependency between 2d and 3d curves.
|
||||
//@return true if 2d and 3d curves have same parameter state and false otherwise.
|
||||
Standard_Boolean CheckSameParameter(Approx_SameParameter_Data &theData,
|
||||
Standard_Real &theSqDist) const;
|
||||
|
||||
//! Computes interpolated values.
|
||||
//!@Returns .false. if computations failed;
|
||||
Standard_Boolean Interpolate(const Approx_SameParameter_Data & theData,
|
||||
const Standard_Real aTangFirst,
|
||||
const Standard_Real aTangLast,
|
||||
TColStd_Array1OfReal & thePoles,
|
||||
TColStd_Array1OfReal & theFlatKnots) const;
|
||||
|
||||
//! Increases number of poles in poles loop.
|
||||
//@return true if poles is changed and false otherwise.
|
||||
Standard_Boolean IncreaseNbPoles(const TColStd_Array1OfReal & thePoles,
|
||||
const TColStd_Array1OfReal & theFlatKnots,
|
||||
Approx_SameParameter_Data & theData,
|
||||
Standard_Real &theBestSqTol) const;
|
||||
|
||||
static const Standard_Integer myNbSamples = 22; // To be consistent with "checkshape".
|
||||
static const Standard_Integer myMaxArraySize = 1000;
|
||||
const Standard_Real myDeltaMin; // Initialization is allowed only for integral types.
|
||||
|
||||
Standard_Boolean mySameParameter;
|
||||
Standard_Boolean myDone;
|
||||
Standard_Real myTolReached;
|
||||
Handle(Geom2d_BSplineCurve) myCurve2d;
|
||||
Handle(Geom2d_Curve) myCurve2d;
|
||||
Handle(Adaptor2d_HCurve2d) myHCurve2d;
|
||||
Handle(Adaptor3d_HCurve) myC3d;
|
||||
Handle(Adaptor3d_HSurface) mySurf;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Approx_SameParameter.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Approx_SameParameter_HeaderFile
|
||||
|
@@ -1,44 +0,0 @@
|
||||
// Created on: 1995-06-06
|
||||
// Created by: Modelistation
|
||||
// Copyright (c) 1995-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 : IsDone
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Boolean Approx_SameParameter::IsDone() const
|
||||
{ return myDone ; }
|
||||
//=======================================================================
|
||||
//function : TolReached
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Real Approx_SameParameter::TolReached() const
|
||||
{ return myTolReached; }
|
||||
//=======================================================================
|
||||
//function : IsSameParameter
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Boolean Approx_SameParameter::IsSameParameter() const
|
||||
{ return mySameParameter ; }
|
||||
//=======================================================================
|
||||
//function : Curve2d
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Handle(Geom2d_BSplineCurve) Approx_SameParameter::Curve2d() const
|
||||
{ return myCurve2d ; }
|
@@ -24,7 +24,6 @@ Approx_MCurvesToBSpCurve.hxx
|
||||
Approx_ParametrizationType.hxx
|
||||
Approx_SameParameter.cxx
|
||||
Approx_SameParameter.hxx
|
||||
Approx_SameParameter.lxx
|
||||
Approx_SequenceOfHArray1OfReal.hxx
|
||||
Approx_Status.hxx
|
||||
Approx_SweepApproximation.cxx
|
||||
|
@@ -305,30 +305,27 @@ void BOPAlgo_ArgumentAnalyzer::TestTypes()
|
||||
return;
|
||||
}
|
||||
//
|
||||
Standard_Integer aDim1, aDim2;
|
||||
Standard_Boolean bBadTypes = Standard_False;
|
||||
//
|
||||
aDim1 = BOPTools_AlgoTools::Dimension(myShape1);
|
||||
aDim2 = BOPTools_AlgoTools::Dimension(myShape2);
|
||||
if (aDim1 < aDim2) {
|
||||
if (myOperation == BOPAlgo_FUSE ||
|
||||
myOperation == BOPAlgo_CUT21) {
|
||||
bBadTypes = Standard_True;
|
||||
if (myOperation != BOPAlgo_UNKNOWN &&
|
||||
myOperation != BOPAlgo_COMMON)
|
||||
{
|
||||
Standard_Integer iDimMin[2], iDimMax[2];
|
||||
BOPTools_AlgoTools::Dimensions(myShape1, iDimMin[0], iDimMax[0]);
|
||||
BOPTools_AlgoTools::Dimensions(myShape2, iDimMin[1], iDimMax[1]);
|
||||
|
||||
Standard_Boolean bBadTypes =
|
||||
((myOperation == BOPAlgo_FUSE) &&
|
||||
(iDimMin[0] != iDimMax[0] || iDimMin[1] != iDimMax[1] || iDimMin[0] != iDimMin[1])) ||
|
||||
((myOperation == BOPAlgo_CUT) && (iDimMax[0] > iDimMin[1])) ||
|
||||
((myOperation == BOPAlgo_CUT21) && (iDimMin[0] < iDimMax[1]));
|
||||
|
||||
if (bBadTypes) {
|
||||
BOPAlgo_CheckResult aResult;
|
||||
aResult.SetShape1(myShape1);
|
||||
aResult.SetShape2(myShape2);
|
||||
aResult.SetCheckStatus(BOPAlgo_BadType);
|
||||
myResult.Append(aResult);
|
||||
}
|
||||
}
|
||||
else if (aDim1 > aDim2) {
|
||||
if (myOperation == BOPAlgo_FUSE ||
|
||||
myOperation == BOPAlgo_CUT) {
|
||||
bBadTypes = Standard_True;
|
||||
}
|
||||
}
|
||||
if (bBadTypes) {
|
||||
BOPAlgo_CheckResult aResult;
|
||||
aResult.SetShape1(myShape1);
|
||||
aResult.SetShape2(myShape2);
|
||||
aResult.SetCheckStatus(BOPAlgo_BadType);
|
||||
myResult.Append(aResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
|
@@ -122,7 +122,7 @@ BOPAlgo_Operation BOPAlgo_BOP::Operation()const
|
||||
//=======================================================================
|
||||
void BOPAlgo_BOP::CheckData()
|
||||
{
|
||||
Standard_Integer i, j, iDim, aNbArgs, aNbTools;
|
||||
Standard_Integer i, j, aNbArgs, aNbTools;
|
||||
Standard_Boolean bFuse;
|
||||
TopTools_ListIteratorOfListOfShape aItLS;
|
||||
//
|
||||
@@ -164,7 +164,8 @@ void BOPAlgo_BOP::CheckData()
|
||||
// or equal to the MAXIMAL dimension of the TOOLS;
|
||||
// 4. COMMON: The arguments and tools could have any dimensions.
|
||||
//
|
||||
Standard_Integer iDimMin[2] = { 0, 0 }, iDimMax[2] = { 0, 0 };
|
||||
Standard_Integer iDimMin[2] = { 3, 3 },
|
||||
iDimMax[2] = { 0, 0 };
|
||||
Standard_Boolean bHasValid[2] = {Standard_False, Standard_False};
|
||||
//
|
||||
for (i=0; i<2; ++i) {
|
||||
@@ -173,38 +174,27 @@ void BOPAlgo_BOP::CheckData()
|
||||
for (j=0; aItLS.More(); aItLS.Next(), ++j) {
|
||||
const TopoDS_Shape& aS=aItLS.Value();
|
||||
Standard_Boolean bIsEmpty = BOPTools_AlgoTools3D::IsEmptyShape(aS);
|
||||
if (bIsEmpty) {
|
||||
if (bIsEmpty)
|
||||
{
|
||||
AddWarning(new BOPAlgo_AlertEmptyShape (aS));
|
||||
continue;
|
||||
}
|
||||
//
|
||||
iDim = BOPTools_AlgoTools::Dimension(aS);
|
||||
if (iDim < 0) {
|
||||
|
||||
Standard_Integer iDMin, iDMax;
|
||||
BOPTools_AlgoTools::Dimensions(aS, iDMin, iDMax);
|
||||
|
||||
if (iDMin < iDimMin[i])
|
||||
iDimMin[i] = iDMin;
|
||||
if (iDMax > iDimMax[i])
|
||||
iDimMax[i] = iDMax;
|
||||
|
||||
if (bFuse && (iDimMin[i] != iDimMax[i]))
|
||||
{
|
||||
// non-homogeneous argument
|
||||
AddError (new BOPAlgo_AlertBOPNotAllowed);
|
||||
return;
|
||||
}
|
||||
//
|
||||
bHasValid[i] = Standard_True;
|
||||
//
|
||||
if (!j) {
|
||||
iDimMin[i] = iDim;
|
||||
iDimMax[i] = iDim;
|
||||
continue;
|
||||
}
|
||||
//
|
||||
if (iDim < iDimMin[i]) {
|
||||
iDimMin[i] = iDim;
|
||||
}
|
||||
else if (iDim > iDimMax[i]) {
|
||||
iDimMax[i] = iDim;
|
||||
}
|
||||
//
|
||||
if (bFuse && (iDimMin[i] != iDimMax[i])) {
|
||||
// non-homogeneous argument
|
||||
AddError (new BOPAlgo_AlertBOPNotAllowed);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
@@ -222,7 +212,7 @@ void BOPAlgo_BOP::CheckData()
|
||||
if (bHasValid[0] || bHasValid[1])
|
||||
{
|
||||
// In case of all empty shapes in one of the groups
|
||||
// this group aquires the dimension of other group
|
||||
// this group acquires the dimension of other group
|
||||
myDims[0] = bHasValid[0] ? iDimMin[0] : iDimMin[1];
|
||||
myDims[1] = bHasValid[1] ? iDimMin[1] : iDimMin[0];
|
||||
}
|
||||
@@ -583,12 +573,17 @@ void BOPAlgo_BOP::BuildRC()
|
||||
aItLS.Initialize(aLS);
|
||||
for (; aItLS.More(); aItLS.Next()) {
|
||||
const TopoDS_Shape& aS = aItLS.Value();
|
||||
iDim = BOPTools_AlgoTools::Dimension(aS);
|
||||
if (iDim < 0) {
|
||||
continue;
|
||||
TopTools_ListOfShape aList;
|
||||
BOPTools_AlgoTools::TreatCompound (aS, aList);
|
||||
for (TopTools_ListOfShape::Iterator itList (aList); itList.More(); itList.Next())
|
||||
{
|
||||
const TopoDS_Shape& aSS = itList.Value();
|
||||
iDim = BOPTools_AlgoTools::Dimension (aSS);
|
||||
if (iDim < 0)
|
||||
continue;
|
||||
aType = TypeToExplore (iDim);
|
||||
TopExp::MapShapes (aSS, aType, aMS);
|
||||
}
|
||||
aType = TypeToExplore(iDim);
|
||||
TopExp::MapShapes(aS, aType, aMS);
|
||||
}
|
||||
}
|
||||
//
|
||||
@@ -930,7 +925,7 @@ void BOPAlgo_BOP::BuildShape()
|
||||
for (; aItLS.More(); aItLS.Next())
|
||||
{
|
||||
const TopoDS_Shape& aS = aItLS.Value();
|
||||
BOPAlgo_Tools::TreatCompound(aS, aMInpFence, aLSNonCont);
|
||||
BOPTools_AlgoTools::TreatCompound(aS, aLSNonCont, &aMInpFence);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -441,7 +441,7 @@ void BOPAlgo_Builder::BuildBOP(const TopTools_ListOfShape& theObjects,
|
||||
{
|
||||
TopTools_ListOfShape aLS;
|
||||
TopTools_MapOfShape aMFence;
|
||||
BOPAlgo_Tools::TreatCompound(aS, aMFence, aLS);
|
||||
BOPTools_AlgoTools::TreatCompound(aS, aLS, &aMFence);
|
||||
|
||||
TopTools_ListOfShape::Iterator it(aLS);
|
||||
for (; it.More(); it.Next())
|
||||
|
@@ -550,7 +550,7 @@ void BOPAlgo_Builder::FillInternalShapes()
|
||||
aIt.Initialize(aArguments);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aS=aIt.Value();
|
||||
BOPAlgo_Tools::TreatCompound(aS, aMFence, aLSC);
|
||||
BOPTools_AlgoTools::TreatCompound(aS, aLSC, &aMFence);
|
||||
}
|
||||
aIt.Initialize(aLSC);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
|
@@ -141,44 +141,50 @@ void BOPAlgo_CellsBuilder::IndexParts()
|
||||
TopTools_ListIteratorOfListOfShape aIt(myArguments);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aS = aIt.Value();
|
||||
//
|
||||
Standard_Integer iDim = BOPTools_AlgoTools::Dimension(aS);
|
||||
aMDims.Add(iDim);
|
||||
TopAbs_ShapeEnum aType = TypeToExplore(iDim);
|
||||
//
|
||||
TopExp_Explorer aExp(aS, aType);
|
||||
for (; aExp.More(); aExp.Next()) {
|
||||
const TopoDS_Shape& aST = aExp.Current();
|
||||
const TopTools_ListOfShape* pLSIm = myImages.Seek(aST);
|
||||
if (!pLSIm) {
|
||||
TopTools_ListOfShape* pLS = myIndex.ChangeSeek(aST);
|
||||
if (!pLS) {
|
||||
pLS = &myIndex(myIndex.Add(aST, TopTools_ListOfShape()));
|
||||
}
|
||||
pLS->Append(aS);
|
||||
//
|
||||
if (aMFence.Add(aST)) {
|
||||
aBB.Add(anAllParts, aST);
|
||||
|
||||
TopTools_ListOfShape aLSubS;
|
||||
BOPTools_AlgoTools::TreatCompound (aS, aLSubS);
|
||||
for (TopTools_ListOfShape::Iterator itSub (aLSubS); itSub.More(); itSub.Next())
|
||||
{
|
||||
const TopoDS_Shape& aSS = itSub.Value();
|
||||
Standard_Integer iDim = BOPTools_AlgoTools::Dimension (aSS);
|
||||
aMDims.Add(iDim);
|
||||
TopAbs_ShapeEnum aType = TypeToExplore (iDim);
|
||||
TopExp_Explorer aExp (aSS, aType);
|
||||
for (; aExp.More(); aExp.Next())
|
||||
{
|
||||
const TopoDS_Shape& aST = aExp.Current();
|
||||
const TopTools_ListOfShape* pLSIm = myImages.Seek(aST);
|
||||
if (!pLSIm) {
|
||||
TopTools_ListOfShape* pLS = myIndex.ChangeSeek(aST);
|
||||
if (!pLS) {
|
||||
pLS = &myIndex(myIndex.Add(aST, TopTools_ListOfShape()));
|
||||
}
|
||||
pLS->Append(aS);
|
||||
//
|
||||
if (aMFence.Add(aST)) {
|
||||
aBB.Add(anAllParts, aST);
|
||||
}
|
||||
//
|
||||
continue;
|
||||
}
|
||||
//
|
||||
continue;
|
||||
}
|
||||
//
|
||||
TopTools_ListIteratorOfListOfShape aItIm(*pLSIm);
|
||||
for (; aItIm.More(); aItIm.Next()) {
|
||||
const TopoDS_Shape& aSTIm = aItIm.Value();
|
||||
//
|
||||
TopTools_ListOfShape* pLS = myIndex.ChangeSeek(aSTIm);
|
||||
if (!pLS) {
|
||||
pLS = &myIndex(myIndex.Add(aSTIm, TopTools_ListOfShape()));
|
||||
}
|
||||
pLS->Append(aS);
|
||||
//
|
||||
if (aMFence.Add(aSTIm)) {
|
||||
aBB.Add(anAllParts, aSTIm);
|
||||
}
|
||||
} // for (; aItIm.More(); aItIm.Next()) {
|
||||
} // for (; aExp.More(); aExp.Next()) {
|
||||
TopTools_ListIteratorOfListOfShape aItIm(*pLSIm);
|
||||
for (; aItIm.More(); aItIm.Next()) {
|
||||
const TopoDS_Shape& aSTIm = aItIm.Value();
|
||||
//
|
||||
TopTools_ListOfShape* pLS = myIndex.ChangeSeek(aSTIm);
|
||||
if (!pLS) {
|
||||
pLS = &myIndex(myIndex.Add(aSTIm, TopTools_ListOfShape()));
|
||||
}
|
||||
pLS->Append(aS);
|
||||
//
|
||||
if (aMFence.Add(aSTIm)) {
|
||||
aBB.Add(anAllParts, aSTIm);
|
||||
}
|
||||
} // for (; aItIm.More(); aItIm.Next()) {
|
||||
} // for (; aExp.More(); aExp.Next()) {
|
||||
} // for (; itSub.More(); itSub.Next())
|
||||
} // for (; aIt.More(); aIt.Next()) {
|
||||
//
|
||||
myAllParts = anAllParts;
|
||||
|
@@ -75,7 +75,7 @@ void BOPAlgo_MakeConnected::CheckData()
|
||||
|
||||
TopTools_ListIteratorOfListOfShape itLA(myArguments);
|
||||
for (; itLA.More(); itLA.Next())
|
||||
BOPAlgo_Tools::TreatCompound(itLA.Value(), aMFence, aLA);
|
||||
BOPTools_AlgoTools::TreatCompound(itLA.Value(), aLA, &aMFence);
|
||||
|
||||
if (aLA.IsEmpty())
|
||||
{
|
||||
@@ -197,7 +197,7 @@ void BOPAlgo_MakeConnected::AssociateMaterials()
|
||||
// Extract all non-compound shapes from the result
|
||||
TopTools_ListOfShape aLShapes;
|
||||
TopTools_MapOfShape aMFence;
|
||||
BOPAlgo_Tools::TreatCompound(myShape, aMFence, aLShapes);
|
||||
BOPTools_AlgoTools::TreatCompound(myShape, aLShapes, &aMFence);
|
||||
|
||||
if (aLShapes.IsEmpty())
|
||||
return;
|
||||
|
@@ -342,7 +342,7 @@ void BOPAlgo_MakerVolume::FillInternalShapes(const TopTools_ListOfShape& theLSR)
|
||||
|
||||
TopTools_ListOfShape::Iterator itLA(myDS->Arguments());
|
||||
for (; itLA.More(); itLA.Next())
|
||||
BOPAlgo_Tools::TreatCompound(itLA.Value(), aMFence, aLSC);
|
||||
BOPTools_AlgoTools::TreatCompound(itLA.Value(), aLSC, &aMFence);
|
||||
|
||||
// Get only edges and vertices from arguments
|
||||
TopTools_ListOfShape aLVE;
|
||||
|
@@ -181,7 +181,7 @@ void BOPAlgo_RemoveFeatures::CheckData()
|
||||
TopTools_ListOfShape aShapes;
|
||||
TopTools_MapOfShape aMFence;
|
||||
// Extract all shapes from the compound
|
||||
BOPAlgo_Tools::TreatCompound(myInputShape, aMFence, aShapes);
|
||||
BOPTools_AlgoTools::TreatCompound(myInputShape, aShapes, &aMFence);
|
||||
if (aShapes.IsEmpty())
|
||||
{
|
||||
// Add error of empty input shape
|
||||
|
@@ -1103,29 +1103,6 @@ void BOPAlgo_Tools::IntersectVertices(const TopTools_IndexedDataMapOfShapeReal&
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : TreatCompound
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BOPAlgo_Tools::TreatCompound(const TopoDS_Shape& theS,
|
||||
TopTools_MapOfShape& aMFence,
|
||||
TopTools_ListOfShape& theLS)
|
||||
{
|
||||
TopAbs_ShapeEnum aType = theS.ShapeType();
|
||||
if (aType != TopAbs_COMPOUND)
|
||||
{
|
||||
if (aMFence.Add(theS))
|
||||
theLS.Append(theS);
|
||||
return;
|
||||
}
|
||||
TopoDS_Iterator aIt(theS);
|
||||
for (; aIt.More(); aIt.Next())
|
||||
{
|
||||
const TopoDS_Shape& aS = aIt.Value();
|
||||
TreatCompound(aS, aMFence, theLS);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// Classification of the faces relatively solids
|
||||
//=======================================================================
|
||||
|
@@ -165,13 +165,6 @@ public:
|
||||
const Standard_Real theFuzzyValue,
|
||||
TopTools_ListOfListOfShape& theChains);
|
||||
|
||||
//! Collect in the output list recursively all non-compound subshapes of the first level
|
||||
//! of the given shape theS. If a shape presents in the map theMFence it is skipped.
|
||||
//! All shapes put in the output are also added into theMFence.
|
||||
Standard_EXPORT static void TreatCompound(const TopoDS_Shape& theS,
|
||||
TopTools_MapOfShape& theMFence,
|
||||
TopTools_ListOfShape& theLS);
|
||||
|
||||
//! Classifies the faces <theFaces> relatively solids <theSolids>.
|
||||
//! The IN faces for solids are stored into output data map <theInParts>.
|
||||
//!
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#include <BOPTest.hxx>
|
||||
#include <BRepTest.hxx>
|
||||
#include <DBRep.hxx>
|
||||
#include <Draw.hxx>
|
||||
#include <Draw_Interpretor.hxx>
|
||||
#include <Draw_PluginMacro.hxx>
|
||||
#include <GeometryTest.hxx>
|
||||
@@ -136,7 +137,8 @@ void BOPTest::ReportAlerts(const Handle(Message_Report)& theReport)
|
||||
}
|
||||
|
||||
// output message with list of shapes
|
||||
Message::DefaultMessenger()->Send (aText, anAlertTypes[iGravity]);
|
||||
Draw_Interpretor& aDrawInterpretor = Draw::GetInterpretor();
|
||||
aDrawInterpretor << aText << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_ListOfListOfShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <Precision.hxx>
|
||||
@@ -552,9 +553,22 @@ public: //! @name Other methods
|
||||
const TopoDS_Edge& aE,
|
||||
const Handle(IntTools_Context)& aContext);
|
||||
|
||||
//! Retutns dimension of the shape <theS>.
|
||||
//! Returns the min and max dimensions of the shape <theS>.
|
||||
Standard_EXPORT static void Dimensions (const TopoDS_Shape& theS,
|
||||
Standard_Integer& theDMin,
|
||||
Standard_Integer& theDMax);
|
||||
|
||||
//! Returns dimension of the shape <theS>.
|
||||
//! If the shape contains elements of different dimension, -1 is returned.
|
||||
Standard_EXPORT static Standard_Integer Dimension(const TopoDS_Shape& theS);
|
||||
|
||||
//! Collects in the output list recursively all non-compound sub-shapes of the first level
|
||||
//! of the given shape theS. The optional map theMap is used to avoid the duplicates in the
|
||||
//! output list, so it will also contain all non-compound sub-shapes.
|
||||
Standard_EXPORT static void TreatCompound (const TopoDS_Shape& theS,
|
||||
TopTools_ListOfShape& theList,
|
||||
TopTools_MapOfShape* theMap = NULL);
|
||||
|
||||
//! Returns true if the shell <theShell> is open
|
||||
Standard_EXPORT static Standard_Boolean IsOpenShell(const TopoDS_Shell& theShell);
|
||||
|
||||
|
@@ -813,7 +813,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
|
||||
{
|
||||
if (myCref.IsNull())
|
||||
return;
|
||||
Standard_Boolean ok=Standard_True;;
|
||||
Standard_Boolean ok = Standard_True;
|
||||
|
||||
Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&myShape.TShape());
|
||||
Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Edge(myShape));
|
||||
|
@@ -34,10 +34,6 @@
|
||||
#include <TopoDS_Solid.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
|
||||
static
|
||||
void TreatCompound(const TopoDS_Shape& theC1,
|
||||
TopTools_ListOfShape& theLSX);
|
||||
|
||||
//=======================================================================
|
||||
// function: UpdateVertex
|
||||
// purpose:
|
||||
@@ -437,103 +433,101 @@ void BOPTools_AlgoTools::CorrectRange(const TopoDS_Edge& aE,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
//=======================================================================
|
||||
//function : dimension
|
||||
//purpose : returns dimension of elementary shape
|
||||
//=======================================================================
|
||||
static Standard_Integer dimension (const TopoDS_Shape& theS)
|
||||
{
|
||||
switch (theS.ShapeType())
|
||||
{
|
||||
case TopAbs_VERTEX:
|
||||
return 0;
|
||||
case TopAbs_EDGE:
|
||||
case TopAbs_WIRE:
|
||||
return 1;
|
||||
case TopAbs_FACE:
|
||||
case TopAbs_SHELL:
|
||||
return 2;
|
||||
case TopAbs_SOLID:
|
||||
case TopAbs_COMPSOLID:
|
||||
return 3;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Dimensions
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BOPTools_AlgoTools::Dimensions (const TopoDS_Shape& theS,
|
||||
Standard_Integer& theDMin,
|
||||
Standard_Integer& theDMax)
|
||||
{
|
||||
theDMin = theDMax = dimension (theS);
|
||||
if (theDMax >= 0)
|
||||
return;
|
||||
|
||||
TopTools_ListOfShape aLS;
|
||||
TopTools_MapOfShape aMFence;
|
||||
TreatCompound (theS, aLS, &aMFence);
|
||||
if (aLS.IsEmpty())
|
||||
{
|
||||
// empty shape
|
||||
theDMin = theDMax = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
theDMin = 3;
|
||||
theDMax = 0;
|
||||
for (TopTools_ListOfShape::Iterator it (aLS); it.More(); it.Next())
|
||||
{
|
||||
Standard_Integer aDim = dimension (it.Value());
|
||||
if (aDim < theDMin)
|
||||
theDMin = aDim;
|
||||
if (aDim > theDMax)
|
||||
theDMax = aDim;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Dimension
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer BOPTools_AlgoTools::Dimension(const TopoDS_Shape& theS)
|
||||
{
|
||||
Standard_Integer i, iRet, iRx0 = 0, iRx = 0;
|
||||
TopAbs_ShapeEnum aTS;
|
||||
TopTools_ListOfShape aLS;
|
||||
TopTools_ListIteratorOfListOfShape aIt;
|
||||
//
|
||||
aTS=theS.ShapeType();
|
||||
if (aTS!=TopAbs_COMPOUND) {
|
||||
switch (aTS) {
|
||||
case TopAbs_EDGE:
|
||||
case TopAbs_WIRE:
|
||||
iRet=1;
|
||||
break;
|
||||
case TopAbs_FACE:
|
||||
case TopAbs_SHELL:
|
||||
iRet=2;
|
||||
break;
|
||||
case TopAbs_SOLID:
|
||||
case TopAbs_COMPSOLID:
|
||||
iRet=3;
|
||||
break;
|
||||
default:
|
||||
iRet=0;
|
||||
}
|
||||
return iRet;
|
||||
}
|
||||
//
|
||||
iRet=-1;
|
||||
TreatCompound(theS, aLS);
|
||||
if(aLS.IsEmpty()) {
|
||||
iRet = -2; //empty compound
|
||||
return iRet;
|
||||
}
|
||||
aIt.Initialize(aLS);
|
||||
for (i=0; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSx=aIt.Value();
|
||||
iRx=Dimension(aSx);
|
||||
if (!i) {
|
||||
iRx0=iRx;
|
||||
i=1;
|
||||
continue;
|
||||
}
|
||||
if (iRx!=iRx0) {
|
||||
return iRet;// -1
|
||||
}
|
||||
}
|
||||
return iRx;
|
||||
Standard_Integer aDMin, aDMax;
|
||||
Dimensions (theS, aDMin, aDMax);
|
||||
return (aDMin == aDMax) ? aDMin : -1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : TreatCompound
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void TreatCompound(const TopoDS_Shape& theC1,
|
||||
TopTools_ListOfShape& theLSX)
|
||||
void BOPTools_AlgoTools::TreatCompound (const TopoDS_Shape& theS,
|
||||
TopTools_ListOfShape& theLS,
|
||||
TopTools_MapOfShape* theMFence)
|
||||
{
|
||||
Standard_Integer aNbC1;
|
||||
TopAbs_ShapeEnum aType;
|
||||
TopTools_ListOfShape aLC, aLC1;
|
||||
TopTools_ListIteratorOfListOfShape aIt, aIt1;
|
||||
TopoDS_Iterator aItC;
|
||||
//
|
||||
aLC.Append (theC1);
|
||||
for(;;) {
|
||||
aLC1.Clear();
|
||||
aIt.Initialize(aLC);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aC=aIt.Value(); //C is compound
|
||||
//
|
||||
aItC.Initialize(aC);
|
||||
for (; aItC.More(); aItC.Next()) {
|
||||
const TopoDS_Shape& aS=aItC.Value();
|
||||
aType=aS.ShapeType();
|
||||
if (aType==TopAbs_COMPOUND) {
|
||||
aLC1.Append(aS);
|
||||
}
|
||||
else {
|
||||
theLSX.Append(aS);
|
||||
}
|
||||
}
|
||||
TopAbs_ShapeEnum aType = theS.ShapeType();
|
||||
if (aType != TopAbs_COMPOUND)
|
||||
{
|
||||
if (!theMFence || theMFence->Add (theS))
|
||||
{
|
||||
theLS.Append (theS);
|
||||
}
|
||||
//
|
||||
aNbC1=aLC1.Extent();
|
||||
if (!aNbC1) {
|
||||
break;
|
||||
}
|
||||
//
|
||||
aLC.Clear();
|
||||
aIt.Initialize(aLC1);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSC=aIt.Value();
|
||||
aLC.Append(aSC);
|
||||
}
|
||||
}// while(1)
|
||||
return;
|
||||
}
|
||||
|
||||
for (TopoDS_Iterator it (theS); it.More(); it.Next())
|
||||
{
|
||||
TreatCompound (it.Value(), theLS, theMFence);
|
||||
}
|
||||
}
|
||||
|
@@ -92,3 +92,16 @@ Handle(BRep_CurveRepresentation) BRep_Curve3D::Copy() const
|
||||
C->SetRange(First(), Last());
|
||||
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,6 +54,9 @@ public:
|
||||
//! Return a copy of this representation.
|
||||
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,3 +147,20 @@ Handle(BRep_CurveRepresentation) BRep_CurveOn2Surfaces::Copy() const
|
||||
myContinuity);
|
||||
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,6 +66,9 @@ public:
|
||||
//! Return a copy of this representation.
|
||||
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,4 +180,20 @@ void BRep_CurveOnClosedSurface::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,6 +78,9 @@ public:
|
||||
//! This is called when the range is modified.
|
||||
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,4 +146,20 @@ 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,6 +71,9 @@ public:
|
||||
//! This is called when the range is modified.
|
||||
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,3 +426,13 @@ void BRep_CurveRepresentation::Polygon2(const Handle(Poly_Polygon2D)&)
|
||||
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,6 +144,9 @@ public:
|
||||
//! Return a copy of this representation.
|
||||
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,3 +46,16 @@ 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,6 +57,9 @@ public:
|
||||
//! This is called when the range is modified.
|
||||
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,4 +80,16 @@ void BRep_PointOnCurve::Curve(const Handle(Geom_Curve)& 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,6 +48,9 @@ public:
|
||||
|
||||
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,4 +84,16 @@ void BRep_PointOnCurveOnSurface::PCurve(const Handle(Geom2d_Curve)& 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,6 +50,9 @@ public:
|
||||
|
||||
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,4 +197,15 @@ void BRep_PointRepresentation::Surface(const Handle(Geom_Surface)& )
|
||||
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,6 +84,9 @@ public:
|
||||
|
||||
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,4 +56,17 @@ void BRep_PointsOnSurface::Surface(const Handle(Geom_Surface)& 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,6 +40,9 @@ public:
|
||||
|
||||
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,3 +76,15 @@ Handle(BRep_CurveRepresentation) BRep_Polygon3D::Copy() const
|
||||
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,6 +50,9 @@ public:
|
||||
//! Return a copy of this representation.
|
||||
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,3 +79,16 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedSurface::Copy() const
|
||||
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,6 +51,9 @@ public:
|
||||
//! Return a copy of this representation.
|
||||
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,3 +84,15 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedTriangulation::Copy() const
|
||||
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,6 +51,9 @@ public:
|
||||
//! Return a copy of this representation.
|
||||
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,3 +102,16 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnSurface::Copy() const
|
||||
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,6 +59,9 @@ public:
|
||||
//! Return a copy of this representation.
|
||||
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,3 +104,17 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnTriangulation::Copy() const
|
||||
|
||||
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())
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user