Compare commits
5 Commits
CR0_PCVis_
...
CR0_extern
Author | SHA1 | Date | |
---|---|---|---|
|
2411731d34 | ||
|
40cf53299e | ||
|
c92a1d9864 | ||
|
054fcde1d8 | ||
|
305d92d7bf |
311
CMakeLists.txt
@@ -6,8 +6,8 @@ set (CMAKE_CONFIGURATION_TYPES Release Debug RelWithDebInfo CACHE INTERNAL "" FO
|
||||
|
||||
# macro: include patched file if it exists
|
||||
macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_INCLUDED_FILE}.cmake")
|
||||
include (${BUILD_PATCH}/${BEING_INCLUDED_FILE}.cmake)
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_INCLUDED_FILE}.cmake")
|
||||
include (${APPLY_OCCT_PATCH_DIR}/${BEING_INCLUDED_FILE}.cmake)
|
||||
else()
|
||||
include (${CMAKE_SOURCE_DIR}/${BEING_INCLUDED_FILE}.cmake)
|
||||
endif()
|
||||
@@ -31,27 +31,10 @@ endif()
|
||||
# the name of the project
|
||||
project (OCCT)
|
||||
|
||||
# include occt macros
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
# Solution folder property
|
||||
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# get current OCCT version
|
||||
OCC_VERSION (OCC_VERSION_MAJOR OCC_VERSION_MINOR OCC_VERSION_MAINTENANCE OCC_VERSION_DEVELOPMENT OCC_VERSION_STRING_EXT)
|
||||
|
||||
set_property (GLOBAL PROPERTY OCC_VERSION_MAJOR ${OCC_VERSION_MAJOR})
|
||||
set_property (GLOBAL PROPERTY OCC_VERSION_MINOR ${OCC_VERSION_MINOR})
|
||||
set_property (GLOBAL PROPERTY OCC_VERSION_MAINTENANCE ${OCC_VERSION_MAINTENANCE})
|
||||
|
||||
set (INSTALL_TEST_CASES OFF CACHE BOOL "${INSTALL_TEST_CASES_DESCR}")
|
||||
|
||||
# single-configuration generator
|
||||
set (SINGLE_GENERATOR OFF)
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
set (SINGLE_GENERATOR ON)
|
||||
endif()
|
||||
|
||||
set (INSTALL_OCCT_TEST_CASES OFF CACHE BOOL "${INSTALL_OCCT_TEST_CASES_DESCR}")
|
||||
# a single-configuration generator like the Makefile generator defines CMAKE_BUILD_TYPE variable
|
||||
# check this variable and set if it's required
|
||||
if (DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) # single-configuration generator.
|
||||
@@ -59,127 +42,19 @@ if (DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) # single-configuration ge
|
||||
endif()
|
||||
|
||||
# enable extended messages of many OCCT algorithms
|
||||
set (BUILD_WITH_DEBUG OFF CACHE BOOL "${BUILD_WITH_DEBUG_DESCR}")
|
||||
if (BUILD_WITH_DEBUG)
|
||||
set (OCCT_ALGO_EXTENDED_OUTPUT OFF CACHE BOOL "${OCCT_ALGO_EXTENDED_OUTPUT_DESCR}")
|
||||
if (OCCT_ALGO_EXTENDED_OUTPUT)
|
||||
add_definitions (-DOCCT_DEBUG)
|
||||
endif()
|
||||
|
||||
# copy samples to install directory
|
||||
set (INSTALL_SAMPLES OFF CACHE BOOL "${INSTALL_SAMPLES_DESCR}")
|
||||
set (INSTALL_OCCT_SAMPLES OFF CACHE BOOL "${INSTALL_OCCT_SAMPLES_DESCR}")
|
||||
|
||||
# install dir of the project
|
||||
if (NOT DEFINED INSTALL_DIR)
|
||||
set (INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "${INSTALL_DIR_DESCR}")
|
||||
endif()
|
||||
# install dir of the built project
|
||||
set (INSTALL_DIR "" CACHE PATH "${INSTALL_DIR_DESCR}" )
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
|
||||
|
||||
if (NOT DEFINED CMAKE_INSTALL_PREFIX_PREV)
|
||||
set (CMAKE_INSTALL_PREFIX_PREV "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "" FORCE)
|
||||
elseif (NOT "${CMAKE_INSTALL_PREFIX_PREV}" STREQUAL "${CMAKE_INSTALL_PREFIX}")
|
||||
# CMAKE_INSTALL_PREFIX has been changed at previous step
|
||||
set (CMAKE_INSTALL_PREFIX_PREV "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
# INSTALL_DIR is required to be updated
|
||||
set (INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "${INSTALL_DIR_DESCR}" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED INSTALL_DIR_PREV)
|
||||
set (INSTALL_DIR_PREV "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
elseif (NOT "${INSTALL_DIR_PREV}" STREQUAL "${INSTALL_DIR}")
|
||||
# INSTALL_DIR has been changed at previous step
|
||||
set (INSTALL_DIR_PREV "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
# sync CMAKE_INSTALL_PREFIX with INSTALL_DIR
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
# set CMAKE_INSTALL_PREFIX_PREV to avoid the reset of structure of the install folder
|
||||
set (CMAKE_INSTALL_PREFIX_PREV "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
# The structure of install folder should be reset
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_BIN_DIR)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_SCRIPT_DIR)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_LIB_DIR)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_INCLUDE_DIR)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_OCCT_RESOURCE_DIR)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_SHARE_DIR)
|
||||
endif()
|
||||
|
||||
# hide CMAKE_INSTALL_PREFIX from a user
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
set (BIN_LETTER "")
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||
set (BIN_LETTER "d")
|
||||
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
|
||||
set (BIN_LETTER "i")
|
||||
endif()
|
||||
|
||||
# Get all used variables: OS_WITH_BIT, COMPILER
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
# do not define INSTALL_BIN_DIR for win.
|
||||
# Leave library structure for win: <prefix>/win64/vc10/bin(d)
|
||||
if (NOT DEFINED INSTALL_BIN_DIR)
|
||||
if (UNIX)
|
||||
set (INSTALL_BIN_DIR "${INSTALL_DIR}/bin" CACHE PATH "${INSTALL_BIN_DIR_DESCR}")
|
||||
else()
|
||||
if (SINGLE_GENERATOR)
|
||||
set (INSTALL_BIN_DIR "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BIN_LETTER}" CACHE PATH "${INSTALL_BIN_DIR_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# define folder contaning all shell/batch scripts
|
||||
if (NOT DEFINED INSTALL_SCRIPT_DIR)
|
||||
if (UNIX)
|
||||
set (INSTALL_SCRIPT_DIR "${INSTALL_BIN_DIR}/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_SCRIPT_DIR_DESCR}")
|
||||
else()
|
||||
set (INSTALL_SCRIPT_DIR "${INSTALL_DIR}" CACHE PATH "${INSTALL_SCRIPT_DIR_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# place the libraries to <prefix>/lib folder for unix and leave old structure for windows
|
||||
if (NOT DEFINED INSTALL_LIB_DIR)
|
||||
if (UNIX)
|
||||
set (INSTALL_LIB_DIR "${INSTALL_DIR}/lib" CACHE PATH "${INSTALL_LIB_DIR_DESCR}")
|
||||
else()
|
||||
if (SINGLE_GENERATOR)
|
||||
set (INSTALL_LIB_DIR "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BIN_LETTER}" CACHE PATH "${INSTALL_LIB_DIR_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OCCT headers: <prefix>/inc for windows,
|
||||
# <prefix>/include/opencascade-7.0.0 for unix
|
||||
if (NOT DEFINED INSTALL_INCLUDE_DIR)
|
||||
if (UNIX)
|
||||
set (INSTALL_INCLUDE_DIR "${INSTALL_DIR}/include/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_INCLUDE_DIR_DESCR}")
|
||||
else()
|
||||
set (INSTALL_INCLUDE_DIR "${INSTALL_DIR}/inc" CACHE PATH "${INSTALL_INCLUDE_DIR_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OCCT resources: <prefix>/src for windows,
|
||||
# <prefix>/share/opencascade-7.0.0/resources for unix
|
||||
if (NOT DEFINED INSTALL_OCCT_RESOURCE_DIR)
|
||||
if (UNIX)
|
||||
set (INSTALL_OCCT_RESOURCE_DIR "${INSTALL_DIR}/share/opencascade-${OCC_VERSION_STRING_EXT}/resources" CACHE PATH "${INSTALL_OCCT_RESOURCE_DIR_DESCR}")
|
||||
else()
|
||||
set (INSTALL_OCCT_RESOURCE_DIR "${INSTALL_DIR}/src" CACHE PATH "${INSTALL_OCCT_RESOURCE_DIR_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OCCT data
|
||||
if (NOT DEFINED INSTALL_SHARE_DIR)
|
||||
if (UNIX)
|
||||
set (INSTALL_SHARE_DIR "${INSTALL_DIR}/share/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_SHARE_DIR_DESCR}")
|
||||
else()
|
||||
set (INSTALL_SHARE_DIR "${INSTALL_DIR}" CACHE PATH "${INSTALL_SHARE_DIR_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# a directory recognized as a 'patch' for OCCT
|
||||
set (BUILD_PATCH "" CACHE PATH "${BUILD_PATCH_DESCR}")
|
||||
set (APPLY_OCCT_PATCH_DIR "" CACHE PATH "${APPLY_OCCT_PATCH_DIR_DESCR}")
|
||||
|
||||
# the list of being built toolkits
|
||||
set (BUILD_ADDITIONAL_TOOLKITS "" CACHE STRING "${BUILD_ADDITIONAL_TOOLKITS_DESCR}")
|
||||
@@ -193,11 +68,15 @@ endif()
|
||||
if (APPLE)
|
||||
set (USE_GLX OFF CACHE BOOL "${USE_GLX_DESCR}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set (USE_D3D OFF CACHE BOOL "${USE_D3D_DESCR}")
|
||||
endif()
|
||||
|
||||
set (USE_VTK OFF CACHE BOOL "${USE_VTK_DESCR}")
|
||||
|
||||
# include occt macros
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
# 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
|
||||
@@ -215,6 +94,11 @@ endif()
|
||||
# Overview
|
||||
set (BUILD_DOC_OcctOverview OFF CACHE BOOL "${BUILD_DOC_OcctOverview_DESCR}")
|
||||
|
||||
if (NOT USE_VTK)
|
||||
list (REMOVE_ITEM Visualization_TOOLKITS TKIVtk)
|
||||
list (REMOVE_ITEM Draw_TOOLKITS TKIVtkDraw)
|
||||
endif()
|
||||
|
||||
if (NOT USE_D3D)
|
||||
list (REMOVE_ITEM Visualization_TOOLKITS TKD3DHost)
|
||||
endif()
|
||||
@@ -237,7 +121,7 @@ endif()
|
||||
# accumulate all used toolkits
|
||||
list (REMOVE_DUPLICATES BUILD_TOOLKITS)
|
||||
set (RAW_BUILD_TOOLKITS)
|
||||
foreach (BUILD_TOOLKIT ${BUILD_TOOLKITS})
|
||||
foreach(BUILD_TOOLKIT ${BUILD_TOOLKITS})
|
||||
OCCT_TOOLKIT_FULL_DEP (${BUILD_TOOLKIT} TOOLKIT_FULL_DEPS)
|
||||
list (APPEND RAW_BUILD_TOOLKITS ${BUILD_TOOLKIT} ${TOOLKIT_FULL_DEPS})
|
||||
endforeach()
|
||||
@@ -250,28 +134,14 @@ OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_defs_flags")
|
||||
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/3rdparty_macro")
|
||||
|
||||
# search for TKIVtk and TKIVtkDraw in BUILD_TOOLKITS
|
||||
list (FIND BUILD_TOOLKITS TKIVtk CAN_USE_VTK)
|
||||
if (CAN_USE_VTK EQUAL -1)
|
||||
list (FIND BUILD_TOOLKITS TKIVtkDraw CAN_USE_VTK)
|
||||
endif()
|
||||
|
||||
if (NOT CAN_USE_VTK EQUAL -1)
|
||||
if (NOT DEFINED USE_VTK)
|
||||
set (USE_VTK OFF CACHE BOOL "${USE_VTK_DESCR}")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET (USE_VTK)
|
||||
endif()
|
||||
|
||||
# Rebuild *.yacc and *.lex files that are contained by TKMath toolkit
|
||||
list (FIND BUILD_TOOLKITS TKMath CAN_REBUILD_PDC_FOR_TKMATH)
|
||||
list (FIND BUILD_TOOLKITS StepFile CAN_REBUILD_PDC_FOR_STEPFILE)
|
||||
|
||||
if (NOT ${CAN_REBUILD_PDC_FOR_TKMATH} EQUAL -1 OR NOT ${CAN_REBUILD_PDC_FOR_STEPFILE} EQUAL -1)
|
||||
set (BUILD_YACCLEX OFF CACHE BOOL "${BUILD_YACCLEX_DESCR}")
|
||||
set (REBUILD_PLATFORM_DEPENDENT_CODE OFF CACHE BOOL "${REBUILD_PLATFORM_DEPENDENT_CODE_DESCR}")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET (BUILD_YACCLEX)
|
||||
OCCT_CHECK_AND_UNSET (REBUILD_PLATFORM_DEPENDENT_CODE)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DIR)
|
||||
@@ -315,13 +185,7 @@ if (USE_VTK)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vtk")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_VTK")
|
||||
|
||||
if (NOT CAN_USE_VTK EQUAL -1)
|
||||
message (STATUS "Info: TKIVtk and TKIVtkDraw toolkits excluded due to VTK usage is disabled")
|
||||
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKIVtk)
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKIVtkDraw)
|
||||
endif()
|
||||
#OCCT_CHECK_AND_UNSET ("INSTALL_VTK")
|
||||
endif()
|
||||
|
||||
# D3D
|
||||
@@ -416,12 +280,9 @@ if (BUILD_DOC_OcctOverview)
|
||||
endif()
|
||||
|
||||
if (INSTALL_DOC_OcctOverview)
|
||||
install (DIRECTORY "${CMAKE_BINARY_DIR}/doc/overview" DESTINATION "${INSTALL_SHARE_DIR}/doc")
|
||||
install (DIRECTORY "${CMAKE_BINARY_DIR}/doc/overview" DESTINATION "${INSTALL_DIR}/doc")
|
||||
|
||||
# create overview.html only for windows
|
||||
if (WIN32)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("dox/resources/overview.html" "${INSTALL_SCRIPT_DIR}")
|
||||
endif()
|
||||
OCCT_INSTALL_FILE_OR_DIR ("dox/resources/overview.html" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/doxygen")
|
||||
@@ -429,18 +290,18 @@ else()
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_DOC_OcctOverview")
|
||||
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOXYGEN_EXECUTABLE")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOXYGEN_DOT_EXECUTABLE")
|
||||
endif()
|
||||
|
||||
# bison
|
||||
if (BUILD_YACCLEX)
|
||||
if (REBUILD_PLATFORM_DEPENDENT_CODE)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_BISON_EXECUTABLE")
|
||||
endif()
|
||||
|
||||
# flex
|
||||
if (BUILD_YACCLEX)
|
||||
if (REBUILD_PLATFORM_DEPENDENT_CODE)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/flex")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_FLEX_EXECUTABLE")
|
||||
@@ -456,7 +317,7 @@ endif()
|
||||
if (3RDPARTY_INCLUDE_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_INCLUDE_DIRS)
|
||||
string (REGEX REPLACE ";" "\n\t" 3RDPARTY_INCLUDE_DIRS_WITH_ENDS "${3RDPARTY_INCLUDE_DIRS}")
|
||||
message (STATUS "Info: The directories of 3rdparty headers: ${3RDPARTY_INCLUDE_DIRS_WITH_ENDS}")
|
||||
message (STATUS "The directories containing 3rdparty headers: ${3RDPARTY_INCLUDE_DIRS_WITH_ENDS}")
|
||||
include_directories (${3RDPARTY_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
@@ -466,10 +327,14 @@ include_directories (${CMAKE_BINARY_DIR}/inc)
|
||||
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: ${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
|
||||
message (STATUS "The directories containing 3rdparty libraries: ${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
|
||||
link_directories (${3RDPARTY_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
# Get all used variables: OS_WITH_BIT, COMPILER
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
# build directories
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
@@ -489,6 +354,15 @@ if (WIN32)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
|
||||
if ("${INSTALL_DIR}" STREQUAL "")
|
||||
get_filename_component (CMAKE_BINARY_DIR_PARENT ${CMAKE_BINARY_DIR} DIRECTORY)
|
||||
|
||||
set (INSTALL_DIR "${CMAKE_BINARY_DIR_PARENT}/install" CACHE PATH "${INSTALL_DIR_DESCR}" FORCE)
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
|
||||
|
||||
message (STATUS "Info: INSTALL_DIR has been set as ${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT header files into ${CMAKE_BINARY_DIR}/inc ...")
|
||||
|
||||
@@ -498,24 +372,15 @@ COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOLKITS}"
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) End the collecting")
|
||||
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data" "${INSTALL_SHARE_DIR}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data" "${INSTALL_DIR}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR}/samples")
|
||||
|
||||
# OCCT samples
|
||||
if (INSTALL_SAMPLES)
|
||||
if (WIN32)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/CSharp" "${INSTALL_SHARE_DIR}/samples")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/mfc" "${INSTALL_SHARE_DIR}/samples")
|
||||
endif()
|
||||
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/java" "${INSTALL_SHARE_DIR}/samples")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/ocafsamples" "${INSTALL_SHARE_DIR}/samples")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt" "${INSTALL_SHARE_DIR}/samples")
|
||||
if (INSTALL_OCCT_SAMPLES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_SHARE_DIR}/samples")
|
||||
|
||||
if (INSTALL_TEST_CASES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("tests" "${INSTALL_SHARE_DIR}")
|
||||
if (INSTALL_OCCT_TEST_CASES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("tests" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
@@ -524,16 +389,14 @@ else()
|
||||
set (SCRIPT_EXT sh)
|
||||
endif()
|
||||
|
||||
# copy draw script to install script folder
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}")
|
||||
install (FILES "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_SCRIPT_DIR}"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
# DRAW.BAT or DRAW.SH
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}")
|
||||
install (FILES "${APPLY_OCCT_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
else()
|
||||
install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_SCRIPT_DIR}"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
endif()
|
||||
|
||||
# copy draw script to CMake binary folder
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/draw.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
|
||||
|
||||
set (SUB_CUSTOM_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.${SCRIPT_EXT}")
|
||||
@@ -541,29 +404,29 @@ set (SUB_CUSTOM_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.${SCRIPT_EXT}")
|
||||
if (WIN32)
|
||||
set (ADDITIONAL_CUSTOM_CONTENT "\nif exist \"%~dp0${SUB_CUSTOM_NAME}\" (\n call \"%~dp0${SUB_CUSTOM_NAME}\" %VCVER% %ARCH% %CASDEB% \n)")
|
||||
else()
|
||||
set (ADDITIONAL_CUSTOM_CONTENT "\nif [ -e \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" ]; then\n source \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" \"\$1\" \"\$2\" \nfi")
|
||||
set (ADDITIONAL_CUSTOM_CONTENT "\nif [ -e \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" ]; then\n source \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" \"\${COMPILER}\" \"\${WOKSTATION}\${ARCH}\" \"\${CASDEB}\" \nfi")
|
||||
endif()
|
||||
|
||||
# change custom.bat/sh
|
||||
if (EXISTS "${INSTALL_BIN_DIR}/custom.${SCRIPT_EXT}")
|
||||
file (READ "${INSTALL_BIN_DIR}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT)
|
||||
if (EXISTS "${INSTALL_DIR}/custom.${SCRIPT_EXT}")
|
||||
file (READ "${INSTALL_DIR}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT)
|
||||
|
||||
set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}")
|
||||
|
||||
file (WRITE "${INSTALL_BIN_DIR}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
|
||||
file (WRITE "${INSTALL_DIR}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
|
||||
else()
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_SCRIPT_DIR}")
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
# write current custom.bat/sh (for install directory)
|
||||
set (SUB_CUSTOM_BUILD_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.install.${SCRIPT_EXT}")
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.install.${SCRIPT_EXT}.in" "${SUB_CUSTOM_BUILD_NAME}" "${SUB_CUSTOM_NAME}" "${INSTALL_SCRIPT_DIR}")
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.install.${SCRIPT_EXT}.in" "${SUB_CUSTOM_BUILD_NAME}" "${SUB_CUSTOM_NAME}" "${INSTALL_DIR}")
|
||||
|
||||
# write current custom.bat/sh (for build directory)
|
||||
OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
|
||||
|
||||
if (BUILD_MODULE_OcctMfcSamples)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_SCRIPT_DIR}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR}")
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.bat" "${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
@@ -571,31 +434,29 @@ endif()
|
||||
OCCT_CONFIGURE ("adm/templates/env.build.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
|
||||
|
||||
# end script for draw in standalone environment
|
||||
if (UNIX)
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.sh.in" "env.install.sh")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.sh" DESTINATION "${INSTALL_SCRIPT_DIR}" RENAME "env.sh")
|
||||
else()
|
||||
# release version
|
||||
set (CURRENT_BUILD_LETTER "")
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.bat.in" "env.install.release.bat")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.release.bat"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_SCRIPT_DIR}" RENAME "env.bat")
|
||||
# release version
|
||||
set (BUILD_LETTER "")
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.${SCRIPT_EXT}.in" "env.install.release.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.release.${SCRIPT_EXT}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}"
|
||||
RENAME "env.${SCRIPT_EXT}")
|
||||
|
||||
# debug version
|
||||
set (CURRENT_BUILD_LETTER "d")
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.bat.in" "env.install.debug.bat")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.debug.bat"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_SCRIPT_DIR}" RENAME "env.bat")
|
||||
# debug version
|
||||
set (BUILD_LETTER "d")
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.${SCRIPT_EXT}.in" "env.install.debug.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.debug.${SCRIPT_EXT}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}"
|
||||
RENAME "env.${SCRIPT_EXT}")
|
||||
|
||||
# release with debug info version
|
||||
set (CURRENT_BUILD_LETTER "i")
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.bat.in" "env.install.relwithdebinfo.bat")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.relwithdebinfo.bat"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_SCRIPT_DIR}" RENAME "env.bat")
|
||||
endif()
|
||||
# release with debug info version
|
||||
set (BUILD_LETTER "i")
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.${SCRIPT_EXT}.in" "env.install.relwithdebinfo.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.relwithdebinfo.${SCRIPT_EXT}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}"
|
||||
RENAME "env.${SCRIPT_EXT}")
|
||||
|
||||
# copy DrawAppliInit from OCCT source to build directory
|
||||
if (NOT EXISTS "${CMAKE_BINARY_DIR}/DrawAppliInit")
|
||||
@@ -608,9 +469,9 @@ foreach(RESOURCE ${RESOURCES})
|
||||
get_filename_component(RESOURCE_FOLDER ${RESOURCE} DIRECTORY)
|
||||
if(NOT "${RESOURCE_FOLDER}" STREQUAL "")
|
||||
get_filename_component(RESOURCE_FOLDER ${RESOURCE_FOLDER} NAME)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_OCCT_RESOURCE_DIR}/${RESOURCE_FOLDER}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR}/src/${RESOURCE_FOLDER}")
|
||||
else()
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_OCCT_RESOURCE_DIR}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR}/src")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
0
LICENSE_LGPL_21.txt
Normal file → Executable file
@@ -2,6 +2,6 @@ FoundationClasses TKernel TKMath
|
||||
ModelingData TKG2d TKG3d TKGeomBase TKBRep
|
||||
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
|
||||
Visualization TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost
|
||||
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd FWOSPlugin TKTObj TKBinTObj TKXmlTObj TKVCAF
|
||||
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml FWOSPlugin TKTObj TKBinTObj TKXmlTObj
|
||||
DataExchange TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF
|
||||
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
|
||||
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
|
14
adm/UDLIST
@@ -237,20 +237,13 @@ n BinMDataXtd
|
||||
n BinMDocStd
|
||||
n BinMFunction
|
||||
n BinMNaming
|
||||
n BinMPrsStd
|
||||
n BinObjMgt
|
||||
n BinTools
|
||||
n CDF
|
||||
n CDM
|
||||
n FWOSDriver
|
||||
n PCDM
|
||||
n StdLDrivers
|
||||
n StdLObject
|
||||
n StdLPersistent
|
||||
n StdObjMgt
|
||||
n StdDrivers
|
||||
n StdObject
|
||||
n StdPersistent
|
||||
n ShapePersistent
|
||||
n TDF
|
||||
n TDataStd
|
||||
n TDataXtd
|
||||
@@ -267,6 +260,7 @@ n XmlMDataXtd
|
||||
n XmlMDocStd
|
||||
n XmlMFunction
|
||||
n XmlMNaming
|
||||
n XmlMPrsStd
|
||||
n XmlObjMgt
|
||||
r StdResource
|
||||
r XmlOcafResource
|
||||
@@ -279,8 +273,6 @@ t TKCAF
|
||||
t TKCDF
|
||||
t TKLCAF
|
||||
|
||||
t TKStdL
|
||||
t TKStd
|
||||
t TKTObj
|
||||
t TKXml
|
||||
t TKXmlL
|
||||
@@ -439,5 +431,3 @@ n IVtkTools
|
||||
t TKIVtk
|
||||
n IVtkDraw
|
||||
t TKIVtkDraw
|
||||
n Geom2dEvaluator
|
||||
t TKVCAF
|
||||
|
@@ -191,62 +191,47 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
if (WIN32)
|
||||
if (DEFINED INSTALL_BIN_DIR)
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}" DESTINATION "${INSTALL_BIN_DIR}")
|
||||
else()
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
|
||||
else()
|
||||
get_filename_component(ABS_PATH ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} REALPATH)
|
||||
|
||||
if ("${PRODUCT_NAME}" STREQUAL "FREEIMAGE")
|
||||
get_filename_component(FREEIMLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_LIB_DIR}" RENAME ${FREEIMLIB}.3)
|
||||
else()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
endif()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
endif()
|
||||
|
||||
if("${PRODUCT_NAME}" STREQUAL "GL2PS")
|
||||
get_filename_component(GL2PSLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_LIB_DIR}" RENAME ${GL2PSLIB}.1)
|
||||
else()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
endif()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
@@ -1,35 +1,32 @@
|
||||
# doxygen
|
||||
|
||||
set (3RDPARTY_DOT_EXECUTABLE_DESCR "The path to the 'dot' tool producing layered drawings of directed graphs.\nThis tool used by doxygen")
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE_DESCR "The path to the doxygen command")
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DOXYGEN_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}")
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE "" CACHE FILEPATH "The Path to the doxygen command")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_DOT_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}")
|
||||
if (NOT DEFINED 3RDPARTY_DOXYGEN_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_DOT_EXECUTABLE "" CACHE FILEPATH "The path to the dot program used by doxygen")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_SKIP_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_SKIP_DOT_EXECUTABLE OFF CACHE BOOL "Skip trying to find Dot")
|
||||
if (NOT DEFINED 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE OFF CACHE BOOL "Skip trying to find Dot")
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_SKIP_DOT_EXECUTABLE)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_DOT_EXECUTABLE)
|
||||
if (3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_DOXYGEN_DOT_EXECUTABLE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE))
|
||||
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOXYGEN_DOT_EXECUTABLE))
|
||||
|
||||
set (DOXYGEN_SKIP_DOT ${3RDPARTY_SKIP_DOT_EXECUTABLE})
|
||||
set (DOXYGEN_SKIP_DOT ${3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE})
|
||||
find_package (Doxygen)
|
||||
|
||||
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE AND DOXYGEN_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}" FORCE)
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE FILEPATH "The Path to the doxygen command" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE AND DOXYGEN_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_DOT_EXECUTABLE "${DOXYGEN_DOT_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}" FORCE)
|
||||
if (NOT 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOXYGEN_DOT_EXECUTABLE AND DOXYGEN_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_DOT_EXECUTABLE "${DOXYGEN_DOT_EXECUTABLE}" CACHE FILEPATH "The path to the dot program used by doxygen" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -37,9 +34,9 @@ if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOXYGEN_EXECUTABLE
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOXYGEN_EXECUTABLE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE)
|
||||
if (NOT 3RDPARTY_DOT_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOT_EXECUTABLE}")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOT_EXECUTABLE)
|
||||
if (NOT 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE)
|
||||
if (NOT 3RDPARTY_DOXYGEN_DOT_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOXYGEN_DOT_EXECUTABLE}")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOXYGEN_DOT_EXECUTABLE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -289,44 +289,34 @@ endif()
|
||||
|
||||
# install instructions
|
||||
if (INSTALL_FREETYPE)
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
if (WIN32)
|
||||
if (DEFINED INSTALL_BIN_DIR)
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}" DESTINATION "${INSTALL_BIN_DIR}")
|
||||
else()
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_ABS ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
|
||||
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_NAME ${3RDPARTY_FREETYPE_LIBRARY} NAME)
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
DESTINATION "${INSTALL_LIB_DIR}"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
else()
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
endif()
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
endif()
|
||||
|
||||
set (USED_3RDPARTY_FREETYPE_DIR "")
|
||||
|
@@ -12,16 +12,20 @@ endif()
|
||||
|
||||
if (USE_TCL)
|
||||
if ("${3RDPARTY_TCL_LIBRARY_VERSION}" STREQUAL "")
|
||||
message (STATUS "Warning: TCL version has not been specified by CSF_TclLibs defining thus it will be used as 8.6")
|
||||
message (STATUS "Warning. TCL version has not been specified by CSF_TclLibs defining thus it will be used as 8.6")
|
||||
set (3RDPARTY_TCL_LIBRARY_VERSION "8.6")
|
||||
endif()
|
||||
|
||||
if ("${3RDPARTY_TK_LIBRARY_VERSION}" STREQUAL "")
|
||||
message (STATUS "Warning: TK version has not been specified by CSF_TclTkLibs defining thus it will be used as 8.6")
|
||||
message (STATUS "Warning. TK version has not been specified by CSF_TclTkLibs defining thus it will be used as 8.6")
|
||||
set (3RDPARTY_TK_LIBRARY_VERSION "8.6")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (USE_VTK AND NOT 3RDPARTY_VTK_REQUIRED_LIBRARIES)
|
||||
message (WARNING "CSF_VTK specification: VTK libraries are not defined")
|
||||
endif()
|
||||
|
||||
if (USE_TBB)
|
||||
set (CSF_TBB "tbb tbbmalloc")
|
||||
else()
|
||||
@@ -33,28 +37,20 @@ if (WIN32)
|
||||
set (CSF_gdi32 "gdi32.lib")
|
||||
set (CSF_user32 "user32.lib")
|
||||
set (CSF_wsock32 "wsock32.lib")
|
||||
set (CSF_winspool "Winspool.lib")
|
||||
set (CSF_psapi "Psapi.lib")
|
||||
set (CSF_AviLibs "ws2_32.lib vfw32.lib")
|
||||
set (CSF_OpenGlLibs "opengl32.lib glu32.lib")
|
||||
|
||||
if (USE_FREETYPE)
|
||||
set (CSF_FREETYPE "freetype.lib")
|
||||
else()
|
||||
set (CSF_FREETYPE)
|
||||
endif()
|
||||
|
||||
if (USE_FREEIMAGE)
|
||||
set (CSF_FreeImagePlus "freeimage.lib freeimageplus.lib")
|
||||
else()
|
||||
set (CSF_FreeImagePlus)
|
||||
endif()
|
||||
|
||||
if (USE_TCL)
|
||||
set (CSF_TclLibs "tcl${3RDPARTY_TCL_LIBRARY_VERSION}.lib")
|
||||
set (CSF_TclTkLibs "tk${3RDPARTY_TK_LIBRARY_VERSION}.lib")
|
||||
endif()
|
||||
|
||||
if (USE_VTK)
|
||||
set (CSF_VTK "${3RDPARTY_VTK_REQUIRED_LIBRARIES}")
|
||||
else()
|
||||
set (CSF_VTK)
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
if (APPLE)
|
||||
@@ -88,10 +84,9 @@ else()
|
||||
set (CSF_ThreadLibs "c")
|
||||
set (CSF_OpenGlLibs "EGL GLESv2")
|
||||
elseif (UNIX)
|
||||
set (CSF_ThreadLibs "pthread rt stdc++")
|
||||
set (CSF_ThreadLibs "pthread rt")
|
||||
set (CSF_OpenGlLibs "GLU GL")
|
||||
set (CSF_XwLibs "X11 Xext Xmu Xi")
|
||||
set (CSF_dl "dl")
|
||||
|
||||
if (USE_TCL)
|
||||
set (CSF_TclLibs "tcl${3RDPARTY_TCL_LIBRARY_VERSION}")
|
||||
@@ -118,4 +113,10 @@ else()
|
||||
set (CSF_GL2PS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (USE_VTK)
|
||||
set (CSF_VTK "${3RDPARTY_VTK_REQUIRED_LIBRARIES}")
|
||||
else()
|
||||
set (CSF_VTK)
|
||||
endif()
|
||||
endif()
|
@@ -5,80 +5,73 @@ if(FLAGS_ALREADY_INCLUDED)
|
||||
endif()
|
||||
set(FLAGS_ALREADY_INCLUDED 1)
|
||||
|
||||
# force option -fp:precise for Visual Studio projects.
|
||||
#
|
||||
# Note that while this option is default for MSVC compiler, Visual Studio
|
||||
# project can be switched later to use Intel Compiler (ICC).
|
||||
# Enforcing -fp:precise ensures that in such case ICC will use correct
|
||||
# option instead of its default -fp:fast which is harmful for OCCT.
|
||||
|
||||
if (MSVC)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp:precise")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp:precise")
|
||||
add_definitions(/fp:precise)
|
||||
endif()
|
||||
|
||||
# set compiler short name and choose SSE2 option for appropriate MSVC compilers
|
||||
# ONLY for 32-bit
|
||||
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
if (MSVC80 OR MSVC90 OR MSVC10)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE2")
|
||||
add_definitions(/arch:SSE2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
add_definitions (-wd4996)
|
||||
elseif (APPLE)
|
||||
add_definitions (-fexceptions -fPIC -DOCC_CONVERT_SIGNALS)
|
||||
else()
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -fPIC")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions -fPIC")
|
||||
add_definitions(-DOCC_CONVERT_SIGNALS)
|
||||
add_definitions (-fexceptions -fPIC -DOCC_CONVERT_SIGNALS)
|
||||
endif()
|
||||
|
||||
# enable structured exceptions for MSVC
|
||||
string (REGEX MATCH "EHsc" ISFLAG "${CMAKE_CXX_FLAGS}")
|
||||
if (ISFLAG)
|
||||
string (REGEX REPLACE "EHsc" "EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
elseif (MSVC)
|
||||
elseif (WIN32)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -EHa")
|
||||
endif()
|
||||
|
||||
# remove _WINDOWS flag if it exists
|
||||
string (REGEX MATCH "/D_WINDOWS" IS_WINDOWSFLAG "${CMAKE_CXX_FLAGS}")
|
||||
if (IS_WINDOWSFLAG)
|
||||
message (STATUS "Info: /D_WINDOWS has been removed from CMAKE_CXX_FLAGS")
|
||||
message (STATUS "/D_WINDOWS has been removed from CMAKE_CXX_FLAGS")
|
||||
string (REGEX REPLACE "/D_WINDOWS" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
# remove WIN32 flag if it exists
|
||||
string (REGEX MATCH "/DWIN32" IS_WIN32FLAG "${CMAKE_CXX_FLAGS}")
|
||||
if (IS_WIN32FLAG)
|
||||
message (STATUS "Info: /DWIN32 has been removed from CMAKE_CXX_FLAGS")
|
||||
message (STATUS "/DWIN32 has been removed from CMAKE_CXX_FLAGS")
|
||||
string (REGEX REPLACE "/DWIN32" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
# remove _WINDOWS flag if it exists
|
||||
string (REGEX MATCH "/D_WINDOWS" IS_WINDOWSFLAG "${CMAKE_C_FLAGS}")
|
||||
if (IS_WINDOWSFLAG)
|
||||
message (STATUS "Info: /D_WINDOWS has been removed from CMAKE_C_FLAGS")
|
||||
message (STATUS "/D_WINDOWS has been removed from CMAKE_C_FLAGS")
|
||||
string (REGEX REPLACE "/D_WINDOWS" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
endif()
|
||||
|
||||
# remove WIN32 flag if it exists
|
||||
string (REGEX MATCH "/DWIN32" IS_WIN32FLAG "${CMAKE_C_FLAGS}")
|
||||
if (IS_WIN32FLAG)
|
||||
message (STATUS "Info: /DWIN32 has been removed from CMAKE_C_FLAGS")
|
||||
message (STATUS "/DWIN32 has been removed from CMAKE_C_FLAGS")
|
||||
string (REGEX REPLACE "/DWIN32" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
endif()
|
||||
|
||||
# remove DEBUG flag if it exists
|
||||
string (REGEX MATCH "-DDEBUG" IS_DEBUG_CXX "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
if (IS_DEBUG_CXX)
|
||||
message (STATUS "Info: -DDEBUG has been removed from CMAKE_CXX_FLAGS_DEBUG")
|
||||
message (STATUS "-DDEBUG has been removed from CMAKE_CXX_FLAGS_DEBUG")
|
||||
string (REGEX REPLACE "-DDEBUG" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
endif()
|
||||
|
||||
string (REGEX MATCH "-DDEBUG" IS_DEBUG_C "${CMAKE_C_FLAGS_DEBUG}")
|
||||
if (IS_DEBUG_C)
|
||||
message (STATUS "Info: -DDEBUG has been removed from CMAKE_C_FLAGS_DEBUG")
|
||||
message (STATUS "-DDEBUG has been removed from CMAKE_C_FLAGS_DEBUG")
|
||||
string (REGEX REPLACE "-DDEBUG" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
|
||||
endif()
|
||||
# enable parallel compilation on MSVC 9 and above
|
||||
@@ -98,25 +91,9 @@ if (MSVC)
|
||||
endif()
|
||||
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
|
||||
if (BUILD_SHARED_LIBS)
|
||||
if (APPLE)
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
elseif(NOT WIN32)
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
endif()
|
||||
else()
|
||||
if (NOT ANDROID AND NOT MINGW)
|
||||
set (CMAKE_STATIC_LINKER_FLAGS "-lm ${CMAKE_SHARED_STATIC_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set (CMAKE_CXX_FLAGS "-std=gnu++0x ${CMAKE_CXX_FLAGS}")
|
||||
add_definitions(-D_WIN32_WINNT=0x0501)
|
||||
# workaround bugs in mingw with vtable export
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")
|
||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
|
||||
if (DEFINED CMAKE_COMPILER_IS_GNUCXX OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
|
||||
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
@@ -127,4 +104,4 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR MINGW)
|
||||
endif()
|
||||
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
|
||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
|
||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
|
@@ -91,18 +91,18 @@ endfunction()
|
||||
|
||||
function (OCCT_ORIGIN_AND_PATCHED_FILES RELATIVE_PATH SEARCH_TEMPLATE RESULT)
|
||||
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}")
|
||||
file (GLOB FOUND_FILES "${BUILD_PATCH}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}")
|
||||
file (GLOB FOUND_FILES "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
|
||||
endif()
|
||||
|
||||
file (GLOB ORIGIN_FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
|
||||
foreach (ORIGIN_FILE ${ORIGIN_FILES})
|
||||
# check for existence of patched version of current file
|
||||
if (NOT BUILD_PATCH OR NOT EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}")
|
||||
if (NOT APPLY_OCCT_PATCH_DIR OR NOT EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}")
|
||||
list (APPEND FOUND_FILES ${ORIGIN_FILE})
|
||||
else()
|
||||
get_filename_component (ORIGIN_FILE_NAME "${ORIGIN_FILE}" NAME)
|
||||
if (NOT EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}/${ORIGIN_FILE_NAME}")
|
||||
if (NOT EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}/${ORIGIN_FILE_NAME}")
|
||||
list (APPEND FOUND_FILES ${ORIGIN_FILE})
|
||||
endif()
|
||||
endif()
|
||||
@@ -120,7 +120,6 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
|
||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*${COMPILER}.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+")
|
||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*")
|
||||
|
||||
@@ -148,15 +147,15 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
|
||||
endfunction()
|
||||
|
||||
macro (OCCT_INSTALL_FILE_OR_DIR BEING_INSTALLED_OBJECT DESTINATION_PATH)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}")
|
||||
if (IS_DIRECTORY "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}")
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
if (IS_DIRECTORY "${APPLY_OCCT_PATCH_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
# first of all, install original files
|
||||
install (DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
|
||||
# secondly, rewrite original files with patched ones
|
||||
install (DIRECTORY "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
install (DIRECTORY "${APPLY_OCCT_PATCH_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
else()
|
||||
install (FILES "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
install (FILES "${APPLY_OCCT_PATCH_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
endif()
|
||||
else()
|
||||
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
@@ -168,8 +167,8 @@ macro (OCCT_INSTALL_FILE_OR_DIR BEING_INSTALLED_OBJECT DESTINATION_PATH)
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_CONFIGURE_AND_INSTALL BEING_CONGIRUGED_FILE BUILD_NAME INSTALL_NAME DESTINATION_PATH)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_CONGIRUGED_FILE}")
|
||||
configure_file("${BUILD_PATCH}/${BEING_CONGIRUGED_FILE}" "${BUILD_NAME}" @ONLY)
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_CONGIRUGED_FILE}")
|
||||
configure_file("${APPLY_OCCT_PATCH_DIR}/${BEING_CONGIRUGED_FILE}" "${BUILD_NAME}" @ONLY)
|
||||
else()
|
||||
configure_file("${CMAKE_SOURCE_DIR}/${BEING_CONGIRUGED_FILE}" "${BUILD_NAME}" @ONLY)
|
||||
endif()
|
||||
@@ -182,8 +181,8 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
|
||||
|
||||
# consider patched header.in template
|
||||
set (TEMPLATE_HEADER_PATH "${CMAKE_SOURCE_DIR}/adm/templates/header.in")
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/header.in")
|
||||
set (TEMPLATE_HEADER_PATH "${BUILD_PATCH}/adm/templates/header.in")
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/header.in")
|
||||
set (TEMPLATE_HEADER_PATH "${APPLY_OCCT_PATCH_DIR}/adm/templates/header.in")
|
||||
endif()
|
||||
|
||||
set (ROOT_OCCT_DIR ${CMAKE_SOURCE_DIR})
|
||||
@@ -191,8 +190,8 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
|
||||
foreach (OCCT_USED_TOOLKIT ${OCCT_BUILD_TOOLKITS})
|
||||
# append all required package folders
|
||||
set (OCCT_TOOLKIT_PACKAGES)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${OCCT_USED_TOOLKIT}/PACKAGES")
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_TOOLKIT_PACKAGES)
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES")
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_TOOLKIT_PACKAGES)
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_TOOLKIT_PACKAGES)
|
||||
endif()
|
||||
@@ -207,90 +206,78 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
|
||||
set (OCCT_HEADER_FILE_WITH_PROPER_NAMES)
|
||||
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) Compare FILES with files in package directories...")
|
||||
message (STATUS "Info. \(${CURRENT_TIME}\) Compare FILES with files in package directories...")
|
||||
|
||||
foreach (OCCT_PACKAGE ${OCCT_USED_PACKAGES})
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES")
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" OCCT_ALL_FILE_NAMES)
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES")
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" OCCT_ALL_FILE_NAMES)
|
||||
else()
|
||||
message (WARNING "FILES has not been found in ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
list (LENGTH OCCT_ALL_FILE_NAMES ALL_FILES_NB)
|
||||
math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" )
|
||||
list (LENGTH OCCT_ALL_FILE_NAMES ALL_FILES_NB)
|
||||
math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" )
|
||||
|
||||
# emit warnings if there is unprocessed headers
|
||||
file (GLOB OCCT_ALL_FILES_IN_DIR "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/*.*")
|
||||
file (GLOB OCCT_ALL_FILES_IN_PATCH_DIR "${BUILD_PATCH}/src/${OCCT_PACKAGE}/*.*")
|
||||
# emit warnings if there is unprocessed headers
|
||||
file (GLOB OCCT_ALL_FILES_IN_DIR "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/*.*")
|
||||
foreach (OCCT_FILE_IN_DIR ${OCCT_ALL_FILES_IN_DIR})
|
||||
get_filename_component (OCCT_FILE_IN_DIR_NAME ${OCCT_FILE_IN_DIR} NAME)
|
||||
|
||||
# use patched header files
|
||||
foreach (OCCT_FILE_IN_PATCH_DIR ${OCCT_ALL_FILES_IN_PATCH_DIR})
|
||||
get_filename_component (OCCT_FILE_IN_PATCH_DIR_NAME ${OCCT_FILE_IN_PATCH_DIR} NAME)
|
||||
list (REMOVE_ITEM OCCT_ALL_FILES_IN_DIR "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${OCCT_FILE_IN_PATCH_DIR_NAME}")
|
||||
list (APPEND OCCT_ALL_FILES_IN_DIR "${OCCT_FILE_IN_PATCH_DIR}")
|
||||
endforeach()
|
||||
|
||||
foreach (OCCT_FILE_IN_DIR ${OCCT_ALL_FILES_IN_DIR})
|
||||
get_filename_component (OCCT_FILE_IN_DIR_NAME ${OCCT_FILE_IN_DIR} NAME)
|
||||
|
||||
set (OCCT_FILE_IN_DIR_STATUS OFF)
|
||||
|
||||
if (${ALL_FILES_NB} LESS 0)
|
||||
break()
|
||||
endif()
|
||||
|
||||
foreach (FILE_INDEX RANGE ${ALL_FILES_NB})
|
||||
list (GET OCCT_ALL_FILE_NAMES ${FILE_INDEX} OCCT_FILE_NAME)
|
||||
|
||||
if ("${OCCT_FILE_IN_DIR_NAME}" STREQUAL "${OCCT_FILE_NAME}")
|
||||
set (OCCT_FILE_IN_DIR_STATUS ON)
|
||||
|
||||
string (REGEX MATCH ".+\\.[hlg]xx|.+\\.h$" IS_HEADER_FOUND "${OCCT_FILE_NAME}")
|
||||
if (IS_HEADER_FOUND)
|
||||
list (APPEND OCCT_HEADER_FILES_COMPLETE ${OCCT_FILE_IN_DIR})
|
||||
|
||||
# collect header files with name that does not contain its package one
|
||||
string (FIND "${OCCT_FILE_NAME}" "${OCCT_PACKAGE}_" FOUND_INDEX)
|
||||
if (NOT ${FOUND_INDEX} EQUAL 0)
|
||||
list (APPEND OCCT_HEADER_FILE_WITH_PROPER_NAMES "${OCCT_FILE_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# remove found element from list
|
||||
list (REMOVE_AT OCCT_ALL_FILE_NAMES ${FILE_INDEX})
|
||||
math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" ) # decrement number
|
||||
set (OCCT_FILE_IN_DIR_STATUS OFF)
|
||||
|
||||
if (${ALL_FILES_NB} LESS 0)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (NOT OCCT_FILE_IN_DIR_STATUS)
|
||||
message (STATUS "Warning. File ${OCCT_FILE_IN_DIR} is not listed in ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES")
|
||||
foreach (FILE_INDEX RANGE ${ALL_FILES_NB})
|
||||
list (GET OCCT_ALL_FILE_NAMES ${FILE_INDEX} OCCT_FILE_NAME)
|
||||
|
||||
string (REGEX MATCH ".+\\.[hlg]xx|.+\\.h$" IS_HEADER_FOUND "${OCCT_FILE_NAME}")
|
||||
if (IS_HEADER_FOUND)
|
||||
list (APPEND OCCT_HEADER_FILE_NAMES_NOT_IN_FILES ${OCCT_FILE_NAME})
|
||||
if ("${OCCT_FILE_IN_DIR_NAME}" STREQUAL "${OCCT_FILE_NAME}")
|
||||
set (OCCT_FILE_IN_DIR_STATUS ON)
|
||||
|
||||
string (REGEX MATCH ".+\\.[hlg]xx|.+\\.h$" IS_HEADER_FOUND "${OCCT_FILE_NAME}")
|
||||
if (IS_HEADER_FOUND)
|
||||
list (APPEND OCCT_HEADER_FILES_COMPLETE ${OCCT_FILE_IN_DIR})
|
||||
|
||||
# collect header files with name that does not contain its package one
|
||||
string (FIND "${OCCT_FILE_NAME}" "${OCCT_PACKAGE}_" FOUND_INDEX)
|
||||
if (NOT ${FOUND_INDEX} EQUAL 0)
|
||||
list (APPEND OCCT_HEADER_FILE_WITH_PROPER_NAMES "${OCCT_FILE_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# remove found element from list
|
||||
list (REMOVE_AT OCCT_ALL_FILE_NAMES ${FILE_INDEX})
|
||||
math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" ) # decrement number
|
||||
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (NOT OCCT_FILE_IN_DIR_STATUS)
|
||||
message (STATUS "Warning. ${OCCT_FILE_IN_DIR} is not involved into ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES")
|
||||
|
||||
string (REGEX MATCH ".+\\.[hlg]xx|.+\\.h$" IS_HEADER_FOUND "${OCCT_FILE_NAME}")
|
||||
if (IS_HEADER_FOUND)
|
||||
list (APPEND OCCT_HEADER_FILE_NAMES_NOT_IN_FILES ${OCCT_FILE_NAME})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
else()
|
||||
message (WARNING "FILES has not been found in ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# create new file including found header
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) Create header-links in inc folder...")
|
||||
message (STATUS "Info. \(${CURRENT_TIME}\) Create header-links in inc folder...")
|
||||
|
||||
foreach (OCCT_HEADER_FILE ${OCCT_HEADER_FILES_COMPLETE})
|
||||
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE} NAME)
|
||||
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
|
||||
endforeach()
|
||||
|
||||
install (FILES ${OCCT_HEADER_FILES_COMPLETE} DESTINATION "${INSTALL_INCLUDE_DIR}")
|
||||
install (FILES ${OCCT_HEADER_FILES_COMPLETE} DESTINATION "${INSTALL_DIR}/inc")
|
||||
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) Checking headers in inc folder...")
|
||||
message (STATUS "Info. \(${CURRENT_TIME}\) Checking headers in inc folder...")
|
||||
|
||||
file (GLOB OCCT_HEADER_FILES_OLD "${ROOT_TARGET_OCCT_DIR}/inc/*")
|
||||
foreach (OCCT_HEADER_FILE_OLD ${OCCT_HEADER_FILES_OLD})
|
||||
@@ -329,23 +316,23 @@ macro (OCCT_COPY_FILE_OR_DIR BEING_COPIED_OBJECT DESTINATION_PATH)
|
||||
file (COPY "${CMAKE_SOURCE_DIR}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
endif()
|
||||
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_COPIED_OBJECT}")
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_COPIED_OBJECT}")
|
||||
# secondly, rewrite original files with patched ones
|
||||
file (COPY "${BUILD_PATCH}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
file (COPY "${APPLY_OCCT_PATCH_DIR}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_CONFIGURE BEING_CONGIRUGED_FILE FINAL_NAME)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_CONGIRUGED_FILE}")
|
||||
configure_file("${BUILD_PATCH}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_CONGIRUGED_FILE}")
|
||||
configure_file("${APPLY_OCCT_PATCH_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
|
||||
else()
|
||||
configure_file("${CMAKE_SOURCE_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_ADD_SUBDIRECTORY BEING_ADDED_DIRECTORY)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
|
||||
add_subdirectory(${BUILD_PATCH}/${BEING_ADDED_DIRECTORY})
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
|
||||
add_subdirectory(${APPLY_OCCT_PATCH_DIR}/${BEING_ADDED_DIRECTORY})
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
|
||||
add_subdirectory (${CMAKE_SOURCE_DIR}/${BEING_ADDED_DIRECTORY})
|
||||
else()
|
||||
@@ -360,8 +347,8 @@ function (OCCT_IS_PRODUCT_REQUIRED CSF_VAR_NAME USE_PRODUCT)
|
||||
message(STATUS "Warning: the list of being used toolkits is empty")
|
||||
else()
|
||||
foreach (USED_TOOLKIT ${BUILD_TOOLKITS})
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${USED_TOOLKIT}/EXTERNLIB")
|
||||
file (READ "${BUILD_PATCH}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT)
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${USED_TOOLKIT}/EXTERNLIB")
|
||||
file (READ "${APPLY_OCCT_PATCH_DIR}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT)
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${USED_TOOLKIT}/EXTERNLIB")
|
||||
file (READ "${CMAKE_SOURCE_DIR}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT)
|
||||
endif()
|
||||
@@ -378,8 +365,8 @@ endfunction()
|
||||
|
||||
function (FILE_TO_LIST FILE_NAME FILE_CONTENT)
|
||||
set (LOCAL_FILE_CONTENT)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${FILE_NAME}")
|
||||
file (STRINGS "${BUILD_PATCH}/${FILE_NAME}" LOCAL_FILE_CONTENT)
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${FILE_NAME}")
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
|
||||
endif()
|
||||
@@ -470,42 +457,28 @@ function (OCCT_MODULES_AND_TOOLKITS MODULE_LIST)
|
||||
set (${MODULE_LIST} ${${MODULE_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)
|
||||
# Returns OCCT version string from file Standard_Version.hxx (if available)
|
||||
function (OCCT_VERSION OCCT_VERSION_VAR)
|
||||
set (OCC_VERSION_COMPLETE "7.1.0")
|
||||
set (OCC_VERSION_DEVELOPMENT "")
|
||||
|
||||
set (OCCT_VERSION_LOCALVAR "${OCC_VERSION_COMPLETE}.${OCC_VERSION_DEVELOPMENT}")
|
||||
|
||||
set (OCC_VERSION_MAJOR 7)
|
||||
set (OCC_VERSION_MINOR 0)
|
||||
set (OCC_VERSION_MAINTENANCE 0)
|
||||
set (OCC_VERSION_DEVELOPMENT dev)
|
||||
set (OCC_VERSION_COMPLETE "7.0.0")
|
||||
|
||||
set (STANDARD_VERSION_FILE "${CMAKE_SOURCE_DIR}/src/Standard/Standard_Version.hxx")
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/Standard/Standard_Version.hxx")
|
||||
set (STANDARD_VERSION_FILE "${BUILD_PATCH}/src/Standard/Standard_Version.hxx")
|
||||
endif()
|
||||
|
||||
if (EXISTS "${STANDARD_VERSION_FILE}")
|
||||
foreach (SOUGHT_VERSION OCC_VERSION_MAJOR OCC_VERSION_MINOR OCC_VERSION_MAINTENANCE)
|
||||
file (STRINGS "${STANDARD_VERSION_FILE}" ${SOUGHT_VERSION} REGEX "^#define ${SOUGHT_VERSION} .*")
|
||||
string (REGEX REPLACE ".*${SOUGHT_VERSION} .*([^ ]+).*" "\\1" ${SOUGHT_VERSION} "${${SOUGHT_VERSION}}" )
|
||||
endforeach()
|
||||
|
||||
foreach (SOUGHT_VERSION OCC_VERSION_DEVELOPMENT OCC_VERSION_COMPLETE)
|
||||
foreach (SOUGHT_VERSION OCC_VERSION_COMPLETE OCC_VERSION_DEVELOPMENT)
|
||||
file (STRINGS "${STANDARD_VERSION_FILE}" ${SOUGHT_VERSION} REGEX "^#define ${SOUGHT_VERSION} .*")
|
||||
string (REGEX REPLACE ".*${SOUGHT_VERSION} .*\"([^ ]+)\".*" "\\1" ${SOUGHT_VERSION} "${${SOUGHT_VERSION}}" )
|
||||
endforeach()
|
||||
|
||||
if (NOT "${OCC_VERSION_DEVELOPMENT}" STREQUAL "")
|
||||
set (OCCT_VERSION_LOCALVAR "${OCC_VERSION_COMPLETE}.${OCC_VERSION_DEVELOPMENT}")
|
||||
else()
|
||||
set (OCCT_VERSION_LOCALVAR "${OCC_VERSION_COMPLETE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (OCC_VERSION_MAJOR "${OCC_VERSION_MAJOR}" PARENT_SCOPE)
|
||||
set (OCC_VERSION_MINOR "${OCC_VERSION_MINOR}" PARENT_SCOPE)
|
||||
set (OCC_VERSION_MAINTENANCE "${OCC_VERSION_MAINTENANCE}" PARENT_SCOPE)
|
||||
set (OCC_VERSION_DEVELOPMENT "${OCC_VERSION_DEVELOPMENT}" PARENT_SCOPE)
|
||||
|
||||
if (OCC_VERSION_DEVELOPMENT AND OCC_VERSION_COMPLETE)
|
||||
set (OCC_VERSION_STRING_EXT "${OCC_VERSION_COMPLETE}.${OCC_VERSION_DEVELOPMENT}" PARENT_SCOPE)
|
||||
else()
|
||||
set (OCC_VERSION_STRING_EXT "${OCC_VERSION_COMPLETE}" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
set (${OCCT_VERSION_VAR} "${OCCT_VERSION_LOCALVAR}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
macro (CHECK_PATH_FOR_CONSISTENCY THE_ROOT_PATH_NAME THE_BEING_CHECKED_PATH_NAME THE_VAR_TYPE THE_MESSAGE_OF_BEING_CHECKED_PATH)
|
||||
|
@@ -25,7 +25,7 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
set (HEADER_FILES)
|
||||
|
||||
# Generate Flex and Bison files
|
||||
if (${BUILD_YACCLEX})
|
||||
if (${REBUILD_PLATFORM_DEPENDENT_CODE})
|
||||
|
||||
# flex files
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
|
||||
@@ -65,14 +65,14 @@ 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 (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES")
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${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 "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
endif()
|
||||
else()
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
@@ -92,10 +92,10 @@ 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 (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
message (STATUS "Info. consider patched file: ${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
list (APPEND USED_INCFILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${APPLY_OCCT_PATCH_DIR}/src/${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}")
|
||||
@@ -103,10 +103,10 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
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 (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
message (STATUS "Info. consider patched file: ${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
list (APPEND USED_SRCFILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${APPLY_OCCT_PATCH_DIR}/src/${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}")
|
||||
@@ -116,64 +116,41 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
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()
|
||||
|
||||
if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
|
||||
|
||||
if (DEFINED INSTALL_BIN_DIR)
|
||||
install (TARGETS ${PROJECT_NAME} DESTINATION "${INSTALL_BIN_DIR}")
|
||||
else()
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Release
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Debug
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
if (MSVC)
|
||||
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind/${PROJECT_NAME}.pdb
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
else()
|
||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
|
||||
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}")
|
||||
else()
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Release
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Debug
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
|
||||
if (MSVC)
|
||||
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind/${PROJECT_NAME}.pdb
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (CURRENT_MODULE)
|
||||
@@ -185,16 +162,10 @@ foreach (OCCT_MODULE ${OCCT_MODULES})
|
||||
endforeach()
|
||||
|
||||
if (CURRENT_MODULE)
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "Modules/${CURRENT_MODULE}")
|
||||
set_property (TARGET ${PROJECT_NAME} PROPERTY FOLDER "Modules/${CURRENT_MODULE}")
|
||||
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)
|
||||
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
|
||||
SOVERSION "${OCC_VERSION_MAJOR}"
|
||||
VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
|
||||
|
||||
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
|
||||
set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
|
||||
@@ -202,24 +173,19 @@ set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
|
||||
# parce EXTERNLIB file
|
||||
FILE_TO_LIST ("src/${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})
|
||||
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 "${CURRENT_CSF}" STREQUAL "")
|
||||
# prepare a list from a string with whitespaces
|
||||
separate_arguments (CURRENT_CSF)
|
||||
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
|
||||
endif()
|
||||
string (REGEX MATCH "^TK" TK_FOUND ${USED_ITEM})
|
||||
if (NOT "${TK_FOUND}" STREQUAL "")
|
||||
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
|
||||
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 "${CURRENT_CSF}" STREQUAL "")
|
||||
# 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()
|
||||
@@ -230,7 +196,7 @@ if (APPLE)
|
||||
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")
|
||||
message (STATUS "Warning. X11 is not found. It's required to install The XQuartz project: http://www.xquartz.org")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -236,40 +236,30 @@ macro (TBB_PRODUCT_SEARCH PRODUCT_NAME)
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
if (WIN32)
|
||||
if (DEFINED INSTALL_BIN_DIR)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL} DESTINATION "${INSTALL_BIN_DIR}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
get_filename_component (PRODUCT_LIBRARY_NAME ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
DESTINATION "${INSTALL_LIB_DIR}"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
else()
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
endif()
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
endif()
|
||||
endif()
|
||||
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY 3RDPARTY_${PRODUCT_NAME}_DLL)
|
||||
|
@@ -203,47 +203,32 @@ if (INSTALL_TCL)
|
||||
|
||||
# collect and install all dlls from tcl dll dirs
|
||||
file (GLOB TCL_DLLS "${3RDPARTY_TCL_DLL_DIR}/*.dll")
|
||||
|
||||
if (DEFINED INSTALL_BIN_DIR)
|
||||
install (FILES ${TCL_DLLS} DESTINATION "${INSTALL_BIN_DIR}")
|
||||
else()
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
get_filename_component(3RDPARTY_TCL_LIBRARY_REALPATH ${3RDPARTY_TCL_LIBRARY} REALPATH)
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH} DESTINATION "${INSTALL_LIB_DIR}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
endif()
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
endif()
|
||||
|
||||
if (TCL_TCLSH_VERSION)
|
||||
# tcl is required to install in lib folder (without)
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_LIB_DIR}")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_LIB_DIR}")
|
||||
else()
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
endif()
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
else()
|
||||
message (STATUS "\nWarning: tclX.X subdir won't be copyied during the installation process.")
|
||||
message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
|
||||
@@ -270,7 +255,7 @@ if (TK_FOUND AND 3RDPARTY_TCL_DIR)
|
||||
|
||||
if (${THE_SAME_FOLDER} EQUAL 0)
|
||||
set (3RDPARTY_TCLTK_DIR "${3RDPARTY_TCL_DIR}")
|
||||
message (STATUS "Info: TK is used from TCL folder: ${3RDPARTY_TCLTK_DIR}")
|
||||
message (STATUS "Info. TK is used from TCL folder: ${3RDPARTY_TCLTK_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -207,45 +207,31 @@ if (INSTALL_TK)
|
||||
|
||||
# collect and install all dlls from tk dll dirs
|
||||
file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
|
||||
|
||||
if (DEFINED INSTALL_BIN_DIR)
|
||||
install (FILES ${TK_DLLS} DESTINATION "${INSTALL_BIN_DIR}")
|
||||
else()
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH} DESTINATION "${INSTALL_LIB_DIR}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
endif()
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
endif()
|
||||
|
||||
if (TCL_TCLSH_VERSION)
|
||||
# tk is required to install in lib folder (without)
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_LIB_DIR}")
|
||||
else()
|
||||
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
endif()
|
||||
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
else()
|
||||
message (STATUS "\nWarning: tkX.X subdir won't be copyied during the installation process.")
|
||||
message (STATUS "Try seeking tk within another folder by changing 3RDPARTY_TK_DIR variable.")
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# variable description
|
||||
|
||||
#
|
||||
set (BUILD_PATCH_DESCR
|
||||
set (APPLY_OCCT_PATCH_DIR_DESCR
|
||||
"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
|
||||
@@ -13,19 +13,19 @@ set (BUILD_LIBRARY_TYPE_DESCR
|
||||
are linked dynamically and loaded at runtime. 'Static' libraries
|
||||
are archives of object files for use when linking other targets")
|
||||
|
||||
set (BUILD_YACCLEX_DESCR
|
||||
set (REBUILD_PLATFORM_DEPENDENT_CODE_DESCR
|
||||
"Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and
|
||||
ExprIntrp functionality are generated automatically with Flex/Bison. Checking this options
|
||||
leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files")
|
||||
|
||||
set (BUILD_WITH_DEBUG_DESCR
|
||||
set (OCCT_ALGO_EXTENDED_OUTPUT_DESCR
|
||||
"Enables extended messages of many OCCT algorithms, usually printed to cout.
|
||||
These include messages on internal errors and special cases encountered, timing etc")
|
||||
|
||||
# install variables
|
||||
set (INSTALL_DIR_DESCR
|
||||
"The place where built OCCT libraries, headers, test cases (INSTALL_TEST_CASES variable),
|
||||
samples (INSTALL_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_GL2PS, INSTALL_TBB and
|
||||
"The place where built OCCT libraries, headers, test cases (INSTALL_OCCT_TEST_CASES variable),
|
||||
samples (INSTALL_OCCT_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_GL2PS, INSTALL_TBB and
|
||||
other similar variables) will be placed during the installation process (building INSTALL project)")
|
||||
|
||||
macro (INSTALL_MESSAGE INSTALL_TARGET_VARIABLE INSTALL_TARGET_STRING)
|
||||
@@ -34,8 +34,8 @@ set (${INSTALL_TARGET_VARIABLE}_DESCR
|
||||
project) into the installation directory (INSTALL_DIR variable)")
|
||||
endmacro()
|
||||
|
||||
INSTALL_MESSAGE (INSTALL_SAMPLES "OCCT samples")
|
||||
INSTALL_MESSAGE (INSTALL_TEST_CASES "non-regression OCCT test scripts")
|
||||
INSTALL_MESSAGE (INSTALL_OCCT_SAMPLES "OCCT samples")
|
||||
INSTALL_MESSAGE (INSTALL_OCCT_TEST_CASES "non-regression OCCT test scripts")
|
||||
INSTALL_MESSAGE (INSTALL_DOC_OcctOverview "OCCT overview documentation (HTML format)")
|
||||
INSTALL_MESSAGE (INSTALL_FREEIMAGE "FreeImage binaries")
|
||||
INSTALL_MESSAGE (INSTALL_FREEIMAGEPLUS "FreeImagePlus binaries")
|
||||
|
@@ -9,6 +9,21 @@ if (NOT DEFINED 3RDPARTY_VTK_DIR)
|
||||
set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing VTK")
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_VTK_REQUIRED_LIBRARIES vtkCommonCore
|
||||
vtkCommonDataModel
|
||||
vtkCommonExecutionModel
|
||||
vtkCommonMath
|
||||
vtkCommonTransforms
|
||||
vtkRenderingCore
|
||||
vtkRenderingFreeType
|
||||
vtkRenderingFreeTypeOpenGL
|
||||
vtkRenderingOpenGL
|
||||
vtkFiltersGeneral
|
||||
vtkIOCore
|
||||
vtkIOImage
|
||||
vtkImagingCore
|
||||
vtkInteractionStyle)
|
||||
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
@@ -67,35 +82,37 @@ if (VTK_FOUND)
|
||||
# add compiler flags, preprocessor definitions, include and link dirs
|
||||
include (${VTK_USE_FILE})
|
||||
|
||||
set (ALL_REQUIRED_VTK_LIBRARIES_FOUND ON)
|
||||
if (VTK_LIBRARIES)
|
||||
|
||||
set (3RDPARTY_VTK_INCLUDE_DIRS)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
set (3RDPARTY_VTK_DLL_DIRS)
|
||||
|
||||
set (HARDCODED_D3D9_LIB "C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x64/d3d9.lib")
|
||||
|
||||
foreach (VTK_LIBRARY ${VTK_LIBRARIES})
|
||||
string (REGEX MATCH "^vtk" IS_VTK_LIBRARY ${VTK_LIBRARY})
|
||||
if (IS_VTK_LIBRARY)
|
||||
foreach (VTK_REQUIRED_LIBRARY ${3RDPARTY_VTK_REQUIRED_LIBRARIES})
|
||||
list (FIND VTK_LIBRARIES ${VTK_REQUIRED_LIBRARY} FOUND_INDEX)
|
||||
if (${FOUND_INDEX} EQUAL -1)
|
||||
message (WARNING "VTK: required ${VTK_REQUIRED_LIBRARY} library is not found")
|
||||
set (ALL_REQUIRED_VTK_LIBRARIES_FOUND OFF)
|
||||
else()
|
||||
# get paths from corresponding variables
|
||||
if (${VTK_LIBRARY}_INCLUDE_DIRS AND EXISTS "${${VTK_LIBRARY}_INCLUDE_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_INCLUDE_DIRS "${${VTK_LIBRARY}_INCLUDE_DIRS}")
|
||||
if (${VTK_REQUIRED_LIBRARY}_INCLUDE_DIRS AND EXISTS "${${VTK_REQUIRED_LIBRARY}_INCLUDE_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_INCLUDE_DIRS "${${VTK_REQUIRED_LIBRARY}_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
if (${VTK_LIBRARY}_LIBRARY_DIRS AND EXISTS "${${VTK_LIBRARY}_LIBRARY_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_LIBRARY}_LIBRARY_DIRS}")
|
||||
if (${VTK_REQUIRED_LIBRARY}_LIBRARY_DIRS AND EXISTS "${${VTK_REQUIRED_LIBRARY}_LIBRARY_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_REQUIRED_LIBRARY}_LIBRARY_DIRS}")
|
||||
endif()
|
||||
|
||||
if (${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS AND EXISTS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
|
||||
if (${VTK_REQUIRED_LIBRARY}_RUNTIME_LIBRARY_DIRS AND EXISTS "${${VTK_REQUIRED_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${${VTK_REQUIRED_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
|
||||
if (NOT WIN32)
|
||||
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_REQUIRED_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# get paths from corresponding properties
|
||||
get_target_property (TARGET_VTK_IMPORT_CONFS ${VTK_LIBRARY} IMPORTED_CONFIGURATIONS)
|
||||
get_property (TARGET_VTK_IMPORT_CONFS TARGET ${VTK_REQUIRED_LIBRARY} PROPERTY IMPORTED_CONFIGURATIONS)
|
||||
|
||||
if (TARGET_VTK_IMPORT_CONFS)
|
||||
list (GET TARGET_VTK_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
|
||||
@@ -106,24 +123,13 @@ if (VTK_FOUND)
|
||||
# endforeach()
|
||||
#endif()
|
||||
|
||||
get_target_property (TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${VTK_LIBRARY} IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF})
|
||||
if(TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES)
|
||||
list (FIND TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES "${HARDCODED_D3D9_LIB}" D3D9_INDEX)
|
||||
if (NOT D3D9_INDEX EQUAL -1)
|
||||
message (STATUS "Warning: ${HARDCODED_D3D9_LIB} has been removed from ${VTK_LIBRARY}")
|
||||
|
||||
list (REMOVE_AT TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${D3D9_INDEX})
|
||||
set_target_properties (${VTK_LIBRARY} PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF} "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
get_target_property (TARGET_PROPERTY_IMP_PATH ${VTK_LIBRARY} IMPORTED_IMPLIB_${CHOSEN_IMPORT_CONF})
|
||||
get_property (TARGET_PROPERTY_IMP_PATH TARGET ${VTK_REQUIRED_LIBRARY} PROPERTY IMPORTED_IMPLIB_${CHOSEN_IMPORT_CONF})
|
||||
if(TARGET_PROPERTY_IMP_PATH AND EXISTS "${TARGET_PROPERTY_IMP_PATH}")
|
||||
get_filename_component (TARGET_PROPERTY_IMP_DIR "${TARGET_PROPERTY_IMP_PATH}" PATH)
|
||||
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${TARGET_PROPERTY_IMP_DIR}")
|
||||
endif()
|
||||
|
||||
get_target_property (TARGET_PROPERTY_LOCATION_PATH ${VTK_LIBRARY} IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF})
|
||||
get_property (TARGET_PROPERTY_LOCATION_PATH TARGET ${VTK_REQUIRED_LIBRARY} PROPERTY IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF})
|
||||
if(TARGET_PROPERTY_LOCATION_PATH AND EXISTS "${TARGET_PROPERTY_LOCATION_PATH}")
|
||||
get_filename_component (TARGET_PROPERTY_LOCATION_DIR "${TARGET_PROPERTY_LOCATION_PATH}" PATH)
|
||||
|
||||
@@ -135,32 +141,38 @@ if (VTK_FOUND)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
else()
|
||||
set (ALL_REQUIRED_VTK_LIBRARIES_FOUND OFF)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_VTK_INCLUDE_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_VTK_INCLUDE_DIRS)
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIRS})
|
||||
if (ALL_REQUIRED_VTK_LIBRARIES_FOUND)
|
||||
|
||||
list (GET 3RDPARTY_VTK_INCLUDE_DIRS 0 3RDPARTY_VTK_INCLUDE_DIR)
|
||||
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_INCLUDE_DIR}" CACHE PATH "The directory containing headers of VTK" FORCE)
|
||||
endif()
|
||||
if (3RDPARTY_VTK_INCLUDE_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_VTK_INCLUDE_DIRS)
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIRS})
|
||||
|
||||
if (3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIRS})
|
||||
list (GET 3RDPARTY_VTK_INCLUDE_DIRS 0 3RDPARTY_VTK_INCLUDE_DIR)
|
||||
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_INCLUDE_DIR}" CACHE PATH "The directory containing headers of VTK" FORCE)
|
||||
endif()
|
||||
|
||||
list (GET 3RDPARTY_VTK_LIBRARY_DIRS 0 3RDPARTY_VTK_LIBRARY_DIR)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_LIBRARY_DIR}" CACHE PATH "The directory containing VTK libraries" FORCE)
|
||||
endif()
|
||||
if (3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIRS})
|
||||
|
||||
if (WIN32)
|
||||
if (3RDPARTY_VTK_DLL_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_VTK_DLL_DIRS)
|
||||
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIRS})
|
||||
list (GET 3RDPARTY_VTK_LIBRARY_DIRS 0 3RDPARTY_VTK_LIBRARY_DIR)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_LIBRARY_DIR}" CACHE PATH "The directory containing VTK libraries" FORCE)
|
||||
endif()
|
||||
|
||||
list (GET 3RDPARTY_VTK_DLL_DIRS 0 3RDPARTY_VTK_DLL_DIR)
|
||||
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DLL_DIR}" CACHE PATH "The directory containing VTK shared libraries" FORCE)
|
||||
if (WIN32)
|
||||
if (3RDPARTY_VTK_DLL_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_VTK_DLL_DIRS)
|
||||
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIRS})
|
||||
|
||||
list (GET 3RDPARTY_VTK_DLL_DIRS 0 3RDPARTY_VTK_DLL_DIR)
|
||||
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DLL_DIR}" CACHE PATH "The directory containing VTK shared libraries" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -192,6 +204,4 @@ else()
|
||||
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_LIBRARY_DIR})
|
||||
endif()
|
||||
|
||||
OCCT_CHECK_AND_UNSET (VTK_INCLUDE_DIRS)
|
||||
OCCT_CHECK_AND_UNSET (VTK_LIBRARY_DIRS)
|
||||
OCCT_CHECK_AND_UNSET (VTK_DIR)
|
||||
mark_as_advanced (VTK_INCLUDE_DIRS VTK_LIBRARY_DIRS VTK_DIR)
|
||||
|
124
adm/genconf.tcl
@@ -27,12 +27,8 @@ source [file join [file dirname [info script]] genconfdeps.tcl]
|
||||
package require Tk
|
||||
|
||||
set aRowIter 0
|
||||
set aCheckRowIter 0
|
||||
frame .myFrame -padx 5 -pady 5
|
||||
pack .myFrame -fill both -expand 1
|
||||
frame .myFrame.myVsFrame
|
||||
frame .myFrame.myHxxChecks
|
||||
frame .myFrame.myChecks
|
||||
|
||||
set SYS_VS_LIST {}
|
||||
set SYS_VC_LIST {}
|
||||
@@ -90,8 +86,8 @@ proc wokdep:gui:Close {} {
|
||||
}
|
||||
|
||||
proc wokdep:gui:SwitchConfig {} {
|
||||
set ::VCVER [lindex $::SYS_VC_LIST [.myFrame.myVsFrame.myVsCombo current]]
|
||||
set ::VCVARS [lindex $::SYS_VCVARS_LIST [.myFrame.myVsFrame.myVsCombo current]]
|
||||
set ::VCVER [lindex $::SYS_VC_LIST [.myFrame.myVsCombo current]]
|
||||
set ::VCVARS [lindex $::SYS_VCVARS_LIST [.myFrame.myVsCombo current]]
|
||||
|
||||
set ::CSF_OPT_INC {}
|
||||
set ::CSF_OPT_LIB32 {}
|
||||
@@ -363,40 +359,41 @@ proc wokdep:gui:Show64Bitness { theRowIter } {
|
||||
}
|
||||
|
||||
# Header
|
||||
ttk::label .myFrame.myVsFrame.myVsLbl -text "Visual Studio configuration:" -padding {5 5 80 5}
|
||||
ttk::combobox .myFrame.myVsFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 30
|
||||
ttk::combobox .myFrame.myVsFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6
|
||||
ttk::label .myFrame.myVsLbl -text "Visual Studio configuration" -relief solid -padding {5 5 80 5}
|
||||
ttk::combobox .myFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 30
|
||||
ttk::combobox .myFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6
|
||||
entry .myFrame.myVcEntry -textvariable VCVER -width 6
|
||||
entry .myFrame.myVcVarsEntry -textvariable VCVARS -width 70
|
||||
ttk::button .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars
|
||||
|
||||
#
|
||||
checkbutton .myFrame.myHxxChecks.myScutsCheck -offvalue "false" -onvalue "true" -variable SHORTCUT_HEADERS
|
||||
ttk::label .myFrame.myHxxChecks.myScutsLbl -text "Create short-cuts to headers in inc folder instead of copying"
|
||||
ttk::label .myFrame.myOcctBuildLbl -text "OCCT headers configuration" -relief solid -padding {5 5 80 5}
|
||||
checkbutton .myFrame.myScutsCheck -offvalue "false" -onvalue "true" -variable SHORTCUT_HEADERS
|
||||
ttk::label .myFrame.myScutsLbl -text "Short-cut headers instead original ones in inc"
|
||||
|
||||
#
|
||||
ttk::label .myFrame.mySrchLbl -text "3rd-parties search path:" -padding {5 5 80 5}
|
||||
ttk::label .myFrame.mySrchLbl -text "3rd-parties search path" -relief solid -padding {5 5 80 5}
|
||||
entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH -width 80
|
||||
ttk::button .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
|
||||
checkbutton .myFrame.myChecks.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myFImageLbl -text "Use FreeImage"
|
||||
checkbutton .myFrame.myChecks.myGl2psCheck -offvalue "false" -onvalue "true" -variable HAVE_GL2PS -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myGl2psLbl -text "Use GL2PS"
|
||||
checkbutton .myFrame.myChecks.myTbbCheck -offvalue "false" -onvalue "true" -variable HAVE_TBB -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myTbbLbl -text "Use Intel TBB"
|
||||
checkbutton .myFrame.myChecks.myOpenClCheck -offvalue "false" -onvalue "true" -variable HAVE_OPENCL -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myOpenClLbl -text "Use OpenCL"
|
||||
checkbutton .myFrame.myChecks.myMacGLXCheck -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
|
||||
ttk::label .myFrame.myChecks.myMacGLXLbl -text "Use X11 for windows drawing"
|
||||
ttk::label .myFrame.myChecks.myVtkLbl -text "Use VTK"
|
||||
checkbutton .myFrame.myChecks.myVtkCheck -offvalue "false" -onvalue "true" -variable HAVE_VTK -command wokdep:gui:UpdateList
|
||||
checkbutton .myFrame.myChecks.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myQt4Lbl -text "Search Qt4"
|
||||
checkbutton .myFrame.myChecks.myJDKCheck -offvalue "false" -onvalue "true" -variable CHECK_JDK -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myJDKLbl -text "Search JDK"
|
||||
checkbutton .myFrame.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myFImageLbl -text "Use FreeImage"
|
||||
checkbutton .myFrame.myGl2psCheck -offvalue "false" -onvalue "true" -variable HAVE_GL2PS -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myGl2psLbl -text "Use GL2PS"
|
||||
checkbutton .myFrame.myTbbCheck -offvalue "false" -onvalue "true" -variable HAVE_TBB -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myTbbLbl -text "Use Intel TBB"
|
||||
checkbutton .myFrame.myOpenClCheck -offvalue "false" -onvalue "true" -variable HAVE_OPENCL -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myOpenClLbl -text "Use OpenCL"
|
||||
checkbutton .myFrame.myMacGLXCheck -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
|
||||
ttk::label .myFrame.myMacGLXLbl -text "Use X11 for windows drawing"
|
||||
ttk::label .myFrame.myVtkLbl -text "Use VTK"
|
||||
checkbutton .myFrame.myVtkCheck -offvalue "false" -onvalue "true" -variable HAVE_VTK -command wokdep:gui:UpdateList
|
||||
checkbutton .myFrame.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myQt4Lbl -text "Search Qt4"
|
||||
checkbutton .myFrame.myJDKCheck -offvalue "false" -onvalue "true" -variable CHECK_JDK -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myJDKLbl -text "Search JDK"
|
||||
|
||||
# Additional headers search paths
|
||||
ttk::label .myFrame.myIncLbl -text "Additional headers search paths:" -padding {5 5 80 5}
|
||||
ttk::label .myFrame.myIncLbl -text "Additional headers search paths" -relief solid -padding {5 5 80 5}
|
||||
scrollbar .myFrame.myIncScrl -command ".myFrame.myIncList yview"
|
||||
listbox .myFrame.myIncList -listvariable CSF_OPT_INC -width 80 -height 5 -yscrollcommand ".myFrame.myIncScrl set"
|
||||
ttk::button .myFrame.myIncAdd -text "Add" -command wokdep:gui:AddIncPath
|
||||
@@ -406,7 +403,7 @@ ttk::button .myFrame.myIncClear -text "Reset" -command wokdep:gui:ResetIncP
|
||||
ttk::label .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
|
||||
|
||||
# Additional libraries (32-bit) search paths
|
||||
ttk::label .myFrame.myLib32Lbl -text "Additional libraries (32-bit) search paths:" -padding {5 5 80 5}
|
||||
ttk::label .myFrame.myLib32Lbl -text "Additional libraries (32-bit) search paths" -relief solid -padding {5 5 80 5}
|
||||
scrollbar .myFrame.myLib32Scrl -command ".myFrame.myLib32List yview"
|
||||
listbox .myFrame.myLib32List -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32Scrl set"
|
||||
ttk::button .myFrame.myLib32Add -text "Add" -command wokdep:gui:AddLib32Path
|
||||
@@ -416,7 +413,7 @@ ttk::button .myFrame.myLib32Clear -text "Reset" -command wokdep:gui:ResetLi
|
||||
ttk::label .myFrame.myLib32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
|
||||
|
||||
# Additional libraries (64-bit) search paths
|
||||
ttk::label .myFrame.myLib64Lbl -text "Additional libraries (64-bit) search paths:" -padding {5 5 80 5}
|
||||
ttk::label .myFrame.myLib64Lbl -text "Additional libraries (64-bit) search paths" -relief solid -padding {5 5 80 5}
|
||||
scrollbar .myFrame.myLib64Scrl -command ".myFrame.myLib64List yview"
|
||||
listbox .myFrame.myLib64List -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64Scrl set"
|
||||
ttk::button .myFrame.myLib64Add -text "Add" -command wokdep:gui:AddLib64Path
|
||||
@@ -426,7 +423,7 @@ ttk::button .myFrame.myLib64Clear -text "Reset" -command wokdep:gui:ResetLi
|
||||
ttk::label .myFrame.myLib64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
|
||||
|
||||
# Additional executables (32-bit) search paths
|
||||
ttk::label .myFrame.myBin32Lbl -text "Additional executables (32-bit) search paths:" -padding {5 5 80 5}
|
||||
ttk::label .myFrame.myBin32Lbl -text "Additional executables (32-bit) search paths" -relief solid -padding {5 5 80 5}
|
||||
scrollbar .myFrame.myBin32Scrl -command ".myFrame.myBin32List yview"
|
||||
listbox .myFrame.myBin32List -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32Scrl set"
|
||||
ttk::button .myFrame.myBin32Add -text "Add" -command wokdep:gui:AddBin32Path
|
||||
@@ -436,7 +433,7 @@ ttk::button .myFrame.myBin32Clear -text "Reset" -command wokdep:gui:ResetBi
|
||||
ttk::label .myFrame.myBin32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
|
||||
|
||||
# Additional executables (64-bit) search paths
|
||||
ttk::label .myFrame.myBin64Lbl -text "Additional executables (64-bit) search paths:" -padding {5 5 80 5}
|
||||
ttk::label .myFrame.myBin64Lbl -text "Additional executables (64-bit) search paths" -relief solid -padding {5 5 80 5}
|
||||
scrollbar .myFrame.myBin64Scrl -command ".myFrame.myBin64List yview"
|
||||
listbox .myFrame.myBin64List -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64Scrl set"
|
||||
ttk::button .myFrame.myBin64Add -text "Add" -command wokdep:gui:AddBin64Path
|
||||
@@ -452,10 +449,10 @@ ttk::button .myFrame.myClose -text "Close" -command wokdep:gui:Close
|
||||
# Create grid
|
||||
# Header
|
||||
if { "$tcl_platform(platform)" == "windows" } {
|
||||
grid .myFrame.myVsFrame -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
grid .myFrame.myVsFrame.myVsLbl -row 0 -column 0
|
||||
grid .myFrame.myVsFrame.myVsCombo -row 0 -column 1 -padx 5
|
||||
grid .myFrame.myVsFrame.myArchCombo -row 0 -column 2
|
||||
grid .myFrame.myVsLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myVsCombo -row $aRowIter -column 0 -columnspan 2 -sticky w
|
||||
grid .myFrame.myArchCombo -row $aRowIter -column 2 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myVcEntry -row $aRowIter -column 0
|
||||
grid .myFrame.myVcVarsEntry -row $aRowIter -column 1 -columnspan 4 -sticky w
|
||||
@@ -464,9 +461,10 @@ if { "$tcl_platform(platform)" == "windows" } {
|
||||
}
|
||||
|
||||
#
|
||||
grid .myFrame.myHxxChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
grid .myFrame.myHxxChecks.myScutsCheck -row 0 -column 0
|
||||
grid .myFrame.myHxxChecks.myScutsLbl -row 0 -column 1
|
||||
grid .myFrame.myOcctBuildLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myScutsCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myScutsLbl -row $aRowIter -column 1 -columnspan 2 -sticky w
|
||||
incr aRowIter
|
||||
#
|
||||
grid .myFrame.mySrchLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
@@ -474,29 +472,29 @@ incr aRowIter
|
||||
grid .myFrame.mySrchEntry -row $aRowIter -column 0 -columnspan 5
|
||||
grid .myFrame.mySrchBrowseBtn -row $aRowIter -column 6
|
||||
incr aRowIter
|
||||
|
||||
grid .myFrame.myChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
grid .myFrame.myFImageCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myFImageLbl -row $aRowIter -column 1 -sticky w
|
||||
grid .myFrame.myQt4Check -row $aRowIter -column 2 -sticky e
|
||||
grid .myFrame.myQt4Lbl -row $aRowIter -column 3 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myGl2psCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myGl2psLbl -row $aRowIter -column 1 -sticky w
|
||||
grid .myFrame.myJDKCheck -row $aRowIter -column 2 -sticky e
|
||||
grid .myFrame.myJDKLbl -row $aRowIter -column 3 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myTbbCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myTbbLbl -row $aRowIter -column 1 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myOpenClCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myOpenClLbl -row $aRowIter -column 1 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myVtkCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myVtkLbl -row $aRowIter -column 1 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myChecks.myFImageCheck -row $aCheckRowIter -column 0 -sticky e
|
||||
grid .myFrame.myChecks.myFImageLbl -row $aCheckRowIter -column 1 -sticky w
|
||||
grid .myFrame.myChecks.myTbbCheck -row $aCheckRowIter -column 2 -sticky e
|
||||
grid .myFrame.myChecks.myTbbLbl -row $aCheckRowIter -column 3 -sticky w
|
||||
grid .myFrame.myChecks.myQt4Check -row $aCheckRowIter -column 4 -sticky e
|
||||
grid .myFrame.myChecks.myQt4Lbl -row $aCheckRowIter -column 5 -sticky w
|
||||
#grid .myFrame.myChecks.myOpenClCheck -row $aCheckRowIter -column 6 -sticky e
|
||||
#grid .myFrame.myChecks.myOpenClLbl -row $aCheckRowIter -column 7 -sticky w
|
||||
incr aCheckRowIter
|
||||
grid .myFrame.myChecks.myGl2psCheck -row $aCheckRowIter -column 0 -sticky e
|
||||
grid .myFrame.myChecks.myGl2psLbl -row $aCheckRowIter -column 1 -sticky w
|
||||
grid .myFrame.myChecks.myVtkCheck -row $aCheckRowIter -column 2 -sticky e
|
||||
grid .myFrame.myChecks.myVtkLbl -row $aCheckRowIter -column 3 -sticky w
|
||||
grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 4 -sticky e
|
||||
grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 5 -sticky w
|
||||
incr aCheckRowIter
|
||||
if { "$::tcl_platform(os)" == "Darwin" } {
|
||||
grid .myFrame.myChecks.myMacGLXCheck -row $aCheckRowIter -column 0 -sticky e
|
||||
grid .myFrame.myChecks.myMacGLXLbl -row $aCheckRowIter -column 1 -sticky w
|
||||
incr aCheckRowIter
|
||||
grid .myFrame.myMacGLXCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myMacGLXLbl -row $aRowIter -column 1 -sticky w
|
||||
incr aRowIter
|
||||
}
|
||||
|
||||
# Additional headers search paths
|
||||
@@ -530,10 +528,10 @@ grid .myFrame.mySave -row $aRowIter -column 4 -columnspan 2
|
||||
grid .myFrame.myClose -row $aRowIter -column 6 -columnspan 2
|
||||
|
||||
# Bind events
|
||||
bind .myFrame.myVsFrame.myVsCombo <<ComboboxSelected>> {
|
||||
bind .myFrame.myVsCombo <<ComboboxSelected>> {
|
||||
wokdep:gui:SwitchConfig
|
||||
}
|
||||
bind .myFrame.myVsFrame.myArchCombo <<ComboboxSelected>> {
|
||||
bind .myFrame.myArchCombo <<ComboboxSelected>> {
|
||||
wokdep:gui:SwitchArch
|
||||
}
|
||||
|
||||
|
@@ -770,10 +770,10 @@ proc wokdep:SearchVTK {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
|
||||
# We didn't find preferred binary path => search through inc path or among all available VTK directories
|
||||
if { "$aVtkBinPath" == "" } {
|
||||
# Try to find in lib path
|
||||
set aPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aVtkLibPath/bin"]
|
||||
if { "$aPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aVtkLibPath/bin"
|
||||
} elseif { [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aVtkLibPath/lib"] != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aVtkLibPath/lib"
|
||||
set aPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aLibPath/bin"]
|
||||
if { "$aPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aLibPath/bin"
|
||||
} elseif { [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aLibPath/lib"] != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aLibPath/lib"
|
||||
} else {
|
||||
lappend anErrBin$anArchIter "Error: 'vtkCommonCore-${aVtkVer}.dll' not found (VTK)"
|
||||
set isFound "false"
|
||||
|
@@ -731,7 +731,7 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
|
||||
|
||||
puts $doxyFile "DOTFILE_DIRS = $outDir/html"
|
||||
puts $doxyFile "DOT_PATH = $graphvizPath"
|
||||
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetSourceDir $productsPath]"
|
||||
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetIncDir $productsPath]"
|
||||
|
||||
# list of files to generate
|
||||
set mainpage [OCCDoc_MakeMainPage $outDir $outDir/$name.dox $modules $productsPath]
|
||||
|
642
adm/genproj.tcl
@@ -1,19 +0,0 @@
|
||||
@echo off
|
||||
|
||||
rem Setup environment
|
||||
call "%~dp0env.bat" %1 %2 %3
|
||||
|
||||
rem Define path to project file
|
||||
set "PRJFILE=%~dp0\adm\wnt\cbp\OCCT.workspace"
|
||||
if not exist "%PRJFILE%" set "PRJFILE=%~dp0\adm\wnt\cbp\Products.workspace"
|
||||
if not "%4" == "" (
|
||||
set "PRJFILE=%4"
|
||||
)
|
||||
|
||||
if "%CB_PATH%"=="" if exist "%PROGRAMFILES%\CodeBlocks" set "CB_PATH=%PROGRAMFILES%\CodeBlocks\codeblocks.exe"
|
||||
if "%CB_PATH%"=="" set "CB_PATH=codeblocks.exe"
|
||||
|
||||
set "CASBIN=wnt\cbp"
|
||||
set "PATH=%~dp0%CASBIN%\bin%CASDEB%;%PATH%"
|
||||
|
||||
start "" "%CB_PATH%" "%PRJFILE%"
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "@COMPILER@" ]; then
|
||||
if [ "$2" == "@COMPILER_BITNESS@" ]; then
|
||||
if [ "$COMPILER" == "@COMPILER@" ]; then
|
||||
if [ "$ARCH" == "@COMPILER_BITNESS@" ]; then
|
||||
export TCL_DIR="@USED_3RDPARTY_TCL_DIR@"
|
||||
export TK_DIR="@USED_3RDPARTY_TK_DIR@"
|
||||
export FREETYPE_DIR="@USED_3RDPARTY_FREETYPE_DIR@"
|
||||
@@ -9,32 +9,6 @@ if [ "$1" == "@COMPILER@" ]; then
|
||||
export GL2PS_DIR="@USED_3RDPARTY_GL2PS_DIR@"
|
||||
export TBB_DIR="@USED_3RDPARTY_TBB_DIR@"
|
||||
export VTK_DIR="@USED_3RDPARTY_VTK_DIR@"
|
||||
|
||||
export BIN_PATH="@INSTALL_BIN_DIR@"
|
||||
if [ "$BIN_PATH" != "" ]; then
|
||||
export PATH="${BIN_PATH}:${PATH}"
|
||||
fi
|
||||
|
||||
export LIB_PATH="@INSTALL_LIB_DIR@"
|
||||
if [ "$LIB_PATH" != "" ]; then
|
||||
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
||||
export LD_LIBRARY_PATH="${LIB_PATH}:${LD_LIBRARY_PATH}"
|
||||
else
|
||||
export LD_LIBRARY_PATH="${LIB_PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
export OCCT_RESOURCE_PATH="${CASROOT}/src"
|
||||
if [ "@INSTALL_OCCT_RESOURCE_DIR@" != "" ]; then
|
||||
export OCCT_RESOURCE_PATH="@INSTALL_OCCT_RESOURCE_DIR@"
|
||||
fi
|
||||
|
||||
# required for set default testing environment
|
||||
# and "Samples" window creation in DRAW
|
||||
export OCCT_SHARE_PATH="${CASROOT}"
|
||||
if [ "@INSTALL_SHARE_DIR@" != "" ]; then
|
||||
export OCCT_SHARE_PATH="@INSTALL_SHARE_DIR@"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
source "${aScriptPath}/env.sh" "$1"
|
||||
source "${aScriptPath}/env.sh" "$1" "$2"
|
||||
|
||||
echo 'Hint: use "pload ALL" command to load standard commands'
|
||||
DRAWEXE
|
||||
|
@@ -9,11 +9,14 @@ rem vc8 win32 Release
|
||||
|
||||
set "SCRIPTROOT=%~dp0"
|
||||
set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
||||
set "CASROOT=__CASROOT__"
|
||||
if not ["%CASROOT%"] == [""] if exist "%SCRIPTROOT%\%CASROOT%" set "CASROOT=%SCRIPTROOT%\%CASROOT%"
|
||||
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
||||
|
||||
rem ----- Reset values to defaults -----
|
||||
set "CASDEB="
|
||||
set "VCVER=vc10"
|
||||
set "ARCH=64"
|
||||
set "VCVER=vc8"
|
||||
set "ARCH=32"
|
||||
set "VCVARS="
|
||||
set "HAVE_TBB=false"
|
||||
set "HAVE_OPENCL=false"
|
||||
@@ -28,16 +31,10 @@ set "CSF_OPT_BIN32="
|
||||
set "CSF_OPT_BIN64="
|
||||
|
||||
rem ----- Load local settings -----
|
||||
if not ["%CASROOT%"] == [""] if exist "%CASROOT%\custom.bat" (
|
||||
call "%CASROOT%\custom.bat" %1 %2 %3 %4 %5
|
||||
)
|
||||
if exist "%~dp0custom.bat" (
|
||||
call "%~dp0custom.bat" %1 %2 %3 %4 %5
|
||||
)
|
||||
|
||||
if not ["%CASROOT%"] == [""] if exist "%SCRIPTROOT%\%CASROOT%" set "CASROOT=%SCRIPTROOT%\%CASROOT%"
|
||||
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
||||
|
||||
rem ----- Read script arguments (override local settings) -----
|
||||
if not ["%1"] == [""] set "VCVER=%1"
|
||||
if not ["%2"] == [""] set "ARCH=%2"
|
||||
@@ -48,14 +45,19 @@ if /I ["%3"] == ["d"] set "CASDEB=d"
|
||||
if /I ["%3"] == ["i"] set "CASDEB=i"
|
||||
if /I ["%3"] == ["relwithdeb"] set "CASDEB=i"
|
||||
|
||||
set "CSF_OPT_LIB32D=%CSF_OPT_LIB32%"
|
||||
set "CSF_OPT_LIB64D=%CSF_OPT_LIB64%"
|
||||
set "CSF_OPT_BIN32D=%CSF_OPT_BIN32%"
|
||||
set "CSF_OPT_BIN64D=%CSF_OPT_BIN64%"
|
||||
set "CSF_OPT_LIB32I=%CSF_OPT_LIB32%"
|
||||
set "CSF_OPT_LIB64I=%CSF_OPT_LIB64%"
|
||||
set "CSF_OPT_BIN32I=%CSF_OPT_BIN32%"
|
||||
set "CSF_OPT_BIN64I=%CSF_OPT_BIN64%"
|
||||
set "CSF_OPT_INC=%CSF_OPT_INC%;%CASROOT%\inc"
|
||||
set "CSF_OPT_LIB32D=%CSF_OPT_LIB32%;%CASROOT%\win32\%VCVER%\libd"
|
||||
set "CSF_OPT_LIB64D=%CSF_OPT_LIB64%;%CASROOT%\win64\%VCVER%\libd"
|
||||
set "CSF_OPT_BIN32D=%CSF_OPT_BIN32%;%CASROOT%\win32\%VCVER%\bind"
|
||||
set "CSF_OPT_BIN64D=%CSF_OPT_BIN64%;%CASROOT%\win64\%VCVER%\bind"
|
||||
set "CSF_OPT_LIB32I=%CSF_OPT_LIB32%;%CASROOT%\win32\%VCVER%\libi"
|
||||
set "CSF_OPT_LIB64I=%CSF_OPT_LIB64%;%CASROOT%\win64\%VCVER%\libi"
|
||||
set "CSF_OPT_BIN32I=%CSF_OPT_BIN32%;%CASROOT%\win32\%VCVER%\bini"
|
||||
set "CSF_OPT_BIN64I=%CSF_OPT_BIN64%;%CASROOT%\win64\%VCVER%\bini"
|
||||
set "CSF_OPT_LIB32=%CSF_OPT_LIB32%;%CASROOT%\win32\%VCVER%\lib"
|
||||
set "CSF_OPT_LIB64=%CSF_OPT_LIB64%;%CASROOT%\win64\%VCVER%\lib"
|
||||
set "CSF_OPT_BIN32=%CSF_OPT_BIN32%;%CASROOT%\win32\%VCVER%\bin"
|
||||
set "CSF_OPT_BIN64=%CSF_OPT_BIN64%;%CASROOT%\win64\%VCVER%\bin"
|
||||
|
||||
rem ----- Optional 3rd-parties should be enabled by HAVE macros -----
|
||||
set "CSF_OPT_CMPL="
|
||||
@@ -144,6 +146,9 @@ if exist "%CASROOT%\src\DrawResources" (
|
||||
set "DRAWHOME=%CASROOT%\src\DrawResources"
|
||||
set "CSF_DrawPluginDefaults=%DRAWHOME%"
|
||||
)
|
||||
if exist "%SCRIPTROOT%\src\DrawResourcesProducts" (
|
||||
set "CSF_DrawPluginProductsDefaults=%SCRIPTROOT%\src\DrawResourcesProducts"
|
||||
)
|
||||
goto :eof
|
||||
|
||||
:concatCmplInc
|
||||
@@ -151,13 +156,9 @@ set "CSF_OPT_CMPL=%CSF_OPT_CMPL% -I%1"
|
||||
goto :eof
|
||||
|
||||
:concatLib32
|
||||
rem Compiler options for Code::Blocks: -L for gcc/mingw and /LIBPATH for msvc
|
||||
rem set "OPT_LIB32=%OPT_LIB32% /LIBPATH:%1"
|
||||
set "OPT_LIB32=%OPT_LIB32% -L%1"
|
||||
set "OPT_LIB32=%OPT_LIB32% /LIBPATH:%1"
|
||||
goto :eof
|
||||
|
||||
:concatLib64
|
||||
rem Compiler options for Code::Blocks: -L for gcc/mingw and /LIBPATH for msvc
|
||||
rem set "OPT_LIB64=%OPT_LIB64% /LIBPATH:%1"
|
||||
set "OPT_LIB64=%OPT_LIB64% -L%1"
|
||||
set "OPT_LIB64=%OPT_LIB64% /LIBPATH:%1"
|
||||
goto :eof
|
||||
|
@@ -5,7 +5,7 @@ set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
||||
|
||||
set "VCVER=@COMPILER@"
|
||||
set "ARCH=@COMPILER_BITNESS@"
|
||||
set "CASDEB=@CURRENT_BUILD_LETTER@"
|
||||
set "CASDEB=@BUILD_LETTER@"
|
||||
|
||||
if not ["%1"] == [""] set "VCVER=%1"
|
||||
if not ["%2"] == [""] set "ARCH=%2"
|
||||
|
@@ -35,7 +35,7 @@ fi
|
||||
|
||||
# ----- Set local settings -----
|
||||
if [ -e "${aScriptPath}/custom.sh" ]; then
|
||||
source "${aScriptPath}/custom.sh" "${COMPILER}" "${ARCH}"
|
||||
source "${aScriptPath}/custom.sh" "${COMPILER}" "${WOKSTATION}${ARCH}" "${CASDEB}"
|
||||
fi
|
||||
|
||||
THRDPARTY_PATH=""
|
||||
@@ -76,10 +76,15 @@ if [ "$TK_DIR" != "$TCL_DIR" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
BIN_PATH="${WOKSTATION}${ARCH}/${COMPILER}/bin${CASDEB}"
|
||||
LIBS_PATH="${WOKSTATION}${ARCH}/${COMPILER}/lib${CASDEB}"
|
||||
|
||||
export PATH="${CASROOT}/${BIN_PATH}:${PATH}"
|
||||
|
||||
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
||||
export LD_LIBRARY_PATH="${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
|
||||
export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
|
||||
else
|
||||
export LD_LIBRARY_PATH="${THRDPARTY_PATH}"
|
||||
export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$WOKSTATION" == "mac" ]; then
|
||||
@@ -94,34 +99,34 @@ fi
|
||||
export CSF_LANGUAGE=us
|
||||
export MMGT_CLEAR=1
|
||||
export CSF_EXCEPTION_PROMPT=1
|
||||
export CSF_SHMessage="${OCCT_RESOURCE_PATH}/SHMessage"
|
||||
export CSF_MDTVTexturesDirectory="${OCCT_RESOURCE_PATH}/Textures"
|
||||
export CSF_ShadersDirectory="${OCCT_RESOURCE_PATH}/Shaders"
|
||||
export CSF_XSMessage="${OCCT_RESOURCE_PATH}/XSMessage"
|
||||
export CSF_TObjMessage="${OCCT_RESOURCE_PATH}/TObj"
|
||||
export CSF_StandardDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||
export CSF_PluginDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||
export CSF_XCAFDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||
export CSF_TObjDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||
export CSF_StandardLiteDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||
export CSF_UnitsLexicon="${OCCT_RESOURCE_PATH}/UnitsAPI/Lexi_Expr.dat"
|
||||
export CSF_UnitsDefinition="${OCCT_RESOURCE_PATH}/UnitsAPI/Units.dat"
|
||||
export CSF_IGESDefaults="${OCCT_RESOURCE_PATH}/XSTEPResource"
|
||||
export CSF_STEPDefaults="${OCCT_RESOURCE_PATH}/XSTEPResource"
|
||||
export CSF_XmlOcafResource="${OCCT_RESOURCE_PATH}/XmlOcafResource"
|
||||
export CSF_MIGRATION_TYPES="${OCCT_RESOURCE_PATH}/StdResource/MigrationSheet.txt"
|
||||
export CSF_SHMessage="${CASROOT}/src/SHMessage"
|
||||
export CSF_MDTVTexturesDirectory="${CASROOT}/src/Textures"
|
||||
export CSF_ShadersDirectory="${CASROOT}/src/Shaders"
|
||||
export CSF_XSMessage="${CASROOT}/src/XSMessage"
|
||||
export CSF_TObjMessage="${CASROOT}/src/TObj"
|
||||
export CSF_StandardDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_PluginDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_XCAFDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_TObjDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_StandardLiteDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_UnitsLexicon="${CASROOT}/src/UnitsAPI/Lexi_Expr.dat"
|
||||
export CSF_UnitsDefinition="${CASROOT}/src/UnitsAPI/Units.dat"
|
||||
export CSF_IGESDefaults="${CASROOT}/src/XSTEPResource"
|
||||
export CSF_STEPDefaults="${CASROOT}/src/XSTEPResource"
|
||||
export CSF_XmlOcafResource="${CASROOT}/src/XmlOcafResource"
|
||||
export CSF_MIGRATION_TYPES="${CASROOT}/src/StdResource/MigrationSheet.txt"
|
||||
|
||||
# Draw Harness special stuff
|
||||
if [ -e "${OCCT_RESOURCE_PATH}/DrawResources" ]; then
|
||||
export DRAWHOME="${OCCT_RESOURCE_PATH}/DrawResources"
|
||||
export CSF_DrawPluginDefaults="${OCCT_RESOURCE_PATH}/DrawResources"
|
||||
if [ -e "${CASROOT}/src/DrawResources" ]; then
|
||||
export DRAWHOME="${CASROOT}/src/DrawResources"
|
||||
export CSF_DrawPluginDefaults="${CASROOT}/src/DrawResources"
|
||||
|
||||
if [ -e "${OCCT_RESOURCE_PATH}/DrawResources/DrawDefault" ]; then
|
||||
export DRAWDEFAULT="${OCCT_RESOURCE_PATH}/DrawResources/DrawDefault"
|
||||
if [ -e "${CASROOT}/src/DrawResources/DrawDefault" ]; then
|
||||
export DRAWDEFAULT="${CASROOT}/src/DrawResources/DrawDefault"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e "${OCCT_RESOURCE_PATH}/DrawResourcesProducts" ]; then
|
||||
export CSF_DrawPluginProductsDefaults="${OCCT_RESOURCE_PATH}/DrawResourcesProducts"
|
||||
if [ -e "${CASROOT}/src/DrawResourcesProducts" ]; then
|
||||
export CSF_DrawPluginProductsDefaults="${CASROOT}/src/DrawResourcesProducts"
|
||||
fi
|
||||
|
||||
|
@@ -3,8 +3,16 @@
|
||||
# go to the script directory
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
# Reset values
|
||||
export CASROOT="__CASROOT__"
|
||||
|
||||
if [ "${CASROOT}" != "" ] && [ -d "${aScriptPath}/${CASROOT}" ]; then
|
||||
export CASROOT="${aScriptPath}/${CASROOT}"
|
||||
fi
|
||||
if [ "${CASROOT}" == "" ]; then
|
||||
export CASROOT="${aScriptPath}"
|
||||
fi
|
||||
|
||||
# Reset values
|
||||
export CASDEB=""
|
||||
export TARGET="";
|
||||
export HAVE_TBB="false";
|
||||
@@ -20,16 +28,8 @@ export CSF_OPT_BIN32=""
|
||||
export CSF_OPT_BIN64=""
|
||||
|
||||
# ----- Set local settings -----
|
||||
if [ "${CASROOT}" != "" ] && [ -e "${CASROOT}/custom.sh" ]; then source "${CASROOT}/custom.sh"; fi
|
||||
if [ -e "${aScriptPath}/custom.sh" ]; then source "${aScriptPath}/custom.sh"; fi
|
||||
|
||||
if [ "${CASROOT}" != "" ] && [ -d "${aScriptPath}/${CASROOT}" ]; then
|
||||
export CASROOT="${aScriptPath}/${CASROOT}"
|
||||
fi
|
||||
if [ "${CASROOT}" == "" ]; then
|
||||
export CASROOT="${aScriptPath}"
|
||||
fi
|
||||
|
||||
# Read script arguments
|
||||
shopt -s nocasematch
|
||||
for i in $*
|
||||
|
@@ -1,30 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <Standard_Version.hxx>
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION OCC_VERSION_MAJOR, OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE, 0
|
||||
PRODUCTVERSION OCC_VERSION_MAJOR, OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#endif
|
||||
FILEOS VOS_NT
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN BLOCK "040904E4" // Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4)
|
||||
BEGIN
|
||||
VALUE "FileDescription", "@PROJECT_NAME@ Toolkit\000"
|
||||
VALUE "FileVersion", OCC_VERSION_STRING_EXT "\000"
|
||||
VALUE "LegalCopyright", "\251 OPEN CASCADE SAS\000"
|
||||
VALUE "ProductName", "@PROJECT_NAME@\000"
|
||||
VALUE "ProductVersion", OCC_VERSION_STRING_EXT "\000"
|
||||
VALUE "OfficialSite", "www.opencascade.org\000"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 0x04E4
|
||||
END
|
||||
END
|
@@ -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;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -95,7 +95,7 @@
|
||||
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
@@ -107,7 +107,6 @@
|
||||
<OutputFile>.\..\..\..\win32\__VCVER__\bin\__TKNAM__.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\..\..\..\win32\__VCVER__\bin\__TKNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win32\__VCVER__\lib\__TKNAM__.lib</ImportLibrary>
|
||||
@@ -129,7 +128,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;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
|
||||
@@ -139,7 +138,7 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
||||
</ClCompile>
|
||||
@@ -174,7 +173,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;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -184,7 +183,7 @@
|
||||
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
@@ -196,7 +195,6 @@
|
||||
<OutputFile>.\..\..\..\win64\__VCVER__\bin\__TKNAM__.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\..\..\..\win64\__VCVER__\bin\__TKNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win64\__VCVER__\lib\__TKNAM__.lib</ImportLibrary>
|
||||
@@ -218,7 +216,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;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
|
||||
@@ -228,7 +226,7 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
||||
</ClCompile>
|
||||
|
@@ -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;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -95,7 +95,7 @@
|
||||
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
@@ -106,7 +106,6 @@
|
||||
<AdditionalDependencies>__TKDEP__;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\..\..\..\win32\__VCVER__\bin\__XQTNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win32\__VCVER__\lib\__XQTNAM__.lib</ImportLibrary>
|
||||
@@ -128,7 +127,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;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
|
||||
@@ -138,7 +137,7 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
||||
</ClCompile>
|
||||
@@ -172,7 +171,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;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -182,7 +181,7 @@
|
||||
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
@@ -193,7 +192,6 @@
|
||||
<AdditionalDependencies>__TKDEP__;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\..\..\..\win64\__VCVER__\bin\__XQTNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win64\__VCVER__\lib\__XQTNAM__.lib</ImportLibrary>
|
||||
@@ -215,7 +213,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;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
|
||||
@@ -225,7 +223,7 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
||||
</ClCompile>
|
||||
|
@@ -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;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -62,6 +62,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win32\vc8\obj\__TKNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
/>
|
||||
<Tool
|
||||
@@ -148,7 +149,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;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -162,6 +163,7 @@
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4996"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
/>
|
||||
<Tool
|
||||
@@ -249,7 +251,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;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -261,6 +263,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win64\vc8\obj\__TKNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -347,7 +350,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;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -361,6 +364,7 @@
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
|
@@ -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;$(CSF_DEFINES)__TKDEFS__;"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -60,6 +60,7 @@
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4996"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
/>
|
||||
<Tool
|
||||
@@ -145,7 +146,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;$(CSF_DEFINES)__TKDEFS__;"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -156,6 +157,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win32\vc8\obj\__XQTNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
/>
|
||||
<Tool
|
||||
@@ -240,7 +242,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;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -251,6 +253,7 @@
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -337,7 +340,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;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -348,6 +351,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win64\vc8\obj\__XQTNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
|
@@ -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;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -65,6 +65,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win32\vc9\obj\__TKNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -149,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;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -164,6 +165,7 @@
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -246,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;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -258,6 +260,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win64\vc9\obj\__TKNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -340,7 +343,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;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -354,6 +357,7 @@
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
|
@@ -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;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -64,6 +64,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win32\vc9\obj\__XQTNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -143,7 +144,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;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -155,6 +156,7 @@
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -236,7 +238,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;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -247,6 +249,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win64\vc9\obj\__XQTNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -327,7 +330,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;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -338,6 +341,7 @@
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
|
@@ -502,7 +502,7 @@ proc DefineExplicitRtti {hxxfile class base theSourceExtensions} {
|
||||
# try to find existing macro IMPLEMENT_STANDARD_RTTIEXT and check that
|
||||
# it is consistent
|
||||
foreach line $aFileContent {
|
||||
if { [regexp "^\\s*IMPLEMENT_STANDARD_RTTIEXT\\s*\\(\\s*$class\\s*,\\s*(\[A-Za-z0-9_\]+)\\s*\\)" $line res impl_base] } {
|
||||
if { [regexp {^\s*IMPLEMENT_STANDARD_RTTIEXT\s*\(\s*$class\s*,\s*([A-Za-z]+)\s*\)} $line res impl_base] } {
|
||||
# implementation is in place, just report warning if second argument
|
||||
# is different
|
||||
if { $base != $impl_base } {
|
||||
@@ -592,14 +592,13 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
|
||||
# find all instances of DEFINE_STANDARD_RTTI with single or two arguments
|
||||
set index 0
|
||||
set pattern_rtti {^(\s*DEFINE_STANDARD_RTTI)([_A-Z]+)?\s*\(\s*([A-Za-z_0-9,\s]+)\s*\)}
|
||||
set pattern_rtti {^(\s*DEFINE_STANDARD_RTTI)\s*\(\s*([A-Za-z_0-9,\s]+)\s*\)}
|
||||
while { [regexp -start $index -indices -lineanchor $pattern_rtti \
|
||||
$aProcessedFileContent location start suffix clist] } {
|
||||
$aProcessedFileContent location start clist] } {
|
||||
set index [lindex $location 1]
|
||||
|
||||
set start [eval string range \$aProcessedFileContent $start]
|
||||
set suffix [eval string range \$aProcessedFileContent $suffix]
|
||||
set clist [split [eval string range \$aProcessedFileContent $clist] ,]
|
||||
set start [eval string range \$aProcessedFileContent $start]
|
||||
set clist [split [eval string range \$aProcessedFileContent $clist] ,]
|
||||
|
||||
if { [llength $clist] == 1 } {
|
||||
set class [string trim [lindex $clist 0]]
|
||||
@@ -610,8 +609,12 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
logwarn "macro DEFINE_STANDARD_RTTI is changed assuming it inherits $inherits($class), please check!"
|
||||
}
|
||||
set change_flag 1
|
||||
# try to inject macro IMPLEMENT_STANDARD_RTTIEXT in the
|
||||
# corresponding source file (or check it already present),
|
||||
# and depending on this, use either inline or out-of-line variant
|
||||
set rtti_suffix [DefineExplicitRtti $aProcessedFile $class $inherits($class) $theSourceExtensions]
|
||||
ReplaceSubString aProcessedFileContent $location \
|
||||
"${start}EXT($class,$inherits($class))" index
|
||||
"${start}${rtti_suffix}($class,$inherits($class))" index
|
||||
}
|
||||
} else {
|
||||
logwarn "Error in $aProcessedFile: Macro DEFINE_STANDARD_RTTI used for class $class whose declaration is not found in this file, cannot fix"
|
||||
@@ -621,16 +624,14 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
set base [string trim [lindex $clist 1]]
|
||||
if { ! [info exists inherits($class)] } {
|
||||
logwarn "Warning in $aProcessedFile: Macro DEFINE_STANDARD_RTTI used for class $class whose declaration is not found in this file"
|
||||
} elseif { $base != $inherits($class) && ! [info exists inherits($class,multiple)] } {
|
||||
} elseif { $base != $inherits($class) } {
|
||||
logwarn "Warning in $aProcessedFile: Second argument in macro DEFINE_STANDARD_RTTI for class $class is $base while $class seems to inherit from $inherits($class)"
|
||||
if { ! [info exists inherits($class,multiple)] } {
|
||||
set base $inherits($class)
|
||||
}
|
||||
}
|
||||
# convert intermediate version of macro DEFINE_STANDARD_RTTI
|
||||
# with two arguments to either _INLINE or EXT variant
|
||||
if { ! $theCheckMode && "$suffix" == "" } {
|
||||
if { ! $theCheckMode } {
|
||||
set change_flag 1
|
||||
# try to inject macro IMPLEMENT_STANDARD_RTTIEXT in the
|
||||
# corresponding source file (or check it already present),
|
||||
# and depending on this, use either inline or out-of-line variant
|
||||
set rtti_suffix [DefineExplicitRtti $aProcessedFile $class $base $theSourceExtensions]
|
||||
ReplaceSubString aProcessedFileContent $location \
|
||||
"${start}${rtti_suffix}($class,$base)" index
|
||||
@@ -678,7 +679,7 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
|
||||
# find all uses of macro STANDARD_TYPE and method DownCast and ensure that
|
||||
# argument class is explicitly included
|
||||
set pattern_incbeg {\s*#\s*include\s*[\"<]\s*([A-Za-z0-9_/]*/)?}
|
||||
set pattern_incbeg {\s*#\s*include\s*[\"<]\s*}
|
||||
set pattern_incend {[.][a-zA-Z]+\s*[\">]}
|
||||
set index 0
|
||||
set addtype {}
|
||||
@@ -706,9 +707,7 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
if { ! $theCheckMode } {
|
||||
set addinc ""
|
||||
foreach type $addtype {
|
||||
if { "$aProcessedFileName" != "$type.hxx" } {
|
||||
append addinc "\n#include <$type.hxx>"
|
||||
}
|
||||
append addinc "\n#include <$type.hxx>"
|
||||
}
|
||||
if { [regexp -indices ".*\n${pattern_incbeg}\[A-Za-z0-9_/\]+${pattern_incend}" $aProcessedFileContent location] } {
|
||||
set change_flag 1
|
||||
@@ -735,7 +734,6 @@ proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} {
|
||||
|
||||
# iterate by header files
|
||||
foreach aHeader [glob -nocomplain -type f -directory $theTargetPath *.{$theExtensions}] {
|
||||
set aCurrentHeaderName [file tail $aHeader]
|
||||
|
||||
# skip gxx files, as names Handle_xxx used there are in most cases
|
||||
# placeholders of the argument types substituted by #define
|
||||
@@ -769,9 +767,8 @@ proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} {
|
||||
set anUpdatedHeaderContent {}
|
||||
set pattern_handle {\mHandle_([A-Za-z0-9_]+)}
|
||||
foreach line $aHeaderContent {
|
||||
# do not touch typedefs, #include, and #if... statements
|
||||
if { [regexp {^\s*typedef} $line] ||
|
||||
[regexp {^\s*\#\s*include} $line] || [regexp {^\s*\#\s*if} $line] } {
|
||||
# do not touch #include and #if... statements
|
||||
if { [regexp {\s*\#\s*include} $line] || [regexp {\s*\#\s*if} $line] } {
|
||||
lappend anUpdatedHeaderContent $line
|
||||
continue
|
||||
}
|
||||
@@ -851,8 +848,8 @@ proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} {
|
||||
} else {
|
||||
# replace by forward declaration of a class or its include unless
|
||||
# it is already declared or included
|
||||
if { ! [regexp "\#\\s*include\\s*\[\<\"\]\\s*(\[A-Za-z0-9_/\]*/)?$aForwardDeclHandledClass\[.\]hxx\\s*\[\>\"\]" $aHeaderContent] } {
|
||||
if { $isQObject && "$aCurrentHeaderName" != "${aForwardDeclHandledClass}.hxx" } {
|
||||
if { ! [regexp "^\s*\#\s*include\s*\[\<\"\]\s*$aForwardDeclHandledClass\s*\[\>\"\]" $aHeaderContent] } {
|
||||
if { $isQObject } {
|
||||
lappend anUpdatedHeaderContent "#include <${aForwardDeclHandledClass}.hxx>"
|
||||
if { ! [SearchForFile $theIncPaths ${aForwardDeclHandledClass}.hxx] } {
|
||||
loginfo "Warning: include ${aForwardDeclHandledClass}.hxx added in $aHeader, assuming it exists and defines Handle_$aForwardDeclHandledClass"
|
||||
@@ -1034,10 +1031,7 @@ proc ConvertCStyleHandleCast {pkpath theExtensions theCheckMode} {
|
||||
while { [regexp -start $index -indices -lineanchor $pattern_refcast0 $hxx location class var] } {
|
||||
set index [lindex $location 1]
|
||||
|
||||
set var [eval string range \$hxx $var]
|
||||
if { "$var" != "const" && "$var" != "Standard_OVERRIDE" } {
|
||||
logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]"
|
||||
}
|
||||
logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]"
|
||||
}
|
||||
|
||||
# replace const Handle(A)& a = Handle(B)::DownCast (b); by
|
||||
@@ -1160,16 +1154,24 @@ proc ReadFileToList {theFilePath theFileContent theFileEOL} {
|
||||
set aFileContent [read $aFile]
|
||||
close $aFile
|
||||
|
||||
# detect DOS end-of-lines
|
||||
if { [regexp "\r\n" $aFileContent] } {
|
||||
set aFileEOL "\r"
|
||||
if [regexp "\r\n" $aFileContent] {
|
||||
set aFileEOL "\r\n"
|
||||
set aList [split [regsub -all "\r\n" $aFileContent "\n"] "\r\n"]
|
||||
} else {
|
||||
# standard UNIX end-of-lines
|
||||
} elseif [regexp "\n" $aFileContent] {
|
||||
set aFileEOL "\n"
|
||||
set aList [split $aFileContent "\n"]
|
||||
}
|
||||
|
||||
# convert to unix eol
|
||||
if {"$aFileEOL" != "\n"} {
|
||||
regsub -all {$aFileEOL} $aFileContent "\n" aFileContent
|
||||
}
|
||||
|
||||
set aList [split $aFileContent "\n"]
|
||||
# set aList {}
|
||||
# foreach aLine [split $aFileContent "\n"] {
|
||||
# lappend aList [string trimright $aLine]
|
||||
# }
|
||||
|
||||
return $aList
|
||||
}
|
||||
|
||||
|
@@ -1,67 +0,0 @@
|
||||
// This is sample C++ file intended for testing and verifyig automatic upgrade
|
||||
// script. Copy it with extension .cxx and apply upgrade procedure to see
|
||||
// the result, as follows:
|
||||
// > upgrade.bat -src=./adm -inc=./src -recurse -all
|
||||
|
||||
// Include of Geom_Line.hxx and Geom_Plane.hxx should be added below
|
||||
#include <gp.hxx>
|
||||
|
||||
//========================================================================
|
||||
// OCCT 7.0
|
||||
//========================================================================
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Option -rtti
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// Should be replaced by <Standard_Type.hxx>
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
|
||||
class A_0
|
||||
{
|
||||
}
|
||||
|
||||
class B_1 :
|
||||
public A_0
|
||||
{
|
||||
// second argument "A_0" should be added
|
||||
DEFINE_STANDARD_RTTI(B_1)
|
||||
};
|
||||
|
||||
class C_2 : public Standard_Transient, B_1
|
||||
{
|
||||
// second argument "Standard_Transient" should be added
|
||||
DEFINE_STANDARD_RTTI(C_2)
|
||||
};
|
||||
|
||||
void for_rtti ()
|
||||
{
|
||||
Handle(Geom_Curve) aCurve = new Geom_Line (gp::Origin(), gp::DZ());
|
||||
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (aCurve);
|
||||
}
|
||||
|
||||
// should be removed
|
||||
IMPLEMENT_DOWNCAST(A)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(A, B)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Option -fwd
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// force safe mode used for Qt objects
|
||||
Q_OBJECT
|
||||
slots:
|
||||
|
||||
// these includes should be recognized as corresponding to forward declarations
|
||||
#include <occt/TColStd_HArray1OfReal.hxx>
|
||||
|
||||
// these declarations should be just removed
|
||||
class Handle(TColStd_HArray1OfReal);
|
||||
|
||||
// should be replaced by include of corresponding header
|
||||
class TColStd_Array1OfReal;
|
||||
class Handle(Geom_Curve);
|
||||
|
||||
// check that trailing spaces at the following line are preserved
|
||||
void ff();
|
||||
|
@@ -37,10 +37,12 @@ set (OCCT_CONFIG_FOR_DOXYGEN "${OCCT_GENERATED_DOC_DIR}/occt.cfg")
|
||||
|
||||
set (3RDPARTY_MATHJAX_RELATIVE_PATH "http://cdn.mathjax.org/mathjax/latest")
|
||||
|
||||
OCCT_VERSION (OCCT_SOURCE_VERSION)
|
||||
|
||||
configure_file ("${OCCT_OVERVIEW_RESOURCE_DIR}/occt_ug_html.doxyfile" "${OCCT_CONFIG_FOR_DOXYGEN}" COPYONLY)
|
||||
|
||||
# Add common options for generation of Overview and User Guides
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_NUMBER = ${OCC_VERSION_STRING_EXT}")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_NUMBER = ${OCCT_SOURCE_VERSION}")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nOUTPUT_DIRECTORY = ${OCCT_GENERATED_OVERVIEW_DIR}/.")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_LOGO = ${OCCT_OVERVIEW_DIR}/resources/occ_logo.png")
|
||||
|
||||
|
@@ -32,6 +32,9 @@ user_guides/ocaf/ocaf.md
|
||||
user_guides/tobj/tobj.md
|
||||
user_guides/draw_test_harness/draw_test_harness.md
|
||||
user_guides/brep_wp/brep_wp.md
|
||||
user_guides/ocaf_functionmechanism_wp/ocaf_functionmechanism_wp.md
|
||||
user_guides/ocaf_tree_wp/ocaf_tree_wp.md
|
||||
user_guides/ocaf_wp/ocaf_wp.md
|
||||
user_guides/vis/vis.md
|
||||
|
||||
dev_guides/dev_guides.md
|
||||
@@ -47,6 +50,8 @@ dev_guides/building/building.md
|
||||
dev_guides/building/3rdparty/3rdparty_windows.md
|
||||
dev_guides/building/3rdparty/3rdparty_linux.md
|
||||
dev_guides/building/3rdparty/3rdparty_osx.md
|
||||
dev_guides/building/wok/wok.md
|
||||
dev_guides/building/automake.md
|
||||
dev_guides/building/cmake/cmake.md
|
||||
dev_guides/building/android/android.md
|
||||
dev_guides/building/code_blocks.md
|
||||
|
@@ -12,6 +12,9 @@ user_guides/modeling_algos/modeling_algos.md
|
||||
user_guides/boolean_operations/boolean_operations.md
|
||||
user_guides/shape_healing/shape_healing.md
|
||||
user_guides/ocaf/ocaf.md
|
||||
user_guides/ocaf_functionmechanism_wp/ocaf_functionmechanism_wp.md
|
||||
user_guides/ocaf_tree_wp/ocaf_tree_wp.md
|
||||
user_guides/ocaf_wp/ocaf_wp.md
|
||||
user_guides/step/step.md
|
||||
user_guides/draw_test_harness/draw_test_harness.md
|
||||
user_guides/tobj/tobj.md
|
||||
|
@@ -10,7 +10,7 @@ products used by Open CASCADE Technology and samples on Linux platform.
|
||||
|
||||
The links for downloading the third-party products are available on the web site
|
||||
of OPEN CASCADE SAS at
|
||||
http://www.opencascade.com/content/3rd-party-components.
|
||||
http://www.opencascade.org/getocc/require/.
|
||||
|
||||
There are two types of third-party products, which are necessary to build OCCT:
|
||||
|
||||
|
@@ -8,7 +8,8 @@ This document presents additional guidelines for building third-party products
|
||||
used by Open CASCADE Technology and samples on Mac OS X platform (10.6.4 and later).
|
||||
|
||||
The links for downloading the third-party products are available
|
||||
on the web site of OPEN CASCADE SAS at http://www.opencascade.com/content/3rd-party-components.
|
||||
on the web site of OPEN CASCADE SAS at
|
||||
http://www.opencascade.org/getocc/require/</a>.
|
||||
|
||||
There are two types of third-party products, which are necessary to build OCCT:
|
||||
|
||||
|
@@ -8,17 +8,15 @@ This document presents guidelines for building third-party products used by Open
|
||||
|
||||
You need to use the same version of MS Visual Studio for building all third-party products and OCCT itself, in order to receive a consistent set of run-time binaries.
|
||||
|
||||
The links for downloading the third-party products are available on the web site of OPEN CASCADE SAS at http://www.opencascade.com/content/3rd-party-components.
|
||||
|
||||
There are two types of third-party products used by OCCT:
|
||||
The links for downloading the third-party products are available on the web site of OPEN CASCADE SAS at http://www.opencascade.org/getocc/require/. There are two types of third-party products used by OCCT:
|
||||
|
||||
* Mandatory products:
|
||||
* Tcl/Tk 8.5 -- 8.6;
|
||||
* FreeType 2.4.10 -- 2.5.3.
|
||||
* Tcl/Tk 8.5 - 8.6;
|
||||
* FreeType 2.4.10 - 2.5.3.
|
||||
* Optional products:
|
||||
* TBB 3.x -- 4.x;
|
||||
* gl2ps 1.3.5 -- 1.3.8;
|
||||
* FreeImage 3.14.1 -- 3.16.0;
|
||||
* TBB 3.x - 4.x;
|
||||
* gl2ps 1.3.5 - 1.3.8;
|
||||
* FreeImage 3.14.1 -3.16.0;
|
||||
* VTK 6.1.0.
|
||||
|
||||
It is recommended to create a separate new folder on your workstation, where you will unpack the downloaded archives of the third-party products, and where you will build these products (for example, *c:\\occ3rdparty*).
|
||||
@@ -170,9 +168,9 @@ You can download its sources from http://geuz.org/gl2ps/src/.
|
||||
As a result, you will get a folder named, for example, *3rdparty\\gl2ps-1.3.5-source*.
|
||||
|
||||
Rename it into <i>gl2ps-platform-compiler-building mode</i>, where
|
||||
* **platform** -- *win32* or *win64*;
|
||||
* **compiler** -- *vc8*, *vc9* or *vc10*;
|
||||
* **building mode** -- *opt* (for release) or *deb* (for debug).
|
||||
* **platform** is *win32* or *win64*;
|
||||
* **compiler** is *vc8*, *vc9* or *vc10*;
|
||||
* **building mode** - *opt* (for release) or *deb* (for debug).
|
||||
|
||||
For example, <i>gl2ps-win64-vc10-deb</i>
|
||||
|
||||
@@ -210,7 +208,7 @@ You can download its sources from http://geuz.org/gl2ps/src/.
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image004.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image004.png
|
||||
|
||||
* Select the generator (the compiler and the target platform -- 32 or 64 bit) in the pop-up window.
|
||||
* Select the generator (the compiler and the target platform - 32 or 64 bit) in the pop-up window.
|
||||
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image005.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image005.png
|
||||
|
Before Width: | Height: | Size: 48 KiB |
@@ -35,7 +35,7 @@ Select "MinGW MakeFiles" item from the list
|
||||
- Click "Finish"
|
||||
@figure{/dev_guides/building/android/images/android_image003.png}
|
||||
|
||||
If ANDROID_NDK environment variable is not defined in current OS, add cache entry ANDROID_NDK (entry type is PATH) -- path to the NDK folder ("Add Entry" button)
|
||||
If ANDROID_NDK environment variable is not defined in current OS, add cache entry ANDROID_NDK (entry type is PATH) - path to the NDK folder ("Add Entry" button)
|
||||
@figure{/dev_guides/building/android/images/android_image004.png}
|
||||
|
||||
If on Windows the message is appeared: "CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles"
|
||||
|
72
dox/dev_guides/building/automake.md
Normal file
@@ -0,0 +1,72 @@
|
||||
Building with Automake {#occt_dev_guides__building_automake}
|
||||
======================
|
||||
|
||||
This file describes steps to build OCCT libraries from a complete source
|
||||
archive on Linux with **Autotools** GNU build system.
|
||||
|
||||
If you build OCCT from bare sources (as in Git repository), or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See paragraph 1 \ref occt_dev_guides__building_wok for instructions.
|
||||
|
||||
Before building OCCT, you need to install the required third-party libraries; see paragraph 1 of
|
||||
\ref occt_dev_guides__building for instructions.
|
||||
|
||||
Note that during compilation by makefiles on Linux station with
|
||||
NVIDIA video card you may experience problems because the installation
|
||||
procedure of NVIDIA video driver removes library *libGL.so* included in package
|
||||
*libMesaGL* from directory <i>/usr/X11R6/lib</i> and places this library *libGL.so* in
|
||||
directory <i>/usr/lib</i>. However, *libtool* expects to find the library in directory
|
||||
<i>/usr/X11R6/lib</i>, which causes compilation crash (See <i>/usr/X11R6/lib/libGLU.la </i>).
|
||||
|
||||
To prevent this, it is suggested to make links:
|
||||
|
||||
|
||||
ln -s /usr/lib/libGL.so /usr/X11R6/lib/libGL.so
|
||||
ln -s /usr/lib/libGL.la /usr/X11R6/lib/libGL.la
|
||||
|
||||
|
||||
1.In OCCT root folder, launch *build_configure* script to generate files *configure* and *Makefile.in* for your system.
|
||||
|
||||
2.Go to the directory, where OCCT will be built, and run *configure* to generate makefiles.
|
||||
|
||||
|
||||
$CASROOT/configure \<FLAGS\>
|
||||
|
||||
Where <i> \<FLAGS\> </i> is a set of options.
|
||||
The following flags are mandatory:
|
||||
|
||||
* <i> --with-tcl= </i> defines the location of *tclConfig.sh*;
|
||||
* <i> --with-tk= </i> defines location of *tkConfig.sh*;
|
||||
* <i> --with-freetype= </i> defines location of installed **FreeType** product
|
||||
* <i> --prefix= </i> defines the location for installation of OCCT binaries
|
||||
|
||||
Additional flags:
|
||||
|
||||
* <i> --with-gl2ps= </i> defines the location of installed **gl2ps** product;
|
||||
* <i> --with-freeimage= </i> defines the location of installed **FreeImage** product;
|
||||
* <i> --with-tbb-include= </i> defines the location of *tbb.h*;
|
||||
* <i> --with-tbb-library= </i> defines the location of *libtbb.so*;
|
||||
* <i> --with-vtk-include= </i> defines the location of VTK includes;
|
||||
* <i> --with-vtk-library= </i> defines the location of VTK libraries;
|
||||
* <i> --enable-debug= yes: </i> includes debug information, no: does not include debug information;
|
||||
* <i> --enable-production= yes: </i> switches code optimization, no: switches off code optimization;
|
||||
* <i> --disable-draw </i> allows OCCT building without Draw.
|
||||
|
||||
If location of **FreeImage, TBB, gl2ps** or **VTK** is not specified, OCCT will be built without these optional libraries.
|
||||
|
||||
|
||||
Attention: 64-bit platforms are detected automatically.
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
\> ./configure -prefix=/PRODUCTS/occt-6.5.5 --with-tcl=/PRODUCTS/tcltk-8.5.8/lib --with-tk=/PRODUCTS/tcltk-8.5.8/lib --with-freetype=/PRODUCTS/freetype-2.4.10 --with-gl2ps=/PRODUCTS/gl2ps-1.3.5 --with-freeimage=/PRODUCTS/freeimage-3.14.1 --with-tbb-include=/PRODUCTS/tbb30_018oss/include --with-tbb-library=/PRODUCTS/tbb30_018oss/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21 -–with-vtk-include=/PRODUCTS/VTK-6.1.0/include/vtk-6.1 –with-vtk-library=/PRODUCTS/ /VTK-6.1.0//lib
|
||||
|
||||
|
||||
3.If configure exits successfully, you can build OCCT with *make* command.
|
||||
|
||||
\> make -j8 install
|
||||
|
||||
4.To start *DRAW*, launch
|
||||
|
||||
\> draw.sh
|
@@ -1,24 +1,25 @@
|
||||
Building OCCT from sources {#occt_dev_guides__building}
|
||||
=========
|
||||
|
||||
Before building OCCT, make sure to have all the required third-party libraries installed.
|
||||
The list of required libraries depends on what OCCT modules will be used, and your preferences.
|
||||
The typical minimum is **Freetype** (necessary for Visualization) and **Tcl/Tk** (for DRAW Test Harness).
|
||||
See "Third-party libraries" section in \ref OCCT_OVW_SECTION_5 "Overview" for a full list.
|
||||
In order to build OCCT libraries from these sources for use in your program,
|
||||
you need to:
|
||||
|
||||
On Windows, the easiest way to install third-party libraries is to download archive with pre-built binaries from http://www.opencascade.com/content/3rd-party-components.
|
||||
On Linux and OS X, it is recommended to use the version installed in the system natively.
|
||||
1. Make sure you have all required third-party libraries installed (check
|
||||
software requirements in \ref OCCT_OVW_SECTION_5 "Overview").
|
||||
|
||||
You can also build third-party libraries from their sources:
|
||||
* \subpage occt_dev_guides__building_3rdparty_windows
|
||||
* \subpage occt_dev_guides__building_3rdparty_linux
|
||||
* \subpage occt_dev_guides__building_3rdparty_osx
|
||||
See the following documents for short guide to installation of
|
||||
third-party libraries on different platforms:
|
||||
- \subpage occt_dev_guides__building_3rdparty_windows
|
||||
- \subpage occt_dev_guides__building_3rdparty_linux
|
||||
- \subpage occt_dev_guides__building_3rdparty_osx
|
||||
|
||||
Build OCCT using your preferred build tool.
|
||||
* \subpage occt_dev_guides__building_cmake "Building with CMake (cross-platform)"
|
||||
* \subpage occt_dev_guides__building_android "Building with CMake for Android (cross-platform)"
|
||||
* \subpage occt_dev_guides__building_msvc "Building on Windows with MS Visual Studio projects"
|
||||
* \subpage occt_dev_guides__building_code_blocks "Building on Mac OS X with Code::Blocks projects"
|
||||
* \subpage occt_dev_guides__building_xcode "Building on Mac OS X with Xcode projects"
|
||||
|
||||
2. Build using your preferred build tool.
|
||||
- \subpage occt_dev_guides__building_automake "Building on Linux with Autotools"
|
||||
- \subpage occt_dev_guides__building_cmake "Building with CMake (cross-platform)"
|
||||
- \subpage occt_dev_guides__building_android "Building with CMake for Android (cross-platform)"
|
||||
- \subpage occt_dev_guides__building_code_blocks "Building on Mac OS X with Code::Blocks"
|
||||
- \subpage occt_dev_guides__building_msvc "Building on Windows with MS Visual Studio"
|
||||
- \subpage occt_dev_guides__building_xcode "Building on Mac OS X with Xcode"
|
||||
|
||||
The current version of OCCT can be consulted in the file src/Standard/Standard_Version.hxx
|
@@ -3,23 +3,39 @@ Building with CMake {#occt_dev_guides__building_cmake}
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section build_cmake_intro General
|
||||
This article describes **CMake**-based build process which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources. *OCCT requires CMake version 3.0 or later*.
|
||||
|
||||
This article describes **CMake**-based build process which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources. *OCCT requires CMake version 2.8.12 or later*.
|
||||
**Note**: Comparing to the previous (6.x) releases of Open CASCADE Technology, OCCT 7.0 comes with a complete set of CMake scripts and projects, so that there is no need to use WOK anymore. Moreover, CMake gives you a powerful configuration tool which allows to control many aspects of OCCT deployment. At the same time this tool is quite intuitive which is a significant advantage over the legacy WOK utilities.
|
||||
|
||||
@note Comparing to the previous (6.x) releases of Open CASCADE Technology, OCCT 7.0 comes with a complete set of CMake scripts and projects, so that there is no need to use WOK anymore. Moreover, CMake gives you a powerful configuration tool which allows to control many aspects of OCCT deployment. At the same time this tool is quite intuitive which is a significant advantage over the legacy WOK utilities.
|
||||
**Note**: We discuss the build procedure on example of Windows platform. However, the workflow is almost the same for *nix and Mac operating systems.
|
||||
|
||||
Here we describe the build procedure on example of Windows platform with Visual Studio 2010.
|
||||
However, CMake is cross-platform and can be used to build OCCT on Linux and OS X in essentially the same way.
|
||||
All the examples in the article will be based on Windows x64 platform and Visual Studio 2010 solution will be the target IDE. The solution will be generated by CMake from the OCCT sources, the one will be built by an user and ready-to-go OCCT binaries will be deployed into a user specified directory by building *INSTALL* project.
|
||||
|
||||
@note Before you start, make sure to have installed all the 3-rd party products that you are going to use with OCCT; see @ref occt_dev_guides__building.
|
||||
You can get all the required 3-rd party products visiting [the official download page](http://www.opencascade.org/getocc/download/loadocc); see @ref occt_dev_guides__building for more detailed information also.
|
||||
|
||||
@section build_cmake_start Start CMake
|
||||
## Get sources
|
||||
|
||||
CMake is a tool that generates the actual project files for the selected target build system (e.g. Unix makefiles) or IDE (e.g. Visual Studio 2010).
|
||||
The sources of OCCT can be obtained from [the official development web-site](http://dev.opencascade.org) by either downloading the universal source package (available at [the official download page](http://www.opencascade.org/getocc/download/loadocc)) or by cloning the Git repository:
|
||||
|
||||
For unexpericnced users we recommend to start with *cmake-gui* -- cross-platform GUI tool provided by CMake on Windows, Mac and Linux.
|
||||
A command-line alternative, *ccmake* also can be used.
|
||||
git clone ssh://gitolite@git.dev.opencascade.org/occt occt
|
||||
|
||||
As a result, you obtain the following directory structure in your filesystem (d:\ name is used for example):
|
||||
|
||||
d:\occt\adm
|
||||
\data
|
||||
\dox
|
||||
\samples
|
||||
\src
|
||||
\tests
|
||||
...
|
||||
|
||||
The bare sources distribution contains not only the sources of Open CASCADE Technology, but also documentation, samples and non-regression test scripts.
|
||||
|
||||
## The usage of CMake
|
||||
|
||||
Now it is time to run a CMake tool which will generate the actual project files for the target IDE (e.g., Visual Studio 2010 solution).
|
||||
|
||||
It is recommended to use *cmake-gui* - cross-platform GUI tool provided by CMake on Windows, Mac and Linux. As a command-line alternative, *ccmake* also can be used.
|
||||
|
||||
CMake deals with three directories: source, build or binary and install.
|
||||
|
||||
@@ -27,17 +43,17 @@ CMake deals with three directories: source, build or binary and install.
|
||||
* The build or binary directory is where all the files created during CMake configuration and generation process will be located. The mentioned process will be described below.
|
||||
* The installation directory is where binaries will be installed after build the *INSTALL* project that is created by CMake generation process, along with header files and resources required for OCCT use in applications.
|
||||
|
||||
The good practice is not to use the source directory as a build one.
|
||||
Different configurations should be built in different build directories to avoid conflicts.
|
||||
It is however possible to choose one installation directory for several configurations of OCCT (differentiated by platform, bitness, compiler and build type), for example:
|
||||
|
||||
d:/occt/ -- the source directory
|
||||
d:/tmp/occt-build-vc10-x64 -- the build directory with the generated
|
||||
solution and other intermediate files created during a CMake tool working
|
||||
d:/occt-install -- the installation directory that is
|
||||
able to contain several OCCT configuratoion
|
||||
**Note**: It is possible to choose one installation directory for several configurations of OCCT (differentiated by platform, bitness, compiler and build type).
|
||||
|
||||
@section build_cmake_conf Configuration process
|
||||
**Note**: The good practice is not to mix up different build configurations in a single directory and not to use the source directory as a build one, for example:
|
||||
|
||||
d:/occt/ - the source directory
|
||||
d:/tmp/occt-build-vc10-x64 - the build directory with the generated
|
||||
solution and other intermediate files created during a CMake tool working
|
||||
d:/occt-install - the installation directory that is
|
||||
able to contain several OCCT configuratoion
|
||||
|
||||
## Configuration process
|
||||
|
||||
If the command-line tool is used, run the tool from the build directory with a single argument indicating the source (relative or absolute path) directory:
|
||||
|
||||
@@ -77,23 +93,22 @@ The following table enumerates the full list of environment variables used at co
|
||||
| CMAKE_BUILD_TYPE | String | Specifies the build type on single-configuration generators (sush as make). Possible values are Debug, Release and RelWithDebInfo |
|
||||
| USE_FREEIMAGE | Boolean flag | Indicates whether Freeimage product should be used in OCCT visualization module for support of popular graphics image formats (PNG, BMP etc) |
|
||||
| USE_GL2PS | Boolean flag | Indicates whether GL2PS product should be used in OCCT visualization module for support of vector image formats (PS, EPS etc) |
|
||||
| USE_TBB | Boolean flag | Indicates whether TBB 3rd party is used or not. TBB stands for Threading Building Blocks, the technology of Intel Corp, which comes with different mechanisms and patterns for injecting parallelism into your application. OCCT remains parallel even without TBB product |
|
||||
| USE_VTK | Boolean flag | Indicates whether VTK 3rd party is used or not. VTK stands for Visualization ToolKit, the technology of Kitware Inc intended for general-purpose scientific visualization. OCCT comes with a bridge between CAD data representation and VTK by means of its dedicated VIS component (VTK Integration Services). You may skip this 3rd party unless you are planning to use VTK visualization for OCCT geometry. The official documentation @ref occt_user_guides__vis for the details on VIS |
|
||||
| 3RDPARTY_DIR | Path | Defines the root directory where all required 3rd party products will be searched. Once you define this path it is very convenient to click "Configure" button in order to let CMake automatically detect all necessary products|
|
||||
| USE_TBB | Boolean flag | Indicates whether TBB 3-rd party is used or not. TBB stands for Threading Building Blocks, the technology of Intel Corp, which comes with different mechanisms and patterns for injecting parallelism into your application. OCCT remains parallel even without TBB product |
|
||||
| USE_VTK | Boolean flag | Indicates whether VTK 3-rd party is used or not. VTK stands for Visualization ToolKit, the technology of Kitware Inc intended for general-purpose scientific visualization. OCCT comes with a bridge between CAD data representation and VTK by means of its dedicated VIS component (VTK Integration Services). You may skip this 3-rd party unless you are planning to use VTK visualization for OCCT geometry. The official documentation @ref occt_user_guides__vis for the details on VIS |
|
||||
| 3RDPARTY_DIR | Path | Defines the root directory where all required 3-rd party products will be searched. Once you define this path it is very convenient to click "Configure" button in order to let CMake automatically detect all necessary products|
|
||||
| 3RDPARTY_FREETYPE_* | Path | Path to Freetype binaries |
|
||||
| 3RDPARTY_TCL_* 3RDPARTY_TK_* | Path | Path to Tcl/Tk binaries |
|
||||
| 3RDPARTY_FREEIMAGE* | Path | Path to Freeimage binaries |
|
||||
| 3RDPARTY_GL2PS_* | Path | Path to GL2PS binaries |
|
||||
| 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_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 occt_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 for use when linking other targets |
|
||||
| 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 options leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
|
||||
| REBUILD_PLATFORM_DEPENDENT_CODE | 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 options leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
|
||||
| BUILD_MODULE_OcctMfcSamples | Boolean flag | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms |
|
||||
| BUILD_DOC_OcctOverview | Boolean flag | Indicates whether OCCT overview documentation project should be created together with OCCT. It is not built together with OCCT. Checking this options leads to automatic search of Doxygen binaries. Building of it will be call Doxygen command to generate the documentation in HTML format |
|
||||
| BUILD_PATCH | Path | Points to the directory recognized as a "patch" for OCCT. If specified, the files from this directory take precedence over the corresponding native OCCT sources. This way you are able to introduce patches to Open CASCADE Technology not affecting the original source distribution |
|
||||
| BUILD_WITH_DEBUG | Boolean flag | Enables extended messages of many OCCT algorithms, usually printed to cout. These include messages on internal errors and special cases encountered, timing etc |
|
||||
| APPLY_OCCT_PATH_DIR | Boolean flag | 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 |
|
||||
| CMAKE_CONFIGURATION_TYPES | String | Semicolon-separated CMake configurations |
|
||||
| INSTALL_DIR | Path | Points to the installation directory |
|
||||
| INSTALL_FREETYPE | Boolean flag | Indicates whether Freetype binaries should be installed into the installation directory |
|
||||
@@ -102,24 +117,24 @@ The following table enumerates the full list of environment variables used at co
|
||||
| INSTALL_TBB | Boolean flag | Indicates whether TBB binaries should be installed into the installation directory |
|
||||
| INSTALL_VTK | Boolean flag | Indicates whether VTK binaries should be installed into the installation directory |
|
||||
| INSTALL_TCL | Boolean flag | Indicates whether TCL binaries should be installed into the installation directory |
|
||||
| INSTALL_TEST_CASES | Boolean flag | Indicates whether non-regression OCCT test scripts should be installed into the installation directory |
|
||||
| INSTALL_SAMPLES | Boolean flag | Indicates whether OCCT samples should be installed into the installation directory |
|
||||
| INSTALL_OCCT_TEST_CASES | Boolean flag | Indicates whether non-regression OCCT test scripts should be installed into the installation directory |
|
||||
| INSTALL_OCCT_SAMPLES | Boolean flag | Indicates whether OCCT samples should be installed into the installation directory |
|
||||
| INSTALL_DOC_OcctOverview | Boolean flag | Indicates whether OCCT overview documentation should be installed into the installation directory |
|
||||
|
||||
**Note:** In those CMake options defining paths only the forward slashes ("/") are acceptable.
|
||||
|
||||
@section build_cmake_3rdparty 3rd party search mechanism
|
||||
### 3rd-party search mechanism (The variables with <i>3RDPARTY_</i> prefix)
|
||||
|
||||
If *3RDPARTY_DIR* directory is defined, then required 3rd party binaries are sought in it, and default system folders are ignored.
|
||||
If *3RDPARTY_DIR* directory is defined, required 3rd-party binaries are sought in it, default system folders are ignored.
|
||||
|
||||
The procedure expects to find binary and header files of each 3rd party product in its own sub-directory: *bin*, *lib* and *include*.
|
||||
The procedure expects to find binary and header files of each 3rd-party product in its own sub-directory: *bin*, *lib* and *include*.
|
||||
|
||||
The result of the search (achived on the next pass of the configuration process) are recorded in the corresponding variables:
|
||||
|
||||
* *3RDPARTY_\<PRODUCT\>_DIR* -- path to the 3rdparty directory (with directory name) (e.g. <i>D:/3rdparty/tcltk-86-32</i>)
|
||||
* *3RDPARTY_\<PRODUCT\>_LIBRARY_DIR* -- path to the directory containing a library (e.g. <i>D:/3rdparty/tcltk-86-32/lib</i>).
|
||||
* *3RDPARTY_\<PRODUCT\>_INCLUDE_DIR* -- path to the directory containing a header file (e.g., <i>D:/3rdparty/tcltk-86-32/include</i>)
|
||||
* *3RDPARTY_\<PRODUCT\>_DLL_DIR* -- path to the directory containing a shared library (e.g., <i>D:/3rdparty/tcltk-86-32/bin</i>) This variable is only relevant to Windows platforms.
|
||||
* *3RDPARTY_\<PRODUCT\>_DIR* - path to the 3rdparty directory (with directory name) (e.g. <i>D:/3rdparty/tcltk-86-32</i>)
|
||||
* *3RDPARTY_\<PRODUCT\>_LIBRARY_DIR* - path to directory containing a library (e.g. <i>D:/3rdparty/tcltk-86-32/lib</i>).
|
||||
* *3RDPARTY_\<PRODUCT\>_INCLUDE_DIR* - path to the directory containing a header file (e.g., <i>D:/3rdparty/tcltk-86-32/include</i>)
|
||||
* *3RDPARTY_\<PRODUCT\>_DLL_DIR* - path to the directory containing a shared library (e.g., <i>D:/3rdparty/tcltk-86-32/bin</i>) This variable is only relevant to Windows platforms
|
||||
|
||||
Note: each library and include directory should be the children of product directory if the last one is defined.
|
||||
|
||||
@@ -151,11 +166,11 @@ During the configuration process the related variables (*3RDPARTY_FREETYPE_DLL_D
|
||||
|
||||
**Note**: The names of searched libraries and header files are hard-coded. If there is the need to change their names, change appropriate cmake variables (edit CMakeCache.txt file or edit in cmake-gui in advance mode) without reconfiguration: *3RDPARTY_\<PRODUCT\>_INCLUDE* for include, *3RDPARTY_\<PRODUCT\>_LIB* for library and *3RDPARTY_\<PRODUCT\>_DLL* for shared library.
|
||||
|
||||
@section build_cmake_gen Projects generation
|
||||
### OCCT Generation
|
||||
|
||||
Once the configuration process is done, "Generate" button is used to prepare project files for the target IDE. In our exercise the Visual Studio solution will be automatically created in the buid directory.
|
||||
|
||||
@section build_cmake_build Building
|
||||
### OCCT Building
|
||||
|
||||
Go to the build folder, start the Visual Studio solution *OCCT.sln* and build it by clicking **Build -> Build Solution**.
|
||||
|
||||
@@ -169,7 +184,7 @@ When the building process is finished build:
|
||||
|
||||
For this, right-click on the *Overview/INSTALL* project and select **Project Only -> Build Only** -> *Overview/INSTALL* in the solution explorer.
|
||||
|
||||
@section build_cmake_install Installation
|
||||
## Installation process
|
||||
|
||||
Installation is a process of extracting redistributable resources (binaries,include files etc) from the build directory into the installation one. The installation directory will be free of project files, intermediate object files and any other information related to the build routines.
|
||||
|
||||
@@ -177,14 +192,14 @@ Normally you use the installation directory of OCCT to link against your specifi
|
||||
|
||||
the directory structure is follow:
|
||||
|
||||
data -- data files for OCCT (brep, iges, stp)
|
||||
doc -- OCCT overview documentation in HTML format
|
||||
inc -- header files
|
||||
samples -- samples
|
||||
src -- all required source files for OCCT
|
||||
tests -- OCCT test suite
|
||||
win32\vc10\bind -- binary files (installed 3rdparties and occt)
|
||||
\libd -- libraries (installed 3rdparties and occt)
|
||||
data - data files for OCCT (brep, iges, stp)
|
||||
doc - OCCT overview documentation in HTML format
|
||||
inc - header files
|
||||
samples - samples
|
||||
src - all required source files for OCCT
|
||||
tests - OCCT test suite
|
||||
win32\vc10\bind - binary files (installed 3rdparties and occt)
|
||||
\libd - libraries (installed 3rdparties and occt)
|
||||
|
||||
**Note:** The above example is given for debug configuration. However, it is generally safe to use the same installation directory for the release build. In the latter case the contents of install directory will be enriched with subdirectories and files related to the release configuration. In particular, the binaries directory win64 will be expanded as
|
||||
follows:
|
||||
@@ -194,6 +209,6 @@ follows:
|
||||
\bin
|
||||
\lib
|
||||
|
||||
If CMake installation flags are enabled for the 3rd party products (e.g. INSTALL_FREETYPE), then the corresponding binaries will be copied to the same bin(d) and lib(d) directories together with the native binaries of OCCT. Such organization of libraries can be especially helpful if your OCCT-based software does not use itself the 3rd parties of Open CASCADE Technology (thus, there is no sense to pack them into dedicated directories)
|
||||
If CMake installation flags are enabled for the 3-rd party products (e.g. INSTALL_FREETYPE), then the corresponding binaries will be copied to the same bin(d) and lib(d) directories together with the native binaries of OCCT. Such organization of libraries can be especially helpful if your OCCT-based software does not use itself the 3-rd parties of Open CASCADE Technology (thus, there is no sense to pack them into dedicated directories)
|
||||
|
||||
The installation folder contains the scripts to run *DRAWEXE* (*draw.bat* or *draw.sh*), samples (if its were installed) and overview.html (short-cut for installed OCCT overview documentation).
|
||||
|
@@ -1,58 +1,70 @@
|
||||
Building with Code::Blocks {#occt_dev_guides__building_code_blocks}
|
||||
==========================
|
||||
Building with Code::Blocks on Mac OS X {#occt_dev_guides__building_code_blocks}
|
||||
======================================
|
||||
|
||||
@tableofcontents
|
||||
This file describes steps to build OCCT libraries from a complete source package
|
||||
on Mac OS X with **Code::Blocks**.
|
||||
|
||||
@section build_codeblocks_intro General
|
||||
If you build OCCT from bare sources (as in Git repository) or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
|
||||
|
||||
This file describes steps to build OCCT libraries from sources using **Code::Blocks**, a cross-platform IDE, using project files generated by OCCT legacy tool **genproj**.
|
||||
It can be an alternative to use of CMake build system (see @ref occt_dev_guides__building_cmake) for all supported platforms.
|
||||
Before building OCCT, you need to install the required third-party libraries; see
|
||||
paragraph 1 of \ref occt_dev_guides__building for details.
|
||||
|
||||
@section build_codeblocks_3rdparty Third-party libraries
|
||||
1. Add paths to the mandatory 3rd-party products (**Tcl/Tk** and **FreeType**) in file
|
||||
*custom.sh* located in <i>\<OCCT_ROOT_DIR\></i>. For this:
|
||||
|
||||
Before building OCCT, make sure to have all the needed third-party libraries installed, see @ref occt_dev_guides__building.
|
||||
1.1. Add paths to the includes in variable *CSF_OPT_INC*;
|
||||
|
||||
@section build_codeblocks_conf Configuration
|
||||
1.2. Add paths to the binary libraries in variable *CSF_OPT_LIB64*;
|
||||
|
||||
All paths should be separated by ":" symbol.
|
||||
|
||||
Before building it is necessary to set up build environment.
|
||||
2. Add paths to the optional 3rd-party libraries (**TBB, gl2ps** and **FreeImage**)
|
||||
in the aforementioned environment variables *CSF_OPT_INC* and
|
||||
*CSF_OPT_LIB64* from file *custom.sh*.
|
||||
|
||||
The environment is defined in the file *custom.sh* (on Linux and OS X) or *custom.bat* (on Windows) which can be edited directly:
|
||||
If you want to build OCCT without the optional libraries perform the
|
||||
following steps:
|
||||
|
||||
* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC*.
|
||||
* Add paths to their binary libraries in variable *CSF_OPT_LIB64*.
|
||||
* Set variable *SHORTCUT_HEADERS* to "true" to have folder *inc* populated by short-cut files pointing to actual headers located in *src*; otherwise, header files will be copied to *inc*.
|
||||
* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
|
||||
~~~~~
|
||||
export HAVE_GL2PS=false
|
||||
2.1 Disable unnecessary library in custom.sh by setting the corresponding
|
||||
variable <i>HAVE_\<LIBRARY_NAME\></i> to *false*.
|
||||
|
||||
~~~~~
|
||||
export HAVE_GL2PS=false
|
||||
~~~~~
|
||||
|
||||
Alternatively, or when *custom.sh* or *custom.bat* does not exist, you can launch **genconf** tool to configure environment interactively:
|
||||
2.2 Remove this library from Linker settings in **Code::Blocks** for each project
|
||||
that uses it: right click on the required project, choose **Build options**,
|
||||
go to **Linker settings** tab in the opened window , select unnecessary
|
||||
libraries and click **Delete** button.
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/genconf_linux.png}
|
||||
3. Open Terminal application
|
||||
|
||||
Click "Save" to store the specified configuration in *custom.sh* or *custom.bat* file.
|
||||
|
||||
@section build_codeblocks_gen Projects generation
|
||||
|
||||
Launch **genproj** tool with option *-target=cbp* to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files:
|
||||
4. Enter <i> \<OCCT_ROOT_DIR\></i>:
|
||||
|
||||
~~~~~
|
||||
$ cd /dev/OCCT/opencascade-7.0.0
|
||||
$ ./genproj.sh -target=cbp
|
||||
cd \<OCCT_ROOT_DIR\>
|
||||
~~~~~
|
||||
|
||||
The generated Code::Blocks project are placed into subfolder *adm/<OS>/cbp*.
|
||||
5. To start **Code::Blocks**, run the command <i>/codeblocks.sh</i>
|
||||
|
||||
@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
|
||||
6. To build all toolkits, click **Build->Build workspace** in the menu bar.
|
||||
|
||||
@section build_codeblocks_build Building
|
||||
|
||||
To start **Code::Blocks**, launch script *codeblocks.sh*.
|
||||
To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, perform
|
||||
the following steps:
|
||||
|
||||
To build all toolkits, click **Build->Build workspace** in the menu bar.
|
||||
1.Open Terminal application
|
||||
|
||||
To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, run the script
|
||||
2.Enter <i>\<OCCT_ROOT_DIR\></i>:
|
||||
|
||||
~~~~~
|
||||
cd \<OCCT_ROOT_DIR\>
|
||||
~~~~~
|
||||
|
||||
3.Run the script
|
||||
~~~~~
|
||||
./draw_cbp.sh cbp [d]
|
||||
~~~~~
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
||||
|
@@ -1,68 +1,35 @@
|
||||
Building with MS Visual C++ {#occt_dev_guides__building_msvc}
|
||||
===========================
|
||||
|
||||
@tableofcontents
|
||||
This file describes steps to build OCCT libraries from a complete source
|
||||
archive on Windows with <b>MS Visual C++</b>.
|
||||
|
||||
@section build_msvc_intro General
|
||||
If you build OCCT from bare sources (as in Git repository) or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
|
||||
|
||||
This page describes steps to build OCCT libraries from a complete source archive on Windows with <b>MS Visual C++</b> using projects generated by **genproj** tool.
|
||||
It is an alternative to use of CMake build system (see @ref occt_dev_guides__building_cmake).
|
||||
Before building OCCT, you need to install the required third-party libraries; see
|
||||
paragraph 1 of \ref occt_dev_guides__building for instructions.
|
||||
|
||||
**genproj** is a legacy tool (originated from command "wgenproj" in WOK) for generation of Visual Studio, Code.Blocks, and XCode project files used for building Open CASCADE Technology.
|
||||
These project files are placed inside OCCT directory (in *adm* subfolder) and use relative paths, thus can be moved together with sources.
|
||||
1. Edit file *custom.bat* to define the environment:
|
||||
|
||||
The project files included in official distribution of OCCT are generated by this tool.
|
||||
If you have official distribution with project files included, you can use them directly without a need to call **genproj**.
|
||||
- *VCVER* - version of Visual Studio (vc8, vc9, vc10, vc11 or vc12),
|
||||
and relevant *VCVARS* path
|
||||
- *ARCH* - architecture (32 or 64), affects only *PATH* variable for execution
|
||||
- <i>HAVE_*</i> - flags to enable or disable use of optional third-party products
|
||||
- CSF_OPT_* - paths to search for includes and binaries of all used
|
||||
third-party products
|
||||
|
||||
@section build_msvc_3rdparty Third-party libraries
|
||||
2. Launch *msvc.bat* to start Visual Studio with all necessary environment
|
||||
variables defined.
|
||||
|
||||
Before building OCCT, make sure to have all the required third-party libraries installed.
|
||||
Note: the MSVC project files are located in folders <i>adm\\msvc\\vc[9-12]</i>.
|
||||
Binaries are produced in *win32* or *win64* folders.
|
||||
|
||||
The easiest way to install third-party libraries is to download archive with pre-built binaries, corresponding to version of Visual Studio you are using, from http://www.opencascade.com/content/3rd-party-components.
|
||||
3. Build with Visual Studio
|
||||
|
||||
You can also build third-party libraries from their sources, see @ref occt_dev_guides__building_3rdparty_windows for instructions.
|
||||
|
||||
@section build_msvc_conf Configuration
|
||||
|
||||
If you have Visual Studio projects already available (pre-installed or generated), you can edit file *custom.bat* manually to adjust the environment:
|
||||
|
||||
* *VCVER* -- version of Visual Studio (vc10, vc11, vc12, or vc14), and relevant *VCVARS* path
|
||||
* *ARCH* -- architecture (32 or 64), affects only *PATH* variable for execution
|
||||
* <i>HAVE_*</i> -- flags to enable or disable use of optional third-party products
|
||||
* <i>CSF_OPT_*</i> -- paths to search for includes and binaries of all used third-party products
|
||||
* *SHORTCUT_HEADERS* -- if set to "true", folder *inc* will be populated by short-cut files pointing to actual headers located in *src*; otherwise, header files will be copied to *inc*.
|
||||
|
||||
Alternatively, you can launch **genconf**, a GUI tool allowing to configure build options interactively.
|
||||
That tool will analyze your environment and propose you to choose available options:
|
||||
|
||||
* Version of Visual Studio to be used (from the list of installed ones, detected by presence of environment variables like *VS100COMNTOOLS*)
|
||||
* Option to use short-cuts to header files in folder *inc* (enabled by default).
|
||||
* Location of third-party libraries (usually downloaded from OCCT web site, see above).
|
||||
* Path to common directory where third-party libraries are located (optional)
|
||||
* Paths to headers and binaries of the third-party libraries (found automatically basing on previous options; click button "Reset" to update).
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/genconf_windows.png}
|
||||
|
||||
Click "Save" to store the specified configuration in *custom.bat* file.
|
||||
|
||||
@section build_msvc_generate Projects generation
|
||||
|
||||
Launch **genproj** to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files.
|
||||
|
||||
@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
|
||||
If Tcl is not found, the tool may prompt you to enter the path to directory where Tcl can be found.
|
||||
|
||||
~~~~~
|
||||
$ genproj.bat
|
||||
~~~~~
|
||||
|
||||
Note that if *custom.bat* is not present, **genproj** will start **genconf** to configure environment.
|
||||
|
||||
@section build_msvc_build Building
|
||||
|
||||
Launch *msvc.bat* to start Visual Studio with all necessary environment variables defined, and build the whole solution or required toolkits.
|
||||
|
||||
Note: the MSVC project files are located in folders <i>adm\\msvc\\vc...</i>.
|
||||
Binaries are produced in *win32* or *win64* folders.
|
||||
Note: If VTK was not installed on you computer and you are not interested in usage of
|
||||
OCCT VTK Integration Services (VIS) component you should exclude TKIVtk and TKIVtkDraw
|
||||
projects from process of compilation in the main menu <b>Build / Configuration Manager</b>.
|
||||
|
||||
To start DRAW, launch *draw.bat*.
|
||||
|
BIN
dox/dev_guides/building/wok/images/wok_image001.png
Normal file
After Width: | Height: | Size: 168 KiB |
BIN
dox/dev_guides/building/wok/images/wok_image002.png
Normal file
After Width: | Height: | Size: 270 KiB |
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 157 KiB |
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 194 KiB |
162
dox/dev_guides/building/wok/wok.md
Normal file
@@ -0,0 +1,162 @@
|
||||
Using WOK {#occt_dev_guides__building_wok}
|
||||
=========
|
||||
|
||||
@tableofcontents
|
||||
|
||||
\ref occt_dev_guides__wok "WOK" is a legacy build environment for Open CASCADE Technology.
|
||||
It is required for generation of header files for classes defined with
|
||||
@ref occt_dev_guides__cdl "CDL" ("Cascade Definition Language").
|
||||
Also tools for generation of project files for other build systems, and OCCT
|
||||
documentation, are integrated to WOK.
|
||||
|
||||
WOK thus is needed in the following situations:
|
||||
- Building from OCCT sources from Git repository (do not contain generated files)
|
||||
- Building after some changes made in CDL files
|
||||
|
||||
Before installing and using WOK, make sure that you have installed a compiler
|
||||
(it is assumed that it is Visual Studio on Windows or gcc on Linux and MacOS)
|
||||
and third-party components required for building OCCT.
|
||||
|
||||
@section wok1 Installing WOK
|
||||
|
||||
Download the latest version of binary distribution WOK from http://dev.opencascade.org/index.php?q=home/resources
|
||||
|
||||
@subsection wok11 Windows
|
||||
|
||||
Run the installer. You will be prompted to read and accept the OCCT Public License to proceed:
|
||||
|
||||
@image html /dev_guides/building/wok/images/wok_image001.png
|
||||
@image latex /dev_guides/building/wok/images/wok_image001.png
|
||||
|
||||
Click **Next** and proceed with the installation.
|
||||
At the end of the installation you will be prompted to specify the version and the location of Visual Studio to be used, and the location of third-party libraries:
|
||||
|
||||
@image html /dev_guides/building/wok/images/wok_image002.png
|
||||
@image latex /dev_guides/building/wok/images/wok_image002.png
|
||||
|
||||
You can change these settings at any time later. For this click on the item **Customize environment (GUI tool)** in the WOK group in the Windows Start menu.
|
||||
|
||||
The shortcuts from this group provide two ways to run WOK:
|
||||
* In command prompt window using option *WOK TCL shell*.
|
||||
* In Emacs editor using option *WOK Emacs*. Using Emacs is convenient if you need to work within WOK environment.
|
||||
|
||||
By default WOK installer creates a WOK factory with name *LOC* within workshop *dev*. I.e. the WOK path is <i>:LOC:dev</i>.
|
||||
|
||||
@subsection wok12 Linux
|
||||
|
||||
* Unpack the .tgz archive containing WOK distributive into the installation directory <i>\<WOK_INSTALL_DIR\></i>.
|
||||
|
||||
* Perform the following commands assuming that you have unpacked WOK distributive archive into <i>\<WOK_INSTALL_DIR\></i>:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_confgui.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Define all necessary paths to third-party products in the dialog window:
|
||||
|
||||
@image html /dev_guides/building/wok/images/wok_image003.png
|
||||
@image latex /dev_guides/building/wok/images/wok_image003.png
|
||||
|
||||
* Run the following commands to create WOK LOC factory:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_init.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Your installation procedure is over. To run WOK use one the following commands:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_emacs.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
or
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_tclsh.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@subsection wok13 Mac OS X
|
||||
|
||||
* Double click on file *wokSetup.dmg* in the Finder. This opens a new window. Drag and drop *wokSetup* folder from this window at the location in the Finder where you want to install WOK, i.e. <i>\<WOK_INSTALL_DIR\></i>.
|
||||
|
||||
* Browse to the folder <i>\<WOK_INSTALL_DIR\>/site</i> and double click on *WokConfig*. This opens a window with additional search path settings. Define all necessary paths to third-party products in the dialog window:
|
||||
|
||||
@image html /dev_guides/building/wok/images/wok_image004.png
|
||||
@image latex /dev_guides/building/wok/images/wok_image004.png
|
||||
|
||||
* Run the following commands to create WOK LOC factory:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_init.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Your installation procedure is over. To run WOK in Emacs navigate in the Finder to the folder <i>\<WOK_INSTALL_DIR\>/site</i> and double click on *WokEmacs*.
|
||||
|
||||
|
||||
@section wok2 Initialization of Workbench
|
||||
|
||||
To start working with OCCT, clone the OCCT Git repository from the server (see http://dev.opencascade.org/index.php?q=home/resources for details) or unpack the source archive.
|
||||
|
||||
Then create a WOK workbench (command *wcreate*) setting its Home to the directory, where the repository is created (<i>$CASROOT</i> variable). The workbench should have the same name as that directory.
|
||||
|
||||
For example, assuming that OCCT repository has been cloned into *D:/occt* folder:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
LOC:dev> wcreate occt -DHome=D:/occt
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Note that <i>$CASROOT</i> is equal to *D:/occt* now.
|
||||
|
||||
Then you can work with this workbench using normal WOK functionality (*wprocess, umake*, etc.; see @ref occt_dev_guides__wok "WOK User's Guide" for details) or use it only for generation of derived sources and project files, and build OCCT with Visual Studio on Windows or *make* command on Linux, as described below.
|
||||
|
||||
@section wok3 Generation of building projects
|
||||
|
||||
Use command *wgenproj* in WOK to generate derived headers, source and building projects files:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
LOC:dev> wokcd occt
|
||||
LOC:dev:occt> wgenproj [ -target=<TARGET> ] [ -no_wprocess ]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
TARGET:
|
||||
* *vc8* - Visual Studio 2005;
|
||||
* *vc9* - Visual Studio 2008;
|
||||
* *vc10* - Visual Studio 2010;
|
||||
* *vc11* - Visual Studio 2012;
|
||||
* *cbp* - CodeBlocks;
|
||||
* *cmake* - CMake;
|
||||
* *amk* - AutoMake;
|
||||
* *xcd* - Xcode;
|
||||
* <i>-no_wprocess</i> option skips generation of derived headers and source files.
|
||||
|
||||
Note that this command takes several minutes to complete at the first call.
|
||||
|
||||
Re-execute this step to generate derived headers, source and building projects files if some CDL files in OCCT have been modified (either by you directly, or due to updates in the repository). Note that in some cases WOK may fail to update correctly; in such case remove sub-directories *drv* and <i>.adm</i> and repeat the command.
|
||||
|
||||
To regenerate derived headers and source files without regeneration of projects use command:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
LOC:dev> wokcd occt
|
||||
LOC:dev:occt> wprocess -DGroups=Src,Xcpp
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The generated building project has been placed into <i>$CASROOT/adm</i> folder:
|
||||
* for vc8 - <i>$CASROOT/adm/msvc/vc8</i>;
|
||||
* for vc9 - <i>$CASROOT/adm/msvc/vc9</i>;
|
||||
* for vc10 - <i>$CASROOT/adm/msvc/vc10</i>;
|
||||
* for vc11 - <i>$CASROOT/adm/msvc/vc11</i>;
|
||||
* for cbp - <i>$CASROOT/adm/\<OS\>/cbp</i>;
|
||||
* for cmake - <i>$CASROOT/adm/cmake</i>;
|
||||
* for amk - <i>$CASROOT/adm/lin/amk</i>;
|
||||
* xcd - <i>$CASROOT/adm/\<OS\>/xcd</i>
|
||||
|
||||
@section wok4 Generation of documentation
|
||||
|
||||
Use command *wgendoc* in WOK to generate reference documentation:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
:LOC:dev> wokcd occt
|
||||
:LOC:dev:occt> wgendoc
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The following options can be used:
|
||||
* <i>-wb=\<workbench name\></i> the name of OCCT workbench (the current one by default);
|
||||
* <i>-m=\<list of modules\></i> the list of modules that will be contained in the documentation;
|
||||
* <i>-outdir=\<path\></i> the output directory for the documentation;
|
||||
* <i>-chm</i> the option to generate CHM file;
|
||||
* <i>-hhc=\<path\></i> the path to HTML Help Compiler *hhc.exe* or equivalent;
|
||||
* <i>-qthelp=\<path\></i> the option to generate Qt Help file, where <i>\<path\></i> is the required path to *qthelpgenerator* executable;
|
||||
* <i>-doxygen=\<path\></i> the path to Doxygen executable;
|
||||
* <i>-dot=\<path\></i> the path to GraphViz dot executable.
|
@@ -1,65 +1,58 @@
|
||||
Building with Xcode {#occt_dev_guides__building_xcode}
|
||||
===================
|
||||
|
||||
@tableofcontents
|
||||
This file describes steps to build OCCT libraries from a complete source package
|
||||
on Mac OS X with **Xcode**.
|
||||
|
||||
@section build_xcode_intro General
|
||||
If you build OCCT from bare sources (as in Git repository) or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
|
||||
|
||||
This file describes steps to build OCCT libraries from sources on Mac OS X with **Xcode** projects, generated by OCCT legacy tool **genproj**.
|
||||
Before building OCCT, you need to install the required third-party libraries; see
|
||||
paragraph 1 of \ref occt_dev_guides__building for details.
|
||||
|
||||
@section build_xcode_3rdparty Third-party libraries
|
||||
1. Add paths to the mandatory 3rd-party products (**Tcl/Tk** and **FreeType**)
|
||||
in file *custom.sh* located in <i>\<OCCT_ROOT_DIR\> </i>. For this:
|
||||
|
||||
Before building OCCT, make sure to have all the needed third-party libraries installed.
|
||||
On OS X we recommend to use native libraries.
|
||||
You can also build third-party libraries from their sources, see @ref occt_dev_guides__building_3rdparty_osx for instructions.
|
||||
1.1. Add paths to the includes in variable *CSF_OPT_INC*;
|
||||
|
||||
@section build_xcode_conf Configuration
|
||||
1.2. Add paths to the binary libraries in variable *CSF_OPT_LIB64*;
|
||||
|
||||
Before building it is necessary to set up build environment.
|
||||
All paths should be separated by ":" symbol.
|
||||
|
||||
The environment is defined in the file *custom.sh* which can be edited directly:
|
||||
2. Add paths to the optional 3rd-party libraries (**TBB, gl2ps** and **FreeImage**)
|
||||
in the aforementioned environment variables *CSF_OPT_INC* and *CSF_OPT_LIB64* from file *custom.sh*.
|
||||
|
||||
* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC* (use colon ":" as path separator).
|
||||
* Add paths to their binary libraries in variable *CSF_OPT_LIB64*.
|
||||
* Set variable *SHORTCUT_HEADERS* to "true" to have folder *inc* populated by short-cut files pointing to actual headers located in *src*; otherwise, header files will be copied to *inc*.
|
||||
* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
|
||||
If you want to build OCCT without the optional libraries perform the following steps:
|
||||
|
||||
2.1 Disable unnecessary library in *custom.sh* by setting the corresponding
|
||||
variable <i>HAVE_<LIBRARY_NAME></i> to *false*.
|
||||
~~~~~
|
||||
export HAVE_GL2PS=false
|
||||
~~~~~
|
||||
2.2 Remove this library from Project navigator in Xcode for each project that
|
||||
uses it: choose the required project, right click on the unnecessary
|
||||
library and select **Delete** button.
|
||||
|
||||
Alternatively, or when *custom.sh* does not exist, you can launch *genconf.sh* to configure environment interactively:
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/genconf_osx.png}
|
||||
|
||||
Click "Save" to store the specified configuration in *custom.sh* file.
|
||||
|
||||
@section build_xcode_gen Projects generation
|
||||
|
||||
Launch **genproj** tool to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files.
|
||||
|
||||
@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
|
||||
|
||||
For instance, in Terminal application:
|
||||
3. Open Terminal application.
|
||||
|
||||
4. Enter <i>\<OCCT_ROOT_DIR\></i>:
|
||||
~~~~~
|
||||
$ cd /dev/OCCT/opencascade-7.0.0
|
||||
$ ./genproj.sh
|
||||
cd \<OCCT_ROOT_DIR\>
|
||||
~~~~~
|
||||
5. To start **Xcode**, run command <i>/xcode.sh</i>
|
||||
|
||||
@section build_xcode_build Building
|
||||
6. To build a certain toolkit, select it in **Scheme** drop-down list in Xcode
|
||||
toolbar, press **Product** in the menu and click **Build** button.
|
||||
|
||||
To start **Xcode**, launch script *xcode.sh*.
|
||||
|
||||
To build a certain toolkit, select it in **Scheme** drop-down list in Xcode toolbar, press **Product** in the menu and click **Build** button.
|
||||
|
||||
To build the entire OCCT:
|
||||
* Create a new empty project (select **File -> New -> Project -> Empty project** in the menu; input the project name, e.g. *OCCT*; then click **Next** and **Create**).
|
||||
* Drag and drop the *OCCT* folder in the created *OCCT* project in the Project navigator.
|
||||
* Select **File -> New -> Target -> Aggregate** in the menu.
|
||||
* Enter the project name (e.g. *OCCT*) and click **Finish**. The **Build Phases** tab will open.
|
||||
* Click "+" button to add the necessary toolkits to the target project. It is possible to select all toolkits by pressing **Command+A** combination.
|
||||
|
||||
@section build_xcode_draw Launching DRAW
|
||||
To build the entire OCCT, create a new empty project (select **File ->
|
||||
New -> Project -> "Empty project** in the menu. Input the project name,
|
||||
e.g. *OCCT*, click **Next** and **Create** buttons). Drag and drop the *OCCT*
|
||||
folder in the created *OCCT* project in the Project navigator. Select
|
||||
**File -> New -> Target -> Aggregate** in the menu. Enter the project name
|
||||
(e.g. <i>OCCT</i>) and click **Finish**. The **Build Phases** tab will open.
|
||||
Click "+" button to add the necessary toolkits to the target project.
|
||||
It is possible to select all toolkits by pressing **Command+A** combination.
|
||||
|
||||
To start *DRAWEXE*, which has been built with Xcode on Mac OS X, perform the following steps:
|
||||
|
||||
@@ -74,5 +67,4 @@ To start *DRAWEXE*, which has been built with Xcode on Mac OS X, perform the fol
|
||||
~~~~~
|
||||
./draw_cbp.sh xcd [d]
|
||||
~~~~~
|
||||
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
||||
|
@@ -36,6 +36,7 @@ Open CASCADE Technology is an open source platform available for an internationa
|
||||
Names should be meaningful or, at least, contain a meaningful part. To better understand this requirement, let us examine the existing names of toolkits, packages, classes and methods:
|
||||
- Packages containing words *Geom* or *Geom2d* in their names are related to geometrical data and operations.
|
||||
- Packages containing words *TopoDS* or *BRep* in their names are related to topological data and operations.
|
||||
- In OCAF, packages that define transient, persistent data classes and drivers to map between them, have similar names prefixed by *T*, *P*, and *M* correspondingly (e.g. *TDocStd*, *PDocStd*, *MDocStd*).
|
||||
- Packages ending with <i>...Test</i> define Draw Harness plugins.
|
||||
- Methods starting with *Get...* and *Set...* are usually responsible for correspondingly retrieving and storing data.
|
||||
|
||||
@@ -66,9 +67,10 @@ Names of units should not contain underscores, unless the use of underscores is
|
||||
|
||||
The following extensions should be used for source files, depending on their type:
|
||||
|
||||
* <i>.cxx</i> -- C++ source files
|
||||
* <i>.hxx</i> -- C++ header files
|
||||
* <i>.lxx</i> -- additional headers containing definitions of inline methods and auxiliary code
|
||||
* <i>.cdl</i> - CDL declaration files
|
||||
* <i>.cxx</i> - C++ source files
|
||||
* <i>.hxx</i> - C++ header files
|
||||
* <i>.lxx</i> - headers with definitions of inline methods (CDL packages)
|
||||
|
||||
### Prefix for toolkit names [MANDATORY]
|
||||
|
||||
@@ -450,7 +452,7 @@ The source code is one of the most important references for documentation.
|
||||
The comments in the source code should be complete enough to allow understanding the corresponding code and to serve as basis for other documents.
|
||||
|
||||
The main reasons why the comments are regarded as documentation and should be maintained are:
|
||||
- The comments are easy to reach -- they are always together with the source code;
|
||||
- The comments are easy to reach - they are always together with the source code;
|
||||
- It is easy to update a description in the comment when the source is modified;
|
||||
- The source by itself is a good context to describe various details that would require much more explanations in a separate document;
|
||||
- As a summary, this is the most cost-effective documentation.
|
||||
@@ -484,7 +486,7 @@ They should be detailed enough to allow any person to understand what each part
|
||||
|
||||
It is recommended to comment all static functions (like methods in headers), and to insert at least one comment per each 10-100 lines in the function body.
|
||||
|
||||
There are also some rules that define how comments should be formatted, see @ref occt_coding_rules_3 "Formatting Rules".
|
||||
There are also some rules that define how comments should be formatted, see <a href="#occt_coding_rules_3">Formatting Rules</a>.
|
||||
|
||||
Following these rules is important for good comprehension of the comments. Moreover, this approach allows automatically generating user-oriented documentation directly from the commented sources.
|
||||
|
||||
@@ -948,7 +950,7 @@ Command should warn the user about unknown arguments, including cases when extra
|
||||
|
||||
### Message printing
|
||||
|
||||
Informative messages should be printed into standard output *std::cout*, whilst command results (if any) -- into Draw Interpreter.
|
||||
Informative messages should be printed into standard output *std::cout*, whilst command results (if any) - into Draw Interpreter.
|
||||
|
||||
Information printed into Draw Interpreter should be well-structured to allow usage in TCL script.
|
||||
|
||||
|
@@ -2,464 +2,282 @@ Contribution Workflow {#occt_dev_guides__contribution_workflow}
|
||||
====================================
|
||||
@tableofcontents
|
||||
|
||||
@section occt_contribution_intro Introduction
|
||||
@section occt_contribution_workflow_1 Introduction
|
||||
|
||||
The purpose of this document is to describe standard workflow for processing contributions to certified version of OCCT.
|
||||
|
||||
@subsection occt_contribution_intro_tracker Use of issue tracker system
|
||||
@subsection occt_contribution_workflow_1_1 Use of issue tracker system
|
||||
|
||||
Each contribution should have corresponding issue (bug, or feature, or integration request)
|
||||
registered in the MantisBT issue tracker system accessible by URL
|
||||
http://tracker.dev.opencascade.org.
|
||||
The issue is processed according to the described workflow.
|
||||
The issue is processed further according to the described workflow.
|
||||
|
||||
@subsection occt_contribution_intro_access Access levels
|
||||
@subsection occt_contribution_workflow_1_2 Access Levels
|
||||
|
||||
Access level defines the permissions of the user to view, register and modify issues in the issue tracker.
|
||||
The correspondence of access level and user permissions is defined in the table below.
|
||||
Access level defines the permissions of the user to view,
|
||||
register and modify issues in a Mantis bugtracker.
|
||||
The correspondence of access level and user permissions
|
||||
is defined in accordance with the table below.
|
||||
|
||||
| Access level | Granted to | Permissions | Can set statuses |
|
||||
|:------------- | :--------- | :-------------- | :----------------------- |
|
||||
| Viewer | Everyone (anonymous access) | View public issues only | None |
|
||||
| Updater | Users registered on dev.opencascade.org, in Open CASCADE project | View and comment issues | None |
|
||||
| Reporter | Users registered on dev.opencascade.org, in Community project | View, report, and comment issues | New, Resolved, Feedback |
|
||||
| Developer | OCC developers and (in Community project) external contributors who signed the CLA | View, report, modify, and handle issues | New, Assigned, Resolved, Reviewed, Feedback |
|
||||
| Tester | OCC engineer devoted to certification testing | View, report, modify, and handle issues | Assigned, Tested, Feedback |
|
||||
| Maintainer | Person responsible for a project or OCCT component | View, report, modify, and handle issues | New, Resolved, Reviewed, Tested, Closed, Feedback |
|
||||
| Bugmaster | Person responsible for Mantis issue tracker, integrations, certification, and releases | Full access | All statuses |
|
||||
| Viewer | Everyone (anonymous access) | View public issues only | No |
|
||||
| Reporter | Users registered on dev.opencascade.com | View, report, and comment issues | New, Resolved |
|
||||
| Updater | Users of dev.opencascade.com in publicly visible projects | View and comment issues | New, Resolved |
|
||||
| Developer | OCC developers and external contributors who signed the CLA | View, report, modify, and handle issues | New, Assigned, Resolved, Reviewed |
|
||||
| Tester | OCC engineer devoted to certification testing | View, report, modify, and handle issues | Assigned, Tested |
|
||||
| Manager | Person responsible for a project or OCCT component | View, report, modify, and handle issues | New, Resolved, Reviewed, Tested, Closed |
|
||||
|
||||
According to his access level, the user can participate in the issue handling process under different roles, as described below.
|
||||
|
||||
@section occt_contribution_workflow Standard workflow for an issue
|
||||
@section occt_contribution_workflow_2 Typical workflow for an issue
|
||||
|
||||
@subsection occt_contribution_workflow_general General scheme
|
||||
@subsection occt_contribution_workflow_2_1 General scheme
|
||||
|
||||
<center>
|
||||
@image html OCCT_ContributionWorkflow_V3_image001.svg "Standard life cycle of an issue"
|
||||
@image latex OCCT_ContributionWorkflow_V3_image001.svg "Standard life cycle of an issue"
|
||||
</center>
|
||||
@image html OCCT_ContributionWorkflow_V3_image001.png "Standard life cycle of an issue"
|
||||
@image latex OCCT_ContributionWorkflow_V3_image001.png "Standard life cycle of an issue"
|
||||
|
||||
@subsection occt_contribution_workflow_issue Issue registration
|
||||
@subsection occt_contribution_workflow_2_2 Issue registration
|
||||
|
||||
An issue is registered in Mantis bugtracker by the **Reporter** with definition of the necessary attributes (see also @ref occt_contribution_app):
|
||||
An issue is registered in Mantis bugtracker by the Reporter with definition of the necessary attributes.
|
||||
The definition of the following attributes is obligatory:
|
||||
|
||||
**Category** -- indicates the OCCT component, to which the issue relates.
|
||||
(If in doubt, assign to OCCT:Foundation Classes.)
|
||||
|
||||
**Severity** -- indicates the impact of the issue in the context where it was discovered.
|
||||
|
||||
**Profile** -- specifies the configuration, on which the problem was detected.
|
||||
For specific configurations it is possible to specify separately platform, OS, and version.
|
||||
These fields can be left empty if the issue is not configuration-specific.
|
||||
Additional details relevant for the environment where the issue is reproduced (such as compiler version, bitness, etc.) can be provided in the **Description**.
|
||||
|
||||
**Products Version** -- defines the OCCT version, on which the problem has been detected.
|
||||
|
||||
It is preferable to indicate the version of the earliest known official release where the problem can be reproduced.
|
||||
If the issue is reported on the current development version of OCCT, the current development version should be used (for convenience, this version is marked by asterisk in Mantis).
|
||||
|
||||
@note OCCT version number can be consulted in the file Standard_Version.hxx (value of OCC_VERSION_COMPLETE macro).
|
||||
|
||||
**Assign to** -- developer to whom the issue will be assigned.
|
||||
By default, it is set to **Maintainer** of the OCCT component selected in **Category** field.
|
||||
|
||||
**Target Version** -- defines the target version for the fix to be provided.
|
||||
By default, it is set to the current version under development.
|
||||
|
||||
**Summary** -- a short, one sentence description of the issue.
|
||||
* **Category** - indicates component of OCCT to which the issue relates. If in doubt, assign OCCT:Foundation Classes.
|
||||
* **Reproducibility**
|
||||
* **Severity**
|
||||
* **Priority**
|
||||
* **Profile** - allows defining the platform on which the problem was detected from the list of predefined platforms. If a platform is absent in the list of predefined platforms it is possible to use Or Fill In option to define the platform manually.
|
||||
* **Platform**
|
||||
* **OS**
|
||||
* **OS Version**
|
||||
* **Products Version** - defines the version of Open CASCADE on which the problem has been detected.
|
||||
* **Summary** - a short, one sentence description of the issue. It has a limit of 128 characters. It should be informative and useful for the developers. It is advisable to avoid vague or misleading phrases, such as "it doesn't work" or "it crashed". It is not allowed to mention the issue originator, and in particular the customer, in the name of the registered issue.
|
||||
* **Description** - should contain a detailed definition of the nature of the registered issue depending on its type. For a bug it is required to submit a detailed description of the incorrect behavior, including the indication of the cause of the problem (if possible at this stage) or any inputs from the originator. For a feature or integration request it is recommended to describe the proposed feature in details (as possible at that stage), including the changes required for its implementation and the main features of the new functionality. Filling the bug description is obligatory.
|
||||
* **Steps To Reproduce** - in this field it is possible to describe in detail how to reproduce the issue. This field considerably helps to find the cause of the problem, to eliminate it and to create the test case.
|
||||
* *Upload File* field allows attaching the shapes, scripts or modified source files of OCCT. It is recommended to attach a prototype test case in form of a Tcl script for DRAW, using either existing DRAW commands, or a C++ code which can be organized in DRAW commands, as well as sample shapes or other input data (if applicable), immediately after the issue registration.
|
||||
|
||||
The **Summary** has a limit of 128 characters.
|
||||
It should be informative and useful for the developers.
|
||||
It is not allowed to mention the issue originator, and in particular the customer, in the name of the registered issue.
|
||||
The newly registered issue gets status **NEW** and is assigned to the developer responsible for the OCCT component indicated in the Category field (Maintainer).
|
||||
|
||||
A good practice is to start the issue with indication of the relevant component (OCCT module, package, class etc.) to better represent its context.
|
||||
@subsection occt_contribution_workflow_2_3 Assigning the issue
|
||||
|
||||
The summary should be given in imperative mood when it can be formulated as goal to be achieved or action to be done.
|
||||
In particular, this applies to feature requests and improvements, for instance:
|
||||
|
||||
> *Visualization - provide a support of zoom persistent selection*
|
||||
|
||||
If the issue reports a problem, the summary should be given in Present Simple.
|
||||
If reported problem is believed to be a regression, it is recommended to indicate this in the summary, like this:
|
||||
|
||||
> [Regression in 6.9.0] *IGES - Export of a reversed face leads to wrong data*
|
||||
|
||||
**Description** -- should contain a detailed definition of the nature of the registered issue depending on its type.
|
||||
|
||||
For a bug it is required to submit a detailed description of the incorrect behavior, including the indication of the cause of the problem (if known at this stage), and details on the context where the issue has been detected.
|
||||
|
||||
For a feature or integration request it is necessary to describe the proposed feature in details (as much as possible at that stage), including the changes required for its implementation and the main features of the new functionality.
|
||||
|
||||
Example:
|
||||
|
||||
> *Currently selection does not work correctly for non-zoomable objects (those defined using transform persistence). To provide correct selection for such objects, first-level (object) BVH structures must be updated on each camera change, and frustum must be rebuilt accordingly.*
|
||||
|
||||
@note In the description and notes to the issues you can refer to another issue by its ID prefixed by number sign (e.g.: #12345), and refer to a note by its ID prefixed by tilde (e.g.: ~20123).
|
||||
These references will be expanded by Mantis into links to the corresponding issue or note.
|
||||
When the number sign or the tilde followed by digits are a part of a normal text, add a space before digits (e.g.: "face # 12345 contains ~ 1000 edges") to avoid this conversion.
|
||||
|
||||
**Steps To Reproduce** -- allows describing in detail how to reproduce the issue.
|
||||
|
||||
This information is crucial for the developer to investigate the cause of the problem and to create the test case.
|
||||
The optimal approach is to give a sequence of @ref occt_user_guides__test_harness "DRAW Test Harness" commands to reproduce the problem in DRAW.
|
||||
This information can also be provided as a DRAW Tcl script attached to the issue (in **Upload File** field).
|
||||
|
||||
**Additional information and documentation updates** -- any additional information, remarks to be taken into account in Release Notes, etc..
|
||||
|
||||
**Upload File** -- allows attaching the shapes, snapshots, scripts, documents, or modified source files of OCCT.
|
||||
|
||||
This field can be used to attach a prototype test case in form of a Tcl script for DRAW, a C++ code which can be organized in DRAW commands, sample shapes, documents describing proposed change or analysis of the problem, or other data required for reproduction of the issue.
|
||||
Where applicable, pictures demonstrating a problem and/or desired result can be attached.
|
||||
The description of the new issue is checked by the **Maintainer** and if it is feasible,
|
||||
he may assign the issue to a **Developer**. Alternatively, any user with **Developer** access level
|
||||
or higher can assign the issue to himself if he wants to provide a solution.
|
||||
|
||||
The newly registered issue gets status **NEW** and is assigned to the person indicated in the **Assign to** field.
|
||||
The recommended way to handle contributions is that the **Reporter** assigns the issue to himself and provides a solution.
|
||||
|
||||
@subsection occt_contribution_workflow_assign Assigning the issue
|
||||
The **Maintainer, Technical Project Manager,** or **Bugmaster** can close or reassign the issue
|
||||
(in **FEEDBACK** state) to the **Reporter** after it has been registered, if its description does not contain sufficient details to reproduce the bug or explain the purpose of the new feature.
|
||||
That decision shall be documented in the comments to the issue in the Bugtracker.
|
||||
|
||||
The description of the new issue is checked by the **Maintainer** and if it is feasible, he may assign the issue to a **Developer**.
|
||||
Alternatively, any user with **Developer** access level or higher can assign the issue to himself if he wants to provide a solution.
|
||||
The assigned issue should have state **ASSIGNED**.
|
||||
|
||||
@subsection occt_contribution_workflow_2_4 Resolving the issue
|
||||
|
||||
The **Developer** responsible for the issue assigned to him provides a solution
|
||||
as a change on the version of OCCT indicated in the issue attributes, or the last development version.
|
||||
|
||||
The modified sources should be submitted for review and testing to the dedicated branch of the official OCCT Git repository:
|
||||
|
||||
* Branch should be created for the issue with name composed of letters ‘CR’ followed by issue ID number (without leading zeroes).
|
||||
Optional suffix can be added to the branch name after issue ID,
|
||||
e.g. to distinguish between several version of the fix.
|
||||
* The branch should be based on recent version of the master branch
|
||||
(not later than commit tagged as last OCCT release).
|
||||
* The first line of the first commit message should contain
|
||||
the Summary of the issue (starting with its ID followed by colon, e.g. "0022943: Bug TDataXtd_PatternStd").
|
||||
The consequent lines should contain a description of the changes made.
|
||||
If more than one commit has been made, the commit messages should contain description of the changes made.
|
||||
* The amount of the code affected by the change should be limited
|
||||
to only the changes required for the bug fix or improvement.
|
||||
Change of layout or re-formatting of the existing code is allowed
|
||||
only in the parts where meaningful changes related to the issue have been made.
|
||||
* The name of the branch where the fix is submitted should be given
|
||||
in the note to the Mantis issue
|
||||
(providing the direct link to relevant branch view in GitWeb is encouraged).
|
||||
* The description of the changes made should be put to the field
|
||||
"Additional information and documentation updates" of the Mantis issue.
|
||||
|
||||
In some cases (if Git is not accessible for the contributor),
|
||||
external contributions can be submitted as patch (diff) files or sources
|
||||
attached to the Mantis issue, with indication of OCCT version on which the fix is made.
|
||||
Such contributions should be put to Git for processing by someone else,
|
||||
and hence they have less priority in processing than the ones submitted directly through Git.
|
||||
|
||||
The issue for which solution is provided should be switched to **RESOLVED** state
|
||||
and assigned to the developer who is expected to make a code review
|
||||
(the **Reviewer**; by default, can be set to the **Maintainer** of the component).
|
||||
|
||||
@subsection occt_contribution_workflow_2_5 Code review
|
||||
|
||||
The **Reviewer** analyzes the proposed solution for applicability in accordance with OCCT Code reviewing rules and examines all changes in the sources to detect obvious and possible errors, misprints, conformity to coding style.
|
||||
|
||||
The recommended way to handle contributions is that the **Reporter** assigns the issue to himself and provides a solution.
|
||||
* If Reviewer detects some problems, he can either:
|
||||
* Fix these issues and provide new solution, reassigning the issue (in **RESOLVED** state) to the **Developer**, who then becomes a **Reviewer**.
|
||||
Possible disagreements should be resolved through discussion, which is done normally within issue notes (or on the OCCT developer’s forum if necessary).
|
||||
* Reassign the issue back to the **Developer**, providing detailed list of remarks. The issue then gets status **ASSIGNED** and a new solution should be provided.
|
||||
* If Reviewer does not detect any problems, he changes status to **REVIEWED**.
|
||||
|
||||
The **Maintainer** or **Bugmaster** can close or reassign the issue (in **FEEDBACK** state) to the **Reporter** after it has been registered, if its description does not contain sufficient details to reproduce the bug or explain the need of the new feature.
|
||||
That decision shall be documented in the comments to the issue in the Bugtracker.
|
||||
|
||||
The assigned issue has status **ASSIGNED**.
|
||||
|
||||
@subsection occt_contribution_workflow_fix Resolving the issue
|
||||
|
||||
The **Developer** responsible for the issue assigned to him provides a solution including:
|
||||
|
||||
* Changes in the code, with appropriate comments;
|
||||
* Test case (when applicable) and data necessary for its execution;
|
||||
* Changes in the user and developer guides (when necessary).
|
||||
|
||||
The change is integrated to branch named CRxxxxx (where **xxxxx** is issue number) in the OCCT Git repository, based on current master, and containing a single commit with the appropriate description.
|
||||
Then the issue is switched to **RESOLVED** for further review and testing.
|
||||
|
||||
The following sub-sections describe this process, relevant requirements and options, in more details.
|
||||
|
||||
@subsubsection occt_contribution_workflow_fix_code Requirements to the code modification
|
||||
|
||||
The amount of code affected by the change should be limited to the changes required for the bug fix or improvement.
|
||||
Change of layout or re-formatting of the existing code is allowed only in the parts where meaningful changes related to the issue have been made.
|
||||
|
||||
@note If deemed useful, re-formatting or cosmetic changes affecting considerable parts of the code can be made within a dedicated issue.
|
||||
|
||||
The changes should comply with the OCCT @ref occt_dev_guides__coding_rules "Codng Rules".
|
||||
It is especially important to comment the code properly so that other people can understand it easier.
|
||||
|
||||
The modification should be tested by running OCCT tests (on the platform and scope available to **Developer**) and ensuring absence of regressions.
|
||||
In case if modification affects results of some existing test case and the new result is correct, such test case should be updated to report OK (or BAD), as descibed in @ref testmanual_details_results "Automated Test System / Interpretation of Test Results".
|
||||
|
||||
@subsubsection occt_contribution_workflow_fix_test Providing a test case
|
||||
|
||||
For modifications affecting OCCT functionality, a test case should be created (unless already exists) and included in the commit or patch.
|
||||
See @ref testmanual_intro_quick_create "Automated Test System / Creating a New Test" for relevant instructions.
|
||||
|
||||
The data files required for a test case should be attached to the corresponding issue in Mantis (i.e. not included in the commit).
|
||||
|
||||
When the test case cannot be provided for any reason, the maximum possible information on how the problem can be reproduced and how to check the fix should be provided in the **Steps to Reproduce** field of an issue.
|
||||
|
||||
@subsubsection occt_contribution_workflow_fix_doc Updating user and developer guides
|
||||
|
||||
If the change affects a functionality described in @ref user_guides "User Guides", the corresponding user guide should be updated to reflect the change.
|
||||
|
||||
If the change affects OCCT test system, build environment, or development tools described in @ref dev_guides "Developer Guides", the corresponding guide should be updated.
|
||||
|
||||
The changes that break compatibility with the previous versions of OCCT (i.e. affecting API or behavior of existing functionality in the way that may require update of existing applications based on an earlier official release of OCCT to work correctly) should be described in the document @ref occt_dev_guides__upgrade "Upgrade from previous OCCT versions".
|
||||
It is recommended to add a sub-section for each change described.
|
||||
The description should provide the explanation of the incompatibility introduced by the change, and describe how it can be resolved (at least, in known situations).
|
||||
When feasible, the automatic upgrade procedure (adm/upgrade.tcl) can be extended by a new option to perform the required upgrade of the dependent code automatically.
|
||||
|
||||
@subsubsection occt_contribution_workflow_fix_git Submission of change as a Git branch
|
||||
|
||||
The modification of sources should be provided in the dedicated branch of the official OCCT Git repository.
|
||||
|
||||
The branch should contain a single commit, with the appropriate commit message (see @ref occt_contribution_workflow_fix_commit "Requirements to the commit message" below).
|
||||
|
||||
In general, this branch should be based on the recent version of the master branch.
|
||||
It is highly preferable to submit changes basing on the current master.
|
||||
In case if the fix is implemented on the previous release of OCCT, the branch can be based on the corresponding tag in Git, instead of the master.
|
||||
|
||||
The branch name should be composed of letters **CR** (abbreviation of "Change Request") followed by the issue ID number (without leading zeros).
|
||||
It is possible to add an optional suffix to the branch name after the issue ID, e.g. to distinguish between several versions of the fix (see @ref occt_contribution_nonstd_rebase).
|
||||
|
||||
See @ref occt_dev_guides__git_guide "Guide to using GIT" for help.
|
||||
|
||||
@note When a branch with the name given according to the above rule is pushed to Git, a note is automatically added to the corresponding issue in Mantis, indicating the person who has made the push, the commit hash, and (for new commits) the description.
|
||||
|
||||
@subsubsection occt_contribution_workflow_fix_commit Requirements to the commit message
|
||||
|
||||
The commit message posted in Git constitutes an integral part of both the fix and the release documentation.
|
||||
|
||||
The first line of the commit message should contain the Summary of the issue (starting with its ID followed by colon, e.g. "0022943: Bug in TDataXtd_PatternStd"), followed by an empty line.
|
||||
|
||||
The following lines should provide a description of the context and details on the changes made.
|
||||
The contents and the recommended structure of the description depend on the nature of the bug.
|
||||
|
||||
In a general case, the following elements should be present:
|
||||
* **Problem** -- a description of the unwanted behavior;
|
||||
* **Change** -- a description of the implemented changes, including the names of involved classes / methods / enumerations etc.;
|
||||
* **Result** -- a description of the current behavior (after the implementation).
|
||||
|
||||
Example:
|
||||
|
||||
> *0026330: BRepOffsetAPI_ThruSections creates invalid shape.*
|
||||
>
|
||||
> *Methods BRep_Tool::CurveOnSurface() and BRepCheck_Edge::InContext() now properly handle parametric range on a 3D curve when it is used to generate a p-curve dynamically (on a planar surface) and both the surface and the 3D curve have non-null locations.*
|
||||
|
||||
Provide sufficient context so that potential user of the affected functionality can understand what has been changed and how the algorithm works now.
|
||||
Describe reason and essence of the changes made, but do not go too deep into implementation details -- these should be reflected in comments in the code.
|
||||
|
||||
@subsubsection occt_contribution_workflow_fix_resolve Marking issue as resolved
|
||||
|
||||
To mark the change as ready for review and testing, the corresponding issue should be switched to **RESOLVED** state.
|
||||
By default, the issue gets assigned to the **Maintainer** of the component, who is thus responsible for its review.
|
||||
Alternatively, another person can be selected as a reviewer at this step.
|
||||
|
||||
When the issue is switched to **RESOLVED**, it is required to update or fill the field **Steps to reproduce**.
|
||||
The possible variants are:
|
||||
|
||||
* The name of an existing or new test case (preferred variant);
|
||||
* A sequence of DRAW commands;
|
||||
* N/A (Not required / Not possible / Not applicable);
|
||||
* Reference to an issue in the bug tracker of another project.
|
||||
|
||||
@subsection occt_contribution_workflow_review Code review
|
||||
|
||||
The **Reviewer** analyzes the proposed solution for applicability in accordance with OCCT @ref occt_dev_guides__coding_rules "Coding Rules" and examines all changes in the sources, test case(s), and documentation to detect obvious and possible errors, misprints, or violations of the coding style.
|
||||
|
||||
If the Reviewer detects some problems, he can either:
|
||||
|
||||
* Fix these issues and provide a new solution.
|
||||
The issue can then be switched to **REVIEWED**.
|
||||
|
||||
In case of doubt or possible disagreement the **Reviewer** can reassign the issue (in **RESOLVED** state) to the **Developer**, who then becomes a **Reviewer**.
|
||||
Possible disagreements should be resolved through discussion, which is done normally within issue notes (or on the OCCT developer’s forum if necessary).
|
||||
|
||||
* Reassign the issue back to the **Developer**, providing detailed list of remarks. The issue then gets status **ASSIGNED** and a new solution should be provided.
|
||||
|
||||
If Reviewer does not detect any problems, or provides a corrected version, he changes status to **REVIEWED**.
|
||||
The issue gets assigned to the **Bugmaster**.
|
||||
|
||||
@subsection occt_contribution_workflow_test Testing
|
||||
@subsection occt_contribution_workflow_2_6 Testing
|
||||
|
||||
The issues that are in **REVIEWED** state are subject of certification (non-regression) testing.
|
||||
The issue is assigned to an OCCT **Tester** when he starts processing it.
|
||||
The issue is assigned to OCC **Tester** when he starts processing it.
|
||||
The results of tests are checked by the **Tester**:
|
||||
* If the **Tester** detects build problems or regressions, he changes the status to **ASSIGNED** and reassigns the issue to the **Developer** with a detailed description of the problem. The **Developer** should produce a new solution.
|
||||
* If the **Tester** does not detect build problems or regressions, he changes the status to **TESTED** for further integration.
|
||||
|
||||
If the branch submitted for testing is based on obsolete status of the master branch, **Tester** @ref occt_contribution_nonstd_rebase "rebases" it on master HEAD.
|
||||
In case of conflicts, the issue is assigned back to **Developer** in **FEEDBACK** status, requesting for a rebase.
|
||||
@subsection occt_contribution_workflow_2_7 Integration of a solution
|
||||
|
||||
Certification testing includes:
|
||||
* Addition of new data models (if required for a new test case) to the data base;
|
||||
* Revision of the new test case(s) added by developer, and changes in the existing test cases included in commit.
|
||||
The **Tester** can amend tests to ensure their correct behavior in the certification environment.
|
||||
* Building OCCT on a sub-set of supported configurations (OS and compiler), watching for errors and warnings;
|
||||
* Execution of tests on sub-set of supported platforms (at least, one Windows and one Linux configuration), watching for regressions;
|
||||
* Building OCCT samples, watching for errors;
|
||||
* Building and testing of OCC products based on OCCT.
|
||||
|
||||
If the **Tester** does not detect problems or regressions, he changes the status to **TESTED** for further integration.
|
||||
|
||||
If the **Tester** detects build problems or regressions, he changes the status to **ASSIGNED** and reassigns the issue to the **Developer** with a detailed description of the problems.
|
||||
The **Developer** should analyze the reported problems and, depending on results of this analysis, either:
|
||||
* Confirm that the detected problems are expected changes and they should be accepted as a new status of the code. Then the issue should be switched to **FEEDBACK** and assigned to the **Bugmaster**.
|
||||
* Produce a new solution (see @ref occt_contribution_workflow_fix, and also @ref occt_contribution_nonstd_minor).
|
||||
|
||||
@subsection occt_contribution_workflow_integrate Integration of a solution
|
||||
|
||||
Before integration into the master branch of the repository the **Integrator** checks the following conditions:
|
||||
Before integration into the master branch of the repository the **Integrator** checks the following conditions:
|
||||
* the change has been reviewed;
|
||||
* the change has been tested without regressions (or with regressions treated properly);
|
||||
* the test case has been created for this issue (when applicable), and the change has been rechecked on this test case;
|
||||
* "Additional information and documentation updates" field is filled by the developer;
|
||||
* the change does not conflict with other changes integrated previously.
|
||||
|
||||
If the result of check is successful the Integrator integrates the solution into the branch.
|
||||
The integrations are performed weekly; integration branches are named following the pattern IR-YYYY-MM-DD.
|
||||
|
||||
Each change is integrated as a single commit without preserving the history of changes made in the branch (by rebase, squashing all intermediate commits if any), however, preserving the author when possible.
|
||||
This is done to have the master branch history plain and clean.
|
||||
The following picture illustrates the process:
|
||||
If the result of check is successful the Integrator integrates solution
|
||||
into the master branch of the repository. Each change is integrated into the master branch
|
||||
as a single commit without preserving the history of changes made in the branch
|
||||
(by rebase, squashing all intermediate commits), however, preserving the author when possible.
|
||||
This is done to have the master branch history plain and clean.
|
||||
The following picture illustrates the process:
|
||||
|
||||
@image html OCCT_ContributionWorkflow_V3_image002.png "Integration of several branches" width=\textwidth
|
||||
@image latex OCCT_ContributionWorkflow_V3_image002.png "Integration of several branches" width=\textwidth
|
||||
@image html OCCT_ContributionWorkflow_V3_image002.png "Integration of several branches"
|
||||
@image latex OCCT_ContributionWorkflow_V3_image002.png "Integration of several branches"
|
||||
|
||||
The new integration branch is tested against possible regressions that might appear due to interference between separate changes.
|
||||
When the tests are OK, the integration branch is pushed as the new master to the official repository.
|
||||
The issue status is set then to **VERIFIED** and is assigned to the **Reporter** so that he could check the fix as integrated.
|
||||
The new master branch is tested against possible regressions that might appear due to interference between separate changes. When the tests are Ok, the new master is pushed to the official repository
|
||||
and the original branches are removed from it.
|
||||
The issue status is set then to **VERIFIED** and is assigned to the **Reporter** so that he could check the fix as-integrated.
|
||||
|
||||
The branches corresponding to the integrated fixes are removed from the repository by the **Bugmaster**.
|
||||
@subsection occt_contribution_workflow_2_8 Closing a bug
|
||||
|
||||
@subsection occt_contribution_workflow_close Closing an issue
|
||||
The **Bugmaster** closes the issue after regular OCCT Release provided that the issue status is **VERIFIED** and that issue was really solved in that release, by rechecking the corresponding test case. The final issue state is **CLOSED**.
|
||||
|
||||
When possible, the **Reporter** should check whether the problem is actually resolved in the environment where it has been discovered, after the fix is integrated to master.
|
||||
If the fix does not actually resolve the original problem, the issue in **VERIFIED** status can be reopened and assigned back to the **Developer** for rework.
|
||||
The details on how to check that the issue is still reproducible should be provided.
|
||||
However, if the issue does resolve the problem as described in the original report, but a similar problem is discovered for another input data or configuration, or the fix has caused a regression, that problem should be registered as a separate (@ref occt_contribution_nonstd_relate "related") issue.
|
||||
@subsection occt_contribution_workflow_2_9 Reopening a bug
|
||||
|
||||
If the fix integrated to master causes regressions, **Bugmaster** can revert it and reopen the issue.
|
||||
If a regression is detected, the **Bugmaster** may reopen and reassign the **CLOSED** issue to the appropriate developer with comprehensive comments about the reason of reopening. The issue then becomes **ASSIGNED** again.
|
||||
|
||||
The **Bugmaster** closes the issue after the regular OCCT Release, provided that the issue status is **VERIFIED** and the change was actually included in the release.
|
||||
The final issue state is **CLOSED**.
|
||||
@section occt_contribution_workflow_3 Appendix
|
||||
|
||||
The field **Fixed in Version** of the issue is set to the OCCT version where it is fixed.
|
||||
@subsection occt_contribution_workflow_3_1 Issue attributes
|
||||
|
||||
@section occt_contribution_nonstd Additional workflow elements
|
||||
|
||||
@subsection occt_contribution_nonstd_feedback Requesting more information or specific action
|
||||
|
||||
If, at any step of the issue lifetime, the person responsible for it cannot process it due to absence of required information, expertise, or rights, he can switch it to status **FEEDBACK** and assign to the person who is (presumably) able to resolve the block. Some examples of typical situations where **FEEDBACK** is used are:
|
||||
|
||||
* The **Maintainer** or the **Developer** requests for more information from the **Reporter** to reproduce the issue;
|
||||
* The **Tester** requests the **Developer** or the **Maintainer** to help him in the interpretation of testing results;
|
||||
* The **Developer** or the **Maintainer** asks the **Bugmaster** to close the issue that is found irrelevant or already fixed (see @ref occt_contribution_nonstd_autofix).
|
||||
|
||||
In general, issues with status **FEEDBACK** should be processed as fast as possible, to avoid unjustified delays.
|
||||
|
||||
@subsection occt_contribution_nonstd_relate Defining relationships between issues
|
||||
|
||||
When two or more issues are related to each other, this relationship should be reflected in the issue tracker.
|
||||
It is also highly recommended to add a note to explain the relationship.
|
||||
Typical cases of relationships are:
|
||||
|
||||
* Issue A is caused by previous fix made for issue B (A is a child of B);
|
||||
* Issue A describes the same problem as issue B (A is a duplicate of B);
|
||||
* Issues A and B relate to the same piece of code, functionality etc., in the sense that the fix for one of these issues will affect the other (A is related to B)
|
||||
|
||||
When the fix made for one issue also resolves another one, these issues should be marked as related or duplicate.
|
||||
In general, the duplicate issue should have the same status, and, when closed, be marked as fixed in the same OCCT version, as the main one.
|
||||
|
||||
@subsection occt_contribution_nonstd_patch Submission of a change as a patch
|
||||
|
||||
In some cases (if Git is not accessible for the contributor), external contributions can be submitted as a patch file (generated by *diff* command) or as modified sources attached to the Mantis issue.
|
||||
The OCCT version, for which the patch is generated, should be clearly specified (e.g. as hash code of Git commit if the patch is based on an intermediate state of the master).
|
||||
|
||||
@note Such contributions should be put to Git by someone else (e.g. the **Reviewer**), this may cause delay in their processing.
|
||||
|
||||
@subsection occt_contribution_nonstd_rebase Updating branches in Git
|
||||
|
||||
Updates of the existing branch (e.g. taking into account the remarks of the **Reviewer**, or fixing regressions) should be provided as new commits on top of previous state of the branch.
|
||||
|
||||
It is allowed to rebase the branch on the new state of the master and push it to the repository under the same name (with <i>--force</i> option) provided that the original sequence of commits is preserved.
|
||||
|
||||
When a change is squashed into a single commit (e.g. to be submitted for review), it should be pushed into a branch a with different name.
|
||||
|
||||
The recommended approach is to add a numeric suffix (index) indicating the version of the change, e.g. "CR12345_5".
|
||||
Usually it is worth keeping a non-squashed branch in Git for reference.
|
||||
|
||||
To avoid confusions, the branch corresponding to the latest version of the change should have a greater index.
|
||||
|
||||
@note Make sure to revise the commit message after squashing a branch, to keep it meaningful and comprehensive.
|
||||
|
||||
@subsection occt_contribution_nonstd_minor Minor corrections
|
||||
|
||||
In some cases review remarks or results of testing require only minor corrections to be done in the branch containing a change.
|
||||
"Minor" implies that the correction does not impact the functionality and does not affect the description of the previously committed change.
|
||||
|
||||
As an exception to general @ref occt_contribution_workflow_fix_git "single-commit rule", it is allowed to put such minor corrections on top of the existing branch as a separate commit, and re-submit it for further processing in the same branch, without squashing.
|
||||
|
||||
Minor commits should have a single-line message starting with //.
|
||||
These messages will be ignored when the branch is squashed at integration.
|
||||
|
||||
Typical cases of minor corrections are:
|
||||
|
||||
* Amendments of test cases (including those made by the **Tester** to adjust a test script to a specific platform);
|
||||
* Trivial corrections of compilation warnings (such as removal of an unused variable);
|
||||
* Addition or correction of comments or documentation;
|
||||
* Corrections of code formatting (e.g. reversion of irrelevant formatting changes made in the main commit).
|
||||
|
||||
@subsection occt_contribution_nonstd_autofix Handling non-reproducible issues
|
||||
|
||||
Investigation of each issue starts with reproducing it on current development version (master).
|
||||
|
||||
If it cannot be reproduced on the current master, but can be reproduced on one of previous releases (or previous state of the master), it is considered as solved by a change made for another issue.
|
||||
If that "fixing" issue can be identified (e.g. by parsing Git log), it should be set as related to that issue.
|
||||
The issue should be switched to **FEEDBACK** and assigned to the **Bugmaster** for further processing.
|
||||
|
||||
The **Bugmaster** decides whether it is necessary to create a test case for that issue, and if so may assign it to the **Developer** or the **Tester** to create a test.
|
||||
The issue then follows the standard workflow.
|
||||
|
||||
Otherwise, if the issue is fixed in one of previous releases, the **Bugmaster** closes it setting the appropriate value in **Fixed in Version** field, or, if the issue is fixed after the last release, switches it to **VERIFIED** status.
|
||||
|
||||
If the issue cannot be reproduced due to an unclear description, missing data, etc., it should be assigned back to the **Reporter** in **FEEDBACK** status, requesting for more information.
|
||||
The **Reporter** should provide additional information within one month; after that time, if no new information is provided, the issue should be closed by the **Bugmaster** with resolution **Unable to reproduce**.
|
||||
|
||||
@section occt_contribution_app Appendix: Issue attributes
|
||||
|
||||
@subsection occt_contribution_app_category Category
|
||||
|
||||
The category corresponds to the component of OCCT where the issue is found:
|
||||
|
||||
| Category | Component |
|
||||
| :--------------------------- | :----------------------------------------------------- |
|
||||
| OCCT:Foundation Classes | Foundation Classes module |
|
||||
| OCCT:Modeling Data | Modeling Data classes |
|
||||
| OCCT:Modeling Algorithms | Modeling Algorithms, except shape healing and meshing |
|
||||
| OCCT:Shape Healing | Shape Healing component (TKShapeHealing) |
|
||||
| OCCT:Mesh | BRepMesh algorithm |
|
||||
| OCCT:Data Exchange | Data Exchange module |
|
||||
| OCCT:Visualization | Visualization module |
|
||||
| OCCT:Application Framework | OCAF |
|
||||
| OCCT:DRAW | DRAW Test Harness |
|
||||
| OCCT:Tests | Automatic Test System |
|
||||
| OCCT:Documentation | Documentation |
|
||||
| OCCT:Coding | General code quality |
|
||||
| OCCT:Configuration | Configuration, build system, etc. |
|
||||
| OCCT:Releases | Official OCCT releases |
|
||||
| Website:Tracker | OCCT Mantis issue tracker, tracker.dev.opencascade.org |
|
||||
| Website:Portal | OCCT development portal, dev.opencascade.org |
|
||||
| Website:Git | OCCT Git repository, git.dev.opencascade.org |
|
||||
|
||||
|
||||
@subsection occt_contribution_app_severity Severity
|
||||
@subsubsection occt_contribution_workflow_3_1_1 Severity
|
||||
|
||||
Severity shows at which extent the issue affects the product.
|
||||
The list of used severities is given in the table below in the descending order.
|
||||
|
||||
| Severity | Description |
|
||||
| :---------- | :------------------------------------------------ |
|
||||
| crash | Crash of the application or OS, loss of data |
|
||||
| block | Regression corresponding to the previously delivered official version. Impossible operation of a function on any data with no work-around. Missing function previously requested in software requirements specification. Destroyed data. |
|
||||
| major | Impossible operation of a function with existing work-around. Incorrect operation of a function on a particular dataset. Impossible operation of a function after intentional input of incorrect data. Incorrect behavior of a function after intentional input of incorrect data. |
|
||||
| minor | Incorrect behavior of a function corresponding to the description in software requirements specification. Insufficient performance of a function. |
|
||||
| tweak | Ergonomic inconvenience, need of light updates. |
|
||||
| text | Non-conformance of the program code to the Coding Rules, mistakes and non-functional errors in the source text (e.g. unnecessary variable declarations, missing comments, grammatical errors in user manuals). |
|
||||
| trivial | Cosmetic issues. |
|
||||
| feature | Request for a new feature or improvement. |
|
||||
| integration request | Requested integration of an existing feature into the product. |
|
||||
| just a question | A question to be processed, without need of any changes in the product. |
|
||||
| Severity | Description | Weight for Bug Score |
|
||||
| :---------- | :------------------------------------------------ | :------------------: |
|
||||
| crash | Crash of the application or OS, loss of data | 5 |
|
||||
| block | Regression corresponding to the previously delivered official version. Impossible operation of a function on any data with no work-around. Missing function previously requested in software requirements specification. Destroyed data. | 4 |
|
||||
| major | Impossible operation of a function with existing work-around. Incorrect operation of a function on a particular dataset. Impossible operation of a function after intentional input of incorrect data. Incorrect behavior of a function after intentional input of incorrect data. | 3 |
|
||||
| minor | Incorrect behavior of a function corresponding to the description in software requirements specification. Insufficient performance of a function. | 2 |
|
||||
| tweak | Ergonomic inconvenience, need of light updates. | 1 |
|
||||
| text | Inconsistence of program code to the Coding Standard. Errors in source text (e.g. unnecessary variable declarations, missing comments, grammatical errors in user manuals). | 1 |
|
||||
| trivial | Cosmetic bugs. | 1 |
|
||||
| feature | Bug fix, new feature, improvement that requires workload estimation and validation. | 1 |
|
||||
| integration request | Requested integration of an existing feature into the product. | 0 |
|
||||
| Just a question | A question to be processed, without need of any changes in the product. | 0 |
|
||||
|
||||
@subsection occt_contribution_app_status Status
|
||||
@subsubsection occt_contribution_workflow_3_1_2 Statuses of issues
|
||||
|
||||
The bug statuses that can be applied to the issues are listed in the table below.
|
||||
|
||||
| Status | Description |
|
||||
| :------------------- | :----------------------------------------- |
|
||||
| New | A new, just registered issue. |
|
||||
| Acknowledged | Can be used to mark the issue as postponed. |
|
||||
| Confirmed | Can be used to mark the issue as postponed. |
|
||||
| Feedback | The issue requires more information or a specific action. |
|
||||
| New | New just registered issue. Testing case should be created by Reporter. |
|
||||
| Feedback | The issue requires more information; the original posters should pay attention. |
|
||||
| Assigned | Assigned to a developer. |
|
||||
| Resolved | The issue has been fixed, and now is waiting for review. |
|
||||
| Reviewed | The issue has been reviewed, and now is waiting for testing (or being tested). |
|
||||
| Resolved + a resolution | The issue has been fixed, and now is waiting for revision. |
|
||||
|Revised + a resolution | The issue has been revised, and now is waiting for testing. |
|
||||
| Tested | The fix has been internally tested by the tester with success on the full non-regression database or its part and a test case has been created for this issue. |
|
||||
| Verified | The fix has been integrated into the master of the corresponding repository |
|
||||
| Closed + resolution | The fix has been integrated to the master. The corresponding test case has been executed successfully. The issue is no longer reproduced. |
|
||||
| Closed | The fix has been integrated to the master. The corresponding test case has been executed successfully. The issue is no longer reproduced. |
|
||||
|
||||
@subsection occt_contribution_app_resolution Resolution
|
||||
@subsubsection occt_contribution_workflow_3_1_3 Resolutions
|
||||
|
||||
**Resolution** is set when the bug is closed. "Reopen" resolution is added automatically when the bug is reopened.
|
||||
**Resolution** is set when the bug is resolved. "Reopen" resolution is added automatically when the bug is reopened.
|
||||
|
||||
| Resolution | Description |
|
||||
|:--------------------- | :--------------------------------------------------------------------------- |
|
||||
| Open | The issue is pending. |
|
||||
| Open | The issue is being processed. |
|
||||
| Fixed | The issue has been successfully fixed. |
|
||||
| Reopened | The bug has been reopened because of insufficient fix or regression. |
|
||||
| Unable to reproduce | The bug is not reproduced. |
|
||||
| Not fixable | The bug cannot be fixed because e.g. it is a bug of third party software, OS or hardware limitation, etc. |
|
||||
| Unable to reproduce | The bug is not reproduced. |
|
||||
| Not fixable | The bug cannot be fixed because it is a bug of third party software, or because it requires more workload than it can be allowed. |
|
||||
| Duplicate | The bug for the same issue already exists in the tracker. |
|
||||
| Not a bug | It is a normal behavior in accordance with the specification of the product. |
|
||||
| No change required | The issue didn’t require any change of the product, such as a question issue.|
|
||||
| Suspended | The issue is postponed (for Acknowledged status). |
|
||||
| Documentation updated | The documentation has been updated to resolve a misunderstanding causing the issue. |
|
||||
| Won’t fix | It is decided to keep the existing behavior. |
|
||||
| Not a bug | It is a normal behavior in accordance with the specification of the product |
|
||||
| No change required | The issue didn’t require any change of the product, such as a question issue |
|
||||
| Suspended | This resolution is set for Acknowledged status only. It means that the issue is waiting for fix until a special administrative decision is taken (e.g. a budget is not yet set in accordance with the contract) |
|
||||
| Documentation updated | The issue was a normal behavior of the product, but the actions of the user were wrong. The specification and the user manual have been updated to reflect this issue. |
|
||||
| Won’t fix | An administrative/contractual decision has been taken to not fix the bug |
|
||||
|
||||
@subsection occt_contribution_workflow_3_2 Update and evolution of documentation
|
||||
|
||||
The documentation on Open CASCADE Technology currently exists in three forms:
|
||||
|
||||
* OCCT Technical Documentation generated automatically with Doxygen tool on the basis of comments in CDL or HXX files.
|
||||
* User’s Reference Documentation on OCCT packages and Products supplied in the form of PDF User’s guides
|
||||
* OCCT Release Documentation supplied in the form of Release Notes with each release.
|
||||
|
||||
It is strictly required to properly report the improvements and changes introduced in OCCT in all three forms of Documentation.
|
||||
|
||||
@subsubsection occt_contribution_workflow_3_2_1 Maintenance of CDL files
|
||||
|
||||
Every developer providing a contribution to the source code of OCC
|
||||
should make a relevant change in the corresponding header file, including CDL.
|
||||
|
||||
Making the appropriate comments is mandatory in the following cases:
|
||||
|
||||
* Development of a new package / class / method / enumeration;
|
||||
* Modification of an existing package / class / method / enumeration that changes its behavior;
|
||||
* Modification / new development impacts at other packages / classes / methods / enumerations, the documentation which of should be modified correspondingly.
|
||||
|
||||
The only case when the comments may be not required is introducing
|
||||
a modification that does not change the existing behavior in any noticeable way
|
||||
or brings the behavior in accordance with the existing description.
|
||||
|
||||
CDL description must be in good English, containing as much relevant
|
||||
information and as clear as possible. If the developer is unable to properly formulate
|
||||
his ideas in English or suspects that his description can be misunderstood,
|
||||
he should address to the Documentation Engineer for language assistance.
|
||||
Such action is completely subject to the discretion of the developer; however,
|
||||
the Documentation Engineer can require that the developer should provide a relevant
|
||||
technical documentation and reopen a bug until all documentation satisfies the requirements above.
|
||||
|
||||
@subsubsection occt_contribution_workflow_3_2_2 Maintenance of the User’s Reference Documentation
|
||||
|
||||
The User’s Reference Documentation is distributed among a number of User’s Guides,
|
||||
each describing a certain module of OCCT.
|
||||
The User's Guides do not cover the entire functionality of OCCT;
|
||||
however, they describe most widely used and important packages.
|
||||
|
||||
In most aspects the User's Guides present the information that is contained in CDL descriptions for methods, classes, etc., only from a different point of view. Thus, it is required that any developer who implements a new or modifies an existing package / class / method / enumeration and adds a description of new development or changes in the corresponding CDL file should also check if this class package / class / method / enumeration or the package / class, to which the added class / method belongs is already described in the documentation and update the User’s Reference Documentation correspondingly.
|
||||
|
||||
3.2.3. Preparation of the Release Documentation
|
||||
|
||||
Before changing the bug Status to RESOLVED, the developer should provide a description of the implemented work using the "Additional information and documentation updates" field of Mantis bugtracker.
|
||||
|
||||
This description is used for the Release Documentation and has the following purposes:
|
||||
|
||||
* to inform the OCCT users about the main features and improvements implemented in the platform in the release;
|
||||
* to give a complete and useable list of changes introduced into the OCCT since the latest version.
|
||||
|
||||
The changes should be described from the user’s viewpoint so that the text
|
||||
could be comprehensible even for beginners having a very vague idea about OCCT.
|
||||
If the developer is unable to properly formulate his ideas in English or suspects
|
||||
that his description can be misunderstood, he should address to the Documentation Engineer
|
||||
for language assistance. Such action is completely subject to the discretion of the developer;
|
||||
however, the Documentation Engineer can require that the developer
|
||||
should provide a relevant technical documentation and reopen a bug
|
||||
until all documentation satisfies the requirements.
|
||||
|
||||
**Note**, that it is required to single out the changes in the OCCT behavior as compared to the previous versions and especially the changes to be considered when porting from the previous version of OCCT.
|
||||
|
||||
For example:
|
||||
* If global macros XXX() was used in the code of your application, revise it for direct use of the argument stream object.
|
||||
* You might need to revise the code related to text display in 3d viewer to take into account new approach of using system fonts via XXX library.
|
||||
|
||||
The **Documentation Engineer** is responsible for preparation of the version Release Notes
|
||||
and update of the User’s Guides. If the **Documentation Engineer** considers that the description currently provided by the **Developer** is somehow inadequate or unsatisfactory he can demand the **Developer** to rewrite the documentation with the **Documentation Engineer’s** assistance.
|
||||
|
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 73 KiB |
@@ -59,8 +59,8 @@ const char* DBRep_Set (const char* theNameStr, void* theShapePtr)
|
||||
~~~~~
|
||||
|
||||
Sets the specified shape as a value of DRAW interpreter variable with the given name.
|
||||
- *theNameStr* -- the DRAW interpreter variable name to set.
|
||||
- *theShapePtr* -- a pointer to *TopoDS_Shape* variable.
|
||||
- *theNameStr* - the DRAW interpreter variable name to set.
|
||||
- *theShapePtr* - a pointer to *TopoDS_Shape* variable.
|
||||
|
||||
~~~~~
|
||||
const char* DrawTrSurf_Set (const char* theNameStr, void* theHandlePtr)
|
||||
@@ -69,10 +69,10 @@ const char* DrawTrSurf_SetPnt2d (const char* theNameStr, void* thePnt2dPtr)
|
||||
~~~~~
|
||||
|
||||
Sets the specified geometric object as a value of DRAW interpreter variable with the given name.
|
||||
- *theNameStr* -- the DRAW interpreter variable name to set.
|
||||
- *theHandlePtr* -- a pointer to the geometric variable (Handle to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
|
||||
- *thePntPtr* -- a pointer to the variable of type *gp_Pnt* to be set.
|
||||
- *thePnt2dPtr* -- a pointer to the variable of type *gp_Pnt2d* to be set.
|
||||
- *theNameStr* - the DRAW interpreter variable name to set.
|
||||
- *theHandlePtr* - a pointer to the geometric variable (Handle to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
|
||||
- *thePntPtr* - a pointer to the variable of type *gp_Pnt* to be set.
|
||||
- *thePnt2dPtr* - a pointer to the variable of type *gp_Pnt2d* to be set.
|
||||
|
||||
All these functions are defined in *TKDraw* toolkit and return a string indicating the result of execution.
|
||||
|
||||
@@ -85,8 +85,8 @@ const char* BRepTools_Write (const char* theFileNameStr, void* theShapePtr)
|
||||
~~~~~
|
||||
|
||||
Saves the specified shape to a file with the given name.
|
||||
- *theFileNameStr* -- the name of the file where the shape is saved.
|
||||
- *theShapePtr* -- a pointer to *TopoDS_Shape* variable.
|
||||
- *theFileNameStr* - the name of the file where the shape is saved.
|
||||
- *theShapePtr* - a pointer to *TopoDS_Shape* variable.
|
||||
|
||||
~~~~~
|
||||
const char* BRepTools_Dump (void* theShapePtr)
|
||||
@@ -94,7 +94,7 @@ const char* BRepTools_DumpLoc (void* theShapePtr)
|
||||
~~~~~
|
||||
|
||||
Dumps shape or its location to cout.
|
||||
- *theShapePtr* -- a pointer to *TopoDS_Shape* variable.
|
||||
- *theShapePtr* - a pointer to *TopoDS_Shape* variable.
|
||||
|
||||
The following function is provided by *TKMesh* toolkit:
|
||||
|
||||
@@ -103,8 +103,8 @@ const char* BRepMesh_Dump (void* theMeshHandlePtr, const char* theFileNameStr)
|
||||
~~~~~
|
||||
|
||||
Stores mesh produced in parametric space to BREP file.
|
||||
- *theMeshHandlePtr* -- a pointer to *Handle(BRepMesh_DataStructureOfDelaun)* variable.
|
||||
- *theFileNameStr* -- the name of the file where the mesh is stored.
|
||||
- *theMeshHandlePtr* - a pointer to *Handle(BRepMesh_DataStructureOfDelaun)* variable.
|
||||
- *theFileNameStr* - the name of the file where the mesh is stored.
|
||||
|
||||
The following additional function is provided by *TKGeomBase* toolkit:
|
||||
|
||||
@@ -113,7 +113,7 @@ const char* GeomTools_Dump (void* theHandlePtr)
|
||||
~~~~~
|
||||
|
||||
Dump geometric object to cout.
|
||||
- *theHandlePtr* -- a pointer to the geometric variable (<i>Handle</i> to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
|
||||
- *theHandlePtr* - a pointer to the geometric variable (<i>Handle</i> to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
|
||||
|
||||
@section occt_debug_vstudio Using Visual Studio debugger
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="gp_XY">
|
||||
<Type Name="gp_XY">
|
||||
<DisplayString>[{(float)x} {(float)y}]</DisplayString>
|
||||
</Type>
|
||||
<Type Name="gp_Pnt2d">
|
||||
@@ -40,25 +40,18 @@
|
||||
</Type>
|
||||
<Type Name="Handle_Standard_Transient">
|
||||
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">[cnt={entity->count}]</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">[count={entity->count}]</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*entity</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="NCollection_Handle<*>">
|
||||
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">{(void*)entity} [cnt={entity->count}]</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">[count={entity->count}]</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*((NCollection_Handle<$T1>::Ptr*)entity)->myPtr</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="opencascade::handle<*>">
|
||||
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">{(void*)entity} [cnt={entity->count} {*entity}]</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>(opencascade::handle<$T1>::element_type*)entity</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="TCollection_AsciiString">
|
||||
<DisplayString>{mylength}: {mystring,s}</DisplayString>
|
||||
</Type>
|
||||
@@ -108,17 +101,6 @@
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="NCollection_Sequence<*>">
|
||||
<DisplayString>NCollection_Sequence [{mySize}]</DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems>
|
||||
<Size>mySize</Size>
|
||||
<HeadPointer>myFirstItem</HeadPointer>
|
||||
<NextPointer>myNext</NextPointer>
|
||||
<ValueNode>*($T1*)(sizeof(NCollection_SeqNode) + ((char *)this))</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="Bnd_B2f">
|
||||
<AlternativeType Name="Bnd_B2d"></AlternativeType>
|
||||
<DisplayString Condition="myCenter[0] > 1000000000000000000.">VOID</DisplayString>
|
||||
@@ -161,97 +143,4 @@
|
||||
<Type Name="OpenGl_Context">
|
||||
<DisplayString>[{myGlVerMajor}.{myGlVerMinor}]</DisplayString>
|
||||
</Type>
|
||||
|
||||
<!--ArrayItems Expansion-->
|
||||
<Type Name="TColStd_Array1OfInteger">
|
||||
<DisplayString Condition="isAllocated != 1">empty</DisplayString>
|
||||
<DisplayString>{{size = {myUpperBound - myLowerBound + 1}}}</DisplayString>
|
||||
<Expand>
|
||||
<Item Condition="isAllocated == 1" Name="[size]">myUpperBound - myLowerBound + 1</Item>
|
||||
<ArrayItems Condition="isAllocated == 1">
|
||||
<Size>myUpperBound - myLowerBound + 1</Size>
|
||||
<ValuePointer>(Standard_Integer*)(myStart) + myLowerBound</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TColStd_Array1OfReal">
|
||||
<DisplayString Condition="isAllocated != 1">empty</DisplayString>
|
||||
<DisplayString>{{size = {myUpperBound - myLowerBound + 1}}}</DisplayString>
|
||||
<Expand>
|
||||
<Item Condition="isAllocated == 1" Name="[size]">myUpperBound - myLowerBound + 1</Item>
|
||||
<ArrayItems Condition="isAllocated == 1">
|
||||
<Size>myUpperBound - myLowerBound + 1</Size>
|
||||
<ValuePointer>(Standard_Real*)(myStart) + myLowerBound</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<!--Multi-dimensional Arrays-->
|
||||
<Type Name="TColStd_Array2OfInteger">
|
||||
<DisplayString Condition="(myUpperColumn == myLowerColumn) && (myUpperRow == myLowerRow)">empty</DisplayString>
|
||||
<DisplayString>extent = {(myUpperColumn-myLowerColumn+1) * (myUpperRow-myLowerRow+1)}</DisplayString>
|
||||
</Type>
|
||||
|
||||
|
||||
<!--LinkedListItems Expansion-->
|
||||
<Type Name="TColStd_ListNodeOfListOfInteger">
|
||||
<DisplayString>{{current = {myValue}}}</DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>this</HeadPointer>
|
||||
<NextPointer>(TColStd_ListNodeOfListOfInteger*)myNext</NextPointer>
|
||||
<ValueNode>this->myValue</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TColStd_ListOfInteger">
|
||||
<DisplayString Condition="myFirst == 0">empty</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="values">(TColStd_ListNodeOfListOfInteger*)(myFirst)</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TColStd_ListNodeOfListOfReal">
|
||||
<DisplayString>{{current = {myValue}}}</DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>this</HeadPointer>
|
||||
<NextPointer>(TColStd_ListNodeOfListOfReal*)myNext</NextPointer>
|
||||
<ValueNode>this->myValue</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TColStd_ListOfReal">
|
||||
<DisplayString Condition="myFirst == 0">empty</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="values">(TColStd_ListNodeOfListOfReal*)(myFirst)</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="BRep_ListOfCurveRepresentation">
|
||||
<DisplayString Condition="myFirst == 0">empty</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="values">(BRep_ListNodeOfListOfCurveRepresentation*)(myFirst)</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TopoDS_Shape">
|
||||
<DisplayString>{myOrient} {myTShape} loc={myLocation}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="TopoDS_TShape">
|
||||
<DisplayString>subshapes={myShapes} flags={myFlags}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="BOPDS_Pave">
|
||||
<DisplayString>{{{myIndex} {myParameter}}}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="BOPDS_PaveBlock">
|
||||
<DisplayString>edge={myEdge} orig={myOriginalEdge} pave1={myPave1} pave2={myPave2} extpaves={myExtPaves}</DisplayString>
|
||||
</Type>
|
||||
|
||||
</AutoVisualizer>
|
||||
|
@@ -37,8 +37,8 @@ Follow the instructions to proceed (define proxy settings if needed, select a mi
|
||||
|
||||
**MathJax** is used for rendering math formulas in browser (HTML and CHM outputs): http://www.mathjax.org.
|
||||
|
||||
By default MathJAX scripts and fonts work on-line and no installation of MathJAX is necessary if Internet is accessible.
|
||||
If you need to use OCCT documentation while off-line, you can install a local copy of MatJAX, see https://docs.mathjax.org/en/v2.6-latest/start.html#installing-your-own-copy-of-mathjax.
|
||||
By default MathJAX scripts and fonts are taken from http://cdn.mathjax.org/mathjax/latest and no installation of MathJAX is necessary if Internet is accessible.
|
||||
If you need to use OCCT documentation while off-line, you can install a local copy of MatJAX, see http://www.mathjax.org/download/.
|
||||
See \ref OCCT_DM_SECTION_A_9 for more details on inserting mathematical expressions.
|
||||
|
||||
@section OCCT_DM_SECTION_2_1 Documentation Generation
|
||||
@@ -117,16 +117,16 @@ If you want to use the same image for several documents, you can place it in *do
|
||||
|
||||
|
||||
The documentation is generated in subfolder *doc* :
|
||||
* *html* -- a directory for generated HTML pages;
|
||||
* *pdf* -- a directory for generated PDF files.
|
||||
* *html* - a directory for generated HTML pages;
|
||||
* *pdf* - a directory for generated PDF files.
|
||||
|
||||
@section OCCT_DM_SECTION_4 Adding a New Document
|
||||
|
||||
Place a new document in the folder taking into account its logical position in the documentation hierarchy. For instance, the document *svn.md* about the use of SVN to work with OCCT source code can be placed into <i>/dox/dev_guides/</i>.
|
||||
|
||||
If there are images in the document, it should be placed in its own folder containing a subfolder for images. For instance:
|
||||
* <i> /dox/dev_guides/svn/ </i> -- for *svn.md* file;
|
||||
* <i> /dox/dev_guides/svn/images/ </i> -- for images.
|
||||
* <i> /dox/dev_guides/svn/ </i> - for *svn.md* file;
|
||||
* <i> /dox/dev_guides/svn/images/ </i> - for images.
|
||||
|
||||
Add a relative path to *svn.md* in file <i>dox/FILES.txt</i>. For instance
|
||||
|
||||
@@ -136,7 +136,7 @@ dev_guides/svn/svn.md
|
||||
|
||||
**Note** that the order of paths to documents in *FILES.txt* is reproduced in the Table of Contents in the HTML output. Please, place them logically.
|
||||
|
||||
**Note** that you should specify a file tag, not the document name. See @ref OCCT_DM_SECTION_A_1 "Header and hierarchic document structure" section for details.
|
||||
**Note** that you should specify a file tag, not the document name. See <a href="#OCCT_DM_SECTION_A_1">Header section</a> for details.
|
||||
|
||||
@section OCCT_DOC_SECTION_5 Additional Resources
|
||||
|
||||
@@ -168,9 +168,9 @@ The table of contents, page numbers (in PDF), and figure numbers (in PDF) are ge
|
||||
@subsection OCCT_DM_SECTION_A_1 Headers and hierarchic document structure
|
||||
|
||||
Headers of different levels can be specified with the following tags:
|
||||
* <i>\@section</i> -- for the first-level headers;
|
||||
* <i>\@subsection</i> -- for the second level headers;
|
||||
* <i>\@subsubsection</i> -- for the third level headers.
|
||||
* <i>\@section</i> - for the first-level headers;
|
||||
* <i>\@subsection</i> - for the second level headers;
|
||||
* <i>\@subsubsection</i> - for the third level headers.
|
||||
|
||||
For example:
|
||||
|
||||
|
@@ -66,7 +66,7 @@ The official repository contains:
|
||||
Integration of contributions that have passed certification testing is made exclusively by the Bugmaster.
|
||||
Normally this is made by rebasing the contribution branch on the current master
|
||||
and squashing it into a single commit. This is made to have the master branch history plain and clean,
|
||||
following the general rule “one issue -- one commit”.
|
||||
following the general rule “one issue – one commit”.
|
||||
The description of the commit integrated to the master branch is taken from the Mantis issue
|
||||
(ID, 'Summary', followed by the information from 'Documentation' field if present).
|
||||
|
||||
@@ -97,14 +97,25 @@ The official repository contains:
|
||||
|
||||
@subsubsection occt_gitguide_2_1_1 Installation of Git for Windows
|
||||
|
||||
Download Git for Windows distributive from https://git-for-windows.github.io/
|
||||
Download Git for Windows distributive from http://code.google.com/p/msysgit/downloads/list.
|
||||
During the installation:
|
||||
|
||||
* Check-in "Windows Explorer integration" options:
|
||||
* "Git Bash Here";
|
||||
* "Git GUI Here".
|
||||
* To avoid a mess in your PATH, we recommend selecting "Run Git from Windows Prompt" in the environment settings dialog:
|
||||
* Select Windows Explorer integration options:
|
||||
* Git Bash Here
|
||||
* Git GUI Here
|
||||
|
||||
@image html OCCT_GitGuide_V2_image001.png
|
||||
@image latex OCCT_GitGuide_V2_image001.png
|
||||
|
||||
* To avoid a mess in your PATH, we recommend selecting ‘Run Git from Windows Prompt’ in the environment settings dialog:
|
||||
|
||||
@image html OCCT_GitGuide_V2_image002.png
|
||||
@image latex OCCT_GitGuide_V2_image002.png
|
||||
|
||||
* In "Configuring the line ending conversions" dialog, select "Checkout Windows-style, commit Unix style endings".
|
||||
|
||||
@image html OCCT_GitGuide_V2_image003.png
|
||||
@image latex OCCT_GitGuide_V2_image003.png
|
||||
|
||||
Note that by default Git user interface is localized to the system default language.
|
||||
If you prefer to work with the English interface, remove or rename .msg localization file
|
||||
@@ -117,12 +128,15 @@ The official repository contains:
|
||||
Download TortoiseGit distributive from http://code.google.com/p/tortoisegit/downloads/list.
|
||||
Launch the installation.
|
||||
|
||||
* Select your SSH client. Choose option
|
||||
* "OpenSSH, Git default SSH Client" if you prefer to use command-line tools for SSH keys generation, or
|
||||
* "TortoisePLink, coming from Putty, integrates with Windows better" if you prefer to use GUI tool (PuttyGen, see 3.2).
|
||||
* Complete the installation.
|
||||
* Select your SSH client. Choose OpenSSH if you prefer to use command-line tools
|
||||
for SSH keys generation, or TortoisePLink if you prefer to use GUI tool (PuttyGen, see 3.2):
|
||||
|
||||
@image html OCCT_GitGuide_V2_image004.png
|
||||
@image latex OCCT_GitGuide_V2_image004.png
|
||||
|
||||
* Complete the installation.
|
||||
|
||||
TortoiseGit integrates into Windows Explorer, thus it is possible to use context menu in Windows Explorer to access its functionality:
|
||||
TortoiseGit integrates to Windows Explorer, thus it is possible to use context menu in Windows Explorer to access its functionality:
|
||||
|
||||
@image html OCCT_GitGuide_V2_image005.png
|
||||
@image latex OCCT_GitGuide_V2_image005.png
|
||||
@@ -222,8 +236,8 @@ The official repository contains:
|
||||
|
||||
On Windows, make sure to note the complete path to the generated files (the location of your $HOME might be not obvious). Two key files will be created in the specified location (by default in $HOME/.ssh/):
|
||||
|
||||
* *id_rsa* -- private key
|
||||
* *id_rsa.pub* -- public key
|
||||
* *id_rsa* - private key
|
||||
* *id_rsa.pub* - public key
|
||||
|
||||
The content of the public key file (one text line) is the key to be added to the user account on the site (see below).
|
||||
|
||||
@@ -236,10 +250,11 @@ The official repository contains:
|
||||
@subsection occt_gitguide_3_3 Adding public key in your account
|
||||
|
||||
Log in on the portal http://dev.opencascade.org and click on **My account** link to the right. If you have a Contributor status, you will see **SSH keys** tab to the right.
|
||||
|
||||
Click on that tab, then click **Add a public key**, and paste the text of the public key (see above sections on how to generate the key) into the text box.
|
||||
|
||||
Click **Save** to input the key to the system.
|
||||
Click **Save** to input the key to the system.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image008.png
|
||||
@image latex OCCT_GitGuide_V2_image008.png
|
||||
|
||||
Note that a user can have several SSH keys.
|
||||
You can distinguish between these keys by the Title field ID; by default it is taken from SSH key comment.
|
||||
@@ -265,7 +280,8 @@ Click **Save** to input the key to the system.
|
||||
|
||||
* Create a new branch for your development, basing on the selected version of the sources
|
||||
(usually the current master) and switch your working copy to it
|
||||
* Develop and test your change.
|
||||
* Develop and test your change. Note that for the first time, and after any changes
|
||||
made in CDL files you will have to re-generate build scripts or Visual Studio projects using WOK.
|
||||
* Do as many commits in your branch as you feel convenient;
|
||||
the general recommendation is to commit every stable state (even incomplete), to record the history of your development.
|
||||
* Push your branch to the repository when your development is complete or when you need to share it with other people (e.g. for review)
|
||||
@@ -319,6 +335,10 @@ In the console:
|
||||
In TortoiseGit:
|
||||
* Go to the local copy of the repository.
|
||||
* Right-click in the Explorer window, then choose **Git Create Branch**.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image011.png
|
||||
@image latex OCCT_GitGuide_V2_image011.png
|
||||
|
||||
* Select **Base On** Branch *remotes/origin/master*.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image012.png
|
||||
@@ -357,7 +377,7 @@ In TortoiseGit:
|
||||
> git commit -a -m "Write meaningful commit message here"
|
||||
~~~~~
|
||||
|
||||
Option -a tells the command to automatically include (stage) files
|
||||
Option –a tells the command to automatically include (stage) files
|
||||
that have been modified or deleted, but it will omit the new files that might have been added by you.
|
||||
To commit such new files, you must add (stage) them before commit command.
|
||||
|
||||
@@ -436,7 +456,7 @@ Note that Git forbids pushing a branch if the corresponding remote branch alread
|
||||
@image html OCCT_GitGuide_V2_image019.png
|
||||
@image latex OCCT_GitGuide_V2_image019.png
|
||||
|
||||
Note that the local branches of your repository are the primary place, where your changes are stored until they get integrated to the official version of OCCT (master branch). The branches submitted to official repository are for collaborative work, review, and integration -- that repository should not be used for long-term storage of incomplete changes.
|
||||
Note that the local branches of your repository are the primary place, where your changes are stored until they get integrated to the official version of OCCT (master branch). The branches submitted to official repository are for collaborative work, review, and integration - that repository should not be used for long-term storage of incomplete changes.
|
||||
|
||||
Remove the local branches that you do not need any more. Note that you cannot delete the current branch. It means that you need to switch to another one (e.g. master) if the branch you are going to delete is the current one.
|
||||
|
||||
@@ -519,7 +539,7 @@ To rebase your branch into a single commit, you need to do the following:
|
||||
|
||||
Use of TortoiseGit is recommended for convenient code review:
|
||||
|
||||
* Fetch the changes from the remote repository as described in @ref occt_gitguide_4_7 "Synchronizing with remote repository" section.
|
||||
* Fetch the changes from the remote repository as described in <a href="#occt_gitguide_4_7">Synchronizing with remote repository</a> section.
|
||||
* Right-click on the repository, choose **TortoiseGit** -> **Show** log;
|
||||
* Locate the remote branch you need to review;
|
||||
* To review commits one-by-one, select each commit in the log. The list of changed files is shown at the bottom of the window; double-click on the file will open visual compare tool.
|
||||
|
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_image001.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_image002.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_image003.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_image004.png
Normal file
After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 7.6 KiB |
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_image008.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 8.8 KiB |
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_image011.png
Normal file
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 167 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 5.0 KiB |
@@ -3,15 +3,15 @@
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section testmanual_intro Introduction
|
||||
@section testmanual_1 Introduction
|
||||
|
||||
This document provides OCCT developers and contributors with an overview and practical guidelines for work with OCCT automatic testing system.
|
||||
|
||||
Reading the Introduction should be sufficient for developers to use the test system to control non-regression of the modifications they implement in OCCT. Other sections provide a more in-depth description of the test system, required for modifying the tests and adding new test cases.
|
||||
|
||||
@subsection testmanual_intro_basic Basic Information
|
||||
@subsection testmanual_1_1 Basic Information
|
||||
|
||||
OCCT automatic testing system is organized around @ref occt_user_guides__test_harness "DRAW Test Harness", a console application based on Tcl (a scripting language) interpreter extended by OCCT-related commands.
|
||||
OCCT automatic testing system is organized around DRAW Test Harness @ref occt_user_guides__test_harness "DRAW Test Harness", a console application based on Tcl (a scripting language) interpreter extended by OCCT-related commands.
|
||||
|
||||
Standard OCCT tests are included with OCCT sources and are located in subdirectory *tests* of the OCCT root folder. Other test folders can be included in the test system, e.g. for testing applications based on OCCT.
|
||||
|
||||
@@ -21,10 +21,9 @@ The tests are organized in three levels:
|
||||
* Grid: a set of test cases within a group, usually aimed at testing some particular aspect or mode of execution of the relevant functionality (e.g. buildevol);
|
||||
* Test case: a script implementing an individual test (e.g. K4).
|
||||
|
||||
See @ref testmanual_5_1 "Test Groups" chapter for the current list of available test groups and grids.
|
||||
See <a href="#testmanual_5_1">Test Groups</a> for the current list of available test groups and grids.
|
||||
|
||||
@note Many tests involve data files (typically CAD models) which are located separately and (except a few) are not included with OCCT code.
|
||||
These tests will be skipped if data files are not available.
|
||||
Some tests involve data files (typically CAD models) which are located separately and are not included with OCCT code. The archive with publicly available test data files should be downloaded and installed independently on OCCT sources (see http://dev.opencascade.org).
|
||||
|
||||
@subsection testmanual_1_2 Intended Use of Automatic Tests
|
||||
|
||||
@@ -99,10 +98,10 @@ Example:
|
||||
Detailed logs are saved in D:/occt/results_2012-06-04T0919
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The tests are considered as non-regressive if only OK, BAD (i.e. known problem), and SKIPPED (i.e. not executed, typically because of lack of a data file) statuses are reported. See @ref testmanual_details_results "Interpretation of test results" for details.
|
||||
The tests are considered as non-regressive if only OK, BAD (i.e. known problem), and SKIPPED (i.e. not executed, typically because of lack of a data file) statuses are reported. See <a href="#testmanual_3_5">Interpretation of test results</a> for details.
|
||||
|
||||
The results and detailed logs of the tests are saved by default to a new subdirectory of the subdirectory *results* in the current folder, whose name is generated automatically using the current date and time, prefixed by Git branch name (if Git is available and current sources are managed by Git).
|
||||
If necessary, a non-default output directory can be specified using option <i> -outdir</i> followed by a path to the directory. This directory should be new or empty; use option <i>-overwrite</i> to allow writing results in the existing non-empty directory.
|
||||
If necessary, a non-default output directory can be specified using option <i> –outdir</i> followed by a path to the directory. This directory should be new or empty; use option <i>–overwrite</i> to allow writing results in the existing non-empty directory.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
@@ -110,14 +109,6 @@ Draw[]> testgrid -outdir d:/occt/last_results -overwrite
|
||||
~~~~~
|
||||
In the output directory, a cumulative HTML report <i>summary.html</i> provides links to reports on each test case. An additional report in JUnit-style XML format can be output for use in Jenkins or other continuous integration system.
|
||||
|
||||
To re-run the test cases, which were detected as regressions on the previous run, option <i>-regress dirname</i> should be used.
|
||||
<i>dirname</i> is a path to the directory containing the results of the previous run. Only the test cases with *FAILED* and *IMPROVEMENT* statuses will be tested.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
Draw[]> testgrid -regress d:/occt/last_results
|
||||
~~~~~
|
||||
|
||||
Type <i>help testgrid</i> in DRAW prompt to get help on options supported by *testgrid* command:
|
||||
|
||||
~~~~~
|
||||
@@ -131,10 +122,8 @@ testgrid: Run all tests, or specified group, or one grid
|
||||
-overwrite: force writing logs in existing non-empty directory
|
||||
-xml filename: write XML report for Jenkins (in JUnit-like format)
|
||||
-beep: play sound signal at the end of the tests
|
||||
-regress dirname: re-run only a set of tests that have been detected as regressions on the previous run.
|
||||
Here "dirname" is a path to the directory containing the results of the previous run.
|
||||
Groups, grids, and test cases to be executed can be specified by the list of file
|
||||
masks separated by spaces or commas; default is all (*).
|
||||
Groups, grids, and test cases to be executed can be specified by list of file
|
||||
masks, separated by spaces or comma; default is all (*).
|
||||
~~~~~
|
||||
|
||||
@subsubsection testmanual_1_3_3 Running a Single Test
|
||||
@@ -176,31 +165,31 @@ test: Run specified test case
|
||||
This key will be ignored if the "-echo" key is already set.
|
||||
~~~~~
|
||||
|
||||
@subsubsection testmanual_intro_quick_create Creating a New Test
|
||||
@subsubsection testmanual_1_3_4 Creating a New Test
|
||||
|
||||
The detailed rules of creation of new tests are given in @ref testmanual_3 "Creation and modification of tests" chapter. The following short description covers the most typical situations:
|
||||
The detailed rules of creation of new tests are given in <a href="#testmanual_3">section 3</a>. The following short description covers the most typical situations:
|
||||
|
||||
Use prefix <i>bug</i> followed by Mantis issue ID and, if necessary, additional suffixes, for naming the test script, data files, and DRAW commands specific for this test case.
|
||||
|
||||
1. If the test requires C++ code, add it as new DRAW command(s) in one of files in *QABugs* package.
|
||||
2. Add script(s) for the test case in the subfolder corresponding to the relevant OCCT module of the group *bugs* <i>($CASROOT/tests/bugs)</i>. See @ref testmanual_5_2 "the correspondence map".
|
||||
2. Add script(s) for the test case in the subfolder corresponding to the relevant OCCT module of the group *bugs* <i>($CASROOT/tests/bugs)</i>. See <a href="#testmanual_5_2">the correspondence map</a>.
|
||||
3. In the test script:
|
||||
* Load all necessary DRAW modules by command *pload*.
|
||||
* Use command *locate_data_file* to get a path to data files used by test script. (Make sure to have this command not inside catch statement if it is used.)
|
||||
* Use DRAW commands to reproduce the tested situation.
|
||||
* Make sure that in case of failure the test produces a message containing word "Error" or other recognized by the test system as error (add new error patterns in file parse.rules if necessary).
|
||||
* If the test case reports error due to an existing problem and the fix is not available, add @ref testmanual_3_6 "TODO" statement for each error to mark it as a known problem. The TODO statements must be specific so as to match the actually generated messages but not all similar errors.
|
||||
* To check expected output which should be obtained as the test result, add @ref testmanual_3_7 "REQUIRED" statement for each line of output to mark it as required.
|
||||
* If the test case produces error messages (contained in parse.rules), which are expected in that test and should not be considered as its failure (e.g. test for *checkshape* command), add REQUIRED statement for each error to mark it as required output.
|
||||
4. If the test uses data file(s) that are not yet present in the test database, it is possible to put them to (sub)directory pointed out by *CSF_TestDataPath* variable for running test. The files should be attached to the Mantis issue corresponding to the tested modification.
|
||||
5. Check that the test case runs as expected (test for fix: OK with the fix, FAILED without the fix; test for existing problem: BAD), and integrate it to the Git branch created for the issue.
|
||||
* Use DRAW commands to reproduce the situation being tested.
|
||||
* Make sure that in case of failure the test produces message containing word "Error" or other recognized by test system as error (add new error patterns in file parse.rules if necessary).
|
||||
* If test case reports error due to existing problem and the fix is not available, add @ref testmanual_3_6 "TODO" statement for each error to mark it as known problem. The TODO statements must be specific so as to match the actually generated messages but not all similar errors.
|
||||
* To check expected output which should be obtained as a result of a test, add @ref testmanual_3_7 "REQUIRED" statement for each line of output to mark it as required.
|
||||
* If test case produces error messages (contained in parse.rules) which are expected in that test and should not be considered as its failure (e.g. test for checkshape command), add REQUIRED statement for each error to mark it as required output.
|
||||
4. If the test uses data file(s) not yet present in the test database, these can be put to (sub)directory pointed out by *CSF_TestDataPath* variable for running test. The files should be attached to Mantis issue corresponding to the modification being tested.
|
||||
5. Check that the test case runs as expected (test for fix: OK with the fix, FAILED without the fix; test for existing problem: BAD), and integrate to Git branch created for the issue.
|
||||
|
||||
Example:
|
||||
|
||||
* Added files:
|
||||
|
||||
~~~~~
|
||||
git status -short
|
||||
git status –short
|
||||
A tests/bugs/heal/data/bug210_a.brep
|
||||
A tests/bugs/heal/data/bug210_b.brep
|
||||
A tests/bugs/heal/bug210_1
|
||||
@@ -299,7 +288,7 @@ This file is a TCL script. It is executed after every test in the current group.
|
||||
|
||||
Note: *TEST COMPLETED* string should be present in the output to indicate that the test is finished without crash.
|
||||
|
||||
See @ref testmanual_3 "Creation and modification of tests" chapter for more information.
|
||||
See <a href="#testmanual_3">section 3</a> for more information.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
@@ -317,7 +306,7 @@ The test group may contain *parse.rules* file. This file defines patterns used f
|
||||
|
||||
Each line in the file should specify a status (single word), followed by a regular expression delimited by slashes (*/*) that will be matched against lines in the test output log to check if it corresponds to this status.
|
||||
|
||||
The regular expressions should follow <a href="http://www.tcl.tk/man/tcl/TclCmd/re_syntax.htm">Tcl syntax</a>, with a special exception that "\b" is considered as word limit (Perl-style), in addition to "\y" used in Tcl.
|
||||
The regular expressions should follow <a href="http://www.tcl.tk/man/tcl/TclCmd/re_syntax.htm">Tcl syntax</a>, with special exception that "\b" is considered as word limit (Perl-style), in addition to "\y" used in Tcl.
|
||||
|
||||
The rest of the line can contain a comment message, which will be added to the test report when this status is detected.
|
||||
|
||||
@@ -332,7 +321,7 @@ Example:
|
||||
|
||||
Lines starting with a *#* character and blank lines are ignored to allow comments and spacing.
|
||||
|
||||
See @ref testmanual_details_results "Interpretation of test results" chapter for details.
|
||||
See <a href="#testmanual_3_5">Interpretation of test results</a> chapter for details.
|
||||
|
||||
If a line matches several rules, the first one applies. Rules defined in the grid are checked first, then rules in the group, then rules in the test root directory. This allows defining some rules on the grid level with status *IGNORE* to ignore messages that would otherwise be treated as errors due to the group level rules.
|
||||
|
||||
@@ -345,7 +334,7 @@ Example:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@subsubsection testmanual_2_2_6 Directory "data"
|
||||
The test group may contain subdirectory *data*, where test scripts shared by different test grids can be put. See also @ref testmanual_2_3_5 "Directory data".
|
||||
The test group may contain subdirectory *data*, where test scripts shared by different test grids can be put. See also <a href="#testmanual_2_3_5">Directory *data*</a>.
|
||||
|
||||
@subsection testmanual_2_3 Test Grids
|
||||
|
||||
@@ -451,7 +440,7 @@ This section describes how to add new tests and update existing ones.
|
||||
|
||||
The new tests are usually added in the frame of processing issues in OCCT Mantis tracker.
|
||||
Such tests in general should be added to group bugs, in the grid
|
||||
corresponding to the affected OCCT functionality. See @ref testmanual_5_2 "Mapping of OCCT functionality to grid names in group bugs".
|
||||
corresponding to the affected OCCT functionality. See <a href="#testmanual_5_2">Mapping of OCCT functionality to grid names in group *bugs*</a>.
|
||||
|
||||
New grids can be added as necessary to contain tests for the functionality not yet covered by existing test grids.
|
||||
The test case name in the bugs group should be prefixed by the ID of the corresponding issue in Mantis (without leading zeroes) with prefix *bug*. It is recommended to add a suffix providing a hint on the tested situation. If more than one test is added for a bug, they should be distinguished by suffixes; either meaningful or just ordinal numbers.
|
||||
@@ -571,10 +560,10 @@ Other Tcl variables defined during the test execution are:
|
||||
|
||||
In order to ensure that the test works as expected in different environments, observe the following additional rules:
|
||||
* Avoid using external commands such as *grep, rm,* etc., as these commands can be absent on another system (e.g. on Windows); use facilities provided by Tcl instead.
|
||||
* Do not put call to *locate_data_file* in catch statement -- this can prevent correct interpretation of the missing data file by the test system.
|
||||
* Do not put call to *locate_data_file* in catch statement – this can prevent correct interpretation of the missing data file by the test system.
|
||||
* Do not use commands *decho* and *dlog* in the test script, to avoid interference with use of these commands by the test system.
|
||||
|
||||
@subsection testmanual_details_results Interpretation of test results
|
||||
@subsection testmanual_3_5 Interpretation of test results
|
||||
|
||||
The result of the test is evaluated by checking its output against patterns defined in the files *parse.rules* of the grid and group.
|
||||
|
||||
@@ -632,8 +621,8 @@ puts "TODO OCC22817 All: TEST INCOMPLETE"
|
||||
|
||||
@subsection testmanual_3_7 Marking required output
|
||||
|
||||
To check the obtained test output matches the expected results considered correct, add REQUIRED statement for each specific message.
|
||||
For that, the following statement should be added to the corresponding test script:
|
||||
To check expected output which must be obtained as a result of a test for it to be considered correct, add REQUIRED statement for each specific message.
|
||||
For that, the following statement should be added to such a test script:
|
||||
|
||||
~~~~~
|
||||
puts "REQUIRED ListOfPlatforms: RegularExpression"
|
||||
@@ -641,11 +630,11 @@ puts "REQUIRED ListOfPlatforms: RegularExpression"
|
||||
|
||||
Here *ListOfPlatforms* and *RegularExpression* have the same meaning as in TODO statements described above.
|
||||
|
||||
The REQUIRED statement can also be used to mask the message that would normally be interpreted as error (according to the rules defined in *parse.rules*) but should not be considered as such within the current test.
|
||||
The REQUIRED statament can also be used to mask message that would normally be interpreted as error (according to rules defined in *parse.rules*) but should not be considered as such within current test.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
puts "REQUIRED Linux: Faulty shapes in variables faulty_1 to faulty_5"
|
||||
puts "TODO REQUIRED Linux: Faulty shapes in variables faulty_1 to faulty_5"
|
||||
~~~~~
|
||||
|
||||
This statement notifies test system that errors reported by *checkshape* command are expected in that test case, and test should be considered as OK if this message appears, despite of presence of general rule stating that 'Faulty' signals failure.
|
||||
@@ -706,15 +695,15 @@ testdiff dir1 dir2 [groupname [gridname]] [options...]
|
||||
Here *dir1* and *dir2* are directories containing logs of two test runs.
|
||||
|
||||
Possible options are:
|
||||
* <i>-save \<filename\> </i> -- saves the resulting log in a specified file (<i>$dir1/diff-$dir2.log</i> by default). HTML log is saved with the same name and extension .html;
|
||||
* <i>-status {same|ok|all}</i> -- allows filtering compared cases by their status:
|
||||
* *same* -- only cases with same status are compared (default);
|
||||
* *ok* -- only cases with OK status in both logs are compared;
|
||||
* *all* -- results are compared regardless of status;
|
||||
* <i>-verbose \<level\> </i> -- defines the scope of output data:
|
||||
* 1 -- outputs only differences;
|
||||
* 2 -- additionally outputs the list of logs and directories present in one of directories only;
|
||||
* 3 -- (by default) additionally outputs progress messages;
|
||||
* <i>-save \<filename\> </i> - saves the resulting log in a specified file (<i>$dir1/diff-$dir2.log</i> by default). HTML log is saved with the same name and extension .html;
|
||||
* <i>-status {same|ok|all}</i> - allows filtering compared cases by their status:
|
||||
* *same* - only cases with same status are compared (default);
|
||||
* *ok* - only cases with OK status in both logs are compared;
|
||||
* *all* - results are compared regardless of status;
|
||||
* <i>-verbose \<level\> </i> - defines the scope of output data:
|
||||
* 1 - outputs only differences;
|
||||
* 2 - additionally outputs the list of logs and directories present in one of directories only;
|
||||
* 3 - (by default) additionally outputs progress messages;
|
||||
|
||||
Example:
|
||||
|
||||
@@ -761,9 +750,9 @@ This group allows testing Boolean operations.
|
||||
DRAW module: MODELING (packages *BOPTest* and *BRepTest*).
|
||||
|
||||
Grids names are based on name of the command used, with suffixes:
|
||||
* <i>_2d</i> -- for tests operating with 2d objects (wires, wires, 3d objects, etc.);
|
||||
* <i>_simple</i> -- for tests operating on simple shapes (boxes, cylinders, toruses, etc.);
|
||||
* <i>_complex</i> -- for tests dealing with complex shapes.
|
||||
* <i>_2d</i> – for tests operating with 2d objects (wires, wires, 3d objects, etc.);
|
||||
* <i>_simple</i> – for tests operating on simple shapes (boxes, cylinders, toruses, etc.);
|
||||
* <i>_complex</i> – for tests dealing with complex shapes.
|
||||
|
||||
| Grid | Commands | Functionality |
|
||||
| :---- | :----- | :------- |
|
||||
@@ -797,7 +786,7 @@ Grids names are based on name of the command used, with suffixes:
|
||||
This group allows testing cases coming from Mantis issues.
|
||||
|
||||
The grids are organized following OCCT module and category set for the issue in the Mantis tracker.
|
||||
See @ref testmanual_5_2 "Mapping of OCCT functionality to grid names in group bugs" chapter for details.
|
||||
See <a href="#testmanual_5_2">Mapping of OCCT functionality to grid names in group *bugs*</a> for details.
|
||||
|
||||
@subsubsection testmanual_5_1_5 caf
|
||||
|
||||
@@ -1066,7 +1055,6 @@ Error : Number of faults is UNSTABLE
|
||||
~~~~~
|
||||
|
||||
@subsubsection testmanual_5_3_2 Shape tolerance
|
||||
|
||||
The maximal tolerance of sub-shapes of each kind of the resulting shape can be extracted from output of tolerance command as follows:
|
||||
|
||||
~~~~~
|
||||
@@ -1081,10 +1069,10 @@ It is possible to use command *checkmaxtol* to check maximal tolerance of shape
|
||||
Use: checkmaxtol shape [options...]
|
||||
|
||||
Allowed options are:
|
||||
* <i>-ref</i> -- reference value of maximum tolerance;
|
||||
* <i>-source</i> -- list of shapes to compare with;
|
||||
* <i>-min_tol</i> -- minimum tolerance for comparison;
|
||||
* <i>-multi_tol</i> -- tolerance multiplier.
|
||||
* -ref: reference value of maximum tolerance
|
||||
* -source: list of shapes to compare with
|
||||
* -min_tol: minimum tolerance for comparison
|
||||
* -multi_tol: tolerance multiplier
|
||||
|
||||
The default syntax of *checkmaxtol* command for comparison with the reference value:
|
||||
~~~~~
|
||||
@@ -1123,10 +1111,9 @@ if { abs($area - $expected) > 0.1 + 0.01 * abs ($area) } {
|
||||
|
||||
@subsubsection testmanual_5_3_4 Memory leaks
|
||||
|
||||
The test system measures the amount of memory used by each test case. Considerable deviations (as well as the overall difference) in comparison with reference results can be reported by command *testdiff* (see @ref testmanual_4_4).
|
||||
The test system measures the amount of memory used by each test case, and considerable deviations (as well as overall difference) comparing with reference results will be reported by *testdiff* command.
|
||||
|
||||
To check memory leak on a particular operation, run it in a cycle, measure the memory consumption at each step and compare it with a threshold value.
|
||||
The command *checktrend* (defined in *tests/bugs/begin*) can be used to analyze a sequence of memory measurements and to get a statistically based evaluation of the leak presence.
|
||||
The typical approach to checking memory leak on a particular operation is to run this operation in cycle measuring memory consumption at each step and comparing it with some threshold value. Note that file begin in group bugs defines command *checktrend* that can be used to analyze a sequence of memory measurements to get statistically based evaluation of the leak presence.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
@@ -1145,7 +1132,7 @@ for {set i 1} {$i < 100} {incr i} {
|
||||
|
||||
@subsubsection testmanual_5_3_5 Visualization
|
||||
|
||||
The following command sequence allows you to take a snapshot of the viewer, give it the name of the test case, and save in the directory indicated by Tcl variable *imagedir*.
|
||||
Take a snapshot of the viewer, give it the name of the test case, and save in the directory indicated by Tcl variable *imagedir*.
|
||||
|
||||
~~~~~
|
||||
vinit
|
||||
@@ -1159,71 +1146,27 @@ vdump $imagedir/${casename}_shading.png
|
||||
|
||||
This image will be included in the HTML log produced by *testgrid* command and will be checked for non-regression through comparison of images by command *testdiff*.
|
||||
|
||||
Also it is possible to use command *checkview* to make a snapshot of the viewer.
|
||||
|
||||
Use: checkview [options...]
|
||||
Allowed options are:
|
||||
* <i>-display shapename </i> -- displays shape with name *shapename*;
|
||||
* <i>-3d </i> -- displays shape in 3d viewer;
|
||||
* <i>-2d [ v2d / smallview ] </i> - displays shape in 2d viewer (the default viewer is *smallview*);
|
||||
* <i>-path PATH</i> -- sets the location of the saved viewer screenshot;
|
||||
* <i>-vdispmode N</i> -- sets *vdispmode* for 3d viewer (default value is 1)
|
||||
* <i>-screenshot</i> -- makes a screenshot of already created viewer
|
||||
* The procedure can check a property of shape (length, area or volume) and compare it with value *N*:
|
||||
* <i>-l [N]</i>
|
||||
* <i>-s [N]</i>
|
||||
* <i>-v [N]</i>
|
||||
* If the current property is equal to value *N*, the shape is marked as valid in the procedure.
|
||||
* If value *N* is not given, the procedure will mark the shape as valid if the current property is non-zero.
|
||||
* <i>-with {a b c}</i> -- displays shapes *a, b* and *c* together with the shape (if the shape is valid)
|
||||
* <i>-otherwise {d e f}</i> -- displays shapes *d, e* and *f* instead of the shape (if the shape is NOT valid)
|
||||
|
||||
Note that is required to use either option <i> -2d </i> or option <i> -3d</i>.
|
||||
|
||||
Examples:
|
||||
~~~~~
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||
checkview -display result -3d -path ${imagedir}/${test_image}.png
|
||||
checkview -display result_2d -2d v2d -path ${imagedir}/${test_image}.png
|
||||
~~~~~
|
||||
|
||||
~~~~~
|
||||
box a 10 10 10
|
||||
box b 5 5 5 10 10 10
|
||||
bcut result b a
|
||||
set result_vertices [explode result v]
|
||||
checkview -display result -2d -with ${result_vertices} -otherwise { a b } -l -path ${imagedir}/${test_image}.png
|
||||
~~~~~
|
||||
|
||||
~~~~~
|
||||
box a 10 10 10
|
||||
box b 5 5 5 10 10 10
|
||||
bcut result b a
|
||||
vinit
|
||||
vdisplay a b
|
||||
vfit
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
~~~~~
|
||||
|
||||
@subsubsection testmanual_5_3_6 Number of free edges
|
||||
|
||||
Procedure *checkfreebounds* compares the number of free edges with a reference value.
|
||||
To check the number of free edges run the command *checkfreebounds*.
|
||||
|
||||
It compares number of free edges with reference value.
|
||||
|
||||
Use: checkfreebounds shape ref_value [options...]
|
||||
|
||||
Allowed options are:
|
||||
* <i>-tol N</i> -- used tolerance (default -0.01);
|
||||
* <i>-type N</i> -- used type, possible values are "closed" and "opened" (default "closed").
|
||||
* -tol N: used tolerance (default -0.01)
|
||||
* -type N: used type, possible values are "closed" and "opened" (default "closed")
|
||||
|
||||
~~~~~
|
||||
checkfreebounds result 13
|
||||
~~~~~
|
||||
|
||||
Option <i>-tol N</i> defines tolerance for command *freebounds*, which is used within command *checkfreebounds*.
|
||||
Option -tol N is used to set tolerance for command *freebounds*, which is used within command *checkfreebounds*.
|
||||
|
||||
Option <i>-type N</i> is used to select the type of counted free edges: closed or open.
|
||||
Option -type N is used to select the type of counted free edges - closed or opened.
|
||||
|
||||
If the number of free edges in the resulting shape is unstable, the reference value should be set to "-1".
|
||||
If the number of free edges in the resulting shape is unstable, reference value should be set to "-1".
|
||||
As a result command *checkfreebounds* will return the following error:
|
||||
|
||||
~~~~~
|
||||
@@ -1233,7 +1176,7 @@ Error : Number of free edges is UNSTABLE
|
||||
|
||||
@subsubsection testmanual_5_3_7 Compare numbers
|
||||
|
||||
Procedure *checkreal* checks the equality of two reals with a tolerance (relative and absolute).
|
||||
Procedure to check equality of two reals with some tolerance (relative and absolute)
|
||||
|
||||
Use: checkreal name value expected tol_abs tol_rel
|
||||
|
||||
@@ -1243,12 +1186,11 @@ checkreal "Some important value" $value 5 0.0001 0.01
|
||||
|
||||
@subsubsection testmanual_5_3_8 Check number of sub-shapes
|
||||
|
||||
Procedure *checknbshapes* compares the number of sub-shapes in "shape" with the given reference data.
|
||||
Compare number of sub-shapes in "shape" with given reference data
|
||||
|
||||
Use: checknbshapes shape [options...]
|
||||
|
||||
Allowed options are:
|
||||
* <i>-vertex N
|
||||
* -vertex N
|
||||
* -edge N
|
||||
* -wire N
|
||||
* -face N
|
||||
@@ -1257,9 +1199,9 @@ Allowed options are:
|
||||
* -compsolid N
|
||||
* -compound N
|
||||
* -shape N
|
||||
* -t</i> -- compares the number of sub-shapes in "shape" counting
|
||||
* -t: compare the number of sub-shapes in "shape" counting
|
||||
the same sub-shapes with different location as different sub-shapes.
|
||||
* <i>-m msg</i> -- prints "msg" in case of error
|
||||
* -m msg: print "msg" in case of error
|
||||
|
||||
~~~~~
|
||||
checknbshapes result -vertex 8 -edge 4
|
||||
@@ -1267,127 +1209,18 @@ checknbshapes result -vertex 8 -edge 4
|
||||
|
||||
@subsubsection testmanual_5_3_9 Check pixel color
|
||||
|
||||
Command *checkcolor* can be used to check pixel color.
|
||||
To check pixel color command *checkcolor* can be used.
|
||||
|
||||
Use: checkcolor x y red green blue
|
||||
|
||||
where:
|
||||
* <i>x, y</i> -- pixel coordinates;
|
||||
* <i>red green blue</i> -- expected pixel color (values from 0 to 1).
|
||||
x y - pixel coordinates
|
||||
|
||||
This procedure checks color with tolerance (5x5 area).
|
||||
red green blue - expected pixel color (values from 0 to 1)
|
||||
|
||||
This procedure checks color with tolerance (5x5 area)
|
||||
|
||||
Next example will compare color of point with coordinates x=100 y=100 with RGB color R=1 G=0 B=0.
|
||||
If colors are not equal, procedure will check the nearest ones points (5x5 area)
|
||||
~~~~~
|
||||
checkcolor 100 100 1 0 0
|
||||
~~~~~
|
||||
|
||||
@subsubsection testmanual_5_3_10 Compute length, area and volume of input shape
|
||||
|
||||
Procedure *checkprops* computes length, area and volume of the input shape.
|
||||
|
||||
Use: checkprops shapename [options...]
|
||||
|
||||
Allowed options are:
|
||||
* <i>-l LENGTH</i> -- command *lprops*, computes the mass properties of all edges in the shape with a linear density of 1;
|
||||
* <i>-s AREA</i> -- command *sprops*, computes the mass properties of all faces with a surface density of 1;
|
||||
* <i>-v VOLUME</i> -- command *vprops*, computes the mass properties of all solids with a density of 1;
|
||||
* <i>-eps EPSILON</i> -- the epsilon defines relative precision of computation;
|
||||
* <i>-equal SHAPE</i> -- compares area, volume and length of input shapes. Puts error if they are not equal;
|
||||
* <i>-notequal SHAPE</i> -- compares area, volume and length of input shapes. Puts error if they are equal.
|
||||
|
||||
Options <i> -l, -s </i> and <i> -v</i> are independent and can be used in any order. Tolerance *epsilon* is the same for all options.
|
||||
|
||||
~~~~~
|
||||
checkprops result -s 6265.68
|
||||
checkprops result -s -equal FaceBrep
|
||||
~~~~~
|
||||
|
||||
@subsubsection testmanual_5_3_11 Parse output dump and compare it with reference values
|
||||
|
||||
Procedure *checkdump* is used to parse output dump and compare it with reference values.
|
||||
|
||||
Use: checkdump shapename [options...]
|
||||
|
||||
Allowed options are:
|
||||
* <i>-name NAME</i> -- list of parsing parameters (e.g. Center, Axis, etc.);
|
||||
* <i>-ref VALUE</i> -- list of reference values for each parameter in *NAME*;
|
||||
* <i>-eps EPSILON</i> -- the epsilon defines relative precision of computation.
|
||||
|
||||
~~~~~
|
||||
checkdump result -name {Center Axis XAxis YAxis Radii} -ref {{-70 0} {-1 -0} {-1 -0} {0 -1} {20 10}} -eps 0.01
|
||||
~~~~~
|
||||
|
||||
@subsubsection testmanual_5_3_12 Compute length of input curve
|
||||
|
||||
Procedure *checklength* computes length of the input curve.
|
||||
|
||||
Use: checklength curvename [options...]
|
||||
|
||||
Allowed options are:
|
||||
* <i>-l LENGTH</i> -- command *length*, computes the length of the input curve with precision of computation;
|
||||
* <i>-eps EPSILON</i> -- the epsilon defines a relative precision of computation;
|
||||
* <i>-equal CURVE</i> -- compares the length of input curves. Puts error if they are not equal;
|
||||
* <i>-notequal CURVE</i> -- compares the length of input curves. Puts error if they are equal.
|
||||
|
||||
~~~~~
|
||||
checklength cp1 -l 7.278
|
||||
checklength res -l -equal ext_1
|
||||
~~~~~
|
||||
@subsubsection testmanual_5_3_13 Check maximum deflection, number of triangles and nodes in mesh
|
||||
|
||||
Command *checktrinfo* can be used to to check the maximum deflection, as well as the number of nodes and triangles in mesh.
|
||||
|
||||
Use: checktrinfo shapename [options...]
|
||||
|
||||
Allowed options are:
|
||||
* <i>-tri [N]</i> -- compares the current number of triangles in *shapename* mesh with the given reference data.
|
||||
If reference value N is not given and the current number of triangles is equal to 0, procedure *checktrinfo* will print an error.
|
||||
* <i>-nod [N]</i> -- compares the current number of nodes in *shapename* mesh with the given reference data.
|
||||
If reference value N is not given and the current number of nodes is equal to 0, procedure *checktrinfo* will print an error.
|
||||
* <i>-defl [N]</i> -- compares the current value of maximum deflection in *shapename* mesh with the given reference data.
|
||||
If reference value N is not given and current maximum deflection is equal to 0, procedure *checktrinfo* will print an error.
|
||||
* <i>-max_defl N</i> -- compares the current value of maximum deflection in *shapename* mesh with the max possible value.
|
||||
* <i>-tol_abs_tri N</i> -- absolute tolerance for comparison of number of triangles (default value 0).
|
||||
* <i>-tol_rel_tri N</i> -- relative tolerance for comparison of number of triangles (default value 0).
|
||||
* <i>-tol_abs_nod N</i> -- absolute tolerance for comparison of number of nodes (default value 0).
|
||||
* <i>-tol_rel_nod N</i> -- relative tolerance for comparison of number of nodes (default value 0).
|
||||
* <i>-tol_abs_defl N</i> -- absolute tolerance for deflection comparison (default value 0).
|
||||
* <i>-tol_rel_defl N</i> -- relative tolerance for deflection comparison (default value 0).
|
||||
* <i>-ref [trinfo a]</i> -- compares deflection, number of triangles and nodes in *shapename* and *a*.
|
||||
|
||||
Note that options <i> -tri, -nod </i> and <i> -defl </i> do not work together with option <i> -ref</i>.
|
||||
|
||||
Examples:
|
||||
|
||||
Comparison with some reference values:
|
||||
~~~~~
|
||||
checktrinfo result -tri 129 -nod 131 -defl 0.01
|
||||
~~~~~
|
||||
|
||||
Comparison with another mesh:
|
||||
~~~~~
|
||||
checktrinfo result -ref [tringo a]
|
||||
~~~~~
|
||||
|
||||
Comparison of deflection with the max possible value:
|
||||
~~~~~
|
||||
checktrinfo result -max_defl 1
|
||||
~~~~~
|
||||
|
||||
Check that the current values are not equal to zero:
|
||||
~~~~~
|
||||
checktrinfo result -tri -nod -defl
|
||||
~~~~~
|
||||
|
||||
Check that the number of triangles and the number of nodes are not equal to some specific values:
|
||||
~~~~~
|
||||
checktrinfo result -tri !10 -nod !8
|
||||
~~~~~
|
||||
|
||||
It is possible to compare current values with reference values with some tolerances.
|
||||
Use options <i>-tol_\* </i> for that.
|
||||
~~~~~
|
||||
checktrinfo result -defl 1 -tol_abs_defl 0.001
|
||||
~~~~~
|
||||
|
@@ -5,349 +5,53 @@ Upgrade from older OCCT versions {#occt_dev_guides__upgrade}
|
||||
|
||||
@section upgrade_intro Introduction
|
||||
|
||||
This document provides technical details on changes made in particular versions of OCCT. It can help to upgrade user applications based on previous versions of OCCT to newer ones.
|
||||
This document provides technical details on changes made in particular versions of OCCT, and is aimed to help upgrading user applications based on previous versions of OCCT to newer ones.
|
||||
|
||||
@subsection upgrade_intro_precautions Precautions
|
||||
|
||||
Back-up your code before the upgrade.
|
||||
We strongly recommend using version control system during the upgrade process and saving one or several commits at each step of upgrade, until the overall result is verified.
|
||||
This will facilitate identification and correction of possible problems that can occur at the intermediate steps of upgrade.
|
||||
It is advisable to document each step carefully to be able to repeat it if necessary.
|
||||
Back-up your code before upgrade.
|
||||
We strongly recommend using version control system during upgrade process, saving one or several commits for each step of upgrade, until overall result is verified.
|
||||
This will facilitate identification and correction of possible problems that can occur on intermediate steps of upgrade.
|
||||
Carefully document each step to be able to repeat it if necessary.
|
||||
|
||||
@subsection upgrade_intro_disclaim Disclaimer
|
||||
|
||||
This document describes known issues that have been encountered during porting of OCCT and some applications and approaches that have helped to resolve these issues in known cases.
|
||||
This document describes known issues that have been encountered in porting of OCCT and some applications, and approaches that helped to resolve these issues in known cases.
|
||||
It does not pretend to cover all possible migration issues that can appear in your application.
|
||||
Take this document with discretion; apply your expertise and knowledge of your application to ensure the correct result.
|
||||
Please take this document with discretion; apply your expertise and knowledge of your application to ensure correct result.
|
||||
|
||||
The automatic upgrade tool is provided as is, without warranty of any kind, and we explicitly disclaim any liability for possible errors that may appear due to use of this tool.
|
||||
The automatic upgrade tool is provided as-is, without warranty of any kind, and we explicitly disclaim any liability for possible errors that may appear due to use of this tool.
|
||||
It is your responsibility to ensure that the changes you made in your code are correct.
|
||||
When you upgrade the code by an automatic script, make sure to carefully review the introduced changes at each step before committing them.
|
||||
|
||||
|
||||
@section upgrade_65 Upgrade to OCCT 6.5.0
|
||||
|
||||
Porting of user applications from an earlier OCCT version to version 6.5 requires taking into account the following major changes:
|
||||
* If you are not comfortable with dependence on Intel TBB, FreeImage, or Gl2Ps libraries, you will need to (re)build OCCT with these dependencies disabled.
|
||||
* The low-level format version of OCAF binary and XML persistence has been incremented. Hence, the files saved by OCCT 6.5 to OCAF binary or XML format will not be readable by previous versions of OCCT.
|
||||
* The *BRepMesh* triangulation algorithm has been seriously revised and now tries hard to fulfill the requested deflection and angular tolerance parameters. If you experience any problems with performance or triangulation quality (in particular, display of shapes in shading mode), consider revising the values of these parameters used in your application.
|
||||
* If you were using method *ToPixMap()* of class *V3d_View* to get a buffer for passing to Windows API functions (e.g. *BitBlt*), this will not work anymore. You will need to use method *Image_PixMap::AccessBuffer()* to get the raw buffer data that can be further passed to WinAPI functions.
|
||||
* As the processing of message gravity parameter in *Message* package has been improved, some application messages (especially the ones generated by IGES or STEP translators) can be suppressed or new messages appear in the application. Use relevant message level parameter to tune this behavior.
|
||||
|
||||
@section upgrade_651 Upgrade to OCCT 6.5.1
|
||||
|
||||
Porting of user applications from an earlier OCCT version to version 6.5.1 requires taking into account the following major changes:
|
||||
|
||||
* Method *Graphic3d_Structure::Groups()* now returns *Graphic3d_SequenceOfGroup*. If this method has been used, the application code should be updated to iterate another collection type or, if *Graphic3d_HSetOfGroup* is required, to fill its own collection:
|
||||
~~~~
|
||||
const Graphic3d_SequenceOfGroup& aGroupsSeq = theStructure.Groups();
|
||||
Handle(Graphic3d_HSetOfGroup) aGroupSet = new Graphic3d_HSetOfGroup();
|
||||
Standard_Integer aLen = aGroupsSeq.Length();
|
||||
for (Standard_Integer aGr = 1; aGr <= aLen; ++aGr)
|
||||
{
|
||||
aGroupSet->Add (aGroupsSeq.Value (aGr));
|
||||
}
|
||||
~~~~
|
||||
|
||||
* All occurrences of *Select3D_Projector* in the application code (if any) should be replaced with *Handle(Select3D_Projector)*.
|
||||
* The code of inheritors of *Select3D_SensitiveEntity* should be updated if they override <i>Matches()</i> (this is probable, if clipping planes are used).
|
||||
* Constructor for *V3d_Plane* has been changed, so the extra argument should be removed if used in the application. It is necessary to add a new plane using method *V3d_Viewer::AddPlane()* if *V3d_Viewer* has been used to manage clipping planes list (this does not affect clipping planes representation). Please, have a look at the source code for new DRAWEXE *vclipplane* command in *ViewerTest_ObjectsCommands.cxx, VClipPlane* to see how clipping planes can be managed in the application.
|
||||
|
||||
@section upgrade_652 Upgrade to OCCT 6.5.2
|
||||
|
||||
Porting of user applications from an earlier OCCT version to version 6.5.2 requires taking into account the following major changes:
|
||||
* Any code that has been generated by WOK from CDL generic classes *Tcollection_DataMap* and *Tcollection_IndexedDataMap* needs to be regenerated by WOK to take into account the change in the interface of these classes.
|
||||
* The enumerations *CDF_StoreStatus* and *CDF_RetrievableStatus* have been replaced by the enumerations *PCDM_StoreStatus* and *PCDM_ReaderStatus*. Correspondingly, the methods *Open, Save* and *SaveAs* of the class *TDocStd_Application* have changed their return value. Any code, which uses these enumerations, needs to be updated.
|
||||
* *BRepLib_MakeFace* has been modified to accept tolerance value for resolution of degenerated edges. This tolerance parameter has no default value to ensure that the client code takes care of passing a meaningful value, not just *Precision::Confusion*, so some porting overheads are expected.
|
||||
* If the callback mechanism in call_togl_redraw function was used in the application code, it is necessary to revise it to take into account the new callback execution and provide a check of reason value of Aspect_GraphicCallbackStruct in callback methods to confirm that the callback code is executed at the right moment. Now the callbacks are executed before redrawing the underlayer, before redrawing the overlayer and at the end of redrawing. The information about the moment when the callback is invoked is provided with the reason value in form of an additional bit flag <i>(OCC_PRE_REDRAW, OCC_PRE_OVERLAY)</i>. The state of OpenGl changed in callback methods will not be restored automatically, which might lead to unwanted behavior in redrawing procedure.
|
||||
* The print method used in the application code might need to be revised to take into account the ability to choose between print algorithms: tile and stretch. The stretch algorithm will be selected by default during porting.
|
||||
* It is recommended to *BRepMesh_DiscretFactory* users, to check *BRepMesh_DiscretFactory::SetDefault()* return value to determine plugin availability / validity. *BRepMesh_DiscretFactory::Discret()* method now returns handle instead of pointer. The code should be updated in the following manner:
|
||||
~~~~
|
||||
Handle(BRepMesh_DiscretRoot) aMeshAlgo = BRepMesh_DiscretFactory::Get().Discret (theShape, theDeflection, theAngularToler);
|
||||
if (!aMeshAlgo.IsNull()) {}
|
||||
~~~~
|
||||
|
||||
* The default state of *BRepMesh* parallelization has been turned off. The user should switch this flag explicitly:
|
||||
* by using methods *BRepMesh_IncrementalMesh::SetParallel(Standard_True)* for each *BRepMesh_IncrementalMesh* instance before <i>Perform()</i>;
|
||||
* by calling *BRepMesh_IncrementalMesh::SetParallelDefault(Standard_True)* when *BRepMesh_DiscretFactory* is used to retrieve the meshing tool (this also affects auto-triangulation in *AIS*).
|
||||
|
||||
@section upgrade_653 Upgrade to OCCT 6.5.3
|
||||
|
||||
Porting of user applications from an earlier OCCT version to version 6.5.3 requires taking into account the following major changes:
|
||||
* As a result of code clean-up and redesign of *TKOpenGl* driver, some obsolete functions and rendering primitives <i>(TriangleMesh, TriangleSet, Bezier, Polyline, Polygon, PolygonHoles, QuadrangleMesh</i> and *QuadrangleSet*) have been removed. Instead, the application developers should use primitive arrays that provide the same functionality but are hardware-accelerated. The details can be found in OCCT Visualization User's Guide, “Primitive Arrays” chapter.
|
||||
* Applications should not call *AIS_InteractiveObject::SetPolygonOffsets()* method for an instance of *AIS_TexturedShape* class after it has been added to *AIS_InteractiveContext*. More generally, modification of *Graphic3d_AspectFillArea3d* parameters for the computed groups of any *AIS_InteractiveObject* subclass that uses texture mapping should be avoided, because this results in broken texture mapping (see issue 23118). It is still possible to apply non-default polygon offsets to *AIS_TexturedShape* by calling *SetPolygonOffsets()* before displaying the shape.
|
||||
* The applications that might have used internal functions provided by *TKOpenGl* or removed primitives will need to be updated.
|
||||
* In connection with the implementation of Z-layers it might be necessary to revise the application code or revise the custom direct descendant classes of *Graphic3d_GraphicDriver* and *Graphic3d_StructureManager* to use the Z-layer feature.
|
||||
* Global variables *Standard_PI* and *PI* have been eliminated (use macro *M_PI* instead).
|
||||
* Method *HashCode()* has been removed from class *Standard_Transient*. It is advisable to use global function <i>HashCode()</i> for Handle objects instead.
|
||||
* Declaration of operators new/delete for classes has become consistent and is encapsulated in macros.
|
||||
* Memory management has been changed to use standard heap <i>(MMGT_OPT=0)</i> and reentrant mode <i>(MMGT_REENTRANT=1)</i> by default.
|
||||
* Map classes in *NCollection* package now accept one more argument defining a hash tool.
|
||||
|
||||
@section upgrade_654 Upgrade to OCCT 6.5.4
|
||||
|
||||
Porting of user applications from an earlier OCCT version to version 6.5.4 requires taking into account the following major changes:
|
||||
* The code using obsolete classes *Aspect_PixMap, Xw_PixMap* and *WNT_PixMap* should be rewritten implementing class *Image_PixMap*, which is now retrieved by *ToPixMap* methods as argument. A sample code using *ToPixMap* is given below:
|
||||
~~~~
|
||||
#include <Image_AlienPixMap.hxx>
|
||||
void dump (Handle(V3d_View)& theView3D)
|
||||
{
|
||||
Standard_Integer aWndSizeX = 0;
|
||||
Standard_Integer aWndSizeY = 0;
|
||||
theView3D->Window()->Size (aWndSizeX, aWndSizeY);
|
||||
Image_AlienPixMap aPixMap;
|
||||
theView3D->ToPixMap (aPixMap, aWndSizeX, aWndSizeY);
|
||||
aPixMap.Save ("c:\\image.png");
|
||||
}
|
||||
~~~~
|
||||
* Now OpenGL resources related to Interactive Objects are automatically freed when the last view (window) is removed from graphical driver.
|
||||
To avoid presentation data loss, the application should replace an old view with a new one in the proper order: first the new view is created and activated and only then the old one is detached and removed.
|
||||
* It is recommended to use *NCollection* containers with hasher parameter (introduced in 6.5.3) instead of global definition <i>IsEqual()/HashCode()</i> as well as to use explicit namespaces to avoid name collision.
|
||||
|
||||
|
||||
@section upgrade_660 Upgrade to OCCT 6.6.0
|
||||
|
||||
Porting of user applications from an earlier OCCT version to version 6.6.0 requires taking into account the following major changes:
|
||||
* Due to the changes in the implementation of Boolean Operations, the order of sub-shapes resulting from the same operation performed with OCCT 6.5.x and OCCT 6.6.0 can be different.
|
||||
It is necessary to introduce the corresponding changes in the applications for which the order of sub-shapes resulting from a Boolean operation is important. It is strongly recommended to use identification methods not relying on the order of sub-shapes (e.g. OCAF naming).
|
||||
* If you need to use OCCT on Mac OS X with X11 (without Cocoa), build OCCT with defined pre-processor macro *CSF_MAC_USE_GLX11*. XLib front-end (previously the only way for unofficial OCCT builds on Mac OS X) is now disabled by default on this platform. If your application has no support for Cocoa framework you may build OCCT with XLib front-end adding *MACOSX_USE_GLX* macro to compiler options (you may check the appropriate option in WOK configuration GUI and in CMake configuration). Notice that XQuartz (XLib implementation for Mac OS X) now is an optional component and does not provide a sufficient level of integrity with native (Cocoa-based) applications in the system. It is not possible to build OCCT with both XLib and Cocoa at the same time due to symbols conflict in OpenGL functions.
|
||||
* Animation mode and degeneration presentation mode (simplified presentation for animation) and associated methods have been removed from 3D viewer functionality.
|
||||
Correspondingly, the code using methods *SetAnimationModeOn(), SetAnimationModeOff(), AnimationModeIsOn(), AnimationMode(), Tumble(), SetDegenerateModeOn(), SetDegenerateModeOff()* and *DegenerateModeIsOn()* of classes *V3d_View* and *Visual3d_View* will need to be removed or redesigned. Please, notice that Hidden Line Removal presentation was not affected; however, the old code that used methods *V3d_View::SetDegenerateModeOn* or *V3d_View::SetDegenerateModeOff* to control HLR presentation should be updated to use *V3d_View::SetComputedMode* method instead.
|
||||
* Calls of *Graphic3d_Group::BeginPrimitives()* and *Graphic3d_Group::EndPrimitives()* should be removed from the application code.
|
||||
* Application functionality for drawing 2D graphics that was formerly based on *TKV2d* API should be migrated to *TKV3d* API. The following changes are recommended for this migration:
|
||||
* A 2D view can be implemented as a *V3d_View* instance belonging to *V3d_Viewer* managed by *AIS_InteractiveContext* instance. To turn *V3d_View* into a 2D view, the necessary view orientation should be set up at the view initialization stage using *V3d_View::SetProj()* method, and view rotation methods simply should not be called.
|
||||
* Any 2D graphic entity (formerly represented with *AIS2D_InteractiveObject*) should become a class derived from *AIS_InteractiveObject* base. These entities should be manipulated in a view using *AIS_InteractiveContext* class API.
|
||||
* All drawing code should be put into *Compute()* virtual method of a custom interactive object class and use API of *Graphic3d* package. In particular, all geometry should be drawn using class hierarchy derived from *Graphic3d_ArrayOfPrimitives*. Normally, the Z coordinate for 2D geometry should be constant, unless the application implements some advanced 2D drawing techniques like e.g. multiple "Z layers" of drawings.
|
||||
* Interactive selection of 2D presentations should be set up inside *ComputeSelection()* virtual method of a custom interactive object class, using standard sensitive entities from *Select3D* package and standard or custom entity owners derived from *SelectMgr_EntityOwner* base.
|
||||
Please refer to the Visualization User's Guide for further details concerning OCCT 3D visualization and selection classes. See also *Viewer2D* OCCT sample application, which shows how 2D drawing can be implemented using TKV3d API.
|
||||
* Run-time graphic driver library loading mechanism based on *CSF_GraphicShr* environment variable usage has been replaced by explicit linking against *TKOpenGl* library. The code sample below shows how the graphic driver should be created and initialized in the application code:
|
||||
~~~~
|
||||
// initialize a new viewer with OpenGl graphic driver
|
||||
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
|
||||
new OpenGl_GraphicDriver ("TKOpenGl");
|
||||
aGraphicDriver->Begin (new Aspect_DisplayConnection());
|
||||
TCollection_ExtendedString aNameOfViewer ("Visu3D");
|
||||
Handle(V3d_Viewer) aViewer
|
||||
= new V3d_Viewer (aGraphicDriver, aNameOfViewer.ToExtString());
|
||||
aViewer->Init();
|
||||
|
||||
// create a new window or a wrapper over the existing window,
|
||||
// provided by a 3rd-party framework (Qt, MFC, C# or Cocoa)
|
||||
#if defined(_WIN32) || defined(__WIN32__)
|
||||
Aspect_Handle aWindowHandle = (Aspect_Handle )winId();
|
||||
Handle(WNT_Window) aWindow = new WNT_Window (winId());
|
||||
#elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
|
||||
NSView* aViewHandle = (NSView* )winId();
|
||||
Handle(Cocoa_Window) aWindow = new Cocoa_Window (aViewHandle);
|
||||
#else
|
||||
Aspect_Handle aWindowHandle = (Aspect_Handle )winId();
|
||||
Handle(Xw_Window) aWindow =
|
||||
new Xw_Window (aGraphicDriver->GetDisplayConnection(), aWindowHandle);
|
||||
#endif // WNT
|
||||
|
||||
// setup the window for a new view
|
||||
Handle(V3d_View) aView = aViewer->CreateView();
|
||||
aView->SetWindow (aWindow);
|
||||
~~~~
|
||||
|
||||
* The following changes should be made in the application-specific implementations of texture aspect:
|
||||
* *Graphic3d_TextureRoot* inheritors now should return texture image by overloading of *Graphic3d_TextureRoot::GetImage()* method instead of the old logic.
|
||||
* Now you can decide if the application should store the image copy as a field of property or reload it dynamically each time (to optimize the memory usage). The default implementation (which loads the image content from the provided file path) does not hold an extra copy since it will be uploaded to the graphic memory when first used.
|
||||
* Notice that the image itself should be created within *Image_PixMap* class from *AlienImage* package, while *Image_Image* class is no more supported and will be removed in the next OCCT release.
|
||||
|
||||
@section upgrade_670 Upgrade to OCCT 6.7.0
|
||||
|
||||
Porting of user applications from an earlier OCCT version to version 6.7.0 requires taking into account the following major changes.
|
||||
|
||||
@subsection upgrade_670_clipping Object-level clipping and capping algorithm.
|
||||
|
||||
* It might be necessary to revise and port code related to management of view-level clipping to use *Graphic3d_ClipPlane* instead of *V3d_Plane* instances. Please note that *V3d_Plane* class has been preserved -- as previously, it can be used as plane representation. Another approach to represent *Graphic3d_ClipPlane* in a view is to use custom presentable object.
|
||||
* The list of arguments of *Select3D_SensitiveEntity::Matches()* method for picking detection has changed. Since now, for correct selection clipping, the implementations should perform a depth clipping check and return (as output argument) minimum depth value found at the detected part of sensitive. Please refer to CDL / Doxygen documentation to find descriptive hints and snippets.
|
||||
* *Select3D_SensitiveEntity::ComputeDepth()* abstract method has been removed. Custom implementations should provide depth checks by method *Matches()* instead -- all data required for it is available within a scope of single method.
|
||||
* It might be necessary to revise the code of custom sensitive entities and port *Matches()* and *ComputeDepth()* methods to ensure proper selection clipping. Please note that obsolete signature of *Matches* is not used anymore by the selector. If your class inheriting *Select3D_SensitiveEntity* redefines the method with old signature the code should not compile as the return type has been changed. This is done to prevent override of removed methods.
|
||||
|
||||
@subsection upgrade_670_markers Redesign of markers presentation
|
||||
|
||||
* Due to the redesign of *Graphic3d_AspectMarker3d* class the code of custom markers initialization should be updated. Notice that you can reuse old markers definition code as *TColStd_HArray1OfByte*; however, *Image_PixMap* is now the preferred way (and supports full-color images on modern hardware).
|
||||
* Logics and arguments of methods *AIS_InteractiveContext::Erase()* and *AIS_InteractiveContext::EraseAll()* have been changed. Now these methods do not remove resources from *Graphic3d_Structure*; they simply change the visibility flag in it. Therefore, the code that deletes and reсomputes resources should be revised.
|
||||
* *Graphic3d_Group::MarkerSet()* has been removed. *Graphic3d_Group::AddPrimitiveArray()* should be used instead to specify marker(s) array.
|
||||
|
||||
@subsection upgrade_670_views Default views are not created automatically
|
||||
|
||||
As the obsolete methods *Init(), DefaultOrthographicView()* and *DefaultPerspectiveView()* have been removed from *V3d_Viewer* class, the two default views are no longer created automatically. It is obligatory to create *V3d_View* instances explicitly, either directly by operator new or by calling *V3d_Viewer::CreateView()*.
|
||||
|
||||
The call *V3d_Viewer::SetDefaultLights()* should also be done explicitly at the application level, if the application prefers to use the default light source configuration. Otherwise, the application itself should set up the light sources to obtain a correct 3D scene.
|
||||
|
||||
@subsection upgrade_670_dimensions Improved dimensions implementation
|
||||
|
||||
* It might be necessary to revise and port code related to management of *AIS_LengthDimension, AIS_AngleDimension* and *AIS_DiameterDimension* presentations. There is no more need to compute value of dimension and pass it as string to constructor argument. The value is computed internally. The custom value can be set with *SetCustomValue()* method.
|
||||
* The definition of units and general aspect properties is now provided by *Prs3d_DimensionUnits* and *Prs3d_DimensionApsect* classes.
|
||||
* It might be also necessary to revise code of your application related to usage of *AIS_DimensionDisplayMode enumeration*. If it used for specifying the selection mode, then it should be replaced by a more appropriate enumeration *AIS_DimensionSelectionMode*.
|
||||
|
||||
@subsection upgrade_670_list_collection NCollection_Set replaced by List collection
|
||||
|
||||
It might be necessary to revise your application code, which uses non-ordered *Graphic3d_SetOfHClipPlane* collection type and replace its occurrences by ordered *Graphic3d_SequenceOfHClipPlane* collection type.
|
||||
|
||||
|
||||
@section upgrade_680 Upgrade to OCCT 6.8.0
|
||||
|
||||
Porting of user applications from an earlier OCCT version to version 6.8.0 requires taking into account the following major changes.
|
||||
|
||||
@subsection upgrade_680_ncollection Changes in NCollection classes
|
||||
|
||||
Method *Assign()* in *NCollection* classes does not allow any more copying between different collection types. Such copying should be done manually.
|
||||
|
||||
List and map classes in *NCollection* package now require that their items be copy-constructible, but do not require items to have default constructor. Thus the code using *NCollection* classes for non-copy-constructible objects needs be updated. One option is to provide copy constructor; another possibility is to use Handle or other smart pointer.
|
||||
|
||||
@subsection upgrade_680_view_camera 3D View Camera
|
||||
|
||||
If *ViewMapping* and *ViewOrientation* were used directly, this functionality has to be ported to the new camera model. The following methods should be considered as an alternative to the obsolete *Visual3d* services (all points and directions are supposed to be in world coordinates):
|
||||
* *Graphic3d_Camera::ViewDimensions()* or *V3d_View::Size()/ZSize()* -- returns view width, height and depth (or "Z size"). Since the view is symmetric now, you can easily compute top, bottom, left and right limits. *Graphic3d_Camera::ZNear()/ZFar()* can be used to obtain the near and far clipping distances with respect to the eye.
|
||||
* *Graphic3d_Camera::Up()* or *V3d_View::Up()* -- returns Y direction of the view.
|
||||
* *Graphic3d_Camera::Direction()* returns the reverse view normal directed from the eye, *V3d_View::Proj()* returns the old-style view normal.
|
||||
* *Graphic3d_Camera::Eye()* or *V3d_View::Eye()* -- returns the camera position (same as projection reference point in old implementation).
|
||||
* *Graphic3d_Camera::Center()* or *V3d_View::At()* -- returns the point the camera looks at (or view reference point according to old terminology).
|
||||
|
||||
The current perspective model is not fully backward compatible, so the old perspective-related functionality needs to be reviewed.
|
||||
|
||||
Please revise application-specific custom presentations to provide proper bounding box. Otherwise object might become erroneously clipped by automatic *ZFit* or frustum culling algorithms enabled by default.
|
||||
|
||||
@subsection upgrade_680_connected_objects Redesign of Connected Interactive Objects
|
||||
|
||||
The new implementation of connected Interactive Objects makes it necessary to take the following steps if you use connected Interactive Objects in your application.
|
||||
* Use new *PrsMgr_PresentableObject* transformation API.
|
||||
* Call *RemoveChild()* from the original object after connect if you need the original object and *AIS_ConnectedInteractive* to move independently.
|
||||
* Access instances of objects connected to *AIS_MultiplyConnectedInteractive* with *Children()* method.
|
||||
* For *PrsMgr_PresentableObject* transformation:
|
||||
* *SetLocation (TopLoc_Location) -> SetLocalTransformation (gp_Trsf)*
|
||||
* *Location -> LocalTransformation*
|
||||
* *HasLocation -> HasTransformation*
|
||||
* *ResetLocation -> ResetTransformation*
|
||||
|
||||
@subsection upgrade_680_unicode Support of UNICODE Characters
|
||||
|
||||
Support of UNICODE characters introduced in OCCT breaks backward compatibility with applications, which currently use filenames in extended ASCII encoding bound to the current locale. Such applications should be updated to convert such strings to UTF-8 format.
|
||||
|
||||
The conversion from UTF-8 to wchar_t is made using little-endian approach. Thus, this code will not work correctly on big-endian platforms. It is needed to complete this in the way similar as it is done for binary persistence (see the macro *DO_INVERSE* in *FSD_FileHeader.hxx).*
|
||||
|
||||
@subsection upgrade_680_projection_shift Elimination of Projection Shift Concept
|
||||
|
||||
It might be necessary to revise the application code, which deals with *Center()* method of *V3d_View*.
|
||||
|
||||
This method was used to pan a *V3d* view by virtually moving the screen center with respect to the projection ray passed through Eye and At points. There is no more need to derive the panning from the Center parameter to get a camera-like eye position and look at the coordinates. *Eye()* and *At()* now return these coordinates directly. When porting code dealing with *Center()*, the parameters *Eye()* and *At()* can be adjusted instead. Also *V3d_View::SetCenter(Xpix, Ypix)* method can be used instead of *V3d_View::Center(X, Y)* to center the view at the given point. However, if the center coordinates X and Y come from older OCCT releases, calling *V3d_View::Panning(-X, -Y)* can be recommended to compensate missing projection shift effect.
|
||||
|
||||
There are several changes introduced to *Graphic3d_Camera*. The internal data structure of the camera is based on *Standard_Real* data types to avoid redundant application-level conversions and precision errors. The transformation matrices now can be evaluated both for *Standard_Real* and *Standard_ShortReal* value types. *ZNear* and *ZFar* planes can be either negative or positive for orthographic camera projection, providing a trade-off between the camera distance and the range of *ZNear* or *ZFar* to reduce difference of exponents of values composing the orientation matrix - to avoid calculation errors. The negative values can be specified to avoid Z-clipping if the reference system of camera goes inside of the model when decreasing camera distance.
|
||||
|
||||
The auto z fit mode, since now, has a parameter defining Z-range margin (the one which is usually passed as argument to *ZFitAll()* method). The methods *SetAutoZFitMode(), AutoZFitScaleFactor()* and *ZFitAll()* from class *V3d_View* deal with the new parameter.
|
||||
|
||||
The class *Select3D_Projector* now supports both orientation and projection transformation matrices, which can be naturally set for the projector. The definition of projector was revised in *StdSelect_ViewerSelector3d*: perspective and orthographic projection parameters are handled properly. Orthographic projector is based only on direction of projection - no more *Center* property. This makes it possible to avoid unnecessary re-projection of sensitive while panning, zooming or moving along the projection ray of the view. These operations do not affect the orthographic projection.
|
||||
|
||||
|
||||
@section upgrade_690 Upgrade to OCCT 6.9.0
|
||||
|
||||
Porting of user applications from an earlier OCCT version to version 6.9.0 requires taking into account the following major changes.
|
||||
|
||||
|
||||
@subsection upgrade_690_selection Changes in Selection
|
||||
|
||||
Selection mechanism of 3D Viewer has been redesigned to use 3-level BVH tree traverse directly in 3D space instead of projection onto 2D screen space (updated on each rotation). This architectural redesign may require appropriate changes at application level in case if custom Interactive Objects are used.
|
||||
|
||||
#### Standard selection
|
||||
Usage of standard OCCT selection entities would require only minor updates.
|
||||
|
||||
Custom Interactive Objects should implement new virtual method *SelectMgr_SelectableObject::BoundingBox().*
|
||||
|
||||
Now the method *SelectMgr_Selection::Sensitive()* does not return *SelectBasics_SensitiveEntity*. It returns an instance of *SelectMgr_SensitiveEntity*, which belongs to a different class hierarchy (thus *DownCast()* will fail). To access base sensitive it is necessary to use method *SelectMgr_SensitiveEntity::BaseSensitive()*. For example:
|
||||
|
||||
~~~~
|
||||
Handle(SelectMgr_Selection) aSelection = anInteractiveObject->Selection (aMode);
|
||||
for (aSelection->Init(); aSelection->More(); aSelection->Next())
|
||||
{
|
||||
Handle(SelectBasics_SensitiveEntity) anEntity = aSelection->Sensitive()->BaseSensitive();
|
||||
}
|
||||
~~~~
|
||||
|
||||
#### Custom sensitive entities
|
||||
|
||||
Custom sensitive entities require more complex changes, since the selection algorithm has been redesigned and requires different output from the entities.
|
||||
|
||||
The method *SelectBasics_SensitiveEntity::Matches()* of the base class should be overridden following the new signature:
|
||||
|
||||
*Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr, SelectBasics_PickResult& thePickResult)*, where *theMgr* contains information about the currently selected frustum or set of frustums (see *SelectMgr_RectangularFrustum, SelectMgr_TrangularFrustum, SelectMgr_TriangularFrustumSet)* and *SelectBasics_PickResult* is an output parameter, containing information about the depth of the detected entity and distance to its center of geometry.
|
||||
|
||||
In the overridden method it is necessary to implement an algorithm of overlap and inclusion detection (the active mode is returned by *theMgr.IsOverlapAllowed()*) with triangular and rectangular frustums.
|
||||
|
||||
The depth and distance to the center of geometry must be calculated for the 3D projection of user-picked screen point in the world space. You may use already implemented overlap and inclusion detection methods for different primitives from *SelectMgr_RectangularFrustum* and *SelectMgr_TriangularFrustum*, including triangle, point, axis-aligned box, line segment and planar polygon.
|
||||
|
||||
Here is an example of overlap/inclusion test for a box:
|
||||
|
||||
~~~~
|
||||
if (!theMgr.IsOverlapAllowed()) // check for inclusion
|
||||
{
|
||||
Standard_Boolean isInside = Standard_True;
|
||||
return theMgr.Overlaps (myBox.CornerMin(), myBox.CornerMax(), &isInside) && isInside;
|
||||
}
|
||||
|
||||
Standard_Real aDepth;
|
||||
if (!theMgr.Overlaps (myBox, aDepth)) // check for overlap
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
thePickResult =
|
||||
SelectBasics_PickResult (aDepth, theMgr.DistToGeometryCenter (myCenter3d));
|
||||
~~~~
|
||||
|
||||
The interface of *SelectBasics_SensitiveEntity* now contains four new pure virtual functions that should be implemented by each custom sensitive:
|
||||
* <i>BoundingBox()</i> – returns a bounding box of the entity;
|
||||
* <i>Clear()</i> – clears up all the resources and memory allocated for complex sensitive entities;
|
||||
* <i>BVH()</i> – builds a BVH tree for complex sensitive entities, if it is needed;
|
||||
* <i>NbSubElements()</i> – returns atomic sub-entities of a complex sensitive entity, which will be used as primitives for BVH building. If the entity is simple and no BVH is required, this method returns 1.
|
||||
|
||||
Each sensitive entity now has its own tolerance, which can be overridden by method *SelectBasics_SensitiveEntity::SetSensitivityFactor()* called from constructor.
|
||||
|
||||
|
||||
@subsection upgrade_690_adaptor3d-curve Changes in Adaptor3d_Curve class
|
||||
|
||||
All classes inheriting *Adaptor3d_Curve* (directly or indirectly) must be updated in application code to use new signature of methods *Intervals()* and *NbIntervals()*. Note that no compiler warning will be generated if this is not done.
|
||||
|
||||
@subsection upgrade_690_v3d_view Changes in V3d_View class
|
||||
|
||||
The methods *V3d_View::Convert* and *V3d_View::ConvertWithProj()* have ceased to return point on the active grid. It might be necessary to revise the code of your application so that *V3d_View::ConvertToGrid()* was called explicitly for the values returned by *V3d_View::Convert* to get analogous coordinates on the grid. The methods *V3d_View::Convert* and *V3d_View::ConvertWithProj* convert point into reference plane of the view corresponding to the intersection with the projection plane of the eye/view point vector.
|
||||
When upgrading your code by automatic script, make sure to carefully review the changes made by it, on each step, before committing them.
|
||||
|
||||
@section upgrade_700 Upgrade to OCCT 7.0.0
|
||||
|
||||
Porting of user applications from an earlier OCCT version to version 7.0.0 requires taking into account the following major changes.
|
||||
|
||||
@subsection upgrade_700_persist Removal of legacy persistence
|
||||
|
||||
Legacy persistence for shapes and OCAF data based on *Storage_Schema* (toolkits *TKPShape*, *TKPLCAF*, *TKPCAF*, *TKShapeShcema, TLStdLSchema, TKStdSchema*, and *TKXCAFSchema*) has been removed in OCCT 7.0.0.
|
||||
The applications that used these data persistence tools need to be updated to use other persistence mechanisms.
|
||||
Legacy persistence for shapes and OCAF data based on Storage_Schema (toolkits TKShapeShcema, TLStdLSchema, TKStdSchema, TKXCAFSchema) has been removed in OCCT 7.0.0.
|
||||
Applications that used these persistence tools for their data need to be updated to use other persistence mechanisms.
|
||||
|
||||
@note For compatibility with previous versions, possibility to read standard OCAF data (TKLCAF, TKCAF) from the files stored in old format is preserved (toolkits *TKStdL*, *TKStd*).
|
||||
|
||||
The existing data files in standard formats can be converted using OCCT 6.9.1 or a previous version, as follows.
|
||||
The existing data files in standard formats can be converted using OCCT 6.9.0 or previous version, as follows.
|
||||
|
||||
#### CSFDB files
|
||||
|
||||
Files in CSFDB format (usually with extension .csfdb) contain OCCT shape data that can be converted to BRep format.
|
||||
The easiest way to do that is to use ImportExport sample provided with OCCT 6.9.0 (or earlier):
|
||||
|
||||
- Start ImportExport sample;
|
||||
- Select File / New;
|
||||
- Select File / Import / CSFDB... and specify the file to be converted;
|
||||
- Drag the mouse with the right button pressed across the view to select all shapes by the rectangle;
|
||||
- Select File / Export / BREP... and specify the location and name for the resulting file
|
||||
- Start ImportExport sample
|
||||
- Select File / New
|
||||
- Select File / Import / CSFDB... and specify the file to be converted
|
||||
- Drag mouse with right button pressed across the view to select all shapes by rectangle
|
||||
- Select File / Export / BREP... and specify location and name for the resulting file
|
||||
|
||||
#### OCAF and XCAF documents
|
||||
|
||||
Files containing OCAF data saved in the old format usually have extensions <i>.std, .sgd</i> or <i>.dxc</i> (XDE documents).
|
||||
These files can be converted to XML or binary OCAF formats using DRAW Test Harness commands.
|
||||
Note that if the file contains only attributes defined in TKLCAF and TKCAF, this action can be performed in OCCT 7.0; otherwise OCCT 6.9.1 or earlier should be used.
|
||||
Files containing OCAF data saved in old format usually have extensions .std or .sgd or .dxc (XDE documents).
|
||||
These files can be converted to XML or binary OCAF formats using DRAW Test Harness commands available in OCCT 6.9.0 or earlier.
|
||||
|
||||
For that, start *DRAWEXE* and perform the following commands:
|
||||
|
||||
* To convert <i>*.std</i> and <i>*.sgd</i> file formats to binary format <i>*.cbf</i> (The created document should be in *BinOcaf* format instead of *MDTV-Standard*):
|
||||
* for the conversion of the "*.std" and "*.sgd" file formats to the binary format "*.cbf" (Created document should be in **BinOcaf** format instead of **MDTV-Standard**):
|
||||
|
||||
@code
|
||||
Draw[]> pload ALL
|
||||
@@ -356,7 +60,7 @@ For that, start *DRAWEXE* and perform the following commands:
|
||||
Draw[]> SaveAs Doc [path to the new file]
|
||||
@endcode
|
||||
|
||||
* To convert <i>*.dxc</i> file format to binary format <i>*.xbf</i> (The created document should be in *BinXCAF* format instead of *MDTV-XCAF*):
|
||||
* for the conversion of the "*.dxc" file format to the binary format "*.xbf" (Created document should be in **BinXCAF** format instead of **MDTV-XCAF**):
|
||||
|
||||
@code
|
||||
Draw[]> pload ALL
|
||||
@@ -365,26 +69,24 @@ For that, start *DRAWEXE* and perform the following commands:
|
||||
Draw[]> XSave Doc [path to the new file]
|
||||
@endcode
|
||||
|
||||
On Windows, it is necessary to replace back slashes in the file path by direct slashes or pairs of back slashes.
|
||||
|
||||
Use *XmlOcaf* or *XmlXCAF* instead of *BinOcaf* and *BinXCAF*, respectively, to save in XML format instead of binary one.
|
||||
On Windows, be careful to replace back slashes in the file path by either direct slash or pairs of back slashes.
|
||||
Use "XmlOcaf" or "XmlXCAF" instead of "BinOcaf" and "BinXCAF", respectively, to save in XML format instead of binary one.
|
||||
|
||||
@subsection upgrade_occt700_cdl Removal of CDL and WOK
|
||||
|
||||
OCCT code has been completely refactored in version 7.0 to get rid of obsolete technologies used since its inception: CDL (Cas.Cade Definition Language) and WOK (Workshop Organization Kit).
|
||||
|
||||
C++ code previously generated by WOK from CDL declarations is now included directly in OCCT sources.
|
||||
|
||||
This modification did not change names, API, and behavior of existing OCCT classes, thus in general the code based on OCCT 6.x should compile and work fine with OCCT 7.0.
|
||||
However, due to redesign of basic mechanisms (CDL generic classes, Handles and RTTI) using C++ templates, some changes may be necessary in the code when porting to OCCT 7.0, as described below.
|
||||
|
||||
WOK is not necessary anymore for building OCCT from sources, though it still can be used in a traditional way -- auxiliary files required for that are preserved.
|
||||
WOK is not necessary anymore for building OCCT from sources, though it still can be used in traditional way -- auxiliary files required for that are preserved.
|
||||
The recommended method for building OCCT 7.x is CMake, see @ref occt_dev_guides__building_cmake.
|
||||
The alternative solution is to use project files generated by OCCT legacy tool **genproj**, see @ref occt_dev_guides__building_msvc, @ref occt_dev_guides__building_code_blocks, and @ref occt_dev_guides__building_xcode.
|
||||
Alternative solution is to use legacy generator of project files (extracted from WOK), see @ref occt_dev_guides__building_wok.
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_auto Automatic upgrade
|
||||
|
||||
Most of typical changes required for upgrading code for OCCT 7.0 can be done automatically using the *upgrade* tool included in OCCT 7.0.
|
||||
Most of typical changes required for upgrading code to use OCCT 7.0 can be done automatically using the *upgrade* tool included in OCCT 7.0.
|
||||
This tool is a Tcl script, thus Tcl should be available on your workstation to run it.
|
||||
|
||||
Example:
|
||||
@@ -394,54 +96,49 @@ Example:
|
||||
% upgrade -recurse -all -src=<path_to_your_sources>
|
||||
~~~~~
|
||||
|
||||
On Windows, the helper batch script *upgrade.bat* can be used, provided that Tcl is either available in *PATH*, or configured via *custom.bat* script (for instance, if you use OCCT installed from Windows installer package). Start it from the command prompt:
|
||||
On Windows, helper batch script upgrade.bat can be used, provided that Tcl is either available in PATH, or configured via custom.bat script (for instance, if you use OCCT installed from Windows installer package). Start it from command prompt:
|
||||
|
||||
~~~~~
|
||||
cmd> <path_to_occt>\upgrade.bat -recurse -all -inc=<path_to_occt>\inc -src=<path_to_your_sources> [options]
|
||||
~~~~~
|
||||
|
||||
Run the upgrade tool without arguments to see the list of available options.
|
||||
Run upgrade tool without arguments to see the list of available options.
|
||||
|
||||
The upgrade tool performs the following changes in the code.
|
||||
Upgrade tool performs the following changes in the code.
|
||||
|
||||
1. Replaces macro *DEFINE_STANDARD_RTTI* by *DEFINE_STANDARD_RTTIEXT*, with second argument indicating base class for the main argument class (if inheritance is recognized by the script):
|
||||
1. Adds second argument to macro DEFINE_STANDARD_RTTI indicating base class for its argument class (if inheritance is recognized by the script):
|
||||
~~~~~
|
||||
DEFINE_STANDARD_RTTI(Class) -> DEFINE_STANDARD_RTTIEXT(Class, Base)
|
||||
DEFINE_STANDARD_RTTI(Class) -> DEFINE_STANDARD_RTTI(Class, Base)
|
||||
~~~~~
|
||||
|
||||
@note If macro *DEFINE_STANDARD_RTTI* with two arguments (used in intermediate development versions of OCCT 7.0) is found, the script will convert it to either *DEFINE_STANDARD_RTTIEXT* or *DEFINE_STANDARD_RTTI_INLINE*.
|
||||
The former case is used if current file is header and source file with the same name is found in the same folder.
|
||||
In this case, macro *IMPLEMENT_STANDARD_RTTI* is injected in the corresponding source file.
|
||||
The latter variant defines all methods for RTTI as inline, and does not require *IMPLEMENT_STANDARD_RTTIEXT* macro.
|
||||
|
||||
2. Replaces forward declarations of collection classes previously generated from CDL generics (defined in *TCollection* package) by inclusion of the corresponding header:
|
||||
2. Replaces forward declarations of collection classes previously generated from CDL generics (defined in TCollection package) by \#include of corresponding header:
|
||||
~~~~~
|
||||
class TColStd_Array1OfReal; -> #include <TColStd_Array1OfReal.hxx>
|
||||
~~~~~
|
||||
|
||||
3. Replaces underscored names of *Handle* classes by usage of a macro:
|
||||
3. Replaces underscored names of Handle classes by usage of a macro:
|
||||
~~~~~
|
||||
Handle_Class -> Handle(Class)
|
||||
~~~~~
|
||||
This change is not applied if the source or header file is recognized as containing the definition of Qt class with signals or slots, to avoid possible compilation errors of MOC files caused by inability of MOC to recognize macros (see http://doc.qt.io/qt-4.8/signalsandslots.html).
|
||||
The file is considered as defining a Qt object if it contains strings *Q_OBJECT* and either *slots:* or *signals:*.
|
||||
This change is not applied if source or header file is recognized as containing definition of Qt class with signals or slots, to avoid possible compilation errors of MOC files caused by inability of MOC to recognize macros (see http://doc.qt.io/qt-4.8/signalsandslots.html).
|
||||
The file is considered as defining Qt object if it contains strings "Q_OBJECT" and either "slots:" or "signals".
|
||||
|
||||
4. Removes forward declarations of classes with names <i>Handle(C)</i> or *Handle_C*, replacing them either by forward declaration of its argument class, or (for files defining Qt objects) <i>\#include</i> statement for a header with the name of the argument class and extension .hxx:
|
||||
4. Removes forward declarations of classes with names Handle(C) or Handle_C, replacing these either by forward declaration of its argument class, or (for files defining Qt objects) \#include statement for header with name of the argument class and extension .hxx:
|
||||
~~~~~
|
||||
class Handle(TColStd_HArray1OfReal); -> #include <TColStd_HArray1OfReal.hxx>
|
||||
~~~~~
|
||||
|
||||
5. Removes <i> \#includes </i> of files <i>Handle_...hxx</i> that have disappeared in OCCT 7.0:
|
||||
5. Removes \#includes of files Handle_...hxx disappeared in OCCT 7.0:
|
||||
~~~~~
|
||||
#include <Handle_Geom_Curve.hxx> ->
|
||||
~~~~~
|
||||
|
||||
6. Removes *typedef* statements that use *Handle* macro to generate the name:
|
||||
6. Removes typedef statements that use Handle macro to generate name:
|
||||
~~~~~
|
||||
typedef NCollection_Handle<Message_Msg> Handle(Message_Msg); ->
|
||||
~~~~~
|
||||
|
||||
7. Converts C-style casts applied to Handles into calls to <i>DownCast()</i> method:
|
||||
7. Converts C-style casts applied to Handles to calls to DownCast() method:
|
||||
~~~~~
|
||||
((Handle(A)&)b) -> Handle(A)::DownCast(b)
|
||||
(Handle(A)&)b -> Handle(A)::DownCast(b)
|
||||
@@ -450,23 +147,21 @@ typedef NCollection_Handle<Message_Msg> Handle(Message_Msg); ->
|
||||
(*(Handle(A)*)&b) -> Handle(A)::DownCast(b)
|
||||
~~~~~
|
||||
|
||||
8. Moves <i>Handle()</i> macro out of namespace scope:
|
||||
8. Moves Handle() macro out of namespace scope:
|
||||
~~~~~
|
||||
Namespace::Handle(Class) -> Handle(Namespace::Class)
|
||||
~~~~~
|
||||
|
||||
9. Converts local variables of reference type, which are initialized by a temporary object returned by call to <i>DownCast()</i>, to the variables of non-reference type (to avoid using references to destroyed memory):
|
||||
9. Converts local variables of reference type initialized by temporary object returned by call to DownCast(), to non-references (to avoid using reference to destroyed memory):
|
||||
~~~~~
|
||||
const Handle(A)& a = Handle(B)::DownCast (b); -> Handle(A) a (Handle(B)::DownCast (b));
|
||||
~~~~~
|
||||
|
||||
10. Adds <i>\#include</i> for all classes used as argument to macro <i>STANDARD_TYPE()</i>, except for already included ones;
|
||||
10. Adds \#include for all classes used as argument to macro STANDARD_TYPE(), except of already included ones;
|
||||
|
||||
11. Removes uses of obsolete macros *IMPLEMENT_DOWNCAST* and *IMPLEMENT_STANDARD_*..., except *IMPLEMENT_STANDARD_RTTIEXT*.
|
||||
11. Removes uses of obsolete macros IMPLEMENT_DOWNCAST() and IMPLEMENT_STANDARD_*().
|
||||
|
||||
@note If you plan to keep compatibility of your code with older versions of OCCT, add option <i>-compat</i> to avoid this change. See also @ref upgrade_occt700_cdl_compat.
|
||||
|
||||
.
|
||||
> If you plan to keep compatibility of your code with older versions of OCCT, add option "-compat" to avoid the latter change. See also @ref upgrade_occt700_cdl_compat.
|
||||
|
||||
As long as the upgrade routine runs, some information messages are sent to the standard output.
|
||||
In some cases the warnings or errors like the following may appear:
|
||||
@@ -475,20 +170,20 @@ In some cases the warnings or errors like the following may appear:
|
||||
Error in {HEADER_FILE}: Macro DEFINE_STANDARD_RTTI used for class {CLASS_NAME} whose declaration is not found in this file, cannot fix
|
||||
~~~~~
|
||||
|
||||
Be sure to check carefully all reported errors and warnings, as the corresponding code will likely require manual corrections.
|
||||
In some cases these messages may help you to detect errors in your code, for instance, cases where *DEFINE_STANDARD_RTTI* macro is used with incorrect class name as an argument.
|
||||
Be sure to check carefully all reported errors and warnings, as corresponding places likely will require manual corrections.
|
||||
In some cases these messages may help you to detect errors in your code, for instance, cases where DEFINE_STANDARD_RTTI macro passes invalid class name as an argument.
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_compiler Possible compiler errors
|
||||
|
||||
Some situations requiring upgrade cannot be detected and / or handled by the automatic procedure.
|
||||
If you get compiler errors or warnings when trying to build the upgraded code, you will need to fix them manually.
|
||||
Some situations requiring upgrade cannot be detected and / or handled by automatic procedure.
|
||||
If you get compiler errors or warnings when trying to build upgraded code, you will need to fix them manually.
|
||||
The following paragraphs list known situations of this kind.
|
||||
|
||||
#### Missing header files
|
||||
|
||||
The use of handle objects (construction, comparison using operators == or !=, use of function <i>STANDRAD_TYPE()</i> and method <i>DownCast()</i>) now requires the type of the object pointed by Handle to be completely known at compile time. Thus it may be necessary to include header of the corresponding class to make the code compilable.
|
||||
Use of handle objects (construction, comparison using operators == or !=, use of function STANDRAD_TYPE() and method DownCast()) now requires the type of the object pointed by Handle to be completely known at compile time. Thus it may be necessary to include header of the corresponding class to make the code compilable.
|
||||
|
||||
For example, the following lines will fail to compile if *Geom_Line.hxx* is not included:
|
||||
For example, the following lines will fail to compile if Geom_Line.hxx is not included:
|
||||
|
||||
~~~~~
|
||||
Handle(Geom_Line) aLine = 0;
|
||||
@@ -503,8 +198,8 @@ This will eliminate the need to include the header *A* in each source file where
|
||||
|
||||
#### Ambiguity of calls to overloaded functions
|
||||
|
||||
This issue appears in the compilers that do not support default arguments in template functions (known cases are Visual C++ 10 and 11): the compiler reports an ambiguity error if a handle is used in the argument of a call to the function that has two or move overloaded versions, accepting handles to different types.
|
||||
The problem is that operator <i> const handle<T2>& </i> is defined for any type *T2*, thus the compiler cannot make the right choice.
|
||||
This issue appears in compilers that do not support default arguments in template functions (known cases are Visual C++ 10 and 11): compiler reports ambiguity error if handle is used in argument of call to function that has two or move overloaded versions, accepting handles to different types.
|
||||
The problem is that operator const handle<T2>& is defined for any type T2, thus compiler cannot make a right choice.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
@@ -515,16 +210,14 @@ Handle(Geom_TrimmedCurve) aCurve = new Geom_TrimmedCurve (...);
|
||||
func (aCurve); // ambiguity error in VC++ 10
|
||||
~~~~~
|
||||
|
||||
Note that this problem can be avoided in many cases if macro *OCCT_HANDLE_NOCAST* is used, see @ref upgrade_occt700_cdl_nocast "below".
|
||||
|
||||
To resolve this ambiguity, change your code so that argument type should correspond exactly to the function signature.
|
||||
In some cases this can be done by using the relevant type for the corresponding variable, like in the example above:
|
||||
To resolve this ambiguity, change your code so that argument type corresponds exactly to the function signature.
|
||||
In some cases this can be done by using relevant type for the corresponding variable, like in the example above:
|
||||
|
||||
~~~~~
|
||||
Handle(Geom_Curve) aCurve = new Geom_TrimmedCurve (...);
|
||||
~~~~~
|
||||
|
||||
Other variants consist in assigning the argument to a local variable of the correct type and using the direct cast or constructor:
|
||||
Other variants are assigning the argument to local variable of correct type, using direct cast or constructor:
|
||||
|
||||
~~~~~
|
||||
const Handle(Geom_Curve)& aGCurve (aTrimmedCurve);
|
||||
@@ -533,12 +226,12 @@ func (static_cast(aCurve)); // OK - direct cast
|
||||
func (Handle(Geom_Curve)(aCurve)); // OK - temporary handle is constructed
|
||||
~~~~~
|
||||
|
||||
Another possibility consists in defining additional template variant of the overloaded function causing ambiguity, and using *SFINAE* to resolve the ambiguity.
|
||||
This technique can be illustrated by the definition of the template variant of method <i>IGESData_IGESWriter::Send()</i>.
|
||||
Another possibility is defining additional templated variant of the overloaded function causing ambiguity, and use SFINAE to resolve the ambiguity.
|
||||
For example of this technique, see definition of the template variant of the method IGESData_IGESWriter::Send().
|
||||
|
||||
#### Lack of implicit cast to base type
|
||||
|
||||
As the cast of a handle to the reference to another handle to the base type has become a user-defined operation, the conversions that require this cast together with another user-defined cast will not be resolved automatically by the compiler.
|
||||
Due to the fact that now cast of handle to reference to handle to the base type is user-defined operation, conversions that require this cast combined with other user-defined cast will not be resolved automatically by compiler.
|
||||
|
||||
For example:
|
||||
|
||||
@@ -546,35 +239,25 @@ For example:
|
||||
Handle(Geom_Geometry) aC = GC_MakeLine (p, v); // compiler error
|
||||
~~~~~
|
||||
|
||||
The problem is that the class *GCE2d_MakeSegment* has a user-defined conversion to <i>const Handle(Geom_TrimmedCurve)&,</i> which is not the same as the type of the local variable *aC*.
|
||||
The problem here is that class GCE2d_MakeSegment has user-defined conversion to const Handle(Geom_TrimmedCurve)&, which is not the same as type of the local variable aC.
|
||||
|
||||
To resolve this, use method <i>Value()</i>:
|
||||
To resolve this, use method Value():
|
||||
|
||||
~~~~~
|
||||
Handle(Geom_Geometry) aC = GC_MakeLine (p, v).Value(); // ok
|
||||
~~~~~
|
||||
|
||||
or use variable of the appropriate type:
|
||||
or use variable of appropriate type:
|
||||
|
||||
~~~~~
|
||||
Handle(Geom_TrimmedCurve) aC = GC_MakeLine (p, v); // ok
|
||||
~~~~~
|
||||
|
||||
With GCC compiler, similar problem appears when const handle to derived type is used to construct handle to base type via assignment (and in some cases in return statement), for instance:
|
||||
|
||||
~~~~~
|
||||
const Handle(Geom_Line) aLine;
|
||||
Handle(Geom_Curve) c1 = aLine; // GCC error
|
||||
Handle(Geom_Curve) c2 (aLine); // ok
|
||||
~~~~~
|
||||
|
||||
This problem is specific to GCC and it does not appear if macro *OCCT_HANDLE_NOCAST* is used, see @ref upgrade_occt700_cdl_nocast "below".
|
||||
|
||||
#### Incorrect use of STANDARD_TYPE and Handle macros
|
||||
|
||||
You might need to clean your code from incorrect use of macros *STANDARD_TYPE*() and *Handle*().
|
||||
|
||||
1. Explicit definitions of static functions with names generated by macro *STANDARD_TYPE()*, which are artifacts of old implementation of RTTI, should be removed.
|
||||
1. Explicit definitions of static functions with names generated by macro STANDARD_TYPE(), which are artifacts of old implementation of RTTI, should be removed.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
@@ -585,7 +268,7 @@ const Handle(Standard_Type)& STANDARD_TYPE(math_GlobOptMin)
|
||||
}
|
||||
~~~~~
|
||||
|
||||
2. Incorrect location of closing parenthesis of *Handle()* macro that was not detectable in OCCT 6.x will cause a compiler error and must be corrected.
|
||||
2. Incorrect location of closing parenthesis of Handle() macro that was not detectable in OCCT 6.x will cause compiler error and must be corrected.
|
||||
|
||||
Example (note misplaced closing parenthesis):
|
||||
~~~~~
|
||||
@@ -594,21 +277,21 @@ aBSpline = Handle( Geom2d_BSplineCurve::DownCast(BS->Copy()) );
|
||||
|
||||
#### Use of class Standard_AncestorIterator
|
||||
|
||||
Class *Standard_AncestorIterator* has been removed; use method *Parent()* of *Standard_Type* class to parse the inheritance chain.
|
||||
Class Standard_AncestorIterator has been removed; use method Parent() of Standard_Type class to parse inheritance chain.
|
||||
|
||||
#### Absence of cast to Standard_Transient*
|
||||
|
||||
Handles in OCCT 7.0 do not have the operator of conversion to <i>Standard_Transient*,</i> which was present in earlier versions.
|
||||
Handles in OCCT 7.0 do not have operator of conversion to Standard_Transient*, which was present in earlier versions.
|
||||
This is done to prevent possible unintended errors like this:
|
||||
|
||||
~~~~~
|
||||
Handle(Geom_Line) aLine = ...;
|
||||
Handle(Geom_Surface) aSurf = ...;
|
||||
...
|
||||
if (aLine == aSurf) {...} // will cause a compiler error in OCCT 7.0, but not OCCT 6.x
|
||||
if (aLine == aSurf) {...} // will cause compiler error in OCCT 7.0, but not OCCT 6.x
|
||||
~~~~~
|
||||
|
||||
The places where this implicit cast has been used should be corrected manually.
|
||||
Places where this implicit cast has been used should be corrected manually.
|
||||
The typical situation is when Handle is passed to stream:
|
||||
|
||||
~~~~~
|
||||
@@ -616,42 +299,16 @@ Handle(Geom_Line) aLine = ...;
|
||||
os << aLine; // in OCCT 6.9.0, resolves to operator << (void*)
|
||||
~~~~~
|
||||
|
||||
Call method <i>get()</i> explicitly to output the address of the Handle.
|
||||
|
||||
#### Method DownCast for non-base types
|
||||
|
||||
Method *DownCast()* in OCCT 7.0 is made templated; if it is used with argument which is not a base class, "deprecated" compiler warning is generated.
|
||||
This is done to prevent possible unintended errors like this:
|
||||
|
||||
~~~~~
|
||||
Handle(Geom_Surface) aSurf = ;
|
||||
Handle(Geom_Line) aLine =
|
||||
Handle(Geom_Line)::DownCast (aSurf); // will cause a compiler warning in OCCT 7.0, but not OCCT 6.x
|
||||
~~~~~
|
||||
|
||||
The places where this cast has been used should be corrected manually.
|
||||
|
||||
If down casting is used in a template context where argument can have the same or unrelated type so that *DownCast()* may be not available in all cases, use C++ *dynamic_cast<>* instead, e.g.:
|
||||
|
||||
~~~~~
|
||||
template <class T>
|
||||
bool CheckLine (const Handle(T) theArg)
|
||||
{
|
||||
Handle(Geom_Line) aLine = dynamic_cast<Geom_Line> (theArg.get());
|
||||
...
|
||||
}
|
||||
~~~~~
|
||||
Call method get() explicitly to output address of the Handle.
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_runtime Possible runtime problems
|
||||
|
||||
Here is the list of known possible problems at run time after the upgrade to OCCT 7.0.
|
||||
Known situations when problems are possible at run time after upgrade to OCCT 7.0 are listed here.
|
||||
|
||||
#### References to temporary objects
|
||||
|
||||
In previous versions, the compiler was able to detect the situation when a local variable of a "reference to a Handle" type is initialized by temporary object, and ensured that lifetime of that object is longer than that of the variable.
|
||||
In OCCT 7.0 with default options, it will not work if types of the temporary object and variable are different (due to involvement of user-defined type cast), thus such temporary object will be destroyed immediately.
|
||||
|
||||
This problem does not appear if macro *OCCT_HANDLE_NOCAST* is used during compilation, see below.
|
||||
In previous versions, compiler was able to detect situation when local variable of reference type to Handle is initialized by temporary object, and ensured that lifetime of that object is longer than that of the variable.
|
||||
Since OCCT 7.0, it will not work if types of the temporary object and variable are different (due to involvement of user-defined type cast), thus such temporary object will be destroyed immediately.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -662,93 +319,49 @@ Handle(Geom_TrimmedCurve)::DownCast(aCurve);
|
||||
aBC->Transform (T); // access violation in OCCT 7.0
|
||||
~~~~~
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_nocast Option to avoid cast of handle to reference to base type
|
||||
|
||||
In OCCT 6.x and earlier versions the handle classes formed a hierarchy echoing hierarchy of corresponding object classes.
|
||||
This automatically enabled possibility to use handle to derived class in all contexts where handle to base class was needed, e.g. pass it in function by reference without copying:
|
||||
|
||||
~~~~
|
||||
Standard_Boolean GetCurve (Handle(Geom_Curve)& theCurve);
|
||||
....
|
||||
Handle(Geom_Line) aLine;
|
||||
if (GetCurve (aLine)) {
|
||||
// use aLine, unsafe
|
||||
}
|
||||
~~~~
|
||||
|
||||
This feature was used in multiple places in OCCT and dependent projects.
|
||||
However it is potentially unsafe: in the above example no checks are done at compile time or at run time to ensure that argument handle is assigned a type compatible with the type of handle passed as argument.
|
||||
If object of incompatible type (e.g. Geom_Circle) is assigned to *theCurve*, the behavior will be unpredictable.
|
||||
|
||||
For compatibility with existing code, by default OCCT 7.0 keeps this possibility, providing operators of type cast to handle to base type.
|
||||
Besides being unsafe, in specific situations this feature may cause compile-time or run-time errors as described above.
|
||||
|
||||
In order to provide safer behavior, this feature can be disabled by defining a compile-time macro *OCCT_HANDLE_NOCAST*.
|
||||
When it is defined, constructors and assignment operators are defined (instead of type cast operators) to convert from handle to defived type to handle to base type.
|
||||
This implies creation of temporary objects and hence may be more expensive at run time in some circumstances, however this way is more standard, safer, and in general recommended.
|
||||
|
||||
The code that relies on possibility of casting to base should be amended so that handle of argument type is always used in function call, and to use DownCast() to safely convert the result to desired type.
|
||||
For instance, the code from the example below can be changed as follows:
|
||||
|
||||
~~~~~
|
||||
Handle(Geom_Line) aLine;
|
||||
Handle(Geom_Curve) aCurve;
|
||||
if (GetCurve (aCure) && !(aLine = Handle(Geom_Line)::DownCast (aCurve)).IsNull()) {
|
||||
// use aLine safely
|
||||
}
|
||||
~~~~~
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_compat Preserving compatibility with OCCT 6.x
|
||||
|
||||
If you like to preserve the compatibility of your application code with OCCT versions 6.x even after the upgrade to 7.0, consider the following suggestions:
|
||||
If you like to preserve compatibility of your application code with OCCT versions 6.x even after upgrade to 7.0, consider the following suggestions:
|
||||
|
||||
1. If your code used sequences of macros *IMPLEMENT_STANDARD_*... generated by WOK, replace them by single macro *IMPLEMENT_STANDARD_RTTIEXT*
|
||||
1. When running automatic upgrade tool, add option *-compat*.
|
||||
|
||||
2. When running automatic upgrade tool, add option <i>-compat</i>.
|
||||
|
||||
3. Define macros *DEFINE_STANDARD_RTTIEXT* and *DEFINE_STANDARD_RTTI_INLINE* when building with previous versions of OCCT, resolving to *DEFINE_STANDARD_RTTI* with single argument
|
||||
2. In order to overcome incompatibility of macro DEFINE_STANDARD_RTTI which has additional argument in OCCT 7.0, you can replace (after upgrade) its use in your code by your own version-dependent macro, which resolves to either 6.x or 7.x version.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
#if OCC_VERSION_HEX < 0x070000
|
||||
#define DEFINE_STANDARD_RTTIEXT(C1,C2) DEFINE_STANDARD_RTTI(C1)
|
||||
#define DEFINE_STANDARD_RTTI_INLINE(C1,C2) DEFINE_STANDARD_RTTI(C1)
|
||||
#define DEFINE_STANDARD_RTTI_COMPAT(C1,C2) DEFINE_STANDARD_RTTI(C1)
|
||||
#else
|
||||
#define DEFINE_STANDARD_RTTI_COMPAT(C1,C2) DEFINE_STANDARD_RTTI(C1,C2)
|
||||
#endif
|
||||
~~~~~
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_wok Applications based on CDL and WOK
|
||||
|
||||
If your application is essentially based on CDL, and you need to upgrade it to OCCT 7.0, you will very likely need to convert your application code to non-CDL form.
|
||||
This is a non-trivial effort; the required actions would depend strongly on the structure of the code and used CDL features.
|
||||
If you have application essentially based on CDL, and need to upgrade it to OCCT 7.0, you will very likely need to convert your application code to non-CDL form.
|
||||
This is non-trivial effort; the required actions would depend strongly on the structure of the code and used features of CDL.
|
||||
|
||||
The upgrade script and sources of a specialized WOK version used for OCCT code upgrade can be found in WOK Git repository in branch [CR0_700_2](http://git.dev.opencascade.org/gitweb/?p=occt-wok.git;a=log;h=refs/heads/CR0_700_2).
|
||||
The upgrade script and sources of specialized version of WOK used for upgrading OCCT code can be found in WOK Git repository in branch [CR0_700_2](http://git.dev.opencascade.org/gitweb/?p=occt-wok.git;a=log;h=refs/heads/CR0_700_2).
|
||||
|
||||
[Contact us](http://www.opencascade.com/contact/) if you need more help.
|
||||
|
||||
@subsection upgrade_occt700_bspline Separation of BSpline cache
|
||||
|
||||
Implementation of NURBS curves and surfaces has been revised: the cache of polynomial coefficients, which is used to accelerate calculate values of B-spline, has been separated from data objects *Geom2d_BSplineCurve, Geom_BSplineCurve* and *Geom_BSplineSurface* into the dedicated classes *BSplCLib_Cache* and *BSplSLib_Cache*.
|
||||
Implementation of NURBS curves and surfaces has been revised: cache of polynomial coefficients, used to accelerate calculate values of B-spline, is separated from data objects (Geom2d_BSplineCurve, Geom_BSplineCurve, Geom_BSplineSurface), into dedicated classes (BSplCLib_Cache and BSplSLib_Cache).
|
||||
|
||||
The benefits of this change are:
|
||||
|
||||
* Reduced memory footprint of OCCT shapes (up to 20% on some cases)
|
||||
* Possibility to evaluate the same B-Spline concurrently in parallel threads without data races and mutex locks
|
||||
|
||||
The drawback is that direct evaluation of B-Splines using methods of curves and surfaces becomes slower due to the absence of cache. The slow-down can be avoided by using adaptor classes *Geom2dAdaptor_Curve, GeomAdaptor_Curve* and *GeomAdaptor_Surface*, which now use cache when the curve or surface is a B-spline.
|
||||
The drawback is that direct evaluation of B-Splines using methods of curves and surfaces becomes slower, due to absence of cache. The way to avoid slow down is to use adaptor classes (Geom2dAdaptor_Curve, GeomAdaptor_Curve and GeomAdaptor_Surface): they now use cache when the curve or surface is a B-spline.
|
||||
|
||||
OCCT algorithms have been changed to use adaptors for B-spline calculations instead of direct methods for curves and surfaces.
|
||||
The same changes (use of adaptors instead of direct call to curve and surface methods) should be implemented in relevant places in the applications based on OCCT to get the maximum performance.
|
||||
|
||||
@subsection upgrade_occt700_booleanresult Structural result of Boolean operations
|
||||
|
||||
The result of Boolean operations became structured according to the structure of the input shapes. Therefore it may impact old applications that always iterate on direct children of the result compound assuming to obtain solids as iteration items, regardless of the structure of the input shapes. In order to get always solids as iteration items it is recommended to use TopExp_Explorer instead of TopoDS_Iterator.
|
||||
|
||||
@subsection upgrade_occt700_brepextrema BRepExtrema_ExtCC finds one solution only
|
||||
|
||||
Extrema computation between non-analytical curves in shape-shape distance calculation algorithm has been changed in order to return only one solution. So, if e.g. two edges are created on parallel b-spline curves the algorithm BRepExtrema_DistShapeShape will return only one solution instead of enormous number of solutions. There is no way to get algorithm working in old manner.
|
||||
OCCT algorithms are changed to use adaptors for B-spline calculations instead of direct methods of curves and surfaces.
|
||||
The same changes (use of adaptors instead of direct call to curve and surface methods) should be implemented in relevant places in applications based on OCCT in order to get maximum performance.
|
||||
|
||||
@subsection upgrade_occt700_sorttools Removal of SortTools package
|
||||
|
||||
Package *SortTools* has been removed.
|
||||
Package SortTools has been removed.
|
||||
The code that used the tools provided by that package should be corrected manually.
|
||||
The recommended approach is to use sorting algorithms provided by STL.
|
||||
|
||||
@@ -769,22 +382,22 @@ can be replaced by:
|
||||
...
|
||||
TCollection_Array1OfReal aValues = ...;
|
||||
...
|
||||
std::stable_sort (aValues.begin(), aValues.end());
|
||||
std::stable_sort (aValues->begin(), aValues->end());
|
||||
~~~~~
|
||||
|
||||
@subsection upgrade_occt700_2dlayers On-screen objects and ColorScale
|
||||
|
||||
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.
|
||||
Old mechanism for rendering Underlay and Overlay on-screen 2D objects based on Visual3d_Layer and immediate drawing model (e.g. uncached and thus slow) have been removed.
|
||||
Classes Aspect_Clayer2d, OpenGl_GraphicDriver_Layer, Visual3d_Layer, Visual3d_LayerItem, V3d_LayerMgr, V3d_LayerMgrPointer have been deleted.
|
||||
|
||||
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).
|
||||
To keep on-screen 2D objects on top of the main screen, they can be assigned to the appropriate Z-layer.
|
||||
Predefined Z-layers *Graphic3d_ZLayerId_TopOSD* and *Graphic3d_ZLayerId_BotOSD* are intended to replace Underlay and Overlay layers within the old API.
|
||||
General AIS interactive objects with transformation persistence flag Graphic3d_TMF_2d can be used as replacement of Visual3d_LayerItem.
|
||||
Anchor point specified for transformation persistence defines a corner of window (or center in case of (0, 0) point).
|
||||
To keep on-screen 2D objects on the top of main screen, them could be assigned to appropriate Z-layer.
|
||||
Predefined Z-layers Graphic3d_ZLayerId_TopOSD and Graphic3d_ZLayerId_BotOSD are intended to replace Underlay and Overlay layers within old API.
|
||||
|
||||
*ColorScale* object previously implemented using *Visual3d_LayerItem* has been moved to a new class *AIS_ColorScale*, with width and height specified explicitly.
|
||||
The property of *V3d_View* storing the global *ColorScale* object has been removed with associated methods *V3d_View::ColorScaleDisplay(), V3d_View::ColorScaleErase(), V3d_View::ColorScaleIsDisplayed()* and *V3d_View::ColorScale()* as well as the classes *V3d_ColorScale, V3d_ColorScaleLayerItem* and *Aspect_ColorScale*.
|
||||
Here is an example of creating *ColorScale* using the updated API:
|
||||
ColorScale object previously implemented using Visual3d_LayerItem has been moved to a new class AIS_ColorScale, with width and height specified explicitly.
|
||||
The property of V3d_View storing global ColorScale object has been removed with associated methods V3d_View::ColorScaleDisplay(), V3d_View::ColorScaleErase(), V3d_View::ColorScaleIsDisplayed(), V3d_View::ColorScale() and classes V3d_ColorScale, V3d_ColorScaleLayerItem, Aspect_ColorScale.
|
||||
Here is an example of creating ColorScale using updated API:
|
||||
|
||||
~~~~~
|
||||
Handle(AIS_ColorScale) aCS = new AIS_ColorScale();
|
||||
@@ -801,14 +414,14 @@ aCS->SetToUpdate();
|
||||
theContextAIS->Display (aCS);
|
||||
~~~~~
|
||||
|
||||
To see how 2d objects are implemented in OCCT you can call Draw commands *vcolorscale, vlayerline* or *vdrawtext* (with <i>-2d</i> option).
|
||||
Draw command *vcolorscale* now requires the name of *ColorScale* object as argument.
|
||||
To display this object use command *vdisplay*. For example:
|
||||
To see how 2d objects are realized in OCCT you can call draw commands vcolorscale, vlayerline or vdrawtext (with -2d option).
|
||||
Draw command vcolorscale now requires a name of ColorScale object as an argument.
|
||||
To display this object use command vdisplay. Example:
|
||||
|
||||
~~~~~
|
||||
pload VISUALIZATION
|
||||
vinit
|
||||
vcolorscale cs -demo
|
||||
vcolorscale cs –demo
|
||||
pload MODELING
|
||||
box b 100 100 100
|
||||
vdisplay b
|
||||
@@ -818,7 +431,7 @@ vlayerline 0 300 300 300 10
|
||||
vdrawtext t "2D-TEXT" -2d -pos 0 150 0 -color red
|
||||
~~~~~
|
||||
|
||||
Here is a small example in C++ illustrating how to display a custom AIS object in 2d:
|
||||
Here is a small example in c++ how to display a custom AIS object in 2d:
|
||||
~~~~~
|
||||
Handle(AIS_InteractiveContext) aContext = ...;
|
||||
Handle(AIS_InteractiveObject) anObj =...; // create an AIS object
|
||||
@@ -831,37 +444,39 @@ aContext->Display (anObj); // display the object
|
||||
|
||||
#### Visual3d package
|
||||
|
||||
Package *Visual3d* implementing the intermediate layer between high-level *V3d* classes
|
||||
Package Visual3d implementing intermediate layer between high-level V3d classes
|
||||
and low-level OpenGl classes for views and graphic structures management has been dropped.
|
||||
|
||||
The *OpenGl_View* inherits from the new class *Graphic3d_CView*.
|
||||
*Graphic3d_CView* is an interface class that declares abstract methods for managing displayed structures,
|
||||
The OpenGl_View inherits from the new class Graphic3d_CView.
|
||||
Graphic3d_CView is an interface class that declares abstract methods for managing displayed structures,
|
||||
display properties and a base layer code that implements computation
|
||||
and management of HLR (or more broadly speaking view-depended) structures.
|
||||
|
||||
In the new implementation it takes place of the eliminated *Visual3d_View*.
|
||||
As before the instance of *Graphic3d_CView* is still completely managed by *V3d_View* classes.
|
||||
It can be accessed through *V3d_View* interface but normally it should not be required as all its methods are completely wrapped.
|
||||
In new implementation it takes place of eliminated Visual3d_View.
|
||||
As before the instance of Graphic3d_CView is still completely managed by V3d_View classes.
|
||||
It can be accessed through V3d_View interface but normally this should not be required as all its methods are completely wrapped.
|
||||
|
||||
In more details, a concrete specialization of *Graphic3d_CView* is created and returned by the graphical driver on request.
|
||||
Right after the creation the views are directly used for setting rendering properties and adding graphical structures to be displayed.
|
||||
In more details, a concrete specialization of Graphic3d_CView is created and returned by graphical driver on request.
|
||||
Right after creation the views is directly used for setting rendering properties and adding graphical structures to be displayed.
|
||||
|
||||
The rendering of graphics is possible after mapping a window and activating the view.
|
||||
The direct setting of properties obsoletes the use of intermediate structures with display parameter
|
||||
like *Visual3d_ContextView*, etc. This means that the whole package *Visual3d* becomes redundant.
|
||||
The direct setting of properties makes obsolete usage of intermediate structures with display parameter
|
||||
like Visual3d_ContextView and etc (the whole package of Visual3d become redundant).
|
||||
|
||||
The functionality previously provided by *Visual3d* package has been redesigned in the following way :
|
||||
- The management of display of structures has been moved from *Visual3d_ViewManager* into *Graphic3d_StructureManager*.
|
||||
- The class *Visual3d_View* has been removed. The management of computed structures has been moved into the base layer of *Graphi3d_CView*.
|
||||
- All intermediate structures for storing view parameters, e.g. *Visual3d_ContextView*, have been removed.
|
||||
The settings are now kept by instances of *Graphic3d_CView*.
|
||||
- The intermediate class *Visual3d_Light* has been removed. All light properties are stored in *Graphic3d_CLight* structure, which is directly accessed by instances of *V3d_Light* classes.
|
||||
- All necessary enumerations have been moved into *Graphic3d* package.
|
||||
New location of functionality previously provided by Visual3d package:
|
||||
- Logic of managing display of structures was put from Visual3d_ViewManager into Graphic3d_StructureManager.
|
||||
- Removed Visual3d_View class. Logic of managing computed structures was put into base layer of Graphi3d_CView.
|
||||
- Removed all intermediate structures for storing view parameters e.g. Visual3d_ContextView.
|
||||
All settings are kept by instances of Graphic3d_CView
|
||||
- Removed Visual3d_Light intermediate class.
|
||||
All light properties are still stored in Graphic3d_CLight structure.
|
||||
The structure is directly access by instance of V3d_Light classes.
|
||||
- Moved all needed enumerations into Graphic3d package.
|
||||
|
||||
#### Custom OpenGL rendering and UserDraw
|
||||
|
||||
Old APIs based on global callback functions for creating *UserDraw* objects and for performing custom OpenGL rendering within the view have been dropped.
|
||||
*UserDraw* callbacks are no more required since *OpenGl_Group* now inherits *Graphic3d_Group* and thus can be accessed directly from *AIS_InteractiveObject*:
|
||||
Old APIs based on global callback functions for creating UserDraw objects and for performing custom OpenGL rendering within the view have been dropped.
|
||||
UserDraw callbacks no more required since OpenGl_Group now inherits Graphic3d_Group and thus can be accessed directly from AIS_InteractiveObject:
|
||||
|
||||
~~~~~
|
||||
//! Class implementing custom OpenGL element.
|
||||
@@ -887,7 +502,7 @@ void UserDrawObject::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrs
|
||||
}
|
||||
~~~~~
|
||||
|
||||
To perform a custom OpenGL code within the view, it is necessary to inherit from class *OpenGl_View*.
|
||||
For performing custom OpenGL code within view, user should inherit from class OpenGl_View.
|
||||
See the following code sample:
|
||||
|
||||
~~~~~
|
||||
@@ -941,41 +556,7 @@ public:
|
||||
|
||||
@subsection upgrade_occt700_localcontext Deprecation of Local Context
|
||||
|
||||
The conception of Local Context has been deprecated.
|
||||
The related classes, e.g. *AIS_LocalContext*, and methods ( <i>AIS_InteractiveContext::OpenLocalContext()</i> and others) will be removed in a future OCCT release.
|
||||
Conception of Local Context has been deprecated.
|
||||
Related classes (AIS_LocalContext) and methods (AIS_InteractiveContext::OpenLocalContext() and others) will be removed within some future OCCT release.
|
||||
|
||||
The main functionality provided by Local Context - selection of object subparts - can be now used within Neutral Point without opening any Local Context.
|
||||
|
||||
@subsection upgrade_occt700_separate_caf_visualisation Separation of visualization part from TKCAF
|
||||
|
||||
Visualization CAF attributes have been moved into a new toolkit *TKVCAF*.
|
||||
If your application uses the classes from *TPrsStd* package then add link to *TKVCAF* library.
|
||||
|
||||
Version numbers of *BinOCAF* and *XmlOCAF* formats are incremented; new files cannot be read by earlier versions of OCCT.
|
||||
|
||||
Before loading the OCAF files saved by previous versions and containing *TPrsStd_AISPresentation* attribute it is necessary to define the environment variable *CSF_MIGRATION_TYPES*, pointing to file *src/StdResources/MigrationSheet.txt*.
|
||||
When using documents loaded from a file, make sure to call method *TPrsStd_AISViewer::New()* prior to accessing *TPrsStd_AISPresentation* attributes in this document as that method creates them.
|
||||
|
||||
@subsection upgrade_euler_angles Correction of interpretation of Euler angles in gp_Quaternion
|
||||
|
||||
Conversion of *gp_Quaternion* to and from intrinsic Tait-Bryan angles (including *gp_YawPitchRoll*) is fixed.
|
||||
|
||||
Before that fix the sequence of rotation axes was opposite to the intended; e.g. *gp_YawPitchRoll* (equivalent to *gp_Intrinsic_ZYX*) actually defined intrinsic rotations around X, then Y, then Z. Now the rotations are made in correct order.
|
||||
|
||||
Applications that use *gp_Quaternion* to convert Yaw-Pitch-Roll angles (or other intrinsic Tait-Bryan sequences) may need to be updated to take this change into account.
|
||||
|
||||
@subsection upgrade_zoom_persistent_selection Zoom Persistent Selection
|
||||
|
||||
Zoom persistent selection introduces a new structure *Graphic3d_TransformPers* for transform persistence methods and parameters and a new class *Graphic3d_WorldViewProjState* for referring camera transformation state. You might need to update your code to deal with the new classes if you were using the related features. Please, keep in mind the following:
|
||||
* *Graphic3d_Camera::ModelViewState* has been renamed to *Graphic3d_Camera::WorldViewState*.
|
||||
* Transformation matrix utilities from *OpenGl_Utils* namespace have been moved to *Graphic3d_TransformUtils* and *Graphic3d_TransformUtils.hxx* header respectively.
|
||||
* Matrix stack utilities from *OpenGl_Utils* namespace have been moved to *OpenGl_MatrixStack* class and *OpenGl_MatrixStack.hxx* header respectively.
|
||||
* *OpenGl_View* methods *Begin/EndTransformPersistence* have been removed. Please, use *Graphic3d_TransformPers::Apply()* instead to apply persistence to perspective and world-view projection matrices.
|
||||
Applications that use gp_Quaternion to convert Yaw-Pitch-Roll angles (or other intrinsic Tait-Bryan sequences) may need to be updated to take this change into account.
|
||||
|
||||
|
||||
@subsection Correction of texture mapping of objects
|
||||
|
||||
Interaction of texture and environment texture is fixed. Textured objects have priority over the environment mapping.
|
||||
Redundant enumerations V3d_TypeOfSurface and Graphic3d_TypeOfSurface, class OpenGl_SurfaceDetailState, corresponding methods from Graphic3d_CView, OpenGl_ShaderManager, OpenGl_View, V3d_View, V3d_Viewer are deleted.
|
||||
Draw command VSetTextureMode is deleted.
|
||||
|
@@ -19,7 +19,7 @@ modeling (CAD), manufacturing / measuring (CAM) or numerical simulation (CAE).
|
||||
@section OCCT_OVW_SECTION_2 Copyrights
|
||||
|
||||
Open CASCADE Technology and all materials, including this documentation, is
|
||||
Copyright (c) 1999-2016 by OPEN CASCADE S.A.S. All rights reserved.
|
||||
Copyright (c) 1999-2015 by OPEN CASCADE S.A.S. All rights reserved.
|
||||
|
||||
@htmlonly<center>@endhtmlonly
|
||||
http://www.opencascade.com
|
||||
@@ -59,8 +59,8 @@ OPEN CASCADE S.A.S.
|
||||
|
||||
**Mac** and the Mac logo are trademarks of Apple Inc., registered in the U.S. and other countries.
|
||||
|
||||
Acknowledgments
|
||||
-----------------
|
||||
Acknowledgements
|
||||
------------------
|
||||
|
||||
The following parties are acknowledged for producing tools which are used within
|
||||
Open CASCADE Technology libraries or for release preparation.
|
||||
@@ -73,7 +73,7 @@ and, in case you need any further information, directly contact their authors.
|
||||
**Qt** is a cross-platform application framework that is widely used for developing application software
|
||||
with graphical user interface (GUI). Qt is free and open source software distributed under
|
||||
the terms of the GNU Lesser General Public License. In OCCT Qt is used for programming samples.
|
||||
If you need further information on Qt, please, refer to Qt Homepage (http://www.qt.io/)
|
||||
If you need further information on Qt, please, refer to Qt Homepage (http://qt.digia.com).
|
||||
|
||||
**Tcl** is a high-level programming language. Tk is a graphical user interface (GUI) toolkit,
|
||||
with buttons, menus, listboxes, scrollbars, and so on. Taken together Tcl and Tk provide a solution
|
||||
@@ -107,12 +107,15 @@ Threading Building Blocks is not just a threads-replacement library. It represen
|
||||
abstracts platform details and threading mechanisms for scalability and performance.
|
||||
TBB is available under GPLv2 license with the runtime exception.
|
||||
|
||||
Open CASCADE Technology WOK module on Windows also makes use of LGPL-licensed C routines **regexp**
|
||||
and **getopt**, taken from GNU C library.
|
||||
|
||||
**OpenGL** is an industry standard API for 3D graphics used by OCCT for
|
||||
implementation of 3D viewer. OpenGL specification is developed by the
|
||||
Khronos group, http://www.khronos.org/opengl/. OCCT code includes header
|
||||
file *glext.h* obtained from Khronos web site.
|
||||
|
||||
**VTK** -- The **Visualization Toolkit (VTK)** is an open-source, freely available software system for 3D computer graphics, image processing and visualization. OCCT VIS component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library. If you need further information on VTK, please, refer to VTK Homepage http://www.vtk.org/.
|
||||
**VTK** - The **Visualization Toolkit (VTK)** is an open-source, freely available software system for 3D computer graphics, image processing and visualization. OCCT VIS component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library. If you need further information on VTK, please, refer to VTK Homepage http://www.vtk.org/.
|
||||
|
||||
**Doxygen** developed by Dimitri van Heesch is open source documentation system for
|
||||
C++, C, Java, Objective-C, Python, IDL, PHP and C#. This product is used in Open CASCADE Technology
|
||||
@@ -155,7 +158,7 @@ OCCT documentation is provided in several forms:
|
||||
which is a freeware and can be downloaded from the Adobe site.
|
||||
|
||||
- Full reference documentation covering all OCCT classes generated automatically by Doxygen
|
||||
software is provided in HTML format.
|
||||
software is provided in HTML format, in a separate package.
|
||||
Reference documentation is presented in **Modules --> Toolkits --> Packages --> Classes**
|
||||
logic structure with cross-references to all OCCT classes and complete in-browser search by all classes.
|
||||
|
||||
@@ -188,66 +191,90 @@ Linux (x86-64), MAC OS X (x86-64) and Android (4.0.4 armv7) platforms.
|
||||
The tables below describe the recommended hardware and software configurations
|
||||
for which OCCT is certified to work.
|
||||
|
||||
@subsection overview_req_os Operating System
|
||||
@subsection OCCT_OVW_SECTION_5_1 Linux
|
||||
|
||||
| OS | Versions |
|
||||
| --------- | ----------- |
|
||||
| Windows | 10, 8.1, 7 SP1, Vista SP2 |
|
||||
| Linux | Mandriva 2010, CentOS 6.3, Fedora 18, Ubuntu 14.10 - 15.10, Debian 6.0, Debian 7.0 |
|
||||
| OS X | 10.10 Yosemite / 10.9 Mavericks / 10.8 Mountain Lion / 10.7 Lion |
|
||||
| Android | 6.x, 5.x, 4.0.4+ |
|
||||
| iOS | iOS 7 |
|
||||
|
||||
@subsection overview_req_cpp C++ Compiler / IDE
|
||||
|
||||
| OS | Compiler |
|
||||
| --------- | ----------- |
|
||||
| Windows | Microsoft Visual Studio: 2010 SP1<sup>1</sup>, 2012 Update 4, 2013 Update 5, 2015 <br> Intel C++ Composer XE 2013 SP1 <br> GCC 4.3+ (Mingw-w64)|
|
||||
| Linux | GNU gcc 4.3+ <br> LLVM CLang 3.6+ |
|
||||
| OS X | XCode 6 or newer |
|
||||
| Android | NDK r10, GNU gcc 4.8 or newer |
|
||||
|
||||
1) VC++ 10 64-bit is used for regular testing and for building
|
||||
binary package of official release of OCCT on Windows.
|
||||
|
||||
@subsection overview_req_libs Third-party libraries
|
||||
|
||||
| Component | Requirement |
|
||||
| --------- | ----------- |
|
||||
| Graphic library | OpenGL 3.3+, OpenGL ES 2.0+ <br> Direct3D 9 |
|
||||
| Qt (for samples and demos) | Desktop: Qt 4.8.6+ http://www.qt.io/download/ <br> Android: Qt 5.3.2+ http://www.qt.io/download/ |
|
||||
| TCL (for testing tools) | Tcl/Tk 8.6.3+ http://www.tcl.tk/software/tcltk/download.html <br> or ActiveTcl 8.6 http://www.activestate.com/activetcl/downloads (for Windows)|
|
||||
| Freetype (for text rendering) | FreeType 2.4.11-2.5.5 http://sourceforge.net/projects/freetype/files/ |
|
||||
| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.17.0+ http://sourceforge.net/projects/freeimage/files |
|
||||
| gl2ps (optional, for export contents of OCCT viewer to vector formats) | gl2ps-1.3.8+ http://geuz.org/gl2ps/ |
|
||||
| Intel TBB (optional, for multithreaded algorithms) | TBB 4.x or 5.x http://www.threadingbuildingblocks.org/ |
|
||||
| VTK (for VTK Integration Services | VTK 6.1+ http://www.vtk.org/VTK/resources/software.html |
|
||||
| Doxygen (optional for building documentation) | Doxygen 1.8.5+ http://www.stack.nl/~dimitri/doxygen/download.html |
|
||||
|
||||
@subsection overview_req_hw Hardware
|
||||
|
||||
| Component | Requirement |
|
||||
| --------- | ----------- |
|
||||
| Operating System | Mandriva 2010, CentOS 5.5, CentOS 6.3, Fedora 17, Fedora 18, Ubuntu 13.04, Debian 6.0\* |
|
||||
| ----- | ----- |
|
||||
| Minimum memory | 512 MB, 1 GB recommended |
|
||||
| Free disk space (complete installation) | 600 MB approx. |
|
||||
| Video card | See \ref overview_req_graphics |
|
||||
| Graphic library | OpenGL 3.3+, OpenGL ES 2.0+ |
|
||||
| C++ | GNU gcc 4.0. - 4.7.3. |
|
||||
| TCL (for testing tools) | Tcl/Tk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/download.html |
|
||||
| Qt (for demonstration tools) | Qt 4.8.6 http://qt-project.org/downloads |
|
||||
| Freetype (for text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
|
||||
| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.16.0 http://sourceforge.net/projects/freeimage/files |
|
||||
| gl2ps (optional, for export contents of OCCT viewer to vector graphic files) | gl2ps-1.3.8 http://geuz.org/gl2ps/ |
|
||||
| Intel TBB (optional, for multithreaded algorithms) | TBB 3.x or 4.x http://www.threadingbuildingblocks.org/ |
|
||||
| VTK (for VTK Integration Services | VTK 6.1.0 http://www.vtk.org/VTK/resources/software.html |
|
||||
|
||||
On desktop, 3D viewer for optimal performance requires graphics processing unit (GPU) supporting OpenGL 3.3 or above.
|
||||
Ray tracing requires OpenGL 4.0+ or OpenGL 3.3+ with *GL_ARB_texture_buffer_object_rgb32* extension.
|
||||
Textures within ray tracing will be available only when *GL_ARB_bindless_texture extension* is provided by driver.
|
||||
* Debian 6.0 64 bit is a platform used for regular testing of contributions
|
||||
|
||||
@subsection OCCT_OVW_SECTION_5_2 Windows
|
||||
|
||||
| Operating System | Windows 8.1 / 7 SP1 / Vista SP2 / XP SP3 |
|
||||
| ----- | ----- |
|
||||
| Minimum memory | 512 MB, 1 GB recommended |
|
||||
| Free disk space (complete installation) | 600 MB approx. |
|
||||
| Video card | See \ref overview_req_graphics |
|
||||
| Graphic library | OpenGL 3.3+, OpenGL ES 2.0+ |
|
||||
| C++ | Microsoft Visual Studio: 2005 SP1, 2008 SP1, 2010 SP1 \*, 2012 Update 3, 2013 <br>Intel C++ Composer XE 2013 SP1 |
|
||||
| TCL (for testing tools) | Tcl/Tk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/download.html |
|
||||
| Qt (for demonstration tools) | Qt 4.8.6 http://qt-project.org/downloads |
|
||||
| Freetype (OCCT Text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
|
||||
| FreeImage (Support of common graphic formats) | FreeImage 3.16.0 http://sourceforge.net/projects/freeimage/files |
|
||||
| gl2ps (Export contents of OCCT viewer to vector graphic file) | gl2ps-1.3.8 http://geuz.org/gl2ps/ |
|
||||
| Intel TBB (optional, for multithreaded algorithms) | TBB 3.x or 4.x http://www.threadingbuildingblocks.org/ |
|
||||
| VTK (for VTK Integration Services | VTK 6.1.0 http://www.vtk.org/VTK/resources/software.html |
|
||||
|
||||
* VC++ 10 64-bit is used for certification of contributions and for building
|
||||
binary package of official release of OCCT on Windows.
|
||||
|
||||
@subsection OCCT_OVW_SECTION_5_3 MAC OS X
|
||||
|
||||
| Operating System | OS X 10.10 Yosemite / 10.9 Mavericks / 10.8 Mountain Lion / 10.7 Lion / 10.6.8 Snow Leopard |
|
||||
| ----- | ----- |
|
||||
| Minimum memory | 512 MB, 1 GB recommended |
|
||||
| Free disk space (complete installation) | 600 MB approx. |
|
||||
| C++ | XCode 3.2 or newer (4.x is recommended) |
|
||||
| TCL (for testing tools) | Tcl/Tk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/download.html |
|
||||
| Qt (for demonstration tools) | Qt 4.8.6 http://qt-project.org/downloads |
|
||||
| Freetype (OCCT Text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
|
||||
| FreeImage (Support of common graphic formats) | FreeImage 3.16.0 http://sourceforge.net/projects/freeimage/files |
|
||||
| gl2ps (Export contents of OCCT viewer to vector graphic file) | gl2ps-1.3.8 http://geuz.org/gl2ps/ |
|
||||
| Intel TBB (optional, for multithreaded algorithms) | TBB 3.x or 4.x http://www.threadingbuildingblocks.org/ |
|
||||
|
||||
@subsection OCCT_OVW_SECTION_5_4 Android
|
||||
|
||||
| Operating System | Android 4.0.4+ |
|
||||
| ----- | ----- |
|
||||
| Minimum memory | 512 MB, 1 GB recommended |
|
||||
| C++ | NDK r10, GNU gcc 4.8 or newer |
|
||||
| Qt (for demonstration tools) | Qt 5.3.2 http://qt-project.org/downloads |
|
||||
| Freetype (for text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
|
||||
|
||||
@subsection overview_req_graphics Graphic cards
|
||||
|
||||
On desktop, 3D viewer requires graphic card or software implementation supporting OpenGL 1.1 or above. OpenGL 2.1+ is highly recommended.
|
||||
Ray tracing requires OpenGL 4.0+ or OpenGL 3.1+ with GL_ARB_texture_buffer_object_rgb32 extension. Textures within ray tracing will be available only when GL_ARB_bindless_texture extension is provided by driver.
|
||||
|
||||
On mobile platforms, OpenGL ES 2.0+ is required for 3D viewer. The ray tracing is not yet available on mobile platforms.
|
||||
Some old hardware might be unable to execute complex GLSL programs (e.g. with high number of light sources, clipping planes).
|
||||
|
||||
The following table lists graphic cards tested to work with OCCT.
|
||||
|
||||
| Graphic card | Driver | OS | OpenGL (fixed pipeline) | OpenGL (shaders) | OpenGL (ray tracing) |
|
||||
| Graphic card | Driver | OS | OpenGL (fixed pipeline) | OpenGL (shaders) | OpenGL (ray tracing) |
|
||||
| ---- | ---- | ---- | :----: | :----: | :----: |
|
||||
| NVIDIA GeForce GTX 650 | Driver 340.52, OpenGL 4.4 | Windows 7 64 bit | OK | OK | OK |
|
||||
| AMD/ATI RadeOn HD 7870 | Driver 14.100, OpenGL 4.4 | Windows 7 64-bit | OK | OK | OK |
|
||||
| Intel(R) HD Graphics 2500 | Driver 10.18.10.3621, OpenGL 4.0 | Windows 7 64 bit | OK | OK | limited (no textures) |
|
||||
| RadeOn 9600 | OpenGL 2.1.8454 | Windows XP 32-bit | OK | bad | unsupported by hardware |
|
||||
| NVIDIA GeForce 6600 GT | OpenGL 2.1 | Windows XP 32-bit | OK | OK | unsupported by hardware |
|
||||
| NVIDIA GeForce 320 | N/A | Mac OS X 10.6 / OS X 10.10 | OK | OK | not yet supported by OCCT |
|
||||
| Apple software OpenGL | N/A | Mac OS X 10.6 / OS X 10.10 | OK | OK | N/A |
|
||||
| Mesa 10.2.4 (software emulator) | "Gallium 0.4 on llvmpipe (LLVM 3.4, 256 bits)" OpenGL 3.0 | Windows 7 64 bit | OK | OK | unsupported by software |
|
||||
| Mesa 10.2.4 \* | "Gallium 0.4 on llvmpipe (LLVM 3.4, 256 bits)" OpenGL 3.0 | Windows 7 64 bit | OK | OK | unsupported by software |
|
||||
|
||||
* Mesa implementation of OpenGL is used for certification testing of OCCT
|
||||
|
||||
@section OCCT_OVW_SECTION_4 Installation
|
||||
|
||||
@@ -285,7 +312,7 @@ When the installation is complete, you will find the directories for 3rd party p
|
||||
@image html /overview/images/overview_3rdparty.png
|
||||
@image latex /overview/images/overview_3rdparty.png
|
||||
|
||||
The contents of the OCCT-7.0.0 directory (called further "OCCT root", or $CASROOT) are as follows:
|
||||
The contents of the OCCT-6.9.0 directory (called further "OCCT root", or $CASROOT) are as follows:
|
||||
|
||||
@image html /overview/images/overview_installation.png "The directory tree"
|
||||
@image latex /overview/images/overview_installation.png "The directory tree"
|
||||
@@ -296,7 +323,8 @@ The contents of the OCCT-7.0.0 directory (called further "OCCT root", or $CASROO
|
||||
* **data** This folder contains CAD files in different formats, which can be used to test the OCCT functionality;
|
||||
* **doc** This folder contains OCCT documentation in HTML and PDF format;
|
||||
* **dox** This folder contains sources of OCCT documentation in plain text (MarkDown) format;
|
||||
* **inc** This folder contains copies of all OCCT header files;
|
||||
* **drv** This folder contains source files generated by WOK (private header files and instantiations of generic classes);
|
||||
* **inc** This folder contains all OCCT header files;
|
||||
* **samples** This folder contains sample applications.
|
||||
* **src** This folder contains OCCT source files. They are organized in folders, one per development unit;
|
||||
* **tests** This folder contains scripts for OCCT testing.
|
||||
@@ -310,7 +338,7 @@ To run any Open CASCADE Technology application you need to set the environment v
|
||||
|
||||
You can define the environment variables with env.bat script located in the
|
||||
$CASROOT folder. This script accepts two arguments to be used:
|
||||
the version of Visual Studio (vc8 -- vc12) and the architecture (win32 or win64).
|
||||
the version of Visual Studio (vc8 - vc12) and the architecture (win32 or win64).
|
||||
|
||||
The additional environment settings necessary for compiling OCCT libraries and samples
|
||||
by Microsoft Visual Studio can be set using script custom.bat located in the same folder.
|
||||
@@ -337,7 +365,7 @@ The scripts are located in the OCCT root folder.
|
||||
* **MMGT_OPT** (optional) if set to 1, the memory manager performs optimizations as described below; if set to 2,
|
||||
Intel (R) TBB optimized memory manager is used; if 0 (default), every memory block is allocated
|
||||
in C memory heap directly (via malloc() and free() functions).
|
||||
In the latter case, all other options starting with *MMGT*, except MMGT_CLEAR, are ignored;
|
||||
In the latter case, all other options except MMGT_CLEAR are ignored;
|
||||
* **MMGT_CLEAR** (optional) if set to 1 (default), every allocated memory block is cleared by zeros;
|
||||
if set to 0, memory block is returned as it is;
|
||||
* **MMGT_CELLSIZE** (optional) defines the maximal size of blocks allocated in large pools of memory. Default is 200;
|
||||
@@ -348,18 +376,21 @@ The scripts are located in the OCCT root folder.
|
||||
* **MMGT_MMAP** (optional) when set to 1 (default), large memory blocks are allocated using
|
||||
memory mapping functions of the operating system; if set to 0,
|
||||
they will be allocated in the C heap by malloc();
|
||||
* **CSF_LANGUAGE** (optional) defines default language of messages;
|
||||
* **CSF_LANGUAGE** is required to define the default language of messages;
|
||||
* **CSF_DEBUG** (optional, Windows only): if defined then a diagnostic message is displayed in case of an exception;
|
||||
* **CSF_DEBUG_BOP** (optional): if defined then it should specify directory where diagnostic data on problems occured in Boolean operations will be saved;
|
||||
* **CSF_MDTVTexturesDirectory** defines the directory for available textures when using texture mapping;
|
||||
* **CSF_ShadersDirectory** defines the directory for GLSL programs (required for 3D viewer to work);
|
||||
* **CSF_UnitsDefinition** and **CSF_UnitsLexicon** should define paths to resource files Lexi_Expr.dat and Units.dat, respectively (required for support of measurement units);
|
||||
* **CSF_SHMessage** defines the path to the messages file for *ShapeHealing*;
|
||||
* **CSF_XSMessage** defines the path to the messages file for **STEP** and **IGES** translators;
|
||||
* **CSF_StandardDefaults**, **CSF_StandardLiteDefaults*, **CSF_XCAFDefaults**, and **CSF_PluginDefaults** define paths to directory where configuration files for OCAF persistence are located (required for open/save operations with OCAF documents);
|
||||
* **CSF_IGESDefaults** and **CSF_STEPDefaults** (optional) define paths to directory where resource files of **IGES** and **STEP** translators are located;
|
||||
* **CSF_ShadersDirectory** defines the directory for GLSL programs (required for advanced rendering techniques and custom shaders);
|
||||
* **CSF_UnitsDefinition** and **CSF_UnitsLexicon** should define paths to resource files Lexi_Expr.dat and Units.dat, respectively, required for support of measurement units;
|
||||
* **CSF_SHMessage** is required in order to define the path to the messages file for *ShapeHealing*;
|
||||
* **CSF_XSMessage** is required in order to define the path to the messages file for **STEP** and **IGES** translators;
|
||||
* **CSF_StandardDefaults** and **CSF_PluginDefaults** are required in order to maintain CASCADE Persistence mechanism to make possible any open/save operations with OCAF documents;
|
||||
* **CSF_StandardLiteDefaults** is required in order to maintain *OCCT Persistence mechanism* to make possible any open/save operations with Lite OCAF documents;
|
||||
* **CSF_XCAFDefaults** any open/save operations for **XDE** documents;
|
||||
* **CSF_IGESDefaults** and **CSF_STEPDefaults** are required for **IGES** and **STEP** translators correspondingly in order to define the path to the resource files;
|
||||
* **CSF_XmlOcafResource** is required in order to set the path to **XSD** resources, which defines XML grammar.
|
||||
* **CSF_MIGRATION_TYPES** is required in order to read documents that contain old data types, such as *TDataStd_Shape*;
|
||||
* **TCLLIBPATH**, **TCL_LIBRARY**, **TK_LIBRARY** and **TIX_LIBRARY** are required to allow work with **DRAW** and **WOK**.
|
||||
|
||||
@section OCCT_OVW_SECTION_7 Getting Started
|
||||
|
||||
@@ -389,14 +420,14 @@ Draw contains:
|
||||
You can add new custom test harness commands to Draw in order to test
|
||||
or demonstrate a new functionality, which you are developing.
|
||||
|
||||
Currently DRAW Test Harness is a single executable called *DRAWEXE*.
|
||||
Currently DRAW Test Harness is a single executable called DRAWEXE.
|
||||
|
||||
Commands grouped in toolkits can be loaded at run-time thereby implementing dynamically loaded plug-ins.
|
||||
Thus you can work only with the commands that suit your needs adding
|
||||
the commands dynamically without leaving the Test Harness session.
|
||||
|
||||
Declaration of available plug-ins is done through special resource file(s).
|
||||
The *pload* command loads the plug-in in accordance with
|
||||
The pload command loads the plug-in in accordance with
|
||||
the specified resource file and activates the commands implemented in the plug-in.
|
||||
|
||||
The whole process of using the plug-in mechanism as well as the instructions for extending Test Harness is described in the @ref occt_user_guides__test_harness.
|
||||
@@ -564,9 +595,9 @@ There are two samples are representing usage OCCT framework on Android mobile pl
|
||||
jniviewer
|
||||
@image html /overview/images/samples_java_android_occt.jpg
|
||||
@image latex /overview/images/samples_java_android_occt.jpg
|
||||
Java -- See \subpage samples_java_android_occt "Readme" for details.
|
||||
Java - See \subpage samples_java_android_occt "Readme" for details.
|
||||
|
||||
AndroidQt
|
||||
@image html /overview/images/samples_qml_android_occt.jpg
|
||||
@image latex /overview/images/samples_qml_android_occt.jpg
|
||||
Qt -- See \subpage samples_qml_android_occt "Readme" for details.
|
||||
Qt - See \subpage samples_qml_android_occt "Readme" for details.
|
||||
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 40 KiB |
@@ -97,7 +97,7 @@
|
||||
\fi
|
||||
\hypersetup{%
|
||||
colorlinks=true,%
|
||||
linkcolor=blue,%
|
||||
linkcolor=black,%
|
||||
citecolor=black,%
|
||||
urlcolor=blue,%
|
||||
unicode%
|
||||
@@ -127,12 +127,10 @@
|
||||
\end{titlepage}
|
||||
\clearpage
|
||||
\pagenumbering{roman}
|
||||
\tableofcontents
|
||||
\newpage
|
||||
\pagenumbering{arabic}
|
||||
\begingroup
|
||||
\hypersetup{pageanchor=true, linkcolor=black, colorlinks=true}
|
||||
\tableofcontents
|
||||
\endgroup
|
||||
\hypersetup{pageanchor=true}
|
||||
|
||||
\let\stdsection\section
|
||||
\renewcommand\section{\pagebreak\stdsection}
|
||||
|
@@ -41,7 +41,7 @@ GENERATE_TREEVIEW = NO
|
||||
PREDEFINED = PDF_ONLY
|
||||
GENERATE_LATEX = YES
|
||||
COMPACT_LATEX = YES
|
||||
PDF_HYPERLINKS = NO
|
||||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = YES
|
||||
LATEX_BATCHMODE = YES
|
||||
LATEX_OUTPUT = latex
|
||||
|
@@ -75,13 +75,13 @@ Geometry types and utilities provide geometric data structures and services for:
|
||||
* Calculation of extrema between geometric objects.
|
||||
|
||||
Topology defines relationships between simple geometric entities. A shape, which is a basic topological entity, can be divided into components (sub-shapes):
|
||||
* Vertex -- a zero-dimensional shape corresponding to a point;
|
||||
* Edge -- a shape corresponding to a curve and bounded by a vertex at each extremity;
|
||||
* Wire -- a sequence of edges connected by their vertices;
|
||||
* Face -- a part of a plane (in 2D) or a surface (in 3D) bounded by wires;
|
||||
* Shell -- a collection of faces connected by edges of their wire boundaries;
|
||||
* Solid -- a finite closed part of 3D space bounded by shells;
|
||||
* Compound solid -- a collection of solids connected by faces of their shell boundaries.
|
||||
* Vertex – a zero-dimensional shape corresponding to a point;
|
||||
* Edge - a shape corresponding to a curve and bounded by a vertex at each extremity;
|
||||
* Wire - a sequence of edges connected by their vertices;
|
||||
* Face - a part of a plane (in 2D) or a surface (in 3D) bounded by wires;
|
||||
* Shell - a collection of faces connected by edges of their wire boundaries;
|
||||
* Solid - a finite closed part of 3D space bounded by shells;
|
||||
* Compound solid - a collection of solids connected by faces of their shell boundaries.
|
||||
|
||||
Complex shapes can be defined as assemblies of simpler entities.
|
||||
|
||||
@@ -123,9 +123,9 @@ Top-level API provides the following functionality:
|
||||
* Spheres;
|
||||
* Toruses.
|
||||
* Kinematic Modeling:
|
||||
* Prisms -- linear sweeps;
|
||||
* Revolutions -- rotational sweeps;
|
||||
* Pipes -- general-form sweeps;
|
||||
* Prisms - linear sweeps;
|
||||
* Revolutions - rotational sweeps;
|
||||
* Pipes - general-form sweeps;
|
||||
* Lofting.
|
||||
|
||||
@figure{/technical_overview/images/0001.png "Shapes containing pipes with variable radius produced by sweeping"}
|
||||
@@ -285,7 +285,10 @@ OCAF differs from any other CAD framework in the organization of application dat
|
||||
|
||||
OCAF organizes and embeds these attributes in a document. OCAF documents, in their turn, are managed by an OCAF application.
|
||||
|
||||
For more details see @ref occt_user_guides__ocaf "OCAF User's Guide".
|
||||
For more details see @ref occt_user_guides__ocaf "OCAF User's Guide" and the OCAF white papers:
|
||||
* @ref occt_user_guides__ocaf_wp "Application Framework"
|
||||
* @ref occt_user_guides__ocaf_tree_wp "Distribution of Data through OCAF Tree"
|
||||
* @ref occt_user_guides__ocaf_functionmechanism_wp "Application Framework Function Mechanism"
|
||||
|
||||
See also: our <a href="http://www.opencascade.com/content/tutorial-learning">E-learning & Training</a> offerings.
|
||||
|
||||
|
@@ -30,12 +30,12 @@ The operator can be represented as:
|
||||
<i>R<sub>B</sub>=B<sub>j</sub> (G<sub>1</sub>, G<sub>2</sub>),</i>
|
||||
|
||||
where:
|
||||
* *R<sub>B</sub>* -- result of the operation;
|
||||
* *B<sub>j</sub>* -- operation of type *j* (Common, Fuse, Cut);
|
||||
* *R<sub>B</sub>* - result of the operation;
|
||||
* *B<sub>j</sub>* - operation of type *j* (Common, Fuse, Cut);
|
||||
* *G<sub>1</sub>={S<sub>11</sub>, S<sub>12</sub> ... S<sub>1n1</sub>}* group of arguments (Objects);
|
||||
* *G<sub>2</sub>={S<sub>21</sub>, S<sub>22</sub> ... S<sub>2n2</sub>}* group of arguments (Tools);
|
||||
* *n<sub>1</sub>* -- Number of arguments in *Objects* group;
|
||||
* *n<sub>2</sub>* -- Number of arguments in *Tools* group.
|
||||
* *n<sub>1</sub>* - Number of arguments in *Objects* group;
|
||||
* *n<sub>2</sub>* - Number of arguments in *Tools* group.
|
||||
|
||||
|
||||
**Note** There is an operation *Cut21*, which is an extension for forward Cut operation, i.e <i>Cut21=Cut(G2, G1)</i>.
|
||||
@@ -49,9 +49,9 @@ The GFA operator can be represented as:
|
||||
<i>R<sub>GF</sub> = GF (S<sub>1</sub>, S<sub>2</sub> ... S<sub>n</sub>), </i>
|
||||
|
||||
where
|
||||
* *R<sub>GF</sub>* -- result of the operation,
|
||||
* *S<sub>1</sub>, S<sub>2</sub> ... S<sub>n</sub>* -- arguments of the operation,
|
||||
* *n* -- number of arguments.
|
||||
* *R<sub>GF</sub>* - result of the operation,
|
||||
* *S<sub>1</sub>, S<sub>2</sub> ... S<sub>n</sub>* - arguments of the operation,
|
||||
* *n* - number of arguments.
|
||||
|
||||
The result of the Boolean operator, *R<sub>B</sub>*, can be obtained from *R<sub>GF</sub>*.
|
||||
|
||||
@@ -79,11 +79,11 @@ The PA operator can be represented as follows:
|
||||
|
||||
<i>R<sub>PA</sub>=PA (G<sub>1</sub>, G<sub>2</sub>),</i>
|
||||
where:
|
||||
* <i>R<sub>PA</sub></i> -- is the result of the operation;
|
||||
* <i>R<sub>PA</sub></i> - is the result of the operation;
|
||||
* *G<sub>1</sub>={S<sub>11</sub>, S<sub>12</sub> ... S<sub>1n1</sub>}* group of arguments (Objects);
|
||||
* *G<sub>2</sub>={S<sub>21</sub>, S<sub>22</sub> ... S<sub>2n2</sub>}* group of arguments (Tools);
|
||||
* *n<sub>1</sub>* -- Number of arguments in *Objects* group;
|
||||
* *n<sub>2</sub>* -- Number of arguments in *Tools* group.
|
||||
* *n<sub>1</sub>* - Number of arguments in *Objects* group;
|
||||
* *n<sub>2</sub>* - Number of arguments in *Tools* group.
|
||||
|
||||
The result *R<sub>PA</sub>* can be obtained from *R<sub>GF</sub>* .
|
||||
|
||||
@@ -105,9 +105,9 @@ The fact that the *R<sub>GF</sub>* contains the components of *R<sub>PA</sub>* a
|
||||
The Section operator *SA* can be applied to arbitrary number of arguments in terms of *TopoDS_Shape*. The result of *SA* contains vertices and edges in accordance with interferences between the arguments
|
||||
The SA operator can be represented as follows:
|
||||
<i>R<sub>SA</sub>=SA(S1, S2… Sn)</i>, where
|
||||
* <i>R<sub>SA</sub></i> -- the operation result;
|
||||
* <i>S1, S2 ... Sn</i> -- the operation arguments;
|
||||
* *n* -- the number of arguments.
|
||||
* <i>R<sub>SA</sub></i> – is result of the operation;
|
||||
* <i>S1, S2 … Sn</i> - Arguments of the operation;
|
||||
* *n* - Number of arguments.
|
||||
|
||||
@subsection occt_algorithms_2_2 Parts of algorithms
|
||||
|
||||
@@ -127,7 +127,7 @@ This chapter provides the background terms and definitions that are necessary to
|
||||
|
||||
There are two groups of interferences.
|
||||
|
||||
At first, each shape having a boundary representation (vertex, edge, face) has an internal value of geometrical tolerance. The shapes interfere with each other in terms of their tolerances. The shapes that have a boundary representation interfere when there is a part of 3D space where the distance between the underlying geometry of shapes is less or equal to the sum of tolerances of the shapes. Three types of shapes: vertex, edge and face -- produce six types of **BRep interferences:**
|
||||
At first, each shape having a boundary representation (vertex, edge, face) has an internal value of geometrical tolerance. The shapes interfere with each other in terms of their tolerances. The shapes that have a boundary representation interfere when there is a part of 3D space where the distance between the underlying geometry of shapes is less or equal to the sum of tolerances of the shapes. Three types of shapes - vertex, edge and face - produce six types of **BRep interferences:**
|
||||
* Vertex/Vertex,
|
||||
* Vertex/Edge,
|
||||
* Vertex/Face,
|
||||
@@ -350,7 +350,7 @@ If the pave blocks *PBi* geometrically coincide with a face *Fj*, the pave block
|
||||
|
||||
In general case a common block *CB* contains:
|
||||
* Pave blocks *PBi (i=0,1,2, 3… NbPB)*.
|
||||
* A set of faces *Fj (j=0,1... NbF), NbF* -- number of faces.
|
||||
* A set of faces *Fj (j=0,1... NbF), NbF* - number of faces.
|
||||
|
||||
|
||||
@subsection occt_algorithms_3_6 FaceInfo
|
||||
@@ -702,12 +702,12 @@ The input data for this step is the DS after computing Face/Face interferences.
|
||||
|
||||
| No | Contents | Implementation |
|
||||
| :---- | :---- | :---- |
|
||||
| 1 | For each Face/Face interference *nFi, nFj*, retrieve @ref occt_algorithms_4_6 "FaceInfo". Create draft vertices from intersection points *VPk (k=1, 2…, NbVP)*, where *NbVP* is the number of new vertices, and the draft vertex *VPk* is created from an intersection point if *VPk ≠ Vm (m = 0, 1, 2… NbVm)*, where *Vm* is an existing vertex for the faces *nFi* and *nF,j* (*On* or *In* in terms of *TopoDs_Shape*), *NbVm* is the number of vertices existing on faces *nFi* and *nF,j* and ≠ -- means non-coincidence in terms of @ref occt_algorithms_3_1_1 "Vertex/Vertex interference". | *BOPAlgo_PaveFiller::MakeBlocks()* |
|
||||
| 1 | For each Face/Face interference *nFi, nFj*, retrieve @ref occt_algorithms_4_6 "FaceInfo". Create draft vertices from intersection points *VPk (k=1, 2…, NbVP)*, where *NbVP* is the number of new vertices, and the draft vertex *VPk* is created from an intersection point if *VPk ≠ Vm (m = 0, 1, 2… NbVm)*, where *Vm* is an existing vertex for the faces *nFi* and *nF,j* (*On* or *In* in terms of *TopoDs_Shape*), *NbVm* is the number of vertices existing on faces *nFi* and *nF,j* and ≠ - means non-coincidence in terms of @ref occt_algorithms_3_1_1 "Vertex/Vertex interference". | *BOPAlgo_PaveFiller::MakeBlocks()* |
|
||||
| 2 | For each intersection curve *Cijk* | |
|
||||
| 2.1 | Create paves PVc for the curve using existing vertices, i.e. vertices On or In (in terms of *FaceInfo*) for faces *nFi* and *nFj*. Append the paves *PVc* | *BOPAlgo_PaveFiller::PutPaveOnCurve()* and *BOPDS_PaveBlock::AppendExtPave()* |
|
||||
| 2.2 | Create technological vertices *Vt*, which are the bounding points of an intersection curve (with the value of tolerance *Tol(Cijk)*). Each vertex *Vt* with parameter *Tt* on curve *Cijk* forms pave *PVt* on curve *Cijk*. Append technological paves. | *BOPAlgo_PaveFiller::PutBoundPaveOnCurve()* |
|
||||
| 2.3 | Create pave blocks *PBk* for the curve using paves <i>(k=1, 2…, NbPB)</i>, where *NbPB* is the number of pave blocks | *BOPAlgo_PaveFiller::MakeBlocks()* |
|
||||
| 2.4 | Build draft section edges *ESk* using the pave blocks <i>(k=1, 2…, NbES)</i>, where *NbES* is the number of draft section edges The draft section edge is created from a pave block *PBk* if *PBk* has state *In* or *On* for both faces *nFi* and *nF,j* and *PBk ≠ PBm (m=0, 1, 2… NbPBm)*, where *PBm* is an existing pave block for faces *nFi* and *nF,j* (*On* or *In* in terms of *FaceInfo*), *NbVm* is the number of existing pave blocks for faces *nFi* and *nF,j* and ≠ -- means non-coincidence (in terms of @ref occt_algorithms_3_1_3 "Vertex/Face interference"). | *BOPTools_Tools::MakeEdge()* |
|
||||
| 2.4 | Build draft section edges *ESk* using the pave blocks <i>(k=1, 2…, NbES)</i>, where *NbES* is the number of draft section edges The draft section edge is created from a pave block *PBk* if *PBk* has state *In* or *On* for both faces *nFi* and *nF,j* and *PBk ≠ PBm (m=0, 1, 2… NbPBm)*, where *PBm* is an existing pave block for faces *nFi* and *nF,j* (*On* or *In* in terms of *FaceInfo*), *NbVm* is the number of existing pave blocks for faces *nFi* and *nF,j* and ≠ - means non-coincidence (in terms of @ref occt_algorithms_3_1_3 "Vertex/Face interference"). | *BOPTools_Tools::MakeEdge()* |
|
||||
| 3 | Intersect the draft vertices *VPk (k=1, 2…, NbVP)* and the draft section edges *ESk (k=1, 2…, NbES)*. For this: a) create new object *PFn* of type *BOPAlgo_PaveFiller* with its own DS; b) use vertices *VPk* and edges *ESk* as arguments (in terms of @ref occt_algorithms_4_1 "Arguments") of *PFn*; c) invoke method *Perform()* for *PFn*. Resulting vertices *VPXk (k=1, 2… NbVPX)* and edges *ESXk (k=1, 2… NbESX)* are obtained via mapping between *VPk, ESk* and the results of *PVn*. | *BOPAlgo_PaveFiller::PostTreatFF()* |
|
||||
| 4 | Update face info (sections about pave blocks and vertices) | *BOPAlgo_PaveFiller::PerformFF()* |
|
||||
|
||||
@@ -736,9 +736,9 @@ Building Part (BP) is used to
|
||||
* Provide history information (in terms of <i>\::Generated(), \::Modified()</i> and <i>\::IsDeleted()</i>)
|
||||
BP uses the DS prepared by *BOPAlgo_PaveFiller* described at chapter 5 as input data.
|
||||
BP is implemented in the following classes:
|
||||
* *BOPAlgo_Builder* -- for the General Fuse operator (GFA).
|
||||
* *BOPAlgo_BOP* -- for the Boolean Operation operator (BOA).
|
||||
* *BOPAlgo_Section* -- for the Section operator (SA).
|
||||
* *BOPAlgo_Builder* - for the General Fuse operator (GFA).
|
||||
* *BOPAlgo_BOP* - for the Boolean Operation operator (BOA).
|
||||
* *BOPAlgo_Section* - for the Section operator (SA).
|
||||
|
||||
@figure{/user_guides/boolean_operations/images/operations_image020.svg, "Diagram for BP classes"}
|
||||
|
||||
@@ -934,8 +934,8 @@ This step is the same as @ref occt_algorithms_7_4_4 "Building Result of Type Ver
|
||||
|
||||
The input data for this step is:
|
||||
* *BOPAlgo_Builder* object after building result of type *Edge*;
|
||||
* Original Shape -- Wire
|
||||
* *Type* -- the shape type <i>(TopAbs_WIRE).</i>
|
||||
* Original Shape - Wire
|
||||
* *Type* - the shape type <i>(TopAbs_WIRE).</i>
|
||||
|
||||
| No | Contents | Implementation |
|
||||
| :---- | :---- | :----- |
|
||||
@@ -981,8 +981,8 @@ This step is the same as @ref occt_algorithms_7_4_4 "Building Result of Type Ver
|
||||
@subsubsection occt_algorithms_7_4_11 Build Images for Shells
|
||||
The input data for this step is:
|
||||
* *BOPAlgo_Builder* object after building result of type face;
|
||||
* *Original Shape* -- a Shell;
|
||||
* *Type* -- the type of the shape <i>(TopAbs_SHELL)</i>.
|
||||
* *Original Shape* - Shell;
|
||||
* *Type* - the type of the shape <i>(TopAbs_SHELL)</i>.
|
||||
|
||||
The procedure is the same as for building images for wires.
|
||||
|
||||
@@ -1011,8 +1011,8 @@ This step is the same as @ref occt_algorithms_7_4_4 "Building Result of Type Ver
|
||||
|
||||
The input data for this step is:
|
||||
* *BOPAlgo_Builder* object after building result of type solid;
|
||||
* *Original Shape* -- a Compsolid;
|
||||
* *Type* -- the type of the shape <i>(TopAbs_COMPSOLID)</i>.
|
||||
* *Original Shape* - Compsolid;
|
||||
* *Type* - the type of the shape <i>(TopAbs_COMPSOLID)</i>.
|
||||
|
||||
The procedure is the same as for building images for wires.
|
||||
|
||||
@@ -1021,9 +1021,9 @@ This step is the same as @ref occt_algorithms_7_4_4 "Building Result of Type Ver
|
||||
|
||||
@subsubsection occt_algorithms_7_4_17 Build Images for Compounds
|
||||
The input data for this step is as follows:
|
||||
* *BOPAlgo_Builder* object after building results of type *compsolid*;
|
||||
* *Original Shape* -- a Compound;
|
||||
* *Type* -- the type of the shape <i>(TopAbs_COMPOUND)</i>.
|
||||
* *BOPAlgo_Builder* object after building results of type compsolid;
|
||||
* *Original Shape* - Compound;
|
||||
* *Type* - the type of the shape <i>(TopAbs_COMPOUND)</i>.
|
||||
|
||||
The procedure is the same as for building images for wires.
|
||||
|
||||
@@ -1065,7 +1065,7 @@ The input data for this step is a *BOPAlgo_Builder* object after building result
|
||||
|
||||
* For Boolean operation Fuse all arguments should have equal dimensions.
|
||||
* For Boolean operation Cut the minimal dimension of *S2* should not be less than the maximal dimension of *S1*.
|
||||
* For Boolean operation Common the arguments can have any dimension.
|
||||
* For Boolean operation Common the arguments could have any dimension.
|
||||
|
||||
@subsection occt_algorithms_9_3 Results. General Rules
|
||||
|
||||
@@ -1074,12 +1074,12 @@ The input data for this step is a *BOPAlgo_Builder* object after building result
|
||||
* The result of the operation Fuse is defined for arguments *S1* and *S2* that have the same dimension value : *Dim(S1)=Dim(S2)*. If the arguments have different dimension values the result of the operation Fuse is not defined. The dimension of the result is equal to the dimension of the arguments. For example, it is impossible to fuse an edge and a face.
|
||||
* The result of the operation Fuse for arguments *S1* and *S2* contains the parts of arguments that have states **OUT** relative to the opposite arguments.
|
||||
* The result of the operation Fuse for arguments *S1* and *S2* having dimension value 3 (Solids) is refined by removing all possible internal faces to provide minimal number of solids.
|
||||
* The result of the operation Common for arguments *S1* and *S2* is defined for all values of the dimensions of the arguments. The result can contain shapes of different dimensions, but the minimal dimension of the result will be equal to the minimal dimension of the arguments. For example, the result of the operation Common between edges cannot be a vertex.
|
||||
* The result of the operation Common for arguments *S1* and *S2* is defined for all values of the dimensions of the arguments. The result can contain the shapes of different dimension, but the minimal dimension of the result will be equal to the minimal dimension of the arguments. For example, the result of the operation Common between edges cannot be a vertex.
|
||||
* The result of the operation Common for the arguments *S1* and *S2* contains the parts of the argument that have states **IN** and **ON** relative to the opposite argument.
|
||||
* The result of the operation Cut is defined for arguments *S1* and *S2* that have values of dimensions *Dim(S2)* that should not be less than *Dim(S1)*. The result can contain shapes of different dimensions, but the minimal dimension of the result will be equal to the minimal dimension of the objects *Dim(S1)*. The result of the operation *Cut12* is not defined for other cases. For example, it is impossible to cut an edge from a solid, because a solid without an edge is not defined.
|
||||
* The result of the operation Cut is defined for arguments *S1* and *S2* that have values of dimensions *Dim(S2)* that should not be less than *Dim(S1)*. The result can contain the shapes of different dimension, but the minimal dimension of the result will be equal to the minimal dimension of the objects *Dim(S1)*. The result of the operation *Cut12* is not defined for other cases. For example, it is impossible to cut an edge from a solid, because a solid without an edge is not defined.
|
||||
* The result of the operation *Cut12* for arguments *S1* and *S2* contains the parts of argument *S1* that have state **OUT** relative to the opposite argument *S2*.
|
||||
* The result of the operation *Cut21* for arguments *S1* and *S2* contains the parts of argument *S2* that have state **OUT** relative to the opposite argument *S1*.
|
||||
* For the arguments of collection type (WIRE, SHELL, COMPSOLID) the type will be passed in the result. For example, the result of Common operation between Shell and Wire will be a compound containing Wire.
|
||||
* For the argumenst of collection type (WIRE, SHELL, COMPSOLID) the type will be passed in the result. For example, the result of Common operation between Shell and Wire will be compound containing Wire.
|
||||
|
||||
@subsection occt_algorithms_9_4 Examples
|
||||
|
||||
@@ -1540,7 +1540,7 @@ Let us consider Shell *Sh* and Wire *W* as the objects and Solid *S* as the tool
|
||||
|
||||
@figure{/user_guides/boolean_operations/images/boolean_image138.png}
|
||||
|
||||
* The result of *Cut21* operation is not defined as the objects have a lower dimension than the tool.
|
||||
* The result of *Cut21* operation is not defined as the objects have lower dimension than the tool.
|
||||
|
||||
|
||||
@subsection occt_algorithms_9_5 Class BOPAlgo_BOP
|
||||
@@ -1845,7 +1845,7 @@ The chapter describes the problems that are considered as Algorithm limitations.
|
||||
|
||||
A lot of failures of GFA algorithm can be caused by bugs in low-level algorithms: Intersection Algorithm, Projection Algorithm, Approximation Algorithm, Classification Algorithm, etc.
|
||||
* The Intersection, Projection and Approximation Algorithms are mostly used at the Intersection step. Their bugs directly cause wrong section results (i.e. incorrect section edges, section points, missing section edges or micro edges). It is not possible to obtain a correct final result of the GFA if a section result is wrong.
|
||||
* The Projection Algorithm is used at the Intersection step. The purpose of Projection Algorithm is to compute 2D curves on surfaces. Wrong results here lead to incorrect or missing faces in the final GFA result.
|
||||
* The Projection Algorithm is used at the Intersection step. The purpose of Projection Algorithm is to compute 2D-curves on surfaces. Wrong results here lead to incorrect or missing faces in the final GFA result.
|
||||
* The Classification Algorithm is used at the Building step. The bugs in the Classification Algorithm lead to errors in selecting shape parts (edges, faces, solids) and ultimately to a wrong final GFA result.
|
||||
|
||||
The description below illustrates some known GFA limitations. It does not enumerate exhaustively all problems that can arise in practice. Please, address cases of Algorithm failure to the OCCT Maintenance Service.
|
||||
@@ -1863,11 +1863,11 @@ However, it is important to note that class *BRepCheck_Analyzer* is just a tool
|
||||
|
||||
Let us consider the following example:
|
||||
|
||||
The Analyzer checks distances between couples of 3D check-points <i>(Pi, PSi)</i> of edge *E* on face *F*. Point *Pi* is obtained from the 3D curve (at the parameter *ti*) of the edge. *PSi* is obtained from 2D curve (at the parameter *ti*) of the edge on surface *S* of face *F*. To be valid the distance should be less than *Tol(E)* for all couples of check-points. The number of these check-points is a predefined value (e.g. 23).
|
||||
The Analyzer checks distances between couples of 3D check-points <i>(Pi, PSi)</i> of edge *E* on face *F*. Point *Pi* is obtained from the 3D-curve (at the parameter *ti*) of the edge. *PSi* is obtained from 2D-curve (at the parameter *ti*) of the edge on surface *S* of face *F*. To be valid the distance should be less than *Tol(E)* for all couples of check-points. The number of these check-points is a pre-defined value (e.g. 23).
|
||||
|
||||
Let us consider the case when edge *E* is recognized valid (in terms of *BRepCheck_Analyzer*).
|
||||
|
||||
Further, after some operation, edge *E* is split into two edges *E1* and *E2*. Each split edge has the same 3D curve and 2D curve as the original edge *E*.
|
||||
Further, after some operation, edge *E* is split into two edges *E1* and *E2*. Each split edge has the same 3D-curve and 2D-curve as the original edge *E*.
|
||||
|
||||
Let us check *E1* (or E2). The Analyzer again checks the distances between the couples of check-points points <i>(Pi, PSi)</i>. The number of these check-points is the same constant value (23), but there is no guarantee that the distances will be less than *Tol(E)*, because the points chosen for *E1* are not the same as for *E*.
|
||||
|
||||
@@ -2071,7 +2071,7 @@ The Fuzzy option is useful on the shapes with gaps or embeddings between the ent
|
||||
|
||||
Most likely, the Basic Operations will give unsatisfactory results on such models. The result may contain unexpected and unwanted small entities, faulty entities (in terms of *BRepCheck_Analyzer*), or there can be no result at all.
|
||||
|
||||
With the Fuzzy option it is possible to get the expected result -- it is just necessary to define the appropriate value of fuzzy tolerance for the operation. To define that value it is necessary to measure the value of the gap (or the value of embedding depth) between the entities of the models, slightly increase it (to make the shifted entities coincident in terms of their tolerance plus the additional one) and pass it to the algorithm.
|
||||
With the Fuzzy option it is possible to get the expected result - it is just necessary to define the appropriate value of fuzzy tolerance for the operation. To define that value it is necessary to measure the value of the gap (or the value of embedding depth) between the entities of the models, slightly increase it (to make the shifted entities coincident in terms of their tolerance plus the additional one) and pass it to the algorithm.
|
||||
|
||||
Fuzzy option is included in interface of Intersection Part (class *BOPAlgo_PaveFiller*) and application programming interface (class *BRepAlgoAPI_BooleanOperation*)
|
||||
|
||||
@@ -2143,13 +2143,13 @@ The chapter contains some examples of the OCCT Boolean Component usage. The usag
|
||||
The package *BRepAlgoAPI* provides the Application Programming Interface of the Boolean Component.
|
||||
|
||||
The package consists of the following classes:
|
||||
* *BRepAlgoAPI_Algo* -- the root class that provides the interface for algorithms.
|
||||
* *BRepAlgoAPI_BuilderAlgo* -- the class API level of General Fuse algorithm.
|
||||
* *BRepAlgoAPI_BooleanOperation* -- the root class for the classes *BRepAlgoAPI_Fuse*. *BRepAlgoAPI_Common*, *BRepAlgoAPI_Cut* and *BRepAlgoAPI_Section*.
|
||||
* *BRepAlgoAPI_Fuse* -- the class provides Boolean fusion operation.
|
||||
* *BRepAlgoAPI_Common* -- the class provides Boolean common operation.
|
||||
* *BRepAlgoAPI_Cut* -- the class provides Boolean cut operation.
|
||||
* *BRepAlgoAPI_Section* -- the class provides Boolean section operation.
|
||||
* *BRepAlgoAPI_Algo* – the root class that provides the interface for algorithms.
|
||||
* *BRepAlgoAPI_BuilderAlgo* - the class API level of General Fuse algorithm.
|
||||
* *BRepAlgoAPI_BooleanOperation* – the root class for the classes *BRepAlgoAPI_Fuse*. *BRepAlgoAPI_Common*, *BRepAlgoAPI_Cut* and *BRepAlgoAPI_Section*.
|
||||
* *BRepAlgoAPI_Fuse* – the class provides Boolean fusion operation.
|
||||
* *BRepAlgoAPI_Common* - the class provides Boolean common operation.
|
||||
* *BRepAlgoAPI_Cut* - the class provides Boolean cut operation.
|
||||
* *BRepAlgoAPI_Section* - the class provides Boolean section operation.
|
||||
|
||||
@figure{/user_guides/boolean_operations/images/operations_image065.svg, "Diagram of BRepAlgoAPI package"}
|
||||
|
||||
@@ -2158,8 +2158,8 @@ The detailed description of the classes can be found in corresponding .cdl files
|
||||
@subsection occt_algorithms_11b_2 Package BOPTest
|
||||
The package *BOPTest* provides the usage of the Boolean Component on Tcl level. The method *BOPTest::APICommands* contains corresponding Tcl commands:
|
||||
|
||||
* *bapibuild* -- for General Fuse Operator;
|
||||
* *bapibop* -- for Boolean Operator and Section Operator.
|
||||
* *bapibuild* – for General Fuse Operator;
|
||||
* *bapibop* – for Boolean Operator and Section Operator.
|
||||
|
||||
The examples of how to use the commands are below in this chapter.
|
||||
|
||||
|
@@ -121,13 +121,13 @@ Q\cdot(x\;y\;z\;1)^{T} =
|
||||
|
||||
*Q* may be a composition of matrices for the following elementary transformations:
|
||||
|
||||
* parallel translation --
|
||||
* parallel translation –
|
||||
@f$ \begin{pmatrix}
|
||||
1 &0 &0 &{q}_{1,4}\\
|
||||
0 &1 &0 &{q}_{2,4}\\
|
||||
0 &0 &1 &{q}_{3,4}
|
||||
\end{pmatrix}; @f$
|
||||
* rotation around an axis with a direction *D(D<sub>x</sub>, D<sub>y</sub>, D<sub>z</sub>)* by an angle @f$ \varphi @f$ --
|
||||
* rotation around an axis with a direction *D(D<sub>x</sub>, D<sub>y</sub>, D<sub>z</sub>)* by an angle @f$ \varphi @f$ –
|
||||
|
||||
@f[ \begin{pmatrix}
|
||||
D_{x}^{2} \cdot (1-cos(\varphi)) + cos(\varphi) &D_{x} \cdot D_{y} \cdot (1-cos(\varphi)) - D_{z} \cdot sin(\varphi) &D_{x} \cdot D_{z} \cdot (1-cos(\varphi)) + D_{y} \cdot sin(\varphi) &0\\
|
||||
@@ -135,10 +135,10 @@ Q\cdot(x\;y\;z\;1)^{T} =
|
||||
D_{x} \cdot D_{z} \cdot (1-cos(\varphi)) - D_{y} \cdot sin(\varphi) &D_{y} \cdot D_{z} \cdot (1-cos(\varphi)) + D_{x} \cdot sin(\varphi) &D_{z}^{2} \cdot (1-cos(\varphi)) + cos(\varphi) &0
|
||||
\end{pmatrix}; @f]
|
||||
|
||||
* scaling -- @f$ \begin{pmatrix} s &0 &0 &0\\ 0 &s &0 &0\\ 0 &0 &s &0 \end{pmatrix} @f$ where @f$ S \in (-\infty,\; \infty)/\left \{ 0 \right \}; @f$
|
||||
* central symmetry -- @f$ \begin{pmatrix} -1 &0 &0 &0\\ 0 &-1 &0 &0\\ 0 &0 &-1 &0 \end{pmatrix}; @f$
|
||||
* axis symmetry -- @f$ \begin{pmatrix} -1 &0 &0 &0\\ 0 &-1 &0 &0\\ 0 &0 &1 &0 \end{pmatrix}; @f$
|
||||
* plane symmetry -- @f$ \begin{pmatrix} 1 &0 &0 &0\\ 0 &1 &0 &0\\ 0 &0 &-1 &0 \end{pmatrix}. @f$
|
||||
* scaling – @f$ \begin{pmatrix} s &0 &0 &0\\ 0 &s &0 &0\\ 0 &0 &s &0 \end{pmatrix} @f$ where @f$ S \in (-\infty,\; \infty)/\left \{ 0 \right \}; @f$
|
||||
* central symmetry – @f$ \begin{pmatrix} -1 &0 &0 &0\\ 0 &-1 &0 &0\\ 0 &0 &-1 &0 \end{pmatrix}; @f$
|
||||
* axis symmetry – @f$ \begin{pmatrix} -1 &0 &0 &0\\ 0 &-1 &0 &0\\ 0 &0 &1 &0 \end{pmatrix}; @f$
|
||||
* plane symmetry – @f$ \begin{pmatrix} 1 &0 &0 &0\\ 0 &1 &0 &0\\ 0 &0 &-1 &0 \end{pmatrix}. @f$
|
||||
|
||||
\<location data 2\> is interpreted as a composition of locations raised to a power and placed above this \<location data 2\> in the section \<locations\>. \<location data 2\> is a sequence @f$l_{1}p_{1} ... l_{n}p_{n}@f$ of @f$ n \geq 0 @f$ integer pairs @f$ l_{i}p_{i} \; (1 \leq i \leq n) @f$. \<flag\> 0 is the indicator of the sequence end. The sequence is interpreted as a composition @f$ L_{l_{1}}^{p_{1}} \cdot ... \cdot L_{l_{n}}^{p_{n}} @f$ where @f$ L_{l_{i}} @f$ is a location from @f$ l_{i} @f$-th \<location record\> in the section locations. \<location record\> numbering starts from 1.
|
||||
|
||||
@@ -232,7 +232,7 @@ The example record is interpreted as a line which passes through a point *P*=(1
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
~~~~
|
||||
@verbatim
|
||||
<3D curve record 2> = "2" <_> <3D circle center> <_> <3D circle N> <_> <3D circle Dx> <_> <3D circle Dy> <_> <3D circle radius> <_\n>;
|
||||
|
||||
<3D circle center> = <3D point>;
|
||||
@@ -244,7 +244,7 @@ The example record is interpreted as a line which passes through a point *P*=(1
|
||||
<3D circle Dy> = <3D direction>;
|
||||
|
||||
<3D circle radius> = <real>;
|
||||
~~~~
|
||||
@endverbatim
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -265,7 +265,7 @@ The example record is interpreted as a circle which has its center *P*=(1, 2, 3
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
~~~~
|
||||
@verbatim
|
||||
<3D curve record 3> = "3" <_> <3D ellipse center> <_> <3D ellipse N> <_> <3D ellipse Dmaj> <_> <3D ellipse Dmin> <_> <3D ellipse Rmaj> <_> <3D ellipse Rmin> <_\n>;
|
||||
|
||||
<3D ellipse center> = <3D point>;
|
||||
@@ -279,7 +279,7 @@ The example record is interpreted as a circle which has its center *P*=(1, 2, 3
|
||||
<3D ellipse Rmaj> = <real>;
|
||||
|
||||
<3D ellipse Rmin> = <real>;
|
||||
~~~~
|
||||
@endverbatim
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -300,7 +300,7 @@ The example record is interpreted as an ellipse which has its center *P*=(1, 2,
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
~~~~
|
||||
@verbatim
|
||||
<3D curve record 4> = "4" <_> <3D parabola origin> <_> <3D parabola N> <_> <3D parabola Dx> <_> <3D parabola Dy> <_> <3D parabola focal length> <_\n>;
|
||||
|
||||
<3D parabola origin> = <3D point>;
|
||||
@@ -312,7 +312,7 @@ The example record is interpreted as an ellipse which has its center *P*=(1, 2,
|
||||
<3D parabola Dy> = <3D direction>;
|
||||
|
||||
<3D parabola focal length> = <real>;
|
||||
~~~~
|
||||
@endverbatim
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -334,7 +334,7 @@ The example record is interpreted as a parabola in plane which passes through a
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
~~~~
|
||||
@verbatim
|
||||
<3D curve record 5> = "5" <_> <3D hyperbola origin> <_> <3D hyperbola N> <_> <3D hyperbola Dx> <_> <3D hyperbola Dy> <_> <3D hyperbola Kx> <_> <3D hyperbola Ky> <_\n>;
|
||||
|
||||
<3D hyperbola origin> = <3D point>;
|
||||
@@ -348,7 +348,7 @@ The example record is interpreted as a parabola in plane which passes through a
|
||||
<3D hyperbola Kx> = <real>;
|
||||
|
||||
<3D hyperbola Ky> = <real>;
|
||||
~~~~
|
||||
@endverbatim
|
||||
|
||||
**Descripton**
|
||||
|
||||
@@ -410,7 +410,7 @@ The example record is interpreted as a Bezier curve with a rational flag *r*=1,
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
~~~~
|
||||
@verbatim
|
||||
<3D curve record 7> = "7" <_> <3D B-spline rational flag> <_> "0" <_> <3D B-spline degree> <_>
|
||||
<3D B-spline pole count> <_> <3D B-spline multiplicity knot count> <3D B-spline weight poles>
|
||||
<_\n> <3D B-spline multiplicity knots> <_\n>;
|
||||
@@ -430,7 +430,7 @@ The example record is interpreted as a Bezier curve with a rational flag *r*=1,
|
||||
<3D B-spline multiplicity knots> = (<_> <3D B-spline multiplicity knot>) ^ <3D B-spline multiplicity knot count>;
|
||||
|
||||
<3D B-spline multiplicity knot> = <real> <_> <int>;
|
||||
~~~~
|
||||
@endverbatim
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -474,13 +474,13 @@ The example record is interpreted as a B-spline curve with a rational flag *r*=
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
~~~~
|
||||
@verbatim
|
||||
<3D curve record 8> = "8" <_> <3D trimmed curve u min> <_> <3D trimmed curve u max> <_\n> <3D curve record>;
|
||||
|
||||
<3D trimmed curve u min> = <real>;
|
||||
|
||||
<3D trimmed curve u max> = <real>;
|
||||
~~~~
|
||||
@endverbatim
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -746,7 +746,7 @@ where @f$ V(v)=(5,2,0)+4 \cdot (cos(v) \cdot (1,0,0)+sin(v) \cdot (0,1,0)), V_{D
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
~~~~
|
||||
@verbatim
|
||||
<surface record 8> = "8" <_> <Bezier surface u rational flag> <_> <Bezier surface v rational flag> <_> <Bezier surface u degree> <_> <Bezier surface v degree> <_>
|
||||
<Bezier surface weight poles>;
|
||||
|
||||
@@ -765,7 +765,7 @@ where @f$ V(v)=(5,2,0)+4 \cdot (cos(v) \cdot (1,0,0)+sin(v) \cdot (0,1,0)), V_{D
|
||||
(<_> <Bezier surface weight pole>) ^ <Bezier surface v degree>;
|
||||
|
||||
<Bezier surface weight pole> = <3D point> [<_> <real>];
|
||||
~~~~
|
||||
@endverbatim
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -781,13 +781,12 @@ where @f$ 0^{0} \equiv 1 @f$.
|
||||
|
||||
The example record is interpreted as a Bezier surface with a u rational flag *r<sub>u</sub>*=1, v rational flag *r<sub>v</sub>*=1, u degree *m<sub>u</sub>*=2, v degree *m<sub>v</sub>*=1, weight poles *B<sub>0,0</sub>*=(0, 0, 1), *h<sub>0,0</sub>*=7, *B<sub>0,1</sub>*=(1, 0, -4), *h<sub>0,1</sub>*=10, *B<sub>1,0</sub>*=(0, 1, -2), *h<sub>1,0</sub>*=8, *B<sub>1,1</sub>*=(1, 1, 5), *h<sub>1,1</sub>*=11, *B<sub>2,0</sub>*=(0, 2, 3), *h<sub>2,0</sub>*=9 and *B<sub>2,1</sub>*=(1, 2, 6), *h<sub>2,1</sub>*=12. The surface is defined by the following parametric equation:
|
||||
|
||||
@f[
|
||||
\begin{align}
|
||||
S(u,v)= [ (0,0,1) \cdot 7 \cdot (1-u)^{2} \cdot (1-v)+(1,0,-4) \cdot 10 \cdot (1-u)^{2} \cdot v+ (0,1,-2) \cdot 8 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v) + \\
|
||||
(1,1,5) \cdot 11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ (0,2,3) \cdot 9 \cdot u^{2} \cdot (1-v)+(1,2,6) \cdot 12 \cdot u^{2} \cdot v] \div [7 \cdot (1-u)^{2} \cdot (1-v)+ \\
|
||||
10 \cdot (1-u)^{2} \cdot v+ 8 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v)+ 11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ 9 \cdot u^{2} \cdot (1-v)+12 \cdot u^{2} \cdot v ]
|
||||
\end{align}
|
||||
@f]
|
||||
@f[ S(u,v)= [ (0,0,1) \cdot 7 \cdot (1-u)^{2} \cdot (1-v)+(1,0,-4) \cdot 10 \cdot (1-u)^{2} \cdot v+ \\
|
||||
(0,1,-2) \cdot 8 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v)+(1,1,5) \cdot 11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ \\
|
||||
(0,2,3) \cdot 9 \cdot u^{2} \cdot (1-v)+(1,2,6) \cdot 12 \cdot u^{2} \cdot v] \div \\
|
||||
[7 \cdot (1-u)^{2} \cdot (1-v)+10 \cdot (1-u)^{2} \cdot v+ \\
|
||||
8 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v)+11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ \\
|
||||
9 \cdot u^{2} \cdot (1-v)+12 \cdot u^{2} \cdot v ] @f]
|
||||
|
||||
|
||||
@subsubsection occt_brep_format_4_2_9 B-spline Surface - \< surface record 9 \>
|
||||
@@ -878,19 +877,14 @@ The B-spline surface is defined by the following parametric equation:
|
||||
|
||||
where functions *N<sub>i,j</sub>* and *M<sub>i,j</sub>* have the following recursion definition by *j*:
|
||||
|
||||
@f[
|
||||
\begin{align}
|
||||
N_{i,1}(u)= \left\{\begin{matrix}
|
||||
1\Leftarrow \bar{u}_{i} \leq u \leq \bar{u}_{i+1}
|
||||
0\Leftarrow u < \bar{u}_{i} \vee \bar{u}_{i+1} \leq u \end{matrix} \right.,\; \\
|
||||
N_{i,j}(u)=\frac{(u-\bar{u}_{i}) \cdot N_{i,j-1}(u) }{\bar{u}_{i+j-1}-\bar{u}_{i}}+
|
||||
\frac{(\bar{u}_{i+j}-u) \cdot N_{i+1,j-1}(u)}{\bar{u}_{i+j}-\bar{u}_{i+1}},\;(2 \leq j \leq m_{u}+1), \; \\
|
||||
@f[ N_{i,1}(u)=\left\{\begin{matrix}
|
||||
1\Leftarrow \bar{u}_{i} \leq u \leq \bar{u}_{i+1}\\
|
||||
0\Leftarrow u < \bar{u}_{i} \vee \bar{u}_{i+1} \leq u \end{matrix} \right.,\;
|
||||
N_{i,j}(u)=\frac{(u-\bar{u}_{i}) \cdot N_{i,j-1}(u) }{\bar{u}_{i+j-1}-\bar{u}_{i}}+ \frac{(\bar{u}_{i+j}-u) \cdot N_{i+1,j-1}(u)}{\bar{u}_{i+j}-\bar{u}_{i+1}},\;(2 \leq j \leq m_{u}+1); \\
|
||||
M_{i,1}(v)=\left\{\begin{matrix}
|
||||
1\Leftarrow \bar{v}_{i} \leq v \leq \bar{v}_{i+1}\\
|
||||
0\Leftarrow v < \bar{v}_{i} \vee \bar{v}_{i+1} \leq v \end{matrix} \right.,\; \\
|
||||
M_{i,j}(v)=\frac{(v-\bar{v}_{i}) \cdot M_{i,j-1}(v) }{\bar{v}_{i+j-1}-\bar{v}_{i}}+ \frac{(\bar{v}_{i+j}-v) \cdot M_{i+1,j-1}(v)}{\bar{v}_{i+j}-\bar{v}_{i+1}},\;(2 \leq j \leq m_{v}+1);
|
||||
\end{align}
|
||||
@f]
|
||||
0\Leftarrow v < \bar{v}_{i} \vee \bar{v}_{i+1} \leq v \end{matrix} \right.,\;
|
||||
M_{i,j}(v)=\frac{(v-\bar{v}_{i}) \cdot M_{i,j-1}(v) }{\bar{v}_{i+j-1}-\bar{v}_{i}}+ \frac{(\bar{v}_{i+j}-v) \cdot M_{i+1,j-1}(v)}{\bar{v}_{i+j}-\bar{v}_{i+1}},\;(2 \leq j \leq m_{v}+1); @f]
|
||||
|
||||
where
|
||||
@f[ \bar{u}_{i}=u_{j}\; (1 \leq j \leq k_{u},\; \sum_{l=1}^{j-1}q_{l} \leq i \leq \sum_{l=1}^{j}q_{l}), \\
|
||||
@@ -898,15 +892,13 @@ where
|
||||
|
||||
The example record is interpreted as a B-spline surface with a u rational flag *r<sub>u</sub>*=1, v rational flag *r<sub>v</sub>*=1, u degree *m<sub>u</sub>*=1, v degree *m<sub>v</sub>*=1, u pole count *n<sub>u</sub>*=3, v pole count *n<sub>v</sub>*=2, u multiplicity knot count *k<sub>u</sub>*=5, v multiplicity knot count *k<sub>v</sub>*=4, weight poles *B<sub>1,1</sub>*=(0, 0, 1), *h<sub>1,1</sub>*=7, *B<sub>1,2</sub>*=(1, 0, -4), *h<sub>1,2</sub>*=10, *B<sub>2,1</sub>*=(0, 1, -2), *h<sub>2,1</sub>*=8, *B<sub>2,2</sub>*=(1, 1, 5), *h<sub>2,2</sub>*=11, *B<sub>3,1</sub>*=(0, 2, 3), *h<sub>3,1</sub>*=9 and *B<sub>3,2</sub>*=(1, 2, 6), *h<sub>3,2</sub>*=12, u multiplicity knots *u<sub>1</sub>*=0, *q<sub>1</sub>*=1, *u<sub>2</sub>*=0.25, *q<sub>2</sub>*=1, *u<sub>3</sub>*=0.5, *q<sub>3</sub>*=1, *u<sub>4</sub>*=0.75, *q<sub>4</sub>*=1 and *u<sub>5</sub>*=1, *q<sub>5</sub>*=1, v multiplicity knots *v<sub>1</sub>*=0, *r<sub>1</sub>*=1, *v<sub>2</sub>*=0.3, *r<sub>2</sub>*=1, *v<sub>3</sub>*=0.7, *r<sub>3</sub>*=1 and *v<sub>4</sub>*=1, *r<sub>4</sub>*=1. The B-spline surface is defined by the following parametric equation:
|
||||
|
||||
@f[
|
||||
\begin{align}
|
||||
S(u,v)= [ (0,0,1) \cdot 7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+(1,0,-4) \cdot 10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ \\
|
||||
@f[ S(u,v)= [ (0,0,1) \cdot 7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+(1,0,-4) \cdot 10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ \\
|
||||
(0,1,-2) \cdot 8 \cdot N_{2,2}(u) \cdot M_{1,2}(v)+(1,1,5) \cdot 11 \cdot N_{2,2}(u) \cdot M_{2,2}(v)+ \\
|
||||
(0,2,3) \cdot 9 \cdot N_{3,2}(u) \cdot M_{1,2}(v)+(1,2,6) \cdot 12 \cdot N_{3,2}(u) \cdot M_{2,2}(v)] \div \\
|
||||
[7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ 8 \cdot N_{2,2}(u) \cdot M_{1,2}(v)+ \\
|
||||
11 \cdot N_{2,2}(u) \cdot M_{2,2}(v)+ 9 \cdot N_{3,2}(u) \cdot M_{1,2}(v)+12 \cdot N_{3,2}(u) \cdot M_{2,2}(v) ]
|
||||
\end{align}
|
||||
@f]
|
||||
[7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ \\
|
||||
8 \cdot N_{2,2}(u) \cdot M_{1,2}(v)+11 \cdot N_{2,2}(u) \cdot M_{2,2}(v)+ \\
|
||||
9 \cdot N_{3,2}(u) \cdot M_{1,2}(v)+12 \cdot N_{3,2}(u) \cdot M_{2,2}(v) ] @f]
|
||||
|
||||
|
||||
@subsubsection occt_brep_format_4_2_10 Rectangular Trim Surface - \< surface record 10 \>
|
||||
|
||||
@@ -1058,7 +1050,7 @@ The example record is interpreted as a line which passes through a point *P*=(3
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
~~~~
|
||||
@verbatim
|
||||
<2D curve record 2> = "2" <_> <2D circle center> <_> <2D circle Dx> <_> <2D circle Dy> <_> <2D circle radius> <_\n>;
|
||||
|
||||
<2D circle center> = <2D point>;
|
||||
@@ -1068,7 +1060,7 @@ The example record is interpreted as a line which passes through a point *P*=(3
|
||||
<2D circle Dy> = <2D direction>;
|
||||
|
||||
<2D circle radius> = <real>;
|
||||
~~~~
|
||||
@endverbatim
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -1229,7 +1221,7 @@ The example record is interpreted as a Bezier curve with a rational flag *r*=1,
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
~~~~
|
||||
@verbatim
|
||||
<2D curve record 7> = "7" <_> <2D B-spline rational flag> <_> "0" <_> <2D B-spline degree> <_> <2D B-spline pole count> <_> <2D B-spline multiplicity knot count> <2D B-spline weight poles> <_\n> <2D B-spline multiplicity knots> <_\n>;
|
||||
|
||||
<2D B-spline rational flag> = <flag>;
|
||||
@@ -1248,7 +1240,7 @@ The example record is interpreted as a Bezier curve with a rational flag *r*=1,
|
||||
<2D B-spline multiplicity knot> ^ <2D B-spline multiplicity knot count>;
|
||||
|
||||
<2D B-spline multiplicity knot> = <_> <real> <_> <int>;
|
||||
~~~~
|
||||
@endverbatim
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -1412,7 +1404,7 @@ The example record describes a polyline from *m*=2 nodes with a parameter prese
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
~~~~
|
||||
@verbatim
|
||||
<triangulations> = <triangulation header> <_\n> <triangulation records>;
|
||||
|
||||
<triangulation header> = "Triangulations" <_> <triangulation count>;
|
||||
@@ -1442,7 +1434,7 @@ The example record describes a polyline from *m*=2 nodes with a parameter prese
|
||||
<triangulation triangles> = (<triangulation triangle> <_>) ^ <triangulation triangle count>;
|
||||
|
||||
<triangulation triangle> = <int> <_> <int> <_> <int>.
|
||||
~~~~
|
||||
@endverbatim
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -1621,22 +1613,22 @@ An example of section shapes and a whole *.brep file are given in chapter 7 @re
|
||||
|
||||
\<shape flag word\> @f$ f_{1}\; f_{2}\; f_{3}\; f_{4}\; f_{5}\; f_{6}\; f_{7} @f$ \<flag\>s @f$ f_{i}\;(1\leq i \leq 7) @f$ are interpreted as shape flags in the following way:
|
||||
|
||||
* @f$ f_{1} @f$ -- free;
|
||||
* @f$ f_{2} @f$ -- modified;
|
||||
* @f$ f_{3} @f$ -- IGNORED(version 1) \\ checked (version 2);
|
||||
* @f$ f_{4} @f$ -- orientable;
|
||||
* @f$ f_{5} @f$ -- closed;
|
||||
* @f$ f_{6} @f$ -- infinite;
|
||||
* @f$ f_{7} @f$ -- convex.
|
||||
* @f$ f_{1} @f$ – free;
|
||||
* @f$ f_{2} @f$ – modified;
|
||||
* @f$ f_{3} @f$ – IGNORED(version 1) \\ checked (version 2);
|
||||
* @f$ f_{4} @f$ – orientable;
|
||||
* @f$ f_{5} @f$ – closed;
|
||||
* @f$ f_{6} @f$ – infinite;
|
||||
* @f$ f_{7} @f$ – convex.
|
||||
|
||||
The flags are used in a special way [1].
|
||||
|
||||
\<shape subshape orientation\> is interpreted in the following way:
|
||||
|
||||
* + -- forward;
|
||||
* - -- reversed;
|
||||
* i -- internal;
|
||||
* e -- external.
|
||||
* + – forward;
|
||||
* - – reversed;
|
||||
* i – internal;
|
||||
* e – external.
|
||||
|
||||
\<shape subshape orientation\> is used in a special way [1].
|
||||
|
||||
@@ -1644,14 +1636,14 @@ The flags are used in a special way [1].
|
||||
|
||||
\<shape subrecord\> types are interpreted in the following way:
|
||||
|
||||
* "Ve" -- vertex;
|
||||
* "Ed" -- edge;
|
||||
* "Wi" -- wire;
|
||||
* "Fa" -- face;
|
||||
* "Sh" -- shell;
|
||||
* "So" -- solid;
|
||||
* "CS" -- compsolid;
|
||||
* "Co" -- compound.
|
||||
* "Ve" – vertex;
|
||||
* "Ed" – edge;
|
||||
* "Wi" – wire;
|
||||
* "Fa" – face;
|
||||
* "Sh" – shell;
|
||||
* "So" – solid;
|
||||
* "CS" – compsolid;
|
||||
* "Co" – compound.
|
||||
|
||||
\<shape final record\> determines the orientation and location for the whole model.
|
||||
|
||||
@@ -1758,7 +1750,7 @@ The usage of \<vertex data representation u parameter\> *U* is described belo
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
~~~~
|
||||
@verbatim
|
||||
<edge data> = <_> <edge data tolerance> <_> <edge data same parameter flag> <_> edge data same range flag> <_> <edge data degenerated flag> <_\n> <edge data representations>;
|
||||
|
||||
<edge data tolerance> = <real>;
|
||||
@@ -1801,7 +1793,7 @@ The usage of \<vertex data representation u parameter\> *U* is described belo
|
||||
|
||||
<edge data representation data 7> = (<polygon on triangulation number> <_>) ^ 2
|
||||
<triangulation number> <_> <location number>;
|
||||
~~~~
|
||||
@endverbatim
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -1828,13 +1820,13 @@ Flags \<edge data same parameter flag\>, \<edge data same range flag\> and \<edg
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
~~~~
|
||||
@verbatim
|
||||
<face data> = <face data natural restriction flag> <_> <face data tolerance> <_> <surface number> <_> <location number> <\n> ["2" <_> <triangulation number>];
|
||||
|
||||
<face data natural restriction flag> = <flag>;
|
||||
|
||||
<face data tolerance> = <real>;
|
||||
~~~~
|
||||
@endverbatim
|
||||
|
||||
**Description**
|
||||
|
||||
|
@@ -120,12 +120,42 @@ Inside a package, two data types cannot bear the same name.
|
||||
* **Class method** Does not work on individual instances, only on the class itself.
|
||||
|
||||
@subsubsection occt_fcug_2_a_3 Classes
|
||||
The fundamental software component in object-oriented software development is the class. A class is the implementation of a **data type**. It defines its **behavior** (the services offered by its functions) and its **representation** (the data structure of the class -- the fields, which store its data).
|
||||
The fundamental software component in object-oriented software development is the class. A class is the implementation of a **data type**. It defines its **behavior** (the services offered by its functions) and its **representation** (the data structure of the class – the fields, which store its data).
|
||||
|
||||
Classes fall into three categories:
|
||||
* Ordinary classes.
|
||||
* Abstract classes. An **abstract class** cannot be instantiated. The purpose of having such classes is to have a given behavior shared by a hierarchy of classes and dependent on the implementation of the descendants. This is a way of guaranteeing a certain base of inherited behavior common to all the classes based on a particular deferred class.
|
||||
* Template classes. A **template class** offers a set of functional behaviors to manipulate other data types. Instantiation of a template class requires that a data type is given for its argument(s).
|
||||
* Deferred classes. A **deferred class** cannot be instantiated. The purpose of having such classes is to have a given behavior shared by a hierarchy of classes and dependent on the implementation of the descendants. This is a way of guaranteeing a certain base of inherited behavior common to all the classes based on a particular deferred class. The C++ equivalent of a deferred CDL class is an abstract class.
|
||||
* Generic classes. A **generic class** offers a set of functional behaviors to manipulate other data types. Instantiation of a generic class requires that a data type is given for its argument(s). The generic classes in CDL perform the same mission as template classes in C++.
|
||||
|
||||
@subsubsection occt_fcug_2_a_4 Generic Classes
|
||||
Generic classes are implemented in two steps. First you declare the generic class to establish the model, then you instantiate this class by giving information about the generic types.
|
||||
|
||||
#### Declaring a Generic Class
|
||||
|
||||
The generic classes in Open CASCADE Technology are similar by their intent to C++ templates with explicit instantiation.
|
||||
A generic class is declared in CDL as operating on data items of non-fixed types which are declared as arguments of the generic class. It is possible to put a restriction on these data types to be of subtype of some definite class. Definition of the generic class does not create new class type in C++ terms; it only defines a pattern for generation (instantiation) of the real classes.
|
||||
|
||||
#### Instantiation of a Generic Class
|
||||
|
||||
When a generic class is instantiated, its argument types are substituted by actually existing data types (elementary types or classes). The result of instantiation is a new C++ class with an arbitrary name (specified in the instantiating declaration). By convention, the name of the instantiated class is usually constructed from the name of the generic class and names of actual argument types. As for any other class, the name of the class instantiating a generic type is prefixed by the name of the package in which instantiation is declared.
|
||||
@code
|
||||
class Array1OfReal instantiates Array1 from TCollection (Real);
|
||||
@endcode
|
||||
|
||||
This declaration located in a CDL file of the *TColStd* package defines a new C++ class *TColStd_Array1OfReal* as the instantiation of generic class *TCollection_Array1* for *Real* values.
|
||||
More than one class can be instantiated from the same generic class with the same argument types. Such classes will be identical by implementation, but considered as two different classes by C++.
|
||||
No class can inherit from a generic class.
|
||||
A generic class can be a deferred class. A generic class can also accept a deferred class as its argument. In both these cases, any class instantiated from it will also be deferred. The resulting class can then be inherited by another class.
|
||||
|
||||
#### Nested Generic Classes
|
||||
|
||||
It often happens that many classes are linked by a common generic type. This is the case when a base structure furnishes an iterator. In this context, it is necessary to make sure that the group of linked generic classes is indeed instantiated for the same type of object. In order to group the instantiation, you may declare certain classes as being nested.
|
||||
When generic class is instantiated, its nested classes are instantiated as well. The name of the instantiation of the nested class is constructed from the name of that nested class and name of the main generic class, connected by ‘Of’.
|
||||
@code
|
||||
class MapOfReal instantiates Map from TCollection (Real,MapRealHasher);
|
||||
@endcode
|
||||
This declaration in *TColStd* defines not only class *TColStd_MapOfReal*, but also class *TColStd_MapIteratorOfMapOfReal*, which is instantiated from nested class *MapIterator* of the generic class *TCollection_Map*. Note that instantiation of the nested class is separate class, it is not nested class to the instantiation of the main class.
|
||||
**Nested classes**, even though they are described as non-generic classes, are generic by construction being inside the class they are a member of.
|
||||
|
||||
@subsubsection occt_fcug_2_a_5 Inheritance
|
||||
The purpose of inheritance is to reduce the development workload. The inheritance mechanism allows a new class to be declared already containing the characteristics of an existing class. This new class can then be rapidly specialized for the task in hand. This avoids the necessity of developing each component “from scratch”.
|
||||
@@ -133,7 +163,16 @@ For example, having already developed a class *BankAccount* you could quickly s
|
||||
|
||||
The corollary of this is that when two or more classes inherit from a parent (or ancestor) class, all these classes guarantee as a minimum the behavior of their parent (or ancestor). For example, if the parent class BankAccount contains the method Print which tells it to print itself out, then all its descendant classes guarantee to offer the same service.
|
||||
|
||||
One way of ensuring the use of inheritance is to declare classes at the top of a hierarchy as being **abstract**. In such classes, the methods are not implemented. This forces the user to create a new class which redefines the methods. This is a way of guaranteeing a certain minimum of behavior among descendant classes.
|
||||
One way of ensuring the use of inheritance is to declare classes at the top of a hierarchy as being **deferred**. In such classes, the methods are not implemented. This forces the user to create a new class which redefines the methods. This is a way of guaranteeing a certain minimum of behavior among descendant classes.
|
||||
|
||||
@subsection occt_fcug_2_b Persistence and Data Schema
|
||||
The data schema is the structure used by an application to store its data. Data schemas consist of persistent classes.
|
||||
|
||||
An object is called **persistent** if it can be permanently stored. Thus, the object can be reused at a later date by the application, which created it, or by another application.
|
||||
|
||||
In order for an object to be persistent for CDL, its type must be declared as inheriting from the class *Standard_Persistent* or have a parent class inheriting from the *Standard_Persistent* class. Note that classes inheriting from *Standard_Persistent* are handled by a reference.
|
||||
|
||||
Objects instantiated from classes which inherit from the Standard_Storable class cannot themselves be stored individually, but they can be stored as fields of an object which inherits from *Standard_Persistent*. Note that objects inheriting from *Standard_Storable* are handled by a value.
|
||||
|
||||
@subsection occt_fcug_2_1 Data Types
|
||||
|
||||
@@ -164,17 +203,19 @@ In Open CASCADE Technology, the Handles are specific classes that are used to s
|
||||
@subsubsection occt_fcug_2_1_1 Primitive Types
|
||||
|
||||
The primitive types are predefined in the language and they are **manipulated by value**.
|
||||
Some of these primitives inherit from the **Storable** class. This means they can be used in the implementation of persistent objects, either contained in entities declared within the methods of the object, or they form part of the internal representation of the object.
|
||||
|
||||
The primitives inheriting from *Standard_Storable* are the following:
|
||||
* **Boolean** is used to represent logical data. It may have only two values: *Standard_True* and *Standard_False*.
|
||||
* **Character** designates any ASCII character.
|
||||
* **ExtCharacter** is an extended character.
|
||||
* **Integer** is a whole number.
|
||||
* **Real** denotes a real number (i.e. one with whole and a fractional part, either of which may be null).
|
||||
* **ShortReal** is a real with a smaller choice of values and memory size.
|
||||
There are also non-Storable primitives. They are:
|
||||
* **CString** is used for literal constants.
|
||||
* **ExtString** is an extended string.
|
||||
* **Address** represents a byte address of undetermined size.
|
||||
|
||||
The services offered by each of these types are described in the **Standard** Package.
|
||||
The table below presents the equivalence existing between C++ fundamental types and OCCT primitive types.
|
||||
|
||||
@@ -210,21 +251,31 @@ The table below presents the equivalence existing between C++ fundamental types
|
||||
There are three categories of types which are manipulated by value:
|
||||
* Primitive types
|
||||
* Enumerated types
|
||||
* Types defined by classes not inheriting from *Standard_Transient*, whether directly or not.
|
||||
* Types defined by classes not inheriting from *Standard_Persistent* or *Standard_Transient*, whether directly or not.
|
||||
Types which are manipulated by value behave in a more direct fashion than those manipulated by handle and thus can be expected to perform operations faster, but they cannot be stored independently in a file.
|
||||
|
||||
@image html /user_guides/foundation_classes/images/foundation_classes_image005.png "Manipulation of a data type by value"
|
||||
@image latex /user_guides/foundation_classes/images/foundation_classes_image005.png "Manipulation of a data type by value"
|
||||
|
||||
@subsubsection occt_fcug_2_1_3 Types manipulated by reference (handle)
|
||||
Types that are known to the schema (i.e. they are either **primitives** or they inherit from *Storable*) and are manipulated by value, can be stored inside a persistent object as part of the representation. Only in this way can a “manipulated by value” object be stored in a file.
|
||||
|
||||
These are types defined by classes inheriting from the *Transient* class.
|
||||
@subsubsection occt_fcug_2_1_3 Types manipulated by reference (handle)
|
||||
There are two categories of types which are manipulated by handle:
|
||||
* Types defined by classes inheriting from the *Persistent* class, which are therefore storable in a file.
|
||||
* Types defined by classes inheriting from the *Transient* class.
|
||||
|
||||
@image html /user_guides/foundation_classes/images/foundation_classes_image006.png "Manipulation of a data type by reference"
|
||||
@image latex /user_guides/foundation_classes/images/foundation_classes_image006.png "Manipulation of a data type by reference"
|
||||
|
||||
@subsubsection occt_fcug_2_1_4 When is it necessary to use a handle?
|
||||
|
||||
The following table summarizes how various data types are handled and stored.
|
||||
|
||||
| Type | Manipulated by handle | Manipulated by value |
|
||||
| :------- | :-------------------- | :-------------------- |
|
||||
| storable | Persistent | Primitive, Storable (if nested in a persistent class)|
|
||||
|temporary | Transient | Other |
|
||||
|
||||
When you design an object, it can be difficult to choose how to manipulate that
|
||||
object: by value or by handle. The following ideas can help you to make up your mind:
|
||||
|
||||
@@ -245,27 +296,21 @@ global variable.
|
||||
|
||||
@subsubsection occt_fcug_2_2_1 Handle Definition
|
||||
|
||||
A handle is OCCT implementation of a smart pointer.
|
||||
Several handles can reference the same object.
|
||||
Also, a single handle may reference several objects, but only one at a time.
|
||||
To have access to the object it refers to, the handle must be de-referenced just as with a C++ pointer.
|
||||
A handle may be compared with a C++ pointer. Several handles can reference the same object. Also, a single handle may reference several objects, but only one at a time. To have access to the object it refers to, the handle must be de-referenced just as with a C++ pointer.
|
||||
|
||||
Transient and Persistent classes may be manipulated either with handles or with values. Handles which reference non-persistent objects are called non-storable handles; therefore, a persistent object cannot contain a non-storable handle.
|
||||
|
||||
#### Organization of Classes
|
||||
|
||||
Classes used with handles are persistent or transient.
|
||||
|
||||
Classes that inherit from *Standard_Transient* are transient while classes that inherit from *Standard_Persistent* are persistent.
|
||||
|
||||
In this chapter we will discuss only transient classes and relevant handles. Persistent classes and their handles are organized in a similar manner.
|
||||
|
||||
Class *Standard_Transient* is a root of a big hierarchy of OCCT classes that are said to be operable by handles. It provides a reference counter field, inherited by all its descendant classes, that is used by associated *Handle()* classes to track a number of handles pointing to this instance of the object.
|
||||
|
||||
Objects of classes derived (directly or indirectly) from *Transient*, are normally allocated in dynamic memory using operator **new**, and manipulated by handle.
|
||||
Handle is defined as template class *opencascade::handle<>*.
|
||||
Open CASCADE Technology provides preprocessor macro *Handle()* that is historically used throughout OCCT code to name a handle:
|
||||
~~~~~{.cpp}
|
||||
Handle(Geom_Line) aLine; // "Handle(Geom_Line)" is expanded to "opencascade::handleL<Geom_Line>"
|
||||
~~~~~
|
||||
|
||||
In addition, for standard OCCT classes additional typedef is defined for a handle, as name of a class prefixed by *Handle_*.
|
||||
For instance, above example can be also coded as:
|
||||
~~~~~{.cpp}
|
||||
Handle_Geom_Line aLine; // "Handle_Geom_Line" is typedef to "opencascade::handleL<Geom_Line>"
|
||||
~~~~~
|
||||
For every class derived (directly or indirectly) from *Transient*, CDL extractor creates associated class *Handle()* whose name is the same as the name of that class prefixed by *Handle_*. Open CASCADE Technology provides preprocessor macro *Handle()* that produces a name of a *Handle()* class for a given transient class name.
|
||||
|
||||
#### Using a Handle
|
||||
|
||||
@@ -284,61 +329,17 @@ To initialize a handle, either a new object should be created or the value of a
|
||||
|
||||
@subsubsection occt_fcug_2_2_2 Type Management
|
||||
|
||||
Open CASCADE Technology provides a means to describe the hierarchy of data types in a generic way, with a possibility to check the exact type of the given object at run-time (similarly to C++ RTTI).
|
||||
Open CASCADE Technology provides a means to describe the hierarchy of data types in a generic way, with a possibility to check the exact type of the given object at run-time (similarly to C++ RTTI). For every class type derived from *Standard_Transient*, CDL extractor creates a code instantiating single instance of the class *Standard_Type* (type descriptor) that holds information on that type: its name and list of ancestor types.
|
||||
|
||||
To enable this feature, a class declaration should include declaration of OCCT RTTI.
|
||||
Header *Standard_Type.hxx* provides two variants of preprocessor macros facilitating this:
|
||||
That instance (actually, a handle on it) is returned by the virtual method *DynamicType()* of the class derived from *Standard_Transient*. The other virtual method *IsKind()* provides a means to check whether a given object has specified type or inherits it.
|
||||
|
||||
* Inline variant, declares and defines RTTI methods by single line of code:
|
||||
~~~~~{.cpp}
|
||||
#include <Geom_Surface.hxx>
|
||||
class Appli_ExtSurface : public Geom_Surface
|
||||
{
|
||||
. . .
|
||||
public:
|
||||
DEFINE_STANDARD_RTTIEXT(Appli_ExtSurface,Geom_Surface)
|
||||
};
|
||||
~~~~~
|
||||
|
||||
* Out-of line variant, using one macros in declaration (normally put in header file), and another for implementation (to be put in C++ source):
|
||||
|
||||
In *Appli_ExtSurface.hxx* file:
|
||||
~~~~~{.cpp}
|
||||
#include <Geom_Surface.hxx>
|
||||
class Appli_ExtSurface : public Geom_Surface
|
||||
{
|
||||
. . .
|
||||
public:
|
||||
DEFINE_STANDARD_RTTIEXT(Appli_ExtSurface,Geom_Surface)
|
||||
};
|
||||
~~~~~
|
||||
|
||||
In *Appli_ExtSurface.cxx* file:
|
||||
~~~~~{.cpp}
|
||||
#include <Appli_ExtSurface.hxx>
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Appli_ExtSurface,Geom_Surface)
|
||||
~~~~~
|
||||
|
||||
These macros define method *DynamicType()* that returns a type descriptor - handle to singleton instance of the class *Standard_Type* describing the class.
|
||||
Type descriptor stores name of the class and descriptor of its parent class.
|
||||
|
||||
Note that while inline version is easier to use, for widely used classes this method may lead to bloating of binary code of dependent libraries, due to multiple instantiations of inline method.
|
||||
|
||||
To get the type descriptor for a given class type, use macros *STANDARD_TYPE()* with name of the class as argument.
|
||||
|
||||
Example of usage:
|
||||
~~~~~{.cpp}
|
||||
if (aCurve->IsKind(STANDARD_TYPE(Geom_Line))) // equivalent to "if (dynamic_cast<Geom_Line>(aCurve.get()) != 0)"
|
||||
{
|
||||
...
|
||||
}
|
||||
~~~~~
|
||||
In order to refer to the type descriptor object for a given class type, use macros *STANDARD_TYPE()* with argument being a name of the class.
|
||||
|
||||
#### Type Conformity
|
||||
|
||||
The type used in the declaration of a handle is the static type of the object, the type seen by the compiler. A handle can reference an object instantiated from a subclass of its static type. Thus, the dynamic type of an object (also called the actual type of an object) can be a descendant of the type which appears in the handle declaration through which it is manipulated.
|
||||
|
||||
Consider the class *CartesianPoint*, a sub-class of *Point*; the rule of type conformity can be illustrated as follows:
|
||||
Consider the persistent class *CartesianPoint*, a sub-class of *Point*; the rule of type conformity can be illustrated as follows:
|
||||
|
||||
~~~~~
|
||||
Handle (Geom_Point) p1;
|
||||
@@ -417,7 +418,7 @@ p = new Geom_CartesianPoint (0, 0, 0);
|
||||
Unlike for a pointer, the **delete** operator does not work on a handle; the referenced object is automatically destroyed when no longer in use.
|
||||
|
||||
@subsubsection occt_fcug_2_2_4 Invoking Methods
|
||||
Once you have a handle to an object, you can use it like a pointer in C++. To invoke a method which acts on the referenced object, you translate this method by the standard *arrow* operator, or alternatively, by function call syntax when this is available.
|
||||
Once you have a handle on a persistent or transient object, you can use it like a pointer in C++. To invoke a method which acts on the referenced object, you translate this method by the standard *arrow* operator, or alternatively, by function call syntax when this is available.
|
||||
|
||||
To test or to modify the state of the handle, the method is translated by the *dot* operator.
|
||||
The example below illustrates how to access the coordinates of an (optionally initialized) point object:
|
||||
@@ -507,6 +508,123 @@ There are two approaches how to avoid such situation:
|
||||
* Use C++ pointer for one kind of references, e.g. from a primitive to the graph
|
||||
* Nullify one set of handles (e.g. handles to a graph in primitives) when a graph object needs to be destroyed
|
||||
|
||||
@subsubsection occt_fcug_2_2_7 Creating Transient Classes without CDL
|
||||
|
||||
Though generation of Handle class and related C++ code is normally performed by CDL extractor, it is also possible to define a class managed by handle without CDL. To facilitate that, several macros are provided in the file Standard_DefineHandle.hxx:
|
||||
|
||||
* **DEFINE_STANDARD_HANDLE(class_name,ancestor_name)** - declares Handle class for a class *class_name* that inherits class *ancestor_name* (for instance, *Standard_Transient*). This macro should be put in a header file; the declaration of the handle to a base class must be available (usually put before or after the declaration of the class *class_name*, or into a separate header file).
|
||||
* **IMPLEMENT_STANDARD_HANDLE(class_name,ancestor_name)** - implements method *DownCast()* of the *Handle* class. Should be located in a C++ file (normally the file where methods of the class *class_name* are implemented).
|
||||
* **DEFINE_STANDARD_RTTI(class_name)** - declares methods required for RTTI in the class *class_name* declaration; should be in public: section.
|
||||
* **IMPLEMENT_STANDARD_RTTIEXT(class_name,ancestor_name)** - implements above methods. Usually put into the C++ file implementing class *class_name*.
|
||||
Note that it is important to ensure correctness of macro arguments, especially the ancestor name, otherwise the definition may be inconsistent (no compiler warnings will be issued in case of mistake).
|
||||
|
||||
In *Appli_ExtSurface.hxx* file:
|
||||
~~~~~
|
||||
#include <Geom_Surface.hxx>
|
||||
class Appli_ExtSurface : public Geom_Surface
|
||||
{
|
||||
. . .
|
||||
public:
|
||||
DEFINE_STANDARD_RTTI(Appli_ExtSurface)
|
||||
}
|
||||
DEFINE_STANDARD_HANDLE(Appli_ExtSurface,Geom_Surface)
|
||||
~~~~~
|
||||
|
||||
In *Appli_ExtSurface.cxx* file:
|
||||
~~~~~
|
||||
#include <Appli_ExtSurface.hxx>
|
||||
IMPLEMENT_STANDARD_HANDLE(Appli_ExtSurface,Geom_Surface)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Appli_ExtSurface,Geom_Surface)
|
||||
~~~~~
|
||||
|
||||
#### Example
|
||||
|
||||
The following example shows how to define a class <i> SamplePoint </i> manipulated by handle.
|
||||
|
||||
First you need to define *Sample_Point.hxx* :
|
||||
|
||||
~~~~
|
||||
|
||||
#ifndef _Sample_Point_HeaderFile
|
||||
#define _Sample_Point_HeaderFile
|
||||
#ifndef _Standard_Macro_HeaderFile
|
||||
#include <Standard_Macro.hxx>
|
||||
#endif
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
// Handle definition
|
||||
//
|
||||
|
||||
DEFINE_STANDARD_HANDLE(Sample_Point,MMgt_TShared)
|
||||
class Sample_Point: public MMgt_TShared {
|
||||
public:
|
||||
Sample_Point();
|
||||
Sample_Point(const Standard_Real, const
|
||||
Standard_Real);
|
||||
void SetX(const Standard_Real x) {
|
||||
myX = x;
|
||||
}
|
||||
void SetY(const Standard_Real y) {
|
||||
myY = y;
|
||||
}
|
||||
Standard_Real X() const {
|
||||
return myX;
|
||||
}
|
||||
Standard_Real Y() const {
|
||||
return myY;
|
||||
}
|
||||
// some methods like DynamicType() or
|
||||
IsKind()
|
||||
//
|
||||
DEFINE_STANDARD_RTTI(Sample_Point)
|
||||
private:
|
||||
Standard_Real myX;
|
||||
Standard_Real myY;
|
||||
};
|
||||
#endif
|
||||
|
||||
~~~~
|
||||
|
||||
Then you need to define *Sample_Point.cxx* :
|
||||
|
||||
~~~~
|
||||
|
||||
#include <Sample_Point.hxx>
|
||||
|
||||
// Implementation of Handle and type mgt
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE(Sample_Point,MMgt_TShared)
|
||||
IMPLEMENT_STANDARD_RTTI(Sample_Point,MMgt_TShared)
|
||||
|
||||
// For ancestors, we add a IMPLEMENT_STANDARD_SUPERTYPE and
|
||||
// a IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY macro.
|
||||
// We must respect the order: from the direct ancestor class to the base class.
|
||||
|
||||
IMPLEMENT_STANDARD_TYPE(Sample_Point)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE(MMgt_TShared)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE(Standard_Transient)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
|
||||
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(MMgt_TShared)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(Standard_Transient)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
|
||||
IMPLEMENT_STANDARD_TYPE_END(Sample_Point)
|
||||
|
||||
// Constructors implementation
|
||||
|
||||
Sample_Point::Sample_Point(const
|
||||
Standard_Real x, const Standard_Real y)
|
||||
{
|
||||
myX = x;
|
||||
myY = y;
|
||||
}
|
||||
Sample_Point::Sample_Point()
|
||||
{
|
||||
myX = 0.0;
|
||||
myY = 0.0;
|
||||
}
|
||||
~~~~
|
||||
|
||||
|
||||
@subsection occt_fcug_2_3 Memory Management
|
||||
|
||||
In a work session, geometric modeling applications create and delete a considerable number of C++ objects allocated in the dynamic memory (heap). In this context, performance of standard functions for allocating and deallocating memory may be not sufficient. For this reason, Open CASCADE Technology employs a specialized memory manager implemented in the *Standard* package.
|
||||
@@ -524,8 +642,7 @@ To allocate memory in a C code with Open CASCADE Technology memory manager, sim
|
||||
|
||||
In C++, operators *new()* and *delete()* for a class may be defined so as to allocate memory using *Standard::Allocate()* and free it using *Standard::Free()*. In that case all objects of that class and all inherited classes will be allocated using the OCCT memory manager.
|
||||
|
||||
Preprocessor macro *DEFINE_STANDARD_ALLOC* provided by header *Standard_DefineAlloc.hxx* defines *new()* and *delete()* in this way.
|
||||
It is used for all OCCT classes (apart from a few exceptions) which thus are allocated using the OCCT memory manager.
|
||||
CDL extractor defines *new()* and *delete()* in this way for all classes declared with CDL. Thus all OCCT classes (apart from a few exceptions) are allocated using the OCCT memory manager.
|
||||
Since operators *new()* and *delete()* are inherited, this is also true for any class derived from an OCCT class, for instance, for all classes derived from *Standard_Transient*.
|
||||
|
||||
**Note** that it is possible (though not recommended unless really unavoidable) to redefine *new()* and *delete()* functions for a class inheriting *Standard_Transient*. If that is done, the method *Delete()* should be also redefined to apply operator *delete* to this pointer. This will ensure that appropriate *delete()* function will be called, even if the object is manipulated by a handle to a base class.
|
||||
@@ -645,7 +762,7 @@ It is a widely used practice to include that kind of protections in a debug bui
|
||||
~~~~~
|
||||
where *ErrorTypeName* is the exception type, *condition* is the logical expression leading to the raise of the exception, and *Error message* is the associated message.
|
||||
|
||||
The entire call may be removed by defining one of the preprocessor symbols *No_Exception* or <i>No_<ErrorTypeName></i> at compile-time:
|
||||
The entire call may be removed by defining one of the pre-processor symbols *No_Exception* or <i>No_<ErrorTypeName></i> at compile-time:
|
||||
|
||||
~~~~~
|
||||
#define No_Exception /* remove all raises */
|
||||
@@ -692,9 +809,9 @@ void f(1)
|
||||
}
|
||||
~~~~~
|
||||
|
||||
Here, the first handler will catch exceptions of *Overflow* type and the second one -- exceptions of *NumericError* type and all exceptions derived from it, including *Underflow* and *ZeroDivide*.
|
||||
Here, the first handler will catch exceptions of *Overflow* type and the second one - exceptions of *NumericError* type and all exceptions derived from it, including *Underflow* and *ZeroDivide*.
|
||||
|
||||
The handlers are checked in order of appearance, from the nearest to the try block to the most distant from it, until one matches the raise expression. For a try block, it would be a mistake to place a handler for a base exception type ahead of a handler for its derived type since that would ensure that the handler for the derived exception would never be invoked.
|
||||
The handlers are checked in order of appearance, from the nearest to the most distant try block, until one matches the raise expression. For a try block, it would be a mistake to place a handler for a base exception type ahead of a handler for its derived type since that would ensure that the handler for the derived exception would never be invoked.
|
||||
|
||||
~~~~~
|
||||
void f(1)
|
||||
@@ -956,6 +1073,21 @@ The **Collections** component provides a wide range of generic collections:
|
||||
* **Lists** are similar to sequences but have different algorithms to explore them.
|
||||
* Specific iterators for sequences and maps.
|
||||
|
||||
Most collections follow value semantics: their instances are the actual collections, not **handles** to a collection. Only arrays and sequences may also be manipulated by handle, and therefore shared.
|
||||
|
||||
Each collection directly used as an argument in Open CASCADE Technology public syntax
|
||||
is instantiated in an OCCT component using the corresponding generic class in package
|
||||
<i> TCollection</i>, by means of compiling the CDL declaration of the instance.
|
||||
Thus OCCT generic classes require compilation of definitions in the CDL language and therefore
|
||||
can only be instantiated in WOK.
|
||||
|
||||
If you do not use CDL in your project (CDL compilation under WOK is necessary
|
||||
to instantiate any generic Collection from package <i>TCollection</i>), then you should
|
||||
use the Collections defined in <i> NCollection</i> package. It contains definitions of the
|
||||
same generic collection classes described above, but in a form of C++ templates.
|
||||
Therefore, to instantiate any collection type no additional support is required beyond
|
||||
the ANSI C++ compiler.
|
||||
|
||||
@subsubsection occt_fcug_3_1_2 Generic general-purpose Aggregates
|
||||
|
||||
#### TCollection_Array1
|
||||
@@ -1020,6 +1152,14 @@ Sequences have about the same goal as unidimensional arrays *TCollection_HArray
|
||||
* *Item*, the type of element in the sequence,
|
||||
* *Seq*, the actual type of sequence handled by *HSequence*. This is an instantiation with *Item* of the *TCollection_Sequence* generic class.
|
||||
|
||||
#### TCollection_HSet
|
||||
|
||||
This is a collection of non-ordered items without any duplicates. At each transaction, the system checks if there are no duplicates.
|
||||
*HSet* objects are *handles* to sets.
|
||||
*HSet* is a generic class which depends on two parameters:
|
||||
* *Item*, the type of element in the set,
|
||||
* *Set*, the actual type of set handled by *HSet*. This is an instantiation with *TCollection_Set* generic class.
|
||||
|
||||
#### TCollection_List
|
||||
|
||||
These are ordered lists of non-unique objects which can be accessed sequentially using an iterator.
|
||||
@@ -1034,6 +1174,10 @@ A sequence is a better structure when searching for items by value.
|
||||
|
||||
Queues and stacks are other kinds of list with a different access to data.
|
||||
|
||||
#### TCollection_Queue
|
||||
|
||||
This is a structure, where items are added at the end and removed from the front. The first item entered will be the first removed (**FIFO** structure: First In First Out). *Queue* is a generic class which depends on *Item*, the type of element in the structure.
|
||||
|
||||
#### TCollection_Sequence
|
||||
|
||||
This is a sequence of items indexed by an integer.
|
||||
@@ -1041,6 +1185,22 @@ Sequences have about the same goal as unidimensional arrays (*TCollection_Array
|
||||
|
||||
*Sequence* is a generic class which depends on *Item*, the type of element in the sequence.
|
||||
|
||||
#### TCollection_Set
|
||||
|
||||
This is a collection of non-ordered items without any duplicates. At each transaction, the system checks if there are no duplicates.
|
||||
|
||||
A set generates the same result as a map. A map is more effective; so it is advisable to use maps instead of sets.
|
||||
|
||||
*Set* is a generic class which depends on *Item*, the type of element in the set.
|
||||
Use *SetIterator* iterator to explore a *Set* structure.
|
||||
|
||||
#### TCollection_Stack
|
||||
|
||||
This is a structure where items are added and removed from the top. The last item entered will be the first removed.
|
||||
|
||||
*Stack* is a generic class which depends on *Item*, the type of element in the structure.
|
||||
Use a *StackIterator* iterator to explore a *Stack* structure.
|
||||
|
||||
@subsubsection occt_fcug_3_1_3 Generic Maps
|
||||
|
||||
Maps are dynamically extended data structures where data is quickly accessed with a key. *TCollection_BasicMap* is a root class for maps.
|
||||
@@ -1243,9 +1403,13 @@ These instantiations are the following:
|
||||
@subsection occt_fcug_3_3 NCollections
|
||||
@subsubsection occt_fcug_3_3_1 Overview
|
||||
|
||||
The *NCollection* package provides a set of template collection classes used throughout OCCT.
|
||||
*NCollection* package allows to not use WOK development environment in projects. Though it is quite natural to develop a code based on OCCT in any environment accepted in the industry, there is still one limitation: the so-called OCCT generic classes provided in TCollection package require compilation of the definitions in the CDL language and therefore can only be instantiated in WOK development environment.
|
||||
|
||||
Macro definitions of these classes are stored in *NCollection_Define\*.hxx* files. These definitions are now obsolete though still can be used, particularly for compatibility with the existing code.
|
||||
The NCollection library provides a full replacement of all TCollection generic classes so that any OCCT collection could be instantiated via C++ template or macro definitions. It can be used in WOK as a package development unit, or in any other configuration, since it only uses the standard capabilities of C++ compiler.
|
||||
|
||||
Macro definitions of these classes are stored in *NCollection_Define\*.hxx* files. These definitions are now obsolete though still can be used, particularly for compatibility with the existing code. On the contrary, template classes in *NCollection_\*.hxx* files are recommended, they are supported by OPEN CASCADE Company and further developed according to various needs.
|
||||
|
||||
The technology used in this unit continues and complements the one offered in the header file *Standard_DefineHandle* – allowing to implement outside CDL the classes managed by Handle, also providing OCCT RTTI support.
|
||||
|
||||
@subsubsection occt_fcug_3_3_2 Instantiation of collection classes
|
||||
|
||||
@@ -1314,26 +1478,24 @@ Source code file will be *MyPackage_HSequenceOfPnt.cxx* or any other .cxx file (
|
||||
IMPLEMENT_HSEQUENCE (MyPackage_HSequenceOfPnt)
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_fcug_3_3_3 Arrays and sequences
|
||||
@subsubsection occt_fcug_3_3_3 Class architecture
|
||||
|
||||
Standard collections provided by OCCT are:
|
||||
* *NCollection_Array1* - fixed-size (at initialization) one-dimensional array; note that index can start at any value, usually 1
|
||||
* *NCollection_Array2* - fixed-size (at initialization) two-dimensional array; note that index can start at any value, usually 1
|
||||
* *NCollection_List* - plain list
|
||||
* *NCollection_Sequence* - double-connected list with access by index; note that index starts at 1
|
||||
|
||||
These classes provide STL-style iterators (methods begin() and end()) and thus can be used in STL algorithms.
|
||||
To understand the basic architecture of the classes instantiated from *NCollection* macros, please refer to the documentation on *TCollection* package, particularly to CDL files. Almost all API described there is preserved in *NCollection*. Changes are described in corresponding *NCollection_Define\*.hxx* files.
|
||||
|
||||
@subsubsection occt_fcug_3_3_3x Maps
|
||||
Nevertheless the internal structure of NCollection classes is more complex than that of *TCollection* ones, providing more capabilities. The advanced layer of architecture is described in the next chapter Features.
|
||||
|
||||
NCollection provides several classes for storage of objects by value, providing fast search due to use of hash:
|
||||
* *NCollection_Map* - hash set
|
||||
* *NCollection_IndexedMap* - set with prefixed order of elements, allowing fast access by index or by value (hash-based)
|
||||
* *NCollection_DataMap* - hash map
|
||||
* *NCollection_IndexedDataMap* - map with prefixed order of elements, allowing fast access by index or by value (hash-based)
|
||||
* *NCollection_DoubleMap* - two-side hash map (with two keys)
|
||||
There are two principal changes:
|
||||
* In *TCollection* some classes ( Stack, List, Set, Map, DataMap, DoubleMap ) define the Iterator type, the name of Iterator being like *MyPackage_DoubleMapIteratorOfDoubleMapOfIntegerReal*. In *NCollection* each Iterator is always defined as subtype of the collection *MyPackage_DoubleMapOfIntegerReal::Iterator*.
|
||||
* Hashed collections (of type Map\* ) require in *TCollection* that the special class *Map\*Hasher* is defined. In *NCollection* it is only required that the global functions *IsEqual* and *HashCode* are defined.
|
||||
|
||||
@subsubsection occt_fcug_3_3_4 Other collection types
|
||||
#### Interface to classes defined in CDL
|
||||
|
||||
The classes defined above can be used as types for fields, parameters of methods and return values in CDL definitions. In our example, if MyPackage is a CDL package, you will need to create the file *MyPackage_SequenceOfPnt.hxx* containing or including the above definitions, and then to add the line: imported *SequenceOfPnt* to file *MyPackage.cdl*;
|
||||
|
||||
Then the new collection type can be used in any CDL definition under the name *SequenceOfPnt* from *MyPackage*.
|
||||
|
||||
@subsubsection occt_fcug_3_3_4 New collection types
|
||||
|
||||
There are 4 collection types provided as template classes:
|
||||
* *NCollection_Vector*
|
||||
@@ -1346,11 +1508,11 @@ There are 4 collection types provided as template classes:
|
||||
This type is implemented internally as a list of arrays of the same size. Its properties:
|
||||
* Direct (constant-time) access to members like in Array1 type; data are allocated in compact blocks, this provides faster iteration.
|
||||
* Can grow without limits, like List, Stack or Queue types.
|
||||
* Once having the size LEN, it cannot be reduced to any size less than LEN -- there is no operation of removal of items.
|
||||
* Once having the size LEN, it cannot be reduced to any size less than LEN – there is no operation of removal of items.
|
||||
|
||||
Insertion in a Vector-type class is made by two methods:
|
||||
* _SetValue(ind, theValue)_ -- array-type insertion, where ind is the index of the inserted item, can be any non-negative number. If it is greater than or equal to Length(), then the vector is enlarged (its Length() grows).
|
||||
* _Append(theValue)_ -- list-type insertion equivalent to _myVec.SetValue(myVec.Length(), theValue)_, incrementing the size of the collection.
|
||||
* _SetValue(ind, theValue)_ – array-type insertion, where ind is the index of the inserted item, can be any non-negative number. If it is greater than or equal to Length(), then the vector is enlarged (its Length() grows).
|
||||
* _Append(theValue)_ – list-type insertion equivalent to _myVec.SetValue(myVec.Length(), theValue)_ – incrementing the size of the collection.
|
||||
|
||||
Other essential properties coming from List and Array1 type collections:
|
||||
* Like in *List*, the method *Clear()* destroys all contained objects and releases the allocated memory.
|
||||
@@ -1455,11 +1617,11 @@ NCollection defines some specific features, in addition to the public API inheri
|
||||
|
||||
Every collection defines its Iterator class capable of iterating the members in some predefined order. Every Iterator is defined as a subtype of the particular collection type (e.g., MyPackage_StackOfPnt::Iterator ). The order of iteration is defined by a particular collection type. The methods of Iterator are:
|
||||
|
||||
* _void Init (const MyCollection&)_ -- initializes the iterator on the collection object;
|
||||
* _Standard_Boolean More () const_ -- makes a query if there is another non-iterated member;
|
||||
* _void Next ()_ -- increments the iterator;
|
||||
* _const ItemType& Value () const_ -- returns the current member;
|
||||
* _ItemType& ChangeValue () const_ -- returns the mutable current member
|
||||
* _void Init (const MyCollection&)_ - initializes the iterator on the collection object;
|
||||
* _Standard_Boolean More () const_ - makes a query if there is another non-iterated member;
|
||||
* _void Next ()_ - increments the iterator;
|
||||
* _const ItemType& Value () const_ - returns the current member;
|
||||
* _ItemType& ChangeValue () const_ - returns the mutable current member
|
||||
|
||||
~~~~~
|
||||
typedef Ncollection_Sequence<gp_Pnt>
|
||||
@@ -1483,9 +1645,9 @@ There is a common abstract base class for all collections for a given item type
|
||||
|
||||
This base class has the following public API:
|
||||
* abstract class Iterator as the base class for all Iterators descried above;
|
||||
* _Iterator& CreateIterator () const_ -- creates and returns the Iterator on this collection;
|
||||
* _Standard_Integer Size () const_ -- returns the number of items in this collection;
|
||||
* *void Assign (const NCollection_BaseCollection& theOther)* -- copies the contents of the Other to this collection object;
|
||||
* _Iterator& CreateIterator () const_ - creates and returns the Iterator on this collection;
|
||||
* _Standard_Integer Size () const_ - returns the number of items in this collection;
|
||||
* *void Assign (const NCollection_BaseCollection& theOther)* - copies the contents of the Other to this collection object;
|
||||
|
||||
These members enable accessing any collection without knowing its exact type. In particular, it makes possible to implement methods receiving objects of the abstract collection type:
|
||||
|
||||
@@ -1510,8 +1672,8 @@ gp_Pnt COG(const MyPackage_BaseCollPnt& theColl)
|
||||
~~~~~
|
||||
|
||||
Note that there are fundamental differences between the shown type-independent iterator and the iterator belonging to a particular non-abstract collection:
|
||||
* Type-independent iterator can only be obtained via the call <i>CreateIterator()</i>; the typed iterator -- only via the explicit construction.
|
||||
* Type-independent iterator is an abstract class, so it is impossible to copy it or to assign it to another collection object; the typed iterators can be copied and reassigned using the method <i>Init()</i>.
|
||||
* Type-independent iterator can only be obtained via the call CreateIterator(); the typed iterator - only via the explicit construction.
|
||||
* Type-independent iterator is an abstract class, so it is impossible to copy it or to assign it to another collection object; the typed iterators can be copied and reassigned using the method Init() .
|
||||
* Type-independent iterator is actually destroyed when its collection object is destroyed; the typed iterator is destroyed as any other C++ object in the corresponding C++ scope.
|
||||
|
||||
The common point between them is that it is possible to create any number of both types of iterators on the same collection object.
|
||||
@@ -1742,7 +1904,7 @@ They provide:
|
||||
|
||||
All these functions are provided by geometric processor package <i> gp</i>. Its classes for 2d and 3d objects are handled by value rather than by reference. When this sort of object is copied, it is copied entirely. Changes in one instance will not be reflected in another.
|
||||
|
||||
The *gp* package defines the basic geometric entities used for algebraic calculation and basic analytical geometry in 2d & 3d space. It also provides basic transformations such as identity, rotation, translation, mirroring, scale transformations, combinations of transformations, etc. Entities are handled by value.
|
||||
The *gp* package defines the basic non-persistent geometric entities used for algebraic calculation and basic analytical geometry in 2d & 3d space. It also provides basic transformations such as identity, rotation, translation, mirroring, scale transformations, combinations of transformations, etc. Entities are handled by value.
|
||||
|
||||
Please, note that <i> gp</i> curves and surfaces are analytic: there is no parameterization and no orientation on <i>gp</i> entities, i.e. these entities do not provide functions which work with these properties.
|
||||
|
||||
@@ -1760,10 +1922,11 @@ Note: the <i> gp</i> entities cannot be shared when they are inside more complex
|
||||
Before creating a geometric object, you must decide whether you are in a 2d or in a 3d context and how you want to handle the object.
|
||||
If you do not need a single instance of a geometric primitive but a set of them then the package which deals with collections of this sort of object, *TColgp*, will provide the necessary functionality.
|
||||
In particular, this package provides standard and frequently used instantiations of generic classes with geometric objects, i.e. *XY*, *XYZ*, *Pnt*, *Pnt2d*, *Vec*, *Vec2d*, *Lin*, *Lin2d*, *Circ*, *Circ2d.*
|
||||
These are non-persistent classes.
|
||||
|
||||
@subsection occt_occt_fcug_4_5 Basic Geometric Libraries
|
||||
There are various library packages available which offer a range of basic computations on curves and surfaces.
|
||||
If you are dealing with objects created from the *gp* package, the useful algorithms are in the elementary curves and surfaces libraries -- the *ElCLib* and *ElSLib* packages.
|
||||
If you are dealing with objects created from the *gp* package, the useful algorithms are in the elementary curves and surfaces libraries - the *ElCLib* and *ElSLib* packages.
|
||||
* *EICLib* provides methods for analytic curves. This is a library of simple computations on curves from the *gp* package (Lines, Circles and Conics). It is possible to compute points with a given parameter or to compute the parameter for a point.
|
||||
* *EISLib* provides methods for analytic surfaces. This is a library of simple computations on surfaces from the package *gp* (Planes, Cylinders, Spheres, Cones, Tori). It is possible to compute points with a given pair of parameters or to compute the parameter for a point. There is a library for calculating normals on curves and surfaces.
|
||||
|
||||
@@ -1972,3 +2135,76 @@ This is reasonable precision to pass to an Intersection process as a limit of r
|
||||
This is a reasonable precision to pass to an approximation process as a limit of refinement of fitting. The approximation is greater than the other precisions because it is designed to be used when the time is at a premium. It has been provided as a reasonable compromise by the designers of the Approximation algorithm. The current value is *Confusion() * 10*.
|
||||
Note that Approximation is greater than Confusion, so care must be taken when using Confusion in an approximation process.
|
||||
|
||||
@section occt_fcug_5 Data Storage
|
||||
@subsection occt_fcug_5_1 Saving and Opening Files
|
||||
|
||||
@image html /user_guides/foundation_classes/images/foundation_classes_image007.png "Example of Saving-Opening workflow"
|
||||
@image latex /user_guides/foundation_classes/images/foundation_classes_image007.png "Example of Saving-Opening workflow"
|
||||
|
||||
In the example, the roots of the transferable transient objects *TopoDS_Shape, Geom_Geometry* and *Geom2d_Geometry* are used in algorithms, they contain data and temporary results.
|
||||
The associated objects in the persistent domain are *PTopoDS_HShape, PGeom_Geometry* and *PGeom2d_Geometry*. They contain a real data structure which is stored in a file.
|
||||
Note that when an object is stored, if it contains another stored object, the references to the contained object are also managed.
|
||||
@image html /user_guides/foundation_classes/images/foundation_classes_image008.png "Saving-Opening mechanism"
|
||||
@image latex /user_guides/foundation_classes/images/foundation_classes_image008.png "Saving-Opening mechanism"
|
||||
|
||||
|
||||
@subsection occt_fcug_5_2 Basic Storage Procedures
|
||||
|
||||
@subsubsection occt_fcug_5_2_1 Saving
|
||||
|
||||
The storage procedure of a transient object follows five main steps.
|
||||
1. Create an I/O driver for files. For example, *FSD_File f()*;
|
||||
2. Instance the data schema, which will process your persistent information. The schema is used for read/write operations. If ShapeSchema is the name of your schema:
|
||||
~~~~~
|
||||
Handle(ShapeSchema) s = new ShapeSchema;
|
||||
~~~~~
|
||||
3. Create a persistent shape from a transient shape.
|
||||
~~~~~
|
||||
TopoDS_Shape aShape;
|
||||
PTColStd_TransientPersistentMap aMap;
|
||||
Handle(PTopoDS_HShape) aPShape = MgtBRep::Translate
|
||||
(aShape, aMap, MgtBRep_WithoutTriangle);
|
||||
~~~~~
|
||||
4. Create a new container and fill it using the *AddRoot()* method.
|
||||
~~~~~
|
||||
Handle(Storage_Data) d = new Storage_Data;
|
||||
d -> AddRoot (“ObjectName”, aPShape);
|
||||
~~~~~
|
||||
You may add as many objects as you want in this container.
|
||||
5. Save to the archive.
|
||||
~~~~~
|
||||
s -> Write (f,d);
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_fcug_5_2_2 Opening
|
||||
The retrieval mechanism is the opposite of the storage mechanism. The procedure for retrieving an object is as follows:
|
||||
|
||||
1. Create an I/O driver and instance a data schema (if not done).
|
||||
2. Read the persistent object from the archive and get the list of objects using *Roots()* method.
|
||||
~~~~~
|
||||
Handle(Storage_Data) d = s -> Read(f);
|
||||
Handle(Storage_HSeqOfRoot) roots = d-> Roots();
|
||||
~~~~~
|
||||
3. Loop on root objects to get *Standard_Persistent* objects (the following sequence only gets the first root).
|
||||
~~~~~
|
||||
Handle(Standard_Persistent) p;
|
||||
Handle(Standard_Root) r;
|
||||
if(roots -> Length() >= 1) {
|
||||
r = roots -> Value(1);
|
||||
p = r -> Object();
|
||||
}
|
||||
~~~~~
|
||||
4. DownCast the persistent object to a *PTopoDS_Hshape*.
|
||||
~~~~~
|
||||
Handle(PTopoDS_HShape) aPShape;
|
||||
aPShape = Handle(PTopoDS_HShape)::DownCast(p);
|
||||
~~~~~
|
||||
5. Create the *TopoDS_Shape*.
|
||||
~~~~~
|
||||
TopoDS_Shape aShape;
|
||||
PTColStd_PersistentTransientMap aMap;
|
||||
MgtBRep::Translate (aPShape, aMap, aShape, MgtBRep_WithoutTriangle);
|
||||
~~~~~
|
||||
|
||||
|
||||
|
||||
|
@@ -179,8 +179,8 @@ Default value is 1.
|
||||
|
||||
<h4>read.stdsameparameter.mode</h4>
|
||||
defines the using of *BRepLib::SameParameter*. Its possible values are:
|
||||
* 0 (Off) -- *BRepLib::SameParameter* is not called,
|
||||
* 1 (On) -- *BRepLib::SameParameter* is called.
|
||||
* 0 (Off) - *BRepLib::SameParameter* is not called,
|
||||
* 1 (On) - *BRepLib::SameParameter* is called.
|
||||
*BRepLib::SameParameter* is used through *ShapeFix_Edge::SameParameter*. It ensures that the resulting edge will have the lowest tolerance taking pcurves either unmodified from the IGES file or modified by *BRepLib::SameParameter*.
|
||||
Read this parameter with:
|
||||
~~~~~
|
||||
@@ -271,8 +271,13 @@ Please find an example of the resource file for IGES (which defines parameters
|
||||
In order for the IGES translator to use that file, you have to define the environment variable *CSF_IGESDefaults*, which should point to the directory where the resource file resides. Note that if you change parameter *read.iges.resource.name*, you should change the name of the resource file and the name of the environment variable correspondingly. The variable should contain a path to the resource file.
|
||||
|
||||
Default values:
|
||||
* read.iges.resource.name -- IGES,
|
||||
* read.iges.sequence -- FromIGES.
|
||||
* read.iges.resource.name - IGES,
|
||||
* read.iges.sequence - FromIGES.
|
||||
|
||||
<h4>read.scale.unit</h4>
|
||||
This parameter is obsolete (the parameter *xstep.cascade.unit* should be used instead when necessary). If it is set to 'M', the shape is scaled 0.001 times (as if it were in meters) after translation from IGES or STEP.
|
||||
|
||||
Default value is MM.
|
||||
|
||||
<h4>xstep.cascade.unit</h4>
|
||||
This parameter defines units to which a shape should be converted when translated from IGES or STEP to CASCADE. Normally it is MM; only those applications that work internally in units other than MM should use this parameter.
|
||||
@@ -319,25 +324,25 @@ faces = Reader.GiveList(“xst-type(!=SurfaceOfRevolution)”);
|
||||
~~~~~
|
||||
|
||||
<h4>List of predefined operators that can be used:</h4>
|
||||
* *xst-model-all* -- selects all entities.
|
||||
* *xst-model-roots* -- selects all roots.
|
||||
* *xst-transferrable-all* -- selects all translatable entities.
|
||||
* *xst-transferrable-roots* -- selects all translatable roots (default).
|
||||
* *xst-sharing + \<selection\>* -- selects all entities sharing at least one entity selected by \<selection\>.
|
||||
* *xst-shared + \<selection\>* -- selects all entities shared by at least one entity selected by \<selection\>.
|
||||
* *iges-visible-roots* -- selects all visible roots, whether translatable or not.
|
||||
* *iges-visible-transf-roots* -- selects all visible and translatable roots.
|
||||
* *iges-blanked-roots* -- selects all blank roots, whether translatable or not.
|
||||
* *iges-blanked-transf-roots* -- selects all blank and translatable roots.
|
||||
* *iges-status-independant* -- selects entities whose IGES Subordinate Status = 0.
|
||||
* *iges-bypass-group* -- selects all root entities. If a root entity is a group (402/7 or 402/9), the entities in the group are selected.
|
||||
* *iges-bypass-subfigure* -- selects all root entities. If a root entity is a subfigure definition (308), the entities in the subfigure definition are selected.
|
||||
* *iges-bypass-group-subfigure* -- selects all root entities. If a root entity is a group (402/7 or 402/9) or a subfigure definition (308), the entities in the group and in the subfigure definition are selected.
|
||||
* *iges-curves-3d* -- selects 3D curves, whether they are roots or not (e.g. a 3D curve on a surface).
|
||||
* *iges-basic-geom* -- selects 3D curves and untrimmed surfaces.
|
||||
* *iges-faces* -- selects face-supporting surfaces (trimmed or not).
|
||||
* *iges-surfaces* -- selects surfaces not supporting faces (i.e. with natural bounds).
|
||||
* *iges-basic-curves-3d* -- selects the same entities as iges-curves-3d. Composite Curves are broken down into their components and the components are selected.
|
||||
* *xst-model-all* - selects all entities.
|
||||
* *xst-model-roots* - selects all roots.
|
||||
* *xst-transferrable-all* - selects all translatable entities.
|
||||
* *xst-transferrable-roots* - selects all translatable roots (default).
|
||||
* *xst-sharing + \<selection\>* - selects all entities sharing at least one entity selected by \<selection\>.
|
||||
* *xst-shared + \<selection\>* - selects all entities shared by at least one entity selected by \<selection\>.
|
||||
* *iges-visible-roots* - selects all visible roots, whether translatable or not.
|
||||
* *iges-visible-transf-roots* - selects all visible and translatable roots.
|
||||
* *iges-blanked-roots* - selects all blank roots, whether translatable or not.
|
||||
* *iges-blanked-transf-roots* - selects all blank and translatable roots.
|
||||
* *iges-status-independant* - selects entities whose IGES Subordinate Status = 0.
|
||||
* *iges-bypass-group* Selects all root entities. If a root entity is a group (402/7 or 402/9), the entities in the group are selected.
|
||||
* *iges-bypass-subfigure* Selects all root entities. If a root entity is a subfigure definition (308), the entities in the subfigure definition are selected.
|
||||
* *iges-bypass-group-subfigure* Selects all root entities. If a root entity is a group (402/7 or 402/9) or a subfigure definition (308), the entities in the group and in the subfigure definition are selected.
|
||||
* *iges-curves-3d* - selects 3D curves, whether they are roots or not (e.g. a 3D curve on a surface).
|
||||
* *iges-basic-geom* - selects 3D curves and untrimmed surfaces.
|
||||
* *iges-faces* - selects face-supporting surfaces (trimmed or not).
|
||||
* *iges-surfaces* - selects surfaces not supporting faces (i.e. with natural bounds).
|
||||
* *iges-basic-curves-3d* selects the same entities as iges-curves-3d. Composite Curves are broken down into their components and the components are selected.
|
||||
|
||||
@subsubsection occt_iges_2_3_5 Performing the IGES file translation
|
||||
Perform translation according to what you want to translate:
|
||||
@@ -401,11 +406,11 @@ reader.PrintTransferInfo (failsonly, mode);
|
||||
displays the messages that appeared during the last invocation of *Transfer* or *TransferRoots*.
|
||||
|
||||
If *failsonly* is *IFSelect_FailOnly*, only fail messages will be output, if it is *IFSelect_FailAndWarn*, all messages will be output. Parameter “mode” can have *IFSelect_xxx* values where *xxx* can be:
|
||||
* *GeneralCount* -- gives general statistics on the transfer (number of translated IGES entities, number of fails and warnings, etc)
|
||||
* *CountByItem* -- gives the number of IGES entities with their types per message.
|
||||
* *ListByItem* -- gives the number of IGES entities with their type and DE numbers per message.
|
||||
* *ResultCount* -- gives the number of resulting OCCT shapes per type.
|
||||
* *Mapping* -- gives mapping between roots of the IGES file and the resulting OCCT shape per IGES and OCCT type.
|
||||
* *GeneralCount* - gives general statistics on the transfer (number of translated IGES entities, number of fails and warnings, etc)
|
||||
* *CountByItem* - gives the number of IGES entities with their types per message.
|
||||
* *ListByItem* - gives the number of IGES entities with their type and DE numbers per message.
|
||||
* *ResultCount* - gives the number of resulting OCCT shapes per type.
|
||||
* *Mapping* gives mapping between roots of the IGES file and the resulting OCCT shape per IGES and OCCT type.
|
||||
|
||||
@subsection occt_iges_2_4 Mapping of IGES entities to Open CASCADE Technology shapes
|
||||
|
||||
@@ -555,10 +560,10 @@ Geometrical entities are translated by classes *IGESToBRep_BasicCurve* and *IGE
|
||||
Since these objects are not BRep objects, they do not have tolerances. Hence, tolerance parameters are used in these classes only as precisions: to detect specific cases (e.g., to distinguish a circle, an ellipse, a parabola and a hyperbola) and to detect bad cases (such as coincident points).
|
||||
|
||||
Use of precision parameters is reflected in the following classes:
|
||||
* *IGESToBRep_BasicCurve* -- all parameters and points are compared with precision *EpsGeom*. All transformations (except *IGESToBRep_BasicCurve::TransferTransformation*) are fulfilled with precision *Epsilon* which is set to 10<sup>-3</sup> (in the *IGESToBRep_BasicCurve::TransferTransformation* the value 10<sup>-5</sup> is used).
|
||||
* *IGESToBRep_BasicCurve::TransferBSplineCurve* -- all weights of *BSplineCurve* are assumed to be more than *Precision::PConfusion* (else the curve is not translated).
|
||||
* *IGESToBRep_BasicSurface* -- all parameters and points are compared with precision *EpsGeom*. All transformations are fulfilled with precision *Epsilon*, which is set to 10<sup>-3</sup>.
|
||||
* *IGESToBRep_BasicSurface::TransferBSplineSurface* -- all weights of *BSplineSurface* are assumed to be more than *Precision::PConfusion* (else the surface is not translated).
|
||||
* *IGESToBRep_BasicCurve* - all parameters and points are compared with precision *EpsGeom*. All transformations (except *IGESToBRep_BasicCurve::TransferTransformation*) are fulfilled with precision *Epsilon* which is set to 10<sup>-3</sup> (in the *IGESToBRep_BasicCurve::TransferTransformation* the value 10<sup>-5</sup> is used).
|
||||
* *IGESToBRep_BasicCurve::TransferBSplineCurve* - all weights of *BSplineCurve* are assumed to be more than *Precision::PConfusion* (else the curve is not translated).
|
||||
* *IGESToBRep_BasicSurface* all parameters and points are compared with precision *EpsGeom*. All transformations are fulfilled with precision *Epsilon*, which is set to 10<sup>-3</sup>.
|
||||
* *IGESToBRep_BasicSurface::TransferBSplineSurface* - all weights of *BSplineSurface* are assumed to be more than *Precision::PConfusion* (else the surface is not translated).
|
||||
|
||||
|
||||
<h4>Translating into Topology</h4>
|
||||
@@ -574,11 +579,11 @@ The following classes show what default tolerances are used when creating shape
|
||||
<h5>Class IGESToBRep_TopoCurve</h5>
|
||||
|
||||
All methods are in charge of transferring curves from IGES curve entities <i>(TransferCompositeCurve, Transfer2dCompositeCurve, TransferCurveOnFace, TransferBoundaryOnFace, TransferOffsetCurve, TransferTopoBasicCurve)</i> if an entity has transformation call to *IGESData_ToolLocation::ConvertLocation* with *Epsilon* value set to 10<sup>-4</sup>.
|
||||
* *IGESToBRep_TopoCurve::TransferPoint* -- vertex is constructed from a Point entity with tolerance *EpsGeom*UnitFactor*.
|
||||
* *IGESToBRep_TopoCurve::Transfer2dPoint* -- vertex is constructed from a Point entity with tolerance *EpsCoeff*.
|
||||
* *IGESToBRep_TopoCurve::TransferCompositeCurveGeneral* -- obtains shapes (edges or wires) from other methods and adds them into the resulting wire. Two adjacent edges of the wire can be connected with tolerance up to *MaxTol*.
|
||||
* *IGESToBRep_TopoCurve::TransferCurveOnFace* and *IGESToBRep_TopoCurve::TransferBoundaryOnFace* build a wire from 3D and 2D representations of a curve on surface. Edges and vertices of the wire cannot have tolerance larger than *MaxTol*. The value *EpsGeom*UnitFactor* is passed into *ShapeFix_Wire::SetPrecision* and *MaxTol* is passed into *ShapeFix_Wire::MaxTolerance*. To find out how these parameters affect the resulting tolerance changes, please, refer to class *ShapeFix_Wire*.
|
||||
* *IGESToBRep_TopoCurve::TransferTopoBasicCurve* and *IGESToBRep_TopoCurve::Transfer2dTopoBasicCurve* -- the boundary vertices of an edge (or a wire if a curve was of C0 continuity) translated from a basis IGES curve (*BSplineCurve, CopiousData, Line,* etc.) are built with tolerance *EpsGeom*UnitFactor*, the edge tolerance is *Precision::Confusion*. If a curve was divided into several edges, the common vertices of such adjacent edges have tolerance *Precision::Confusion*.
|
||||
* *IGESToBRep_TopoCurve::TransferPoint* - vertex is constructed from a Point entity with tolerance *EpsGeom*UnitFactor*.
|
||||
* *IGESToBRep_TopoCurve::Transfer2dPoint* - vertex is constructed from a Point entity with tolerance *EpsCoeff*.
|
||||
* *IGESToBRep_TopoCurve::TransferCompositeCurveGeneral* - obtains shapes (edges or wires) from other methods and adds them into the resulting wire. Two adjacent edges of the wire can be connected with tolerance up to *MaxTol*.
|
||||
* *IGESToBRep_TopoCurve::TransferCurveOnFace* and *IGESToBRep_TopoCurve::TransferBoundaryOnFace* build a wire from 3D and 2D representations of a curve on surface. Edges and vertices of the wire cannot have tolerance larger than *MaxTol*. The value *EpsGeom*UnitFactor* is passed into *ShapeFix_Wire::SetPrecision* and *MaxTol* - into *ShapeFix_Wire::MaxTolerance*. To find out how these parameters affect the resulting tolerance changes, please, refer to class *ShapeFix_Wire*.
|
||||
* *IGESToBRep_TopoCurve::TransferTopoBasicCurve* and *IGESToBRep_TopoCurve::Transfer2dTopoBasicCurve* - the boundary vertices of an edge (or a wire if a curve was of C0 continuity) translated from a basis IGES curve (*BSplineCurve, CopiousData, Line,* etc.) are built with tolerance *EpsGeom*UnitFactor*, the edge tolerance is *Precision::Confusion*. If a curve was divided into several edges, the common vertices of such adjacent edges have tolerance *Precision::Confusion*.
|
||||
|
||||
|
||||
<h5>Class IGESToBRep_TopoSurface</h5>
|
||||
@@ -587,10 +592,10 @@ All faces created by this class have tolerance *Precision::Confusion*.
|
||||
|
||||
<h5>Class IGESToBRep_BRepEntity</h5>
|
||||
|
||||
* *IGESToBRep_BRepEntity::TransferVertex* -- the vertices from the *VertexList* entity are constructed with tolerance *EpsGeom*UnitFactor*.
|
||||
* *IGESToBRep_BRepEntity::TransferEdge* -- the edges from the *EdgeList* entity are constructed with tolerance *Precision::Confusion*.
|
||||
* *IGESToBRep_BRepEntity::TransferLoop* -- this function works like *IGESToBRep_TopoCurve::TransferCurveOnFace* and *IGESToBRep_TopoCurve::TransferBoundaryOnFace*.
|
||||
* *IGESToBRep_BRepEntity::TransferFace* -- the face from the *Face* IGES entity is constructed with tolerance *Precision::Confusion*.
|
||||
* *IGESToBRep_BRepEntity::TransferVertex* - the vertices from the *VertexList* entity are constructed with tolerance *EpsGeom*UnitFactor*.
|
||||
* *IGESToBRep_BRepEntity::TransferEdge* - the edges from the *EdgeList* entity are constructed with tolerance *Precision::Confusion*.
|
||||
* *IGESToBRep_BRepEntity::TransferLoop* - this function works like *IGESToBRep_TopoCurve::TransferCurveOnFace* and *IGESToBRep_TopoCurve::TransferBoundaryOnFace*.
|
||||
* *IGESToBRep_BRepEntity::TransferFace* the face from the Face IGES entity is constructed with tolerance *Precision::Confusion*.
|
||||
|
||||
<h5>Shape Healing classes</h5>
|
||||
After performing a simple mapping, shape-healing algorithms are called (class *ShapeFix_Shape*) by *IGESToBRep_Actor::Transfer()*. Shape-healing algorithm performs the correction of the resulting OCCT shape.
|
||||
@@ -663,8 +668,8 @@ The result is an *IGESControl_Writer* object.
|
||||
The following parameters are used for the OCCT-to-IGES translation.
|
||||
|
||||
* *write.iges.brep.mode:* allows choosing the write mode:
|
||||
* "Faces" (0): OCCT *TopoDS_Faces* will be translated into IGES 144 (Trimmed Surface) entities, no BRep entities will be written to the IGES file,
|
||||
* "BRep" (1): OCCT *TopoDS_Faces* will be translated into IGES 510 (Face) entities, the IGES file will contain BRep entities.
|
||||
* "Faces" (0): OCCT *TopoDS_Faces* will be translated into IGES 144 (Trimmed Surface) entities, no B-Rep entities will be written to the IGES file,
|
||||
* "BRep" (1): OCCT *TopoDS_Faces* will be translated into IGES 510 (Face) entities, the IGES file will contain B-Rep entities.
|
||||
Read this parameter with:
|
||||
~~~~~
|
||||
Standard_Integer byvalue = Interface_Static::IVal("write.iges.brep.mode");
|
||||
@@ -687,7 +692,7 @@ Default value is "Faces" (0).
|
||||
* *write.iges.header.product:* gives the name of the sending product. The default value is "CAS.CADE IGES processor Vx.x", where *x.x* means the current version of Open CASCADE Technology.
|
||||
* Read this parameter with *Standard_String byvalue = Interface_Static::CVal("write.iges.header.product")*;
|
||||
* Modify this value with *Interface_Static::SetCVal ("write.iges.header.product", "product name")*;
|
||||
* *write.iges.header.receiver:* -- gives the name of the receiving company. The default value is "" (empty).
|
||||
* *write.iges.header.receiver:* - gives the name of the receiving company. The default value is "" (empty).
|
||||
* Read this parameter with *Standard_String byvalue = Interface_Static::CVal("write.iges.header.receiver");*
|
||||
* Modify this value with *Interface_Static::SetCVal ("write.iges.header.receiver", "reciever name");*
|
||||
* *write.precision.mode:* specifies the mode of writing the resolution value into the IGES file.
|
||||
@@ -715,8 +720,8 @@ Default value is 0.0001.
|
||||
|
||||
Default values :
|
||||
~~~~~
|
||||
write.iges.resource.name - IGES,
|
||||
write.iges.sequence - ToIGES.
|
||||
write.iges.resource.name – IGES,
|
||||
write.iges.sequence – ToIGES.
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_iges_3_3_3 Performing the Open CASCADE Technology shape translation
|
||||
@@ -778,7 +783,7 @@ Translated objects depend on the write mode that you chose. If you chose the Fa
|
||||
| Geom_SurfaceOfRevolution | 120: Surface Of Revolution | |
|
||||
| Geom_OffsetSurface | 140: Offset Surface | |
|
||||
|
||||
@subsubsection occt_iges_3_4_3 Topological entities -- Translation in Face mode
|
||||
@subsubsection occt_iges_3_4_3 Topological entities - Translation in Face mode
|
||||
|
||||
| CASCADE shapes | IGES entity type | Comments |
|
||||
| :------------- | :--------------- | :------- |
|
||||
@@ -793,7 +798,7 @@ Translated objects depend on the write mode that you chose. If you chose the Fa
|
||||
| TopoDS_CompSolid | 402: Form 1 Group or no equivalent | Group is created only if *TopoDS_CompSolid* contains more than one *TopoDS_Solid*. One IGES entity is created per *TopoDS_Solid*. |
|
||||
| TopoDS_Compound | 402: Form 1 Group or no equivalent | Group is created only if *TopoDS_Compound* contains more than one item. One IGES entity is created per *TopoDS_Shape* in the *TopoDS_Compound*. If *TopoDS_Compound* is nested into another *TopoDS_Compound*, it is not mapped. |
|
||||
|
||||
@subsubsection occt_iges_3_4_4 Topological entities -- Translation in BRep mode
|
||||
@subsubsection occt_iges_3_4_4 Topological entities - Translation in BRep mode
|
||||
|
||||
| CASCADE shapes | IGES entity type | Comments |
|
||||
| :------------- | :--------------- | :------- |
|
||||
@@ -811,7 +816,7 @@ Translated objects depend on the write mode that you chose. If you chose the Fa
|
||||
@subsection occt_iges_3_5 Tolerance management
|
||||
@subsubsection occt_iges_3_5_1 Setting resolution in an IGES file
|
||||
|
||||
There are several possibilities to set resolution in an IGES file. They are controlled by write.precision.mode parameter; the dependence between the value of this parameter and the set resolution is described in paragraph @ref occt_iges_3_3_2 "Setting the translation parameters".
|
||||
There are several possibilities to set resolution in an IGES file. They are controlled by write.precision.mode parameter; the dependence between the value of this parameter and the set resolution is described in paragraph <a href="#occt_iges_3_3_2">Setting the translation parameters</a>.
|
||||
|
||||
If the value of parameter *write.precision.mode* is -1, 0 or 1, resolution is computed from tolerances of sub-shapes inside the shape to be translated. In this computation, only tolerances of *TopoDS_Edges* and *TopoDS_Vertices* participate since they reflect the accuracy of the shape. *TopoDS_Faces* are ignored in computations since their tolerances may have influence on resulting computed resolution while IGES resolution mainly concerns points and curves but not surfaces.
|
||||
|
||||
@@ -844,7 +849,7 @@ Standard_Integer main()
|
||||
~~~~~
|
||||
|
||||
|
||||
@section occt_iges_4 Using XSTEPDRAW
|
||||
@section occt_iges_4_ Using XSTEPDRAW
|
||||
|
||||
XSTEPDRAW UL is intended for creating executables for testing XSTEP interfaces interactively in the DRAW environment. It provides an additional set of DRAW commands specific for the data exchange tasks, which allow loading and writing data files and analysis of resulting data structures and shapes.
|
||||
|
||||
@@ -865,13 +870,13 @@ The third argument is used to set a new value of the given parameter. The resul
|
||||
During all interface operations, the protocol of the process (fail and warning messages, mapping of the loaded entities into OCCT shapes etc.) can be output to the trace file. Two parameters are defined in the DRAW session: trace level (integer value from 0 to 9, default is 0), and trace file (default is a standard output).
|
||||
|
||||
Command *xtrace* is intended to view and change these parameters:
|
||||
* *Draw> xtrace* -- prints current settings (e.g.: "Level=0 - Standard Output");
|
||||
* *Draw> xtrace #* -- sets the trace level to the value #;
|
||||
* *Draw> xtrace tracefile.log* -- sets the trace file as *tracefile.log*;
|
||||
* *Draw xtrace* -- directs all messages to the standard output.
|
||||
* *Draw> xtrace* - prints current settings (e.g.: "Level=0 - Standard Output");
|
||||
* *Draw> xtrace #* - sets the trace level to the value #;
|
||||
* *Draw> xtrace tracefile.log* - sets the trace file as *tracefile.log*;
|
||||
* *Draw xtrace* - directs all messages to the standard output.
|
||||
|
||||
@subsection occt_iges_4_3 Reading IGES files
|
||||
For a description of parameters used in reading an IGES file refer to @ref occt_iges_2_3_3 "Setting the translation parameters".
|
||||
For a description of parameters used in reading an IGES file refer to <a href="#occt_iges_2_3_3">Setting the translation parameters</a>.
|
||||
|
||||
These parameters are set by command *param* :
|
||||
|
||||
@@ -888,7 +893,7 @@ Loading is done by the command
|
||||
~~~~~
|
||||
Draw> xload <file_name>
|
||||
~~~~~
|
||||
Once the file is loaded, it is possible to investigate the structure of the loaded data. To learn how to do it see @ref occt_iges_4_4 "Analyzing the transferred".
|
||||
Once the file is loaded, it is possible to investigate the structure of the loaded data. To learn how to do it see <a href="#occt_iges_4_4">Analyzing the transferred</a>
|
||||
|
||||
Reading of an IGES file is done by the command
|
||||
~~~~~
|
||||
@@ -910,7 +915,7 @@ After the selected set of entities is loaded the user will be asked how loaded
|
||||
|
||||
The second parameter of the *igesbrep* command defines the name of the loaded shape. If several shapes are created, they will get indexed names. For instance, if the last parameter is ‘s’, they will be <i>s_1, ... s_N.</i>
|
||||
|
||||
<i>\<selection\></i> specifies the scope of selected entities in the model, it is *xst-transferrable-roots* by default. An asterisk “*” can be specified instead of *iges-visible-transf-roots*. For possible values of *selection* refer to @ref occt_iges_2_3_4 "Selecting entities" section.
|
||||
<i>\<selection\></i> specifies the scope of selected entities in the model, it is *xst-transferrable-roots* by default. An asterisk “*” can be specified instead of *iges-visible-transf-roots*. For possible values of *selection* refer to <a href="#occt_iges_2_3_4">Selecting entities</a> section.
|
||||
|
||||
|
||||
Instead of *igesbrep* it is possible to use commands:
|
||||
@@ -928,10 +933,10 @@ An asterisk “*” can be specified instead of *selection*, it means *xst-tran
|
||||
During the IGES translation, a map of correspondence between IGES entities and OCCT shapes is created.
|
||||
The following commands are available:
|
||||
|
||||
* *Draw> tpent \#* -- provides information on the result of translation of the given IGES entity;
|
||||
* *Draw> tpdraw \#* --creates an OCCT shape corresponding to an IGES entity;
|
||||
* *Draw> fromshape \<shape_name\>* -- provides the number of an IGES entity corresponding to an OCCT shape;
|
||||
* *Draw> tpclear* -- clears the map of correspondences between IGES entities and OCCT shapes.
|
||||
* *Draw> tpent \#* - provides information on the result of translation of the given IGES entity;
|
||||
* *Draw> tpdraw \#* - creates an OCCT shape corresponding to an IGES entity;
|
||||
* *Draw> fromshape \<shape_name\>* provides the number of an IGES entity corresponding to an OCCT shape;
|
||||
* *Draw> tpclear* clears the map of correspondences between IGES entities and OCCT shapes.
|
||||
|
||||
@subsection occt_iges_4_4 Analyzing the transferred data
|
||||
|
||||
@@ -980,9 +985,9 @@ Draw> givecount <selection_name> [<selection_name>]
|
||||
prints a number of loaded entities defined by <i>selection</i> argument.
|
||||
|
||||
Three commands are used to calculate statistics on the entities in the model:
|
||||
* *Draw> count \<counter\> [\<selection\> ...]* -- prints only a number of entities per each type matching the criteria defined by arguments.
|
||||
* *Draw> sumcount \<counter\> [\<selection\> ...]* -- prints the total number of entities of all types matching the criteria defined by arguments and the largest number corresponding to one type.
|
||||
* *Draw> listcount \<counter\> [\<selection\> ...]* -- prints a list of entities per each type matching the criteria defined by arguments.
|
||||
* *Draw> count \<counter\> [\<selection\> ...]* - prints only a number of entities per each type matching the criteria defined by arguments.
|
||||
* *Draw> sumcount \<counter\> [\<selection\> ...]* - prints the total number of entities of all types matching the criteria defined by arguments and the largest number corresponding to one type.
|
||||
* *Draw> listcount \<counter\> [\<selection\> ...]* prints a list of entities per each type matching the criteria defined by arguments.
|
||||
|
||||
Optional <i>\<selection\></i> argument, if specified, defines a subset of entities, which are to be taken into account. Argument <i>\<counter\></i> should be one of the currently defined counters:
|
||||
|
||||
@@ -1000,10 +1005,10 @@ gives a list of entity types which were encountered in the last loaded file (wi
|
||||
|
||||
Entities in the IGES file are numbered in the succeeding order. An entity can be identified either by its number (#) or by its label. Label is the letter ‘D’ followed by the index of the first line with the data for this entity in the Directory Entry section of the IGES file. The label can be calculated on the basis of the number as ‘D(2*# -1)’. For example, entity # 6 has label D11.
|
||||
|
||||
* *Draw> elab \#* -- provides a label for an entity with a known number;
|
||||
* *Draw> enum \#* -- prints a number for an entity with the given label;
|
||||
* *Draw> entity \# \<level_of_information\>* -- gives the content of an IGES entity;
|
||||
* *Draw> estat \#* -- provides the list of entities referenced by a given entity and the list of entities referencing to it.
|
||||
* *Draw> elab \#* - provides a label for an entity with a known number;
|
||||
* *Draw> enum \#* - prints a number for an entity with the given label;
|
||||
* *Draw> entity \# \<level_of_information\>* - gives the content of an IGES entity;
|
||||
* *Draw> estat \#* - provides the list of entities referenced by a given entity and the list of entities referencing to it.
|
||||
|
||||
@subsubsection occt_iges_4_4_2 Estimating the results of reading IGES
|
||||
All of the following commands are available only after the data are converted into OCCT shapes (i.e. after command **igesbrep**).
|
||||
@@ -1012,17 +1017,17 @@ All of the following commands are available only after the data are converted i
|
||||
Draw> tpstat [*|?]<symbol> [<selection>]
|
||||
~~~~~
|
||||
provides all statistics on the last transfer, including the list of transferred entities with mapping from IGES to OCCT types, as well as fail and warning messages. The parameter <i>\<symbol\></i> defines what information will be printed:
|
||||
* G -- General statistics (list of results and messages)
|
||||
* C -- Count of all warning and fail messages
|
||||
* C -- List of all warning and fail messages
|
||||
* F -- Count of all fail messages
|
||||
* F -- List of all fail messages
|
||||
* N -- List of all transferred roots
|
||||
* S -- The same, with types of source entity and result type
|
||||
* B -- The same, with messages
|
||||
* T -- Count of roots for geometrical types
|
||||
* R -- Count of roots for topological types
|
||||
* l -- The same, with a type of the source entity
|
||||
* G - General statistics (list of results and messages)
|
||||
* C - Count of all warning and fail messages
|
||||
* C - List of all warning and fail messages
|
||||
* F - Count of all fail messages
|
||||
* F - List of all fail messages
|
||||
* N - List of all transferred roots
|
||||
* S - The same, with types of source entity and result type
|
||||
* B - The same, with messages
|
||||
* T - Count of roots for geometrical types
|
||||
* R - Count of roots for topological types
|
||||
* l - The same, with a type of the source entity
|
||||
|
||||
The sign ‘*’ before the parameters **n**, **s**, **b**, **t**, **r** makes it work on all entities (not only on roots). The sign ‘?’ before **n**, **s**, **b**, **t** limits the scope of information to invalid entities.
|
||||
|
||||
@@ -1038,11 +1043,11 @@ The second version of the same command is TPSTAT (not capital spelling).
|
||||
Draw:> TPSTAT <symbol>
|
||||
~~~~~
|
||||
Symbol can be of the following values:
|
||||
* g -- General statistics (list of results and messages)
|
||||
* c -- Count of all warning and fail messages
|
||||
* C -- List of all warning and fail messages
|
||||
* r -- Count of resulting OCCT shapes per each type
|
||||
* s -- Mapping of IGES roots and resulting OCCT shapes
|
||||
* g - General statistics (list of results and messages)
|
||||
* c - Count of all warning and fail messages
|
||||
* C - List of all warning and fail messages
|
||||
* r - Count of resulting OCCT shapes per each type
|
||||
* s - Mapping of IGES roots and resulting OCCT shapes
|
||||
|
||||
Sometimes the trimming contours of IGES faces (i.e., entity 141 for 143, 142 for 144) can be lost during translation due to fails.
|
||||
|
||||
@@ -1083,14 +1088,14 @@ It outputs maximum, average and minimum values of tolerances for each kind of s
|
||||
When specifying *min* and *max* arguments this command outputs shapes with names <i>\<shape_name\>...</i> and their total number with tolerances in the range <i>[min, max]</i>.
|
||||
|
||||
<i>\<Symbol\></i> is used for specifying the kind of sub-shapes to analyze:
|
||||
* v -- for vertices,
|
||||
* e -- for edges,
|
||||
* f -- for faces,
|
||||
* c -- for shells and faces.
|
||||
* v - for vertices,
|
||||
* e - for edges,
|
||||
* f - for faces,
|
||||
* c - for shells and faces.
|
||||
|
||||
@subsection occt_iges_4_5 Writing an IGES file
|
||||
|
||||
Refer to @ref occt_iges_3_3_2 "Setting the translation parameters" for a description of parameters used in reading an IGES file. The parameters are set by command *param*:
|
||||
Refer to <a href="#occt_iges_3_3_2">Setting the translation parameters</a> for a description of parameters used in reading an IGES file. The parameters are set by command *param*:
|
||||
|
||||
| Description | Name | Values |
|
||||
| :----------- | :---- | :----- |
|
||||
@@ -1116,11 +1121,9 @@ Draw> writeall <filename.igs>
|
||||
~~~~~
|
||||
Allows writing the prepared model to a file with name *filename.igs*.
|
||||
|
||||
@section occt_iges_5 Reading from and writing to IGES
|
||||
@section occt_iges_5_ Reading from and writing to XDE
|
||||
|
||||
@subsection occt_iges_5_1 Reading from IGES
|
||||
|
||||
### Load an IGES file
|
||||
@subsection occt_iges_5_1 Loading an IGES file
|
||||
|
||||
Before performing any other operation, you must load an IGES file with:
|
||||
~~~~~
|
||||
@@ -1129,13 +1132,12 @@ IFSelect_ReturnStatus stat = reader.ReadFile(“filename.igs”);
|
||||
~~~~~
|
||||
Loading the file only memorizes, but does not translate the data.
|
||||
|
||||
### Check the loaded IGES file
|
||||
@subsection occt_iges_5_2 Checking the loaded IGES file
|
||||
|
||||
This step is not obligatory. See the description of @ref occt_iges_2_3_2 "Checking the IGES file" above.
|
||||
This step is not obligatory. See the description of this step <a href="#occt_iges_2_3_2"> above</a>.
|
||||
|
||||
### Set parameters for translation to XDE
|
||||
|
||||
See the description of @ref occt_iges_2_3_3 "Setting translation parameters" above.
|
||||
@subsection occt_iges_5_3 Setting parameters for translation to XDE
|
||||
See the description of this step <a href="#occt_iges_2_3_3"> above</a>.
|
||||
|
||||
In addition, the following parameters can be set for XDE translation of attributes:
|
||||
* For transferring colors:
|
||||
@@ -1148,24 +1150,19 @@ reader.SetColorMode(mode);
|
||||
reader.SetNameMode(mode);
|
||||
// mode can be Standard_True or Standard_False
|
||||
~~~~~
|
||||
|
||||
### Translate an IGES file to XDE
|
||||
|
||||
@subsection occt_iges_5_4 Performing the translation of an IGES file to XDE
|
||||
The following function performs a translation of the whole document:
|
||||
~~~~~
|
||||
Standard_Boolean ok = reader.Transfer(doc);
|
||||
~~~~~
|
||||
where *doc* is a variable which contains a handle to the output document and should have a type *Handle(TDocStd_Document)*.
|
||||
|
||||
|
||||
@subsection occt_iges_5_2 Writing to IGES
|
||||
|
||||
The translation from XDE to IGES can be initialized as follows:
|
||||
@subsection occt_iges_5_5 Initializing the process of translation from XDE to IGES
|
||||
The process can be initialized as follows:
|
||||
~~~~~
|
||||
IGESCAFControl_Writer aWriter(XSDRAW::Session(),Standard_False);
|
||||
~~~~~
|
||||
|
||||
### Set parameters for translation from XDE to IGES
|
||||
@subsection occt_iges_5_6 Setting parameters for translation from XDE to IGES
|
||||
|
||||
The following parameters can be set for translation of attributes to IGES:
|
||||
* For transferring colors:
|
||||
@@ -1178,8 +1175,7 @@ aWriter.SetColorMode(mode);
|
||||
aWriter.SetNameMode(mode);
|
||||
// mode can be Standard_True or Standard_False
|
||||
~~~~~
|
||||
|
||||
### Translate an XDE document to IGES
|
||||
@subsection occt_iges_5_7 Performing the translation of an XDE document to IGES
|
||||
|
||||
You can perform the translation of a document by calling the function:
|
||||
~~~~~
|
||||
@@ -1187,8 +1183,7 @@ IFSelect_ReturnStatus aRetSt = aWriter.Transfer(doc);
|
||||
~~~~~
|
||||
where "doc" is a variable which contains a handle to the input document for transferring and should have a type *Handle(TDocStd_Document)*.
|
||||
|
||||
### Write an IGES file
|
||||
|
||||
@subsection occt_iges_5_8 Writing an IGES file
|
||||
Write an IGES file with:
|
||||
~~~~~
|
||||
IFSelect_ReturnStatus statw = aWriter.WriteFile("filename.igs");
|
||||
|
@@ -230,10 +230,10 @@ as the left-hand side of the curve in relation to its orientation.
|
||||
This technique of qualification of a solution, in relation to the curves to which
|
||||
it is tangential, can be used in all algorithms for constructing a circle or a straight
|
||||
line by geometric constraints. Four qualifiers are used:
|
||||
* **Enclosing** -- the solution(s) must enclose the argument;
|
||||
* **Enclosed** -- the solution(s) must be enclosed by the argument;
|
||||
* **Outside** -- the solution(s) and the argument must be external to one another;
|
||||
* **Unqualified** -- the relative position is not qualified, i.e. all solutions apply.
|
||||
* **Enclosing** - the solution(s) must enclose the argument;
|
||||
* **Enclosed** - the solution(s) must be enclosed by the argument;
|
||||
* **Outside** - the solution(s) and the argument must be external to one another;
|
||||
* **Unqualified** - the relative position is not qualified, i.e. all solutions apply.
|
||||
|
||||
It is possible to create expressions using the qualifiers, for example:
|
||||
~~~~~
|
||||
@@ -588,9 +588,9 @@ The class *GeomFill_BoundWithSurf* allows defining a boundary for the surface to
|
||||
|
||||
The enumerations *FillingStyle* specify the styles used to build the surface. These include:
|
||||
|
||||
* *Stretch* -- the style with the flattest patches
|
||||
* *Coons* -- a rounded style with less depth than *Curved*
|
||||
* *Curved* -- the style with the most rounded patches.
|
||||
* *Stretch* - the style with the flattest patches
|
||||
* *Coons* - a rounded style with less depth than *Curved*
|
||||
* *Curved* - the style with the most rounded patches.
|
||||
|
||||
@image html /user_guides/modeling_algos/images/modeling_algos_image018.png "Intersecting filleted edges with different radii leave a gap, is filled by a surface"
|
||||
@image latex /user_guides/modeling_algos/images/modeling_algos_image018.png "Intersecting filleted edges with different radii leave a gap, is filled by a surface"
|
||||
@@ -1318,13 +1318,13 @@ If *BRepBuilderAPI_MakeEdge* is used as a class, it can provide two vertices. Th
|
||||
|
||||
The *Error* method returns a term of the *BRepBuilderAPI_EdgeError* enumeration. It can be used to analyze the error when *IsDone* method returns False. The terms are:
|
||||
|
||||
* **EdgeDone** -- No error occurred, *IsDone* returns True.
|
||||
* **PointProjectionFailed** -- No parameters were given, but the projection of the 3D points on the curve failed. This happens if the point distance to the curve is greater than the precision.
|
||||
* **ParameterOutOfRange** -- The given parameters are not in the range *C->FirstParameter()*, *C->LastParameter()*
|
||||
* **DifferentPointsOnClosedCurve** -- The two vertices or points have different locations but they are the extremities of a closed curve.
|
||||
* **PointWithInfiniteParameter** -- A finite coordinate point was associated with an infinite parameter (see the Precision package for a definition of infinite values).
|
||||
* **DifferentsPointAndParameter** -- The distance of the 3D point and the point evaluated on the curve with the parameter is greater than the precision.
|
||||
* **LineThroughIdenticPoints** -- Two identical points were given to define a line (construction of an edge without curve), *gp::Resolution* is used to test confusion .
|
||||
* **EdgeDone** - No error occurred, *IsDone* returns True.
|
||||
* **PointProjectionFailed** - No parameters were given, but the projection of the 3D points on the curve failed. This happens if the point distance to the curve is greater than the precision.
|
||||
* **ParameterOutOfRange** - The given parameters are not in the range *C->FirstParameter()*, *C->LastParameter()*
|
||||
* **DifferentPointsOnClosedCurve** - The two vertices or points have different locations but they are the extremities of a closed curve.
|
||||
* **PointWithInfiniteParameter** - A finite coordinate point was associated with an infinite parameter (see the Precision package for a definition of infinite values).
|
||||
* **DifferentsPointAndParameter** - The distance of the 3D point and the point evaluated on the curve with the parameter is greater than the precision.
|
||||
* **LineThroughIdenticPoints** - Two identical points were given to define a line (construction of an edge without curve), *gp::Resolution* is used to test confusion .
|
||||
|
||||
The following example creates a rectangle centered on the origin of dimensions H, L with fillets of radius R. The edges and the vertices are stored in the arrays *theEdges* and *theVertices*. We use class *Array1OfShape* (i.e. not arrays of edges or vertices). See the image below.
|
||||
|
||||
@@ -1541,11 +1541,11 @@ To add more than one wire an instance of the *BRepBuilderAPI_MakeFace* class ca
|
||||
|
||||
The *Error* method returns an error status, which is a term from the *BRepBuilderAPI_FaceError* enumeration.
|
||||
|
||||
* *FaceDone* -- no error occurred.
|
||||
* *NoFace* -- no initialization of the algorithm; an empty constructor was used.
|
||||
* *NotPlanar* -- no surface was given and the wire was not planar.
|
||||
* *CurveProjectionFailed* -- no curve was found in the parametric space of the surface for an edge.
|
||||
* *ParametersOutOfRange* -- the parameters *umin, umax, vmin, vmax* are out of the surface.
|
||||
* *FaceDone* - no error occurred.
|
||||
* *NoFace* - no initialization of the algorithm; an empty constructor was used.
|
||||
* *NotPlanar* - no surface was given and the wire was not planar.
|
||||
* *CurveProjectionFailed* - no curve was found in the parametric space of the surface for an edge.
|
||||
* *ParametersOutOfRange* - the parameters *umin, umax, vmin, vmax* are out of the surface.
|
||||
|
||||
@subsection occt_modalg_3_6 Wire
|
||||
The wire is a composite shape built not from a geometry, but by the assembly of edges. *BRepBuilderAPI_MakeWire* class can build a wire from one or more edges or connect new edges to an existing wire.
|
||||
@@ -1587,10 +1587,10 @@ return MW;
|
||||
BRepBuilderAPI_MakeWire class can return the last edge added to the wire (Edge method). This edge can be different from the original edge if it was copied.
|
||||
|
||||
The Error method returns a term of the *BRepBuilderAPI_WireError* enumeration:
|
||||
*WireDone* -- no error occurred.
|
||||
*EmptyWire* -- no initialization of the algorithm, an empty constructor was used.
|
||||
*DisconnectedWire* -- the last added edge was not connected to the wire.
|
||||
*NonManifoldWire* -- the wire with some singularity.
|
||||
*WireDone* - no error occurred.
|
||||
*EmptyWire* - no initialization of the algorithm, an empty constructor was used.
|
||||
*DisconnectedWire* - the last added edge was not connected to the wire.
|
||||
*NonManifoldWire* - the wire with some singularity.
|
||||
|
||||
@subsection occt_modalg_3_7 Shell
|
||||
The shell is a composite shape built not from a geometry, but by the assembly of faces.
|
||||
@@ -1744,10 +1744,10 @@ TopoDS_Solid S = BRepPrimAPI_MakeCone(R1,R2,H);
|
||||
@subsubsection occt_modalg_4_1_6 Sphere
|
||||
*BRepPrimAPI_MakeSphere* class allows creating spherical primitives. Like a cylinder, a sphere is created either in the default coordinate system or in a given coordinate system *gp_Ax2*. There are four constructions:
|
||||
|
||||
* From a radius -- builds a full sphere.
|
||||
* From a radius and an angle -- builds a lune (digon).
|
||||
* From a radius and two angles -- builds a wraparound spherical segment between two latitudes. The angles *a1* and *a2* must follow the relation: <i>PI/2 <= a1 < a2 <= PI/2 </i>.
|
||||
* From a radius and three angles -- a combination of two previous methods builds a portion of spherical segment.
|
||||
* From a radius - builds a full sphere.
|
||||
* From a radius and an angle - builds a lune (digon).
|
||||
* From a radius and two angles - builds a wraparound spherical segment between two latitudes. The angles *a1* and *a2* must follow the relation: <i>PI/2 <= a1 < a2 <= PI/2 </i>.
|
||||
* From a radius and three angles - a combination of two previous methods builds a portion of spherical segment.
|
||||
|
||||
The following code builds four spheres from a radius and three angles.
|
||||
|
||||
@@ -1769,10 +1769,10 @@ Note that we could equally well choose to create Shells instead of Solids.
|
||||
@subsubsection occt_modalg_4_1_7 Torus
|
||||
*BRepPrimAPI_MakeTorus* class allows creating toroidal primitives. Like the other primitives, a torus is created either in the default coordinate system or in a given coordinate system *gp_Ax2*. There are four constructions similar to the sphere constructions:
|
||||
|
||||
* Two radii -- builds a full torus.
|
||||
* Two radii and an angle -- builds an angular torus segment.
|
||||
* Two radii and two angles -- builds a wraparound torus segment between two radial planes. The angles a1, a2 must follow the relation 0 < a2 - a1 < 2*PI.
|
||||
* Two radii and three angles -- a combination of two previous methods builds a portion of torus segment.
|
||||
* Two radii - builds a full torus.
|
||||
* Two radii and an angle - builds an angular torus segment.
|
||||
* Two radii and two angles - builds a wraparound torus segment between two radial planes. The angles a1, a2 must follow the relation 0 < a2 - a1 < 2*PI.
|
||||
* Two radii and three angles - a combination of two previous methods builds a portion of torus segment.
|
||||
|
||||
@image html /user_guides/modeling_algos/images/modeling_algos_image032.png "Examples of Tori"
|
||||
@image latex /user_guides/modeling_algos/images/modeling_algos_image032.png "Examples of Tori"
|
||||
@@ -1819,9 +1819,9 @@ It is forbidden to sweep Solids and Composite Solids. A Compound generates a Co
|
||||
@image latex /user_guides/modeling_algos/images/modeling_algos_image033.png "Generating a sweep"
|
||||
|
||||
*BRepPrimAPI_MakeSweep class* is a deferred class used as a root of the the following sweep classes:
|
||||
* *BRepPrimAPI_MakePrism* -- produces a linear sweep
|
||||
* *BRepPrimAPI_MakeRevol* -- produces a rotational sweep
|
||||
* *BRepPrimAPI_MakePipe* -- produces a general sweep.
|
||||
* *BRepPrimAPI_MakePrism* - produces a linear sweep
|
||||
* *BRepPrimAPI_MakeRevol* - produces a rotational sweep
|
||||
* *BRepPrimAPI_MakePipe* - produces a general sweep.
|
||||
|
||||
|
||||
@subsubsection occt_modalg_4_2_2 Prism
|
||||
@@ -2588,7 +2588,7 @@ TopoDS_Shape res1 = MKPipe.Shape();
|
||||
|
||||
Mechanical features include ribs, protrusions and grooves (or slots), depressions along planar (linear) surfaces or revolution surfaces.
|
||||
|
||||
The semantics of mechanical features is built around giving thickness to a contour. This thickness can either be symmetrical -- on one side of the contour -- or dissymmetrical -- on both sides. As in the semantics of form features, the thickness is defined by construction of shapes in specific contexts.
|
||||
The semantics of mechanical features is built around giving thickness to a contour. This thickness can either be symmetrical - on one side of the contour - or dissymmetrical - on both sides. As in the semantics of form features, the thickness is defined by construction of shapes in specific contexts.
|
||||
|
||||
The development contexts differ, however, in the case of mechanical features.
|
||||
Here they include extrusion:
|
||||
@@ -2690,9 +2690,9 @@ The class *BRepFeat_SplitShape* is used to split faces of a shape into wires or
|
||||
|
||||
The class is created or initialized from a shape (the basic shape).
|
||||
Three Add methods are available:
|
||||
* *Add(Wire, Face)* -- adds a new wire on a face of the basic shape.
|
||||
* *Add(Edge, Face)* -- adds a new edge on a face of the basic shape.
|
||||
* *Add(EdgeNew, EdgeOld)* -- adds a new edge on an existing one (the old edge must contain the new edge).
|
||||
* *Add(Wire, Face)* - adds a new wire on a face of the basic shape.
|
||||
* *Add(Edge, Face)* - adds a new edge on a face of the basic shape.
|
||||
* *Add(EdgeNew, EdgeOld)* - adds a new edge on an existing one (the old edge must contain the new edge).
|
||||
|
||||
**Note** The added wires and edges must define closed wires on faces or wires located between two existing edges. Existing edges must not be intersected.
|
||||
|
||||
@@ -2903,7 +2903,7 @@ const Standard_Real anAngularDeflection = 0.5;
|
||||
BRepMesh_IncrementalMesh aMesh(aShape, aLinearDeflection, Standard_False, anAngularDeflection);
|
||||
~~~~~
|
||||
|
||||
The default meshing algorithm *BRepMesh_IncrementalMesh* has two major options to define triangulation -- linear and angular deflections.
|
||||
The default meshing algorithm *BRepMesh_IncrementalMesh* has two major options to define triangulation – linear and angular deflections.
|
||||
|
||||
At the first step all edges from a face are discretized according to the specified parameters.
|
||||
|
||||
|