1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

Compare commits

..

1 Commits

Author SHA1 Message Date
jgv
a5f4ef48dd 0032098: Bad tolerance of result of BRepOffset_MakeOffset
Some changes in BRepOffset_MakeOffset
2021-01-29 16:55:50 +03:00
3442 changed files with 40424 additions and 43400 deletions

View File

@@ -364,25 +364,12 @@ if (MSVC)
endif()
# whether use optional 3rdparty or not
set (USE_TK ON CACHE BOOL "${USE_TK_DESCR}")
set (USE_FREETYPE ON CACHE BOOL "${USE_FREETYPE_DESCR}")
set (USE_FREEIMAGE OFF CACHE BOOL "${USE_FREEIMAGE_DESCR}")
set (USE_FFMPEG OFF CACHE BOOL "${USE_FFMPEG_DESCR}")
set (USE_OPENVR OFF CACHE BOOL "${USE_OPENVR_DESCR}")
set (USE_RAPIDJSON OFF CACHE BOOL "${USE_RAPIDJSON_DESCR}")
set (USE_TBB OFF CACHE BOOL "${USE_TBB_DESCR}")
set (USE_EIGEN OFF CACHE BOOL "${USE_EIGEN_DESCR}")
if (APPLE)
set (USE_GLX OFF CACHE BOOL "${USE_GLX_DESCR}")
else()
set (USE_GLX OFF)
endif()
if (WIN32)
set (USE_D3D OFF CACHE BOOL "${USE_D3D_DESCR}")
else()
set (USE_D3D OFF)
endif()
# Enable/Disable the floating point exceptions (FPE) during runtime.
@@ -396,15 +383,6 @@ else()
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER 0)
endif()
# OpenGL
if (ANDROID OR IOS OR EMSCRIPTEN OR "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
set (USE_OPENGL OFF)
set (USE_GLES2 ON)
else()
set (USE_OPENGL ON CACHE BOOL "${USE_OPENGL_DESCR}")
set (USE_GLES2 OFF CACHE BOOL "${USE_GLES2_DESCR}")
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
@@ -436,6 +414,10 @@ if (NOT DEFINED BUILD_DOC_Overview)
set (BUILD_DOC_Overview ${CAN_DOXYGEN_BE_USED} CACHE BOOL "${BUILD_DOC_Overview_DESCR}")
endif()
if (NOT USE_D3D)
list (REMOVE_ITEM Visualization_TOOLKITS TKD3DHost)
endif()
# accumulate used toolkits (first level) in BUILD_TOOLKITS variable
list (APPEND BUILD_TOOLKITS ${BUILD_ADDITIONAL_TOOLKITS})
@@ -502,56 +484,35 @@ endif()
# search for CSF variable in EXTERNLIB of each being used toolkit
OCCT_IS_PRODUCT_REQUIRED (CSF_FreeImagePlus CAN_USE_FREEIMAGE)
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
OCCT_IS_PRODUCT_REQUIRED (CSF_TclTkLibs CAN_USE_TK)
OCCT_IS_PRODUCT_REQUIRED (CSF_FREETYPE CAN_USE_FREETYPE)
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlLibs CAN_USE_OPENGL)
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlesLibs CAN_USE_GLES2)
OCCT_IS_PRODUCT_REQUIRED (CSF_FREETYPE USE_FREETYPE)
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlLibs CAN_USE_GLES2)
OCCT_IS_PRODUCT_REQUIRED (CSF_TBB CAN_USE_TBB)
OCCT_IS_PRODUCT_REQUIRED (CSF_EIGEN CAN_USE_EIGEN)
# define CSF variable
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_csf")
# Tcl (mandatory for Draw Harness)
if (USE_TCL)
message (STATUS "Info: TCL is used by OCCT")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tcl")
message (STATUS "Info: TK is used by OCCT")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tk")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TCL")
OCCT_CHECK_AND_UNSET ("INSTALL_TCL")
endif()
# Tk (optional for Draw Harness)
if (CAN_USE_TK)
if (USE_TK)
message (STATUS "Info: TK is used by OCCT")
add_definitions (-DHAVE_TK)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tk")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TK")
OCCT_CHECK_AND_UNSET ("INSTALL_TK")
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_TK")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TK")
OCCT_CHECK_AND_UNSET ("INSTALL_TCL")
OCCT_CHECK_AND_UNSET ("INSTALL_TK")
endif()
# FreeType
if (CAN_USE_FREETYPE)
if (USE_FREETYPE)
message (STATUS "Info: FreeType is used by OCCT")
add_definitions (-DHAVE_FREETYPE)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freetype")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREETYPE")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build")
OCCT_CHECK_AND_UNSET ("INSTALL_FREETYPE")
endif()
if (USE_FREETYPE)
message (STATUS "Info: Freetype is used by OCCT")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freetype")
else()
OCCT_CHECK_AND_UNSET ("USE_FREETYPE")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREETYPE")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build")
OCCT_CHECK_AND_UNSET ("INSTALL_FREETYPE")
endif()
@@ -571,6 +532,14 @@ else()
endif()
endif()
# D3D
if (USE_D3D)
add_definitions (-DHAVE_D3D)
#if(MSVC_VERSION LESS 1700)
#OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/d3d")
#endif()
endif()
# GLX
if (USE_GLX)
add_definitions (-DMACOSX_USE_GLX)
@@ -578,7 +547,10 @@ if (USE_GLX)
endif()
# FREEIMAGE
if (CAN_USE_FREEIMAGE)
set (USE_FREEIMAGE OFF CACHE BOOL "${USE_FREEIMAGE_DESCR}")
if (USE_FREEIMAGE)
add_definitions (-DHAVE_FREEIMAGE)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freeimage")
@@ -597,6 +569,8 @@ endif()
# search for CSF_OpenVR variable in EXTERNLIB of each being used toolkit
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenVR CAN_USE_OPENVR)
if (CAN_USE_OPENVR)
set (USE_OPENVR OFF CACHE BOOL "${USE_OPENVR_DESCR}")
if (USE_OPENVR)
add_definitions (-DHAVE_OPENVR)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/openvr")
@@ -616,6 +590,8 @@ endif()
OCCT_IS_PRODUCT_REQUIRED (CSF_FFmpeg CAN_USE_FFMPEG)
if (CAN_USE_FFMPEG)
set (USE_FFMPEG OFF CACHE BOOL "${USE_FFMPEG_DESCR}")
if (USE_FFMPEG)
add_definitions (-DHAVE_FFMPEG)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/ffmpeg")
@@ -630,31 +606,23 @@ else()
OCCT_CHECK_AND_UNSET ("INSTALL_FFMPEG")
endif()
# OpenGL
if (CAN_USE_OPENGL)
if (USE_OPENGL)
add_definitions (-DHAVE_OPENGL_EXT)
else()
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGl)
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGlTest)
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_OPENGL")
endif()
# OpenGL ES 2.0
if (CAN_USE_GLES2)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
set (USE_GLES2 ON)
else()
set (USE_GLES2 OFF CACHE BOOL "${USE_GLES2_DESCR}")
endif()
if (USE_GLES2)
add_definitions (-DHAVE_GLES2_EXT)
add_definitions (-DHAVE_GLES2)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EGL")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GLES2")
OCCT_CHECK_AND_UNSET ("INSTALL_EGL")
OCCT_CHECK_AND_UNSET ("INSTALL_GLES2")
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGles)
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGlesTest)
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_GLES2")
@@ -665,19 +633,10 @@ else()
OCCT_CHECK_AND_UNSET ("INSTALL_GLES2")
endif()
# D3D
if (USE_D3D)
add_definitions (-DHAVE_D3D)
#if(MSVC_VERSION LESS 1700)
#OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/d3d")
#endif()
else()
list (REMOVE_ITEM BUILD_TOOLKITS TKD3DHost)
list (REMOVE_ITEM BUILD_TOOLKITS TKD3DHostTest)
endif()
# TBB
if (NOT DEFINED ANDROID AND CAN_USE_TBB)
set (USE_TBB OFF CACHE BOOL "${USE_TBB_DESCR}")
if (USE_TBB)
add_definitions (-DHAVE_TBB)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tbb")
@@ -698,6 +657,8 @@ endif()
# search for CSF_RapidJSON variable in EXTERNLIB of each being used toolkit
OCCT_IS_PRODUCT_REQUIRED (CSF_RapidJSON CAN_USE_RAPIDJSON)
if (CAN_USE_RAPIDJSON)
set (USE_RAPIDJSON OFF CACHE BOOL "${USE_RAPIDJSON_DESCR}")
if (USE_RAPIDJSON)
add_definitions (-DHAVE_RAPIDJSON)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/rapidjson")
@@ -714,6 +675,8 @@ endif()
# 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")
@@ -1176,9 +1139,6 @@ foreach (OCCT_TOOLKIT ${BUILD_TOOLKITS})
endforeach()
list (REMOVE_DUPLICATES OCCT_MODULES_ENABLED)
list (REMOVE_DUPLICATES OCCT_COMPILE_DEFINITIONS)
# these macros are defined for specific tookits, not globalwise
list (REMOVE_ITEM OCCT_COMPILE_DEFINITIONS HAVE_OPENGL)
list (REMOVE_ITEM OCCT_COMPILE_DEFINITIONS HAVE_GLES2)
# export compile definitions and C/C++ flags for each configuration to OpenCASCADE config files
foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})

View File

@@ -1,7 +1,7 @@
FoundationClasses TKernel TKMath
ModelingData TKG2d TKG3d TKGeomBase TKBRep
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
Visualization TKService TKV3d TKOpenGl TKOpenGles TKMeshVS TKIVtk TKD3DHost
Visualization TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF
DataExchange TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh
Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE

View File

@@ -207,7 +207,6 @@ n Image
n Media
n MeshVS
n OpenGl
n OpenGles
n D3DHost
n Prs3d
n PrsMgr
@@ -225,7 +224,6 @@ r Shaders
r XRResources
t TKMeshVS
t TKOpenGl
t TKOpenGles
t TKD3DHost
t TKService
t TKV3d
@@ -404,9 +402,6 @@ n HLRTest
n MeshTest
n SWDRAW
n TObjDRAW
n OpenGlTest
n OpenGlesTest
n D3DHostTest
n ViewerTest
n XDEDRAW
n XSDRAW
@@ -418,9 +413,6 @@ t TKDCAF
t TKDraw
t TKTObjDRAW
t TKTopTest
t TKOpenGlTest
t TKOpenGlesTest
t TKD3DHostTest
t TKViewerTest
t TKXDEDRAW
t TKXSDRAW

View File

@@ -1,3 +1,3 @@
# EGL
THIRDPARTY_PRODUCT("EGL" "EGL/egl.h" "CSF_OpenGlesLibs" "")
THIRDPARTY_PRODUCT("EGL" "EGL/egl.h" "CSF_OpenGlLibs" "")

View File

@@ -1,3 +1,3 @@
# OpenGL ES 2.0
THIRDPARTY_PRODUCT("GLES2" "GLES2/gl2.h" "CSF_OpenGlesLibs" "")
THIRDPARTY_PRODUCT("GLES2" "GLES2/gl2.h" "CSF_OpenGlLibs" "")

View File

