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

Compare commits

..

1 Commits

Author SHA1 Message Date
isk
b9b37c1d45 0026791: Visualization, TKOpenGl - apply view resolution to built-in markers
Add ResolutionRatio() method in the Graphic3d_RenderingParams.
Add SetResolutionRatio() method in the OpenGl_Context.
2015-11-11 10:46:48 +03:00
5579 changed files with 35603 additions and 45973 deletions

View File

@@ -34,7 +34,7 @@ project (OCCT)
# Solution folder property
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
set (INSTALL_TEST_CASES OFF CACHE BOOL "${INSTALL_TEST_CASES_DESCR}")
set (INSTALL_OCCT_TEST_CASES OFF CACHE BOOL "${INSTALL_OCCT_TEST_CASES_DESCR}")
# a single-configuration generator like the Makefile generator defines CMAKE_BUILD_TYPE variable
# check this variable and set if it's required
if (DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) # single-configuration generator.
@@ -48,7 +48,7 @@ if (OCCT_ALGO_EXTENDED_OUTPUT)
endif()
# copy samples to install directory
set (INSTALL_SAMPLES OFF CACHE BOOL "${INSTALL_SAMPLES_DESCR}")
set (INSTALL_OCCT_SAMPLES OFF CACHE BOOL "${INSTALL_OCCT_SAMPLES_DESCR}")
# install dir of the built project
set (INSTALL_DIR "" CACHE PATH "${INSTALL_DIR_DESCR}" )
@@ -86,11 +86,6 @@ foreach (OCCT_MODULE ${OCCT_MODULES})
BUILD_MODULE (${OCCT_MODULE})
endforeach()
if (ANDROID AND BUILD_MODULE_Draw)
message (STATUS "Info. Draw module is turned off due to it is not supported on Android")
set (BUILD_MODULE_Draw OFF CACHE BOOL "${BUILD_MODULE_Draw_DESCR}" FORCE)
endif()
# Overview
set (BUILD_DOC_OcctOverview OFF CACHE BOOL "${BUILD_DOC_OcctOverview_DESCR}")
@@ -138,7 +133,7 @@ OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/3rdparty_macro")
list (FIND BUILD_TOOLKITS TKMath CAN_REBUILD_PDC_FOR_TKMATH)
list (FIND BUILD_TOOLKITS StepFile CAN_REBUILD_PDC_FOR_STEPFILE)
if (NOT ${CAN_REBUILD_PDC_FOR_TKMATH} EQUAL -1 OR NOT ${CAN_REBUILD_PDC_FOR_STEPFILE} EQUAL -1)
if (NOT "${CAN_REBUILD_PDC_FOR_TKMATH}" STREQUAL "-1" OR NOT "${CAN_REBUILD_PDC_FOR_STEPFILE}" STREQUAL "-1")
set (REBUILD_PLATFORM_DEPENDENT_CODE OFF CACHE BOOL "${REBUILD_PLATFORM_DEPENDENT_CODE_DESCR}")
else()
OCCT_CHECK_AND_UNSET (REBUILD_PLATFORM_DEPENDENT_CODE)
@@ -146,13 +141,23 @@ endif()
if (NOT DEFINED 3RDPARTY_DIR)
set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_DESCR})
get_filename_component (3RDPARTY_DIR "${3RDPARTY_DIR}" ABSOLUTE)
endif()
# search for 3rdparty dir
if ("${3RDPARTY_DIR}" STREQUAL "")
if (DEFINED ENV{3RDPARTY_DIR})
set (3RDPARTY_DIR "$ENV{3RDPARTY_DIR}" CACHE PATH ${3RDPARTY_DIR_DESCR} FORCE)
elseif (EXISTS "${CMAKE_SOURCE_DIR}/../")
# in version 6.7.0 and above, occt parent directory contains 3rdparties
get_filename_component (3RDPARTY_DIR "${CMAKE_SOURCE_DIR}/../" ABSOLUTE)
set (3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH ${3RDPARTY_DIR_DESCR} FORCE)
endif()
endif()
# search for CSF_TclLibs variable in EXTERNLIB of each being used toolkit
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
if (USE_TCL)
if ("${USE_TCL}" STREQUAL ON)
message (STATUS "Info: TCL is used by OCCT")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tcl")
@@ -169,7 +174,7 @@ endif()
# search for CSF_FREETYPE variable in EXTERNLIB of each being used toolkit
OCCT_IS_PRODUCT_REQUIRED (CSF_FREETYPE USE_FREETYPE)
if (USE_FREETYPE)
if ("${USE_FREETYPE}" STREQUAL ON)
message (STATUS "Info: Freetype is used by OCCT")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freetype")
else()
@@ -185,7 +190,7 @@ if (USE_VTK)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vtk")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_VTK")
#OCCT_CHECK_AND_UNSET ("INSTALL_VTK")
OCCT_CHECK_AND_UNSET ("INSTALL_VTK")
endif()
# D3D
@@ -363,23 +368,19 @@ if ("${INSTALL_DIR}" STREQUAL "")
message (STATUS "Info: INSTALL_DIR has been set as ${INSTALL_DIR}")
endif()
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT header files into ${CMAKE_BINARY_DIR}/inc ...")
message (STATUS "\nInfo: Collecting all OCCT 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}")
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
message (STATUS "Info: \(${CURRENT_TIME}\) End the collecting")
OCCT_INSTALL_FILE_OR_DIR ("data" "${INSTALL_DIR}")
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR}/samples")
if (INSTALL_SAMPLES)
if (INSTALL_OCCT_SAMPLES)
OCCT_INSTALL_FILE_OR_DIR ("samples" "${INSTALL_DIR}")
endif()
if (INSTALL_TEST_CASES)
if (INSTALL_OCCT_TEST_CASES)
OCCT_INSTALL_FILE_OR_DIR ("tests" "${INSTALL_DIR}")
endif()
@@ -475,9 +476,6 @@ foreach(RESOURCE ${RESOURCES})
endif()
endforeach()
# define CSF variable
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_csf")
# include patched toolkit projects or original ones
foreach (BUILD_TOOLKIT ${BUILD_TOOLKITS})
OCCT_ADD_SUBDIRECTORY ("src/${BUILD_TOOLKIT}")

View File

@@ -67,7 +67,6 @@ n GeomLProp
n GeomLib
n GeomProjLib
n GeomTools
n GeomEvaluator
n Hermit
n IntAna
n IntAna2d
@@ -431,4 +430,3 @@ n IVtkTools
t TKIVtk
n IVtkDraw
t TKIVtkDraw
n Geom2dEvaluator

View File

