1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Compare commits

..

1 Commits

Author SHA1 Message Date
nbv
c2fd3dc272 0023675: P-curves of a face are out of the domain of the face.
Analyzing of 2D-curves' boundaries.
Tolerance range computing was changed.

1. Function Validate(...) returns BRepCheck_Status.
2. For faces, whose pcurves is out of domain, status BRepCheck_OutOfSurfaceBoundary is returned.
3. For edges, which is out of face's boundary, status BRepCheck_PCurveIsOutOfDomainFace is returned.
4. Print warning, if status is not defined.
5. BRepCheck_Face::SetStatus(...) and BRepCheck_Wire::SetStatus(...) functions added.
6. ShapeFix::RefineFace(...) function and it draw-commands (ffixpcu and sfixpcu) are added. Command "ffixpcu" fixes a face with BRepCheck_OutOfSurfaceBoundary status. Command "sfixpcu" fixes a shape, which contains a face with BRepCheck_OutOfSurfaceBoundary status.
7. Trimming algorithm for surfaces changed (ForceTrim method is added).
8. Small correction of output of "checkshape" command result.
9. MinMax() and RealMod() functions are added.
10. Fixing of some shapes from test base.

Faces, which based on periodic or closed surfaces, are not controlled.
2014-04-03 12:08:15 +04:00
7267 changed files with 152374 additions and 222145 deletions

4
.gitattributes vendored
View File

@@ -36,14 +36,10 @@
*.rle eol=lf
*.vrml eol=lf
*.md eol=lf
*.natvis eol=lf
FILES eol=lf
PACKAGES eol=lf
EXTERNLIB eol=lf
UDLIST eol=lf
tests/* eol=lf
tests/*/* eol=lf
tests/*/*/* eol=lf
*.bat eol=crlf
*.cmd eol=crlf
*.rc eol=crlf

3
.gitignore vendored
View File

@@ -34,9 +34,6 @@ Release
*.ncb
*.suo
*.sdf
*.opensdf
*.ipch
*.aps
# test results
/results*

View File

@@ -1,347 +1,530 @@
cmake_minimum_required (VERSION 2.8.10 FATAL_ERROR)
cmake_minimum_required ( VERSION 2.6)
set (CMAKE_SUPPRESS_REGENERATION TRUE)
# set build configurations list
if (NOT BUILD_CONFIGURATION)
set (BUILD_CONFIGURATION "Release" CACHE STRING "Build type of OCCT" FORCE)
set(BUILD_CONFIGURATION "Release" CACHE STRING "Build type of OCCT" FORCE)
SET_PROPERTY(CACHE BUILD_CONFIGURATION PROPERTY STRINGS Release Debug RelWithDebInfo)
endif()
set (CMAKE_CONFIGURATION_TYPES ${BUILD_CONFIGURATION} CACHE INTERNAL "" FORCE)
set(CMAKE_CONFIGURATION_TYPES ${BUILD_CONFIGURATION} CACHE INTERNAL "" FORCE)
# the name of the project
project (OCCT)
project(OCCT)
# Solution folder property
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set (CMAKE_BUILD_TYPE ${BUILD_CONFIGURATION} CACHE INTERNAL "Build type of OCCT" FORCE )
set(BUILD_SHARED_LIBS ON)
# install dir of the built project
set (INSTALL_DIR "" CACHE PATH "Directory that will contain install files of OCCT" )
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
IF("${BUILD_CONFIGURATION}" STREQUAL "${CMAKE_BUILD_TYPE}")
SET(CHANGES_ARE_NEEDED OFF)
ELSE()
SET(CHANGES_ARE_NEEDED ON)
ENDIF()
# whether install test bundle or not
set (INSTALL_TESTS OFF CACHE BOOL "Is tests copy to install directory")
MATH(EXPR COMPILER_BITNESS "32 + 32*(${CMAKE_SIZEOF_VOID_P}/8)")
set (BUILD_PATCH_DIR "" CACHE PATH "directory with OCCT patch")
SET( CMAKE_BUILD_TYPE ${BUILD_CONFIGURATION} CACHE INTERNAL "Build type of OCCT" FORCE )
SET( INSTALL_DIR "" CACHE PATH "Directory that will contain install files of OCCT" )
SET( CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
# the list of being built toolkits
set (BUILD_TOOLKITS "" CACHE STRING "Toolkits are also included in OCCT")
separate_arguments (BUILD_TOOLKITS)
separate_arguments(BUILD_TOOLKITS)
IF(MSVC)
SET(BUILD_Samples OFF CACHE BOOL "OCCT samples building")
ENDIF()
include(adm/cmake/CMakeModules.txt)
if (WIN32)
set(SCRIPT_EXT bat)
else()
set(SCRIPT_EXT sh)
endif()
if (MSVC)
set (BUILD_MFC_SAMPLES OFF CACHE BOOL "OCCT samples building")
add_definitions(/fp:precise)
endif()
# whether use optional 3rdparty or not
if (APPLE)
set (USE_GLX OFF CACHE BOOL "Are X11 OpenGL used on OSX or not")
endif()
set (USE_FREEIMAGE OFF CACHE BOOL "Is freeimage used or not")
set (USE_VTK OFF CACHE BOOL "Is VTK used or not")
if (NOT DEFINED ANDROID)
set (USE_GL2PS OFF CACHE BOOL "Is gl2ps used or not")
set (USE_TBB OFF CACHE BOOL "Is tbb used or not")
set (USE_OPENCL OFF CACHE BOOL "Is OpenCL used or not")
endif()
# macro: include patched file if it exists
macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
if (NOT "${BUILD_PATCH_DIR}" STREQUAL "" AND EXISTS "${BUILD_PATCH_DIR}/${BEING_INCLUDED_FILE}.cmake")
include(${BUILD_PATCH_DIR}/${BEING_INCLUDED_FILE}.cmake)
else()
include(${BEING_INCLUDED_FILE}.cmake)
# set compiler short name and choose SSE2 option for appropriate MSVC compilers
if (DEFINED MSVC70)
SET(COMPILER vc7)
elseif (DEFINED MSVC80)
SET(COMPILER vc8)
if (${COMPILER_BITNESS} STREQUAL 32)
add_definitions(/arch:SSE2)
endif()
endmacro()
# include occt macros
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/occt_macros")
# BUILD_POSTFIX variable is used by all toolkit cmakelists.txt projects
OCCT_MAKE_BUILD_POSTFIX()
# include the patched or original list of modules
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_modules")
# include the list of being used toolkits. USED_TOOLKITS variable
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_toolkits")
# include the patched or original list of definitions and flags
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/occt_defs_flags")
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/3rdparty_macro")
set (3RDPARTY_DIR_LABEL "The directory containing required 3rdparty products")
if (NOT DEFINED 3RDPARTY_DIR)
set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_LABEL})
endif()
# search for 3rdparty dir
if ("${3RDPARTY_DIR}" STREQUAL "")
if (DEFINED ENV{3RDPARTY_DIR})
set (3RDPARTY_DIR "$ENV{3RDPARTY_DIR}" CACHE PATH ${3RDPARTY_DIR_LABEL} 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_LABEL} FORCE)
elseif (DEFINED MSVC90)
SET(COMPILER vc9)
if (${COMPILER_BITNESS} STREQUAL 32)
add_definitions(/arch:SSE2)
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}" STREQUAL ON)
message (STATUS "Info: tcl is used by OCCT")
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/tcl")
else()
OCCT_CHECK_AND_UNSET ("3RDPARTY_TCL_DIR")
OCCT_CHECK_AND_UNSET ("3RDPARTY_TCL_INCLUDE_DIR")
OCCT_CHECK_AND_UNSET ("3RDPARTY_TCL_LIBRARY")
OCCT_CHECK_AND_UNSET ("3RDPARTY_TCL_LIBRARY_DIR")
OCCT_CHECK_AND_UNSET ("3RDPARTY_TK_INCLUDE_DIR")
OCCT_CHECK_AND_UNSET ("3RDPARTY_TK_LIBRARY")
OCCT_CHECK_AND_UNSET ("3RDPARTY_TK_LIBRARY_DIR")
endif()
# search for CSF_FREETYPE variable in EXTERNLIB of each being used toolkit
OCCT_IS_PRODUCT_REQUIRED(CSF_FREETYPE USE_FREETYPE)
if ("${USE_FREETYPE}" STREQUAL ON)
message (STATUS "Info: freetype is used by OCCT")
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/freetype")
else()
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_DIR")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_LIBRARY")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_LIBRARY_DIR")
endif()
# VTK
if (USE_VTK)
add_definitions (-DHAVE_VTK)
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/vtk")
endif()
# GLX
if (USE_GLX)
add_definitions (-DMACOSX_USE_GLX)
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/glx")
endif()
# FREEIMAGE
if (USE_FREEIMAGE)
add_definitions (-DHAVE_FREEIMAGE)
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/freeimage")
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/freeimageplus")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGE")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGEPLUS")
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGE")
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGEPLUS")
endif()
# GL2PS
if (USE_GL2PS)
add_definitions (-DHAVE_GL2PS)
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/gl2ps")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GL2PS")
OCCT_CHECK_AND_UNSET ("INSTALL_GL2PS")
endif()
# OPENCL
if (USE_OPENCL)
add_definitions (-DHAVE_OPENCL)
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/opencl")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_OPENCL")
OCCT_CHECK_AND_UNSET ("3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_HEADER")
OCCT_CHECK_AND_UNSET ("3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB")
OCCT_CHECK_AND_UNSET ("INSTALL_OPENCL")
endif()
# TBB
if (USE_TBB)
ADD_DEFINITIONS(-DHAVE_TBB)
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/tbb")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBB")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBBMALLOC")
OCCT_CHECK_AND_UNSET ("INSTALL_TBB")
endif()
string (REGEX REPLACE ";" " " 3RDPARTY_NOT_INCLUDED "${3RDPARTY_NOT_INCLUDED}")
# check all 3rdparty paths
if (3RDPARTY_NOT_INCLUDED)
message (FATAL_ERROR "NOT FOUND: ${3RDPARTY_NOT_INCLUDED}" )
endif()
if (3RDPARTY_INCLUDE_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_INCLUDE_DIRS)
string (REGEX REPLACE ";" "\n\t" 3RDPARTY_INCLUDE_DIRS_WITH_ENDS "${3RDPARTY_INCLUDE_DIRS}")
message (STATUS "The directories containing 3rdparty headers: ${3RDPARTY_INCLUDE_DIRS_WITH_ENDS}")
include_directories (${3RDPARTY_INCLUDE_DIRS})
endif()
if (3RDPARTY_LIBRARY_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_LIBRARY_DIRS)
string (REGEX REPLACE ";" "\n\t" 3RDPARTY_LIBRARY_DIRS_WITH_ENDS "${3RDPARTY_LIBRARY_DIRS}")
message (STATUS "The directories containing 3rdparty libraries: ${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
link_directories (${3RDPARTY_LIBRARY_DIRS})
endif()
OCCT_MAKE_BUILD_POSTFIX()
# build directories
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/lib${BUILD_POSTFIX})
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/lib${BUILD_POSTFIX})
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/bin${BUILD_POSTFIX})
if ("${INSTALL_DIR}" STREQUAL "")
message (FATAL_ERROR "INSTALL_DIR variable is empty. It's required to define installation directory")
else()
# inc,data,tests DIRECTORY
install (DIRECTORY "${CMAKE_SOURCE_DIR}/inc" DESTINATION "${INSTALL_DIR}")
install (DIRECTORY "${CMAKE_SOURCE_DIR}/data" DESTINATION "${INSTALL_DIR}")
install (DIRECTORY "${CMAKE_SOURCE_DIR}/samples/tcl" DESTINATION "${INSTALL_DIR}/samples")
if (INSTALL_TESTS)
install (DIRECTORY "${CMAKE_SOURCE_DIR}/tests" DESTINATION "${INSTALL_DIR}" )
elseif (DEFINED MSVC10)
SET(COMPILER vc10)
if (${COMPILER_BITNESS} STREQUAL 32)
add_definitions(/arch:SSE2)
endif()
elseif (DEFINED MSVC11)
SET(COMPILER vc11)
else()
SET(COMPILER ${CMAKE_GENERATOR})
endif()
# install patch inc, data, tests folder
if (NOT "${BUILD_PATCH_DIR}" STREQUAL "")
if (EXISTS "${BUILD_PATCH_DIR}/inc")
install (DIRECTORY "${BUILD_PATCH_DIR}/inc" DESTINATION "${INSTALL_DIR}" )
endif()
add_definitions(-DCSFDB)
if(WIN32)
add_definitions(/DWNT -wd4996)
elseif(APPLE)
add_definitions(-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H)
else()
add_definitions(-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H -DLIN)
endif()
if (EXISTS "${BUILD_PATCH_DIR}/data")
install (DIRECTORY "${BUILD_PATCH_DIR}/data" DESTINATION "${INSTALL_DIR}" )
endif()
# enable structured exceptions for MSVC
string(REGEX MATCH "EHsc" ISFLAG "${CMAKE_CXX_FLAGS}")
IF(ISFLAG)
STRING(REGEX REPLACE "EHsc" "EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
ELSEIF(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -EHa")
ENDIF()
if (INSTALL_TESTS)
if (EXISTS "${BUILD_PATCH_DIR}/tests")
install (DIRECTORY "${BUILD_PATCH_DIR}/tests" DESTINATION "${INSTALL_DIR}" )
endif()
endif()
endif()
if (WIN32)
set (SCRIPT_EXT bat)
else()
set (SCRIPT_EXT sh)
endif()
# DRAW.BAT or DRAW.SH
IF(NOT "${BUILD_PATCH_DIR}" STREQUAL "" AND EXISTS "${BUILD_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}")
install(FILES "${BUILD_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
ELSE()
install(FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
# enable parallel compilation on MSVC 9 and above
IF(WIN32)
IF(NOT DEFINED MSVC70 AND NOT DEFINED MSVC80)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -MP")
ENDIF()
ENDIF()
# set compiler short name
OCCT_MAKE_COMPILER_SHORT_NAME()
OCCT_MAKE_COMPILER_BITNESS()
SET(SUB_CUSTOM "custom_${COMPILER}_${COMPILER_BITNESS}_${BUILD_POSTFIX}.${SCRIPT_EXT}")
if (WIN32)
SET (ADDITIONAL_CUSTOM_CONTENT "\nif exist \"%~dp0${SUB_CUSTOM}\" (\n call \"%~dp0${SUB_CUSTOM}\" %1 %2 %3 \n)")
# 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 (ADDITIONAL_CUSTOM_CONTENT "\nif [ -e \"\${aScriptPath}/${SUB_CUSTOM}\" ]; then\n source \"\${aScriptPath}/${SUB_CUSTOM}\" \"\${COMPILER}\" \"\${WOKSTATION}\${ARCH}\" \"\${CASDEB}\" \nfi")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
# change custom.bat/sh
if (EXISTS "${INSTALL_DIR}/custom.${SCRIPT_EXT}")
file (READ "${INSTALL_DIR}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT)
set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}")
file (WRITE "${INSTALL_DIR}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
else()
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "${INSTALL_DIR}")
endif()
# write current custom.bat/sh
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.in" "${SUB_CUSTOM}" "${INSTALL_DIR}")
if (BUILD_MFC_SAMPLES)
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR}")
endif()
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/env.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}" "${INSTALL_DIR}")
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEB")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEB")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/bin)
# RESOURCES
OCCT_INSTALL_FILE_OR_DIR ("src/DrawResources" "${INSTALL_DIR}/src")
OCCT_INSTALL_FILE_OR_DIR ("src/StdResource" "${INSTALL_DIR}/src")
OCCT_INSTALL_FILE_OR_DIR ("src/SHMessage" "${INSTALL_DIR}/src")
OCCT_INSTALL_FILE_OR_DIR ("src/Textures" "${INSTALL_DIR}/src")
OCCT_INSTALL_FILE_OR_DIR ("src/Shaders" "${INSTALL_DIR}/src")
OCCT_INSTALL_FILE_OR_DIR ("src/XSMessage" "${INSTALL_DIR}/src")
OCCT_INSTALL_FILE_OR_DIR ("src/XSTEPResource" "${INSTALL_DIR}/src")
OCCT_INSTALL_FILE_OR_DIR ("src/XmlOcafResource" "${INSTALL_DIR}/src")
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/DrawResources" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/StdResource" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/SHMessage" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/Textures" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/Shaders" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/XSMessage" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/XSTEPResource" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/XmlOcafResource" DESTINATION "${INSTALL_DIR}/src" )
OCCT_INSTALL_FILE_OR_DIR ("src/UnitsAPI/Lexi_Expr.dat" "${INSTALL_DIR}/src/UnitsAPI")
OCCT_INSTALL_FILE_OR_DIR ("src/UnitsAPI/Units.dat" "${INSTALL_DIR}/src/UnitsAPI")
OCCT_INSTALL_FILE_OR_DIR ("src/TObj/TObj.msg" "${INSTALL_DIR}/src/TObj")
install(FILES "${CMAKE_SOURCE_DIR}/src/UnitsAPI/Lexi_Expr.dat" DESTINATION "${INSTALL_DIR}/src/UnitsAPI" )
install(FILES "${CMAKE_SOURCE_DIR}/src/UnitsAPI/Units.dat" DESTINATION "${INSTALL_DIR}/src/UnitsAPI" )
install(FILES "${CMAKE_SOURCE_DIR}/src/TObj/TObj.msg" DESTINATION "${INSTALL_DIR}/src/TObj" )
IF("${BUILD_CONFIGURATION}" STREQUAL "Release")
SET(BUILD_SUFFIX "")
ELSE()
SET(BUILD_SUFFIX "") # debug == release
ENDIF()
#Toolkits uses variables: INSTALL_DIR, OS_WITH_BIT, COMPILER, BUILD_POSTFIX
OCCT_MAKE_OS_WITH_BITNESS()
FUNCTION(SUBDIRECTORY_NAMES MAIN_DIRECTORY RESULT)
file(GLOB SUB_ITEMS "${MAIN_DIRECTORY}/*")
# consider for patch existence
set (IS_PATCH_CURRENT "NO")
set (TK_ROOT_DIR ${CMAKE_SOURCE_DIR})
if (NOT "${BUILD_PATCH_DIR}" STREQUAL "")
set (IS_PATCH_CURRENT "YES")
set (TK_ROOT_DIR ${BUILD_PATCH_DIR})
endif()
# include patched toolkit projects or original ones
set (UNSUBDIRS "")
if (NOT "${BUILD_PATCH_DIR}" STREQUAL "" AND EXISTS "${BUILD_PATCH_DIR}/adm/cmake/occt_inc_toolkits.cmake")
set (TK_ROOT_DIR ${BUILD_PATCH_DIR})
include (${BUILD_PATCH_DIR}/adm/cmake/occt_inc_toolkits.cmake)
else()
set (IS_PATCH_CURRENT "NO")
set (TK_ROOT_DIR ${CMAKE_SOURCE_DIR})
include (adm/cmake/occt_inc_toolkits.cmake)
endif()
# include some required original occt_inc_toolkits
if (NOT "${UNSUBDIRS}" STREQUAL "")
set (IS_PATCH_CURRENT "NO")
# add required subdirs
foreach (UNSUBDIR ${UNSUBDIRS})
add_subdirectory (${CMAKE_SOURCE_DIR}/${UNSUBDIR})
foreach(ITEM ${SUB_ITEMS})
if(IS_DIRECTORY "${ITEM}")
GET_FILENAME_COMPONENT(ITEM_NAME "${ITEM}" NAME)
LIST(APPEND LOCAL_RESULT "${ITEM_NAME}")
endif()
endforeach()
endif()
set (${RESULT} ${LOCAL_RESULT} PARENT_SCOPE)
ENDFUNCTION()
# samples do not support patch usage
IF (BUILD_MFC_SAMPLES)
FUNCTION(FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
string( TOLOWER "${PRODUCT_NAME}" 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)
FOREACH( SEARCH_TEMPLATE ${SEARCH_TEMPLATES})
IF(LOCAL_RESULT)
BREAK()
ENDIF()
FOREACH(SUBDIR_NAME ${SUBDIR_NAME_LIST})
string( TOLOWER "${SUBDIR_NAME}" lower_SUBDIR_NAME )
STRING(REGEX MATCH "${SEARCH_TEMPLATE}" DUMMY_VAR "${lower_SUBDIR_NAME}")
IF(DUMMY_VAR)
LIST(APPEND LOCAL_RESULT ${SUBDIR_NAME})
ENDIF()
ENDFOREACH()
ENDFOREACH()
IF(LOCAL_RESULT)
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()
IF(WIN32)
SET(DLL_SO "dll")
SET(DLL_SO_FOLDER "bin")
SET(DLL_SO_PREFIX "")
ELSEIF(APPLE)
SET(DLL_SO "dylib")
SET(DLL_SO_FOLDER "lib")
SET(DLL_SO_PREFIX "lib")
ELSE()
SET(DLL_SO "so")
SET(DLL_SO_FOLDER "lib")
SET(DLL_SO_PREFIX "lib")
ENDIF()
SET(3RDPARTY_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "Directory contains required 3rdparty products")
SET(3RDPARTY_INCLUDE_DIRS "")
SET(3RDPARTY_NOT_INCLUDED)
IF(APPLE)
SET(USE_GLX OFF CACHE BOOL "whether use X11 OpenGL on OSX or not")
ENDIF()
SET(USE_GL2PS OFF CACHE BOOL "whether use gl2ps product or not")
SET(USE_FREEIMAGE OFF CACHE BOOL "whether use freeimage product or not")
SET(USE_TBB OFF CACHE BOOL "whether use tbb product or not")
SET(USE_OPENCL OFF CACHE BOOL "whether use OpenCL or not")
SET(INSTALL_TESTS OFF CACHE BOOL "Is tests copy to install directory")
MACRO (CHECK_AND_UNSET VARNAME)
IF(DEFINED ${VARNAME})
UNSET(${VARNAME} CACHE)
ENDIF()
ENDMACRO()
MACRO (CHECK_AND_UNSET_GROUP VARNAME)
CHECK_AND_UNSET ("${VARNAME}_DIR")
CHECK_AND_UNSET ("${VARNAME}_INCLUDE_DIR")
CHECK_AND_UNSET ("${VARNAME}_DLL")
CHECK_AND_UNSET ("${VARNAME}_LIBRARY")
ENDMACRO()
MACRO(THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME)
IF(NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DIR)
SET(3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "Directory contains ${PRODUCT_NAME} product")
ENDIF()
IF(3RDPARTY_DIR AND ("${3RDPARTY_${PRODUCT_NAME}_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED))
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" ${PRODUCT_NAME} ${PRODUCT_NAME}_DIR_NAME)
IF("${${PRODUCT_NAME}_DIR_NAME}" STREQUAL "")
MESSAGE(STATUS "${PRODUCT_NAME} DON'T FIND")
ELSE()
SET(3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_DIR}/${${PRODUCT_NAME}_DIR_NAME}" CACHE PATH "Directory contains ${PRODUCT_NAME} product" FORCE)
ENDIF()
ENDIF()
SET(INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "Is ${PRODUCT_NAME} lib copy to install directory")
IF(3RDPARTY_${PRODUCT_NAME}_DIR)
IF("${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND")
SET(3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "Directory contains headers of the ${PRODUCT_NAME} product" FORCE)
FIND_PATH(3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR ${HEADER_NAME} PATHS "${3RDPARTY_${PRODUCT_NAME}_DIR}/include" NO_DEFAULT_PATH)
ENDIF()
IF("${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND")
SET(3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "Path to library of the ${PRODUCT_NAME} product" FORCE)
FIND_LIBRARY(3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME} PATHS "${3RDPARTY_${PRODUCT_NAME}_DIR}/lib" NO_DEFAULT_PATH)
ENDIF()
IF("${3RDPARTY_${PRODUCT_NAME}_DLL}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_${PRODUCT_NAME}_DLL}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND")
SET(3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "Path to shared library of the ${PRODUCT_NAME} product" FORCE)
FIND_FILE(3RDPARTY_${PRODUCT_NAME}_DLL "${DLL_SO_PREFIX}${LIBRARY_NAME}.${DLL_SO}" PATHS "${3RDPARTY_${PRODUCT_NAME}_DIR}/${DLL_SO_FOLDER}" NO_DEFAULT_PATH)
ENDIF()
MARK_AS_ADVANCED(3RDPARTY_${PRODUCT_NAME}_DIR)
ELSE()
ENDIF()
# check default path (with additions) for header search
IF("${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}" STREQUAL "" OR "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND")
SET(3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "Directory contains headers of the ${PRODUCT_NAME} product" FORCE)
FIND_PATH(3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR ${HEADER_NAME} ${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_HEADER})
ENDIF()
# check default path (with additions) for library search
IF("${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" STREQUAL "" OR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND")
SET(3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "Directory contains library of the ${PRODUCT_NAME} product" FORCE)
FIND_LIBRARY(3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME} ${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_LIB})
ENDIF()
# check default path (with additions) for DLL search
IF("${3RDPARTY_${PRODUCT_NAME}_DLL}" STREQUAL "" OR "${3RDPARTY_${PRODUCT_NAME}_DLL}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND")
SET(3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "Directory contains shared library of the ${PRODUCT_NAME} product" FORCE)
FIND_FILE(3RDPARTY_${PRODUCT_NAME}_DLL "${DLL_SO_PREFIX}${LIBRARY_NAME}.${DLL_SO}" ${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_DLL})
ENDIF()
IF(3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
SET(3RDPARTY_INCLUDE_DIRS "${3RDPARTY_INCLUDE_DIRS};${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
ENDIF()
IF(3RDPARTY_${PRODUCT_NAME}_LIBRARY)
GET_FILENAME_COMPONENT(3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
SET(3RDPARTY_LIBRARY_DIRS "${3RDPARTY_LIBRARY_DIRS};${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_LIBRARY)
ENDIF()
IF(3RDPARTY_${PRODUCT_NAME}_DLL)
#
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL)
ENDIF()
IF(INSTALL_${PRODUCT_NAME})
INSTALL(FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}" DESTINATION "${INSTALL_DIR}/${DLL_SO_FOLDER}")
SET(3RDPARTY_${PRODUCT_NAME}_DLL_DIR "")
ELSE()
GET_FILENAME_COMPONENT(3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
ENDIF()
ENDMACRO()
# TCL
INCLUDE(adm/templates/tcl.cmake)
#install tcltk
IF(INSTALL_TCL)
SET(3RDPARTY_TCL_DLL_DIR "")
SET(3RDPARTY_TCL_LIB_DIR "")
GET_FILENAME_COMPONENT(3RDPARTY_TCL_LIB_DIR_INSIDE "${3RDPARTY_TCL_LIBRARY}" PATH)
GET_FILENAME_COMPONENT(3RDPARTY_TCL_DLL_DIR_INSIDE "${3RDPARTY_TCL_DLL}" PATH)
IF (IS_TCL_VERSION_FOUND)
SET (TCL_VERSION ${TCL_MAJOR_VERSION}${TCL_SEP}${TCL_MINOR_VERSION})
SET (TCL_FOLDER_VERSION ${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
ELSE()
SET (TCL_VERSION "")
#TODO SEARCH tclX.X & tkX.X subdirs
SET (TCL_FOLDER_VERSION "")
ENDIF()
INSTALL(FILES "${3RDPARTY_TCL_DLL_DIR_INSIDE}/${DLL_SO_PREFIX}tcl${TCL_VERSION}.${DLL_SO}" DESTINATION "${INSTALL_DIR}/${DLL_SO_FOLDER}")
INSTALL(FILES "${3RDPARTY_TCL_DLL_DIR_INSIDE}/${DLL_SO_PREFIX}tk${TCL_VERSION}.${DLL_SO}" DESTINATION "${INSTALL_DIR}/${DLL_SO_FOLDER}")
IF (IS_TCL_VERSION_FOUND)
INSTALL(DIRECTORY "${3RDPARTY_TCL_LIB_DIR_INSIDE}/tcl8" DESTINATION "${INSTALL_DIR}/lib")
INSTALL(DIRECTORY "${3RDPARTY_TCL_LIB_DIR_INSIDE}/tcl${TCL_FOLDER_VERSION}" DESTINATION "${INSTALL_DIR}/lib")
INSTALL(DIRECTORY "${3RDPARTY_TCL_LIB_DIR_INSIDE}/tk${TCL_FOLDER_VERSION}" DESTINATION "${INSTALL_DIR}/lib")
ELSE()
MESSAGE(STATUS "\nWarning: tclX.X and tkX.X subdirs won't be copyied during the installation process.")
MESSAGE(STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
ENDIF()
ELSE()
GET_FILENAME_COMPONENT(3RDPARTY_TCL_DLL_DIR "${3RDPARTY_TCL_DLL}" PATH)
GET_FILENAME_COMPONENT(3RDPARTY_TCL_LIB_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
ENDIF()
# GLX
IF(USE_GLX)
ADD_DEFINITIONS(-DMACOSX_USE_GLX)
IF(NOT DEFINED 3RDPARTY_GLX_DIR)
SET(3RDPARTY_GLX_DIR "" CACHE PATH "Directory contains GLX product")
ENDIF()
IF(3RDPARTY_DIR AND ("${3RDPARTY_GLX_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED))
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" GLX GLX_DIR_NAME)
IF("${GLX_DIR_NAME}" STREQUAL "")
MESSAGE(STATUS "GLX DON'T FIND")
ELSE()
SET(3RDPARTY_GLX_DIR "${3RDPARTY_DIR}/${GLX_DIR_NAME}" CACHE PATH "Directory contains GLX product" FORCE)
ENDIF()
ENDIF()
IF(3RDPARTY_GLX_DIR)
SET(3RDPARTY_GLX_INCLUDE_DIR "${3RDPARTY_GLX_DIR}/include" CACHE FILEPATH "Directory contains headers of the GLX product" FORCE)
SET(3RDPARTY_GLX_LIBRARY_DIR "${3RDPARTY_GLX_DIR}/lib" CACHE FILEPATH "Directory contains library of the GLX product" FORCE)
SET(3RDPARTY_INCLUDE_DIRS "${3RDPARTY_INCLUDE_DIRS};${3RDPARTY_GLX_INCLUDE_DIR}")
SET(3RDPARTY_LIBRARY_DIRS "${3RDPARTY_LIBRARY_DIRS};${3RDPARTY_GLX_LIBRARY_DIR}")
MARK_AS_ADVANCED(3RDPARTY_GLX_DIR)
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_GLX_INCLUDE_DIR)
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_GLX_LIBRARY_DIR)
ENDIF()
ENDIF()
# FREETYPE
THIRDPARTY_PRODUCT("FREETYPE" "ft2build.h" "freetype${BUILD_SUFFIX}")
IF("${3RDPARTY_FREETYPE_INCLUDE_DIR}" STREQUAL "" OR "${3RDPARTY_FREETYPE_INCLUDE_DIR}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND")
ELSEIF(EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR}/freetype2/")
SET(3RDPARTY_INCLUDE_DIRS "${3RDPARTY_INCLUDE_DIRS};${3RDPARTY_FREETYPE_INCLUDE_DIR}/freetype2")
ENDIF()
# FREEIMAGE
IF(USE_FREEIMAGE)
ADD_DEFINITIONS(-DHAVE_FREEIMAGE)
THIRDPARTY_PRODUCT("FREEIMAGE" "FreeImage.h" "freeimage${BUILD_SUFFIX}")
IF(WIN32)
IF("${3RDPARTY_FREEIMAGE_DIR}" STREQUAL "")
ELSE()
SET (3RDPARTY_FREEIMAGEPLUS_DIR "${3RDPARTY_FREEIMAGE_DIR}")
ENDIF()
THIRDPARTY_PRODUCT("FREEIMAGEPLUS" "FreeImagePlus.h" "freeimageplus${BUILD_SUFFIX}")
ENDIF()
ELSE()
CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGE")
CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGEPLUS")
CHECK_AND_UNSET ("INSTALL_FREEIMAGE")
CHECK_AND_UNSET ("INSTALL_FREEIMAGEPLUS")
ENDIF()
# GL2PS
IF(USE_GL2PS)
ADD_DEFINITIONS(-DHAVE_GL2PS)
THIRDPARTY_PRODUCT("GL2PS" "gl2ps.h" "gl2ps${BUILD_SUFFIX}")
ELSE()
CHECK_AND_UNSET_GROUP ("3RDPARTY_GL2PS")
CHECK_AND_UNSET ("INSTALL_GL2PS")
ENDIF()
# OPENCL
IF(USE_OPENCL)
ADD_DEFINITIONS(-DHAVE_OPENCL)
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_HEADER $ENV{AMDAPPSDKROOT}/include
$ENV{INTELOCLSDKROOT}/include
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/inc
$ENV{ATISTREAMSDKROOT}/include)
IF(${COMPILER_BITNESS} STREQUAL 32)
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB $ENV{AMDAPPSDKROOT}/lib/x86
$ENV{INTELOCLSDKROOT}/lib/x86
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/lib/Win32
$ENV{ATISTREAMSDKROOT}/lib/x86)
ELSEIF(${COMPILER_BITNESS} STREQUAL 64)
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB $ENV{AMDAPPSDKROOT}/lib/x86_64
$ENV{INTELOCLSDKROOT}/lib/x64
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/lib/x64
$ENV{ATISTREAMSDKROOT}/lib/x86_64)
ENDIF()
THIRDPARTY_PRODUCT("OPENCL" "CL/cl.h" "OpenCL${BUILD_SUFFIX}")
# if CL/cl.h isn't found (and 3RDPARTY_OPENCL_INCLUDE_DIR isn't defined)
# then try to find OpenCL/cl.h (all other variable won't be changed)
THIRDPARTY_PRODUCT("OPENCL" "OpenCL/cl.h" "OpenCL${BUILD_SUFFIX}")
ELSE()
CHECK_AND_UNSET_GROUP ("3RDPARTY_OPENCL")
CHECK_AND_UNSET ("3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB")
CHECK_AND_UNSET ("3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB")
CHECK_AND_UNSET ("INSTALL_OPENCL")
ENDIF()
# TBB
IF (USE_TBB)
ADD_DEFINITIONS(-DHAVE_TBB)
INCLUDE(adm/templates/tbb.cmake)
IF(INSTALL_TBB)
INSTALL(FILES "${3RDPARTY_TBB_DLL}" "${3RDPARTY_TBB_MALLOC_DLL}" DESTINATION "${INSTALL_DIR}/${DLL_SO_FOLDER}")
SET(3RDPARTY_TBB_DLL_DIR "")
SET(3RDPARTY_TBB_MALLOC_DLL_DIR "")
ELSE()
GET_FILENAME_COMPONENT(3RDPARTY_TBB_DLL_DIR "${3RDPARTY_TBB_DLL}" PATH)
GET_FILENAME_COMPONENT(3RDPARTY_TBB_MALLOC_DLL_DIR "${3RDPARTY_TBB_MALLOC_DLL}" PATH)
ENDIF()
ELSE()
CHECK_AND_UNSET_GROUP ("3RDPARTY_TBB")
CHECK_AND_UNSET_GROUP ("3RDPARTY_TBB_MALLOC")
CHECK_AND_UNSET ("3RDPARTY_TBB_DIR_NAME")
CHECK_AND_UNSET ("INSTALL_TBB")
ENDIF()
string( REGEX REPLACE ";" " " 3RDPARTY_NOT_INCLUDED "${3RDPARTY_NOT_INCLUDED}")
#CHECK ALL 3RDPARTY PATHS
IF(3RDPARTY_NOT_INCLUDED)
MESSAGE(FATAL_ERROR "NOT FOUND: ${3RDPARTY_NOT_INCLUDED}" )
ENDIF()
list(REMOVE_DUPLICATES 3RDPARTY_INCLUDE_DIRS)
string( REGEX REPLACE ";" "\n\t" 3RDPARTY_INCLUDE_DIRS_WITH_ENDS "${3RDPARTY_INCLUDE_DIRS}")
MESSAGE(STATUS "3RDPARTY_INCLUDE_DIRS: ${3RDPARTY_INCLUDE_DIRS_WITH_ENDS}")
include_directories( ${3RDPARTY_INCLUDE_DIRS} )
list(REMOVE_DUPLICATES 3RDPARTY_LIBRARY_DIRS)
string( REGEX REPLACE ";" "\n\t" 3RDPARTY_LIBRARY_DIRS_WITH_ENDS "${3RDPARTY_LIBRARY_DIRS}")
MESSAGE(STATUS "3RDPARTY_LIBRARY_DIRS: ${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
link_directories( ${3RDPARTY_LIBRARY_DIRS} )
IF("${INSTALL_DIR}" STREQUAL "")
MESSAGE(FATAL_ERROR "INSTALL_DIR is empty")
ELSE()
# inc,data,tests DIRECTORY
install(DIRECTORY "${CMAKE_SOURCE_DIR}/inc" DESTINATION "${INSTALL_DIR}" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/data" DESTINATION "${INSTALL_DIR}" )
IF(INSTALL_TESTS)
install(DIRECTORY "${CMAKE_SOURCE_DIR}/tests" DESTINATION "${INSTALL_DIR}" )
ENDIF()
# DRAW.BAT or DRAW.SH
install(FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_WRITE GROUP_EXECUTE
WORLD_READ WORLD_WRITE WORLD_EXECUTE)
IF (BUILD_Samples)
install(FILES "${CMAKE_SOURCE_DIR}/adm/templates/sample.bat" DESTINATION "${INSTALL_DIR}")
ENDIF()
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/env.${SCRIPT_EXT}.in" env.${SCRIPT_EXT} @ONLY)
install(FILES "${OCCT_BINARY_DIR}/env.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" )
ENDIF()
include(adm/cmake/CMakeToolKitsDeps.txt)
IF (BUILD_Samples)
SET (CMAKE_MFC_FLAG 2)
SET (OCCT_ROOT ${CMAKE_SOURCE_DIR})
SET (MFC_STANDARD_SAMPLES_DIR ${OCCT_ROOT}/samples/mfc/standard)
SET (COMMON_WINMAIN_FILE ${MFC_STANDARD_SAMPLES_DIR}/Common/Winmain.cpp)
add_subdirectory(samples/mfc/standard/mfcsample)
add_subdirectory(samples/mfc/standard/01_Geometry)
add_subdirectory(samples/mfc/standard/02_Modeling)
add_subdirectory(samples/mfc/standard/03_Viewer2d)
add_subdirectory(samples/mfc/standard/04_Viewer3d)
add_subdirectory(samples/mfc/standard/05_ImportExport)
add_subdirectory(samples/mfc/standard/06_Ocaf)
add_subdirectory(samples/mfc/standard/07_Triangulation)
add_subdirectory(samples/mfc/standard/08_HLR)
add_subdirectory(samples/mfc/standard/09_Animation)
add_subdirectory(samples/mfc/standard/10_Convert)
subdirs(samples/mfc/standard/mfcsample)
subdirs(samples/mfc/standard/01_Geometry)
subdirs(samples/mfc/standard/02_Modeling)
subdirs(samples/mfc/standard/03_Viewer2d)
subdirs(samples/mfc/standard/04_Viewer3d)
subdirs(samples/mfc/standard/05_ImportExport)
subdirs(samples/mfc/standard/06_Ocaf)
subdirs(samples/mfc/standard/07_Triangulation)
subdirs(samples/mfc/standard/08_HLR)
subdirs(samples/mfc/standard/09_Animation)
subdirs(samples/mfc/standard/10_Convert)
ENDIF()

View File

@@ -1,3 +1,4 @@
n IncludeLibrary
n NCollection
p BSplCLib
p BSplSLib
@@ -6,13 +7,17 @@ p BVH
p CSLib
p Convert
p Dico
p Dynamic
p ElCLib
p ElSLib
p Expr
p ExprIntrp
p FSD
p GeomAbs
p GraphDS
p GraphTools
p MMgt
p Materials
p Message
p OSD
p PLib
@@ -35,6 +40,7 @@ p UnitsAPI
p gp
p math
r OS
t TKAdvTools
t TKMath
t TKernel
p Adaptor2d
@@ -105,7 +111,7 @@ p BRepGProp
p BRepIntCurveSurface
p BRepLib
p BRepMAT2d
n BRepMesh
p BRepMesh
p BRepOffset
p BRepOffsetAPI
p BRepPrim
@@ -127,7 +133,9 @@ p FairCurve
p FilletSurf
p GccAna
p GccEnt
p GccGeo
p GccInt
p GccIter
p Geom2dAPI
p Geom2dGcc
p Geom2dHatch
@@ -182,7 +190,7 @@ p TopOpeBRepBuild
p TopOpeBRepDS
p TopOpeBRepTool
p TopTrans
n XBRepMesh
p XBRepMesh
t TKBO
t TKBool
t TKFeat
@@ -475,10 +483,4 @@ p Font
p BOPAlgo
p BOPDS
p BOPCol
p IVtk
p IVtkOCC
p IVtkVTK
p IVtkTools
t TKIVtk
p IVtkDraw
t TKIVtkDraw
p BOPInt

View File

@@ -1,825 +0,0 @@
# =======================================================================
# Created on: 2014-03-21
# Created by: OMY
# Copyright (c) 1996-1999 Matra Datavision
# Copyright (c) 1999-2014 OPEN CASCADE SAS
#
# This file is part of Open CASCADE Technology software library.
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License version 2.1 as published
# by the Free Software Foundation, with special exception defined in the file
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
# distribution for complete text of the license and disclaimer of any warranty.
#
# Alternatively, this file may be used under the terms of Open CASCADE
# commercial license or contractual agreement.
#
# Brief: This script compiles OCCT documents from *.md files to HTML pages
# =======================================================================
# ======================================
# Common functions
# ======================================
# Prints help message
proc OCCDoc_PrintHelpMessage {} {
puts "\nUsage: gendoc \[-h\] {-refman|-overview} \[-html|-pdf|-chm\] \[-m=<list of modules>|-ug=<list of docs>\] \[-v\] \[-s=<search_mode>\] \[-mathjax=<path>\]"
puts ""
puts "Options are:"
puts ""
puts "choice of documentation to be generated:"
puts " -overview : To generate Overview and User Guides"
puts " (cannot be used with -refman)"
puts " -refman : To generate class Reference Manual"
puts " (cannot be used with -overview)"
puts ""
puts "choice of output format:"
puts " -html : To generate HTML files"
puts " (default, cannot be used with -pdf or -chm)"
puts " -pdf : To generate PDF files"
puts " (cannot be used with -refman, -html, or -chm)"
puts " -chm : To generate CHM files"
puts " (cannot be used with -html or -pdf)"
puts ""
puts "additional options:"
puts " -m=<modules_list> : List of OCCT modules (separated with comma),"
puts " for generation of Reference Manual"
puts " -ug=<docs_list> : List of MarkDown documents (separated with comma),"
puts " to use for generation of Overview / User Guides"
puts " -mathjax=<path> : To use local or alternative copy of MathJax"
puts " -s=<search_mode> : Specifies the Search mode of HTML documents"
puts " Can be: none | local | server | external"
puts " -h : Prints this help message"
puts " -v : Enables more verbose output"
}
# A command for User Documentation compilation
proc gendoc {args} {
# Parameters
set DOC_TYPE "REFMAN"
set GEN_MODE "HTML_ONLY"
set DOCFILES {}
set MODULES {}
set DOCLABEL ""
set VERB_MODE "NO"
set SEARCH_MODE "none"
set MATHJAX_LOCATION "http://cdn.mathjax.org/mathjax/latest"
set mathjax_js_name "MathJax.js"
set DOCTYPE_COMBO_FLAG 0
set GENMODE_COMBO_FLAG 0
set GENERATE_PRODUCTS_REFMAN "NO"
global available_docfiles; # The full list of md files for HTML or CHM generation
global available_pdf; # The full list of md files for PDF generation
global tcl_platform
global args_names
global args_values
global env
# Load list of docfiles
if { [OCCDoc_LoadFilesList] != 0 } {
puts "Error: File FILES_HTML.txt or FILES_PDF.txt was not found on this computer.\nAborting..."
return -1
}
# Parse CL arguments
if {[OCCDoc_ParseArguments $args] == 1} {
return -1
}
# Print help message if no arguments provided
if {[llength $args_names] == 0} {
OCCDoc_PrintHelpMessage
return 0
}
foreach arg_n $args_names {
if {$arg_n == "h"} {
OCCDoc_PrintHelpMessage
return 0
} elseif {$arg_n == "html"} {
if { ([ lsearch $args_names "refman" ] == -1) &&
([ lsearch $args_names "overview" ] == -1) } {
puts "Warning: Please specify -refman or -overview argument."
return -1
}
if { [ lsearch $args_names "refman" ] != -1 } {
continue
}
if { $GENMODE_COMBO_FLAG != 1 } {
set GEN_MODE "HTML_ONLY"
set GENMODE_COMBO_FLAG 1
} else {
puts "Error: Options -html, -pdf and -chm can not be combined."
return -1
}
} elseif {$arg_n == "chm"} {
if { ([ lsearch $args_names "refman" ] == -1) &&
([ lsearch $args_names "overview" ] == -1) } {
puts "Warning: Please specify -refman or -overview argument."
return -1
}
if { [ lsearch $args_names "refman" ] != -1 } {
continue
}
if { $GENMODE_COMBO_FLAG != 1 } {
set GEN_MODE "CHM_ONLY"
set GENMODE_COMBO_FLAG 1
} else {
puts "Error: Options -html, -pdf and -chm cannot be combined."
return -1
}
} elseif {$arg_n == "pdf"} {
if { ([ lsearch $args_names "refman" ] == -1) &&
([ lsearch $args_names "overview" ] == -1) } {
puts "Warning: Please specify -refman or -overview argument."
return -1
}
if { [ lsearch $args_names "refman" ] != -1 } {
continue
}
if { $GENMODE_COMBO_FLAG != 1 } {
set GEN_MODE "PDF_ONLY"
set GENMODE_COMBO_FLAG 1
} else {
puts "Error: Options -html, -pdf and -chm cannot be combined."
return -1
}
} elseif {$arg_n == "overview"} {
if { $DOCTYPE_COMBO_FLAG != 1 } {
set DOC_TYPE "OVERVIEW"
set DOCTYPE_COMBO_FLAG 1
} else {
puts "Error: Options -refman and -overview cannot be combined."
return -1
}
# Print ignored options
if { [ lsearch $args_names "m" ] != -1 } {
puts "\nInfo: The following options will be ignored: \n"
puts " * -m"
}
puts ""
} elseif {$arg_n == "refman"} {
if { $DOCTYPE_COMBO_FLAG != 1 } {
set DOC_TYPE "REFMAN"
set DOCTYPE_COMBO_FLAG 1
if { [file exists [pwd]/src/VAS/Products.tcl] } {
set GENERATE_PRODUCTS_REFMAN "YES"
}
} else {
puts "Error: Options -refman and -overview cannot be combined."
return -1
}
# Print ignored options
if { ([ lsearch $args_names "pdf" ] != -1) ||
([ lsearch $args_names "chm" ] != -1) ||
([ lsearch $args_names "ug" ] != -1) } {
puts "\nInfo: The following options will be ignored: \n"
if { [ lsearch $args_names "pdf" ] != -1 } {
puts " * -pdf"
}
if { [ lsearch $args_names "chm" ] != -1 } {
puts " * -chm"
}
if { [ lsearch $args_names "ug" ] != -1 } {
puts " * -ug"
}
puts ""
}
if { $GENERATE_PRODUCTS_REFMAN == "YES" } {
if { [ lsearch $args_names "m" ] == -1 } {
puts "\nError: Cannot generate Reference Manual for the whole set of OCC Products."
puts "Aborting..."
return -1
}
}
} elseif {$arg_n == "v"} {
set VERB_MODE "YES"
} elseif {$arg_n == "ug"} {
if { ([ lsearch $args_names "refman" ] != -1) } {
continue
}
if {$args_values(ug) != "NULL"} {
set DOCFILES $args_values(ug)
} else {
puts "Error in argument ug."
return -1
}
# Check if all chosen docfiles are correct
foreach docfile $DOCFILES {
if { [ lsearch $args_names "pdf" ] == -1 } {
# Check to generate HTMLs
if { [lsearch $available_docfiles $docfile] == -1 } {
puts "Error: File \"$docfile\" is not presented in the list of available docfiles."
puts " Please specify the correct docfile name."
return -1
}
} else {
# Check to generate PDFs
if { [lsearch $available_pdf $docfile] == -1 } {
puts "Error: File \"$docfile\" is not presented in the list of generic PDFs."
puts " Please specify the correct pdf name."
return -1
}
}
}
} elseif {$arg_n == "m"} {
if { [ lsearch $args_names "overview" ] != -1 } {
continue
}
if {$args_values(m) != "NULL"} {
set MODULES $args_values(m)
} else {
puts "Error in argument m."
return -1
}
} elseif {$arg_n == "s"} {
if { [ lsearch $args_names "pdf" ] != -1 } {
continue
}
if {$args_values(s) != "NULL"} {
set SEARCH_MODE $args_values(s)
} else {
puts "Error in argument s."
return -1
}
} elseif {$arg_n == "mathjax"} {
if { [ lsearch $args_names "pdf" ] != -1 } {
set possible_mathjax_loc $args_values(mathjax)
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
set MATHJAX_LOCATION $args_values(mathjax)
puts "$MATHJAX_LOCATION"
} else {
puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc."
puts " MathJax will be used from $MATHJAX_LOCATION"
}
} else {
puts "Warning: MathJax is not used with pdf and will be ignored."
}
} else {
puts "\nWrong argument: $arg_n"
OCCDoc_PrintHelpMessage
return -1
}
}
# Check the existence of the necessary tools
set DOXYGEN_PATH ""
set GRAPHVIZ_PATH ""
set INKSCAPE_PATH ""
set PDFLATEX_PATH ""
set HHC_PATH ""
OCCDoc_DetectNecessarySoftware $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH $PDFLATEX_PATH
if {$DOXYGEN_PATH == ""} {
puts " Aborting..."
return -1
}
if {"$::tcl_platform(platform)" == "windows"} {
if { ($GEN_MODE == "CHM_ONLY") && ($HHC_PATH == "") } {
puts " Aborting..."
return -1
}
}
if { ($PDFLATEX_PATH == "") && ($GEN_MODE == "PDF_ONLY") } {
puts " Aborting..."
return -1
}
# If we do not specify list for docfiles with -m argument,
# we assume that we have to generate all docfiles
if { [llength $DOCFILES] == 0 } {
if { $GEN_MODE != "PDF_ONLY" } {
set DOCFILES $available_docfiles
} else {
set DOCFILES $available_pdf
}
}
puts ""
# Clean logfiles
set OUTDIR [OCCDoc_GetRootDir]/doc/
set DOXYLOG $OUTDIR/doxygen_warnings_and_errors.log
set PDFLOG $OUTDIR/pdflatex_warnings_and_errors.log
file delete -force $PDFLOG
file delete -force $DOXYLOG
# Start main activities
if { $GEN_MODE != "PDF_ONLY" } {
OCCDoc_Main $DOC_TYPE $DOCFILES $MODULES $GEN_MODE $VERB_MODE $SEARCH_MODE $MATHJAX_LOCATION $GENERATE_PRODUCTS_REFMAN $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
} else {
puts "Generating OCCT User Guides in PDF format...\n"
foreach pdf $DOCFILES {
puts "Info: Processing file $pdf\n"
# Some values are hardcoded because they are related only to PDF generation
OCCDoc_Main "OVERVIEW" [list $pdf] {} "PDF_ONLY" $VERB_MODE "none" $MATHJAX_LOCATION "NO" $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
}
puts "[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generation completed."
puts "\nPDF files are generated in \n[file normalize [OCCDoc_GetRootDir]/doc/pdf]"
}
}
# Main procedure for documents compilation
proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode searchMode mathjaxLocation generateProductsRefman DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH HHC_PATH} {
global available_docfiles
global available_pdf
set PRODPATH ""
if { [string compare -nocase $generateProductsRefman "YES"] == 0 } {
set PRODPATH [pwd]
}
set ROOTDIR [OCCDoc_GetRootDir $PRODPATH]
set INDIR [OCCDoc_GetDoxDir]
set OUTDIR $ROOTDIR/doc
set PDFDIR $OUTDIR/pdf
set UGDIR $PDFDIR/user_guides
set DGDIR $PDFDIR/dev_guides
set TAGFILEDIR $OUTDIR/refman
set HTMLDIR $OUTDIR/overview/html
set LATEXDIR $OUTDIR/overview/latex
set DOXYFILE $OUTDIR/OCCT.cfg
# Create or cleanup the output folders
if { [string compare -nocase $generateProductsRefman "YES"] != 0 } {
if { ![file exists $OUTDIR] } {
file mkdir $OUTDIR
}
if { ![file exists $HTMLDIR] } {
file mkdir $HTMLDIR
}
if { ![file exists $PDFDIR] } {
file mkdir $PDFDIR
}
if { ![file exists $UGDIR] } {
file mkdir $UGDIR
}
if { ![file exists $DGDIR] } {
file mkdir $DGDIR
}
if { [file exists $LATEXDIR] } {
file delete -force $LATEXDIR
}
file mkdir $LATEXDIR
}
if { $docType == "REFMAN" } {
if { ![file exists $TAGFILEDIR] } {
file mkdir $TAGFILEDIR
}
}
# is MathJax HLink?
set mathjax_relative_location $mathjaxLocation
if { [file isdirectory "$mathjaxLocation"] } {
if { $generatorMode == "HTML_ONLY" } {
# related path
set mathjax_relative_location [OCCDoc_GetRelPath $HTMLDIR $mathjaxLocation]
} elseif { $generatorMode == "CHM_ONLY" } {
# absolute path
set mathjax_relative_location [file normalize $mathjaxLocation]
}
}
if { $generateProductsRefman == "YES" } {
set DOCDIR "$OUTDIR/refman"
puts "\nGenerating OCC Products Reference Manual\n"
} else {
if { $docType == "REFMAN"} {
set DOCDIR "$OUTDIR/refman"
puts "\nGenerating Open CASCADE Reference Manual\n"
} elseif { $docType == "OVERVIEW" } {
set DOCDIR "$OUTDIR/overview"
set FORMAT ""
if { ($generatorMode == "HTML_ONLY") || ($generatorMode == "CHM_ONLY") } {
if { $generatorMode == "HTML_ONLY" } {
set FORMAT " in HTML format..."
} elseif { $generatorMode == "CHM_ONLY" } {
set FORMAT " in CHM format..."
}
puts "Generating OCCT User Guides$FORMAT\n"
}
} else {
puts "Error: Invalid documentation type: $docType. Can not process."
return -1
}
}
# Generate Doxyfile
puts "[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generating Doxyfile..."
if { [OCCDoc_MakeDoxyfile $docType $DOCDIR $TAGFILEDIR $DOXYFILE $generatorMode $docfiles $modules $verboseMode $searchMode $HHC_PATH $mathjax_relative_location $GRAPHVIZ_PATH $PRODPATH] == -1 } {
return -1
}
# Run doxygen tool
set starttimestamp [clock format [clock seconds] -format {%Y-%m-%d %H:%M}]
if { ($generatorMode == "HTML_ONLY") || ($docType == "REFMAN") } {
puts "$starttimestamp Generating HTML files..."
# Copy index file to provide fast access to HTML documentation
file copy -force $INDIR/resources/index.html $DOCDIR/index.html
} elseif { $generatorMode == "CHM_ONLY" } {
puts "$starttimestamp Generating CHM file..."
} elseif { $generatorMode == "PDF_ONLY" } {
puts "$starttimestamp Generating PDF file..."
}
set DOXYLOG $OUTDIR/doxygen_warnings_and_errors.log
set RESULT [catch {exec $DOXYGEN_PATH $DOXYFILE >> $OUTDIR/doxygen_out.log} DOX_ERROR]
if {$RESULT != 0} {
set NbErrors [regexp -all -line {^\s*[^\s]+} $DOX_ERROR]
if {$NbErrors > 0} {
puts "\nWarning: Doxygen reported $NbErrors messages."
puts "See log in $DOXYLOG\n"
set DOX_ERROR_FILE [open $DOXYLOG "a"]
if {$generatorMode == "PDF_ONLY"} {
puts $DOX_ERROR_FILE "\n===================================================="
puts $DOX_ERROR_FILE "Logfile for $docfiles"
puts $DOX_ERROR_FILE "====================================================\n"
}
puts $DOX_ERROR_FILE $DOX_ERROR
close $DOX_ERROR_FILE
}
}
# Close the Doxygen application
after 300
# Start Post Processing
set curtime [clock format [clock seconds] -format {%Y-%m-%d %H:%M}]
if { $docType == "REFMAN" } {
# Post Process generated HTML pages and draw dependency graphs
if {[OCCDoc_PostProcessor $DOCDIR] == 0} {
puts "$curtime Generation completed."
puts "\nInfo: doxygen log file is located in:"
puts "$OUTDIR/doxygen_out.log."
puts "\nReference Manual is generated in \n$DOCDIR"
}
} elseif { $docType == "OVERVIEW" } {
# Start PDF generation routine
if { $generatorMode == "PDF_ONLY" } {
set OS $::tcl_platform(platform)
if { $OS == "unix" } {
set PREFIX ".sh"
} elseif { $OS == "windows" } {
set PREFIX ".bat"
}
# Prepare a list of TeX files, generated by Doxygen
cd $LATEXDIR
set TEXFILES [glob $LATEXDIR -type f -directory $LATEXDIR -tails "*.tex" ]
foreach path $TEXFILES {
if { [string compare -nocase $path $LATEXDIR] == 0 } {
set DEL_IDX [lsearch $TEXFILES $path]
if { $DEL_IDX != -1 } {
set TEXFILES [lreplace $TEXFILES $DEL_IDX $DEL_IDX]
}
}
}
set TEXFILES [string map [list refman.tex ""] $TEXFILES]
if {$verboseMode == "YES"} {
puts "Info: Preprocessing generated TeX files..."
}
OCCDoc_ProcessTex $TEXFILES $LATEXDIR $verboseMode
if {$verboseMode == "YES"} {
puts "Info: Converting SVG images to PNG format..."
}
if { $INKSCAPE_PATH != "" } {
OCCDoc_ProcessSvg $LATEXDIR $verboseMode
} else {
puts "Warning: SVG images will be lost in PDF documents."
}
if {$verboseMode == "YES"} {
puts "Info: Generating PDF file from TeX files..."
}
foreach TEX $TEXFILES {
# Rewrite existing REFMAN.tex file...
set TEX [lindex [split $TEX "."] 0]
if {$verboseMode == "YES"} {
puts "Info: Generating PDF file from $TEX..."
}
OCCDoc_MakeRefmanTex $TEX $LATEXDIR $verboseMode $available_pdf
if {"$::tcl_platform(platform)" == "windows"} {
set is_win "yes"
} else {
set is_win "no"
}
if {$verboseMode == "YES"} {
# ...and use it to generate PDF from TeX...
if {$is_win == "yes"} {
puts "Info: Executing $LATEXDIR/make.bat..."
} else {
puts "Info: Executing $LATEXDIR/Makefile..."
}
}
set PDFLOG $OUTDIR/pdflatex_warnings_and_errors.log
if {"$is_win" == "yes"} {
set RESULT [catch {eval exec [auto_execok $LATEXDIR/make.bat] >> "$OUTDIR/pdflatex_out.log"} LaTeX_ERROR]
} else {
set RESULT [catch {eval exec "make -f $LATEXDIR/Makefile" >> "$OUTDIR/pdflatex_out.log"} LaTeX_ERROR]
# Small workaround for *nix stations
set prev_loc [pwd]
cd $LATEXDIR
set RESULT [catch {eval exec "pdflatex refman.tex" >> "$OUTDIR/pdflatex_out.log"} LaTeX_ERROR]
cd $prev_loc
}
if {$RESULT != 0} {
set NbErrors [regexp -all -line {^\s*[^\s]+} $LaTeX_ERROR]
if {$NbErrors > 0} {
puts "\nWarning: PDFLaTeX reported $NbErrors messages.\nSee log in $PDFLOG\n"
set LaTeX_ERROR_FILE [open $PDFLOG "a"]
puts $LaTeX_ERROR_FILE "\n===================================================="
puts $LaTeX_ERROR_FILE "Logfile of file $TEX:"
puts $LaTeX_ERROR_FILE "====================================================\n"
puts $LaTeX_ERROR_FILE $LaTeX_ERROR
close $LaTeX_ERROR_FILE
}
}
# ...and place it to the specific folder
if {![file exists "$LATEXDIR/refman.pdf"]} {
puts "Fatal: PDFLaTeX failed to create output file, stopping!"
return -1
}
set destFolder $PDFDIR
set parsed_string [split $TEX "_"]
if { [lsearch $parsed_string "tutorial"] != -1 } {
set TEX [string map [list occt__ occt_] $TEX]
set destFolder $PDFDIR
} elseif { [lsearch $parsed_string "user"] != -1 } {
set TEX [string map [list user_guides__ ""] $TEX]
set destFolder $UGDIR
} elseif { [lsearch $parsed_string "dev"] != -1 } {
set TEX [string map [list dev_guides__ ""] $TEX]
set destFolder $DGDIR
}
file rename -force $LATEXDIR/refman.pdf "$destFolder/$TEX.pdf"
}
} elseif { $generatorMode == "CHM_ONLY" } {
file rename $OUTDIR/overview.chm $OUTDIR/occt_overview.chm
}
cd $INDIR
if { $generatorMode == "HTML_ONLY" } {
puts "\nHTML documentation is generated in \n$DOCDIR"
}
if { $generatorMode == "CHM_ONLY" } {
puts "\nGenerated CHM documentation is in \n$OUTDIR/overview.chm"
}
puts ""
}
# Remove temporary Doxygen files
set deleteList [glob -nocomplain -type f "*.tmp"]
foreach file $deleteList {
file delete $file
}
return 0
}
# Generates Doxygen configuration file for Overview documentation
proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMode ""} {DocFilesList {}} {ModulesList {}} verboseMode searchMode hhcPath mathjaxLocation graphvizPath productsPath} {
set inputDir [OCCDoc_GetDoxDir]
set TEMPLATES_DIR $inputDir/resources
set occt_version [OCCDoc_DetectCasVersion]
# Delete existent doxyfile
file delete $doxyFileName
# Copy specific template to the target folder
if { $docType == "REFMAN" } {
file copy "$TEMPLATES_DIR/occt_rm.doxyfile" $doxyFileName
} elseif { $docType == "OVERVIEW" } {
if { $generatorMode == "HTML_ONLY" || $generatorMode == "CHM_ONLY" } {
file copy "$TEMPLATES_DIR/occt_ug_html.doxyfile" $doxyFileName
} elseif { $generatorMode == "PDF_ONLY"} {
file copy "$TEMPLATES_DIR/occt_ug_pdf.doxyfile" $doxyFileName
} else {
puts "Error: Unknown generation mode"
return -1
}
} else {
puts "Error: Cannot generate unknown document type"
return -1
}
set doxyFile [open $doxyFileName "a"]
# Write specific options
if { $docType == "REFMAN" } {
# Load lists of modules scripts
if { $productsPath == "" } {
set modules_scripts [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $productsPath]/OS/" *.tcl]
} else {
set modules_scripts [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $productsPath]/VAS/" *.tcl]
}
if { [llength $modules_scripts] != 0} {
foreach module_file $modules_scripts {
source $module_file
}
}
set ALL_MODULES [OCCDoc_GetModulesList $productsPath]
if { [llength $ModulesList] == 0 } {
# by default take all modules
set modules $ALL_MODULES
} else {
set modules $ModulesList
}
# Detect invalid names of modules
foreach module $modules {
if { $module == "" } {
continue
}
if {[lsearch $ALL_MODULES $module] == -1 } {
puts "Error: No module $module is known. Aborting..."
return -1
}
}
# Set context
set one_module [expr [llength $modules] == 1]
if { $one_module } {
set title "OCCT [$modules:name]"
set name $modules
} else {
set title "Open CASCADE Technology"
set name OCCT
}
# Get list of header files in the specified modules
set filelist {}
foreach module $modules {
if { $module == "" } {
continue
}
foreach tk [$module:toolkits] {
foreach pk [split [OCCDoc_GetPackagesList [OCCDoc_Locate $tk $productsPath]]] {
if { [llength $pk] != "{}" } {
lappend filelist [OCCDoc_GetHeadersList "p" "$pk" "$productsPath"]
}
}
}
}
# Filter out files Handle_*.hxx and *.lxx
set hdrlist {}
foreach fileset $filelist {
set hdrset {}
foreach hdr $fileset {
if { ! [regexp {Handle_.*[.]hxx} $hdr] && ! [regexp {.*[.]lxx} $hdr] } {
lappend hdrset $hdr
}
}
lappend hdrlist $hdrset
}
set filelist $hdrlist
set doxyFile [open $doxyFileName "a"]
puts $doxyFile "PROJECT_NAME = \"$title\""
puts $doxyFile "PROJECT_NUMBER = $occt_version"
puts $doxyFile "OUTPUT_DIRECTORY = $outDir/."
puts $doxyFile "GENERATE_TAGFILE = $outDir/${name}.tag"
if { [string tolower $searchMode] == "none" } {
puts $doxyFile "SEARCHENGINE = NO"
puts $doxyFile "SERVER_BASED_SEARCH = NO"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} else {
puts $doxyFile "SEARCHENGINE = YES"
if { [string tolower $searchMode] == "local" } {
puts $doxyFile "SERVER_BASED_SEARCH = NO"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} elseif { [string tolower $searchMode] == "server" } {
puts $doxyFile "SERVER_BASED_SEARCH = YES"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} elseif { [string tolower $searchMode] == "external" } {
puts $doxyFile "SERVER_BASED_SEARCH = YES"
puts $doxyFile "EXTERNAL_SEARCH = YES"
} else {
puts "Error: Wrong search engine type: $searchMode."
close $doxyFile
return -1
}
}
puts $doxyFile "DOTFILE_DIRS = $outDir/html"
puts $doxyFile "DOT_PATH = $graphvizPath"
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetIncDir $productsPath]"
# list of files to generate
set mainpage [OCCDoc_MakeMainPage $outDir $outDir/$name.dox $modules $productsPath]
puts $doxyFile ""
puts $doxyFile "INPUT = $mainpage \\"
foreach header $filelist {
puts $doxyFile " $header \\"
}
puts $doxyFile "MATHJAX_FORMAT = HTML-CSS"
puts $doxyFile "MATHJAX_RELPATH = ${mathjaxLocation}"
puts $doxyFile ""
} elseif { $docType == "OVERVIEW" } {
# Add common options for generation of Overview and User Guides
puts $doxyFile "PROJECT_NUMBER = $occt_version"
puts $doxyFile "OUTPUT_DIRECTORY = $outDir/."
puts $doxyFile "PROJECT_LOGO = $inputDir/resources/occ_logo.png"
set PARAM_INPUT "INPUT ="
set PARAM_IMAGEPATH "IMAGE_PATH = $inputDir/resources/ "
foreach docFile $DocFilesList {
set NEW_IMG_PATH "$inputDir/$docFile"
if { [string compare $NEW_IMG_PATH [OCCDoc_GetRootDir $productsPath]] != 0 } {
set img_string [file dirname $NEW_IMG_PATH]/images
if { [file exists $img_string] } {
append PARAM_IMAGEPATH " $img_string"
}
}
append PARAM_INPUT " " $inputDir/$docFile
}
puts $doxyFile $PARAM_INPUT
puts $doxyFile $PARAM_IMAGEPATH
# Add document type-specific options
if { $generatorMode == "HTML_ONLY"} {
# generate tree view
puts $doxyFile "GENERATE_TREEVIEW = YES"
# Set a reference to a TAGFILE
if { $tagFileDir != "" } {
if {[file exists $tagFileDir/OCCT.tag] == 1} {
#set tagPath [OCCDoc_GetRelPath $tagFileDir $outDir/html]
set tagPath $tagFileDir
puts $doxyFile "TAGFILES = $tagFileDir/OCCT.tag=../../refman/html"
}
}
# HTML Search engine options
if { [string tolower $searchMode] == "none" } {
puts $doxyFile "SEARCHENGINE = NO"
puts $doxyFile "SERVER_BASED_SEARCH = NO"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} else {
puts $doxyFile "SEARCHENGINE = YES"
if { [string tolower $searchMode] == "local" } {
puts $doxyFile "SERVER_BASED_SEARCH = NO"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} elseif { [string tolower $searchMode] == "server" } {
puts $doxyFile "SERVER_BASED_SEARCH = YES"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} elseif { [string tolower $searchMode] == "external" } {
puts $doxyFile "SERVER_BASED_SEARCH = YES"
puts $doxyFile "EXTERNAL_SEARCH = YES"
} else {
puts "Error: Wrong search engine type: $searchMode."
close $doxyFile
return -1
}
}
} elseif { $generatorMode == "CHM_ONLY"} {
# specific options for CHM file generation
puts $doxyFile "GENERATE_TREEVIEW = NO"
puts $doxyFile "SEARCHENGINE = NO"
puts $doxyFile "GENERATE_HTMLHELP = YES"
puts $doxyFile "CHM_FILE = ../../overview.chm"
puts $doxyFile "HHC_LOCATION = \"$hhcPath\""
puts $doxyFile "DISABLE_INDEX = YES"
}
# Formula options
puts $doxyFile "MATHJAX_RELPATH = ${mathjaxLocation}"
}
close $doxyFile
return 0
}

View File

@@ -1,886 +0,0 @@
# =======================================================================
# Created on: 2014-03-21
# Created by: OMY
# Copyright (c) 1996-1999 Matra Datavision
# Copyright (c) 1999-2014 OPEN CASCADE SAS
#
# This file is part of Open CASCADE Technology software library.
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License version 2.1 as published
# by the Free Software Foundation, with special exception defined in the file
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
# distribution for complete text of the license and disclaimer of any warranty.
#
# Alternatively, this file may be used under the terms of Open CASCADE
# commercial license or contractual agreement.
#
# Brief: This script contains auxilary functions which can be used
# in documentation generation process
# =======================================================================
# ==============================================
# Commonly used functions
# ==============================================
# Parses arguments line like "-arg1=val1 -arg2=val2 ..." to array args_names and map args_values
proc OCCDoc_ParseArguments {arguments} {
global args_names
global args_values
set args_names {}
array set args_values {}
foreach arg $arguments {
if {[regexp {^(-)[a-z]+$} $arg] == 1} {
set name [string range $arg 1 [string length $arg]-1]
lappend args_names $name
set args_values($name) "NULL"
continue
} elseif {[regexp {^(-)[a-z]+=.+$} $arg] == 1} {
set equal_symbol_position [string first "=" $arg]
set name [string range $arg 1 $equal_symbol_position-1]
lappend args_names $name
set value [string range $arg $equal_symbol_position+1 [string length $arguments]-1]
# To parse a list of values for -m parameter
if { [string first "," $value] != -1 } {
set value [split $value ","];
}
set args_values($name) $value
} else {
puts "Error in argument $arg."
return 1
}
}
return 0
}
# Returns script parent folder
proc OCCDoc_GetDoxDir {} {
return [file normalize [file dirname [info script]]/../dox]
}
# Returns OCCT root dir
proc OCCDoc_GetOCCTRootDir {} {
set path [OCCDoc_GetDoxDir]
return [file normalize $path/..]
}
# Returns root dir
proc OCCDoc_GetRootDir { {theProductsPath ""} } {
if { $theProductsPath == "" } {
return [OCCDoc_GetOCCTRootDir]
} else {
return [file normalize $theProductsPath]
}
}
# Returns OCCT include dir
proc OCCDoc_GetIncDir { {theProductsPath ""} } {
set path [OCCDoc_GetRootDir $theProductsPath]
return "$path/inc"
}
# Returns OCCT source dir
proc OCCDoc_GetSourceDir { {theProductsPath ""} } {
set path [OCCDoc_GetRootDir $theProductsPath]
return "$path/src"
}
# Returns name of the package from the current toolkit
proc OCCDoc_GetNameFromPath { thePath } {
set splitted_path [split $thePath "/" ]
set package_name [lindex $splitted_path end]
return $package_name
}
# Returns the relative path between two folders
proc OCCDoc_GetRelPath {thePathFrom thePathTo} {
if { [file isdirectory "$thePathFrom"] == 0 } {
return ""
}
set aPathFrom [file normalize "$thePathFrom"]
set aPathTo [file normalize "$thePathTo"]
set aCutedPathFrom "${aPathFrom}/dummy"
set aRelatedDeepPath ""
while { "$aCutedPathFrom" != [file normalize "$aCutedPathFrom/.."] } {
set aCutedPathFrom [file normalize "$aCutedPathFrom/.."]
# does aPathTo contain aCutedPathFrom?
regsub -all $aCutedPathFrom $aPathTo "" aPathFromAfterCut
if { "$aPathFromAfterCut" != "$aPathTo" } { # if so
if { "$aCutedPathFrom" == "$aPathFrom" } { # just go higher, for example, ./somefolder/someotherfolder
set aPathTo ".${aPathTo}"
} elseif { "$aCutedPathFrom" == "$aPathTo" } { # remove the last "/"
set aRelatedDeepPath [string replace $aRelatedDeepPath end end ""]
}
regsub -all $aCutedPathFrom $aPathTo $aRelatedDeepPath aPathToAfterCut
regsub -all "//" $aPathToAfterCut "/" aPathToAfterCut
return $aPathToAfterCut
}
set aRelatedDeepPath "$aRelatedDeepPath../"
}
return $thePathTo
}
# Returns OCCT version string from file Standard_Version.hxx (if available)
proc OCCDoc_DetectCasVersion {} {
set occt_ver 6.7.0
set occt_ver_add ""
set filename "[OCCDoc_GetSourceDir]/Standard/Standard_Version.hxx"
if { [file exists $filename] } {
set fh [open $filename "r"]
set fh_loaded [read $fh]
close $fh
regexp {[^/]\s*#\s*define\s+OCC_VERSION_COMPLETE\s+\"([^\s]*)\"} $fh_loaded dummy occt_ver
regexp {[^/]\s*#\s*define\s+OCC_VERSION_DEVELOPMENT\s+\"([^\s]*)\"} $fh_loaded dummy occt_ver_add
if { "$occt_ver_add" != "" } { set occt_ver ${occt_ver}.$occt_ver_add }
}
return $occt_ver
}
# Checks if the necessary tools exist
proc OCCDoc_DetectNecessarySoftware { DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH HHC_PATH PDFLATEX_PATH } {
upvar 1 DOXYGEN_PATH doxy_path
upvar 1 GRAPHVIZ_PATH graph_path
upvar 1 INKSCAPE_PATH inkscape_path
upvar 1 HHC_PATH hhc_path
upvar 1 PDFLATEX_PATH latex_path
set doxy_path ""
set graph_path ""
set inkscape_path ""
set latex_path ""
set hhc_path ""
set is_win "no"
if { "$::tcl_platform(platform)" == "windows" } {
set is_win "yes"
}
if {"$is_win" == "yes"} {
set exe ".exe"
} else {
set exe ""
}
set g_flag "no"
set d_flag "no"
set i_flag "no"
set h_flag "no"
set l_flag "no"
puts ""
set envPath $::env(PATH)
if { $is_win == "yes" } {
set searchPathsList [split $envPath ";"]
} else {
set searchPathsList [split $envPath ":"]
}
foreach path $searchPathsList {
if { ($is_win == "no") &&
(($path == "/usr/bin") || ($path == "/usr/local/bin")) } {
# Avoid searching in default bin location
continue
}
if {$d_flag == "no"} {
if { [file exists $path/doxygen$exe] } {
catch { exec $path/doxygen -V } version_string
set version [lindex [split $version_string "\n"] 0]
puts "Info: $version "
puts " found in $path."
set doxy_path "$path/doxygen$exe"
set d_flag "yes"
}
}
if {$g_flag == "no"} {
if { [file exists $path/dot$exe] } {
catch { exec $path/dot -V } version
puts "Info: $version "
puts " found in $path."
set graph_path "$path/dot$exe"
set g_flag "yes"
}
}
if {$i_flag == "no"} {
if { [file exists $path/inkscape$exe] } {
catch { exec $path/inkscape -V } version
puts "Info: $version "
puts " found in $path."
set inkscape_path "$path/inkscape$exe"
set i_flag "yes"
}
}
if {$l_flag == "no"} {
if { [file exists $path/pdflatex$exe] } {
catch { exec $path/pdflatex -version } version
set version [lindex [split $version "\n"] 0]
puts "Info: $version "
puts " found in $path."
set latex_path "$path/pdflatex$exe"
set l_flag "yes"
}
}
if { ("$is_win" == "yes") && ($h_flag == "no") } {
if { [file exists $path/hhc.exe] } {
puts "Info: hhc "
puts " found in $path."
set hhc_path "hhc$exe"
set h_flag "yes"
}
}
if { ($d_flag == "yes") &&
($i_flag == "yes") &&
($g_flag == "yes") &&
($l_flag == "yes") &&
(($is_win == "yes") &&
($h_flag == "yes")) } {
break
}
}
# On Windows search for hhc.exe in the default location
# if it has not been found yet
if { ("$is_win" == "yes") && ($h_flag == "no") } {
if { [info exists ::env(ProgramFiles\(x86\))] } {
set h_flag "yes"
set path "$::env(ProgramFiles\(x86\))\\HTML Help Workshop"
set hhc_path "$path\\hhc.exe"
puts "Info: hhc "
puts " found in $path."
} else {
if { [info exists ::env(ProgramFiles)] } {
set h_flag "yes"
set path "$::env(ProgramFiles)\\HTML Help Workshop"
set hhc_path "$path\\hhc.exe"
puts "Info: hhc"
puts " found in $path."
}
}
}
# On *nix-like platforms,
# check the default binary locations if the tools had not been found yet
if { $is_win == "no" &&
(($d_flag == "no") ||
($i_flag == "no") ||
($g_flag == "no") ||
($l_flag == "no")) } {
set default_path { "/usr/bin" "/usr/local/bin" }
foreach path $default_path {
if {$d_flag == "no"} {
if { [file exists $path/doxygen$exe] } {
catch { exec $path/doxygen -V } version_string
set version [lindex [split $version_string "\n"] 0]
puts "Info: $version "
puts " found in $path."
set doxy_path "$path/doxygen$exe"
set d_flag "yes"
}
}
if {$g_flag == "no"} {
if { [file exists $path/dot$exe] } {
catch { exec $path/dot -V } version
puts "Info: $version "
puts " found in $path."
set graph_path "$path/dot$exe"
set g_flag "yes"
}
}
if {$i_flag == "no"} {
if { [file exists $path/inkscape$exe] } {
catch { exec $path/inkscape -V } version
puts "Info: $version "
puts " found in $path."
set inkscape_path "$path/inkscape$exe"
set i_flag "yes"
}
}
if {$l_flag == "no"} {
if { [file exists $path/pdflatex$exe] } {
catch { exec $path/pdflatex -version } version
set version [lindex [split $version "\n"] 0]
puts "Info: $version "
puts " found in $path."
set latex_path "$path/pdflatex$exe"
set l_flag "yes"
}
}
}
}
# Check if tools have been found
if { $d_flag == "no" } {
puts "Warning: Could not find doxygen installed."
return -1
}
if { $g_flag == "no" } {
puts "Warning: Could not find graphviz installed."
}
if { $i_flag == "no" } {
puts "Warning: Could not find inkscape installed."
}
if { $l_flag == "no" } {
puts "Warning: Could not find pdflatex installed."
}
if { ("$::tcl_platform(platform)" == "windows") && ($h_flag == "no") } {
puts "Warning: Could not find hhc installed."
}
puts ""
}
# Convert SVG files to PDF format to allow including them to PDF
# (requires InkScape to be in PATH)
proc OCCDoc_ProcessSvg {latexDir verboseMode} {
foreach file [glob -nocomplain $latexDir/*.svg] {
if {$verboseMode == "YES"} {
puts "Info: Converting file $file..."
}
set pdffile "[file rootname $file].pdf"
if { [catch {exec inkscape -z -D --file=$file --export-pdf=$pdffile} res] } {
#puts "Error: $res."
return
}
}
}
# ==============================================
# Reference Manual-specific functions
# ==============================================
# Finds dependencies between all modules
proc OCCDoc_CreateModulesDependencyGraph {dir filename modules mpageprefix} {
global module_dependency
if {![catch {open $dir/$filename.dot "w"} file]} {
puts $file "digraph $filename"
puts $file "\{"
foreach mod $modules {
if { $mod == "" } {
continue
}
puts $file "\t$mod \[ URL = \"[string tolower $mpageprefix$mod.html]\" \]"
foreach mod_depend $module_dependency($mod) {
puts $file "\t$mod_depend -> $mod \[ dir = \"back\", color = \"midnightblue\", style = \"solid\" \]"
}
}
puts $file "\}"
close $file
return $filename
}
}
# Finds dependencies between all toolkits in module
proc OCCDoc_CreateModuleToolkitsDependencyGraph {dir filename modulename tpageprefix} {
global toolkits_in_module
global toolkit_dependency
global toolkit_parent_module
if {![catch {open $dir/$filename.dot "w"} file]} {
puts $file "digraph $filename"
puts $file "\{"
foreach tk $toolkits_in_module($modulename) {
puts $file "\t$tk \[ URL = \"[string tolower $tpageprefix$tk.html]\"\ ]"
foreach tkd $toolkit_dependency($tk) {
if { [info exists toolkit_parent_module($tkd)] } {
if {$toolkit_parent_module($tkd) == $modulename} {
puts $file "\t$tkd -> $tk \[ dir = \"back\", color = \"midnightblue\", style = \"solid\" \]"
}
}
}
}
puts $file "\}"
close $file
return $filename
}
}
# Finds dependencies between the current toolkit and other toolkits
proc OCCDoc_CreateToolkitDependencyGraph {dir filename toolkitname tpageprefix} {
global toolkit_dependency
if {![catch {open $dir/$filename.dot "w"} file]} {
puts $file "digraph $filename"
puts $file "\{"
puts $file "\t$toolkitname \[ URL = \"[string tolower $tpageprefix$toolkitname.html]\"\, shape = box ]"
foreach tkd $toolkit_dependency($toolkitname) {
puts $file "\t$tkd \[ URL = \"[string tolower $tpageprefix$tkd.html]\"\ , shape = box ]"
puts $file "\t$toolkitname -> $tkd \[ color = \"midnightblue\", style = \"solid\" \]"
}
if {[llength $toolkit_dependency($toolkitname)] > 1} {
puts $file "\taspect = 1"
}
puts $file "\}"
close $file
return $filename
}
}
# Fills arrays of modules, toolkits, dependency of modules/toolkits etc
proc OCCDoc_LoadData { {theProductsDir ""} } {
global toolkits_in_module
global toolkit_dependency
global toolkit_parent_module
global module_dependency
if { $theProductsDir == ""} {
set modules_files [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $theProductsDir]/OS/" *.tcl]
} else {
set modules_files [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $theProductsDir]/VAS/" *.tcl]
}
foreach module_file $modules_files {
source $module_file
}
set modules [OCCDoc_GetModulesList $theProductsDir]
foreach mod $modules {
if { $mod == "" } {
continue
}
# Get toolkits of current module
set toolkits_in_module($mod) [$mod:toolkits]
# Get all dependence of current toolkit
foreach tk $toolkits_in_module($mod) {
# set parent module of current toolkit
set toolkit_parent_module($tk) $mod
set exlibfile [open "[OCCDoc_GetSourceDir $theProductsDir]/$tk/EXTERNLIB" r]
set exlibfile_data [read $exlibfile]
set exlibfile_data [split $exlibfile_data "\n"]
set toolkit_dependency($tk) {}
foreach dtk $exlibfile_data {
if { ([string first "TK" $dtk 0] == 0) ||
([string first "P" $dtk 0] == 0) } {
lappend toolkit_dependency($tk) $dtk
}
}
close $exlibfile
}
}
# Get modules dependency
foreach mod $modules {
set module_dependency($mod) {}
foreach tk $toolkits_in_module($mod) {
foreach tkd $toolkit_dependency($tk) {
if { [info exists toolkit_parent_module($tkd)] } {
if { $toolkit_parent_module($tkd) != $mod &&
[lsearch $module_dependency($mod) $toolkit_parent_module($tkd)] == -1} {
lappend module_dependency($mod) $toolkit_parent_module($tkd)
}
}
}
}
}
}
# Returns list of packages of the given toolkit
proc OCCDoc_GetPackagesList { theToolKitPath } {
set packages_list {}
# Open file with list of packages of the given toolkit
set fileid [open "$theToolKitPath/PACKAGES" "r"]
while { [eof $fileid] == 0 } {
set str [gets $fileid]
if { $str != "" } {
lappend packages_list $str
}
}
close $fileid
return $packages_list
}
# Returns list of modules from UDLIST
proc OCCDoc_GetModulesList { {theProductsDir ""} } {
if { $theProductsDir == "" } {
source "[OCCDoc_GetSourceDir $theProductsDir]/OS/Modules.tcl"
# load a command from this file
set modules [OS:Modules]
} else {
source "[OCCDoc_GetSourceDir $theProductsDir]/VAS/Products.tcl"
# load a command from this file
set modules [VAS:Products]
}
return $modules
}
# Returns list of desired files in the specified location
proc OCCDoc_GetHeadersList { theDesiredContent thePackageName {theProductsDir ""} } {
# Get list of header files with path
set files_list [split [glob -nocomplain -type f -directory "[OCCDoc_GetIncDir $theProductsDir]" "${thePackageName}.hxx" "${thePackageName}_*.hxx"]]
# Get content according to desired type ('p' for path and 'f' for filenames only)
if { $theDesiredContent == "p" } {
return $files_list
} elseif { $theDesiredContent == "f" } {
# Cut paths from filenames
foreach file $files_list {
set elem_index [lsearch $files_list $file]
lset files_list $elem_index [OCCDoc_GetNameFromPath [lindex $files_list $elem_index]]
}
return $files_list
}
}
# Returns location of the toolkit
proc OCCDoc_Locate { theToolKitName {theProductsDir ""} } {
set tk_dir "[OCCDoc_GetSourceDir $theProductsDir]/[OCCDoc_GetNameFromPath $theToolKitName]"
return $tk_dir
}
# Gets contents of the given html node (for Post-processing)
proc OCCDoc_GetNodeContents {node props html} {
set openTag "<$node$props>"
set closingTag "</$node>"
set start [string first $openTag $html]
if {$start == -1} {
return ""
}
set start [expr $start + [string length $openTag]]
set end [string length $html]
set html [string range $html $start $end]
set start [string first $closingTag $html]
set end [string length $html]
if {$start == -1} {
return ""
}
set start [expr $start - 1]
return [string range $html 0 $start]
}
# Generates main page file describing module structure
proc OCCDoc_MakeMainPage {outDir outFile modules {theProductsDir ""} } {
global env
set one_module [expr [llength $modules] == 1]
set fd [open $outFile "w"]
set module_prefix "module_"
set toolkit_prefix "toolkit_"
set package_prefix "package_"
if { ! [file exists "$outDir/html"] } {
file mkdir "$outDir/html"
}
OCCDoc_LoadData $theProductsDir
# Main page: list of modules
if { ! $one_module } {
puts $fd "/**"
puts $fd "\\mainpage Open CASCADE Technology"
foreach mod $modules {
puts $fd "\\li \\subpage [string tolower $module_prefix$mod]"
}
# insert modules relationship diagramm
puts $fd "\\dotfile [OCCDoc_CreateModulesDependencyGraph $outDir/html schema_all_modules $modules $module_prefix]"
puts $fd "**/\n"
}
# One page per module: list of toolkits
set toolkits {}
foreach mod $modules {
if { $mod == "" } {
continue
}
puts $fd "/**"
if { $one_module } {
puts $fd "\\mainpage OCCT Module [$mod:name]"
} else {
puts $fd "\\page [string tolower module_$mod] Module [$mod:name]"
}
foreach tk [lsort [$mod:toolkits]] {
lappend toolkits $tk
puts $fd "\\li \\subpage [string tolower $toolkit_prefix$tk]"
}
puts $fd "\\dotfile [OCCDoc_CreateModuleToolkitsDependencyGraph $outDir/html schema_$mod $mod $toolkit_prefix]"
puts $fd "**/\n"
}
# One page per toolkit: list of packages
set packages {}
foreach tk $toolkits {
puts $fd "/**"
puts $fd "\\page [string tolower toolkit_$tk] Toolkit $tk"
foreach pk [lsort [OCCDoc_GetPackagesList [OCCDoc_Locate $tk $theProductsDir]]] {
lappend packages $pk
set u [OCCDoc_GetNameFromPath $pk]
puts $fd "\\li \\subpage [string tolower $package_prefix$u]"
}
puts $fd "\\dotfile [OCCDoc_CreateToolkitDependencyGraph $outDir/html schema_$tk $tk $toolkit_prefix]"
puts $fd "**/\n"
}
# One page per package: list of classes
foreach pk $packages {
set u [OCCDoc_GetNameFromPath $pk]
puts $fd "/**"
puts $fd "\\page [string tolower $package_prefix$u] Package $u"
foreach hdr [lsort [OCCDoc_GetHeadersList "f" "$pk" "$theProductsDir"]] {
if { ! [regexp {^Handle_} $hdr] && [regexp {(.*)[.]hxx} $hdr str obj] } {
puts $fd "\\li \\subpage $obj"
}
}
puts $fd "**/\n"
}
close $fd
return $outFile
}
# Parses generated files to add a navigation path
proc OCCDoc_PostProcessor {outDir} {
puts "[clock format [clock seconds] -format {%Y.%m.%d %H:%M}] Post-process is started ..."
append outDir "/html"
set files [glob -nocomplain -type f $outDir/package_*]
if { $files != {} } {
foreach f [lsort $files] {
set packageFilePnt [open $f r]
set packageFile [read $packageFilePnt]
set navPath [OCCDoc_GetNodeContents "div" " id=\"nav-path\" class=\"navpath\"" $packageFile]
set packageName [OCCDoc_GetNodeContents "div" " class=\"title\"" $packageFile]
regsub -all {<[^<>]*>} $packageName "" packageName
# add package link to nav path
set first [expr 1 + [string last "/" $f]]
set last [expr [string length $f] - 1]
set packageFileName [string range $f $first $last]
set end [string first "</ul>" $navPath]
set end [expr $end - 1]
set navPath [string range $navPath 0 $end]
append navPath " <li class=\"navelem\"><a class=\"el\" href=\"$packageFileName\">$packageName</a> </li>\n </ul>"
# get list of files to update
set listContents [OCCDoc_GetNodeContents "div" " class=\"textblock\"" $packageFile]
set listContents [OCCDoc_GetNodeContents "ul" "" $listContents]
set lines [split $listContents "\n"]
foreach line $lines {
if {[regexp {href=\"([^\"]*)\"} $line tmpLine classFileName]} {
# check if anchor is there
set anchorPos [string first "#" $classFileName]
if {$anchorPos != -1} {
set classFileName [string range $classFileName 0 [expr $anchorPos - 1]]
}
# read class file
set classFilePnt [open $outDir/$classFileName r+]
set classFile [read $classFilePnt]
# find position of content block
set contentPos [string first "<div class=\"header\">" $classFile]
set navPart [string range $classFile 0 [expr $contentPos - 1]]
# position where to insert nav path
set posToInsert [string last "</div>" $navPart]
set prePart [string range $classFile 0 [expr $posToInsert - 1]]
set postPart [string range $classFile $posToInsert [string length $classFile]]
set newClassFile ""
append newClassFile $prePart " <div id=\"nav-path\" class=\"navpath\">" $navPath \n " </div>" \n $postPart
# write updated content
seek $classFilePnt 0
puts $classFilePnt $newClassFile
close $classFilePnt
}
}
close $packageFilePnt
}
return 0
} else {
puts "no files found"
return 1
}
}
# ======================================
# User Guides-specific functions
# ======================================
# Loads a list of docfiles from file FILES.txt
proc OCCDoc_LoadFilesList {} {
set INPUTDIR [OCCDoc_GetDoxDir]
global available_docfiles
set available_docfiles {}
# Read data from file
if { [file exists "$INPUTDIR/FILES_HTML.txt"] == 1 } {
set FILE [open "$INPUTDIR/FILES_HTML.txt" r]
while {1} {
set line [string trim [gets $FILE]]
# trim possible comments starting with '#'
set line [regsub {\#.*} $line {}]
if {$line != ""} {
lappend available_docfiles $line
}
if {[eof $FILE]} {
close $FILE
break
}
}
} else {
return -1
}
global available_pdf
set available_pdf {}
# Read data from file
if { [file exists "$INPUTDIR/FILES_PDF.txt"] } {
set FILE [open "$INPUTDIR/FILES_PDF.txt" r]
while {1} {
set line [string trim [gets $FILE]]
# Trim possible comments starting with '#'
set line [regsub {\#.*} $line {}]
if {$line != ""} {
lappend available_pdf $line
}
if {[eof $FILE]} {
close $FILE
break
}
}
} else {
return -1
}
return 0
}
# Writes new TeX file for conversion from tex to pdf for a specific doc
proc OCCDoc_MakeRefmanTex {fileName latexDir verboseMode latexFilesList} {
if { $verboseMode == "YES" } {
puts "Info: Making refman.tex file for $fileName..."
}
set DOCNAME "$latexDir/refman.tex"
if {[file exists $DOCNAME] == 1} {
file delete -force $DOCNAME
}
# Copy template file to latex folder
file copy "[OCCDoc_GetDoxDir]/resources/occt_pdf_template.tex" $DOCNAME
# Get templatized data
set texfile [open $DOCNAME "r"]
set texfile_loaded [read $texfile]
close $texfile
# Replace dummy values
set year [clock format [clock seconds] -format {%Y}]
set texfile [open $DOCNAME "w"]
set casVersion [OCCDoc_DetectCasVersion]
# Get name of the document
set docLabel ""
foreach aFileName $latexFilesList {
# Find the file in FILES_PDF.txt
set parsedFileName [split $aFileName "/" ]
set newfileName [string range $fileName [expr [string first "__" $fileName] + 2] end]
if { [lsearch -nocase $parsedFileName "$newfileName.md" ] != -1 } {
set filepath "[OCCDoc_GetDoxDir]/$aFileName"
if { [file exists $filepath] } {
set MDFile [open $filepath "r"]
set label [split [gets $MDFile] "\{"]
set docLabel [lindex $label 0]
close $MDFile
break
}
}
}
set texfile_loaded [string map [list DEFDOCLABEL "$docLabel" DEFCASVERSION "$casVersion" DEFFILENAME "$fileName" DEFYEAR "$year"] $texfile_loaded]
# Get data
puts $texfile $texfile_loaded
close $texfile
}
# Postprocesses generated TeX files
proc OCCDoc_ProcessTex {{texFiles {}} {latexDir} verboseMode} {
foreach TEX $texFiles {
if {$verboseMode == "YES"} {
puts "Info: Preprocessing file $TEX..."
}
if {![file exists $TEX]} {
puts "Error: file $TEX does not exist."
return -1
}
set IN_F [open "$TEX" "r"]
set TMPFILENAME "$latexDir/temp.tex"
set OUT_F [open $TMPFILENAME w]
while {1} {
set line [gets $IN_F]
if { [string first "\\includegraphics" $line] != -1 } {
# replace svg extension by pdf
set line [regsub {[.]svg} $line ".pdf"]
# Center images in TeX files
set line "\\begin{center}\n $line\n\\end{center}"
} elseif { [string first "\\subsection" $line] != -1 } {
# Replace \subsection with \section tag
regsub -all "\\\\subsection" $line "\\\\section" line
} elseif { [string first "\\subsubsection" $line] != -1 } {
# Replace \subsubsection with \subsection tag
regsub -all "\\\\subsubsection" $line "\\\\subsection" line
} elseif { [string first "\\paragraph" $line] != -1 } {
# Replace \paragraph with \subsubsection tag
regsub -all "\\\\paragraph" $line "\\\\subsubsection" line
}
puts $OUT_F $line
if {[eof $IN_F]} {
close $IN_F
close $OUT_F
break
}
}
file delete -force $TEX
file rename $TMPFILENAME $TEX
}
}

View File

@@ -1,8 +0,0 @@
#!/usr/bin/tclsh
# Command-line starter for occdoc command, use it as follows:
# tclsh> source dox/start.tcl [arguments]
source [file join [file dirname [info script]] occaux.tcl]
source [file join [file dirname [info script]] gendoc.tcl]
gendoc {*}$::argv

View File

@@ -1,185 +0,0 @@
#
# include occt macros. compiler_bitness, os_wiht_bit, compiler and build_postfix
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/occt_macros")
macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEBUG)
OCCT_MAKE_BUILD_POSTFIX()
# 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()
# 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()
endif()
if (NOT DEFINED INSTALL_${PRODUCT_NAME})
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "Is ${PRODUCT_NAME} required to be copied into install directory")
endif()
# 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)
# first of all, search for debug version of a library if build type is debug
if (DEFINED IS_BUILD_DEBUG)
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME_DEBUG}
PATHS
"${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}"
"${3RDPARTY_${PRODUCT_NAME}_DIR}/lib"
"${3RDPARTY_${PRODUCT_NAME}_DIR}/libd"
${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_DEBUG})
endif()
# if build type is release or debug version of library isn't found - search for release version of one
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)
if (DEFINED IS_BUILD_DEBUG)
message (STATUS "Warning: debug version of ${PRODUCT_NAME} library isn't found (${LIBRARY_NAME_DEBUG}) in ${3RDPARTY_${PRODUCT_NAME}_DIR}/lib(d). Search for release one")
endif()
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()
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
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)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
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()
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)
if (DEFINED IS_BUILD_DEBUG)
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME_DEBUG}"
PATHS
"${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}"
"${3RDPARTY_${PRODUCT_NAME}_DIR}/bin"
"${3RDPARTY_${PRODUCT_NAME}_DIR}/bind"
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_DLL}
NO_DEFAULT_PATH)
# second search if previous one do not find anything
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME_DEBUG}")
endif()
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)
if (DEFINED IS_BUILD_DEBUG)
message (STATUS "Warning: debug version of ${PRODUCT_NAME} dll isn't found (${LIBRARY_NAME_DEBUG}) in ${3RDPARTY_${PRODUCT_NAME}_DIR}/bin(d). Search for release one")
endif()
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)
# second search if previous one do not find anything
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME}")
endif()
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()
if (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
endif()
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)
endif()
if (WIN32)
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
endif()
endif()
if (INSTALL_${PRODUCT_NAME})
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
OCCT_MAKE_BUILD_POSTFIX()
if (WIN32)
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
else()
install (FILES "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
endif()
endif()
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY 3RDPARTY_${PRODUCT_NAME}_DLL)
endmacro()

View File

@@ -1,15 +0,0 @@
echo off
if "%VCVER%" == "@COMPILER@" (
if "%ARCH%" == "@COMPILER_BITNESS@" (
if "%CASDEB%" == "@BUILD_POSTFIX@" (
set "TCL_DIR=@3RDPARTY_TCL_DLL_DIR@"
set "FREETYPE_DIR=@3RDPARTY_FREETYPE_DLL_DIR@"
set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIR@"
set "GL2PS_DIR=@3RDPARTY_GL2PS_DLL_DIR@"
set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@"
)
)
)

View File

@@ -1,12 +0,0 @@
echo off
if not ["%1"] == [""] set "VCVER=%1"
if not ["%2"] == [""] set "ARCH=%2"
if /I ["%ARCH%"] == ["win32"] set "ARCH=32"
if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
if /I ["%3"] == ["debug"] set "CASDEB=d"
if /I ["%3"] == ["d"] set "CASDEB=d"
rem include other custom.bat files with specific 3rdparty paths
@ADDITIONAL_CUSTOM_CONTENT@

View File

@@ -1,15 +0,0 @@
#!/bin/bash
if [ "$COMPILER" == "@COMPILER@" ]; then
if [ "$ARCH" == "@COMPILER_BITNESS@" ]; then
if [ "$CASDEB" == "@BUILD_POSTFIX@" ]; then
export TCL_DIR="@3RDPARTY_TCL_LIBRARY_DIR@"
export FREETYPE_DIR="@3RDPARTY_FREETYPE_LIBRARY_DIR@"
export FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_LIBRARY_DIR@"
export GL2PS_DIR="@3RDPARTY_GL2PS_LIBRARY_DIR@"
export TBB_DIR="@3RDPARTY_TBB_LIBRARY_DIR@"
export VTK_DIR="@3RDPARTY_VTK_LIBRARY_DIR@"
fi
fi
fi

View File

@@ -1,4 +0,0 @@
#!/bin/bash
@ADDITIONAL_CUSTOM_CONTENT@

View File

@@ -1,10 +1,7 @@
@echo off
rem Setup environment and launch DRAWEXE
call "%~dp0env.bat" %1 %2 %3
call "%~dp0env.bat"
echo Hint: use "pload ALL" command to load standard commands
"%CASROOT%/%BIN_TAIL%/DRAWEXE.exe"
set "PATH=%ORIGIN_PATH%"
DRAWEXE.exe

View File

@@ -2,7 +2,7 @@
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
source "${aScriptPath}/env.sh" "$1"
source "${aScriptPath}/env.sh"
echo 'Hint: use "pload ALL" command to load standard commands'
DRAWEXE

View File

@@ -3,35 +3,25 @@ echo off
set "SCRIPTROOT=%~dp0"
set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
set "VCVER=@COMPILER@"
set "ARCH=@COMPILER_BITNESS@"
set "CASDEB=@BUILD_POSTFIX@"
if not ["%1"] == [""] set "VCVER=%1"
if not ["%2"] == [""] set "ARCH=%2"
if /I ["%ARCH%"] == ["win32"] set "ARCH=32"
if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
if /I ["%3"] == ["debug"] set "CASDEB=d"
if /I ["%3"] == ["d"] set "CASDEB=d"
if exist "%~dp0custom.bat" (
call "%~dp0custom.bat" %1 %2 %3
)
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
set "ORIGIN_PATH=%PATH%"
set "TCL_DIR=@3RDPARTY_TCL_DLL_DIR@"
if not ["%TCL_DIR%"] == [""] set "PATH=%TCL_DIR%;%PATH%"
if not ["%TCL_DIR%"] == [""] set "PATH=%TCL_DIR%;%PATH%"
if not ["%FREETYPE_DIR%"] == [""] set "PATH=%FREETYPE_DIR%;%PATH%"
set "FREETYPE_DIR=@3RDPARTY_FREETYPE_DLL_DIR@"
if not ["%FREETYPE_DIR%"] == [""] set "PATH=%FREETYPE_DIR%;%PATH%"
set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIR@"
if not ["%FREEIMAGE_DIR%"] == [""] set "PATH=%FREEIMAGE_DIR%;%PATH%"
if not ["%GL2PS_DIR%"] == [""] set "PATH=%GL2PS_DIR%;%PATH%"
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
set "GL2PS_DIR=@3RDPARTY_GL2PS_DLL_DIR@"
if not ["%GL2PS_DIR%"] == [""] set "PATH=%GL2PS_DIR%;%PATH%"
set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
rem ----- Set path to 3rd party and OCCT libraries -----
set "BIN_TAIL=win%ARCH%/%VCVER%/bin%CASDEB%"
set "PATH=%CASROOT%/%BIN_TAIL%;%PATH%"
set "PATH=%CASROOT%\bin;%PATH%"
rem ----- Set envoronment variables used by OCCT -----
set CSF_LANGUAGE=us
@@ -66,5 +56,4 @@ if exist "%CASROOT%\src\DrawResources" (
if exist "%CASROOT%\src\DrawResourcesProducts" (
set "CSF_DrawPluginProductsDefaults=%CASROOT%\src\DrawResourcesProducts"
)
)

View File

@@ -6,78 +6,63 @@ if [ "${CASROOT}" == "" ]; then
export CASROOT="${aScriptPath}"
fi
# Read script arguments
shopt -s nocasematch
export CASDEB="@BUILD_POSTFIX@";
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
shopt -u nocasematch
aLibPath="${CASROOT}/lib"
export COMPILER="@COMPILER@"
TCL_DIR="@3RDPARTY_TCL_DLL_DIR@"
if [ "$TCL_DIR" != "" ]; then
aLibPath="${TCL_DIR}:${aLibPath}"
fi
FREETYPE_DIR="@3RDPARTY_FREETYPE_DLL_DIR@"
if [ "$FREETYPE_DIR" != "" ]; then
aLibPath="${FREETYPE_DIR}:${aLibPath}"
fi
FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_DLL_DIR@"
if [ "$FREEIMAGE_DIR" != "" ]; then
aLibPath="${FREEIMAGE_DIR}:${aLibPath}"
fi
GL2PS_DIR="@3RDPARTY_GL2PS_DLL_DIR@"
if [ "$GL2PS_DIR" != "" ]; then
aLibPath="${GL2PS_DIR}:${aLibPath}"
fi
TBB_DIR="@3RDPARTY_TBB_DLL_DIR@"
if [ "$TBB_DIR" != "" ]; then
aLibPath="${TBB_DIR}:${aLibPath}"
fi
# ----- Set path to 3rd party and OCCT libraries -----
aSystem=`uname -s`
if [ "$aSystem" == "Darwin" ]; then
export WOKSTATION="mac";
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
export DYLD_LIBRARY_PATH="${aLibPath}:${DYLD_LIBRARY_PATH}"
else
export DYLD_LIBRARY_PATH="${aLibPath}"
fi
else
export WOKSTATION="lin";
if [ "$LD_LIBRARY_PATH" != "" ]; then
export LD_LIBRARY_PATH="${aLibPath}:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${aLibPath}"
fi
fi
# ----- Set path to OCCT executables -----
PATH="${PATH}:${CASROOT}/bin"
# ----- Setup Environment Variables -----
anArch=`uname -m`
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
export ARCH="32";
else
export ARCH="64";
fi
aSystem=`uname -s`
if [ "$aSystem" == "Darwin" ]; then
export WOKSTATION="mac";
export ARCH="64";
else
export WOKSTATION="lin";
fi
# ----- Set local settings -----
if [ -e "${aScriptPath}/custom.sh" ]; then
source "${aScriptPath}/custom.sh" "${COMPILER}" "${WOKSTATION}${ARCH}" "${CASDEB}"
fi
THRDPARTY_PATH=""
if [ "$TCL_DIR" != "" ]; then
THRDPARTY_PATH="${TCL_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FREETYPE_DIR" != "" ]; then
THRDPARTY_PATH="${FREETYPE_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FREEIMAGE_DIR" != "" ]; then
THRDPARTY_PATH="${FREEIMAGE_DIR}:${THRDPARTY_PATH}"
fi
if [ "$GL2PS_DIR" != "" ]; then
THRDPARTY_PATH="${GL2PS_DIR}:${THRDPARTY_PATH}"
fi
if [ "$TBB_DIR" != "" ]; then
THRDPARTY_PATH="${TBB_DIR}:${THRDPARTY_PATH}"
fi
if [ "$VTK_DIR" != "" ]; then
THRDPARTY_PATH="${VTK_DIR}:${THRDPARTY_PATH}"
fi
BIN_PATH="${WOKSTATION}${ARCH}/${COMPILER}/bin${CASDEB}"
LIBS_PATH="${WOKSTATION}${ARCH}/${COMPILER}/lib${CASDEB}"
export PATH="${CASROOT}/${BIN_PATH}:${PATH}"
if [ "$LD_LIBRARY_PATH" != "" ]; then
export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}"
fi
if [ "$WOKSTATION" == "mac" ]; then
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
else
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
fi
fi
# ----- Set envoronment variables used by OCCT -----
@@ -113,5 +98,4 @@ fi
if [ -e "${CASROOT}/src/DrawResourcesProducts" ]; then
export CSF_DrawPluginProductsDefaults="${CASROOT}/src/DrawResourcesProducts"
fi
fi

View File

@@ -1,3 +0,0 @@
#freeimage
THIRDPARTY_PRODUCT("FREEIMAGE" "FreeImage.h" "freeimage" "freeimaged")

View File

@@ -1,9 +0,0 @@
#freeimageplus
if (WIN32)
if (3RDPARTY_FREEIMAGE_DIR AND NOT 3RDPARTY_FREEIMAGEPLUS_DIR)
set (3RDPARTY_FREEIMAGEPLUS_DIR "${3RDPARTY_FREEIMAGE_DIR}" CACHE PATH "The directory containing freeimageplus" FORCE)
endif()
THIRDPARTY_PRODUCT("FREEIMAGEPLUS" "FreeImagePlus.h" "freeimageplus" "freeimageplusd")
endif()

View File

@@ -1,233 +0,0 @@
# freetype
if (NOT DEFINED INSTALL_FREETYPE)
set (INSTALL_FREETYPE OFF CACHE BOOL "Is freetype required to be copied into install directory")
endif()
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 and build_postfix
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/occt_macros")
OCCT_MAKE_COMPILER_SHORT_NAME()
OCCT_MAKE_COMPILER_BITNESS()
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()
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}")
endif()
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "" CACHE FILEPATH "the path of ft2build.h")
endif()
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)
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library")
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY_DIR)
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)
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 FILEPATH "The directory containing freetype shared library")
endif()
endif()
message (STATUS "Info: CMake default freetype search start...")
find_package(Freetype)
message (STATUS "Info: CMake default freetype search end")
# 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()
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
message (STATUS "Info: CMake default search doesn't found FREETYPE_INCLUDE_DIR_freetype2")
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)
if (NOT FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
message (STATUS "Info: FREETYPE_INCLUDE_DIR_freetype2 is NOT found by additional search")
else()
message (STATUS "Info: FREETYPE_INCLUDE_DIR_freetype2 is found by additional search")
endif()
elseif (FREETYPE_INCLUDE_DIR_freetype2 OR EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
get_filename_component (3RDPARTY_FREETYPE_DIR_ABS "${3RDPARTY_FREETYPE_DIR}" ABSOLUTE)
get_filename_component (FREETYPE_INCLUDE_DIR_freetype2_ABS "${FREETYPE_INCLUDE_DIR_freetype2}" ABSOLUTE)
string (REGEX MATCH "${3RDPARTY_FREETYPE_DIR_ABS}" DOES_PATH_CONTAIN "${FREETYPE_INCLUDE_DIR_freetype2_ABS}")
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)
if (TMP_FREETYPE2 OR NOT EXISTS "${TMP_FREETYPE2}")
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${TMP_FREETYPE2}" CACHE FILEPATH "the path of freetype2" FORCE)
# hide and remove TMP_FREETYPE2
mark_as_advanced (TMP_FREETYPE2)
unset (TMP_FREETYPE2)
endif()
endif()
endif()
endif()
# 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()
# 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 (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_DLL_DIR)
endif()
endif()
if (INSTALL_FREETYPE)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_BUILD_POSTFIX()
if (WIN32)
install (FILES "${3RDPARTY_FREETYPE_DLL}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
else()
install (FILES "${3RDPARTY_FREETYPE_LIBRARY}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
endif()
endif()
# unset all redundant variables
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)

View File

@@ -1,3 +0,0 @@
#GL2PS
THIRDPARTY_PRODUCT("GL2PS" "gl2ps.h" "gl2ps" "gl2psd")

View File

@@ -1,3 +0,0 @@
# glx
THIRDPARTY_PRODUCT("GLX" "GL/glx.h" "GL" "GLd")

View File

@@ -1,68 +0,0 @@
if (MSVC)
add_definitions(/fp:precise)
endif()
# set compiler short name and choose SSE2 option for appropriate MSVC compilers
# ONLY for 32-bit
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
if (MSVC80 OR MSVC90 OR MSVC10)
add_definitions(/arch:SSE2)
endif()
endif()
add_definitions (-DCSFDB)
if (WIN32)
add_definitions (/DWNT -wd4996)
elseif (APPLE)
add_definitions (-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H)
else()
add_definitions (-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H -DLIN)
endif()
# enable structured exceptions for MSVC
string (REGEX MATCH "EHsc" ISFLAG "${CMAKE_CXX_FLAGS}")
if (ISFLAG)
string (REGEX REPLACE "EHsc" "EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
elseif (WIN32)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -EHa")
endif()
# remove DEBUG flag if it exists
string (REGEX MATCH "-DDEBUG" IS_DEBUG_CXX "${CMAKE_CXX_FLAGS_DEBUG}")
if (IS_DEBUG_CXX)
message (STATUS "-DDEBUG has been removed from CMAKE_CXX_FLAGS_DEBUG")
string (REGEX REPLACE "-DDEBUG" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
endif()
string (REGEX MATCH "-DDEBUG" IS_DEBUG_C "${CMAKE_C_FLAGS_DEBUG}")
if (IS_DEBUG_C)
message (STATUS "-DDEBUG has been removed from CMAKE_C_FLAGS_DEBUG")
string (REGEX REPLACE "-DDEBUG" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
endif()
# enable parallel compilation on MSVC 9 and above
if (MSVC AND NOT MSVC70 AND NOT MSVC80)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -MP")
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, -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)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEB")
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEB")

View File

@@ -1,201 +0,0 @@
#
macro (OCCT_CHECK_AND_UNSET VARNAME)
if (DEFINED ${VARNAME})
unset (${VARNAME} CACHE)
endif()
endmacro()
macro (OCCT_CHECK_AND_UNSET_GROUP VARNAME)
OCCT_CHECK_AND_UNSET ("${VARNAME}_DIR")
OCCT_CHECK_AND_UNSET ("${VARNAME}_INCLUDE_DIR")
OCCT_CHECK_AND_UNSET ("${VARNAME}_LIBRARY")
OCCT_CHECK_AND_UNSET ("${VARNAME}_LIBRARY_DIR")
OCCT_CHECK_AND_UNSET ("${VARNAME}_DLL")
OCCT_CHECK_AND_UNSET ("${VARNAME}_DLL_DIR")
endmacro()
# BUILD_POSTFIX, IS_BUILD_DEBUG variables
macro (OCCT_MAKE_BUILD_POSTFIX)
if ("${BUILD_CONFIGURATION}" STREQUAL "Debug")
set (BUILD_POSTFIX "d")
set (IS_BUILD_DEBUG "")
else()
set (BUILD_POSTFIX "")
OCCT_CHECK_AND_UNSET (IS_BUILD_DEBUG)
endif()
endmacro()
# COMPILER_BITNESS variable
macro (OCCT_MAKE_COMPILER_BITNESS)
math (EXPR COMPILER_BITNESS "32 + 32*(${CMAKE_SIZEOF_VOID_P}/8)")
endmacro()
# OS_WITH_BIT
macro (OCCT_MAKE_OS_WITH_BITNESS)
OCCT_MAKE_COMPILER_BITNESS()
if (WIN32)
set (OS_WITH_BIT "win${COMPILER_BITNESS}")
elseif(APPLE)
set (OS_WITH_BIT "mac${COMPILER_BITNESS}")
else()
set (OS_WITH_BIT "lin${COMPILER_BITNESS}")
endif()
endmacro()
# COMPILER variable
macro (OCCT_MAKE_COMPILER_SHORT_NAME)
if (MSVC)
if (MSVC70)
set (COMPILER vc7)
elseif (MSVC80)
set (COMPILER vc8)
elseif (MSVC90)
set (COMPILER vc9)
elseif (MSVC10)
set (COMPILER vc10)
elseif (MSVC11)
set (COMPILER vc11)
elseif (MSVC12)
set (COMPILER vc12)
endif()
elseif (DEFINED CMAKE_COMPILER_IS_GNUCC)
set (COMPILER gcc)
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
set (COMPILER gxx)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set (COMPILER clang)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
set (COMPILER icc)
else()
set (COMPILER ${CMAKE_GENERATOR})
string (REGEX REPLACE " " "" COMPILER ${COMPILER})
endif()
endmacro()
function (SUBDIRECTORY_NAMES MAIN_DIRECTORY RESULT)
file (GLOB SUB_ITEMS "${MAIN_DIRECTORY}/*")
foreach (ITEM ${SUB_ITEMS})
if (IS_DIRECTORY "${ITEM}")
get_filename_component (ITEM_NAME "${ITEM}" NAME)
list (APPEND LOCAL_RESULT "${ITEM_NAME}")
endif()
endforeach()
set (${RESULT} ${LOCAL_RESULT} PARENT_SCOPE)
endfunction()
function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
OCCT_MAKE_COMPILER_SHORT_NAME()
OCCT_MAKE_COMPILER_BITNESS()
string (TOLOWER "${PRODUCT_NAME}" 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)
foreach (SEARCH_TEMPLATE ${SEARCH_TEMPLATES})
if (LOCAL_RESULT)
BREAK()
endif()
foreach (SUBDIR_NAME ${SUBDIR_NAME_LIST})
string (TOLOWER "${SUBDIR_NAME}" lower_SUBDIR_NAME)
string (REGEX MATCH "${SEARCH_TEMPLATE}" DUMMY_VAR "${lower_SUBDIR_NAME}")
if (DUMMY_VAR)
list (APPEND LOCAL_RESULT ${SUBDIR_NAME})
endif()
endforeach()
endforeach()
if (LOCAL_RESULT)
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()
macro (OCCT_INSTALL_FILE_OR_DIR BEING_INSTALLED_OBJECT DESTINATION_PATH)
if (BUILD_PATCH_DIR AND EXISTS "${BUILD_PATCH_DIR}/${BEING_INSTALLED_OBJECT}")
if (IS_DIRECTORY "${BUILD_PATCH_DIR}/${BEING_INSTALLED_OBJECT}")
# first of all, install original files
install (DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
# secondly, rewrite original files with patched ones
install (DIRECTORY "${BUILD_PATCH_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
else()
install (FILES "${BUILD_PATCH_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
endif()
else()
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}")
install (DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
else()
install (FILES "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
endif()
endif()
endmacro()
macro (OCCT_CONFIGURE_AND_INSTALL BEING_CONGIRUGED_FILE FINAL_NAME DESTINATION_PATH)
if (BUILD_PATCH_DIR AND EXISTS "${BUILD_PATCH_DIR}/${BEING_CONGIRUGED_FILE}")
configure_file("${BUILD_PATCH_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
else()
configure_file("${CMAKE_SOURCE_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
endif()
install(FILES "${OCCT_BINARY_DIR}/${FINAL_NAME}" DESTINATION "${DESTINATION_PATH}")
endmacro()
function (OCCT_IS_PRODUCT_REQUIRED CSF_VAR_NAME USE_PRODUCT)
set (${USE_PRODUCT} OFF PARENT_SCOPE)
if (NOT USED_TOOLKITS)
message(STATUS "Warning: the list of being used toolkits is empty")
else()
foreach (USED_TOOLKIT ${USED_TOOLKITS})
if (BUILD_PATCH_DIR AND EXISTS "${BUILD_PATCH_DIR}/src/${USED_TOOLKIT}/EXTERNLIB")
file (READ "${BUILD_PATCH_DIR}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT)
elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${USED_TOOLKIT}/EXTERNLIB")
file (READ "${CMAKE_SOURCE_DIR}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT)
endif()
string (REGEX MATCH "${CSF_VAR_NAME}" DOES_FILE_CONTAIN "${FILE_CONTENT}")
if (DOES_FILE_CONTAIN)
set (${USE_PRODUCT} ON PARENT_SCOPE)
break()
endif()
endforeach()
endif()
endfunction()

View File

@@ -1,27 +0,0 @@
#OpenCl
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_HEADER $ENV{AMDAPPSDKROOT}/include
$ENV{INTELOCLSDKROOT}/include
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/inc
$ENV{ATISTREAMSDKROOT}/include)
IF(${COMPILER_BITNESS} STREQUAL 32)
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB $ENV{AMDAPPSDKROOT}/lib/x86
$ENV{INTELOCLSDKROOT}/lib/x86
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/lib/Win32
$ENV{ATISTREAMSDKROOT}/lib/x86)
ELSEIF(${COMPILER_BITNESS} STREQUAL 64)
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB $ENV{AMDAPPSDKROOT}/lib/x86_64
$ENV{INTELOCLSDKROOT}/lib/x64
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/lib/x64
$ENV{ATISTREAMSDKROOT}/lib/x86_64)
ENDIF()
THIRDPARTY_PRODUCT("OPENCL" "CL/cl.h" "OpenCL" "OpenCLd")
# if CL/cl.h isn't found (and 3RDPARTY_OPENCL_INCLUDE_DIR isn't defined)
# then try to find OpenCL/cl.h (all other variable won't be changed)
IF(NOT 3RDPARTY_OPENCL_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_OPENCL_INCLUDE_DIR}")
THIRDPARTY_PRODUCT("OPENCL" "OpenCL/cl.h" "OpenCL" "OpenCLd")
ENDIF()

View File

@@ -2,9 +2,7 @@
if ["%1"] == [""] (
echo Launch selected sample as follows:
echo sample.bat SampleName vc10 win32 d
echo or to use last sample build configuration:
echo sample.bat SampleName
echo sample.bat SampleName
echo available samples:
echo Geometry
echo Modeling
@@ -19,13 +17,12 @@ if ["%1"] == [""] (
exit /B
)
call "%~dp0env.bat" %2 %3 %4
if not exist "%~dp0/%BIN_TAIL%/%1.exe" (
echo Executable %~dp0/%BIN_TAIL%/%1.exe not found.
if not exist "%~dp0/bin/%1.exe" (
echo Executable %~dp0/bin/%4.exe not found.
echo Probably you didn't compile the application.
exit /B
)
"%~dp0/%BIN_TAIL%/%1.exe"
call "%~dp0/env.bat"
"%~dp0/bin/%1.exe"

View File

@@ -1,241 +1,109 @@
# tbb
# Find tbb includes and libraries
IF(${COMPILER_BITNESS} STREQUAL 32)
SET (TBB_ARCH_NAME ia32)
ELSE()
SET (TBB_ARCH_NAME intel64)
ENDIF()
IF(NOT DEFINED 3RDPARTY_TBB_DIR)
SET(3RDPARTY_TBB_DIR "" CACHE PATH "Directory contains tbb product")
ENDIF()
SET(3RDPARTY_TBB_DIR_NAME "")
IF(3RDPARTY_DIR AND ("${3RDPARTY_TBB_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED))
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" "TBB" 3RDPARTY_TBB_DIR_NAME)
IF("${3RDPARTY_TBB_DIR_NAME}" STREQUAL "")
MESSAGE(STATUS "TBB DON'T FIND")
ELSE()
SET(3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${3RDPARTY_TBB_DIR_NAME}" CACHE PATH "Directory contains tbb product" FORCE)
ENDIF()
ENDIF()
SET(INSTALL_TBB OFF CACHE BOOL "Is tbb lib copy to install directory")
OCCT_MAKE_BUILD_POSTFIX()
IF(3RDPARTY_TBB_DIR)
IF("${3RDPARTY_TBB_INCLUDE_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED)
SET(3RDPARTY_TBB_INCLUDE_DIR "3RDPARTY_TBB_INCLUDE_DIR-NOTFOUND" CACHE PATH "Directory contains headers of the tbb product" FORCE)
FIND_PATH(3RDPARTY_TBB_INCLUDE_DIR tbb/tbb.h PATHS "${3RDPARTY_TBB_DIR}/include")
ENDIF()
if (NOT DEFINED INSTALL_TBB)
set (INSTALL_TBB OFF CACHE BOOL "Is tbb required to be copied into install directory")
endif()
# tbb directory
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 (NOT DEFINED 3RDPARTY_TBBMALLOC_DLL_DIR)
set (3RDPARTY_TBBMALLOC_DLL_DIR "" CACHE FILEPATH "The directory containing tbb malloc shared library")
endif()
# include occt macros. compiler_bitness, os_wiht_bit, compiler and build_postfix
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/occt_macros")
# 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()
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")
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()
OCCT_MAKE_BUILD_POSTFIX()
# search for tbb and tbb malloc library in defined 3rdparty directory
foreach (LIBRARY_NAME TBB TBBMALLOC)
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()
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)
# first of all, search for debug version of a library if build type is debug
if (DEFINED IS_BUILD_DEBUG)
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${LIBRARY_NAME}_debug
PATHS
"${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}"
"${3RDPARTY_TBB_DIR}/libd/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
"${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}_debug)
endif()
# if build type is release or debug version of library isn't found - search for release version of one
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)
if (DEFINED IS_BUILD_DEBUG)
message (STATUS "Warning: debug version of ${LIBRARY_NAME} library isn't found (${LIBRARY_NAME}_debug) in ${3RDPARTY_TBB_DIR}/lib(d). Search for release one")
endif()
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${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()
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)
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBRARY_NAME} library" FORCE)
endif()
# search for dll in defined 3rdparty directory (just for win case)
if (WIN32)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
SET(TBB_DEBUG_POSTFIX "")
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
SET(TBB_DEBUG_POSTFIX "_debug")
ENDIF()
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("${3RDPARTY_TBB_LIBRARY}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_TBB_LIBRARY}" STREQUAL "3RDPARTY_TBB_LIBRARY-NOTFOUND")
SET(3RDPARTY_TBB_LIBRARY "3RDPARTY_TBB_LIBRARY-NOTFOUND" CACHE PATH "Directory contains library of the tbb product" FORCE)
FIND_LIBRARY(3RDPARTY_TBB_LIBRARY tbb${TBB_DEBUG_POSTFIX} PATHS "${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${COMPILER}" NO_DEFAULT_PATH)
IF("${3RDPARTY_TBB_LIBRARY}" STREQUAL "3RDPARTY_TBB_LIBRARY-NOTFOUND")
FIND_LIBRARY(3RDPARTY_TBB_LIBRARY tbb${TBB_DEBUG_POSTFIX})
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)
if (DEFINED IS_BUILD_DEBUG)
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME}_debug
PATHS
"${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}"
"${3RDPARTY_TBB_DIR}/bind/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
"${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}_debug)
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)
if (DEFINED IS_BUILD_DEBUG)
message (STATUS "Warning: debug version of ${LIBRARY_NAME} dll isn't found (${LIBRARY_NAME}_debug) in ${3RDPARTY_TBB_DIR}/bin(d). Search for release one")
endif()
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()
endif()
IF("${3RDPARTY_TBB_MALLOC_LIBRARY}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_TBB_MALLOC_LIBRARY}" STREQUAL "3RDPARTY_TBB_MALLOC_LIBRARY-NOTFOUND")
SET(3RDPARTY_TBB_MALLOC_LIBRARY "3RDPARTY_TBB_MALLOC_LIBRARY-NOTFOUND" CACHE PATH "Directory contains library of the tbb malloc product" FORCE)
FIND_LIBRARY(3RDPARTY_TBB_MALLOC_LIBRARY tbbmalloc${TBB_DEBUG_POSTFIX} PATHS "${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${COMPILER}" NO_DEFAULT_PATH)
IF("${3RDPARTY_TBB_MALLOC_LIBRARY}" STREQUAL "3RDPARTY_TBB_MALLOC_LIBRARY-NOTFOUND")
FIND_LIBRARY(3RDPARTY_TBB_MALLOC_LIBRARY tbbmalloc${TBB_DEBUG_POSTFIX})
ENDIF()
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
IF("${3RDPARTY_TBB_DLL}" STREQUAL "" OR CHANGES_ARE_NEEDED)
SET(3RDPARTY_TBB_DLL "3RDPARTY_TBB_DLL-NOTFOUND" CACHE PATH "Directory contains shared library of the tbb product" FORCE)
FIND_FILE(3RDPARTY_TBB_DLL "${DLL_SO_PREFIX}tbb${TBB_DEBUG_POSTFIX}.${DLL_SO}" PATHS "${3RDPARTY_TBB_DIR}/${DLL_SO_FOLDER}/${TBB_ARCH_NAME}/${COMPILER}" NO_DEFAULT_PATH)
IF("${3RDPARTY_TBB_DLL}" STREQUAL "3RDPARTY_TBB_DLL-NOTFOUND")
FIND_FILE(3RDPARTY_TBB_DLL "${DLL_SO_PREFIX}tbb${TBB_DEBUG_POSTFIX}.${DLL_SO}")
ENDIF()
ENDIF()
IF("${3RDPARTY_TBB_MALLOC_DLL}" STREQUAL "" OR CHANGES_ARE_NEEDED)
SET(3RDPARTY_TBB_MALLOC_DLL "3RDPARTY_TBB_MALLOC_DLL-NOTFOUND" CACHE PATH "Directory contains shared library of the tbb malloc product" FORCE)
FIND_FILE(3RDPARTY_TBB_MALLOC_DLL "${DLL_SO_PREFIX}tbbmalloc${TBB_DEBUG_POSTFIX}.${DLL_SO}" PATHS "${3RDPARTY_TBB_DIR}/${DLL_SO_FOLDER}/${TBB_ARCH_NAME}/${COMPILER}" NO_DEFAULT_PATH)
IF("${3RDPARTY_TBB_MALLOC_DLL}" STREQUAL "3RDPARTY_TBB_MALLOC_DLL-NOTFOUND")
FIND_FILE(3RDPARTY_TBB_MALLOC_DLL "${DLL_SO_PREFIX}tbbmalloc${TBB_DEBUG_POSTFIX}.${DLL_SO}")
ENDIF()
ENDIF()
# 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)
endif()
MARK_AS_ADVANCED(3RDPARTY_TBB_DIR_NAME)
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_DIR)
ENDIF()
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(3RDPARTY_TBB_INCLUDE_DIR)
SET(3RDPARTY_INCLUDE_DIRS "${3RDPARTY_INCLUDE_DIRS};${3RDPARTY_TBB_INCLUDE_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
ENDIF()
if (WIN32)
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBRARY_NAME}_DLL_DIR)
endif()
endif()
endforeach()
# 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} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
else()
install (FILES ${3RDPARTY_TBB_LIBRARY} ${3RDPARTY_TBBMALLOC_LIBRARY} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
endif()
endif()
mark_as_advanced (3RDPARTY_TBB_LIBRARY 3RDPARTY_TBBMALLOC_LIBRARY 3RDPARTY_TBB_DLL 3RDPARTY_TBBMALLOC_DLL)
IF(3RDPARTY_TBB_LIBRARY)
GET_FILENAME_COMPONENT(3RDPARTY_TBB_LIBRARY_DIR "${3RDPARTY_TBB_LIBRARY}" PATH)
SET(3RDPARTY_LIBRARY_DIRS "${3RDPARTY_LIBRARY_DIRS};${3RDPARTY_TBB_LIBRARY_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_LIBRARY)
ENDIF()
IF(3RDPARTY_TBB_MALLOC_LIBRARY)
GET_FILENAME_COMPONENT(3RDPARTY_TBB_LIBRARY_DIR "${3RDPARTY_TBB_MALLOC_LIBRARY}" PATH)
SET(3RDPARTY_LIBRARY_DIRS "${3RDPARTY_LIBRARY_DIRS};${3RDPARTY_TBB_LIBRARY_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_MALLOC_LIBRARY)
ENDIF()
IF(3RDPARTY_TBB_DLL)
#
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_DLL)
ENDIF()
IF(3RDPARTY_TBB_MALLOC_DLL)
#
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_MALLOC_DLL)
ENDIF()

View File

@@ -1,333 +1,163 @@
# tcl
# - Find Tcl includes and libraries
if (NOT DEFINED INSTALL_TCL)
set (INSTALL_TCL OFF CACHE BOOL "Is tcl lib required to be copied into install directory")
endif()
IF(WIN32)
SET(TCL_SEP "")
# tcl directory
if (NOT DEFINED 3RDPARTY_TCL_DIR)
set (3RDPARTY_TCL_DIR "" CACHE PATH "The directory containing tcl")
endif()
GET_FILENAME_COMPONENT(ActiveTcl_CurrentVersion
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" NAME)
# tcl include directory
if (NOT DEFINED 3RDPARTY_TCL_INCLUDE_DIR)
set (3RDPARTY_TCL_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tcl")
endif()
ELSE()
SET(TCL_SEP ".")
ENDIF()
# tk include directory
if (NOT DEFINED 3RDPARTY_TK_INCLUDE_DIR)
set (3RDPARTY_TK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tk")
endif()
IF(NOT DEFINED 3RDPARTY_TCL_DIR)
SET(3RDPARTY_TCL_DIR "" CACHE PATH "Directory contains TCL product")
ENDIF()
# tcl library file (with absolute path)
if (NOT DEFINED 3RDPARTY_TCL_LIBRARY OR NOT 3RDPARTY_TCL_LIBRARY_DIR)
set (3RDPARTY_TCL_LIBRARY "" CACHE FILEPATH "tcl library" FORCE)
endif()
# tcl library directory
if (NOT DEFINED 3RDPARTY_TCL_LIBRARY_DIR)
set (3RDPARTY_TCL_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tcl library")
endif()
# tk library file (with absolute path)
if (NOT DEFINED 3RDPARTY_TK_LIBRARY OR NOT 3RDPARTY_TK_LIBRARY_DIR)
set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "tk library" FORCE)
endif()
# tk library directory
if (NOT DEFINED 3RDPARTY_TK_LIBRARY_DIR)
set (3RDPARTY_TK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tk library")
endif()
# tcl shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TCL_DLL OR NOT 3RDPARTY_TCL_DLL_DIR)
set (3RDPARTY_TCL_DLL "" CACHE FILEPATH "tcl shared library" FORCE)
endif()
endif()
# tcl shared library directory
if (WIN32 AND NOT DEFINED 3RDPARTY_TCL_DLL_DIR)
set (3RDPARTY_TCL_DLL_DIR "" CACHE FILEPATH "The directory containing tcl shared library")
endif()
# tk shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TK_DLL OR NOT 3RDPARTY_TK_DLL_DIR)
set (3RDPARTY_TK_DLL "" CACHE FILEPATH "tk shared library" FORCE)
endif()
endif()
# tk shared library directory
if (WIN32 AND NOT DEFINED 3RDPARTY_TK_DLL_DIR)
set (3RDPARTY_TK_DLL_DIR "" CACHE FILEPATH "The directory containing tk shared library")
endif()
# search for tcl in user defined directory
if (NOT 3RDPARTY_TCL_DIR AND 3RDPARTY_DIR)
IF(3RDPARTY_DIR AND ("${3RDPARTY_TCL_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED))
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" tcl TCL_DIR_NAME)
if (TCL_DIR_NAME)
set (3RDPARTY_TCL_DIR "${3RDPARTY_DIR}/${TCL_DIR_NAME}" CACHE PATH "The directory containing tcl" FORCE)
endif()
endif()
# define paths for default engine
if (3RDPARTY_TCL_DIR AND EXISTS "${3RDPARTY_TCL_DIR}")
set (TCL_INCLUDE_PATH "${3RDPARTY_TCL_DIR}/include")
endif()
# check tcl/tk include dir, library dir and shared library dir
macro (DIR_SUBDIR_FILE_FIT LIBNAME)
if (3RDPARTY_TCL_DIR AND EXISTS "${3RDPARTY_TCL_DIR}")
# tcl/tk include dir
if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
endif()
# tcl/tk library dir
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
endif()
# tcl/tk shared library dir
if (WIN32)
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL_DIR}")
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
endif()
endif()
endif()
# check tcl/tk library
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY}")
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
endif()
# check tcl/tk shared library
if (WIN32)
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
if (3RDPARTY_${LIBNAME}_DLL AND EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DLL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL}")
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
endif()
endif()
endmacro()
DIR_SUBDIR_FILE_FIT(TCL)
DIR_SUBDIR_FILE_FIT(TK)
# use default (CMake) TCL search
find_package(TCL)
foreach (LIBNAME TCL TK)
string (TOLOWER "${LIBNAME}" LIBNAME_L)
# tcl/tk include dir
if (NOT 3RDPARTY_${LIBNAME}_INCLUDE_DIR)
if (${LIBNAME}_INCLUDE_PATH AND EXISTS "${${LIBNAME}_INCLUDE_PATH}")
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "${${LIBNAME}_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
endif()
endif()
# tcl/tk dir and library
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY)
if (${LIBNAME}_LIBRARY AND EXISTS "${${LIBNAME}_LIBRARY}")
set (3RDPARTY_${LIBNAME}_LIBRARY "${${LIBNAME}_LIBRARY}" CACHE FILEPATH "${LIBNAME} library" FORCE)
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY_DIR)
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY}" PATH)
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
endif()
endif()
endif()
IF("${TCL_DIR_NAME}" STREQUAL "")
MESSAGE(STATUS "\nInfo: tcl folder isn't found in ${3RDPARTY_DIR}. Start seeking in default folders")
ELSE()
SET(3RDPARTY_TCL_DIR "${3RDPARTY_DIR}/${TCL_DIR_NAME}" CACHE PATH "Directory contains TCL product" FORCE)
ENDIF()
ENDIF()
SET(INSTALL_TCL OFF CACHE BOOL "Is TCL lib copy to install directory")
if (WIN32)
if (NOT 3RDPARTY_${LIBNAME}_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_${LIBNAME}_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_DLL_DIR}")
elseif (3RDPARTY_TCL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
elseif (3RDPARTY_${LIBNAME}_LIBRARY_DIR)
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_${LIBNAME}_DLL "3RDPARTY_${LIBNAME}_DLL-NOTFOUND" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
find_library (3RDPARTY_${LIBNAME}_DLL NAMES ${LIBNAME_L}86 ${LIBNAME_L}85
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
endif()
endif()
DIR_SUBDIR_FILE_FIT(${LIBNAME})
# include dir search
IF("${3RDPARTY_TCL_INCLUDE_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_TCL_INCLUDE_DIR}" STREQUAL "3RDPARTY_TCL_INCLUDE_DIR-NOTFOUND")
SET(3RDPARTY_TCL_INCLUDE_DIR "3RDPARTY_TCL_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "Directory contains headers of the TCL product" FORCE)
IF(NOT "${3RDPARTY_TCL_DIR}" STREQUAL "")
FIND_PATH(3RDPARTY_TCL_INCLUDE_DIR tcl.h PATHS "${3RDPARTY_TCL_DIR}/include" NO_DEFAULT_PATH)
ELSE()
SET(3RDPARTY_TCL_POSSIBLE_INCLUDE_DIRS /usr/include
/usr/local/include
/usr/include/tcl8${TCL_SEP}6
/usr/include/tcl8${TCL_SEP}5)
IF(WIN32)
SET(3RDPARTY_TCL_POSSIBLE_INCLUDE_DIRS ${3RDPARTY_TCL_POSSIBLE_INCLUDE_DIRS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/include"
"$ENV{ProgramFiles}/Tcl/include"
#"$ENV{ProgramFiles\(x86\)}/Tcl/include"
"C:/Program Files/Tcl/include"
"C:/Tcl/include")
ENDIF(WIN32)
# tcl/tk dir and library
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY)
set (3RDPARTY_${LIBNAME}_LIBRARY "3RDPARTY_${LIBNAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "${LIBNAME} library" FORCE)
find_library (3RDPARTY_${LIBNAME}_LIBRARY NAMES ${LIBNAME_L}8.6 ${LIBNAME_L}86 ${LIBNAME_L}8.5 ${LIBNAME_L}85
PATHS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}"
NO_DEFAULT_PATH)
# search in another place if previous search doesn't find anything
find_library (3RDPARTY_${LIBNAME}_LIBRARY NAMES ${LIBNAME_L}8.6 ${LIBNAME_L}86 ${LIBNAME_L}8.5 ${LIBNAME_L}85
PATHS "${3RDPARTY_TCL_DIR}/lib"
NO_DEFAULT_PATH)
# check default path (with additions) for header search
FIND_PATH(3RDPARTY_TCL_INCLUDE_DIR tcl.h PATHS ${3RDPARTY_TCL_POSSIBLE_INCLUDE_DIRS})
#if find_path found something - set 3RDPARTY_TCL_DIR
IF(NOT "${3RDPARTY_TCL_INCLUDE_DIR}" STREQUAL "3RDPARTY_TCL_INCLUDE_DIR-NOTFOUND")
GET_FILENAME_COMPONENT (3RDPARTY_TCL_DIR "${3RDPARTY_TCL_INCLUDE_DIR}/../" ABSOLUTE)
SET(3RDPARTY_TCL_DIR ${3RDPARTY_TCL_DIR} CACHE FILEPATH "Directory contains TCL product" FORCE)
ENDIF()
ENDIF()
ENDIF()
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
endif()
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY_DIR AND 3RDPARTY_${LIBNAME}_LIBRARY)
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY}" PATH)
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
endif()
endif()
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION "")
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
get_filename_component (${LIBNAME}_LIBRARY_NAME "${3RDPARTY_${LIBNAME}_LIBRARY}" NAME)
string(REGEX REPLACE "^.*${LIBNAME_L}([0-9]\\.*[0-9]).*$" "\\1" ${LIBNAME}_LIBRARY_VERSION "${${LIBNAME}_LIBRARY_NAME}")
if (NOT "${${LIBNAME}_LIBRARY_VERSION}" STREQUAL "${${LIBNAME}_LIBRARY_NAME}")
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION "${${LIBNAME}_LIBRARY_VERSION}")
else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
message (STATUS "Info: ${LIBNAME} version isn't found")
endif()
endif()
#library dir search
IF("${3RDPARTY_TCL_LIBRARY}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_TCL_LIBRARY}" STREQUAL "3RDPARTY_TCL_LIBRARY-NOTFOUND")
SET(3RDPARTY_TCL_LIBRARY "3RDPARTY_TCL_LIBRARY-NOTFOUND" CACHE FILEPATH "Path to library of the TCL product" FORCE)
IF(NOT "${3RDPARTY_TCL_DIR}" STREQUAL "")
FIND_LIBRARY(3RDPARTY_TCL_LIBRARY
NAMES tcl tcl8${TCL_SEP}6 tcl8${TCL_SEP}5
PATHS "${3RDPARTY_TCL_DIR}/lib" NO_DEFAULT_PATH)
ELSE()
SET(3RDPARTY_TCL_POSSIBLE_LIBRARIES_DIRS /usr/lib /usr/local/lib)
IF(WIN32)
SET(3RDPARTY_TCL_POSSIBLE_LIBRARIES_DIRS ${3RDPARTY_TCL_POSSIBLE_LIBRARIES_DIRS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib"
"$ENV{ProgramFiles}/Tcl/Lib"
"C:/Program Files/Tcl/lib"
"C:/Tcl/lib" )
ENDIF()
# check default path (with additions) for library search
FIND_LIBRARY(3RDPARTY_TCL_LIBRARY
NAMES tcl tcl8${TCL_SEP}6 tcl8${TCL_SEP}5
PATHS ${3RDPARTY_TCL_POSSIBLE_LIBRARIES_DIRS})
ENDIF()
ENDIF()
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION_WITH_DOT "")
if (3RDPARTY_${LIBNAME}_LIBRARY_VERSION)
string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_${LIBNAME}_MAJOR_VERSION "${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}")
string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_${LIBNAME}_MINOR_VERSION "${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}")
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_${LIBNAME}_MAJOR_VERSION}.${3RDPARTY_${LIBNAME}_MINOR_VERSION}")
endif()
#search the version of found tcl library
IF("${3RDPARTY_TCL_LIBRARY}" STREQUAL "" OR "${3RDPARTY_TCL_LIBRARY}" STREQUAL "3RDPARTY_TCL_LIBRARY-NOTFOUND")
SET (TCL_DLL_SO_NAMES ${DLL_SO_PREFIX}tcl.${DLL_SO}
${DLL_SO_PREFIX}tcl8${TCL_SEP}5.${DLL_SO}
${DLL_SO_PREFIX}tcl8${TCL_SEP}6.${DLL_SO} )
ELSE()
GET_FILENAME_COMPONENT(TCL_LIBRARY_NAME "${3RDPARTY_TCL_LIBRARY}" NAME)
if (WIN32)
if (NOT 3RDPARTY_${LIBNAME}_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
STRING(REGEX REPLACE "^.*tcl([0-9])[^0-9]*[0-9].*$" "\\1" TCL_MAJOR_VERSION "${TCL_LIBRARY_NAME}")
STRING(REGEX REPLACE "^.*tcl[0-9][^0-9]*([0-9]).*$" "\\1" TCL_MINOR_VERSION "${TCL_LIBRARY_NAME}")
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_${LIBNAME}_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_DLL_DIR}")
elseif (3RDPARTY_TCL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
else()
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_${LIBNAME}_DLL "3RDPARTY_${LIBNAME}_DLL-NOTFOUND" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
find_library (3RDPARTY_${LIBNAME}_DLL NAMES ${LIBNAME_L}${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_${LIBNAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
endif()
if (NOT 3RDPARTY_${LIBNAME}_DLL_DIR AND 3RDPARTY_${LIBNAME}_DLL)
get_filename_component (3RDPARTY_${LIBNAME}_DLL_DIR "${3RDPARTY_${LIBNAME}_DLL}" PATH)
set (3RDPARTY_${LIBNAME}_DLL_DIR "${3RDPARTY_${LIBNAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
endif()
endif()
endif()
IF (NOT "${TCL_MAJOR_VERSION}" STREQUAL "${TCL_LIBRARY_NAME}")
SET (IS_TCL_VERSION_FOUND ON)
ELSE()
SET (IS_TCL_VERSION_FOUND OFF)
ENDIF()
# include found paths to common variables
if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_INCLUDE_DIR)
endif()
IF (IS_TCL_VERSION_FOUND)
SET (TCL_DLL_SO_NAMES "${DLL_SO_PREFIX}tcl${TCL_MAJOR_VERSION}${TCL_SEP}${TCL_MINOR_VERSION}.${DLL_SO}")
ELSE()
MESSAGE(STATUS "\nWarning: Tcl version isn't found. ${DLL_SO_PREFIX}tcl.${DLL_SO} is used")
SET (TCL_DLL_SO_NAMES "${DLL_SO_PREFIX}tcl.${DLL_SO}")
ENDIF()
ENDIF()
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_LIBRARY_DIR})
endif()
#dll_so search
IF("${3RDPARTY_TCL_DLL}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_TCL_DLL}" STREQUAL "3RDPARTY_TCL_DLL-NOTFOUND")
SET(3RDPARTY_TCL_DLL "3RDPARTY_TCL_DLL-NOTFOUND" CACHE FILEPATH "Path to shared library of the TCL product" FORCE)
IF(NOT "${3RDPARTY_TCL_DIR}" STREQUAL "")
FIND_FILE(3RDPARTY_TCL_DLL
NAMES ${TCL_DLL_SO_NAMES}
PATHS "${3RDPARTY_TCL_DIR}/${DLL_SO_FOLDER}" NO_DEFAULT_PATH)
ELSE()
SET(3RDPARTY_TCL_POSSIBLE_SO_DIRS /usr/lib /usr/local/lib)
IF(WIN32)
SET(3RDPARTY_TCL_POSSIBLE_SO_DIRS ${3RDPARTY_TCL_POSSIBLE_SO_DIRS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin"
"$ENV{ProgramFiles}/Tcl/Bin"
"C:/Program Files/Tcl/bin"
"C:/Tcl/b" )
ENDIF()
# check default path (with additions) for dll_so search
FIND_FILE(3RDPARTY_TCL_DLL
NAMES ${TCL_DLL_SO_NAMES}
PATHS ${3RDPARTY_TCL_POSSIBLE_SO_DIRS})
ENDIF()
ENDIF()
IF(NOT "${3RDPARTY_TCL_DIR}" STREQUAL "")
MARK_AS_ADVANCED(3RDPARTY_TCL_DIR)
ENDIF()
if (WIN32)
if (NOT 3RDPARTY_${LIBNAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_DLL_DIR)
endif()
endif()
endforeach()
# #includes found paths to common variables
IF(3RDPARTY_TCL_INCLUDE_DIR)
SET(3RDPARTY_INCLUDE_DIRS "${3RDPARTY_INCLUDE_DIRS};${3RDPARTY_TCL_INCLUDE_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_INCLUDE_DIR)
ENDIF()
# install tcltk
if (INSTALL_TCL)
# include occt macros. compiler_bitness, os_wiht_bit, compiler and build_postfix
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/occt_macros")
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
OCCT_MAKE_BUILD_POSTFIX()
if (WIN32)
install (FILES ${3RDPARTY_TCL_DLL} ${3RDPARTY_TK_DLL} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
else()
install (FILES ${3RDPARTY_TCL_LIBRARY} ${3RDPARTY_TK_LIBRARY} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
endif()
if (TCL_TCLSH_VERSION)
# tcl is required to install in lib folder (without ${BUILD_POSTFIX})
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
else()
message (STATUS "\nWarning: tclX.X and tkX.X subdirs won't be copyied during the installation process.")
message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
endif()
endif()
mark_as_advanced (3RDPARTY_TCL_LIBRARY 3RDPARTY_TK_LIBRARY 3RDPARTY_TCL_DLL 3RDPARTY_TK_DLL)
# unset all redundant variables
#TCL
OCCT_CHECK_AND_UNSET (TCL_LIBRARY)
OCCT_CHECK_AND_UNSET (TCL_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TCL_TCLSH)
#TK
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TK_WISH)
IF(3RDPARTY_TCL_LIBRARY)
GET_FILENAME_COMPONENT(3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
SET(3RDPARTY_LIBRARY_DIRS "${3RDPARTY_LIBRARY_DIRS};${3RDPARTY_TCL_LIBRARY_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_LIBRARY)
ENDIF()
IF(3RDPARTY_TCL_DLL)
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_DLL)
ENDIF()

View File

@@ -1,156 +0,0 @@
# vtk
if (NOT DEFINED INSTALL_VTK)
set (INSTALL_VTK OFF CACHE BOOL "Is vtk required to be copied into install directory")
endif()
# vtk directory
if (NOT DEFINED 3RDPARTY_VTK_DIR)
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 FILEPATH "The directory containing headers of vtk")
endif()
# vtk library directory
if (NOT DEFINED 3RDPARTY_VTK_LIBRARY_DIR)
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 FILEPATH "The directory containing VTK dll")
endif()
# 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()
# 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()
OCCT_MAKE_BUILD_POSTFIX()
set(VTK_VERSION "")
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
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 (NOT 3RDPARTY_VTK_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
if(EXISTS "${3RDPARTY_VTK_DIR}/lib${BUILD_POSTFIX}")
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib${BUILD_POSTFIX}" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
else()
if (NOT "${BUILD_POSTFIX}" STREQUAL "" AND 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()
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${BUILD_POSTFIX}")
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bin${BUILD_POSTFIX}" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
else()
if (NOT "${BUILD_POSTFIX}" STREQUAL "" AND EXISTS "${3RDPARTY_VTK_DIR}/bin")
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bin" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
endif()
endif()
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}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_INCLUDE_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} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
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}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}" RENAME "lib${VTK_DLL_NAME}")
endforeach()
endif()
endif()
mark_as_advanced (VTK_INCLUDE_DIRS VTK_LIBRARY_DIRS VTK_DIR)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

View File

@@ -9,10 +9,6 @@ overview/overview.md
../samples/mfc/standard/ReadMe.md
../samples/CSharp/ReadMe.md
../samples/CSharp/ReadMe_D3D.md
../samples/qt/AndroidQt/ReadMe.md
../samples/java/jniviewer/ReadMe.md
tutorial/tutorial.md
@@ -22,21 +18,19 @@ user_guides/user_guides.md
user_guides/foundation_classes/foundation_classes.md
user_guides/modeling_data/modeling_data.md
user_guides/modeling_algos/modeling_algos.md
user_guides/boolean_operations/boolean_operations.md
user_guides/shape_healing/shape_healing.md
user_guides/visualization/visualization.md
user_guides/iges/iges.md
user_guides/step/step.md
user_guides/xde/xde.md
user_guides/ocaf/ocaf.md
user_guides/tobj/tobj.md
user_guides/draw_test_harness/draw_test_harness.md
user_guides/shape_healing/shape_healing.md
user_guides/draw_test_harness.md
user_guides/brep_wp/brep_wp.md
user_guides/ocaf_functionmechanism_wp/ocaf_functionmechanism_wp.md
user_guides/ocaf_tree_wp/ocaf_tree_wp.md
user_guides/ocaf_wp/ocaf_wp.md
user_guides/voxels_wp/voxels_wp.md
user_guides/vis/vis.md
dev_guides/dev_guides.md
dev_guides/documentation/documentation.md
@@ -55,7 +49,6 @@ dev_guides/building/3rdparty/3rdparty_osx.md
dev_guides/building/wok/wok.md
dev_guides/building/automake.md
dev_guides/building/cmake/cmake.md
dev_guides/building/android/android.md
dev_guides/building/code_blocks.md
dev_guides/building/msvc.md
dev_guides/building/xcode.md

View File

@@ -1,34 +0,0 @@
# This file contains list of documentation files of OCCT which are processed
# by Doxygen to generate PDF documentation.
# Files are listed one file per line, with paths relative to dox folder.
# Empty spaces are allowed.
# Strings starting with '#' are treated as comments and ignored.
user_guides/brep_wp/brep_wp.md
user_guides/foundation_classes/foundation_classes.md
user_guides/iges/iges.md
user_guides/modeling_data/modeling_data.md
user_guides/modeling_algos/modeling_algos.md
user_guides/boolean_operations/boolean_operations.md
user_guides/shape_healing/shape_healing.md
user_guides/ocaf/ocaf.md
user_guides/ocaf_functionmechanism_wp/ocaf_functionmechanism_wp.md
user_guides/ocaf_tree_wp/ocaf_tree_wp.md
user_guides/ocaf_wp/ocaf_wp.md
user_guides/step/step.md
user_guides/draw_test_harness/draw_test_harness.md
user_guides/tobj/tobj.md
user_guides/visualization/visualization.md
user_guides/voxels_wp/voxels_wp.md
user_guides/xde/xde.md
user_guides/vis/vis.md
dev_guides/contribution_workflow/contribution_workflow.md
dev_guides/documentation/documentation.md
dev_guides/contribution/coding_rules.md
dev_guides/git_guide/git_guide.md
dev_guides/tests/tests.md
dev_guides/wok/wok.md
dev_guides/cdl/cdl.md
tutorial/tutorial.md

View File

@@ -1,4 +1,4 @@
 Building 3rd-party libraries on Linux {#occt_dev_guides__building_3rdparty_linux}
 Building 3rd-party libraries on Linux {#dev_guides__building_3rdparty_linux}
=========
@tableofcontents
@@ -14,14 +14,8 @@ http://www.opencascade.org/getocc/require/.
There are two types of third-party products, which are necessary to build OCCT:
* Mandatory products:
* Tcl/Tk 8.5 - 8.6;  
* FreeType 2.4.10 - 2.5.3;
* Optional products:
* TBB 3.x - 4.x;
* gl2ps 1.3.5 - 1.3.8;
* FreeImage 3.14.1 - 3.16.0;
* VTK 6.1.0.
* Mandatory products: Tcl/Tk 8.5 - 8.6 and  FreeType 2.4.10 - 2.4.11
* Optional products: TBB 3.x - 4.x, gl2ps 1.3.5 - 1.3.8, FreeImage 3.14.1 - 3.15.4
@section dev_guides__building_3rdparty_linux_2 Building Mandatory Third-party Products
@@ -29,26 +23,42 @@ There are two types of third-party products, which are necessary to build OCCT:
Tcl/Tk is required for DRAW test harness.
@subsubsection dev_guides__building_3rdparty_linux_2_1_1 Installation from binaries:
It is possible to download ready-to-install binaries from
http://www.activestate.com/activetcl/downloads
1. Download the binaries archive and unpack them to some TCL_SRC_DIR.
2. Enter the directory TCL_SRC_DIR.
cd TCL_SRC_DIR
3. Run the install command
install.sh
and follow instructions.
@subsubsection dev_guides__building_3rdparty_linux_2_1_2 Installation from sources: Tcl
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
1. Enter the unix sub-directory of the directory where the Tcl source files are located <i>(TCL_SRC_DIR)</i>.
1. Enter the unix sub-directory of the directory where the source files of Tcl are located (TCL_SRC_DIR).
cd TCL_SRC_DIR/unix
2. Run the *configure* command:
2. Run the configure command
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
For a 64 bit platform also add <i>--enable-64bit</i> option to the command line.
For a 64 bit platform also add --enable-64bit option to the command line.
3. If the configure command has finished successfully, start the building process:
3. If the configure command has finished successfully, start the building process
make
4. If building is finished successfully, start the installation of Tcl.
All binary and service files of the product will be copied to the directory defined by *TCL_INSTALL_DIR*
All binary and service files of the product will be copied to the directory defined by TCL_INSTALL_DIR
make install
@@ -56,47 +66,49 @@ Download the necessary archive from http://www.tcl.tk/software/tcltk/download.ht
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
1. Enter the unix sub-directory of the directory where the Tk source files are located <i>(TK_SRC_DIR)</i>
1. Enter the unix sub-directory of the directory where the source files of Tk are located (TK_SRC_DIR).
cd TK_SRC_DIR/unix
2. Run the configure command, where <i>TCL_LIB_DIR</i> is *TCL_INSTALL_DIR/lib*.
2. Run the configure command, where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
For a 64 bit platform also add <i>--enable-64bit</i> option to the command line.
where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
3. If the configure command has finished successfully, start the building process:
For a 64 bit platform also add --enable-64bit option to the command line.
3. If the configure command has finished successfully, start the building process
make
4. If the building has finished successfully, start the installation of Tk.
4. If building has finished successfully, start the installation of Tk.
All binary and service files of the product will be copied
to the directory defined by *TK_INSTALL_DIR* (usually it is *TCL_INSTALL_DIR*)
to the directory defined by TK_INSTALL_DIR (usually TK_INSTALL_DIR is TCL_INSTALL_DIR)
make install
@subsection dev_guides__building_3rdparty_linux_2_2 FreeType
FreeType is required for text display in the 3D viewer.
FreeType is required for display of text in 3D viewer.
Download the necessary archive from http://sourceforge.net/projects/freetype/files/ and unpack it.
1. Enter the directory where the source files of FreeType are located <i>(FREETYPE_SRC_DIR)</i>.
1. Enter the directory where the source files of FreeType are located (FREETYPE_SRC_DIR).
cd FREETYPE_SRC_DIR
2. Run the *configure* command:
2. Run the configure command
configure --prefix=FREETYPE_INSTALL_DIR
For a 64 bit platform also add <i>CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'</i> option to the command line.
For a 64 bit platform also add CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC' option to the command line.
3. If the *configure* command has finished successfully, start the building process:
3. If the configure command has finished successfully, start the building process
make
4. If the building has finished successfully, start the installation of FreeType.
All binary and service files of the product will be copied to the directory defined by *FREETYPE_INSTALL_DIR*
4. If building has finished successfully, start the installation of FreeType.
All binary and service files of the product will be copied to the directory defined by FREETYPE_INSTALL_DIR
make install
@@ -105,46 +117,46 @@ Download the necessary archive from http://sourceforge.net/projects/freetype/fil
@subsection dev_guides__building_3rdparty_linux_3_1 TBB
This third-party product is installed with binaries from the archive that can be downloaded from http://threadingbuildingblocks.org.
Go to the **Download** page, find the release version you need and pick the archive for Linux platform.
Go to \"Downloads page\", find the release version you need and pick the archive for Linux platform.
To install, unpack the downloaded archive of TBB product.
@subsection dev_guides__building_3rdparty_linux_3_2 gl2ps
Download the necessary archive from http://geuz.org/gl2ps/ and unpack it.
1. Install or build *cmake* product from the source file.
2. Start *cmake* in GUI mode with the directory where the source files of gl2ps are located:
1. Install or build cmake product from source file.
2. Start cmake in GUI mode with the directory where the source files of gl2ps are located:
ccmake GL2PS_SRC_DIR
* Press <i>[c]</i> to make the initial configuration;
* Define the necessary options in *CMAKE_INSTALL_PREFIX*
* Press <i>[c]</i> to make the final configuration
* Press <i>[g]</i> to generate Makefile and exit
a. Press [c] to make the initial configuration
b. Define the necessary options CMAKE_INSTALL_PREFIX
c. Press [c] to make the final configuration
d. Press [g] to generate Makefile and exit
or just run the following command:
cmake DCMAKE_INSTALL_PREFIX=GL2PS_INSTALL_DIR DCMAKE_BUILD_TYPE=Release
3. Start the building of gl2ps:
3. Start building of gl2ps
make
4. Start the installation of gl2ps. Binaries will be installed according to the *CMAKE_INSTALL_PREFIX* option.
4. Start the installation of gl2ps. Binaries will be installed according to the CMAKE_INSTALL_PREFIX option
make install
@subsection dev_guides__building_3rdparty_linux_3_3 FreeImage
Download the necessary archive from http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
and unpack it. The directory with unpacked sources is further referred to as *FREEIMAGE_SRC_DIR*.
and unpack it. The directory with unpacked sources is further referred to as FREEIMAGE_SRC_DIR.
1. Modify *FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h*:
1. Modify FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:
In line 60 insert the following:
#include string.h
2. Enter the directory where the source files of FreeImage are located <i>(FREEIMAGE_SRC_DIR)</i>.
2. Enter the directory where the source files of FreeImage are located (FREEIMAGE_SRC_DIR).
cd FREEIMAGE_SRC_DIR
@@ -154,10 +166,11 @@ and unpack it. The directory with unpacked sources is further referred to as *F
4. Run the installation process
a. If you have the permission to write into directories <i>/usr/include</i> and <i>/usr/lib</i>, run the following command:
a. If you have permissions to write to /usr/include and /usr/lib directories then run the following command:
make install
b. If you do not have this permission, you need to modify file *FREEIMAGE_SRC_DIR/Makefile.gnu*:
b. If you dont have permissions to write to /usr/include and
/usr/lib directories then you need to modify the file FREEIMAGE_SRC_DIR/Makefile.gnu:
Change lines 7-9 from:
@@ -195,50 +208,57 @@ and unpack it. The directory with unpacked sources is further referred to as *F
make DESTDIR=FREEIMAGE_INSTALL_DIR install
5. Clean temporary files
5. Clean the temporary files
make clean
make clean
@subsection dev_guides__building_3rdparty_linux_3_4 OpenCL ICD Loader
@subsection dev_guides__building_3rdparty_linux_3_4 VTK
If you have OpenCL SDK (one provided by Apple, AMD, NVIDIA, Intel, or other
vendor) installed on your system, you should find OpenCL headers and
libraries required for building OCCT inside that SDK.
You can download VTK sources from http://www.vtk.org/VTK/resources/software.html
Alternatively, you can use OpenCL ICD (Installable Client Driver) Loader
provided by Khronos group. The following describes steps used to build OpenCL
ICD Loader version 1.2.11.0.
### The building procedure:
1. Download OpenCL ICD Loader sources archive and OpenCL header files from
Khronos OpenCL Registry
http://www.khronos.org/registry/cl/
Download the necessary archive from http://www.vtk.org/VTK/resources/software.html and unpack it.
2. Unpack the archive and put headers in **inc/CL** sub-folder
1. Install or build *cmake* product from the source file.
2. Start *cmake* in GUI mode with the directory where the source files of *VTK* are located:
3. Print **make** in root of unpacked archive to compile OpenCL libraries.
ccmake VTK_SRC_DIR
4. Create installation folder for OpenCL IDL Loader package and put there:
* Press <i>[c]</i> to make the initial configuration
* Define the necessary options in *VTK_INSTALL_PREFIX*
* Press <i>[c]</i> to make the final configuration
* Press <i>[g]</i> to generate Makefile and exit
1. OpenCL header files in **include/CL** subfolder
3. Start the building of VTK:
make
4. Start the installation of gl2ps. Binaries will be installed according to the *VTK_INSTALL_PREFIX* option.
make install
2. **libOpenCL.so** (generated in **bin** subfolder of source package) in **lib** subfolder
@section dev_guides__building_3rdparty_linux_4 Installation From Official Repositories
@subsection dev_guides__building_3rdparty_linux_4_1 Debian-based distributives
All 3rd-party products required for building of OCCT could be installed
from official repositories. You may install them from console using apt-get utility:
All 3rd-party products required for building of OCCT could be installed
from official repositories. You may install them from console using apt-get utility:
sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libxt-dev libxmu-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libfreeimage-dev libtbb-dev libgl2ps-dev
sudo apt-get install \
tcllib tklib tcl-dev tk-dev \
libfreetype-dev \
libxt-dev libxmu-dev \
libgl1-mesa-dev \
libfreeimage-dev \
libtbb-dev \
libgl2ps-dev
To launch WOK-prebuilt binaries you need install C shell and 32-bit libraries on x86_64 distributives:
sudo apt-get install \
csh \
libstdc++5:i386 libxt6:i386
To launch binaries built with WOK you need to install C shell and 32-bit libraries on x86_64 distributives:
# you may need to add i386 if not done already by command "dpkg --add-architecture i386"
sudo apt-get install csh libstdc++6:i386 libxt6:i386 libxext6:i386 libxmu6:i386
Building is possible with C++ compliant compiler:
sudo apt-get install g++
Any compliant C++ compiler is required for building anyway:
sudo apt-get install \
g++

View File

@@ -1,4 +1,4 @@
 Building 3rd-party libraries on MacOS X {#occt_dev_guides__building_3rdparty_osx}
 Building 3rd-party libraries on MacOS X {#dev_guides__building_3rdparty_osx}
==============================================
@tableofcontents
@@ -13,13 +13,8 @@ http://www.opencascade.org/getocc/require/</a>.
There are two types of third-party products, which are necessary to build OCCT:
* Mandatory products:
* Tcl/Tk 8.5 - 8.6;
* FreeType 2.4.10 - 2.5.3.
* Optional products:
* TBB 3.x - 4.x;
* gl2ps 1.3.5 - 1.3.8;
* FreeImage 3.14.1 - 3.16.0
* Mandatory products: Tcl 8.5, Tk 8.5, FreeType 2.4.10
* Optional products: TBB 3.x or 4.x, gl2ps 1.3.5, FreeImage 3.14.1 or 3.15.x
@section dev_guides__building_3rdparty_osx_2 Building Mandatory Third-party Products
@@ -27,26 +22,35 @@ There are two types of third-party products, which are necessary to build OCCT:
Tcl/Tk is required for DRAW test harness. Version 8.5 or 8.6 can be used with OCCT.
@subsubsection dev_guides__building_3rdparty_osx_2_1_1 Installation from binaries
It is possible to download ready-to-install binaries from
http://www.activestate.com/activetcl/downloads
1. Download the disk image to some TCL_DOWNLOAD_DIR.
2. Open in Finder the directory TCL_DOWNLOAD_DIR.
3. Open disk image and follow instructions.
@subsubsection dev_guides__building_3rdparty_osx_2_1_2 Installation from sources: Tcl 8.5
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
1. Enter the *macosx* sub-directory of the directory where the Tcl source files are located <i>(TCL_SRC_DIR)</i>.
1. Enter the macosx sub-directory of the directory where the source files of Tcl are located (TCL_SRC_DIR).
cd TCL_SRC_DIR/macosx
2. Run the *configure* command
2. Run the configure command
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
For a 64 bit platform also add <i>--enable-64bit</i> option to the command line.
For a 64 bit platform also add --enable-64bit option to the command line.
3. If the *configure* command has finished successfully, start the building process
3. If the configure command has finished successfully, start the building process
make
4. If building is finished successfully, start the installation of Tcl.
All binary and service files of the product will be copied to the directory defined by *TCL_INSTALL_DIR*.
All binary and service files of the product will be copied to the directory defined by TCL_INSTALL_DIR
make install
@@ -54,46 +58,48 @@ Download the necessary archive from http://www.tcl.tk/software/tcltk/download.ht
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
1. Enter the *macosx* sub-directory of the directory where the source files of Tk are located <i>(TK_SRC_DIR)</i>.
1. Enter the macosx sub-directory of the directory where the source files of Tk are located (TK_SRC_DIR).
cd TK_SRC_DIR/macosx
2. Run the *configure* command, where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
2. Run the configure command, where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
For a 64 bit platform also add <i>--enable-64bit</i> option to the command line.
where TCL_LIB_DIR is TCL_INSTALL_DIR/lib. For a 64 bit platform also add --enable-64bit option to the command line.
3. If the *configure* command has finished successfully, start the building process:
3. If the configure command has finished successfully, start the building process
make
4. If the building has finished successfully, start the installation of Tk. All binary and service files of the product will be copied to the directory defined by *TK_INSTALL_DIR* (usually it is TCL_INSTALL_DIR)
4. If building has finished successfully, start the installation of Tk.
All binary and service files of the product will be copied to the directory
defined by TK_INSTALL_DIR (usually TK_INSTALL_DIR is TCL_INSTALL_DIR)
make install
@subsection dev_guides__building_3rdparty_osx_2_2 FreeType 2.4.10
FreeType is required for text display in the 3D viewer.
FreeType is required for display of text in 3D viewer.
Download the necessary archive from http://sourceforge.net/projects/freetype/files/ and unpack it.
1. Enter the directory where the source files of FreeType are located <i>(FREETYPE_SRC_DIR)</i>.
1. Enter the directory where the source files of FreeType are located (FREETYPE_SRC_DIR).
cd FREETYPE_SRC_DIR
2. Run the *configure* command
2. Run the configure command
configure --prefix=FREETYPE_INSTALL_DIR
For a 64 bit platform also add <i>CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'</i> option to the command line.
For a 64 bit platform also add CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC' option to the command line.
3. If the *configure* command has finished successfully, start the building process
3. If the configure command has finished successfully, start the building process
make
4. If building has finished successfully, start the installation of FreeType.
All binary and service files of the product will be copied to the directory defined by *FREETYPE_INSTALL_DIR*.
All binary and service files of the product will be copied to the directory defined by FREETYPE_INSTALL_DIR
make install
@@ -103,7 +109,7 @@ Download the necessary archive from http://sourceforge.net/projects/freetype/fil
This third-party product is installed with binaries from the archive
that can be downloaded from http://threadingbuildingblocks.org/.
Go to the **Download** page, find the release version you need (e.g. *tbb30_018oss*)
Go to \"Downloads / Commercial Aligned Release\", find the release version you need (e.g. tbb30_018oss)
and pick the archive for Mac OS X platform.
To install, unpack the downloaded archive of TBB 3.0 product (*tbb30_018oss_osx.tgz*).
@@ -111,26 +117,26 @@ To install, unpack the downloaded archive of TBB 3.0 product (*tbb30_018oss_osx.
Download the necessary archive from http://geuz.org/gl2ps/ and unpack it.
1. Install or build cmake product from the source file.
1. Install or build cmake product from source file.
2. Start cmake in GUI mode with the directory, where the source files of *fl2ps* are located:
2. Start cmake in GUI mode with the directory where the source files of fl2ps are located
ccmake GL2PS_SRC_DIR
* Press <i>[c]</i> to make the initial configuration;
* Define the necessary options in *CMAKE_INSTALL_PREFIX*;
* Press <i>[c]</i> to make the final configuration;
* Press <i>[g]</i> to generate Makefile and exit.
1. Press [c] to make the initial configuration
2. Define the necessary options CMAKE_INSTALL_PREFIX
3. Press [c] to make the final configuration
4. Press [g] to generate Makefile and exit
or just run the following command:
cmake DCMAKE_INSTALL_PREFIX=GL2PS_INSTALL_DIR DCMAKE_BUILD_TYPE=Release
3. Start the building of gl2ps
3. Start building of gl2ps
make
4. Start the installation of gl2ps. Binaries will be installed according to the *CMAKE_INSTALL_PREFIX* option
4. Start the installation of gl2ps. Binaries will be installed according to the CMAKE_INSTALL_PREFIX option
make install
@@ -138,20 +144,20 @@ Download the necessary archive from http://geuz.org/gl2ps/ and unpack it.
Download the necessary archive from
http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
and unpack it. The directory with unpacked sources is further referred to as *FREEIMAGE_SRC_DIR*.
and unpack it. The directory with unpacked sources is further referred to as FREEIMAGE_SRC_DIR.
Note that for building FreeImage on Mac OS X 10.7 you should replace *Makefile.osx*
in *FREEIMAGE_SRC_DIR* by the corrected file, which you can find in attachment to issue #22811 in OCCT Mantis bug tracker
(http://tracker.dev.opencascade.org/file_download.php?file_id=6937&type=bug).
Note that for building FreeImage on Mac OS X 10.7 you should replace Makefile.osx
in FREEIMAGE_SRC_DIR by corrected one which you can find in attachment to issue #22811 in OCCT Mantis bug tracker
(http://tracker.dev.opencascade.org/file_download.php?file_id=6937&type=bug) or elsewhere.
1. If you build FreeImage 3.15.x you can skip this step.
Modify <i>FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:</i>
1. If you are building FreeImage 3.15.x you can skip this step.
Modify FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:
In line 60 insert the following:
#include string.h
Modify <i>FREEIMAGE_SRC_DIR/Source/FreeImage/PluginTARGA.cpp:</i>
Modify FREEIMAGE_SRC_DIR/Source/FreeImage/PluginTARGA.cpp:
In line 320 replace:
@@ -161,7 +167,7 @@ in *FREEIMAGE_SRC_DIR* by the corrected file, which you can find in attachment t
SwapShort(&value);
2. Enter the directory where the source files of FreeImage are located <i>(FREEIMAGE_SRC_DIR)</i>.
2. Enter the directory where the source files of FreeImage are located (FREEIMAGE_SRC_DIR).
cd FREEIMAGE_SRC_DIR
@@ -171,11 +177,12 @@ in *FREEIMAGE_SRC_DIR* by the corrected file, which you can find in attachment t
4. Run the installation process
1. If you have the permission to write into <i>/usr/local/include</i> and <i>/usr/local/lib</i> directories, run the following command:
1. If you have permissions to write to /usr/local/include and /usr/local/lib directories then run the following command:
make install
2. If you do not have this permission, you need to modify file *FREEIMAGE_SRC_DIR/Makefile.osx*:
2. If you do not have permissions to write to /usr/include and /usr/lib directories
then you need to modify the file FREEIMAGE_SRC_DIR/Makefile.osx:
Change line 49 from:   
@@ -206,6 +213,6 @@ in *FREEIMAGE_SRC_DIR* by the corrected file, which you can find in attachment t
make PREFIX=FREEIMAGE_INSTALL_DIR install
5. Clean temporary files
5. Clean the temporary files
make clean

View File

@@ -1,25 +1,27 @@
 Building 3rd-party libraries on Windows {#occt_dev_guides__building_3rdparty_windows}
 Building 3rd-party libraries on Windows {#dev_guides__building_3rdparty_windows}
==============================================
@tableofcontents
@section dev_guides__building_3rdparty_win_1 Introduction
This document presents guidelines for building third-party products used by Open CASCADE Technology (OCCT) and samples on Windows platform. It is assumed that you are already familiar with MS Visual Studio / Visual C++.
This document presents guidelines for building third-party products
used by Open CASCADE Technology (OCCT) and samples on Windows platform.
You need to use the same version of MS Visual Studio for building all third-party products and OCCT itself, in order to receive a consistent set of run-time binaries.
This guide assumfamiliar with MS Visual Studio / Visual C++.
The links for downloading the third-party products are available on the web site of OPEN CASCADE SAS at http://www.opencascade.org/getocc/require/. There are two types of third-party products used by OCCT:
You need to use the same version of MS Visual Studio for building
all third-party products and OCCT itself, in order to receive a consistent set of run-time binaries.
* Mandatory products:
* Tcl/Tk 8.5 - 8.6;
* FreeType 2.4.10 - 2.5.3.
* Optional products:
* TBB 3.x - 4.x;
* gl2ps 1.3.5 - 1.3.8;
* FreeImage 3.14.1 -3.16.0;
* VTK 6.1.0.
The links for downloading the third-party products are available on the web site
of OPEN CASCADE SAS at http://www.opencascade.org/getocc/require/.
There are two types of third-party products which are used by OCCT:
It is recommended to create a separate new folder on your workstation, where you will unpack the downloaded archives of the third-party products, and where you will build these products (for example, *c:\\occ3rdparty*).
* Mandatory products: Tcl/Tk 8.5 - 8.6 and  FreeType 2.4.10 - 2.4.11
* Optional products: TBB 3.x - 4.x, gl2ps 1.3.5 - 1.3.8, FreeImage 3.14.1 -3.15.4
It is recommended to create a separate new folder on your workstation where
you will unpack the downloaded archives of the third-party products,
and where you will build these products (for example, *c:\\occ3rdparty*).
Further in this document, this folder is referred to as *3rdparty*.
@@ -27,88 +29,39 @@ Further in this document, this folder is referred to as *3rdparty*.
@subsection dev_guides__building_3rdparty_win_2_1 Tcl/Tk
Tcl/Tk is required for DRAW test harness.
Tcl/Tk is required for DRAW test harness.We recommend installing a binary distribution that could
be downloaded from http://www.activestate.com/activetcl.
@subsubsection dev_guides__building_3rdparty_win_2_1_1 Installation from sources: Tcl
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
1. In the *win* sub-directory, edit file *buildall.vc.bat*:
Go to \"Free Downloads\" and pick the version of the Install Wizard
that matches your target platform 32 bit (x86) or 64 bit (x64).
The version of Visual Studio you use is irrelevant when choosing the Install Wizard.
* Edit the line "call ... vcvars32.bat" to have correct path to the version of Visual Studio to be used for building, for instance:
Run the Install Wizard you downloaded, and install Tcl/Tk products
call "%VS80COMNTOOLS%\vsvars32.bat"
* to 3rdparty\\tcltk-win32 folder (for 32-bit platform) or
* to 3rdparty\\tcltk-win64 folder (for 64-bit platform).
If you are building 64-bit version, set environment accordingly, e.g.:
call "%VS80COMNTOOLS%\..\..\VC\vcvarsall.bat" amd64
* Define variable *INSTALLDIR* pointing to directory where Tcl/Tk will be installed, e.g.:
set INSTALLDIR=D:\OCCT\3rdparty\tcltk-86-32
* Add option *install* to the first command line calling *nmake*:
nmake -nologo -f makefile.vc release htmlhelp install %1
* Remove second call to *nmake* (building statically linked executable)
2. Edit file *rules.vc* replacing line
SUFX = tsgx
by
SUFX = sgx
This is to avoid extra prefix 't' in the library name, which is not recognized by default by OCCT build tools.
3. By default, Tcl uses dynamic version of run-time library (MSVCRT), which must be installed on the system where Tcl will be used.
You may wish to link Tcl library with static version of run-time to avoid this dependency.
For that:
* Edit file *makefile.vc* replacing strings "crt = -MD" by "crt = -MT"
* Edit source file *tclMain.c* (located in folder *generic*) commenting out forward declaration of function *isatty()*.
4. In the command prompt, run *buildall.vc.bat*
You might need to run this script twice to have *tclsh* executable installed; check subfolder *bin* of specified installation path to verify this.
5. For convenience of use, we recommend making a copy of *tclsh* executable created in subfolder *bin* of *INSTALLDIR* and named with Tcl version number suffix, as *tclsh.exe* (with no suffix)
> cd D:\OCCT\3rdparty\tcltk-86-32\bin
> cp tclsh86.exe tclsh.exe
@subsubsection dev_guides__building_3rdparty_win_2_1_2 Installation from sources: Tk
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
Apply the same steps as described for building Tcl above, with the same INSTALLDIR.
Note that Tk produces its own executable, called *wish*.
You might need to edit default value of *TCLDIR* variable defined in *buildall.vc.bat* (should be not necessary if you unpack both Tcl and Tk sources in the same folder).
Further in this document, this folder is referred to as *tcltk*.
@subsection dev_guides__building_3rdparty_win_2_2 FreeType
FreeType is required for text display in a 3D viewer. You can download its sources from http://sourceforge.net/projects/freetype/files/
FreeType is required for display of text in 3D viewer.
You can download its sources from http://sourceforge.net/projects/freetype/files/
### The building procedure
The building process is the following:
1. Unpack the downloaded archive of FreeType product into the *3rdparty* folder. As a result, you will get a folder named, for example, *3rdparty\\freetype-2.4.10*. Further in this document, this folder is referred to as *freetype*.
2. Open the solution file *freetype\\builds\\win32\\vc20xx\\freetype.sln* in Visual Studio. Here *vc20xx* stands for your version of Visual Studio.
1. Unpack the downloaded archive of FreeType product into the *3rdparty* folder.
3. Select the configuration to build: either Debug or Release.
As a result, you should have a folder named for example, *3rdparty\\freetype-2.4.10*. Further in this document, this folder is referred to as *freetype*.
2. Open the solution file *freetype\\builds\\win32\\vc20xx\\freetype.sln* in Visual Studio, where vc20xx stands for the version of Visual Studio you are using.
3. Select a configuration to build: either Debug or Release.
4. Build the *freetype* project.
As a result, you will get a freetype import library (.lib) in the *freetype\\obj\\win32\\vc20xx* folder.
As a result, you will get a freetype import library (.lib) in the *freetype\\obj\\win32\\vc20xx* folder.
5. If you build FreeType for a 64 bit platform, select in the main menu **Build - Configuration Manager** and add *x64* platform to the solution configuration by copying the settings from Win32 platform:
5. If you are building for 64 bit platform, start the Configuration Manager (Build - Configuration Manager),
and add *x64* platform to the solution configuration by copying the settings from Win32 platform:
@image html /dev_guides/building/3rdparty/images/3rdparty_image001.png
@image latex /dev_guides/building/3rdparty/images/3rdparty_image001.png
@@ -120,59 +73,63 @@ FreeType is required for text display in a 3D viewer. You can download its sourc
Build the *freetype* project.
As a result, you will obtain a 64 bit import library (.lib) file in the *freetype\\x64\\vc20xx* folder.
As a result, you should obtain a 64 bit import library (.lib) file in the *freetype\\x64\\vc20xx* folder.
To build FreeType as a dynamic library (.dll) follow steps 6, 7 and 8 of this procedure.
If you want to build freetype as a dynamic library (.dll) follow items 6, 7 and 8 of this list.
6. Open menu Project-> Properties-> Configuration Properties-> General and change option **Configuration Type** to *Dynamic Library (.dll)*.
6. Open Project-Properties-Configuration Properties-General and change option 'Configuration Type' to \"*Dynamic Library (.dll)*\".
7. Edit file *freetype\\include\\freetype\\config\\ftoption.h*:
in line 255, uncomment the definition of macro *FT_EXPORT* and change it as follows:
in line 255, uncomment the definition of macro FT_EXPORT and change it as follows:
#define FT_EXPORT(x) __declspec(dllexport) x
8. Build the *freetype* project.
As a result, you will obtain the files of the import library (.lib) and the dynamic library (.dll) in folders <i>freetype \\objs\\release</i> or <i>\\objs\\debug </i>.
If you build for a 64 bit platform, follow step 5 of the procedure.
As a result, you should obtain import library (.lib) and dynamic library (.dll)
files in *freetype \\objs\\release or \\objs\\debug folders.*
If you are building for a 64 bit platform, follow item 5 of this list.
To facilitate the use of FreeType libraries in OCCT with minimal adjustment of build procedures, it is recommended to copy the include files and libraries of FreeType into a separate folder, named according to the pattern: *freetype-compiler-bitness-building mode*, where:
* **compiler** is *vc8* or *vc9* or *vc10* or *vc11*;
* **bitness** is *32* or *64*;
* **building mode** is *opt* (for Release) or *deb* (for Debug).
In order to facilitate use of the FreeType libraries in OCCT with minimal adjustment of its build procedures,
it is recommended to copy the include files and libraries of FreeType to a separate folder, named according to the pattern:
*freetype-compiler-bitness-building mode*
where
The *include* subfolder should be copied as is, while libraries should be renamed to *freetype.lib* and *freetype.dll* (suffixes removed) and placed to subdirectories *lib *and *bin*, respectively. If the Debug configuration is built, the Debug libraries should be put into subdirectories *libd* and *bind*.
* compiler is vc8 or vc9 or vc10 or vc11;
* bitness is 32 or 64;
* building mode is opt (for Release) or deb (for Debug)
The include subfolder should be copied as is, while libraries should be renamed to
*freetype.lib* and *freetype.dll* (suffixes removed) and placed to subdirectories
*lib *and *bin*, respectively. If Debug configuration is built,
the Debug libraries should be put in subdirectories *libd* and *bind*.
@section dev_guides__building_3rdparty_win_3 Building Optional Third-party Products
@subsection dev_guides__building_3rdparty_win_3_1 TBB
This third-party product is installed with binaries
This third-party product is installed with binaries
from the archive that can be downloaded from http://threadingbuildingblocks.org/.
Go to the **Download** page, find the release version you need (e.g. *tbb30_018oss*) and pick the archive for Windows platform.
Go to \"Downloads page\", find the release version you need (e.g. tbb30_018oss) and pick the archive for Windows platform.
Unpack the downloaded archive of TBB product into the *3rdparty* folder.
Further in this document, this folder is referred to as *tbb*.
@subsection dev_guides__building_3rdparty_win_3_2 gl2ps
This third-party product should be built as a dynamically loadable library (dll file).
You can download its sources from http://geuz.org/gl2ps/src/.
You can download its sources from http://geuz.org/gl2ps/src/
### The building procedure
The building process is the following:
1. Unpack the downloaded archive of gl2ps product (e.g. *gl2ps-1.3.5.tgz*) into the *3rdparty* folder.
As a result, you will get a folder named, for example, *3rdparty\\gl2ps-1.3.5-source*.
As a result, you should have a folder named for example, *3rdparty\\gl2ps-1.3.5-source*.
Rename it into <i>gl2ps-platform-compiler-building mode</i>, where
* **platform** is *win32* or *win64*;
* **compiler** is *vc8*, *vc9* or *vc10*;
* **building mode** - *opt* (for release) or *deb* (for debug).
For example, <i>gl2ps-win64-vc10-deb</i>
Rename it according to the rule: gl2ps-platform-compiler-building mode, where
* platform is win32 or win64;
* compiler is vc8 or vc9 or vc10;
* building mode - opt (for release) or deb (for debug)
Further in this document, this folder is referred to as *gl2ps*.
@@ -181,7 +138,7 @@ You can download its sources from http://geuz.org/gl2ps/src/.
3. Edit the file *gl2ps\\CMakeLists.txt*.
After line 113 in *CMakeLists.txt*:
After line 113 in CMakeLists.txt:
set_target_properties(shared PROPERTIES COMPILE_FLAGS \"-DGL2PSDLL -DGL2PSDLL_EXPORTS\")
@@ -189,9 +146,10 @@ You can download its sources from http://geuz.org/gl2ps/src/.
add_definitions(-D_USE_MATH_DEFINES)
Attention: If Cygwin was installed on your computer, make sure that there is no path to it in the *PATH* variable to avoid possible conflicts during the configuration.
Attention: If cygwin was installed on your computer make sure that there is no path
to the latter in the PATH variable in order to avoid possible conflicts during the configuration.
4. Launch CMake <i>(cmake-gui.exe)</i> using the Program menu.
4. Launch CMake (cmake-gui.exe) using the Program menu.
In CMake:
@@ -203,41 +161,39 @@ You can download its sources from http://geuz.org/gl2ps/src/.
(for example, *gl2ps\\bin*).
Further in this document, this folder is referred to as *gl2ps_bin*.
* Press **Configure** button.
* Press the \"Configure\" button.
@image html /dev_guides/building/3rdparty/images/3rdparty_image004.png
@image latex /dev_guides/building/3rdparty/images/3rdparty_image004.png
* Select the generator (the compiler and the target platform - 32 or 64 bit) in the pop-up window.
@image html /dev_guides/building/3rdparty/images/3rdparty_image005.png
@image latex /dev_guides/building/3rdparty/images/3rdparty_image005.png
* Press **Finish** button to return to the main CMake window.
* Then press the \"Finish\" button to return to the main CMake window.
Expand the ENABLE group and uncheck ENABLE_PNG and ENABLE_ZLIB check boxes.
@image html /dev_guides/building/3rdparty/images/3rdparty_image006.png
@image latex /dev_guides/building/3rdparty/images/3rdparty_image006.png
* Expand the CMAKE group and define *CMAKE_INSTALL_PREFIX* which is the path where you want to install the build results, for example, *c:\\occ3rdparty\\gl2ps-1.3.5*.
* Expand the CMAKE group and define CMAKE_INSTALL_PREFIX
(path where you want to install the build results, for example, *c:\\occ3rdparty\\gl2ps-1.3.5*).
@image html /dev_guides/building/3rdparty/images/3rdparty_image007.png
@image latex /dev_guides/building/3rdparty/images/3rdparty_image007.png
* Press **Configure** button again, then press **Generate** button to generate Visual Studio projects. After completion, close CMake application.
* Press the \"Configure\" button again, and then the \"Generate\" button in order to generate
Visual Studio projects. After completion, close CMake application.
5. Open the solution file *gl2ps_bin\\gl2ps.sln* in Visual Studio.
* Select a configuration to build
* Choose **Release** to build Release binaries.
* Choose **Debug** to build Debug binaries.
* Select a platform to build.
* Choose **Win32** to build for a 32 bit platform.
* Choose **x64** to build for a 64 bit platform.
* Select a configuration to build
* Choose \"*Release*\" if you are building Release binaries.
* Choose \"*Debug*\" if you are building Debug binaries.
* Select a platform to build.
* Choose \"*Win32*\" if you are building for a 32 bit platform.
* Choose \"*x64*\" if you are building for a 64 bit platform.
* Build the solution.
* Build the *INSTALL* project.
As a result, you should have the installed gl2ps product in the *CMAKE_INSTALL_PREFIX* path.
As a result, you should have the installed gl2ps product in the *CMAKE_INSTALL_PREFIX* path.
@subsection dev_guides__building_3rdparty_win_3_3 FreeImage
@@ -245,87 +201,111 @@ This third-party product should be built as a dynamically loadable library (.dll
You can download its sources from
http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
### The building procedure:
The building process is the following:
1. Unpack the downloaded archive of FreeImage product into *3rdparty* folder.
As a result, you should have a folder named *3rdparty\\FreeImage*.
As a result, you should have a folder named *3rdparty\\FreeImage*.
Rename it according to the rule: *freeimage-platform-compiler-building mode*, where
Rename it according to the rule: freeimage-platform-compiler-building mode, where
* **platform** is *win32* or *win64*;
* **compiler** is *vc8* or *vc9* or *vc10* or *vc11*;
* **building mode** is *opt* (for release) or *deb* (for debug)
* platform is win32 or win64;
* compiler is vc8 or vc9 or vc10 or vc11;
* building mode is opt (for release) or deb (for debug)
Further in this document, this folder is referred to as *freeimage*.
2. Open the solution file *freeimage\\FreeImage.*.sln* in your Visual Studio.
2. Open the solution file *freeimage\\FreeImage.*.sln* in Visual Studio that corresponds to the version of Visual Studio you use.
If you use a Visual Studio version higher than VC++ 2008, apply conversion of the workspace.
Since the version of Visual Studio you use is higher than VC++ 2008, apply conversion of the workspace.
Such conversion should be suggested automatically by Visual Studio.
3. Select a configuration to build.
- Choose **Release** if you are building Release binaries.
- Choose **Debug** if you are building Debug binaries.
- Choose \" *Release* \" if you are building Release binaries.
- Choose \" *Debug* \" if you are building Debug binaries.
*Note:*
If you want to build a debug version of FreeImage binaries then you need to rename the following files in FreeImage and FreeimagePlus projects:
Project -> Properties -> Configuration Properties -> Linker -> General -> Output File
If you want to build a debug version of FreeImage binaries then you must rename
the following files for projects FreeImage and FreeimagePlus:
FreeImage*d*.dll to FreeImage.dll
FreeImagePlus*d*.dll to FreeImagePlus.dll
Project-Properties-Configuration Properties-Linker-General-Output File
Project -> Properties -> Configuration Properties -> Linker -> Debugging-> Generate Program Database File
from FreeImage*d*.dll to FreeImage.dll
from FreeImagePlus*d*.dll to FreeImagePlus.dll
FreeImage*d*.pdb to FreeImage.pdb
FreeImagePlus*d*.pdb to FreeImagePlus.pdb
Project-Properties-Configuration Properties-Linker-Debugging-Generate Program Database File
Project -> Properties -> Configuration Properties -> Linker -> Advanced-Import Library
from FreeImage*d*.pdb to FreeImage.pdb
from FreeImagePlus*d*.pdb to FreeImagePlus.pdb
FreeImage*d*.lib to FreeImage.lib
FreeImagePlus*d*.lib to FreeImagePlus.lib
Project-Properties-Configuration Properties-Linker-Advanced-Import Library
Project -> Properties -> Configuration Properties -> Build Events -> Post -> Build Event -> Command Line
from FreeImage*d*.lib to FreeImage.lib
from FreeImagePlus*d*.lib to FreeImagePlus.lib
FreeImage*d*.dll to FreeImage.dll
FreeImage*d*.lib to FreeImage.lib
FreeImagePlus*d*.dll to FreeImagePlus.dll
FreeImagePlus*d*.lib to FreeImagePlus.lib
Project-Properties-Configuration Properties-Build Events-Post-Build Event-Comand Line
Additionally, rename in project FreeImagePlus
Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies
from FreeImage*d*.dll to FreeImage.dll
from FreeImage*d*.lib to FreeImage.lib
from FreeImagePlus*d*.dll to FreeImagePlus.dll
from FreeImagePlus*d*.lib to FreeImagePlus.lib
Additionally, for project FreeImagePlus rename:
Project-Properties-Configuration Properties-Linker-Input-Additional Dependencies
from FreeImage*d*.lib to FreeImage.lib
4. Select a platform to build.
- Choose *Win32* if you are building for a 32 bit platform.
- Choose *x64* if you are building for a 64 bit platform.
- Choose \" *Win32* \" if you are building for a 32 bit platform.
- Choose \" *x64* \" if you are building for a 64 bit platform.
5. Start the building process.
As a result, you should have the library files of FreeImage product in *freeimage\\Dist* folder (*FreeImage.dll* and *FreeImage.lib*) and in *freeimage\\Wrapper\\FreeImagePlus\\dist* folder (*FreeImagePlus.dll* and *FreeImagePlus.lib*).
As a result, you should have the library files of FreeImage product in the
*freeimage\\Dist* folder (FreeImage.dll and FreeImage.lib files) and in the
*freeimage\\Wrapper\\FreeImagePlus\\dist* folder (FreeImagePlus.dll and
FreeImagePlus.lib files).
@subsection dev_guides__building_3rdparty_win_3_4 VTK
@subsection dev_guides__building_3rdparty_win_opencl OpenCL ICD Loader
VTK is an open-source, freely available software system for 3D computer graphics, image processing and visualization. VTK Integration Services component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library.
If you have OpenCL SDK (one provided by Apple, AMD, NVIDIA, Intel, or other
vendor) installed on your system, you should find OpenCL headers and
libraries required for building OCCT inside that SDK.
### The building procedure:
Alternatively, you can use OpenCL ICD (Installable Client Driver) Loader
provided by Khronos group. The following describes steps used to build OpenCL
ICD Loader version 1.2.11.0.
1. Download the necessary archive from http://www.vtk.org/VTK/resources/software.html and unpack it into *3rdparty* folder.
1. Download OpenCL ICD Loader sources archive and OpenCL header files from
Khronos OpenCL Registry
http://www.khronos.org/registry/cl/
As a result, you will get a folder named, for example, <i>3rdparty\VTK-6.1.0.</i>
2. Unpack the archive and put headers in **inc/CL** sub-folder
Further in this document, this folder is referred to as *VTK*.
3. Use CMake to generate VS projects for building the library:
- Start CMake-GUI and select OpenCL ICD Loader folder as source path,
and the folder of your choice for VS project and intermediate build data
- Click Generate
- Select VS version to be used (among the one you have installed; we
recommend using VS 2010), and architecture (32- or 64-bit)
2. Use CMake to generate VS projects for building the library:
- Start CMake-GUI and select VTK folder as source path, and the folder of your choice for VS project and intermediate build data.
- Click **Configure**.
- Select the VS version to be used from the ones you have installed (we recommend using VS 2010) and the architecture (32 or 64-bit).
- Generate VS projects with default CMake options. The open solution *VTK.sln* will be generated in the build folder.
4. Open solution **OPENCL_ICD_LOADER.sln** generated in the build folder.
Though not strictly necessary, we recommend making two changes in generated
projects:
- Add file **OpenCL.rc** to project OpenCL, to have version and Khronos
copyright correctly embedded in DLL
- In properties of OpenCL project, on "C/C++ / Code Generation" page,
for Release configuration, change "Runtime library" to "Multi-threaded
(/MT)", to avoid dependency on run-time DLL.
5. Build project OpenCL in Release mode
3. Build project VTK in Release mode.
6. Create installation folder for OpenCL IDL Loader package and put there:
- OpenCL header files in **include/CL** subfolder
- OpenCL.dll (generated in **bin/Release** subfolder of source package)
in **bin** subfolder
- OpenCL.lib (generated in **Release** subfolder of build directory)
in **lib** subfolder

View File

@@ -1,71 +0,0 @@
Building with CMake and ADT for Android {#occt_dev_guides__building_android}
===================
@tableofcontents
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
## Generation of eclipse project files
Run GUI tool provided by CMake: cmake-gui
### Tools configuration
- Specify the root folder of OCCT (<i>$CASROOT</i>, which contains *CMakelists.txt* file) by clicking **Browse Source**.
- Specify the location (build folder) for Cmake generated project files by clicking **Browse Build**.
@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. -
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 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}
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 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
How to configure OCCT, see "OCCT Configuration" section of @ref occt_dev_guides__building_cmake "Building with CMake"
taking into account the specific configuration variables for android:
- ANDROID_ABI = armeabi-v7a
- ANDROID_NATIVE_API_LEVEL = 15
- 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 eclipse projects files
Click **Generate** button and wait until the generation process is finished.
Then the eclipse project files will appear in the build folder (e.g. <i> D:/android-build-eclipse-api-15 </i>).
## Building eclipse project files of OCCT
- 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: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -1,72 +1,71 @@
Building with Automake {#occt_dev_guides__building_automake}
Building with Automake {#dev_guides__building__automake}
======================
This file describes steps to build OCCT libraries from a complete source
archive on Linux with **Autotools** GNU build system.
This file describes steps to build OCCT libraries from complete source
archive on Linux with GNU build system (Autotools).
If you build OCCT from bare sources (as in Git repository), or do some
If you are building OCCT from bare sources (as in Git repository), or do some
changes affecting CDL files, you need to use WOK to re-generate header files
and build scripts / projects. See paragraph 1 \ref occt_dev_guides__building_wok for instructions.
and build scripts / projects. See paragraph 1 \ref dev_guides__building__wok for instructions.
Before building OCCT, you need to install the required third-party libraries; see paragraph 1 of
\ref occt_dev_guides__building for instructions.
Before building OCCT, you need to install required third-party libraries; see paragraph 1 of
\ref dev_guides__building for instructions.
Note that during compilation by makefiles on Linux station with
Note that during compilation by makefiles on some Linux OS on a station with
NVIDIA video card you may experience problems because the installation
procedure of NVIDIA video driver removes library *libGL.so* included in package
*libMesaGL* from directory <i>/usr/X11R6/lib</i> and places this library *libGL.so* in
directory <i>/usr/lib</i>. However, *libtool* expects to find the library in directory
<i>/usr/X11R6/lib</i>, which causes compilation crash (See <i>/usr/X11R6/lib/libGLU.la </i>).
procedure of NVIDIA video driver removes library libGL.so included in package
libMesaGL from directory /usr/X11R6/lib and places this library libGL.so in
directory /usr/lib. However, libtool expects to find the library in directory
/usr/X11R6/lib, which causes compilation crash (See /usr/X11R6/lib/libGLU.la).
To prevent this, it is suggested to make links:
To prevent this, suggest making links:
ln -s /usr/lib/libGL.so /usr/X11R6/lib/libGL.so
ln -s /usr/lib/libGL.la /usr/X11R6/lib/libGL.la
ln -s /usr/lib/libGL.so /usr/X11R6/lib/libGL.so
ln -s /usr/lib/libGL.la /usr/X11R6/lib/libGL.la
1.In OCCT root folder, launch build_configure script
This will generate files configure and Makefile.in for your system.
1.In OCCT root folder, launch *build_configure* script to generate files *configure* and *Makefile.in* for your system.
2.Go to the directory where OCCT will be built, and run configure to generate
makefiles.
2.Go to the directory, where OCCT will be built, and run *configure* to generate makefiles.
$CASROOT/configure \<FLAGS\>
$CASROOT/configure \<FLAGS\>
Where <i> \<FLAGS\> </i> is a set of options.
Where \<FLAGS\> is a set of options.
The following flags are mandatory:
* <i> --with-tcl= </i> defines the location of *tclConfig.sh*;
* <i> --with-tk= </i> defines location of *tkConfig.sh*;
* <i> --with-freetype= </i> defines location of installed **FreeType** product
* <i> --prefix= </i> defines the location for installation of OCCT binaries
* --with-tcl= defines location of tclConfig.sh
* --with-tk= defines location of tkConfig.sh
* --with-freetype= defines location of installed FreeType product
* --prefix= defines location for the installation of OCCT binaries
Additional flags:
* <i> --with-gl2ps= </i> defines the location of installed **gl2ps** product;
* <i> --with-freeimage= </i> defines the location of installed **FreeImage** product;
* <i> --with-tbb-include= </i> defines the location of *tbb.h*;
* <i> --with-tbb-library= </i> defines the location of *libtbb.so*;
* <i> --with-vtk-include= </i> defines the location of VTK includes;
* <i> --with-vtk-library= </i> defines the location of VTK libraries;
* <i> --enable-debug= yes: </i> includes debug information, no: does not include debug information;
* <i> --enable-production= yes: </i> switches code optimization, no: switches off code optimization;
* <i> --disable-draw </i> allows OCCT building without Draw.
* --with-gl2ps= defines location of installed gl2ps product
* --with-freeimage= defines location of installed FreeImage product
* --with-tbb-include= defines location of tbb.h
* --with-tbb-library= defines location of libtbb.so
* --with-opencl-include= defines location of cl.h
* --with-opencl-library= defines location of libOpenCL.so
* --enable-debug= yes: includes debug information, no: does not include debug information
* --enable-production= yes: switches code optimization, no: switches off code optimization
* --disable-draw - allows OCCT building without Draw.
If location of **FreeImage, TBB, gl2ps** or **VTK** is not specified, OCCT will be built without these optional libraries.
If location of FreeImage, TBB, gl2ps or OpenCL is not specified, OCCT will be
built without these optional libraries.
Attention: 64-bit platforms are detected automatically.
Attention: 64-bit platforms are detected automatically.
Example:
Example:
\> ./configure -prefix=/PRODUCTS/occt-6.5.5 --with-tcl=/PRODUCTS/tcltk-8.5.8/lib --with-tk=/PRODUCTS/tcltk-8.5.8/lib --with-freetype=/PRODUCTS/freetype-2.4.10 --with-gl2ps=/PRODUCTS/gl2ps-1.3.5 --with-freeimage=/PRODUCTS/freeimage-3.14.1 --with-tbb-include=/PRODUCTS/tbb30_018oss/include --with-tbb-library=/PRODUCTS/tbb30_018oss/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21 -with-vtk-include=/PRODUCTS/VTK-6.1.0/include/vtk-6.1 with-vtk-library=/PRODUCTS/ /VTK-6.1.0//lib
> ./configure -prefix=/PRODUCTS/occt-6.5.5 --with-tcl=/PRODUCTS/tcltk-8.5.8/lib --with-tk=/PRODUCTS/tcltk-8.5.8/lib --with-freetype=/PRODUCTS/freetype-2.4.10 --with-gl2ps=/PRODUCTS/gl2ps-1.3.5 --with-freeimage=/PRODUCTS/freeimage-3.14.1 --with-tbb-include=/PRODUCTS/tbb30_018oss/include --with-tbb-library=/PRODUCTS/tbb30_018oss/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21 --with-opencl-include=/PRODUCTS/opencl-icd-1.2.11.0/include --with-opencl-library=/PRODUCTS/opencl-icd-1.2.11.0/lib
3.If configure exits successfully, you can build OCCT with make command.
3.If configure exits successfully, you can build OCCT with *make* command.
> make -j8 install
\> make -j8 install
To start DRAW, launch
4.To start *DRAW*, launch
\> draw.sh
> draw.sh

View File

@@ -1,4 +1,4 @@
Building OCCT from sources {#occt_dev_guides__building}
Building OCCT from sources {#dev_guides__building}
=========
In order to build OCCT libraries from these sources for use in your program,
@@ -9,24 +9,24 @@ you need to:
See the following documents for short guide to installation of
third-party libraries on different platforms:
- \subpage occt_dev_guides__building_3rdparty_windows
- \subpage occt_dev_guides__building_3rdparty_linux
- \subpage occt_dev_guides__building_3rdparty_osx
- \subpage dev_guides__building_3rdparty_windows
- \subpage dev_guides__building_3rdparty_linux
- \subpage dev_guides__building_3rdparty_osx
2. If you use bare OCCT sources from Git repository or made some changes affecting
CDL files or dependencies of OCCT toolkits, you need to update header files generated
from \ref occt_dev_guides__cdl "CDL", and regenerate build scripts for your environment using WOK.
See \subpage occt_dev_guides__building_wok for details.
from \ref dev_guides__cdl "CDL", and regenerate build scripts for your environment using WOK.
See \subpage dev_guides__building__wok for details.
Skip to step 3 if you use complete source package (e.g. official OCCT
release) without changes in CDL.
3. 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 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"
- \subpage dev_guides__building__automake "Building on Linux with Autotools"
- \subpage dev_guides__building__cmake "Building with CMake (cross-platform)"
- \subpage dev_guides__building__code_blocks "Building on Mac OS X with Code::Blocks"
- \subpage dev_guides__building__msvc "Building on Windows with MS Visual Studio"
- \subpage dev_guides__building__xcode "Building on Mac OS X with Xcode"
The current version of OCCT can be consulted in the file src/Standard/Standard_Version.hxx

View File

@@ -1,231 +1,232 @@
Building with CMake {#occt_dev_guides__building_cmake}
Building with CMake {#dev_guides__building__cmake}
===================
@tableofcontents
This file describes the steps to build OCCT libraries from a complete source package
with **CMake**. CMake is free software that can create GNU Makefiles, KDevelop,
XCode, Eclipse and Visual Studio project files. **CMake** version 3.0 or above is
This file describes steps to build OCCT libraries from complete source package
with CMake. CMake is free software that can create GNU Makefiles, KDevelop,
XCode, and Visual Studio project files. Version 2.6 or above of CMake is
required.
If you build OCCT from bare sources (as in Git repository) or make some
If you are building OCCT from bare sources (as in Git repository), or do some
changes affecting CDL files, you need to use WOK to re-generate header files
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
Before building OCCT, you need to install the required third-party libraries; see the
instructions for your platform in @ref occt_dev_guides__building.
Before building OCCT, you need to install required third-party libraries; see
instructions for your platform in @ref dev_guides__building.
## Define the location of build and install directories.
## Decide on location of build and install directories.
The build directory is where intermediate files (projects / makefiles, objects, binaries) will be created. Each built configuration should have its own build directory.
The build directory is the one where intermediate files will be created (projects / makefiles, objects, binaries).
The install directory is the one where binaries will be installed after build,
along with header files and resources required for OCCT use in applications.
The install directory is where binaries will be installed after build, along with header files and resources required for OCCT use in applications.
It is possible to install several configurations of OCCT (differentiated by platform, bitness, compiler, and build type) into the same directory.
OCCT CMake scripts assume use of separate build and one install directories
for each configuration (Debug or Release).
It is recommended to separate build and install directories from OCCT source directory, for example:
/user/home/occt/ - sources
/user/home/tmp/occt-build-vc10-x64-release - intermediate files
/user/home/occt-install - installed binaries
/user/home/occt/ - sources
/user/home/tmp/occt-build-release - intermediate files (release)
/user/home/occt-install-release - installed binaries (release)
## CMake usage
Run CMake indicating the path to OCCT sources <i>($CASROOT)</i> and selected build directory.
Run CMake indicating path to OCCT sources ($CASROOT; in previous example
CASROOT equal to /user/home/occt in lin case, and d:/occt in windows case)
and selected build directory (in prev example build directory is
/user/home/tmp/occt-build-release).
It is recommended to use GUI tools provided by CMake: *cmake-gui* on Windows, Mac and Linux (*ccmake* also can be used on Linux).
It is recommended to use GUI tools provided by CMake: cmake-gui on Windows
and Mac, ccmake on Linux.
### Windows:
Specify the root folder of OCCT (<i>$CASROOT</i>, which contains *CMakelists.txt* file) by clicking **Browse Source**.
@image html /dev_guides/building/cmake/images/cmake_image001.png
@image latex /dev_guides/building/cmake/images/cmake_image001.png
@figure{/dev_guides/building/cmake/images/cmake_image001.png}
* Specify "main" CMakelists.txt meta-project location by clicking Browse Source (e.g., $CASROOT)
* Specify location (build folder) for Cmake generated project files by clicking Browse Build (e.g., d:/occt/build/win32-vc9-debug) (each cmake configuration of the project uses a specific build directory and a specific directory for installed files. It is recommended to compose names of the binary and install directory from system, bitness, compiler and build type.)
* Configure opens the window with a drop-down list of generators supported by CMake project. Select the required generator (e.g., Visual Studio 2008) and click Finish)
Specify the location (build folder) for Cmake generated project files by clicking **Browse Build**.
@image html /dev_guides/building/cmake/images/cmake_image002.png
@image latex /dev_guides/building/cmake/images/cmake_image002.png
Each configuration of the project should be built in its own directory. When building multiple configurations it is recommended to indicate in the name of build directories the system, bitness, compiler, and build type (e.g., <i>d:/occt/build/win32-vc9-debug</i> ).
### Linux:
**Configure** opens the window with a drop-down list of generators supported by CMake project. Select the required generator (e.g., Visual Studio 2008) and click **Finish**.
@figure{/dev_guides/building/cmake/images/cmake_image002.png}
### Linux (ccmake variant):
In the console, change to the build directory and call *ccmake* with the path to the source directory of the project:
In the console, change to the build directory and call ccmake with the path to the source directory of the project:
> cd ~/occt/build/debug
> ccmake ~/occt
@figure{/dev_guides/building/cmake/images/cmake_image003.png}
@image html /dev_guides/building/cmake/images/cmake_image003.png
@image latex /dev_guides/building/cmake/images/cmake_image003.png
Press *c* to configure.
*cmake-gui* is used in the same way as described above for Windows.
Press "c" to configure.
### Mac OS:
Use *cmake-gui* **Applications -> CMake 2.8-10.app** to generate project files for the chosen build environment (e.g., XCode).
Use cmake-gui (Applications -> CMake 2.8-10.app) to generate project files for the chosen build environment (e.g., XCode).
@figure{/dev_guides/building/cmake/images/cmake_image004.png}
@image html /dev_guides/building/cmake/images/cmake_image004.png
@image latex /dev_guides/building/cmake/images/cmake_image004.png
## OCCT Configuration
The error message, which appears at the end of configuration process, informs you about the required variables,
The error message which appears at the end of configuration process, informs you about the required variables
which need to be defined. This error will appear until all required variables are defined correctly.
Note: In cmake-gui there is "grouped" option, which groups variables with a common prefix.
Note: In *cmake-gui* there is "grouped" option, which groups variables with a common prefix.
### Selection of components to be built
### Selection of the components to be built
The variables with <i>BUILD_</i> prefix allow specifying OCCT components and
The variables with "BUILD_" prefix allow specifying OCCT components and
configuration to be built:
* *BUILD_CONFIGURATION* - defines configuration to be built (Release by default).
* <i>BUILD_<MODULE></i> - specifies whether the corresponding OCCT module should be
built (all toolkits). Note that even if the whole module is not
selected for build, its toolkits used by other toolkits
selected for build will be included automatically.
* *BUILD_TOOLKITS* - allows including additional toolkits from non-selected
modules (should be list of toolkit names separated by a
space or a semicolon).
* *BUILD_SAMPLES* - specifies whether OCCT MFC samples should be built.
* *BUILD_PATCH_DIR* - optionally specifies additional folder containing patched OCCT source files.
The patch may contain arbitrary subset of OCCT source files (including CMake scripts, templates, etc.), organized in the same structure of folders as OCCT.
The projects generated by CMake will use files found in the patch folder instead of the corresponding files of OCCT.
* BUILD_CONFIGURATION - defines configuration to be built (Release by default).
* BUILD_<MODULE> - specify whether corresponding OCCT module should be
built (all toolkits). Note that even if whole module is not
selected for build, its toolkits used by other toolkits
selected for build will be included automatically.
* BUILD_TOOLKITS - allows including additional toolkits from non-selected
modules (should be list of toolkit names separated by a
space or a semicolon).
* BUILD_SAMPLES - specify whether OCCT MFC samples should be built.
Check variables with <i>USE_</i> prefix (<i>USE_FREEIMAGE, USE_GL2PS, USE_TBB,</i> and
<i>USE_OPENCL</i>) if you want to enable use of the corresponding optional 3rd-party
Check variables with "USE_" prefix (USE_FREEIMAGE, USE_GL2PS, USE_TBB, and
USE_OPENCL) if you want to enable use of the corresponding optional 3rd-party
library.
### 3rd-party configuration (The variables with <i>3RDPARTY_</i> prefix)
### 3rd-party configuration
### 3rd-party configuration (The variables with 3RDPARTY_ prefix)
If you have 3rd-party libraries in a non-default location
(e.g., on Windows, binaries downloaded from http://www.opencascade.org/getocc/download/3rdparty/")
*3RDPARTY_DIR* variable should be specified with the path to the folders where required 3rd-party libraries will be sought
(e.g., on Windows, binaries downloaded from "http://www.opencascade.org/getocc/download/3rdparty/"),
specify 3RDPARTY_DIR variable that points to the folders of 3rdparty products (some or all).
At the next configuration 3rd-party product paths stored in 3RDPARTY_\<PRODUCT\>_DIR variable
will be searched for in 3RDPARTY_DIR directory. If the structure of 3RDPARTY_DIR directory
is the same as adopted in the OCCT, the directory will contain product dir, lib and header files.
The results of search for 3rd-party directories will be stored in *3RDPARTY_\<LIBRARY\>_DIR* variables. If *3RDPARTY_DIR* directory is defined, required libraries are sought in *3RDPARTY_DIR* location.
Press "Configure" ("c" key for ccmake).
The procedure expects to find binary and header files of each 3rd-party library in its own sub-directory: *bin*, *lib* and *include*.
The result of the 3rdparty product search will be recorded in the corresponding variables:
Press **Configure** (**c** key for ccmake).
The result of the search are recorded in the corresponding variables:
* *3RDPARTY_\<PRODUCT\>_DIR* - path to the 3rdparty directory (with directory name) (e.g. <i>D:/3rdparty/tcltk-86-32</i>)
* *3RDPARTY_\<PRODUCT\>_LIBRARY_DIR* - path to directory containing a library (e.g. <i>D:/3rdparty/tcltk-86-32/lib</i>).
* *3RDPARTY_\<PRODUCT\>_INCLUDE_DIR* - path to the directory containing a header file (e.g., <i>D:/3rdparty/tcltk-86-32/include</i>)
* *3RDPARTY_\<PRODUCT\>_DLL_DIR* - path to the directory containing a shared library (e.g., <i>D:/3rdparty/tcltk-86-32/bin</i>) This variable is able just in windows case
Note: a libraries and include directories should be the children of product directory if the last one is defined.
* 3RDPARTY_\<PRODUCT\>_DIR - path to the product directory (with directory name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32)
* 3RDPARTY_\<PRODUCT\>_LIBRARY - path to the .lib libraries (with the library name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32/lib/tcl85.lib). In non-windows case, this variable is the same as 3RDPARTY_\<PRODUCT\>_DLL.
* 3RDPARTY_\<PRODUCT\>_INCLUDE - path to the include directory that contains the required header file (with "include" name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32/include including tcl.h)
* 3RDPARTY_\<PRODUCT\>_DLL - path to the .dll/.so/.dylib library (with the library name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32/bin/tcl85.dll)
The search process is as follows:
1. Common path: *3RDPARTY_DIR*
2. Path to a particular 3rd-party library: *3RDPARTY_\<PRODUCT\>_DIR*
1. Common path: 3RDPARTY_DIR
2. Path to particular 3rd-party library: 3RDPARTY_\<PRODUCT\>_DIR
3. Paths to headers and binaries:
1. *3RDPARTY_\<PRODUCT\>_INCLUDE_DIR*
2. *3RDPARTY_\<PRODUCT\>_LIBRARY_DIR*
3. *3RDPARTY_\<PRODUCT\>_DLL_DIR*
1. 3RDPARTY_\<PRODUCT\>_INCLUDE
2. 3RDPARTY_\<PRODUCT\>_LIBRARY
3. 3RDPARTY_\<PRODUCT\>_DLL
If a variable of any level is not defined (empty or <i> \<variable name\>-NOTFOUND </i>)
If a variable of any level is not defined (empty or \<variable name\>-NOTFOUND)
and the upper level variable is defined, the content of the non-defined variable
will be sought at the next configuration step. If search process at level 3 does not find the required files, it seeks in default places.
will be searched for at the next configuration step. If search process in level 3
does not find the required files, it searches in default places also.
Important: If *BUILD_CONFIGURATION* variable is changed, at the next configuration
*3RDPARTY_ variables* will be replaced by the search process result, except for the *3RDPARTY_DIR* variable.
**Note**: the names of searched libraries and header files are hardcoded.
Freetype search process tries to find ft2build.h file in 3RDPARTY_FREETYPE INCLUDE dir
and after that adds "3RDPARTY_FREETYPE_INCLUDE /freetype2" path to common includes if it exists.
**Note** : CMake will produce an error after the configuration step until all required variables are defined correctly.
If the search result (include path, or library path, or dll path) does not meet your expectations,
you can change *3RDPARTY_\<PRODUCT\>_*_DIR variable*, clear (if they are not empty)
*3RDPARTY_\<PRODUCT\>_DLL_DIR, 3RDPARTY_\<PRODUCT\>_INCLUDE_DIR* and 3RDPARTY_\<PRODUCT\>_LIBRARY_DIR variables
Important: If BUILD_CONFIGURATION variable is changed - at the next configuration
3RDPARTY_ variables will be replaced by the search process result, except for the 3RDPARTY_DIR variable.
*Note*: CMake will produce an error after the configuration step until all required variables are defined correctly.
If the search result (include path, or library path, or dll path) does not meet your expectations -
you can change 3RDPARTY_\<PRODUCT\>_DIR variable, clear (if they are not empty)
3RDPARTY_\<PRODUCT\>_DLL, 3RDPARTY_\<PRODUCT\>_INCLUDE_DIR and 3RDPARTY_\<PRODUCT\>_LIBRARY variables
(or clear one of them) and run the configuration process again.
At this time the search will be performed in the newly identified directory
and the result will be recorded to corresponding variables (replace old value if it is necessary).
At this time the search will be performed in the new identified directory
and the result will be recorded to empty variables (non-empty variables will not be replaced).
For example, (Linux case) *3RDPARTY_FREETYPE_DIR* variable
For example, (Linux case) 3RDPARTY_FREETYPE_DIR variable
/PRODUCTS/maintenance/Mandriva2010/freetype-2.4.10
/PRODUCTS/maintenance/Mandriva2010/freetype-2.3.7
can be changed to
/PRODUCTS/maintenance/Mandriva2010/freetype-2.5.3
/PRODUCTS/maintenance/Mandriva2010/freetype-2.4.10
During the configuration process and the related variables (*3RDPARTY_FREETYPE_DLL_DIR*, *3RDPARTY_FREETYPE_INCLUDE_DIR* and *3RDPARTY_FREETYPE_LIBRARY_DIR*) will be filled with new found values
and the related variables: 3RDPARTY_FREETYPE_DLL, 3RDPARTY_FREETYPE_INCLUDE_DIR and 3RDPARTY_FREETYPE_LIBRARY will be cleared.
**Note**: The names of searched libraries and header files are hard-coded. If there is the need to change their names,
change appropriate cmake variables (edit CMakeCache.txt file or edit in cmake-gui in advance mode) without reconfiguration: *3RDPARTY_\<PRODUCT\>_INCLUDE* for include, *3RDPARTY_\<PRODUCT\>_LIB* for library and *3RDPARTY_\<PRODUCT\>_DLL* for shared library.
@image html /dev_guides/building/cmake/images/cmake_image005.png
@image latex /dev_guides/building/cmake/images/cmake_image005.png
During configuration process the cleaned variables will be filled with new found values.
###The variables with INSTALL_ prefix:
Define *INSTALL_DIR* variable as the path will be contain the built OCCT files (libraries, executables and headers)
If <i>INSTALL_\<PRODUCT\></i> variable is checked, 3rd-party products will be copied to the install directory.
Define in INSTALL_DIR variable the path where will be placed built OCCT files (libraries, executables and headers).
If INSTALL_\<PRODUCT\> variable is checked - 3rd-party products will be copied to the install directory.
At the end of the configuration process "configuring done" message will be shown and the generation process can be started.
#### At the end of the configuration process "configuring done" message will be shown and the generation process can be started.
## OCCT Generation
This procedure will create makefiles or project files for your build system.
This will create makefiles or project files for your build system.
### Windows
Click **Generate** button and wait until the generation process is finished.
Then the project files will appear in the build folder (e.g. <i> d:/occt/build/win32-vc9-release </i>).
Click Generate button and wait until the generation process is finished.
Then the project files will appear in the build folder (e.g., d:/occt/build/win32-vc9-release).
### Linux
Click **Generate** button (if you use cmake-gui) or press **g** (for ccmake) to start the generation process.
When the configuration is complete, start the generation process by pressing "g".
@image html /dev_guides/building/cmake/images/cmake_image006.png
@image latex /dev_guides/building/cmake/images/cmake_image006.png
### Mac OS X
Click **Generate** button and wait until the generation process is finished.
Then the project files will appear in the build folder (e.g. <i> /Developer/occt/build/XCode </i>).
Click Generate button and wait until the generation process is finished.
Then the project files will appear in the build folder (e.g., /Developer/occt/build/XCode).
## OCCT Building
The install folder contains the scripts to run *DRAWEXE* (*draw.bat* or *draw.sh*) and samples (if its were built; (see below **MFC samples**)); the directory structure is follow:
* **data** - data files for OCCT (brep, iges, stp)
* **inc** - header files
* **samples** - tcl sample files
* **src** - all required source files for OCCT
* **tests** - OCCT test suite
* **win32/vc10/bind**> - example relative directory tree of binary files (3rdparty and occt)
* **win32/vc9/lib**> - example relative directory tree of libraries (3rdparty and occt)
The install folder contains bin, inc, lib and res folders and a script to run DRAWEXE (draw.bat or draw.sh).
"bin" contains executables, DLL (Windows) style shared libraries and pdb-files in OCCT debug version,.
"lib" contains the import parts of DLL libraries.
"inc" contains header files.
"res" contains all required source files for OCCT.
### Windows (Visual studio)
Go to the build folder, start the Visual Studio solution *OCCT.sln* and build it by clicking **Build -> Build Solution**.
When the building process is finished, build the *INSTALL* project (by default the build solution process skips the building of the INSTALL project) to move the above files to *INSTALL_DIR*.
For this, right-click on the *INSTALL* project and select **Project Only -> Build Only** -> *INSTALL* in the solution explorer.
Go to the build folder, start the Visual Studio solution (OCCT.sln) and build it by clicking Build - Build Solution.
When the building process finished, build the INSTALL project
(by default the build solution process skips the building of the INSTALL project) to move the above files to INSTALL_DIR.
For this in the solution explorer right click on the INSTALL project and select Project Only - Build Only INSTALL.
### Linux (make)
Change directory to the directory with binaries and run *make* command
Change directory to binary dir and run make command
> make
To copy all libraries, executables and chosen 3rd-party libraries run *make* command with *install* argument
To copy all libraries, executables and chosen 3rd-party libraries run "make" command with "install" argument
> make install
This command will move the above files to *INSTALL_DIR*.
This command will move the above files to INSTALL_DIR.
### Mac OS X (XCode)
Go to the build folder, start XCode solution *OCCT.xcodeproj* and build it by clicking **Build -> Build**.
Please notice that XCode may lag because it processes sources at the first start.
Go to the build folder, start the XCode solution (OCCT.xcodeproj)
and build it by clicking Build -> Build.
Please notice that XCode may have worst responsibility to user actions
due to sources processing at first start.
When the building process has finished, build the *INSTALL* project (by default the build solution process skips the building of *INSTALL* project) to move the above files to *INSTALL_DIR*.
Notice that *env.sh* (which configures *PATH* and *DYLD_LIBRARY_PATH* environment variables
as well as Draw Harness extra variables) and *draw.sh* (to launch *DRAWEXE* ) will be created in the target directory.
When the building process finished, build the INSTALL project
(by default the build solution process skips the building of the INSTALL project)
to move the above files to INSTALL_DIR.
Notice that env.sh (configure PATH and DYLD_LIBRARY_PATH environment variables
as well as Draw Harness extra variables) and draw.sh (to launch DRAWEXE) will be created in target directory.
### MFC samples
On Windows you can also build binaries of MFC samples together with OCCT. For this, activate **BUILD_Samples** check-box in CMake configuration dialog.
@figure{/dev_guides/building/cmake/images/cmake_image007.png}
Please take into account that MFC sample binaries will be installed in the same folder as OCCT binaries during building of *INSTALL* project.
To run an MFC sample use *sample.bat* launcher. The command format is: <i>sample.bat *SampleName*</i> (e.g. <i>sample.bat ImportExport</i>).
## OCCT project debugging for Visual Studio
Run OCCT.bat from the build directory to start Visual Studio with required environment for debugging.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1,70 +1,64 @@
Building with Code::Blocks on Mac OS X {#occt_dev_guides__building_code_blocks}
Building with Code::Blocks on Mac OS X {#dev_guides__building__code_blocks}
======================================
This file describes steps to build OCCT libraries from a complete source package
on Mac OS X with **Code::Blocks**.
This file describes steps to build OCCT libraries from complete source package
on Mac OS X with Code::Blocks.
If you build OCCT from bare sources (as in Git repository) or do some
If you are building OCCT from bare sources (as in Git repository), or do some
changes affecting CDL files, you need to use WOK to re-generate header files
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
Before building OCCT, you need to install the required third-party libraries; see
paragraph 1 of \ref occt_dev_guides__building for details.
Before building OCCT, you need to install required third-party libraries; see
paragraph 1 of \ref dev_guides__building for details.
1. Add paths to the mandatory 3rd-party products (**Tcl/Tk** and **FreeType**) in file
*custom.sh* located in <i>\<OCCT_ROOT_DIR\></i>. For this:
1. Add paths to the mandatory 3rd-party products (Tcl/Tk and FreeType) in file
custom.sh located in \<OCCT_ROOT_DIR\>. For this:
1.1. Add paths to the includes in variable *CSF_OPT_INC*;
1.1. Add paths to the includes in variable "CSF_OPT_INC";
1.2. Add paths to the binary libraries in variable *CSF_OPT_LIB64*;
1.2. Add paths to the binary libraries in variable "CSF_OPT_LIB64";
All paths should be separated by ":" symbol.
2. Add paths to the optional 3rd-party libraries (**TBB, gl2ps** and **FreeImage**)
in the aforementioned environment variables *CSF_OPT_INC* and
*CSF_OPT_LIB64* from file *custom.sh*.
2. Add paths to the optional 3rd-party libraries (TBB, gl2ps and FreeImage)
in the aforementioned environment variables "CSF_OPT_INC" and
"CSF_OPT_LIB64" from file custom.sh.
If you want to build OCCT without the optional libraries perform the
following steps:
2.1 Disable unnecessary library in custom.sh by setting the corresponding
variable <i>HAVE_\<LIBRARY_NAME\></i> to *false*.
variable HAVE_\<LIBRARY_NAME\> to "false".
~~~~~
export HAVE_GL2PS=false
~~~~~
export HAVE_GL2PS=false
2.2 Remove this library from Linker settings in **Code::Blocks** for each project
that uses it: right click on the required project, choose **Build options**,
go to **Linker settings** tab in the opened window , select unnecessary
libraries and click **Delete** button.
2.2 Remove this library from Linker settings in Code::Blocks for each project
that uses it: right click on the required project, choose "Build options",
go to "Linker settings" tab in the opened window , select unnecessary
libraries and click "Delete" button.
3. Open Terminal application
4. Enter <i> \<OCCT_ROOT_DIR\></i>:
4. Enter \<OCCT_ROOT_DIR\>:
~~~~~
cd \<OCCT_ROOT_DIR\>
~~~~~
5. To start **Code::Blocks**, run the command <i>/codeblocks.sh</i>
5. To start Code::Blocks, run the command /codeblocks.sh
6. To build all toolkits, click **Build->Build workspace** in the menu bar.
6. To build all toolkits, click "Build->Build workspace" in the menu bar.
To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, perform
To start DRAWEXE, which has been built with Code::Blocks on Mac OS X, perform
the following steps:
1.Open Terminal application
1. Open Terminal application
2.Enter <i>\<OCCT_ROOT_DIR\></i>:
2. Enter \<OCCT_ROOT_DIR\>:
~~~~~
cd \<OCCT_ROOT_DIR\>
~~~~~
3.Run the script
~~~~~
3. Run script
./draw_cbp.sh cbp [d]
~~~~~
Option *d* is used if OCCT has been built in **Debug** mode.
Option "d" is used if OCCT has been built in Debug mode.

View File

@@ -1,35 +1,31 @@
Building with MS Visual C++ {#occt_dev_guides__building_msvc}
Building with MS Visual C++ {#dev_guides__building__msvc}
===========================
This file describes steps to build OCCT libraries from a complete source
archive on Windows with <b>MS Visual C++</b>.
This file describes steps to build OCCT libraries from complete source
archive on Windows with MS Visual C++.
If you build OCCT from bare sources (as in Git repository) or do some
If you are building OCCT from bare sources (as in Git repository), or do some
changes affecting CDL files, you need to use WOK to re-generate header files
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
Before building OCCT, you need to install the required third-party libraries; see
paragraph 1 of \ref occt_dev_guides__building for instructions.
Before building OCCT, you need to install required third-party libraries; see
paragraph 1 of \ref dev_guides__building for instructions.
1. Edit file *custom.bat* to define the environment:
1. Edit file custom.bat to define environment:
- *VCVER* - version of Visual Studio (vc8, vc9, vc10, vc11 or vc12),
and relevant *VCVARS* path
- *ARCH* - architecture (32 or 64), affects only *PATH* variable for execution
- <i>HAVE_*</i> - flags to enable or disable use of optional third-party products
- VCVER - version of Visual Studio (vc8, vc9, vc10, vc11 or vc12),
and relevant VCVARS path
- ARCH - architecture (32 or 64), affects only PATH variable for execution
- HAVE_* - flags to enable or disable use of optional third-party products
- CSF_OPT_* - paths to search for includes and binaries of all used
third-party products
2. Launch *msvc.bat* to start Visual Studio with all necessary environment
2. Launch msvc.bat to start Visual Studio with all necessary environment
variables defined.
Note: the MSVC project files are located in folders <i>adm\\msvc\\vc[9-12]</i>.
Binaries are produced in *win32* or *win64* folders.
Note: the MSVC project files are located in folders adm\\msvc\\vc[9-12].
Binaries are produced in win32 or win64 folders.
3. Build with Visual Studio
Note: If VTK was not installed on you computer and you are not interested in usage of
OCCT VTK Integration Services (VIS) component you should exclude TKIVtk and TKIVtkDraw
projects from process of compilation in the main menu <b>Build / Configuration Manager</b>.
To start DRAW, launch *draw.bat*.
To start DRAW, launch draw.bat.

View File

@@ -1,11 +1,11 @@
Using WOK {#occt_dev_guides__building_wok}
Using WOK {#dev_guides__building__wok}
=========
@tableofcontents
\ref occt_dev_guides__wok "WOK" is a legacy build environment for Open CASCADE Technology.
\ref dev_guides__wok "WOK" is a legacy build environment for Open CASCADE Technology.
It is required for generation of header files for classes defined with
@ref occt_dev_guides__cdl "CDL" ("Cascade Definition Language").
@ref dev_guides__cdl "CDL" ("Cascade Definition Language").
Also tools for generation of project files for other build systems, and OCCT
documentation, are integrated to WOK.
@@ -28,25 +28,25 @@ and third-party components required for building OCCT.
@image html /dev_guides/building/wok/images/wok_image001.png
@image latex /dev_guides/building/wok/images/wok_image001.png
Click **Next** and proceed with the installation.
Click Next and proceed with the installation.
At the end of the installation you will be prompted to specify the version and the location of Visual Studio to be used, and the location of third-party libraries:
@image html /dev_guides/building/wok/images/wok_image002.png
@image latex /dev_guides/building/wok/images/wok_image002.png
You can change these settings at any time later. For this click on the item **Customize environment (GUI tool)** in the WOK group in the Windows Start menu.
You can change these settings at any time later. For this click on the item "Customize environment (GUI tool)" in the WOK group in the Windows Start menu.
The shortcuts from this group provide two ways to run WOK:
* In command prompt window using option *WOK TCL shell*.
* In Emacs editor using option *WOK Emacs*. Using Emacs is convenient if you need to work within WOK environment.
* In command prompt window ("WOK TCL shell").
* In Emacs editor ("WOK Emacs"). Using Emacs is convenient if you need to work within WOK environment.
By default WOK installer creates a WOK factory with name *LOC* within workshop *dev*. I.e. the WOK path is <i>:LOC:dev</i>.
By default WOK installer creates a WOK factory with name "LOC" within workshop "dev" (WOK path :LOC:dev).
@subsection wok12 Linux
* Unpack the .tgz archive containing WOK distributive into the installation directory <i>\<WOK_INSTALL_DIR\></i>.
* Unpack the .tgz archive containing WOK distributive into an installation directory \<WOK_INSTALL_DIR\>.
* Perform the following commands assuming that you have unpacked WOK distributive archive into <i>\<WOK_INSTALL_DIR\></i>:
* Perform the following commands assuming that you have unpacked WOK distributive archive into \<WOK_INSTALL_DIR\>:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
cd \<WOK_INSTALL_DIR\>/site
wok_confgui.sh
@@ -76,9 +76,9 @@ and third-party components required for building OCCT.
@subsection wok13 Mac OS X
* Double click on file *wokSetup.dmg* in the Finder. This opens a new window. Drag and drop *wokSetup* folder from this window at the location in the Finder where you want to install WOK, i.e. <i>\<WOK_INSTALL_DIR\></i>.
* In the Finder double click on wokSetup.dmg file. This will open a new window. Drag and drop "wokSetup" folder from this window at the location in the Finder where you want to install WOK, i.e. \<WOK_INSTALL_DIR\>.
* Browse to the folder <i>\<WOK_INSTALL_DIR\>/site</i> and double click on *WokConfig*. This opens a window with additional search path settings. Define all necessary paths to third-party products in the dialog window:
* Browse in the Finder to the folder \<WOK_INSTALL_DIR\>/site and double click on WokConfig. This will open a window with additional search path settings. Define all necessary paths to third-party products in the dialog window:
@image html /dev_guides/building/wok/images/wok_image004.png
@image latex /dev_guides/building/wok/images/wok_image004.png
@@ -89,74 +89,74 @@ and third-party components required for building OCCT.
wok_init.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Your installation procedure is over. To run WOK in Emacs navigate in the Finder to the folder <i>\<WOK_INSTALL_DIR\>/site</i> and double click on *WokEmacs*.
* Your installation procedure is over. To run WOK in Emacs navigate in the Finder to the folder \<WOK_INSTALL_DIR\>/site and double click on WokEmacs.
@section wok2 Initialization of Workbench
To start working with OCCT, clone the OCCT Git repository from the server (see http://dev.opencascade.org/index.php?q=home/resources for details) or unpack the source archive.
Then create a WOK workbench (command *wcreate*) setting its Home to the directory, where the repository is created (<i>$CASROOT</i> variable). The workbench should have the same name as that directory.
Then create a WOK workbench (command wcreate) setting its Home to the directory, where the repository is created ($CASROOT variable). The workbench should have the same name as that directory.
For example, assuming that OCCT repository has been cloned into *D:/occt* folder:
For example, assuming that OCCT repository has been cloned into D:/occt folder:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
LOC:dev> wcreate occt -DHome=D:/occt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note that <i>$CASROOT</i> is equal to *D:/occt* now.
Note: $CASROOT is equal to D:/occt now
Then you can work with this workbench using normal WOK functionality (*wprocess, umake*, etc.; see @ref occt_dev_guides__wok "WOK User's Guide" for details) or use it only for generation of derived sources and project files, and build OCCT with Visual Studio on Windows or *make* command on Linux, as described below.
Then you can work with this workbench using normal WOK functionality (wprocess, umake, etc.; see WOK User's Guide for details) or use it only for generation of derived sources and project files, and build OCCT with Visual Studio on Windows or make command on Linux, as described below.
@section wok3 Generation of building projects
Use command *wgenproj* in WOK to generate derived headers, source and building projects files:
Use command wgenproj in WOK to generate derived headers, source and building projects files:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
LOC:dev> wokcd occt
LOC:dev:occt> wgenproj [ -target=<TARGET> ] [ -no_wprocess ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TARGET:
* *vc8* - Visual Studio 2005;
* *vc9* - Visual Studio 2008;
* *vc10* - Visual Studio 2010;
* *vc11* - Visual Studio 2012;
* *cbp* - CodeBlocks;
* *cmake* - CMake;
* *amk* - AutoMake;
* *xcd* - Xcode;
* <i>-no_wprocess</i> option skips generation of derived headers and source files.
* vc8 - Visual Studio 2005
* vc9 - Visual Studio 2008
* vc10 - Visual Studio 2010
* vc11 - Visual Studio 2012
* cbp - CodeBlocks
* cmake - CMake
* amk - AutoMake
* xcd - Xcode
-no_wprocess - skip generation of derived headers and source files
Note that this command takes several minutes to complete at the first call.
Re-execute this step to generate derived headers, source and building projects files if some CDL files in OCCT have been modified (either by you directly, or due to updates in the repository). Note that in some cases WOK may fail to update correctly; in such case remove sub-directories *drv* and <i>.adm</i> and repeat the command.
Re-execute this step to generate derived headers, source and building projects files if some CDL files in OCCT have been modified (either by you directly, or due to updates in the repository). Note that in some cases WOK may fail to update correctly; in such case remove sub-directories drv and .adm and repeat the command.
To regenerate derived headers and source files without regeneration of projects use command:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
LOC:dev> wokcd occt
LOC:dev:occt> wprocess -DGroups=Src,Xcpp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The generated building project has been placed into <i>$CASROOT/adm</i> folder:
* for vc8 - <i>$CASROOT/adm/msvc/vc8</i>;
* for vc9 - <i>$CASROOT/adm/msvc/vc9</i>;
* for vc10 - <i>$CASROOT/adm/msvc/vc10</i>;
* for vc11 - <i>$CASROOT/adm/msvc/vc11</i>;
* for cbp - <i>$CASROOT/adm/\<OS\>/cbp</i>;
* for cmake - <i>$CASROOT/adm/cmake</i>;
* for amk - <i>$CASROOT/adm/lin/amk</i>;
* xcd - <i>$CASROOT/adm/\<OS\>/xcd</i>
The generated building project has been placed into $CASROOT/adm folder:
* for vc8 - $CASROOT/adm/msvc/vc8
* for vc9 - $CASROOT/adm/msvc/vc9
* for vc10 - $CASROOT/adm/msvc/vc10
* for vc11 - $CASROOT/adm/msvc/vc11
* for cbp - $CASROOT/adm/\<OS\>/cbp
* for cmake - $CASROOT/adm/cmake
* for amk - $CASROOT/adm/lin/amk
* xcd - $CASROOT/adm/\<OS\>/xcd
@section wok4 Generation of documentation
Use command *wgendoc* in WOK to generate reference documentation:
Use command wgendoc in WOK to generate reference documentation:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
:LOC:dev> wokcd occt
:LOC:dev:occt> wgendoc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following options can be used:
* <i>-wb=\<workbench name\></i> the name of OCCT workbench (the current one by default);
* <i>-m=\<list of modules\></i> the list of modules that will be contained in the documentation;
* <i>-outdir=\<path\></i> the output directory for the documentation;
* <i>-chm</i> the option to generate CHM file;
* <i>-hhc=\<path\></i> the path to HTML Help Compiler *hhc.exe* or equivalent;
* <i>-qthelp=\<path\></i> the option to generate Qt Help file, where <i>\<path\></i> is the required path to *qthelpgenerator* executable;
* <i>-doxygen=\<path\></i> the path to Doxygen executable;
* <i>-dot=\<path\></i> the path to GraphViz dot executable.
* -wb=< workbench name > the name of OCCT workbench (the current one by default);
* -m=< list of modules > the list of modules that will be contained in the documentation;
* -outdir=< path > the output directory for the documentation;
* -chm the option to generate CHM file;
* -hhc=< path > the path to HTML Help Compiler (hhc.exe) or equivalent;
* -qthelp=< path > the option to generate Qt Help file, it is necessary to specify the path to qthelpgenerator executable;
* -doxygen=< path > the path to Doxygen executable
* -dot=< path > the path to GraphViz dot executable

View File

@@ -1,70 +1,71 @@
Building with Xcode {#occt_dev_guides__building_xcode}
Building with Xcode {#dev_guides__building__xcode}
===================
This file describes steps to build OCCT libraries from a complete source package
on Mac OS X with **Xcode**.
This file describes steps to build OCCT libraries from complete source package
on Mac OS X with Xcode.
If you build OCCT from bare sources (as in Git repository) or do some
If you are building OCCT from bare sources (as in Git repository), or do some
changes affecting CDL files, you need to use WOK to re-generate header files
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
Before building OCCT, you need to install the required third-party libraries; see
paragraph 1 of \ref occt_dev_guides__building for details.
Before building OCCT, you need to install required third-party libraries; see
paragraph 1 of \ref dev_guides__building for details.
1. Add paths to the mandatory 3rd-party products (**Tcl/Tk** and **FreeType**)
in file *custom.sh* located in <i>\<OCCT_ROOT_DIR\> </i>. For this:
1. Add paths to the mandatory 3rd-party products (Tcl/Tk and FreeType)
in file custom.sh located in \<OCCT_ROOT_DIR\>. For this:
1.1. Add paths to the includes in variable *CSF_OPT_INC*;
1.1. Add paths to the includes in variable "CSF_OPT_INC";
1.2. Add paths to the binary libraries in variable *CSF_OPT_LIB64*;
1.2. Add paths to the binary libraries in variable "CSF_OPT_LIB64";
All paths should be separated by ":" symbol.
2. Add paths to the optional 3rd-party libraries (**TBB, gl2ps** and **FreeImage**)
in the aforementioned environment variables *CSF_OPT_INC* and *CSF_OPT_LIB64* from file *custom.sh*.
2. Add paths to the optional 3rd-party libraries (TBB, gl2ps and FreeImage)
in the aforementioned environment variables "CSF_OPT_INC" and
"CSF_OPT_LIB64" from file custom.sh.
If you want to build OCCT without the optional libraries perform the following steps:
If you want to build OCCT without the optional libraries perform the
following steps:
2.1 Disable unnecessary library in custom.sh by setting the corresponding
variable HAVE_<LIBRARY_NAME> to "false".
2.1 Disable unnecessary library in *custom.sh* by setting the corresponding
variable <i>HAVE_<LIBRARY_NAME></i> to *false*.
~~~~~
export HAVE_GL2PS=false
~~~~~
2.2 Remove this library from Project navigator in Xcode for each project that
uses it: choose the required project, right click on the unnecessary
library and select **Delete** button.
library and select "Delete" button.
3. Open Terminal application.
4. Enter <i>\<OCCT_ROOT_DIR\></i>:
~~~~~
4. Enter \<OCCT_ROOT_DIR\>:
cd \<OCCT_ROOT_DIR\>
~~~~~
5. To start **Xcode**, run command <i>/xcode.sh</i>
6. To build a certain toolkit, select it in **Scheme** drop-down list in Xcode
toolbar, press **Product** in the menu and click **Build** button.
5. To start Xcode, run the command /xcode.sh
To build the entire OCCT, create a new empty project (select **File ->
New -> Project -> "Empty project** in the menu. Input the project name,
e.g. *OCCT*, click **Next** and **Create** buttons). Drag and drop the *OCCT*
folder in the created *OCCT* project in the Project navigator. Select
**File -> New -> Target -> Aggregate** in the menu. Enter the project name
(e.g. <i>OCCT</i>) and click **Finish**. The **Build Phases** tab will open.
6. To build a certain toolkit, select it in "Scheme" drop-down list in Xcode
toolbar, press "Product" in the menu and click "Build" button.
To build the entire OCCT, create a new empty project (select "File ->
New -> Project -> "Empty project" in the menu. Input the project name,
e.g. "OCCT", click "Next" and "Create" buttons). Drag and drop the "OCCT"
folder in the created "OCCT" project in the Project navigator. Select
"File -> New -> Target -> Aggregate" in the menu. Enter the project name
(e.g. "OCCT") and click "Finish". The "Build Phases" tab will open.
Click "+" button to add the necessary toolkits to the target project.
It is possible to select all toolkits by pressing **Command+A** combination.
It is possible to select all toolkits by pressing "Command+A" combination.
To start *DRAWEXE*, which has been built with Xcode on Mac OS X, perform the following steps:
To start DRAWEXE, which has been built with Xcode on Mac OS X, perform the following steps:
1.Open Terminal application
1. Open Terminal application
2. Enter \<OCCT_ROOT_DIR\>:
2.Enter <i>\<OCCT_ROOT_DIR\></i>:
~~~~~
cd \<OCCT_ROOT_DIR\>
~~~~~
3.Run the script
~~~~~
3. Run script
./draw_cbp.sh xcd [d]
~~~~~
Option *d* is used if OCCT has been built in **Debug** mode.
Option "d" is used if OCCT has been built in Debug mode.

View File

@@ -1,4 +1,4 @@
Component Definition Language (CDL) {#occt_dev_guides__cdl}
Component Definition Language (CDL) {#dev_guides__cdl}
==============================
@tableofcontents

View File

@@ -1,4 +1,4 @@
Coding Rules {#occt_dev_guides__coding_rules}
Coding Rules {#dev_guides__coding_rules}
======================================
@tableofcontents
@@ -163,7 +163,7 @@ Standard_Integer myCounter; // This is preferred
### Names of global variables
It is strongly recommended to avoid defining any global variables.
However, as soon as a global variable is necessary, its name should be prefixed by the name of a class or a package where it is defined followed with <i>_my</i>.
However, as soon as a global variable is necessary, its name should be prefixed by the name of a class or a package where it is defined followed with *_my*.
See the following examples:
@@ -238,7 +238,7 @@ Prefer C++ style comments in C++ sources.
### Commenting out unused code
Delete unused code instead of commenting it or using \#define.
Delete unused code instead of commenting it or using #define.
### Indentation in sources [MANDATORY]
@@ -296,19 +296,19 @@ Each descriptive block should contain at least a function name and purpose descr
See the following example:
~~~~~{.cpp}
// =======================================================================
// ----------------------------------------------
// function : TellMeSmthGood
// purpose : Gives me good news
// =======================================================================
// ----------------------------------------------
void TellMeSmthGood()
{
...
}
// =======================================================================
// ----------------------------------------------
// function : TellMeSmthBad
// purpose : Gives me bad news
// =======================================================================
// ----------------------------------------------
void TellMeSmthBad()
{
...
@@ -541,7 +541,7 @@ Use *private* fields if future extensions should be disabled.
### Constants and inlines over defines [MANDATORY]
Use constant variables (const) and inline functions instead of defines (\#define).
Use constant variables (const) and inline functions instead of defines (#define).
### Avoid explicit numerical values [MANDATORY]
@@ -556,41 +556,6 @@ If a class has a destructor, an assignment operator or a copy constructor, it us
A class with virtual function(s) ought to have a virtual destructor.
### Overriding virtual methods
Declaration of overriding method should contains specifiers "virtual" and "override"
(using Standard_OVERRIDE alias for compatibility with old compilers).
~~~~~{.cpp}
class MyPackage_BaseClass
{
public:
Standard_EXPORT virtual Standard_Boolean Perform();
};
~~~~~{.cpp}
class MyPackage_MyClass : public MyPackage_BaseClass
{
public:
Standard_EXPORT virtual Standard_Boolean Perform() Standard_OVERRIDE;
};
~~~~~
This makes class definition more clear (virtual methods become highlighted).
Declaration of interface using pure virtual functions protects against
incomplete inheritance at first level, but does not help when method is overridden multiple times within nested inheritance
or when method in base class is intended to be optional.
And here "override" specifier introduces additional protection against situations when interface changes might be missed
(class might contain old methods which will be never called).
### Default parameter value
Do not redefine a default parameter value in an inherited function.

View File

@@ -1,4 +1,4 @@
Contribution Workflow {#occt_dev_guides__contribution_workflow}
Contribution Workflow {#dev_guides__contribution_workflow}
====================================
@tableofcontents

View File

@@ -1,4 +1,4 @@
Debugging tools and hints {#occt_dev_guides__debug}
Debugging tools and hints {#dev_guides__debug}
=========================
@tableofcontents
@@ -7,26 +7,6 @@ Debugging tools and hints {#occt_dev_guides__debug}
This manual describes facilities included in OCCT to support debugging, and provides some hints for more efficient debug.
@section occt_debug_macro Compiler macro to enable extended debug messages
Many OCCT algorithms can produce extended debug messages, usually printed to cout.
These include messages on internal errors and special cases encountered, timing etc.
In OCCT versions prior to 6.8.0 most of these messages were activated by compiler macro *DEB*, enabled by default in debug builds.
Since version 6.8.0 this is disabled by default but can be enabled by defining compiler macro *OCCT_DEBUG*.
To enable this macro on Windows when building with Visual Studio projects, edit file custom.bat and add the line:
set CSF_DEFINES=OCCT_DEBUG
Some algorithms use specific macros for yet more verbose messages, usually started with OCCT_DEBUG_.
These messages can be enabled in the same way, by defining corresponding macro.
Note that some header files are modified when *OCCT_DEBUG* is enabled, hence binaries built with it enabled are not compatible with client code built without this option; this is not intended for production use.
@section occt_debug_exceptions Calling JIT debugger on exception
On Windows platform when using Visual Studio compiler there is a possibility to start the debugger automatically if an exception is caught in a program running OCCT. For this, set environment variable *CSF_DEBUG* to any value. Note that this feature works only if you enable OCCT exception handler in your application by calling *OSD::SetSignal()*.
@section occt_debug_bop Self-diagnostics in Boolean operations algorithm
In real-world applications modeling operations are often performed in a long sequence, while the user sees only the final result of the whole sequence. If the final result is wrong, the first debug step is to identify the offending operation to be debugged further. Boolean operation algorithm in OCCT provides a self-diagnostic feature which can help to do that step.
@@ -35,6 +15,10 @@ This feature can be activated by defining environment variable *CSF_DEBUG_BOP*,
The diagnostic code checks validity of the input arguments and the result of each Boolean operation. When an invalid situation is detected, the report consisting of argument shapes and a DRAW script to reproduce the problematic operation is saved to the directory pointed by *CSF_DEBUG_BOP*.
@section occt_debug_exceptions Calling JIT debugger on exception
On Windows platform when using Visual Studio compiler there is a possibility to start the debugger automatically if an exception is caught in a program running OCCT. For this, set environment variable *CSF_DEBUG* to any value. Note that this feature works only if you enable OCCT exception handler in your application by calling *OSD::SetSignal()*.
@section occt_debug_call Functions for calling from debugger
Modern interactive debuggers provide the possibility to execute application code at a program break point. This feature can be used to analyse the temporary objects available only in the context of the debugged code. OCCT provides several global functions that can be used in this way.
@@ -43,7 +27,7 @@ Note that all these functions accept pointer to variable as <i>void*</i> to allo
@subsection occt_debug_call_draw Interacting with DRAW
Open CASCADE Test Harness or @ref occt_user_guides__test_harness "DRAW" provides an extensive set of tools for inspection and analysis of OCCT shapes and geometric objects and is mostly used as environment for prototyping and debugging OCCT-based algorithms.
Open CASCADE Test Harness or @ref user_guides__test_harness "DRAW" provides an extensive set of tools for inspection and analysis of OCCT shapes and geometric objects and is mostly used as environment for prototyping and debugging OCCT-based algorithms.
In some cases the objects to be inspected are available in DRAW as results of DRAW commands. In other cases, however, it is necessary to inspect intermediate objects created by the debugged algorithm. To support this, DRAW provides a set of commands allowing the developer to store intermediate objects directly from the debugger stopped at some point during the program execution (usually at a breakpoint).
@@ -96,16 +80,6 @@ const char* BRepTools_DumpLoc (void* theShapePtr)
Dumps shape or its location to cout.
- *theShapePtr* - a pointer to *TopoDS_Shape* variable.
The following function is provided by *TKMesh* toolkit:
~~~~~
const char* BRepMesh_Dump (void* theMeshHandlePtr, const char* theFileNameStr)
~~~~~
Stores mesh produced in parametric space to BREP file.
- *theMeshHandlePtr* - a pointer to *Handle(BRepMesh_DataStructureOfDelaun)* variable.
- *theFileNameStr* - name of file the mesh sould be stored to.
The following additional function is provided by *TKGeomBase* toolkit:
~~~~~
@@ -140,13 +114,11 @@ For convenience it is possible to define aliases to commands in this window, for
~~~~~
>alias deval ? ({,,TKDraw}Draw_Eval)
>alias dsetshape ? ({,,TKDraw}DBRep_Set)
>alias dsetgeom ? ({,,TKDraw}DrawTrSurf_Set)
>alias dsetpnt ? ({,,TKDraw}DrawTrSurf_SetPnt)
>alias dsetgeom ? ({,,TKDraw}DrawTrSurf_SetPnt)
>alias dsetpnt2d ? ({,,TKDraw}DrawTrSurf_SetPnt2d)
>alias saveshape ? ({,,TKBRep}BRepTools_Write)
>alias dumpshape ? ({,,TKBRep}BRepTools_Dump)
>alias dumploc ? ({,,TKBRep}BRepTools_DumpLoc)
>alias dumpmesh ? ({,,TKMesh}BRepMesh_Dump)
>alias dumpgeom ? ({,,TKGeomBase}GeomTools_Dump)
~~~~~

View File

@@ -1,146 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="gp_XY">
<DisplayString>[{(float)x} {(float)y}]</DisplayString>
</Type>
<Type Name="gp_Pnt2d">
<AlternativeType Name="gp_Vec2d"></AlternativeType>
<AlternativeType Name="gp_Dir2d"></AlternativeType>
<DisplayString>[{(float)cood.x} {(float)cood.y}]</DisplayString>
</Type>
<Type Name="gp_XYZ">
<DisplayString>[{(float)x} {(float)y} {(float)z}]</DisplayString>
</Type>
<Type Name="gp_Pnt">
<AlternativeType Name="gp_Vec"></AlternativeType>
<AlternativeType Name="gp_Dir"></AlternativeType>
<DisplayString>[{(float)coord.x} {(float)coord.y} {(float)coord.z}]</DisplayString>
</Type>
<Type Name="NCollection_Vec2&lt;*&gt;">
<DisplayString>[{v[0]} {v[1]}]</DisplayString>
</Type>
<Type Name="NCollection_Vec3&lt;*&gt;">
<DisplayString>[{v[0]} {v[1]} {v[2]}]</DisplayString>
</Type>
<Type Name="NCollection_Vec4&lt;*&gt;">
<DisplayString>[{v[0]} {v[1]} {v[2]} {v[3]}]</DisplayString>
</Type>
<Type Name="gp_Mat2d">
<DisplayString>
[{(float)matrix[0][0]} {(float)matrix[0][1]}], [{(float)matrix[1][0]} {(float)matrix[1][1]}]
</DisplayString>
</Type>
<Type Name="NCollection_Mat4&lt;*&gt;">
<Expand>
<Item Name="row0">((NCollection_Vec4&lt;$T1&gt;*)myMat)[0]</Item>
<Item Name="row1">((NCollection_Vec4&lt;$T1&gt;*)myMat)[1]</Item>
<Item Name="row2">((NCollection_Vec4&lt;$T1&gt;*)myMat)[2]</Item>
<Item Name="row3">((NCollection_Vec4&lt;$T1&gt;*)myMat)[3]</Item>
</Expand>
</Type>
<Type Name="Handle_Standard_Transient">
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
<DisplayString Condition="entity!=0x00000000">[count={entity->count}]</DisplayString>
<Expand>
<ExpandedItem>*entity</ExpandedItem>
</Expand>
</Type>
<Type Name="NCollection_Handle&lt;*&gt;">
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
<DisplayString Condition="entity!=0x00000000">[count={entity->count}]</DisplayString>
<Expand>
<ExpandedItem>*((NCollection_Handle&lt;$T1&gt;::Ptr*)entity)->myPtr</ExpandedItem>
</Expand>
</Type>
<Type Name="TCollection_AsciiString">
<DisplayString>{mylength}: {mystring,s}</DisplayString>
</Type>
<Type Name="TCollection_HAsciiString">
<DisplayString>{myString.mylength}: {myString.mystring,s}</DisplayString>
</Type>
<Type Name="NCollection_UtfString&lt;*&gt;">
<DisplayString>{myLength}: {myString,s}</DisplayString>
</Type>
<Type Name="TCollection_ExtendedString">
<DisplayString>{mylength}: {(wchar_t *)mystring,su}</DisplayString>
</Type>
<Type Name="TCollection_HExtendedString">
<DisplayString>{myString.mylength}: {(wchar_t *)myString.mystring,su}</DisplayString>
</Type>
<Type Name="TCollection_BaseSequence">
<DisplayString>TCollection_Sequence [{Size}], curr={CurrentIndex}</DisplayString>
</Type>
<Type Name="TCollection_BasicMap">
<AlternativeType Name="NCollection_BaseMap"/>
<DisplayString>TCollection_Map [{mySize}]</DisplayString>
</Type>
<Type Name="TColStd_PackedMapOfInteger">
<DisplayString>TColStd_PackedMapOfInteger [{myExtent}]</DisplayString>
</Type>
<Type Name="NCollection_Vector&lt;*&gt;">
<DisplayString>NCollection_Vector [{myLength}]</DisplayString>
<Expand>
<IndexListItems Condition="myData->Length&lt;myLength">
<Size>myData->Length</Size>
<ValueNode>*($T1*)((char*)myData->DataPtr + $i * myItemSize)</ValueNode>
</IndexListItems>
<IndexListItems Condition="myData->Length&gt;=myLength">
<Size>myLength</Size>
<ValueNode>*($T1*)((char*)myData->DataPtr + $i * myItemSize)</ValueNode>
</IndexListItems>
</Expand>
</Type>
<Type Name="NCollection_List&lt;*&gt;">
<DisplayString>NCollection_List [{myLength}]</DisplayString>
<Expand>
<LinkedListItems>
<Size>myLength</Size>
<HeadPointer>myFirst</HeadPointer>
<NextPointer>myNext</NextPointer>
<ValueNode>*($T1*)(sizeof(NCollection_ListNode) + ((char *)this))</ValueNode>
</LinkedListItems>
</Expand>
</Type>
<Type Name="Bnd_B2f">
<AlternativeType Name="Bnd_B2d"></AlternativeType>
<DisplayString Condition="myCenter[0] &gt; 1000000000000000000.">VOID</DisplayString>
<DisplayString Condition="myCenter[0] &lt; 1000000000000000000.">
Center: [{(float)myCenter[0]} {(float)myCenter[1]}], hSize: [{(float)myHSize[0]} {(float)myHSize[1]}]
</DisplayString>
</Type>
<Type Name="Bnd_B3f">
<AlternativeType Name="Bnd_B3d"></AlternativeType>
<DisplayString Condition="myCenter[0] &gt; 1000000000000000000.">VOID</DisplayString>
<DisplayString Condition="myCenter[0] &lt; 1000000000000000000.">
Center: [{(float)myCenter[0]} {(float)myCenter[1]} {(float)myCenter[2]}], hSize: [{(float)myHSize[0]} {(float)myHSize[1]} {(float)myHSize[2]}]
</DisplayString>
</Type>
<Type Name="TDF_Label">
<DisplayString Condition="myLabelNode==0">NULL</DisplayString>
<DisplayString Condition="myLabelNode!=0">[:{myLabelNode->myTag}]</DisplayString>
<Expand>
<ExpandedItem>*myLabelNode</ExpandedItem>
</Expand>
</Type>
<Type Name="TDF_LabelNode">
<DisplayString>[:{myTag}]</DisplayString>
<Expand>
<Item Name="brother" Condition="myBrother!=0">* myBrother</Item>
<Item Name="child" Condition="myFirstChild!=0">* myFirstChild</Item>
<ExpandedItem>myFirstAttribute</ExpandedItem>
</Expand>
</Type>
<Type Name="Handle_TDF_Attribute">
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
<DisplayString Condition="entity!=0x00000000">
[transaction={((TDF_Attribute*)entity)->myTransaction}]
</DisplayString>
<Expand>
<!--Item Name="next" Condition="myNext.entity!=0x00000000">myNext</Item-->
<ExpandedItem>(TDF_Attribute*)entity</ExpandedItem>
</Expand>
</Type>
<Type Name="OpenGl_Context">
<DisplayString>[{myGlVerMajor}.{myGlVerMinor}]</DisplayString>
</Type>
</AutoVisualizer>

View File

@@ -3,16 +3,16 @@
The following documents provide information on OCCT building, development and testing:
* @subpage occt_dev_guides__building "Building OCCT from sources"
* @subpage occt_dev_guides__documentation "Documentation system"
* @subpage occt_dev_guides__coding_rules "Coding Rules"
* @subpage occt_dev_guides__contribution_workflow "Contribution Workflow"
* @subpage occt_dev_guides__git_guide "Guide to installing and using Git for OCCT development"
* @subpage occt_dev_guides__tests "Automatic Testing system"
* @subpage occt_dev_guides__debug "Debugging tools and hints"
* @subpage dev_guides__building "Building OCCT from sources"
* @subpage dev_guides__documentation "Documentation system"
* @subpage dev_guides__coding_rules "Coding Rules"
* @subpage dev_guides__contribution_workflow "Contribution Workflow"
* @subpage dev_guides__git_guide "Guide to installing and using Git for OCCT development"
* @subpage dev_guides__tests "Automatic Testing system"
* @subpage dev_guides__debug "Debugging tools and hints"
Two other documents provide details on obsolete technologies used by OCCT,
to be removed in future releases:
* @subpage occt_dev_guides__wok "Workshop Organization Kit (WOK)"
* @subpage occt_dev_guides__cdl "Component Definition Language (CDL)"
* @subpage dev_guides__wok "Workshop Organization Kit (WOK)"
* @subpage dev_guides__cdl "Component Definition Language (CDL)"

View File

@@ -1,4 +1,4 @@
Documentation System {#occt_dev_guides__documentation}
Documentation System {#dev_guides__documentation}
======================
@tableofcontents
@@ -17,9 +17,6 @@ Version 8.5 or 8.6: http://www.tcl.tk/software/tcltk/download.html
**Doxygen**
Version 1.8.4 or above: http://www.stack.nl/~dimitri/doxygen/download.html
**Dot**
Part of Graphviz software, used by Doxygen for generation of class diagrams in Reference Manual: http://www.graphviz.org/Download..php
**MiKTeX** or other package providing **pdflatex** command (only needed for generation of PDF documents): http://miktex.org/download
**Inkscape** (only needed for generation of PDF documents containing SVG images): http://www.inkscape.org/download
@@ -43,52 +40,40 @@ See \ref OCCT_DM_SECTION_A_9 for more details on inserting mathematical expressi
@section OCCT_DM_SECTION_2_1 Documentation Generation
Run command *gendoc* from command prompt (with OCCT directory as current one) to generate OCCT documentation.
The synopsis is:
Run *gendoc.bat* from OCCT directory to generate all documents defined in *FILES.txt*:
gendoc \[-h\] {-refman|-overview} \[-html|-pdf|-chm\] \[-m=<list of modules>|-ug=<list of docs>\] \[-v\] \[-s=<search_mode>\] \[-mathjax=<path>\]
Here the options are:
*gendoc.bat* can be started with the following options:
* Choice of documentation to be generated:
* <i>-overview</i>: To generate Overview and User Guides (cannot be used with -refman)
* <i>-refman</i>: To generate class Reference Manual (cannot be used with -overview)
* <i>-html</i> : Generates HTML files (cannot be used with -pdf);
* <i>-pdf</i> : Generates PDF files (cannot be used with -html);
* <i>-m=\<modules_list\></i> : Specifies the list of documents to generate. If it is not specified, all files mentioned in *FILES.txt* are processed;
* <i>-l=\<document_name\></i> : Specifies the output document title;
* <i>-mathjax=\<path\></i> : Specifies the path to a non-default location of MathJAX;
* <i>-h</i> : Prints a help message;
* <i>-v</i> : Toggles the Verbose mode (info on all script actions is shown).
* Choice of output format:
* <i>-html</i>: To generate HTML files (default, cannot be used with -pdf or -chm)
* <i>-pdf</i>: To generate PDF files (cannot be used with -refman, -html, or -chm)
* <i>-chm</i>: To generate CHM files (cannot be used with -html or -pdf)
* Additional options:
* <i>-m=\<modules_list\></i>: List of OCCT modules (separated with comma), for generation of Reference Manual
* <i>-ug=\<docs_list\></i>: List of MarkDown documents (separated with comma), to use for generation of Overview / User Guides
* <i>-mathjax=\<path\></i>: To use local or alternative copy of MathJax
* <i>-s=\<search_mode\></i>: Specifies the Search mode of HTML documents; can be: none | local | server | external
* <i>-h</i>: Prints this help message
* <i>-v</i>: Enables more verbose output
If you run the command without arguments (like in the example above) it will generate HTML documentation for all documents defined in *FILES.txt*.
**Note**
* In case of PDF output the utility generates a separate PDF file for each document;
* In case of HTML output the utility generates a common Table of contents containing references to all documents.
* In case of CHM output single CHM file is generated
**Examples**
* In case of a PDF output the utility generates a separate PDF file for each document;
* In case of an HTML output the utility generates a common Table of contents containing references to all documents.
To generate the output for a specific document specify the path to the corresponding MarkDown file (paths relative to *dox* sub-folder can be given), for instance:
~~~~
> gendoc -overview -ug=dev_guides/documentation/documentation.md
% gendoc.bat -html -m=dev_guides/documentation/documentation.md
~~~~
To generate Reference Manual for the whole Open CASCADE Technology library, run:
Multiple files can be separated with commas:
~~~~
> gendoc -refman
% gendoc.bat -html -m=MD_FILE_1,MD_FILE_2
~~~~
To generate Reference Manual for Foundation Classes and Modeling Data modules only, with search option, run:
Use quotes to specify an article name with <i>-l</i> option, which helps to prevent incorrect interpretation of white spaces:
~~~~
> gendoc -refman -m=FoundationClasses,ModelingData,ModelingAlgorithms -s=local
% gendoc.bat -pdf -m=MD_FILE_1 -l="Label of MD_FILE_1 document"
~~~~
@section OCCT_DM_SECTION_3 Documentation Conventions

View File

@@ -1,4 +1,4 @@
Guide to installing and using Git for OCCT development {#occt_dev_guides__git_guide}
Guide to installing and using Git for OCCT development {#dev_guides__git_guide}
=================================
@tableofcontents
@@ -121,7 +121,7 @@ The official repository contains:
If you prefer to work with the English interface, remove or rename .msg localization file
in subdirectories *share/git-gui/lib/msgs* and *share/gitk/lib/msgs* of the Git installation directory.
Before the first commit to the OCCT repository, make sure that your User Name in the Git configuration file (file <i>.gitconfig</i> in the <i>$HOME</i> directory) is equal to your username on the OCCT development portal.
Before the first commit to the OCCT repository, make sure that your User Name in the Git configuration file (file *.gitconfig* in the $HOME directory) is equal to your username on the OCCT development portal.
@subsubsection occt_gitguide_2_1_2 Installation and configuration of TortoiseGit
@@ -150,14 +150,14 @@ The official repository contains:
* After the installation select Start -> Programs -> TortoiseGit Settings to configure TortoiseGit.
Select Git->Config to add your user name and Email address to the local <i>.gitconfig</i> file
Select Git->Config to add your user name and Email address to the local .gitconfig file
@image html OCCT_GitGuide_V2_image006.png
@image latex OCCT_GitGuide_V2_image006.png
@subsection occt_gitguide_2_2 Linux platform
We assume that Linux users have Git already installed and available in the *PATH*.
We assume that Linux users have Git already installed and available in the PATH.
Make sure to configure Git so that the user name is equal to your username
on the OCCT development portal, and set SafeCrLf option to true:
@@ -190,7 +190,7 @@ The official repository contains:
It is highly recommended to use the tools that come
with the chosen Git client for generation of SSH keys.
Using incompatible tools (e.g. *ssh-keygen.exe* from Cygwin for code generation,
Using incompatible tools (e.g. ssh-keygen.exe from Cygwin for code generation,
and TortoiseGit GUI with a default Putty client for connection to server)
may lead to authentication problems.
@@ -201,8 +201,8 @@ The official repository contains:
Use this option if you have installed TortoiseGit (or other GUI Git client on Windows)
and have chosen “TortoisePLink” (or other Putty client) as SSH client during installation.
To generate the key with this client, run **Puttygen** (e.g. from Start menu -> TortoiseGit -> Puttygen),
then click **Generate** and move mouse cursor over the blank area until the key is generated.
To generate the key with this client, run Puttygen (e.g. from Start menu -> TortoiseGit -> Puttygen),
then click Generate and move mouse cursor over the blank area until the key is generated.
@image html OCCT_GitGuide_V2_image007.png "Putty key generator"
@image latex OCCT_GitGuide_V2_image007.png "Putty key generator"
@@ -221,7 +221,7 @@ The official repository contains:
during installation of TortoiseGit (or other Windows tool).
Make sure that you have *ssh* and *ssh-keygen* commands in the path.
On Windows, you might need to start **Git Bash** command prompt window.
On Windows, you might need to start 'Git Bash' command prompt window provided by Git for Windows.
Use the following command to generate SSH keys:
~~~~~
@@ -230,14 +230,14 @@ The official repository contains:
The last argument is an optional comment, which can be included with the public key and used to distinguish between different keys (if you have many). The common practice is to put here your mail address or workstation name.
The command will ask you where to store the keys. It is recommended to accept the default path <i>$HOME/.ssh/id_rsa</i>. Just press **Enter** for that. You will be warned if a key is already present in the specified file; you can either overwrite it by the new one, or stop generation and use the old key.
The command will ask you where to store the keys. It is recommended to accept the default path *$HOME/.ssh/id_rsa*. Just press Enter for that. You will be warned if a key is already present in the specified file; you can either overwrite it by the new one, or stop generation and use the old key.
If you want to be on the safe side, enter password to encrypt the private key. You will be asked to enter this password each time you use that key (e.g. access a remote Git repository), unless you use the tool that caches the key (like TortoiseGit). If you do not want to bother, enter an empty string.
On Windows, make sure to note the complete path to the generated files (the location of your $HOME might be not obvious). Two key files will be created in the specified location (by default in $HOME/.ssh/):
* *id_rsa* - private key
* *id_rsa.pub* - public key
* id_rsa.pub - public key
The content of the public key file (one text line) is the key to be added to the user account on the site (see below).
@@ -265,7 +265,7 @@ Click on that tab, then click **Add a public key**, and paste the text of the pu
to update the configuration after the new key is added.
After that time, you can try accessing Git.
@section occt_gitguide_4 Work with repository: developer operations
@section occt_gitguide_4 WORK WITH REPOSITORY: DEVELOPER OPERATIONS
@subsection occt_gitguide_4_1 General workflow
@@ -307,7 +307,7 @@ Click on that tab, then click **Add a public key**, and paste the text of the pu
> git clone gitolite@git.dev.opencascade.org:occt <path>
~~~~~
where <i>\<path\></i> is the path to the new folder which will be created for the repository.
where <i><path></i> is the path to the new folder which will be created for the repository.
* In TortoiseGit: create a new folder, open it and right-click in the Explorer window, then choose **Git Clone** in the context menu:
@@ -396,7 +396,7 @@ In TortoiseGit:
@image latex OCCT_GitGuide_V2_image014.png
Unstaged files will be shown if you check the option Show Unversioned Files.
Double-click on each modified file to see the changes to be committed (as a difference vs. the base version).
Double-clock on each modified file to see the changes to be committed (as a difference vs. the base version).
@subsection occt_gitguide_4_6 Pushing branch to the remote repository
@@ -504,7 +504,7 @@ Rebasing is a good occasion to clean-up the history of commits in the branch. Co
To rebase your branch into a single commit, you need to do the following:
* Switch to your branch (e.g. “CR12345”)
* In TortoiseGit history log, select a branch to rebase on <i>(remotes/origin/master)</i> and in the context menu choose **Rebase “CR12345” onto this**.
* In TortoiseGit history log, select a branch to rebase on *(remotes/origin/master)* and in the context menu choose **Rebase “CR12345” onto this**.
* In the **Rebase** dialog, check **Squash All**. You can also change the order of commits and define for each commit whether it should be kept (**Pick**), edited, or just skipped.
@image html OCCT_GitGuide_V2_image023.png

View File

@@ -1,4 +1,4 @@
Automated Testing System {#occt_dev_guides__tests}
Automated Testing System {#dev_guides__tests}
======================================
@tableofcontents
@@ -11,7 +11,7 @@ Reading the Introduction is sufficient for OCCT developers to use the test syste
@subsection testmanual_1_1 Basic Information
OCCT automatic testing system is organized around DRAW Test Harness @ref occt_user_guides__test_harness "DRAW Test Harness", a console application based on Tcl (a scripting language) interpreter extended by OCCT-related commands.
OCCT automatic testing system is organized around DRAW Test Harness @ref user_guides__test_harness "DRAW Test Harness", a console application based on Tcl (a scripting language) interpreter extended by OCCT-related commands.
Standard OCCT tests are included with OCCT sources and are located in subdirectory *tests* of the OCCT root folder. Other test folders can be included in the test system, e.g. for testing applications based on OCCT.
@@ -56,9 +56,9 @@ return ;# this is to avoid an echo of the last command above in cout
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note that variable *CSF_TestDataPath* is set to default value at DRAW start, pointing at the folder <i>$CASROOT/data</i>.
In this example, subdirectory <i>d:/occt/test-data</i> is added to this path. Similar code could be used on Linux and Mac OS X except that on non-Windows platforms colon ":" should be used as path separator instead of semicolon ";".
In this example, subdirectory <i>d:/occt/test-data</i> is added to this path. Similar code could be used on Linux and Mac OS X except that on non-Windows platforms colon : should be used as path separator instead of semicolon ;.
All tests are run from DRAW command prompt (run *draw.tcl* or *draw.sh* to start it).
All tests are run from DRAW command prompt (run *draw.tcl* or *draw.sh *to start it).
@subsubsection testmanual_1_3_2 Running Tests
@@ -70,13 +70,12 @@ Example:
Draw[]> testgrid
~~~~~
For running only a subset of test cases, give masks for group, grid, and test case names to be executed.
Each argument is a list of comma- or space-separated file masks; by default "*" is assumed.
For running only a group or a grid of tests, give additional arguments indicating followed by path to the group and (if needed) the grid name.
Example:
~~~~~
Draw[]> testgrid bugs caf,moddata*,xde
Draw[]> testgrid blend simple
~~~~~
@@ -107,7 +106,7 @@ If necessary, a non-default output directory can be specified using option <i>
Example:
~~~~~
Draw[]> testgrid -outdir d:/occt/last_results -overwrite
Draw[]> testgrid outdir d:/occt/last_results -overwrite
~~~~~
In the output directory, a cumulative HTML report summary.html provides links to reports on each test case. An additional report in JUnit-style XML format can be output for use in Jenkins or other continuous integration system.
@@ -118,20 +117,18 @@ For example:
~~~~~
Draw[3]> help testgrid
testgrid: Run all tests, or specified group, or one grid
Use: testgrid [groupmask [gridmask [casemask]]] [options...]
Use: testgrid [group [grid]] [options...]
Allowed options are:
-parallel N: run N parallel processes (default is number of CPUs, 0 to disable)
-refresh N: save summary logs every N seconds (default 60, minimal 1, 0 to disable)
-outdir dirname: set log directory (should be empty or non-existing)
-overwrite: force writing logs in existing non-empty directory
-xml filename: write XML report for Jenkins (in JUnit-like format)
Groups, grids, and test cases to be executed can be specified by list of file
masks, separated by spaces or comma; default is all (*).
~~~~~
@subsubsection testmanual_1_3_3 Running a Single Test
To run a single test, type command *test* followed by names of group, grid, and test case.
To run a single test, type command *test* followed by names of group, grid, and test case.
Example:
@@ -150,7 +147,7 @@ To see intermediate commands and their output during the test execution, add one
The detailed rules of creation of new tests are given in <a href="#testmanual_3">section 3</a>. The following short description covers the most typical situations:
Use prefix "bug" followed by Mantis issue ID and, if necessary, additional suffixes, for naming the test script and DRAW commands specific for this test case.
Use prefix bug followed by Mantis issue ID and, if necessary, additional suffixes, for naming the test script and DRAW commands specific for this test case.
1. If the test requires C++ code, add it as new DRAW command(s) in one of files in *QABugs* package. Note that this package defines macros *QVERIFY* and *QCOMPARE*, thus code created for QTest or GoogleTest frameworks can be used with minimal modifications.
2. Add script(s) for the test case in grid (subfolder) corresponding to the relevant OCCT module of the group bugs <i>($CASROOT/tests/bugs)</i>. See <a href="#testmanual_5_2">the correspondence map</a>.
@@ -159,7 +156,7 @@ Use prefix "bug" followed by Mantis issue ID and, if necessary, additional suffi
* Use command *locate_data_file* to get a path to data files used by test script. (Make sure to have this command not inside catch statement if it is used.)
* Use DRAW commands to reproduce the situation being tested.
* If test case is added to describe existing problem and the fix is not available, add TODO message for each error to mark it as known problem. The TODO statements must be specific so as to match the actually generated messages but not all similar errors.
* Make sure that in case of failure the test produces message containing word "Error" or other recognized by test system as error (see files parse.rules).
* Make sure that in case of failure the test produces message containing word Error or other recognized by test system as error (see files parse.rules).
4. If the test case uses data file(s) not yet present in the test database, these can be put to subfolder data of the test grid, and integrated to Git along with the test case.
5. Check that the test case runs as expected (test for fix: OK with the fix, FAILED without the fix; test for existing problem: BAD), and integrate to Git branch created for the issue.
@@ -273,9 +270,9 @@ Example:
if { [isdraw result] } {
checkshape result
} else {
puts "Error: The result shape can not be built"
puts *Error: The result shape can not be built*
}
puts "TEST COMPLETED"
puts *TEST COMPLETED*
~~~~~
@subsubsection testmanual_2_2_5 File "parse.rules"
@@ -605,7 +602,7 @@ Note that on older versions of OCCT the tests are run in compatibility mode and
You can extend the test system by adding your own tests. For that it is necessary to add paths to the directory where these tests are located, and one or more additional data directories, to the environment variables *CSF_TestScriptsPath* and *CSF_TestDataPath*. The recommended way for doing this is using DRAW configuration file *DrawAppliInit* located in the directory which is current by the moment of DRAW start-up.
Use Tcl command <i>_path_separator</i> to insert a platform-dependent separator to the path list.
Use Tcl command *_path_separator* to insert a platform-dependent separator to the path list.
For example:
~~~~~
@@ -620,8 +617,7 @@ return ;# this is to avoid an echo of the last command above in cout
For better efficiency, on computers with multiple CPUs the tests can be run in parallel mode. This is default behavior for command *testgrid* : the tests are executed in parallel processes (their number is equal to the number of CPUs available on the system). In order to change this behavior, use option parallel followed by the number of processes to be used (1 or 0 to run sequentially).
Note that the parallel execution is only possible if Tcl extension package *Thread* is installed.
If this package is not available, *testgrid* command will output a warning message.
Note that the parallel execution is only possible if Tcl extension package *Thread* is installed. It is included in *ActiveTcl* package, but can be absent in some Linux distributions. If this package is not available, *testgrid* command will output a warning message.
@subsection testmanual_4_4 Checking non-regression of performance, memory, and visualization
@@ -635,12 +631,12 @@ testdiff dir1 dir2 [groupname [gridname]] [options...]
Here *dir1* and *dir2* are directories containing logs of two test runs.
Possible options are:
* <i>-save \<filename\> </i> - saves the resulting log in a specified file (<i>$dir1/diff-$dir2.log</i> by default). HTML log is saved with the same name and extension .html;
* <i>-save <filename> </i> - saves the resulting log in a specified file (<i>$dir1/diff-$dir2.log</i> by default). HTML log is saved with the same name and extension .html;
* <i>-status {same|ok|all}</i> - allows filtering compared cases by their status:
* *same* - only cases with same status are compared (default);
* *ok* - only cases with OK status in both logs are compared;
* *all* - results are compared regardless of status;
* <i>-verbose \<level\> </i> - defines the scope of output data:
* <i>-verbose <level> </i> - defines the scope of output data:
* 1 - outputs only differences;
* 2 - additionally outputs the list of logs and directories present in one of directories only;
* 3 - (by default) additionally outputs progress messages;
@@ -829,7 +825,7 @@ DRAW module: XSDRAW
@subsubsection testmanual_5_1_11 mesh
This group allows testing shape tessellation (*BRepMesh*) and shading.
This group allows testing shape tessellation (*BRepMesh)) and shading.
DRAW modules: MODELING (package *MeshTest*), VISUALIZATION (package *ViewerTest*)
@@ -947,7 +943,7 @@ This group allows testing extended data exchange packages.
| Data Exchange | TKSTEPBase, TKSTEPAttr, TKSTEP209, TKSTEP | step |
| Data Exchange | TKSTL, TKVRML | stlvrml |
| Data Exchange | TKXSBase, TKXCAF, TKXCAFSchema, TKXDEIGES, TKXDESTEP, TKXmlXCAF, TKBinXCAF | xde |
| Foundation Classes | TKernel, TKMath | fclasses |
| Foundation Classes | TKernel, TKMath, TKAdvTools | fclasses |
| Modeling_algorithms | TKGeomAlgo, TKTopAlgo, TKPrim, TKBO, TKBool, TKHLR, TKFillet, TKOffset, TKFeat, TKXMesh | modalg |
| Modeling Data | TKG2d, TKG3d, TKGeomBase, TKBRep | moddata |
| Visualization | TKService, TKV2d, TKV3d, TKOpenGl, TKMeshVS, TKNIS, TKVoxel | vis |

File diff suppressed because it is too large Load Diff

View File

@@ -1,521 +0,0 @@
License {#occt_public_license}
=======
Open CASCADE Technology is available under GNU Lesser General Public License
(LGPL) version 2.1 with additional exception.
@section license_lgpl_21 GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
### Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- 0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
1. The modified work must itself be a software library.
2. You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
3. You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
4. If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
1. Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
2. Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
3. Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
4. If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
5. Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
1. Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
2. Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
**NO** **WARRANTY**
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
### END OF TERMS AND CONDITIONS
### How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
@section occt_lgpl_exception OPEN CASCADE EXCEPTION
### Open CASCADE Exception (version 1.0) to GNU LGPL version 2.1.
The object code (i.e. not a source) form of a "work that uses the Library"
can incorporate material from a header file that is part of the Library.
As a special exception to the GNU Lesser General Public License version 2.1,
you may distribute such object code incorporating material from header files
provided with the Open CASCADE Technology libraries (including code of CDL
generic classes) under terms of your choice, provided that you give
prominent notice in supporting documentation to this code that it makes use
of or is based on facilities provided by the Open CASCADE Technology software.

875
dox/occdoc.tcl Normal file
View File

@@ -0,0 +1,875 @@
# -----------------------------------------------------------------------
# Script name: CompileDocs.tcl
# This script compiles OCCT documents from *.md files to HTML pages
# Author: omy
# -----------------------------------------------------------------------
# get OCCT version from file Standard_Version.hxx (if available)
proc OverviewDoc_DetectCasVersion {theCasRoot} {
set occt_ver 6.7.0
set occt_ver_add ""
if { [file exist $theCasRoot/src/Standard/Standard_Version.hxx] } {
set fh [open $theCasRoot/src/Standard/Standard_Version.hxx]
set fh_loaded [read $fh]
close $fh
regexp {[^/]\s*#\s*define\s+OCC_VERSION_COMPLETE\s+\"([^\s]*)\"} $fh_loaded dummy occt_ver
regexp {[^/]\s*#\s*define\s+OCC_VERSION_DEVELOPMENT\s+\"([^\s]*)\"} $fh_loaded dummy occt_ver_add
if { "$occt_ver_add" != "" } { set occt_ver ${occt_ver}.$occt_ver_add }
}
return $occt_ver
}
# Generates Doxygen configuration file for Overview documentation
proc OverviewDoc_MakeDoxyfile {casDir outDir tagFileDir {doxyFileName} {generatorMode ""} DocFilesList verboseMode searchMode hhcPath mathjaxLocation} {
set doxyFile [open $doxyFileName "w"]
set casroot $casDir
set inputDir $casDir/dox
# Common configs
puts $doxyFile "DOXYFILE_ENCODING = UTF-8"
puts $doxyFile "PROJECT_NAME = \"Open CASCADE Technology\""
puts $doxyFile "PROJECT_NUMBER = [OverviewDoc_DetectCasVersion $casDir]"
puts $doxyFile "PROJECT_BRIEF = "
puts $doxyFile "PROJECT_LOGO = $inputDir/resources/occ_logo.png"
puts $doxyFile "OUTPUT_DIRECTORY = $outDir"
puts $doxyFile "CREATE_SUBDIRS = NO"
puts $doxyFile "OUTPUT_LANGUAGE = English"
puts $doxyFile "ABBREVIATE_BRIEF = \"The \$name class\" \
\"The \$name widget\" \
\"The \$name file\" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the"
puts $doxyFile "FULL_PATH_NAMES = YES"
puts $doxyFile "INHERIT_DOCS = YES"
puts $doxyFile "TAB_SIZE = 4"
puts $doxyFile "MARKDOWN_SUPPORT = YES"
puts $doxyFile "EXTRACT_ALL = YES"
puts $doxyFile "CASE_SENSE_NAMES = NO"
puts $doxyFile "INLINE_INFO = YES"
puts $doxyFile "SORT_MEMBER_DOCS = YES"
puts $doxyFile "WARNINGS = YES"
puts $doxyFile "WARN_IF_UNDOCUMENTED = YES"
puts $doxyFile "WARN_IF_DOC_ERROR = YES"
puts $doxyFile "WARN_NO_PARAMDOC = NO"
puts $doxyFile "WARN_FORMAT = \"\$file:\$line: \$text\""
puts $doxyFile "INPUT_ENCODING = UTF-8"
puts $doxyFile "FILE_PATTERNS = *.md *.dox "
puts $doxyFile "RECURSIVE = YES"
puts $doxyFile "SOURCE_BROWSER = NO"
puts $doxyFile "INLINE_SOURCES = YES"
puts $doxyFile "COLS_IN_ALPHA_INDEX = 5"
# Generation options
puts $doxyFile "GENERATE_DOCSET = NO"
puts $doxyFile "GENERATE_CHI = NO"
puts $doxyFile "GENERATE_QHP = NO"
puts $doxyFile "GENERATE_ECLIPSEHELP = NO"
puts $doxyFile "GENERATE_RTF = NO"
puts $doxyFile "GENERATE_MAN = NO"
puts $doxyFile "GENERATE_XML = NO"
puts $doxyFile "GENERATE_DOCBOOK = NO"
puts $doxyFile "GENERATE_AUTOGEN_DEF = NO"
puts $doxyFile "GENERATE_PERLMOD = NO"
# Keep doxygen comments within code blocks
puts $doxyFile "STRIP_CODE_COMMENTS = NO"
# Define alias for inserting images to both HRML and PDF at once
puts $doxyFile "ALIASES += figure\{1\}=\"\\image html \\1 \\n \\image latex \\1\""
puts $doxyFile "ALIASES += figure\{2\}=\"\\image html \\1 \\2 \\n \\image latex \\1 \\2\""
set PARAM_INPUT "INPUT ="
set PARAM_IMAGEPATH "IMAGE_PATH = $inputDir/resources/ "
foreach docFile $DocFilesList {
set NEW_IMG_PATH [file normalize [file dirname "$inputDir/$docFile"]]
if { [string compare $NEW_IMG_PATH $casroot] != 0 } {
if {[file isdirectory "$NEW_IMG_PATH/images"]} {
append PARAM_IMAGEPATH " $NEW_IMG_PATH/images"
}
}
append PARAM_INPUT " " $inputDir/$docFile
}
puts $doxyFile $PARAM_INPUT
puts $doxyFile $PARAM_IMAGEPATH
if { $generatorMode == "HTML_ONLY"} {
# Set a reference to a TAGFILE
if { $tagFileDir != "" } {
if {[file exists $tagFileDir/OCCT.tag] == 1} {
set tagPath [OverviewDoc_GetRelPath $tagFileDir $outDir/html]
puts $doxyFile "TAGFILES = $tagFileDir/OCCT.tag=$tagPath/html"
}
}
# HTML Output
puts $doxyFile "GENERATE_LATEX = NO"
puts $doxyFile "GENERATE_HTMLHELP = NO"
puts $doxyFile "GENERATE_HTML = YES"
puts $doxyFile "HTML_COLORSTYLE_HUE = 220"
puts $doxyFile "HTML_COLORSTYLE_SAT = 100"
puts $doxyFile "HTML_COLORSTYLE_GAMMA = 80"
puts $doxyFile "HTML_TIMESTAMP = YES"
puts $doxyFile "HTML_DYNAMIC_SECTIONS = YES"
puts $doxyFile "HTML_INDEX_NUM_ENTRIES = 100"
puts $doxyFile "DISABLE_INDEX = YES"
puts $doxyFile "GENERATE_TREEVIEW = YES"
puts $doxyFile "ENUM_VALUES_PER_LINE = 8"
puts $doxyFile "TREEVIEW_WIDTH = 250"
puts $doxyFile "EXTERNAL_PAGES = NO"
# HTML Search engine options
if { [string tolower $searchMode] == "none" } {
puts $doxyFile "SEARCHENGINE = NO"
puts $doxyFile "SERVER_BASED_SEARCH = NO"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} else {
puts $doxyFile "SEARCHENGINE = YES"
if { [string tolower $searchMode] == "local" } {
puts $doxyFile "SERVER_BASED_SEARCH = NO"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} elseif { [string tolower $searchMode] == "server" } {
puts $doxyFile "SERVER_BASED_SEARCH = YES"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} elseif { [string tolower $searchMode] == "external" } {
puts $doxyFile "SERVER_BASED_SEARCH = YES"
puts $doxyFile "EXTERNAL_SEARCH = YES"
} else {
puts "ERROR: Wrong search engine type"
close $doxyFile
return
}
}
puts $doxyFile "SEARCHDATA_FILE = searchdata.xml"
puts $doxyFile "SKIP_FUNCTION_MACROS = YES"
# Formula options
puts $doxyFile "FORMULA_FONTSIZE = 12"
puts $doxyFile "FORMULA_TRANSPARENT = YES"
puts $doxyFile "USE_MATHJAX = YES"
puts $doxyFile "MATHJAX_FORMAT = HTML-CSS"
puts $doxyFile "MATHJAX_RELPATH = ${mathjaxLocation}"
} elseif { $generatorMode == "CHM_ONLY"} {
puts $doxyFile "GENERATE_HTMLHELP = YES"
puts $doxyFile "CHM_FILE = ../../overview.chm"
puts $doxyFile "HHC_LOCATION = \"$hhcPath\""
puts $doxyFile "DISABLE_INDEX = YES"
# Formula options
puts $doxyFile "FORMULA_FONTSIZE = 12"
puts $doxyFile "FORMULA_TRANSPARENT = YES"
puts $doxyFile "USE_MATHJAX = YES"
puts $doxyFile "MATHJAX_FORMAT = HTML-CSS"
puts $doxyFile "MATHJAX_RELPATH = ${mathjaxLocation}"
} elseif { $generatorMode == "PDF_ONLY"} {
puts $doxyFile "GENERATE_HTMLHELP = NO"
puts $doxyFile "GENERATE_HTML = NO"
puts $doxyFile "DISABLE_INDEX = YES"
puts $doxyFile "GENERATE_TREEVIEW = NO"
puts $doxyFile "PREDEFINED = PDF_ONLY"
puts $doxyFile "GENERATE_LATEX = YES"
puts $doxyFile "COMPACT_LATEX = YES"
puts $doxyFile "PDF_HYPERLINKS = YES"
puts $doxyFile "USE_PDFLATEX = YES"
puts $doxyFile "LATEX_BATCHMODE = YES"
puts $doxyFile "LATEX_OUTPUT = latex"
puts $doxyFile "LATEX_CMD_NAME = latex"
puts $doxyFile "MAKEINDEX_CMD_NAME = makeindex"
}
close $doxyFile
}
# Returns the relative path between two directories
proc OverviewDoc_GetRelPath {targetFile currentpath} {
set cc [file split [file normalize $currentpath]]
set tt [file split [file normalize $targetFile]]
if {![string equal [lindex $cc 0] [lindex $tt 0]]} {
# not on *n*x then
return -code error "$targetFile not on same volume as $currentpath"
}
while {[string equal [lindex $cc 0] [lindex $tt 0]] && [llength $cc] > 0} {
# discard matching components from the front
set cc [lreplace $cc 0 0]
set tt [lreplace $tt 0 0]
}
set prefix ""
if {[llength $cc] == 0} {
# just the file name, so targetFile is lower down (or in same place)
set prefix "."
}
# step up the tree
for {set i 0} {$i < [llength $cc]} {incr i} {
append prefix " .."
}
# stick it all together (the eval is to flatten the targetFile list)
return [eval file join $prefix $tt]
}
# Prints Help message
proc OverviewDoc_PrintHelpMessage {} {
puts "\nUsage : occdoc \[-h\] \[-html\] \[-pdf\] \[-m=<list of files>\] \[-l=<document name>\] \[-v\] \[-s\]"
puts ""
puts " Options are : "
puts " -html : To generate HTML files"
puts " (cannot be used with -pdf or -chm)"
puts " -pdf : To generate PDF files"
puts " (cannot be used with -html or chm)"
puts " -chm : To generate CHM files"
puts " (cannot be used with -html or pdf)"
puts " -hhc : To define path to hhc - chm generator"
puts " : is used with just -chm option"
puts " -m=<modules_list> : Specifies list of documents to generate."
puts " If it is not specified, all files "
puts " mentioned in FILES.txt are processed."
puts " -l=<document_name> : Specifies the document caption "
puts " for a single document"
puts " -h : Prints help message"
puts " -v : Specifies the Verbose mode"
puts " (info on all script actions is shown)"
puts " -s=<search_mode> : Specifies the Search mode of HTML documents."
puts " Can be: none | local | server | external"
puts " : Can be used only with -html option"
puts " -mathjax=<path> : To use local or alternative copy of MathJax"
}
# Parses command line arguments
proc OverviewDoc_ParseArguments {arguments} {
global args_names
global args_values
set args_names {}
array set args_values {}
foreach arg $arguments {
if {[regexp {^(-)[a-z]+$} $arg] == 1} {
set name [string range $arg 1 [string length $arg]-1]
lappend args_names $name
set args_values($name) "NULL"
continue
} elseif {[regexp {^(-)[a-z]+=.+$} $arg] == 1} {
set equal_symbol_position [string first "=" $arg]
set name [string range $arg 1 $equal_symbol_position-1]
lappend args_names $name
set value [string range $arg $equal_symbol_position+1 [string length $arguments]-1]
# To parse a list of values for -m parameter
if { [string first "," $value] != -1 } {
set value [split $value ","];
}
set args_values($name) $value
} else {
puts "Error in argument $arg"
return 1
}
}
return 0
}
# Loads a list of docfiles from file FILES.txt
proc OverviewDoc_LoadFilesList {} {
set INPUTDIR [file normalize [file dirname [info script]]]
global available_docfiles
set available_docfiles {}
# Read data from file
if { [file exists "$INPUTDIR/FILES.txt"] == 1 } {
set FILE [open "$INPUTDIR/FILES.txt" r]
while {1} {
set line [string trim [gets $FILE]]
# trim possible comments starting with '#'
set line [regsub {\#.*} $line {}]
if {$line != ""} {
lappend available_docfiles $line
}
if {[eof $FILE]} {
close $FILE
break
}
}
} else {
return -1
}
return 0
}
# Writes new tex file for conversion from tex to pdf for a specific doc
proc OverviewDoc_MakeRefmanTex {fileName latexDir docLabel verboseMode} {
if {$verboseMode == "YES"} {
puts "INFO: Making refman.tex file for $fileName"
}
set DOCNAME "$latexDir/refman.tex"
if {[file exists $DOCNAME] == 1} {
file delete -force $DOCNAME
}
set year [clock format [clock seconds] -format {%Y}]
set texfile [open $DOCNAME w]
puts $texfile "\\batchmode"
puts $texfile "\\nonstopmode"
puts $texfile "\\documentclass\[oneside\]{article}"
puts $texfile "\n% Packages required by doxygen"
puts $texfile "\\usepackage{calc}"
puts $texfile "\\usepackage{doxygen}"
puts $texfile "\\usepackage{graphicx}"
puts $texfile "\\usepackage\[utf8\]{inputenc}"
puts $texfile "\\usepackage{makeidx}"
puts $texfile "\\usepackage{multicol}"
puts $texfile "\\usepackage{multirow}"
puts $texfile "\\usepackage{textcomp}"
puts $texfile "\\usepackage{amsmath}"
puts $texfile "\\usepackage\[table\]{xcolor}"
puts $texfile "\\usepackage{indentfirst}"
puts $texfile ""
puts $texfile "% Font selection"
puts $texfile "\\usepackage\[T1\]{fontenc}"
puts $texfile "\\usepackage{mathptmx}"
puts $texfile "\\usepackage\[scaled=.90\]{helvet}"
puts $texfile "\\usepackage{courier}"
puts $texfile "\\usepackage{amssymb}"
puts $texfile "\\usepackage{sectsty}"
puts $texfile "\\renewcommand{\\familydefault}{\\sfdefault}"
puts $texfile "\\allsectionsfont{%"
puts $texfile " \\fontseries{bc}\\selectfont%"
puts $texfile " \\color{darkgray}%"
puts $texfile "}"
puts $texfile "\\renewcommand{\\DoxyLabelFont}{%"
puts $texfile " \\fontseries{bc}\\selectfont%"
puts $texfile " \\color{darkgray}%"
puts $texfile "}"
puts $texfile ""
puts $texfile "% Page & text layout"
puts $texfile "\\usepackage{geometry}"
puts $texfile "\\geometry{%"
puts $texfile " a4paper,%"
puts $texfile " top=2.5cm,%"
puts $texfile " bottom=2.5cm,%"
puts $texfile " left=2.5cm,%"
puts $texfile " right=2.5cm%"
puts $texfile "}"
puts $texfile "\\tolerance=750"
puts $texfile "\\hfuzz=15pt"
puts $texfile "\\hbadness=750"
puts $texfile "\\setlength{\\emergencystretch}{15pt}"
puts $texfile "\\setlength{\\parindent}{0cm}";#0.75cm
puts $texfile "\\setlength{\\parskip}{0.2cm}"; #0.2
puts $texfile "\\makeatletter"
puts $texfile "\\renewcommand{\\paragraph}{%"
puts $texfile " \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%"
puts $texfile "\\normalfont\\normalsize\\bfseries\\SS@parafont%"
puts $texfile " }%"
puts $texfile "}"
puts $texfile "\\renewcommand{\\subparagraph}{%"
puts $texfile " \\@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%"
puts $texfile "\\normalfont\\normalsize\\bfseries\\SS@subparafont%"
puts $texfile " }%"
puts $texfile "}"
puts $texfile "\\makeatother"
puts $texfile ""
puts $texfile "% Headers & footers"
puts $texfile "\\usepackage{fancyhdr}"
puts $texfile "\\pagestyle{fancyplain}"
puts $texfile "\\fancyhead\[LE\]{\\fancyplain{}{\\bfseries\\thepage}}"
puts $texfile "\\fancyhead\[CE\]{\\fancyplain{}{}}"
puts $texfile "\\fancyhead\[RE\]{\\fancyplain{}{\\bfseries\\leftmark}}"
puts $texfile "\\fancyhead\[LO\]{\\fancyplain{}{\\bfseries\\rightmark}}"
puts $texfile "\\fancyhead\[CO\]{\\fancyplain{}{}}"
puts $texfile "\\fancyhead\[RO\]{\\fancyplain{}{\\bfseries\\thepage}}"
puts $texfile "\\fancyfoot\[LE\]{\\fancyplain{}{}}"
puts $texfile "\\fancyfoot\[CE\]{\\fancyplain{}{}}"
puts $texfile "\\fancyfoot\[RE\]{\\fancyplain{}{\\bfseries\\scriptsize Copyright (c) Open CASCADE $year}}"
puts $texfile "\\fancyfoot\[LO\]{\\fancyplain{}{\\bfseries\\scriptsize Copyright (c) Open CASCADE $year}}"
puts $texfile "\\fancyfoot\[CO\]{\\fancyplain{}{}}"
puts $texfile "\\fancyfoot\[RO\]{\\fancyplain{}{}}"
puts $texfile "\\renewcommand{\\footrulewidth}{0.4pt}"
puts $texfile "\\renewcommand{\\sectionmark}\[1\]{%"
puts $texfile " \\markright{\\thesection\\ #1}%"
puts $texfile "}"
puts $texfile ""
puts $texfile "% Indices & bibliography"
puts $texfile "\\usepackage{natbib}"
puts $texfile "\\usepackage\[titles\]{tocloft}"
puts $texfile "\\renewcommand{\\cftsecleader}{\\cftdotfill{\\cftdotsep}}"
puts $texfile "\\setcounter{tocdepth}{3}"
puts $texfile "\\setcounter{secnumdepth}{5}"
puts $texfile "\\makeindex"
puts $texfile ""
puts $texfile "% Hyperlinks (required, but should be loaded last)"
puts $texfile "\\usepackage{ifpdf}"
puts $texfile "\\ifpdf"
puts $texfile " \\usepackage\[pdftex,pagebackref=true\]{hyperref}"
puts $texfile "\\else"
puts $texfile " \\usepackage\[ps2pdf,pagebackref=true\]{hyperref}"
puts $texfile "\\fi"
puts $texfile "\\hypersetup{%"
puts $texfile " colorlinks=true,%"
puts $texfile " linkcolor=black,%"
puts $texfile " citecolor=black,%"
puts $texfile " urlcolor=blue,%"
puts $texfile " unicode%"
puts $texfile "}"
puts $texfile ""
puts $texfile "% Custom commands"
puts $texfile "\\newcommand{\\clearemptydoublepage}{%"
puts $texfile " \\newpage{\\pagestyle{empty}\\cleardoublepage}%"
puts $texfile "}"
puts $texfile "\n"
puts $texfile "%===== C O N T E N T S =====\n"
puts $texfile "\\begin{document}"
puts $texfile ""
puts $texfile "% Titlepage & ToC"
puts $texfile "\\hypersetup{pageanchor=false}"
puts $texfile "\\pagenumbering{roman}"
puts $texfile "\\begin{titlepage}"
puts $texfile "\\vspace*{7cm}"
puts $texfile "\\begin{center}%"
puts $texfile "\\includegraphics\[width=0.75\\textwidth, height=0.2\\textheight\]{../../../dox/resources/occt_logo.png}\\\\"; #\\\\\\\\
puts $texfile "{\\Large Open C\\-A\\-S\\-C\\-A\\-D\\-E Technology \\\\\[1ex\]\\Large [OverviewDoc_DetectCasVersion $latexDir/../../../] }\\\\"
puts $texfile "\\vspace*{1cm}"
puts $texfile "{\\Large $docLabel}\\\\"
puts $texfile "\\vspace*{1cm}"
# puts $texfile "{\\large Generated by Doxygen 1.8.4}\\\\"
puts $texfile "\\vspace*{0.5cm}"
puts $texfile "{\\small \\today}\\"
puts $texfile "\\end{center}"
puts $texfile "\\end{titlepage}"
puts $texfile "\\clearpage"
puts $texfile "\\pagenumbering{roman}"
puts $texfile "\\tableofcontents"
puts $texfile "\\newpage"
puts $texfile "\\pagenumbering{arabic}"
puts $texfile "\\hypersetup{pageanchor=true}"
puts $texfile ""
puts $texfile "\\let\\stdsection\\section"
puts $texfile " \\renewcommand\\section{\\pagebreak\\stdsection}"
puts $texfile "\\hypertarget{$fileName}{}"
puts $texfile "\\input{$fileName}"
puts $texfile ""
puts $texfile "% Index"
puts $texfile "\\newpage"
puts $texfile "\\phantomsection"
puts $texfile "\\addcontentsline{toc}{part}{Index}"
puts $texfile "\\printindex\n"
puts $texfile "\\end{document}"
close $texfile
}
# Postprocesses generated TeX files
proc OverviewDoc_ProcessTex {{texFiles {}} {latexDir} verboseMode} {
foreach TEX $texFiles {
if {$verboseMode == "YES"} {
puts "INFO: Preprocessing file $TEX"
}
if {![file exists $TEX]} {
puts "file $TEX doesn't exist"
return
}
set IN_F [open "$TEX" r]
set TMPFILENAME "$latexDir/temp.tex"
set OUT_F [open $TMPFILENAME w]
while {1} {
set line [gets $IN_F]
if { [string first "\\includegraphics" $line] != -1 } {
# replace svg extension by pdf
set line [regsub {[.]svg} $line ".pdf"]
# Center images in TeX files
set line "\\begin{center}\n $line\n\\end{center}"
} elseif { [string first "\\subsection" $line] != -1 } {
# Replace \subsection with \section tag
regsub -all "\\\\subsection" $line "\\\\section" line
} elseif { [string first "\\subsubsection" $line] != -1 } {
# Replace \subsubsection with \subsection tag
regsub -all "\\\\subsubsection" $line "\\\\subsection" line
} elseif { [string first "\\paragraph" $line] != -1 } {
# Replace \paragraph with \subsubsection tag
regsub -all "\\\\paragraph" $line "\\\\subsubsection" line
}
puts $OUT_F $line
if {[eof $IN_F]} {
close $IN_F
close $OUT_F
break
}
}
file delete -force $TEX
file rename $TMPFILENAME $TEX
}
}
# Convert SVG files to PDF format to allow including them to PDF
# (requires InkScape to be in PATH)
proc OverviewDoc_ProcessSvg {latexDir verboseMode} {
foreach file [glob -nocomplain $latexDir/*.svg] {
if {$verboseMode == "YES"} {
puts "INFO: Converting file $file"
}
set pdffile "[file rootname $file].pdf"
if { [catch {exec inkscape -z -D --file=$file --export-pdf=$pdffile} res] } {
puts "Error: $res"
puts "Conversion failed; check that Inkscape is in PATH!"
puts "SVG images will be lost in PDF documents"
return
}
}
}
# Main procedure for documents compilation
proc OverviewDoc_Main { {docfiles {}} generatorMode docLabel verboseMode searchMode hhcPath mathjaxLocation} {
set INDIR [file normalize [file dirname [info script]]]
set CASROOT [file normalize [file dirname "$INDIR/../../"]]
set OUTDIR $CASROOT/doc
set PDFDIR $OUTDIR/overview/pdf
set HTMLDIR $OUTDIR/overview/html
set LATEXDIR $OUTDIR/overview/latex
set TAGFILEDIR $OUTDIR/refman
set DOXYFILE $OUTDIR/OCCT.cfg
# Create or clean the output folders
if {[file exists $OUTDIR] == 0} {
file mkdir $OUTDIR
}
if {[file exists $HTMLDIR] == 0} {
file mkdir $HTMLDIR
}
if {[file exists $PDFDIR] == 0} {
file mkdir $PDFDIR
}
if {[file exists $LATEXDIR]} {
#file delete {*}[glob -nocomplain $LATEXDIR/*.*]
file delete -force $LATEXDIR
}
file mkdir $LATEXDIR
# is MathJax HLink?
set mathjax_relative_location $mathjaxLocation
if { [file isdirectory "$mathjaxLocation"] == 1 } {
if { $generatorMode == "HTML_ONLY"} {
# related path
set mathjax_relative_location [relativePath $HTMLDIR $mathjaxLocation]
} elseif { $generatorMode == "CHM_ONLY"} {
# absolute path
set mathjax_relative_location [file normalize $mathjaxLocation]
}
}
# Run tools to compile documents
puts "[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generating Doxyfile..."
OverviewDoc_MakeDoxyfile $CASROOT "$OUTDIR/overview" $TAGFILEDIR $DOXYFILE $generatorMode $docfiles $verboseMode $searchMode $hhcPath $mathjax_relative_location
# Run doxygen tool
set starttimestamp [clock format [clock seconds] -format {%Y-%m-%d %H:%M}]
if { $generatorMode == "HTML_ONLY"} {
puts "$starttimestamp Generating HTML files..."
} elseif { $generatorMode == "CHM_ONLY" } {
puts "$starttimestamp Generating CHM file..."
}
set RESULT [catch {exec doxygen $DOXYFILE > $OUTDIR/doxygen_out.log} DOX_ERROR]
if {$RESULT != 0} {
if {[llength [split $DOX_ERROR "\n"]] > 1} {
if {$verboseMode == "YES"} {
puts "Error running Doxygen; see log in\n$OUTDIR/doxygen_warnings_and_errors.log"
}
set DOX_ERROR_FILE [open "$OUTDIR/doxygen_warnings_and_errors.log" "w"]
puts $DOX_ERROR_FILE $DOX_ERROR
close $DOX_ERROR_FILE
} else {
puts $DOX_ERROR
}
}
# Close the Doxygen application
after 300
# Start PDF generation routine
if { $generatorMode == "PDF_ONLY" } {
puts "[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generating PDF files..."
set OS $::tcl_platform(platform)
if { $OS == "unix" } {
set PREFIX ".sh"
} elseif { $OS == "windows" } {
set PREFIX ".bat"
}
# Prepare a list of TeX files, generated by Doxygen
cd $LATEXDIR
set TEXFILES [glob $LATEXDIR -type f -directory $LATEXDIR -tails "*.tex" ]
set REFMAN_IDX [lsearch $TEXFILES "refman.tex"]
set TEXFILES [lreplace $TEXFILES $REFMAN_IDX $REFMAN_IDX]
set IDX [lsearch $TEXFILES "$LATEXDIR"]
while { $IDX != -1} {
set TEXFILES [lreplace $TEXFILES $IDX $IDX]
set IDX [lsearch $TEXFILES "$LATEXDIR"]
}
if {$verboseMode == "YES"} {
puts "Preprocessing generated TeX files..."
}
OverviewDoc_ProcessTex $TEXFILES $LATEXDIR $verboseMode
if {$verboseMode == "YES"} {
puts "Converting SVG images to PNG format..."
}
OverviewDoc_ProcessSvg $LATEXDIR $verboseMode
if {$verboseMode == "YES"} {
puts "Generating PDF files from TeX files..."
}
foreach TEX $TEXFILES {
# Rewrite existing REFMAN.tex file...
set TEX [string range $TEX 0 [ expr "[string length $TEX] - 5"]]
OverviewDoc_MakeRefmanTex $TEX $LATEXDIR $docLabel $verboseMode
if {$verboseMode == "YES"} {
puts "INFO: Generating PDF file from $TEX"
# ...and use it to generate PDF from TeX...
puts "Executing $LATEXDIR/make$PREFIX..."
}
set RESULT [catch {eval exec [auto_execok $LATEXDIR/make$PREFIX] > "$OUTDIR/pdflatex_out.log"} LaTeX_ERROR]
if {$RESULT != 0} {
if {[llength [split $LaTeX_ERROR "\n"]] > 1} {
if {$verboseMode == "YES"} {
puts "Errors running Latex; see log in \n$OUTDIR/pdflatex_warnings_and_errors.log"
}
set LaTeX_ERROR_FILE [open "$OUTDIR/pdflatex_warnings_and_errors.log" "w"]
puts $LaTeX_ERROR_FILE $LaTeX_ERROR
close $LaTeX_ERROR_FILE
} else {
puts $DOX_ERROR
}
}
# ...and place it to the specific folder
if { [file exists $PDFDIR/$TEX.pdf] == 1 } {
file delete -force $PDFDIR/$TEX.pdf
}
if {![file exists "$LATEXDIR/refman.pdf"]} {
puts "Error: Latex failed to create $LATEXDIR/refman.pdf"
return
}
file rename $LATEXDIR/refman.pdf "$PDFDIR/$TEX.pdf"
}
}
cd $INDIR
puts "[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generation completed"
if { $generatorMode == "HTML_ONLY" } {
puts "View generated HTML documentation by opening:"
puts "$OUTDIR/overview/html/index.html"
}
if { $generatorMode == "PDF_ONLY" } {
puts "PDF files are generated in folder:"
puts "$OUTDIR/overview/pdf"
}
}
proc relativePath {thePathFrom thePathTo} {
if { [file isdirectory "$thePathFrom"] == 0 } {
return ""
}
set aPathFrom [file normalize "$thePathFrom"]
set aPathTo [file normalize "$thePathTo"]
set aCutedPathFrom "${aPathFrom}/dummy"
set aRelatedDeepPath ""
while { "$aCutedPathFrom" != [file normalize "$aCutedPathFrom/.."] } {
set aCutedPathFrom [file normalize "$aCutedPathFrom/.."]
# does aPathTo contain aCutedPathFrom?
regsub -all $aCutedPathFrom $aPathTo "" aPathFromAfterCut
if { "$aPathFromAfterCut" != "$aPathTo" } { # if so
if { "$aCutedPathFrom" == "$aPathFrom" } { # just go higher, for example, ./somefolder/someotherfolder
set aPathTo ".${aPathTo}"
} elseif { "$aCutedPathFrom" == "$aPathTo" } { # remove the last "/"
set aRelatedDeepPath [string replace $aRelatedDeepPath end end ""]
}
regsub -all $aCutedPathFrom $aPathTo $aRelatedDeepPath aPathToAfterCut
regsub -all "//" $aPathToAfterCut "/" aPathToAfterCut
return $aPathToAfterCut
}
set aRelatedDeepPath "$aRelatedDeepPath../"
}
return $thePathTo
}
# A command for User Documentation compilation
proc occdoc {args} {
# Programm options
set GEN_MODE "HTML_ONLY"
set DOCFILES {}
set DOCLABEL "Default OCCT Document"
set VERB_MODE "NO"
set SEARCH_MODE "none"
set hhcPath ""
set mathjax_location "http://cdn.mathjax.org/mathjax/latest"
set mathjax_js_name "MathJax.js"
global available_docfiles
global tcl_platform
global args_names
global args_values
global env
# Load list of docfiles
if { [OverviewDoc_LoadFilesList] != 0 } {
puts "ERROR: File FILES.txt was not found"
return
}
# Parse CL arguments
if {[OverviewDoc_ParseArguments $args] == 1} {
return
}
foreach arg_n $args_names {
if {$arg_n == "h"} {
OverviewDoc_PrintHelpMessage
return
} elseif {$arg_n == "html"} {
set GEN_MODE "HTML_ONLY"
} elseif {$arg_n == "chm"} {
set GEN_MODE "CHM_ONLY"
if {"$tcl_platform(platform)" == "windows" && [lsearch $args_names hhc] == -1} {
if { [info exist env(ProgramFiles\(x86\))] } {
set hhcPath "$env(ProgramFiles\(x86\))\\HTML Help Workshop\\hhc.exe"
puts "Info: hhc found: $hhcPath"
} elseif { [info exist env(ProgramFiles)] } {
set hhcPath "$env(ProgramFiles)\\HTML Help Workshop\\hhc.exe"
puts "Info: hhc found: $hhcPath"
}
if { ! [file exists $hhcPath] } {
puts "Error: HTML Help Compiler is not found in standard location [file dirname $hhcPath]; use option -hhc"
return
}
}
} elseif {$arg_n == "hhc"} {
global tcl_platform
if { $tcl_platform(platform) != "windows" } {
continue
}
if {$args_values(hhc) != "NULL"} {
set hhcPath $args_values(hhc)
if { [file isdirectory $hhcPath] } {
set hhcPath [file join ${hhcPath} hhc.exe]
}
if { ! [file exists $hhcPath] } {
puts "Error: HTML Help Compiler is not found in $hhcPath"
return
}
} else {
puts "Error in argument hhc"
return
}
} elseif {$arg_n == "pdf"} {
set GEN_MODE "PDF_ONLY"
} elseif {$arg_n == "v"} {
set VERB_MODE "YES"
} elseif {$arg_n == "m"} {
if {$args_values(m) != "NULL"} {
set DOCFILES $args_values(m)
} else {
puts "Error in argument m"
return
}
# Check if all chosen docfiles are correct
foreach docfile $DOCFILES {
if { [lsearch $available_docfiles $docfile] == -1 } {
puts "File \"$docfile\" is not presented in the list of available docfiles"
puts "Please, specify the correct docfile name"
return
} else {
puts "File $docfile is presented in FILES.TXT"
}
}
} elseif {$arg_n == "l"} {
if { [llength $DOCFILES] <= 1 } {
if {$args_values(l) != "NULL"} {
set DOCLABEL $args_values(l)
} else {
puts "Error in argument l"
return
}
}
} elseif {$arg_n == "s"} {
if {$args_values(s) != "NULL"} {
set SEARCH_MODE $args_values(s)
} else {
puts "Error in argument s"
return
}
} elseif {$arg_n == "mathjax"} {
if {![info exists args_values(pdf)]} {
set possible_mathjax_loc $args_values(mathjax)
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
set mathjax_location $args_values(mathjax)
puts "$mathjax_location"
} else {
puts "Warning: $mathjax_js_name isn't found in $possible_mathjax_loc."
puts " MathJax will be used from $mathjax_location"
}
} else {
puts "Info: MathJax is not used with pdf and will be ignored"
}
} else {
puts "\nWrong argument: $arg_n"
OverviewDoc_PrintHelpMessage
return
}
}
# Specify verbose mode
if { $GEN_MODE != "PDF_ONLY" && [llength $DOCFILES] > 1 } {
set DOCLABEL ""
}
# If we don't specify list for docfiles with -m argument,
# we assume that we have to generate all docfiles
if { [llength $DOCFILES] == 0 } {
set DOCFILES $available_docfiles
}
# Start main activities
OverviewDoc_Main $DOCFILES $GEN_MODE $DOCLABEL $VERB_MODE $SEARCH_MODE $hhcPath $mathjax_location
}

View File

@@ -1,4 +1,4 @@
Overview {#mainpage}
Overview {#mainpage}
========
@tableofcontents
@@ -58,7 +58,8 @@ OPEN CASCADE S.A.S.
**Windows** is a registered trademark of Microsoft Corporation in the United States and other countries.
**Mac** and the Mac logo are trademarks of Apple Inc., registered in the U.S. and other countries.
**Mac** and the Mac logo, **OpenCL** and the OpenCL logo, are trademarks of
Apple Inc., registered in the U.S. and other countries.
Acknowledgements
------------------
@@ -116,7 +117,14 @@ implementation of 3D viewer. OpenGL specification is developed by the
Khronos group, http://www.khronos.org/opengl/. OCCT code includes header
file *glext.h* obtained from Khronos web site.
**VTK** - The **Visualization Toolkit (VTK)** is an open-source, freely available software system for 3D computer graphics, image processing and visualization. OCCT VIS component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library. If you need further information on VTK, please, refer to VTK Homepage http://www.vtk.org/.
**OpenCL** (Open Computing Language) is open, royalty-free standard for
cross-platform, parallel programming of modern processors, optionally used by
OCCT for ray tracing. OpenCL specification is developed by the
Khronos group, http://www.khronos.org/opencl/. The implementations of OpenCL
are available from Apple, AMD, NVIDIA, Intel, and other vendors.
**OpenCL Installable Client Driver (ICD) Loader** is a library provided by
Khronos group which allows dispatching OpenCL calls to underlying
implementation.
**Doxygen** developed by Dimitri van Heesch is open source documentation system for
C++, C, Java, Objective-C, Python, IDL, PHP and C#. This product is used in Open CASCADE Technology
@@ -163,7 +171,7 @@ OCCT documentation is provided in several forms:
Reference documentation is presented in **Modules --> Toolkits --> Packages --> Classes**
logic structure with cross-references to all OCCT classes and complete in-browser search by all classes.
See @ref occt_dev_guides__documentation "OCCT Documentation Guide" for details on OCCT documentation system.
See @ref dev_guides__documentation "OCCT Documentation Guide" for details on OCCT documentation system.
**Generation of HTML documentation**
@@ -210,95 +218,86 @@ then run **wgendoc** command with required arguments, for instance:
@section OCCT_OVW_SECTION_5 Requirements
Open CASCADE Technology is designed to be highly portable and is known to
work on wide range of platforms (UNIX, Linux, Windows, Mac OS X, Android).
work on wide range of platforms (UNIX, Linux, Windows, Mac OS X).
Current version is officially certified on Windows (IA-32 and x86-64),
Linux (x86-64), MAC OS X (x86-64) and Android (4.0.4 armv7) platforms.
Linux (x86-64) and MAC OS X (x86-64) platforms.
The tables below describe the recommended hardware and software configurations
for which OCCT is certified to work.
@subsection OCCT_OVW_SECTION_5_1 Linux
| Operating System | Mandriva 2010, CentOS 5.5, CentOS 6.3, Fedora 17, Fedora 18, Ubuntu 13.04, Debian 6.0\* |
| Operating System | Mandriva 2010, CentOS 5.5, CentOS 6.3, Fedora 17, Fedora 18, Ubuntu-1304, Debian 6.0\* |
| ----- | ----- |
| Minimum memory | 512 MB, 1 GB recommended |
| Free disk space (complete installation) | 600 MB approx. |
| Video card | See \ref overview_req_graphics |
| Graphic library | OpenGL 1.1+ (OpenGL 2.1+ is recommended)|
| C++ | GNU gcc 4.0. - 4.7.3. |
| TCL (for testing tools) | Tcl/Tk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/download.html |
| Qt (for demonstration tools) | Qt 4.8.6 http://qt-project.org/downloads |
| Freetype (for text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.16.0 http://sourceforge.net/projects/freeimage/files |
| TCL (for testing tools) | Tcltk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/8.6.html |
| Qt (for demonstration tools) | Qt 4.6.2 http://qt.nokia.com/downloads |
| Freetype (for text rendering) | freetype-2.4.11 http://sourceforge.net/projects/freetype/files/ |
| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.15.4 http://sourceforge.net/projects/freeimage/files |
| gl2ps (optional, for export contents of OCCT viewer to vector graphic files) | gl2ps-1.3.8 http://geuz.org/gl2ps/ |
| Intel TBB (optional, for multithreaded algorithms) | TBB 3.x or 4.x http://www.threadingbuildingblocks.org/ |
| VTK (for VTK Integration Services | VTK 6.1.0 http://www.vtk.org/VTK/resources/software.html |
| OpenCL (optional, for ray tracing visualization) | OpenCL SDK (usually one provided by vendor of your graphic card) or OpenCL ICD Loader by Khronos group, http://www.khronos.org/registry/cl |
* Debian 6.0 64 bit is a platform used for regular testing of contributions
* Debian 60 64 bit is a platform used for regular testing of contributions
@subsection OCCT_OVW_SECTION_5_2 Windows
| Operating System | Windows 8.1 / 7 SP1 / Vista SP2 / XP SP3 |
| Operating System | Windows 8 / 7 SP1 / Vista SP2 / XP SP3 |
| ----- | ----- |
| Minimum memory | 512 MB, 1 GB recommended |
| Free disk space (complete installation) | 600 MB approx. |
| Video card | See \ref overview_req_graphics |
| Graphic library | OpenGL 1.1+ (OpenGL 2.1+ is recommended)|
| C++ | Microsoft Visual Studio: 2005 SP1, 2008 SP1, 2010 SP1 \*, 2012 Update 3, 2013 <br>Intel C++ Composer XE 2013 SP1 |
| TCL (for testing tools) | Tcl/Tk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/download.html |
| Qt (for demonstration tools) | Qt 4.8.6 http://qt-project.org/downloads |
| Freetype (OCCT Text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
| FreeImage (Support of common graphic formats) | FreeImage 3.16.0 http://sourceforge.net/projects/freeimage/files |
| C++ | Microsoft Visual Studio: 2005 SP1, 2008 SP1\*, 2010 SP1, 2012 Update 3, 2013 <br>Intel C++ Composer XE 2013 SP1 |
| TCL (for testing tools) | ActiveTcl 8.5 or 8.6 http://www.activestate.com/activetcl/downloads |
| Qt (for demonstration tools) | Qt 4.6.2 http://qt.nokia.com/downloads |
| Freetype (OCCT Text rendering) | freetype-2.4.11 http://sourceforge.net/projects/freetype/files/ |
| FreeImage (Support of common graphic formats) | FreeImage 3.15.4 http://sourceforge.net/projects/freeimage/files |
| gl2ps (Export contents of OCCT viewer to vector graphic file) | gl2ps-1.3.8 http://geuz.org/gl2ps/ |
| Intel TBB (optional, for multithreaded algorithms) | TBB 3.x or 4.x http://www.threadingbuildingblocks.org/ |
| VTK (for VTK Integration Services | VTK 6.1.0 http://www.vtk.org/VTK/resources/software.html |
| OpenCL (optional, for ray tracing visualization) | OpenCL SDK (usually one provided by vendor of your graphic card) or OpenCL ICD Loader by Khronos group, http://www.khronos.org/registry/cl |
* VC++ 10 32-bit is used for certification of contributions and for building
* VC++ 9 32-bit is used for certification of contributions and for building
binary package of official release of OCCT on Windows.
@subsection OCCT_OVW_SECTION_5_3 MAC OS X
| Operating System | OS X 10.10 Yosemite / 10.9 Mavericks / 10.8 Mountain Lion / 10.7 Lion / 10.6.8 Snow Leopard |
| Operating System | Mac OS X 10.9 Mavericks / 10.8 Mountain Lion / 10.7 Lion / 10.6.8 Snow Leopard |
| ----- | ----- |
| Minimum memory | 512 MB, 1 GB recommended |
| Free disk space (complete installation) | 600 MB approx. |
| Video card | See \ref overview_req_graphics |
| Graphic library | OpenGL 1.1+ (OpenGL 2.1+ is recommended)|
| C++ | XCode 3.2 or newer (4.x is recommended) |
| TCL (for testing tools) | Tcl/Tk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/download.html |
| Qt (for demonstration tools) | Qt 4.8.6 http://qt-project.org/downloads |
| Freetype (OCCT Text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
| FreeImage (Support of common graphic formats) | FreeImage 3.16.0 http://sourceforge.net/projects/freeimage/files |
| Qt (for demonstration tools) | Qt 4.6.2 http://qt.nokia.com/downloads |
| Freetype (OCCT Text rendering) | freetype-2.4.11 http://sourceforge.net/projects/freetype/files/ |
| FreeImage (Support of common graphic formats) | FreeImage 3.15.4 http://sourceforge.net/projects/freeimage/files |
| gl2ps (Export contents of OCCT viewer to vector graphic file) | gl2ps-1.3.8 http://geuz.org/gl2ps/ |
| Intel TBB (optional, for multithreaded algorithms) | TBB 3.x or 4.x http://www.threadingbuildingblocks.org/ |
@subsection OCCT_OVW_SECTION_5_4 Android
| Operating System | Android 4.0.4+ |
| ----- | ----- |
| Minimum memory | 512 MB, 1 GB recommended |
| C++ | NDK r10, GNU gcc 4.8 or newer |
| Qt (for demonstration tools) | Qt 5.3.2 http://qt-project.org/downloads |
| Freetype (for text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
| OpenCL (optional, for ray tracing visualization) | Native OpenCL 1.2.8 |
@subsection overview_req_graphics Graphic cards
On desktop, 3D viewer requires graphic card or software implementation supporting OpenGL 1.1 or above. OpenGL 2.1+ is highly recommended.
Ray tracing requires OpenGL 4.0+ or OpenGL 3.1+ with GL_ARB_texture_buffer_object_rgb32 extension. Textures within ray tracing will be available only when GL_ARB_bindless_texture extension is provided by driver.
On mobile platforms, OpenGL ES 2.0+ is required for 3D viewer. The ray tracing is not yet available on mobile platforms.
Some old hardware might be unable to execute complex GLSL programs (e.g. with high number of light sources, clipping planes).
For 3d viewer, graphic card or software implementation supporting OpenGL 1.1
or above is required. OpenGL 2.1+ is highly recommended.
For ray tracing, hardware implementation of OpenCL 1.1+ is required.
The following table lists graphic cards tested to work with OCCT.
| Graphic card | Driver | OS | OpenGL (fixed pipeline) | OpenGL (shaders) | OpenGL (ray tracing) |
| Graphic card | Driver/GL/GLSL/CL version | OS | OpenGL (fixed pipeline) | OpenGL (shaders) | OpenCL (ray tracing) |
| ---- | ---- | ---- | :----: | :----: | :----: |
| NVIDIA GeForce GTX 650 | Driver 340.52, OpenGL 4.4 | Windows 7 64 bit | OK | OK | OK |
| AMD/ATI RadeOn HD 7870 | Driver 14.100, OpenGL 4.4 | Windows 7 64-bit | OK | OK | OK |
| Intel(R) HD Graphics 2500 | Driver 10.18.10.3621, OpenGL 4.0 | Windows 7 64 bit | OK | OK | limited (no textures) |
| RadeOn 9600 | OpenGL 2.1.8454 | Windows XP 32-bit | OK | bad | unsupported by hardware |
| NVIDIA GeForce 6600 GT | OpenGL 2.1 | Windows XP 32-bit | OK | OK | unsupported by hardware |
| NVIDIA GeForce 320 | N/A | Mac OS X 10.6 / OS X 10.10 | OK | OK | not yet supported by OCCT |
| Apple software OpenGL | N/A | Mac OS X 10.6 / OS X 10.10 | OK | OK | N/A |
| Mesa 10.2.4 \* | "Gallium 0.4 on llvmpipe (LLVM 3.4, 256 bits)" OpenGL 3.0 | Windows 7 64 bit | OK | OK | unsupported by software |
| NVIDIA GeForce GT 610, 630M, 640 | Driver 311.44, GL 4.3.0, GLSL 4.30 | Windows 7 64 bit | OK | OK | OK |
| Intel(R) HD Graphics 3000 | GL 3.1.0, GLSL 1.40 | Windows 7 64 bit | OK | OK | none |
| RadeOn 9600 | GL 2.1.8454, GLSL 1.20 | | OK | bad | none |
| AMD/ATI RadeOn HD 7870 | Driver 6.14.10.12002, GL 4.2.12002, GLSL 4.20 | Windows 7 64-bit | OK | OK | OK |
| Mesa 7.8.2 Windows GDI Driver\* | GL 2.1, GLSL version 1.20 | Mac OS X 10.6 / OS X 10.9 | OK | artifacts | none |
| NVIDIA GeForce 320 | | Mac OS X 10.6 / OS X 10.9 | OK | OK | OK on OSX 10.6, bad on OSX 10.9 |
| NVIDIA GeForce 6600 GT | GL 2.1.2, GLSL 1.20 | Windows XP 32-bit | OK | OK | none |
| Apple software OpenGL | | Mac OS X 10.6 / OS X 10.9 | OK | OK | OK |
* Mesa implementation of OpenGL is used for certification testing of OCCT
@@ -306,13 +305,13 @@ The following table lists graphic cards tested to work with OCCT.
In most cases you need to rebuild OCCT on your platform (OS, compiler) before
using it in your project, to ensure binary compatibility.
See @ref occt_dev_guides__building for instructions on
See @ref dev_guides__building for instructions on
building OCCT from sources on supported platforms.
@subsection OCCT_OVW_SECTION_4_1 Using Windows installer
On Windows Open CASCADE Technology can be installed with binaries precompiled by
Visual C++ 2010 with installation procedure.
Visual C++ 2008 with installation procedure.
**Recommendation:**
@@ -338,14 +337,14 @@ When the installation is complete, you will find the directories for 3rd party p
@image html /overview/images/overview_3rdparty.png
@image latex /overview/images/overview_3rdparty.png
The contents of the OCCT-6.8.0 directory (called further "OCCT root", or $CASROOT) are as follows:
The contents of the OCCT-6.7.0 directory (called further "OCCT root", or $CASROOT) are as follows:
@image html /overview/images/overview_installation.png "The directory tree"
@image latex /overview/images/overview_installation.png "The directory tree"
* **adm** This folder contains administration files, which allow rebuilding OCCT;
* **adm/cmake** This folder contains files of CMake building procedure;
* **adm/msvc** This folder contains Visual Studio projects for Visual C++ 2005, 2008, 2010, 2012 and 2013 which allow rebuilding OCCT under Windows platform in 32 and 64-bit mode;
* **adm/msvc** This folder contains Visual Studio projects for Visual C++ 2005, 2008 and 2010, which allow rebuilding OCCT under Windows platform in 32 and 64-bit mode;
* **data** This folder contains CAD files in different formats, which can be used to test the OCCT functionality;
* **doc** This folder contains OCCT documentation in HTML and PDF format;
* **dox** This folder contains sources of OCCT documentation in plain text (MarkDown) format;
@@ -354,7 +353,7 @@ The contents of the OCCT-6.8.0 directory (called further "OCCT root", or $CASROO
* **samples** This folder contains sample applications.
* **src** This folder contains OCCT source files. They are organized in folders, one per development unit;
* **tests** This folder contains scripts for OCCT testing.
* **win32/vc10** This folder contains executable and library files built in optimize mode for Windows platform by Visual C++ 2010;
* **win32/vc9** This folder contains executable and library files built in optimize mode for Windows platform by Visual C++ 2008;
@section OCCT_OVW_SECTION_4_2 Environment Variables
@@ -385,13 +384,14 @@ The scripts are located in the OCCT root folder.
### Description of system variables:
* **CASROOT** is used to define the root directory of Open CASCADE Technology;
* **PATH** is required to define the path to OCCT binaries and 3rdparty folder;
* **LD_LIBRARY_PATH** is required to define the path to OCCT libraries (on UNIX platforms only);
* **MMGT_OPT** (optional) if set to 1, the memory manager performs optimizations as described below; if set to 2,
Intel (R) TBB optimized memory manager is used; if 0 (default), every memory block is allocated
in C memory heap directly (via malloc() and free() functions).
In the latter case, all other options except MMGT_CLEAR are ignored;
In the latter case, all other options except MMGT_CLEAR and MMGT_REENTRANT are ignored;
* **MMGT_CLEAR** (optional) if set to 1 (default), every allocated memory block is cleared by zeros;
if set to 0, memory block is returned as it is;
* **MMGT_CELLSIZE** (optional) defines the maximal size of blocks allocated in large pools of memory. Default is 200;
@@ -456,10 +456,10 @@ Declaration of available plug-ins is done through special resource file(s).
The pload command loads the plug-in in accordance with
the specified resource file and activates the commands implemented in the plug-in.
The whole process of using the plug-in mechanism as well as the instructions for extending Test Harness is described in the @ref occt_user_guides__test_harness.
The whole process of using the plug-in mechanism as well as the instructions for extending Test Harness is described in the @ref user_guides__test_harness.
Draw Test Harness provides an environment for OCCT automated testing system.
Please, consult its @ref occt_dev_guides__tests "Automated Testing System" for details.
Please, consult its @ref dev_guides__tests "Automated Testing System" for details.
Remarks:
@@ -507,23 +507,17 @@ Type pload ALL
1. Type *cd ../..* to return to the root directory
2. Type *cd samples/tcl* to reach the *DrawResources* directory
3. Type *source \<demo_file\>* to run the demonstration file provided with Open CASCADE. The following demonstration files are available:
* DataExchangeDemo.tcl: demonstrates sample sequence of operations with writing and reading IGES file
* ModelingDemo.tcl: demonstrates creation of simple shape and displaying it in HLR mode
* VisualizationDemo.tcl: demonstrates use of 3d viewer
* cad.tcl: creates solid shape looking like abbreviation "CAD"
* bottle.tcl: creates bottle as in OCCT Tutorial
* drill.tcl: creates twist drill bit shape
* cutter.tcl: creates milling cutter shape
* xde.tcl: demonstrates creation of simple assembly in XDE
* materials.tcl: demonstrates visual properties of materials supported by 3d viewer
* raytrace.tcl: demonstrates use of ray tracing display in 3d viewer
* dimensions.tcl: demonstrates use of dimensions, clipping, and capping in 3d viewer
3. Type *source <demo_file>* to run the demonstration file provided with Open CASCADE. The following demonstration files are available:
* bottle.tcl
* challenge.tcl
* DataExchangeDemo.tcl
* ModelingDemo.tcl
* VisualizationDemo.tcl
**Getting Help**
1. Type *help* to see all available commands
2. Type *help \<command_name\>* to find out the arguments for a given command
2. Type *help <command_name>* to find out the arguments for a given command
@subsection OCCT_OVW_SECTION_7_3 Programming Samples
@@ -580,7 +574,7 @@ From the viewpoint of programming, Open CASCADE Technology is designed
to enhance user's C++ tools with high performance modeling classes, methods and functions.
The combination of these resources allows creating substantial applications.
**See also:** @ref occt__tutorial "OCCT Tutorial"
**See also:** @ref tutorial "OCCT Tutorial"
Voxel
------
@@ -615,22 +609,5 @@ Export:
* Stl
* Vrml
See \subpage samples_csharp_occt "Readme" for details.
See \subpage samples_csharp "Readme" for details.
There is also another C# example with the same functionality, which demonstrates the integration of Direct3D Viewer into .NET applications using WPF front end.
See \subpage samples_csharp_direct3d "Readme" for details.
@subsubsection OCCT_OVW_SECTION_7_3_4 Android
There are two samples are representing usage OCCT framework on Android mobile platform. They represent an OCCT-based 3D-viewer with CAD import support in formats BREP, STEP and IGES: jniviewer (java) and AndroidQt (qt+qml)
jniviewer
@image html /overview/images/samples_java_android_occt.jpg
@image latex /overview/images/samples_java_android_occt.jpg
Java - See \subpage samples_java_android_occt "Readme" for details.
AndroidQt
@image html /overview/images/samples_qml_android_occt.jpg
@image latex /overview/images/samples_qml_android_occt.jpg
Qt - See \subpage samples_qml_android_occt "Readme" for details.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="refresh" content="0;URL=html/index.html">
</head>
<body>
</body>
</html>

View File

@@ -1,145 +0,0 @@
\batchmode
\nonstopmode
\documentclass[oneside]{article}
\n
% Packages required by doxygen
\usepackage{calc}
\usepackage{doxygen}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{makeidx}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{textcomp}
\usepackage{amsmath}
\usepackage[table]{xcolor}
\usepackage{indentfirst}
% Font selection
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage[scaled=.90]{helvet}
\usepackage{courier}
\usepackage{amssymb}
\usepackage{sectsty}
\renewcommand{\familydefault}{\sfdefault}
\allsectionsfont{%
\fontseries{bc}\selectfont%
\color{darkgray}%
}
\renewcommand{\DoxyLabelFont}{%
\fontseries{bc}\selectfont%
\color{darkgray}%
}
% Page & text layout
\usepackage{geometry}
\geometry{%
a4paper,%
top=2.5cm,%
bottom=2.5cm,%
left=2.5cm,%
right=2.5cm%
}
\tolerance=750
\hfuzz=15pt
\hbadness=750
\setlength{\emergencystretch}{15pt}
\setlength{\parindent}{0cm}
\setlength{\parskip}{0.2cm}
\makeatletter
\renewcommand{\paragraph}{%
\@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%
\normalfont\normalsize\bfseries\SS@parafont%
}%
}
\renewcommand{\subparagraph}{%
\@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%
\normalfont\normalsize\bfseries\SS@subparafont%
}%
}
\makeatother
% Headers & footers
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhead[LE]{\fancyplain{}{\bfseries\thepage}}
\fancyhead[CE]{\fancyplain{}{}}
\fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}}
\fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}}
\fancyhead[CO]{\fancyplain{}{}}
\fancyhead[RO]{\fancyplain{}{\bfseries\thepage}}
\fancyfoot[LE]{\fancyplain{}{}}
\fancyfoot[CE]{\fancyplain{}{}}
\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize (c) Open CASCADE DEFYEAR}}
\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize (c) Open CASCADE DEFYEAR}}
\fancyfoot[CO]{\fancyplain{}{}}
\fancyfoot[RO]{\fancyplain{}{}}
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\sectionmark}[1]{%
\markright{\thesection\ #1}%
}
% Indices & bibliography
\usepackage{natbib}
\usepackage[titles]{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{5}
\makeindex
% Hyperlinks (required, but should be loaded last)
\usepackage{ifpdf}
\ifpdf
\usepackage[pdftex,pagebackref=true]{hyperref}
\else
\usepackage[ps2pdf,pagebackref=true]{hyperref}
\fi
\hypersetup{%
colorlinks=true,%
linkcolor=black,%
citecolor=black,%
urlcolor=blue,%
unicode%
}
% Custom commands
\newcommand{\clearemptydoublepage}{%
\newpage{\pagestyle{empty}\cleardoublepage}%
}
\n
%===== C O N T E N T S =====\n
\begin{document}
% Titlepage & ToC
\hypersetup{pageanchor=false}
\pagenumbering{roman}
\begin{titlepage}
\vspace*{7cm}
\begin{center}%
\includegraphics[width=0.75\textwidth, height=0.2\textheight]{../../../dox/resources/occt_logo.png}\\
{\Large Open C\-A\-S\-C\-A\-D\-E Technology \\\\\Large DEFCASVERSION }\\
\vspace*{1cm}
{\Large DEFDOCLABEL}\\
\vspace*{1cm}
\vspace*{0.5cm}
{\small \today}\
\end{center}
\end{titlepage}
\clearpage
\pagenumbering{roman}
\tableofcontents
\newpage
\pagenumbering{arabic}
\hypersetup{pageanchor=true}
\let\stdsection\section
\renewcommand\section{\pagebreak\stdsection}
\hypertarget{DEFFILENAME}{}
\input{DEFFILENAME}
% Index
\newpage
\phantomsection
\addcontentsline{toc}{part}{Index}
\printindex\n
\end{document}

View File

@@ -1,46 +0,0 @@
DOXYFILE_ENCODING = UTF-8
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
MULTILINE_CPP_IS_BRIEF = YES
INHERIT_DOCS = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
OPTIMIZE_OUTPUT_FOR_C = YES
SUBGROUPING = YES
DISTRIBUTE_GROUP_DOC = YES
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_LOCAL_CLASSES = NO
EXTRACT_LOCAL_METHODS = NO
HIDE_FRIEND_COMPOUNDS = YES
HIDE_UNDOC_MEMBERS = NO
INLINE_INFO = YES
VERBATIM_HEADERS = NO
QUIET = YES
WARNINGS = NO
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
PREDEFINED = Standard_EXPORT __Standard_API __Draw_API Handle(a):=Handle<a> DEFINE_STANDARD_ALLOC DEFINE_NCOLLECTION_ALLOC
GENERATE_HTML = YES
GENERATE_LATEX = NO
SEARCH_INCLUDES = YES
ALLEXTERNALS = NO
EXTERNAL_GROUPS = NO
COLLABORATION_GRAPH = NO
ENABLE_PREPROCESSING = YES
INCLUDE_FILE_PATTERNS = *.hxx *.pxx
EXCLUDE_PATTERNS = */Handle_*.hxx
SKIP_FUNCTION_MACROS = YES
INLINE_SOURCES = NO
HAVE_DOT = YES
DOT_GRAPH_MAX_NODES = 100
INCLUDE_GRAPH = NO
INCLUDED_BY_GRAPH = NO
DOT_MULTI_TARGETS = YES
DOT_IMAGE_FORMAT = png
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
GRAPHICAL_HIERARCHY = NO

View File

@@ -1,60 +0,0 @@
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "Open CASCADE Technology"
PROJECT_BRIEF =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
ABBREVIATE_BRIEF =
FULL_PATH_NAMES = YES
INHERIT_DOCS = YES
TAB_SIZE = 4
MARKDOWN_SUPPORT = YES
EXTRACT_ALL = YES
CASE_SENSE_NAMES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = \\$file:\$line: \$text\
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.md *.dox
RECURSIVE = YES
SOURCE_BROWSER = NO
INLINE_SOURCES = YES
COLS_IN_ALPHA_INDEX = 5
GENERATE_DOCSET = NO
GENERATE_CHI = NO
GENERATE_QHP = NO
GENERATE_ECLIPSEHELP = NO
GENERATE_RTF = NO
GENERATE_MAN = NO
GENERATE_XML = NO
GENERATE_DOCBOOK = NO
GENERATE_AUTOGEN_DEF = NO
GENERATE_PERLMOD = NO
STRIP_CODE_COMMENTS = NO
GENERATE_LATEX = NO
GENERATE_HTMLHELP = NO
GENERATE_HTML = YES
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = YES
HTML_DYNAMIC_SECTIONS = YES
HTML_INDEX_NUM_ENTRIES = 100
DISABLE_INDEX = YES
GENERATE_TREEVIEW = YES
ENUM_VALUES_PER_LINE = 8
TREEVIEW_WIDTH = 250
EXTERNAL_PAGES = NO
SEARCHDATA_FILE = searchdata.xml
SKIP_FUNCTION_MACROS = YES
FORMULA_FONTSIZE = 12
FORMULA_TRANSPARENT = YES
USE_MATHJAX = YES
MATHJAX_FORMAT = HTML-CSS
# Define alias for inserting images in uniform way (both HTML and PDF)
ALIASES += figure{1}="\image html \1 \n"
ALIASES += figure{2}="\image html \1 \2 \n"

View File

@@ -1,53 +0,0 @@
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "Open CASCADE Technology"
PROJECT_BRIEF =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
ABBREVIATE_BRIEF =
FULL_PATH_NAMES = YES
INHERIT_DOCS = YES
TAB_SIZE = 4
MARKDOWN_SUPPORT = YES
EXTRACT_ALL = YES
CASE_SENSE_NAMES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = \\$file:\$line: \$text\
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.md *.dox
RECURSIVE = YES
SOURCE_BROWSER = NO
INLINE_SOURCES = YES
COLS_IN_ALPHA_INDEX = 5
GENERATE_DOCSET = NO
GENERATE_CHI = NO
GENERATE_QHP = NO
GENERATE_ECLIPSEHELP = NO
GENERATE_RTF = NO
GENERATE_MAN = NO
GENERATE_XML = NO
GENERATE_DOCBOOK = NO
GENERATE_AUTOGEN_DEF = NO
GENERATE_PERLMOD = NO
STRIP_CODE_COMMENTS = NO
GENERATE_HTMLHELP = NO
GENERATE_HTML = NO
DISABLE_INDEX = YES
GENERATE_TREEVIEW = NO
PREDEFINED = PDF_ONLY
GENERATE_LATEX = YES
COMPACT_LATEX = YES
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = YES
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
# Define alias for inserting images in uniform way (both HTML and PDF)
ALIASES += figure{1}="\image latex \1 \n"
ALIASES += figure{2}="\image latex \1 \2 \n"

7
dox/start.tcl Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/tclsh
# Command-line starter for occdoc command, use it as follows:
# tclsh> source dox/start.tcl [arguments]
source [file join [file dirname [info script]] occdoc.tcl]
occdoc {*}$::argv

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -9,12 +9,12 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="465.60214"
height="182.46281"
width="744.09448819"
height="1052.3622047"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="tutorial_image003.svg">
sodipodi:docname="ocaf.svg">
<defs
id="defs4">
<clipPath
@@ -45,7 +45,7 @@
height="22.583204"
width="33.706238"
y="12.49604"
x="316.59787" />
x="316.59788" />
</clipPath>
<clipPath
id="clipEmfPath4"
@@ -55,7 +55,7 @@
height="22.583204"
width="33.856712"
y="193.16167"
x="469.93115" />
x="469.93116" />
</clipPath>
<clipPath
id="clipEmfPath5"
@@ -64,7 +64,7 @@
id="rect3013"
height="22.583204"
width="33.856712"
y="97.258331"
y="97.258332"
x="382.35513" />
</clipPath>
<clipPath
@@ -72,40 +72,40 @@
clipPathUnits="userSpaceOnUse">
<rect
id="rect3132"
height="44.154423"
height="44.154422"
width="125.37695"
y="131.71234"
x="271.49973" />
x="271.49972" />
</clipPath>
<clipPath
id="clipEmfPath2-7"
clipPathUnits="userSpaceOnUse">
<rect
id="rect3135"
height="44.154423"
height="44.154422"
width="125.37695"
y="212.8123"
x="271.49973" />
x="271.49972" />
</clipPath>
<clipPath
id="clipEmfPath3-4"
clipPathUnits="userSpaceOnUse">
<rect
id="rect3138"
height="44.154423"
height="44.154422"
width="107.3371"
y="212.8123"
x="433.85834" />
x="433.85835" />
</clipPath>
<clipPath
id="clipEmfPath4-0"
clipPathUnits="userSpaceOnUse">
<rect
id="rect3141"
height="17.121101"
width="549.31335"
height="17.121102"
width="549.31338"
y="293.91226"
x="0.90199244" />
x="0.90199242" />
</clipPath>
<clipPath
id="clipEmfPath5-9"
@@ -113,8 +113,8 @@
<rect
id="rect3144"
height="18.022213"
width="333.73721"
y="338.51724"
width="333.7372"
y="338.51723"
x="72.61039" />
</clipPath>
<clipPath
@@ -123,8 +123,8 @@
<rect
id="rect3147"
height="18.022213"
width="342.75711"
y="374.56165"
width="342.75712"
y="374.56166"
x="72.61039" />
</clipPath>
<clipPath
@@ -166,20 +166,16 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="362.08678"
inkscape:cy="-11.625728"
inkscape:cx="375"
inkscape:cy="845.71429"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1028"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
fit-margin-top="1"
fit-margin-left="1"
fit-margin-right="1"
fit-margin-bottom="1" />
inkscape:window-width="1065"
inkscape:window-height="932"
inkscape:window-x="113"
inkscape:window-y="14"
inkscape:window-maximized="0" />
<metadata
id="metadata7">
<rdf:RDF>
@@ -188,15 +184,14 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-12.913221,-12.559351)">
id="layer1">
<g
id="g2989" />
<g

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -1,4 +1,4 @@
Tutorial {#occt__tutorial}
Tutorial {#tutorial}
=======
@tableofcontents
@@ -52,7 +52,7 @@ This modeling requires four steps:
To create the bottle's profile, you first create characteristic points with their coordinates as shown below in the (XOY) plane. These points will be the supports that define the geometry of the profile.
@figure{tutorial/images/tutorial_image003.svg}
@figure{/tutorial/images/tutorial_image003.svg}
There are two classes to describe a 3D Cartesian point from its X, Y and Z coordinates in Open CASCADE Technology:

File diff suppressed because it is too large Load Diff

View File

@@ -1,173 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="169.595"
height="115.66244"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="boolean_image001.svg">
<defs
id="defs4">
<clipPath
id="clipEmfPath1"
clipPathUnits="userSpaceOnUse">
<rect
id="rect2990"
height="17.998533"
width="17.278183"
y="14.642874"
x="3.1828232" />
</clipPath>
<clipPath
id="clipEmfPath2"
clipPathUnits="userSpaceOnUse">
<rect
id="rect2993"
height="18.151062"
width="17.429747"
y="17.388412"
x="54.86581" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="49.849591"
inkscape:cy="76.436836"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1042"
inkscape:window-height="640"
inkscape:window-x="18"
inkscape:window-y="263"
inkscape:window-maximized="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-99.629249,-395.59893)">
<g
id="g2995"
transform="matrix(2.2499232,0,0,2.2499232,101.67528,395.53094)">
<text
id="text2997"
style="font-size:13.94379711px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Calibri"
y="12.507455"
x="-0.90937805"
xml:space="preserve"> </text>
<path
id="path2999"
d="m 25.415222,0.49572229 c -13.84907,0 -25.07420523,11.29674871 -25.07420523,25.23417171 0,13.937423 11.22513523,25.234171 25.07420523,25.234171 13.84907,0 25.074205,-11.296748 25.074205,-25.234171 0,-13.937423 -11.225135,-25.23417171 -25.074205,-25.23417171"
style="fill:none;stroke:#000000;stroke-width:0.94726878px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path3001"
d="m 24.941588,20.772671 c -2.491317,0 -4.518473,2.040088 -4.518473,4.547298 0,2.507211 2.027156,4.537766 4.518473,4.537766 2.491317,0 4.518472,-2.030555 4.518472,-4.537766 0,-2.50721 -2.027155,-4.547298 -4.518472,-4.547298"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path3003"
d="m 24.941588,20.772671 c -2.491317,0 -4.518473,2.040088 -4.518473,4.547298 0,2.507211 2.027156,4.537766 4.518473,4.537766 2.491317,0 4.518472,-2.030555 4.518472,-4.537766 0,-2.50721 -2.027155,-4.547298 -4.518472,-4.547298"
style="fill:none;stroke:#000000;stroke-width:2.84180641px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<text
id="text3005"
style="font-size:13.94379711px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
y="27.60792"
x="3.1828232"
xml:space="preserve">V</text>
<text
id="text3007"
style="font-size:8.79065418px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
y="29.590809"
x="12.428167"
xml:space="preserve">1</text>
<text
id="text3009"
style="font-size:13.94379711px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
y="27.60792"
x="17.429747"
xml:space="preserve"> </text>
<path
id="path3011"
d="m 50.11052,0.49572229 c -13.84907,0 -25.074206,11.29674871 -25.074206,25.23417171 0,13.937423 11.225136,25.234171 25.074206,25.234171 13.84907,0 25.064732,-11.296748 25.064732,-25.234171 0,-13.937423 -11.215662,-25.23417171 -25.064732,-25.23417171"
clip-path="url(#clipEmfPath1)"
style="fill:none;stroke:#000000;stroke-width:0.94726878px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path3013"
d="m 49.636885,20.772671 c -2.491317,0 -4.518472,2.040088 -4.518472,4.547298 0,2.507211 2.027155,4.537766 4.518472,4.537766 2.491317,0 4.509,-2.030555 4.509,-4.537766 0,-2.50721 -2.017683,-4.547298 -4.509,-4.547298"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path3015"
d="m 49.636885,20.772671 c -2.491317,0 -4.518472,2.040088 -4.518472,4.547298 0,2.507211 2.027155,4.537766 4.518472,4.537766 2.491317,0 4.509,-2.030555 4.509,-4.537766 0,-2.50721 -2.017683,-4.547298 -4.509,-4.547298"
style="fill:none;stroke:#000000;stroke-width:2.84180641px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<text
id="text3017"
style="font-size:13.94379711px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
y="30.353456"
x="54.86581"
xml:space="preserve">V</text>
<text
id="text3019"
style="font-size:8.79065418px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
y="32.336346"
x="64.111153"
xml:space="preserve">2</text>
<text
id="text3021"
style="font-size:13.94379711px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
y="30.353456"
x="69.112732"
xml:space="preserve"> </text>
<path
id="path2999-0"
d="m 48.910577,0.49552764 c -13.84907,0 -25.074205,11.29674836 -25.074205,25.23417136 0,13.937423 11.225135,25.234171 25.074205,25.234171 13.849066,0 25.074206,-11.296748 25.074206,-25.234171 0,-13.937423 -11.22514,-25.23417136 -25.074206,-25.23417136"
style="fill:none;stroke:#000000;stroke-width:0.94726878px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
sodipodi:type="arc"
style="fill:#ffffff;stroke:#ffffff;stroke-width:0.105;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path4048"
sodipodi:cx="28.721825"
sodipodi:cy="25.876774"
sodipodi:rx="3.368609"
sodipodi:ry="3.368609"
d="m 32.090434,25.876774 c 0,1.860431 -1.508178,3.368609 -3.368609,3.368609 -1.860432,0 -3.368609,-1.508178 -3.368609,-3.368609 0,-1.860432 1.508177,-3.368609 3.368609,-3.368609 1.860431,0 3.368609,1.508177 3.368609,3.368609 z"
transform="translate(-4.1006914,-0.50166522)" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.8 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 962 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

View File

@@ -1,210 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="194.92216"
height="180.60326"
id="svg5925"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="New document 17">
<defs
id="defs5927">
<clipPath
id="clipEmfPath1"
clipPathUnits="userSpaceOnUse">
<rect
id="rect5960"
height="189.81496"
width="566.85828"
y="0"
x="0" />
</clipPath>
<clipPath
id="clipEmfPath2"
clipPathUnits="userSpaceOnUse">
<rect
id="rect5963"
height="15.905443"
width="26.550388"
y="34.661861"
x="70.801033" />
</clipPath>
<clipPath
id="clipEmfPath3"
clipPathUnits="userSpaceOnUse">
<rect
id="rect5966"
height="15.755392"
width="26.70039"
y="89.88076"
x="143.8521" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.6743432"
inkscape:cx="56.701334"
inkscape:cy="90.302547"
inkscape:document-units="px"
inkscape:current-layer="g5968"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1099"
inkscape:window-height="774"
inkscape:window-x="132"
inkscape:window-y="132"
inkscape:window-maximized="0" />
<metadata
id="metadata5930">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-379.68462,-739.20433)">
<g
id="g5937" />
<g
id="g5948" />
<g
id="g5968"
transform="translate(355.90361,729.99263)">
<text
id="text5970"
style="font-size:12.45018196px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="189.81496"
x="218.70319"
xml:space="preserve"> </text>
<path
id="path5972"
d="m 70.744783,34.624349 0,15.942956 26.681639,0 0,-15.942956 -26.681639,0 z"
clip-path="url(#clipEmfPath1)"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<text
id="text5974"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="46.365868"
x="77.851135"
xml:space="preserve">E</text>
<text
id="text5976"
style="font-size:8.10011864px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="48.316532"
x="86.101257"
xml:space="preserve">2</text>
<text
id="text5978"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="46.365868"
x="90.301315"
xml:space="preserve"> </text>
<path
id="path5980"
d="m 143.87085,89.76822 0,15.88669 26.62539,0 0,-15.88669 -26.62539,0 z"
clip-path="url(#clipEmfPath2)"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<text
id="text5982"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="101.73481"
x="150.90221"
xml:space="preserve">E</text>
<text
id="text5984"
style="font-size:8.10011864px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="103.68548"
x="159.15231"
xml:space="preserve">1</text>
<text
id="text5986"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="101.73481"
x="163.35239"
xml:space="preserve"> </text>
<path
id="path5988"
d="m 94.745133,16.993315 0,157.619565"
clip-path="url(#clipEmfPath3)"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path5990"
d="m 94.145125,10.616133 c -1.950029,0 -3.525052,1.584917 -3.525052,3.535585 0,1.950667 1.575023,3.535585 3.525052,3.535585 1.959403,0 3.534426,-1.584918 3.534426,-3.535585 0,-1.950668 -1.575023,-3.535585 -3.534426,-3.535585"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path5992"
d="m 94.145125,10.616133 c -1.950029,0 -3.525052,1.584917 -3.525052,3.535585 0,1.950667 1.575023,3.535585 3.525052,3.535585 1.959403,0 3.534426,-1.584918 3.534426,-3.535585 0,-1.950668 -1.575023,-3.535585 -3.534426,-3.535585"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path5994"
d="m 94.52013,171.98698 c -1.950028,0 -3.525051,1.58492 -3.525051,3.53559 0,1.95066 1.575023,3.5262 3.525051,3.5262 1.959404,0 3.534427,-1.57554 3.534427,-3.5262 0,-1.95067 -1.575023,-3.53559 -3.534427,-3.53559"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path5996"
d="m 94.52013,171.98698 c -1.950028,0 -3.525051,1.58492 -3.525051,3.53559 0,1.95066 1.575023,3.5262 3.525051,3.5262 1.959404,0 3.534427,-1.57554 3.534427,-3.5262 0,-1.95067 -1.575023,-3.53559 -3.534427,-3.53559"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path5998"
d="M 31.491085,109.48122 188.99338,109.07795"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path6000"
d="m 25.181618,110.16582 c 0,1.96943 1.584398,3.55435 3.534426,3.55435 1.950029,-0.009 3.534427,-1.60368 3.525052,-3.5731 0,-1.96943 -1.584398,-3.56372 -3.534427,-3.55434 -1.959403,0 -3.534426,1.60367 -3.525051,3.57309"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path6002"
d="m 25.181618,110.16582 c 0,1.96943 1.584398,3.55435 3.534426,3.55435 1.950029,-0.009 3.534427,-1.60368 3.525052,-3.5731 0,-1.96943 -1.584398,-3.56372 -3.534427,-3.55434 -1.959403,0 -3.534426,1.60367 -3.525051,3.57309"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path6004"
d="m 186.36835,109.34992 c 0.009,1.96942 1.59377,3.56372 3.5438,3.55434 1.95003,0 3.52505,-1.60367 3.51567,-3.5731 0,-1.96942 -1.58439,-3.55434 -3.53442,-3.55434 -1.95003,0.009 -3.52505,1.60368 -3.52505,3.5731"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path6006"
d="m 186.36835,109.34992 c 0.009,1.96942 1.59377,3.56372 3.5438,3.55434 1.95003,0 3.52505,-1.60367 3.51567,-3.5731 0,-1.96942 -1.58439,-3.55434 -3.53442,-3.55434 -1.95003,0.009 -3.52505,1.60368 -3.52505,3.5731"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
</g>
<path
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="m 70.297635,8.9723282 0,153.3086718"
id="path6038"
inkscape:connector-curvature="0"
transform="translate(379.68462,739.20433)" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 9.1 KiB

View File

@@ -1,322 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="187.048"
height="184.22337"
id="svg6570"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="New document 24">
<defs
id="defs6572">
<clipPath
id="clipEmfPath1"
clipPathUnits="userSpaceOnUse">
<rect
id="rect6583"
height="189.81496"
width="566.85828"
y="0"
x="0" />
</clipPath>
<clipPath
id="clipEmfPath2"
clipPathUnits="userSpaceOnUse">
<rect
id="rect6586"
height="16.055494"
width="26.550388"
y="110.13769"
x="111.30163" />
</clipPath>
<clipPath
id="clipEmfPath3"
clipPathUnits="userSpaceOnUse">
<rect
id="rect6589"
height="15.905443"
width="26.70039"
y="148.85094"
x="77.101128" />
</clipPath>
<clipPath
id="clipEmfPath4"
clipPathUnits="userSpaceOnUse">
<rect
id="rect6592"
height="15.905443"
width="26.70039"
y="86.579628"
x="47.100689" />
</clipPath>
<clipPath
id="clipEmfPath5"
clipPathUnits="userSpaceOnUse">
<rect
id="rect6595"
height="15.755392"
width="26.550388"
y="86.279526"
x="151.80222" />
</clipPath>
<clipPath
id="clipEmfPath6"
clipPathUnits="userSpaceOnUse">
<rect
id="rect6598"
height="15.905443"
width="26.70039"
y="32.561142"
x="71.851051" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.817206"
inkscape:cx="35.662879"
inkscape:cy="92.112538"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1132"
inkscape:window-height="778"
inkscape:window-x="110"
inkscape:window-y="110"
inkscape:window-maximized="0" />
<metadata
id="metadata6575">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(76.37877,-320.25135)">
<g
id="g6600"
transform="translate(-108.03395,314.65977)">
<text
id="text6602"
style="font-size:12.45018196px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="189.81496"
x="218.70319"
xml:space="preserve"> </text>
<path
id="path6604"
d="m 111.24537,110.15645 0,15.99922 26.62539,0 0,-15.99922 -26.62539,0 z"
clip-path="url(#clipEmfPath1)"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<text
id="text6606"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="121.8417"
x="114.60167"
xml:space="preserve">Vn</text>
<text
id="text6608"
style="font-size:8.10011864px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="123.79236"
x="130.50191"
xml:space="preserve">1</text>
<text
id="text6610"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="121.8417"
x="134.70197"
xml:space="preserve"> </text>
<path
id="path6612"
d="m 77.119876,148.85094 0,15.88668 26.625384,0 0,-15.88668 -26.625384,0 z"
clip-path="url(#clipEmfPath2)"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<text
id="text6614"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="160.55495"
x="82.201202"
xml:space="preserve">E</text>
<text
id="text6616"
style="font-size:8.10011864px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="162.50562"
x="90.451324"
xml:space="preserve">21</text>
<text
id="text6618"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="160.55495"
x="98.701439"
xml:space="preserve"> </text>
<path
id="path6620"
d="m 47.119438,86.523359 0,15.942961 26.625389,0 0,-15.942961 -26.625389,0 z"
clip-path="url(#clipEmfPath3)"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<text
id="text6622"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="98.28363"
x="52.200764"
xml:space="preserve">E</text>
<text
id="text6624"
style="font-size:8.10011864px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="100.2343"
x="60.450882"
xml:space="preserve">11</text>
<text
id="text6626"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="98.28363"
x="68.701004"
xml:space="preserve"> </text>
<path
id="path6628"
d="m 151.74597,86.148231 0,15.877309 26.62538,0 0,-15.877309 -26.62538,0 z"
clip-path="url(#clipEmfPath4)"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<text
id="text6630"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="98.133583"
x="156.90228"
xml:space="preserve">E</text>
<text
id="text6632"
style="font-size:8.10011864px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="100.08425"
x="165.1524"
xml:space="preserve">12</text>
<text
id="text6634"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="98.133583"
x="173.40253"
xml:space="preserve"> </text>
<path
id="path6636"
d="m 71.869799,32.504874 0,15.942955 26.625389,0 0,-15.942955 -26.625389,0 z"
clip-path="url(#clipEmfPath5)"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<text
id="text6638"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="44.265148"
x="76.951126"
xml:space="preserve">E</text>
<text
id="text6640"
style="font-size:8.10011864px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="46.215816"
x="85.201241"
xml:space="preserve">22</text>
<text
id="text6642"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="44.265148"
x="93.451363"
xml:space="preserve"> </text>
<path
id="path6644"
d="m 102.62025,13.373326 0,157.553914"
clip-path="url(#clipEmfPath6)"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path6646"
d="m 102.02024,6.9961442 c -1.95003,0 -3.525052,1.5755391 -3.525052,3.5262068 0,1.960046 1.575022,3.535585 3.525052,3.535585 1.9594,0 3.53443,-1.575539 3.53443,-3.535585 0,-1.9506677 -1.57503,-3.5262068 -3.53443,-3.5262068"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path6648"
d="m 102.02024,6.9961442 c -1.95003,0 -3.525052,1.5755391 -3.525052,3.5262068 0,1.960046 1.575022,3.535585 3.525052,3.535585 1.9594,0 3.53443,-1.575539 3.53443,-3.535585 0,-1.9506677 -1.57503,-3.5262068 -3.53443,-3.5262068"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path6650"
d="m 102.39525,168.30134 c -1.95003,0 -3.525056,1.57554 -3.525056,3.52621 0,1.96005 1.575026,3.53559 3.525056,3.53559 1.9594,0 3.53442,-1.57554 3.53442,-3.53559 0,-1.95067 -1.57502,-3.52621 -3.53442,-3.52621"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path6652"
d="m 102.39525,168.30134 c -1.95003,0 -3.525056,1.57554 -3.525056,3.52621 0,1.96005 1.575026,3.53559 3.525056,3.53559 1.9594,0 3.53442,-1.57554 3.53442,-3.53559 0,-1.95067 -1.57502,-3.52621 -3.53442,-3.52621"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path6654"
d="m 39.3662,105.9175 157.5023,-0.40327"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path6656"
d="m 33.056733,106.53646 c 0,1.93191 1.584398,3.49807 3.534426,3.48869 1.950029,0 3.534427,-1.57554 3.525052,-3.50745 0,-1.93191 -1.584398,-3.49807 -3.534427,-3.48869 -1.959403,0 -3.534426,1.57554 -3.525051,3.50745"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path6658"
d="m 33.056733,106.53646 c 0,1.93191 1.584398,3.49807 3.534426,3.48869 1.950029,0 3.534427,-1.57554 3.525052,-3.50745 0,-1.93191 -1.584398,-3.49807 -3.534427,-3.48869 -1.959403,0 -3.534426,1.57554 -3.525051,3.50745"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path6660"
d="m 194.24346,105.72055 c 0.009,1.94129 1.59377,3.49808 3.5438,3.49808 1.95003,-0.009 3.52505,-1.57554 3.51568,-3.50745 0,-1.94129 -1.5844,-3.49808 -3.53443,-3.49808 -1.95003,0.009 -3.52505,1.57554 -3.52505,3.50745"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path6662"
d="m 194.24346,105.72055 c 0.009,1.94129 1.59377,3.49808 3.5438,3.49808 1.95003,-0.009 3.52505,-1.57554 3.51568,-3.50745 0,-1.94129 -1.5844,-3.49808 -3.53443,-3.49808 -1.95003,0.009 -3.52505,1.57554 -3.52505,3.50745"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path6664"
d="m 102.46087,101.58476 c -1.95003,0 -3.534426,1.58492 -3.534426,3.53559 0,1.95067 1.584396,3.53558 3.534426,3.53558 1.95003,0 3.53443,-1.58491 3.53443,-3.53558 0,-1.95067 -1.5844,-3.53559 -3.53443,-3.53559"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path6666"
d="m 102.46087,101.58476 c -1.95003,0 -3.534426,1.58492 -3.534426,3.53559 0,1.95067 1.584396,3.53558 3.534426,3.53558 1.95003,0 3.53443,-1.58491 3.53443,-3.53558 0,-1.95067 -1.5844,-3.53559 -3.53443,-3.53559"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
</g>
<path
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="m -5.7414067,329.12368 0,86.61064"
id="path6720"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m -6.096368,423.89843 0.354961,59.98852"
id="path6722"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,231 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="187.048"
height="75.616943"
id="svg7232"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="New document 27">
<defs
id="defs7234">
<clipPath
id="clipEmfPath1"
clipPathUnits="userSpaceOnUse">
<rect
id="rect7245"
height="165.50787"
width="566.85828"
y="0"
x="0" />
</clipPath>
<clipPath
id="clipEmfPath2"
clipPathUnits="userSpaceOnUse">
<rect
id="rect7248"
height="16.055614"
width="26.550388"
y="110.13851"
x="111.30163" />
</clipPath>
<clipPath
id="clipEmfPath3"
clipPathUnits="userSpaceOnUse">
<rect
id="rect7251"
height="15.905562"
width="26.70039"
y="86.580276"
x="47.100689" />
</clipPath>
<clipPath
id="clipEmfPath4"
clipPathUnits="userSpaceOnUse">
<rect
id="rect7254"
height="15.755509"
width="26.550388"
y="86.280167"
x="151.80222" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.9400647"
inkscape:cx="52.151745"
inkscape:cy="37.80847"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="901"
inkscape:window-height="660"
inkscape:window-x="176"
inkscape:window-y="176"
inkscape:window-maximized="0" />
<metadata
id="metadata7237">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(42.093052,-363.12514)">
<g
id="g7256"
transform="translate(-73.748232,273.23421)">
<text
id="text7258"
style="font-size:12.45018196px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="165.50787"
x="218.70319"
xml:space="preserve"> </text>
<path
id="path7260"
d="m 111.24537,110.15727 0,16.06499 26.62539,0 0,-16.06499 -26.62539,0 z"
clip-path="url(#clipEmfPath1)"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<text
id="text7262"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="121.8426"
x="114.60167"
xml:space="preserve">Vn</text>
<text
id="text7264"
style="font-size:8.10011864px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="123.79329"
x="130.50191"
xml:space="preserve">1</text>
<text
id="text7266"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="121.8426"
x="134.70197"
xml:space="preserve"> </text>
<path
id="path7268"
d="m 47.119438,86.524005 0,15.943075 26.625389,0 0,-15.943075 -26.625389,0 z"
clip-path="url(#clipEmfPath2)"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<text
id="text7270"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="98.28437"
x="52.200764"
xml:space="preserve">E</text>
<text
id="text7272"
style="font-size:8.10011864px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="100.23505"
x="60.450882"
xml:space="preserve">11</text>
<text
id="text7274"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="98.28437"
x="68.701004"
xml:space="preserve"> </text>
<path
id="path7276"
d="m 151.74597,86.148874 0,15.877426 26.62538,0 0,-15.877426 -26.62538,0 z"
clip-path="url(#clipEmfPath3)"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<text
id="text7278"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="98.134315"
x="156.90228"
xml:space="preserve">E</text>
<text
id="text7280"
style="font-size:8.10011864px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="100.085"
x="165.1524"
xml:space="preserve">12</text>
<text
id="text7282"
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Times New Roman"
y="98.134315"
x="173.40253"
xml:space="preserve"> </text>
<path
id="path7284"
d="m 39.3662,105.97456 157.5023,-0.39389"
clip-path="url(#clipEmfPath4)"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path7286"
d="m 33.056733,106.56539 c 0,1.95068 1.584398,3.53561 3.534426,3.52623 1.950029,0 3.534427,-1.58493 3.525052,-3.53561 0,-1.96006 -1.584398,-3.53561 -3.534427,-3.52623 -1.959403,0 -3.534426,1.58493 -3.525051,3.53561"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path7288"
d="m 33.056733,106.56539 c 0,1.95068 1.584398,3.53561 3.534426,3.52623 1.950029,0 3.534427,-1.58493 3.525052,-3.53561 0,-1.96006 -1.584398,-3.53561 -3.534427,-3.52623 -1.959403,0 -3.534426,1.58493 -3.525051,3.53561"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path7290"
d="m 194.24346,105.75886 c 0.009,1.95068 1.59377,3.52623 3.5438,3.51685 1.95003,0 3.52505,-1.58493 3.51568,-3.53561 0,-1.95068 -1.5844,-3.52623 -3.53443,-3.52623 -1.95003,0.009 -3.52505,1.5943 -3.52505,3.54499"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path7292"
d="m 194.24346,105.75886 c 0.009,1.95068 1.59377,3.52623 3.5438,3.51685 1.95003,0 3.52505,-1.58493 3.51568,-3.53561 0,-1.95068 -1.5844,-3.52623 -3.53443,-3.52623 -1.95003,0.009 -3.52505,1.5943 -3.52505,3.54499"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
<path
id="path7294"
d="m 102.46087,101.58552 c -1.95003,0 -3.534426,1.58493 -3.534426,3.53561 0,1.95069 1.584396,3.53561 3.534426,3.53561 1.95003,0 3.53443,-1.58492 3.53443,-3.53561 0,-1.95068 -1.5844,-3.53561 -3.53443,-3.53561"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path7296"
d="m 102.46087,101.58552 c -1.95003,0 -3.534426,1.58493 -3.534426,3.53561 0,1.95069 1.584396,3.53561 3.534426,3.53561 1.95003,0 3.53443,-1.58492 3.53443,-3.53561 0,-1.95068 -1.5844,-3.53561 -3.53443,-3.53561"
style="fill:none;stroke:#000000;stroke-width:2.81254101px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
</g>
<path
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="M 8.121694,16.480859 67.257779,15.973253"
id="path7331"
inkscape:connector-curvature="0"
transform="translate(-42.093052,363.12514)" />
<path
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="M 74.110458,15.71945 162.43388,14.958041"
id="path7333"
inkscape:connector-curvature="0"
transform="translate(-42.093052,363.12514)" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 9.5 KiB

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