Compare commits
3 Commits
OCCT-751de
...
CR30892_3
Author | SHA1 | Date | |
---|---|---|---|
|
b8e440d295 | ||
|
12aa7b0704 | ||
|
4059fcddcb |
6
.gitignore
vendored
@@ -12,6 +12,12 @@
|
||||
win32
|
||||
win64
|
||||
|
||||
# standard names of directories for objects and binaries for samples
|
||||
bin
|
||||
obj
|
||||
Debug
|
||||
Release
|
||||
|
||||
# project files and artifacts
|
||||
/adm/msvc
|
||||
/adm/wnt
|
||||
|
@@ -101,7 +101,7 @@ if (BUILD_USE_PCH)
|
||||
# Load Cotire tool for accelerating build procedure
|
||||
include(cotire)
|
||||
|
||||
# Set Cotire to ignore lxx, pxx, gxx
|
||||
# Set Cotire to ignore lxx, pxx, gxx
|
||||
set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS "lxx;pxx;gxx" CACHE STRING "Set Cotire to ignore OCCT specific files that can be #included" FORCE)
|
||||
|
||||
# Set priority for inclusion of system headers in PCH to reduce problems
|
||||
@@ -165,7 +165,7 @@ if (NOT DEFINED CMAKE_INSTALL_PREFIX_PREV)
|
||||
elseif (NOT "${CMAKE_INSTALL_PREFIX_PREV}" STREQUAL "${CMAKE_INSTALL_PREFIX}")
|
||||
# CMAKE_INSTALL_PREFIX has been changed at previous step
|
||||
set (CMAKE_INSTALL_PREFIX_PREV "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
|
||||
# INSTALL_DIR is required to be updated
|
||||
set (INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "${INSTALL_DIR_DESCR}" FORCE)
|
||||
endif()
|
||||
@@ -177,10 +177,10 @@ elseif (NOT "${INSTALL_DIR_PREV}" STREQUAL "${INSTALL_DIR}")
|
||||
# INSTALL_DIR has been changed at previous step
|
||||
set (INSTALL_DIR_PREV "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
# sync CMAKE_INSTALL_PREFIX with INSTALL_DIR
|
||||
# sync CMAKE_INSTALL_PREFIX with INSTALL_DIR
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
# set CMAKE_INSTALL_PREFIX_PREV to avoid the reset of structure of the install folder
|
||||
# set CMAKE_INSTALL_PREFIX_PREV to avoid the reset of structure of the install folder
|
||||
set (CMAKE_INSTALL_PREFIX_PREV "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
endif()
|
||||
|
||||
@@ -406,7 +406,7 @@ if (NOT DEFINED BUILD_DOC_Overview)
|
||||
set (DO_ONLY_CHECK_FOR_DOXYGEN ON)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/doxygen")
|
||||
set (DO_ONLY_CHECK_FOR_DOXYGEN OFF)
|
||||
|
||||
|
||||
if (CAN_DOXYGEN_BE_USED)
|
||||
message (STATUS "Info. Overview building is turned on")
|
||||
endif()
|
||||
@@ -495,7 +495,7 @@ OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_csf")
|
||||
if (USE_TCL)
|
||||
message (STATUS "Info: TCL is used by OCCT")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tcl")
|
||||
|
||||
|
||||
message (STATUS "Info: TK is used by OCCT")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tk")
|
||||
else()
|
||||
@@ -523,7 +523,7 @@ if (USE_VTK)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vtk")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_VTK")
|
||||
|
||||
|
||||
if (NOT CAN_USE_VTK EQUAL -1)
|
||||
message (STATUS "Info: TKIVtk and TKIVtkDraw toolkits excluded due to VTK usage is disabled")
|
||||
|
||||
@@ -565,26 +565,6 @@ else()
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGE")
|
||||
endif()
|
||||
|
||||
# OpenVR
|
||||
# search for CSF_OpenVR variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenVR CAN_USE_OPENVR)
|
||||
if (CAN_USE_OPENVR)
|
||||
set (USE_OPENVR OFF CACHE BOOL "${USE_OPENVR_DESCR}")
|
||||
|
||||
if (USE_OPENVR)
|
||||
add_definitions (-DHAVE_OPENVR)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/openvr")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_OPENVR")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_OPENVR")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("USE_OPENVR")
|
||||
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_OPENVR")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_OPENVR")
|
||||
endif()
|
||||
|
||||
# FFmpeg
|
||||
# search for CSF_FFmpeg variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_FFmpeg CAN_USE_FFMPEG)
|
||||
@@ -714,14 +694,14 @@ else()
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE")
|
||||
endif()
|
||||
|
||||
# bison
|
||||
# bison
|
||||
if (BUILD_YACCLEX)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_BISON_EXECUTABLE")
|
||||
endif()
|
||||
|
||||
# flex
|
||||
# flex
|
||||
if (BUILD_YACCLEX)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/flex")
|
||||
else()
|
||||
@@ -800,7 +780,7 @@ set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
|
||||
if (WIN32)
|
||||
if (WIN32)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
@@ -869,11 +849,9 @@ if (INSTALL_SAMPLES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/java" "${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/ocafsamples" "${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt" "${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code" "${INSTALL_DIR_SAMPLES}/OCCTOverview")
|
||||
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/FuncDemo" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/IESample" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/OCCTOverview" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/Tutorial" RENAME "env.${SCRIPT_EXT}")
|
||||
endif()
|
||||
|
||||
@@ -987,15 +965,6 @@ if (BUILD_SAMPLES_QT)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/${RESOURCE}" "${INSTALL_DIR_RESOURCE}/samples")
|
||||
#message("Copy Sample resources: samples/${RESOURCE} into ${INSTALL_DIR_RESOURCE}/samples")
|
||||
endforeach()
|
||||
|
||||
## Copy sources of OCCTOverview for using in the sample
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/DataExchangeSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/OcafSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/GeometrySamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/TopologySamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/TriangulationSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/Viewer2dSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/Viewer3dSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1213,7 +1182,7 @@ foreach (OCCT_MODULE ${OCCT_MODULES_ENABLED})
|
||||
install(EXPORT OpenCASCADE${OCCT_MODULE}Targets DESTINATION "${INSTALL_DIR_CMAKE}")
|
||||
endforeach()
|
||||
|
||||
# Update generated OpenCASCADETargets-*.cmake files
|
||||
# Update generated OpenCASCADETargets-*.cmake files
|
||||
# to have correct paths to libraries depending on the configuration
|
||||
OCCT_UPDATE_TARGET_FILE ()
|
||||
|
||||
|
@@ -1 +1 @@
|
||||
qt AndroidQt FuncDemo IESample Tutorial OCCTOverview
|
||||
qt AndroidQt FuncDemo IESample Tutorial
|
@@ -1,3 +1,2 @@
|
||||
qt/Common/res/
|
||||
qt/Tutorial/res/
|
||||
qt/OCCTOverview/res/
|
||||
qt/Tutorial/res/
|
@@ -97,12 +97,12 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
|
||||
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR NAMES ${HEADER_NAME}
|
||||
PATHS ${3RDPARTY_${PRODUCT_NAME}_DIR}
|
||||
PATH_SUFFIXES include inc headers
|
||||
PATH_SUFFIXES include inc
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR NAMES ${HEADER_NAME}
|
||||
PATH_SUFFIXES include inc headers
|
||||
PATH_SUFFIXES include inc
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
endif()
|
||||
endif()
|
||||
@@ -125,14 +125,10 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
||||
set (${PRODUCT_NAME}_PATH_SUFFIXES lib)
|
||||
if (WIN32)
|
||||
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} win${COMPILER_BITNESS}/${COMPILER}/lib)
|
||||
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} lib/win${COMPILER_BITNESS})
|
||||
endif()
|
||||
if (ANDROID)
|
||||
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} libs/${ANDROID_ABI})
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} lib/linux${COMPILER_BITNESS})
|
||||
endif()
|
||||
|
||||
# set 3RDPARTY_${PRODUCT_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_LIBRARY
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
|
||||
@@ -188,7 +184,7 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
||||
if ((3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}") OR (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}"))
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
|
||||
PATHS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}" "${3RDPARTY_${PRODUCT_NAME}_DIR}"
|
||||
PATH_SUFFIXES bin win${COMPILER_BITNESS}/${COMPILER}/bin bin/win${COMPILER_BITNESS}
|
||||
PATH_SUFFIXES bin win${COMPILER_BITNESS}/${COMPILER}/bin
|
||||
NO_DEFAULT_PATH)
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} STREQUAL "3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}-NOTFOUND")
|
||||
# find directory recursive
|
||||
@@ -242,7 +238,6 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
||||
if (INSTALL_${PRODUCT_NAME})
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "")
|
||||
|
||||
if (WIN32)
|
||||
if (SINGLE_GENERATOR)
|
||||
@@ -285,17 +280,14 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
||||
endif()
|
||||
else()
|
||||
# the library directory for using by the executable
|
||||
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
|
||||
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
|
||||
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
|
||||
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}};${USED_3RDPARTY_${PRODUCT_NAME}_DIRS}")
|
||||
else()
|
||||
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}:${USED_3RDPARTY_${PRODUCT_NAME}_DIRS}")
|
||||
endif()
|
||||
endforeach()
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_${PRODUCT_NAME}_DIR ${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX})
|
||||
|
@@ -42,13 +42,6 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OpenVR
|
||||
if (USE_OPENVR)
|
||||
set (CSF_OpenVR "openvr_api")
|
||||
else()
|
||||
set (CSF_OpenVR)
|
||||
endif()
|
||||
|
||||
# TCL/TK
|
||||
if (USE_TCL)
|
||||
if (WIN32)
|
||||
|
@@ -1,5 +0,0 @@
|
||||
# OpenVR SDK
|
||||
# OpenVR is an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting.
|
||||
# https://github.com/ValveSoftware/openvr
|
||||
|
||||
THIRDPARTY_PRODUCT("OPENVR" "openvr.h" "CSF_OpenVR" "")
|
@@ -89,7 +89,6 @@ INSTALL_MESSAGE (INSTALL_TEST_CASES "non-regression OCCT test scripts")
|
||||
INSTALL_MESSAGE (INSTALL_DOC_Overview "OCCT overview documentation (HTML format)")
|
||||
INSTALL_MESSAGE (INSTALL_FFMPEG "FFmpeg binaries")
|
||||
INSTALL_MESSAGE (INSTALL_FREEIMAGE "FreeImage binaries")
|
||||
INSTALL_MESSAGE (INSTALL_OPENVR "OpenVR binaries")
|
||||
INSTALL_MESSAGE (INSTALL_EIGEN "EIGEN header files")
|
||||
INSTALL_MESSAGE (INSTALL_EGL "EGL binaries")
|
||||
INSTALL_MESSAGE (INSTALL_GLES2 "OpenGL ES 2.0 binaries")
|
||||
@@ -163,9 +162,6 @@ set (USE_FREEIMAGE_DESCR
|
||||
"Indicates whether Freeimage product should be used in OCCT visualization
|
||||
module for support of popular graphics image formats (PNG, BMP etc)")
|
||||
|
||||
set (USE_OPENVR_DESCR
|
||||
"Indicates whether OpenVR should be used in OCCT visualization module for VR support")
|
||||
|
||||
set (USE_RAPIDJSON_DESCR
|
||||
"Indicates whether RapidJSON product should be used in OCCT DataExchange
|
||||
module for support of JSON-based formats like glTF")
|
||||
|
@@ -179,10 +179,8 @@ proc OCCDoc_DetectNecessarySoftware { DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH H
|
||||
}
|
||||
if {"$is_win" == "yes"} {
|
||||
set exe ".exe"
|
||||
set com ".com"
|
||||
} else {
|
||||
set exe ""
|
||||
set com ""
|
||||
}
|
||||
|
||||
set g_flag "no"
|
||||
@@ -226,11 +224,11 @@ proc OCCDoc_DetectNecessarySoftware { DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH H
|
||||
}
|
||||
}
|
||||
if {$i_flag == "no"} {
|
||||
if { [file exists $path/inkscape$com] } {
|
||||
if { [file exists $path/inkscape$exe] } {
|
||||
catch { exec $path/inkscape -V } version
|
||||
puts "Info: $version "
|
||||
puts " found in $path."
|
||||
set inkscape_path "$path/inkscape$com"
|
||||
set inkscape_path "$path/inkscape$exe"
|
||||
set i_flag "yes"
|
||||
}
|
||||
}
|
||||
@@ -358,29 +356,15 @@ proc OCCDoc_DetectNecessarySoftware { DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH H
|
||||
# Convert SVG files to PDF format to allow including them to PDF
|
||||
# (requires InkScape to be in PATH)
|
||||
proc OCCDoc_ProcessSvg {latexDir verboseMode} {
|
||||
set anSvgList [glob -nocomplain $latexDir/*.svg]
|
||||
if { $anSvgList == {} } {
|
||||
return
|
||||
}
|
||||
|
||||
catch { exec inkscape -V } anInkVer
|
||||
set isOldSyntax 0
|
||||
if {[string match "Inkscape 0.*" $anInkVer]} { set isOldSyntax 1 }
|
||||
foreach file $anSvgList {
|
||||
foreach file [glob -nocomplain $latexDir/*.svg] {
|
||||
if {$verboseMode == "YES"} {
|
||||
puts "Info: Converting file $file..."
|
||||
}
|
||||
set pdffile "[file rootname $file].pdf"
|
||||
if { $isOldSyntax == 1 } {
|
||||
if { [catch {exec inkscape -z -D --file=$file --export-pdf=$pdffile} res] } {
|
||||
#puts "Error: $res."
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if { [catch {exec inkscape $file --export-area-drawing --export-type=pdf --export-filename=$pdffile} res] } {
|
||||
#puts "Error: $res."
|
||||
return
|
||||
}
|
||||
if { [catch {exec inkscape -z -D --file=$file --export-pdf=$pdffile} res] } {
|
||||
#puts "Error: $res."
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -915,4 +899,4 @@ proc OCCDoc_ProcessTex {{texFiles {}} {latexDir} verboseMode} {
|
||||
file delete -force $TEX
|
||||
file rename $TMPFILENAME $TEX
|
||||
}
|
||||
}
|
||||
}
|
@@ -77,8 +77,8 @@ for (aCfgIter, CONFIG) {
|
||||
# Define the list of standard OCCT file extensions
|
||||
aHxxRegex = ^.*\.(hxx|h|lxx|gxx)$
|
||||
aPxxRegex = ^.*\.(pxx)$
|
||||
aCxxRegex = ^.*\.(cxx|cpp|c)$
|
||||
mac { aCxxRegex = ^.*\.(cxx|cpp|c|m|mm)$ }
|
||||
aCxxRegex = ^.*\.(cxx|c)$
|
||||
mac { aCxxRegex = ^.*\.(cxx|c|m|mm)$ }
|
||||
|
||||
# Auxiliary function for probing file extension
|
||||
defineTest (occCheckExtension) {
|
||||
|
@@ -14,7 +14,6 @@ if /I "%VCVER%" == "@COMPILER@" (
|
||||
set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
|
||||
set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@"
|
||||
set "FFMPEG_DIR=@3RDPARTY_FFMPEG_DLL_DIR@"
|
||||
set "OPENVR_DIR=@3RDPARTY_OPENVR_DLL_DIRS@"
|
||||
|
||||
if not "@3RDPARTY_QT_DIR@" == "" (
|
||||
set "QTDIR=@3RDPARTY_QT_DIR@"
|
||||
|
@@ -10,13 +10,12 @@ if /I "%VCVER%" == "@COMPILER@" (
|
||||
set "TCL_DIR=@USED_3RDPARTY_TCL_DIR@"
|
||||
set "TK_DIR=@USED_3RDPARTY_TK_DIR@"
|
||||
set "FREETYPE_DIR=@USED_3RDPARTY_FREETYPE_DIR@"
|
||||
set "FREEIMAGE_DIR=@USED_3RDPARTY_FREEIMAGE_DIR@"
|
||||
set "FREEIMAGE_DIR=@USED_3RDPARTY_FREEIMAGE_DIRS@"
|
||||
set "EGL_DIR=@USED_3RDPARTY_EGL_DIRS@"
|
||||
set "GLES2_DIR=@USED_3RDPARTY_GLES2_DIRS@"
|
||||
set "TBB_DIR=@USED_3RDPARTY_TBB_DIR@"
|
||||
set "VTK_DIR=@USED_3RDPARTY_VTK_DIR@"
|
||||
set "FFMPEG_DIR=@USED_3RDPARTY_FFMPEG_DIR@"
|
||||
set "OPENVR_DIR=@USED_3RDPARTY_OPENVR_DIR@"
|
||||
|
||||
if not "@USED_3RDPARTY_QT_DIR@" == "" (
|
||||
set "QTDIR=@USED_3RDPARTY_QT_DIR@"
|
||||
|
@@ -140,11 +140,7 @@ if not ["%GLES2_DIR%"] == [""] set "PATH=%GLES2_DIR%;%PATH%"
|
||||
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
|
||||
if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
|
||||
if not ["%FFMPEG_DIR%"] == [""] set "PATH=%FFMPEG_DIR%;%PATH%"
|
||||
if not ["%OPENVR_DIR%"] == [""] set "PATH=%OPENVR_DIR%;%PATH%"
|
||||
if not ["%QTDIR%"] == [""] (
|
||||
set "PATH=%QTDIR%/bin;%PATH%"
|
||||
set "QT_PLUGIN_PATH=%QTDIR%/plugins"
|
||||
)
|
||||
if not ["%QTDIR%"] == [""] set "PATH=%QTDIR%/bin;%PATH%"
|
||||
|
||||
rem ----- Set path to 3rd party and OCCT libraries -----
|
||||
if not "%CSF_OCCTBinPath%" == "" (
|
||||
|
@@ -27,5 +27,3 @@ if not "%QTDIR%" == "" (
|
||||
set "PATH=%QTDIR%/bin;%PATH%"
|
||||
set "QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%\plugins\platforms"
|
||||
)
|
||||
|
||||
set "CSF_OCCTOverviewSampleCodePath=%~dp0..\..\OCCTOverview\code"
|
||||
|
@@ -20,5 +20,3 @@ export STATION=$host
|
||||
export RES_DIR=${aSamplePath}/${STATION}/res
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
|
||||
export "CSF_OCCTOverviewSampleCodePath=${aSamplePath}/../../OCCTOverview/code"
|
||||
|
@@ -19,7 +19,6 @@ if ["%1"] == [""] (
|
||||
echo AndroidQt
|
||||
echo FuncDemo
|
||||
echo IESample
|
||||
echo OCCTOverview
|
||||
echo Tutorial
|
||||
PAUSE
|
||||
exit /B
|
||||
@@ -36,8 +35,5 @@ if not exist "%EXE_PATH%" (
|
||||
exit /B
|
||||
)
|
||||
|
||||
rem Set path to location where sample code is installed
|
||||
set "CSF_OCCTOverviewSampleCodePath=%CSF_OCCTSamplesPath%\OCCTOverview\code"
|
||||
|
||||
"%EXE_PATH%"
|
||||
|
||||
|
@@ -8,7 +8,6 @@ if [ "$1" == "" ]; then
|
||||
echo available samples:
|
||||
echo FuncDemo
|
||||
echo IESample
|
||||
echo OCCTOverview
|
||||
echo Tutorial
|
||||
fi
|
||||
|
||||
@@ -32,7 +31,5 @@ if [ ! -f "$EXE_PATH" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export CSF_OCCTOverviewSampleCodePath="${CSF_OCCTSamplesPath}/OCCTOverview/code"
|
||||
|
||||
cd ${aCurrentPath}
|
||||
"$EXE_PATH"
|
||||
"$EXE_PATH"
|
@@ -5,56 +5,56 @@
|
||||
# The order of files in this list determines order of top-level pages
|
||||
# in the generated documentation.
|
||||
|
||||
introduction/introduction.md
|
||||
overview/overview.md
|
||||
|
||||
samples/samples.md
|
||||
../samples/mfc/standard/ReadMe.md
|
||||
../samples/CSharp/ReadMe.md
|
||||
../samples/CSharp/ReadMe_D3D.md
|
||||
|
||||
../samples/qt/AndroidQt/ReadMe.md
|
||||
../samples/qt/OCCTOverview/ReadMe.md
|
||||
../samples/java/jniviewer/ReadMe.md
|
||||
../samples/ios/UIKitSample/ReadMe.md
|
||||
../samples/webgl/ReadMe.md
|
||||
samples/ocaf.md
|
||||
samples/ocaf_func.md
|
||||
samples/draw_scripts.md
|
||||
|
||||
tutorial/tutorial.md
|
||||
|
||||
build/build_upgrade.md
|
||||
build/build_occt/building_occt.md
|
||||
build/build_3rdparty/building_3rdparty.md
|
||||
build/build_documentation/building_documentation.md
|
||||
|
||||
debug/debug.md
|
||||
upgrade/upgrade.md
|
||||
technical_overview/technical_overview.md
|
||||
|
||||
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/mesh/mesh.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/inspector/inspector.md
|
||||
user_guides/brep_wp/brep_wp.md
|
||||
user_guides/vis/vis.md
|
||||
|
||||
specification/specification.md
|
||||
specification/boolean_operations/boolean_operations.md
|
||||
specification/brep_format.md
|
||||
specification/pbr_math.md
|
||||
dev_guides/dev_guides.md
|
||||
dev_guides/documentation/documentation.md
|
||||
dev_guides/contribution/coding_rules.md
|
||||
dev_guides/contribution_workflow/contribution_workflow.md
|
||||
dev_guides/git_guide/git_guide.md
|
||||
dev_guides/tests/tests.md
|
||||
dev_guides/debug/debug.md
|
||||
dev_guides/upgrade/upgrade.md
|
||||
dev_guides/visualization/pbr_math.md
|
||||
|
||||
contribution/contribution.md
|
||||
contribution/documentation/documentation.md
|
||||
contribution/coding_rules.md
|
||||
contribution/contribution_workflow/contribution_workflow.md
|
||||
contribution/git_guide/git_guide.md
|
||||
contribution/tests/tests.md
|
||||
dev_guides/building/building.md
|
||||
dev_guides/building/3rdparty/3rdparty_windows.md
|
||||
dev_guides/building/3rdparty/3rdparty_linux.md
|
||||
dev_guides/building/3rdparty/3rdparty_osx.md
|
||||
dev_guides/building/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
|
||||
|
||||
license.md
|
||||
|
@@ -4,29 +4,28 @@
|
||||
# Empty spaces are allowed.
|
||||
# Strings starting with '#' are treated as comments and ignored.
|
||||
|
||||
tutorial/tutorial.md
|
||||
|
||||
upgrade/upgrade.md
|
||||
|
||||
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/mesh/mesh.md
|
||||
user_guides/boolean_operations/boolean_operations.md
|
||||
user_guides/shape_healing/shape_healing.md
|
||||
user_guides/ocaf/ocaf.md
|
||||
user_guides/visualization/visualization.md
|
||||
user_guides/vis/vis.md
|
||||
user_guides/iges/iges.md
|
||||
user_guides/step/step.md
|
||||
user_guides/xde/xde.md
|
||||
user_guides/inspector/inspector.md
|
||||
user_guides/draw_test_harness/draw_test_harness.md
|
||||
user_guides/inspector/inspector.md
|
||||
user_guides/tobj/tobj.md
|
||||
user_guides/visualization/visualization.md
|
||||
user_guides/xde/xde.md
|
||||
user_guides/vis/vis.md
|
||||
|
||||
contribution/contribution_workflow/contribution_workflow.md
|
||||
contribution/documentation/documentation.md
|
||||
contribution/coding_rules.md
|
||||
contribution/git_guide/git_guide.md
|
||||
contribution/tests/tests.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/upgrade/upgrade.md
|
||||
dev_guides/visualization/pbr_math.md
|
||||
|
||||
specification/boolean_operations/boolean_operations.md
|
||||
specification/brep_format.md
|
||||
specification/pbr_math.md
|
||||
tutorial/tutorial.md
|
||||
|
633
dox/build/build_3rdparty/building_3rdparty.md
vendored
@@ -1,633 +0,0 @@
|
||||
Build 3rd-parties {#build_upgrade_building_3rdparty}
|
||||
==============================================
|
||||
@tableofcontents
|
||||
|
||||
On Windows, the easiest way to install third-party libraries is to download archive with pre-built binaries from https://opencascade.com/content/3rd-party-components.
|
||||
On Linux and OS X, it is recommended to use the version installed in the system natively.
|
||||
|
||||
@section dev_guides__building_3rdparty_win_1 Windows
|
||||
|
||||
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++.
|
||||
|
||||
You need to use the same version of MS Visual Studio for building all third-party products and OCCT itself, in order to receive a consistent set of run-time binaries.
|
||||
|
||||
The links for downloading the third-party products are available at https://opencascade.com/content/3rd-party-components.
|
||||
|
||||
There are two types of third-party products used by OCCT:
|
||||
|
||||
* Mandatory products:
|
||||
* Tcl/Tk 8.5 -- 8.6;
|
||||
* FreeType 2.4.10 -- 2.5.3.
|
||||
* Optional products:
|
||||
* TBB 3.x -- 4.x;
|
||||
* FreeImage 3.14.1 -- 3.16.0;
|
||||
* VTK 6.1.0.
|
||||
|
||||
It is recommended to create a separate new folder on your workstation, where you will unpack the downloaded archives of the third-party products, and where you will build these products (for example, *c:\\occ3rdparty*).
|
||||
|
||||
Further in this document, this folder is referred to as *3rdparty*.
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_2 Tcl/Tk
|
||||
|
||||
Tcl/Tk is required for DRAW test harness.
|
||||
|
||||
**Installation from sources: Tcl**
|
||||
|
||||
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||
|
||||
1. In the *win* sub-directory, edit file *buildall.vc.bat*:
|
||||
|
||||
* Edit the line "call ... vcvars32.bat" to have correct path to the version of Visual Studio to be used for building, for instance:
|
||||
|
||||
call "%VS80COMNTOOLS%\vsvars32.bat"
|
||||
|
||||
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
|
||||
|
||||
**Installation from sources: Tk**
|
||||
|
||||
Download the necessary archive from https://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).
|
||||
|
||||
@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 https://sourceforge.net/projects/freetype/files/
|
||||
|
||||
### The building procedure
|
||||
|
||||
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.
|
||||
|
||||
3. Select the 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.
|
||||
|
||||
|
||||
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:
|
||||
|
||||
@figure{/build/build_3rdparty/images/3rdparty_image001.png}
|
||||
|
||||
Update the value of the Output File for x64 configuration:
|
||||
|
||||
@figure{/build/build_3rdparty/images/3rdparty_image003.png}
|
||||
|
||||
Build the *freetype* project.
|
||||
|
||||
As a result, you will 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.
|
||||
|
||||
6. Open menu 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:
|
||||
|
||||
#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.
|
||||
|
||||
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).
|
||||
|
||||
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*.
|
||||
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_3_1 TBB
|
||||
|
||||
This third-party product is installed with binaries
|
||||
from the archive that can be downloaded from https://github.com/intel/tbb.
|
||||
Go to the **Download** 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_3 FreeImage
|
||||
|
||||
This third-party product should be built as a dynamically loadable library (.dll file).
|
||||
You can download its sources from
|
||||
https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||
|
||||
### The building procedure:
|
||||
|
||||
1. Unpack the downloaded archive of FreeImage product into *3rdparty* folder.
|
||||
|
||||
As a result, you should have a folder named *3rdparty\\FreeImage*.
|
||||
|
||||
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)
|
||||
|
||||
Further in this document, this folder is referred to as *freeimage*.
|
||||
|
||||
2. Open the solution file *freeimage\\FreeImage.*.sln* in your Visual Studio.
|
||||
|
||||
If you use a Visual Studio version 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.
|
||||
|
||||
*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
|
||||
|
||||
FreeImage*d*.dll to FreeImage.dll
|
||||
FreeImagePlus*d*.dll to FreeImagePlus.dll
|
||||
|
||||
Project -> Properties -> Configuration Properties -> Linker -> Debugging-> Generate Program Database File
|
||||
|
||||
FreeImage*d*.pdb to FreeImage.pdb
|
||||
FreeImagePlus*d*.pdb to FreeImagePlus.pdb
|
||||
|
||||
Project -> Properties -> Configuration Properties -> Linker -> Advanced-Import Library
|
||||
|
||||
FreeImage*d*.lib to FreeImage.lib
|
||||
FreeImagePlus*d*.lib to FreeImagePlus.lib
|
||||
|
||||
Project -> Properties -> Configuration Properties -> Build Events -> Post -> Build Event -> Command Line
|
||||
|
||||
FreeImage*d*.dll to FreeImage.dll
|
||||
FreeImage*d*.lib to FreeImage.lib
|
||||
FreeImagePlus*d*.dll to FreeImagePlus.dll
|
||||
FreeImagePlus*d*.lib to FreeImagePlus.lib
|
||||
|
||||
Additionally, rename in project FreeImagePlus
|
||||
|
||||
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.
|
||||
|
||||
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*).
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_3_4 VTK
|
||||
|
||||
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.
|
||||
|
||||
### The building procedure:
|
||||
|
||||
1. Download the necessary archive from https://www.vtk.org/VTK/resources/software.html and unpack it into *3rdparty* folder.
|
||||
|
||||
As a result, you will get a folder named, for example, <i>3rdparty\VTK-6.1.0.</i>
|
||||
|
||||
Further in this document, this folder is referred to as *VTK*.
|
||||
|
||||
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.
|
||||
|
||||
3. Build project VTK in Release mode.
|
||||
|
||||
|
||||
@section build_3rdparty_linux Linux
|
||||
|
||||
This document presents additional guidelines for building third-party
|
||||
products used by Open CASCADE Technology and samples on Linux platform.
|
||||
|
||||
The links for downloading the third-party products are available on the web site at
|
||||
https://opencascade.com/content/3rd-party-components.
|
||||
|
||||
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;
|
||||
* FreeImage 3.14.1 - 3.16.0;
|
||||
* VTK 6.1.0.
|
||||
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_2_1 Tcl/Tk
|
||||
|
||||
Tcl/Tk is required for DRAW test harness.
|
||||
|
||||
**Installation from sources: Tcl**
|
||||
|
||||
Download the necessary archive from https://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>.
|
||||
|
||||
cd TCL_SRC_DIR/unix
|
||||
|
||||
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.
|
||||
|
||||
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*
|
||||
|
||||
make install
|
||||
|
||||
**Installation from sources: Tk**
|
||||
|
||||
Download the necessary archive from https://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>
|
||||
|
||||
cd TK_SRC_DIR/unix
|
||||
|
||||
2. Run the configure command, where <i>TCL_LIB_DIR</i> 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.
|
||||
|
||||
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*)
|
||||
|
||||
make install
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_2_2 FreeType
|
||||
|
||||
FreeType is required for text display in the 3D viewer.
|
||||
Download the necessary archive from https://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>.
|
||||
|
||||
cd FREETYPE_SRC_DIR
|
||||
|
||||
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.
|
||||
|
||||
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*
|
||||
|
||||
make install
|
||||
|
||||
|
||||
@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 https://github.com/intel/tbb.
|
||||
Go to the **Download** 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_3 FreeImage
|
||||
|
||||
Download the necessary archive from https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||
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*:
|
||||
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>.
|
||||
|
||||
cd FREEIMAGE_SRC_DIR
|
||||
|
||||
3. Run the building process
|
||||
|
||||
make
|
||||
|
||||
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:
|
||||
|
||||
make install
|
||||
b. If you do not have this permission, you need to modify file *FREEIMAGE_SRC_DIR/Makefile.gnu*:
|
||||
|
||||
Change lines 7-9 from:
|
||||
|
||||
DESTDIR ?= /
|
||||
INCDIR ?= $(DESTDIR)/usr/include
|
||||
INSTALLDIR ?= $(DESTDIR)/usr/lib
|
||||
|
||||
to:
|
||||
|
||||
DESTDIR ?= $(DESTDIR)
|
||||
INCDIR ?= $(DESTDIR)/include
|
||||
INSTALLDIR ?= $(DESTDIR)/lib
|
||||
|
||||
Change lines 65-67 from:
|
||||
|
||||
install -m 644 -o root -g root $(HEADER) $(INCDIR)
|
||||
install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
|
||||
install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
|
||||
|
||||
to:
|
||||
|
||||
install -m 755 $(HEADER) $(INCDIR)
|
||||
install -m 755 $(STATICLIB) $(INSTALLDIR)
|
||||
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
||||
|
||||
Change line 70 from:
|
||||
|
||||
ldconfig
|
||||
|
||||
to:
|
||||
|
||||
\#ldconfig
|
||||
|
||||
Then run the installation process by the following command:
|
||||
|
||||
make DESTDIR=FREEIMAGE_INSTALL_DIR install
|
||||
|
||||
5. Clean temporary files
|
||||
|
||||
make clean
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_3_4 VTK
|
||||
|
||||
You can download VTK sources from https://www.vtk.org/VTK/resources/software.html
|
||||
|
||||
### The building procedure:
|
||||
|
||||
Download the necessary archive from https://www.vtk.org/VTK/resources/software.html 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 *VTK* are located:
|
||||
|
||||
ccmake VTK_SRC_DIR
|
||||
|
||||
* 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
|
||||
|
||||
3. Start the building of VTK:
|
||||
|
||||
make
|
||||
|
||||
4. Start the installation of VTK. Binaries will be installed according to the *VTK_INSTALL_PREFIX* option.
|
||||
|
||||
make install
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_4 Installation From Official Repositories
|
||||
|
||||
**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:
|
||||
|
||||
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
|
||||
|
||||
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++
|
||||
|
||||
@section build_3rdparty_macos Mac OS X
|
||||
|
||||
This document presents additional guidelines for building third-party products
|
||||
used by Open CASCADE Technology and samples on Mac OS X platform (10.6.4 and later).
|
||||
|
||||
The links for downloading the third-party products are available at https://opencascade.com/content/3rd-party-components.
|
||||
|
||||
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;
|
||||
* FreeImage 3.14.1 - 3.16.0
|
||||
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_2_1 Tcl/Tk 8.5
|
||||
|
||||
Tcl/Tk is required for DRAW test harness. Version 8.5 or 8.6 can be used with OCCT.
|
||||
|
||||
**Installation from sources: Tcl 8.5**
|
||||
|
||||
Download the necessary archive from https://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>.
|
||||
|
||||
cd TCL_SRC_DIR/macosx
|
||||
|
||||
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.
|
||||
|
||||
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*.
|
||||
|
||||
make install
|
||||
|
||||
**Installation from sources: Tk 8.5**
|
||||
|
||||
Download the necessary archive from https://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>.
|
||||
|
||||
cd TK_SRC_DIR/macosx
|
||||
|
||||
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.
|
||||
|
||||
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)
|
||||
|
||||
make install
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_2_2 FreeType 2.4.10
|
||||
|
||||
FreeType is required for text display in the 3D viewer.
|
||||
|
||||
Download the necessary archive from https://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>.
|
||||
|
||||
cd FREETYPE_SRC_DIR
|
||||
|
||||
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.
|
||||
|
||||
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*.
|
||||
|
||||
make install
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_3_1 TBB 3.x or 4.x
|
||||
|
||||
This third-party product is installed with binaries from the archive
|
||||
that can be downloaded from https://github.com/intel/tbb.
|
||||
Go to the **Download** page, 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*).
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_3_3 FreeImage 3.14.1 or 3.15.x
|
||||
|
||||
Download the necessary archive from
|
||||
https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||
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
|
||||
(https://tracker.dev.opencascade.org/file_download.php?file_id=6937&type=bug).
|
||||
|
||||
1. If you build FreeImage 3.15.x you can skip this step.
|
||||
Modify <i>FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:</i>
|
||||
|
||||
In line 60 insert the following:
|
||||
|
||||
#include string.h
|
||||
|
||||
Modify <i>FREEIMAGE_SRC_DIR/Source/FreeImage/PluginTARGA.cpp:</i>
|
||||
|
||||
In line 320 replace:
|
||||
|
||||
SwapShort(value);
|
||||
|
||||
with:
|
||||
|
||||
SwapShort(&value);
|
||||
|
||||
2. Enter the directory where the source files of FreeImage are located <i>(FREEIMAGE_SRC_DIR)</i>.
|
||||
|
||||
cd FREEIMAGE_SRC_DIR
|
||||
|
||||
3. Run the building process
|
||||
|
||||
make
|
||||
|
||||
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:
|
||||
|
||||
make install
|
||||
|
||||
2. If you do not have this permission, you need to modify file *FREEIMAGE_SRC_DIR/Makefile.osx*:
|
||||
|
||||
Change line 49 from:
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
|
||||
to:
|
||||
|
||||
PREFIX ?= $(PREFIX)
|
||||
|
||||
Change lines 65-69 from:
|
||||
|
||||
install -d -m 755 -o root -g wheel $(INCDIR) $(INSTALLDIR)
|
||||
install -m 644 -o root -g wheel $(HEADER) $(INCDIR)
|
||||
install -m 644 -o root -g wheel $(SHAREDLIB) $(STATICLIB) $(INSTALLDIR)
|
||||
ranlib -sf $(INSTALLDIR)/$(STATICLIB)
|
||||
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
|
||||
|
||||
to:
|
||||
|
||||
install -d $(INCDIR) $(INSTALLDIR)
|
||||
install -m 755 $(HEADER) $(INCDIR)
|
||||
install -m 755 $(STATICLIB) $(INSTALLDIR)
|
||||
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
||||
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
|
||||
ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
|
||||
|
||||
Then run the installation process by the following command:
|
||||
|
||||
make PREFIX=FREEIMAGE_INSTALL_DIR install
|
||||
|
||||
5. Clean temporary files
|
||||
|
||||
make clean
|
BIN
dox/build/build_3rdparty/images/genconf_linux.png
vendored
Before Width: | Height: | Size: 42 KiB |
BIN
dox/build/build_3rdparty/images/genconf_windows.png
vendored
Before Width: | Height: | Size: 60 KiB |
@@ -1,19 +0,0 @@
|
||||
Build Documentation {#build_upgrade__building_documentation}
|
||||
=================
|
||||
|
||||
To generate HTML documentation from sources contained in *dox* subdirectory,
|
||||
you need to have Tcl and Doxygen 1.8.5 (or above) installed on your system.
|
||||
|
||||
Use script **gendoc** (batch file on Windows, shell script on Linux / Mac OSX) to generate documentation.
|
||||
|
||||
To generate Overview documentation:
|
||||
|
||||
cmd> gendoc -overview
|
||||
|
||||
To generate Reference manual:
|
||||
|
||||
cmd> gendoc -refman
|
||||
|
||||
Run this command without arguments to get help on supported options.
|
||||
|
||||
See @ref occt_contribution__documentation for prerequisites and details on OCCT documentation system.
|
Before Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 194 KiB |
Before Width: | Height: | Size: 60 KiB |
@@ -1,10 +0,0 @@
|
||||
Build, Debug and Upgrade {#build_upgrade}
|
||||
=================
|
||||
|
||||
This chapter contains the detailed infomation about building, debugging and upgrade procedures:
|
||||
|
||||
* @subpage build_upgrade__building_occt
|
||||
* @subpage build_upgrade_building_3rdparty
|
||||
* @subpage build_upgrade__building_documentation
|
||||
* @subpage occt__debug
|
||||
* @subpage occt__upgrade
|
@@ -1,10 +0,0 @@
|
||||
Contribution {#contribution}
|
||||
============
|
||||
|
||||
This chapter contains the detailed infomation about contribution procedure:
|
||||
|
||||
* @subpage occt_contribution__contribution_workflow
|
||||
* @subpage occt_contribution__git_guide
|
||||
* @subpage occt_contribution__coding_rules
|
||||
* @subpage occt_contribution__tests
|
||||
* @subpage occt_contribution__documentation
|
217
dox/dev_guides/building/3rdparty/3rdparty_linux.md
vendored
Normal file
@@ -0,0 +1,217 @@
|
||||
Building 3rd-party libraries on Linux {#occt_dev_guides__building_3rdparty_linux}
|
||||
=========
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section dev_guides__building_3rdparty_linux_1 Introduction
|
||||
|
||||
This document presents additional guidelines for building third-party
|
||||
products used by Open CASCADE Technology and samples on Linux platform.
|
||||
|
||||
The links for downloading the third-party products are available on the web site
|
||||
of OPEN CASCADE SAS at
|
||||
https://www.opencascade.com/content/3rd-party-components.
|
||||
|
||||
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;
|
||||
* FreeImage 3.14.1 - 3.16.0;
|
||||
* VTK 6.1.0.
|
||||
|
||||
@section dev_guides__building_3rdparty_linux_2 Building Mandatory Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_2_1 Tcl/Tk
|
||||
|
||||
Tcl/Tk is required for DRAW test harness.
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_linux_2_1_2 Installation from sources: Tcl
|
||||
|
||||
Download the necessary archive from https://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>.
|
||||
|
||||
cd TCL_SRC_DIR/unix
|
||||
|
||||
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.
|
||||
|
||||
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*
|
||||
|
||||
make install
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_linux_2_1_3 Installation from sources: Tk
|
||||
|
||||
Download the necessary archive from https://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>
|
||||
|
||||
cd TK_SRC_DIR/unix
|
||||
|
||||
2. Run the configure command, where <i>TCL_LIB_DIR</i> 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.
|
||||
|
||||
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*)
|
||||
|
||||
make install
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_2_2 FreeType
|
||||
|
||||
FreeType is required for text display in the 3D viewer.
|
||||
Download the necessary archive from https://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>.
|
||||
|
||||
cd FREETYPE_SRC_DIR
|
||||
|
||||
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.
|
||||
|
||||
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*
|
||||
|
||||
make install
|
||||
|
||||
@section dev_guides__building_3rdparty_linux_3 Building Optional Third-party Products
|
||||
|
||||
@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 https://github.com/intel/tbb.
|
||||
Go to the **Download** 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_3 FreeImage
|
||||
|
||||
Download the necessary archive from https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||
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*:
|
||||
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>.
|
||||
|
||||
cd FREEIMAGE_SRC_DIR
|
||||
|
||||
3. Run the building process
|
||||
|
||||
make
|
||||
|
||||
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:
|
||||
|
||||
make install
|
||||
b. If you do not have this permission, you need to modify file *FREEIMAGE_SRC_DIR/Makefile.gnu*:
|
||||
|
||||
Change lines 7-9 from:
|
||||
|
||||
DESTDIR ?= /
|
||||
INCDIR ?= $(DESTDIR)/usr/include
|
||||
INSTALLDIR ?= $(DESTDIR)/usr/lib
|
||||
|
||||
to:
|
||||
|
||||
DESTDIR ?= $(DESTDIR)
|
||||
INCDIR ?= $(DESTDIR)/include
|
||||
INSTALLDIR ?= $(DESTDIR)/lib
|
||||
|
||||
Change lines 65-67 from:
|
||||
|
||||
install -m 644 -o root -g root $(HEADER) $(INCDIR)
|
||||
install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
|
||||
install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
|
||||
|
||||
to:
|
||||
|
||||
install -m 755 $(HEADER) $(INCDIR)
|
||||
install -m 755 $(STATICLIB) $(INSTALLDIR)
|
||||
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
||||
|
||||
Change line 70 from:
|
||||
|
||||
ldconfig
|
||||
|
||||
to:
|
||||
|
||||
\#ldconfig
|
||||
|
||||
Then run the installation process by the following command:
|
||||
|
||||
make DESTDIR=FREEIMAGE_INSTALL_DIR install
|
||||
|
||||
5. Clean temporary files
|
||||
|
||||
make clean
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_3_4 VTK
|
||||
|
||||
You can download VTK sources from https://www.vtk.org/VTK/resources/software.html
|
||||
|
||||
### The building procedure:
|
||||
|
||||
Download the necessary archive from https://www.vtk.org/VTK/resources/software.html 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 *VTK* are located:
|
||||
|
||||
ccmake VTK_SRC_DIR
|
||||
|
||||
* 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
|
||||
|
||||
3. Start the building of VTK:
|
||||
|
||||
make
|
||||
|
||||
4. Start the installation of VTK. Binaries will be installed according to the *VTK_INSTALL_PREFIX* option.
|
||||
|
||||
make install
|
||||
|
||||
@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:
|
||||
|
||||
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
|
||||
|
||||
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++
|
182
dox/dev_guides/building/3rdparty/3rdparty_osx.md
vendored
Normal file
@@ -0,0 +1,182 @@
|
||||
Building 3rd-party libraries on MacOS X {#occt_dev_guides__building_3rdparty_osx}
|
||||
==============================================
|
||||
@tableofcontents
|
||||
|
||||
@section dev_guides__building_3rdparty_osx_1 Introduction
|
||||
|
||||
This document presents additional guidelines for building third-party products
|
||||
used by Open CASCADE Technology and samples on Mac OS X platform (10.6.4 and later).
|
||||
|
||||
The links for downloading the third-party products are available
|
||||
on the web site of OPEN CASCADE SAS at https://www.opencascade.com/content/3rd-party-components.
|
||||
|
||||
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;
|
||||
* FreeImage 3.14.1 - 3.16.0
|
||||
|
||||
@section dev_guides__building_3rdparty_osx_2 Building Mandatory Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_2_1 Tcl/Tk 8.5
|
||||
|
||||
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_2 Installation from sources: Tcl 8.5
|
||||
|
||||
Download the necessary archive from https://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>.
|
||||
|
||||
cd TCL_SRC_DIR/macosx
|
||||
|
||||
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.
|
||||
|
||||
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*.
|
||||
|
||||
make install
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_osx_2_1_3 Installation from sources: Tk 8.5
|
||||
|
||||
Download the necessary archive from https://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>.
|
||||
|
||||
cd TK_SRC_DIR/macosx
|
||||
|
||||
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.
|
||||
|
||||
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)
|
||||
|
||||
make install
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_2_2 FreeType 2.4.10
|
||||
|
||||
FreeType is required for text display in the 3D viewer.
|
||||
|
||||
Download the necessary archive from https://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>.
|
||||
|
||||
cd FREETYPE_SRC_DIR
|
||||
|
||||
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.
|
||||
|
||||
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*.
|
||||
|
||||
make install
|
||||
|
||||
@section dev_guides__building_3rdparty_osx_3 Building Optional Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_3_1 TBB 3.x or 4.x
|
||||
|
||||
This third-party product is installed with binaries from the archive
|
||||
that can be downloaded from https://github.com/intel/tbb.
|
||||
Go to the **Download** page, 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*).
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_3_3 FreeImage 3.14.1 or 3.15.x
|
||||
|
||||
Download the necessary archive from
|
||||
https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||
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
|
||||
(https://tracker.dev.opencascade.org/file_download.php?file_id=6937&type=bug).
|
||||
|
||||
1. If you build FreeImage 3.15.x you can skip this step.
|
||||
Modify <i>FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:</i>
|
||||
|
||||
In line 60 insert the following:
|
||||
|
||||
#include string.h
|
||||
|
||||
Modify <i>FREEIMAGE_SRC_DIR/Source/FreeImage/PluginTARGA.cpp:</i>
|
||||
|
||||
In line 320 replace:
|
||||
|
||||
SwapShort(value);
|
||||
|
||||
with:
|
||||
|
||||
SwapShort(&value);
|
||||
|
||||
2. Enter the directory where the source files of FreeImage are located <i>(FREEIMAGE_SRC_DIR)</i>.
|
||||
|
||||
cd FREEIMAGE_SRC_DIR
|
||||
|
||||
3. Run the building process
|
||||
|
||||
make
|
||||
|
||||
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:
|
||||
|
||||
make install
|
||||
|
||||
2. If you do not have this permission, you need to modify file *FREEIMAGE_SRC_DIR/Makefile.osx*:
|
||||
|
||||
Change line 49 from:
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
|
||||
to:
|
||||
|
||||
PREFIX ?= $(PREFIX)
|
||||
|
||||
Change lines 65-69 from:
|
||||
|
||||
install -d -m 755 -o root -g wheel $(INCDIR) $(INSTALLDIR)
|
||||
install -m 644 -o root -g wheel $(HEADER) $(INCDIR)
|
||||
install -m 644 -o root -g wheel $(SHAREDLIB) $(STATICLIB) $(INSTALLDIR)
|
||||
ranlib -sf $(INSTALLDIR)/$(STATICLIB)
|
||||
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
|
||||
|
||||
to:
|
||||
|
||||
install -d $(INCDIR) $(INSTALLDIR)
|
||||
install -m 755 $(HEADER) $(INCDIR)
|
||||
install -m 755 $(STATICLIB) $(INSTALLDIR)
|
||||
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
||||
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
|
||||
ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
|
||||
|
||||
Then run the installation process by the following command:
|
||||
|
||||
make PREFIX=FREEIMAGE_INSTALL_DIR install
|
||||
|
||||
5. Clean temporary files
|
||||
|
||||
make clean
|
247
dox/dev_guides/building/3rdparty/3rdparty_windows.md
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
Building 3rd-party libraries on Windows {#occt_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++.
|
||||
|
||||
You need to use the same version of MS Visual Studio for building all third-party products and OCCT itself, in order to receive a consistent set of run-time binaries.
|
||||
|
||||
The links for downloading the third-party products are available on the web site of OPEN CASCADE SAS at https://www.opencascade.com/content/3rd-party-components.
|
||||
|
||||
There are two types of third-party products used by OCCT:
|
||||
|
||||
* Mandatory products:
|
||||
* Tcl/Tk 8.5 -- 8.6;
|
||||
* FreeType 2.4.10 -- 2.5.3.
|
||||
* Optional products:
|
||||
* TBB 3.x -- 4.x;
|
||||
* FreeImage 3.14.1 -- 3.16.0;
|
||||
* VTK 6.1.0.
|
||||
|
||||
It is recommended to create a separate new folder on your workstation, where you will unpack the downloaded archives of the third-party products, and where you will build these products (for example, *c:\\occ3rdparty*).
|
||||
|
||||
Further in this document, this folder is referred to as *3rdparty*.
|
||||
|
||||
@section dev_guides__building_3rdparty_win_2 Building Mandatory Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_2_1 Tcl/Tk
|
||||
|
||||
Tcl/Tk is required for DRAW test harness.
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_win_2_1_1 Installation from sources: Tcl
|
||||
|
||||
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||
|
||||
1. In the *win* sub-directory, edit file *buildall.vc.bat*:
|
||||
|
||||
* Edit the line "call ... vcvars32.bat" to have correct path to the version of Visual Studio to be used for building, for instance:
|
||||
|
||||
call "%VS80COMNTOOLS%\vsvars32.bat"
|
||||
|
||||
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 https://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).
|
||||
|
||||
@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 https://sourceforge.net/projects/freetype/files/
|
||||
|
||||
### The building procedure
|
||||
|
||||
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.
|
||||
|
||||
3. Select the 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.
|
||||
|
||||
|
||||
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:
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/3rdparty_image001.png}
|
||||
|
||||
Update the value of the Output File for x64 configuration:
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/3rdparty_image003.png}
|
||||
|
||||
Build the *freetype* project.
|
||||
|
||||
As a result, you will 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.
|
||||
|
||||
6. Open menu 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:
|
||||
|
||||
#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.
|
||||
|
||||
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).
|
||||
|
||||
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*.
|
||||
|
||||
@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
|
||||
from the archive that can be downloaded from https://github.com/intel/tbb.
|
||||
Go to the **Download** 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_3 FreeImage
|
||||
|
||||
This third-party product should be built as a dynamically loadable library (.dll file).
|
||||
You can download its sources from
|
||||
https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||
|
||||
### The building procedure:
|
||||
|
||||
1. Unpack the downloaded archive of FreeImage product into *3rdparty* folder.
|
||||
|
||||
As a result, you should have a folder named *3rdparty\\FreeImage*.
|
||||
|
||||
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)
|
||||
|
||||
Further in this document, this folder is referred to as *freeimage*.
|
||||
|
||||
2. Open the solution file *freeimage\\FreeImage.*.sln* in your Visual Studio.
|
||||
|
||||
If you use a Visual Studio version 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.
|
||||
|
||||
*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
|
||||
|
||||
FreeImage*d*.dll to FreeImage.dll
|
||||
FreeImagePlus*d*.dll to FreeImagePlus.dll
|
||||
|
||||
Project -> Properties -> Configuration Properties -> Linker -> Debugging-> Generate Program Database File
|
||||
|
||||
FreeImage*d*.pdb to FreeImage.pdb
|
||||
FreeImagePlus*d*.pdb to FreeImagePlus.pdb
|
||||
|
||||
Project -> Properties -> Configuration Properties -> Linker -> Advanced-Import Library
|
||||
|
||||
FreeImage*d*.lib to FreeImage.lib
|
||||
FreeImagePlus*d*.lib to FreeImagePlus.lib
|
||||
|
||||
Project -> Properties -> Configuration Properties -> Build Events -> Post -> Build Event -> Command Line
|
||||
|
||||
FreeImage*d*.dll to FreeImage.dll
|
||||
FreeImage*d*.lib to FreeImage.lib
|
||||
FreeImagePlus*d*.dll to FreeImagePlus.dll
|
||||
FreeImagePlus*d*.lib to FreeImagePlus.lib
|
||||
|
||||
Additionally, rename in project FreeImagePlus
|
||||
|
||||
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.
|
||||
|
||||
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*).
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_3_4 VTK
|
||||
|
||||
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.
|
||||
|
||||
### The building procedure:
|
||||
|
||||
1. Download the necessary archive from https://www.vtk.org/VTK/resources/software.html and unpack it into *3rdparty* folder.
|
||||
|
||||
As a result, you will get a folder named, for example, <i>3rdparty\VTK-6.1.0.</i>
|
||||
|
||||
Further in this document, this folder is referred to as *VTK*.
|
||||
|
||||
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.
|
||||
|
||||
3. Build project VTK in Release mode.
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 206 KiB |
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 236 KiB |
BIN
dox/dev_guides/building/3rdparty/images/genconf_linux.png
vendored
Normal file
After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 194 KiB |
BIN
dox/dev_guides/building/3rdparty/images/genconf_windows.png
vendored
Normal file
After Width: | Height: | Size: 37 KiB |
93
dox/dev_guides/building/android/android.md
Normal file
@@ -0,0 +1,93 @@
|
||||
Building with CMake for Android {#occt_dev_guides__building_android}
|
||||
===================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This article describes the steps to build OCCT libraries for Android from a complete source package
|
||||
with GNU make (makefiles) on Windows 7 and Ubuntu 15.10.
|
||||
|
||||
The steps on Windows and Ubuntu are similar. There is the only one difference: makefiles are built with mingw32-make
|
||||
on Windows and native GNU make on Ubuntu.
|
||||
|
||||
Required tools (download and install if it is required):
|
||||
- CMake v3.7+ https://www.cmake.org/cmake/resources/software.html
|
||||
- Android NDK rev.10+ https://developer.android.com/tools/sdk/ndk/index.html
|
||||
- GNU Make: MinGW v4.82+ for Windows (https://sourceforge.net/projects/mingw/files/), GNU Make 4.0 for Ubuntu.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
In toolchain file <i>$CASROOT/adm/templates/android.toolchain.config.cmake</i>:
|
||||
|
||||
- Set CMAKE_ANDROID_NDK variable equal to your Android NDK path.
|
||||
- Set CMAKE_ANDROID_STL_TYPE variable to specify which C++ standard library to use.
|
||||
|
||||
The default value of CMAKE_ANDROID_STL_TYPE is <i>gnustl_shared</i> (GNU libstdc++ Shared)
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image001.png}
|
||||
|
||||
## Generation of makefiles using CMake GUI tool
|
||||
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_image002.png}
|
||||
|
||||
Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project.
|
||||
|
||||
Select "MinGW Makefiles" item from the list
|
||||
- Choose "Specify toolchain file for cross-compiling"
|
||||
- Click "Next"
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image003.png}
|
||||
|
||||
- Specify a toolchain file at the next dialog by <i>android.toolchain.config.cmake</i> . It is contained by cross-compilation toolchain for CMake
|
||||
- Click "Finish"
|
||||
@figure{/dev_guides/building/android/images/android_image004.png}
|
||||
|
||||
If on Windows the message is appeared: "CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles"
|
||||
CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.",
|
||||
specify **CMAKE_MAKE_PROGRAM** to mingw32-make executable.
|
||||
@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"
|
||||
|
||||
### Generation of makefiles
|
||||
|
||||
Click **Generate** button and wait until the generation process is finished.
|
||||
Then makefiles will appear in the build folder (e.g. <i> D:/occt/build-android </i>).
|
||||
|
||||
## Generation of makefiles using CMake from the command line
|
||||
|
||||
Alternatively one may specify the values without a toolchain file:
|
||||
|
||||
> cmake -G "MinGW Makefiles" -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=D:/DevTools/android-ndk-r13b -DCMAKE_ANDROID_STL_TYPE=gnustl_shared -DCMAKE_SYSTEM_VERSION=21 -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_MAKE_PROGRAM=D:/DevTools/MinGW/bin/mingw32-make.exe -D3RDPARTY_DIR=D:/occt-3rdparty D:/occt
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image006.png}
|
||||
|
||||
## Building makefiles of OCCT
|
||||
|
||||
Open console and go to the build folder. Type "mingw32-make" (Windows) or "make" (Ubuntu) to start build process.
|
||||
|
||||
> mingw32-make
|
||||
or
|
||||
> make
|
||||
|
||||
|
||||
Parallel building can be started with using **"-jN"** argument of "mingw32-make/make", where N is the number of building threads.
|
||||
|
||||
> mingw32-make -j4
|
||||
or
|
||||
> make -j4
|
||||
|
||||
## Install built OCCT libraries
|
||||
|
||||
Type "mingw32-make/make" with argument "install" to place the libraries
|
||||
to the install folder (see "OCCT Configuration" section of @ref occt_dev_guides__building_cmake "Building with CMake")
|
||||
|
||||
> mingw32-make install
|
||||
or
|
||||
> make install
|
BIN
dox/dev_guides/building/android/images/android_image001.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
dox/dev_guides/building/android/images/android_image002.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
dox/dev_guides/building/android/images/android_image003.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
dox/dev_guides/building/android/images/android_image004.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
dox/dev_guides/building/android/images/android_image005.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
dox/dev_guides/building/android/images/android_image006.png
Normal file
After Width: | Height: | Size: 98 KiB |
24
dox/dev_guides/building/building.md
Normal file
@@ -0,0 +1,24 @@
|
||||
Building OCCT from sources {#occt_dev_guides__building}
|
||||
=========
|
||||
|
||||
Before building OCCT, make sure to have all the required third-party libraries installed.
|
||||
The list of required libraries depends on what OCCT modules will be used, and your preferences.
|
||||
The typical minimum is **Freetype** (necessary for Visualization) and **Tcl/Tk** (for DRAW Test Harness).
|
||||
See "Third-party libraries" section in \ref OCCT_OVW_SECTION_5 "Overview" for a full list.
|
||||
|
||||
On Windows, the easiest way to install third-party libraries is to download archive with pre-built binaries from https://www.opencascade.com/content/3rd-party-components.
|
||||
On Linux and OS X, it is recommended to use the version installed in the system natively.
|
||||
|
||||
You can also build third-party libraries from their sources:
|
||||
* \subpage occt_dev_guides__building_3rdparty_windows
|
||||
* \subpage occt_dev_guides__building_3rdparty_linux
|
||||
* \subpage occt_dev_guides__building_3rdparty_osx
|
||||
|
||||
Build OCCT using your preferred build tool.
|
||||
* \subpage occt_dev_guides__building_cmake "Building with CMake (cross-platform)"
|
||||
* \subpage occt_dev_guides__building_android "Building with CMake for Android (cross-platform)"
|
||||
* \subpage occt_dev_guides__building_msvc "Building on Windows with MS Visual Studio projects"
|
||||
* \subpage occt_dev_guides__building_code_blocks "Building on Mac OS X with Code::Blocks projects"
|
||||
* \subpage occt_dev_guides__building_xcode "Building on Mac OS X with Xcode projects"
|
||||
|
||||
The current version of OCCT can be consulted in the file src/Standard/Standard_Version.hxx
|
@@ -1,17 +1,9 @@
|
||||
Build OCCT {#build_upgrade__building_occt}
|
||||
Building with CMake {#occt_dev_guides__building_cmake}
|
||||
===================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@note Before building OCCT, make sure to have all required third-party libraries installed.
|
||||
The list of required libraries depends on what OCCT modules will be used, and your preferences.
|
||||
The typical minimum is **Freetype** (necessary for Visualization) and **Tcl/Tk** (for DRAW).
|
||||
See @ref intro_req "requirements on 3rdparty libraries" for a full list.
|
||||
On OS X we recommend to use native libraries.
|
||||
|
||||
@section build_occt_windows Windows
|
||||
|
||||
@subsection build_occt_win_cmake Building with CMake tool
|
||||
@section build_cmake_intro General
|
||||
|
||||
This article describes the **CMake**-based build process, which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources. *OCCT requires CMake version 2.8.12 or later*.
|
||||
|
||||
@@ -20,9 +12,9 @@ This article describes the **CMake**-based build process, which is now suggested
|
||||
Here we describe the build procedure on the example of Windows platform with Visual Studio 2010.
|
||||
However, CMake is cross-platform and can be used to build OCCT on Linux and OS X in essentially the same way.
|
||||
|
||||
@note Before you start, make sure to have installed all 3-rd party products that you are going to use with OCCT; see @ref build_upgrade.
|
||||
@note Before you start, make sure to have installed all 3-rd party products that you are going to use with OCCT; see @ref occt_dev_guides__building.
|
||||
|
||||
@subsubsection build_cmake_start Start CMake
|
||||
@section build_cmake_start Start CMake
|
||||
|
||||
CMake is a tool that generates the actual project files for the selected target build system (e.g. Unix makefiles) or IDE (e.g. Visual Studio 2010).
|
||||
|
||||
@@ -45,14 +37,14 @@ It is however possible to choose one installation directory for several configur
|
||||
d:/occt-install -- the installation directory that is
|
||||
able to contain several OCCT configurations
|
||||
|
||||
@subsubsection build_cmake_conf Configuration process
|
||||
@section build_cmake_conf Configuration process
|
||||
|
||||
If the command-line tool is used, run the tool from the build directory with a single argument indicating the source (relative or absolute path) directory:
|
||||
|
||||
cd d:/tmp/occt-build-vc10-x64
|
||||
ccmake d:/occt
|
||||
|
||||
@figure{/build/build_occt/images/cmake_image000.png}
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image000.png}
|
||||
|
||||
Press *c* to configure.
|
||||
|
||||
@@ -60,13 +52,13 @@ All actions required in the configuration process with the GUI tool will be desc
|
||||
|
||||
If the GUI tool is used, run this tool without additional arguments and after that specify the source directory by clicking **Browse Source** and the build (binary) one by clicking **Browse Build**.
|
||||
|
||||
@figure{/build/build_occt/images/cmake_image001.png}
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image001.png}
|
||||
|
||||
**Note**: 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 and compiler (e.g., <i>d:/occt/build/win32-vc10</i> ).
|
||||
|
||||
Once the source and build directories are selected, "Configure" button should be pressed in order to start manual configuration process. It begins with selection of a target configurator. It is "Visual Studio 10 2010 Win64" in our example.
|
||||
|
||||
@figure{/build/build_occt/images/cmake_image002.png}
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image002.png}
|
||||
|
||||
To build OCCT for **Universal Windows Platform (UWP)** specify the path to toolchain file for cross-compiling <i>d:/occt/adm/templates/uwp.toolchain.config.cmake</i>.
|
||||
|
||||
@@ -76,7 +68,7 @@ Alternatively, if you are using CMake from the command line add options -DCMAKE_
|
||||
|
||||
Once "Finish" button is pressed, the first pass of the configuration process is executed. At the end of the process, CMake outputs the list of environment variables, which have to be properly specified for successful configuration.
|
||||
|
||||
@figure{/build/build_occt/images/cmake_image003.png}
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image003.png}
|
||||
|
||||
The error message provides some information about these variables. This message will appear after each pass of the process until all required variables are specified correctly.
|
||||
|
||||
@@ -132,7 +124,7 @@ The following table gives the full list of environment variables used at the con
|
||||
|
||||
**Note:** Only the forward slashes ("/") are acceptable in the CMake options defining paths.
|
||||
|
||||
@subsubsection build_cmake_3rdparty 3rd party search mechanism
|
||||
@section build_cmake_3rdparty 3rd party search mechanism
|
||||
|
||||
If *3RDPARTY_DIR* directory is defined, then required 3rd party binaries are sought in it, and default system folders are ignored.
|
||||
|
||||
@@ -175,15 +167,15 @@ During the configuration process the related variables (*3RDPARTY_FREETYPE_DLL_D
|
||||
|
||||
**Note**: The names of searched libraries and header files are hard-coded. If there is the need to change their names, change appropriate cmake variables (edit CMakeCache.txt file or edit in cmake-gui in advance mode) without reconfiguration: *3RDPARTY_\<PRODUCT\>_INCLUDE* for include, *3RDPARTY_\<PRODUCT\>_LIB* for library and *3RDPARTY_\<PRODUCT\>_DLL* for shared library.
|
||||
|
||||
@subsubsection build_cmake_gen Projects generation
|
||||
@section build_cmake_gen Projects generation
|
||||
|
||||
Once the configuration process is done, the "Generate" button is used to prepare project files for the target IDE. In our exercise the Visual Studio solution will be automatically created in the buid directory.
|
||||
|
||||
@subsubsection build_cmake_build Building
|
||||
@section build_cmake_build Building
|
||||
|
||||
Go to the build folder, start the Visual Studio solution *OCCT.sln* and build it by clicking **Build -> Build Solution**.
|
||||
|
||||
@figure{/build/build_occt/images/cmake_image004.png}
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image004.png}
|
||||
|
||||
By default the build solution process skips the building of the INSTALL and Overview project.
|
||||
|
||||
@@ -193,7 +185,7 @@ When the building process is finished build:
|
||||
|
||||
For this, right-click on the *Overview/INSTALL* project and select **Project Only -> Build Only** -> *Overview/INSTALL* in the solution explorer.
|
||||
|
||||
@subsubsection build_cmake_install Installation
|
||||
@section build_cmake_install Installation
|
||||
|
||||
Installation is a process of extracting redistributable resources (binaries, include files etc) from the build directory into the installation one. The installation directory will be free of project files, intermediate object files and any other information related to the build routines.
|
||||
|
||||
@@ -221,362 +213,3 @@ follows:
|
||||
If CMake installation flags are enabled for the 3rd party products (e.g. INSTALL_FREETYPE), then the corresponding binaries will be copied to the same bin(d) and lib(d) directories together with the native binaries of OCCT. Such organization of libraries can be especially helpful if your OCCT-based software does not use itself the 3rd parties of Open CASCADE Technology (thus, there is no sense to pack them into dedicated directories).
|
||||
|
||||
The installation folder contains the scripts to run *DRAWEXE* (*draw.bat* or *draw.sh*), samples (if they were installed) and overview.html (short-cut for installed OCCT overview documentation).
|
||||
|
||||
@subsection build_occt_win_codeblocks Building with Code::Blocks
|
||||
|
||||
This file describes steps to build OCCT libraries from sources using **Code::Blocks**, a cross-platform IDE, using project files generated by OCCT legacy tool **genproj**.
|
||||
It can be used as an alternative to CMake build system (see @ref build_occt_win_cmake) for all supported platforms.
|
||||
|
||||
@subsubsection build_codeblocks_3rdparty Third-party libraries
|
||||
|
||||
Before building OCCT, make sure to have all the needed third-party libraries installed, see @ref build_upgrade.
|
||||
|
||||
@subsubsection build_codeblocks_conf Configuration
|
||||
|
||||
Before building it is necessary to set up build environment.
|
||||
|
||||
The environment is defined in the file *custom.sh* (on Linux and OS X) or *custom.bat* (on Windows) which can be edited directly:
|
||||
|
||||
* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC*.
|
||||
* Add paths to their binary libraries in variable *CSF_OPT_LIB64*.
|
||||
* Set variable *SHORTCUT_HEADERS* to specify a method for population of folder *inc* by header files. Supported methods are:
|
||||
* *Copy* - headers will be copied from *src*;
|
||||
* *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*;
|
||||
* "HardLink* - hard links to headers located in *src* will be created.
|
||||
* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
|
||||
~~~~~
|
||||
export HAVE_FREEIMAGE=false
|
||||
~~~~~
|
||||
|
||||
Alternatively, or when *custom.sh* or *custom.bat* does not exist, you can launch **genconf** tool to configure environment interactively:
|
||||
|
||||
@figure{/build/build_occt/images/genconf_linux.png}
|
||||
|
||||
Click "Save" to store the specified configuration in *custom.sh* or *custom.bat* file.
|
||||
|
||||
@subsubsection build_codeblocks_gen Projects generation
|
||||
|
||||
Launch **genproj** tool with option *cbp* to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files:
|
||||
|
||||
~~~~~
|
||||
$ cd /dev/OCCT/opencascade-7.0.0
|
||||
$ ./genproj cbp
|
||||
~~~~~
|
||||
|
||||
The generated Code::Blocks project are placed into subfolder *adm/<OS>/cbp*.
|
||||
|
||||
@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
|
||||
|
||||
@subsubsection build_codeblocks_build Building
|
||||
|
||||
To start **Code::Blocks**, launch script *codeblocks.sh*.
|
||||
|
||||
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, run the script
|
||||
~~~~~
|
||||
./draw.sh cbp [d]
|
||||
~~~~~
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
||||
|
||||
@subsection build_occt_genproj Building with Genproj tool
|
||||
|
||||
This page describes steps to build OCCT libraries from a complete source archive on Windows with <b>MS Visual C++</b> using projects generated by **genproj** tool.
|
||||
It is an alternative to use of CMake build system (see @ref build_occt_win_cmake).
|
||||
|
||||
**genproj** is a legacy tool (originated from command "wgenproj" in WOK) for generation of Visual Studio, Code.Blocks, and XCode project files used for building Open CASCADE Technology.
|
||||
These project files are placed inside OCCT directory (in *adm* subfolder) and use relative paths, thus can be moved together with sources.
|
||||
|
||||
The project files included in official distribution of OCCT are generated by this tool.
|
||||
If you have official distribution with project files included, you can use them directly without a need to call **genproj**.
|
||||
|
||||
@subsubsection build_msvc_3rdparty Third-party libraries
|
||||
|
||||
Before building OCCT, make sure to have all the required third-party libraries installed.
|
||||
|
||||
The easiest way to install third-party libraries is to download archive with pre-built binaries, corresponding to version of Visual Studio you are using, from https://opencascade.com/content/3rd-party-components.
|
||||
|
||||
You can also build third-party libraries from their sources, see @ref build_upgrade_building_3rdparty for instructions.
|
||||
|
||||
@subsubsection build_msvc_conf Configuration
|
||||
|
||||
If you have Visual Studio projects already available (pre-installed or generated), you can edit file *custom.bat* manually to adjust the environment:
|
||||
|
||||
* *VCVER* -- specification of format of project files, defining also version of Visual Studio to be used, and default name of the sub-folder for binaries:
|
||||
|
||||
| VCVER | Visual Studio version | Windows Platform | Binaries folder name |
|
||||
|-----------|-----------------------|----------------------------------|----------------------|
|
||||
| vc10 | 2010 (10) | Desktop (Windows API) | vc10 |
|
||||
| vc11 | 2012 (11) | Desktop (Windows API) | vc11 |
|
||||
| vc12 | 2013 (12) | Desktop (Windows API) | vc12 |
|
||||
| vc14 | 2015 (14) | Desktop (Windows API) | vc14 |
|
||||
| vc14-uwp | 2015 (14) | UWP (Universal Windows Platform) | vc14-uwp |
|
||||
| vc141 | 2017 (15) | Desktop (Windows API) | vc14 |
|
||||
| vc141-uwp | 2017 (15) | UWP (Universal Windows Platform) | vc14-uwp |
|
||||
| vc142 | 2019 (16) | Desktop (Windows API) | vc14 |
|
||||
| vc142-uwp | 2019 (16) | UWP (Universal Windows Platform) | vc14-uwp |
|
||||
|
||||
* *ARCH* -- architecture (32 or 64), affects only *PATH* variable for execution
|
||||
* <i>HAVE_*</i> -- flags to enable or disable use of optional third-party products
|
||||
* <i>CSF_OPT_*</i> -- paths to search for includes and binaries of all used third-party products
|
||||
* *SHORTCUT_HEADERS* -- defines method for population of folder *inc* by header files. Supported methods are:
|
||||
* *Copy* - headers will be copied from *src*;
|
||||
* *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*;
|
||||
* "HardLink* - hard links to headers located in *src* will be created.
|
||||
|
||||
Alternatively, you can launch **genconf**, a GUI tool allowing to configure build options interactively.
|
||||
That tool will analyze your environment and propose you to choose available options:
|
||||
|
||||
* Version of Visual Studio to be used (from the list of installed ones, detected by presence of environment variables like *VS100COMNTOOLS*).
|
||||
* Method to populate folder *inc* (short-cuts by default).
|
||||
* Location of third-party libraries (usually downloaded from OCCT web site, see above).
|
||||
* Path to common directory where third-party libraries are located (optional).
|
||||
* Paths to headers and binaries of the third-party libraries (found automatically basing on previous options; click button "Reset" to update).
|
||||
* Generation of PDB files within Release build ("Release with Debug info", false by default).
|
||||
|
||||
@figure{/build/build_occt/images/genconf_windows.png}
|
||||
|
||||
Click "Save" to store the specified configuration in *custom.bat* file.
|
||||
|
||||
@subsubsection build_msvc_generate Projects generation
|
||||
|
||||
Launch **genproj** to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files.
|
||||
|
||||
@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
|
||||
If Tcl is not found, the tool may prompt you to enter the path to directory where Tcl can be found.
|
||||
|
||||
~~~~~
|
||||
$ genproj.bat
|
||||
~~~~~
|
||||
|
||||
Note that if *custom.bat* is not present, **genproj** will start **genconf** to configure environment.
|
||||
|
||||
@subsubsection build_msvc_build Building
|
||||
|
||||
Launch *msvc.bat* to start Visual Studio with all necessary environment variables defined, and build the whole solution or required toolkits.
|
||||
|
||||
Note: the MSVC project files are located in folders <i>adm\\msvc\\vc...</i>.
|
||||
Binaries are produced in *win32* or *win64* folders.
|
||||
|
||||
To start DRAW, launch *draw.bat*.
|
||||
|
||||
@section build_occt_linux Linux
|
||||
|
||||
You may choose one of the following ways to generate, configure and build OCCT sources on Linux just keeping in mind
|
||||
this platform specific:
|
||||
|
||||
* @ref build_occt_win_cmake "Configuration, generation and building OCCT on Windows using CMake tool"
|
||||
* @ref build_occt_code_blocks "Building on Mac OS X with Code::Blocks IDE"
|
||||
|
||||
@section build_occt_crossplatform_cmake Android (cross-compiling)
|
||||
|
||||
This article describes the steps to build OCCT libraries for Android from a complete source package
|
||||
with GNU make (makefiles). The steps on Windows 7 and Ubuntu 15.10 are similar. There is the only one difference:
|
||||
makefiles are built with mingw32-make
|
||||
on Windows and native GNU make on Ubuntu.
|
||||
|
||||
Required tools (download and install if it is required):
|
||||
- CMake v3.0+ http://www.cmake.org/cmake/resources/software.html
|
||||
- Cross-compilation toolchain for CMake https://github.com/taka-no-me/android-cmake
|
||||
- Android NDK rev.10+ https://developer.android.com/tools/sdk/ndk/index.html
|
||||
- GNU Make: MinGW v4.82+ for Windows (http://sourceforge.net/projects/mingw/files/), GNU Make 4.0 for Ubuntu.
|
||||
|
||||
Run GUI tool provided by CMake.
|
||||
|
||||
@subsection build_occt_crossplatform_cmake_config Configuration
|
||||
|
||||
**Configure Tools**
|
||||
- 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{/build/build_occt/images/android_image001.png}
|
||||
|
||||
Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project.
|
||||
|
||||
Select "MinGW MakeFiles" item from the list
|
||||
- Choose "Specify toolchain file for cross-compiling"
|
||||
- Click "Next"
|
||||
@figure{/build/build_occt/images/android_image002.png}
|
||||
|
||||
- Specify a toolchain file at the next dialog by android.toolchain.cmake . It is contained by cross-compilation
|
||||
toolchain for CMake
|
||||
- Click "Finish"
|
||||
@figure{/build/build_occt/images/android_image003.png}
|
||||
|
||||
If ANDROID_NDK environment variable is not defined in current OS, add cache entry ANDROID_NDK (entry type is PATH) --
|
||||
path to the NDK folder ("Add Entry" button)
|
||||
@figure{/build/build_occt/images/android_image004.png}
|
||||
|
||||
If on Windows the message is appeared: "CMake Error: CMake was unable to find a build program corresponding
|
||||
to "MinGW Makefiles"
|
||||
CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.",
|
||||
specify **CMAKE_MAKE_PROGRAM** to mingw32-make executable.
|
||||
@figure{/build/build_occt/images/android_image005.png}
|
||||
|
||||
**Configure OCCT**
|
||||
|
||||
How to configure OCCT, see "OCCT Configuration" section of @ref build_occt_win_cmake
|
||||
"Configure, Generate, Build using CMake tool" taking into account the specific configuration variables for android:
|
||||
- ANDROID_ABI = armeabi-v7a
|
||||
- ANDROID_NATIVE_API_LEVEL = 15
|
||||
- ANDROID_NDK_LAYOUT is equal to CMAKE_BUILD_TYPE variable
|
||||
- **BUILD_MODULE_Draw = OFF**
|
||||
|
||||
@figure{/build/build_occt/images/android_image006.png}
|
||||
|
||||
@subsection build_occt_crossplatform_cmake_generation Generate Makefiles
|
||||
|
||||
Click **Generate** button and wait until the generation process is finished.
|
||||
Then makefiles will appear in the build folder (e.g. <i> D:/tmp/occt-android </i>).
|
||||
|
||||
@subsection build_occt_crossplatform_cmake_building Build Makefiles
|
||||
|
||||
Open console and go to the build folder. Type "mingw32-make" (Windows) or "make" (Ubuntu) to start build process.
|
||||
|
||||
> mingw32-make
|
||||
or
|
||||
> make
|
||||
|
||||
Parallel building can be started with using **"-jN"** argument of "mingw32-make/make", where N is the number of
|
||||
building threads.
|
||||
|
||||
> mingw32-make -j4
|
||||
or
|
||||
> make -j4
|
||||
|
||||
@subsection build_occt_crossplatform_cmake_install Install OCCT Libraries
|
||||
|
||||
Type "mingw32-make/make" with argument "install" to place the libraries to the install folder
|
||||
|
||||
> mingw32-make install
|
||||
or
|
||||
> make install
|
||||
|
||||
@section build_occt_macos Mac OS X
|
||||
|
||||
@subsection build_occt_macos_xcode Building with Xcode
|
||||
|
||||
This file describes steps to build OCCT libraries from sources on Mac OS X with **Xcode** projects, generated by OCCT legacy tool **genproj**.
|
||||
|
||||
<h2>Configuration</h2>
|
||||
|
||||
Before building it is necessary to set up build environment.
|
||||
|
||||
The environment is defined in the file *custom.sh* which can be edited directly:
|
||||
|
||||
* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC* (use colon ":" as path separator).
|
||||
* Add paths to their binary libraries in variable *CSF_OPT_LIB64*.
|
||||
* Set variable *SHORTCUT_HEADERS* to specify a method for population of folder *inc* by header files. Supported methods are:
|
||||
* *Copy* - headers will be copied from *src*;
|
||||
* *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*;
|
||||
* "HardLink* - hard links to headers located in *src* will be created.
|
||||
* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
|
||||
~~~~~
|
||||
export HAVE_GL2PS=false
|
||||
~~~~~
|
||||
|
||||
Alternatively, or when *custom.sh* does not exist, you can launch *genconf.sh* to configure environment interactively:
|
||||
|
||||
@figure{/build/build_occt/images/genconf_osx.png}
|
||||
|
||||
Click "Save" to store the specified configuration in *custom.sh* file.
|
||||
|
||||
<h2>Projects generation</h2>
|
||||
|
||||
Launch **genproj** tool to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files.
|
||||
|
||||
@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
|
||||
|
||||
For instance, in Terminal application:
|
||||
|
||||
~~~~~
|
||||
$ cd /dev/OCCT/opencascade-7.0.0
|
||||
$ ./genproj
|
||||
~~~~~
|
||||
|
||||
<h2>Building</h2>
|
||||
|
||||
To start **Xcode**, launch script *xcode.sh*.
|
||||
|
||||
To build a certain toolkit, select it in **Scheme** drop-down list in Xcode toolbar, press **Product** in the menu and click **Build** button.
|
||||
|
||||
To build the entire OCCT:
|
||||
* Create a new empty project (select **File -> New -> Project -> Empty project** in the menu; input the project name, e.g. *OCCT*; then click **Next** and **Create**).
|
||||
* Drag and drop the *OCCT* folder in the created *OCCT* project in the Project navigator.
|
||||
* Select **File -> New -> Target -> Aggregate** in the menu.
|
||||
* Enter the project name (e.g. *OCCT*) and click **Finish**. The **Build Phases** tab will open.
|
||||
* Click "+" button to add the necessary toolkits to the target project. It is possible to select all toolkits by pressing **Command+A** combination.
|
||||
|
||||
<h2>Launching DRAW</h2>
|
||||
|
||||
To start *DRAWEXE*, which has been built with Xcode on Mac OS X, perform the following steps:
|
||||
|
||||
1.Open Terminal application
|
||||
|
||||
2.Enter <i>\<OCCT_ROOT_DIR\></i>:
|
||||
~~~~~
|
||||
cd \<OCCT_ROOT_DIR\>
|
||||
~~~~~
|
||||
|
||||
3.Run the script
|
||||
~~~~~
|
||||
./draw_cbp.sh xcd [d]
|
||||
~~~~~
|
||||
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
||||
|
||||
@subsection build_occt_code_blocks Building with Code::Blocks
|
||||
|
||||
This file describes steps to build OCCT libraries from sources using **Code::Blocks**, a cross-platform IDE, using
|
||||
project files generated by OCCT legacy tool **genproj**.
|
||||
|
||||
<h2>Configure</h2>
|
||||
|
||||
Before building it is necessary to set up build environment.
|
||||
|
||||
The environment is defined in the file *custom.sh* (on Linux and OS X) or *custom.bat* (on Windows) which can be edited
|
||||
directly:
|
||||
|
||||
* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC*.
|
||||
* Add paths to their binary libraries in variable *CSF_OPT_LIB64*.
|
||||
* Set variable *SHORTCUT_HEADERS* to specify a method for population of folder *inc* by header files. Supported methods are:
|
||||
* *Copy* - headers will be copied from *src*;
|
||||
* *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*;
|
||||
* "HardLink* - hard links to headers located in *src* will be created.
|
||||
* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
|
||||
~~~~~
|
||||
export HAVE_GL2PS=false
|
||||
~~~~~
|
||||
|
||||
Alternatively, or when *custom.sh* or *custom.bat* does not exist, you can launch **genconf** tool to configure
|
||||
environment interactively:
|
||||
|
||||
@figure{/build/build_occt/images/genconf_linux.png}
|
||||
|
||||
Click "Save" to store the specified configuration in *custom.sh* or *custom.bat* file.
|
||||
|
||||
<h2>Generate Projects</h2>
|
||||
|
||||
Launch **genproj** tool with option *cbp* to update content of *inc* folder and generate project files after changes in
|
||||
OCCT code affecting layout or composition of source files:
|
||||
|
||||
~~~~~
|
||||
$ cd /dev/OCCT/opencascade-7.0.0
|
||||
$ ./genproj cbp
|
||||
~~~~~
|
||||
|
||||
The generated Code::Blocks project are placed into subfolder *adm/<OS>/cbp*.
|
||||
|
||||
@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
|
||||
|
||||
<h2>Build</h2>
|
||||
|
||||
To start **Code::Blocks**, launch script *codeblocks.sh*.
|
||||
|
||||
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, run the script
|
||||
~~~~~
|
||||
./draw_cbp.sh cbp [d]
|
||||
~~~~~
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
61
dox/dev_guides/building/code_blocks.md
Normal file
@@ -0,0 +1,61 @@
|
||||
Building with Code::Blocks {#occt_dev_guides__building_code_blocks}
|
||||
==========================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section build_codeblocks_intro General
|
||||
|
||||
This file describes steps to build OCCT libraries from sources using **Code::Blocks**, a cross-platform IDE, using project files generated by OCCT legacy tool **genproj**.
|
||||
It can be used as an alternative to CMake build system (see @ref occt_dev_guides__building_cmake) for all supported platforms.
|
||||
|
||||
@section build_codeblocks_3rdparty Third-party libraries
|
||||
|
||||
Before building OCCT, make sure to have all the needed third-party libraries installed, see @ref occt_dev_guides__building.
|
||||
|
||||
@section build_codeblocks_conf Configuration
|
||||
|
||||
Before building it is necessary to set up build environment.
|
||||
|
||||
The environment is defined in the file *custom.sh* (on Linux and OS X) or *custom.bat* (on Windows) which can be edited directly:
|
||||
|
||||
* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC*.
|
||||
* Add paths to their binary libraries in variable *CSF_OPT_LIB64*.
|
||||
* Set variable *SHORTCUT_HEADERS* to specify a method for population of folder *inc* by header files. Supported methods are:
|
||||
* *Copy* - headers will be copied from *src*;
|
||||
* *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*;
|
||||
* "HardLink* - hard links to headers located in *src* will be created.
|
||||
* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
|
||||
~~~~~
|
||||
export HAVE_FREEIMAGE=false
|
||||
~~~~~
|
||||
|
||||
Alternatively, or when *custom.sh* or *custom.bat* does not exist, you can launch **genconf** tool to configure environment interactively:
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/genconf_linux.png}
|
||||
|
||||
Click "Save" to store the specified configuration in *custom.sh* or *custom.bat* file.
|
||||
|
||||
@section build_codeblocks_gen Projects generation
|
||||
|
||||
Launch **genproj** tool with option *cbp* to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files:
|
||||
|
||||
~~~~~
|
||||
$ cd /dev/OCCT/opencascade-7.0.0
|
||||
$ ./genproj cbp
|
||||
~~~~~
|
||||
|
||||
The generated Code::Blocks project are placed into subfolder *adm/<OS>/cbp*.
|
||||
|
||||
@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
|
||||
|
||||
@section build_codeblocks_build Building
|
||||
|
||||
To start **Code::Blocks**, launch script *codeblocks.sh*.
|
||||
|
||||
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, run the script
|
||||
~~~~~
|
||||
./draw.sh cbp [d]
|
||||
~~~~~
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
85
dox/dev_guides/building/msvc.md
Normal file
@@ -0,0 +1,85 @@
|
||||
Building with MS Visual C++ {#occt_dev_guides__building_msvc}
|
||||
===========================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section build_msvc_intro General
|
||||
|
||||
This page describes steps to build OCCT libraries from a complete source archive on Windows with <b>MS Visual C++</b> using projects generated by **genproj** tool.
|
||||
It is an alternative to use of CMake build system (see @ref occt_dev_guides__building_cmake).
|
||||
|
||||
**genproj** is a legacy tool (originated from command "wgenproj" in WOK) for generation of Visual Studio, Code.Blocks, and XCode project files used for building Open CASCADE Technology.
|
||||
These project files are placed inside OCCT directory (in *adm* subfolder) and use relative paths, thus can be moved together with sources.
|
||||
|
||||
The project files included in official distribution of OCCT are generated by this tool.
|
||||
If you have official distribution with project files included, you can use them directly without a need to call **genproj**.
|
||||
|
||||
@section build_msvc_3rdparty Third-party libraries
|
||||
|
||||
Before building OCCT, make sure to have all the required third-party libraries installed.
|
||||
|
||||
The easiest way to install third-party libraries is to download archive with pre-built binaries, corresponding to version of Visual Studio you are using, from https://www.opencascade.com/content/3rd-party-components.
|
||||
|
||||
You can also build third-party libraries from their sources, see @ref occt_dev_guides__building_3rdparty_windows for instructions.
|
||||
|
||||
@section build_msvc_conf Configuration
|
||||
|
||||
If you have Visual Studio projects already available (pre-installed or generated), you can edit file *custom.bat* manually to adjust the environment:
|
||||
|
||||
* *VCVER* -- specification of format of project files, defining also version of Visual Studio to be used, and default name of the sub-folder for binaries:
|
||||
|
||||
| VCVER | Visual Studio version | Windows Platform | Binaries folder name |
|
||||
|-----------|-----------------------|----------------------------------|----------------------|
|
||||
| vc10 | 2010 (10) | Desktop (Windows API) | vc10 |
|
||||
| vc11 | 2012 (11) | Desktop (Windows API) | vc11 |
|
||||
| vc12 | 2013 (12) | Desktop (Windows API) | vc12 |
|
||||
| vc14 | 2015 (14) | Desktop (Windows API) | vc14 |
|
||||
| vc14-uwp | 2015 (14) | UWP (Universal Windows Platform) | vc14-uwp |
|
||||
| vc141 | 2017 (15) | Desktop (Windows API) | vc14 |
|
||||
| vc141-uwp | 2017 (15) | UWP (Universal Windows Platform) | vc14-uwp |
|
||||
| vc142 | 2019 (16) | Desktop (Windows API) | vc14 |
|
||||
| vc142-uwp | 2019 (16) | UWP (Universal Windows Platform) | vc14-uwp |
|
||||
|
||||
* *ARCH* -- architecture (32 or 64), affects only *PATH* variable for execution
|
||||
* <i>HAVE_*</i> -- flags to enable or disable use of optional third-party products
|
||||
* <i>CSF_OPT_*</i> -- paths to search for includes and binaries of all used third-party products
|
||||
* *SHORTCUT_HEADERS* -- defines method for population of folder *inc* by header files. Supported methods are:
|
||||
* *Copy* - headers will be copied from *src*;
|
||||
* *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*;
|
||||
* "HardLink* - hard links to headers located in *src* will be created.
|
||||
|
||||
Alternatively, you can launch **genconf**, a GUI tool allowing to configure build options interactively.
|
||||
That tool will analyze your environment and propose you to choose available options:
|
||||
|
||||
* Version of Visual Studio to be used (from the list of installed ones, detected by presence of environment variables like *VS100COMNTOOLS*).
|
||||
* Method to populate folder *inc* (short-cuts by default).
|
||||
* Location of third-party libraries (usually downloaded from OCCT web site, see above).
|
||||
* Path to common directory where third-party libraries are located (optional).
|
||||
* Paths to headers and binaries of the third-party libraries (found automatically basing on previous options; click button "Reset" to update).
|
||||
* Generation of PDB files within Release build ("Release with Debug info", false by default).
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/genconf_windows.png}
|
||||
|
||||
Click "Save" to store the specified configuration in *custom.bat* file.
|
||||
|
||||
@section build_msvc_generate Projects generation
|
||||
|
||||
Launch **genproj** to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files.
|
||||
|
||||
@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
|
||||
If Tcl is not found, the tool may prompt you to enter the path to directory where Tcl can be found.
|
||||
|
||||
~~~~~
|
||||
$ genproj.bat
|
||||
~~~~~
|
||||
|
||||
Note that if *custom.bat* is not present, **genproj** will start **genconf** to configure environment.
|
||||
|
||||
@section build_msvc_build Building
|
||||
|
||||
Launch *msvc.bat* to start Visual Studio with all necessary environment variables defined, and build the whole solution or required toolkits.
|
||||
|
||||
Note: the MSVC project files are located in folders <i>adm\\msvc\\vc...</i>.
|
||||
Binaries are produced in *win32* or *win64* folders.
|
||||
|
||||
To start DRAW, launch *draw.bat*.
|
88
dox/dev_guides/building/xcode.md
Normal file
@@ -0,0 +1,88 @@
|
||||
Building with Xcode {#occt_dev_guides__building_xcode}
|
||||
===================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section build_xcode_intro General
|
||||
|
||||
This file describes steps to build OCCT libraries from sources on Mac OS X with **Xcode** projects, generated by OCCT legacy tool **genproj**.
|
||||
|
||||
@section build_xcode_3rdparty Third-party libraries
|
||||
|
||||
Before building OCCT, make sure to have all the needed third-party libraries installed.
|
||||
On OS X we recommend to use native libraries.
|
||||
You can also build third-party libraries from their sources, see @ref occt_dev_guides__building_3rdparty_osx for instructions.
|
||||
|
||||
@section build_xcode_conf Configuration
|
||||
|
||||
Before building it is necessary to set up build environment.
|
||||
|
||||
The environment is defined in the file *custom.sh* which can be edited directly:
|
||||
|
||||
* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC* (use colon ":" as path separator).
|
||||
* Add paths to their binary libraries in variable *CSF_OPT_LIB64*.
|
||||
* Set variable *SHORTCUT_HEADERS* to specify a method for population of folder *inc* by header files. Supported methods are:
|
||||
* *Copy* - headers will be copied from *src*;
|
||||
* *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*;
|
||||
* "HardLink* - hard links to headers located in *src* will be created.
|
||||
* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
|
||||
~~~~~
|
||||
export HAVE_FREEIMAGE=false
|
||||
~~~~~
|
||||
|
||||
Alternatively, or when *custom.sh* does not exist, you can launch *genconf.sh* to configure environment interactively:
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/genconf_osx.png}
|
||||
|
||||
Click "Save" to store the specified configuration in *custom.sh* file.
|
||||
|
||||
@section build_xcode_gen Projects generation
|
||||
|
||||
Launch **genproj** tool to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files.
|
||||
|
||||
@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
|
||||
|
||||
For instance, in Terminal application:
|
||||
|
||||
~~~~~
|
||||
$ cd /dev/OCCT/opencascade-7.0.0
|
||||
$ ./genproj
|
||||
~~~~~
|
||||
|
||||
Option **-static** can be used with XCode to build static libraries.
|
||||
|
||||
~~~~~
|
||||
$ cd /dev/OCCT/opencascade-7.0.0
|
||||
$ ./genproj xcd -static
|
||||
~~~~~
|
||||
|
||||
@section build_xcode_build Building
|
||||
|
||||
To start **Xcode**, launch script *xcode.sh*.
|
||||
|
||||
To build a certain toolkit, select it in **Scheme** drop-down list in Xcode toolbar, press **Product** in the menu and click **Build** button.
|
||||
|
||||
To build the entire OCCT:
|
||||
* Create a new empty project (select **File -> New -> Project -> Empty project** in the menu; input the project name, e.g. *OCCT*; then click **Next** and **Create**).
|
||||
* Drag and drop the *OCCT* folder in the created *OCCT* project in the Project navigator.
|
||||
* Select **File -> New -> Target -> Aggregate** in the menu.
|
||||
* Enter the project name (e.g. *OCCT*) and click **Finish**. The **Build Phases** tab will open.
|
||||
* Click "+" button to add the necessary toolkits to the target project. It is possible to select all toolkits by pressing **Command+A** combination.
|
||||
|
||||
@section build_xcode_draw Launching DRAW
|
||||
|
||||
To start *DRAWEXE*, which has been built with Xcode on Mac OS X, perform the following steps:
|
||||
|
||||
1.Open Terminal application
|
||||
|
||||
2.Enter <i>\<OCCT_ROOT_DIR\></i>:
|
||||
~~~~~
|
||||
cd \<OCCT_ROOT_DIR\>
|
||||
~~~~~
|
||||
|
||||
3.Run the script
|
||||
~~~~~
|
||||
./draw.sh xcd [d]
|
||||
~~~~~
|
||||
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
@@ -1,4 +1,4 @@
|
||||
Coding Rules {#occt_contribution__coding_rules}
|
||||
Coding Rules {#occt_dev_guides__coding_rules}
|
||||
======================================
|
||||
|
||||
@tableofcontents
|
@@ -1,4 +1,4 @@
|
||||
Contribution Workflow {#occt_contribution__contribution_workflow}
|
||||
Contribution Workflow {#occt_dev_guides__contribution_workflow}
|
||||
====================================
|
||||
@tableofcontents
|
||||
|
||||
@@ -144,7 +144,7 @@ Change of layout or re-formatting of the existing code is allowed only in the pa
|
||||
|
||||
@note If deemed useful, re-formatting or cosmetic changes affecting considerable parts of the code can be made within a dedicated issue.
|
||||
|
||||
The changes should comply with the OCCT @ref occt_contribution__coding_rules "Codng Rules".
|
||||
The changes should comply with the OCCT @ref occt_dev_guides__coding_rules "Codng Rules".
|
||||
It is especially important to comment the code properly so that other people can understand it easier.
|
||||
|
||||
The modification should be tested by running OCCT tests (on the platform and scope available to **Developer**) and ensuring absence of regressions.
|
||||
@@ -163,9 +163,9 @@ When the test case cannot be provided for any reason, the maximum possible infor
|
||||
|
||||
If the change affects a functionality described in @ref user_guides "User Guides", the corresponding user guide should be updated to reflect the change.
|
||||
|
||||
If the change affects OCCT test system, build environment, or development tools described in @ref build_upgrade "Build, Debug and Upgrade" or @ref contribution "Contribution", the corresponding guide should be updated.
|
||||
If the change affects OCCT test system, build environment, or development tools described in @ref dev_guides "Developer Guides", the corresponding guide should be updated.
|
||||
|
||||
The changes that break compatibility with the previous versions of OCCT (i.e. affecting API or behavior of existing functionality in the way that may require update of existing applications based on an earlier official release of OCCT to work correctly) should be described in the document @ref occt__upgrade "Upgrade from previous OCCT versions".
|
||||
The changes that break compatibility with the previous versions of OCCT (i.e. affecting API or behavior of existing functionality in the way that may require update of existing applications based on an earlier official release of OCCT to work correctly) should be described in the document @ref occt_dev_guides__upgrade "Upgrade from previous OCCT versions".
|
||||
It is recommended to add a sub-section for each change described.
|
||||
The description should provide the explanation of the incompatibility introduced by the change, and describe how it can be resolved (at least, in known situations).
|
||||
When feasible, the automatic upgrade procedure (adm/upgrade.tcl) can be extended by a new option to perform the required upgrade of the dependent code automatically.
|
||||
@@ -183,7 +183,7 @@ In case if the fix is implemented on the previous release of OCCT, the branch ca
|
||||
The branch name should be composed of letters **CR** (abbreviation of "Change Request") followed by the issue ID number (without leading zeros).
|
||||
It is possible to add an optional suffix to the branch name after the issue ID, e.g. to distinguish between several versions of the fix (see @ref occt_contribution_nonstd_rebase).
|
||||
|
||||
See @ref occt_contribution__git_guide "Guide to using GIT" for help.
|
||||
See @ref occt_dev_guides__git_guide "Guide to using GIT" for help.
|
||||
|
||||
@note When a branch with the name given according to the above rule is pushed to Git, a note is automatically added to the corresponding issue in Mantis, indicating the person who has made the push, the commit hash, and (for new commits) the description.
|
||||
|
||||
@@ -226,7 +226,7 @@ The possible variants are:
|
||||
|
||||
@subsection occt_contribution_workflow_review Code review
|
||||
|
||||
The **Reviewer** analyzes the proposed solution for applicability in accordance with OCCT @ref occt_contribution__coding_rules "Coding Rules" and examines all changes in the sources, test case(s), and documentation to detect obvious and possible errors, misprints, or violations of the coding style.
|
||||
The **Reviewer** analyzes the proposed solution for applicability in accordance with OCCT @ref occt_dev_guides__coding_rules "Coding Rules" and examines all changes in the sources, test case(s), and documentation to detect obvious and possible errors, misprints, or violations of the coding style.
|
||||
|
||||
If the Reviewer detects some problems, he can either:
|
||||
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
@@ -1,4 +1,4 @@
|
||||
Debugging tools and hints {#occt__debug}
|
||||
Debugging tools and hints {#occt_dev_guides__debug}
|
||||
=========================
|
||||
|
||||
@tableofcontents
|
@@ -61,9 +61,6 @@
|
||||
</Type>
|
||||
<Type Name="TCollection_AsciiString">
|
||||
<DisplayString>{mylength}: {mystring,s}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[utf-8]">mystring,s8</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="TCollection_HAsciiString">
|
||||
<DisplayString>{myString.mylength}: {myString.mystring,s}</DisplayString>
|
20
dox/dev_guides/dev_guides.md
Normal file
@@ -0,0 +1,20 @@
|
||||
Developer Guides {#dev_guides}
|
||||
================
|
||||
|
||||
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"
|
||||
|
||||
The following documents provide information on OCCT algorithms background:
|
||||
|
||||
* @subpage occt_dev_guides__pbr_math "Physically-based Rendering math (PBR for rasterization)"
|
||||
|
||||
The following guide provides information relevant to upgrading applications developed with previous versions of OCCT, to recent one:
|
||||
|
||||
* @subpage occt_dev_guides__upgrade "Upgrade from previous OCCT versions"
|
@@ -1,26 +1,10 @@
|
||||
Documentation System {#occt_contribution__documentation}
|
||||
Documentation System {#occt_dev_guides__documentation}
|
||||
======================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section OCCT_DM_SECTION_1 Introduction
|
||||
|
||||
OCCT documentation is provided in several forms:
|
||||
|
||||
- This overview provides general description of OCCT structure, functionality, modules, and features.
|
||||
It is available in HTML format (generated by Doxygen) and includes User and Developer Guides.
|
||||
The sources of this documentation are contained in **dox** subdirectory of OCCT sources
|
||||
(plain text format is used, with mixed MarkDown / Doxygen syntax mark-up).
|
||||
|
||||
- User and Developer Guides describing in details OCCT modules and development tools are also available in
|
||||
Adobe Portable Document Format (PDF). To read this format, you need Adobe Acrobat Reader,
|
||||
which is a freeware and can be downloaded from the Adobe site.
|
||||
|
||||
- Full reference documentation covering all OCCT classes generated automatically by Doxygen
|
||||
software is provided in HTML format.
|
||||
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.
|
||||
|
||||
This document provides practical guidelines for generation and editing of OCCT user documentation.
|
||||
|
||||
@section OCCT_DM_SECTION_2 Prerequisites
|
||||
@@ -46,7 +30,7 @@ You can use *custom.bat* file to add necessary paths to the *PATH* variable.
|
||||
Note that in the process of PDF generation MiKTeX may need some packages not installed by default.
|
||||
We recommend setting option "Install missing packages on-the-fly" to "Ask me first" (default) during MiKTeX installation:
|
||||
|
||||
@figure{/contribution/documentation/images/documentation_miktex.png,"",320}
|
||||
@figure{/dev_guides/documentation/images/documentation_miktex.png,"",320}
|
||||
|
||||
On the first run of **pdflatex** it will open a dialog window prompting for installation of missing packages.
|
||||
Follow the instructions to proceed (define proxy settings if needed, select a mirror site to download from, etc.).
|
||||
@@ -118,7 +102,7 @@ The MarkDown files have a <i>*.md</i> extension and are based on rules described
|
||||
|
||||
@subsection OCCT_DM_SECTION_3_2 Directory Structure
|
||||
|
||||
@figure{/contribution/documentation/images/documentation_folders.png,"",160}
|
||||
@figure{/dev_guides/documentation/images/documentation_folders.png,"",160}
|
||||
|
||||
Each document has its own folder if there are any images used in it. These images are stored in *images* subfolder.
|
||||
|
||||
@@ -128,7 +112,7 @@ If you want to use the same image for several documents, you can place it in *do
|
||||
|
||||
|
||||
@verbatim
|
||||
@figure{/contribution/documentation/images/documentation_test_image.svg,"",420}
|
||||
@figure{/dev_guides/documentation/images/documentation_test_image.svg,"",420}
|
||||
@endverbatim
|
||||
|
||||
|
||||
@@ -138,16 +122,16 @@ The documentation is generated in subfolder *doc* :
|
||||
|
||||
@section OCCT_DM_SECTION_4 Adding a New Document
|
||||
|
||||
Place a new document in the folder taking into account its logical position in the documentation hierarchy. For instance, the document *svn.md* about the use of SVN to work with OCCT source code can be placed into <i>/dox/contribution/</i>.
|
||||
Place a new document in the folder taking into account its logical position in the documentation hierarchy. For instance, the document *svn.md* about the use of SVN to work with OCCT source code can be placed into <i>/dox/dev_guides/</i>.
|
||||
|
||||
If there are images in the document, it should be placed in its own folder containing a subfolder for images. For instance:
|
||||
* <i> /dox/contribution/svn/ </i> -- for *svn.md* file;
|
||||
* <i> /dox/contribution/svn/images/ </i> -- for images.
|
||||
* <i> /dox/dev_guides/svn/ </i> -- for *svn.md* file;
|
||||
* <i> /dox/dev_guides/svn/images/ </i> -- for images.
|
||||
|
||||
Add a relative path to *svn.md* in file <i>dox/FILES.txt</i>. For instance
|
||||
|
||||
@verbatim
|
||||
contribution/svn/svn.md
|
||||
dev_guides/svn/svn.md
|
||||
@endverbatim
|
||||
|
||||
**Note** that the order of paths to documents in *FILES.txt* is reproduced in the Table of Contents in the HTML output, thus they need to be placed logically.
|
||||
@@ -170,7 +154,7 @@ http://www.stack.nl/~dimitri/doxygen/manual
|
||||
A document file in *.md format must start with a proper header defining a caption and a unique tag.
|
||||
|
||||
@verbatim
|
||||
Documentation System {#contribution__documentation}
|
||||
Documentation System {#dev_guides__documentation}
|
||||
=====================
|
||||
@endverbatim
|
||||
|
||||
@@ -415,12 +399,12 @@ Captions are included below the image; in PDF output the images with caption are
|
||||
Example:
|
||||
|
||||
@verbatim
|
||||
@figure{/contribution/documentation/images/documentation_test_image.svg,"Test SVG image"}
|
||||
@figure{/dev_guides/documentation/images/documentation_test_image.svg,"Test SVG image"}
|
||||
@endverbatim
|
||||
|
||||
is rendered as:
|
||||
|
||||
@figure{/contribution/documentation/images/documentation_test_image.svg,"Test SVG image",320}
|
||||
@figure{/dev_guides/documentation/images/documentation_test_image.svg,"Test SVG image",320}
|
||||
|
||||
We recommend using **Inkscape** for creation and edition of vector graphics.
|
||||
The graphics created in MS Word Draw and some other vector editors can be copy-pasted to Inkscape and saved as SVG images.
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
@@ -1,4 +1,4 @@
|
||||
Guide to installing and using Git for OCCT development {#occt_contribution__git_guide}
|
||||
Guide to installing and using Git for OCCT development {#occt_dev_guides__git_guide}
|
||||
=================================
|
||||
|
||||
@tableofcontents
|
||||
@@ -17,7 +17,7 @@ Guide to installing and using Git for OCCT development {#occt_contribution__git_
|
||||
For the experienced Git users it can be enough to read sections 1 and 3
|
||||
of this document to start working with the repository.
|
||||
|
||||
Familiarize yourselves with the @ref occt_contribution__contribution_workflow "Contribution Workflow document"
|
||||
Familiarize yourselves with the @ref occt_dev_guides__contribution_workflow "Contribution Workflow document"
|
||||
that describes how Git is used for processing contributions to OCCT.
|
||||
|
||||
This and related documents are available at the Resources page
|
||||
@@ -143,7 +143,7 @@ The official repository contains:
|
||||
- Extension: <code>.svg</code>
|
||||
- External program: <code><path_to_OCCT>\\adm\\svgdiff.bat %%base %%mine %%bname %%yname</code>
|
||||
|
||||
@figure{OCCT_GitGuide_V2_svgdiff.png,"",320}
|
||||
@figure{OCCT_GitGuide_V2_svgdiff.png,"",709}
|
||||
|
||||
@subsection occt_gitguide_2_2 Linux platform
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 167 KiB After Width: | Height: | Size: 167 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -1,4 +1,4 @@
|
||||
Automated Testing System {#occt_contribution__tests}
|
||||
Automated Testing System {#occt_dev_guides__tests}
|
||||
======================================
|
||||
|
||||
@tableofcontents
|
||||
@@ -273,7 +273,7 @@ The names *begin, end, data, parse.rules, grids.list* and *cases.list* are reser
|
||||
|
||||
General layout of test scripts is shown in Figure 1.
|
||||
|
||||
@figure{/contribution/tests/images/tests_image001.png,"Layout of tests folder",400}
|
||||
@figure{/dev_guides/tests/images/tests_image001.png,"Layout of tests folder",400}
|
||||
|
||||
|
||||
@subsection testmanual_2_2 Test Groups
|
||||
@@ -555,31 +555,7 @@ if { [expr $actual_length - $expected_length] > 0.001 } {
|
||||
|
||||
At the end, the test script should output *TEST COMPLETED* string to mark a successful completion of the script. This is often done by the *end* script in the grid.
|
||||
|
||||
During execution of a test, the following Tcl variables are defined on global level:
|
||||
|
||||
| Variable | Value |
|
||||
|-----------|-------|
|
||||
| dirname | Path to the root directory of the current set of test scripts |
|
||||
| groupname | Name of the test group (subfolder of $dirname) |
|
||||
| gridname | Name of the test grid (subfolder of $dirname/$gridname) |
|
||||
| casename | Name of the test |
|
||||
| imagedir | Path to folder where test log and other artifacts are saved |
|
||||
|
||||
The test script can use some data stored in a separate file (e.g. reference results of the test execution).
|
||||
Such file can be put in subfolder *data* of the test grid directory.
|
||||
During execution of the test, location of such data file can be constructed using the variables listed above.
|
||||
|
||||
Example:
|
||||
|
||||
~~~~~
|
||||
checkresult $result $::dirname/$::groupname/$::gridname/data/${::casename}.txt
|
||||
~~~~~
|
||||
|
||||
CAD models and other data files which are not going to change over time should be stored separately from the source repository.
|
||||
Use Tcl procedure *locate_data_file* to get a path to such data files, instead of coding the path explicitly.
|
||||
For the file to be found by that procedure, add directory that contains it into the environment variable *CSF_TestDataPath* (list of paths separated by semicolons on Windows or colons on other platforms).
|
||||
The search is recursive, thus adding only root folder of a directory containing data files is sufficient.
|
||||
If the file is not found, *locate_data_file* will raise exception, and the test will be reported as SKIPPED.
|
||||
When the test script requires a data file, use Tcl procedure *locate_data_file* to get a path to it, instead of putting the path explicitly. This will allow easy move of the data file from OCCT sources repository to the data files repository without the need to update the test script.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -602,11 +578,11 @@ The image format (defined by extension) should be *png*.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
xwd $::imagedir/${::casename}.png
|
||||
xwd $imagedir/${casename}.png
|
||||
vdisplay result; vfit
|
||||
vdump $::imagedir/${::casename}-axo.png
|
||||
vdump $imagedir/${casename}-axo.png
|
||||
vfront; vfit
|
||||
vdump $::imagedir/${::casename}-front.png
|
||||
vdump $imagedir/${casename}-front.png
|
||||
~~~~~
|
||||
|
||||
would produce:
|
||||
@@ -618,6 +594,11 @@ A1-front.png
|
||||
|
||||
Note that OCCT must be built with FreeImage support to be able to produce usable images.
|
||||
|
||||
Other Tcl variables defined during the test execution are:
|
||||
- *groupname*: name of the test group;
|
||||
- *gridname*: name of the test grid;
|
||||
- *dirname*: path to the root directory of the current set of test scripts.
|
||||
|
||||
In order to ensure that the test works as expected in different environments, observe the following additional rules:
|
||||
* Avoid using external commands such as *grep, rm,* etc., as these commands can be absent on another system (e.g. on Windows); use facilities provided by Tcl instead.
|
||||
* Do not put call to *locate_data_file* in catch statement -- this can prevent correct interpretation of the missing data file by the test system.
|
@@ -1,4 +1,4 @@
|
||||
Upgrade from older OCCT versions {#occt__upgrade}
|
||||
Upgrade from older OCCT versions {#occt_dev_guides__upgrade}
|
||||
================================
|
||||
|
||||
@tableofcontents
|
||||
@@ -395,8 +395,8 @@ This modification did not change names, API, and behavior of existing OCCT class
|
||||
However, due to redesign of basic mechanisms (CDL generic classes, Handles and RTTI) using C++ templates, some changes may be necessary in the code when porting to OCCT 7.0, as described below.
|
||||
|
||||
WOK is not necessary anymore for building OCCT from sources, though it still can be used in a traditional way -- auxiliary files required for that are preserved.
|
||||
The recommended method for building OCCT 7.x is CMake, see @ref build_occt_win_cmake.
|
||||
The alternative solution is to use project files generated by OCCT legacy tool **genproj**, see @ref build_occt_genproj, @ref build_occt_win_codeblocks, and @ref build_occt_macos_xcode.
|
||||
The recommended method for building OCCT 7.x is CMake, see @ref occt_dev_guides__building_cmake.
|
||||
The alternative solution is to use project files generated by OCCT legacy tool **genproj**, see @ref occt_dev_guides__building_msvc, @ref occt_dev_guides__building_code_blocks, and @ref occt_dev_guides__building_xcode.
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_auto Automatic upgrade
|
||||
|
||||
@@ -1552,7 +1552,7 @@ Since the new version, the method *BRepAdaptor_CompCurve::IsPeriodic()* will alw
|
||||
@subsection upgrade_730_BuilderSolid Boolean Operations - Solid Builder algorithm
|
||||
|
||||
Previously, the unclassified faces of *BOPAlgo_BuilderSolid* algorithm (i.e. the faces not used for solids creation and located outside of all created solids) were used to form an additional (not closed) solid with INTERNAL orientation.
|
||||
Since the new version, these unclassified faces are no longer added into the resulting solids. Instead, the @ref specification__boolean_ers "warning" with a list of these faces appears.
|
||||
Since the new version, these unclassified faces are no longer added into the resulting solids. Instead, the @ref occt_algorithms_ers "warning" with a list of these faces appears.
|
||||
|
||||
The following public methods of the *BOPAlgo_BuilderSolid* class have been removed as redundant:
|
||||
* *void SetSolid(const TopoDS_Solid& theSolid);*
|
||||
@@ -1889,10 +1889,6 @@ Unexpected const-ness of Aspect_Window::DoResize() method has been removed, so t
|
||||
|
||||
Enumeration BRepOffset_Type is renamed to ChFiDS_TypeOfConcavity.
|
||||
|
||||
@subsection upgrade_750_BRepOffset_MakeOffset change in construction of offset faces
|
||||
|
||||
Now by default offset faces of non-planar faces may be planar faces if their originals can be approximated by planes.
|
||||
|
||||
@subsection upgrade_750_tkv3d TKV3d/TKService toolkits changes
|
||||
|
||||
The following changes could be highlighted while porting:
|
||||
@@ -2149,10 +2145,3 @@ For an example, access to labels and attributes could be protected by mutex if t
|
||||
Draw Harness hotkeys **W** (Wireframe) and **S** (Shaded) have been re-mapped to **Ctrl+W** and **Ctrl+S**.
|
||||
Hotkey **A** has been remapped to **Backspace**.
|
||||
Hotkeys WASD and Arrays are now mapped for walk-through navigation in 3D Viewer.
|
||||
|
||||
@subsection upgrade_750_msgfile_utf8 Utf-8 encoding for message files
|
||||
|
||||
Message files (with extension .msg) are now expected to be in UTF-8 encoding (unless they have UTF-16 BOM in which case UTF-16 is expected).
|
||||
This allows using arbitrary Unicode symbols for localization of messages.
|
||||
|
||||
Existing message files containing 8-bit characters (previously interpreted as characters from Latin-1 code block) should be converted to UTF-8.
|
@@ -1,8 +1,8 @@
|
||||
PBR math (rasterization) {#specification__pbr_math}
|
||||
PBR math (rasterization) {#occt_dev_guides__pbr_math}
|
||||
========================
|
||||
@tableofcontents
|
||||
|
||||
@section pbr_preface Preface
|
||||
# Preface
|
||||
|
||||
**Empirical** illumination models like **Phong reflection model** have been used in real-time graphics for a long time due to their simplicity, convincing look and affordable performance.
|
||||
Before programmable pipeline has been introduced, graphics cards implemented Gouraud shading as part of fixed-function Transformation & Lighting (T&L) hardware blocks.
|
||||
@@ -25,7 +25,7 @@ OCCT 3D Viewer provides both kinds of PBR renderers, and although they share som
|
||||
This article describes the math underneath PBR shading in OCCT 3D Viewer and its GLSL programs.
|
||||
However, this article does not clarifies related high-level APIs nor PBR material creation pipelines, as this is another topic.
|
||||
|
||||
@section pbr_notation Notation
|
||||
# Notation
|
||||
|
||||
| | | |
|
||||
|-:|:-|:-|
|
||||
@@ -46,7 +46,7 @@ However, this article does not clarifies related high-level APIs nor PBR materia
|
||||
|
||||
\f$\cos\theta_{vh}=(v \cdot h)\f$
|
||||
|
||||
@section pbr_illumination_model Illumination model
|
||||
# Illumination model
|
||||
|
||||
The main goal of illumination model is to calculate outgoing light radiance \f$L_o\f$ along the certain direction.
|
||||
The starting point of calculation might be the view direction \f$v\f$ aimed from point on surface (or in more general case just in space) to viewer position.
|
||||
@@ -60,7 +60,7 @@ More general model will require to consider directions all around a whole sphere
|
||||
\f$\cos\theta_l\f$ factor appearing is caused by affection of surface area and light direction mutual orientation to the amount of radiance coming to this area.
|
||||
This is mainly due to geometric laws. The rest part of integral is the key of the whole illumination model.
|
||||
BRDF defines it's complexity and optical properties of material.
|
||||
It has to model all light and material interactions and also has to satisfy some following criteria in order to be physical correct [@ref Duvenhage13]:
|
||||
It has to model all light and material interactions and also has to satisfy some following criteria in order to be physical correct:
|
||||
* Positivity: \f$f(v,l) \geq 0\f$
|
||||
* Helmholtz reciprocity: \f$f(v,l) = f(l, v)\f$ (follows from 2<sup>nd</sup> Law of Thermodynamics)
|
||||
* Energy conservation: \f$\displaystyle \forall v \, \int\limits_H f(v,l) \cos\theta_l \, \mathrm{d}l = 1\f$ (in order not to reflect more light than came)
|
||||
@@ -74,7 +74,7 @@ So that illumination equation might be rewritten as:
|
||||
|
||||
\f[L_o=\int\limits_H (f_d(v,l)+f_s(v, l)) L_i(l) \cos\theta_l\, \mathrm{d}l\f]
|
||||
|
||||
PBR theory is based on **Cook-Torrance specular BRDF** [@ref Cook81]. It imagines surface as set of perfectly reflected micro faces distributed on area in different ways which is pretty good model approximation of real world materials.
|
||||
PBR theory is based on **Cook-Torrance specular BRDF**. It imagines surface as set of perfectly reflected micro faces distributed on area in different ways which is pretty good model approximation of real world materials.
|
||||
If this area is small enough not to be able to recognize separate micro surfaces the results becomes a sort of averaging or mixing of every micro plane illumination contribution.
|
||||
In that level it allows to work with micro faces in statistical manner manipulating only probabilities distributions of micro surfaces parameters such as normals, height, pattern, orientation etc.
|
||||
In computer graphics pixels are units of images and it usually covers a relatively large areas of surfaces so that micro planes can be considered to be unrecognizable.
|
||||
@@ -85,7 +85,7 @@ Going back to the BRDF the Cook-Torrance approach has the following expression:
|
||||
Three parts presented in nominator have its own meaning but can have different implementation with various levels of complexity and physical accuracy.
|
||||
In that paper only one certain implementation is used. The \f$D\f$ component is responsible for **micro faces normals distribution**.
|
||||
It is the main instrument that controls reflection's shape and strength according to **roughness** \f$r\f$ parameter.
|
||||
The implementation with good visual results is **Trowbridge-Reitz GGX** approach used in Disney's RenderMan and Unreal Engine [@ref Karis13]:
|
||||
The implementation with good visual results is **Trowbridge-Reitz GGX** approach used in Disney's RenderMan and Unreal Engine:
|
||||
|
||||
\f[D=\frac{\alpha^2}{\pi(\cos^2\theta_h(\alpha^2-1) + 1)^2}\f]
|
||||
|
||||
@@ -93,8 +93,8 @@ Where \f$\alpha = r^2\f$. This square in needed only for smoother roughness para
|
||||
Without it the visual appearance of surface becomes rough too quickly during the parameter's increasing.
|
||||
|
||||
The second \f$G\f$ component is called **geometric shadowing** or attenuation factor.
|
||||
The point is that micro surfaces form kind of terrain and can cast shadows over each other especially on extreme viewing angles [@ref Heitz14].
|
||||
**Smith-Schlick model** [@ref Heitz14], [@ref Schlick94] has been chosen as implementation:
|
||||
The point is that micro surfaces form kind of terrain and can cast shadows over each other especially on extreme viewing angles.
|
||||
**Schlick's model** has been chosen as implementation:
|
||||
|
||||
\f[\displaystyle G=\frac{\cos\theta_l \cos\theta_v}{(\cos\theta_l(1-k)+k)(\cos\theta_v(1-k)+k)}\f]
|
||||
|
||||
@@ -105,7 +105,7 @@ One of this modification will be described later in following chapters.
|
||||
The last component \f$F\f$ shows **how much light is reflected from surface** and is called **Fresnel's factor**.
|
||||
The rest amount of radiance might be absorbed or refracted by material.
|
||||
The most accurate expression of it is pretty complicate for calculation so that there is a variety of approximations.
|
||||
The good one with less computation efforts is **Schlick's implementation** [@ref Schlick94]:
|
||||
The good one with less computation efforts is **Schlick's implementation**:
|
||||
|
||||
\f[F=F_0+(1-F_0)(1-\cos\theta_{vh})^5\f]
|
||||
|
||||
@@ -115,7 +115,7 @@ In order to do that it is needed to be noticed that Schlick's approximation is a
|
||||
**Index of Refraction** \f$IOR\f$ shows the proportion between light speed in vacuum (or even in air) and in material.
|
||||
The reference value of \f$IOR\f$ for plastic is **1.5**, and this value can be considered as default for all unknown dielectrics.
|
||||
In practice this parameter controls reflectance ability of material.
|
||||
Also it should be remembered that this approximation produces poor results with large \f$IOR\f$ values so that it is recommended to be kept in range of \f$[1, 3]\f$ in order to get plausible Fresnel's factor [@ref Lazanyi05], [@ref Lagarde13].
|
||||
Also it should be remembered that this approximation produces poor results with large \f$IOR\f$ values so that it is recommended to be kept in range of \f$[1, 3]\f$ in order to get plausible Fresnel's factor.
|
||||
This formula might be further propagated onto metals by using \f$F_0\f$ measured specifically for certain metal.
|
||||
It can be considered as some kind of a 'color' of metal and can be stored as albedo parameter \f$c\f$.
|
||||
And the final step of defining Fresnel's factor formula is mixing all this \f$F_0\f$ using metallic parameter \f$m\f$ (**metalness**):
|
||||
@@ -168,7 +168,7 @@ So that all parts described above can be combined into united diffuse BRDF:
|
||||
In this chapter one possible implementation of illumination model reflecting main PBR principles has been defined.
|
||||
The next step is using of it in practice.
|
||||
|
||||
@section pbr_practical_application Practical application
|
||||
# Practical application
|
||||
|
||||
It's time to apply deduced illumination model in practice.
|
||||
And the first step of it is separation of **direction based light sources** from illumination integral.
|
||||
@@ -184,7 +184,7 @@ Having finite discrete amount of it in scene and considering only single directi
|
||||
Where \f$M\f$ is a number of sources, \f$l_j\f$ is a direction and \f$L_i^{direct}\f$ is an intensity related to this direction.
|
||||
\f$direct\f$ label means that illumination has been computed directly from sources.
|
||||
The BRDF can be used directly without any calculation problems.
|
||||
The only exception might be \f$k\f$ in \f$G\f$ factor - it is recommended to use \f$ k = (r+1)^2 / 8 \f$ in order to get more pleasant results [@ref Karis13] (that is modification mentioned in previous chapter).
|
||||
The only exception might be \f$k\f$ in \f$G\f$ factor - it is recommended to be equal \f$\frac{(r+1)^2}{8}\f$ in order to get more pleasant results (that is modification mentioned in previous chapter).
|
||||
And actually it is enough to finally see something.
|
||||
There will be correct visualization with assumption of complete dark environment and absence of other points influence.
|
||||
It is called **local illumination**. Based on this name there is also a global or **indirect illumination** and that is the rest of integral:
|
||||
@@ -204,7 +204,7 @@ It is enough to get some results in terms of local illumination but without \f$L
|
||||
\f$L_{indirect}\f$ is not trivial thing for calculation and that is stumbling block for real time rendering applications.
|
||||
But it can be relatively easy implemented in case of environment illumination via some precomputational work about which will be told in details in following chapters.
|
||||
|
||||
@section pbr_image_based_lighting Image based lighting
|
||||
# Image based lighting
|
||||
|
||||
The next goal after \f$L_{direct}\f$ calculation is to find \f$L_{indirect}\f$.
|
||||
And it would be easier if \f$L_i^{indirect}(l)\f$ was known for every \f$l\f$.
|
||||
@@ -233,7 +233,7 @@ Lets write down this separately:
|
||||
Next transformations of these expressions require understanding of numerical way to find hemisphere integral and also its performance optimization techniques.
|
||||
And that the topic of the next chapter.
|
||||
|
||||
@section pbr_monte_carlo_integration Monte-Carlo numeric integration
|
||||
# Monte-Carlo numeric integration
|
||||
|
||||
**Monte-Carlo** is one of numeric methods to **find integral**.
|
||||
It is based on idea of mathematical expectation calculation.
|
||||
@@ -343,7 +343,7 @@ Moreover special \f$p(l)\f$ can be chosen and special pseudo-random sequences ca
|
||||
That is why this method is widely used in computer graphics and demonstrates good results.
|
||||
Also another one advantage is worth to be mentioned - possibility to iteratively accumulate computations and present intermediate results during rendering which is used in some ray tracing applications.
|
||||
|
||||
@section pbr_split_sum Split sum
|
||||
# Split sum
|
||||
|
||||
Lets go back to the image based lighting and the figure of specular component.
|
||||
As was defined before that is hemisphere integral with following expression:
|
||||
@@ -359,7 +359,7 @@ Optimization strategies use different samples distributions for different view d
|
||||
Anyway even with all optimization techniques this algorithm continues to require too much calculations.
|
||||
Good visual results require noticeable number of samples and using this approach for every point in real time rendering becomes unrealistic.
|
||||
The way to avoid these enormous calculations is doing them beforehand somehow.
|
||||
The first trick on the way to this is split the sum separating environment light component [@ref Karis13]:
|
||||
The first trick on the way to this is split the sum separating environment light component:
|
||||
|
||||
\f[L_{indirect}^s \approx \frac{1}{N} \sum_{i=1}^N \frac{f_s(v, l_i) L_i^{indirect}(l_i) \cos\theta_{l_i}}{p(v, l_i)} \approx \left( \frac{1}{N} \sum_{i=1}^N L_i^{indirect}(l_i) \right) \left( \frac{1}{N} \sum_{i=1}^N \frac{f_s(v, l_i) \cos\theta_{l_i}}{p(v, l_i)} \right)\f]
|
||||
|
||||
@@ -402,7 +402,7 @@ Current result for \f$L_{indirect}^s\f$ is computing it using 2D image for BRDF
|
||||
There were a lot of words about Monte-Carlo optimizations techniques and about PDF choice which is important not only in terms of numeric integration but in terms of visual results correctness.
|
||||
It's time to talk about that.
|
||||
|
||||
@section pbr_importance_sampling Importance sampling
|
||||
# Importance sampling
|
||||
|
||||
Current goal is to speed up Monte-Carlo integration of Cook-Torrance like integrals with following expression:
|
||||
|
||||
@@ -424,7 +424,7 @@ Anyway that is good starting point and lets generate \f$h\f$ vectors first.
|
||||
|
||||
Frankly speaking \f$D(h)\f$ is called normal distribution but cannot be directly used as hemisphere distribution.
|
||||
Originally it is statistical factor used to define total area of micro faces \f$\mathrm{d}A_h\f$
|
||||
whose normals lie withing given infinitesimal solid angle \f$\mathrm{d}h\f$ centered on \f$h\f$ direction using the original small enough area of macro surface \f$\mathrm{d}A\f$ [@ref Walter07]:
|
||||
whose normals lie withing given infinitesimal solid angle \f$\mathrm{d}h\f$ centered on \f$h\f$ direction using the original small enough area of macro surface \f$\mathrm{d}A\f$:
|
||||
|
||||
\f[dA_h = D(h)\,\mathrm{d}h\, \mathrm{d}A\f]
|
||||
|
||||
@@ -460,7 +460,7 @@ Lets strict to samples generation procedure and find partial probability densiti
|
||||
|
||||
\f$p(\phi_h)\f$ is unnecessary to be calculated analytically.
|
||||
The fact of independency from \f$\phi\f$ is enough to figure out that this coordinate is uniformly distributed.
|
||||
Anyway the \f$F(\theta_h)\f$ is next step [@ref Cao15]:
|
||||
Anyway the \f$F(\theta_h)\f$ is next step:
|
||||
|
||||
\f[F(\theta_h) = \int\limits_0^{\theta_h} \frac{2 \alpha^2 \cos\theta'_h\sin\theta'_h}{(\cos^2\theta'_h(\alpha^2-1) + 1)^2}\, \mathrm{d}\theta'_h = \int\limits_{\theta_h}^0 \frac{2 \alpha^2}{(\cos^2\theta'_h(\alpha^2-1) + 1)^2}\, \mathrm{d}(\cos^2\theta'_h) = \frac{\alpha^2}{\alpha^2-1}\int\limits_0^{\theta_h} \mathrm{d}\frac{1}{\cos^2\theta'_h(\alpha^2-1)+1} =\f]
|
||||
|
||||
@@ -494,7 +494,7 @@ Due to previous step \f$\theta_{vh}\f$ is used instead of \f$\theta_h\f$.
|
||||
In this coordinate system reflecting of \f$v\f$ relative to \f$h\f$ is just doubling \f$\theta_{vh}\f$ and Jacobian of it is equal to \f$\frac{1}{2}\f$.
|
||||
In series of transform the Jacobians are multiplied so that currently \f$|J_T| = \frac{1}{2}\sin\theta_{vh}\f$.
|
||||
And the final step is inverse transform to Cartesian coordinate system with \f$|J_T| = (\sin\theta_{vl})^{-1} = (\sin2\theta_{vh})^{-1}\f$.
|
||||
Combining this all together the following expression is obtained for reflection transform Jacobian [@ref Schutte18]:
|
||||
Combining this all together the following expression is obtained for reflection transform Jacobian:
|
||||
|
||||
\f[|J_T| = \frac{\sin\theta_{vh}}{2\sin2\theta_{vh}} = \frac{\sin\theta_{vh}}{4\sin\theta_{vh}\cos\theta_{vh}} = \frac{1}{4\cos\theta_{vh}}\f]
|
||||
|
||||
@@ -517,7 +517,7 @@ Due to this transformation final form of probability density used in sum is quit
|
||||
For isotropic Cook-Torrance BRDF the \f$\cos\theta_v\f$ and roughness \f$r\f$ are enough to start generation so that all integrals of that kind can be precalculated in 2D look-up tables variating these two parameters.
|
||||
The same samples generation procedure must be used in specular map baking described in next chapter.
|
||||
|
||||
@section pbr_specular_map Specular map
|
||||
# Specular map
|
||||
|
||||
The situation with BRDF part of \f$L_{indirect}^s\f$ is clear now and \f$L_i^{indirect}(l)\f$ sum is left to be discussed.
|
||||
That was called **specular map** and has following form:
|
||||
@@ -532,7 +532,7 @@ A couple of tricks helps to reduce dimensions.
|
||||
First of all the \f$\cos\theta_v\f$ and \f$\phi\f$ can be just excluded.
|
||||
In that way \f$v\f$ is considered to be equal to \f$n\f$.
|
||||
Of course this approach produces an error and affects the final result.
|
||||
It can be fixed more or less by \f$\cos\theta_{l_i}\f$ weighting [@ref Karis13]:
|
||||
It can be fixed more or less by \f$\cos\theta_{l_i}\f$ weighting:
|
||||
|
||||
\f[\frac{1}{N} \sum_{i=1}^N L_i^{indirect}(l_i) \cos\theta_{l_i}\f]
|
||||
|
||||
@@ -589,7 +589,7 @@ It wold be better to get from such direction already averaged over bigger area e
|
||||
It can be achieved using mip levels of origin \f$L_i^{indirect}\f$ whose pixels of one level is exact 4 averaged pixels from previous one.
|
||||
Also mip levels generation is build in most common graphic API so there are no problems with it.
|
||||
But first of all the area covered by one sample is needed to be found.
|
||||
And that can be done as [@ref Colbert07]:
|
||||
And that can be done as:
|
||||
|
||||
\f[\Omega_s = \frac{1}{N\,p(l)} = \frac{4\cos\theta_{vh}}{ND\cos\theta_h}\f]
|
||||
|
||||
@@ -619,7 +619,7 @@ The first one can be got even without any environment.
|
||||
It was achieved using some rough approximations and assumptions but despite of that the visual result are still plausible and can be compared even with ray traced images.
|
||||
In order to complete whole image based lighting the \f$L_{indirect}^d\f$ component is left to be discussed.
|
||||
|
||||
@section pbr_spherical_harmonics Spherical harmonics
|
||||
# Spherical harmonics
|
||||
|
||||
Lets go back to diffuse indirect illumination component represented by following formula:
|
||||
|
||||
@@ -627,7 +627,7 @@ Lets go back to diffuse indirect illumination component represented by following
|
||||
|
||||
Of course, Monte-Carlo algorithm can be applied directly and hemisphere integral can be precalculated for every normal direction
|
||||
but dependence from \f$v\f$ in Fresnel's factor does not allow to do it efficiently (every \f$v\f$ direction is needed to be considered again).
|
||||
In order to resolve it modified version of Schlick's approximation has been created [[?](TODO)]:
|
||||
In order to resolve it modified version of Schlick's approximation has been created:
|
||||
|
||||
\f[F \approx F_{ss}=F_0+(\max(1-r, F_0))(1-\cos\theta_v)^5\f]
|
||||
|
||||
@@ -658,7 +658,7 @@ Dot product on a sphere is defined as integral of functions multiplication. In o
|
||||
|
||||
\f[\int\limits_S y_i^j(l)\, y_{i'}^{j'}(l)\, \mathrm{d}l = \begin{cases} 1 & \quad i,j = i',j' \\ 0 & \quad \mathrm{otherwise}\end{cases}\f]
|
||||
|
||||
Function basis with such traits is known and is described by following formulas [@ref Guy18]:
|
||||
Function basis with such traits is known and is described by following formulas:
|
||||
|
||||
\f[y_i^{j > 0}(\theta, \phi) = \sqrt{2}K_i^j\cos(j\phi)P_i^j(\cos\theta)\f]
|
||||
\f[y_i^{j<0}(\theta, \phi) = \sqrt{2}K_i^j\sin(j\phi)P_i^{|j|}(\cos\theta)\f]
|
||||
@@ -691,7 +691,7 @@ Where \f$\overline{\cos}\f$ is cosine clamped to zero which can be expressed as:
|
||||
Resulted expression can be considered as convolution in terms of spherical functions where \f$L_i^{indirect}(l)\f$ is target and \f$\overline{\cos}\theta_l\f$ is core.
|
||||
This integral may seem independent but in fact hemisphere is oriented related to \f$n\f$ therefore \f$\overline{\cos}\theta_l\f$ depends on it too and became a kind of 'oriented' version of cosine.
|
||||
That is pretty tricky and explanation about meaning of convolution on sphere is out of scope of this paper.
|
||||
Fact that this is convolution analogue related to \f$n\f$ is enough for now [@ref Aguilar17], [@ref Ramamoorthi01].
|
||||
Fact that this is convolution analogue related to \f$n\f$ is enough for now.
|
||||
The goal of looking at integral from this angle is using of convolution's trait allowing to compute decomposition using just only coefficients of function and core.
|
||||
\f$\overline{\cos}\theta_l\f$ is independent from \f$\phi_l\f$ and in case of such radial symmetric cores the resulting coefficients boil down to following formula:
|
||||
|
||||
@@ -720,7 +720,7 @@ There is an analytical solution for this expressions:
|
||||
Starting from about the third \f$c_i\f$ the coefficients become less and less valuable so that only couple of them is enough in order to approximate \f$\overline{\cos}\theta\f$ with appropriate accuracy.
|
||||
The same principle is true for convolution too because its coefficients are multiplied by \f$c_i\f$.
|
||||
So there is no need to use more than even three bands (\f$i = 0, 1, 2\f$) of basis functions.
|
||||
Lets write down them all in Cartesian coordinate [@ref Ramamoorthi01]:
|
||||
Lets write down them all in Cartesian coordinate system:
|
||||
|
||||
\f[y_0^0 = \frac{1}{2}\sqrt{\frac{1}{\pi}} = Y_0^0\f]
|
||||
|
||||
@@ -749,7 +749,7 @@ Moreover, texture is not needed at all in that case and only 9 colors representi
|
||||
The Monte-Carlo algorithm can be applied with just uniform samples distribution without importance sampling at all.
|
||||
\f$Y_i^j\f$ are used twice: in \f$L_i^j\f$ calculations and in sum after that.
|
||||
So there is sense to store only squares of it.
|
||||
All tables with constants presented below [@ref Ramamoorthi01]:
|
||||
All tables with constants presented below:
|
||||
|
||||
| |
|
||||
|-|
|
||||
@@ -768,114 +768,10 @@ All tables with constants presented below [@ref Ramamoorthi01]:
|
||||
Summarizing all mathematics above spherical harmonics decomposition boils down irradiance map to only 9 values which is needed to be precalculated as integrals.
|
||||
As practice shows this is very good approximation of diffuse indirect illumination component.
|
||||
|
||||
@section pbr_transparency Transparent materials
|
||||
# Transparent materials
|
||||
|
||||
TODO
|
||||
|
||||
@section pbr_low_discrepancy Low discrepancy sequence
|
||||
# Low discrepancy sequence
|
||||
|
||||
TODO
|
||||
|
||||
@section pbr_references References
|
||||
|
||||
<table cellpadding="4">
|
||||
<tr><td valign="top">
|
||||
@anchor Duvenhage13 **[Duvenhage13]**
|
||||
</td><td>
|
||||
Bernardt Duvenhage, Kadi Bouatouch, D.G. Kourie,
|
||||
"Numerical Verification of Bidirectional Reflectance Distribution Functions for Physical Plausibility",
|
||||
*Proceedings of the South African Institute for Computer Scientists and Information Technologists Conference*,
|
||||
October 2013.
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Cook81 **[Cook81]**
|
||||
</td><td>
|
||||
Robert Cook, Kenneth Torrance,
|
||||
"A Refectance Model for Computer Graphics",
|
||||
*SIGGRAPH '81: Proceedings of the 8th annual conference on Computer graphics and interactive techniques*,
|
||||
August 1981, pp. 307-316.
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Karis13 **[Karis13]**
|
||||
</td><td>
|
||||
Brian Karis, "Real Shading in Unreal Engine 4", *SIGGRAPH 2013 Presentation Notes*.
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Heitz14 **[Heitz14]**
|
||||
</td><td>
|
||||
Eric Heitz, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs",
|
||||
*Journal of Computer Graphics Techniques*, Vol. 3, No. 2, 2014.
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Schlick94 **[Schlick94]**
|
||||
</td><td>
|
||||
Christophe Schlick, "An inexpensive brdf model for physically-based rendering",
|
||||
*Computer Graphics Forum 13*, 1994, pp. 233-246.
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Lazanyi05 **[Lazanyi05]**
|
||||
</td><td>
|
||||
Istvan Lazanyi, Lazslo Szirmay-Kalos, "Fresnel term approximations for Metals", January 2005.
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Lagarde13 **[Lagarde13]**
|
||||
</td><td>
|
||||
Sebastien Lagarde, "Memo on Fresnel equations",
|
||||
*Blog post*: [https://seblagarde.wordpress.com/2013/04/29/memo-on-fresnel-equations/](https://seblagarde.wordpress.com/2013/04/29/memo-on-fresnel-equations/).
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Walter07 **[Walter07]**
|
||||
</td><td>
|
||||
Bruce Walter, Stephen Marschner, Hongsong Li, Kenneth Torrance,
|
||||
"Microfacet Models for Refraction through Rough Surfaces", *Proceedings of Eurographics Symposium on Rendering*, 2007.
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Cao15 **[Cao15]**
|
||||
</td><td>
|
||||
Jiayin Cao, "Sampling microfacet BRDF", November 1, 2015,
|
||||
*Blog post*: [https://agraphicsguy.wordpress.com/2015/11/01/sampling-microfacet-brdf/](https://agraphicsguy.wordpress.com/2015/11/01/sampling-microfacet-brdf/).
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Schutte18 **[Schutte18]**
|
||||
</td><td>
|
||||
Joe Schutte, "Sampling techniques for GGX with Smith Masking-Shadowing: Part 1", March 7, 2018,
|
||||
*Blog post*: [https://schuttejoe.github.io/post/ggximportancesamplingpart1/](https://schuttejoe.github.io/post/ggximportancesamplingpart1/).
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Colbert07 **[Colbert07]**
|
||||
</td><td>
|
||||
Mark Colbert, Jaroslav Krivanek, "GPU-Based Importance Sampling", *NVIDIA GPU Gems 3*, Chapter 20, 2007.
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Guy18 **[Guy18]**
|
||||
</td><td>
|
||||
Romain Guy, Mathias Agopian, "Physically Based Rendering in Filament", *Part of Google's Filament project documentation*:
|
||||
[https://google.github.io/filament/](https://google.github.io/filament/Filament.md.html)
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Aguilar17 **[Aguilar17]**
|
||||
</td><td>
|
||||
Orlando Aguilar, "Spherical Harmonics", *Blog post*:
|
||||
[http://orlandoaguilar.github.io/sh/spherical/harmonics/irradiance/map/2017/02/12/SphericalHarmonics.html](http://orlandoaguilar.github.io/sh/spherical/harmonics/irradiance/map/2017/02/12/SphericalHarmonics.html)
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">
|
||||
@anchor Ramamoorthi01 **[Ramamoorthi01]**
|
||||
</td><td>
|
||||
Ravi Ramamoorthi, Pat Hanrahan, "An Efficient Representation for Irradiance Environment Maps",
|
||||
*SIGGRAPH '01: Proceedings of the 28th annual conference on Computer graphics and interactive techniques*, August 2001, pp. 497-500
|
||||
</td></tr>
|
||||
|
||||
</table>
|
@@ -1,662 +0,0 @@
|
||||
Introduction {#mainpage}
|
||||
========
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@htmlonly<center>@endhtmlonly
|
||||
@figure{/resources/occt_logo.png}
|
||||
@htmlonly</center>@endhtmlonly
|
||||
|
||||
Welcome to Open CASCADE Technology (OCCT), a software development platform
|
||||
providing services for 3D surface and solid modeling, CAD data exchange, and
|
||||
visualization. Most of OCCT functionality is available in the form of C++
|
||||
libraries. OCCT can be best applied in development of software dealing with 3D
|
||||
modeling (CAD), manufacturing / measuring (CAM) or numerical simulation (CAE).
|
||||
|
||||
@htmlonly<center>@endhtmlonly
|
||||
https://www.opencascade.com
|
||||
@figure{/resources/occ_logo.png}
|
||||
@htmlonly</center>@endhtmlonly
|
||||
|
||||
@section intro_overview Overview
|
||||
|
||||
Open CASCADE Technology (OCCT) is an object-oriented C++ class library designed for rapid production of sophisticated domain-specific CAD/CAM/CAE applications.
|
||||
|
||||
A typical application developed using OCCT deals with two or three-dimensional (2D or 3D) geometric modeling
|
||||
in general-purpose or specialized Computer Aided Design (CAD) systems, manufacturing
|
||||
or analysis applications, simulation applications, or even illustration tools.
|
||||
|
||||
OCCT library is designed to be truly modular and extensible, providing C++ classes for:
|
||||
* Basic data structures (geometric modeling, visualization, interactive selection and application specific services);
|
||||
* Modeling algorithms;
|
||||
* Working with mesh (faceted) data;
|
||||
* Data interoperability with neutral formats (IGES, STEP);
|
||||
|
||||
The C++ classes and other types are grouped into packages. Packages are organized into toolkits (libraries), to which you can link your application. Finally, toolkits are grouped into seven modules.
|
||||
|
||||
This modular structure is illustrated in the diagram below.
|
||||
|
||||
@figure{/introduction/images/technical_overview_schema.png}
|
||||
|
||||
* @ref intro_overview_fclasses "Foundation Classes" module underlies all other OCCT classes;
|
||||
* @ref intro_overview_moddata "Modeling Data" module supplies data structures to represent 2D and 3D geometric primitives and their compositions into CAD models;
|
||||
* @ref intro_overview_modalgo "Modeling Algorithms" module contains a vast range of geometrical and topological algorithms;
|
||||
* @ref intro_overview_mesh "Mesh" toolkit from "Modeling Algorithms" module implements tessellated representations of objects;
|
||||
* @ref intro_overview_visu "Visualization" module provides complex mechanisms for graphical data representation;
|
||||
* @ref intro_overview_de "Data Exchange" module inter-operates with popular data formats and relies on @ref intro_overview_heal "Shape Healing" to improve compatibility between CAD software of different vendors;
|
||||
* @ref intro_overview_ocaf "Application Framework" module offers ready-to-use solutions for handling application-specific data (user attributes) and commonly used functionality (save/restore, undo/redo, copy/paste, tracking CAD modifications, etc).
|
||||
|
||||
In addition, @ref intro_overview_draw "Open CASCADE Test Harness", also called Draw, provides an entry point to the library and can be used as a testing tool for its modules.
|
||||
|
||||
@subsection intro_overview_fclasses Foundation Classes
|
||||
|
||||
**Foundation Classes** module contains data structures and services used by higher-level Open CASCADE Technology classes:
|
||||
|
||||
* Primitive types, such as Boolean, Character, Integer or Real;
|
||||
* String classes that handle Unicode strings;
|
||||
* Collection classes that handle statically or dynamically sized aggregates of data, such as arrays, lists, queues, sets and hash tables (data maps).
|
||||
* Classes providing commonly used numerical algorithms and basic linear algebra calculations (addition, multiplication, transposition of vectors and matrices, solving linear systems etc).
|
||||
* Fundamental types like color, date and time information;
|
||||
* Primitive geometry types providing implementation of basic geometric and algebraic entities that define and manipulate elementary data structures.
|
||||
* Exception classes that describe situations, when the normal execution of program is abandoned;
|
||||
|
||||
This module also provides a variety of general-purpose services, such as:
|
||||
* Safe handling of dynamically created objects, ensuring automatic deletion of unreferenced objects (smart pointers);
|
||||
* Standard and specialized memory allocators;
|
||||
* Extended run-time type information (RTTI) mechanism maintaining a full type hierarchy and providing means to iterate over it;
|
||||
* Encapsulation of C++ streams;
|
||||
* Basic interpreter of expressions facilitating the creation of customized scripting tools, generic definition of expressions, etc.;
|
||||
* Tools for dealing with configuration resource files and customizable message files facilitating multi-language support in applications;
|
||||
* Progress indication and user break interfaces, giving a possibility even for low-level algorithms to communicate with the user in a universal and convenient way;
|
||||
* and many others...
|
||||
|
||||
See the details in @ref occt_user_guides__foundation_classes "Foundation Classes User's Guide"
|
||||
|
||||
@subsection intro_overview_moddata Modeling Data
|
||||
|
||||
**Modeling Data** supplies data structures to implement boundary representation (BRep) of objects in 3D.
|
||||
In BRep the shape is represented as an aggregation of geometry within topology.
|
||||
The geometry is understood as a mathematical description of a shape, e.g. as curves and surfaces (simple or canonical, Bezier, NURBS, etc).
|
||||
The topology is a data structure binding geometrical objects together.
|
||||
|
||||
Geometry types and utilities provide geometric data structures and services for:
|
||||
* Description of points, vectors, curves and surfaces:
|
||||
* their positioning in 3D space using axis or coordinate systems, and
|
||||
* their geometric transformation, by applying translations, rotations, symmetries, scaling transformations and combinations thereof.
|
||||
* Creation of parametric curves and surfaces by interpolation and approximation;
|
||||
* Algorithms of direct construction;
|
||||
* Conversion of curves and surfaces to NURBS form;
|
||||
* Computation of point coordinates on 2D and 3D curves;
|
||||
* Calculation of extrema between geometric objects.
|
||||
|
||||
Topology defines relationships between simple geometric entities.
|
||||
A shape, which is a basic topological entity, can be divided into components (sub-shapes):
|
||||
* Vertex -- a zero-dimensional shape corresponding to a point;
|
||||
* Edge -- a shape corresponding to a curve and bounded by a vertex at each extremity;
|
||||
* Wire -- a sequence of edges connected by their vertices;
|
||||
* Face -- a part of a plane (in 2D) or a surface (in 3D) bounded by wires;
|
||||
* Shell -- a collection of faces connected by edges of their wire boundaries;
|
||||
* Solid -- a finite closed part of 3D space bounded by shells;
|
||||
* Composite solid -- a collection of solids connected by faces of their shell boundaries;
|
||||
* Compound -- a collection of shapes of arbitrary type.
|
||||
|
||||
Complex shapes can be defined as assemblies (compounds) of simpler entities.
|
||||
|
||||
See the details in @ref occt_user_guides__modeling_data "Modeling Data User's Guide"
|
||||
|
||||
3D geometric models can be stored in OCCT native BREP format.
|
||||
See @ref specification__brep_format "BREP Format Description White Paper" for details on the format.
|
||||
|
||||
@subsection intro_overview_modalgo Modeling Algorithms
|
||||
|
||||
**Modeling Algorithms** module groups a wide range of topological and geometric algorithms used in geometric modeling.
|
||||
Basically, there are two groups of algorithms in Open CASCADE Technology:
|
||||
* High-level modeling routines used in the real design;
|
||||
* Low-level mathematical support functions used as a groundwork for the modeling API.
|
||||
|
||||
Low-level *geometric tools* provide the algorithms, which:
|
||||
* Calculate the intersection of two curves, surfaces, or a curve and a surface;
|
||||
* Project points onto 2D and 3D curves, points onto surfaces and 3D curves onto surfaces;
|
||||
* Construct lines and circles from constraints;
|
||||
* Construct free-form curves and surfaces from constraints (interpolation, approximation, skinning, gap filling, etc).
|
||||
|
||||
Low-level *topological tools* provide the algorithms, which:
|
||||
* Tessellate shapes;
|
||||
* Check correct definition of shapes;
|
||||
* Determine the local and global properties of shapes (derivatives, mass-inertia properties, etc);
|
||||
* Perform affine transformations;
|
||||
* Find planes in which edges are located;
|
||||
* Convert shapes to NURBS geometry;
|
||||
* Sew connected topologies (shells and wires) from separate topological elements (faces and edges).
|
||||
|
||||
Top-level API provides the following functionality:
|
||||
* Construction of Primitives:
|
||||
* Boxes;
|
||||
* Prisms;
|
||||
* Cylinders;
|
||||
* Cones;
|
||||
* Spheres;
|
||||
* Toruses.
|
||||
* Kinematic Modeling:
|
||||
* Prisms -- linear sweeps;
|
||||
* Revolutions -- rotational sweeps;
|
||||
* Pipes -- general-form sweeps;
|
||||
* Lofting.
|
||||
|
||||
@figure{/introduction/images/0001.png "Shapes containing pipes with variable radius produced by sweeping"}
|
||||
|
||||
* Boolean Operations, which allow creating new shapes from the combinations of source shapes. For two shapes *S1* and *S2*:
|
||||
* *Common* contains all points that are in *S1* and *S2*;
|
||||
* *Fuse* contains all points that are in *S1* or *S2*;
|
||||
* *Cut* contains all points in that are in *S1* and not in *S2*.
|
||||
|
||||
See @ref specification__boolean_operations "Boolean Operations" User's Guide for detailed documentation.
|
||||
|
||||
* Algorithms for local modifications such as:
|
||||
* Hollowing;
|
||||
* Shelling;
|
||||
* Creation of tapered shapes using draft angles;
|
||||
* Algorithms to make fillets and chamfers on shape edges, including those with variable radius (chord).
|
||||
|
||||
* Algorithms for creation of mechanical features, i.e. depressions, protrusions, ribs and grooves or slots along planar or revolution surfaces.
|
||||
|
||||
@figure{/introduction/images/0004.png}
|
||||
|
||||
See the details in @ref occt_user_guides__modeling_algos "Modeling Algorithms User's Guide".
|
||||
|
||||
@subsection intro_overview_mesh Mesh
|
||||
|
||||
**Mesh** toolkit provides the functionality to work with tessellated representations of objects in form of triangular facets. This toolkit contains:
|
||||
- data structures to store surface mesh data associated to shapes and basic algorithms to handle them;
|
||||
- data structures and algorithms to build triangular surface mesh from *BRep* objects (shapes);
|
||||
- tools for displaying meshes with associated pre- and post-processor data (scalars or vectors).
|
||||
|
||||
Open CASCADE SAS also offers Advanced Mesh Products:
|
||||
- <a href="https://www.opencascade.com/content/mesh-framework">Open CASCADE Mesh Framework (OMF)</a>
|
||||
- <a href="https://www.opencascade.com/content/express-mesh">Express Mesh</a>
|
||||
|
||||
@figure{/introduction/images/0003.png}
|
||||
|
||||
@subsection intro_overview_visu Visualization
|
||||
|
||||
**Visualization** module provides ready-to-use algorithms to create graphic presentations from various objects: shapes, meshes, etc.
|
||||
|
||||
In Open CASCADE Technology visualization is based on the separation of CAD data and its graphical presentation.
|
||||
The module also supports a fast and powerful interactive selection mechanism.
|
||||
|
||||
Visualization module relies on the following key toolkits:
|
||||
- *TKV3d* toolkit defines a high-level API called (Application Interactive Services* (AIS) for working with interactive objects.
|
||||
- *TKService* toolkit defines a low-level API for managing and creating presentations from primitive arrays.
|
||||
This toolkit defines an abstraction layer for defining an arbitrary graphic driver responsible for actual rendering.
|
||||
- *TKOpenGl* toolkit implements the graphic driver using OpenGL and OpenGL ES libraries.
|
||||
|
||||
While low-level API operates with primitive arrays (triangles, lines, points), the higher level includes services for building presentations for B-Rep shapes (shaded and wireframe).
|
||||
A comprehensive list of standard interactive objects includes topological shape, mesh presentation, various dimensions, manipulators and others.
|
||||
It provides a solid basis for rapid application development, while flexible and extensible API allows development of highly customized application-specific presentations.
|
||||
|
||||
Here are a few examples of OCCT Visualization features:
|
||||
* Camera-driven view projection and orientation.
|
||||
Perspective, orthographic and stereographic projections are supported.
|
||||
* Support of Common (diffuse/ambient/specular) and PBR metallic-roughness material models.
|
||||
* Possibility to flexibly adjust appearance of dimensions in a 3D view.
|
||||
The 3D text object represents a given text string as a true 3D object in the model space.
|
||||
* Definition of clipping planes through the plane equation coefficients.
|
||||
Ability to define visual attributes for cross-section at the level or individual clipping planes.
|
||||
In the image below different parts of the rocket are clipped with different planes and hatched.
|
||||
@figure{/introduction/images/0008.png, "Display of shape cross-section and dimensions"}
|
||||
|
||||
* Support of built-in and application-specific GLSL shaders.
|
||||
@figure{/introduction/images/0013.png, "Fragment shader implementing custom clipping surface"}
|
||||
|
||||
* Optimization of rendering performance through the algorithms of:
|
||||
* View frustum culling, which skips the presentation outside camera at the rendering stage;
|
||||
* Back face culling, which reduces the rendered number of triangles and eliminates artifacts at shape boundaries.
|
||||
* Real-time ray tracing technique using recursive Whitted's algorithm and Bounded Volume Hierarchy effective optimization structure.
|
||||
@figure{introduction/images/0002.png, "Real time visualization by ray tracing method"}
|
||||
@figure{introduction/images/0012.png, "Simulation of a glass cover"}
|
||||
|
||||
For more details, see @ref occt_user_guides__visualization "Visualization User's Guide".
|
||||
|
||||
The visualization of OCCT topological shapes by means of VTK library provided by VIS component is described in a separate @ref occt_user_guides__vis "VTK Integration Services" User's Guide.
|
||||
|
||||
@subsection intro_overview_de Data Exchange
|
||||
|
||||
**Data Exchange** allows developing OCCT-based applications that can interact with other CAD systems by writing and reading CAD models to and from external data.
|
||||
|
||||
@figure{/introduction/images/0014.png,"Shape imported from STEP"}
|
||||
|
||||
**Data Exchange** is organized in a modular way as a set of interfaces that comply with various CAD formats: IGES, STEP, STL, VRML, etc.
|
||||
The interfaces allow software based on OCCT to exchange data with various CAD/PDM software packages, maintaining a good level of interoperability.
|
||||
This module handles various problems of interoperability between CAD systems, caused by differences in model validity criteria and requirements to internal representation.
|
||||
|
||||
* **Standardized Data Exchange** interfaces allow querying and examining the input file, converting its contents to a CAD model and running validity checks on a fully translated shape.
|
||||
The following formats are currently supported:
|
||||
* @ref occt_user_guides__step "STEP" (AP203: Mechanical Design, this covers General 3D CAD; AP214: Automotive Design; AP242).
|
||||
* @ref occt_iges_1 "IGES" (up to 5.3).
|
||||
* **glTF** 2.0 reader and writer.
|
||||
* **OBJ** mesh file reader.
|
||||
* **VRML** converter translates Open CASCADE shapes to VRML 1.0 files (Virtual Reality Modeling Language).
|
||||
* **STL** converter translates Open CASCADE shapes to STL files.
|
||||
STL (STtereoLithography) format is widely used for rapid prototyping (3D printing).
|
||||
* @ref occt_user_guides__xde "Extended data exchange" (XDE) allows translating additional attributes attached to geometric data (colors, layers, names, materials etc).
|
||||
* <a href="https://www.opencascade.com/content/advanced-data-exchange-components">Advanced Data Exchange Components</a>
|
||||
are available in addition to standard Data Exchange interfaces to support interoperability and data adaptation (also using @ref intro_overview_heal "Shape Healing") with CAD software using the following proprietary formats:
|
||||
* <a href="https://www.opencascade.com/content/acis-sat-import-export">ACIS SAT</a>
|
||||
* <a href="https://www.opencascade.com/content/parasolid-import">Parasolid</a>
|
||||
* <a href="https://www.opencascade.com/content/dxf-import-export">DXF</a>
|
||||
* <a href="https://www.opencascade.com/content/ifc-import">IFC</a>
|
||||
* <a href="https://www.opencascade.com/content/jt-import-export">JT</a>
|
||||
|
||||
These components are based on the same architecture as interfaces with STEP and IGES.
|
||||
|
||||
@subsection intro_overview_heal Shape Healing
|
||||
|
||||
**Shape Healing** library provides algorithms to correct and adapt the geometry and topology of shapes imported to OCCT from other CAD systems.
|
||||
|
||||
Shape Healing algorithms include, but are not limited to, the following operations:
|
||||
* Analyze shape characteristics and, in particular, identify the shapes that do not comply with OCCT geometry and topology validity rules by analyzing geometrical objects and topology:
|
||||
- check edge and wire consistency;
|
||||
- check edge order in a wire;
|
||||
- check the orientation of face boundaries;
|
||||
- analyze shape tolerances;
|
||||
- identify closed and open wires in a boundary.
|
||||
* Fix incorrect or incomplete shapes:
|
||||
- provide consistency between a 3D curve and its corresponding parametric curve;
|
||||
- repair defective wires;
|
||||
- fit the shapes to a user-defined tolerance value;
|
||||
- fill gaps between patches and edges.
|
||||
* Upgrade and change shape characteristics:
|
||||
- reduce curve and surface degree;
|
||||
- split shapes to obtain C1 continuity;
|
||||
- convert any types of curves or surfaces to Bezier or B-Spline curves or surfaces and back;
|
||||
- split closed surfaces and revolution surfaces.
|
||||
|
||||
Each sub-domain of Shape Healing has its own scope of functionality:
|
||||
|
||||
| Sub-domain | Description | Impact on the shape |
|
||||
| :--- | :---- | :---- |
|
||||
| Analysis | Explores shape properties, computes shape features, detects violation of OCCT requirements. | The shape itself is not modified. |
|
||||
| Fixing | Fixes the shape to meet the OCCT requirements. | The shape may change its original form: modification, removal or creation of sub-shapes, etc.) |
|
||||
| Upgrade | Improves the shape to fit some particular algorithms. | The shape is replaced with a new one, but geometrically they are the same. |
|
||||
| Customization | Modifies the shape representation to fit specific needs. | The shape is not modified, only the mathematical form of its internal representation is changed. |
|
||||
| Processing | Mechanism of shape modification via a user-editable resource file. | |
|
||||
|
||||
For more details, refer to @ref occt_user_guides__shape_healing "Shape Healing User's guide".
|
||||
|
||||
@subsection intro_overview_ocaf Application Framework
|
||||
|
||||
**Open CASCADE Application Framework** (OCAF) handles Application Data basing on the Application/Document paradigm.
|
||||
It uses an associativity engine to simplify the development of a CAD application thanks to the following ready-to-use features and services:
|
||||
|
||||
* Data attributes managing the application data, which can be organized according to the development needs;
|
||||
* Data storage and persistence (open/save);
|
||||
* Possibility to modify and recompute attributes in documents.
|
||||
With OCAF it is easy to represent the history of modification and parametric dependencies within your model;
|
||||
* Possibility to manage multiple documents;
|
||||
* Predefined attributes common to CAD/CAM/CAE applications (e.g. to store dimensions);
|
||||
* Undo-Redo and Copy-Paste functions.
|
||||
|
||||
Since OCAF handles the application structure, the only development task is the creation of application-specific data and GUIs.
|
||||
|
||||
OCAF differs from any other CAD framework in the organization of application data, as there the data structures are based on reference keys rather than on shapes.
|
||||
In a model, such attributes as shape data, color and material are attached to an invariant structure, which is deeper than the shapes.
|
||||
A shape object becomes the value of *Shape* attribute, in the same way as an integer number is the value of *Integer* attribute and a string is the value of *Name* attribute.
|
||||
|
||||
OCAF organizes and embeds these attributes in a document. OCAF documents, in their turn, are managed by an OCAF application.
|
||||
|
||||
For more details, see @ref occt_user_guides__ocaf "OCAF User's Guide".
|
||||
|
||||
@subsection intro_overview_draw Draw Test Harness
|
||||
|
||||
**Test Harness** or **Draw** is a convenient testing tool for OCCT libraries.
|
||||
It can be used to test and prototype various algorithms before building an entire application.
|
||||
It includes:
|
||||
- A command interpreter based on the TCL language;
|
||||
- A number of 2D and 3D viewers;
|
||||
- A set of predefined commands.
|
||||
|
||||
The viewers support operations such as zoom, pan, rotation and full-screen views.
|
||||
|
||||
The basic commands provide general-purpose services such as:
|
||||
- Getting help;
|
||||
- Evaluating a script from a file;
|
||||
- Capturing commands in a file;
|
||||
- Managing views;
|
||||
- Displaying objects.
|
||||
|
||||
In addition, **Test Harness** provides commands to create and manipulate curves and surfaces (geometry) and shapes, access visualization services, work with OCAF documents, perform data exchange, etc.
|
||||
|
||||
You can add custom commands to test or demonstrate any new functionalities, which you develop.
|
||||
|
||||
For more details, see @ref occt_user_guides__test_harness "Draw Test Harness Manual".
|
||||
|
||||
@section intro_req Requirements
|
||||
|
||||
Open CASCADE Technology is designed to be highly portable and is known to
|
||||
work on wide range of platforms.
|
||||
Current version is officially certified on Windows (IA-32 and x86-64),
|
||||
Linux (x86-64), OS X / macOS (x86-64), Android (armv7 and x86), and
|
||||
iOS (armv7, arm64) platforms.
|
||||
|
||||
The tables below describe the recommended software configurations
|
||||
for which OCCT is certified to work.
|
||||
|
||||
@subsection intro_req_cpp C++ Compiler / IDE
|
||||
|
||||
| OS | Compiler |
|
||||
| --------- | ----------- |
|
||||
| Windows | Microsoft Visual Studio: 2008 SP1, 2010 SP1, 2012 Update 4, 2013 Update 5, 2015 Update 3, 2017 <sup>1</sup>, 2019 <br>, LLVM (ClangCL), GCC 4.3+ (Mingw-w64)|
|
||||
| Linux | GNU gcc 4.3+ <br> LLVM CLang 3.6+ |
|
||||
| OS X / macOS | XCode 6 or newer |
|
||||
| Android | NDK r10, GNU gcc 4.8 or newer |
|
||||
| Web | Emscripten SDK 1.39 or newer (CLang) |
|
||||
|
||||
1) VC++ 141 64-bit is used for regular testing and for building binary package of official release of OCCT on Windows.
|
||||
|
||||
@subsection intro_req_libs Third-party libraries and tools
|
||||
|
||||
The following third-party libraries and tools are not included in OCCT sources but are either required or can be optionally used for the indicated components of OCCT.
|
||||
They are not needed if relevant component is not needed.
|
||||
|
||||
Note that pre-built packages of many of the listed libraries are available at
|
||||
https://www.opencascade.com/content/3rd-party-components
|
||||
|
||||
| Component | Where to find | Used for | Required or optional |
|
||||
| --------- | ------------- | -------- | -------------------- |
|
||||
| CMake 2.8+ | https://cmake.org/ | Build from sources | Optional |
|
||||
| Intel TBB 4.x or later | https://www.threadingbuildingblocks.org/ | All | Optional (advanced parallelization of algorithms) |
|
||||
| OpenGL 3.3+, OpenGL ES 2.0+ | System | Visualization | Required |
|
||||
| OpenVR 1.10+ | https://github.com/ValveSoftware/openvr | Visualization | Optional (VR support) |
|
||||
| Direct3D 9 | Windows | Visualization | Optional (integration with GUI using Direct3D) |
|
||||
| FreeType 2.4.11-2.7.1 | https://sourceforge.net/projects/freetype/files/ | Visualization | Required |
|
||||
| FreeImage 3.17.0+ | https://sourceforge.net/projects/freeimage/files | Visualization | Optional (support of common 2D graphic formats) |
|
||||
| FFmpeg 3.1+ | https://www.ffmpeg.org/download.html | Visualization | Optional (video recording) |
|
||||
| VTK 6.1+ | https://www.vtk.org/download/ | Visualization | Optional (VTK integration) |
|
||||
| Flex 2.6.4+ and Bison 3.7.1+ | https://sourceforge.net/projects/winflexbison/ | Data Exchange | Optional (update of STEP and ExprIntrp parsers) |
|
||||
| RapidJSON 1.1+ | https://rapidjson.org/ | Data Exchange | Optional (reading glTF files) |
|
||||
| Tcl/Tk 8.6.3+ <br> or ActiveTcl 8.6 | https://www.tcl.tk/software/tcltk/download.html <br> https://www.activestate.com/activetcl/downloads | DRAW Test Harness | Required |
|
||||
| Qt Desktop: Qt 4.8.6+ <br> Android: Qt 5.3.2+ | https://www.qt.io/download/ | Samples and demos | Optional (Qt samples) |
|
||||
| Doxygen 1.8.5+ | https://www.doxygen.nl/download.html | Documentation | Required |
|
||||
| Graphviz 2.38+ | https://graphviz.org/ | Documentation | Optional (dependency graphs) |
|
||||
|
||||
@subsection intro_req_hw Hardware
|
||||
|
||||
| Component | Requirement |
|
||||
| --------- | ----------- |
|
||||
| Minimum memory | 512 MB, 1 GB recommended |
|
||||
| Free disk space (complete installation) | 600 MB approx. |
|
||||
|
||||
On desktop, 3D viewer for optimal performance requires graphics processing unit (GPU) supporting OpenGL 3.3 or above.
|
||||
Ray tracing requires OpenGL 4.0+ or OpenGL 3.3+ with *GL_ARB_texture_buffer_object_rgb32* extension.
|
||||
Textures within ray tracing will be available only when *GL_ARB_bindless_texture extension* is provided by driver.
|
||||
|
||||
On mobile platforms, OpenGL ES 2.0+ is required for 3D viewer (OpenGL ES 3.1+ is recommended).
|
||||
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).
|
||||
|
||||
OCCT 3D Viewer, in general, supports wide range of graphics hardware - from very old to new.
|
||||
Therefore, if you observe some unexpected visual issues - first check for OpenGL driver update (or firmware update in case of mobile platforms);
|
||||
but beware that driver update might also come with new bugs.
|
||||
Don't forget to report these bugs to vendors.
|
||||
|
||||
@section intro_install Download and Installation
|
||||
|
||||
OCCT can be downloaded from https://www.opencascade.com/content/latest-release
|
||||
|
||||
In most cases you would want to rebuild OCCT from sources on your platform (OS, compiler) before
|
||||
using it in your project, to ensure binary compatibility and appropriate configuration of the library.
|
||||
See @ref build_upgrade for instructions on building OCCT from sources on supported platforms.
|
||||
|
||||
The following subsections describe how OCCT can be installed from ready-to-use packages on different platforms.
|
||||
|
||||
@subsection intro_install_windows Windows
|
||||
|
||||
On Windows Open CASCADE Technology with binaries precompiled by Visual C++ 2017
|
||||
can be installed using installation procedure available on official download page.
|
||||
|
||||
**Recommendation:**
|
||||
|
||||
If you have a previous version of OCCT installed on your station,
|
||||
and you do not plan to use it along with the new version, you might want to uninstall
|
||||
the previous version (using Control Panel, Add/Remove Programs) before
|
||||
the installation of this new version, to avoid possible problems
|
||||
(conflict of system variables, paths, etc).
|
||||
|
||||
Full OCCT installation with reference documentation requires 1.8 Gb on disk.
|
||||
|
||||
When the installation is complete, you will find the directories for 3rd party products
|
||||
(some might be absent in case of custom installation) and the main **OCCT** directory:
|
||||
|
||||
@figure{/introduction/images/overview_3rdparty.png}
|
||||
|
||||
The contents of the OCCT-7.4.0 directory (called further "OCCT root", or $CASROOT) are as follows:
|
||||
|
||||
@figure{/introduction/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++ 2010, 2012, 2013, 2015, 2017 and 2019 which allow rebuilding OCCT under Windows platform in 32 and 64-bit mode;
|
||||
* **adm/scripts** This folder contains auxiliary scripts for semi-automated building and packaging of OCCT for different platforms;
|
||||
* **data** This folder contains CAD files in different formats, which can be used to test the OCCT functionality;
|
||||
* **doc** This folder contains OCCT documentation in HTML and PDF format;
|
||||
* **dox** This folder contains sources of OCCT documentation in plain text (MarkDown) format;
|
||||
* **inc** This folder contains copies of all OCCT header files;
|
||||
* **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.
|
||||
* **tools** This folder contains sources of Inspector tool.
|
||||
* **win64/vc10** This folder contains executable and library files built in optimize mode for Windows platform by Visual C++ 2010;
|
||||
|
||||
@subsection intro_install_linux Linux
|
||||
|
||||
OCCT is available as package "opencascade" in official repositories of many Linux distributions.
|
||||
|
||||
See https://repology.org/project/opencascade/versions for overview of available repositories.
|
||||
|
||||
@subsection intro_install_mac macOS
|
||||
|
||||
On macOS, OCCT is available in Homebrew (https://formulae.brew.sh/formula/opencascade)
|
||||
and MacPorts (https://ports.macports.org/port/opencascade/summary) repositories.
|
||||
|
||||
@section intro_env Environment Variables
|
||||
|
||||
To run any Open CASCADE Technology application you need to set the environment variables.
|
||||
|
||||
### On Windows
|
||||
|
||||
You can define the environment variables with env.bat script located in the
|
||||
$CASROOT folder. This script accepts two arguments to be used:
|
||||
the version of Visual Studio (vc10 -- vc142) and the architecture (win32 or win64).
|
||||
|
||||
The additional environment settings necessary for compiling OCCT libraries and samples
|
||||
by Microsoft Visual Studio can be set using script custom.bat located in the same folder.
|
||||
You might need to edit this script to correct the paths to third-party libraries
|
||||
if they are installed on your system in a non-default location.
|
||||
|
||||
Script msvc.bat can be used with the same arguments for immediate launch of Visual Studio for (re)compiling OCCT.
|
||||
|
||||
### On Unix
|
||||
|
||||
|
||||
If OCCT was built by Code::Blocks, you can define the environment variables with env_cbp.sh or custom_cbp.sh script.
|
||||
|
||||
If OCCT was built by Automake, you can define the environment variables with env_amk.sh or custom_amk.sh script.
|
||||
|
||||
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; **DYLD_LIBRARY_PATH** variable in case of macOS);
|
||||
* **MMGT_OPT** (optional) if set to 1, the memory manager performs optimizations as described below; if set to 2,
|
||||
Intel (R) TBB optimized memory manager is used; if 0 (default), every memory block is allocated
|
||||
in C memory heap directly (via malloc() and free() functions).
|
||||
In the latter case, all other options starting with *MMGT*, except MMGT_CLEAR, are ignored;
|
||||
* **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;
|
||||
* **MMGT_NBPAGES** (optional) defines the size of memory chunks allocated for small blocks in pages
|
||||
(operating-system dependent). Default is 10000;
|
||||
* **MMGT_THRESHOLD** (optional) defines the maximal size of blocks that are recycled internally
|
||||
instead of being returned to the heap. Default is 40000;
|
||||
* **MMGT_MMAP** (optional) when set to 1 (default), large memory blocks are allocated using
|
||||
memory mapping functions of the operating system; if set to 0,
|
||||
they will be allocated in the C heap by malloc();
|
||||
* **CSF_LANGUAGE** (optional) defines default language of messages;
|
||||
* **CSF_DEBUG** (optional, Windows only): if defined then a diagnostic message is displayed in case of an exception;
|
||||
* **CSF_DEBUG_BOP** (optional): if defined then it should specify directory where diagnostic data on problems occured in Boolean operations will be saved;
|
||||
* **CSF_MDTVTexturesDirectory** defines the directory for available textures when using texture mapping;
|
||||
* **CSF_ShadersDirectory** (optional) defines the directory for GLSL programs for Ray Tracing renderer (embedded resources are used when variable is undefined);
|
||||
* **CSF_SHMessage** (optional) defines the path to the messages file for *ShapeHealing*;
|
||||
* **CSF_XSMessage** (optional) defines the path to the messages file for **STEP** and **IGES** translators;
|
||||
* **CSF_StandardDefaults**, **CSF_StandardLiteDefaults*, **CSF_XCAFDefaults**, and **CSF_PluginDefaults** define paths to directory where configuration files for OCAF persistence are located (required for open/save operations with OCAF documents);
|
||||
* **CSF_IGESDefaults** and **CSF_STEPDefaults** (optional) define paths to directory where resource files of **IGES** and **STEP** translators are located;
|
||||
* **CSF_XmlOcafResource** is required in order to set the path to **XSD** resources, which defines XML grammar.
|
||||
* **CSF_MIGRATION_TYPES** is required in order to read documents that contain old data types, such as *TDataStd_Shape*;
|
||||
|
||||
@section intro_license License
|
||||
|
||||
Open CASCADE Technology and all materials, including this documentation, is
|
||||
Copyright (c) 1999-2020 by OPEN CASCADE S.A.S. All rights reserved.
|
||||
|
||||
Open CASCADE Technology is free software; you can redistribute it and / or modify it under the terms of the
|
||||
@ref license_lgpl_21 "GNU Lesser General Public License (LGPL) version 2.1", with additional @ref occt_lgpl_exception "exception".
|
||||
|
||||
Note that LGPL imposes some obligations on the application linked with Open CASCADE Technology.
|
||||
If you wish to use OCCT in a proprietary application, please pay a special attention to address the requirements of LGPL section 6.
|
||||
At minimum the following should be considered:
|
||||
1. Add the notice visible to the users of your application clearly stating that Open CASCADE Technology is used in this application, and that they have rights in this regard according to LGPL.
|
||||
Such notice can be added in About dialog box (this is mandatory if this box contains copyright statements) or a similar place and/or in the documentation.
|
||||
The text of LGPL license should be accessible to the user.
|
||||
2. Make the copy of OCCT sources used by the application available to its users, and if necessary provide instructions on how to build it in a way compatible with the application.
|
||||
3. Ensure that the user actually can exercise the right to run your application with a modified version of OCCT.
|
||||
If the application is distributed in a form that does not allow the user to modify OCCT part (e.g. the application is linked to OCCT statically or is distributed via AppStore on iOS, GooglePlay on Android, Windows Store, etc.),
|
||||
the application should be provided separately in a modifiable form, with all materials needed for the user to be able to run the application with a modified version of OCCT.
|
||||
|
||||
If you want to use Open CASCADE Technology without being bound by LGPL requirements,
|
||||
please <a href="https://www.opencascade.com/contact">contact Open CASCADE company</a> for a commercial license.
|
||||
|
||||
Note that Open CASCADE Technology is provided on an "AS IS" basis, WITHOUT
|
||||
WARRANTY OF ANY KIND. The entire risk related to any use of the OCCT code and
|
||||
materials is on you. See the @ref occt_public_license "license" text for formal
|
||||
disclaimer.
|
||||
|
||||
@section intro_acknowledge Acknowledgments
|
||||
|
||||
The following parties are acknowledged for producing tools which are used within
|
||||
Open CASCADE Technology libraries or for release preparation.
|
||||
|
||||
You are hereby informed that all rights to the software listed below belong to its respective
|
||||
authors and such software may not be freely available and/or be free of charge for any kind
|
||||
of use or purpose. We strongly recommend that you carefully read the license of these products
|
||||
and, in case you need any further information, directly contact their authors.
|
||||
|
||||
**Qt** is a cross-platform application framework that is widely used for developing application software
|
||||
with graphical user interface (GUI). Qt is free and open source software distributed under
|
||||
the terms of the GNU Lesser General Public License. In OCCT Qt is used for programming samples.
|
||||
If you need further information on Qt, refer to Qt Homepage (https://www.qt.io/)
|
||||
|
||||
**Tcl** is a high-level programming language. Tk is a graphical user interface (GUI) toolkit,
|
||||
with buttons, menus, listboxes, scrollbars, and so on. Taken together Tcl and Tk provide a solution
|
||||
to develop cross-platform graphical user interfaces with a native look and feel. Tcl/Tk is under copyright by
|
||||
Scriptics Corp., Sun Microsystems, and other companies. However, Tcl/Tk is an open source, and
|
||||
the copyright allows you to use, modify, and redistribute Tcl/Tk for any purpose, without an
|
||||
explicit license agreement and without paying any license fees or royalties.
|
||||
To use Tcl/Tk, refer to the Licensing Terms (https://www.tcl.tk/software/tcltk/license.html).
|
||||
|
||||
**FreeType 2** is developed by Antoine Leca, David Turner, Werner Lemberg and others.
|
||||
It is a software font engine that is designed to be small, efficient, highly customizable and
|
||||
portable while capable of producing high-quality output (glyph images). This product
|
||||
can be used in graphic libraries, display servers, font conversion tools,
|
||||
text image generation tools, and many other products.
|
||||
FreeType 2 is released under two open-source licenses: BSD-like FreeType License and the GPL (https://www.freetype.org/license.html).
|
||||
|
||||
**Intel(R) Threading Building Blocks (TBB)** offers a rich and complete approach to expressing parallelism in a C++ program.
|
||||
It is a library that helps you to take advantage of multi-core processor performance without having to be a threading expert.
|
||||
Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that
|
||||
abstracts platform details and threading mechanisms for scalability and performance.
|
||||
TBB version 2017 is available under Apache 2.0 license, while older versions
|
||||
until 4.4 are available under GPLv2 license with the runtime exception (https://www.threadingbuildingblocks.org).
|
||||
|
||||
**OpenGL** is an industry standard API for 3D graphics used by OCCT for
|
||||
implementation of 3D viewer. OpenGL specification is developed by the
|
||||
Khronos group, https://www.khronos.org/opengl/. OCCT code includes header
|
||||
file *glext.h* obtained from Khronos web site.
|
||||
|
||||
**OpenVR** is an API and runtime that allows access to VR hardware from multiple vendors
|
||||
without requiring that applications have specific knowledge of the hardware they are targeting.
|
||||
OpenVR is optionally used by OCCT for VR support.
|
||||
OpenVR is released under BSD-like license (https://github.com/ValveSoftware/openvr/blob/master/LICENSE).
|
||||
|
||||
**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, refer to VTK Homepage https://www.vtk.org/.
|
||||
|
||||
**Doxygen** developed by Dimitri van Heesch is open source documentation system for
|
||||
C++, C, Java, Objective-C, Python, IDL, PHP and C#. This product is used in Open CASCADE Technology
|
||||
for automatic creation of Technical Documentation from C++ header files.
|
||||
If you need further information on Doxygen, refer to https://www.stack.nl/~dimitri/doxygen/index.html.
|
||||
|
||||
**Graphviz** is open source graph visualization software developed by John Ellson, Emden Gansner, Yifan Hu and Arif Bilgin.
|
||||
Graph visualization is representiation of structured information as diagrams of abstract graphs and networks.
|
||||
This product is used together with Doxygen in Open CASCADE Technology for automatic creation of Technical Documentation
|
||||
(generation of dependency graphs). Current versions of Graphviz are licensed on an open source
|
||||
basis under The Eclipse Public License (EPL) (https://www.graphviz.org/license/).
|
||||
|
||||
**Inno Setup** is a free script-driven installation system created in CodeGear Delphi by Jordan Russell.
|
||||
In OCCT Inno Setup is used to create Installation Wizard on Windows.
|
||||
It is licensed under Inno Setup License (http://www.jrsoftware.org/files/is/license.txt).
|
||||
|
||||
**FreeImage** is an Open Source library supporting popular graphics image formats, such as PNG, BMP, JPEG, TIFF,
|
||||
and others used by multimedia applications. This library is developed by Hervé Drolon and Floris van den Berg.
|
||||
FreeImage is easy to use, fast, multithreading safe, compatible with all 32-bit or 64-bit versions of Windows,
|
||||
and cross-platform (works both with Linux and Mac OS X). FreeImage is optionally used by OCCT to work
|
||||
with images, on conditions of the FreeImage Public License (FIPL) (https://freeimage.sourceforge.net/freeimage-license.txt).
|
||||
|
||||
**FFmpeg** is an Open Source framework supporting various image, video and audio codecs.
|
||||
FFmpeg is optionally used by OCCT for video recording, on LGPL conditions (https://www.ffmpeg.org/legal.html).
|
||||
|
||||
**David M. Gay's floating point routines** (dtoa.c) are used for fast reading of floating point values from text strings.
|
||||
These routines are available under MIT-like license (see https://www.netlib.org/fp/).
|
||||
|
||||
**Flex** is a generator of lexical analyzers (scanners), available under BSD license (https://github.com/westes/flex).
|
||||
|
||||
GNU **Bison** is a parser generator used (together with **Flex**) for implementation of reader of STEP file format and parser of expressions.
|
||||
It is available under GNU GPL v3 license (https://www.gnu.org/software/bison/).
|
||||
|
||||
**Delabella** is an open-source, cross-platform implementation of the Newton Apple Wrapper algorithm producing 2D Delaunay triangulation.
|
||||
Delabella is used by BRepMesh as one of alternative 2D triangulation algorithms.
|
||||
Delabella is licensed under the MIT license (https://github.com/msokalski/delabella).
|
||||
|
||||
**CMake** is an open-source, cross-platform family of tools designed to build, test and package software.
|
||||
CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice.
|
||||
OCCT uses CMake as a build system. CMake is available under BSD 3-Clause license.
|
||||
See more at https://cmake.org/
|
||||
|
||||
**Cotire** (compile time reducer) is a CMake module that speeds up the build process of CMake based build systems
|
||||
by fully automating techniques as precompiled header usage and single compilation unit builds for C and C++.
|
||||
Cotire is included in OCCT repository and used optionally by OCCT CMake scripts to accelerate builds by use of precompiled headers.
|
||||
Cotire is licensed under the MIT license (https://github.com/sakra/cotire/blob/master/license).
|
||||
|
||||
**MikTEX** is up-to-date implementation of TeX/LaTeX and related programs for Windows. It is used
|
||||
for generation of User and Developer Guides in PDF format. See https://miktex.org for information
|
||||
on this tool.
|
||||
|
||||
**RapidJSON** is an Open Source JSON parser and generator for C++.
|
||||
RapidJSON is optionally used by OCCT for reading glTF files (https://rapidjson.org/).
|
||||
|
||||
**DejaVu** fonts are a font family based on the Vera Fonts under a permissive license (MIT-like, https://dejavu-fonts.github.io/License.html).
|
||||
DejaVu Sans (basic Latin sub-set) is used by OCCT as fallback font when no system font is available.
|
||||
|
||||
Adobe Systems, Inc. provides **Adobe Reader**, which can be used to view files in Portable Document Format (PDF).
|
||||
|
||||
**CAS.CADE** and **Open CASCADE** are registered trademarks of OPEN CASCADE S.A.S.
|
||||
|
||||
**Linux** is a registered trademark of Linus Torvalds.
|
||||
|
||||
**Windows** is a registered trademark of Microsoft Corporation in the United States and other countries.
|
||||
|
||||
**Mac**, **OS X**, **macOS**, and the Mac logo are trademarks of Apple Inc., registered in the U.S. and other countries.
|
||||
|
||||
**Android** is a trademark of Google LLC.
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |