mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c62618cd60 |
@@ -86,11 +86,6 @@ if (BUILD_WITH_DEBUG)
|
|||||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:DEBUG>:OCCT_DEBUG>)
|
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:DEBUG>:OCCT_DEBUG>)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# option disabling OCCT exceptions in Release builds (No_Exception)
|
|
||||||
if (NOT DEFINED BUILD_RELEASE_DISABLE_EXCEPTIONS)
|
|
||||||
set (BUILD_RELEASE_DISABLE_EXCEPTIONS ON CACHE BOOL "${BUILD_RELEASE_DISABLE_EXCEPTIONS_DESCR}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# option to enable or disable use of precompiled headers
|
# option to enable or disable use of precompiled headers
|
||||||
if (NOT DEFINED BUILD_USE_PCH)
|
if (NOT DEFINED BUILD_USE_PCH)
|
||||||
set (BUILD_USE_PCH OFF CACHE BOOL "${BUILD_USE_PCH_DESCR}")
|
set (BUILD_USE_PCH OFF CACHE BOOL "${BUILD_USE_PCH_DESCR}")
|
||||||
@@ -633,26 +628,6 @@ else()
|
|||||||
OCCT_CHECK_AND_UNSET ("INSTALL_TBB")
|
OCCT_CHECK_AND_UNSET ("INSTALL_TBB")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# RapidJSON
|
|
||||||
# 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")
|
|
||||||
else()
|
|
||||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_RAPIDJSON")
|
|
||||||
OCCT_CHECK_AND_UNSET ("INSTALL_RAPIDJSON")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
OCCT_CHECK_AND_UNSET ("USE_RAPIDJSON")
|
|
||||||
|
|
||||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_RAPIDJSON")
|
|
||||||
OCCT_CHECK_AND_UNSET ("INSTALL_RAPIDJSON")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# EIGEN
|
# EIGEN
|
||||||
if (CAN_USE_EIGEN)
|
if (CAN_USE_EIGEN)
|
||||||
set (USE_EIGEN OFF CACHE BOOL "${USE_EIGEN_DESCR}")
|
set (USE_EIGEN OFF CACHE BOOL "${USE_EIGEN_DESCR}")
|
||||||
@@ -708,18 +683,6 @@ else()
|
|||||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_FLEX_EXECUTABLE")
|
OCCT_CHECK_AND_UNSET ("3RDPARTY_FLEX_EXECUTABLE")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# qt for inspector and samples
|
|
||||||
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
|
|
||||||
# check qt 3rdparty path
|
|
||||||
add_definitions (-DHAVE_QT)
|
|
||||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/qt")
|
|
||||||
message (STATUS "Info: Qt is used by OCCT")
|
|
||||||
else()
|
|
||||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_QT")
|
|
||||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TQTMALLOC")
|
|
||||||
OCCT_CHECK_AND_UNSET ("INSTALL_QT")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# check all 3rdparty include paths
|
# check all 3rdparty include paths
|
||||||
string (REGEX REPLACE ";" " " 3RDPARTY_NOT_INCLUDED "${3RDPARTY_NOT_INCLUDED}")
|
string (REGEX REPLACE ";" " " 3RDPARTY_NOT_INCLUDED "${3RDPARTY_NOT_INCLUDED}")
|
||||||
if (3RDPARTY_NOT_INCLUDED)
|
if (3RDPARTY_NOT_INCLUDED)
|
||||||
@@ -807,6 +770,17 @@ else()
|
|||||||
set (SCRIPT_EXT sh)
|
set (SCRIPT_EXT sh)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
|
||||||
|
# check qt 3rdparty path
|
||||||
|
add_definitions (-DHAVE_QT)
|
||||||
|
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/qt")
|
||||||
|
message (STATUS "Info: Qt is used by OCCT")
|
||||||
|
else()
|
||||||
|
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_QT")
|
||||||
|
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TQTMALLOC")
|
||||||
|
OCCT_CHECK_AND_UNSET ("INSTALL_QT")
|
||||||
|
endif()
|
||||||
|
|
||||||
# OCCT tools
|
# OCCT tools
|
||||||
# include the patched or original list of tools
|
# include the patched or original list of tools
|
||||||
# list <TOOLNAME>_TOOLKITS is created foreach tool and contains its toolkits
|
# list <TOOLNAME>_TOOLKITS is created foreach tool and contains its toolkits
|
||||||
|
1
adm/.gitignore
vendored
1
adm/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
/build-*
|
|
@@ -3,5 +3,5 @@ ModelingData TKG2d TKG3d TKGeomBase TKBRep
|
|||||||
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
|
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
|
||||||
Visualization TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost
|
Visualization TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost
|
||||||
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF
|
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
|
DataExchange TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF
|
||||||
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
|
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
|
||||||
|
@@ -203,7 +203,6 @@ n Aspect
|
|||||||
n DsgPrs
|
n DsgPrs
|
||||||
n Graphic3d
|
n Graphic3d
|
||||||
n Image
|
n Image
|
||||||
n Media
|
|
||||||
n MeshVS
|
n MeshVS
|
||||||
n OpenGl
|
n OpenGl
|
||||||
n D3DHost
|
n D3DHost
|
||||||
@@ -439,7 +438,3 @@ n Geom2dEvaluator
|
|||||||
t TKVCAF
|
t TKVCAF
|
||||||
n XCAFView
|
n XCAFView
|
||||||
n XCAFNoteObjects
|
n XCAFNoteObjects
|
||||||
t TKRWMesh
|
|
||||||
n RWGltf
|
|
||||||
n RWMesh
|
|
||||||
n RWObj
|
|
||||||
|
@@ -133,7 +133,7 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
|||||||
# set 3RDPARTY_${PRODUCT_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_LIBRARY
|
# set 3RDPARTY_${PRODUCT_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_LIBRARY
|
||||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
|
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
|
||||||
|
|
||||||
if ((3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}") OR (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}"))
|
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
|
||||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
|
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
|
||||||
PATHS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}" "${3RDPARTY_${PRODUCT_NAME}_DIR}"
|
PATHS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}" "${3RDPARTY_${PRODUCT_NAME}_DIR}"
|
||||||
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
|
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
|
||||||
@@ -181,9 +181,9 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
|||||||
# set 3RDPARTY_${PRODUCT_NAME}_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_DLL
|
# set 3RDPARTY_${PRODUCT_NAME}_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_DLL
|
||||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
|
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
|
||||||
|
|
||||||
if ((3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}") OR (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}"))
|
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
|
||||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
|
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
|
||||||
PATHS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}" "${3RDPARTY_${PRODUCT_NAME}_DIR}"
|
PATHS "${3RDPARTY_${PRODUCT_NAME}_DIR}"
|
||||||
PATH_SUFFIXES bin win${COMPILER_BITNESS}/${COMPILER}/bin
|
PATH_SUFFIXES bin win${COMPILER_BITNESS}/${COMPILER}/bin
|
||||||
NO_DEFAULT_PATH)
|
NO_DEFAULT_PATH)
|
||||||
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} STREQUAL "3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}-NOTFOUND")
|
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} STREQUAL "3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}-NOTFOUND")
|
||||||
|
@@ -65,7 +65,6 @@ if (WIN32)
|
|||||||
set (CSF_shell32 "shell32.lib")
|
set (CSF_shell32 "shell32.lib")
|
||||||
set (CSF_wsock32 "wsock32.lib")
|
set (CSF_wsock32 "wsock32.lib")
|
||||||
set (CSF_psapi "psapi.lib")
|
set (CSF_psapi "psapi.lib")
|
||||||
set (CSF_winmm "winmm.lib")
|
|
||||||
set (CSF_d3d9 "D3D9.lib")
|
set (CSF_d3d9 "D3D9.lib")
|
||||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2)
|
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2)
|
||||||
set (CSF_OpenGlLibs "libEGL libGLESv2")
|
set (CSF_OpenGlLibs "libEGL libGLESv2")
|
||||||
@@ -73,35 +72,28 @@ if (WIN32)
|
|||||||
set (CSF_OpenGlLibs "opengl32.lib")
|
set (CSF_OpenGlLibs "opengl32.lib")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set (CSF_objc "objc")
|
set (CSF_objc "objc")
|
||||||
|
|
||||||
# frameworks
|
# frameworks
|
||||||
if (IOS)
|
find_library (Appkit_LIB NAMES AppKit)
|
||||||
find_library (Appkit_LIB NAMES UIKit)
|
set (CSF_Appkit ${Appkit_LIB})
|
||||||
set (CSF_Appkit ${Appkit_LIB})
|
|
||||||
else()
|
|
||||||
find_library (Appkit_LIB NAMES AppKit)
|
|
||||||
set (CSF_Appkit ${Appkit_LIB})
|
|
||||||
endif()
|
|
||||||
OCCT_CHECK_AND_UNSET (Appkit_LIB)
|
|
||||||
|
|
||||||
find_library (IOKit_LIB NAMES IOKit)
|
find_library (IOKit_LIB NAMES IOKit)
|
||||||
set (CSF_IOKit ${IOKit_LIB})
|
set (CSF_IOKit ${IOKit_LIB})
|
||||||
|
|
||||||
|
OCCT_CHECK_AND_UNSET (Appkit_LIB)
|
||||||
OCCT_CHECK_AND_UNSET (IOKit_LIB)
|
OCCT_CHECK_AND_UNSET (IOKit_LIB)
|
||||||
|
|
||||||
if (IOS)
|
if (USE_GLX)
|
||||||
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_OpenGlLibs GL)
|
||||||
set (CSF_XwLibs "X11 Xext Xmu Xi")
|
set (CSF_XwLibs "X11 Xext Xmu Xi")
|
||||||
else()
|
else()
|
||||||
find_library (OpenGlLibs_LIB NAMES OpenGL)
|
find_library (OpenGlLibs_LIB NAMES OpenGL)
|
||||||
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
|
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
|
||||||
|
|
||||||
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
|
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -117,6 +109,5 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
set (CSF_XwLibs "X11 Xext Xmu Xi")
|
set (CSF_XwLibs "X11 Xext Xmu Xi")
|
||||||
set (CSF_dl "dl")
|
set (CSF_dl "dl")
|
||||||
set (CSF_fontconfig "fontconfig")
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@@ -143,7 +143,5 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR MINGW)
|
|||||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
|
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (BUILD_RELEASE_DISABLE_EXCEPTIONS)
|
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
|
||||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
|
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
|
||||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
|
|
||||||
endif()
|
|
||||||
|
@@ -163,18 +163,13 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
|
|||||||
OCCT_MAKE_COMPILER_BITNESS()
|
OCCT_MAKE_COMPILER_BITNESS()
|
||||||
|
|
||||||
string (TOLOWER "${PRODUCT_NAME}" lower_PRODUCT_NAME)
|
string (TOLOWER "${PRODUCT_NAME}" lower_PRODUCT_NAME)
|
||||||
if ("${lower_PRODUCT_NAME}" STREQUAL "egl")
|
|
||||||
string (SUBSTRING "${lower_PRODUCT_NAME}" 1 -1 lower_PRODUCT_NAME)
|
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*${COMPILER}.*${COMPILER_BITNESS}")
|
||||||
list (APPEND SEARCH_TEMPLATES "[^gl]+${lower_PRODUCT_NAME}.*")
|
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
|
||||||
else()
|
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER_BITNESS}")
|
||||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*${COMPILER}.*${COMPILER_BITNESS}")
|
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*.*${COMPILER_BITNESS}")
|
||||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
|
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+")
|
||||||
list (APPEND SEARCH_TEMPLATES "^[a-zA-Z]*[0-9]*-${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
|
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*")
|
||||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER_BITNESS}")
|
|
||||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*.*${COMPILER_BITNESS}")
|
|
||||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+")
|
|
||||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
SUBDIRECTORY_NAMES ("${ROOT_DIR}" SUBDIR_NAME_LIST)
|
SUBDIRECTORY_NAMES ("${ROOT_DIR}" SUBDIR_NAME_LIST)
|
||||||
|
|
||||||
@@ -274,7 +269,7 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
|
|||||||
list (LENGTH OCCT_ALL_FILE_NAMES ALL_FILES_NB)
|
list (LENGTH OCCT_ALL_FILE_NAMES ALL_FILES_NB)
|
||||||
math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" )
|
math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" )
|
||||||
|
|
||||||
# emit warnings if there are unprocessed headers
|
# emit warnings if there is unprocessed headers
|
||||||
file (GLOB OCCT_ALL_FILES_IN_DIR "${OCCT_COLLECT_SOURCE_DIR}/${OCCT_PACKAGE}/*.*")
|
file (GLOB OCCT_ALL_FILES_IN_DIR "${OCCT_COLLECT_SOURCE_DIR}/${OCCT_PACKAGE}/*.*")
|
||||||
file (GLOB OCCT_ALL_FILES_IN_PATCH_DIR "${BUILD_PATCH}/src/${OCCT_PACKAGE}/*.*")
|
file (GLOB OCCT_ALL_FILES_IN_PATCH_DIR "${BUILD_PATCH}/src/${OCCT_PACKAGE}/*.*")
|
||||||
|
|
||||||
@@ -307,8 +302,8 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
|
|||||||
list (APPEND OCCT_HEADER_FILES_COMPLETE ${OCCT_FILE_IN_DIR})
|
list (APPEND OCCT_HEADER_FILES_COMPLETE ${OCCT_FILE_IN_DIR})
|
||||||
|
|
||||||
# collect header files with name that does not contain its package one
|
# collect header files with name that does not contain its package one
|
||||||
string (REGEX MATCH "^${OCCT_PACKAGE}[_.]" IS_HEADER_MATHCING_PACKAGE "${OCCT_FILE_NAME}")
|
string (FIND "${OCCT_FILE_NAME}" "${OCCT_PACKAGE}_" FOUND_INDEX)
|
||||||
if (NOT IS_HEADER_MATHCING_PACKAGE)
|
if (NOT ${FOUND_INDEX} EQUAL 0)
|
||||||
list (APPEND OCCT_HEADER_FILE_WITH_PROPER_NAMES "${OCCT_FILE_NAME}")
|
list (APPEND OCCT_HEADER_FILE_WITH_PROPER_NAMES "${OCCT_FILE_NAME}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -355,12 +350,12 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
|
|||||||
list (FIND OCCT_USED_PACKAGES ${PACKAGE_NAME} IS_HEADER_FOUND)
|
list (FIND OCCT_USED_PACKAGES ${PACKAGE_NAME} IS_HEADER_FOUND)
|
||||||
if (NOT ${IS_HEADER_FOUND} EQUAL -1)
|
if (NOT ${IS_HEADER_FOUND} EQUAL -1)
|
||||||
if (NOT EXISTS "${OCCT_COLLECT_SOURCE_DIR}/${PACKAGE_NAME}/${HEADER_FILE_NAME}")
|
if (NOT EXISTS "${OCCT_COLLECT_SOURCE_DIR}/${PACKAGE_NAME}/${HEADER_FILE_NAME}")
|
||||||
message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is not present in the sources and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
|
message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is not presented in the sources and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
|
||||||
file (REMOVE "${OCCT_HEADER_FILE_OLD}")
|
file (REMOVE "${OCCT_HEADER_FILE_OLD}")
|
||||||
else()
|
else()
|
||||||
list (FIND OCCT_HEADER_FILE_NAMES_NOT_IN_FILES ${PACKAGE_NAME} IS_HEADER_FOUND)
|
list (FIND OCCT_HEADER_FILE_NAMES_NOT_IN_FILES ${PACKAGE_NAME} IS_HEADER_FOUND)
|
||||||
if (NOT ${IS_HEADER_FOUND} EQUAL -1)
|
if (NOT ${IS_HEADER_FOUND} EQUAL -1)
|
||||||
message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is present in the sources but not involved in FILES and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
|
message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is presented in the sources but not involved in FILES and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
|
||||||
file (REMOVE "${OCCT_HEADER_FILE_OLD}")
|
file (REMOVE "${OCCT_HEADER_FILE_OLD}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@@ -1,21 +1,23 @@
|
|||||||
#qt
|
#qt
|
||||||
|
|
||||||
# Qt is searched manually first (just determine root)
|
#looking for 3RDPARTY_QT_DIR variable used later in qt_macro.cmake
|
||||||
message (STATUS "Processing Qt 3-rd party")
|
SET(CSF_QtCore "QtCore")
|
||||||
|
THIRDPARTY_PRODUCT("QT" "" "CSF_QtCore" "d")
|
||||||
|
|
||||||
if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "")
|
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_QT_DIR}/bin")
|
||||||
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME)
|
|
||||||
|
|
||||||
if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "")
|
list (REMOVE_ITEM 3RDPARTY_NOT_INCLUDED "3RDPARTY_QT_INCLUDE_DIR")
|
||||||
message (FATAL_ERROR "... Qt root directory was not found")
|
list (REMOVE_ITEM 3RDPARTY_NO_LIBS "3RDPARTY_QT_LIBRARY_DIR")
|
||||||
endif()
|
list (REMOVE_ITEM 3RDPARTY_NO_DLLS "3RDPARTY_QT_DLL_DIR")
|
||||||
|
|
||||||
# Combine directory name with absolute path and show in GUI
|
UNSET (${3RDPARTY_QT_DLL} CACHE)
|
||||||
set (3RDPARTY_QT_DIR "${3RDPARTY_DIR}/${3RDPARTY_QT_DIR_NAME}" CACHE PATH "The directory containing Qt" FORCE)
|
UNSET (${3RDPARTY_QT_DLL_DIR} CACHE)
|
||||||
message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}")
|
UNSET (${3RDPARTY_QT_INCLUDE_DIR} CACHE)
|
||||||
endif()
|
UNSET (${3RDPARTY_QT_LIBRARY} CACHE)
|
||||||
|
UNSET (${3RDPARTY_QT_LIBRARY_DIR} CACHE)
|
||||||
|
|
||||||
set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}")
|
set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}")
|
||||||
|
message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}")
|
||||||
|
|
||||||
# Now set CMAKE_PREFIX_PATH to point to local Qt installation.
|
# Now set CMAKE_PREFIX_PATH to point to local Qt installation.
|
||||||
# Without this setting find_package() will not work
|
# Without this setting find_package() will not work
|
||||||
@@ -31,4 +33,4 @@ if (NOT ${Qt5_FOUND})
|
|||||||
#message (STATUS "Qt4 cmake configuration")
|
#message (STATUS "Qt4 cmake configuration")
|
||||||
else()
|
else()
|
||||||
#message (STATUS "Qt5 cmake configuration")
|
#message (STATUS "Qt5 cmake configuration")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -1,86 +0,0 @@
|
|||||||
# RapidJSON
|
|
||||||
|
|
||||||
if (NOT DEFINED INSTALL_RAPIDJSON)
|
|
||||||
set (INSTALL_RAPIDJSON OFF CACHE BOOL "${INSTALL_RAPIDJSON_DESCR}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# RapidJSON directory
|
|
||||||
if (NOT DEFINED 3RDPARTY_RAPIDJSON_DIR)
|
|
||||||
set (3RDPARTY_RAPIDJSON_DIR "" CACHE PATH "The directory containing RapidJSON")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# search for RapidJSON in user defined directory
|
|
||||||
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
|
||||||
if (NOT 3RDPARTY_RAPIDJSON_DIR OR NOT EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
|
|
||||||
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" RapidJSON RAPIDJSON_DIR_NAME)
|
|
||||||
if (RAPIDJSON_DIR_NAME)
|
|
||||||
set (3RDPARTY_RAPIDJSON_DIR "${3RDPARTY_DIR}/${RAPIDJSON_DIR_NAME}" CACHE PATH "The directory containing RapidJSON" FORCE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT DEFINED 3RDPARTY_RAPIDJSON_INCLUDE_DIR)
|
|
||||||
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the RAPIDJSON")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT 3RDPARTY_RAPIDJSON_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
|
|
||||||
|
|
||||||
set (HEADER_NAMES rapidjson/rapidjson.h)
|
|
||||||
|
|
||||||
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "3RDPARTY_RAPIDJSON_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to RapidJSON header file" FORCE)
|
|
||||||
|
|
||||||
if (3RDPARTY_RAPIDJSON_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
|
|
||||||
find_path (3RDPARTY_RAPIDJSON_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
|
||||||
PATHS ${3RDPARTY_RAPIDJSON_DIR}
|
|
||||||
PATH_SUFFIXES include rapidjson
|
|
||||||
CMAKE_FIND_ROOT_PATH_BOTH
|
|
||||||
NO_DEFAULT_PATH)
|
|
||||||
else()
|
|
||||||
find_path (3RDPARTY_RAPIDJSON_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
|
||||||
PATH_SUFFIXES include rapidjson
|
|
||||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# use default (CMake) RapidJSON search
|
|
||||||
if (NOT 3RDPARTY_RAPIDJSON_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
|
|
||||||
if (3RDPARTY_RAPIDJSON_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
|
|
||||||
set (CACHED_RAPIDJSON_DIR $ENV{RapidJSON_DIR})
|
|
||||||
set (ENV{RapidJSON_DIR} "${3RDPARTY_RAPIDJSON_DIR}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(RapidJSON QUIET)
|
|
||||||
|
|
||||||
# restore ENV{RapidJSON_DIR}
|
|
||||||
if (3RDPARTY_RAPIDJSON_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
|
|
||||||
set (ENV{RapidJSON_DIR} ${CACHED_RAPIDJSON_DIR})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (${RAPIDJSON_FOUND})
|
|
||||||
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "${RAPIDJSON_INCLUDE_DIR}" CACHE PATH "the path to RapidJSON header file" FORCE)
|
|
||||||
set (3RDPARTY_RAPIDJSON_DIR "${RAPIDJSON_ROOT_DIR}" CACHE PATH "The directory containing RapidJSON" FORCE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (3RDPARTY_RAPIDJSON_INCLUDE_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
|
|
||||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
|
|
||||||
|
|
||||||
# Install header files
|
|
||||||
if (INSTALL_RAPIDJSON)
|
|
||||||
file(GLOB RAPIDJSON_SUBDIRS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}/*")
|
|
||||||
foreach(SUBDIR ${RAPIDJSON_SUBDIRS})
|
|
||||||
if(IS_DIRECTORY "${SUBDIR}")
|
|
||||||
install (DIRECTORY "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
|
|
||||||
else()
|
|
||||||
install (FILES "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_RAPIDJSON_INCLUDE_DIR)
|
|
||||||
|
|
||||||
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "" CACHE PATH "the path to RapidJSON header file" FORCE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# unset all redundant variables
|
|
||||||
OCCT_CHECK_AND_UNSET(RapidJSON_DIR)
|
|
@@ -28,11 +28,6 @@ Applies only for Debug configuration.")
|
|||||||
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR
|
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR
|
||||||
"Append the postfix to names of output libraries")
|
"Append the postfix to names of output libraries")
|
||||||
|
|
||||||
set (BUILD_RELEASE_DISABLE_EXCEPTIONS_DESCR
|
|
||||||
"Disables exceptions like Standard_OutOfRange in Release builds.
|
|
||||||
Defines No_Exception macros for Release builds when enabled (default).
|
|
||||||
These exceptions are always enabled in Debug builds, but disable in Release for better performance")
|
|
||||||
|
|
||||||
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER_DESCR
|
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER_DESCR
|
||||||
"Enable/Disable the floating point exceptions (FPE) during DRAW execution only.
|
"Enable/Disable the floating point exceptions (FPE) during DRAW execution only.
|
||||||
Corresponding environment variable (CSF_FPE) can be changed manually
|
Corresponding environment variable (CSF_FPE) can be changed manually
|
||||||
@@ -94,7 +89,6 @@ INSTALL_MESSAGE (INSTALL_EGL "EGL binaries")
|
|||||||
INSTALL_MESSAGE (INSTALL_GLES2 "OpenGL ES 2.0 binaries")
|
INSTALL_MESSAGE (INSTALL_GLES2 "OpenGL ES 2.0 binaries")
|
||||||
INSTALL_MESSAGE (INSTALL_FREETYPE "FreeType binaries")
|
INSTALL_MESSAGE (INSTALL_FREETYPE "FreeType binaries")
|
||||||
INSTALL_MESSAGE (INSTALL_TBB "TBB binaries")
|
INSTALL_MESSAGE (INSTALL_TBB "TBB binaries")
|
||||||
INSTALL_MESSAGE (INSTALL_RAPIDJSON "RapidJSON header files")
|
|
||||||
INSTALL_MESSAGE (INSTALL_TCL "TCL binaries")
|
INSTALL_MESSAGE (INSTALL_TCL "TCL binaries")
|
||||||
INSTALL_MESSAGE (INSTALL_TK "TK binaries")
|
INSTALL_MESSAGE (INSTALL_TK "TK binaries")
|
||||||
INSTALL_MESSAGE (INSTALL_VTK "VTK binaries ")
|
INSTALL_MESSAGE (INSTALL_VTK "VTK binaries ")
|
||||||
@@ -162,10 +156,6 @@ 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)")
|
module for support of popular graphics image formats (PNG, BMP etc)")
|
||||||
|
|
||||||
set (USE_RAPIDJSON_DESCR
|
|
||||||
"Indicates whether RapidJSON product should be used in OCCT DataExchange
|
|
||||||
module for support of JSON-based formats like glTF")
|
|
||||||
|
|
||||||
set (USE_EGL_DESCR
|
set (USE_EGL_DESCR
|
||||||
"Indicates whether EGL should be used in OCCT visualization
|
"Indicates whether EGL should be used in OCCT visualization
|
||||||
module instead of conventional OpenGL context creation APIs")
|
module instead of conventional OpenGL context creation APIs")
|
||||||
|
@@ -24,44 +24,21 @@
|
|||||||
# load tools
|
# load tools
|
||||||
source [file join [file dirname [info script]] genconfdeps.tcl]
|
source [file join [file dirname [info script]] genconfdeps.tcl]
|
||||||
|
|
||||||
# proxy variable for implicit file path normalization
|
|
||||||
set PRODUCTS_PATH_INPUT "$::PRODUCTS_PATH"
|
|
||||||
|
|
||||||
package require Tk
|
package require Tk
|
||||||
|
|
||||||
set aRowIter 0
|
set aRowIter 0
|
||||||
set aCheckRowIter 0
|
set aCheckRowIter 0
|
||||||
frame .myFrame -padx 5 -pady 5
|
frame .myFrame -padx 5 -pady 5
|
||||||
pack .myFrame -fill both -expand 1
|
pack .myFrame -fill both -expand 1
|
||||||
frame .myFrame.myPrjFrame
|
|
||||||
frame .myFrame.myVsFrame
|
frame .myFrame.myVsFrame
|
||||||
frame .myFrame.myHxxChecks
|
frame .myFrame.myHxxChecks
|
||||||
frame .myFrame.myChecks
|
frame .myFrame.myChecks
|
||||||
|
|
||||||
# project file format
|
|
||||||
set SYS_PRJFMT_LIST {}
|
|
||||||
set SYS_PRJNAME_LIST {}
|
|
||||||
if { "$::tcl_platform(platform)" == "windows" } {
|
|
||||||
lappend ::SYS_PRJFMT_LIST "vcxproj"
|
|
||||||
lappend ::SYS_PRJNAME_LIST "Visual Studio (.vcxproj)"
|
|
||||||
}
|
|
||||||
if { "$tcl_platform(os)" == "Darwin" } {
|
|
||||||
lappend ::SYS_PRJFMT_LIST "xcd"
|
|
||||||
lappend ::SYS_PRJNAME_LIST "XCode (.xcd)"
|
|
||||||
}
|
|
||||||
lappend ::SYS_PRJFMT_LIST "cbp"
|
|
||||||
lappend ::SYS_PRJNAME_LIST "Code Blocks (.cbp)"
|
|
||||||
lappend ::SYS_PRJFMT_LIST "pro"
|
|
||||||
lappend ::SYS_PRJNAME_LIST "Qt Creator (.pro)"
|
|
||||||
|
|
||||||
set aPrjIndex [lsearch $::SYS_PRJFMT_LIST $::PRJFMT]
|
|
||||||
set ::PRJNAME [lindex $::SYS_PRJNAME_LIST $aPrjIndex]
|
|
||||||
|
|
||||||
set SYS_VS_LIST {}
|
set SYS_VS_LIST {}
|
||||||
set SYS_VC_LIST {}
|
set SYS_VC_LIST {}
|
||||||
set SYS_VCVARS_LIST {}
|
set SYS_VCVARS_LIST {}
|
||||||
|
|
||||||
# detect installed Visual Studio 2017+ instances by running vswhere.exe
|
# detect installed Visual Studio 2017 instances by running vswhere.exe
|
||||||
if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } {
|
if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } {
|
||||||
lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141)"
|
lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141)"
|
||||||
lappend ::SYS_VC_LIST "vc141"
|
lappend ::SYS_VC_LIST "vc141"
|
||||||
@@ -72,16 +49,6 @@ if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Micr
|
|||||||
lappend ::SYS_VC_LIST "vc141-uwp"
|
lappend ::SYS_VC_LIST "vc141-uwp"
|
||||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
|
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
|
||||||
}
|
}
|
||||||
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } {
|
|
||||||
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142)"
|
|
||||||
lappend ::SYS_VC_LIST "vc142"
|
|
||||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
|
|
||||||
}
|
|
||||||
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] } {
|
|
||||||
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142) UWP"
|
|
||||||
lappend ::SYS_VC_LIST "vc142-uwp"
|
|
||||||
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
|
|
||||||
}
|
|
||||||
|
|
||||||
# detect installed Visual Studio instances from global environment
|
# detect installed Visual Studio instances from global environment
|
||||||
if { [info exists ::env(VS140COMNTOOLS)] } {
|
if { [info exists ::env(VS140COMNTOOLS)] } {
|
||||||
@@ -134,7 +101,6 @@ proc wokdep:gui:Close {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc wokdep:gui:SwitchConfig {} {
|
proc wokdep:gui:SwitchConfig {} {
|
||||||
set ::PRJFMT [lindex $::SYS_PRJFMT_LIST [.myFrame.myPrjFrame.myPrjCombo current]]
|
|
||||||
set ::VCVER [lindex $::SYS_VC_LIST [.myFrame.myVsFrame.myVsCombo current]]
|
set ::VCVER [lindex $::SYS_VC_LIST [.myFrame.myVsFrame.myVsCombo current]]
|
||||||
set ::VCVARS [lindex $::SYS_VCVARS_LIST [.myFrame.myVsFrame.myVsCombo current]]
|
set ::VCVARS [lindex $::SYS_VCVARS_LIST [.myFrame.myVsFrame.myVsCombo current]]
|
||||||
|
|
||||||
@@ -202,17 +168,6 @@ proc wokdep:gui:UpdateList {} {
|
|||||||
}
|
}
|
||||||
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "liblzma" "lzma.h" "$aCheckLib" {"lzma" "xz"}
|
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "liblzma" "lzma.h" "$aCheckLib" {"lzma" "xz"}
|
||||||
}
|
}
|
||||||
if { "$::HAVE_E57" == "true" } {
|
|
||||||
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "e57" "e57/E57Foundation.h" "E57RefImpl" {"e57"}
|
|
||||||
set aCheckLib "xerces-c"
|
|
||||||
if { "$::tcl_platform(platform)" == "windows" } {
|
|
||||||
set aCheckLib "xerces-c_3"
|
|
||||||
}
|
|
||||||
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "xerces-c" "xercesc/sax2/XMLReaderFactory.hpp" "$aCheckLib" {"xerces"}
|
|
||||||
}
|
|
||||||
if { "$::HAVE_RAPIDJSON" == "true" } {
|
|
||||||
wokdep:SearchRapidJson anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
|
||||||
}
|
|
||||||
|
|
||||||
if { "$::CHECK_QT4" == "true" } {
|
if { "$::CHECK_QT4" == "true" } {
|
||||||
wokdep:SearchQt4 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
wokdep:SearchQt4 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||||
@@ -236,9 +191,9 @@ proc wokdep:gui:BrowseVcVars {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc wokdep:gui:BrowsePartiesRoot {} {
|
proc wokdep:gui:BrowsePartiesRoot {} {
|
||||||
set aResult [tk_chooseDirectory -initialdir $::PRODUCTS_PATH_INPUT -title "Choose a directory"]
|
set aResult [tk_chooseDirectory -initialdir $::PRODUCTS_PATH -title "Choose a directory"]
|
||||||
if { "$aResult" != "" } {
|
if { "$aResult" != "" } {
|
||||||
set ::PRODUCTS_PATH_INPUT $aResult
|
set ::PRODUCTS_PATH $aResult
|
||||||
wokdep:gui:UpdateList
|
wokdep:gui:UpdateList
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -435,8 +390,6 @@ proc wokdep:gui:Show64Bitness { theRowIter } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Header
|
# Header
|
||||||
ttk::label .myFrame.myPrjFrame.myPrjLbl -text "Project format:" -padding {5 5 20 5}
|
|
||||||
ttk::combobox .myFrame.myPrjFrame.myPrjCombo -values $SYS_PRJNAME_LIST -state readonly -textvariable PRJNAME -width 40
|
|
||||||
ttk::label .myFrame.myVsFrame.myVsLbl -text "Visual Studio configuration:" -padding {5 5 20 5}
|
ttk::label .myFrame.myVsFrame.myVsLbl -text "Visual Studio configuration:" -padding {5 5 20 5}
|
||||||
ttk::combobox .myFrame.myVsFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 40
|
ttk::combobox .myFrame.myVsFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 40
|
||||||
ttk::combobox .myFrame.myVsFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6
|
ttk::combobox .myFrame.myVsFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6
|
||||||
@@ -452,7 +405,7 @@ ttk::label .myFrame.myHxxChecks.myScutsLbl -text "Strategy for filling he
|
|||||||
|
|
||||||
#
|
#
|
||||||
ttk::label .myFrame.mySrchLbl -text "3rd-parties search path:" -padding {5 5 80 5}
|
ttk::label .myFrame.mySrchLbl -text "3rd-parties search path:" -padding {5 5 80 5}
|
||||||
entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH_INPUT -width 80
|
entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH -width 80
|
||||||
ttk::button .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
|
ttk::button .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
|
||||||
checkbutton .myFrame.myChecks.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
|
checkbutton .myFrame.myChecks.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
|
||||||
ttk::label .myFrame.myChecks.myFImageLbl -text "Use FreeImage"
|
ttk::label .myFrame.myChecks.myFImageLbl -text "Use FreeImage"
|
||||||
@@ -470,9 +423,6 @@ checkbutton .myFrame.myChecks.myFFmpegCheck -offvalue "false" -onvalue "true
|
|||||||
ttk::label .myFrame.myChecks.myFFmpegLbl -text "Use FFmpeg"
|
ttk::label .myFrame.myChecks.myFFmpegLbl -text "Use FFmpeg"
|
||||||
#checkbutton .myFrame.myChecks.myOpenClCheck -offvalue "false" -onvalue "true" -variable HAVE_OPENCL -command wokdep:gui:UpdateList
|
#checkbutton .myFrame.myChecks.myOpenClCheck -offvalue "false" -onvalue "true" -variable HAVE_OPENCL -command wokdep:gui:UpdateList
|
||||||
#ttk::label .myFrame.myChecks.myOpenClLbl -text "Use OpenCL"
|
#ttk::label .myFrame.myChecks.myOpenClLbl -text "Use OpenCL"
|
||||||
checkbutton .myFrame.myChecks.myRapidJsonCheck -offvalue "false" -onvalue "true" -variable HAVE_RAPIDJSON -command wokdep:gui:UpdateList
|
|
||||||
ttk::label .myFrame.myChecks.myRapidJsonLbl -text "Use RapidJSON"
|
|
||||||
|
|
||||||
checkbutton .myFrame.myChecks.myMacGLXCheck -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
|
checkbutton .myFrame.myChecks.myMacGLXCheck -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
|
||||||
ttk::label .myFrame.myChecks.myMacGLXLbl -text "Use X11 for windows drawing"
|
ttk::label .myFrame.myChecks.myMacGLXLbl -text "Use X11 for windows drawing"
|
||||||
ttk::label .myFrame.myChecks.myVtkLbl -text "Use VTK"
|
ttk::label .myFrame.myChecks.myVtkLbl -text "Use VTK"
|
||||||
@@ -482,8 +432,6 @@ checkbutton .myFrame.myChecks.myZLibCheck -offvalue "false" -onvalue "true
|
|||||||
ttk::label .myFrame.myChecks.myZLibLbl -text "Use zlib"
|
ttk::label .myFrame.myChecks.myZLibLbl -text "Use zlib"
|
||||||
checkbutton .myFrame.myChecks.myLzmaCheck -offvalue "false" -onvalue "true" -variable HAVE_LIBLZMA -command wokdep:gui:UpdateList
|
checkbutton .myFrame.myChecks.myLzmaCheck -offvalue "false" -onvalue "true" -variable HAVE_LIBLZMA -command wokdep:gui:UpdateList
|
||||||
ttk::label .myFrame.myChecks.myLzmaLbl -text "Use liblzma"
|
ttk::label .myFrame.myChecks.myLzmaLbl -text "Use liblzma"
|
||||||
checkbutton .myFrame.myChecks.myE57Check -offvalue "false" -onvalue "true" -variable HAVE_E57 -command wokdep:gui:UpdateList
|
|
||||||
ttk::label .myFrame.myChecks.myE57Lbl -text "Use E57"
|
|
||||||
|
|
||||||
checkbutton .myFrame.myChecks.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList
|
checkbutton .myFrame.myChecks.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList
|
||||||
ttk::label .myFrame.myChecks.myQt4Lbl -text "Search Qt4"
|
ttk::label .myFrame.myChecks.myQt4Lbl -text "Search Qt4"
|
||||||
@@ -546,10 +494,6 @@ ttk::button .myFrame.myClose -text "Close" -command wokdep:gui:Close
|
|||||||
|
|
||||||
# Create grid
|
# Create grid
|
||||||
# Header
|
# Header
|
||||||
grid .myFrame.myPrjFrame -row $aRowIter -column 0 -columnspan 10 -sticky w
|
|
||||||
grid .myFrame.myPrjFrame.myPrjLbl -row 0 -column 0
|
|
||||||
grid .myFrame.myPrjFrame.myPrjCombo -row 0 -column 1
|
|
||||||
incr aRowIter
|
|
||||||
if { "$tcl_platform(platform)" == "windows" } {
|
if { "$tcl_platform(platform)" == "windows" } {
|
||||||
grid .myFrame.myVsFrame -row $aRowIter -column 0 -columnspan 10 -sticky w
|
grid .myFrame.myVsFrame -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||||
grid .myFrame.myVsFrame.myVsLbl -row 0 -column 0
|
grid .myFrame.myVsFrame.myVsLbl -row 0 -column 0
|
||||||
@@ -593,8 +537,8 @@ if { "$::tcl_platform(os)" != "Darwin" } {
|
|||||||
grid .myFrame.myChecks.myZLibCheck -row $aCheckRowIter -column 6 -sticky e
|
grid .myFrame.myChecks.myZLibCheck -row $aCheckRowIter -column 6 -sticky e
|
||||||
grid .myFrame.myChecks.myZLibLbl -row $aCheckRowIter -column 7 -sticky w
|
grid .myFrame.myChecks.myZLibLbl -row $aCheckRowIter -column 7 -sticky w
|
||||||
|
|
||||||
grid .myFrame.myChecks.myQt4Check -row $aCheckRowIter -column 12 -sticky e
|
grid .myFrame.myChecks.myQt4Check -row $aCheckRowIter -column 10 -sticky e
|
||||||
grid .myFrame.myChecks.myQt4Lbl -row $aCheckRowIter -column 13 -sticky w
|
grid .myFrame.myChecks.myQt4Lbl -row $aCheckRowIter -column 11 -sticky w
|
||||||
|
|
||||||
incr aCheckRowIter
|
incr aCheckRowIter
|
||||||
grid .myFrame.myChecks.myFFmpegCheck -row $aCheckRowIter -column 0 -sticky e
|
grid .myFrame.myChecks.myFFmpegCheck -row $aCheckRowIter -column 0 -sticky e
|
||||||
@@ -604,22 +548,18 @@ grid .myFrame.myChecks.myVtkLbl -row $aCheckRowIter -column 3 -sticky w
|
|||||||
if { "$::tcl_platform(platform)" == "windows" } {
|
if { "$::tcl_platform(platform)" == "windows" } {
|
||||||
grid .myFrame.myChecks.myD3dCheck -row $aCheckRowIter -column 4 -sticky e
|
grid .myFrame.myChecks.myD3dCheck -row $aCheckRowIter -column 4 -sticky e
|
||||||
grid .myFrame.myChecks.myD3dLbl -row $aCheckRowIter -column 5 -sticky w
|
grid .myFrame.myChecks.myD3dLbl -row $aCheckRowIter -column 5 -sticky w
|
||||||
} elseif { "$::tcl_platform(os)" == "Darwin" } {
|
|
||||||
grid .myFrame.myChecks.myMacGLXCheck -row $aCheckRowIter -column 4 -sticky e
|
|
||||||
grid .myFrame.myChecks.myMacGLXLbl -row $aCheckRowIter -column 5 -sticky w
|
|
||||||
}
|
}
|
||||||
grid .myFrame.myChecks.myLzmaCheck -row $aCheckRowIter -column 6 -sticky e
|
grid .myFrame.myChecks.myLzmaCheck -row $aCheckRowIter -column 6 -sticky e
|
||||||
grid .myFrame.myChecks.myLzmaLbl -row $aCheckRowIter -column 7 -sticky w
|
grid .myFrame.myChecks.myLzmaLbl -row $aCheckRowIter -column 7 -sticky w
|
||||||
grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 12 -sticky e
|
grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 10 -sticky e
|
||||||
grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 13 -sticky w
|
grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 11 -sticky w
|
||||||
|
|
||||||
incr aCheckRowIter
|
|
||||||
grid .myFrame.myChecks.myRapidJsonCheck -row $aCheckRowIter -column 0 -sticky e
|
|
||||||
grid .myFrame.myChecks.myRapidJsonLbl -row $aCheckRowIter -column 1 -sticky w
|
|
||||||
grid .myFrame.myChecks.myE57Check -row $aCheckRowIter -column 6 -sticky e
|
|
||||||
grid .myFrame.myChecks.myE57Lbl -row $aCheckRowIter -column 7 -sticky w
|
|
||||||
|
|
||||||
incr aCheckRowIter
|
incr aCheckRowIter
|
||||||
|
if { "$::tcl_platform(os)" == "Darwin" } {
|
||||||
|
grid .myFrame.myChecks.myMacGLXCheck -row $aCheckRowIter -column 0 -sticky e
|
||||||
|
grid .myFrame.myChecks.myMacGLXLbl -row $aCheckRowIter -column 1 -sticky w
|
||||||
|
incr aCheckRowIter
|
||||||
|
}
|
||||||
|
|
||||||
# Additional headers search paths
|
# Additional headers search paths
|
||||||
grid .myFrame.myIncLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
|
grid .myFrame.myIncLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||||
@@ -652,9 +592,6 @@ grid .myFrame.mySave -row $aRowIter -column 4 -columnspan 2
|
|||||||
grid .myFrame.myClose -row $aRowIter -column 6 -columnspan 2
|
grid .myFrame.myClose -row $aRowIter -column 6 -columnspan 2
|
||||||
|
|
||||||
# Bind events
|
# Bind events
|
||||||
bind .myFrame.myPrjFrame.myPrjCombo <<ComboboxSelected>> {
|
|
||||||
wokdep:gui:SwitchConfig
|
|
||||||
}
|
|
||||||
bind .myFrame.myVsFrame.myVsCombo <<ComboboxSelected>> {
|
bind .myFrame.myVsFrame.myVsCombo <<ComboboxSelected>> {
|
||||||
wokdep:gui:SwitchConfig
|
wokdep:gui:SwitchConfig
|
||||||
}
|
}
|
||||||
@@ -663,7 +600,6 @@ bind .myFrame.myVsFrame.myArchCombo <<ComboboxSelected>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.myFrame.mySrchEntry configure -validate all -validatecommand {
|
.myFrame.mySrchEntry configure -validate all -validatecommand {
|
||||||
set ::PRODUCTS_PATH [file normalize "$::PRODUCTS_PATH_INPUT"]
|
|
||||||
#return [file exists "$::PRODUCTS_PATH"]
|
#return [file exists "$::PRODUCTS_PATH"]
|
||||||
wokdep:gui:UpdateList
|
wokdep:gui:UpdateList
|
||||||
return 1
|
return 1
|
||||||
|
@@ -27,10 +27,8 @@ if { "$tcl_platform(platform)" == "unix" } {
|
|||||||
set SYS_EXE_SUFFIX ""
|
set SYS_EXE_SUFFIX ""
|
||||||
if { "$tcl_platform(os)" == "Darwin" } {
|
if { "$tcl_platform(os)" == "Darwin" } {
|
||||||
set SYS_LIB_SUFFIX "dylib"
|
set SYS_LIB_SUFFIX "dylib"
|
||||||
set PRJFMT "xcd"
|
|
||||||
} else {
|
} else {
|
||||||
set SYS_LIB_SUFFIX "so"
|
set SYS_LIB_SUFFIX "so"
|
||||||
set PRJFMT "cbp"
|
|
||||||
}
|
}
|
||||||
set VCVER "gcc"
|
set VCVER "gcc"
|
||||||
set VCVARS ""
|
set VCVARS ""
|
||||||
@@ -41,7 +39,6 @@ if { "$tcl_platform(platform)" == "unix" } {
|
|||||||
set SYS_EXE_SUFFIX ".exe"
|
set SYS_EXE_SUFFIX ".exe"
|
||||||
set VCVER "vc10"
|
set VCVER "vc10"
|
||||||
set VCVARS ""
|
set VCVARS ""
|
||||||
set PRJFMT "vcxproj"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set SHORTCUT_HEADERS "ShortCut"
|
set SHORTCUT_HEADERS "ShortCut"
|
||||||
@@ -68,7 +65,7 @@ if { [info exists ::env(SHORTCUT_HEADERS)] } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# fetch environment variables (e.g. set by custom.sh or custom.bat) and set them as tcl variables with the same name
|
# fetch environment variables (e.g. set by custom.sh or custom.bat) and set them as tcl variables with the same name
|
||||||
set THE_ENV_VARIABLES {HAVE_FREEIMAGE HAVE_FFMPEG HAVE_TBB HAVE_GLES2 HAVE_D3D HAVE_VTK HAVE_ZLIB HAVE_LIBLZMA HAVE_E57 HAVE_RAPIDJSON HAVE_OPENCL CHECK_QT4 CHECK_JDK MACOSX_USE_GLX HAVE_RelWithDebInfo}
|
set THE_ENV_VARIABLES {HAVE_FREEIMAGE HAVE_FFMPEG HAVE_TBB HAVE_GLES2 HAVE_D3D HAVE_VTK HAVE_ZLIB HAVE_LIBLZMA HAVE_OPENCL CHECK_QT4 CHECK_JDK MACOSX_USE_GLX HAVE_RelWithDebInfo}
|
||||||
foreach anEnvIter $THE_ENV_VARIABLES {
|
foreach anEnvIter $THE_ENV_VARIABLES {
|
||||||
set ${anEnvIter} "false"
|
set ${anEnvIter} "false"
|
||||||
if { [info exists ::env(${anEnvIter})] } {
|
if { [info exists ::env(${anEnvIter})] } {
|
||||||
@@ -85,14 +82,11 @@ if { "$tcl_platform(platform)" != "windows" } {
|
|||||||
set HAVE_D3D ""
|
set HAVE_D3D ""
|
||||||
set HAVE_RelWithDebInfo ""
|
set HAVE_RelWithDebInfo ""
|
||||||
}
|
}
|
||||||
foreach anEnvIter {ARCH VCVER VCVARS PRJFMT } {
|
foreach anEnvIter {ARCH VCVER VCVARS PRODUCTS_PATH} {
|
||||||
if { [info exists ::env(${anEnvIter})] } {
|
if { [info exists ::env(${anEnvIter})] } {
|
||||||
set ${anEnvIter} "$::env(${anEnvIter})"
|
set ${anEnvIter} "$::env(${anEnvIter})"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if { [info exists ::env(PRODUCTS_PATH)] } {
|
|
||||||
set PRODUCTS_PATH [file normalize "$::env(PRODUCTS_PATH)"]
|
|
||||||
}
|
|
||||||
|
|
||||||
if { [info exists ::env(CSF_OPT_INC)] } {
|
if { [info exists ::env(CSF_OPT_INC)] } {
|
||||||
set CSF_OPT_INC [split "$::env(CSF_OPT_INC)" $::SYS_PATH_SPLITTER]
|
set CSF_OPT_INC [split "$::env(CSF_OPT_INC)" $::SYS_PATH_SPLITTER]
|
||||||
@@ -146,12 +140,9 @@ proc wokdep:SearchHeader {theHeader} {
|
|||||||
# Search library file in $::CSF_OPT_LIB* and standard paths
|
# Search library file in $::CSF_OPT_LIB* and standard paths
|
||||||
proc wokdep:SearchLib {theLib theBitness {theSearchPath ""}} {
|
proc wokdep:SearchLib {theLib theBitness {theSearchPath ""}} {
|
||||||
if { "$theSearchPath" != "" } {
|
if { "$theSearchPath" != "" } {
|
||||||
set aPath "${theSearchPath}/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}"
|
set aPath "${theSearchPath}/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}"
|
||||||
set aPath2 "${theSearchPath}/${::SYS_LIB_PREFIX}${theLib}.a"
|
|
||||||
if { [file exists "$aPath"] } {
|
if { [file exists "$aPath"] } {
|
||||||
return "$aPath"
|
return "$aPath"
|
||||||
} elseif { "$::tcl_platform(platform)" != "windows" && [file exists "$aPath2"] } {
|
|
||||||
return "$aPath2"
|
|
||||||
} else {
|
} else {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
@@ -159,42 +150,31 @@ proc wokdep:SearchLib {theLib theBitness {theSearchPath ""}} {
|
|||||||
|
|
||||||
# search in custom paths
|
# search in custom paths
|
||||||
foreach aLibPath [set ::CSF_OPT_LIB$theBitness] {
|
foreach aLibPath [set ::CSF_OPT_LIB$theBitness] {
|
||||||
set aPath "${aLibPath}/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}"
|
set aPath "${aLibPath}/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}"
|
||||||
set aPath2 "${aLibPath}/${::SYS_LIB_PREFIX}${theLib}.a"
|
|
||||||
if { [file exists "$aPath"] } {
|
if { [file exists "$aPath"] } {
|
||||||
return "$aPath"
|
return "$aPath"
|
||||||
} elseif { "$::tcl_platform(platform)" != "windows" && [file exists "$aPath2"] } {
|
|
||||||
return "$aPath2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# search in system
|
# search in system
|
||||||
if { "$::ARCH" == "$theBitness"} {
|
if { "$::ARCH" == "$theBitness"} {
|
||||||
set aPath "/usr/lib/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}"
|
set aPath "/usr/lib/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}"
|
||||||
set aPath2 "/usr/lib/${::SYS_LIB_PREFIX}${theLib}.a"
|
|
||||||
if { [file exists "$aPath"] } {
|
if { [file exists "$aPath"] } {
|
||||||
return "$aPath"
|
return "$aPath"
|
||||||
} elseif { [file exists "$aPath2"] } {
|
|
||||||
return "$aPath2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if { "$::tcl_platform(os)" == "Linux" } {
|
if { "$::tcl_platform(os)" == "Linux" } {
|
||||||
if { "$theBitness" == "64" } {
|
if { "$theBitness" == "64" } {
|
||||||
set aPath "/usr/lib/x86_64-linux-gnu/lib${theLib}.so"
|
set aPath "/usr/lib/x86_64-linux-gnu/lib${theLib}.so"
|
||||||
set aPath2 "/usr/lib/x86_64-linux-gnu/lib${theLib}.a"
|
|
||||||
if { [file exists "$aPath"] } {
|
if { [file exists "$aPath"] } {
|
||||||
return "$aPath"
|
return "$aPath"
|
||||||
} elseif { [file exists "$aPath2"] } {
|
|
||||||
return "$aPath2"
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
set aPath "/usr/lib/i386-linux-gnu/lib${theLib}.so"
|
set aPath "/usr/lib/i386-linux-gnu/lib${theLib}.so"
|
||||||
set aPath2 "/usr/lib/i386-linux-gnu/lib${theLib}.a"
|
|
||||||
if { [file exists "$aPath"] } {
|
if { [file exists "$aPath"] } {
|
||||||
return "$aPath"
|
return "$aPath"
|
||||||
} elseif { [file exists "$aPath2"] } {
|
|
||||||
return "$aPath2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -875,25 +855,6 @@ proc wokdep:SearchGLES {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin6
|
|||||||
return "$isFound"
|
return "$isFound"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Search RapidJSON headers
|
|
||||||
proc wokdep:SearchRapidJson {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
|
|
||||||
upvar $theErrInc anErrInc
|
|
||||||
|
|
||||||
set isFound "true"
|
|
||||||
set aRJHPath [wokdep:SearchHeader "rapidjson/rapidjson.h"]
|
|
||||||
if { "$aRJHPath" == "" } {
|
|
||||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{rapidjson}*] "$::VCVER" "$::ARCH" ]
|
|
||||||
if { "$aPath" != "" && [file exists "$aPath/include/rapidjson/rapidjson.h"] } {
|
|
||||||
lappend ::CSF_OPT_INC "$aPath/include"
|
|
||||||
} else {
|
|
||||||
lappend anErrInc "Error: 'rapidjson/rapidjson.h' not found (RapidJSON)"
|
|
||||||
set isFound "false"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return "$isFound"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Auxiliary function, gets VTK version to set default search directory
|
# Auxiliary function, gets VTK version to set default search directory
|
||||||
proc wokdep:VtkVersion { thePath } {
|
proc wokdep:VtkVersion { thePath } {
|
||||||
set aResult "6.1"
|
set aResult "6.1"
|
||||||
@@ -1157,33 +1118,15 @@ proc wokdep:SearchX11 {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
|
|||||||
return "$isFound"
|
return "$isFound"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Returns OCCT version string from file Standard_Version.hxx (if available)
|
|
||||||
proc wokdep:DetectCasVersion {} {
|
|
||||||
set occt_ver 7.0.0
|
|
||||||
set aCasRoot [file normalize [file dirname [info script]]]
|
|
||||||
set filename "${aCasRoot}/src/Standard/Standard_Version.hxx"
|
|
||||||
if { [file exists $filename] } {
|
|
||||||
set fh [open $filename "r"]
|
|
||||||
set fh_loaded [read $fh]
|
|
||||||
close $fh
|
|
||||||
regexp {[^/]\s*#\s*define\s+OCC_VERSION_COMPLETE\s+\"([^\s]*)\"} $fh_loaded dummy occt_ver
|
|
||||||
} else {
|
|
||||||
puts "Error: file '$filename' not found"
|
|
||||||
}
|
|
||||||
return $occt_ver
|
|
||||||
}
|
|
||||||
|
|
||||||
# Generate (override) custom environment file
|
# Generate (override) custom environment file
|
||||||
proc wokdep:SaveCustom {} {
|
proc wokdep:SaveCustom {} {
|
||||||
set aGenInfo "This environment file was generated by genconf.tcl script at [clock format [clock seconds] -format "%Y.%m.%d %H:%M"]"
|
|
||||||
if { "$::tcl_platform(platform)" == "windows" } {
|
if { "$::tcl_platform(platform)" == "windows" } {
|
||||||
set aCustomFilePath "./custom.bat"
|
set aCustomFilePath "./custom.bat"
|
||||||
set aFile [open $aCustomFilePath "w"]
|
set aFile [open $aCustomFilePath "w"]
|
||||||
puts $aFile "@echo off"
|
puts $aFile "@echo off"
|
||||||
puts $aFile "rem $aGenInfo"
|
puts $aFile "rem This environment file was generated by wok_depsgui.tcl script at [clock format [clock seconds] -format "%Y.%m.%d %H:%M"]"
|
||||||
|
|
||||||
puts $aFile ""
|
puts $aFile ""
|
||||||
puts $aFile "set PRJFMT=$::PRJFMT"
|
|
||||||
puts $aFile "set VCVER=$::VCVER"
|
puts $aFile "set VCVER=$::VCVER"
|
||||||
puts $aFile "set ARCH=$::ARCH"
|
puts $aFile "set ARCH=$::ARCH"
|
||||||
puts $aFile "set VCVARS=$::VCVARS"
|
puts $aFile "set VCVARS=$::VCVARS"
|
||||||
@@ -1203,41 +1146,26 @@ proc wokdep:SaveCustom {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set aStringInc [join $::CSF_OPT_INC $::SYS_PATH_SPLITTER]
|
set aStringInc [join $::CSF_OPT_INC $::SYS_PATH_SPLITTER]
|
||||||
if { "$::PRODUCTS_PATH" != "" } {
|
|
||||||
set aStringInc [regsub -all "$::PRODUCTS_PATH" $aStringInc "%PRODUCTS_PATH%"]
|
|
||||||
}
|
|
||||||
puts $aFile ""
|
puts $aFile ""
|
||||||
puts $aFile "rem Additional headers search paths"
|
puts $aFile "rem Additional headers search paths"
|
||||||
puts $aFile "set \"CSF_OPT_INC=$aStringInc\""
|
puts $aFile "set \"CSF_OPT_INC=$aStringInc\""
|
||||||
|
|
||||||
set aStringLib32 [join $::CSF_OPT_LIB32 $::SYS_PATH_SPLITTER]
|
set aStringLib32 [join $::CSF_OPT_LIB32 $::SYS_PATH_SPLITTER]
|
||||||
if { "$::PRODUCTS_PATH" != "" } {
|
|
||||||
set aStringLib32 [regsub -all "$::PRODUCTS_PATH" $aStringLib32 "%PRODUCTS_PATH%"]
|
|
||||||
}
|
|
||||||
puts $aFile ""
|
puts $aFile ""
|
||||||
puts $aFile "rem Additional libraries (32-bit) search paths"
|
puts $aFile "rem Additional libraries (32-bit) search paths"
|
||||||
puts $aFile "set \"CSF_OPT_LIB32=$aStringLib32\""
|
puts $aFile "set \"CSF_OPT_LIB32=$aStringLib32\""
|
||||||
|
|
||||||
set aStringLib64 [join $::CSF_OPT_LIB64 $::SYS_PATH_SPLITTER]
|
set aStringLib64 [join $::CSF_OPT_LIB64 $::SYS_PATH_SPLITTER]
|
||||||
if { "$::PRODUCTS_PATH" != "" } {
|
|
||||||
set aStringLib64 [regsub -all "$::PRODUCTS_PATH" $aStringLib64 "%PRODUCTS_PATH%"]
|
|
||||||
}
|
|
||||||
puts $aFile ""
|
puts $aFile ""
|
||||||
puts $aFile "rem Additional libraries (64-bit) search paths"
|
puts $aFile "rem Additional libraries (64-bit) search paths"
|
||||||
puts $aFile "set \"CSF_OPT_LIB64=$aStringLib64\""
|
puts $aFile "set \"CSF_OPT_LIB64=$aStringLib64\""
|
||||||
|
|
||||||
set aStringBin32 [join $::CSF_OPT_BIN32 $::SYS_PATH_SPLITTER]
|
set aStringBin32 [join $::CSF_OPT_BIN32 $::SYS_PATH_SPLITTER]
|
||||||
if { "$::PRODUCTS_PATH" != "" } {
|
|
||||||
set aStringBin32 [regsub -all "$::PRODUCTS_PATH" $aStringBin32 "%PRODUCTS_PATH%"]
|
|
||||||
}
|
|
||||||
puts $aFile ""
|
puts $aFile ""
|
||||||
puts $aFile "rem Additional (32-bit) search paths"
|
puts $aFile "rem Additional (32-bit) search paths"
|
||||||
puts $aFile "set \"CSF_OPT_BIN32=$aStringBin32\""
|
puts $aFile "set \"CSF_OPT_BIN32=$aStringBin32\""
|
||||||
|
|
||||||
set aStringBin64 [join $::CSF_OPT_BIN64 $::SYS_PATH_SPLITTER]
|
set aStringBin64 [join $::CSF_OPT_BIN64 $::SYS_PATH_SPLITTER]
|
||||||
if { "$::PRODUCTS_PATH" != "" } {
|
|
||||||
set aStringBin64 [regsub -all "$::PRODUCTS_PATH" $aStringBin64 "%PRODUCTS_PATH%"]
|
|
||||||
}
|
|
||||||
puts $aFile ""
|
puts $aFile ""
|
||||||
puts $aFile "rem Additional (64-bit) search paths"
|
puts $aFile "rem Additional (64-bit) search paths"
|
||||||
puts $aFile "set \"CSF_OPT_BIN64=$aStringBin64\""
|
puts $aFile "set \"CSF_OPT_BIN64=$aStringBin64\""
|
||||||
@@ -1247,10 +1175,9 @@ proc wokdep:SaveCustom {} {
|
|||||||
set aCustomFilePath "./custom.sh"
|
set aCustomFilePath "./custom.sh"
|
||||||
set aFile [open $aCustomFilePath "w"]
|
set aFile [open $aCustomFilePath "w"]
|
||||||
puts $aFile "#!/bin/bash"
|
puts $aFile "#!/bin/bash"
|
||||||
puts $aFile "# $aGenInfo"
|
puts $aFile "# This environment file was generated by wok_depsgui.tcl script at [clock format [clock seconds] -format "%Y.%m.%d %H:%M"]"
|
||||||
|
|
||||||
puts $aFile ""
|
puts $aFile ""
|
||||||
puts $aFile "export PRJFMT=$::PRJFMT"
|
|
||||||
puts $aFile "export ARCH=$::ARCH"
|
puts $aFile "export ARCH=$::ARCH"
|
||||||
puts $aFile "export SHORTCUT_HEADERS=$::SHORTCUT_HEADERS"
|
puts $aFile "export SHORTCUT_HEADERS=$::SHORTCUT_HEADERS"
|
||||||
|
|
||||||
@@ -1268,88 +1195,22 @@ proc wokdep:SaveCustom {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set aStringInc [join $::CSF_OPT_INC $::SYS_PATH_SPLITTER]
|
set aStringInc [join $::CSF_OPT_INC $::SYS_PATH_SPLITTER]
|
||||||
if { "$::PRODUCTS_PATH" != "" } {
|
|
||||||
set aStringInc [regsub -all "$::PRODUCTS_PATH" $aStringInc "\${PRODUCTS_PATH}"]
|
|
||||||
}
|
|
||||||
puts $aFile ""
|
puts $aFile ""
|
||||||
puts $aFile "# Additional headers search paths"
|
puts $aFile "# Additional headers search paths"
|
||||||
puts $aFile "export CSF_OPT_INC=\"$aStringInc\""
|
puts $aFile "export CSF_OPT_INC=\"$aStringInc\""
|
||||||
|
|
||||||
set aStringLib [join [set ::CSF_OPT_LIB$::ARCH] $::SYS_PATH_SPLITTER]
|
set aStringLib$::ARCH [join [set ::CSF_OPT_LIB$::ARCH] $::SYS_PATH_SPLITTER]
|
||||||
if { "$::PRODUCTS_PATH" != "" } {
|
|
||||||
set aStringLib [regsub -all "$::PRODUCTS_PATH" $aStringLib "\${PRODUCTS_PATH}"]
|
|
||||||
}
|
|
||||||
puts $aFile ""
|
puts $aFile ""
|
||||||
puts $aFile "# Additional libraries ($::ARCH-bit) search paths"
|
puts $aFile "# Additional libraries ($::ARCH-bit) search paths"
|
||||||
puts $aFile "export CSF_OPT_LIB$::ARCH=\"[set aStringLib]\""
|
puts $aFile "export CSF_OPT_LIB$::ARCH=\"[set aStringLib$::ARCH]\""
|
||||||
|
|
||||||
set aStringBin [join [set ::CSF_OPT_BIN$::ARCH] $::SYS_PATH_SPLITTER]
|
set aStringBin$::ARCH [join [set ::CSF_OPT_BIN$::ARCH] $::SYS_PATH_SPLITTER]
|
||||||
if { "$::PRODUCTS_PATH" != "" } {
|
|
||||||
set aStringBin [regsub -all "$::PRODUCTS_PATH" $aStringBin "\${PRODUCTS_PATH}"]
|
|
||||||
}
|
|
||||||
puts $aFile ""
|
puts $aFile ""
|
||||||
puts $aFile "# Additional ($::ARCH-bit) search paths"
|
puts $aFile "# Additional ($::ARCH-bit) search paths"
|
||||||
puts $aFile "export CSF_OPT_BIN$::ARCH=\"[set aStringBin]\""
|
puts $aFile "export CSF_OPT_BIN$::ARCH=\"[set aStringBin$::ARCH]\""
|
||||||
|
|
||||||
close $aFile
|
close $aFile
|
||||||
}
|
}
|
||||||
|
|
||||||
puts "Configuration saved to file '$aCustomFilePath'"
|
puts "Configuration saved to file '$aCustomFilePath'"
|
||||||
|
|
||||||
# generate custom.auto.pri
|
|
||||||
set toExportCustomPri 1
|
|
||||||
if { $toExportCustomPri == 1 } {
|
|
||||||
set aCasVer [wokdep:DetectCasVersion]
|
|
||||||
set aCustomFilePath "./adm/qmake/custom.auto.pri"
|
|
||||||
set aFile [open $aCustomFilePath "w"]
|
|
||||||
puts $aFile "# $aGenInfo"
|
|
||||||
|
|
||||||
puts $aFile ""
|
|
||||||
puts $aFile "VERSION=$aCasVer"
|
|
||||||
puts $aFile "PRODUCTS_PATH=\"$::PRODUCTS_PATH\""
|
|
||||||
|
|
||||||
puts $aFile ""
|
|
||||||
puts $aFile "# Optional 3rd-parties switches"
|
|
||||||
foreach anEnvIter $::THE_ENV_VARIABLES {
|
|
||||||
set aName ${anEnvIter}
|
|
||||||
set aValue [set ::${anEnvIter}]
|
|
||||||
if { "$aValue" == "true" } {
|
|
||||||
puts $aFile "CONFIG += ${aName}"
|
|
||||||
} else {
|
|
||||||
#puts $aFile "CONFIG -= ${aName}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
puts $aFile ""
|
|
||||||
puts $aFile "# Additional headers search paths"
|
|
||||||
foreach anIncPath $::CSF_OPT_INC {
|
|
||||||
if { "$::PRODUCTS_PATH" != "" } {
|
|
||||||
set anIncPath [regsub -all "$::PRODUCTS_PATH" $anIncPath "\$\$\{PRODUCTS_PATH\}"]
|
|
||||||
}
|
|
||||||
puts $aFile "INCLUDEPATH += \"${anIncPath}\""
|
|
||||||
}
|
|
||||||
|
|
||||||
puts $aFile ""
|
|
||||||
puts $aFile "# Additional libraries search paths"
|
|
||||||
foreach aLibPath [set ::CSF_OPT_LIB$::ARCH] {
|
|
||||||
if { "$::PRODUCTS_PATH" != "" } {
|
|
||||||
set aLibPath [regsub -all "$::PRODUCTS_PATH" $aLibPath "\$\$\{PRODUCTS_PATH\}"]
|
|
||||||
}
|
|
||||||
puts $aFile "LIBS += -L\"${aLibPath}\""
|
|
||||||
}
|
|
||||||
|
|
||||||
if { "$::tcl_platform(platform)" == "windows" } {
|
|
||||||
puts $aFile ""
|
|
||||||
puts $aFile "# Additional DLLs search paths"
|
|
||||||
foreach aDllPath [set ::CSF_OPT_BIN$::ARCH] {
|
|
||||||
if { "$::PRODUCTS_PATH" != "" } {
|
|
||||||
set aDllPath [regsub -all "$::PRODUCTS_PATH" $aDllPath "\$\$\{PRODUCTS_PATH\}"]
|
|
||||||
}
|
|
||||||
puts $aFile "LIBS += -L\"${aDllPath}\""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
puts $aFile ""
|
|
||||||
close $aFile
|
|
||||||
puts "Configuration saved to file '$aCustomFilePath'"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
144
adm/genproj.tcl
144
adm/genproj.tcl
@@ -256,7 +256,7 @@ proc genAllResources {} {
|
|||||||
|
|
||||||
# Wrapper-function to generate VS project files
|
# Wrapper-function to generate VS project files
|
||||||
proc genproj {theFormat args} {
|
proc genproj {theFormat args} {
|
||||||
set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "cbp" "xcd" "pro"}
|
set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "cbp" "xcd"}
|
||||||
set aSupportedPlatforms { "wnt" "uwp" "lin" "mac" "ios" "qnx" }
|
set aSupportedPlatforms { "wnt" "uwp" "lin" "mac" "ios" "qnx" }
|
||||||
set isHelpRequire false
|
set isHelpRequire false
|
||||||
|
|
||||||
@@ -284,12 +284,8 @@ proc genproj {theFormat args} {
|
|||||||
|
|
||||||
# Check optional arguments
|
# Check optional arguments
|
||||||
set aLibType "dynamic"
|
set aLibType "dynamic"
|
||||||
set aSolution "OCCT"
|
foreach arg $args {
|
||||||
for {set anArgIter 0} {$anArgIter < [llength args]} {incr anArgIter} {
|
if { $arg == "-h" || $arg == "-help" || $arg == "--help" } {
|
||||||
set arg [lindex $args $anArgIter]
|
|
||||||
if { $arg == "" } {
|
|
||||||
continue
|
|
||||||
} elseif { $arg == "-h" || $arg == "-help" || $arg == "--help" } {
|
|
||||||
set isHelpRequire true
|
set isHelpRequire true
|
||||||
} elseif { [lsearch -exact $aSupportedPlatforms $arg] >= 0 } {
|
} elseif { [lsearch -exact $aSupportedPlatforms $arg] >= 0 } {
|
||||||
set aPlatform $arg
|
set aPlatform $arg
|
||||||
@@ -299,9 +295,6 @@ proc genproj {theFormat args} {
|
|||||||
} elseif { $arg == "-dynamic" } {
|
} elseif { $arg == "-dynamic" } {
|
||||||
set aLibType "dynamic"
|
set aLibType "dynamic"
|
||||||
puts "Dynamic build has been selected"
|
puts "Dynamic build has been selected"
|
||||||
} elseif { $arg == "-solution" } {
|
|
||||||
incr anArgIter
|
|
||||||
set aSolution [lindex $args $anArgIter]
|
|
||||||
} else {
|
} else {
|
||||||
puts "Error: genproj: unrecognized option \"$arg\""
|
puts "Error: genproj: unrecognized option \"$arg\""
|
||||||
set isHelpRequire true
|
set isHelpRequire true
|
||||||
@@ -319,10 +312,8 @@ proc genproj {theFormat args} {
|
|||||||
vc12 - Visual Studio 2013
|
vc12 - Visual Studio 2013
|
||||||
vc14 - Visual Studio 2015
|
vc14 - Visual Studio 2015
|
||||||
vc141 - Visual Studio 2017
|
vc141 - Visual Studio 2017
|
||||||
vc142 - Visual Studio 2019
|
|
||||||
cbp - CodeBlocks
|
cbp - CodeBlocks
|
||||||
xcd - XCode
|
xcd - XCode
|
||||||
pro - Qt Creator
|
|
||||||
|
|
||||||
Platform (optional):
|
Platform (optional):
|
||||||
wnt - Windows Desktop
|
wnt - Windows Desktop
|
||||||
@@ -347,9 +338,9 @@ proc genproj {theFormat args} {
|
|||||||
# base path to where to generate projects, hardcoded from current dir
|
# base path to where to generate projects, hardcoded from current dir
|
||||||
set anAdmPath [file normalize "${::path}/adm"]
|
set anAdmPath [file normalize "${::path}/adm"]
|
||||||
|
|
||||||
OS:MKPRC "$anAdmPath" "$theFormat" "$aLibType" "$aPlatform" "$aCmpl" "$aSolution"
|
OS:MKPRC "$anAdmPath" "$theFormat" "$aLibType" "$aPlatform" "$aCmpl"
|
||||||
|
|
||||||
genprojbat "$theFormat" "$aPlatform" "$aSolution"
|
genprojbat "$theFormat" "$aPlatform"
|
||||||
genAllResources
|
genAllResources
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -369,8 +360,7 @@ proc copy_with_warning {from to} {
|
|||||||
file copy -force -- "$from" "$to"
|
file copy -force -- "$from" "$to"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Generate auxiliary scripts for launching IDE.
|
proc genprojbat {theFormat thePlatform} {
|
||||||
proc genprojbat {theFormat thePlatform theSolution} {
|
|
||||||
set aTargetPlatformExt sh
|
set aTargetPlatformExt sh
|
||||||
if { $thePlatform == "wnt" || $thePlatform == "uwp" } {
|
if { $thePlatform == "wnt" || $thePlatform == "uwp" } {
|
||||||
set aTargetPlatformExt bat
|
set aTargetPlatformExt bat
|
||||||
@@ -398,36 +388,20 @@ proc genprojbat {theFormat thePlatform theSolution} {
|
|||||||
copy_with_warning "$::THE_CASROOT/adm/templates/draw.${aTargetPlatformExt}" "$::path/draw.${aTargetPlatformExt}"
|
copy_with_warning "$::THE_CASROOT/adm/templates/draw.${aTargetPlatformExt}" "$::path/draw.${aTargetPlatformExt}"
|
||||||
}
|
}
|
||||||
|
|
||||||
set aSolShList ""
|
|
||||||
if { [regexp {^vc} $theFormat] } {
|
if { [regexp {^vc} $theFormat] } {
|
||||||
set aSolShList "msvc.bat"
|
copy_with_warning "$::THE_CASROOT/adm/templates/msvc.bat" "$::path/msvc.bat"
|
||||||
} else {
|
} else {
|
||||||
switch -exact -- "$theFormat" {
|
switch -exact -- "$theFormat" {
|
||||||
"cbp" {
|
"cbp" {
|
||||||
set aSolShList { "codeblocks.sh" "codeblocks.bat" }
|
file copy -force -- "$::THE_CASROOT/adm/templates/codeblocks.sh" "$::path/codeblocks.sh"
|
||||||
|
file copy -force -- "$::THE_CASROOT/adm/templates/codeblocks.bat" "$::path/codeblocks.bat"
|
||||||
# Code::Blocks 16.01 does not create directory for import libs, help him
|
# Code::Blocks 16.01 does not create directory for import libs, help him
|
||||||
set aPlatformAndCompiler "${thePlatform}/gcc"
|
file mkdir "$::path/$thePlatform/cbp/lib"
|
||||||
if { "$thePlatform" == "mac" || "$thePlatform" == "ios" } {
|
file mkdir "$::path/$thePlatform/cbp/libd"
|
||||||
set aPlatformAndCompiler "${thePlatform}/clang"
|
|
||||||
}
|
|
||||||
file mkdir "$::path/${aPlatformAndCompiler}/lib"
|
|
||||||
file mkdir "$::path/${aPlatformAndCompiler}/libd"
|
|
||||||
}
|
}
|
||||||
"xcd" { set aSolShList "xcode.sh" }
|
"xcd" { file copy -force -- "$::THE_CASROOT/adm/templates/xcode.sh" "$::path/xcode.sh" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach aSolSh $aSolShList {
|
|
||||||
set anShFile [open "$::THE_CASROOT/adm/templates/${aSolSh}" "r"]
|
|
||||||
set anShTmpl [read $anShFile]
|
|
||||||
close $anShFile
|
|
||||||
|
|
||||||
regsub -all -- {__SOLUTION__} $anShTmpl "$theSolution" anShTmpl
|
|
||||||
|
|
||||||
set anShFile [open "$::path/${aSolSh}" "w"]
|
|
||||||
puts $anShFile $anShTmpl
|
|
||||||
close $anShFile
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###### MSVC #############################################################33
|
###### MSVC #############################################################33
|
||||||
@@ -448,8 +422,7 @@ set THE_GUIDS_LIST($aTKNullKey) "{00000000-0000-0000-0000-000000000000}"
|
|||||||
# @param theLibType Library type - dynamic or static
|
# @param theLibType Library type - dynamic or static
|
||||||
# @param thePlatform Optional target platform for cross-compiling, e.g. ios for iOS
|
# @param thePlatform Optional target platform for cross-compiling, e.g. ios for iOS
|
||||||
# @param theCmpl Compiler option (msvc or gcc)
|
# @param theCmpl Compiler option (msvc or gcc)
|
||||||
# @param theSolution Solution name
|
proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl } {
|
||||||
proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl theSolution } {
|
|
||||||
global path
|
global path
|
||||||
set anOutRoot $theOutDir
|
set anOutRoot $theOutDir
|
||||||
if { $anOutRoot == "" } {
|
if { $anOutRoot == "" } {
|
||||||
@@ -499,6 +472,15 @@ proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl theSolution }
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# generate one solution for all projects if complete OS or VAS is processed
|
||||||
|
set anAllSolution "OCCT"
|
||||||
|
|
||||||
|
wokUtils:FILES:mkdir $anOutDir
|
||||||
|
if { ![file exists $anOutDir] } {
|
||||||
|
puts stderr "Error: Could not create output directory \"$anOutDir\""
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
# create the out dir if it does not exist
|
# create the out dir if it does not exist
|
||||||
if (![file isdirectory $path/inc]) {
|
if (![file isdirectory $path/inc]) {
|
||||||
puts "$path/inc folder does not exists and will be created"
|
puts "$path/inc folder does not exists and will be created"
|
||||||
@@ -509,16 +491,6 @@ proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl theSolution }
|
|||||||
puts "Collecting required header files into $path/inc ..."
|
puts "Collecting required header files into $path/inc ..."
|
||||||
osutils:collectinc $aModules $path/inc
|
osutils:collectinc $aModules $path/inc
|
||||||
|
|
||||||
if { "$theFormat" == "pro" } {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
wokUtils:FILES:mkdir $anOutDir
|
|
||||||
if { ![file exists $anOutDir] } {
|
|
||||||
puts stderr "Error: Could not create output directory \"$anOutDir\""
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
# Generating project files for the selected format
|
# Generating project files for the selected format
|
||||||
switch -exact -- "$theFormat" {
|
switch -exact -- "$theFormat" {
|
||||||
"vc7" -
|
"vc7" -
|
||||||
@@ -528,12 +500,11 @@ proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl theSolution }
|
|||||||
"vc11" -
|
"vc11" -
|
||||||
"vc12" -
|
"vc12" -
|
||||||
"vc14" -
|
"vc14" -
|
||||||
"vc141" -
|
"vc141" { OS:MKVC $anOutDir $aModules $anAllSolution $theFormat $isUWP}
|
||||||
"vc142" { OS:MKVC $anOutDir $aModules $theSolution $theFormat $isUWP}
|
"cbp" { OS:MKCBP $anOutDir $aModules $anAllSolution $thePlatform $theCmpl }
|
||||||
"cbp" { OS:MKCBP $anOutDir $aModules $theSolution $thePlatform $theCmpl }
|
|
||||||
"xcd" {
|
"xcd" {
|
||||||
set ::THE_GUIDS_LIST($::aTKNullKey) "000000000000000000000000"
|
set ::THE_GUIDS_LIST($::aTKNullKey) "000000000000000000000000"
|
||||||
OS:MKXCD $anOutDir $aModules $theSolution $theLibType $thePlatform
|
OS:MKXCD $anOutDir $aModules $anAllSolution $theLibType $thePlatform
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -953,7 +924,7 @@ proc osutils:collectinc {theModules theIncPath} {
|
|||||||
set anIncFiles [glob -tails -nocomplain -dir ${anIncPath} "*"]
|
set anIncFiles [glob -tails -nocomplain -dir ${anIncPath} "*"]
|
||||||
foreach anIncFile ${anIncFiles} {
|
foreach anIncFile ${anIncFiles} {
|
||||||
if { [lsearch -exact ${allHeaderFiles} ${anIncFile}] == -1 } {
|
if { [lsearch -exact ${allHeaderFiles} ${anIncFile}] == -1 } {
|
||||||
puts "Warning: file ${anIncPath}/${anIncFile} is not present in the sources and will be removed from ${theIncPath}"
|
puts "Warning: file ${anIncPath}/${anIncFile} is not presented in the sources and will be removed from ${theIncPath}!"
|
||||||
file delete -force "${theIncPath}/${anIncFile}"
|
file delete -force "${theIncPath}/${anIncFile}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -984,7 +955,7 @@ proc osutils:vcsolution:header { vcversion } {
|
|||||||
append var \
|
append var \
|
||||||
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
|
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
|
||||||
"# Visual Studio 2013\n"
|
"# Visual Studio 2013\n"
|
||||||
} elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" || "$vcversion" == "vc142" } {
|
} elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141"} {
|
||||||
append var \
|
append var \
|
||||||
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
|
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
|
||||||
"# Visual Studio 14\n"
|
"# Visual Studio 14\n"
|
||||||
@@ -1222,9 +1193,6 @@ proc osutils:vcproj:readtemplate {theVcVer isUWP isExec} {
|
|||||||
if { $theVcVer == "vc141" } {
|
if { $theVcVer == "vc141" } {
|
||||||
set aVCRTVer "vc14"
|
set aVCRTVer "vc14"
|
||||||
set aToolset "v141"
|
set aToolset "v141"
|
||||||
} elseif { $theVcVer == "vc142" } {
|
|
||||||
set aVCRTVer "vc14"
|
|
||||||
set aToolset "v142"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set what "$theVcVer"
|
set what "$theVcVer"
|
||||||
@@ -1370,11 +1338,6 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
|
|||||||
if { "$::HAVE_LIBLZMA" == "true" } {
|
if { "$::HAVE_LIBLZMA" == "true" } {
|
||||||
set aLibsMap(CSF_LIBLZMA) "liblzma"
|
set aLibsMap(CSF_LIBLZMA) "liblzma"
|
||||||
}
|
}
|
||||||
if { "$::HAVE_E57" == "true" && "$theOS" != "wnt" } {
|
|
||||||
# exclude wnt, as there are different pragma lib depending on debug/release
|
|
||||||
set aLibsMap(CSF_E57) "E57RefImpl"
|
|
||||||
set aLibsMap(CSF_xerces) "xerces-c"
|
|
||||||
}
|
|
||||||
|
|
||||||
if { "$theOS" == "wnt" } {
|
if { "$theOS" == "wnt" } {
|
||||||
# WinAPI libraries
|
# WinAPI libraries
|
||||||
@@ -1386,7 +1349,6 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
|
|||||||
set aLibsMap(CSF_opengl32) "opengl32"
|
set aLibsMap(CSF_opengl32) "opengl32"
|
||||||
set aLibsMap(CSF_wsock32) "wsock32"
|
set aLibsMap(CSF_wsock32) "wsock32"
|
||||||
set aLibsMap(CSF_netapi32) "netapi32"
|
set aLibsMap(CSF_netapi32) "netapi32"
|
||||||
set aLibsMap(CSF_winmm) "winmm"
|
|
||||||
set aLibsMap(CSF_OpenGlLibs) "opengl32"
|
set aLibsMap(CSF_OpenGlLibs) "opengl32"
|
||||||
if { "$::HAVE_GLES2" == "true" } {
|
if { "$::HAVE_GLES2" == "true" } {
|
||||||
set aLibsMap(CSF_OpenGlLibs) "libEGL libGLESv2"
|
set aLibsMap(CSF_OpenGlLibs) "libEGL libGLESv2"
|
||||||
@@ -1404,23 +1366,17 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
|
|||||||
set aLibsMap(CSF_TBB) ""
|
set aLibsMap(CSF_TBB) ""
|
||||||
} else {
|
} else {
|
||||||
set aLibsMap(CSF_dl) "dl"
|
set aLibsMap(CSF_dl) "dl"
|
||||||
if { "$theOS" == "mac" || "$theOS" == "ios" } {
|
if { "$theOS" == "mac" } {
|
||||||
set aLibsMap(CSF_objc) "objc"
|
set aLibsMap(CSF_objc) "objc"
|
||||||
if { "$theOS" == "ios" } {
|
set aFrmsMap(CSF_Appkit) "AppKit"
|
||||||
set aFrmsMap(CSF_Appkit) "UIKit"
|
|
||||||
set aFrmsMap(CSF_OpenGlLibs) "OpenGLES"
|
|
||||||
} else {
|
|
||||||
set aFrmsMap(CSF_Appkit) "AppKit"
|
|
||||||
set aFrmsMap(CSF_OpenGlLibs) "OpenGL"
|
|
||||||
}
|
|
||||||
set aFrmsMap(CSF_IOKit) "IOKit"
|
set aFrmsMap(CSF_IOKit) "IOKit"
|
||||||
|
set aFrmsMap(CSF_OpenGlLibs) "OpenGL"
|
||||||
set aFrmsMap(CSF_TclLibs) "Tcl"
|
set aFrmsMap(CSF_TclLibs) "Tcl"
|
||||||
set aLibsMap(CSF_TclLibs) ""
|
set aLibsMap(CSF_TclLibs) ""
|
||||||
set aFrmsMap(CSF_TclTkLibs) "Tk"
|
set aFrmsMap(CSF_TclTkLibs) "Tk"
|
||||||
set aLibsMap(CSF_TclTkLibs) ""
|
set aLibsMap(CSF_TclTkLibs) ""
|
||||||
set aLibsMap(CSF_QT) "QtCore QtGui"
|
set aLibsMap(CSF_QT) "QtCore QtGui"
|
||||||
} else {
|
} else {
|
||||||
set aLibsMap(CSF_fontconfig) "fontconfig"
|
|
||||||
if { "$theOS" == "qnx" } {
|
if { "$theOS" == "qnx" } {
|
||||||
# CSF_ThreadLibs - pthread API is part of libc on QNX
|
# CSF_ThreadLibs - pthread API is part of libc on QNX
|
||||||
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
|
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
|
||||||
@@ -2339,10 +2295,6 @@ proc osutils:cbp { theCmpl theOutDir theProjName thePlatform theSrcFiles theLibs
|
|||||||
set aCmplFlagsDebug [list]
|
set aCmplFlagsDebug [list]
|
||||||
set toPassArgsByFile 0
|
set toPassArgsByFile 0
|
||||||
set aLibPrefix "lib"
|
set aLibPrefix "lib"
|
||||||
set aPlatformAndCompiler "${thePlatform}/gcc"
|
|
||||||
if { "$thePlatform" == "mac" || "$thePlatform" == "ios" } {
|
|
||||||
set aPlatformAndCompiler "${thePlatform}/clang"
|
|
||||||
}
|
|
||||||
if { "$thePlatform" == "wnt" || "$thePlatform" == "uwp" || "$thePlatform" == "qnx" } {
|
if { "$thePlatform" == "wnt" || "$thePlatform" == "uwp" || "$thePlatform" == "qnx" } {
|
||||||
set toPassArgsByFile 1
|
set toPassArgsByFile 1
|
||||||
}
|
}
|
||||||
@@ -2399,17 +2351,17 @@ proc osutils:cbp { theCmpl theOutDir theProjName thePlatform theSrcFiles theLibs
|
|||||||
# Release target configuration
|
# Release target configuration
|
||||||
puts $aFile "\t\t\t<Target title=\"Release\">"
|
puts $aFile "\t\t\t<Target title=\"Release\">"
|
||||||
if { "$theIsExe" == "true" } {
|
if { "$theIsExe" == "true" } {
|
||||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aPlatformAndCompiler}/bin/${theProjName}\" prefix_auto=\"0\" extension_auto=\"0\" />"
|
puts $aFile "\t\t\t\t<Option output=\"../../../${thePlatform}/cbp/bin/${theProjName}\" prefix_auto=\"0\" extension_auto=\"0\" />"
|
||||||
puts $aFile "\t\t\t\t<Option type=\"1\" />"
|
puts $aFile "\t\t\t\t<Option type=\"1\" />"
|
||||||
} else {
|
} else {
|
||||||
if { "$thePlatform" == "wnt" || "$thePlatform" == "uwp" } {
|
if { "$thePlatform" == "wnt" || "$thePlatform" == "uwp" } {
|
||||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aPlatformAndCompiler}/bin/${aLibPrefix}${theProjName}\" imp_lib=\"../../../${aPlatformAndCompiler}/lib/\$(TARGET_OUTPUT_BASENAME)\" prefix_auto=\"1\" extension_auto=\"1\" />"
|
puts $aFile "\t\t\t\t<Option output=\"../../../${thePlatform}/cbp/bin/${aLibPrefix}${theProjName}\" imp_lib=\"../../../${thePlatform}/cbp/lib/\$(TARGET_OUTPUT_BASENAME)\" prefix_auto=\"1\" extension_auto=\"1\" />"
|
||||||
} else {
|
} else {
|
||||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aPlatformAndCompiler}/lib/lib${theProjName}.so\" prefix_auto=\"0\" extension_auto=\"0\" />"
|
puts $aFile "\t\t\t\t<Option output=\"../../../${thePlatform}/cbp/lib/lib${theProjName}.so\" prefix_auto=\"0\" extension_auto=\"0\" />"
|
||||||
}
|
}
|
||||||
puts $aFile "\t\t\t\t<Option type=\"3\" />"
|
puts $aFile "\t\t\t\t<Option type=\"3\" />"
|
||||||
}
|
}
|
||||||
puts $aFile "\t\t\t\t<Option object_output=\"../../../${aPlatformAndCompiler}/obj\" />"
|
puts $aFile "\t\t\t\t<Option object_output=\"../../../${thePlatform}/cbp/obj\" />"
|
||||||
puts $aFile "\t\t\t\t<Option compiler=\"$aCmplCbp\" />"
|
puts $aFile "\t\t\t\t<Option compiler=\"$aCmplCbp\" />"
|
||||||
puts $aFile "\t\t\t\t<Option createDefFile=\"0\" />"
|
puts $aFile "\t\t\t\t<Option createDefFile=\"0\" />"
|
||||||
if { "$thePlatform" == "wnt" || "$thePlatform" == "uwp" } {
|
if { "$thePlatform" == "wnt" || "$thePlatform" == "uwp" } {
|
||||||
@@ -2432,7 +2384,7 @@ proc osutils:cbp { theCmpl theOutDir theProjName thePlatform theSrcFiles theLibs
|
|||||||
if { $toPassArgsByFile == 1 } {
|
if { $toPassArgsByFile == 1 } {
|
||||||
puts $aFile "\t\t\t\t\t<Add option=\"\@$aLnkFileName\" />"
|
puts $aFile "\t\t\t\t\t<Add option=\"\@$aLnkFileName\" />"
|
||||||
}
|
}
|
||||||
puts $aFile "\t\t\t\t\t<Add directory=\"../../../${aPlatformAndCompiler}/lib\" />"
|
puts $aFile "\t\t\t\t\t<Add directory=\"../../../${thePlatform}/cbp/lib\" />"
|
||||||
if { "$thePlatform" == "mac" } {
|
if { "$thePlatform" == "mac" } {
|
||||||
if { [ lsearch $theLibsList X11 ] >= 0} {
|
if { [ lsearch $theLibsList X11 ] >= 0} {
|
||||||
puts $aFile "\t\t\t\t\t<Add directory=\"/usr/X11/lib\" />"
|
puts $aFile "\t\t\t\t\t<Add directory=\"/usr/X11/lib\" />"
|
||||||
@@ -2440,7 +2392,7 @@ proc osutils:cbp { theCmpl theOutDir theProjName thePlatform theSrcFiles theLibs
|
|||||||
}
|
}
|
||||||
puts $aFile "\t\t\t\t\t<Add option=\"\$(CSF_OPT_LNK${aWokArch})\" />"
|
puts $aFile "\t\t\t\t\t<Add option=\"\$(CSF_OPT_LNK${aWokArch})\" />"
|
||||||
if { "$thePlatform" == "lin" } {
|
if { "$thePlatform" == "lin" } {
|
||||||
puts $aFile "\t\t\t\t\t<Add option=\"-Wl,-rpath-link=../../../${aPlatformAndCompiler}/lib\" />"
|
puts $aFile "\t\t\t\t\t<Add option=\"-Wl,-rpath-link=../../../${thePlatform}/cbp/lib\" />"
|
||||||
}
|
}
|
||||||
puts $aFile "\t\t\t\t</Linker>"
|
puts $aFile "\t\t\t\t</Linker>"
|
||||||
|
|
||||||
@@ -2449,17 +2401,17 @@ proc osutils:cbp { theCmpl theOutDir theProjName thePlatform theSrcFiles theLibs
|
|||||||
# Debug target configuration
|
# Debug target configuration
|
||||||
puts $aFile "\t\t\t<Target title=\"Debug\">"
|
puts $aFile "\t\t\t<Target title=\"Debug\">"
|
||||||
if { "$theIsExe" == "true" } {
|
if { "$theIsExe" == "true" } {
|
||||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aPlatformAndCompiler}/bind/${theProjName}\" prefix_auto=\"0\" extension_auto=\"0\" />"
|
puts $aFile "\t\t\t\t<Option output=\"../../../${thePlatform}/cbp/bind/${theProjName}\" prefix_auto=\"0\" extension_auto=\"0\" />"
|
||||||
puts $aFile "\t\t\t\t<Option type=\"1\" />"
|
puts $aFile "\t\t\t\t<Option type=\"1\" />"
|
||||||
} else {
|
} else {
|
||||||
if { "$thePlatform" == "wnt" || "$thePlatform" == "uwp" } {
|
if { "$thePlatform" == "wnt" || "$thePlatform" == "uwp" } {
|
||||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aPlatformAndCompiler}/bind/${aLibPrefix}${theProjName}\" imp_lib=\"../../../${aPlatformAndCompiler}/libd/\$(TARGET_OUTPUT_BASENAME)\" prefix_auto=\"1\" extension_auto=\"1\" />"
|
puts $aFile "\t\t\t\t<Option output=\"../../../${thePlatform}/cbp/bind/${aLibPrefix}${theProjName}\" imp_lib=\"../../../${thePlatform}/cbp/libd/\$(TARGET_OUTPUT_BASENAME)\" prefix_auto=\"1\" extension_auto=\"1\" />"
|
||||||
} else {
|
} else {
|
||||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aPlatformAndCompiler}/libd/lib${theProjName}.so\" prefix_auto=\"0\" extension_auto=\"0\" />"
|
puts $aFile "\t\t\t\t<Option output=\"../../../${thePlatform}/cbp/libd/lib${theProjName}.so\" prefix_auto=\"0\" extension_auto=\"0\" />"
|
||||||
}
|
}
|
||||||
puts $aFile "\t\t\t\t<Option type=\"3\" />"
|
puts $aFile "\t\t\t\t<Option type=\"3\" />"
|
||||||
}
|
}
|
||||||
puts $aFile "\t\t\t\t<Option object_output=\"../../../${aPlatformAndCompiler}/objd\" />"
|
puts $aFile "\t\t\t\t<Option object_output=\"../../../${thePlatform}/cbp/objd\" />"
|
||||||
puts $aFile "\t\t\t\t<Option compiler=\"$aCmplCbp\" />"
|
puts $aFile "\t\t\t\t<Option compiler=\"$aCmplCbp\" />"
|
||||||
puts $aFile "\t\t\t\t<Option createDefFile=\"0\" />"
|
puts $aFile "\t\t\t\t<Option createDefFile=\"0\" />"
|
||||||
if { "$thePlatform" == "wnt" || "$thePlatform" == "uwp" } {
|
if { "$thePlatform" == "wnt" || "$thePlatform" == "uwp" } {
|
||||||
@@ -2482,7 +2434,7 @@ proc osutils:cbp { theCmpl theOutDir theProjName thePlatform theSrcFiles theLibs
|
|||||||
if { $toPassArgsByFile == 1 } {
|
if { $toPassArgsByFile == 1 } {
|
||||||
puts $aFile "\t\t\t\t\t<Add option=\"\@$aLnkDebFileName\" />"
|
puts $aFile "\t\t\t\t\t<Add option=\"\@$aLnkDebFileName\" />"
|
||||||
}
|
}
|
||||||
puts $aFile "\t\t\t\t\t<Add directory=\"../../../${aPlatformAndCompiler}/libd\" />"
|
puts $aFile "\t\t\t\t\t<Add directory=\"../../../${thePlatform}/cbp/libd\" />"
|
||||||
if { "$thePlatform" == "mac" } {
|
if { "$thePlatform" == "mac" } {
|
||||||
if { [ lsearch $theLibsList X11 ] >= 0} {
|
if { [ lsearch $theLibsList X11 ] >= 0} {
|
||||||
puts $aFile "\t\t\t\t\t<Add directory=\"/usr/X11/lib\" />"
|
puts $aFile "\t\t\t\t\t<Add directory=\"/usr/X11/lib\" />"
|
||||||
@@ -2490,7 +2442,7 @@ proc osutils:cbp { theCmpl theOutDir theProjName thePlatform theSrcFiles theLibs
|
|||||||
}
|
}
|
||||||
puts $aFile "\t\t\t\t\t<Add option=\"\$(CSF_OPT_LNK${aWokArch}D)\" />"
|
puts $aFile "\t\t\t\t\t<Add option=\"\$(CSF_OPT_LNK${aWokArch}D)\" />"
|
||||||
if { "$thePlatform" == "lin" } {
|
if { "$thePlatform" == "lin" } {
|
||||||
puts $aFile "\t\t\t\t\t<Add option=\"-Wl,-rpath-link=../../../${aPlatformAndCompiler}/libd\" />"
|
puts $aFile "\t\t\t\t\t<Add option=\"-Wl,-rpath-link=../../../${thePlatform}/cbp/libd\" />"
|
||||||
}
|
}
|
||||||
puts $aFile "\t\t\t\t</Linker>"
|
puts $aFile "\t\t\t\t</Linker>"
|
||||||
|
|
||||||
@@ -2557,8 +2509,8 @@ proc osutils:cbp { theCmpl theOutDir theProjName thePlatform theSrcFiles theLibs
|
|||||||
puts $aFile "\t\t\t<Option link=\"0\" />"
|
puts $aFile "\t\t\t<Option link=\"0\" />"
|
||||||
puts $aFile "\t\t</Unit>"
|
puts $aFile "\t\t</Unit>"
|
||||||
|
|
||||||
set aFileObj [string map {.cxx .o} [string map [list "/src/" "/${aPlatformAndCompiler}/obj/src/"] $aSrcFile]]
|
set aFileObj [string map {.cxx .o} [string map [list "/src/" "/$thePlatform/cbp/obj/src/"] $aSrcFile]]
|
||||||
set aFileObjd [string map {.cxx .o} [string map [list "/src/" "/${aPlatformAndCompiler}/objd/src/"] $aSrcFile]]
|
set aFileObjd [string map {.cxx .o} [string map [list "/src/" "/$thePlatform/cbp/objd/src/"] $aSrcFile]]
|
||||||
puts -nonewline $aFileLnkObj "$aFileObj "
|
puts -nonewline $aFileLnkObj "$aFileObj "
|
||||||
puts -nonewline $aFileLnkObjd "$aFileObjd "
|
puts -nonewline $aFileLnkObjd "$aFileObjd "
|
||||||
} else {
|
} else {
|
||||||
@@ -2703,7 +2655,7 @@ proc OS:xcodeproj { theModules theOutDir theGuidsMap theLibType thePlatform} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Generates dependencies section for Xcode project files.
|
# Generates dependencies section for Xcode project files.
|
||||||
proc osutils:xcdtk:deps {theToolKit theTargetType theGuidsMap theFileRefSection theDepsGuids theDepsRefGuids thePlatform theIsStatic} {
|
proc osutils:xcdtk:deps {theToolKit theTargetType theGuidsMap theFileRefSection theDepsGuids theDepsRefGuids theIsStatic} {
|
||||||
upvar $theGuidsMap aGuidsMap
|
upvar $theGuidsMap aGuidsMap
|
||||||
upvar $theFileRefSection aFileRefSection
|
upvar $theFileRefSection aFileRefSection
|
||||||
upvar $theDepsGuids aDepsGuids
|
upvar $theDepsGuids aDepsGuids
|
||||||
@@ -2727,7 +2679,7 @@ proc osutils:xcdtk:deps {theToolKit theTargetType theGuidsMap theFileRefSection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
osutils:usedOsLibs $theToolKit $thePlatform aLibs aFrameworks
|
osutils:usedOsLibs $theToolKit "mac" aLibs aFrameworks
|
||||||
set aUsedLibs [concat $aUsedLibs $aLibs]
|
set aUsedLibs [concat $aUsedLibs $aLibs]
|
||||||
set aUsedLibs [concat $aUsedLibs $aFrameworks]
|
set aUsedLibs [concat $aUsedLibs $aFrameworks]
|
||||||
foreach tkx $aUsedLibs {
|
foreach tkx $aUsedLibs {
|
||||||
@@ -2942,7 +2894,7 @@ proc osutils:xcdtk { theOutDir theToolKit theGuidsMap theIsStatic thePlatform {t
|
|||||||
}
|
}
|
||||||
|
|
||||||
puts $aPbxprojFile [osutils:xcdtk:sources $theToolKit $theTargetType aSrcFileRefSection aGroupSection aPackagesGuids aSrcFileGuids aGuidsMap anIncPaths]
|
puts $aPbxprojFile [osutils:xcdtk:sources $theToolKit $theTargetType aSrcFileRefSection aGroupSection aPackagesGuids aSrcFileGuids aGuidsMap anIncPaths]
|
||||||
puts $aPbxprojFile [osutils:xcdtk:deps $theToolKit $theTargetType aGuidsMap aDepsFileRefSection aDepsGuids aDepsRefGuids $thePlatform $theIsStatic]
|
puts $aPbxprojFile [osutils:xcdtk:deps $theToolKit $theTargetType aGuidsMap aDepsFileRefSection aDepsGuids aDepsRefGuids $theIsStatic]
|
||||||
# End PBXBuildFile section
|
# End PBXBuildFile section
|
||||||
|
|
||||||
# Begin PBXFileReference section
|
# Begin PBXFileReference section
|
||||||
|
5
adm/qmake/.gitignore
vendored
5
adm/qmake/.gitignore
vendored
@@ -1,5 +0,0 @@
|
|||||||
/*/*.pro
|
|
||||||
/*/*/*.pro
|
|
||||||
*.pro.user
|
|
||||||
custom.pri
|
|
||||||
custom.auto.pri
|
|
@@ -1,157 +0,0 @@
|
|||||||
# This is project defines C++ compilation rules for building an OCCT Toolkit.
|
|
||||||
|
|
||||||
exists(custom.auto.pri) { include(custom.auto.pri) }
|
|
||||||
exists(custom.pri) { include(custom.pri) }
|
|
||||||
|
|
||||||
# Disable some dummy Qt defaults
|
|
||||||
QT -= core gui
|
|
||||||
CONFIG -= qt app_bundle
|
|
||||||
CONFIG -= qml_debug
|
|
||||||
CONFIG -= debug_and_release
|
|
||||||
|
|
||||||
OccGitRoot = $$_PRO_FILE_PWD_/../../../..
|
|
||||||
|
|
||||||
# Define compilation flags
|
|
||||||
CONFIG += warn_on
|
|
||||||
QMAKE_CFLAGS_WARN_ON = -Wall
|
|
||||||
QMAKE_CXXFLAGS_WARN_ON = -Wall
|
|
||||||
win32 {
|
|
||||||
QMAKE_CFLAGS_WARN_ON = -W4
|
|
||||||
QMAKE_CXXFLAGS_WARN_ON = -W4
|
|
||||||
QMAKE_CXXFLAGS_EXCEPTIONS_ON = /EHa
|
|
||||||
QMAKE_CXXFLAGS_STL_ON = /EHa
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += -fp:precise
|
|
||||||
#QMAKE_CXXFLAGS -= -Zc:throwingNew
|
|
||||||
#QMAKE_CXXFLAGS -= -Zc:rvalueCast
|
|
||||||
|
|
||||||
QMAKE_LFLAGS += -INCREMENTAL:NO
|
|
||||||
|
|
||||||
CONFIG(debug, debug|release) {
|
|
||||||
QMAKE_CXXFLAGS += -Od
|
|
||||||
QMAKE_CXXFLAGS += -Ob1
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFINES -= WIN32
|
|
||||||
DEFINES -= WIN64
|
|
||||||
DEFINES += _CRT_SECURE_NO_WARNINGS
|
|
||||||
DEFINES += _CRT_NONSTDC_NO_DEPRECATE
|
|
||||||
DEFINES += _SCL_SECURE_NO_WARNINGS
|
|
||||||
} else {
|
|
||||||
CONFIG += c++11
|
|
||||||
QMAKE_CFLAGS += -fexceptions
|
|
||||||
QMAKE_CXXFLAGS += -fexceptions
|
|
||||||
QMAKE_CXXFLAGS += -fvisibility=default
|
|
||||||
DEFINES += OCC_CONVERT_SIGNALS
|
|
||||||
mac {
|
|
||||||
iphoneos {
|
|
||||||
QMAKE_IOS_DEPLOYMENT_TARGET = 8.0
|
|
||||||
} else {
|
|
||||||
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
!CONFIG(debug, debug|release) {
|
|
||||||
# disable exceptions in Release builds
|
|
||||||
DEFINES += No_Exception
|
|
||||||
HAVE_RelWithDebInfo {
|
|
||||||
win32 {
|
|
||||||
CONFIG += force_debug_info
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Define output folder depending on compiler name
|
|
||||||
MY_BITNESS = 32
|
|
||||||
|
|
||||||
equals(QMAKE_TARGET.arch, x86_64) | equals(QMAKE_HOST.arch, x86_64) { MY_BITNESS = 64 }
|
|
||||||
equals(ANDROID_TARGET_ARCH, arm64-v8a) { MY_BITNESS = 64 }
|
|
||||||
has64Target = $$find(QMAKE_TARGET.arch, "x64")
|
|
||||||
count(has64Target, 1) { MY_BITNESS = 64 }
|
|
||||||
|
|
||||||
MY_PLATFORM = platform
|
|
||||||
CONFIG(iphonesimulator, iphoneos|iphonesimulator) { MY_PLATFORM = iphonesimulator
|
|
||||||
} else:CONFIG(iphoneos, iphoneos|iphonesimulator) { MY_PLATFORM = iphoneos
|
|
||||||
} else:android { MY_PLATFORM = android-$$ANDROID_TARGET_ARCH
|
|
||||||
} else:win32 { MY_PLATFORM = win$$MY_BITNESS
|
|
||||||
} else:mac { MY_PLATFORM = mac
|
|
||||||
} else:linux { MY_PLATFORM = lin
|
|
||||||
} else:unix { MY_PLATFORM = unix
|
|
||||||
} else { warning (Unknown platform. "$$MY_PLATFORM" is used) }
|
|
||||||
|
|
||||||
MY_COMPILER = compiler
|
|
||||||
MY_VC_VER = 0
|
|
||||||
android-g++ {
|
|
||||||
MY_COMPILER = gcc
|
|
||||||
} else:clang {
|
|
||||||
MY_COMPILER = clang
|
|
||||||
} else:gcc {
|
|
||||||
MY_COMPILER = gcc
|
|
||||||
} else:win32-msvc2010 {
|
|
||||||
MY_COMPILER = vc10
|
|
||||||
MY_VC_VER = 10
|
|
||||||
} else:win32-msvc2012 {
|
|
||||||
MY_COMPILER = vc11
|
|
||||||
MY_VC_VER = 11
|
|
||||||
} else:win32-msvc2013 {
|
|
||||||
MY_COMPILER = vc12
|
|
||||||
MY_VC_VER = 12
|
|
||||||
} else:win32-msvc2015 {
|
|
||||||
MY_COMPILER = vc14
|
|
||||||
MY_VC_VER = 14
|
|
||||||
} else:win32-msvc2017 {
|
|
||||||
MY_COMPILER = vc14
|
|
||||||
MY_VC_VER = 14
|
|
||||||
} else:win32-msvc {
|
|
||||||
MY_COMPILER = vc14
|
|
||||||
MY_VC_VER = 14
|
|
||||||
aMsvcVer = $$(VisualStudioVersion)
|
|
||||||
equals(aMsvcVer, 14.0){
|
|
||||||
# VS2015, vc140
|
|
||||||
} else:equals(aMsvcVer, 15.0){
|
|
||||||
# VS2015, vc141
|
|
||||||
} else:equals(aMsvcVer, 16.0){
|
|
||||||
# VS2019, vc142
|
|
||||||
} else {
|
|
||||||
warning (Unknown msvc version. "$$MY_COMPILER" is used)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
warning (Unknown compiler. "$$MY_COMPILER" is used)
|
|
||||||
}
|
|
||||||
MY_PLATFORM_AND_COMPILER = $$MY_PLATFORM/$$MY_COMPILER
|
|
||||||
#warning (The platform is "$$MY_PLATFORM"; bitness is "$$MY_BITNESS"; compiler is "$$MY_COMPILER")
|
|
||||||
|
|
||||||
CONFIG(debug, debug|release) { MY_BUILDTYPE = d }
|
|
||||||
|
|
||||||
DESTDIR = $$OccGitRoot/$${MY_PLATFORM_AND_COMPILER}/lib$${MY_BUILDTYPE}
|
|
||||||
win32 {
|
|
||||||
DESTDIR = $$OccGitRoot/win$${MY_BITNESS}/vc$${MY_VC_VER}/bin$${MY_BUILDTYPE}
|
|
||||||
aLibDest = $$DESTDIR/../lib$${MY_BUILDTYPE}
|
|
||||||
#DLLDESTDIR = $$DESTDIR/../bin$${MY_BUILDTYPE}
|
|
||||||
|
|
||||||
# dummy target creating lib/libd folder
|
|
||||||
occtkgen_libfolder.input = $$_PRO_FILE_PWD_/../../OcctDummy.in
|
|
||||||
occtkgen_libfolder.output = $$aLibDest/dummy.tmp
|
|
||||||
occtkgen_libfolder.config = verbatim
|
|
||||||
QMAKE_SUBSTITUTES += occtkgen_libfolder
|
|
||||||
|
|
||||||
LIBS += -L$$aLibDest
|
|
||||||
equals(TEMPLATE, lib) {
|
|
||||||
QMAKE_CLEAN += $$DESTDIR/$${TARGET}.dll
|
|
||||||
QMAKE_CLEAN += $$aLibDest/$${TARGET}.lib
|
|
||||||
QMAKE_CLEAN += $$aLibDest/$${TARGET}.exp
|
|
||||||
} else {
|
|
||||||
QMAKE_CLEAN += $$DESTDIR/$${TARGET}.exe
|
|
||||||
}
|
|
||||||
QMAKE_CLEAN += $$DESTDIR/$${TARGET}.pdb
|
|
||||||
QMAKE_LFLAGS += -PDB:"$$DESTDIR/$${TARGET}.pdb"
|
|
||||||
QMAKE_LFLAGS += -IMPLIB:"$$aLibDest/$${TARGET}.lib"
|
|
||||||
} else {
|
|
||||||
LIBS += -L$$DESTDIR
|
|
||||||
equals(TEMPLATE, app) {
|
|
||||||
DESTDIR = $$OccGitRoot/$${MY_PLATFORM_AND_COMPILER}/bin$${MY_BUILDTYPE}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#OBJECTS_DIR = $$DESTDIR/../obj$${MY_BUILDTYPE}/$${TARGET}
|
|
||||||
OBJECTS_DIR = $$DESTDIR/../obj$${MY_BUILDTYPE}
|
|
@@ -1,36 +0,0 @@
|
|||||||
# This is a project template file defining an OCCT Module.
|
|
||||||
# This project should be included with predefined OCC_MODULE_NAME variable.
|
|
||||||
TEMPLATE = subdirs
|
|
||||||
exists(custom.auto.pri) { include(custom.auto.pri) }
|
|
||||||
exists(custom.pri) { include(custom.pri) }
|
|
||||||
|
|
||||||
# Iterate over Toolkits within current Module and generate sub-project per Toolkit
|
|
||||||
aModuleList = $$cat(../MODULES, lines)
|
|
||||||
for (aModuleIter, aModuleList) {
|
|
||||||
#aTkList = $$list($$aModuleIter) - this doesn't work, qmake bug?
|
|
||||||
aModule = $$first($$list($$aModuleIter))
|
|
||||||
equals (aModule, $$OCC_MODULE_NAME) {
|
|
||||||
for (aToolKit, $$list($$aModuleIter)) {
|
|
||||||
toSkipToolkit = 0
|
|
||||||
equals (aToolKit, $$OCC_MODULE_NAME) { toSkipToolkit = 1 }
|
|
||||||
!HAVE_VTK:equals (aToolKit, "TKIVtk") { toSkipToolkit = 1 }
|
|
||||||
!HAVE_VTK:equals (aToolKit, "TKIVtkDraw") { toSkipToolkit = 1 }
|
|
||||||
!win32: equals (aToolKit, "TKD3DHost") { 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)
|
|
||||||
eval(occtkgen_$${aToolKit}.config = verbatim)
|
|
||||||
eval(QMAKE_SUBSTITUTES += occtkgen_$${aToolKit})
|
|
||||||
SUBDIRS += $${aToolKit}
|
|
||||||
|
|
||||||
aModExtList = $$cat(../../src/$${aToolKit}/EXTERNLIB, lines)
|
|
||||||
aTkDepends = $${aToolKit}.depends
|
|
||||||
for (aModExtIter, aModExtList) {
|
|
||||||
contains ($$list($$aModuleIter), $$aModExtIter) { eval ($${aTkDepends} += $$aModExtIter) }
|
|
||||||
}
|
|
||||||
#warning($$aToolKit depends on: $$reverse($${aTkDepends}))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,2 +0,0 @@
|
|||||||
OCC_MODULE_NAME = \$\$TARGET
|
|
||||||
include(../OccModule.pri)
|
|
@@ -1,144 +0,0 @@
|
|||||||
# This is a project template file defining an OCCT Toolkit.
|
|
||||||
# This project should be included with predefined OCC_TOOLKIT_NAME variable.
|
|
||||||
|
|
||||||
TEMPLATE = lib
|
|
||||||
!exists(../../src/$$OCC_TOOLKIT_NAME/PACKAGES) {
|
|
||||||
TEMPLATE = app
|
|
||||||
CONFIG += console
|
|
||||||
}
|
|
||||||
win32 {
|
|
||||||
# do not append version to DLL name
|
|
||||||
CONFIG += skip_target_version_ext
|
|
||||||
}
|
|
||||||
|
|
||||||
include(OccCppConfig.pri)
|
|
||||||
|
|
||||||
aSrcRoot = $$OccGitRoot/src
|
|
||||||
aHxxRoot = $$OccGitRoot/inc
|
|
||||||
INCLUDEPATH += $$aHxxRoot
|
|
||||||
|
|
||||||
# CSF variables
|
|
||||||
CSF_FREETYPE = -lfreetype
|
|
||||||
CSF_TclLibs = -ltcl8.6
|
|
||||||
CSF_TclTkLibs = -ltk8.6
|
|
||||||
HAVE_FREEIMAGE { CSF_FreeImagePlus = -lfreeimage } else:win32 { CSF_FreeImagePlus = -lwindowscodecs -lole32 }
|
|
||||||
HAVE_FFMPEG { CSF_FFmpeg = -lavcodec -lavformat -lswscale -lavutil }
|
|
||||||
HAVE_TBB { CSF_TBB = -ltbb -ltbbmalloc }
|
|
||||||
HAVE_ZLIB { CSF_ZLIB = -lzlib }
|
|
||||||
HAVE_LIBLZMA { CSF_LIBLZMA = -lliblzma }
|
|
||||||
win32 {
|
|
||||||
CSF_kernel32 = -lkernel32
|
|
||||||
CSF_advapi32 = -ladvapi32
|
|
||||||
CSF_gdi32 = -lgdi32
|
|
||||||
CSF_user32 = -luser32 -lcomdlg32
|
|
||||||
CSF_shell32 = -lShell32
|
|
||||||
CSF_opengl32 = -lopengl32
|
|
||||||
CSF_wsock32 = -lwsock32
|
|
||||||
CSF_netapi32 = -lnetapi32
|
|
||||||
CSF_OpenGlLibs = -lopengl32
|
|
||||||
HAVE_GLES2 { CSF_OpenGlLibs = -llibEGL -llibGLESv2 }
|
|
||||||
CSF_psapi = -lPsapi
|
|
||||||
CSF_winmm = -lwinmm
|
|
||||||
CSF_d3d9 = -ld3d9
|
|
||||||
CSF_TclLibs = -ltcl86
|
|
||||||
CSF_TclTkLibs = -ltk86
|
|
||||||
CSF_TBB =
|
|
||||||
} else:mac {
|
|
||||||
CSF_dl = -ldl
|
|
||||||
CSF_objc = -lobjc
|
|
||||||
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
|
|
||||||
CSF_TclTkLibs = -framework Tk
|
|
||||||
} else {
|
|
||||||
CSF_dl = -ldl
|
|
||||||
CSF_ThreadLibs = -lpthread -lrt
|
|
||||||
CSF_OpenGlLibs = -lGL
|
|
||||||
CSF_TclTkLibs = -lX11 -ltk8.6
|
|
||||||
CSF_XwLibs = -lX11 -lXext -lXmu -lXi
|
|
||||||
CSF_MotifLibs = -lX11
|
|
||||||
CSF_fontconfig = -lfontconfig
|
|
||||||
HAVE_GLES2 { CSF_OpenGlLibs = -lEGL -lGLESv2 }
|
|
||||||
}
|
|
||||||
|
|
||||||
for (aCfgIter, CONFIG) {
|
|
||||||
aRes = $$find(aCfgIter, "^HAVE_")
|
|
||||||
count(aRes, 1) {
|
|
||||||
DEFINES += $$aCfgIter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Define the list of standard OCCT file extensions
|
|
||||||
aHxxRegex = ^.*\.(hxx|h|lxx|gxx)$
|
|
||||||
aPxxRegex = ^.*\.(pxx)$
|
|
||||||
aCxxRegex = ^.*\.(cxx|c)$
|
|
||||||
mac { aCxxRegex = ^.*\.(cxx|c|m|mm)$ }
|
|
||||||
|
|
||||||
# Auxiliary function for probing file extension
|
|
||||||
defineTest (occCheckExtension) {
|
|
||||||
aProbe = $$find(1, "$$2")
|
|
||||||
count(aProbe, 1) { return(true) } else { return(false) }
|
|
||||||
}
|
|
||||||
|
|
||||||
# Auxiliary function for probing compilable files
|
|
||||||
defineTest (occIsCxxFile) { occCheckExtension ($$1, $$aCxxRegex) { return(true) } else { return(false) } }
|
|
||||||
|
|
||||||
# Auxiliary function for probing header files
|
|
||||||
defineTest (occIsHxxFile) { occCheckExtension ($$1, $$aHxxRegex) { return(true) } else { return(false) } }
|
|
||||||
|
|
||||||
aTkFiles = $$cat($$aSrcRoot/$$OCC_TOOLKIT_NAME/FILES, lines)
|
|
||||||
aTkFiles += CMakeLists.txt
|
|
||||||
aPackages = $$cat($$aSrcRoot/$$OCC_TOOLKIT_NAME/PACKAGES, lines)
|
|
||||||
anExternLibs = $$cat($$aSrcRoot/$$OCC_TOOLKIT_NAME/EXTERNLIB, lines)
|
|
||||||
|
|
||||||
for (aTkFileIter, aTkFiles) { OTHER_FILES += $$aSrcRoot/$$OCC_TOOLKIT_NAME/$$aTkFileIter }
|
|
||||||
for (anExternLib, anExternLibs) {
|
|
||||||
hasCsf = $$find(anExternLib, CSF_)
|
|
||||||
count(hasCsf, 1) {
|
|
||||||
aList = $$split($$anExternLib, "\n")
|
|
||||||
LIBS += $$aList
|
|
||||||
} else {
|
|
||||||
LIBS += -l$$anExternLib
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Iterate over Packages and add compilable files into this project
|
|
||||||
isEmpty (aPackages) { aPackages = $$OCC_TOOLKIT_NAME }
|
|
||||||
for (aPackage, aPackages) {
|
|
||||||
aPackageFolder = $$aSrcRoot/$$OCC_TOOLKIT_NAME/$$aPackage
|
|
||||||
aPackageFiles = $$cat($$aSrcRoot/$$aPackage/FILES, lines)
|
|
||||||
for (aFileIter, aPackageFiles) {
|
|
||||||
occIsCxxFile($$aFileIter) {
|
|
||||||
SOURCES += $$aSrcRoot/$$aPackage/$$aFileIter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# extend clean with versioned .so files
|
|
||||||
!win32 {
|
|
||||||
aVerList = $$split(VERSION, ".")
|
|
||||||
aVerMaj = $$member(aVerList, 0)
|
|
||||||
aVerMin = $$member(aVerList, 1)
|
|
||||||
aVerMic = $$member(aVerList, 2)
|
|
||||||
equals(TEMPLATE, app) {
|
|
||||||
QMAKE_CLEAN += $$DESTDIR/$${TARGET}
|
|
||||||
} else {
|
|
||||||
mac {
|
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.dylib
|
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.dylib
|
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.$${aVerMin}.dylib
|
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.$${aVerMin}.$${aVerMic}.dylib
|
|
||||||
} else {
|
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so
|
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}
|
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}.$${aVerMin}
|
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}.$${aVerMin}.$${aVerMic}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,2 +0,0 @@
|
|||||||
OCC_TOOLKIT_NAME = \$\$TARGET
|
|
||||||
include(../../OccToolkit.pri)
|
|
@@ -1,41 +0,0 @@
|
|||||||
# This is an experimental Solution project for building entire OCCT framework using qmake.
|
|
||||||
# It can be also used for just source code navigation in Qt Creator without actually building OCCT.
|
|
||||||
# Note, as this is an experimental project, compiler flags might differ from official builds - use it on your own risk!
|
|
||||||
# Building OCCT using CMake is a preferred solution.
|
|
||||||
#
|
|
||||||
# This project GENERATES sub-projects (OCCT modules) dynamically, so to start using it:
|
|
||||||
# - Launch genconf, select Project Format "Qt Project" and configure dependencies; this will also generate "custom.auto.pri".
|
|
||||||
# - Launch genproj to fill in "inc" folder with links to header files.
|
|
||||||
# - Open project in Qt Creator, and call "Run qmake".
|
|
||||||
# - Close the project in Qt Creator, open it again so that you should see the sub-modules in Project tree; call "Run qmake" again.
|
|
||||||
# - "Run qmake" and perform Build.
|
|
||||||
TEMPLATE = subdirs
|
|
||||||
exists(custom.auto.pri) { include(custom.auto.pri) }
|
|
||||||
exists(custom.pri) { include(custom.pri) }
|
|
||||||
|
|
||||||
OTHER_FILES += OccModule.pro.in \
|
|
||||||
OcctHeaderLink.hxx.in \
|
|
||||||
OccToolkit.pro.in \
|
|
||||||
OccCppConfig.pri \
|
|
||||||
OccModule.pri \
|
|
||||||
OccToolkit.pri \
|
|
||||||
custom.pri.template
|
|
||||||
|
|
||||||
# Iterate over Modules and generate sub-projects
|
|
||||||
aSolModuleList = $$cat(../MODULES, lines)
|
|
||||||
for (aSolModuleIter, aSolModuleList) {
|
|
||||||
aSolModule = $$first($$list($$aSolModuleIter))
|
|
||||||
eval(occtkgen_$${aSolModule}.input = $$_PRO_FILE_PWD_/OccModule.pro.in)
|
|
||||||
eval(occtkgen_$${aSolModule}.output = $$_PRO_FILE_PWD_/$${aSolModule}/$${aSolModule}.pro)
|
|
||||||
eval(occtkgen_$${aSolModule}.config = verbatim)
|
|
||||||
eval(QMAKE_SUBSTITUTES += occtkgen_$${aSolModule})
|
|
||||||
SUBDIRS += $${aSolModule}
|
|
||||||
}
|
|
||||||
|
|
||||||
# These dependencies are manually defined
|
|
||||||
ModelingData.depends = FoundationClasses
|
|
||||||
ModelingAlgorithms.depends = FoundationClasses ModelingData
|
|
||||||
Visualization.depends = FoundationClasses ModelingData ModelingAlgorithms
|
|
||||||
ApplicationFramework.depends = FoundationClasses ModelingData ModelingAlgorithms Visualization
|
|
||||||
DataExchange.depends = FoundationClasses ModelingData ModelingAlgorithms ApplicationFramework
|
|
||||||
Draw.depends = FoundationClasses ModelingData ModelingAlgorithms ApplicationFramework DataExchange Visualization
|
|
@@ -1 +0,0 @@
|
|||||||
#include \"../src/$${OCCT_PACKAGE}/$${OCCT_HEADER}\"
|
|
@@ -1,17 +0,0 @@
|
|||||||
PRODUCTS_PATH = c:/3rdparty/vc14
|
|
||||||
|
|
||||||
#CONFIG += HAVE_FREEIMAGE
|
|
||||||
#CONFIG += HAVE_FFMPEG
|
|
||||||
#CONFIG += HAVE_TBB
|
|
||||||
#CONFIG += HAVE_GLES2
|
|
||||||
#CONFIG += HAVE_D3D
|
|
||||||
#CONFIG += HAVE_VTK
|
|
||||||
|
|
||||||
aFreeType = $$PRODUCTS_PATH/freetype-2.5.5-vc14-64
|
|
||||||
aTclTk = $$PRODUCTS_PATH/tcltk-86-64
|
|
||||||
|
|
||||||
INCLUDEPATH += $$aFreeType/include
|
|
||||||
LIBS += -L$$aFreeType/lib
|
|
||||||
|
|
||||||
INCLUDEPATH += $$aTclTk/include
|
|
||||||
LIBS += -L$$aTclTk/lib
|
|
@@ -1,12 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# This file has been generated by genproj.tcl script from CASROOT/adm/templates/codeblocks.sh
|
|
||||||
|
|
||||||
export TARGET="cbp"
|
export TARGET="cbp"
|
||||||
|
|
||||||
source ./env.sh "$1" "$TARGET"
|
source ./env.sh "$1" "$TARGET"
|
||||||
|
|
||||||
if [ -e "/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks" ]; then
|
if [ -e "/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks" ]; then
|
||||||
/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks ./adm/$WOKSTATION/cbp/__SOLUTION__.workspace
|
/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks ./adm/$WOKSTATION/cbp/OCCT.workspace
|
||||||
else
|
else
|
||||||
codeblocks ./adm/$WOKSTATION/cbp/__SOLUTION__.workspace
|
codeblocks ./adm/$WOKSTATION/cbp/OCCT.workspace
|
||||||
fi
|
fi
|
||||||
|
@@ -24,14 +24,11 @@ set "HAVE_GLES2=false"
|
|||||||
set "HAVE_D3D=false"
|
set "HAVE_D3D=false"
|
||||||
set "HAVE_ZLIB=false"
|
set "HAVE_ZLIB=false"
|
||||||
set "HAVE_LIBLZMA=false"
|
set "HAVE_LIBLZMA=false"
|
||||||
set "HAVE_RAPIDJSON=false"
|
|
||||||
set "HAVE_E57=false"
|
|
||||||
set "CSF_OPT_INC="
|
set "CSF_OPT_INC="
|
||||||
set "CSF_OPT_LIB32="
|
set "CSF_OPT_LIB32="
|
||||||
set "CSF_OPT_LIB64="
|
set "CSF_OPT_LIB64="
|
||||||
set "CSF_OPT_BIN32="
|
set "CSF_OPT_BIN32="
|
||||||
set "CSF_OPT_BIN64="
|
set "CSF_OPT_BIN64="
|
||||||
set "CSF_DEFINES=%CSF_DEFINES_EXTRA%"
|
|
||||||
|
|
||||||
if not ["%CASROOT%"] == [""] if exist "%SCRIPTROOT%\%CASROOT%" set "CASROOT=%SCRIPTROOT%\%CASROOT%"
|
if not ["%CASROOT%"] == [""] if exist "%SCRIPTROOT%\%CASROOT%" set "CASROOT=%SCRIPTROOT%\%CASROOT%"
|
||||||
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
||||||
@@ -165,8 +162,6 @@ if ["%HAVE_GLES2%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DH
|
|||||||
if ["%HAVE_D3D%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_D3D" & set "CSF_DEFINES=HAVE_D3D;%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_ZLIB%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_ZLIB" & set "CSF_DEFINES=HAVE_ZLIB;%CSF_DEFINES%"
|
||||||
if ["%HAVE_LIBLZMA%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_LIBLZMA" & set "CSF_DEFINES=HAVE_LIBLZMA;%CSF_DEFINES%"
|
if ["%HAVE_LIBLZMA%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_LIBLZMA" & set "CSF_DEFINES=HAVE_LIBLZMA;%CSF_DEFINES%"
|
||||||
if ["%HAVE_RAPIDJSON%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_RAPIDJSON" & set "CSF_DEFINES=HAVE_RAPIDJSON;%CSF_DEFINES%"
|
|
||||||
if ["%HAVE_E57%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_E57" & set "CSF_DEFINES=HAVE_E57;%CSF_DEFINES%"
|
|
||||||
|
|
||||||
rem Eliminate VS warning
|
rem Eliminate VS warning
|
||||||
if ["%CSF_DEFINES%"] == [""] set "CSF_DEFINES=;"
|
if ["%CSF_DEFINES%"] == [""] set "CSF_DEFINES=;"
|
||||||
|
@@ -6,7 +6,7 @@ aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath
|
|||||||
# Reset values
|
# Reset values
|
||||||
export CASROOT="__CASROOT__"
|
export CASROOT="__CASROOT__"
|
||||||
export CASDEB=""
|
export CASDEB=""
|
||||||
export PRJFMT="";
|
export TARGET="";
|
||||||
export HAVE_TBB="false";
|
export HAVE_TBB="false";
|
||||||
export HAVE_OPENCL="false";
|
export HAVE_OPENCL="false";
|
||||||
export HAVE_FREEIMAGE="false";
|
export HAVE_FREEIMAGE="false";
|
||||||
@@ -15,8 +15,6 @@ export HAVE_VTK="false";
|
|||||||
export HAVE_GLES2="false";
|
export HAVE_GLES2="false";
|
||||||
export HAVE_ZLIB="false";
|
export HAVE_ZLIB="false";
|
||||||
export HAVE_LIBLZMA="false";
|
export HAVE_LIBLZMA="false";
|
||||||
export HAVE_RAPIDJSON="false";
|
|
||||||
export HAVE_E57="false";
|
|
||||||
export MACOSX_USE_GLX="false";
|
export MACOSX_USE_GLX="false";
|
||||||
export CSF_OPT_INC=""
|
export CSF_OPT_INC=""
|
||||||
export CSF_OPT_LIB32=""
|
export CSF_OPT_LIB32=""
|
||||||
@@ -42,9 +40,9 @@ do
|
|||||||
elif [ "$i" == "i" ] || [ "$i" == "relwithdeb" ]; then
|
elif [ "$i" == "i" ] || [ "$i" == "relwithdeb" ]; then
|
||||||
export CASDEB="i"
|
export CASDEB="i"
|
||||||
elif [ "$i" == "cbp" ]; then
|
elif [ "$i" == "cbp" ]; then
|
||||||
export PRJFMT="cbp";
|
export TARGET="cbp";
|
||||||
elif [ "$i" == "xcd" ] || [ "$i" == "xcode" ]; then
|
elif [ "$i" == "xcd" ] || [ "$i" == "xcode" ]; then
|
||||||
export PRJFMT="xcd";
|
export TARGET="xcd";
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
shopt -u nocasematch
|
shopt -u nocasematch
|
||||||
@@ -66,32 +64,28 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
export CASBIN=""
|
export CASBIN=""
|
||||||
if [ "${PRJFMT}" == "xcd" ]; then
|
if [ "${TARGET}" == "cbp" ]; then
|
||||||
|
export CASBIN="${WOKSTATION}/cbp"
|
||||||
|
elif [ "${TARGET}" == "xcd" ]; then
|
||||||
export CASBIN="adm/mac/xcd/build"
|
export CASBIN="adm/mac/xcd/build"
|
||||||
else
|
|
||||||
if [ "$aSystem" == "Darwin" ]; then
|
|
||||||
export CASBIN="${WOKSTATION}/clang"
|
|
||||||
else
|
|
||||||
export CASBIN="${WOKSTATION}/gcc"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export CSF_OPT_INC="${CSF_OPT_INC}:${CASROOT}/inc"
|
export CSF_OPT_INC="${CSF_OPT_INC}:${CASROOT}/inc"
|
||||||
|
|
||||||
if [ "${PRJFMT}" == "xcd" ]; then
|
if [ "${TARGET}" == "cbp" ]; then
|
||||||
export CSF_OPT_LIB32D="${CSF_OPT_LIB32}:${CASROOT}/${CASBIN}/Debug"
|
|
||||||
export CSF_OPT_LIB64D="${CSF_OPT_LIB64}:${CASROOT}/${CASBIN}/Debug"
|
|
||||||
export CSF_OPT_LIB32="${CSF_OPT_LIB32}:${CASROOT}/${CASBIN}/Release"
|
|
||||||
export CSF_OPT_LIB64="${CSF_OPT_LIB64}:${CASROOT}/${CASBIN}/Release"
|
|
||||||
export CSF_OPT_LIB32I="${CSF_OPT_LIB32}:${CASROOT}/${CASBIN}/RelWithDebInfo"
|
|
||||||
export CSF_OPT_LIB64I="${CSF_OPT_LIB64}:${CASROOT}/${CASBIN}/RelWithDebInfo"
|
|
||||||
else
|
|
||||||
export CSF_OPT_LIB32D="${CSF_OPT_LIB32}:${CASROOT}/${CASBIN}/libd"
|
export CSF_OPT_LIB32D="${CSF_OPT_LIB32}:${CASROOT}/${CASBIN}/libd"
|
||||||
export CSF_OPT_LIB64D="${CSF_OPT_LIB64}:${CASROOT}/${CASBIN}/libd"
|
export CSF_OPT_LIB64D="${CSF_OPT_LIB64}:${CASROOT}/${CASBIN}/libd"
|
||||||
export CSF_OPT_LIB32="${CSF_OPT_LIB32}:${CASROOT}/${CASBIN}/lib"
|
export CSF_OPT_LIB32="${CSF_OPT_LIB32}:${CASROOT}/${CASBIN}/lib"
|
||||||
export CSF_OPT_LIB64="${CSF_OPT_LIB64}:${CASROOT}/${CASBIN}/lib"
|
export CSF_OPT_LIB64="${CSF_OPT_LIB64}:${CASROOT}/${CASBIN}/lib"
|
||||||
export CSF_OPT_LIB32I="${CSF_OPT_LIB32}:${CASROOT}/${CASBIN}/libi"
|
export CSF_OPT_LIB32I="${CSF_OPT_LIB32}:${CASROOT}/${CASBIN}/libi"
|
||||||
export CSF_OPT_LIB64I="${CSF_OPT_LIB64}:${CASROOT}/${CASBIN}/libi"
|
export CSF_OPT_LIB64I="${CSF_OPT_LIB64}:${CASROOT}/${CASBIN}/libi"
|
||||||
|
elif [ "${TARGET}" == "xcd" ]; then
|
||||||
|
export CSF_OPT_LIB32D="${CSF_OPT_LIB32}:${CASROOT}/${CASBIN}/Debug"
|
||||||
|
export CSF_OPT_LIB64D="${CSF_OPT_LIB64}:${CASROOT}/${CASBIN}/Debug"
|
||||||
|
export CSF_OPT_LIB32="${CSF_OPT_LIB32}:${CASROOT}/${CASBIN}/Release"
|
||||||
|
export CSF_OPT_LIB64="${CSF_OPT_LIB64}:${CASROOT}/${CASBIN}/Release"
|
||||||
|
export CSF_OPT_LIB32I="${CSF_OPT_LIB32}:${CASROOT}/${CASBIN}/RelWithDebInfo"
|
||||||
|
export CSF_OPT_LIB64I="${CSF_OPT_LIB64}:${CASROOT}/${CASBIN}/RelWithDebInfo"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export CSF_OPT_CMPL=""
|
export CSF_OPT_CMPL=""
|
||||||
@@ -105,8 +99,6 @@ if [ "$HAVE_GLES2" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -D
|
|||||||
if [ "$HAVE_VTK" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_VTK"; fi
|
if [ "$HAVE_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_ZLIB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_ZLIB"; fi
|
||||||
if [ "$HAVE_LIBLZMA" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_LIBLZMA"; fi
|
if [ "$HAVE_LIBLZMA" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_LIBLZMA"; fi
|
||||||
if [ "$HAVE_RAPIDJSON" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_RAPIDJSON"; fi
|
|
||||||
if [ "$HAVE_E57" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_E57"; fi
|
|
||||||
# Option to compile OCCT with X11 libs on Mac OS X
|
# Option to compile OCCT with X11 libs on Mac OS X
|
||||||
if [ "$MACOSX_USE_GLX" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DMACOSX_USE_GLX"; fi
|
if [ "$MACOSX_USE_GLX" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DMACOSX_USE_GLX"; fi
|
||||||
|
|
||||||
@@ -182,7 +174,7 @@ export CSF_OCCTSamplesPath="${CSF_OCCTSamplesPath:-$CASROOT/samples}"
|
|||||||
export CSF_OCCTDataPath="${CSF_OCCTDataPath:-$CASROOT/data}"
|
export CSF_OCCTDataPath="${CSF_OCCTDataPath:-$CASROOT/data}"
|
||||||
export CSF_OCCTTestsPath="${CSF_OCCTTestsPath:-$CASROOT/tests}"
|
export CSF_OCCTTestsPath="${CSF_OCCTTestsPath:-$CASROOT/tests}"
|
||||||
|
|
||||||
if [ "${PRJFMT}" == "xcd" ]; then
|
if [ "${TARGET}" == "xcd" ]; then
|
||||||
if [ "${CASDEB}" == "d" ]; then
|
if [ "${CASDEB}" == "d" ]; then
|
||||||
export CSF_OCCTBinPath="${CSF_OCCTBinPath:-$CASROOT/$CASBIN/Debug}"
|
export CSF_OCCTBinPath="${CSF_OCCTBinPath:-$CASROOT/$CASBIN/Debug}"
|
||||||
else
|
else
|
||||||
|
@@ -1,11 +1,10 @@
|
|||||||
@echo off
|
@echo off
|
||||||
rem This file has been generated by genproj.tcl script from CASROOT/adm/templates/msvc.bat
|
|
||||||
|
|
||||||
rem Setup environment
|
rem Setup environment
|
||||||
call "%~dp0env.bat" %1 %2 %3
|
call "%~dp0env.bat" %1 %2 %3
|
||||||
|
|
||||||
rem Define path to project file
|
rem Define path to project file
|
||||||
set "PRJFILE=%~dp0\adm\msvc\%VCVER%\__SOLUTION__.sln"
|
set "PRJFILE=%~dp0\adm\msvc\%VCVER%\OCCT.sln"
|
||||||
if not exist "%PRJFILE%" set "PRJFILE=%~dp0\adm\msvc\%VCVER%\Products.sln"
|
if not exist "%PRJFILE%" set "PRJFILE=%~dp0\adm\msvc\%VCVER%\Products.sln"
|
||||||
if not "%4" == "" (
|
if not "%4" == "" (
|
||||||
set "PRJFILE=%4"
|
set "PRJFILE=%4"
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# This file has been generated by genproj.tcl script from CASROOT/adm/templates/xcode.sh
|
|
||||||
|
|
||||||
export TARGET="xcd"
|
export TARGET="xcd"
|
||||||
|
|
||||||
source ./env.sh "$1" "$TARGET"
|
source ./env.sh "$1" "$TARGET"
|
||||||
|
|
||||||
open -a Xcode ./adm/mac/xcd/__SOLUTION__.xcworkspace
|
open -a Xcode ./adm/mac/xcd/OCCT.xcworkspace
|
||||||
|
@@ -136,64 +136,6 @@ const char* GeomTools_Dump (void* theHandlePtr)
|
|||||||
Dump geometric object to cout.
|
Dump geometric object to cout.
|
||||||
- *theHandlePtr* -- a pointer to the geometric variable (<i>Handle</i> to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
|
- *theHandlePtr* -- a pointer to the geometric variable (<i>Handle</i> to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
|
||||||
|
|
||||||
|
|
||||||
@section occt_debug_dump_json Dump OCCT objects into Json
|
|
||||||
|
|
||||||
Many OCCT classes may dump the current state into the stream. This stream contains the information about the class field into the field value/s.
|
|
||||||
It is possible to prepare recursive dump using corresponded macro for class fields. The depth of this recursion is defined by parameter of the dump.
|
|
||||||
The object defines What parameters should be presented in the Dump. The usual way is to dump all object fields.
|
|
||||||
|
|
||||||
@subsection occt_debug_dump_json_object Implementation in object
|
|
||||||
|
|
||||||
Steps to prepare dump of the object into json:
|
|
||||||
|
|
||||||
1. Create method <b>DumpJson</b>. The method should accept the output stream and the depth for the fields dump.
|
|
||||||
Depth, equal to zero means that only fields of this class should be dumped. Default value -1 means that whole tree of dump will be built recursively calling dump of all fields.
|
|
||||||
|
|
||||||
2. Put into the first row of the method <b>OCCT_DUMP_CLASS_BEGIN</b>. This macro creates a local variable, that will open Json structure on start, and close on exit from this method.
|
|
||||||
|
|
||||||
3. Add several macro to store field values.
|
|
||||||
|
|
||||||
The following macro are defined to cover the object parameters into json format:
|
|
||||||
|
|
||||||
| Name | Result in json |
|
|
||||||
| :-------------------------- | :--------|
|
|
||||||
| OCCT_DUMP_FIELD_VALUE_NUMERICAL | "field": value |
|
|
||||||
| OCCT_DUMP_FIELD_VALUE_STRING | "field": "value" |
|
|
||||||
| OCCT_DUMP_FIELD_VALUE_POINTER | "field": "pointer address" |
|
|
||||||
| OCCT_DUMP_FIELD_VALUES_DUMPED | "field": { result of field->DumpJson(...) } |
|
|
||||||
| OCCT_DUMP_FIELD_VALUES_NUMERICAL | "field": [value_1, ..., value_n]
|
|
||||||
| OCCT_DUMP_FIELD_VALUES_STRING | "field": ["value_1", ..., "value_n"]
|
|
||||||
| OCCT_DUMP_BASE_CLASS | "kind": { result of kind::DumpJson(...) } |
|
|
||||||
|
|
||||||
@subsection occt_debug_dump_json_draw Using in DRAW
|
|
||||||
|
|
||||||
In DRAW, key '-dumpJson' is used to dump an object.
|
|
||||||
It is implemented in 'vaspect' and 'boundingbox' commands.
|
|
||||||
|
|
||||||
Json output for Bnd_OBB (using command 'bounding v -obb -dumpJson'):
|
|
||||||
|
|
||||||
~~~~~
|
|
||||||
"Bnd_OBB": {
|
|
||||||
"Center": {
|
|
||||||
"gp_XYZ": [1, 2, 3]
|
|
||||||
},
|
|
||||||
"Axes[0]": {
|
|
||||||
"gp_XYZ:" [1, 0, 0]
|
|
||||||
},
|
|
||||||
"Axes[1]": {
|
|
||||||
"gp_XYZ:" [0, 1, 0]
|
|
||||||
},
|
|
||||||
"Axes[2]": {
|
|
||||||
"gp_XYZ:" [0, 0, 1]
|
|
||||||
},
|
|
||||||
"HDims[0]": 0,
|
|
||||||
"HDims[1]": 0,
|
|
||||||
"HDims[2]": 0,
|
|
||||||
"IsAABox": 1,
|
|
||||||
}
|
|
||||||
~~~~~
|
|
||||||
|
|
||||||
@section occt_debug_vstudio Using Visual Studio debugger
|
@section occt_debug_vstudio Using Visual Studio debugger
|
||||||
|
|
||||||
@subsection occt_debug_vstudio_command Command window
|
@subsection occt_debug_vstudio_command Command window
|
||||||
|
@@ -878,18 +878,7 @@ The test grid name is constructed depending on the type of the tested chamfers.
|
|||||||
| dist_angle_complex | | Distance from edge and given angle |
|
| dist_angle_complex | | Distance from edge and given angle |
|
||||||
| dist_angle_sequence | | Distance from edge and given angle |
|
| dist_angle_sequence | | Distance from edge and given angle |
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_7 de
|
@subsubsection testmanual_5_1_7 demo
|
||||||
|
|
||||||
This group tests reading and writing of CAD data files (iges, step) to and from OCCT.
|
|
||||||
|
|
||||||
Test cases check transfer status, shape and attributes against expected reference values.
|
|
||||||
|
|
||||||
| Grid | Commands | Functionality |
|
|
||||||
| :---- | :----- | :------- |
|
|
||||||
| iges_1, iges_2, iges_3 | igesbrep, brepiges, ReadIges, WriteIges | IGES tests |
|
|
||||||
| step_1, step_2, step_3, step_4, step_5 | stepread, stepwrite, ReadStep, WriteStep | STEP tests |
|
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_8 demo
|
|
||||||
|
|
||||||
This group allows demonstrating how testing cases are created, and testing DRAW commands and the test system as a whole.
|
This group allows demonstrating how testing cases are created, and testing DRAW commands and the test system as a whole.
|
||||||
|
|
||||||
@@ -900,7 +889,7 @@ This group allows demonstrating how testing cases are created, and testing DRAW
|
|||||||
| samples | | OCCT samples |
|
| samples | | OCCT samples |
|
||||||
|
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_9 draft
|
@subsubsection testmanual_5_1_8 draft
|
||||||
|
|
||||||
This group allows testing draft operations.
|
This group allows testing draft operations.
|
||||||
|
|
||||||
@@ -911,7 +900,7 @@ DRAW module: MODELING.
|
|||||||
| Angle | depouille | Drafts with angle (inclined walls) |
|
| Angle | depouille | Drafts with angle (inclined walls) |
|
||||||
|
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_10 feat
|
@subsubsection testmanual_5_1_9 feat
|
||||||
|
|
||||||
This group allows testing creation of features on a shape.
|
This group allows testing creation of features on a shape.
|
||||||
|
|
||||||
@@ -925,7 +914,7 @@ DRAW module: MODELING (package *BRepTest*).
|
|||||||
| featrevol | | |
|
| featrevol | | |
|
||||||
| featrf | | |
|
| featrf | | |
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_11 heal
|
@subsubsection testmanual_5_1_10 heal
|
||||||
|
|
||||||
This group allows testing the functionality provided by *ShapeHealing* toolkit.
|
This group allows testing the functionality provided by *ShapeHealing* toolkit.
|
||||||
|
|
||||||
@@ -954,7 +943,7 @@ DRAW module: XSDRAW
|
|||||||
| surface_to_revolution_standard | DT_ShapeConvertRev | Convert elementary surfaces to revolutions, simple cases |
|
| surface_to_revolution_standard | DT_ShapeConvertRev | Convert elementary surfaces to revolutions, simple cases |
|
||||||
| update_tolerance_locked | updatetolerance | Update the tolerance of shape so that it satisfy the rule: toler(face)<=toler(edge)<=toler(vertex) |
|
| update_tolerance_locked | updatetolerance | Update the tolerance of shape so that it satisfy the rule: toler(face)<=toler(edge)<=toler(vertex) |
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_12 mesh
|
@subsubsection testmanual_5_1_11 mesh
|
||||||
|
|
||||||
This group allows testing shape tessellation (*BRepMesh*) and shading.
|
This group allows testing shape tessellation (*BRepMesh*) and shading.
|
||||||
|
|
||||||
@@ -971,7 +960,7 @@ DRAW modules: MODELING (package *MeshTest*), VISUALIZATION (package *ViewerTest*
|
|||||||
| advanced_incmesh_parallel | incmesh | Meshing of complex shapes, parallel mode |
|
| advanced_incmesh_parallel | incmesh | Meshing of complex shapes, parallel mode |
|
||||||
| standard_incmesh_parallel | incmesh | Meshing of simple shapes, parallel mode |
|
| standard_incmesh_parallel | incmesh | Meshing of simple shapes, parallel mode |
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_13 mkface
|
@subsubsection testmanual_5_1_12 mkface
|
||||||
|
|
||||||
This group allows testing creation of simple surfaces.
|
This group allows testing creation of simple surfaces.
|
||||||
|
|
||||||
@@ -986,7 +975,7 @@ DRAW module: MODELING (package *BRepTest*)
|
|||||||
| after_revsurf_and_offset | mkface | |
|
| after_revsurf_and_offset | mkface | |
|
||||||
| mkplane | mkplane | |
|
| mkplane | mkplane | |
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_14 nproject
|
@subsubsection testmanual_5_1_13 nproject
|
||||||
|
|
||||||
This group allows testing normal projection of edges and wires onto a face.
|
This group allows testing normal projection of edges and wires onto a face.
|
||||||
|
|
||||||
@@ -996,7 +985,7 @@ DRAW module: MODELING (package *BRepTest*)
|
|||||||
| :---- | :----- | :------- |
|
| :---- | :----- | :------- |
|
||||||
| Base | nproject | |
|
| Base | nproject | |
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_15 offset
|
@subsubsection testmanual_5_1_14 offset
|
||||||
|
|
||||||
This group allows testing offset functionality for curves and surfaces.
|
This group allows testing offset functionality for curves and surfaces.
|
||||||
|
|
||||||
@@ -1012,7 +1001,7 @@ DRAW module: MODELING (package *BRepTest*)
|
|||||||
| shape | offsetshape | |
|
| shape | offsetshape | |
|
||||||
| wire_closed_outside_0_005, wire_closed_outside_0_025, wire_closed_outside_0_075, wire_closed_inside_0_005, wire_closed_inside_0_025, wire_closed_inside_0_075, wire_unclosed_outside_0_005, wire_unclosed_outside_0_025, wire_unclosed_outside_0_075 | mkoffset | 2d offset of closed and unclosed planar wires with different offset step and directions of offset ( inside / outside ) |
|
| wire_closed_outside_0_005, wire_closed_outside_0_025, wire_closed_outside_0_075, wire_closed_inside_0_005, wire_closed_inside_0_025, wire_closed_inside_0_075, wire_unclosed_outside_0_005, wire_unclosed_outside_0_025, wire_unclosed_outside_0_075 | mkoffset | 2d offset of closed and unclosed planar wires with different offset step and directions of offset ( inside / outside ) |
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_16 pipe
|
@subsubsection testmanual_5_1_15 pipe
|
||||||
|
|
||||||
This group allows testing construction of pipes (sweeping of a contour along profile).
|
This group allows testing construction of pipes (sweeping of a contour along profile).
|
||||||
|
|
||||||
@@ -1022,7 +1011,7 @@ DRAW module: MODELING (package *BRepTest*)
|
|||||||
| :---- | :----- | :------- |
|
| :---- | :----- | :------- |
|
||||||
| Standard | pipe | |
|
| Standard | pipe | |
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_17 prism
|
@subsubsection testmanual_5_1_16 prism
|
||||||
|
|
||||||
This group allows testing construction of prisms.
|
This group allows testing construction of prisms.
|
||||||
|
|
||||||
@@ -1032,7 +1021,7 @@ DRAW module: MODELING (package *BRepTest*)
|
|||||||
| :---- | :----- | :------- |
|
| :---- | :----- | :------- |
|
||||||
| seminf | prism | |
|
| seminf | prism | |
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_18 sewing
|
@subsubsection testmanual_5_1_17 sewing
|
||||||
|
|
||||||
This group allows testing sewing of faces by connecting edges.
|
This group allows testing sewing of faces by connecting edges.
|
||||||
|
|
||||||
@@ -1044,7 +1033,7 @@ DRAW module: MODELING (package *BRepTest*)
|
|||||||
| tol_1 | sewing | Sewing faces with tolerance 1 |
|
| tol_1 | sewing | Sewing faces with tolerance 1 |
|
||||||
| tol_100 | sewing | Sewing faces with tolerance 100 |
|
| tol_100 | sewing | Sewing faces with tolerance 100 |
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_19 thrusection
|
@subsubsection testmanual_5_1_18 thrusection
|
||||||
|
|
||||||
This group allows testing construction of shell or a solid passing through a set of sections in a given sequence (loft).
|
This group allows testing construction of shell or a solid passing through a set of sections in a given sequence (loft).
|
||||||
|
|
||||||
@@ -1053,7 +1042,7 @@ This group allows testing construction of shell or a solid passing through a set
|
|||||||
| solids | thrusection | Lofting with resulting solid |
|
| solids | thrusection | Lofting with resulting solid |
|
||||||
| not_solids | thrusection | Lofting with resulting shell or face |
|
| not_solids | thrusection | Lofting with resulting shell or face |
|
||||||
|
|
||||||
@subsubsection testmanual_5_1_20 xcaf
|
@subsubsection testmanual_5_1_19 xcaf
|
||||||
|
|
||||||
This group allows testing extended data exchange packages.
|
This group allows testing extended data exchange packages.
|
||||||
|
|
||||||
|
@@ -1584,6 +1584,10 @@ To use the custom printer in OCAF, it can be either added to default messenger o
|
|||||||
@subsection upgrade_740_BRepPrimAPI_MakeRevol Changes in BRepPrimAPI_MakeRevol algorithm
|
@subsection upgrade_740_BRepPrimAPI_MakeRevol Changes in BRepPrimAPI_MakeRevol algorithm
|
||||||
Previously the algorithm could create a shape with the same degenerated edge shared between some faces. Now it is prevented. The algorithm creates the different copy of this edge for each face. The method *Generated(...)* has been changed in order to apply restriction to the input shape: input shape can be only of type VERTEX, EDGE, FACE or SOLID. For input shape of another type the method always returns empty list.
|
Previously the algorithm could create a shape with the same degenerated edge shared between some faces. Now it is prevented. The algorithm creates the different copy of this edge for each face. The method *Generated(...)* has been changed in order to apply restriction to the input shape: input shape can be only of type VERTEX, EDGE, FACE or SOLID. For input shape of another type the method always returns empty list.
|
||||||
|
|
||||||
|
@subsection upgrade_740_extremaalgo Changes in behavior of Extrema algorithms
|
||||||
|
|
||||||
|
Since OCCT 7.4.0 exception is thrown on the attempt of taking points in case of infinite number of solution (IsParallel status). Request of distances is available as before. Method NbExt() always returns 1 in such cases.
|
||||||
|
|
||||||
@subsection upgrade_740_removed Removed features
|
@subsection upgrade_740_removed Removed features
|
||||||
* The following methods of the class *BRepAlgoAPI_BooleanOperation* have been removed as obsolete or replaced:
|
* The following methods of the class *BRepAlgoAPI_BooleanOperation* have been removed as obsolete or replaced:
|
||||||
- *BuilderCanWork* can be replaced with *IsDone* or *HasErrors* method.
|
- *BuilderCanWork* can be replaced with *IsDone* or *HasErrors* method.
|
||||||
@@ -1712,148 +1716,9 @@ aGroup->SetPrimitivesAspect (myDrawer->LineAspect()->Aspect()); //!< next array
|
|||||||
aGroup->AddPrimitiveArray (aLines);
|
aGroup->AddPrimitiveArray (aLines);
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
@subsection upgrade_740_materials Material definition
|
|
||||||
|
|
||||||
Decomposition of Ambient, Diffuse, Specular and Emissive properties has been eliminated within *Graphic3d_MaterialAspect* definition.
|
|
||||||
As result, the following methods of *Graphic3d_MaterialAspect* class have been removed: SetReflectionMode(), SetReflectionModeOn(), Ambient(), Diffuse(), Emissive(), Specular(), SetAmbient(), SetDiffuse(), SetSpecular(), SetEmissive().
|
|
||||||
|
|
||||||
Previously, computation of final value required the following code:
|
|
||||||
~~~~
|
|
||||||
Graphic3d_MaterialAspect theMaterial; Quantity_Color theInteriorColor;
|
|
||||||
Graphic3d_Vec3 anAmbient (0.0f);
|
|
||||||
if (theMaterial.ReflectionMode (Graphic3d_TOR_AMBIENT))
|
|
||||||
{
|
|
||||||
anAmbient = theMaterial.MaterialType (Graphic3d_MATERIAL_ASPECT)
|
|
||||||
? (Graphic3d_Vec3 )theInteriorColor * theMaterial.Ambient()
|
|
||||||
: (Graphic3d_Vec3 )theMaterial.AmbientColor() * theMaterial.Ambient();
|
|
||||||
}
|
|
||||||
~~~~
|
|
||||||
|
|
||||||
New code looks like this:
|
|
||||||
~~~~
|
|
||||||
Graphic3d_MaterialAspect theMaterial; Quantity_Color theInteriorColor;
|
|
||||||
Graphic3d_Vec3 anAmbient = theMaterial.AmbientColor();
|
|
||||||
if (theMaterial.MaterialType (Graphic3d_MATERIAL_ASPECT)) { anAmbient *= (Graphic3d_Vec3 )theInteriorColor; }
|
|
||||||
~~~~
|
|
||||||
|
|
||||||
Existing code should be updated to:
|
|
||||||
- Replace Graphic3d_MaterialAspect::SetReflectionModeOff() with setting black color; SetReflectionModeOn() calls can be simply removed.
|
|
||||||
R.g. theMaterial.SetAmbientColor(Quantity_NOC_BLACK).
|
|
||||||
- Replace Graphic3d_MaterialAspect::Ambient(), SetAmbient(), Diffuse(), SetDiffuse(), Specular(), SetSpecular(), Emissive(), SetEmissive() with methods working with pre-multiplied color.
|
|
||||||
E.g. theMaterial.SetAmbientColor(Graphic3d_Vec3 (1.0f, 0.0f, 0.0f) * 0.2f).
|
|
||||||
- Avoid using Graphic3d_MaterialAspect::Color() and SetColor() with non-physical materials (Graphic3d_MATERIAL_ASPECT).
|
|
||||||
These materials do not include color definition, because it is taken from Graphic3d_Aspects::InteriorColor() - this has not been changed.
|
|
||||||
However, previously it was possible storing the color with SetColor() call and then fetching it with Color() by application code (the rendering ignored this value);
|
|
||||||
now SetColor() explicitly ignores call for Graphic3d_MATERIAL_ASPECT materials and Color() returns DiffuseColor() multiplication coefficients.
|
|
||||||
|
|
||||||
@subsection upgrade_740_text Changes in Graphic3d_Text and OpenGl_Text API
|
|
||||||
|
|
||||||
Parameters of *Text* in *Graphic3d_Group* are moved into a new *Graphic3d_Text* class. *AddText* of *Graphic3d_Group* should be used instead of the previous *Text*.
|
|
||||||
|
|
||||||
The previous code:
|
|
||||||
~~~~
|
|
||||||
Standard_Real x, y, z;
|
|
||||||
theAttachmentPoint.Coord(x,y,z);
|
|
||||||
theGroup->Text (theText,
|
|
||||||
Graphic3d_Vertex(x,y,z),
|
|
||||||
theAspect->Height(),
|
|
||||||
theAspect->Angle(),
|
|
||||||
theAspect->Orientation(),
|
|
||||||
theAspect->HorizontalJustification(),
|
|
||||||
theAspect->VerticalJustification());
|
|
||||||
~~~~
|
|
||||||
should be replaced by the new code:
|
|
||||||
~~~~
|
|
||||||
Handle(Graphic3d_Text) aText = new Graphic3d_Text (theAspect->Height());
|
|
||||||
aText->SetText (theText.ToExtString());
|
|
||||||
aText->SetPosition (theAttachmentPoint);
|
|
||||||
aText->SetHorizontalAlignment (theAspect->HorizontalJustification());
|
|
||||||
aText->SetVerticalAlignment (theAspect->VerticalJustification());
|
|
||||||
theGroup->AddText (aText);
|
|
||||||
~~~~
|
|
||||||
|
|
||||||
*OpenGl_Text* contains *Graphic3d_Text* field.
|
|
||||||
|
|
||||||
*OpenGl_TextParam* struct is removed. Constructor and *Init* of *OpenGl_Text* with *OpenGl_TextParam* are also removed.
|
|
||||||
Instead of using them, change *OpenGl_Text*.
|
|
||||||
|
|
||||||
Please, note, that after modifying *OpenGl_Text*, *Reset* of *OpenGl_Text* should be called.
|
|
||||||
|
|
||||||
*FormatParams* of *OpenGl_Text* is replaced by *Text*.
|
|
||||||
|
|
||||||
@subsection upgrade_740_prsupdate Presentation invalidation
|
|
||||||
|
|
||||||
Historically AIS_InteractiveObject provided two independent mechanisms invalidating presentation (asking presentation manager to recompute specific display mode or all modes):
|
|
||||||
|
|
||||||
1. *AIS_InteractiveObject::SetToUpdate()*, marking existing presentation for update.
|
|
||||||
This is main invalidation API, which is expected to be followed by *AIS_InteractiveContext::Update()* call.
|
|
||||||
2. *AIS_InteractiveObject::myToRecomputeModes* + *myRecomputeEveryPrs*.
|
|
||||||
This is auxiliary invalidation API, used internally by AIS_InteractiveContext::SetColor()/UnsetColor() and similar modification methods.
|
|
||||||
|
|
||||||
The latter one has been removed to avoid confusion and unexpected behavior.
|
|
||||||
In addition, two methods *AIS_InteractiveObject::Update()* have been deprecated in favor of new *AIS_InteractiveObject::UpdatePresentations()* recomputing only invalidated presentations.
|
|
||||||
|
|
||||||
Custom presentations implementing interface methods *AIS_InteractiveObject::SetColor()* and others should be revised to use *AIS_InteractiveObject::SetToUpdate()*
|
|
||||||
or updating presentation without recomputation (see *AIS_InteractiveObject::SynchronizeAspects()* and *AIS_InteractiveObject::replaceAspects()*).
|
|
||||||
|
|
||||||
@subsection upgrade_740_interiorstyles Interior styles
|
@subsection upgrade_740_interiorstyles Interior styles
|
||||||
|
|
||||||
* *Aspect_IS_HOLLOW* is now an alias to *Aspect_IS_EMPTY* and does not implicitly enables drawing mesh edges anymore.
|
* *Aspect_IS_HOLLOW* is now an alias to *Aspect_IS_EMPTY* and does not implicitly enables drawing mesh edges anymore.
|
||||||
Specify Graphic3d_AspectFillArea3d::SetDrawEdges(true) with Graphic3d_AspectFillArea3d::SetInteriorStyle(Aspect_IS_EMPTY) to get previous behavior of Aspect_IS_HOLLOW style.
|
Specify Graphic3d_AspectFillArea3d::SetDrawEdges(true) with Graphic3d_AspectFillArea3d::SetInteriorStyle(Aspect_IS_EMPTY) to get previous behavior of Aspect_IS_HOLLOW style.
|
||||||
* *Aspect_IS_HIDDENLINE* does not implicitly enables drawing mesh edges anymore.
|
* *Aspect_IS_HIDDENLINE* does not implicitly enables drawing mesh edges anymore.
|
||||||
Specify Graphic3d_AspectFillArea3d::SetDrawEdges(true) with Graphic3d_AspectFillArea3d::SetInteriorStyle(Aspect_IS_HIDDENLINE) to get previous behavior of Aspect_IS_HIDDENLINE style.
|
Specify Graphic3d_AspectFillArea3d::SetDrawEdges(true) with Graphic3d_AspectFillArea3d::SetInteriorStyle(Aspect_IS_HIDDENLINE) to get previous behavior of Aspect_IS_HIDDENLINE style.
|
||||||
|
|
||||||
@subsection upgrade_740_modedprs PrsMgr and SelectMgr hierarchy clean up
|
|
||||||
|
|
||||||
Proxy classes *Prs3d_Presentation*, *PrsMgr_ModedPresentation* and *PrsMgr_Prs* have been removed.
|
|
||||||
Code iterating through the list of low-level structures AIS_InteractiveObject::Presentations() should be updated to access PrsMgr_Presentation directly.
|
|
||||||
Forward declarations of *Prs3d_Presentation* should be corrected, since it is now a typedef to *Graphic3d_Structure*.
|
|
||||||
|
|
||||||
Proxy classes *SelectBasics_SensitiveEntity* and *SelectBasics_EntityOwner* have been removed - *Select3D_SensitiveEntity* and *SelectMgr_EntityOwner* should be now used directly instead.
|
|
||||||
|
|
||||||
@subsection upgrade_740_offset Polygon offset defaults
|
|
||||||
|
|
||||||
*Graphic3d_PolygonOffset* default constructor has been corrected to define Units=1 instead of Units=0.
|
|
||||||
Default polygon offset settings Mode=Aspect_POM_Fill + Factor=1 + Units=1 are intended to push triangulation
|
|
||||||
(Shaded presentation) a little bit behind of lines (Wireframe and Face Edges)
|
|
||||||
for reducing z-fighting effect of Shaded+Wireframe combination.
|
|
||||||
The change in defaults (Units changed from 0 to 1) is intended to cover scenario when camera direction is perpendicular to model plane (like 2D view).
|
|
||||||
|
|
||||||
Application observing unexpected visual difference on this change should consider customizing this property within AIS_InteractiveContext default attributes
|
|
||||||
or on per-presentation basis via *Graphic3d_Aspects::SetPolygonOffset()* methods.
|
|
||||||
|
|
||||||
@subsection upgrade_740_zlayer Adding ZLayers in given position
|
|
||||||
|
|
||||||
Interface of insertion ZLayer in the viewer has been improved with ability to insert new layer before or after existing one.
|
|
||||||
Previously undocumented behavior of *V3d_Viewer::AddZlayer()* method has been corrected to insert new layer before *Graphic3d_ZLayerId_Top*.
|
|
||||||
Applications might need revising their custom layers creation code and specify precisely their order with new methods *V3d_Viewer::InsertLayerBefore()* and *V3d_Viewer::InsertLayerAfter()*.
|
|
||||||
|
|
||||||
@subsection upgrade_740_enum_changed Modified enumerations
|
|
||||||
|
|
||||||
Applications using integer values of the following enumerations in persistence
|
|
||||||
should be corrected as these enumerations have been modified:
|
|
||||||
|
|
||||||
| Name |
|
|
||||||
| :----- |
|
|
||||||
| AIS_TypeOfAttribute |
|
|
||||||
| Aspect_InteriorStyle |
|
|
||||||
| Font_FontAspect |
|
|
||||||
|
|
||||||
@subsection upgrade_740_geproj Custom defines within env.bat
|
|
||||||
|
|
||||||
*env.bat* produced by Visual Studio project generator *genproj.bat* has been modified so that *%CSF_DEFINES%* variable is reset to initial state.
|
|
||||||
Custom building environment relying on old behavior and setting extra macros within *%CSF_DEFINES%* before env.bat should be updated
|
|
||||||
to either modify custom.bat or setup new variable *%CSF_DEFINES_EXTRA%* instead.
|
|
||||||
|
|
||||||
@subsection upgrade_740_BVH_in_BOP Switching Boolean Operations algorithm to use BVH tree instead of UB tree
|
|
||||||
|
|
||||||
Since OCCT 7.4.0 Boolean Operations algorithm uses BVH tree instead of UBTree to find the pairs of entities with interfering bounding boxes.
|
|
||||||
The following API changes have been made:
|
|
||||||
* BOPTools_BoxBndTree and BOPTools_BoxBndTreeSelector have been removed. Use the BOPTools_BoxTree and BOPTools_BoxTreeSelector instead.
|
|
||||||
* BOPTools_BoxSelector::SetBox() method now accepts the BVH_Box instead of Bnd_Box.
|
|
||||||
* Methods BOPTools_BoxSelector::Reject and BOPTools_BoxSelector::Accept have been removed as unused.
|
|
||||||
* The RunParallel flag has been removed from the list of parameters of BOPAlgo_Tools::IntersectVertices method. Earlier, it performed selection from the UB tree in parallel mode. Now all interfering pairs are found in one pass, using pair traverse of the same BVH tree.
|
|
||||||
|
|
||||||
@subsection upgrade_740_stdnamespace Standard_Stream.hxx no more has "using std::" statements
|
|
||||||
*Standard_Stream.hxx* header, commonly included by other OCCT header files, does no more add entities from *std namespace* related to streams (like *std::cout*, *std::istream* and others) into global namespace.
|
|
||||||
The application code relying on this matter should be updated to either specify std namespace explicitly (like std::cout) or add "using std::" statements locally.
|
|
||||||
|
@@ -222,7 +222,6 @@ for which OCCT is certified to work.
|
|||||||
| Freetype (for text rendering) | FreeType 2.4.11-2.7.1 https://sourceforge.net/projects/freetype/files/ |
|
| Freetype (for text rendering) | FreeType 2.4.11-2.7.1 https://sourceforge.net/projects/freetype/files/ |
|
||||||
| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.17.0+ https://sourceforge.net/projects/freeimage/files |
|
| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.17.0+ https://sourceforge.net/projects/freeimage/files |
|
||||||
| FFmpeg (optional, for video recording) | FFmpeg 3.1+ https://www.ffmpeg.org/download.html |
|
| FFmpeg (optional, for video recording) | FFmpeg 3.1+ https://www.ffmpeg.org/download.html |
|
||||||
| RapidJSON (optional, for reading glTF) | RapidJSON 1.1+ http://rapidjson.org/ |
|
|
||||||
| Intel TBB (optional, for multithreaded algorithms) | TBB 4.x or 5.x https://www.threadingbuildingblocks.org/ |
|
| Intel TBB (optional, for multithreaded algorithms) | TBB 4.x or 5.x https://www.threadingbuildingblocks.org/ |
|
||||||
| VTK (for VTK Integration Services | VTK 6.1+ http://www.vtk.org/download/ |
|
| VTK (for VTK Integration Services | VTK 6.1+ http://www.vtk.org/download/ |
|
||||||
| Doxygen (optional for building documentation) | Doxygen 1.8.5+ https://www.stack.nl/~dimitri/doxygen/download.html |
|
| Doxygen (optional for building documentation) | Doxygen 1.8.5+ https://www.stack.nl/~dimitri/doxygen/download.html |
|
||||||
|
@@ -23,7 +23,7 @@ WARNINGS = NO
|
|||||||
ENABLE_PREPROCESSING = YES
|
ENABLE_PREPROCESSING = YES
|
||||||
MACRO_EXPANSION = YES
|
MACRO_EXPANSION = YES
|
||||||
EXPAND_ONLY_PREDEF = YES
|
EXPAND_ONLY_PREDEF = YES
|
||||||
PREDEFINED = Standard_EXPORT Standard_NODISCARD Standard_OVERRIDE:=override __Standard_API __Draw_API Handle(a):=Handle<a> DEFINE_STANDARD_ALLOC DEFINE_NCOLLECTION_ALLOC "Standard_DEPRECATED=//! @deprecated "
|
PREDEFINED = Standard_EXPORT Standard_NODISCARD Standard_OVERRIDE:=override __Standard_API __Draw_API Handle(a):=Handle<a> DEFINE_STANDARD_ALLOC DEFINE_NCOLLECTION_ALLOC
|
||||||
GENERATE_HTML = YES
|
GENERATE_HTML = YES
|
||||||
GENERATE_LATEX = NO
|
GENERATE_LATEX = NO
|
||||||
SEARCH_INCLUDES = YES
|
SEARCH_INCLUDES = YES
|
||||||
|
@@ -48,6 +48,6 @@ LATEX_CMD_NAME = latex
|
|||||||
MAKEINDEX_CMD_NAME = makeindex
|
MAKEINDEX_CMD_NAME = makeindex
|
||||||
|
|
||||||
# Define alias for inserting images in uniform way (both HTML and PDF)
|
# Define alias for inserting images in uniform way (both HTML and PDF)
|
||||||
ALIASES += figure{1}="\image latex \1 \n"
|
ALIASES += figure{1}="\image latex \1"
|
||||||
ALIASES += figure{2}="\image latex \1 \2 \n"
|
ALIASES += figure{2}="\image latex \1 \2"
|
||||||
ALIASES += figure{3}="\image latex \1 \2 width=\3 \n"
|
ALIASES += figure{3}="\image latex \1 \2 width=\3"
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
Draw Test Harness {#occt_user_guides__test_harness}
|
Draw Test Harness {#occt_user_guides__test_harness}
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
@tableofcontents
|
@tableofcontents
|
||||||
@@ -5593,9 +5593,8 @@ Draw provides command to create curves and surfaces by approximation.
|
|||||||
|
|
||||||
* **2dapprox** fits a curve through 2d points;
|
* **2dapprox** fits a curve through 2d points;
|
||||||
* **appro** fits a curve through 3d points;
|
* **appro** fits a curve through 3d points;
|
||||||
* **surfapp** and **grilapp** fit a surface through 3d points by approximation;
|
* **surfapp** and **grilapp** fit a surface through 3d points;
|
||||||
* **surfint** fit a surface through 3d points by interpolation;
|
* **2dinterpolate** interpolates a curve.
|
||||||
* **2dinterpole** interpolates a curve.
|
|
||||||
|
|
||||||
@subsubsection occt_draw_6_8_1 appro, dapprox
|
@subsubsection occt_draw_6_8_1 appro, dapprox
|
||||||
|
|
||||||
@@ -5615,28 +5614,17 @@ Let us pick points and they will be fitted
|
|||||||
2dapprox c 10
|
2dapprox c 10
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|
||||||
@subsubsection occt_draw_6_8_2 surfapp, grilapp, surfint
|
@subsubsection occt_draw_6_8_2 surfapp, grilapp
|
||||||
|
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
~~~~~
|
~~~~~
|
||||||
surfapp name nbupoints nbvpoints x y z ....
|
surfapp name nbupoints nbvpoints x y z ....
|
||||||
or
|
|
||||||
surfapp name nbupoints nbvpoints surf [periodic_flag = 0]
|
|
||||||
grilapp name nbupoints nbvpoints xo dx yo dy z11 z12 ...
|
grilapp name nbupoints nbvpoints xo dx yo dy z11 z12 ...
|
||||||
surfint name surf nbupoints nbvpoints [periodic_flag = 0]
|
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|
||||||
* **surfapp** fits a surface through an array of u and v points, nbupoints*nbvpoints.
|
* **surfapp** fits a surface through an array of u and v points, nbupoints*nbvpoints.
|
||||||
* **grilapp** has the same function, but the x,y coordinates of the points are on a grid starting at x0,y0 with steps dx,dy.
|
* **grilapp** has the same function, but the x,y coordinates of the points are on a grid starting at x0,y0 with steps dx,dy.
|
||||||
* **surfapp** can take array of points from other input surface, if alternative syntax
|
|
||||||
**surfapp** name nbupoints nbvpoints surf [periodic_flag = 0]
|
|
||||||
is used.
|
|
||||||
Both command use for fitting approximation algorithm.
|
|
||||||
**surfint** uses interpolation algorithm and can take array of point only from other input surface.
|
|
||||||
Optional parameter **periodic_flag** allows to get correct periodical surfaces in U direction.
|
|
||||||
U direction of result surface corresponds colums of initial array of points.
|
|
||||||
If **periodic_flag** = 1, algorithm uses first row of array as last row and builds periodical surface.
|
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
~~~~~
|
~~~~~
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
@@ -1341,26 +1341,7 @@ Further, let us consider the triangle \f$ T_{0}\left \langle p_{0}, p_{1}, p_{2}
|
|||||||
<span>10.</span> Compute the center of OBB and its half dimensions.<br>
|
<span>10.</span> Compute the center of OBB and its half dimensions.<br>
|
||||||
<span>11.</span> Create OBB using the center, axes and half dimensions.<br>
|
<span>11.</span> Create OBB using the center, axes and half dimensions.<br>
|
||||||
|
|
||||||
@subsubsection occt_modat_6_1_1_opt Creation of Optimal OBB from set of points
|
This algorithm is implemented in the *Bnd_OBB::ReBuild(...)* method.
|
||||||
|
|
||||||
For creation of the optimal OBB from set of points the same algorithm as described above is used but with some simplifications in logic and increased computation time.
|
|
||||||
For the optimal OBB it is necessary to check all possible axes which can be created by the extremal points. And since the extremal points are only valid for the initial axes it is necessary to project the whole set of points on each axis.
|
|
||||||
This approach usually provides much tighter OBB but the performance is lower. The complexity of the algorithm is still linear and with use of BVH for the set of points it is O(N + C*log(N)).
|
|
||||||
|
|
||||||
Here is the example of optimal and not optimal OBB for the model using the set of 125K nodes:
|
|
||||||
<table align="center">
|
|
||||||
<tr>
|
|
||||||
<td>@figure{/user_guides/modeling_data/images/modeling_data_obb_125K.png,"Not optimal OBB by DiTo-14",160}</td>
|
|
||||||
<td>@figure{/user_guides/modeling_data/images/modeling_data_opt_obb_125K.png,"Optimal OBB by DiTo-14",160}</td>
|
|
||||||
<td>@figure{/user_guides/modeling_data/images/modeling_data_pca_obb_125K.png,"Not optimal OBB by PCA",160}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
Computation of the not optimal OBB in this case took 0.007 sec, optimal - 0.1 sec, which is about 14 times slower. Such performance is comparable to creation of the OBB for this shape by PCA approach (see below) which takes about 0.17 sec.
|
|
||||||
|
|
||||||
The computation of optimal OBB is controlled by the same *theIsOptimal* flag in the BRepBndLib::AddOBB method as for PCA algorithm.
|
|
||||||
|
|
||||||
These algorithms are implemented in the *Bnd_OBB::ReBuild(...)* method.
|
|
||||||
|
|
||||||
@subsubsection occt_modat_6_1_2 Creation of OBB based on Axes of inertia
|
@subsubsection occt_modat_6_1_2 Creation of OBB based on Axes of inertia
|
||||||
|
|
||||||
|
@@ -226,6 +226,8 @@ Selection is implemented as a combination of various algorithms divided among se
|
|||||||
#### SelectBasics
|
#### SelectBasics
|
||||||
|
|
||||||
*SelectBasics* package contains basic classes and interfaces for selection. The most notable are:
|
*SelectBasics* package contains basic classes and interfaces for selection. The most notable are:
|
||||||
|
- *SelectBasics_SensitiveEntity* -- the base definition of a sensitive entity;
|
||||||
|
- *SelectBasics_EntityOwner* -- the base definition of the an entity owner -- the link between the sensitive entity and the object to be selected;
|
||||||
- *SelectBasics_PickResult* -- the structure for storing quantitative results of detection procedure, for example, depth and distance to the center of geometry;
|
- *SelectBasics_PickResult* -- the structure for storing quantitative results of detection procedure, for example, depth and distance to the center of geometry;
|
||||||
- *SelectBasics_SelectingVolumeManager* -- the interface for interaction with the current selection frustum.
|
- *SelectBasics_SelectingVolumeManager* -- the interface for interaction with the current selection frustum.
|
||||||
|
|
||||||
@@ -245,11 +247,9 @@ Each custom sensitive entity must inherit at least *SelectBasics_SensitiveEntity
|
|||||||
- triangulation;
|
- triangulation;
|
||||||
- wire.
|
- wire.
|
||||||
|
|
||||||
Each basic sensitive entity inherits *Select3D_SensitiveEntity*.
|
Each basic sensitive entity inherits *Select3D_SensitiveEntity*, which is a child class of *SelectBasics_SensitiveEntity*.
|
||||||
The package also contains two auxiliary classes, *Select3D_SensitivePoly* and *Select3D_SensitiveSet*.
|
The package also contains two auxiliary classes, *Select3D_SensitivePoly* and *Select3D_SensitiveSet*.
|
||||||
|
|
||||||
*Select3D_SensitiveEntity* -- the base definition of a sensitive entity.
|
|
||||||
|
|
||||||
*Select3D_SensitiveSet* -- a base class for all complex sensitive entities that require the third level BVH usage. It implements traverse of the tree and defines an interface for the methods that check sub-entities.
|
*Select3D_SensitiveSet* -- a base class for all complex sensitive entities that require the third level BVH usage. It implements traverse of the tree and defines an interface for the methods that check sub-entities.
|
||||||
|
|
||||||
*Select3D_SensitivePoly* -- describes an arbitrary point set and implements basic functions for selection. It is important to know that this class does not perform any internal data checks. Hence, custom implementations of sensitive entity inherited from *Select3D_SensitivePoly* must satisfy the terms of Separating Axis Theorem to use standard OCCT overlap detection methods.
|
*Select3D_SensitivePoly* -- describes an arbitrary point set and implements basic functions for selection. It is important to know that this class does not perform any internal data checks. Hence, custom implementations of sensitive entity inherited from *Select3D_SensitivePoly* must satisfy the terms of Separating Axis Theorem to use standard OCCT overlap detection methods.
|
||||||
|
12
genproj
12
genproj
@@ -19,6 +19,10 @@ anOpt2=$2
|
|||||||
anOpt3=$3
|
anOpt3=$3
|
||||||
anOpt4=$4
|
anOpt4=$4
|
||||||
anOpt5=$5
|
anOpt5=$5
|
||||||
|
if [ "$aTarget" == "" ]; then
|
||||||
|
aTarget="cbp"
|
||||||
|
if [ "$aSystem" == "Darwin" ]; then aTarget="xcd"; fi;
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -e "${aScriptPath}/custom.sh" ]; then
|
if [ ! -e "${aScriptPath}/custom.sh" ]; then
|
||||||
tclsh "${aScriptPath}/adm/genconf.tcl"
|
tclsh "${aScriptPath}/adm/genconf.tcl"
|
||||||
@@ -33,14 +37,8 @@ source "${aScriptPath}/custom.sh"
|
|||||||
|
|
||||||
if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
|
if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
|
||||||
|
|
||||||
if [ "$aTarget" == "" ]; then aTarget=$PRJFMT; fi;
|
|
||||||
if [ "$aTarget" == "" ]; then
|
|
||||||
aTarget="cbp"
|
|
||||||
if [ "$aSystem" == "Darwin" ]; then aTarget="xcd"; fi;
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $aScriptPath
|
cd $aScriptPath
|
||||||
tclsh "./adm/start.tcl" genproj ${aTarget} -solution "OCCT" $anOpt2 $anOpt3 $anOpt4 $anOpt5
|
tclsh "./adm/start.tcl" genproj ${aTarget} $anOpt2 $anOpt3 $anOpt4 $anOpt5
|
||||||
|
|
||||||
export PATH="$anOldPath"
|
export PATH="$anOldPath"
|
||||||
export LD_LIBRARY_PATH="$anOldLd"
|
export LD_LIBRARY_PATH="$anOldLd"
|
||||||
|
@@ -49,10 +49,6 @@ if "%aPlatform%" == "" (
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
set aPrjFmt=%PRJFMT%
|
|
||||||
if "%aPrjFmt%" == "" ( set "aPrjFmt=vcxproj" )
|
|
||||||
if "%aPrjFmt%" == "vcxproj" ( set "aPrjFmt=%VCFMT%" )
|
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
%TCL_EXEC% %~dp0adm/start.tcl genproj %aPrjFmt% %aPlatform% -solution "OCCT" %3 %4 %5
|
%TCL_EXEC% %~dp0adm/start.tcl genproj %VCFMT% %aPlatform% %3 %4 %5
|
||||||
SET "PATH=%OLD_PATH%"
|
SET "PATH=%OLD_PATH%"
|
||||||
|
@@ -596,8 +596,8 @@ void GeomConstraints_Presentation::sample3()
|
|||||||
aFileName += "\\points.dat";
|
aFileName += "\\points.dat";
|
||||||
|
|
||||||
// open file
|
// open file
|
||||||
std::ifstream aFile;
|
ifstream aFile;
|
||||||
aFile.open(aFileName.ToCString(), std::ios::failbit);
|
aFile.open(aFileName.ToCString(), ios::failbit);
|
||||||
if(!aFile)
|
if(!aFile)
|
||||||
{
|
{
|
||||||
aFileName += " was not found. The sample can not be shown.";
|
aFileName += " was not found. The sample can not be shown.";
|
||||||
|
@@ -80,7 +80,7 @@ void GeoAlgo_Sol::Build(const TColgp_SequenceOfXYZ& seqOfXYZ)
|
|||||||
|
|
||||||
//Filling plate
|
//Filling plate
|
||||||
Plate_Plate myPlate;
|
Plate_Plate myPlate;
|
||||||
std::cout<<" * Nunber of points = "<< nbPnt << std::endl;
|
cout<<" * Nunber of points = "<< nbPnt << endl;
|
||||||
for (i=1; i<= nbPnt; i++) {
|
for (i=1; i<= nbPnt; i++) {
|
||||||
gp_Pnt ptProj(seqOfXYZ.Value(i).X(), seqOfXYZ.Value(i).Y(), 0. );
|
gp_Pnt ptProj(seqOfXYZ.Value(i).X(), seqOfXYZ.Value(i).Y(), 0. );
|
||||||
gp_Vec aVec( ptProj, seqOfXYZ.Value(i));
|
gp_Vec aVec( ptProj, seqOfXYZ.Value(i));
|
||||||
@@ -90,7 +90,7 @@ void GeoAlgo_Sol::Build(const TColgp_SequenceOfXYZ& seqOfXYZ)
|
|||||||
}
|
}
|
||||||
myPlate.SolveTI(2, 1.);// resolution
|
myPlate.SolveTI(2, 1.);// resolution
|
||||||
if (!myPlate.IsDone()) {
|
if (!myPlate.IsDone()) {
|
||||||
std::cout<<" plate computation has failed"<< std::endl;
|
cout<<" plate computation has failed"<< endl;
|
||||||
myIsDone=Standard_False;
|
myIsDone=Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,11 +144,11 @@ Handle(Geom_BSplineSurface) GeoAlgo_Sol::Read(const Standard_CString aGroundName
|
|||||||
Standard_Integer nbPnt=0;
|
Standard_Integer nbPnt=0;
|
||||||
|
|
||||||
// Read points from the file
|
// Read points from the file
|
||||||
std::filebuf fic;
|
filebuf fic;
|
||||||
std::istream in(&fic);
|
istream in(&fic);
|
||||||
|
|
||||||
if (!fic.open(aGroundName,std::ios::in)){
|
if (!fic.open(aGroundName,ios::in)){
|
||||||
std::cout << " impossible to open a file : "<<aGroundName<<std::endl;
|
cout << " impossible to open a file : "<<aGroundName<<endl;
|
||||||
myIsDone = Standard_False;
|
myIsDone = Standard_False;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -1217,7 +1217,7 @@ Standard_Real ang = D1.Angle(D2); \n\
|
|||||||
Handle(ISession_Direction) aDirection2 = new ISession_Direction(gp_Pnt(0,0,0),D2,3);
|
Handle(ISession_Direction) aDirection2 = new ISession_Direction(gp_Pnt(0,0,0),D2,3);
|
||||||
aDoc->GetAISContext()->Display(aDirection2, Standard_False);
|
aDoc->GetAISContext()->Display(aDirection2, Standard_False);
|
||||||
|
|
||||||
std::cout<<" D1.Angle(D2) : "<<ang<<std::endl;
|
cout<<" D1.Angle(D2) : "<<ang<<endl;
|
||||||
|
|
||||||
TCollection_AsciiString Message2 (ang);
|
TCollection_AsciiString Message2 (ang);
|
||||||
TCollection_AsciiString Message3 (ang/M_PI/180);
|
TCollection_AsciiString Message3 (ang/M_PI/180);
|
||||||
|
@@ -1081,9 +1081,9 @@ void CGeometryDoc::OnCreateSol()
|
|||||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||||
CString filename = dlg.GetPathName();
|
CString filename = dlg.GetPathName();
|
||||||
|
|
||||||
std::filebuf fic;
|
filebuf fic;
|
||||||
std::istream in(&fic);
|
istream in(&fic);
|
||||||
if (!fic.open (filename, std::ios::in))
|
if (!fic.open (filename, ios::in))
|
||||||
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : Unable to open file", L"CasCade Error", MB_ICONERROR);
|
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : Unable to open file", L"CasCade Error", MB_ICONERROR);
|
||||||
|
|
||||||
TColgp_SequenceOfXYZ seqOfXYZ;
|
TColgp_SequenceOfXYZ seqOfXYZ;
|
||||||
@@ -1162,7 +1162,7 @@ void CGeometryDoc::OnSimplify()
|
|||||||
|
|
||||||
std::filebuf aFileBuf;
|
std::filebuf aFileBuf;
|
||||||
std::istream aStream (&aFileBuf);
|
std::istream aStream (&aFileBuf);
|
||||||
if (!aFileBuf.open (initfile, std::ios::in))
|
if (!aFileBuf.open (initfile, ios::in))
|
||||||
{
|
{
|
||||||
initfile += L" was not found. The sample can not be shown.";
|
initfile += L" was not found. The sample can not be shown.";
|
||||||
myCResultDialog.SetText (initfile);
|
myCResultDialog.SetText (initfile);
|
||||||
|
@@ -4949,9 +4949,9 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
|
|||||||
((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Building the tangent surface...");
|
((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Building the tangent surface...");
|
||||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||||
CString filename = dlg.GetPathName();
|
CString filename = dlg.GetPathName();
|
||||||
std::filebuf fic;
|
filebuf fic;
|
||||||
std::istream in(&fic);
|
istream in(&fic);
|
||||||
if (!fic.open(filename, std::ios::in))
|
if (!fic.open(filename, ios::in))
|
||||||
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : Unable to open file", L"CasCade Error", MB_ICONERROR);
|
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : Unable to open file", L"CasCade Error", MB_ICONERROR);
|
||||||
Standard_Real x,y,z;
|
Standard_Real x,y,z;
|
||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
|
@@ -155,6 +155,7 @@ class ISession2D_InteractiveObject;
|
|||||||
class V3d_Viewer;
|
class V3d_Viewer;
|
||||||
class SelectMgr_SelectableObject;
|
class SelectMgr_SelectableObject;
|
||||||
class TCollection_AsciiString;
|
class TCollection_AsciiString;
|
||||||
|
class SelectBasics_EntityOwner;
|
||||||
class gp_Pnt2d;
|
class gp_Pnt2d;
|
||||||
|
|
||||||
//{{AFX_INSERT_LOCATION}}
|
//{{AFX_INSERT_LOCATION}}
|
||||||
|
@@ -233,7 +233,7 @@ void CViewer2dDoc::OnBUTTONTestFace()
|
|||||||
|
|
||||||
std::filebuf aFileBuf;
|
std::filebuf aFileBuf;
|
||||||
std::istream aStream (&aFileBuf);
|
std::istream aStream (&aFileBuf);
|
||||||
if (!aFileBuf.open (dlg.GetPathName(), std::ios::in))
|
if (!aFileBuf.open (dlg.GetPathName(), ios::in))
|
||||||
{
|
{
|
||||||
AfxMessageBox (L"The shape must be not a null Face");
|
AfxMessageBox (L"The shape must be not a null Face");
|
||||||
return;
|
return;
|
||||||
|
@@ -164,7 +164,7 @@ Standard_Boolean TexturesExt_Presentation::loadShape(TopoDS_Shape& aShape,
|
|||||||
|
|
||||||
std::filebuf aFileBuf;
|
std::filebuf aFileBuf;
|
||||||
std::istream aStream (&aFileBuf);
|
std::istream aStream (&aFileBuf);
|
||||||
if (!aFileBuf.open (initfile, std::ios::in))
|
if (!aFileBuf.open (initfile, ios::in))
|
||||||
{
|
{
|
||||||
initfile += L" was not found. The sample can not be shown.";
|
initfile += L" was not found. The sample can not be shown.";
|
||||||
getDocument()->UpdateResultMessageDlg ("Textured Shape", initfile);
|
getDocument()->UpdateResultMessageDlg ("Textured Shape", initfile);
|
||||||
|
@@ -936,7 +936,7 @@ void CViewer3dDoc::DoSample()
|
|||||||
catch (Standard_Failure const& anException)
|
catch (Standard_Failure const& anException)
|
||||||
{
|
{
|
||||||
Standard_SStream aSStream;
|
Standard_SStream aSStream;
|
||||||
aSStream << "An exception was caught: " << anException << std::ends;
|
aSStream << "An exception was caught: " << anException << ends;
|
||||||
CString aMsg = aSStream.str().c_str();
|
CString aMsg = aSStream.str().c_str();
|
||||||
AfxMessageBox (aMsg);
|
AfxMessageBox (aMsg);
|
||||||
}
|
}
|
||||||
|
@@ -925,7 +925,7 @@ void COcafDoc::OnFileSaveAs()
|
|||||||
CWaitCursor aWaitCursor;
|
CWaitCursor aWaitCursor;
|
||||||
CString CSPath = dlg.GetPathName();
|
CString CSPath = dlg.GetPathName();
|
||||||
|
|
||||||
std::cout << "Save As " << CSPath << std::endl;
|
cout << "Save As " << CSPath << endl;
|
||||||
PathName=CSPath;
|
PathName=CSPath;
|
||||||
const wchar_t* SPath = CSPath;
|
const wchar_t* SPath = CSPath;
|
||||||
TCollection_ExtendedString TPath (SPath);
|
TCollection_ExtendedString TPath (SPath);
|
||||||
|
@@ -76,7 +76,7 @@ Standard_Boolean TOcafFunction_CutDriver::MustExecute(const Handle(TFunction_Log
|
|||||||
*/
|
*/
|
||||||
TCollection_AsciiString aEntry;
|
TCollection_AsciiString aEntry;
|
||||||
TDF_Tool::Entry(Label(), aEntry);
|
TDF_Tool::Entry(Label(), aEntry);
|
||||||
std::cout << "Entry: "<<aEntry.ToCString()<<std::endl;
|
cout << "Entry: "<<aEntry.ToCString()<<endl;
|
||||||
Label().FindChild(1).FindAttribute(TDF_Reference::GetID(),OriginalRef);
|
Label().FindChild(1).FindAttribute(TDF_Reference::GetID(),OriginalRef);
|
||||||
if (log->IsModified(OriginalRef->Get())) return Standard_True; // Original shape.
|
if (log->IsModified(OriginalRef->Get())) return Standard_True; // Original shape.
|
||||||
|
|
||||||
|
@@ -425,7 +425,7 @@ void Tesselate_Presentation::sample(const Standard_CString aFileName)
|
|||||||
|
|
||||||
std::filebuf aFileBuf;
|
std::filebuf aFileBuf;
|
||||||
std::istream aStream (&aFileBuf);
|
std::istream aStream (&aFileBuf);
|
||||||
if (!aFileBuf.open (initfile, std::ios::in))
|
if (!aFileBuf.open (initfile, ios::in))
|
||||||
{
|
{
|
||||||
initfile += L" was not found. The sample can not be shown.";
|
initfile += L" was not found. The sample can not be shown.";
|
||||||
GetDocument()->PocessTextInDialog ("Compute the triangulation on a shape", initfile);
|
GetDocument()->PocessTextInDialog ("Compute the triangulation on a shape", initfile);
|
||||||
|
@@ -349,7 +349,7 @@ void CTriangulationDoc::DoSample()
|
|||||||
catch (Standard_Failure const& anException)
|
catch (Standard_Failure const& anException)
|
||||||
{
|
{
|
||||||
Standard_SStream aSStream;
|
Standard_SStream aSStream;
|
||||||
aSStream << "An exception was caught: " << anException << std::ends;
|
aSStream << "An exception was caught: " << anException << ends;
|
||||||
CString aMsg = aSStream.str().c_str();
|
CString aMsg = aSStream.str().c_str();
|
||||||
// aSStream.rdbuf()->freeze(0); // allow deletion of dynamic array
|
// aSStream.rdbuf()->freeze(0); // allow deletion of dynamic array
|
||||||
AfxMessageBox (aMsg);
|
AfxMessageBox (aMsg);
|
||||||
|
@@ -83,35 +83,35 @@ CAnimationDoc::CAnimationDoc()
|
|||||||
std::filebuf aFileBuf;
|
std::filebuf aFileBuf;
|
||||||
std::istream aStream (&aFileBuf);
|
std::istream aStream (&aFileBuf);
|
||||||
CString aPathCrankArm = aDataDirPath + "\\CrankArm.rle";
|
CString aPathCrankArm = aDataDirPath + "\\CrankArm.rle";
|
||||||
if (aFileBuf.open (aPathCrankArm, std::ios::in))
|
if (aFileBuf.open (aPathCrankArm, ios::in))
|
||||||
{
|
{
|
||||||
BRepTools::Read (CrankArm, aStream, B);
|
BRepTools::Read (CrankArm, aStream, B);
|
||||||
aFileBuf.close();
|
aFileBuf.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
CString aPathCylinderHead = aDataDirPath + "\\CylinderHead.rle";
|
CString aPathCylinderHead = aDataDirPath + "\\CylinderHead.rle";
|
||||||
if (aFileBuf.open (aPathCylinderHead, std::ios::in))
|
if (aFileBuf.open (aPathCylinderHead, ios::in))
|
||||||
{
|
{
|
||||||
BRepTools::Read (CylinderHead, aStream, B);
|
BRepTools::Read (CylinderHead, aStream, B);
|
||||||
aFileBuf.close();
|
aFileBuf.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
CString aPathPropeller = aDataDirPath + "\\Propeller.rle";
|
CString aPathPropeller = aDataDirPath + "\\Propeller.rle";
|
||||||
if (aFileBuf.open (aPathPropeller, std::ios::in))
|
if (aFileBuf.open (aPathPropeller, ios::in))
|
||||||
{
|
{
|
||||||
BRepTools::Read (Propeller, aStream, B);
|
BRepTools::Read (Propeller, aStream, B);
|
||||||
aFileBuf.close();
|
aFileBuf.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
CString aPathPiston = aDataDirPath + "\\Piston.rle";
|
CString aPathPiston = aDataDirPath + "\\Piston.rle";
|
||||||
if (aFileBuf.open (aPathPiston, std::ios::in))
|
if (aFileBuf.open (aPathPiston, ios::in))
|
||||||
{
|
{
|
||||||
BRepTools::Read (Piston, aStream, B);
|
BRepTools::Read (Piston, aStream, B);
|
||||||
aFileBuf.close();
|
aFileBuf.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
CString aPathEngineBlock = aDataDirPath + "\\EngineBlock.rle";
|
CString aPathEngineBlock = aDataDirPath + "\\EngineBlock.rle";
|
||||||
if (aFileBuf.open (aPathEngineBlock, std::ios::in))
|
if (aFileBuf.open (aPathEngineBlock, ios::in))
|
||||||
{
|
{
|
||||||
BRepTools::Read (EngineBlock, aStream, B);
|
BRepTools::Read (EngineBlock, aStream, B);
|
||||||
aFileBuf.close();
|
aFileBuf.close();
|
||||||
|
@@ -49,7 +49,7 @@ Handle(TColStd_HArray2OfReal) ReadRegularGrid(CString FileName,
|
|||||||
if (fp)
|
if (fp)
|
||||||
{
|
{
|
||||||
fscanf_s(fp, "%d %d", &R2, &C2);
|
fscanf_s(fp, "%d %d", &R2, &C2);
|
||||||
std::cout << "Reading Grid : ( " << R2 << " , " << C2 << " )." << std::endl;
|
cout << "Reading Grid : ( " << R2 << " , " << C2 << " )." << endl;
|
||||||
|
|
||||||
H = new TColStd_HArray2OfReal(C1, C2, R1, R2);
|
H = new TColStd_HArray2OfReal(C1, C2, R1, R2);
|
||||||
|
|
||||||
@@ -83,14 +83,14 @@ Handle(TColStd_HArray2OfReal) ReadRegularGrid(CString FileName,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "Deltax = " << Deltax << std::endl;
|
cout << "Deltax = " << Deltax << endl;
|
||||||
std::cout << "Deltay = " << Deltay << std::endl;
|
cout << "Deltay = " << Deltay << endl;
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << "cannot open file : " << FileName << std::endl;
|
cout << "cannot open file : " << FileName << endl;
|
||||||
}
|
}
|
||||||
return H;
|
return H;
|
||||||
}
|
}
|
||||||
|
@@ -153,7 +153,7 @@ void COCCDemoDoc::DoSample()
|
|||||||
catch (Standard_Failure const& anException)
|
catch (Standard_Failure const& anException)
|
||||||
{
|
{
|
||||||
Standard_SStream aSStream;
|
Standard_SStream aSStream;
|
||||||
aSStream << "An exception was caught: " << anException << std::ends;
|
aSStream << "An exception was caught: " << anException << ends;
|
||||||
CString aMsg = aSStream.str().c_str();
|
CString aMsg = aSStream.str().c_str();
|
||||||
AfxMessageBox (aMsg);
|
AfxMessageBox (aMsg);
|
||||||
}
|
}
|
||||||
|
@@ -17,8 +17,7 @@ void ISession2D_Shape::Add(const TopoDS_Shape& aShape)
|
|||||||
myListOfShape.Append(aShape);
|
myListOfShape.Append(aShape);
|
||||||
myAlgo.Nullify();
|
myAlgo.Nullify();
|
||||||
myPolyAlgo.Nullify();
|
myPolyAlgo.Nullify();
|
||||||
SetToUpdate();
|
Update(); // protected method used to specify that the presentation are not up to date
|
||||||
UpdatePresentations();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISession2D_Shape::Remove (const TopoDS_Shape& theShape)
|
void ISession2D_Shape::Remove (const TopoDS_Shape& theShape)
|
||||||
@@ -43,17 +42,23 @@ void ISession2D_Shape::SetProjector (HLRAlgo_Projector& aProjector)
|
|||||||
myProjector= aProjector;
|
myProjector= aProjector;
|
||||||
myAlgo.Nullify();
|
myAlgo.Nullify();
|
||||||
myPolyAlgo.Nullify();
|
myPolyAlgo.Nullify();
|
||||||
SetToUpdate();
|
Update(); // protected method used to specify that the presentation are not up to date
|
||||||
UpdatePresentations();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void ISession2D_Shape::SetNbIsos(Standard_Integer& aNbIsos)
|
void ISession2D_Shape::SetNbIsos(Standard_Integer& aNbIsos)
|
||||||
{
|
{
|
||||||
myNbIsos= aNbIsos;
|
myNbIsos= aNbIsos;
|
||||||
myAlgo.Nullify();
|
myAlgo.Nullify();
|
||||||
SetToUpdate();
|
|
||||||
UpdatePresentations();
|
// declare the mode 100 to 110 as non valid
|
||||||
|
for (int i=100;i<=110;i++)
|
||||||
|
Update(i,Standard_False); // protected method used to specify that the presentation are not up to date
|
||||||
|
|
||||||
|
// declare the mode 1100 to 1110 as non valid
|
||||||
|
for (int i=1100;i<=1110;i++)
|
||||||
|
Update(i,Standard_False); // protected method used to specify that the presentation are not up to date
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void ISession2D_Shape::BuildAlgo()
|
void ISession2D_Shape::BuildAlgo()
|
||||||
|
@@ -156,7 +156,7 @@ Standard_Boolean CImportExport::ReadBREP(CString aFileName,
|
|||||||
|
|
||||||
std::filebuf aFileBuf;
|
std::filebuf aFileBuf;
|
||||||
std::istream aStream (&aFileBuf);
|
std::istream aStream (&aFileBuf);
|
||||||
if (!aFileBuf.open (aFileName, std::ios::in))
|
if (!aFileBuf.open (aFileName, ios::in))
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
@@ -230,7 +230,7 @@ Standard_Boolean CImportExport::SaveBREP (CString aFileName,
|
|||||||
{
|
{
|
||||||
std::filebuf aFileBuf;
|
std::filebuf aFileBuf;
|
||||||
std::ostream aStream (&aFileBuf);
|
std::ostream aStream (&aFileBuf);
|
||||||
if (!aFileBuf.open (aFileName, std::ios::out))
|
if (!aFileBuf.open (aFileName, ios::out))
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
@@ -811,7 +811,7 @@ Standard_Boolean CImportExport::SaveVRML(const Standard_CString&
|
|||||||
} // iterator of shapes
|
} // iterator of shapes
|
||||||
|
|
||||||
// Call VRML writer
|
// Call VRML writer
|
||||||
std::ofstream writer(aFileName);
|
ofstream writer(aFileName);
|
||||||
writer<<scene;
|
writer<<scene;
|
||||||
writer.close();
|
writer.close();
|
||||||
|
|
||||||
|
@@ -79,10 +79,10 @@ case 6: //color
|
|||||||
Handle(Graphic3d_Group) mygroup = Prs3d_Root::CurrentGroup(aPresentation);
|
Handle(Graphic3d_Group) mygroup = Prs3d_Root::CurrentGroup(aPresentation);
|
||||||
myAspect = (new Prs3d_ShadingAspect())->Aspect();
|
myAspect = (new Prs3d_ShadingAspect())->Aspect();
|
||||||
Graphic3d_MaterialAspect material = myAspect->FrontMaterial();
|
Graphic3d_MaterialAspect material = myAspect->FrontMaterial();
|
||||||
material.SetAmbientColor (Quantity_NOC_BLACK);
|
material.SetReflectionModeOff(Graphic3d_TOR_AMBIENT);
|
||||||
material.SetDiffuseColor (Quantity_NOC_BLACK);
|
material.SetReflectionModeOff(Graphic3d_TOR_DIFFUSE);
|
||||||
material.SetSpecularColor(Quantity_NOC_BLACK);
|
material.SetReflectionModeOff(Graphic3d_TOR_SPECULAR);
|
||||||
material.SetEmissiveColor(Quantity_NOC_BLACK);
|
material.SetReflectionModeOff(Graphic3d_TOR_EMISSION);
|
||||||
myAspect->SetFrontMaterial(material);
|
myAspect->SetFrontMaterial(material);
|
||||||
|
|
||||||
mygroup->SetPrimitivesAspect(myAspect);
|
mygroup->SetPrimitivesAspect(myAspect);
|
||||||
@@ -129,7 +129,7 @@ case 6: //color
|
|||||||
// This triangulation is computed with the deflection myDeflection.
|
// This triangulation is computed with the deflection myDeflection.
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
std::cout <<"Deflection = " << myDeflection << "\n" << std::endl;
|
cout <<"Deflection = " << myDeflection << "\n" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Standard_Integer NumFace;
|
Standard_Integer NumFace;
|
||||||
@@ -145,7 +145,7 @@ case 6: //color
|
|||||||
TopLoc_Location myLocation = myFace.Location();
|
TopLoc_Location myLocation = myFace.Location();
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
std::cout << "J\'explore actuellement la face " << NumFace << "\n" << std::endl;
|
cout << "J\'explore actuellement la face " << NumFace << "\n" << endl;
|
||||||
#endif
|
#endif
|
||||||
Handle(Poly_Triangulation) myT = BRep_Tool::Triangulation(myFace, myLocation);
|
Handle(Poly_Triangulation) myT = BRep_Tool::Triangulation(myFace, myLocation);
|
||||||
// Returns the Triangulation of the face. It is a null handle if there is no triangulation.
|
// Returns the Triangulation of the face. It is a null handle if there is no triangulation.
|
||||||
@@ -153,7 +153,7 @@ case 6: //color
|
|||||||
if (myT.IsNull())
|
if (myT.IsNull())
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
// std::cout << "Triangulation of the face "<< i <<" is null \n"<< std::endl;
|
// cout << "Triangulation of the face "<< i <<" is null \n"<< endl;
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -200,7 +200,7 @@ case 6: //color
|
|||||||
TopLoc_Location myLocation = myFace.Location();
|
TopLoc_Location myLocation = myFace.Location();
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
std::cout << "J\'explore actuellement la face " << NumFace << "\n" << std::endl;
|
cout << "J\'explore actuellement la face " << NumFace << "\n" << endl;
|
||||||
#endif
|
#endif
|
||||||
Handle(Poly_Triangulation) myT = BRep_Tool::Triangulation(myFace, myLocation);
|
Handle(Poly_Triangulation) myT = BRep_Tool::Triangulation(myFace, myLocation);
|
||||||
// Returns the Triangulation of the face. It is a null handle if there is no triangulation.
|
// Returns the Triangulation of the face. It is a null handle if there is no triangulation.
|
||||||
@@ -208,7 +208,7 @@ case 6: //color
|
|||||||
if (myT.IsNull())
|
if (myT.IsNull())
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
//std::cout << "Triangulation of the face "<< i <<" is null \n"<< std::endl;
|
//cout << "Triangulation of the face "<< i <<" is null \n"<< endl;
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -255,7 +255,7 @@ case 6: //color
|
|||||||
for (nt = 1; nt <= nnn; nt++)
|
for (nt = 1; nt <= nnn; nt++)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
std::cout << "On traite actuellement le triangle : "<< nt <<"\n";
|
cout << "On traite actuellement le triangle : "<< nt <<"\n";
|
||||||
#endif
|
#endif
|
||||||
if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed"
|
if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed"
|
||||||
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
|
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
|
||||||
|
@@ -50,7 +50,7 @@ int AFXAPI AfxWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
|||||||
// int i = setvbuf( stdout, NULL, _IONBF, 0 );
|
// int i = setvbuf( stdout, NULL, _IONBF, 0 );
|
||||||
// filebuf ff(hCrt);
|
// filebuf ff(hCrt);
|
||||||
// cout = &ff;
|
// cout = &ff;
|
||||||
std::cout<<"This Debug Window is defined in WinMain.cpp and will disappear in release mode"<<std::endl;
|
cout<<"This Debug Window is defined in WinMain.cpp and will disappear in release mode"<<endl;
|
||||||
|
|
||||||
#endif // DISPLAYCONSOLE // By Matra
|
#endif // DISPLAYCONSOLE // By Matra
|
||||||
|
|
||||||
|
@@ -354,7 +354,7 @@ static void Sample()
|
|||||||
|
|
||||||
Standard_Boolean isverified = constraint->Verified();
|
Standard_Boolean isverified = constraint->Verified();
|
||||||
if( !isverified ) {
|
if( !isverified ) {
|
||||||
std::cout << "Constraint is not valid" << std::endl;
|
cout << "Constraint is not valid" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -308,7 +308,7 @@ void Sample()
|
|||||||
BRepAlgo_Cut mkCUT (OBJECT, TOOL);
|
BRepAlgo_Cut mkCUT (OBJECT, TOOL);
|
||||||
|
|
||||||
if (!mkCUT.IsDone()) {
|
if (!mkCUT.IsDone()) {
|
||||||
std::cout << "CUT: Algorithm failed" << std::endl;
|
cout << "CUT: Algorithm failed" << endl;
|
||||||
return;
|
return;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
@@ -318,7 +318,7 @@ void Sample()
|
|||||||
|
|
||||||
if (!BRepAlgo::IsValid(Larg, mkCUT.Shape(), Standard_True, Standard_False)) {
|
if (!BRepAlgo::IsValid(Larg, mkCUT.Shape(), Standard_True, Standard_False)) {
|
||||||
|
|
||||||
std::cout << "CUT: Result is not valid" << std::endl;
|
cout << "CUT: Result is not valid" << endl;
|
||||||
return;
|
return;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
@@ -101,9 +101,9 @@ static void Sample()
|
|||||||
Handle(TPrsStd_NamedShapeDriver) driver;
|
Handle(TPrsStd_NamedShapeDriver) driver;
|
||||||
|
|
||||||
if( table->FindDriver(driverguid, driver) )
|
if( table->FindDriver(driverguid, driver) )
|
||||||
std::cout << "Driver was found " << std::endl;
|
cout << "Driver was found " << endl;
|
||||||
else
|
else
|
||||||
std::cout << "Driver wasn't found" << std::endl;
|
cout << "Driver wasn't found" << endl;
|
||||||
|
|
||||||
// Driver can be used to build AIS_InteractiveObject for presenting the given label
|
// Driver can be used to build AIS_InteractiveObject for presenting the given label
|
||||||
|
|
||||||
|
@@ -214,7 +214,7 @@ void MainWindow::compute()
|
|||||||
}
|
}
|
||||||
|
|
||||||
aTimer.Show(seconds, minutes, hours, CPUTime);
|
aTimer.Show(seconds, minutes, hours, CPUTime);
|
||||||
std::cout << "Execution of "<<graph->getNbThreads()<< " threads took " << hours << " hours, " << minutes << " minutes, " << seconds << " seconds" << std::endl;
|
cout << "Execution of "<<graph->getNbThreads()<< " threads took " << hours << " hours, " << minutes << " minutes, " << seconds << " seconds" << endl;
|
||||||
|
|
||||||
// Redraw the nodes (change their colour).
|
// Redraw the nodes (change their colour).
|
||||||
redrawGraph();
|
redrawGraph();
|
||||||
|
@@ -340,7 +340,7 @@ TranslateDlg* Translate::getDialog( const int format, const bool import )
|
|||||||
filter.append( "\t" );
|
filter.append( "\t" );
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << filter.toLatin1().constData() << std::endl;
|
cout << filter.toLatin1().constData() << endl;
|
||||||
QStringList filters = filter.split( "\t" );
|
QStringList filters = filter.split( "\t" );
|
||||||
myDlg->setNameFilters ( filters );
|
myDlg->setNameFilters ( filters );
|
||||||
|
|
||||||
|
@@ -264,11 +264,11 @@ bfuse _model _model t_s
|
|||||||
explode _model e
|
explode _model e
|
||||||
|
|
||||||
# Make a weld at joint edges of platform and wedge
|
# Make a weld at joint edges of platform and wedge
|
||||||
|
blend _model _model 2 _model_26
|
||||||
blend _model _model 2 _model_27
|
blend _model _model 2 _model_27
|
||||||
blend _model _model 2 _model_28
|
blend _model _model 2 _model_28
|
||||||
blend _model _model 2 _model_29
|
blend _model _model 2 _model_29
|
||||||
blend _model _model 2 _model_30
|
blend _model _model 2 _model_31
|
||||||
blend _model _model 2 _model_32
|
|
||||||
|
|
||||||
# Cylinder on wedge
|
# Cylinder on wedge
|
||||||
blend result _model 2 _model_161
|
blend result _model 2 _model_161
|
||||||
@@ -276,7 +276,7 @@ blend result _model 2 _model_161
|
|||||||
# Show result
|
# Show result
|
||||||
pload VISUALIZATION
|
pload VISUALIZATION
|
||||||
vinit Driver1/Viewer1/View1
|
vinit Driver1/Viewer1/View1
|
||||||
vbackground -color 0.784314 0.784314 1
|
vsetcolorbg 200 200 255
|
||||||
vdisplay -dispMode 1 result
|
vdisplay -dispMode 1 result
|
||||||
vfit
|
vfit
|
||||||
vaspects result -setFaceBoundaryDraw 1 -mostContinuity c2
|
vaspects result -setFaceBoundaryDraw 1 -mostContinuity c2
|
||||||
|
@@ -262,7 +262,7 @@ unifysamedom result p_1
|
|||||||
# Show result
|
# Show result
|
||||||
pload VISUALIZATION
|
pload VISUALIZATION
|
||||||
vinit Driver1/Viewer1/View1
|
vinit Driver1/Viewer1/View1
|
||||||
vbackground -color 0.784314 0.784314 1
|
vsetcolorbg 200 200 255
|
||||||
vdisplay -dispMode 1 result
|
vdisplay -dispMode 1 result
|
||||||
vfit
|
vfit
|
||||||
vaspects result -setFaceBoundaryDraw 1
|
vaspects result -setFaceBoundaryDraw 1
|
||||||
|
@@ -53,7 +53,7 @@ for {set i 1} {$i <= 1} {incr i} {
|
|||||||
|
|
||||||
# prepare a view
|
# prepare a view
|
||||||
vinit Penrose w=1024 h=512
|
vinit Penrose w=1024 h=512
|
||||||
vbackground -color WHITE
|
vsetcolorbg 255 255 255
|
||||||
vrenderparams -rayTrace -fsaa on -reflections off -shadows off
|
vrenderparams -rayTrace -fsaa on -reflections off -shadows off
|
||||||
|
|
||||||
# set camera position and adjust lights
|
# set camera position and adjust lights
|
||||||
|
@@ -19,7 +19,7 @@ restore $aBotLoc b
|
|||||||
vinit View1 w=768 h=768
|
vinit View1 w=768 h=768
|
||||||
vclear
|
vclear
|
||||||
vsetdispmode 0
|
vsetdispmode 0
|
||||||
vbackground -color WHITE
|
vsetcolorbg 255 255 255
|
||||||
vbottom
|
vbottom
|
||||||
|
|
||||||
puts "Getting cut projection..."
|
puts "Getting cut projection..."
|
||||||
|
@@ -1,90 +0,0 @@
|
|||||||
# The following example constructs a 3D object looking like new OCC logo on top view.
|
|
||||||
#
|
|
||||||
#Category: Modeling
|
|
||||||
#Title: OCC Logo 2019
|
|
||||||
|
|
||||||
pload MODELING VISUALIZATION XDE OCAF
|
|
||||||
|
|
||||||
# spheric body
|
|
||||||
psphere s 1
|
|
||||||
box b 0 0 -2 1.5 1.5 4
|
|
||||||
bcut sb s b
|
|
||||||
|
|
||||||
# toroidal handle
|
|
||||||
ptorus t 1 0.5
|
|
||||||
trotate t 0 0 0 0 0 1 -90
|
|
||||||
ttranslate t 1.5 1.5 0
|
|
||||||
bcut tb t b
|
|
||||||
|
|
||||||
pcylinder p1 0.5 0.5
|
|
||||||
trotate p1 0 0 0 0 0 1 180
|
|
||||||
trotate p1 0 0 0 1 0 0 90
|
|
||||||
ttranslate p1 0.5 1.5 0
|
|
||||||
|
|
||||||
pcylinder p2 0.5 0.5
|
|
||||||
trotate p2 0 0 0 0 0 1 180
|
|
||||||
trotate p2 0 0 0 1 0 0 90
|
|
||||||
trotate p2 0 0 0 0 0 1 90
|
|
||||||
ttranslate p2 1 0.5 0
|
|
||||||
|
|
||||||
bfuse tp tb p1
|
|
||||||
bfuse tp tp p2
|
|
||||||
|
|
||||||
# intermediate part
|
|
||||||
|
|
||||||
# - get surfaces and edges on half of spheric and toroidal parts for filling
|
|
||||||
box b -2 -2 -2 4 4 2
|
|
||||||
bcut sbh sb b
|
|
||||||
bcut tph tp b
|
|
||||||
unset b
|
|
||||||
|
|
||||||
explode sbh f
|
|
||||||
renamevar sbh_1 sbf
|
|
||||||
explode sbf e
|
|
||||||
|
|
||||||
explode tph f
|
|
||||||
renamevar tph_2 tpf1
|
|
||||||
renamevar tph_13 tpf2
|
|
||||||
explode tpf1 e
|
|
||||||
explode tpf2 e
|
|
||||||
|
|
||||||
# - make curved surface by plate
|
|
||||||
#plate r 0 4 tpf1_1 tpf1 1 tpf2_3 tpf2 1 sbf_2 sbf 1 sbf_4 sbf 1
|
|
||||||
approxplate r1 0 4 tpf1_1 tpf1 0 tpf2_1 tpf2 0 sbf_2 sbf 0 sbf_4 sbf 0 0.00001 100 3 0
|
|
||||||
|
|
||||||
# - make solid
|
|
||||||
tcopy r1 r2
|
|
||||||
tmirror r2 0 0 0 0 0 1
|
|
||||||
explode sb f
|
|
||||||
explode tp f
|
|
||||||
sewing rr 0.001 r1 r2 sb_2 sb_3 tp_2 tp_5
|
|
||||||
ssolid rr rs
|
|
||||||
|
|
||||||
# rotate all solids by 45 deg to have standard orientation of the logo on top view
|
|
||||||
trotate sb 0 0 0 0 0 1 -45
|
|
||||||
trotate tp 0 0 0 0 0 1 -45
|
|
||||||
trotate rs 0 0 0 0 0 1 -45
|
|
||||||
|
|
||||||
# create XDE document
|
|
||||||
catch {Close D}
|
|
||||||
XNewDoc D
|
|
||||||
set main [XNewShape D]
|
|
||||||
XAddComponent D $main sb
|
|
||||||
XAddComponent D $main tp
|
|
||||||
XAddComponent D $main rs
|
|
||||||
XUpdateAssemblies D
|
|
||||||
SetName D $main "OCC Logo 2019"
|
|
||||||
SetName D [XFindShape D sb] "Core"
|
|
||||||
SetName D [XFindShape D tp] "Loop"
|
|
||||||
SetName D [XFindShape D rs] "Connector"
|
|
||||||
XSetColor D sb 1 0.21 0.32
|
|
||||||
XSetColor D tp 0 0.667 0.855
|
|
||||||
XSetColor D rs 0 0.45 0.69
|
|
||||||
|
|
||||||
# display
|
|
||||||
vinit
|
|
||||||
vsetcolorbg 1 1 1
|
|
||||||
vsetdispmode 1
|
|
||||||
XDisplay D
|
|
||||||
vtop
|
|
||||||
vfit
|
|
@@ -51,7 +51,7 @@ proc drawObjects {theRow theColor} {
|
|||||||
uplevel #0 box $aBox $aCtr $aCtr $aCtr $aSize $aSize $aSize
|
uplevel #0 box $aBox $aCtr $aCtr $aCtr $aSize $aSize $aSize
|
||||||
uplevel #0 ttranslate $aSph $x $y 0
|
uplevel #0 ttranslate $aSph $x $y 0
|
||||||
uplevel #0 ttranslate $aBox [expr $x + 10] $y 0
|
uplevel #0 ttranslate $aBox [expr $x + 10] $y 0
|
||||||
uplevel #0 vdisplay -noredraw -dispMode 1 $aSph $aBox
|
uplevel #0 vdisplay -noredraw $aSph $aBox
|
||||||
uplevel #0 vsetmaterial -noredraw $aSph $aBox $aMatIter
|
uplevel #0 vsetmaterial -noredraw $aSph $aBox $aMatIter
|
||||||
if {$theColor != ""} {
|
if {$theColor != ""} {
|
||||||
uplevel #0 vsetcolor -noredraw $aSph $aBox $theColor
|
uplevel #0 vsetcolor -noredraw $aSph $aBox $theColor
|
||||||
@@ -64,19 +64,21 @@ proc drawObjects {theRow theColor} {
|
|||||||
# setup 3D viewer content
|
# setup 3D viewer content
|
||||||
pload MODELING VISUALIZATION
|
pload MODELING VISUALIZATION
|
||||||
|
|
||||||
vclear
|
catch { vclose View1 }
|
||||||
vclose ALL
|
|
||||||
vinit View1 w=768 h=768
|
vinit View1 w=768 h=768
|
||||||
|
vclear
|
||||||
vtop
|
vtop
|
||||||
vglinfo
|
vglinfo
|
||||||
vbackground -gradient 0.705882 0.784314 1 0.705882 0.705882 0.705882 -gradientMode VERTICAL
|
vsetgradientbg 180 200 255 180 180 180 2
|
||||||
|
|
||||||
vlight -change 0 -dir 0.577 -0.577 -0.577
|
vlight -change 0 -dir 0.577 -0.577 -0.577
|
||||||
|
vsetdispmode 1
|
||||||
vrenderparams -msaa 8
|
vrenderparams -msaa 8
|
||||||
|
|
||||||
# adjust scene bounding box
|
# adjust scene bounding box
|
||||||
box bnd 0 0 0 180 210 1
|
box bnd 0 0 0 180 210 1
|
||||||
vdisplay -noredraw -dispMode 0 bnd
|
vdisplay -noredraw bnd
|
||||||
|
vsetdispmode bnd 0
|
||||||
vfit
|
vfit
|
||||||
vremove -noredraw bnd
|
vremove -noredraw bnd
|
||||||
|
|
||||||
@@ -86,4 +88,5 @@ drawObjects 0 ""
|
|||||||
drawObjects 1 red
|
drawObjects 1 red
|
||||||
drawObjects 2 green
|
drawObjects 2 green
|
||||||
drawObjects 3 blue1
|
drawObjects 3 blue1
|
||||||
vrepaint
|
#vfit
|
||||||
|
vzfit
|
||||||
|
@@ -75,4 +75,4 @@ vrenderparams -ray -gi -rayDepth 10
|
|||||||
puts "Make several path tracing iterations to refine the picture, please wait..."
|
puts "Make several path tracing iterations to refine the picture, please wait..."
|
||||||
vfps 100
|
vfps 100
|
||||||
puts "Done. To improve the image further, or after view manipulations, give command:"
|
puts "Done. To improve the image further, or after view manipulations, give command:"
|
||||||
puts "vfps \[nb_iteratons\] or vrepaint -continuous"
|
puts "vfps \[nb_iteratons\]"
|
||||||
|
@@ -85,4 +85,4 @@ vrenderparams -ray -gi -rayDepth 8
|
|||||||
puts "Make several path tracing iterations to refine the picture, please wait..."
|
puts "Make several path tracing iterations to refine the picture, please wait..."
|
||||||
vfps 100
|
vfps 100
|
||||||
puts "Done. To improve the image further, or after view manipulations, give command:"
|
puts "Done. To improve the image further, or after view manipulations, give command:"
|
||||||
puts "vfps \[nb_iteratons\] or vrepaint -continuous"
|
puts "vfps \[nb_iteratons\]"
|
||||||
|
@@ -223,4 +223,4 @@ vrenderparams -ray -gi -rayDepth 10
|
|||||||
puts "Make several path tracing iterations to refine the picture, please wait..."
|
puts "Make several path tracing iterations to refine the picture, please wait..."
|
||||||
vfps 512
|
vfps 512
|
||||||
puts "Done. To improve the image further, or after view manipulations, give command:"
|
puts "Done. To improve the image further, or after view manipulations, give command:"
|
||||||
puts "vfps \[nb_iteratons\] or vrepaint -continuous"
|
puts "vfps \[nb_iteratons\]"
|
||||||
|
@@ -59,7 +59,7 @@ XShow D
|
|||||||
vfit
|
vfit
|
||||||
vsetdispmode 1
|
vsetdispmode 1
|
||||||
vrenderparams -msaa 8
|
vrenderparams -msaa 8
|
||||||
vbackground -color WHITE
|
vsetcolorbg 255 255 255
|
||||||
|
|
||||||
#param write.iges.brep.mode 1
|
#param write.iges.brep.mode 1
|
||||||
#WriteIges D d:/pencil3.igs
|
#WriteIges D d:/pencil3.igs
|
||||||
|
@@ -30,7 +30,7 @@ vsettransparency glass 0.6
|
|||||||
vlight new spot pos -100 -100 300
|
vlight new spot pos -100 -100 300
|
||||||
|
|
||||||
# set white background and fit view
|
# set white background and fit view
|
||||||
vbackground -color WHITE
|
vsetcolorbg 255 255 255
|
||||||
vfit
|
vfit
|
||||||
|
|
||||||
# set ray tracing
|
# set ray tracing
|
||||||
|
@@ -129,7 +129,7 @@ vrenderparams -msaa 8
|
|||||||
vsetcolor snowflake 0 0 0
|
vsetcolor snowflake 0 0 0
|
||||||
vsetcolor lines 0 0 0
|
vsetcolor lines 0 0 0
|
||||||
vsetcolor text 0 0 0
|
vsetcolor text 0 0 0
|
||||||
vbackground -color WHITE
|
vsetcolorbg 255 255 255
|
||||||
vtop
|
vtop
|
||||||
vfit
|
vfit
|
||||||
|
|
||||||
|
@@ -273,7 +273,7 @@ Standard_Boolean MainPage::SaveBREP(const wchar_t* theFilePath, const TopoDS_Sha
|
|||||||
std::filebuf aFileBuf;
|
std::filebuf aFileBuf;
|
||||||
std::ostream aStream(&aFileBuf);
|
std::ostream aStream(&aFileBuf);
|
||||||
|
|
||||||
if (!aFileBuf.open(theFilePath, std::ios::out)) {
|
if (!aFileBuf.open(theFilePath, ios::out)) {
|
||||||
Output_TextBlock->Text += L"Error: cannot open file for export (brep)\n";
|
Output_TextBlock->Text += L"Error: cannot open file for export (brep)\n";
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
@@ -291,7 +291,7 @@ Standard_Boolean MainPage::SaveIGES(const wchar_t* theFilePath, const TopoDS_Sha
|
|||||||
std::filebuf aFileBuf;
|
std::filebuf aFileBuf;
|
||||||
std::ostream aStream(&aFileBuf);
|
std::ostream aStream(&aFileBuf);
|
||||||
|
|
||||||
if (!aFileBuf.open(theFilePath, std::ios::out)) {
|
if (!aFileBuf.open(theFilePath, ios::out)) {
|
||||||
Output_TextBlock->Text += L"Error: cannot open file for export (iges)\n";
|
Output_TextBlock->Text += L"Error: cannot open file for export (iges)\n";
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
@@ -319,7 +319,7 @@ Standard_Boolean MainPage::SaveSTEP(const wchar_t* theFilePath, const TopoDS_Sha
|
|||||||
std::filebuf aFileBuf;
|
std::filebuf aFileBuf;
|
||||||
std::ostream aStream(&aFileBuf);
|
std::ostream aStream(&aFileBuf);
|
||||||
|
|
||||||
if (!aFileBuf.open(theFilePath, std::ios::out)) {
|
if (!aFileBuf.open(theFilePath, ios::out)) {
|
||||||
Output_TextBlock->Text += L"Error: cannot open file for export (step)\n";
|
Output_TextBlock->Text += L"Error: cannot open file for export (step)\n";
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
@@ -14,10 +14,10 @@
|
|||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <AIS.hxx>
|
|
||||||
|
|
||||||
#include <Adaptor3d_HCurve.hxx>
|
#include <Adaptor3d_HCurve.hxx>
|
||||||
#include <Adaptor3d_HSurface.hxx>
|
#include <Adaptor3d_HSurface.hxx>
|
||||||
|
#include <AIS.hxx>
|
||||||
#include <Bnd_Box.hxx>
|
#include <Bnd_Box.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
#include <BRepAdaptor_Curve.hxx>
|
||||||
@@ -783,7 +783,6 @@ Standard_Boolean AIS::GetPlaneFromFace(const TopoDS_Face& aFace,
|
|||||||
BRepAdaptor_Surface surf1( aFace );
|
BRepAdaptor_Surface surf1( aFace );
|
||||||
Handle( Adaptor3d_HSurface ) surf2;
|
Handle( Adaptor3d_HSurface ) surf2;
|
||||||
Standard_Boolean isOffset = Standard_False;
|
Standard_Boolean isOffset = Standard_False;
|
||||||
Offset = 0.0;
|
|
||||||
|
|
||||||
if (surf1.GetType() == GeomAbs_OffsetSurface)
|
if (surf1.GetType() == GeomAbs_OffsetSurface)
|
||||||
{
|
{
|
||||||
@@ -802,6 +801,7 @@ Standard_Boolean AIS::GetPlaneFromFace(const TopoDS_Face& aFace,
|
|||||||
{
|
{
|
||||||
aPlane = surf2->Plane();
|
aPlane = surf2->Plane();
|
||||||
aSurfType = AIS_KOS_Plane;
|
aSurfType = AIS_KOS_Plane;
|
||||||
|
Offset = 0.;
|
||||||
Result = Standard_True;
|
Result = Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -817,6 +817,7 @@ Standard_Boolean AIS::GetPlaneFromFace(const TopoDS_Face& aFace,
|
|||||||
gp_Pln thePlane( LinePos, LineDir ^ ExtrusionDir);
|
gp_Pln thePlane( LinePos, LineDir ^ ExtrusionDir);
|
||||||
aPlane = thePlane;
|
aPlane = thePlane;
|
||||||
aSurfType = AIS_KOS_Plane;
|
aSurfType = AIS_KOS_Plane;
|
||||||
|
Offset = 0.;
|
||||||
Result = Standard_True;
|
Result = Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -825,6 +826,7 @@ Standard_Boolean AIS::GetPlaneFromFace(const TopoDS_Face& aFace,
|
|||||||
{
|
{
|
||||||
aSurf = (Handle( Geom_OffsetSurface )::DownCast( aSurf ))->Surface();
|
aSurf = (Handle( Geom_OffsetSurface )::DownCast( aSurf ))->Surface();
|
||||||
aPlane = (Handle( Geom_Plane )::DownCast( aSurf ))->Pln();
|
aPlane = (Handle( Geom_Plane )::DownCast( aSurf ))->Pln();
|
||||||
|
Offset = 0.0e0;
|
||||||
}
|
}
|
||||||
if (Result == Standard_False)
|
if (Result == Standard_False)
|
||||||
{
|
{
|
||||||
@@ -837,6 +839,7 @@ Standard_Boolean AIS::GetPlaneFromFace(const TopoDS_Face& aFace,
|
|||||||
TheType == STANDARD_TYPE(Geom_ToroidalSurface))
|
TheType == STANDARD_TYPE(Geom_ToroidalSurface))
|
||||||
{
|
{
|
||||||
aSurf = (Handle( Geom_OffsetSurface )::DownCast( aSurf ))->Surface();
|
aSurf = (Handle( Geom_OffsetSurface )::DownCast( aSurf ))->Surface();
|
||||||
|
Offset = 0.0e0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -896,18 +899,20 @@ gp_Pnt AIS::ProjectPointOnLine( const gp_Pnt & aPoint, const gp_Lin & aLine )
|
|||||||
//function : InitFaceLength
|
//function : InitFaceLength
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void AIS::InitFaceLength (const TopoDS_Face& theFace,
|
void AIS::InitFaceLength (const TopoDS_Face& aFace,
|
||||||
gp_Pln& thePlane,
|
gp_Pln & aPlane,
|
||||||
Handle(Geom_Surface)& theSurface,
|
Handle(Geom_Surface) & aSurface,
|
||||||
AIS_KindOfSurface& theSurfaceType,
|
AIS_KindOfSurface & aSurfaceType,
|
||||||
Standard_Real& theOffset)
|
Standard_Real & anOffset)
|
||||||
{
|
{
|
||||||
if (AIS::GetPlaneFromFace (theFace, thePlane, theSurface, theSurfaceType, theOffset)
|
AIS::GetPlaneFromFace( aFace, aPlane, aSurface, aSurfaceType, anOffset );
|
||||||
&& Abs (theOffset) > Precision::Confusion())
|
|
||||||
{
|
if (Abs( anOffset ) > Precision::Confusion())
|
||||||
theSurface = new Geom_OffsetSurface (theSurface, theOffset);
|
{
|
||||||
theOffset = 0.0e0;
|
aSurface = new Geom_OffsetSurface( aSurface, anOffset );
|
||||||
}
|
anOffset = 0.0e0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@@ -17,26 +17,73 @@
|
|||||||
#ifndef _AIS_HeaderFile
|
#ifndef _AIS_HeaderFile
|
||||||
#define _AIS_HeaderFile
|
#define _AIS_HeaderFile
|
||||||
|
|
||||||
#include <AIS_KindOfSurface.hxx>
|
|
||||||
#include <Aspect_TypeOfLine.hxx>
|
|
||||||
#include <Aspect_TypeOfMarker.hxx>
|
|
||||||
#include <gp_Dir.hxx>
|
|
||||||
#include <gp_Pnt.hxx>
|
|
||||||
#include <Quantity_NameOfColor.hxx>
|
|
||||||
#include <Prs3d_Drawer.hxx>
|
|
||||||
#include <Prs3d_Presentation.hxx>
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
class Bnd_Box;
|
#include <Standard_Boolean.hxx>
|
||||||
class Geom_Curve;
|
#include <Standard_Integer.hxx>
|
||||||
class Geom_Plane;
|
#include <Standard_Real.hxx>
|
||||||
class Geom_Surface;
|
#include <AIS_KindOfSurface.hxx>
|
||||||
class TopoDS_Edge;
|
#include <Prs3d_Drawer.hxx>
|
||||||
class TopoDS_Face;
|
#include <Quantity_NameOfColor.hxx>
|
||||||
|
#include <Aspect_TypeOfLine.hxx>
|
||||||
|
#include <Aspect_TypeOfMarker.hxx>
|
||||||
|
class gp_Pnt;
|
||||||
class TopoDS_Shape;
|
class TopoDS_Shape;
|
||||||
|
class gp_Lin;
|
||||||
|
class Geom_Curve;
|
||||||
|
class TopoDS_Edge;
|
||||||
|
class Geom_Plane;
|
||||||
class TopoDS_Vertex;
|
class TopoDS_Vertex;
|
||||||
|
class TopoDS_Face;
|
||||||
|
class gp_Pln;
|
||||||
|
class Geom_Surface;
|
||||||
|
class gp_Dir;
|
||||||
|
class Bnd_Box;
|
||||||
|
class gp_Elips;
|
||||||
|
class Prs3d_Presentation;
|
||||||
|
class AIS_Triangulation;
|
||||||
|
class AIS_InteractiveContext;
|
||||||
|
class AIS_GraphicTool;
|
||||||
|
class AIS_GlobalStatus;
|
||||||
|
class AIS_InteractiveObject;
|
||||||
|
class AIS_Point;
|
||||||
|
class AIS_Axis;
|
||||||
|
class AIS_Trihedron;
|
||||||
|
class AIS_PlaneTrihedron;
|
||||||
|
class AIS_Line;
|
||||||
|
class AIS_Circle;
|
||||||
|
class AIS_Plane;
|
||||||
|
class AIS_Shape;
|
||||||
|
class AIS_ConnectedInteractive;
|
||||||
|
class AIS_MultipleConnectedInteractive;
|
||||||
|
class AIS_DimensionOwner;
|
||||||
|
class AIS_Relation;
|
||||||
|
class AIS_EllipseRadiusDimension;
|
||||||
|
class AIS_MaxRadiusDimension;
|
||||||
|
class AIS_MinRadiusDimension;
|
||||||
|
class AIS_Chamf2dDimension;
|
||||||
|
class AIS_Chamf3dDimension;
|
||||||
|
class AIS_OffsetDimension;
|
||||||
|
class AIS_FixRelation;
|
||||||
|
class AIS_PerpendicularRelation;
|
||||||
|
class AIS_ParallelRelation;
|
||||||
|
class AIS_TangentRelation;
|
||||||
|
class AIS_ConcentricRelation;
|
||||||
|
class AIS_IdenticRelation;
|
||||||
|
class AIS_SymmetricRelation;
|
||||||
|
class AIS_MidPointRelation;
|
||||||
|
class AIS_EqualRadiusRelation;
|
||||||
|
class AIS_EqualDistanceRelation;
|
||||||
|
class AIS_TypeFilter;
|
||||||
|
class AIS_SignatureFilter;
|
||||||
|
class AIS_ExclusionFilter;
|
||||||
|
class AIS_AttributeFilter;
|
||||||
|
class AIS_C0RegularityFilter;
|
||||||
|
class AIS_BadEdgeFilter;
|
||||||
|
class AIS_Selection;
|
||||||
|
|
||||||
|
|
||||||
//! Application Interactive Services provide the means to create links between an application GUI viewer and
|
//! Application Interactive Services provide the means to create links between an application GUI viewer and
|
||||||
//! the packages which are used to manage selection and presentation.
|
//! the packages which are used to manage selection and presentation.
|
||||||
|
@@ -168,7 +168,7 @@ void AIS_Animation::StartTimer (const Standard_Real theStartPts,
|
|||||||
{
|
{
|
||||||
if (myTimer.IsNull())
|
if (myTimer.IsNull())
|
||||||
{
|
{
|
||||||
myTimer = new Media_Timer();
|
myTimer = new AIS_AnimationTimer();
|
||||||
}
|
}
|
||||||
myTimer->Stop();
|
myTimer->Stop();
|
||||||
myTimer->Seek (theStartPts);
|
myTimer->Seek (theStartPts);
|
||||||
|
@@ -191,7 +191,7 @@ protected:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
Handle(Media_Timer) myTimer;
|
Handle(AIS_AnimationTimer) myTimer;
|
||||||
|
|
||||||
TCollection_AsciiString myName; //!< animation name
|
TCollection_AsciiString myName; //!< animation name
|
||||||
NCollection_Sequence<Handle(AIS_Animation)>
|
NCollection_Sequence<Handle(AIS_Animation)>
|
||||||
|
@@ -48,7 +48,7 @@ void AIS_AnimationCamera::update (const AIS_AnimationProgress& theProgress)
|
|||||||
Handle(Graphic3d_Camera) aCamera = myView->Camera();
|
Handle(Graphic3d_Camera) aCamera = myView->Camera();
|
||||||
|
|
||||||
Graphic3d_CameraLerp aCamLerp (myCamStart, myCamEnd);
|
Graphic3d_CameraLerp aCamLerp (myCamStart, myCamEnd);
|
||||||
aCamLerp.Interpolate (HasOwnDuration() ? theProgress.LocalNormalized : 1.0, aCamera);
|
aCamLerp.Interpolate (theProgress.LocalNormalized, aCamera);
|
||||||
|
|
||||||
const Standard_Boolean aPrevImmUpdate = myView->SetImmediateUpdate (Standard_False);
|
const Standard_Boolean aPrevImmUpdate = myView->SetImmediateUpdate (Standard_False);
|
||||||
myView->SetCamera (aCamera);
|
myView->SetCamera (aCamera);
|
||||||
|
@@ -33,9 +33,6 @@ public:
|
|||||||
//! Return the target view.
|
//! Return the target view.
|
||||||
const Handle(V3d_View)& View() const { return myView; }
|
const Handle(V3d_View)& View() const { return myView; }
|
||||||
|
|
||||||
//! Set target view.
|
|
||||||
void SetView (const Handle(V3d_View)& theView) { myView = theView; }
|
|
||||||
|
|
||||||
//! Return camera start position.
|
//! Return camera start position.
|
||||||
const Handle(Graphic3d_Camera)& CameraStart() const { return myCamStart; }
|
const Handle(Graphic3d_Camera)& CameraStart() const { return myCamStart; }
|
||||||
|
|
||||||
|
@@ -12,15 +12,15 @@
|
|||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <Media_Timer.hxx>
|
#include <AIS_AnimationTimer.hxx>
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(Media_Timer, Standard_Transient)
|
IMPLEMENT_STANDARD_RTTIEXT(AIS_AnimationTimer, Standard_Transient)
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//function : Pause
|
//function : Pause
|
||||||
//purpose :
|
//purpose :
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
void Media_Timer::Pause()
|
void AIS_AnimationTimer::Pause()
|
||||||
{
|
{
|
||||||
myTimer.Stop();
|
myTimer.Stop();
|
||||||
myTimerFrom += myTimer.ElapsedTime() * myTimerSpeed;
|
myTimerFrom += myTimer.ElapsedTime() * myTimerSpeed;
|
||||||
@@ -31,7 +31,7 @@ void Media_Timer::Pause()
|
|||||||
//function : Stop
|
//function : Stop
|
||||||
//purpose :
|
//purpose :
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
void Media_Timer::Stop()
|
void AIS_AnimationTimer::Stop()
|
||||||
{
|
{
|
||||||
myTimer.Stop();
|
myTimer.Stop();
|
||||||
myTimer.Reset();
|
myTimer.Reset();
|
||||||
@@ -42,7 +42,7 @@ void Media_Timer::Stop()
|
|||||||
//function : SetPlaybackSpeed
|
//function : SetPlaybackSpeed
|
||||||
//purpose :
|
//purpose :
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
void Media_Timer::SetPlaybackSpeed (const Standard_Real theSpeed)
|
void AIS_AnimationTimer::SetPlaybackSpeed (const Standard_Real theSpeed)
|
||||||
{
|
{
|
||||||
if (!myTimer.IsStarted())
|
if (!myTimer.IsStarted())
|
||||||
{
|
{
|
||||||
@@ -61,7 +61,7 @@ void Media_Timer::SetPlaybackSpeed (const Standard_Real theSpeed)
|
|||||||
//function : SetPlaybackSpeed
|
//function : SetPlaybackSpeed
|
||||||
//purpose :
|
//purpose :
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
void Media_Timer::Seek (const Standard_Real theTime)
|
void AIS_AnimationTimer::Seek (const Standard_Real theTime)
|
||||||
{
|
{
|
||||||
const Standard_Boolean isStarted = myTimer.IsStarted();
|
const Standard_Boolean isStarted = myTimer.IsStarted();
|
||||||
myTimer.Stop();
|
myTimer.Stop();
|
@@ -15,7 +15,60 @@
|
|||||||
#ifndef _AIS_AnimationTimer_HeaderFile
|
#ifndef _AIS_AnimationTimer_HeaderFile
|
||||||
#define _AIS_AnimationTimer_HeaderFile
|
#define _AIS_AnimationTimer_HeaderFile
|
||||||
|
|
||||||
#include <Media_Timer.hxx>
|
#include <OSD_Timer.hxx>
|
||||||
typedef Media_Timer AIS_AnimationTimer;
|
#include <Standard_Transient.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
|
//! Auxiliary class defining the animation timer.
|
||||||
|
class AIS_AnimationTimer : public Standard_Transient
|
||||||
|
{
|
||||||
|
DEFINE_STANDARD_RTTIEXT(AIS_AnimationTimer, Standard_Transient)
|
||||||
|
public:
|
||||||
|
|
||||||
|
//! Empty constructor.
|
||||||
|
AIS_AnimationTimer() : myTimerFrom (0.0), myTimerSpeed (1.0) {}
|
||||||
|
|
||||||
|
//! Return elapsed time in seconds.
|
||||||
|
Standard_Real ElapsedTime() const
|
||||||
|
{
|
||||||
|
return myTimerFrom + myTimer.ElapsedTime() * myTimerSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Return playback speed coefficient (1.0 means normal speed).
|
||||||
|
Standard_Real PlaybackSpeed() const { return myTimerSpeed; }
|
||||||
|
|
||||||
|
//! Setup playback speed coefficient.
|
||||||
|
Standard_EXPORT void SetPlaybackSpeed (const Standard_Real theSpeed);
|
||||||
|
|
||||||
|
//! Return true if timer has been started.
|
||||||
|
Standard_Boolean IsStarted() const
|
||||||
|
{
|
||||||
|
return myTimer.IsStarted();
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Start the timer.
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
myTimer.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Pause the timer.
|
||||||
|
Standard_EXPORT void Pause();
|
||||||
|
|
||||||
|
//! Stop the timer.
|
||||||
|
Standard_EXPORT void Stop();
|
||||||
|
|
||||||
|
//! Seek the timer to specified position.
|
||||||
|
Standard_EXPORT void Seek (const Standard_Real theTime);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
OSD_Timer myTimer;
|
||||||
|
Standard_Real myTimerFrom;
|
||||||
|
Standard_Real myTimerSpeed;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(AIS_AnimationTimer, Standard_Transient)
|
||||||
|
|
||||||
#endif // _AIS_AnimationTimer_HeaderFile
|
#endif // _AIS_AnimationTimer_HeaderFile
|
||||||
|
@@ -34,8 +34,10 @@
|
|||||||
#include <Prs3d_Projector.hxx>
|
#include <Prs3d_Projector.hxx>
|
||||||
#include <Quantity_Color.hxx>
|
#include <Quantity_Color.hxx>
|
||||||
#include <Select3D_SensitiveSegment.hxx>
|
#include <Select3D_SensitiveSegment.hxx>
|
||||||
|
#include <SelectBasics_EntityOwner.hxx>
|
||||||
#include <SelectMgr_EntityOwner.hxx>
|
#include <SelectMgr_EntityOwner.hxx>
|
||||||
#include <SelectMgr_Selection.hxx>
|
#include <SelectMgr_Selection.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
#include <StdPrs_Curve.hxx>
|
#include <StdPrs_Curve.hxx>
|
||||||
#include <TColgp_Array1OfPnt.hxx>
|
#include <TColgp_Array1OfPnt.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
@@ -79,7 +81,7 @@ myIsXYZAxis(Standard_True)
|
|||||||
Standard_Real aLength;
|
Standard_Real aLength;
|
||||||
try {
|
try {
|
||||||
aLength = UnitsAPI::AnyToLS(100. ,"mm");
|
aLength = UnitsAPI::AnyToLS(100. ,"mm");
|
||||||
} catch (Standard_Failure const&) {
|
} catch (Standard_Failure) {
|
||||||
aLength = 0.1;
|
aLength = 0.1;
|
||||||
}
|
}
|
||||||
DA->SetAxisLength(aLength,aLength,aLength);
|
DA->SetAxisLength(aLength,aLength,aLength);
|
||||||
@@ -197,7 +199,8 @@ void AIS_Axis::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(G
|
|||||||
void AIS_Axis::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
|
void AIS_Axis::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
|
||||||
const Standard_Integer)
|
const Standard_Integer)
|
||||||
{
|
{
|
||||||
Handle(SelectMgr_EntityOwner) eown = new SelectMgr_EntityOwner (this, 3);
|
Handle(SelectMgr_EntityOwner) eown = new SelectMgr_EntityOwner(this);
|
||||||
|
eown -> SelectBasics_EntityOwner::Set(3);
|
||||||
Handle(Select3D_SensitiveSegment) seg = new Select3D_SensitiveSegment(eown,
|
Handle(Select3D_SensitiveSegment) seg = new Select3D_SensitiveSegment(eown,
|
||||||
myPfirst,
|
myPfirst,
|
||||||
myPlast);
|
myPlast);
|
||||||
@@ -218,7 +221,7 @@ void AIS_Axis::SetColor(const Quantity_Color &aCol)
|
|||||||
DA->LineAspect(Prs3d_DP_XAxis)->SetColor(aCol);
|
DA->LineAspect(Prs3d_DP_XAxis)->SetColor(aCol);
|
||||||
DA->LineAspect(Prs3d_DP_YAxis)->SetColor(aCol);
|
DA->LineAspect(Prs3d_DP_YAxis)->SetColor(aCol);
|
||||||
DA->LineAspect(Prs3d_DP_ZAxis)->SetColor(aCol);
|
DA->LineAspect(Prs3d_DP_ZAxis)->SetColor(aCol);
|
||||||
SynchronizeAspects();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -227,6 +230,7 @@ void AIS_Axis::SetColor(const Quantity_Color &aCol)
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void AIS_Axis::SetWidth(const Standard_Real aValue)
|
void AIS_Axis::SetWidth(const Standard_Real aValue)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(aValue<0.0) return;
|
if(aValue<0.0) return;
|
||||||
if(aValue==0) UnsetWidth();
|
if(aValue==0) UnsetWidth();
|
||||||
|
|
||||||
@@ -236,7 +240,6 @@ void AIS_Axis::SetWidth(const Standard_Real aValue)
|
|||||||
DA->LineAspect(Prs3d_DP_XAxis)->SetWidth(aValue);
|
DA->LineAspect(Prs3d_DP_XAxis)->SetWidth(aValue);
|
||||||
DA->LineAspect(Prs3d_DP_YAxis)->SetWidth(aValue);
|
DA->LineAspect(Prs3d_DP_YAxis)->SetWidth(aValue);
|
||||||
DA->LineAspect(Prs3d_DP_ZAxis)->SetWidth(aValue);
|
DA->LineAspect(Prs3d_DP_ZAxis)->SetWidth(aValue);
|
||||||
SynchronizeAspects();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -321,13 +324,14 @@ AcceptDisplayMode(const Standard_Integer aMode) const
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void AIS_Axis::UnsetColor()
|
void AIS_Axis::UnsetColor()
|
||||||
{
|
{
|
||||||
|
|
||||||
myDrawer->LineAspect()->SetColor(Quantity_NOC_RED);
|
myDrawer->LineAspect()->SetColor(Quantity_NOC_RED);
|
||||||
hasOwnColor = Standard_False;
|
|
||||||
|
hasOwnColor=Standard_False;
|
||||||
|
|
||||||
myDrawer->DatumAspect()->LineAspect(Prs3d_DP_XAxis)->SetColor(Quantity_NOC_TURQUOISE);
|
myDrawer->DatumAspect()->LineAspect(Prs3d_DP_XAxis)->SetColor(Quantity_NOC_TURQUOISE);
|
||||||
myDrawer->DatumAspect()->LineAspect(Prs3d_DP_YAxis)->SetColor(Quantity_NOC_TURQUOISE);
|
myDrawer->DatumAspect()->LineAspect(Prs3d_DP_YAxis)->SetColor(Quantity_NOC_TURQUOISE);
|
||||||
myDrawer->DatumAspect()->LineAspect(Prs3d_DP_ZAxis)->SetColor(Quantity_NOC_TURQUOISE);
|
myDrawer->DatumAspect()->LineAspect(Prs3d_DP_ZAxis)->SetColor(Quantity_NOC_TURQUOISE);
|
||||||
SynchronizeAspects();
|
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : UnsetWidth
|
//function : UnsetWidth
|
||||||
@@ -336,10 +340,10 @@ void AIS_Axis::UnsetColor()
|
|||||||
|
|
||||||
void AIS_Axis::UnsetWidth()
|
void AIS_Axis::UnsetWidth()
|
||||||
{
|
{
|
||||||
myOwnWidth = 0.0f;
|
myOwnWidth = 0.0;
|
||||||
myDrawer->LineAspect()->SetWidth(1.);
|
myDrawer->LineAspect()->SetWidth(1.);
|
||||||
myDrawer->DatumAspect()->LineAspect(Prs3d_DP_XAxis)->SetWidth(1.);
|
myDrawer->DatumAspect()->LineAspect(Prs3d_DP_XAxis)->SetWidth(1.);
|
||||||
myDrawer->DatumAspect()->LineAspect(Prs3d_DP_YAxis)->SetWidth(1.);
|
myDrawer->DatumAspect()->LineAspect(Prs3d_DP_YAxis)->SetWidth(1.);
|
||||||
myDrawer->DatumAspect()->LineAspect(Prs3d_DP_ZAxis)->SetWidth(1.);
|
myDrawer->DatumAspect()->LineAspect(Prs3d_DP_ZAxis)->SetWidth(1.);
|
||||||
SynchronizeAspects();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -90,7 +90,6 @@ void AIS_CameraFrustum::SetColor (const Quantity_Color& theColor)
|
|||||||
AIS_InteractiveObject::SetColor (theColor);
|
AIS_InteractiveObject::SetColor (theColor);
|
||||||
myDrawer->ShadingAspect()->SetColor (theColor);
|
myDrawer->ShadingAspect()->SetColor (theColor);
|
||||||
myDrawer->LineAspect()->SetColor (theColor);
|
myDrawer->LineAspect()->SetColor (theColor);
|
||||||
SynchronizeAspects();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -108,7 +107,6 @@ void AIS_CameraFrustum::UnsetColor()
|
|||||||
|
|
||||||
myDrawer->ShadingAspect()->SetColor (THE_DEFAULT_COLOR);
|
myDrawer->ShadingAspect()->SetColor (THE_DEFAULT_COLOR);
|
||||||
myDrawer->LineAspect()->SetColor (THE_DEFAULT_COLOR);
|
myDrawer->LineAspect()->SetColor (THE_DEFAULT_COLOR);
|
||||||
SynchronizeAspects();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -119,7 +117,6 @@ void AIS_CameraFrustum::UnsetTransparency()
|
|||||||
{
|
{
|
||||||
myDrawer->ShadingAspect()->SetTransparency (0.0f);
|
myDrawer->ShadingAspect()->SetTransparency (0.0f);
|
||||||
myDrawer->SetTransparency (0.0f);
|
myDrawer->SetTransparency (0.0f);
|
||||||
SynchronizeAspects();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@@ -17,13 +17,29 @@
|
|||||||
#ifndef _AIS_Chamf2dDimension_HeaderFile
|
#ifndef _AIS_Chamf2dDimension_HeaderFile
|
||||||
#define _AIS_Chamf2dDimension_HeaderFile
|
#define _AIS_Chamf2dDimension_HeaderFile
|
||||||
|
|
||||||
#include <AIS_KindOfDimension.hxx>
|
#include <Standard.hxx>
|
||||||
#include <AIS_Relation.hxx>
|
#include <Standard_Type.hxx>
|
||||||
#include <DsgPrs_ArrowSide.hxx>
|
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_Dir.hxx>
|
#include <gp_Dir.hxx>
|
||||||
|
#include <AIS_Relation.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
|
#include <DsgPrs_ArrowSide.hxx>
|
||||||
|
#include <AIS_KindOfDimension.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <PrsMgr_PresentationManager3d.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <SelectMgr_Selection.hxx>
|
||||||
|
class TopoDS_Shape;
|
||||||
class Geom_Plane;
|
class Geom_Plane;
|
||||||
|
class TCollection_ExtendedString;
|
||||||
|
class gp_Pnt;
|
||||||
|
class Prs3d_Presentation;
|
||||||
|
class Prs3d_Projector;
|
||||||
|
class Geom_Transformation;
|
||||||
|
|
||||||
|
|
||||||
|
class AIS_Chamf2dDimension;
|
||||||
DEFINE_STANDARD_HANDLE(AIS_Chamf2dDimension, AIS_Relation)
|
DEFINE_STANDARD_HANDLE(AIS_Chamf2dDimension, AIS_Relation)
|
||||||
|
|
||||||
//! A framework to define display of 2D chamfers.
|
//! A framework to define display of 2D chamfers.
|
||||||
@@ -32,9 +48,10 @@ DEFINE_STANDARD_HANDLE(AIS_Chamf2dDimension, AIS_Relation)
|
|||||||
//! chamfer, or the angle if it is not.
|
//! chamfer, or the angle if it is not.
|
||||||
class AIS_Chamf2dDimension : public AIS_Relation
|
class AIS_Chamf2dDimension : public AIS_Relation
|
||||||
{
|
{
|
||||||
DEFINE_STANDARD_RTTIEXT(AIS_Chamf2dDimension, AIS_Relation)
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
//! Constructs the display object for 2D chamfers.
|
//! Constructs the display object for 2D chamfers.
|
||||||
//! This object is defined by the face aFShape, the
|
//! This object is defined by the face aFShape, the
|
||||||
//! dimension aVal, the plane aPlane and the text aText.
|
//! dimension aVal, the plane aPlane and the text aText.
|
||||||
@@ -62,7 +79,18 @@ public:
|
|||||||
//! to the object to display before computation !!!
|
//! to the object to display before computation !!!
|
||||||
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
|
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTIEXT(AIS_Chamf2dDimension,AIS_Relation)
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
|
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
|
||||||
|
|
||||||
@@ -73,8 +101,14 @@ private:
|
|||||||
gp_Pnt myPntAttach;
|
gp_Pnt myPntAttach;
|
||||||
gp_Dir myDir;
|
gp_Dir myDir;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#include <AIS_Chamf2dDimension.lxx>
|
#include <AIS_Chamf2dDimension.lxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _AIS_Chamf2dDimension_HeaderFile
|
#endif // _AIS_Chamf2dDimension_HeaderFile
|
||||||
|
@@ -17,11 +17,28 @@
|
|||||||
#ifndef _AIS_Chamf3dDimension_HeaderFile
|
#ifndef _AIS_Chamf3dDimension_HeaderFile
|
||||||
#define _AIS_Chamf3dDimension_HeaderFile
|
#define _AIS_Chamf3dDimension_HeaderFile
|
||||||
|
|
||||||
#include <AIS_KindOfDimension.hxx>
|
#include <Standard.hxx>
|
||||||
#include <AIS_Relation.hxx>
|
#include <Standard_Type.hxx>
|
||||||
#include <DsgPrs_ArrowSide.hxx>
|
|
||||||
#include <gp_Dir.hxx>
|
|
||||||
|
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <gp_Dir.hxx>
|
||||||
|
#include <AIS_Relation.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
|
#include <DsgPrs_ArrowSide.hxx>
|
||||||
|
#include <AIS_KindOfDimension.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <PrsMgr_PresentationManager3d.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <SelectMgr_Selection.hxx>
|
||||||
|
class TopoDS_Shape;
|
||||||
|
class TCollection_ExtendedString;
|
||||||
|
class gp_Pnt;
|
||||||
|
class Prs3d_Presentation;
|
||||||
|
class Prs3d_Projector;
|
||||||
|
class Geom_Transformation;
|
||||||
|
|
||||||
|
|
||||||
|
class AIS_Chamf3dDimension;
|
||||||
DEFINE_STANDARD_HANDLE(AIS_Chamf3dDimension, AIS_Relation)
|
DEFINE_STANDARD_HANDLE(AIS_Chamf3dDimension, AIS_Relation)
|
||||||
|
|
||||||
//! A framework to define display of 3D chamfers.
|
//! A framework to define display of 3D chamfers.
|
||||||
@@ -30,9 +47,10 @@ DEFINE_STANDARD_HANDLE(AIS_Chamf3dDimension, AIS_Relation)
|
|||||||
//! chamfer, or the angle if it is not.
|
//! chamfer, or the angle if it is not.
|
||||||
class AIS_Chamf3dDimension : public AIS_Relation
|
class AIS_Chamf3dDimension : public AIS_Relation
|
||||||
{
|
{
|
||||||
DEFINE_STANDARD_RTTIEXT(AIS_Chamf3dDimension, AIS_Relation)
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
//! Constructs a display object for 3D chamfers.
|
//! Constructs a display object for 3D chamfers.
|
||||||
//! This object is defined by the shape aFShape, the
|
//! This object is defined by the shape aFShape, the
|
||||||
//! dimension aVal and the text aText.
|
//! dimension aVal and the text aText.
|
||||||
@@ -60,8 +78,19 @@ public:
|
|||||||
//! to the object to display before computation !!!
|
//! to the object to display before computation !!!
|
||||||
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
|
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTIEXT(AIS_Chamf3dDimension,AIS_Relation)
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) 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 Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
|
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
|
||||||
@@ -71,8 +100,14 @@ private:
|
|||||||
gp_Pnt myPntAttach;
|
gp_Pnt myPntAttach;
|
||||||
gp_Dir myDir;
|
gp_Dir myDir;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#include <AIS_Chamf3dDimension.lxx>
|
#include <AIS_Chamf3dDimension.lxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _AIS_Chamf3dDimension_HeaderFile
|
#endif // _AIS_Chamf3dDimension_HeaderFile
|
||||||
|
@@ -112,29 +112,6 @@ void AIS_Circle::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : replaceWithNewLineAspect
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void AIS_Circle::replaceWithNewLineAspect (const Handle(Prs3d_LineAspect)& theAspect)
|
|
||||||
{
|
|
||||||
if (!myDrawer->HasLink())
|
|
||||||
{
|
|
||||||
myDrawer->SetLineAspect (theAspect);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Handle(Graphic3d_AspectLine3d) anAspectOld = myDrawer->LineAspect()->Aspect();
|
|
||||||
const Handle(Graphic3d_AspectLine3d) anAspectNew = !theAspect.IsNull() ? theAspect->Aspect() : myDrawer->Link()->LineAspect()->Aspect();
|
|
||||||
if (anAspectNew != anAspectOld)
|
|
||||||
{
|
|
||||||
myDrawer->SetLineAspect (theAspect);
|
|
||||||
Graphic3d_MapOfAspectsToAspects aReplaceMap;
|
|
||||||
aReplaceMap.Bind (anAspectOld, anAspectNew);
|
|
||||||
replaceAspects (aReplaceMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetColor
|
//function : SetColor
|
||||||
//purpose :
|
//purpose :
|
||||||
@@ -145,41 +122,34 @@ void AIS_Circle::SetColor(const Quantity_Color &aCol)
|
|||||||
hasOwnColor=Standard_True;
|
hasOwnColor=Standard_True;
|
||||||
myDrawer->SetColor (aCol);
|
myDrawer->SetColor (aCol);
|
||||||
|
|
||||||
if (!myDrawer->HasOwnLineAspect())
|
Standard_Real WW = HasWidth() ? myOwnWidth :
|
||||||
{
|
myDrawer->HasLink() ?
|
||||||
Standard_Real WW = HasWidth() ? myOwnWidth :
|
AIS_GraphicTool::GetLineWidth (myDrawer->Link(), AIS_TOA_Line) :
|
||||||
myDrawer->HasLink() ?
|
1.;
|
||||||
AIS_GraphicTool::GetLineWidth (myDrawer->Link(), AIS_TOA_Line) :
|
|
||||||
1.;
|
if (!myDrawer->HasOwnLineAspect ())
|
||||||
replaceWithNewLineAspect (new Prs3d_LineAspect (aCol, Aspect_TOL_SOLID, WW));
|
myDrawer->SetLineAspect (new Prs3d_LineAspect(aCol,Aspect_TOL_SOLID,WW));
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
myDrawer->LineAspect()->SetColor(aCol);
|
myDrawer->LineAspect()->SetColor(aCol);
|
||||||
SynchronizeAspects();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetWidth
|
//function : SetWidth
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void AIS_Circle::SetWidth(const Standard_Real aValue)
|
void AIS_Circle::SetWidth(const Standard_Real aValue)
|
||||||
{
|
{
|
||||||
myOwnWidth = (Standard_ShortReal )aValue;
|
myOwnWidth=aValue;
|
||||||
|
|
||||||
if (!myDrawer->HasOwnLineAspect())
|
if (!myDrawer->HasOwnLineAspect ()) {
|
||||||
{
|
|
||||||
Quantity_Color CC = Quantity_NOC_YELLOW;
|
Quantity_Color CC = Quantity_NOC_YELLOW;
|
||||||
if( HasColor() ) CC = myDrawer->Color();
|
if( HasColor() ) CC = myDrawer->Color();
|
||||||
else if(myDrawer->HasLink()) AIS_GraphicTool::GetLineColor (myDrawer->Link(), AIS_TOA_Line, CC);
|
else if(myDrawer->HasLink()) AIS_GraphicTool::GetLineColor (myDrawer->Link(), AIS_TOA_Line, CC);
|
||||||
replaceWithNewLineAspect (new Prs3d_LineAspect (CC, Aspect_TOL_SOLID, aValue));
|
myDrawer->SetLineAspect (new Prs3d_LineAspect(CC,Aspect_TOL_SOLID,aValue));
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
|
||||||
myDrawer->LineAspect()->SetWidth(aValue);
|
myDrawer->LineAspect()->SetWidth(aValue);
|
||||||
SynchronizeAspects();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -191,18 +161,15 @@ void AIS_Circle::UnsetColor()
|
|||||||
{
|
{
|
||||||
hasOwnColor = Standard_False;
|
hasOwnColor = Standard_False;
|
||||||
|
|
||||||
if (!HasWidth())
|
Handle(Prs3d_LineAspect) NullAsp;
|
||||||
{
|
|
||||||
replaceWithNewLineAspect (Handle(Prs3d_LineAspect)());
|
if (!HasWidth()) myDrawer->SetLineAspect(NullAsp);
|
||||||
}
|
else{
|
||||||
else
|
|
||||||
{
|
|
||||||
Quantity_Color CC = Quantity_NOC_YELLOW;;
|
Quantity_Color CC = Quantity_NOC_YELLOW;;
|
||||||
if( HasColor() ) CC = myDrawer->Color();
|
if( HasColor() ) CC = myDrawer->Color();
|
||||||
else if (myDrawer->HasLink()) AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
|
else if (myDrawer->HasLink()) AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
|
||||||
myDrawer->LineAspect()->SetColor(CC);
|
myDrawer->LineAspect()->SetColor(CC);
|
||||||
myDrawer->SetColor (CC);
|
myDrawer->SetColor (CC);
|
||||||
SynchronizeAspects();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,13 +179,11 @@ void AIS_Circle::UnsetColor()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void AIS_Circle::UnsetWidth()
|
void AIS_Circle::UnsetWidth()
|
||||||
{
|
{
|
||||||
if (!HasColor())
|
Handle(Prs3d_LineAspect) NullAsp;
|
||||||
{
|
|
||||||
replaceWithNewLineAspect (Handle(Prs3d_LineAspect)());
|
if (!HasColor()) myDrawer->SetLineAspect(NullAsp);
|
||||||
}
|
else{
|
||||||
else
|
Standard_Real WW = myDrawer->HasLink() ? AIS_GraphicTool::GetLineWidth(myDrawer->Link(),AIS_TOA_Line) : 1.;
|
||||||
{
|
|
||||||
Standard_ShortReal WW = myDrawer->HasLink() ? (Standard_ShortReal )AIS_GraphicTool::GetLineWidth(myDrawer->Link(),AIS_TOA_Line) : 1.0f;
|
|
||||||
myDrawer->LineAspect()->SetWidth(WW);
|
myDrawer->LineAspect()->SetWidth(WW);
|
||||||
myOwnWidth = WW;
|
myOwnWidth = WW;
|
||||||
}
|
}
|
||||||
|
@@ -115,9 +115,6 @@ private:
|
|||||||
|
|
||||||
Standard_EXPORT void ComputeArcSelection (const Handle(SelectMgr_Selection)& aSelection);
|
Standard_EXPORT void ComputeArcSelection (const Handle(SelectMgr_Selection)& aSelection);
|
||||||
|
|
||||||
//! Replace aspects of already computed groups with the new value.
|
|
||||||
void replaceWithNewLineAspect (const Handle(Prs3d_LineAspect)& theAspect);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Handle(Geom_Circle) myComponent;
|
Handle(Geom_Circle) myComponent;
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
#include <Graphic3d_AspectText3d.hxx>
|
#include <Graphic3d_AspectText3d.hxx>
|
||||||
#include <Graphic3d_GraphicDriver.hxx>
|
#include <Graphic3d_GraphicDriver.hxx>
|
||||||
#include <Graphic3d_ArrayOfTriangles.hxx>
|
#include <Graphic3d_ArrayOfTriangles.hxx>
|
||||||
#include <Graphic3d_Text.hxx>
|
|
||||||
#include <Prs3d_LineAspect.hxx>
|
#include <Prs3d_LineAspect.hxx>
|
||||||
#include <Prs3d_Root.hxx>
|
#include <Prs3d_Root.hxx>
|
||||||
#include <Prs3d_ShadingAspect.hxx>
|
#include <Prs3d_ShadingAspect.hxx>
|
||||||
@@ -79,31 +78,6 @@ namespace
|
|||||||
Standard_Real aSaturation = NCollection_Lerp<Standard_Real>::Interpolate (theHlsMin[2], theHlsMax[2], aValue);
|
Standard_Real aSaturation = NCollection_Lerp<Standard_Real>::Interpolate (theHlsMin[2], theHlsMax[2], aValue);
|
||||||
return Quantity_Color (AIS_ColorScale::hueToValidRange (aHue), aLightness, aSaturation, Quantity_TOC_HLS);
|
return Quantity_Color (AIS_ColorScale::hueToValidRange (aHue), aLightness, aSaturation, Quantity_TOC_HLS);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Return the index of discrete interval for specified value.
|
|
||||||
//! Note that when value lies exactly on the border between two intervals,
|
|
||||||
//! determining which interval to return is undefined operation;
|
|
||||||
//! Current implementation returns the following interval in this case.
|
|
||||||
//! @param theValue [in] value to map
|
|
||||||
//! @param theMin [in] values range, lower value
|
|
||||||
//! @param theMax [in] values range, upper value
|
|
||||||
//! @param theNbIntervals [in] number of discrete intervals
|
|
||||||
//! @return index of interval within [1, theNbIntervals] range
|
|
||||||
static Standard_Integer colorDiscreteInterval (Standard_Real theValue,
|
|
||||||
Standard_Real theMin,
|
|
||||||
Standard_Real theMax,
|
|
||||||
Standard_Integer theNbIntervals)
|
|
||||||
{
|
|
||||||
if (Abs (theMax - theMin) <= Precision::Approximation())
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Standard_Integer anInterval = 1 + (Standard_Integer )Floor (Standard_Real (theNbIntervals) * (theValue - theMin) / (theMax - theMin));
|
|
||||||
// map the very upper value (theValue==theMax) to the largest color interval
|
|
||||||
anInterval = Min (anInterval, theNbIntervals);
|
|
||||||
return anInterval;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -373,14 +347,21 @@ Standard_Boolean AIS_ColorScale::FindColor (const Standard_Real theValue,
|
|||||||
|
|
||||||
if (myColorType == Aspect_TOCSD_USER)
|
if (myColorType == Aspect_TOCSD_USER)
|
||||||
{
|
{
|
||||||
const Standard_Integer anInterval = colorDiscreteInterval (theValue, myMin, myMax, myNbIntervals);
|
Standard_Integer anIndex = 0;
|
||||||
if (anInterval < myColors.Lower() || anInterval > myColors.Upper())
|
if (Abs (myMax - myMin) > Precision::Approximation())
|
||||||
|
{
|
||||||
|
anIndex = (theValue - myMin < Precision::Confusion())
|
||||||
|
? 1
|
||||||
|
: Standard_Integer (Ceiling (( theValue - myMin ) / ( (myMax - myMin) / myNbIntervals)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (anIndex <= 0 || anIndex > myColors.Length())
|
||||||
{
|
{
|
||||||
theColor = Quantity_Color();
|
theColor = Quantity_Color();
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
theColor = myColors.Value (anInterval);
|
theColor = myColors.Value (anIndex);
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -404,8 +385,13 @@ Standard_Boolean AIS_ColorScale::FindColor (const Standard_Real theValue,
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Standard_Integer anInterval = colorDiscreteInterval (theValue, theMin, theMax, theColorsCount);
|
Standard_Real anInterval = 0.0;
|
||||||
theColor = colorFromValueEx (anInterval - 1, 0, theColorsCount - 1, theColorHlsMin, theColorHlsMax);
|
if (Abs (theMax - theMin) > Precision::Approximation())
|
||||||
|
{
|
||||||
|
anInterval = Floor (Standard_Real (theColorsCount) * (theValue - theMin) / (theMax - theMin));
|
||||||
|
}
|
||||||
|
|
||||||
|
theColor = colorFromValueEx (anInterval, 0, theColorsCount - 1, theColorHlsMin, theColorHlsMax);
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -810,14 +796,16 @@ void AIS_ColorScale::drawText (const Handle(Graphic3d_Group)& theGroup,
|
|||||||
const Graphic3d_VerticalTextAlignment theVertAlignment)
|
const Graphic3d_VerticalTextAlignment theVertAlignment)
|
||||||
{
|
{
|
||||||
const Handle(Prs3d_TextAspect)& anAspect = myDrawer->TextAspect();
|
const Handle(Prs3d_TextAspect)& anAspect = myDrawer->TextAspect();
|
||||||
|
theGroup->Text (theText,
|
||||||
|
gp_Ax2 (gp_Pnt (theX, theY, 0.0), gp::DZ()),
|
||||||
|
anAspect->Height(),
|
||||||
|
anAspect->Angle(),
|
||||||
|
anAspect->Orientation(),
|
||||||
|
Graphic3d_HTA_LEFT,
|
||||||
|
theVertAlignment,
|
||||||
|
Standard_True,
|
||||||
|
Standard_False); // has own anchor
|
||||||
|
|
||||||
Handle(Graphic3d_Text) aText = new Graphic3d_Text ((Standard_ShortReal)anAspect->Height());
|
|
||||||
aText->SetText (theText.ToExtString());
|
|
||||||
aText->SetOrientation (gp_Ax2 (gp_Pnt (theX, theY, 0.0), gp::DZ()));
|
|
||||||
aText->SetOwnAnchorPoint (Standard_False);
|
|
||||||
aText->SetVerticalAlignment (theVertAlignment);
|
|
||||||
|
|
||||||
theGroup->AddText (aText);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@@ -124,7 +124,8 @@ Handle(AIS_ColoredDrawer) AIS_ColoredShape::CustomAspects (const TopoDS_Shape& t
|
|||||||
{
|
{
|
||||||
aDrawer = new AIS_ColoredDrawer (myDrawer);
|
aDrawer = new AIS_ColoredDrawer (myDrawer);
|
||||||
myShapeColors.Bind (theShape, aDrawer);
|
myShapeColors.Bind (theShape, aDrawer);
|
||||||
SetToUpdate();
|
LoadRecomputable (AIS_WireFrame);
|
||||||
|
LoadRecomputable (AIS_Shaded);
|
||||||
}
|
}
|
||||||
return aDrawer;
|
return aDrawer;
|
||||||
}
|
}
|
||||||
@@ -140,7 +141,8 @@ void AIS_ColoredShape::ClearCustomAspects()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
myShapeColors.Clear();
|
myShapeColors.Clear();
|
||||||
SetToUpdate();
|
LoadRecomputable (AIS_WireFrame);
|
||||||
|
LoadRecomputable (AIS_Shaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -155,7 +157,8 @@ void AIS_ColoredShape::UnsetCustomAspects (const TopoDS_Shape& theShape,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetToUpdate();
|
LoadRecomputable (AIS_WireFrame);
|
||||||
|
LoadRecomputable (AIS_Shaded);
|
||||||
if (theToUnregister)
|
if (theToUnregister)
|
||||||
{
|
{
|
||||||
myShapeColors.UnBind (theShape);
|
myShapeColors.UnBind (theShape);
|
||||||
@@ -180,6 +183,8 @@ void AIS_ColoredShape::SetCustomColor (const TopoDS_Shape& theShape,
|
|||||||
const Handle(AIS_ColoredDrawer)& aDrawer = CustomAspects (theShape);
|
const Handle(AIS_ColoredDrawer)& aDrawer = CustomAspects (theShape);
|
||||||
setColor (aDrawer, theColor);
|
setColor (aDrawer, theColor);
|
||||||
aDrawer->SetOwnColor (theColor);
|
aDrawer->SetOwnColor (theColor);
|
||||||
|
LoadRecomputable (AIS_WireFrame);
|
||||||
|
LoadRecomputable (AIS_Shaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -197,6 +202,8 @@ void AIS_ColoredShape::SetCustomTransparency (const TopoDS_Shape& theShape,
|
|||||||
const Handle(AIS_ColoredDrawer)& aDrawer = CustomAspects (theShape);
|
const Handle(AIS_ColoredDrawer)& aDrawer = CustomAspects (theShape);
|
||||||
setTransparency (aDrawer, theTransparency);
|
setTransparency (aDrawer, theTransparency);
|
||||||
aDrawer->SetOwnTransparency (theTransparency);
|
aDrawer->SetOwnTransparency (theTransparency);
|
||||||
|
LoadRecomputable (AIS_WireFrame);
|
||||||
|
LoadRecomputable (AIS_Shaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -214,6 +221,8 @@ void AIS_ColoredShape::SetCustomWidth (const TopoDS_Shape& theShape,
|
|||||||
const Handle(AIS_ColoredDrawer)& aDrawer = CustomAspects (theShape);
|
const Handle(AIS_ColoredDrawer)& aDrawer = CustomAspects (theShape);
|
||||||
setWidth (aDrawer, theLineWidth);
|
setWidth (aDrawer, theLineWidth);
|
||||||
aDrawer->SetOwnWidth (theLineWidth);
|
aDrawer->SetOwnWidth (theLineWidth);
|
||||||
|
LoadRecomputable (AIS_WireFrame);
|
||||||
|
LoadRecomputable (AIS_Shaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -512,8 +521,8 @@ void AIS_ColoredShape::ComputeSelection (const Handle(SelectMgr_Selection)& theS
|
|||||||
Handle(SelectMgr_SelectableObject) aThis (this);
|
Handle(SelectMgr_SelectableObject) aThis (this);
|
||||||
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSelection->Entities()); aSelEntIter.More(); aSelEntIter.Next())
|
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSelection->Entities()); aSelEntIter.More(); aSelEntIter.Next())
|
||||||
{
|
{
|
||||||
const Handle(SelectMgr_EntityOwner)& anOwner = aSelEntIter.Value()->BaseSensitive()->OwnerId();
|
Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast (aSelEntIter.Value()->BaseSensitive()->OwnerId());
|
||||||
anOwner->SetSelectable (aThis);
|
anOwner->Set (aThis);
|
||||||
}
|
}
|
||||||
|
|
||||||
StdSelect_BRepSelectionTool::PreBuildBVH (theSelection);
|
StdSelect_BRepSelectionTool::PreBuildBVH (theSelection);
|
||||||
|
@@ -17,11 +17,24 @@
|
|||||||
#ifndef _AIS_ConcentricRelation_HeaderFile
|
#ifndef _AIS_ConcentricRelation_HeaderFile
|
||||||
#define _AIS_ConcentricRelation_HeaderFile
|
#define _AIS_ConcentricRelation_HeaderFile
|
||||||
|
|
||||||
#include <AIS_Relation.hxx>
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <gp_Dir.hxx>
|
#include <gp_Dir.hxx>
|
||||||
|
#include <AIS_Relation.hxx>
|
||||||
|
#include <PrsMgr_PresentationManager3d.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <SelectMgr_Selection.hxx>
|
||||||
|
class TopoDS_Shape;
|
||||||
class Geom_Plane;
|
class Geom_Plane;
|
||||||
|
class Prs3d_Presentation;
|
||||||
|
class Prs3d_Projector;
|
||||||
|
class Geom_Transformation;
|
||||||
|
|
||||||
|
|
||||||
|
class AIS_ConcentricRelation;
|
||||||
DEFINE_STANDARD_HANDLE(AIS_ConcentricRelation, AIS_Relation)
|
DEFINE_STANDARD_HANDLE(AIS_ConcentricRelation, AIS_Relation)
|
||||||
|
|
||||||
//! A framework to define a constraint by a relation of
|
//! A framework to define a constraint by a relation of
|
||||||
@@ -31,9 +44,10 @@ DEFINE_STANDARD_HANDLE(AIS_ConcentricRelation, AIS_Relation)
|
|||||||
//! relation of concentricity can be extended.
|
//! relation of concentricity can be extended.
|
||||||
class AIS_ConcentricRelation : public AIS_Relation
|
class AIS_ConcentricRelation : public AIS_Relation
|
||||||
{
|
{
|
||||||
DEFINE_STANDARD_RTTIEXT(AIS_ConcentricRelation, AIS_Relation)
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
//! Constructs the display object for concentric relations
|
//! Constructs the display object for concentric relations
|
||||||
//! between shapes.
|
//! between shapes.
|
||||||
//! This object is defined by the two shapes, aFShape
|
//! This object is defined by the two shapes, aFShape
|
||||||
@@ -51,8 +65,19 @@ public:
|
|||||||
//! to the object to display before computation !!!
|
//! to the object to display before computation !!!
|
||||||
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
|
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTIEXT(AIS_ConcentricRelation,AIS_Relation)
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) 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 Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
|
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
|
||||||
@@ -70,6 +95,13 @@ private:
|
|||||||
gp_Dir myDir;
|
gp_Dir myDir;
|
||||||
gp_Pnt myPnt;
|
gp_Pnt myPnt;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _AIS_ConcentricRelation_HeaderFile
|
#endif // _AIS_ConcentricRelation_HeaderFile
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
#include <Prs3d_Drawer.hxx>
|
#include <Prs3d_Drawer.hxx>
|
||||||
#include <Prs3d_Projector.hxx>
|
#include <Prs3d_Projector.hxx>
|
||||||
|
#include <PrsMgr_ModedPresentation.hxx>
|
||||||
#include <Select3D_SensitiveEntity.hxx>
|
#include <Select3D_SensitiveEntity.hxx>
|
||||||
#include <SelectMgr_EntityOwner.hxx>
|
#include <SelectMgr_EntityOwner.hxx>
|
||||||
#include <SelectMgr_Selection.hxx>
|
#include <SelectMgr_Selection.hxx>
|
||||||
@@ -91,12 +92,12 @@ void AIS_ConnectedInteractive::connect (const Handle(AIS_InteractiveObject)& the
|
|||||||
|
|
||||||
void AIS_ConnectedInteractive::Disconnect()
|
void AIS_ConnectedInteractive::Disconnect()
|
||||||
{
|
{
|
||||||
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
|
for(Standard_Integer aPrsIter = 1; aPrsIter <= myPresentations.Length(); ++aPrsIter)
|
||||||
{
|
{
|
||||||
const Handle(PrsMgr_Presentation)& aPrs = aPrsIter.Value();
|
const Handle(PrsMgr_Presentation)& aPrs = myPresentations (aPrsIter).Presentation();
|
||||||
if (!aPrs.IsNull())
|
if (!aPrs.IsNull())
|
||||||
{
|
{
|
||||||
aPrs->DisconnectAll (Graphic3d_TOC_DESCENDANT);
|
aPrs->Presentation()->DisconnectAll (Graphic3d_TOC_DESCENDANT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -111,7 +112,7 @@ void AIS_ConnectedInteractive::Compute (const Handle(PrsMgr_PresentationManager3
|
|||||||
if (HasConnection())
|
if (HasConnection())
|
||||||
{
|
{
|
||||||
thePrs->Clear (Standard_False);
|
thePrs->Clear (Standard_False);
|
||||||
thePrs->DisconnectAll (Graphic3d_TOC_DESCENDANT);
|
thePrs->RemoveAll();
|
||||||
|
|
||||||
if (!myReference->HasInteractiveContext())
|
if (!myReference->HasInteractiveContext())
|
||||||
{
|
{
|
||||||
@@ -233,7 +234,7 @@ void AIS_ConnectedInteractive::ComputeSelection (const Handle(SelectMgr_Selectio
|
|||||||
|
|
||||||
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (TheRefSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
|
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (TheRefSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
|
||||||
{
|
{
|
||||||
if (const Handle(Select3D_SensitiveEntity)& aSensitive = aSelEntIter.Value()->BaseSensitive())
|
if (Handle(Select3D_SensitiveEntity) aSensitive = Handle(Select3D_SensitiveEntity)::DownCast (aSelEntIter.Value()->BaseSensitive()))
|
||||||
{
|
{
|
||||||
// Get the copy of SE3D
|
// Get the copy of SE3D
|
||||||
if (Handle(Select3D_SensitiveEntity) aNewSensitive = aSensitive->GetConnected())
|
if (Handle(Select3D_SensitiveEntity) aNewSensitive = aSensitive->GetConnected())
|
||||||
@@ -271,7 +272,7 @@ void AIS_ConnectedInteractive::computeSubShapeSelection (const Handle(SelectMgr_
|
|||||||
Shapes2EntitiesMap aShapes2EntitiesMap;
|
Shapes2EntitiesMap aShapes2EntitiesMap;
|
||||||
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (aRefSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
|
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (aRefSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
|
||||||
{
|
{
|
||||||
if (const Handle(Select3D_SensitiveEntity)& aSE = aSelEntIter.Value()->BaseSensitive())
|
if (Handle(Select3D_SensitiveEntity) aSE = Handle(Select3D_SensitiveEntity)::DownCast (aSelEntIter.Value()->BaseSensitive()))
|
||||||
{
|
{
|
||||||
if (Handle(StdSelect_BRepOwner) anOwner = Handle(StdSelect_BRepOwner)::DownCast (aSE->OwnerId()))
|
if (Handle(StdSelect_BRepOwner) anOwner = Handle(StdSelect_BRepOwner)::DownCast (aSE->OwnerId()))
|
||||||
{
|
{
|
||||||
|
@@ -335,31 +335,31 @@ TCollection_ExtendedString AIS_Dimension::GetValueString (Standard_Real& theWidt
|
|||||||
if (myDrawer->DimensionAspect()->IsText3d())
|
if (myDrawer->DimensionAspect()->IsText3d())
|
||||||
{
|
{
|
||||||
// text width produced by BRepFont
|
// text width produced by BRepFont
|
||||||
Font_BRepFont aFont;
|
Font_BRepFont aFont (aTextAspect->Aspect()->Font().ToCString(),
|
||||||
if (aFont.FindAndInit (aTextAspect->Aspect()->Font(), aTextAspect->Aspect()->GetTextFontAspect(), aTextAspect->Height(), Font_StrictLevel_Any))
|
aTextAspect->Aspect()->GetTextFontAspect(),
|
||||||
|
aTextAspect->Height());
|
||||||
|
|
||||||
|
for (NCollection_Utf8Iter anIter = anUTFString.Iterator(); *anIter != 0; )
|
||||||
{
|
{
|
||||||
for (NCollection_Utf8Iter anIter = anUTFString.Iterator(); *anIter != 0; )
|
Standard_Utf32Char aCurrChar = *anIter;
|
||||||
{
|
Standard_Utf32Char aNextChar = *(++anIter);
|
||||||
Standard_Utf32Char aCurrChar = *anIter;
|
theWidth += aFont.AdvanceX (aCurrChar, aNextChar);
|
||||||
Standard_Utf32Char aNextChar = *(++anIter);
|
|
||||||
theWidth += aFont.AdvanceX (aCurrChar, aNextChar);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Text width for 1:1 scale 2D case
|
// Text width for 1:1 scale 2D case
|
||||||
Font_FTFontParams aFontParams;
|
Handle(Font_FTFont) aFont = new Font_FTFont();
|
||||||
aFontParams.PointSize = (unsigned int )aTextAspect->Height();
|
aFont->Init (aTextAspect->Aspect()->Font().ToCString(),
|
||||||
aFontParams.Resolution = THE_2D_TEXT_RESOLUTION;
|
aTextAspect->Aspect()->GetTextFontAspect(),
|
||||||
if (Handle(Font_FTFont) aFont = Font_FTFont::FindAndCreate (aTextAspect->Aspect()->Font(), aTextAspect->Aspect()->GetTextFontAspect(), aFontParams, Font_StrictLevel_Any))
|
(const unsigned int)aTextAspect->Height(),
|
||||||
|
THE_2D_TEXT_RESOLUTION);
|
||||||
|
|
||||||
|
for (NCollection_Utf8Iter anIter = anUTFString.Iterator(); *anIter != 0; )
|
||||||
{
|
{
|
||||||
for (NCollection_Utf8Iter anIter = anUTFString.Iterator(); *anIter != 0; )
|
Standard_Utf32Char aCurrChar = *anIter;
|
||||||
{
|
Standard_Utf32Char aNextChar = *(++anIter);
|
||||||
Standard_Utf32Char aCurrChar = *anIter;
|
theWidth += (Standard_Real) aFont->AdvanceX (aCurrChar, aNextChar);
|
||||||
Standard_Utf32Char aNextChar = *(++anIter);
|
|
||||||
theWidth += (Standard_Real) aFont->AdvanceX (aCurrChar, aNextChar);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -403,17 +403,16 @@ void AIS_Dimension::DrawArrow (const Handle(Prs3d_Presentation)& thePresentation
|
|||||||
anArrow->AddVertex (aRightPoint);
|
anArrow->AddVertex (aRightPoint);
|
||||||
|
|
||||||
// Set aspect for arrow triangles
|
// Set aspect for arrow triangles
|
||||||
Graphic3d_PolygonOffset aPolOffset;
|
Graphic3d_MaterialAspect aShadeMat (Graphic3d_NOM_DEFAULT);
|
||||||
aPolOffset.Mode = Aspect_POM_Off;
|
aShadeMat.SetReflectionModeOff (Graphic3d_TOR_AMBIENT);
|
||||||
aPolOffset.Factor = 0.0f;
|
aShadeMat.SetReflectionModeOff (Graphic3d_TOR_DIFFUSE);
|
||||||
aPolOffset.Units = 0.0f;
|
aShadeMat.SetReflectionModeOff (Graphic3d_TOR_SPECULAR);
|
||||||
Handle(Graphic3d_AspectFillArea3d) aShadingStyle = new Graphic3d_AspectFillArea3d();
|
|
||||||
aShadingStyle->SetInteriorStyle (Aspect_IS_SOLID);
|
|
||||||
aShadingStyle->SetColor (myDrawer->DimensionAspect()->ArrowAspect()->Aspect()->Color());
|
|
||||||
aShadingStyle->SetShadingModel (Graphic3d_TOSM_UNLIT);
|
|
||||||
aShadingStyle->SetPolygonOffset (aPolOffset);
|
|
||||||
|
|
||||||
aGroup->SetPrimitivesAspect (aShadingStyle);
|
Handle(Prs3d_ShadingAspect) aShadingStyle = new Prs3d_ShadingAspect();
|
||||||
|
aShadingStyle->SetColor (myDrawer->DimensionAspect()->ArrowAspect()->Aspect()->Color());
|
||||||
|
aShadingStyle->SetMaterial (aShadeMat);
|
||||||
|
|
||||||
|
aGroup->SetPrimitivesAspect (aShadingStyle->Aspect());
|
||||||
aGroup->AddPrimitiveArray (anArrow);
|
aGroup->AddPrimitiveArray (anArrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -531,9 +530,9 @@ void AIS_Dimension::drawText (const Handle(Prs3d_Presentation)& thePresentation,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Graphic3d_MaterialAspect aShadeMat (Graphic3d_NOM_DEFAULT);
|
Graphic3d_MaterialAspect aShadeMat (Graphic3d_NOM_DEFAULT);
|
||||||
aShadeMat.SetAmbientColor (Quantity_NOC_BLACK);
|
aShadeMat.SetReflectionModeOff (Graphic3d_TOR_AMBIENT);
|
||||||
aShadeMat.SetDiffuseColor (Quantity_NOC_BLACK);
|
aShadeMat.SetReflectionModeOff (Graphic3d_TOR_DIFFUSE);
|
||||||
aShadeMat.SetSpecularColor(Quantity_NOC_BLACK);
|
aShadeMat.SetReflectionModeOff (Graphic3d_TOR_SPECULAR);
|
||||||
myDrawer->ShadingAspect()->Aspect()->SetInteriorColor (aColor);
|
myDrawer->ShadingAspect()->Aspect()->SetInteriorColor (aColor);
|
||||||
myDrawer->ShadingAspect()->Aspect()->SetBackInteriorColor (aColor);
|
myDrawer->ShadingAspect()->Aspect()->SetBackInteriorColor (aColor);
|
||||||
myDrawer->ShadingAspect()->SetMaterial (aShadeMat);
|
myDrawer->ShadingAspect()->SetMaterial (aShadeMat);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user