Compare commits
162 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
81fc70e33b | ||
|
4d597f3e2f | ||
|
3b6ffeaca7 | ||
|
176a795920 | ||
|
c58055adeb | ||
|
093a3fe5bb | ||
|
7581b642af | ||
|
6c4c45b0f9 | ||
|
4954e4970c | ||
|
32e849ebc9 | ||
|
e99816df7f | ||
|
7a280da946 | ||
|
b672545674 | ||
|
5c09f8e016 | ||
|
9070a59fce | ||
|
370101f340 | ||
|
9ed6494b47 | ||
|
50258e776a | ||
|
56689b2700 | ||
|
05aa616d6d | ||
|
dc858f4c5a | ||
|
e6afb53983 | ||
|
0d0c99de4d | ||
|
7a033414d5 | ||
|
f40644350e | ||
|
2eacd0b872 | ||
|
e525fd6ad2 | ||
|
f48cb55d33 | ||
|
15b2583e69 | ||
|
0da0275c18 | ||
|
b66f375869 | ||
|
6d1e872b4d | ||
|
e44b0af456 | ||
|
224f48fa0e | ||
|
18c066908f | ||
|
8ce97bc90b | ||
|
97f3782bb0 | ||
|
f87817bc03 | ||
|
9f984417b1 | ||
|
dace4784d1 | ||
|
c4fa1c2c62 | ||
|
e6ae74fd42 | ||
|
ea3193f52e | ||
|
bf961e3c29 | ||
|
d3dadd2392 | ||
|
d76b39abf1 | ||
|
7c441da0d1 | ||
|
e59839c8c2 | ||
|
c13de40280 | ||
|
4cf17e1c04 | ||
|
d1d3e057ca | ||
|
6662fe6313 | ||
|
9775fa6110 | ||
|
0c63f2f8b9 | ||
|
cfece3ef2e | ||
|
b0d96eb753 | ||
|
478ad1d19e | ||
|
1a0dfc1bfd | ||
|
59edf905b1 | ||
|
92345dc222 | ||
|
baaacd4683 | ||
|
ff2bd6ef48 | ||
|
8cc8a6925d | ||
|
cbdcce0d64 | ||
|
f114566d01 | ||
|
4d901cde7c | ||
|
650efe05be | ||
|
2a4611e19f | ||
|
472634fa06 | ||
|
2b3e2b780d | ||
|
06bc0a59fa | ||
|
89029d3342 | ||
|
624f732fb4 | ||
|
e4780e5287 | ||
|
25dfc507be | ||
|
f542b7bbf1 | ||
|
31211c6cfe | ||
|
2df785d7f1 | ||
|
61887a4ade | ||
|
9f2d973602 | ||
|
0f358da3e3 | ||
|
4eaaf9d812 | ||
|
952886f056 | ||
|
2dad173d8b | ||
|
712879c808 | ||
|
4e1bc39a81 | ||
|
2b73a1d19f | ||
|
0e9fe060f3 | ||
|
f63101c984 | ||
|
b09447ed89 | ||
|
7a59f4ce9f | ||
|
f2a88e54e8 | ||
|
c5ec75471a | ||
|
44fae8b193 | ||
|
810b672ff3 | ||
|
ec7c343f23 | ||
|
acc909a893 | ||
|
7755fe829e | ||
|
bda0b631c8 | ||
|
6cfc06f00d | ||
|
10ce324694 | ||
|
1209c1b923 | ||
|
465e686173 | ||
|
0577ae8ca4 | ||
|
9bcfd6f649 | ||
|
0fdbd10b91 | ||
|
e22105a97c | ||
|
77a11d3df1 | ||
|
400af1bcf6 | ||
|
5da3dfdf08 | ||
|
3b1a2e5158 | ||
|
731c9b5bc0 | ||
|
a8232603a0 | ||
|
0c5a6d479b | ||
|
b3d20c7f46 | ||
|
96fffdc609 | ||
|
5c20836e0d | ||
|
09f30297f4 | ||
|
ad03c23449 | ||
|
0a40a30da5 | ||
|
a20cce397a | ||
|
9f951ebc44 | ||
|
0f0f0c06d1 | ||
|
51663cb434 | ||
|
b6826918fe | ||
|
8613985b2a | ||
|
decdee7d3f | ||
|
06e06389ea | ||
|
4e66868ad7 | ||
|
a061150b0b | ||
|
1ef277c369 | ||
|
4b3d6eb1d2 | ||
|
09a4804444 | ||
|
ac0cdacd09 | ||
|
471b22dea3 | ||
|
eadea5ea03 | ||
|
24542bc056 | ||
|
5200cc4aa3 | ||
|
f838dac48b | ||
|
404c893694 | ||
|
0a8630615d | ||
|
3a4a396251 | ||
|
f79b19a17e | ||
|
640d5fe219 | ||
|
dbe54d10f9 | ||
|
4dba155d8e | ||
|
fcfda0392f | ||
|
4d9733588f | ||
|
2a79a1aeb4 | ||
|
20ef5652b7 | ||
|
fe1d4d6cff | ||
|
291fced1e6 | ||
|
a699468165 | ||
|
51db017972 | ||
|
483ce1bd89 | ||
|
b4327ba8df | ||
|
a148c938b0 | ||
|
8013367c92 | ||
|
b443d53628 | ||
|
a8b5267725 | ||
|
851f870162 | ||
|
e3cb774f2e |
3
.gitattributes
vendored
@@ -37,6 +37,9 @@
|
||||
*.vrml eol=lf
|
||||
*.md eol=lf
|
||||
*.natvis eol=lf
|
||||
*.fs eol=lf
|
||||
*.vs eol=lf
|
||||
*.glsl eol=lf
|
||||
FILES eol=lf
|
||||
PACKAGES eol=lf
|
||||
EXTERNLIB eol=lf
|
||||
|
@@ -37,6 +37,11 @@ endif()
|
||||
# the name of the project
|
||||
project (OCCT)
|
||||
|
||||
if (WIN32)
|
||||
add_definitions(-DUNICODE)
|
||||
add_definitions(-D_UNICODE)
|
||||
endif()
|
||||
|
||||
# include occt macros
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
@@ -333,6 +338,17 @@ if (WIN32)
|
||||
set (USE_D3D OFF CACHE BOOL "${USE_D3D_DESCR}")
|
||||
endif()
|
||||
|
||||
# Enable/Disable the floating point exceptions (FPE) during runtime.
|
||||
if (NOT BUILD_ENABLE_FPE_SIGNAL_HANDLER)
|
||||
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER OFF CACHE BOOL "${BUILD_ENABLE_FPE_SIGNAL_HANDLER_DESCR}" FORCE)
|
||||
endif()
|
||||
|
||||
if (BUILD_ENABLE_FPE_SIGNAL_HANDLER)
|
||||
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER 1)
|
||||
else()
|
||||
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER 0)
|
||||
endif()
|
||||
|
||||
# include the patched or original list of modules
|
||||
# list <MODULENAME>_TOOLKITS is created foreach module and contains its toolkits
|
||||
# list <OCCT_MODULES> will contain all modules
|
||||
@@ -583,6 +599,25 @@ else()
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_TBB")
|
||||
endif()
|
||||
|
||||
# EIGEN
|
||||
# search for CSF_EIGEN variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_EIGEN CAN_USE_EIGEN)
|
||||
|
||||
if (CAN_USE_EIGEN)
|
||||
set (USE_EIGEN OFF CACHE BOOL "${USE_EIGEN_DESCR}")
|
||||
|
||||
if (USE_EIGEN)
|
||||
add_definitions (-DHAVE_EIGEN)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/eigen")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EIGEN")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("USE_EIGEN")
|
||||
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EIGEN")
|
||||
endif()
|
||||
|
||||
# Doxygen
|
||||
if (BUILD_DOC_Overview)
|
||||
if (NOT DEFINED INSTALL_DOC_Overview)
|
||||
|
@@ -437,3 +437,4 @@ n IVtkDraw
|
||||
t TKIVtkDraw
|
||||
n Geom2dEvaluator
|
||||
t TKVCAF
|
||||
n XCAFView
|
71
adm/cmake/eigen.cmake
Normal file
@@ -0,0 +1,71 @@
|
||||
# eigen
|
||||
|
||||
# eigen directory
|
||||
if (NOT DEFINED 3RDPARTY_EIGEN_DIR)
|
||||
set (3RDPARTY_EIGEN_DIR "" CACHE PATH "The directory containing eigen")
|
||||
endif()
|
||||
|
||||
# search for eigen in user defined directory
|
||||
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
||||
if (NOT 3RDPARTY_EIGEN_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_DIR}")
|
||||
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" Eigen EIGEN_DIR_NAME)
|
||||
if (EIGEN_DIR_NAME)
|
||||
set (3RDPARTY_EIGEN_DIR "${3RDPARTY_DIR}/${EIGEN_DIR_NAME}" CACHE PATH "The directory containing eigen" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_EIGEN_INCLUDE_DIR)
|
||||
set (3RDPARTY_EIGEN_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the EIGEN")
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_EIGEN_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
|
||||
|
||||
set (HEADER_NAMES Eigen)
|
||||
|
||||
set (3RDPARTY_EIGEN_INCLUDE_DIR "3RDPARTY_EIGEN_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to Eigen header file" FORCE)
|
||||
|
||||
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
|
||||
find_path (3RDPARTY_EIGEN_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
||||
PATHS ${3RDPARTY_EIGEN_DIR}
|
||||
PATH_SUFFIXES include eigen3 include/eigen3
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_path (3RDPARTY_EIGEN_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
||||
PATH_SUFFIXES include eigen3 include/eigen3
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
endif()
|
||||
|
||||
# use default (CMake) EIGEN search
|
||||
if (NOT 3RDPARTY_EIGEN_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
|
||||
# use 3RDPARTY_FREETYPE_DIR if it is specified for freetype search
|
||||
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
|
||||
set (CACHED_EIGEN_DIR $ENV{Eigen3_DIR})
|
||||
set (ENV{Eigen3_DIR} "${3RDPARTY_EIGEN_DIR}")
|
||||
endif()
|
||||
|
||||
find_package(Eigen3 QUIET)
|
||||
|
||||
# restore ENV{Eigen3_DIR}
|
||||
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
|
||||
set (ENV{Eigen3_DIR} ${CACHED_EIGEN_DIR})
|
||||
endif()
|
||||
|
||||
if (${EIGEN3_FOUND})
|
||||
set (3RDPARTY_EIGEN_INCLUDE_DIR "${EIGEN3_INCLUDE_DIR}" CACHE PATH "the path to Eigen header file" FORCE)
|
||||
set (3RDPARTY_EIGEN_DIR "${EIGEN3_ROOT_DIR}" CACHE PATH "The directory containing eigen" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_EIGEN_INCLUDE_DIR AND EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_EIGEN_INCLUDE_DIR)
|
||||
|
||||
set (3RDPARTY_EIGEN_INCLUDE_DIR "" CACHE PATH "the path to Eigen header file" FORCE)
|
||||
endif()
|
||||
|
||||
# unset all redundant variables
|
||||
OCCT_CHECK_AND_UNSET(Eigen3_DIR)
|
@@ -34,7 +34,6 @@ if (WIN32)
|
||||
set (CSF_user32 "user32.lib")
|
||||
set (CSF_wsock32 "wsock32.lib")
|
||||
set (CSF_psapi "Psapi.lib")
|
||||
set (CSF_AviLibs "ws2_32.lib vfw32.lib")
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2)
|
||||
set (CSF_OpenGlLibs "libEGL.lib libGLESv2.lib")
|
||||
else()
|
||||
|
@@ -122,7 +122,14 @@ if(MINGW)
|
||||
add_definitions(-D_WIN32_WINNT=0x0501)
|
||||
# workaround bugs in mingw with vtable export
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")
|
||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
|
||||
elseif ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
|
||||
if (APPLE)
|
||||
# CLang can be used with both libstdc++ and libc++, however on OS X libstdc++ is outdated.
|
||||
set (CMAKE_CXX_FLAGS "-std=c++0x -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
|
||||
else()
|
||||
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
||||
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
|
@@ -219,7 +219,7 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
|
||||
message (STATUS "Info: ${USED_ITEM} from ${PROJECT_NAME} skipped due to it is empty")
|
||||
else() # get CSF_ value
|
||||
set (CURRENT_CSF ${${USED_ITEM}})
|
||||
if (NOT "${CURRENT_CSF}" STREQUAL "")
|
||||
if (NOT "x${CURRENT_CSF}" STREQUAL "x")
|
||||
# prepare a list from a string with whitespaces
|
||||
separate_arguments (CURRENT_CSF)
|
||||
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
|
||||
|
@@ -28,6 +28,11 @@ Applies only for Debug configuration.")
|
||||
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR
|
||||
"Append the postfix to names of output libraries")
|
||||
|
||||
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER_DESCR
|
||||
"Enable/Disable the floating point exceptions (FPE) during DRAW execution only.
|
||||
Corresponding environment variable (CSF_FPE) can be changed manually
|
||||
in custom.bat/sh scripts without regeneration by CMake.")
|
||||
|
||||
# install variables
|
||||
set (INSTALL_DIR_DESCR
|
||||
"The place where built OCCT libraries, headers, test cases (INSTALL_TEST_CASES variable),
|
||||
|
@@ -140,8 +140,11 @@ proc wokdep:gui:UpdateList {} {
|
||||
if { "$::HAVE_FREEIMAGE" == "true" } {
|
||||
wokdep:SearchFreeImage anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
if { "$::HAVE_FFMPEG" == "true" } {
|
||||
wokdep:SearchFFmpeg anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
if { "$::HAVE_GL2PS" == "true" } {
|
||||
wokdep:SearchGL2PS anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "gl2ps" "gl2ps.h" "gl2ps" {"gl2ps"}
|
||||
}
|
||||
if { "$::HAVE_TBB" == "true" } {
|
||||
wokdep:SearchTBB anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
@@ -152,6 +155,18 @@ proc wokdep:gui:UpdateList {} {
|
||||
if { "$::HAVE_VTK" == "true" } {
|
||||
wokdep:SearchVTK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
|
||||
if { "$::HAVE_ZLIB" == "true" } {
|
||||
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "zlib" "zlib.h" "zlib" {"zlib"}
|
||||
}
|
||||
if { "$::HAVE_LIBLZMA" == "true" } {
|
||||
set aCheckLib "lzma"
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aCheckLib "liblzma"
|
||||
}
|
||||
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "liblzma" "lzma.h" "$aCheckLib" {"lzma" "xz"}
|
||||
}
|
||||
|
||||
if { "$::CHECK_QT4" == "true" } {
|
||||
wokdep:SearchQt4 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
@@ -402,12 +417,20 @@ if { "$::tcl_platform(platform)" == "windows" } {
|
||||
checkbutton .myFrame.myChecks.myD3dCheck -offvalue "false" -onvalue "true" -variable HAVE_D3D -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myD3dLbl -text "Use Direct3D"
|
||||
}
|
||||
checkbutton .myFrame.myChecks.myFFmpegCheck -offvalue "false" -onvalue "true" -variable HAVE_FFMPEG -command wokdep:gui:UpdateList
|
||||
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.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"
|
||||
checkbutton .myFrame.myChecks.myVtkCheck -offvalue "false" -onvalue "true" -variable HAVE_VTK -command wokdep:gui:UpdateList
|
||||
|
||||
checkbutton .myFrame.myChecks.myZLibCheck -offvalue "false" -onvalue "true" -variable HAVE_ZLIB -command wokdep:gui:UpdateList
|
||||
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.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myQt4Lbl -text "Search Qt4"
|
||||
checkbutton .myFrame.myChecks.myJDKCheck -offvalue "false" -onvalue "true" -variable CHECK_JDK -command wokdep:gui:UpdateList
|
||||
@@ -499,23 +522,35 @@ grid .myFrame.myChecks.myFImageCheck -row $aCheckRowIter -column 0 -sticky e
|
||||
grid .myFrame.myChecks.myFImageLbl -row $aCheckRowIter -column 1 -sticky w
|
||||
grid .myFrame.myChecks.myTbbCheck -row $aCheckRowIter -column 2 -sticky e
|
||||
grid .myFrame.myChecks.myTbbLbl -row $aCheckRowIter -column 3 -sticky w
|
||||
grid .myFrame.myChecks.myQt4Check -row $aCheckRowIter -column 4 -sticky e
|
||||
grid .myFrame.myChecks.myQt4Lbl -row $aCheckRowIter -column 5 -sticky w
|
||||
grid .myFrame.myChecks.myGlesCheck -row $aCheckRowIter -column 6 -sticky e
|
||||
grid .myFrame.myChecks.myGlesLbl -row $aCheckRowIter -column 7 -sticky w
|
||||
if { "$::tcl_platform(os)" != "Darwin" } {
|
||||
grid .myFrame.myChecks.myGlesCheck -row $aCheckRowIter -column 4 -sticky e
|
||||
grid .myFrame.myChecks.myGlesLbl -row $aCheckRowIter -column 5 -sticky w
|
||||
}
|
||||
#grid .myFrame.myChecks.myOpenClCheck -row $aCheckRowIter -column 6 -sticky e
|
||||
#grid .myFrame.myChecks.myOpenClLbl -row $aCheckRowIter -column 7 -sticky w
|
||||
grid .myFrame.myChecks.myZLibCheck -row $aCheckRowIter -column 6 -sticky e
|
||||
grid .myFrame.myChecks.myZLibLbl -row $aCheckRowIter -column 7 -sticky w
|
||||
|
||||
grid .myFrame.myChecks.myGl2psCheck -row $aCheckRowIter -column 8 -sticky e
|
||||
grid .myFrame.myChecks.myGl2psLbl -row $aCheckRowIter -column 9 -sticky w
|
||||
|
||||
grid .myFrame.myChecks.myQt4Check -row $aCheckRowIter -column 10 -sticky e
|
||||
grid .myFrame.myChecks.myQt4Lbl -row $aCheckRowIter -column 11 -sticky w
|
||||
|
||||
incr aCheckRowIter
|
||||
grid .myFrame.myChecks.myGl2psCheck -row $aCheckRowIter -column 0 -sticky e
|
||||
grid .myFrame.myChecks.myGl2psLbl -row $aCheckRowIter -column 1 -sticky w
|
||||
grid .myFrame.myChecks.myFFmpegCheck -row $aCheckRowIter -column 0 -sticky e
|
||||
grid .myFrame.myChecks.myFFmpegLbl -row $aCheckRowIter -column 1 -sticky w
|
||||
grid .myFrame.myChecks.myVtkCheck -row $aCheckRowIter -column 2 -sticky e
|
||||
grid .myFrame.myChecks.myVtkLbl -row $aCheckRowIter -column 3 -sticky w
|
||||
grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 4 -sticky e
|
||||
grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 5 -sticky w
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
grid .myFrame.myChecks.myD3dCheck -row $aCheckRowIter -column 6 -sticky e
|
||||
grid .myFrame.myChecks.myD3dLbl -row $aCheckRowIter -column 7 -sticky w
|
||||
grid .myFrame.myChecks.myD3dCheck -row $aCheckRowIter -column 4 -sticky e
|
||||
grid .myFrame.myChecks.myD3dLbl -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
|
||||
grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 10 -sticky e
|
||||
grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 11 -sticky w
|
||||
|
||||
incr aCheckRowIter
|
||||
if { "$::tcl_platform(os)" == "Darwin" } {
|
||||
grid .myFrame.myChecks.myMacGLXCheck -row $aCheckRowIter -column 0 -sticky e
|
||||
|
@@ -43,16 +43,6 @@ if { "$tcl_platform(platform)" == "unix" } {
|
||||
|
||||
set SHORTCUT_HEADERS "ShortCut"
|
||||
|
||||
set HAVE_FREEIMAGE "false"
|
||||
set HAVE_GL2PS "false"
|
||||
set HAVE_TBB "false"
|
||||
set HAVE_D3D "false"
|
||||
set HAVE_GLES2 "false"
|
||||
set HAVE_OPENCL "false"
|
||||
set HAVE_VTK "false"
|
||||
set MACOSX_USE_GLX "false"
|
||||
set CHECK_QT4 "false"
|
||||
set CHECK_JDK "false"
|
||||
set PRODUCTS_PATH ""
|
||||
set CSF_OPT_INC [list]
|
||||
set CSF_OPT_LIB32 [list]
|
||||
@@ -66,51 +56,37 @@ if { "$tcl_platform(pointerSize)" == "4" } {
|
||||
if { [info exists ::env(ARCH)] } {
|
||||
set ARCH "$::env(ARCH)"
|
||||
}
|
||||
if { [info exists ::env(VCVER)] } {
|
||||
set VCVER "$::env(VCVER)"
|
||||
}
|
||||
if { [info exists ::env(VCVARS)] } {
|
||||
set VCVARS "$::env(VCVARS)"
|
||||
}
|
||||
|
||||
if { [info exists ::env(SHORTCUT_HEADERS)] } {
|
||||
set SHORTCUT_HEADERS "$::env(SHORTCUT_HEADERS)"
|
||||
if { $SHORTCUT_HEADERS == "true" } {
|
||||
set SHORTCUT_HEADERS "ShortCut"
|
||||
}
|
||||
}
|
||||
if { [info exists ::env(HAVE_FREEIMAGE)] } {
|
||||
set HAVE_FREEIMAGE "$::env(HAVE_FREEIMAGE)"
|
||||
|
||||
# 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_GL2PS HAVE_ZLIB HAVE_LIBLZMA HAVE_OPENCL CHECK_QT4 CHECK_JDK MACOSX_USE_GLX}
|
||||
foreach anEnvIter $THE_ENV_VARIABLES {
|
||||
set ${anEnvIter} "false"
|
||||
if { [info exists ::env(${anEnvIter})] } {
|
||||
set ${anEnvIter} "$::env(${anEnvIter})"
|
||||
}
|
||||
}
|
||||
if { [info exists ::env(HAVE_GL2PS)] } {
|
||||
set HAVE_GL2PS "$::env(HAVE_GL2PS)"
|
||||
# do not export platform-specific variables
|
||||
if { "$::tcl_platform(os)" == "Darwin" } {
|
||||
set HAVE_GLES2 ""
|
||||
} else {
|
||||
set MACOSX_USE_GLX ""
|
||||
if { "$tcl_platform(platform)" != "windows" } {
|
||||
set HAVE_D3D ""
|
||||
}
|
||||
}
|
||||
if { [info exists ::env(HAVE_TBB)] } {
|
||||
set HAVE_TBB "$::env(HAVE_TBB)"
|
||||
}
|
||||
if { [info exists ::env(HAVE_D3D)] } {
|
||||
set HAVE_D3D "$::env(HAVE_D3D)"
|
||||
}
|
||||
if { [info exists ::env(HAVE_GLES2)] } {
|
||||
set HAVE_GLES2 "$::env(HAVE_GLES2)"
|
||||
}
|
||||
if { [info exists ::env(HAVE_OPENCL)] } {
|
||||
set HAVE_OPENCL "$::env(HAVE_OPENCL)"
|
||||
}
|
||||
if { [info exists ::env(HAVE_VTK)] } {
|
||||
set HAVE_VTK "$::env(HAVE_VTK)"
|
||||
}
|
||||
if { [info exists ::env(MACOSX_USE_GLX)] } {
|
||||
set MACOSX_USE_GLX "$::env(MACOSX_USE_GLX)"
|
||||
}
|
||||
if { [info exists ::env(CHECK_QT4)] } {
|
||||
set CHECK_QT4 "$::env(CHECK_QT4)"
|
||||
}
|
||||
if { [info exists ::env(CHECK_JDK)] } {
|
||||
set CHECK_JDK "$::env(CHECK_JDK)"
|
||||
}
|
||||
if { [info exists ::env(PRODUCTS_PATH)] } {
|
||||
set PRODUCTS_PATH "$::env(PRODUCTS_PATH)"
|
||||
foreach anEnvIter {ARCH VCVER VCVARS PRODUCTS_PATH} {
|
||||
if { [info exists ::env(${anEnvIter})] } {
|
||||
set ${anEnvIter} "$::env(${anEnvIter})"
|
||||
}
|
||||
}
|
||||
|
||||
if { [info exists ::env(CSF_OPT_INC)] } {
|
||||
set CSF_OPT_INC [split "$::env(CSF_OPT_INC)" $::SYS_PATH_SPLITTER]
|
||||
}
|
||||
@@ -252,6 +228,83 @@ proc wokdep:Preferred {theList theCmpl theArch} {
|
||||
return [lindex [lsort -decreasing $aVeryShortList] 0]
|
||||
}
|
||||
|
||||
# Search library placement
|
||||
proc wokdep:SearchStandardLibrary {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64 theName theCheckHeader theCheckLib theCheckFolders} {
|
||||
upvar $theErrInc anErrInc
|
||||
upvar $theErrLib32 anErrLib32
|
||||
upvar $theErrLib64 anErrLib64
|
||||
upvar $theErrBin32 anErrBin32
|
||||
upvar $theErrBin64 anErrBin64
|
||||
|
||||
set isFound "true"
|
||||
set aHeaderPath [wokdep:SearchHeader "$theCheckHeader"]
|
||||
if { "$aHeaderPath" == "" } {
|
||||
set hasHeader false
|
||||
foreach aFolderIter $theCheckFolders {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{$aFolderIter}*] "$::VCVER" "$::ARCH" ]
|
||||
if { "$aPath" != "" && [file exists "$aPath/include/$theCheckHeader"] } {
|
||||
lappend ::CSF_OPT_INC "$aPath/include"
|
||||
set hasHeader true
|
||||
break
|
||||
}
|
||||
}
|
||||
if { !$hasHeader } {
|
||||
lappend anErrInc "Error: '$theCheckHeader' not found ($theName)"
|
||||
set isFound "false"
|
||||
}
|
||||
}
|
||||
|
||||
foreach anArchIter {64 32} {
|
||||
set aLibPath [wokdep:SearchLib "$theCheckLib" "$anArchIter"]
|
||||
if { "$aLibPath" == "" } {
|
||||
set hasLib false
|
||||
foreach aFolderIter $theCheckFolders {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{$aFolderIter}*] "$::VCVER" "$anArchIter" ]
|
||||
set aLibPath [wokdep:SearchLib "$theCheckLib" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aLibPath" != "" } {
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib"
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
|
||||
set hasLib true
|
||||
break
|
||||
}
|
||||
}
|
||||
if { !$hasLib } {
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}$theCheckLib.${::SYS_LIB_SUFFIX}' not found ($theName)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aDllPath [wokdep:SearchBin "$theCheckLib.dll" "$anArchIter"]
|
||||
if { "$aDllPath" == "" } {
|
||||
set hasDll false
|
||||
foreach aFolderIter $theCheckFolders {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{$aFolderIter}*] "$::VCVER" "$anArchIter" ]
|
||||
set aDllPath [wokdep:SearchBin "$theCheckLib.dll" "$anArchIter" "$aPath/bin"]
|
||||
if { "$aDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
|
||||
set hasDll true
|
||||
break
|
||||
} else {
|
||||
set aDllPath [wokdep:SearchBin "$theCheckLib.dll" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/lib"
|
||||
set hasDll true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if { !$hasDll } {
|
||||
lappend anErrBin$anArchIter "Error: '$theCheckLib.dll' not found ($theName)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "$isFound"
|
||||
}
|
||||
|
||||
# Search Tcl/Tk libraries placement
|
||||
proc wokdep:SearchTclTk {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
|
||||
upvar $theErrInc anErrInc
|
||||
@@ -489,8 +542,8 @@ proc wokdep:SearchFreeImage {theErrInc theErrLib32 theErrLib64 theErrBin32 theEr
|
||||
return "$isFound"
|
||||
}
|
||||
|
||||
# Search GL2PS library placement
|
||||
proc wokdep:SearchGL2PS {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
|
||||
# Search FFmpeg framework placement
|
||||
proc wokdep:SearchFFmpeg {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
|
||||
upvar $theErrInc anErrInc
|
||||
upvar $theErrLib32 anErrLib32
|
||||
upvar $theErrLib64 anErrLib64
|
||||
@@ -498,47 +551,30 @@ proc wokdep:SearchGL2PS {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin
|
||||
upvar $theErrBin64 anErrBin64
|
||||
|
||||
set isFound "true"
|
||||
set aGl2psHPath [wokdep:SearchHeader "gl2ps.h"]
|
||||
if { "$aGl2psHPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{gl2ps}*] "$::VCVER" "$::ARCH" ]
|
||||
if { "$aPath" != "" && [file exists "$aPath/include/gl2ps.h"] } {
|
||||
set aFFmpegHPath [wokdep:SearchHeader "libavutil/avutil.h"]
|
||||
if { "$aFFmpegHPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{ffmpeg}*] "$::VCVER" "$::ARCH" ]
|
||||
if { "$aPath" != "" && [file exists "$aPath/include/libavutil/avutil.h"] } {
|
||||
lappend ::CSF_OPT_INC "$aPath/include"
|
||||
} else {
|
||||
lappend anErrInc "Error: 'gl2ps.h' not found (GL2PS)"
|
||||
lappend anErrInc "Error: 'libavutil/avutil.h' not found (FFmpeg)"
|
||||
set isFound "false"
|
||||
}
|
||||
}
|
||||
|
||||
foreach anArchIter {64 32} {
|
||||
set aGl2psLibPath [wokdep:SearchLib "gl2ps" "$anArchIter"]
|
||||
if { "$aGl2psLibPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{gl2ps}*] "$::VCVER" "$anArchIter" ]
|
||||
set aGl2psLibPath [wokdep:SearchLib "gl2ps" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aGl2psLibPath" != "" } {
|
||||
set aFFmpegLibPath [wokdep:SearchLib "avutil" "$anArchIter"]
|
||||
if { "$aFFmpegLibPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{ffmpeg}*] "$::VCVER" "$anArchIter" ]
|
||||
set aFFmpegLibPath [wokdep:SearchLib "avutil" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aFFmpegLibPath" != "" } {
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib"
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
|
||||
} else {
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}gl2ps.${::SYS_LIB_SUFFIX}' not found (GL2PS)"
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}avutil.${::SYS_LIB_SUFFIX}' not found (FFmpeg)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aGl2psDllPath [wokdep:SearchBin "gl2ps.dll" "$anArchIter"]
|
||||
if { "$aGl2psDllPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{gl2ps}*] "$::VCVER" "$anArchIter" ]
|
||||
set aGl2psDllPath [wokdep:SearchBin "gl2ps.dll" "$anArchIter" "$aPath/bin"]
|
||||
if { "$aGl2psDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
|
||||
} else {
|
||||
set aGl2psDllPath [wokdep:SearchBin "gl2ps.dll" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aGl2psDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/lib"
|
||||
} else {
|
||||
lappend anErrBin$anArchIter "Error: 'gl2ps.dll' not found (GL2PS)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "$isFound"
|
||||
@@ -1075,15 +1111,13 @@ proc wokdep:SaveCustom {} {
|
||||
|
||||
puts $aFile ""
|
||||
puts $aFile "rem Optional 3rd-parties switches"
|
||||
puts $aFile "set HAVE_FREEIMAGE=$::HAVE_FREEIMAGE"
|
||||
puts $aFile "set HAVE_GL2PS=$::HAVE_GL2PS"
|
||||
puts $aFile "set HAVE_TBB=$::HAVE_TBB"
|
||||
puts $aFile "set HAVE_GLES2=$::HAVE_GLES2"
|
||||
puts $aFile "set HAVE_D3D=$::HAVE_D3D"
|
||||
puts $aFile "set HAVE_OPENCL=$::HAVE_OPENCL"
|
||||
puts $aFile "set HAVE_VTK=$::HAVE_VTK"
|
||||
puts $aFile "set CHECK_QT4=$::CHECK_QT4"
|
||||
puts $aFile "set CHECK_JDK=$::CHECK_JDK"
|
||||
foreach anEnvIter $::THE_ENV_VARIABLES {
|
||||
set aName ${anEnvIter}
|
||||
set aValue [set ::${anEnvIter}]
|
||||
if { "$aValue" != "" } {
|
||||
puts $aFile "set ${aName}=$aValue"
|
||||
}
|
||||
}
|
||||
|
||||
set aStringInc [join $::CSF_OPT_INC $::SYS_PATH_SPLITTER]
|
||||
puts $aFile ""
|
||||
@@ -1126,17 +1160,13 @@ proc wokdep:SaveCustom {} {
|
||||
|
||||
puts $aFile ""
|
||||
puts $aFile "# Optional 3rd-parties switches"
|
||||
puts $aFile "export HAVE_FREEIMAGE=$::HAVE_FREEIMAGE"
|
||||
puts $aFile "export HAVE_GL2PS=$::HAVE_GL2PS"
|
||||
puts $aFile "export HAVE_TBB=$::HAVE_TBB"
|
||||
puts $aFile "export HAVE_GLES2=$::HAVE_GLES2"
|
||||
puts $aFile "export HAVE_OPENCL=$::HAVE_OPENCL"
|
||||
puts $aFile "export HAVE_VTK=$::HAVE_VTK"
|
||||
if { "$::tcl_platform(os)" == "Darwin" } {
|
||||
puts $aFile "export MACOSX_USE_GLX=$::MACOSX_USE_GLX"
|
||||
foreach anEnvIter $::THE_ENV_VARIABLES {
|
||||
set aName ${anEnvIter}
|
||||
set aValue [set ::${anEnvIter}]
|
||||
if { "$aValue" != "" } {
|
||||
puts $aFile "export ${aName}=${aValue}"
|
||||
}
|
||||
}
|
||||
puts $aFile "export CHECK_QT4=$::CHECK_QT4"
|
||||
puts $aFile "export CHECK_JDK=$::CHECK_JDK"
|
||||
|
||||
set aStringInc [join $::CSF_OPT_INC $::SYS_PATH_SPLITTER]
|
||||
puts $aFile ""
|
||||
|
@@ -816,6 +816,7 @@ proc osutils:collectinc {theModules theIncPath} {
|
||||
}
|
||||
}
|
||||
|
||||
set allHeaderFiles {}
|
||||
if { $aCopyType == "shortcut" } {
|
||||
# template preparation
|
||||
if { ![file exists $::THE_CASROOT/adm/templates/header.in] } {
|
||||
@@ -829,9 +830,12 @@ proc osutils:collectinc {theModules theIncPath} {
|
||||
|
||||
# create and copy short-cut header files
|
||||
foreach anUnit $anUnits {
|
||||
set aHFiles [glob -nocomplain -dir $aCasRoot/src/$anUnit "*.h"]
|
||||
foreach aHeaderFile [concat [glob -nocomplain -dir $aCasRoot/src/$anUnit "*.\[hgl\]xx"] $aHFiles] {
|
||||
set aHeaderFileName [file tail $aHeaderFile]
|
||||
osutils:checksrcfiles ${anUnit}
|
||||
|
||||
set aHFiles [_get_used_files ${anUnit} true false]
|
||||
foreach aHeaderFile ${aHFiles} {
|
||||
set aHeaderFileName [lindex ${aHeaderFile} 1]
|
||||
lappend allHeaderFiles "${aHeaderFileName}"
|
||||
|
||||
regsub -all -- {@OCCT_HEADER_FILE_CONTENT@} $aHeaderTmpl "#include \"$aFromBuildIncToSrcPath/$anUnit/$aHeaderFileName\"" aShortCutHeaderFileContent
|
||||
|
||||
@@ -863,12 +867,15 @@ proc osutils:collectinc {theModules theIncPath} {
|
||||
} else {
|
||||
set nbcopied 0
|
||||
foreach anUnit $anUnits {
|
||||
set aHFiles [glob -nocomplain -dir $aCasRoot/src/$anUnit "*.h"]
|
||||
foreach aHeaderFile [concat [glob -nocomplain -dir $aCasRoot/src/$anUnit "*.\[hgl\]xx"] $aHFiles] {
|
||||
set aHeaderFileName [file tail $aHeaderFile]
|
||||
osutils:checksrcfiles ${anUnit}
|
||||
|
||||
set aHFiles [_get_used_files ${anUnit} true false]
|
||||
foreach aHeaderFile ${aHFiles} {
|
||||
set aHeaderFileName [lindex ${aHeaderFile} 1]
|
||||
lappend allHeaderFiles "${aHeaderFileName}"
|
||||
|
||||
# copy file only if target does not exist or is older than original
|
||||
set torig [file mtime $aHeaderFile]
|
||||
set torig [file mtime $aCasRoot/src/$anUnit/$aHeaderFileName]
|
||||
set tcopy 0
|
||||
if { [file isfile $anIncPath/$aHeaderFileName] } {
|
||||
set tcopy [file mtime $anIncPath/$aHeaderFileName]
|
||||
@@ -879,17 +886,26 @@ proc osutils:collectinc {theModules theIncPath} {
|
||||
if { $tcopy != 0 } {
|
||||
file delete -force "$theIncPath/$aHeaderFileName"
|
||||
}
|
||||
file link -hard $anIncPath/$aHeaderFileName $aHeaderFile
|
||||
file link -hard $anIncPath/$aHeaderFileName $aCasRoot/src/$anUnit/$aHeaderFileName
|
||||
} else {
|
||||
file copy -force $aHeaderFile $anIncPath/$aHeaderFileName
|
||||
file copy -force $aCasRoot/src/$anUnit/$aHeaderFileName $anIncPath/$aHeaderFileName
|
||||
}
|
||||
} elseif { $tcopy != $torig } {
|
||||
puts "Warning: file $anIncPath/$aHeaderFileName is newer than $aHeaderFile, not changed!"
|
||||
puts "Warning: file $anIncPath/$aHeaderFileName is newer than $aCasRoot/src/$anUnit/$aHeaderFileName, not changed!"
|
||||
}
|
||||
}
|
||||
}
|
||||
puts "Info: $nbcopied files updated"
|
||||
}
|
||||
|
||||
# remove header files not listed in FILES
|
||||
set anIncFiles [glob -tails -nocomplain -dir ${anIncPath} "*"]
|
||||
foreach anIncFile ${anIncFiles} {
|
||||
if { [lsearch -exact ${allHeaderFiles} ${anIncFile}] == -1 } {
|
||||
puts "Warning: file ${anIncPath}/${anIncFile} is not presented in the sources and will be removed from ${theIncPath}!"
|
||||
file delete -force "${theIncPath}/${anIncFile}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Generate header for VS solution file
|
||||
@@ -1154,7 +1170,7 @@ proc osutils:vcproj:readtemplate {theVcVer isexec} {
|
||||
set aVerExt "v${aVerExt}0"
|
||||
set aCmpl32 ""
|
||||
set aCmpl64 ""
|
||||
set aCharSet "MultiByte"
|
||||
set aCharSet "Unicode"
|
||||
if { $isexec } {
|
||||
set anExt "${anExt}x"
|
||||
set what "$what executable"
|
||||
@@ -1175,7 +1191,6 @@ proc osutils:vcproj:readtemplate {theVcVer isexec} {
|
||||
}
|
||||
set aCmpl${bitness} "[set aCmpl${bitness}]${indent}${UwpWinRt}"
|
||||
}
|
||||
set aCharSet "Unicode"
|
||||
}
|
||||
|
||||
foreach bitness {32 64} {
|
||||
@@ -1260,6 +1275,9 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
|
||||
set aLibsMap(CSF_FreeImagePlus) "freeimage"
|
||||
}
|
||||
}
|
||||
if { "$::HAVE_FFMPEG" == "true" } {
|
||||
set aLibsMap(CSF_FFmpeg) "avcodec avformat swscale avutil"
|
||||
}
|
||||
if { "$::HAVE_GL2PS" == "true" } {
|
||||
set aLibsMap(CSF_GL2PS) "gl2ps"
|
||||
}
|
||||
@@ -1273,6 +1291,12 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
|
||||
set aLibsMap(CSF_VTK) [osutils:vtkCsf "unix"]
|
||||
}
|
||||
}
|
||||
if { "$::HAVE_ZLIB" == "true" } {
|
||||
set aLibsMap(CSF_ZLIB) "zlib"
|
||||
}
|
||||
if { "$::HAVE_LIBLZMA" == "true" } {
|
||||
set aLibsMap(CSF_LIBLZMA) "liblzma"
|
||||
}
|
||||
|
||||
if { "$theOS" == "wnt" } {
|
||||
# WinAPI libraries
|
||||
@@ -1283,7 +1307,6 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
|
||||
set aLibsMap(CSF_opengl32) "opengl32"
|
||||
set aLibsMap(CSF_wsock32) "wsock32"
|
||||
set aLibsMap(CSF_netapi32) "netapi32"
|
||||
set aLibsMap(CSF_AviLibs) "ws2_32 vfw32"
|
||||
set aLibsMap(CSF_OpenGlLibs) "opengl32"
|
||||
if { "$::HAVE_GLES2" == "true" } {
|
||||
set aLibsMap(CSF_OpenGlLibs) "libEGL libGLESv2"
|
||||
@@ -3038,12 +3061,12 @@ proc osutils:xcdtk { theOutDir theToolKit theGuidsMap theIsStatic thePlatform {t
|
||||
if { "$thePlatform" == "ios" } {
|
||||
puts $aPbxprojFile "\t\t\t\t\"ARCHS\[sdk=iphoneos\*\]\" = \"\$(ARCHS_STANDARD)\";";
|
||||
puts $aPbxprojFile "\t\t\t\t\"ARCHS\[sdk=iphonesimulator\*\]\" = \"x86_64\";";
|
||||
puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";"
|
||||
puts $aPbxprojFile "\t\t\t\tCLANG_ENABLE_MODULES = YES;"
|
||||
puts $aPbxprojFile "\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;"
|
||||
}
|
||||
puts $aPbxprojFile "\t\t\t\tARCHS = \"\$(ARCHS_STANDARD_64_BIT)\";"
|
||||
puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";"
|
||||
puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";"
|
||||
puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++0x\";"
|
||||
puts $aPbxprojFile "\t\t\t\tCOPY_PHASE_STRIP = NO;"
|
||||
puts $aPbxprojFile "\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;"
|
||||
puts $aPbxprojFile "\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;"
|
||||
@@ -3081,12 +3104,12 @@ proc osutils:xcdtk { theOutDir theToolKit theGuidsMap theIsStatic thePlatform {t
|
||||
if { "$thePlatform" == "ios" } {
|
||||
puts $aPbxprojFile "\t\t\t\t\"ARCHS\[sdk=iphoneos\*\]\" = \"\$(ARCHS_STANDARD)\";";
|
||||
puts $aPbxprojFile "\t\t\t\t\"ARCHS\[sdk=iphonesimulator\*\]\" = \"x86_64\";";
|
||||
puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";"
|
||||
puts $aPbxprojFile "\t\t\t\tCLANG_ENABLE_MODULES = YES;"
|
||||
puts $aPbxprojFile "\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;"
|
||||
}
|
||||
puts $aPbxprojFile "\t\t\t\tARCHS = \"\$(ARCHS_STANDARD_64_BIT)\";"
|
||||
puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";"
|
||||
puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";"
|
||||
puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++0x\";"
|
||||
puts $aPbxprojFile "\t\t\t\tCOPY_PHASE_STRIP = YES;"
|
||||
puts $aPbxprojFile "\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;"
|
||||
puts $aPbxprojFile "\t\t\t\tGCC_ENABLE_OBJC_EXCEPTIONS = YES;"
|
||||
@@ -3324,3 +3347,35 @@ proc osutils:uwp:proj { theVcVer theProjTmpl } {
|
||||
|
||||
return ${theProjTmpl}
|
||||
}
|
||||
|
||||
# Report all files found in package directory but not listed in FILES
|
||||
proc osutils:checksrcfiles { theUnit } {
|
||||
global path
|
||||
set aCasRoot [file normalize ${path}]
|
||||
|
||||
if {![file isdirectory ${aCasRoot}]} {
|
||||
puts "OCCT directory is not defined correctly: ${aCasRoot}"
|
||||
return
|
||||
}
|
||||
|
||||
set anUnitAbsPath [file normalize "${aCasRoot}/src/${theUnit}"]
|
||||
|
||||
if {[file exists "${anUnitAbsPath}/FILES"]} {
|
||||
set aFilesFile [open "${anUnitAbsPath}/FILES" rb]
|
||||
set aFilesFileList [split [read ${aFilesFile}] "\n"]
|
||||
close ${aFilesFile}
|
||||
|
||||
set aFilesFileList [lsearch -inline -all -not -exact ${aFilesFileList} ""]
|
||||
|
||||
# report all files not listed in FILES
|
||||
set anAllFiles [glob -tails -nocomplain -dir ${anUnitAbsPath} "*"]
|
||||
foreach aFile ${anAllFiles} {
|
||||
if { "${aFile}" == "FILES" } {
|
||||
continue
|
||||
}
|
||||
if { [lsearch -exact ${aFilesFileList} ${aFile}] == -1 } {
|
||||
puts "Warning: file ${anUnitAbsPath}/${aFile} is not listed in ${anUnitAbsPath}/FILES!"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
|
||||
@@ -14,6 +15,7 @@ PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
|
||||
@@ -26,6 +28,7 @@ PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
|
||||
|
8
adm/templates/android.toolchain.config.cmake
Normal file
@@ -0,0 +1,8 @@
|
||||
# A toolchain file to configure a Makefile Generators or the Ninja generator to target Android for cross-compiling.
|
||||
# Set CMAKE_ANDROID_NDK variable equal to your Android NDK path.
|
||||
|
||||
set (CMAKE_SYSTEM_NAME Android)
|
||||
set (CMAKE_SYSTEM_VERSION 15) # API level
|
||||
set (CMAKE_ANDROID_ARCH_ABI armeabi-v7a)
|
||||
set (CMAKE_ANDROID_NDK "")
|
||||
set (CMAKE_ANDROID_STL_TYPE gnustl_shared)
|
@@ -2,6 +2,9 @@ echo off
|
||||
|
||||
if /I "%VCVER%" == "@COMPILER@" (
|
||||
if "%ARCH%" == "@COMPILER_BITNESS@" (
|
||||
rem set environment variables used by OCCT
|
||||
set CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
|
||||
set "TCL_DIR=@3RDPARTY_TCL_DLL_DIR@"
|
||||
set "TK_DIR=@3RDPARTY_TK_DLL_DIR@"
|
||||
set "FREETYPE_DIR=@3RDPARTY_FREETYPE_DLL_DIR@"
|
||||
|
@@ -2,6 +2,9 @@
|
||||
|
||||
if [ "$1" == "@BIN_LETTER@" ]; then
|
||||
if [ "$2" == "@COMPILER_BITNESS@" ]; then
|
||||
# set environment variables used by OCCT
|
||||
export CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
|
||||
export TCL_DIR="@3RDPARTY_TCL_LIBRARY_DIR@"
|
||||
export TK_DIR="@3RDPARTY_TK_LIBRARY_DIR@"
|
||||
export FREETYPE_DIR="@3RDPARTY_FREETYPE_LIBRARY_DIR@"
|
||||
|
@@ -4,6 +4,9 @@ rem CASDEB comes as third argument
|
||||
|
||||
if /I "%VCVER%" == "@COMPILER@" (
|
||||
if "%ARCH%" == "@COMPILER_BITNESS@" (
|
||||
rem set environment variables used by OCCT
|
||||
set CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
|
||||
set "TCL_DIR=@USED_3RDPARTY_TCL_DIR@"
|
||||
set "TK_DIR=@USED_3RDPARTY_TK_DIR@"
|
||||
set "FREETYPE_DIR=@USED_3RDPARTY_FREETYPE_DIR@"
|
||||
|
@@ -2,6 +2,9 @@
|
||||
|
||||
if [ "$1" == "@BIN_LETTER@" ]; then
|
||||
if [ "$2" == "@COMPILER_BITNESS@" ]; then
|
||||
# set environment variables used by OCCT
|
||||
export CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
|
||||
export TCL_DIR="@USED_3RDPARTY_TCL_DIR@"
|
||||
export TK_DIR="@USED_3RDPARTY_TK_DIR@"
|
||||
export FREETYPE_DIR="@USED_3RDPARTY_FREETYPE_DIR@"
|
||||
|
@@ -18,10 +18,13 @@ set "VCVARS="
|
||||
set "HAVE_TBB=false"
|
||||
set "HAVE_OPENCL=false"
|
||||
set "HAVE_FREEIMAGE=false"
|
||||
set "HAVE_FFMPEG=false"
|
||||
set "HAVE_GL2PS=false"
|
||||
set "HAVE_VTK=false"
|
||||
set "HAVE_GLES2=false"
|
||||
set "HAVE_D3D=false"
|
||||
set "HAVE_ZLIB=false"
|
||||
set "HAVE_LIBLZMA=false"
|
||||
set "CSF_OPT_INC="
|
||||
set "CSF_OPT_LIB32="
|
||||
set "CSF_OPT_LIB64="
|
||||
@@ -58,20 +61,16 @@ set "CSF_OPT_BIN64I=%CSF_OPT_BIN64%"
|
||||
rem ----- Optional 3rd-parties should be enabled by HAVE macros -----
|
||||
set "CSF_OPT_CMPL="
|
||||
set "PRODUCTS_DEFINES="
|
||||
if ["%HAVE_TBB%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_TBB"
|
||||
if ["%HAVE_OPENCL%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_OPENCL"
|
||||
if ["%HAVE_GL2PS%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GL2PS"
|
||||
if ["%HAVE_FREEIMAGE%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FREEIMAGE"
|
||||
if ["%HAVE_VTK%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_VTK"
|
||||
if ["%HAVE_GLES2%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GLES2"
|
||||
if ["%HAVE_D3D%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_D3D"
|
||||
if ["%HAVE_TBB%"] == ["true"] set "CSF_DEFINES=HAVE_TBB;%CSF_DEFINES%"
|
||||
if ["%HAVE_OPENCL%"] == ["true"] set "CSF_DEFINES=HAVE_OPENCL;%CSF_DEFINES%"
|
||||
if ["%HAVE_GL2PS%"] == ["true"] set "CSF_DEFINES=HAVE_GL2PS;%CSF_DEFINES%"
|
||||
if ["%HAVE_FREEIMAGE%"] == ["true"] set "CSF_DEFINES=HAVE_FREEIMAGE;%CSF_DEFINES%"
|
||||
if ["%HAVE_VTK%"] == ["true"] set "CSF_DEFINES=HAVE_VTK;%CSF_DEFINES%"
|
||||
if ["%HAVE_GLES2%"] == ["true"] set "CSF_DEFINES=HAVE_GLES2;%CSF_DEFINES%"
|
||||
if ["%HAVE_D3D%"] == ["true"] set "CSF_DEFINES=HAVE_D3D;%CSF_DEFINES%"
|
||||
if ["%HAVE_TBB%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_TBB" & set "CSF_DEFINES=HAVE_TBB;%CSF_DEFINES%"
|
||||
if ["%HAVE_OPENCL%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_OPENCL" & set "CSF_DEFINES=HAVE_OPENCL;%CSF_DEFINES%"
|
||||
if ["%HAVE_GL2PS%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GL2PS" & set "CSF_DEFINES=HAVE_GL2PS;%CSF_DEFINES%"
|
||||
if ["%HAVE_FREEIMAGE%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FREEIMAGE" & set "CSF_DEFINES=HAVE_FREEIMAGE;%CSF_DEFINES%"
|
||||
if ["%HAVE_FFMPEG%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FFMPEG" & set "CSF_DEFINES=HAVE_FFMPEG;%CSF_DEFINES%"
|
||||
if ["%HAVE_VTK%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_VTK" & set "CSF_DEFINES=HAVE_VTK;%CSF_DEFINES%"
|
||||
if ["%HAVE_GLES2%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GLES2" & set "CSF_DEFINES=HAVE_GLES2;%CSF_DEFINES%"
|
||||
if ["%HAVE_D3D%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_D3D" & set "CSF_DEFINES=HAVE_D3D;%CSF_DEFINES%"
|
||||
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%"
|
||||
|
||||
rem Eliminate VS warning
|
||||
if ["%CSF_DEFINES%"] == [""] set "CSF_DEFINES=;"
|
||||
|
@@ -10,9 +10,12 @@ export TARGET="";
|
||||
export HAVE_TBB="false";
|
||||
export HAVE_OPENCL="false";
|
||||
export HAVE_FREEIMAGE="false";
|
||||
export HAVE_FFMPEG="false";
|
||||
export HAVE_GL2PS="false";
|
||||
export HAVE_VTK="false";
|
||||
export HAVE_GLES2="false";
|
||||
export HAVE_ZLIB="false";
|
||||
export HAVE_LIBLZMA="false";
|
||||
export MACOSX_USE_GLX="false";
|
||||
export CSF_OPT_INC=""
|
||||
export CSF_OPT_LIB32=""
|
||||
@@ -91,28 +94,17 @@ fi
|
||||
export CSF_OPT_CMPL=""
|
||||
|
||||
# Optiona 3rd-parties should be enabled by HAVE macros
|
||||
if [ "$HAVE_TBB" == "true" ]; then
|
||||
export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_TBB"
|
||||
fi
|
||||
if [ "$HAVE_OPENCL" == "true" ]; then
|
||||
export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_OPENCL"
|
||||
fi
|
||||
if [ "$HAVE_FREEIMAGE" == "true" ]; then
|
||||
export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_FREEIMAGE"
|
||||
fi
|
||||
if [ "$HAVE_GL2PS" == "true" ]; then
|
||||
export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GL2PS"
|
||||
fi
|
||||
if [ "$HAVE_GLES2" == "true" ]; then
|
||||
export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GLES2"
|
||||
fi
|
||||
if [ "$HAVE_VTK" == "true" ]; then
|
||||
export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_VTK"
|
||||
fi
|
||||
if [ "$HAVE_TBB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_TBB"; fi
|
||||
if [ "$HAVE_OPENCL" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_OPENCL"; fi
|
||||
if [ "$HAVE_FREEIMAGE" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_FREEIMAGE"; fi
|
||||
if [ "$HAVE_FFMPEG" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_FFMPEG"; fi
|
||||
if [ "$HAVE_GL2PS" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GL2PS"; fi
|
||||
if [ "$HAVE_GLES2" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GLES2"; fi
|
||||
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
|
||||
# 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
|
||||
if [ "$MACOSX_USE_GLX" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DMACOSX_USE_GLX"; fi
|
||||
|
||||
# To split string into array
|
||||
aDelimBack=$IFS
|
||||
|
@@ -110,7 +110,7 @@
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>.\..\..\..\win32\__VCVER__\bin\__TKNAM__.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -158,7 +158,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>.\..\..\..\win32\__VCVER__\bind\__TKNAM__.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -205,7 +205,7 @@
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>.\..\..\..\win64\__VCVER__\bin\__TKNAM__.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -253,7 +253,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>.\..\..\..\win64\__VCVER__\bind\__TKNAM__.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
|
@@ -36,7 +36,7 @@
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\..\..\..\win32\vc7\bin\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
@@ -105,7 +105,7 @@
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\..\..\..\win32\vc7\bind\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
|
@@ -78,7 +78,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\..\..\..\win32\vc8\bin\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -178,7 +178,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\..\..\..\win32\vc8\bind\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -276,7 +276,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\..\..\..\win64\vc8\bin\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -376,7 +376,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\..\..\..\win64\vc8\bind\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
|
@@ -79,7 +79,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib vfw32.lib"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib"
|
||||
OutputFile=".\..\..\..\win32\vc9\bin\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -178,7 +178,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib vfw32.lib"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib"
|
||||
OutputFile=".\..\..\..\win32\vc9\bind\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -272,7 +272,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib vfw32.lib"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib"
|
||||
OutputFile=".\..\..\..\win64\vc9\bin\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -368,7 +368,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib vfw32.lib"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib"
|
||||
OutputFile=".\..\..\..\win64\vc9\bind\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
|
@@ -2,6 +2,7 @@
|
||||
BRepExtrema_OverlappedSubShapes BRepExtrema_MapOfIntegerPackedMapOfInteger
|
||||
ShapeConstruct_CompBezierCurves2dToBSplineCurve2d Convert_CompBezierCurves2dToBSplineCurve2d
|
||||
ShapeConstruct_CompBezierCurves2dToBSplineCurve Convert_CompBezierCurves2dToBSplineCurve
|
||||
Image_PixMap::Img Image_Format_
|
||||
|
||||
[tcollection]
|
||||
AdvApp2Var_SequenceOfNode
|
||||
|
0
samples/mfc/standard/04_Viewer3d/Data/carrelage1.gif → data/images/carrelage1.gif
Executable file → Normal file
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
0
samples/mfc/standard/04_Viewer3d/Data/chataignier.gif → data/images/chataignier.gif
Executable file → Normal file
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
0
samples/mfc/standard/04_Viewer3d/Data/cookerplate.gif → data/images/cookerplate.gif
Executable file → Normal file
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
0
samples/mfc/standard/04_Viewer3d/Data/plancher.gif → data/images/plancher.gif
Executable file → Normal file
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 188 KiB |
0
samples/mfc/standard/04_Viewer3d/Data/terrain.gif → data/images/terrain.gif
Executable file → Normal file
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
0
samples/mfc/standard/04_Viewer3d/Data/wallpaper.gif → data/images/wallpaper.gif
Executable file → Normal file
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
0
samples/mfc/standard/09_Animation/data/Box.brep → data/occ/Box.brep
Executable file → Normal file
0
samples/mfc/standard/09_Animation/data/MAT.brep → data/occ/MAT.brep
Executable file → Normal file
0
samples/mfc/standard/09_Animation/data/MAT.pnt → data/occ/MAT.pnt
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/Kitchen/MODERN_Chair_1.brep → data/occ/MODERN_Chair_1.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/Kitchen/MODERN_Cooker_1.brep → data/occ/MODERN_Cooker_1.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/Kitchen/MODERN_Cooker_1_opened.brep → data/occ/MODERN_Cooker_1_opened.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/Kitchen/MODERN_Exhaust_1.brep → data/occ/MODERN_Exhaust_1.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/Kitchen/MODERN_MVCooker_1.brep → data/occ/MODERN_MVCooker_1.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/Kitchen/MODERN_MVCooker_1_opened.brep → data/occ/MODERN_MVCooker_1_opened.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/Kitchen/MODERN_Refrigerator_1.brep → data/occ/MODERN_Refrigerator_1.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/Kitchen/MODERN_Refrigerator_1_opened.brep → data/occ/MODERN_Refrigerator_1_opened.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/Kitchen/MODERN_Sink_1.brep → data/occ/MODERN_Sink_1.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/Kitchen/MODERN_Sink_1_opened.brep → data/occ/MODERN_Sink_1_opened.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/Kitchen/MODERN_Table_1.brep → data/occ/MODERN_Table_1.brep
Executable file → Normal file
0
samples/mfc/standard/Data/Pump_Nut.brep → data/occ/Pump_Nut.brep
Executable file → Normal file
0
samples/mfc/standard/Data/Pump_TopCover.brep → data/occ/Pump_TopCover.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/Kitchen/Room.brep → data/occ/Room.brep
Executable file → Normal file
0
samples/mfc/standard/01_Geometry/Data/SurfaceFromPoints/sol1.dat → data/occ/SurfaceFromPoints/sol1.dat
Executable file → Normal file
0
samples/mfc/standard/01_Geometry/Data/SurfaceFromPoints/sol2.dat → data/occ/SurfaceFromPoints/sol2.dat
Executable file → Normal file
0
samples/mfc/standard/09_Animation/data/asahi.brep → data/occ/asahi.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/bottle.brep → data/occ/bottle.brep
Executable file → Normal file
0
samples/mfc/standard/03_Viewer2d/data/Face.BRep → data/occ/face2.brep
Executable file → Normal file
0
samples/mfc/standard/01_Geometry/Data/shell1.brep → data/occ/shell1.brep
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/Data/terrain.brep → data/occ/terrain.brep
Executable file → Normal file
0
samples/mfc/standard/Data/wedge_ok.brep → data/occ/wedge_ok.brep
Executable file → Normal file
@@ -10,32 +10,40 @@ The steps on Windows and Ubuntu are similar. There is the only one difference: m
|
||||
on Windows and native GNU make on Ubuntu.
|
||||
|
||||
Required tools (download and install if it is required):
|
||||
- CMake v3.0+ http://www.cmake.org/cmake/resources/software.html
|
||||
- Cross-compilation toolchain for CMake https://github.com/taka-no-me/android-cmake
|
||||
- CMake v3.7+ http://www.cmake.org/cmake/resources/software.html
|
||||
- Android NDK rev.10+ https://developer.android.com/tools/sdk/ndk/index.html
|
||||
- GNU Make: MinGW v4.82+ for Windows (http://sourceforge.net/projects/mingw/files/), GNU Make 4.0 for Ubuntu.
|
||||
|
||||
## Generation of makefiles
|
||||
|
||||
## Prerequisites
|
||||
|
||||
In toolchain file <i>$CASROOT/adm/templates/android.toolchain.config.cmake</i>:
|
||||
|
||||
- Set CMAKE_ANDROID_NDK variable equal to your Android NDK path.
|
||||
- Set CMAKE_ANDROID_STL_TYPE variable to specify which C++ standard library to use.
|
||||
|
||||
The default value of CMAKE_ANDROID_STL_TYPE is <i>gnustl_shared</i> (GNU libstdc++ Shared)
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image001.png}
|
||||
|
||||
## Generation of makefiles using CMake GUI tool
|
||||
Run GUI tool provided by CMake: cmake-gui
|
||||
|
||||
### Tools configuration
|
||||
- Specify the root folder of OCCT (<i>$CASROOT</i>, which contains *CMakelists.txt* file) by clicking **Browse Source**.
|
||||
- Specify the location (build folder) for Cmake generated project files by clicking **Browse Build**.
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image001.png}
|
||||
@figure{/dev_guides/building/android/images/android_image002.png}
|
||||
|
||||
Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project.
|
||||
|
||||
Select "MinGW MakeFiles" item from the list
|
||||
Select "MinGW Makefiles" item from the list
|
||||
- Choose "Specify toolchain file for cross-compiling"
|
||||
- Click "Next"
|
||||
@figure{/dev_guides/building/android/images/android_image002.png}
|
||||
|
||||
- Specify a toolchain file at the next dialog by android.toolchain.cmake . It is contained by cross-compilation toolchain for CMake
|
||||
- Click "Finish"
|
||||
@figure{/dev_guides/building/android/images/android_image003.png}
|
||||
|
||||
If ANDROID_NDK environment variable is not defined in current OS, add cache entry ANDROID_NDK (entry type is PATH) -- path to the NDK folder ("Add Entry" button)
|
||||
- Specify a toolchain file at the next dialog by <i>android.toolchain.config.cmake</i> . It is contained by cross-compilation toolchain for CMake
|
||||
- Click "Finish"
|
||||
@figure{/dev_guides/building/android/images/android_image004.png}
|
||||
|
||||
If on Windows the message is appeared: "CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles"
|
||||
@@ -46,18 +54,19 @@ specify **CMAKE_MAKE_PROGRAM** to mingw32-make executable.
|
||||
### OCCT Configuration
|
||||
|
||||
How to configure OCCT, see "OCCT Configuration" section of @ref occt_dev_guides__building_cmake "Building with CMake"
|
||||
taking into account the specific configuration variables for android:
|
||||
- ANDROID_ABI = armeabi-v7a
|
||||
- ANDROID_NATIVE_API_LEVEL = 15
|
||||
- ANDROID_NDK_LAYOUT is equal to CMAKE_BUILD_TYPE variable
|
||||
- **BUILD_MODULE_Draw = OFF**
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image006.png}
|
||||
|
||||
### Generation of makefiles
|
||||
|
||||
Click **Generate** button and wait until the generation process is finished.
|
||||
Then makefiles will appear in the build folder (e.g. <i> D:/tmp/occt-android </i>).
|
||||
Then makefiles will appear in the build folder (e.g. <i> D:/occt/build-android </i>).
|
||||
|
||||
## Generation of makefiles using CMake from the command line
|
||||
|
||||
Alternatively one may specify the values without a toolchain file:
|
||||
|
||||
> cmake -G "MinGW Makefiles" -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=D:/DevTools/android-ndk-r13b -DCMAKE_ANDROID_STL_TYPE=gnustl_shared -DCMAKE_SYSTEM_VERSION=15 -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_MAKE_PROGRAM=D:/DevTools/MinGW/bin/mingw32-make.exe -D3RDPARTY_DIR=D:/occt-3rdparty D:/occt
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image006.png}
|
||||
|
||||
## Building makefiles of OCCT
|
||||
|
||||
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 98 KiB |
@@ -60,7 +60,9 @@ Once the source and build directories are selected, "Configure" button should be
|
||||
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image002.png}
|
||||
|
||||
To build OCCT for Universal Windows Platform (UWP) specify the path to toolchain file for cross-compiling <i>d:/occt/adm/templates/uwp.toolchain.config.cmake</i>.
|
||||
To build OCCT for **Universal Windows Platform (UWP)** specify the path to toolchain file for cross-compiling <i>d:/occt/adm/templates/uwp.toolchain.config.cmake</i>.
|
||||
|
||||
Alternatively, if you are using CMake from the command line add options -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 .
|
||||
|
||||
**Note**: Universal Windows Platform (UWP) is supported only on "Visual Studio 14 2015". File <i>d:/occt/samples/xaml/ReadMe.md</i> describes the building procedure of XAML (UWP) sample.
|
||||
|
||||
@@ -98,6 +100,7 @@ The following table gives the full list of environment variables used at the con
|
||||
| BUILD_DOC_Overview | Boolean flag | Indicates whether OCCT overview documentation project should be created together with OCCT. It is not built together with OCCT. Checking this option leads to automatic search of Doxygen binaries. Its building calls Doxygen command to generate the documentation in HTML format |
|
||||
| BUILD_PATCH | Path | Points to the directory recognized as a "patch" for OCCT. If specified, the files from this directory take precedence over the corresponding native OCCT sources. This way you are able to introduce patches to Open CASCADE Technology not affecting the original source distribution |
|
||||
| BUILD_WITH_DEBUG | Boolean flag | Enables extended messages of many OCCT algorithms, usually printed to cout. These include messages on internal errors and special cases encountered, timing, etc. |
|
||||
| BUILD_ENABLE_FPE_SIGNAL_HANDLER | Boolean flag | Enable/Disable the floating point exceptions (FPE) during DRAW execution only. Corresponding environment variable (CSF_FPE) can be changed manually in custom.bat/sh scripts without regeneration by CMake. |
|
||||
| CMAKE_CONFIGURATION_TYPES | String | Semicolon-separated CMake configurations |
|
||||
| INSTALL_DIR | Path | Points to the installation directory. *INSTALL_DIR* is a synonym of *CMAKE_INSTALL_PREFIX*. The user can specify both *INSTALL_DIR* or *CMAKE_INSTALL_PREFIX* |
|
||||
| INSTALL_DIR_BIN | Path | Relative path to the binaries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_BIN}) |
|
||||
|
@@ -609,6 +609,8 @@ Draw[2]> checkplatform
|
||||
Windows
|
||||
~~~~~
|
||||
|
||||
Use procedure *checkdebugmode* to get the configuration. It returns 1 if current configuration is 'Debug', overwise returns 0.
|
||||
|
||||
* RegularExpression is a regular expression, which should be matched against the line indicating the problem in the script output.
|
||||
|
||||
Example:
|
||||
@@ -715,11 +717,24 @@ Possible options are:
|
||||
* 1 -- outputs only differences;
|
||||
* 2 -- additionally outputs the list of logs and directories present in one of directories only;
|
||||
* 3 -- (by default) additionally outputs progress messages;
|
||||
* <i>-image [filename]</i> - compare images and save the resulting log in specified file (<i>$dir1/diffimage-$dir2.log</i> by default)
|
||||
* <i>-cpu [filename]</i> - compare overall CPU and save the resulting log in specified file (<i>$dir1/diffcpu-$dir2.log</i> by default)
|
||||
* <i>-memory [filename]</i> - compare memory delta and save the resulting log in specified file (<i>$dir1/diffmemory-$dir2.log</i> by default)
|
||||
* <i>-highlight_percent \<value\></i> - highlight considerable (>value in %) deviations of CPU and memory (default value is 5%)
|
||||
|
||||
Example:
|
||||
|
||||
~~~~~
|
||||
Draw[]> testdiff results-CR12345-2012-10-10T08:00 results-master-2012-10-09T21:20
|
||||
Draw[]> testdiff results/CR12345-2012-10-10T08:00 results/master-2012-10-09T21:20
|
||||
~~~~~
|
||||
|
||||
Particular tests can generate additional data that need to be compared by *testdiff* command.
|
||||
For that, for each parameter to be controlled, the test should produce the line containing keyword "COUNTER* followed by arbitrary name of the parameter, then colon and numeric value of the parameter.
|
||||
|
||||
Example of test code:
|
||||
|
||||
~~~~~
|
||||
puts "COUNTER Memory heap usage at step 5: [meminfo h]"
|
||||
~~~~~
|
||||
|
||||
@section testmanual_5 APPENDIX
|
||||
@@ -1294,6 +1309,7 @@ Allowed options are:
|
||||
* <i>-s AREA</i> -- command *sprops*, computes the mass properties of all faces with a surface density of 1;
|
||||
* <i>-v VOLUME</i> -- command *vprops*, computes the mass properties of all solids with a density of 1;
|
||||
* <i>-eps EPSILON</i> -- the epsilon defines relative precision of computation;
|
||||
* <i>-deps DEPSILON</i> -- the epsilon defines relative precision to compare corresponding values;
|
||||
* <i>-equal SHAPE</i> -- compares area, volume and length of input shapes. Puts error if they are not equal;
|
||||
* <i>-notequal SHAPE</i> -- compares area, volume and length of input shapes. Puts error if they are equal.
|
||||
|
||||
|
@@ -887,7 +887,7 @@ void UserDrawObject::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrs
|
||||
aGroup->AddElement(anElem);
|
||||
|
||||
// invalidate bounding box of the scene
|
||||
thePrsMgr->StructureManager()->Update (thePrsMgr->StructureManager()->UpdateMode());
|
||||
thePrsMgr->StructureManager()->Update();
|
||||
}
|
||||
~~~~~
|
||||
|
||||
@@ -950,6 +950,11 @@ The related classes, e.g. *AIS_LocalContext*, and methods ( <i>AIS_InteractiveCo
|
||||
|
||||
The main functionality provided by Local Context - selection of object subparts - can be now used within Neutral Point without opening any Local Context.
|
||||
|
||||
The property *SelectionMode()* has been removed from the class *AIS_InteractiveObject*.
|
||||
This property contradicts to selection logic, since it is allowed to activate several Selection modes at once.
|
||||
Therefore keeping one selection mode as object field makes no sense.
|
||||
Applications that used this method should implement selection mode caching at application level, if it is necessary for some reason.
|
||||
|
||||
@subsection upgrade_occt700_separate_caf_visualisation Separation of visualization part from TKCAF
|
||||
|
||||
Visualization CAF attributes have been moved into a new toolkit *TKVCAF*.
|
||||
@@ -983,6 +988,13 @@ Textured objects now have the priority over the environment mapping.
|
||||
Redundant enumerations *V3d_TypeOfSurface* and *Graphic3d_TypeOfSurface*, class *OpenGl_SurfaceDetailState*, the corresponding methods from *Graphic3d_CView, OpenGl_ShaderManager, OpenGl_View, V3d_View* and *V3d_Viewer* have been deleted.
|
||||
Draw command *VSetTextureMode* has been deleted.
|
||||
|
||||
@subsection upgrade_occt700_wfshape Shape presentation builders
|
||||
|
||||
Presentation tools for building Wireframe presentation have been refactored to eliminate duplicated code and interfaces.
|
||||
Therefore, the following classes have been modified:
|
||||
* *StdPrs_WFDeflectionShape* and *Prs3d_WFShape* have been removed. *StdPrs_WFShape* should be used instead.
|
||||
* *StdPrs_ToolShadedShape* has been renamed to *StdPrs_ToolTriangulatedShape*.
|
||||
|
||||
@section upgrade_occt710 Upgrade to OCCT 7.1.0
|
||||
|
||||
@subsection upgrade_710_aspects Presentation attributes
|
||||
@@ -1103,3 +1115,116 @@ The following classes have been changed:
|
||||
* The last optional argument *RemoveInvalidFaces* has been removed from the constructor of class *BRepOffset_MakeOffset* and method *Initialize*.
|
||||
* The public method *BOPDS_DS::VerticesOnIn* has been renamed into *SubShapesOnIn* and the new output parameter *theCommonPB* has been added.
|
||||
|
||||
@section upgrade_occt720 Upgrade to OCCT 7.2.0
|
||||
|
||||
@subsection upgrade_720_removed Removed features
|
||||
|
||||
The following obsolete features have been removed:
|
||||
* *AIS_InteractiveContext::PreSelectionColor()*, *DefaultColor()*, *WasCurrentTouched()*, *ZDetection()*.
|
||||
These properties were unused, and therefore application should remove occurrences of these methods.
|
||||
* *AIS_InteractiveObject::SelectionPriority()*.
|
||||
These property was not implemented.
|
||||
|
||||
@subsection upgrade_occt720_correction_of_Offset_API Corrections in BRepOffset API
|
||||
|
||||
Class *BRepOffsetAPI_MakeOffsetShape*:
|
||||
* *BRepOffsetAPI_MakeOffsetShape::BRepOffsetAPI_MakeOffsetShape()* - constructor with parameters has been deleted.
|
||||
* *BRepOffsetAPI_MakeOffsetShape::PerformByJoin()* - method has been added. This method is old algorithm behaviour.
|
||||
|
||||
The code below shows new calling procedure:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
BRepOffsetAPI_MakeOffsetShape OffsetMaker;
|
||||
OffsetMaker.PerformByJoin(Shape, OffsetValue, Tolerance);
|
||||
NewShape = OffsetMaker.Shape();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Class *BRepOffsetAPI_MakeThickSolid*:
|
||||
* *BRepOffsetAPI_MakeThickSolid::BRepOffsetAPI_MakeThickSolid()* - constructor with parameters has been deleted.
|
||||
* *BRepOffsetAPI_MakeThickSolid::MakeThickSolidByJoin()* - method has been added. This method is old algorithm behaviour.
|
||||
|
||||
The code below shows new calling procedure:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
BRepOffsetAPI_MakeThickSolid BodyMaker;
|
||||
BodyMaker.MakeThickSolidByJoin(myBody, facesToRemove, -myThickness / 50, 1.e-3);
|
||||
myBody = BodyMaker.Shape();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@subsection upgrade_720_highlight Highlight style
|
||||
|
||||
Management of highlight attributes has been revised and might require modifications from application side:
|
||||
* New class *Graphic3d_PresentationAttributes* defining basic presentation attributes has been introduced.
|
||||
It's definition includes properties previously defined by class Graphic3d_HighlightStyle (*Color*, *Transparency*),
|
||||
and new properties (*Display mode*, *ZLayer*, optional *FillArea aspect*).
|
||||
* Class *Prs3d_Drawer* now inherits class *Graphic3d_PresentationAttributes*.
|
||||
So that overall presentation attributes are now split into two parts - Basic attributes and Detailed attributes.
|
||||
* Class *Graphic3d_HighlightStyle* has been dropped.
|
||||
It is now defined as a typedef to *Prs3d_Drawer*.
|
||||
Therefore, highlight style now also includes not only Basic presentation attributes, but also Detailed attributes
|
||||
which can be used by custom presentation builders.
|
||||
* Highlighting style defined by class *Graphic3d_PresentationAttributes* now provides more options:
|
||||
- *Graphic3d_PresentationAttributes::BasicFillAreaAspect()* property providing complete Material definition.
|
||||
This option, when defined, can be used instead of the pair Object Material + Highlight Color.
|
||||
- *Graphic3d_PresentationAttributes::ZLayer()* property specifying the Layer where highlighted presentation should be shown.
|
||||
This property can be set to Graphic3d_ZLayerId_UNKNOWN, which means that ZLayer of main presentation should be used instead.
|
||||
- *Graphic3d_PresentationAttributes::DisplayMode()* property specifying Display Mode for highlight presentation.
|
||||
* Since Highlight and Selection styles within *AIS_InteractiveContext* are now defined by *Prs3d_Drawer* inheriting from *Graphic3d_PresentationAttributes*,
|
||||
it is now possible to customize default highlight attributes like *Display Mode* and *ZLayer*, which previously could be defined only on Object level.
|
||||
* Properties *Prs3d_Drawer::HighlightStyle()* and *Prs3d_Drawer::SelectionStyle()* have been removed.
|
||||
Instead, *AIS_InteractiveObject* now defines *DynamicHilightAttributes()* for dynamic highlighting in addition to *HilightAttributes()* used for highlighting in selected state.
|
||||
* The following protected fields have been removed from class *AIS_InteractiveObject*:
|
||||
- *myOwnColor*, replaced by *myDrawer->Color()*
|
||||
- *myTransparency*, replaced by *myDrawer->Transparency()*
|
||||
- *myZLayer*, replaced by *myDrawer->ZLayer()*
|
||||
* The method *PrsMgr_PresentationManager::Unhighlight()* taking Display Mode as an argument has been marked deprecated.
|
||||
Implementation now performs unhighlighting of all highlighted presentation mode.
|
||||
|
||||
@subsection upgrade_720_implicit_viewer_update Elimination of implicit 3D Viewer updates
|
||||
|
||||
Most AIS_InteractiveContext methods are defined with a flag to update viewer immediatly or not.
|
||||
Within previous version of OCCT, this argument had default value TRUE.
|
||||
While immediate viewer updates are useful for beginners (the result is displayed as soon as possible),
|
||||
this approach is inefficent for batch viewer updates, and having default value as TRUE
|
||||
leaded to non-intended accidential updates which are difficult to find.
|
||||
|
||||
To avoid such issues, the interface has been modified and default value has been removed.
|
||||
Therefore, old application code should be updated to set the flag theToUpdateViewer explicitly
|
||||
to desired value (TRUE to preserve old previous behavior), if it was not already set.
|
||||
|
||||
The follow AIS_InteractiveContext methods have been changed:
|
||||
Display, Erase, EraseAll, DisplayAll, EraseSelected, DisplaySelected, ClearPrs, Remove, RemoveAll, Hilight,
|
||||
HilightWithColor, Unhilight, Redisplay, RecomputePrsOnly, Update, SetDisplayMode, UnsetDisplayMode, SetColor,
|
||||
UnsetColor, SetWidth, UnsetWidth, SetMaterial, UnsetMaterial, SetTransparency, UnsetTransparency,
|
||||
SetLocalAttributes, UnsetLocalAttributes, SetPolygonOffsets, SetTrihedronSize, SetPlaneSize, SetPlaneSize,
|
||||
SetDeviationCoefficient, SetDeviationAngle, SetAngleAndDeviation, SetHLRDeviationCoefficient,
|
||||
SetHLRDeviationAngle, SetHLRAngleAndDeviation, SetSelectedAspect, MoveTo, Select, ShiftSelect, SetSelected,
|
||||
UpdateSelected, AddOrRemoveSelected, HilightSelected, UnhilightSelected, ClearSelected, ResetOriginalState,
|
||||
SubIntensityOn, SubIntensityOff, FitSelected, EraseGlobal, ClearGlobal, ClearGlobalPrs.
|
||||
|
||||
In addition, the API for immediate viewer update has been removed from V3d_View and Graphic3d_StructureManager classes
|
||||
(enumerations *Aspect_TypeOfUpdate* and *V3d_TypeOfUpdate*):
|
||||
V3d::SetUpdateMode(), V3d::UpdateMode(), Graphic3d_StructureManager::SetUpdateMode(), Graphic3d_StructureManager::UpdateMode().
|
||||
|
||||
The argument theUpdateMode has been removed from methods Graphic3d_CView::Display(), Erase(), Update().
|
||||
Method Graphic3d_CView::Update() does not redraw the view and does not re-compute structures anymore.
|
||||
|
||||
The following Grid management methods within class V3d_Viewer do not implicitly redraw the viewer:
|
||||
ActivateGrid, DeactivateGrid, SetRectangularGridValues, SetCircularGridValues,
|
||||
RectangularGridGraphicValues, CircularGridGraphicValues, SetPrivilegedPlane, DisplayPrivilegedPlane.
|
||||
|
||||
@subsection upgrade_720_Result_Of_BOP_On_Containers Result of Boolean operations on containers
|
||||
|
||||
* The result of Boolean operations on arguments of collection types (WIRE/SHELL/COMPSOLID) is now filtered from duplicating containers.
|
||||
|
||||
@subsection upgrade_720_changes_methods Other changes
|
||||
|
||||
* Class GeomPlate_BuildPlateSurface accepts base class Adaptor3d_HCurve (instead of inherited Adaptor3d_HCurveOnSurface accepted earlier).
|
||||
* Types GeomPlate_Array1OfHCurveOnSurface and GeomPlate_HArray1OfHCurveOnSurface have been replaced with GeomPlate_Array1OfHCurve and GeomPlate_HArray1OfHCurve correspondingly (accept base class Adaptor3d_HCurve instead of Adaptor3d_HCurveOnSurface).
|
||||
* Enumeration *Image_PixMap::ImgFormat*, previously declared as nested enumeration within class *Image_PixMap*, has been moved to global namespace as *Image_Format* following OCCT coding rules.
|
||||
The enumeration values have suffix Image_Format_ and preserve previous name scheme for easy renaming of old values - e.g. Image_PixMap::ImgGray become Image_Format_Gray.
|
||||
Old definitions are preserved as depreacated aliases to the new ones.
|
||||
|
||||
@subsection upgrade_720_BOP_DataStructure BOP - Pairs of interfering indices
|
||||
|
||||
* The classes *BOPDS_PassKey* and *BOPDS_PassKeyBoolean* are too excessive and not used any more in Boolean Operations. To replace them the new *BOPDS_Pair* class has been implemented. Thus:
|
||||
- The method *BOPDS_DS::Interferences()* now returns the *BOPDS_MapOfPair*;
|
||||
- The method *BOPDS_Iterator::Value()* takes now only two parameters - the indices of interfering sub-shapes.
|
||||
|
@@ -175,23 +175,14 @@ Run this command without arguments to get help on supported options.
|
||||
@section OCCT_OVW_SECTION_5 Requirements
|
||||
|
||||
Open CASCADE Technology is designed to be highly portable and is known to
|
||||
work on wide range of platforms (UNIX, Linux, Windows, Mac OS X, Android).
|
||||
work on wide range of platforms.
|
||||
Current version is officially certified on Windows (IA-32 and x86-64),
|
||||
Linux (x86-64), MAC OS X (x86-64) and Android (4.0.4 armv7) platforms.
|
||||
Linux (x86-64), OS X / macOS (x86-64), Android (armv7 and x86), and
|
||||
iOS (armv7, arm64) platforms.
|
||||
|
||||
The tables below describe the recommended hardware and software configurations
|
||||
The tables below describe the recommended software configurations
|
||||
for which OCCT is certified to work.
|
||||
|
||||
@subsection overview_req_os Operating System
|
||||
|
||||
| OS | Versions |
|
||||
| --------- | ----------- |
|
||||
| Windows | 10, 8.1, 7 SP1, Vista SP2 |
|
||||
| Linux | Mandriva 2010, CentOS 6.3, Fedora 18, Ubuntu 14.10 - 15.10, Debian 6.0, Debian 7.0 |
|
||||
| OS X | 10.10 Yosemite / 10.9 Mavericks / 10.8 Mountain Lion / 10.7 Lion |
|
||||
| Android | 6.x, 5.x, 4.0.4+ |
|
||||
| iOS | iOS 7 |
|
||||
|
||||
@subsection overview_req_cpp C++ Compiler / IDE
|
||||
|
||||
| OS | Compiler |
|
||||
@@ -229,19 +220,14 @@ On desktop, 3D viewer for optimal performance requires graphics processing unit
|
||||
Ray tracing requires OpenGL 4.0+ or OpenGL 3.3+ with *GL_ARB_texture_buffer_object_rgb32* extension.
|
||||
Textures within ray tracing will be available only when *GL_ARB_bindless_texture extension* is provided by driver.
|
||||
|
||||
On mobile platforms, OpenGL ES 2.0+ is required for 3D viewer. The ray tracing is not yet available on mobile platforms.
|
||||
On mobile platforms, OpenGL ES 2.0+ is required for 3D viewer (OpenGL ES 3.1+ is recommended).
|
||||
The ray tracing is not yet available on mobile platforms.
|
||||
Some old hardware might be unable to execute complex GLSL programs (e.g. with high number of light sources, clipping planes).
|
||||
|
||||
The following table lists graphic cards tested to work with OCCT.
|
||||
|
||||
| Graphic card | Driver | OS | OpenGL (fixed pipeline) | OpenGL (shaders) | OpenGL (ray tracing) |
|
||||
| ---- | ---- | ---- | :----: | :----: | :----: |
|
||||
| NVIDIA GeForce GTX 650 | Driver 340.52, OpenGL 4.4 | Windows 7 64 bit | OK | OK | OK |
|
||||
| AMD/ATI RadeOn HD 7870 | Driver 14.100, OpenGL 4.4 | Windows 7 64-bit | OK | OK | OK |
|
||||
| Intel(R) HD Graphics 2500 | Driver 10.18.10.3621, OpenGL 4.0 | Windows 7 64 bit | OK | OK | limited (no textures) |
|
||||
| NVIDIA GeForce 320 | N/A | Mac OS X 10.6 / OS X 10.10 | OK | OK | not yet supported by OCCT |
|
||||
| Apple software OpenGL | N/A | Mac OS X 10.6 / OS X 10.10 | OK | OK | N/A |
|
||||
| Mesa 10.2.4 (software emulator) | "Gallium 0.4 on llvmpipe (LLVM 3.4, 256 bits)" OpenGL 3.0 | Windows 7 64 bit | OK | OK | unsupported by software |
|
||||
OCCT 3D Viewer, in general, supports wide range of graphics hardware - from very old to new.
|
||||
Therefore, if you observe some unexpected visual issues - first check for OpenGL driver update (or firmware update in case of mobile platforms);
|
||||
but beware that driver update might also come with new bugs.
|
||||
Don't forget to report these bugs to vendors.
|
||||
|
||||
@section OCCT_OVW_SECTION_4 Installation
|
||||
|
||||
|
@@ -484,10 +484,12 @@ The collection for shapes can be found in the *TopTools* package. As *BRepOffset
|
||||
facesToRemove.Append(faceToRemove);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
All the necessary data are now available so you can create your hollowed solid by calling the *BRepOffsetAPI_MakeThickSolid* constructor:
|
||||
All the necessary data are now available so you can create your hollowed solid by calling the *BRepOffsetAPI_MakeThickSolid* MakeThickSolidByJoin method:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
MyBody = BRepOffsetAPI_MakeThickSolid(myBody, facesToRemove, -myThickness / 50, 1.e-3);
|
||||
BRepOffsetAPI_MakeThickSolid BodyMaker;
|
||||
BodyMaker.MakeThickSolidByJoin(myBody, facesToRemove, -myThickness / 50, 1.e-3);
|
||||
myBody = BodyMaker.Shape();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -812,7 +814,9 @@ Complete definition of MakeBottle function (defined in the file src/MakeBottle.c
|
||||
|
||||
TopTools_ListOfShape facesToRemove;
|
||||
facesToRemove.Append(faceToRemove);
|
||||
myBody = BRepOffsetAPI_MakeThickSolid(myBody, facesToRemove, -myThickness / 50, 1.e-3);
|
||||
BRepOffsetAPI_MakeThickSolid BodyMaker;
|
||||
BodyMaker.MakeThickSolidByJoin(myBody, facesToRemove, -myThickness / 50, 1.e-3);
|
||||
myBody = BodyMaker.Shape();
|
||||
// Threading : Create Surfaces
|
||||
Handle(Geom_CylindricalSurface) aCyl1 = new Geom_CylindricalSurface(neckAx2, myNeckRadius * 0.99);
|
||||
Handle(Geom_CylindricalSurface) aCyl2 = new Geom_CylindricalSurface(neckAx2, myNeckRadius * 1.05);
|
||||
|
@@ -40,6 +40,8 @@ where:
|
||||
|
||||
**Note** There is an operation *Cut21*, which is an extension for forward Cut operation, i.e <i>Cut21=Cut(G2, G1)</i>.
|
||||
|
||||
For more details see @ref occt_algorithms_9 "Boolean Operations Algorithm" section.
|
||||
|
||||
@subsubsection occt_algorithms_2_1_2 General Fuse operator
|
||||
|
||||
The General fuse operator can be applied to an arbitrary number of arguments in terms of *TopoDS_Shape*.
|
||||
@@ -71,6 +73,8 @@ This Figure shows that
|
||||
|
||||
The fact that *R<sub>GF</sub>* contains the components of *R<sub>B</sub>* allows considering GFA as the general case of BOA. So it is possible to implement BOA as a subclass of GFA.
|
||||
|
||||
For more details see @ref occt_algorithms_7 "General Fuse Algorithm" section.
|
||||
|
||||
@subsubsection occt_algorithms_2_1_3 Partition operator
|
||||
|
||||
The Partition operator can be applied to an arbitrary number of arguments in terms of *TopoDS_Shape*. The arguments are divided on two groups: Objects, Tools. The result of PA contains all parts belonging to the Objects but does not contain the parts that belongs to the Tools only.
|
||||
@@ -99,6 +103,7 @@ For example, when *G<sub>1</sub>* consists of shapes *S<sub>1</sub>* and *S<sub>
|
||||
|
||||
The fact that the *R<sub>GF</sub>* contains the components of *R<sub>PA</sub>* allows considering GFA as the general case of PA. Thus, it is possible to implement PA as a subclass of GFA.
|
||||
|
||||
For more details see @ref occt_algorithms_8 "Partition Algorithm" section.
|
||||
|
||||
@subsubsection occt_algorithms_2_1_4 Section operator
|
||||
|
||||
@@ -109,6 +114,8 @@ The SA operator can be represented as follows:
|
||||
* <i>S1, S2 ... Sn</i> -- the operation arguments;
|
||||
* *n* -- the number of arguments.
|
||||
|
||||
For more details see @ref occt_algorithms_10a "Section Algorithm" section.
|
||||
|
||||
@subsection occt_algorithms_2_2 Parts of algorithms
|
||||
|
||||
GFA, BOA, PA and SA have the same Data Structure (DS). The main goal of the Data Structure is to store all necessary information for input data and intermediate results.
|
||||
@@ -1042,6 +1049,158 @@ The input data for this step is a *BOPAlgo_Builder* object after building result
|
||||
| 2 | Correct tolerances of edges on faces | *BOPTools_Tools::CorrectCurveOnSurface()* |
|
||||
|
||||
|
||||
@section occt_algorithms_8 Partition Algorithm
|
||||
|
||||
The Partition algorithm is a General Fuse (GF) based algorithm. It provides means to split the group of an arbitrary number of shapes of an arbitrary dimension by the other group of an arbitrary number of shapes of an arbitrary dimension.
|
||||
All the options of the GF algorithm, such as Fuzzy mode, safe mode, parallel mode, gluing mode and history support are also available in this algorithm.
|
||||
|
||||
@subsection occt_algorithms_8_1 Arguments
|
||||
|
||||
* The arguments of the Partition algorithms are divided on two groups - *Objects* and *Tools*;
|
||||
* The requirements for the arguments (both for *Objects* and *Tools*) are the same as for General Fuse algorithm - there could be any number of arguments of any type, but each argument should be valid and not self-interfered.
|
||||
|
||||
@subsection occt_algorithms_8_2 Results
|
||||
|
||||
* The result of Partition algorithm is similar to the result of General Fuse algorithm, but it contains only the split parts of the shapes included into the group of *Objects*;
|
||||
* Splits parts of the shapes included only into group of *Tools* are excluded from the result;
|
||||
* If there are no shapes in the group of *Tools* the result of the operation will be equivalent to the result of General Fuse operation.
|
||||
|
||||
@subsection occt_algorithms_8_3 Usage
|
||||
|
||||
@subsubsection occt_algorithms_8_3_1 API
|
||||
|
||||
On the low level the Partition algorithm is implemented in the class *BOPAlgo_Splitter*. The usage of this algorithm looks as follows:
|
||||
~~~~~
|
||||
BOPAlgo_Splitter aSplitter;
|
||||
BOPCol_ListOfShape aLSObjects = …; // Objects
|
||||
BOPCol_ListOfShape aLSTools = …; // Tools
|
||||
Standard_Boolean bRunParallel = Standard_False; /* parallel or single mode (the default value is FALSE)*/
|
||||
Standard_Real aTol = 0.0; /* fuzzy option (default value is 0)*/
|
||||
Standard_Boolean bSafeMode = Standard_False; /* protect or not the arguments from modification*/
|
||||
BOPAlgo_Glue aGlue = BOPAlgo_GlueOff; /* Glue option to speed up intersection of the arguments*/
|
||||
// setting arguments
|
||||
aSplitter.SetArguments(aLSObjects);
|
||||
aSplitter.SetTools(aLSTools);
|
||||
// setting options
|
||||
aSplitter.SetRunParallel(bRunParallel);
|
||||
aSplitter.SetFuzzyValue(aTol);
|
||||
aSplitter.SetNonDestructive(bSafeMode);
|
||||
aSplitter.SetGlue(aGlue);
|
||||
//
|
||||
aSplitter.Perform(); //perform the operation
|
||||
if (aSplitter.ErrorStatus()) { //check error status
|
||||
return;
|
||||
}
|
||||
//
|
||||
const TopoDS_Shape& aResult = aSplitter.Shape(); // result of the operation
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_algorithms_8_3_2 DRAW
|
||||
|
||||
For the usage of the Partition algorithm in DRAW the command *bsplit* is implemented. Similarly to the *bbuild* command (for the usage of the General Fuse algorithm) the *bsplit* command should be used after the Pave Filler is filled.
|
||||
~~~~~
|
||||
# s1 s2 s3 - objects
|
||||
# t1 t2 t3 - tools
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects s1 s2 s3
|
||||
baddtools t1 t2 t3
|
||||
bfillds
|
||||
bsplit result
|
||||
~~~~~
|
||||
|
||||
@subsection occt_algorithms_8_4 Examples
|
||||
|
||||
@subsubsection occt_algorithms_8_4_1 Example 1
|
||||
|
||||
Splitting face by the set of edges:
|
||||
|
||||
~~~~
|
||||
# draw script for reproducing
|
||||
bclearobjects
|
||||
bcleartools
|
||||
|
||||
set height 20
|
||||
cylinder cyl 0 0 0 0 0 1 10
|
||||
mkface f cyl 0 2*pi -$height $height
|
||||
baddobjects f
|
||||
|
||||
# create tool edges
|
||||
compound edges
|
||||
|
||||
set nb_uedges 10
|
||||
set pi2 [dval 2*pi]
|
||||
set ustep [expr $pi2/$nb_uedges]
|
||||
for {set i 0} {$i <= $pi2} {set i [expr $i + $ustep]} {
|
||||
uiso c cyl $i
|
||||
mkedge e c -25 25
|
||||
add e edges
|
||||
}
|
||||
|
||||
set nb_vedges 10
|
||||
set vstep [expr 2*$height/$nb_vedges]
|
||||
for {set i -20} {$i <= 20} {set i [expr $i + $vstep]} {
|
||||
viso c cyl $i
|
||||
mkedge e c
|
||||
add e edges
|
||||
}
|
||||
baddctools edges
|
||||
|
||||
bfillds
|
||||
bsplit result
|
||||
~~~~
|
||||
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td>@figure{/user_guides/boolean_operations/images/bsplit_image001.png, "Arguments"}</td>
|
||||
<td>@figure{/user_guides/boolean_operations/images/bsplit_image002.png, "Result"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@subsubsection occt_algorithms_8_4_2 Example 2
|
||||
|
||||
Splitting plate by the set of cylinders:
|
||||
|
||||
~~~~
|
||||
# draw script for reproducing:
|
||||
bclearobjects
|
||||
bcleartools
|
||||
|
||||
box plate 100 100 1
|
||||
baddobjects plate
|
||||
|
||||
pcylinder p 1 11
|
||||
compound cylinders
|
||||
for {set i 0} {$i < 101} {incr i 5} {
|
||||
for {set j 0} {$j < 101} {incr j 5} {
|
||||
copy p p1;
|
||||
ttranslate p1 $i $j -5;
|
||||
add p1 cylinders
|
||||
}
|
||||
}
|
||||
baddtools cylinders
|
||||
|
||||
bfillds
|
||||
bsplit result
|
||||
~~~~
|
||||
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td>@figure{/user_guides/boolean_operations/images/bsplit_image003.png, "Arguments"}</td>
|
||||
<td>@figure{/user_guides/boolean_operations/images/bsplit_image004.png, "Result"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@subsubsection occt_algorithms_8_4_3 Example 3
|
||||
|
||||
Splitting shell hull by the planes:
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td>@figure{/user_guides/boolean_operations/images/bsplit_image005.png, "Arguments"}</td>
|
||||
<td>@figure{/user_guides/boolean_operations/images/bsplit_image006.png, "Results"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@section occt_algorithms_9 Boolean Operations Algorithm
|
||||
|
||||
@subsection occt_algorithms_9_1 Arguments
|
||||
@@ -1080,9 +1239,11 @@ The input data for this step is a *BOPAlgo_Builder* object after building result
|
||||
* The result of the operation *Cut12* for arguments *S1* and *S2* contains the parts of argument *S1* that have state **OUT** relative to the opposite argument *S2*.
|
||||
* The result of the operation *Cut21* for arguments *S1* and *S2* contains the parts of argument *S2* that have state **OUT** relative to the opposite argument *S1*.
|
||||
* For the arguments of collection type (WIRE, SHELL, COMPSOLID) the type will be passed in the result. For example, the result of Common operation between Shell and Wire will be a compound containing Wire.
|
||||
* For the arguments of collection type (WIRE, SHELL, COMPSOLID) containing overlapping parts the overlapping parts passed into result will be repeated for each container from the input shapes containing such parts.
|
||||
* The result of the operation Fuse for the arguments of collection type (WIRE, SHELL, COMPSOLID) will contain the same number of containers as the arguments. The overlapping parts (EDGES/FACES/SOLIDS) will be shared among them. For example, the result of Fuse operation between two wires will be two wires sharing coinciding edges if any.
|
||||
* The result of the operation Common for the arguments of collection type (WIRE, SHELL, COMPSOLID) will consist of the containers containing the same overlapping parts. For example, the result of Common operation between two fully/partially overlapping wires will be two wires containing the same edges.
|
||||
* For the arguments of collection type (WIRE, SHELL, COMPSOLID) containing overlapping parts the overlapping parts passed into result will be repeated for each container from the input shapes containing such parts. The containers completely included in other containers will be avoided in the result.
|
||||
* For the arguments of collection type (WIRE, SHELL, COMPSOLID) the containers included into result will have the same orientation as the original containers from arguments. In case of duplication its orientation will be defined by the orientation of the first container in arguments. Each container included into result will have coherent orientation of its sub-shapes.
|
||||
* The result of the operation Fuse for the arguments of collection type (WIRE, SHELL) will consist of the shapes of the same collection type. The overlapping parts (EDGES/FACES) will be shared among containers, but duplicating containers will be avoided in the result. For example, the result of Fuse operation between two fully coinciding wires will be one wire, but the result of Fuse operation between two partially coinciding wires will be two wires sharing coinciding edges.
|
||||
* The result of the operation Fuse for the arguments of type COMPSOLID will consist of the compound containing COMPSOLIDs created from connexity blocks of fused solids.
|
||||
* The result of the operation Common for the arguments of collection type (WIRE, SHELL, COMPSOLID) will consist of the unique containers containing the overlapping parts. For example, the result of Common operation between two fully overlapping wires will be one wire containing all splits of edges. The number of wires in the result of Common operation between two partially overlapping wires will be equal to the number of connexity blocks of overlapping edges.
|
||||
|
||||
@subsection occt_algorithms_9_4 Examples
|
||||
|
||||
@@ -1555,7 +1716,7 @@ Let us consider two Wires that have overlapping edges, *W1* is the object and *W
|
||||
|
||||
@figure{/user_guides/boolean_operations/images/boolean_image140.png}
|
||||
|
||||
* The result of *Common* operation is a compound containing two Wires both consisting of an overlapping edge. The new Wires are created from the objects:
|
||||
* The result of *Common* operation is a compound containing one Wire consisting of an overlapping edge. The new Wire is created from the objects:
|
||||
|
||||
@figure{/user_guides/boolean_operations/images/boolean_image141.png}
|
||||
|
||||
@@ -1862,7 +2023,81 @@ Some aspects of building the result are described in the next paragraph
|
||||
| :---- | :---- | :------ |
|
||||
| 1 | Build the result of the operation using all information contained in *FaceInfo*, Common Block, Shared entities of the arguments, etc. | *BOPAlgo_Section:: BuildSection()* |
|
||||
|
||||
@section occt_algorithms_10b Volume Maker Algorithm
|
||||
|
||||
The Volume Maker algorithm has been designed for building the elementary volumes (solids) from a set of connected, intersecting, or nested shapes. The algorithm can also be useful for splitting solids into parts, or constructing new solid(s) from set of intersecting or connected faces or shells.
|
||||
The algorithm creates only closed solids. In general case the result solids are non-manifold: fragments of the input shapes (wires, faces) located inside the solids are added as internal sub-shapes to these solids.
|
||||
But the algorithm allows preventing the addition of the internal for solids parts into result. In this case the result solids will be manifold and not contain any internal parts. However, this option does not prevent from the occurrence of the internal edges or vertices in the faces.<br>
|
||||
Non-closed faces, free wires etc. located outside of any solid are always excluded from the result.
|
||||
|
||||
The Volume Maker algorithm is implemented in the class BOPAlgo_MakerVolume. It is based on the General Fuse (GF) algorithm. All the options of the GF algorithm such as possibility to run algorithm in parallel mode, fuzzy option, safe mode, glue options and history support are also available in this algorithm.
|
||||
|
||||
The requirements for the arguments are the same as for the arguments of GF algorithm - they could be of any type, but each argument should be valid and not self-interfered.
|
||||
|
||||
The algorithm allows disabling the calculation of intersections among the arguments. In this case the algorithm will run much faster, but the user should guarantee that the arguments do not interfere with each other, otherwise the result will be invalid (e.g. contain unexpected parts) or empty.
|
||||
This option is useful e.g. for building a solid from the faces of one shell or from the shapes that have already been intersected.
|
||||
|
||||
@subsection occt_algorithms_10b_1 Usage
|
||||
|
||||
#### C++ Level
|
||||
The usage of the algorithm on the API level:
|
||||
~~~~
|
||||
BOPAlgo_MakerVolume aMV;
|
||||
BOPCol_ListOfShape aLS = …; // arguments
|
||||
Standard_Boolean bRunParallel = Standard_False; /* parallel or single mode (the default value is FALSE)*/
|
||||
Standard_Boolean bIntersect = Standard_True; /* intersect or not the arguments (the default value is TRUE)*/
|
||||
Standard_Real aTol = 0.0; /* fuzzy option (default value is 0)*/
|
||||
Standard_Boolean bSafeMode = Standard_False; /* protect or not the arguments from modification*/
|
||||
BOPAlgo_Glue aGlue = BOPAlgo_GlueOff; /* Glue option to speed up intersection of the arguments*/
|
||||
Standard_Boolean bAvoidInternalShapes = Standard_False; /* Avoid or not the internal for solids shapes in the result*/
|
||||
//
|
||||
aMV.SetArguments(aLS);
|
||||
aMV.SetRunParallel(bRunParallel);
|
||||
aMV.SetIntersect(bIntersect);
|
||||
aMV.SetFuzzyValue(aTol);
|
||||
aMV.SetNonDestructive(bSafeMode);
|
||||
aMV.SetGlue(aGlue);
|
||||
aMV.SetAvoidInternalShapes(bAvoidInternalShapes);
|
||||
//
|
||||
aMV.Perform(); //perform the operation
|
||||
if (aMV.ErrorStatus()) { //check error status
|
||||
return;
|
||||
}
|
||||
//
|
||||
const TopoDS_Shape& aResult = aMV.Shape(); // result of the operation
|
||||
~~~~
|
||||
|
||||
#### Tcl Level
|
||||
To use the algorithm in Draw the command mkvolume has been implemented. The usage of this command is following:
|
||||
~~~~
|
||||
Usage: mkvolume r b1 b2 ... [-c] [-ni] [-ai]
|
||||
Options:
|
||||
-c - use this option to have input compounds considered as set of separate arguments (allows passing multiple arguments as one compound);
|
||||
-ni - use this option to disable the intersection of the arguments;
|
||||
-ai - use this option to avoid internal for solids shapes in the result.
|
||||
~~~~
|
||||
|
||||
@subsection occt_algorithms_10b_2 Examples
|
||||
|
||||
#### Example 1
|
||||
Creation of 9832 solids from sphere and set of 63 planes:
|
||||
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td>@figure{/user_guides/boolean_operations/images/mkvolume_image001.png, "Arguments"}</td>
|
||||
<td>@figure{/user_guides/boolean_operations/images/mkvolume_image002.png, "Results"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
#### Example 2
|
||||
Creating compartments on a ship defined by hull shell and a set of planes. The ship is divided on compartments by five transverse bulkheads and a deck – six compartments are created:
|
||||
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td>@figure{/user_guides/boolean_operations/images/mkvolume_image003.png, "Arguments"}</td>
|
||||
<td>@figure{/user_guides/boolean_operations/images/mkvolume_image004.png, "Results"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@section occt_algorithms_10 Algorithm Limitations
|
||||
|
||||
@@ -2100,10 +2335,10 @@ With the Fuzzy option it is possible to get the expected result -- it is just ne
|
||||
|
||||
Fuzzy option is included in interface of Intersection Part (class *BOPAlgo_PaveFiller*) and application programming interface (class *BRepAlgoAPI_BooleanOperation*)
|
||||
|
||||
@subsection occt_algorithms_11a_2 Examples
|
||||
@subsubsection occt_algorithms_11a_1_1 Examples
|
||||
The following examples demonstrate the advantages of usage Fuzzy option operations over the Basic Operations in typical situations.
|
||||
|
||||
@subsubsection occt_algorithms_11a_1_1 Case 1
|
||||
#### Case 1
|
||||
|
||||
In this example the cylinder (shown in yellow and transparent) is subtracted from the box (shown in red). The cylinder is shifted by 5e<sup>-5</sup> relatively to the box along its axis (the distance between rear faces of the box and cylinder is 5e<sup>-5</sup>).
|
||||
|
||||
@@ -2117,7 +2352,7 @@ The following results are obtained using Basic Operations and the Fuzzy ones wit
|
||||
|
||||
In this example Fuzzy option allows eliminating a very thin part of the result shape produced by Basic algorithm due to misalignment of rear faces of the box and the cylinder.
|
||||
|
||||
@subsubsection occt_algorithms_11a_1_2 Case 2
|
||||
#### Case 2
|
||||
|
||||
In this example two boxes are fused. One of them has dimensions 10*10*10, and the other is 10*10.000001*10.000001 and adjacent to the first one. There is no gap in this case as the surfaces of the neighboring faces coincide, but one box is slightly greater than the other.
|
||||
|
||||
@@ -2131,7 +2366,7 @@ The following results are obtained using Basic Operations and the Fuzzy ones wit
|
||||
|
||||
In this example Fuzzy option allows eliminating an extremely narrow face in the result produced by Basic operation.
|
||||
|
||||
@subsubsection occt_algorithms_11a_1_3 Case 3
|
||||
#### Case 3
|
||||
|
||||
In this example the small planar face (shown in orange) is subtracted from the big one (shown in yellow). There is a gap 1e<sup>-5</sup> between the edges of these faces.
|
||||
|
||||
@@ -2145,7 +2380,7 @@ The following results are obtained using Basic Operations and the Fuzzy ones wit
|
||||
|
||||
In this example Fuzzy options eliminated a pin-like protrusion resulting from the gap between edges of the argument faces.
|
||||
|
||||
@subsubsection occt_algorithms_11a_1_4 Case 4
|
||||
#### Case 4
|
||||
|
||||
In this example the small edge is subtracted from the big one. The edges are overlapping not precisely, with max deviation between them equal to 5.28004e<sup>-5</sup>. We will use 6e<sup>-5</sup> value for Fuzzy option.
|
||||
|
||||
@@ -2159,6 +2394,106 @@ The following results are obtained using Basic Operations and the Fuzzy ones wit
|
||||
|
||||
This example stresses not only the validity, but also the performance issue. The usage of Fuzzy option with the appropriate value allows processing the case much faster than with the pure Basic operation. The performance gain for the case is 45 (Processor: Intel(R) Core(TM) i5-3450 CPU @ 3.10 GHz).
|
||||
|
||||
@subsection occt_algorithms_11a_2 Gluing Operation
|
||||
|
||||
The Gluing operation is the option of the Basic Operations, such as General Fuse, Partition, Boolean, Section, Maker Volume operations.
|
||||
It has been designed to speed up the computation of the interferences among arguments of the operations on special cases, in which the arguments may be overlapping but do not have real intersections between their sub-shapes.
|
||||
|
||||
This option cannot be used on the shapes having real intersections, like intersection vertex between edges, or intersection vertex between edge and a face or intersection line between faces:
|
||||
@figure{/user_guides/boolean_operations/images/glue_options_image002.png, "Intersecting faces"}
|
||||
|
||||
There are two possibilities of overlapping shapes:
|
||||
* The shapes can be partially coinciding - the faces do not have intersection curves, but overlapping. The faces of such arguments will be split during the operation. The following picture illustrates such shapes:
|
||||
@figure{/user_guides/boolean_operations/images/glue_options_image001.png, "Partially coinciding faces"}
|
||||
* The shapes can be fully coinciding - there should be no partial overlapping of the faces, thus no intersection of type EDGE/FACE at all. In such cases the faces will not be split during the operation
|
||||
@figure{/user_guides/boolean_operations/images/glue_options_image003.png, "Full coinciding faces of the boxes"}
|
||||
|
||||
Thus, there are two possible options - for full and partial coincidence of the shapes.
|
||||
|
||||
Even though there are no real intersections on such cases without Gluing options the algorithm will still intersect the sub-shapes of the arguments with interfering bounding boxes.
|
||||
|
||||
The performance improvement in gluing mode is achieved by excluding the most time consuming computations and in some case can go up to 90%:
|
||||
* Exclude computation of FACE/FACE intersections for partial coincidence;
|
||||
* Exclude computation of VERTEX/FACE, EDGE/FACE and FACE/FACE intersections for full coincidence.
|
||||
|
||||
By setting the Gluing option for the operation user should guarantee that the arguments are really coinciding. The algorithm does not check this itself. Setting inappropriate option for the operation is likely to lead to incorrect result.
|
||||
|
||||
@subsubsection occt_algorithms_11a_2_1 Usage
|
||||
|
||||
The Gluing option is an enumeration implemented in BOPAlgo_GlueEnum.hxx:
|
||||
* BOPAlgo_GlueOff - default value for the algorithms, Gluing is switched off;
|
||||
* BOPAlgo_GlueShift - Glue option for shapes with partial coincidence;
|
||||
* BOPAlgo_GlueFull - Glue option for shapes with full coincidence.
|
||||
|
||||
#### API level
|
||||
For setting the Gluing options for the algorithm it is just necessary to call the SetGlue(const BOPAlgo_Glue) method with appropriate value:
|
||||
~~~~
|
||||
BOPAlgo_Builder aGF;
|
||||
//
|
||||
....
|
||||
// setting the gluing option to speed up intersection of the arguments
|
||||
aGF.SetGlue(BOPAlgo_GlueShift)
|
||||
//
|
||||
....
|
||||
~~~~
|
||||
|
||||
#### TCL level
|
||||
For setting the Gluing options in DRAW it is necessary to call the <i>bglue</i> command with appropriate value:
|
||||
* 0 - default value, Gluing is off;
|
||||
* 1 - for partial coincidence;
|
||||
* 2 - for full coincidence
|
||||
|
||||
~~~~
|
||||
bglue 1
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_algorithms_11a_2_2 Examples
|
||||
#### Case1 - Fusing the 64 bspline boxes into one solid
|
||||
@figure{/user_guides/boolean_operations/images/glue_options_image004.png, "BSpline Boxes with partial coincidence"}
|
||||
|
||||
Performance improvement from using the GlueShift option in this case is about 70 percent.
|
||||
|
||||
#### Case2 - Sewing faces of the shape after reading from IGES
|
||||
@figure{/user_guides/boolean_operations/images/glue_options_image005.png, "Faces with coinciding but not shared edges"}
|
||||
|
||||
Performance improvement in this case is also about 70 percent.
|
||||
|
||||
@subsection occt_algorithms_11a_3 Safe processing mode
|
||||
|
||||
The safe processing mode is the advanced option in Boolean Operation component. This mode can be applied to all Basic operations such as General Fuse, Partition, Boolean, Section, Maker Volume.
|
||||
This option allows keeping the input arguments untouched. In other words, switching this option on prevents the input arguments from any modification such as tolerance increase, addition of the P-Curves on edges etc.
|
||||
|
||||
The option might be very useful for implementation of the Undo/Redo mechanism in the applications and allows performing the operation many times without changing the inputs.
|
||||
|
||||
By default the safe processing option is switched off for the algorithms. Enabling this option might slightly decrease the performance of the operation, because instead of the modification of some entitiy it will be necessary to create the copy of this entitiy and modify it. But this degradation should be very small because the copying is performed only in case of necessity.
|
||||
|
||||
The option is also availible in the Intersection algorithm - *BOPAlgo_PaveFiller*. Thus, if it is necessary to perform several different operations on the same arguemnts, it is possible to enable the safe processing mode in PaveFiller and prepare it only once and then use it in operations. It is enough to set the option to PaveFiller only and all algorithms taking this PaveFiller will also work in safe mode.
|
||||
|
||||
@subsubsection occt_algorithms_11a_3_1 Usage
|
||||
|
||||
#### API level
|
||||
|
||||
To enable/disable the safe processing mode for the algorithm it is necessary to call the SetNonDestructive() method with appropriate value:
|
||||
~~~~
|
||||
BOPAlgo_Builder aGF;
|
||||
//
|
||||
....
|
||||
// enabling the safe processing mode to prevent modification of the input shapes
|
||||
aGF.SetNonDestructive(Standard_True);
|
||||
//
|
||||
....
|
||||
~~~~
|
||||
|
||||
#### TCL level
|
||||
For enabling the safe processing mode for the operaton in DRAW it is necessary to call the <i>bnondestructive</i> command with appropriate value:
|
||||
* 0 - default value, the safe mode is switched off;
|
||||
* 1 - the safe mode will be switched on.
|
||||
|
||||
~~~~
|
||||
bnondestructive 1
|
||||
~~~~
|
||||
|
||||
|
||||
@section occt_algorithms_11b Usage
|
||||
|
||||
The chapter contains some examples of the OCCT Boolean Component usage. The usage is possible on two levels: C++ and Tcl.
|
||||
@@ -2170,13 +2505,14 @@ The package *BRepAlgoAPI* provides the Application Programming Interface of the
|
||||
The package consists of the following classes:
|
||||
* *BRepAlgoAPI_Algo* -- the root class that provides the interface for algorithms.
|
||||
* *BRepAlgoAPI_BuilderAlgo* -- the class API level of General Fuse algorithm.
|
||||
* *BRepAlgoAPI_Splitter* -- the class API level of the Partition algorithm.
|
||||
* *BRepAlgoAPI_BooleanOperation* -- the root class for the classes *BRepAlgoAPI_Fuse*. *BRepAlgoAPI_Common*, *BRepAlgoAPI_Cut* and *BRepAlgoAPI_Section*.
|
||||
* *BRepAlgoAPI_Fuse* -- the class provides Boolean fusion operation.
|
||||
* *BRepAlgoAPI_Common* -- the class provides Boolean common operation.
|
||||
* *BRepAlgoAPI_Cut* -- the class provides Boolean cut operation.
|
||||
* *BRepAlgoAPI_Section* -- the class provides Boolean section operation.
|
||||
|
||||
@figure{/user_guides/boolean_operations/images/operations_image065.svg, "Diagram of BRepAlgoAPI package"}
|
||||
@figure{/user_guides/boolean_operations/images/operations_image065.png, "Diagram of BRepAlgoAPI package"}
|
||||
|
||||
The detailed description of the classes can be found in the corresponding .hxx files. The examples are below in this chapter.
|
||||
|
||||
@@ -2184,11 +2520,12 @@ The detailed description of the classes can be found in the corresponding .hxx f
|
||||
The package *BOPTest* provides the usage of the Boolean Component on Tcl level. The method *BOPTest::APICommands* contains corresponding Tcl commands:
|
||||
|
||||
* *bapibuild* -- for General Fuse Operator;
|
||||
* *bapisplit* -- for Partition Operator;
|
||||
* *bapibop* -- for Boolean Operator and Section Operator.
|
||||
|
||||
The examples of how to use the commands are below in this chapter.
|
||||
|
||||
@subsubsection occt_algorithms_11b_2_1 Case 1 General Fuse operation
|
||||
@subsubsection occt_algorithms_11b_2_1 Case 1. General Fuse operation
|
||||
|
||||
The following example illustrates how to use General Fuse operator:
|
||||
|
||||
@@ -2222,6 +2559,19 @@ The following example illustrates how to use General Fuse operator:
|
||||
// if aFuzzyValue>0.: the Fuzzy option is on
|
||||
aBuilder.SetFuzzyValue(aFuzzyValue);
|
||||
//
|
||||
// safe mode - avoid modification of the arguments
|
||||
Standard_Boolean bSafeMode = Standard_True;
|
||||
// if bSafeMode == Standard_True - the safe mode is switched on
|
||||
// if bSafeMode == Standard_False - the safe mode is switched off
|
||||
aBuilder.SetNonDestructive(bSafeMode);
|
||||
//
|
||||
// gluing options - for coinciding arguments
|
||||
BOPAlgo_GlueEnum aGlueOpt = BOPAlgo_GlueFull;
|
||||
// if aGlueOpt == BOPAlgo_GlueOff - the gluing mode is switched off
|
||||
// if aGlueOpt == BOPAlgo_GlueShift - the gluing mode is switched on
|
||||
// if aGlueOpt == BOPAlgo_GlueFull - the gluing mode is switched on
|
||||
aBuilder.SetGlue(aGlueOpt);
|
||||
//
|
||||
// run the algorithm
|
||||
aBuilder.Build();
|
||||
iErr=aBuilder.ErrorStatus();
|
||||
@@ -2253,17 +2603,137 @@ baddobjects b1 b2 b3
|
||||
# 1: the parallel processing is switched on
|
||||
# 0: the parallel processing is switched off
|
||||
brunparallel 1
|
||||
#
|
||||
# set Fuzzy value
|
||||
# 0. : the Fuzzy option is off
|
||||
# >0. : the Fuzzy option is on
|
||||
bfuzzyvalue 0.
|
||||
#
|
||||
# set safe processing mode
|
||||
bnondestructive 1
|
||||
# set safe mode
|
||||
# 1 - the safe processing mode is switched on
|
||||
# 0 - the safe processing mode is switched off
|
||||
#
|
||||
# set gluing mode
|
||||
bglue 1
|
||||
# set the gluing mode
|
||||
# 1 or 2 - the gluing mode is switched on
|
||||
# 0 - the gluing mode is switched off
|
||||
#
|
||||
# run the algorithm
|
||||
# r is the result of the operation
|
||||
bapibuild r
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_algorithms_11b_2_2 Case 2. Common operation
|
||||
@subsubsection occt_algorithms_11b_2_2 Case 2. Partition operation
|
||||
|
||||
The following example illustrates how to use the Partition operator:
|
||||
|
||||
#### C++ Level
|
||||
|
||||
~~~~
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <BRepAlgoAPI_Splitter.hxx>
|
||||
//
|
||||
BRepAlgoAPI_BuilderAlgo aSplitter;
|
||||
//
|
||||
// prepare the arguments
|
||||
// objects
|
||||
TopTools_ListOfShape& aLSObjects = … ;
|
||||
// tools
|
||||
TopTools_ListOfShape& aLSTools = … ;
|
||||
//
|
||||
// set the arguments
|
||||
aSplitter.SetArguments(aLSObjects);
|
||||
aSplitter.SetTools(aLSTools);
|
||||
//
|
||||
// set options
|
||||
// parallel processing mode
|
||||
Standard_Boolean bRunParallel = Standard_True;
|
||||
// bRunParallel == Standard_True - the parallel processing is switched on
|
||||
// bRunParallel == Standard_False - the parallel processing is switched off
|
||||
aSplitter.SetRunParallel();
|
||||
//
|
||||
// fuzzy value - additional tolerance for the operation
|
||||
Standard_Real aFuzzyValue = 1.e-5;
|
||||
// if aFuzzyValue == 0. - the Fuzzy option is off
|
||||
// if aFuzzyValue > 0. - the Fuzzy option is on
|
||||
aSplitter.SetFuzzyValue(aFuzzyValue);
|
||||
//
|
||||
// safe mode - avoid modification of the arguments
|
||||
Standard_Boolean bSafeMode = Standard_True;
|
||||
// if bSafeMode == Standard_True - the safe mode is switched on
|
||||
// if bSafeMode == Standard_False - the safe mode is switched off
|
||||
aSplitter.SetNonDestructive(bSafeMode);
|
||||
//
|
||||
// gluing options - for coinciding arguments
|
||||
BOPAlgo_GlueEnum aGlueOpt = BOPAlgo_GlueFull;
|
||||
// if aGlueOpt == BOPAlgo_GlueOff - the gluing mode is switched off
|
||||
// if aGlueOpt == BOPAlgo_GlueShift - the gluing mode is switched on
|
||||
// if aGlueOpt == BOPAlgo_GlueFull - the gluing mode is switched on
|
||||
aSplitter.SetGlue(aGlueOpt);
|
||||
//
|
||||
// run the algorithm
|
||||
aSplitter.Build();
|
||||
// check error status
|
||||
if (aSplitter.ErrorStatus()) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
// result of the operation aResult
|
||||
const TopoDS_Shape& aResult = aSplitter.Shape();
|
||||
~~~~
|
||||
|
||||
#### Tcl Level
|
||||
|
||||
~~~~
|
||||
# prepare the arguments
|
||||
# objects
|
||||
box b1 10 10 10
|
||||
box b2 7 0 0 10 10 10
|
||||
|
||||
# tools
|
||||
plane p 10 5 5 0 1 0
|
||||
mkface f p -20 20 -20 20
|
||||
#
|
||||
# clear inner contents
|
||||
bclearobjects; bcleartools;
|
||||
#
|
||||
# set the objects
|
||||
baddobjects b1 b2
|
||||
# set the tools
|
||||
baddtools f
|
||||
#
|
||||
# set parallel processing mode
|
||||
# 1: the parallel processing is switched on
|
||||
# 0: the parallel processing is switched off
|
||||
brunparallel 1
|
||||
#
|
||||
# set Fuzzy value
|
||||
# 0. : the Fuzzy option is off
|
||||
# >0. : the Fuzzy option is on
|
||||
bfuzzyvalue 0.
|
||||
#
|
||||
# set safe processing mode
|
||||
bnondestructive 1
|
||||
# set safe mode
|
||||
# 1 - the safe processing mode is switched on
|
||||
# 0 - the safe processing mode is switched off
|
||||
#
|
||||
# set gluing mode
|
||||
bglue 1
|
||||
# set the gluing mode
|
||||
# 1 or 2 - the gluing mode is switched on
|
||||
# 0 - the gluing mode is switched off
|
||||
#
|
||||
# run the algorithm
|
||||
# r is the result of the operation
|
||||
bapisplit r
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_algorithms_11b_2_3 Case 3. Common operation
|
||||
|
||||
The following example illustrates how to use Common operation:
|
||||
|
||||
@@ -2300,6 +2770,19 @@ The following example illustrates how to use Common operation:
|
||||
// if aFuzzyValue>0.: the Fuzzy option is on
|
||||
aBuilder.SetFuzzyValue(aFuzzyValue);
|
||||
//
|
||||
// safe mode - avoid modification of the arguments
|
||||
Standard_Boolean bSafeMode = Standard_True;
|
||||
// if bSafeMode == Standard_True - the safe mode is switched on
|
||||
// if bSafeMode == Standard_False - the safe mode is switched off
|
||||
aBuilder.SetNonDestructive(bSafeMode);
|
||||
//
|
||||
// gluing options - for coinciding arguments
|
||||
BOPAlgo_GlueEnum aGlueOpt = BOPAlgo_GlueFull;
|
||||
// if aGlueOpt == BOPAlgo_GlueOff - the gluing mode is switched off
|
||||
// if aGlueOpt == BOPAlgo_GlueShift - the gluing mode is switched on
|
||||
// if aGlueOpt == BOPAlgo_GlueFull - the gluing mode is switched on
|
||||
aBuilder.SetGlue(aGlueOpt);
|
||||
//
|
||||
// run the algorithm
|
||||
aBuilder.Build();
|
||||
iErr=aBuilder.ErrorStatus();
|
||||
@@ -2339,13 +2822,25 @@ brunparallel 1
|
||||
# >0. : the Fuzzy option is on
|
||||
bfuzzyvalue 0.
|
||||
#
|
||||
# set safe processing mode
|
||||
bnondestructive 1
|
||||
# set safe mode
|
||||
# 1 - the safe processing mode is switched on
|
||||
# 0 - the safe processing mode is switched off
|
||||
#
|
||||
# set gluing mode
|
||||
bglue 1
|
||||
# set the gluing mode
|
||||
# 1 or 2 - the gluing mode is switched on
|
||||
# 0 - the gluing mode is switched off
|
||||
#
|
||||
# run the algorithm
|
||||
# r is the result of the operation
|
||||
# 0 means Common operation
|
||||
bapibop r 0
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_algorithms_11b_2_3 Case 3. Fuse operation
|
||||
@subsubsection occt_algorithms_11b_2_4 Case 4. Fuse operation
|
||||
|
||||
The following example illustrates how to use Fuse operation:
|
||||
|
||||
@@ -2382,6 +2877,19 @@ The following example illustrates how to use Fuse operation:
|
||||
// if aFuzzyValue>0.: the Fuzzy option is on
|
||||
aBuilder.SetFuzzyValue(aFuzzyValue);
|
||||
//
|
||||
// safe mode - avoid modification of the arguments
|
||||
Standard_Boolean bSafeMode = Standard_True;
|
||||
// if bSafeMode == Standard_True - the safe mode is switched on
|
||||
// if bSafeMode == Standard_False - the safe mode is switched off
|
||||
aBuilder.SetNonDestructive(bSafeMode);
|
||||
//
|
||||
// gluing options - for coinciding arguments
|
||||
BOPAlgo_GlueEnum aGlueOpt = BOPAlgo_GlueFull;
|
||||
// if aGlueOpt == BOPAlgo_GlueOff - the gluing mode is switched off
|
||||
// if aGlueOpt == BOPAlgo_GlueShift - the gluing mode is switched on
|
||||
// if aGlueOpt == BOPAlgo_GlueFull - the gluing mode is switched on
|
||||
aBuilder.SetGlue(aGlueOpt);
|
||||
//
|
||||
// run the algorithm
|
||||
aBuilder.Build();
|
||||
iErr=aBuilder.ErrorStatus();
|
||||
@@ -2421,13 +2929,25 @@ brunparallel 1
|
||||
# >0. : the Fuzzy option is on
|
||||
bfuzzyvalue 0.
|
||||
#
|
||||
# set safe processing mode
|
||||
bnondestructive 1
|
||||
# set safe mode
|
||||
# 1 - the safe processing mode is switched on
|
||||
# 0 - the safe processing mode is switched off
|
||||
#
|
||||
# set gluing mode
|
||||
bglue 1
|
||||
# set the gluing mode
|
||||
# 1 or 2 - the gluing mode is switched on
|
||||
# 0 - the gluing mode is switched off
|
||||
#
|
||||
# run the algorithm
|
||||
# r is the result of the operation
|
||||
# 1 means Fuse operation
|
||||
bapibop r 1
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_algorithms_11b_2_4 Case 4. Cut operation
|
||||
@subsubsection occt_algorithms_11b_2_5 Case 5. Cut operation
|
||||
|
||||
The following example illustrates how to use Cut operation:
|
||||
|
||||
@@ -2464,6 +2984,19 @@ The following example illustrates how to use Cut operation:
|
||||
// if aFuzzyValue>0.: the Fuzzy option is on
|
||||
aBuilder.SetFuzzyValue(aFuzzyValue);
|
||||
//
|
||||
// safe mode - avoid modification of the arguments
|
||||
Standard_Boolean bSafeMode = Standard_True;
|
||||
// if bSafeMode == Standard_True - the safe mode is switched on
|
||||
// if bSafeMode == Standard_False - the safe mode is switched off
|
||||
aBuilder.SetNonDestructive(bSafeMode);
|
||||
//
|
||||
// gluing options - for coinciding arguments
|
||||
BOPAlgo_GlueEnum aGlueOpt = BOPAlgo_GlueFull;
|
||||
// if aGlueOpt == BOPAlgo_GlueOff - the gluing mode is switched off
|
||||
// if aGlueOpt == BOPAlgo_GlueShift - the gluing mode is switched on
|
||||
// if aGlueOpt == BOPAlgo_GlueFull - the gluing mode is switched on
|
||||
aBuilder.SetGlue(aGlueOpt);
|
||||
//
|
||||
// run the algorithm
|
||||
aBuilder.Build();
|
||||
iErr=aBuilder.ErrorStatus();
|
||||
@@ -2503,6 +3036,18 @@ brunparallel 1
|
||||
# >0. : the Fuzzy option is on
|
||||
bfuzzyvalue 0.
|
||||
#
|
||||
# set safe processing mode
|
||||
bnondestructive 1
|
||||
# set safe mode
|
||||
# 1 - the safe processing mode is switched on
|
||||
# 0 - the safe processing mode is switched off
|
||||
# set gluing mode
|
||||
#
|
||||
bglue 1
|
||||
# set the gluing mode
|
||||
# 1 or 2 - the gluing mode is switched on
|
||||
# 0 - the gluing mode is switched off
|
||||
#
|
||||
# run the algorithm
|
||||
# r is the result of the operation
|
||||
# 2 means Cut operation
|
||||
@@ -2510,7 +3055,7 @@ bapibop r 2
|
||||
~~~~
|
||||
|
||||
|
||||
@subsubsection occt_algorithms_11b_2_5 Case 5. Section operation
|
||||
@subsubsection occt_algorithms_11b_2_6 Case 6. Section operation
|
||||
|
||||
The following example illustrates how to use Section operation:
|
||||
|
||||
@@ -2547,6 +3092,19 @@ The following example illustrates how to use Section operation:
|
||||
// if aFuzzyValue>0.: the Fuzzy option is on
|
||||
aBuilder.SetFuzzyValue(aFuzzyValue);
|
||||
//
|
||||
// safe mode - avoid modification of the arguments
|
||||
Standard_Boolean bSafeMode = Standard_True;
|
||||
// if bSafeMode == Standard_True - the safe mode is switched on
|
||||
// if bSafeMode == Standard_False - the safe mode is switched off
|
||||
aBuilder.SetNonDestructive(bSafeMode);
|
||||
//
|
||||
// gluing options - for coinciding arguments
|
||||
BOPAlgo_GlueEnum aGlueOpt = BOPAlgo_GlueFull;
|
||||
// if aGlueOpt == BOPAlgo_GlueOff - the gluing mode is switched off
|
||||
// if aGlueOpt == BOPAlgo_GlueShift - the gluing mode is switched on
|
||||
// if aGlueOpt == BOPAlgo_GlueFull - the gluing mode is switched on
|
||||
aBuilder.SetGlue(aGlueOpt);
|
||||
//
|
||||
// run the algorithm
|
||||
aBuilder.Build();
|
||||
iErr=aBuilder.ErrorStatus();
|
||||
@@ -2586,6 +3144,18 @@ brunparallel 1
|
||||
# >0. : the Fuzzy option is on
|
||||
bfuzzyvalue 0.
|
||||
#
|
||||
# set safe processing mode
|
||||
bnondestructive 1
|
||||
# set safe mode
|
||||
# 1 - the safe processing mode is switched on
|
||||
# 0 - the safe processing mode is switched off
|
||||
#
|
||||
# set gluing mode
|
||||
bglue 1
|
||||
# set the gluing mode
|
||||
# 1 or 2 - the gluing mode is switched on
|
||||
# 0 - the gluing mode is switched off
|
||||
#
|
||||
# run the algorithm
|
||||
# r is the result of the operation
|
||||
# 4 means Section operation
|
||||
|
BIN
dox/user_guides/boolean_operations/images/bsplit_image001.png
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
dox/user_guides/boolean_operations/images/bsplit_image002.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
dox/user_guides/boolean_operations/images/bsplit_image003.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
dox/user_guides/boolean_operations/images/bsplit_image004.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
dox/user_guides/boolean_operations/images/bsplit_image005.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
dox/user_guides/boolean_operations/images/bsplit_image006.png
Normal file
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 19 KiB |
BIN
dox/user_guides/boolean_operations/images/mkvolume_image001.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
dox/user_guides/boolean_operations/images/mkvolume_image002.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
dox/user_guides/boolean_operations/images/mkvolume_image003.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
dox/user_guides/boolean_operations/images/mkvolume_image004.png
Normal file
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 12 KiB |
@@ -1,407 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="500.70731"
|
||||
height="257.98001"
|
||||
id="svg3731"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="operations_image059.svg">
|
||||
<defs
|
||||
id="defs3733">
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Mstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow2Mstart"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4673"
|
||||
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="scale(0.6,0.6)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4649"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<clipPath
|
||||
id="clipEmfPath1"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3744"
|
||||
height="157.5"
|
||||
width="566.85828"
|
||||
y="0"
|
||||
x="0" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipEmfPath2"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3747"
|
||||
height="15"
|
||||
width="134.10196"
|
||||
y="14.7"
|
||||
x="215.55315" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipEmfPath3"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3750"
|
||||
height="13.95"
|
||||
width="158.85233"
|
||||
y="118.5"
|
||||
x="53.850784" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipEmfPath4"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3753"
|
||||
height="15"
|
||||
width="189.90277"
|
||||
y="68.849998"
|
||||
x="185.10271" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipEmfPath5"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3756"
|
||||
height="13.95"
|
||||
width="180.15263"
|
||||
y="118.2"
|
||||
x="315.3046" />
|
||||
</clipPath>
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Mstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow2Mstart-1"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4673-7"
|
||||
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="scale(0.6,0.6)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<clipPath
|
||||
id="clipEmfPath1-0"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3744-9"
|
||||
height="157.5"
|
||||
width="566.85828"
|
||||
y="0"
|
||||
x="0" />
|
||||
</clipPath>
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Mstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow2Mstart-7"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4673-1"
|
||||
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="scale(0.6,0.6)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Mstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow2Mstart-2"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4673-76"
|
||||
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="scale(0.6,0.6)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<clipPath
|
||||
id="clipEmfPath1-4"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3744-2"
|
||||
height="157.5"
|
||||
width="566.85828"
|
||||
y="0"
|
||||
x="0" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.7435336"
|
||||
inkscape:cx="250.35365"
|
||||
inkscape:cy="166.25673"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="g3758"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1195"
|
||||
inkscape:window-height="615"
|
||||
inkscape:window-x="10"
|
||||
inkscape:window-y="129"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:snap-bbox="false"
|
||||
inkscape:bbox-nodes="false"
|
||||
inkscape:snap-nodes="false"
|
||||
inkscape:snap-global="true" />
|
||||
<metadata
|
||||
id="metadata3736">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(204.63937,-240.29985)">
|
||||
<g
|
||||
id="g3758"
|
||||
transform="translate(-261.51666,329.10596)">
|
||||
<text
|
||||
id="text3760"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
|
||||
y="142.64999"
|
||||
x="558.15814"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3762"
|
||||
d="m 214.87814,10.5 0,23.4375 135.43322,0 0,-23.4375 z"
|
||||
clip-path="url(#clipEmfPath1)"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.25626838px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(1.8268958,0,0,0.9818143,-213.2932,-1.3165801)" />
|
||||
<text
|
||||
id="text3764"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="23.035164"
|
||||
x="220.98541"
|
||||
xml:space="preserve">BRepAlgoAPI_BuilderAlgo</text>
|
||||
<text
|
||||
id="text3766"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="25.049999"
|
||||
x="327.60477"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3768"
|
||||
d="m 53.175776,114.3 0,22.37812 160.127334,0 0,-22.37812 z"
|
||||
clip-path="url(#clipEmfPath2)"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.24689317px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3770"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="143.76225"
|
||||
x="148.95631"
|
||||
xml:space="preserve">BRepAlgoAPI_Fuse</text>
|
||||
<text
|
||||
id="text3772"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="128.85001"
|
||||
x="204.603"
|
||||
xml:space="preserve"> </text>
|
||||
<text
|
||||
id="text3774"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
|
||||
y="158.85001"
|
||||
x="57.45084"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3776"
|
||||
d="m 280.56035,62.94375 -0.59064,-22.621875 c -0.009,-0.346875 0.26251,-0.6375 0.60939,-0.646875 0.34688,-0.0094 0.62813,0.2625 0.63751,0.609375 l 0.59063,22.63125 c 0.009,0.346875 -0.2625,0.628125 -0.60938,0.6375 -0.34688,0.0094 -0.62814,-0.2625 -0.63751,-0.609375 z m -3.68443,-21.290625 3.55317,-7.603125 3.94694,7.40625 z"
|
||||
clip-path="url(#clipEmfPath3)"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.1500022px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path3778"
|
||||
d="m 177.37132,50.938071 0,23.25606 252.44098,0 0,-23.25606 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.43770862px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3780"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="64.861305"
|
||||
x="203.64111"
|
||||
xml:space="preserve">BRepAlgoAPI_BooleanOperation</text>
|
||||
<text
|
||||
id="text3782"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="79.199997"
|
||||
x="351.30511"
|
||||
xml:space="preserve"> </text>
|
||||
<text
|
||||
id="text3784"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="108.3"
|
||||
x="188.70276"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3786"
|
||||
d="m 198.98728,113.10938 20.70968,-20.700005 c 0.24375,-0.24375 0.63751,-0.24375 0.88126,0 0.24375,0.24375 0.24375,0.6375 0,0.88125 L 199.87792,114 c -0.24376,0.24375 -0.64689,0.24375 -0.89064,0 -0.24375,-0.24375 -0.24375,-0.64688 0,-0.89062 z m 17.61588,-22.031255 7.95012,-2.653125 -2.64379,7.959375 z"
|
||||
clip-path="url(#clipEmfPath4)"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.1500022px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path3790"
|
||||
d="m 323.06859,130.86407 0,22.45692 161.49789,0 0,-22.45692 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.18685222px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3792"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="144.46437"
|
||||
x="341.69354"
|
||||
xml:space="preserve">BRepAlgoAPI_Cut</text>
|
||||
<text
|
||||
id="text3794"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="128.55"
|
||||
x="480.30701"
|
||||
xml:space="preserve"> </text>
|
||||
<text
|
||||
id="text3796"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
|
||||
y="158.39999"
|
||||
x="318.75464"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3778-1"
|
||||
d="m 136.65269,130.42418 0,23.58586 147.81153,0 0,-23.58586 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.10790598px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#916f6f;stroke:#000000;stroke-width:0.7965284px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Mstart)"
|
||||
d="m 304.3563,32.239951 0,18.31124"
|
||||
id="path3875"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(1.1475795,0,0,0.99628756,-17.657381,-45.674459)"
|
||||
id="path3762-4"
|
||||
d="m 214.87814,10.5 0,23.4375 135.43322,0 0,-23.4375 z"
|
||||
clip-path="url(#clipEmfPath1-0)"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.25626838px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path3778-1-8"
|
||||
d="m 78.687273,88.627374 0,23.585856 147.811517,0 0,-23.585856 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.10790598px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.90858448px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
|
||||
d="M 276.56388,74.263936 224.85315,129.41594"
|
||||
id="path6825"
|
||||
inkscape:connector-type="polyline"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.91995925px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
|
||||
d="m 325.68413,73.924924 51.41999,56.861286"
|
||||
id="path6825-2"
|
||||
inkscape:connector-type="polyline"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 179.52049,162.77106 c -59.64898,14.3387 -59.64898,14.3387 -59.64898,14.3387"
|
||||
id="path6849"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(56.87729,-88.80611)" />
|
||||
<text
|
||||
id="text3792-4"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="103.56826"
|
||||
x="83.965698"
|
||||
xml:space="preserve">BRepAlgoAPI_Common</text>
|
||||
<path
|
||||
id="path3778-1-8-5"
|
||||
d="m 373.01844,90.295386 0,23.546834 158.6699,0 0,-23.546834 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.14692891px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1.0304904px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 389.40321,74.26698 c 58.76558,15.4553 58.76558,15.4553 58.76558,15.4553"
|
||||
id="path6849-5"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3792-4-1"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="104.71535"
|
||||
x="382.07281"
|
||||
xml:space="preserve">BRepAlgoAPI_Section</text>
|
||||
<path
|
||||
style="fill:#916f6f;stroke:#000000;stroke-width:0.7965284px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Mstart)"
|
||||
d="m 305.51053,-9.9971206 0,18.31124"
|
||||
id="path3875-1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3764-5"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="-19.759373"
|
||||
x="249.94737"
|
||||
xml:space="preserve">BRepAlgoAPI_Algo</text>
|
||||
<path
|
||||
style="fill:#916f6f;stroke:#000000;stroke-width:0.7965284px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Mstart)"
|
||||
d="m 306.65763,-54.160308 0,18.31124"
|
||||
id="path3875-1-1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path3762-3"
|
||||
d="m 214.87814,10.5 0,23.4375 135.43322,0 0,-23.4375 z"
|
||||
clip-path="url(#clipEmfPath1-4)"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.25626838px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(1.6833898,0,0,0.98459396,-169.65553,-88.430725)" />
|
||||
<text
|
||||
id="text3764-2"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="-65.054825"
|
||||
x="221.258"
|
||||
xml:space="preserve">BRepBuilderAPI_MakeShape</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 17 KiB |
@@ -43,8 +43,9 @@ This documentation describes:
|
||||
* The graphical commands.
|
||||
* The Geometry set of commands.
|
||||
* The Topology set of commands.
|
||||
|
||||
This document does not describe other sets of commands and does not explain how to extend Draw using C++.
|
||||
* OCAF commands.
|
||||
* Data Exchange commands
|
||||
* Shape Healing commands
|
||||
|
||||
This document is a reference manual. It contains a full description of each command. All descriptions have the format illustrated below for the exit command.
|
||||
|
||||
@@ -325,6 +326,17 @@ puts ;x = [dval x], cos(x/pi) = [dval cos(x/pi)];
|
||||
|
||||
**Note,** that in TCL, parentheses are not considered to be special characters. Do not forget to quote an expression if it contains spaces in order to avoid parsing different words. <i>(a + b)</i> is parsed as three words: <i>"(a + b)"</i> or <i>(a+b)</i> are correct.
|
||||
|
||||
@subsubsection occt_draw_2_3_3 del, dall
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
del varname_pattern [varname_pattern ...]
|
||||
dall
|
||||
~~~~~
|
||||
|
||||
*del* command does the same thing as *unset*, but it deletes the variables matched by the pattern.
|
||||
|
||||
*dall* command deletes all variables in the session.
|
||||
|
||||
@subsection occt_draw_2_4 lists
|
||||
|
||||
@@ -610,7 +622,7 @@ wait
|
||||
Syntax:
|
||||
|
||||
~~~~~
|
||||
chrono [ name start/stop/reset/show]
|
||||
chrono [ name start/stop/reset/show/restart/[counter text]]
|
||||
~~~~~
|
||||
|
||||
Without arguments, **chrono** activates Draw chronometers. The elapsed time ,cpu system and cpu user times for each command will be printed.
|
||||
@@ -619,7 +631,9 @@ With arguments, **chrono** is used to manage activated chronometers. You can per
|
||||
* run the chronometer (start).
|
||||
* stop the chronometer (stop).
|
||||
* reset the chronometer to 0 (reset).
|
||||
* restart the chronometer (restart).
|
||||
* display the current time (show).
|
||||
* display the current time with specified text (output example - *COUNTER text: N*), command <i>testdiff</i> will compare such outputs between two test runs (counter).
|
||||
|
||||
**Example:**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
@@ -696,21 +710,21 @@ Radius :5
|
||||
**Note** The behavior of *whatis* on other variables (not Draw) is not excellent.
|
||||
|
||||
|
||||
@subsubsection occt_draw_3_2_3 rename, copy
|
||||
@subsubsection occt_draw_3_2_3 renamevar, copy
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
rename varname tovarname [varname tovarname ...]
|
||||
renamevar varname tovarname [varname tovarname ...]
|
||||
copy varname tovarname [varname tovarname ...]
|
||||
~~~~~
|
||||
|
||||
* **rename** changes the name of a Draw variable. The original variable will no longer exist. Note that the content is not modified. Only the name is changed.
|
||||
* **renamevar** changes the name of a Draw variable. The original variable will no longer exist. Note that the content is not modified. Only the name is changed.
|
||||
* **copy** creates a new variable with a copy of the content of an existing variable. The exact behavior of **copy** is type dependent; in the case of certain topological variables, the content may still be shared.
|
||||
|
||||
**Example:**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
circle c1 0 0 1 0 5
|
||||
rename c1 c2
|
||||
renamevar c1 c2
|
||||
|
||||
# curves are copied, c2 will not be modified
|
||||
copy c2 c3
|
||||
@@ -1178,7 +1192,7 @@ point . x y z
|
||||
# p0, p1, p2, ....
|
||||
|
||||
# give a name to a graphic object
|
||||
rename . x
|
||||
renamevar . x
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -1253,6 +1267,13 @@ foreach var [directory c_*] {erase $var}
|
||||
2dclear
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@subsubsection occt_draw_4_1_14_1 disp, don, era
|
||||
|
||||
These commands have the same meaning as correspondingly display, donly and erase, but with the difference that they evaluate the arguments using glob pattern rules. For example, to display all objects with names d_1, d_2, d_3, etc. it is enouth to run the command:
|
||||
~~~~~{.cpp}
|
||||
disp d_*
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_4_1_15 repaint, dflush
|
||||
|
||||
|
||||
@@ -1964,26 +1985,6 @@ vsensera
|
||||
|
||||
Erases active entities.
|
||||
|
||||
@subsubsection occt_draw_4_3_22 vperf
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
vperf shapename 1/0 (Transformation/Loacation) 1/0 (Primitives sensibles ON/OFF)
|
||||
~~~~~
|
||||
|
||||
Tests the animation of an object along a predefined trajectory.
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
vinit
|
||||
box b 10 10 10
|
||||
psphere s 20
|
||||
vdisplay b s
|
||||
vfit
|
||||
vsetdispmode 0
|
||||
vperf b 1 1
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_4_3_23 vr
|
||||
|
||||
Syntax:
|
||||
@@ -5957,6 +5958,20 @@ Creates a vertex at either a 3d location x,y,z or the point at parameter p on an
|
||||
vertex v1 10 20 30
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_7_2_1a mkpoint
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
mkpoint name vertex
|
||||
~~~~~
|
||||
|
||||
Creates a point from the coordinates of a given vertex.
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
mkpoint p v1
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_7_2_2 edge, mkedge, uisoedge, visoedge
|
||||
|
||||
Syntax:
|
||||
@@ -7641,6 +7656,19 @@ nurbsconvert result name [result name]
|
||||
Changes the NURBS curve definition of a shape to a Bspline curve definition. This conversion is required for assymetric deformation and prepares the arguments for other commands such as **deform**. The conversion can be necessary when transferring shape data to other applications.
|
||||
|
||||
|
||||
@subsubsection occt_draw_7_11_6 edgestofaces
|
||||
|
||||
**edgestofaces** - The command allows building planar faces from the planar edges randomly located in 3D space.
|
||||
|
||||
It has the following syntax:
|
||||
~~~~
|
||||
edgestofaces r_faces edges [-a AngTol -s Shared(0/1)]
|
||||
~~~~
|
||||
Options:
|
||||
* -a AngTol - angular tolerance used for distinguishing the planar faces;
|
||||
* -s Shared(0/1) - boolean flag which defines whether the input edges are already shared or have to be intersected.
|
||||
|
||||
|
||||
@subsection occt_draw_7_12 Texture Mapping to a Shape
|
||||
|
||||
Texture mapping allows you to map textures on a shape. Textures are texture image files and several are predefined. You can control the number of occurrences of the texture on a face, the position of a texture and the scale factor of the texture.
|
||||
@@ -7735,7 +7763,9 @@ The following terms and definitions are used in this document:
|
||||
* **baddobjects** *S1 S2...Sn* -- adds shapes *S1, S2, ... Sn* as Objects;
|
||||
* **baddtools** *S1 S2...Sn* -- adds shapes *S1, S2, ... Sn* as Tools;
|
||||
* **bfillds** -- performs the Intersection Part of the Algorithm;
|
||||
* **bbuild** *r* -- performs the Building Part of the Algorithm; *r* is the resulting shape.
|
||||
* **bbuild** *r* -- performs the Building Part of the Algorithm (General Fuse operation); *r* is the resulting shape;
|
||||
* **bsplit** *r* -- performs the Partition operation; *r* is the resulting shape;
|
||||
* **bbop** *r* *iOp* -- performs the Boolean operation; *r* is the resulting shape; *iOp* - type of the operation (0 - COMMON; 1 - FUSE; 2 - CUT; 3 - CUT21; 4 - SECTION).
|
||||
|
||||
@subsection occt_draw_20_3 Commands for Intersection Part
|
||||
|
||||
@@ -8930,6 +8960,19 @@ Sets a shape at the indicated label.
|
||||
XSetShape D 0:1:1:3 b
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_8_6_15 XUpdateAssemblies
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
XUpdateAssemblies <document>
|
||||
~~~~~
|
||||
|
||||
Updates all assembly compounds in the XDE document.
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
XUpdateAssemblies D
|
||||
~~~~~
|
||||
|
||||
@subsection occt_draw_8_7_ XDE color commands
|
||||
|
||||
@@ -9907,6 +9950,510 @@ vdrawsphere s 200 1 1 1 500 1
|
||||
~~~~~
|
||||
|
||||
|
||||
@section occt_draw_12 Simple vector algebra and measurements
|
||||
|
||||
This section contains description of auxiliary commands that can be useful for simple calculations and manipulations needed when analyzing complex models.
|
||||
|
||||
@subsection occt_draw_12_1 Vector algebra commands
|
||||
|
||||
This section describes commands providing simple calculations with 2D and 3D vectors. The vector is represented by a TCL list of double values (coordinates). The commands get input vector coordinates from the command line as distinct values. So, if you have a vector stored in a variable you need to use *eval* command as a prefix, for example, to compute the magnitude of cross products of two vectors given by 3 points the following commands can be used:
|
||||
~~~~~{.cpp}
|
||||
Draw[10]> set vec1 [vec 12 28 99 12 58 99]
|
||||
0 30 0
|
||||
Draw[13]> set vec2 [vec 12 28 99 16 21 89]
|
||||
4 -7 -10
|
||||
Draw[14]> set cross [eval cross $vec1 $vec2]
|
||||
-300 0 -120
|
||||
Draw[15]> eval module $cross
|
||||
323.10988842807024
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_1 vec
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
vec <x1> <y1> <z1> <x2> <y2> <z2>
|
||||
~~~~~
|
||||
|
||||
Returns coordinates of vector between two 3D points.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
vec 1 2 3 6 5 4
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_2 2dvec
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2dvec <x1> <y1> <x2> <y2>
|
||||
~~~~~
|
||||
|
||||
Returns coordinates of vector between two 2D points.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2dvec 1 2 4 3
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_3 pln
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
pln <x1> <y1> <z1> <x2> <y2> <z2> <x3> <y3> <z3>
|
||||
~~~~~
|
||||
|
||||
Returns plane built on three points. A plane is represented by 6 double values: coordinates of the origin point and the normal directoin.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
pln 1 2 3 6 5 4 9 8 7
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_4 module
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
module <x> <y> <z>
|
||||
~~~~~
|
||||
|
||||
Returns module of a vector.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
module 1 2 3
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_5 2dmodule
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2dmodule <x> <y>
|
||||
~~~~~
|
||||
|
||||
Returns module of a 2D vector.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2dmodule 1 2
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_6 norm
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
norm <x> <y> <z>
|
||||
~~~~~
|
||||
|
||||
Returns unified vector from a given 3D vector.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
norm 1 2 3
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_7 2dnorm
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2dnorm <x> <y>
|
||||
~~~~~
|
||||
|
||||
Returns unified vector from a given 2D vector.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2dnorm 1 2
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_8 inverse
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
inverse <x> <y> <z>
|
||||
~~~~~
|
||||
|
||||
Returns inversed 3D vector.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
inverse 1 2 3
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_9 2dinverse
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2dinverse <x> <y>
|
||||
~~~~~
|
||||
|
||||
Returns inversed 2D vector.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2dinverse 1 2
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_10 2dort
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2dort <x> <y>
|
||||
~~~~~
|
||||
|
||||
Returns 2D vector rotated on 90 degrees.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2dort 1 2
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_11 distpp
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
distpp <x1> <y1> <z1> <x2> <y2> <z2>
|
||||
~~~~~
|
||||
|
||||
Returns distance between two 3D points.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
distpp 1 2 3 4 5 6
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_12 2ddistpp
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2ddistpp <x1> <y1> <x2> <y2>
|
||||
~~~~~
|
||||
|
||||
Returns distance between two 2D points.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2ddistpp 1 2 3 4
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_13 distplp
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
distplp <x0> <y0> <z0> <nx> <ny> <nz> <xp> <yp> <zp>
|
||||
~~~~~
|
||||
|
||||
Returns distance between plane defined by point and normal direction and another point.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
distplp 0 0 0 0 0 1 5 6 7
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_14 distlp
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
distlp <x0> <y0> <z0> <dx> <dy> <dz> <xp> <yp> <zp>
|
||||
~~~~~
|
||||
|
||||
Returns distance between 3D line defined by point and direction and another point.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
distlp 0 0 0 1 0 0 5 6 7
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_15 2ddistlp
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2ddistlp <x0> <y0> <dx> <dy> <xp> <yp>
|
||||
~~~~~
|
||||
|
||||
Returns distance between 2D line defined by point and direction and another point.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2ddistlp 0 0 1 0 5 6
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_16 distppp
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
distppp <x1> <y1> <z1> <x2> <y2> <z2> <x3> <y3> <z3>
|
||||
~~~~~
|
||||
|
||||
Returns deviation of point (x2,y2,z2) from segment defined by points (x1,y1,z1) and (x3,y3,z3).
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
distppp 0 0 0 1 1 0 2 0 0
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_17 2ddistppp
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2ddistppp <x1> <y1> <x2> <y2> <x3> <y3>
|
||||
~~~~~
|
||||
|
||||
Returns deviation of point (x2,y2) from segment defined by points (x1,y1) and (x3,y3). The result is a signed value. It is positive if the point (x2,y2) is on the left side of the segment, and negative otherwise.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2ddistppp 0 0 1 -1 2 0
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_18 barycen
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
barycen <x1> <y1> <z1> <x2> <y2> <z2> <par>
|
||||
~~~~~
|
||||
|
||||
Returns point of a given parameter between two 3D points.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
barycen 0 0 0 1 1 1 0.3
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_19 2dbarycen
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2dbarycen <x1> <y1> <x2> <y2> <par>
|
||||
~~~~~
|
||||
|
||||
Returns point of a given parameter between two 2D points.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2dbarycen 0 0 1 1 0.3
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_20 cross
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
cross <x1> <y1> <z1> <x2> <y2> <z2>
|
||||
~~~~~
|
||||
|
||||
Returns cross product of two 3D vectors.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
cross 1 0 0 0 1 0
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_21 2dcross
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2dcross <x1> <y1> <x2> <y2>
|
||||
~~~~~
|
||||
|
||||
Returns cross product of two 2D vectors.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2dcross 1 0 0 1
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_22 dot
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
dot <x1> <y1> <z1> <x2> <y2> <z2>
|
||||
~~~~~
|
||||
|
||||
Returns scalar product of two 3D vectors.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
dot 1 0 0 0 1 0
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_23 2ddot
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2ddot <x1> <y1> <x2> <y2>
|
||||
~~~~~
|
||||
|
||||
Returns scalar product of two 2D vectors.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2ddot 1 0 0 1
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_24 scale
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
scale <x> <y> <z> <factor>
|
||||
~~~~~
|
||||
|
||||
Returns 3D vector multiplied by scalar.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
scale 1 0 0 5
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_1_25 2dscale
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2dscale <x> <y> <factor>
|
||||
~~~~~
|
||||
|
||||
Returns 2D vector multiplied by scalar.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2dscale 1 0 5
|
||||
~~~~~
|
||||
|
||||
@subsection occt_draw_12_2 Measurements commands
|
||||
|
||||
This section describes commands that make possible to provide measurements on a model.
|
||||
|
||||
@subsubsection occt_draw_12_2_1 pnt
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
pnt <object>
|
||||
~~~~~
|
||||
|
||||
Returns coordinates of point in the given Draw variable. Object can be of type point or vertex. Actually this command is built up from the commands @ref occt_draw_7_2_1a "mkpoint" and @ref occt_draw_6_6_1 "coord".
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
vertex v 0 1 0
|
||||
pnt v
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_2_2 pntc
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
pntc <curv> <par>
|
||||
~~~~~
|
||||
|
||||
Returns coordinates of point on 3D curve with given parameter. Actually this command is based on the command @ref occt_draw_6_6_2 "cvalue".
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
circle c 0 0 0 10
|
||||
pntc c [dval pi/2]
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_2_3 2dpntc
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2dpntc <curv2d> <par>
|
||||
~~~~~
|
||||
|
||||
Returns coordinates of point on 2D curve with given parameter. Actually this command is based on the command @ref occt_draw_6_6_2 "2dcvalue".
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
circle c 0 0 10
|
||||
2dpntc c [dval pi/2]
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_2_4 pntsu
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
pntsu <surf> <u> <v>
|
||||
~~~~~
|
||||
|
||||
Returns coordinates of point on surface with given parameters. Actually this command is based on the command @ref occt_draw_6_6_3 "svalue".
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
cylinder s 10
|
||||
pntsu s [dval pi/2] 5
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_2_5 pntcons
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
pntcons <curv2d> <surf> <par>
|
||||
~~~~~
|
||||
|
||||
Returns coordinates of point on surface defined by point on 2D curve with given parameter. Actually this command is based on the commands @ref occt_draw_6_6_2 "2dcvalue" and @ref occt_draw_6_6_3 "svalue".
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
line c 0 0 1 0
|
||||
cylinder s 10
|
||||
pntcons c s [dval pi/2]
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_2_6 drseg
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
drseg <name> <x1> <y1> <z1> <x2> <y2> <z2>
|
||||
~~~~~
|
||||
|
||||
Creates a linear segment between two 3D points. The new object is given the *name*. The object is drawn in the axonometric view.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
drseg s 0 0 0 1 0 0
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_2_7 2ddrseg
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
2ddrseg <name> <x1> <y1> <x2> <y2>
|
||||
~~~~~
|
||||
|
||||
Creates a linear segment between two 2D points. The new object is given the *name*. The object is drawn in the 2D view.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
2ddrseg s 0 0 1 0
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_2_8 mpick
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
mpick
|
||||
~~~~~
|
||||
|
||||
Prints in the console the coordinates of a point clicked by mouse in a view (axonometric or 2D). This command will wait for mouse click event in a view.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
mpick
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_12_2_9 mdist
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
mdist
|
||||
~~~~~
|
||||
|
||||
Prints in the console the distance between two points clicked by mouse in a view (axonometric or 2D). This command will wait for two mouse click events in a view.
|
||||
|
||||
Example:
|
||||
~~~~~{.cpp}
|
||||
mdist
|
||||
~~~~~
|
||||
|
||||
@section occt_draw_11 Extending Test Harness with custom commands
|
||||
|
||||
|
||||
|
@@ -752,7 +752,7 @@ In order to actually convert signals to exceptions, macro *OCC_CATCH_SIGNALS* ne
|
||||
|
||||
@subsubsection occt_fcug_2_4_4 Implementation on various platforms.
|
||||
|
||||
The exception handling mechanism in Open CASCADE Technology is implemented in different ways depending on the preprocessor macros *NO_CXX_EXCEPTIONS* and *OCC_CONVERT_SIGNALS*, which shall be consistently defined by compilation procedures for both Open CASCADE Technology and user applications:
|
||||
The exception handling mechanism in Open CASCADE Technology is implemented in different ways depending on the preprocessor macro *OCC_CONVERT_SIGNALS*, which shall be consistently defined by compilation procedures for both Open CASCADE Technology and user applications:
|
||||
|
||||
1. On Windows, these macros are not defined by default, and normal C++ exceptions are used in all cases, including throwing from signal handler. Thus the behavior is as expected in C++.
|
||||
|
||||
@@ -763,18 +763,7 @@ The exception handling mechanism in Open CASCADE Technology is implemented in d
|
||||
* macro *OCC_CATCH_SIGNALS* is necessary (besides call to *OSD::SetSignal()* described above) for conversion of signals into exceptions;
|
||||
* the destructors for automatic C++ objects created in the code after that macro and till the place where signal is raised will not be called in case of signal, since no C++ stack unwinding is performed by long jump.
|
||||
|
||||
3. On Linux Open CASCADE Technology can also be compiled in compatibility mode. In that case macro *NO_CXX_EXCEPTIONS* is defined and the C++ exceptions are simulated with C long jumps. As a consequence, the behavior is slightly different from that expected in the C++ standard.
|
||||
|
||||
While exception handling with *NO_CXX_EXCEPTIONS* is very similar to C++ by syntax, it has a number of peculiarities that should be taken into account:
|
||||
|
||||
* try and catch are actually macros defined in the file *Standard_ErrorHandler.hxx*. Therefore, including this file is necessary for handling OCCT exceptions;
|
||||
* due to being a macro, catch cannot contain a declaration of the exception object after its type; only type is allowed in the catch statement. Use method *Standard_Failure::Caught()* to access an exception object;
|
||||
* catch macro may conflict with some STL classes that might use catch(...) statements in their header files. So STL headers should not be included after *Standard_ErrorHandler.hxx*;
|
||||
* Open CASCADE Technology try/catch block will not handle normal C++ exceptions; however this can be achieved using special workarounds;
|
||||
* the try macro defines a C++ object that holds an entry point in the exception handler. Therefore if exception is raised by code located immediately after the try/catch block but on the same nesting level as *try*, it may be handled by that *catch*. This may lead to unexpected behavior, including infinite loop. To avoid that, always surround the try/catch block with curved brackets;
|
||||
* the destructors of C++ objects allocated on the stack after handler initialization are not called by exception raising.
|
||||
|
||||
In general, for writing platform-independent code it is recommended to insert macros *OCC_CATCH_SIGNALS* in try {} blocks or other code where signals may happen. For compatibility with previous versions of Open CASCADE Technology the limitations described above for *NO_CXX_EXCEPTIONS* shall be assumed.
|
||||
In general, for writing platform-independent code it is recommended to insert macros *OCC_CATCH_SIGNALS* in try {} blocks or other code where signals may happen.
|
||||
|
||||
@subsection occt_fcug_2_5 Plug-In Management
|
||||
|
||||
|
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.2 KiB |
@@ -683,7 +683,7 @@ Handle (Geom_Surface) Surf (Mapp.Surface());
|
||||
// create a face corresponding to the approximated Plate
|
||||
Surface
|
||||
Standard_Real Umin, Umax, Vmin, Vmax;
|
||||
PSurf-Bounds( Umin, Umax, Vmin, Vmax);
|
||||
PSurf->Bounds( Umin, Umax, Vmin, Vmax);
|
||||
BRepBuilderAPI_MakeFace MF(Surf,Umin, Umax, Vmin, Vmax);
|
||||
~~~~~
|
||||
|
||||
@@ -1066,6 +1066,120 @@ Handle(Geom2d_Curve) C2d = GeomAPI::To2d(C3d, Pln);
|
||||
Handle(Geom_Curve) C3d = GeomAPI::To3d(C2d, Pln);
|
||||
~~~~~
|
||||
|
||||
|
||||
@section occt_modalg_2_topo_tools Topological Tools
|
||||
|
||||
Open CASCADE Technology topological tools provide algorithms to
|
||||
* Create wires from edges;
|
||||
* Create faces from wires;
|
||||
* Compute state of the shape relatively other shape;
|
||||
* Orient shapes in container;
|
||||
* Create new shapes from the existing ones;
|
||||
* Build PCurves of edges on the faces;
|
||||
* Check the validity of the shapes;
|
||||
* Take the point in the face;
|
||||
* Get the normal direction for the face.
|
||||
|
||||
|
||||
@subsection occt_modalg_2_topo_tools_1 Creation of the faces from wireframe model
|
||||
|
||||
It is possible to create the planar faces from the arbitrary set of planar edges randomly located in 3D space.
|
||||
This feature might be useful if you need for instance to restore the shape from the wireframe model:
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_image062.png, "Wireframe model"}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_image063.png, "Faces of the model"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
To make the faces from edges it is, firstly, necessary to create planar wires from the given edges and than create planar faces from each wire.
|
||||
The static methods *BOPAlgo_Tools::EdgesToWires* and *BOPAlgo_Tools::WiresToFaces* can be used for that:
|
||||
~~~~~
|
||||
TopoDS_Shape anEdges = ...; /* The input edges */
|
||||
Standard_Real anAngTol = 1.e-8; /* The angular tolerance for distinguishing the planes in which the wires are located */
|
||||
Standard_Boolean bShared = Standard_False; /* Defines whether the edges are shared or not */
|
||||
//
|
||||
TopoDS_Shape aWires; /* resulting wires */
|
||||
Standard_Integer iErr = BOPAlgo_Tools::EdgesToWires(anEdges, aWires, bShared, anAngTol);
|
||||
if (iErr) {
|
||||
cout << "Error: Unable to build wires from given edges\n";
|
||||
return;
|
||||
}
|
||||
//
|
||||
TopoDS_Shape aFaces; /* resulting faces */
|
||||
Standard_Boolean bDone = BOPAlgo_Tools::WiresToFaces(aWires, aFaces, anAngTol);
|
||||
if (!bDone) {
|
||||
cout << "Error: Unable to build faces from wires\n";
|
||||
return;
|
||||
}
|
||||
~~~~~
|
||||
|
||||
These methods can also be used separately:
|
||||
* *BOPAlgo_Tools::EdgesToWires* allows creating planar wires from edges.
|
||||
The input edges may be not shared, but the output wires will be sharing the coinciding vertices and edges. For this the intersection of the edges is performed.
|
||||
Although, it is possible to skip the intersection stage (if the input edges are already shared) by passing the corresponding flag into the method.
|
||||
The input edges are expected to be planar, but the method does not check it. Thus, if the input edges are not planar, the output wires will also be not planar.
|
||||
In general, the output wires are non-manifold and may contain free vertices, as well as multi-connected vertices.
|
||||
* *BOPAlgo_Tools::WiresToFaces* allows creating planar faces from the planar wires.
|
||||
In general, the input wires are non-manifold and may be not closed, but should share the coinciding parts.
|
||||
The wires located in the same plane and completely included into other wires will create holes in the faces built from outer wires:
|
||||
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_image064.png, "Wireframe model"}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_image065.png, "Two faces (red face has a hole)"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@subsection occt_modalg_2_topo_tools_2 Classification of the shapes
|
||||
|
||||
The following methods allow classifying the different shapes relatively other shapes:
|
||||
* The variety of the *BOPTools_AlgoTools::ComputState* methods classify the vertex/edge/face relatively solid;
|
||||
* *BOPTools_AlgoTools::IsHole* classifies wire relatively face;
|
||||
* *IntTools_Tools::ClassifyPointByFace* classifies point relatively face.
|
||||
|
||||
@subsection occt_modalg_2_topo_tools_3 Orientation of the shapes in the container
|
||||
|
||||
The following methods allow reorienting shapes in the containers:
|
||||
* *BOPTools_AlgoTools::OrientEdgesOnWire* correctly orients edges on the wire;
|
||||
* *BOPTools_AlgoTools::OrientFacesOnShell* correctly orients faces on the shell.
|
||||
|
||||
@subsection occt_modalg_2_topo_tools_4 Making new shapes
|
||||
|
||||
The following methods allow creating new shapes from the existing ones:
|
||||
* The variety of the *BOPTools_AlgoTools::MakeNewVertex* creates the new vertices from other vertices and edges;
|
||||
* *BOPTools_AlgoTools::MakeSplitEdge* splits the edge by the given parameters.
|
||||
|
||||
@subsection occt_modalg_2_topo_tools_5 Building PCurves
|
||||
|
||||
The following methods allow building PCurves of edges on faces:
|
||||
* *BOPTools_AlgoTools::BuildPCurveForEdgeOnFace* computes PCurve for the edge on the face;
|
||||
* *BOPTools_AlgoTools::BuildPCurveForEdgeOnPlane* and *BOPTools_AlgoTools::BuildPCurveForEdgesOnPlane* allow building PCurves for edges on the planar face;
|
||||
* *BOPTools_AlgoTools::AttachExistingPCurve* takes PCurve on the face from one edge and attach this PCurve to other edge coinciding with the first one.
|
||||
|
||||
@subsection occt_modalg_2_topo_tools_6 Checking the validity of the shapes
|
||||
|
||||
The following methods allow checking the validity of the shapes:
|
||||
* *BOPTools_AlgoTools::IsMicroEdge* detects the small edges;
|
||||
* *BOPTools_AlgoTools::ComputeTolerance* computs the correct tolerance for the edge on the face;
|
||||
* *BOPTools_AlgoTools::CorrectShapeTolerances* and *BOPTools_AlgoTools::CorrectTolerances* allows correcting the tolerances of the sub-shapes.
|
||||
|
||||
@subsection occt_modalg_2_topo_tools_7 Taking a point inside the face
|
||||
|
||||
The following methods allow taking a point located inside the face:
|
||||
* The variety of the *BOPTools_AlgoTools3D::PointNearEdge* allows getting a point inside the face located near the edge;
|
||||
* *BOPTools_AlgoTools3D::PointInFace* allows getting a point inside the face.
|
||||
|
||||
@subsection occt_modalg_2_topo_tools_8 Getting normal for the face
|
||||
|
||||
The following methods allow getting the normal direction for the face/surface:
|
||||
* *BOPTools_AlgoTools3D::GetNormalToSurface* computes the normal direction for the surface in the given point defined by UV parameters;
|
||||
* *BOPTools_AlgoTools3D::GetNormalToFaceOnEdge* computes the normal direction for the face in the point located on the edge of the face;
|
||||
* *BOPTools_AlgoTools3D::GetApproxNormalToFaceOnEdge* computes the normal direction for the face in the point located near the edge of the face.
|
||||
|
||||
|
||||
|
||||
@section occt_modalg_3a The Topology API
|
||||
|
||||
The Topology API of Open CASCADE Technology (**OCCT**) includes the following six packages:
|
||||
@@ -2100,11 +2214,44 @@ These classes provide the following services:
|
||||
* Creation of tapered shapes using draft angles;
|
||||
* Creation of sweeps.
|
||||
|
||||
@subsection occt_modalg_7_1 Shelling
|
||||
@subsection occt_modalg_7_1 Offset computation
|
||||
|
||||
Offset computation can be performed using *BRepOffsetAPI_MakeOffsetShape*. This class provides API to the two different offset algorithms:
|
||||
|
||||
Offset algorithm based on computation of the analytical continuation. Meaning of the parameters can be found in *BRepOffsetAPI_MakeOffsetShape::PerformByJoin* method description. The list below demonstrates principal scheme of this algorithm:
|
||||
|
||||
* At the first step, the offsets are computed.
|
||||
* After this, the analytical continuations are computed for each offset.
|
||||
* Pairwise intersection is computed according to the original topological information (sharing, number of neighbors, etc.).
|
||||
* The offset shape is assembled.
|
||||
|
||||
The second algorithm is based on the fact that the offset computation for a single face without continuation can always be built. The list below shows simple offset algorithm:
|
||||
* Each surface is mapped to its geometric offset surface.
|
||||
* For each edge, pcurves are mapped to the same pcurves on offset surfaces.
|
||||
* For each edge, 3d curve is constructed by re-approximation of pcurve on the first offset face.
|
||||
* Position of each vertex in a result shell is computed as average point of all ends of edges sharing that vertex.
|
||||
* Tolerances are updated according to the resulting geometry.
|
||||
The possible drawback of the simple algorithm is that it leads, in general case, to tolerance increasing. The tolerances have to grow in order to cover the gaps between the neighbor faces in the output. It should be noted that the actual tolerance growth depends on the offset distance and the quality of joints between the input faces. Anyway the good input shell (smooth connections between adjacent faces) will lead to good result.
|
||||
|
||||
The snippets below show usage examples:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
BRepOffsetAPI_MakeOffsetShape OffsetMaker1;
|
||||
// Computes offset shape using analytical continuation mechanism.
|
||||
OffsetMaker1.PerformByJoin(Shape, OffsetValue, Tolerance);
|
||||
if (OffsetMaker1.IsDone())
|
||||
NewShape = OffsetMaker1.Shape();
|
||||
|
||||
BRepOffsetAPI_MakeOffsetShape OffsetMaker2;
|
||||
// Computes offset shape using simple algorithm.
|
||||
OffsetMaker2.PerformBySimple(Shape, OffsetValue);
|
||||
if (OffsetMaker2.IsDone())
|
||||
NewShape = OffsetMaker2.Shape();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@subsection occt_modalg_7_2 Shelling
|
||||
|
||||
Shelling is used to offset given faces of a solid by a specific value. It rounds or intersects adjacent faces along its edges depending on the convexity of the edge.
|
||||
|
||||
The constructor *BRepOffsetAPI_MakeThickSolid* shelling operator takes the solid, the list of faces to remove and an offset value as input.
|
||||
The MakeThickSolidByJoin method of the *BRepOffsetAPI_MakeThickSolid* takes the solid, the list of faces to remove and an offset value as input.
|
||||
|
||||
~~~~~
|
||||
TopoDS_Solid SolidInitial = ...;
|
||||
@@ -2119,17 +2266,28 @@ for (Standard_Integer i = 1 ;i <= n; i++) {
|
||||
LCF.Append(SF);
|
||||
}
|
||||
|
||||
Result = BRepOffsetAPI_MakeThickSolid (SolidInitial,
|
||||
LCF,
|
||||
Of,
|
||||
Tol);
|
||||
BRepOffsetAPI_MakeThickSolid SolidMaker;
|
||||
SolidMaker.MakeThickSolidByJoin(SolidInitial,
|
||||
LCF,
|
||||
Of,
|
||||
Tol);
|
||||
if (SolidMaker.IsDone())
|
||||
Result = SolidMaker.Shape();
|
||||
~~~~~
|
||||
|
||||
@image html /user_guides/modeling_algos/images/modeling_algos_image042.png "Shelling"
|
||||
@image latex /user_guides/modeling_algos/images/modeling_algos_image042.png "Shelling"
|
||||
|
||||
Also it is possible to create solid between shell, offset shell. This functionality can be called using *BRepOffsetAPI_MakeThickSolid::MakeThickSolidBySimple* method. The code below shows usage example:
|
||||
|
||||
@subsection occt_modalg_7_2 Draft Angle
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
BRepOffsetAPI_MakeThickSolid SolidMaker;
|
||||
SolidMaker.MakeThickSolidBySimple(Shell, OffsetValue);
|
||||
if (myDone.IsDone())
|
||||
Solid = SolidMaker.Shape();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@subsection occt_modalg_7_3 Draft Angle
|
||||
|
||||
*BRepOffsetAPI_DraftAngle* class allows modifying a shape by applying draft angles to its planar, cylindrical and conical faces.
|
||||
|
||||
@@ -2182,7 +2340,7 @@ else {
|
||||
@image html /user_guides/modeling_algos/images/modeling_algos_image043.png "DraftAngle"
|
||||
@image latex /user_guides/modeling_algos/images/modeling_algos_image043.png "DraftAngle"
|
||||
|
||||
@subsection occt_modalg_7_3 Pipe Constructor
|
||||
@subsection occt_modalg_7_4 Pipe Constructor
|
||||
|
||||
*BRepOffsetAPI_MakePipe* class allows creating a pipe from a Spine, which is a Wire and a Profile which is a Shape. This implementation is limited to spines with smooth transitions, sharp transitions are precessed by *BRepOffsetAPI_MakePipeShell*. To be more precise the continuity must be G1, which means that the tangent must have the same direction, though not necessarily the same magnitude, at neighboring edges.
|
||||
|
||||
@@ -2197,7 +2355,7 @@ TopoDS_Shape Pipe = BRepOffsetAPI_MakePipe(Spine,Profile);
|
||||
@image html /user_guides/modeling_algos/images/modeling_algos_image044.png "Example of a Pipe"
|
||||
@image latex /user_guides/modeling_algos/images/modeling_algos_image044.png "Example of a Pipe"
|
||||
|
||||
@subsection occt_modalg_7_4 Evolved Solid
|
||||
@subsection occt_modalg_7_5 Evolved Solid
|
||||
|
||||
*BRepOffsetAPI_MakeEvolved* class allows creating an evolved solid from a Spine (planar face or wire) and a profile (wire).
|
||||
|
||||
@@ -2893,7 +3051,7 @@ The algorithm of shape triangulation is provided by the functionality of *BRepMe
|
||||
~~~~~
|
||||
const Standard_Real aRadius = 10.0;
|
||||
const Standard_Real aHeight = 25.0;
|
||||
BRepBuilderAPI_MakeCylinder aCylinder(aRadius, aHeight);
|
||||
BRepPrimAPI_MakeCylinder aCylinder(aRadius, aHeight);
|
||||
TopoDS_Shape aShape = aCylinder.Shape();
|
||||
|
||||
const Standard_Real aLinearDeflection = 0.01;
|
||||
@@ -2924,4 +3082,4 @@ However, an application that imports models created in other applications may no
|
||||
|
||||
Meshing covers a shape with a triangular mesh. Other than hidden line removal, you can use meshing to transfer the shape to another tool: a manufacturing tool, a shading algorithm, a finite element algorithm, or a collision algorithm.
|
||||
|
||||
You can obtain information on the shape by first exploring it. To access triangulation of a face in the shape later, use *BRepTool::Triangulation*. To access a polygon, which is the approximation of an edge of the face, use *BRepTool::PolygonOnTriangulation*.
|
||||
You can obtain information on the shape by first exploring it. To access triangulation of a face in the shape later, use *BRepTool::Triangulation*. To access a polygon, which is the approximation of an edge of the face, use *BRepTool::PolygonOnTriangulation*.
|
||||
|
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 1.7 MiB |
@@ -602,6 +602,50 @@ To check the concavity of a surface, proceed as follows:
|
||||
1. Sample the surface and compute at each point the Gaussian curvature.
|
||||
2. If the value of the curvature changes of sign, the surface is concave or convex depending on the point of view.
|
||||
3. To compute a Gaussian curvature, use the class <i> SLprops</i> from <i> GeomLProp</i>, which instantiates the generic class <i> SLProps </i>from <i> LProp</i> and use the method <i> GaussianCurvature</i>.
|
||||
|
||||
@subsection occt_modat_4_2a Continuity of Curves and Surfaces
|
||||
|
||||
Types of supported continuities for curves and surfaces are described in *GeomAbs_Shape* enumeration.
|
||||
|
||||
In respect of curves, the following types of continuity are supported (see the figure below):
|
||||
* C0 (*GeomAbs_C0*) - parametric continuity. It is the same as G0 (geometric continuity), so the last one is not represented by separate variable.
|
||||
* G1 (*GeomAbs_G1*) - tangent vectors on left and on right are parallel.
|
||||
* C1 (*GeomAbs_C1*) - indicates the continuity of the first derivative.
|
||||
* G2 (*GeomAbs_G2*) - in addition to G1 continuity, the centers of curvature on left and on right are the same.
|
||||
* C2 (*GeomAbs_C2*) - continuity of all derivatives till the second order.
|
||||
* C3 (*GeomAbs_C3*) - continuity of all derivatives till the third order.
|
||||
* CN (*GeomAbs_CN*) - continuity of all derivatives till the N-th order (infinite order of continuity).
|
||||
|
||||
*Note:* Geometric continuity (G1, G2) means that the curve can be reparametrized to have parametric (C1, C2) continuity.
|
||||
|
||||
@image html /user_guides/modeling_data/images/modeling_data_continuity_curves.svg "Continuity of Curves"
|
||||
@image latex /user_guides/modeling_data/images/modeling_data_continuity_curves.svg "Continuity of Curves" width=\\textwidth
|
||||
|
||||
The following types of surface continuity are supported:
|
||||
* C0 (*GeomAbs_C0*) - parametric continuity (the surface has no points or curves of discontinuity).
|
||||
* G1 (*GeomAbs_G1*) - surface has single tangent plane in each point.
|
||||
* C1 (*GeomAbs_C1*) - indicates the continuity of the first derivatives.
|
||||
* G2 (*GeomAbs_G2*) - in addition to G1 continuity, principal curvatures and directions are continuous.
|
||||
* C2 (*GeomAbs_C2*) - continuity of all derivatives till the second order.
|
||||
* C3 (*GeomAbs_C3*) - continuity of all derivatives till the third order.
|
||||
* CN (*GeomAbs_CN*) - continuity of all derivatives till the N-th order (infinite order of continuity).
|
||||
|
||||
@image html /user_guides/modeling_data/images/modeling_data_continuity_surfaces.svg "Continuity of Surfaces"
|
||||
@image latex /user_guides/modeling_data/images/modeling_data_continuity_surfaces.svg "Continuity of Surfaces" width=\\textwidth
|
||||
|
||||
Against single surface, the connection of two surfaces (see the figure above) defines its continuity in each intersection point only. Smoothness of connection is a minimal value of continuities on the intersection curve.
|
||||
|
||||
|
||||
@subsection occt_modat_4_2b Regularity of Shared Edges
|
||||
|
||||
Regularity of an edge is a smoothness of connection of two faces sharing this edge. In other words, regularity is a minimal continuity between connected faces in each point on edge.
|
||||
|
||||
Edge's regularity can be set by *BRep_Builder::Continuity* method. To get the regularity use *BRep_Tool::Continuity* method.
|
||||
|
||||
Some algorithms like @ref occt_modalg_6 "Fillet" set regularity of produced edges by their own algorithms. On the other hand, some other algorithms (like @ref occt_user_guides__boolean_operations "Boolean Operations", @ref occt_user_guides__shape_healing "Shape Healing", etc.) do not set regularity. If the regularity is needed to be set correctly on a shape, the method *BRepLib::EncodeRegularity* can be used. It calculates and sets correct values for all edges of the shape.
|
||||
|
||||
The regularity flag is extensively used by the following high level algorithms: @ref occt_modalg_6_1_2 "Chamfer", @ref occt_modalg_7_3 "Draft Angle", @ref occt_modalg_10 "Hidden Line Removal", @ref occt_modalg_9_2_3 "Gluer".
|
||||
|
||||
|
||||
@subsection occt_modat_4_3 Global Properties of Shapes
|
||||
|
||||
@@ -1233,7 +1277,7 @@ Below is the auxiliary function, which copies the element of rank *i* from the m
|
||||
For example, in the wire in the image we want to recuperate the edges in the order {e1, e2, e3,e4, e5} :
|
||||
|
||||
@image html /user_guides/modeling_data/images/modeling_data_image014.png "A wire composed of 6 edges."
|
||||
@image latex /user_guides/modeling_data/images/modeling_data_image014.png "A wire composed of 6 edges.
|
||||
@image latex /user_guides/modeling_data/images/modeling_data_image014.png "A wire composed of 6 edges."
|
||||
|
||||
*TopExp_Explorer*, however, recuperates the lines in any order.
|
||||
|
||||
|
@@ -1945,63 +1945,51 @@ The *V3d* package is basically a set of tools directed by commands from the vie
|
||||
|
||||
@subsubsection occt_visu_4_4_2 A programming example
|
||||
|
||||
This sample TEST program for the *V3d* Package uses primary packages *Xw* and *Graphic3d* and secondary packages *Visual3d, Aspect, Quantity, Phigs* and *math*.
|
||||
This sample TEST program for the *V3d* Package uses primary packages *Xw* and *Graphic3d* and secondary packages *Visual3d, Aspect, Quantity* and *math*.
|
||||
|
||||
~~~~~
|
||||
//Create a default display connection
|
||||
Handle(Aspect_DisplayConnection) aDisplayConnection = new Aspect_DisplayConnection();
|
||||
// Create a default display connection
|
||||
Handle(Aspect_DisplayConnection) aDispConnection = new Aspect_DisplayConnection();
|
||||
|
||||
//Create a Graphic Driver from the default Aspect_DisplayConnection
|
||||
Handle(OpenGl_GraphicDriver) GD = new OpenGl_GraphicDriver (aDisplayConnection);
|
||||
// Create a Graphic Driver from the default Aspect_DisplayConnection
|
||||
Handle(OpenGl_GraphicDriver) aGraphicDriver = new OpenGl_GraphicDriver (aDispConnection);
|
||||
|
||||
//Create a Viewer to this Driver
|
||||
Handle(V3d_Viewer) VM = new V3d_Viewer(GD, 400.,
|
||||
// Space size
|
||||
V3d_Xpos,
|
||||
// Default projection
|
||||
Quantity_NOC_DARKVIOLET,
|
||||
// Default background
|
||||
V3d_ZBUFFER,
|
||||
// Type of visualization
|
||||
V3d_GOURAUD,
|
||||
// Shading model
|
||||
V3d_WAIT);
|
||||
// Update mode
|
||||
// Create a structure in this Viewer
|
||||
Handle(Graphic3d_Structure) S = new Graphic3d_Structure(VM->Viewer()) ;
|
||||
// Create a Viewer to this Driver
|
||||
Handle(V3d_Viewer) VM = new V3d_Viewer (aGraphicDriver);
|
||||
VM->SetDefaultBackgroundColor (Quantity_NOC_DARKVIOLET);
|
||||
VM->SetDefaultViewProj (V3d_Xpos);
|
||||
// Create a structure in this Viewer
|
||||
Handle(Graphic3d_Structure) aStruct = new Graphic3d_Structure (VM->Viewer());
|
||||
|
||||
// Type of structure
|
||||
S->SetVisual (Graphic3d_TOS_SHADING);
|
||||
// Type of structure
|
||||
aStruct->SetVisual (Graphic3d_TOS_SHADING);
|
||||
|
||||
// Create a group of primitives in this structure
|
||||
Handle(Graphic3d_Group) G = new Graphic3d_Group(S) ;
|
||||
Handle(Graphic3d_Group) aPrsGroup = new Graphic3d_Group (aStruct);
|
||||
|
||||
// Fill this group with one polygon of size 100
|
||||
Graphic3d_Array1OfVertex Points(0,3) ;
|
||||
Points(0).SetCoord(-100./2.,-100./2.,-100./2.) ;
|
||||
Points(1).SetCoord(-100./2., 100./2.,-100./2.) ;
|
||||
Points(2).SetCoord( 100./2., 100./2.,-100./2.) ;
|
||||
Points(3).SetCoord( 100./2.,-100./2.,-100./2.) ;
|
||||
Normal.SetCoord(0.,0.,1.) ;
|
||||
G->Polygon(Points,Normal) ;
|
||||
// Fill this group with one quad of size 100
|
||||
Handle(Graphic3d_ArrayOfTriangleStrips) aTriangles = new Graphic3d_ArrayOfTriangleStrips (4);
|
||||
aTriangles->AddVertex (-100./2., -100./2., 0.0);
|
||||
aTriangles->AddVertex (-100./2., 100./2., 0.0);
|
||||
aTriangles->AddVertex ( 100./2., -100./2., 0.0);
|
||||
aTriangles->AddVertex ( 100./2., 100./2., 0.0);
|
||||
aPrsGroup->Polygon (aTriangles);
|
||||
|
||||
// Create Ambient and Infinite Lights in this Viewer
|
||||
Handle(V3d_AmbientLight) L1 = new V3d_AmbientLight
|
||||
(VM,Quantity_NOC_GRAY50) ;
|
||||
Handle(V3d_DirectionalLight) L2 = new V3d_DirectionalLight
|
||||
(VM,V3d_XnegYnegZneg,Quantity_NOC_WHITE) ;
|
||||
Handle(V3d_AmbientLight) aLight1 = new V3d_AmbientLight (VM, Quantity_NOC_GRAY50);
|
||||
Handle(V3d_DirectionalLight) aLight2 = new V3d_DirectionalLight (VM, V3d_XnegYnegZneg, Quantity_NOC_WHITE);
|
||||
|
||||
// Create a 3D quality Window with the same DisplayConnection
|
||||
Handle(Xw_Window) W = new Xw_Window(aDisplayConnection,"Test V3d",0.5,0.5,0.5,0.5) ;
|
||||
Handle(Xw_Window) aWindow = new Xw_Window (aDispConnection, "Test V3d", 0.5, 0.5, 0.5, 0.5);
|
||||
|
||||
// Map this Window to this screen
|
||||
W->Map() ;
|
||||
// Map this Window to this screen
|
||||
aWindow->Map();
|
||||
|
||||
// Create a Perspective View in this Viewer
|
||||
Handle(V3d_View) aView = new V3d_View(VM);
|
||||
Handle(V3d_View) aView = new V3d_View (VM);
|
||||
aView->Camera()->SetProjectionType (Graphic3d_Camera::Projection_Perspective);
|
||||
// Associate this View with the Window
|
||||
aView ->SetWindow(W);
|
||||
aView ->SetWindow (aWindow);
|
||||
// Display ALL structures in this View
|
||||
VM->Viewer()->Display();
|
||||
// Finally update the Visualization in this View
|
||||
|
@@ -156,14 +156,16 @@ You can then query or edit this Assembly node, the Main Item or another one (*my
|
||||
|
||||
**Note** that for the examples in the rest of this guide, *myAssembly* is always presumed to be accessed this way, so this information will not be repeated.
|
||||
|
||||
@subsubsection occt_xde_2_2_3 Updating the Assembly after Filling or Editing
|
||||
@subsubsection occt_xde_2_2_3 Updating the Assemblies after Filling or Editing
|
||||
Some actions in this chapter affect the content of the document, considered as an Assembly. As a result, you will sometimes need to update various representations (including the compounds).
|
||||
|
||||
To update the representations, use:
|
||||
~~~~~
|
||||
myAssembly->UpdateAssembly(aLabel);
|
||||
myAssembly->UpdateAssemblies();
|
||||
~~~~~
|
||||
Since this call is always used by the editing functions, you need not apply it for such functions. However, you will need this call if special edits, not using XCAF functions, are used on the document.
|
||||
This call performs a top-down update of the Assembly compounds stored in the document.
|
||||
|
||||
**Note** that you have to run this method manually to actualize your Assemblies after any low-level modifications on shapes.
|
||||
|
||||
@subsubsection occt_xde_2_2_4 Adding or Setting Top Level Shapes
|
||||
|
||||
|
@@ -222,7 +222,7 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->Select(theX1, theY1, theX2, theY2, myView());
|
||||
myAISContext()->Select (theX1, theY1, theX2, theY2, myView(), Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->Select();
|
||||
myAISContext()->Select (Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
{
|
||||
if ((!myAISContext().IsNull()) && (!myView().IsNull()))
|
||||
{
|
||||
myAISContext()->MoveTo(theX, theY, myView());
|
||||
myAISContext()->MoveTo (theX, theY, myView(), Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ public:
|
||||
{
|
||||
if ((!myAISContext().IsNull()) && (!myView().IsNull()))
|
||||
{
|
||||
myAISContext()->ShiftSelect(theX1, theY1, theX2, theY2, myView());
|
||||
myAISContext()->ShiftSelect (theX1, theY1, theX2, theY2, myView(), Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->ShiftSelect();
|
||||
myAISContext()->ShiftSelect (Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,15 +463,15 @@ public:
|
||||
aCurrentMode=AIS_Shaded;
|
||||
}
|
||||
|
||||
if(myAISContext()->NbCurrents()==0 || myAISContext()->NbSelected()==0)
|
||||
if(myAISContext()->NbSelected()==0)
|
||||
{
|
||||
myAISContext()->SetDisplayMode(aCurrentMode);
|
||||
myAISContext()->SetDisplayMode (aCurrentMode, Standard_False);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent())
|
||||
for(myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
||||
{
|
||||
myAISContext()->SetDisplayMode(myAISContext()->Current(), theMode, Standard_False);
|
||||
myAISContext()->SetDisplayMode (myAISContext()->SelectedInteractive(), theMode, Standard_False);
|
||||
}
|
||||
}
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
@@ -487,10 +487,11 @@ public:
|
||||
return;
|
||||
}
|
||||
Quantity_Color aCol = Quantity_Color(theR/255.,theG/255.,theB/255.,Quantity_TOC_RGB);
|
||||
for (;myAISContext()->MoreCurrent ();myAISContext()->NextCurrent ())
|
||||
for (; myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
||||
{
|
||||
myAISContext()->SetColor (myAISContext()->Current(),aCol.Name());
|
||||
myAISContext()->SetColor (myAISContext()->SelectedInteractive(), aCol.Name(), Standard_False);
|
||||
}
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -527,15 +528,15 @@ public:
|
||||
theBlue=255;
|
||||
Handle(AIS_InteractiveObject) aCurrent ;
|
||||
Quantity_Color anObjCol;
|
||||
myAISContext()->InitCurrent();
|
||||
if (!myAISContext()->MoreCurrent())
|
||||
myAISContext()->InitSelected();
|
||||
if (!myAISContext()->MoreSelected())
|
||||
{
|
||||
return;
|
||||
}
|
||||
aCurrent = myAISContext()->Current();
|
||||
aCurrent = myAISContext()->SelectedInteractive();
|
||||
if ( aCurrent->HasColor () )
|
||||
{
|
||||
anObjCol = myAISContext()->Color(myAISContext()->Current());
|
||||
anObjCol = myAISContext()->Color(aCurrent);
|
||||
Quantity_Parameter r1, r2, r3;
|
||||
anObjCol.Values(r1, r2, r3, Quantity_TOC_RGB);
|
||||
theRed=(int)r1*255;
|
||||
@@ -575,8 +576,8 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
myAISContext()->EraseSelected (Standard_True);
|
||||
myAISContext()->ClearCurrents();
|
||||
myAISContext()->EraseSelected (Standard_False);
|
||||
myAISContext()->ClearSelected (Standard_True);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -596,9 +597,9 @@ public:
|
||||
{
|
||||
return;
|
||||
}
|
||||
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent (); myAISContext()->NextCurrent () )
|
||||
for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
||||
{
|
||||
myAISContext()->SetMaterial( myAISContext()->Current(), (Graphic3d_NameOfMaterial)theMaterial );
|
||||
myAISContext()->SetMaterial (myAISContext()->SelectedInteractive(), (Graphic3d_NameOfMaterial)theMaterial, Standard_False);
|
||||
}
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
@@ -612,10 +613,11 @@ public:
|
||||
{
|
||||
return;
|
||||
}
|
||||
for( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextSelected() )
|
||||
for( myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected() )
|
||||
{
|
||||
myAISContext()->SetTransparency( myAISContext()->Current(), ((Standard_Real)theTrans) / 10.0 );
|
||||
myAISContext()->SetTransparency (myAISContext()->SelectedInteractive(), ((Standard_Real)theTrans) / 10.0, Standard_False);
|
||||
}
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -627,8 +629,8 @@ public:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
myAISContext()->InitCurrent();
|
||||
return myAISContext()->MoreCurrent() != Standard_False;
|
||||
myAISContext()->InitSelected();
|
||||
return myAISContext()->MoreSelected() != Standard_False;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -643,13 +645,13 @@ public:
|
||||
int aMode = -1;
|
||||
bool OneOrMoreInShading = false;
|
||||
bool OneOrMoreInWireframe = false;
|
||||
for (myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent())
|
||||
for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
|
||||
{
|
||||
if ( myAISContext()->IsDisplayed( myAISContext()->Current(), 1 ) )
|
||||
if ( myAISContext()->IsDisplayed( myAISContext()->SelectedInteractive(), 1 ) )
|
||||
{
|
||||
OneOrMoreInShading = true;
|
||||
}
|
||||
if ( myAISContext()->IsDisplayed( myAISContext()->Current(), 0 ) )
|
||||
if ( myAISContext()->IsDisplayed( myAISContext()->SelectedInteractive(), 0 ) )
|
||||
{
|
||||
OneOrMoreInWireframe = true;
|
||||
}
|
||||
@@ -753,11 +755,8 @@ public:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(myAISContext()->HasOpenedContext())
|
||||
{
|
||||
myAISContext()->CloseLocalContext();
|
||||
}
|
||||
myAISContext()->Display(new AIS_Shape(aShape));
|
||||
|
||||
myAISContext()->Display (new AIS_Shape (aShape), Standard_True);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -786,8 +785,9 @@ public:
|
||||
for ( int i = 1; i <= aNbShap; i++ )
|
||||
{
|
||||
TopoDS_Shape aShape = aReader.Shape( i );
|
||||
myAISContext()->Display(new AIS_Shape(aShape));
|
||||
myAISContext()->Display (new AIS_Shape (aShape), Standard_False);
|
||||
}
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -813,7 +813,7 @@ public:
|
||||
{
|
||||
aReader.TransferRoots();
|
||||
TopoDS_Shape aShape = aReader.OneShape();
|
||||
myAISContext()->Display(new AIS_Shape(aShape));
|
||||
myAISContext()->Display (new AIS_Shape (aShape), Standard_False);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -830,13 +830,13 @@ public:
|
||||
/// <param name="theFileName">Name of export file</param>
|
||||
bool ExportBRep(char* theFileName)
|
||||
{
|
||||
myAISContext()->InitCurrent();
|
||||
if (!myAISContext()->MoreCurrent())
|
||||
myAISContext()->InitSelected();
|
||||
if (!myAISContext()->MoreSelected())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->SelectedInteractive();
|
||||
Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast(anIO);
|
||||
return BRepTools::Write (anIS->Shape(), (Standard_CString)theFileName) != Standard_False;
|
||||
}
|
||||
@@ -850,9 +850,9 @@ public:
|
||||
STEPControl_StepModelType aType = STEPControl_AsIs;
|
||||
IFSelect_ReturnStatus aStatus;
|
||||
STEPControl_Writer aWriter;
|
||||
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
|
||||
for ( myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected() )
|
||||
{
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->SelectedInteractive();
|
||||
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
|
||||
TopoDS_Shape aShape = anIS->Shape();
|
||||
aStatus = aWriter.Transfer( aShape , aType );
|
||||
@@ -881,9 +881,9 @@ public:
|
||||
IGESControl_Writer aWriter( Interface_Static::CVal( "XSTEP.iges.unit" ),
|
||||
Interface_Static::IVal( "XSTEP.iges.writebrep.mode" ) );
|
||||
|
||||
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
|
||||
for ( myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected() )
|
||||
{
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->SelectedInteractive();
|
||||
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
|
||||
TopoDS_Shape aShape = anIS->Shape();
|
||||
aWriter.AddShape ( aShape );
|
||||
@@ -903,9 +903,9 @@ public:
|
||||
BRep_Builder aBuilder;
|
||||
aBuilder.MakeCompound( aRes );
|
||||
|
||||
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
|
||||
for ( myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected() )
|
||||
{
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->SelectedInteractive();
|
||||
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
|
||||
TopoDS_Shape aShape = anIS->Shape();
|
||||
if ( aShape.IsNull() )
|
||||
@@ -932,9 +932,9 @@ public:
|
||||
BRep_Builder aBuilder;
|
||||
aBuilder.MakeCompound( aComp );
|
||||
|
||||
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
|
||||
for ( myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected() )
|
||||
{
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->SelectedInteractive();
|
||||
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
|
||||
TopoDS_Shape aShape = anIS->Shape();
|
||||
if ( aShape.IsNull() )
|
||||
|