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

Compare commits

..

1 Commits

Author SHA1 Message Date
ski
8edd338e20 0028457: OpenCASCADE CMake compile definitions conflict with API of others libraries
Renamed HAVE_* definitions during OCCT installation.
2017-08-28 11:19:55 +03:00
499 changed files with 5382 additions and 21794 deletions

View File

@@ -515,7 +515,6 @@ endif()
# VTK
if (USE_VTK)
add_definitions (-DHAVE_VTK)
set (OCCT_VTK_USED_TARGETS "" CACHE INTERNAL "" FORCE)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vtk")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_VTK")
@@ -656,13 +655,11 @@ if (CAN_USE_EIGEN)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/eigen")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EIGEN")
OCCT_CHECK_AND_UNSET ("INSTALL_EIGEN")
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_EIGEN")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EIGEN")
OCCT_CHECK_AND_UNSET ("INSTALL_EIGEN")
endif()
# Doxygen
@@ -873,22 +870,6 @@ else()
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}")
endif()
if (WIN32)
set (THIRDPARTY_DIR_REPLACE "%THIRDPARTY_DIR%")
else()
set (THIRDPARTY_DIR_REPLACE "\${THIRDPARTY_DIR}")
endif()
get_cmake_property(USED_3RDPARTY_CACHE_VARIABLES VARIABLES)
string (REGEX MATCHALL "(^|;)USED_3RDPARTY_[^;]+_DIR[^;]*" USED_3RDPARTY_CACHE_VARIABLES "${USED_3RDPARTY_CACHE_VARIABLES}")
file (TO_CMAKE_PATH "${3RDPARTY_DIR}" 3RDPARTY_DIR)
foreach (USED_3RDPARTY_CACHE_VARIABLE ${USED_3RDPARTY_CACHE_VARIABLES})
file (TO_CMAKE_PATH "${${USED_3RDPARTY_CACHE_VARIABLE}}" ${USED_3RDPARTY_CACHE_VARIABLE})
string (REPLACE "${3RDPARTY_DIR}" "${THIRDPARTY_DIR_REPLACE}" ${USED_3RDPARTY_CACHE_VARIABLE} "${${USED_3RDPARTY_CACHE_VARIABLE}}")
if (NOT WIN32)
string (REGEX REPLACE ";" ":" ${USED_3RDPARTY_CACHE_VARIABLE} "${${USED_3RDPARTY_CACHE_VARIABLE}}")
endif()
endforeach()
# 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_DIR_SCRIPT}")
@@ -1046,6 +1027,10 @@ foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})
string (TOUPPER "${OCCT_CONFIGURATION}" OCCT_CONFIGURATION_UPPER)
string (TOLOWER "${OCCT_CONFIGURATION}" OCCT_CONFIGURATION_LOWER)
foreach(COMPILE_DEFINITION ${OCCT_COMPILE_DEFINITIONS})
string (REGEX MATCH "^HAVE_.+" ISHAVE "${COMPILE_DEFINITION}")
if (ISHAVE)
set (COMPILE_DEFINITION "OPENCASCADE_${COMPILE_DEFINITION}")
endif()
string(REPLACE "(" "\\(" COMPILE_DEFINITION "${COMPILE_DEFINITION}")
string(REPLACE ")" "\\)" COMPILE_DEFINITION "${COMPILE_DEFINITION}")
set (SET_OpenCASCADE_COMPILE_DEFINITIONS "${SET_OpenCASCADE_COMPILE_DEFINITIONS}set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:${OCCT_CONFIGURATION}>:${COMPILE_DEFINITION}>)\n")

View File

@@ -1,9 +1,5 @@
# eigen
if (NOT DEFINED INSTALL_EIGEN)
set (INSTALL_EIGEN OFF CACHE BOOL "${INSTALL_EIGEN_DESCR}")
endif()
# eigen directory
if (NOT DEFINED 3RDPARTY_EIGEN_DIR)
set (3RDPARTY_EIGEN_DIR "" CACHE PATH "The directory containing eigen")
@@ -65,18 +61,6 @@ endif()
if (3RDPARTY_EIGEN_INCLUDE_DIR AND EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
# Install header files
if (INSTALL_EIGEN)
file(GLOB EIGEN_SUBDIRS "${3RDPARTY_EIGEN_INCLUDE_DIR}/*")
foreach(SUBDIR ${EIGEN_SUBDIRS})
if(IS_DIRECTORY "${SUBDIR}")
install (DIRECTORY "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
else()
install (FILES "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
endif()
endforeach()
endif()
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_EIGEN_INCLUDE_DIR)

View File

@@ -8,7 +8,7 @@ if (NOT DEFINED 3RDPARTY_FFMPEG_DIR)
set (3RDPARTY_FFMPEG_DIR "" CACHE PATH "The directory containing FFmpeg")
endif()
# include occt macros. compiler_bitness, os_with_bit, compiler
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify FFMPEG folder in connection with 3RDPARTY_DIR
@@ -27,52 +27,49 @@ if (NOT DEFINED 3RDPARTY_FFMPEG_INCLUDE_DIR)
set (3RDPARTY_FFMPEG_INCLUDE_DIR "" CACHE PATH "the path of headers directory")
endif()
separate_arguments (CSF_FFmpeg)
foreach (LIBRARY_NAME ${CSF_FFmpeg})
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} OR NOT 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "FFmpeg framework (${LIBRARY_NAME})" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY OR NOT 3RDPARTY_FFMPEG_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_FFMPEG_LIBRARY_DIR}")
set (3RDPARTY_FFMPEG_LIBRARY "" CACHE FILEPATH "FFmpeg framework" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME})
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg framework (${LIBRARY_NAME})")
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY_DIR)
set (3RDPARTY_FFMPEG_LIBRARY_DIR "" CACHE PATH "The directory containing FFmpeg framework")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL OR NOT 3RDPARTY_FFMPEG_DLL_DIR OR NOT EXISTS "${3RDPARTY_FFMPEG_DLL_DIR}")
set (3RDPARTY_FFMPEG_DLL "" CACHE FILEPATH "FFmpeg shared libraries" FORCE)
endif()
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL_DIR)
set (3RDPARTY_FFMPEG_DLL_DIR "" CACHE PATH "The directory containing FFmpeg shared libraries")
endif()
endif()
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_INCLUDE_DIR PATH "the path to FFmpeg")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_LIBRARY FILEPATH "the path to FFmpeg framework")
if (3RDPARTY_FFMPEG_LIBRARY AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY}")
get_filename_component (3RDPARTY_FFMPEG_LIBRARY_DIR "${3RDPARTY_FFMPEG_LIBRARY}" PATH)
set (3RDPARTY_FFMPEG_LIBRARY_DIR "${3RDPARTY_FFMPEG_LIBRARY_DIR}" CACHE PATH "The directory containing FFmpeg libraries" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_LIBRARY_DIR PATH "The directory containing FFmpeg libraries")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} OR NOT 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "" CACHE FILEPATH "FFmpeg shared libraries (${LIBRARY_NAME})" FORCE)
endif()
endif()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_DLL FILEPATH "the path to FFmpeg shared libraries")
if (WIN32)
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME})
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg shared libraries (${LIBRARY_NAME})")
endif()
endif()
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_INCLUDE_DIR PATH "the path to FFmpeg")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} FILEPATH "the path to FFmpeg framework (${LIBRARY_NAME})")
if (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
if (3RDPARTY_FFMPEG_DLL AND EXISTS "${3RDPARTY_FFMPEG_DLL}")
get_filename_component (3RDPARTY_FFMPEG_DLL_DIR "${3RDPARTY_FFMPEG_DLL}" PATH)
set (3RDPARTY_FFMPEG_DLL_DIR "${3RDPARTY_FFMPEG_DLL_DIR}" CACHE PATH "The directory containing FFmpeg shared libraries" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} PATH "The directory containing FFmpeg library (${LIBRARY_NAME})")
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} FILEPATH "the path to FFmpeg shared library (${LIBRARY_NAME})")
if (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg shared library (${LIBRARY_NAME})" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} PATH "The directory containing FFmpeg shared library (${LIBRARY_NAME})")
endif()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_DLL_DIR PATH "The directory containing FFmpeg shared libraries")
endif()
endif()
endforeach()
endif()
# header
if (NOT 3RDPARTY_FFMPEG_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_FFMPEG_INCLUDE_DIR}")
@@ -102,132 +99,130 @@ else()
set (3RDPARTY_FFMPEG_INCLUDE_DIR "" CACHE FILEPATH "the path to avutil.h" FORCE)
endif()
# libraries
foreach (LIBRARY_NAME ${CSF_FFmpeg})
if (NOT 3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
# library
if (NOT 3RDPARTY_FFMPEG_LIBRARY OR NOT EXISTS "${3RDPARTY_FFMPEG_LIBRARY}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
set (FFMPEG_PATH_SUFFIXES lib)
if (ANDROID)
set (FFMPEG_PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES} libs/${ANDROID_ABI})
elseif(APPLE)
set (FFMPEG_PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES} Frameworks)
endif()
# set 3RDPARTY_FFMPEG_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FFMPEG_LIBRARY
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}-NOTFOUND" CACHE FILEPATH "The path to FFmpeg library (${LIBRARY_NAME})" FORCE)
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
find_library (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} NAMES ${LIBRARY_NAME}
PATHS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" "${3RDPARTY_FFMPEG_DIR}"
PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} NAMES ${LIBRARY_NAME}
PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
else()
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
endif()
set (FFMPEG_PATH_SUFFIXES lib)
if (ANDROID)
set (FFMPEG_PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES} libs/${ANDROID_ABI})
elseif(APPLE)
set (FFMPEG_PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES} Frameworks)
endif()
if (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
# set 3RDPARTY_FFMPEG_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FFMPEG_LIBRARY
set (3RDPARTY_FFMPEG_LIBRARY "3RDPARTY_FFMPEG_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to FFmpeg library" FORCE)
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
find_library (3RDPARTY_FFMPEG_LIBRARY NAMES avutil
PATHS "${3RDPARTY_FFMPEG_LIBRARY_DIR}" "${3RDPARTY_FFMPEG_DIR}"
PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME})
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "The path to FFmpeg library (${LIBRARY_NAME})" FORCE)
find_library (3RDPARTY_FFMPEG_LIBRARY NAMES avutil
PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
# shared library
if (3RDPARTY_FFMPEG_LIBRARY AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY}")
get_filename_component (3RDPARTY_FFMPEG_LIBRARY_DIR "${3RDPARTY_FFMPEG_LIBRARY}" PATH)
set (3RDPARTY_FFMPEG_LIBRARY_DIR "${3RDPARTY_FFMPEG_LIBRARY_DIR}" CACHE PATH "The directory containing FFmpeg library" FORCE)
else()
set (3RDPARTY_FFMPEG_LIBRARY_DIR "" CACHE PATH "The directory containing FFmpeg library" FORCE)
endif()
endif()
if (3RDPARTY_FFMPEG_LIBRARY_DIR AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_DIR}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FFMPEG_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FFMPEG_LIBRARY_DIR)
set (3RDPARTY_FFMPEG_LIBRARY "" CACHE FILEPATH "The path to FFmpeg library" FORCE)
endif()
# shared library
if (WIN32)
if (NOT 3RDPARTY_FFMPEG_DLL OR NOT EXISTS "${3RDPARTY_FFMPEG_DLL}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
set (3RDPARTY_FFMPEG_DLL "3RDPARTY_FFMPEG_DLL-NOTFOUND" CACHE FILEPATH "The path to FFmpeg shared library" FORCE)
# find FFmpeg shared library
file (GLOB 3RDPARTY_FFMPEG_DLL "${3RDPARTY_FFMPEG_DIR}/bin/avutil[-][0-9]*")
if (3RDPARTY_FFMPEG_DLL AND EXISTS "${3RDPARTY_FFMPEG_DLL}")
set (3RDPARTY_FFMPEG_DLL "${3RDPARTY_FFMPEG_DLL}" CACHE FILEPATH "FFmpeg shared library" FORCE)
get_filename_component (3RDPARTY_FFMPEG_DLL_DIR "${3RDPARTY_FFMPEG_DLL}" PATH)
set (3RDPARTY_FFMPEG_DLL_DIR "${3RDPARTY_FFMPEG_DLL_DIR}" CACHE PATH "The directory containing FFmpeg library" FORCE)
else()
set (3RDPARTY_FFMPEG_DLL_DIR "" CACHE PATH "The directory containing FFmpeg shared library" FORCE)
endif()
endif()
if (3RDPARTY_FFMPEG_DLL_DIR OR EXISTS "${3RDPARTY_FFMPEG_DLL_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FFMPEG_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FFMPEG_DLL_DIR)
endif()
endif()
# install instructions
if (INSTALL_FFMPEG)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
if (NOT 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
set (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}-NOTFOUND" CACHE FILEPATH "The path to FFmpeg shared library (${LIBRARY_NAME})" FORCE)
# find FFmpeg shared library
file (GLOB 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DIR}/bin/${LIBRARY_NAME}[-][0-9]*")
if (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}")
set (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" CACHE FILEPATH "FFmpeg shared library (${LIBRARY_NAME})" FORCE)
get_filename_component (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
else()
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg shared library (${LIBRARY_NAME})" FORCE)
endif()
endif()
if (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} OR EXISTS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
if (DEFINED INSTALL_BIN_DIR)
install (FILES "${3RDPARTY_FFMPEG_DLL}" DESTINATION "${INSTALL_BIN_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME})
install (FILES "${3RDPARTY_FFMPEG_DLL}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (FILES "${3RDPARTY_FFMPEG_DLL}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (FILES "${3RDPARTY_FFMPEG_DLL}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
endif()
endif()
# install instructions
if (INSTALL_FFMPEG)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
if (DEFINED INSTALL_BIN_DIR)
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" DESTINATION "${INSTALL_BIN_DIR}")
else()
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
endif()
else()
get_filename_component(3RDPARTY_FFMPEG_LIBRARY_ABS ${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}} REALPATH)
get_filename_component(3RDPARTY_FFMPEG_LIBRARY_NAME ${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}} NAME)
if (DEFINED INSTALL_LIB_DIR)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
DESTINATION "${INSTALL_LIB_DIR}"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
else()
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
endif()
endif()
set (USED_3RDPARTY_FFMPEG_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_FFMPEG_DIR ${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}})
get_filename_component(3RDPARTY_FFMPEG_LIBRARY_ABS ${3RDPARTY_FFMPEG_LIBRARY} REALPATH)
get_filename_component(3RDPARTY_FFMPEG_LIBRARY_NAME ${3RDPARTY_FFMPEG_LIBRARY} NAME)
if (DEFINED INSTALL_LIB_DIR)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
DESTINATION "${INSTALL_LIB_DIR}"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
else()
set (USED_3RDPARTY_FFMPEG_DIR ${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}})
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
endif()
endif()
mark_as_advanced (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME})
endforeach()
set (USED_3RDPARTY_FFMPEG_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_FFMPEG_DIR ${3RDPARTY_FFMPEG_DLL_DIR})
else()
set (USED_3RDPARTY_FFMPEG_DIR ${3RDPARTY_FFMPEG_LIBRARY_DIR})
endif()
endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET (FFMPEG_INCLUDE_DIRS)
OCCT_CHECK_AND_UNSET (FFMPEG_LIBRARY_DIRS)
OCCT_CHECK_AND_UNSET (FFMPEG_DIR)
mark_as_advanced (3RDPARTY_FFMPEG_LIBRARY 3RDPARTY_FFMPEG_DLL)

View File

@@ -35,11 +35,7 @@ endif()
if (USE_FREEIMAGE)
set (CSF_FreeImagePlus "freeimage")
else()
if (WIN32)
set (CSF_FreeImagePlus "windowscodecs")
else()
set (CSF_FreeImagePlus)
endif()
set (CSF_FreeImagePlus)
endif()
# TCL/TK
@@ -79,7 +75,7 @@ if (WIN32)
set (CSF_OpenGlLibs "opengl32.lib")
endif()
else()
else()
if (APPLE)
set (CSF_objc "objc")
@@ -112,6 +108,5 @@ else()
set (CSF_OpenGlLibs "GL")
set (CSF_XwLibs "X11 Xext Xmu Xi")
set (CSF_dl "dl")
set (CSF_fontconfig "fontconfig")
endif()
endif()

View File

@@ -213,9 +213,6 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
if (NOT "${TK_FOUND}" STREQUAL "" OR NOT "${VTK_FOUND}" STREQUAL "")
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
if (NOT "${VTK_FOUND}" STREQUAL "" AND BUILD_SHARED_LIBS AND INSTALL_VTK AND COMMAND OCCT_INSTALL_VTK)
OCCT_INSTALL_VTK(${USED_ITEM})
endif()
else()
string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM})
if ("${CSF_FOUND}" STREQUAL "")

View File

@@ -245,9 +245,6 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
if (NOT "${TK_FOUND}" STREQUAL "" OR NOT "${VTK_FOUND}" STREQUAL "")
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
if (NOT "${VTK_FOUND}" STREQUAL "" AND BUILD_SHARED_LIBS AND INSTALL_VTK AND COMMAND OCCT_INSTALL_VTK)
OCCT_INSTALL_VTK(${USED_ITEM})
endif()
else()
string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM})
if ("${CSF_FOUND}" STREQUAL "")

View File

@@ -84,7 +84,6 @@ INSTALL_MESSAGE (INSTALL_TEST_CASES "non-regression OCCT test scripts")
INSTALL_MESSAGE (INSTALL_DOC_Overview "OCCT overview documentation (HTML format)")
INSTALL_MESSAGE (INSTALL_FFMPEG "FFmpeg binaries")
INSTALL_MESSAGE (INSTALL_FREEIMAGE "FreeImage binaries")
INSTALL_MESSAGE (INSTALL_EIGEN "EIGEN header files")
INSTALL_MESSAGE (INSTALL_EGL "EGL binaries")
INSTALL_MESSAGE (INSTALL_GLES2 "OpenGL ES 2.0 binaries")
INSTALL_MESSAGE (INSTALL_FREETYPE "FreeType binaries")
@@ -92,7 +91,8 @@ INSTALL_MESSAGE (INSTALL_GL2PS "GL2PS binaries")
INSTALL_MESSAGE (INSTALL_TBB "TBB binaries")
INSTALL_MESSAGE (INSTALL_TCL "TCL binaries")
INSTALL_MESSAGE (INSTALL_TK "TK binaries")
INSTALL_MESSAGE (INSTALL_VTK "VTK binaries ")
#INSTALL_MESSAGE (INSTALL_VTK "VTK binaries ")
# build variables
macro (BUILD_MODULE_MESSAGE BUILD_MODULE_TARGET_VARIABLE BUILD_MODULE_TARGET_STRING)

View File

@@ -1,8 +1,8 @@
# vtk
if (NOT DEFINED INSTALL_VTK)
set (INSTALL_VTK OFF CACHE BOOL "${INSTALL_VTK_DESCR}")
endif()
#if (NOT DEFINED INSTALL_VTK)
# set (INSTALL_VTK OFF CACHE BOOL "${INSTALL_VTK_DESCR}")
#endif()
# vtk directory
if (NOT DEFINED 3RDPARTY_VTK_DIR)
@@ -210,86 +210,11 @@ if (BUILD_SHARED_LIBS)
endif()
endif()
# Install vtk library using vtk targets
macro (OCCT_INSTALL_VTK VTK_LIBRARY_NAME)
# Check that input library name contains "vtk" prefix
string (REGEX MATCH "^vtk" IS_VTK_LIBRARY ${VTK_LIBRARY_NAME})
# Check that input library was not already installed
list (FIND OCCT_VTK_USED_TARGETS ${VTK_LIBRARY_NAME} VTK_LIBRARY_IS_USED)
if (BUILD_SHARED_LIBS AND INSTALL_VTK AND TARGET ${VTK_LIBRARY_NAME} AND VTK_LIBRARY_IS_USED EQUAL -1 AND IS_VTK_LIBRARY)
OCCT_MAKE_OS_WITH_BITNESS()
# Get configuration of vtk
get_target_property (TARGET_VTK_IMPORT_CONFS ${VTK_LIBRARY_NAME} IMPORTED_CONFIGURATIONS)
list (GET TARGET_VTK_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
# Get dependencies for current input library
get_property(VTK_LIBRARY_PATH TARGET ${VTK_LIBRARY_NAME} PROPERTY LOCATION)
get_property(VTK_DEPEND TARGET ${VTK_LIBRARY_NAME} PROPERTY IMPORTED_LINK_DEPENDENT_LIBRARIES_${CHOSEN_IMPORT_CONF})
get_property(VTK_IMPORTED_INTERFACE TARGET ${VTK_LIBRARY_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF})
get_property(VTK_INTERFACE TARGET ${VTK_LIBRARY_NAME} PROPERTY INTERFACE_LINK_LIBRARIES)
list (APPEND VTK_DEPEND ${VTK_INTERFACE} ${VTK_IMPORTED_INTERFACE})
# Install
if (WIN32)
if (SINGLE_GENERATOR)
install (FILES "${VTK_LIBRARY_PATH}" DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES "${VTK_LIBRARY_PATH}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES "${VTK_LIBRARY_PATH}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES "${VTK_LIBRARY_PATH}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_VTK_LIBRARY_ABS ${VTK_LIBRARY_PATH} REALPATH)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
DESTINATION "${INSTALL_DIR_LIB}")
else()
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}")
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i")
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d")
endif()
endif()
set (USED_3RDPARTY_VTK_DIR "")
# Mark current library as already installed
list (APPEND OCCT_VTK_USED_TARGETS ${VTK_LIBRARY_NAME})
set (OCCT_VTK_USED_TARGETS "${OCCT_VTK_USED_TARGETS}" CACHE INTERNAL "" FORCE)
# Recursively install all depended libraries
foreach(VTK_TARGET ${VTK_DEPEND})
OCCT_INSTALL_VTK(${VTK_TARGET})
endforeach()
endif()
endmacro()
if (NOT BUILD_SHARED_LIBS)
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_DLL_DIR)
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_LIBRARY_DIR)
OCCT_CHECK_AND_UNSET(INSTALL_VTK)
endif()
# the library directory for using by the executable
if (NOT INSTALL_VTK)
if (WIN32)
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_DLL_DIR})
else()
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_LIBRARY_DIR})
endif()
if (WIN32)
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_DLL_DIR})
else()
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_LIBRARY_DIR})
endif()
OCCT_CHECK_AND_UNSET (VTK_INCLUDE_DIRS)

View File

