1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-18 14:27:39 +03:00

Compare commits

..

2 Commits

Author SHA1 Message Date
oan
5f55b8e615 0026074: BRepMesh_IncrementalMesh meshes a specific shape for a long time
Added test case
2019-07-10 18:59:28 +03:00
oan
057d4b15e3 0028089: Mesh - New algorithm for triangulation of 2d polygons
Added custom meshing core algorithm to generate base mesh using Delabella library:
https://github.com/msokalski/delabella

# Added CSF_MeshAlgo environment variable to select meshing core without necessity of recompilation
2019-07-10 13:04:25 +03:00
1702 changed files with 17680 additions and 26884 deletions

View File

@@ -708,18 +708,6 @@ else()
OCCT_CHECK_AND_UNSET ("3RDPARTY_FLEX_EXECUTABLE")
endif()
# qt for inspector and samples
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
# check qt 3rdparty path
add_definitions (-DHAVE_QT)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/qt")
message (STATUS "Info: Qt is used by OCCT")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_QT")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TQTMALLOC")
OCCT_CHECK_AND_UNSET ("INSTALL_QT")
endif()
# check all 3rdparty include paths
string (REGEX REPLACE ";" " " 3RDPARTY_NOT_INCLUDED "${3RDPARTY_NOT_INCLUDED}")
if (3RDPARTY_NOT_INCLUDED)
@@ -807,6 +795,17 @@ else()
set (SCRIPT_EXT sh)
endif()
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
# check qt 3rdparty path
add_definitions (-DHAVE_QT)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/qt")
message (STATUS "Info: Qt is used by OCCT")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_QT")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TQTMALLOC")
OCCT_CHECK_AND_UNSET ("INSTALL_QT")
endif()
# OCCT tools
# include the patched or original list of tools
# list <TOOLNAME>_TOOLKITS is created foreach tool and contains its toolkits

View File

@@ -274,7 +274,7 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
list (LENGTH OCCT_ALL_FILE_NAMES ALL_FILES_NB)
math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" )
# emit warnings if there are unprocessed headers
# emit warnings if there is unprocessed headers
file (GLOB OCCT_ALL_FILES_IN_DIR "${OCCT_COLLECT_SOURCE_DIR}/${OCCT_PACKAGE}/*.*")
file (GLOB OCCT_ALL_FILES_IN_PATCH_DIR "${BUILD_PATCH}/src/${OCCT_PACKAGE}/*.*")
@@ -307,8 +307,8 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
list (APPEND OCCT_HEADER_FILES_COMPLETE ${OCCT_FILE_IN_DIR})
# collect header files with name that does not contain its package one
string (REGEX MATCH "^${OCCT_PACKAGE}[_.]" IS_HEADER_MATHCING_PACKAGE "${OCCT_FILE_NAME}")
if (NOT IS_HEADER_MATHCING_PACKAGE)
string (FIND "${OCCT_FILE_NAME}" "${OCCT_PACKAGE}_" FOUND_INDEX)
if (NOT ${FOUND_INDEX} EQUAL 0)
list (APPEND OCCT_HEADER_FILE_WITH_PROPER_NAMES "${OCCT_FILE_NAME}")
endif()
endif()
@@ -355,12 +355,12 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
list (FIND OCCT_USED_PACKAGES ${PACKAGE_NAME} IS_HEADER_FOUND)
if (NOT ${IS_HEADER_FOUND} EQUAL -1)
if (NOT EXISTS "${OCCT_COLLECT_SOURCE_DIR}/${PACKAGE_NAME}/${HEADER_FILE_NAME}")
message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is not present in the sources and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is not presented in the sources and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
file (REMOVE "${OCCT_HEADER_FILE_OLD}")
else()
list (FIND OCCT_HEADER_FILE_NAMES_NOT_IN_FILES ${PACKAGE_NAME} IS_HEADER_FOUND)
if (NOT ${IS_HEADER_FOUND} EQUAL -1)
message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is present in the sources but not involved in FILES and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is presented in the sources but not involved in FILES and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
file (REMOVE "${OCCT_HEADER_FILE_OLD}")
endif()
endif()

View File

@@ -1,21 +1,23 @@
#qt
# Qt is searched manually first (just determine root)
message (STATUS "Processing Qt 3-rd party")
#looking for 3RDPARTY_QT_DIR variable used later in qt_macro.cmake
SET(CSF_QtCore "QtCore")
THIRDPARTY_PRODUCT("QT" "" "CSF_QtCore" "d")
if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME)
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_QT_DIR}/bin")
if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "")
message (FATAL_ERROR "... Qt root directory was not found")
endif()
list (REMOVE_ITEM 3RDPARTY_NOT_INCLUDED "3RDPARTY_QT_INCLUDE_DIR")
list (REMOVE_ITEM 3RDPARTY_NO_LIBS "3RDPARTY_QT_LIBRARY_DIR")
list (REMOVE_ITEM 3RDPARTY_NO_DLLS "3RDPARTY_QT_DLL_DIR")
# Combine directory name with absolute path and show in GUI
set (3RDPARTY_QT_DIR "${3RDPARTY_DIR}/${3RDPARTY_QT_DIR_NAME}" CACHE PATH "The directory containing Qt" FORCE)
message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}")
endif()
UNSET (${3RDPARTY_QT_DLL} CACHE)
UNSET (${3RDPARTY_QT_DLL_DIR} CACHE)
UNSET (${3RDPARTY_QT_INCLUDE_DIR} CACHE)
UNSET (${3RDPARTY_QT_LIBRARY} CACHE)
UNSET (${3RDPARTY_QT_LIBRARY_DIR} CACHE)
set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}")
message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}")
# Now set CMAKE_PREFIX_PATH to point to local Qt installation.
# Without this setting find_package() will not work
@@ -31,4 +33,4 @@ if (NOT ${Qt5_FOUND})
#message (STATUS "Qt4 cmake configuration")
else()
#message (STATUS "Qt5 cmake configuration")
endif()
endif()

View File

@@ -24,9 +24,6 @@
# load tools
source [file join [file dirname [info script]] genconfdeps.tcl]
# proxy variable for implicit file path normalization
set PRODUCTS_PATH_INPUT "$::PRODUCTS_PATH"
package require Tk
set aRowIter 0
@@ -61,7 +58,7 @@ set SYS_VS_LIST {}
set SYS_VC_LIST {}
set SYS_VCVARS_LIST {}
# detect installed Visual Studio 2017+ instances by running vswhere.exe
# detect installed Visual Studio 2017 instances by running vswhere.exe
if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } {
lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141)"
lappend ::SYS_VC_LIST "vc141"
@@ -72,16 +69,6 @@ if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Micr
lappend ::SYS_VC_LIST "vc141-uwp"
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
}
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } {
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142)"
lappend ::SYS_VC_LIST "vc142"
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
}
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] } {
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142) UWP"
lappend ::SYS_VC_LIST "vc142-uwp"
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
}
# detect installed Visual Studio instances from global environment
if { [info exists ::env(VS140COMNTOOLS)] } {
@@ -202,14 +189,6 @@ proc wokdep:gui:UpdateList {} {
}
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "liblzma" "lzma.h" "$aCheckLib" {"lzma" "xz"}
}
if { "$::HAVE_E57" == "true" } {
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "e57" "e57/E57Foundation.h" "E57RefImpl" {"e57"}
set aCheckLib "xerces-c"
if { "$::tcl_platform(platform)" == "windows" } {
set aCheckLib "xerces-c_3"
}
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "xerces-c" "xercesc/sax2/XMLReaderFactory.hpp" "$aCheckLib" {"xerces"}
}
if { "$::HAVE_RAPIDJSON" == "true" } {
wokdep:SearchRapidJson anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
}
@@ -236,9 +215,9 @@ proc wokdep:gui:BrowseVcVars {} {
}
proc wokdep:gui:BrowsePartiesRoot {} {
set aResult [tk_chooseDirectory -initialdir $::PRODUCTS_PATH_INPUT -title "Choose a directory"]
set aResult [tk_chooseDirectory -initialdir $::PRODUCTS_PATH -title "Choose a directory"]
if { "$aResult" != "" } {
set ::PRODUCTS_PATH_INPUT $aResult
set ::PRODUCTS_PATH $aResult
wokdep:gui:UpdateList
}
}
@@ -452,7 +431,7 @@ ttk::label .myFrame.myHxxChecks.myScutsLbl -text "Strategy for filling he
#
ttk::label .myFrame.mySrchLbl -text "3rd-parties search path:" -padding {5 5 80 5}
entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH_INPUT -width 80
entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH -width 80
ttk::button .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
checkbutton .myFrame.myChecks.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
ttk::label .myFrame.myChecks.myFImageLbl -text "Use FreeImage"
@@ -470,9 +449,6 @@ checkbutton .myFrame.myChecks.myFFmpegCheck -offvalue "false" -onvalue "true
ttk::label .myFrame.myChecks.myFFmpegLbl -text "Use FFmpeg"
#checkbutton .myFrame.myChecks.myOpenClCheck -offvalue "false" -onvalue "true" -variable HAVE_OPENCL -command wokdep:gui:UpdateList
#ttk::label .myFrame.myChecks.myOpenClLbl -text "Use OpenCL"
checkbutton .myFrame.myChecks.myRapidJsonCheck -offvalue "false" -onvalue "true" -variable HAVE_RAPIDJSON -command wokdep:gui:UpdateList
ttk::label .myFrame.myChecks.myRapidJsonLbl -text "Use RapidJSON"
checkbutton .myFrame.myChecks.myMacGLXCheck -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
ttk::label .myFrame.myChecks.myMacGLXLbl -text "Use X11 for windows drawing"
ttk::label .myFrame.myChecks.myVtkLbl -text "Use VTK"
@@ -482,8 +458,9 @@ checkbutton .myFrame.myChecks.myZLibCheck -offvalue "false" -onvalue "true
ttk::label .myFrame.myChecks.myZLibLbl -text "Use zlib"
checkbutton .myFrame.myChecks.myLzmaCheck -offvalue "false" -onvalue "true" -variable HAVE_LIBLZMA -command wokdep:gui:UpdateList
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.myRapidJsonCheck -offvalue "false" -onvalue "true" -variable HAVE_RAPIDJSON -command wokdep:gui:UpdateList
ttk::label .myFrame.myChecks.myRapidJsonLbl -text "Use RapidJSON"
checkbutton .myFrame.myChecks.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList
ttk::label .myFrame.myChecks.myQt4Lbl -text "Search Qt4"
@@ -604,9 +581,6 @@ grid .myFrame.myChecks.myVtkLbl -row $aCheckRowIter -column 3 -sticky w
if { "$::tcl_platform(platform)" == "windows" } {
grid .myFrame.myChecks.myD3dCheck -row $aCheckRowIter -column 4 -sticky e
grid .myFrame.myChecks.myD3dLbl -row $aCheckRowIter -column 5 -sticky w
} elseif { "$::tcl_platform(os)" == "Darwin" } {
grid .myFrame.myChecks.myMacGLXCheck -row $aCheckRowIter -column 4 -sticky e
grid .myFrame.myChecks.myMacGLXLbl -row $aCheckRowIter -column 5 -sticky w
}
grid .myFrame.myChecks.myLzmaCheck -row $aCheckRowIter -column 6 -sticky e
grid .myFrame.myChecks.myLzmaLbl -row $aCheckRowIter -column 7 -sticky w
@@ -614,11 +588,14 @@ grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 12 -sticky e
grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 13 -sticky w
incr aCheckRowIter
grid .myFrame.myChecks.myRapidJsonCheck -row $aCheckRowIter -column 0 -sticky e
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(os)" == "Darwin" } {
grid .myFrame.myChecks.myMacGLXCheck -row $aCheckRowIter -column 0 -sticky e
grid .myFrame.myChecks.myMacGLXLbl -row $aCheckRowIter -column 1 -sticky w
incr aCheckRowIter
}
grid .myFrame.myChecks.myRapidJsonCheck -row $aCheckRowIter -column 6 -sticky e
grid .myFrame.myChecks.myRapidJsonLbl -row $aCheckRowIter -column 7 -sticky w
incr aCheckRowIter
# Additional headers search paths
@@ -663,7 +640,6 @@ bind .myFrame.myVsFrame.myArchCombo <<ComboboxSelected>> {
}
.myFrame.mySrchEntry configure -validate all -validatecommand {
set ::PRODUCTS_PATH [file normalize "$::PRODUCTS_PATH_INPUT"]
#return [file exists "$::PRODUCTS_PATH"]
wokdep:gui:UpdateList
return 1

View File

@@ -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_RAPIDJSON HAVE_OPENCL CHECK_QT4 CHECK_JDK MACOSX_USE_GLX HAVE_RelWithDebInfo}
foreach anEnvIter $THE_ENV_VARIABLES {
set ${anEnvIter} "false"
if { [info exists ::env(${anEnvIter})] } {
@@ -85,14 +85,11 @@ if { "$tcl_platform(platform)" != "windows" } {
set HAVE_D3D ""
set HAVE_RelWithDebInfo ""
}
foreach anEnvIter {ARCH VCVER VCVARS PRJFMT } {
foreach anEnvIter {ARCH VCVER VCVARS PRJFMT PRODUCTS_PATH} {
if { [info exists ::env(${anEnvIter})] } {
set ${anEnvIter} "$::env(${anEnvIter})"
}
}
if { [info exists ::env(PRODUCTS_PATH)] } {
set PRODUCTS_PATH [file normalize "$::env(PRODUCTS_PATH)"]
}
if { [info exists ::env(CSF_OPT_INC)] } {
set CSF_OPT_INC [split "$::env(CSF_OPT_INC)" $::SYS_PATH_SPLITTER]
@@ -146,12 +143,9 @@ proc wokdep:SearchHeader {theHeader} {
# Search library file in $::CSF_OPT_LIB* and standard paths
proc wokdep:SearchLib {theLib theBitness {theSearchPath ""}} {
if { "$theSearchPath" != "" } {
set aPath "${theSearchPath}/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}"
set aPath2 "${theSearchPath}/${::SYS_LIB_PREFIX}${theLib}.a"
set aPath "${theSearchPath}/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}"
if { [file exists "$aPath"] } {
return "$aPath"
} elseif { "$::tcl_platform(platform)" != "windows" && [file exists "$aPath2"] } {
return "$aPath2"
} else {
return ""
}
@@ -159,42 +153,31 @@ proc wokdep:SearchLib {theLib theBitness {theSearchPath ""}} {
# search in custom paths
foreach aLibPath [set ::CSF_OPT_LIB$theBitness] {
set aPath "${aLibPath}/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}"
set aPath2 "${aLibPath}/${::SYS_LIB_PREFIX}${theLib}.a"
set aPath "${aLibPath}/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}"
if { [file exists "$aPath"] } {
return "$aPath"
} elseif { "$::tcl_platform(platform)" != "windows" && [file exists "$aPath2"] } {
return "$aPath2"
}
}
# search in system
if { "$::ARCH" == "$theBitness"} {
set aPath "/usr/lib/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}"
set aPath2 "/usr/lib/${::SYS_LIB_PREFIX}${theLib}.a"
set aPath "/usr/lib/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}"
if { [file exists "$aPath"] } {
return "$aPath"
} elseif { [file exists "$aPath2"] } {
return "$aPath2"
}
}
if { "$::tcl_platform(os)" == "Linux" } {
if { "$theBitness" == "64" } {
set aPath "/usr/lib/x86_64-linux-gnu/lib${theLib}.so"
set aPath2 "/usr/lib/x86_64-linux-gnu/lib${theLib}.a"
set aPath "/usr/lib/x86_64-linux-gnu/lib${theLib}.so"
if { [file exists "$aPath"] } {
return "$aPath"
} elseif { [file exists "$aPath2"] } {
return "$aPath2"
}
} else {
set aPath "/usr/lib/i386-linux-gnu/lib${theLib}.so"
set aPath2 "/usr/lib/i386-linux-gnu/lib${theLib}.a"
set aPath "/usr/lib/i386-linux-gnu/lib${theLib}.so"
if { [file exists "$aPath"] } {
return "$aPath"
} elseif { [file exists "$aPath2"] } {
return "$aPath2"
}
}
}

View File

@@ -256,7 +256,7 @@ proc genAllResources {} {
# Wrapper-function to generate VS project files
proc genproj {theFormat args} {
set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "cbp" "xcd" "pro"}
set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "cbp" "xcd" "pro"}
set aSupportedPlatforms { "wnt" "uwp" "lin" "mac" "ios" "qnx" }
set isHelpRequire false
@@ -284,12 +284,8 @@ proc genproj {theFormat args} {
# Check optional arguments
set aLibType "dynamic"
set aSolution "OCCT"
for {set anArgIter 0} {$anArgIter < [llength args]} {incr anArgIter} {
set arg [lindex $args $anArgIter]
if { $arg == "" } {
continue
} elseif { $arg == "-h" || $arg == "-help" || $arg == "--help" } {
foreach arg $args {
if { $arg == "-h" || $arg == "-help" || $arg == "--help" } {
set isHelpRequire true
} elseif { [lsearch -exact $aSupportedPlatforms $arg] >= 0 } {
set aPlatform $arg
@@ -299,9 +295,6 @@ proc genproj {theFormat args} {
} elseif { $arg == "-dynamic" } {
set aLibType "dynamic"
puts "Dynamic build has been selected"
} elseif { $arg == "-solution" } {
incr anArgIter
set aSolution [lindex $args $anArgIter]
} else {
puts "Error: genproj: unrecognized option \"$arg\""
set isHelpRequire true
@@ -319,7 +312,6 @@ proc genproj {theFormat args} {
vc12 - Visual Studio 2013
vc14 - Visual Studio 2015
vc141 - Visual Studio 2017
vc142 - Visual Studio 2019
cbp - CodeBlocks
xcd - XCode
pro - Qt Creator
@@ -347,9 +339,9 @@ proc genproj {theFormat args} {
# base path to where to generate projects, hardcoded from current dir
set anAdmPath [file normalize "${::path}/adm"]
OS:MKPRC "$anAdmPath" "$theFormat" "$aLibType" "$aPlatform" "$aCmpl" "$aSolution"
OS:MKPRC "$anAdmPath" "$theFormat" "$aLibType" "$aPlatform" "$aCmpl"
genprojbat "$theFormat" "$aPlatform" "$aSolution"
genprojbat "$theFormat" "$aPlatform"
genAllResources
}
@@ -369,8 +361,7 @@ proc copy_with_warning {from to} {
file copy -force -- "$from" "$to"
}
# Generate auxiliary scripts for launching IDE.
proc genprojbat {theFormat thePlatform theSolution} {
proc genprojbat {theFormat thePlatform} {
set aTargetPlatformExt sh
if { $thePlatform == "wnt" || $thePlatform == "uwp" } {
set aTargetPlatformExt bat
@@ -398,13 +389,14 @@ proc genprojbat {theFormat thePlatform theSolution} {
copy_with_warning "$::THE_CASROOT/adm/templates/draw.${aTargetPlatformExt}" "$::path/draw.${aTargetPlatformExt}"
}
set aSolShList ""
if { [regexp {^vc} $theFormat] } {
set aSolShList "msvc.bat"
copy_with_warning "$::THE_CASROOT/adm/templates/msvc.bat" "$::path/msvc.bat"
} else {
switch -exact -- "$theFormat" {
"cbp" {
set aSolShList { "codeblocks.sh" "codeblocks.bat" }
"cbp" {
file copy -force -- "$::THE_CASROOT/adm/templates/codeblocks.sh" "$::path/codeblocks.sh"
file copy -force -- "$::THE_CASROOT/adm/templates/codeblocks.bat" "$::path/codeblocks.bat"
# Code::Blocks 16.01 does not create directory for import libs, help him
set aPlatformAndCompiler "${thePlatform}/gcc"
if { "$thePlatform" == "mac" || "$thePlatform" == "ios" } {
@@ -413,21 +405,9 @@ proc genprojbat {theFormat thePlatform theSolution} {
file mkdir "$::path/${aPlatformAndCompiler}/lib"
file mkdir "$::path/${aPlatformAndCompiler}/libd"
}
"xcd" { set aSolShList "xcode.sh" }
"xcd" { file copy -force -- "$::THE_CASROOT/adm/templates/xcode.sh" "$::path/xcode.sh" }
}
}
foreach aSolSh $aSolShList {
set anShFile [open "$::THE_CASROOT/adm/templates/${aSolSh}" "r"]
set anShTmpl [read $anShFile]
close $anShFile
regsub -all -- {__SOLUTION__} $anShTmpl "$theSolution" anShTmpl
set anShFile [open "$::path/${aSolSh}" "w"]
puts $anShFile $anShTmpl
close $anShFile
}
}
###### MSVC #############################################################33
@@ -448,8 +428,7 @@ set THE_GUIDS_LIST($aTKNullKey) "{00000000-0000-0000-0000-000000000000}"
# @param theLibType Library type - dynamic or static
# @param thePlatform Optional target platform for cross-compiling, e.g. ios for iOS
# @param theCmpl Compiler option (msvc or gcc)
# @param theSolution Solution name
proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl theSolution } {
proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl } {
global path
set anOutRoot $theOutDir
if { $anOutRoot == "" } {
@@ -513,6 +492,9 @@ proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl theSolution }
return
}
# generate one solution for all projects if complete OS or VAS is processed
set anAllSolution "OCCT"
wokUtils:FILES:mkdir $anOutDir
if { ![file exists $anOutDir] } {
puts stderr "Error: Could not create output directory \"$anOutDir\""
@@ -528,12 +510,11 @@ proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl theSolution }
"vc11" -
"vc12" -
"vc14" -
"vc141" -
"vc142" { OS:MKVC $anOutDir $aModules $theSolution $theFormat $isUWP}
"cbp" { OS:MKCBP $anOutDir $aModules $theSolution $thePlatform $theCmpl }
"vc141" { OS:MKVC $anOutDir $aModules $anAllSolution $theFormat $isUWP}
"cbp" { OS:MKCBP $anOutDir $aModules $anAllSolution $thePlatform $theCmpl }
"xcd" {
set ::THE_GUIDS_LIST($::aTKNullKey) "000000000000000000000000"
OS:MKXCD $anOutDir $aModules $theSolution $theLibType $thePlatform
OS:MKXCD $anOutDir $aModules $anAllSolution $theLibType $thePlatform
}
}
@@ -953,7 +934,7 @@ proc osutils:collectinc {theModules theIncPath} {
set anIncFiles [glob -tails -nocomplain -dir ${anIncPath} "*"]
foreach anIncFile ${anIncFiles} {
if { [lsearch -exact ${allHeaderFiles} ${anIncFile}] == -1 } {
puts "Warning: file ${anIncPath}/${anIncFile} is not present in the sources and will be removed from ${theIncPath}"
puts "Warning: file ${anIncPath}/${anIncFile} is not presented in the sources and will be removed from ${theIncPath}!"
file delete -force "${theIncPath}/${anIncFile}"
}
}
@@ -984,7 +965,7 @@ proc osutils:vcsolution:header { vcversion } {
append var \
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
"# Visual Studio 2013\n"
} elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" || "$vcversion" == "vc142" } {
} elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141"} {
append var \
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
"# Visual Studio 14\n"
@@ -1222,9 +1203,6 @@ proc osutils:vcproj:readtemplate {theVcVer isUWP isExec} {
if { $theVcVer == "vc141" } {
set aVCRTVer "vc14"
set aToolset "v141"
} elseif { $theVcVer == "vc142" } {
set aVCRTVer "vc14"
set aToolset "v142"
}
set what "$theVcVer"
@@ -1370,11 +1348,6 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
if { "$::HAVE_LIBLZMA" == "true" } {
set aLibsMap(CSF_LIBLZMA) "liblzma"
}
if { "$::HAVE_E57" == "true" && "$theOS" != "wnt" } {
# exclude wnt, as there are different pragma lib depending on debug/release
set aLibsMap(CSF_E57) "E57RefImpl"
set aLibsMap(CSF_xerces) "xerces-c"
}
if { "$theOS" == "wnt" } {
# WinAPI libraries

View File

@@ -1,12 +1,11 @@
#!/bin/bash
# This file has been generated by genproj.tcl script from CASROOT/adm/templates/codeblocks.sh
export TARGET="cbp"
source ./env.sh "$1" "$TARGET"
if [ -e "/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks" ]; then
/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks ./adm/$WOKSTATION/cbp/__SOLUTION__.workspace
/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks ./adm/$WOKSTATION/cbp/OCCT.workspace
else
codeblocks ./adm/$WOKSTATION/cbp/__SOLUTION__.workspace
codeblocks ./adm/$WOKSTATION/cbp/OCCT.workspace
fi

View File

@@ -25,7 +25,6 @@ set "HAVE_D3D=false"
set "HAVE_ZLIB=false"
set "HAVE_LIBLZMA=false"
set "HAVE_RAPIDJSON=false"
set "HAVE_E57=false"
set "CSF_OPT_INC="
set "CSF_OPT_LIB32="
set "CSF_OPT_LIB64="
@@ -166,7 +165,6 @@ if ["%HAVE_D3D%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DH
if ["%HAVE_ZLIB%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_ZLIB" & set "CSF_DEFINES=HAVE_ZLIB;%CSF_DEFINES%"
if ["%HAVE_LIBLZMA%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_LIBLZMA" & set "CSF_DEFINES=HAVE_LIBLZMA;%CSF_DEFINES%"
if ["%HAVE_RAPIDJSON%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_RAPIDJSON" & set "CSF_DEFINES=HAVE_RAPIDJSON;%CSF_DEFINES%"
if ["%HAVE_E57%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_E57" & set "CSF_DEFINES=HAVE_E57;%CSF_DEFINES%"
rem Eliminate VS warning
if ["%CSF_DEFINES%"] == [""] set "CSF_DEFINES=;"

View File

@@ -15,8 +15,6 @@ export HAVE_VTK="false";
export HAVE_GLES2="false";
export HAVE_ZLIB="false";
export HAVE_LIBLZMA="false";
export HAVE_RAPIDJSON="false";
export HAVE_E57="false";
export MACOSX_USE_GLX="false";
export CSF_OPT_INC=""
export CSF_OPT_LIB32=""
@@ -105,8 +103,6 @@ if [ "$HAVE_GLES2" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -D
if [ "$HAVE_VTK" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_VTK"; fi
if [ "$HAVE_ZLIB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_ZLIB"; fi
if [ "$HAVE_LIBLZMA" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_LIBLZMA"; fi
if [ "$HAVE_RAPIDJSON" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_RAPIDJSON"; fi
if [ "$HAVE_E57" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_E57"; fi
# Option to compile OCCT with X11 libs on Mac OS X
if [ "$MACOSX_USE_GLX" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DMACOSX_USE_GLX"; fi

View File

@@ -1,11 +1,10 @@
@echo off
rem This file has been generated by genproj.tcl script from CASROOT/adm/templates/msvc.bat
rem Setup environment
call "%~dp0env.bat" %1 %2 %3
rem Define path to project file
set "PRJFILE=%~dp0\adm\msvc\%VCVER%\__SOLUTION__.sln"
set "PRJFILE=%~dp0\adm\msvc\%VCVER%\OCCT.sln"
if not exist "%PRJFILE%" set "PRJFILE=%~dp0\adm\msvc\%VCVER%\Products.sln"
if not "%4" == "" (
set "PRJFILE=%4"

View File

@@ -1,8 +1,7 @@
#!/bin/bash
# This file has been generated by genproj.tcl script from CASROOT/adm/templates/xcode.sh
export TARGET="xcd"
source ./env.sh "$1" "$TARGET"
open -a Xcode ./adm/mac/xcd/__SOLUTION__.xcworkspace
open -a Xcode ./adm/mac/xcd/OCCT.xcworkspace

View File

@@ -136,64 +136,6 @@ const char* GeomTools_Dump (void* theHandlePtr)
Dump geometric object to cout.
- *theHandlePtr* -- a pointer to the geometric variable (<i>Handle</i> to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
@section occt_debug_dump_json Dump OCCT objects into Json
Many OCCT classes may dump the current state into the stream. This stream contains the information about the class field into the field value/s.
It is possible to prepare recursive dump using corresponded macro for class fields. The depth of this recursion is defined by parameter of the dump.
The object defines What parameters should be presented in the Dump. The usual way is to dump all object fields.
@subsection occt_debug_dump_json_object Implementation in object
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.
3. Add several macro to store field values.
The following macro are defined to cover the object parameters into json format:
| Name | Result in json |
| :-------------------------- | :--------|
| OCCT_DUMP_FIELD_VALUE_NUMERICAL | "field": value |
| OCCT_DUMP_FIELD_VALUE_STRING | "field": "value" |
| OCCT_DUMP_FIELD_VALUE_POINTER | "field": "pointer address" |
| OCCT_DUMP_FIELD_VALUES_DUMPED | "field": { result of field->DumpJson(...) } |
| OCCT_DUMP_FIELD_VALUES_NUMERICAL | "field": [value_1, ..., value_n]
| OCCT_DUMP_FIELD_VALUES_STRING | "field": ["value_1", ..., "value_n"]
| OCCT_DUMP_BASE_CLASS | "kind": { result of kind::DumpJson(...) } |
@subsection occt_debug_dump_json_draw Using in DRAW
In DRAW, key '-dumpJson' is used to dump an object.
It is implemented in 'vaspect' and 'boundingbox' commands.
Json output for Bnd_OBB (using command 'bounding v -obb -dumpJson'):
~~~~~
"Bnd_OBB": {
"Center": {
"gp_XYZ": [1, 2, 3]
},
"Axes[0]": {
"gp_XYZ:" [1, 0, 0]
},
"Axes[1]": {
"gp_XYZ:" [0, 1, 0]
},
"Axes[2]": {
"gp_XYZ:" [0, 0, 1]
},
"HDims[0]": 0,
"HDims[1]": 0,
"HDims[2]": 0,
"IsAABox": 1,
}
~~~~~
@section occt_debug_vstudio Using Visual Studio debugger
@subsection occt_debug_vstudio_command Command window

View File

@@ -878,18 +878,7 @@ The test grid name is constructed depending on the type of the tested chamfers.
| dist_angle_complex | | Distance from edge and given angle |
| dist_angle_sequence | | Distance from edge and given angle |
@subsubsection testmanual_5_1_7 de
This group tests reading and writing of CAD data files (iges, step) to and from OCCT.
Test cases check transfer status, shape and attributes against expected reference values.
| Grid | Commands | Functionality |
| :---- | :----- | :------- |
| iges_1, iges_2, iges_3 | igesbrep, brepiges, ReadIges, WriteIges | IGES tests |
| step_1, step_2, step_3, step_4, step_5 | stepread, stepwrite, ReadStep, WriteStep | STEP tests |
@subsubsection testmanual_5_1_8 demo
@subsubsection testmanual_5_1_7 demo
This group allows demonstrating how testing cases are created, and testing DRAW commands and the test system as a whole.
@@ -900,7 +889,7 @@ This group allows demonstrating how testing cases are created, and testing DRAW
| samples | | OCCT samples |
@subsubsection testmanual_5_1_9 draft
@subsubsection testmanual_5_1_8 draft
This group allows testing draft operations.
@@ -911,7 +900,7 @@ DRAW module: MODELING.
| Angle | depouille | Drafts with angle (inclined walls) |
@subsubsection testmanual_5_1_10 feat
@subsubsection testmanual_5_1_9 feat
This group allows testing creation of features on a shape.
@@ -925,7 +914,7 @@ DRAW module: MODELING (package *BRepTest*).
| featrevol | | |
| featrf | | |
@subsubsection testmanual_5_1_11 heal
@subsubsection testmanual_5_1_10 heal
This group allows testing the functionality provided by *ShapeHealing* toolkit.
@@ -954,7 +943,7 @@ DRAW module: XSDRAW
| surface_to_revolution_standard | DT_ShapeConvertRev | Convert elementary surfaces to revolutions, simple cases |
| update_tolerance_locked | updatetolerance | Update the tolerance of shape so that it satisfy the rule: toler(face)<=toler(edge)<=toler(vertex) |
@subsubsection testmanual_5_1_12 mesh
@subsubsection testmanual_5_1_11 mesh
This group allows testing shape tessellation (*BRepMesh*) and shading.
@@ -971,7 +960,7 @@ DRAW modules: MODELING (package *MeshTest*), VISUALIZATION (package *ViewerTest*
| advanced_incmesh_parallel | incmesh | Meshing of complex shapes, parallel mode |
| standard_incmesh_parallel | incmesh | Meshing of simple shapes, parallel mode |
@subsubsection testmanual_5_1_13 mkface
@subsubsection testmanual_5_1_12 mkface
This group allows testing creation of simple surfaces.
@@ -986,7 +975,7 @@ DRAW module: MODELING (package *BRepTest*)
| after_revsurf_and_offset | mkface | |
| mkplane | mkplane | |
@subsubsection testmanual_5_1_14 nproject
@subsubsection testmanual_5_1_13 nproject
This group allows testing normal projection of edges and wires onto a face.
@@ -996,7 +985,7 @@ DRAW module: MODELING (package *BRepTest*)
| :---- | :----- | :------- |
| Base | nproject | |
@subsubsection testmanual_5_1_15 offset
@subsubsection testmanual_5_1_14 offset
This group allows testing offset functionality for curves and surfaces.
@@ -1012,7 +1001,7 @@ DRAW module: MODELING (package *BRepTest*)
| shape | offsetshape | |
| wire_closed_outside_0_005, wire_closed_outside_0_025, wire_closed_outside_0_075, wire_closed_inside_0_005, wire_closed_inside_0_025, wire_closed_inside_0_075, wire_unclosed_outside_0_005, wire_unclosed_outside_0_025, wire_unclosed_outside_0_075 | mkoffset | 2d offset of closed and unclosed planar wires with different offset step and directions of offset ( inside / outside ) |
@subsubsection testmanual_5_1_16 pipe
@subsubsection testmanual_5_1_15 pipe
This group allows testing construction of pipes (sweeping of a contour along profile).
@@ -1022,7 +1011,7 @@ DRAW module: MODELING (package *BRepTest*)
| :---- | :----- | :------- |
| Standard | pipe | |
@subsubsection testmanual_5_1_17 prism
@subsubsection testmanual_5_1_16 prism
This group allows testing construction of prisms.
@@ -1032,7 +1021,7 @@ DRAW module: MODELING (package *BRepTest*)
| :---- | :----- | :------- |
| seminf | prism | |
@subsubsection testmanual_5_1_18 sewing
@subsubsection testmanual_5_1_17 sewing
This group allows testing sewing of faces by connecting edges.
@@ -1044,7 +1033,7 @@ DRAW module: MODELING (package *BRepTest*)
| tol_1 | sewing | Sewing faces with tolerance 1 |
| tol_100 | sewing | Sewing faces with tolerance 100 |
@subsubsection testmanual_5_1_19 thrusection
@subsubsection testmanual_5_1_18 thrusection
This group allows testing construction of shell or a solid passing through a set of sections in a given sequence (loft).
@@ -1053,7 +1042,7 @@ This group allows testing construction of shell or a solid passing through a set
| solids | thrusection | Lofting with resulting solid |
| not_solids | thrusection | Lofting with resulting shell or face |
@subsubsection testmanual_5_1_20 xcaf
@subsubsection testmanual_5_1_19 xcaf
This group allows testing extended data exchange packages.

View File

@@ -1584,6 +1584,10 @@ To use the custom printer in OCAF, it can be either added to default messenger o
@subsection upgrade_740_BRepPrimAPI_MakeRevol Changes in BRepPrimAPI_MakeRevol algorithm
Previously the algorithm could create a shape with the same degenerated edge shared between some faces. Now it is prevented. The algorithm creates the different copy of this edge for each face. The method *Generated(...)* has been changed in order to apply restriction to the input shape: input shape can be only of type VERTEX, EDGE, FACE or SOLID. For input shape of another type the method always returns empty list.
@subsection upgrade_740_extremaalgo Changes in behavior of Extrema algorithms
Since OCCT 7.4.0 exception is thrown on the attempt of taking points in case of infinite number of solution (IsParallel status). Request of distances is available as before. Method NbExt() always returns 1 in such cases.
@subsection upgrade_740_removed Removed features
* The following methods of the class *BRepAlgoAPI_BooleanOperation* have been removed as obsolete or replaced:
- *BuilderCanWork* can be replaced with *IsDone* or *HasErrors* method.
@@ -1712,75 +1716,6 @@ aGroup->SetPrimitivesAspect (myDrawer->LineAspect()->Aspect()); //!< next array
aGroup->AddPrimitiveArray (aLines);
~~~~
@subsection upgrade_740_materials Material definition
Decomposition of Ambient, Diffuse, Specular and Emissive properties has been eliminated within *Graphic3d_MaterialAspect* definition.
As result, the following methods of *Graphic3d_MaterialAspect* class have been removed: SetReflectionMode(), SetReflectionModeOn(), Ambient(), Diffuse(), Emissive(), Specular(), SetAmbient(), SetDiffuse(), SetSpecular(), SetEmissive().
Previously, computation of final value required the following code:
~~~~
Graphic3d_MaterialAspect theMaterial; Quantity_Color theInteriorColor;
Graphic3d_Vec3 anAmbient (0.0f);
if (theMaterial.ReflectionMode (Graphic3d_TOR_AMBIENT))
{
anAmbient = theMaterial.MaterialType (Graphic3d_MATERIAL_ASPECT)
? (Graphic3d_Vec3 )theInteriorColor * theMaterial.Ambient()
: (Graphic3d_Vec3 )theMaterial.AmbientColor() * theMaterial.Ambient();
}
~~~~
New code looks like this:
~~~~
Graphic3d_MaterialAspect theMaterial; Quantity_Color theInteriorColor;
Graphic3d_Vec3 anAmbient = theMaterial.AmbientColor();
if (theMaterial.MaterialType (Graphic3d_MATERIAL_ASPECT)) { anAmbient *= (Graphic3d_Vec3 )theInteriorColor; }
~~~~
Existing code should be updated to:
- Replace Graphic3d_MaterialAspect::SetReflectionModeOff() with setting black color; SetReflectionModeOn() calls can be simply removed.
R.g. theMaterial.SetAmbientColor(Quantity_NOC_BLACK).
- Replace Graphic3d_MaterialAspect::Ambient(), SetAmbient(), Diffuse(), SetDiffuse(), Specular(), SetSpecular(), Emissive(), SetEmissive() with methods working with pre-multiplied color.
E.g. theMaterial.SetAmbientColor(Graphic3d_Vec3 (1.0f, 0.0f, 0.0f) * 0.2f).
- Avoid using Graphic3d_MaterialAspect::Color() and SetColor() with non-physical materials (Graphic3d_MATERIAL_ASPECT).
These materials do not include color definition, because it is taken from Graphic3d_Aspects::InteriorColor() - this has not been changed.
However, previously it was possible storing the color with SetColor() call and then fetching it with Color() by application code (the rendering ignored this value);
now SetColor() explicitly ignores call for Graphic3d_MATERIAL_ASPECT materials and Color() returns DiffuseColor() multiplication coefficients.
@subsection upgrade_740_text Changes in Graphic3d_Text and OpenGl_Text API
Parameters of *Text* in *Graphic3d_Group* are moved into a new *Graphic3d_Text* class. *AddText* of *Graphic3d_Group* should be used instead of the previous *Text*.
The previous code:
~~~~
Standard_Real x, y, z;
theAttachmentPoint.Coord(x,y,z);
theGroup->Text (theText,
Graphic3d_Vertex(x,y,z),
theAspect->Height(),
theAspect->Angle(),
theAspect->Orientation(),
theAspect->HorizontalJustification(),
theAspect->VerticalJustification());
~~~~
should be replaced by the new code:
~~~~
Handle(Graphic3d_Text) aText = new Graphic3d_Text (theAspect->Height());
aText->SetText (theText.ToExtString());
aText->SetPosition (theAttachmentPoint);
aText->SetHorizontalAlignment (theAspect->HorizontalJustification());
aText->SetVerticalAlignment (theAspect->VerticalJustification());
theGroup->AddText (aText);
~~~~
*OpenGl_Text* contains *Graphic3d_Text* field.
*OpenGl_TextParam* struct is removed. Constructor and *Init* of *OpenGl_Text* with *OpenGl_TextParam* are also removed.
Instead of using them, change *OpenGl_Text*.
Please, note, that after modifying *OpenGl_Text*, *Reset* of *OpenGl_Text* should be called.
*FormatParams* of *OpenGl_Text* is replaced by *Text*.
@subsection upgrade_740_prsupdate Presentation invalidation
Historically AIS_InteractiveObject provided two independent mechanisms invalidating presentation (asking presentation manager to recompute specific display mode or all modes):
@@ -1811,34 +1746,6 @@ Forward declarations of *Prs3d_Presentation* should be corrected, since it is no
Proxy classes *SelectBasics_SensitiveEntity* and *SelectBasics_EntityOwner* have been removed - *Select3D_SensitiveEntity* and *SelectMgr_EntityOwner* should be now used directly instead.
@subsection upgrade_740_offset Polygon offset defaults
*Graphic3d_PolygonOffset* default constructor has been corrected to define Units=1 instead of Units=0.
Default polygon offset settings Mode=Aspect_POM_Fill + Factor=1 + Units=1 are intended to push triangulation
(Shaded presentation) a little bit behind of lines (Wireframe and Face Edges)
for reducing z-fighting effect of Shaded+Wireframe combination.
The change in defaults (Units changed from 0 to 1) is intended to cover scenario when camera direction is perpendicular to model plane (like 2D view).
Application observing unexpected visual difference on this change should consider customizing this property within AIS_InteractiveContext default attributes
or on per-presentation basis via *Graphic3d_Aspects::SetPolygonOffset()* methods.
@subsection upgrade_740_zlayer Adding ZLayers in given position
Interface of insertion ZLayer in the viewer has been improved with ability to insert new layer before or after existing one.
Previously undocumented behavior of *V3d_Viewer::AddZlayer()* method has been corrected to insert new layer before *Graphic3d_ZLayerId_Top*.
Applications might need revising their custom layers creation code and specify precisely their order with new methods *V3d_Viewer::InsertLayerBefore()* and *V3d_Viewer::InsertLayerAfter()*.
@subsection upgrade_740_enum_changed Modified enumerations
Applications using integer values of the following enumerations in persistence
should be corrected as these enumerations have been modified:
| Name |
| :----- |
| AIS_TypeOfAttribute |
| Aspect_InteriorStyle |
| Font_FontAspect |
@subsection upgrade_740_geproj Custom defines within env.bat
*env.bat* produced by Visual Studio project generator *genproj.bat* has been modified so that *%CSF_DEFINES%* variable is reset to initial state.
@@ -1854,6 +1761,3 @@ The following API changes have been made:
* Methods BOPTools_BoxSelector::Reject and BOPTools_BoxSelector::Accept have been removed as unused.
* The RunParallel flag has been removed from the list of parameters of BOPAlgo_Tools::IntersectVertices method. Earlier, it performed selection from the UB tree in parallel mode. Now all interfering pairs are found in one pass, using pair traverse of the same BVH tree.
@subsection upgrade_740_stdnamespace Standard_Stream.hxx no more has "using std::" statements
*Standard_Stream.hxx* header, commonly included by other OCCT header files, does no more add entities from *std namespace* related to streams (like *std::cout*, *std::istream* and others) into global namespace.
The application code relying on this matter should be updated to either specify std namespace explicitly (like std::cout) or add "using std::" statements locally.

View File

@@ -48,6 +48,6 @@ LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
# Define alias for inserting images in uniform way (both HTML and PDF)
ALIASES += figure{1}="\image latex \1 \n"
ALIASES += figure{2}="\image latex \1 \2 \n"
ALIASES += figure{3}="\image latex \1 \2 width=\3 \n"
ALIASES += figure{1}="\image latex \1"
ALIASES += figure{2}="\image latex \1 \2"
ALIASES += figure{3}="\image latex \1 \2 width=\3"

View File

@@ -40,7 +40,7 @@ if [ "$aTarget" == "" ]; then
fi
cd $aScriptPath
tclsh "./adm/start.tcl" genproj ${aTarget} -solution "OCCT" $anOpt2 $anOpt3 $anOpt4 $anOpt5
tclsh "./adm/start.tcl" genproj ${aTarget} $anOpt2 $anOpt3 $anOpt4 $anOpt5
export PATH="$anOldPath"
export LD_LIBRARY_PATH="$anOldLd"

View File

@@ -54,5 +54,5 @@ if "%aPrjFmt%" == "" ( set "aPrjFmt=vcxproj" )
if "%aPrjFmt%" == "vcxproj" ( set "aPrjFmt=%VCFMT%" )
cd %~dp0
%TCL_EXEC% %~dp0adm/start.tcl genproj %aPrjFmt% %aPlatform% -solution "OCCT" %3 %4 %5
%TCL_EXEC% %~dp0adm/start.tcl genproj %aPrjFmt% %aPlatform% %3 %4 %5
SET "PATH=%OLD_PATH%"

View File

@@ -596,8 +596,8 @@ void GeomConstraints_Presentation::sample3()
aFileName += "\\points.dat";
// open file
std::ifstream aFile;
aFile.open(aFileName.ToCString(), std::ios::failbit);
ifstream aFile;
aFile.open(aFileName.ToCString(), ios::failbit);
if(!aFile)
{
aFileName += " was not found. The sample can not be shown.";

View File

@@ -80,7 +80,7 @@ void GeoAlgo_Sol::Build(const TColgp_SequenceOfXYZ& seqOfXYZ)
//Filling plate
Plate_Plate myPlate;
std::cout<<" * Nunber of points = "<< nbPnt << std::endl;
cout<<" * Nunber of points = "<< nbPnt << endl;
for (i=1; i<= nbPnt; i++) {
gp_Pnt ptProj(seqOfXYZ.Value(i).X(), seqOfXYZ.Value(i).Y(), 0. );
gp_Vec aVec( ptProj, seqOfXYZ.Value(i));
@@ -90,7 +90,7 @@ void GeoAlgo_Sol::Build(const TColgp_SequenceOfXYZ& seqOfXYZ)
}
myPlate.SolveTI(2, 1.);// resolution
if (!myPlate.IsDone()) {
std::cout<<" plate computation has failed"<< std::endl;
cout<<" plate computation has failed"<< endl;
myIsDone=Standard_False;
}
@@ -144,11 +144,11 @@ Handle(Geom_BSplineSurface) GeoAlgo_Sol::Read(const Standard_CString aGroundName
Standard_Integer nbPnt=0;
// Read points from the file
std::filebuf fic;
std::istream in(&fic);
filebuf fic;
istream in(&fic);
if (!fic.open(aGroundName,std::ios::in)){
std::cout << " impossible to open a file : "<<aGroundName<<std::endl;
if (!fic.open(aGroundName,ios::in)){
cout << " impossible to open a file : "<<aGroundName<<endl;
myIsDone = Standard_False;
return 0;
}

View File

@@ -1217,7 +1217,7 @@ Standard_Real ang = D1.Angle(D2); \n\
Handle(ISession_Direction) aDirection2 = new ISession_Direction(gp_Pnt(0,0,0),D2,3);
aDoc->GetAISContext()->Display(aDirection2, Standard_False);
std::cout<<" D1.Angle(D2) : "<<ang<<std::endl;
cout<<" D1.Angle(D2) : "<<ang<<endl;
TCollection_AsciiString Message2 (ang);
TCollection_AsciiString Message3 (ang/M_PI/180);

View File

@@ -1081,9 +1081,9 @@ void CGeometryDoc::OnCreateSol()
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
CString filename = dlg.GetPathName();
std::filebuf fic;
std::istream in(&fic);
if (!fic.open (filename, std::ios::in))
filebuf fic;
istream in(&fic);
if (!fic.open (filename, ios::in))
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : Unable to open file", L"CasCade Error", MB_ICONERROR);
TColgp_SequenceOfXYZ seqOfXYZ;
@@ -1162,7 +1162,7 @@ void CGeometryDoc::OnSimplify()
std::filebuf aFileBuf;
std::istream aStream (&aFileBuf);
if (!aFileBuf.open (initfile, std::ios::in))
if (!aFileBuf.open (initfile, ios::in))
{
initfile += L" was not found. The sample can not be shown.";
myCResultDialog.SetText (initfile);

View File

@@ -4949,9 +4949,9 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Building the tangent surface...");
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
CString filename = dlg.GetPathName();
std::filebuf fic;
std::istream in(&fic);
if (!fic.open(filename, std::ios::in))
filebuf fic;
istream in(&fic);
if (!fic.open(filename, ios::in))
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : Unable to open file", L"CasCade Error", MB_ICONERROR);
Standard_Real x,y,z;
BRep_Builder B;

View File

@@ -233,7 +233,7 @@ void CViewer2dDoc::OnBUTTONTestFace()
std::filebuf aFileBuf;
std::istream aStream (&aFileBuf);
if (!aFileBuf.open (dlg.GetPathName(), std::ios::in))
if (!aFileBuf.open (dlg.GetPathName(), ios::in))
{
AfxMessageBox (L"The shape must be not a null Face");
return;

View File

@@ -164,7 +164,7 @@ Standard_Boolean TexturesExt_Presentation::loadShape(TopoDS_Shape& aShape,
std::filebuf aFileBuf;
std::istream aStream (&aFileBuf);
if (!aFileBuf.open (initfile, std::ios::in))
if (!aFileBuf.open (initfile, ios::in))
{
initfile += L" was not found. The sample can not be shown.";
getDocument()->UpdateResultMessageDlg ("Textured Shape", initfile);

View File

@@ -936,7 +936,7 @@ void CViewer3dDoc::DoSample()
catch (Standard_Failure const& anException)
{
Standard_SStream aSStream;
aSStream << "An exception was caught: " << anException << std::ends;
aSStream << "An exception was caught: " << anException << ends;
CString aMsg = aSStream.str().c_str();
AfxMessageBox (aMsg);
}

View File

@@ -925,7 +925,7 @@ void COcafDoc::OnFileSaveAs()
CWaitCursor aWaitCursor;
CString CSPath = dlg.GetPathName();
std::cout << "Save As " << CSPath << std::endl;
cout << "Save As " << CSPath << endl;
PathName=CSPath;
const wchar_t* SPath = CSPath;
TCollection_ExtendedString TPath (SPath);

View File

@@ -76,7 +76,7 @@ Standard_Boolean TOcafFunction_CutDriver::MustExecute(const Handle(TFunction_Log
*/
TCollection_AsciiString aEntry;
TDF_Tool::Entry(Label(), aEntry);
std::cout << "Entry: "<<aEntry.ToCString()<<std::endl;
cout << "Entry: "<<aEntry.ToCString()<<endl;
Label().FindChild(1).FindAttribute(TDF_Reference::GetID(),OriginalRef);
if (log->IsModified(OriginalRef->Get())) return Standard_True; // Original shape.

View File

@@ -425,7 +425,7 @@ void Tesselate_Presentation::sample(const Standard_CString aFileName)
std::filebuf aFileBuf;
std::istream aStream (&aFileBuf);
if (!aFileBuf.open (initfile, std::ios::in))
if (!aFileBuf.open (initfile, ios::in))
{
initfile += L" was not found. The sample can not be shown.";
GetDocument()->PocessTextInDialog ("Compute the triangulation on a shape", initfile);

View File

@@ -349,7 +349,7 @@ void CTriangulationDoc::DoSample()
catch (Standard_Failure const& anException)
{
Standard_SStream aSStream;
aSStream << "An exception was caught: " << anException << std::ends;
aSStream << "An exception was caught: " << anException << ends;
CString aMsg = aSStream.str().c_str();
// aSStream.rdbuf()->freeze(0); // allow deletion of dynamic array
AfxMessageBox (aMsg);

View File

@@ -83,35 +83,35 @@ CAnimationDoc::CAnimationDoc()
std::filebuf aFileBuf;
std::istream aStream (&aFileBuf);
CString aPathCrankArm = aDataDirPath + "\\CrankArm.rle";
if (aFileBuf.open (aPathCrankArm, std::ios::in))
if (aFileBuf.open (aPathCrankArm, ios::in))
{
BRepTools::Read (CrankArm, aStream, B);
aFileBuf.close();
}
CString aPathCylinderHead = aDataDirPath + "\\CylinderHead.rle";
if (aFileBuf.open (aPathCylinderHead, std::ios::in))
if (aFileBuf.open (aPathCylinderHead, ios::in))
{
BRepTools::Read (CylinderHead, aStream, B);
aFileBuf.close();
}
CString aPathPropeller = aDataDirPath + "\\Propeller.rle";
if (aFileBuf.open (aPathPropeller, std::ios::in))
if (aFileBuf.open (aPathPropeller, ios::in))
{
BRepTools::Read (Propeller, aStream, B);
aFileBuf.close();
}
CString aPathPiston = aDataDirPath + "\\Piston.rle";
if (aFileBuf.open (aPathPiston, std::ios::in))
if (aFileBuf.open (aPathPiston, ios::in))
{
BRepTools::Read (Piston, aStream, B);
aFileBuf.close();
}
CString aPathEngineBlock = aDataDirPath + "\\EngineBlock.rle";
if (aFileBuf.open (aPathEngineBlock, std::ios::in))
if (aFileBuf.open (aPathEngineBlock, ios::in))
{
BRepTools::Read (EngineBlock, aStream, B);
aFileBuf.close();

View File

@@ -49,7 +49,7 @@ Handle(TColStd_HArray2OfReal) ReadRegularGrid(CString FileName,
if (fp)
{
fscanf_s(fp, "%d %d", &R2, &C2);
std::cout << "Reading Grid : ( " << R2 << " , " << C2 << " )." << std::endl;
cout << "Reading Grid : ( " << R2 << " , " << C2 << " )." << endl;
H = new TColStd_HArray2OfReal(C1, C2, R1, R2);
@@ -83,14 +83,14 @@ Handle(TColStd_HArray2OfReal) ReadRegularGrid(CString FileName,
}
}
std::cout << "Deltax = " << Deltax << std::endl;
std::cout << "Deltay = " << Deltay << std::endl;
cout << "Deltax = " << Deltax << endl;
cout << "Deltay = " << Deltay << endl;
fclose(fp);
}
else
{
std::cout << "cannot open file : " << FileName << std::endl;
cout << "cannot open file : " << FileName << endl;
}
return H;
}

View File

@@ -153,7 +153,7 @@ void COCCDemoDoc::DoSample()
catch (Standard_Failure const& anException)
{
Standard_SStream aSStream;
aSStream << "An exception was caught: " << anException << std::ends;
aSStream << "An exception was caught: " << anException << ends;
CString aMsg = aSStream.str().c_str();
AfxMessageBox (aMsg);
}

View File

@@ -156,7 +156,7 @@ Standard_Boolean CImportExport::ReadBREP(CString aFileName,
std::filebuf aFileBuf;
std::istream aStream (&aFileBuf);
if (!aFileBuf.open (aFileName, std::ios::in))
if (!aFileBuf.open (aFileName, ios::in))
{
return Standard_False;
}
@@ -230,7 +230,7 @@ Standard_Boolean CImportExport::SaveBREP (CString aFileName,
{
std::filebuf aFileBuf;
std::ostream aStream (&aFileBuf);
if (!aFileBuf.open (aFileName, std::ios::out))
if (!aFileBuf.open (aFileName, ios::out))
{
return Standard_False;
}
@@ -811,7 +811,7 @@ Standard_Boolean CImportExport::SaveVRML(const Standard_CString&
} // iterator of shapes
// Call VRML writer
std::ofstream writer(aFileName);
ofstream writer(aFileName);
writer<<scene;
writer.close();

View File

@@ -79,10 +79,10 @@ case 6: //color
Handle(Graphic3d_Group) mygroup = Prs3d_Root::CurrentGroup(aPresentation);
myAspect = (new Prs3d_ShadingAspect())->Aspect();
Graphic3d_MaterialAspect material = myAspect->FrontMaterial();
material.SetAmbientColor (Quantity_NOC_BLACK);
material.SetDiffuseColor (Quantity_NOC_BLACK);
material.SetSpecularColor(Quantity_NOC_BLACK);
material.SetEmissiveColor(Quantity_NOC_BLACK);
material.SetReflectionModeOff(Graphic3d_TOR_AMBIENT);
material.SetReflectionModeOff(Graphic3d_TOR_DIFFUSE);
material.SetReflectionModeOff(Graphic3d_TOR_SPECULAR);
material.SetReflectionModeOff(Graphic3d_TOR_EMISSION);
myAspect->SetFrontMaterial(material);
mygroup->SetPrimitivesAspect(myAspect);
@@ -129,7 +129,7 @@ case 6: //color
// This triangulation is computed with the deflection myDeflection.
#ifdef DEBUG
std::cout <<"Deflection = " << myDeflection << "\n" << std::endl;
cout <<"Deflection = " << myDeflection << "\n" << endl;
#endif
Standard_Integer NumFace;
@@ -145,7 +145,7 @@ case 6: //color
TopLoc_Location myLocation = myFace.Location();
#ifdef DEBUG
std::cout << "J\'explore actuellement la face " << NumFace << "\n" << std::endl;
cout << "J\'explore actuellement la face " << NumFace << "\n" << endl;
#endif
Handle(Poly_Triangulation) myT = BRep_Tool::Triangulation(myFace, myLocation);
// Returns the Triangulation of the face. It is a null handle if there is no triangulation.
@@ -153,7 +153,7 @@ case 6: //color
if (myT.IsNull())
{
#ifdef DEBUG
// std::cout << "Triangulation of the face "<< i <<" is null \n"<< std::endl;
// cout << "Triangulation of the face "<< i <<" is null \n"<< endl;
#endif
return;
}
@@ -200,7 +200,7 @@ case 6: //color
TopLoc_Location myLocation = myFace.Location();
#ifdef DEBUG
std::cout << "J\'explore actuellement la face " << NumFace << "\n" << std::endl;
cout << "J\'explore actuellement la face " << NumFace << "\n" << endl;
#endif
Handle(Poly_Triangulation) myT = BRep_Tool::Triangulation(myFace, myLocation);
// Returns the Triangulation of the face. It is a null handle if there is no triangulation.
@@ -208,7 +208,7 @@ case 6: //color
if (myT.IsNull())
{
#ifdef DEBUG
//std::cout << "Triangulation of the face "<< i <<" is null \n"<< std::endl;
//cout << "Triangulation of the face "<< i <<" is null \n"<< endl;
#endif
return;
}
@@ -255,7 +255,7 @@ case 6: //color
for (nt = 1; nt <= nnn; nt++)
{
#ifdef DEBUG
std::cout << "On traite actuellement le triangle : "<< nt <<"\n";
cout << "On traite actuellement le triangle : "<< nt <<"\n";
#endif
if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed"
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2

View File

@@ -50,7 +50,7 @@ int AFXAPI AfxWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
// int i = setvbuf( stdout, NULL, _IONBF, 0 );
// filebuf ff(hCrt);
// cout = &ff;
std::cout<<"This Debug Window is defined in WinMain.cpp and will disappear in release mode"<<std::endl;
cout<<"This Debug Window is defined in WinMain.cpp and will disappear in release mode"<<endl;
#endif // DISPLAYCONSOLE // By Matra

View File

@@ -354,7 +354,7 @@ static void Sample()
Standard_Boolean isverified = constraint->Verified();
if( !isverified ) {
std::cout << "Constraint is not valid" << std::endl;
cout << "Constraint is not valid" << endl;
}

View File

@@ -308,7 +308,7 @@ void Sample()
BRepAlgo_Cut mkCUT (OBJECT, TOOL);
if (!mkCUT.IsDone()) {
std::cout << "CUT: Algorithm failed" << std::endl;
cout << "CUT: Algorithm failed" << endl;
return;
} else
{
@@ -318,7 +318,7 @@ void Sample()
if (!BRepAlgo::IsValid(Larg, mkCUT.Shape(), Standard_True, Standard_False)) {
std::cout << "CUT: Result is not valid" << std::endl;
cout << "CUT: Result is not valid" << endl;
return;
} else
{

View File

@@ -101,9 +101,9 @@ static void Sample()
Handle(TPrsStd_NamedShapeDriver) driver;
if( table->FindDriver(driverguid, driver) )
std::cout << "Driver was found " << std::endl;
cout << "Driver was found " << endl;
else
std::cout << "Driver wasn't found" << std::endl;
cout << "Driver wasn't found" << endl;
// Driver can be used to build AIS_InteractiveObject for presenting the given label

View File

@@ -214,7 +214,7 @@ void MainWindow::compute()
}
aTimer.Show(seconds, minutes, hours, CPUTime);
std::cout << "Execution of "<<graph->getNbThreads()<< " threads took " << hours << " hours, " << minutes << " minutes, " << seconds << " seconds" << std::endl;
cout << "Execution of "<<graph->getNbThreads()<< " threads took " << hours << " hours, " << minutes << " minutes, " << seconds << " seconds" << endl;
// Redraw the nodes (change their colour).
redrawGraph();

View File

@@ -340,7 +340,7 @@ TranslateDlg* Translate::getDialog( const int format, const bool import )
filter.append( "\t" );
}
std::cout << filter.toLatin1().constData() << std::endl;
cout << filter.toLatin1().constData() << endl;
QStringList filters = filter.split( "\t" );
myDlg->setNameFilters ( filters );

View File

@@ -1,90 +0,0 @@
# The following example constructs a 3D object looking like new OCC logo on top view.
#
#Category: Modeling
#Title: OCC Logo 2019
pload MODELING VISUALIZATION XDE OCAF
# spheric body
psphere s 1
box b 0 0 -2 1.5 1.5 4
bcut sb s b
# toroidal handle
ptorus t 1 0.5
trotate t 0 0 0 0 0 1 -90
ttranslate t 1.5 1.5 0
bcut tb t b
pcylinder p1 0.5 0.5
trotate p1 0 0 0 0 0 1 180
trotate p1 0 0 0 1 0 0 90
ttranslate p1 0.5 1.5 0
pcylinder p2 0.5 0.5
trotate p2 0 0 0 0 0 1 180
trotate p2 0 0 0 1 0 0 90
trotate p2 0 0 0 0 0 1 90
ttranslate p2 1 0.5 0
bfuse tp tb p1
bfuse tp tp p2
# intermediate part
# - get surfaces and edges on half of spheric and toroidal parts for filling
box b -2 -2 -2 4 4 2
bcut sbh sb b
bcut tph tp b
unset b
explode sbh f
renamevar sbh_1 sbf
explode sbf e
explode tph f
renamevar tph_2 tpf1
renamevar tph_13 tpf2
explode tpf1 e
explode tpf2 e
# - make curved surface by plate
#plate r 0 4 tpf1_1 tpf1 1 tpf2_3 tpf2 1 sbf_2 sbf 1 sbf_4 sbf 1
approxplate r1 0 4 tpf1_1 tpf1 0 tpf2_1 tpf2 0 sbf_2 sbf 0 sbf_4 sbf 0 0.00001 100 3 0
# - make solid
tcopy r1 r2
tmirror r2 0 0 0 0 0 1
explode sb f
explode tp f
sewing rr 0.001 r1 r2 sb_2 sb_3 tp_2 tp_5
ssolid rr rs
# rotate all solids by 45 deg to have standard orientation of the logo on top view
trotate sb 0 0 0 0 0 1 -45
trotate tp 0 0 0 0 0 1 -45
trotate rs 0 0 0 0 0 1 -45
# create XDE document
catch {Close D}
XNewDoc D
set main [XNewShape D]
XAddComponent D $main sb
XAddComponent D $main tp
XAddComponent D $main rs
XUpdateAssemblies D
SetName D $main "OCC Logo 2019"
SetName D [XFindShape D sb] "Core"
SetName D [XFindShape D tp] "Loop"
SetName D [XFindShape D rs] "Connector"
XSetColor D sb 1 0.21 0.32
XSetColor D tp 0 0.667 0.855
XSetColor D rs 0 0.45 0.69
# display
vinit
vsetcolorbg 1 1 1
vsetdispmode 1
XDisplay D
vtop
vfit

View File

@@ -86,4 +86,3 @@ drawObjects 0 ""
drawObjects 1 red
drawObjects 2 green
drawObjects 3 blue1
vrepaint

View File

@@ -75,4 +75,4 @@ vrenderparams -ray -gi -rayDepth 10
puts "Make several path tracing iterations to refine the picture, please wait..."
vfps 100
puts "Done. To improve the image further, or after view manipulations, give command:"
puts "vfps \[nb_iteratons\] or vrepaint -continuous"
puts "vfps \[nb_iteratons\]"

View File

@@ -85,4 +85,4 @@ vrenderparams -ray -gi -rayDepth 8
puts "Make several path tracing iterations to refine the picture, please wait..."
vfps 100
puts "Done. To improve the image further, or after view manipulations, give command:"
puts "vfps \[nb_iteratons\] or vrepaint -continuous"
puts "vfps \[nb_iteratons\]"

View File

@@ -223,4 +223,4 @@ vrenderparams -ray -gi -rayDepth 10
puts "Make several path tracing iterations to refine the picture, please wait..."
vfps 512
puts "Done. To improve the image further, or after view manipulations, give command:"
puts "vfps \[nb_iteratons\] or vrepaint -continuous"
puts "vfps \[nb_iteratons\]"

View File

@@ -273,7 +273,7 @@ Standard_Boolean MainPage::SaveBREP(const wchar_t* theFilePath, const TopoDS_Sha
std::filebuf aFileBuf;
std::ostream aStream(&aFileBuf);
if (!aFileBuf.open(theFilePath, std::ios::out)) {
if (!aFileBuf.open(theFilePath, ios::out)) {
Output_TextBlock->Text += L"Error: cannot open file for export (brep)\n";
return Standard_False;
}
@@ -291,7 +291,7 @@ Standard_Boolean MainPage::SaveIGES(const wchar_t* theFilePath, const TopoDS_Sha
std::filebuf aFileBuf;
std::ostream aStream(&aFileBuf);
if (!aFileBuf.open(theFilePath, std::ios::out)) {
if (!aFileBuf.open(theFilePath, ios::out)) {
Output_TextBlock->Text += L"Error: cannot open file for export (iges)\n";
return Standard_False;
}
@@ -319,7 +319,7 @@ Standard_Boolean MainPage::SaveSTEP(const wchar_t* theFilePath, const TopoDS_Sha
std::filebuf aFileBuf;
std::ostream aStream(&aFileBuf);
if (!aFileBuf.open(theFilePath, std::ios::out)) {
if (!aFileBuf.open(theFilePath, ios::out)) {
Output_TextBlock->Text += L"Error: cannot open file for export (step)\n";
return Standard_False;
}

View File

@@ -48,7 +48,7 @@ void AIS_AnimationCamera::update (const AIS_AnimationProgress& theProgress)
Handle(Graphic3d_Camera) aCamera = myView->Camera();
Graphic3d_CameraLerp aCamLerp (myCamStart, myCamEnd);
aCamLerp.Interpolate (HasOwnDuration() ? theProgress.LocalNormalized : 1.0, aCamera);
aCamLerp.Interpolate (theProgress.LocalNormalized, aCamera);
const Standard_Boolean aPrevImmUpdate = myView->SetImmediateUpdate (Standard_False);
myView->SetCamera (aCamera);

View File

@@ -33,9 +33,6 @@ public:
//! Return the target view.
const Handle(V3d_View)& View() const { return myView; }
//! Set target view.
void SetView (const Handle(V3d_View)& theView) { myView = theView; }
//! Return camera start position.
const Handle(Graphic3d_Camera)& CameraStart() const { return myCamStart; }

View File

@@ -26,7 +26,6 @@
#include <Graphic3d_AspectText3d.hxx>
#include <Graphic3d_GraphicDriver.hxx>
#include <Graphic3d_ArrayOfTriangles.hxx>
#include <Graphic3d_Text.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
@@ -79,31 +78,6 @@ namespace
Standard_Real aSaturation = NCollection_Lerp<Standard_Real>::Interpolate (theHlsMin[2], theHlsMax[2], aValue);
return Quantity_Color (AIS_ColorScale::hueToValidRange (aHue), aLightness, aSaturation, Quantity_TOC_HLS);
}
//! Return the index of discrete interval for specified value.
//! Note that when value lies exactly on the border between two intervals,
//! determining which interval to return is undefined operation;
//! Current implementation returns the following interval in this case.
//! @param theValue [in] value to map
//! @param theMin [in] values range, lower value
//! @param theMax [in] values range, upper value
//! @param theNbIntervals [in] number of discrete intervals
//! @return index of interval within [1, theNbIntervals] range
static Standard_Integer colorDiscreteInterval (Standard_Real theValue,
Standard_Real theMin,
Standard_Real theMax,
Standard_Integer theNbIntervals)
{
if (Abs (theMax - theMin) <= Precision::Approximation())
{
return 1;
}
Standard_Integer anInterval = 1 + (Standard_Integer )Floor (Standard_Real (theNbIntervals) * (theValue - theMin) / (theMax - theMin));
// map the very upper value (theValue==theMax) to the largest color interval
anInterval = Min (anInterval, theNbIntervals);
return anInterval;
}
}
//=======================================================================
@@ -373,14 +347,21 @@ Standard_Boolean AIS_ColorScale::FindColor (const Standard_Real theValue,
if (myColorType == Aspect_TOCSD_USER)
{
const Standard_Integer anInterval = colorDiscreteInterval (theValue, myMin, myMax, myNbIntervals);
if (anInterval < myColors.Lower() || anInterval > myColors.Upper())
Standard_Integer anIndex = 0;
if (Abs (myMax - myMin) > Precision::Approximation())
{
anIndex = (theValue - myMin < Precision::Confusion())
? 1
: Standard_Integer (Ceiling (( theValue - myMin ) / ( (myMax - myMin) / myNbIntervals)));
}
if (anIndex <= 0 || anIndex > myColors.Length())
{
theColor = Quantity_Color();
return Standard_False;
}
theColor = myColors.Value (anInterval);
theColor = myColors.Value (anIndex);
return Standard_True;
}
@@ -404,8 +385,13 @@ Standard_Boolean AIS_ColorScale::FindColor (const Standard_Real theValue,
return Standard_False;
}
const Standard_Integer anInterval = colorDiscreteInterval (theValue, theMin, theMax, theColorsCount);
theColor = colorFromValueEx (anInterval - 1, 0, theColorsCount - 1, theColorHlsMin, theColorHlsMax);
Standard_Real anInterval = 0.0;
if (Abs (theMax - theMin) > Precision::Approximation())
{
anInterval = Floor (Standard_Real (theColorsCount) * (theValue - theMin) / (theMax - theMin));
}
theColor = colorFromValueEx (anInterval, 0, theColorsCount - 1, theColorHlsMin, theColorHlsMax);
return Standard_True;
}
@@ -810,14 +796,16 @@ void AIS_ColorScale::drawText (const Handle(Graphic3d_Group)& theGroup,
const Graphic3d_VerticalTextAlignment theVertAlignment)
{
const Handle(Prs3d_TextAspect)& anAspect = myDrawer->TextAspect();
theGroup->Text (theText,
gp_Ax2 (gp_Pnt (theX, theY, 0.0), gp::DZ()),
anAspect->Height(),
anAspect->Angle(),
anAspect->Orientation(),
Graphic3d_HTA_LEFT,
theVertAlignment,
Standard_True,
Standard_False); // has own anchor
Handle(Graphic3d_Text) aText = new Graphic3d_Text ((Standard_ShortReal)anAspect->Height());
aText->SetText (theText.ToExtString());
aText->SetOrientation (gp_Ax2 (gp_Pnt (theX, theY, 0.0), gp::DZ()));
aText->SetOwnAnchorPoint (Standard_False);
aText->SetVerticalAlignment (theVertAlignment);
theGroup->AddText (aText);
}
//=======================================================================

View File

@@ -403,17 +403,16 @@ void AIS_Dimension::DrawArrow (const Handle(Prs3d_Presentation)& thePresentation
anArrow->AddVertex (aRightPoint);
// Set aspect for arrow triangles
Graphic3d_PolygonOffset aPolOffset;
aPolOffset.Mode = Aspect_POM_Off;
aPolOffset.Factor = 0.0f;
aPolOffset.Units = 0.0f;
Handle(Graphic3d_AspectFillArea3d) aShadingStyle = new Graphic3d_AspectFillArea3d();
aShadingStyle->SetInteriorStyle (Aspect_IS_SOLID);
aShadingStyle->SetColor (myDrawer->DimensionAspect()->ArrowAspect()->Aspect()->Color());
aShadingStyle->SetShadingModel (Graphic3d_TOSM_UNLIT);
aShadingStyle->SetPolygonOffset (aPolOffset);
Graphic3d_MaterialAspect aShadeMat (Graphic3d_NOM_DEFAULT);
aShadeMat.SetReflectionModeOff (Graphic3d_TOR_AMBIENT);
aShadeMat.SetReflectionModeOff (Graphic3d_TOR_DIFFUSE);
aShadeMat.SetReflectionModeOff (Graphic3d_TOR_SPECULAR);
aGroup->SetPrimitivesAspect (aShadingStyle);
Handle(Prs3d_ShadingAspect) aShadingStyle = new Prs3d_ShadingAspect();
aShadingStyle->SetColor (myDrawer->DimensionAspect()->ArrowAspect()->Aspect()->Color());
aShadingStyle->SetMaterial (aShadeMat);
aGroup->SetPrimitivesAspect (aShadingStyle->Aspect());
aGroup->AddPrimitiveArray (anArrow);
}
@@ -531,9 +530,9 @@ void AIS_Dimension::drawText (const Handle(Prs3d_Presentation)& thePresentation,
}
Graphic3d_MaterialAspect aShadeMat (Graphic3d_NOM_DEFAULT);
aShadeMat.SetAmbientColor (Quantity_NOC_BLACK);
aShadeMat.SetDiffuseColor (Quantity_NOC_BLACK);
aShadeMat.SetSpecularColor(Quantity_NOC_BLACK);
aShadeMat.SetReflectionModeOff (Graphic3d_TOR_AMBIENT);
aShadeMat.SetReflectionModeOff (Graphic3d_TOR_DIFFUSE);
aShadeMat.SetReflectionModeOff (Graphic3d_TOR_SPECULAR);
myDrawer->ShadingAspect()->Aspect()->SetInteriorColor (aColor);
myDrawer->ShadingAspect()->Aspect()->SetBackInteriorColor (aColor);
myDrawer->ShadingAspect()->SetMaterial (aShadeMat);

View File

@@ -187,29 +187,6 @@ AIS_InteractiveContext::~AIS_InteractiveContext()
}
}
//=======================================================================
//function : LastActiveView
//purpose :
//=======================================================================
Handle(V3d_View) AIS_InteractiveContext::LastActiveView() const
{
if (myLastActiveView == NULL
|| myMainVwr.IsNull())
{
return Handle(V3d_View)();
}
// as a precaution - check that myLastActiveView pointer is a valid active View
for (V3d_ListOfViewIterator aViewIter = myMainVwr->ActiveViewIterator(); aViewIter.More(); aViewIter.Next())
{
if (aViewIter.Value() == myLastActiveView)
{
return aViewIter.Value();
}
}
return Handle(V3d_View)();
}
//=======================================================================
//function : UpdateCurrentViewer
//purpose :
@@ -1968,7 +1945,7 @@ void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& t
}
const Standard_Integer aDispMode = theIObj->HasHilightMode() ? theIObj->HilightMode() : 0;
unselectOwners (theIObj);
unhighlightOwners (theIObj);
myMainPM->SetVisibility (theIObj, aStatus->DisplayMode(), Standard_False);
if (!myLastPicked.IsNull()
@@ -2000,10 +1977,10 @@ void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& t
}
//=======================================================================
//function : unselectOwners
//function : unhighlightOwners
//purpose :
//=======================================================================
void AIS_InteractiveContext::unselectOwners (const Handle(AIS_InteractiveObject)& theObject)
void AIS_InteractiveContext::unhighlightOwners (const Handle(AIS_InteractiveObject)& theObject)
{
SelectMgr_SequenceOfOwner aSeq;
for (AIS_NListOfEntityOwner::Iterator aSelIter (mySelection->Objects()); aSelIter.More(); aSelIter.Next())
@@ -2037,7 +2014,7 @@ void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& t
return;
}
unselectOwners (theIObj);
unhighlightOwners (theIObj);
myMainPM->Erase (theIObj, -1);
theIObj->ErasePresentations (true); // make sure highlighting presentations are properly erased
@@ -2470,10 +2447,12 @@ void AIS_InteractiveContext::FitSelected (const Handle(V3d_View)& theView)
}
//=======================================================================
//function : BoundingBoxOfSelection
//purpose :
//function : FitSelected
//purpose : Fits the view corresponding to the bounds of selected objects
//=======================================================================
Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection() const
void AIS_InteractiveContext::FitSelected (const Handle(V3d_View)& theView,
const Standard_Real theMargin,
const Standard_Boolean theToUpdate)
{
Bnd_Box aBndSelected;
AIS_MapOfObjectOwners anObjectOwnerMap;
@@ -2512,22 +2491,12 @@ Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection() const
aBndSelected.Add (aTmpBox);
}
return aBndSelected;
}
anObjectOwnerMap.Clear();
//=======================================================================
//function : FitSelected
//purpose : Fits the view corresponding to the bounds of selected objects
//=======================================================================
void AIS_InteractiveContext::FitSelected (const Handle(V3d_View)& theView,
const Standard_Real theMargin,
const Standard_Boolean theToUpdate)
{
Bnd_Box aBndSelected = BoundingBoxOfSelection();
if (!aBndSelected.IsVoid())
{
theView->FitAll (aBndSelected, theMargin, theToUpdate);
}
if (aBndSelected.IsVoid())
return;
theView->FitAll (aBndSelected, theMargin, theToUpdate);
}
//=======================================================================

View File

@@ -370,9 +370,6 @@ public: //! @name mouse picking logic (detection and dynamic highlighting of ent
const Standard_Integer theMode,
const Standard_Integer theNewSensitivity);
//! Returns last active View (argument of MoveTo()/Select() methods).
Standard_EXPORT Handle(V3d_View) LastActiveView() const;
//! Relays mouse position in pixels theXPix and theYPix to the interactive context selectors.
//! This is done by the view theView passing this position to the main viewer and updating it.
//! If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight detected object.
@@ -508,9 +505,6 @@ public: //! @name Selection management
const Handle(V3d_View)& theView,
const Standard_Boolean theToUpdateViewer);
//! Returns bounding box of selected objects.
Standard_EXPORT Bnd_Box BoundingBoxOfSelection() const;
//! Fits the view correspondingly to the bounds of selected objects.
//! Infinite objects are ignored if infinite state of AIS_InteractiveObject is set to true.
Standard_EXPORT void FitSelected (const Handle(V3d_View)& theView,
@@ -1209,13 +1203,6 @@ public: //! @name sub-intensity management (deprecated)
Standard_EXPORT void SubIntensityOff (const Handle(AIS_InteractiveObject)& theIObj,
const Standard_Boolean theToUpdateViewer);
//! Returns selection instance
const Handle(AIS_Selection)& Selection() const { return mySelection; }
//! Sets selection instance to manipulate a container of selected owners
//! @param theSelection an instance of the selection
void SetSelection (const Handle(AIS_Selection)& theSelection) { mySelection = theSelection; }
protected: //! @name internal methods
Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const;
@@ -1235,7 +1222,7 @@ protected: //! @name internal methods
Standard_EXPORT Standard_Integer PurgeViewer (const Handle(V3d_Viewer)& Vwr);
//! Helper function to unhighlight all entity owners currently highlighted with seleciton color.
Standard_EXPORT void unselectOwners (const Handle(AIS_InteractiveObject)& theObject);
Standard_EXPORT void unhighlightOwners (const Handle(AIS_InteractiveObject)& theObject);
//! Helper function that highlights the owner given with <theStyle> without
//! performing AutoHighlight checks, e.g. is used for dynamic highlight.
@@ -1246,16 +1233,12 @@ protected: //! @name internal methods
//! for AutoHighlight, e.g. is used for selection.
Standard_EXPORT void highlightSelected (const Handle(SelectMgr_EntityOwner)& theOwner);
//! Helper function that highlights the owners with check
//! for AutoHighlight, e.g. is used for selection.
Standard_EXPORT void highlightOwners (const AIS_NListOfEntityOwner& theOwners);
//! Helper function that highlights global owner of the object given with <theStyle> with check
//! for AutoHighlight, e.g. is used for selection.
//! If global owner is null, it simply highlights the whole object
Standard_EXPORT void highlightGlobal (const Handle(AIS_InteractiveObject)& theObj,
const Handle(Prs3d_Drawer)& theStyle,
const Standard_Integer theDispMode);
const Standard_Integer theDispMode) const;
//! Helper function that unhighlights all owners that are stored in current AIS_Selection.
//! The function updates global status and selection state of owner and interactive object.
@@ -1263,14 +1246,9 @@ protected: //! @name internal methods
//! switched on in AIS_GlobalStatus will be highlighted with context's sub-intensity color.
Standard_EXPORT void unhighlightSelected (const Standard_Boolean theIsToHilightSubIntensity = Standard_False);
//! Helper function that unhighlights the owners with check
//! for AutoHighlight, e.g. is used for selection.
Standard_EXPORT void unhighlightOwners (const AIS_NListOfEntityOwner& theOwners,
const Standard_Boolean theIsToHilightSubIntensity = Standard_False);
//! Helper function that unhighlights global selection owner of given interactive.
//! The function does not perform any updates of global or owner status
Standard_EXPORT void unhighlightGlobal (const Handle(AIS_InteractiveObject)& theObj);
Standard_EXPORT void unhighlightGlobal (const Handle(AIS_InteractiveObject)& theObj) const;
//! Helper function that turns on sub-intensity in global status and highlights
//! given objects with sub-intensity color
@@ -1401,7 +1379,6 @@ protected: //! @name internal fields
Handle(PrsMgr_PresentationManager3d) myMainPM;
Handle(V3d_Viewer) myMainVwr;
Handle(StdSelect_ViewerSelector3d) myMainSel;
V3d_View* myLastActiveView;
Handle(SelectMgr_EntityOwner) myLastPicked;
Standard_Boolean myToHilightSelected;
Handle(AIS_Selection) mySelection;

View File

@@ -85,7 +85,6 @@ void AIS_InteractiveContext::highlightWithColor (const Handle(SelectMgr_EntityOw
//=======================================================================
void AIS_InteractiveContext::highlightSelected (const Handle(SelectMgr_EntityOwner)& theOwner)
{
AIS_NListOfEntityOwner anOwners;
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable());
if (anObj.IsNull())
{
@@ -99,15 +98,17 @@ void AIS_InteractiveContext::highlightSelected (const Handle(SelectMgr_EntityOwn
{
if (aSelIter.Value()->IsSameSelectable (anObj))
{
anOwners.Append (aSelIter.Value());
aSeq.Append (aSelIter.Value());
}
}
anObj->HilightSelected (myMainPM, aSeq);
}
else
{
anOwners.Append (theOwner);
const Handle(Prs3d_Drawer)& aStyle = getSelStyle (anObj, theOwner);
const Standard_Integer aHiMode = getHilightMode (anObj, aStyle, -1);
theOwner->HilightWithColor (myMainPM, aStyle, aHiMode);
}
highlightOwners (anOwners);
}
//=======================================================================
@@ -116,7 +117,7 @@ void AIS_InteractiveContext::highlightSelected (const Handle(SelectMgr_EntityOwn
//=======================================================================
void AIS_InteractiveContext::highlightGlobal (const Handle(AIS_InteractiveObject)& theObj,
const Handle(Prs3d_Drawer)& theStyle,
const Standard_Integer theDispMode)
const Standard_Integer theDispMode) const
{
if (theObj.IsNull())
{
@@ -132,7 +133,6 @@ void AIS_InteractiveContext::highlightGlobal (const Handle(AIS_InteractiveObject
return;
}
AIS_NListOfEntityOwner anOwners;
if (!aGlobOwner->IsAutoHilight())
{
SelectMgr_SequenceOfOwner aSeq;
@@ -140,15 +140,15 @@ void AIS_InteractiveContext::highlightGlobal (const Handle(AIS_InteractiveObject
{
if (aSelIter.Value()->IsSameSelectable (theObj))
{
anOwners.Append (aSelIter.Value());
aSeq.Append (aSelIter.Value());
}
}
theObj->HilightSelected (myMainPM, aSeq);
}
else
{
anOwners.Append (aGlobOwner);
aGlobOwner->HilightWithColor (myMainPM, theStyle, aHiMode);
}
highlightOwners (anOwners);
}
//=======================================================================
@@ -156,19 +156,9 @@ void AIS_InteractiveContext::highlightGlobal (const Handle(AIS_InteractiveObject
//purpose :
//=======================================================================
void AIS_InteractiveContext::unhighlightSelected (const Standard_Boolean theIsToHilightSubIntensity)
{
unhighlightOwners (mySelection->Objects(), theIsToHilightSubIntensity);
}
//=======================================================================
//function : unhighlightOwners
//purpose :
//=======================================================================
void AIS_InteractiveContext::unhighlightOwners (const AIS_NListOfEntityOwner& theOwners,
const Standard_Boolean theIsToHilightSubIntensity)
{
NCollection_IndexedMap<Handle(AIS_InteractiveObject)> anObjToClear;
for (AIS_NListOfEntityOwner::Iterator aSelIter (theOwners); aSelIter.More(); aSelIter.Next())
for (AIS_NListOfEntityOwner::Iterator aSelIter (mySelection->Objects()); aSelIter.More(); aSelIter.Next())
{
const Handle(SelectMgr_EntityOwner) anOwner = aSelIter.Value();
const Handle(AIS_InteractiveObject) anInteractive = Handle(AIS_InteractiveObject)::DownCast (anOwner->Selectable());
@@ -196,7 +186,7 @@ void AIS_InteractiveContext::unhighlightOwners (const AIS_NListOfEntityOwner& th
}
if (anOwner == anInteractive->GlobalSelOwner())
{
aStatus->SetHilightStatus (Standard_False);
myObjects.ChangeFind (anInteractive)->SetHilightStatus (Standard_False);
}
}
for (NCollection_IndexedMap<Handle(AIS_InteractiveObject)>::Iterator anIter (anObjToClear); anIter.More(); anIter.Next())
@@ -211,7 +201,7 @@ void AIS_InteractiveContext::unhighlightOwners (const AIS_NListOfEntityOwner& th
//function : unhighlightGlobal
//purpose :
//=======================================================================
void AIS_InteractiveContext::unhighlightGlobal (const Handle(AIS_InteractiveObject)& theObj)
void AIS_InteractiveContext::unhighlightGlobal (const Handle(AIS_InteractiveObject)& theObj) const
{
if (theObj.IsNull())
{
@@ -225,9 +215,15 @@ void AIS_InteractiveContext::unhighlightGlobal (const Handle(AIS_InteractiveObje
return;
}
AIS_NListOfEntityOwner anOwners;
anOwners.Append (aGlobOwner);
unhighlightOwners (anOwners);
if (aGlobOwner->IsAutoHilight())
{
aGlobOwner->Unhilight (myMainPM);
}
else
{
myMainPM->Unhighlight (theObj);
theObj->ClearSelected();
}
}
//=======================================================================
@@ -329,7 +325,6 @@ AIS_StatusOfDetection AIS_InteractiveContext::MoveTo (const Standard_Integer th
myCurDetected = 0;
myCurHighlighted = 0;
myDetectedSeq.Clear();
myLastActiveView = theView.get();
// preliminaires
AIS_StatusOfDetection aStatus = AIS_SOD_Nothing;
@@ -500,7 +495,6 @@ AIS_StatusOfPick AIS_InteractiveContext::Select (const Standard_Integer theXPMi
// all objects detected by the selector are taken, previous current objects are emptied,
// new objects are put...
ClearSelected (Standard_False);
myLastActiveView = theView.get();
myMainSel->Pick (theXPMin, theYPMin, theXPMax, theYPMax, theView);
for (Standard_Integer aPickIter = 1; aPickIter <= myMainSel->NbPicked(); ++aPickIter)
{
@@ -540,7 +534,6 @@ AIS_StatusOfPick AIS_InteractiveContext::Select (const TColgp_Array1OfPnt2d& the
// all objects detected by the selector are taken, previous current objects are emptied,
// new objects are put...
ClearSelected (Standard_False);
myLastActiveView = theView.get();
myMainSel->Pick (thePolyline, theView);
for (Standard_Integer aPickIter = 1; aPickIter <= myMainSel->NbPicked(); ++aPickIter)
{
@@ -572,17 +565,6 @@ AIS_StatusOfPick AIS_InteractiveContext::Select (const Standard_Boolean toUpdate
{
if (!myLastPicked.IsNull())
{
Graphic3d_Vec2i aMousePos (-1, -1);
if (myMainSel->GetManager().GetActiveSelectionType() == SelectBasics_SelectingVolumeManager::Point)
{
aMousePos.SetValues ((Standard_Integer )myMainSel->GetManager().GetMousePosition().X(),
(Standard_Integer )myMainSel->GetManager().GetMousePosition().Y());
}
if (myLastPicked->HandleMouseClick (aMousePos, Aspect_VKeyMouse_LeftButton, Aspect_VKeyFlags_NONE, false))
{
return AIS_SOP_NothingSelected;
}
if (myAutoHilight)
{
clearDynamicHighlight();
@@ -648,7 +630,6 @@ AIS_StatusOfPick AIS_InteractiveContext::ShiftSelect (const Standard_Integer the
throw Standard_ProgramError ("AIS_InteractiveContext::ShiftSelect() - invalid argument");
}
myLastActiveView = theView.get();
if (myAutoHilight)
{
UnhilightSelected (Standard_False);
@@ -689,7 +670,6 @@ AIS_StatusOfPick AIS_InteractiveContext::ShiftSelect (const TColgp_Array1OfPnt2d
throw Standard_ProgramError ("AIS_InteractiveContext::ShiftSelect() - invalid argument");
}
myLastActiveView = theView.get();
if (myAutoHilight)
{
UnhilightSelected (Standard_False);
@@ -724,27 +704,11 @@ void AIS_InteractiveContext::HilightSelected (const Standard_Boolean theToUpdate
{
// In case of selection without using local context
clearDynamicHighlight();
highlightOwners (mySelection->Objects());
if (theToUpdateViewer)
UpdateCurrentViewer();
}
//=======================================================================
//function : highlightOwners
//purpose :
//=======================================================================
void AIS_InteractiveContext::highlightOwners (const AIS_NListOfEntityOwner& theOwners)
{
AIS_MapOfObjSelectedOwners anObjOwnerMap;
for (AIS_NListOfEntityOwner::Iterator aSelIter (theOwners); aSelIter.More(); aSelIter.Next())
for (AIS_NListOfEntityOwner::Iterator aSelIter (mySelection->Objects()); aSelIter.More(); aSelIter.Next())
{
const Handle(SelectMgr_EntityOwner) anOwner = aSelIter.Value();
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (anOwner->Selectable());
if (anObj.IsNull())
continue;
const Handle(Prs3d_Drawer)& anObjSelStyle = getSelStyle (anObj, anOwner);
Handle(AIS_GlobalStatus)& aState = myObjects.ChangeFind(anObj);
if (anOwner == anObj->GlobalSelOwner())
@@ -781,6 +745,9 @@ void AIS_InteractiveContext::highlightOwners (const AIS_NListOfEntityOwner& theO
}
anObjOwnerMap.Clear();
}
if (theToUpdateViewer)
UpdateCurrentViewer();
}
//=======================================================================
@@ -789,7 +756,17 @@ void AIS_InteractiveContext::highlightOwners (const AIS_NListOfEntityOwner& theO
//=======================================================================
void AIS_InteractiveContext::UnhilightSelected (const Standard_Boolean theToUpdateViewer)
{
unhighlightSelected();
for (AIS_NListOfEntityOwner::Iterator aSelIter (mySelection->Objects()); aSelIter.More(); aSelIter.Next())
{
const Handle(SelectMgr_EntityOwner) anOwner = aSelIter.Value();
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (anOwner->Selectable());
if (anOwner == anObj->GlobalSelOwner())
{
myObjects.ChangeFind (anObj)->SetHilightStatus (Standard_False);
}
anOwner->Unhilight (myMainPM);
}
if (theToUpdateViewer)
UpdateCurrentViewer();
@@ -944,6 +921,13 @@ void AIS_InteractiveContext::SetSelected (const Handle(SelectMgr_EntityOwner)& t
}
}
if (myAutoHilight && theOwner == anObject->GlobalSelOwner())
{
Handle(AIS_GlobalStatus)& aState = myObjects.ChangeFind (anObject);
aState->SetHilightStatus (Standard_True);
aState->SetHilightStyle (anObjSelStyle);
}
if (theToUpdateViewer)
UpdateCurrentViewer();
}
@@ -990,17 +974,28 @@ void AIS_InteractiveContext::AddOrRemoveSelected (const Handle(SelectMgr_EntityO
if (myAutoHilight)
{
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable());
const Standard_Boolean isGlobal = anObj->GlobalSelOwner() == theOwner;
Handle(AIS_GlobalStatus)& aStatus = myObjects.ChangeFind (anObj);
if (theOwner->IsSelected())
{
highlightSelected (theOwner);
if (isGlobal)
{
aStatus->SetHilightStatus (Standard_True);
aStatus->SetHilightStyle (getSelStyle (anObj, theOwner));
}
}
else
{
AIS_NListOfEntityOwner anOwners;
anOwners.Append (theOwner);
unhighlightOwners (anOwners);
if (theOwner->IsAutoHilight())
{
theOwner->Unhilight (myMainPM);
}
else
{
anObj->ClearSelected();
}
aStatus->SetHilightStatus (Standard_False);
aStatus->SetHilightStyle (Handle(Prs3d_Drawer)());
}
}

View File

@@ -143,16 +143,3 @@ void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& theAspect
aGroup->SetGroupPrimitivesAspect (aTextAspect->Aspect());
}
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void AIS_InteractiveObject::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, AIS_InteractiveObject);
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_SelectableObject);
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCTXPtr);
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOwner);
}

View File

@@ -118,8 +118,6 @@ public:
Standard_DEPRECATED("Deprecated method, results might be undefined")
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;
protected:
//! The TypeOfPresention3d means that the interactive object

View File

@@ -132,7 +132,7 @@ void AIS_Manipulator::init()
myAxes[2] = Axis (gp::OZ(), Quantity_NOC_BLUE1);
Graphic3d_MaterialAspect aShadingMaterial;
aShadingMaterial.SetSpecularColor(Quantity_NOC_BLACK);
aShadingMaterial.SetReflectionModeOff (Graphic3d_TOR_SPECULAR);
aShadingMaterial.SetMaterialType (Graphic3d_MATERIAL_ASPECT);
myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
@@ -142,10 +142,10 @@ void AIS_Manipulator::init()
Graphic3d_MaterialAspect aHilightMaterial;
aHilightMaterial.SetColor (Quantity_NOC_AZURE);
aHilightMaterial.SetAmbientColor (Quantity_NOC_BLACK);
aHilightMaterial.SetDiffuseColor (Quantity_NOC_BLACK);
aHilightMaterial.SetSpecularColor(Quantity_NOC_BLACK);
aHilightMaterial.SetEmissiveColor(Quantity_NOC_BLACK);
aHilightMaterial.SetReflectionModeOff (Graphic3d_TOR_AMBIENT);
aHilightMaterial.SetReflectionModeOff (Graphic3d_TOR_DIFFUSE);
aHilightMaterial.SetReflectionModeOff (Graphic3d_TOR_SPECULAR);
aHilightMaterial.SetReflectionModeOff (Graphic3d_TOR_EMISSION);
aHilightMaterial.SetMaterialType (Graphic3d_MATERIAL_ASPECT);
myHighlightAspect = new Prs3d_ShadingAspect();
@@ -153,10 +153,11 @@ void AIS_Manipulator::init()
myHighlightAspect->SetMaterial (aHilightMaterial);
Graphic3d_MaterialAspect aDraggerMaterial;
aDraggerMaterial.SetAmbientColor (Quantity_NOC_BLACK);
aDraggerMaterial.SetDiffuseColor (Quantity_NOC_BLACK);
aDraggerMaterial.SetSpecularColor(Quantity_NOC_BLACK);
aDraggerMaterial.SetReflectionModeOff(Graphic3d_TOR_DIFFUSE);
aDraggerMaterial.SetReflectionModeOff(Graphic3d_TOR_SPECULAR);
aDraggerMaterial.SetReflectionModeOff(Graphic3d_TOR_EMISSION);
aDraggerMaterial.SetMaterialType(Graphic3d_MATERIAL_ASPECT);
aDraggerMaterial.SetAmbient(1.0);
myDraggerHighlight = new Prs3d_ShadingAspect();
myDraggerHighlight->Aspect()->SetInteriorStyle(Aspect_IS_SOLID);

View File

@@ -79,7 +79,7 @@ mySAttach(0.,0.,0.)
myArrowSize = fabs (myVal/10.0);
if (myArrowSize > 30.) myArrowSize = 30.;
if (myArrowSize < 15.) myArrowSize = 15.;
//std::cout<<"AIS_OffsetDimension::AIS_OffsetDimension " << myArrowSize << " myArrowSize"<<std::endl;
//cout<<"AIS_OffsetDimension::AIS_OffsetDimension " << myArrowSize << " myArrowSize"<<endl;
}
//=======================================================================
@@ -95,7 +95,7 @@ void AIS_OffsetDimension::Compute(const Handle(PrsMgr_PresentationManager3d)&,
myArrowSize = fabs (myVal/10.0);
if (myArrowSize > 30.) myArrowSize = 30.;
if (myArrowSize < 15.) myArrowSize = 15.;
//std::cout<<"AIS_OffsetDimension::AIS_OffsetDimension " << myArrowSize << " myArrowSize"<<std::endl;
//cout<<"AIS_OffsetDimension::AIS_OffsetDimension " << myArrowSize << " myArrowSize"<<endl;
BRepAdaptor_Surface surf1(TopoDS::Face(myFShape));
BRepAdaptor_Surface surf2(TopoDS::Face(mySShape));
@@ -163,7 +163,7 @@ void AIS_OffsetDimension::ComputeSelection(const Handle(SelectMgr_Selection)& aS
myArrowSize = fabs (myVal/10.0);
if (myArrowSize > 30.) myArrowSize = 30.;
if (myArrowSize < 15.) myArrowSize = 15.;
//std::cout<<"AIS_OffsetDimension::AIS_OffsetDimension " << myArrowSize << " myArrowSize"<<std::endl;
//cout<<"AIS_OffsetDimension::AIS_OffsetDimension " << myArrowSize << " myArrowSize"<<endl;
gp_Pnt myTFAttach = myFAttach.Transformed (myRelativePos);
gp_Pnt myTSAttach = mySAttach.Transformed (myRelativePos);
gp_Dir myTDirAttach = myDirAttach.Transformed (myRelativePos);
@@ -325,7 +325,7 @@ void AIS_OffsetDimension::ComputeTwoAxesOffset(const Handle(Prs3d_Presentation)&
Handle(Prs3d_DimensionAspect) la = myDrawer->DimensionAspect();
Handle(Prs3d_ArrowAspect) arr = la->ArrowAspect();
//std::cout<<"AIS_OffsetDimension::AIS_OffsetDimension " << myArrowSize << " myArrowSize"<<std::endl;
//cout<<"AIS_OffsetDimension::AIS_OffsetDimension " << myArrowSize << " myArrowSize"<<endl;
arr->SetLength(myArrowSize);
arr = la->ArrowAspect();
arr->SetLength(myArrowSize);
@@ -431,7 +431,7 @@ void AIS_OffsetDimension::ComputeTwoFacesOffset(const Handle(Prs3d_Presentation)
Handle(Prs3d_DimensionAspect) la = myDrawer->DimensionAspect();
Handle(Prs3d_ArrowAspect) arr = la->ArrowAspect();
//std::cout<<"AIS_OffsetDimension::AIS_OffsetDimension " << myArrowSize << " myArrowSize"<<std::endl;
//cout<<"AIS_OffsetDimension::AIS_OffsetDimension " << myArrowSize << " myArrowSize"<<endl;
arr->SetLength(myArrowSize);
arr = la->ArrowAspect();
arr->SetLength(myArrowSize);

View File

@@ -32,18 +32,18 @@ public:
Standard_EXPORT AIS_Selection();
//! removes all the object of the selection.
Standard_EXPORT virtual void Clear();
Standard_EXPORT void Clear();
//! if the object is not yet in the selection, it will be added.
//! if the object is already in the selection, it will be removed.
Standard_EXPORT virtual AIS_SelectStatus Select (const Handle(SelectMgr_EntityOwner)& theObject);
Standard_EXPORT AIS_SelectStatus Select (const Handle(SelectMgr_EntityOwner)& theObject);
//! the object is always add int the selection.
//! faster when the number of objects selected is great.
Standard_EXPORT virtual AIS_SelectStatus AddSelect (const Handle(SelectMgr_EntityOwner)& theObject);
Standard_EXPORT AIS_SelectStatus AddSelect (const Handle(SelectMgr_EntityOwner)& theObject);
//! clears the selection and adds the object in the selection.
virtual void ClearAndSelect (const Handle(SelectMgr_EntityOwner)& theObject)
void ClearAndSelect (const Handle(SelectMgr_EntityOwner)& theObject)
{
Clear();
Select (theObject);

View File

@@ -637,7 +637,7 @@ void AIS_Shape::setMaterial (const Handle(Prs3d_Drawer)& theDrawer,
const Standard_Boolean theToKeepColor,
const Standard_Boolean theToKeepTransp) const
{
const Quantity_Color aColor = theDrawer->ShadingAspect()->Color (myCurrentFacingModel);
const Quantity_Color aColor = theDrawer->ShadingAspect()->Material (myCurrentFacingModel).Color();
const Standard_Real aTransp = theDrawer->ShadingAspect()->Transparency (myCurrentFacingModel);
theDrawer->SetupOwnShadingAspect();
theDrawer->ShadingAspect()->SetMaterial (theMaterial, myCurrentFacingModel);
@@ -793,7 +793,7 @@ const Bnd_Box& AIS_Shape::BoundingBox()
}
if(myCompBB) {
BRepBndLib::Add (myshape, myBB, false);
BRepBndLib::AddClose(myshape, myBB);
myCompBB = Standard_False;
}
return myBB;

View File

@@ -137,7 +137,7 @@ void AIS_Triangulation::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aP
Standard_Integer i;
Standard_Integer j;
const Standard_Real ambient = 0.2;
Standard_Real ambient = aspect->FrontMaterial().Ambient();
if (hasVNormals)
{
const TShort_Array1OfShortReal& normals = myTriangulation->Normals();

View File

@@ -13,7 +13,6 @@
#include "AIS_ViewController.hxx"
#include <AIS_AnimationCamera.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_Manipulator.hxx>
#include <AIS_Point.hxx>
@@ -48,15 +47,12 @@ AIS_ViewController::AIS_ViewController()
myToAllowZFocus (true),
myToAllowHighlight (true),
myToAllowDragging (true),
myToStickToRayOnZoom (true),
myToStickToRayOnRotation (true),
//
myWalkSpeedAbsolute (1.5f),
myWalkSpeedRelative (0.1f),
myThrustSpeed (0.0f),
myHasThrust (false),
//
myViewAnimation (new AIS_AnimationCamera ("AIS_ViewController_ViewAnimation", Handle(V3d_View)())),
myPrevMoveTo (-1, -1),
myHasHlrOnBeforeRotation (false),
//
@@ -1228,20 +1224,6 @@ AIS_WalkDelta AIS_ViewController::FetchNavigationKeys (Standard_Real theCrouchRa
return aWalk;
}
// =======================================================================
// function : AbortViewAnimation
// purpose :
// =======================================================================
void AIS_ViewController::AbortViewAnimation()
{
if (!myViewAnimation.IsNull()
&& !myViewAnimation->IsStopped())
{
myViewAnimation->Stop();
myViewAnimation->SetView (Handle(V3d_View)());
}
}
// =======================================================================
// function : handlePanning
// purpose :
@@ -1254,8 +1236,6 @@ void AIS_ViewController::handlePanning (const Handle(V3d_View)& theView)
return;
}
AbortViewAnimation();
const Handle(Graphic3d_Camera)& aCam = theView->Camera();
if (aCam->IsOrthographic()
|| !hasPanningAnchorPoint())
@@ -1296,8 +1276,6 @@ void AIS_ViewController::handleZRotate (const Handle(V3d_View)& theView)
return;
}
AbortViewAnimation();
Graphic3d_Vec2i aViewPort;
theView->Window()->Size (aViewPort.x(), aViewPort.y());
Graphic3d_Vec2d aRotPnt (0.99 * aViewPort.x(),
@@ -1321,8 +1299,6 @@ void AIS_ViewController::handleZoom (const Handle(V3d_View)& theView,
return;
}
AbortViewAnimation();
const Handle(Graphic3d_Camera)& aCam = theView->Camera();
if (thePnt != NULL)
{
@@ -1395,9 +1371,9 @@ void AIS_ViewController::handleZoom (const Handle(V3d_View)& theView,
Graphic3d_Vec2i aWinSize;
theView->Window()->Size (aWinSize.x(), aWinSize.y());
const Graphic3d_Vec2d aPanFromCenterPx (double(theParams.Point.x()) - 0.5 * double(aWinSize.x()),
double(aWinSize.y() - theParams.Point.y() - 1) - 0.5 * double(aWinSize.y()));
double(theParams.Point.y()) - 0.5 * double(aWinSize.y()));
aDxy.x() += -aViewDims1.X() * aPanFromCenterPx.x() / double(aWinSize.x());
aDxy.y() += -aViewDims1.Y() * aPanFromCenterPx.y() / double(aWinSize.y());
aDxy.y() += aViewDims1.X() * aPanFromCenterPx.y() / double(aWinSize.x());
}
//theView->Translate (aCam, aDxy.x(), aDxy.y());
@@ -1453,7 +1429,6 @@ void AIS_ViewController::handleOrbitRotation (const Handle(V3d_View)& theView,
myRotatePnt3d = thePnt;
myCamStartOpUp = aCam->Up();
myCamStartOpDir = aCam->Direction();
myCamStartOpEye = aCam->Eye();
myCamStartOpCenter = aCam->Center();
@@ -1475,7 +1450,6 @@ void AIS_ViewController::handleOrbitRotation (const Handle(V3d_View)& theView,
return;
}
AbortViewAnimation();
if (theToLockZUp)
{
// amend camera to exclude roll angle (put camera Up vector to plane containing global Z and view direction)
@@ -1494,9 +1468,8 @@ void AIS_ViewController::handleOrbitRotation (const Handle(V3d_View)& theView,
const gp_Dir aNewUp = gp::DZ().Transformed (aTrsfRot);
aCam->SetUp (aNewUp);
aCam->SetEyeAndCenter (myRotatePnt3d.XYZ() + myCamStartOpToEye .Transformed (aTrsfRot).XYZ(),
myRotatePnt3d.XYZ() + myCamStartOpToCenter.Transformed (aTrsfRot).XYZ());
aCam->SetCenter(myRotatePnt3d.XYZ() + myCamStartOpToCenter.Transformed (aTrsfRot).XYZ());
aCam->SetEye (myRotatePnt3d.XYZ() + myCamStartOpToEye .Transformed (aTrsfRot).XYZ());
aCam->OrthogonalizeUp();
}
else
@@ -1506,9 +1479,9 @@ void AIS_ViewController::handleOrbitRotation (const Handle(V3d_View)& theView,
//theView->Rotate (aDX, aDY, aDZ, myRotatePnt3d.X(), myRotatePnt3d.Y(), myRotatePnt3d.Z(), false);
// restore previous camera state
aCam->SetEyeAndCenter (myCamStartOpEye, myCamStartOpCenter);
aCam->SetUp (myCamStartOpUp);
aCam->SetDirectionFromEye (myCamStartOpDir);
aCam->SetUp (myCamStartOpUp);
aCam->SetEye (myCamStartOpEye);
aCam->SetCenter (myCamStartOpCenter);
Graphic3d_Vec2d aWinXY;
theView->Size (aWinXY.x(), aWinXY.y());
@@ -1588,8 +1561,6 @@ void AIS_ViewController::handleViewRotation (const Handle(V3d_View)& theView,
return;
}
AbortViewAnimation();
Graphic3d_Vec2i aWinXY;
theView->Window()->Size (aWinXY.x(), aWinXY.y());
double aYawAngleDelta = ((myGL.ViewRotation.PointStart.x() - myGL.ViewRotation.PointTo.x()) / double (aWinXY.x())) * (M_PI * 0.5);
@@ -1601,10 +1572,11 @@ void AIS_ViewController::handleViewRotation (const Handle(V3d_View)& theView,
gp_Trsf aTrsfRot;
aTrsfRot.SetRotation (aRot);
const double aDist = aCam->Distance();
const gp_Dir aNewUp = gp::DZ().Transformed (aTrsfRot);
const gp_Dir aNewDir = gp::DX().Transformed (aTrsfRot);
aCam->SetUp (aNewUp);
aCam->SetDirectionFromEye (aNewDir);
aCam->SetUp (aNewUp);
aCam->SetCenter (aCam->Eye().Translated (gp_Vec (aNewDir) * aDist));
aCam->OrthogonalizeUp();
theView->Invalidate();
}
@@ -1664,7 +1636,7 @@ gp_Pnt AIS_ViewController::GravityPoint (const Handle(AIS_InteractiveContext)& t
}
gp_Pnt aPnt;
if (PickPoint (aPnt, theCtx, theView, aCursor, myToStickToRayOnRotation))
if (PickPoint (aPnt, theCtx, theView, aCursor, false))
{
return aPnt;
}
@@ -1885,9 +1857,12 @@ void AIS_ViewController::handleCameraActions (const Handle(AIS_InteractiveContex
if (!theView->Camera()->IsOrthographic())
{
// what is more natural to user - point on ray or point exactly on geometry in corner cases?
const bool toStickToRay = false; // true;
gp_Pnt aPnt;
if (aZoomParams.HasPoint()
&& PickPoint (aPnt, theCtx, theView, aZoomParams.Point, myToStickToRayOnZoom))
&& PickPoint (aPnt, theCtx, theView, aZoomParams.Point, toStickToRay))
{
handleZoom (theView, aZoomParams, &aPnt);
continue;
@@ -1895,7 +1870,7 @@ void AIS_ViewController::handleCameraActions (const Handle(AIS_InteractiveContex
Graphic3d_Vec2i aWinSize;
theView->Window()->Size (aWinSize.x(), aWinSize.y());
if (PickPoint (aPnt, theCtx, theView, aWinSize / 2, myToStickToRayOnZoom))
if (PickPoint (aPnt, theCtx, theView, aWinSize / 2, toStickToRay))
{
aZoomParams.ResetPoint(); // do not pretend to zoom at 'nothing'
handleZoom (theView, aZoomParams, &aPnt);
@@ -2060,6 +2035,11 @@ void AIS_ViewController::handleSelectionPick (const Handle(AIS_InteractiveContex
{
for (NCollection_Sequence<Graphic3d_Vec2i>::Iterator aPntIter (myGL.Selection.Points); aPntIter.More(); aPntIter.Next())
{
if (!myGL.Selection.IsXOR)
{
theCtx->ClearSelected (false);
}
const bool hadPrevMoveTo = HasPreviousMoveTo();
contextLazyMoveTo (theCtx, theView, aPntIter.Value());
if (!hadPrevMoveTo)
@@ -2294,15 +2274,6 @@ void AIS_ViewController::handleMoveTo (const Handle(AIS_InteractiveContext)& the
void AIS_ViewController::handleViewRedraw (const Handle(AIS_InteractiveContext)& ,
const Handle(V3d_View)& theView)
{
// manage animation state
if (!myViewAnimation.IsNull()
&& !myViewAnimation->IsStopped())
{
myViewAnimation->UpdateTimer();
ResetPreviousMoveTo();
setAskNextFrame();
}
for (V3d_ListOfViewIterator aViewIter (theView->Viewer()->ActiveViewIterator()); aViewIter.More(); aViewIter.Next())
{
const Handle(V3d_View)& aView = aViewIter.Value();

View File

@@ -30,7 +30,6 @@
#include <Precision.hxx>
#include <Standard_Mutex.hxx>
class AIS_AnimationCamera;
class AIS_InteractiveObject;
class AIS_InteractiveContext;
class AIS_Point;
@@ -57,15 +56,6 @@ public:
//! Return input buffer.
AIS_ViewInputBuffer& ChangeInputBuffer (AIS_ViewInputBufferType theType) { return theType == AIS_ViewInputBufferType_UI ? myUI : myGL; }
//! Return view animation; empty (but not NULL) animation by default.
const Handle(AIS_AnimationCamera)& ViewAnimation() const { return myViewAnimation; }
//! Set view animation to be handled within handleViewRedraw().
void SetViewAnimation (const Handle(AIS_AnimationCamera)& theAnimation) { myViewAnimation = theAnimation; }
//! Interrupt active view animation.
Standard_EXPORT void AbortViewAnimation();
public: //! @name global parameters
//! Return camera rotation mode, AIS_RotationMode_BndBoxActive by default.
@@ -152,18 +142,6 @@ public: //! @name global parameters
//! Set if dynamic highlight on mouse move is allowed.
void SetAllowDragging (bool theToEnable) { myToAllowDragging = theToEnable; }
//! Return TRUE if picked point should be projected to picking ray on zooming at point; TRUE by default.
bool ToStickToRayOnZoom() const { return myToStickToRayOnZoom; }
//! Set if picked point should be projected to picking ray on zooming at point.
void SetStickToRayOnZoom (bool theToEnable) { myToStickToRayOnZoom = theToEnable; }
//! Return TRUE if picked point should be projected to picking ray on rotating around point; TRUE by default.
bool ToStickToRayOnRotation() const { return myToStickToRayOnRotation; }
//! Set if picked point should be projected to picking ray on rotating around point.
void SetStickToRayOnRotation (bool theToEnable) { myToStickToRayOnRotation = theToEnable; }
//! Return TRUE if pitch direction should be inverted while processing Aspect_VKey_NavLookUp/Aspect_VKey_NavLookDown; FALSE by default.
bool ToInvertPitch() const { return myToInvertPitch; }
@@ -612,15 +590,12 @@ protected:
Standard_Boolean myToAllowZFocus; //!< enable ZFocus change; TRUE by default
Standard_Boolean myToAllowHighlight; //!< enable dynamic highlight on mouse move; TRUE by default
Standard_Boolean myToAllowDragging; //!< enable dragging object; TRUE by default
Standard_Boolean myToStickToRayOnZoom; //!< project picked point to ray while zooming at point, TRUE by default
Standard_Boolean myToStickToRayOnRotation; //!< project picked point to ray while rotating around point; TRUE by default
Standard_ShortReal myWalkSpeedAbsolute; //!< normal walking speed, in m/s; 1.5 by default
Standard_ShortReal myWalkSpeedRelative; //!< walking speed relative to scene bounding box; 0.1 by default
Standard_ShortReal myThrustSpeed; //!< active thrust value
Standard_Boolean myHasThrust; //!< flag indicating active thrust
Handle(AIS_AnimationCamera) myViewAnimation; //!< view animation
Handle(AIS_RubberBand) myRubberBand; //!< Rubber-band presentation
Handle(AIS_InteractiveObject) myDragObject; //!< currently dragged object
Graphic3d_Vec2i myPrevMoveTo; //!< previous position of MoveTo event in 3D viewer
@@ -672,7 +647,6 @@ protected: //! @name rotation/panning transient state variables
gp_Pnt myPanPnt3d; //!< active panning anchor point
gp_Pnt myRotatePnt3d; //!< active rotation center of gravity
gp_Dir myCamStartOpUp; //!< camera Up direction at the beginning of rotation
gp_Dir myCamStartOpDir; //!< camera View direction at the beginning of rotation
gp_Pnt myCamStartOpEye; //!< camera Eye position at the beginning of rotation
gp_Pnt myCamStartOpCenter; //!< camera Center position at the beginning of rotation
gp_Vec myCamStartOpToCenter; //!< vector from rotation gravity point to camera Center at the beginning of rotation

File diff suppressed because it is too large Load Diff

View File

@@ -1,686 +0,0 @@
// Created on: 2017-07-25
// Created by: Anastasia BOBYLEVA
// Copyright (c) 2017-2019 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.
#ifndef _AIS_ViewCube_HeaderFile
#define _AIS_ViewCube_HeaderFile
#include <AIS_InteractiveObject.hxx>
#include <Graphic3d_Camera.hxx>
#include <Graphic3d_Vec2.hxx>
#include <Prs3d_DatumParts.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_TextAspect.hxx>
#include <SelectMgr_EntityOwner.hxx>
#include <V3d_TypeOfOrientation.hxx>
class AIS_AnimationCamera;
class AIS_ViewCubeOwner;
class Graphic3d_ArrayOfTriangles;
class V3d_View;
//! Interactive object for displaying the view manipulation cube.
//!
//! View cube consists of several parts that are responsible for different camera manipulations:
//! @li Cube sides represent main views: top, bottom, left, right, front and back.
//! @li Edges represent rotation of one of main views on 45 degrees.
//! @li Vertices represent rotation of one of man views in two directions.
//!
//! The object is expected to behave like a trihedron in the view corner,
//! therefore its position should be defined using transformation persistence flags:
//! @code SetTransformPersistence (new Graphic3d_TransformPers (Graphic3d_TMF_TriedronPers, Aspect_TOTP_LEFT_LOWER, Graphic3d_Vec2i (100, 100)); @endcode
//!
//! View Cube parts are sensitive to detection, or dynamic highlighting (but not selection),
//! and every its owner AIS_ViewCubeOwner corresponds to camera transformation.
//! @code
//! for (aViewCube->StartAnimation (aDetectedOwner); aViewCube->HasAnimation(); )
//! {
//! aViewCube->UpdateAnimation();
//! ... // updating of application window
//! }
//! @endcode
//! or
//! @code aViewCube->HandleClick (aDetectedOwner); @endcode
//! that includes transformation loop.
//! This loop allows external actions like application updating. For this purpose AIS_ViewCube has virtual interface onAfterAnimation(),
//! that is to be redefined on application level.
class AIS_ViewCube : public AIS_InteractiveObject
{
DEFINE_STANDARD_RTTIEXT(AIS_ViewCube, AIS_InteractiveObject)
public:
//! Return TRUE if specified orientation belongs to box side.
Standard_EXPORT static bool IsBoxSide (V3d_TypeOfOrientation theOrient);
//! Return TRUE if specified orientation belongs to box edge.
Standard_EXPORT static bool IsBoxEdge (V3d_TypeOfOrientation theOrient);
//! Return TRUE if specified orientation belongs to box corner (vertex).
Standard_EXPORT static bool IsBoxCorner (V3d_TypeOfOrientation theOrient);
public:
//! Empty constructor.
Standard_EXPORT AIS_ViewCube();
//! Return view animation.
const Handle(AIS_AnimationCamera)& ViewAnimation() const { return myViewAnimation; }
//! Set view animation.
void SetViewAnimation (const Handle(AIS_AnimationCamera)& theAnimation) { myViewAnimation = theAnimation; }
//! Return TRUE if automatic camera transformation on selection (highlighting) is enabled; TRUE by default.
Standard_Boolean ToAutoStartAnimation() const { return myToAutoStartAnim; }
//! Enable/disable automatic camera transformation on selection (highlighting).
//! The automatic logic can be disabled if application wants performing action manually
//! basing on picking results (AIS_ViewCubeOwner).
void SetAutoStartAnimation (bool theToEnable) { myToAutoStartAnim = theToEnable; }
//! Return TRUE if camera animation should be done in uninterruptible loop; TRUE by default.
Standard_Boolean IsFixedAnimationLoop() const { return myIsFixedAnimation; }
//! Set if camera animation should be done in uninterruptible loop.
void SetFixedAnimationLoop (bool theToEnable) { myIsFixedAnimation = theToEnable; }
//! Reset all size and style parameters to default.
//! @warning It doesn't reset position of View Cube
Standard_EXPORT void ResetStyles();
protected:
//! Set default visual attributes
Standard_EXPORT void setDefaultAttributes();
//! Set default dynamic highlight properties
Standard_EXPORT void setDefaultHighlightAttributes();
public: //! @name Geometry management API
//! @return size (width and height) of View cube sides; 100 by default.
Standard_Real Size() const { return mySize; }
//! Sets size (width and height) of View cube sides.
//! @param theToAdaptAnother if TRUE, then other parameters will be adapted to specified size
Standard_EXPORT void SetSize (Standard_Real theValue,
Standard_Boolean theToAdaptAnother = true);
//! Return box facet extension to edge/corner facet split; 10 by default.
Standard_Real BoxFacetExtension() const { return myBoxFacetExtension; }
//! Set new value of box facet extension.
void SetBoxFacetExtension (Standard_Real theValue)
{
if (Abs (myBoxFacetExtension - theValue) > Precision::Confusion())
{
myBoxFacetExtension = theValue;
SetToUpdate();
}
}
//! Return padding between axes and 3D part (box); 10 by default.
Standard_Real AxesPadding() const { return myAxesPadding; }
//! Set new value of padding between axes and 3D part (box).
void SetAxesPadding (Standard_Real theValue)
{
if (Abs (myAxesPadding - theValue) > Precision::Confusion())
{
myAxesPadding = theValue;
SetToUpdate();
}
}
//! Return gap between box edges and box sides; 0 by default.
Standard_Real BoxEdgeGap() const { return myBoxEdgeGap; }
//! Set new value of box edges gap.
void SetBoxEdgeGap (Standard_Real theValue)
{
if (Abs (myBoxEdgeGap - theValue) > Precision::Confusion())
{
myBoxEdgeGap = theValue;
SetToUpdate();
}
}
//! Return minimal size of box edge; 2 by default.
Standard_Real BoxEdgeMinSize() const { return myBoxEdgeMinSize; }
//! Set new value of box edge minimal size.
void SetBoxEdgeMinSize (Standard_Real theValue)
{
if (Abs (myBoxEdgeMinSize - theValue) > Precision::Confusion())
{
myBoxEdgeMinSize = theValue;
SetToUpdate();
}
}
//! Return minimal size of box corner; 2 by default.
Standard_Real BoxCornerMinSize() const { return myCornerMinSize; }
//! Set new value of box corner minimal size.
void SetBoxCornerMinSize (Standard_Real theValue)
{
if (Abs (myCornerMinSize - theValue) > Precision::Confusion())
{
myCornerMinSize = theValue;
SetToUpdate();
}
}
//! Return relative radius of side corners (round rectangle); 0.0 by default.
//! The value in within [0, 0.5] range meaning absolute radius = RoundRadius() / Size().
Standard_Real RoundRadius() const { return myRoundRadius; }
//! Set relative radius of View Cube sides corners (round rectangle).
//! The value should be within [0, 0.5] range.
Standard_EXPORT void SetRoundRadius (const Standard_Real theValue);
//! @return TRUE if trihedron is drawn; TRUE by default.
Standard_Boolean ToDrawAxes() const { return myToDisplayAxes; }
//! Enable/disable drawing of trihedron.
void SetDrawAxes (Standard_Boolean theValue)
{
if (myToDisplayAxes != theValue)
{
myToDisplayAxes = theValue;
SetToUpdate();
}
}
//! @return TRUE if edges of View Cube is drawn; TRUE by default.
Standard_Boolean ToDrawEdges() const { return myToDisplayEdges; }
//! Enable/disable drawing of edges of View Cube.
void SetDrawEdges (Standard_Boolean theValue)
{
if (myToDisplayEdges != theValue)
{
myToDisplayEdges = theValue;
SetToUpdate();
}
}
//! Return TRUE if vertices (vertex) of View Cube is drawn; TRUE by default.
Standard_Boolean ToDrawVertices() const { return myToDisplayVertices; }
//! Enable/disable drawing of vertices (corners) of View Cube.
void SetDrawVertices (Standard_Boolean theValue)
{
if (myToDisplayVertices != theValue)
{
myToDisplayVertices = theValue;
SetToUpdate();
}
}
//! Return TRUE if application expects Y-up viewer orientation instead of Z-up; FALSE by default.
Standard_Boolean IsYup() const { return myIsYup; }
//! Set if application expects Y-up viewer orientation instead of Z-up.
Standard_EXPORT void SetYup (Standard_Boolean theIsYup,
Standard_Boolean theToUpdateLabels = Standard_True);
public: //! @name Style management API
//! Return shading style of box sides.
const Handle(Prs3d_ShadingAspect)& BoxSideStyle() const { return myDrawer->ShadingAspect(); }
//! Return shading style of box edges.
const Handle(Prs3d_ShadingAspect)& BoxEdgeStyle() const { return myBoxEdgeAspect; }
//! Return shading style of box corners.
const Handle(Prs3d_ShadingAspect)& BoxCornerStyle() const { return myBoxCornerAspect; }
//! Return value of front color for the 3D part of object.
const Quantity_Color& BoxColor() const { return myDrawer->ShadingAspect()->Color(); }
//! Set new value of front color for the 3D part of object.
//! @param theColor [in] input color value.
void SetBoxColor (const Quantity_Color& theColor)
{
if (!myDrawer->ShadingAspect()->Color().IsEqual (theColor)
|| !myBoxEdgeAspect ->Color().IsEqual (theColor)
|| !myBoxCornerAspect->Color().IsEqual (theColor))
{
myDrawer->ShadingAspect()->SetColor (theColor);
myBoxEdgeAspect->SetColor (theColor);
myBoxCornerAspect->SetColor (theColor);
SynchronizeAspects();
}
}
//! Return transparency for 3D part of object.
Standard_Real BoxTransparency() const { return myDrawer->ShadingAspect()->Transparency(); }
//! Set new value of transparency for 3D part of object.
//! @param theValue [in] input transparency value
void SetBoxTransparency (Standard_Real theValue)
{
if (Abs (myDrawer->ShadingAspect()->Transparency() - theValue) > Precision::Confusion()
|| Abs (myBoxEdgeAspect ->Transparency() - theValue) > Precision::Confusion()
|| Abs (myBoxCornerAspect->Transparency() - theValue) > Precision::Confusion())
{
myDrawer->ShadingAspect()->SetTransparency (theValue);
myBoxEdgeAspect->SetTransparency (theValue);
myBoxCornerAspect->SetTransparency (theValue);
SynchronizeAspects();
}
}
//! Return color of sides back material.
const Quantity_Color& InnerColor() const { return myDrawer->ShadingAspect()->Color (Aspect_TOFM_BACK_SIDE); }
//! Set color of sides back material. Alias for:
//! @code Attributes()->ShadingAspect()->Aspect()->ChangeBackMaterial().SetColor() @endcode
void SetInnerColor (const Quantity_Color& theColor)
{
myDrawer->ShadingAspect()->SetColor (theColor, Aspect_TOFM_BACK_SIDE);
SynchronizeAspects();
}
//! Return box side label or empty string if undefined.
//! Default labels: FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM.
TCollection_AsciiString BoxSideLabel (V3d_TypeOfOrientation theSide) const
{
const TCollection_AsciiString* aLabel = myBoxSideLabels.Seek (theSide);
return aLabel != NULL ? *aLabel : TCollection_AsciiString();
}
//! Set box side label.
void SetBoxSideLabel (const V3d_TypeOfOrientation theSide,
const TCollection_AsciiString& theLabel)
{
if (!IsBoxSide (theSide))
{
throw Standard_ProgramError ("AIS_ViewCube::SetBoxSideLabel(), invalid enumeration value");
}
myBoxSideLabels.Bind (theSide, theLabel);
SetToUpdate();
}
//! Return text color of labels of box sides; BLACK by default.
const Quantity_Color& TextColor() const { return myDrawer->TextAspect()->Aspect()->Color(); }
//! Set color of text labels on box sides. Alias for:
//! @code Attributes()->TextAspect()->SetColor() @endcode
void SetTextColor (const Quantity_Color& theColor)
{
myDrawer->TextAspect()->SetColor (theColor);
SynchronizeAspects();
}
//! Return font name that is used for displaying of sides and axes text. Alias for:
//! @code Attributes()->TextAspect()->Aspect()->SetFont() @endcode
const TCollection_AsciiString& Font() const { return myDrawer->TextAspect()->Aspect()->Font(); }
//! Set font name that is used for displaying of sides and axes text. Alias for:
//! @code Attributes()->TextAspect()->SetFont() @endcode
void SetFont (const TCollection_AsciiString& theFont)
{
myDrawer->TextAspect()->Aspect()->SetFont (theFont);
SynchronizeAspects();
}
//! Return height of font
Standard_Real FontHeight() const { return myDrawer->TextAspect()->Height(); }
//! Change font height. Alias for:
//! @code Attributes()->TextAspect()->SetHeight() @endcode
void SetFontHeight (Standard_Real theValue)
{
if (Abs (myDrawer->TextAspect()->Height() - theValue) > Precision::Confusion())
{
myDrawer->TextAspect()->SetHeight (theValue);
SetToUpdate();
}
}
//! Return axes labels or empty string if undefined.
//! Default labels: X, Y, Z.
TCollection_AsciiString AxisLabel (Prs3d_DatumParts theAxis) const
{
const TCollection_AsciiString* aLabel = myAxesLabels.Seek (theAxis);
return aLabel != NULL ? *aLabel : TCollection_AsciiString();
}
//! Set axes labels.
void SetAxesLabels (const TCollection_AsciiString& theX,
const TCollection_AsciiString& theY,
const TCollection_AsciiString& theZ)
{
myAxesLabels.Bind (Prs3d_DP_XAxis, theX);
myAxesLabels.Bind (Prs3d_DP_YAxis, theY);
myAxesLabels.Bind (Prs3d_DP_ZAxis, theZ);
SetToUpdate();
}
public:
//! Set new value of color for the whole object.
//! @param theColor [in] input color value.
virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE
{
SetBoxColor (theColor);
}
//! Reset color for the whole object.
virtual void UnsetColor() Standard_OVERRIDE
{
myDrawer->ShadingAspect()->SetColor (Quantity_NOC_WHITE);
myBoxEdgeAspect ->SetColor (Quantity_NOC_GRAY30);
myBoxCornerAspect->SetColor (Quantity_NOC_GRAY30);
SynchronizeAspects();
}
//! Set new value of transparency for the whole object.
//! @param theValue [in] input transparency value.
virtual void SetTransparency (const Standard_Real theValue) Standard_OVERRIDE
{
SetBoxTransparency (theValue);
}
//! Reset transparency for the whole object.
virtual void UnsetTransparency() Standard_OVERRIDE
{
SetBoxTransparency (0.0f);
}
//! Sets the material for the interactive object.
virtual void SetMaterial (const Graphic3d_MaterialAspect& theMat) Standard_OVERRIDE
{
myDrawer->ShadingAspect()->SetMaterial (theMat);
myBoxEdgeAspect ->SetMaterial (theMat);
myBoxCornerAspect->SetMaterial (theMat);
SynchronizeAspects();
}
//! Sets the material for the interactive object.
virtual void UnsetMaterial() Standard_OVERRIDE
{
Graphic3d_MaterialAspect aMat (Graphic3d_NOM_UserDefined);
aMat.SetColor (Quantity_NOC_WHITE);
aMat.SetAmbientColor (Quantity_NOC_GRAY60);
myDrawer->ShadingAspect()->SetMaterial (aMat);
myBoxEdgeAspect ->SetMaterial (aMat);
myBoxEdgeAspect ->SetColor (Quantity_NOC_GRAY30);
myBoxCornerAspect->SetMaterial (aMat);
myBoxCornerAspect->SetColor (Quantity_NOC_GRAY30);
SynchronizeAspects();
}
public: //! @name animation methods
//! Return duration of animation in seconds; 0.5 sec by default
Standard_Real Duration() const { return myDuration; }
//! Set duration of animation.
//! @param theValue [in] input value of duration in seconds
void SetDuration (Standard_Real theValue) { myDuration = theValue; }
//! Return TRUE if new camera Up direction should be always set to default value for a new camera Direction; FALSE by default.
//! When this flag is FALSE, the new camera Up will be set as current Up orthogonalized to the new camera Direction,
//! and will set to default Up on second click.
Standard_Boolean ToResetCameraUp() const { return myToResetCameraUp; }
//! Set if new camera Up direction should be always set to default value for a new camera Direction.
void SetResetCamera (Standard_Boolean theToReset) { myToResetCameraUp = theToReset; }
//! Return TRUE if animation should fit selected objects and FALSE to fit entire scene; TRUE by default.
Standard_Boolean ToFitSelected() const { return myToFitSelected; }
//! Set if animation should fit selected objects or to fit entire scene.
void SetFitSelected (Standard_Boolean theToFitSelected) { myToFitSelected = theToFitSelected; }
//! @return TRUE if View Cube has unfinished animation of view camera.
Standard_EXPORT Standard_Boolean HasAnimation() const;
//! Start camera transformation corresponding to the input detected owner.
//! @param theOwner [in] detected owner.
Standard_EXPORT virtual void StartAnimation (const Handle(AIS_ViewCubeOwner)& theOwner);
//! Perform one step of current camera transformation.
//! theToUpdate [in] enable/disable update of view.
//! @return TRUE if animation is not stopped.
Standard_EXPORT virtual Standard_Boolean UpdateAnimation (const Standard_Boolean theToUpdate);
//! Perform camera transformation corresponding to the input detected owner.
Standard_EXPORT virtual void HandleClick (const Handle(AIS_ViewCubeOwner)& theOwner);
protected:
//! Perform internal single step of animation.
//! @return FALSE if animation has been finished
Standard_EXPORT Standard_Boolean updateAnimation();
//! Fit selected/all into view.
//! @param theView [in] view definition to retrieve scene bounding box
//! @param theCamera [in,out] camera definition
Standard_EXPORT virtual void viewFitAll (const Handle(V3d_View)& theView,
const Handle(Graphic3d_Camera)& theCamera);
protected: //! @name protected virtual API
//! Method that is called after one step of transformation.
virtual void onAfterAnimation() {}
//! Method that is called after transformation finish.
virtual void onAnimationFinished() {}
public: //! @name Presentation computation
//! Return TRUE for supported display mode.
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Global selection has no meaning for this class.
virtual Handle(SelectMgr_EntityOwner) GlobalSelOwner() const Standard_OVERRIDE { return Handle(SelectMgr_EntityOwner)(); }
//! Compute 3D part of View Cube.
//! @param thePrsMgr [in] presentation manager.
//! @param thePrs [in] input presentation that is to be filled with flat presentation primitives.
//! @param theMode [in] display mode.
//! @warning this object accept only 0 display mode.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode = 0) Standard_OVERRIDE;
//! Redefine computing of sensitive entities for View Cube.
//! @param theSelection [in] input selection object that is to be filled with sensitive entities.
//! @param theMode [in] selection mode.
//! @warning object accepts only 0 selection mode.
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
const Standard_Integer theMode) Standard_OVERRIDE;
//! Disables auto highlighting to use HilightSelected() and HilightOwnerWithColor() overridden methods.
virtual Standard_Boolean IsAutoHilight() const Standard_OVERRIDE { return Standard_False; }
//! Method which clear all selected owners belonging to this selectable object.
//! @warning this object does not support selection.
virtual void ClearSelected() Standard_OVERRIDE {}
//! Method which highlights input owner belonging to this selectable object.
//! @param thePM [in] presentation manager
//! @param theStyle [in] style for dynamic highlighting.
//! @param theOwner [in] input entity owner.
Standard_EXPORT virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
const Handle(Prs3d_Drawer)& theStyle,
const Handle(SelectMgr_EntityOwner)& theOwner) Standard_OVERRIDE;
//! Method which draws selected owners.
Standard_EXPORT virtual void HilightSelected (const Handle(PrsMgr_PresentationManager3d)& thePM,
const SelectMgr_SequenceOfOwner& theSeq) Standard_OVERRIDE;
//! Set default parameters for visual attributes
//! @sa Attributes()
virtual void UnsetAttributes() Standard_OVERRIDE
{
setDefaultAttributes();
SetToUpdate();
}
//! Set default parameters for dynamic highlighting attributes, reset highlight attributes
virtual void UnsetHilightAttributes() Standard_OVERRIDE
{
myHilightDrawer.Nullify();
setDefaultHighlightAttributes();
SetToUpdate();
}
protected: //! @name Auxiliary classes to fill presentation with proper primitives
//! Create triangulation for a box part - for presentation and selection purposes.
//! @param theTris [in,out] triangulation to fill, or NULL to return size
//! @param theNbNodes [in,out] should be incremented by a number of nodes defining this triangulation
//! @param theNbTris [in,out] should be incremented by a number of triangles defining this triangulation
//! @param theDir [in] part to define
Standard_EXPORT virtual void createBoxPartTriangles (const Handle(Graphic3d_ArrayOfTriangles)& theTris,
Standard_Integer& theNbNodes,
Standard_Integer& theNbTris,
V3d_TypeOfOrientation theDir) const;
//! Create triangulation for a box side.
//! @param theTris [in,out] triangulation to fill, or NULL to return size
//! @param theNbNodes [in,out] should be incremented by a number of nodes defining this triangulation
//! @param theNbTris [in,out] should be incremented by a number of triangles defining this triangulation
//! @param theDir [in] part to define
Standard_EXPORT virtual void createBoxSideTriangles (const Handle(Graphic3d_ArrayOfTriangles)& theTris,
Standard_Integer& theNbNodes,
Standard_Integer& theNbTris,
V3d_TypeOfOrientation theDir) const;
//! Create triangulation for a box edge.
//! @param theTris [in,out] triangulation to fill, or NULL to return size
//! @param theNbNodes [in,out] should be incremented by a number of nodes defining this triangulation
//! @param theNbTris [in,out] should be incremented by a number of triangles defining this triangulation
//! @param theDir [in] part to define
Standard_EXPORT virtual void createBoxEdgeTriangles (const Handle(Graphic3d_ArrayOfTriangles)& theTris,
Standard_Integer& theNbNodes,
Standard_Integer& theNbTris,
V3d_TypeOfOrientation theDir) const;
//! Create triangulation for a box corner (vertex).
//! @param theTris [in,out] triangulation to fill, or NULL to return size
//! @param theNbNodes [in,out] should be incremented by a number of nodes defining this triangulation
//! @param theNbTris [in,out] should be incremented by a number of triangles defining this triangulation
//! @param theDir [in] part to define
Standard_EXPORT virtual void createBoxCornerTriangles (const Handle(Graphic3d_ArrayOfTriangles)& theTris,
Standard_Integer& theNbNodes,
Standard_Integer& theNbTris,
V3d_TypeOfOrientation theDir) const;
protected:
//! Create triangulation for a rectangle with round corners.
//! @param theTris [in,out] triangulation to fill, or NULL to return size
//! @param theNbNodes [in,out] should be incremented by a number of nodes defining this triangulation
//! @param theNbTris [in,out] should be incremented by a number of triangles defining this triangulation
//! @param theSize [in] rectangle dimensions
//! @param theRadius [in] radius at corners
//! @param theTrsf [in] transformation
Standard_EXPORT static void createRoundRectangleTriangles (const Handle(Graphic3d_ArrayOfTriangles)& theTris,
Standard_Integer& theNbNodes,
Standard_Integer& theNbTris,
const gp_XY& theSize,
Standard_Real theRadius,
const gp_Trsf& theTrsf);
protected:
//! Trivial hasher to avoid ambiguity with enumeration type.
struct IntegerHasher
{
static Standard_Integer HashCode (Standard_Integer theValue, Standard_Integer theUpper) { return ::HashCode (theValue, theUpper); }
static Standard_Boolean IsEqual (Standard_Integer theA, Standard_Integer theB) { return theA == theB; }
};
protected:
NCollection_DataMap<V3d_TypeOfOrientation, TCollection_AsciiString, IntegerHasher>
myBoxSideLabels; //!< map with box side labels
NCollection_DataMap<Prs3d_DatumParts, TCollection_AsciiString, IntegerHasher>
myAxesLabels; //!< map with axes labels
Handle(Prs3d_ShadingAspect) myBoxEdgeAspect; //!< style for box edges
Handle(Prs3d_ShadingAspect) myBoxCornerAspect; //!< style for box corner
Standard_Real mySize; //!< size of box side, length of one axis
Standard_Real myBoxEdgeMinSize; //!< minimal size of box edge
Standard_Real myBoxEdgeGap; //!< gap between box side and box edge
Standard_Real myBoxFacetExtension; //!< box facet extension
Standard_Real myAxesPadding; //!< Padding between box and axes
Standard_Real myCornerMinSize; //!< minimal size of box corner
Standard_Real myRoundRadius; //!< relative round radius within [0; 0.5] range
Standard_Boolean myToDisplayAxes; //!< trihedron visibility
Standard_Boolean myToDisplayEdges; //!< box edges visibility
Standard_Boolean myToDisplayVertices; //!< box corners (vertices) visibility
Standard_Boolean myIsYup; //!< flag indicating that application expects Y-up viewer orientation instead of Z-up
protected: //! @name Animation options
Handle(AIS_AnimationCamera) myViewAnimation; //!< Camera animation object
Handle(Graphic3d_Camera) myStartState; //!< Start state of view camera
Handle(Graphic3d_Camera) myEndState; //!< End state of view camera
Standard_Real myDuration; //!< Duration of animation. By default it is half a second
Standard_Boolean myToAutoStartAnim; //!< start animation automatically on click
Standard_Boolean myIsFixedAnimation; //!< fixed-loop animation
Standard_Boolean myToFitSelected; //!< fit selected or fit entire scene
Standard_Boolean myToResetCameraUp; //!< always reset camera up direction to default
};
//! Redefined entity owner that is highlighted when owner is detected,
//! even if Interactive Context highlighted on last detection procedure.
class AIS_ViewCubeOwner : public SelectMgr_EntityOwner
{
DEFINE_STANDARD_RTTIEXT(AIS_ViewCubeOwner, SelectMgr_EntityOwner)
public:
//! Main constructor.
AIS_ViewCubeOwner (const Handle(AIS_ViewCube)& theObject,
V3d_TypeOfOrientation theOrient,
Standard_Integer thePriority = 5)
: SelectMgr_EntityOwner ((const Handle(SelectMgr_SelectableObject)& )theObject, thePriority),
myMainOrient (theOrient)
{
myFromDecomposition = true;
}
//! @return TRUE. This owner will always call method
//! Hilight for its Selectable Object when the owner is detected.
virtual Standard_Boolean IsForcedHilight() const Standard_OVERRIDE { return Standard_True; }
//! Return new orientation to set.
V3d_TypeOfOrientation MainOrientation() const { return myMainOrient; }
//! Handle mouse button click event.
virtual Standard_Boolean HandleMouseClick (const Graphic3d_Vec2i& thePoint,
Aspect_VKeyMouse theButton,
Aspect_VKeyFlags theModifiers,
bool theIsDoubleClick) Standard_OVERRIDE
{
(void )thePoint; (void )theButton; (void )theModifiers; (void )theIsDoubleClick;
AIS_ViewCube* aCubePrs = dynamic_cast<AIS_ViewCube* >(mySelectable);
aCubePrs->HandleClick (this);
return Standard_True;
}
protected:
V3d_TypeOfOrientation myMainOrient; //!< new orientation to set
};
#endif // _AIS_ViewCube_HeaderFile

View File

@@ -182,6 +182,4 @@ AIS_TypeOfPlane.hxx
AIS_ViewController.cxx
AIS_ViewController.hxx
AIS_ViewInputBuffer.hxx
AIS_ViewCube.cxx
AIS_ViewCube.hxx
AIS_WalkDelta.hxx

View File

@@ -1054,44 +1054,44 @@ Standard_Real
void AdvApp2Var_ApproxAFunc2Var::Dump(Standard_OStream& o) const
{
Standard_Integer iesp=1,NbKU,NbKV,ik;
o<<std::endl;
if (!myHasResult) { o<<"No result"<<std::endl; }
o<<endl;
if (!myHasResult) { o<<"No result"<<endl; }
else {
o<<"There is a result";
if (myDone) {
o<<" within the requested tolerance "<<my3DTolerances->Value(iesp)<<std::endl;
o<<" within the requested tolerance "<<my3DTolerances->Value(iesp)<<endl;
}
else if (my3DMaxError->Value(iesp)>my3DTolerances->Value(iesp)) {
o<<" WITHOUT the requested tolerance "<<my3DTolerances->Value(iesp)<<std::endl;
o<<" WITHOUT the requested tolerance "<<my3DTolerances->Value(iesp)<<endl;
}
else {
o<<" WITHOUT the requested continuities "<<std::endl;
o<<" WITHOUT the requested continuities "<<endl;
}
o<<std::endl;
o<<"Result max error :"<<my3DMaxError->Value(iesp)<<std::endl;
o<<"Result average error :"<<my3DAverageError->Value(iesp)<<std::endl;
o<<"Result max error on U frontiers :"<<my3DUFrontError->Value(iesp)<<std::endl;
o<<"Result max error on V frontiers :"<<my3DVFrontError->Value(iesp)<<std::endl;
o<<std::endl;
o<<endl;
o<<"Result max error :"<<my3DMaxError->Value(iesp)<<endl;
o<<"Result average error :"<<my3DAverageError->Value(iesp)<<endl;
o<<"Result max error on U frontiers :"<<my3DUFrontError->Value(iesp)<<endl;
o<<"Result max error on V frontiers :"<<my3DVFrontError->Value(iesp)<<endl;
o<<endl;
o<<"Degree of Bezier patches in U : "<<myDegreeInU
<<" in V : "<<myDegreeInV<<std::endl;
o<<std::endl;
<<" in V : "<<myDegreeInV<<endl;
o<<endl;
Handle(Geom_BSplineSurface) S
= Handle(Geom_BSplineSurface)::DownCast(mySurfaces->Value(iesp));
o<<"Number of poles in U : "<<S->NbUPoles()
<<" in V : "<<S->NbVPoles()<<std::endl;
o<<std::endl;
<<" in V : "<<S->NbVPoles()<<endl;
o<<endl;
NbKU = S->NbUKnots();
NbKV = S->NbVKnots();
o<<"Number of knots in U : "<<NbKU<<std::endl;
o<<"Number of knots in U : "<<NbKU<<endl;
for (ik=1;ik<=NbKU;ik++) {
o<<" "<<ik<<" : "<<S->UKnot(ik)<<" mult : "<<S->UMultiplicity(ik)<<std::endl;
o<<" "<<ik<<" : "<<S->UKnot(ik)<<" mult : "<<S->UMultiplicity(ik)<<endl;
}
o<<std::endl;
o<<"Number of knots in V : "<<NbKV<<std::endl;
o<<endl;
o<<"Number of knots in V : "<<NbKV<<endl;
for (ik=1;ik<=NbKV;ik++) {
o<<" "<<ik<<" : "<<S->VKnot(ik)<<" mult : "<<S->VMultiplicity(ik)<<std::endl;
o<<" "<<ik<<" : "<<S->VKnot(ik)<<" mult : "<<S->VMultiplicity(ik)<<endl;
}
o<<std::endl;
o<<endl;
}
}

View File

@@ -46,7 +46,7 @@ static Standard_Boolean lesparam(const Standard_Integer iordre,
else {
nbpnts = 50;
#ifdef OCCT_DEBUG
std::cout << "F(U, V) : Not enough points of discretization" << std::endl;
cout << "F(U, V) : Not enough points of discretization" << endl;
#endif
}

View File

@@ -89,10 +89,10 @@ static void MAPDBN(const Standard_Integer dimension,
if ( (Diff-Der).Norm() > eps * (Der.Norm()+1) ) {
std::cout << " Debug Ft au parametre t+ = " << t << std::endl;
std::cout << " Positionement sur la derive "<< OrdreDer
<< " : " << Der << std::endl;
std::cout << " Erreur estime : " << (Der-Diff) << std::endl;
cout << " Debug Ft au parametre t+ = " << t << endl;
cout << " Positionement sur la derive "<< OrdreDer
<< " : " << Der << endl;
cout << " Erreur estime : " << (Der-Diff) << endl;
}
// Verif a la fin
@@ -112,10 +112,10 @@ static void MAPDBN(const Standard_Integer dimension,
if ( (Diff-Der).Norm() > eps * (Der.Norm()+1) ) {
std::cout << " Debug Ft au parametre t- = " << t << std::endl;
std::cout << " Positionement sur la derive "<< OrdreDer
<< " : " << Der << std::endl;
std::cout << " Erreur estime : " << (Der-Diff) << std::endl;
cout << " Debug Ft au parametre t- = " << t << endl;
cout << " Positionement sur la derive "<< OrdreDer
<< " : " << Der << endl;
cout << " Erreur estime : " << (Der-Diff) << endl;
}
}
}
@@ -1092,25 +1092,25 @@ Standard_Real AdvApprox_ApproxAFunction::AverageError(
void AdvApprox_ApproxAFunction::Dump(Standard_OStream& o) const
{
Standard_Integer ii;
o << "Dump of ApproxAFunction" << std::endl;
o << "Dump of ApproxAFunction" << endl;
if (myNumSubSpaces[0] > 0) {
o << "Error(s) 1d = " << std::endl;
o << "Error(s) 1d = " << endl;
for (ii=1; ii <= myNumSubSpaces[0]; ii++) {
o << " " << MaxError(1, ii) << std::endl;
o << " " << MaxError(1, ii) << endl;
}
}
if (myNumSubSpaces[1] > 0) {
o << "Error(s) 2d = " << std::endl;
o << "Error(s) 2d = " << endl;
for (ii=1; ii <= myNumSubSpaces[1]; ii++) {
o << " " << MaxError(2, ii) << std::endl;
o << " " << MaxError(2, ii) << endl;
}
}
if (myNumSubSpaces[2] > 0) {
o << "Error(s) 3d = " << std::endl;
o << "Error(s) 3d = " << endl;
for (ii=1; ii <= myNumSubSpaces[2]; ii++) {
o << " " << MaxError(3, ii) << std::endl;
o << " " << MaxError(3, ii) << endl;
}
}
}

View File

@@ -232,7 +232,7 @@ void AdvApprox_SimpleApprox::Perform(const TColStd_Array1OfInteger& LocalDimensi
}
}
// for (i=0; i<(WorkDegree+1)*TotalDimension; i++)
// std::cout << " Coeff(" << i << ") = " << Coeff(i) << std::endl;
// cout << " Coeff(" << i << ") = " << Coeff(i) << endl;
// the computing of NewDegree
TColStd_Array1OfReal JacCoeff(0, myTotalDimension*(myWorkDegree+1)-1);
@@ -380,9 +380,9 @@ Standard_Real AdvApprox_SimpleApprox::AverageError(const Standard_Integer Index)
void AdvApprox_SimpleApprox::Dump(Standard_OStream& o) const
{
Standard_Integer ii;
o << "Dump of SimpleApprox " << std::endl;
o << "Dump of SimpleApprox " << endl;
for (ii=1; ii <= myTotalNumSS; ii++) {
o << "Error " << MaxError(ii) << std::endl;
o << "Error " << MaxError(ii) << endl;
}
}

View File

@@ -391,8 +391,8 @@ void AppBlend_AppSurf::InternalPerform(const Handle(TheLine)& Lin,
mytol2d = Max(TheTol2d, mytol2d);
}
#ifdef OCCT_DEBUG
std::cout << " Tolerances obtenues --> 3d : "<< mytol3d << std::endl;
std::cout << " --> 2d : "<< mytol2d << std::endl;
cout << " Tolerances obtenues --> 3d : "<< mytol3d << endl;
cout << " --> 2d : "<< mytol2d << endl;
#endif
multC = theapprox.SplineValue();
}
@@ -436,8 +436,8 @@ void AppBlend_AppSurf::InternalPerform(const Handle(TheLine)& Lin,
theapprox.Perform(multL);
theapprox.Error(mytol3d,mytol2d);
#ifdef OCCT_DEBUG
std::cout << " Tolerances obtenues --> 3d : "<< mytol3d << std::endl;
std::cout << " --> 2d : "<< mytol2d << std::endl;
cout << " Tolerances obtenues --> 3d : "<< mytol3d << endl;
cout << " --> 2d : "<< mytol2d << endl;
#endif
tol3dreached = mytol3d;
tol2dreached = mytol2d;
@@ -498,8 +498,8 @@ void AppBlend_AppSurf::InternalPerform(const Handle(TheLine)& Lin,
mytol3d = Variation.MaxError();
mytol2d = 0.;
#ifdef OCCT_DEBUG
std::cout << " Tolerances obtenues --> 3d : "<< mytol3d << std::endl;
std::cout << " --> 2d : "<< mytol2d << std::endl;
cout << " Tolerances obtenues --> 3d : "<< mytol3d << endl;
cout << " --> 2d : "<< mytol2d << endl;
#endif
tol3dreached = mytol3d;
tol2dreached = mytol2d;
@@ -827,8 +827,8 @@ void AppBlend_AppSurf::Perform(const Handle(TheLine)& Lin,
// modified by EAP Thu Jan 3 15:45:27 2002 ___END___
}
#ifdef OCCT_DEBUG
std::cout << " Tolerances obtenues --> 3d : "<< mytol3d << std::endl;
std::cout << " --> 2d : "<< mytol2d << std::endl;
cout << " Tolerances obtenues --> 3d : "<< mytol3d << endl;
cout << " --> 2d : "<< mytol2d << endl;
#endif
tol3dreached = mytol3d;
tol2dreached = mytol2d;
@@ -852,8 +852,8 @@ void AppBlend_AppSurf::Perform(const Handle(TheLine)& Lin,
tabVKnots->ChangeArray1()
);
#ifdef OCCT_DEBUG
std::cout << "Warning: AppBlend_AppSurf::Perform(), bad length of aParamSeq: " <<
aParamSeq.Length() << " instead of " << tabVKnots->Length() << std::endl;
cout << "Warning: AppBlend_AppSurf::Perform(), bad length of aParamSeq: " <<
aParamSeq.Length() << " instead of " << tabVKnots->Length() << endl;
#endif
}
else

View File

@@ -97,8 +97,8 @@ AppDef_MultiPointConstraint AppDef_MultiLine::Value (const Standard_Integer Inde
void AppDef_MultiLine::Dump(Standard_OStream& o) const
{
o << "AppDef_MultiLine dump:" << std::endl;
o << "AppDef_MultiLine dump:" << endl;
// AppDef_MultiPointConstraint MP = tabMult->Value(1);
o << "It contains " << tabMult->Length() << " MultiPointConstraint"<< std::endl;
// o << MP->NbPoints() << " 3d and " << MP->NbPoints2d() << std::endl;
o << "It contains " << tabMult->Length() << " MultiPointConstraint"<< endl;
// o << MP->NbPoints() << " 3d and " << MP->NbPoints2d() << endl;
}

View File

@@ -319,5 +319,5 @@ Standard_Boolean AppDef_MultiPointConstraint::IsCurvaturePoint() const
void AppDef_MultiPointConstraint::Dump(Standard_OStream& o) const
{
o << "AppDef_MultiPointConstraint dump:" << std::endl;
o << "AppDef_MultiPointConstraint dump:" << endl;
}

View File

@@ -582,11 +582,11 @@ void AppDef_Variational::Approximate()
{
for (jp3d=1;jp3d<=myNbP3d;jp3d++)
{
// std::cout << "\n Poles(ipole,1)" << PolesPtr->Value(ipole,index);
// cout << "\n Poles(ipole,1)" << PolesPtr->Value(ipole,index);
P3d.SetX(PolesPtr->Value(ipole,index++));
// std::cout << "\n Poles(ipole,1)" << PolesPtr->Value(ipole,index);
// cout << "\n Poles(ipole,1)" << PolesPtr->Value(ipole,index);
P3d.SetY(PolesPtr->Value(ipole,index++));
// std::cout << "\n Poles(ipole,1)" << PolesPtr->Value(ipole,index);
// cout << "\n Poles(ipole,1)" << PolesPtr->Value(ipole,index);
P3d.SetZ(PolesPtr->Value(ipole,index++));
TabP3d.SetValue(jp3d,P3d);
}
@@ -897,32 +897,32 @@ Standard_Integer AppDef_Variational::NbIterations() const
//
void AppDef_Variational::Dump(Standard_OStream& o) const
{
o << " \nVariational Smoothing " << std::endl;
o << " Number of multipoints " << myNbPoints << std::endl;
o << " Number of 2d par multipoint " << myNbP2d << std::endl;
o << " Nombre of 3d par multipoint " << myNbP3d << std::endl;
o << " Number of PassagePoint " << myNbPassPoints << std::endl;
o << " Number of TangencyPoints " << myNbTangPoints << std::endl;
o << " Number of CurvaturePoints " << myNbCurvPoints << std::endl;
o << " \nTolerance " << o.setf(std::ios::scientific) << std::setprecision(3) << std::setw(9) << myTolerance;
if ( WithMinMax()) { o << " as Max Error." << std::endl;}
else { o << " as size Error." << std::endl;}
o << " \nVariational Smoothing " << endl;
o << " Number of multipoints " << myNbPoints << endl;
o << " Number of 2d par multipoint " << myNbP2d << endl;
o << " Nombre of 3d par multipoint " << myNbP3d << endl;
o << " Number of PassagePoint " << myNbPassPoints << endl;
o << " Number of TangencyPoints " << myNbTangPoints << endl;
o << " Number of CurvaturePoints " << myNbCurvPoints << endl;
o << " \nTolerance " << o.setf(ios::scientific) << setprecision(3) << setw(9) << myTolerance;
if ( WithMinMax()) { o << " as Max Error." << endl;}
else { o << " as size Error." << endl;}
o << "CriteriumWeights : " << myPercent[0] << " , "
<< myPercent[1] << " , " << myPercent[2] << std::endl;
<< myPercent[1] << " , " << myPercent[2] << endl;
if (myIsDone ) {
o << " MaxError " << std::setprecision(3) << std::setw(9) << myMaxError << std::endl;
o << " Index of MaxError " << myMaxErrorIndex << std::endl;
o << " Average Error " << std::setprecision(3) << std::setw(9) << myAverageError << std::endl;
o << " Quadratic Error " << std::setprecision(3) << std::setw(9) << myCriterium[0] << std::endl;
o << " Tension Criterium " << std::setprecision(3) << std::setw(9) << myCriterium[1] << std::endl;
o << " Flexion Criterium " << std::setprecision(3) << std::setw(9) << myCriterium[2] << std::endl;
o << " Jerk Criterium " << std::setprecision(3) << std::setw(9) << myCriterium[3] << std::endl;
o << " NbSegments " << myKnots->Length()-1 << std::endl;
o << " MaxError " << setprecision(3) << setw(9) << myMaxError << endl;
o << " Index of MaxError " << myMaxErrorIndex << endl;
o << " Average Error " << setprecision(3) << setw(9) << myAverageError << endl;
o << " Quadratic Error " << setprecision(3) << setw(9) << myCriterium[0] << endl;
o << " Tension Criterium " << setprecision(3) << setw(9) << myCriterium[1] << endl;
o << " Flexion Criterium " << setprecision(3) << setw(9) << myCriterium[2] << endl;
o << " Jerk Criterium " << setprecision(3) << setw(9) << myCriterium[3] << endl;
o << " NbSegments " << myKnots->Length()-1 << endl;
}
else
{ if (myIsOverConstr) o << "The probleme is overconstraint " << std::endl;
else o << " Erreur dans l''approximation" << std::endl;
{ if (myIsOverConstr) o << "The probleme is overconstraint " << endl;
else o << " Erreur dans l''approximation" << endl;
}
}
//
@@ -2539,7 +2539,7 @@ void AppDef_Variational::Adjusting(
TColStd_Array1OfReal& Ecarts)
{
// std::cout << "=========== Adjusting =============" << std::endl;
// cout << "=========== Adjusting =============" << endl;
/* Initialized data */

View File

@@ -286,24 +286,24 @@ void AppParCurves_MultiBSpCurve::D2 (const Standard_Integer CuIndex,
void AppParCurves_MultiBSpCurve::Dump(Standard_OStream& o) const
{
o << "AppParCurves_MultiBSpCurve dump:" << std::endl;
o << " It contains " << NbCurves() << " BSpline curves "<< std::endl;
o << " The poles are: " << std::endl;
o << "AppParCurves_MultiBSpCurve dump:" << endl;
o << " It contains " << NbCurves() << " BSpline curves "<< endl;
o << " The poles are: " << endl;
/* for (Standard_Integer i = 1; i <= NbCurves(); i++) {
o << " Curve No. " << i << std::endl;
o << " Curve No. " << i << endl;
if (Dimension(i) == 3) {
for (Standard_Integer j = 1; j <= tabPoint->Length(); j++) {
o << " Pole No. " << j << ": " << std::endl;
o << " Pole x = " << (tabPoint->Value(j)->Point(i)).X() << std::endl;
o << " Pole y = " << (tabPoint->Value(j)->Point(i)).Y() << std::endl;
o << " Pole z = " << (tabPoint->Value(j)->Point(i)).Z() << std::endl;
o << " Pole No. " << j << ": " << endl;
o << " Pole x = " << (tabPoint->Value(j)->Point(i)).X() << endl;
o << " Pole y = " << (tabPoint->Value(j)->Point(i)).Y() << endl;
o << " Pole z = " << (tabPoint->Value(j)->Point(i)).Z() << endl;
}
}
else {
for (Standard_Integer j = 1; j <= tabPoint->Length(); j++) {
o << " Pole No. " << j << ": " << std::endl;
o << " Pole x = " << (tabPoint->Value(j)->Point2d(i)).X() << std::endl;
o << " Pole y = " << (tabPoint->Value(j)->Point2d(i)).Y() << std::endl;
o << " Pole No. " << j << ": " << endl;
o << " Pole x = " << (tabPoint->Value(j)->Point2d(i)).X() << endl;
o << " Pole y = " << (tabPoint->Value(j)->Point2d(i)).Y() << endl;
}
}
}

View File

@@ -286,24 +286,24 @@ void AppParCurves_MultiCurve::D2 (const Standard_Integer CuIndex,
void AppParCurves_MultiCurve::Dump(Standard_OStream& o) const
{
o << "AppParCurves_MultiCurve dump:" << std::endl;
o << " It contains " << NbCurves() << " Bezier curves of degree " << tabPoint->Length()-1 << std::endl;
o << " The poles are: " << std::endl;
o << "AppParCurves_MultiCurve dump:" << endl;
o << " It contains " << NbCurves() << " Bezier curves of degree " << tabPoint->Length()-1 << endl;
o << " The poles are: " << endl;
/* for (Standard_Integer i = 1; i <= NbCurves(); i++) {
o << " Curve No. " << i << std::endl;
o << " Curve No. " << i << endl;
if (Dimension(i) == 3) {
for (Standard_Integer j = 1; j <= tabPoint->Length(); j++) {
o << " Pole No. " << j << ": " << std::endl;
o << " Pole x = " << (tabPoint->Value(j)->Point(i)).X() << std::endl;
o << " Pole y = " << (tabPoint->Value(j)->Point(i)).Y() << std::endl;
o << " Pole z = " << (tabPoint->Value(j)->Point(i)).Z() << std::endl;
o << " Pole No. " << j << ": " << endl;
o << " Pole x = " << (tabPoint->Value(j)->Point(i)).X() << endl;
o << " Pole y = " << (tabPoint->Value(j)->Point(i)).Y() << endl;
o << " Pole z = " << (tabPoint->Value(j)->Point(i)).Z() << endl;
}
}
else {
for (Standard_Integer j = 1; j <= tabPoint->Length(); j++) {
o << " Pole No. " << j << ": " << std::endl;
o << " Pole x = " << (tabPoint->Value(j)->Point2d(i)).X() << std::endl;
o << " Pole y = " << (tabPoint->Value(j)->Point2d(i)).Y() << std::endl;
o << " Pole No. " << j << ": " << endl;
o << " Pole x = " << (tabPoint->Value(j)->Point2d(i)).X() << endl;
o << " Pole y = " << (tabPoint->Value(j)->Point2d(i)).Y() << endl;
}
}
}

View File

@@ -169,20 +169,20 @@ const gp_Pnt2d& AppParCurves_MultiPoint::Point2d (const Standard_Integer Index)
void AppParCurves_MultiPoint::Dump(Standard_OStream& o) const
{
o << "AppParCurves_MultiPoint dump:" << std::endl;
o << "AppParCurves_MultiPoint dump:" << endl;
const Standard_Integer aNbPnts3D = NbPoints(),
aNbPnts2D = NbPoints2d();
o << "It contains " << aNbPnts3D << " 3d points and " << aNbPnts2D <<" 2d points." << std::endl;
o << "It contains " << aNbPnts3D << " 3d points and " << aNbPnts2D <<" 2d points." << endl;
if(aNbPnts3D > 0)
{
for(Standard_Integer i = tabPoint->Lower(); i <= tabPoint->Upper(); i++)
{
o << "3D-Point #" << i << std::endl;
o << "3D-Point #" << i << endl;
o << " Pole x = " << (tabPoint->Value(i)/*->Point(j)*/).X() << std::endl;
o << " Pole y = " << (tabPoint->Value(i)/*->Point(j)*/).Y() << std::endl;
o << " Pole z = " << (tabPoint->Value(i)/*->Point(j)*/).Z() << std::endl;
o << " Pole x = " << (tabPoint->Value(i)/*->Point(j)*/).X() << endl;
o << " Pole y = " << (tabPoint->Value(i)/*->Point(j)*/).Y() << endl;
o << " Pole z = " << (tabPoint->Value(i)/*->Point(j)*/).Z() << endl;
}
}
@@ -190,10 +190,10 @@ void AppParCurves_MultiPoint::Dump(Standard_OStream& o) const
{
for(Standard_Integer i = tabPoint2d->Lower(); i <= tabPoint2d->Upper(); i++)
{
o << "2D-Point #" << i << std::endl;
o << "2D-Point #" << i << endl;
o << " Pole x = " << (tabPoint2d->Value(i)/*->Point2d(j)*/).X() << std::endl;
o << " Pole y = " << (tabPoint2d->Value(i)/*->Point2d(j)*/).Y() << std::endl;
o << " Pole x = " << (tabPoint2d->Value(i)/*->Point2d(j)*/).X() << endl;
o << " Pole y = " << (tabPoint2d->Value(i)/*->Point2d(j)*/).Y() << endl;
}
}
}

View File

@@ -64,20 +64,20 @@ static void DUMP(const MultiLine& Line)
TColgp_Array1OfPnt tabP(1, mynbP3d);
TColgp_Array1OfPnt2d tabP2d(1, mynbP2d);
std::cout <<"DUMP de la MultiLine entre "<<firstP <<" et "<<lastP<<": "<<std::endl;
cout <<"DUMP de la MultiLine entre "<<firstP <<" et "<<lastP<<": "<<endl;
for (i = firstP; i <= lastP; i++) {
if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, i, tabP, tabP2d);
else if (nbP2d != 0) LineTool::Value(Line, i, tabP2d);
else if (nbP3d != 0) LineTool::Value(Line, i, tabP);
std::cout << "point "<<i<<":"<< std::endl;
cout << "point "<<i<<":"<< endl;
for (j = 1; j <= nbP3d; j++) {
P1 = tabP(j);
std::cout <<P1.X()<<" "<<P1.Y()<<" "<<P1.Z()<<std::endl;
cout <<P1.X()<<" "<<P1.Y()<<" "<<P1.Z()<<endl;
}
for (j = 1; j <= nbP2d; j++) {
P12d = tabP2d(j);
std::cout <<P12d.X()<<" "<<P12d.Y()<<std::endl;
cout <<P12d.X()<<" "<<P12d.Y()<<endl;
}
}
@@ -197,7 +197,7 @@ static Standard_Boolean CheckMultiCurve(const AppParCurves_MultiCurve& theMultiC
if (ScalProd < MinScalProd)
{
#ifdef DRAW
std::cout<<"ScalProd("<<indp-2<<","<<indp-1<<")-("<<indp-1<<","<<indp<<") = "<<ScalProd<<std::endl;
cout<<"ScalProd("<<indp-2<<","<<indp-1<<")-("<<indp-1<<","<<indp<<") = "<<ScalProd<<endl;
#endif
LoopFound = Standard_True;
break;
@@ -329,7 +329,7 @@ static Standard_Boolean CheckMultiCurve(const AppParCurves_MultiCurve& theMultiC
if (ScalProd < MinScalProd)
{
#ifdef DRAW
std::cout<<"ScalProd("<<k-2<<","<<k-1<<")-("<<k-1<<","<<k<<") = "<<ScalProd<<std::endl;
cout<<"ScalProd("<<k-2<<","<<k-1<<")-("<<k-1<<","<<k<<") = "<<ScalProd<<endl;
#endif
LoopFound = Standard_True;
break;
@@ -1486,7 +1486,7 @@ Standard_Boolean Approx_ComputeLine::ComputeCurve(const MultiLine& Line,
#ifdef OCCT_DEBUG
if (!Parallel) {
if (mydebug) std::cout <<"droite mais tangentes pas vraiment paralleles!!"<< std::endl;
if (mydebug) cout <<"droite mais tangentes pas vraiment paralleles!!"<< endl;
}
#endif
AppParCurves_MultiCurve mySCU(mydegremin+1);

View File

@@ -174,8 +174,8 @@ Approx_Curve3d::Approx_Curve3d(const Handle(Adaptor3d_HCurve)& Curve,
void Approx_Curve3d::Dump(Standard_OStream& o) const
{
o << "******* Dump of ApproxCurve *******" << std::endl;
o << "*******Degree " << Curve()->Degree() << std::endl;
o << "*******NbSegments " << Curve()->NbKnots() - 1 << std::endl;
o << "*******Error " << MaxError() << std::endl;
o << "******* Dump of ApproxCurve *******" << endl;
o << "*******Degree " << Curve()->Degree() << endl;
o << "*******NbSegments " << Curve()->NbKnots() - 1 << endl;
o << "*******Error " << MaxError() << endl;
}

View File

@@ -197,11 +197,11 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor3d_
#ifdef OCCT_DEBUG_CHRONO
ResultChron(chr_total, t_total);
std::cout<<" total reparametrization time = "<<t_total<<std::endl;
std::cout<<"initialization time = "<<t_init<<std::endl;
std::cout<<"approximation time = "<<t_approx<<std::endl;
std::cout<<"total time for uparam computation = "<<t_uparam<<std::endl;
std::cout<<"number uparam calles = "<<uparam_count<<std::endl;
cout<<" total reparametrization time = "<<t_total<<endl;
cout<<"initialization time = "<<t_init<<endl;
cout<<"approximation time = "<<t_approx<<endl;
cout<<"total time for uparam computation = "<<t_uparam<<endl;
cout<<"number uparam calles = "<<uparam_count<<endl;
#endif
}
@@ -358,11 +358,11 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_
#ifdef OCCT_DEBUG_CHRONO
ResultChron(chr_total, t_total);
std::cout<<" total reparametrization time = "<<t_total<<std::endl;
std::cout<<"initialization time = "<<t_init<<std::endl;
std::cout<<"approximation time = "<<t_approx<<std::endl;
std::cout<<"total time for uparam computation = "<<t_uparam<<std::endl;
std::cout<<"number uparam calles = "<<uparam_count<<std::endl;
cout<<" total reparametrization time = "<<t_total<<endl;
cout<<"initialization time = "<<t_init<<endl;
cout<<"approximation time = "<<t_approx<<endl;
cout<<"total time for uparam computation = "<<t_uparam<<endl;
cout<<"number uparam calles = "<<uparam_count<<endl;
#endif
}
@@ -531,11 +531,11 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_
#ifdef OCCT_DEBUG_CHRONO
ResultChron(chr_total, t_total);
std::cout<<" total reparametrization time = "<<t_total<<std::endl;
std::cout<<"initialization time = "<<t_init<<std::endl;
std::cout<<"approximation time = "<<t_approx<<std::endl;
std::cout<<"total time for uparam computation = "<<t_uparam<<std::endl;
std::cout<<"number uparam calles = "<<uparam_count<<std::endl;
cout<<" total reparametrization time = "<<t_total<<endl;
cout<<"initialization time = "<<t_init<<endl;
cout<<"approximation time = "<<t_approx<<endl;
cout<<"total time for uparam computation = "<<t_uparam<<endl;
cout<<"number uparam calles = "<<uparam_count<<endl;
#endif
}
@@ -628,12 +628,12 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_
void Approx_CurvilinearParameter::Dump(Standard_OStream& o) const
{
o << "Dump of Approx_CurvilinearParameter" << std::endl;
o << "Dump of Approx_CurvilinearParameter" << endl;
if (myCase==2 || myCase==3)
o << "myMaxError2d1 = " << myMaxError2d1 << std::endl;
o << "myMaxError2d1 = " << myMaxError2d1 << endl;
if (myCase==3)
o << "myMaxError2d2 = " << myMaxError2d2 << std::endl;
o << "myMaxError3d = " << myMaxError3d << std::endl;
o << "myMaxError2d2 = " << myMaxError2d2 << endl;
o << "myMaxError3d = " << myMaxError3d << endl;
}
//=======================================================================
@@ -665,7 +665,7 @@ void Approx_CurvilinearParameter::ToleranceComputation(const Handle(Adaptor2d_HC
TolW = Tol / (4.*Max_dS_dw);
#ifdef OCCT_DEBUG
std::cout << "TolV = " << TolV << std::endl;
std::cout << "TolW = " << TolW << std::endl;
cout << "TolV = " << TolV << endl;
cout << "TolW = " << TolW << endl;
#endif
}

View File

@@ -36,17 +36,17 @@ static void DEBUG(const AppParCurves_MultiCurve& MC) {
TColgp_Array1OfPnt2d Poles2d(1, nbpoles);
for (i = 1; i <= nbcu; i++) {
std::cout << " Curve No. " << i << std::endl;
cout << " Curve No. " << i << endl;
if (MC.Dimension(i) == 3) {
MC.Curve(i, Poles);
for (j = 1; j <= nbpoles; j++) {
std::cout<< " Pole = " << Poles(j).X() <<" "<<Poles(j).Y()<<" "<<Poles(j).Z()<< std::endl;
cout<< " Pole = " << Poles(j).X() <<" "<<Poles(j).Y()<<" "<<Poles(j).Z()<< endl;
}
}
else {
MC.Curve(i, Poles2d);
for (j = 1; j <= nbpoles; j++) {
std::cout<< " Pole = " << Poles2d(j).X() <<" "<<Poles2d(j).Y()<< std::endl;
cout<< " Pole = " << Poles2d(j).X() <<" "<<Poles2d(j).Y()<< endl;
}
}
}

View File

@@ -542,7 +542,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
{
//Projector
#ifdef OCCT_DEBUG
std::cout << "Projection not done" << std::endl;
cout << "Projection not done" << endl;
#endif
}
}
@@ -558,7 +558,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
// If not already SameP and tangent to mill, abandon.
mySameParameter = Standard_False;
#ifdef OCCT_DEBUG
std::cout<<"SameParameter problem : zero tangent to extremities"<<std::endl;
cout<<"SameParameter problem : zero tangent to extremities"<<endl;
#endif
return;
}
@@ -653,7 +653,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
}
else {
#ifdef OCCT_DEBUG
std::cout << "Projection not done" << std::endl;
cout << "Projection not done" << endl;
#endif
}
}
@@ -687,7 +687,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
if (Precision::IsInfinite(algtol)) {
mySameParameter = Standard_False;
#ifdef OCCT_DEBUG
std::cout<<"SameParameter problem : function of interpolation of parametration at mills !!"<<std::endl;
cout<<"SameParameter problem : function of interpolation of parametration at mills !!"<<endl;
#endif
return;
}
@@ -778,7 +778,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
}
else {
#ifdef OCCT_DEBUG
std::cout << "Projection not done" << std::endl;
cout << "Projection not done" << endl;
#endif
}
}

View File

@@ -737,19 +737,19 @@ Standard_Real Approx_SweepApproximation::TolCurveOnSurf(const Standard_Integer I
void Approx_SweepApproximation::Dump(Standard_OStream& o) const
{
o << "Dump of SweepApproximation" << std::endl;
o << "Dump of SweepApproximation" << endl;
if (done) {
o << "Error 3d = " << MaxErrorOnSurf() << std::endl;
o << "Error 3d = " << MaxErrorOnSurf() << endl;
if (Num2DSS>0) {
o << "Error 2d = ";
for (Standard_Integer ii=1; ii<=Num2DSS; ii++)
{ o << Max2dError(ii);
if (ii < Num2DSS) o << " , " << std::endl;
if (ii < Num2DSS) o << " , " << endl;
}
std::cout << std::endl;
cout << endl;
}
o << tabVKnots->Length()-1 <<" Segment(s) of degree " << vdeg << std::endl;
o << tabVKnots->Length()-1 <<" Segment(s) of degree " << vdeg << endl;
}
else std::cout << " Not Done " << std::endl;
else cout << " Not Done " << endl;
}

View File

@@ -170,10 +170,10 @@ void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray<Standard_
}
#ifdef APPROXINT_KNOTTOOLS_DEBUG
std::cout << "Discrete curvature array is" << std::endl;
cout << "Discrete curvature array is" << endl;
for(i = aCurv.Lower(); i <= aCurv.Upper(); ++i)
{
std::cout << i << " " << aCurv(i) << std::endl;
cout << i << " " << aCurv(i) << endl;
}
#endif
@@ -219,11 +219,11 @@ void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray<Standard_
#if defined(APPROXINT_KNOTTOOLS_DEBUG)
{
std::cout << "Feature indices new: " << std::endl;
cout << "Feature indices new: " << endl;
i;
for(i = theInds.Lower(); i <= theInds.Upper(); ++i)
{
std::cout << i << " : " << theInds(i) << std::endl;
cout << i << " : " << theInds(i) << endl;
}
}
#endif
@@ -608,10 +608,10 @@ void ApproxInt_KnotTools::BuildKnots(const TColgp_Array1OfPnt& thePntsXYZ,
ComputeKnotInds(aCoords, aDim, thePars, aKnots);
#if defined(APPROXINT_KNOTTOOLS_DEBUG)
std::cout << "Draft knot sequence: " << std::endl;
cout << "Draft knot sequence: " << endl;
for(i = aKnots.Lower(); i <= aKnots.Upper(); ++i)
{
std::cout << i << " : " << aKnots(i) << std::endl;
cout << i << " : " << aKnots(i) << endl;
}
#endif
@@ -619,10 +619,10 @@ void ApproxInt_KnotTools::BuildKnots(const TColgp_Array1OfPnt& thePntsXYZ,
FilterKnots(aKnots, theMinNbPnts, theKnots);
#if defined(APPROXINT_KNOTTOOLS_DEBUG)
std::cout << "Result knot sequence: " << std::endl;
cout << "Result knot sequence: " << endl;
for(i = theKnots.Lower(); i <= theKnots.Upper(); ++i)
{
std::cout << i << " : " << theKnots(i) << std::endl;
cout << i << " : " << theKnots(i) << endl;
}
#endif

View File

@@ -21,7 +21,7 @@
#include <math_FunctionSetRoot.hxx>
#include <Precision.hxx>
#define Debug(expr) std::cout<<" expr :"<<expr;
#define Debug(expr) cout<<" expr :"<<expr;
#define MySurf1 MyIntersectionOn2S.Function().AuxillarSurface1()
#define MySurf2 MyIntersectionOn2S.Function().AuxillarSurface2()

View File

@@ -48,6 +48,25 @@ Aspect_GenId::Aspect_GenId (const Standard_Integer theLow,
}
}
// =======================================================================
// function : HasFree
// purpose :
// =======================================================================
Standard_Boolean Aspect_GenId::HasFree() const
{
return myFreeCount > 0
|| myFreeIds.Extent() > 0;
}
// =======================================================================
// function : Available
// purpose :
// =======================================================================
Standard_Integer Aspect_GenId::Available() const
{
return myFreeCount + myFreeIds.Extent();
}
// =======================================================================
// function : Free
// purpose :
@@ -79,38 +98,42 @@ void Aspect_GenId::Free (const Standard_Integer theId)
}
}
// =======================================================================
// function : Lower
// purpose :
// =======================================================================
Standard_Integer Aspect_GenId::Lower() const
{
return myLowerBound;
}
// =======================================================================
// function : Next
// purpose :
// =======================================================================
Standard_Integer Aspect_GenId::Next()
{
Standard_Integer aNewId = 0;
if (!Next (aNewId))
{
throw Aspect_IdentDefinitionError("Aspect_GenId::Next(), Error: Available == 0");
}
return aNewId;
}
// =======================================================================
// function : Next
// purpose :
// =======================================================================
Standard_Boolean Aspect_GenId::Next (Standard_Integer& theId)
{
if (!myFreeIds.IsEmpty())
{
theId = myFreeIds.First();
const Standard_Integer anId = myFreeIds.First();
myFreeIds.RemoveFirst();
return Standard_True;
return anId;
}
else if (myFreeCount < 1)
{
return Standard_False;
throw Aspect_IdentDefinitionError("GenId Next Error: Available == 0");
}
--myFreeCount;
theId = myLowerBound + myLength - myFreeCount - 1;
return Standard_True;
const Standard_Integer anId = myLowerBound + myLength - myFreeCount - 1;
return anId;
}
// =======================================================================
// function : Upper
// purpose :
// =======================================================================
Standard_Integer Aspect_GenId::Upper() const
{
return myUpperBound;
}

View File

@@ -49,38 +49,47 @@ public:
Standard_EXPORT void Free (const Standard_Integer theId);
//! Returns true if there are available identifiers in range.
Standard_Boolean HasFree() const
{
return myFreeCount > 0
|| myFreeIds.Extent() > 0;
}
Standard_EXPORT Standard_Boolean HasFree() const;
//! Returns the number of available identifiers.
Standard_Integer Available() const { return myFreeCount + myFreeIds.Extent(); }
Standard_EXPORT Standard_Integer Available() const;
//! Returns the lower identifier in range.
Standard_Integer Lower() const { return myLowerBound; }
Standard_EXPORT Standard_Integer Lower() const;
//! Returns the next available identifier.
//! Warning: Raises IdentDefinitionError if all identifiers are busy.
Standard_EXPORT Standard_Integer Next();
//! Generates the next available identifier.
//! @param theId [out] generated identifier
//! @return FALSE if all identifiers are busy.
Standard_EXPORT Standard_Boolean Next (Standard_Integer& theId);
//! Returns the upper identifier in range.
Standard_Integer Upper() const { return myUpperBound; }
Standard_EXPORT Standard_Integer Upper() const;
protected:
private:
Standard_Integer myFreeCount;
Standard_Integer myLength;
Standard_Integer myLowerBound;
Standard_Integer myUpperBound;
TColStd_ListOfInteger myFreeIds;
};
#endif // _Aspect_GenId_HeaderFile

View File

@@ -255,8 +255,9 @@ Standard_Integer bopcheck (Draw_Interpretor& di,
//
const BOPDS_MapOfPair& aMPK=aDS.Interferences();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
std::vector <BOPTest_Interf> aVec;
std::vector <BOPTest_Interf>::iterator aIt;
using namespace std;
vector <BOPTest_Interf> aVec;
vector <BOPTest_Interf>::iterator aIt;
BOPTest_Interf aBInterf;
//
aItMPK.Initialize(aMPK);
@@ -280,7 +281,7 @@ Standard_Integer bopcheck (Draw_Interpretor& di,
aVec.push_back(aBInterf);
}
//
sort( aVec.begin(), aVec.end(), std::less<BOPTest_Interf>());
sort( aVec.begin(), aVec.end(), less<BOPTest_Interf>());
//
iCnt=0;
for (aIt=aVec.begin(); aIt!=aVec.end(); aIt++) {

View File

@@ -988,7 +988,7 @@ Standard_Boolean BOPTools_AlgoTools::GetFaceOff
aDN1, aDBF, theContext, aProjPL, aDt3D);
if (!bIsComputed) {
#ifdef OCCT_DEBUG
std::cout << "BOPTools_AlgoTools::GetFaceOff(): incorrect computation of bi-normal direction." << std::endl;
cout << "BOPTools_AlgoTools::GetFaceOff(): incorrect computation of bi-normal direction." << endl;
#endif
}
//
@@ -1006,7 +1006,7 @@ Standard_Boolean BOPTools_AlgoTools::GetFaceOff
aDBF2, theContext, aProjPL, aDt3D);
if (!bIsComputed) {
#ifdef OCCT_DEBUG
std::cout << "BOPTools_AlgoTools::GetFaceOff(): incorrect computation of bi-normal direction." << std::endl;
cout << "BOPTools_AlgoTools::GetFaceOff(): incorrect computation of bi-normal direction." << endl;
#endif
}
//Angle

View File

@@ -149,7 +149,7 @@ BRepAlgo_BooleanOperation::~BRepAlgo_BooleanOperation()
}
myBuilderCanWork = (esp || tede) ;
#ifdef OCCT_DEBUG
if (!esp) std::cout<<"BRepAlgo_BooleanOperation(DEB) some edges not SameParameter"<<std::endl;
if (!esp) cout<<"BRepAlgo_BooleanOperation(DEB) some edges not SameParameter"<<endl;
#endif
if (!myBuilderCanWork) return;
@@ -241,8 +241,8 @@ BRepAlgo_BooleanOperation::~BRepAlgo_BooleanOperation()
Vertex2.Append(Ex.Current()); nbv2++;
}
//-- std::cout<<"Solids1: "<<nbs1<<" Faces1: "<<nbf1<<" Edges1:"<<nbe1<<" Vtx1:"<<nbv1<<std::endl;
//-- std::cout<<"Solids2: "<<nbs2<<" Faces2: "<<nbf2<<" Edges2:"<<nbe2<<" Vtx2:"<<nbv2<<std::endl;
//-- cout<<"Solids1: "<<nbs1<<" Faces1: "<<nbf1<<" Edges1:"<<nbe1<<" Vtx1:"<<nbv1<<endl;
//-- cout<<"Solids2: "<<nbs2<<" Faces2: "<<nbf2<<" Edges2:"<<nbe2<<" Vtx2:"<<nbv2<<endl;
//==
@@ -253,14 +253,14 @@ BRepAlgo_BooleanOperation::~BRepAlgo_BooleanOperation()
// Standard_Boolean Correct = Standard_True;
if( (nbs1 && nbs2==0 && St1==TopAbs_OUT && St2==TopAbs_IN)
|| (nbs2 && nbs1==0 && St2==TopAbs_OUT && St1==TopAbs_IN)) {
//-- std::cout<<"***** Invalid Operation : Cut of a Solid by a Non Solid "<<std::endl;
//-- cout<<"***** Invalid Operation : Cut of a Solid by a Non Solid "<<endl;
Done();
return;
}
if( (nbs1 && nbs2==0 && St1==TopAbs_OUT && St2==TopAbs_OUT)
|| (nbs2 && nbs1==0 && St2==TopAbs_OUT && St1==TopAbs_OUT)) {
//-- std::cout<<"***** Invalid Operation : Fusion of a Solid and a Non Solid "<<std::endl;
//-- cout<<"***** Invalid Operation : Fusion of a Solid and a Non Solid "<<endl;
Done();
return;
}
@@ -268,7 +268,7 @@ BRepAlgo_BooleanOperation::~BRepAlgo_BooleanOperation()
if( (nbs1>0 && nbs2>0)
&& (nbe1 || nbe2 || nbf1 || nbf2 || nbv1 || nbv2)) {
//-- std::cout<<"***** Not Yet Implemented : Compound of solid and non Solid"<<std::endl;
//-- cout<<"***** Not Yet Implemented : Compound of solid and non Solid"<<endl;
Done();
return;
}

View File

@@ -198,7 +198,7 @@ static TopoDS_Vertex UpdateClosedEdge(const TopoDS_Edge& E,
if (!VB[0].IsSame(VB[1])) {
#ifdef OCCT_DEBUG_ALGO
if (AffichLoop)
std::cout <<"Two different vertices on the closing vertex"<<std::endl;
cout <<"Two different vertices on the closing vertex"<<endl;
#endif
}
else {
@@ -314,7 +314,7 @@ static Standard_Boolean SelectEdge(const TopoDS_Face& F,
#ifdef OCCT_DEBUG_ALGO
if (AffichLoop) {
if ( LE.Extent() > 2) {
std::cout <<"vertex on more than 2 edges in a face."<<std::endl;
cout <<"vertex on more than 2 edges in a face."<<endl;
}
}
#endif
@@ -512,7 +512,7 @@ void BRepAlgo_Loop::Perform()
#ifdef OCCT_DEBUG_ALGO
if (AffichLoop) {
std::cout <<"NewLoop"<<std::endl;
cout <<"NewLoop"<<endl;
NbLoops++;
#ifdef DRAW
sprintf(name,"FLoop_%d",NbLoops);
@@ -582,7 +582,7 @@ void BRepAlgo_Loop::Perform()
#ifdef DRAW
if (AffichLoop) {
std::cout <<"NewLoop"<<std::endl;
cout <<"NewLoop"<<endl;
Standard_Integer NbEdges = 1;
TopTools_MapOfShape Done;
for (Standard_Integer iV = 1; iV <= MVE.Extent(); iV++) {
@@ -685,9 +685,9 @@ void BRepAlgo_Loop::Perform()
}
#ifdef OCCT_DEBUG_ALGO
else {
std::cout <<"BRepAlgo_Loop: Open Wire"<<std::endl;
cout <<"BRepAlgo_Loop: Open Wire"<<endl;
if (AffichLoop)
std::cout << "OpenWire is : NW_"<<NbLoops<<"_"<<NbWires<<std::endl;
cout << "OpenWire is : NW_"<<NbLoops<<"_"<<NbWires<<endl;
}
#endif
#ifdef DRAW

View File

@@ -292,8 +292,8 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
for(k = 1; k <= Projector.NbCurves(); k++){
if(Projector.IsSinglePnt(k, P2d)){
#ifdef OCCT_DEBUG
std::cout << "Projection of edge "<<i<<" on face "<<j;
std::cout << " is punctual"<<std::endl<<std::endl;
cout << "Projection of edge "<<i<<" on face "<<j;
cout << " is punctual"<<endl<<endl;
#endif
Projector.GetSurface()->D0(P2d.X(), P2d.Y(), P);
prj = BRepLib_MakeVertex(P).Shape();
@@ -310,8 +310,8 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
/**************************************************************/
if (Projector.IsUIso(k, UIso)) {
#ifdef OCCT_DEBUG
std::cout << "Projection of edge "<<i<<" on face "<<j;
std::cout << " is U-isoparametric"<<std::endl<<std::endl;
cout << "Projection of edge "<<i<<" on face "<<j;
cout << " is U-isoparametric"<<endl<<endl;
#endif
Projector.D0(Udeb, Pdeb);
Projector.D0(Ufin, Pfin);
@@ -327,8 +327,8 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
}
else if (Projector.IsVIso(k, VIso)) {
#ifdef OCCT_DEBUG
std::cout << "Projection of edge "<<i<<" on face "<<j;
std::cout << " is V-isoparametric"<<std::endl<<std::endl;
cout << "Projection of edge "<<i<<" on face "<<j;
cout << " is V-isoparametric"<<endl<<endl;
#endif
Projector.D0(Udeb, Pdeb);
Projector.D0(Ufin, Pfin);
@@ -370,12 +370,12 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
ResultChron(chr_approx,t_approx);
approx_count++;
std::cout<<"Approximation.IsDone = "<<appr.IsDone()<<std::endl;
cout<<"Approximation.IsDone = "<<appr.IsDone()<<endl;
if(!Only2d)
std::cout<<"MaxError3d = "<<appr.MaxError3d()<<std::endl<<std::endl;
cout<<"MaxError3d = "<<appr.MaxError3d()<<endl<<endl;
if(!Only3d) {
std::cout<<"MaxError2dU = "<<appr.MaxError2dU()<<std::endl;
std::cout<<"MaxError2dV = "<<appr.MaxError2dV()<<std::endl<<std::endl;
cout<<"MaxError2dU = "<<appr.MaxError2dU()<<endl;
cout<<"MaxError2dV = "<<appr.MaxError2dV()<<endl<<endl;
}
#endif
@@ -440,8 +440,8 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
}
if (Degenerated) {
#ifdef OCCT_DEBUG
std::cout << "Projection of edge "<<i<<" on face "<<j;
std::cout << " is degenerated "<<std::endl<<std::endl;
cout << "Projection of edge "<<i<<" on face "<<j;
cout << " is degenerated "<<endl<<endl;
#endif
TopoDS_Vertex VV;
BB.MakeVertex(VV);
@@ -511,7 +511,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
}
else {
#ifdef OCCT_DEBUG
std::cout << " BooleanOperations : no solution " << std::endl;
cout << " BooleanOperations : no solution " << endl;
#endif
BRepTopAdaptor_FClass2d classifier(TopoDS::Face(Faces->Value(j)),
@@ -557,13 +557,13 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
#ifdef OCCT_DEBUG_CHRONO
ResultChron(chr_total,t_total);
std::cout<<"Build - Total time : "<<t_total<<" includes:" <<std::endl;
std::cout<<"- Projection : "<<t_init<<std::endl;
std::cout<<" -- Initial point search : "<<t_init_point<<std::endl;
std::cout<<" -- DichoBound search : "<<t_dicho_bound<<std::endl;
std::cout<<"- Approximation : "<<t_approx<<std::endl;
std::cout<<"- Boolean operation : "<<t_booltool<<std::endl;
std::cout<<"- Rest of time : "<<t_total-(t_init + t_approx + t_booltool )<<std::endl<<std::endl;
cout<<"Build - Total time : "<<t_total<<" includes:" <<endl;
cout<<"- Projection : "<<t_init<<endl;
cout<<" -- Initial point search : "<<t_init_point<<endl;
cout<<" -- DichoBound search : "<<t_dicho_bound<<endl;
cout<<"- Approximation : "<<t_approx<<endl;
cout<<"- Boolean operation : "<<t_booltool<<endl;
cout<<"- Rest of time : "<<t_total-(t_init + t_approx + t_booltool )<<endl<<endl;
if (init_count != 0)
t_init /= init_count;
if (init_point_count != 0)
@@ -575,13 +575,13 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
if (booltool_count != 0)
t_booltool /= booltool_count;
std::cout<<"Unitary average time : "<<std::endl;
std::cout<<"- Projection : "<<t_init<<std::endl;
std::cout<<" -- Initial point search: "<<t_init_point<<std::endl;
std::cout<<" -- DichoBound search : "<<t_dicho_bound<<std::endl;
std::cout<<"- Approximation : "<<t_approx<<std::endl;
std::cout<<"- Boolean operation :"<<t_booltool<<std::endl;
std::cout<<std::endl<<"Number of initial point computations is "<<init_point_count<<std::endl<<std::endl;
cout<<"Unitary average time : "<<endl;
cout<<"- Projection : "<<t_init<<endl;
cout<<" -- Initial point search: "<<t_init_point<<endl;
cout<<" -- DichoBound search : "<<t_dicho_bound<<endl;
cout<<"- Approximation : "<<t_approx<<endl;
cout<<"- Boolean operation :"<<t_booltool<<endl;
cout<<endl<<"Number of initial point computations is "<<init_point_count<<endl<<endl;
#endif
}

View File

@@ -91,7 +91,7 @@ TopoDS_Shape BRepAlgo_Tool::Deboucle3D(const TopoDS_Shape& S,
if (NbSub == 0)
{
#ifdef OCCT_DEBUG
std::cout << "No subhape in shape!" << std::endl;
cout << "No subhape in shape!" << endl;
#endif
SS = TopoDS_Shape();
}

View File

@@ -331,7 +331,7 @@ Standard_Boolean BRepBlend_AppFuncRoot::SearchPoint(Blend_AppFunction& Func,
if (!rsnld.IsDone()) {
# ifdef BREPBLEND_DEB
std::cout << "AppFunc : RNLD Not done en t = " << Param << std::endl;
cout << "AppFunc : RNLD Not done en t = " << Param << endl;
# endif
return Standard_False;
}
@@ -343,8 +343,8 @@ Standard_Boolean BRepBlend_AppFuncRoot::SearchPoint(Blend_AppFunction& Func,
// (4) Insertion of the point if the calculation seems long.
if ((!Trouve)&&(rsnld.NbIterations()>3)) {
#ifdef OCCT_DEBUG
std::cout << "Evaluation in t = " << Param << "given" << std::endl;
rsnld.Dump(std::cout);
cout << "Evaluation in t = " << Param << "given" << endl;
rsnld.Dump(cout);
#endif
myLine->InsertBefore(Index+1, Pnt);
}

View File

@@ -101,28 +101,28 @@ static void tracederiv(Blend_RstRstFunction& Func,
Standard_Real param2 = BP2.Parameter();
Standard_Real scal = 1./ (param1 - param2);
std::cout<<std::endl;
std::cout<<"control of derivatives at point : "<<param1<<std::endl;
cout<<endl;
cout<<"control of derivatives at point : "<<param1<<endl;
for(i = 1; i <= hp; i++){
std::cout<<std::endl;
std::cout<<"point : "<<i<<std::endl;
std::cout<<"dx calculated : "<<TDP1(i).X()<<std::endl;
std::cout<<"dx estimated : "<<scal*(TP1(i).X()-TP2(i).X())<<std::endl;
std::cout<<"dy calculated : "<<TDP1(i).Y()<<std::endl;
std::cout<<"dy estimated : "<<scal*(TP1(i).Y()-TP2(i).Y())<<std::endl;
std::cout<<"dz calculated : "<<TDP1(i).Z()<<std::endl;
std::cout<<"dz estimated : "<<scal*(TP1(i).Z()-TP2(i).Z())<<std::endl;
std::cout<<"dw calculated : "<<TDW1(i)<<std::endl;
std::cout<<"dw estimated : "<<scal*(TW1(i)-TW2(i))<<std::endl;
cout<<endl;
cout<<"point : "<<i<<endl;
cout<<"dx calculated : "<<TDP1(i).X()<<endl;
cout<<"dx estimated : "<<scal*(TP1(i).X()-TP2(i).X())<<endl;
cout<<"dy calculated : "<<TDP1(i).Y()<<endl;
cout<<"dy estimated : "<<scal*(TP1(i).Y()-TP2(i).Y())<<endl;
cout<<"dz calculated : "<<TDP1(i).Z()<<endl;
cout<<"dz estimated : "<<scal*(TP1(i).Z()-TP2(i).Z())<<endl;
cout<<"dw calculated : "<<TDW1(i)<<endl;
cout<<"dw estimated : "<<scal*(TW1(i)-TW2(i))<<endl;
}
for(i = 1; i <= hp2d; i++){
std::cout<<std::endl;
std::cout<<"point 2d : "<<i<<std::endl;
std::cout<<"dx calculated : "<<TDP2d1(i).X()<<std::endl;
std::cout<<"dx estimated : "<<scal*(TP2d1(i).X()-TP2d2(i).X())<<std::endl;
std::cout<<"dy calculated : "<<TDP2d1(i).Y()<<std::endl;
std::cout<<"dy estimated : "<<scal*(TP2d1(i).Y()-TP2d2(i).Y())<<std::endl;
cout<<endl;
cout<<"point 2d : "<<i<<endl;
cout<<"dx calculated : "<<TDP2d1(i).X()<<endl;
cout<<"dx estimated : "<<scal*(TP2d1(i).X()-TP2d2(i).X())<<endl;
cout<<"dy calculated : "<<TDP2d1(i).Y()<<endl;
cout<<"dy estimated : "<<scal*(TP2d1(i).Y()-TP2d2(i).Y())<<endl;
}
}
#endif
@@ -825,7 +825,7 @@ void BRepBlend_RstRstLineBuilder::InternalPerform(Blend_RstRstFunction& Func,
else{
// reframing failed. Leave with PointsConfondus
#ifdef OCCT_DEBUG
std::cout<<"reframing failed"<<std::endl;
cout<<"reframing failed"<<endl;
#endif
State = Blend_SamePoints;
}
@@ -880,7 +880,7 @@ void BRepBlend_RstRstLineBuilder::InternalPerform(Blend_RstRstFunction& Func,
#ifdef OCCT_DEBUG
if (line->NbPoints()>=2) {
// Show that there is a stop during processing
std::cout<<"No more advancement in the processing"<<std::endl;
cout<<"No more advancement in the processing"<<endl;
}
#endif
}
@@ -988,7 +988,7 @@ void BRepBlend_RstRstLineBuilder::InternalPerform(Blend_RstRstFunction& Func,
{
// Stop
#ifdef OCCT_DEBUG
std::cout << " Mixed points in the processing" << std::endl;
cout << " Mixed points in the processing" << endl;
#endif
Extrst1.SetValue(previousP.PointOnC1(),
previousP.ParameterOnC1(),
@@ -1039,7 +1039,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre1(Blend_RstRstFunction&
rsnld.Perform(Finv, Solinv, infb, supb);
if (!rsnld.IsDone()) {
#ifdef OCCT_DEBUG
std::cout << "RSNLD not done "<< std::endl << std::endl;
cout << "RSNLD not done "<< endl << endl;
#endif
return Standard_False;
}
@@ -1121,7 +1121,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre2(Blend_RstRstFunction&
rsnld.Perform(Finv, Solinv, infb, supb);
if (!rsnld.IsDone()) {
#ifdef OCCT_DEBUG
std::cout << "RSNLD not done "<< std::endl << std::endl;
cout << "RSNLD not done "<< endl << endl;
#endif
return Standard_False;
}
@@ -1207,7 +1207,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre1(Blend_CurvPointFuncInv&
rsnld.Perform(FinvP, Solinv, infb, supb);
if (!rsnld.IsDone()) {
#ifdef OCCT_DEBUG
std::cout << "RSNLD not done "<< std::endl << std::endl;
cout << "RSNLD not done "<< endl << endl;
#endif
return Standard_False;
}
@@ -1275,7 +1275,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre2(Blend_CurvPointFuncInv&
rsnld.Perform(FinvP, Solinv, infb, supb);
if (!rsnld.IsDone()) {
#ifdef OCCT_DEBUG
std::cout << "RSNLD not done "<< std::endl << std::endl;
cout << "RSNLD not done "<< endl << endl;
#endif
return Standard_False;
}

View File

@@ -921,7 +921,7 @@ Standard_Boolean BRepBlend_SurfRstConstRad::Section
if (norm < Eps) {
norm = 1; // Not enough, but it is not necessary to stop
#ifdef OCCT_DEBUG
std::cout << " SurfRstConstRad : Singular Surface " << std::endl;
cout << " SurfRstConstRad : Singular Surface " << endl;
#endif
}

View File

@@ -934,7 +934,7 @@ TColStd_Array1OfReal& DWeigths)
if (norm < Eps) {
norm = 1; // Not enough, but it is not necessary to stop
#ifdef OCCT_DEBUG
std::cout << " SurfRstEvolRad : Surface single " << std::endl;
cout << " SurfRstEvolRad : Surface single " << endl;
#endif
}

View File

@@ -96,28 +96,28 @@ static void tracederiv(Blend_SurfRstFunction& Func,
Standard_Real param2 = BP2.Parameter();
Standard_Real scal = 1./(param1-param2);
std::cout<<std::endl;
std::cout<<"control derivatives at point : "<<param1<<std::endl;
cout<<endl;
cout<<"control derivatives at point : "<<param1<<endl;
for(i = 1; i <= hp; i++){
std::cout<<std::endl;
std::cout<<"point : "<<i<<std::endl;
std::cout<<"dx calculated : "<<TDP1(i).X()<<std::endl;
std::cout<<"dx estimated : "<<scal*(TP1(i).X()-TP2(i).X())<<std::endl;
std::cout<<"dy calculated : "<<TDP1(i).Y()<<std::endl;
std::cout<<"dy estimated : "<<scal*(TP1(i).Y()-TP2(i).Y())<<std::endl;
std::cout<<"dz calculated : "<<TDP1(i).Z()<<std::endl;
std::cout<<"dz estimated : "<<scal*(TP1(i).Z()-TP2(i).Z())<<std::endl;
std::cout<<"dw calculated : "<<TDW1(i)<<std::endl;
std::cout<<"dw estimated : "<<scal*(TW1(i)-TW2(i))<<std::endl;
cout<<endl;
cout<<"point : "<<i<<endl;
cout<<"dx calculated : "<<TDP1(i).X()<<endl;
cout<<"dx estimated : "<<scal*(TP1(i).X()-TP2(i).X())<<endl;
cout<<"dy calculated : "<<TDP1(i).Y()<<endl;
cout<<"dy estimated : "<<scal*(TP1(i).Y()-TP2(i).Y())<<endl;
cout<<"dz calculated : "<<TDP1(i).Z()<<endl;
cout<<"dz estimated : "<<scal*(TP1(i).Z()-TP2(i).Z())<<endl;
cout<<"dw calculated : "<<TDW1(i)<<endl;
cout<<"dw estimated : "<<scal*(TW1(i)-TW2(i))<<endl;
}
for(i = 1; i <= hp2d; i++){
std::cout<<std::endl;
std::cout<<"point 2d : "<<i<<std::endl;
std::cout<<"dx calculated : "<<TDP2d1(i).X()<<std::endl;
std::cout<<"dx estimated : "<<scal*(TP2d1(i).X()-TP2d2(i).X())<<std::endl;
std::cout<<"dy calculated : "<<TDP2d1(i).Y()<<std::endl;
std::cout<<"dy estimated : "<<scal*(TP2d1(i).Y()-TP2d2(i).Y())<<std::endl;
cout<<endl;
cout<<"point 2d : "<<i<<endl;
cout<<"dx calculated : "<<TDP2d1(i).X()<<endl;
cout<<"dx estimated : "<<scal*(TP2d1(i).X()-TP2d2(i).X())<<endl;
cout<<"dy calculated : "<<TDP2d1(i).Y()<<endl;
cout<<"dy estimated : "<<scal*(TP2d1(i).Y()-TP2d2(i).Y())<<endl;
}
}
#endif
@@ -717,7 +717,7 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func,
else{
// Failed reframing. Leave with PointsConfondus
#ifdef OCCT_DEBUG
std::cout<<"SurfRstLineBuilder : failed reframing"<<std::endl;
cout<<"SurfRstLineBuilder : failed reframing"<<endl;
#endif
State = Blend_SamePoints;
}
@@ -772,7 +772,7 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func,
if (line->NbPoints()>=2) {
// Indicate that one stops during the processing
#ifdef OCCT_DEBUG
std::cout<<"SurfRstLineBuilder : No advancement in the processing"<<std::endl;
cout<<"SurfRstLineBuilder : No advancement in the processing"<<endl;
#endif
}
}
@@ -878,7 +878,7 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func,
{
// Stop
#ifdef OCCT_DEBUG
std::cout << "SurfRstLineBuilder Points mixed in the processing" << std::endl;
cout << "SurfRstLineBuilder Points mixed in the processing" << endl;
#endif
previousP.ParametersOnS(U,V);
Exts.SetValue(previousP.PointOnS(),U,V,
@@ -951,7 +951,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfCurvFuncInv&
if (!rsnld.IsDone()) {
#ifdef OCCT_DEBUG
std::cout << "SurfRstLineBuilder : RSNLD not done "<< std::endl << std::endl;
cout << "SurfRstLineBuilder : RSNLD not done "<< endl << endl;
#endif
}
else {
@@ -990,7 +990,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfCurvFuncInv&
if (!aRsnld.IsDone()) {
#ifdef OCCT_DEBUG
std::cout << "SurfRstLineBuilder : RSNLD not done "<< std::endl << std::endl;
cout << "SurfRstLineBuilder : RSNLD not done "<< endl << endl;
#endif
}
else {
@@ -1051,7 +1051,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfRstFunction&
rsnld.Perform(Finv,Solinv,infb,supb);
if (!rsnld.IsDone()) {
#ifdef OCCT_DEBUG
std::cout << "SurfRstLineBuilder :RSNLD not done "<< std::endl;
cout << "SurfRstLineBuilder :RSNLD not done "<< endl;
#endif
return Standard_False;
}
@@ -1135,7 +1135,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfPointFuncInv&
rsnld.Perform(FinvP,Solinv,infb,supb);
if (!rsnld.IsDone()) {
#ifdef OCCT_DEBUG
std::cout << "SurfRstLineBuilder :RSNLD not done "<< std::endl;
cout << "SurfRstLineBuilder :RSNLD not done "<< endl;
#endif
return Standard_False;
}

View File

@@ -330,7 +330,7 @@ void BRepBuilderAPI_FastSewing::Perform(void)
{
SetStatus(FS_Exception);
#ifdef OCCT_DEBUG
//Standard_Failure::Caught()->Print(std::cout);
//Standard_Failure::Caught()->Print(cout);
#endif
return;
}

View File

@@ -145,8 +145,8 @@ Handle(Geom2d_Curve) BRepBuilderAPI_Sewing::SameRange(const Handle(Geom2d_Curve)
}
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
std::cout << "Exception in BRepBuilderAPI_Sewing::SameRange: ";
anException.Print(std::cout); std::cout << std::endl;
cout << "Exception in BRepBuilderAPI_Sewing::SameRange: ";
anException.Print(cout); cout << endl;
#endif
(void)anException;
}
@@ -318,8 +318,8 @@ void BRepBuilderAPI_Sewing::SameParameter(const TopoDS_Edge& edge) const
}
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
std::cout << "Exception in BRepBuilderAPI_Sewing::SameParameter: ";
anException.Print(std::cout); std::cout << std::endl;
cout << "Exception in BRepBuilderAPI_Sewing::SameParameter: ";
anException.Print(cout); cout << endl;
#endif
(void)anException;
}
@@ -1827,7 +1827,7 @@ void BRepBuilderAPI_Sewing::Perform(const Handle(Message_ProgressIndicator)& the
if (myAnalysis)
{
#ifdef OCCT_DEBUG
std::cout << "Begin face analysis..." << std::endl;
cout << "Begin face analysis..." << endl;
chr_local.Reset();
chr_local.Start();
#endif
@@ -1838,7 +1838,7 @@ void BRepBuilderAPI_Sewing::Perform(const Handle(Message_ProgressIndicator)& the
#ifdef OCCT_DEBUG
chr_local.Stop();
chr_local.Show(t_analysis);
std::cout << "Face analysis finished after " << t_analysis << " s" << std::endl;
cout << "Face analysis finished after " << t_analysis << " s" << endl;
#endif
}
@@ -1851,7 +1851,7 @@ void BRepBuilderAPI_Sewing::Perform(const Handle(Message_ProgressIndicator)& the
{
#ifdef OCCT_DEBUG
std::cout << "Begin vertices assembling..." << std::endl;
cout << "Begin vertices assembling..." << endl;
chr_local.Reset();
chr_local.Start();
#endif
@@ -1862,12 +1862,12 @@ void BRepBuilderAPI_Sewing::Perform(const Handle(Message_ProgressIndicator)& the
#ifdef OCCT_DEBUG
chr_local.Stop();
chr_local.Show(t_assembling);
std::cout << "Vertices assembling finished after " << t_assembling << " s" << std::endl;
cout << "Vertices assembling finished after " << t_assembling << " s" << endl;
#endif
if (myCutting)
{
#ifdef OCCT_DEBUG
std::cout << "Begin cutting..." << std::endl;
cout << "Begin cutting..." << endl;
chr_local.Reset();
chr_local.Start();
#endif
@@ -1878,11 +1878,11 @@ void BRepBuilderAPI_Sewing::Perform(const Handle(Message_ProgressIndicator)& the
#ifdef OCCT_DEBUG
chr_local.Stop();
chr_local.Show(t_cutting);
std::cout << "Cutting finished after " << t_cutting << " s" << std::endl;
cout << "Cutting finished after " << t_cutting << " s" << endl;
#endif
}
#ifdef OCCT_DEBUG
std::cout << "Begin merging..." << std::endl;
cout << "Begin merging..." << endl;
chr_local.Reset();
chr_local.Start();
#endif
@@ -1893,7 +1893,7 @@ void BRepBuilderAPI_Sewing::Perform(const Handle(Message_ProgressIndicator)& the
#ifdef OCCT_DEBUG
chr_local.Stop();
chr_local.Show(t_merging);
std::cout << "Merging finished after " << t_merging << " s" << std::endl;
cout << "Merging finished after " << t_merging << " s" << endl;
#endif
}
else
@@ -1910,7 +1910,7 @@ void BRepBuilderAPI_Sewing::Perform(const Handle(Message_ProgressIndicator)& the
{
#ifdef OCCT_DEBUG
std::cout << "Creating sewed shape..." << std::endl;
cout << "Creating sewed shape..." << endl;
#endif
// examine the multiple edges if any and process sameparameter for edges if necessary
EdgeProcessing (thePI);
@@ -1933,7 +1933,7 @@ void BRepBuilderAPI_Sewing::Perform(const Handle(Message_ProgressIndicator)& the
return;
}
#ifdef OCCT_DEBUG
std::cout << "Sewed shape created" << std::endl;
cout << "Sewed shape created" << endl;
#endif
}
@@ -1948,12 +1948,12 @@ void BRepBuilderAPI_Sewing::Perform(const Handle(Message_ProgressIndicator)& the
#ifdef OCCT_DEBUG
chr_total.Stop();
chr_total.Show(t_total);
std::cout << "Sewing finished!" << std::endl;
std::cout << " analysis time : " << t_analysis << " s" << std::endl;
std::cout << " assembling time : " << t_assembling << " s" << std::endl;
std::cout << " cutting time : " << t_cutting << " s" << std::endl;
std::cout << " merging time : " << t_merging << " s" << std::endl;
std::cout << "Total time : " << t_total << " s" << std::endl;
cout << "Sewing finished!" << endl;
cout << " analysis time : " << t_analysis << " s" << endl;
cout << " assembling time : " << t_assembling << " s" << endl;
cout << " cutting time : " << t_cutting << " s" << endl;
cout << " merging time : " << t_merging << " s" << endl;
cout << "Total time : " << t_total << " s" << endl;
#endif
}
@@ -2205,23 +2205,23 @@ void BRepBuilderAPI_Sewing::Dump() const
mapVertices.Add(V2);
}
}
std::cout << " " << std::endl;
std::cout << " Informations " << std::endl;
std::cout << " ===========================================================" << std::endl;
std::cout << " " << std::endl;
std::cout << " Number of input shapes : " << myOldShapes.Extent() << std::endl;
std::cout << " Number of actual shapes : " << myNbShapes << std::endl;
std::cout << " Number of Bounds : " << NbBounds << std::endl;
std::cout << " Number of Sections : " << NbSections << std::endl;
std::cout << " Number of Edges : " << mapEdges.Extent() << std::endl;
std::cout << " Number of Vertices : " << myNbVertices << std::endl;
std::cout << " Number of Nodes : " << mapVertices.Extent() << std::endl;
std::cout << " Number of Free Edges : " << myFreeEdges.Extent() << std::endl;
std::cout << " Number of Contigous Edges : " << myContigousEdges.Extent() << std::endl;
std::cout << " Number of Multiple Edges : " << myMultipleEdges.Extent() << std::endl;
std::cout << " Number of Degenerated Edges : " << myDegenerated.Extent() << std::endl;
std::cout << " ===========================================================" << std::endl;
std::cout << " " << std::endl;
cout << " " << endl;
cout << " Informations " << endl;
cout << " ===========================================================" << endl;
cout << " " << endl;
cout << " Number of input shapes : " << myOldShapes.Extent() << endl;
cout << " Number of actual shapes : " << myNbShapes << endl;
cout << " Number of Bounds : " << NbBounds << endl;
cout << " Number of Sections : " << NbSections << endl;
cout << " Number of Edges : " << mapEdges.Extent() << endl;
cout << " Number of Vertices : " << myNbVertices << endl;
cout << " Number of Nodes : " << mapVertices.Extent() << endl;
cout << " Number of Free Edges : " << myFreeEdges.Extent() << endl;
cout << " Number of Contigous Edges : " << myContigousEdges.Extent() << endl;
cout << " Number of Multiple Edges : " << myMultipleEdges.Extent() << endl;
cout << " Number of Degenerated Edges : " << myDegenerated.Extent() << endl;
cout << " ===========================================================" << endl;
cout << " " << endl;
}
//=======================================================================
@@ -2297,7 +2297,7 @@ void BRepBuilderAPI_Sewing::FaceAnalysis(const Handle(Message_ProgressIndicator)
Handle(Geom_Curve) c3d = BRep_Tool::Curve(edge,first,last);
if (c3d.IsNull()) {
#ifdef OCCT_DEBUG
std::cout << "Warning: Possibly small edge can be sewed: No 3D curve" << std::endl;
cout << "Warning: Possibly small edge can be sewed: No 3D curve" << endl;
#endif
}
else {
@@ -2318,8 +2318,8 @@ void BRepBuilderAPI_Sewing::FaceAnalysis(const Handle(Message_ProgressIndicator)
}
catch (Standard_Failure) {
#ifdef OCCT_DEBUG
std::cout << "Warning: Possibly small edge can be sewed: ";
Standard_Failure::Caught()->Print(std::cout); std::cout << std::endl;
cout << "Warning: Possibly small edge can be sewed: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}*/
}
@@ -2377,7 +2377,7 @@ void BRepBuilderAPI_Sewing::FaceAnalysis(const Handle(Message_ProgressIndicator)
// Replace small edge
if (isSmall) {
#ifdef OCCT_DEBUG
std::cout << "Warning: Small edge made degenerated by FaceAnalysis" << std::endl;
cout << "Warning: Small edge made degenerated by FaceAnalysis" << endl;
#endif
nbSmall++;
// Create new degenerated edge
@@ -2414,7 +2414,7 @@ void BRepBuilderAPI_Sewing::FaceAnalysis(const Handle(Message_ProgressIndicator)
// Remove small face
if (nbSmall == nbEdges) {
#ifdef OCCT_DEBUG
std::cout << "Warning: Small face removed by FaceAnalysis" << std::endl;
cout << "Warning: Small face removed by FaceAnalysis" << endl;
#endif
myLittleFace.Add(face);
myReShape->Remove(face);
@@ -2801,7 +2801,7 @@ static Standard_Boolean GlueVertices(TopTools_IndexedDataMapOfShapeShape& aVerte
}
Standard_Integer nbNodes = NodeVertices.Extent();
#ifdef OCCT_DEBUG
std::cout << "Glueing " << nbNodes << " nodes..." << std::endl;
cout << "Glueing " << nbNodes << " nodes..." << endl;
#endif
// Merge nearest nodes
TopTools_IndexedDataMapOfShapeShape NodeNearestNode;
@@ -2962,7 +2962,7 @@ void BRepBuilderAPI_Sewing::VerticesAssembling(const Handle(Message_ProgressIndi
// Glue vertices
if (nbVert) {
#ifdef OCCT_DEBUG
std::cout << "Assemble " << nbVert << " vertices on faces..." << std::endl;
cout << "Assemble " << nbVert << " vertices on faces..." << endl;
#endif
while (GlueVertices(myVertexNode,myNodeSections,myBoundFaces,myTolerance, thePI));
}
@@ -2971,7 +2971,7 @@ void BRepBuilderAPI_Sewing::VerticesAssembling(const Handle(Message_ProgressIndi
aPS.Next();
if (nbVertFree) {
#ifdef OCCT_DEBUG
std::cout << "Assemble " << nbVertFree << " vertices on floating edges..." << std::endl;
cout << "Assemble " << nbVertFree << " vertices on floating edges..." << endl;
#endif
while (GlueVertices(myVertexNodeFree,myNodeSections,myBoundFaces,myTolerance, thePI));
}
@@ -3737,8 +3737,8 @@ void BRepBuilderAPI_Sewing::Cutting(const Handle(Message_ProgressIndicator)& the
}
}
#ifdef OCCT_DEBUG
std::cout << "From " << nbBounds << " bounds " << myBoundSections.Extent()
<< " were cut into " << mySectionBound.Extent() << " sections" << std::endl;
cout << "From " << nbBounds << " bounds " << myBoundSections.Extent()
<< " were cut into " << mySectionBound.Extent() << " sections" << endl;
#endif
}
@@ -4364,8 +4364,8 @@ void BRepBuilderAPI_Sewing::ProjectPointsOnCurve(const TColgp_Array1OfPnt& arrPn
}
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
std::cout << "Exception in BRepBuilderAPI_Sewing::ProjectPointsOnCurve: ";
anException.Print(std::cout); std::cout << std::endl;
cout << "Exception in BRepBuilderAPI_Sewing::ProjectPointsOnCurve: ";
anException.Print(cout); cout << endl;
#endif
(void)anException;
worktol = MinTolerance();
@@ -4704,8 +4704,8 @@ void BRepBuilderAPI_Sewing::CreateSections(const TopoDS_Shape& section,
//}
/*catch (Standard_Failure) {
#ifdef OCCT_DEBUG
std::cout << "Exception in CreateSections: segment [" << par1 << "," << par2 << "]: ";
Standard_Failure::Caught()->Print(std::cout); std::cout << std::endl;
cout << "Exception in CreateSections: segment [" << par1 << "," << par2 << "]: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
Handle(Geom2d_TrimmedCurve) c2dT = new Geom2d_TrimmedCurve(c2dNew,Max(first2d,par1),Min(par2,last2d));
c2dNew = c2dT;
@@ -4746,7 +4746,7 @@ void BRepBuilderAPI_Sewing::SameParameterShape()
}
catch (Standard_Failure const&) {
#ifdef OCCT_DEBUG
std::cout << "Fail: BRepBuilderAPI_Sewing::SameParameterShape exception in BRepLib::SameParameter" << std::endl;
cout << "Fail: BRepBuilderAPI_Sewing::SameParameterShape exception in BRepLib::SameParameter" << endl;
#endif
continue;
}

View File

@@ -135,9 +135,9 @@ void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S)
}
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
std::cout<<"BRepCheck_Analyzer : ";
anException.Print(std::cout);
std::cout<<std::endl;
cout<<"BRepCheck_Analyzer : ";
anException.Print(cout);
cout<<endl;
#endif
(void)anException;
if ( ! myMap(S).IsNull() )
@@ -164,9 +164,9 @@ void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S)
}
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
std::cout<<"BRepCheck_Analyzer : ";
anException.Print(std::cout);
std::cout<<std::endl;
cout<<"BRepCheck_Analyzer : ";
anException.Print(cout);
cout<<endl;
#endif
(void)anException;
if ( ! myMap(S).IsNull() )
@@ -202,9 +202,9 @@ void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S)
}
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
std::cout<<"BRepCheck_Analyzer : ";
anException.Print(std::cout);
std::cout<<std::endl;
cout<<"BRepCheck_Analyzer : ";
anException.Print(cout);
cout<<endl;
#endif
(void)anException;
if ( ! myMap(S).IsNull() )
@@ -262,9 +262,9 @@ void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S)
}
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
std::cout<<"BRepCheck_Analyzer : ";
anException.Print(std::cout);
std::cout<<std::endl;
cout<<"BRepCheck_Analyzer : ";
anException.Print(cout);
cout<<endl;
#endif
(void)anException;
if ( ! myMap(S).IsNull() )
@@ -315,9 +315,9 @@ void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S)
}
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
std::cout<<"BRepCheck_Analyzer : ";
anException.Print(std::cout);
std::cout<<std::endl;
cout<<"BRepCheck_Analyzer : ";
anException.Print(cout);
cout<<endl;
#endif
(void)anException;
if ( ! myMap(S).IsNull() )
@@ -362,9 +362,9 @@ void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S)
}
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
std::cout<<"BRepCheck_Analyzer : ";
anException.Print(std::cout);
std::cout<<std::endl;
cout<<"BRepCheck_Analyzer : ";
anException.Print(cout);
cout<<endl;
#endif
(void)anException;
if ( ! myMap(S).IsNull() )
@@ -403,9 +403,9 @@ void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S)
}
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
std::cout<<"BRepCheck_Analyzer : ";
anException.Print(std::cout);
std::cout<<std::endl;
cout<<"BRepCheck_Analyzer : ";
anException.Print(cout);
cout<<endl;
#endif
(void)anException;
if ( ! myMap(S).IsNull() )

Some files were not shown because too many files have changed in this diff Show More