@@ -49,28 +49,18 @@ else()
set (CSF_OpenVR)
endif()
# TCL
# TCL/TK
if (USE_TCL)
if (WIN32)
set (CSF_TclLibs "tcl86")
else()
if(APPLE)
set (CSF_TclLibs Tcl)
elseif(UNIX)
set (CSF_TclLibs "tcl8.6")
endif()
endif()
endif()
# TK
if (USE_TK)
if (WIN32)
set (CSF_TclTkLibs "tk86")
else()
if(APPLE)
set (CSF_TclTkLibs Tk)
set (CSF_TclLibs Tcl)
elseif(UNIX)
set (CSF_TclTkLibs "tk8.6")
set (CSF_TclLibs "tcl8.6")
set (CSF_TclTkLibs "tk8.6")
endif()
endif()
endif()
@@ -84,8 +74,12 @@ if (WIN32)
set (CSF_psapi "psapi.lib")
set (CSF_winmm "winmm.lib")
set (CSF_d3d9 "D3D9.lib")
set (CSF_OpenGlLibs "opengl32.lib")
set (CSF_OpenGlesLibs "libEGL libGLESv2")
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2)
set (CSF_OpenGlLibs "libEGL libGLESv2")
else()
set (CSF_OpenGlLibs "opengl32.lib")
endif()
else()
if (APPLE)
@@ -106,9 +100,9 @@ else()
OCCT_CHECK_AND_UNSET (IOKit_LIB)
if (IOS)
find_library (OpenGlesLibs_LIB NAMES OpenGLES)
set (CSF_OpenGlesLibs ${OpenGlesLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlesLibs_LIB)
find_library (OpenGlLibs_LIB NAMES OpenGLES)
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
elseif (USE_GLX)
set (CSF_OpenGlLibs GL)
set (CSF_XwLibs "X11 Xext Xmu Xi")
@@ -117,19 +111,20 @@ else()
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
endif()
elseif (ANDROID)
set (CSF_ThreadLibs "c")
set (CSF_OpenGlesLibs "EGL GLESv2")
set (CSF_OpenGlLibs "EGL GLESv2")
set (CSF_androidlog "log")
elseif (UNIX)
set (CSF_ThreadLibs "pthread rt stdc++")
set (CSF_OpenGlLibs "GL")
set (CSF_OpenGlesLibs "EGL GLESv2")
if (USE_GLES2)
set (CSF_OpenGlLibs "EGL GLESv2")
else()
set (CSF_OpenGlLibs "GL")
endif()
set (CSF_XwLibs "X11 Xext Xmu Xi")
set (CSF_dl "dl")
if (USE_FREETYPE)
set (CSF_fontconfig "fontconfig")
endif()
set (CSF_fontconfig "fontconfig")
endif()
endif()

View File

@@ -303,13 +303,6 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
else() # get CSF_ value
set (CURRENT_CSF ${${USED_ITEM}})
if (NOT "x${CURRENT_CSF}" STREQUAL "x")
if ("${CURRENT_CSF}" STREQUAL "CSF_OpenGlLibs")
add_definitions (-DHAVE_OPENGL)
endif()
if ("${CURRENT_CSF}" STREQUAL "CSF_OpenGlesLibs")
add_definitions (-DHAVE_GLES2)
endif()
set (LIBRARY_FROM_CACHE 0)
separate_arguments (CURRENT_CSF)
foreach (CSF_LIBRARY ${CURRENT_CSF})

View File

@@ -155,18 +155,12 @@ set (3RDPARTY_DIR_DESCR
third-party product have been found - corresponding CMake variables will be specified
(VTK: 3RDPARTY_VTK_DIR, 3RDPARTY_VTK_INCLUDE_DIR, 3RDPARTY_VTK_LIBRARY_DIR)")
set (USE_TK_DESCR
"Indicates whether Tk product should be used by Draw Harness for user interface")
set (USE_FREETYPE_DESCR
"Indicates whether FreeType product should be used in OCCT for text rendering using external font files")
set (USE_FFMPEG_DESCR
"Indicates whether FFmpeg framework is used or not. FFmpeg stands for
multimedia data handling, open-source software libraries used for video encoding and decoding.")
set (USE_FREEIMAGE_DESCR
"Indicates whether FreeImage product should be used in OCCT visualization
"Indicates whether Freeimage product should be used in OCCT visualization
module for support of popular graphics image formats (PNG, BMP etc)")
set (USE_OPENVR_DESCR
@@ -180,10 +174,9 @@ set (USE_EGL_DESCR
"Indicates whether EGL should be used in OCCT visualization
module instead of conventional OpenGL context creation APIs")
set (USE_OPENGL_DESCR
"Indicates whether OpenGL desktop should be used in OCCT visualization module")
set (USE_GLES2_DESCR
"Indicates whether OpenGL ES 2.0 should be used in OCCT visualization module")
"Indicates whether OpenGL ES 2.0 should be used in OCCT visualization
module instead of desktop OpenGL")
set (USE_TBB_DESCR
"Indicates whether TBB is used or not. TBB stands for Threading Building Blocks,

View File

@@ -175,9 +175,7 @@ proc wokdep:gui:UpdateList {} {
set anBin32Errs {}
set anBin64Errs {}
wokdep:SearchTclTk anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
if { "$::HAVE_FREETYPE" == "true" } {
wokdep:SearchFreeType anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
}
wokdep:SearchFreeType anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
wokdep:SearchX11 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
if { "$::HAVE_GLES2" == "true" } {
wokdep:SearchEGL anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
@@ -473,8 +471,6 @@ ttk::label .myFrame.myHxxChecks.myScutsLbl -text "Strategy for filling he
ttk::label .myFrame.mySrchLbl -text "3rd-parties search path:" -padding {5 5 80 5}
entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH_INPUT -width 80
ttk::button .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
checkbutton .myFrame.myChecks.myFreeTypeCheck -offvalue "false" -onvalue "true" -variable HAVE_FREETYPE -command wokdep:gui:UpdateList
ttk::label .myFrame.myChecks.myFreeTypeLbl -text "Use FreeType"
checkbutton .myFrame.myChecks.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
ttk::label .myFrame.myChecks.myFImageLbl -text "Use FreeImage"
checkbutton .myFrame.myChecks.myTbbCheck -offvalue "false" -onvalue "true" -variable HAVE_TBB -command wokdep:gui:UpdateList
@@ -608,10 +604,10 @@ incr aRowIter
grid .myFrame.myChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myChecks.myFreeTypeCheck -row $aCheckRowIter -column 0 -sticky e
grid .myFrame.myChecks.myFreeTypeLbl -row $aCheckRowIter -column 1 -sticky w
grid .myFrame.myChecks.myRapidJsonCheck -row $aCheckRowIter -column 2 -sticky e
grid .myFrame.myChecks.myRapidJsonLbl -row $aCheckRowIter -column 3 -sticky w
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
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
@@ -625,10 +621,10 @@ grid .myFrame.myChecks.myQtCheck -row $aCheckRowIter -column 12 -sticky e
grid .myFrame.myChecks.myQtLbl -row $aCheckRowIter -column 13 -sticky w
incr aCheckRowIter
grid .myFrame.myChecks.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.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
if { "$::tcl_platform(platform)" == "windows" } {
grid .myFrame.myChecks.myD3dCheck -row $aCheckRowIter -column 4 -sticky e
grid .myFrame.myChecks.myD3dLbl -row $aCheckRowIter -column 5 -sticky w
@@ -642,10 +638,8 @@ grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 12 -sticky e
grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 13 -sticky w
incr aCheckRowIter
grid .myFrame.myChecks.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.myRapidJsonCheck -row $aCheckRowIter -column 0 -sticky e
grid .myFrame.myChecks.myRapidJsonLbl -row $aCheckRowIter -column 1 -sticky w
grid .myFrame.myChecks.myOpenVrCheck -row $aCheckRowIter -column 4 -sticky e
grid .myFrame.myChecks.myOpenVrLbl -row $aCheckRowIter -column 5 -sticky w
grid .myFrame.myChecks.myE57Check -row $aCheckRowIter -column 6 -sticky e

View File

@@ -68,11 +68,9 @@ if { [info exists ::env(SHORTCUT_HEADERS)] } {
}
# fetch environment variables (e.g. set by custom.sh or custom.bat) and set them as tcl variables with the same name
set THE_ENV_VARIABLES {HAVE_TK HAVE_FREETYPE HAVE_FREEIMAGE HAVE_FFMPEG HAVE_TBB HAVE_GLES2 HAVE_D3D HAVE_VTK HAVE_ZLIB HAVE_LIBLZMA HAVE_E57 HAVE_RAPIDJSON HAVE_OPENVR HAVE_OPENCL CHECK_QT4 CHECK_JDK MACOSX_USE_GLX HAVE_RelWithDebInfo BUILD_Inspector}
foreach anEnvIter $THE_ENV_VARIABLES { set ${anEnvIter} "false" }
set HAVE_TK "true"
set HAVE_FREETYPE "true"
set THE_ENV_VARIABLES {HAVE_FREEIMAGE HAVE_FFMPEG HAVE_TBB HAVE_GLES2 HAVE_D3D HAVE_VTK HAVE_ZLIB HAVE_LIBLZMA HAVE_E57 HAVE_RAPIDJSON HAVE_OPENVR HAVE_OPENCL CHECK_QT4 CHECK_JDK MACOSX_USE_GLX HAVE_RelWithDebInfo BUILD_Inspector}
foreach anEnvIter $THE_ENV_VARIABLES {
set ${anEnvIter} "false"
if { [info exists ::env(${anEnvIter})] } {
set ${anEnvIter} "$::env(${anEnvIter})"
}

View File

@@ -686,17 +686,6 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
# Write specific options
if { $docType == "REFMAN" } {
# always include optional components
set aHaveD3dBack ""
set aHaveGlesBack ""
set aHaveVtkBack ""
if { [info exists ::env(HAVE_D3D)] } { set aHaveD3dBack "$::env(HAVE_D3D)" }
if { [info exists ::env(HAVE_GLES2)] } { set aHaveGlesBack "$::env(HAVE_GLES2)" }
if { [info exists ::env(HAVE_VTK)] } { set aHaveVtkBack "$::env(HAVE_VTK)" }
set ::env(HAVE_D3D) "true"
set ::env(HAVE_GLES2) "true"
set ::env(HAVE_VTK) "true"
# Load lists of modules scripts
if { $productsPath == "" } {
set modules_scripts [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $productsPath]/OS/" *.tcl]
@@ -822,11 +811,6 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
puts $doxyFile ""
# restore environment variables
set ::env(HAVE_D3D) "$aHaveD3dBack"
set ::env(HAVE_GLES2) "$aHaveGlesBack"
set ::env(HAVE_VTK) "$aHaveVtkBack"
} elseif { $docType == "OVERVIEW" } {
# Add common options for generation of Overview and User Guides

View File

@@ -129,7 +129,7 @@ proc osutils:isEqualContent { theContent1 theContent2 } {
# Auxiliary function for writing new file content only if it has been actually changed
# (e.g. to preserve file timestamp on no change).
# Useful for automatically (re)generated files.
proc osutils:writeTextFile { theFile theContent {theEol lf} {theToBackup false} } {
proc osutils:writeTextFile { theFile theContent {theEol lf} } {
if {[file exists "${theFile}"]} {
set aFileOld [open "${theFile}" rb]
fconfigure $aFileOld -translation crlf
@@ -143,10 +143,6 @@ proc osutils:writeTextFile { theFile theContent {theEol lf} {theToBackup false}
return false
}
if { $theToBackup == true } {
puts "Warning: file ${theFile} is updated. Old content is saved to ${theFile}.bak"
file copy -force -- "${theFile}" "${theFile}.bak"
}
file delete -force "${theFile}"
}
@@ -377,28 +373,29 @@ proc copy_with_warning {from to} {
# Generate auxiliary scripts for launching IDE.
proc genprojbat {theFormat thePlatform theSolution} {
set aTargetPlatformExt sh
set aTargetEol lf
if { $thePlatform == "wnt" || $thePlatform == "uwp" } {
set aTargetPlatformExt bat
set aTargetEol crlf
}
if { [file exists "$::path/src/OS/FoundationClasses.tcl"] || ![file exists "$::path/env.${aTargetPlatformExt}"] } {
# generate env.bat/sh
set anEnvTmplFilePath "$::THE_CASROOT/adm/templates/env.${aTargetPlatformExt}"
set anEnvTmplFile [open "$anEnvTmplFilePath" "r"]
set anEnvTmpl [read $anEnvTmplFile]
close $anEnvTmplFile
if {"$theFormat" != "cmake"} {
# copy env.bat/sh only if not yet present
if { ! [file exists "$::path/env.${aTargetPlatformExt}"] } {
set anEnvTmplFile [open "$::THE_CASROOT/adm/templates/env.${aTargetPlatformExt}" "r"]
set anEnvTmpl [read $anEnvTmplFile]
close $anEnvTmplFile
set aCasRoot ""
if { [file normalize "$::path"] != [file normalize "$::THE_CASROOT"] } {
set aCasRoot [relativePath "$::path" "$::THE_CASROOT"]
set aCasRoot ""
if { [file normalize "$::path"] != [file normalize "$::THE_CASROOT"] } {
set aCasRoot [relativePath "$::path" "$::THE_CASROOT"]
}
regsub -all -- {__CASROOT__} $anEnvTmpl "$aCasRoot" anEnvTmpl
set anEnvFile [open "$::path/env.${aTargetPlatformExt}" "w"]
puts $anEnvFile $anEnvTmpl
close $anEnvFile
}
regsub -all -- {__CASROOT__} $anEnvTmpl "$aCasRoot" anEnvTmpl
set aLineList [split $anEnvTmpl "\n"]
osutils:writeTextFile "$::path/env.${aTargetPlatformExt}" $aLineList $aTargetEol true
copy_with_warning "$::THE_CASROOT/adm/templates/draw.${aTargetPlatformExt}" "$::path/draw.${aTargetPlatformExt}"
if { "$::BUILD_Inspector" == "true" } {
@@ -1412,13 +1409,9 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} {
unset theCsfLibsMap
unset theCsfFrmsMap
if { "$::HAVE_FREETYPE" == "true" } {
set aLibsMap(CSF_FREETYPE) "freetype"
}
set aLibsMap(CSF_FREETYPE) "freetype"
set aLibsMap(CSF_TclLibs) "tcl8.6"
if { "$::HAVE_TK" == "true" } {
set aLibsMap(CSF_TclTkLibs) "tk8.6"
}
set aLibsMap(CSF_TclTkLibs) "tk8.6"
if { "$::HAVE_FREEIMAGE" == "true" } {
if { "$theOS" == "wnt" } {
set aLibsMap(CSF_FreeImagePlus) "FreeImage"
@@ -1468,15 +1461,15 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} {
set aLibsMap(CSF_netapi32) "netapi32"
set aLibsMap(CSF_winmm) "winmm"
set aLibsMap(CSF_OpenGlLibs) "opengl32"
set aLibsMap(CSF_OpenGlesLibs) "libEGL libGLESv2"
if { "$::HAVE_GLES2" == "true" } {
set aLibsMap(CSF_OpenGlLibs) "libEGL libGLESv2"
}
set aLibsMap(CSF_psapi) "Psapi"
set aLibsMap(CSF_d3d9) "d3d9"
# the naming is different on Windows
set aLibsMap(CSF_TclLibs) "tcl86"
if { "$::HAVE_TK" == "true" } {
set aLibsMap(CSF_TclTkLibs) "tk86"
}
set aLibsMap(CSF_TclTkLibs) "tk86"
if { "$theRelease" == "true" } {
set aLibsMap(CSF_QT) "Qt5Gui Qt5Widgets Qt5Xml Qt5Core"
} else {
@@ -1491,43 +1484,40 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} {
}
} else {
set aLibsMap(CSF_dl) "dl"
set aLibsMap(CSF_OpenGlLibs) "GL"
set aLibsMap(CSF_OpenGlesLibs) "EGL GLESv2"
if { "$theOS" == "mac" || "$theOS" == "ios" } {
set aLibsMap(CSF_objc) "objc"
set aLibsMap(CSF_OpenGlLibs) ""
set aLibsMap(CSF_OpenGlesLibs) ""
set aFrmsMap(CSF_OpenGlLibs) "OpenGL"
set aFrmsMap(CSF_OpenGlesLibs) "OpenGLES"
set aLibsMap(CSF_objc) "objc"
if { "$theOS" == "ios" } {
set aFrmsMap(CSF_Appkit) "UIKit"
set aFrmsMap(CSF_Appkit) "UIKit"
set aFrmsMap(CSF_OpenGlLibs) "OpenGLES"
} else {
set aFrmsMap(CSF_Appkit) "AppKit"
set aFrmsMap(CSF_Appkit) "AppKit"
set aFrmsMap(CSF_OpenGlLibs) "OpenGL"
}
set aFrmsMap(CSF_IOKit) "IOKit"
set aLibsMap(CSF_TclLibs) ""
set aLibsMap(CSF_TclTkLibs) ""
set aFrmsMap(CSF_TclLibs) "Tcl"
if { "$::HAVE_TK" == "true" } {
set aFrmsMap(CSF_TclTkLibs) "Tk"
}
set aLibsMap(CSF_TclLibs) ""
set aFrmsMap(CSF_TclTkLibs) "Tk"
set aLibsMap(CSF_TclTkLibs) ""
set aLibsMap(CSF_QT) "QtCore QtGui"
} elseif { "$theOS" == "android" } {
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
set aLibsMap(CSF_androidlog) "log"
} else {
if { "$::HAVE_FREETYPE" == "true" } {
set aLibsMap(CSF_fontconfig) "fontconfig"
}
set aLibsMap(CSF_fontconfig) "fontconfig"
if { "$theOS" == "qnx" } {
# CSF_ThreadLibs - pthread API is part of libc on QNX
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
} else {
set aLibsMap(CSF_ThreadLibs) "pthread rt"
if { "$::HAVE_TK" == "true" } {
set aLibsMap(CSF_TclTkLibs) "tk8.6"
}
set aLibsMap(CSF_OpenGlLibs) "GL"
set aLibsMap(CSF_TclTkLibs) "X11 tk8.6"
set aLibsMap(CSF_XwLibs) "X11 Xext Xmu Xi"
set aLibsMap(CSF_MotifLibs) "X11"
}
if { "$::HAVE_GLES2" == "true" } {
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
}
}
}
}
@@ -1795,14 +1785,9 @@ proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir
global path
set aHasQtDep "false"
set aTkDefines ""
foreach aCsfElem [osutils:tk:csfInExternlib "$path/$theSrcDir/${theToolKit}/EXTERNLIB"] {
if { "$aCsfElem" == "CSF_QT" } {
set aHasQtDep "true"
} elseif { "$aCsfElem" == "CSF_OpenGlLibs" } {
set aTkDefines "$aTkDefines;HAVE_OPENGL"
} elseif { "$aCsfElem" == "CSF_OpenGlesLibs" } {
set aTkDefines "$aTkDefines;HAVE_GLES2"
}
}
set theProjTmpl [osutils:vcproj:readtemplate $theVcVer $isUWP 0]
@@ -1837,9 +1822,9 @@ proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir
# depending on VC version
regsub -all -- {__TKDEP__} $theProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] theProjTmpl
regsub -all -- {__TKDEP_DEBUG__} $theProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] theProjTmpl
regsub -all -- {__TKDEFINES__} $theProjTmpl $aTkDefines theProjTmpl
set anIncPaths "..\\..\\..\\inc"
# set aTKDefines ""
set aFilesSection ""
set aVcFilesCxx(units) ""
set aVcFilesHxx(units) ""
@@ -2123,7 +2108,6 @@ proc osutils:vcprojx { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir
set aVCRTVer [string range $theVcVer 0 3]
regsub -all -- {__TKDEP__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] aProjTmpl
regsub -all -- {__TKDEP_DEBUG__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] aProjTmpl
regsub -all -- {__TKDEFINES__} $aProjTmpl "" aProjTmpl
set aFilesSection ""
set aVcFilesCxx(units) ""

View File

@@ -153,4 +153,5 @@ win32 {
}
}
OBJECTS_DIR = $$DESTDIR/../obj$${MY_BUILDTYPE}/$${TARGET}
#OBJECTS_DIR = $$DESTDIR/../obj$${MY_BUILDTYPE}/$${TARGET}
OBJECTS_DIR = $$DESTDIR/../obj$${MY_BUILDTYPE}

View File

@@ -15,14 +15,8 @@ for (aModuleIter, aModuleList) {
equals (aToolKit, $$OCC_MODULE_NAME) { toSkipToolkit = 1 }
!HAVE_VTK:equals (aToolKit, "TKIVtk") { toSkipToolkit = 1 }
!HAVE_VTK:equals (aToolKit, "TKIVtkDraw") { toSkipToolkit = 1 }
#!HAVE_OPENGL: equals (aToolKit, "TKOpenGl") { toSkipToolkit = 1 }
#!HAVE_OPENGL: equals (aToolKit, "TKOpenGlTest") { toSkipToolkit = 1 }
!HAVE_GLES2: equals (aToolKit, "TKOpenGles") { toSkipToolkit = 1 }
!HAVE_GLES2: equals (aToolKit, "TKOpenGlesTest") { toSkipToolkit = 1 }
!win32: equals (aToolKit, "TKD3DHost") { toSkipToolkit = 1 }
!win32: equals (aToolKit, "TKD3DHostTest") { toSkipToolkit = 1 }
equals (toSkipToolkit, 0) {
#warning(aToolKit($$OCC_MODULE_NAME)=$$aToolKit)
eval(occtkgen_$${aToolKit}.input = $$_PRO_FILE_PWD_/../OccToolkit.pro.in)
eval(occtkgen_$${aToolKit}.output = $$_PRO_FILE_PWD_/$${aToolKit}/$${aToolKit}.pro)

View File

@@ -18,7 +18,7 @@ aHxxRoot = $$OccGitRoot/inc
INCLUDEPATH += $$aHxxRoot
# CSF variables
HAVE_FREETYPE { CSF_FREETYPE = -lfreetype }
CSF_FREETYPE = -lfreetype
CSF_TclLibs = -ltcl8.6
CSF_TclTkLibs = -ltk8.6
HAVE_FREEIMAGE { CSF_FreeImagePlus = -lfreeimage } else:win32 { CSF_FreeImagePlus = -lwindowscodecs -lole32 }
@@ -36,7 +36,7 @@ win32 {
CSF_wsock32 = -lwsock32
CSF_netapi32 = -lnetapi32
CSF_OpenGlLibs = -lopengl32
CSF_OpenGlesLibs = -llibEGL -llibGLESv2
HAVE_GLES2 { CSF_OpenGlLibs = -llibEGL -llibGLESv2 }
CSF_psapi = -lPsapi
CSF_winmm = -lwinmm
CSF_d3d9 = -ld3d9
@@ -46,12 +46,12 @@ win32 {
} else:mac {
CSF_dl = -ldl
CSF_objc = -lobjc
CSF_OpenGlLibs = -framework OpenGL
CSF_OpenGlesLibs = -framework OpenGLES
iphoneos {
CSF_Appkit = -framework UIKit
CSF_OpenGlLibs = -framework OpenGLES
} else {
CSF_Appkit = -framework AppKit
CSF_OpenGlLibs = -framework OpenGL
}
CSF_IOKit = -framework IOKit
CSF_TclLibs = -framework Tcl
@@ -60,19 +60,17 @@ win32 {
CSF_dl = -ldl
CSF_ThreadLibs = -lpthread -lrt
CSF_OpenGlLibs = -lGL
CSF_OpenGlesLibs = -lEGL -lGLESv2
CSF_TclTkLibs = -lX11 -ltk8.6
CSF_XwLibs = -lX11 -lXext -lXmu -lXi
CSF_MotifLibs = -lX11
HAVE_FREETYPE { CSF_fontconfig = -lfontconfig }
CSF_fontconfig = -lfontconfig
HAVE_GLES2 { CSF_OpenGlLibs = -lEGL -lGLESv2 }
}
for (aCfgIter, CONFIG) {
aRes = $$find(aCfgIter, "^HAVE_")
!equals(aCfgIter, "HAVE_GLES2") {
count(aRes, 1) {
DEFINES += $$aCfgIter
}
count(aRes, 1) {
DEFINES += $$aCfgIter
}
}
@@ -105,12 +103,6 @@ for (anExternLib, anExternLibs) {
count(hasCsf, 1) {
aList = $$split($$anExternLib, "\n")
LIBS += $$aList
equals(anExternLib, "CSF_OpenGlLibs") {
DEFINES += "HAVE_OPENGL"
}
equals(anExternLib, "CSF_OpenGlesLibs") {
DEFINES += "HAVE_GLES2"
}
} else {
LIBS += -l$$anExternLib
}

View File

@@ -17,8 +17,6 @@ set "ARCH=64"
set "VCVARS="
set "HAVE_TBB=false"
set "HAVE_OPENCL=false"
set "HAVE_TK=true"
set "HAVE_FREETYPE=true"
set "HAVE_FREEIMAGE=false"
set "HAVE_FFMPEG=false"
set "HAVE_VTK=false"
@@ -58,9 +56,9 @@ rem Decode VCVER variable and define related ones:
rem
rem VCFMT - "vc" followed by full version number of Visual Studio toolset
rem (same as VCVER without optional suffix "-uwp")
rem VCLIB - name of folder containing binaries
rem VCLIB - name of folder contining binaries
rem (same as VCVER except without third version in number)
rem VCPROP - name of required Visual Studio Workload (starting with VS 2017)
rem VCPROP - name of required Visual Studion Workload (starting with VS 2017)
rem
rem Note that for VS before 2015 (vc14) always
rem VCFMT=VCLIB=VCVER and VCPROP=NativeDesktop
@@ -184,12 +182,10 @@ set "CSF_OPT_CMPL="
set "PRODUCTS_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_TK%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_TK" & set "CSF_DEFINES=HAVE_TK;%CSF_DEFINES%"
if ["%HAVE_FREETYPE%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FREEIMAGE" & set "CSF_DEFINES=HAVE_FREETYPE;%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_EXT" & set "CSF_DEFINES=HAVE_GLES2_EXT;%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%"
@@ -203,20 +199,20 @@ if ["%CSF_DEFINES%"] == [""] set "CSF_DEFINES=;"
rem ----- Optional 3rd-parties should be enabled by HAVE macros -----
if not ["%PRODUCTS_DEFINES%"] == [""] set "CSF_OPT_CMPL=%CSF_OPT_CMPL% %PRODUCTS_DEFINES%"
rem ----- Collect 3rd-parties additional include paths into compiler options -----
rem ----- Colect 3rd-parties additional include paths into compiler options -----
for %%a in ("%CSF_OPT_INC:;=";"%") do (
set "anItem=%%~a"
if not ["%%~a"] == [""] call :concatCmplInc %%~a
)
rem ----- Collect 3rd-parties additional library paths (32-bit) into linker options -----
rem ----- Colect 3rd-parties additional library paths (32-bit) into linker options -----
set "OPT_LIB32="
for %%a in ("%CSF_OPT_LIB32:;=";"%") do (
set "anItem=%%~a"
if not ["%%~a"] == [""] call :concatLib32 %%~a
)
rem ----- Collect 3rd-parties additional library paths (64-bit) into linker options -----
rem ----- Colect 3rd-parties additional library paths (64-bit) into linker options -----
set "OPT_LIB64="
for %%a in ("%CSF_OPT_LIB64:;=";"%") do (
set "anItem=%%~a"
@@ -248,7 +244,7 @@ if ["%CASDEB%"] == ["d"] if ["%ARCH%"] == ["64"] set "PATH=%CSF_OPT_BIN64D%;%PAT
if ["%CASDEB%"] == ["i"] if ["%ARCH%"] == ["32"] set "PATH=%CSF_OPT_BIN32I%;%PATH%"
if ["%CASDEB%"] == ["i"] if ["%ARCH%"] == ["64"] set "PATH=%CSF_OPT_BIN64I%;%PATH%"
rem ----- Set environment variables used by OCCT -----
rem ----- Set envoronment variables used by OCCT -----
set CSF_LANGUAGE=us
set MMGT_CLEAR=1
set "CSF_SHMessage=%CSF_OCCTResourcePath%\SHMessage"

View File

@@ -9,8 +9,6 @@ export CASDEB=""
export PRJFMT="";
export HAVE_TBB="false";
export HAVE_OPENCL="false";
export HAVE_TK="true";
export HAVE_FREETYPE="true";
export HAVE_FREEIMAGE="false";
export HAVE_FFMPEG="false";
export HAVE_VTK="false";
@@ -102,11 +100,9 @@ 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_TK" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_TK"; fi
if [ "$HAVE_FREETYPE" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_FREETYPE"; 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_GLES2" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GLES2_EXT"; 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

View File

@@ -90,7 +90,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -107,7 +107,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
@@ -138,7 +138,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
@@ -156,7 +156,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
@@ -186,7 +186,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -203,7 +203,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
@@ -234,7 +234,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
@@ -252,7 +252,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>

View File

@@ -85,7 +85,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -100,7 +100,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
@@ -130,7 +130,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
@@ -146,7 +146,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
@@ -175,7 +175,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -190,7 +190,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
@@ -219,7 +219,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
@@ -235,7 +235,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>

View File

@@ -94,7 +94,6 @@ GeomAdaptor_HCurve GeomAdaptor_Curve
GeomAdaptor_HSurface GeomAdaptor_Surface
GeomAdaptor_HSurfaceOfLinearExtrusion GeomAdaptor_SurfaceOfLinearExtrusion
GeomAdaptor_HSurfaceOfRevolution GeomAdaptor_SurfaceOfRevolution
PrsMgr_PresentationManager3d PrsMgr_PresentationManager
[tcollection]
AdvApp2Var_SequenceOfNode

View File

@@ -446,7 +446,12 @@ Download the necessary archive from https://www.vtk.org/VTK/resources/software.h
All 3rd-party products required for building of OCCT could be installed
from official repositories. You may install them from console using apt-get utility:
sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libxt-dev libxmu-dev libxi-dev libgl1-mesa-dev libfreeimage-dev
sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libxt-dev libxmu-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libfreeimage-dev libtbb-dev
To launch binaries built with WOK you need to install C shell and 32-bit libraries on x86_64 distributives:
# you may need to add i386 if not done already by command "dpkg --add-architecture i386"
sudo apt-get install csh libstdc++6:i386 libxt6:i386 libxext6:i386 libxmu6:i386
Building is possible with C++ compliant compiler:

View File

@@ -15,6 +15,8 @@ On OS X we recommend to use native libraries.
This article describes the **CMake**-based build process, which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources. *OCCT requires CMake version 2.8.12 or later*.
@note Compared to the previous (6.x) releases of Open CASCADE Technology, OCCT 7.x has a complete set of CMake scripts and projects, so that there is no need to use WOK anymore. Moreover, CMake gives you a powerful configuration tool, which allows to control many aspects of OCCT deployment. At the same time this tool is quite intuitive, which is a significant advantage over the legacy WOK utilities.
Here we describe the build procedure on the example of Windows platform with Visual Studio 2010.
However, CMake is cross-platform and can be used to build OCCT on Linux and OS X in essentially the same way.
@@ -471,7 +473,7 @@ The environment is defined in the file *custom.sh* which can be edited directly:
* "HardLink* - hard links to headers located in *src* will be created.
* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
~~~~~
export HAVE_FREEIMAGE=false
export HAVE_GL2PS=false
~~~~~
Alternatively, or when *custom.sh* does not exist, you can launch *genconf.sh* to configure environment interactively:
@@ -544,7 +546,7 @@ directly:
* "HardLink* - hard links to headers located in *src* will be created.
* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
~~~~~
export HAVE_FREEIMAGE=false
export HAVE_GL2PS=false
~~~~~
Alternatively, or when *custom.sh* or *custom.bat* does not exist, you can launch **genconf** tool to configure

View File

@@ -391,7 +391,7 @@ Ray tracing requires OpenGL 4.0+ or OpenGL 3.3+ with *GL_ARB_texture_buffer_obje
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 (OpenGL ES 3.1+ is recommended).
Ray tracing requires OpenGL ES 3.2.
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).
OCCT 3D Viewer, in general, supports wide range of graphics hardware - from very old to new.

View File

@@ -884,7 +884,7 @@ Old APIs based on global callback functions for creating *UserDraw* objects and
class UserDrawElement : public OpenGl_Element {};
//! Implementation of virtual method AIS_InteractiveObject::Compute().
void UserDrawObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
void UserDrawObject::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{
@@ -2210,30 +2210,3 @@ BRep and Binary BRep Shape formats (only in case of triangulation-only Faces, wi
Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape).
Files written with the new version will not be readable by applications of old versions.
@subsection upgrade_occt760_poly Changes in *Poly* package and *Poly_Triangulation* class
*Poly_Triangulation* does no more provide access to internal array structures: methods Nodes(), ChangeNode(), Triangles(), ChangeTriangle(), UVNodes(), ChangeUVNode(), Normals() have been removed.
Methods of *Poly_Triangulation* for accessing individual nodal properties / triangles by index and implementing copy semantics should be used instead.
The same is applicable to *Poly_PolygonOnTriangulation* interface.
@subsection upgrade_occt760_glsl Custom GLSL programs
Accessors to standard materials have been modified within *Declarations.glsl* (*occFrontMaterial_Diffuse()* -> *occMaterial_Diffuse(bool)* and similar).
Applications defining custom GLSL programs should take into account syntax changes.
@subsection upgrade_occt760_noral_colors Nodal color modulation
Nodal color vertex attribute is now modulated in the same way as a color texture - color is multiplied by material coefficients (diffuse/ambient/specular in case of a common material definition).
Existing code defining nodal colors should be updated to:
- Use *Graphic3d_TOSM_UNLIT* shading model when lighting is not needed.
- Adjust diffuse/ambient material coefficients, which have been previously ignored.
- Remove code multiplying nodal colors, intended to compensate over-brightness due to addition of specular color from material definition, as specular component is now also modulated by a vertex color.
@subsection upgrade_occt760_tkopengles TKOpenGles library
OCCT now provides two separate toolkits - *TKOpenGl* depending on desktop OpenGL and *TKOpenGles* depending on OpenGL ES.
Both libraries can be now built simultaneously on systems providing both APIs (like desktop Linux).
Existing applications depending on OpenGL ES (mobile projects first of all) should be adjusted to link against *TKOpenGles*.
Note that both *TKOpenGl* and *TKOpenGles* keep exporting classes with the same name, so applications should not attempt to link both libraries simultaneously.

View File

@@ -1465,6 +1465,17 @@ vchangeselected shape
~~~~~
Adds a shape to selection or removes one from it.
@subsubsection occt_draw_4_2_15 vzclipping
Syntax:
~~~~~
vzclipping [mode] [depth width]
~~~~~
Gets or sets ZClipping mode, width and depth, where
- *mode = OFF|BACK|FRONT|SLICE*
- *depth* is a real value from segment [0,1]
- *width* is a real value from segment [0,1]
@subsubsection occt_draw_4_2_16 vnbselected
Syntax:
@@ -1473,6 +1484,14 @@ vnbselected
~~~~~
Returns the number of selected objects in the interactive context.
@subsubsection occt_draw_4_2_18 vpurgedisplay
Syntax:
~~~~~
vpurgedisplay [CollectorToo = 0|1]
~~~~~
Removes structures which do not belong to objects displayed in neutral point.
@subsubsection occt_draw_4_2_19 vhlr
Syntax:

View File

@@ -1,27 +0,0 @@
<svg width="188" height="90" viewBox="0 0 188 90" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="188" height="90" fill="white"/>
<rect x="6.5" y="6.5" width="75" height="21" stroke="#7C97DE"/>
<path d="M8 8V16H13V26H21V16H26V8H8Z" fill="#DDDDDD"/>
<path d="M42 15H41V16V25H35V9H51V15H42Z" fill="#DDDDDD" stroke="#5BD6B8" stroke-width="2"/>
<path d="M71 18V8H63V18H60V26H80V18H71Z" fill="#DDDDDD"/>
<rect x="6.5" y="34.5" width="75" height="21" stroke="#7C97DE"/>
<path d="M8 36V44H13V54H21V44H26V36H8Z" fill="#DDDDDD"/>
<path d="M42 43H41V44V53H35V37H51V43H42Z" fill="#3D3ACF" stroke="#5BD6B8" stroke-width="2"/>
<path d="M71 46V36H63V46H60V54H80V46H71Z" fill="#DDDDDD"/>
<rect x="6.5" y="62.5" width="75" height="21" stroke="#7C97DE"/>
<path d="M8 64V72H13V82H21V72H26V64H8Z" fill="#3D3ACF"/>
<path d="M42 71H41V72V81H35V65H51V71H42Z" fill="#3D3ACF" stroke="#5BD6B8" stroke-width="2"/>
<path d="M71 74V64H63V74H60V82H80V74H71Z" fill="#3D3ACF"/>
<path d="M93 10L100 17L93 24V20H84V14H93V10Z" fill="#7C97DE"/>
<path d="M93 38L100 45L93 52V48H84V42H93V38Z" fill="#7C97DE"/>
<path d="M93 66L100 73L93 80V76H84V70H93V66Z" fill="#7C97DE"/>
<path d="M108 8V16H113V26H121V16H126V8H108Z" fill="#DDDDDD"/>
<path d="M108 36V44H113V54H121V44H126V36H108Z" fill="#DDDDDD"/>
<path d="M108 64V72H113V82H121V72H126V64H108Z" fill="#DDDDDD"/>
<path d="M152 8H134V26H142V16H152V8Z" fill="#3D3ACF"/>
<path d="M152 36H134V54H142V44H152V36Z" fill="#DDDDDD"/>
<path d="M152 64H134V82H142V72H152V64Z" fill="#3D3ACF"/>
<path d="M171 18V8H163V18H160V26H180V18H171Z" fill="#DDDDDD"/>
<path d="M171 46V36H163V46H160V54H180V46H171Z" fill="#DDDDDD"/>
<path d="M171 74V64H163V74H160V82H180V74H171Z" fill="#DDDDDD"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -551,7 +551,7 @@ If you are creating your own type of interactive object, you must implement the
#### For 3D:
~~~~~{.cpp}
void PackageName_ClassName::Compute (const Handle(PrsMgr_PresentationManager)& thePresentationManager,
void PackageName_ClassName::Compute (const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode);
~~~~~
@@ -650,7 +650,7 @@ Standard_Boolean myPk_IShape::AcceptDisplayMode (const Standard_Integer theMode)
return theMode == 0 || theMode == 1;
}
void myPk_IShape::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
void myPk_IShape::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{
@@ -1040,7 +1040,7 @@ Select* methods of AIS_InteractiveContext accept some selection scheme as parame
| :----- | :----- | :----- | :----- | :----- |
| AIS_SelectionScheme_Replace | @figure{visualization_selection_scheme_replace.svg, ""} | | AIS_SelectionScheme_XOR | @figure{visualization_selection_scheme_XOR.svg, ""} |
| AIS_SelectionScheme_Add | @figure{visualization_selection_scheme_add.svg, ""} | | AIS_SelectionScheme_Clear | @figure{visualization_selection_scheme_clear.svg, ""} |
| AIS_SelectionScheme_Remove | @figure{visualization_selection_scheme_remove.svg, ""} | | AIS_SelectionScheme_ReplaceExtra | @figure{visualization_selection_scheme_replaceExtra.svg, ""} |
| AIS_SelectionScheme_Remove | @figure{visualization_selection_scheme_remove.svg, ""} | | | |
@subsection occt_visu_3_5 Standard Interactive Object Classes
@@ -2096,7 +2096,7 @@ i.e. in hidden line removal and wireframe modes.
Let us look at the example of compute methods
~~~~~{.cpp}
void MyPresentableObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsManager,
void MyPresentableObject::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsManager,
const Handle(Graphic3d_Structure)& thePrs,
const Standard_Integer theMode)
(

View File

@@ -46,7 +46,7 @@ AdaptorCurve2d_AIS::AdaptorCurve2d_AIS (const Handle(Geom2d_Curve)& theGeom2dCur
//
}
void AdaptorCurve2d_AIS::Compute (const Handle(PrsMgr_PresentationManager)&,
void AdaptorCurve2d_AIS::Compute (const Handle(PrsMgr_PresentationManager3d)&,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -53,7 +53,7 @@ private:
virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Compute presentation.
virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;

View File

@@ -26,7 +26,7 @@
#include <StdPrs_PoleCurve.hxx>
#include <StdPrs_Curve.hxx>
void AdaptorCurve_AIS::Compute (const Handle(PrsMgr_PresentationManager)&,
void AdaptorCurve_AIS::Compute (const Handle(PrsMgr_PresentationManager3d)&,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -37,7 +37,7 @@ private:
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0 || theMode == 1; }
//! Compute presentation.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;

View File

@@ -24,7 +24,7 @@
#include <Geom_CartesianPoint.hxx>
#include <StdPrs_Point.hxx>
void AdaptorPnt2d_AIS::Compute (const Handle(PrsMgr_PresentationManager)& ,
void AdaptorPnt2d_AIS::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -40,7 +40,7 @@ private:
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Compute presentation.
virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;

View File

@@ -39,7 +39,7 @@ AdaptorVec_AIS::AdaptorVec_AIS (const gp_Pnt2d& thePnt1,
myLength = aVec.Magnitude();
}
void AdaptorVec_AIS::Compute (const Handle(PrsMgr_PresentationManager)& ,
void AdaptorVec_AIS::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -101,7 +101,7 @@ private:
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Compute presentation.
virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;

View File

@@ -219,7 +219,7 @@ void Sample2D_Face::FillData(Standard_Boolean isSizesRecompute)
}
}
void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager)& ,
void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode)
{
@@ -303,7 +303,7 @@ void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager)& ,
thePresentation->CurrentGroup()->AddPrimitiveArray(myExternalArray);
}
void Sample2D_Face::HilightSelected (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
void Sample2D_Face::HilightSelected (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const SelectMgr_SequenceOfOwner& theOwners)
{
Handle(Prs3d_Presentation) aSelectionPrs = GetSelectPresentation (thePrsMgr);
@@ -368,7 +368,7 @@ void Sample2D_Face::ClearSelected()
}
}
void Sample2D_Face::HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager)& thePM,
void Sample2D_Face::HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
const Handle(Prs3d_Drawer)& theStyle,
const Handle(SelectMgr_EntityOwner)& theOwner)
{

View File

@@ -56,7 +56,7 @@ private:
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Compute presentation.
virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
@@ -67,11 +67,11 @@ private:
virtual void ClearSelected() Standard_OVERRIDE;
//! Method for advanced customizable selection of picked object
virtual void HilightSelected (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
virtual void HilightSelected (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const SelectMgr_SequenceOfOwner& theOwners) Standard_OVERRIDE;
//! Method for advanced customizable highlighting of picked object.
virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager)& thePM,
virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
const Handle(Prs3d_Drawer)& theStyle,
const Handle(SelectMgr_EntityOwner)& theOwner) Standard_OVERRIDE;

View File

@@ -54,7 +54,7 @@ Sample2D_Markers::Sample2D_Markers (const Standard_Real theXPosition,
myArrayOfPoints = theArrayOfPoints;
}
void Sample2D_Markers::Compute (const Handle(PrsMgr_PresentationManager)& ,
void Sample2D_Markers::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -61,7 +61,7 @@ private:
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Compute presentation.
virtual void Compute (const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/,
const Standard_Integer theMode) Standard_OVERRIDE;

View File

@@ -70,9 +70,14 @@ void TriangulationSamples::Triangulation3dSample()
TopLoc_Location aLocation;
Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation(aFace, aLocation);
for (Standard_Integer i = 1; i <= aTriangulation->NbTriangles(); i++)
TColgp_Array1OfPnt aTriangNodes(1, (aTriangulation->NbNodes()));
aTriangNodes = aTriangulation->Nodes();
Poly_Array1OfTriangle aTriangles(1, aTriangulation->NbTriangles());
aTriangles = aTriangulation->Triangles();
for (Standard_Integer i = 1; i <= (aTriangulation->NbTriangles()); i++)
{
const Poly_Triangle trian = aTriangulation->Triangle (i);
Poly_Triangle trian = aTriangles.Value(i);
Standard_Integer index1, index2, index3, M = 0, N = 0;
trian.Get(index1, index2, index3);
@@ -91,7 +96,7 @@ void TriangulationSamples::Triangulation3dSample()
M = index2;
}
BRepBuilderAPI_MakeEdge anEdgeMaker(aTriangulation->Node (M), aTriangulation->Node (N));
BRepBuilderAPI_MakeEdge anEdgeMaker(aTriangNodes.Value(M), aTriangNodes.Value(N));
if (anEdgeMaker.IsDone())
{
aBuilder.Add(aCompound, anEdgeMaker.Edge());

View File

@@ -32,7 +32,7 @@
0A7DEE351E2D2AE000267B9B /* libTKXCAF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */; };
0A7DEE371E2D2AE000267B9B /* libTKXDESTEP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE171E2D2AC700267B9B /* libTKXDESTEP.a */; };
0A7DEE3E1E2D2B8100267B9B /* libTKBO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE021E2D2A7F00267B9B /* libTKBO.a */; };
0A7DEE3F1E2D2BB000267B9B /* libTKOpenGles.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */; };
0A7DEE3F1E2D2BB000267B9B /* libTKOpenGl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE091E2D2A9700267B9B /* libTKOpenGl.a */; };
0A7DEE401E2D2BEA00267B9B /* libTKSTEP209.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0F1E2D2AAB00267B9B /* libTKSTEP209.a */; };
0A7DEE411E2D2C1500267B9B /* libTKXSBase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE1D1E2D2ADC00267B9B /* libTKXSBase.a */; };
0AAE0DE61EAF816E00C1F65B /* screw.step in Resources */ = {isa = PBXBuildFile; fileRef = 0AAE0DE51EAF816D00C1F65B /* screw.step */; };
@@ -82,7 +82,7 @@
0A7DEE061E2D2A8C00267B9B /* libTKIGES.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKIGES.a; path = ../occt/lib/libTKIGES.a; sourceTree = "<group>"; };
0A7DEE071E2D2A8F00267B9B /* libTKMeshVS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKMeshVS.a; path = ../occt/lib/libTKMeshVS.a; sourceTree = "<group>"; };
0A7DEE081E2D2A9300267B9B /* libTKOffset.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOffset.a; path = ../occt/lib/libTKOffset.a; sourceTree = "<group>"; };
0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOpenGles.a; path = ../occt/lib/libTKOpenGles.a; sourceTree = "<group>"; };
0A7DEE091E2D2A9700267B9B /* libTKOpenGl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOpenGl.a; path = ../occt/lib/libTKOpenGl.a; sourceTree = "<group>"; };
0A7DEE0A1E2D2A9A00267B9B /* libTKPrim.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKPrim.a; path = ../occt/lib/libTKPrim.a; sourceTree = "<group>"; };
0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKService.a; path = ../occt/lib/libTKService.a; sourceTree = "<group>"; };
0A7DEE0C1E2D2AA100267B9B /* libTKStd.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKStd.a; path = ../occt/lib/libTKStd.a; sourceTree = "<group>"; };
@@ -135,7 +135,7 @@
0AE286641EB0D29B00A9D719 /* libz.tbd in Frameworks */,
0A7DEE411E2D2C1500267B9B /* libTKXSBase.a in Frameworks */,
0A7DEE401E2D2BEA00267B9B /* libTKSTEP209.a in Frameworks */,
0A7DEE3F1E2D2BB000267B9B /* libTKOpenGles.a in Frameworks */,
0A7DEE3F1E2D2BB000267B9B /* libTKOpenGl.a in Frameworks */,
0A7DEE3E1E2D2B8100267B9B /* libTKBO.a in Frameworks */,
0A7DEE2B1E2D2AE000267B9B /* libTKService.a in Frameworks */,
0A7DEE2E1E2D2AE000267B9B /* libTKSTEP.a in Frameworks */,
@@ -234,7 +234,7 @@
0A7DEE061E2D2A8C00267B9B /* libTKIGES.a */,
0A7DEE071E2D2A8F00267B9B /* libTKMeshVS.a */,
0A7DEE081E2D2A9300267B9B /* libTKOffset.a */,
0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */,
0A7DEE091E2D2A9700267B9B /* libTKOpenGl.a */,
0A7DEE0A1E2D2A9A00267B9B /* libTKPrim.a */,
0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */,
0A7DEE0C1E2D2AA100267B9B /* libTKStd.a */,

View File

@@ -147,7 +147,7 @@ public class OcctJniActivity extends Activity implements OnClickListener
|| !loadLibVerbose ("TKService", aLoaded, aFailed)
|| !loadLibVerbose ("TKHLR", aLoaded, aFailed)
|| !loadLibVerbose ("TKV3d", aLoaded, aFailed)
|| !loadLibVerbose ("TKOpenGles", aLoaded, aFailed)
|| !loadLibVerbose ("TKOpenGl", aLoaded, aFailed)
// application code
|| !loadLibVerbose ("TKJniSample", aLoaded, aFailed))
{

View File

@@ -11,7 +11,7 @@ set (anOcctLibs
TKIGES
TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP
# OCCT Visualization
TKService TKHLR TKV3d TKOpenGles
TKService TKHLR TKV3d TKOpenGl
)
set(aLibDeps "")

View File

@@ -577,7 +577,7 @@ bool OcctJni_Viewer::saveSnapshot (const TCollection_AsciiString& thePath,
}
Image_AlienPixMap anAlienImage;
if (!anAlienImage.InitTrash (Image_Format_BGRA, theWidth, theHeight))
if (!anAlienImage.InitTrash (Image_PixMap::ImgBGRA, theWidth, theHeight))
{
Message::DefaultMessenger()->Send (TCollection_AsciiString() + "RGBA image " + theWidth + "x" + theHeight + " allocation failed", Message_Fail);
return false;
@@ -586,7 +586,7 @@ bool OcctJni_Viewer::saveSnapshot (const TCollection_AsciiString& thePath,
// OpenGL ES does not support fetching data in BGRA format
// while FreeImage does not support RGBA format.
Image_PixMap anImage;
anImage.InitWrapper (Image_Format_RGBA,
anImage.InitWrapper (Image_PixMap::ImgRGBA,
anAlienImage.ChangeData(),
anAlienImage.SizeX(),
anAlienImage.SizeY(),

View File

@@ -1217,12 +1217,14 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
"\n"
" if(!aTr.IsNull())\n"
" { \n"
" nbNodes = aTr->NbNodes();\n"
" // takes the array of nodes for this triangulation\n"
" const TColgp_Array1OfPnt& aNodes = aTr->Nodes(); \n"
" nbNodes = aNodes.Length();\n"
"\n"
" for( Standard_Integer i = 1; i <= nbNodes; i++)\n"
" {\n"
" // create seguence of node points in absolute coordinate system\n"
" gp_Pnt aPnt = aTr->Node (i).Transformed (aLocation);\n"
" gp_Pnt aPnt = aNodes(i).Transformed(aLocation);\n"
" aPoints.Append(aPnt);\n"
" \n"
" }\n"
@@ -1369,12 +1371,13 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
if(!aTr.IsNull())
{
// takes the array of nodes for this triangulation
nbNodes = aTr->NbNodes();
const TColgp_Array1OfPnt& aNodes = aTr->Nodes();
nbNodes = aNodes.Length();
for( Standard_Integer i = 1; i <= nbNodes; i++)
{
// create seguence of node points in absolute coordinate system
gp_Pnt aPnt = aTr->Node (i).Transformed (aLocation);
gp_Pnt aPnt = aNodes(i).Transformed(aLocation);
aPoints.Append(aPnt);
}

View File

@@ -26,7 +26,7 @@ ISession2D_Curve::ISession2D_Curve(const Handle(Geom2d_Curve) aGeom2dCurve,
myradiusratio = 1;
}
void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager)& ,
void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer )
{

View File

@@ -63,7 +63,7 @@ private:
// Methods PRIVATE
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const { return theMode == 0; }
virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {}
// Fields PRIVATE

View File

@@ -14,7 +14,7 @@ IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
static char THIS_FILE[]=__FILE__;
#endif
void ISession_Curve::Compute (const Handle(PrsMgr_PresentationManager)& ,
void ISession_Curve::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -17,7 +17,7 @@ public:
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
virtual void ComputeSelection (const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {}
private:

View File

@@ -69,7 +69,7 @@ ISession_Direction::~ISession_Direction()
}
void ISession_Direction::Compute (const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
void ISession_Direction::Compute (const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -30,7 +30,7 @@ public:
private:
void Compute (const Handle(PrsMgr_PresentationManager)& aPresentationManager,
void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode);
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;

View File

@@ -41,7 +41,7 @@ ISession_Point::~ISession_Point()
}
void ISession_Point::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
void ISession_Point::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -26,7 +26,7 @@ public:
private :
void Compute (const Handle(PrsMgr_PresentationManager)& aPresentationManager,
void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode);

View File

@@ -18,7 +18,7 @@ static char THIS_FILE[]=__FILE__;
IMPLEMENT_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject)
void ISession_Surface::Compute (const Handle(PrsMgr_PresentationManager)& ,
void ISession_Surface::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -17,7 +17,7 @@ public:
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0);
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0);
virtual void ComputeSelection (const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {}
private:

View File

@@ -215,7 +215,7 @@
#include <Prs3d_Text.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_TextAspect.hxx>
#include <Prs3d_PointAspect.hxx>

View File

@@ -31,7 +31,7 @@ ISession_Direction::ISession_Direction(const gp_Pnt& aPnt,const gp_Vec& aVec)
}
void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -28,7 +28,7 @@ public:
private:
void Compute (const Handle(PrsMgr_PresentationManager)& aPresentationManager,
void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode);

View File

@@ -31,7 +31,7 @@ ISession_Curve::~ISession_Curve()
{
}
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -23,7 +23,7 @@ public:
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
Handle(Geom_Curve) myCurve;

View File

@@ -31,7 +31,7 @@ ISession_Curve::~ISession_Curve()
{
}
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -23,7 +23,7 @@ public:
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
Handle(Geom_Curve) myCurve;

View File

@@ -126,10 +126,15 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
" if(!aTr.IsNull()) // if this triangulation is not NULL" EOL
" { " EOL
" // takes the array of nodes for this triangulation:" EOL
" const TColgp_Array1OfPnt& aNodes = aTr->Nodes();" EOL
" // takes the array of triangles for this triangulation:" EOL
" const Poly_Array1OfTriangle& triangles = aTr->Triangles();" EOL EOL
" // create array of node points in absolute coordinate system" EOL
" TColgp_Array1OfPnt aPoints(1, aTr->NbNodes());" EOL
" for( Standard_Integer i = 1; i < aTr->NbNodes()+1; i++)" EOL
" aPoints(i) = aTr->Node (i).Transformed (aLocation);" EOL EOL
" TColgp_Array1OfPnt aPoints(1, aNodes.Length());" EOL
" for( Standard_Integer i = 1; i < aNodes.Length()+1; i++)" EOL
" aPoints(i) = aNodes(i).Transformed(aLocation);" EOL EOL
" // Takes the node points of each triangle of this triangulation." EOL
" // takes a number of triangles:" EOL
@@ -138,7 +143,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
" for( nt = 1 ; nt < nnn+1 ; nt++)" EOL
" {" EOL
" // takes the node indices of each triangle in n1,n2,n3:" EOL
" aTr->Triangle (nt).Get (n1,n2,n3);" EOL
" triangles(nt).Get(n1,n2,n3);" EOL
" // takes the node points:" EOL
" gp_Pnt aPnt1 = aPoints(n1);" EOL
" gp_Pnt aPnt2 = aPoints(n2);" EOL
@@ -206,9 +211,11 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
if(!aTr.IsNull())
{
const TColgp_Array1OfPnt& aNodes = aTr->Nodes();
aNumOfNodes += aTr->NbNodes();
//Standard_Integer aLower = aNodes.Lower();
//Standard_Integer anUpper = aNodes.Upper();
const Poly_Array1OfTriangle& triangles = aTr->Triangles();
aNumOfTriangles += aTr->NbTriangles();
if(aCount == aNumOfFace)
@@ -244,8 +251,8 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
Standard_Integer aLower = aNodesOfPol.Lower(), anUpper = aNodesOfPol.Upper();
for( int i = aLower; i < anUpper ; i++)
{
gp_Pnt aPnt1 = aTr->Node (aNodesOfPol (i)).Transformed (aLocation);
gp_Pnt aPnt2 = aTr->Node (aNodesOfPol (i+1)).Transformed (aLocation);
gp_Pnt aPnt1 = aNodes(aNodesOfPol(i)).Transformed(aLocation);
gp_Pnt aPnt2 = aNodes(aNodesOfPol(i+1)).Transformed(aLocation);
TopoDS_Vertex aVertex1 = BRepBuilderAPI_MakeVertex (aPnt1);
TopoDS_Vertex aVertex2 = BRepBuilderAPI_MakeVertex (aPnt2);
@@ -276,9 +283,9 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
TopTools_DataMapOfIntegerShape aEdges;
TopTools_SequenceOfShape aVertices;
for( Standard_Integer i = 1; i < aTr->NbNodes()+1; i++)
for( Standard_Integer i = 1; i < aNodes.Length()+1; i++)
{
gp_Pnt aPnt = aTr->Node (i).Transformed (aLocation);
gp_Pnt aPnt = aNodes(i).Transformed(aLocation);
TopoDS_Vertex aVertex = BRepBuilderAPI_MakeVertex(aPnt);
if(!aVertex.IsNull())
@@ -295,7 +302,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
for( nt = 1 ; nt < nnn+1 ; nt++)
{
aTr->Triangle (nt).Get (n1,n2,n3);
triangles(nt).Get(n1,n2,n3);
Standard_Integer key[3];

View File

@@ -157,9 +157,13 @@ for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) {
TopoDS_Face F =TopoDS::Face(ex.Current());
TopLoc_Location L;
Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(F,L);
TColgp_Array1OfPnt tab(1,(facing->NbNodes()));
tab = facing->Nodes();
Poly_Array1OfTriangle tri(1,facing->NbTriangles());
tri = facing->Triangles();
for (Standard_Integer i=1;i<=(facing->NbTriangles());i++) {
const Poly_Triangle trian = facing->Triangle (i);
Poly_Triangle trian = tri.Value(i);
Standard_Integer index1,index2,index3,M = 0, N = 0;
trian.Get(index1,index2,index3);
@@ -176,7 +180,7 @@ for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) {
M = index2;
}
BRepBuilderAPI_MakeEdge ME(facing->Node (M), facing->Node (N));
BRepBuilderAPI_MakeEdge ME(tab.Value(M),tab.Value(N));
if (ME.IsDone()) {
builder.Add(Comp,ME.Edge());
}
@@ -206,9 +210,13 @@ for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { \n\
TopoDS_Face F =TopoDS::Face(ex.Current()); \n\
TopLoc_Location L; \n\
Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(F,L); \n\
\n\
TColgp_Array1OfPnt tab(1,(facing->NbNodes())); \n\
tab = facing->Nodes(); \n\
Poly_Array1OfTriangle tri(1,facing->NbTriangles()); \n\
tri = facing->Triangles(); \n\
\n\
for (Standard_Integer i=1;i<=(facing->NbTriangles());i++) { \n\
Poly_Triangle trian = facing->Triangle (i); \n\
Poly_Triangle trian = tri.Value(i); \n\
Standard_Integer index1,index2,index3,M,N; \n\
trian.Get(index1,index2,index3); \n\
\n\
@@ -225,7 +233,7 @@ for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { \n\
M = index2; \n\
} \n\
\n\
BRepBuilderAPI_MakeEdge ME(facing->Node (M),facing->Node (N)); \n\
BRepBuilderAPI_MakeEdge ME(tab.Value(M),tab.Value(N)); \n\
if (ME.IsDone()) { \n\
builder.Add(Comp,ME.Edge()); \n\
} \n\

View File

@@ -31,7 +31,7 @@ ISession_Curve::~ISession_Curve()
{
}
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -23,7 +23,7 @@ public:
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
Handle(Geom_Curve) myCurve;

View File

@@ -75,7 +75,7 @@ void ISession2D_Shape::BuildPolyAlgo()
myPolyAlgo->Update();
}
void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager)& /*thePresentationManager*/,
void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*thePresentationManager*/,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode)
{

View File

@@ -51,7 +51,7 @@ private:
const TopoDS_Shape& theCompound,
const Handle(Prs3d_LineAspect) theAspect);
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePresentationManager,
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode = 0);

View File

@@ -217,7 +217,7 @@ void OCC_2dView::OnUpdateBUTTONGridCancel(CCmdUI* pCmdUI)
void OCC_2dView::OnSize(UINT nType, int cx, int cy)
{
OCC_BaseView::OnSize (nType, cx, cy);
// Take care : This function is called before OnInitialUpdate
// Take care : This fonction is call before OnInitialUpdate
if (!myView.IsNull())
myView->MustBeResized();
}

View File

@@ -171,7 +171,7 @@ void Sample2D_Face::FillData(Standard_Boolean isSizesRecompute)
}
}
void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager)& /*thePresentationManager*/,
void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePresentationManager*/,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer /*theMode*/)
{
@@ -257,7 +257,7 @@ void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager)& /*thePres
//Method for advanced customizable selection of picked object
void Sample2D_Face::HilightSelected
( const Handle(PrsMgr_PresentationManager)& thePM,
( const Handle(PrsMgr_PresentationManager3d)& thePM,
const SelectMgr_SequenceOfOwner& theOwners)
{
Handle( Prs3d_Presentation ) aSelectionPrs;
@@ -329,7 +329,7 @@ void Sample2D_Face::ClearSelected ()
//Method for advanced customizable highlighting of picked object
void Sample2D_Face::HilightOwnerWithColor ( const Handle(PrsMgr_PresentationManager)& thePM,
void Sample2D_Face::HilightOwnerWithColor ( const Handle(PrsMgr_PresentationManager3d)& thePM,
const Handle(Prs3d_Drawer)& theStyle,
const Handle(SelectMgr_EntityOwner)& theOwner)
{

View File

@@ -49,14 +49,14 @@ private:
//private methods
void FillData(Standard_Boolean isSizesRecomputed = Standard_False);
void ClearSelected ();
void HilightSelected( const Handle(PrsMgr_PresentationManager)& thePM,
void HilightSelected( const Handle(PrsMgr_PresentationManager3d)& thePM,
const SelectMgr_SequenceOfOwner& theOwners);
void HilightOwnerWithColor( const Handle(PrsMgr_PresentationManager)& thePM,
void HilightOwnerWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM,
const Handle(Prs3d_Drawer)& theStyle,
const Handle(SelectMgr_EntityOwner)& theOwner);
void Compute ( const Handle(PrsMgr_PresentationManager)& thePresentationManager,
void Compute ( const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode);

View File

@@ -36,7 +36,7 @@ Sample2D_Markers::Sample2D_Markers (const Standard_Real theXPosition,
}
void Sample2D_Markers::Compute (const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
void Sample2D_Markers::Compute (const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -37,7 +37,7 @@ DEFINE_STANDARD_RTTIEXT(Sample2D_Markers,AIS_InteractiveObject)
private:
virtual void Compute (const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/,
const Standard_Integer /*aMode*/);

View File

@@ -70,7 +70,7 @@
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <Prs3d_TextAspect.hxx>
#include <Prs3d_Text.hxx>

View File

@@ -11,7 +11,7 @@ IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject)
#include <Graphic3d_ArrayOfTriangles.hxx>
#include <Graphic3d_StructureManager.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <StdPrs_ToolTriangulatedShape.hxx>
#include <Poly_Connect.hxx>
#include <TColgp_Array1OfPnt.hxx>
@@ -49,7 +49,7 @@ AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependant)
myColor = Quantity_NOC_KHAKI4;
}
void User_Cylinder::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
void User_Cylinder::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode )
{
@@ -158,6 +158,10 @@ case 6: //color
return;
}
const TColgp_Array1OfPnt& Nodes= myT->Nodes();
const Poly_Array1OfTriangle& triangles = myT->Triangles();
Standard_Integer nnn = myT->NbTriangles(); // nnn : nombre de triangles
Standard_Integer nt, n1, n2, n3 = 0;// nt : triangle courant
// ni : sommet i du triangle courant
@@ -167,15 +171,15 @@ case 6: //color
// triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed"
myT->Triangle (nt).Get (n1,n3,n2); // le triangle est n1,n3,n2
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
else
myT->Triangle (nt).Get (n1,n2,n3); // le triangle est n1,n2,n3
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
if (TriangleIsValid (myT->Node (n1), myT->Node (n2), myT->Node (n3)) )
if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) )
{ // Associates a vertexNT to each node
gp_Pnt p = myT->Node (n1).Transformed (myLocation.Transformation());
gp_Pnt q = myT->Node (n2).Transformed (myLocation.Transformation());
gp_Pnt r = myT->Node (n3).Transformed (myLocation.Transformation());
gp_Pnt p = Nodes(n1).Transformed(myLocation.Transformation());
gp_Pnt q = Nodes(n2).Transformed(myLocation.Transformation());
gp_Pnt r = Nodes(n3).Transformed(myLocation.Transformation());
if (p.Z() > H.Z()) H=p;
if (q.Z() > H.Z()) H=q;
@@ -209,13 +213,12 @@ case 6: //color
return;
}
Poly_Connect pc(myT);
TColgp_Array1OfPnt Nodes (1, myT->NbNodes());
for (Standard_Integer in = 1; in <= myT->NbNodes(); in++)
{
Nodes.SetValue(in, myT->Node (in));
}
const TColgp_Array1OfPnt& Nodes= myT->Nodes();
BAR = GProp_PGProps::Barycentre(Nodes);
//const TColgp_Array1OfPnt2d& UVNodes = myT->UVNodes();
const Poly_Array1OfTriangle& triangles = myT->Triangles();
TColgp_Array1OfDir myNormal(Nodes.Lower(), Nodes.Upper());
StdPrs_ToolTriangulatedShape::Normal(myFace, pc, myNormal);
@@ -235,15 +238,15 @@ case 6: //color
{
// triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed"
myT->Triangle (nt).Get (n1,n3,n2); // le triangle est n1,n3,n2
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
else
myT->Triangle (nt).Get (n1,n2,n3); // le triangle est n1,n2,n3
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) )
{ // Associates a vertexNT to each node
gp_Pnt p = myT->Node(n1).Transformed(myLocation.Transformation());
gp_Pnt q = myT->Node(n2).Transformed(myLocation.Transformation());
gp_Pnt r = myT->Node(n3).Transformed(myLocation.Transformation());
gp_Pnt p = Nodes(n1).Transformed(myLocation.Transformation());
gp_Pnt q = Nodes(n2).Transformed(myLocation.Transformation());
gp_Pnt r = Nodes(n3).Transformed(myLocation.Transformation());
}
}
@@ -255,18 +258,18 @@ case 6: //color
std::cout << "On traite actuellement le triangle : "<< nt <<"\n";
#endif
if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed"
myT->Triangle (nt).Get (n1,n3,n2); // le triangle est n1,n3,n2
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
else
myT->Triangle (nt).Get (n1,n2,n3); // le triangle est n1,n2,n3
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) )
{ // Associates a vertexNT to each node
TColgp_Array1OfPnt Points(1,3);
gp_Pnt p = myT->Node(n1).Transformed(myLocation.Transformation());
gp_Pnt q = myT->Node(n2).Transformed(myLocation.Transformation());
gp_Pnt r = myT->Node(n3).Transformed(myLocation.Transformation());
gp_Pnt p = Nodes(n1).Transformed(myLocation.Transformation());
gp_Pnt q = Nodes(n2).Transformed(myLocation.Transformation());
gp_Pnt r = Nodes(n3).Transformed(myLocation.Transformation());
Points(1).SetCoord(p.X(), p.Y(), p.Z());
Points(2).SetCoord(q.X(), q.Y(), q.Z());

View File

@@ -25,7 +25,7 @@ public:
void SetColor(const Quantity_Color &aColor);
private:
void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,
void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode = 0) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,

View File

@@ -38,7 +38,7 @@ LIBS += -lTKernel \
-lTKMesh \
-lTKHLR \
-lTKV3d \
-lTKOpenGles
-lTKOpenGl
# IMPORTANT. load libraries in a proper order
ANDROID_EXTRA_LIBS = $$3rdparty_lib_path/libfreeimage.so \
@@ -56,4 +56,4 @@ ANDROID_EXTRA_LIBS = $$3rdparty_lib_path/libfreeimage.so \
$$occt_lib_path/libTKMesh.so \
$$occt_lib_path/libTKHLR.so \
$$occt_lib_path/libTKV3d.so \
$$occt_lib_path/libTKOpenGles.so
$$occt_lib_path/libTKOpenGl.so

View File

@@ -3,7 +3,7 @@
#Category: Modeling
#Title: Snowflake - creation of 2d drawing
pload MODELING VISUALIZATION
pload MODELING AISV
puts "Generating sample drawing of snowflake..."

View File

@@ -14,7 +14,7 @@ endif()
# customize build
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM=1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s MAX_WEBGL_VERSION=2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s USE_WEBGL2=1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s ALLOW_MEMORY_GROWTH=1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --bind")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s SAFE_HEAP=1")
@@ -64,7 +64,7 @@ else()
set(OCCT_BIN_DIR)
endif()
set(OpenCASCADE_LIBS TKRWMesh TKBinXCAF TKBin TKBinL TKOpenGles TKXCAF TKVCAF TKCAF TKV3d TKHLR TKMesh TKService TKShHealing TKPrim TKTopAlgo TKGeomAlgo TKBRep TKGeomBase TKG3d TKG2d TKMath TKLCAF TKCDF TKernel)
set(OpenCASCADE_LIBS TKRWMesh TKBinXCAF TKBin TKBinL TKOpenGl TKXCAF TKVCAF TKCAF TKV3d TKHLR TKMesh TKService TKShHealing TKPrim TKTopAlgo TKGeomAlgo TKBRep TKGeomBase TKG3d TKG2d TKMath TKLCAF TKCDF TKernel)
add_executable(${APP_TARGET} ${SOURCES})
target_link_libraries(

View File

@@ -137,28 +137,6 @@ WasmOcctView::WasmOcctView()
: myDevicePixelRatio (1.0f),
myUpdateRequests (0)
{
addActionHotKeys (Aspect_VKey_NavForward, Aspect_VKey_W, Aspect_VKey_W | Aspect_VKeyFlags_SHIFT);
addActionHotKeys (Aspect_VKey_NavBackward , Aspect_VKey_S, Aspect_VKey_S | Aspect_VKeyFlags_SHIFT);
addActionHotKeys (Aspect_VKey_NavSlideLeft, Aspect_VKey_A, Aspect_VKey_A | Aspect_VKeyFlags_SHIFT);
addActionHotKeys (Aspect_VKey_NavSlideRight, Aspect_VKey_D, Aspect_VKey_D | Aspect_VKeyFlags_SHIFT);
addActionHotKeys (Aspect_VKey_NavRollCCW, Aspect_VKey_Q, Aspect_VKey_Q | Aspect_VKeyFlags_SHIFT);
addActionHotKeys (Aspect_VKey_NavRollCW, Aspect_VKey_E, Aspect_VKey_E | Aspect_VKeyFlags_SHIFT);
addActionHotKeys (Aspect_VKey_NavSpeedIncrease, Aspect_VKey_Plus, Aspect_VKey_Plus | Aspect_VKeyFlags_SHIFT,
Aspect_VKey_Equal,
Aspect_VKey_NumpadAdd, Aspect_VKey_NumpadAdd | Aspect_VKeyFlags_SHIFT);
addActionHotKeys (Aspect_VKey_NavSpeedDecrease, Aspect_VKey_Minus, Aspect_VKey_Minus | Aspect_VKeyFlags_SHIFT,
Aspect_VKey_NumpadSubtract, Aspect_VKey_NumpadSubtract | Aspect_VKeyFlags_SHIFT);
// arrow keys conflict with browser page scrolling, so better be avoided in non-fullscreen mode
addActionHotKeys (Aspect_VKey_NavLookUp, Aspect_VKey_Numpad8); // Aspect_VKey_Up
addActionHotKeys (Aspect_VKey_NavLookDown, Aspect_VKey_Numpad2); // Aspect_VKey_Down
addActionHotKeys (Aspect_VKey_NavLookLeft, Aspect_VKey_Numpad4); // Aspect_VKey_Left
addActionHotKeys (Aspect_VKey_NavLookRight, Aspect_VKey_Numpad6); // Aspect_VKey_Right
addActionHotKeys (Aspect_VKey_NavSlideLeft, Aspect_VKey_Numpad1); // Aspect_VKey_Left |Aspect_VKeyFlags_SHIFT
addActionHotKeys (Aspect_VKey_NavSlideRight, Aspect_VKey_Numpad3); // Aspect_VKey_Right|Aspect_VKeyFlags_SHIFT
addActionHotKeys (Aspect_VKey_NavSlideUp, Aspect_VKey_Numpad9); // Aspect_VKey_Up |Aspect_VKeyFlags_SHIFT
addActionHotKeys (Aspect_VKey_NavSlideDown, Aspect_VKey_Numpad7); // Aspect_VKey_Down |Aspect_VKeyFlags_SHIFT
}
// ================================================================
@@ -452,14 +430,6 @@ void WasmOcctView::handleViewRedraw (const Handle(AIS_InteractiveContext)& theCt
{
myUpdateRequests = 0;
AIS_ViewController::handleViewRedraw (theCtx, theView);
for (NCollection_DataMap<unsigned int, Aspect_VKey>::Iterator aNavKeyIter (myNavKeyMap);
!myToAskNextFrame && aNavKeyIter.More(); aNavKeyIter.Next())
{
const Aspect_VKey aVKey = aNavKeyIter.Key() & ~Aspect_VKeyFlags_ALL;
myToAskNextFrame = myKeys.IsKeyDown (aVKey);
}
if (myToAskNextFrame)
{
// ask more frames
@@ -710,7 +680,7 @@ EM_BOOL WasmOcctView::onTouchEvent (int theEventType, const EmscriptenTouchEvent
myDoubleTapTimer.Stop();
myDoubleTapTimer.Reset();
myDoubleTapTimer.Start();
SelectInViewer (Graphic3d_Vec2i (myClickTouch.From), AIS_SelectionScheme_Replace);
SelectInViewer (Graphic3d_Vec2i (myClickTouch.From), false);
}
}
hasUpdates = true;
@@ -726,43 +696,6 @@ EM_BOOL WasmOcctView::onTouchEvent (int theEventType, const EmscriptenTouchEvent
return hasUpdates || !myTouchPoints.IsEmpty() ? EM_TRUE : EM_FALSE;
}
// ================================================================
// Function : navigationKeyModifierSwitch
// Purpose :
// ================================================================
bool WasmOcctView::navigationKeyModifierSwitch (unsigned int theModifOld,
unsigned int theModifNew,
double theTimeStamp)
{
bool hasActions = false;
for (unsigned int aKeyIter = 0; aKeyIter < Aspect_VKey_ModifiersLower; ++aKeyIter)
{
if (!myKeys.IsKeyDown (aKeyIter))
{
continue;
}
Aspect_VKey anActionOld = Aspect_VKey_UNKNOWN, anActionNew = Aspect_VKey_UNKNOWN;
myNavKeyMap.Find (aKeyIter | theModifOld, anActionOld);
myNavKeyMap.Find (aKeyIter | theModifNew, anActionNew);
if (anActionOld == anActionNew)
{
continue;
}
if (anActionOld != Aspect_VKey_UNKNOWN)
{
myKeys.KeyUp (anActionOld, theTimeStamp);
}
if (anActionNew != Aspect_VKey_UNKNOWN)
{
hasActions = true;
myKeys.KeyDown (anActionNew, theTimeStamp);
}
}
return hasActions;
}
// ================================================================
// Function : onKeyDownEvent
// Purpose :
@@ -781,27 +714,15 @@ EM_BOOL WasmOcctView::onKeyDownEvent (int theEventType, const EmscriptenKeyboard
{
return EM_FALSE;
}
if (theEvent->repeat == EM_TRUE)
if (theEvent->repeat == EM_FALSE)
{
return EM_FALSE;
myKeys.KeyDown (aVKey, aTimeStamp);
}
const unsigned int aModifOld = myKeys.Modifiers();
AIS_ViewController::KeyDown (aVKey, aTimeStamp);
const unsigned int aModifNew = myKeys.Modifiers();
if (aModifNew != aModifOld
&& navigationKeyModifierSwitch (aModifOld, aModifNew, aTimeStamp))
if (Aspect_VKey2Modifier (aVKey) == 0)
{
// modifier key just pressed
}
Aspect_VKey anAction = Aspect_VKey_UNKNOWN;
if (myNavKeyMap.Find (aVKey | myKeys.Modifiers(), anAction)
&& anAction != Aspect_VKey_UNKNOWN)
{
AIS_ViewController::KeyDown (anAction, aTimeStamp);
UpdateView();
// normal key
}
return EM_FALSE;
}
@@ -825,43 +746,28 @@ EM_BOOL WasmOcctView::onKeyUpEvent (int theEventType, const EmscriptenKeyboardEv
return EM_FALSE;
}
const unsigned int aModifOld = myKeys.Modifiers();
AIS_ViewController::KeyUp (aVKey, aTimeStamp);
Aspect_VKey anAction = Aspect_VKey_UNKNOWN;
if (myNavKeyMap.Find (aVKey | myKeys.Modifiers(), anAction)
&& anAction != Aspect_VKey_UNKNOWN)
if (theEvent->repeat == EM_TRUE)
{
AIS_ViewController::KeyUp (anAction, aTimeStamp);
UpdateView();
return EM_FALSE;
}
const unsigned int aModifNew = myKeys.Modifiers();
if (aModifNew != aModifOld
&& navigationKeyModifierSwitch (aModifOld, aModifNew, aTimeStamp))
const unsigned int aModif = myKeys.Modifiers();
myKeys.KeyUp (aVKey, aTimeStamp);
if (Aspect_VKey2Modifier (aVKey) == 0)
{
// modifier key released
}
return processKeyPress (aVKey | aModifNew) ? EM_TRUE : EM_FALSE;
}
//==============================================================================
//function : processKeyPress
//purpose :
//==============================================================================
bool WasmOcctView::processKeyPress (Aspect_VKey theKey)
{
switch (theKey)
{
case Aspect_VKey_F:
// normal key released
switch (aVKey | aModif)
{
myView->FitAll (0.01, false);
UpdateView();
return true;
case Aspect_VKey_F:
{
myView->FitAll (0.01, false);
myView->Invalidate();
updateView();
return EM_TRUE;
}
}
}
return false;
return EM_FALSE;
}
// ================================================================

View File

@@ -209,37 +209,10 @@ private:
static EM_BOOL onKeyUpCallback (int theEventType, const EmscriptenKeyboardEvent* theEvent, void* theView)
{ return ((WasmOcctView* )theView)->onKeyUpEvent (theEventType, theEvent); }
private:
//! Register hot-keys for specified Action.
void addActionHotKeys (Aspect_VKey theAction,
unsigned int theHotKey1 = 0,
unsigned int theHotKey2 = 0,
unsigned int theHotKey3 = 0,
unsigned int theHotKey4 = 0,
unsigned int theHotKey5 = 0)
{
if (theHotKey1 != 0) { myNavKeyMap.Bind (theHotKey1, theAction); }
if (theHotKey2 != 0) { myNavKeyMap.Bind (theHotKey2, theAction); }
if (theHotKey3 != 0) { myNavKeyMap.Bind (theHotKey3, theAction); }
if (theHotKey4 != 0) { myNavKeyMap.Bind (theHotKey4, theAction); }
if (theHotKey5 != 0) { myNavKeyMap.Bind (theHotKey5, theAction); }
}
//! Handle navigation keys.
bool navigationKeyModifierSwitch (unsigned int theModifOld,
unsigned int theModifNew,
double theTimeStamp);
//! Handle hot-key.
bool processKeyPress (Aspect_VKey theKey);
private:
NCollection_IndexedDataMap<TCollection_AsciiString, Handle(AIS_InteractiveObject)> myObjects; //!< map of named objects
NCollection_DataMap<unsigned int, Aspect_VKey> myNavKeyMap; //!< map of Hot-Key (key+modifiers) to Action
Handle(AIS_InteractiveContext) myContext; //!< interactive context
Handle(V3d_View) myView; //!< 3D view
Handle(Prs3d_TextAspect) myTextStyle; //!< text style for OSD elements

View File

@@ -42,8 +42,11 @@ DEFINE_STANDARD_HANDLE(AIS_AttributeFilter, SelectMgr_Filter)
//! filters, which are in position when a local context is open.
class AIS_AttributeFilter : public SelectMgr_Filter
{
public:
//! Constructs an empty attribute filter object.
//! This filter object determines whether selectable
//! interactive objects have a non-null owner.
@@ -62,33 +65,29 @@ public:
//! Indicates that the Interactive Object has the color
//! setting specified by the argument aCol at construction time.
Standard_Boolean HasColor() const { return hasC; }
Standard_Boolean HasColor() const;
//! Indicates that the Interactive Object has the width
//! setting specified by the argument aWidth at
//! construction time.
Standard_Boolean HasWidth() const { return hasW; }
//! Sets the color.
void SetColor (const Quantity_NameOfColor theCol)
{
myCol = theCol;
hasC = Standard_True;
}
//! Sets the line width.
void SetWidth (const Standard_Real theWidth)
{
myWid = theWidth;
hasW = Standard_True;
}
Standard_Boolean HasWidth() const;
//! Sets the color aCol.
//! This must be chosen from the list of colors in Quantity_NameOfColor.
void SetColor (const Quantity_NameOfColor aCol);
//! Sets the line width aWidth.
void SetWidth (const Standard_Real aWidth);
//! Removes the setting for color from the filter.
void UnsetColor() { hasC = Standard_False; }
void UnsetColor();
//! Removes the setting for width from the filter.
void UnsetWidth() { hasW = Standard_False; }
void UnsetWidth();
//! Indicates that the selected Interactive Object passes
//! the filter. The owner, anObj, can be either direct or
//! user. A direct owner is the corresponding
@@ -99,15 +98,32 @@ public:
//! the mouse, the object is kept; if not, it is rejected.
Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anObj) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(AIS_AttributeFilter,SelectMgr_Filter)
protected:
private:
Quantity_NameOfColor myCol;
Standard_Real myWid;
Standard_Boolean hasC;
Standard_Boolean hasW;
};
#include <AIS_AttributeFilter.lxx>
#endif // _AIS_AttributeFilter_HeaderFile

View File

@@ -0,0 +1,33 @@
// Created on: 1997-03-04
// Created by: Robert COUBLANC
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
inline void AIS_AttributeFilter::SetColor(const Quantity_NameOfColor aCol)
{myCol = aCol;hasC = Standard_True;}
inline void AIS_AttributeFilter::SetWidth(const Standard_Real aWid)
{myWid=aWid;hasW = Standard_True;}
inline void AIS_AttributeFilter::UnsetColor()
{hasC = Standard_False;}
inline void AIS_AttributeFilter::UnsetWidth()
{hasW = Standard_False;}
inline Standard_Boolean AIS_AttributeFilter::HasColor() const
{return hasC;}
inline Standard_Boolean AIS_AttributeFilter::HasWidth() const
{return hasW;}

View File

@@ -161,23 +161,24 @@ void AIS_Axis::SetAxis1Placement(const Handle(Geom_Axis1Placement)& anAxis)
//function : Compute
//purpose :
//=======================================================================
void AIS_Axis::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer )
void AIS_Axis::Compute(const Handle(PrsMgr_PresentationManager3d)&,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer)
{
thePrs->SetInfiniteState (myInfiniteState);
thePrs->SetDisplayPriority(5);
if (!myIsXYZAxis)
{
GeomAdaptor_Curve curv (myComponent);
StdPrs_Curve::Add (thePrs, curv, myDrawer);
aPresentation->SetInfiniteState (myInfiniteState);
aPresentation->SetDisplayPriority(5);
if (!myIsXYZAxis ){
GeomAdaptor_Curve curv(myComponent);
StdPrs_Curve::Add(aPresentation,curv,myDrawer);
}
else
{
DsgPrs_XYZAxisPresentation::Add (thePrs, myLineAspect, myDir, myVal,
DsgPrs_XYZAxisPresentation::Add (aPresentation,myLineAspect,myDir,myVal,
myDrawer->DatumAspect()->ToDrawLabels() ? myText : "",
myPfirst, myPlast);
}
}
//=======================================================================

View File

@@ -86,7 +86,7 @@ public:
virtual Standard_Integer Signature() const Standard_OVERRIDE { return 2; }
virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Datum; }
virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KOI_Datum; }
Standard_EXPORT void SetColor (const Quantity_Color& aColor) Standard_OVERRIDE;
@@ -98,13 +98,10 @@ public:
private:
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeFields();
private:

View File

@@ -229,9 +229,9 @@ void AIS_CameraFrustum::fillBorders()
//function : Compute
//purpose :
//=======================================================================
void AIS_CameraFrustum::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
void AIS_CameraFrustum::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{
thePrs->SetInfiniteState (true);
if (myTriangles.IsNull())

View File

@@ -58,9 +58,9 @@ public:
protected:
//! Computes presentation of camera frustum.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
//! Compute selection.
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,

View File

@@ -72,14 +72,15 @@ AIS_Circle::AIS_Circle(const Handle(Geom_Circle)& theComponent,
//function : Compute
//purpose :
//=======================================================================
void AIS_Circle::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer )
void AIS_Circle::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{
thePrs->SetDisplayPriority (5);
aPresentation->SetDisplayPriority(5);
if (myCircleIsArc) ComputeArc(aPresentation);
else ComputeCircle(aPresentation);
if (myCircleIsArc) { ComputeArc (thePrs); }
else { ComputeCircle (thePrs); }
}
//=======================================================================

View File

@@ -42,7 +42,7 @@ public:
virtual Standard_Integer Signature() const Standard_OVERRIDE { return 6; }
//! Indicates that the type of Interactive Object is a datum.
virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Datum; }
virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KOI_Datum; }
//! Returns the circle component defined in SetCircle.
const Handle(Geom_Circle)& Circle() const { return myComponent; }
@@ -92,19 +92,16 @@ public:
private:
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& theprs,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeCircle (const Handle(Prs3d_Presentation)& aPresentation);
Standard_EXPORT void ComputeArc (const Handle(Prs3d_Presentation)& aPresentation);
Standard_EXPORT void ComputeCircleSelection (const Handle(SelectMgr_Selection)& aSelection);
Standard_EXPORT void ComputeArcSelection (const Handle(SelectMgr_Selection)& aSelection);
//! Replace aspects of already computed groups with the new value.

View File

@@ -545,7 +545,7 @@ void AIS_ColorScale::updateTextAspect()
//function : Compute
//purpose :
//=======================================================================
void AIS_ColorScale::Compute (const Handle(PrsMgr_PresentationManager)& ,
void AIS_ColorScale::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -392,7 +392,7 @@ public:
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Compute presentation.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode) Standard_OVERRIDE;

View File

@@ -33,7 +33,7 @@
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <Standard_ErrorHandler.hxx>
#include <StdSelect_BRepSelectionTool.hxx>
#include <StdPrs_ShadedShape.hxx>
@@ -349,9 +349,9 @@ void AIS_ColoredShape::SetMaterial (const Graphic3d_MaterialAspect& theMaterial)
//function : Compute
//purpose :
//=======================================================================
void AIS_ColoredShape::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
void AIS_ColoredShape::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{
if (myshape.IsNull())
{

View File

@@ -95,9 +95,9 @@ public:
protected: //! @name override presentation computation
//! Compute presentation considering sub-shape color map.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
//! Compute selection considering sub-shape hidden state.
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,

View File

@@ -110,9 +110,9 @@ void AIS_ConnectedInteractive::Disconnect()
//function : Compute
//purpose :
//=======================================================================
void AIS_ConnectedInteractive::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
void AIS_ConnectedInteractive::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{
if (HasConnection())
{

View File

@@ -45,7 +45,7 @@ public:
Standard_EXPORT AIS_ConnectedInteractive(const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView);
//! Returns KOI_Object
virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Object; }
virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KOI_Object; }
//! Returns 0
virtual Standard_Integer Signature() const Standard_OVERRIDE { return 0; }
@@ -103,9 +103,7 @@ protected:
//! compute anything, but just uses the
//! presentation of this last object, with
//! a transformation if there's one stored.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& theprs,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode) Standard_OVERRIDE;
//! Computes the presentation according to a point of view.
Standard_EXPORT virtual void computeHLR (const Handle(Graphic3d_Camera)& theProjector,

View File

@@ -17,9 +17,12 @@
#ifndef _AIS_DisplayStatus_HeaderFile
#define _AIS_DisplayStatus_HeaderFile
#include <PrsMgr_DisplayStatus.hxx>
//! To give the display status of an Interactive Object.
typedef PrsMgr_DisplayStatus AIS_DisplayStatus;
enum AIS_DisplayStatus
{
AIS_DS_Displayed, //!< the Interactive Object is displayed in the main viewer
AIS_DS_Erased, //!< the Interactive Object is hidden in main viewer
AIS_DS_None //!< the Interactive Object is nowhere displayed
};
#endif // _AIS_DisplayStatus_HeaderFile

View File

@@ -28,6 +28,7 @@
#include <TColStd_ListOfInteger.hxx>
class SelectMgr_EntityOwner;
class AIS_ExclusionFilter;
DEFINE_STANDARD_HANDLE(AIS_ExclusionFilter, SelectMgr_Filter)
@@ -78,26 +79,43 @@ public:
Standard_EXPORT Standard_Boolean Remove (const AIS_KindOfInteractive TypeToExclude, const Standard_Integer SignatureInType);
Standard_EXPORT void Clear();
Standard_Boolean IsExclusionFlagOn() const { return myIsExclusionFlagOn; }
void SetExclusionFlag (const Standard_Boolean theStatus) { myIsExclusionFlagOn = theStatus; }
Standard_Boolean IsExclusionFlagOn() const;
void SetExclusionFlag (const Standard_Boolean Status);
Standard_EXPORT Standard_Boolean IsStored (const AIS_KindOfInteractive aType) const;
Standard_EXPORT void ListOfStoredTypes (TColStd_ListOfInteger& TheList) const;
Standard_EXPORT void ListOfSignature (const AIS_KindOfInteractive aType, TColStd_ListOfInteger& TheStoredList) const;
DEFINE_STANDARD_RTTIEXT(AIS_ExclusionFilter,SelectMgr_Filter)
protected:
private:
Standard_EXPORT Standard_Boolean IsSignatureIn (const AIS_KindOfInteractive aType, const Standard_Integer aSignature) const;
Standard_Boolean myIsExclusionFlagOn;
TColStd_DataMapOfIntegerListOfInteger myStoredTypes;
};
#include <AIS_ExclusionFilter.lxx>
#endif // _AIS_ExclusionFilter_HeaderFile

View File

@@ -0,0 +1,26 @@
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
inline Standard_Boolean AIS_ExclusionFilter::IsExclusionFlagOn() const
{
return myIsExclusionFlagOn;
}
inline void AIS_ExclusionFilter::SetExclusionFlag(const Standard_Boolean Status)
{
myIsExclusionFlagOn = Status;
}

View File

@@ -16,15 +16,62 @@
#include <AIS_GlobalStatus.hxx>
#include <AIS_DisplayMode.hxx>
#include <Standard_Type.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
IMPLEMENT_STANDARD_RTTIEXT(AIS_GlobalStatus, Standard_Transient)
// =======================================================================
// function : AIS_GlobalStatus
// purpose :
// =======================================================================
AIS_GlobalStatus::AIS_GlobalStatus()
: myDispMode (0),
myIsHilit(Standard_False),
mySubInt (Standard_False)
AIS_GlobalStatus::AIS_GlobalStatus():
myStatus(AIS_DS_None),
myDispMode(AIS_WireFrame),
myLayerIndex(0),
myIsHilit(Standard_False),
mySubInt(Standard_False)
{
}
AIS_GlobalStatus::AIS_GlobalStatus(const AIS_DisplayStatus DS,
const Standard_Integer DMode,
const Standard_Integer SMode,
const Standard_Boolean /*ishilighted*/,
const Standard_Integer Layer):
myStatus(DS),
myDispMode(DMode),
myLayerIndex(Layer),
myIsHilit(Standard_False),
mySubInt(Standard_False)
{
mySelModes.Append(SMode);
}
void AIS_GlobalStatus::RemoveSelectionMode(const Standard_Integer aMode)
{
TColStd_ListIteratorOfListOfInteger anIt (mySelModes);
for (; anIt.More(); anIt.Next())
{
if (anIt.Value() == aMode)
{
mySelModes.Remove (anIt);
return;
}
}
}
void AIS_GlobalStatus::ClearSelectionModes()
{
mySelModes.Clear();
}
Standard_Boolean AIS_GlobalStatus::IsSModeIn(const Standard_Integer aMode) const
{
TColStd_ListIteratorOfListOfInteger anIt (mySelModes);
for (; anIt.More(); anIt.Next())
{
if (anIt.Value() == aMode)
{
return Standard_True;
}
}
return Standard_False;
}

View File

@@ -29,25 +29,34 @@
DEFINE_STANDARD_HANDLE(AIS_GlobalStatus, Standard_Transient)
//! Stores information about objects in graphic context:
//! Stores information about objects in graphic context:
//! - Status Of Display : in the main viewer
//! hidden in the main viewer
//! - Displayed Modes
//! - Active Selection Modes
//! - is the Interactive Object Current ?
//! - Layer Index
class AIS_GlobalStatus : public Standard_Transient
{
DEFINE_STANDARD_RTTIEXT(AIS_GlobalStatus, Standard_Transient)
public:
//! Default constructor.
Standard_EXPORT AIS_GlobalStatus();
Standard_EXPORT AIS_GlobalStatus(const AIS_DisplayStatus aStat, const Standard_Integer aDispMode, const Standard_Integer aSelMode, const Standard_Boolean ishilighted = Standard_False, const Standard_Integer aLayerIndex = 0);
//! Returns the display mode.
Standard_Integer DisplayMode() const { return myDispMode; }
void SetGraphicStatus (const AIS_DisplayStatus theStatus) { myStatus = theStatus; }
void AddSelectionMode (const Standard_Integer theMode) { if (!IsSModeIn (theMode)) mySelModes.Append (theMode); }
//! Sets display mode.
void SetDisplayMode (const Standard_Integer theMode) { myDispMode = theMode; }
//! Returns TRUE if object is highlighted
Standard_Boolean IsHilighted() const { return myIsHilit; }
//! Returns the display mode.
Standard_Integer DisplayMode() const { return myDispMode; }
void SetLayerIndex (const Standard_Integer theIndex) { myLayerIndex = theIndex; }
//! Sets highlighted state.
void SetHilightStatus (const Standard_Boolean theStatus) { myIsHilit = theStatus; }
//! Changes applied highlight style for a particular object
@@ -56,47 +65,39 @@ public:
//! Returns applied highlight style for a particular object
const Handle(Prs3d_Drawer)& HilightStyle() const { return myHiStyle; }
//! Returns active selection modes of the object.
const TColStd_ListOfInteger& SelectionModes() const { return mySelModes; }
//! Return TRUE if selection mode was registered.
Standard_Boolean IsSModeIn (Standard_Integer theMode) const
{
return mySelModes.Contains (theMode);
}
//! Add selection mode.
Standard_Boolean AddSelectionMode (const Standard_Integer theMode)
{
if (!mySelModes.Contains (theMode))
{
mySelModes.Append (theMode);
return Standard_True;
}
return Standard_False;
}
//! Remove selection mode.
Standard_Boolean RemoveSelectionMode (const Standard_Integer theMode)
{
return mySelModes.Remove (theMode);
}
//! Remove all selection modes.
void ClearSelectionModes()
{
mySelModes.Clear();
}
Standard_Boolean IsSubIntensityOn() const { return mySubInt; }
void SetSubIntensity (Standard_Boolean theIsOn) { mySubInt = theIsOn; }
void SubIntensityOn() { mySubInt = Standard_True; }
void SubIntensityOff() { mySubInt = Standard_False; }
Standard_EXPORT void RemoveSelectionMode (const Standard_Integer aMode);
Standard_EXPORT void ClearSelectionModes();
AIS_DisplayStatus GraphicStatus() const { return myStatus; }
//! keeps the active selection modes of the object
//! in the main viewer.
const TColStd_ListOfInteger& SelectionModes() const { return mySelModes; }
Standard_Boolean IsHilighted() const { return myIsHilit; }
Standard_EXPORT Standard_Boolean IsSModeIn (const Standard_Integer aMode) const;
//! Returns layer index.
Standard_Integer GetLayerIndex() const
{
return myLayerIndex;
}
private:
TColStd_ListOfInteger mySelModes;
Handle(Prs3d_Drawer) myHiStyle;
AIS_DisplayStatus myStatus;
Standard_Integer myDispMode;
Standard_Integer myLayerIndex;
Standard_Boolean myIsHilit;
Standard_Boolean mySubInt;

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