@@ -1312,8 +1312,6 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
} else {
set aLibsMap(CSF_FreeImagePlus) "freeimage"
}
} elseif { "$theOS" == "wnt" } {
set aLibsMap(CSF_FreeImagePlus) "windowscodecs"
}
if { "$::HAVE_FFMPEG" == "true" } {
set aLibsMap(CSF_FFmpeg) "avcodec avformat swscale avutil"
@@ -1375,7 +1373,6 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
set aLibsMap(CSF_TclTkLibs) ""
set aLibsMap(CSF_QT) "QtCore QtGui"
} else {
set aLibsMap(CSF_fontconfig) "fontconfig"
if { "$theOS" == "qnx" } {
# CSF_ThreadLibs - pthread API is part of libc on QNX
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"

View File

@@ -24,15 +24,18 @@ if /I "%VCVER%" == "@COMPILER@" (
set "TCL_VERSION_WITH_DOT=@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
set "TK_VERSION_WITH_DOT=@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
set "CSF_OCCTBinPath=%CASROOT%/@INSTALL_DIR_BIN@%3"
set "CSF_OCCTLibPath=%CASROOT%/@INSTALL_DIR_LIB@%3"
set "CSF_OCCTBinPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_BIN@%3"
set "CSF_OCCTLibPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_LIB@%3"
set "CSF_OCCTIncludePath=%CASROOT%/@INSTALL_DIR_INCLUDE@"
set "CSF_OCCTResourcePath=%CASROOT%/@INSTALL_DIR_RESOURCE@"
set "CSF_OCCTDataPath=%CASROOT%/@INSTALL_DIR_DATA@"
set "CSF_OCCTSamplesPath=%CASROOT%/@INSTALL_DIR_SAMPLES@"
set "CSF_OCCTTestsPath=%CASROOT%/@INSTALL_DIR_TESTS@"
set "CSF_OCCTDocPath=%CASROOT%/@INSTALL_DIR_DOC@"
set "CSF_OCCTIncludePath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_INCLUDE@"
set "CSF_OCCTResourcePath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_RESOURCE@"
set "CSF_OCCTDataPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_DATA@"
set "CSF_OCCTSamplesPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SAMPLES@"
set "CSF_OCCTTestsPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_TESTS@"
set "CSF_OCCTDocPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_DOC@"
rem for compatability with external application using CASROOT
set "CASROOT=@INSTALL_DIR_ABSOLUTE@"
)
)

View File

@@ -21,14 +21,17 @@ if [ "$1" == "@BIN_LETTER@" ]; then
export TCL_VERSION_WITH_DOT="@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
export TK_VERSION_WITH_DOT="@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
export CSF_OCCTBinPath="${CASROOT}/@INSTALL_DIR_BIN@"
export CSF_OCCTLibPath="${CASROOT}/@INSTALL_DIR_LIB@"
export CSF_OCCTIncludePath="${CASROOT}/@INSTALL_DIR_INCLUDE@"
export CSF_OCCTResourcePath="${CASROOT}/@INSTALL_DIR_RESOURCE@"
export CSF_OCCTDataPath="${CASROOT}/@INSTALL_DIR_DATA@"
export CSF_OCCTSamplesPath="${CASROOT}/@INSTALL_DIR_SAMPLES@"
export CSF_OCCTTestsPath="${CASROOT}/@INSTALL_DIR_TESTS@"
export CSF_OCCTDocPath="${CASROOT}/@INSTALL_DIR_DOC@"
export CSF_OCCTBinPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_BIN@"
export CSF_OCCTLibPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_LIB@"
export CSF_OCCTIncludePath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_INCLUDE@"
export CSF_OCCTResourcePath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_RESOURCE@"
export CSF_OCCTDataPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_DATA@"
export CSF_OCCTSamplesPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SAMPLES@"
export CSF_OCCTTestsPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_TESTS@"
export CSF_OCCTDocPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_DOC@"
# for compatability with external application using CASROOT
export CASROOT="@INSTALL_DIR_ABSOLUTE@"
fi
fi

View File

@@ -31,14 +31,14 @@ set "CSF_OPT_LIB64="
set "CSF_OPT_BIN32="
set "CSF_OPT_BIN64="
rem ----- Load local settings -----
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 ----- Load local settings -----
if exist "%CASROOT%\custom.bat" (
call "%CASROOT%\custom.bat" %1 %2 %3 %4 %5
)
rem ----- Read script arguments (override local settings) -----
if not ["%1"] == [""] set "VCVER=%1"
if not ["%2"] == [""] set "ARCH=%2"
@@ -49,33 +49,8 @@ if /I ["%3"] == ["d"] set "CASDEB=d"
if /I ["%3"] == ["i"] set "CASDEB=i"
if /I ["%3"] == ["relwithdeb"] set "CASDEB=i"
rem Decode VCVER variable and define related ones:
rem
rem VCFMT - "vc" followed by full version number of Visual Studio toolset
rem (same as VCVER without optional suffix "-uwp")
rem VCLIB - name of folder contining binaries
rem (same as VCVER except without third version in number)
rem VCPROP - name of required Visual Studion Workload (starting with VS 2017)
rem
rem Note that for VS before 2015 (vc14) always
rem VCFMT=VCLIB=VCVER and VCPROP=NativeDesktop
rem Since VS 2017, environment variables like VS100COMNTOOLS are not defined
rem any more, we can only use vswhere.exe tool to find Visual Studio.
rem Add path to vswhere.exe
set "PATH=%PATH%;%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
rem for vc10-12, interpretation is trivial
set VCFMT=%VCVER%
set VCLIB=%VCVER:~0,4%
set VCPROP=NativeDesktop
rem vc14 and later can have optional suffix "-uwp"
if "%VCVER:~-4%" == "-uwp" (
set VCFMT=%VCVER:~0,-4%
set VCLIB=%VCLIB%-uwp
set VCPROP=Universal
)
rem echo VCVER=%VCVER% VCFMT=%VCFMT% VCLIB=%VCLIB% VCPROP=%VCPROP%
rem Decode VCVER
call "%~dp0adm\vcver.bat"
rem ----- Parsing of Visual Studio platform -----
set "VisualStudioExpressName=VCExpress"
@@ -98,8 +73,6 @@ if not "%DevEnvDir%" == "" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[15.0,15.99]" -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "DevEnvDir=%%i\Common7\IDE\"
)
) else if /I "%VCFMT%" == "gcc" (
rem MinGW
) else (
echo Error: wrong VS identifier
exit /B
@@ -123,8 +96,6 @@ if /I "%VCFMT%" == "vc10" (
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
set "VCPlatformToolSet=v141"
) else if /I "%VCFMT%" == "gcc" (
rem MinGW
) else (
echo Error: first argument ^(%VCVER%^) should specify supported version of Visual C++,
echo one of: vc10 ^(VS 2010 SP3^), vc11 ^(VS 2012 SP3^), vc12 ^(VS 2013^) or vc14 ^(VS 2015^)

View File

@@ -31,9 +31,7 @@ rem VCFMT=VCLIB=VCVER and VCPROP=NativeDesktop
rem Since VS 2017, environment variables like VS100COMNTOOLS are not defined
rem any more, we can only use vswhere.exe tool to find Visual Studio.
rem Add path to vswhere.exe
if /I not "%VCFMT%" == "gcc" (
set "PATH=%PATH%;%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
)
set "PATH=%PATH%;%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
rem for vc10-12, interpretation is trivial
set VCFMT=%VCVER%
@@ -68,8 +66,6 @@ if not "%DevEnvDir%" == "" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[15.0,15.99]" -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "DevEnvDir=%%i\Common7\IDE\"
)
) else if /I "%VCFMT%" == "gcc" (
rem MinGW
) else (
echo Error: wrong VS identifier
exit /B
@@ -93,28 +89,23 @@ if /I "%VCFMT%" == "vc10" (
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
set "VCPlatformToolSet=v141"
) else if /I "%VCFMT%" == "gcc" (
rem MinGW
) else (
echo Error: first argument ^(%VCVER%^) should specify supported version of Visual C++,
echo one of: vc10 ^(VS 2010 SP3^), vc11 ^(VS 2012 SP3^), vc12 ^(VS 2013^) or vc14 ^(VS 2015^)
exit
)
rem ----- For compatability with external application using CASROOT -----
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
rem ----- Define path to 3rdparty products -----
set "THIRDPARTY_DIR=@3RDPARTY_DIR@"
if ["%ARCH%"] == ["32"] set VCARCH=x86
if ["%ARCH%"] == ["64"] set VCARCH=amd64
if /I ["%1"] == ["vc141"] set "VCVER=vc14"
if exist "%CASROOT%\custom.bat" (
call "%CASROOT%\custom.bat" %VCVER% %ARCH% %CASDEB%
if exist "%~dp0custom.bat" (
call "%~dp0custom.bat" %VCVER% %ARCH% %CASDEB%
)
rem for compatability with external application using CASROOT
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
if not ["%TCL_DIR%"] == [""] set "PATH=%TCL_DIR%;%PATH%"
if not ["%TK_DIR%"] == [""] set "PATH=%TK_DIR%;%PATH%"
if not ["%FREETYPE_DIR%"] == [""] set "PATH=%FREETYPE_DIR%;%PATH%"
@@ -155,7 +146,7 @@ set "CSF_STEPDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
set "CSF_XmlOcafResource=%CSF_OCCTResourcePath%\XmlOcafResource"
set "CSF_MIGRATION_TYPES=%CSF_OCCTResourcePath%\StdResource\MigrationSheet.txt"
rem ----- Draw Harness special stuff -----
rem Draw Harness special stuff
if exist "%CSF_OCCTResourcePath%\DrawResources" (
set "DRAWHOME=%CSF_OCCTResourcePath%\DrawResources"
set "CSF_DrawPluginDefaults=%CSF_OCCTResourcePath%\DrawResources"

View File

@@ -24,13 +24,15 @@ 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
if [ -e "${CASROOT}/custom.sh" ]; then source "${CASROOT}/custom.sh"; fi
# Read script arguments
shopt -s nocasematch

View File

@@ -2,15 +2,12 @@
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
# ----- For compatability with external application using CASROOT -----
# ----- for compatability with external application using CASROOT -----
if [ "${CASROOT}" == "" ]; then
export CASROOT="@INSTALL_DIR@"
export CASROOT="${aScriptPath}"
fi
# ----- Define path to 3rdparty products -----
export THIRDPARTY_DIR="@3RDPARTY_DIR@"
# ----- Read script arguments -----
# Read script arguments
shopt -s nocasematch
export CASDEB="";
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
@@ -36,8 +33,8 @@ else
fi
# ----- Set local settings -----
if [ -e "${CASROOT}/@INSTALL_DIR_SCRIPT@/custom.sh" ]; then
source "${CASROOT}/@INSTALL_DIR_SCRIPT@/custom.sh" "${CASDEB}" "${ARCH}"
if [ -e "${aScriptPath}/custom.sh" ]; then
source "${aScriptPath}/custom.sh" "${CASDEB}" "${ARCH}"
fi
THRDPARTY_PATH=""
@@ -130,7 +127,7 @@ export CSF_STEPDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
export CSF_XmlOcafResource="${CSF_OCCTResourcePath}/XmlOcafResource"
export CSF_MIGRATION_TYPES="${CSF_OCCTResourcePath}/StdResource/MigrationSheet.txt"
# ----- Draw Harness special stuff -----
# Draw Harness special stuff
if [ -e "${CSF_OCCTResourcePath}/DrawResources" ]; then
export DRAWHOME="${CSF_OCCTResourcePath}/DrawResources"
export CSF_DrawPluginDefaults="${CSF_OCCTResourcePath}/DrawResources"

30
adm/vcver.bat Normal file
View File

@@ -0,0 +1,30 @@
@echo off
rem Decode VCVER variable and define related ones:
rem
rem VCFMT - "vc" followed by full version number of Visual Studio toolset
rem (same as VCVER without optional suffix "-uwp")
rem VCLIB - name of folder contining binaries
rem (same as VCVER except without third version in number)
rem VCPROP - name of required Visual Studion Workload (starting with VS 2017)
rem
rem Note that for VS before 2015 (vc14) always
rem VCFMT=VCLIB=VCVER and VCPROP=NativeDesktop
rem Since VS 2017, environment variables like VS100COMNTOOLS are not defined
rem any more, we can only use vswhere.exe tool to find Visual Studio.
rem Add path to vswhere.exe
set "PATH=%PATH%;%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
rem for vc10-12, interpretation is trivial
set VCFMT=%VCVER%
set VCLIB=%VCVER:~0,4%
set VCPROP=NativeDesktop
rem vc14 and later can have optional suffix "-uwp"
if "%VCVER:~-4%" == "-uwp" (
set VCFMT=%VCVER:~0,-4%
set VCLIB=%VCLIB%-uwp
set VCPROP=Universal
)
rem echo VCVER=%VCVER% VCFMT=%VCFMT% VCLIB=%VCLIB% VCPROP=%VCPROP%

View File

@@ -13,7 +13,6 @@ overview/overview.md
../samples/qt/AndroidQt/ReadMe.md
../samples/java/jniviewer/ReadMe.md
../samples/ios/UIKitSample/ReadMe.md
tutorial/tutorial.md
@@ -32,7 +31,6 @@ user_guides/xde/xde.md
user_guides/ocaf/ocaf.md
user_guides/tobj/tobj.md
user_guides/draw_test_harness/draw_test_harness.md
user_guides/inspector/inspector.md
user_guides/brep_wp/brep_wp.md
user_guides/vis/vis.md

View File

@@ -14,7 +14,6 @@ user_guides/shape_healing/shape_healing.md
user_guides/ocaf/ocaf.md
user_guides/step/step.md
user_guides/draw_test_harness/draw_test_harness.md
user_guides/inspector/inspector.md
user_guides/tobj/tobj.md
user_guides/visualization/visualization.md
user_guides/xde/xde.md

View File

@@ -97,7 +97,6 @@ The following table gives the full list of environment variables used at the con
| BUILD_ADDITIONAL_TOOLKITS | String | Semicolon-separated individual toolkits to include into build process. If you want to build some particular libraries (toolkits) only, then you may uncheck all modules in the corresponding *BUILD_MODUE_\<MODULE\>* options and provide the list of necessary libraries here. Of course, all dependencies will be resolved automatically |
| BUILD_YACCLEX | Boolean flag | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this option leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
| BUILD_MODULE_MfcSamples | Boolean flag | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms |
| BUILD_Inspector | Boolean flag | Indicates whether Inspector should be built together with OCCT. |
| BUILD_DOC_Overview | Boolean flag | Indicates whether OCCT overview documentation project should be created together with OCCT. It is not built together with OCCT. Checking this option leads to automatic search of Doxygen binaries. Its building calls Doxygen command to generate the documentation in HTML format |
| BUILD_PATCH | Path | Points to the directory recognized as a "patch" for OCCT. If specified, the files from this directory take precedence over the corresponding native OCCT sources. This way you are able to introduce patches to Open CASCADE Technology not affecting the original source distribution |
| 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. |

View File

@@ -1156,13 +1156,7 @@ The following obsolete features have been removed:
* The method Perform of the *ShapeConstruct_ProjectCurveOnSurface* class is modified:
- input arguments *continuity*, *maxdeg*, *nbinterval* have been removed as unused;
- input arguments *TolFirst*, *TolLast* have been added at the end of arguments' list.
* Typedefs Quantity_Factor, Quantity_Parameter, Quantity_Ratio, Quantity_Coefficient, Quantity_PlaneAngle, Quantity_Length, V3d_Parameter and V3d_Coordinate have been removed; Standard_Real should be used instead.
@subsection upgrade_occt720_reshape_oriented_removed Corrections in BRepOffset API
In classes *BRepTools_ReShape* and *ShapeBuild_ReShape*, the possibility to process shapes different only by orientation in different ways has been removed.
Thus methods *Remove()* and *Replace()* do not have any more the last argument 'oriented'; they work always as if *Standard_False* was passed before (default behavior).
Methods *ModeConsiderLo()* and *Apply()* with three arguments have been removed.
* The functionality to process shapes different only in orientation by different ways was removed from types *BRepTools_ReShape* and *ShapeBuild_ReShape*.
@subsection upgrade_occt720_correction_of_Offset_API Corrections in BRepOffset API
@@ -1219,8 +1213,6 @@ Management of highlight attributes has been revised and might require modificati
- *myZLayer*, replaced by *myDrawer->ZLayer()*
* The method *PrsMgr_PresentationManager::Unhighlight()* taking Display Mode as an argument has been marked deprecated.
Implementation now performs unhighlighting of all highlighted presentation mode.
* The methods taking/returning *Quantity_NameOfColor* (predefined list of colors) and duplicating methods operating with *Quantity_Color* (definition of arbitrary RGB color) in AIS have been removed.
*Quantity_Color* should be now used instead.
@subsection upgrade_720_implicit_viewer_update Elimination of implicit 3D Viewer updates
@@ -1234,7 +1226,7 @@ To avoid such issues, the interface has been modified and default value has been
Therefore, old application code should be updated to set the flag theToUpdateViewer explicitly
to desired value (TRUE to preserve old previous behavior), if it was not already set.
The following AIS_InteractiveContext methods have been changed:
The follow AIS_InteractiveContext methods have been changed:
Display, Erase, EraseAll, DisplayAll, EraseSelected, DisplaySelected, ClearPrs, Remove, RemoveAll, Hilight,
HilightWithColor, Unhilight, Redisplay, RecomputePrsOnly, Update, SetDisplayMode, UnsetDisplayMode, SetColor,
UnsetColor, SetWidth, UnsetWidth, SetMaterial, UnsetMaterial, SetTransparency, UnsetTransparency,
@@ -1281,8 +1273,7 @@ In most cases this change should be transparent, however applications implementi
* Package BVH now uses opencascade::handle instead of NCollection_Handle (for classes BVH_Properties, BVH_Builder, BVH_Tree, BVH_Object).
Application code using BVH package directly should be updated accordingly.
* AIS_Shape now computes UV texture coordinates for AIS_Shaded presentation in case if texture mapping is enabled within Shaded Attributes.
Therefore, redundant class *AIS_TexturedShape is now deprecated* - applications can use *AIS_Shape* directly (texture mapping should be defined through AIS_Shape::Attributes()).
* Methods for managing active texture within OpenGl_Workspace class (ActiveTexture(), DisableTexture(), EnableTexture()) have been moved to *OpenGl_Context::BindTextures()*.
Therefore, redundant class AIS_TexturedShape has been marked deprecated - applications can use AIS_Shape directly (texture mapping should be defined through AIS_Shape::Attributes()).
@subsection upgrade_720_BOP_DataStructure BOP - Pairs of interfering indices
@@ -1307,14 +1298,14 @@ In most cases this change should be transparent, however applications implementi
@subsection upgrade_720_persistence Restore OCCT 6.9.1 persistence
The capability of reading / writing files in old format using *Storage_ShapeSchema* functionality from OCCT 6.9.1 has been restored in OCCT 7.2.0.
The capability of reading / writing files in old format using *Storage_ShapeSchema* functionality from OCCT 6.9.1 has been restored in OCCT 7.2.0.
One can use this functionality in two ways:
- invoke DRAW Test Harness commands *fsdread / fsdwrite* for shapes;
- call *StdStorage* class *Read / Write* functions in custom code.
The code example below demonstrates how to read shapes from a storage driver using *StdStorage* class.
The code example below demonstrates how to read shapes from a storage driver using *StdStorage* class.
~~~~
// aDriver should be created and opened for reading
@@ -1362,7 +1353,7 @@ NCollection_Handle<Storage_BaseDriver> aFileDriver(new FSD_File());
try
{
OCC_CATCH_SIGNALS
PCDM_ReadWriter::Open (*aFileDriver, TCollection_ExtendedString(theFilename), Storage_VSWrite);
PCDM_ReadWriter::Open(*aFileDriver, TCollection_ExtendedString(CStringA(filename).GetBuffer()), Storage_VSWrite);
}
catch (Standard_Failure& e)
{
@@ -1370,7 +1361,7 @@ catch (Standard_Failure& e)
}
// Create a storage data instance
Handle(StdStorage_Data) aData = new StdStorage_Data();
Handle(StdStorage_Data) aData = new StdStorage_Data;
// Set an axiliary application name (optional)
aData->HeaderData()->SetApplicationName(TCollection_ExtendedString("Application"));
@@ -1389,7 +1380,8 @@ for (Standard_Integer i = 1; i <= shapes.Length(); ++i)
}
// Construct a root name
TCollection_AsciiString aName = TCollection_AsciiString("Shape_") + i;
TCollection_AsciiString aName = "Shape_";
aName += i;
// Add a root to storage data
Handle(StdStorage_Root) aRoot = new StdStorage_Root(aName, aPShape);
@@ -1406,17 +1398,17 @@ if (anError != Storage_VSOk)
@subsection upgrade_720_Change_In_BRepLib_MakeFace_Algo Change in BRepLib_MakeFace algorithm
Previously, *BRepLib_MakeFace* algorithm changed orientation of the source wire in order to avoid creation of face as a hole (i.e. it is impossible to create the entire face as a hole; the hole can be created in context of another face only). New algorithm does not reverse the wire if it is open. Material of the face for the open wire will be located on the left side from the source wire.
Previously, *BRepLib_MakeFace* algorithm changed orientation of the source wire in order to avoid creation of face as a hole (i.e. it is impossible to create the entire face as a hole; the hole can be created in context of another face only). New algorithm does not reverse the wire if it is open. Material of the face for the open wire will be located on the left side from the source wire.
@subsection upgrade_720_Change_In_BRepFill_OffsetWire Change in BRepFill_OffsetWire algorithm
From now on, the offset will always be directed to the outer region in case of positive offset value and to the inner region in case of negative offset value.
Inner/Outer region for an open wire is defined by the following rule:
when we go along the wire (taking into account edges orientation) the outer region will be on the right side, the inner region will be on the left side.
In case of a closed wire, the inner region will always be inside the wire (at that, the edges orientation is not taken into account).
From now on, the offset will always be directed to the outer region in case of positive offset value and to the inner region in case of negative offset value.
Inner/Outer region for an open wire is defined by the following rule:
when we go along the wire (taking into account edges orientation) the outer region will be on the right side, the inner region will be on the left side.
In case of a closed wire, the inner region will always be inside the wire (at that, the edges orientation is not taken into account).
@subsection upgrade_720_Change_In_GeomAdaptor_Curve Change in Geom(2d)Adaptor_Curve::IsPeriodic
Since 7.2.0 version, method *IsPeriodic()* returns the corresponding status of periodicity of the basis curve regardless of closure status of the adaptor curve (see method *IsClosed()*).
Method *IsClosed()* for adaptor can return false even on periodic curve, in the case if its parametric range is not full period, e.g. for adaptor on circle in range [0, @f$ \pi @f$].
In previous versions, *IsPeriodic()* always returned false if *IsClosed()* returned false.
@@ -1437,10 +1429,3 @@ The Error/Warning reporting system of the algorithms in Boolean Component (in al
The methods returning the status of errors and warnings of the algorithms (ErrorStatus() and WarningStatus()) have been removed.
Instead use methods HasErrors() and HasWarnings() to check for presence of errors and warnings, respectively.
The full list of errors and warnings, with associated data such as problematic sub-shapes, can be obtained by method GetReport().
@section upgrade_occt730 Upgrade to OCCT 7.3.0
@subsection upgrade_730_BRepAdaptor_CompCurve Changes in BRepAdaptor_CompCurve
The method BRepAdaptor_CompCurve::SetPeriodic has been eliminated.
Since new version, the method BRepAdaptor_CompCurve::IsPeriodic() will always return FALSE. Earlier, it could return TRUE in case if the wire contained only one edge based on periodic curve.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -18,7 +18,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-2017 by OPEN CASCADE S.A.S. All rights reserved.
Copyright (c) 1999-2016 by OPEN CASCADE S.A.S. All rights reserved.
@htmlonly<center>@endhtmlonly
https://www.opencascade.com
@@ -83,28 +83,28 @@ To use Tcl/Tk, please refer to the Licensing Terms (https://www.tcl.tk/software/
**GL2PS** is developed by Christophe Geuzaine and others. It is optionally used by OCCT to
export content of OpenGL scene to vector graphics formats (PS, PDF, EMF, SVG).
The library is licensed under GL2PS license (http://www.geuz.org/gl2ps/COPYING.GL2PS).
The library is licensed under GL2PS LICENSE https://www.geuz.org/gl2ps/COPYING.GL2PS Version 2, November 2003.
**FreeType 2** is developed by Antoine Leca, David Turner, Werner Lemberg and others.
It is a software font engine that is designed to be small, efficient, highly customizable and
portable while capable of producing high-quality output (glyph images). This product
can be used in graphic libraries, display servers, font conversion tools,
text image generation tools, and many other products.
FreeType 2 is released under two open-source licenses: BSD-like FreeType License and the GPL (https://www.freetype.org/license.html).
FreeType 2 is released under two open-source licenses: BSD-like FreeType License and the GPL.
**Intel(R) Threading Building Blocks (TBB)** offers a rich and complete approach to expressing parallelism in a C++ program.
It is a library that helps you to take advantage of multi-core processor performance without having to be a threading expert.
Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that
abstracts platform details and threading mechanisms for scalability and performance.
TBB version 2017 is available under Apache 2.0 license, while older versions
until 4.4 are available under GPLv2 license with the runtime exception (https://www.threadingbuildingblocks.org).
TBB is available under GPLv2 license with the runtime exception.
**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, https://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 https://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
@@ -115,17 +115,17 @@ If you need further information on Doxygen, please refer to https://www.stack.nl
Graph visualization is representiation of structured information as diagrams of abstract graphs and networks.
This product is used together with Doxygen in Open CASCADE Technology for automatic creation of Technical Documentation
(generation of dependency graphs). Current versions of Graphviz are licensed on an open source
basis under The Eclipse Public License (EPL) (http://www.graphviz.org/License.php).
basis under The Eclipse Public License (EPL) (https://www.graphviz.org/License.php).
**Inno Setup** is a free script-driven installation system created in CodeGear Delphi by Jordan Russell.
In OCCT Inno Setup is used to create Installation Wizard on Windows.
It is licensed under Inno Setup License (http://www.jrsoftware.org/files/is/license.txt).
It is licensed under Inno Setup License (https://www.jrsoftware.org/files/is/license.txt).
**FreeImage** is an Open Source library supporting popular graphics image formats, such as PNG, BMP, JPEG, TIFF,
and others used by multimedia applications. This library is developed by Hervé Drolon and Floris van den Berg.
FreeImage is easy to use, fast, multithreading safe, compatible with all 32-bit or 64-bit versions of Windows,
and cross-platform (works both with Linux and Mac OS X). FreeImage is optionally used by OCCT to work
with images, on conditions of the FreeImage Public License (FIPL) (http://freeimage.sourceforge.net/freeimage-license.txt).
with images, on conditions of the FreeImage Public License (FIPL) (https://freeimage.sourceforge.net/freeimage-license.txt).
**CMake** is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice.
OCCT uses CMake as a build system. CMake is available under BSD 3-Clause license. See more at https://cmake.org/
@@ -196,7 +196,7 @@ for which OCCT is certified to work.
| OS | Compiler |
| --------- | ----------- |
| Windows | Microsoft Visual Studio: 2010 SP1<sup>1</sup>, 2012 Update 4, 2013 Update 5, 2015, 2017 <br> Intel C++ Composer XE 2013 SP1 <br> GCC 4.3+ (Mingw-w64)|
| 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 |
@@ -209,15 +209,15 @@ for which OCCT is certified to work.
| Component | Requirement |
| --------- | ----------- |
| Graphic library | OpenGL 3.3+, OpenGL ES 2.0+ <br> Direct3D 9 |
| Qt (for samples and demos) | Desktop: Qt 4.8.6+ https://www.qt.io/download/ <br> Android: Qt 5.3.2+ https://www.qt.io/download/ |
| TCL (for testing tools) | Tcl/Tk 8.6.3+ https://www.tcl.tk/software/tcltk/download.html <br> or ActiveTcl 8.6 https://www.activestate.com/activetcl/downloads (for Windows)|
| Freetype (for text rendering) | FreeType 2.4.11-2.5.5 https://sourceforge.net/projects/freetype/files/ |
| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.17.0+ https://sourceforge.net/projects/freeimage/files |
| FFmpeg (optional, for video recording) | FFmpeg 3.1+ https://www.ffmpeg.org/download.html |
| 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 |
| FFmpeg (optional, for video recording) | FFmpeg 3.1+ https://www.ffmpeg.org |
| 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 https://www.threadingbuildingblocks.org/ |
| VTK (for VTK Integration Services | VTK 6.1+ http://www.vtk.org/download/ |
| Doxygen (optional for building documentation) | Doxygen 1.8.5+ https://www.stack.nl/~dimitri/doxygen/download.html |
| 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
@@ -534,11 +534,11 @@ Export:
* Stl
* Vrml
See \subpage samples_csharp_occt "C# sample Readme" for details.
See \subpage samples_csharp_occt "Readme" for details.
There is also another C# example with the same functionality, which demonstrates the integration of Direct3D Viewer into .NET applications using WPF front end.
See \subpage samples_csharp_direct3d "Direct3D C# sample Readme" for details.
See \subpage samples_csharp_direct3d "Readme" for details.
@subsubsection OCCT_OVW_SECTION_7_3_4 Android
@@ -546,16 +546,8 @@ There are two samples are representing usage OCCT framework on Android mobile pl
jniviewer
@figure{/overview/images/samples_java_android_occt.jpg}
Java -- See \subpage samples_java_android_occt "Android Java sample Readme" for details.
Java -- See \subpage samples_java_android_occt "Readme" for details.
AndroidQt
@figure{/overview/images/samples_qml_android_occt.jpg}
Qt -- See \subpage samples_qml_android_occt "Android Qt sample Readme" for details.
@subsubsection OCCT_OVW_SECTION_7_3_5 iOS
There is a sample demonstrating usage of OCCT on iOS with Apple UIKit framework.
@figure{/overview/images/sample_ios_uikit.png}
See \subpage occt_samples_ios_uikit "iOS sample Readme" for details.
Qt -- See \subpage samples_qml_android_occt "Readme" for details.

View File

@@ -10687,87 +10687,6 @@ Example:
mdist
~~~~~
@section occt_draw_13 Inspector commands
This section describes commands that make possible to use Inspector.
@subsection occt_draw_13_1 tinspector
Syntax:
~~~~~
tinspector [-plugins {name1 ... [nameN] | all}]
[-activate name]
[-shape object [name1] ... [nameN]]
[-open file_name [name1] ... [nameN]]
[-update]
[-select {object | name1 ... [nameN]}]
[-show {0|1} = 1]
~~~~~
Starts tool of inspection.
Options:
* *plugins* enters plugins that should be added in the inspector.
Available names are: dfbrowser, vinspector and shapeview.
Plugins order will be the same as defined in arguments.
'all' adds all available plugins in the order:
DFBrowser, VInspector and ShapeView.
If at the first call this option is not used, 'all' option is applyed;
* *activate* activates the plugin in the tool view.
If at the first call this option is not used, the first plugin is activated;
* *shape* initializes plugin/s by the shape object. If 'name' is empty, initializes all plugins;
* *open* gives the file to the plugin/s. If the plugin is active, after open, update content will be done;
* *update* updates content of the active plugin;
* *select* sets the parameter that should be selected in an active tool view.
Depending on active tool the parameter is:
ShapeView: 'object' is an instance of TopoDS_Shape TShape,
DFBrowser: 'name' is an entry of TDF_Label and name2(optionaly) for TDF_Attribute type name,
VInspector: 'object' is an instance of AIS_InteractiveObject;
* *show* sets Inspector view visible or hidden. The first call of this command will show it.
**Example:**
~~~~~
pload DCAF INSPECTOR
NewDocument Doc BinOcaf
set aSetAttr1 100
set aLabel 0:2
SetInteger Doc ${aLabel} ${aSetAttr1}
tinspector -plugins dfbrowser -select 0:2 TDataStd_Integer
~~~~~
**Example:**
~~~~~
pload ALL INSPECTOR
box b1 200 100 120
box b2 100 200 220 100 120 100
tinspector -plugins shapeview -shape b1 -shape b2 -select b1
~~~~~
**Example:**
~~~~~
pload ALL INSPECTOR
tinspector -plugins vinspector
vinit
box box_1 100 100 100
vdisplay box_1
box box_2 180 120 200 150 150 150
vdisplay box_2
vfit
vselmode box_1 1 1
vselmode box_1 3 1
tinspector -update -select box_1
~~~~~
@section occt_draw_11 Extending Test Harness with custom commands

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

View File

@@ -1,224 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="165.36458mm"
height="99.483337mm"
viewBox="0 0 165.36458 99.483337"
version="1.1"
id="svg8"
sodipodi:docname="3DView_elements.svg"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="237.05748"
inkscape:cy="217.01184"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1410"
inkscape:window-height="786"
inkscape:window-x="265"
inkscape:window-y="101"
inkscape:window-maximized="0"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
showborder="true"
inkscape:showpageshadow="false" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-208.35938,-140.66904)">
<rect
style="opacity:1;fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:#000000;stroke-width:0.52916667;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4147-9"
width="164.83542"
height="98.95417"
x="208.62396"
y="140.93362"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#bfbfbf;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4157-5"
width="155.95102"
height="20.214758"
x="212.62312"
y="145.17099"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#bfbfbf;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4159-1"
width="155.83388"
height="64.776878"
x="212.62471"
y="170.05089"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.36620295;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-1-1"
width="30.417513"
height="11.316654"
x="286.53876"
y="149.43106"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.36620295;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-1-5-9"
width="30.417513"
height="11.316654"
x="321.21384"
y="149.43106"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="295.72775"
y="156.1628"
id="text5675-5"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5677-3"
x="295.72775"
y="156.1628"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Single</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="331.03946"
y="156.53418"
id="text5679-5"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5681-0"
x="331.03946"
y="156.53418"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Clean</tspan></text>
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.45057005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-8-33"
width="14.354354"
height="56.42762"
x="216.9996"
y="174.34537"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.83517319;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-7-0"
width="67.939919"
height="26.352776"
x="265.93634"
y="189.26295"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.3866663px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222221px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="295.6308"
y="201.46571"
id="text5683-5-2"
transform="scale(0.98830373,1.0118347)"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5685-3-7"
x="295.6308"
y="201.46571"
style="font-size:3.83516741px;line-height:1.25;stroke-width:0.28222221px">3D view</tspan></text>
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.36620298;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-1-1-3"
width="30.417513"
height="11.316654"
x="217.1886"
y="149.43106"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="227.84984"
y="156.48491"
id="text5675-5-2"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5677-3-2"
x="227.84984"
y="156.48491"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">View</tspan></text>
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.36620298;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-1-1-9"
width="30.417513"
height="11.316654"
x="251.86369"
y="149.43106"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="262.35156"
y="156.53418"
id="text5675-5-9"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5677-3-0"
x="262.35156"
y="156.53418"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Multi</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -1,284 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="165.36443mm"
height="99.48317mm"
viewBox="0 0 165.36443 99.48317"
version="1.1"
id="svg1643"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
sodipodi:docname="dfbrowser_elements.svg">
<defs
id="defs1637" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="290.24314"
inkscape:cy="320.3071"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:showpageshadow="false"
inkscape:window-width="1246"
inkscape:window-height="857"
inkscape:window-x="371"
inkscape:window-y="37"
inkscape:window-maximized="0" />
<metadata
id="metadata1640">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(356.33698,30.17611)">
<rect
style="opacity:1;fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:#78943d;stroke-width:0.52916667;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4147"
width="164.83542"
height="98.95417"
x="-356.07248"
y="-29.91161"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#9bbb59;fill-opacity:1;fill-rule:evenodd;stroke:#78943d;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4157"
width="155.951"
height="20.214758"
x="-352.0733"
y="-25.674246"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#9bbb59;fill-opacity:1;fill-rule:evenodd;stroke:#78943d;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4159"
width="75.795822"
height="64.91011"
x="-352.07172"
y="-0.79434544"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#9bbb59;fill-opacity:1;fill-rule:evenodd;stroke:#78943d;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4161-4"
width="75.811562"
height="30.252827"
x="-272.04941"
y="33.729694"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#9bbb59;fill-opacity:1;fill-rule:evenodd;stroke:#78943d;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4161-4-8"
width="75.811562"
height="30.252827"
x="-272.04941"
y="-0.80220562"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.56444448;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195"
width="73.552574"
height="11.118413"
x="-347.50781"
y="-21.126072"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.36620289;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-1"
width="30.417513"
height="11.316654"
x="-267.92496"
y="-21.225193"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.36620289;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-1-5"
width="30.417513"
height="11.316654"
x="-231.57631"
y="-21.225193"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-259.7175"
y="-14.48304"
id="text5675"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5677"
x="-259.7175"
y="-14.48304"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Update</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-223.04579"
y="-14.12208"
id="text5679"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5681"
x="-223.04579"
y="-14.12208"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Search</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-325.95343"
y="-14.547463"
id="text5683"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5685"
x="-325.95343"
y="-14.547463"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Tree Navigation</tspan></text>
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.56444448;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-8"
width="65.570122"
height="19.385952"
x="-347.50781"
y="11.248657"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666654px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222221px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-333.31332"
y="22.090868"
id="text5683-5"
transform="scale(0.98830373,1.0118347)"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5685-3"
x="-333.31332"
y="22.090868"
style="font-size:3.83516741px;line-height:1.25;stroke-width:0.28222221px">OCAF tree view</tspan></text>
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.56444448;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-8-0"
width="65.570122"
height="19.385952"
x="-267.68332"
y="3.9789243"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.56444448;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-8-3-5"
width="38.7719"
height="16.820164"
x="-267.11316"
y="37.191612"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#9bbb59;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-8-3"
width="38.7719"
height="16.820164"
x="-240.60002"
y="42.180641"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666654px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222221px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-252.8326"
y="13.779153"
id="text5683-5-9"
transform="scale(0.98830373,1.0118347)"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5685-3-8"
x="-252.8326"
y="13.779153"
style="font-size:3.83516741px;line-height:1.25;stroke-width:0.28222221px">Property Panel</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666654px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222221px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-231.82542"
y="51.393177"
id="text5683-5-0"
transform="scale(0.98830373,1.0118347)"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5685-3-5"
x="-231.82542"
y="51.393177"
style="font-size:3.83516741px;line-height:1.25;stroke-width:0.28222221px">3D View</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666654px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222221px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-267.25568"
y="46.086102"
id="text5683-5-1"
transform="scale(0.98830373,1.0118347)"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\dfbrowser.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5685-3-80"
x="-267.25568"
y="46.086102"
style="font-size:3.83516741px;line-height:1.25;stroke-width:0.28222221px">Dump View</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -1,142 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="165.36458mm"
height="99.483337mm"
viewBox="0 0 165.36458 99.483337"
version="1.1"
id="svg2491"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
sodipodi:docname="shapeview_elements.svg">
<defs
id="defs2485" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="319.53221"
inkscape:cy="223.36826"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:showpageshadow="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1205"
inkscape:window-height="766"
inkscape:window-x="422"
inkscape:window-y="28"
inkscape:window-maximized="0" />
<metadata
id="metadata2488">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(293.59301,-77.169049)">
<rect
style="opacity:1;fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:#ffa040;stroke-width:0.52916667;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4147-0-8"
width="164.83542"
height="98.95417"
x="-293.32843"
y="77.433632"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\shapeview.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#fcd5b5;fill-opacity:1;fill-rule:evenodd;stroke:#ff9933;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4159-8"
width="70.094536"
height="85.011993"
x="-285.46909"
y="83.598381"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\shapeview.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.62230003;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-8-2"
width="54.993557"
height="25.389547"
x="-277.91861"
y="113.40961"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\shapeview.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#fcd5b5;fill-opacity:1;fill-rule:evenodd;stroke:#ffa040;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4159-8-9"
width="70.094536"
height="85.011993"
x="-207.25319"
y="83.598389"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\shapeview.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.56444448;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-8-2-4"
width="54.993557"
height="25.389547"
x="-199.70271"
y="113.40961"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\shapeview.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.3866663px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222221px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-272.88153"
y="125.70056"
id="text5683-5-4-9"
transform="scale(0.98830373,1.0118347)"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\shapeview.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5685-3-59-2"
x="-272.88153"
y="125.70056"
style="font-size:3.83516741px;line-height:1.25;stroke-width:0.28222221px">TopoDS_Shape View</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.3866663px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222221px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-182.24478"
y="126.02359"
id="text5683-5-0-0"
transform="scale(0.98830373,1.0118347)"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\shapeview.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5685-3-5-6"
x="-182.24478"
y="126.02359"
style="font-size:3.83516741px;line-height:1.25;stroke-width:0.28222221px">3D View</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -1,244 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="164.48495mm"
height="98.635941mm"
viewBox="0 0 164.48495 98.635941"
version="1.1"
id="svg8"
sodipodi:docname="tinspector_elements.svg"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">
<defs
id="defs2">
<pattern
y="0"
x="0"
height="6"
width="6"
patternUnits="userSpaceOnUse"
id="EMFhbasepattern" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="329.8397"
inkscape:cy="227.89271"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1575"
inkscape:window-height="895"
inkscape:window-x="46"
inkscape:window-y="75"
inkscape:window-maximized="0"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-23.06172,-25.84832)">
<path
id="path933"
d="M 23.326301,26.112901 H 187.28209 V 124.21968 H 23.326301 Z"
style="fill:none;stroke:#953735;stroke-width:0.52916276px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
id="path935"
d="M 28.109932,31.192871 H 62.95001 v 12.97507 H 28.109932 Z"
style="fill:#9bbb59;fill-opacity:1;fill-rule:nonzero;stroke:#71893f;stroke-width:0.52916276px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
id="path937"
d="m 66.54831,31.108201 h 34.84008 v 12.97507 H 66.54831 Z"
style="fill:none;stroke:#33cccc;stroke-width:0.52916276px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
id="path939"
d="m 104.9867,31.023531 h 34.84007 v 12.97508 H 104.9867 Z"
style="fill:none;stroke:#ff9933;stroke-width:0.52916276px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
id="path941"
d="m 37.550195,37.648651 c 0,0.254 -0.04233,0.48683 -0.169332,0.6985 -0.105832,0.21166 -0.253998,0.38099 -0.444497,0.48683 -0.126999,0.0847 -0.275164,0.14816 -0.42333,0.16933 -0.169332,0.0423 -0.35983,0.0635 -0.634995,0.0635 h -0.698495 v -2.83631 h 0.698495 c 0.275165,0 0.48683,0.0212 0.656162,0.0635 0.169332,0.0423 0.296331,0.10583 0.42333,0.16933 0.190498,0.127 0.338664,0.27516 0.444497,0.48683 0.105832,0.1905 0.148165,0.42333 0.148165,0.69849 z m -0.380997,0 c 0,-0.21166 -0.04233,-0.40216 -0.126999,-0.55033 -0.0635,-0.16933 -0.190498,-0.27516 -0.338664,-0.35983 -0.105833,-0.0635 -0.232832,-0.10583 -0.359831,-0.14816 -0.126999,-0.0212 -0.275164,-0.0212 -0.444497,-0.0212 h -0.35983 v 2.18015 h 0.35983 c 0.190499,0 0.338665,-0.0212 0.465664,-0.0423 0.148165,-0.0423 0.275164,-0.0847 0.380997,-0.14817 0.148165,-0.10583 0.253998,-0.21166 0.317498,-0.35983 0.0635,-0.14817 0.105832,-0.33866 0.105832,-0.55033 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path943"
d="m 39.963178,36.569161 h -1.418157 v 0.80433 h 1.227658 v 0.33866 h -1.227658 v 1.35466 h -0.380997 v -2.83631 h 1.799154 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path945"
d="m 42.524325,38.198981 c 0,0.127 -0.02117,0.254 -0.08467,0.35983 -0.04233,0.10583 -0.126999,0.21167 -0.211665,0.27517 -0.105833,0.0847 -0.211665,0.14816 -0.338664,0.16933 -0.126999,0.0423 -0.296331,0.0635 -0.48683,0.0635 h -1.015992 v -2.83631 h 0.84666 c 0.211665,0 0.359831,0.0212 0.465663,0.0423 0.105833,0 0.190499,0.0423 0.296331,0.0847 0.105833,0.0635 0.169332,0.12699 0.211666,0.21166 0.0635,0.0847 0.08467,0.1905 0.08467,0.29633 0,0.14817 -0.04233,0.254 -0.105832,0.35983 -0.0635,0.0847 -0.169332,0.16933 -0.275165,0.21167 v 0.0212 c 0.190499,0.0423 0.338665,0.127 0.444497,0.254 0.105833,0.12699 0.169332,0.27516 0.169332,0.48683 z m -0.634995,-1.26999 c 0,-0.0847 0,-0.127 -0.02117,-0.16933 -0.04233,-0.0635 -0.0635,-0.0847 -0.126999,-0.127 -0.04233,-0.0212 -0.126999,-0.0423 -0.211665,-0.0635 -0.08467,0 -0.190498,0 -0.317497,0 h -0.444497 v 0.80433 h 0.486829 c 0.127,0 0.211665,0 0.275165,-0.0212 0.08467,0 0.148166,-0.0423 0.190499,-0.0635 0.0635,-0.0423 0.105832,-0.0847 0.126999,-0.14817 0.04233,-0.0635 0.04233,-0.127 0.04233,-0.21166 z m 0.253998,1.26999 c 0,-0.10583 -0.02117,-0.1905 -0.0635,-0.254 -0.02117,-0.0847 -0.08467,-0.127 -0.190498,-0.16933 -0.0635,-0.0423 -0.126999,-0.0635 -0.211665,-0.0635 -0.08467,-0.0212 -0.190499,-0.0212 -0.317498,-0.0212 h -0.592662 v 1.05833 h 0.507996 c 0.148166,0 0.296331,-0.0212 0.402164,-0.0423 0.105832,0 0.190498,-0.0423 0.253998,-0.0847 0.0635,-0.0423 0.126999,-0.10584 0.148165,-0.16933 0.04233,-0.0635 0.0635,-0.14817 0.0635,-0.254 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path947"
d="m 44.344645,37.331151 h -0.02117 c -0.04233,-0.0212 -0.105832,-0.0212 -0.148165,-0.0212 -0.04233,0 -0.105833,-0.0212 -0.169332,-0.0212 -0.126999,0 -0.232832,0.0423 -0.317498,0.0847 -0.105832,0.0423 -0.211665,0.10584 -0.296331,0.1905 v 1.50283 h -0.359831 v -2.11663 h 0.359831 v 0.3175 c 0.126999,-0.127 0.253998,-0.21166 0.359831,-0.254 0.105832,-0.0423 0.232831,-0.0635 0.338664,-0.0635 0.0635,0 0.105832,0 0.126999,0 0.04233,0 0.08467,0 0.126999,0.0212 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path949"
d="m 46.482462,38.008481 c 0,0.33867 -0.08467,0.61383 -0.253998,0.80433 -0.169332,0.21167 -0.42333,0.3175 -0.719661,0.3175 -0.296331,0 -0.529163,-0.10583 -0.698495,-0.3175 -0.190498,-0.1905 -0.275164,-0.46566 -0.275164,-0.80433 0,-0.35983 0.08467,-0.61383 0.275164,-0.82549 0.169332,-0.1905 0.402164,-0.29633 0.698495,-0.29633 0.296331,0 0.550329,0.10583 0.719661,0.29633 0.169332,0.21166 0.253998,0.46566 0.253998,0.82549 z m -0.35983,0 c 0,-0.27516 -0.04233,-0.48683 -0.169332,-0.61383 -0.105833,-0.127 -0.253998,-0.21166 -0.444497,-0.21166 -0.190499,0 -0.338664,0.0847 -0.444497,0.21166 -0.105832,0.127 -0.169332,0.33867 -0.169332,0.61383 0,0.254 0.0635,0.46567 0.169332,0.59267 0.105833,0.14816 0.253998,0.21166 0.444497,0.21166 0.190499,0 0.338664,-0.0635 0.444497,-0.21166 0.105832,-0.127 0.169332,-0.33867 0.169332,-0.59267 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path951"
d="m 49.699771,36.950161 -0.550328,2.11665 h -0.317498 l -0.550329,-1.62982 -0.529163,1.62982 h -0.338664 l -0.550329,-2.11665 h 0.35983 l 0.402164,1.62982 0.529163,-1.62982 h 0.275164 l 0.55033,1.62982 0.35983,-1.62982 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path953"
d="m 51.731758,38.452981 c 0,0.1905 -0.08467,0.35983 -0.232834,0.46566 -0.16933,0.127 -0.380997,0.1905 -0.656161,0.1905 -0.169331,0 -0.296331,-0.0212 -0.444497,-0.0423 -0.126998,-0.0423 -0.232831,-0.0847 -0.317498,-0.127 v -0.40216 h 0.02117 c 0.105833,0.0847 0.232833,0.14816 0.380997,0.1905 0.127,0.0635 0.253998,0.0847 0.380998,0.0847 0.169333,0 0.275164,-0.0212 0.380997,-0.0847 0.08467,-0.0423 0.127,-0.127 0.127,-0.23283 0,-0.0847 -0.02117,-0.14817 -0.08467,-0.1905 -0.04233,-0.0423 -0.127,-0.0847 -0.275164,-0.10584 -0.04233,-0.0212 -0.105833,-0.0212 -0.1905,-0.0423 -0.08467,-0.0212 -0.148164,-0.0212 -0.211664,-0.0423 -0.1905,-0.0635 -0.338664,-0.12699 -0.402164,-0.23283 -0.08467,-0.0847 -0.127,-0.21166 -0.127,-0.33866 0,-0.0847 0.02117,-0.16933 0.0635,-0.254 0.04233,-0.0635 0.08467,-0.14817 0.169334,-0.21166 0.0635,-0.0423 0.148164,-0.10584 0.253997,-0.127 0.127,-0.0423 0.232831,-0.0635 0.380997,-0.0635 0.127,0 0.253998,0.0212 0.380998,0.0635 0.126997,0.0212 0.23283,0.0635 0.317497,0.10583 v 0.381 h -0.02117 c -0.08467,-0.0635 -0.190497,-0.127 -0.317497,-0.16934 -0.148167,-0.0423 -0.275164,-0.0635 -0.402164,-0.0635 -0.127,0 -0.232831,0.0212 -0.317497,0.0635 -0.08467,0.0423 -0.127,0.127 -0.127,0.23284 0,0.0847 0.02117,0.14816 0.0635,0.19049 0.0635,0.0423 0.148166,0.0847 0.275164,0.10584 0.0635,0.0212 0.127,0.0212 0.211666,0.0423 0.08466,0.0212 0.148164,0.0423 0.211664,0.0423 0.148167,0.0423 0.275164,0.10583 0.380998,0.1905 0.08467,0.10583 0.127,0.23283 0.127,0.38099 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path955"
d="m 54.017739,38.029651 h -1.56632 c 0,0.14816 0.02117,0.254 0.0635,0.35983 0.04233,0.0847 0.08466,0.16933 0.169331,0.23283 0.0635,0.0635 0.127,0.10583 0.23283,0.127 0.08467,0.0423 0.1905,0.0423 0.296334,0.0423 0.148164,0 0.275164,-0.0212 0.423328,-0.0847 0.148166,-0.0423 0.254,-0.10583 0.317497,-0.16933 h 0.02117 v 0.40216 c -0.126998,0.0423 -0.253998,0.0847 -0.359831,0.127 -0.126997,0.0212 -0.275164,0.0423 -0.402161,0.0423 -0.359831,0 -0.634998,-0.0847 -0.825495,-0.27516 -0.1905,-0.1905 -0.296331,-0.46567 -0.296331,-0.8255 0,-0.33866 0.105831,-0.61383 0.275164,-0.82549 0.190498,-0.1905 0.444498,-0.29633 0.761995,-0.29633 0.275164,0 0.507995,0.0847 0.656161,0.254 0.148167,0.16933 0.232831,0.40216 0.232831,0.69849 z m -0.338664,-0.254 c -0.02117,-0.1905 -0.0635,-0.33866 -0.148164,-0.4445 -0.105833,-0.10583 -0.232833,-0.14816 -0.423331,-0.14816 -0.1905,0 -0.338664,0.0423 -0.465664,0.16933 -0.105833,0.10583 -0.16933,0.254 -0.190497,0.42333 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path957"
d="m 55.88039,37.331151 h -0.0212 c -0.0635,-0.0212 -0.10583,-0.0212 -0.14816,-0.0212 -0.0635,0 -0.127,-0.0212 -0.1905,-0.0212 -0.10583,0 -0.21166,0.0423 -0.3175,0.0847 -0.10583,0.0423 -0.1905,0.10584 -0.29633,0.1905 v 1.50283 h -0.3598 v -2.11663 h 0.35983 v 0.3175 c 0.14817,-0.127 0.27517,-0.21166 0.381,-0.254 0.10583,-0.0423 0.21166,-0.0635 0.33866,-0.0635 0.0423,0 0.10584,0 0.127,0 0.0212,0 0.0635,0 0.127,0.0212 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path959"
d="m 76.00974,35.786001 -1.03715,2.81515 h -0.508 l -1.01599,-2.81515 h 0.40216 l 0.88899,2.47648 0.889,-2.47648 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path961"
d="m 77.4279,38.601151 h -1.12182 v -0.27517 h 0.38099 v -2.24365 h -0.38099 v -0.29633 h 1.12182 v 0.29633 h -0.381 v 2.24365 h 0.381 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path963"
d="m 79.79855,38.601151 h -0.33866 v -1.18533 c 0,-0.10583 -0.0212,-0.1905 -0.0212,-0.27516 -0.0212,-0.0847 -0.0423,-0.16934 -0.0635,-0.21167 -0.0423,-0.0423 -0.0847,-0.0847 -0.14817,-0.10583 -0.0423,-0.0423 -0.127,-0.0423 -0.21167,-0.0423 -0.10583,0 -0.21166,0.0212 -0.31749,0.0635 -0.10583,0.0423 -0.21167,0.10583 -0.29633,0.1905 v 1.56632 H 78.0417 v -2.11665 h 0.35983 v 0.254 c 0.10583,-0.10584 0.21166,-0.16934 0.33866,-0.23284 0.127,-0.0423 0.23283,-0.0635 0.35983,-0.0635 0.23283,0 0.40217,0.0635 0.52917,0.1905 0.12699,0.14817 0.16933,0.33867 0.16933,0.61383 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path965"
d="m 81.99987,38.008481 c 0,0.1905 -0.0635,0.33867 -0.23283,0.46567 -0.16934,0.127 -0.381,0.19049 -0.65617,0.19049 -0.14816,0 -0.29633,-0.0212 -0.42333,-0.0635 -0.14816,-0.0212 -0.254,-0.0635 -0.33866,-0.127 v -0.38099 h 0.0212 c 0.10583,0.0847 0.23283,0.14816 0.38099,0.1905 0.127,0.0423 0.27517,0.0847 0.381,0.0847 0.16933,0 0.29633,-0.0423 0.381,-0.0847 0.0847,-0.0423 0.127,-0.127 0.127,-0.23284 0,-0.0847 -0.0212,-0.14816 -0.0635,-0.19049 -0.0635,-0.0423 -0.14817,-0.0847 -0.27517,-0.10584 -0.0635,-0.0212 -0.127,-0.0423 -0.21166,-0.0423 -0.0847,-0.0212 -0.14817,-0.0423 -0.21167,-0.0635 -0.19049,-0.0423 -0.31749,-0.10583 -0.40216,-0.21166 -0.0847,-0.0847 -0.10583,-0.21167 -0.10583,-0.33867 0,-0.10583 0,-0.16933 0.0423,-0.25399 0.0423,-0.0847 0.0847,-0.14817 0.16933,-0.21167 0.0635,-0.0635 0.14817,-0.10583 0.27517,-0.127 0.10583,-0.0423 0.23283,-0.0635 0.35983,-0.0635 0.127,0 0.25399,0.0212 0.38099,0.0423 0.127,0.0423 0.23284,0.0635 0.3175,0.127 v 0.381 H 81.894 c -0.0847,-0.0847 -0.1905,-0.127 -0.3175,-0.16933 -0.12699,-0.0635 -0.25399,-0.0847 -0.38099,-0.0847 -0.127,0 -0.254,0.0212 -0.33867,0.0847 -0.0847,0.0423 -0.12699,0.127 -0.12699,0.21166 0,0.0847 0.0212,0.16933 0.0847,0.21167 0.0423,0.0423 0.127,0.0635 0.254,0.10583 0.0635,0 0.12699,0.0212 0.21166,0.0423 0.0847,0.0212 0.14817,0.0212 0.21166,0.0423 0.16934,0.0423 0.29634,0.10583 0.381,0.1905 0.0847,0.10583 0.127,0.21166 0.127,0.381 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path967"
d="m 84.37051,37.521651 c 0,0.16933 -0.0212,0.33867 -0.0635,0.48683 -0.0423,0.127 -0.127,0.254 -0.21166,0.35983 -0.0847,0.0847 -0.16933,0.14817 -0.29633,0.21167 -0.10584,0.0423 -0.23283,0.0635 -0.35983,0.0635 -0.10584,0 -0.21167,0 -0.29633,-0.0212 -0.0847,-0.0212 -0.16934,-0.0635 -0.27517,-0.127 v 0.88899 h -0.35983 v -2.89981 h 0.35983 v 0.23283 c 0.10583,-0.0847 0.21167,-0.14816 0.3175,-0.1905 0.127,-0.0635 0.254,-0.0847 0.381,-0.0847 0.25399,0 0.46566,0.0847 0.59266,0.27517 0.14816,0.1905 0.21166,0.46566 0.21166,0.80433 z m -0.35983,0.0212 c 0,-0.254 -0.0423,-0.44449 -0.12699,-0.57149 -0.0847,-0.127 -0.23284,-0.1905 -0.40217,-0.1905 -0.10583,0 -0.21166,0.0212 -0.31749,0.0635 -0.10584,0.0423 -0.1905,0.10583 -0.29634,0.16933 v 1.20649 c 0.10584,0.0423 0.1905,0.0635 0.27517,0.0847 0.0635,0.0212 0.14816,0.0212 0.23283,0.0212 0.21167,0 0.35983,-0.0635 0.46566,-0.1905 0.10584,-0.127 0.16933,-0.33866 0.16933,-0.59266 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path969"
d="m 86.69883,37.585151 h -1.54515 c 0,0.127 0.0212,0.254 0.0635,0.33867 0.0212,0.10583 0.0847,0.1905 0.14816,0.25399 0.0635,0.0423 0.14817,0.10584 0.23283,0.127 0.0847,0.0212 0.1905,0.0423 0.29633,0.0423 0.14817,0 0.29633,-0.0212 0.4445,-0.0847 0.14817,-0.0635 0.254,-0.10583 0.3175,-0.16933 v 0 0.381 c -0.10583,0.0635 -0.23283,0.10583 -0.35983,0.127 -0.127,0.0423 -0.254,0.0635 -0.40217,0.0635 -0.33866,0 -0.61382,-0.10583 -0.80432,-0.29633 -0.21167,-0.1905 -0.29633,-0.4445 -0.29633,-0.80433 0,-0.33866 0.0847,-0.61383 0.27516,-0.82549 0.1905,-0.1905 0.4445,-0.29634 0.74083,-0.29634 0.29633,0 0.50799,0.0847 0.65616,0.254 0.16933,0.14817 0.23283,0.40217 0.23283,0.6985 z m -0.33866,-0.27516 c 0,-0.16933 -0.0423,-0.3175 -0.14817,-0.42333 -0.0847,-0.10583 -0.23283,-0.14817 -0.42333,-0.14817 -0.1905,0 -0.33866,0.0423 -0.44449,0.16933 -0.127,0.10584 -0.1905,0.23284 -0.1905,0.40217 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path971"
d="m 88.81548,38.474151 c -0.127,0.0635 -0.23283,0.10583 -0.33866,0.127 -0.10583,0.0423 -0.23283,0.0635 -0.33867,0.0635 -0.14816,0 -0.29633,-0.0212 -0.42333,-0.0635 -0.127,-0.0635 -0.23283,-0.127 -0.33866,-0.21167 -0.0847,-0.0847 -0.14817,-0.21167 -0.21166,-0.33866 -0.0423,-0.14817 -0.0635,-0.3175 -0.0635,-0.48683 0,-0.35983 0.0847,-0.635 0.27516,-0.8255 0.1905,-0.1905 0.4445,-0.29633 0.76199,-0.29633 0.127,0 0.23284,0.0212 0.35984,0.0635 0.10583,0.0212 0.21166,0.0635 0.31749,0.10583 v 0.40217 h -0.0212 c -0.10583,-0.0847 -0.21166,-0.14817 -0.33866,-0.1905 -0.10584,-0.0423 -0.23283,-0.0635 -0.33867,-0.0635 -0.1905,0 -0.35983,0.0635 -0.48683,0.1905 -0.10583,0.14816 -0.16933,0.33866 -0.16933,0.61383 0,0.25399 0.0635,0.44449 0.16933,0.57149 0.127,0.14817 0.27517,0.21167 0.48683,0.21167 0.0635,0 0.14817,0 0.21167,-0.0212 0.0847,-0.0212 0.14816,-0.0423 0.21166,-0.0847 0.0423,-0.0212 0.10584,-0.0423 0.14817,-0.0847 0.0423,-0.0212 0.0847,-0.0423 0.10583,-0.0635 h 0.0212 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path973"
d="m 90.36064,38.601151 c -0.0635,0 -0.127,0.0212 -0.21167,0.0423 -0.0847,0 -0.14816,0 -0.21166,0 -0.21167,0 -0.381,-0.0423 -0.48683,-0.16934 -0.10584,-0.10583 -0.16933,-0.29633 -0.16933,-0.55033 v -1.12182 h -0.23284 v -0.3175 h 0.23284 v -0.59266 h 0.35983 v 0.59266 h 0.71966 v 0.3175 h -0.71966 v 0.95249 c 0,0.10584 0,0.21167 0,0.27517 0,0.0423 0.0212,0.10583 0.0635,0.16933 0.0212,0.0423 0.0635,0.0847 0.10583,0.10583 0.0423,0.0212 0.127,0.0423 0.23283,0.0423 0.0423,0 0.10583,-0.0212 0.16933,-0.0212 0.0635,-0.0212 0.10584,-0.0423 0.14817,-0.0635 v 0 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path975"
d="m 92.60429,37.563991 c 0,0.33866 -0.0847,0.61382 -0.254,0.80432 -0.1905,0.21167 -0.42333,0.29633 -0.71966,0.29633 -0.29633,0 -0.52917,-0.0847 -0.71966,-0.29633 -0.16934,-0.1905 -0.254,-0.46566 -0.254,-0.80432 0,-0.35983 0.0847,-0.635 0.254,-0.8255 0.19049,-0.21166 0.42333,-0.29633 0.71966,-0.29633 0.29633,0 0.52916,0.0847 0.71966,0.29633 0.16933,0.1905 0.254,0.46567 0.254,0.8255 z m -0.35983,0 c 0,-0.27517 -0.0635,-0.48683 -0.16933,-0.61383 -0.10584,-0.14817 -0.254,-0.21167 -0.4445,-0.21167 -0.1905,0 -0.33867,0.0635 -0.4445,0.21167 -0.10583,0.127 -0.16933,0.33866 -0.16933,0.61383 0,0.25399 0.0635,0.46566 0.16933,0.59266 0.10583,0.14816 0.254,0.21166 0.4445,0.21166 0.1905,0 0.33866,-0.0635 0.4445,-0.21166 0.10583,-0.127 0.16933,-0.33867 0.16933,-0.59266 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path977"
d="m 94.48811,36.886661 h -0.0212 c -0.0635,-0.0212 -0.10584,-0.0212 -0.16933,-0.0212 -0.0423,-0.0212 -0.10584,-0.0212 -0.16934,-0.0212 -0.10583,0 -0.21166,0.0212 -0.31749,0.0847 -0.10584,0.0423 -0.1905,0.10583 -0.29633,0.16933 v 1.50282 h -0.35984 v -2.11665 h 0.35984 v 0.3175 c 0.14816,-0.10583 0.27516,-0.1905 0.38099,-0.23283 0.10583,-0.0423 0.21167,-0.0847 0.3175,-0.0847 0.0635,0 0.10583,0.0212 0.14816,0.0212 0.0212,0 0.0635,0 0.127,0.0212 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path979"
d="m 114.0883,37.775651 c 0,0.10583 -0.0212,0.23283 -0.0635,0.33867 -0.0635,0.10583 -0.127,0.19049 -0.21167,0.27516 -0.10583,0.0635 -0.23283,0.127 -0.35983,0.16933 -0.14817,0.0635 -0.29633,0.0847 -0.48683,0.0847 -0.21166,0 -0.381,-0.0212 -0.55033,-0.0635 -0.16933,-0.0423 -0.3175,-0.0847 -0.48683,-0.16933 v -0.46566 h 0.0212 c 0.14817,0.10583 0.29633,0.21166 0.48683,0.27516 0.1905,0.0635 0.35983,0.0847 0.52916,0.0847 0.23284,0 0.42333,-0.0423 0.55033,-0.127 0.127,-0.0847 0.1905,-0.1905 0.1905,-0.33866 0,-0.127 -0.0423,-0.23283 -0.0847,-0.27517 -0.0635,-0.0635 -0.16933,-0.10583 -0.29633,-0.14816 -0.0847,-0.0212 -0.1905,-0.0423 -0.29633,-0.0635 -0.10583,-0.0212 -0.23283,-0.0423 -0.35983,-0.0635 -0.254,-0.0423 -0.42333,-0.14817 -0.55033,-0.27517 -0.127,-0.127 -0.1905,-0.29633 -0.1905,-0.48683 0,-0.23283 0.10583,-0.44449 0.3175,-0.59266 0.1905,-0.14816 0.4445,-0.21166 0.74083,-0.21166 0.21166,0 0.38099,0 0.55033,0.0423 0.16933,0.0423 0.31749,0.0847 0.44449,0.14816 v 0.4445 h -0.0212 c -0.10583,-0.0847 -0.254,-0.16933 -0.42333,-0.23283 -0.1905,-0.0635 -0.35983,-0.0847 -0.55033,-0.0847 -0.19049,0 -0.35983,0.0423 -0.48683,0.127 -0.10583,0.0847 -0.16933,0.1905 -0.16933,0.3175 0,0.12699 0.0212,0.21166 0.0847,0.27516 0.0635,0.0635 0.16933,0.127 0.3175,0.14817 0.0847,0.0212 0.1905,0.0423 0.35983,0.0635 0.14816,0.0423 0.27516,0.0635 0.35983,0.0847 0.21166,0.0635 0.381,0.14816 0.48683,0.25399 0.10583,0.10584 0.14817,0.27517 0.14817,0.46567 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path981"
d="m 116.43778,38.579981 h -0.35983 v -1.20649 c 0,-0.0847 0,-0.1905 -0.0212,-0.27517 0,-0.0847 -0.0212,-0.14816 -0.0635,-0.1905 -0.0212,-0.0635 -0.0635,-0.0847 -0.127,-0.12699 -0.0635,-0.0212 -0.127,-0.0212 -0.23283,-0.0212 -0.0847,0 -0.1905,0.0212 -0.29633,0.0635 -0.10584,0.0423 -0.21167,0.10583 -0.3175,0.19049 v 1.56633 h -0.35983 v -2.94215 h 0.35983 v 1.05833 c 0.127,-0.0847 0.23283,-0.14817 0.35983,-0.21167 0.10583,-0.0423 0.23283,-0.0635 0.35983,-0.0635 0.23284,0 0.40217,0.0635 0.52917,0.1905 0.10583,0.14817 0.16933,0.33867 0.16933,0.59266 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path983"
d="m 118.76609,38.579981 h -0.35983 v -0.21167 c -0.0212,0.0212 -0.0635,0.0423 -0.127,0.0847 -0.0423,0.0423 -0.10583,0.0635 -0.14816,0.0847 -0.0635,0.0423 -0.127,0.0635 -0.21167,0.0847 -0.0635,0.0212 -0.16933,0.0212 -0.25399,0.0212 -0.1905,0 -0.35984,-0.0635 -0.48684,-0.19049 -0.14816,-0.127 -0.21166,-0.27517 -0.21166,-0.48683 0,-0.14817 0.0423,-0.27517 0.10583,-0.381 0.0635,-0.10583 0.16933,-0.16933 0.29633,-0.23283 0.127,-0.0635 0.27517,-0.10584 0.46567,-0.127 0.16933,-0.0212 0.381,-0.0212 0.57149,-0.0423 v -0.0423 c 0,-0.0847 0,-0.14817 -0.0423,-0.21167 -0.0212,-0.0423 -0.0635,-0.0847 -0.10583,-0.127 -0.0635,-0.0212 -0.127,-0.0423 -0.1905,-0.0635 -0.0635,0 -0.14816,0 -0.21166,0 -0.10583,0 -0.21167,0 -0.3175,0.0423 -0.127,0.0212 -0.23283,0.0423 -0.35983,0.10584 h -0.0212 v -0.381 c 0.0635,0 0.16933,-0.0212 0.29633,-0.0635 0.14816,-0.0212 0.27516,-0.0212 0.40216,-0.0212 0.14817,0 0.27517,0 0.381,0.0423 0.10583,0.0212 0.21166,0.0635 0.29633,0.127 0.0635,0.0423 0.127,0.127 0.16933,0.21166 0.0423,0.10584 0.0635,0.21167 0.0635,0.33867 z m -0.35983,-0.508 v -0.59266 c -0.10583,0 -0.23283,0.0212 -0.38099,0.0212 -0.14817,0.0212 -0.254,0.0423 -0.33867,0.0635 -0.10583,0.0212 -0.1905,0.0635 -0.254,0.127 -0.0635,0.0635 -0.0847,0.14816 -0.0847,0.254 0,0.127 0.0212,0.21166 0.10584,0.27516 0.0635,0.0635 0.1905,0.0847 0.33866,0.0847 0.127,0 0.23283,-0.0212 0.33867,-0.0635 0.10583,-0.0423 0.19049,-0.10583 0.27516,-0.16933 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path985"
d="m 121.32724,37.500491 c 0,0.16933 -0.0212,0.33866 -0.0847,0.46566 -0.0423,0.14817 -0.10583,0.27516 -0.21166,0.35983 -0.0847,0.10583 -0.16933,0.16933 -0.29633,0.23283 -0.10584,0.0423 -0.21167,0.0635 -0.33867,0.0635 -0.127,0 -0.21166,0 -0.3175,-0.0212 -0.0847,-0.0423 -0.16933,-0.0635 -0.25399,-0.127 v 0.889 h -0.35983 v -2.89981 h 0.35983 v 0.23283 c 0.0847,-0.0847 0.1905,-0.14817 0.31749,-0.21167 0.10584,-0.0423 0.23284,-0.0635 0.381,-0.0635 0.254,0 0.4445,0.0847 0.59266,0.27517 0.127,0.1905 0.21167,0.46566 0.21167,0.80433 z m -0.381,0.0212 c 0,-0.27517 -0.0423,-0.46567 -0.127,-0.59267 -0.0847,-0.10583 -0.21166,-0.16933 -0.40216,-0.16933 -0.10583,0 -0.1905,0.0212 -0.29633,0.0635 -0.10583,0.0423 -0.21166,0.0847 -0.29633,0.16933 v 1.2065 c 0.0847,0.0423 0.16933,0.0635 0.254,0.0847 0.0635,0.0212 0.14816,0.0212 0.254,0.0212 0.19049,0 0.33866,-0.0635 0.46566,-0.1905 0.10583,-0.14817 0.14816,-0.33867 0.14816,-0.59267 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path987"
d="m 123.65556,37.563991 h -1.56632 c 0,0.12699 0.0212,0.25399 0.0635,0.33866 0.0423,0.10583 0.0847,0.16933 0.14816,0.23283 0.0847,0.0635 0.14817,0.10583 0.23283,0.14817 0.10583,0.0212 0.1905,0.0423 0.3175,0.0423 0.127,0 0.27517,-0.0212 0.42333,-0.0847 0.14817,-0.0635 0.254,-0.127 0.3175,-0.16933 h 0.0212 v 0.38099 c -0.127,0.0635 -0.254,0.10583 -0.381,0.127 -0.127,0.0423 -0.254,0.0635 -0.381,0.0635 -0.35983,0 -0.635,-0.10583 -0.82549,-0.29633 -0.1905,-0.1905 -0.29633,-0.46566 -0.29633,-0.80433 0,-0.33866 0.0847,-0.61383 0.27516,-0.82549 0.1905,-0.21167 0.4445,-0.29633 0.76199,-0.29633 0.27517,0 0.48684,0.0635 0.65617,0.23283 0.14817,0.16933 0.23283,0.40216 0.23283,0.71966 z m -0.35983,-0.27517 c 0,-0.1905 -0.0423,-0.33866 -0.127,-0.42333 -0.10583,-0.10583 -0.23283,-0.16933 -0.42333,-0.16933 -0.1905,0 -0.35983,0.0635 -0.46567,0.16933 -0.10583,0.127 -0.16933,0.254 -0.19049,0.42333 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path989"
d="m 126.44954,35.764831 -1.03716,2.81515 h -0.50799 l -1.016,-2.81515 h 0.40217 l 0.88899,2.47648 0.88899,-2.47648 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path991"
d="m 127.2327,36.124661 h -0.40216 v -0.38099 h 0.40216 z m -0.0212,2.45532 h -0.35983 v -2.11665 h 0.35983 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path993"
d="m 129.68802,37.563991 h -1.56632 c 0,0.12699 0.0212,0.25399 0.0635,0.33866 0.0423,0.10583 0.0847,0.16933 0.14816,0.23283 0.0847,0.0635 0.14817,0.10583 0.23283,0.14817 0.10583,0.0212 0.1905,0.0423 0.3175,0.0423 0.127,0 0.27516,-0.0212 0.42333,-0.0847 0.14816,-0.0635 0.254,-0.127 0.3175,-0.16933 h 0.0212 v 0.38099 c -0.127,0.0635 -0.254,0.10583 -0.38099,0.127 -0.127,0.0423 -0.254,0.0635 -0.381,0.0635 -0.35983,0 -0.635,-0.10583 -0.82549,-0.29633 -0.1905,-0.1905 -0.29634,-0.46566 -0.29634,-0.80433 0,-0.33866 0.0847,-0.61383 0.27517,-0.82549 0.1905,-0.21167 0.4445,-0.29633 0.76199,-0.29633 0.27517,0 0.48683,0.0635 0.65616,0.23283 0.14817,0.16933 0.23284,0.40216 0.23284,0.71966 z m -0.35984,-0.27517 c 0,-0.1905 -0.0423,-0.33866 -0.12699,-0.42333 -0.10584,-0.10583 -0.23284,-0.16933 -0.42333,-0.16933 -0.1905,0 -0.35983,0.0635 -0.46567,0.16933 -0.10583,0.127 -0.16933,0.254 -0.19049,0.42333 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path995"
d="m 132.88416,36.463331 -0.55033,2.11665 h -0.33866 l -0.52917,-1.62982 -0.55033,1.62982 h -0.31749 l -0.5715,-2.11665 h 0.381 l 0.38099,1.65099 0.52917,-1.65099 h 0.29633 l 0.55033,1.65099 0.35983,-1.65099 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332"
inkscape:connector-curvature="0" />
<path
id="path997"
d="M 42.608991,62.752131 H 181.82113 V 118.33539 H 42.608991 Z"
style="fill:none;stroke:#ff9933;stroke-width:0.52916276px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
id="path999"
d="M 35.666376,55.280361 H 174.89968 V 110.86361 H 35.666376 Z"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#33cccc;stroke-width:0.52916276px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
id="path1001"
d="M 28.744927,47.808581 H 167.97823 V 103.39183 H 28.744927 Z"
style="fill:#9bbb59;fill-opacity:1;fill-rule:nonzero;stroke:#77933c;stroke-width:0.52916667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -1,200 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="165.36458mm"
height="99.483337mm"
viewBox="0 0 165.36458 99.483337"
version="1.1"
id="svg3064"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
sodipodi:docname="vinspector_elements.svg">
<defs
id="defs3058" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="261.33464"
inkscape:cy="225.25011"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:showpageshadow="false"
inkscape:window-width="1277"
inkscape:window-height="875"
inkscape:window-x="314"
inkscape:window-y="16"
inkscape:window-maximized="0" />
<metadata
id="metadata3061">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(201.36682,-127.81786)">
<rect
style="opacity:1;fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:#33cccc;stroke-width:0.52916667;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4147-0"
width="164.83542"
height="98.95417"
x="-201.10223"
y="128.08244"
inkscape:export-filename="D:\OCCT\master_CR27398_doc\dox\user_guides\qt_browsers\images\vinspector.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#93cddd;fill-opacity:1;fill-rule:evenodd;stroke:#33cccc;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4157-8"
width="155.951"
height="20.214758"
x="-197.10306"
y="132.31981"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\vinspector.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#93cddd;fill-opacity:1;fill-rule:evenodd;stroke:#33cccc;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4159-9"
width="155.55411"
height="39.471096"
x="-197.06837"
y="157.2328"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\vinspector.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.56444448;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-6"
width="109.47361"
height="11.118413"
x="-155.47618"
y="136.86798"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\vinspector.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.36620289;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-1-6"
width="30.417513"
height="11.316654"
x="-192.77927"
y="136.76886"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\vinspector.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-184.57181"
y="143.51102"
id="text5675-9"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\vinspector.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5677-2"
x="-184.57181"
y="143.51102"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Update</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-118.07398"
y="143.87196"
id="text5683-7"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\vinspector.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5685-7"
x="-118.07398"
y="143.87196"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Selection controls</tspan></text>
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.56444448;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-8-4"
width="79.254326"
height="23.947351"
x="-158.91849"
y="164.99469"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\vinspector.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666654px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222221px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-143.42757"
y="176.27301"
id="text5683-5-4"
transform="scale(0.98830373,1.0118347)"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\vinspector.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5685-3-59"
x="-143.42757"
y="176.27301"
style="font-size:3.83516741px;line-height:1.25;stroke-width:0.28222221px">Presentations tree view</tspan></text>
<rect
style="opacity:1;fill:#93cddd;fill-opacity:1;fill-rule:evenodd;stroke:#33cccc;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4157-8-7"
width="155.951"
height="20.214758"
x="-196.94507"
y="202.23282"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\vinspector.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.36620289;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-1-6-6"
width="147.01831"
height="11.316654"
x="-192.62131"
y="206.68187"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\vinspector.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666654px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222221px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-132.50854"
y="210.87439"
id="text5683-5-4-1"
transform="scale(0.98830373,1.0118347)"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\vinspector.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5685-3-59-8"
x="-132.50854"
y="210.87439"
style="font-size:3.83516741px;line-height:1.25;stroke-width:0.28222221px">History view</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -1,578 +0,0 @@
Inspector {#occt_user_guides__inspector}
===============================
@tableofcontents
@section occt_inspector_1 Introduction
This manual explains how to use Inspector.
@subsection occt_inspector_1_1 Overview
Inspector is a Qt-based library that provides functionality to interactively inspect low-level content of the OCAF data model, OCCT viewer and Modelisation Data.
This component is aimed to assist the developers of OCCT-based applications to debug the problematic situations that occur in their applications.
Inspector has a plugin-oriented architecture. The current release contains the following plugins:
| Plugin | OCCT component | Root class of OCCT investigated component |
| :----- | :----- | :----- |
| @ref occt_inspector_2_2 "DFBrowser"| OCAF | TDocStd_Application |
| @ref occt_inspector_2_3 "VInspector"| Visualization | AIS_InteractiveContext |
| @ref occt_inspector_2_4 "ShapeView"| Modelisation Data | TopoDS_Shape |
Each plugin implements logic of a corresponding OCCT component.
Each of the listed plugins is embeded in the common framework.
The user is able to manage which plugins should be loaded by Inspector.
Also he can extend number of plugins by implementing a new plugin.
@subsection occt_inspector_1_3 Getting started
There are two launch modes:
1. Launch **TInspectorEXE** executable sample. For more details see @ref occt_inspector_6 "TInspectorEXE" section;
2. Launch DRAW, load plugin INSPECTOR, and use **tinspector** command.
For more details see @ref occt_inspector_7 "Launch in DRAW Test Harness" section.
Note. If you have no Inspector library in your build directory, please make sure that OCCT is compiled with *BUILD_Inspector*
option ON. For more details see @ref occt_inspector_4 "Build procedure".
@section occt_inspector_2 Inspector
@subsection occt_inspector_2_1 Overview
Inspector consists of the following components:
* <b>buttons</b> to activate the corresponding plugin;
* <b>view area</b> to visualize the plugin content.
@figure{tinspector_elements.svg,"Plugins placement in Inspector",360}
@subsection occt_inspector_2_2 DFBrowser Plugin
@subsubsection occt_inspector_2_2_1 Overview
@figure{dfbrowser.png, "DFBrowser"}
This plugin visualizes content of TDocStd_Application in a tree view. It shows documents of the application,
hierarchy of TDF_Labels, content of TDF_Attributes and interconnection between attributes (e.g. references).
Additionally it has 3D view to visualize TopoDS_Shape elements stored in the document.
@subsubsection occt_inspector_2_2_2 Elements
@figure{dfbrowser_elements.svg, "DFBrowser Elements",360}
<b>OCAF tree view</b>
Each OCAF element has own tree view item:
| Type | Tree item | Text | Description |
| :----- | :----- | :----- | :----- |
| TDocStd_Application | Application | TDocStd_Application | It is the root of tree view. Children are documents.|
| TDocStd_Document | Document | entry : name | It is a child of Application item. Children are Labels and Attributes items.<br> Text view is an entry of the root label and the value of TDataStd_Name attribute for the label if it exists. |
| TDF_Label | Label | entry : name | It is a child of a Document or another Label item. Children and text view are the same as for Document item. |
| TDF_Attribute | Attribute | attribute type [additional information] | It is a child of a Label. It has no children. <br> Text view is the attribute type (DynamicType()->Name() of TDF_Attribute) and additional information (a combination of attribute values) |
Additional information of TDF_Attributes:
| Type | Text |
| :----- | :----- |
| TDocStd_Owner | [storage format] |
| TDataStd_AsciiString,<br> TDataStd_Name,<br> TDataStd_Real,<br> @ref occt_attribute_simple_types "other Simple types" | [value] |
| TDataStd_BooleanList,<br> TDataStd_ExtStringList,<br> @ref occt_attribute_list_types "other List types" | [value_1 ... value_n] |
| TDataStd_BooleanArray,<br> TDataStd_ByteArray,<br> @ref occt_attribute_array_types "other Array types" | [value_1 ... value_n] |
| TDataStd_TreeNode | [tree node ID ==> Father()->Label()] (if it has father) or <br> [tree node ID <== First()->Label()] (if it has NO father)|
| TDataStd_TreeNode(XDE) | [@ref occt_attribute_xde_tree_node_id "XDE tree node ID" ==> Father()->Label()] (if it has father), <br> [@ref occt_attribute_xde_tree_node_id "XDE tree Node ID" <== label_1, ..., label_n] (if it has NO father)|
| TNaming_NamedShape | [shape type : evolution] |
| TNaming_UsedShapes | [map extent] |
Custom color of items:
| OCAF element Type | Color |
| :----- | :----- |
| TDF_Label | <b>dark green</b>, if the label has TDataStd_Name attribute, <br><b>light grey</b> if the label is empty (has no attributes on all levels of hierarchy),<br> <b>black</b> otherwise |
| TNaming_NamedShape | <b>dark gray</b> for TopAbs_FORWARD orientation of TopoDS_Shape, <br> <b>gray</b> for TopAbs_REVERSED orientation of TopoDS_Shape, <br> <b>black</b> for other orientation |
Context popup menu:
| Action | Functionality |
| :----- | :----- |
| Expand | Expands the next two levels under the selected item |
| Expand All | Expands the whole tree of the selected item |
| Collapse All | Collapses the whole tree of the selected item |
<b>Property Panel</b>
Property panel is used to display content of Label or Attribute tree view items.
This control is used for content of Label or Attribute tree view items or Search result view.
Information is usually shown in one or several tables.
TDF_Attribute has the following content in Property Panel:
<table>
<tr><th>Type</th><th>Description</th><th>Content</th></tr>
<tr><td>TDF_Label</td>
<td> a table of [entry or attribute name, value]</td>
<td>@figure{property_panel_label.png, "",140}</td></tr>
<tr><td>TDocStd_Owner,<br> @ref occt_attribute_simple_types "Simple types", <br> @ref occt_attribute_list_types "List types"</td>
<td>a table of [method name, value]</td>
<td>@figure{property_panel_simple_type.png, "",140}</td></tr>
<tr><td>TDataStd_BooleanArray,<br> TDataStd_ByteArray,<br> @ref occt_attribute_array_types "other Array types"</td>
<td>2 controls: <br> * a table of [array bound, value], <br> * table of [method name, value]</td>
<td>@figure{property_panel_array.png, "",140}</td></tr>
<tr><td>TDataStd_TreeNode</td>
<td>2 controls: <br> * a table of [Tree ID, value] (visible only if Tree ID() != ID()), <br> * a tree view of tree nodes starting from Root() of the tree node. The current tree node has <b>dark blue</b> text.</td>
<td>@figure{property_panel_tree_node.png, "",140} </td></tr>
<tr><td>TDataStd_NamedData</td>
<td>tab bar of attribute elements, each tab has a table of [name, value]</td>
<td>@figure{property_panel_named_data.png, "",140}</td></tr>
<tr><td>TNaming_UsedShapes</td>
<td>a table of all the shapes handled by the framework</td>
<td>@figure{property_panel_tnaming_used_shapes.png, "",140}</td></tr>
<tr><td>TNaming_NamedShape</td>
<td>2 controls: <br> * a table of [method name, value] including CurrentShape/OriginalShape methods result of TNaming_Tools, <br> * an evolution table. <br> Tables contain buttons for @ref occt_shape_export "TopoDS_Shape export".</td>
<td>@figure{property_panel_tnaming_named_shape.png, "",140}</td></tr>
<tr><td>TNaming_Naming</td>
<td>2 controls: <br> * a table of TNaming_Name vlaues,<br> * a table of [method name, value]</td>
<td>@figure{property_panel_tnaming_naming.png, "",140}</td></tr>
</table>
<b>Dump view</b>
@figure{dump_attribute.png, "Dump of TDF_Attribute"}
Dump view shows result of <b>TDF_Attribute::Dump()</b> or <b>TDF_Label::Dump()</b> of selected tree view item.
<b>3D view</b>
3D View visualizes TopoDS_Shape elements of OCAF attribute via AIS facilities.
DFBrowser creates two kinds presentations depending on the selection place:
<table>
<tr><th>Kind</th><th>Source object</th><th>Visualization propeties</th><th>View</th></tr>
<tr><td>Main presentation</td>
<td>Tree view item:<br> TPrsStd_AISPresentation,<br> TNaming_NamedShape,<br> TNaming_Naming</td>
<td>Color: a default color for shape type of the current TopoDS_Shape</td>
<td>@figure{display_main_presentation.png, "",100}</td></tr>
<tr><td>Additional presentation</td>
<td>References in Property panel</td>
<td>Color: white</td>
<td>@figure{display_additional_presentation.png, "",100}</td></tr>
</table>
<b>Tree Navigation</b>
Tree Navigation shows a path to the item selected in the tree view.
The path is a sequence of label entries and attribute type name.
Each element in the path is selectable - the user can click on it to select the corresponding tree view item.
Navigation control has buttons to go to the previous and the next selected tree view items.
<b>Update Button</b>
Update button synchronizes content of tree view to the current content of OCAF document that could be modified outside.
<b>Search</b>
The user can search OCAF element by typing:
* TDF_Label entry,
* TDF_Attribute name,
* TDataStd_Name and TDataStd_Comment attributes value.
@figure{search.png,"Search"}
As soon as the user confirms the typed criteria, the Property panel is filled by all satisfied values.
The user can click a value to hightligt the corresponding tree view item. By double click the item will be selected.
@subsubsection occt_inspector_2_2_3 Elements cooperation
<b>Tree item selection</b>
Selection of tree view item updates content of the following controls:
* Navigation line
* Property Panel
* 3D View (if it is possible to create an interactive presentation)
* Dump View
@figure{dfbrowser_selection_in_tree_view.svg,"",360}
<b>Property Panel item selection </b>
If property panel shows content of TDF_Label:
* selection of the table row hightlights the corresponding item in tree view,
* double click on the table row selects this item in tree view.
If property panel shows content of TDF_Attribute that has reference to another attribute, selection of this reference:
* highlights the referenced item in TreeView,
* displays additional presentation in 3D view if it can be created.
@figure{property_panel_item_selection.svg,"",360}
Attributes having references:
| Type | Reference | Additional presentation
| :----- | :----- | :----- |
| TDF_Reference | TDF_Label | |
| TDataStd_ReferenceArray, <br> TDataStd_ReferenceList, <br> TNaming_Naming | one or several TDF_Label in a container | |
| TDataStd_TreeNode | TDF_Label | |
| TNaming_NamedShape | TDF_Label in Evolution table | selected TopoDS_Shapes in property panel tables |
| TNaming_UsedShapes | one or several TNaming_NamedShape | TopoDS_Shapes of selected TNaming_NamedShape |
@subsubsection occt_shape_export TopoDS_Shape export
Property panel of TNaming_NamedShape attribute has controls to export TopoDS_Shape to:
* BREP. The save file dialog is started to enter the result file name,
* @ref occt_inspector_2_4 "ShapeView" plugin. Dialog about exporting element to ShapeView is shown with a possibility to activate this plugin immediatelly.
@subsection occt_inspector_2_3 VInspector Plugin
@subsubsection occt_inspector_2_3_1 Overview
@figure{vinspector.png, "VInspector"}
It visualizes interactive objects displayed in AIS_InteractiveContext in a tree view with columputed selection
components for each presentation. It shows the selected elements in the context and allows to select these elements.
@subsubsection occt_inspector_2_3_2 Elements
@figure{vinspector_elements.svg,"VInspector Elements",360}
<b>Presentations tree view</b>
It shows presentations and selection computed of them. Also, the view has columns with information about state of visualization elements.
VInspector tree items.
| Type | Description |
| :----- | :----- |
| AIS_InteractiveContext | It is the root of tree view. Children are interactive objects obtained by *DisplayedObjects* and *ErasedObjects* methods.|
| AIS_InteractiveObject | It is a child of AIS_InteractiveContext item. Children are SelectMgr_Selection obtained by iteration on *CurrentSelection* |
| SelectMgr_Selection | It is a child of AIS_InteractiveObject. Children are SelectMgr_SensitiveEntity obtaining by iteration on *Sensitive* |
| SelectMgr_SensitiveEntity | It is a child of SelectMgr_Selection. Children are SelectMgr_SensitiveEntity obtaining by iteration on *OwnerId* |
| SelectBasics_EntityOwner | It is a child SelectMgr_SensitiveEntity. It has no children. |
Custom color of tree view items:
| OCAF element Type | Column | What | Color |
| :----- | :----- | :----- | :----- |
| AIS_InteractiveObject | 0 | Text | <b>dark gray</b>, it is in *ErasedObjects* list of AIS_InteractiveContext,<br> <b>black</b> otherwise |
| AIS_InteractiveObject, <br> SelectMgr_SensitiveEntity, <br> SelectBasics_EntityOwner| 1 | Background | <b>dark blue</b>, if there is a selected owner under the item, <br> <b>black</b> otherwise |
| SelectMgr_Selection,<br> SelectMgr_SensitiveEntity,<br> SelectBasics_EntityOwner| all | Text | <b>dark gray</b>, if *SelectionState* of SelectMgr_Selection is not *SelectMgr_SOS_Activated*,<br> <b>black</b> otherwise |
Context popup menu in tree view:
| Action | Item | Functionality |
| :----- | :----- | :----- |
| Export to ShapeView | AIS_InteractiveObject | Exports TopoDS_Shape of AIS_Interactive presentation to ShapeView plugin. <br> It should be AIS_Shape presentation and ShapeView plugin should be registered in Inspector<br> Dialog about exporting element to ShapeView is shown with a possibility to activate this plugin immediatelly. |
| Show | AIS_InteractiveObject | *Display* presentation in AIS_InteractiveContext |
| Hide | AIS_InteractiveObject | *Erase* presentation from AIS_InteractiveContext |
<b>Update</b>
It synchronizes content of the plugin to the current state of AIS_InteractiveContext.
It updates the presence of items and the current selection for the items.
<b>Selection controls</b>
Selection controls switch on/off the posibility to set selection in the context from VInspector plugin.
| Action | Tree view item | Functionality |
| :----- | :----- | :----- |
| Select Presentations | AIS_InteractiveObject | Calls *AddOrRemoveSelected* of interactive object for the selected item |
| Select Owners | SelectMgr_EntityOwner or <br> SelectMgr_SensitiveEntity | Calls *AddOrRemoveSelected* of SelectMgr_EntityOwner for the selected item |
Please note, that the initial selection in context will be cleared.
If the button is toggled, the button selection is active. Only one button may be toggled at the moment.
<b>History view</b>
At present the History view is under implementation and may be used only in a custom application where Inspector is loaded.
To fill this view, VInspectorAPI_CallBack should be redefined in the application and send signals about some actions applyed to context.
After, the call back should be given as parameter in the plugin.
If done, new items will be created in the history view for each action.
@subsubsection occt_inspector_2_3_3 Elements cooperation
Vinspector markes current selected presentations in AIS_InteractiveContext with blue background in tree items. Use "Update" button to synchronize VInspector selected items state to the context.
It is also possible to perform selection in context using "Selection controls" VInspector. However, it should be performed carefully as
it clears the current selection in AIS_InteractiveContext.
Selection change:
| From | To | Action | Result |
| :----- | :----- | :----- | :----- |
| AIS_InteractiveContext | VInspector | perform selection in AIS_InteractiveContext | Click "Update" button in VInspector and check "Selection" column: <br> AIS_InteractiveContext item has anount of selected objects,<br> some of AIS_InteractiveObject have filled value if it selection happens for this presentation or entity owner of it |
| VInspector | AIS_InteractiveContext | activate one of Selection controls and select one or several elements in tree view | The objects become selected in AIS_InteractiveContext |
@subsection occt_inspector_2_4 ShapeView Plugin
@subsubsection occt_inspector_2_4_1 Overview
@figure{shapeview.png, "ShapeView"}
This plugin visualizes content of TopoDS_Shape in a tree view.
@subsubsection occt_inspector_2_4_2 Elements
@figure{shapeview_elements.svg,"ShapeView Elements",360}
<b>TopoDS_Shape View</b>
Elements of the view are TopoDS_Shape objects.
This shape is exploded into sub-shapes using TopoDS_Iterator of the TopoDS_Shape.
Child sub-shapes are presented in the view as children of the initial shape.
Iterating recursively by all shapes we obtain a tree view of items shown in the ShapeView.
Columns of the View show some information about TopoDS_Shape of the item.
The most informative column is the last column of TopoDS_Vertex and TopoDS_Edge shape types.
For TopoDS_Vertex it contains the point coordinates,
for TopoDS_Edge it contains the first and the last point coordinates, the edge length and some other parameters.
Context popup menu in tree view:
| Action | Functionality |
| :----- | :----- |
| Load BREP file | Opens selected file and appends the result TopoDS_Shape into tree view |
| Remove all shape items | Clears tree view |
| BREP view | Shows text view with BREP content of the selected item. It creates BREP file in temporary directory of the plugin. |
| Close All BREP views | Closes all opened text views |
| BREP directory | Displays folder where temporary BREP files have been stored. |
@subsubsection occt_inspector_2_4_3 Elements cooperation
Selection of one or several items in TopoDS_Shape View creates AIS_Shape presentation for it and displays it in the 3D View.
@section occt_inspector_3 Common controls
@subsection occt_inspector_3_1 3D View
@subsubsection occt_inspector_3_1_1 Overview
@figure{3DView.png, "3D View"}
Control for OCCT 3D viewer. It creates visualization view components with possibilities to perform some
user actions for the view.
@subsubsection occt_inspector_3_1_2 Elements
@figure{3DView_elements.svg,"3DView Elements"}
3D View contains:
| Element | Functionality |
| :----- | :----- |
| 3D view | V3d viewer with mouse events processing |
| Context | choice of another context that should be used in the plugin. <br> It is possible to use the next contexts:<br> Own - context of this view, <br> External - context come in parameters which intializes plugin, <br> None - do not perform visualization at all |
| Multi/Single | Buttons defined what to do with the previous displayed objects: <br> Multi displays new presentations in additional to already displayed, <br> Single removes all previuos displayed presentations |
| Clean | Removes all displayed presentations |
| Fit All,<br> Fit Area,<br> Zoom,<br> Pan,<br> Rotation | Scene manipulation actions |
| Display Mode | Sets *AIS_Shading* or *AIS_WireFrame* display mode for all presentations |
@section occt_inspector_6 TInspectorEXE sample
Inspector functionality can be tried using this sample.
Use *inspector.bat* script file placed in binary directory of OCCT to launch it.
This script accepts the names of plugin's DLL that should be loaded. By default it loads all described above plugins.
@figure{TStandaloneEXE.png, "TStandaloneEXE"}
Click on the Open button shows the dialog to select a file. The user is able to select one of the sample files or load own one.
@figure{TStandaloneEXE_open.png, ""}
Depending on the active plugin, the following files should be selected in the dialog:
OCAF document or STEP files for DFBRowser and BREP files for VInspector and ShapeView plugins.
It is possible to click the file name in the proposed directory, enter it manually or using Browser button.
The last Loading icon becomes enabled if file name is correct.
By default TInspectorEXE opens the next files for plugins:
| Plugin DLL library name | Files |
| :----- | :----- |
| TKDFBrowser | step/screw.step |
| TKVInspector | occ/hammer.brep |
| TKShapeView | occ/face1.brep, <br> occ/face2.brep |
These files are found relatively *CSF_OCCTDataPath*.
Source code of TIspectorEXE is a good sample for @ref occt_inspector_8 "Using Inspector in a custom application".
@section occt_inspector_7 Launch in DRAW Test Harness
TKToolsDraw plugin is created to provide DRAW commands for Qt tools. Use INSPECTOR parameter of @ref occt_draw_1_3_3 "pload"
command to download commands of this library. It contains tinspector command to start Inspector under DRAW.
See more detailed description of the @ref occt_draw_13_1 "tinspector" command.
The simple code to start Inspector with all plugins loaded:
~~~~~
pload INSPECTOR
tinspector
~~~~~
@figure{drawexe_tinspector.png,"tinspector"}
Result of this command is the next:
- all available Plugins are presented in the Inspector. These are @ref occt_inspector_2_2 "DFBrowser", @ref occt_inspector_2_3 "VInspector" and @ref occt_inspector_2_4 "ShapeView".
- DFBrowser is an active plugin
- tree of OCAF is empty.
After, we should create objects in DRAW and update tinspector.
@section occt_inspector_8 Using in a custom application
To use Inspector in an application, the next steps should be done:
* Set dependencies to OCCT and Qt in application (Header and Link)
* Create an instance of TInspector_Communicator.
* Register plugins of interest in the communicator by DLL library name
* Initialize communicator with objects that will be investigated
* Set visible true for commumicator
C++ code is similar:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
#include <inspector/TInspector_Communicator.hxx>
static TInspector_Communicator* MyTCommunicator;
void CreateInspector()
{
NCollection_List<Handle(Standard_Transient)> aParameters;
//... append parameters in the list
if (!MyTCommunicator)
{
MyTCommunicator = new TInspector_Communicator();
MyTCommunicator->RegisterPlugin ("TKDFBrowser");
MyTCommunicator->RegisterPlugin ("TKVInspector");
MyTCommunicator->RegisterPlugin ("TKShapeView");
MyTCommunicator->Init (aParameters);
MyTCommunicator->Activate ("TKDFBrowser");
}
MyTCommunicator->SetVisible (true);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Plugin | to be initialized by |
| :----- | :----- |
| TKDFBrowser | TDocStd_Application |
| TKVInspector | AIS_InteractiveContext |
| TKShapeView | TopoDS_TShape |
@section occt_inspector_4 Build procedure
By default the Inspector compilation is off.
To compile it, set the <b>BUILD_Inspector</b> flag to "ON". See @ref build_cmake_conf "Configuration process".
When this option is switched On, MS Visual Studio project has an additional tree of folders:
@figure{VStudio_projects.png,"Inspector packages in MS Visual Studio"}
@section occt_inspector_5 Sources and packaging
OCCT sources are extended by the /tools directory.
Distribution of packages participated in plugins:
| Sources packages| Plugin |
| :----- | :----- |
| DFBrowser, <br> DFBrowserPane, <br> DFBrowserPaneXDE, <br> TKDFBrowser | DFBrowser |
| VInspector, <br> TKVInspector | VInspector |
| ShapeView, <br> TKShapeView | ShapeView |
Other packages:
| Sources packages| Used in |
| :----- | :----- |
| TInspectorAPI, <br> TKInspectorAPI | Iterface for connection to plugin. |
| TreeModel, <br> TKTreeView | Items-oriented model to simplify work with GUI tree control. |
| View, <br> TKView | 3D View component |
| TInspector, <br> TKTInspector | Inspector window where plugins are placed |
| ToolsDraw, <br> TKToolsDraw | Plugin for DRAW to start Inspector |
In MSVC studio the separate folder contains Inspector projects.
@section occt_inspector_9 Glossary
* **Component** -- OCCT part, e.g. OCAF, VISUALIZATION, MODELING and others.
* **Plugin** -- library that is loaded in some executable/library. Here, the plugins are:
* DFBrowser,
* ShapeView,
* VInspector.
@subsection occt_attribute_simple_types TDF_Attribute Simple types
Types where the content is a single value
| Type | Kind of value |
| :----- | :----- |
| TDataStd_AsciiString | TDataStd_AsciiString |
| TDataStd_Comment | TCollection_ExtendedString |
| TDataStd_Integer | Standard_Integer |
| TDataStd_Name | TCollection_ExtendedString |
| TDataStd_Real | Standard_Real |
| TDF_Reference | TDF_Label |
| TDF_TagSource | Standard_Integer |
@subsection occt_attribute_list_types TDF_Attribute List types
| Type | Kind of value (container of) |
| :----- | :----- |
| TDataStd_BooleanList | Standard_Boolean |
| TDataStd_ExtStringList | TCollection_ExtendedString |
| TDataStd_IntegerList | Standard_Integer |
| TDataStd_RealList | Standard_Real |
| TDataStd_ReferenceList | TDF_Label |
@subsection occt_attribute_array_types TDF_Attribute Array types
| Type | Kind of value (container of) |
| :----- | :----- |
| TDataStd_BooleanArray | Standard_Boolean |
| TDataStd_ByteArray | Standard_Byte |
| TDataStd_ExtStringArray | TCollection_ExtendedString |
| TDataStd_IntegerArray | Standard_Integer |
| TDataStd_RealArray | Standard_Real |
| TDataStd_ReferenceArray | TDF_Label |
@subsection occt_attribute_xde_tree_node_id XDE tree node ID description
| GUID | Text |
| :----- | :----- |
| XCAFDoc::ShapeRefGUID() | Shape Instance Link |
| XCAFDoc::ColorRefGUID (XCAFDoc_ColorGen) | Generic Color Link |
| XCAFDoc::ColorRefGUID (XCAFDoc_ColorSurf) | Surface Color Link |
| XCAFDoc::ColorRefGUID (XCAFDoc_ColorCurv) | Curve Color Link |
| XCAFDoc::DimTolRefGUID() | DGT Link |
| XCAFDoc::DatumRefGUID() | Datum Link |
| XCAFDoc::MaterialRefGUID() | Material Link |

View File

@@ -17,5 +17,4 @@ OCCT User Guides are organized by OCCT modules:
* @subpage occt_user_guides__xde "Extended Data Exchange (XDE)"
* @subpage occt_user_guides__ocaf "Open CASCADE Application Framework (OCAF)"
* @subpage occt_user_guides__tobj "TObj package"
* @subpage occt_user_guides__test_harness "DRAW Test Harness"
* @subpage occt_user_guides__inspector "Inspector"
* @subpage occt_user_guides__test_harness "DRAW Test Harness"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

View File

@@ -91,26 +91,6 @@ XDE can read and write colors and layers assigned to shapes or their subparts (d
@figure{/user_guides/xde/images/xde_image006.png,"Colors and Layers",240}
@subsection occt_xde_1_7 Custom notes
Custom notes is a kind of application specific data attached to assembly items, their attributes and sub-shapes. Basically, there are simple textual comments, binary data and other application specific data. Each note is provided with a timestamp and the user created it.
Notes API provides the following functionality:
* Returns total number of notes and annotated items
* Returns labels for all notes and annotated items
* Creates notes:
- Comment note from a text string
- Binary data note from a file or byte array
* Checks if an assembly item is annotated
* Finds a label for the annotated item
* Returns all note labels for the annotated item
* Add a note to item(s):
- Assembly item
- Assembly item attribute
- Assembly item subshape index
* Remove note(s) from an annotated assembly item; orphan note(s) might be deleted optionally (items without linked notes will be deleted automatically)
* Delete note(s) and removes them from annotated items
* Get / delete orphan notes
@section occt_xde_2 Working with XDE
@@ -627,136 +607,6 @@ To remove a Color and all the references to it (so that the related shapes will
myColors->RemoveColor(ColLabel);
~~~~~
@subsection occt_xde_2_7 Custom notes
In an XDE document, custom notes are managed by the class *XCAFDoc_NotesTool*. This is done with the same principles as for ShapeTool with Shapes, and with the same capability of having a tool on the Main Label, or on any sub-label. The Property itself is defined as sub-classes of an *XCAFDoc_Note* abstract class, which is a sub-class of *TDF_Attribute* one.
Custom notes are stored in a child of the *XCAFDoc_NotesTool* label: it is at label 0.1.9.1. Each note then corresponds to a dedicated label. A note may be attached to a document item identified by a label, a sub-shape identified by integer index or an attribute identified by GUID. Annotations are stored in a child of the *XCAFDoc_NotesTool* label: it is at label 0.1.9.2.
Notes binding is done through *XCAFDoc_GraphNode* attribute.
@figure{/user_guides/xde/images/xde_notes001.png,"Structure of notes part of XCAF document",240}
@subsubsection occt_xde_2_7_1 Initialization
To query, edit, or initialize a Document to handle custom notes of XCAF, use:
~~~~~
Handle(XCAFDoc_NotesTool) myNotes =
XCAFDoc_DocumentTool::NotesTool(Doc->Main ());
~~~~~
This call can be used at any time. The first time it is used, a relevant structure is added to the document. This definition is used for all the following notes calls and will not be repeated for these.
@subsubsection occt_xde_2_7_2 Creating Notes
Before annotating a Document item a note must be created using one of the following methods of *XCAFDoc_NotesTool* class:
- CreateComment : creates a note with a textual comment
- CreateBinData : creates a note with arbitrary binary data, e.g. contents of a file
Both methods return an instance of *XCAFDoc_Note* class.
~~~~~
Handle(XCAFDoc_NotesTool) myNotes = ...
Handle(XCAFDoc_Note) myNote = myNotes->CreateComment("User", "Timestamp", "Hello, World!");
~~~~~
This code adds a child label to label 0.1.9.1 with *XCAFDoc_NoteComment* attribute.
@subsubsection occt_xde_2_7_3 Editing a Note
An instance of *XCAFDoc_Note* class can be used for note editing.
One may change common note data.
~~~~~
myNote->Set("New User", "New Timestamp");
~~~~~
To change specific data one need to down cast *myNote* handle to the appropriate sub-class:
~~~~~
Handle(XCAFDoc_NoteComment) myCommentNote = Handle(XCAFDoc_NoteComment)::DownCast(myNote);
if (!myCommentNote.IsNull()) {
myCommentNote->Set("New comment");
}
~~~~~
@subsubsection occt_xde_2_7_4 Adding Notes
Once a note has been created it can be bound to a Document item using the following *XCAFDoc_NotesTool* methods:
- AddNote : binds a note to a label
- AddNoteToAttr : binds a note to a label's attribute
- AddNoteToSubshape : binds a note to a sub-shape
All methods return a pointer to *XCAFDoc_AssemblyItemRef* attribute identifying the annotated item.
~~~~~
Handle(XCAFDoc_NotesTool) myNotes = ...
Handle(XCAFDoc_Note) myNote = ...
TDF_Label theLabel; ...
Handle(XCAFDoc_AssemblyItemRef) myRef = myNotes->AddNote(myNote->Label(), theLabel);
Standard_GUID theAttrGUID; ...
Handle(XCAFDoc_AssemblyItemRef) myRefAttr = myNotes->AddNoteToAttr(myNote->Label(), theAttrGUID);
Standard_Integer theSubshape = 1;
Handle(XCAFDoc_AssemblyItemRef) myRefSubshape = myNotes->AddNoteToSubshape(myNote->Label(), theSubshape);
~~~~~
This code adds three child labels to label 0.1.9.2 with *XCAFDoc_AssemblyItemRef* attribute with *XCAFDoc_GraphNode* attributes added to this and note labels.
@subsubsection occt_xde_2_7_5 Finding Notes
To find annotation labels under label 0.1.9.2 use the following *XCAFDoc_NotesTool* methods:
- FindAnnotatedItem : returns an annotation label for a label
- FindAnnotatedItemAttr : returns an annotation label for a label's attribute
- FindAnnotatedItemSubshape : returns an annotation label for a sub-shape
~~~~~
Handle(XCAFDoc_NotesTool) myNotes = ...
TDF_Label theLabel; ...
TDF_Label myLabel = myNotes->FindAnnotatedItem(theLabel);
Standard_GUID theAttrGUID; ...
TDF_Label myLabelAttr = myNotes->FindAnnotatedItemAttr(theLabel, theAttrGUID);
Standard_Integer theSubshape = 1;
TDF_Label myLabelSubshape = myNotes->FindAnnotatedItemSubshape(theLabel, theSubshape);
~~~~~
Null label will be returned if there is no corresponding annotation.
To get all notes of the Document item use the following *XCAFDoc_NotesTool* methods:
- GetNotes : outputs a sequence of note labels bound to a label
- GetAttrNotes : outputs a sequence of note labels bound to a label's attribute
- GetAttrSubshape : outputs a sequence of note labels bound to a sub-shape
All these methods return the number of notes.
~~~~~
Handle(XCAFDoc_NotesTool) myNotes = ...
TDF_Label theLabel; ...
TDF_LabelSequence theNotes;
myNotes->GetNotes(theLabel, theNotes);
Standard_GUID theAttrGUID; ...
TDF_LabelSequence theNotesAttr;
myNotes->GetAttrNotes(theLabel, theAttrGUID, theNotesAttr);
Standard_Integer theSubshape = 1;
TDF_LabelSequence theNotesSubshape;
myNotes->GetAttrSubshape(theLabel, theSubshape, theNotesSubshape);
~~~~~
@subsubsection occt_xde_2_7_6 Removing Notes
To remove a note use one of the following *XCAFDoc_NotesTool* methods:
- RemoveNote : unbinds a note from a label
- RemoveAttrNote : unbinds a note from a label's attribute
- RemoveSubshapeNote : unbinds a note from a sub-shape
~~~~~
Handle(XCAFDoc_Note) myNote = ...
TDF_Label theLabel; ...
myNotes->RemoveNote(myNote->Label(), theLabel);
Standard_GUID theAttrGUID; ...
myRefAttr = myNotes->RemoveAttrNote(myNote->Label(), theAttrGUID);
Standard_Integer theSubshape = 1;
myNotes->RemoveSubshapeNote(myNote->Label(), theSubshape);
~~~~~
A note will not be deleted automatically.
Counterpart methods to remove all notes are available too.
@subsubsection occt_xde_2_7_7 Deleting Notes
To delete note(s) use the following *XCAFDoc_NotesTool* methods:
- DeleteNote : deletes a single note
- DeleteNotes : deletes a sequence of notes
- DeleteAllNotes : deletes all Document notes
- DeleteOrphanNotes : deletes notes not bound to Document items
All these methods excepting the last one break all links with Document items as well.
@subsection occt_xde_2_8 Reading and Writing STEP or IGES
Note that saving and restoring the document itself are standard OCAF operations. As the various previously described definitions enter into this frame, they will not be explained any further.

View File

@@ -1,11 +1,4 @@
OCCT sample for iOS {#occt_samples_ios_uikit}
==================
UIKitSample consists of the Open CASCADE 3D Viewer which provides import of STEP files and toolbar with three buttons.
The first and second buttons serve for import hardcoded STEP files. The third button displays "About" dialog.
The viewer supports zoom, pan and rotate actions. The viewer supports selection of solids as well.
// This file contains a description of the UIKitSample and step-by-step instructions how to build and run it.
Installation and configuration:
1. Make sure you are running Mac OS version 10.12.1 or above and properly installed XCode version 8.1 or above.
@@ -16,3 +9,8 @@ Installation and configuration:
6. Select the UIKitSample and go to the "Build Settings" tab. After go to the section "Search Paths" and in the field "Header Search Paths" specify a path to the OCCT inc folder. Next in the field "Library Search Paths" specify a path/paths to the OCCT static libraries and Freetype2 static library folders.
7. Connect device and build sample for device or choose simulator as a target and build for simulator.
8. Run sample.
Description:
UIKitSample consists of the Open CASCADE 3D Viewer which provides import of STEP files and toolbar with three buttons.
The first and second buttons serve for import hardcoded STEP files. The third button displays "About" dialog.
The viewer supports zoom, pan and rotate actions. The viewer supports selection of solids as well.

View File

@@ -9,8 +9,6 @@ pload VISUALIZATION
vinit View1 w=1024 h=1024
vclear
vdefaults -autoTriang 0
vrenderparams -stats basic
# parameter NB defines number of spheres by each coordinate
set NB 10
@@ -25,12 +23,11 @@ for {set i 0} {$i < $NB} {incr i} {
}
}
}
eval compound $slist c
incmesh c 0.006
puts "Measuring FPS of display of spheres as separate objects..."
vaxo
eval vdisplay -dispMode 1 $slist
vsetdispmode 1
eval vdisplay $slist
vfit
# measure FPS
@@ -38,14 +35,16 @@ puts [set fps_separate [vfps]]
vclear
puts "Measuring FPS of display of spheres as single object..."
vdisplay -dispMode 1 c
eval compound $slist c
vdisplay c
# measure FPS
puts [set fps_compound [vfps]]
vclear
# redisplay individual spheres, trying to avoid unnecessary internal updates
eval vdisplay -dispMode 1 $slist
#vfrustumculling 0 ;# try to disable updates of frustum culling structures
eval vdisplay -mutable $slist
# auxiliary procedure to make random update of variable
proc upd {theValueName theDeltaName theTime theToRand} {
@@ -70,10 +69,8 @@ proc animateSpheres {{theDuration 10.0}} {
for {set i 0} {$i < $::NB} {incr i $nb} {
for {set j 0} {$j < $::NB} {incr j $nb} {
for {set k 0} {$k < $::NB} {incr k $nb} {
# mark animated spheres mutable for faster updates
uplevel #0 vdisplay -dispMode 1 -mutable s$i$j$k
# vaspects -noupdate s$i$j$k -setcolor red -setmaterial plastic
uplevel #0 vaspects -noupdate s$i$j$k -setcolor red
vaspects -noupdate s$i$j$k -setcolor red
set x$i$j$k 0.0
set y$i$j$k 0.0
set z$i$j$k 0.0
@@ -145,4 +142,4 @@ puts "Animation FPS: $fps_animation"
puts ""
puts "Scene contains [lindex [trinfo c] 3] triangles"
puts ""
puts "Print 'animateSpheres 10.0' to restart animation"
puts "Print 'animateSpheres 10.0' to restart animation"

View File

@@ -101,7 +101,7 @@ set (BUILD_TOOLKITS
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all header files into ${CMAKE_BINARY_DIR}/inc ...")
# collect all the headers to <binary dir>/inc folder
COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOLKITS}" "${CASROOT_SOURCE_FILES}/tools" "${INSTALL_DIR_INCLUDE}/inspector")
COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOLKITS}" "${CASROOT_SOURCE_FILES}/tools" "${INSTALL_DIR_INCLUDE}")
OCCT_INCLUDE_CMAKE_FILE_STANDALONE ("adm/cmake/standalone_macros")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/qt_macro")

View File

@@ -783,7 +783,6 @@ Standard_Boolean AIS::GetPlaneFromFace(const TopoDS_Face& aFace,
BRepAdaptor_Surface surf1( aFace );
Handle( Adaptor3d_HSurface ) surf2;
Standard_Boolean isOffset = Standard_False;
Offset = 0.0;
if (surf1.GetType() == GeomAbs_OffsetSurface)
{
@@ -802,6 +801,7 @@ Standard_Boolean AIS::GetPlaneFromFace(const TopoDS_Face& aFace,
{
aPlane = surf2->Plane();
aSurfType = AIS_KOS_Plane;
Offset = 0.;
Result = Standard_True;
}
@@ -817,6 +817,7 @@ Standard_Boolean AIS::GetPlaneFromFace(const TopoDS_Face& aFace,
gp_Pln thePlane( LinePos, LineDir ^ ExtrusionDir);
aPlane = thePlane;
aSurfType = AIS_KOS_Plane;
Offset = 0.;
Result = Standard_True;
}
}
@@ -825,6 +826,7 @@ Standard_Boolean AIS::GetPlaneFromFace(const TopoDS_Face& aFace,
{
aSurf = (Handle( Geom_OffsetSurface )::DownCast( aSurf ))->Surface();
aPlane = (Handle( Geom_Plane )::DownCast( aSurf ))->Pln();
Offset = 0.0e0;
}
if (Result == Standard_False)
{
@@ -837,6 +839,7 @@ Standard_Boolean AIS::GetPlaneFromFace(const TopoDS_Face& aFace,
TheType == STANDARD_TYPE(Geom_ToroidalSurface))
{
aSurf = (Handle( Geom_OffsetSurface )::DownCast( aSurf ))->Surface();
Offset = 0.0e0;
}
else
{
@@ -896,18 +899,20 @@ gp_Pnt AIS::ProjectPointOnLine( const gp_Pnt & aPoint, const gp_Lin & aLine )
//function : InitFaceLength
//purpose :
//=======================================================================
void AIS::InitFaceLength (const TopoDS_Face& theFace,
gp_Pln& thePlane,
Handle(Geom_Surface)& theSurface,
AIS_KindOfSurface& theSurfaceType,
Standard_Real& theOffset)
void AIS::InitFaceLength (const TopoDS_Face& aFace,
gp_Pln & aPlane,
Handle(Geom_Surface) & aSurface,
AIS_KindOfSurface & aSurfaceType,
Standard_Real & anOffset)
{
if (AIS::GetPlaneFromFace (theFace, thePlane, theSurface, theSurfaceType, theOffset)
&& Abs (theOffset) > Precision::Confusion())
{
theSurface = new Geom_OffsetSurface (theSurface, theOffset);
theOffset = 0.0e0;
}
AIS::GetPlaneFromFace( aFace, aPlane, aSurface, aSurfaceType, anOffset );
if (Abs( anOffset ) > Precision::Confusion())
{
aSurface = new Geom_OffsetSurface( aSurface, anOffset );
anOffset = 0.0e0;
}
}
//=======================================================================

View File

@@ -18,7 +18,6 @@
#include <AIS_InteractiveContext.hxx>
#include <BRep_Builder.hxx>
#include <BRepTools.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <gp_Pnt2d.hxx>
#include <Graphic3d_AspectFillArea3d.hxx>
#include <Graphic3d_AspectLine3d.hxx>
@@ -36,7 +35,6 @@
#include <Prs3d_Root.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <Standard_ErrorHandler.hxx>
#include <StdSelect_BRepSelectionTool.hxx>
#include <StdPrs_ShadedShape.hxx>
#include <StdPrs_ToolTriangulatedShape.hxx>
#include <StdPrs_WFShape.hxx>
@@ -386,10 +384,55 @@ void AIS_ColoredShape::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
Prs3d::GetDeflection (myshape, myDrawer);
}
// Extract myShapeColors map (KeyshapeColored -> Color) to subshapes map (Subshape -> Color).
// This needed when colored shape is not part of BaseShape (but subshapes are) and actually container for subshapes.
// Extract myShapeColors map (KeyshapeColored -> Color)
// to subshapes map (Subshape -> Color).
// This needed when colored shape is not part of BaseShape
// (but subshapes are) and actually container for subshapes.
AIS_DataMapOfShapeDrawer aSubshapeDrawerMap;
fillSubshapeDrawerMap (aSubshapeDrawerMap);
{
// unroll compounds specified for grouping sub-shapes with the same style
// (e.g. the compounds that are not a part of the main shape)
TopTools_MapOfShape aMapOfOwnCompounds;
if (myshape.ShapeType() == TopAbs_COMPOUND)
{
aMapOfOwnCompounds.Add (myshape);
collectSubCompounds (aMapOfOwnCompounds, myshape);
}
for (AIS_DataMapOfShapeDrawer::Iterator aKeyShapeIter (myShapeColors);
aKeyShapeIter.More(); aKeyShapeIter.Next())
{
const TopoDS_Shape& aKeyShape = aKeyShapeIter.Key();
if (aKeyShape.ShapeType() != TopAbs_COMPOUND
|| aMapOfOwnCompounds.Contains (aKeyShape))
{
continue;
}
for (TopoDS_Iterator aChildIter (aKeyShape); aChildIter.More(); aChildIter.Next())
{
const TopoDS_Shape& aShape = aChildIter.Value();
if (!myShapeColors.IsBound (aShape))
{
bindSubShapes (aSubshapeDrawerMap, aShape, aKeyShapeIter.Value());
}
}
}
// assign other sub-shapes with styles
for (AIS_DataMapOfShapeDrawer::Iterator aKeyShapeIter (myShapeColors);
aKeyShapeIter.More(); aKeyShapeIter.Next())
{
const TopoDS_Shape& aKeyShape = aKeyShapeIter.Key();
if (myshape == aKeyShape
|| (aKeyShape.ShapeType() == TopAbs_COMPOUND
&& !aMapOfOwnCompounds.Contains (aKeyShape)))
{
continue;
}
bindSubShapes (aSubshapeDrawerMap, aKeyShape, aKeyShapeIter.Value());
}
}
Handle(AIS_ColoredDrawer) aBaseDrawer;
myShapeColors.Find (myshape, aBaseDrawer);
@@ -403,156 +446,6 @@ void AIS_ColoredShape::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
addShapesWithCustomProps (thePrs, aDispatchedOpened, aDispatchedClosed, theMode);
}
//=======================================================================
//function : fillSubshapeDrawerMap
//purpose :
//=======================================================================
void AIS_ColoredShape::fillSubshapeDrawerMap (AIS_DataMapOfShapeDrawer& theSubshapeDrawerMap) const
{
// unroll compounds specified for grouping sub-shapes with the same style
// (e.g. the compounds that are not a part of the main shape)
TopTools_MapOfShape aMapOfOwnCompounds;
if (myshape.ShapeType() == TopAbs_COMPOUND)
{
aMapOfOwnCompounds.Add (myshape);
collectSubCompounds (aMapOfOwnCompounds, myshape);
}
for (AIS_DataMapOfShapeDrawer::Iterator aKeyShapeIter (myShapeColors);
aKeyShapeIter.More(); aKeyShapeIter.Next())
{
const TopoDS_Shape& aKeyShape = aKeyShapeIter.Key();
if (aKeyShape.ShapeType() != TopAbs_COMPOUND
|| aMapOfOwnCompounds.Contains (aKeyShape))
{
continue;
}
for (TopoDS_Iterator aChildIter (aKeyShape); aChildIter.More(); aChildIter.Next())
{
const TopoDS_Shape& aShape = aChildIter.Value();
if (!myShapeColors.IsBound (aShape))
{
bindSubShapes (theSubshapeDrawerMap, aShape, aKeyShapeIter.Value());
}
}
}
// assign other sub-shapes with styles
for (AIS_DataMapOfShapeDrawer::Iterator aKeyShapeIter (myShapeColors);
aKeyShapeIter.More(); aKeyShapeIter.Next())
{
const TopoDS_Shape& aKeyShape = aKeyShapeIter.Key();
if (myshape == aKeyShape
|| (aKeyShape.ShapeType() == TopAbs_COMPOUND
&& !aMapOfOwnCompounds.Contains (aKeyShape)))
{
continue;
}
bindSubShapes (theSubshapeDrawerMap, aKeyShape, aKeyShapeIter.Value());
}
}
//=======================================================================
//function : ComputeSelection
//purpose :
//=======================================================================
void AIS_ColoredShape::ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
const Standard_Integer theMode)
{
if (myshape.IsNull())
{
return;
}
else if (isShapeEntirelyVisible())
{
base_type::ComputeSelection (theSelection, theMode);
return;
}
const TopAbs_ShapeEnum aTypOfSel = AIS_Shape::SelectionType (theMode);
const Standard_Real aDeflection = Prs3d::GetDeflection (myshape, myDrawer);
const Standard_Real aDeviationAngle = myDrawer->HLRAngle();
const Standard_Integer aPriority = StdSelect_BRepSelectionTool::GetStandardPriority (myshape, aTypOfSel);
if (myDrawer->IsAutoTriangulation()
&& !BRepTools::Triangulation (myshape, Precision::Infinite()))
{
BRepMesh_IncrementalMesh aMesher (myshape, aDeflection, Standard_False, aDeviationAngle);
}
AIS_DataMapOfShapeDrawer aSubshapeDrawerMap;
fillSubshapeDrawerMap (aSubshapeDrawerMap);
Handle(StdSelect_BRepOwner) aBrepOwner = new StdSelect_BRepOwner (myshape, aPriority);
if (aTypOfSel == TopAbs_SHAPE)
{
aBrepOwner = new StdSelect_BRepOwner (myshape, aPriority);
}
Handle(AIS_ColoredDrawer) aBaseDrawer;
myShapeColors.Find (myshape, aBaseDrawer);
computeSubshapeSelection (aBaseDrawer, aSubshapeDrawerMap, myshape, aBrepOwner, theSelection,
aTypOfSel, aPriority, aDeflection, aDeviationAngle);
Handle(SelectMgr_SelectableObject) aThis (this);
for (theSelection->Init(); theSelection->More(); theSelection->Next())
{
Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast (theSelection->Sensitive()->BaseSensitive()->OwnerId());
anOwner->Set (aThis);
}
StdSelect_BRepSelectionTool::PreBuildBVH (theSelection);
}
//=======================================================================
//function : computeSubshapeSelection
//purpose :
//=======================================================================
void AIS_ColoredShape::computeSubshapeSelection (const Handle(AIS_ColoredDrawer)& theParentDrawer,
const AIS_DataMapOfShapeDrawer& theShapeDrawerMap,
const TopoDS_Shape& theShape,
const Handle(StdSelect_BRepOwner)& theOwner,
const Handle(SelectMgr_Selection)& theSelection,
const TopAbs_ShapeEnum theTypOfSel,
const Standard_Integer thePriority,
const Standard_Real theDeflection,
const Standard_Real theDeflAngle)
{
Handle(AIS_ColoredDrawer) aDrawer = theParentDrawer;
theShapeDrawerMap.Find (theShape, aDrawer);
if (!aDrawer.IsNull()
&& aDrawer->IsHidden())
{
return;
}
const Standard_Integer aNbPOnEdge = 9;
const Standard_Real aMaximalParameter = 500.0;
if (theTypOfSel == TopAbs_SHAPE
&& theShape.ShapeType() >= TopAbs_FACE)
{
StdSelect_BRepSelectionTool::ComputeSensitive (theShape, theOwner, theSelection,
theDeflection, theDeflAngle, aNbPOnEdge, aMaximalParameter, myDrawer->IsAutoTriangulation());
return;
}
else if (theShape.ShapeType() == theTypOfSel)
{
const Standard_Boolean isComesFromDecomposition = !theShape.IsEqual (myshape);
Handle(StdSelect_BRepOwner) aBrepOwner = new StdSelect_BRepOwner (theShape, thePriority, isComesFromDecomposition);
StdSelect_BRepSelectionTool::ComputeSensitive (theShape, aBrepOwner, theSelection,
theDeflection, theDeflAngle, aNbPOnEdge, aMaximalParameter, myDrawer->IsAutoTriangulation());
return;
}
for (TopoDS_Iterator aSubShapeIter (theShape); aSubShapeIter.More(); aSubShapeIter.Next())
{
const TopoDS_Shape& aSubShape = aSubShapeIter.Value();
computeSubshapeSelection (aDrawer, theShapeDrawerMap, aSubShape,
theOwner, theSelection, theTypOfSel, thePriority,
theDeflection, theDeflAngle);
}
}
//=======================================================================
//function : addShapesWithCustomProps
//purpose :
@@ -790,7 +683,7 @@ Standard_Boolean AIS_ColoredShape::isShapeEntirelyVisible() const
//=======================================================================
void AIS_ColoredShape::bindSubShapes (AIS_DataMapOfShapeDrawer& theShapeDrawerMap,
const TopoDS_Shape& theKeyShape,
const Handle(AIS_ColoredDrawer)& theDrawer) const
const Handle(AIS_ColoredDrawer)& theDrawer)
{
TopAbs_ShapeEnum aShapeWithColorType = theKeyShape.ShapeType();
if (aShapeWithColorType == TopAbs_COMPOUND)

View File

@@ -24,8 +24,6 @@
#include <TopTools_MapOfShape.hxx>
#include <TColStd_MapTransientHasher.hxx>
class StdSelect_BRepOwner;
//! Presentation of the shape with customizable sub-shapes properties.
class AIS_ColoredShape : public AIS_Shape
{
@@ -85,15 +83,10 @@ public: //! @name global aspects
protected: //! @name override presentation computation
//! Compute presentation considering sub-shape color map.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
//! Compute selection considering sub-shape hidden state.
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
const Standard_Integer theMode) Standard_OVERRIDE;
protected:
typedef NCollection_IndexedDataMap<Handle(AIS_ColoredDrawer), TopoDS_Compound, TColStd_MapTransientHasher> DataMapOfDrawerCompd;
@@ -117,10 +110,6 @@ protected:
DataMapOfDrawerCompd& theDrawerClosedFaces);
protected:
//! Extract myShapeColors map (KeyshapeColored -> Color) to subshapes map (Subshape -> Color).
//! This needed when colored shape is not part of BaseShape (but subshapes are) and actually container for subshapes.
Standard_EXPORT void fillSubshapeDrawerMap (AIS_DataMapOfShapeDrawer& theSubshapeDrawerMap) const;
//! Add shape to presentation
//! @param thePrs the presentation
//! @param theDrawerOpenedShapePerType the shapes map with unique attributes
@@ -142,26 +131,7 @@ protected:
//! @param theDrawer assigned drawer
Standard_EXPORT void bindSubShapes (AIS_DataMapOfShapeDrawer& theShapeDrawerMap,
const TopoDS_Shape& theKeyShape,
const Handle(AIS_ColoredDrawer)& theDrawer) const;
//! Add sub-shape to selection considering hidden state (recursively).
//! @param theParentDrawer drawer of parent shape
//! @param theShapeDrawerMap shapes map
//! @param theShape shape to compute sensitive entities
//! @param theOwner selectable owner object
//! @param theSelection selection to append new sensitive entities
//! @param theTypOfSel type of selection
//! @param theDeflection linear deflection
//! @param theDeflAngle angular deflection
Standard_EXPORT void computeSubshapeSelection (const Handle(AIS_ColoredDrawer)& theParentDrawer,
const AIS_DataMapOfShapeDrawer& theShapeDrawerMap,
const TopoDS_Shape& theShape,
const Handle(StdSelect_BRepOwner)& theOwner,
const Handle(SelectMgr_Selection)& theSelection,
const TopAbs_ShapeEnum theTypOfSel,
const Standard_Integer thePriority,
const Standard_Real theDeflection,
const Standard_Real theDeflAngle);
const Handle(AIS_ColoredDrawer)& theDrawer);
protected:

View File

@@ -335,31 +335,31 @@ TCollection_ExtendedString AIS_Dimension::GetValueString (Standard_Real& theWidt
if (myDrawer->DimensionAspect()->IsText3d())
{
// text width produced by BRepFont
Font_BRepFont aFont;
if (aFont.FindAndInit (aTextAspect->Aspect()->Font(), aTextAspect->Aspect()->GetTextFontAspect(), aTextAspect->Height(), Font_StrictLevel_Any))
Font_BRepFont aFont (aTextAspect->Aspect()->Font().ToCString(),
aTextAspect->Aspect()->GetTextFontAspect(),
aTextAspect->Height());
for (NCollection_Utf8Iter anIter = anUTFString.Iterator(); *anIter != 0; )
{
for (NCollection_Utf8Iter anIter = anUTFString.Iterator(); *anIter != 0; )
{
Standard_Utf32Char aCurrChar = *anIter;
Standard_Utf32Char aNextChar = *(++anIter);
theWidth += aFont.AdvanceX (aCurrChar, aNextChar);
}
Standard_Utf32Char aCurrChar = *anIter;
Standard_Utf32Char aNextChar = *(++anIter);
theWidth += aFont.AdvanceX (aCurrChar, aNextChar);
}
}
else
{
// Text width for 1:1 scale 2D case
Font_FTFontParams aFontParams;
aFontParams.PointSize = (unsigned int )aTextAspect->Height();
aFontParams.Resolution = THE_2D_TEXT_RESOLUTION;
if (Handle(Font_FTFont) aFont = Font_FTFont::FindAndCreate (aTextAspect->Aspect()->Font(), aTextAspect->Aspect()->GetTextFontAspect(), aFontParams, Font_StrictLevel_Any))
Handle(Font_FTFont) aFont = new Font_FTFont();
aFont->Init (aTextAspect->Aspect()->Font().ToCString(),
aTextAspect->Aspect()->GetTextFontAspect(),
(const unsigned int)aTextAspect->Height(),
THE_2D_TEXT_RESOLUTION);
for (NCollection_Utf8Iter anIter = anUTFString.Iterator(); *anIter != 0; )
{
for (NCollection_Utf8Iter anIter = anUTFString.Iterator(); *anIter != 0; )
{
Standard_Utf32Char aCurrChar = *anIter;
Standard_Utf32Char aNextChar = *(++anIter);
theWidth += (Standard_Real) aFont->AdvanceX (aCurrChar, aNextChar);
}
Standard_Utf32Char aCurrChar = *anIter;
Standard_Utf32Char aNextChar = *(++anIter);
theWidth += (Standard_Real) aFont->AdvanceX (aCurrChar, aNextChar);
}
}

View File

@@ -1386,7 +1386,14 @@ protected: //! @name internal methods
if (myLastinMain.IsNull())
return;
myLastinMain->Selectable()->ClearDynamicHighlight (myMainPM);
if (myLastinMain->IsAutoHilight())
{
myMainPM->ClearImmediateDraw();
}
else
{
myLastinMain->Selectable()->ClearDynamicHighlight (myMainPM);
}
}
protected: //! @name internal fields

View File

@@ -1005,8 +1005,7 @@ void AIS_Manipulator::Disk::Init (const Standard_ShortReal theInnerRadius,
gp_Ax3 aSystem (myPosition.Location(), myPosition.Direction());
gp_Trsf aTrsf;
aTrsf.SetTransformation (aSystem, gp_Ax3());
myArray = aTool.CreateTriangulation (aTrsf);
myTriangulation = aTool.CreatePolyTriangulation (aTrsf);
aTool.FillArray (myArray, myTriangulation, aTrsf);
}
//=======================================================================
@@ -1025,8 +1024,7 @@ void AIS_Manipulator::Sphere::Init (const Standard_ShortReal theRadius,
Prs3d_ToolSphere aTool (theRadius, theSlicesNb, theStacksNb);
gp_Trsf aTrsf;
aTrsf.SetTranslation (gp_Vec(gp::Origin(), thePosition));
myArray = aTool.CreateTriangulation (aTrsf);
myTriangulation = aTool.CreatePolyTriangulation (aTrsf);
aTool.FillArray (myArray, myTriangulation, aTrsf);
}
//=======================================================================
@@ -1062,24 +1060,24 @@ void AIS_Manipulator::Cube::Init (const gp_Ax1& thePosition, const Standard_Shor
addTriangle (1, aBottomLeft, aV3, aV4, -thePosition.Direction());
// Front
addTriangle (2, aV3, aV5, aV4, -aFront);
addTriangle (3, aV3, aTopRight, aV5, -aFront);
addTriangle (2, aV3, aV4, aV5, aFront);
addTriangle (3, aV3, aV5, aTopRight, aFront);
// Back
addTriangle (4, aBottomLeft, aV7, aV2, aFront);
addTriangle (5, aBottomLeft, aV6, aV7, aFront);
addTriangle (4, aBottomLeft, aV2, aV7, -aFront);
addTriangle (5, aBottomLeft, aV7, aV6, -aFront);
// aTop
addTriangle (6, aV7, aV6, aV5, thePosition.Direction());
addTriangle (7, aTopRight, aV7, aV5, thePosition.Direction());
// Left
addTriangle (8, aV6, aV4, aV5, aRight);
addTriangle (9, aBottomLeft, aV4, aV6, aRight);
//Left
addTriangle (8, aV6, aV5, aV4, -aRight);
addTriangle (9, aBottomLeft, aV6, aV4, -aRight);
// Right
addTriangle (10, aV3, aV7, aTopRight, -aRight);
addTriangle (11, aV3, aV2, aV7, -aRight);
addTriangle (10, aV3, aTopRight, aV7, aRight);
addTriangle (11, aV3, aV7, aV2, aRight);
}
//=======================================================================
@@ -1150,7 +1148,6 @@ void AIS_Manipulator::Axis::Compute (const Handle(PrsMgr_PresentationManager)& t
anArrowLength,
myFacettesNumber);
myTranslatorGroup = Prs3d_Root::NewGroup (thePrs);
myTranslatorGroup->SetClosed (true);
myTranslatorGroup->SetGroupPrimitivesAspect (theAspect->Aspect());
myTranslatorGroup->AddPrimitiveArray (myTriangleArray);
@@ -1172,7 +1169,6 @@ void AIS_Manipulator::Axis::Compute (const Handle(PrsMgr_PresentationManager)& t
myCube.Init (gp_Ax1 (myCubePos, myReferenceAxis.Direction()), myBoxSize);
myScalerGroup = Prs3d_Root::NewGroup (thePrs);
myScalerGroup->SetClosed (true);
myScalerGroup->SetGroupPrimitivesAspect (theAspect->Aspect());
myScalerGroup->AddPrimitiveArray (myCube.Array());

View File

@@ -261,14 +261,14 @@ void AIS_TextLabel::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePr
if (myHasFlipping)
{
// Get width and height of text
Font_FTFontParams aFontParams;
aFontParams.PointSize = (unsigned int )anAsp->Height();
aFontParams.Resolution = GetContext()->CurrentViewer()->DefaultRenderingParams().Resolution;
if (Handle(Font_FTFont) aFont = Font_FTFont::FindAndCreate (anAsp->Aspect()->Font(), anAsp->Aspect()->GetTextFontAspect(), aFontParams))
Font_FTFont aFont;
unsigned int aResolution = GetContext()->CurrentViewer()->DefaultRenderingParams().Resolution;
if (aFont.Init (anAsp->Aspect()->Font().ToCString(),
anAsp->Aspect()->GetTextFontAspect(), (unsigned int)anAsp->Height(), aResolution))
{
isInit = Standard_True;
const NCollection_String aText (myText.ToExtString());
Font_Rect aBndBox = aFont->BoundingBox (aText, anAsp->HorizontalJustification(), anAsp->VerticalJustification());
Font_Rect aBndBox = aFont.BoundingBox (aText, anAsp->HorizontalJustification(), anAsp->VerticalJustification());
Standard_Real aWidth = Abs (aBndBox.Width());
Standard_Real aHeight = Abs (aBndBox.Height());
gp_Pnt aCenterOfLabel = aPosition;

View File

@@ -458,7 +458,7 @@ GeomAbs_CurveType Adaptor2d_OffsetCurve::GetType() const {
return GeomAbs_Circle;
default:
return GeomAbs_OffsetCurve;
return GeomAbs_OtherCurve;
}
}
@@ -650,27 +650,3 @@ Handle(Geom2d_BSplineCurve) Adaptor2d_OffsetCurve::BSpline() const
"Adaptor2d_OffsetCurve::BSpline() - wrong curve type");
return myCurve->BSpline();
}
static Standard_Integer nbPoints(const Handle(Adaptor2d_HCurve2d)& theCurve)
{
Standard_Integer nbs = 20;
if (theCurve->GetType() == GeomAbs_BezierCurve)
{
nbs = Max(nbs, 3 + theCurve->NbPoles());
}
else if (theCurve->GetType() == GeomAbs_BSplineCurve) {
nbs = Max(nbs, theCurve->NbKnots() * theCurve->Degree());
}
if (nbs > 300)
nbs = 300;
return nbs;
}
Standard_Integer Adaptor2d_OffsetCurve::NbSamples() const
{
return nbPoints(myCurve);
}

View File

@@ -174,8 +174,6 @@ public:
Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const Standard_OVERRIDE;
Standard_EXPORT Standard_Integer NbSamples() const Standard_OVERRIDE;;

View File

@@ -67,6 +67,3 @@ Warning: Removal of internal boundaries among Faces has failed
.BOPAlgo_AlertRemovalOfIBForEdgesFailed
Warning: Removal of internal boundaries among Edges has failed
.BOPAlgo_AlertSolidBuilderUnusedFaces
Warning: Some of the faces passed to the Solid Builder algorithm have not been classified and not used for solids creation

View File

@@ -78,7 +78,4 @@ DEFINE_ALERT_WITH_SHAPE(BOPAlgo_AlertShellSplitterFailed)
//! Some edges are too small and have no valid range
DEFINE_ALERT_WITH_SHAPE(BOPAlgo_AlertTooSmallEdge)
//! Some of the faces passed to the Solid Builder algorithm have not been classified
//! and not used for solids creation
DEFINE_ALERT_WITH_SHAPE(BOPAlgo_AlertSolidBuilderUnusedFaces)
#endif // _BOPAlgo_Alerts_HeaderFile

View File

@@ -69,7 +69,4 @@ static const char BOPAlgo_BOPAlgo_msg[] =
"Warning: Removal of internal boundaries among Faces has failed\n"
"\n"
".BOPAlgo_AlertRemovalOfIBForEdgesFailed\n"
"Warning: Removal of internal boundaries among Edges has failed\n"
"\n"
".BOPAlgo_AlertSolidBuilderUnusedFaces\n"
"Warning: Some of the faces passed to the Solid Builder algorithm have not been classified and not used for solids creation\n";
"Warning: Removal of internal boundaries among Edges has failed\n";

View File

@@ -18,7 +18,6 @@
#include <BOPAlgo_BuilderSolid.hxx>
#include <BOPAlgo_ShellSplitter.hxx>
#include <BOPAlgo_Alerts.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPCol_BoxBndTree.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_DataMapOfShapeShape.hxx>
@@ -128,7 +127,127 @@ typedef NCollection_DataMap
//
typedef BOPAlgo_DataMapOfIntegerBSSB::Iterator
BOPAlgo_DataMapIteratorOfDataMapOfIntegerBSSB;
//
//=======================================================================
//function : BOPAlgo_FacePnt
//purpose :
//=======================================================================
class BOPAlgo_FacePnt {
public:
BOPAlgo_FacePnt() {
}
//
virtual ~BOPAlgo_FacePnt() {
}
//
void SetFace(const TopoDS_Face& aFace) {
myFace=aFace;
}
//
const TopoDS_Face& Face()const {
return myFace;
}
//
void SetPnt(const gp_Pnt& aPnt) {
myPnt=aPnt;
}
//
const gp_Pnt& Pnt()const {
return myPnt;
}
//
protected:
gp_Pnt myPnt;
TopoDS_Face myFace;
};
//
typedef BOPCol_NCVector
<BOPAlgo_FacePnt> BOPAlgo_VectorOfFacePnt;
//
//=======================================================================
//function : BOPAlgo_FaceSolid
//purpose :
//=======================================================================
class BOPAlgo_FaceSolid : public BOPAlgo_Algo {
public:
DEFINE_STANDARD_ALLOC
BOPAlgo_FaceSolid() :
myIsInternalFace(Standard_False) {
}
//
virtual ~BOPAlgo_FaceSolid() {
}
//
void SetFace(const TopoDS_Face& aFace) {
myFace=aFace;
}
//
const TopoDS_Face& Face()const {
return myFace;
}
//
void SetSolid(const TopoDS_Solid& aSolid) {
mySolid=aSolid;
}
//
const TopoDS_Solid& Solid()const {
return mySolid;
}
//
void SetPnt(const gp_Pnt& aPnt) {
myPnt=aPnt;
}
//
const gp_Pnt& Pnt()const {
return myPnt;
}
void SetContext(const Handle(IntTools_Context)& aContext) {
myContext=aContext;
}
//
const Handle(IntTools_Context)& Context()const {
return myContext;
}
//
Standard_Boolean IsInternalFace() const {
return myIsInternalFace;
}
//
virtual void Perform () {
TopAbs_State aState;
//
BOPAlgo_Algo::UserBreak();
//
aState=BOPTools_AlgoTools::ComputeState(myPnt, mySolid,
Precision::Confusion(),
myContext);
//
myIsInternalFace=(aState==TopAbs_IN);
}
//
protected:
Standard_Boolean myIsInternalFace;
gp_Pnt myPnt;
TopoDS_Face myFace;
TopoDS_Solid mySolid;
Handle(IntTools_Context) myContext;
};
//=======================================================================
typedef BOPCol_NCVector
<BOPAlgo_FaceSolid> BOPAlgo_VectorOfFaceSolid;
//
typedef BOPCol_ContextFunctor
<BOPAlgo_FaceSolid,
BOPAlgo_VectorOfFaceSolid,
Handle(IntTools_Context),
IntTools_Context> BOPAlgo_FaceSolidFunctor;
//
typedef BOPCol_ContextCnt
<BOPAlgo_FaceSolidFunctor,
BOPAlgo_VectorOfFaceSolid,
Handle(IntTools_Context)> BOPAlgo_FaceSolidCnt;
//
//=======================================================================
//=======================================================================
@@ -647,29 +766,49 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes()
return;
}
//
Standard_Boolean bIsInternalFace;
Standard_Integer k, aNbVFS, aNbSLF, aNbVFP, aNbA;
BRep_Builder aBB;
TopoDS_Iterator aIt;
TopExp_Explorer aExp;
BOPCol_ListIteratorOfListOfShape aItLS;
BOPCol_IndexedMapOfShape aMFs;
BOPCol_ListOfShape aLSI;
BOPAlgo_VectorOfFaceSolid aVFS;
BOPAlgo_VectorOfFacePnt aVFP;
BOPCol_ListIteratorOfListOfInteger aItLI;
BOPCol_BoxBndTreeSelector aSelector;
BOPCol_BoxBndTree aBBTree;
NCollection_UBTreeFiller
<Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
//
Standard_Integer aNbA = myAreas.Extent();
aNbA=myAreas.Extent();
//
// Fill Tree with boxes
// 1. aVFP
aItLS.Initialize(myLoopsInternal);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aShell=aItLS.Value();
TopoDS_Iterator aIt(aShell);
aIt.Initialize(aShell);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Face& aF=*((TopoDS_Face*)&aIt.Value());
//
if (!aMFs.Contains(aF))
{
if (!aMFs.Contains(aF)) {
aMFs.Add(aF);
//
gp_Pnt aP;
gp_Pnt2d aP2D;
//
if (aNbA) {
BOPTools_AlgoTools3D::PointInFace(aF, aP, aP2D, myContext);
}
//
BOPAlgo_FacePnt& aFP=aVFP.Append1();
aFP.SetFace(aF);
aFP.SetPnt(aP);
}
}
}
//
if (!aNbA) {
// 7b. "Rest" faces treatment
TopoDS_Solid aSolid;
@@ -687,81 +826,146 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes()
return; // =>
}//if (!aNbA) {
//
// Prepare list of faces to classify
TopTools_ListOfShape aLFaces;
Standard_Integer i, aNbF = aMFs.Extent();
for (i = 1; i <= aNbF; ++i)
aLFaces.Append(aMFs(i));
// Map of solids with IN faces
TopTools_IndexedDataMapOfShapeListOfShape aMSLF;
// Perform classification
BOPAlgo_Tools::ClassifyFaces(aLFaces, myAreas, myRunParallel, myContext, aMSLF);
// Update Solids by internal Faces
BOPCol_MapOfShape aMFDone;
Standard_Integer aNbS = aMSLF.Extent();
for (i = 1; i <= aNbS; ++i)
{
const TopoDS_Shape& aSolid = aMSLF.FindKey(i);
TopoDS_Shape *pSolid = (TopoDS_Shape*)&aSolid;
const TopTools_ListOfShape& aLF = aMSLF(i);
if (aLF.IsEmpty())
// 2. Prepare TreeFiller
aNbVFP=aVFP.Extent();
for(k=0; k<aNbVFP; ++k) {
Bnd_Box aBox;
//
const BOPAlgo_FacePnt& aFP=aVFP(k);
const TopoDS_Face& aF=aFP.Face();
//
BRepBndLib::Add(aF, aBox);
aTreeFiller.Add(k, aBox);
}
//
aTreeFiller.Fill();
//
// 3. Face/Solid candidates: aVFS
aItLS.Initialize(myAreas);
for (; aItLS.More(); aItLS.Next()) {
Bnd_Box aBox;
//
TopoDS_Solid& aSolid=(*(TopoDS_Solid*)(&aItLS.Value()));
BRepBndLib::Add(aSolid, aBox);
//
aMFs.Clear();
aExp.Init(aSolid, TopAbs_FACE);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aFs=aExp.Current();
aMFs.Add(aFs);
}
//
aSelector.Clear();
aSelector.SetBox(aBox);
//
aBBTree.Select(aSelector);
//
const BOPCol_ListOfInteger& aLI=aSelector.Indices();
aItLI.Initialize(aLI);
for (; aItLI.More(); aItLI.Next()) {
k=aItLI.Value();
const BOPAlgo_FacePnt& aFP=aVFP(k);
const TopoDS_Face& aF=aFP.Face();
if (aMFs.Contains(aF)) {
continue;
}
//
const gp_Pnt& aP=aFP.Pnt();
//
BOPAlgo_FaceSolid& aFS=aVFS.Append1();
aFS.SetPnt(aP);
aFS.SetFace(aF);
aFS.SetSolid(aSolid);
}
}
//
aNbVFS=aVFS.Extent();
if (!aNbVFS) {
return;
}
// 4. Refine candidates
//=============================================================
BOPAlgo_FaceSolidCnt::Perform(myRunParallel, aVFS, myContext);
//=============================================================
//
// 5. Solid/Faces: aMSLF
BOPCol_IndexedDataMapOfShapeListOfShape aMSLF;
BOPCol_MapOfShape aMFProcessed;
//
for (k=0; k < aNbVFS; ++k) {
const BOPAlgo_FaceSolid& aFS=aVFS(k);
//
const TopoDS_Solid& aSolid=aFS.Solid();
const TopoDS_Face& aF=aFS.Face();
//
bIsInternalFace=aFS.IsInternalFace();
if (!bIsInternalFace) {
continue;
TopTools_IndexedMapOfShape aMF;
}
//
if (aMSLF.Contains(aSolid)) {
BOPCol_ListOfShape& aLF=aMSLF.ChangeFromKey(aSolid);
aLF.Append(aF);
}
else {
BOPCol_ListOfShape aLF;
//
aLF.Append(aF);
aMSLF.Add(aSolid, aLF);
}
}// for (k=0; k < aNbVE; ++k) {
//
// 6. Update Solids by internal Faces
aNbSLF=aMSLF.Extent();
for (k=1; k <= aNbSLF; ++k) {
const TopoDS_Shape& aSolid=aMSLF.FindKey(k);
TopoDS_Shape *pSolid=(TopoDS_Shape*)&aSolid;
//
const BOPCol_ListOfShape& aLF=aMSLF(k);
//
aMFs.Clear();
aItLS.Initialize(aLF);
for (; aItLS.More(); aItLS.Next())
{
const TopoDS_Shape& aF = aItLS.Value();
aMF.Add(aF);
aMFDone.Add(aF);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aF=aItLS.Value();
aMFs.Add(aF);
aMFProcessed.Add(aF);
}
//
aLSI.Clear();
MakeInternalShells(aMF, aLSI);
MakeInternalShells(aMFs, aLSI);
//
aItLS.Initialize(aLSI);
for (; aItLS.More(); aItLS.Next())
{
const TopoDS_Shape& aSI = aItLS.Value();
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aSI=aItLS.Value();
aBB.Add (*pSolid, aSI);
}
}
// Find all unclassified faces and warn the user about them.
TopTools_IndexedMapOfShape aMFUnUsed;
for (i = 1; i <= aNbF; ++i)
{
const TopoDS_Shape& aF = aMFs(i);
if (!aMFDone.Contains(aF))
aMFUnUsed.Add(aF);
//
// 7. "Rest" faces treatment (if there are)
aMFs.Clear();
for (k=0; k < aNbVFS; ++k) {
const BOPAlgo_FaceSolid& aFS=aVFS(k);
//
const TopoDS_Face& aF=aFS.Face();
if (!aMFProcessed.Contains(aF)) {
aMFs.Add(aF);
}
}
if (aMFUnUsed.Extent())
{
//
aNbFI=aMFs.Extent();
if (aNbFI) {
TopoDS_Solid aSolid;
aBB.MakeSolid(aSolid);
//
aLSI.Clear();
MakeInternalShells(aMFs, aLSI);
//TopoDS_Solid aShape;
//aBB.MakeSolid (aShape);
TopoDS_Compound aShape;
aBB.MakeCompound (aShape);
aItLS.Initialize (aLSI);
for (; aItLS.More(); aItLS.Next())
{
//
aItLS.Initialize(aLSI);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aSI=aItLS.Value();
aBB.Add (aShape, aSI);
aBB.Add (aSolid, aSI);
}
//myAreas.Append (aShape);
AddWarning (new BOPAlgo_AlertSolidBuilderUnusedFaces (aShape));
myAreas.Append(aSolid);
}
}
//=======================================================================

View File

@@ -19,7 +19,6 @@
//
#include <Precision.hxx>
//
#include <NCollection_IncAllocator.hxx>
#include <NCollection_UBTreeFiller.hxx>
//
#include <Bnd_Box.hxx>
@@ -44,13 +43,9 @@
#include <BRepClass3d_SolidClassifier.hxx>
#include <BRepBndLib.hxx>
//
#include <BOPAlgo_Tools.hxx>
//
#include <BOPCol_IndexedMapOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPCol_IndexedDataMapOfShapeBox.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_IndexedDataMapOfShapeShape.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_BoxBndTree.hxx>
#include <BOPCol_ListOfInteger.hxx>
@@ -136,6 +131,367 @@ class BOPAlgo_ShapeBox {
typedef BOPCol_NCVector<BOPAlgo_ShapeBox> BOPAlgo_VectorOfShapeBox;
//
//=======================================================================
// class: BOPAlgo_FillIn3DParts
//
//=======================================================================
//class : BOPAlgo_FillIn3DParts
//purpose :
//=======================================================================
class BOPAlgo_FillIn3DParts : public BOPAlgo_Algo {
public:
DEFINE_STANDARD_ALLOC
BOPAlgo_FillIn3DParts(){
myHasImage=Standard_False;
myBBTree=NULL;
myVSB=NULL;
};
//
virtual ~BOPAlgo_FillIn3DParts(){
};
//
void SetSolid(const TopoDS_Solid& aS) {
mySolid=aS;
};
//
const TopoDS_Solid& Solid()const {
return mySolid;
};
//
void SetDraftSolid(const TopoDS_Solid& aS) {
myDraftSolid=aS;
};
//
const TopoDS_Solid& DraftSolid()const {
return myDraftSolid;
};
//
void SetHasImage(const Standard_Boolean bFlag) {
myHasImage=bFlag;
};
//
Standard_Boolean HasImage()const {
return myHasImage;
};
//
void SetBoxS(const Bnd_Box& aBox) {
myBoxS=aBox;
};
//
const Bnd_Box& BoxS()const {
return myBoxS;
};
//
void SetLIF(const BOPCol_ListOfShape& aLIF) {
myLIF=aLIF;
};
//
const BOPCol_ListOfShape& LIF()const {
return myLIF;
};
//
void SetBBTree(const BOPCol_BoxBndTree& aBBTree) {
myBBTree=(BOPCol_BoxBndTree*)&aBBTree;
};
//
void SetVSB(const BOPAlgo_VectorOfShapeBox& aVSB) {
myVSB=(BOPAlgo_VectorOfShapeBox*)&aVSB;
};
//
//
void SetContext(const Handle(IntTools_Context)& aContext) {
myContext=aContext;
}
//
const Handle(IntTools_Context)& Context()const {
return myContext;
}
//
virtual void Perform();
//
//
const BOPCol_ListOfShape& LFIN()const {
return myLFIN;
};
protected:
void MapEdgesAndFaces
(const TopoDS_Shape& ,
BOPCol_IndexedDataMapOfShapeListOfShape& ,
const Handle(NCollection_BaseAllocator)& );
void MakeConnexityBlock
(const BOPCol_ListOfShape& ,
const BOPCol_IndexedMapOfShape& ,
const BOPCol_MapOfShape& ,
const BOPCol_IndexedDataMapOfShapeListOfShape& ,
BOPCol_ListOfShape& ,
const Handle(NCollection_BaseAllocator)& );
//
protected:
TopoDS_Solid mySolid;
TopoDS_Solid myDraftSolid;
Standard_Boolean myHasImage;
Bnd_Box myBoxS;
BOPCol_ListOfShape myLIF;
BOPCol_ListOfShape myLFIN;
//
BOPCol_BoxBndTree* myBBTree;
BOPAlgo_VectorOfShapeBox* myVSB;
//
TopoDS_Iterator myItF;
TopoDS_Iterator myItW;
Handle(IntTools_Context) myContext;
};
//=======================================================================
//function : BOPAlgo_FillIn3DParts::Perform
//purpose :
//=======================================================================
void BOPAlgo_FillIn3DParts::Perform()
{
Handle(NCollection_BaseAllocator) aAlr1;
BOPAlgo_Algo::UserBreak();
//
Standard_Integer aNbFP, k, nFP, iIsIN;
Standard_Real aTolPC;
BOPCol_ListIteratorOfListOfInteger aItLI, aItLI1;
BOPCol_ListIteratorOfListOfShape aItLS;
BOPCol_BoxBndTreeSelector aSelector;
//
aAlr1=
NCollection_BaseAllocator::CommonBaseAllocator();
//
BOPCol_ListOfShape aLFP(aAlr1);
BOPCol_ListOfShape aLCBF(aAlr1);
BOPCol_MapOfShape aMFDone(100, aAlr1);
BOPCol_IndexedMapOfShape aME(100, aAlr1);
BOPCol_IndexedMapOfShape aMF(100, aAlr1);
BOPCol_IndexedDataMapOfShapeListOfShape aMEFP(100, aAlr1);
BOPCol_IndexedDataMapOfShapeListOfShape aMEF(100, aAlr1);
//
aTolPC=Precision::Confusion();
myLFIN.Clear();
BOPAlgo_VectorOfShapeBox& aVSB=*myVSB;
//
// 1. aMEF - EF map for myDraftSolid
BOPTools::MapShapesAndAncestors(myDraftSolid,
TopAbs_EDGE,
TopAbs_FACE,
aMEF);
//
// 2. Faces from myDraftSolid and its own internal faces => aMF
BOPTools::MapShapes(myDraftSolid, TopAbs_FACE, aMF);
aItLS.Initialize(myLIF);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aFI=aItLS.Value();
aMF.Add(aFI);
}
// aME - Edges from DraftSolid [i.e. edges to stop]
BOPTools::MapShapes(myDraftSolid, TopAbs_EDGE, aME);
//
// 3. Select boxes of faces that are not out of aBoxS
aSelector.Clear();
aSelector.SetBox(myBoxS);
//
aNbFP=myBBTree->Select(aSelector);
const BOPCol_ListOfInteger& aLIFPx=aSelector.Indices();
//
// 4. aIVec, aLIFP - faces to process
BOPCol_ListOfInteger aLIFP(aAlr1);
BOPCol_NCVector<Standard_Integer> aIVec(256, aAlr1);
//
k=0;
aItLI.Initialize(aLIFPx);
for (; aItLI.More(); aItLI.Next()) {
nFP=aItLI.Value();
const TopoDS_Shape& aFP=aVSB(nFP).Shape();
if (!aMF.Contains(aFP)) {
MapEdgesAndFaces(aFP, aMEFP, aAlr1);
aLIFP.Append(nFP);
aIVec.Append1()=nFP;
++k;
}
}
aNbFP=k;
//
// sort indices
std::sort(aIVec.begin(), aIVec.end());
//
// 5. Collect faces that are IN mySolid [ myLFIN ]
for (k=0; k<aNbFP; ++k) {
nFP = aIVec(k);
const BOPAlgo_ShapeBox& aSBF=aVSB(nFP);
const TopoDS_Face& aFP=(*(TopoDS_Face*)&aSBF.Shape());
//
if (!aMFDone.Add(aFP)) {
continue;
}
//
iIsIN=BOPTools_AlgoTools::IsInternalFace
(aFP, myDraftSolid, aMEF, aTolPC, myContext);
//
aLFP.Clear();
aLFP.Append(aFP);
//
aItLI1.Initialize(aLIFP);
for (; aItLI1.More(); aItLI1.Next()) {
const TopoDS_Shape& aFx=aVSB(aItLI1.Value()).Shape();
if (!aMFDone.Contains(aFx)) {
aLFP.Append(aFx);
}
}
//
aLCBF.Clear();
//
MakeConnexityBlock(aLFP, aME, aMFDone, aMEFP, aLCBF, aAlr1);
//
aItLS.Initialize(aLCBF);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aFx=aItLS.Value();
aMFDone.Add(aFx);
if (iIsIN) {
myLFIN.Append(aFx);
}
}
} // for (k=0; k<aNbFP; ++k) {
}
//=======================================================================
// function: MapEdgesAndFaces
// purpose:
//=======================================================================
void BOPAlgo_FillIn3DParts::MapEdgesAndFaces
(const TopoDS_Shape& aF,
BOPCol_IndexedDataMapOfShapeListOfShape& aMEF,
const Handle(NCollection_BaseAllocator)& theAllocator)
{
myItF.Initialize(aF);
for (; myItF.More(); myItF.Next()) {
const TopoDS_Shape& aW=myItF.Value();
if (aW.ShapeType()!=TopAbs_WIRE) {
continue;
}
//
myItW.Initialize(aW);
for (; myItW.More(); myItW.Next()) {
const TopoDS_Shape& aE=myItW.Value();
//
if (aMEF.Contains(aE)) {
BOPCol_ListOfShape& aLF=aMEF.ChangeFromKey(aE);
aLF.Append(aF);
}
else {
BOPCol_ListOfShape aLS(theAllocator);
//
aLS.Append(aF);
aMEF.Add(aE, aLS);
}
}
}
}
//=======================================================================
// function: MakeConnexityBlock
// purpose:
//=======================================================================
void BOPAlgo_FillIn3DParts::MakeConnexityBlock
(const BOPCol_ListOfShape& theLFIn,
const BOPCol_IndexedMapOfShape& theMEAvoid,
const BOPCol_MapOfShape& aMFDone,
const BOPCol_IndexedDataMapOfShapeListOfShape& aMEF,
BOPCol_ListOfShape& theLCB,
const Handle(NCollection_BaseAllocator)& theAlr)
{
Standard_Integer aNbF, aNbAdd1, aNbAdd, i;
BOPCol_ListIteratorOfListOfShape aIt;
//
BOPCol_IndexedMapOfShape aMCB(100, theAlr);
BOPCol_IndexedMapOfShape aMAdd(100, theAlr);
BOPCol_IndexedMapOfShape aMAdd1(100, theAlr);
//
aNbF=theLFIn.Extent();
//
// 2. aMCB
const TopoDS_Shape& aF1=theLFIn.First();
aMAdd.Add(aF1);
//
for(;;) {
aMAdd1.Clear();
aNbAdd = aMAdd.Extent();
for (i=1; i<=aNbAdd; ++i) {
const TopoDS_Shape& aF=aMAdd(i);
//
myItF.Initialize(aF);
for (; myItF.More(); myItF.Next()) {
const TopoDS_Shape& aW=myItF.Value();
if (aW.ShapeType()!=TopAbs_WIRE) {
continue;
}
//
myItW.Initialize(aW);
for (; myItW.More(); myItW.Next()) {
const TopoDS_Shape& aE=myItW.Value();
if (theMEAvoid.Contains(aE)){
continue;
}
//
const BOPCol_ListOfShape& aLF=aMEF.FindFromKey(aE);
aIt.Initialize(aLF);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aFx=aIt.Value();
if (aFx.IsSame(aF)) {
continue;
}
if (aMCB.Contains(aFx)) {
continue;
}
if (aMFDone.Contains(aFx)) {
continue;
}
aMAdd1.Add(aFx);
}
}// for (; myItW.More(); myItW.Next()) {
}// for (; myItF.More(); myItF.Next()) {
aMCB.Add(aF);
}// for (i=1; i<=aNbAdd; ++i) {
//
aNbAdd1=aMAdd1.Extent();
if (!aNbAdd1) {
break;
}
//
aMAdd.Clear();
for (i=1; i<=aNbAdd1; ++i) {
const TopoDS_Shape& aFAdd=aMAdd1(i);
aMAdd.Add(aFAdd);
}
//
}//while(1) {
//
aNbF=aMCB.Extent();
for (i=1; i<=aNbF; ++i) {
const TopoDS_Shape& aF=aMCB(i);
theLCB.Append(aF);
}
}
//
typedef BOPCol_NCVector<BOPAlgo_FillIn3DParts> \
BOPAlgo_VectorOfFillIn3DParts;
//
typedef BOPCol_ContextFunctor
<BOPAlgo_FillIn3DParts,
BOPAlgo_VectorOfFillIn3DParts,
Handle(IntTools_Context),
IntTools_Context> BOPCol_FillIn3DPartsFunctor;
//
typedef BOPCol_ContextCnt
<BOPCol_FillIn3DPartsFunctor,
BOPAlgo_VectorOfFillIn3DParts,
Handle(IntTools_Context)> BOPAlgo_FillIn3DPartsCnt;
//
//=======================================================================
// class: BOPAlgo_Builder
//
//=======================================================================
@@ -184,123 +540,156 @@ void BOPAlgo_Builder::FillIn3DParts
BOPCol_DataMapOfShapeShape& theDraftSolids,
const BOPCol_BaseAllocator& )
{
Handle(NCollection_BaseAllocator) anAlloc = new NCollection_IncAllocator;
// Find all faces that are IN solids
// Store boxes of the shapes into a map
BOPCol_IndexedDataMapOfShapeBox aShapeBoxMap(1, anAlloc);
// Fence map
BOPCol_MapOfShape aMFence(1, anAlloc);
// Get all faces
TopTools_ListOfShape aLFaces(anAlloc);
Standard_Integer i, aNbS = myDS->NbSourceShapes();
for (i = 0; i < aNbS; ++i)
{
const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i);
if (aSI.ShapeType() != TopAbs_FACE)
Standard_Boolean bHasImage;
Standard_Integer i, k, aNbS, aNbLIF, aNbFIN, aNbVSB, aNbVFIP;
Handle(NCollection_BaseAllocator) aAlr0;
TopoDS_Solid aSD;
TopoDS_Iterator aIt;
BRep_Builder aBB;
//
BOPCol_ListIteratorOfListOfInteger aItLI, aItLI1;
BOPCol_ListIteratorOfListOfShape aItLS;
//
aAlr0=
NCollection_BaseAllocator::CommonBaseAllocator();
//
BOPCol_MapOfShape aMFence(100, aAlr0);
BOPAlgo_VectorOfShapeBox aVSB(256, aAlr0);
//
theDraftSolids.Clear();
//
// 1. aVSB vector Index/FaceBox
aNbS=myDS->NbSourceShapes();
for (i=0; i<aNbS; ++i) {
const BOPDS_ShapeInfo& aSI=myDS->ShapeInfo(i);
if (aSI.ShapeType()!=TopAbs_FACE) {
continue;
const TopoDS_Shape& aS = aSI.Shape();
const TopTools_ListOfShape* pLSIm = myImages.Seek(aS);
if (pLSIm)
{
TopTools_ListIteratorOfListOfShape aItLSIm(*pLSIm);
for (; aItLSIm.More(); aItLSIm.Next())
{
const TopoDS_Shape& aSIm = aItLSIm.Value();
if (aMFence.Add(aSIm))
aLFaces.Append(aSIm);
}
//
const TopoDS_Shape& aS=aSI.Shape();
//
if (myImages.IsBound(aS)) {
const BOPCol_ListOfShape& aLS=myImages.Find(aS);
aItLS.Initialize(aLS);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aSx=aItLS.Value();
if (!aMFence.Add(aSx)) {
continue;
}
Bnd_Box aBox;
BRepBndLib::Add(aSx, aBox);
aBox.SetGap(aBox.GetGap() + Precision::Confusion());
//
BOPAlgo_ShapeBox& aSB=aVSB.Append1();
aSB.SetShape(aSx);
aSB.SetBox(aBox);
}
}
else
{
aLFaces.Append(aS);
aShapeBoxMap.Add(aS, aSI.Box());
else {
const Bnd_Box& aBox=aSI.Box();
//
BOPAlgo_ShapeBox& aSB=aVSB.Append1();
aSB.SetShape(aS);
aSB.SetBox(aBox);
}
}
BRep_Builder aBB;
// Get all solids
TopTools_ListOfShape aLSolids(anAlloc);
// Keep INTERNAL faces of the solids
BOPCol_DataMapOfShapeListOfShape aSolidsIF(1, anAlloc);
// Draft solids
BOPCol_IndexedDataMapOfShapeShape aDraftSolid(1, anAlloc);
for (i = 0; i < aNbS; ++i)
{
BOPDS_ShapeInfo& aSI = myDS->ChangeShapeInfo(i);
if (aSI.ShapeType() != TopAbs_SOLID)
continue;
const TopoDS_Shape& aS = aSI.Shape();
const TopoDS_Solid& aSolid = (*(TopoDS_Solid*)(&aS));
}//for (i=0; i<aNbS; ++i) {
aMFence.Clear();
//
// 1.2. Prepare TreeFiller
BOPCol_BoxBndTree aBBTree;
NCollection_UBTreeFiller <Standard_Integer, Bnd_Box>
aTreeFiller(aBBTree);
//
aNbVSB=aVSB.Extent();
for (k=0; k<aNbVSB; ++k) {
const BOPAlgo_ShapeBox& aSBk=aVSB(k);
const Bnd_Box& aBk=aSBk.Box();
//
aTreeFiller.Add(k, aBk);
}
//
// 1.3. Shake TreeFiller
aTreeFiller.Fill();
//
//---------------------------------------------
// 2. Solids
BOPAlgo_VectorOfFillIn3DParts aVFIP;
//
for (i=0; i<aNbS; ++i) {
const BOPDS_ShapeInfo& aSI=myDS->ShapeInfo(i);
if (aSI.ShapeType()!=TopAbs_SOLID) {
continue;
}
//
const TopoDS_Shape& aS=aSI.Shape();
const TopoDS_Solid& aSolid=(*(TopoDS_Solid*)(&aS));
//
// 2.0 Flag bHasImage
bHasImage=Standard_False;
aIt.Initialize(aS);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aShell=aIt.Value();
bHasImage=myImages.IsBound(aShell);
if (bHasImage){
break;
}
}
//
// 2.1 Bounding box for the solid aS [ aBoxS ]
Bnd_Box aBoxS;
aBoxS=aSI.Box();
//
// 2.2 Build Draft Solid [aSD]
BOPCol_ListOfShape aLIF;
//
// Bounding box for the solid aS
const Bnd_Box& aBoxS = aSI.Box();
// Build Draft Solid
TopTools_ListOfShape aLIF;
TopoDS_Solid aSD;
aBB.MakeSolid(aSD);
BuildDraftSolid(aSolid, aSD, aLIF);
aLSolids.Append(aSD);
aSolidsIF.Bind(aSD, aLIF);
aShapeBoxMap.Add(aSD, aBoxS);
aDraftSolid.Add(aS, aSD);
}
// Perform classification of the faces
TopTools_IndexedDataMapOfShapeListOfShape anInParts;
BOPAlgo_Tools::ClassifyFaces(aLFaces, aLSolids, myRunParallel,
myContext, anInParts, &aShapeBoxMap, &aSolidsIF);
// Analyze the results of classification
Standard_Integer aNbSol = aDraftSolid.Extent();
for (i = 1; i <= aNbSol; ++i)
{
const TopoDS_Solid& aSolid = TopoDS::Solid(aDraftSolid.FindKey(i));
const TopoDS_Solid& aSDraft = TopoDS::Solid(aDraftSolid(i));
const TopTools_ListOfShape& aLInFaces = anInParts.FindFromKey(aSDraft);
const TopTools_ListOfShape& aLInternal = aSolidsIF.Find(aSDraft);
Standard_Integer aNbIN = aLInFaces.Extent();
if (!aNbIN)
{
Standard_Boolean bHasImage = Standard_False;
// Check if the shells of the solid have image
for (TopoDS_Iterator it(aSolid); it.More() && !bHasImage; it.Next())
bHasImage = myImages.IsBound(it.Value());
if (!bHasImage)
// no need to split the solid
continue;
//
BOPAlgo_FillIn3DParts& aFIP=aVFIP.Append1();
//
aFIP.SetSolid(aSolid);
aFIP.SetDraftSolid(aSD);
aFIP.SetHasImage(bHasImage);
aFIP.SetBoxS(aBoxS);
aFIP.SetLIF(aLIF);
aFIP.SetBBTree(aBBTree);
aFIP.SetVSB(aVSB);
}//for (i=0; i<aNbS; ++i) {
//
aNbVFIP=aVFIP.Extent();
//================================================================
BOPAlgo_FillIn3DPartsCnt::Perform(myRunParallel, aVFIP, myContext);
//================================================================
for (k=0; k<aNbVFIP; ++k) {
BOPAlgo_FillIn3DParts& aFIP=aVFIP(k);
bHasImage=aFIP.HasImage();
const TopoDS_Solid& aSolid=aFIP.Solid();
const TopoDS_Solid& aSDraft =aFIP.DraftSolid();
const BOPCol_ListOfShape& aLFIN=aFIP.LFIN();
const BOPCol_ListOfShape& aLIF=aFIP.LIF();
//
aNbLIF=aLIF.Extent();
//
// Store the results in theInParts, theDraftSolids
BOPCol_ListOfShape aLFINx;
//
aNbFIN=aLFIN.Extent();
if (aNbFIN || aNbLIF) {
aItLS.Initialize(aLFIN);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aFI=aItLS.Value();
aLFINx.Append(aFI);
}
aItLS.Initialize(aLIF);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aFI=aItLS.Value();
aLFINx.Append(aFI);
}
theInParts.Bind(aSolid, aLFINx);
}
theDraftSolids.Bind(aSolid, aSDraft);
Standard_Integer aNbInt = aLInternal.Extent();
if (aNbInt || aNbIN)
{
// Combine the lists
TopTools_ListOfShape *pLIN = theInParts.Bound(aSolid, TopTools_ListOfShape());
TopTools_ListIteratorOfListOfShape aItLS(aLInFaces);
for (; aItLS.More(); aItLS.Next())
pLIN->Append(aItLS.Value());
aItLS.Initialize(aLInternal);
for (; aItLS.More(); aItLS.Next())
pLIN->Append(aItLS.Value());
//
if (aNbFIN || bHasImage) {
theDraftSolids.Bind(aSolid, aSDraft);
}
}
}

View File

@@ -54,8 +54,7 @@ BOPAlgo_PaveFiller::BOPAlgo_PaveFiller()
BOPAlgo_PaveFiller::BOPAlgo_PaveFiller
(const Handle(NCollection_BaseAllocator)& theAllocator)
:
BOPAlgo_Algo(theAllocator),
myFPBDone(1, theAllocator)
BOPAlgo_Algo(theAllocator)
{
myDS = NULL;
myIterator = NULL;
@@ -287,13 +286,6 @@ void BOPAlgo_PaveFiller::PerformInternal()
UpdatePaveBlocksWithSDVertices();
UpdateInterfsWithSDVertices();
//
// Force intersection of edges after increase
// of the tolerance values of their vertices
//ForceInterfEE();
// Force Edge/Face intersection after increase
// of the tolerance values of their vertices
ForceInterfEF();
//
// 22
PerformFF();
if (HasErrors()) {

View File

@@ -167,9 +167,6 @@ protected:
Bnd_Box,
TColStd_MapTransientHasher> BOPAlgo_DataMapOfPaveBlockBndBox;
typedef NCollection_DataMap
<Standard_Integer,
BOPDS_MapOfPaveBlock> BOPAlgo_DataMapOfIntegerMapOfPaveBlock;
//! Sets non-destructive mode automatically if an argument
//! contains a locked sub-shape (see TopoDS_Shape::Locked()).
@@ -477,19 +474,6 @@ protected:
//! In case self-interference is found the warning is added.
Standard_EXPORT void CheckSelfInterference();
//! The method looks for the additional common blocks among pairs of edges
//! with the same bounding vertices.
Standard_EXPORT void ForceInterfEE();
//! The method looks for the additional edge/face common blocks
//! among pairs of edge/face having the same vertices.
Standard_EXPORT void ForceInterfEF();
//! Performs intersection of given pave blocks
//! with all faces from arguments.
Standard_EXPORT void ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB,
const Standard_Boolean theAddInterf);
BOPCol_ListOfShape myArguments;
BOPDS_PDS myDS;
@@ -501,8 +485,6 @@ protected:
Standard_Boolean myAvoidBuildPCurve;
BOPAlgo_GlueEnum myGlue;
BOPAlgo_DataMapOfIntegerMapOfPaveBlock myFPBDone; //!< Fence map of intersected faces and pave blocks
private:

View File

@@ -768,278 +768,3 @@ Standard_Boolean BOPAlgo_PaveFiller::GetPBBox(const TopoDS_Edge& theE,
}
return bValid;
}
#include <NCollection_IncAllocator.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
//=======================================================================
//function : ForceInterfEE
//purpose :
//=======================================================================
void BOPAlgo_PaveFiller::ForceInterfEE()
{
// Now that we have vertices increased and unified, try to find additional
// common blocks among the pairs of edges.
// Since all real intersections should have already happened, here we
// are interested in common blocks only, thus we need to check only
// those pairs of pave blocks with the same bounding vertices.
Handle(NCollection_IncAllocator) anAlloc = new NCollection_IncAllocator;
// Initialize pave blocks for all vertices which participated in intersections
const Standard_Integer aNbS = myDS->NbSourceShapes();
for (Standard_Integer i = 0; i < aNbS; ++i)
{
const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i);
if (aSI.ShapeType() == TopAbs_VERTEX)
{
if (myDS->HasInterf(i))
myDS->InitPaveBlocksForVertex(i);
}
}
// Fill the connection map from bounding vertices to pave blocks
// having those bounding vertices
NCollection_IndexedDataMap<BOPDS_Pair,
BOPDS_ListOfPaveBlock,
BOPDS_PairMapHasher> aPBMap(1, anAlloc);
// Fence map of pave blocks
BOPDS_MapOfPaveBlock aMPBFence(1, anAlloc);
for (Standard_Integer i = 0; i < aNbS; ++i)
{
const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i);
if (aSI.ShapeType() != TopAbs_EDGE)
// Not an edge
continue;
if (!aSI.HasReference())
// Edge has no pave blocks
continue;
if (aSI.HasFlag())
// Degenerated edge
continue;
const BOPDS_ListOfPaveBlock& aLPB = myDS->PaveBlocks(i);
BOPDS_ListIteratorOfListOfPaveBlock aItLPB(aLPB);
for (; aItLPB.More(); aItLPB.Next())
{
const Handle(BOPDS_PaveBlock)& aPB = aItLPB.Value();
const Handle(BOPDS_PaveBlock)& aPBR = myDS->RealPaveBlock(aPB);
if (!aMPBFence.Add(aPBR))
continue;
// Get indices
Standard_Integer nV1, nV2;
aPBR->Indices(nV1, nV2);
// Add pave block to a map
BOPDS_Pair aPair(nV1, nV2);
BOPDS_ListOfPaveBlock *pList = aPBMap.ChangeSeek(aPair);
if (!pList)
pList = &aPBMap(aPBMap.Add(aPair, BOPDS_ListOfPaveBlock(anAlloc)));
pList->Append(aPBR);
}
}
Standard_Integer aNbPB = aPBMap.Extent();
if (!aNbPB)
return;
const Standard_Boolean bSICheckMode = (myArguments.Extent() == 1);
// Prepare pave blocks with the same vertices for intersection.
BOPAlgo_VectorOfEdgeEdge aVEdgeEdge;
for (Standard_Integer i = 1; i <= aNbPB; ++i)
{
const BOPDS_ListOfPaveBlock& aLPB = aPBMap(i);
if (aLPB.Extent() < 2)
continue;
const BOPDS_Pair& aPair = aPBMap.FindKey(i);
Standard_Integer nV1, nV2;
aPair.Indices(nV1, nV2);
const TopoDS_Vertex& aV1 = TopoDS::Vertex(myDS->Shape(nV1));
const TopoDS_Vertex& aV2 = TopoDS::Vertex(myDS->Shape(nV2));
// Use the max tolerance of vertices as Fuzzy value for intersection of edges.
// In the Self-Interference check mode we are interested in real
// intersections only, so use only the real tolerance of edges,
// no need to use the extended tolerance.
Standard_Real aTolAdd = (bSICheckMode ? myFuzzyValue :
2 * Max(BRep_Tool::Tolerance(aV1), BRep_Tool::Tolerance(aV2)));
// All possible pairs combined from the list <aLPB> should be checked
BOPDS_ListIteratorOfListOfPaveBlock aItLPB1(aLPB);
for (; aItLPB1.More(); aItLPB1.Next())
{
const Handle(BOPDS_PaveBlock)& aPB1 = aItLPB1.Value();
const Handle(BOPDS_CommonBlock)& aCB1 = myDS->CommonBlock(aPB1);
const Standard_Integer nE1 = aPB1->OriginalEdge();
const Standard_Integer iR1 = myDS->Rank(nE1);
const TopoDS_Edge& aE1 = TopoDS::Edge(myDS->Shape(nE1));
Standard_Real aT11, aT12;
aPB1->Range(aT11, aT12);
BRepAdaptor_Curve aBAC1(aE1);
gp_Pnt aPm;
gp_Vec aVTgt1;
aBAC1.D1((aT11 + aT12) * 0.5, aPm, aVTgt1);
if (aVTgt1.SquareMagnitude() < gp::Resolution())
continue;
aVTgt1.Normalize();
BOPDS_ListIteratorOfListOfPaveBlock aItLPB2 = aItLPB1;
for (aItLPB2.Next(); aItLPB2.More(); aItLPB2.Next())
{
const Handle(BOPDS_PaveBlock)& aPB2 = aItLPB2.Value();
const Handle(BOPDS_CommonBlock)& aCB2 = myDS->CommonBlock(aPB2);
const Standard_Integer nE2 = aPB2->OriginalEdge();
const Standard_Integer iR2 = myDS->Rank(nE2);
// Check that the edges came from different arguments
if (iR1 == iR2)
{
// If the sharing of the vertices is not original, but has been acquired
// during the operation, check the coincidence of the edges even if
// they came from the same argument
if ((!myDS->IsNewShape(nV1) && (myDS->Rank(nV1) == iR1)) ||
(!myDS->IsNewShape(nV2) && (myDS->Rank(nV2) == iR2)))
continue;
}
// Check that the Pave blocks do not form the Common block already
if (!aCB1.IsNull() && !aCB2.IsNull())
{
if (aCB1 == aCB2)
continue;
}
const TopoDS_Edge& aE2 = TopoDS::Edge(myDS->Shape(nE2));
Standard_Real aT21, aT22;
aPB2->Range(aT21, aT22);
// Check the angle between edges in the middle point.
// If the angle is more than 10 degrees, do not use the additional
// tolerance, as it may lead to undesired unification of edges
Standard_Boolean bUseAddTol = Standard_True;
{
BRepAdaptor_Curve aBAC2(aE2);
if (aBAC1.GetType() != GeomAbs_Line ||
aBAC2.GetType() != GeomAbs_Line)
{
GeomAPI_ProjectPointOnCurve& aProjPC = myContext->ProjPC(aE2);
aProjPC.Perform(aPm);
if (!aProjPC.NbPoints())
continue;
gp_Pnt aPm2;
gp_Vec aVTgt2;
aBAC2.D1(aProjPC.LowerDistanceParameter(), aPm2, aVTgt2);
if (aVTgt2.SquareMagnitude() < gp::Resolution())
continue;
// The angle should be close to zero
Standard_Real aCos = aVTgt1.Dot (aVTgt2.Normalized());
if (Abs(aCos) < 0.9848)
bUseAddTol = Standard_False;
}
}
// Add pair for intersection
BOPAlgo_EdgeEdge& anEdgeEdge = aVEdgeEdge.Append1();
anEdgeEdge.UseQuickCoincidenceCheck(Standard_True);
anEdgeEdge.SetPaveBlock1(aPB1);
anEdgeEdge.SetPaveBlock2(aPB2);
anEdgeEdge.SetEdge1(aE1, aT11, aT12);
anEdgeEdge.SetEdge2(aE2, aT21, aT22);
//anEdgeEdge.SetBoxes (myDS->ShapeInfo(nE1).Box(), myDS->ShapeInfo (nE2).Box());
if (bUseAddTol)
anEdgeEdge.SetFuzzyValue(myFuzzyValue + aTolAdd);
else
anEdgeEdge.SetFuzzyValue(myFuzzyValue);
anEdgeEdge.SetProgressIndicator(myProgressIndicator);
}
}
}
Standard_Integer aNbPairs = aVEdgeEdge.Length();
if (!aNbPairs)
return;
aPBMap.Clear();
aMPBFence.Clear();
anAlloc->Reset();
// Perform intersection of the found pairs
BOPAlgo_EdgeEdgeCnt::Perform (myRunParallel, aVEdgeEdge);
BOPDS_VectorOfInterfEE& aEEs = myDS->InterfEE();
if (aEEs.IsEmpty())
aEEs.SetIncrement(10);
// Analyze the results of intersection looking for TopAbs_EDGE
// intersection type only.
BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock aMPBLPB(1, anAlloc);
for (Standard_Integer i = 0; i < aNbPairs; ++i)
{
BOPAlgo_EdgeEdge& anEdgeEdge = aVEdgeEdge(i);
if (!anEdgeEdge.IsDone() || anEdgeEdge.HasErrors())
{
// Warn about failed intersection of sub-shapes
//const TopoDS_Shape& aE1 = myDS->Shape(anEdgeEdge.PaveBlock1()->OriginalEdge());
//const TopoDS_Shape& aE2 = myDS->Shape(anEdgeEdge.PaveBlock2()->OriginalEdge());
//AddIntersectionFailedWarning(aE1, aE2);
continue;
}
const IntTools_SequenceOfCommonPrts& aCParts = anEdgeEdge.CommonParts();
if (aCParts.Length() != 1)
continue;
const IntTools_CommonPrt& aCP = aCParts(1);
if (aCP.Type() != TopAbs_EDGE)
continue;
Handle(BOPDS_PaveBlock) aPB[] = {anEdgeEdge.PaveBlock1(), anEdgeEdge.PaveBlock2()};
const Standard_Integer nE1 = aPB[0]->OriginalEdge();
const Standard_Integer nE2 = aPB[1]->OriginalEdge();
if (myDS->Rank(nE1) == myDS->Rank(nE2))
{
// Add acquired self-interference warning
//TopoDS_Compound aWC;
//BRep_Builder().MakeCompound(aWC);
//BRep_Builder().Add(aWC, myDS->Shape(nE1));
//BRep_Builder().Add(aWC, myDS->Shape(nE2));
//AddWarning(new BOPAlgo_AlertAcquiredSelfIntersection(aWC));
}
BOPDS_InterfEE& aEE = aEEs.Append1();
aEE.SetIndices(nE1, nE2);
aEE.SetCommonPart(aCP);
myDS->AddInterf(nE1, nE2);
// Fill map for common blocks creation
for (Standard_Integer j = 0; j < 2; ++j)
{
if (myDS->IsCommonBlock(aPB[j]))
{
const BOPDS_ListOfPaveBlock& aLPBCB = myDS->CommonBlock(aPB[j])->PaveBlocks();
BOPDS_ListIteratorOfListOfPaveBlock aItLPB(aLPBCB);
for (; aItLPB.More(); aItLPB.Next())
BOPAlgo_Tools::FillMap<Handle(BOPDS_PaveBlock),
TColStd_MapTransientHasher>(aPB[j], aItLPB.Value(), aMPBLPB, anAlloc);
}
}
BOPAlgo_Tools::FillMap<Handle(BOPDS_PaveBlock),
TColStd_MapTransientHasher>(aPB[0], aPB[1], aMPBLPB, anAlloc);
}
// Create new common blocks of coinciding pairs.
BOPAlgo_Tools::PerformCommonBlocks(aMPBLPB, anAlloc, myDS);
}

View File

@@ -20,7 +20,6 @@
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_Alerts.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPCol_BoxBndTree.hxx>
#include <BOPCol_MapOfInteger.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
@@ -34,11 +33,9 @@
#include <BOPDS_Pave.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_CommonPrt.hxx>
#include <IntTools_Context.hxx>
@@ -46,15 +43,12 @@
#include <IntTools_Range.hxx>
#include <IntTools_SequenceOfCommonPrts.hxx>
#include <IntTools_Tools.hxx>
#include <NCollection_IncAllocator.hxx>
#include <NCollection_UBTreeFiller.hxx>
#include <Precision.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
//=======================================================================
//class : BOPAlgo_EdgeFace
//purpose :
@@ -253,12 +247,7 @@ void BOPAlgo_PaveFiller::PerformEF()
BOPTools_AlgoTools::CorrectRange(aE, aF, aSR, aPBRange);
aEdgeFace.SetRange (aPBRange);
aEdgeFace.SetProgressIndicator(myProgressIndicator);
// Save the pair to avoid their forced intersection
BOPDS_MapOfPaveBlock* pMPB = myFPBDone.ChangeSeek(nF);
if (!pMPB)
pMPB = myFPBDone.Bound(nF, BOPDS_MapOfPaveBlock());
pMPB->Add(aPB);
//
}//for (; aIt.More(); aIt.Next()) {
}//for (; myIterator->More(); myIterator->Next()) {
//
@@ -667,351 +656,3 @@ void BOPAlgo_PaveFiller::ReduceIntersectionRange(const Standard_Integer theV1,
}
}
}
//=======================================================================
//function : ForceInterfEF
//purpose :
//=======================================================================
void BOPAlgo_PaveFiller::ForceInterfEF()
{
if (!myIsPrimary)
return;
// Now that we have vertices increased and unified, try to find additional
// edge/face common blocks among the pairs of edge/face.
// Here, we are interested in common blocks only, as all real intersections
// should have happened already. Thus, we need to check only those pairs
// of edge/face which have the same vertices.
// Collect all pave blocks
BOPDS_IndexedMapOfPaveBlock aMPB;
const Standard_Integer aNbS = myDS->NbSourceShapes();
for (Standard_Integer nE = 0; nE < aNbS; ++nE)
{
const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(nE);
if (aSI.ShapeType() != TopAbs_EDGE)
// Not an edge
continue;
if (!aSI.HasReference())
// Edge has no pave blocks
continue;
if (aSI.HasFlag())
// Degenerated edge
continue;
const BOPDS_ListOfPaveBlock& aLPB = myDS->PaveBlocks(nE);
BOPDS_ListIteratorOfListOfPaveBlock aItLPB(aLPB);
for (; aItLPB.More(); aItLPB.Next())
{
const Handle(BOPDS_PaveBlock)& aPB = aItLPB.Value();
const Handle(BOPDS_PaveBlock)& aPBR = myDS->RealPaveBlock(aPB);
aMPB.Add(aPBR);
}
}
// Perform intersection of collected pave blocks with faces
ForceInterfEF(aMPB, Standard_True);
}
//=======================================================================
//function : ForceInterfEF
//purpose :
//=======================================================================
void BOPAlgo_PaveFiller::ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB,
const Standard_Boolean theAddInterf)
{
if (theMPB.IsEmpty())
return;
// Fill the tree with bounding boxes of the pave blocks
NCollection_UBTree<Standard_Integer, Bnd_Box> aBBTree;
NCollection_UBTreeFiller<Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
Handle(NCollection_IncAllocator) anAlloc = new NCollection_IncAllocator;
BOPDS_IndexedMapOfPaveBlock aPBMap(1, anAlloc);
Standard_Integer aNbPB = theMPB.Extent();
for (Standard_Integer iPB = 1; iPB <= aNbPB; ++iPB)
{
Handle(BOPDS_PaveBlock) aPB = theMPB(iPB);
if (!aPB->HasShrunkData() || !myDS->IsValidShrunkData(aPB))
{
FillShrunkData(aPB);
if (!aPB->HasShrunkData())
continue;
}
Standard_Real f, l;
Bnd_Box aPBBox;
Standard_Boolean isSplit;
aPB->ShrunkData(f, l, aPBBox, isSplit);
aTreeFiller.Add(aPBMap.Add(aPB), aPBBox);
}
// Shake the tree
aTreeFiller.Fill();
const Standard_Boolean bSICheckMode = (myArguments.Extent() == 1);
// Find pairs of Face/PaveBlock containing the same vertices
// and prepare those pairs for intersection.
BOPAlgo_VectorOfEdgeFace aVEdgeFace;
const Standard_Integer aNbS = myDS->NbSourceShapes();
for (Standard_Integer nF = 0; nF < aNbS; ++nF)
{
const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(nF);
if (aSI.ShapeType() != TopAbs_FACE)
// Not a face
continue;
if (!aSI.HasReference())
// Face has no face info
continue;
const Bnd_Box& aBoxF = aSI.Box();
BOPCol_BoxBndTreeSelector aSelector;
aSelector.SetBox(aBoxF);
if (!aBBTree.Select(aSelector))
continue;
const TopoDS_Face& aF = TopoDS::Face(aSI.Shape());
const BOPDS_FaceInfo& aFI = myDS->FaceInfo(nF);
// Vertices of the face
BOPCol_MapOfInteger aMVF;
const BOPCol_MapOfInteger* pMVF[] = { &aFI.VerticesOn(),
&aFI.VerticesIn(),
&aFI.VerticesSc() };
for (Standard_Integer iM = 0; iM < 3; ++iM)
{
BOPCol_MapIteratorOfMapOfInteger itM(*pMVF[iM]);
for (; itM.More(); itM.Next())
aMVF.Add(itM.Value());
}
// Pave Blocks of the face
const BOPDS_IndexedMapOfPaveBlock* pMPBF[] = { &aFI.PaveBlocksOn(),
&aFI.PaveBlocksIn(),
&aFI.PaveBlocksSc() };
for (Standard_Integer iM = 0; iM < 3; ++iM)
{
const Standard_Integer aNb = pMPBF[iM]->Extent();
for (Standard_Integer iPB = 1; iPB <= aNb; ++iPB)
{
const Handle(BOPDS_PaveBlock)& aPB = pMPBF[iM]->FindKey(iPB);
aMVF.Add(aPB->Pave1().Index());
aMVF.Add(aPB->Pave2().Index());
}
}
// Projection tool
GeomAPI_ProjectPointOnSurf& aProjPS = myContext->ProjPS(aF);
BRepAdaptor_Surface& aSurfAdaptor = myContext->SurfaceAdaptor (aF);
// Iterate on pave blocks and combine pairs containing
// the same vertices
const BOPCol_ListOfInteger& aLIPB = aSelector.Indices();
BOPCol_ListOfInteger::Iterator itLIPB(aLIPB);
for (; itLIPB.More(); itLIPB.Next())
{
const Handle(BOPDS_PaveBlock)& aPB = aPBMap(itLIPB.Value());
if (pMPBF[0]->Contains(aPB) ||
pMPBF[1]->Contains(aPB) ||
pMPBF[2]->Contains(aPB))
continue;
// Check if the face contains both vertices of the pave block
Standard_Integer nV1, nV2;
aPB->Indices(nV1, nV2);
if (!aMVF.Contains(nV1) || !aMVF.Contains(nV2))
// Face does not contain the vertices
continue;
// Get the edge
Standard_Integer nE;
if (!aPB->HasEdge(nE))
{
nE = aPB->OriginalEdge();
if (nE < 0)
continue;
// Make sure that the edge and face came from different arguments
if (myDS->Rank(nF) == myDS->Rank(nE))
continue;
}
const TopoDS_Edge& aE = TopoDS::Edge(myDS->Shape(nE));
BRepAdaptor_Curve aBAC(aE);
// Check directions coincidence at middle point on the edge
// and projection of that point on the face.
// If the angle between tangent vector to the curve and normal
// of the face is not in the range of 65 - 115 degrees, do not use the additional
// tolerance, as it may lead to undesired unification of edge with the face.
Standard_Boolean bUseAddTol = Standard_True;
Standard_Real aTS[2];
Bnd_Box aPBBox;
Standard_Boolean isSplit;
aPB->ShrunkData(aTS[0], aTS[1], aPBBox, isSplit);
// Middle point
gp_Pnt aPOnE;
// Tangent vector in the middle point
gp_Vec aVETgt;
aBAC.D1(BOPTools_AlgoTools2D::IntermediatePoint(aTS[0], aTS[1]), aPOnE, aVETgt);
if (aVETgt.SquareMagnitude() < gp::Resolution())
continue;
aProjPS.Perform(aPOnE);
if (!aProjPS.NbPoints())
continue;
// Check the distance in the middle point, using the max vertices
// tolerance as the criteria.
const TopoDS_Vertex& aV1 = TopoDS::Vertex(myDS->Shape(nV1));
const TopoDS_Vertex& aV2 = TopoDS::Vertex(myDS->Shape(nV2));
// In the Self-Interference check mode we are interested in real
// intersections only, so use only the real tolerance of edges,
// no need to use the extended tolerance.
Standard_Real aTolCheck = (bSICheckMode ? myFuzzyValue :
2 * Max(BRep_Tool::Tolerance(aV1), BRep_Tool::Tolerance(aV2)));
if (aProjPS.LowerDistance() > aTolCheck + myFuzzyValue)
continue;
Standard_Real U, V;
aProjPS.LowerDistanceParameters(U, V);
if (!myContext->IsPointInFace(aF, gp_Pnt2d(U, V)))
continue;
if (aSurfAdaptor.GetType() != GeomAbs_Plane ||
aBAC.GetType() != GeomAbs_Line)
{
gp_Pnt aPOnS = aProjPS.NearestPoint();
gp_Vec aVFNorm(aPOnS, aPOnE);
if (aVFNorm.SquareMagnitude() > gp::Resolution())
{
// Angle between vectors should be close to 90 degrees.
// We allow deviation of 10 degrees.
Standard_Real aCos = aVFNorm.Normalized().Dot (aVETgt.Normalized());
if (Abs(aCos) > 0.17365)
bUseAddTol = Standard_False;
}
}
// Compute an addition to Fuzzy value
Standard_Real aTolAdd = 0.0;
if (bUseAddTol)
{
// Compute the distance from the bounding points of the edge
// to the face and use the maximal of these distances as a
// fuzzy tolerance for the intersection.
// Use the maximal tolerance of the pave block's vertices
// as a max criteria for the computed distance.
for (Standard_Integer iP = 0; iP < 2; ++iP)
{
gp_Pnt aP = aBAC.Value(aTS[iP]);
aProjPS.Perform(aP);
if (aProjPS.NbPoints())
{
Standard_Real aDistEF = aProjPS.LowerDistance();
if (aDistEF < aTolCheck && aDistEF > aTolAdd)
aTolAdd = aDistEF;
}
}
if (aTolAdd > 0.)
{
aTolAdd -= (BRep_Tool::Tolerance(aE) + BRep_Tool::Tolerance(aF));
if (aTolAdd < 0.)
aTolAdd = 0.;
}
}
Standard_Boolean bIntersect = aTolAdd > 0;
if (!bIntersect)
{
const BOPDS_MapOfPaveBlock* pMPB = myFPBDone.Seek(nF);
bIntersect = !pMPB || !(pMPB->Contains(aPB));
}
if (bIntersect)
{
// Prepare pair for intersection
BOPAlgo_EdgeFace& aEdgeFace = aVEdgeFace.Append1();
aEdgeFace.SetIndices(nE, nF);
aEdgeFace.SetPaveBlock(aPB);
aEdgeFace.SetEdge(aE);
aEdgeFace.SetFace(aF);
//aEdgeFace.SetBoxes (myDS->ShapeInfo(nE).Box(), myDS->ShapeInfo (nF).Box());
aEdgeFace.SetFuzzyValue(myFuzzyValue + aTolAdd);
aEdgeFace.UseQuickCoincidenceCheck(Standard_True);
aEdgeFace.SetRange(IntTools_Range(aPB->Pave1().Parameter(), aPB->Pave2().Parameter()));
aEdgeFace.SetProgressIndicator(myProgressIndicator);
}
}
}
Standard_Integer aNbEFs = aVEdgeFace.Length();
if (!aNbEFs)
return;
aPBMap.Clear();
anAlloc->Reset();
// Perform intersection of the found pairs
BOPAlgo_EdgeFaceCnt::Perform (myRunParallel, aVEdgeFace, myContext);
BOPDS_VectorOfInterfEF& aEFs = myDS->InterfEF();
if (theAddInterf && aEFs.IsEmpty())
aEFs.SetIncrement(10);
// Analyze the results of intersection looking for TopAbs_EDGE
// intersection type only.
// Collect all pairs for common block creation
BOPDS_IndexedDataMapOfPaveBlockListOfInteger aMPBLI(1, anAlloc);
for (Standard_Integer i = 0; i < aNbEFs; ++i)
{
BOPAlgo_EdgeFace& anEdgeFace = aVEdgeFace(i);
if (!anEdgeFace.IsDone() || anEdgeFace.HasErrors())
continue;
const IntTools_SequenceOfCommonPrts& aCParts = anEdgeFace.CommonParts();
if (aCParts.Length() != 1)
continue;
const IntTools_CommonPrt& aCP = aCParts(1);
if (aCP.Type() != TopAbs_EDGE)
continue;
Standard_Integer nE, nF;
anEdgeFace.Indices(nE, nF);
if (theAddInterf)
{
// Add interference
BOPDS_InterfEF& aEF = aEFs.Append1();
aEF.SetIndices(nE, nF);
aEF.SetCommonPart(aCP);
myDS->AddInterf(nE, nF);
}
const Handle(BOPDS_PaveBlock)& aPB = anEdgeFace.PaveBlock();
// Update face information with new IN pave block
myDS->ChangeFaceInfo(nF).ChangePaveBlocksIn().Add(aPB);
if (theAddInterf)
// Fill map for common blocks creation
BOPAlgo_Tools::FillMap(aPB, nF, aMPBLI, anAlloc);
}
if (aMPBLI.Extent())
// Create new common blocks for coinciding pairs
BOPAlgo_Tools::PerformCommonBlocks(aMPBLI, anAlloc, myDS);
}

View File

@@ -29,7 +29,6 @@
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Solid.hxx>
#include <BOPCol_BoxBndTree.hxx>
#include <BOPCol_IndexedMapOfShape.hxx>
@@ -39,8 +38,6 @@
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
#include <BRepBndLib.hxx>
#include <TopExp_Explorer.hxx>
#include <BRepAdaptor_Curve.hxx>
@@ -67,13 +64,10 @@
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <NCollection_IncAllocator.hxx>
#include <NCollection_UBTreeFiller.hxx>
#include <IntTools_Context.hxx>
#include <algorithm>
typedef NCollection_IndexedDataMap
<TopoDS_Shape, gp_Dir, TopTools_ShapeMapHasher> BOPAlgo_IndexedDataMapOfShapeDir;
typedef NCollection_IndexedDataMap
@@ -1094,537 +1088,3 @@ void BOPAlgo_Tools::IntersectVertices(const BOPCol_IndexedDataMapOfShapeReal& th
}
}
}
//=======================================================================
// Classification of the faces relatively solids
//=======================================================================
//=======================================================================
//class : BOPAlgo_ShapeBox
//purpose : Auxiliary class defining ShapeBox structure
//=======================================================================
class BOPAlgo_ShapeBox
{
public:
//! Empty constructor
BOPAlgo_ShapeBox() {};
//! Sets the shape
void SetShape(const TopoDS_Shape& theS)
{
myShape = theS;
};
//! Returns the shape
const TopoDS_Shape& Shape() const
{
return myShape;
};
//! Sets the bounding box
void SetBox(const Bnd_Box& theBox)
{
myBox = theBox;
};
//! Returns the bounding box
const Bnd_Box& Box() const
{
return myBox;
};
private:
TopoDS_Shape myShape;
Bnd_Box myBox;
};
// Vector of ShapeBox
typedef BOPCol_NCVector<BOPAlgo_ShapeBox> BOPAlgo_VectorOfShapeBox;
//=======================================================================
//class : BOPAlgo_FillIn3DParts
//purpose : Auxiliary class for faces classification in parallel mode
//=======================================================================
class BOPAlgo_FillIn3DParts : public BOPAlgo_Algo
{
public:
DEFINE_STANDARD_ALLOC
//! Constructor
BOPAlgo_FillIn3DParts()
{
myBBTree = NULL;
myVShapeBox = NULL;
};
//! Destructor
virtual ~BOPAlgo_FillIn3DParts() {};
//! Sets the solid
void SetSolid(const TopoDS_Solid& theSolid)
{
mySolid = theSolid;
};
//! Returns the solid
const TopoDS_Solid& Solid() const
{
return mySolid;
};
//! Sets the box for the solid
void SetBoxS(const Bnd_Box& theBox)
{
myBoxS = theBox;
};
//! Returns the solid's box
const Bnd_Box& BoxS() const
{
return myBoxS;
};
//! Sets own INTERNAL faces of the solid
void SetOwnIF(const BOPCol_ListOfShape& theLIF)
{
myOwnIF = theLIF;
};
//! Returns own INTERNAL faces of the solid
const BOPCol_ListOfShape& OwnIF() const
{
return myOwnIF;
};
//! Sets the Bounding Box tree
void SetBBTree(const BOPCol_BoxBndTree& theBBTree)
{
myBBTree = (BOPCol_BoxBndTree*)&theBBTree;
};
//! Sets the ShapeBox structure
void SetShapeBoxVector(const BOPAlgo_VectorOfShapeBox& theShapeBox)
{
myVShapeBox = (BOPAlgo_VectorOfShapeBox*)&theShapeBox;
};
//! Sets the context
void SetContext(const Handle(IntTools_Context)& theContext)
{
myContext = theContext;
}
//! Returns the context
const Handle(IntTools_Context)& Context() const
{
return myContext;
}
//! Performs the classification
virtual void Perform();
//! Returns the faces classified as IN for solid
const BOPCol_ListOfShape& InFaces() const
{
return myInFaces;
};
private:
//! Prepares Edge-Face connection map of the given shape
void MapEdgesAndFaces(const TopoDS_Shape& theF,
BOPCol_IndexedDataMapOfShapeListOfShape& theEFMap,
const Handle(NCollection_BaseAllocator)& theAlloc);
//! Makes the connexity block of faces using the connection map
void MakeConnexityBlock(const TopoDS_Face& theF,
const BOPCol_IndexedMapOfShape& theMEToAvoid,
const BOPCol_IndexedDataMapOfShapeListOfShape& theEFMap,
BOPCol_MapOfShape& theMFDone,
BOPCol_ListOfShape& theLCB,
TopoDS_Face& theFaceToClassify);
TopoDS_Solid mySolid; //! Solid
Bnd_Box myBoxS; // Bounding box of the solid
BOPCol_ListOfShape myOwnIF; //! Own INTERNAL faces of the solid
BOPCol_ListOfShape myInFaces; //! Faces classified as IN
BOPCol_BoxBndTree* myBBTree; //! UB tree of bounding boxes
BOPAlgo_VectorOfShapeBox* myVShapeBox; //! ShapeBoxMap
TopoDS_Iterator myItF; //! Iterators
TopoDS_Iterator myItW;
Handle(IntTools_Context) myContext; //! Context
};
//=======================================================================
//function : BOPAlgo_FillIn3DParts::Perform
//purpose :
//=======================================================================
void BOPAlgo_FillIn3DParts::Perform()
{
BOPAlgo_Algo::UserBreak();
myInFaces.Clear();
// 1. Select boxes of faces that are not out of aBoxS
BOPCol_BoxBndTreeSelector aSelector;
aSelector.SetBox(myBoxS);
//
if (!myBBTree->Select(aSelector))
return;
const BOPCol_ListOfInteger& aLIFP = aSelector.Indices();
// 2. Fill maps of edges and faces of the solid
Handle(NCollection_BaseAllocator) anAlloc = new NCollection_IncAllocator;
BOPAlgo_VectorOfShapeBox& aVShapeBox = *myVShapeBox;
BOPCol_IndexedMapOfShape aMSE(1, anAlloc), aMSF(1, anAlloc);
BOPTools::MapShapes(mySolid, TopAbs_EDGE, aMSE);
BOPTools::MapShapes(mySolid, TopAbs_FACE, aMSF);
// Check if the Solid contains any faces
Standard_Boolean bIsEmpty = aMSF.IsEmpty();
// Add own internal faces of the solid into aMSF
BOPCol_ListIteratorOfListOfShape aItLS(myOwnIF);
for (; aItLS.More(); aItLS.Next())
aMSF.Add(aItLS.Value());
// 3. aIVec - faces to process.
// Filter the selected faces with faces of the solid.
BOPCol_NCVector<Standard_Integer> aIVec(256, anAlloc);
BOPCol_ListIteratorOfListOfInteger aItLI(aLIFP);
for (; aItLI.More(); aItLI.Next()) {
Standard_Integer nFP = aItLI.Value();
const TopoDS_Shape& aFP = aVShapeBox(nFP).Shape();
if (!aMSF.Contains(aFP))
aIVec.Append1() = nFP;
}
// 4. Classify faces relatively solid.
// Store faces that are IN mySolid into <myInFaces>
Standard_Integer k, aNbFP = aIVec.Length();
// Sort indices if necessary
if (aNbFP > 1)
std::sort(aIVec.begin(), aIVec.end());
if (bIsEmpty)
{
// The solid is empty as it does not contain any faces.
// It could happen when the input solid consists of INTERNAL faces only.
// Classification of any point relatively empty solid would always give IN status.
// Thus, we consider all selected faces as IN without real classification.
for (k = 0; k < aNbFP; ++k)
myInFaces.Append(aVShapeBox(aIVec(k)).Shape());
return;
}
// Prepare EF map of faces to process for building connexity blocks
BOPCol_IndexedDataMapOfShapeListOfShape aMEFP(1, anAlloc);
if (aNbFP > 1)
{
for (k = 0; k < aNbFP; ++k)
MapEdgesAndFaces(aVShapeBox(aIVec(k)).Shape(), aMEFP, anAlloc);
}
// Map of Edge-Face connection, necessary for solid classification.
// It will be filled when first classification is performed.
BOPCol_IndexedDataMapOfShapeListOfShape aMEFDS(1, anAlloc);
// Fence map to avoid processing of the same faces twice
BOPCol_MapOfShape aMFDone(1, anAlloc);
for (k = 0; k < aNbFP; ++k)
{
Standard_Integer nFP = aIVec(k);
const TopoDS_Face& aFP = (*(TopoDS_Face*)&aVShapeBox(nFP).Shape());
if (!aMFDone.Add(aFP))
continue;
// Make connexity blocks of faces, avoiding passing through the
// borders of the solid. It helps to reduce significantly the
// number of classified faces.
BOPCol_ListOfShape aLCBF(anAlloc);
// The most appropriate face for classification
TopoDS_Face aFaceToClassify;
MakeConnexityBlock(aFP, aMSE, aMEFP, aMFDone, aLCBF, aFaceToClassify);
if (!myBoxS.IsWhole())
{
// First, try fast classification of the whole block by additional
// check on bounding boxes - check that bounding boxes of all vertices
// of the block interfere with the box of the solid.
// If not, the faces are out.
Standard_Boolean bOut = Standard_False;
aItLS.Initialize(aLCBF);
for (; aItLS.More() && !bOut; aItLS.Next())
{
TopExp_Explorer anExpV(aItLS.Value(), TopAbs_VERTEX);
for (; anExpV.More() && !bOut; anExpV.Next())
{
const TopoDS_Vertex& aV = TopoDS::Vertex(anExpV.Current());
Bnd_Box aBBV;
aBBV.Add(BRep_Tool::Pnt(aV));
aBBV.SetGap(BRep_Tool::Tolerance(aV));
bOut = myBoxS.IsOut(aBBV);
}
}
if (bOut)
continue;
}
if (aFaceToClassify.IsNull())
aFaceToClassify = aFP;
if (aMEFDS.IsEmpty())
// Fill EF map for Solid
BOPTools::MapShapesAndAncestors(mySolid, TopAbs_EDGE, TopAbs_FACE, aMEFDS);
// All vertices are interfere with the solids box, run classification.
Standard_Boolean bIsIN = BOPTools_AlgoTools::IsInternalFace
(aFaceToClassify, mySolid, aMEFDS, Precision::Confusion(), myContext);
if (bIsIN)
{
aItLS.Initialize(aLCBF);
for (; aItLS.More(); aItLS.Next())
myInFaces.Append(aItLS.Value());
}
}
}
//=======================================================================
// function: MapEdgesAndFaces
// purpose:
//=======================================================================
void BOPAlgo_FillIn3DParts::MapEdgesAndFaces(const TopoDS_Shape& theF,
BOPCol_IndexedDataMapOfShapeListOfShape& theEFMap,
const Handle(NCollection_BaseAllocator)& theAllocator)
{
myItF.Initialize(theF);
for (; myItF.More(); myItF.Next())
{
const TopoDS_Shape& aW = myItF.Value();
if (aW.ShapeType() != TopAbs_WIRE)
continue;
myItW.Initialize(aW);
for (; myItW.More(); myItW.Next())
{
const TopoDS_Shape& aE = myItW.Value();
BOPCol_ListOfShape* pLF = theEFMap.ChangeSeek(aE);
if (!pLF)
pLF = &theEFMap(theEFMap.Add(aE, BOPCol_ListOfShape(theAllocator)));
pLF->Append(theF);
}
}
}
//=======================================================================
// function: MakeConnexityBlock
// purpose:
//=======================================================================
void BOPAlgo_FillIn3DParts::MakeConnexityBlock(const TopoDS_Face& theFStart,
const BOPCol_IndexedMapOfShape& theMEAvoid,
const BOPCol_IndexedDataMapOfShapeListOfShape& theEFMap,
BOPCol_MapOfShape& theMFDone,
BOPCol_ListOfShape& theLCB,
TopoDS_Face& theFaceToClassify)
{
// Add start element
theLCB.Append(theFStart);
if (theEFMap.IsEmpty())
return;
BOPCol_ListIteratorOfListOfShape aItCB(theLCB);
for (; aItCB.More(); aItCB.Next())
{
const TopoDS_Shape& aF = aItCB.Value();
myItF.Initialize(aF);
for (; myItF.More(); myItF.Next())
{
const TopoDS_Shape& aW = myItF.Value();
if (aW.ShapeType() != TopAbs_WIRE)
continue;
myItW.Initialize(aW);
for (; myItW.More(); myItW.Next())
{
const TopoDS_Shape& aE = myItW.Value();
if (theMEAvoid.Contains(aE))
{
if (theFaceToClassify.IsNull())
theFaceToClassify = TopoDS::Face(aF);
continue;
}
const BOPCol_ListOfShape* pLF = theEFMap.Seek(aE);
if (!pLF)
continue;
BOPCol_ListIteratorOfListOfShape aItLF(*pLF);
for (; aItLF.More(); aItLF.Next())
{
const TopoDS_Shape& aFToAdd = aItLF.Value();
if (theMFDone.Add(aFToAdd))
theLCB.Append(aFToAdd);
}
}
}
}
}
// Vector of solid classifiers
typedef BOPCol_NCVector<BOPAlgo_FillIn3DParts> BOPAlgo_VectorOfFillIn3DParts;
// Functors to perform classification
typedef BOPCol_ContextFunctor<BOPAlgo_FillIn3DParts,
BOPAlgo_VectorOfFillIn3DParts,
Handle(IntTools_Context),
IntTools_Context> BOPAlgo_FillIn3DPartsFunctor;
typedef BOPCol_ContextCnt<BOPAlgo_FillIn3DPartsFunctor,
BOPAlgo_VectorOfFillIn3DParts,
Handle(IntTools_Context)> BOPAlgo_FillIn3DPartsCnt;
namespace {
static void buildBoxForSolid (const TopoDS_Solid& theSolid,
Bnd_Box& theBox)
{
Standard_Boolean bIsOpenBox = Standard_False;
for (TopoDS_Iterator itS (theSolid); itS.More() && !bIsOpenBox; itS.Next())
{
const TopoDS_Shell& aShell = TopoDS::Shell (itS.Value());
bIsOpenBox = BOPTools_AlgoTools::IsOpenShell (aShell);
if (bIsOpenBox)
break;
for (TopoDS_Iterator itF (aShell); itF.More(); itF.Next())
{
const TopoDS_Face& aF = TopoDS::Face (itF.Value());
Bnd_Box aBoxF;
BRepBndLib::Add (aF, aBoxF);
bIsOpenBox = (aBoxF.IsOpenXmin() || aBoxF.IsOpenXmax() ||
aBoxF.IsOpenYmin() || aBoxF.IsOpenYmax() ||
aBoxF.IsOpenZmin() || aBoxF.IsOpenZmax());
if (bIsOpenBox)
break;
theBox.Add (aBoxF);
}
}
if (bIsOpenBox || BOPTools_AlgoTools::IsInvertedSolid (theSolid))
theBox.SetWhole();
}
}
//=======================================================================
//function : ClassifyFaces
//purpose :
//=======================================================================
void BOPAlgo_Tools::ClassifyFaces(const BOPCol_ListOfShape& theFaces,
const BOPCol_ListOfShape& theSolids,
const Standard_Boolean theRunParallel,
Handle(IntTools_Context)& theContext,
BOPCol_IndexedDataMapOfShapeListOfShape& theInParts,
const BOPCol_IndexedDataMapOfShapeBox* theBoxes,
const BOPCol_DataMapOfShapeListOfShape* theSolidsIF)
{
Handle(NCollection_BaseAllocator) anAlloc = new NCollection_IncAllocator;
// Fill the vector of shape box with faces and its bounding boxes
BOPAlgo_VectorOfShapeBox aVSB(256, anAlloc);
BOPCol_ListIteratorOfListOfShape aItLF(theFaces);
for (; aItLF.More(); aItLF.Next())
{
const TopoDS_Shape& aF = aItLF.Value();
// Append face to the vector of shape box
BOPAlgo_ShapeBox& aSB = aVSB.Append1();
aSB.SetShape(aF);
Bnd_Box aBox;
if (theBoxes)
{
const Bnd_Box* pBox = theBoxes->Seek (aF);
if (pBox)
aBox = *pBox;
}
if (aBox.IsVoid())
{
// Build the bounding box
BRepBndLib::Add(aF, aBox);
}
aSB.SetBox(aBox);
}
// Prepare UB tree of bounding boxes of the faces to classify
// taking the bounding boxes from the just prepared vector
BOPCol_BoxBndTree aBBTree;
NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
Standard_Integer aNbF = aVSB.Length();
for (Standard_Integer i = 0; i < aNbF; ++i)
{
aTreeFiller.Add(i, aVSB(i).Box());
}
// Shake tree filler
aTreeFiller.Fill();
// Prepare vector of solids to classify
BOPAlgo_VectorOfFillIn3DParts aVFIP;
BOPCol_ListIteratorOfListOfShape aItLS(theSolids);
for (; aItLS.More(); aItLS.Next())
{
const TopoDS_Solid& aSolid = TopoDS::Solid(aItLS.Value());
// Build the bounding box for the solid
Bnd_Box aBox;
if (theBoxes)
{
const Bnd_Box* pBox = theBoxes->Seek (aSolid);
if (pBox)
aBox = *pBox;
}
if (aBox.IsVoid())
{
buildBoxForSolid (aSolid, aBox);
}
// Append solid to the vector
BOPAlgo_FillIn3DParts& aFIP = aVFIP.Append1();
aFIP.SetSolid(aSolid);
aFIP.SetBoxS(aBox);
if (theSolidsIF)
{
const BOPCol_ListOfShape* pLIF = theSolidsIF->Seek(aSolid);
if (pLIF)
aFIP.SetOwnIF(*pLIF);
}
aFIP.SetBBTree(aBBTree);
aFIP.SetShapeBoxVector(aVSB);
}
// Perform classification
//================================================================
BOPAlgo_FillIn3DPartsCnt::Perform(theRunParallel, aVFIP, theContext);
//================================================================
// Analyze the results and fill the resulting map
Standard_Integer aNbS = aVFIP.Length();
for (Standard_Integer i = 0; i < aNbS; ++i)
{
BOPAlgo_FillIn3DParts& aFIP = aVFIP(i);
const TopoDS_Shape& aS = aFIP.Solid();
const BOPCol_ListOfShape& aLFIn = aFIP.InFaces();
theInParts.Add(aS, aLFIn);
}
}

View File

@@ -21,9 +21,6 @@
#include <BOPCol_BaseAllocator.hxx>
#include <BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_IndexedDataMapOfShapeBox.hxx>
#include <BOPCol_IndexedDataMapOfShapeReal.hxx>
#include <BOPCol_ListOfListOfShape.hxx>
#include <BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock.hxx>
@@ -158,27 +155,6 @@ public:
const Standard_Real theFuzzyValue,
BOPCol_ListOfListOfShape& theChains);
//! Classifies the faces <theFaces> relatively solids <theSolids>.
//! The IN faces for solids are stored into output data map <theInParts>.
//!
//! The map <theSolidsIF> contains INTERNAL faces of the solids, to avoid
//! their additional classification.
//!
//! Firstly, it checks the intersection of bounding boxes of the shapes.
//! If the Box is not stored in the <theShapeBoxMap> map, it builds the box.
//! If the bounding boxes of solid and face are interfering the classification is performed.
//!
//! It is assumed that all faces and solids are already intersected and
//! do not have any geometrically coinciding parts without topological
//! sharing of these parts
Standard_EXPORT static void ClassifyFaces(const BOPCol_ListOfShape& theFaces,
const BOPCol_ListOfShape& theSolids,
const Standard_Boolean theRunParallel,
Handle(IntTools_Context)& theContext,
BOPCol_IndexedDataMapOfShapeListOfShape& theInParts,
const BOPCol_IndexedDataMapOfShapeBox* theBoxes = 0,
const BOPCol_DataMapOfShapeListOfShape* theSolidsIF = 0);
};
#endif // _BOPAlgo_Tools_HeaderFile

View File

@@ -994,61 +994,46 @@ Standard_Boolean BOPTools_AlgoTools::AreFacesSameDomain
Handle(IntTools_Context)& theContext,
const Standard_Real theFuzz)
{
Standard_Boolean bFacesSD = Standard_False;
// The idea is to find a point inside the first face
// and check its validity for the second face.
// If valid - the faces are same domain.
gp_Pnt aP1;
gp_Pnt2d aP2D1;
// Find point inside the first face
Standard_Integer iErr =
BOPTools_AlgoTools3D::PointInFace(theF1, aP1, aP2D1, theContext);
if (iErr != 0)
{
// unable to find the point
return bFacesSD;
}
// Check validity of the point for second face
// Compute the tolerance to check the validity -
// sum of tolerance of faces and fuzzy tolerance
// Compute the tolerance of the faces, taking into account the deviation
// of the edges from the surfaces
Standard_Real aTolF1 = BRep_Tool::Tolerance(theF1),
aTolF2 = BRep_Tool::Tolerance(theF2);
// Find maximal tolerance of edges.
// The faces should have the same boundaries, thus
// it does not matter which face to explore.
{
Standard_Real aTolEMax = -1.;
TopExp_Explorer anExpE(theF1, TopAbs_EDGE);
for (; anExpE.More(); anExpE.Next())
{
const TopoDS_Edge& aE = TopoDS::Edge(anExpE.Current());
if (!BRep_Tool::Degenerated(aE))
{
Standard_Real aTolE = BRep_Tool::Tolerance(aE);
if (aTolE > aTolEMax)
aTolEMax = aTolE;
Standard_Boolean bFlag;
Standard_Integer iErr;
Standard_Real aTolF1, aTolF2, aTol;
gp_Pnt2d aP2D;
gp_Pnt aP;
TopoDS_Face aF1, aF2;
TopoDS_Edge aE1;
TopExp_Explorer aExp;
Standard_Real aFuzz1 = (theFuzz > Precision::Confusion() ? theFuzz : Precision::Confusion());
//
bFlag=Standard_False;
//
aF1=theF1;
aF1.Orientation(TopAbs_FORWARD);
aF2=theF2;
aF2.Orientation(TopAbs_FORWARD);
//
aTolF1=BRep_Tool::Tolerance(aF1);
// 1
aExp.Init(aF1, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
aE1=(*(TopoDS_Edge*)(&aExp.Current()));
if (!BRep_Tool::Degenerated(aE1)) {
Standard_Real aTolE = BRep_Tool::Tolerance(aE1);
if (aTolE > aTolF1) {
aTolF1 = aTolE;
}
}
if (aTolEMax > aTolF1) aTolF1 = aTolEMax;
if (aTolEMax > aTolF2) aTolF2 = aTolEMax;
}
// Checking criteria
Standard_Real aTol = aTolF1 + aTolF2 + Max(theFuzz, Precision::Confusion());
// Project and classify the point on second face
bFacesSD = theContext->IsValidPointForFace(aP1, theF2, aTol);
return bFacesSD;
// 2
aTolF2=BRep_Tool::Tolerance(aF2);
aTol = aTolF1 + aTolF2 + aFuzz1;
//
iErr = BOPTools_AlgoTools3D::PointInFace(aF1, aP, aP2D,
theContext);
if (!iErr) {
bFlag=theContext->IsValidPointForFace(aP, aF2, aTol);
}
//
return bFlag;
}
//=======================================================================

View File

@@ -321,23 +321,8 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
itcr.Next();
}
// Curve is not found. Try projection on plane
return CurveOnPlane(E, S, L, First, Last);
}
//=======================================================================
//function : CurveOnPlane
//purpose : For planar surface returns projection of the edge on the plane
//=======================================================================
Handle(Geom2d_Curve) BRep_Tool::CurveOnPlane(const TopoDS_Edge& E,
const Handle(Geom_Surface)& S,
const TopLoc_Location& L,
Standard_Real& First,
Standard_Real& Last)
{
First = Last = 0.;
// Check if the surface is planar
// for planar surface and 3d curve try a projection
// modif 21-05-97 : for RectangularTrimmedSurface, try a projection
Handle(Geom_Plane) GP;
Handle(Geom_RectangularTrimmedSurface) GRTS;
GRTS = Handle(Geom_RectangularTrimmedSurface)::DownCast(S);
@@ -345,51 +330,64 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnPlane(const TopoDS_Edge& E,
GP = Handle(Geom_Plane)::DownCast(GRTS->BasisSurface());
else
GP = Handle(Geom_Plane)::DownCast(S);
//fin modif du 21-05-97
if (GP.IsNull())
// not a plane
return nullPCurve;
// Check existence of 3d curve in edge
Standard_Real f, l;
TopLoc_Location aCurveLocation;
Handle(Geom_Curve) C3D = BRep_Tool::Curve(E, aCurveLocation, f, l);
if (C3D.IsNull())
// no 3d curve
return nullPCurve;
aCurveLocation = aCurveLocation.Predivided(L);
First = f; Last = l;
// Transform curve and update parameters in account of scale factor
if (!aCurveLocation.IsIdentity())
if (!GP.IsNull())
{
const gp_Trsf& aTrsf = aCurveLocation.Transformation();
C3D = Handle(Geom_Curve)::DownCast(C3D->Transformed(aTrsf));
f = C3D->TransformedParameter(f, aTrsf);
l = C3D->TransformedParameter(l, aTrsf);
Handle(GeomAdaptor_HCurve) HC;
Handle(GeomAdaptor_HSurface) HS;
HC = new GeomAdaptor_HCurve();
HS = new GeomAdaptor_HSurface();
TopLoc_Location aCurveLocation;
Standard_Real f, l;// for those who call with (u,u).
Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, aCurveLocation, f, l);
if (C3d.IsNull())
{
First = Last = 0.;
return nullPCurve;
}
aCurveLocation = aCurveLocation.Predivided(L);
First = f; Last = l; //Range of edge must not be modified
if (!aCurveLocation.IsIdentity())
{
const gp_Trsf& T = aCurveLocation.Transformation();
Handle(Geom_Geometry) GC3d = C3d->Transformed(T);
C3d = Handle(Geom_Curve)::DownCast (GC3d);
f = C3d->TransformedParameter(f, T);
l = C3d->TransformedParameter(l, T);
}
GeomAdaptor_Surface& GAS = HS->ChangeSurface();
GAS.Load(GP);
Handle(Geom_Curve) ProjOnPlane =
GeomProjLib::ProjectOnPlane(new Geom_TrimmedCurve(C3d,f,l,Standard_True,Standard_False),
GP,
GP->Position().Direction(),
Standard_True);
GeomAdaptor_Curve& GAC = HC->ChangeCurve();
GAC.Load(ProjOnPlane);
ProjLib_ProjectedCurve Proj(HS,HC);
Handle(Geom2d_Curve) pc = Geom2dAdaptor::MakeCurve(Proj);
if (pc->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
Handle(Geom2d_TrimmedCurve) TC =
Handle(Geom2d_TrimmedCurve)::DownCast (pc);
pc = TC->BasisCurve();
}
return pc;
}
// Perform projection
Handle(Geom_Curve) ProjOnPlane =
GeomProjLib::ProjectOnPlane(new Geom_TrimmedCurve(C3D, f, l, Standard_True, Standard_False),
GP,
GP->Position().Direction(),
Standard_True);
Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(GP);
Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(ProjOnPlane);
ProjLib_ProjectedCurve Proj(HS, HC);
Handle(Geom2d_Curve) pc = Geom2dAdaptor::MakeCurve(Proj);
if (pc->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
Handle(Geom2d_TrimmedCurve) TC = Handle(Geom2d_TrimmedCurve)::DownCast(pc);
pc = TC->BasisCurve();
}
return pc;
First = Last = 0.;
return nullPCurve;
}
//=======================================================================
@@ -440,34 +438,35 @@ void BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
Standard_Real& Last,
const Standard_Integer Index)
{
if (Index < 1)
return;
Standard_Integer i = 0;
Standard_Boolean Eisreversed = (E.Orientation() == TopAbs_REVERSED);
// find the representation
const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
for (; itcr.More(); itcr.Next())
{
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface())
{
const BRep_GCurve* GC = static_cast<const BRep_GCurve*>(cr.get());
++i;
// Compare index taking into account the fact that for the curves on
// closed surfaces there are two PCurves
if (i == Index)
C = GC->PCurve();
else if (GC->IsCurveOnClosedSurface() && (++i == Index))
C = GC->PCurve2();
else
continue;
S = GC->Surface();
L = E.Location() * GC->Location();
GC->Range(First, Last);
return;
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface()) {
const BRep_GCurve* GC = static_cast<const BRep_GCurve*>(cr.get());
i++;
if (i > Index) break;
if (i == Index) {
// JMB le 21 Mai 1999
// it is done as in the other CurveOnSurface methods, ie. take into account
// the orientation in case of cut edges (return PCurve2)
// otherwise there is a risk to loop curves or to not get the prover one.
if (GC->IsCurveOnClosedSurface() && Eisreversed)
C = GC->PCurve2();
else
C = GC->PCurve();
S = GC->Surface();
L = E.Location() * GC->Location();
GC->Range(First,Last);
return;
}
}
itcr.Next();
}
C.Nullify();

View File

@@ -103,16 +103,6 @@ public:
//! handle if this curve does not exist. Returns in
//! <First> and <Last> the parameter range.
Standard_EXPORT static Handle(Geom2d_Curve) CurveOnSurface (const TopoDS_Edge& E, const Handle(Geom_Surface)& S, const TopLoc_Location& L, Standard_Real& First, Standard_Real& Last);
//! For the planar surface builds the 2d curve for the edge
//! by projection of the edge on plane.
//! Returns a NULL handle if the surface is not planar or
//! the projection failed.
Standard_EXPORT static Handle(Geom2d_Curve) CurveOnPlane (const TopoDS_Edge& E,
const Handle(Geom_Surface)& S,
const TopLoc_Location& L,
Standard_Real& First,
Standard_Real& Last);
//! Returns in <C>, <S>, <L> a 2d curve, a surface and
//! a location for the edge <E>. <C> and <S> are null

View File

@@ -144,6 +144,13 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire,
TFirst = 0;
TLast = myKnots->Value(myKnots->Length());
myPeriod = TLast - TFirst;
if (NbEdge == 1) {
Periodic = myCurves->Value(1).IsPeriodic();
}
else {
Periodic = Standard_False;
}
}
void BRepAdaptor_CompCurve::Initialize(const TopoDS_Wire& W,
@@ -193,6 +200,15 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire,
}
}
void BRepAdaptor_CompCurve::SetPeriodic(const Standard_Boolean isPeriodic)
{
if (myWire.Closed()) {
Periodic = isPeriodic;
}
}
const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
{
return myWire;
@@ -292,13 +308,13 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
Standard_Boolean BRepAdaptor_CompCurve::IsPeriodic() const
{
return Standard_False;
return Periodic;
}
Standard_Real BRepAdaptor_CompCurve::Period() const
{
return (TLast - TFirst);
return myPeriod;
}
gp_Pnt BRepAdaptor_CompCurve::Value(const Standard_Real U) const
@@ -459,6 +475,12 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
Wtest = W+Eps; //Offset to discriminate the nodes
if(Periodic){
Wtest = ElCLib::InPeriod(Wtest,
0,
myPeriod);
W = Wtest-Eps;
}
// Find the index
Standard_Boolean Trouve = Standard_False;

View File

@@ -52,13 +52,7 @@ class Geom_BSplineCurve;
//! The Curve from BRepAdaptor allows to use a Wire
//! of the BRep topology like a 3D curve.
//! Warning: With this class of curve, C0 and C1 continuities
//! are not assumed. So be careful with some algorithm!
//! Please note that BRepAdaptor_CompCurve cannot be
//! periodic curve at all (even if it contains single
//! periodic edge).
//!
//! BRepAdaptor_CompCurve can only work on valid wires where all edges are
//! connected to each other to make a chain.
//! are not assumed. So be carful with some algorithm!
class BRepAdaptor_CompCurve : public Adaptor3d_Curve
{
public:
@@ -81,6 +75,10 @@ public:
//! Sets wire <W> and trimmed parameter.
Standard_EXPORT void Initialize (const TopoDS_Wire& W, const Standard_Boolean KnotByCurvilinearAbcissa, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
//! Set the flag Periodic.
//! Warning: This method has no effect if the wire is not closed
Standard_EXPORT void SetPeriodic (const Standard_Boolean Periodic);
//! Returns the wire.
Standard_EXPORT const TopoDS_Wire& Wire() const;

View File

@@ -115,9 +115,8 @@ void BRepBndLib::Add(const TopoDS_Shape& S, Bnd_Box& B, Standard_Boolean useTria
}
else {
for (;ex2.More();ex2.Next()) {
const TopoDS_Edge& anEdge = TopoDS::Edge(ex2.Current());
BC.Initialize(anEdge);
BndLib_Add3dCurve::Add(BC, BRep_Tool::Tolerance(anEdge), B);
BC.Initialize(TopoDS::Edge(ex2.Current()));
BndLib_Add3dCurve::Add(BC, BRep_Tool::Tolerance(F), B);
}
B.Enlarge(BRep_Tool::Tolerance(F));
}

View File

@@ -27,7 +27,6 @@
#include <Precision.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <Geom2dAPI_ProjectPointOnCurve.hxx>
static const Standard_Real Probing_Start = 0.123;
static const Standard_Real Probing_End = 0.7;
@@ -42,28 +41,27 @@ BRepClass_FaceExplorer::BRepClass_FaceExplorer(const TopoDS_Face& F) :
myFace(F),
myCurEdgeInd(1),
myCurEdgePar(Probing_Start)
{
{
myFace.Orientation(TopAbs_FORWARD);
}
//=======================================================================
//function : CheckPoint
//purpose :
//=======================================================================
Standard_Boolean BRepClass_FaceExplorer::CheckPoint(gp_Pnt2d& thePoint)
Standard_Boolean BRepClass_FaceExplorer::CheckPoint(gp_Pnt2d& thePoint)
{
Standard_Real anUMin = 0.0, anUMax = 0.0, aVMin = 0.0, aVMax = 0.0;
TopLoc_Location aLocation;
const Handle(Geom_Surface)& aSurface = BRep_Tool::Surface(myFace, aLocation);
aSurface->Bounds(anUMin, anUMax, aVMin, aVMax);
if (Precision::IsInfinite(anUMin) || Precision::IsInfinite(anUMax) ||
Precision::IsInfinite(aVMin) || Precision::IsInfinite(aVMax))
Precision::IsInfinite(aVMin) || Precision::IsInfinite(aVMax))
{
BRepTools::UVBounds(myFace, anUMin, anUMax, aVMin, aVMax);
if (Precision::IsInfinite(anUMin) || Precision::IsInfinite(anUMax) ||
Precision::IsInfinite(aVMin) || Precision::IsInfinite(aVMax))
Precision::IsInfinite(aVMin) || Precision::IsInfinite(aVMax))
{
return Standard_True;
}
@@ -73,14 +71,14 @@ Standard_Boolean BRepClass_FaceExplorer::CheckPoint(gp_Pnt2d& thePoint)
Standard_Real aDistance = aCenterPnt.Distance(thePoint);
if (Precision::IsInfinite(aDistance))
{
thePoint.SetCoord (anUMin - (anUMax - anUMin ),
aVMin - (aVMax - aVMin ));
thePoint.SetCoord(anUMin - ( anUMax - anUMin ),
aVMin - ( aVMax - aVMin ));
return Standard_False;
}
else
{
Standard_Real anEpsilon = Epsilon(aDistance);
if (anEpsilon > Max (anUMax - anUMin, aVMax - aVMin))
if (anEpsilon > Max(anUMax - anUMin, aVMax - aVMin))
{
gp_Vec2d aLinVec(aCenterPnt, thePoint);
gp_Dir2d aLinDir(aLinVec);
@@ -126,7 +124,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
gp_Lin2d& L,
Standard_Real& Par)
{
TopExp_Explorer anExpF(myFace, TopAbs_EDGE);
TopExp_Explorer anExpF(myFace,TopAbs_EDGE);
Standard_Integer i;
Standard_Real aFPar;
Standard_Real aLPar;
@@ -139,7 +137,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
if (i != myCurEdgeInd)
continue;
const TopoDS_Shape &aLocalShape = anExpF.Current();
const TopoDS_Shape &aLocalShape = anExpF.Current();
const TopAbs_Orientation anOrientation = aLocalShape.Orientation();
if (anOrientation == TopAbs_FORWARD || anOrientation == TopAbs_REVERSED) {
@@ -148,29 +146,27 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
aC2d = BRep_Tool::CurveOnSurface(anEdge, myFace, aFPar, aLPar);
if (!aC2d.IsNull()) {
// Treatment of infinite cases.
if (Precision::IsNegativeInfinite(aFPar)) {
if (Precision::IsPositiveInfinite(aLPar)) {
aFPar = -1.;
aLPar = 1.;
}
else {
aFPar = aLPar - 1.;
}
}
else if (Precision::IsPositiveInfinite(aLPar))
aLPar = aFPar + 1.;
// Treatment of infinite cases.
if (Precision::IsNegativeInfinite(aFPar)) {
if (Precision::IsPositiveInfinite(aLPar)) {
aFPar = -1.;
aLPar = 1.;
} else {
aFPar = aLPar - 1.;
}
} else if (Precision::IsPositiveInfinite(aLPar))
aLPar = aFPar + 1.;
for (; myCurEdgePar < Probing_End; myCurEdgePar += Probing_Step) {
aParamIn = myCurEdgePar*aFPar + (1. - myCurEdgePar)*aLPar;
for (; myCurEdgePar < Probing_End ;myCurEdgePar += Probing_Step) {
aParamIn = myCurEdgePar*aFPar + (1. - myCurEdgePar)*aLPar;
gp_Vec2d aTanVec;
aC2d->D1(aParamIn, aPOnC, aTanVec);
Par = aPOnC.SquareDistance(P);
aC2d->D1(aParamIn, aPOnC, aTanVec);
Par = aPOnC.SquareDistance(P);
if (Par > aTolParConf2) {
gp_Vec2d aLinVec(P, aPOnC);
gp_Dir2d aLinDir(aLinVec);
if (Par > aTolParConf2) {
gp_Vec2d aLinVec(P, aPOnC);
gp_Dir2d aLinDir(aLinVec);
Standard_Real aTanMod = aTanVec.SquareMagnitude();
if (aTanMod < aTolParConf2)
@@ -178,10 +174,8 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
aTanVec /= Sqrt(aTanMod);
Standard_Real aSinA = aTanVec.Crossed(aLinDir.XY());
const Standard_Real SmallAngle = 0.001;
Standard_Boolean isSmallAngle = Standard_False;
if (Abs(aSinA) < SmallAngle)
{
isSmallAngle = Standard_True;
// The line from the input point P to the current point on edge
// is tangent to the edge curve. This condition is bad for classification.
// Therefore try to go to another point in the hope that there will be
@@ -191,62 +185,28 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
continue;
}
L = gp_Lin2d(P, aLinDir);
L = gp_Lin2d(P, aLinDir);
// Check if ends of a curve lie on a line.
aC2d->D0(aFPar, aPOnC);
Standard_Real aFDist = P.SquareDistance(aPOnC);
if (L.SquareDistance(aPOnC) > aTolParConf2) {
aC2d->D0(aLPar, aPOnC);
if (L.SquareDistance(aPOnC) > aTolParConf2) {
Standard_Real aLDist = P.SquareDistance(aPOnC);
// Check if ends of a curve lie on a line.
aC2d->D0(aFPar, aPOnC);
if (isSmallAngle)
{
//Try to find minimal distance between curve and line
if (L.SquareDistance(aPOnC) > aTolParConf2) {
aC2d->D0(aLPar, aPOnC);
Geom2dAPI_ProjectPointOnCurve aProj;
aProj.Init(P, aC2d, aFPar, aLPar);
if (aProj.NbPoints() > 0)
{
Standard_Real aMinDist = aProj.LowerDistance();
aMinDist *= aMinDist;
Standard_Real aTMin = aProj.LowerDistanceParameter();
if (aMinDist > aFDist)
{
aMinDist = aFDist;
aTMin = aFPar;
}
if (aMinDist > aLDist)
{
aMinDist = aLDist;
aTMin = aLPar;
}
if (aMinDist < Par)
{
Par = aMinDist;
if (Par < aTolParConf2)
{
continue;
}
aC2d->D1(aTMin, aPOnC, aTanVec);
aLinDir.SetXY(aTanVec.XY());
L = gp_Lin2d(P, aLinDir);
}
}
}
myCurEdgePar += Probing_Step;
if (myCurEdgePar >= Probing_End) {
myCurEdgeInd++;
myCurEdgePar = Probing_Start;
}
if (L.SquareDistance(aPOnC) > aTolParConf2) {
myCurEdgePar += Probing_Step;
Par = Sqrt(Par);
return Standard_True;
}
}
}
}
if (myCurEdgePar >= Probing_End) {
myCurEdgeInd++;
myCurEdgePar = Probing_Start;
}
Par = Sqrt(Par);
return Standard_True;
}
}
}
}
} // if (!aC2d.IsNull()) {
} // if (anOrientation == TopAbs_FORWARD ...
@@ -257,7 +217,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
// nothing found, return an horizontal line
Par = RealLast();
L = gp_Lin2d(P, gp_Dir2d(1, 0));
L = gp_Lin2d(P,gp_Dir2d(1,0));
return Standard_False;
}

View File

@@ -135,10 +135,10 @@ void BRepClass_Intersector::Perform(const gp_Lin2d& L,
IntRes2d_Domain DL;
//
if(P!=RealLast()) {
DL.SetValues(L.Location(),0.,Precision::PConfusion(),ElCLib::Value(P,L),P,Precision::PConfusion());
DL.SetValues(L.Location(),0.,aTolZ,ElCLib::Value(P,L),P,aTolZ);
}
else {
DL.SetValues(L.Location(),0.,Precision::PConfusion(),Standard_True);
DL.SetValues(L.Location(),0.,aTolZ,Standard_True);
}
IntRes2d_Domain DE(pdeb,deb,toldeb,pfin,fin,tolfin);

View File

@@ -385,8 +385,10 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
if (Affich)
DBRep::Set("theguide", TheGuide);
#endif
// transform the guide in a single curve
Handle(BRepAdaptor_HCompCurve) Guide = new (BRepAdaptor_HCompCurve) (TheGuide);
// transform the guide in a single curve (periodic if posssible)
Handle(BRepAdaptor_HCompCurve) Guide =
new (BRepAdaptor_HCompCurve) (TheGuide);
Guide->ChangeCurve().SetPeriodic(Standard_True);
if (CurvilinearEquivalence) { // trihedron by curvilinear reduced abscissa
if (KeepContact == BRepFill_Contact ||

View File

@@ -131,10 +131,10 @@ BRepLib_MakeWire::BRepLib_MakeWire(const TopoDS_Wire& W,
void BRepLib_MakeWire::Add(const TopoDS_Wire& W)
{
for (TopoDS_Iterator it(W); it.More(); it.Next()) {
Add(TopoDS::Edge(it.Value()));
if (myError != BRepLib_WireDone)
break;
TopExp_Explorer ex(W,TopAbs_EDGE);
while (ex.More()) {
Add(TopoDS::Edge(ex.Current()));
ex.Next();
}
}

View File

@@ -24,7 +24,6 @@
#include <BRepLib_WireError.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <BRepLib_MakeShape.hxx>
#include <TopTools_ListOfShape.hxx>
@@ -173,14 +172,14 @@ private:
};
void CollectCoincidentVertices(const TopTools_ListOfShape& theL,
NCollection_List<NCollection_List<TopoDS_Vertex>>& theGrVL);
NCollection_List<NCollection_List<TopoDS_Vertex>>& theGrVL);
void CreateNewVertices(const NCollection_List<NCollection_List<TopoDS_Vertex>>& theGrVL,
TopTools_DataMapOfShapeShape& theO2NV);
NCollection_DataMap<TopoDS_Vertex, TopoDS_Vertex>& theO2NV);
void CreateNewListOfEdges(const TopTools_ListOfShape& theL,
const TopTools_DataMapOfShapeShape& theO2NV,
TopTools_ListOfShape& theNewEList);
const NCollection_DataMap<TopoDS_Vertex, TopoDS_Vertex>& theO2NV,
TopTools_ListOfShape& theNewEList);
void Add(const TopoDS_Edge& E, Standard_Boolean IsCheckGeometryProximity);

View File

@@ -58,7 +58,7 @@ void BRepLib_MakeWire::Add(const TopTools_ListOfShape& L)
CollectCoincidentVertices(L, aGrVL);
TopTools_DataMapOfShapeShape anO2NV;
NCollection_DataMap<TopoDS_Vertex, TopoDS_Vertex> anO2NV;
CreateNewVertices(aGrVL, anO2NV);
@@ -155,10 +155,8 @@ Standard_Boolean BRepLib_MakeWire::BRepLib_BndBoxVertexSelector::
Standard_Real aTolV = BRep_Tool::Tolerance(aV);
Standard_Real aL = myP.SquareDistance(aVPnt);
Standard_Real aTol = aTolV + mySTol;
aTol *= aTol;
if (aL <= aTol)
if (aL < Max(aTolV*aTolV, mySTol))
{
myResultInd.Append(theObj);
return Standard_True;
@@ -178,7 +176,7 @@ void BRepLib_MakeWire::BRepLib_BndBoxVertexSelector::
myP = theP;
myVBox.Add(myP);
myVBox.Enlarge(theTol);
mySTol = theTol;
mySTol = theTol*theTol;
myVInd = theVInd;
}
@@ -190,13 +188,17 @@ void BRepLib_MakeWire::CollectCoincidentVertices(const TopTools_ListOfShape& the
NCollection_List<NCollection_List<TopoDS_Vertex>>& theGrVL)
{
TopTools_IndexedMapOfShape anAllV;
TopTools_ListIteratorOfListOfShape anItL;
TopTools_IndexedDataMapOfShapeListOfShape aMV2EL;
TopExp::MapShapes(myShape, TopAbs_VERTEX, anAllV);
TopExp::MapShapesAndAncestors(myShape, TopAbs_VERTEX, TopAbs_EDGE, aMV2EL);
TopExp_Explorer exp;
for (anItL.Initialize(theL); anItL.More(); anItL.Next())
TopExp::MapShapesAndAncestors(anItL.Value(), TopAbs_VERTEX, TopAbs_EDGE, aMV2EL);
TopTools_ListIteratorOfListOfShape anItL(theL);
for (; anItL.More(); anItL.Next())
TopExp::MapShapes(anItL.Value(), TopAbs_VERTEX, anAllV);
for (int i = 1; i <= aMV2EL.Extent(); i++)
if (aMV2EL(i).Extent() == 1)
anAllV.Add(aMV2EL.FindKey(i));
//aV2CV : vertex <-> its coincident vertices
NCollection_DataMap<TopoDS_Vertex, NCollection_Map<TopoDS_Vertex>> aV2CV;
@@ -301,8 +303,8 @@ void BRepLib_MakeWire::CollectCoincidentVertices(const TopTools_ListOfShape& the
//function : CreateNewVertices
//purpose :
//=======================================================================
void BRepLib_MakeWire::CreateNewVertices(const NCollection_List<NCollection_List<TopoDS_Vertex>>& theGrVL,
TopTools_DataMapOfShapeShape& theO2NV)
void BRepLib_MakeWire::CreateNewVertices(const NCollection_List<NCollection_List<TopoDS_Vertex>>& theGrVL,
NCollection_DataMap<TopoDS_Vertex, TopoDS_Vertex>& theO2NV)
{
//map [old vertex => new vertex]
//note that already existing shape (i.e. the original ones)
@@ -354,7 +356,7 @@ void BRepLib_MakeWire::CreateNewVertices(const NCollection_List<NCollection_List
//purpose :
//=======================================================================
void BRepLib_MakeWire::CreateNewListOfEdges(const TopTools_ListOfShape& theL,
const TopTools_DataMapOfShapeShape& theO2NV,
const NCollection_DataMap<TopoDS_Vertex, TopoDS_Vertex>& theO2NV,
TopTools_ListOfShape& theNewEList)
{
///create the new list (theNewEList) from the input list L

View File

@@ -31,7 +31,6 @@
#include <BRepMesh_Vertex.hxx>
#include <BRepMesh_Triangle.hxx>
#include <Message_ProgressSentry.hxx>
#include <NCollection_Vector.hxx>
#include <algorithm>
@@ -305,17 +304,6 @@ void BRepMesh_Delaun::compute(BRepMesh::Array1OfInteger& theVertexIndexes)
//=======================================================================
void BRepMesh_Delaun::createTriangles(const Standard_Integer theVertexIndex,
BRepMesh::MapOfIntegerInteger& thePoly)
{
createTriangles (theVertexIndex, thePoly, NULL);
}
//=======================================================================
//function : createTriangles
//purpose : Creates the triangles beetween the node and the polyline.
//=======================================================================
void BRepMesh_Delaun::createTriangles(const Standard_Integer theVertexIndex,
BRepMesh::MapOfIntegerInteger& thePoly,
Message_ProgressSentry* theProgressEntry)
{
BRepMesh::ListOfInteger aLoopEdges, anExternalEdges;
const gp_XY& aVertexCoord = myMeshData->GetNode( theVertexIndex ).Coord();
@@ -323,10 +311,6 @@ void BRepMesh_Delaun::createTriangles(const Standard_Integer theVertexIn
BRepMesh::MapOfIntegerInteger::Iterator anEdges( thePoly );
for ( ; anEdges.More(); anEdges.Next() )
{
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
Standard_Integer anEdgeId = anEdges.Key();
const BRepMesh_Edge& anEdge = GetEdge( anEdgeId );
@@ -424,10 +408,6 @@ void BRepMesh_Delaun::createTriangles(const Standard_Integer theVertexIn
while ( !aLoopEdges.IsEmpty() )
{
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
const BRepMesh_Edge& anEdge = GetEdge( Abs( aLoopEdges.First() ) );
if ( anEdge.Movability() != BRepMesh_Deleted )
{
@@ -445,17 +425,6 @@ void BRepMesh_Delaun::createTriangles(const Standard_Integer theVertexIn
//=======================================================================
void BRepMesh_Delaun::createTrianglesOnNewVertices(
BRepMesh::Array1OfInteger& theVertexIndexes)
{
createTrianglesOnNewVertices (theVertexIndexes, NULL);
}
//=======================================================================
//function : createTrianglesOnNewVertices
//purpose : Creation of triangles from the new nodes
//=======================================================================
void BRepMesh_Delaun::createTrianglesOnNewVertices(
BRepMesh::Array1OfInteger& theVertexIndexes,
Message_ProgressSentry* theProgressEntry)
{
Handle(NCollection_IncAllocator) aAllocator =
new NCollection_IncAllocator(BRepMesh::MEMORY_BLOCK_SIZE_HUGE);
@@ -471,11 +440,6 @@ void BRepMesh_Delaun::createTrianglesOnNewVertices(
Standard_Integer anUpper = theVertexIndexes.Upper();
for( ; anIndex <= anUpper; ++anIndex )
{
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
aAllocator->Reset(Standard_False);
BRepMesh::MapOfIntegerInteger aLoopEdges(10, aAllocator);
@@ -519,11 +483,6 @@ void BRepMesh_Delaun::createTrianglesOnNewVertices(
isModify = Standard_True;
while ( isModify && !aCirclesList.IsEmpty() )
{
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
isModify = Standard_False;
BRepMesh::ListOfInteger::Iterator aCircleIt1( aCirclesList );
for ( ; aCircleIt1.More(); aCircleIt1.Next() )
@@ -544,25 +503,13 @@ void BRepMesh_Delaun::createTrianglesOnNewVertices(
}
}
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
// Creation of triangles with the current node and free edges
// and removal of these edges from the list of free edges
createTriangles( aVertexIdx, aLoopEdges, theProgressEntry );
createTriangles( aVertexIdx, aLoopEdges );
}
}
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
insertInternalEdges (theProgressEntry);
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
insertInternalEdges();
// Adjustment of meshes to boundary edges
frontierAdjust();
@@ -573,15 +520,6 @@ void BRepMesh_Delaun::createTrianglesOnNewVertices(
//purpose :
//=======================================================================
void BRepMesh_Delaun::insertInternalEdges()
{
insertInternalEdges (NULL);
}
//=======================================================================
//function : insertInternalEdges
//purpose :
//=======================================================================
void BRepMesh_Delaun::insertInternalEdges (Message_ProgressSentry* theProgressEntry)
{
BRepMesh::HMapOfInteger anInternalEdges = InternalEdges();
@@ -592,11 +530,6 @@ void BRepMesh_Delaun::insertInternalEdges (Message_ProgressSentry* theProgressEn
BRepMesh::MapOfInteger::Iterator anInernalEdgesIt( *anInternalEdges );
for ( ; anInernalEdgesIt.More(); anInernalEdgesIt.Next() )
{
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
const Standard_Integer aLinkIndex = anInernalEdgesIt.Key();
const BRepMesh_PairOfIndex& aPair = myMeshData->ElementsConnectedTo(aLinkIndex);
@@ -2161,21 +2094,12 @@ void BRepMesh_Delaun::RemoveVertex( const BRepMesh_Vertex& theVertex )
}
}
//=======================================================================
//function : AddVertices
//purpose : Adds some vertices in the triangulation.
//=======================================================================
void BRepMesh_Delaun::AddVertices(BRepMesh::Array1OfVertexOfDelaun& theVertices)
{
AddVertices (theVertices, NULL);
}
//=======================================================================
//function : AddVertices
//purpose : Adds some vertices in the triangulation.
//=======================================================================
void BRepMesh_Delaun::AddVertices(BRepMesh::Array1OfVertexOfDelaun& theVertices,
Message_ProgressSentry* theProgressEntry)
void BRepMesh_Delaun::AddVertices(BRepMesh::Array1OfVertexOfDelaun& theVertices)
{
std::make_heap(theVertices.begin(), theVertices.end(), ComparatorOfVertexOfDelaun());
std::sort_heap(theVertices.begin(), theVertices.end(), ComparatorOfVertexOfDelaun());
@@ -2187,7 +2111,7 @@ void BRepMesh_Delaun::AddVertices(BRepMesh::Array1OfVertexOfDelaun& theVertices,
for ( Standard_Integer i = aLower; i <= anUpper; ++i )
aVertexIndexes(i) = myMeshData->AddNode( theVertices(i) );
createTrianglesOnNewVertices( aVertexIndexes, theProgressEntry );
createTrianglesOnNewVertices( aVertexIndexes );
}
//=======================================================================

View File

@@ -33,7 +33,6 @@
class Bnd_B2d;
class Bnd_Box2d;
class BRepMesh_Vertex;
class Message_ProgressSentry;
//! Compute the Delaunay's triangulation with the algorithm of Watson.
class BRepMesh_Delaun
@@ -62,10 +61,6 @@ public:
//! Adds some vertices into the triangulation.
Standard_EXPORT void AddVertices (BRepMesh::Array1OfVertexOfDelaun& theVertices);
//! Adds some vertices into the triangulation.
Standard_EXPORT void AddVertices (BRepMesh::Array1OfVertexOfDelaun& theVertices,
Message_ProgressSentry* theProgressEntry);
//! Modify mesh to use the edge.
//! @return True if done
Standard_EXPORT Standard_Boolean UseEdge (const Standard_Integer theEdge);
@@ -227,10 +222,6 @@ private:
void createTriangles (const Standard_Integer theVertexIndex,
BRepMesh::MapOfIntegerInteger& thePoly);
void createTriangles (const Standard_Integer theVertexIndex,
BRepMesh::MapOfIntegerInteger& thePoly,
Message_ProgressSentry* theProgressEntry);
//! Add a triangle based on the given oriented edges into mesh
void addTriangle (const Standard_Integer (&theEdgesId)[3],
const Standard_Boolean (&theEdgesOri)[3],
@@ -261,10 +252,6 @@ private:
BRepMesh::SequenceOfInteger& thePolygon,
BRepMesh::SequenceOfBndB2d& thePolyBoxes);
//! Creates the triangles on new nodes.
void createTrianglesOnNewVertices (BRepMesh::Array1OfInteger& theVertexIndices,
Message_ProgressSentry* theProgressEntry);
//! Creates the triangles on new nodes.
void createTrianglesOnNewVertices (BRepMesh::Array1OfInteger& theVertexIndices);
@@ -336,9 +323,6 @@ private:
//! Performs insertion of internal edges into mesh.
void insertInternalEdges();
//! Performs insertion of internal edges into mesh.
void insertInternalEdges (Message_ProgressSentry* theProgressEntry);
private:
Handle(BRepMesh_DataStructureOfDelaun) myMeshData;

View File

@@ -45,10 +45,10 @@ public:
return myIsDone;
}
//! Compute triangulation for set shape.
Standard_EXPORT virtual void Perform () =0;
//! Compute triangulation for set shape.
Standard_EXPORT virtual void Perform() = 0;
DEFINE_STANDARD_RTTIEXT(BRepMesh_DiscretRoot,Standard_Transient)
protected:

View File

@@ -68,7 +68,6 @@
#include <Standard_Failure.hxx>
#include <NCollection_IncAllocator.hxx>
#include <Message_ProgressSentry.hxx>
#include <BRep_ListIteratorOfListOfPointRepresentation.hxx>
#include <BRep_PointRepresentation.hxx>
@@ -124,25 +123,15 @@ void BRepMesh_FastDiscret::Perform(const TopoDS_Shape& theShape)
OSD_Parallel::ForEach(aFaces.begin(), aFaces.end(), *this, !myParameters.InParallel);
}
//=======================================================================
//function : Process
//purpose :
//=======================================================================
void BRepMesh_FastDiscret::Process(const TopoDS_Face& theFace) const
{
Process (theFace, NULL);
}
//=======================================================================
//function : Process
//purpose :
//=======================================================================
void BRepMesh_FastDiscret::Process (const TopoDS_Face& theFace,
Message_ProgressSentry* theProgrEntry) const
{
Handle(BRepMesh_FaceAttribute) anAttribute;
if (GetFaceAttribute(theFace, anAttribute)
&& (theProgrEntry == NULL || theProgrEntry->More()))
if (GetFaceAttribute(theFace, anAttribute))
{
try
{
@@ -150,7 +139,7 @@ void BRepMesh_FastDiscret::Process (const TopoDS_Face& theFace,
BRepMesh_FastDiscretFace aTool(myParameters.Angle, myParameters.MinSize,
myParameters.InternalVerticesMode, myParameters.ControlSurfaceDeflection);
aTool.Perform (anAttribute, theProgrEntry);
aTool.Perform(anAttribute);
}
catch (Standard_Failure)
{

View File

@@ -46,7 +46,6 @@ class BRepMesh_Edge;
class BRepMesh_Vertex;
class gp_Pnt;
class BRepMesh_FaceAttribute;
class Message_ProgressSentry;
//! Algorithm to mesh a shape with respect of the <br>
//! frontier the deflection and by option the shared <br>
@@ -130,12 +129,6 @@ public:
//! parallel threads.
Standard_EXPORT void Process(const TopoDS_Face& face) const;
//! Triangulate a face previously recorded for
//! processing by call to Add(). Can be executed in
//! parallel threads.
Standard_EXPORT void Process (const TopoDS_Face& theFace,
Message_ProgressSentry* theProgrEntry) const;
void operator () (const TopoDS_Face& face) const
{
Process(face);

View File

@@ -51,7 +51,6 @@
#include <TopoDS_Vertex.hxx>
#include <TopExp.hxx>
#include <Message_ProgressSentry.hxx>
#include <NCollection_Map.hxx>
#include <Bnd_Box2d.hxx>
@@ -188,21 +187,7 @@ BRepMesh_FastDiscretFace::BRepMesh_FastDiscretFace(
//=======================================================================
void BRepMesh_FastDiscretFace::Perform(const Handle(BRepMesh_FaceAttribute)& theAttribute)
{
Perform (theAttribute, NULL);
}
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
void BRepMesh_FastDiscretFace::Perform (const Handle(BRepMesh_FaceAttribute)& theAttribute,
Message_ProgressSentry* theProgressEntry)
{
add(theAttribute, theProgressEntry);
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
add(theAttribute);
commitSurfaceTriangulation();
}
@@ -360,8 +345,7 @@ void BRepMesh_FastDiscretFace::addLinkToMesh(
//function : Add
//purpose :
//=======================================================================
void BRepMesh_FastDiscretFace::add (const Handle(BRepMesh_FaceAttribute)& theAttribute,
Message_ProgressSentry* theProgressEntry)
void BRepMesh_FastDiscretFace::add(const Handle(BRepMesh_FaceAttribute)& theAttribute)
{
if (!theAttribute->IsValid() || theAttribute->ChangeMeshNodes()->IsEmpty())
return;
@@ -413,22 +397,12 @@ void BRepMesh_FastDiscretFace::add (const Handle(BRepMesh_FaceAttribute)& theAtt
(vmax - vmin) < Precision::PConfusion());
Standard_Real aDef = -1;
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
if ( !isaline && myStructure->ElementsOfDomain().Extent() > 0 )
{
if (!rajout)
{
// compute maximal deflection
aDef = control(trigu, Standard_True, theProgressEntry);
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
aDef = control(trigu, Standard_True);
rajout = (aDef > myAttribute->GetDefFace() || aDef < 0.);
}
if (thetype != GeomAbs_Plane)
@@ -441,21 +415,11 @@ void BRepMesh_FastDiscretFace::add (const Handle(BRepMesh_FaceAttribute)& theAtt
if (rajout)
{
insertInternalVertices(trigu, theProgressEntry);
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
insertInternalVertices(trigu);
//control internal points
if (myIsControlSurfaceDeflection)
{
aDef = control(trigu, Standard_False, theProgressEntry);
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return;
}
}
aDef = control(trigu, Standard_False);
}
}
}
@@ -483,8 +447,7 @@ void BRepMesh_FastDiscretFace::add (const Handle(BRepMesh_FaceAttribute)& theAtt
//=======================================================================
Standard_Boolean BRepMesh_FastDiscretFace::addVerticesToMesh(
const BRepMesh::ListOfVertex& theVertices,
BRepMesh_Delaun& theMeshBuilder,
Message_ProgressSentry* theProgressEntry)
BRepMesh_Delaun& theMeshBuilder)
{
if (theVertices.IsEmpty())
return Standard_False;
@@ -494,8 +457,8 @@ Standard_Boolean BRepMesh_FastDiscretFace::addVerticesToMesh(
for (Standard_Integer aVertexId = 0; aVertexIt.More(); aVertexIt.Next())
aArrayOfNewVertices(++aVertexId) = aVertexIt.Value();
theMeshBuilder.AddVertices(aArrayOfNewVertices, theProgressEntry);
return theProgressEntry == NULL || theProgressEntry->More();
theMeshBuilder.AddVertices(aArrayOfNewVertices);
return Standard_True;
}
//=======================================================================
@@ -564,8 +527,7 @@ static void filterParameters(const BRepMesh::IMapOfReal& theParams,
//function : insertInternalVertices
//purpose :
//=======================================================================
void BRepMesh_FastDiscretFace::insertInternalVertices (BRepMesh_Delaun& theMeshBuilder,
Message_ProgressSentry* theProgressEntry)
void BRepMesh_FastDiscretFace::insertInternalVertices(BRepMesh_Delaun& theMeshBuilder)
{
Handle(NCollection_IncAllocator) anAlloc = new NCollection_IncAllocator;
BRepMesh::ListOfVertex aNewVertices(anAlloc);
@@ -593,7 +555,7 @@ void BRepMesh_FastDiscretFace::insertInternalVertices (BRepMesh_Delaun& theMeshB
break;
}
addVerticesToMesh(aNewVertices, theMeshBuilder, theProgressEntry);
addVerticesToMesh(aNewVertices, theMeshBuilder);
}
//=======================================================================
@@ -1220,8 +1182,7 @@ Standard_Boolean BRepMesh_FastDiscretFace::checkDeflectionAndInsert(
//=======================================================================
Standard_Real BRepMesh_FastDiscretFace::control(
BRepMesh_Delaun& theTrigu,
const Standard_Boolean theIsFirst,
Message_ProgressSentry* theProgressEntry)
const Standard_Boolean theIsFirst)
{
Standard_Integer aTrianglesNb = myStructure->ElementsOfDomain().Extent();
if (aTrianglesNb < 1)
@@ -1258,11 +1219,6 @@ Standard_Real BRepMesh_FastDiscretFace::control(
new NCollection_IncAllocator(BRepMesh::MEMORY_BLOCK_SIZE_HUGE);
for (; aPass <= aPassesNb && aInsertedNb && !isAllDegenerated; ++aPass)
{
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return 0;
}
aTempAlloc->Reset(Standard_False);
BRepMesh::ListOfVertex aNewVertices(aTempAlloc);
@@ -1280,11 +1236,6 @@ Standard_Real BRepMesh_FastDiscretFace::control(
BRepMesh::MapOfInteger::Iterator aTriangleIt(aTriangles);
for (; aTriangleIt.More(); aTriangleIt.Next())
{
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return 0;
}
const Standard_Integer aTriangleId = aTriangleIt.Key();
const BRepMesh_Triangle& aCurrentTriangle = myStructure->GetElement(aTriangleId);
@@ -1447,12 +1398,8 @@ Standard_Real BRepMesh_FastDiscretFace::control(
<< aP.X() << " " << aP.Y() << " " << aP.Z() << endl;
}
#endif
if (theProgressEntry != NULL && !theProgressEntry->More())
{
return 0;
}
if (addVerticesToMesh(aNewVertices, theTrigu, theProgressEntry))
if (addVerticesToMesh(aNewVertices, theTrigu))
++aInsertedNb;
}

View File

@@ -41,7 +41,6 @@ class gp_Pnt2d;
class BRepMesh_Edge;
class BRepMesh_Vertex;
class gp_Pnt;
class Message_ProgressSentry;
//! Algorithm to mesh a face with respect of the frontier
//! the deflection and by option the shared components.
@@ -63,19 +62,15 @@ public:
Standard_EXPORT void Perform(const Handle(BRepMesh_FaceAttribute)& theAttribute);
Standard_EXPORT void Perform (const Handle(BRepMesh_FaceAttribute)& theAttribute,
Message_ProgressSentry* theProgressEntry);
DEFINE_STANDARD_RTTIEXT(BRepMesh_FastDiscretFace,Standard_Transient)
private:
void add(const Handle(BRepMesh_FaceAttribute)& theAttribute, Message_ProgressSentry* theProgressEntry);
void add(const Handle(BRepMesh_FaceAttribute)& theAttribute);
void add(const TopoDS_Vertex& theVertex);
Standard_Real control(BRepMesh_Delaun& theMeshBuilder,
const Standard_Boolean theIsFirst,
Message_ProgressSentry* theProgressEntry);
const Standard_Boolean theIsFirst);
//! Registers the given nodes in mesh data structure and
//! performs refinement of existing mesh.
@@ -85,14 +80,12 @@ private:
//! @return TRUE if vertices were been inserted, FALSE elewhere.
Standard_Boolean addVerticesToMesh(
const BRepMesh::ListOfVertex& theVertices,
BRepMesh_Delaun& theMeshBuilder,
Message_ProgressSentry* theProgressEntry);
BRepMesh_Delaun& theMeshBuilder);
//! Calculates nodes lying on face's surface and inserts them to a mesh.
//! @param theMeshBuilder initialized tool refining mesh
//! in respect to inserting nodes.
void insertInternalVertices(BRepMesh_Delaun& theMeshBuilder,
Message_ProgressSentry* theProgressEntry);
void insertInternalVertices(BRepMesh_Delaun& theMeshBuilder);
//! Calculates nodes lying on spherical surface.
//! @param theNewVertices list of vertices to be extended and added to mesh.

View File

@@ -54,8 +54,6 @@
#include <GCPnts_TangentialDeflection.hxx>
#include <Message_ProgressSentry.hxx>
IMPLEMENT_STANDARD_RTTIEXT(BRepMesh_IncrementalMesh,BRepMesh_DiscretRoot)
namespace
@@ -65,51 +63,6 @@ namespace
static Standard_Boolean IS_IN_PARALLEL = Standard_False;
}
class BRepMesh_IncrementalMesh::FaceListFunctor
{
public:
FaceListFunctor (BRepMesh_IncrementalMesh* theAlgo,
const Handle(Message_ProgressIndicator)& theProgress,
Standard_Boolean theParallel)
: myAlgo (theAlgo),
mySentry (theProgress, "Mesh faces", 0, theAlgo->myFaces.Size(), 1),
myThreadId (OSD_Thread::Current()),
myIsParallel (theParallel),
myHasProgress (!theProgress.IsNull())
{
}
void operator() (const Standard_Integer theFaceIndex) const
{
if (!mySentry.More())
{
return;
}
TopoDS_Face& aFace = myAlgo->myFaces.ChangeValue (theFaceIndex);
myAlgo->myMesh->Process (aFace, &mySentry);
if (myIsParallel)
{
// use a trick to avoid mutex locks - increment the progress only within main thread
if (myHasProgress && myThreadId == OSD_Thread::Current())
{
mySentry.Next (OSD_Parallel::NbLogicalProcessors());
}
}
else
{
mySentry.Next();
}
}
private:
mutable BRepMesh_IncrementalMesh* myAlgo;
mutable Message_ProgressSentry mySentry;
Standard_ThreadId myThreadId;
Standard_Boolean myIsParallel;
Standard_Boolean myHasProgress;
};
//=======================================================================
//function : Default constructor
@@ -249,94 +202,41 @@ void BRepMesh_IncrementalMesh::collectFaces()
//purpose :
//=======================================================================
void BRepMesh_IncrementalMesh::Perform()
{
Perform (Handle(Message_ProgressIndicator)());
}
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
void BRepMesh_IncrementalMesh::Perform (const Handle(Message_ProgressIndicator)& theProgress)
{
init();
if (myMesh.IsNull())
return;
update (theProgress);
update();
}
//=======================================================================
//function : update()
//purpose :
//=======================================================================
void BRepMesh_IncrementalMesh::update (const Handle(Message_ProgressIndicator)& theProgress)
void BRepMesh_IncrementalMesh::update()
{
Message_ProgressSentry anOuterSentry (theProgress, "Updating", 0, 100, 1);
// Update edges data
anOuterSentry.Next(9);
TopExp_Explorer aExplorer(myShape, TopAbs_EDGE);
for (; aExplorer.More(); aExplorer.Next())
{
int aNbEdges = 0;
for (TopExp_Explorer aExplorer (myShape, TopAbs_EDGE); aExplorer.More(); aExplorer.Next())
{
++aNbEdges;
}
const TopoDS_Edge& aEdge = TopoDS::Edge(aExplorer.Current());
if(!BRep_Tool::IsGeometric(aEdge))
continue;
Message_ProgressSentry anEdgeSentry (theProgress, "Update edges data", 0, aNbEdges, 1);
for (TopExp_Explorer aExplorer (myShape, TopAbs_EDGE);
aExplorer.More() && anEdgeSentry.More(); aExplorer.Next(), anEdgeSentry.Next())
{
const TopoDS_Edge& aEdge = TopoDS::Edge(aExplorer.Current());
if(!BRep_Tool::IsGeometric(aEdge))
continue;
update(aEdge);
}
update(aEdge);
}
if (!anOuterSentry.More())
{
myStatus = BRepMesh_UserBreak;
return;
}
anOuterSentry.Next(5);
// Update faces data
NCollection_Vector<TopoDS_Face>::Iterator aFaceIt(myFaces);
for (Message_ProgressSentry aFacesSentry (theProgress, "Update faces data", 0, myFaces.Size(), 1);
aFaceIt.More() && aFacesSentry.More(); aFaceIt.Next(), aFacesSentry.Next())
{
for (; aFaceIt.More(); aFaceIt.Next())
update(aFaceIt.Value());
}
if (!anOuterSentry.More())
{
myStatus = BRepMesh_UserBreak;
return;
}
// Mesh faces
OSD_Parallel::ForEach(myFaces.begin(), myFaces.end(), *myMesh, !myParameters.InParallel);
anOuterSentry.Next(80);
{
// Mesh faces
FaceListFunctor aFacesFunctor (this, theProgress, myParameters.InParallel);
OSD_Parallel::For (0, myFaces.Size(), aFacesFunctor, !myParameters.InParallel);
}
if (!anOuterSentry.More())
{
myStatus = BRepMesh_UserBreak;
return;
}
anOuterSentry.Next(5);
{
Message_ProgressSentry aSentry (theProgress, "Commit", 0, myFaces.Size(), 1);
commit (aSentry);
}
anOuterSentry.Next();
commit();
clear();
}
@@ -593,10 +493,10 @@ void BRepMesh_IncrementalMesh::update(const TopoDS_Face& theFace)
//function : commit
//purpose :
//=======================================================================
void BRepMesh_IncrementalMesh::commit (Message_ProgressSentry& theSentry)
void BRepMesh_IncrementalMesh::commit()
{
NCollection_Vector<TopoDS_Face>::Iterator aFaceIt(myFaces);
for (; aFaceIt.More() && theSentry.More(); aFaceIt.Next(), theSentry.Next())
for (; aFaceIt.More(); aFaceIt.Next())
commitEdges(aFaceIt.Value());
discretizeFreeEdges();

View File

@@ -25,7 +25,6 @@
#include <vector>
class Message_ProgressIndicator;
class Poly_Triangulation;
class TopoDS_Shape;
class TopoDS_Edge;
@@ -69,10 +68,7 @@ public: //! @name mesher API
//! Performs meshing ot the shape.
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
//! Performs meshing ot the shape.
Standard_EXPORT void Perform(const Handle(Message_ProgressIndicator)& theProgress);
public: //! @name accessing to parameters.
//! Returns meshing parameters
@@ -130,7 +126,7 @@ protected:
private:
//! Builds the incremental mesh for the shape.
void update(const Handle(Message_ProgressIndicator)& theProgress);
void update();
//! Checks triangulation of the given face for consistency
//! with the chosen tolerance. If some edge of face has no
@@ -171,7 +167,7 @@ private:
const Standard_Boolean isWithCheck);
//! Stores mesh to the shape.
void commit(Message_ProgressSentry& theSentry);
void commit();
//! Stores mesh of internal edges to the face.
void commitEdges(const TopoDS_Face& theFace);
@@ -179,9 +175,6 @@ private:
//! Clears internal data structures.
void clear();
private:
class FaceListFunctor;
protected:
BRepMesh::DMapOfEdgeListOfTriangulationBool myEdges;

View File

@@ -23,8 +23,7 @@ enum BRepMesh_Status
BRepMesh_OpenWire = 0x1,
BRepMesh_SelfIntersectingWire = 0x2,
BRepMesh_Failure = 0x4,
BRepMesh_ReMesh = 0x8,
BRepMesh_UserBreak = 0x16
BRepMesh_ReMesh = 0x8
};
#endif

View File

@@ -16,7 +16,6 @@
#include <BRepOffset.hxx>
#include <BRep_Tool.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_CylindricalSurface.hxx>
@@ -32,24 +31,15 @@
#include <gp_Ax3.hxx>
#include <gp_Dir.hxx>
#include <gp_Vec.hxx>
#include <NCollection_LocalArray.hxx>
#include <Precision.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_ListOfShape.hxx>
#include <TopoDS_Vertex.hxx>
//=======================================================================
//function : Surface
//purpose :
//=======================================================================
Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
const Standard_Real Offset,
BRepOffset_Status& theStatus,
Standard_Boolean allowC0)
const Standard_Real Offset,
BRepOffset_Status& theStatus)
{
Standard_Real Tol = Precision::Confusion();
@@ -162,158 +152,17 @@ Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
Handle(Geom_RectangularTrimmedSurface)::DownCast(Surface);
Standard_Real U1,U2,V1,V2;
S->Bounds(U1,U2,V1,V2);
Handle(Geom_Surface) Off = BRepOffset::Surface (S->BasisSurface(), Offset, theStatus, allowC0);
Handle(Geom_Surface) Off = BRepOffset::Surface (S->BasisSurface(), Offset, theStatus);
Result = new Geom_RectangularTrimmedSurface (Off,U1,U2,V1,V2);
}
else if (TheType == STANDARD_TYPE(Geom_OffsetSurface)) {
}
if ( Result.IsNull()) {
Result = new Geom_OffsetSurface( Surface, Offset, allowC0);
Result = new Geom_OffsetSurface( Surface, Offset);
}
return Result;
}
//=======================================================================
//function : CollapseSingularities
//purpose :
//=======================================================================
Handle(Geom_Surface) BRepOffset::CollapseSingularities (const Handle(Geom_Surface)& theSurface,
const TopoDS_Face& theFace,
Standard_Real thePrecision)
{
// check surface type to see if it can be processed
Handle(Standard_Type) aType = theSurface->DynamicType();
if (aType != STANDARD_TYPE(Geom_BSplineSurface))
{
// for the moment, only bspline surfaces are treated;
// in the future, bezier surfaces and surfaces of revolution can be also handled
return theSurface;
}
// find singularities (vertices of degenerated edges)
NCollection_List<gp_Pnt> aDegenPnt;
NCollection_List<Standard_Real> aDegenTol;
for (TopExp_Explorer anExp (theFace, TopAbs_EDGE); anExp.More(); anExp.Next())
{
TopoDS_Edge anEdge = TopoDS::Edge (anExp.Current());
if (! BRep_Tool::Degenerated (anEdge))
{
continue;
}
TopoDS_Vertex aV1, aV2;
TopExp::Vertices (anEdge, aV1, aV2);
if (! aV1.IsSame (aV2))
{
continue;
}
aDegenPnt.Append (BRep_Tool::Pnt (aV1));
aDegenTol.Append (BRep_Tool::Tolerance (aV1));
}
// iterate by sides of the surface
if (aType == STANDARD_TYPE(Geom_BSplineSurface))
{
Handle(Geom_BSplineSurface) aBSpline = Handle(Geom_BSplineSurface)::DownCast (theSurface);
const TColgp_Array2OfPnt& aPoles = aBSpline->Poles();
Handle(Geom_BSplineSurface) aCopy;
// iterate by sides: {U=0; V=0; U=1; V=1}
Standard_Integer RowStart[4] = {aPoles.LowerRow(), aPoles.LowerRow(), aPoles.UpperRow(), aPoles.LowerRow()};
Standard_Integer ColStart[4] = {aPoles.LowerCol(), aPoles.LowerCol(), aPoles.LowerCol(), aPoles.UpperCol()};
Standard_Integer RowStep[4] = {0, 1, 0, 1};
Standard_Integer ColStep[4] = {1, 0, 1, 0};
Standard_Integer NbSteps[4] = {aPoles.RowLength(), aPoles.ColLength(), aPoles.RowLength(), aPoles.ColLength()};
for (Standard_Integer iSide = 0; iSide < 4; iSide++)
{
// compute center of gravity of side poles
gp_XYZ aSum;
for (int iPole = 0; iPole < NbSteps[iSide]; iPole++)
{
aSum += aPoles (RowStart[iSide] + iPole * RowStep[iSide], ColStart[iSide] + iPole * ColStep[iSide]).XYZ();
}
gp_Pnt aCenter (aSum / NbSteps[iSide]);
// determine if all poles of the side fit into:
Standard_Boolean isCollapsed = Standard_True; // aCenter precisely (with gp::Resolution())
Standard_Boolean isSingular = Standard_True; // aCenter with thePrecision
NCollection_LocalArray<Standard_Boolean,4> isDegenerated (aDegenPnt.Extent()); // degenerated vertex
for (size_t iDegen = 0; iDegen < isDegenerated.Size(); ++iDegen) isDegenerated[iDegen] = Standard_True;
for (int iPole = 0; iPole < NbSteps[iSide]; iPole++)
{
const gp_Pnt& aPole = aPoles (RowStart[iSide] + iPole * RowStep[iSide], ColStart[iSide] + iPole * ColStep[iSide]);
// distance from CG
Standard_Real aDistCG = aCenter.Distance (aPole);
if (aDistCG > gp::Resolution())
isCollapsed = Standard_False;
if (aDistCG > thePrecision)
isSingular = Standard_False;
// distances from degenerated points
NCollection_List<gp_Pnt>::Iterator aDegPntIt (aDegenPnt);
NCollection_List<Standard_Real>::Iterator aDegTolIt(aDegenTol);
for (size_t iDegen = 0; iDegen < isDegenerated.Size(); aDegPntIt.Next(), aDegTolIt.Next(), ++iDegen)
{
if (isDegenerated[iDegen] && aDegPntIt.Value().Distance (aPole) >= aDegTolIt.Value())
{
isDegenerated[iDegen] = Standard_False;
}
}
}
if (isCollapsed)
{
continue; // already Ok, nothing to be done
}
// decide to collapse the side: either if it is singular with thePrecision,
// or if it fits into one (and only one) degenerated point
if (! isSingular)
{
Standard_Integer aNbFit = 0;
NCollection_List<gp_Pnt>::Iterator aDegPntIt (aDegenPnt);
NCollection_List<Standard_Real>::Iterator aDegTolIt(aDegenTol);
for (size_t iDegen = 0; iDegen < isDegenerated.Size(); ++iDegen)
{
if (isDegenerated[iDegen])
{
// remove degenerated point as soon as it fits at least one side, to prevent total collapse
aDegenPnt.Remove (aDegPntIt);
aDegenTol.Remove (aDegTolIt);
aNbFit++;
}
else
{
aDegPntIt.Next();
aDegTolIt.Next();
}
}
// if side fits more than one degenerated vertex, do not collapse it
// to be on the safe side
isSingular = (aNbFit == 1);
}
// do collapse
if (isSingular)
{
if (aCopy.IsNull())
{
aCopy = Handle(Geom_BSplineSurface)::DownCast (theSurface->Copy());
}
for (int iPole = 0; iPole < NbSteps[iSide]; iPole++)
{
aCopy->SetPole (RowStart[iSide] + iPole * RowStep[iSide], ColStart[iSide] + iPole * ColStep[iSide], aCenter);
}
}
}
if (! aCopy.IsNull())
return aCopy;
}
return theSurface;
}

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