Compare commits
73 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c30097d4ce | ||
|
871a52cf1b | ||
|
fc87027267 | ||
|
698faabef3 | ||
|
4f7d41eac3 | ||
|
a3d3777de9 | ||
|
510d969084 | ||
|
ae5225dfcd | ||
|
1ccef79a2a | ||
|
6822a3bef1 | ||
|
6dfdbb7ab8 | ||
|
7373e19fa1 | ||
|
e13b9464ef | ||
|
cbc4faa980 | ||
|
9b74e2071c | ||
|
11af6cddf5 | ||
|
c37f570215 | ||
|
759e2a15ca | ||
|
557916474b | ||
|
55a40de890 | ||
|
41bf7e0b3c | ||
|
6664a9c233 | ||
|
f84edf5816 | ||
|
d051064495 | ||
|
a38b44f172 | ||
|
f0bef12142 | ||
|
bc728d2621 | ||
|
eacdb38f2e | ||
|
10a55e0d05 | ||
|
f816395691 | ||
|
4563472c1e | ||
|
bad76cfc7a | ||
|
f84d6446a7 | ||
|
060811b1b5 | ||
|
fe76088cc7 | ||
|
0e443e130c | ||
|
229add784f | ||
|
8e45500e21 | ||
|
0575de6d7e | ||
|
41ea50ac6f | ||
|
384db46a5a | ||
|
7d13fd8ea3 | ||
|
f29de68237 | ||
|
6ca66a7dea | ||
|
834f289709 | ||
|
0f57ab750d | ||
|
0553a8ea99 | ||
|
1fa1615244 | ||
|
7f3408c8c8 | ||
|
3c9f082bb9 | ||
|
68df847802 | ||
|
8662560e2c | ||
|
39a349fdcb | ||
|
f46c2b39e6 | ||
|
130eb11405 | ||
|
50c4757387 | ||
|
9fb8f3f174 | ||
|
b1f350a2e1 | ||
|
fcd9a94e76 | ||
|
56c5a5979e | ||
|
97e9660965 | ||
|
0a0eec807d | ||
|
1167d6cc50 | ||
|
967905a364 | ||
|
8c088c52fc | ||
|
d9ca2e0cb1 | ||
|
9e04ccdcf8 | ||
|
81ce8c4de3 | ||
|
49225e2f5c | ||
|
d4efee2bfa | ||
|
06084bb8ec | ||
|
410dd2c903 | ||
|
a468bca87c |
129
CMakeLists.txt
@@ -32,7 +32,6 @@ if ("${BUILD_LIBRARY_TYPE}" STREQUAL "Shared")
|
||||
endif()
|
||||
else()
|
||||
unset (BUILD_SHARED_LIBS)
|
||||
message (STATUS "Info: Only 3rdparty's header files are used for building of static OCCT libraries")
|
||||
unset (BUILD_SHARED_LIBRARY_NAME_POSTFIX)
|
||||
endif()
|
||||
|
||||
@@ -344,8 +343,9 @@ set (BUILD_ADDITIONAL_TOOLKITS "" CACHE STRING "${BUILD_ADDITIONAL_TOOLKITS_DESC
|
||||
separate_arguments (BUILD_ADDITIONAL_TOOLKITS)
|
||||
|
||||
if (MSVC)
|
||||
set (BUILD_MODULE_MfcSamples OFF CACHE BOOL "${BUILD_MODULE_MfcSamples_DESCR}")
|
||||
set (BUILD_SAMPLES_MFC OFF CACHE BOOL "${BUILD_SAMPLES_MFC_DESCR}")
|
||||
endif()
|
||||
set (BUILD_SAMPLES_QT OFF CACHE BOOL "${BUILD_SAMPLES_QT_DESCR}")
|
||||
|
||||
set (BUILD_Inspector OFF CACHE BOOL "${BUILD_Inspector_DESCR}")
|
||||
|
||||
@@ -381,7 +381,7 @@ endif()
|
||||
# include the patched or original list of modules
|
||||
# list <MODULENAME>_TOOLKITS is created foreach module and contains its toolkits
|
||||
# list <OCCT_MODULES> will contain all modules
|
||||
OCCT_MODULES_AND_TOOLKITS (OCCT_MODULES)
|
||||
OCCT_MODULES_AND_TOOLKITS (MODULES "TOOLKITS" OCCT_MODULES)
|
||||
|
||||
foreach (OCCT_MODULE ${OCCT_MODULES})
|
||||
BUILD_MODULE (${OCCT_MODULE})
|
||||
@@ -702,11 +702,10 @@ else()
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_FLEX_EXECUTABLE")
|
||||
endif()
|
||||
|
||||
# check all 3rdparty include paths
|
||||
string (REGEX REPLACE ";" " " 3RDPARTY_NOT_INCLUDED "${3RDPARTY_NOT_INCLUDED}")
|
||||
|
||||
# check all 3rdparty paths
|
||||
if (3RDPARTY_NOT_INCLUDED)
|
||||
message (FATAL_ERROR "NOT FOUND: ${3RDPARTY_NOT_INCLUDED}" )
|
||||
message (FATAL_ERROR "Could not find headers of used third-party products: ${3RDPARTY_NOT_INCLUDED}" )
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_INCLUDE_DIRS)
|
||||
@@ -719,13 +718,28 @@ endif()
|
||||
# include <cmake binary folder>/inc
|
||||
include_directories (${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE})
|
||||
|
||||
if (3RDPARTY_LIBRARY_DIRS AND BUILD_SHARED_LIBS)
|
||||
# check all 3rdparty library paths
|
||||
string (REGEX REPLACE ";" " " 3RDPARTY_NO_LIBS "${3RDPARTY_NO_LIBS}")
|
||||
if (3RDPARTY_NO_LIBS)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
message (SEND_ERROR "Could not find libraries of used third-party products: ${3RDPARTY_NO_LIBS}" )
|
||||
else()
|
||||
message (WARNING "Could not find libraries of used third-party products: ${3RDPARTY_NO_LIBS}" )
|
||||
endif()
|
||||
endif()
|
||||
if (3RDPARTY_LIBRARY_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_LIBRARY_DIRS)
|
||||
string (REGEX REPLACE ";" "\n\t" 3RDPARTY_LIBRARY_DIRS_WITH_ENDS "${3RDPARTY_LIBRARY_DIRS}")
|
||||
message (STATUS "Info: The directories of 3rdparty libraries: \n\t${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
|
||||
link_directories (${3RDPARTY_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
# report not found 3rdparty dll paths
|
||||
string (REGEX REPLACE ";" " " 3RDPARTY_NO_DLLS "${3RDPARTY_NO_DLLS}")
|
||||
if (3RDPARTY_NO_DLLS)
|
||||
message (WARNING "Could not find DLLs of used third-party products: ${3RDPARTY_NO_DLLS}" )
|
||||
endif()
|
||||
|
||||
# build directories
|
||||
if (SINGLE_GENERATOR)
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BIN_LETTER}")
|
||||
@@ -775,30 +789,33 @@ else()
|
||||
set (SCRIPT_EXT sh)
|
||||
endif()
|
||||
|
||||
# OCCT tools
|
||||
# include the patched or original list of tools
|
||||
# list <TOOLNAME>_TOOLKITS is created foreach tool and contains its toolkits
|
||||
# list <OCCT_TOOLS> will contain all tools
|
||||
if (NOT BUILD_Inspector)
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_QT")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TQTMALLOC")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_QT")
|
||||
else()
|
||||
OCCT_TOOLS_AND_TOOLKITS (OCCT_TOOLS)
|
||||
foreach (OCCT_TOOL ${OCCT_TOOLS})
|
||||
list (APPEND BUILD_TOOL_TOOLKITS ${${OCCT_TOOL}_TOOL_TOOLKITS})
|
||||
endforeach()
|
||||
|
||||
# collect all the headers to <binary dir>/inc folder
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT tool header files into ${CMAKE_BINARY_DIR}/tools/inc ...")
|
||||
COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOL_TOOLKITS}" "${CMAKE_SOURCE_DIR}/tools" "${INSTALL_DIR_INCLUDE}/inspector")
|
||||
|
||||
|
||||
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
|
||||
# check qt 3rdparty path
|
||||
add_definitions (-DHAVE_QT)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/qt")
|
||||
message (STATUS "Info: Qt is used by OCCT")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_QT")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TQTMALLOC")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_QT")
|
||||
endif()
|
||||
|
||||
# OCCT tools
|
||||
# include the patched or original list of tools
|
||||
# list <TOOLNAME>_TOOLKITS is created foreach tool and contains its toolkits
|
||||
# list <OCCT_TOOLS> will contain all tools
|
||||
if (BUILD_Inspector)
|
||||
add_definitions (-DHAVE_Inspector)
|
||||
|
||||
OCCT_MODULES_AND_TOOLKITS (TOOLS "TOOL_TOOLKITS" OCCT_TOOLS)
|
||||
foreach (OCCT_TOOL ${OCCT_TOOLS})
|
||||
list (APPEND BUILD_TOOL_TOOLKITS ${${OCCT_TOOL}_TOOL_TOOLKITS})
|
||||
endforeach()
|
||||
|
||||
# collect all the headers to <binary dir>/inc/inspector folder
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT tool header files into ${CMAKE_BINARY_DIR}/inc/inspector ...")
|
||||
COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOL_TOOLKITS}" "${CMAKE_SOURCE_DIR}/tools" "${INSTALL_DIR_INCLUDE}/inspector")
|
||||
endif()
|
||||
|
||||
# OCCT samples
|
||||
@@ -896,9 +913,9 @@ OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.install.${SCRIPT_EXT}.in" "${S
|
||||
# write current custom.bat/sh (for build directory)
|
||||
OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
|
||||
|
||||
if (BUILD_MODULE_MfcSamples)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR_SCRIPT}")
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.bat" "${CMAKE_BINARY_DIR}")
|
||||
if (BUILD_SAMPLES_MFC OR BUILD_SAMPLES_QT)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}")
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
# env script for draw in building environment
|
||||
@@ -924,6 +941,15 @@ foreach(RESOURCE ${RESOURCES})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (BUILD_SAMPLES_QT)
|
||||
FILE_TO_LIST ("adm/SAMPLES_RESOURCES" SAMPLES_RESOURCES)
|
||||
foreach(RESOURCE ${SAMPLES_RESOURCES})
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/${RESOURCE}" "${INSTALL_DIR_RESOURCE}/samples")
|
||||
#message("Copy Sample resources: samples/${RESOURCE} into ${INSTALL_DIR_RESOURCE}/samples")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
# patch installed DrawDefault file if BUILD_SHARED_LIBRARY_NAME_POSTFIX is changed
|
||||
if (NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||
OCCT_UPDATE_DRAW_DEFAULT_FILE()
|
||||
@@ -968,9 +994,11 @@ endif()
|
||||
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) OCCT toolkits processed")
|
||||
# samples do not support patch usage
|
||||
if (BUILD_MODULE_MfcSamples)
|
||||
if (BUILD_SAMPLES_MFC OR BUILD_SAMPLES_QT)
|
||||
set (OCCT_ROOT ${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
if (BUILD_SAMPLES_MFC)
|
||||
set (MFC_STANDARD_SAMPLES_DIR ${OCCT_ROOT}/samples/mfc/standard)
|
||||
set (COMMON_WINMAIN_FILE ${MFC_STANDARD_SAMPLES_DIR}/Common/Winmain.cpp)
|
||||
|
||||
@@ -989,6 +1017,33 @@ if (BUILD_MODULE_MfcSamples)
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) MFC Sample projects added")
|
||||
endif()
|
||||
|
||||
OCCT_MODULES_AND_TOOLKITS (SAMPLES "SAMPLES_TOOLKITS" OCCT_SAMPLES)
|
||||
|
||||
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
|
||||
if (BUILD_SAMPLES_QT)
|
||||
if (NOT Qt5_FOUND OR "${Qt5Gui_EGL_INCLUDE_DIRS}" STREQUAL "" OR NOT WIN32)
|
||||
list (REMOVE_ITEM qt_SAMPLES_TOOLKITS AndroidQt)
|
||||
message (STATUS "Info: AndroidQt sample excluded due to OS is not Windows or Qt is configured without ANGLE")
|
||||
endif()
|
||||
else()
|
||||
list (REMOVE_ITEM OCCT_SAMPLES qt)
|
||||
message (STATUS "Info: qt samples excluded due to BUILD_SAMPLES_QT is disabled")
|
||||
endif()
|
||||
|
||||
foreach (OCCT_SAMPLE ${OCCT_SAMPLES})
|
||||
list (APPEND BUILD_SAMPLE_TOOLKITS ${${OCCT_SAMPLE}_SAMPLES_TOOLKITS})
|
||||
|
||||
# collect all the headers to <binary dir>/inc/samples folder
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) ${OCCT_SAMPLE} Sample projects added")
|
||||
|
||||
# include patched toolkit projects or original ones
|
||||
foreach (BUILD_SAMPLE_TOOLKIT ${${OCCT_SAMPLE}_SAMPLES_TOOLKITS})
|
||||
OCCT_ADD_SUBDIRECTORY ("samples/${OCCT_SAMPLE}/${BUILD_SAMPLE_TOOLKIT}")
|
||||
endforeach()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if (BUILD_MODULE_UwpSample)
|
||||
add_subdirectory(samples/xaml)
|
||||
endif()
|
||||
@@ -1003,13 +1058,9 @@ if (BUILD_TOOL_TOOLKITS)
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
endif()
|
||||
|
||||
set (BUILD_SAMPLE_TOOLKITS TInspectorEXE)
|
||||
foreach (BUILD_SAMPLE_TOOL_TOOLKIT ${BUILD_SAMPLE_TOOLKITS})
|
||||
OCCT_ADD_SUBDIRECTORY ("samples/tools/${BUILD_SAMPLE_TOOL_TOOLKIT}")
|
||||
endforeach()
|
||||
|
||||
set (OpenCASCADE_BINARY_DIR "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
# patch TInspectorEXE
|
||||
OCCT_CONFIGURE ("adm/templates/TInspectorEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/samples/tools/TInspectorEXE/TInspectorEXE.vcxproj.user")
|
||||
OCCT_CONFIGURE ("adm/templates/TInspectorEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/tools/TInspectorEXE/TInspectorEXE.vcxproj.user")
|
||||
endif()
|
||||
|
||||
# Prepare variables for configuration of OpenCASCADE cmake config file
|
||||
@@ -1095,10 +1146,6 @@ if (APPLE)
|
||||
set (SET_OpenCASCADE_WITH_GLX "set (OpenCASCADE_WITH_GLX ${USE_GLX})")
|
||||
endif()
|
||||
|
||||
if (NOT SINGLE_GENERATOR)
|
||||
OCCT_INSERT_CODE_FOR_TARGET()
|
||||
endif()
|
||||
|
||||
# Configure and install cmake config file
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/OpenCASCADEConfig.cmake.in" "OpenCASCADEConfig.cmake" @ONLY)
|
||||
install(FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfig.cmake" DESTINATION "${INSTALL_DIR_CMAKE}")
|
||||
|
1
adm/SAMPLES
Normal file
@@ -0,0 +1 @@
|
||||
qt AndroidQt FuncDemo IESample Tutorial
|
2
adm/SAMPLES_RESOURCES
Normal file
@@ -0,0 +1,2 @@
|
||||
qt/Common/res/
|
||||
qt/Tutorial/res/
|
@@ -1,4 +1,4 @@
|
||||
TModelingData TKShapeView
|
||||
TVisualization TKView TKVInspector
|
||||
TApplicationFramework TKTreeModel TKTInspectorAPI TKDFBrowser
|
||||
TTool TKTInspector TKToolsDraw
|
||||
TTool TKTInspector TKToolsDraw TInspectorEXE
|
@@ -117,7 +117,7 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
||||
|
||||
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
|
||||
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# if (BUILD_SHARED_LIBS)
|
||||
# library
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}")
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
|
||||
@@ -167,7 +167,7 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX})
|
||||
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX})
|
||||
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} "" CACHE FILEPATH "The path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
|
||||
endif()
|
||||
@@ -213,7 +213,7 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} OR EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX})
|
||||
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -311,7 +311,7 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
||||
endif()
|
||||
|
||||
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX})
|
||||
endif()
|
||||
# endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
|
@@ -140,7 +140,7 @@ foreach (LIBRARY_NAME ${CSF_FFmpeg})
|
||||
if (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME})
|
||||
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME})
|
||||
|
||||
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "The path to FFmpeg library (${LIBRARY_NAME})" FORCE)
|
||||
endif()
|
||||
@@ -167,7 +167,7 @@ foreach (LIBRARY_NAME ${CSF_FFmpeg})
|
||||
if (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} OR EXISTS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME})
|
||||
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -218,7 +218,7 @@ else()
|
||||
endif()
|
||||
|
||||
# freetype library
|
||||
if (BUILD_SHARED_LIBS)
|
||||
#if (BUILD_SHARED_LIBS)
|
||||
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
|
||||
|
||||
@@ -253,7 +253,7 @@ if (BUILD_SHARED_LIBS)
|
||||
if (3RDPARTY_FREETYPE_LIBRARY_DIR AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "The path to freetype library" FORCE)
|
||||
endif()
|
||||
@@ -290,7 +290,7 @@ if (BUILD_SHARED_LIBS)
|
||||
if (3RDPARTY_FREETYPE_DLL_DIR OR EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FREETYPE_DLL_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -345,7 +345,7 @@ if (BUILD_SHARED_LIBS)
|
||||
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_LIBRARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
#endif()
|
||||
|
||||
# unset all redundant variables
|
||||
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_ft2build)
|
||||
|
@@ -16,10 +16,9 @@ if (MSVC)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:precise")
|
||||
endif()
|
||||
|
||||
# set compiler short name and choose SSE2 option for appropriate MSVC compilers
|
||||
# ONLY for 32-bit
|
||||
# add SSE2 option for old MSVC compilers (VS 2005 - 2010, 32 bit only)
|
||||
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
if (MSVC80 OR MSVC90 OR MSVC10)
|
||||
if (MSVC AND ((MSVC_VERSION EQUAL 1400) OR (MSVC_VERSION EQUAL 1500) OR (MSVC_VERSION EQUAL 1600)))
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE2")
|
||||
endif()
|
||||
@@ -82,7 +81,7 @@ if (IS_DEBUG_C)
|
||||
string (REGEX REPLACE "-DDEBUG" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
|
||||
endif()
|
||||
# enable parallel compilation on MSVC 9 and above
|
||||
if (MSVC AND NOT MSVC70 AND NOT MSVC80)
|
||||
if (MSVC AND (MSVC_VERSION GREATER 1400))
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
endif()
|
||||
|
||||
|
@@ -60,25 +60,27 @@ endmacro()
|
||||
# COMPILER variable
|
||||
macro (OCCT_MAKE_COMPILER_SHORT_NAME)
|
||||
if (MSVC)
|
||||
if (MSVC70)
|
||||
if ((MSVC_VERSION EQUAL 1300) OR (MSVC_VERSION EQUAL 1310))
|
||||
set (COMPILER vc7)
|
||||
elseif (MSVC80)
|
||||
elseif (MSVC_VERSION EQUAL 1400)
|
||||
set (COMPILER vc8)
|
||||
elseif (MSVC90)
|
||||
elseif (MSVC_VERSION EQUAL 1500)
|
||||
set (COMPILER vc9)
|
||||
elseif (MSVC10)
|
||||
elseif (MSVC_VERSION EQUAL 1600)
|
||||
set (COMPILER vc10)
|
||||
elseif (MSVC11)
|
||||
elseif (MSVC_VERSION EQUAL 1700)
|
||||
set (COMPILER vc11)
|
||||
elseif (MSVC12)
|
||||
elseif (MSVC_VERSION EQUAL 1800)
|
||||
set (COMPILER vc12)
|
||||
elseif (MSVC14)
|
||||
elseif (MSVC_VERSION EQUAL 1900)
|
||||
set (COMPILER vc14)
|
||||
elseif (MSVC15)
|
||||
elseif ((MSVC_VERSION GREATER 1900) AND (MSVC_VERSION LESS 2000))
|
||||
# Since Visual Studio 15 (2017), its version diverged from version of
|
||||
# compiler which is 14.1; as that compiler uses the same run-time as 14.0,
|
||||
# we keep its id as "vc14" to be compatibille
|
||||
set (COMPILER vc14)
|
||||
else()
|
||||
message (FATAL_ERROR "Unrecognized MSVC_VERSION")
|
||||
endif()
|
||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCC)
|
||||
set (COMPILER gcc)
|
||||
@@ -500,11 +502,11 @@ function (OCCT_TOOLKIT_FULL_DEP TOOLKIT_NAME TOOLKIT_FULL_DEPS)
|
||||
set (${TOOLKIT_FULL_DEPS} ${LOCAL_TOOLKIT_FULL_DEPS} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Function to get list of modules and toolkits from file adm/MODULES.
|
||||
# Function to get list of modules/toolkits/samples from file adm/${FILE_NAME}.
|
||||
# Creates list <$MODULE_LIST> to store list of MODULES and
|
||||
# <NAME_OF_MODULE>_TOOLKITS foreach module to store its toolkits.
|
||||
function (OCCT_MODULES_AND_TOOLKITS MODULE_LIST)
|
||||
FILE_TO_LIST ("adm/MODULES" FILE_CONTENT)
|
||||
# <NAME_OF_MODULE>_TOOLKITS foreach module to store its toolkits, where "TOOLKITS" is defined by TOOLKITS_NAME_SUFFIX.
|
||||
function (OCCT_MODULES_AND_TOOLKITS FILE_NAME TOOLKITS_NAME_SUFFIX MODULE_LIST)
|
||||
FILE_TO_LIST ("adm/${FILE_NAME}" FILE_CONTENT)
|
||||
|
||||
foreach (CONTENT_LINE ${FILE_CONTENT})
|
||||
string (REPLACE " " ";" CONTENT_LINE ${CONTENT_LINE})
|
||||
@@ -512,30 +514,12 @@ function (OCCT_MODULES_AND_TOOLKITS MODULE_LIST)
|
||||
list (REMOVE_AT CONTENT_LINE 0)
|
||||
list (APPEND ${MODULE_LIST} ${MODULE_NAME})
|
||||
# (!) REMOVE THE LINE BELOW (implicit variables)
|
||||
set (${MODULE_NAME}_TOOLKITS ${CONTENT_LINE} PARENT_SCOPE)
|
||||
set (${MODULE_NAME}_${TOOLKITS_NAME_SUFFIX} ${CONTENT_LINE} PARENT_SCOPE)
|
||||
endforeach()
|
||||
|
||||
set (${MODULE_LIST} ${${MODULE_LIST}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Function to get list of tools and toolkits from file adm/TOOLS.
|
||||
# Creates list <$TOOL_LIST> to store list of TOOLS and
|
||||
# <NAME_OF_TOOL>_TOOLKITS foreach tool to store its toolkits.
|
||||
function (OCCT_TOOLS_AND_TOOLKITS TOOL_LIST)
|
||||
FILE_TO_LIST ("adm/TOOLS" FILE_CONTENT)
|
||||
|
||||
foreach (CONTENT_LINE ${FILE_CONTENT})
|
||||
string (REPLACE " " ";" CONTENT_LINE ${CONTENT_LINE})
|
||||
list (GET CONTENT_LINE 0 TOOL_NAME)
|
||||
list (REMOVE_AT CONTENT_LINE 0)
|
||||
list (APPEND ${TOOL_LIST} ${TOOL_NAME})
|
||||
# (!) REMOVE THE LINE BELOW (implicit variables)
|
||||
set (${TOOL_NAME}_TOOL_TOOLKITS ${CONTENT_LINE} PARENT_SCOPE)
|
||||
endforeach()
|
||||
|
||||
set (${TOOL_LIST} ${${TOOL_LIST}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Returns OCC version string from file Standard_Version.hxx (if available)
|
||||
function (OCC_VERSION OCC_VERSION_MAJOR OCC_VERSION_MINOR OCC_VERSION_MAINTENANCE OCC_VERSION_DEVELOPMENT OCC_VERSION_STRING_EXT)
|
||||
|
||||
@@ -601,7 +585,7 @@ endmacro()
|
||||
# prior to version 3.3 not supporting per-configuration install paths
|
||||
# for install target files (see https://cmake.org/Bug/view.php?id=14317)
|
||||
macro (OCCT_UPDATE_TARGET_FILE)
|
||||
if (NOT SINGLE_GENERATOR)
|
||||
if (WIN32)
|
||||
OCCT_INSERT_CODE_FOR_TARGET ()
|
||||
endif()
|
||||
|
||||
|
@@ -1,31 +1,69 @@
|
||||
# script for each OCCT toolkit
|
||||
|
||||
# parce PACKAGES file
|
||||
if ("${PROJECT_NAME}" STREQUAL DRAWEXE)
|
||||
set (USED_PACKAGES DRAWEXE)
|
||||
else()
|
||||
FILE_TO_LIST ("src/${PROJECT_NAME}/PACKAGES" USED_PACKAGES)
|
||||
# filling some variables by default values(src) or using custom(tools, samples)
|
||||
set (RELATIVE_SOURCES_DIR "${RELATIVE_DIR}")
|
||||
if ("${RELATIVE_SOURCES_DIR}" STREQUAL "")
|
||||
#if it is not defined, use default directory
|
||||
set (RELATIVE_SOURCES_DIR "src")
|
||||
endif()
|
||||
|
||||
set (OCC_MODULES_LIST "${MODULES_LIST}")
|
||||
if ("${OCC_MODULES_LIST}" STREQUAL "")
|
||||
set (OCC_MODULES_LIST ${OCCT_MODULES})
|
||||
endif()
|
||||
|
||||
set (OCC_TARGET_FOLDER "${TARGET_FOLDER}")
|
||||
if ("${OCC_TARGET_FOLDER}" STREQUAL "")
|
||||
set (OCC_TARGET_FOLDER "Modules")
|
||||
endif()
|
||||
|
||||
set (OCCT_TOOLKITS_NAME_SUFFIX "${TOOLKITS_NAME_SUFFIX}")
|
||||
if ("${OCCT_TOOLKITS_NAME_SUFFIX}" STREQUAL "")
|
||||
set (OCCT_TOOLKITS_NAME_SUFFIX "TOOLKITS")
|
||||
endif()
|
||||
|
||||
# parce PACKAGES file
|
||||
FILE_TO_LIST ("${RELATIVE_SOURCES_DIR}/${PROJECT_NAME}/PACKAGES" USED_PACKAGES)
|
||||
if ("${USED_PACKAGES}" STREQUAL "")
|
||||
set (USED_PACKAGES ${PROJECT_NAME})
|
||||
endif()
|
||||
|
||||
if (USE_QT)
|
||||
# Qt dependencies
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/qt_macro)
|
||||
FIND_QT_PACKAGE(PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT_INCLUDES)
|
||||
include_directories("${PROJECT_INCLUDES}")
|
||||
endif(USE_QT)
|
||||
|
||||
set (PRECOMPILED_DEFS)
|
||||
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
list (APPEND PRECOMPILED_DEFS "-DOCCT_NO_PLUGINS")
|
||||
if (WIN32)
|
||||
list (APPEND PRECOMPILED_DEFS "-DHAVE_NO_DLL")
|
||||
list (APPEND PRECOMPILED_DEFS "-DOCCT_STATIC_BUILD")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Get all used packages from toolkit
|
||||
UNSET(RESOURCE_FILES)
|
||||
foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
|
||||
|
||||
#remove part after "/" in the OCCT_PACKAGE variable if exists
|
||||
string (FIND "${OCCT_PACKAGE}" "/" _index)
|
||||
if (_index GREATER -1)
|
||||
math (EXPR _index "${_index}")
|
||||
string (SUBSTRING "${OCCT_PACKAGE}" 0 ${_index} OCCT_PACKAGE_NAME)
|
||||
else()
|
||||
set (OCCT_PACKAGE_NAME "${OCCT_PACKAGE}")
|
||||
endif()
|
||||
|
||||
# TKService contains platform-dependent packages: Xw and WNT
|
||||
if ((WIN32 AND "${OCCT_PACKAGE}" STREQUAL "Xw") OR (NOT WIN32 AND "${OCCT_PACKAGE}" STREQUAL "WNT"))
|
||||
# do nothing
|
||||
else()
|
||||
|
||||
if (WIN32)
|
||||
list (APPEND PRECOMPILED_DEFS "-D__${OCCT_PACKAGE}_DLL")
|
||||
list (APPEND PRECOMPILED_DEFS "-D__${OCCT_PACKAGE_NAME}_DLL")
|
||||
endif()
|
||||
|
||||
set (SOURCE_FILES)
|
||||
@@ -35,11 +73,11 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
if (${BUILD_YACCLEX})
|
||||
|
||||
# flex files
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
|
||||
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
|
||||
|
||||
# bison files
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
|
||||
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
|
||||
|
||||
if (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0)
|
||||
@@ -61,8 +99,8 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})
|
||||
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.c)
|
||||
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.c)
|
||||
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${BISON_OUTPUT_FILE} COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME}")
|
||||
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${FLEX_OUTPUT_FILE} COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME}")
|
||||
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${BISON_OUTPUT_FILE} COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME}")
|
||||
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${FLEX_OUTPUT_FILE} COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME}")
|
||||
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
|
||||
|
||||
list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE})
|
||||
@@ -72,23 +110,23 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
endif()
|
||||
|
||||
# header files
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES")
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES")
|
||||
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
if(APPLE)
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
endif()
|
||||
else()
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
if(APPLE)
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -99,26 +137,36 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
endif()
|
||||
|
||||
foreach(HEADER_FILE ${HEADER_FILES})
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
list (APPEND USED_INCFILES "${BUILD_PATCH}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${BUILD_PATCH}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
list (APPEND USED_INCFILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE_NAME}" FILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
else()
|
||||
list (APPEND USED_INCFILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
list (APPEND USED_INCFILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE_NAME}" FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(SOURCE_FILE ${SOURCE_FILES})
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
list (APPEND USED_SRCFILES "${BUILD_PATCH}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${BUILD_PATCH}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
list (APPEND USED_SRCFILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE_NAME}" FILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
else()
|
||||
list (APPEND USED_SRCFILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
list (APPEND USED_SRCFILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE_NAME}" FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (USE_QT)
|
||||
FIND_AND_INSTALL_QT_RESOURCES (${OCCT_PACKAGE} RESOURCE_FILES)
|
||||
#message("Qt Resource files are: ${QT_RESOURCE_FILES} in ${OCCT_PACKAGE}")
|
||||
endif(USE_QT)
|
||||
|
||||
#message("Resource files are: ${RESOURCE_FILES} in ${OCCT_PACKAGE}")
|
||||
foreach(RESOURCE_FILE ${RESOURCE_FILES})
|
||||
SOURCE_GROUP ("Resource Files\\${OCCT_PACKAGE_NAME}" FILES "${RESOURCE_FILE}")
|
||||
endforeach()
|
||||
endif()
|
||||
endforeach()
|
||||
string (REGEX REPLACE ";" " " PRECOMPILED_DEFS "${PRECOMPILED_DEFS}")
|
||||
@@ -135,24 +183,30 @@ if (MSVC)
|
||||
endif()
|
||||
|
||||
set (CURRENT_MODULE)
|
||||
foreach (OCCT_MODULE ${OCCT_MODULES})
|
||||
list (FIND ${OCCT_MODULE}_TOOLKITS ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
|
||||
foreach (OCCT_MODULE ${OCC_MODULES_LIST})
|
||||
list (FIND ${OCCT_MODULE}_${OCCT_TOOLKITS_NAME_SUFFIX} ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
|
||||
|
||||
if (NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
|
||||
set (CURRENT_MODULE ${OCCT_MODULE})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (NOT SINGLE_GENERATOR)
|
||||
if (WIN32)
|
||||
OCCT_INSERT_CODE_FOR_TARGET ()
|
||||
endif()
|
||||
|
||||
if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
||||
if (USE_QT)
|
||||
FIND_AND_WRAP_MOC_FILES("${USED_INCFILES}" "${PROJECT_NAME}_MOC_FILES")
|
||||
#message("MOC files: ${${PROJECT_NAME}_MOC_FILES}")
|
||||
endif (USE_QT)
|
||||
|
||||
if (EXECUTABLE_PROJECT)
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
else()
|
||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
|
||||
|
||||
if (MSVC)
|
||||
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb
|
||||
@@ -181,7 +235,7 @@ else()
|
||||
endif()
|
||||
|
||||
if (CURRENT_MODULE)
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "Modules/${CURRENT_MODULE}")
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "${OCC_TARGET_FOLDER}/${CURRENT_MODULE}")
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES MODULE "${CURRENT_MODULE}")
|
||||
if (APPLE)
|
||||
if (NOT "${INSTALL_NAME_DIR}" STREQUAL "")
|
||||
@@ -207,7 +261,7 @@ set (USED_TOOLKITS_BY_CURRENT_PROJECT)
|
||||
set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
|
||||
|
||||
# parce EXTERNLIB file
|
||||
FILE_TO_LIST ("src/${PROJECT_NAME}/EXTERNLIB" USED_EXTERNLIB_AND_TOOLKITS)
|
||||
FILE_TO_LIST ("${RELATIVE_SOURCES_DIR}/${PROJECT_NAME}/EXTERNLIB" USED_EXTERNLIB_AND_TOOLKITS)
|
||||
foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
|
||||
string (REGEX MATCH "^ *#" COMMENT_FOUND ${USED_ITEM})
|
||||
if (NOT COMMENT_FOUND)
|
||||
@@ -303,6 +357,15 @@ if (BUILD_SHARED_LIBS)
|
||||
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
|
||||
endif()
|
||||
|
||||
if (USE_QT)
|
||||
foreach (PROJECT_LIBRARY_DEBUG ${PROJECT_LIBRARIES_DEBUG})
|
||||
target_link_libraries (${PROJECT_NAME} debug ${PROJECT_LIBRARY_DEBUG})
|
||||
endforeach()
|
||||
foreach (PROJECT_LIBRARY_RELEASE ${PROJECT_LIBRARIES_RELEASE})
|
||||
target_link_libraries (${PROJECT_NAME} optimized ${PROJECT_LIBRARY_RELEASE})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# suppress deprecation warnings inside OCCT itself for old gcc versions with unavailable Standard_DISABLE_DEPRECATION_WARNINGS
|
||||
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6.0)
|
||||
|
18
adm/cmake/occt_toolkit_prepare_sample.cmake
Normal file
@@ -0,0 +1,18 @@
|
||||
if ("${TARGET_FOLDER}" STREQUAL "")
|
||||
set (EXECUTABLE_PROJECT ON)
|
||||
set (USE_QT ON)
|
||||
|
||||
set (RELATIVE_DIR "samples/qt")
|
||||
set (MODULES_LIST ${OCCT_SAMPLES})
|
||||
set (TARGET_FOLDER "Samples")
|
||||
set (TOOLKITS_NAME_SUFFIX "SAMPLES_TOOLKITS")
|
||||
|
||||
include_directories("${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}/${RELATIVE_DIR}")
|
||||
else()
|
||||
unset (USE_QT)
|
||||
unset (RELATIVE_DIR)
|
||||
unset (EXECUTABLE_PROJECT)
|
||||
unset (MODULES_LIST)
|
||||
unset (TARGET_FOLDER)
|
||||
unset (TOOLKITS_NAME_SUFFIX)
|
||||
endif("${TARGET_FOLDER}" STREQUAL "")
|
13
adm/cmake/occt_toolkit_prepare_tool.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
if ("${TARGET_FOLDER}" STREQUAL "")
|
||||
set (USE_QT ON)
|
||||
set (RELATIVE_DIR "tools")
|
||||
set (MODULES_LIST ${OCCT_TOOLS})
|
||||
set (TARGET_FOLDER "Tools")
|
||||
set (TOOLKITS_NAME_SUFFIX "TOOL_TOOLKITS")
|
||||
else()
|
||||
unset (USE_QT)
|
||||
unset (RELATIVE_DIR)
|
||||
unset (MODULES_LIST)
|
||||
unset (TARGET_FOLDER)
|
||||
unset (TOOLKITS_NAME_SUFFIX)
|
||||
endif("${TARGET_FOLDER}" STREQUAL "")
|
@@ -1,304 +0,0 @@
|
||||
# script for each OCCT tool toolkit
|
||||
|
||||
# Qt dependencies
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/qt_macro)
|
||||
|
||||
FIND_QT_PACKAGE(PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT_INCLUDES)
|
||||
include_directories("${PROJECT_INCLUDES}"
|
||||
"${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}/tools")
|
||||
|
||||
FILE_TO_LIST ("tools/${PROJECT_NAME}/PACKAGES" USED_PACKAGES)
|
||||
# parce PACKAGES file
|
||||
|
||||
if ("${PROJECT_NAME}" STREQUAL TInspectorEXE)
|
||||
set (USED_PACKAGES ${PROJECT_NAME})
|
||||
set (PACKAGE_PREFIX_DIR "samples/tools")
|
||||
include_directories("${PROJECT_INCLUDES}"
|
||||
"${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${PROJECT_NAME}")
|
||||
else()
|
||||
FILE_TO_LIST ("tools/${PROJECT_NAME}/PACKAGES" USED_PACKAGES)
|
||||
set (PACKAGE_PREFIX_DIR "tools")
|
||||
endif()
|
||||
|
||||
|
||||
SET (RCC_FILES)
|
||||
foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
|
||||
#message("Sources are ${SOURCE_FILES_C}")
|
||||
FIND_AND_WRAP_MOC_FILES("${SOURCE_FILES_C}")
|
||||
|
||||
#message("Dir is ${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${OCCT_PACKAGE}/${OCCT_PACKAGE}.qrc")
|
||||
FIND_AND_WRAP_RESOURCE_FILE("${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${OCCT_PACKAGE}/${OCCT_PACKAGE}.qrc" RCC_FILES)
|
||||
endforeach()
|
||||
#message("RCC_FILES for ${PROJECT_NAME} are ${RCC_FILES}")
|
||||
|
||||
set (PRECOMPILED_DEFS)
|
||||
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
list (APPEND PRECOMPILED_DEFS "-DOCCT_NO_PLUGINS")
|
||||
if (WIN32)
|
||||
list (APPEND PRECOMPILED_DEFS "-DHAVE_NO_DLL")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Get all used packages from toolkit
|
||||
foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
|
||||
ADD_DEFINITIONS(-D${OCCT_PACKAGE}_EXPORTS)
|
||||
|
||||
# TKService contains platform-dependent packages: Xw and WNT
|
||||
if ((WIN32 AND "${OCCT_PACKAGE}" STREQUAL "Xw") OR (NOT WIN32 AND "${OCCT_PACKAGE}" STREQUAL "WNT"))
|
||||
# do nothing
|
||||
else()
|
||||
|
||||
if (WIN32)
|
||||
list (APPEND PRECOMPILED_DEFS "-D__${OCCT_PACKAGE}_DLL")
|
||||
endif()
|
||||
|
||||
set (SOURCE_FILES)
|
||||
set (HEADER_FILES)
|
||||
|
||||
# Generate Flex and Bison files
|
||||
if (${BUILD_YACCLEX})
|
||||
|
||||
# flex files
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("tools/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
|
||||
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
|
||||
|
||||
# bison files
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("tools/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
|
||||
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
|
||||
|
||||
if (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0)
|
||||
|
||||
list (SORT SOURCE_FILES_FLEX)
|
||||
list (SORT SOURCE_FILES_BISON)
|
||||
|
||||
math (EXPR SOURCE_FILES_FLEX_LEN "${SOURCE_FILES_FLEX_LEN} - 1")
|
||||
foreach (FLEX_FILE_INDEX RANGE ${SOURCE_FILES_FLEX_LEN})
|
||||
|
||||
list (GET SOURCE_FILES_FLEX ${FLEX_FILE_INDEX} CURRENT_FLEX_FILE)
|
||||
get_filename_component (CURRENT_FLEX_FILE_NAME ${CURRENT_FLEX_FILE} NAME_WE)
|
||||
|
||||
list (GET SOURCE_FILES_BISON ${FLEX_FILE_INDEX} CURRENT_BISON_FILE)
|
||||
get_filename_component (CURRENT_BISON_FILE_NAME ${CURRENT_BISON_FILE} NAME_WE)
|
||||
|
||||
string (COMPARE EQUAL ${CURRENT_FLEX_FILE_NAME} ${CURRENT_BISON_FILE_NAME} ARE_FILES_EQUAL)
|
||||
|
||||
if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})
|
||||
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.c)
|
||||
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.c)
|
||||
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} ${CMAKE_SOURCE_DIR}/tools/${OCCT_PACKAGE}/${BISON_OUTPUT_FILE} COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME}")
|
||||
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} ${CMAKE_SOURCE_DIR}/tools/${OCCT_PACKAGE}/${FLEX_OUTPUT_FILE} COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME}")
|
||||
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
|
||||
|
||||
list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# header files
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/tools/${OCCT_PACKAGE}/FILES")
|
||||
file (STRINGS "${BUILD_PATCH}/tools/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${BUILD_PATCH}/tools/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${BUILD_PATCH}/tools/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
|
||||
file (STRINGS "${BUILD_PATCH}/tools/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
if(APPLE)
|
||||
file (STRINGS "${BUILD_PATCH}/tools/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
endif()
|
||||
else()
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
if(APPLE)
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
list (APPEND HEADER_FILES ${HEADER_FILES_M} ${HEADER_FILES_LXX} ${SOURCE_FILES_GXX})
|
||||
list (APPEND SOURCE_FILES ${SOURCE_FILES_C})
|
||||
if(APPLE)
|
||||
list (APPEND SOURCE_FILES ${SOURCE_FILES_M})
|
||||
endif()
|
||||
|
||||
foreach(HEADER_FILE ${HEADER_FILES})
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/tools/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/tools/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
list (APPEND USED_INCFILES "${BUILD_PATCH}/tools/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${BUILD_PATCH}/tools/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
else()
|
||||
list (APPEND USED_INCFILES "${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
foreach(SOURCE_FILE ${SOURCE_FILES})
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/tools/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/tools/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
list (APPEND USED_SRCFILES "${BUILD_PATCH}/tools/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${BUILD_PATCH}/tools/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
else()
|
||||
list (APPEND USED_SRCFILES "${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/${PACKAGE_PREFIX_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endforeach()
|
||||
string (REGEX REPLACE ";" " " PRECOMPILED_DEFS "${PRECOMPILED_DEFS}")
|
||||
|
||||
set (USED_RCFILE "")
|
||||
if (MSVC)
|
||||
set (USED_RCFILE "${CMAKE_BINARY_DIR}/resources/${PROJECT_NAME}.rc")
|
||||
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in")
|
||||
configure_file("${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
|
||||
else()
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (CURRENT_MODULE)
|
||||
foreach (OCCT_MODULE ${OCCT_TOOLS})
|
||||
list (FIND ${OCCT_MODULE}_TOOL_TOOLKITS ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
|
||||
if (NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
|
||||
set (CURRENT_MODULE ${OCCT_MODULE})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (NOT SINGLE_GENERATOR)
|
||||
OCCT_INSERT_CODE_FOR_TARGET ()
|
||||
endif()
|
||||
|
||||
if ("${PROJECT_NAME}" STREQUAL TInspectorEXE)
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RCC_FILES})
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
else()
|
||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RCC_FILES})
|
||||
|
||||
if (MSVC)
|
||||
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb
|
||||
CONFIGURATIONS Debug RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||
set (CMAKE_SHARED_LIBRARY_SUFFIX_DEFAULT ${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set (CMAKE_SHARED_LIBRARY_SUFFIX "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
EXPORT OpenCASCADE${CURRENT_MODULE}Targets
|
||||
RUNTIME DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
|
||||
|
||||
if (NOT WIN32)
|
||||
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||
set (LINK_NAME "${INSTALL_DIR}/${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX_DEFAULT}/tools")
|
||||
set (LIBRARY_NAME "${INSTALL_DIR}/${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}/tools")
|
||||
OCCT_CREATE_SYMLINK_TO_FILE (${LIBRARY_NAME} ${LINK_NAME})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CURRENT_MODULE)
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "Tools/${CURRENT_MODULE}")
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES MODULE "${CURRENT_MODULE}")
|
||||
if (APPLE)
|
||||
if (NOT "${INSTALL_NAME_DIR}" STREQUAL "")
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "${INSTALL_NAME_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
get_property (OCC_VERSION_MAJOR GLOBAL PROPERTY OCC_VERSION_MAJOR)
|
||||
get_property (OCC_VERSION_MINOR GLOBAL PROPERTY OCC_VERSION_MINOR)
|
||||
get_property (OCC_VERSION_MAINTENANCE GLOBAL PROPERTY OCC_VERSION_MAINTENANCE)
|
||||
|
||||
if (ANDROID)
|
||||
# do not append version to the filename
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
|
||||
else()
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
|
||||
SOVERSION "${OCC_VERSION_MAJOR}"
|
||||
VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
|
||||
endif()
|
||||
|
||||
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
|
||||
set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
|
||||
|
||||
# parce EXTERNLIB file
|
||||
FILE_TO_LIST ("${PACKAGE_PREFIX_DIR}/${PROJECT_NAME}/EXTERNLIB" USED_EXTERNLIB_AND_TOOLKITS)
|
||||
foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
|
||||
string (REGEX MATCH "^ *#" COMMENT_FOUND ${USED_ITEM})
|
||||
if (NOT COMMENT_FOUND)
|
||||
string (REGEX MATCH "^TK" TK_FOUND ${USED_ITEM})
|
||||
string (REGEX MATCH "^vtk" VTK_FOUND ${USED_ITEM})
|
||||
|
||||
if (NOT "${TK_FOUND}" STREQUAL "" OR NOT "${VTK_FOUND}" STREQUAL "")
|
||||
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
|
||||
if (NOT "${VTK_FOUND}" STREQUAL "" AND BUILD_SHARED_LIBS AND INSTALL_VTK AND COMMAND OCCT_INSTALL_VTK)
|
||||
OCCT_INSTALL_VTK(${USED_ITEM})
|
||||
endif()
|
||||
else()
|
||||
string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM})
|
||||
if ("${CSF_FOUND}" STREQUAL "")
|
||||
message (STATUS "Info: ${USED_ITEM} from ${PROJECT_NAME} skipped due to it is empty")
|
||||
else() # get CSF_ value
|
||||
set (CURRENT_CSF ${${USED_ITEM}})
|
||||
if (NOT "x${CURRENT_CSF}" STREQUAL "x")
|
||||
# prepare a list from a string with whitespaces
|
||||
separate_arguments (CURRENT_CSF)
|
||||
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (APPLE)
|
||||
list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
|
||||
if (NOT ${IS_X11_FOUND} EQUAL -1)
|
||||
find_package (X11 COMPONENTS X11 Xext Xmu Xi)
|
||||
if (NOT X11_FOUND)
|
||||
message (STATUS "Warning: X11 is not found. It's required to install The XQuartz project: http://www.xquartz.org")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Update list of used VTK libraries if OpenGL2 Rendering BackEnd is used.
|
||||
# Add VTK_OPENGL2_BACKEND definition.
|
||||
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
|
||||
add_definitions(-DVTK_OPENGL2_BACKEND)
|
||||
foreach (VTK_EXCLUDE_LIBRARY vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL)
|
||||
list (FIND USED_TOOLKITS_BY_CURRENT_PROJECT "${VTK_EXCLUDE_LIBRARY}" IS_VTK_OPENGL_FOUND)
|
||||
if (NOT ${IS_VTK_OPENGL_FOUND} EQUAL -1)
|
||||
list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT ${VTK_EXCLUDE_LIBRARY})
|
||||
if (${VTK_EXCLUDE_LIBRARY} STREQUAL vtkRenderingOpenGL)
|
||||
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingOpenGL2)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
|
||||
endif()
|
||||
|
||||
# Set Qt dependencies
|
||||
target_link_libraries(${PROJECT_NAME} "${PROJECT_LIBRARIES}")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} debug "${PROJECT_LIBRARIES_DEBUG}")
|
||||
target_link_libraries(${PROJECT_NAME} optimized "${PROJECT_LIBRARIES_RELEASE}")
|
||||
|
@@ -7,8 +7,8 @@ THIRDPARTY_PRODUCT("QT" "" "CSF_QtCore" "d")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_QT_DIR}/bin")
|
||||
|
||||
list (REMOVE_ITEM 3RDPARTY_NOT_INCLUDED "3RDPARTY_QT_INCLUDE_DIR")
|
||||
list (REMOVE_ITEM 3RDPARTY_NOT_INCLUDED "3RDPARTY_QT_LIBRARY_DIR")
|
||||
list (REMOVE_ITEM 3RDPARTY_NOT_INCLUDED "3RDPARTY_QT_DLL_DIR")
|
||||
list (REMOVE_ITEM 3RDPARTY_NO_LIBS "3RDPARTY_QT_LIBRARY_DIR")
|
||||
list (REMOVE_ITEM 3RDPARTY_NO_DLLS "3RDPARTY_QT_DLL_DIR")
|
||||
|
||||
UNSET (${3RDPARTY_QT_DLL} CACHE)
|
||||
UNSET (${3RDPARTY_QT_DLL_DIR} CACHE)
|
||||
@@ -18,3 +18,19 @@ UNSET (${3RDPARTY_QT_LIBRARY_DIR} CACHE)
|
||||
|
||||
set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}")
|
||||
message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}")
|
||||
|
||||
# Now set CMAKE_PREFIX_PATH to point to local Qt installation.
|
||||
# Without this setting find_package() will not work
|
||||
set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR})
|
||||
|
||||
# Now we can apply standard CMake finder for Qt5. We do this mostly
|
||||
# to have qt5_wrap_cpp() function available and Qt5_FOUND variable filled
|
||||
find_package(Qt5 QUIET COMPONENTS Widgets Quick Xml PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH)
|
||||
if (NOT ${Qt5_FOUND})
|
||||
# Now we can apply standard CMake finder for Qt. We do this mostly
|
||||
# to have qt4_wrap_cpp() function available
|
||||
find_package(Qt4)
|
||||
#message (STATUS "Qt4 cmake configuration")
|
||||
else()
|
||||
#message (STATUS "Qt5 cmake configuration")
|
||||
endif()
|
||||
|
@@ -6,51 +6,50 @@ macro (FIND_QT_PACKAGE PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT
|
||||
message (FATAL_ERROR "Empty Qt dir")
|
||||
endif()
|
||||
|
||||
# Now set CMAKE_PREFIX_PATH to point to local Qt installation.
|
||||
# Without this setting find_package() will not work
|
||||
set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR})
|
||||
|
||||
# Now we can apply standard CMake finder for Qt5. We do this mostly
|
||||
# to have qt5_wrap_cpp() function available
|
||||
find_package(Qt5 QUIET COMPONENTS Widgets PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH)
|
||||
if (${Qt5_FOUND})
|
||||
#message (STATUS "Qt5 cmake configuration")
|
||||
|
||||
set(PROJECT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS}")
|
||||
set(PROJECT_LIBRARIES_DEBUG "${Qt5Widgets_LIBRARIES}")
|
||||
set(PROJECT_LIBRARIES_RELEASE "${Qt5Widgets_LIBRARIES}")
|
||||
else()
|
||||
# Now we can apply standard CMake finder for Qt. We do this mostly
|
||||
# to have qt4_wrap_cpp() function available
|
||||
find_package(Qt4)
|
||||
set(PROJECT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS}" "${Qt5Quick_INCLUDE_DIRS}" "${Qt5Xml_INCLUDE_DIRS}")
|
||||
set(PROJECT_LIBRARIES_DEBUG "${Qt5Widgets_LIBRARIES}" "${Qt5Quick_LIBRARIES}" "${Qt5Xml_LIBRARIES}")
|
||||
set(PROJECT_LIBRARIES_RELEASE "${Qt5Widgets_LIBRARIES}" "${Qt5Quick_LIBRARIES}" "${Qt5Xml_LIBRARIES}")
|
||||
|
||||
# processing *.ts files to generate *.qm
|
||||
find_package(Qt5LinguistTools)
|
||||
get_target_property(QT_LRELEASE_EXECUTABLE Qt5::lrelease LOCATION)
|
||||
mark_as_advanced(QT_LRELEASE_EXECUTABLE)
|
||||
|
||||
GET_FILENAME_COMPONENT(QT_BINARY_DIR ${QT_LRELEASE_EXECUTABLE} DIRECTORY)
|
||||
MARK_AS_ADVANCED(QT_BINARY_DIR)
|
||||
else()
|
||||
#message (STATUS "Qt4 cmake configuration")
|
||||
set(PROJECT_INCLUDES ${QT_INCLUDES})
|
||||
if (WIN32)
|
||||
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/QtCored4.lib;${3RDPARTY_QT_DIR}/lib/QtGuid4.lib")
|
||||
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/QtCore4.lib;${3RDPARTY_QT_DIR}/lib/QtGui4.lib")
|
||||
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/QtCored4.lib;${3RDPARTY_QT_DIR}/lib/QtGuid4.lib;${3RDPARTY_QT_DIR}/lib/QtXmld4.lib")
|
||||
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/QtCore4.lib;${3RDPARTY_QT_DIR}/lib/QtGui4.lib;${3RDPARTY_QT_DIR}/lib/QtXml4.lib")
|
||||
else()
|
||||
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so")
|
||||
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so")
|
||||
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so;${3RDPARTY_QT_DIR}/lib/libQtXml.so")
|
||||
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so;${3RDPARTY_QT_DIR}/lib/libQtXml.so")
|
||||
endif(WIN32)
|
||||
find_program(QT_LRELEASE_EXECUTABLE lrelease)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
macro (FIND_AND_WRAP_MOC_FILES SOURCE_FILES)
|
||||
|
||||
SET(CMAKE_AUTOMOC ON)
|
||||
|
||||
foreach (FILE ${SOURCE_FILES})
|
||||
set (src_files ${src_files} ${FILE})
|
||||
unset (MOC_FILE)
|
||||
if (${Qt5_FOUND})
|
||||
qt5_wrap_cpp(MOC_FILE ${FILE})
|
||||
else()
|
||||
qt4_wrap_cpp(MOC_FILE ${FILE})
|
||||
endif()
|
||||
#message (STATUS "... Info: next MOC file ${MOC_FILE}")
|
||||
|
||||
macro (FIND_AND_WRAP_MOC_FILES HEADER_FILES GENERATED_MOC_FILES)
|
||||
set (GENERATED_MOC_FILES "")
|
||||
foreach (FILE ${HEADER_FILES})
|
||||
# processing only files where Q_OBJECT exists
|
||||
file(STRINGS "${FILE}" LINES REGEX "Q_OBJECT")
|
||||
if(LINES)
|
||||
unset (MOC_FILE)
|
||||
if (${Qt5_FOUND})
|
||||
qt5_wrap_cpp(MOC_FILE ${FILE})
|
||||
else()
|
||||
qt4_wrap_cpp(MOC_FILE ${FILE})
|
||||
endif()
|
||||
#message (STATUS "... Info: next MOC file ${MOC_FILE}")
|
||||
list(APPEND ${GENERATED_MOC_FILES} ${MOC_FILE})
|
||||
endif(LINES)
|
||||
endforeach (FILE)
|
||||
|
||||
endmacro()
|
||||
@@ -68,3 +67,51 @@ macro (FIND_AND_WRAP_RESOURCE_FILE RESOURCE_FILE_NAME RCC_FILES)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (FIND_AND_WRAP_TS_FILE RESOURCE_FILE_NAME TARGET_FOLDER QM_FILES)
|
||||
if(EXISTS "${RESOURCE_FILE_NAME}")
|
||||
if (${Qt5_FOUND})
|
||||
qt5_add_translation(QM_FILES "${RESOURCE_FILE_NAME}")
|
||||
else()
|
||||
qt4_add_translation(QM_FILES "${RESOURCE_FILE_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (FIND_AND_INSTALL_QT_RESOURCES OCCT_PACKAGE RESOURCE_FILES)
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" TS_FILES REGEX ".+[.]ts")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" QRC_FILES REGEX ".+[.]qrc")
|
||||
|
||||
string (FIND "${OCCT_PACKAGE}" "/" _index)
|
||||
if (_index GREATER -1)
|
||||
math (EXPR _index "${_index}")
|
||||
string (SUBSTRING "${OCCT_PACKAGE}" 0 ${_index} OCCT_PACKAGE_NAME)
|
||||
else()
|
||||
set (OCCT_PACKAGE_NAME "${OCCT_PACKAGE}")
|
||||
endif(_index GREATER -1)
|
||||
|
||||
#message("QRC files are: ${QRC_FILES} in ${OCCT_PACKAGE}")
|
||||
foreach (QRC_FILE ${QRC_FILES})
|
||||
set (QRC_FILE_RELATIVE "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${QRC_FILE}")
|
||||
if (EXISTS ${QRC_FILE_RELATIVE})
|
||||
FIND_AND_WRAP_RESOURCE_FILE(${QRC_FILE_RELATIVE} RCC_FILES)
|
||||
list (APPEND ${RESOURCE_FILES} "${RCC_FILES}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
#message("TS files are: ${TS_FILES} in ${OCCT_PACKAGE}")
|
||||
foreach (TS_FILE ${TS_FILES})
|
||||
set (TS_FILE_RELATIVE "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${TS_FILE}")
|
||||
FIND_AND_WRAP_TS_FILE(${TS_FILE_RELATIVE} "${TARGET_FOLDER}/${CURRENT_MODULE}" QM_FILES)
|
||||
if (EXISTS ${TS_FILE_RELATIVE})
|
||||
list (APPEND ${RESOURCE_FILES} "${TS_FILE_RELATIVE}")
|
||||
list (APPEND ${RESOURCE_FILES} "${QM_FILES}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach (QM_FILE ${QM_FILES})
|
||||
INSTALL(FILES ${QM_FILE} DESTINATION "${INSTALL_DIR_RESOURCE}/samples")
|
||||
#message("install *.qm files (${QM_FILE}) to: ${INSTALL_DIR_RESOURCE}/samples")
|
||||
endforeach (QM_FILE ${QM_FILES})
|
||||
endmacro()
|
||||
|
||||
|
@@ -173,7 +173,7 @@ macro (TBB_PRODUCT_SEARCH PRODUCT_LIBRARY_NAME)
|
||||
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR)
|
||||
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR)
|
||||
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "The path to ${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
|
||||
endif()
|
||||
@@ -226,7 +226,7 @@ macro (TBB_PRODUCT_SEARCH PRODUCT_LIBRARY_NAME)
|
||||
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR OR EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR)
|
||||
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -275,7 +275,7 @@ macro (TBB_PRODUCT_SEARCH PRODUCT_LIBRARY_NAME)
|
||||
mark_as_advanced (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL)
|
||||
endmacro()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
#if (BUILD_SHARED_LIBS)
|
||||
separate_arguments (CSF_TBB)
|
||||
foreach (LIB IN LISTS CSF_TBB)
|
||||
TBB_PRODUCT_SEARCH (${LIB})
|
||||
@@ -291,4 +291,4 @@ if (BUILD_SHARED_LIBS)
|
||||
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
#endif()
|
||||
|
@@ -184,14 +184,14 @@ if (BUILD_SHARED_LIBS)
|
||||
if (3RDPARTY_TCL_LIBRARY AND EXISTS "${3RDPARTY_TCL_LIBRARY}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_TCL_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_LIBRARY_DIR)
|
||||
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_TCL_LIBRARY_DIR)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (3RDPARTY_TCL_DLL OR EXISTS "${3RDPARTY_TCL_DLL}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_TCL_DLL_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_DLL_DIR)
|
||||
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_TCL_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -190,14 +190,14 @@ if (BUILD_SHARED_LIBS)
|
||||
if (3RDPARTY_TK_LIBRARY AND EXISTS "${3RDPARTY_TK_LIBRARY}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_TK_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TK_LIBRARY_DIR)
|
||||
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_TK_LIBRARY_DIR)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (3RDPARTY_TK_DLL OR EXISTS "${3RDPARTY_TK_DLL}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_TK_DLL_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TK_DLL_DIR)
|
||||
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_TK_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -117,11 +117,16 @@ want to build some particular libraries (toolkits) only, then you may uncheck
|
||||
all modules in the corresponding BUILD_MODUE_* options and provide the list of
|
||||
necessary libraries here. Of course, all dependencies will be resolved automatically")
|
||||
|
||||
set (BUILD_MODULE_MfcSamples_DESCR
|
||||
set (BUILD_SAMPLES_MFC_DESCR
|
||||
"Indicates whether OCCT MFC samples should be built together with OCCT.
|
||||
These samples show some possibilities of using OCCT and they can be executed
|
||||
with script samples.bat from the installation directory (INSTALL_DIR)")
|
||||
|
||||
set (BUILD_SAMPLES_QT_DESCR
|
||||
"Indicates whether OCCT Qt samples should be built together with OCCT.
|
||||
These samples show some possibilities of using OCCT and they can be executed
|
||||
with script samples.bat from the installation directory (INSTALL_DIR)")
|
||||
|
||||
set (BUILD_Inspector_DESCR
|
||||
"Indicates whether OCCT inspector should be built together with OCCT.
|
||||
This inspector provides functionality to interactively inspect low-level content
|
||||
|
@@ -31,7 +31,7 @@ if (NOT DEFINED 3RDPARTY_VTK_INCLUDE_DIR)
|
||||
set (3RDPARTY_VTK_INCLUDE_DIR "" CACHE PATH "The directory containing headers of VTK")
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
#if (BUILD_SHARED_LIBS)
|
||||
# vtk library directory
|
||||
if (NOT DEFINED 3RDPARTY_VTK_LIBRARY_DIR)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "" CACHE PATH "The directory containing VTK libraries")
|
||||
@@ -41,7 +41,7 @@ if (BUILD_SHARED_LIBS)
|
||||
if (WIN32 AND NOT DEFINED 3RDPARTY_VTK_DLL_DIR)
|
||||
set (3RDPARTY_VTK_DLL_DIR "" CACHE PATH "The directory containing VTK shared libraries")
|
||||
endif()
|
||||
endif()
|
||||
#endif()
|
||||
|
||||
# check 3RDPARTY_VTK_ paths for consistency with specified 3RDPARTY_VTK_DIR
|
||||
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
|
||||
@@ -75,10 +75,10 @@ if (VTK_FOUND)
|
||||
|
||||
set (3RDPARTY_VTK_INCLUDE_DIRS)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# if (BUILD_SHARED_LIBS)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
set (3RDPARTY_VTK_DLL_DIRS)
|
||||
endif()
|
||||
# endif()
|
||||
|
||||
foreach (VTK_LIBRARY ${VTK_LIBRARIES})
|
||||
string (REGEX MATCH "^vtk" IS_VTK_LIBRARY ${VTK_LIBRARY})
|
||||
@@ -168,7 +168,7 @@ if (VTK_FOUND)
|
||||
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_INCLUDE_DIR}" CACHE PATH "The directory containing headers of VTK" FORCE)
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# if (BUILD_SHARED_LIBS)
|
||||
if (3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIRS})
|
||||
@@ -186,7 +186,7 @@ if (VTK_FOUND)
|
||||
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DLL_DIR}" CACHE PATH "The directory containing VTK shared libraries" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
# endif()
|
||||
|
||||
if (3RDPARTY_VTK_INCLUDE_DIR AND EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIR})
|
||||
@@ -198,14 +198,14 @@ if (BUILD_SHARED_LIBS)
|
||||
if (3RDPARTY_VTK_LIBRARY_DIR AND EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIR})
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_LIBRARY_DIR)
|
||||
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_VTK_LIBRARY_DIR)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (3RDPARTY_VTK_DLL_DIR OR EXISTS "${3RDPARTY_VTK_DLL_DIR}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIR})
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_DLL_DIR)
|
||||
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_VTK_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -1727,7 +1727,7 @@ proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap } {
|
||||
regsub -all -- {__TKDEP__} $theProjTmpl $aUsedLibs theProjTmpl
|
||||
|
||||
set anIncPaths "..\\..\\..\\inc"
|
||||
set aTKDefines ""
|
||||
# set aTKDefines ""
|
||||
set aFilesSection ""
|
||||
set aVcFilesX(units) ""
|
||||
set listloc [osutils:tk:units $theToolKit]
|
||||
@@ -1794,13 +1794,13 @@ proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap } {
|
||||
}
|
||||
|
||||
# macros
|
||||
append aTKDefines ";__${xlo}_DLL"
|
||||
# append aTKDefines ";__${xlo}_DLL"
|
||||
# common includes
|
||||
# append anIncPaths ";..\\..\\..\\src\\${xlo}"
|
||||
}
|
||||
|
||||
regsub -all -- {__TKINC__} $theProjTmpl $anIncPaths theProjTmpl
|
||||
regsub -all -- {__TKDEFS__} $theProjTmpl $aTKDefines theProjTmpl
|
||||
# regsub -all -- {__TKDEFS__} $theProjTmpl $aTKDefines theProjTmpl
|
||||
regsub -all -- {__FILES__} $theProjTmpl $aFilesSection theProjTmpl
|
||||
|
||||
# write file
|
||||
@@ -1947,10 +1947,10 @@ proc osutils:vcprojx { theVcVer isUWP theOutDir theToolKit theGuidsMap } {
|
||||
puts "Warning : in vcproj there are than one occurences for [file tail $f]"
|
||||
}
|
||||
#puts "$aProjTmpl $aFilesSection"
|
||||
set aTKDefines ";__${theToolKit}_DLL"
|
||||
# set aTKDefines ";__${theToolKit}_DLL"
|
||||
set anIncPaths "..\\..\\..\\inc"
|
||||
regsub -all -- {__TKINC__} $aProjTmpl $anIncPaths aProjTmpl
|
||||
regsub -all -- {__TKDEFS__} $aProjTmpl $aTKDefines aProjTmpl
|
||||
# regsub -all -- {__TKDEFS__} $aProjTmpl $aTKDefines aProjTmpl
|
||||
regsub -all -- {__FILES__} $aProjTmpl $aFilesSection aProjTmpl
|
||||
regsub -all -- {__CONF__} $aProjTmpl Application aProjTmpl
|
||||
|
||||
@@ -2162,9 +2162,9 @@ proc osutils:cbptk { theCmpl theOutDir theToolKit thePlatform} {
|
||||
}
|
||||
|
||||
# macros for correct DLL exports
|
||||
if { $thePlatform == "wnt" || $thePlatform == "uwp" } {
|
||||
lappend aTKDefines "__${xlo}_DLL"
|
||||
}
|
||||
# if { $thePlatform == "wnt" || $thePlatform == "uwp" } {
|
||||
# lappend aTKDefines "__${xlo}_DLL"
|
||||
# }
|
||||
}
|
||||
|
||||
return [osutils:cbp $theCmpl $theOutDir $theToolKit $thePlatform $aTKSrcFiles $aUsedLibs $aFrameworks $anIncPaths $aTKDefines]
|
||||
@@ -2281,9 +2281,9 @@ proc osutils:cbpx { theCmpl theOutDir theToolKit thePlatform } {
|
||||
}
|
||||
|
||||
# macros for correct DLL exports
|
||||
if { $thePlatform == "wnt" || $thePlatform == "uwp" } {
|
||||
lappend aTKDefines "__${theToolKit}_DLL"
|
||||
}
|
||||
# if { $thePlatform == "wnt" || $thePlatform == "uwp" } {
|
||||
# lappend aTKDefines "__${theToolKit}_DLL"
|
||||
# }
|
||||
|
||||
# common include paths
|
||||
lappend anIncPaths "../../../inc"
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
QTDIR=@3RDPARTY_QT_DIR@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;@OpenCASCADE_BINARY_DIR@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
|
||||
@@ -13,7 +13,7 @@ PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
QTDIR=@3RDPARTY_QT_DIR@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;@OpenCASCADE_BINARY_DIR@i;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
|
||||
@@ -22,7 +22,7 @@ PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
QTDIR=@3RDPARTY_QT_DIR@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;@OpenCASCADE_BINARY_DIR@d;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
|
||||
|
@@ -16,11 +16,16 @@ if ["%1"] == [""] (
|
||||
echo HLR
|
||||
echo Animation
|
||||
echo Convert
|
||||
echo AndroidQt
|
||||
echo FuncDemo
|
||||
echo IESample
|
||||
echo Tutorial
|
||||
PAUSE
|
||||
exit /B
|
||||
)
|
||||
|
||||
call "%~dp0env.bat" %2 %3 %4
|
||||
if not ["%QTDIR%"] == [""] if exist "%QTDIR%\qml" if ["%QML2_IMPORT_PATH%"] == [""] set "QML2_IMPORT_PATH=%QTDIR%/qml"
|
||||
set "EXE_PATH=%CSF_OCCTBinPath%/%1.exe"
|
||||
|
||||
if not exist "%EXE_PATH%" (
|
||||
|
35
adm/templates/sample.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
echo Launch selected sample as follows:
|
||||
echo sample.sh SampleName d
|
||||
echo or to use last sample build configuration:
|
||||
echo sample.sh SampleName
|
||||
echo available samples:
|
||||
echo FuncDemo
|
||||
echo IESample
|
||||
echo Tutorial
|
||||
fi
|
||||
|
||||
|
||||
aCurrentPath="$PWD"
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
source "${aScriptPath}/env.sh" "$2"
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
if [ -d "$QTDIR%\qml" ];
|
||||
then export QML2_IMPORT_PATH="$QTDIR\qml";
|
||||
fi
|
||||
fi
|
||||
|
||||
export "EXE_PATH=$CSF_OCCTBinPath/$1"
|
||||
|
||||
if [ ! -f "$EXE_PATH" ]; then
|
||||
echo "Executable \"$EXE_PATH\" not found."
|
||||
echo "Probably you didn't compile the application."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ${aCurrentPath}
|
||||
"$EXE_PATH"
|
@@ -90,7 +90,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -107,7 +107,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -138,7 +138,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
|
||||
@@ -156,7 +156,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -186,7 +186,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -203,7 +203,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -234,7 +234,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
|
||||
@@ -252,7 +252,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@@ -85,7 +85,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -100,7 +100,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -130,7 +130,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
|
||||
@@ -146,7 +146,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -175,7 +175,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -190,7 +190,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -219,7 +219,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
|
||||
@@ -235,7 +235,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@@ -22,7 +22,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
@@ -62,7 +62,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
@@ -89,7 +89,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
PrecompiledHeaderFile=".\..\..\..\win32\vc7\objd\__TKNAM__\__TKNAM__.pch"
|
||||
@@ -131,7 +131,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
|
@@ -22,7 +22,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
AssemblerListingLocation=".\..\..\..\win32\vc7\objd\__XQTNAM__/"
|
||||
@@ -61,7 +61,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
@@ -86,7 +86,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
@@ -124,7 +124,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
|
@@ -50,7 +50,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -70,7 +70,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
@@ -148,7 +148,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -170,7 +170,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
@@ -249,7 +249,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -268,7 +268,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
@@ -347,7 +347,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -368,7 +368,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
|
@@ -49,7 +49,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -68,7 +68,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__;"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES);"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
@@ -145,7 +145,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -164,7 +164,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES);"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
@@ -240,7 +240,7 @@
|
||||
AdditionalOptions="/favor:blend"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -258,7 +258,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
@@ -337,7 +337,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -355,7 +355,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
|
@@ -53,7 +53,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -73,7 +73,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
@@ -150,7 +150,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -172,7 +172,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
@@ -248,7 +248,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -267,7 +267,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
@@ -342,7 +342,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -363,7 +363,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
|
@@ -52,7 +52,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -71,7 +71,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
@@ -143,7 +143,7 @@
|
||||
AdditionalOptions="-MP"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -162,7 +162,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
@@ -236,7 +236,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -254,7 +254,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
@@ -327,7 +327,7 @@
|
||||
AdditionalOptions="-MP -favor:blend"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -345,7 +345,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
|
@@ -1,8 +1,75 @@
|
||||
[rename]
|
||||
Adaptor3d_OffsetCurve Adaptor2d_OffsetCurve
|
||||
BRepExtrema_OverlappedSubShapes BRepExtrema_MapOfIntegerPackedMapOfInteger
|
||||
ShapeConstruct_CompBezierCurves2dToBSplineCurve2d Convert_CompBezierCurves2dToBSplineCurve2d
|
||||
ShapeConstruct_CompBezierCurves2dToBSplineCurve Convert_CompBezierCurves2dToBSplineCurve
|
||||
Image_PixMap::Img Image_Format_
|
||||
V3d_TypeOfShadingModel Graphic3d_TypeOfShadingModel
|
||||
Graphic3d_TOSM_NONE Graphic3d_TOSM_UNLIT
|
||||
V3d_COLOR Graphic3d_TOSM_UNLIT
|
||||
V3d_FLAT Graphic3d_TOSM_FACET
|
||||
V3d_GOURAUD Graphic3d_TOSM_VERTEX
|
||||
V3d_PHONG Graphic3d_TOSM_FRAGMENT
|
||||
V3d_TypeOfLight Graphic3d_TypeOfLightSource
|
||||
V3d_AMBIENT Graphic3d_TOLS_AMBIENT
|
||||
V3d_DIRECTIONAL Graphic3d_TOLS_DIRECTIONAL
|
||||
V3d_POSITIONAL Graphic3d_TOLS_POSITIONAL
|
||||
V3d_SPOT Graphic3d_TOLS_SPOT
|
||||
BOPCol_BaseAllocator Handle(NCollection_BaseAllocator)
|
||||
BOPCol_BoxBndTree is replaced with BOPTools_BoxBndTree
|
||||
BOPCol_DataMapOfIntegerInteger TColStd_DataMapOfIntegerInteger
|
||||
BOPCol_DataMapOfIntegerListOfInteger TColStd_DataMapOfIntegerListOfInteger
|
||||
BOPCol_DataMapOfIntegerListOfShape TopTools_DataMapOfIntegerListOfShape
|
||||
BOPCol_DataMapOfIntegerReal TColStd_DataMapOfIntegerReal
|
||||
BOPCol_DataMapOfIntegerShape TopTools_DataMapOfIntegerShape
|
||||
BOPCol_DataMapOfShapeBox TopTools_DataMapOfShapeBox
|
||||
BOPCol_DataMapOfShapeInteger TopTools_DataMapOfShapeInteger
|
||||
BOPCol_DataMapOfShapeListOfShape TopTools_DataMapOfShapeListOfShape
|
||||
BOPCol_DataMapOfShapeReal TopTools_DataMapOfShapeReal
|
||||
BOPCol_DataMapOfShapeShape TopTools_DataMapOfShapeShape
|
||||
BOPCol_IndexedDataMapOfShapeListOfShape TopTools_IndexedDataMapOfShapeListOfShape
|
||||
BOPCol_IndexedDataMapOfShapeShape TopTools_IndexedDataMapOfShapeShape
|
||||
BOPCol_IndexedMapOfInteger TColStd_IndexedMapOfInteger
|
||||
BOPCol_IndexedMapOfOrientedShape TopTools_IndexedMapOfOrientedShape
|
||||
BOPCol_IndexedMapOfShape TopTools_IndexedMapOfShape
|
||||
BOPCol_ListOfInteger TColStd_ListOfInteger
|
||||
BOPCol_ListOfListOfShape TopTools_ListOfListOfShape
|
||||
BOPCol_ListOfShape TopTools_ListOfShape
|
||||
BOPCol_MapOfInteger TColStd_MapOfInteger
|
||||
BOPCol_MapOfOrientedShapeTopTools_MapOfOrientedShape
|
||||
BOPCol_MapOfShape TopTools_MapOfShape
|
||||
BOPCol_SequenceOfPnt2d TColgp_SequenceOfPnt2d
|
||||
BOPCol_SequenceOfReal TColStd_SequenceOfReal
|
||||
BOPCol_SequenceOfShape TopTools_SequenceOfShape
|
||||
BOPCol_Parallel BOPTools_Parallel
|
||||
BOPCol_NCVector NCollection_Vector
|
||||
BOPCol_DataMapOfShapeAddress DataMapOfShapeAddress
|
||||
BOPCol_DataMapOfTransientAddress DataMapOfTransientAddress
|
||||
BOPCol_DataMapIteratorOfDataMapOfIntegerReal TColStd_DataMapIteratorOfDataMapOfIntegerReal
|
||||
BOPCol_DataMapIteratorOfDataMapOfShapeAddress DataMapOfShapeAddress::Iterator
|
||||
BOPCol_DataMapIteratorOfDataMapOfTransientAddress DataMapOfTransientAddress::Iterator
|
||||
BOPCol_ListIteratorOfListOfInteger TColStd_ListIteratorOfListOfInteger
|
||||
BOPCol_ListIteratorOfListOfShape TopTools_ListIteratorOfListOfShape
|
||||
BOPCol_MapIteratorOfMapOfInteger TColStd_MapIteratorOfMapOfInteger
|
||||
BOPCol_BoxBndTreeSelector BOPTools_BoxBndTreeSelector
|
||||
BOPCol_BoxBndTree BOPTools_BoxBndTree
|
||||
BOPCol_PListOfInteger TColStd_ListOfInteger*
|
||||
BOPCol_IndexedDataMapOfShapeReal TopTools_IndexedDataMapOfShapeReal
|
||||
BOPCol_MapOfOrientedShape TopTools_MapOfOrientedShape
|
||||
BOPCol_DataMapIteratorOfDataMapOfIntegerInteger TColStd_DataMapIteratorOfDataMapOfIntegerInteger
|
||||
BOPCol_MapIteratorOfMapOfShape TopTools_MapIteratorOfMapOfShape
|
||||
BOPCol_ContextFunctor BOPTools_ContextFunctor
|
||||
BOPCol_ContextCnt BOPTools_ContextCnt
|
||||
BOPCol_Functor BOPTools_Functor
|
||||
BOPCol_Cnt BOPTools_Cnt
|
||||
BOPCol_DataMapIteratorOfDataMapOfIntegerListOfShape TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape
|
||||
BOPCol_MapIteratorOfMapOfOrientedShape TopTools_MapIteratorOfMapOfOrientedShape
|
||||
BOPCol_DataMapIteratorOfDataMapOfIntegerListOfInteger TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger
|
||||
BOPCol_DataMapIteratorOfDataMapOfShapeShape TopTools_DataMapIteratorOfDataMapOfShapeShape
|
||||
BOPTools::MapShapes TopExp::MapShapes
|
||||
BOPTools::MapShapesAndAncestors TopExp::MapShapesAndAncestors
|
||||
BOPCol_Box2DBndTreeSelector BOPTools_BoxSelector<Bnd_Box2d>
|
||||
BiTgte_DataMapOfShapeBox TopTools_DataMapOfShapeBox
|
||||
|
||||
[tcollection]
|
||||
AdvApp2Var_SequenceOfNode
|
||||
|
@@ -93,10 +93,11 @@ The following table gives the full list of environment variables used at the con
|
||||
| 3RDPARTY_TBB* | Path | Path to TBB binaries |
|
||||
| 3RDPARTY_VTK_* | Path | Path to VTK binaries |
|
||||
| BUILD_MODULE_<MODULE>| Boolean flag | Indicates whether the corresponding OCCT module should be built or not. It should be noted that some toolkits of a module can be built even if this module is not checked (this happens if some other modules depend on these toolkits). The main modules and their descriptions can be found in @ref user_guides |
|
||||
| BUILD_LIBRARY_TYPE | String | Specifies the type of library to be created. "Shared" libraries are linked dynamically and loaded at runtime. "Static" libraries are archives of object files used when linking other targets. Note that Draw Harness plugin system is incompatible with "Static" builds, and therefore it should be excluded. Using "Static" libraries also might require modification in building procedures of user application (and OCCT samples); on Windows platform, user application should define HAVE_NO_DLL. |
|
||||
| BUILD_LIBRARY_TYPE | String | Specifies the type of library to be created. "Shared" libraries are linked dynamically and loaded at runtime. "Static" libraries are archives of object files used when linking other targets. Note that Draw Harness plugin system is incompatible with "Static" builds, and therefore it is disabled for these builds.|
|
||||
| BUILD_ADDITIONAL_TOOLKITS | String | Semicolon-separated individual toolkits to include into build process. If you want to build some particular libraries (toolkits) only, then you may uncheck all modules in the corresponding *BUILD_MODUE_\<MODULE\>* options and provide the list of necessary libraries here. Of course, all dependencies will be resolved automatically |
|
||||
| BUILD_YACCLEX | Boolean flag | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this option leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
|
||||
| BUILD_MODULE_MfcSamples | Boolean flag | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms |
|
||||
| BUILD_SAMPLES_MFC | Boolean flag | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms |
|
||||
| BUILD_SAMPLES_QT | Boolean flag | Indicates whether QT samples should be built together with OCCT. |
|
||||
| BUILD_Inspector | Boolean flag | Indicates whether Inspector should be built together with OCCT. |
|
||||
| BUILD_DOC_Overview | Boolean flag | Indicates whether OCCT overview documentation project should be created together with OCCT. It is not built together with OCCT. Checking this option leads to automatic search of Doxygen binaries. Its building calls Doxygen command to generate the documentation in HTML format |
|
||||
| BUILD_PATCH | Path | Points to the directory recognized as a "patch" for OCCT. If specified, the files from this directory take precedence over the corresponding native OCCT sources. This way you are able to introduce patches to Open CASCADE Technology not affecting the original source distribution |
|
||||
|
@@ -791,6 +791,7 @@ std::stable_sort (aValues.begin(), aValues.end());
|
||||
|
||||
The old mechanism for rendering Underlay and Overlay on-screen 2D objects based on *Visual3d_Layer* and immediate drawing model (uncached and thus slow) has been removed.
|
||||
Classes *Aspect_Clayer2d, OpenGl_GraphicDriver_Layer, Visual3d_Layer, Visual3d_LayerItem, V3d_LayerMgr* and *V3d_LayerMgrPointer* have been deleted.
|
||||
The following auxiliary definition have been removed as well: Aspect_TypeOfPrimitive, Aspect_TypeOfLayer, Aspect_TypeOfEdge, Aspect_TypeOfDrawMode, Aspect_TypeOfConstraint, Aspect_DriverDefinitionError, Aspect_BadAccess.
|
||||
|
||||
General AIS interactive objects with transformation persistence flag *Graphic3d_TMF_2d* can be used as a replacement of *Visual3d_LayerItem*.
|
||||
The anchor point specified for transformation persistence defines the window corner of (or center in case of (0, 0) point).
|
||||
@@ -1523,7 +1524,7 @@ Multiple changes have been applied to lights management within TKV3d and TKOpenG
|
||||
|
||||
@subsection upgrade_730_shadingmodels Shading Models
|
||||
|
||||
*Graphic3d_AspectFillArea3d* has been extended by a new property ::ShadingModel(), which previously has been defined globally for entire View.
|
||||
*Graphic3d_AspectFillArea3d* has been extended by a new property *ShadingModel()*, which previously has been defined globally for entire View.
|
||||
|
||||
Previously, triangle array without normal vertex attributes was implicitly considered as unshaded,
|
||||
but now such array will be shaded using *Graphic3d_TOSM_FACET* model (e.g. by computing per-triangle normals).
|
||||
@@ -1533,7 +1534,7 @@ Alternatively, material without reflectance properties can be used for disabling
|
||||
@subsection upgrade_730_tkopengl Custom low-level OpenGL elements
|
||||
|
||||
The following API changes should be considered while porting custom OpenGl_Element objects:
|
||||
* OpenGl_ShaderManager::BindFaceProgram(), ::BindLineProgram(), ::BindMarkerProgram() now takes enumeration arguments instead of Boolean flags.
|
||||
* *OpenGl_ShaderManager::BindFaceProgram()*, *BindLineProgram()*, *BindMarkerProgram()* now take enumeration arguments instead of Boolean flags.
|
||||
|
||||
@subsection upgrade_730_BOPAlgo_Section Changes in BOPAlgo_Section
|
||||
|
||||
@@ -1551,3 +1552,11 @@ Since new version, the method BRepAdaptor_CompCurve::IsPeriodic() will always re
|
||||
|
||||
Interfaces of the following methods have been changed: IntPatch_WLineTool::ComputePurgedWLine(...), IntPatch_PrmPrmIntersection::Perform(...), IntPatch_Intersection::Perform(...), IntPatch_Intersection::ParamParamPerfom(...), IntPatch_Intersection::GeomGeomPerfom(...). Please see documentation about corresponding methods.
|
||||
|
||||
@subsection upgrade_730_BuilderSolid Boolean Operations - Solid Builder algorithm
|
||||
|
||||
Previously, the unclassified faces of *BOPAlgo_BuilderSolid* algorithm (the faces which have not been used for solids creation and located outside of all created solids) have been used to form an additional solid (not closed one) with INTERNAL orientation.
|
||||
Since new version, these unclassified faces are no longer added into resulting solids. Instead, the @ref occt_algorithms_ers "warning" containing these faces appears.
|
||||
|
||||
The following public methods of the *BOPAlgo_BuilderSolid* class have been removed as excessive:
|
||||
* void SetSolid(const TopoDS_Solid& theSolid);
|
||||
* const TopoDS_Solid& Solid() const;
|
||||
|
@@ -2931,28 +2931,30 @@ Warning: The positioning of the shapes leads to creation of small edges without
|
||||
|
||||
@section occt_algorithms_history History Information
|
||||
|
||||
The chapter describes the rules for filling the History Information (or just History) for the arguments of the operations in Boolean Component.
|
||||
The History is available only for the VERTICES, EDGES, FACES and SOLIDS from the input arguments.
|
||||
All operations in Boolean Component support @ref occt_modalg_hist "History information". This chapter describes how the History is filled for these operations.
|
||||
|
||||
The History allows tracking the modification of the input shapes during the operation. It consists of the following information:
|
||||
* Information about Deleted shapes;
|
||||
* Information about Modified shapes;
|
||||
* Information about Generated shapes;
|
||||
Additionally to Vertices, Edges and Faces the history is also available for the Solids.
|
||||
|
||||
All History information is filled basing on the result of current operation. History cannot return any shapes not contained in the result.
|
||||
Thus if the result of the operation is empty shape, all input shapes will be considered as Deleted and none will have Modified and Generated shapes.
|
||||
The rules for filling the History information about Deleted and Modified shapes are the same as for the API algorithms.
|
||||
|
||||
@subsection occt_algorithms_history_del Deleted shapes
|
||||
Only the rules for Generated shapes require clarification.
|
||||
In terms of the algorithms in Boolean Component the shape from the arguments can have Generated shapes only if these new shapes
|
||||
have been obtained as a result of pure intersection (not overlapping) of this shape with any other shapes from arguments. Thus, the Generated shapes are always:
|
||||
* VERTICES created from the intersection points and may be Generated from edges and faces only;
|
||||
* EDGES created from the intersection edges and may be Generated from faces only.
|
||||
|
||||
The shape is considered as Deleted if the result shape do not contain the shape itself and none of its splits.
|
||||
For example, the result of CUT operation of two overlapping planar faces (see the example below) does not contain any parts from the tool face. Thus, the tool faces is considered as Deleted.
|
||||
So, only EDGES and FACES could have information about Generated shapes. For all other types of shapes the list of Generated shapes will be empty.
|
||||
|
||||
@subsection occt_algorithms_history_ex Examples
|
||||
|
||||
Here are some examples illustrating the History information.
|
||||
|
||||
@subsubsection occt_algorithms_history_ex_del Deleted shapes
|
||||
|
||||
The result of CUT operation of two overlapping planar faces (see the example below) does not contain any parts from the tool face. Thus, the tool face is considered as Deleted.
|
||||
If the faces are not fully coinciding, the result must contain some parts of the object face. In this case object face will be considered as not deleted.
|
||||
But if the faces are fully coinciding, the result must be empty, and both faces will be considered as Deleted.
|
||||
|
||||
To get the information about Deleted shapes it is necessary to use the method *Standard_Boolean IsDeleted(const TopoDS_Shape& theS)*.
|
||||
|
||||
To get the information about Deleted shapes in DRAW it is necessary to use the command *bisdeleted shape*.
|
||||
|
||||
Example of the overlapping faces:
|
||||
|
||||
~~~~
|
||||
@@ -2967,29 +2969,21 @@ baddtools f2
|
||||
bfillds
|
||||
bbop r 2
|
||||
|
||||
bisdeleted f1
|
||||
savehistory cut_hist
|
||||
isdeleted cut_hist f1
|
||||
# Not deleted
|
||||
|
||||
bisdeleted f2
|
||||
isdeleted cut_hist f2
|
||||
# Deleted
|
||||
~~~~
|
||||
|
||||
@subsection occt_algorithms_history_modif Modified shapes
|
||||
@subsubsection occt_algorithms_history_ex_modif Modified shapes
|
||||
|
||||
The shape is considered as Modified if the result shape contains any of the splits of the shape, not the shape itself. The shape can be modified only into the shapes with same dimension.
|
||||
The splits of the shape contained in the result shape are Modified from the shape.
|
||||
|
||||
For example, in the FUSE operation of two edges intersecting in one point (see the example below), both edges will be split by the intersection point. All these splits will be contained in the result.
|
||||
In the FUSE operation of two edges intersecting in one point (see the example below), both edges will be split by the intersection point. All these splits will be contained in the result.
|
||||
Thus, each of the input edges will be Modified into its two splits.
|
||||
But in the CUT operation on the same edges, the tool edge will be Deleted from the result and, thus, will not have any Modified shapes.
|
||||
|
||||
To get the information about Modified shapes it is necessary to use the method *const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS)*.
|
||||
The list of Modified elements will contain only those which are contained in the result of the operation. If the list is empty the shape has not been modified and it is necessary to check if it has been Deleted.
|
||||
|
||||
To get the information about Modified shapes in DRAW it is necessary to use the command *bmodified modif shape*.
|
||||
|
||||
Example of the intersecting edges:
|
||||
|
||||
~~~~
|
||||
line l1 0 0 0 1 0 0
|
||||
mkedge e1 l1 -10 10
|
||||
@@ -3006,44 +3000,35 @@ bfillds
|
||||
# fuse operation
|
||||
bbop r 1
|
||||
|
||||
bmodified m1 e1
|
||||
savehistory fuse_hist
|
||||
|
||||
modified m1 fuse_hist e1
|
||||
nbshapes m1
|
||||
# EDGES: 2
|
||||
|
||||
bmodified m2 e2
|
||||
modified m2 fuse_hist e2
|
||||
nbshapes m2
|
||||
# EDGES: 2
|
||||
|
||||
# cut operation
|
||||
bbop r 2
|
||||
|
||||
bmodified m1 e1
|
||||
savehistory cut_hist
|
||||
|
||||
modified m1 cut_hist e1
|
||||
nbshapes m1
|
||||
# EDGES: 2
|
||||
|
||||
bmodified m2 e2
|
||||
modified m2 cut_hist e2
|
||||
# The shape has not been modified
|
||||
|
||||
~~~~
|
||||
|
||||
|
||||
@subsection occt_algorithms_history_gen Generated shapes
|
||||
@subsubsection occt_algorithms_history_gen Generated shapes
|
||||
|
||||
In terms of the algorithms in Boolean Component the shape from the arguments can have Generated shapes only if these new shapes have been obtained as a result of pure intersection (not overlapping)
|
||||
of this shape with any other shapes from arguments. Thus, the Generated shapes are always:
|
||||
* VERTICES created from the intersection points and may be Generated from edges and faces only;
|
||||
* EDGES created from the intersection edges and may be Generated from faces only.
|
||||
The two intersecting edges will both have the intersection vertices Generated from them.
|
||||
|
||||
So, only EDGES and FACES could have information about Generated shapes. For all other types of shapes the list of Generated shapes will be empty.
|
||||
|
||||
For example, the two intersecting edges will both have the intersection vertices Generated from them.
|
||||
|
||||
To get the information about Generated shapes it is necessary to use the method *const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS)*.
|
||||
The list of Generated elements will contain only those which are contained in the result of the operation. If the list is empty no new shapes have been Generated from the shape.
|
||||
|
||||
To get the information about Generated shapes in DRAW it is necessary to use the command *bgenerated gen shape*.
|
||||
|
||||
Example of interfering faces
|
||||
As for the operation with intersecting faces, consider the following example:
|
||||
|
||||
~~~~
|
||||
plane p1 0 0 0 0 0 1
|
||||
@@ -3061,11 +3046,13 @@ bfillds
|
||||
# fuse operation
|
||||
bbop r 1
|
||||
|
||||
bgenerated gf1 f1
|
||||
savehistory fuse_hist
|
||||
|
||||
generated gf1 fuse_hist f1
|
||||
nbshapes gf1
|
||||
# EDGES: 1
|
||||
|
||||
bgenerated gf2 f2
|
||||
generated gf2 fuse_hist f2
|
||||
nbshapes gf2
|
||||
# EDGES: 1
|
||||
|
||||
@@ -3073,10 +3060,12 @@ nbshapes gf2
|
||||
# common operation - result is empty
|
||||
bbop r 0
|
||||
|
||||
bgenerated gf1 f1
|
||||
savehistory com_hist
|
||||
|
||||
generated gf1 com_hist f1
|
||||
# No shapes were generated from the shape
|
||||
|
||||
bgenerated gf2 f2
|
||||
generated gf2 com_hist f2
|
||||
# No shapes were generated from the shape
|
||||
|
||||
~~~~
|
||||
|
@@ -5844,6 +5844,7 @@ The following topics are covered in the eight sections of this chapter:
|
||||
* Transformations of shapes: translation, copy, etc.
|
||||
* Topological operations, or booleans.
|
||||
* Drafting and blending.
|
||||
* Defeaturing.
|
||||
* Analysis of shapes.
|
||||
|
||||
|
||||
@@ -7322,6 +7323,25 @@ buildevol
|
||||
~~~~~
|
||||
|
||||
|
||||
@subsection occt_draw_defeaturing Defeaturing
|
||||
|
||||
Draw command **removefeatures** is intended for performing @ref occt_modalg_defeaturing "3D Model Defeaturing", i.e. it performs the removal of the requested features from the shape.
|
||||
|
||||
Syntax:
|
||||
~~~~
|
||||
removefeatures result shape f1 f2 ... [-nohist] [-parallel]
|
||||
|
||||
Where:
|
||||
result - result of the operation;
|
||||
shape - the shape to remove the features from;
|
||||
f1, f2 - features to remove from the shape;
|
||||
|
||||
Options:
|
||||
nohist - disables the history collection;
|
||||
parallel - enables the parallel processing mode.
|
||||
~~~~
|
||||
|
||||
|
||||
@subsection occt_draw_7_9 Analysis of topology and geometry
|
||||
|
||||
Analysis of shapes includes commands to compute length, area, volumes and inertial properties, as well as to compute some aspects impacting shape validity.
|
||||
@@ -8012,6 +8032,163 @@ Options:
|
||||
* -a AngTol - angular tolerance used for distinguishing the planar faces;
|
||||
* -s Shared(0/1) - boolean flag which defines whether the input edges are already shared or have to be intersected.
|
||||
|
||||
@subsection occt_draw_hist History commands
|
||||
|
||||
Draw module for @ref occt_modalg_hist "History Information support" includes the command to save history into a drawable object and the actual history commands:
|
||||
|
||||
* *savehistory*;
|
||||
* *isdeleted*;
|
||||
* *modified*;
|
||||
* *generated*.
|
||||
|
||||
@subsubsection occt_draw_hist_save savehistory
|
||||
|
||||
*savehistory* command saves the history from the session into a drawable object with the given name.
|
||||
|
||||
Syntax:
|
||||
~~~~
|
||||
savehistory : savehistory name
|
||||
~~~~
|
||||
|
||||
If the history of some operation is needed the *savehistory* command should be called after the command performing the operation.
|
||||
If some other operation supporting history will be performed before the history of first operation is saved it will be overwritten with the new history.
|
||||
|
||||
Example:
|
||||
~~~~
|
||||
box b1 10 10 10
|
||||
box b2 5 0 0 10 10 15
|
||||
bfuse r b1 b2
|
||||
savehistory fuse_hist
|
||||
|
||||
dump fuse_hist
|
||||
#*********** Dump of fuse_hist *************
|
||||
# History contains:
|
||||
# - 4 Deleted shapes;
|
||||
# - 20 Modified shapes;
|
||||
# - 6 Generated shapes.
|
||||
|
||||
unifysamedom ru r
|
||||
savehistory usd_hist
|
||||
dump usd_hist
|
||||
#*********** Dump of usd_hist *************
|
||||
#History contains:
|
||||
# - 14 Deleted shapes;
|
||||
# - 28 Modified shapes;
|
||||
# - 0 Generated shapes.
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_draw_hist_isdel isdeleted
|
||||
|
||||
*isdeleted* command checks if the given shape has been deleted in the given history.
|
||||
|
||||
Syntax:
|
||||
~~~~
|
||||
isdeleted : isdeleted history shape
|
||||
~~~~
|
||||
|
||||
Example:
|
||||
~~~~
|
||||
box b1 4 4 4 2 2 2
|
||||
box b2 10 10 10
|
||||
bcommon r b1 b2
|
||||
|
||||
savehistory com_hist
|
||||
# all vertices, edges and faces of the b2 are deleted
|
||||
foreach s [join [list [explode b2 v] [explode b2 e] [explode b2 f] ] ] {
|
||||
isdeleted com_hist $s
|
||||
# Deleted
|
||||
}
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_draw_hist_mod modified
|
||||
|
||||
*modified* command returns the shapes Modified from the given shape in the given history. All modified shapes are put into compound. If the shape has not been modified the resulting compound will be empty. Note that if the shape has been modified into a single shape only, it will be returned without enclosure into compound.
|
||||
|
||||
Syntax:
|
||||
~~~~
|
||||
modified : modified modified_shapes history shape
|
||||
~~~~
|
||||
|
||||
Example:
|
||||
~~~~
|
||||
box b 10 10 10
|
||||
explode b e
|
||||
fillet r b 2 b_1
|
||||
|
||||
savehistory fillet_hist
|
||||
|
||||
explode b f
|
||||
|
||||
modified m3 fillet_hist b_3
|
||||
modified m5 fillet_hist b_5
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_draw_hist_gen generated
|
||||
|
||||
*generated* command returns the shapes Generated from the given shape in the given history. All generated shapes are put into compound. If no shapes have been generated from the shape the resulting compound will be empty. Note that if the shape has generated a single shape only, it will be returned without enclosure into compound.
|
||||
|
||||
Syntax:
|
||||
~~~~
|
||||
generated : generated generated_shapes history shape
|
||||
~~~~
|
||||
|
||||
Example:
|
||||
~~~~
|
||||
polyline w1 0 0 0 10 0 0 10 10 0
|
||||
polyline w2 5 1 10 9 1 10 9 5 10
|
||||
|
||||
thrusections r 0 0 w1 w2
|
||||
|
||||
savehistory loft_hist
|
||||
|
||||
explode w1 e
|
||||
explode w2 e
|
||||
|
||||
generated g11 loft_hist w1_1
|
||||
generated g12 loft_hist w1_2
|
||||
generated g21 loft_hist w2_1
|
||||
generated g22 loft_hist w2_2
|
||||
|
||||
compare g11 g21
|
||||
# equal shapes
|
||||
|
||||
compare g12 g22
|
||||
# equal shapes
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_draw_hist_extension Enabling Draw history support for the algorithms
|
||||
|
||||
Draw History mechanism allows fast and easy enabling of the Draw history support for the OCCT algorithms supporting standard history methods.
|
||||
To enable History commands for the algorithm it is necessary to save the history of the algorithm into the session.
|
||||
For that, it is necessary to put the following code into the command implementation just after the command is done:
|
||||
~~~~
|
||||
BRepTest_Objects::SetHistory(ListOfArguments, Algorithm);
|
||||
~~~~
|
||||
|
||||
Here is the example of how it is done in the command performing Split operation (see implementation of the *bapisplit* command):
|
||||
~~~~
|
||||
BRepAlgoAPI_Splitter aSplitter;
|
||||
// setting arguments
|
||||
aSplitter.SetArguments(BOPTest_Objects::Shapes());
|
||||
// setting tools
|
||||
aSplitter.SetTools(BOPTest_Objects::Tools());
|
||||
|
||||
// setting options
|
||||
aSplitter.SetRunParallel(BOPTest_Objects::RunParallel());
|
||||
aSplitter.SetFuzzyValue(BOPTest_Objects::FuzzyValue());
|
||||
aSplitter.SetNonDestructive(BOPTest_Objects::NonDestructive());
|
||||
aSplitter.SetGlue(BOPTest_Objects::Glue());
|
||||
aSplitter.SetCheckInverted(BOPTest_Objects::CheckInverted());
|
||||
aSplitter.SetUseOBB(BOPTest_Objects::UseOBB());
|
||||
|
||||
// performing operation
|
||||
aSplitter.Build();
|
||||
|
||||
// Store the history for the Objects (overwrites the history in the session)
|
||||
BRepTest_Objects::SetHistory(BOPTest_Objects::Shapes(), aSplitter);
|
||||
// Add the history for the Tools
|
||||
BRepTest_Objects::AddHistory(BOPTest_Objects::Tools(), aSplitter);
|
||||
~~~~
|
||||
|
||||
@subsection occt_draw_7_12 Texture Mapping to a Shape
|
||||
|
||||
|
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 24 KiB |
@@ -1283,6 +1283,109 @@ Standard_DomainError::Raise
|
||||
TopoDS_Edge E = ME;
|
||||
~~~~~
|
||||
|
||||
|
||||
@subsection occt_modalg_hist History support
|
||||
|
||||
All topological API algorithms support the history of shapes modifications (or just History) for their arguments.
|
||||
Generally, the history is available for the following types of sub-shapes of input shapes:
|
||||
* Vertex
|
||||
* Edge
|
||||
* Face
|
||||
|
||||
Some algorithms also support the history for Solids.
|
||||
|
||||
The history information consists of the following information:
|
||||
* Information about Deleted shapes;
|
||||
* Information about Modified shapes;
|
||||
* Information about Generated shapes.
|
||||
|
||||
The History is filled basing on the result of the operation. History cannot return any shapes not contained in the result.
|
||||
Thus, if the result of the operation is empty shape, all input shapes will be considered as Deleted and none will have Modified and Generated shapes.
|
||||
|
||||
The history information can be accessed by the API methods:
|
||||
* *Standard_Boolean IsDeleted(const TopoDS_Shape& theS)* - to check if the shape has been Deleted during the operation;
|
||||
* *const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS)* - to get the shapes Modified from the given shape;
|
||||
* *const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS)* - to get the shapes Generated from the given shape.
|
||||
|
||||
@subsubsection occt_modalg_hist_del Deleted shapes
|
||||
|
||||
The shape is considered as Deleted during the operation if all of the following conditions are met:
|
||||
* The shape is the part of the argument shapes of the operation;
|
||||
* The result shape does not contain the shape itself;
|
||||
* The result shape does not contain any of the splits of the shape.
|
||||
|
||||
For example, in the CUT operation between two intersecting solids all vertices/edges/faces located completely inside the Tool solid will be Deleted during the operation.
|
||||
|
||||
@subsubsection occt_modalg_hist_mod Modified shapes
|
||||
|
||||
The shape is considered as Modified during the operation if the result shape contains the splits of the shape, not the shape itself. The shape can be modified only into the shapes with same dimension.
|
||||
The splits of the shape contained in the result shape are Modified from the shape.
|
||||
The Modified shapes are created from the sub-shapes of the input shapes and, generally, repeat their geometry.
|
||||
|
||||
The list of Modified elements will contain only those which are contained in the result of the operation. If the list is empty the shape has not been modified and it is necessary to check if it has been Deleted.
|
||||
|
||||
For example, after translation of the shape in any direction all its sub-shapes will be modified into their translated copies.
|
||||
|
||||
@subsubsection occt_modalg_hist_gen Generated shapes
|
||||
|
||||
The shapes contained in the result shape are considered as Generated from the input shape if they were produced during the operation and have different dimension with the shapes from which they were created.
|
||||
|
||||
The list of Generated elements will contain only those which are contained in the result of the operation. If the list is empty no new shapes have been Generated from the shape.
|
||||
|
||||
For example, extrusion of the edge in some direction will create a face. This face will be generated from the edge.
|
||||
|
||||
@subsubsection occt_modalg_hist_tool BRepTools_History
|
||||
|
||||
*BRepTools_History* is the general History tool intended for unification of the histories of different algorithms.
|
||||
|
||||
BRepTools_History can be created from any algorithm supporting the standard history methods (IsDeleted(), Modified() and Generated()):
|
||||
~~~~
|
||||
// The arguments of the operation
|
||||
TopoDS_Shape aS = ...;
|
||||
|
||||
// Perform transformation on the shape
|
||||
gp_Trsf aTrsf;
|
||||
aTrsf.SetTranslationPart(gp_Vec(0, 0, 1));
|
||||
BRepBuilderAPI_Transform aTransformer(aS, aTrsf); // Transformation API algorithm
|
||||
const TopoDS_Shape& aRes = aTransformer.Shape();
|
||||
|
||||
// Create the translation history object
|
||||
TopTools_ListOfShape anArguments;
|
||||
anArguments.Append(aS);
|
||||
BRepTools_History aHistory(anArguments, aTransformer);
|
||||
~~~~
|
||||
|
||||
BRepTools_History also allows merging of the histories. Thus, if you have two or more subsequent operations you can get one final history combined from histories of these operations:
|
||||
|
||||
~~~~
|
||||
Handle(BRepTools_History) aHist1 = ...; // History of first operation
|
||||
Handle(BRepTools_History) aHist2 = ...; // History of second operation
|
||||
~~~~
|
||||
|
||||
It is possible to merge the second history into the first one:
|
||||
~~~~
|
||||
aHist1->Merge(aHist2);
|
||||
~~~~
|
||||
|
||||
Or create the new history keeping the two histories unmodified:
|
||||
~~~~
|
||||
Handle(BRepTools_History) aResHistory = new BRepTools_History;
|
||||
aResHistory->Merge(aHist1);
|
||||
aResHistory->Merge(aHist2);
|
||||
~~~~
|
||||
|
||||
The possibility of Merging of the histories and its creation from the API algorithms allows providing easy History support for the new algorithms.
|
||||
|
||||
@subsubsection occt_modalg_hist_draw DRAW history support
|
||||
|
||||
DRAW History support for the algorithms supporting history is provided by three basic commands:
|
||||
* *isdeleted*;
|
||||
* *modified*;
|
||||
* *generated*.
|
||||
|
||||
For more information on the Draw History mechanism please refer the corresponding chapter in the Draw users guide - @ref occt_draw_hist "History commands".
|
||||
|
||||
|
||||
@section occt_modalg_3 Standard Topological Objects
|
||||
|
||||
The following standard topological objects can be created:
|
||||
@@ -3035,3 +3138,182 @@ Meshing covers a shape with a triangular mesh. Other than hidden line removal, y
|
||||
|
||||
You can obtain information on the shape by first exploring it. To access triangulation of a face in the shape later, use *BRepTool::Triangulation*. To access a polygon, which is the approximation of an edge of the face, use *BRepTool::PolygonOnTriangulation*.
|
||||
|
||||
|
||||
@section occt_modalg_defeaturing 3D Model Defeaturing
|
||||
|
||||
The Open CASCADE Technology Defeaturing algorithm is intended for removal of the unwanted parts or features from the model. These parts could be the holes, protrusions, gaps, chamfers, fillets etc.
|
||||
|
||||
Feature detection is not performed, and all features desired for removal should be defined by the user. The input shape is not modified during Defeaturing, the new shape is built in the result.
|
||||
|
||||
On the API level the Defeaturing algorithm is implemented in the *BRepAlgoAPI_Defeaturing* class. On the input the algorithm accepts the shape to remove the features from and the features (one or many) to remove from the shape.
|
||||
Currently, the input shape should either be SOLID, or COMPSOLID, or COMPOUND of SOLIDs.
|
||||
The features to remove are the sets of faces forming the features. It does not matter how the feature faces are given. It could be the separate faces or the collections of them. The faces should belong to the initial shape, and those that do not belong will be ignored.
|
||||
|
||||
The actual features removal is performed by the low-level *BOPAlgo_RemoveFeatures* algorithm. On the API level, all the inputs are passed into the tool and the method *BOPAlgo_RemoveFeatures::Perform()* is called.
|
||||
|
||||
Before starting Features removal all the faces requested for removal from the shape are sorted on the connected blocks - each block represents single feature to remove.
|
||||
The features will be removed from the shape one by one, which will allow removing all possible features even if there were some problems with the removal of some of them (due to e.g. incorrect input data).
|
||||
|
||||
The removed feature is filled by the extension of the faces adjacent to the feature. In general, the algorithm of removing of the single feature from the shape looks as follows:
|
||||
* Find the faces adjacent to the feature;
|
||||
* Extend the adjacent faces to cover the feature;
|
||||
* Trim the extended faces by the bounds of original face (except for bounds common with the feature), so it will cover the feature only;
|
||||
* Rebuild the solids with reconstructed adjacent faces avoiding the feature faces.
|
||||
|
||||
If the single feature removal was successful, the result shape is overwritten with the new shape, otherwise the results are not kept, and the warning is given.
|
||||
Either way the process continues with the next feature.
|
||||
|
||||
The Defeaturing algorithm has the following options:
|
||||
* History support;
|
||||
|
||||
and the options available from base class (*BOPAlgo_Options*):
|
||||
* Error/Warning reporting system;
|
||||
* Parallel processing mode.
|
||||
|
||||
Please note that the other options of the base class are not supported here and will have no effect.
|
||||
|
||||
<b>History support</b> allows tracking modification of the input shape in terms of Modified, IsDeleted and Generated. By default, the history is collected, but it is possible to disable it using the method *TrackHistory(false)*.
|
||||
On the low-level the history information is collected by the history tool *BRepTools_History*, which can be accessed through the method *BOPAlgo_RemoveFeatures::History()*.
|
||||
|
||||
<b>Error/Warning reporting system</b> - allows obtaining the extended overview of the Errors/Warnings occurred during the operation. As soon as any error appears the algorithm stops working. The warnings allow continuing the job, informing the user that something went wrong. The algorithm returns the following errors/warnings:
|
||||
* BOPAlgo_AlertUnsupportedType - the alert will be given as an error if the input shape does not contain any solids, and as a warning if the input shape contains not only solids, but also other shapes;
|
||||
* BOPAlgo_AlertNoFacesToRemove - the error alert is given in case there are no faces to remove from the shape (nothing to do);
|
||||
* BOPAlgo_AlertUnableToRemoveTheFeature - the warning alert is given to inform the user the removal of the feature is not possible. The algorithm will still try to remove the other features;
|
||||
* BOPAlgo_AlertRemoveFeaturesFailed - the error alert is given in case if the operation was aborted by the unknown reason.
|
||||
|
||||
For more information on the error/warning reporting system please see the chapter @ref occt_algorithms_ers "Errors and warnings reporting system" of Boolean operations user guide.
|
||||
|
||||
<b>Parallel processing mode</b> - allows running the algorithm in parallel mode obtaining the result faster.
|
||||
|
||||
The algorithm has certain limitations:
|
||||
* Intersection of the surfaces of the connected faces adjacent to the feature should not be empty. It means, that such faces should not be tangent to each other.
|
||||
If the intersection of the adjacent faces will be empty, the algorithm will be unable to trim the faces correctly and, most likely, the feature will not be removed.
|
||||
* The algorithm does not process the INTERNAL parts of the solids, they are simply removed during reconstruction.
|
||||
|
||||
Note, that for successful removal of the feature, the extended faces adjacent to the feature should cover the feature completely, otherwise the solids will not be rebuild.
|
||||
Take a look at the simple shape on the image below:
|
||||
@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im001.png,"",220}
|
||||
|
||||
Removal of all three faces of the gap is not going to work, because there will be no face to fill the transverse part of the step.
|
||||
Although, removal of only two faces, keeping one of the transverse faces, will fill the gap with the kept face:
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im002.png,"Keeping the right transverse face",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im003.png,"Keeping the left transverse face",220}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@subsection occt_modalg_defeaturing_usage Usage
|
||||
|
||||
Here is the example of usage of the *BRepAlgoAPI_Defeaturing* algorithm on the C++ level:
|
||||
~~~~
|
||||
TopoDS_Shape aSolid = ...; // Input shape to remove the features from
|
||||
TopTools_ListOfShape aFeatures = ...; // Features to remove from the shape
|
||||
Standard_Boolean bRunParallel = ...; // Parallel processing mode
|
||||
Standard_Boolean isHistoryNeeded = ...; // History support
|
||||
|
||||
BRepAlgoAPI_Defeaturing aDF; // Defeaturing algorithm
|
||||
aDF.SetShape(aSolid); // Set the shape
|
||||
aDF.AddFacesToRemove(aFaces); // Add faces to remove
|
||||
aDF.SetRunParallel(bRunParallel); // Define the processing mode (parallel or single)
|
||||
aDF.TrackHistory(isHistoryNeeded); // Define whether to track the shapes modifications
|
||||
aDF.Build(); // Perform the operation
|
||||
if (!aDF.IsDone()) // Check for the errors
|
||||
{
|
||||
// error treatment
|
||||
Standard_SStream aSStream;
|
||||
aDF.DumpErrors(aSStream);
|
||||
return;
|
||||
}
|
||||
if (aDF.HasWarnings()) // Check for the warnings
|
||||
{
|
||||
// warnings treatment
|
||||
Standard_SStream aSStream;
|
||||
aDF.DumpWarnings(aSStream);
|
||||
}
|
||||
const TopoDS_Shape& aResult = aDF.Shape(); // Result shape
|
||||
~~~~
|
||||
|
||||
To track the history of a shape use the API history methods:
|
||||
~~~~
|
||||
// Obtain modification of the shape
|
||||
const TopTools_ListOfShape& BRepAlgoAPI_Defeaturing::Modified(const TopoDS_Shape& theS);
|
||||
|
||||
// Obtain shapes generated from the shape
|
||||
const TopTools_ListOfShape& BRepAlgoAPI_Defeaturing::Generated(const TopoDS_Shape& theS);
|
||||
|
||||
// Check if the shape is removed or not
|
||||
Standard_Boolean BRepAlgoAPI_Defeaturing::IsDeleted(const TopoDS_Shape& theS);
|
||||
~~~~
|
||||
|
||||
For the usage of the Defeaturing algorithm on the Draw level the command <b>removefeatures</b> has been implemented.
|
||||
|
||||
To track the history of a shape modification during Defeaturing the @ref occt_draw_hist "standard history commands" can be used.
|
||||
|
||||
For more details on commands above please refer the @ref occt_draw_defeaturing "Defeaturing commands" of the Draw test harness user guide.
|
||||
|
||||
To have possibility to access the error/warning shapes of the operation use the *bdrawwarnshapes* command before running the algorithm (see command usage in the @ref occt_algorithms_ers "Errors and warnings reporting system" of Boolean operations user guide).
|
||||
|
||||
@subsection occt_modalg_defeaturing_examples Examples
|
||||
|
||||
Here are the few examples of defeaturing of the ANC101 model:
|
||||
|
||||
@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im004.png,"ANC101 model",220}</td>
|
||||
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im005.png,"Removing the cylindrical protrusion",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im006.png,"Result",220}</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im007.png,"Removing the cylindrical holes",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im008.png,"Result",220}</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im009.png,"Removing the cylindrical holes",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im010.png,"Result",220}</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im011.png,"Removing the small gaps in the front",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im012.png,"Result",220}</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im013.png,"Removing the gaps in the front completely",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im014.png,"Result",220}</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im015.png,"Removing the cylindrical protrusion",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im016.png,"Result",220}</td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Here are the few examples of defeaturing of the model containing boxes with blends:
|
||||
|
||||
@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im017.png,"Box blend model",220}</td>
|
||||
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im018.png,"Removing the blend",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im019.png,"Result",220}</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im020.png,"Removing the blend",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im021.png,"Result",220}</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im022.png,"Removing the blend",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im023.png,"Result",220}</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im024.png,"Removing the blend",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im025.png,"Result",220}</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im026.png,"Removing the blend",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im027.png,"Result",220}</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im028.png,"Removing the blend",220}</td>
|
||||
<td>@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im029.png,"Result",220}</td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@@ -635,7 +635,7 @@ The conception of instancing operates the object hierarchy as follows:
|
||||
|
||||
Classes *AIS_ConnectedInteractive* and *AIS_MultipleConnectedInteractive* are used to implement this conception.
|
||||
|
||||
*AIS_ConnectedInteractive* is an object instance, which reuses the geometry of the connected object but has its own transformation, material, visibility flag, etc. This connection is propagated down to *OpenGl* level, namely to *OpenGl_Structure*. *OpenGl_Structure* can be connected only to a single other structure.
|
||||
*AIS_ConnectedInteractive* is an object instance, which reuses the geometry of the connected object but has its own transformation and visibility flag. This connection is propagated down to *OpenGl* level, namely to *OpenGl_Structure*. *OpenGl_Structure* can be connected only to a single other structure.
|
||||
|
||||
*AIS_ConnectedInteractive* can be referenced to any *AIS_InteractiveObject* in general. When it is referenced to another *AIS_ConnectedInteractive*, it just copies the reference.
|
||||
|
||||
|
@@ -9,16 +9,25 @@ set( OCC_LIB_PATH "" CACHE PATH "OpenCascade LIB PATH")
|
||||
|
||||
set( OCCTDEMO_DIR ${OCC_CASROOT}/samples/mfc/occtdemo)
|
||||
|
||||
if (DEFINED MSVC70)
|
||||
if ((MSVC_VERSION EQUAL 1300) OR (MSVC_VERSION EQUAL 1310))
|
||||
SET(COMPILER vc7)
|
||||
elseif (DEFINED MSVC80)
|
||||
elseif (MSVC_VERSION EQUAL 1400)
|
||||
SET(COMPILER vc8)
|
||||
elseif (DEFINED MSVC90)
|
||||
elseif (MSVC_VERSION EQUAL 1500)
|
||||
SET(COMPILER vc9)
|
||||
elseif (DEFINED MSVC10)
|
||||
elseif (MSVC_VERSION EQUAL 1600)
|
||||
SET(COMPILER vc10)
|
||||
elseif (DEFINED MSVC11)
|
||||
elseif (MSVC_VERSION EQUAL 1700)
|
||||
SET(COMPILER vc11)
|
||||
elseif (MSVC_VERSION EQUAL 1800)
|
||||
SET(COMPILER vc12)
|
||||
elseif (MSVC_VERSION EQUAL 1900)
|
||||
SET(COMPILER vc14)
|
||||
elseif ((MSVC_VERSION GREATER 1900) AND (MSVC_VERSION LESS 2000))
|
||||
# Since Visual Studio 15 (2017), its version diverged from version of
|
||||
# compiler which is 14.1; as that compiler uses the same run-time as 14.0,
|
||||
# we keep its id as "vc14" to be compatibille
|
||||
SET(COMPILER vc14)
|
||||
else()
|
||||
SET(COMPILER ${CMAKE_GENERATOR})
|
||||
endif()
|
||||
|
@@ -65,7 +65,7 @@ add_executable (Geometry WIN32 ${Geometry_SOURCE_FILES}
|
||||
${Geometry_RESOURCE_FILES}
|
||||
${Geometry_RESOURCE_HEADER})
|
||||
|
||||
set_property(TARGET Geometry PROPERTY FOLDER Samples)
|
||||
set_property(TARGET Geometry PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Geometry DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -37,7 +37,7 @@ add_executable ( Modeling WIN32 ${Modeling_SOURCE_FILES}
|
||||
${Modeling_RESOURCE_HEADER}
|
||||
${Modeling_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET Modeling PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Modeling PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Modeling DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <Adaptor3d_HCurveOnSurface.hxx>
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <AIS_ColoredShape.hxx>
|
||||
#include <AIS_ListOfInteractive.hxx>
|
||||
#include <AIS_ListIteratorOfListOfInteractive.hxx>
|
||||
#include <TColStd_Array2OfReal.hxx>
|
||||
@@ -1180,8 +1181,8 @@ Sleep(1000);
|
||||
|
||||
TopoDS_Shape FusedShape = BRepAlgoAPI_Fuse(theBox1,theBox2);
|
||||
|
||||
myAISContext->Erase(ais1,Standard_True);
|
||||
myAISContext->Erase(ais2,Standard_True);
|
||||
myAISContext->Erase(ais1,false);
|
||||
myAISContext->Erase(ais2,false);
|
||||
|
||||
Handle (AIS_Shape) aFusion = new AIS_Shape(FusedShape);
|
||||
myAISContext->SetDisplayMode(aFusion,1,Standard_False);
|
||||
@@ -1190,7 +1191,7 @@ myAISContext->SetMaterial(aFusion,Graphic3d_NOM_PLASTIC,Standard_False);
|
||||
myAISContext->Display(aFusion,Standard_False);
|
||||
const Handle(AIS_InteractiveObject)& anIOFusion = aFusion;
|
||||
myAISContext->SetSelected (anIOFusion, Standard_False);
|
||||
Fit();
|
||||
myAISContext->UpdateCurrentViewer();
|
||||
|
||||
TCollection_AsciiString Message ("\
|
||||
\n\
|
||||
@@ -1218,9 +1219,8 @@ TopoDS_Shape theBox = BRepPrimAPI_MakeBox(axe, 60, 80, 100).Shape();
|
||||
Handle(AIS_Shape) aboxshape=new AIS_Shape(theBox);
|
||||
myAISContext->SetColor(aboxshape,Quantity_NOC_YELLOW,Standard_False);
|
||||
myAISContext->SetMaterial(aboxshape,Graphic3d_NOM_PLASTIC,Standard_False);
|
||||
myAISContext->SetDisplayMode(aboxshape,1,Standard_False);
|
||||
myAISContext->SetTransparency(aboxshape,0.2,Standard_False);
|
||||
myAISContext->Display(aboxshape,Standard_False);
|
||||
myAISContext->Display(aboxshape, AIS_Shaded, 0, Standard_False);
|
||||
const Handle(AIS_InteractiveObject)& anIOBoxShape = aboxshape;
|
||||
myAISContext->SetSelected (anIOBoxShape, Standard_False);
|
||||
Fit();
|
||||
@@ -1235,20 +1235,21 @@ myAISContext->SetTransparency(awedge,0.0,Standard_False);
|
||||
myAISContext->Display(awedge,Standard_False);
|
||||
const Handle(AIS_InteractiveObject)& anIOWedge = awedge;
|
||||
myAISContext->SetSelected (anIOWedge, Standard_False);
|
||||
Fit();
|
||||
myAISContext->UpdateCurrentViewer();
|
||||
Sleep(500);
|
||||
|
||||
TopoDS_Shape theCommonSurface = BRepAlgoAPI_Common(theBox,theWedge);
|
||||
|
||||
myAISContext->Erase(aboxshape,Standard_True);
|
||||
myAISContext->Erase(awedge,Standard_True);
|
||||
myAISContext->Erase(aboxshape, false);
|
||||
myAISContext->Erase(awedge, false);
|
||||
|
||||
Handle(AIS_Shape) acommon = new AIS_Shape(theCommonSurface);
|
||||
myAISContext->SetColor(acommon,Quantity_NOC_GREEN,Standard_False);
|
||||
myAISContext->SetMaterial(acommon,Graphic3d_NOM_PLASTIC,Standard_False);
|
||||
myAISContext->Display(acommon,Standard_False);
|
||||
myAISContext->Display (acommon, AIS_Shaded, 0,Standard_False);
|
||||
const Handle(AIS_InteractiveObject)& anIOCommon = acommon;
|
||||
myAISContext->SetSelected (anIOCommon, Standard_False);
|
||||
myAISContext->UpdateCurrentViewer();
|
||||
|
||||
TCollection_AsciiString Message ("\
|
||||
\n\
|
||||
@@ -4186,24 +4187,27 @@ if (!aPlane.IsNull()) { \n\
|
||||
|
||||
void CModelingDoc::OnExplorer()
|
||||
{
|
||||
AIS_ListOfInteractive aList;
|
||||
myAISContext->DisplayedObjects(aList);
|
||||
AIS_ListIteratorOfListOfInteractive aListIterator;
|
||||
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
|
||||
myAISContext->Remove (aListIterator.Value(), Standard_False);
|
||||
}
|
||||
myAISContext->RemoveAll (false);
|
||||
|
||||
TopoDS_Shape aBox = BRepPrimAPI_MakeBox(100, 100, 100).Shape();
|
||||
TopoDS_Shape aBox = BRepPrimAPI_MakeBox(100, 100, 100).Shape();
|
||||
Standard_Integer j(8);
|
||||
Handle(AIS_Shape) theBox = new AIS_Shape(aBox);
|
||||
Handle(AIS_ColoredShape) theBox = new AIS_ColoredShape(aBox);
|
||||
myAISContext->SetColor(theBox,Quantity_NOC_RED,Standard_False);
|
||||
myAISContext->SetMaterial(theBox,Graphic3d_NOM_PLASTIC,Standard_False);
|
||||
myAISContext->Display(theBox,Standard_False);
|
||||
myAISContext->Display(theBox, AIS_Shaded, 0,Standard_False);
|
||||
Fit();
|
||||
Sleep(500);
|
||||
|
||||
for (TopExp_Explorer exp (aBox,TopAbs_FACE);exp.More();exp.Next()) {
|
||||
for (TopExp_Explorer exp (aBox,TopAbs_FACE);exp.More();exp.Next())
|
||||
{
|
||||
TopoDS_Face aCurrentFace = TopoDS::Face(exp.Current());
|
||||
{
|
||||
Handle(AIS_ColoredDrawer) aSubFaceAspects = theBox->CustomAspects (aCurrentFace);
|
||||
aSubFaceAspects->SetShadingAspect (new Prs3d_ShadingAspect());
|
||||
*aSubFaceAspects->ShadingAspect()->Aspect() = *theBox->Attributes()->ShadingAspect()->Aspect();
|
||||
aSubFaceAspects->ShadingAspect()->Aspect()->ChangeFrontMaterial().SetTransparency (0.8f);
|
||||
myAISContext->Redisplay (theBox, false);
|
||||
}
|
||||
|
||||
//test the orientation of the current face
|
||||
TopAbs_Orientation orient = aCurrentFace.Orientation();
|
||||
@@ -4224,49 +4228,28 @@ void CModelingDoc::OnExplorer()
|
||||
gp_Ax1 norm = agpPlane.Axis();
|
||||
gp_Dir dir = norm.Direction();
|
||||
gp_Vec move(dir);
|
||||
//Connect
|
||||
// new in 2.0 ... AIS_ConnectedInteractive wants a TopLoc_Location instead of a Geom_Transformation
|
||||
// TopLoc_Location aLocation;
|
||||
// Handle (AIS_ConnectedInteractive) theTransformedDisplay = new AIS_ConnectedInteractive();
|
||||
// theTransformedDisplay->Connect(theMovingFace,theMove);
|
||||
// theTransformedDisplay->Connect(theMovingFace, aLocation);
|
||||
// Handle (Geom_Transformation) theMove = new Geom_Transformation(aLocation->Transformation());
|
||||
// new in 2.0
|
||||
// myAISContext->Display(theTransformedDisplay);
|
||||
|
||||
TopLoc_Location aLocation;
|
||||
Handle (AIS_ConnectedInteractive) theTransformedDisplay = new AIS_ConnectedInteractive();
|
||||
theTransformedDisplay->Connect(theMovingFace, aLocation);
|
||||
|
||||
|
||||
// = myAISContext->Location(theMovingFace);
|
||||
Handle (Geom_Transformation) theMove = new Geom_Transformation(aLocation.Transformation());
|
||||
myAISContext->Display(theTransformedDisplay,Standard_False);
|
||||
Fit();
|
||||
myAISContext->UpdateCurrentViewer();
|
||||
Sleep (500);
|
||||
|
||||
for (Standard_Integer i=1;i<=30;i++) {
|
||||
|
||||
//Build a transformation on the display
|
||||
// theMove->SetTranslation(move*i);
|
||||
|
||||
// if (orient==TopAbs_FORWARD) theTransformedDisplay->SetTransformation(theMove);
|
||||
// else theTransformedDisplay->SetTransformation(theMove->Inverted());
|
||||
|
||||
// myAISContext->Redisplay(theTransformedDisplay);
|
||||
|
||||
// new in 2.0
|
||||
for (Standard_Integer i=1;i<=30;i++)
|
||||
{
|
||||
theMove->SetTranslation(move*i);
|
||||
if (orient==TopAbs_FORWARD) myAISContext->SetLocation(theTransformedDisplay,TopLoc_Location(theMove->Trsf()));
|
||||
else myAISContext->SetLocation(theTransformedDisplay,TopLoc_Location(theMove->Inverted()->Trsf()));
|
||||
|
||||
myAISContext->Redisplay(theTransformedDisplay,Standard_False);
|
||||
myAISContext->Redisplay(theTransformedDisplay,true);
|
||||
}
|
||||
j+=15;
|
||||
}
|
||||
//myAISContext->Erase(theBox,Standard_True,Standard_False);
|
||||
myAISContext->Remove(theBox, Standard_False);
|
||||
Fit();
|
||||
|
||||
myAISContext->UpdateCurrentViewer();
|
||||
Sleep (500);
|
||||
|
||||
TCollection_AsciiString Message ("\
|
||||
|
@@ -33,7 +33,7 @@ add_executable (Viewer2d WIN32 ${Viewer2d_SOURCE_FILES}
|
||||
${Viewer2d_RESOURCE_HEADER}
|
||||
${Viewer2d_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET Viewer2d PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Viewer2d PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Viewer2d DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -73,7 +73,6 @@
|
||||
#include <AIS_Line.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_InteractiveObject.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_TextLabel.hxx>
|
||||
|
||||
#include <Aspect_TypeOfline.hxx>
|
||||
|
@@ -330,8 +330,7 @@ void CViewer2dDoc::OnBUTTONTestImage()
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (40,50) ;
|
||||
anImage->SetScale (1.0);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage,3,Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
FitAll2DViews (Standard_True);
|
||||
}
|
||||
}
|
||||
@@ -365,48 +364,41 @@ void CViewer2dDoc::OnBUTTONMultipleImage()
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (40, 50);
|
||||
anImage->SetScale (0.5);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
{ // 2
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (100, 50);
|
||||
anImage->SetScale (0.9);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
{ // 3
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (40, 40);
|
||||
anImage->SetScale (0.3);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
{ // 4
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (50, 40);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
{ // 5
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (80, 45);
|
||||
anImage->SetScale (2);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
{ // 6
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (20, -20);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
{ // 7
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (0, 0);
|
||||
anImage->SetScale (0.5);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
FitAll2DViews (Standard_True); // Update Viewer
|
||||
}
|
||||
|
@@ -3,7 +3,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <AIS_Shape.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include "OCC_2dDoc.h"
|
||||
|
||||
|
@@ -57,7 +57,7 @@ add_executable (Viewer3d WIN32 ${Viewer3d_SOURCE_FILES}
|
||||
${COMMON_WINMAIN_FILE}
|
||||
${Viewer3d_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET Viewer3d PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Viewer3d PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Viewer3d DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -196,7 +196,7 @@ void CViewer3dDoc::OnSphere()
|
||||
myAISContext->SetMaterial (mySphere, Graphic3d_NOM_BRONZE, Standard_False);
|
||||
myAISContext->SetDisplayMode (mySphere, 1, Standard_False);
|
||||
|
||||
myAISContext->Display (mySphere, Standard_False);
|
||||
myAISContext->Display (mySphere, Standard_True);
|
||||
TCollection_AsciiString Message("\
|
||||
BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.);\n\
|
||||
");
|
||||
@@ -681,55 +681,55 @@ void CViewer3dDoc::Popup (const Standard_Integer x,
|
||||
//Set faces selection mode
|
||||
void CViewer3dDoc::OnFaces()
|
||||
{
|
||||
myAISContext->Deactivate();
|
||||
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_FACE));
|
||||
|
||||
myCResultDialog.SetTitle("Standard mode: TopAbs_FACE");
|
||||
myCResultDialog.SetText(" myAISContext->OpenLocalContext(); \n"
|
||||
" \n"
|
||||
" myAISContext->ActivateStandardMode(TopAbs_FACE); \n"
|
||||
" \n");
|
||||
myCResultDialog.SetText(" myAISContext->Deactivate();\n"
|
||||
" myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_FACE));\n\n");
|
||||
SetTitle (L"Standard mode: TopAbs_FACE");
|
||||
}
|
||||
|
||||
//Set edges selection mode
|
||||
void CViewer3dDoc::OnEdges()
|
||||
{
|
||||
myAISContext->Deactivate();
|
||||
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));
|
||||
|
||||
myCResultDialog.SetTitle("Standard mode: TopAbs_EDGE");
|
||||
myCResultDialog.SetText(" myAISContext->OpenLocalContext(); \n"
|
||||
" \n"
|
||||
" myAISContext->ActivateStandardMode(TopAbs_EDGE); \n"
|
||||
" \n");
|
||||
myCResultDialog.SetText(" myAISContext->Deactivate();\n"
|
||||
" myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));\n\n");
|
||||
SetTitle (L"Standard mode: TopAbs_EDGE");
|
||||
}
|
||||
|
||||
// Set vertices selection mode
|
||||
void CViewer3dDoc::OnVertices()
|
||||
{
|
||||
myAISContext->Deactivate();
|
||||
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_VERTEX));
|
||||
|
||||
myCResultDialog.SetTitle("Standard mode: TopAbs_VERTEX");
|
||||
myCResultDialog.SetText(" myAISContext->OpenLocalContext(); \n"
|
||||
" \n"
|
||||
" myAISContext->ActivateStandardMode(TopAbs_VERTEX); \n"
|
||||
" \n");
|
||||
myCResultDialog.SetText(" myAISContext->Deactivate();\n"
|
||||
" myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_VERTEX));\n\n");
|
||||
SetTitle (L"Standard mode: TopAbs_VERTEX");
|
||||
}
|
||||
|
||||
//Neutral selection mode
|
||||
void CViewer3dDoc::OnNeutral()
|
||||
{
|
||||
myAISContext->Deactivate();
|
||||
myAISContext->Activate (0);
|
||||
|
||||
myCResultDialog.SetTitle("Standard mode: Neutral");
|
||||
myCResultDialog.SetText(" myAISContext->CloseAllContexts(); \n"
|
||||
" \n");
|
||||
myCResultDialog.SetText(" myAISContext->Deactivate();\n"
|
||||
" myAISContext->Activate (0);\n\n");
|
||||
SetTitle (L"Standard mode: Neutral");
|
||||
}
|
||||
|
||||
// Change the color of faces on a user cylinder
|
||||
void CViewer3dDoc::OnUsercylinderChangefacecolor()
|
||||
{
|
||||
myAISContext->Activate(myAISContext->SelectedInteractive(), 4);
|
||||
myAISContext->Activate (myAISContext->SelectedInteractive(), AIS_Shape::SelectionMode (TopAbs_FACE));
|
||||
myState = FACE_COLOR;
|
||||
// see the following of treatment in inputevent
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#include "ModelClippingDlg.h"
|
||||
#include "TrihedronDlg.h"
|
||||
|
||||
#include <AIS_RubberBand.hxx>
|
||||
#include <V3d_AmbientLight.hxx>
|
||||
#include <V3d_DirectionalLight.hxx>
|
||||
#include <V3d_PositionalLight.hxx>
|
||||
@@ -109,7 +110,7 @@ CViewer3dView::CViewer3dView()
|
||||
myCurZoom (0.0),
|
||||
NbActiveLights (2), // There are 2 default active lights
|
||||
myHlrModeIsOn (Standard_False),
|
||||
m_Pen (NULL),
|
||||
myRect (new AIS_RubberBand (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0)),
|
||||
myAxisKey (0),
|
||||
myScaleDirection (0)
|
||||
{
|
||||
@@ -120,7 +121,6 @@ CViewer3dView::CViewer3dView()
|
||||
CViewer3dView::~CViewer3dView()
|
||||
{
|
||||
myView->Remove();
|
||||
if (m_Pen) delete m_Pen;
|
||||
}
|
||||
|
||||
BOOL CViewer3dView::PreCreateWindow(CREATESTRUCT& cs)
|
||||
@@ -424,7 +424,7 @@ GetDocument()->UpdateResultMessageDlg("SetPosition",Message);
|
||||
BRepPrimAPI_MakeCone MakeCone(gp_Ax2(p1, gp_Dir(gp_Vec(p1, p2))),
|
||||
0, (p1.Distance(p2))/tan(1.04), coneHeigth);
|
||||
spotConeShape->Set(MakeCone.Solid());
|
||||
GetDocument()->GetAISContext()->Display (spotConeShape, 0, -1, Standard_True);
|
||||
GetDocument()->GetAISContext()->Display (spotConeShape, 0, -1, false);
|
||||
((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick the target point");
|
||||
myCurrentMode = CurAction3d_TargetSpotLight;
|
||||
|
||||
@@ -646,7 +646,6 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
{
|
||||
case CurAction3d_Nothing :
|
||||
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False);
|
||||
myXmax = point.x; myYmax = point.y;
|
||||
if (nFlags & MK_SHIFT)
|
||||
GetDocument()->ShiftDragEvent(myXmax,myYmax,0,myView);
|
||||
@@ -661,8 +660,7 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
break;
|
||||
case CurAction3d_WindowZooming :
|
||||
myXmax = point.x; myYmax = point.y;
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash);
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash);
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True, Aspect_TOL_DASH);
|
||||
|
||||
break;
|
||||
case CurAction3d_DynamicPanning :
|
||||
@@ -710,6 +708,7 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
GetDocument()->GetAISContext()->Redisplay(directionalEdgeShape,0,Standard_True);
|
||||
myCurrent_DirectionalLight->SetDirection(p2.X()-p1.X(),p2.Y()-p1.Y(),p2.Z()-p1.Z());
|
||||
myView->UpdateLights();
|
||||
myView->Redraw();
|
||||
}
|
||||
}
|
||||
else if (myCurrentMode == CurAction3d_BeginPositionalLight)
|
||||
@@ -718,6 +717,7 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
//Update the light dynamically
|
||||
myCurrent_PositionalLight->SetPosition(p2.X(),p2.Y(),p2.Z());
|
||||
myView->UpdateLights();
|
||||
myView->Redraw();
|
||||
}
|
||||
else if (myCurrentMode == CurAction3d_TargetSpotLight)
|
||||
{
|
||||
@@ -732,6 +732,7 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
GetDocument()->GetAISContext()->Redisplay(spotConeShape,0,Standard_True);
|
||||
myCurrent_SpotLight->SetDirection(p2.X()-p1.X(),p2.Y()-p1.Y(),p2.Z()-p1.Z());
|
||||
myView->UpdateLights();
|
||||
myView->Redraw();
|
||||
}
|
||||
}
|
||||
else if (myCurrentMode == CurAction3d_EndSpotLight)
|
||||
@@ -747,12 +748,17 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
GetDocument()->GetAISContext()->Redisplay(spotConeShape,0,Standard_True);
|
||||
myCurrent_SpotLight->SetAngle((float )atan(p2.Distance(p3)/p1.Distance(p2))) ;
|
||||
myView->UpdateLights();
|
||||
myView->Redraw();
|
||||
}
|
||||
}
|
||||
if (nFlags & MK_SHIFT)
|
||||
else if (nFlags & MK_SHIFT)
|
||||
{
|
||||
GetDocument()->ShiftMoveEvent(point.x,point.y,myView);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetDocument()->MoveEvent(point.x,point.y,myView);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -799,60 +805,34 @@ void CViewer3dView::OnUpdateBUTTONRot(CCmdUI* pCmdUI)
|
||||
pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicRotation);
|
||||
}
|
||||
|
||||
void CViewer3dView::DrawRectangle(const Standard_Integer MinX ,
|
||||
const Standard_Integer MinY ,
|
||||
const Standard_Integer MaxX ,
|
||||
const Standard_Integer MaxY ,
|
||||
const Standard_Boolean Draw ,
|
||||
const LineStyle aLineStyle)
|
||||
void CViewer3dView::DrawRectangle (Standard_Integer theMinX,
|
||||
Standard_Integer theMinY,
|
||||
Standard_Integer theMaxX,
|
||||
Standard_Integer theMaxY,
|
||||
Standard_Boolean theToDraw,
|
||||
Aspect_TypeOfLine theLineType)
|
||||
{
|
||||
static int m_DrawMode;
|
||||
if (!m_Pen && aLineStyle ==Solid )
|
||||
{m_Pen = new CPen(PS_SOLID, 1, RGB(0,0,0)); m_DrawMode = R2_MERGEPENNOT;}
|
||||
else if (!m_Pen && aLineStyle ==Dot )
|
||||
{m_Pen = new CPen(PS_DOT, 1, RGB(0,0,0)); m_DrawMode = R2_XORPEN;}
|
||||
else if (!m_Pen && aLineStyle == ShortDash)
|
||||
{m_Pen = new CPen(PS_DASH, 1, RGB(255,0,0)); m_DrawMode = R2_XORPEN;}
|
||||
else if (!m_Pen && aLineStyle == LongDash)
|
||||
{m_Pen = new CPen(PS_DASH, 1, RGB(0,0,0)); m_DrawMode = R2_NOTXORPEN;}
|
||||
else if (aLineStyle == Default)
|
||||
{ m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT;}
|
||||
const Handle(AIS_InteractiveContext)& aCtx = GetDocument()->GetAISContext();
|
||||
if (!theToDraw)
|
||||
{
|
||||
aCtx->Remove (myRect, false);
|
||||
aCtx->CurrentViewer()->RedrawImmediate();
|
||||
return;
|
||||
}
|
||||
|
||||
CPen* aOldPen = NULL;
|
||||
CClientDC clientDC(this);
|
||||
if (m_Pen) aOldPen = clientDC.SelectObject(m_Pen);
|
||||
clientDC.SetROP2(m_DrawMode);
|
||||
|
||||
static Standard_Integer StoredMinX, StoredMaxX, StoredMinY, StoredMaxY;
|
||||
static Standard_Boolean m_IsVisible;
|
||||
|
||||
if ( m_IsVisible && !Draw) // move or up : erase at the old position
|
||||
{
|
||||
clientDC.MoveTo(StoredMinX,StoredMinY);
|
||||
clientDC.LineTo(StoredMinX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMinY);
|
||||
clientDC.LineTo(StoredMinX,StoredMinY);
|
||||
m_IsVisible = false;
|
||||
}
|
||||
|
||||
StoredMinX = Min ( MinX, MaxX );
|
||||
StoredMinY = Min ( MinY, MaxY );
|
||||
StoredMaxX = Max ( MinX, MaxX );
|
||||
StoredMaxY = Max ( MinY, MaxY);
|
||||
|
||||
if (Draw) // move : draw
|
||||
{
|
||||
clientDC.MoveTo(StoredMinX,StoredMinY);
|
||||
clientDC.LineTo(StoredMinX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMinY);
|
||||
clientDC.LineTo(StoredMinX,StoredMinY);
|
||||
m_IsVisible = true;
|
||||
}
|
||||
|
||||
if (m_Pen)
|
||||
clientDC.SelectObject(aOldPen);
|
||||
CRect aRect;
|
||||
GetWindowRect (aRect);
|
||||
myRect->SetLineType (theLineType);
|
||||
myRect->SetRectangle (theMinX, aRect.Height() - theMinY, theMaxX, aRect.Height() - theMaxY);
|
||||
if (!aCtx->IsDisplayed (myRect))
|
||||
{
|
||||
aCtx->Display (myRect, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
aCtx->Redisplay (myRect, false);
|
||||
}
|
||||
aCtx->CurrentViewer()->RedrawImmediate();
|
||||
}
|
||||
|
||||
void CViewer3dView::OnModifyChangeBackground()
|
||||
@@ -978,6 +958,7 @@ void CViewer3dView::OnAmbientLight()
|
||||
NbActiveLights++;
|
||||
|
||||
myView->UpdateLights();
|
||||
myView->Redraw();
|
||||
|
||||
TCollection_AsciiString Message("\
|
||||
myCurrent_AmbientLight=new V3d_AmbientLight(Quantity_NOC_GRAY);\n\
|
||||
|
@@ -33,6 +33,8 @@ enum View3D_CurrentAction {
|
||||
CurAction3d_EndDirectionalLight
|
||||
};
|
||||
|
||||
class AIS_RubberBand;
|
||||
|
||||
class CViewer3dView : public CView
|
||||
{
|
||||
protected: // create from serialization only
|
||||
@@ -145,16 +147,13 @@ private:
|
||||
Handle(V3d_DirectionalLight) myCurrent_DirectionalLight;
|
||||
Handle(Graphic3d_ClipPlane) myClippingPlane;
|
||||
Handle(AIS_Shape) myShape;
|
||||
Handle(AIS_RubberBand) myRect; //!< Rubber rectangle for selection
|
||||
|
||||
private:
|
||||
enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
|
||||
CPen* m_Pen;
|
||||
virtual void DrawRectangle (const Standard_Integer MinX ,
|
||||
const Standard_Integer MinY ,
|
||||
const Standard_Integer MaxX ,
|
||||
const Standard_Integer MaxY ,
|
||||
const Standard_Boolean Draw ,
|
||||
const LineStyle aLineStyle = Default );
|
||||
|
||||
void DrawRectangle (Standard_Integer theMinX, Standard_Integer theMinY, Standard_Integer theMaxX, Standard_Integer theMaxY,
|
||||
Standard_Boolean theToDraw, Aspect_TypeOfLine theLineType = Aspect_TOL_SOLID);
|
||||
|
||||
UINT myAxisKey;
|
||||
UINT myScaleDirection;
|
||||
void RedrawVisMode();
|
||||
|
@@ -35,7 +35,7 @@ add_executable (ImportExport WIN32 ${ImportExport_SOURCE_FILES}
|
||||
${ImportExport_RESOURCE_HEADER}
|
||||
${ImportExport_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET ImportExport PROPERTY FOLDER Samples)
|
||||
set_property (TARGET ImportExport PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS ImportExport DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -22,18 +22,6 @@ END_MESSAGE_MAP()
|
||||
|
||||
CImportExportApp::CImportExportApp() : OCC_App()
|
||||
{
|
||||
// Set the local system units
|
||||
try
|
||||
{
|
||||
UnitsAPI::SetLocalSystem (UnitsAPI_MDTV);
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
AfxMessageBox (L"Fatal Error in units initialisation");
|
||||
}
|
||||
|
||||
SampleName = "ImportExport"; //for about dialog
|
||||
SetSamplePath (L"..\\..\\05_ImportExport");
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -46,7 +34,20 @@ CImportExportApp theApp;
|
||||
|
||||
BOOL CImportExportApp::InitInstance()
|
||||
{
|
||||
AfxEnableControlContainer();
|
||||
// Set the local system units
|
||||
try
|
||||
{
|
||||
UnitsAPI::SetLocalSystem (UnitsAPI_MDTV);
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
AfxMessageBox (L"Fatal Error in units initialisation");
|
||||
}
|
||||
|
||||
SampleName = "ImportExport"; //for about dialog
|
||||
SetSamplePath (L"..\\..\\05_ImportExport");
|
||||
|
||||
AfxEnableControlContainer();
|
||||
|
||||
// Standard initialization
|
||||
// If you are not using these features and wish to reduce the size
|
||||
|
@@ -49,7 +49,7 @@ add_executable (Ocaf WIN32 ${Ocaf_SOURCE_FILES}
|
||||
${Ocaf_RESOURCE_FILES} )
|
||||
|
||||
|
||||
set_property (TARGET Ocaf PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Ocaf PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Ocaf DESTINATION "${INSTALL_DIR_BIN}")
|
||||
@@ -67,4 +67,4 @@ include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
${Ocaf_SRC_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
|
||||
target_link_libraries (Ocaf mfcsample TKLCAF TKVCAF TKBO TKBin TKXml)
|
||||
target_link_libraries (Ocaf mfcsample TKLCAF TKVCAF TKBO TKBin TKXml TKBinL TKXmlL)
|
||||
|
@@ -39,7 +39,7 @@ add_executable (Triangulation WIN32 ${Triangulation_SOURCE_FILES}
|
||||
${Triangulation_RESOURCE_HEADER}
|
||||
${Triangulation_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET Triangulation PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Triangulation PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Triangulation DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -61,7 +61,7 @@ add_executable (HLR WIN32 ${HLR_SOURCE_FILES}
|
||||
${HLR_RESOURCE_HEADER}
|
||||
${HLR_RESOURCE_FILES} )
|
||||
|
||||
set_property (TARGET HLR PROPERTY FOLDER Samples)
|
||||
set_property (TARGET HLR PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS HLR DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -44,7 +44,7 @@ add_executable (Animation WIN32 ${Animation_SOURCE_FILES}
|
||||
${COMMON_WINMAIN_FILE}
|
||||
${Animation_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET Animation PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Animation PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Animation DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -11,6 +11,8 @@
|
||||
|
||||
#include "Sensitivity.h"
|
||||
|
||||
#include <AIS_RubberBand.hxx>
|
||||
|
||||
#ifdef _DEBUG
|
||||
//#define new DEBUG_NEW by CasCade
|
||||
#undef THIS_FILE
|
||||
@@ -92,7 +94,7 @@ CAnimationView3D::CAnimationView3D()
|
||||
myCurrentMode (CurrentAction3d_Nothing),
|
||||
m_FlySens (500.0),
|
||||
m_TurnSens (M_PI / 40.0),
|
||||
m_Pen (NULL)
|
||||
myRect (new AIS_RubberBand (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0))
|
||||
{
|
||||
// TODO: add construction code here
|
||||
}
|
||||
@@ -100,7 +102,6 @@ CAnimationView3D::CAnimationView3D()
|
||||
CAnimationView3D::~CAnimationView3D()
|
||||
{
|
||||
myView->Remove();
|
||||
if (m_Pen) delete m_Pen;
|
||||
}
|
||||
|
||||
BOOL CAnimationView3D::PreCreateWindow(CREATESTRUCT& cs)
|
||||
@@ -403,7 +404,7 @@ void CAnimationView3D::OnLButtonUp(UINT nFlags, CPoint point)
|
||||
break;
|
||||
case CurrentAction3d_WindowZooming :
|
||||
myXmax=point.x; myYmax=point.y;
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash);
|
||||
DrawRectangle (myXmin, myYmin, myXmax, myYmax, Standard_False, Aspect_TOL_DASH);
|
||||
if ((abs(myXmin-myXmax)>ValZWMin) || (abs(myYmin-myYmax)>ValZWMin))
|
||||
// Test if the zoom window is greater than a minimale window.
|
||||
{
|
||||
@@ -503,7 +504,6 @@ void CAnimationView3D::OnMouseMove(UINT nFlags, CPoint point)
|
||||
{
|
||||
case CurrentAction3d_Nothing :
|
||||
myXmax = point.x; myYmax = point.y;
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False);
|
||||
if (nFlags & MK_SHIFT)
|
||||
GetDocument()->ShiftDragEvent(myXmax,myYmax,0,myView);
|
||||
else
|
||||
@@ -517,8 +517,7 @@ void CAnimationView3D::OnMouseMove(UINT nFlags, CPoint point)
|
||||
break;
|
||||
case CurrentAction3d_WindowZooming :
|
||||
myXmax = point.x; myYmax = point.y;
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash);
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash);
|
||||
DrawRectangle (myXmin, myYmin, myXmax, myYmax, Standard_True, Aspect_TOL_DASH);
|
||||
break;
|
||||
case CurrentAction3d_DynamicPanning :
|
||||
myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning
|
||||
@@ -652,57 +651,36 @@ void CAnimationView3D::OnChangeBackground()
|
||||
//-----------------------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------------------
|
||||
void CAnimationView3D::DrawRectangle(const Standard_Integer MinX ,
|
||||
const Standard_Integer MinY ,
|
||||
const Standard_Integer MaxX ,
|
||||
const Standard_Integer MaxY ,
|
||||
const Standard_Boolean Draw ,
|
||||
const LineStyle aLineStyle)
|
||||
void CAnimationView3D::DrawRectangle (Standard_Integer theMinX,
|
||||
Standard_Integer theMinY,
|
||||
Standard_Integer theMaxX,
|
||||
Standard_Integer theMaxY,
|
||||
Standard_Boolean theToDraw,
|
||||
Aspect_TypeOfLine theLineType)
|
||||
{
|
||||
static int m_DrawMode;
|
||||
if (!m_Pen && aLineStyle ==Solid )
|
||||
{m_Pen = new CPen(PS_SOLID, 1, RGB(0,0,0)); m_DrawMode = R2_MERGEPENNOT;}
|
||||
else if (!m_Pen && aLineStyle ==Dot )
|
||||
{m_Pen = new CPen(PS_DOT, 1, RGB(0,0,0)); m_DrawMode = R2_XORPEN;}
|
||||
else if (!m_Pen && aLineStyle == ShortDash)
|
||||
{m_Pen = new CPen(PS_DASH, 1, RGB(255,0,0)); m_DrawMode = R2_XORPEN;}
|
||||
else if (!m_Pen && aLineStyle == LongDash)
|
||||
{m_Pen = new CPen(PS_DASH, 1, RGB(0,0,0)); m_DrawMode = R2_NOTXORPEN;}
|
||||
else if (aLineStyle == Default)
|
||||
{ m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT;}
|
||||
const Handle(AIS_InteractiveContext)& aCtx = GetDocument()->GetAISContext();
|
||||
if (!theToDraw)
|
||||
{
|
||||
aCtx->Remove (myRect, false);
|
||||
aCtx->CurrentViewer()->RedrawImmediate();
|
||||
return;
|
||||
}
|
||||
|
||||
CPen* aOldPen = NULL;
|
||||
CClientDC clientDC(this);
|
||||
if (m_Pen) aOldPen = clientDC.SelectObject(m_Pen);
|
||||
clientDC.SetROP2(m_DrawMode);
|
||||
|
||||
static Standard_Integer StoredMinX, StoredMaxX, StoredMinY, StoredMaxY;
|
||||
static Standard_Boolean m_IsVisible;
|
||||
|
||||
if ( m_IsVisible && !Draw) // move or up : erase at the old position
|
||||
{
|
||||
clientDC.MoveTo(StoredMinX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMinY);
|
||||
m_IsVisible = false;
|
||||
}
|
||||
|
||||
StoredMinX = Min ( MinX, MaxX );
|
||||
StoredMinY = Min ( MinY, MaxY );
|
||||
StoredMaxX = Max ( MinX, MaxX );
|
||||
StoredMaxY = Max ( MinY, MaxY);
|
||||
|
||||
if (Draw) // move : draw
|
||||
{
|
||||
clientDC.MoveTo(StoredMinX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMinY);
|
||||
m_IsVisible = true;
|
||||
}
|
||||
|
||||
if (m_Pen)
|
||||
clientDC.SelectObject(aOldPen);
|
||||
CRect aRect;
|
||||
GetWindowRect (aRect);
|
||||
myRect->SetLineType (theLineType);
|
||||
myRect->SetRectangle (theMinX, aRect.Height() - theMinY, theMaxX, aRect.Height() - theMaxY);
|
||||
if (!aCtx->IsDisplayed (myRect))
|
||||
{
|
||||
aCtx->Display (myRect, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
aCtx->Redisplay (myRect, false);
|
||||
}
|
||||
aCtx->CurrentViewer()->RedrawImmediate();
|
||||
}
|
||||
|
||||
void CAnimationView3D::OnStop()
|
||||
{
|
||||
KillTimer(GetDocument()->myCount);
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "AnimationDoc.h"
|
||||
#include "..\..\Common\res\OCC_Resource.h"
|
||||
|
||||
class AIS_RubberBand;
|
||||
|
||||
enum View3D_CurrentAction {
|
||||
CurrentAction3d_Nothing,
|
||||
CurrentAction3d_DynamicZooming,
|
||||
@@ -146,14 +148,9 @@ private:
|
||||
double m_Focus ;
|
||||
|
||||
private:
|
||||
enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
|
||||
CPen* m_Pen;
|
||||
virtual void DrawRectangle (const Standard_Integer MinX ,
|
||||
const Standard_Integer MinY ,
|
||||
const Standard_Integer MaxX ,
|
||||
const Standard_Integer MaxY ,
|
||||
const Standard_Boolean Draw ,
|
||||
const LineStyle aLineStyle = Default );
|
||||
Handle(AIS_RubberBand) myRect; //!< Rubber rectangle for selection
|
||||
void DrawRectangle (Standard_Integer theMinX, Standard_Integer theMinY, Standard_Integer theMaxX, Standard_Integer theMaxY,
|
||||
Standard_Boolean theToDraw, Aspect_TypeOfLine theLineType = Aspect_TOL_SOLID);
|
||||
};
|
||||
|
||||
#ifndef _DEBUG // debug version in AnimationView.cpp
|
||||
|
@@ -61,7 +61,7 @@ add_executable (Convert WIN32 ${Convert_SOURCE_FILES}
|
||||
${COMMON_WINMAIN_FILE}
|
||||
${WNT_RESOURCE_FILES} )
|
||||
|
||||
set_property (TARGET Convert PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Convert PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Convert DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -7,6 +7,7 @@
|
||||
#include "OCCDemoDoc.h"
|
||||
#include "OCCDemoView.h"
|
||||
|
||||
#include <AIS_RubberBand.hxx>
|
||||
#include <Graphic3d_GraphicDriver.hxx>
|
||||
|
||||
#define ValZWMin 1
|
||||
@@ -69,7 +70,7 @@ COCCDemoView::COCCDemoView()
|
||||
myCurZoom=0;
|
||||
myCurrentMode = CurAction3d_Nothing;
|
||||
myVisMode = VIS_SHADE;
|
||||
m_Pen = NULL;
|
||||
myRect = new AIS_RubberBand (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0);
|
||||
myGraphicDriver = ((COCCDemoApp*)AfxGetApp())->GetGraphicDriver();
|
||||
}
|
||||
|
||||
@@ -77,8 +78,6 @@ COCCDemoView::~COCCDemoView()
|
||||
{
|
||||
if (!myView.IsNull())
|
||||
myView->Remove();
|
||||
if (m_Pen)
|
||||
delete m_Pen;
|
||||
}
|
||||
|
||||
BOOL COCCDemoView::PreCreateWindow(CREATESTRUCT& cs)
|
||||
@@ -336,8 +335,7 @@ void COCCDemoView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
break;
|
||||
case CurAction3d_WindowZooming :
|
||||
myXmax = point.x; myYmax = point.y;
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash);
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash);
|
||||
DrawRectangle (myXmin, myYmin, myXmax, myYmax, Standard_True, Aspect_TOL_DASH);
|
||||
break;
|
||||
case CurAction3d_DynamicPanning :
|
||||
myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning
|
||||
@@ -407,67 +405,34 @@ void COCCDemoView::OnUpdateBUTTONRot(CCmdUI* pCmdUI)
|
||||
pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicRotation);
|
||||
}
|
||||
|
||||
void COCCDemoView::DrawRectangle(const Standard_Integer MinX,
|
||||
const Standard_Integer MinY,
|
||||
const Standard_Integer MaxX,
|
||||
const Standard_Integer MaxY,
|
||||
const Standard_Boolean Draw,
|
||||
const LineStyle aLineStyle)
|
||||
void COCCDemoView::DrawRectangle (Standard_Integer theMinX,
|
||||
Standard_Integer theMinY,
|
||||
Standard_Integer theMaxX,
|
||||
Standard_Integer theMaxY,
|
||||
Standard_Boolean theToDraw,
|
||||
Aspect_TypeOfLine theLineType)
|
||||
{
|
||||
static int m_DrawMode;
|
||||
if (!m_Pen && aLineStyle ==Solid )
|
||||
const Handle(AIS_InteractiveContext)& aCtx = GetDocument()->GetAISContext();
|
||||
if (!theToDraw)
|
||||
{
|
||||
m_Pen = new CPen(PS_SOLID, 1, RGB(0,0,0)); m_DrawMode = R2_MERGEPENNOT;
|
||||
}
|
||||
else if (!m_Pen && aLineStyle ==Dot )
|
||||
{
|
||||
m_Pen = new CPen(PS_DOT, 1, RGB(0,0,0)); m_DrawMode = R2_XORPEN;
|
||||
}
|
||||
else if (!m_Pen && aLineStyle == ShortDash)
|
||||
{
|
||||
m_Pen = new CPen(PS_DASH, 1, RGB(255,0,0)); m_DrawMode = R2_XORPEN;
|
||||
}
|
||||
else if (!m_Pen && aLineStyle == LongDash)
|
||||
{
|
||||
m_Pen = new CPen(PS_DASH, 1, RGB(0,0,0)); m_DrawMode = R2_NOTXORPEN;
|
||||
}
|
||||
else if (aLineStyle == Default)
|
||||
{
|
||||
m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT;
|
||||
aCtx->Remove (myRect, false);
|
||||
aCtx->CurrentViewer()->RedrawImmediate();
|
||||
return;
|
||||
}
|
||||
|
||||
CPen* aOldPen = NULL;
|
||||
CClientDC clientDC(this);
|
||||
if (m_Pen)
|
||||
aOldPen = clientDC.SelectObject(m_Pen);
|
||||
clientDC.SetROP2(m_DrawMode);
|
||||
|
||||
static Standard_Integer StoredMinX, StoredMaxX, StoredMinY, StoredMaxY;
|
||||
static Standard_Boolean m_IsVisible = Standard_False;
|
||||
|
||||
if ( m_IsVisible && !Draw) // move or up : erase at the old position
|
||||
CRect aRect;
|
||||
GetWindowRect (aRect);
|
||||
myRect->SetLineType (theLineType);
|
||||
myRect->SetRectangle (theMinX, aRect.Height() - theMinY, theMaxX, aRect.Height() - theMaxY);
|
||||
if (!aCtx->IsDisplayed (myRect))
|
||||
{
|
||||
clientDC.MoveTo(StoredMinX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMinY);
|
||||
m_IsVisible = false;
|
||||
aCtx->Display (myRect, false);
|
||||
}
|
||||
|
||||
StoredMinX = Min ( MinX, MaxX );
|
||||
StoredMinY = Min ( MinY, MaxY );
|
||||
StoredMaxX = Max ( MinX, MaxX );
|
||||
StoredMaxY = Max ( MinY, MaxY);
|
||||
|
||||
if (Draw) // move : draw
|
||||
else
|
||||
{
|
||||
clientDC.MoveTo(StoredMinX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMinY);
|
||||
m_IsVisible = true;
|
||||
aCtx->Redisplay (myRect, false);
|
||||
}
|
||||
|
||||
if (m_Pen)
|
||||
clientDC.SelectObject(aOldPen);
|
||||
aCtx->CurrentViewer()->RedrawImmediate();
|
||||
}
|
||||
|
||||
void COCCDemoView::InitButtons()
|
||||
|
@@ -18,6 +18,8 @@ enum View3D_CurrentAction {
|
||||
CurAction3d_DynamicRotation
|
||||
};
|
||||
|
||||
class AIS_RubberBand;
|
||||
|
||||
class COCCDemoView : public CView
|
||||
{
|
||||
protected: // create from serialization only
|
||||
@@ -119,14 +121,13 @@ private:
|
||||
Standard_Real myCurZoom;
|
||||
|
||||
private:
|
||||
enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
|
||||
CPen* m_Pen;
|
||||
Handle(AIS_RubberBand) myRect; //!< Rubber rectangle for selection
|
||||
virtual void DrawRectangle (const Standard_Integer MinX ,
|
||||
const Standard_Integer MinY ,
|
||||
const Standard_Integer MaxX ,
|
||||
const Standard_Integer MaxY ,
|
||||
const Standard_Boolean Draw ,
|
||||
const LineStyle aLineStyle = Default );
|
||||
Aspect_TypeOfLine theLineType = Aspect_TOL_SOLID);
|
||||
|
||||
};
|
||||
|
||||
|
@@ -6,7 +6,6 @@
|
||||
#include "DimensionDlg.h"
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_LengthDimension.hxx>
|
||||
#include <AIS_AngleDimension.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
|
@@ -13,7 +13,6 @@
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||
#include <TColStd_ListOfInteger.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <Quantity_Color.hxx>
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDimensionDlg, CDialog)
|
||||
|
@@ -7,7 +7,6 @@
|
||||
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_LengthDimension.hxx>
|
||||
#include <GC_MakePlane.hxx>
|
||||
#include <TopExp.hxx>
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#include "LengthParamsEdgesPage.h"
|
||||
#include "DimensionDlg.h"
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_LengthDimension.hxx>
|
||||
#include <AIS_AngleDimension.hxx>
|
||||
#include <GC_MakePlane.hxx>
|
||||
|
@@ -6,7 +6,6 @@
|
||||
#include "DimensionDlg.h"
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_LengthDimension.hxx>
|
||||
#include <GC_MakePlane.hxx>
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "OCC_BaseChildFrame.h"
|
||||
|
||||
class AFX_EXT_CLASS OCC_2dChildFrame : public OCC_BaseChildFrame
|
||||
class Standard_EXPORT OCC_2dChildFrame : public OCC_BaseChildFrame
|
||||
{
|
||||
DECLARE_DYNCREATE(OCC_2dChildFrame)
|
||||
public:
|
||||
|
@@ -15,7 +15,7 @@
|
||||
|
||||
// Mouse and clipboard event tracker for OCC_2dView
|
||||
// NO 3D operation are supported (like rotation)
|
||||
class AFX_EXT_CLASS OCC_2dDoc : public OCC_BaseDoc
|
||||
class Standard_EXPORT OCC_2dDoc : public OCC_BaseDoc
|
||||
{
|
||||
DECLARE_DYNCREATE(OCC_2dDoc)
|
||||
|
||||
|
@@ -23,7 +23,7 @@ enum CurrentAction2d
|
||||
CurAction2d_GlobalPanning,
|
||||
};
|
||||
|
||||
class AFX_EXT_CLASS OCC_2dView : public OCC_BaseView
|
||||
class Standard_EXPORT OCC_2dView : public OCC_BaseView
|
||||
{
|
||||
DECLARE_DYNCREATE(OCC_2dView)
|
||||
|
||||
|
@@ -11,7 +11,6 @@
|
||||
#include <res\OCC_Resource.h>
|
||||
#include "ImportExport/ImportExport.h"
|
||||
#include "AISDialogs.h"
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_ListOfInteractive.hxx>
|
||||
#include <AIS_ListIteratorOfListOfInteractive.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||
@@ -293,8 +292,7 @@ void OCC_3dBaseDoc::OnUpdateObjectColor(CCmdUI* pCmdUI)
|
||||
|
||||
void OCC_3dBaseDoc::OnObjectErase()
|
||||
{
|
||||
myAISContext->EraseSelected (Standard_False);
|
||||
myAISContext->ClearSelected (Standard_True);
|
||||
myAISContext->EraseSelected (Standard_True);
|
||||
}
|
||||
void OCC_3dBaseDoc::OnUpdateObjectErase(CCmdUI* pCmdUI)
|
||||
{
|
||||
@@ -407,17 +405,17 @@ void OCC_3dBaseDoc::OnObjectDisplayall()
|
||||
|
||||
void OCC_3dBaseDoc::OnUpdateObjectDisplayall(CCmdUI* pCmdUI)
|
||||
{
|
||||
|
||||
AIS_ListOfInteractive aList;
|
||||
myAISContext->ObjectsInside(aList,AIS_KOI_Shape);
|
||||
AIS_ListIteratorOfListOfInteractive aLI;
|
||||
Standard_Boolean IS_ANY_OBJECT_ERASED=FALSE;
|
||||
for (aLI.Initialize(aList);aLI.More();aLI.Next()){
|
||||
if(!myAISContext->IsDisplayed(aLI.Value()))
|
||||
IS_ANY_OBJECT_ERASED=TRUE;
|
||||
}
|
||||
pCmdUI->Enable (IS_ANY_OBJECT_ERASED);
|
||||
|
||||
AIS_ListOfInteractive aList;
|
||||
myAISContext->ObjectsInside (aList);
|
||||
for (AIS_ListIteratorOfListOfInteractive aLI (aList);aLI.More();aLI.Next())
|
||||
{
|
||||
if (!myAISContext->IsDisplayed (aLI.Value()))
|
||||
{
|
||||
pCmdUI->Enable (true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
pCmdUI->Enable (false);
|
||||
}
|
||||
|
||||
void OCC_3dBaseDoc::OnObjectRemove()
|
||||
|