@@ -1,103 +1,113 @@
##
if(3RDPARTY_MACRO_ALREADY_INCLUDED)
return()
endif()
set(3RDPARTY_MACRO_ALREADY_INCLUDED 1)
#
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEBUG)
if (NOT DEFINED INSTALL_${PRODUCT_NAME})
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "${INSTALL_${PRODUCT_NAME}_DESCR}")
endif()
# define 3RDPARTY_${PRODUCT_NAME}_DIR variable is it isn't defined
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DIR)
set (3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME}")
endif()
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify product folder in connectin with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_${PRODUCT_NAME}_DIR PATH "The directory containing ${PRODUCT_NAME}")
if (NOT 3RDPARTY_${PRODUCT_NAME}_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" ${PRODUCT_NAME} ${PRODUCT_NAME}_DIR_NAME)
if (${PRODUCT_NAME}_DIR_NAME)
set (3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_DIR}/${${PRODUCT_NAME}_DIR_NAME}" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
endif()
# search for product directory inside 3RDPARTY_DIR directory
if (NOT 3RDPARTY_${PRODUCT_NAME}_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" "${PRODUCT_NAME}" ${PRODUCT_NAME}_DIR_NAME)
if (${PRODUCT_NAME}_DIR_NAME)
message (STATUS "Info: ${PRODUCT_NAME}: ${${PRODUCT_NAME}_DIR_NAME} folder is used")
set (3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_DIR}/${${PRODUCT_NAME}_DIR_NAME}" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
endif()
else()
#set (3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE PATH "the path of ${HEADER_NAME}")
if (NOT DEFINED INSTALL_${PRODUCT_NAME})
message (STATUS "${INSTALL_${PRODUCT_NAME}_DESCR}")
if (NOT "${INSTALL_${PRODUCT_NAME}_DESCR}" STREQUAL "")
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "${INSTALL_${PRODUCT_NAME}_DESCR}")
else()
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "Is ${PRODUCT_NAME} required to be copied into install directory")
endif()
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
# search for include directory
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "The directory containing the headers of the ${PRODUCT_NAME}" FORCE)
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR ${HEADER_NAME} PATHS
"${3RDPARTY_${PRODUCT_NAME}_DIR}/include"
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_HEADER}
NO_DEFAULT_PATH)
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR ${HEADER_NAME})
endif()
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing the headers of the ${PRODUCT_NAME}" FORCE)
endif()
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
elseif (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
get_filename_component(3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_TMP "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
if (NOT "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" STREQUAL "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_TMP}")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
endif()
endif()
# search for library
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME} PATHS
"${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}"
"${3RDPARTY_${PRODUCT_NAME}_DIR}/lib"
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_LIB}
NO_DEFAULT_PATH)
# second search if previous one do not find anything
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME})
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} library")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} library" FORCE)
endif()
# library path
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} library" FORCE)
endif()
# search for shared library (just for win case)
if (WIN32)
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT 3RDPARTY_${PRODUCT_NAME}_DLL_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
endif()
endif()
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
if (WIN32)
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library")
endif()
endif()
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR PATH "the path to ${PRODUCT_NAME}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY FILEPATH "the path to ${PRODUCT_NAME} library")
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR PATH "The directory containing ${PRODUCT_NAME} library")
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_DLL FILEPATH "the path to ${PRODUCT_NAME} shared library")
if (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_DIR PATH "The directory containing ${PRODUCT_NAME} shared library")
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
elseif (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
get_filename_component(3RDPARTY_${PRODUCT_NAME}_DLL_DIR_TMP "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
if (NOT "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" STREQUAL "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_TMP}")
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
endif()
endif()
endif()
# header
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
set (3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
# set 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "the path to ${HEADER_NAME}" FORCE)
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME}" PATHS
"${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}"
"${3RDPARTY_${PRODUCT_NAME}_DIR}/bin"
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_DLL}
NO_DEFAULT_PATH)
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR NAMES ${HEADER_NAME}
PATHS ${3RDPARTY_${PRODUCT_NAME}_DIR}
PATH_SUFFIXES include
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR NAMES ${HEADER_NAME}
PATH_SUFFIXES include
CMAKE_FIND_ROOT_PATH_BOTH)
# second search if previous one do not find anything
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME}")
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
endif()
# shared library path
if (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
endif()
endif()
@@ -105,79 +115,16 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE FILEPATH "The path to ${HEADER_NAME}" FORCE)
endif()
# library
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
set (${PRODUCT_NAME}_PATH_SUFFIXES lib)
if (ANDROID)
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} libs/${ANDROID_ABI})
endif()
# set 3RDPARTY_${PRODUCT_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_LIBRARY
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} library" FORCE)
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY NAMES ${LIBRARY_NAME}
PATHS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" "${3RDPARTY_${PRODUCT_NAME}_DIR}"
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY NAMES ${LIBRARY_NAME}
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
else()
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
endif()
endif()
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "The path to ${PRODUCT_NAME} library" FORCE)
endif()
# shared library
if (WIN32)
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
# set 3RDPARTY_${PRODUCT_NAME}_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_DLL
set (3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} shared library" FORCE)
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
find_library (3RDPARTY_${PRODUCT_NAME}_DLL NAMES ${LIBRARY_NAME}
PATHS "${3RDPARTY_${PRODUCT_NAME}_DIR}"
PATH_SUFFIXES bin
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_${PRODUCT_NAME}_DLL NAMES ${LIBRARY_NAME} PATH_SUFFIXES bin)
endif()
if (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
else()
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
endif()
endif()
if (3RDPARTY_${PRODUCT_NAME}_DLL_DIR OR EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
if (3RDPARTY_${PRODUCT_NAME}_DLL OR EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)

View File

@@ -9,7 +9,7 @@ endif()
# BISON_EXECUTABLE is required by BISON_TARGET macro and should be defined
set (BISON_EXECUTABLE "${3RDPARTY_BISON_EXECUTABLE}" CACHE FILEPATH "path to the bison executable" FORCE)
find_package (BISON)
find_package (Bison)
if (BISON_FOUND)
set (3RDPARTY_BISON_EXECUTABLE "${BISON_EXECUTABLE}" CACHE FILEPATH "The Path to the bison command" FORCE)

View File

@@ -8,27 +8,29 @@ if (NOT DEFINED 3RDPARTY_FREETYPE_DIR)
set (3RDPARTY_FREETYPE_DIR "" CACHE PATH "The directory containing freetype")
endif()
# store ENV{FREETYPE_DIR}
SET (CACHED_FREETYPE_DIR $ENV{FREETYPE_DIR})
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
OCCT_MAKE_COMPILER_SHORT_NAME()
OCCT_MAKE_COMPILER_BITNESS()
# specify freetype folder in connectin with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_FREETYPE_DIR PATH "The directory containing freetype")
if (NOT 3RDPARTY_FREETYPE_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" FREETYPE FREETYPE_DIR_NAME)
if (NOT ENV{FREETYPE_DIR})
# search for freetype in user defined directory
if (NOT 3RDPARTY_FREETYPE_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" FREETYPE FREETYPE_DIR_NAME)
if (FREETYPE_DIR_NAME)
set (3RDPARTY_FREETYPE_DIR "${3RDPARTY_DIR}/${FREETYPE_DIR_NAME}" CACHE PATH "The directory containing freetype" FORCE)
endif()
endif()
else()
#set (3RDPARTY_FREETYPE_DIR "" CACHE PATH "The directory containing freetype" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}")
endif()
endif()
# define required freetype variables
if (NOT DEFINED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "" CACHE FILEPATH "the path of ft2build.h")
endif()
@@ -37,257 +39,173 @@ if (NOT DEFINED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "" CACHE FILEPATH "the path of freetype2")
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY OR NOT 3RDPARTY_FREETYPE_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY OR NOT 3RDPARTY_FREETYPE_LIBRARY_DIR)
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library")
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY_DIR)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library")
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE FILEPATH "The directory containing freetype library")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL OR NOT 3RDPARTY_FREETYPE_DLL_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL OR NOT 3RDPARTY_FREETYPE_DLL_DIR)
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library")
endif()
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL_DIR)
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library")
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE FILEPATH "The directory containing freetype shared library")
endif()
endif()
# check 3RDPARTY_FREETYPE_ paths for consistency with specified 3RDPARTY_FREETYPE_DIR
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build FILEPATH "the path to ft2build.h")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "the path to ftheader.h")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_LIBRARY FILEPATH "the path to freetype library")
find_package(Freetype)
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_LIBRARY_DIR PATH "The directory containing freetype library")
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_DLL FILEPATH "the path to freetype shared library")
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE PATH "The directory containing freetype shared library" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_DLL_DIR PATH "The directory containing freetype shared library")
endif()
# ft2build header
if (FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${FREETYPE_INCLUDE_DIR_ft2build}")
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "${FREETYPE_INCLUDE_DIR_ft2build}" CACHE FILEPATH "the path of ft2build.h" FORCE)
endif()
endif()
# the FIRST step in search for freetype library and header folders (built-in search engine)
# execute built-in search engine to seek freetype
set (IS_BUILTIN_SEARCH_REQUIRED OFF)
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
set (IS_BUILTIN_SEARCH_REQUIRED ON)
elseif (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
set (IS_BUILTIN_SEARCH_REQUIRED ON)
elseif (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
set (IS_BUILTIN_SEARCH_REQUIRED ON)
#elseif (WIN32)
#if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
# set (IS_BUILTIN_SEARCH_REQUIRED ON)
#endif()
endif()
if (IS_BUILTIN_SEARCH_REQUIRED)
# use 3RDPARTY_FREETYPE_DIR if it is specified for freetype search
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
set (CACHED_FREETYPE_DIR $ENV{FREETYPE_DIR})
set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}")
endif()
find_package(Freetype)
# restore ENV{FREETYPE_DIR}
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
set (ENV{FREETYPE_DIR} ${CACHED_FREETYPE_DIR})
endif()
# check the found paths for consistency with specified 3RDPARTY_FREETYPE_DIR
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_ft2build FILEPATH "the path to ft2build.h")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "the path to ftheader.h")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_LIBRARY FILEPATH "freetype library")
endif()
# assign the found paths to corresponding 3RDPARTY_FREETYPE_ variables
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
if (FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${FREETYPE_INCLUDE_DIR_ft2build}")
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "${FREETYPE_INCLUDE_DIR_ft2build}" CACHE FILEPATH "the path to ft2build.h" FORCE)
endif()
endif()
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
if (FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${FREETYPE_INCLUDE_DIR_freetype2}" CACHE FILEPATH "the path to ftheader.h" FORCE)
endif()
endif()
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
if (FREETYPE_LIBRARY AND EXISTS "${FREETYPE_LIBRARY}")
set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY}" CACHE FILEPATH "The path to freetype library" FORCE)
endif()
endif()
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library" FORCE)
endif()
endif()
# the SECOND step in search for freetype library and header folders (additional search algorithms)
# ft2build.h
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
set (FT2BUILD_NAMES ft2build.h config/ft2build.h freetype/config/ft2build.h)
# set 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build-NOTFOUND" CACHE FILEPATH "the path to ft2build.h" FORCE)
# cmake (version < 3.0) doesn't find ft2build.h of freetype (version is >= 2.5.1)
if (NOT FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
# cmake (version is < 3.0) doesn't find ftheader.h of freetype (version is >= 2.5.1)
# do search taking into account freetype structure of 2.5.1 version
find_path (FREETYPE_INCLUDE_DIR_freetype2 NAMES
freetype/config/ftheader.h
config/ftheader.h
HINTS
ENV FREETYPE_DIR
PATHS
/usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
PATH_SUFFIXES include/freetype2 include freetype2
NO_DEFAULT_PATH)
find_path (FREETYPE_INCLUDE_DIR_freetype2 NAMES freetype/config/ftheader.h config/ftheader.h)
elseif (FREETYPE_INCLUDE_DIR_freetype2 OR EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build NAMES ${FT2BUILD_NAMES}
PATHS ${3RDPARTY_FREETYPE_DIR}
PATH_SUFFIXES include freetype2 include/freetype2
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build NAMES ${FT2BUILD_NAMES}
PATHS /usr/X11R6 /usr/local/X11R6 /usr/local/X11 /usr/freeware
PATH_SUFFIXES include/freetype2 include freetype2
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
get_filename_component (3RDPARTY_FREETYPE_DIR_ABS "${3RDPARTY_FREETYPE_DIR}" ABSOLUTE)
get_filename_component (FREETYPE_INCLUDE_DIR_freetype2_ABS "${FREETYPE_INCLUDE_DIR_freetype2}" ABSOLUTE)
if (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
string (REGEX MATCH "${3RDPARTY_FREETYPE_DIR_ABS}" DOES_PATH_CONTAIN "${FREETYPE_INCLUDE_DIR_freetype2_ABS}")
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "" CACHE FILEPATH "the path to ft2build.h" FORCE)
endif()
if (NOT DOES_PATH_CONTAIN) # if cmake found freetype2 at different place from 3RDPARTY_FREETYPE_DIR
# search for freetype2 in 3RDPARTY_FREETYPE_DIR and if it will be found - replace freetyp2 path by new one
set (TMP_FREETYPE2 "TMP_FREETYPE2-NOTFOUND" CACHE FILEPATH "" FORCE)
find_path (TMP_FREETYPE2 NAMES freetype/config/ftheader.h config/ftheader.h
PATHS "${3RDPARTY_FREETYPE_DIR}"
PATH_SUFFIXES include/freetype2 include freetype2
NO_DEFAULT_PATH)
# ftheader.h
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
set (FTHEADER_NAMES ftheader.h config/ftheader.h freetype/config/ftheader.h)
if (TMP_FREETYPE2 OR NOT EXISTS "${TMP_FREETYPE2}")
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${TMP_FREETYPE2}" CACHE FILEPATH "the path of freetype2" FORCE)
# set 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2-NOTFOUND" CACHE FILEPATH "the path to ftheader.h" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 NAMES ${FTHEADER_NAMES}
HINTS ${3RDPARTY_FREETYPE_DIR}
PATH_SUFFIXES include/freetype2 include freetype2
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 NAMES ${FTHEADER_NAMES}
PATHS /usr/X11R6 /usr/local/X11R6 /usr/local/X11 /usr/freeware
PATH_SUFFIXES include/freetype2 include freetype2
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "" CACHE FILEPATH "the path to ftheader.h" FORCE)
endif()
# freetype library
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
set (FREETYPE_PATH_SUFFIXES lib)
if (ANDROID)
set (FREETYPE_PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES} libs/${ANDROID_ABI})
endif()
# set 3RDPARTY_FREETYPE_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_LIBRARY
set (3RDPARTY_FREETYPE_LIBRARY "3RDPARTY_FREETYPE_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to freetype library" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_library (3RDPARTY_FREETYPE_LIBRARY freetype
PATHS "${3RDPARTY_FREETYPE_LIBRARY_DIR}" "${3RDPARTY_FREETYPE_DIR}"
PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_FREETYPE_LIBRARY freetype
PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library" FORCE)
endif()
endif()
if (3RDPARTY_FREETYPE_LIBRARY_DIR AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_LIBRARY_DIR)
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "The path to freetype library" FORCE)
endif()
# freetype shared library
if (WIN32)
if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
# set 3RDPARTY_FREETYPE_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_DLL
set (3RDPARTY_FREETYPE_DLL "3RDPARTY_FREETYPE_DLL-NOTFOUND" CACHE FILEPATH "The path to freetype shared library" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_library (3RDPARTY_FREETYPE_DLL freetype
PATHS "${3RDPARTY_FREETYPE_DIR}"
PATH_SUFFIXES bin
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_FREETYPE_DLL freetype
PATH_SUFFIXES bin)
# hide and remove TMP_FREETYPE2
mark_as_advanced (TMP_FREETYPE2)
unset (TMP_FREETYPE2)
endif()
endif()
endif()
endif()
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library" FORCE)
# return ENV{FREETYPE_DIR}
SET (ENV{FREETYPE_DIR} ${CACHED_FREETYPE_DIR})
# freetype2 header
if (FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${FREETYPE_INCLUDE_DIR_freetype2}" CACHE FILEPATH "the path of freetype2" FORCE)
endif()
endif()
if (NOT 3RDPARTY_FREETYPE_LIBRARY_DIR)
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
elseif (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_DIR_TMP "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
if (NOT "${3RDPARTY_FREETYPE_LIBRARY_DIR}" STREQUAL "${3RDPARTY_FREETYPE_LIBRARY_DIR_TMP}")
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
endif()
endif()
if (WIN32)
if (NOT 3RDPARTY_FREETYPE_DLL_DIR)
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
elseif (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component(3RDPARTY_FREETYPE_DLL_DIR_TMP "${3RDPARTY_FREETYPE_DLL}" PATH)
if (NOT "${3RDPARTY_FREETYPE_DLL_DIR}" STREQUAL "${3RDPARTY_FREETYPE_DLL_DIR_TMP}")
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
endif()
endif()
endif()
if (3RDPARTY_FREETYPE_DLL_DIR OR EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
# freetype library
if (FREETYPE_LIBRARY AND EXISTS "${FREETYPE_LIBRARY}")
if (NOT 3RDPARTY_FREETYPE_LIBRARY)
set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY}" CACHE FILEPATH "freetype library" FORCE)
endif()
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE FILEPATH "The directory containing freetype library" FORCE)
endif()
if (WIN32)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component (FREETYPE_LIBRARY_PARENT_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" PATH) # parent of the library directory
set (3RDPARTY_FREETYPE_DLL "3RDPARTY_FREETYPE_DLL-NOTFOUND" CACHE FILEPATH "freetype shared library" FORCE)
find_library (3RDPARTY_FREETYPE_DLL freetype PATHS "${FREETYPE_LIBRARY_PARENT_DIR}/bin" NO_DEFAULT_PATH)
endif()
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE FILEPATH "The directory containing freetype shared library" FORCE)
endif()
endif()
endif()
if (NOT 3RDPARTY_FREETYPE_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE FILEPATH "The directory containing freetype library" FORCE)
endif()
if (WIN32)
if (NOT 3RDPARTY_FREETYPE_DLL_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE FILEPATH "The directory containing shared freetype library" FORCE)
endif()
endif()
# include found paths to common variables
if (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
endif()
if (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
endif()
if (3RDPARTY_FREETYPE_LIBRARY)
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_LIBRARY_DIR)
endif()
if (WIN32)
if (3RDPARTY_FREETYPE_DLL OR EXISTS "${3RDPARTY_FREETYPE_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FREETYPE_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_DLL_DIR)
endif()
endif()
# install instructions
if (INSTALL_FREETYPE)
OCCT_MAKE_OS_WITH_BITNESS()
@@ -302,21 +220,21 @@ if (INSTALL_FREETYPE)
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
else()
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_ABS ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_NAME ${3RDPARTY_FREETYPE_LIBRARY} NAME)
get_filename_component(ABS_PATH ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
get_filename_component(FREETYPELIB ${3RDPARTY_FREETYPE_LIBRARY} NAME)
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
install (FILES "${ABS_PATH}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
RENAME ${FREETYPELIB}.6)
install (FILES "${ABS_PATH}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
RENAME ${FREETYPELIB}.6)
install (FILES "${ABS_PATH}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
RENAME ${FREETYPELIB}.6)
endif()
set (USED_3RDPARTY_FREETYPE_DIR "")
@@ -334,4 +252,4 @@ OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_ft2build)
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_freetype2)
OCCT_CHECK_AND_UNSET(FREETYPE_LIBRARY)
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)

View File

@@ -1,122 +0,0 @@
# CSF variables definition
if(CSFS_ALREADY_INCLUDED)
return()
endif()
set(CSFS_ALREADY_INCLUDED 1)
if (NOT DEFINED USE_TCL)
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
endif()
if (USE_TCL)
if ("${3RDPARTY_TCL_LIBRARY_VERSION}" STREQUAL "")
message (STATUS "Warning. TCL version has not been specified by CSF_TclLibs defining thus it will be used as 8.6")
set (3RDPARTY_TCL_LIBRARY_VERSION "8.6")
endif()
if ("${3RDPARTY_TK_LIBRARY_VERSION}" STREQUAL "")
message (STATUS "Warning. TK version has not been specified by CSF_TclTkLibs defining thus it will be used as 8.6")
set (3RDPARTY_TK_LIBRARY_VERSION "8.6")
endif()
endif()
if (USE_VTK AND NOT 3RDPARTY_VTK_REQUIRED_LIBRARIES)
message (WARNING "CSF_VTK specification: VTK libraries are not defined")
endif()
if (USE_TBB)
set (CSF_TBB "tbb tbbmalloc")
else()
set (CSF_TBB)
endif()
if (WIN32)
set (CSF_advapi32 "advapi32.lib")
set (CSF_gdi32 "gdi32.lib")
set (CSF_user32 "user32.lib")
set (CSF_wsock32 "wsock32.lib")
set (CSF_AviLibs "ws2_32.lib vfw32.lib")
set (CSF_OpenGlLibs "opengl32.lib glu32.lib")
if (USE_TCL)
set (CSF_TclLibs "tcl${3RDPARTY_TCL_LIBRARY_VERSION}.lib")
set (CSF_TclTkLibs "tk${3RDPARTY_TK_LIBRARY_VERSION}.lib")
endif()
if (USE_VTK)
set (CSF_VTK "${3RDPARTY_VTK_REQUIRED_LIBRARIES}")
else()
set (CSF_VTK)
endif()
else()
if (APPLE)
set (CSF_objc "objc")
# frameworks
find_library (Appkit_LIB NAMES Appkit)
set (CSF_Appkit ${Appkit_LIB})
find_library (IOKit_LIB NAMES IOKit)
set (CSF_IOKit ${IOKit_LIB})
OCCT_CHECK_AND_UNSET (Appkit_LIB)
OCCT_CHECK_AND_UNSET (IOKit_LIB)
if (USE_GLX)
set (CSF_OpenGlLibs GL)
set (CSF_XwLibs "X11 Xext Xmu Xi")
else()
find_library (OpenGlLibs_LIB NAMES OpenGL)
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
endif()
if (USE_TCL)
set (CSF_TclTkLibs Tk)
set (CSF_TclLibs Tcl)
endif()
elseif (ANDROID)
set (CSF_ThreadLibs "c")
set (CSF_OpenGlLibs "EGL GLESv2")
elseif (UNIX)
set (CSF_ThreadLibs "pthread rt")
set (CSF_OpenGlLibs "GLU GL")
set (CSF_XwLibs "X11 Xext Xmu Xi")
if (USE_TCL)
set (CSF_TclLibs "tcl${3RDPARTY_TCL_LIBRARY_VERSION}")
set (CSF_TclTkLibs "tk${3RDPARTY_TK_LIBRARY_VERSION}")
endif()
endif()
if (USE_FREETYPE)
set (CSF_FREETYPE "freetype")
else()
set (CSF_FREETYPE)
endif()
if (USE_FREEIMAGE)
set (CSF_FreeImagePlus "freeimage")
else()
set (CSF_FreeImagePlus)
endif()
if (NOT DEFINED ANDROID)
if (USE_GL2PS)
set (CSF_GL2PS "gl2ps")
else()
set (CSF_GL2PS)
endif()
endif()
if (USE_VTK)
set (CSF_VTK "${3RDPARTY_VTK_REQUIRED_LIBRARIES}")
else()
set (CSF_VTK)
endif()
endif()

View File

@@ -1,10 +1,3 @@
##
if(FLAGS_ALREADY_INCLUDED)
return()
endif()
set(FLAGS_ALREADY_INCLUDED 1)
if (MSVC)
add_definitions(/fp:precise)
@@ -82,26 +75,20 @@ endif()
# generate a single response file which enlist all of the object files
SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
# increase compiler warnings level (-W4 for MSVC, -Wextra for GCC)
# increase compiler warnings level (-W4 for MSVC, -Wall for GCC)
if (MSVC)
if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string (REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
if (DEFINED CMAKE_COMPILER_IS_GNUCXX OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
endif()
# Optimize size of binaries
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR MINGW)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
endif()
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")

View File

@@ -1,11 +1,4 @@
##
if(OCCT_MACROS_ALREADY_INCLUDED)
return()
endif()
set(OCCT_MACROS_ALREADY_INCLUDED 1)
#
macro (OCCT_CHECK_AND_UNSET VARNAME)
if (DEFINED ${VARNAME})
unset (${VARNAME} CACHE)
@@ -98,14 +91,15 @@ function (OCCT_ORIGIN_AND_PATCHED_FILES RELATIVE_PATH SEARCH_TEMPLATE RESULT)
file (GLOB ORIGIN_FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
foreach (ORIGIN_FILE ${ORIGIN_FILES})
# check for existence of patched version of current file
if (NOT APPLY_OCCT_PATCH_DIR OR NOT EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}")
list (APPEND FOUND_FILES ${ORIGIN_FILE})
else()
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}")
get_filename_component (ORIGIN_FILE_NAME "${ORIGIN_FILE}" NAME)
if (NOT EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}/${ORIGIN_FILE_NAME}")
list (APPEND FOUND_FILES ${ORIGIN_FILE})
if (EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}/${ORIGIN_FILE_NAME}")
continue()
endif()
endif()
# append origin version if patched one is not found
list (APPEND FOUND_FILES ${ORIGIN_FILE})
endforeach()
set (${RESULT} ${FOUND_FILES} PARENT_SCOPE)
@@ -117,11 +111,16 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
string (TOLOWER "${PRODUCT_NAME}" lower_PRODUCT_NAME)
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*${COMPILER}.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+")
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*")
list (APPEND SEARCH_TEMPLATES "^${lower_PRODUCT_NAME}.*${COMPILER}.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "^${lower_PRODUCT_NAME}.*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "^${lower_PRODUCT_NAME}.*[0-9.]+.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "^${lower_PRODUCT_NAME}.*[0-9.]+")
list (APPEND SEARCH_TEMPLATES "^${lower_PRODUCT_NAME}")
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*${COMPILER}.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+")
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}")
SUBDIRECTORY_NAMES ("${ROOT_DIR}" SUBDIR_NAME_LIST)
@@ -141,7 +140,9 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
endforeach()
if (LOCAL_RESULT)
list (GET LOCAL_RESULT -1 DUMMY)
list (LENGTH "${LOCAL_RESULT}" LOC_LEN)
math (EXPR LAST_ELEMENT_INDEX "${LOC_LEN}-1")
list (GET LOCAL_RESULT ${LAST_ELEMENT_INDEX} DUMMY)
set (${RESULT} ${DUMMY} PARENT_SCOPE)
endif()
endfunction()
@@ -177,7 +178,7 @@ macro (OCCT_CONFIGURE_AND_INSTALL BEING_CONGIRUGED_FILE BUILD_NAME INSTALL_NAME
endmacro()
macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOOLKITS)
set (OCCT_USED_PACKAGES)
set (OCCT_SOURCE_DIRS)
# consider patched header.in template
set (TEMPLATE_HEADER_PATH "${CMAKE_SOURCE_DIR}/adm/templates/header.in")
@@ -188,124 +189,43 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
set (ROOT_OCCT_DIR ${CMAKE_SOURCE_DIR})
foreach (OCCT_USED_TOOLKIT ${OCCT_BUILD_TOOLKITS})
# append parent folder
list (APPEND OCCT_SOURCE_DIRS ${OCCT_USED_TOOLKIT})
# append all required package folders
set (OCCT_TOOLKIT_PACKAGES)
set (OCCT_USED_TOOLKIT_DEPS)
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_TOOLKIT_PACKAGES)
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_USED_TOOLKIT_DEPS)
elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_TOOLKIT_PACKAGES)
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_USED_TOOLKIT_DEPS)
endif()
list (APPEND OCCT_USED_PACKAGES ${OCCT_TOOLKIT_PACKAGES})
foreach (OCCT_USED_TOOLKIT_DEP ${OCCT_USED_TOOLKIT_DEPS})
list (APPEND OCCT_SOURCE_DIRS ${OCCT_USED_TOOLKIT_DEP})
endforeach()
endforeach()
list (REMOVE_DUPLICATES OCCT_USED_PACKAGES)
foreach (OCCT_SOURCE_DIR ${OCCT_SOURCE_DIRS})
# get all header files from each src folder
file (GLOB OCCT_HEADER_FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_SOURCE_DIR}/*.[hgl]xx" "${CMAKE_SOURCE_DIR}/src/${OCCT_SOURCE_DIR}/*.h")
install (FILES ${OCCT_HEADER_FILES} DESTINATION "${INSTALL_DIR}/inc")
set (OCCT_HEADER_FILES_COMPLETE)
set (OCCT_HEADER_FILE_NAMES_NOT_IN_FILES)
set (OCCT_HEADER_FILE_WITH_PROPER_NAMES)
# create new file including found header
foreach (OCCT_HEADER_FILE ${OCCT_HEADER_FILES})
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE} NAME)
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
endforeach()
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
message (STATUS "Info. \(${CURRENT_TIME}\) Compare FILES with files in package directories...")
# consider pathed the source files
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_SOURCE_DIR}")
file (GLOB PATCHED_OCCT_HEADER_FILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_SOURCE_DIR}/*.[hgl]xx" "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_SOURCE_DIR}/*.h")
install (FILES ${PATCHED_OCCT_HEADER_FILES} DESTINATION "${INSTALL_DIR}/inc")
foreach (OCCT_PACKAGE ${OCCT_USED_PACKAGES})
if (EXISTS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" OCCT_ALL_FILE_NAMES)
list (LENGTH OCCT_ALL_FILE_NAMES ALL_FILES_NB)
math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" )
# emit warnings if there is unprocessed headers
file (GLOB OCCT_ALL_FILES_IN_DIR "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/*.*")
foreach (OCCT_FILE_IN_DIR ${OCCT_ALL_FILES_IN_DIR})
get_filename_component (OCCT_FILE_IN_DIR_NAME ${OCCT_FILE_IN_DIR} NAME)
set (OCCT_FILE_IN_DIR_STATUS OFF)
if (${ALL_FILES_NB} LESS 0)
break()
endif()
foreach (FILE_INDEX RANGE ${ALL_FILES_NB})
list (GET OCCT_ALL_FILE_NAMES ${FILE_INDEX} OCCT_FILE_NAME)
if ("${OCCT_FILE_IN_DIR_NAME}" STREQUAL "${OCCT_FILE_NAME}")
set (OCCT_FILE_IN_DIR_STATUS ON)
string (REGEX MATCH ".+\\.[hlg]xx|.+\\.h$" IS_HEADER_FOUND "${OCCT_FILE_NAME}")
if (IS_HEADER_FOUND)
list (APPEND OCCT_HEADER_FILES_COMPLETE ${OCCT_FILE_IN_DIR})
# collect header files with name that does not contain its package one
string (FIND "${OCCT_FILE_NAME}" "${OCCT_PACKAGE}_" FOUND_INDEX)
if (NOT ${FOUND_INDEX} EQUAL 0)
list (APPEND OCCT_HEADER_FILE_WITH_PROPER_NAMES "${OCCT_FILE_NAME}")
endif()
endif()
# remove found element from list
list (REMOVE_AT OCCT_ALL_FILE_NAMES ${FILE_INDEX})
math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" ) # decrement number
break()
endif()
endforeach()
if (NOT OCCT_FILE_IN_DIR_STATUS)
message (STATUS "Warning. ${OCCT_FILE_IN_DIR} is not involved into ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES")
string (REGEX MATCH ".+\\.[hlg]xx|.+\\.h$" IS_HEADER_FOUND "${OCCT_FILE_NAME}")
if (IS_HEADER_FOUND)
list (APPEND OCCT_HEADER_FILE_NAMES_NOT_IN_FILES ${OCCT_FILE_NAME})
endif()
endif()
# create new patched file including found header
foreach (OCCT_HEADER_FILE ${PATCHED_OCCT_HEADER_FILES})
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE} NAME)
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
endforeach()
else()
message (WARNING "FILES has not been found in ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}")
endif()
endforeach()
# create new file including found header
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
message (STATUS "Info. \(${CURRENT_TIME}\) Create header-links in inc folder...")
foreach (OCCT_HEADER_FILE ${OCCT_HEADER_FILES_COMPLETE})
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE} NAME)
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
endforeach()
install (FILES ${OCCT_HEADER_FILES_COMPLETE} DESTINATION "${INSTALL_DIR}/inc")
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
message (STATUS "Info. \(${CURRENT_TIME}\) Checking headers in inc folder...")
file (GLOB OCCT_HEADER_FILES_OLD "${ROOT_TARGET_OCCT_DIR}/inc/*")
foreach (OCCT_HEADER_FILE_OLD ${OCCT_HEADER_FILES_OLD})
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE_OLD} NAME)
string (REGEX MATCH "^[a-zA-Z0-9]+" PACKAGE_NAME "${HEADER_FILE_NAME}")
list (FIND OCCT_USED_PACKAGES ${PACKAGE_NAME} IS_HEADER_FOUND)
if (NOT ${IS_HEADER_FOUND} EQUAL -1)
if (NOT EXISTS "${CMAKE_SOURCE_DIR}/src/${PACKAGE_NAME}/${HEADER_FILE_NAME}")
message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is not presented in the sources and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
file (REMOVE "${OCCT_HEADER_FILE_OLD}")
else()
list (FIND OCCT_HEADER_FILE_NAMES_NOT_IN_FILES ${PACKAGE_NAME} IS_HEADER_FOUND)
if (NOT ${IS_HEADER_FOUND} EQUAL -1)
message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is presented in the sources but not involved in FILES and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
file (REMOVE "${OCCT_HEADER_FILE_OLD}")
endif()
endif()
else()
set (IS_HEADER_FOUND -1)
if (NOT "${OCCT_HEADER_FILE_WITH_PROPER_NAMES}" STREQUAL "")
list (FIND OCCT_HEADER_FILE_WITH_PROPER_NAMES ${HEADER_FILE_NAME} IS_HEADER_FOUND)
endif()
if (${IS_HEADER_FOUND} EQUAL -1)
message (STATUS "Warning. \(${PACKAGE_NAME}\) ${OCCT_HEADER_FILE_OLD} is not used and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
file (REMOVE "${OCCT_HEADER_FILE_OLD}")
endif()
endif()
endforeach()
endmacro()
@@ -481,22 +401,3 @@ function (OCCT_VERSION OCCT_VERSION_VAR)
set (${OCCT_VERSION_VAR} "${OCCT_VERSION_LOCALVAR}" PARENT_SCOPE)
endfunction()
macro (CHECK_PATH_FOR_CONSISTENCY THE_ROOT_PATH_NAME THE_BEING_CHECKED_PATH_NAME THE_VAR_TYPE THE_MESSAGE_OF_BEING_CHECKED_PATH)
set (THE_ROOT_PATH "${${THE_ROOT_PATH_NAME}}")
set (THE_BEING_CHECKED_PATH "${${THE_BEING_CHECKED_PATH_NAME}}")
if (THE_BEING_CHECKED_PATH OR EXISTS "${THE_BEING_CHECKED_PATH}")
get_filename_component (THE_ROOT_PATH_ABS "${THE_ROOT_PATH}" ABSOLUTE)
get_filename_component (THE_BEING_CHECKED_PATH_ABS "${THE_BEING_CHECKED_PATH}" ABSOLUTE)
string (REGEX MATCH "${THE_ROOT_PATH_ABS}" DOES_PATH_CONTAIN "${THE_BEING_CHECKED_PATH_ABS}")
if (NOT DOES_PATH_CONTAIN) # if cmake found the being checked path at different place from THE_ROOT_PATH_ABS
set (${THE_BEING_CHECKED_PATH_NAME} "" CACHE ${THE_VAR_TYPE} "${THE_MESSAGE_OF_BEING_CHECKED_PATH}" FORCE)
endif()
else()
set (${THE_BEING_CHECKED_PATH_NAME} "" CACHE ${THE_VAR_TYPE} "${THE_MESSAGE_OF_BEING_CHECKED_PATH}" FORCE)
endif()
endmacro()

View File

@@ -1,204 +1,163 @@
# script for each OCCT toolkit
# parce PACKAGES file
if ("${PROJECT_NAME}" STREQUAL DRAWEXE)
set (USED_PACKAGES DRAWEXE)
else()
FILE_TO_LIST ("src/${PROJECT_NAME}/PACKAGES" USED_PACKAGES)
endif()
set (PRECOMPILED_DEFS)
# Get all used packages from toolkit
foreach (OCCT_PACKAGE ${USED_PACKAGES})
# TKService contains platform-dependent packages: Xw and WNT
if ((WIN32 AND "${OCCT_PACKAGE}" STREQUAL "Xw") OR (NOT WIN32 AND "${OCCT_PACKAGE}" STREQUAL "WNT"))
# do nothing
else()
if (WIN32)
list (APPEND PRECOMPILED_DEFS "-D__${OCCT_PACKAGE}_DLL")
endif()
set (SOURCE_FILES)
set (HEADER_FILES)
# Generate Flex and Bison files
if (${REBUILD_PLATFORM_DEPENDENT_CODE})
# flex files
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
# bison files
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
if (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0)
list (SORT SOURCE_FILES_FLEX)
list (SORT SOURCE_FILES_BISON)
math (EXPR SOURCE_FILES_FLEX_LEN "${SOURCE_FILES_FLEX_LEN} - 1")
foreach (FLEX_FILE_INDEX RANGE ${SOURCE_FILES_FLEX_LEN})
list (GET SOURCE_FILES_FLEX ${FLEX_FILE_INDEX} CURRENT_FLEX_FILE)
get_filename_component (CURRENT_FLEX_FILE_NAME ${CURRENT_FLEX_FILE} NAME_WE)
list (GET SOURCE_FILES_BISON ${FLEX_FILE_INDEX} CURRENT_BISON_FILE)
get_filename_component (CURRENT_BISON_FILE_NAME ${CURRENT_BISON_FILE} NAME_WE)
string (COMPARE EQUAL ${CURRENT_FLEX_FILE_NAME} ${CURRENT_BISON_FILE_NAME} ARE_FILES_EQUAL)
if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.c)
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.c)
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${BISON_OUTPUT_FILE} COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME}")
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${FLEX_OUTPUT_FILE} COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME}")
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE})
endif()
endforeach()
endif()
endif()
# header files
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
if(APPLE)
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
endif()
else()
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
if(APPLE)
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
endif()
endif()
list (APPEND HEADER_FILES ${HEADER_FILES_M} ${HEADER_FILES_LXX} ${SOURCE_FILES_GXX})
list (APPEND SOURCE_FILES ${SOURCE_FILES_C})
if(APPLE)
list (APPEND SOURCE_FILES ${SOURCE_FILES_M})
endif()
foreach(HEADER_FILE ${HEADER_FILES})
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
message (STATUS "Info. consider patched file: ${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
list (APPEND USED_INCFILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
else()
list (APPEND USED_INCFILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
endif()
endforeach()
foreach(SOURCE_FILE ${SOURCE_FILES})
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
message (STATUS "Info. consider patched file: ${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
list (APPEND USED_SRCFILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
else()
list (APPEND USED_SRCFILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
endif()
endforeach()
foreach (OCCT_PACKAGE ${TOOLKIT_MODULES})
if (WIN32)
list (APPEND PRECOMPILED_DEFS "-D__${OCCT_PACKAGE}_DLL")
endif()
# ${OCCT_SOURCE_DIR}/src/${OCCT_PACKAGE}
set (SOURCE_FILES)
set (HEADER_FILES)
# Generate Flex and Bison files
if (${REBUILD_PLATFORM_DEPENDENT_CODE})
# flex files
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
list (SORT SOURCE_FILES_FLEX)
# bison files
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
list (SORT SOURCE_FILES_BISON)
if (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0)
math (EXPR SOURCE_FILES_FLEX_LEN "${SOURCE_FILES_FLEX_LEN} - 1")
foreach (FLEX_FILE_INDEX RANGE ${SOURCE_FILES_FLEX_LEN})
list (GET SOURCE_FILES_FLEX ${FLEX_FILE_INDEX} CURRENT_FLEX_FILE)
get_filename_component (CURRENT_FLEX_FILE_NAME ${CURRENT_FLEX_FILE} NAME_WE)
list (GET SOURCE_FILES_BISON ${FLEX_FILE_INDEX} CURRENT_BISON_FILE)
get_filename_component (CURRENT_BISON_FILE_NAME ${CURRENT_BISON_FILE} NAME_WE)
string (COMPARE EQUAL ${CURRENT_FLEX_FILE_NAME} ${CURRENT_BISON_FILE_NAME} ARE_FILES_EQUAL)
if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.c)
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.c)
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} ${CMP_DIR}/${BISON_OUTPUT_FILE} COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME}")
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} ${CMP_DIR}/${FLEX_OUTPUT_FILE} COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME}")
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE})
endif()
endforeach()
endif()
endif()
# header files
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
if(APPLE)
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
endif()
else()
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
if(APPLE)
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
endif()
endif()
list (APPEND HEADER_FILES ${HEADER_FILES_M} ${HEADER_FILES_LXX} ${SOURCE_FILES_GXX})
list (APPEND SOURCE_FILES ${SOURCE_FILES_C})
if(APPLE)
list (APPEND SOURCE_FILES ${SOURCE_FILES_M})
endif()
foreach(HEADER_FILE ${HEADER_FILES})
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
message (STATUS "Info. consider patched file: ${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
list (APPEND USED_INCFILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
else()
list (APPEND USED_INCFILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
endif()
endforeach()
foreach(SOURCE_FILE ${SOURCE_FILES})
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
message (STATUS "Info. consider patched file: ${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
list (APPEND USED_SRCFILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
else()
list (APPEND USED_SRCFILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
endif()
endforeach()
endforeach()
string (REGEX REPLACE ";" " " PRECOMPILED_DEFS "${PRECOMPILED_DEFS}")
if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
# Get from toolkits EXTERNLIB all used libs
OCCT_TOOLKIT_DEP (${PROJECT_NAME} ${PROJECT_NAME}_DEPS)
foreach (PROJECT_DEP ${${PROJECT_NAME}_DEPS})
IS_OCCT_TOOLKIT (${PROJECT_DEP} OCCT_MODULES FOUND_TOOLKIT)
if ("${FOUND_TOOLKIT}" STREQUAL "ON")
list (APPEND USED_LIBS "${PROJECT_DEP}")
endif()
endforeach()
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
else()
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
# Create project for toolkit
list (FIND BUILD_TOOLKITS ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
if ("${BUILD_TOOLKITS}" STREQUAL "" OR NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS Release
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin"
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS RelWithDebInfo
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini"
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS Debug
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind"
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
if (MSVC)
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind/${PROJECT_NAME}.pdb
foreach (OCCT_MODULE ${OCCT_MODULES})
list (FIND ${OCCT_MODULE}_TOOLKITS ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
if (NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
set (CURRENT_MODULE ${OCCT_MODULE})
endif()
endforeach()
if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
endif()
endif()
set (CURRENT_MODULE)
foreach (OCCT_MODULE ${OCCT_MODULES})
list (FIND ${OCCT_MODULE}_TOOLKITS ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
if (NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
set (CURRENT_MODULE ${OCCT_MODULE})
endif()
endforeach()
if (CURRENT_MODULE)
set_property (TARGET ${PROJECT_NAME} PROPERTY FOLDER "Modules/${CURRENT_MODULE}")
endif()
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
# parce EXTERNLIB file
FILE_TO_LIST ("src/${PROJECT_NAME}/EXTERNLIB" USED_EXTERNLIB_AND_TOOLKITS)
foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
string (REGEX MATCH "^TK" TK_FOUND ${USED_ITEM})
if (NOT "${TK_FOUND}" STREQUAL "")
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
else()
string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM})
if ("${CSF_FOUND}" STREQUAL "")
message (STATUS "Info: ${USED_ITEM} from ${PROJECT_NAME} skipped due to it is empty")
else() # get CSF_ value
set (CURRENT_CSF ${${USED_ITEM}})
if (NOT "${CURRENT_CSF}" STREQUAL "")
# prepare a list from a string with whitespaces
separate_arguments (CURRENT_CSF)
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
endif()
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS Release
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin"
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS RelWithDebInfo
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini"
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS Debug
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind"
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
if (MSVC)
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind/${PROJECT_NAME}.pdb
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
endif()
endif()
endforeach()
if (APPLE)
list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
if (NOT ${IS_X11_FOUND} EQUAL -1)
find_package (X11 COMPONENTS X11 Xext Xmu Xi)
if (NOT X11_FOUND)
message (STATUS "Warning. X11 is not found. It's required to install The XQuartz project: http://www.xquartz.org")
endif()
endif()
endif()
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
set_property (TARGET ${PROJECT_NAME} PROPERTY FOLDER "Modules/${CURRENT_MODULE}")
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
target_link_libraries (${PROJECT_NAME} ${USED_LIBS})
endif()

View File

@@ -9,6 +9,55 @@ if (NOT DEFINED 3RDPARTY_TBB_DIR)
set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing tbb")
endif()
# tbb include directory
if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR)
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the tbb")
endif()
# tbb library file (with absolute path)
if (NOT DEFINED 3RDPARTY_TBB_LIBRARY OR NOT 3RDPARTY_TBB_LIBRARY_DIR)
set (3RDPARTY_TBB_LIBRARY "" CACHE FILEPATH "tbb library" FORCE)
endif()
# tbb library directory
if (NOT DEFINED 3RDPARTY_TBB_LIBRARY_DIR)
set (3RDPARTY_TBB_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tbb library")
endif()
# tbb malloc library file (with absolute path)
if (NOT DEFINED 3RDPARTY_TBBMALLOC_LIBRARY OR NOT 3RDPARTY_TBBMALLOC_LIBRARY_DIR)
set (3RDPARTY_TBBMALLOC_LIBRARY "" CACHE FILEPATH "tbb malloc library" FORCE)
endif()
# tbb malloc library directory
if (NOT DEFINED 3RDPARTY_TBBMALLOC_LIBRARY_DIR)
set (3RDPARTY_TBBMALLOC_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tbb malloc library")
endif()
# tbb shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TBB_DLL OR NOT 3RDPARTY_TBB_DLL_DIR)
set (3RDPARTY_TBB_DLL "" CACHE FILEPATH "tbb shared library" FORCE)
endif()
endif()
# tbb shared library directory
if (WIN32 AND NOT DEFINED 3RDPARTY_TBB_DLL_DIR)
set (3RDPARTY_TBB_DLL_DIR "" CACHE FILEPATH "The directory containing tbb shared library")
endif()
# tbb malloc shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TBBMALLOC_DLL OR NOT 3RDPARTY_TBBMALLOC_DLL_DIR)
set (3RDPARTY_TBBMALLOC_DLL "" CACHE FILEPATH "tbb malloc shared library" FORCE)
endif()
endif()
# tbb malloc shared library directory
if (WIN32 AND NOT DEFINED 3RDPARTY_TBBMALLOC_DLL_DIR)
set (3RDPARTY_TBBMALLOC_DLL_DIR "" CACHE FILEPATH "The directory containing tbb malloc shared library")
endif()
if (MSVC)
add_definitions (-D__TBB_NO_IMPLICIT_LINKAGE)
add_definitions (-D__TBBMALLOC_NO_IMPLICIT_LINKAGE)
@@ -17,260 +66,184 @@ endif()
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify TBB folder in connectin with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_TBB_DIR PATH "The directory containing tbb")
# search for product directory inside 3RDPARTY_DIR directory
if (NOT 3RDPARTY_TBB_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" "TBB" TBB_DIR_NAME)
if (TBB_DIR_NAME)
message (STATUS "Info: TBB: ${TBB_DIR_NAME} folder is used")
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
endif()
endif()
if (NOT 3RDPARTY_TBB_DIR OR NOT EXISTS "${3RDPARTY_TBB_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" TBB TBB_DIR_NAME)
if (TBB_DIR_NAME)
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
OCCT_MAKE_COMPILER_BITNESS()
if (${COMPILER_BITNESS} STREQUAL 32)
set (TBB_ARCH_NAME ia32)
else()
set (TBB_ARCH_NAME intel64)
endif()
# search for include directory in defined 3rdparty directory
if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
set (3RDPARTY_TBB_INCLUDE_DIR "3RDPARTY_TBB_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "The directory containing the headers of tbb" FORCE)
find_path (3RDPARTY_TBB_INCLUDE_DIR tbb/tbb.h PATHS "${3RDPARTY_TBB_DIR}/include" NO_DEFAULT_PATH)
find_path (3RDPARTY_TBB_INCLUDE_DIR tbb/tbb.h PATHS "${3RDPARTY_TBB_DIR}/include")
endif()
if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE FILEPATH "The directory containing the headers of tbb" FORCE)
endif()
OCCT_MAKE_COMPILER_SHORT_NAME()
# TBB_COMPILER_FOLER
#if (WIN32)
set (TBB_COMPILER_FOLER ${COMPILER})
#else()
# set (TBB_COMPILER_FOLER ${COMPILER})
#endif()
# search for tbb and tbb malloc library in defined 3rdparty directory
foreach (LIBRARY_NAME TBB TBBMALLOC)
if (NOT WIN32)
file (GLOB TBB_SUBDIRS RELATIVE ${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/ ${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/*)
list (SORT TBB_SUBDIRS)
list (REVERSE TBB_SUBDIRS)
list (LENGTH TBB_SUBDIRS TBB_SUBDIRS_LENGTH)
set (TBB_SUBDIR_FIRST "")
if (${TBB_SUBDIRS_LENGTH})
list (GET TBB_SUBDIRS 0 TBB_SUBDIR_FIRST)
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${TBB_SUBDIR_FIRST}")
endif()
endif()
else()
#set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing TBB" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR)
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB")
endif()
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
# check 3RDPARTY_TBB_INCLUDE_DIR for consictency with specified 3RDPARTY_TBB_DIR
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_TBB_INCLUDE_DIR PATH "The directory containing headers of the TBB")
endif()
# tbb.h
if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
set (HEADER_NAMES tbb.h tbb/tbb.h)
# set 3RDPARTY_TBB_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_TBB_INCLUDE_DIR
set (3RDPARTY_TBB_INCLUDE_DIR "3RDPARTY_TBB_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to tbb.h" FORCE)
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
find_path (3RDPARTY_TBB_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_TBB_DIR}
PATH_SUFFIXES include
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_TBB_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATH_SUFFIXES include
CMAKE_FIND_ROOT_PATH_BOTH)
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR)
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "${LIBRARY_NAME} library" FORCE)
elseif (3RDPARTY_${LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
get_filename_component(3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR_TMP "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}" PATH)
if (NOT "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}" STREQUAL "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR_TMP}")
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "${LIBRARY_NAME} library" FORCE)
endif()
endif()
endif()
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "3RDPARTY_${LIBRARY_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "Path to library of ${LIBRARY_NAME}" FORCE)
string (TOLOWER "${LIBRARY_NAME}" lower_LIBRARY_NAME)
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${lower_LIBRARY_NAME} PATHS
"${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}"
"${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
NO_DEFAULT_PATH)
# second search if previous one do not find anything
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${LIBRARY_NAME})
endif()
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}")
get_filename_component(3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}" PATH)
endif()
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBRARY_NAME} library" FORCE)
# search for dll in defined 3rdparty directory (just for win case)
if (WIN32)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL_DIR)
set (3RDPARTY_${LIBRARY_NAME}_DLL "" CACHE FILEPATH "${LIBRARY_NAME} shared library" FORCE)
elseif (3RDPARTY_${LIBRARY_NAME}_DLL AND EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
get_filename_component(3RDPARTY_${LIBRARY_NAME}_DLL_DIR_TMP "${3RDPARTY_${LIBRARY_NAME}_DLL}" PATH)
if (NOT "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}" STREQUAL "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR_TMP}")
set (3RDPARTY_${LIBRARY_NAME}_DLL "" CACHE FILEPATH "${LIBRARY_NAME} shared library" FORCE)
endif()
endif()
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
set (3RDPARTY_${LIBRARY_NAME}_DLL "3RDPARTY_${LIBRARY_NAME}_DLL-NOTFOUND" CACHE FILEPATH "Path to shared library of ${LIBRARY_NAME}" FORCE)
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME} PATHS
"${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}"
"${3RDPARTY_TBB_DIR}/bin/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
NO_DEFAULT_PATH)
# second search if previous one do not find anything
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME})
endif()
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL_DIR OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}")
get_filename_component(3RDPARTY_${LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${LIBRARY_NAME}_DLL}" PATH)
set (3RDPARTY_${LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${LIBRARY_NAME} shared library" FORCE)
endif()
endif() # end dll search
endforeach() # end tbb / tbbmalloc
# include found paths to common variables
if (3RDPARTY_TBB_INCLUDE_DIR AND EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TBB_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "the path to tbb.h" FORCE)
endif()
# common steps for tbb and tbbmalloc
macro (TBB_PRODUCT_SEARCH PRODUCT_NAME)
string (TOLOWER ${PRODUCT_NAME} lower_PRODUCT_NAME)
# define required tbb/tbbmalloc variables
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} library")
foreach (LIBRARY_NAME TBB TBBMALLOC)
if (3RDPARTY_${LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR)
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT 3RDPARTY_${PRODUCT_NAME}_DLL_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
endif()
endif()
if (WIN32 AND NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library")
endif()
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_TBB_DIR
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY FILEPATH "the path to ${PRODUCT_NAME} library")
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
if (3RDPARTY_${LIBRARY_NAME}_DLL OR EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}")
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR PATH "The directory containing ${PRODUCT_NAME} library")
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${PRODUCT_NAME}_DLL FILEPATH "the path to ${PRODUCT_NAME} shared library")
if (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_DIR PATH "The directory containing ${PRODUCT_NAME} shared library")
endif()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBRARY_NAME}_DLL_DIR)
endif()
endif()
endforeach()
OCCT_MAKE_COMPILER_SHORT_NAME()
OCCT_MAKE_COMPILER_BITNESS()
if (${COMPILER_BITNESS} EQUAL 32)
set (${PRODUCT_NAME}_ARCH_NAME ia32)
else()
set (${PRODUCT_NAME}_ARCH_NAME intel64)
endif()
# tbb/tbbmalloc library
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
set (PRODUCT_PATH_SUFFIXES lib ${lower_PRODUCT_NAME})
# set 3RDPARTY_${PRODUCT_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_LIBRARY
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} library" FORCE)
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
if (NOT EXISTS "${3RDPARTY_TBB_DIR}/lib/${${PRODUCT_NAME}_ARCH_NAME}/${COMPILER}")
if (EXISTS "${3RDPARTY_TBB_DIR}/lib/${${PRODUCT_NAME}_ARCH_NAME}")
file (GLOB ${PRODUCT_NAME}_COMPILER_LIST "${3RDPARTY_TBB_DIR}/lib/${${PRODUCT_NAME}_ARCH_NAME}/*")
if (${PRODUCT_NAME}_COMPILER_LIST)
list (GET ${PRODUCT_NAME}_COMPILER_LIST -1 THE_MOST_FRESH_COMPILER_VERSION)
if (THE_MOST_FRESH_COMPILER_VERSION)
get_filename_component (THE_MOST_FRESH_COMPILER_VERSION_NAME "${THE_MOST_FRESH_COMPILER_VERSION}" NAME)
set (PRODUCT_PATH_SUFFIXES lib ${lower_PRODUCT_NAME} lib/${${PRODUCT_NAME}_ARCH_NAME}/${THE_MOST_FRESH_COMPILER_VERSION_NAME})
endif()
endif()
endif()
else()
set (PRODUCT_PATH_SUFFIXES lib ${lower_PRODUCT_NAME} lib/${${PRODUCT_NAME}_ARCH_NAME}/${COMPILER})
endif()
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${lower_PRODUCT_NAME}
PATHS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" "${3RDPARTY_TBB_DIR}"
PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${lower_PRODUCT_NAME}
PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
else()
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
endif()
endif()
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "The path to ${PRODUCT_NAME} library" FORCE)
endif()
# tbb/tbbmalloc shared library
if (WIN32)
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
set (PRODUCT_PATH_SUFFIXES bin)
# set 3RDPARTY_${PRODUCT_NAME}_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_DLL
set (3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
if (NOT EXISTS "${3RDPARTY_TBB_DIR}/bin/${${PRODUCT_NAME}_ARCH_NAME}/${COMPILER}")
if (EXISTS "${3RDPARTY_TBB_DIR}/bin/${${PRODUCT_NAME}_ARCH_NAME}")
file (GLOB ${PRODUCT_NAME}_COMPILER_LIST "${3RDPARTY_TBB_DIR}/bin/${${PRODUCT_NAME}_ARCH_NAME}/*")
if (${PRODUCT_NAME}_COMPILER_LIST)
list (GET ${PRODUCT_NAME}_COMPILER_LIST -1 THE_MOST_FRESH_COMPILER_VERSION)
if (THE_MOST_FRESH_COMPILER_VERSION)
get_filename_component (THE_MOST_FRESH_COMPILER_VERSION_NAME "${THE_MOST_FRESH_COMPILER_VERSION}" NAME)
set (PRODUCT_PATH_SUFFIXES bin bin/${${PRODUCT_NAME}_ARCH_NAME}/${THE_MOST_FRESH_COMPILER_VERSION_NAME})
endif()
endif()
endif()
else()
set (PRODUCT_PATH_SUFFIXES bin bin/${${PRODUCT_NAME}_ARCH_NAME}/${COMPILER})
endif()
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
find_library (3RDPARTY_${PRODUCT_NAME}_DLL ${lower_PRODUCT_NAME}
PATHS "${3RDPARTY_TBB_DIR}"
PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES}
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_${PRODUCT_NAME}_DLL ${lower_PRODUCT_NAME} PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES})
endif()
if (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
else()
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
endif()
endif()
endif()
if (3RDPARTY_${PRODUCT_NAME}_DLL_DIR OR EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
endif()
endif()
# install tbb/tbbmalloc
if (INSTALL_${PRODUCT_NAME})
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
else()
get_filename_component (PRODUCT_LIBRARY_NAME ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${PRODUCT_LIBRARY_NAME}.2)
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${PRODUCT_LIBRARY_NAME}.2)
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${PRODUCT_LIBRARY_NAME}.2)
endif()
endif()
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY 3RDPARTY_${PRODUCT_NAME}_DLL)
endmacro()
TBB_PRODUCT_SEARCH (TBB)
TBB_PRODUCT_SEARCH (TBBMALLOC)
# install tbb
if (INSTALL_TBB)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
else()
get_filename_component(TBBLIB ${3RDPARTY_TBB_LIBRARY} NAME)
get_filename_component(TBBMALLOCLIB ${3RDPARTY_TBBMALLOC_LIBRARY} NAME)
install (FILES ${3RDPARTY_TBB_LIBRARY}.2
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${TBBLIB}.2)
install (FILES ${3RDPARTY_TBB_LIBRARY}.2
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${TBBLIB}.2)
install (FILES ${3RDPARTY_TBB_LIBRARY}.2
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${TBBLIB}.2)
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${TBBMALLOCLIB}.2)
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${TBBMALLOCLIB}.2)
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${TBBMALLOCLIB}.2)
endif()
set (USED_3RDPARTY_TBB_DIR "")
else()
# the library directory for using by the executable
@@ -280,3 +253,5 @@ else()
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR})
endif()
endif()
mark_as_advanced (3RDPARTY_TBB_LIBRARY 3RDPARTY_TBBMALLOC_LIBRARY 3RDPARTY_TBB_DLL 3RDPARTY_TBBMALLOC_DLL)

View File

@@ -77,7 +77,7 @@ endif()
if (WIN32)
if (NOT 3RDPARTY_TCL_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TCL_DLL_DIR)
@@ -142,7 +142,7 @@ endif()
if (WIN32)
if (NOT 3RDPARTY_TCL_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TCL_DLL_DIR)
@@ -247,15 +247,10 @@ endif()
mark_as_advanced (3RDPARTY_TCL_LIBRARY 3RDPARTY_TCL_DLL)
if (TK_FOUND AND 3RDPARTY_TCL_DIR)
get_filename_component (TK_WISH_ABSOLUTE "${TK_WISH}" ABSOLUTE)
get_filename_component (3RDPARTY_TCL_DIR_ABSOLUTE "${3RDPARTY_TCL_DIR}" ABSOLUTE)
string (FIND "${TK_WISH_ABSOLUTE}" "${3RDPARTY_TCL_DIR_ABSOLUTE}" THE_SAME_FOLDER)
if (${THE_SAME_FOLDER} EQUAL 0)
get_filename_component (3RDPARTY_TK_WISH_DIR "${TK_WISH}" PATH)
get_filename_component (3RDPARTY_TK_WISH_DIR_PARENT "${3RDPARTY_TK_WISH_DIR}" PATH)
if ("${3RDPARTY_TK_WISH_DIR_PARENT}" STREQUAL "${3RDPARTY_TCL_DIR}")
set (3RDPARTY_TCLTK_DIR "${3RDPARTY_TCL_DIR}")
message (STATUS "Info. TK is used from TCL folder: ${3RDPARTY_TCLTK_DIR}")
endif()
endif()

View File

@@ -24,8 +24,8 @@ These include messages on internal errors and special cases encountered, timing
# install variables
set (INSTALL_DIR_DESCR
"The place where built OCCT libraries, headers, test cases (INSTALL_TEST_CASES variable),
samples (INSTALL_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_GL2PS, INSTALL_TBB and
"The place where built OCCT libraries, headers, test cases (INSTALL_OCCT_TEST_CASES variable),
samples (INSTALL_OCCT_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_GL2PS, INSTALL_TBB and
other similar variables) will be placed during the installation process (building INSTALL project)")
macro (INSTALL_MESSAGE INSTALL_TARGET_VARIABLE INSTALL_TARGET_STRING)
@@ -34,8 +34,8 @@ set (${INSTALL_TARGET_VARIABLE}_DESCR
project) into the installation directory (INSTALL_DIR variable)")
endmacro()
INSTALL_MESSAGE (INSTALL_SAMPLES "OCCT samples")
INSTALL_MESSAGE (INSTALL_TEST_CASES "non-regression OCCT test scripts")
INSTALL_MESSAGE (INSTALL_OCCT_SAMPLES "OCCT samples")
INSTALL_MESSAGE (INSTALL_OCCT_TEST_CASES "non-regression OCCT test scripts")
INSTALL_MESSAGE (INSTALL_DOC_OcctOverview "OCCT overview documentation (HTML format)")
INSTALL_MESSAGE (INSTALL_FREEIMAGE "FreeImage binaries")
INSTALL_MESSAGE (INSTALL_FREEIMAGEPLUS "FreeImagePlus binaries")
@@ -44,7 +44,7 @@ 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,207 +1,183 @@
# 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)
set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing VTK")
endif()
set (3RDPARTY_VTK_REQUIRED_LIBRARIES vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkCommonMath
vtkCommonTransforms
vtkRenderingCore
vtkRenderingFreeType
vtkRenderingFreeTypeOpenGL
vtkRenderingOpenGL
vtkFiltersGeneral
vtkIOCore
vtkIOImage
vtkImagingCore
vtkInteractionStyle)
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify VTK folder in connectin with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_VTK_DIR PATH "The directory containing VTK")
if (NOT 3RDPARTY_VTK_DIR OR NOT EXISTS "${3RDPARTY_VTK_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" VTK VTK_DIR_NAME)
if (VTK_DIR_NAME)
set (3RDPARTY_VTK_DIR "${3RDPARTY_DIR}/${VTK_DIR_NAME}" CACHE PATH "The directory containing VTK" FORCE)
endif()
endif()
else()
#set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing VTK" FORCE)
set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing vtk")
endif()
# vtk include directory
if (NOT DEFINED 3RDPARTY_VTK_INCLUDE_DIR)
set (3RDPARTY_VTK_INCLUDE_DIR "" CACHE PATH "The directory containing headers of VTK")
set (3RDPARTY_VTK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of vtk")
endif()
# vtk library directory
if (NOT DEFINED 3RDPARTY_VTK_LIBRARY_DIR)
set (3RDPARTY_VTK_LIBRARY_DIR "" CACHE PATH "The directory containing VTK libraries")
set (3RDPARTY_VTK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing vtk library")
endif()
# vtk dll directory
if (WIN32 AND NOT DEFINED 3RDPARTY_VTK_DLL_DIR)
set (3RDPARTY_VTK_DLL_DIR "" CACHE PATH "The directory containing VTK shared libraries")
set (3RDPARTY_VTK_DLL_DIR "" CACHE FILEPATH "The directory containing VTK dll")
endif()
# check 3RDPARTY_VTK_ paths for consistency with specified 3RDPARTY_VTK_DIR
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_INCLUDE_DIR PATH "The directory containing headers of VTK")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_LIBRARY_DIR PATH "The directory containing VTK libraries")
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_DLL_DIR PATH "The directory containing VTK shared library")
# search for vtk in user defined directory
if (NOT 3RDPARTY_VTK_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" vtk VTK_DIR_NAME)
if (VTK_DIR_NAME)
set (3RDPARTY_VTK_DIR "${3RDPARTY_DIR}/${VTK_DIR_NAME}" CACHE PATH "The directory containing vtk product" FORCE)
endif()
endif()
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
set (CACHED_VTK_DIR $ENV{VTK_DIR})
set (ENV{VTK_DIR} "${3RDPARTY_VTK_DIR}")
endif()
# find installed vtk
find_package(VTK QUIET)
# find native vtk
if (NOT VTK_FOUND)
find_package(VTK QUIET PATHS "${3RDPARTY_VTK_DIR}")
endif()
if (NOT VTK_FOUND AND NOT 3RDPARTY_VTK_DIR OR NOT EXISTS "${3RDPARTY_VTK_DIR}")
message(SEND_ERROR "VTK not found. Set the 3RDPARTY_VTK_DIR cmake cache entry to the directory containing VTK.")
set (3RDPARTY_VTK_DIR "3RDPARTY_VTK_DIR-NOTFOUND" CACHE PATH "The directory containing vtk product" FORCE)
endif()
set(VTK_VERSION "")
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
set (ENV{VTK_DIR} ${CACHED_VTK_DIR})
endif()
if (VTK_FOUND)
# add compiler flags, preprocessor definitions, include and link dirs
include (${VTK_USE_FILE})
set (ALL_REQUIRED_VTK_LIBRARIES_FOUND ON)
if (VTK_LIBRARIES)
set (3RDPARTY_VTK_INCLUDE_DIRS)
set (3RDPARTY_VTK_LIBRARY_DIRS)
set (3RDPARTY_VTK_DLL_DIRS)
foreach (VTK_REQUIRED_LIBRARY ${3RDPARTY_VTK_REQUIRED_LIBRARIES})
list (FIND VTK_LIBRARIES ${VTK_REQUIRED_LIBRARY} FOUND_INDEX)
if (${FOUND_INDEX} EQUAL -1)
message (WARNING "VTK: required ${VTK_REQUIRED_LIBRARY} library is not found")
set (ALL_REQUIRED_VTK_LIBRARIES_FOUND OFF)
else()
# get paths from corresponding variables
if (${VTK_REQUIRED_LIBRARY}_INCLUDE_DIRS AND EXISTS "${${VTK_REQUIRED_LIBRARY}_INCLUDE_DIRS}")
list (APPEND 3RDPARTY_VTK_INCLUDE_DIRS "${${VTK_REQUIRED_LIBRARY}_INCLUDE_DIRS}")
endif()
if (${VTK_REQUIRED_LIBRARY}_LIBRARY_DIRS AND EXISTS "${${VTK_REQUIRED_LIBRARY}_LIBRARY_DIRS}")
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_REQUIRED_LIBRARY}_LIBRARY_DIRS}")
endif()
if (${VTK_REQUIRED_LIBRARY}_RUNTIME_LIBRARY_DIRS AND EXISTS "${${VTK_REQUIRED_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${${VTK_REQUIRED_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
if (NOT WIN32)
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_REQUIRED_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
endif()
endif()
# get paths from corresponding properties
get_property (TARGET_VTK_IMPORT_CONFS TARGET ${VTK_REQUIRED_LIBRARY} PROPERTY IMPORTED_CONFIGURATIONS)
if (TARGET_VTK_IMPORT_CONFS)
list (GET TARGET_VTK_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
# todo: choose configuration in connection with the build type
#if (CMAKE_BUILD_TYPE)
# foreach (IMPORT_CONF ${TARGET_VTK_IMPORT_CONFS})
# endforeach()
#endif()
get_property (TARGET_PROPERTY_IMP_PATH TARGET ${VTK_REQUIRED_LIBRARY} PROPERTY IMPORTED_IMPLIB_${CHOSEN_IMPORT_CONF})
if(TARGET_PROPERTY_IMP_PATH AND EXISTS "${TARGET_PROPERTY_IMP_PATH}")
get_filename_component (TARGET_PROPERTY_IMP_DIR "${TARGET_PROPERTY_IMP_PATH}" PATH)
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${TARGET_PROPERTY_IMP_DIR}")
endif()
get_property (TARGET_PROPERTY_LOCATION_PATH TARGET ${VTK_REQUIRED_LIBRARY} PROPERTY IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF})
if(TARGET_PROPERTY_LOCATION_PATH AND EXISTS "${TARGET_PROPERTY_LOCATION_PATH}")
get_filename_component (TARGET_PROPERTY_LOCATION_DIR "${TARGET_PROPERTY_LOCATION_PATH}" PATH)
if (WIN32)
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${TARGET_PROPERTY_LOCATION_DIR}")
else()
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${TARGET_PROPERTY_LOCATION_DIR}")
endif()
endif()
endif()
endif()
endforeach()
else()
set (ALL_REQUIRED_VTK_LIBRARIES_FOUND OFF)
get_filename_component(3RDPARTY_VTK_DIR_NAME "${3RDPARTY_VTK_DIR}" NAME)
string(REGEX MATCH "^VTK-([0-9].[0-9])" VTK_VERSION "${3RDPARTY_VTK_DIR_NAME}")
set(VTK_VERSION "${CMAKE_MATCH_1}")
if (NOT 3RDPARTY_VTK_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_DIR}/include/vtk-${VTK_VERSION}" CACHE FILEPATH "The directory containing includes of VTK" FORCE)
endif()
if (ALL_REQUIRED_VTK_LIBRARIES_FOUND)
if (3RDPARTY_VTK_INCLUDE_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_VTK_INCLUDE_DIRS)
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIRS})
list (GET 3RDPARTY_VTK_INCLUDE_DIRS 0 3RDPARTY_VTK_INCLUDE_DIR)
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_INCLUDE_DIR}" CACHE PATH "The directory containing headers of VTK" FORCE)
endif()
if (3RDPARTY_VTK_LIBRARY_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_VTK_LIBRARY_DIRS)
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIRS})
list (GET 3RDPARTY_VTK_LIBRARY_DIRS 0 3RDPARTY_VTK_LIBRARY_DIR)
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_LIBRARY_DIR}" CACHE PATH "The directory containing VTK libraries" FORCE)
endif()
if (WIN32)
if (3RDPARTY_VTK_DLL_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_VTK_DLL_DIRS)
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIRS})
list (GET 3RDPARTY_VTK_DLL_DIRS 0 3RDPARTY_VTK_DLL_DIR)
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DLL_DIR}" CACHE PATH "The directory containing VTK shared libraries" FORCE)
endif()
if (NOT 3RDPARTY_VTK_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
if(EXISTS "${3RDPARTY_VTK_DIR}/lib")
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
elseif (EXISTS "${3RDPARTY_VTK_DIR}/lib")
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
endif()
endif()
if(3RDPARTY_VTK_LIBRARY_DIR)
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_VTK_LIBRARY_DIR}")
endif()
endif()
# vtk libraries
# lib
set (VTK_LIBRARY_NAMES vtkCommonCore-${VTK_VERSION}.lib vtkCommonDataModel-${VTK_VERSION}.lib vtkCommonExecutionModel-${VTK_VERSION}.lib
vtkCommonMath-${VTK_VERSION}.lib vtkCommonTransforms-${VTK_VERSION}.lib vtkRenderingCore-${VTK_VERSION}.lib
vtkRenderingOpenGL-${VTK_VERSION}.lib vtkFiltersGeneral-${VTK_VERSION}.lib vtkIOCore-${VTK_VERSION}.lib
vtkIOImage-${VTK_VERSION}.lib vtkImagingCore-${VTK_VERSION}.lib vtkInteractionStyle-${VTK_VERSION}.lib )
#dll
set (VTK_DLL_NAMES vtkCommonComputationalGeometry-${VTK_VERSION}.dll
vtkCommonCore-${VTK_VERSION}.dll
vtkCommonDataModel-${VTK_VERSION}.dll
vtkCommonExecutionModel-${VTK_VERSION}.dll
vtkCommonMath-${VTK_VERSION}.dll
vtkCommonMisc-${VTK_VERSION}.dll
vtkCommonSystem-${VTK_VERSION}.dll
vtkCommonTransforms-${VTK_VERSION}.dll
vtkDICOMParser-${VTK_VERSION}.dll
vtkFiltersCore-${VTK_VERSION}.dll
vtkFiltersExtraction-${VTK_VERSION}.dll
vtkFiltersGeneral-${VTK_VERSION}.dll
vtkFiltersGeometry-${VTK_VERSION}.dll
vtkFiltersSources-${VTK_VERSION}.dll
vtkFiltersStatistics-${VTK_VERSION}.dll
vtkIOCore-${VTK_VERSION}.dll
vtkIOImage-${VTK_VERSION}.dll
vtkImagingCore-${VTK_VERSION}.dll
vtkImagingFourier-${VTK_VERSION}.dll
vtkImagingHybrid-${VTK_VERSION}.dll
vtkInteractionStyle-${VTK_VERSION}.dll
vtkRenderingCore-${VTK_VERSION}.dll
vtkRenderingOpenGL-${VTK_VERSION}.dll
vtkalglib-${VTK_VERSION}.dll
vtkjpeg-${VTK_VERSION}.dll
vtkmetaio-${VTK_VERSION}.dll
vtkpng-${VTK_VERSION}.dll
vtksys-${VTK_VERSION}.dll
vtktiff-${VTK_VERSION}.dll
vtkzlib-${VTK_VERSION}.dll )
# search for dll directory
if (WIN32)
if (NOT 3RDPARTY_VTK_DLL_DIR OR NOT EXISTS "${3RDPARTY_VTK_DLL_DIR}")
if(EXISTS "${3RDPARTY_VTK_DIR}/bin")
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bin" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
elseif (EXISTS "${3RDPARTY_VTK_DIR}/bind")
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bind" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
endif()
endif()
if (3RDPARTY_VTK_DLL_DIR OR EXISTS "${3RDPARTY_VTK_DLL_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_VTK_DLL_DIR}")
endif()
endif()
OCCT_CHECK_AND_UNSET(VTK_DIR)
if (3RDPARTY_VTK_INCLUDE_DIR AND EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIR})
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_VTK_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_INCLUDE_DIR)
endif()
if (3RDPARTY_VTK_LIBRARY_DIR AND EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIR})
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_LIBRARY_DIR)
endif()
if (INSTALL_VTK)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
if(3RDPARTY_VTK_DLL_DIR AND EXISTS "${3RDPARTY_VTK_DLL_DIR}")
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
foreach(VTK_DLL_NAME ${VTK_DLL_NAMES})
set (3RDPARTY_VTK_DLL "3RDPARTY_VTK_DLL-NOTFOUND" CACHE FILEPATH "VTK shared library" FORCE)
find_library(3RDPARTY_VTK_DLL "${VTK_DLL_NAME}" PATHS "${3RDPARTY_VTK_DLL_DIR}" NO_DEFAULT_PATH)
if (NOT 3RDPARTY_VTK_DLL OR NOT EXISTS "${3RDPARTY_VTK_DLL}")
list (APPEND 3RDPARTY_NOT_INCLUDED "${3RDPARTY_VTK_DLL}")
else()
install (FILES ${3RDPARTY_VTK_DLL}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (FILES ${3RDPARTY_VTK_DLL}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (FILES ${3RDPARTY_VTK_DLL}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
endif()
endforeach()
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_DLL)
endif()
else ()
foreach(VTK_DLL_NAME ${VTK_DLL_NAMES})
string(REPLACE ".dll" ".so.1" VTK_DLL_NAME "${VTK_DLL_NAME}")
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME "lib${VTK_DLL_NAME}")
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME "lib${VTK_DLL_NAME}")
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME "lib${VTK_DLL_NAME}")
endforeach()
endif()
if (WIN32)
if (3RDPARTY_VTK_DLL_DIR OR EXISTS "${3RDPARTY_VTK_DLL_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIR})
set (USED_3RDPARTY_VTK_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_DLL_DIR})
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_DLL_DIR)
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_LIBRARY_DIR})
endif()
endif()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_DLL_DIR})
else()
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_LIBRARY_DIR})
endif()
mark_as_advanced (VTK_INCLUDE_DIRS VTK_LIBRARY_DIRS VTK_DIR)

View File

@@ -731,7 +731,7 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
puts $doxyFile "DOTFILE_DIRS = $outDir/html"
puts $doxyFile "DOT_PATH = $graphvizPath"
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetSourceDir $productsPath]"
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetIncDir $productsPath]"
# list of files to generate
set mainpage [OCCDoc_MakeMainPage $outDir $outDir/$name.dox $modules $productsPath]

View File

@@ -22,6 +22,7 @@ set "HAVE_TBB=false"
set "HAVE_OPENCL=false"
set "HAVE_FREEIMAGE=false"
set "HAVE_GL2PS=false"
set "HAVE_OPENCL=false"
set "HAVE_VTK=false"
set "HAVE_D3D=false"
set "CSF_OPT_INC="

View File

@@ -477,77 +477,6 @@ proc ConvertTColFwd {thePackagePath theHeaderExtensions} {
}
}
# try to find source file corresponding to the specified header and either
# inject macro IMPLEMENT_STANDARD_RTTIEXT in it, or check it already present,
# and depending on this, return suffix to be used for corresponding macro
# DEFINE_STANDARD_RTTI... (either inline or out-of-line variant)
proc DefineExplicitRtti {hxxfile class base theSourceExtensions} {
# if current file is not a header (by extension), exit with "inline" variant
# (there is no need to bother with out-of-line instantiations for local class)
set ext [string range [file extension $hxxfile] 1 end]
if { [lsearch -exact [split $theSourceExtensions ,] $ext] >=0 } {
return "_INLINE"
}
# try to find source file with the same name but source-type extension
# in the same folder
set filename [file rootname $hxxfile]
foreach ext [split $theSourceExtensions ,] {
# puts "Checking ${filename}.$ext"
if { ! [file readable ${filename}.$ext] } { continue }
# check the file content
set aFileContent [ReadFileToList ${filename}.$ext aFileRawContent aEOL]
# try to find existing macro IMPLEMENT_STANDARD_RTTIEXT and check that
# it is consistent
foreach line $aFileContent {
if { [regexp "^\\s*IMPLEMENT_STANDARD_RTTIEXT\\s*\\(\\s*$class\\s*,\\s*(\[A-Za-z0-9_\]+)\\s*\\)" $line res impl_base] } {
# implementation is in place, just report warning if second argument
# is different
if { $base != $impl_base } {
logwarn "Warning in ${filename}.$ext: second argument of macro"
logwarn " IMPLEMENT_STANDARD_RTTIEXT($class,$impl_base)"
logwarn " is not the same as detected base class, $base"
}
return "EXT"
}
}
# inject a new macro before the first non-empty, non-comment, and
# non-preprocessor line
set aNewFileContent {}
set injected 0
set inc_found 0
foreach line $aFileContent {
if { ! $injected } {
# add macro before first non-empty line after #includes
if { [regexp {^\s*$} $line] } {
} elseif { [regexp {^\s*\#\s*include} $line] } {
set inc_found 1
} elseif { $inc_found } {
set injected 1
lappend aNewFileContent "IMPLEMENT_STANDARD_RTTIEXT($class,$base)"
if { ! [regexp "^IMPLEMENT_" $line] } {
lappend aNewFileContent ""
}
}
}
lappend aNewFileContent $line
}
if { ! $injected } {
lappend aNewFileContent "IMPLEMENT_STANDARD_RTTIEXT($class,$base)"
}
SaveListToFile ${filename}.$ext $aNewFileContent $aEOL
return "EXT"
}
logwarn "Warning in ${hxxfile}: cannot find corresponding source file,"
logwarn " will use inline version of DEFINE_STANDARD_RTTI"
return "_INLINE"
}
# Parse source files and:
#
# - add second argument to macro DEFINE_STANDARD_RTTI specifying first base
@@ -592,14 +521,13 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
# find all instances of DEFINE_STANDARD_RTTI with single or two arguments
set index 0
set pattern_rtti {^(\s*DEFINE_STANDARD_RTTI)([_A-Z]+)?\s*\(\s*([A-Za-z_0-9,\s]+)\s*\)}
set pattern_rtti {^(\s*DEFINE_STANDARD_RTTI\s*)\(\s*([A-Za-z_0-9,\s]+)\s*\)}
while { [regexp -start $index -indices -lineanchor $pattern_rtti \
$aProcessedFileContent location start suffix clist] } {
$aProcessedFileContent location start clist] } {
set index [lindex $location 1]
set start [eval string range \$aProcessedFileContent $start]
set suffix [eval string range \$aProcessedFileContent $suffix]
set clist [split [eval string range \$aProcessedFileContent $clist] ,]
set start [eval string range \$aProcessedFileContent $start]
set clist [split [eval string range \$aProcessedFileContent $clist] ,]
if { [llength $clist] == 1 } {
set class [string trim [lindex $clist 0]]
@@ -610,8 +538,7 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
logwarn "macro DEFINE_STANDARD_RTTI is changed assuming it inherits $inherits($class), please check!"
}
set change_flag 1
ReplaceSubString aProcessedFileContent $location \
"${start}EXT($class,$inherits($class))" index
ReplaceSubString aProcessedFileContent $location "${start}($class, $inherits($class))" index
}
} else {
logwarn "Error in $aProcessedFile: Macro DEFINE_STANDARD_RTTI used for class $class whose declaration is not found in this file, cannot fix"
@@ -621,19 +548,12 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
set base [string trim [lindex $clist 1]]
if { ! [info exists inherits($class)] } {
logwarn "Warning in $aProcessedFile: Macro DEFINE_STANDARD_RTTI used for class $class whose declaration is not found in this file"
} elseif { $base != $inherits($class) && ! [info exists inherits($class,multiple)] } {
} elseif { $base != $inherits($class) } {
logwarn "Warning in $aProcessedFile: Second argument in macro DEFINE_STANDARD_RTTI for class $class is $base while $class seems to inherit from $inherits($class)"
}
# convert intermediate version of macro DEFINE_STANDARD_RTTI
# with two arguments to either _INLINE or EXT variant
if { ! $theCheckMode && "$suffix" == "" } {
set change_flag 1
# try to inject macro IMPLEMENT_STANDARD_RTTIEXT in the
# corresponding source file (or check it already present),
# and depending on this, use either inline or out-of-line variant
set rtti_suffix [DefineExplicitRtti $aProcessedFile $class $base $theSourceExtensions]
ReplaceSubString aProcessedFileContent $location \
"${start}${rtti_suffix}($class,$base)" index
if { ! $theCheckMode && ! [info exists inherits($class,multiple)] } {
set change_flag 1
ReplaceSubString aProcessedFileContent $location "${start}($class, $inherits($class))" index
}
}
}
}
@@ -658,12 +578,8 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
set index 0
set first_newline \n\n
set pattern_implement {\\?\n\s*IMPLEMENT_(DOWNCAST|STANDARD_[A-Z_]+|HARRAY1|HARRAY2|HUBTREE|HEBTREE|HSEQUENCE)\s*\([A-Za-z0-9_ ,]*\)\s*;?}
while { [regexp -start $index -indices -lineanchor $pattern_implement $aProcessedFileContent location macro] } {
while { [regexp -start $index -indices -lineanchor $pattern_implement $aProcessedFileContent location] } {
set index [lindex $location 1]
# macro IMPLEMENT_STANDARD_RTTIEXT is retained
if { [eval string range \$aProcessedFileContent $macro] == "STANDARD_RTTIEXT" } {
continue
}
if { ! $theCheckMode } {
set change_flag 1
ReplaceSubString aProcessedFileContent $location $first_newline index
@@ -678,7 +594,7 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
# find all uses of macro STANDARD_TYPE and method DownCast and ensure that
# argument class is explicitly included
set pattern_incbeg {\s*#\s*include\s*[\"<]\s*([A-Za-z0-9_/]*/)?}
set pattern_incbeg {\s*#\s*include\s*[\"<]\s*}
set pattern_incend {[.][a-zA-Z]+\s*[\">]}
set index 0
set addtype {}
@@ -706,9 +622,7 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
if { ! $theCheckMode } {
set addinc ""
foreach type $addtype {
if { "$aProcessedFileName" != "$type.hxx" } {
append addinc "\n#include <$type.hxx>"
}
append addinc "\n#include <$type.hxx>"
}
if { [regexp -indices ".*\n${pattern_incbeg}\[A-Za-z0-9_/\]+${pattern_incend}" $aProcessedFileContent location] } {
set change_flag 1
@@ -735,7 +649,6 @@ proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} {
# iterate by header files
foreach aHeader [glob -nocomplain -type f -directory $theTargetPath *.{$theExtensions}] {
set aCurrentHeaderName [file tail $aHeader]
# skip gxx files, as names Handle_xxx used there are in most cases
# placeholders of the argument types substituted by #define
@@ -769,9 +682,8 @@ proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} {
set anUpdatedHeaderContent {}
set pattern_handle {\mHandle_([A-Za-z0-9_]+)}
foreach line $aHeaderContent {
# do not touch typedefs, #include, and #if... statements
if { [regexp {^\s*typedef} $line] ||
[regexp {^\s*\#\s*include} $line] || [regexp {^\s*\#\s*if} $line] } {
# do not touch #include and #if... statements
if { [regexp {\s*\#\s*include} $line] || [regexp {\s*\#\s*if} $line] } {
lappend anUpdatedHeaderContent $line
continue
}
@@ -851,8 +763,8 @@ proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} {
} else {
# replace by forward declaration of a class or its include unless
# it is already declared or included
if { ! [regexp "\#\\s*include\\s*\[\<\"\]\\s*(\[A-Za-z0-9_/\]*/)?$aForwardDeclHandledClass\[.\]hxx\\s*\[\>\"\]" $aHeaderContent] } {
if { $isQObject && "$aCurrentHeaderName" != "${aForwardDeclHandledClass}.hxx" } {
if { ! [regexp "^\s*\#\s*include\s*\[\<\"\]\s*$aForwardDeclHandledClass\s*\[\>\"\]" $aHeaderContent] } {
if { $isQObject } {
lappend anUpdatedHeaderContent "#include <${aForwardDeclHandledClass}.hxx>"
if { ! [SearchForFile $theIncPaths ${aForwardDeclHandledClass}.hxx] } {
loginfo "Warning: include ${aForwardDeclHandledClass}.hxx added in $aHeader, assuming it exists and defines Handle_$aForwardDeclHandledClass"
@@ -1034,10 +946,7 @@ proc ConvertCStyleHandleCast {pkpath theExtensions theCheckMode} {
while { [regexp -start $index -indices -lineanchor $pattern_refcast0 $hxx location class var] } {
set index [lindex $location 1]
set var [eval string range \$hxx $var]
if { "$var" != "const" && "$var" != "Standard_OVERRIDE" } {
logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]"
}
logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]"
}
# replace const Handle(A)& a = Handle(B)::DownCast (b); by
@@ -1172,11 +1081,10 @@ proc ReadFileToList {theFilePath theFileContent theFileEOL} {
regsub -all {$aFileEOL} $aFileContent "\n" aFileContent
}
set aList [split $aFileContent "\n"]
# set aList {}
# foreach aLine [split $aFileContent "\n"] {
# lappend aList [string trimright $aLine]
# }
set aList {}
foreach aLine [split $aFileContent "\n"] {
lappend aList [string trimright $aLine]
}
return $aList
}
@@ -1246,8 +1154,6 @@ proc SaveListToFile {theFilePath theData {theEOL "auto"}} {
fconfigure $aFile -translation binary
puts -nonewline $aFile [join $theData $anUsedEol]
close $aFile
loginfo "File $theFilePath modified"
}
# collect all subdirs of theBaseDir

View File

@@ -1,67 +0,0 @@
// This is sample C++ file intended for testing and verifyig automatic upgrade
// script. Copy it with extension .cxx and apply upgrade procedure to see
// the result, as follows:
// > upgrade.bat -src=./adm -inc=./src -recurse -all
// Include of Geom_Line.hxx and Geom_Plane.hxx should be added below
#include <gp.hxx>
//========================================================================
// OCCT 7.0
//========================================================================
//------------------------------------------------------------------------
// Option -rtti
//------------------------------------------------------------------------
// Should be replaced by <Standard_Type.hxx>
#include <Standard_DefineHandle.hxx>
class A_0
{
}
class B_1 :
public A_0
{
// second argument "A_0" should be added
DEFINE_STANDARD_RTTI(B_1)
};
class C_2 : public Standard_Transient, B_1
{
// second argument "Standard_Transient" should be added
DEFINE_STANDARD_RTTI(C_2)
};
void for_rtti ()
{
Handle(Geom_Curve) aCurve = new Geom_Line (gp::Origin(), gp::DZ());
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (aCurve);
}
// should be removed
IMPLEMENT_DOWNCAST(A)
IMPLEMENT_STANDARD_RTTIEXT(A, B)
//------------------------------------------------------------------------
// Option -fwd
//------------------------------------------------------------------------
// force safe mode used for Qt objects
Q_OBJECT
slots:
// these includes should be recognized as corresponding to forward declarations
#include <occt/TColStd_HArray1OfReal.hxx>
// these declarations should be just removed
class Handle(TColStd_HArray1OfReal);
// should be replaced by include of corresponding header
class TColStd_Array1OfReal;
class Handle(Geom_Curve);
// check that trailing spaces at the following line are preserved
void ff();

View File

@@ -1,21 +1,19 @@
Building with CMake for Android {#occt_dev_guides__building_android}
Building with CMake and ADT for Android {#occt_dev_guides__building_android}
===================
@tableofcontents
This article describes the steps to build OCCT libraries for Android from a complete source package
with GNU make (makefiles) on Windows 7 and Ubuntu 15.10.
This file describes the steps to build OCCT libraries from a complete source package
with following tools:
- Generation of eclipse project files
- CMake v3.0+ http://www.cmake.org/cmake/resources/software.html
- Cross-compilation toolchain for CMake https://github.com/taka-no-me/android-cmake
- Android NDK rev.10+ https://developer.android.com/tools/sdk/ndk/index.html
- Make: MinGW v4.82+ for Windows, GNU Make vXX for Linux. http://sourceforge.net/projects/mingw/files/
- Building eclipse project files of OCCT
- Android Developer Tools (ADT) v22+ https://developer.android.com/sdk/index.html
The steps on Windows and Ubuntu are similar. There is the only one difference: makefiles are built with mingw32-make
on Windows and native GNU make on Ubuntu.
Required tools (download and install if it is required):
- CMake v3.0+ http://www.cmake.org/cmake/resources/software.html
- Cross-compilation toolchain for CMake https://github.com/taka-no-me/android-cmake
- Android NDK rev.10+ https://developer.android.com/tools/sdk/ndk/index.html
- GNU Make: MinGW v4.82+ for Windows (http://sourceforge.net/projects/mingw/files/), GNU Make 4.0 for Ubuntu.
## Generation of makefiles
## Generation of eclipse project files
Run GUI tool provided by CMake: cmake-gui
### Tools configuration
@@ -24,23 +22,21 @@ Run GUI tool provided by CMake: cmake-gui
@figure{/dev_guides/building/android/images/android_image001.png}
Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project.
Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project. -
Select "MinGW MakeFiles" item from the list
Select "Eclipse CDT4 - MinGW MakeFiles" item from the list
- Choose "Specify toolchain file for cross-compiling"
- Click "Next"
@figure{/dev_guides/building/android/images/android_image002.png}
- Specify a toolchain file at the next dialog by android.toolchain.cmake . It is contained by cross-compilation toolchain for CMake
- Specify the Toolchain file at next dialog by android.toolchain.cmake is contained by cross-compilation toolchain for CMake
- Click "Finish"
@figure{/dev_guides/building/android/images/android_image003.png}
If ANDROID_NDK environment variable is not defined in current OS, add cache entry ANDROID_NDK (entry type is PATH) - path to the NDK folder ("Add Entry" button)
Add cache entry ANDROID_NDK - path (entry type is PATH) to the NDK folder ("Add Entry" button)
@figure{/dev_guides/building/android/images/android_image004.png}
If on Windows the message is appeared: "CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles"
CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.",
specify **CMAKE_MAKE_PROGRAM** to mingw32-make executable.
if there is message "CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool."
Define CMAKE_MAKE_PROGRAM variable with the file path to mingw32-make executable.
@figure{/dev_guides/building/android/images/android_image005.png}
### OCCT Configuration
@@ -49,36 +45,27 @@ How to configure OCCT, see "OCCT Configuration" section of @ref occt_dev_guides_
taking into account the specific configuration variables for android:
- ANDROID_ABI = armeabi-v7a
- ANDROID_NATIVE_API_LEVEL = 15
- ANDROID_NDK_LAYOUT is equal to CMAKE_BUILD_TYPE variable
- **BUILD_MODULE_Draw = OFF**
- ANDROID_NDK_LAYOUT is equal to BUILD_CONFIGURATION variable
- CMAKE_ECLIPSE_VERSION is equal to installed eclipse version (e.g., 4.2)
Configure parallel building:
- CMAKE_ECLIPSE_MAKE_ARGUMENTS = -jN where N = your numbers of CPU cores (threads)
@figure{/dev_guides/building/android/images/android_image006.png}
### Generation of makefiles
### Generation of eclipse projects files
Click **Generate** button and wait until the generation process is finished.
Then makefiles will appear in the build folder (e.g. <i> D:/tmp/occt-android </i>).
Then the eclipse project files will appear in the build folder (e.g. <i> D:/android-build-eclipse-api-15 </i>).
## Building makefiles of OCCT
## Building eclipse project files of OCCT
Open console and go to the build folder. Type "mingw32-make" (Windows) or "make" (Ubuntu) to start build process.
> mingw32-make
or
> make
Parallel building can be started with using **"-jN"** argument of "mingw32-make/make", where N is the number of building threads.
> mingw32-make -j4
or
> make -j4
## Install built OCCT libraries
Type "mingw32-make/make" with argument "install" to place the libraries
to the install folder (see "OCCT Configuration" section of @ref occt_dev_guides__building_cmake "Building with CMake")
> mingw32-make install
or
> make install
- Open eclipse (downloaded ADT bundle contains it)
@figure{/dev_guides/building/android/images/android_image007.png}
- Import "Existing project into Workspace"
@figure{/dev_guides/building/android/images/android_image008.png}
@figure{/dev_guides/building/android/images/android_image009.png}
- Build ALL
@figure{/dev_guides/building/android/images/android_image010.png}
When the building process has finished, libraries are located in \<build folder\>/out (e.g. <i> D:/android-build-eclipse-api-15/out </i>).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -17,7 +17,7 @@ you need to:
2. Build using your preferred build tool.
- \subpage occt_dev_guides__building_automake "Building on Linux with Autotools"
- \subpage occt_dev_guides__building_cmake "Building with CMake (cross-platform)"
- \subpage occt_dev_guides__building_android "Building with CMake for Android (cross-platform)"
- \subpage occt_dev_guides__building_android "Building with CMake and ADT for Android (cross-platform)"
- \subpage occt_dev_guides__building_code_blocks "Building on Mac OS X with Code::Blocks"
- \subpage occt_dev_guides__building_msvc "Building on Windows with MS Visual Studio"
- \subpage occt_dev_guides__building_xcode "Building on Mac OS X with Xcode"

View File

@@ -117,8 +117,8 @@ The following table enumerates the full list of environment variables used at co
| INSTALL_TBB | Boolean flag | Indicates whether TBB binaries should be installed into the installation directory |
| INSTALL_VTK | Boolean flag | Indicates whether VTK binaries should be installed into the installation directory |
| INSTALL_TCL | Boolean flag | Indicates whether TCL binaries should be installed into the installation directory |
| INSTALL_TEST_CASES | Boolean flag | Indicates whether non-regression OCCT test scripts should be installed into the installation directory |
| INSTALL_SAMPLES | Boolean flag | Indicates whether OCCT samples should be installed into the installation directory |
| INSTALL_OCCT_TEST_CASES | Boolean flag | Indicates whether non-regression OCCT test scripts should be installed into the installation directory |
| INSTALL_OCCT_SAMPLES | Boolean flag | Indicates whether OCCT samples should be installed into the installation directory |
| INSTALL_DOC_OcctOverview | Boolean flag | Indicates whether OCCT overview documentation should be installed into the installation directory |
**Note:** In those CMake options defining paths only the forward slashes ("/") are acceptable.

View File

@@ -86,7 +86,7 @@ Alternative solution is to use legacy generator of project files (extracted from
@subsubsection upgrade_occt700_cdl_auto Automatic upgrade
Most of typical changes required for upgrading code for OCCT 7.0 can be done automatically using the *upgrade* tool included in OCCT 7.0.
Most of typical changes required for upgrading code to use OCCT 7.0 can be done automatically using the *upgrade* tool included in OCCT 7.0.
This tool is a Tcl script, thus Tcl should be available on your workstation to run it.
Example:
@@ -106,16 +106,11 @@ Run upgrade tool without arguments to see the list of available options.
Upgrade tool performs the following changes in the code.
1. Replaces macro DEFINE_STANDARD_RTTI by DEFINE_STANDARD_RTTIEXT, with second argument indicating base class for the main argument class (if inheritance is recognized by the script):
1. Adds second argument to macro DEFINE_STANDARD_RTTI indicating base class for its argument class (if inheritance is recognized by the script):
~~~~~
DEFINE_STANDARD_RTTI(Class) -> DEFINE_STANDARD_RTTIEXT(Class, Base)
DEFINE_STANDARD_RTTI(Class) -> DEFINE_STANDARD_RTTI(Class, Base)
~~~~~
@note If macro DEFINE_STANDARD_RTTI with two arguments (used in intermediate development versions of OCCT 7.0) is found, the script will convert it to either DEFINE_STANDARD_RTTIEXT or DEFINE_STANDARD_RTTI_INLINE.
The former case is used if current file is header and source file with the same name is found in the same folder.
In this case, macro IMPLEMENT_STANDARD_RTTI is injected in the corresponding source file.
The latter variant defines all methods for RTTI as inline, and does not require IMPLEMENT_STANDARD_RTTIEXT macro.
2. Replaces forward declarations of collection classes previously generated from CDL generics (defined in TCollection package) by \#include of corresponding header:
~~~~~
class TColStd_Array1OfReal; -> #include <TColStd_Array1OfReal.hxx>
@@ -164,11 +159,9 @@ Namespace::Handle(Class) -> Handle(Namespace::Class)
10. Adds \#include for all classes used as argument to macro STANDARD_TYPE(), except of already included ones;
11. Removes uses of obsolete macros IMPLEMENT_DOWNCAST and IMPLEMENT_STANDARD_*, except IMPLEMENT_STANDARD_RTTIEXT.
11. Removes uses of obsolete macros IMPLEMENT_DOWNCAST() and IMPLEMENT_STANDARD_*().
@note If you plan to keep compatibility of your code with older versions of OCCT, add option "-compat" to avoid the latter change. See also @ref upgrade_occt700_cdl_compat.
.
> If you plan to keep compatibility of your code with older versions of OCCT, add option "-compat" to avoid the latter change. See also @ref upgrade_occt700_cdl_compat.
As long as the upgrade routine runs, some information messages are sent to the standard output.
In some cases the warnings or errors like the following may appear:
@@ -178,7 +171,7 @@ In some cases the warnings or errors like the following may appear:
~~~~~
Be sure to check carefully all reported errors and warnings, as corresponding places likely will require manual corrections.
In some cases these messages may help you to detect errors in your code, for instance, cases where DEFINE_STANDARD_RTTI macro is used with incorrect class name as an argument.
In some cases these messages may help you to detect errors in your code, for instance, cases where DEFINE_STANDARD_RTTI macro passes invalid class name as an argument.
@subsubsection upgrade_occt700_cdl_compiler Possible compiler errors
@@ -330,17 +323,16 @@ aBC->Transform (T); // access violation in OCCT 7.0
If you like to preserve compatibility of your application code with OCCT versions 6.x even after upgrade to 7.0, consider the following suggestions:
1. If your code used sequences of macros IMPLEMENT_STANDARD_... generated by WOK, replace them by single macro IMPLEMENT_STANDARD_RTTIEXT
1. When running automatic upgrade tool, add option *-compat*.
2. When running automatic upgrade tool, add option *-compat*.
3. Define macros DEFINE_STANDARD_RTTIEXT and DEFINE_STANDARD_RTTI_INLINE when building with previous versions of OCCT, resolving to DEFINE_STANDARD_RTTI with single argument
2. In order to overcome incompatibility of macro DEFINE_STANDARD_RTTI which has additional argument in OCCT 7.0, you can replace (after upgrade) its use in your code by your own version-dependent macro, which resolves to either 6.x or 7.x version.
Example:
~~~~~
#if OCC_VERSION_HEX < 0x070000
#define DEFINE_STANDARD_RTTIEXT(C1,C2) DEFINE_STANDARD_RTTI(C1)
#define DEFINE_STANDARD_RTTI_INLINE(C1,C2) DEFINE_STANDARD_RTTI(C1)
#define DEFINE_STANDARD_RTTI_COMPAT(C1,C2) DEFINE_STANDARD_RTTI(C1)
#else
#define DEFINE_STANDARD_RTTI_COMPAT(C1,C2) DEFINE_STANDARD_RTTI(C1,C2)
#endif
~~~~~

View File

@@ -7,8 +7,6 @@ SET "OLD_PATH=%PATH%"
if exist "%~dp0env.bat" (
call "%~dp0env.bat"
) else (
type "%~dp0adm\templates\env.bat" | findstr /i /v "__CASROOT__" > "%~dp0env.bat"
)
set "TCL_EXEC=tclsh.exe"

View File

@@ -9,9 +9,6 @@ anOldDyLd="$DYLD_LIBRARY_PATH"
# go to the script directory
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
if [ ! -e "${aScriptPath}/env.sh" ]; then
cat ${aScriptPath}/adm/templates/env.sh | sed -e '/__CASROOT__/d' > ${aScriptPath}/env.sh
fi
aSystem=`uname -s`
aTarget="$1"

View File

@@ -530,7 +530,7 @@ public:
theRed=255;
theGreen=255;
theBlue=255;
Handle(AIS_InteractiveObject) aCurrent ;
Handle_AIS_InteractiveObject aCurrent ;
Quantity_Color anObjCol;
myAISContext()->InitCurrent();
if (!myAISContext()->MoreCurrent())
@@ -716,7 +716,7 @@ public:
/// <summary>
///Get AISContext
/// </summary>
Handle(AIS_InteractiveContext) GetContext(void)
Handle_AIS_InteractiveContext GetContext(void)
{
return myAISContext();
}
@@ -841,8 +841,8 @@ public:
return false;
}
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast(anIO);
Handle_AIS_InteractiveObject anIO = myAISContext()->Current();
Handle_AIS_Shape anIS = Handle_AIS_Shape::DownCast(anIO);
return BRepTools::Write (anIS->Shape(), (Standard_CString)theFileName) != Standard_False;
}
@@ -857,8 +857,8 @@ public:
STEPControl_Writer aWriter;
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
{
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
Handle_AIS_InteractiveObject anIO = myAISContext()->Current();
Handle_AIS_Shape anIS=Handle_AIS_Shape::DownCast(anIO);
TopoDS_Shape aShape = anIS->Shape();
aStatus = aWriter.Transfer( aShape , aType );
if ( aStatus != IFSelect_RetDone )
@@ -888,8 +888,8 @@ public:
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
{
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
Handle_AIS_InteractiveObject anIO = myAISContext()->Current();
Handle_AIS_Shape anIS=Handle_AIS_Shape::DownCast(anIO);
TopoDS_Shape aShape = anIS->Shape();
aWriter.AddShape ( aShape );
}
@@ -910,8 +910,8 @@ public:
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
{
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
Handle_AIS_InteractiveObject anIO = myAISContext()->Current();
Handle_AIS_Shape anIS=Handle_AIS_Shape::DownCast(anIO);
TopoDS_Shape aShape = anIS->Shape();
if ( aShape.IsNull() )
{
@@ -939,8 +939,8 @@ public:
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
{
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
Handle_AIS_InteractiveObject anIO = myAISContext()->Current();
Handle_AIS_Shape anIS=Handle_AIS_Shape::DownCast(anIO);
TopoDS_Shape aShape = anIS->Shape();
if ( aShape.IsNull() )
{
@@ -1030,8 +1030,8 @@ public:
private:
// fields
NCollection_Haft<Handle(V3d_Viewer)> myViewer;
NCollection_Haft<Handle(V3d_View)> myView;
NCollection_Haft<Handle(AIS_InteractiveContext)> myAISContext;
NCollection_Haft<Handle(OpenGl_GraphicDriver)> myGraphicDriver;
NCollection_Haft<Handle_V3d_Viewer> myViewer;
NCollection_Haft<Handle_V3d_View> myView;
NCollection_Haft<Handle_AIS_InteractiveContext> myAISContext;
NCollection_Haft<Handle_OpenGl_GraphicDriver> myGraphicDriver;
};

View File

@@ -693,7 +693,7 @@ public:
/// <summary>
///Get AISContext
/// </summary>
Handle(AIS_InteractiveContext) GetContext()
Handle_AIS_InteractiveContext GetContext()
{
return myAISContext();
}
@@ -965,9 +965,9 @@ public:
private:
NCollection_Haft<Handle(V3d_Viewer)> myViewer;
NCollection_Haft<Handle(V3d_View)> myView;
NCollection_Haft<Handle(AIS_InteractiveContext)> myAISContext;
NCollection_Haft<Handle(D3DHost_GraphicDriver)> myGraphicDriver;
NCollection_Haft<Handle_V3d_Viewer> myViewer;
NCollection_Haft<Handle_V3d_View> myView;
NCollection_Haft<Handle_AIS_InteractiveContext> myAISContext;
NCollection_Haft<Handle_D3DHost_GraphicDriver> myGraphicDriver;
};

View File

@@ -18,6 +18,7 @@
#include <android/log.h>
IMPLEMENT_STANDARD_HANDLE (OcctJni_MsgPrinter, Message_Printer)
IMPLEMENT_STANDARD_RTTIEXT(OcctJni_MsgPrinter, Message_Printer)
// =======================================================================

View File

@@ -53,7 +53,7 @@ private:
public:
DEFINE_STANDARD_RTTIEXT(OcctJni_MsgPrinter,Message_Printer)
DEFINE_STANDARD_RTTI(OcctJni_MsgPrinter)
};

View File

@@ -13,4 +13,5 @@
#include <OcctJni_Window.hxx>
IMPLEMENT_STANDARD_HANDLE (OcctJni_Window, Aspect_Window)
IMPLEMENT_STANDARD_RTTIEXT(OcctJni_Window, Aspect_Window)

View File

@@ -97,7 +97,7 @@ private:
public:
DEFINE_STANDARD_RTTIEXT(OcctJni_Window,Aspect_Window)
DEFINE_STANDARD_RTTI(OcctJni_Window)
};

View File

@@ -153,7 +153,7 @@ static TCollection_AsciiString Comment(Standard_Real Step,
"GeomAPI_PointsToBSplineSurface aPTBS;" EOL
"aPTBS.Init(aZPoints,aX0,aXStep,aY0,aYStep," EOL
" DegMin,DegMax,Continuity,Tolerance);" EOL
"Handle(Geom_BSplineSurface) aSurface = aPTBS.Surface();" EOL EOL EOL
"Handle_Geom_BSplineSurface aSurface = aPTBS.Surface();" EOL EOL EOL
);
return aText;
@@ -165,7 +165,7 @@ static TCollection_AsciiString Comment(Standard_Real Step,
// Purpose :
//================================================================
Handle(Geom_BSplineSurface) Approx_Presentation::CreateBSplineSurface(TColStd_Array2OfReal& aZPoints,
Handle_Geom_BSplineSurface Approx_Presentation::CreateBSplineSurface(TColStd_Array2OfReal& aZPoints,
Standard_Real theXStep,
Standard_Real theYStep,
Standard_Integer Count)
@@ -175,7 +175,7 @@ Handle(Geom_BSplineSurface) Approx_Presentation::CreateBSplineSurface(TColStd_Ar
GeomAPI_PointsToBSplineSurface aPTBS;
aPTBS.Init(aZPoints,aX0,theXStep,aY0,theYStep,
DegMin[Count],DegMax[Count],Continuity[Count],Tol[Count]);
Handle(Geom_BSplineSurface) aSurface = aPTBS.Surface();
Handle_Geom_BSplineSurface aSurface = aPTBS.Surface();
return aSurface;
}
@@ -192,12 +192,12 @@ Standard_Boolean Approx_Presentation::DrawModifyBSplineSurface(TColStd_Array2OfR
Standard_Integer theIndexX,
Standard_Integer theIndexY,
Standard_Real theDeflection,
Handle(AIS_InteractiveObject)& aMovePnt,
Handle(AIS_InteractiveObject)& aObj,
Handle_AIS_InteractiveObject& aMovePnt,
Handle_AIS_InteractiveObject& aObj,
Standard_Integer Count)
{
Handle(AIS_InteractiveObject) auxObj;
Handle_AIS_InteractiveObject auxObj;
Standard_Real aX0 = -300, aY0 = -200;
Standard_Real aLastZ = aZPoints(theIndexX,theIndexY);
aZPoints(theIndexX,theIndexY) += 100*theDeflection;
@@ -216,7 +216,7 @@ Standard_Boolean Approx_Presentation::DrawModifyBSplineSurface(TColStd_Array2OfR
aZPoints(theIndexX,theIndexY) = aLastZ;
Handle(Geom_BSplineSurface) aSurface = aPTBS.Surface();
Handle_Geom_BSplineSurface aSurface = aPTBS.Surface();
auxObj = drawSurface(aSurface);
getAISContext()->Erase(aObj);
@@ -275,7 +275,7 @@ void Approx_Presentation::sample1()
aText += (
"aPTB.Init(aCurvePoint,DegMin,DegMax,Continuity,Tolerance);" EOL
"Handle(Geom_BSplineCurve) aCurve = aPTB.Curve();" EOL
"Handle_Geom_BSplineCurve aCurve = aPTB.Curve();" EOL
);
setResultTitle("Creating approximations of curves");
@@ -295,7 +295,7 @@ void Approx_Presentation::sample1()
GeomAPI_PointsToBSpline aPTB;
Handle(AIS_InteractiveObject) aIndexPnt [2],aObj;
Handle_AIS_InteractiveObject aIndexPnt [2],aObj;
Standard_Integer aIndex[2] = {9,13};
Standard_Real aDeflection[2] = {-1.5,2};
@@ -313,7 +313,7 @@ void Approx_Presentation::sample1()
if(WAIT_A_LITTLE) return;
aPTB.Init(aCurvePoint,DegMin[Count],DegMax[Count],Continuity[Count],Tol[Count]);
Handle(Geom_BSplineCurve) aCurve = aPTB.Curve();
Handle_Geom_BSplineCurve aCurve = aPTB.Curve();
aObj = drawCurve(aCurve);
for( i = 0 ; i < 2 ; i++)
@@ -367,7 +367,7 @@ void Approx_Presentation::sample2()
TColgp_Array2OfPnt aPnt(1,4,1,4);
Handle(AIS_InteractiveObject) aShowPnt[4][4],aObj,aMovePnt;
Handle_AIS_InteractiveObject aShowPnt[4][4],aObj,aMovePnt;
Standard_Integer aColLength = aZPoints.ColLength();
Standard_Integer aRowLength = aZPoints.RowLength();
@@ -404,7 +404,7 @@ void Approx_Presentation::sample2()
aText = Comment(aXStep,anUpper,DegMin[Count],DegMax[Count],Count+1,Tol[Count]);
setResultText(aText.ToCString());
Handle(Geom_BSplineSurface) aSurface = CreateBSplineSurface(aZPoints,aXStep,aYStep,Count);
Handle_Geom_BSplineSurface aSurface = CreateBSplineSurface(aZPoints,aXStep,aYStep,Count);
aObj = drawSurface(aSurface);
Standard_Boolean aBool;
if(WAIT_A_LITTLE) return ;
@@ -452,7 +452,7 @@ void Approx_Presentation::sample3()
TColgp_Array2OfPnt aPnt(1,4,1,4);
Handle(AIS_InteractiveObject) aShowPnt[4][4],aObj,aMovePnt;
Handle_AIS_InteractiveObject aShowPnt[4][4],aObj,aMovePnt;
Standard_Integer aColLength = aZPoints.ColLength();
Standard_Integer aRowLength = aZPoints.RowLength();
@@ -491,7 +491,7 @@ void Approx_Presentation::sample3()
aText += Comment(aXStep,anUpper,DegMin[Count],DegMax[Count],Count+1,Tol[Count]);
setResultText(aText.ToCString());
Handle(Geom_BSplineSurface) aSurface = CreateBSplineSurface(aZPoints,aXStep,aYStep,Count);
Handle_Geom_BSplineSurface aSurface = CreateBSplineSurface(aZPoints,aXStep,aYStep,Count);
aObj = drawSurface(aSurface);
Standard_Boolean aBool;
if(WAIT_A_LITTLE) return ;
@@ -540,7 +540,7 @@ void Approx_Presentation::sample4()
TColgp_Array2OfPnt aPnt(1,5,1,5);
Handle(AIS_InteractiveObject) aShowPnt[5][5],aObj,aMovePnt;
Handle_AIS_InteractiveObject aShowPnt[5][5],aObj,aMovePnt;
Standard_Integer aColLength = aZPoints.ColLength();
Standard_Integer aRowLength = aZPoints.RowLength();
@@ -579,7 +579,7 @@ void Approx_Presentation::sample4()
aText += Comment(aXStep,anUpper,DegMin[Count],DegMax[Count],Count+1,Tol[Count]);
setResultText(aText.ToCString());
Handle(Geom_BSplineSurface) aSurface = CreateBSplineSurface(aZPoints,aXStep,aYStep,Count);
Handle_Geom_BSplineSurface aSurface = CreateBSplineSurface(aZPoints,aXStep,aYStep,Count);
aObj = drawSurface(aSurface);
Standard_Boolean aBool;
if(WAIT_A_LITTLE) return ;

View File

@@ -32,11 +32,11 @@ private:
Standard_Boolean DrawModifyBSplineSurface(TColStd_Array2OfReal& ,
Standard_Real ,Standard_Real ,
Standard_Integer ,Standard_Integer ,
Standard_Real,Handle(AIS_InteractiveObject)&,
Handle(AIS_InteractiveObject)&,
Standard_Real,Handle_AIS_InteractiveObject&,
Handle_AIS_InteractiveObject&,
Standard_Integer);
Handle(Geom_BSplineSurface) CreateBSplineSurface(TColStd_Array2OfReal& ,
Handle_Geom_BSplineSurface CreateBSplineSurface(TColStd_Array2OfReal& ,
Standard_Real ,Standard_Real,
Standard_Integer);

View File

@@ -84,7 +84,7 @@ Standard_Boolean Chamfers_Presentation::createDiverseChamferOnBox(
Standard_Real d1, // chamfer on edge 1
Standard_Real d2, // chamfer on edge 2
Standard_Real d3, // chamfer on edge 3
Handle(AIS_InteractiveObject)& thePrevShape)// for smoth drawing
Handle_AIS_InteractiveObject& thePrevShape)// for smoth drawing
// we display the new shape first, then erase the previous one
{
// initializing a class that builds chamfer
@@ -202,7 +202,7 @@ Standard_Boolean Chamfers_Presentation::createChamferOnBox(
TopoDS_Solid& aBox,
Standard_Real theDistA, // distance along first face
Standard_Real theDistB, // distance along second face
Handle(AIS_InteractiveObject)& thePrevShape)// for smoth drawing
Handle_AIS_InteractiveObject& thePrevShape)// for smoth drawing
// we display the new shape first, then erase the previous one
{
// initializing a class that builds chamfer
@@ -287,7 +287,7 @@ Standard_Boolean Chamfers_Presentation::createFilletOnBox(
TopoDS_Solid& aBox,
Standard_Real theRad, // radius of fillet
ChFi3d_FilletShape theFShape, // shape of fillet
Handle(AIS_InteractiveObject)& thePrevObj) // to erase
Handle_AIS_InteractiveObject& thePrevObj) // to erase
// the previous shape
{
// initializing a class that builds fillet
@@ -612,7 +612,7 @@ void Chamfers_Presentation::sampleBoxFillet()
Standard_Real a = BOX_SIDE_LEN;
TopoDS_Solid aBox = BRepPrimAPI_MakeBox(gp_Pnt(-a/2, -a/2, -a/2), a, a, a);
Handle(AIS_InteractiveObject) aPrevObj = new AIS_Shape(aBox);
Handle_AIS_InteractiveObject aPrevObj = new AIS_Shape(aBox);
getAISContext()->Display(aPrevObj, Standard_False);
COCCDemoDoc::Fit();

View File

@@ -12,7 +12,7 @@
#include <OCCDemo_Presentation.h>
#include <ChFi3d_FilletShape.hxx>
class AIS_InteractiveObject;
class Handle_AIS_InteractiveObject;
class TopoDS_Solid;
class Chamfers_Presentation : public OCCDemo_Presentation
@@ -29,15 +29,15 @@ public:
private:
Standard_Boolean createChamferOnBox(
TopoDS_Solid&, Standard_Real, Standard_Real,
Handle(AIS_InteractiveObject)&);
Handle_AIS_InteractiveObject&);
Standard_Boolean createDiverseChamferOnBox(
TopoDS_Solid&, Standard_Real, Standard_Real,
Standard_Real, Handle(AIS_InteractiveObject)&);
Standard_Real, Handle_AIS_InteractiveObject&);
Standard_Boolean createFilletOnBox(
TopoDS_Solid&, Standard_Real, ChFi3d_FilletShape,
Handle(AIS_InteractiveObject)&);
Handle_AIS_InteractiveObject&);
// Sample functions
void sampleBoxChamfer();

View File

@@ -11,25 +11,28 @@
#include <Prs3d_ArrowAspect.hxx>
IMPLEMENT_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTI(ISession_Curve,AIS_InteractiveObject)
//
// Foreach ancestors, we add a IMPLEMENT_STANDARD_SUPERTYPE and
// a IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY macro.
// We must respect the order: from the direct ancestor class
// to the base class.
//
IMPLEMENT_STANDARD_TYPE(ISession_Curve)
IMPLEMENT_STANDARD_SUPERTYPE(AIS_InteractiveObject)
IMPLEMENT_STANDARD_SUPERTYPE(SelectMgr_SelectableObject)
IMPLEMENT_STANDARD_SUPERTYPE(PrsMgr_PresentableObject)
IMPLEMENT_STANDARD_SUPERTYPE(MMgt_TShared)
IMPLEMENT_STANDARD_SUPERTYPE(Standard_Transient)
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(AIS_InteractiveObject)
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(SelectMgr_SelectableObject)
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(PrsMgr_PresentableObject)
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(MMgt_TShared)
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(Standard_Transient)
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
IMPLEMENT_STANDARD_TYPE_END(ISession_Curve)
#ifdef _DEBUG
#undef THIS_FILE

View File

@@ -20,7 +20,7 @@ class ISession_Curve : public AIS_InteractiveObject
public:
ISession_Curve(const Handle(Geom_Curve)& aCurve);
virtual ~ISession_Curve();
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
DEFINE_STANDARD_RTTI(ISession_Curve)
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;

View File

@@ -77,8 +77,8 @@ static Standard_Boolean fixParam(Standard_Real& theParam)
// Purpose : displays a given geometric surface in 3d viewer
// (creates a finite face and displays it)
//================================================================
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface
(const Handle(Geom_Surface)& theSurface,
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawSurface
(const Handle_Geom_Surface& theSurface,
const Quantity_Color& theColor,
const Standard_Boolean toDisplay)
{
@@ -89,7 +89,7 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface
fixParam(v1);
fixParam(v2);
Handle(AIS_Shape) aGraphicSurface =
Handle_AIS_Shape aGraphicSurface =
new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2));
getAISContext()->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay);
@@ -110,8 +110,8 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface
// Function : DrawCurve
// Purpose : displays a given curve 3d
//================================================================
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
(const Handle(Geom_Curve)& theCurve,
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
(const Handle_Geom_Curve& theCurve,
const Quantity_Color& theColor,
const Standard_Boolean toDisplay)
{
@@ -135,8 +135,8 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
// Function : DrawCurve
// Purpose : displays a given curve 2d
//================================================================
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
(const Handle(Geom2d_Curve)& theCurve,
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
(const Handle_Geom2d_Curve& theCurve,
const Quantity_Color& theColor,
const Standard_Boolean toDisplay,
const gp_Ax2& aPosition)
@@ -163,7 +163,7 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
// Function : drawPoint
// Purpose : displays a given point
//================================================================
Handle(AIS_Point) OCCDemo_Presentation::drawPoint
Handle_AIS_Point OCCDemo_Presentation::drawPoint
(const gp_Pnt& aPnt,
const Quantity_Color& theColor,
const Standard_Boolean toDisplay)
@@ -185,7 +185,7 @@ Handle(AIS_Point) OCCDemo_Presentation::drawPoint
// (segment of line starting at thePnt with the arrow at the end,
// the length of segment is the length of the vector)
//================================================================
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawVector
(const gp_Pnt& thePnt,
const gp_Vec& theVec,
const Quantity_Color& theColor,
@@ -217,11 +217,11 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector
}
Handle(AIS_Shape) OCCDemo_Presentation::drawShape
Handle_AIS_Shape OCCDemo_Presentation::drawShape
(const TopoDS_Shape& theShape,const Quantity_Color& theColor,
const Standard_Boolean toDisplay)
{
Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape);
Handle_AIS_Shape aGraphicShape = new AIS_Shape(theShape);
getAISContext()->SetMaterial(aGraphicShape, Graphic3d_NOM_PLASTIC, toDisplay);
getAISContext()->SetColor (aGraphicShape, theColor, toDisplay);
@@ -237,12 +237,12 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape
return aGraphicShape;
}
Handle(AIS_Shape) OCCDemo_Presentation::drawShape
Handle_AIS_Shape OCCDemo_Presentation::drawShape
(const TopoDS_Shape& theShape,
const Graphic3d_NameOfMaterial theMaterial,
const Standard_Boolean toDisplay)
{
Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape);
Handle_AIS_Shape aGraphicShape = new AIS_Shape(theShape);
getAISContext()->SetMaterial(aGraphicShape, theMaterial, toDisplay);
if (toDisplay) {

View File

@@ -14,10 +14,10 @@
#define WAIT_A_SECOND WaitForInput(1000)
#include <OCCDemoDoc.h>
class AIS_InteractiveObject;
class Geom_Surface;
class Geom_Curve;
class Geom2d_Curve;
class Handle_AIS_InteractiveObject;
class Handle_Geom_Surface;
class Handle_Geom_Curve;
class Handle_Geom2d_Curve;
class Quantity_Color;
class OCCDemo_Presentation
@@ -63,8 +63,8 @@ public:
protected:
// Methods to call from a derivable class
void setName (const char* theName) {myName = CString(theName);}
Handle(AIS_InteractiveContext) getAISContext() const {return myDoc->GetAISContext();}
Handle(V3d_Viewer) getViewer() const {return myDoc->GetViewer();}
Handle_AIS_InteractiveContext getAISContext() const {return myDoc->GetAISContext();}
Handle_V3d_Viewer getViewer() const {return myDoc->GetViewer();}
void setResultTitle (const char* theTitle) {myDoc->GetResultDialog()->SetTitle(theTitle);}
void setResultText (const char* theText) {myDoc->GetResultDialog()->SetText(theText);}
Standard_CString GetDataDir() {return myDoc->GetDataDir();}
@@ -72,45 +72,45 @@ protected:
Standard_Boolean WaitForInput (unsigned long aMilliSeconds);
// Waits for a user input or a period of time has been elapsed
Handle(AIS_InteractiveObject) drawSurface (const Handle(Geom_Surface)& theSurface,
Handle_AIS_InteractiveObject drawSurface (const Handle_Geom_Surface& theSurface,
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_LEMONCHIFFON3),
const Standard_Boolean toDisplay = Standard_True);
// creates a finite face based on the given geometric surface
// and displays it in the viewer if toDisplay = Standard_True
Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom_Curve)& theCurve,
Handle_AIS_InteractiveObject drawCurve (const Handle_Geom_Curve& theCurve,
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED),
const Standard_Boolean toDisplay = Standard_True);
// creates an ISession_Curve based on the given geometric curve
// and displays it in the viewer if toDisplay = Standard_True
Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom2d_Curve)& theCurve,
Handle_AIS_InteractiveObject drawCurve (const Handle_Geom2d_Curve& theCurve,
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED),
const Standard_Boolean toDisplay = Standard_True,
const gp_Ax2& aPosition = gp::XOY());
// converts a given curve to 3d using aPosition and calls the previous method
Handle(AIS_Point) drawPoint (const gp_Pnt& thePnt,
Handle_AIS_Point drawPoint (const gp_Pnt& thePnt,
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN),
const Standard_Boolean toDisplay = Standard_True);
// creates a presentation of the given point
// and displays it in the viewer if toDisplay = Standard_True
Handle(AIS_InteractiveObject) drawVector (const gp_Pnt& thePnt,
Handle_AIS_InteractiveObject drawVector (const gp_Pnt& thePnt,
const gp_Vec& theVec,
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_YELLOW),
const Standard_Boolean toDisplay = Standard_True);
// creates a presentation of the given vector
// and displays it in the viewer if toDisplay = Standard_True
Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
Handle_AIS_Shape drawShape (const TopoDS_Shape& theShape,
const Quantity_Color& theColor,
const Standard_Boolean toDisplay = Standard_True);
// creates a presentation of the given shape
// with material PLASTIC and a given color
// and displays it in the viewer if toDisplay = Standard_True
Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
Handle_AIS_Shape drawShape (const TopoDS_Shape& theShape,
const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_BRASS,
const Standard_Boolean toDisplay = Standard_True);
// creates a presentation of the given shape with the given material

View File

@@ -23,7 +23,7 @@ class COCCDemoApp : public CWinApp
{
public:
COCCDemoApp();
Handle(Graphic3d_WNTGraphicDevice) GetGraphicDevice() const
Handle_Graphic3d_WNTGraphicDevice GetGraphicDevice() const
{ return myGraphicDevice; } ;
// Overrides
@@ -42,7 +42,7 @@ public:
DECLARE_MESSAGE_MAP()
private:
Handle(Graphic3d_WNTGraphicDevice) myGraphicDevice;
Handle_Graphic3d_WNTGraphicDevice myGraphicDevice;
};

View File

@@ -15,8 +15,8 @@ class OCCDemo_Presentation;
class COCCDemoDoc : public CDocument
{
public:
Handle(V3d_Viewer) GetViewer() const { return myViewer; };
Handle(AIS_InteractiveContext) GetAISContext() const { return myAISContext; };
Handle_V3d_Viewer GetViewer() const { return myViewer; };
Handle_AIS_InteractiveContext GetAISContext() const { return myAISContext; };
CResultDialog* GetResultDialog () {return &myCResultDialog;}
Standard_CString GetDataDir() {return myDataDir;}
@@ -71,8 +71,8 @@ protected:
DECLARE_MESSAGE_MAP()
private:
Handle(V3d_Viewer) myViewer;
Handle(AIS_InteractiveContext) myAISContext;
Handle_V3d_Viewer myViewer;
Handle_AIS_InteractiveContext myAISContext;
OCCDemo_Presentation *myPresentation;
CResultDialog myCResultDialog;
BOOL myShowResult;

View File

@@ -103,8 +103,8 @@ private:
private:
enum VisMode { VIS_WIREFRAME, VIS_SHADE, VIS_HLR };
Handle(V3d_View) myView;
Handle(Graphic3d_GraphicDriver) myGraphicDriver;
Handle_V3d_View myView;
Handle_Graphic3d_GraphicDriver myGraphicDriver;
View3D_CurrentAction myCurrentMode;
VisMode myVisMode;
Standard_Integer myXmin;

View File

@@ -88,7 +88,7 @@ void Convert_Presentation::DoSample()
// Function : Convert_Presentation::drawSurfaceAndItsBSpline
// Purpose :
//================================================================
void Convert_Presentation::drawSurfaceAndItsBSpline(Handle(Geom_Surface) theSurface,
void Convert_Presentation::drawSurfaceAndItsBSpline(Handle_Geom_Surface theSurface,
const Standard_CString theName,
TCollection_AsciiString& theText)
{
@@ -97,7 +97,7 @@ void Convert_Presentation::drawSurfaceAndItsBSpline(Handle(Geom_Surface) theSurf
aTitle += " to BSpline surface";
theText += EOL
" Handle(Geom_BSplineSurface) aBSplineSurface = " EOL
" Handle_Geom_BSplineSurface aBSplineSurface = " EOL
" GeomConvert::SurfaceToBSplineSurface(aSurface);" EOL;
setResultTitle (aTitle.ToCString());
@@ -107,7 +107,7 @@ void Convert_Presentation::drawSurfaceAndItsBSpline(Handle(Geom_Surface) theSurf
if (WAIT_A_LITTLE) return;
Handle(Geom_BSplineSurface) aBSplineSurface = GeomConvert::SurfaceToBSplineSurface(theSurface);
Handle_Geom_BSplineSurface aBSplineSurface = GeomConvert::SurfaceToBSplineSurface(theSurface);
_ASSERTE(!aBSplineSurface.IsNull());
@@ -118,7 +118,7 @@ void Convert_Presentation::drawSurfaceAndItsBSpline(Handle(Geom_Surface) theSurf
// Function : Convert_Presentation::drawCurveAndItsBSpline
// Purpose :
//================================================================
void Convert_Presentation::drawCurveAndItsBSpline(Handle(Geom_Curve) theCurve,
void Convert_Presentation::drawCurveAndItsBSpline(Handle_Geom_Curve theCurve,
const Standard_CString theName,
TCollection_AsciiString& theText)
{
@@ -127,7 +127,7 @@ void Convert_Presentation::drawCurveAndItsBSpline(Handle(Geom_Curve) theCurve,
aTitle += " to BSpline curve";
theText += EOL
" Handle(Geom_BSplineCurve) aBSpline = " EOL
" Handle_Geom_BSplineCurve aBSpline = " EOL
" GeomConvert::CurveToBSplineCurve(aCurve);" EOL;
setResultTitle (aTitle.ToCString());
@@ -137,7 +137,7 @@ void Convert_Presentation::drawCurveAndItsBSpline(Handle(Geom_Curve) theCurve,
if (WAIT_A_LITTLE) return;
Handle(Geom_BSplineCurve) aBSpline = GeomConvert::CurveToBSplineCurve(theCurve);
Handle_Geom_BSplineCurve aBSpline = GeomConvert::CurveToBSplineCurve(theCurve);
drawCurve (aBSpline, BSplineColor);
}
@@ -157,7 +157,7 @@ void Convert_Presentation::sampleCircle()
gp_Dir aDir (1,0,0);
gp_Ax2 aAxis (aOrigin, aDir);
Standard_Real aRadius = 300;
Handle(Geom_Circle) aCurve = new Geom_Circle (aAxis, aRadius);
Handle_Geom_Circle aCurve = new Geom_Circle (aAxis, aRadius);
TCollection_AsciiString aText (
" gp_Pnt aOrigin (0,0,0);" EOL

View File

@@ -10,8 +10,8 @@
#endif // _MSC_VER > 1000
#include <OCCDemo_Presentation.h>
class Geom_Curve;
class Geom_Surface;
class Handle_Geom_Curve;
class Handle_Geom_Surface;
class Quantity_Color;
@@ -38,10 +38,10 @@ private:
void sampleConicalSurface();
void sampleSphericalSurface();
void drawCurveAndItsBSpline (Handle(Geom_Curve) theCurve,
void drawCurveAndItsBSpline (Handle_Geom_Curve theCurve,
const Standard_CString theName, TCollection_AsciiString& theText);
void drawSurfaceAndItsBSpline (Handle(Geom_Surface) theSurface,
void drawSurfaceAndItsBSpline (Handle_Geom_Surface theSurface,
const Standard_CString theName, TCollection_AsciiString& theText);
private:

View File

@@ -196,14 +196,14 @@ void DCA_Presentation::sampleParabola()
if(WAIT_A_LITTLE) return;
Handle(Geom_Line) aFocalLenLin = new Geom_Line(gce_MakeLin(aPointParab, gp_Dir(0,0,1)));
Handle(Geom_TrimmedCurve) aTrim = new Geom_TrimmedCurve(aFocalLenLin, -aFocalLength/2, aFocalLength/2);
Handle_Geom_Line aFocalLenLin = new Geom_Line(gce_MakeLin(aPointParab, gp_Dir(0,0,1)));
Handle_Geom_TrimmedCurve aTrim = new Geom_TrimmedCurve(aFocalLenLin, -aFocalLength/2, aFocalLength/2);
drawCurve(aTrim);
if(WAIT_A_LITTLE) return;
Handle(Geom_Parabola) aParabola = new Geom_Parabola(aParab);
Handle(Geom_TrimmedCurve) aParabTrimmed =
Handle_Geom_Parabola aParabola = new Geom_Parabola(aParab);
Handle_Geom_TrimmedCurve aParabTrimmed =
new Geom_TrimmedCurve(aParabola,-300,300,Standard_True);
drawCurve(aParabTrimmed);
@@ -218,8 +218,8 @@ void DCA_Presentation::sampleParabola()
if(WAIT_A_LITTLE) return;
Handle(Geom_Parabola) aParabola1 = new Geom_Parabola(aParab1);
Handle(Geom_TrimmedCurve) aParabTrimmed1 = new Geom_TrimmedCurve(aParabola1,-300,300,Standard_True);
Handle_Geom_Parabola aParabola1 = new Geom_Parabola(aParab1);
Handle_Geom_TrimmedCurve aParabTrimmed1 = new Geom_TrimmedCurve(aParabola1,-300,300,Standard_True);
drawCurve(aParabTrimmed1);
}
//================================================================
@@ -283,8 +283,8 @@ void DCA_Presentation::sampleHyperbola()
if(WAIT_A_LITTLE) return;
Handle(Geom_Hyperbola) aHyperbola1 = new Geom_Hyperbola(aHypr1);
Handle(Geom_TrimmedCurve) aHyprTrimmed =
Handle_Geom_Hyperbola aHyperbola1 = new Geom_Hyperbola(aHypr1);
Handle_Geom_TrimmedCurve aHyprTrimmed =
new Geom_TrimmedCurve(aHyperbola1,-3,4,Standard_True);
drawCurve(aHyprTrimmed);
@@ -305,23 +305,23 @@ void DCA_Presentation::sampleHyperbola()
if(WAIT_A_LITTLE) return;
//output of display MajorRadius (yellow color)
Handle(Geom_Line) aLine = new Geom_Line(gce_MakeLin(aPointHypr1,aPointHypr2));
Handle(Geom_TrimmedCurve) aTrimmed1 =
Handle_Geom_Line aLine = new Geom_Line(gce_MakeLin(aPointHypr1,aPointHypr2));
Handle_Geom_TrimmedCurve aTrimmed1 =
new Geom_TrimmedCurve(aLine, 0, aPointHypr1.Distance(aPointHypr2));
drawCurve(aTrimmed1,Quantity_Color(Quantity_NOC_YELLOW));
if(WAIT_A_LITTLE) return;
//output of display MinorRadius (yellow color)
Handle(Geom_Line) aLine1 = new Geom_Line(gce_MakeLin(aPointHypr3, gp_Dir(0,-1,0)));
Handle(Geom_TrimmedCurve) aTrimmed2 = new Geom_TrimmedCurve(aLine1, 0,100);
Handle_Geom_Line aLine1 = new Geom_Line(gce_MakeLin(aPointHypr3, gp_Dir(0,-1,0)));
Handle_Geom_TrimmedCurve aTrimmed2 = new Geom_TrimmedCurve(aLine1, 0,100);
drawCurve(aTrimmed2,Quantity_Color(Quantity_NOC_YELLOW));
if(WAIT_A_LITTLE) return;
//output hyperbola
Handle(Geom_Hyperbola) aHyperbola2 = new Geom_Hyperbola(aHypr2);
Handle(Geom_TrimmedCurve) aHyprTrimmed1 =
Handle_Geom_Hyperbola aHyperbola2 = new Geom_Hyperbola(aHypr2);
Handle_Geom_TrimmedCurve aHyprTrimmed1 =
new Geom_TrimmedCurve(aHyperbola2,-2,2,Standard_True);
drawCurve(aHyprTrimmed1);
}
@@ -396,8 +396,8 @@ void DCA_Presentation::sampleCircle()
if(WAIT_A_LITTLE) return;
//output radius
Handle(Geom_Line) aLine = new Geom_Line(gce_MakeLin (aCenterPoint,gp_Dir(0,0,1)));
Handle(Geom_TrimmedCurve) aTrimmed = new Geom_TrimmedCurve(aLine,0,300);
Handle_Geom_Line aLine = new Geom_Line(gce_MakeLin (aCenterPoint,gp_Dir(0,0,1)));
Handle_Geom_TrimmedCurve aTrimmed = new Geom_TrimmedCurve(aLine,0,300);
drawCurve(aTrimmed,Quantity_Color(Quantity_NOC_WHITE));
if(WAIT_A_LITTLE) return;
@@ -519,16 +519,16 @@ void DCA_Presentation::sampleEllipse()
gp_Lin aLine1 = aMakeLin1.Value();
//output MajorRadius
Handle(Geom_Line) aLineMajorRadius = new Geom_Line(aLine);
Handle(Geom_TrimmedCurve) aTrimmed =
Handle_Geom_Line aLineMajorRadius = new Geom_Line(aLine);
Handle_Geom_TrimmedCurve aTrimmed =
new Geom_TrimmedCurve(aLineMajorRadius,0,120);
drawCurve(aTrimmed,Quantity_Color(Quantity_NOC_WHITE));
if(WAIT_A_LITTLE) return;
//output MinorRadius
Handle(Geom_Line) aLineMinorrRadius = new Geom_Line(aLine1);
Handle(Geom_TrimmedCurve) aTrimmed1 =
Handle_Geom_Line aLineMinorrRadius = new Geom_Line(aLine1);
Handle_Geom_TrimmedCurve aTrimmed1 =
new Geom_TrimmedCurve(aLineMinorrRadius,0,300);
drawCurve(aTrimmed1,Quantity_Color(Quantity_NOC_WHITE));
@@ -588,8 +588,8 @@ void DCA_Presentation::samplePlane()
if(WAIT_A_LITTLE) return;
Handle(Geom_Plane) aPln = new Geom_Plane(aPlane);
Handle(Geom_RectangularTrimmedSurface) aPlnTrimmed =
Handle_Geom_Plane aPln = new Geom_Plane(aPlane);
Handle_Geom_RectangularTrimmedSurface aPlnTrimmed =
new Geom_RectangularTrimmedSurface(aPln,-300,300,-300,300,Standard_True,Standard_True);
drawSurface(aPlnTrimmed);
@@ -604,8 +604,8 @@ void DCA_Presentation::samplePlane()
if(WAIT_A_LITTLE) return;
Handle(Geom_Plane) aPln1 = new Geom_Plane(aPlane1);
Handle(Geom_RectangularTrimmedSurface) aPlnTrimmed1 =
Handle_Geom_Plane aPln1 = new Geom_Plane(aPlane1);
Handle_Geom_RectangularTrimmedSurface aPlnTrimmed1 =
new Geom_RectangularTrimmedSurface(aPln1,-200,300,-200,300,Standard_True,Standard_True);
drawSurface(aPlnTrimmed1);
@@ -693,14 +693,14 @@ void DCA_Presentation::sampleCylindricalSurface()
gp_Dir aDir1(0,0,1);
gce_MakeLin aMakeLin(aCenterPoint,aDir1);
gp_Lin aLin = aMakeLin.Value();
Handle(Geom_Line) aLine = new Geom_Line(aLin);
Handle(Geom_TrimmedCurve) aTrimmed = new Geom_TrimmedCurve(aLine,-100,0);
Handle_Geom_Line aLine = new Geom_Line(aLin);
Handle_Geom_TrimmedCurve aTrimmed = new Geom_TrimmedCurve(aLine,-100,0);
drawCurve(aTrimmed,Quantity_Color(Quantity_NOC_WHITE));
if(WAIT_A_LITTLE) return;
// output cylinder
Handle(Geom_CylindricalSurface) aCylSurface =
Handle_Geom_CylindricalSurface aCylSurface =
new Geom_CylindricalSurface(aCyl);
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed =
Handle_Geom_RectangularTrimmedSurface aCylTrimmed =
new Geom_RectangularTrimmedSurface(aCylSurface,0,2*PI,-200,300,Standard_True,Standard_True);
drawSurface(aCylTrimmed);
if(WAIT_A_LITTLE) return;
@@ -716,14 +716,14 @@ void DCA_Presentation::sampleCylindricalSurface()
drawVector(aCylinderPoint2,gp_Vec(aCylinderPoint2,aCylinderPoint3)*3,Quantity_Color(Quantity_NOC_WHITE));
if(WAIT_A_LITTLE) return;
//output radius
Handle(Geom_Line) aLine1 = new Geom_Line(gce_MakeLin(aCylinderPoint1,aDir1));
Handle(Geom_TrimmedCurve) aTrimmed1 = new Geom_TrimmedCurve(aLine1,-80,0);
Handle_Geom_Line aLine1 = new Geom_Line(gce_MakeLin(aCylinderPoint1,aDir1));
Handle_Geom_TrimmedCurve aTrimmed1 = new Geom_TrimmedCurve(aLine1,-80,0);
drawCurve(aTrimmed1,Quantity_Color(Quantity_NOC_WHITE));
if(WAIT_A_LITTLE) return;
//output cylinder
Handle(Geom_CylindricalSurface) aCylSurface1 =
Handle_Geom_CylindricalSurface aCylSurface1 =
new Geom_CylindricalSurface(aCyl1);
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed1 =
Handle_Geom_RectangularTrimmedSurface aCylTrimmed1 =
new Geom_RectangularTrimmedSurface(aCylSurface1,0,2*PI,-300,100,Standard_True,Standard_True);
drawSurface(aCylTrimmed1);
if(WAIT_A_LITTLE) return;
@@ -731,17 +731,17 @@ void DCA_Presentation::sampleCylindricalSurface()
//METHOD 3.(output of dispay)
//output base cylinder
Handle(Geom_CylindricalSurface) aCylSurf = new Geom_CylindricalSurface(aCylinder);
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed2 =
Handle_Geom_CylindricalSurface aCylSurf = new Geom_CylindricalSurface(aCylinder);
Handle_Geom_RectangularTrimmedSurface aCylTrimmed2 =
new Geom_RectangularTrimmedSurface(aCylSurf,0,2*PI,-200,200,Standard_True,Standard_True);
drawSurface(aCylTrimmed2 ,Quantity_Color(Quantity_NOC_WHITE));
//output point
drawPoint(aCylinderPoint4);
if(WAIT_A_LITTLE) return;
//output cylinder
Handle(Geom_CylindricalSurface) aCylSurface2 =
Handle_Geom_CylindricalSurface aCylSurface2 =
new Geom_CylindricalSurface(aCyl2);
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed3 =
Handle_Geom_RectangularTrimmedSurface aCylTrimmed3 =
new Geom_RectangularTrimmedSurface(aCylSurface2,0,2*PI,-200,200,Standard_True,Standard_True);
drawSurface(aCylTrimmed3);
if(WAIT_A_LITTLE) return;
@@ -753,9 +753,9 @@ void DCA_Presentation::sampleCylindricalSurface()
drawCurve(new Geom_Circle(aCirc),Quantity_Color(Quantity_NOC_WHITE));
if(WAIT_A_LITTLE) return;
//output cylinder
Handle(Geom_CylindricalSurface) aCylSurface3 =
Handle_Geom_CylindricalSurface aCylSurface3 =
new Geom_CylindricalSurface(aCyl3);
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed4 =
Handle_Geom_RectangularTrimmedSurface aCylTrimmed4 =
new Geom_RectangularTrimmedSurface(aCylSurface3,0,2*PI,-200,200,Standard_True,Standard_True);
drawSurface(aCylTrimmed4);
}
@@ -800,8 +800,8 @@ void DCA_Presentation::sampleToroidalSurface()
if(WAIT_A_LITTLE) return;
//output MajorRadius
Handle(Geom_Line) R1 = new Geom_Line(gce_MakeLin(aCenterPoint, gp_Dir(0,1,0)));
Handle(Geom_TrimmedCurve) aTrimmedR1 = new Geom_TrimmedCurve(R1,0,MajorRadius);
Handle_Geom_Line R1 = new Geom_Line(gce_MakeLin(aCenterPoint, gp_Dir(0,1,0)));
Handle_Geom_TrimmedCurve aTrimmedR1 = new Geom_TrimmedCurve(R1,0,MajorRadius);
drawCurve(aTrimmedR1, Quantity_Color(Quantity_NOC_WHITE));
drawCurve(new Geom_Circle(anAx3.Ax2(), MajorRadius));
@@ -809,7 +809,7 @@ void DCA_Presentation::sampleToroidalSurface()
// output MinorRadius as a circle
gp_Ax2 aMinorRadAx(aTrimmedR1->EndPoint(), gp_Dir(0,0,1));
Handle(Geom_Circle) aMinorRadCirc = new Geom_Circle(aMinorRadAx, MinorRadius);
Handle_Geom_Circle aMinorRadCirc = new Geom_Circle(aMinorRadAx, MinorRadius);
drawCurve(aMinorRadCirc);
if(WAIT_A_LITTLE) return;
@@ -915,28 +915,28 @@ void DCA_Presentation::sampleConicalSurface()
gp_Dir aDir1(0,1,0);
//output first radius
Handle(Geom_Line) aLine = new Geom_Line(gce_MakeLin(aConePnt,aDir1));
Handle(Geom_TrimmedCurve) aTrimmed = new Geom_TrimmedCurve(aLine,0,100);
Handle_Geom_Line aLine = new Geom_Line(gce_MakeLin(aConePnt,aDir1));
Handle_Geom_TrimmedCurve aTrimmed = new Geom_TrimmedCurve(aLine,0,100);
drawCurve(aTrimmed,Quantity_Color(Quantity_NOC_WHITE));
//output second radius
Handle(Geom_Line) aLine1 = new Geom_Line(gce_MakeLin(aConePnt1,aDir1));
Handle(Geom_TrimmedCurve) aTrimmed1 = new Geom_TrimmedCurve(aLine1,0,50);
Handle_Geom_Line aLine1 = new Geom_Line(gce_MakeLin(aConePnt1,aDir1));
Handle_Geom_TrimmedCurve aTrimmed1 = new Geom_TrimmedCurve(aLine1,0,50);
drawCurve(aTrimmed1,Quantity_Color(Quantity_NOC_WHITE));
if(WAIT_A_LITTLE) return;
//output ruling of cone
Handle(Geom_Line) aLine2 = new Geom_Line(gce_MakeLin(aConePnt,aConePnt1));
Handle(Geom_TrimmedCurve) aTrimmed2 =
Handle_Geom_Line aLine2 = new Geom_Line(gce_MakeLin(aConePnt,aConePnt1));
Handle_Geom_TrimmedCurve aTrimmed2 =
new Geom_TrimmedCurve(aLine2,0,aConePnt.Distance(aConePnt1));
drawCurve(aTrimmed2,Quantity_Color(Quantity_NOC_RED));
if(WAIT_A_LITTLE) return;
//output cone
Handle(Geom_ConicalSurface) aConSurface1 = new Geom_ConicalSurface(aCone1);
Handle(Geom_RectangularTrimmedSurface) aConTrimmed1 =
Handle_Geom_ConicalSurface aConSurface1 = new Geom_ConicalSurface(aCone1);
Handle_Geom_RectangularTrimmedSurface aConTrimmed1 =
new Geom_RectangularTrimmedSurface(aConSurface1,0,2*PI,-50,450,Standard_True,Standard_True);
drawSurface(aConTrimmed1);
@@ -955,18 +955,18 @@ void DCA_Presentation::sampleConicalSurface()
if(WAIT_A_LITTLE) return;
//output of first radius
Handle(Geom_Line) aLineR1 = new Geom_Line(gce_MakeLin (aConePnt,aDir1));
Handle(Geom_TrimmedCurve) aTrimmedR1 = new Geom_TrimmedCurve(aLineR1,0,Radius1);
Handle_Geom_Line aLineR1 = new Geom_Line(gce_MakeLin (aConePnt,aDir1));
Handle_Geom_TrimmedCurve aTrimmedR1 = new Geom_TrimmedCurve(aLineR1,0,Radius1);
drawCurve(aTrimmedR1,Quantity_Color(Quantity_NOC_WHITE));
//output of second radius
Handle(Geom_Line) aLineR2 = new Geom_Line(gce_MakeLin (aConePnt2,aDir1));
Handle(Geom_TrimmedCurve) aTrimmedR2 = new Geom_TrimmedCurve(aLineR2,0,Radius2);
Handle_Geom_Line aLineR2 = new Geom_Line(gce_MakeLin (aConePnt2,aDir1));
Handle_Geom_TrimmedCurve aTrimmedR2 = new Geom_TrimmedCurve(aLineR2,0,Radius2);
drawCurve(aTrimmedR2,Quantity_Color(Quantity_NOC_WHITE));
//output cone
Handle(Geom_ConicalSurface) aConSurface2 = new Geom_ConicalSurface(aCone2);
Handle(Geom_RectangularTrimmedSurface) aConTrimmed2 =
Handle_Geom_ConicalSurface aConSurface2 = new Geom_ConicalSurface(aCone2);
Handle_Geom_RectangularTrimmedSurface aConTrimmed2 =
new Geom_RectangularTrimmedSurface(aConSurface2,0,2*PI,-120,400,Standard_True,Standard_True);
drawSurface(aConTrimmed2);
@@ -981,13 +981,13 @@ void DCA_Presentation::sampleConicalSurface()
if(WAIT_A_LITTLE) return;
//output radius
Handle(Geom_Line) aLine3 = new Geom_Line(gce_MakeLin (aCenterPoint,aDir1));
Handle(Geom_TrimmedCurve) aTrimmed3 = new Geom_TrimmedCurve(aLine3,0,70);
Handle_Geom_Line aLine3 = new Geom_Line(gce_MakeLin (aCenterPoint,aDir1));
Handle_Geom_TrimmedCurve aTrimmed3 = new Geom_TrimmedCurve(aLine3,0,70);
drawCurve(aTrimmed3 ,Quantity_Color(Quantity_NOC_WHITE));
//output cone
Handle(Geom_ConicalSurface) aConSurface3 = new Geom_ConicalSurface(aCone3);
Handle(Geom_RectangularTrimmedSurface) aConTrimmed =
Handle_Geom_ConicalSurface aConSurface3 = new Geom_ConicalSurface(aCone3);
Handle_Geom_RectangularTrimmedSurface aConTrimmed =
new Geom_RectangularTrimmedSurface(aConSurface3,0,2*PI,-300,300,Standard_True,Standard_True);
drawSurface(aConTrimmed);
@@ -1011,30 +1011,30 @@ void DCA_Presentation::sampleConicalSurface()
if(WAIT_A_LITTLE) return;
//output ruling of cone
Handle(Geom_Line) aLine4 = new Geom_Line(gce_MakeLin (aPoint_3,aPoint_4));
Handle(Geom_TrimmedCurve) aTrimmed4 =
Handle_Geom_Line aLine4 = new Geom_Line(gce_MakeLin (aPoint_3,aPoint_4));
Handle_Geom_TrimmedCurve aTrimmed4 =
new Geom_TrimmedCurve(aLine4,0,aPoint_3.Distance(aPoint_4));
drawCurve(aTrimmed4 ,Quantity_Color(Quantity_NOC_RED));
if(WAIT_A_LITTLE) return;
//output first radius
Handle(Geom_Line) aLine5 = new Geom_Line(gce_MakeLin (aPoint_3,aDir1));
Handle(Geom_TrimmedCurve) aTrimmed5 = new Geom_TrimmedCurve(aLine5,0,50);
Handle_Geom_Line aLine5 = new Geom_Line(gce_MakeLin (aPoint_3,aDir1));
Handle_Geom_TrimmedCurve aTrimmed5 = new Geom_TrimmedCurve(aLine5,0,50);
drawCurve(aTrimmed5 ,Quantity_Color(Quantity_NOC_WHITE));
if(WAIT_A_LITTLE) return;
//output second radius
Handle(Geom_Line) aLine6 = new Geom_Line(gce_MakeLin (aPoint_4,aDir1));
Handle(Geom_TrimmedCurve) aTrimmed6 = new Geom_TrimmedCurve(aLine6,0,60);
Handle_Geom_Line aLine6 = new Geom_Line(gce_MakeLin (aPoint_4,aDir1));
Handle_Geom_TrimmedCurve aTrimmed6 = new Geom_TrimmedCurve(aLine6,0,60);
drawCurve(aTrimmed6 ,Quantity_Color(Quantity_NOC_WHITE));
if(WAIT_A_LITTLE) return;
//output cone
Handle(Geom_ConicalSurface) aConSurface4 = new Geom_ConicalSurface(aCone4);
Handle(Geom_RectangularTrimmedSurface) aConTrimmed4 =
Handle_Geom_ConicalSurface aConSurface4 = new Geom_ConicalSurface(aCone4);
Handle_Geom_RectangularTrimmedSurface aConTrimmed4 =
new Geom_RectangularTrimmedSurface(aConSurface4,0,2*PI,-300,300,Standard_True,Standard_True);
drawSurface(aConTrimmed4);

View File

@@ -199,7 +199,7 @@ void Extrema_Presentation::sampleCurveSur()
TCollection_AsciiString aText(
" // the curve - first object for finding the extrema." EOL
" Handle(Geom_Curve) aCurve;" EOL
" Handle(TColgp_HArray1OfPnt) aPoles = new TColgp_HArray1OfPnt(1, 4);" EOL EOL
" Handle_TColgp_HArray1OfPnt aPoles = new TColgp_HArray1OfPnt(1, 4);" EOL EOL
" // points to build the curves" EOL
" Standard_Real a[][3] = {{2,1,10},{0,12,0},{5,6,0},{0,10,11}}; " EOL EOL
@@ -239,7 +239,7 @@ void Extrema_Presentation::sampleCurveSur()
// the curve - first object for finding the extrema.
Handle(Geom_Curve) aCurve;
Handle(TColgp_HArray1OfPnt) aPoles = new TColgp_HArray1OfPnt(1, 4);
Handle_TColgp_HArray1OfPnt aPoles = new TColgp_HArray1OfPnt(1, 4);
// points to build the curves
Standard_Real a[][3] = {{2,1,10},{0,12,0},{5,6,0},{0,10,11}};
@@ -429,7 +429,7 @@ void Extrema_Presentation::sampleShellShell()
" for (Standard_Integer j=0; j < 3; j++)" EOL
" aSurPoles(i+1,j+1) = gp_Pnt (aSurCoords[i*3+j][0]*10-250, aSurCoords[i*3+j][1]*10-250, aSurCoords[i*3+j][2]*10-350);" EOL EOL
" Handle(Geom_BezierSurface) aSurface = new Geom_BezierSurface(aSurPoles);" EOL EOL
" Handle_Geom_BezierSurface aSurface = new Geom_BezierSurface(aSurPoles);" EOL EOL
" // creating a TopoDS_Shell from Geom_Surface" EOL
" TopoDS_Shell aShape2 = BRepBuilderAPI_MakeShell(aSurface);" EOL EOL
@@ -473,7 +473,7 @@ void Extrema_Presentation::sampleShellShell()
for (Standard_Integer j=0; j < 3; j++)
aSurPoles(i+1,j+1) = gp_Pnt (aSurCoords[i*3+j][0]*10-250, aSurCoords[i*3+j][1]*10-250, aSurCoords[i*3+j][2]*10-350);
Handle(Geom_BezierSurface) aSurface = new Geom_BezierSurface(aSurPoles);
Handle_Geom_BezierSurface aSurface = new Geom_BezierSurface(aSurPoles);
// creating a TopoDS_Shell from Geom_Surface
TopoDS_Shell aShape2 = BRepBuilderAPI_MakeShell(aSurface);
@@ -535,10 +535,10 @@ void Extrema_Presentation::doShapeShapeExtrema(const TopoDS_Shape& theShape1,
{
displayExtemaEdge(anExtrema.PointOnShape1(i), anExtrema.PointOnShape2(i));
Handle(AIS_Shape) aSupportShape1 = new AIS_Shape(anExtrema.SupportOnShape1(i));
Handle_AIS_Shape aSupportShape1 = new AIS_Shape(anExtrema.SupportOnShape1(i));
aSupportShape1->SetMaterial(Graphic3d_NOM_PLASTIC);
aSupportShape1->SetColor(Quantity_NOC_GRAY97);
Handle(AIS_Shape) aSupportShape2 = new AIS_Shape(anExtrema.SupportOnShape2(i));
Handle_AIS_Shape aSupportShape2 = new AIS_Shape(anExtrema.SupportOnShape2(i));
aSupportShape2->SetMaterial(Graphic3d_NOM_PLASTIC);
aSupportShape2->SetColor(Quantity_NOC_GRAY97);
getAISContext()->Display(aSupportShape1, Standard_False);

View File

@@ -241,7 +241,7 @@ Standard_Boolean GProps_Presentation::GProps(GProp_GProps& aProps,
if (WAIT_A_SECOND) return Standard_False;
Handle(AIS_Point) aPointIO = drawPoint(
Handle_AIS_Point aPointIO = drawPoint(
aCenterOfMass, MAIN_ELEMS_COLOR, Standard_False);
aPointIO->UnsetMarker();
aPointIO->SetMarker(Aspect_TOM_O);
@@ -265,7 +265,7 @@ Standard_Boolean GProps_Presentation::GProps(GProp_GProps& aProps,
}
// display the cirle with radius = aRadiusOfGyration
Handle(Geom_Circle) aCirc = new Geom_Circle(anInertialCoordSys, aRadiusOfGyration);
Handle_Geom_Circle aCirc = new Geom_Circle(anInertialCoordSys, aRadiusOfGyration);
drawCurve(aCirc, CUSTOM_INERTIAL_ELEMS_COLOR);
return Standard_True;
@@ -327,7 +327,7 @@ void GProps_Presentation::samplePoints()
//if (WAIT_A_SECOND) return;
Handle(AIS_Point) aPointIO = drawPoint(
Handle_AIS_Point aPointIO = drawPoint(
aBaryCentre, MAIN_ELEMS_COLOR, Standard_False);
aPointIO->SetMarker(Aspect_TOM_STAR);
getAISContext()->Display(aPointIO);
@@ -373,7 +373,7 @@ void GProps_Presentation::sampleCurves()
aPoints(i+1) = gp_Pnt (aCoords[i][0]*k, aCoords[i][1]*k, aCoords[i][2]*k);
// edge 2 is a bezier curve that starts in edge1's end point
Handle(Geom_BezierCurve) aCurve = new Geom_BezierCurve(aPoints);
Handle_Geom_BezierCurve aCurve = new Geom_BezierCurve(aPoints);
TopoDS_Edge anEdge2 = BRepBuilderAPI_MakeEdge(aCurve);
// edge 1 is a linear edge between 2 points
@@ -575,9 +575,9 @@ void GProps_Presentation::sampleSystem()
for (Standard_Integer i=0; i < nPoints; i++)
aPoints(i+1) = gp_Pnt (aCoords[i][0]*k, aCoords[i][1]*k, aCoords[i][2]*k);
Handle(Geom_BezierCurve) aCurve = new Geom_BezierCurve(aPoints);
Handle_Geom_BezierCurve aCurve = new Geom_BezierCurve(aPoints);
gp_Ax1 anAxis(aPoints(1), gp_Dir(0,1,0));
Handle(Geom_SurfaceOfRevolution) aSurface = new Geom_SurfaceOfRevolution(aCurve, anAxis);
Handle_Geom_SurfaceOfRevolution aSurface = new Geom_SurfaceOfRevolution(aCurve, anAxis);
TopoDS_Solid aSolid = BRepBuilderAPI_MakeSolid(BRepBuilderAPI_MakeShell(aSurface));
TopoDS_Edge e1 = BRepBuilderAPI_MakeEdge(gp_Pnt(5*k, 2*k, 0), gp_Pnt(12*k, 7*k, 0));
@@ -595,8 +595,8 @@ void GProps_Presentation::sampleSystem()
aBuilder.Perform(aWing1, Standard_True);
TopoDS_Face aWing2 = TopoDS::Face(aBuilder.Shape());
Handle(Geom_Circle) aCirc = new Geom_Circle(gp_Ax2(gp_Pnt(3*k, 11*k, 0), gp_Dir(0,-0.2,0.8)), (12-3)*k);
Handle(Geom_TrimmedCurve) aTrimCirc = new Geom_TrimmedCurve(aCirc, -PI/2, PI/2);
Handle_Geom_Circle aCirc = new Geom_Circle(gp_Ax2(gp_Pnt(3*k, 11*k, 0), gp_Dir(0,-0.2,0.8)), (12-3)*k);
Handle_Geom_TrimmedCurve aTrimCirc = new Geom_TrimmedCurve(aCirc, -PI/2, PI/2);
TopoDS_Edge aSpoiler = BRepBuilderAPI_MakeEdge(aTrimCirc);
TopoDS_Edge anArrow = BRepBuilderAPI_MakeEdge(gp_Pnt(3*k, 0, 0), gp_Pnt(3*k, -5*k, 0));

View File

@@ -95,7 +95,7 @@ void GeomConstraints_Presentation::DoSample()
// Function creating Surface,BSPline,Bezier and 2dBSpline Curves
//=========================================================================================
static Handle(Geom_BSplineCurve) createBSplineCurve(const Standard_Integer nPoles,
static Handle_Geom_BSplineCurve createBSplineCurve(const Standard_Integer nPoles,
const Standard_Real theCoords[][3])
{
TColgp_Array1OfPnt aCurvePoint (1, nPoles);
@@ -111,7 +111,7 @@ static Handle(Geom_BSplineCurve) createBSplineCurve(const Standard_Integer nPole
}
static Handle(Geom_BezierCurve) createBezierCurve(const Standard_Integer nPoles,
static Handle_Geom_BezierCurve createBezierCurve(const Standard_Integer nPoles,
const Standard_Real theCoords[][3])
{
TColgp_Array1OfPnt aCurvePoint (1, nPoles);
@@ -123,7 +123,7 @@ static Handle(Geom_BezierCurve) createBezierCurve(const Standard_Integer nPoles,
return aBCurve;
}
static Handle(Geom2d_BSplineCurve) battenCurve(const Standard_Real& theAngle1,
static Handle_Geom2d_BSplineCurve battenCurve(const Standard_Real& theAngle1,
const Standard_Real& theAngle2)
{
//define points
@@ -149,10 +149,10 @@ static Handle(Geom2d_BSplineCurve) battenCurve(const Standard_Real& theAngle1,
}
static Handle(Geom_Surface) createSurface(
static Handle_Geom_Surface createSurface(
const Standard_Integer endBound,
TColgp_Array1OfPnt& thePoint,
const Handle(Geom_Plane)& thePlane)
const Handle_Geom_Plane& thePlane)
{
Standard_Integer Degree = 3;
Standard_Integer NbPtsOnCur = 10;
@@ -630,7 +630,7 @@ void GeomConstraints_Presentation::sample3()
}
aFile.close();
Handle(AIS_InteractiveObject) anIO,aNewIO;
Handle_AIS_InteractiveObject anIO,aNewIO;
for(Standard_Integer j = 1; j <= int(aSize / 20); j++)
{

View File

@@ -168,9 +168,9 @@ void Glue_Presentation::sampleCylinder()
TopoDS_Edge e4 = BRepBuilderAPI_MakeEdge(gp_Pnt(24,0,0),gp_Pnt(24,15,0));
TopoDS_Edge e5 = BRepBuilderAPI_MakeEdge(gp_Pnt(24,15,0),gp_Pnt(0,15,0));
TopoDS_Edge e6 = BRepBuilderAPI_MakeEdge(gp_Pnt(0,15,0),gp_Pnt(0,0,0));
Handle(Geom_Circle) e2C = new Geom_Circle(gp_Ax2(gp_Pnt(12,0,0), gp_Dir(0,0,1)), 7);
Handle_Geom_Circle e2C = new Geom_Circle(gp_Ax2(gp_Pnt(12,0,0), gp_Dir(0,0,1)), 7);
e2C->Rotate(gp_Ax1(gp_Pnt(12,0,0),gp_Dir(0,0,1)),PI);
Handle(Geom_TrimmedCurve) e2A = new Geom_TrimmedCurve(e2C, PI, 2*PI);
Handle_Geom_TrimmedCurve e2A = new Geom_TrimmedCurve(e2C, PI, 2*PI);
TopoDS_Edge e2 = BRepBuilderAPI_MakeEdge(e2A);
BRepBuilderAPI_MakeWire wireMaker(e1,e2,e3,e4);
@@ -311,7 +311,7 @@ void Glue_Presentation::sampleMoreBoxes()
// Purpose : display a shape in wire frame mode
//================================================================
Standard_Boolean Glue_Presentation::drawShapeWf(TopoDS_Shape& aShape,
Handle(AIS_InteractiveObject)& io)
Handle_AIS_InteractiveObject& io)
{
io = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False);
getAISContext()->SetDisplayMode(io, AIS_WireFrame, Standard_False);
@@ -325,7 +325,7 @@ Standard_Boolean Glue_Presentation::drawShapeWf(TopoDS_Shape& aShape,
// Purpose : display a shape in shaded mode
//================================================================
Standard_Boolean Glue_Presentation::drawShapeSh(TopoDS_Shape& aShape,
Handle(AIS_InteractiveObject)& io)
Handle_AIS_InteractiveObject& io)
{
io = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False);
getAISContext()->SetDisplayMode(io, AIS_Shaded, Standard_False);
@@ -346,7 +346,7 @@ Standard_Boolean Glue_Presentation::displayShapesFaces(TopoDS_Shape& aShape1,
TopTools_ListOfShape& aEdges1,
TopTools_ListOfShape& aEdges2)
{
Handle(AIS_Shape) io1,io2,io3,io4,io5,io6;
Handle_AIS_Shape io1,io2,io3,io4,io5,io6;
if (!drawShapeSh(aShape1, io1)) return Standard_False;
if (!drawShapeSh(aShape2, io2)) return Standard_False;

View File

@@ -13,8 +13,8 @@
class GProp_Glue;
class TCollection_AsciiString;
class TopoDS_Shape;
class AIS_InteractiveObject;
#include <TopTools_ListOfShape.hxx>
class Handle_AIS_InteractiveObject;
class TopTools_ListOfShape;
class Glue_Presentation : public OCCDemo_Presentation
{
@@ -37,10 +37,10 @@ private:
TopTools_ListOfShape&, TopTools_ListOfShape&);
// display a given shape in wire frame mode
Standard_Boolean drawShapeWf(TopoDS_Shape&,Handle(AIS_InteractiveObject)&);
Standard_Boolean drawShapeWf(TopoDS_Shape&,Handle_AIS_InteractiveObject&);
// display a given shape in shaded mode
Standard_Boolean drawShapeSh(TopoDS_Shape&,Handle(AIS_InteractiveObject)&);
Standard_Boolean drawShapeSh(TopoDS_Shape&,Handle_AIS_InteractiveObject&);
void sampleBoxes();
void sampleCylinder();

View File

@@ -78,11 +78,11 @@ void HLR_Presentation::DoSample()
// Purpose : returns Prs3d_Projector object created corresponding
// to the current view parameters
//================================================================
Handle(Prs3d_Projector) HLR_Presentation::Projector(gp_Trsf& theTrsf)
Handle_Prs3d_Projector HLR_Presentation::Projector(gp_Trsf& theTrsf)
{
// retrieve view parameters for creation of Prs3d_Projector object
getViewer()->InitActiveViews();
Handle(V3d_View) aView = getViewer()->ActiveView();
Handle_V3d_View aView = getViewer()->ActiveView();
Standard_Real aProjVecX, aProjVecY, aProjVecZ;
aView->Proj(aProjVecX, aProjVecY, aProjVecZ);
@@ -93,7 +93,7 @@ Handle(Prs3d_Projector) HLR_Presentation::Projector(gp_Trsf& theTrsf)
Standard_Real aPntX = 0.0, aPntY = 0.0, aPntZ = 0.0;
// create a projector object
Handle(Prs3d_Projector) aProjector = new Prs3d_Projector(Standard_False, 0.0,
Handle_Prs3d_Projector aProjector = new Prs3d_Projector(Standard_False, 0.0,
aProjVecX, aProjVecY, aProjVecZ, aPntX, aPntY, aPntZ, aUpX, aUpY, aUpZ);
gp_Pnt At (aPntX,aPntY,aPntZ);
@@ -122,14 +122,14 @@ Standard_Boolean HLR_Presentation::HLR(const TopoDS_Shape& aShape, const Standar
" // initializing aShape ..." EOL
"" EOL
" // Build The algorithm object" EOL
" Handle(HLRBRep_Algo) myAlgo = new HLRBRep_Algo();" EOL
" Handle_HLRBRep_Algo myAlgo = new HLRBRep_Algo();" EOL
" " EOL
" // Add Shapes into the algorithm" EOL
" Standard_Real nbIso = 5; // number of isolines to display" EOL
" myAlgo->Add(aShape, nbIso);" EOL
"" EOL
" // create a projector object" EOL
" Handle(V3d_View) aView;" EOL
" Handle_V3d_View aView;" EOL
" // initializing V3d_View ..." EOL
" " EOL
" Standard_Real aProjVecX, aProjVecY, aProjVecZ;" EOL
@@ -141,7 +141,7 @@ Standard_Boolean HLR_Presentation::HLR(const TopoDS_Shape& aShape, const Standar
" Standard_Real aPntX = 0.0, aPntY = 0.0, aPntZ = 0.0;" EOL
"" EOL
" // create a projector object" EOL
" Handle(Prs3d_Projector) aProjector = new Prs3d_Projector(Standard_False, 0.0, " EOL
" Handle_Prs3d_Projector aProjector = new Prs3d_Projector(Standard_False, 0.0, " EOL
" aProjVecX, aProjVecY, aProjVecZ, aPntX, aPntY, aPntZ, aUpX, aUpY, aUpZ);" EOL
" " EOL
" // Set The Projector" EOL
@@ -189,7 +189,7 @@ Standard_Boolean HLR_Presentation::HLR(const TopoDS_Shape& aShape, const Standar
" Isolines - YELLOW" EOL);
// Build The algorithm object
Handle(HLRBRep_Algo) myAlgo = new HLRBRep_Algo();
Handle_HLRBRep_Algo myAlgo = new HLRBRep_Algo();
// Add Shapes into the algorithm
myAlgo->Add(aShape, nbIso);
@@ -234,7 +234,7 @@ Standard_Boolean HLR_Presentation::HLR(const TopoDS_Shape& aShape, const Standar
TopoDS_Shape OutLineHCompound = aHLRToShape.OutLineHCompound();
TopoDS_Shape IsoLineHCompound = aHLRToShape.IsoLineHCompound();
Handle(AIS_Shape) aShapeIO = drawShape(aShape);
Handle_AIS_Shape aShapeIO = drawShape(aShape);
if (WAIT_A_SECOND) return Standard_False;
@@ -268,13 +268,13 @@ Standard_Boolean HLR_Presentation::PolyHLR(const TopoDS_Shape& aShape)
" // triangulating aShape with BRepMesh::Mesh" EOL
"" EOL
" // Build The algorithm object" EOL
" Handle(HLRBRep_PolyAlgo) myPolyAlgo = new HLRBRep_PolyAlgo();" EOL
" Handle_HLRBRep_PolyAlgo myPolyAlgo = new HLRBRep_PolyAlgo();" EOL
" " EOL
" // Add Shapes into the algorithm" EOL
" myPolyAlgo->Load(aShape);" EOL
"" EOL
" // create a projector object" EOL
" Handle(V3d_View) aView;" EOL
" Handle_V3d_View aView;" EOL
" // initializing V3d_View ..." EOL
" " EOL
" Standard_Real aProjVecX, aProjVecY, aProjVecZ;" EOL
@@ -286,7 +286,7 @@ Standard_Boolean HLR_Presentation::PolyHLR(const TopoDS_Shape& aShape)
" Standard_Real aPntX = 0.0, aPntY = 0.0, aPntZ = 0.0;" EOL
"" EOL
" // create a projector object" EOL
" Handle(Prs3d_Projector) aProjector = new Prs3d_Projector(Standard_False, 0.0, " EOL
" Handle_Prs3d_Projector aProjector = new Prs3d_Projector(Standard_False, 0.0, " EOL
" aProjVecX, aProjVecY, aProjVecZ, aPntX, aPntY, aPntZ, aUpX, aUpY, aUpZ);" EOL
" " EOL
" // Set The Projector" EOL
@@ -328,7 +328,7 @@ Standard_Boolean HLR_Presentation::PolyHLR(const TopoDS_Shape& aShape)
" Isolines - YELLOW" EOL);
// Build The algorithm object
Handle(HLRBRep_PolyAlgo) myPolyAlgo = new HLRBRep_PolyAlgo();
Handle_HLRBRep_PolyAlgo myPolyAlgo = new HLRBRep_PolyAlgo();
// Add Shapes into the algorithm
myPolyAlgo->Load(aShape);
@@ -367,7 +367,7 @@ Standard_Boolean HLR_Presentation::PolyHLR(const TopoDS_Shape& aShape)
TopoDS_Shape RgNLineHCompound = aPolyHLRToShape.RgNLineHCompound();
TopoDS_Shape OutLineHCompound = aPolyHLRToShape.OutLineHCompound();
Handle(AIS_Shape) aShapeIO = drawShape(aShape);
Handle_AIS_Shape aShapeIO = drawShape(aShape);
if (WAIT_A_SECOND) return Standard_False;
@@ -409,7 +409,7 @@ Standard_Boolean HLR_Presentation::drawHLR(TopoDS_Shape& aVShape,
aVShape.Location(aLoc);
// create a look for a line according to aColor and aLineType
Handle(AIS_Shape) anIO = drawShape(aVShape, aColor, Standard_False);
Handle_AIS_Shape anIO = drawShape(aVShape, aColor, Standard_False);
anIO->Attributes()->WireAspect()->SetTypeOfLine(Aspect_TOL_SOLID);
getAISContext()->Display(anIO, HShapeIsNull);
@@ -420,7 +420,7 @@ Standard_Boolean HLR_Presentation::drawHLR(TopoDS_Shape& aVShape,
aHShape.Location(aLoc);
// create a look for a line according to aColor and aLineType
Handle(AIS_Shape) anIO = drawShape(aHShape, aColor, Standard_False);
Handle_AIS_Shape anIO = drawShape(aHShape, aColor, Standard_False);
anIO->Attributes()->WireAspect()->SetTypeOfLine(Aspect_TOL_DASH);
getAISContext()->Display(anIO);
@@ -464,7 +464,7 @@ void HLR_Presentation::sampleTorus()
Standard_Real MinorRadius = 10;
//make torus
Handle(Geom_ToroidalSurface) aTorSurface = new Geom_ToroidalSurface(anAx3, MajorRadius, MinorRadius);
Handle_Geom_ToroidalSurface aTorSurface = new Geom_ToroidalSurface(anAx3, MajorRadius, MinorRadius);
TopoDS_Shell aShape = BRepBuilderAPI_MakeShell(aTorSurface);
Standard_Integer nbIso = 3;

View File

@@ -11,7 +11,7 @@
#include <OCCDemo_Presentation.h>
class TopoDS_Shape;
class Prs3d_Projector;
class Handle_Prs3d_Projector;
class gp_Trsf;
class TopLoc_Location;
@@ -28,7 +28,7 @@ public:
// one phase of iterations
private:
Handle(Prs3d_Projector) Projector(gp_Trsf& theTrsf);
Handle_Prs3d_Projector Projector(gp_Trsf& theTrsf);
Standard_Boolean HLR(const TopoDS_Shape&, const Standard_Integer nbIso);
Standard_Boolean PolyHLR(const TopoDS_Shape&);
Standard_Boolean drawHLR(TopoDS_Shape&, TopoDS_Shape&, const TopLoc_Location&,

View File

@@ -70,7 +70,7 @@ void Interpol_Presentation::DoSample()
// Output : vectors theTan, theNewTan.
// Returns : false if failed, true if ok.
//================================================================
static Standard_Boolean calculateNewTangent(const Handle(Geom_BSplineCurve)& anInterpolationCurve,
static Standard_Boolean calculateNewTangent(const Handle_Geom_BSplineCurve& anInterpolationCurve,
gp_Pnt aPointOnCurve, gp_Vec& theTan, gp_Vec& theNewTan,
Standard_Real angle)
{
@@ -128,7 +128,7 @@ void Interpol_Presentation::interpolate (Standard_Real aCoords[][3],
" aNoPeriodInterpolate.Perform();" EOL
" // check results" EOL
" if (!aNoPeriodInterpolate.IsDone()) return;" EOL
" Handle(Geom_BSplineCurve) anInterpolationCurve = aNoPeriodInterpolate.Curve();" EOL EOL
" Handle_Geom_BSplineCurve anInterpolationCurve = aNoPeriodInterpolate.Curve();" EOL EOL
" //===================================" EOL
" // Creating a constrained interpolation curve" EOL
@@ -183,9 +183,9 @@ void Interpol_Presentation::interpolate (Standard_Real aCoords[][3],
aNoPeriodInterpolate.Perform();
// check results
if (!aNoPeriodInterpolate.IsDone()) return;
Handle(Geom_BSplineCurve) anInterpolationCurve = aNoPeriodInterpolate.Curve();
Handle_Geom_BSplineCurve anInterpolationCurve = aNoPeriodInterpolate.Curve();
Handle(AIS_InteractiveObject) aShowCurve = drawCurve(anInterpolationCurve);
Handle_AIS_InteractiveObject aShowCurve = drawCurve(anInterpolationCurve);
if (WAIT_A_SECOND) return;
//===================================
@@ -197,7 +197,7 @@ void Interpol_Presentation::interpolate (Standard_Real aCoords[][3],
Standard_Real scaleVec = 1;
aCopyFlags->Init(Standard_False);
Handle(AIS_InteractiveObject) aShowTan;
Handle_AIS_InteractiveObject aShowTan;
for (i = indexes.Lower(); i <= indexes.Upper(); i++)
{
gp_Pnt aPoint = aPnts->Value(indexes(i));

View File

@@ -11,10 +11,10 @@
#include <OCCDemo_Presentation.h>
class Geom_BSplineCurve;
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
class Handle_Geom_BSplineCurve;
class Handle_TColgp_HArray1OfPnt;
class TColStd_Array1OfInteger;
class TColStd_Array1OfReal;
class Interpol_Presentation : public OCCDemo_Presentation
{

View File

@@ -70,7 +70,7 @@ void Intersections_Presentation::DoSample()
//////////////////////////////////////////////////////////////////////
static Handle(Geom2d_BSplineCurve) create2dBSplineCurve(const Standard_Integer thePoles,
static Handle_Geom2d_BSplineCurve create2dBSplineCurve(const Standard_Integer thePoles,
const Standard_Real theCoords[][2])
{
TColgp_Array1OfPnt2d thePoints(1, thePoles);
@@ -86,7 +86,7 @@ static Handle(Geom2d_BSplineCurve) create2dBSplineCurve(const Standard_Integer t
}
static Handle(Geom_BSplineSurface) createBSplineSurface(const Standard_Real theZCoords[],
static Handle_Geom_BSplineSurface createBSplineSurface(const Standard_Real theZCoords[],
const Standard_Real theXStep,
const Standard_Real theYStep,
const Standard_Real theXBound,

View File

@@ -145,7 +145,7 @@ void LProps_Presentation::sampleBezierSurface()
sizeof(aPoints)/(sizeof(Standard_Real)*2), aPoints);
}
void LProps_Presentation::showCurveLProps (Handle(Geom_Curve) theCurve,
void LProps_Presentation::showCurveLProps (Handle_Geom_Curve theCurve,
const Standard_CString theName,
const Standard_Integer theNbPoints,
const Standard_Real thePoints[])
@@ -283,7 +283,7 @@ void LProps_Presentation::showCurveLProps (Handle(Geom_Curve) theCurve,
}
}
void LProps_Presentation::showSurfaceLProps (Handle(Geom_Surface) theSurface,
void LProps_Presentation::showSurfaceLProps (Handle_Geom_Surface theSurface,
const Standard_CString theName,
const Standard_Integer theNbPoints,
const Standard_Real thePoints[][2])

View File

@@ -31,13 +31,13 @@ private:
void samplePBSpline();
void sampleBezierSurface();
void showCurveLProps (Handle(Geom_Curve) theCurve,
void showCurveLProps (Handle_Geom_Curve theCurve,
const Standard_CString theName,
const Standard_Integer theNbPoints,
const Standard_Real thePoints[]);
// Draws the curve, shows local properties and updates the result dialog
void showSurfaceLProps (Handle(Geom_Surface) theSurface,
void showSurfaceLProps (Handle_Geom_Surface theSurface,
const Standard_CString theName,
const Standard_Integer theNbPoints,
const Standard_Real thePoints[][2]);

View File

@@ -316,7 +316,7 @@ void Offset2d_Presentation::sampleWire2()
drawAndOffsetWire (aWire, aName, aText);
}
void Offset2d_Presentation::drawAndOffsetCurve2d (Handle(Geom2d_Curve) theCurve,
void Offset2d_Presentation::drawAndOffsetCurve2d (Handle_Geom2d_Curve theCurve,
const Standard_CString theName,
TCollection_AsciiString& theText)
{
@@ -339,7 +339,7 @@ void Offset2d_Presentation::drawAndOffsetCurve2d (Handle(Geom2d_Curve) theCurve,
getViewer()->ActiveView()->Update();
// Make offset curves
Handle(AIS_InteractiveObject) aObj;
Handle_AIS_InteractiveObject aObj;
for (int i=1; i <= SampleDescrs[myIndex].nNeg; i++)
{
if (WAIT_A_LITTLE)
@@ -381,7 +381,7 @@ void Offset2d_Presentation::drawAndOffsetWire(const TopoDS_Wire& theWire,
setResultText (theText.ToCString());
// Display theWire
Handle(AIS_InteractiveObject) aObj = new AIS_Shape (theWire);
Handle_AIS_InteractiveObject aObj = new AIS_Shape (theWire);
getAISContext()->SetColor (aObj, CurveColor);
getAISContext()->Display (aObj);
getViewer()->InitActiveViews();

View File

@@ -36,7 +36,7 @@ private:
void sampleWire1();
void sampleWire2();
void drawAndOffsetCurve2d (Handle(Geom2d_Curve) theCurve,
void drawAndOffsetCurve2d (Handle_Geom2d_Curve theCurve,
const Standard_CString theName,
TCollection_AsciiString& theText);
void drawAndOffsetWire (const TopoDS_Wire& theWire,

View File

@@ -78,7 +78,7 @@ void PointOnCurve_Presentation::DoSample()
// Purpose : creating a BSpline Curve
//================================================================
static Handle(Geom_BSplineCurve) CreateCurve()
static Handle_Geom_BSplineCurve CreateCurve()
{
Standard_Real aCoords[][3] =
{
@@ -196,7 +196,7 @@ void PointOnCurve_Presentation::sample1()
gce_MakeLin aLin(aPoint1, aPoint2);
Standard_Real aParam = aPoint1.Distance(aPoint2);
Handle(Geom_TrimmedCurve) aSeg = new Geom_TrimmedCurve(new Geom_Line(aLin), 0, aParam);
Handle_Geom_TrimmedCurve aSeg = new Geom_TrimmedCurve(new Geom_Line(aLin), 0, aParam);
drawCurve(aSeg, Quantity_NOC_GREEN1);
}
if (WAIT_A_LITTLE) return;

View File

@@ -10,7 +10,7 @@
#endif // _MSC_VER > 1000
#include <OCCDemo_Presentation.h>
class Geom_Curve;
class Handle_Geom_Curve;
class PointOnCurve_Presentation : public OCCDemo_Presentation
{
@@ -18,8 +18,8 @@ public:
// Construction
PointOnCurve_Presentation();
private:
Handle(AIS_InteractiveObject) PointOnCurve_Presentation::DrawCurve (
Handle(Geom_Curve) theCurve, Quantity_NameOfColor theColor);
Handle_AIS_InteractiveObject PointOnCurve_Presentation::DrawCurve (
Handle_Geom_Curve theCurve, Quantity_NameOfColor theColor);
public:
// Iteration on samples

View File

@@ -73,7 +73,7 @@ Projection_Presentation::Projection_Presentation()
// Function : createCurve
// Purpose : returns a BSpline curve with 10 poles
//================================================================
static Handle(Geom_BSplineCurve) createCurve()
static Handle_Geom_BSplineCurve createCurve()
{
Standard_Real aCoords[][3] = {{-6,3,0},{-5,1,0},{-4,0,0},{-2,1,0},{-1,-1,0},
{0,-1,0},{1,0,0},{2,2,0},{3,1,0},{4,0,0}};
@@ -95,7 +95,7 @@ static Handle(Geom_BSplineCurve) createCurve()
// Function : createSurface
// Purpose : returns a BSpline Surface with 8 poles
//================================================================
static Handle(Geom_BSplineSurface) createSurface()
static Handle_Geom_BSplineSurface createSurface()
{
// define points array
TColgp_Array2OfPnt aPoints (1,2,1,4);
@@ -244,7 +244,7 @@ void Projection_Presentation::sample2()
" gp_Dir aDir(0,0,1);" EOL
" gp_Ax3 anAx3(aCenterPoint, aDir);" EOL
" Standard_Real Radius = 300;" EOL
" Handle(Geom_CylindricalSurface) aCylSurface =" EOL
" Handle_Geom_CylindricalSurface aCylSurface =" EOL
" new Geom_CylindricalSurface(anAx3, Radius);" EOL
"" EOL
" // projection of a point onto a surface" EOL
@@ -277,7 +277,7 @@ void Projection_Presentation::sample2()
gp_Dir aDir(0,0,1);
gp_Ax3 anAx3(aCenterPoint, aDir);
Standard_Real Radius = 300;
Handle(Geom_CylindricalSurface) aCylSurface =
Handle_Geom_CylindricalSurface aCylSurface =
new Geom_CylindricalSurface(anAx3, Radius);
// projection of a point onto a surface
@@ -314,7 +314,7 @@ void Projection_Presentation::sample2()
if(WAIT_A_LITTLE) return;
// output cylindrical surface
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed =
Handle_Geom_RectangularTrimmedSurface aCylTrimmed =
new Geom_RectangularTrimmedSurface(aCylSurface,0,2*PI,-200,300,Standard_True,Standard_True);
drawSurface(aCylTrimmed);
@@ -352,21 +352,21 @@ void Projection_Presentation::sample3()
" // define a planar surface" EOL
" gp_Pnt aPlanePnt(0,0,-100);" EOL
" gp_Dir aPlaneDir(0,0,1);" EOL
" Handle(Geom_Plane) aPlane = new Geom_Plane(aPlanePnt, aPlaneDir);" EOL
" Handle_Geom_Plane aPlane = new Geom_Plane(aPlanePnt, aPlaneDir);" EOL
"" EOL
" // create a cylindrical surface" EOL
" gp_Pnt aCylPnt(-100,0,550);" EOL
" gp_Dir aCylDir(0,1,0);" EOL
" gp_Ax3 anAx3(aCylPnt, aCylDir);" EOL
" Standard_Real aRadius = 800;" EOL
" Handle(Geom_CylindricalSurface) aCylSurface = " EOL
" Handle_Geom_CylindricalSurface aCylSurface = " EOL
" new Geom_CylindricalSurface(anAx3, aRadius);" EOL
"" EOL
" // Projection of a curve onto a planar surface" EOL
" Handle(Geom_Curve) aPlaneProjCurve = GeomProjLib::Project(aCurve, aPlane);" EOL
" Handle_Geom_Curve aPlaneProjCurve = GeomProjLib::Project(aCurve, aPlane);" EOL
"" EOL
" // Projection of a curve onto a cylindrical surface" EOL
" Handle(Geom_Curve) aCylProjCurve = GeomProjLib::Project(aCurve, aCylSurface);" EOL
" Handle_Geom_Curve aCylProjCurve = GeomProjLib::Project(aCurve, aCylSurface);" EOL
);
// create BSpline curve
@@ -378,21 +378,21 @@ void Projection_Presentation::sample3()
// define a planar surface
gp_Pnt aPlanePnt(0,0,-100);
gp_Dir aPlaneDir(0,0,1);
Handle(Geom_Plane) aPlane = new Geom_Plane(aPlanePnt, aPlaneDir);
Handle_Geom_Plane aPlane = new Geom_Plane(aPlanePnt, aPlaneDir);
// create a cylindrical surface
gp_Pnt aCylPnt(-100,0,550);
gp_Dir aCylDir(0,1,0);
gp_Ax3 anAx3(aCylPnt, aCylDir);
Standard_Real aRadius = 800;
Handle(Geom_CylindricalSurface) aCylSurface =
Handle_Geom_CylindricalSurface aCylSurface =
new Geom_CylindricalSurface(anAx3, aRadius);
// Projection of a curve onto a planar surface
Handle(Geom_Curve) aPlaneProjCurve = GeomProjLib::Project(aCurve, aPlane);
Handle_Geom_Curve aPlaneProjCurve = GeomProjLib::Project(aCurve, aPlane);
// Projection of a curve onto a cylindrical surface
Handle(Geom_Curve) aCylProjCurve = GeomProjLib::Project(aCurve, aCylSurface);
Handle_Geom_Curve aCylProjCurve = GeomProjLib::Project(aCurve, aCylSurface);
// ===== output ===========
// output original curve
@@ -417,7 +417,7 @@ void Projection_Presentation::sample3()
getAISContext()->Erase(aProjCurveIO, Standard_False);
// output the second surface - cylindrical surface
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed =
Handle_Geom_RectangularTrimmedSurface aCylTrimmed =
new Geom_RectangularTrimmedSurface(aCylSurface,PI/2,-PI/2,-450,550,Standard_True,Standard_True);
Handle(AIS_InteractiveObject) aCylIO = drawSurface(
aCylTrimmed, Quantity_Color(Quantity_NOC_YELLOW), Standard_False);

View File

@@ -98,7 +98,7 @@ void Simplify_Presentation::simplify(const TopoDS_Shape& aShape)
" TopLoc_Location aLocation;" EOL
"" EOL
" // takes the triangulation of the face aFace" EOL
" Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL
" Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL
"" EOL
" if(!aTr.IsNull())" EOL
" { " EOL
@@ -224,7 +224,7 @@ void Simplify_Presentation::simplify(const TopoDS_Shape& aShape)
" TopoDS_Face aFace;" EOL
" B.MakeFace(aFace, aSurf, Precision::Confusion());" EOL
" B.Add(aFace, aWire);" EOL
" Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape(aFace);" EOL
" Handle_ShapeFix_Shape sfs = new ShapeFix_Shape(aFace);" EOL
" sfs->Perform();" EOL
" TopoDS_Shape aFixedFace = sfs->Shape();" EOL
" if (aFixedFace.IsNull()) " EOL
@@ -251,7 +251,7 @@ void Simplify_Presentation::simplify(const TopoDS_Shape& aShape)
TopLoc_Location aLocation;
// takes the triangulation of the face aFace
Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);
Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);
if(!aTr.IsNull())
{
@@ -377,14 +377,14 @@ void Simplify_Presentation::simplify(const TopoDS_Shape& aShape)
TopoDS_Face aFace;
B.MakeFace(aFace, aSurf, Precision::Confusion());
B.Add(aFace, aWire);
Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape(aFace);
Handle_ShapeFix_Shape sfs = new ShapeFix_Shape(aFace);
sfs->Perform();
TopoDS_Shape aFixedFace = sfs->Shape();
if (aFixedFace.IsNull())
return;
// output surface, make it half transparent
Handle(AIS_InteractiveObject) aSurfIO = drawSurface(
Handle_AIS_InteractiveObject aSurfIO = drawSurface(
aSurf, Quantity_NOC_LEMONCHIFFON3, Standard_False);
aSurfIO->SetTransparency(0.5);
getAISContext()->Display(aSurfIO, Standard_False);

View File

@@ -76,7 +76,7 @@ void Sweep_Presentation::DoSample()
// Auxiliary functions
//////////////////////////////////////////////////////////////////////
static Handle(Geom_Curve) mkBezierCurve(const Standard_Integer nPoles,
static Handle_Geom_Curve mkBezierCurve(const Standard_Integer nPoles,
const Standard_Real theCoords[][3],
const Standard_Real aScale = 1,
const gp_XYZ& aShift = gp_XYZ(0,0,0))
@@ -90,7 +90,7 @@ static Handle(Geom_Curve) mkBezierCurve(const Standard_Integer nPoles,
return new Geom_BezierCurve (aPoles);
}
static Handle(Geom_Curve) mkPBSplineCurve(const Standard_Integer nPoles,
static Handle_Geom_Curve mkPBSplineCurve(const Standard_Integer nPoles,
const Standard_Real theCoords[][3],
const Standard_Real aScale = 1,
const gp_XYZ& aShift = gp_XYZ(0,0,0))
@@ -111,7 +111,7 @@ static Handle(Geom_Curve) mkPBSplineCurve(const Standard_Integer nPoles,
return new Geom_BSplineCurve (aPoles, aKnots, aMults, 3, Standard_True);
}
static Handle(Geom2d_Curve) mk2dBezierCurve(const Standard_Integer nPoles,
static Handle_Geom2d_Curve mk2dBezierCurve(const Standard_Integer nPoles,
const Standard_Real theCoords[][2],
const Standard_Real aScale = 1,
const gp_XY& aShift = gp_XY(0,0))
@@ -139,7 +139,7 @@ static TopoDS_Wire mkPolygonWire(const Standard_Integer nPoints,
return aPol.Wire();
}
static Handle(Geom_Curve) mkCurve1()
static Handle_Geom_Curve mkCurve1()
{
Standard_Real aCoords[][3] = {
{0,0,0},{0,0,10},{0,10,10},{0,10,20}
@@ -148,7 +148,7 @@ static Handle(Geom_Curve) mkCurve1()
return mkBezierCurve (nPoles, aCoords);
}
static Handle(Geom_Curve) mkCurve2()
static Handle_Geom_Curve mkCurve2()
{
Standard_Real aCoords[][3] = {
{0,0,0},{10,0,0},{20,10,12},{25,30,20},{50,40,50}
@@ -157,7 +157,7 @@ static Handle(Geom_Curve) mkCurve2()
return mkBezierCurve (nPoles, aCoords);
}
static Handle(Geom_Curve) mkCurve3()
static Handle_Geom_Curve mkCurve3()
{
Standard_Real aCoords[][3] = {
{50,40,50},{70,30,30},{90,20,20},{100,50,0}
@@ -166,7 +166,7 @@ static Handle(Geom_Curve) mkCurve3()
return mkBezierCurve (nPoles, aCoords);
}
static Handle(Geom2d_Curve) mk2dCurve1()
static Handle_Geom2d_Curve mk2dCurve1()
{
Standard_Real aCoords[][2] = {
{0,0},{0.3,0},{0.1,0.5},{0.3,0.6},{0.6,0.5}
@@ -175,7 +175,7 @@ static Handle(Geom2d_Curve) mk2dCurve1()
return mk2dBezierCurve (nPoles, aCoords);
}
static Handle(Geom_Surface) mkSurface1()
static Handle_Geom_Surface mkSurface1()
{
Standard_Real aCoords[3][3][3] = {
{{-10,-10,-30},{-10,50,40},{-10,70,-20}},
@@ -292,9 +292,9 @@ static TopoDS_Wire mkWire9()
}
Handle(AIS_InteractiveObject) Sweep_Presentation::drawCurveOnSurface
(const Handle(Geom2d_Curve)& aC2d,
const Handle(Geom_Surface)& aSurf,
Handle_AIS_InteractiveObject Sweep_Presentation::drawCurveOnSurface
(const Handle_Geom2d_Curve& aC2d,
const Handle_Geom_Surface& aSurf,
const Quantity_Color& aColor)
{
Handle(Geom2dAdaptor_HCurve) aHC = new Geom2dAdaptor_HCurve(aC2d);

View File

@@ -10,8 +10,8 @@
#endif // _MSC_VER > 1000
#include <OCCDemo_Presentation.h>
class Geom2d_Curve;
class Geom_Surface;
class Handle_Geom2d_Curve;
class Handle_Geom_Surface;
class Sweep_Presentation : public OCCDemo_Presentation
{
@@ -24,9 +24,9 @@ public:
virtual void DoSample();
// one phase of iterations
Handle(AIS_InteractiveObject) drawCurveOnSurface
(const Handle(Geom2d_Curve)& aC2d,
const Handle(Geom_Surface)& aSurf,
Handle_AIS_InteractiveObject drawCurveOnSurface
(const Handle_Geom2d_Curve& aC2d,
const Handle_Geom_Surface& aSurf,
const Quantity_Color& aColor);
private:

View File

@@ -123,7 +123,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
" TopLoc_Location aLocation;" EOL EOL
" // takes the triangulation of the face aFace:" EOL
" Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL EOL
" Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL EOL
" if(!aTr.IsNull()) // if this triangulation is not NULL" EOL
" { " EOL
@@ -161,7 +161,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
" if(!aEdge.IsNull()) // if this edge is not NULL" EOL
" {" EOL
" // takes the polygon associated to the edge aEdge:" EOL
" Handle(Poly_PolygonOnTriangulation) aPol = " EOL
" Handle_Poly_PolygonOnTriangulation aPol = " EOL
" BRep_Tool::PolygonOnTriangulation(aEdge,aTr,aEdge.Location());" EOL EOL
" if(!aPol.IsNull()) // if this polygon is not NULL" EOL
@@ -197,7 +197,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
Standard_Integer aNumOfNodes = 0;
Standard_Integer aNumOfTriangles = 0;
Handle(AIS_InteractiveObject) aShowEdge,aShowFace,aShowShape;
Handle_AIS_InteractiveObject aShowEdge,aShowFace,aShowShape;
TopExp_Explorer aExpFace,aExpEdge;
@@ -208,7 +208,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
TopoDS_Face aFace = TopoDS::Face(aExpFace.Current());
TopLoc_Location aLocation;
Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);
Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);
if(!aTr.IsNull())
{
@@ -232,7 +232,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
if(!aEdge.IsNull())
{
Handle(Poly_PolygonOnTriangulation) aPol =
Handle_Poly_PolygonOnTriangulation aPol =
BRep_Tool::PolygonOnTriangulation(aEdge,aTr,aEdge.Location());
if(!aPol.IsNull())

View File

@@ -83,7 +83,7 @@ void Textures_Presentation::Init()
{
// initialize v3d_view so it displays textures well
getViewer()->InitActiveViews();
Handle(V3d_View) aView = getViewer()->ActiveView();
Handle_V3d_View aView = getViewer()->ActiveView();
aView->SetSurfaceDetail(V3d_TEX_ALL);
aView->SetSize(ZVIEW_SIZE);
@@ -95,7 +95,7 @@ void Textures_Presentation::Init()
" // aShape = ..." EOL
"" EOL
" // create a textured presentation object for aShape" EOL
" Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape);" EOL
" Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);" EOL
"" EOL
" TCollection_AsciiString aTFileName;" EOL
"" EOL
@@ -142,12 +142,12 @@ void Textures_Presentation::Init()
//================================================================
void Textures_Presentation::lightsOnOff(Standard_Boolean isOn)
{
static Handle(V3d_Light) aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
static Handle(V3d_Light) aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
static Handle(V3d_Light) aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
static Handle(V3d_Light) aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
static Handle(V3d_Light) aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
static Handle(V3d_Light) aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
static Handle_V3d_Light aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
static Handle_V3d_Light aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
static Handle_V3d_Light aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
static Handle_V3d_Light aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
static Handle_V3d_Light aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
static Handle_V3d_Light aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
if (isOn)
{
@@ -184,7 +184,7 @@ Standard_Boolean Textures_Presentation::displayTextured(const TopoDS_Shape& aSha
Standard_Integer nRepeat)
{
// create a textured presentation object for aShape
Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape);
Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);
// load texture from file if it is not an integer value
// integer value indicates a number of texture in predefined textures enumeration
@@ -209,7 +209,7 @@ Standard_Boolean Textures_Presentation::displayTextured(const TopoDS_Shape& aSha
{
lightsOnOff(Standard_False);
Handle(AIS_Shape) aAisShape = drawShape(aShape/*, Quantity_NOC_WHITE*/);
Handle_AIS_Shape aAisShape = drawShape(aShape/*, Quantity_NOC_WHITE*/);
if (WAIT_A_SECOND) return Standard_False;
getAISContext()->Erase(aAisShape, Standard_False);
}
@@ -391,7 +391,7 @@ void Textures_Presentation::samplePredefTexture2()
Standard_Real aXStep = 250, aYStep = 250;
Standard_Real aXBound = -450, aYBound = -300;
Handle(Geom_BSplineSurface) aSurface =
Handle_Geom_BSplineSurface aSurface =
GeomAPI_PointsToBSplineSurface(aZPoints,aXBound,aXStep,aYBound,aYStep,3,8);
TopoDS_Face aShape = BRepBuilderAPI_MakeFace(aSurface);

View File

@@ -70,7 +70,7 @@ void TexturesExt_Presentation::Init()
{
// initialize v3d_view so it displays TexturesExt well
getViewer()->InitActiveViews();
Handle(V3d_View) aView = getViewer()->ActiveView();
Handle_V3d_View aView = getViewer()->ActiveView();
aView->SetSurfaceDetail(V3d_TEX_ALL);
aView->SetSize(ZVIEW_SIZE);
@@ -82,7 +82,7 @@ void TexturesExt_Presentation::Init()
" // aShape = ..." EOL
"" EOL
" // create a textured presentation object for aShape" EOL
" Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape);" EOL
" Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);" EOL
"" EOL
" TCollection_AsciiString aTFileName;" EOL
"" EOL
@@ -124,7 +124,7 @@ void TexturesExt_Presentation::Init()
// a predefined texture from Graphic3d_NameOfTexture2D with number = this value
// is loaded.
//================================================================
Handle(AIS_TexturedShape) TexturesExt_Presentation::Texturize(const TopoDS_Shape& aShape,
Handle_AIS_TexturedShape TexturesExt_Presentation::Texturize(const TopoDS_Shape& aShape,
TCollection_AsciiString aTFileName,
Standard_Real toScaleU,
Standard_Real toScaleV,
@@ -134,7 +134,7 @@ Handle(AIS_TexturedShape) TexturesExt_Presentation::Texturize(const TopoDS_Shape
Standard_Real originV)
{
// create a textured presentation object for aShape
Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape);
Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);
// load texture from file if it is not an integer value
// integer value indicates a number of texture in predefined TexturesExt enumeration
@@ -190,12 +190,12 @@ Standard_Boolean TexturesExt_Presentation::loadShape(TopoDS_Shape& aShape,
//================================================================
void TexturesExt_Presentation::lightsOnOff(Standard_Boolean isOn)
{
static Handle(V3d_Light) aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
static Handle(V3d_Light) aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
static Handle(V3d_Light) aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
static Handle(V3d_Light) aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
static Handle(V3d_Light) aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
static Handle(V3d_Light) aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
static Handle_V3d_Light aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
static Handle_V3d_Light aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
static Handle_V3d_Light aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
static Handle_V3d_Light aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
static Handle_V3d_Light aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
static Handle_V3d_Light aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
if (isOn)
{
@@ -238,14 +238,14 @@ void TexturesExt_Presentation::sampleBottle()
TopExp::MapShapes(aShape, TopAbs_FACE, aFaces);
// display original shape in shaded display mode
Handle(AIS_Shape) aShapeIO = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False);
Handle_AIS_Shape aShapeIO = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False);
getAISContext()->SetDisplayMode(aShapeIO, AIS_Shaded, Standard_False);
DISP(aShapeIO);
Handle(AIS_TexturedShape) aTFace1 = Texturize(aFaces(16), "carrelage1.gif", 1, 1, 3, 2);
Handle_AIS_TexturedShape aTFace1 = Texturize(aFaces(16), "carrelage1.gif", 1, 1, 3, 2);
DISP(aTFace1);
Handle(AIS_TexturedShape) aTFace2 = Texturize(aFaces(21), "carrelage1.gif", 1, 1, 3, 2);
Handle_AIS_TexturedShape aTFace2 = Texturize(aFaces(21), "carrelage1.gif", 1, 1, 3, 2);
DISP(aTFace2);
getViewer()->Update();
@@ -267,7 +267,7 @@ void TexturesExt_Presentation::sampleTerrain()
TopExp::MapShapes(aShape, TopAbs_FACE, aFaces);
// TopLoc_Location aLoc;
// Handle(Geom_Surface) aSur = BRep_Tool::Surface(TopoDS::Face(aFaces(1)), aLoc);
// Handle_Geom_Surface aSur = BRep_Tool::Surface(TopoDS::Face(aFaces(1)), aLoc);
// Standard_Real u1,u2,v1,v2;
// aSur->Bounds(u1,u2,v1,v2);
// gp_Pnt aPnt = aSur->Value(u1, v1);

View File

@@ -12,7 +12,7 @@
#include <OCCDemo_Presentation.h>
class TopoDS_Shape;
class TCollection_AsciiString;
class AIS_TexturedShape;
class Handle_AIS_TexturedShape;
class TexturesExt_Presentation : public OCCDemo_Presentation
{
@@ -32,7 +32,7 @@ private:
// filename can also be an integer value ("2", "5", etc.), in this case
// a predefined texture from Graphic3d_NameOfTexture2D with number = this value
// is loaded.
Handle(AIS_TexturedShape) Texturize(
Handle_AIS_TexturedShape Texturize(
const TopoDS_Shape& aShape, TCollection_AsciiString aTFileName,
Standard_Real toScaleU=1.0, Standard_Real toScaleV=1.0,
Standard_Real toRepeatU=1.0, Standard_Real toRepeatV=1.0,

View File

@@ -77,7 +77,7 @@ void ThruSections_Presentation::DoSample()
// purpose:
//////////////////////////////////////////////////////////////////////
static Handle(Geom_BSplineCurve) CreateCurve(Standard_Real aCoords[][3],Standard_Integer nPoles)
static Handle_Geom_BSplineCurve CreateCurve(Standard_Real aCoords[][3],Standard_Integer nPoles)
{
TColgp_Array1OfPnt aCurvePoint (1, nPoles);
@@ -192,7 +192,7 @@ void ThruSections_Presentation::sample1()
//====================================================================
Handle(AIS_InteractiveObject) aShow1,aShow2,aShowWire;
Handle_AIS_InteractiveObject aShow1,aShow2,aShowWire;
// this data used for building a shape through sections:
Standard_Boolean IsSolid,IsRuled;
@@ -374,7 +374,7 @@ void ThruSections_Presentation::sample2()
//====================================================================
Handle(AIS_InteractiveObject) aShow1,aShow2,aShowWire1,aShowWire2,aShowWire3;
Handle_AIS_InteractiveObject aShow1,aShow2,aShowWire1,aShowWire2,aShowWire3;
// this data used for building a shape through sections:
const Standard_Boolean IsSolid = Standard_False;
@@ -403,8 +403,8 @@ void ThruSections_Presentation::sample2()
Standard_Integer aSize3 = sizeof(aCoords3)/(sizeof(Standard_Real)*3);
// creates curves:
Handle(Geom_BSplineCurve) aCurve1 = CreateCurve(aCoords1,aSize1);
Handle(Geom_BSplineCurve) aCurve2 = CreateCurve(aCoords2,aSize2);
Handle_Geom_BSplineCurve aCurve1 = CreateCurve(aCoords1,aSize1);
Handle_Geom_BSplineCurve aCurve2 = CreateCurve(aCoords2,aSize2);
// creates wires based on the curves:
TopoDS_Wire aW1 = BRepBuilderAPI_MakeWire(BRepBuilderAPI_MakeEdge(aCurve1));

View File

@@ -10,7 +10,7 @@
#endif // _MSC_VER > 1000
#include <OCCDemo_Presentation.h>
#include <TopTools_SequenceOfShape.hxx>
class TopTools_SequenceOfShape;
//class TCollection_AsciiString;
class ThruSections_Presentation : public OCCDemo_Presentation

View File

@@ -126,10 +126,10 @@ static TopoDS_Shape CreateRevolShape()
gp_Ax1 anAxis = gp_Ax1(gp_Pnt(0,0,0),gp::DY());
GC_MakeSegment aSegment(gp_Pnt(0,-8*SCALE,0),gp_Pnt(0,-8*SCALE,2*SCALE));
Handle(Geom_TrimmedCurve) aLine = aSegment.Value();
Handle(Geom_SurfaceOfRevolution) aSurface1 = new Geom_SurfaceOfRevolution(aLine, anAxis);
Handle(Geom_SurfaceOfRevolution) aSurface2 = new Geom_SurfaceOfRevolution(aCurve1, anAxis);
Handle(Geom_SurfaceOfRevolution) aSurface3 = new Geom_SurfaceOfRevolution(aCurve2, anAxis);
Handle_Geom_TrimmedCurve aLine = aSegment.Value();
Handle_Geom_SurfaceOfRevolution aSurface1 = new Geom_SurfaceOfRevolution(aLine, anAxis);
Handle_Geom_SurfaceOfRevolution aSurface2 = new Geom_SurfaceOfRevolution(aCurve1, anAxis);
Handle_Geom_SurfaceOfRevolution aSurface3 = new Geom_SurfaceOfRevolution(aCurve2, anAxis);
BRep_Builder aBuilder;
TopoDS_Compound aShape;
@@ -214,10 +214,10 @@ static TopoDS_Shape CreateBSplnShape()
GeomAPI_PointsToBSplineSurface aPTBS;
aPTBS.Init(aZPoints1,aX0,aXStep,aY0,aYStep,3,10,GeomAbs_C3,0.3*SCALE);
Handle(Geom_BSplineSurface) aSurface1 = aPTBS.Surface();
Handle_Geom_BSplineSurface aSurface1 = aPTBS.Surface();
aPTBS.Init(aZPoints2,aX0,aXStep,aY0,aYStep,3,10,GeomAbs_C3,0.3*SCALE);
Handle(Geom_BSplineSurface) aSurface2 = aPTBS.Surface();
Handle_Geom_BSplineSurface aSurface2 = aPTBS.Surface();
TopoDS_Face aFace1,aFace2;
aFace1 = BRepBuilderAPI_MakeFace (aSurface1);
@@ -251,7 +251,7 @@ void TopLProps_Presentation::sample1()
if (aEdge.IsNull()) return;
//show:
Handle(AIS_InteractiveObject) aShowShape = drawShape(aShape);
Handle_AIS_InteractiveObject aShowShape = drawShape(aShape);
if(WAIT_A_SECOND) return;
drawShape(aEdge,Quantity_NOC_RED);
if(WAIT_A_SECOND) return;
@@ -281,9 +281,9 @@ void TopLProps_Presentation::sample2()
if (aFace.IsNull()) return;
//show:
Handle(AIS_InteractiveObject) aShowShape = drawShape(aShape);
Handle_AIS_InteractiveObject aShowShape = drawShape(aShape);
if(WAIT_A_SECOND) return;
Handle(AIS_InteractiveObject) aShowFace = drawShape(aFace,Graphic3d_NOM_BRASS,Standard_False);
Handle_AIS_InteractiveObject aShowFace = drawShape(aFace,Graphic3d_NOM_BRASS,Standard_False);
getAISContext()->SetDisplayMode(aShowFace,AIS_WireFrame);
getAISContext()->Display(aShowFace);
if(WAIT_A_SECOND) return;
@@ -324,7 +324,7 @@ void TopLProps_Presentation::sample3()
Standard_Integer aNbPoints = sizeof(aPoints)/sizeof(Standard_Real);
//show:
Handle(AIS_InteractiveObject) aShowShape = drawShape(aShape);
Handle_AIS_InteractiveObject aShowShape = drawShape(aShape);
if(WAIT_A_SECOND) return;
drawShape(aEdge,Quantity_NOC_RED);
@@ -367,9 +367,9 @@ void TopLProps_Presentation::sample4()
Standard_Integer aNbPoints = sizeof(aPoints)/(sizeof(Standard_Real)*2);
//show:
Handle(AIS_InteractiveObject) aShowShape = drawShape(aShape);
Handle_AIS_InteractiveObject aShowShape = drawShape(aShape);
if(WAIT_A_SECOND) return;
Handle(AIS_InteractiveObject) aShowFace = drawShape(aFace,Graphic3d_NOM_BRASS,Standard_False);
Handle_AIS_InteractiveObject aShowFace = drawShape(aFace,Graphic3d_NOM_BRASS,Standard_False);
getAISContext()->SetDisplayMode(aShowFace,AIS_WireFrame);
getAISContext()->Display(aShowFace);
if(WAIT_A_SECOND) return;
@@ -439,7 +439,7 @@ void TopLProps_Presentation::showEdgeLProps(TopoDS_Edge& theEdge,
setResultText (aText.ToCString());
BRepAdaptor_Curve anAdapCurve (theEdge) ;
Handle(AIS_InteractiveObject) aObjs[7];
Handle_AIS_InteractiveObject aObjs[7];
Standard_Integer maxOrder = 3;
Standard_Real aResol = gp::Resolution();
BRepLProp_CLProps aLProps (anAdapCurve,maxOrder,aResol);

View File

@@ -44,18 +44,18 @@ public:
Standard_EXPORT GeoAlgo_Sol(const Standard_CString aGroundName);
Standard_EXPORT void Build(const Standard_CString aGroundName) ;
Standard_EXPORT void Build(const TColgp_SequenceOfXYZ& aSeqofPoints) ;
Standard_EXPORT Handle(Geom_BSplineSurface) Surface() const;
Standard_EXPORT Handle_Geom_BSplineSurface Surface() const;
Standard_EXPORT Standard_Boolean IsDone() const;
private:
// Methods PRIVATE
//
Standard_EXPORT Handle(Geom_BSplineSurface) Read(const Standard_CString aGroundName) ;
Standard_EXPORT Handle_Geom_BSplineSurface Read(const Standard_CString aGroundName) ;
// Fields PRIVATE
//
Handle(Geom_BSplineSurface) myGround;
Handle_Geom_BSplineSurface myGround;
Standard_Boolean myIsDone;
};

View File

@@ -1119,7 +1119,7 @@ void CGeometryDoc::OnCreateSol()
TopoDS_Face aface = BRepBuilderAPI_MakeFace(GeomSol, Precision::Confusion());
if (!BRepAlgo::IsValid(aface))
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : The plate surface is not valid!", L"CasCade Error", MB_ICONERROR);
Handle(AIS_Shape) anAISShape=new AIS_Shape(aface);
Handle_AIS_Shape anAISShape=new AIS_Shape(aface);
myAISContext->Display(anAISShape, Standard_False);
Fit();
}
@@ -1211,7 +1211,7 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
" TopLoc_Location aLocation;\n"
"\n"
" // takes the triangulation of the face aFace\n"
" Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);\n"
" Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);\n"
"\n"
" if(!aTr.IsNull())\n"
" { \n"
@@ -1337,7 +1337,7 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
" TopoDS_Face aFace;\n"
" B.MakeFace(aFace, aSurf, Precision::Confusion());\n"
" B.Add(aFace, aWire);\n"
" Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape(aFace);\n"
" Handle_ShapeFix_Shape sfs = new ShapeFix_Shape(aFace);\n"
" sfs->Perform();\n"
" TopoDS_Shape aFixedFace = sfs->Shape();\n"
" if (aFixedFace.IsNull()) \n"
@@ -1364,7 +1364,7 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
TopLoc_Location aLocation;
// takes the triangulation of the face aFace
Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);
Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);
if(!aTr.IsNull())
{
@@ -1492,14 +1492,14 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
TopoDS_Face aFace;
B.MakeFace(aFace, aSurf, Precision::Confusion());
B.Add(aFace, aWire);
Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape(aFace);
Handle_ShapeFix_Shape sfs = new ShapeFix_Shape(aFace);
sfs->Perform();
TopoDS_Shape aFixedFace = sfs->Shape();
if (aFixedFace.IsNull())
return;
// output surface, make it half transparent
Handle(AIS_InteractiveObject) aSurfIO = drawSurface(
Handle_AIS_InteractiveObject aSurfIO = drawSurface(
aSurf, Quantity_NOC_LEMONCHIFFON3, Standard_False);
aSurfIO->SetTransparency(0.5);
myAISContext->Display(aSurfIO,Standard_False);
@@ -1517,8 +1517,8 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
drawShape(aFixedFace);
}
Handle(AIS_InteractiveObject) CGeometryDoc::drawSurface
(const Handle(Geom_Surface)& theSurface,
Handle_AIS_InteractiveObject CGeometryDoc::drawSurface
(const Handle_Geom_Surface& theSurface,
const Quantity_Color& theColor,
const Standard_Boolean toDisplay)
{
@@ -1529,7 +1529,7 @@ Handle(AIS_InteractiveObject) CGeometryDoc::drawSurface
fixParam(v1);
fixParam(v2);
Handle(AIS_Shape) aGraphicSurface =
Handle_AIS_Shape aGraphicSurface =
new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2, Precision::Confusion()));
myAISContext->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay);
@@ -1569,7 +1569,7 @@ Standard_Boolean CGeometryDoc::WaitForInput (unsigned long aMilliSeconds)
return Standard_False;
}
Handle(AIS_Point) CGeometryDoc::drawPoint
Handle_AIS_Point CGeometryDoc::drawPoint
(const gp_Pnt& aPnt,
const Quantity_Color& theColor,
const Standard_Boolean toDisplay)
@@ -1586,12 +1586,12 @@ Handle(AIS_Point) CGeometryDoc::drawPoint
return aGraphicPoint;
}
Handle(AIS_Shape) CGeometryDoc::drawShape
Handle_AIS_Shape CGeometryDoc::drawShape
(const TopoDS_Shape& theShape,
const Graphic3d_NameOfMaterial theMaterial,
const Standard_Boolean toDisplay)
{
Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape);
Handle_AIS_Shape aGraphicShape = new AIS_Shape(theShape);
myAISContext->SetMaterial(aGraphicShape, theMaterial, toDisplay);
if (toDisplay)

View File

@@ -30,26 +30,26 @@ public:
void DragEvent2D (const Standard_Integer x ,
const Standard_Integer y ,
const Standard_Integer TheState,
const Handle(V3d_View)& aView );
const Handle_V3d_View& aView );
void InputEvent2D (const Standard_Integer x ,
const Standard_Integer y ,
const Handle(V3d_View)& aView );
const Handle_V3d_View& aView );
void MoveEvent2D (const Standard_Integer x ,
const Standard_Integer y ,
const Handle(V3d_View)& aView );
const Handle_V3d_View& aView );
void ShiftMoveEvent2D (const Standard_Integer x ,
const Standard_Integer y ,
const Handle(V3d_View)& aView );
const Handle_V3d_View& aView );
void ShiftDragEvent2D (const Standard_Integer x ,
const Standard_Integer y ,
const Standard_Integer TheState,
const Handle(V3d_View)& aView );
const Handle_V3d_View& aView );
void ShiftInputEvent2D (const Standard_Integer x ,
const Standard_Integer y ,
const Handle(V3d_View)& aView );
const Handle_V3d_View& aView );
void Popup2D (const Standard_Integer x ,
const Standard_Integer y ,
const Handle(V3d_View)& aView );
const Handle_V3d_View& aView );
//-------------------- 3D -------------------//
@@ -61,21 +61,21 @@ public:
const Standard_Integer theMouseY,
const Handle(V3d_View)& theView);
Handle(AIS_InteractiveObject) drawSurface
(const Handle(Geom_Surface)& theSurface,
Handle_AIS_InteractiveObject drawSurface
(const Handle_Geom_Surface& theSurface,
const Quantity_Color& theColor,
const Standard_Boolean toDisplay);
Standard_Boolean WaitForInput (unsigned long aMilliSeconds);
// Waits for a user input or a period of time has been elapsed
Handle(AIS_Point) drawPoint (const gp_Pnt& thePnt,
Handle_AIS_Point drawPoint (const gp_Pnt& thePnt,
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN),
const Standard_Boolean toDisplay = Standard_True);
// creates a presentation of the given point
// and displays it in the viewer if toDisplay = Standard_True
Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
Handle_AIS_Shape drawShape (const TopoDS_Shape& theShape,
const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_BRASS,
const Standard_Boolean toDisplay = Standard_True);
// creates a presentation of the given shape with the given material
@@ -224,16 +224,16 @@ public:
int Current;
void Minimize3D();
void Minimize2D();
Handle(V3d_Viewer) GetViewer2D() { return myViewer2D; };
Handle(AIS_InteractiveContext)& GetISessionContext() { return myAISContext2D; };
Handle_V3d_Viewer GetViewer2D() { return myViewer2D; };
Handle_AIS_InteractiveContext& GetISessionContext() { return myAISContext2D; };
BOOL FitMode;
public:
CResultDialog myCResultDialog;
private:
Handle(V3d_Viewer) myViewer2D;
Handle(AIS_InteractiveContext) myAISContext2D;
Handle_V3d_Viewer myViewer2D;
Handle_AIS_InteractiveContext myAISContext2D;
};

View File

@@ -8,10 +8,11 @@
#include <TColStd_Array1OfReal.hxx>
#include <Geom2d_BSplineCurve.hxx>
IMPLEMENT_STANDARD_HANDLE(ISession2D_Curve,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession2D_Curve,AIS_InteractiveObject)
ISession2D_Curve::ISession2D_Curve(const Handle(Geom2d_Curve) aGeom2dCurve,
ISession2D_Curve::ISession2D_Curve(const Handle_Geom2d_Curve aGeom2dCurve,
const Aspect_TypeOfLine aTypeOfLine,
const Aspect_WidthOfLine aWidthOfLine,
const Standard_Integer aColorIndex)

View File

@@ -15,7 +15,7 @@
#include <Standard_IStream.hxx>
#include <Standard_CString.hxx>
#include <TColGeom2d_HSequenceOfCurve.hxx>
class TColGeom2d_HSequenceOfCurve;
class PrsMgr_PresentationManager2d;
class Graphic2d_GraphicObject;
class SelectMgr_Selection;
@@ -33,7 +33,7 @@ public:
//
ISession2D_Curve
(const Handle(Geom2d_Curve) aGeom2dCurve,
(const Handle_Geom2d_Curve aGeom2dCurve,
const Aspect_TypeOfLine aTypeOfline = Aspect_TOL_SOLID,
const Aspect_WidthOfLine aWidthOfLine = Aspect_WOL_MEDIUM,
const Standard_Integer aColorIndex = 4);
@@ -59,7 +59,7 @@ public:
inline Standard_Real GetDiscretisation() const;
inline void SetDiscretisation(const Standard_Real aNewDiscretisation) ;
DEFINE_STANDARD_RTTIEXT(ISession2D_Curve,AIS_InteractiveObject)
DEFINE_STANDARD_RTTI(ISession2D_Curve,AIS_InteractiveObject)
private:
@@ -70,7 +70,7 @@ private:
// Fields PRIVATE
//
Handle(Geom2d_Curve) myGeom2dCurve;
Handle_Geom2d_Curve myGeom2dCurve;
Aspect_TypeOfLine myTypeOfLine;
Aspect_WidthOfLine myWidthOfLine;
Standard_Integer myColorIndex;

View File

@@ -7,6 +7,7 @@
#include "ISession_Curve.h"
#include <StdPrs_PoleCurve.hxx>
IMPLEMENT_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
#ifdef _DEBUG

View File

@@ -20,7 +20,7 @@ public:
ISession_Curve(Handle(Geom_Curve)& aCurve);
virtual ~ISession_Curve();
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
DEFINE_STANDARD_RTTI(ISession_Curve,AIS_InteractiveObject)
private:

View File

@@ -13,6 +13,7 @@
static char THIS_FILE[]=__FILE__;
#endif
IMPLEMENT_STANDARD_HANDLE(ISession_Direction,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Direction,AIS_InteractiveObject)
//////////////////////////////////////////////////////////////////////

View File

@@ -26,7 +26,7 @@ public:
ISession_Direction (const gp_Pnt2d& aPnt2d,const gp_Vec2d& aVec2d);
virtual ~ISession_Direction();
DEFINE_STANDARD_RTTIEXT(ISession_Direction,AIS_InteractiveObject)
DEFINE_STANDARD_RTTI(ISession_Direction,AIS_InteractiveObject)
private:

View File

@@ -12,7 +12,7 @@
static char THIS_FILE[]=__FILE__;
//#define new DEBUG_NEW
#endif
IMPLEMENT_STANDARD_HANDLE(ISession_Point,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Point,AIS_InteractiveObject)
//////////////////////////////////////////////////////////////////////

View File

@@ -22,7 +22,7 @@ public:
ISession_Point(const gp_Pnt2d& aPoint,Standard_Real Elevation = 0);
ISession_Point(const gp_Pnt& aPoint);
virtual ~ISession_Point();
DEFINE_STANDARD_RTTIEXT(ISession_Point,AIS_InteractiveObject)
DEFINE_STANDARD_RTTI(ISession_Point,AIS_InteractiveObject)
private :

View File

@@ -15,7 +15,7 @@
static char THIS_FILE[]=__FILE__;
//#define new DEBUG_NEW
#endif
IMPLEMENT_STANDARD_HANDLE(ISession_Surface,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject)
//////////////////////////////////////////////////////////////////////

View File

@@ -20,7 +20,7 @@ public:
ISession_Surface(Handle(Geom_Surface)& aSurface);
virtual ~ISession_Surface();
DEFINE_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject)
DEFINE_STANDARD_RTTI(ISession_Surface,AIS_InteractiveObject)
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0);

View File

@@ -11,7 +11,7 @@
static char THIS_FILE[]=__FILE__;
//#define new DEBUG_NEW
#endif
IMPLEMENT_STANDARD_HANDLE(ISession_Text,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Text,AIS_InteractiveObject)
//////////////////////////////////////////////////////////////////////

View File

@@ -69,7 +69,7 @@ inline Quantity_Factor GetScale() const;
inline void SetScale (const Quantity_Factor aNewScale) ;
DEFINE_STANDARD_RTTIEXT(ISession_Text,AIS_InteractiveObject)
DEFINE_STANDARD_RTTI(ISession_Text,AIS_InteractiveObject)
private:

View File

@@ -10,6 +10,7 @@
static char THIS_FILE[]=__FILE__;
#endif
IMPLEMENT_STANDARD_HANDLE(ISession_Direction,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Direction,AIS_InteractiveObject)
#include "DsgPrs_LengthPresentation.hxx"

View File

@@ -24,7 +24,7 @@ public:
ISession_Direction(const gp_Pnt& aPnt,const gp_Pnt& aPnt2);
ISession_Direction(const gp_Pnt& aPnt,const gp_Vec& aVec);
DEFINE_STANDARD_RTTIEXT(ISession_Direction,AIS_InteractiveObject)
DEFINE_STANDARD_RTTI(ISession_Direction,AIS_InteractiveObject)
private:

View File

@@ -4721,7 +4721,7 @@ void CModelingDoc::OnStopStop()
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : The plate face is not valid!", L"CasCade Error", MB_ICONERROR);
myAISContext->CloseLocalContext();
myState = -1;
Handle(AIS_Shape) anAISShape = new AIS_Shape(aface);
Handle_AIS_Shape anAISShape = new AIS_Shape(aface);
myAISContext->SetColor(anAISShape,Quantity_NOC_AZURE);
myAISContext->SetMaterial(anAISShape,Graphic3d_NOM_SILVER);
myAISContext->SetDisplayMode(anAISShape,1);
@@ -5017,7 +5017,7 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : The plate surface is not valid!!!", L"CasCade Error", MB_ICONERROR);
}
Handle(AIS_Shape) anAISShape=new AIS_Shape(theFace);
Handle_AIS_Shape anAISShape=new AIS_Shape(theFace);
myAISContext->SetColor(anAISShape,Quantity_NOC_BLUE1);
myAISContext->SetMaterial(anAISShape,Graphic3d_NOM_SILVER);
myAISContext->SetDisplayMode(anAISShape,1);

View File

@@ -195,7 +195,7 @@ void CViewer2dDoc::OnBUTTONTestLine()
TopoDS_Edge E4 = BRepBuilderAPI_MakeEdge(gp_Pnt(10*i,10*j+5,0.), gp_Pnt(10*i,10*j,0.));
TopoDS_Wire W = BRepBuilderAPI_MakeWire(E1,E2,E3,E4);
TopoDS_Face F = BRepBuilderAPI_MakeFace(W);
Handle(AIS_Shape) aRect = new AIS_Shape(F);
Handle_AIS_Shape aRect = new AIS_Shape(F);
//set attributes of boundaries
Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer();
Handle(Prs3d_LineAspect) aLineAttrib =
@@ -280,7 +280,7 @@ void CViewer2dDoc::OnBUTTONTestRect()
TopoDS_Edge E13 = BRepBuilderAPI_MakeEdge(gp_Pnt(42.5,93.,0.), gp_Pnt(0.,68.,0.));
TopoDS_Edge E14 = BRepBuilderAPI_MakeEdge(gp_Pnt(0.,68.,0.), gp_Pnt(40.,0.,0.));
TopoDS_Wire W1 = BRepBuilderAPI_MakeWire(E11,E12,E13,E14);
Handle(AIS_Shape) aRect1 = new AIS_Shape(W1);
Handle_AIS_Shape aRect1 = new AIS_Shape(W1);
myAISContext->Display(aRect1);
myAISContext->SetColor(aRect1,Quantity_NOC_YELLOW);
@@ -290,7 +290,7 @@ void CViewer2dDoc::OnBUTTONTestRect()
TopoDS_Edge E23 = BRepBuilderAPI_MakeEdge(gp_Pnt(112.5,93.,0.), gp_Pnt(70.,68.,0.));
TopoDS_Edge E24 = BRepBuilderAPI_MakeEdge(gp_Pnt(70.,68.,0.), gp_Pnt(110.,0.,0.));
TopoDS_Wire W2 = BRepBuilderAPI_MakeWire(E21,E22,E23,E24);
Handle(AIS_Shape) aRect2 = new AIS_Shape(W2);
Handle_AIS_Shape aRect2 = new AIS_Shape(W2);
myAISContext->Display(aRect2);
myAISContext->SetColor(aRect2,Quantity_NOC_YELLOW);
myAISContext->Activate(aRect2,2);

View File

@@ -76,7 +76,7 @@ END_MESSAGE_MAP()
void DlgAttributes::OnColor()
{
Handle(AIS_InteractiveObject) Current ;
Handle_AIS_InteractiveObject Current ;
Quantity_Color CSFColor ;
COLORREF MSColor ;

View File

@@ -73,7 +73,7 @@ protected:
void SetMaterial (Graphic3d_NameOfMaterial Material);
private:
Handle(AIS_InteractiveContext) myAISContext;
Handle_AIS_InteractiveContext myAISContext;
CResultDialog* myCResultDialog;
};

View File

@@ -10,6 +10,7 @@
#include <Prs3d_Drawer.hxx>
#include <Prs3d_ArrowAspect.hxx>
IMPLEMENT_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
#ifdef _DEBUG

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