mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Compare commits
194 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
89aebdea8d | ||
|
168077a6dc | ||
|
d96fd48ee5 | ||
|
7dd37838f7 | ||
|
8f16a18454 | ||
|
1dd28279c8 | ||
|
cde381c4e2 | ||
|
10f55672df | ||
|
aff1875311 | ||
|
bb2cf06962 | ||
|
946e65b9c5 | ||
|
7fbac3c240 | ||
|
2fb5823d31 | ||
|
ce73cfd073 | ||
|
4208cf1872 | ||
|
b3eab8efc3 | ||
|
5299b92ba1 | ||
|
41aa3c3d5d | ||
|
f9ac4dc9ab | ||
|
ebcbd82410 | ||
|
45b9409aa4 | ||
|
d673da182b | ||
|
f411f94fac | ||
|
383c6c9fb2 | ||
|
8511408796 | ||
|
c894a5fdfc | ||
|
6dd6e5c758 | ||
|
f9f740d6b0 | ||
|
564c82b4f2 | ||
|
16c93d97eb | ||
|
ef9a9362ae | ||
|
8022338566 | ||
|
f3495b0139 | ||
|
6fe58c66d9 | ||
|
45d0af05b9 | ||
|
197cddcfc9 | ||
|
424392e0d8 | ||
|
eca0539260 | ||
|
326b3e283a | ||
|
bf7b2cebbe | ||
|
72523826de | ||
|
7a1b96cb98 | ||
|
3b2af789dd | ||
|
aa7b761d4c | ||
|
9d420e021d | ||
|
d102153bc0 | ||
|
baed683824 | ||
|
d5cdd12a38 | ||
|
3bae95c8a2 | ||
|
17d16f7887 | ||
|
fa53efefc3 | ||
|
9c86076b21 | ||
|
4af9e8a8b7 | ||
|
b070046674 | ||
|
2a8d1e7bcf | ||
|
71c089e99b | ||
|
2915f0b590 | ||
|
e7b01db7c4 | ||
|
a1565817f1 | ||
|
0e5ef9264f | ||
|
63dbfc04f8 | ||
|
c2bf27a6fb | ||
|
ecf4f17cb8 | ||
|
6e728f3b5c | ||
|
0d0481c787 | ||
|
b2134621cc | ||
|
a0ad45bf9a | ||
|
997e128f88 | ||
|
be70005cb5 | ||
|
9c189bd8dc | ||
|
1475265b58 | ||
|
e841c38c71 | ||
|
579f2938a8 | ||
|
f73c584ceb | ||
|
a3d4053c15 | ||
|
10c5aa00b0 | ||
|
953d87f32c | ||
|
681f3919f0 | ||
|
4a6d278356 | ||
|
434ffc0909 | ||
|
62ef08dfc8 | ||
|
d4507e82ba | ||
|
bc9a61ec69 | ||
|
ff1541f179 | ||
|
8878d0ecce | ||
|
f0cddd16eb | ||
|
c9c7286e56 | ||
|
e2e0498b17 | ||
|
416022a12f | ||
|
320a322080 | ||
|
43d3f6d8d8 | ||
|
4d19a2c5e7 | ||
|
ee5befae97 | ||
|
30f5e1a74b | ||
|
91764a8f6d | ||
|
e2a37a80f6 | ||
|
a965c45b2d | ||
|
ee905e847d | ||
|
0391af0aa1 | ||
|
964e27d91c | ||
|
d26375e22c | ||
|
dc6ae350f3 | ||
|
15173be5c9 | ||
|
be86ba90c4 | ||
|
6b8f3bdc36 | ||
|
95f8c6082d | ||
|
dd6b34fda4 | ||
|
9bba178dce | ||
|
1beb58d745 | ||
|
f204ec4c37 | ||
|
75378f50ea | ||
|
4945db69e5 | ||
|
7bbccb5f4e | ||
|
d94bed0e26 | ||
|
0b622d670d | ||
|
3f317e7d0c | ||
|
871dcdc201 | ||
|
dd115e1227 | ||
|
73ddbb9acc | ||
|
b969ebe7cf | ||
|
7c3ef2f752 | ||
|
ebc369da1d | ||
|
df18769ea6 | ||
|
caf231b050 | ||
|
2ec85268a1 | ||
|
1be4179947 | ||
|
bf95447514 | ||
|
c8c250a59d | ||
|
8b1441e374 | ||
|
a8122531ce | ||
|
922da0a825 | ||
|
5f4bd4d4d2 | ||
|
bd6a845441 | ||
|
bbbca107a2 | ||
|
d07a6c39cf | ||
|
d1d68ce714 | ||
|
c4a2f61e57 | ||
|
0f5ea4b5f8 | ||
|
b88b0cf7fc | ||
|
3c1624950a | ||
|
4e283d3379 | ||
|
e146ef9a93 | ||
|
d30895f5da | ||
|
fe4fc02d7b | ||
|
90b858262b | ||
|
95ae6ebb1b | ||
|
41ce5887ad | ||
|
88e55ec7ef | ||
|
d877e61038 | ||
|
ede89abcb9 | ||
|
b2bafb33a9 | ||
|
ece3f95012 | ||
|
c58b30780a | ||
|
c381fda2d6 | ||
|
f4dee9bb20 | ||
|
73594f7248 | ||
|
3a5a656c15 | ||
|
0d5880e11a | ||
|
949c9b7f28 | ||
|
8e5fb5eabc | ||
|
3a9b5dc86a | ||
|
6a24c6ded9 | ||
|
1f7f5a900f | ||
|
778cd66786 | ||
|
27ba9c6006 | ||
|
e8e26df06c | ||
|
14cb22a1a4 | ||
|
8d795b5130 | ||
|
b1c5466550 | ||
|
e620e2857f | ||
|
b357dcc225 | ||
|
84bd25527c | ||
|
5da005403b | ||
|
aea33d0ab8 | ||
|
a2f76b15f1 | ||
|
fb0b05319f | ||
|
935069d23d | ||
|
14ea8abd0a | ||
|
4aaadad7bc | ||
|
49e5d23824 | ||
|
46f4a251a0 | ||
|
d0aafb064b | ||
|
3202bf1e9e | ||
|
ef444297f5 | ||
|
4897e58dcd | ||
|
70ca46fecc | ||
|
d2edda76a9 | ||
|
c204d492ae | ||
|
a165f00280 | ||
|
099f351396 | ||
|
c10703215e | ||
|
7b3aef359f | ||
|
15b9dfc95d | ||
|
849c137461 |
@@ -52,6 +52,9 @@ set_property (GLOBAL PROPERTY OCC_VERSION_MAINTENANCE ${OCC_VERSION_MAINTENANCE}
|
||||
|
||||
set (INSTALL_TEST_CASES OFF CACHE BOOL "${INSTALL_TEST_CASES_DESCR}")
|
||||
|
||||
# Regeneration of OCCT resource files
|
||||
set (BUILD_RESOURCES OFF CACHE BOOL "${BUILD_RESOURCES_DESCR}")
|
||||
|
||||
# single-configuration generator
|
||||
set (SINGLE_GENERATOR OFF)
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
@@ -285,13 +288,16 @@ if (NOT DEFINED INSTALL_DIR_CMAKE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# include occt macros
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_resources")
|
||||
|
||||
# install LICENSE_LGPL_21.txt and OCCT_LGPL_EXCEPTION.txt files
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("LICENSE_LGPL_21.txt" "${INSTALL_DIR}/${INSTALL_DIR_DOC}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("OCCT_LGPL_EXCEPTION.txt" "${INSTALL_DIR}/${INSTALL_DIR_DOC}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("LICENSE_LGPL_21.txt" "${INSTALL_DIR_DOC}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("OCCT_LGPL_EXCEPTION.txt" "${INSTALL_DIR_DOC}")
|
||||
else()
|
||||
OCCT_INSTALL_FILE_OR_DIR ("LICENSE_LGPL_21.txt" "${INSTALL_DIR}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("OCCT_LGPL_EXCEPTION.txt" "${INSTALL_DIR}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("LICENSE_LGPL_21.txt" ".")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("OCCT_LGPL_EXCEPTION.txt" ".")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
@@ -340,6 +346,10 @@ if (ANDROID AND BUILD_MODULE_Draw)
|
||||
message (STATUS "Info. Draw module is turned off due to it is not supported on Android")
|
||||
set (BUILD_MODULE_Draw OFF CACHE BOOL "${BUILD_MODULE_Draw_DESCR}" FORCE)
|
||||
endif()
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" AND BUILD_MODULE_Draw)
|
||||
message (STATUS "Info. Draw module is turned off due to it is not supported on UWP")
|
||||
set (BUILD_MODULE_Draw OFF CACHE BOOL "${BUILD_MODULE_Draw_DESCR}" FORCE)
|
||||
endif()
|
||||
|
||||
# Overview
|
||||
if (NOT DEFINED BUILD_DOC_Overview)
|
||||
@@ -580,11 +590,11 @@ if (BUILD_DOC_Overview)
|
||||
endif()
|
||||
|
||||
if (INSTALL_DOC_Overview)
|
||||
install (DIRECTORY "${CMAKE_BINARY_DIR}/doc/overview" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_DOC}")
|
||||
install (DIRECTORY "${CMAKE_BINARY_DIR}/doc/overview" DESTINATION "${INSTALL_DIR_DOC}")
|
||||
|
||||
# create overview.html only for windows
|
||||
if (WIN32 AND "${INSTALL_DIR_LAYOUT}" STREQUAL "Windows")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("dox/resources/overview.html" "${INSTALL_DIR}/${INSTALL_DIR_DOC}/..")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("dox/resources/overview.html" "${INSTALL_DIR_DOC}/..")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -671,6 +681,12 @@ COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOLKITS}"
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) End the collecting")
|
||||
|
||||
list (FIND BUILD_TOOLKITS DRAWEXE DRAWEXE_INDEX)
|
||||
if (${DRAWEXE_INDEX} GREATER -1)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data/" "${INSTALL_DIR_DATA}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR_SAMPLES}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set (SCRIPT_EXT bat)
|
||||
else()
|
||||
@@ -678,45 +694,51 @@ else()
|
||||
endif()
|
||||
|
||||
# OCCT samples
|
||||
# get absolute path from INSTALL_DIR
|
||||
set (INSTALL_DIR_ABSOLUTE "${INSTALL_DIR}")
|
||||
if(NOT IS_ABSOLUTE "${INSTALL_DIR_ABSOLUTE}")
|
||||
get_filename_component(INSTALL_DIR_ABSOLUTE "${CMAKE_BINARY_DIR}/${INSTALL_DIR}" ABSOLUTE)
|
||||
endif()
|
||||
|
||||
if (INSTALL_SAMPLES)
|
||||
OCCT_CONFIGURE ("adm/templates/env.samples.${SCRIPT_EXT}.in" "env.samples.${SCRIPT_EXT}")
|
||||
if (WIN32)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/CSharp" "${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/mfc" "${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/CSharp" "${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/mfc" "${INSTALL_DIR_SAMPLES}")
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/xaml" "${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/xaml" "${INSTALL_DIR_SAMPLES}")
|
||||
endif()
|
||||
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}/CSharp" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}/mfc/standard" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/CSharp" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/mfc/standard" RENAME "env.${SCRIPT_EXT}")
|
||||
endif()
|
||||
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/java" "${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/ocafsamples" "${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt" "${INSTALL_DIR}/${INSTALL_DIR_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}")
|
||||
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}/qt/FuncDemo" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}/qt/IESample" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}/qt/Tutorial" RENAME "env.${SCRIPT_EXT}")
|
||||
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/Tutorial" RENAME "env.${SCRIPT_EXT}")
|
||||
endif()
|
||||
|
||||
if (INSTALL_TEST_CASES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("tests/" "${INSTALL_DIR}/${INSTALL_DIR_TESTS}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("tests/" "${INSTALL_DIR_TESTS}")
|
||||
endif()
|
||||
|
||||
list (FIND BUILD_TOOLKITS DRAWEXE DRAWEXE_INDEX)
|
||||
if (${DRAWEXE_INDEX} GREATER -1)
|
||||
# copy data and samples/tcl folders to install script folder
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data/" "${INSTALL_DIR}/${INSTALL_DIR_DATA}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data/" "${INSTALL_DIR_DATA}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR_SAMPLES}")
|
||||
|
||||
# copy draw script to install script folder
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}")
|
||||
install (FILES "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}"
|
||||
install (FILES "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
else()
|
||||
install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}"
|
||||
install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
endif()
|
||||
|
||||
@@ -740,18 +762,18 @@ if (EXISTS "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}")
|
||||
|
||||
file (WRITE "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
|
||||
else()
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}")
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}")
|
||||
endif()
|
||||
|
||||
# write current custom.bat/sh (for install directory)
|
||||
set (SUB_CUSTOM_BUILD_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.install.${SCRIPT_EXT}")
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.install.${SCRIPT_EXT}.in" "${SUB_CUSTOM_BUILD_NAME}" "${SUB_CUSTOM_NAME}" "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}")
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.install.${SCRIPT_EXT}.in" "${SUB_CUSTOM_BUILD_NAME}" "${SUB_CUSTOM_NAME}" "${INSTALL_DIR_SCRIPT}")
|
||||
|
||||
# write current custom.bat/sh (for build directory)
|
||||
OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
|
||||
|
||||
if (BUILD_MODULE_MfcSamples)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR_SCRIPT}")
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.bat" "${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
@@ -759,7 +781,7 @@ endif()
|
||||
OCCT_CONFIGURE ("adm/templates/env.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
|
||||
|
||||
# install env script
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}")
|
||||
|
||||
# copy DrawAppliInit from OCCT source to build directory
|
||||
if (NOT EXISTS "${CMAKE_BINARY_DIR}/DrawAppliInit")
|
||||
@@ -772,9 +794,9 @@ foreach(RESOURCE ${RESOURCES})
|
||||
get_filename_component(RESOURCE_FOLDER ${RESOURCE} DIRECTORY)
|
||||
if(NOT "${RESOURCE_FOLDER}" STREQUAL "")
|
||||
get_filename_component(RESOURCE_FOLDER ${RESOURCE_FOLDER} NAME)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}/${RESOURCE_FOLDER}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR_RESOURCE}/${RESOURCE_FOLDER}")
|
||||
else()
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR_RESOURCE}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
@@ -929,7 +951,7 @@ endif()
|
||||
|
||||
# Configure and install cmake config file
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/OpenCASCADEConfig.cmake.in" "OpenCASCADEConfig.cmake" @ONLY)
|
||||
install(FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfig.cmake" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_CMAKE}")
|
||||
install(FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfig.cmake" DESTINATION "${INSTALL_DIR_CMAKE}")
|
||||
|
||||
# Configure cmake version file
|
||||
include(CMakePackageConfigHelpers)
|
||||
@@ -938,7 +960,7 @@ write_basic_package_version_file( ${CMAKE_BINARY_DIR}/OpenCASCADEConfigVersion.c
|
||||
COMPATIBILITY ExactVersion )
|
||||
|
||||
# Install cmake version file
|
||||
install (FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfigVersion.cmake" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_CMAKE}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfigVersion.cmake" DESTINATION "${INSTALL_DIR_CMAKE}")
|
||||
|
||||
# Install the export set for use with the install-tree for each configuration
|
||||
foreach (OCCT_MODULE ${OCCT_MODULES_ENABLED})
|
||||
|
@@ -6,6 +6,5 @@ Shaders
|
||||
XSMessage
|
||||
XSTEPResource
|
||||
XmlOcafResource
|
||||
UnitsAPI/Lexi_Expr.dat
|
||||
UnitsAPI/Units.dat
|
||||
TObj/TObj.msg
|
@@ -5,7 +5,6 @@ n Bnd
|
||||
n BVH
|
||||
n CSLib
|
||||
n Convert
|
||||
n Dico
|
||||
n ElCLib
|
||||
n ElSLib
|
||||
n Expr
|
||||
|
@@ -196,17 +196,17 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
|
||||
|
||||
if (WIN32)
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}" DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}i")
|
||||
DESTINATION "${INSTALL_DIR_BIN}i")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
else()
|
||||
get_filename_component(ABS_PATH ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} REALPATH)
|
||||
@@ -215,19 +215,19 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
|
||||
get_filename_component(FREEIMLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}" RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_DIR_LIB}" RENAME ${FREEIMLIB}.3)
|
||||
else()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}"
|
||||
DESTINATION "${INSTALL_DIR_LIB}"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}i"
|
||||
DESTINATION "${INSTALL_DIR_LIB}i"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}d"
|
||||
DESTINATION "${INSTALL_DIR_LIB}d"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
endif()
|
||||
endif()
|
||||
@@ -236,19 +236,19 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
|
||||
get_filename_component(GL2PSLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}" RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_DIR_LIB}" RENAME ${GL2PSLIB}.1)
|
||||
else()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}"
|
||||
DESTINATION "${INSTALL_DIR_LIB}"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}i"
|
||||
DESTINATION "${INSTALL_DIR_LIB}i"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}d"
|
||||
DESTINATION "${INSTALL_DIR_LIB}d"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -1,9 +1,10 @@
|
||||
# doxygen
|
||||
set (DOXYGEN_MINIMUM_VERSION 1.8.4)
|
||||
|
||||
if (DO_ONLY_CHECK_FOR_DOXYGEN)
|
||||
message (STATUS "Info. Detecting doxygen")
|
||||
set (DOXYGEN_SKIP_DOT ON)
|
||||
find_package (Doxygen)
|
||||
find_package (Doxygen ${DOXYGEN_MINIMUM_VERSION})
|
||||
|
||||
set (CAN_DOXYGEN_BE_USED OFF)
|
||||
if (DOXYGEN_EXECUTABLE)
|
||||
@@ -33,7 +34,7 @@ else()
|
||||
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE))
|
||||
|
||||
set (DOXYGEN_SKIP_DOT ${3RDPARTY_SKIP_DOT_EXECUTABLE})
|
||||
find_package (Doxygen)
|
||||
find_package (Doxygen ${DOXYGEN_MINIMUM_VERSION})
|
||||
|
||||
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE AND DOXYGEN_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}" FORCE)
|
||||
|
@@ -300,17 +300,17 @@ if (BUILD_SHARED_LIBS)
|
||||
|
||||
if (WIN32)
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}" DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}i")
|
||||
DESTINATION "${INSTALL_DIR_BIN}i")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
else()
|
||||
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_ABS ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
|
||||
@@ -318,20 +318,20 @@ if (BUILD_SHARED_LIBS)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}"
|
||||
DESTINATION "${INSTALL_DIR_LIB}"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
else()
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}"
|
||||
DESTINATION "${INSTALL_DIR_LIB}"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}i"
|
||||
DESTINATION "${INSTALL_DIR_LIB}i"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}d"
|
||||
DESTINATION "${INSTALL_DIR_LIB}d"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -33,7 +33,6 @@ if (WIN32)
|
||||
set (CSF_gdi32 "gdi32.lib")
|
||||
set (CSF_user32 "user32.lib")
|
||||
set (CSF_wsock32 "wsock32.lib")
|
||||
set (CSF_winspool "Winspool.lib")
|
||||
set (CSF_psapi "Psapi.lib")
|
||||
set (CSF_AviLibs "ws2_32.lib vfw32.lib")
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2)
|
||||
|
@@ -257,6 +257,8 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
|
||||
foreach (FILE_INDEX RANGE ${ALL_FILES_NB})
|
||||
list (GET OCCT_ALL_FILE_NAMES ${FILE_INDEX} OCCT_FILE_NAME)
|
||||
|
||||
string (REGEX REPLACE "[^:]+:+" "" OCCT_FILE_NAME "${OCCT_FILE_NAME}")
|
||||
|
||||
if ("${OCCT_FILE_IN_DIR_NAME}" STREQUAL "${OCCT_FILE_NAME}")
|
||||
set (OCCT_FILE_IN_DIR_STATUS ON)
|
||||
|
||||
@@ -296,10 +298,11 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
|
||||
|
||||
foreach (OCCT_HEADER_FILE ${OCCT_HEADER_FILES_COMPLETE})
|
||||
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE} NAME)
|
||||
set (OCCT_HEADER_FILE_CONTENT "#include \"${OCCT_HEADER_FILE}\"")
|
||||
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
|
||||
endforeach()
|
||||
|
||||
install (FILES ${OCCT_HEADER_FILES_COMPLETE} DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_INCLUDE}")
|
||||
install (FILES ${OCCT_HEADER_FILES_COMPLETE} DESTINATION "${INSTALL_DIR_INCLUDE}")
|
||||
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) Checking headers in inc folder...")
|
||||
|
77
adm/cmake/occt_resources.cmake
Normal file
77
adm/cmake/occt_resources.cmake
Normal file
@@ -0,0 +1,77 @@
|
||||
# OCCT resource files generation
|
||||
|
||||
macro (OCCT_GENERATE_CONTENT_ONLY CurrentResource)
|
||||
set (RESOURCE_FILES)
|
||||
set (isResDirectory FALSE)
|
||||
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/src/${CurrentResource}")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${CurrentResource}/FILES" RESOURCE_FILES)
|
||||
set (CurrentResource_Directory "${CurrentResource}")
|
||||
set (isResDirectory TRUE)
|
||||
else()
|
||||
get_filename_component (CurrentResource_Name "${CurrentResource}" NAME)
|
||||
list (APPEND RESOURCE_FILES "res:::${CurrentResource_Name}")
|
||||
get_filename_component (CurrentResource_Directory "${CurrentResource}" DIRECTORY)
|
||||
endif()
|
||||
|
||||
# Add current toolkit into RESOURCE_TOOLKITS array to copy it to the BUILD directory
|
||||
list (APPEND RESOURCE_TOOLKITS "${CurrentResource_Directory}")
|
||||
list (REMOVE_DUPLICATES RESOURCE_TOOLKITS)
|
||||
|
||||
if (BUILD_RESOURCES)
|
||||
foreach (RESOURCE_FILE ${RESOURCE_FILES})
|
||||
string (REGEX MATCH "^[^:]+:::" IS_RESOURCE "${RESOURCE_FILE}")
|
||||
if (IS_RESOURCE)
|
||||
string (REGEX REPLACE "[^:]+:+" "" RESOURCE_FILE "${RESOURCE_FILE}")
|
||||
|
||||
get_filename_component (CurrentResource_FileName "${RESOURCE_FILE}" NAME)
|
||||
string (REPLACE "." "_" CurrentResource_FileName "${CurrentResource_FileName}")
|
||||
set (HEADER_FILE_NAME "${CurrentResource_Directory}_${CurrentResource_FileName}.pxx")
|
||||
|
||||
set (toProcessResFile TRUE)
|
||||
if (isResDirectory)
|
||||
list (FIND RESOURCE_FILES "${HEADER_FILE_NAME}" aResIndex)
|
||||
if ("${aResIndex}" STREQUAL "-1")
|
||||
set (toProcessResFile FALSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (toProcessResFile)
|
||||
message(STATUS "Info. Generating header file from resource file: ${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${RESOURCE_FILE}")
|
||||
|
||||
# generate content for header file
|
||||
set (OCCT_HEADER_FILE_CONTENT "// This file has been automatically generated from resource file src/${CurrentResource_Directory}/${RESOURCE_FILE}\n\n")
|
||||
|
||||
# read resource file
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${RESOURCE_FILE}" RESOURCE_FILE_LINES_LIST)
|
||||
|
||||
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT}static const char ${CurrentResource_Directory}_${CurrentResource_FileName}[] =")
|
||||
foreach (line IN LISTS RESOURCE_FILE_LINES_LIST)
|
||||
string (REPLACE "\"" "\\\"" line "${line}")
|
||||
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT}\n \"${line}\\n\"")
|
||||
endforeach()
|
||||
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT};")
|
||||
|
||||
# Save generated content to header file
|
||||
set (HEADER_FILE "${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${HEADER_FILE_NAME}")
|
||||
if (EXISTS "${HEADER_FILE}")
|
||||
file (REMOVE "${HEADER_FILE}")
|
||||
endif()
|
||||
configure_file ("${CMAKE_SOURCE_DIR}/adm/templates/header.in" "${HEADER_FILE}" @ONLY NEWLINE_STYLE LF)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
FILE_TO_LIST ("adm/RESOURCES" RESOURCES)
|
||||
foreach (CurrentResource ${RESOURCES})
|
||||
get_filename_component (CurrentResource_FileName "${CurrentResource}" NAME)
|
||||
if ("${CurrentResource_FileName}" STREQUAL TObj.msg OR
|
||||
"${CurrentResource_FileName}" STREQUAL Units.dat OR
|
||||
"${CurrentResource}" STREQUAL XSMessage OR
|
||||
"${CurrentResource}" STREQUAL SHMessage OR
|
||||
"${CurrentResource}" STREQUAL Shaders)
|
||||
OCCT_GENERATE_CONTENT_ONLY ("${CurrentResource}")
|
||||
endif()
|
||||
endforeach()
|
@@ -147,14 +147,14 @@ if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
else()
|
||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
||||
|
||||
if (MSVC)
|
||||
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind/${PROJECT_NAME}.pdb
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||
|
@@ -237,37 +237,37 @@ macro (TBB_PRODUCT_SEARCH PRODUCT_NAME)
|
||||
|
||||
if (WIN32)
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL} DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL} DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}i")
|
||||
DESTINATION "${INSTALL_DIR_BIN}i")
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
else()
|
||||
get_filename_component (PRODUCT_LIBRARY_NAME ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}"
|
||||
DESTINATION "${INSTALL_DIR_LIB}"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
else()
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}"
|
||||
DESTINATION "${INSTALL_DIR_LIB}"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}i"
|
||||
DESTINATION "${INSTALL_DIR_LIB}i"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}d"
|
||||
DESTINATION "${INSTALL_DIR_LIB}d"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -210,40 +210,40 @@ if (BUILD_SHARED_LIBS)
|
||||
file (GLOB TCL_DLLS "${3RDPARTY_TCL_DLL_DIR}/*.dll")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES ${TCL_DLLS} DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (FILES ${TCL_DLLS} DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}i")
|
||||
DESTINATION "${INSTALL_DIR_BIN}i")
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
else()
|
||||
get_filename_component(3RDPARTY_TCL_LIBRARY_REALPATH ${3RDPARTY_TCL_LIBRARY} REALPATH)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}")
|
||||
DESTINATION "${INSTALL_DIR_LIB}")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}i")
|
||||
DESTINATION "${INSTALL_DIR_LIB}i")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}d")
|
||||
DESTINATION "${INSTALL_DIR_LIB}d")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (TCL_TCLSH_VERSION)
|
||||
# tcl is required to install in lib folder (without)
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR_LIB}")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR_LIB}")
|
||||
else()
|
||||
message (STATUS "\nWarning: tclX.X subdir won't be copyied during the installation process.")
|
||||
message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
|
||||
|
@@ -216,39 +216,39 @@ if (BUILD_SHARED_LIBS)
|
||||
file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES ${TK_DLLS} DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (FILES ${TK_DLLS} DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}i")
|
||||
DESTINATION "${INSTALL_DIR_BIN}i")
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
else()
|
||||
get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}/")
|
||||
DESTINATION "${INSTALL_DIR_LIB}/")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}/i")
|
||||
DESTINATION "${INSTALL_DIR_LIB}/i")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}d")
|
||||
DESTINATION "${INSTALL_DIR_LIB}d")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (TCL_TCLSH_VERSION)
|
||||
# tk is required to install in lib folder (without)
|
||||
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}")
|
||||
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR_LIB}")
|
||||
else()
|
||||
message (STATUS "\nWarning: tkX.X subdir won't be copyied during the installation process.")
|
||||
message (STATUS "Try seeking tk within another folder by changing 3RDPARTY_TK_DIR variable.")
|
||||
|
@@ -18,6 +18,8 @@ set (BUILD_YACCLEX_DESCR
|
||||
ExprIntrp functionality are generated automatically with Flex/Bison. Checking this options
|
||||
leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files")
|
||||
|
||||
set (BUILD_RESOURCES_DESCR "Enables regeneration of OCCT resource files")
|
||||
|
||||
set (BUILD_WITH_DEBUG_DESCR
|
||||
"Enables extended messages of many OCCT algorithms, usually printed to cout.
|
||||
These include messages on internal errors and special cases encountered, timing etc.
|
||||
@@ -158,10 +160,5 @@ set (USE_D3D_DESCR "Indicates whether optional Direct3D wrapper in OCCT visualiz
|
||||
|
||||
macro (BUILD_MODULE MODULE_NAME)
|
||||
set (ENABLE_MODULE TRUE)
|
||||
set (OCCT_MODULES_FOR_UWP FoundationClasses ModelingAlgorithms ModelingData DataExchange Visualization)
|
||||
list (FIND OCCT_MODULES_FOR_UWP ${OCCT_MODULE} CAN_BE_USED_IN_UWP)
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" AND CAN_BE_USED_IN_UWP EQUAL -1)
|
||||
set (ENABLE_MODULE FALSE)
|
||||
endif()
|
||||
set (BUILD_MODULE_${MODULE_NAME} ${ENABLE_MODULE} CACHE BOOL "${BUILD_MODULE_${MODULE_NAME}_DESCR}")
|
||||
endmacro()
|
||||
|
@@ -70,7 +70,7 @@ proc gendoc {args} {
|
||||
set DOCLABEL ""
|
||||
set VERB_MODE "NO"
|
||||
set SEARCH_MODE "none"
|
||||
set MATHJAX_LOCATION "http://cdn.mathjax.org/mathjax/latest"
|
||||
set MATHJAX_LOCATION "https://cdn.mathjax.org/mathjax/latest"
|
||||
set mathjax_js_name "MathJax.js"
|
||||
set DOCTYPE_COMBO_FLAG 0
|
||||
set GENMODE_COMBO_FLAG 0
|
||||
|
293
adm/genproj.tcl
293
adm/genproj.tcl
@@ -108,9 +108,155 @@ proc osutils:findSrcSubPath {theSubPath} {
|
||||
return "$::THE_CASROOT/src/$theSubPath"
|
||||
}
|
||||
|
||||
# Auxiliary tool comparing content of two files line-by-line.
|
||||
proc osutils:isEqualContent { theContent1 theContent2 } {
|
||||
set aLen1 [llength $theContent1]
|
||||
set aLen2 [llength $theContent2]
|
||||
if { $aLen1 != $aLen2 } {
|
||||
return false
|
||||
}
|
||||
|
||||
for {set aLineIter 0} {$aLineIter < $aLen1} {incr aLineIter} {
|
||||
set aLine1 [lindex $theContent1 $aLineIter]
|
||||
set aLine2 [lindex $theContent2 $aLineIter]
|
||||
if { $aLine1 != $aLine2 } {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
# Auxiliary function for writing new file content only if it has been actually changed
|
||||
# (e.g. to preserve file timestamp on no change).
|
||||
# Useful for automatically (re)generated files.
|
||||
proc osutils:writeTextFile { theFile theContent {theEol lf} } {
|
||||
if {[file exists "${theFile}"]} {
|
||||
set aFileOld [open "${theFile}" rb]
|
||||
fconfigure $aFileOld -translation crlf
|
||||
set aLineListOld [split [read $aFileOld] "\n"]
|
||||
close $aFileOld
|
||||
|
||||
# append empty line for proper comparison (which will be implicitly added by last puts below)
|
||||
set aContent $theContent
|
||||
lappend aContent ""
|
||||
if { [osutils:isEqualContent $aLineListOld $aContent] == true } {
|
||||
return false
|
||||
}
|
||||
|
||||
file delete -force "${theFile}"
|
||||
}
|
||||
|
||||
set anOutFile [open "$theFile" "w"]
|
||||
fconfigure $anOutFile -translation $theEol
|
||||
foreach aLine ${theContent} {
|
||||
puts $anOutFile "${aLine}"
|
||||
}
|
||||
close $anOutFile
|
||||
return true
|
||||
}
|
||||
|
||||
# Function re-generating header files for specified text resource
|
||||
proc genResources { theResource } {
|
||||
global path
|
||||
|
||||
set aResFileList {}
|
||||
set aResourceAbsPath [file normalize "${path}/src/${theResource}"]
|
||||
set aResourceDirectory ""
|
||||
set isResDirectory false
|
||||
|
||||
if {[file isdirectory "${aResourceAbsPath}"]} {
|
||||
if {[file exists "${aResourceAbsPath}/FILES"]} {
|
||||
set aFilesFile [open "${aResourceAbsPath}/FILES" rb]
|
||||
set aResFileList [split [read $aFilesFile] "\n"]
|
||||
close $aFilesFile
|
||||
}
|
||||
set aResFileList [lsearch -inline -all -not -exact $aResFileList ""]
|
||||
set aResourceDirectory "${theResource}"
|
||||
set isResDirectory true
|
||||
} else {
|
||||
set aResourceName [file tail "${theResource}"]
|
||||
lappend aResFileList "res:::${aResourceName}"
|
||||
set aResourceDirectory [file dirname "${theResource}"]
|
||||
}
|
||||
|
||||
foreach aResFileIter ${aResFileList} {
|
||||
if {![regexp {^[^:]+:::(.+)} "${aResFileIter}" dump aResFileIter]} {
|
||||
continue
|
||||
}
|
||||
|
||||
set aResFileName [file tail "${aResFileIter}"]
|
||||
regsub -all {\.} "${aResFileName}" {_} aResFileName
|
||||
set aHeaderFileName "${aResourceDirectory}_${aResFileName}.pxx"
|
||||
if { $isResDirectory == true && [lsearch $aResFileList $aHeaderFileName] == -1 } {
|
||||
continue
|
||||
}
|
||||
|
||||
# generate
|
||||
set aContent {}
|
||||
lappend aContent "// This file has been automatically generated from resource file src/${aResourceDirectory}/${aResFileIter}"
|
||||
lappend aContent ""
|
||||
|
||||
# generate necessary structures
|
||||
set aLineList {}
|
||||
if {[file exists "${path}/src/${aResourceDirectory}/${aResFileIter}"]} {
|
||||
set anInputFile [open "${path}/src/${aResourceDirectory}/${aResFileIter}" rb]
|
||||
fconfigure $anInputFile -translation crlf
|
||||
set aLineList [split [read $anInputFile] "\n"]
|
||||
close $anInputFile
|
||||
}
|
||||
|
||||
# drop empty trailing line
|
||||
set anEndOfFile ""
|
||||
if { [lindex $aLineList end] == "" } {
|
||||
set aLineList [lreplace $aLineList end end]
|
||||
set anEndOfFile "\\n"
|
||||
}
|
||||
|
||||
lappend aContent "static const char ${aResourceDirectory}_${aResFileName}\[\] ="
|
||||
set aNbLines [llength $aLineList]
|
||||
set aLastLine [expr $aNbLines - 1]
|
||||
for {set aLineIter 0} {$aLineIter < $aNbLines} {incr aLineIter} {
|
||||
set aLine [lindex $aLineList $aLineIter]
|
||||
regsub -all {\"} "${aLine}" {\\"} aLine
|
||||
if { $aLineIter == $aLastLine } {
|
||||
lappend aContent " \"${aLine}${anEndOfFile}\";"
|
||||
} else {
|
||||
lappend aContent " \"${aLine}\\n\""
|
||||
}
|
||||
}
|
||||
|
||||
# Save generated content to header file
|
||||
set aHeaderFilePath "${path}/src/${aResourceDirectory}/${aHeaderFileName}"
|
||||
if { [osutils:writeTextFile $aHeaderFilePath $aContent] == true } {
|
||||
puts "Generating header file from resource file: ${path}/src/${aResourceDirectory}/${aResFileIter}"
|
||||
} else {
|
||||
#puts "Header file from resource ${path}/src/${aResourceDirectory}/${aResFileIter} is up-to-date"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Function re-generating header files for all text resources
|
||||
proc genAllResources {} {
|
||||
global path
|
||||
set aCasRoot [file normalize $path]
|
||||
if {![file exists "$aCasRoot/adm/RESOURCES"]} {
|
||||
puts "OCCT directory is not defined correctly: $aCasRoot"
|
||||
return
|
||||
}
|
||||
|
||||
set aFileResources [open "$aCasRoot/adm/RESOURCES" rb]
|
||||
set anAdmResources [split [read $aFileResources] "\r\n"]
|
||||
close $aFileResources
|
||||
set anAdmResources [lsearch -inline -all -not -exact $anAdmResources ""]
|
||||
|
||||
foreach line $anAdmResources {
|
||||
genResources "${line}"
|
||||
}
|
||||
}
|
||||
|
||||
# Wrapper-function to generate VS project files
|
||||
proc genproj {theIDE args} {
|
||||
set aSupportedIDEs { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "xcd" }
|
||||
set aSupportedIDEs { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc14-uwp" "cbp" "xcd"}
|
||||
set aSupportedPlatforms { "wnt" "lin" "mac" "ios" "qnx" }
|
||||
set isHelpRequire false
|
||||
|
||||
@@ -159,14 +305,15 @@ proc genproj {theIDE args} {
|
||||
puts "usage: genproj IDE \[Platform\] \[-static\] \[-h|-help|--help\]
|
||||
|
||||
IDE must be one of:
|
||||
vc8 - Visual Studio 2005
|
||||
vc9 - Visual Studio 2008
|
||||
vc10 - Visual Studio 2010
|
||||
vc11 - Visual Studio 2012
|
||||
vc12 - Visual Studio 2013
|
||||
vc14 - Visual Studio 2015
|
||||
cbp - CodeBlocks
|
||||
xcd - XCode
|
||||
vc8 - Visual Studio 2005
|
||||
vc9 - Visual Studio 2008
|
||||
vc10 - Visual Studio 2010
|
||||
vc11 - Visual Studio 2012
|
||||
vc12 - Visual Studio 2013
|
||||
vc14 - Visual Studio 2015
|
||||
vc14-uwp - Visual Studio 2015 for Universal Windows Platform project
|
||||
cbp - CodeBlocks
|
||||
xcd - XCode
|
||||
|
||||
Platform (optional, only for CodeBlocks and XCode):
|
||||
wnt - Windows
|
||||
@@ -193,6 +340,7 @@ proc genproj {theIDE args} {
|
||||
OS:MKPRC "$anAdmPath" "$theIDE" "$aLibType" "$aPlatform" "$aCmpl"
|
||||
|
||||
genprojbat "$theIDE" $aPlatform
|
||||
genAllResources
|
||||
}
|
||||
|
||||
proc genprojbat {theIDE thePlatform} {
|
||||
@@ -223,7 +371,7 @@ proc genprojbat {theIDE thePlatform} {
|
||||
file copy -force -- "$::THE_CASROOT/adm/templates/draw.${aTargetPlatformExt}" "$::path/draw.${aTargetPlatformExt}"
|
||||
}
|
||||
|
||||
if {[regexp {(vc)[0-9]*$} $theIDE] == 1} {
|
||||
if {[regexp {(vc)[0-9]*$} $theIDE] == 1 || [regexp {(vc)[0-9]*-uwp$} $theIDE] == 1} {
|
||||
file copy -force -- "$::THE_CASROOT/adm/templates/msvc.bat" "$::path/msvc.bat"
|
||||
} else {
|
||||
switch -exact -- "$theIDE" {
|
||||
@@ -266,7 +414,7 @@ proc OS:MKPRC { theOutDir theIDE theLibType thePlatform theCmpl } {
|
||||
|
||||
# Create output directory
|
||||
set aWokStation "$thePlatform"
|
||||
if { [lsearch -exact {vc7 vc8 vc9 vc10 vc11 vc12 vc14} $theIDE] != -1 } {
|
||||
if { [lsearch -exact {vc7 vc8 vc9 vc10 vc11 vc12 vc14 vc14-uwp} $theIDE] != -1 } {
|
||||
set aWokStation "msvc"
|
||||
}
|
||||
|
||||
@@ -294,6 +442,14 @@ proc OS:MKPRC { theOutDir theIDE theLibType thePlatform theCmpl } {
|
||||
set aModules [osutils:juststation $goaway $aModules]
|
||||
}
|
||||
|
||||
# Draw module is turned off due to it is not supported on UWP
|
||||
if { [regexp {(vc)[0-9]*-uwp$} $theIDE] == 1 } {
|
||||
set aDrawIndex [lsearch -exact ${aModules} "Draw"]
|
||||
if { ${aDrawIndex} != -1 } {
|
||||
set aModules [lreplace ${aModules} ${aDrawIndex} ${aDrawIndex}]
|
||||
}
|
||||
}
|
||||
|
||||
# generate one solution for all projects if complete OS or VAS is processed
|
||||
set anAllSolution "OCCT"
|
||||
|
||||
@@ -318,12 +474,13 @@ proc OS:MKPRC { theOutDir theIDE theLibType thePlatform theCmpl } {
|
||||
"vc7" -
|
||||
"vc8" -
|
||||
"vc9" -
|
||||
"vc10" -
|
||||
"vc11" -
|
||||
"vc12" -
|
||||
"vc14" { OS:MKVC $anOutDir $aModules $anAllSolution $theIDE }
|
||||
"cbp" { OS:MKCBP $anOutDir $aModules $anAllSolution $thePlatform $theCmpl }
|
||||
"xcd" {
|
||||
"vc10" -
|
||||
"vc11" -
|
||||
"vc12" -
|
||||
"vc14" -
|
||||
"vc14-uwp" { OS:MKVC $anOutDir $aModules $anAllSolution $theIDE }
|
||||
"cbp" { OS:MKCBP $anOutDir $aModules $anAllSolution $thePlatform $theCmpl }
|
||||
"xcd" {
|
||||
set ::THE_GUIDS_LIST($::aTKNullKey) "000000000000000000000000"
|
||||
OS:MKXCD $anOutDir $aModules $anAllSolution $theLibType $thePlatform
|
||||
}
|
||||
@@ -676,7 +833,7 @@ proc osutils:collectinc {theModules theIncPath} {
|
||||
foreach aHeaderFile [concat [glob -nocomplain -dir $aCasRoot/src/$anUnit "*.\[hgl\]xx"] $aHFiles] {
|
||||
set aHeaderFileName [file tail $aHeaderFile]
|
||||
|
||||
regsub -all -- {@OCCT_HEADER_FILE@} $aHeaderTmpl "$aFromBuildIncToSrcPath/$anUnit/$aHeaderFileName" aShortCutHeaderFileContent
|
||||
regsub -all -- {@OCCT_HEADER_FILE_CONTENT@} $aHeaderTmpl "#include \"$aFromBuildIncToSrcPath/$anUnit/$aHeaderFileName\"" aShortCutHeaderFileContent
|
||||
|
||||
if {[file exists "$theIncPath/$aHeaderFileName"] && [file readable "$theIncPath/$aHeaderFileName"]} {
|
||||
set fp [open "$theIncPath/$aHeaderFileName" r]
|
||||
@@ -760,7 +917,7 @@ proc osutils:vcsolution:header { vcversion } {
|
||||
append var \
|
||||
"Microsoft Visual Studio Solution File, Format Version 13.00\n" \
|
||||
"# Visual Studio 2013\n"
|
||||
} elseif { "$vcversion" == "vc14" } {
|
||||
} elseif { "$vcversion" == "vc14" || "$vcversion" == "vc14-uwp"} {
|
||||
append var \
|
||||
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
|
||||
"# Visual Studio 14\n"
|
||||
@@ -997,19 +1154,41 @@ proc osutils:vcproj:readtemplate {theVcVer isexec} {
|
||||
set aVerExt "v${aVerExt}0"
|
||||
set aCmpl32 ""
|
||||
set aCmpl64 ""
|
||||
set aCharSet "MultiByte"
|
||||
if { $isexec } {
|
||||
set anExt "${anExt}x"
|
||||
set what "$what executable"
|
||||
}
|
||||
if { "$theVcVer" == "vc10" } {
|
||||
# SSE2 is enabled by default in vc11+, but not in vc10 for 32-bit target
|
||||
set aCmpl32 "\n <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>"
|
||||
set aCmpl32 "<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>"
|
||||
}
|
||||
set aTmpl [osutils:readtemplate $anExt "MS VC++ project ($what)"]
|
||||
regsub -all -- {__VCVER__} $aTmpl $theVcVer aTmpl
|
||||
regsub -all -- {__VCVEREXT__} $aTmpl $aVerExt aTmpl
|
||||
regsub -all -- {__VCMPL32__} $aTmpl $aCmpl32 aTmpl
|
||||
regsub -all -- {__VCMPL64__} $aTmpl $aCmpl64 aTmpl
|
||||
|
||||
if { $theVcVer == "vc14-uwp" } {
|
||||
set aVerExt "v140"
|
||||
set UwpWinRt "<CompileAsWinRT>false</CompileAsWinRT>"
|
||||
foreach bitness {32 64} {
|
||||
set indent ""
|
||||
if {"[set aCmpl${bitness}]" != ""} {
|
||||
set indent "\n "
|
||||
}
|
||||
set aCmpl${bitness} "[set aCmpl${bitness}]${indent}${UwpWinRt}"
|
||||
}
|
||||
set aCharSet "Unicode"
|
||||
}
|
||||
|
||||
foreach bitness {32 64} {
|
||||
set format_template ""
|
||||
if {"[set aCmpl${bitness}]" == ""} {
|
||||
set format_template "\[\\r\\n\\s\]*"
|
||||
}
|
||||
regsub -all -- "${format_template}__VCMPL${bitness}__" $aTmpl "[set aCmpl${bitness}]" aTmpl
|
||||
}
|
||||
|
||||
regsub -all -- {__VCVER__} $aTmpl $theVcVer aTmpl
|
||||
regsub -all -- {__VCVEREXT__} $aTmpl $aVerExt aTmpl
|
||||
regsub -all -- {__VCCHARSET__} $aTmpl $aCharSet aTmpl
|
||||
return $aTmpl
|
||||
}
|
||||
|
||||
@@ -1109,7 +1288,6 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
|
||||
if { "$::HAVE_GLES2" == "true" } {
|
||||
set aLibsMap(CSF_OpenGlLibs) "libEGL libGLESv2"
|
||||
}
|
||||
set aLibsMap(CSF_winspool) "Winspool"
|
||||
set aLibsMap(CSF_psapi) "Psapi"
|
||||
set aLibsMap(CSF_d3d9) "d3d9"
|
||||
|
||||
@@ -1454,7 +1632,14 @@ proc osutils:vcproj { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {}
|
||||
}
|
||||
regsub -all -- {__PROJECT_GUID__} $theProjTmpl $aGuidsMap($theToolKit) theProjTmpl
|
||||
|
||||
set theProjTmpl [osutils:uwp:proj ${theVcVer} ${theProjTmpl}]
|
||||
|
||||
set aUsedLibs [list]
|
||||
|
||||
if { "$theVcVer" == "vc14-uwp" } {
|
||||
lappend aUsedLibs "WindowsApp.lib"
|
||||
}
|
||||
|
||||
foreach tkx [osutils:commonUsedTK $theToolKit] {
|
||||
lappend aUsedLibs "${tkx}.lib"
|
||||
}
|
||||
@@ -3081,3 +3266,61 @@ proc osutils:xcdx { theOutDir theExecutable theGuidsMap } {
|
||||
puts $aPlistFile $aPlistTmpl
|
||||
close $aPlistFile
|
||||
}
|
||||
|
||||
# Returns available Windows SDKs versions
|
||||
proc osutils:sdk { theSdkMajorVer {isQuietMode false} {theSdkDirectories {}} } {
|
||||
if { ![llength ${theSdkDirectories}] } {
|
||||
foreach anEnvVar { "ProgramFiles" "ProgramFiles\(x86\)" "ProgramW6432" } {
|
||||
if {[ info exists ::env(${anEnvVar}) ]} {
|
||||
lappend theSdkDirectories "$::env(${anEnvVar})/Windows Kits/${theSdkMajorVer}/Include"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set sdk_versions {}
|
||||
foreach sdk_dir ${theSdkDirectories} {
|
||||
if { [file isdirectory ${sdk_dir}] } {
|
||||
lappend sdk_versions [glob -tails -directory "${sdk_dir}" -type d *]
|
||||
}
|
||||
}
|
||||
|
||||
if {![llength ${sdk_versions}] && !${isQuietMode}} {
|
||||
error "Error : Could not find Windows SDK ${theSdkMajorVer}"
|
||||
}
|
||||
|
||||
return [join [lsort -unique ${sdk_versions}] " "]
|
||||
}
|
||||
|
||||
# Generate global properties to Visual Studio project file for UWP solution
|
||||
proc osutils:uwp:proj { theVcVer theProjTmpl } {
|
||||
|
||||
set uwp_properties ""
|
||||
set uwp_generate_metadata ""
|
||||
set uwp_app_container ""
|
||||
|
||||
set format_template ""
|
||||
|
||||
if { ${theVcVer} == "vc14-uwp" } {
|
||||
set sdk_versions [osutils:sdk 10]
|
||||
set sdk_max_ver [lindex ${sdk_versions} end]
|
||||
|
||||
set uwp_properties "<DefaultLanguage>en-US</DefaultLanguage>\n \
|
||||
<ApplicationType>Windows Store</ApplicationType>\n \
|
||||
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>\n \
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>\n \
|
||||
<AppContainerApplication>true</AppContainerApplication>\n \
|
||||
<WindowsTargetPlatformVersion>${sdk_max_ver}</WindowsTargetPlatformVersion>\n \
|
||||
<WindowsTargetPlatformMinVersion>${sdk_max_ver}</WindowsTargetPlatformMinVersion>"
|
||||
|
||||
set uwp_generate_metadata "<GenerateWindowsMetadata>false</GenerateWindowsMetadata>"
|
||||
|
||||
regsub -all -- {[\r\n\s]*<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>} ${theProjTmpl} "" theProjTmpl
|
||||
} else {
|
||||
set format_template "\[\\r\\n\\s\]*"
|
||||
}
|
||||
|
||||
regsub -all -- "${format_template}__UWP_PROPERTIES__" ${theProjTmpl} "${uwp_properties}" theProjTmpl
|
||||
regsub -all -- "${format_template}__UWP_GENERATE_METADATA__" ${theProjTmpl} "${uwp_generate_metadata}" theProjTmpl
|
||||
|
||||
return ${theProjTmpl}
|
||||
}
|
||||
|
@@ -17,18 +17,18 @@ if /I "%VCVER%" == "@COMPILER@" (
|
||||
set "TCL_VERSION_WITH_DOT=@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
set "TK_VERSION_WITH_DOT=@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
|
||||
set "CSF_OCCTBinPath=@INSTALL_DIR@/@INSTALL_DIR_BIN@%3"
|
||||
set "CSF_OCCTLibPath=@INSTALL_DIR@/@INSTALL_DIR_LIB@%3"
|
||||
set "CSF_OCCTBinPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_BIN@%3"
|
||||
set "CSF_OCCTLibPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_LIB@%3"
|
||||
|
||||
set "CSF_OCCTIncludePath=@INSTALL_DIR@/@INSTALL_DIR_INCLUDE@"
|
||||
set "CSF_OCCTResourcePath=@INSTALL_DIR@/@INSTALL_DIR_RESOURCE@"
|
||||
set "CSF_OCCTDataPath=@INSTALL_DIR@/@INSTALL_DIR_DATA@"
|
||||
set "CSF_OCCTSamplesPath=@INSTALL_DIR@/@INSTALL_DIR_SAMPLES@"
|
||||
set "CSF_OCCTTestsPath=@INSTALL_DIR@/@INSTALL_DIR_TESTS@"
|
||||
set "CSF_OCCTDocPath=@INSTALL_DIR@/@INSTALL_DIR_DOC@"
|
||||
set "CSF_OCCTIncludePath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_INCLUDE@"
|
||||
set "CSF_OCCTResourcePath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_RESOURCE@"
|
||||
set "CSF_OCCTDataPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_DATA@"
|
||||
set "CSF_OCCTSamplesPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SAMPLES@"
|
||||
set "CSF_OCCTTestsPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_TESTS@"
|
||||
set "CSF_OCCTDocPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_DOC@"
|
||||
|
||||
rem for compatability with external application using CASROOT
|
||||
set "CASROOT=@INSTALL_DIR@"
|
||||
set "CASROOT=@INSTALL_DIR_ABSOLUTE@"
|
||||
)
|
||||
)
|
||||
|
||||
|
@@ -13,17 +13,17 @@ if [ "$1" == "@BIN_LETTER@" ]; then
|
||||
export TCL_VERSION_WITH_DOT="@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
export TK_VERSION_WITH_DOT="@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
|
||||
export CSF_OCCTBinPath="@INSTALL_DIR@/@INSTALL_DIR_BIN@"
|
||||
export CSF_OCCTLibPath="@INSTALL_DIR@/@INSTALL_DIR_LIB@"
|
||||
export CSF_OCCTIncludePath="@INSTALL_DIR@/@INSTALL_DIR_INCLUDE@"
|
||||
export CSF_OCCTResourcePath="@INSTALL_DIR@/@INSTALL_DIR_RESOURCE@"
|
||||
export CSF_OCCTDataPath="@INSTALL_DIR@/@INSTALL_DIR_DATA@"
|
||||
export CSF_OCCTSamplesPath="@INSTALL_DIR@/@INSTALL_DIR_SAMPLES@"
|
||||
export CSF_OCCTTestsPath="@INSTALL_DIR@/@INSTALL_DIR_TESTS@"
|
||||
export CSF_OCCTDocPath="@INSTALL_DIR@/@INSTALL_DIR_DOC@"
|
||||
export CSF_OCCTBinPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_BIN@"
|
||||
export CSF_OCCTLibPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_LIB@"
|
||||
export CSF_OCCTIncludePath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_INCLUDE@"
|
||||
export CSF_OCCTResourcePath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_RESOURCE@"
|
||||
export CSF_OCCTDataPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_DATA@"
|
||||
export CSF_OCCTSamplesPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SAMPLES@"
|
||||
export CSF_OCCTTestsPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_TESTS@"
|
||||
export CSF_OCCTDocPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_DOC@"
|
||||
|
||||
# for compatability with external application using CASROOT
|
||||
export CASROOT="@INSTALL_DIR@"
|
||||
export CASROOT="@INSTALL_DIR_ABSOLUTE@"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@@ -137,8 +137,6 @@ set "CSF_PluginDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_XCAFDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_TObjDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_StandardLiteDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_UnitsLexicon=%CSF_OCCTResourcePath%\UnitsAPI\Lexi_Expr.dat"
|
||||
set "CSF_UnitsDefinition=%CSF_OCCTResourcePath%\UnitsAPI\Units.dat"
|
||||
set "CSF_IGESDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
|
||||
set "CSF_STEPDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
|
||||
set "CSF_XmlOcafResource=%CSF_OCCTResourcePath%\XmlOcafResource"
|
||||
|
@@ -58,8 +58,6 @@ set "CSF_PluginDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_XCAFDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_TObjDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_StandardLiteDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_UnitsLexicon=%CSF_OCCTResourcePath%\UnitsAPI\Lexi_Expr.dat"
|
||||
set "CSF_UnitsDefinition=%CSF_OCCTResourcePath%\UnitsAPI\Units.dat"
|
||||
set "CSF_IGESDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
|
||||
set "CSF_STEPDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
|
||||
set "CSF_XmlOcafResource=%CSF_OCCTResourcePath%\XmlOcafResource"
|
||||
|
@@ -4,7 +4,7 @@ if exist "%~dp0custom.bat" (
|
||||
call "%~dp0custom.bat" %1 %2 %3
|
||||
)
|
||||
|
||||
call "@INSTALL_DIR@\@INSTALL_DIR_SCRIPT@\env.bat" %1 %2 %3
|
||||
call "@INSTALL_DIR_ABSOLUTE@\@INSTALL_DIR_SCRIPT@\env.bat" %1 %2 %3
|
||||
|
||||
set "BIN_DIR=win%ARCH%\%VCVER%\bind"
|
||||
set "LIB_DIR=win%ARCH%\%VCVER%\libd"
|
||||
|
@@ -6,8 +6,8 @@ if [ -e "custom.sh" ]; then
|
||||
source "custom.sh";
|
||||
fi
|
||||
|
||||
if [ -e "@INSTALL_DIR@/@INSTALL_DIR_SCRIPT@/env.sh" ]; then
|
||||
source "@INSTALL_DIR@/@INSTALL_DIR_SCRIPT@/env.sh";
|
||||
if [ -e "@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SCRIPT@/env.sh" ]; then
|
||||
source "@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SCRIPT@/env.sh";
|
||||
fi
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
|
@@ -217,8 +217,6 @@ export CSF_PluginDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_XCAFDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_TObjDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_StandardLiteDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_UnitsLexicon="${CASROOT}/src/UnitsAPI/Lexi_Expr.dat"
|
||||
export CSF_UnitsDefinition="${CASROOT}/src/UnitsAPI/Units.dat"
|
||||
export CSF_IGESDefaults="${CASROOT}/src/XSTEPResource"
|
||||
export CSF_STEPDefaults="${CASROOT}/src/XSTEPResource"
|
||||
export CSF_XmlOcafResource="${CASROOT}/src/XmlOcafResource"
|
||||
|
@@ -114,8 +114,6 @@ export CSF_PluginDefaults="${CSF_OCCTResourcePath}/StdResource"
|
||||
export CSF_XCAFDefaults="${CSF_OCCTResourcePath}/StdResource"
|
||||
export CSF_TObjDefaults="${CSF_OCCTResourcePath}/StdResource"
|
||||
export CSF_StandardLiteDefaults="${CSF_OCCTResourcePath}/StdResource"
|
||||
export CSF_UnitsLexicon="${CSF_OCCTResourcePath}/UnitsAPI/Lexi_Expr.dat"
|
||||
export CSF_UnitsDefinition="${CSF_OCCTResourcePath}/UnitsAPI/Units.dat"
|
||||
export CSF_IGESDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
|
||||
export CSF_STEPDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
|
||||
export CSF_XmlOcafResource="${CSF_OCCTResourcePath}/XmlOcafResource"
|
||||
|
@@ -1 +1 @@
|
||||
#include "@OCCT_HEADER_FILE@"
|
||||
@OCCT_HEADER_FILE_CONTENT@
|
||||
|
@@ -28,6 +28,8 @@ if /I "%VCVER%" == "vc8" (
|
||||
set "VisualStudioExpressName=WDExpress"
|
||||
) else if /I "%VCVER%" == "vc14" (
|
||||
set "DevEnvDir=%VS140COMNTOOLS%..\IDE"
|
||||
) else if /I "%VCVER%" == "vc14-uwp" (
|
||||
set "DevEnvDir=%VS140COMNTOOLS%..\IDE"
|
||||
) else (
|
||||
echo Error: wrong VS identifier
|
||||
exit /B
|
||||
|
@@ -20,23 +20,28 @@
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>__PROJECT_GUID__</ProjectGuid>
|
||||
__UWP_PROPERTIES__
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>__VCVEREXT__</PlatformToolset>
|
||||
<CharacterSet>__VCCHARSET__</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>__VCVEREXT__</PlatformToolset>
|
||||
<CharacterSet>__VCCHARSET__</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>__VCVEREXT__</PlatformToolset>
|
||||
<CharacterSet>__VCCHARSET__</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>__VCVEREXT__</PlatformToolset>
|
||||
<CharacterSet>__VCCHARSET__</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -96,7 +101,9 @@
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
__VCMPL32__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -111,6 +118,7 @@
|
||||
<ProgramDatabaseFile>.\..\..\..\win32\__VCVER__\bin\__TKNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win32\__VCVER__\lib\__TKNAM__.lib</ImportLibrary>
|
||||
__UWP_GENERATE_METADATA__
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@@ -141,7 +149,9 @@
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
__VCMPL32__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -156,6 +166,7 @@
|
||||
<ProgramDatabaseFile>..\..\..\win32\__VCVER__\bind\__TKNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win32\__VCVER__\libd\__TKNAM__.lib</ImportLibrary>
|
||||
__UWP_GENERATE_METADATA__
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -185,7 +196,9 @@
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
__VCMPL64__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -200,6 +213,7 @@
|
||||
<ProgramDatabaseFile>.\..\..\..\win64\__VCVER__\bin\__TKNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win64\__VCVER__\lib\__TKNAM__.lib</ImportLibrary>
|
||||
__UWP_GENERATE_METADATA__
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@@ -230,7 +244,9 @@
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
__VCMPL64__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -245,6 +261,7 @@
|
||||
<ProgramDatabaseFile>..\..\..\win64\__VCVER__\bind\__TKNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win64\__VCVER__\libd\__TKNAM__.lib</ImportLibrary>
|
||||
__UWP_GENERATE_METADATA__
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
1131
data/occ/Ball.brep
Normal file
1131
data/occ/Ball.brep
Normal file
File diff suppressed because one or more lines are too long
@@ -35,7 +35,7 @@ endif()
|
||||
# configuration file for doxygen
|
||||
set (OCCT_CONFIG_FOR_DOXYGEN "${OCCT_GENERATED_DOC_DIR}/occt.cfg")
|
||||
|
||||
set (3RDPARTY_MATHJAX_RELATIVE_PATH "http://cdn.mathjax.org/mathjax/latest")
|
||||
set (3RDPARTY_MATHJAX_RELATIVE_PATH "https://cdn.mathjax.org/mathjax/latest")
|
||||
|
||||
configure_file ("${OCCT_OVERVIEW_RESOURCE_DIR}/occt_ug_html.doxyfile" "${OCCT_CONFIG_FOR_DOXYGEN}" COPYONLY)
|
||||
|
||||
@@ -92,11 +92,22 @@ file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nMATHJAX_RELPATH = ${3RDPARTY_M
|
||||
# Copy index file to provide fast access to HTML documentation
|
||||
file(COPY "${OCCT_OVERVIEW_RESOURCE_DIR}/index.html" DESTINATION "${OCCT_GENERATED_OVERVIEW_DIR}")
|
||||
|
||||
add_custom_target (${PROJECT_NAME}
|
||||
COMMAND ${3RDPARTY_DOXYGEN_EXECUTABLE} ${OCCT_CONFIG_FOR_DOXYGEN}
|
||||
WORKING_DIRECTORY ${OCCT_GENERATED_DOC_DIR}
|
||||
COMMENT "Generating OCCT overview documentation with Doxygen"
|
||||
SOURCES ${OCCT_ARTICLES_ABSPATH}
|
||||
VERBATIM)
|
||||
# get relative paths to documentation source files
|
||||
file (GLOB_RECURSE OCCT_OVERVIEW_FILES "${OCCT_OVERVIEW_DIR}/*")
|
||||
|
||||
add_custom_command(OUTPUT "${OCCT_GENERATED_DOC_DIR}/overview/html/occt_logo.png"
|
||||
COMMAND ${3RDPARTY_DOXYGEN_EXECUTABLE} ${OCCT_CONFIG_FOR_DOXYGEN}
|
||||
DEPENDS ${OCCT_OVERVIEW_FILES}
|
||||
WORKING_DIRECTORY ${OCCT_GENERATED_DOC_DIR}
|
||||
COMMENT "Generating OCCT overview documentation with Doxygen"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(${PROJECT_NAME} ALL
|
||||
DEPENDS "${OCCT_GENERATED_DOC_DIR}/overview/html/occt_logo.png" ${OCCT_OVERVIEW_FILES}
|
||||
SOURCES ${OCCT_ARTICLES_ABSPATH}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# Create Documentation folder in solution view
|
||||
set_property (TARGET ${PROJECT_NAME} PROPERTY FOLDER "Documentation")
|
||||
|
@@ -5,26 +5,26 @@ Building with CMake {#occt_dev_guides__building_cmake}
|
||||
|
||||
@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*.
|
||||
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*.
|
||||
|
||||
@note Comparing to the previous (6.x) releases of Open CASCADE Technology, OCCT 7.0 comes with a complete set of CMake scripts and projects, so that there is no need to use WOK anymore. Moreover, CMake gives you a powerful configuration tool which allows to control many aspects of OCCT deployment. At the same time this tool is quite intuitive which is a significant advantage over the legacy WOK utilities.
|
||||
@note Compared to the previous (6.x) releases of Open CASCADE Technology, OCCT 7.x has a complete set of CMake scripts and projects, so that there is no need to use WOK anymore. Moreover, CMake gives you a powerful configuration tool, which allows to control many aspects of OCCT deployment. At the same time this tool is quite intuitive, which is a significant advantage over the legacy WOK utilities.
|
||||
|
||||
Here we describe the build procedure on example of Windows platform with Visual Studio 2010.
|
||||
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 the 3-rd party products that you are going to use with OCCT; see @ref occt_dev_guides__building.
|
||||
@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.
|
||||
|
||||
@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).
|
||||
|
||||
For unexpericnced users we recommend to start with *cmake-gui* -- cross-platform GUI tool provided by CMake on Windows, Mac and Linux.
|
||||
A command-line alternative, *ccmake* also can be used.
|
||||
For unexperienced users we recommend to start with *cmake-gui* -- a cross-platform GUI tool provided by CMake on Windows, Mac and Linux.
|
||||
A command-line alternative, *ccmake* can also be used.
|
||||
|
||||
CMake deals with three directories: source, build or binary and install.
|
||||
CMake deals with three directories: source, build or binary and installation.
|
||||
|
||||
* The source directory is where the sources of OCCT are located in your filesystem
|
||||
* The build or binary directory is where all the files created during CMake configuration and generation process will be located. The mentioned process will be described below.
|
||||
* The source directory is where the sources of OCCT are located in your file system;
|
||||
* The build or binary directory is where all files created during CMake configuration and generation process will be located. The mentioned process will be described below.
|
||||
* The installation directory is where binaries will be installed after building the *INSTALL* project that is created by CMake generation process, along with header files and resources required for OCCT use in applications.
|
||||
|
||||
The good practice is not to use the source directory as a build one.
|
||||
@@ -48,9 +48,9 @@ If the command-line tool is used, run the tool from the build directory with a s
|
||||
|
||||
Press *c* to configure.
|
||||
|
||||
All required actions in the configuration process will be described with using the GUI tool below.
|
||||
All actions required in the configuration process with the GUI tool will be described below.
|
||||
|
||||
If the gui-tool is used, run the tool without additional arguments and after that specify the source directory by clicking **Browse Source** and the build (binary) one by clicking **Browse Build**.
|
||||
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{/dev_guides/building/cmake/images/cmake_image001.png}
|
||||
|
||||
@@ -60,29 +60,29 @@ Once the source and build directories are selected, "Configure" button should be
|
||||
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image002.png}
|
||||
|
||||
To build OCCT with using Universal Windows Platform (UWP) specify path to toolchain file for cross-compiling <i>d:/occt/adm/templates/uwp.toolchain.config.cmake</i>.
|
||||
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>.
|
||||
|
||||
**Note**: Universal Windows Platform (UWP) is supported only on "Visual Studio 14 2015". File <i>d:/occt/samples/xaml/ReadMe.md</i> desribes building procedure of XAML (UWP) sample.
|
||||
**Note**: Universal Windows Platform (UWP) is supported only on "Visual Studio 14 2015". File <i>d:/occt/samples/xaml/ReadMe.md</i> describes the building procedure of XAML (UWP) sample.
|
||||
|
||||
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.
|
||||
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{/dev_guides/building/cmake/images/cmake_image003.png}
|
||||
|
||||
The error message provides an information about these variables. This message will appear after each pass of the process until all required variables are specified correctly.
|
||||
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.
|
||||
|
||||
The change of the state of some variables can lead to the appearance of new variables. The new variables appeared after the pass of the configuration process is notified with red color by CMake GUI tool.
|
||||
The change of the state of some variables can lead to the appearance of new variables. The new variables appeared after the pass of the configuration process are highlighted with red color by CMake GUI tool.
|
||||
|
||||
Note: There is "grouped" option which groups variables with a common prefix.
|
||||
Note: There is "grouped" option, which groups variables with a common prefix.
|
||||
|
||||
The following table enumerates the full list of environment variables used at configuration stage:
|
||||
The following table gives the full list of environment variables used at the configuration stage:
|
||||
|
||||
| Variable | Type | Purpose |
|
||||
|----------|------|---------|
|
||||
| CMAKE_BUILD_TYPE | String | Specifies the build type on single-configuration generators (sush as make). Possible values are Debug, Release and RelWithDebInfo |
|
||||
| USE_FREEIMAGE | Boolean flag | Indicates whether Freeimage product should be used in OCCT visualization module for support of popular graphics image formats (PNG, BMP etc) |
|
||||
| USE_GL2PS | Boolean flag | Indicates whether GL2PS product should be used in OCCT visualization module for support of vector image formats (PS, EPS etc) |
|
||||
| CMAKE_BUILD_TYPE | String | Specifies the build type on single-configuration generators (such as make). Possible values are Debug, Release and RelWithDebInfo |
|
||||
| USE_FREEIMAGE | Boolean flag | Indicates whether FreeImage product should be used in OCCT visualization module for support of popular graphics image formats (PNG, BMP, etc.) |
|
||||
| USE_GL2PS | Boolean flag | Indicates whether GL2PS product should be used in OCCT visualization module for support of vector image formats (PS, EPS, etc.) |
|
||||
| USE_TBB | Boolean flag | Indicates whether TBB 3rd party is used or not. TBB stands for Threading Building Blocks, the technology of Intel Corp, which comes with different mechanisms and patterns for injecting parallelism into your application. OCCT remains parallel even without TBB product |
|
||||
| USE_VTK | Boolean flag | Indicates whether VTK 3rd party is used or not. VTK stands for Visualization ToolKit, the technology of Kitware Inc intended for general-purpose scientific visualization. OCCT comes with a bridge between CAD data representation and VTK by means of its dedicated VIS component (VTK Integration Services). You may skip this 3rd party unless you are planning to use VTK visualization for OCCT geometry. The official documentation @ref occt_user_guides__vis for the details on VIS |
|
||||
| USE_VTK | Boolean flag | Indicates whether VTK 3rd party is used or not. VTK stands for Visualization ToolKit, the technology of Kitware Inc intended for general-purpose scientific visualization. OCCT comes with a bridge between CAD data representation and VTK by means of its dedicated VIS component (VTK Integration Services). You may skip this 3rd party unless you are planning to use VTK visualization for OCCT geometry. See the official documentation @ref occt_user_guides__vis for the details on VIS |
|
||||
| 3RDPARTY_DIR | Path | Defines the root directory where all required 3rd party products will be searched. Once you define this path it is very convenient to click "Configure" button in order to let CMake automatically detect all necessary products|
|
||||
| 3RDPARTY_FREETYPE_* | Path | Path to Freetype binaries |
|
||||
| 3RDPARTY_TCL_* 3RDPARTY_TK_* | Path | Path to Tcl/Tk binaries |
|
||||
@@ -91,20 +91,21 @@ The following table enumerates the full list of environment variables used at co
|
||||
| 3RDPARTY_TBB* | Path | Path to TBB binaries |
|
||||
| 3RDPARTY_VTK_* | Path | Path to VTK binaries |
|
||||
| BUILD_MODULE_<MODULE>| Boolean flag | Indicates whether the corresponding OCCT module should be built or not. It should be noted that some toolkits of a module can be built even if this module is not checked (this happens if some other modules depend on these toolkits). The main modules and their descriptions can be found in @ref user_guides |
|
||||
| BUILD_LIBRARY_TYPE | String | Specifies the type of library to be created. "Shared" libraries are linked dynamically and loaded at runtime. "Static" libraries are archives of object files for use when linking other targets |
|
||||
| BUILD_LIBRARY_TYPE | String | Specifies the type of library to be created. "Shared" libraries are linked dynamically and loaded at runtime. "Static" libraries are archives of object files used when linking other targets |
|
||||
| BUILD_ADDITIONAL_TOOLKITS | String | Semicolon-separated individual toolkits to include into build process. If you want to build some particular libraries (toolkits) only, then you may uncheck all modules in the corresponding *BUILD_MODUE_\<MODULE\>* options and provide the list of necessary libraries here. Of course, all dependencies will be resolved automatically |
|
||||
| BUILD_YACCLEX | Boolean flag | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this options leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
|
||||
| BUILD_YACCLEX | Boolean flag | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this option leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
|
||||
| BUILD_MODULE_MfcSamples | Boolean flag | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms |
|
||||
| BUILD_DOC_Overview | Boolean flag | Indicates whether OCCT overview documentation project should be created together with OCCT. It is not built together with OCCT. Checking this options leads to automatic search of Doxygen binaries. Building of it will be call Doxygen command to generate the documentation in HTML format |
|
||||
| BUILD_DOC_Overview | Boolean flag | Indicates whether OCCT overview documentation project should be created together with OCCT. It is not built together with OCCT. Checking this option leads to automatic search of Doxygen binaries. Its building calls Doxygen command to generate the documentation in HTML format |
|
||||
| BUILD_PATCH | Path | Points to the directory recognized as a "patch" for OCCT. If specified, the files from this directory take precedence over the corresponding native OCCT sources. This way you are able to introduce patches to Open CASCADE Technology not affecting the original source distribution |
|
||||
| BUILD_WITH_DEBUG | Boolean flag | Enables extended messages of many OCCT algorithms, usually printed to cout. These include messages on internal errors and special cases encountered, timing etc |
|
||||
| BUILD_WITH_DEBUG | Boolean flag | Enables extended messages of many OCCT algorithms, usually printed to cout. These include messages on internal errors and special cases encountered, timing, etc. |
|
||||
| CMAKE_CONFIGURATION_TYPES | String | Semicolon-separated CMake configurations |
|
||||
| INSTALL_DIR | Path | Points to the installation directory. INSTALL_DIR is synonym of CMAKE_INSTALL_PREFIX . User can specify both INSTALL_DIR or CMAKE_INSTALL_PREFIX |
|
||||
| INSTALL_DIR | Path | Points to the installation directory. *INSTALL_DIR* is a synonym of *CMAKE_INSTALL_PREFIX*. The user can specify both *INSTALL_DIR* or *CMAKE_INSTALL_PREFIX* |
|
||||
| INSTALL_DIR_BIN | Path | Relative path to the binaries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_BIN}) |
|
||||
| INSTALL_DIR_SCRIPT | Path | Relative path to the scripts installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}) |
|
||||
| INSTALL_DIR_LIB | Path | Relative path to the libraries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_LIB}) |
|
||||
| INSTALL_DIR_INCLUDE | Path | Relative path to the includes installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_INCLUDE}) |
|
||||
| INSTALL_DIR_RESOURCE | Path | Relative path to the resources installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}) |
|
||||
| INSTALL_DIR_LAYOUT | String | Defines the structure of OCCT files (binaries, resources, headers, etc.) for the install directory. Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout). If needed, the layout can be customized with INSTALL_DIR_* variables |
|
||||
| INSTALL_DIR_DATA | Path | Relative path to the data files installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DATA}) |
|
||||
| INSTALL_DIR_SAMPLES | Path | Relative path to the samples installation directory. Note that only "samples/tcl" folder will be installed. (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}) |
|
||||
| INSTALL_DIR_TESTS | Path | Relative path to the tests installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_TESTS}) |
|
||||
@@ -118,7 +119,7 @@ The following table enumerates the full list of environment variables used at co
|
||||
| INSTALL_TEST_CASES | Boolean flag | Indicates whether non-regression OCCT test scripts should be installed into the installation directory |
|
||||
| INSTALL_DOC_Overview | Boolean flag | Indicates whether OCCT overview documentation should be installed into the installation directory |
|
||||
|
||||
**Note:** In those CMake options defining paths only the forward slashes ("/") are acceptable.
|
||||
**Note:** Only the forward slashes ("/") are acceptable in the CMake options defining paths.
|
||||
|
||||
@section build_cmake_3rdparty 3rd party search mechanism
|
||||
|
||||
@@ -126,7 +127,7 @@ If *3RDPARTY_DIR* directory is defined, then required 3rd party binaries are sou
|
||||
|
||||
The procedure expects to find binary and header files of each 3rd party product in its own sub-directory: *bin*, *lib* and *include*.
|
||||
|
||||
The results of the search (achived on the next pass of the configuration process) are recorded in the corresponding variables:
|
||||
The results of the search (achieved on the next pass of the configuration process) are recorded in the corresponding variables:
|
||||
|
||||
* *3RDPARTY_\<PRODUCT\>_DIR* -- path to the 3rdparty directory (with directory name) (e.g. <i>D:/3rdparty/tcltk-86-32</i>)
|
||||
* *3RDPARTY_\<PRODUCT\>_LIBRARY_DIR* -- path to the directory containing a library (e.g. <i>D:/3rdparty/tcltk-86-32/lib</i>).
|
||||
|
@@ -248,7 +248,8 @@ Use of tabulation characters for indentation is disallowed.
|
||||
Punctuation rules follow the rules of the English language.
|
||||
* C/C++ reserved words, commas, colons and semicolons should be followed by a space character if they are not at the end of a line.
|
||||
* There should be no space characters after '(' and before ')'. Closing and opening brackets should be separated by a space character.
|
||||
* For better readability it is also recommended to surround conventional operators by a space character. See the following examples:
|
||||
* For better readability it is also recommended to surround conventional operators by a space character.
|
||||
Examples:
|
||||
|
||||
~~~~~{.cpp}
|
||||
while (true) // NOT: while( true ) ...
|
||||
@@ -261,6 +262,30 @@ for (anIter = 0; anIter < 10; ++anIter) // NOT: for (anIter=0;anIter<10;++anIter
|
||||
}
|
||||
~~~~~
|
||||
|
||||
### Declaration of pointers and references
|
||||
|
||||
In declarations of simple pointers and references put asterisk (*) or ampersand (&) right after the type without extra space.
|
||||
|
||||
Since declaration of several variables with mixed pointer types contrudicts this rule, it should be avoided. Instead, declare each variable independently with fully qualified type.
|
||||
|
||||
Examples:
|
||||
|
||||
~~~~~{.cpp}
|
||||
Standard_Integer *theVariable; // not recommended
|
||||
Standard_Integer * theVariable; // not recommended
|
||||
Standard_Integer* theVariable; // this is OK
|
||||
|
||||
Standard_Integer *&theVariable; // not recommended
|
||||
Standard_Integer *& theVariable; // not recommended
|
||||
Standard_Integer*& theVariable; // this is OK
|
||||
|
||||
Standard_Integer **theVariable; // not recommended
|
||||
Standard_Integer ** theVariable; // not recommended
|
||||
Standard_Integer** theVariable; // this is OK
|
||||
|
||||
Standard_Integer *theA, theB, **theC; // not recommended (declare each variable independently)
|
||||
~~~~~
|
||||
|
||||
### Separate logical blocks
|
||||
|
||||
Separate logical blocks of code with one blank line and comments.
|
||||
@@ -345,6 +370,25 @@ if (!theAlgo.IsNull()) // preferred
|
||||
|
||||
Having all code in the same line is less convenient for debugging.
|
||||
|
||||
### Comparison expressions with constants
|
||||
|
||||
In comparisons, put the variable (in the current context) on the left side and constant on the right side of expression.
|
||||
That is, the so called "Yoda style" is to be avoided.
|
||||
|
||||
~~~~~{.cpp}
|
||||
if (NULL != thePointer) // Yoda style, not recommended
|
||||
if (thePointer != NULL) // OK
|
||||
|
||||
if (34 < anIter) // Yoda style, not recommended
|
||||
if (anIter > 34) // OK
|
||||
|
||||
if (theNbValues >= anIter) // bad style (constant function argument vs. local variable)
|
||||
if (anIter <= theNbValues) // OK
|
||||
|
||||
if (THE_LIMIT == theValue) // bad style (global constant vs. variable)
|
||||
if (theValue == THE_LIMIT) // OK
|
||||
~~~~~
|
||||
|
||||
### Alignment
|
||||
|
||||
Use alignment wherever it enhances the readability. See the following example:
|
||||
|
@@ -58,7 +58,7 @@ for (Standard_Integer aGr = 1; aGr <= aLen; ++aGr)
|
||||
Porting of user applications from an earlier OCCT version to version 6.5.2 requires taking into account the following major changes:
|
||||
* Any code that has been generated by WOK from CDL generic classes *Tcollection_DataMap* and *Tcollection_IndexedDataMap* needs to be regenerated by WOK to take into account the change in the interface of these classes.
|
||||
* The enumerations *CDF_StoreStatus* and *CDF_RetrievableStatus* have been replaced by the enumerations *PCDM_StoreStatus* and *PCDM_ReaderStatus*. Correspondingly, the methods *Open, Save* and *SaveAs* of the class *TDocStd_Application* have changed their return value. Any code, which uses these enumerations, needs to be updated.
|
||||
* *BRepLib_MakeFace* has been modified to accept tolerance value for resolution of degenerated edges. This tolerance parameter has no default value to ensure that the client code takes care of passing a meaningful value, not just *Precision::Confusion*, so some porting overheads are expected.
|
||||
* *BRepLib_MakeFace* has been modified to receive tolerance value for resolution of degenerated edges. This tolerance parameter has no default value to ensure that the client code takes care of passing a meaningful value, not just *Precision::Confusion*, so some porting overheads are expected.
|
||||
* If the callback mechanism in call_togl_redraw function was used in the application code, it is necessary to revise it to take into account the new callback execution and provide a check of reason value of Aspect_GraphicCallbackStruct in callback methods to confirm that the callback code is executed at the right moment. Now the callbacks are executed before redrawing the underlayer, before redrawing the overlayer and at the end of redrawing. The information about the moment when the callback is invoked is provided with the reason value in form of an additional bit flag <i>(OCC_PRE_REDRAW, OCC_PRE_OVERLAY)</i>. The state of OpenGl changed in callback methods will not be restored automatically, which might lead to unwanted behavior in redrawing procedure.
|
||||
* The print method used in the application code might need to be revised to take into account the ability to choose between print algorithms: tile and stretch. The stretch algorithm will be selected by default during porting.
|
||||
* It is recommended to *BRepMesh_DiscretFactory* users, to check *BRepMesh_DiscretFactory::SetDefault()* return value to determine plugin availability / validity. *BRepMesh_DiscretFactory::Discret()* method now returns handle instead of pointer. The code should be updated in the following manner:
|
||||
@@ -82,7 +82,7 @@ Porting of user applications from an earlier OCCT version to version 6.5.3 requi
|
||||
* Method *HashCode()* has been removed from class *Standard_Transient*. It is advisable to use global function <i>HashCode()</i> for Handle objects instead.
|
||||
* Declaration of operators new/delete for classes has become consistent and is encapsulated in macros.
|
||||
* Memory management has been changed to use standard heap <i>(MMGT_OPT=0)</i> and reentrant mode <i>(MMGT_REENTRANT=1)</i> by default.
|
||||
* Map classes in *NCollection* package now accept one more argument defining a hash tool.
|
||||
* Map classes in *NCollection* package now receive one more argument defining a hash tool.
|
||||
|
||||
@section upgrade_654 Upgrade to OCCT 6.5.4
|
||||
|
||||
@@ -251,6 +251,7 @@ Porting of user applications from an earlier OCCT version to version 6.9.0 requi
|
||||
|
||||
3D Viewer now uses GLSL programs for managing frame buffer and stereoscopic output.
|
||||
For proper initialization, application should configure **CSF_ShadersDirectory** environment variable pointing to a folder with GLSL resources - files from folder **CASROOT**/src/Shaders.
|
||||
*Note that **CSF_ShadersDirectory** become optional since OCCT 7.1.0 release*.
|
||||
|
||||
@subsection upgrade_690_selection Changes in Selection
|
||||
|
||||
@@ -507,7 +508,7 @@ This will eliminate the need to include the header *A* in each source file where
|
||||
|
||||
#### Ambiguity of calls to overloaded functions
|
||||
|
||||
This issue appears in the compilers that do not support default arguments in template functions (known cases are Visual C++ 10 and 11): the compiler reports an ambiguity error if a handle is used in the argument of a call to the function that has two or more overloaded versions, accepting handles to different types.
|
||||
This issue appears in the compilers that do not support default arguments in template functions (known cases are Visual C++ 10 and 11): the compiler reports an ambiguity error if a handle is used in the argument of a call to the function that has two or more overloaded versions, receiving handles to different types.
|
||||
The problem is that operator <i> const handle<T2>& </i> is defined for any type *T2*, thus the compiler cannot make the right choice.
|
||||
|
||||
Example:
|
||||
@@ -984,32 +985,24 @@ Draw command *VSetTextureMode* has been deleted.
|
||||
|
||||
@section upgrade_occt710 Upgrade to OCCT 7.1.0
|
||||
|
||||
@subsection upgrade_occt710_correction_of_Parab2d Correction in *gp_Parab2d, gce_MakeParab2d* and *GCE2d_MakeParabola* classes:
|
||||
|
||||
1. Constructors *GCE2d_MakeParabola(const gp_Ax22d& D, const gp_Pnt2d& F)*, *gce_MakeParab2d(const gp_Ax22d& D, const gp_Pnt2d& F)* and *gp_Parab2d(const gp_Ax22d& D, const gp_Pnt2d& F)* have been deleted.
|
||||
|
||||
2. Objects created with some constructors of *gp_Parab2d* class may differ from the previous version. Please see the updated documentation for *gp_Parab2d* class (file *gp_Parab2d.hxx*).
|
||||
|
||||
3. Result returned by gp_Parab2d::Directrix() method has another direction in compare with previous OCCT-version.
|
||||
|
||||
@subsection upgrade_710_aspects Presentation attributes
|
||||
|
||||
This section should be considered if application defines custom presentations (inherited from AIS_InteractiveObject).
|
||||
Previous versions of OCCT have three levels for defining presentation properties (e.g. colors, materials):
|
||||
This section should be considered if application defines custom presentations, i.e. inherited from *AIS_InteractiveObject*.
|
||||
The previous versions of OCCT have three levels for defining presentation properties (e.g. colors, materials, etc.):
|
||||
|
||||
1. For entire structure (Graphic3d_Structure / Prs3d_Presentation).
|
||||
2. For specific group of primitives (Graphic3d_Group::SetGroupPrimitivesAspect()) overriding structure aspects.
|
||||
3. For specific primitive array within graphic group (Graphic3d_Group::SetPrimitivesAspect()).
|
||||
1. For the entire structure - *Graphic3d_Structure* / *Prs3d_Presentation*.
|
||||
2. For a specific group of primitives - *Graphic3d_Group::SetGroupPrimitivesAspect()* overriding structure aspects.
|
||||
3. For a specific primitive array within the graphic group - *Graphic3d_Group::SetPrimitivesAspect()*.
|
||||
|
||||
The first one is de facto not used for a long time since OCCT presentations always define aspects at graphic group level (overriding any structure aspects).
|
||||
Within this OCCT release, this first level of aspects has been completely removed. In most cases application code should just remove missing methods; in rare cases where this functionality was intentionally used - application should explicitly define aspects to appropriate graphic groups.
|
||||
The structure level has de facto not been used for a long time since OCCT presentations always define aspects at the graphic group level (overriding any structure aspects).
|
||||
Within this OCCT release, structure level of aspects has been completely removed. In most cases the application code should just remove missing methods. In those rare cases, when this functionality was intentionally used, the application should explicitly define aspects to the appropriate graphic groups.
|
||||
|
||||
Note that the 3rd level (defining several different aspects within the same graphic group) is also should be avoided in application code since it is deprecated functionality which can be removed in further releases.
|
||||
Graphic3d_Group::SetGroupPrimitivesAspect() should be the main method defining presentation attributes.
|
||||
Note that defining several different aspects within the same graphic group should also be avoided in the application code since it is a deprecated functionality which can be removed in further releases.
|
||||
*Graphic3d_Group::SetGroupPrimitivesAspect()* should be the main method defining presentation attributes.
|
||||
|
||||
The implementation of Graphic3d_Group::SetGroupPrimitivesAspect() has been changed from copying aspect values to keeping passed object.
|
||||
Although it was not documented, previosly it was possible to modify single aspects instance (like Graphic3d_AspectFillArea3d) and set it to multiple groups.
|
||||
Now such code would produce unexpected result and therefore should be updated to create dedicated aspect instance.
|
||||
The implementation of *Graphic3d_Group::SetGroupPrimitivesAspect()* has been changed from copying aspect values to keeping the passed object.
|
||||
Although it was not documented, previously it was possible to modify a single aspect instance, like *Graphic3d_AspectFillArea3d* and set it to multiple groups.
|
||||
Now such code would produce an unexpected result and therefore should be updated to create the dedicated aspect instance.
|
||||
|
||||
@subsection upgrade_710_types Typedefs
|
||||
|
||||
@@ -1020,37 +1013,93 @@ The following type definitions in OCCT has been modified to use C++11 types:
|
||||
- *Standard_Utf16Char* is now *char16_t* (previously *uint16_t* for compatibility with old compilers).
|
||||
- *Standard_Utf32Char* is now *char32_t* (previously *uint32_t* for compatibility with old compilers).
|
||||
|
||||
For most applications this change should be transparent, since the size of types have not been changed.
|
||||
For most applications this change should be transparent on the level of source code. Binary compatibility is not maintained, as *bool* has a different size in comparison with *unsigned int*.
|
||||
|
||||
@subsection upgrade_710_ffp Programmable Pipeline
|
||||
|
||||
Fixed-function pipeline has been already deprecated since OCCT 7.0.0.
|
||||
Release 7.1.0 disables this functionality by default in favor of Programmable Pipeline (based on GLSL programs).
|
||||
|
||||
This also means that method *V3d_View::Export()* based on gl2ps library and requiring disabled by default functionality has been deprecated as well.
|
||||
Applications should explicitly enable deprecated functionality by setting OpenGl_Caps::ffpEnable flag to TRUE within OpenGl_GraphicDriver::ChangeOptions() before creating the viewer to use V3d_View::Export(),
|
||||
but being aware that this functionality is likely to be removed in a next OCCT release.
|
||||
Thus the recommended way to generate vector image of a 3D model or scene is to use application-level solution independent from OpenGL.
|
||||
Method *V3d_View::Export()*, based on *gl2ps* library, requires fixed pipeline and will return error if used with default settings.
|
||||
Applications should explicitly enable fixed pipeline by setting *OpenGl_Caps::ffpEnable* flag to TRUE within *OpenGl_GraphicDriver::ChangeOptions()* before creating the viewer to use *V3d_View::Export()*.
|
||||
This method is declared as deprecated and will be removed in one of the the next OCCT releases.
|
||||
The recommended way to generate a vector image of a 3D model or scene is to use an application-level solution independent from OpenGL.
|
||||
|
||||
@subsection upgrade_710_trsfpers Transformation persistence
|
||||
|
||||
The behavior of transformation persistence flags Graphic3d_TMF_ZoomPers and Graphic3d_TMF_TriedronPers have been changed to be consistent with textured fixed-size 2D text.
|
||||
Object with these flags is considered to be defined in pixel units, and presentation is no more scaled depending on view height.
|
||||
Applications that need to scale such objects depending on viewport size should update them manually.
|
||||
The behavior of transformation persistence flags *Graphic3d_TMF_ZoomPers* and *Graphic3d_TMF_TriedronPers* has been changed for consistency with a textured fixed-size 2D text.
|
||||
An object with these flags is considered as defined in pixel units, and the presentation is no more scaled depending on the view height.
|
||||
The applications that need to scale such objects depending on viewport size should update them manually.
|
||||
|
||||
Flags *Graphic3d_TMF_PanPers* and *Graphic3d_TMF_FullPers* have been removed.
|
||||
*Graphic3d_TMF_TriedronPers* or *Graphic3d_TMF_2d* can be used instead depending on the context.
|
||||
|
||||
*Graphic3d_TransModeFlags* is not an integer bitmask anymore - enumeration values should be specified instead.
|
||||
Several transformation persistence methods in *PrsMgr_PresentableObject* have been marked deprecated.
|
||||
Transformation persistence should be defined using *Graphic3d_TransformPers* constructor directly and passed by a handle, not value.
|
||||
|
||||
@subsection upgrade_710_selprops Dynamic highlight and selection properties
|
||||
|
||||
Release 7.1.0 introduces *Graphic3d_HighlightStyle* - an entity that allows flexible customization of highlighting parameters (such as highlighting method, color, and transparency). Therefore, the signatures of the following methods related to highlighting:
|
||||
- *AIS_InteractiveContext::Hilight()*;
|
||||
- *AIS_InteractiveContext::HilightWithColor()*;
|
||||
- *PrsMgr_PresentationManager::Color()*;
|
||||
- *SelectMgr_EntityOwner::HilightWithColor()*;
|
||||
have been changed to receive *Graphic3d_HighlightStyle* instead of *Quantity_Color*.
|
||||
|
||||
Method *AIS_InteractiveContext::Hilight* is now deprecated and highlights the interactive object with selection style.
|
||||
|
||||
A group of methods *AIS_InteractiveContext::IsHilighted* has changed its behavior - now they only check highlight flags of the object or the owner in the global status. If the highlight color is required on the application level, it is necessary to use overloaded methods *AIS_InteractiveContext::HighlightStyle* for the owner and the object.
|
||||
|
||||
The following methods have been replaced in *AIS_InteractiveContext* class:
|
||||
- *HilightColor* and *SetHilightColor* by *HighlightStyle* and *SetHighlightStyle*;
|
||||
- *SelectionColor* setter and getter by *SelectionStyle* and *SetSelectionStyle*.
|
||||
|
||||
The API of *Prs3d_Drawer* has been extended to allow setting up styles for both dynamic selection and highlighting. Therefore, it is possible to change the highlight style of a particular object on the application level via *SelectMgr_SelectableObject::HilightAttributes()* and process it in the entity owner.
|
||||
|
||||
@subsection upgrade_occt710_correction_of_TObj_Model Correction in TObj_Model class
|
||||
|
||||
Methods *TObj_Model::SaveAs* and *TObj_Model::Load* now receive *TCollection_ExtendedString* filename arguments instead of char*. UTF-16 encoding can be used to pass file names containing Unicode symbols.
|
||||
|
||||
@subsection upgrade_710_env Redundant environment variables
|
||||
|
||||
The following environment variables have become redundant:
|
||||
|
||||
* *CSF_UnitsLexicon* and *CSF_UnitsDefinition* are no more used. Units definition (*UnitsAPI/Lexi_Expr.dat* and *UnitsAPI/Units.dat*) is now embedded into source code.
|
||||
* *CSF_XSMessage* and *CSF_XHMessage* are now optional.
|
||||
English messages (XSMessage/*XSTEP.us* and SHMessage/*SHAPE.us*) are now embedded into source code
|
||||
and automatically loaded when environment variables are not set.
|
||||
* *CSF_ShadersDirectory* is not required any more, though it still can be used to load custom shaders.
|
||||
Mandatory GLSL resources are now embedded into source code.
|
||||
* *CSF_PluginDefaults* and other variables pointing to OCAF plugin resources (*CSF_StandardDefaults*, *CSF_XCAFDefaults*, *CSF_StandardLiteDefaults* and *CSF_XmlOcafResource*) are not necessary if method *TDocStd_Application::DefineFormat()* is used to enable persistence of OCAF documents.
|
||||
|
||||
Other environment variables still can be used to customize behavior of relevant algorithms but are not necessary any more (all required resources are embedded).
|
||||
|
||||
@subsection upgrade_710_removed Removed features
|
||||
|
||||
The following obsolete features have been removed:
|
||||
|
||||
* Obsolete Antialiasing API *V3d_View::SetAntialiasingOn()*. This method was intended to activate deprecated OpenGL functionality (GL_POLYGON_SMOOTH, GL_LINE_SMOOTH, GL_POINT_SMOOTH).
|
||||
Instead of old API, application should request MSAA buffers for antialiasing by assigning *Graphic3d_RenderingParams::NbMsaaSamples* property of structure returned by *V3d_View::ChangeRenderingParams()*.
|
||||
* *Prs3d_Drawer::ShadingAspectGlobal()* flag has been removed as not used. Corresponding calls can be removed safely from the application code.
|
||||
* ZClipping planes and ZCueing (methods *V3d_View::SetZClippingType()*, *::SetZCueingOn()* and V3d_View::others).
|
||||
ZClipping planes can be replaced by general-purpose clipping planes (application should update plane definion manually).
|
||||
* 3D viewer printing API *V3d_View::Print()* has been removed. This functionality was available on Windows platforms only.
|
||||
Applications should use general image dump API *V3d_View::ToPixMap()* and manage printing using platform-specific API at application level.
|
||||
* Anti-aliasing API *V3d_View::SetAntialiasingOn()*. This method was intended to activate deprecated OpenGL functionality *GL_POLYGON_SMOOTH, GL_LINE_SMOOTH* and *GL_POINT_SMOOTH*.
|
||||
Instead of the old API, the application should request MSAA buffers for anti-aliasing by assigning *Graphic3d_RenderingParams::NbMsaaSamples* property of the structure returned by *V3d_View::ChangeRenderingParams()*.
|
||||
* *Prs3d_Drawer::ShadingAspectGlobal()* flag has been removed as not used. The corresponding calls can be removed safely from the application code.
|
||||
* The methods managing ZClipping planes and ZCueing: *V3d_View::SetZClippingType()*, *V3d_View::SetZCueingOn()*, etc. have been removed. ZClipping planes can be replaced by general-purpose clipping planes (the application should update plane definition manually).
|
||||
* The 3D viewer printing API *V3d_View::Print()* has been removed. This functionality was available on Windows platforms only. The applications should use the general image dump API *V3d_View::ToPixMap()* and manage printing using a platform-specific API at the application level.
|
||||
Text resolution can be managed by rendering parameter *Graphic3d_RenderingParams::Resolution*, returned by *V3d_View::ChangeRenderingParams()*.
|
||||
* Methods *PrsMgr_PresentationManager::BoundBox*, *PrsMgr_PresentationManager::Hilight* and *SelectMgr_EntityOwner::Hilight* have been removed as not used. The corresponding method in custom implementations of *SelectMgr_EntityOwner* can be removed safely. *PrsMgr_PresentationManager::Color* with the corresponding style must be used instead.
|
||||
* Class *NCollection_QuickSort* has been removed. The code that used the tools provided by that class should be corrected manually. The recommended approach is to use sorting algorithms provided by STL (std::sort). See also @ref upgrade_occt700_sorttools above.
|
||||
|
||||
@subsection upgrade_occt710_correction_of_TObj_Model Correction in TObj_Model class
|
||||
* Package *Dico*. The code that used the tools provided by that package should be corrected manually. The recommended approach is to use *NCollection_DataMap* and *NCollection_IndexedDataMap* classes.
|
||||
|
||||
@subsection upgrade_710_changed_methods Other changes
|
||||
|
||||
The following classes have been changed:
|
||||
|
||||
* *BVH_Sorter* class has become abstract. The list of arguments of both *Perform* methods has been changed and the methods became pure virtual.
|
||||
* *Extrema_FuncExtPS* has been renamed to *Extrema_FuncPSNorm*.
|
||||
* The default constructor and the constructor taking a point and a surface have been removed from class *Extrema_GenLocateExtPS*. Now the only constructor takes the surface and optional tolerances in U and V directions. The new method *Perform* takes the point with the start solution and processes it. The class has become not assignable and not copy-constructable.
|
||||
* Constructors with arguments *(const gp_Ax22d& D, const gp_Pnt2d& F)* have been removed from *GCE2d_MakeParabola*, *gce_MakeParab2d* and *gp_Parab2d*. The objects created with some constructors of class *gp_Parab2d* may differ from the previous version (see the comments in *gp_Parab2d.hxx*). The result returned by *gp_Parab2d::Directrix()* method has an opposite direction in comparison with the previous OCCT versions.
|
||||
* *BRepTools_Modifier* class now has two modes of work. They are defined by the boolean parameter *MutableInput*, which is turned off by default. This means that the algorithm always makes a copy of a sub-shape (e.g. vertex) if its tolerance is to be increased in the output shape. The old mode corresponds to *MutableInput* turned on. This change may impact an application if it implements a class derived from *BRepTools_Modifier*.
|
||||
* The second parameter *theIsOuterWire* of method *ShapeAnalysis_Wire::CheckSmallArea* has been removed.
|
||||
* In class *GeomPlate_CurveConstraint*, two constructors taking boundary curves of different types have been replaced with one constructor taking the curve of an abstract type.
|
||||
* The last optional argument *RemoveInvalidFaces* has been removed from the constructor of class *BRepOffset_MakeOffset* and method *Initialize*.
|
||||
* The public method *BOPDS_DS::VerticesOnIn* has been renamed into *SubShapesOnIn* and the new output parameter *theCommonPB* has been added.
|
||||
|
||||
Methods *TObj_Model::SaveAs* and *TObj_Model::Load* receive *TCollection_ExtendedString* filename arguments instead of char*. This shows that the filename may be not-ASCII explicitly. Also it makes OCAF API related to this functionality more conform.
|
||||
|
@@ -346,10 +346,9 @@ The scripts are located in the OCCT root folder.
|
||||
* **CSF_DEBUG** (optional, Windows only): if defined then a diagnostic message is displayed in case of an exception;
|
||||
* **CSF_DEBUG_BOP** (optional): if defined then it should specify directory where diagnostic data on problems occured in Boolean operations will be saved;
|
||||
* **CSF_MDTVTexturesDirectory** defines the directory for available textures when using texture mapping;
|
||||
* **CSF_ShadersDirectory** defines the directory for GLSL programs (required for 3D viewer to work);
|
||||
* **CSF_UnitsDefinition** and **CSF_UnitsLexicon** should define paths to resource files Lexi_Expr.dat and Units.dat, respectively (required for support of measurement units);
|
||||
* **CSF_SHMessage** defines the path to the messages file for *ShapeHealing*;
|
||||
* **CSF_XSMessage** defines the path to the messages file for **STEP** and **IGES** translators;
|
||||
* **CSF_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.
|
||||
|
@@ -203,18 +203,18 @@ Braces *quoting* prevents all substitutions. Braces are also nested. The main us
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
set x 0
|
||||
# this will loop for ever
|
||||
# because while argument is ;0 3;
|
||||
while ;$x 3; {set x [expr $x+1]}
|
||||
# because while argument is ;0 < 3;
|
||||
while ;$x < 3; {set x [expr $x+1]}
|
||||
# this will terminate as expected because
|
||||
# while argument is {$x 3}
|
||||
while {$x 3} {set x [expr $x+1]}
|
||||
# while argument is {$x < 3}
|
||||
while {$x < 3} {set x [expr $x+1]}
|
||||
# this can be written also
|
||||
while {$x 3} {
|
||||
while {$x < 3} {
|
||||
set x [expr $x+1]
|
||||
}
|
||||
# the following cannot be written
|
||||
# because while requires two arguments
|
||||
while {$x 3}
|
||||
while {$x < 3}
|
||||
{
|
||||
set x [expr $x+1]
|
||||
}
|
||||
@@ -365,7 +365,7 @@ if condition script [elseif script .... else script]
|
||||
|
||||
**Example:**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
if {$x 0} {
|
||||
if {$x > 0} {
|
||||
puts ;positive;
|
||||
} elseif {$x == 0} {
|
||||
puts ;null;
|
||||
@@ -391,13 +391,13 @@ The three loop structures are similar to their C or csh equivalent. It is import
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
# while example
|
||||
dset x 1.1
|
||||
while {[dval x] 100} {
|
||||
while {[dval x] < 100} {
|
||||
circle c 0 0 x
|
||||
dset x x*x
|
||||
}
|
||||
# for example
|
||||
# incr var d, increments a variable of d (default 1)
|
||||
for {set i 0} {$i 10} {incr i} {
|
||||
for {set i 0} {$i < 10} {incr i} {
|
||||
dset angle $i*pi/10
|
||||
point p$i cos(angle0 sin(angle) 0
|
||||
}
|
||||
@@ -421,7 +421,7 @@ Within loops, the **break** and **continue** commands have the same effect as in
|
||||
**Example:**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
# search the index for which t$i has value ;secret;
|
||||
for {set i 1} {$i = 100} {incr i} {
|
||||
for {set i 1} {$i <= 100} {incr i} {
|
||||
if {[set t$i] == ;secret;} break;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -1164,7 +1164,7 @@ point . x y z
|
||||
|
||||
#Not OK. display points on a curve c
|
||||
# with dot no variables are created
|
||||
for {set i 0} {$i = 10} {incr i} {
|
||||
for {set i 0} {$i <= 10} {incr i} {
|
||||
cvalue c $i/10 x y z
|
||||
point . x y z
|
||||
}
|
||||
@@ -2306,7 +2306,7 @@ Creates *AIS_ConnectedInteractive* object from the input object and location and
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
Vinitvinit
|
||||
vinit
|
||||
vpoint p1 0 0 0
|
||||
vpoint p2 50 0 0
|
||||
vsegment segment p1 p2
|
||||
@@ -2425,9 +2425,10 @@ vdimension name {-angle|-length|-radius|-diameter} -shapes shape1 [shape2 [shape
|
||||
[-label left|right|hcenter|hfit top|bottom|vcenter|vfit]
|
||||
[-arrow external|internal|fit] [{-arrowlength|-arlen} RealArrowLength]
|
||||
[{-arrowangle|-arangle} ArrowAngle(degrees)] [-plane xoy|yoz|zox]
|
||||
[-flyout FloatValue -extension FloatValue] [-value CustomNumberValue]
|
||||
[-dispunits DisplayUnitsString] [-modelunits ModelUnitsString]
|
||||
[-showunits | -hideunits]
|
||||
[-flyout FloatValue -extension FloatValue]
|
||||
[-autovalue] [-value CustomRealValue] [-textvalue CustomTextValue]
|
||||
[-dispunits DisplayUnitsString]
|
||||
[-modelunits ModelUnitsString] [-showunits | -hideunits]
|
||||
~~~~~
|
||||
|
||||
Builds angle, length, radius or diameter dimension interactive object **name**.
|
||||
@@ -2436,6 +2437,7 @@ Builds angle, length, radius or diameter dimension interactive object **name**.
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
vinit
|
||||
vpoint p1 0 0 0
|
||||
vpoint p2 50 50 0
|
||||
vdimension dim1 -length -plane xoy -shapes p1 p2
|
||||
@@ -2459,7 +2461,9 @@ vdimparam name [-text 3d|2d wf|sh|wireframe|shading IntegerSize]
|
||||
[{-arrowangle|-arangle} ArrowAngle(degrees)]
|
||||
[-plane xoy|yoz|zox]
|
||||
[-flyout FloatValue -extension FloatValue]
|
||||
[-value CustomNumberValue]
|
||||
[-autovalue]
|
||||
[-value CustomRealValue]
|
||||
[-textvalue CustomTextValue]
|
||||
[-dispunits DisplayUnitsString]
|
||||
[-modelunits ModelUnitsString]
|
||||
[-showunits | -hideunits]
|
||||
@@ -2469,13 +2473,38 @@ Sets parameters for angle, length, radius and diameter dimension **name**.
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
vinit
|
||||
vpoint p1 0 0 0
|
||||
vpoint p2 50 50 0
|
||||
vdimension dim1 -length -plane xoy -shapes p1 p2
|
||||
vdimparam dim1 -flyout -15 -arrowlength 4 -showunits -value 10
|
||||
vfit
|
||||
vdimparam dim1 -textvalue "w_1"
|
||||
vdimparam dim1 -autovalue
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_4_4_22 vmovedim
|
||||
@subsubsection occt_draw_4_4_22 vdimangleparam
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
vangleparam name [-type interior|exterior]
|
||||
[-showarrow first|second|both|none]
|
||||
~~~~~
|
||||
|
||||
Sets parameters for angle dimension **name**.
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
vinit
|
||||
vpoint p1 0 0 0
|
||||
vpoint p2 10 0 0
|
||||
vpoint p3 10 5 0
|
||||
vdimension dim1 -angle -plane xoy -shapes p1 p2 p3
|
||||
vfit
|
||||
vangleparam dim1 -type exterior -showarrow first
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_draw_4_4_23 vmovedim
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
@@ -2489,6 +2518,7 @@ are adjusted.
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
vinit
|
||||
vpoint p1 0 0 0
|
||||
vpoint p2 50 50 0
|
||||
vdimension dim1 -length -plane xoy -shapes p1 p2
|
||||
@@ -4021,7 +4051,7 @@ Initializes the iteration on the tree of *TreeNode* attributes with tree *ID* (o
|
||||
~~~~~
|
||||
InitChildNodeIterate D 0:5 1
|
||||
set aChildNumber 0
|
||||
for {set i 1} {$i 100} {incr i} {
|
||||
for {set i 1} {$i < 100} {incr i} {
|
||||
if {[ChildNodeMore] == *TRUE*} {
|
||||
puts *Tree node = [ChildNodeValue]*
|
||||
incr aChildNumber
|
||||
@@ -5241,10 +5271,10 @@ For a 2d rotation, you need only give the center point and the angle. In 2d or 3
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
# make a helix of circles. create a scripte file with
|
||||
# make a helix of circles. create a script file with
|
||||
this code and execute it using **source**.
|
||||
circle c0 10 0 0 3
|
||||
for {set i 1} {$i = 10} {incr i} {
|
||||
for {set i 1} {$i <= 10} {incr i} {
|
||||
copy c[expr $i-1] c$i
|
||||
translate c$i 0 0 3
|
||||
rotate c$i 0 0 0 0 0 1 36
|
||||
@@ -5366,7 +5396,7 @@ Computes points and derivatives on a surface for a pair of parameter values. The
|
||||
~~~~~
|
||||
# display points on a sphere
|
||||
sphere s 10
|
||||
for {dset t 0} {[dval t] = 1} {dset t t+0.01} {
|
||||
for {dset t 0} {[dval t] <= 1} {dset t t+0.01} {
|
||||
svalue s t*2*pi t*pi-pi/2 x y z
|
||||
point . x y z
|
||||
}
|
||||
@@ -6634,7 +6664,7 @@ Locations are very economic in the data structure because multiple occurences of
|
||||
# make rotated copies of a sphere in between two cylinders
|
||||
# create a file source toto.tcl
|
||||
# toto.tcl code:
|
||||
for {set i 0} {$i 360} {incr i 20} {
|
||||
for {set i 0} {$i < 360} {incr i 20} {
|
||||
copy s s$i
|
||||
trotate s$i 0 0 0 0 0 1 $i
|
||||
}
|
||||
|
@@ -810,7 +810,7 @@ The *Load* method looks for the library name in the resource file or registry t
|
||||
a148e300-5740-11d1-a904-080036aaa103.Location: libFWOSPlugin.so
|
||||
~~~~~
|
||||
|
||||
Then the *Load* method loads the library according to the rules of the operating system of the host machine (for example, by using environment variables such as *LD_LIBRARY_PATH* with Unix and *PATH* with Windows). After that it invokes the *PLUGINFACTORY* method to return the object which supports the required service.
|
||||
Then the *Load* method loads the library according to the rules of the operating system of the host machine (for example, by using environment variables such as *LD_LIBRARY_PATH* with Unix and *PATH* with Windows). After that it invokes the *PLUGINFACTORY* method to return the object, which supports the required service.
|
||||
The client may then call the functions supported by this object.
|
||||
|
||||
#### C++ Client Plug-In Implementation
|
||||
@@ -885,7 +885,7 @@ Handle(Standard_Transient) FAFactory::Factory (const Standard_GUID& theGUID)
|
||||
PLUGIN(FAFactory)
|
||||
~~~~~
|
||||
|
||||
Application might also instantiate a factory by linking to the library and calling FAFactory::Factory() directly.
|
||||
Application might also instantiate a factory by linking to the library and calling *FAFactory::Factory()* directly.
|
||||
|
||||
@section occt_fcug_3 Collections, Strings, Quantities and Unit Conversion
|
||||
|
||||
|
@@ -415,18 +415,18 @@ These classes use the "Projection" criteria for optimization.
|
||||
### Extrema between Curves
|
||||
|
||||
The *Geom2dAPI_ExtremaCurveCurve* class allows calculation of all minimal distances between two 2D geometric curves.
|
||||
The *GeomAPI_ExtremaCurveCurve* class allows calculation of all minimal distances two 3D geometric curves.
|
||||
The *GeomAPI_ExtremaCurveCurve* class allows calculation of all minimal distances between two 3D geometric curves.
|
||||
These classes use Euclidean distance as the criteria for optimization.
|
||||
|
||||
### Extrema between Curve and Surface
|
||||
|
||||
The *GeomAPI_ExtremaCurveSurface* class allows calculation of one extrema between a 3D curve and a surface. Extrema are the lengths of the segments orthogonal to the curve and the surface.
|
||||
This class use the "Projection" criteria for optimization.
|
||||
This class uses the "Projection" criteria for optimization.
|
||||
|
||||
### Extrema between Surfaces
|
||||
|
||||
The *GeomAPI_ExtremaSurfaceSurface* class allows calculation of one minimal and one maximal distance between two surfaces.
|
||||
This class use Euclidean distance to compute minimum and "Projection" criteria to compute maximum.
|
||||
This class uses Euclidean distance to compute the minimum, and "Projection" criteria to compute the maximum.
|
||||
|
||||
@section occt_modat_2 2D Geometry
|
||||
|
||||
@@ -1249,8 +1249,8 @@ For example, in the wire in the image we want to recuperate the edges in the ord
|
||||
|
||||
@subsection occt_modat_5_6 Storage of shapes
|
||||
|
||||
**BRepTools** and **BinTools** packages contain methods *Read* and *Write* allowing to read and write a Shape to/from a stream or a file.
|
||||
The methods provided by **BRepTools** package use ASCII storage format; **BinTools** package use binary format.
|
||||
*BRepTools* and *BinTools* packages contain methods *Read* and *Write* allowing to read and write a Shape to/from a stream or a file.
|
||||
The methods provided by *BRepTools* package use ASCII storage format; *BinTools* package uses binary format.
|
||||
Each of these methods has two arguments:
|
||||
- a *TopoDS_Shape* object to be read/written;
|
||||
- a stream object or a file name to read from/write to.
|
||||
|
@@ -625,7 +625,7 @@ app->NewDocument("NewDocumentFormat", doc);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Here "NewDocumentFormat" is identifier of the format of your document.
|
||||
OCCT defines several standard formats, distinguishing by a set of OCAF attributes supported, and method of encoding (e.g. binary data or XML), described below.
|
||||
OCCT defines several standard formats, distinguishing by a set of supported OCAF attributes, and method of encoding (e.g. binary data or XML), described below.
|
||||
If your application defines specific OCAF attributes, you need to define your own format for it.
|
||||
|
||||
@subsubsection occt_ocaf_4_2_3 Retrieving the application to which the document belongs
|
||||
@@ -655,7 +655,7 @@ doc = TDocStd_Document::Get(label);
|
||||
|
||||
@subsubsection occt_ocaf_4_3_format Defining storage format
|
||||
|
||||
OCAF uses customizable mechanism for storage of the documents.
|
||||
OCAF uses a customizable mechanism for storage of the documents.
|
||||
In order to use OCAF persistence to save and read your documents to / from the file, you need to define one or several formats in your application.
|
||||
|
||||
For that, use method TDocStd_Application::DefineFormat(), for instance:
|
||||
@@ -665,8 +665,8 @@ app->DefineFormat ("NewDocumentFormat", "New format for OCAF documents", "ndf",
|
||||
new NewDocumentFormat_StorageDriver());
|
||||
~~~~~
|
||||
|
||||
Here format "NewDocumentFormat" is defined, with default file extension "ndf", and drivers for reading and storing documents from and to that format are instantiated.
|
||||
Either of the drivers can be null, in this case corresponding action will not be supported for that format.
|
||||
This example defines format "NewDocumentFormat" with a default file extension "ndf", and instantiates drivers for reading and storing documents from and to that format.
|
||||
Either of the drivers can be null, in this case the corresponding action will not be supported for that format.
|
||||
|
||||
OCAF provides several standard formats, each covering some set of OCAF attributes:
|
||||
|
||||
@@ -687,28 +687,29 @@ OCAF provides several standard formats, each covering some set of OCAF attribute
|
||||
<tr><td>TObjXml </td><td> TKXmlTObj </td><td> TKLCAF + TKTObj </td></tr>
|
||||
</table>
|
||||
|
||||
For convenience, these toolkits provide static methods DefineFormat() accepting handle to application.
|
||||
For convenience, these toolkits provide static methods *DefineFormat()* accepting handle to application.
|
||||
These methods allow defining corresponding formats easily, e.g.:
|
||||
|
||||
~~~~~
|
||||
BinDrivers::DefineFormat (app); // define format "BinOcaf"
|
||||
~~~~~
|
||||
|
||||
Use these toolkits as example for implementation of persistence drivers for custom attributes, or new persistence formats.
|
||||
Use these toolkits as an example for implementation of persistence drivers for custom attributes, or new persistence formats.
|
||||
|
||||
The application can define several storage formats.
|
||||
On save, the format specified in the document (see TDocStd_Document::StorageFormat()) will be used (it will fail if that format is not defined in the application).
|
||||
On reading, format identifier stored in the file is used, and recorded in the document.
|
||||
On save, the format specified in the document (see *TDocStd_Document::StorageFormat()*) will be used (save will fail if that format is not defined in the application).
|
||||
On reading, the format identifier stored in the file is used and recorded in the document.
|
||||
|
||||
@subsubsection occt_ocaf_4_3_plugins Defining storage format by resource files
|
||||
|
||||
Alternative (legacy, used in earlier versions of OCCT) method to define formats is via usage of resource files.
|
||||
The alternative method to define formats is via usage of resource files.
|
||||
This method was used in earlier versions of OCCT and is considered as deprecated since version 7.1.0.
|
||||
This method allows loading persistence drivers on demand, using plugin mechanism.
|
||||
|
||||
To use this method, create your own application class inheriting from *TDocStd_Application*, and override method ResourcesName().
|
||||
That method should return a string with a name of resource file, e.g. "NewDocumentFormat", which will contain description of the format.
|
||||
To use this method, create your own application class inheriting from *TDocStd_Application*, and override method *ResourcesName()*.
|
||||
That method should return a string with a name of resource file, e.g. "NewDocumentFormat", which will contain a description of the format.
|
||||
|
||||
Then create that resource file and define parameters of your format:
|
||||
Then create that resource file and define the parameters of your format:
|
||||
|
||||
~~~~~
|
||||
ndf.FileFormat: NewDocumentFormat
|
||||
@@ -718,10 +719,10 @@ NewDocumentFormat.StoragePlugin: bb5aa176-c65c-4c84-862e-6b7c1fe16921
|
||||
NewDocumentFormat.RetrievalPlugin: 76fb4c04-ea9a-46aa-88a2-25f6a228d902
|
||||
~~~~~
|
||||
|
||||
Here GUIDs should be unique and correspond to the GUIDs supported by relevant plugin.
|
||||
You can use either one of existing plugins (see the table above) or create your own.
|
||||
The GUIDs should be unique and correspond to the GUIDs supported by relevant plugin.
|
||||
You can use an existing plugins (see the table above) or create your own.
|
||||
|
||||
Finally, make a copy of the resource file "Plugin" from $CASROOT/src/StdResource, and, if necessary, add definition of your plugin in it, for instance:
|
||||
Finally, make a copy of the resource file "Plugin" from *$CASROOT/src/StdResource* and, if necessary, add the definition of your plugin in it, for instance:
|
||||
|
||||
~~~~~
|
||||
bb5aa176-c65c-4c84-862e-6b7c1fe16921.Location: TKNewFormat
|
||||
@@ -738,7 +739,7 @@ setenv CSF_NewFormatDefaults MyApplicationPath/MyResources
|
||||
|
||||
@subsubsection occt_ocaf_4_3_3 Saving a document
|
||||
|
||||
To save the document, make sure that its parameter StorageFormat() corresponds to one of formats defined in the application, and use method *TDocStd_Application::SaveAs*, for instance:
|
||||
To save the document, make sure that its parameter *StorageFormat()* corresponds to one of the formats defined in the application, and use method *TDocStd_Application::SaveAs*, for instance:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
app->SaveAs(doc, "/tmp/example.caf");
|
||||
|
@@ -121,7 +121,7 @@ IVtkTools::InitShapeMapper(Mapper);
|
||||
It is possible to get an instance of *vtkLookupTable class* with a default OCCT color scheme by means of the following method:
|
||||
|
||||
~~~~
|
||||
vtkLookupTable* Table = IVtkTools::InitLookupTable();
|
||||
vtkSmartPointer<vtkLookupTable> Table = IVtkTools::InitLookupTable();
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_vis_3_2_2 Custom color scheme
|
||||
|
BIN
dox/user_guides/visualization/images/visualization_image029.png
Normal file
BIN
dox/user_guides/visualization/images/visualization_image029.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
BIN
dox/user_guides/visualization/images/visualization_image030.png
Normal file
BIN
dox/user_guides/visualization/images/visualization_image030.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
@@ -614,7 +614,7 @@ The set of sensitive primitives, which correspond to a given mode, is stocked in
|
||||
|
||||
Each selection mode is identified by an index. By convention, the default selection mode that allows us to grasp the interactive object in its entirety is mode *0*. However, it can be modified in the custom interactive objects using method <i>SelectMgr_SelectableObject::setGlobalSelMode()</i>.
|
||||
|
||||
The calculation of selection primitives (or sensitive entities) is done by the intermediary of a virtual function, *ComputeSelection*. It should be implemented for each type of interactive object that is assumed to have different selection modes using the function *AIS_ConnectedInteractive::ComputeSelection*.
|
||||
The calculation of selection primitives (or sensitive entities) is done in a virtual function *ComputeSelection*. It should be implemented for each type of interactive object that is assumed to have different selection modes using the function *AIS_InteractiveObject::ComputeSelection*.
|
||||
|
||||
A detailed explanation of the mechanism and the manner of implementing this function has been given in @ref occt_visu_2_2 "Selection" chapter.
|
||||
|
||||
@@ -746,6 +746,95 @@ Standard_Boolean AIS_InteractiveContext::HasPolygonOffsets
|
||||
(const Handle(AIS_InteractiveObject) &anObj)
|
||||
~~~~~
|
||||
|
||||
|
||||
@subsubsection occt_visu_3_2_7 Object hierarchy
|
||||
|
||||
Each *PrsMgr_PresentableObject* has a list of objects called *myChildren*.
|
||||
Any transformation of *PrsMgr_PresentableObject* is also applied to its children. This hierarchy does not propagate to *Graphic3d* level and below.
|
||||
|
||||
*PrsMgr_PresentableObject* sends its combined (according to the hierarchy) transformation down to *Graphic3d_Structure*.
|
||||
|
||||
The materials of structures are not affected by the hierarchy.
|
||||
|
||||
Object hierarchy can be controlled by the following API calls:
|
||||
* *PrsMgr_PresentableObject::AddChild*;
|
||||
* *PrsMgr_PresentableObject::RemoveChild*.
|
||||
|
||||
@subsubsection occt_visu_3_2_8 Instancing
|
||||
|
||||
The conception of instancing operates the object hierarchy as follows:
|
||||
* Instances are represented by separated *AIS* objects.
|
||||
* Instances do not compute any presentations.
|
||||
|
||||
Classes *AIS_ConnectedInteractive* and *AIS_MultipleConnectedInteractive* are used to implement this conception.
|
||||
|
||||
*AIS_ConnectedInteractive* is an object instance, which reuses the geometry of the connected object but has its own transformation, material, visibility flag, etc. This connection is propagated down to *OpenGl* level, namely to *OpenGl_Structure*. *OpenGl_Structure* can be connected only to a single other structure.
|
||||
|
||||
*AIS_ConnectedInteractive* can be referenced to any *AIS_Interactive* object in general. When it is referenced to another *AIS_ConnectedInteractive*, it just copies the reference.
|
||||
|
||||
*AIS_MultipleConnectedInteractive* represents an assembly, which does not have its own presentation. The assemblies are able to participate in the object hierarchy and are intended to handle a grouped set of instanced objects. It behaves as a single object in terms of selection. It applies high level transformation to all sub-elements since it is located above in the hierarchy.
|
||||
|
||||
All *AIS_MultipleConnectedInteractive* are able to have child assemblies. Deep copy of object instances tree is performed if one assembly is attached to another.
|
||||
|
||||
Note that *AIS_ConnectedInteractive* cannot reference *AIS_MultipleConnectedInteractive*. *AIS_ConnectedInteractive* copies sensitive entities of the origin object for selection, unlike *AIS_MultipleConnectedInteractive* that re-uses the entities of the origin object.
|
||||
|
||||
Instances can be controlled by the following DRAW commands:
|
||||
* *vconnect* : Creates and displays *AIS_MultipleConnectedInteractive* object from input objects and location.
|
||||
* *vconnectto* : Makes an instance of object with the given position.
|
||||
* *vdisconnect* : Disconnects all objects from an assembly or disconnects an object by name or number.
|
||||
* *vaddconnected* : Adds an object to the assembly.
|
||||
* *vlistconnected* : Lists objects in the assembly.
|
||||
|
||||
Have a look at the examples below:
|
||||
~~~~~
|
||||
pload ALL
|
||||
vinit
|
||||
psphere s 1
|
||||
vdisplay s
|
||||
vconnectto s2 3 0 0 s # make instance
|
||||
vfit
|
||||
~~~~~
|
||||
|
||||
See how proxy *OpenGl_Structure* is used to represent instance:
|
||||
|
||||
@figure{/user_guides/visualization/images/visualization_image029.png}
|
||||
|
||||
The original object does not have to be displayed in order to make instance. Also selection handles transformations of instances correctly:
|
||||
|
||||
~~~~~
|
||||
pload ALL
|
||||
vinit
|
||||
psphere s 1
|
||||
psphere p 0.5
|
||||
vdisplay s # p is not displayed
|
||||
vsetloc s -2 0 0
|
||||
vconnect x 3 0 0 s p # make assembly
|
||||
vfit
|
||||
~~~~~
|
||||
|
||||
@figure{/user_guides/visualization/images/visualization_image030.png}
|
||||
|
||||
Here is the example of a more complex hierarchy involving sub-assemblies:
|
||||
|
||||
~~~~~
|
||||
pload ALL
|
||||
vinit
|
||||
box b 1 1 1
|
||||
psphere s 0.5
|
||||
vdisplay b s
|
||||
vsetlocation s 0 2.5 0
|
||||
box d 0.5 0.5 3
|
||||
box d2 0.5 3 0.5
|
||||
vdisplay d d2
|
||||
|
||||
vconnectto b1 -2 0 0 b
|
||||
vconnect z 2 0 0 b s
|
||||
vconnect z2 4 0 0 d d2
|
||||
vconnect z3 6 0 0 z z2
|
||||
vfit
|
||||
~~~~~
|
||||
|
||||
|
||||
@subsection occt_visu_3_3 Interactive Context
|
||||
|
||||
@subsubsection occt_visu_3_3_1 Rules
|
||||
@@ -1274,7 +1363,7 @@ when you activate one of modes: 1 2 3 4, you pick AIS objects of type:
|
||||
* mode 1 : selection of the origin of the trihedron;
|
||||
* mode 2 : selection of the axes -- same remarks as for the Trihedron.
|
||||
|
||||
For the presentation of planes and trihedra, the default unit of length is millimeter, and the default value for the representation of axes is 100. If you modify these dimensions, you must temporarily recover the object **Drawer**. From it, take the *Aspects* in which the values for length are stored (*PlaneAspect* for the plane, *FirstAxisAspect* for trihedra), and change these values inside these Aspects. Finally, recalculate the presentation.
|
||||
For the presentation of planes and trihedra, the default length unit is millimeter and the default value for the representation of axes is 10. To modify these dimensions, you must temporarily recover the object **Drawer**. From it, take the *DatumAspect()* and change the value *FirstAxisLength*. Finally, recalculate the presentation.
|
||||
|
||||
@subsubsection occt_visu_3_5_2 Object
|
||||
|
||||
@@ -1296,9 +1385,7 @@ And at maximum seven selection modes, depending on the shape complexity:
|
||||
|
||||
* *AIS_Triangulation* is a simple interactive object for displaying triangular mesh contained in *Poly_Triangulation* container.
|
||||
* *AIS_ConnectedInteractive* is an Interactive Object connecting to another interactive object reference, and located elsewhere in the viewer makes it possible not to calculate presentation and selection, but to deduce them from your object reference.
|
||||
* *AIS_ConnectedShape* is an object connected to interactive objects having a shape; this class has the same decompositions as *AIS_Shape*. Furthermore, it allows a presentation of hidden parts, which are calculated automatically from the shape of its reference.
|
||||
* *AIS_MultipleConnectedInteractive* is an object connected to a list of interactive objects (which can also be Connected objects. It does not require memory hungry calculations of presentation)
|
||||
* *AIS_MultipleConnectedShape* is an interactive Object connected to a list of interactive objects having a Shape <i>(AIS_Shape, AIS_ConnectedShape, AIS_MultipleConnectedShape)</i>. The presentation of hidden parts is calculated automatically.
|
||||
* *AIS_TexturedShape* is an Interactive Object that supports texture mapping. It is constructed as a usual AIS_Shape, but has additional methods that allow to map a texture on it.
|
||||
* *MeshVS_Mesh* is an Interactive Object that represents meshes, it has a data source that provides geometrical information (nodes, elements) and can be built up from the source data with a custom presentation builder.
|
||||
|
||||
@@ -2404,19 +2491,58 @@ For each z-layer, it is allowed to:
|
||||
* Enable / disable depth buffer clearing.
|
||||
* Enable / disable polygon offset.
|
||||
|
||||
The corresponding method *SetZLayerOption (...)* is available in *Graphic3d_GraphicDriver* interface. You can get the options using getter from *Visual3d_ViewManager* and *V3d_Viewer*. It returns *Graphic3d_ZLayerSettings* cached in *Visual3d_ViewManager* for a given *LayerId*.
|
||||
You can get the options using getter from *Visual3d_ViewManager* and *V3d_Viewer*. It returns *Graphic3d_ZLayerSettings* for a given *LayerId*.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
// change z-layer settings
|
||||
Graphic3d_ZLayerSettings aSettings = aViewer->ZLayerSettings (anId);
|
||||
aSettings.EnableSetting (Graphic3d_ZLayerDepthTest);
|
||||
aSettings.EnableSetting (Graphic3d_ZLayerDepthWrite);
|
||||
aSettings.EnableSetting (Graphic3d_ZLayerDepthClear);
|
||||
aSettings.EnableSetting (Graphic3d_ZLayerDepthOffset);
|
||||
aSettings.SetEnableDepthTest (Standard_True);
|
||||
aSettings.SetEnableDepthWrite(Standard_True);
|
||||
aSettings.SetClearDepth (Standard_True);
|
||||
aSettings.SetPolygonOffset (Graphic3d_PolygonOffset());
|
||||
aViewer->SetZLayerSettings (anId, aSettings);
|
||||
~~~~~
|
||||
|
||||
Another application for Z-Layer feature is treating visual precision issues when displaying objects far from the World Center.
|
||||
The key problem with such objects is that visualization data is stored and manipulated with single precision floating-point numbers (32-bit).
|
||||
Single precision 32-bit floating-point numbers give only 6-9 significant decimal digits precision,
|
||||
while double precision 64-bit numbers give 15-17 significant decimal digits precision, which is sufficient enough for most applications.
|
||||
|
||||
When moving an Object far from the World Center, float number steadily eats precision.
|
||||
The camera Eye position adds leading decimal digits to the overall Object transformation, which discards smaller digits due to floating point number nature.
|
||||
For example, the object of size 0.0000123 moved to position 1000 has result transformation 1000.0000123,
|
||||
which overflows single precision floating point - considering the most optimistic scenario of 9 significant digits (but it is really not this case), the result number will be 1000.00001.
|
||||
|
||||
This imprecision results in visual artifacts of two kinds in the 3D Viewer:
|
||||
|
||||
* Overall per-vertex Object distortion.
|
||||
This happens when each vertex position has been defined within World Coordinate system.
|
||||
* The object itself is not distorted, but its position in the World is unstable and imprecise - the object jumps during camera manipulations.
|
||||
This happens when vertices have been defined within Local Coordinate system at the distance small enough to keep precision within single precision float,
|
||||
however Local Transformation applied to the Object is corrupted due to single precision float.
|
||||
|
||||
The first issue cannot be handled without switching the entire presentation into double precision (for each vertex position).
|
||||
However, visualization hardware is much faster using single precision float number rather than double precision - so this is not an option in most cases.
|
||||
The second issue, however, can be negated by applying special rendering tricks.
|
||||
|
||||
So, to apply this feature in OCCT, the application :
|
||||
|
||||
* Defines Local Transformation for each object to fit the presentation data into single precision float without distortion.
|
||||
* Spatially splits the world into smaller areas/cells where single precision float will be sufficient.
|
||||
The size of such cell might vary and depends on the precision required by application (e.g. how much user is able to zoom in camera within application).
|
||||
* Defines a Z-Layer for each spatial cell containing any object.
|
||||
* Defines the Local Origin property of the Z-Layer according to the center of the cell.
|
||||
|
||||
~~~~~
|
||||
Graphic3d_ZLayerSettings aSettings = aViewer->ZLayerSettings (anId);
|
||||
aSettings.SetLocalOrigin (400.0, 0.0, 0.0);
|
||||
~~~~~
|
||||
* Assigns a presentable object to the nearest Z-Layer.
|
||||
|
||||
Note that Local Origin of the Layer is used only for rendering - everything outside will be still defined in the World Coordinate System,
|
||||
including Local Transformation of the Object and Detection results.
|
||||
E.g., while moving the presentation between Z-layers with different Local Origins, the Object will stay at the same place - only visualization quality will vary.
|
||||
|
||||
@subsubsection occt_visu_4_4_16 Clipping planes
|
||||
|
||||
|
@@ -72,12 +72,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
TCollection_ExtendedString a3DName("Visu3D");
|
||||
myViewer() = new V3d_Viewer (myGraphicDriver(), a3DName.ToExtString(),"", 1000.0,
|
||||
V3d_XposYnegZpos, Quantity_NOC_GRAY30,
|
||||
V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
|
||||
Standard_True, Standard_False);
|
||||
|
||||
myViewer() = new V3d_Viewer (myGraphicDriver());
|
||||
myViewer()->SetDefaultLights();
|
||||
myViewer()->SetLightOn();
|
||||
myView() = myViewer()->CreateView();
|
||||
|
@@ -78,12 +78,7 @@ public:
|
||||
myGraphicDriver()->ChangeOptions().buffersNoSwap = true;
|
||||
//myGraphicDriver()->ChangeOptions().contextDebug = true;
|
||||
|
||||
TCollection_ExtendedString a3DName ("Visu3D");
|
||||
myViewer() = new V3d_Viewer (myGraphicDriver(), a3DName.ToExtString(), "", 1000.0,
|
||||
V3d_XposYnegZpos, Quantity_NOC_GRAY30,
|
||||
V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT,
|
||||
Standard_True, Standard_False);
|
||||
|
||||
myViewer() = new V3d_Viewer (myGraphicDriver());
|
||||
myViewer()->SetDefaultLights();
|
||||
myViewer()->SetLightOn();
|
||||
myView() = myViewer()->CreateView();
|
||||
|
@@ -32,17 +32,7 @@ $(ASSETDIR)/XSMessage: $(ASSETDIR)
|
||||
-mkdir -p $(ASSETDIR)/XSMessage
|
||||
cp -f -r $(OCCT_ROOT)/src/XSMessage/*.* $(ASSETDIR)/XSMessage
|
||||
|
||||
$(ASSETDIR)/TObj: $(ASSETDIR)
|
||||
-mkdir -p $(ASSETDIR)
|
||||
-mkdir -p $(ASSETDIR)/TObj
|
||||
cp -f -r $(OCCT_ROOT)/src/TObj/*.msg $(ASSETDIR)/TObj
|
||||
|
||||
$(ASSETDIR)/UnitsAPI: $(ASSETDIR)
|
||||
-mkdir -p $(ASSETDIR)
|
||||
-mkdir -p $(ASSETDIR)/UnitsAPI
|
||||
cp -f -r $(OCCT_ROOT)/src/UnitsAPI/*.dat $(ASSETDIR)/UnitsAPI
|
||||
|
||||
pre_all: $(ASSETDIR)/Shaders $(ASSETDIR)/SHMessage $(ASSETDIR)/XSMessage $(ASSETDIR)/TObj $(ASSETDIR)/UnitsAPI
|
||||
pre_all: $(ASSETDIR)/Shaders $(ASSETDIR)/SHMessage $(ASSETDIR)/XSMessage
|
||||
|
||||
jniall: pre_all all
|
||||
|
||||
|
@@ -110,9 +110,6 @@ OcctJni_Viewer::OcctJni_Viewer()
|
||||
// prepare necessary environment
|
||||
TCollection_AsciiString aResRoot = "/data/data/com.opencascade.jnisample/files";
|
||||
|
||||
setResourceEnv ("CSF_TObjMessage", aResRoot + "/TObj", "TObj.msg", Standard_False);
|
||||
setResourceEnv ("CSF_UnitsLexicon", aResRoot + "/UnitsAPI", "Lexi_Expr.dat", Standard_True);
|
||||
setResourceEnv ("CSF_UnitsDefinition", aResRoot + "/UnitsAPI", "Units.dat", Standard_True);
|
||||
setResourceEnv ("CSF_ShadersDirectory", aResRoot + "/Shaders", "Declarations.glsl", Standard_False);
|
||||
setResourceEnv ("CSF_XSMessage", aResRoot + "/XSMessage", "XSTEP.us", Standard_False);
|
||||
setResourceEnv ("CSF_SHMessage", aResRoot + "/XSMessage", "SHAPE.us", Standard_False);
|
||||
@@ -120,9 +117,6 @@ OcctJni_Viewer::OcctJni_Viewer()
|
||||
|
||||
// make sure OCCT loads the dictionary
|
||||
//UnitsAPI::SetLocalSystem (UnitsAPI_SI);
|
||||
|
||||
// load messages for TObj
|
||||
Message_MsgFile::LoadFromEnv ("CSF_TObjMessage", "TObj", "msg");
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
@@ -194,9 +188,8 @@ bool OcctJni_Viewer::init()
|
||||
}
|
||||
|
||||
// create viewer
|
||||
myViewer = new V3d_Viewer (aDriver, TCollection_ExtendedString("Viewer").ToExtString(), "", 1000.0,
|
||||
V3d_XposYnegZpos, Quantity_NOC_BLACK, V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT,
|
||||
Standard_True, Standard_False);
|
||||
myViewer = new V3d_Viewer (aDriver);
|
||||
myViewer->SetDefaultBackgroundColor (Quantity_NOC_BLACK);
|
||||
myViewer->SetDefaultLights();
|
||||
myViewer->SetLightOn();
|
||||
|
||||
|
@@ -46,7 +46,7 @@ COCCDemoDoc::COCCDemoDoc()
|
||||
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
|
||||
((COCCDemoApp*)AfxGetApp())->GetGraphicDevice();
|
||||
|
||||
myViewer = new V3d_Viewer(theGraphicDevice,(Standard_ExtString )"Visu3D");
|
||||
myViewer = new V3d_Viewer(theGraphicDevice);
|
||||
myViewer->SetDefaultLights();
|
||||
myViewer->SetLightOn();
|
||||
myViewer->SetDefaultBackgroundColor(Quantity_TOC_RGB, 0.,0.,0.);
|
||||
|
@@ -32,13 +32,11 @@ set (Geometry_ISESSION2D_HEADER_FILES ${Geometry_ISESSION2D_DIR}/ISession_Curve.
|
||||
${Geometry_ISESSION2D_DIR}/ISession_Direction.h
|
||||
${Geometry_ISESSION2D_DIR}/ISession_Point.h
|
||||
${Geometry_ISESSION2D_DIR}/ISession_Surface.h
|
||||
${Geometry_ISESSION2D_DIR}/ISession_Text.h
|
||||
${Geometry_ISESSION2D_DIR}/ISession2D_Curve.h)
|
||||
set (Geometry_ISESSION2D_SOURCE_FILES ${Geometry_ISESSION2D_DIR}/ISession_Curve.cpp
|
||||
${Geometry_ISESSION2D_DIR}/ISession_Direction.cpp
|
||||
${Geometry_ISESSION2D_DIR}/ISession_Point.cpp
|
||||
${Geometry_ISESSION2D_DIR}/ISession_Surface.cpp
|
||||
${Geometry_ISESSION2D_DIR}/ISession_Text.cpp
|
||||
${Geometry_ISESSION2D_DIR}/ISession2D_Curve.cpp)
|
||||
|
||||
set (Geometry_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/01_Geometry/res)
|
||||
@@ -70,14 +68,14 @@ add_executable (Geometry WIN32 ${Geometry_SOURCE_FILES}
|
||||
set_property(TARGET Geometry PROPERTY FOLDER Samples)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Geometry DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Geometry DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (TARGETS Geometry
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Geometry
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
|
||||
include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
|
@@ -529,24 +529,6 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ISession2D\ISession_Text.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\res\Geometry.rc">
|
||||
@@ -574,7 +556,6 @@
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Direction.h" />
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Point.h" />
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Surface.h" />
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Text.h" />
|
||||
<ClInclude Include="..\..\..\src\MainFrm.h" />
|
||||
<ClInclude Include="..\..\..\res\resource.h" />
|
||||
<ClInclude Include="..\..\..\src\StdAfx.h" />
|
||||
|
@@ -66,9 +66,6 @@
|
||||
<ClCompile Include="..\..\..\src\ISession2D\ISession_Surface.cpp">
|
||||
<Filter>Source Files\ISession2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ISession2D\ISession_Text.cpp">
|
||||
<Filter>Source Files\ISession2d</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\res\Geometry.rc">
|
||||
@@ -115,9 +112,6 @@
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Surface.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Text.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\MainFrm.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@@ -533,24 +533,6 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ISession2D\ISession_Text.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\res\Geometry.rc">
|
||||
@@ -578,7 +560,6 @@
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Direction.h" />
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Point.h" />
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Surface.h" />
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Text.h" />
|
||||
<ClInclude Include="..\..\..\src\MainFrm.h" />
|
||||
<ClInclude Include="..\..\..\res\resource.h" />
|
||||
<ClInclude Include="..\..\..\src\StdAfx.h" />
|
||||
|
@@ -66,9 +66,6 @@
|
||||
<ClCompile Include="..\..\..\src\ISession2D\ISession_Surface.cpp">
|
||||
<Filter>Source Files\ISession2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ISession2D\ISession_Text.cpp">
|
||||
<Filter>Source Files\ISession2d</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\res\Geometry.rc">
|
||||
@@ -115,9 +112,6 @@
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Surface.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Text.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\MainFrm.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@@ -533,24 +533,6 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ISession2D\ISession_Text.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\res\Geometry.rc">
|
||||
@@ -578,7 +560,6 @@
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Direction.h" />
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Point.h" />
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Surface.h" />
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Text.h" />
|
||||
<ClInclude Include="..\..\..\src\MainFrm.h" />
|
||||
<ClInclude Include="..\..\..\res\resource.h" />
|
||||
<ClInclude Include="..\..\..\src\StdAfx.h" />
|
||||
|
@@ -66,9 +66,6 @@
|
||||
<ClCompile Include="..\..\..\src\ISession2D\ISession_Surface.cpp">
|
||||
<Filter>Source Files\ISession2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ISession2D\ISession_Text.cpp">
|
||||
<Filter>Source Files\ISession2d</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\res\Geometry.rc">
|
||||
@@ -115,9 +112,6 @@
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Surface.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Text.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\MainFrm.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@@ -533,24 +533,6 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ISession2D\ISession_Text.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\res\Geometry.rc">
|
||||
@@ -578,7 +560,6 @@
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Direction.h" />
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Point.h" />
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Surface.h" />
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Text.h" />
|
||||
<ClInclude Include="..\..\..\src\MainFrm.h" />
|
||||
<ClInclude Include="..\..\..\res\resource.h" />
|
||||
<ClInclude Include="..\..\..\src\StdAfx.h" />
|
||||
|
@@ -66,9 +66,6 @@
|
||||
<ClCompile Include="..\..\..\src\ISession2D\ISession_Surface.cpp">
|
||||
<Filter>Source Files\ISession2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ISession2D\ISession_Text.cpp">
|
||||
<Filter>Source Files\ISession2d</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\res\Geometry.rc">
|
||||
@@ -115,9 +112,6 @@
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Surface.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ISession2D\ISession_Text.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\MainFrm.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#include "MainFrm.h"
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
|
||||
GeomSources::GeomSources()
|
||||
{
|
||||
}
|
||||
@@ -104,35 +105,43 @@ void GeomSources::AddSeparator(CGeometryDoc* /*aDoc*/,TCollection_AsciiString& a
|
||||
{
|
||||
aMessage+= "------------------------------------------------------------------------\n";
|
||||
}
|
||||
void GeomSources::DisplayPoint(CGeometryDoc* aDoc,
|
||||
const gp_Pnt2d& aPoint,
|
||||
const char* aText,
|
||||
Standard_Boolean UpdateViewer,
|
||||
Standard_Real anXoffset,
|
||||
Standard_Real anYoffset,
|
||||
Standard_Real TextScale)
|
||||
void GeomSources::DisplayPoint (CGeometryDoc* theDoc,
|
||||
const gp_Pnt2d& thePoint,
|
||||
const char* theText,
|
||||
Standard_Boolean theToUpdateViewer,
|
||||
Standard_Real theXoffset,
|
||||
Standard_Real theYoffset,
|
||||
Standard_Real theTextScale)
|
||||
{
|
||||
Handle(ISession_Point) aGraphicPoint = new ISession_Point(aPoint);
|
||||
aDoc->GetISessionContext()->Display(aGraphicPoint,UpdateViewer);
|
||||
Handle(ISession_Text) aGraphicText = new ISession_Text(aText,aPoint.X()+anXoffset,aPoint.Y()+anYoffset);
|
||||
aGraphicText->SetScale (TextScale);
|
||||
aDoc->GetISessionContext()->Display(aGraphicText,UpdateViewer);
|
||||
Handle(ISession_Point) aGraphicPoint = new ISession_Point (thePoint);
|
||||
theDoc->GetISessionContext()->Display (aGraphicPoint, Standard_False);
|
||||
|
||||
Handle(AIS_TextLabel) aLabel = new AIS_TextLabel();
|
||||
aLabel->SetText (theText);
|
||||
aLabel->SetPosition (gp_Pnt (thePoint.X() + theXoffset, thePoint.Y() + theYoffset, 0.0));
|
||||
//aLabel->SetHeight (theTextScale);
|
||||
(void )theTextScale;
|
||||
theDoc->GetISessionContext()->Display (aLabel, theToUpdateViewer);
|
||||
}
|
||||
|
||||
void GeomSources::DisplayPoint(CGeometryDoc* aDoc,
|
||||
const gp_Pnt& aPoint,
|
||||
const char* aText,
|
||||
Standard_Boolean UpdateViewer,
|
||||
Standard_Real anXoffset,
|
||||
Standard_Real anYoffset,
|
||||
Standard_Real aZoffset,
|
||||
Standard_Real TextScale)
|
||||
void GeomSources::DisplayPoint (CGeometryDoc* theDoc,
|
||||
const gp_Pnt& thePoint,
|
||||
const char* theText,
|
||||
Standard_Boolean theToUpdateViewer,
|
||||
Standard_Real theXoffset,
|
||||
Standard_Real theYoffset,
|
||||
Standard_Real theZoffset,
|
||||
Standard_Real theTextScale)
|
||||
{
|
||||
Handle(ISession_Point) aGraphicPoint = new ISession_Point(aPoint);
|
||||
aDoc->GetAISContext()->Display(aGraphicPoint,UpdateViewer);
|
||||
Handle(ISession_Text) aGraphicText = new ISession_Text(aText,aPoint.X()+anXoffset,aPoint.Y()+anYoffset,aPoint.Z()+aZoffset);
|
||||
aGraphicText->SetScale (TextScale);
|
||||
aDoc->GetAISContext()->Display(aGraphicText,UpdateViewer);
|
||||
Handle(ISession_Point) aGraphicPoint = new ISession_Point (thePoint);
|
||||
theDoc->GetAISContext()->Display (aGraphicPoint, Standard_False);
|
||||
|
||||
Handle(AIS_TextLabel) aLabel = new AIS_TextLabel();
|
||||
aLabel->SetText (theText);
|
||||
aLabel->SetPosition (gp_Pnt (thePoint.X() + theXoffset, thePoint.Y() + theYoffset, thePoint.Z() + theZoffset));
|
||||
//aLabel->SetHeight (theTextScale);
|
||||
(void )theTextScale;
|
||||
theDoc->GetAISContext()->Display (aLabel, theToUpdateViewer);
|
||||
}
|
||||
|
||||
void GeomSources::DisplayCurve(CGeometryDoc* aDoc,
|
||||
@@ -157,15 +166,14 @@ void GeomSources::DisplayCurveAndCurvature(CGeometryDoc* aDoc,
|
||||
aDoc->GetISessionContext()->Display(aGraphicCurve,UpdateViewer);
|
||||
}
|
||||
|
||||
void GeomSources::DisplayCurve(CGeometryDoc* aDoc,
|
||||
Handle(Geom_Curve) aCurve,
|
||||
Quantity_NameOfColor aNameOfColor,
|
||||
Standard_Boolean UpdateViewer)
|
||||
void GeomSources::DisplayCurve (CGeometryDoc* theDoc,
|
||||
Handle(Geom_Curve) theCurve,
|
||||
Quantity_NameOfColor theNameOfColor,
|
||||
Standard_Boolean theToUpdateViewer)
|
||||
{
|
||||
Handle(ISession_Curve) aGraphicCurve = new ISession_Curve(aCurve);
|
||||
aDoc->GetAISContext()->SetColor(aGraphicCurve,aNameOfColor, Standard_False);
|
||||
aGraphicCurve->Attributes()->LineAspect()->SetColor(aNameOfColor);
|
||||
aDoc->GetAISContext()->Display(aGraphicCurve,UpdateViewer);
|
||||
Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (theCurve);
|
||||
aGraphicCurve->Attributes()->SetLineAspect (new Prs3d_LineAspect (theNameOfColor, Aspect_TOL_SOLID, 1.0));
|
||||
theDoc->GetAISContext()->Display (aGraphicCurve, theToUpdateViewer);
|
||||
}
|
||||
|
||||
void GeomSources::DisplayCurve(CGeometryDoc* aDoc,
|
||||
@@ -176,20 +184,26 @@ void GeomSources::DisplayCurve(CGeometryDoc* aDoc,
|
||||
aDoc->GetAISContext()->Display(aGraphicCurve,UpdateViewer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void GeomSources::DisplaySurface(CGeometryDoc* aDoc,
|
||||
Handle(Geom_Surface) aSurface,
|
||||
Quantity_NameOfColor aNameOfColor,
|
||||
Standard_Boolean UpdateViewer)
|
||||
void GeomSources::DisplaySurface (CGeometryDoc* theDoc,
|
||||
Handle(Geom_Surface) theSurface,
|
||||
Quantity_NameOfColor theNameOfColor,
|
||||
Standard_Boolean theToUpdateViewer)
|
||||
{
|
||||
Handle(ISession_Surface) aGraphicalSurface = new ISession_Surface(aSurface);
|
||||
aDoc->GetAISContext()->SetColor(aGraphicalSurface,aNameOfColor, Standard_False);
|
||||
aGraphicalSurface->Attributes()->FreeBoundaryAspect()->SetColor(aNameOfColor);
|
||||
aGraphicalSurface->Attributes()->UIsoAspect()->SetColor(aNameOfColor);
|
||||
aGraphicalSurface->Attributes()->VIsoAspect()->SetColor(aNameOfColor);
|
||||
aDoc->GetAISContext()->Display(aGraphicalSurface,UpdateViewer);
|
||||
const Handle(AIS_InteractiveContext)& aCtx = theDoc->GetAISContext();
|
||||
Handle(Prs3d_ShadingAspect) aShadeAspect = new Prs3d_ShadingAspect();
|
||||
Handle(Prs3d_LineAspect) aLineAspect = new Prs3d_LineAspect (theNameOfColor, Aspect_TOL_SOLID, 1.0);
|
||||
Handle(Prs3d_IsoAspect) anIsoAspect = new Prs3d_IsoAspect (theNameOfColor, Aspect_TOL_SOLID, 1.0,
|
||||
aCtx->DefaultDrawer()->UIsoAspect()->Number());
|
||||
aShadeAspect->SetColor (theNameOfColor);
|
||||
|
||||
Handle(ISession_Surface) aGraphicalSurface = new ISession_Surface (theSurface);
|
||||
const Handle(Prs3d_Drawer)& aDrawer = aGraphicalSurface->Attributes();
|
||||
aDrawer->SetShadingAspect (aShadeAspect);
|
||||
aDrawer->SetLineAspect (aLineAspect);
|
||||
aDrawer->SetFreeBoundaryAspect (aLineAspect);
|
||||
aDrawer->SetUIsoAspect (anIsoAspect);
|
||||
aDrawer->SetVIsoAspect (anIsoAspect);
|
||||
aCtx->Display (aGraphicalSurface, theToUpdateViewer);
|
||||
}
|
||||
|
||||
void GeomSources::DisplaySurface(CGeometryDoc* aDoc,
|
||||
|
@@ -148,8 +148,7 @@ CGeometryDoc::CGeometryDoc()
|
||||
myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber(11);
|
||||
|
||||
Handle(Graphic3d_GraphicDriver) aGraphicDriver = ((OCC_App*)AfxGetApp())->GetGraphicDriver();
|
||||
TCollection_ExtendedString a2DName("Visu2D");
|
||||
myViewer2D = new V3d_Viewer(aGraphicDriver,a2DName.ToExtString());
|
||||
myViewer2D = new V3d_Viewer (aGraphicDriver);
|
||||
myViewer2D->SetCircularGridValues(0,0,1,8,0);
|
||||
myViewer2D->SetRectangularGridValues(0,0,1,1,0);
|
||||
|
||||
|
@@ -10,12 +10,10 @@
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(ISession2D_Curve,AIS_InteractiveObject)
|
||||
|
||||
|
||||
ISession2D_Curve::ISession2D_Curve(const Handle(Geom2d_Curve) aGeom2dCurve,
|
||||
const Aspect_TypeOfLine aTypeOfLine,
|
||||
const Aspect_WidthOfLine aWidthOfLine,
|
||||
const Standard_Integer aColorIndex)
|
||||
:AIS_InteractiveObject()
|
||||
{
|
||||
myGeom2dCurve = aGeom2dCurve;
|
||||
myTypeOfLine = aTypeOfLine ;
|
||||
@@ -28,10 +26,13 @@ ISession2D_Curve::ISession2D_Curve(const Handle(Geom2d_Curve) aGeom2dCurve,
|
||||
myradiusratio = 1;
|
||||
}
|
||||
|
||||
void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
|
||||
const Handle(Prs3d_Presentation)& aPresentation,
|
||||
const Standard_Integer /*aMode*/)
|
||||
void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& ,
|
||||
const Handle(Prs3d_Presentation)& thePrs,
|
||||
const Standard_Integer )
|
||||
{
|
||||
Handle(Graphic3d_Group) aPrsGroup = Prs3d_Root::CurrentGroup (thePrs);
|
||||
aPrsGroup->SetGroupPrimitivesAspect (myDrawer->LineAspect()->Aspect());
|
||||
aPrsGroup->SetGroupPrimitivesAspect (myDrawer->PointAspect()->Aspect());
|
||||
|
||||
Geom2dAdaptor_Curve anAdaptor(myGeom2dCurve);
|
||||
GCPnts_QuasiUniformDeflection anEdgeDistrib(anAdaptor,1.e-2);
|
||||
@@ -42,7 +43,7 @@ void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPr
|
||||
for(Standard_Integer i=1;i<=anEdgeDistrib.NbPoints();++i)
|
||||
aCurve->AddVertex(anEdgeDistrib.Value(i));
|
||||
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aCurve);
|
||||
aPrsGroup->AddPrimitiveArray (aCurve);
|
||||
}
|
||||
|
||||
if (myDisplayPole)
|
||||
@@ -56,7 +57,7 @@ void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPr
|
||||
gp_Pnt2d CurrentPoint = aBezier->Pole(i);
|
||||
anArrayOfVertex->AddVertex(CurrentPoint.X(),CurrentPoint.Y(),0.);
|
||||
}
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(anArrayOfVertex);
|
||||
aPrsGroup->AddPrimitiveArray (anArrayOfVertex);
|
||||
}
|
||||
|
||||
if (anAdaptor.GetType() == GeomAbs_BSplineCurve )
|
||||
@@ -71,7 +72,7 @@ void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPr
|
||||
gp_Pnt2d CurrentPoint = aBSpline->Pole(i);
|
||||
anArrayOfVertex->AddVertex(CurrentPoint.X(),CurrentPoint.Y(),0.);
|
||||
}
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(anArrayOfVertex);
|
||||
aPrsGroup->AddPrimitiveArray (anArrayOfVertex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +109,7 @@ void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPr
|
||||
Handle(Graphic3d_ArrayOfPolylines) aSegment = new Graphic3d_ArrayOfPolylines(2);
|
||||
aSegment->AddVertex(P1.X(),P1.Y(),0.);
|
||||
aSegment->AddVertex(P3.X(),P3.Y(),0.);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aSegment);
|
||||
aPrsGroup->AddPrimitiveArray (aSegment);
|
||||
}
|
||||
}
|
||||
t += step;
|
||||
@@ -116,10 +117,3 @@ void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ISession2D_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/,
|
||||
const Standard_Integer /*aMode*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
@@ -64,9 +64,9 @@ public:
|
||||
private:
|
||||
|
||||
// Methods PRIVATE
|
||||
//
|
||||
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const { return theMode == 0; }
|
||||
virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
|
||||
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
|
||||
void ComputeSelection(const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {}
|
||||
|
||||
// Fields PRIVATE
|
||||
//
|
||||
|
@@ -14,48 +14,23 @@ IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
|
||||
static char THIS_FILE[]=__FILE__;
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
ISession_Curve::ISession_Curve(const Handle(Geom_Curve)& aCurve)
|
||||
:AIS_InteractiveObject(),myCurve(aCurve)
|
||||
void ISession_Curve::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
|
||||
const Handle(Prs3d_Presentation)& thePrs,
|
||||
const Standard_Integer theMode)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ISession_Curve::~ISession_Curve()
|
||||
{
|
||||
|
||||
}
|
||||
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
|
||||
const Handle(Prs3d_Presentation)& aPresentation,
|
||||
const Standard_Integer aMode)
|
||||
{
|
||||
GeomAdaptor_Curve anAdaptorCurve(myCurve);
|
||||
Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer();
|
||||
aDrawer->LineAspect()->SetColor(Quantity_NOC_RED);
|
||||
|
||||
switch (aMode)
|
||||
GeomAdaptor_Curve anAdaptorCurve (myCurve);
|
||||
switch (theMode)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
case 1 :
|
||||
StdPrs_PoleCurve::Add(aPresentation, anAdaptorCurve,aDrawer);
|
||||
case 0 :
|
||||
StdPrs_Curve::Add( aPresentation, anAdaptorCurve ,myDrawer);
|
||||
break;
|
||||
Handle(Prs3d_Drawer) aPoleDrawer = new Prs3d_Drawer();
|
||||
aPoleDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_RED, Aspect_TOL_SOLID, 1.0));
|
||||
StdPrs_PoleCurve::Add (thePrs, anAdaptorCurve, aPoleDrawer);
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
StdPrs_Curve::Add (thePrs, anAdaptorCurve, myDrawer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ISession_Curve::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
|
||||
const Handle(Prs3d_Presentation)& /*aPresentation*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/,
|
||||
const Standard_Integer /*aMode*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
@@ -2,33 +2,27 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_)
|
||||
#define AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
#include "AIS_InteractiveObject.hxx"
|
||||
class ISession_Curve;
|
||||
DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject)
|
||||
|
||||
class ISession_Curve : public AIS_InteractiveObject
|
||||
{
|
||||
public:
|
||||
ISession_Curve(const Handle(Geom_Curve)& aCurve);
|
||||
virtual ~ISession_Curve();
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
|
||||
public:
|
||||
ISession_Curve(const Handle(Geom_Curve)& theCurve) : myCurve (theCurve) {}
|
||||
virtual ~ISession_Curve() {}
|
||||
|
||||
private:
|
||||
|
||||
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
|
||||
Standard_EXPORT virtual void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation) ;
|
||||
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
|
||||
virtual void Compute(const Handle(Prs3d_Projector)& ,const Handle(Prs3d_Presentation)& ) {}
|
||||
virtual void ComputeSelection (const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {}
|
||||
|
||||
private:
|
||||
Handle(Geom_Curve) myCurve;
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_)
|
||||
DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject)
|
||||
|
@@ -18,50 +18,30 @@ static char THIS_FILE[]=__FILE__;
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
ISession_Surface::ISession_Surface(const Handle(Geom_Surface)& aSurface)
|
||||
:AIS_InteractiveObject(),mySurface(aSurface)
|
||||
void ISession_Surface::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
|
||||
const Handle(Prs3d_Presentation)& thePrs,
|
||||
const Standard_Integer theMode)
|
||||
{
|
||||
}
|
||||
GeomAdaptor_Surface anAdaptorSurface (mySurface);
|
||||
Handle(GeomAdaptor_HSurface) anAdaptorHSurface = new GeomAdaptor_HSurface (mySurface);
|
||||
|
||||
ISession_Surface::~ISession_Surface()
|
||||
{
|
||||
|
||||
}
|
||||
void ISession_Surface::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
|
||||
const Handle(Prs3d_Presentation)& aPresentation,
|
||||
const Standard_Integer aMode)
|
||||
{
|
||||
|
||||
GeomAdaptor_Surface anAdaptorSurface(mySurface);
|
||||
Handle(GeomAdaptor_HSurface) anAdaptorHSurface = new GeomAdaptor_HSurface(mySurface);
|
||||
|
||||
Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer();
|
||||
aDrawer->LineAspect()->SetColor(Quantity_NOC_YELLOW3);
|
||||
|
||||
switch (aMode)
|
||||
Handle(Prs3d_Drawer) aPoleDrawer = new Prs3d_Drawer();
|
||||
aPoleDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_YELLOW3, Aspect_TOL_SOLID, 1.0));
|
||||
switch (theMode)
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
case 2:
|
||||
StdPrs_ShadedSurface::Add(aPresentation,anAdaptorSurface,myDrawer);
|
||||
break;
|
||||
case 1 :
|
||||
StdPrs_WFPoleSurface::Add(aPresentation,anAdaptorSurface,aDrawer);
|
||||
case 0 :
|
||||
StdPrs_WFSurface::Add(aPresentation,anAdaptorHSurface,myDrawer);
|
||||
break;
|
||||
StdPrs_ShadedSurface::Add (thePrs, anAdaptorSurface, myDrawer);
|
||||
break;
|
||||
}
|
||||
|
||||
case 1:
|
||||
{
|
||||
StdPrs_WFPoleSurface::Add (thePrs, anAdaptorSurface, aPoleDrawer);
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
StdPrs_WFSurface::Add (thePrs, anAdaptorHSurface, myDrawer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ISession_Surface::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
|
||||
const Handle(Prs3d_Presentation)& /*aPresentation*/)
|
||||
{
|
||||
}
|
||||
|
||||
void ISession_Surface::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/,
|
||||
const Standard_Integer /*aMode*/)
|
||||
{
|
||||
}
|
@@ -2,33 +2,29 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_ISESSION_SURFACE_H__27F86F5A_A6A4_11D1_8DA4_0800369C8A03__INCLUDED_)
|
||||
#define AFX_ISESSION_SURFACE_H__27F86F5A_A6A4_11D1_8DA4_0800369C8A03__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
class ISession_Surface;
|
||||
DEFINE_STANDARD_HANDLE(ISession_Surface,AIS_InteractiveObject)
|
||||
|
||||
class ISession_Surface : public AIS_InteractiveObject
|
||||
{
|
||||
DEFINE_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject)
|
||||
public:
|
||||
ISession_Surface();
|
||||
ISession_Surface(const Handle(Geom_Surface)& aSurface);
|
||||
virtual ~ISession_Surface();
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject)
|
||||
ISession_Surface (const Handle(Geom_Surface)& theSurface) : mySurface (theSurface) {}
|
||||
virtual ~ISession_Surface() {}
|
||||
|
||||
private:
|
||||
|
||||
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0);
|
||||
Standard_EXPORT virtual void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation);
|
||||
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode);
|
||||
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0);
|
||||
virtual void Compute (const Handle(Prs3d_Projector)& ,const Handle(Prs3d_Presentation)& ) {}
|
||||
virtual void ComputeSelection (const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {}
|
||||
|
||||
Handle(Geom_Surface) mySurface;
|
||||
private:
|
||||
|
||||
Handle(Geom_Surface) mySurface;
|
||||
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_ISESSION_SURFACE_H__27F86F5A_A6A4_11D1_8DA4_0800369C8A03__INCLUDED_)
|
||||
DEFINE_STANDARD_HANDLE(ISession_Surface, AIS_InteractiveObject)
|
||||
|
@@ -1,79 +0,0 @@
|
||||
// ISession_Text.cpp: implementation of the ISession_Text class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "..\\GeometryApp.h"
|
||||
#include "ISession_Text.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[]=__FILE__;
|
||||
//#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(ISession_Text,AIS_InteractiveObject)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
ISession_Text::ISession_Text()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ISession_Text::ISession_Text
|
||||
(const TCollection_AsciiString& aText,
|
||||
const Standard_Real anX , // = 0
|
||||
const Standard_Real anY , // = 0
|
||||
const Standard_Real aZ , // = 0
|
||||
const Quantity_PlaneAngle anAngle, // = 0.0
|
||||
const Standard_Real aslant, // = 0.0
|
||||
const Standard_Integer aColorIndex, // = 0
|
||||
const Standard_Integer aFontIndex, // = 1
|
||||
const Quantity_Factor aScale) // = 1
|
||||
:AIS_InteractiveObject(),MyText(aText),MyX(anX),MyY(anY),MyZ(aZ),
|
||||
MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex),
|
||||
MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ISession_Text::ISession_Text
|
||||
(const TCollection_AsciiString& aText,
|
||||
gp_Pnt& aPoint,
|
||||
const Quantity_PlaneAngle anAngle, // = 0.0
|
||||
const Standard_Real aslant, // = 0.0
|
||||
const Standard_Integer aColorIndex, // = 0
|
||||
const Standard_Integer aFontIndex, // = 1
|
||||
const Quantity_Factor aScale) // = 1
|
||||
:AIS_InteractiveObject(),MyText(aText),MyX(aPoint.X()),MyY(aPoint.Y()),MyZ(aPoint.Z()),
|
||||
MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex),
|
||||
MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ISession_Text::~ISession_Text()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ISession_Text::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
|
||||
const Handle(Prs3d_Presentation)& aPresentation,
|
||||
const Standard_Integer /*aMode*/)
|
||||
{
|
||||
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), myDrawer->TextAspect(), MyText, gp_Pnt(MyX, MyY, MyZ));
|
||||
}
|
||||
|
||||
void ISession_Text::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
|
||||
const Handle(Prs3d_Presentation)& /*aPresentation*/)
|
||||
{
|
||||
}
|
||||
|
||||
void ISession_Text::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/,
|
||||
const Standard_Integer /*unMode*/)
|
||||
{
|
||||
}
|
||||
|
@@ -1,147 +0,0 @@
|
||||
// ISession_Text.h: interface for the ISession_Text class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_ISESSION_TEXT_H__A9B277C4_A69E_11D1_8DA4_0800369C8A03__INCLUDED_)
|
||||
#define AFX_ISESSION_TEXT_H__A9B277C4_A69E_11D1_8DA4_0800369C8A03__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Quantity_Factor.hxx>
|
||||
#include <Quantity_PlaneAngle.hxx>
|
||||
#include <PrsMgr_PresentationManager3d.hxx>
|
||||
#include <SelectMgr_Selection.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
#include <Standard_IStream.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <SelectMgr_SelectableObject.hxx>
|
||||
|
||||
class TCollection_AsciiString;
|
||||
class SelectMgr_Selection;
|
||||
class ISession_Text;
|
||||
DEFINE_STANDARD_HANDLE(ISession_Text,AIS_InteractiveObject)
|
||||
class ISession_Text : public AIS_InteractiveObject
|
||||
{
|
||||
public:
|
||||
ISession_Text();
|
||||
|
||||
ISession_Text (const TCollection_AsciiString& aText,
|
||||
const Standard_Real anX = 0 ,
|
||||
const Standard_Real anY = 0 ,
|
||||
const Standard_Real aZ = 0 ,
|
||||
const Quantity_PlaneAngle anAngle = 0.0 ,
|
||||
const Standard_Real aSlant = 0.0 ,
|
||||
const Standard_Integer aColorIndex = 1 ,
|
||||
const Standard_Integer aFontIndex = 1 ,
|
||||
const Quantity_Factor aScale = 0.1 );
|
||||
ISession_Text
|
||||
(const TCollection_AsciiString& aText,
|
||||
gp_Pnt& aPoint,
|
||||
const Quantity_PlaneAngle anAngle = 0.0 ,
|
||||
const Standard_Real aSlant = 0.0 ,
|
||||
const Standard_Integer aColorIndex = 1 ,
|
||||
const Standard_Integer aFontIndex = 1 ,
|
||||
const Quantity_Factor aScale = 0.1 );
|
||||
|
||||
virtual ~ISession_Text();
|
||||
|
||||
inline Standard_Integer NbPossibleSelection() const;
|
||||
inline TCollection_AsciiString GetText() const;
|
||||
inline void SetText(const TCollection_AsciiString& atext) ;
|
||||
inline void GetCoord(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const ;
|
||||
inline void SetCoord(const Standard_Real X, const Standard_Real Y, const Standard_Real Z=0);
|
||||
inline Standard_Real GetAngle() const;
|
||||
inline void SetAngle(const Standard_Real aNewAngle) ;
|
||||
inline Standard_Real GetSlant() const;
|
||||
inline void SetSlant(const Standard_Real aNewSlant) ;
|
||||
inline Standard_Integer GetColorIndex() const;
|
||||
inline void SetColorIndex(const Standard_Integer aNewColorIndex) ;
|
||||
inline Standard_Integer GetFontIndex() const;
|
||||
inline void SetFontIndex(const Standard_Integer aNewFontIndex) ;
|
||||
inline Quantity_Factor GetScale() const;
|
||||
inline void SetScale (const Quantity_Factor aNewScale) ;
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(ISession_Text,AIS_InteractiveObject)
|
||||
|
||||
private:
|
||||
|
||||
void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
|
||||
const Handle(Prs3d_Presentation)& aPresentation,
|
||||
const Standard_Integer aMode);
|
||||
void Compute (const Handle(Prs3d_Projector)& aProjector,
|
||||
const Handle(Prs3d_Presentation)& aPresentation);
|
||||
void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection,
|
||||
const Standard_Integer unMode) ;
|
||||
|
||||
|
||||
// Fields PRIVATE
|
||||
//
|
||||
TCollection_AsciiString MyText ;
|
||||
Standard_Real MyX ;
|
||||
Standard_Real MyY ;
|
||||
Standard_Real MyZ ;
|
||||
Standard_Real MyAngle ;
|
||||
Standard_Real MySlant ;
|
||||
Standard_Integer MyColorIndex ;
|
||||
Standard_Integer MyFontIndex ;
|
||||
Quantity_Factor MyScale ;
|
||||
Standard_Real MyWidth ;
|
||||
Standard_Real MyHeight ;
|
||||
|
||||
|
||||
};
|
||||
|
||||
inline Standard_Integer ISession_Text::NbPossibleSelection() const
|
||||
{ return 1; }
|
||||
|
||||
inline TCollection_AsciiString ISession_Text::GetText() const
|
||||
{ return MyText ; }
|
||||
|
||||
inline void ISession_Text::SetText(const TCollection_AsciiString& atext)
|
||||
{ MyText = atext; }
|
||||
|
||||
inline void ISession_Text::GetCoord(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const
|
||||
{ X = MyX; Y = MyY; Z = MyZ;}
|
||||
|
||||
inline void ISession_Text::SetCoord(const Standard_Real X, const Standard_Real Y, const Standard_Real Z)
|
||||
{ MyX = X ; MyY = Y ; MyZ = Z ;}
|
||||
|
||||
inline Standard_Real ISession_Text::GetAngle() const
|
||||
{ return MyAngle; }
|
||||
|
||||
inline void ISession_Text::SetAngle(const Standard_Real aNewAngle)
|
||||
{ MyAngle = aNewAngle; }
|
||||
|
||||
inline Standard_Real ISession_Text::GetSlant() const
|
||||
{ return MySlant; }
|
||||
|
||||
inline void ISession_Text::SetSlant(const Standard_Real aNewSlant)
|
||||
{ MySlant = aNewSlant; }
|
||||
|
||||
inline Standard_Integer ISession_Text::GetColorIndex() const
|
||||
{ return MyColorIndex; }
|
||||
|
||||
inline void ISession_Text::SetColorIndex(const Standard_Integer aNewColorIndex)
|
||||
{ MyColorIndex = aNewColorIndex; }
|
||||
|
||||
inline Standard_Integer ISession_Text::GetFontIndex() const
|
||||
{ return MyFontIndex; }
|
||||
|
||||
inline void ISession_Text::SetFontIndex(const Standard_Integer aNewFontIndex)
|
||||
{ MyFontIndex = aNewFontIndex; }
|
||||
|
||||
inline Quantity_Factor ISession_Text::GetScale() const
|
||||
{ return MyScale; }
|
||||
|
||||
inline void ISession_Text::SetScale(const Quantity_Factor aNewScale)
|
||||
{ MyScale = aNewScale; }
|
||||
|
||||
#endif // !defined(AFX_ISESSION_TEXT_H__A9B277C4_A69E_11D1_8DA4_0800369C8A03__INCLUDED_)
|
@@ -80,6 +80,7 @@
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_Shape.hxx>
|
||||
#include <AIS_Point.hxx>
|
||||
#include <AIS_TextLabel.hxx>
|
||||
#include <Aspect_Grid.hxx>
|
||||
#include <Aspect_Window.hxx>
|
||||
#include <Aspect_Background.hxx>
|
||||
@@ -270,7 +271,6 @@
|
||||
#include "ISession_Direction.h"
|
||||
#include "ISession_Curve.h"
|
||||
#include "ISession_Surface.h"
|
||||
#include "ISession_Text.h"
|
||||
#include "ISession_Point.h"
|
||||
|
||||
#include <UnitsAPI.hxx>
|
||||
|
@@ -40,14 +40,14 @@ add_executable ( Modeling WIN32 ${Modeling_SOURCE_FILES}
|
||||
set_property (TARGET Modeling PROPERTY FOLDER Samples)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Modeling DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Modeling DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (TARGETS Modeling
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Modeling
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
|
||||
include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
|
@@ -4388,7 +4388,7 @@ Standard_Real Length = System.Mass();\n\
|
||||
gp_Mat I = System.MatrixOfInertia();\n\
|
||||
\n");
|
||||
PocessTextInDialog("Linear Properties", Message);
|
||||
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, (const wchar_t* )string.ToExtString(), L"Linear Properties", MB_OK);
|
||||
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, string.ToWideString(), L"Linear Properties", MB_OK);
|
||||
}
|
||||
|
||||
void CModelingDoc::OnSurface()
|
||||
@@ -4503,7 +4503,7 @@ Standard_Real Area = System.Mass();\n\
|
||||
gp_Mat I = System.MatrixOfInertia();\n\
|
||||
\n");
|
||||
PocessTextInDialog("Surface Properties", Message);
|
||||
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, (const wchar_t* )string.ToExtString(), L"Surface Properties", MB_OK);
|
||||
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, string.ToWideString(), L"Surface Properties", MB_OK);
|
||||
|
||||
}
|
||||
|
||||
@@ -4585,7 +4585,7 @@ Standard_Real Volume = System.Mass();\n\
|
||||
gp_Mat I = System.MatrixOfInertia();\n\
|
||||
\n");
|
||||
PocessTextInDialog("Volume Properties", Message);
|
||||
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, (const wchar_t* )string.ToExtString(), L"Volume Properties", MB_OK);
|
||||
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, string.ToWideString(), L"Volume Properties", MB_OK);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -36,14 +36,14 @@ add_executable (Viewer2d WIN32 ${Viewer2d_SOURCE_FILES}
|
||||
set_property (TARGET Viewer2d PROPERTY FOLDER Samples)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Viewer2d DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Viewer2d DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (TARGETS Viewer2d
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Viewer2d
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
|
||||
include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
|
@@ -74,6 +74,7 @@
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_InteractiveObject.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_TextLabel.hxx>
|
||||
#include <AIS_TexturedShape.hxx>
|
||||
|
||||
#include <Aspect_TypeOfline.hxx>
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#include "Viewer2dDoc.h"
|
||||
#include "OCC_App.h"
|
||||
#include "Primitive\Sample2D_Markers.h"
|
||||
#include "Primitive\Sample2D_Text.h"
|
||||
#include "Primitive\Sample2D_Face.h"
|
||||
#include "Primitive\Sample2D_Image.h"
|
||||
|
||||
@@ -64,75 +63,69 @@ void CViewer2dDoc::OnBUTTONErase()
|
||||
|
||||
void CViewer2dDoc::OnBUTTONTestText()
|
||||
{
|
||||
int aColor= 1;
|
||||
Standard_Real j;
|
||||
for (j=15;j<=20;j++)
|
||||
int aColor = Quantity_NOC_MATRABLUE;
|
||||
for (Standard_Real j = 15; j <= 20; j++)
|
||||
{
|
||||
TCollection_AsciiString Text("font 0 scale ");Text+=j/20.0;
|
||||
Handle (Sample2D_Text) aText =
|
||||
new Sample2D_Text(Text,
|
||||
gp_Pnt(0.0,15.0*(j-15.0),0.0), // thePosition
|
||||
10.0*M_PI, // theAngle
|
||||
(Quantity_NameOfColor)(aColor++), // theColor
|
||||
Font_FA_Regular, // theFontAspect
|
||||
"Courier", // theFont
|
||||
j, // theScale
|
||||
Graphic3d_HTA_LEFT,
|
||||
Graphic3d_VTA_BOTTOM,
|
||||
Standard_False); // aIsZoomable
|
||||
|
||||
Handle(AIS_TextLabel) aText = new AIS_TextLabel();
|
||||
aText->SetText (TCollection_AsciiString ("font 0 scale ") + (j / 20.0));
|
||||
aText->SetPosition (gp_Pnt (0.0, 15.0 * (j - 15.0), 0.0));
|
||||
aText->SetAngle (30.0 * M_PI / 180.0);
|
||||
aText->SetColor (Quantity_NameOfColor(aColor++));
|
||||
aText->SetFontAspect (Font_FA_Regular);
|
||||
aText->SetFont ("Courier");
|
||||
aText->SetHeight (j);
|
||||
aText->SetHJustification (Graphic3d_HTA_LEFT);
|
||||
aText->SetVJustification (Graphic3d_VTA_BOTTOM);
|
||||
aText->SetZoomable (Standard_False);
|
||||
myAISContext->Display(aText, Standard_False);
|
||||
}
|
||||
|
||||
for (j=10;j<=15;j++)
|
||||
for (Standard_Real j = 10; j <= 15; j++)
|
||||
{
|
||||
TCollection_AsciiString Text("font 1 scale ");Text+=j/10.0;
|
||||
Handle (Sample2D_Text) aText =
|
||||
new Sample2D_Text(Text,
|
||||
gp_Pnt(80.,15.0*(j-10.0),0.0), // thePosition
|
||||
0.0, // theAngle
|
||||
(Quantity_NameOfColor)(aColor++), // theColor
|
||||
Font_FA_BoldItalic, // theFontAspect
|
||||
"Cambria", // theFont
|
||||
j*2, // theScale
|
||||
Graphic3d_HTA_LEFT,
|
||||
Graphic3d_VTA_BOTTOM,
|
||||
Standard_False); // aIsZoomable
|
||||
|
||||
Handle(AIS_TextLabel) aText = new AIS_TextLabel();
|
||||
aText->SetText (TCollection_AsciiString ("font 1 scale ") + (j / 10.0));
|
||||
aText->SetPosition (gp_Pnt (80.0, 15.0 * (j - 10.0), 0.0));
|
||||
aText->SetAngle (0.0);
|
||||
aText->SetColor (Quantity_NameOfColor(aColor++));
|
||||
aText->SetFontAspect (Font_FA_BoldItalic);
|
||||
aText->SetFont ("Cambria");
|
||||
aText->SetHeight (j * 2);
|
||||
aText->SetHJustification (Graphic3d_HTA_LEFT);
|
||||
aText->SetVJustification (Graphic3d_VTA_BOTTOM);
|
||||
aText->SetZoomable (Standard_False);
|
||||
myAISContext->Display(aText, Standard_False);
|
||||
}
|
||||
aColor = 1;
|
||||
for (j=5;j<=10;j++)
|
||||
|
||||
aColor = Quantity_NOC_MATRABLUE;
|
||||
for (Standard_Real j = 5; j <= 10; j++)
|
||||
{
|
||||
TCollection_AsciiString Text("font 2 scale ");Text+=j/10.0;
|
||||
Handle (Sample2D_Text) aText =
|
||||
new Sample2D_Text(Text,
|
||||
gp_Pnt(140.0,15.0*(j-5.0),0.0), // thePosition
|
||||
0.0, // theAngle
|
||||
(Quantity_NameOfColor)(aColor++), // theColor
|
||||
Font_FA_Bold, // theFontAspect
|
||||
"Arial", // theFont
|
||||
j*2, // theScale
|
||||
Graphic3d_HTA_LEFT,
|
||||
Graphic3d_VTA_BOTTOM,
|
||||
Standard_False); // aIsZoomable
|
||||
myAISContext->Display(aText,Standard_False);
|
||||
Handle(AIS_TextLabel) aText = new AIS_TextLabel();
|
||||
aText->SetText (TCollection_AsciiString ("font 2 scale ") + (j / 10.0));
|
||||
aText->SetPosition (gp_Pnt (140.0, 15.0 * (j - 5.0), 0.0));
|
||||
aText->SetAngle (0.0);
|
||||
aText->SetColor (Quantity_NameOfColor(aColor++));
|
||||
aText->SetFontAspect (Font_FA_Bold);
|
||||
aText->SetFont ("Arial");
|
||||
aText->SetHeight (j * 2);
|
||||
aText->SetHJustification (Graphic3d_HTA_LEFT);
|
||||
aText->SetVJustification (Graphic3d_VTA_BOTTOM);
|
||||
aText->SetZoomable (Standard_False);
|
||||
myAISContext->Display(aText, Standard_False);
|
||||
}
|
||||
for (j=10;j<=15;j++)
|
||||
for (Standard_Real j = 10; j <= 15; j++)
|
||||
{
|
||||
TCollection_AsciiString Text("font 3 scale ");Text+=j/10.0;
|
||||
Handle (Sample2D_Text) aText =
|
||||
new Sample2D_Text(Text,
|
||||
gp_Pnt(200.0,15.0*(j-10.0),0.0), // thePosition
|
||||
0.0, // theAngle
|
||||
(Quantity_NameOfColor)(aColor++),// theColor
|
||||
Font_FA_Italic, // theFontAspect
|
||||
"Georgia", // theFont
|
||||
j*2, // theScale
|
||||
Graphic3d_HTA_LEFT,
|
||||
Graphic3d_VTA_BOTTOM,
|
||||
Standard_False); // aIsZoomable
|
||||
myAISContext->Display(aText,Standard_False);
|
||||
Handle(AIS_TextLabel) aText = new AIS_TextLabel();
|
||||
aText->SetText (TCollection_AsciiString ("font 3 scale ") + (j / 10.0));
|
||||
aText->SetPosition (gp_Pnt (200.0, 15.0 * (j - 10.0), 0.0));
|
||||
aText->SetAngle (0.0);
|
||||
aText->SetColor (Quantity_NameOfColor(aColor++));
|
||||
aText->SetFontAspect (Font_FA_Italic);
|
||||
aText->SetFont ("Georgia");
|
||||
aText->SetHeight (j * 2);
|
||||
aText->SetHJustification (Graphic3d_HTA_LEFT);
|
||||
aText->SetVJustification (Graphic3d_VTA_BOTTOM);
|
||||
aText->SetZoomable (Standard_False);
|
||||
myAISContext->Display(aText, Standard_False);
|
||||
}
|
||||
|
||||
FitAll2DViews(Standard_True); // Update Viewer
|
||||
@@ -321,7 +314,7 @@ void CViewer2dDoc::OnBUTTONTestImage()
|
||||
NULL,
|
||||
NULL,
|
||||
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
SupportedImageFormats() + "| all files (*.*)|*.*;||",
|
||||
SupportedImageFormats() + L"| all files (*.*)|*.*;||",
|
||||
NULL);
|
||||
|
||||
CString anInitDir (((OCC_App*) AfxGetApp())->GetInitDataDir());
|
||||
@@ -332,8 +325,7 @@ void CViewer2dDoc::OnBUTTONTestImage()
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT));
|
||||
CString aFilePath = anOpenImageDlg.GetPathName();
|
||||
TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )aFilePath);
|
||||
TCollection_AsciiString aFileName (aFileNameW, '?');
|
||||
TCollection_AsciiString aFileName ((const wchar_t* )aFilePath);
|
||||
|
||||
//erase viewer
|
||||
if(myAISContext->HasOpenedContext())
|
||||
@@ -355,7 +347,7 @@ void CViewer2dDoc::OnBUTTONMultipleImage()
|
||||
NULL,
|
||||
NULL,
|
||||
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
SupportedImageFormats() + "| all files (*.*)|*.*;||",
|
||||
SupportedImageFormats() + L"| all files (*.*)|*.*;||",
|
||||
NULL);
|
||||
|
||||
CString anInitDir (((OCC_App*) AfxGetApp())->GetInitDataDir());
|
||||
@@ -367,8 +359,7 @@ void CViewer2dDoc::OnBUTTONMultipleImage()
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT));
|
||||
CString aFilePath = anOpenImageDlg.GetPathName();
|
||||
TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )aFilePath);
|
||||
TCollection_AsciiString aFileName (aFileNameW, '?');
|
||||
TCollection_AsciiString aFileName ((const wchar_t* )aFilePath);
|
||||
|
||||
//erase viewer
|
||||
if(myAISContext->HasOpenedContext())
|
||||
|
@@ -60,14 +60,14 @@ add_executable (Viewer3d WIN32 ${Viewer3d_SOURCE_FILES}
|
||||
set_property (TARGET Viewer3d PROPERTY FOLDER Samples)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Viewer3d DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Viewer3d DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (TARGETS Viewer3d
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Viewer3d
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
|
||||
include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
|
@@ -104,9 +104,8 @@ STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ShadingModel"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
PUSHBUTTON "COLOR",IDC_SHADINGMODEL_COLOR,7,7,46,16
|
||||
PUSHBUTTON "FLAT",IDC_SHADINGMODEL_FLAT,7,25,46,15
|
||||
PUSHBUTTON "GOURAUD",IDC_SHADINGMODEL_GOURAUD,7,43,46,16
|
||||
PUSHBUTTON "GOURAUD",IDC_SHADINGMODEL_GOURAUD,7,7,46,16
|
||||
PUSHBUTTON "PHONG", IDC_SHADINGMODEL_PHONG, 7,25,46,15
|
||||
END
|
||||
|
||||
IDD_MODELCLIPPING DIALOG 0, 0, 180, 74
|
||||
|
@@ -121,13 +121,16 @@ BOOL CModelClippingDlg::OnInitDialog()
|
||||
{
|
||||
// register and activate clipping plane
|
||||
Standard_Boolean toAddPlane = Standard_True;
|
||||
Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (myView->GetClipPlanes());
|
||||
for (; aPlaneIt.More(); aPlaneIt.Next())
|
||||
Handle(Graphic3d_SequenceOfHClipPlane) aPlanes = myView->ClipPlanes();
|
||||
if (!aPlanes.IsNull())
|
||||
{
|
||||
if (aPlaneIt.Value() == myClippingPlane)
|
||||
for (Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (*aPlanes); aPlaneIt.More(); aPlaneIt.Next())
|
||||
{
|
||||
toAddPlane = Standard_False;
|
||||
break;
|
||||
if (aPlaneIt.Value() == myClippingPlane)
|
||||
{
|
||||
toAddPlane = Standard_False;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,13 +203,16 @@ void CModelClippingDlg::OnCheckModelclippingonoff()
|
||||
{
|
||||
// register and activate clipping plane
|
||||
Standard_Boolean toAddPlane = Standard_True;
|
||||
Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (myView->GetClipPlanes());
|
||||
for (; aPlaneIt.More(); aPlaneIt.Next())
|
||||
Handle(Graphic3d_SequenceOfHClipPlane) aPlanes = myView->ClipPlanes();
|
||||
if (!aPlanes.IsNull())
|
||||
{
|
||||
if (aPlaneIt.Value() == myClippingPlane)
|
||||
for (Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (*aPlanes); aPlaneIt.More(); aPlaneIt.Next())
|
||||
{
|
||||
toAddPlane = Standard_False;
|
||||
break;
|
||||
if (aPlaneIt.Value() == myClippingPlane)
|
||||
{
|
||||
toAddPlane = Standard_False;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +239,7 @@ void CModelClippingDlg::OnCheckModelclippingonoff()
|
||||
EOL "if (...)"
|
||||
EOL "{"
|
||||
EOL " // register and activate clipping plane"
|
||||
EOL " if (!myView->GetClipPlanes().Contains (myClippingPlane))"
|
||||
EOL " if (!myView->ClipPlanes()->Contains (myClippingPlane))"
|
||||
EOL " {"
|
||||
EOL " myView->AddClipPlane (myClippingPlane);"
|
||||
EOL " }"
|
||||
|
@@ -143,8 +143,7 @@ Handle(AIS_TexturedShape) TexturesExt_Presentation::Texturize(const TopoDS_Shape
|
||||
initfile += aTFileName.ToCString();
|
||||
}
|
||||
|
||||
TCollection_ExtendedString aFileName ((Standard_ExtString )(const wchar_t* )initfile);
|
||||
aTShape->SetTextureFileName (TCollection_AsciiString (aFileName, '?'));
|
||||
aTShape->SetTextureFileName (TCollection_AsciiString ((const wchar_t* )initfile));
|
||||
|
||||
// do other initialization of AIS_TexturedShape
|
||||
aTShape->SetTextureMapOn();
|
||||
|
@@ -527,20 +527,10 @@ void CViewer3dDoc::InputEvent(const Standard_Integer /*x*/,
|
||||
GetBValue (MSColor)/255.0,
|
||||
Quantity_TOC_RGB);
|
||||
|
||||
TopoDS_Shape S = myAISContext->SelectedShape();
|
||||
Handle(Geom_Surface) Surface = BRep_Tool::Surface (TopoDS::Face(S));
|
||||
if (Surface->IsKind (STANDARD_TYPE (Geom_Plane)))
|
||||
{
|
||||
Handle(User_Cylinder)::DownCast (myAISContext->SelectedInteractive())
|
||||
->SetPlanarFaceColor (CSFColor.Name());
|
||||
}
|
||||
else
|
||||
{
|
||||
Handle(User_Cylinder)::DownCast (myAISContext->SelectedInteractive())
|
||||
->SetCylindricalFaceColor (CSFColor.Name());
|
||||
}
|
||||
Handle(AIS_InteractiveObject) aSelectedObject = myAISContext->SelectedInteractive();
|
||||
Handle(User_Cylinder)::DownCast (aSelectedObject)->SetColor (CSFColor.Name());
|
||||
|
||||
myAISContext->Redisplay (myAISContext->SelectedInteractive());
|
||||
myAISContext->Redisplay (aSelectedObject);
|
||||
myState = -1;
|
||||
myAISContext->CloseLocalContext();
|
||||
}
|
||||
|
@@ -38,14 +38,14 @@ add_executable (ImportExport WIN32 ${ImportExport_SOURCE_FILES}
|
||||
set_property (TARGET ImportExport PROPERTY FOLDER Samples)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS ImportExport DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (TARGETS ImportExport DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (TARGETS ImportExport
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (TARGETS ImportExport
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
|
||||
include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
|
@@ -134,19 +134,19 @@ void CImportExportApp::OnFileOpen()
|
||||
// add to filter
|
||||
strFilter += strFilterName;
|
||||
ASSERT(!strFilter.IsEmpty()); // must have a file type name
|
||||
strFilter += (TCHAR)'\0'; // next string please
|
||||
strFilter += (TCHAR)'*';
|
||||
strFilter += L'\0'; // next string please
|
||||
strFilter += L'*';
|
||||
strFilter += strFilterExt;
|
||||
strFilter += (TCHAR)'\0'; // next string please
|
||||
strFilter += L'\0'; // next string please
|
||||
dlg.m_ofn.nMaxCustFilter++;
|
||||
}
|
||||
// append the "*.*" all files filter
|
||||
CString allFilter;
|
||||
VERIFY(allFilter.LoadString(AFX_IDS_ALLFILTER));
|
||||
strFilter += allFilter;
|
||||
strFilter += (TCHAR)'\0'; // next string please
|
||||
strFilter += _T("*.*");
|
||||
strFilter += (TCHAR)'\0'; // last string
|
||||
strFilter += L'\0'; // next string please
|
||||
strFilter += L"*.*";
|
||||
strFilter += L'\0'; // last string
|
||||
dlg.m_ofn.nMaxCustFilter++;
|
||||
dlg.m_ofn.lpstrFilter = strFilter;
|
||||
|
||||
|
@@ -52,14 +52,14 @@ add_executable (Ocaf WIN32 ${Ocaf_SOURCE_FILES}
|
||||
set_property (TARGET Ocaf PROPERTY FOLDER Samples)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Ocaf DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Ocaf DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (TARGETS Ocaf
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Ocaf
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
|
||||
include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
@@ -67,4 +67,4 @@ include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
${Ocaf_SRC_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
|
||||
target_link_libraries (Ocaf mfcsample TKLCAF TKVCAF TKBO)
|
||||
target_link_libraries (Ocaf mfcsample TKLCAF TKVCAF TKBO TKBin TKXml)
|
||||
|
@@ -112,7 +112,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKVCAF.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win32\vc10\bin/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win32\vc10\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -154,7 +154,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win64\vc10\bin/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win64\vc10\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -195,7 +195,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKVCAF.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win32\vc10\bind/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win32\vc10\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -237,7 +237,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win64\vc10\bind/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win64\vc10\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
|
@@ -116,7 +116,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win32\vc11\bin/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win32\vc11\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -158,7 +158,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win64\vc11\bin/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win64\vc11\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -199,7 +199,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win32\vc11\bind/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win32\vc11\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -241,7 +241,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win64\vc11\bind/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win64\vc11\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
|
@@ -116,7 +116,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win32\vc12\bin/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win32\vc12\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -158,7 +158,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win64\vc12\bin/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win64\vc12\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -199,7 +199,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win32\vc12\bind/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win32\vc12\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -241,7 +241,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win64\vc12\bind/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win64\vc12\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
|
@@ -116,7 +116,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win32\vc14\bin/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win32\vc14\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -158,7 +158,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win64\vc14\bin/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win64\vc14\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -199,7 +199,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win32\vc14\bind/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win32\vc14\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -241,7 +241,7 @@
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>../../../../win64\vc14\bind/Ocaf.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\win64\vc14\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
|
@@ -13,6 +13,9 @@
|
||||
#include "direct.h"
|
||||
#include <OSD_Environment.hxx>
|
||||
|
||||
#include <BinDrivers.hxx>
|
||||
#include <XmlDrivers.hxx>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// COcafApp
|
||||
|
||||
@@ -39,6 +42,10 @@ COcafApp::COcafApp() : OCC_App()
|
||||
SampleName = "OCAF"; //for about dialog
|
||||
SetSamplePath (L"..\\..\\06_Ocaf");
|
||||
|
||||
// load persistence
|
||||
BinDrivers::DefineFormat (myApp);
|
||||
XmlDrivers::DefineFormat (myApp);
|
||||
|
||||
try
|
||||
{
|
||||
UnitsAPI::SetLocalSystem(UnitsAPI_MDTV);
|
||||
|
@@ -213,7 +213,7 @@ void COcafDoc::OnCreatebox()
|
||||
|
||||
// Create a new box using the CNewBoxDlg Dialog parameters as attributes
|
||||
TDF_Label L = TSC.CreateBox (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_w, Dlg.m_l, Dlg.m_h,
|
||||
TCollection_ExtendedString ((Standard_ExtString )(const wchar_t* )Dlg.m_Name));
|
||||
TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name));
|
||||
|
||||
// Get the TPrsStd_AISPresentation of the new box TNaming_NamedShape
|
||||
Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID());
|
||||
@@ -270,7 +270,7 @@ void COcafDoc::OnCreatecyl()
|
||||
|
||||
// Create a new box using the CNewCylDlg Dialog parameters as attributes
|
||||
TDF_Label L = TSC.CreateCyl (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_r, Dlg.m_h,
|
||||
TCollection_ExtendedString ((Standard_ExtString )(const wchar_t* )Dlg.m_Name));
|
||||
TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name));
|
||||
|
||||
// Get the TPrsStd_AISPresentation of the new cylinder TNaming_NamedShape
|
||||
Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID());
|
||||
@@ -389,7 +389,7 @@ Handle(TFunction_Function) TFF; \n\
|
||||
// Modify the box
|
||||
TOcaf_Commands TSC(LabObject);
|
||||
TSC.ModifyBox (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_w, Dlg.m_l, Dlg.m_h,
|
||||
TCollection_ExtendedString ((Standard_ExtString )(const wchar_t* )Dlg.m_Name), log);
|
||||
TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name), log);
|
||||
|
||||
// Get the presentation of the box, display it and set it selected
|
||||
Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID());
|
||||
@@ -474,7 +474,7 @@ D->CommitCommand(); \n\
|
||||
// Modify the cylinder
|
||||
TOcaf_Commands TSC(LabObject);
|
||||
TSC.ModifyCyl (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_r, Dlg.m_h,
|
||||
TCollection_ExtendedString ((Standard_ExtString )(const wchar_t* )Dlg.m_Name), log);
|
||||
TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name), log);
|
||||
|
||||
// Get the presentation of the cylinder, display it and set it selected
|
||||
Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID());
|
||||
@@ -591,7 +591,7 @@ D->CommitCommand(); \n\
|
||||
// Modify the cylinder
|
||||
TOcaf_Commands ToolTSC(ToolLab);
|
||||
ToolTSC.ModifyCyl (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_r, Dlg.m_h,
|
||||
TCollection_ExtendedString ((Standard_ExtString )(const wchar_t* )Dlg.m_Name), log);
|
||||
TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name), log);
|
||||
|
||||
// Redisplay the modified Tool object
|
||||
TDataStd_Integer::Set(ToolLab, 1);
|
||||
@@ -899,7 +899,7 @@ void COcafDoc::OnCloseDocument()
|
||||
void COcafDoc::OnFileSaveAs()
|
||||
{
|
||||
const wchar_t* SPathName = PathName;
|
||||
TCollection_ExtendedString TPathName ((Standard_ExtString )SPathName);
|
||||
TCollection_ExtendedString TPathName (SPathName);
|
||||
|
||||
CString Filter;
|
||||
|
||||
@@ -928,7 +928,7 @@ void COcafDoc::OnFileSaveAs()
|
||||
cout << "Save As " << CSPath << endl;
|
||||
PathName=CSPath;
|
||||
const wchar_t* SPath = CSPath;
|
||||
TCollection_ExtendedString TPath ((Standard_ExtString )SPath);
|
||||
TCollection_ExtendedString TPath (SPath);
|
||||
|
||||
if (TPath.SearchFromEnd(".xml") > 0)
|
||||
{
|
||||
@@ -984,7 +984,7 @@ void COcafDoc::OnFileSave()
|
||||
if(PathName!="")
|
||||
{
|
||||
const wchar_t* SPath = PathName;
|
||||
TCollection_ExtendedString TPath ((Standard_ExtString )SPath);
|
||||
TCollection_ExtendedString TPath (SPath);
|
||||
|
||||
if (TPath.SearchFromEnd(".xml") > 0)
|
||||
{
|
||||
@@ -1038,7 +1038,7 @@ m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\
|
||||
CString CSPath = dlg.GetPathName();
|
||||
|
||||
const wchar_t* SPath = CSPath;
|
||||
TCollection_ExtendedString TPath ((Standard_ExtString )SPath);
|
||||
TCollection_ExtendedString TPath (SPath);
|
||||
|
||||
// Choose storage format
|
||||
if (TPath.SearchFromEnd(".xml") > 0)
|
||||
@@ -1094,7 +1094,7 @@ BOOL COcafDoc::OnOpenDocument(LPCTSTR lpszPathName)
|
||||
PathName = lpszPathName;
|
||||
|
||||
const wchar_t* aPathName = lpszPathName;
|
||||
TCollection_ExtendedString anOccPathName ((Standard_ExtString)aPathName);
|
||||
TCollection_ExtendedString anOccPathName (aPathName);
|
||||
|
||||
// Open the document in the current application
|
||||
//PCDM_ReaderStatus RS = m_App->Open(TPath,myOcafDoc);
|
||||
|
@@ -22,42 +22,16 @@
|
||||
|
||||
TOcaf_Application::TOcaf_Application()
|
||||
{
|
||||
// Instanciate a TOcafFunction_BoxDriver and add it to the TFunction_DriverTable
|
||||
TFunction_DriverTable::Get()->AddDriver(TOcafFunction_BoxDriver::GetID(),
|
||||
new TOcafFunction_BoxDriver());
|
||||
// Instanciate a TOcafFunction_BoxDriver and add it to the TFunction_DriverTable
|
||||
TFunction_DriverTable::Get()->AddDriver (TOcafFunction_BoxDriver::GetID(),
|
||||
new TOcafFunction_BoxDriver());
|
||||
|
||||
// Instanciate a TOcafFunction_CylDriver and add it to the TFunction_DriverTable
|
||||
TFunction_DriverTable::Get()->AddDriver(TOcafFunction_CylDriver::GetID(),
|
||||
new TOcafFunction_CylDriver());
|
||||
|
||||
// Instanciate a TOcafFunction_CutDriver and add it to the TFunction_DriverTable
|
||||
Handle(TOcafFunction_CutDriver) myCutDriver = new TOcafFunction_CutDriver();
|
||||
TFunction_DriverTable::Get()->AddDriver(TOcafFunction_CutDriver::GetID(),
|
||||
new TOcafFunction_CutDriver());
|
||||
// Instanciate a TOcafFunction_Cyl Driver and add it to the TFunction_DriverTable
|
||||
TFunction_DriverTable::Get()->AddDriver (TOcafFunction_CylDriver::GetID(),
|
||||
new TOcafFunction_CylDriver());
|
||||
|
||||
// Instanciate a TOcafFunction_CutDriver and add it to the TFunction_DriverTable
|
||||
Handle(TOcafFunction_CutDriver) myCutDriver = new TOcafFunction_CutDriver();
|
||||
TFunction_DriverTable::Get()->AddDriver (TOcafFunction_CutDriver::GetID(),
|
||||
new TOcafFunction_CutDriver());
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Formats
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TOcaf_Application::Formats(TColStd_SequenceOfExtendedString& Formats)
|
||||
{
|
||||
Formats.Append(TCollection_ExtendedString("BinOcaf"));
|
||||
Formats.Append(TCollection_ExtendedString("XmlOcaf"));
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : ResourcesName
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_CString TOcaf_Application::ResourcesName()
|
||||
{
|
||||
return Standard_CString ("Standard");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -33,12 +33,6 @@ public:
|
||||
// Methods PUBLIC
|
||||
//
|
||||
Standard_EXPORT TOcaf_Application();
|
||||
Standard_EXPORT virtual void Formats(TColStd_SequenceOfExtendedString& Formats) ;
|
||||
Standard_EXPORT Standard_CString ResourcesName() ;
|
||||
Standard_EXPORT ~TOcaf_Application();
|
||||
|
||||
|
||||
|
||||
|
||||
// Type management
|
||||
//
|
||||
|
@@ -18,8 +18,6 @@
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
#endif
|
||||
|
||||
TOcaf_Application::~TOcaf_Application() {}
|
||||
|
||||
// DownCast method
|
||||
// allow safe downcasting
|
||||
//
|
||||
|
@@ -42,14 +42,14 @@ add_executable (Triangulation WIN32 ${Triangulation_SOURCE_FILES}
|
||||
set_property (TARGET Triangulation PROPERTY FOLDER Samples)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Triangulation DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Triangulation DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (TARGETS Triangulation
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Triangulation
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
|
||||
include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
|
@@ -64,14 +64,14 @@ add_executable (HLR WIN32 ${HLR_SOURCE_FILES}
|
||||
set_property (TARGET HLR PROPERTY FOLDER Samples)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS HLR DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (TARGETS HLR DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (TARGETS HLR
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (TARGETS HLR
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
|
||||
include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
|
@@ -49,20 +49,14 @@ CHLRDoc::CHLRDoc()
|
||||
((CHLRApp*)AfxGetApp())->GetGraphicDriver();
|
||||
|
||||
// VIEWER 3D
|
||||
TCollection_ExtendedString a3DName ("Visu3D");
|
||||
myViewer = new V3d_Viewer (theGraphicDriver, a3DName.ToExtString(), "", 1000.0,
|
||||
V3d_XposYnegZpos, Quantity_NOC_GRAY30,
|
||||
V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT,
|
||||
Standard_True, Standard_False);
|
||||
|
||||
myViewer = new V3d_Viewer (theGraphicDriver);
|
||||
myViewer->SetDefaultLights();
|
||||
myViewer->SetLightOn();
|
||||
|
||||
myAISContext =new AIS_InteractiveContext (myViewer);
|
||||
|
||||
// 2D VIEWER: exploit V3d viewer for 2D visualization
|
||||
TCollection_ExtendedString a2DName ("Visu2D");
|
||||
my2DViewer = new V3d_Viewer (theGraphicDriver, a2DName.ToExtString());
|
||||
my2DViewer = new V3d_Viewer (theGraphicDriver);
|
||||
my2DViewer->SetCircularGridValues (0, 0, 10, 8, 0);
|
||||
my2DViewer->SetRectangularGridValues (0, 0, 10, 10, 0);
|
||||
|
||||
|
@@ -129,7 +129,7 @@ void CSelectionDialog::OnDisplay (bool isFit)
|
||||
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
|
||||
((CHLRApp*)AfxGetApp())->GetGraphicDriver();
|
||||
|
||||
myActiveViewer = new V3d_Viewer (aGraphicDriver, (Standard_ExtString )"Visu3D");
|
||||
myActiveViewer = new V3d_Viewer (aGraphicDriver);
|
||||
myActiveViewer->SetDefaultLights();
|
||||
myActiveViewer->SetLightOn();
|
||||
myActiveView = myActiveViewer->CreateView();
|
||||
|
@@ -47,14 +47,14 @@ add_executable (Animation WIN32 ${Animation_SOURCE_FILES}
|
||||
set_property (TARGET Animation PROPERTY FOLDER Samples)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Animation DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Animation DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (TARGETS Animation
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Animation
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
|
||||
include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
|
@@ -52,12 +52,7 @@ CAnimationDoc::CAnimationDoc()
|
||||
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
|
||||
((CAnimationApp*)AfxGetApp())->GetGraphicDriver();
|
||||
|
||||
TCollection_ExtendedString a3DName("Visu3D");
|
||||
myViewer = new V3d_Viewer(aGraphicDriver,a3DName.ToExtString(),"", 1000.0,
|
||||
V3d_XposYnegZpos, Quantity_NOC_GRAY30,
|
||||
V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
|
||||
Standard_True, Standard_False);
|
||||
|
||||
myViewer = new V3d_Viewer(aGraphicDriver);
|
||||
myViewer->SetDefaultLights();
|
||||
myViewer->SetLightOn();
|
||||
|
||||
|
@@ -64,14 +64,14 @@ add_executable (Convert WIN32 ${Convert_SOURCE_FILES}
|
||||
set_property (TARGET Convert PROPERTY FOLDER Samples)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Convert DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Convert DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (TARGETS Convert
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (TARGETS Convert
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
|
||||
include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
|
@@ -39,7 +39,9 @@ Standard_Boolean OCCDemo_Presentation::WaitForInput (unsigned long aMilliSeconds
|
||||
MSG msg;
|
||||
if (::PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE))
|
||||
{
|
||||
if (msg.message == WM_KEYUP)
|
||||
if ( msg.message == WM_KEYUP ||
|
||||
msg.message == WM_MOUSEFIRST ||
|
||||
msg.message == WM_PAINT )
|
||||
{
|
||||
::PeekMessage (&msg, NULL, 0, 0, PM_REMOVE);
|
||||
return WaitForInput (aMilliSeconds);
|
||||
|
@@ -46,10 +46,10 @@ COCCDemoDoc::COCCDemoDoc()
|
||||
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
|
||||
((COCCDemoApp*)AfxGetApp())->GetGraphicDriver();
|
||||
|
||||
myViewer = new V3d_Viewer(aGraphicDriver, (Standard_ExtString )"Visu3D");
|
||||
myViewer = new V3d_Viewer(aGraphicDriver);
|
||||
myViewer->SetDefaultLights();
|
||||
myViewer->SetLightOn();
|
||||
myViewer->SetDefaultBackgroundColor(Quantity_TOC_RGB, 0.,0.,0.);
|
||||
myViewer->SetDefaultBackgroundColor (Quantity_NOC_BLACK);
|
||||
|
||||
myAISContext = new AIS_InteractiveContext(myViewer);
|
||||
myShowResult = FALSE;
|
||||
|
@@ -76,7 +76,8 @@ void CAngleParamsVerticesPage::OnBnClickedVertex1Btn()
|
||||
// Now it's ok, local context is opened and edge selection mode is activated
|
||||
// Check if some vertex is selected
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
if (!myAISContext->LocalContext()->MoreSelected() ||
|
||||
myAISContext->SelectedShape().ShapeType() != TopAbs_VERTEX)
|
||||
{
|
||||
AfxMessageBox (_T ("Choose the vertex and press the button again"),
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
@@ -95,7 +96,8 @@ void CAngleParamsVerticesPage::OnBnClickedVertex1Btn()
|
||||
void CAngleParamsVerticesPage::OnBnClickedVertex2Btn()
|
||||
{
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
if (!myAISContext->LocalContext()->MoreSelected() ||
|
||||
myAISContext->SelectedShape().ShapeType() != TopAbs_VERTEX)
|
||||
{
|
||||
AfxMessageBox ( _T("Choose the vertex and press the button again"), MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
|
@@ -715,8 +715,7 @@ const TCollection_AsciiString CDimensionDlg::GetUnits() const
|
||||
return TCollection_AsciiString();
|
||||
CString aStr;
|
||||
GetDlgItem (IDC_DisplayUnits)->GetWindowText (aStr);
|
||||
TCollection_ExtendedString aCharsW ((Standard_ExtString )(const wchar_t* )aStr);
|
||||
return TCollection_AsciiString (aCharsW, '?');
|
||||
return TCollection_AsciiString ((const wchar_t* )aStr);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -273,8 +273,7 @@ dlg.m_ofn.lpstrInitialDir = initdir;
|
||||
if (dlg.DoModal() == IDOK)
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )dlg.GetPathName());
|
||||
TCollection_AsciiString aFileName (aFileNameW, '?');
|
||||
TCollection_AsciiString aFileName ((const wchar_t* )dlg.GetPathName());
|
||||
Standard_Integer status = ReadIGES (aFileName.ToCString(), aSequence);
|
||||
if (status != IFSelect_RetDone)
|
||||
{
|
||||
@@ -338,8 +337,7 @@ dlg.m_ofn.lpstrInitialDir = initdir;
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
|
||||
TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )dlg.GetPathName());
|
||||
TCollection_AsciiString aFileName (aFileNameW, '?');
|
||||
TCollection_AsciiString aFileName ((const wchar_t* )dlg.GetPathName());
|
||||
|
||||
result = SaveIGES (aFileName.ToCString(), aHSequenceOfShape);
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
||||
@@ -400,8 +398,7 @@ dlg.m_ofn.lpstrInitialDir = initdir;
|
||||
if (dlg.DoModal() == IDOK)
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )dlg.GetPathName());
|
||||
TCollection_AsciiString aFileName (aFileNameW, '?');
|
||||
TCollection_AsciiString aFileName ((const wchar_t* )dlg.GetPathName());
|
||||
IFSelect_ReturnStatus ReturnStatus = ReadSTEP (aFileName.ToCString(), aSequence);
|
||||
switch (ReturnStatus)
|
||||
{
|
||||
@@ -518,8 +515,7 @@ IFSelect_ReturnStatus CImportExport::SaveSTEP(const Handle(TopTools_HSequenceOfS
|
||||
|
||||
if (aDlg.DoModal() == IDOK) {
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )aDlg.GetPathName());
|
||||
TCollection_AsciiString aFileName (aFileNameW, '?');
|
||||
TCollection_AsciiString aFileName ((const wchar_t* )aDlg.GetPathName());
|
||||
|
||||
STEPControl_StepModelType selection = aDlg.m_Cc1ModelType;
|
||||
|
||||
@@ -605,11 +601,10 @@ dlg.m_ofn.lpstrInitialDir = initdir;
|
||||
|
||||
if (dlg.DoModal() == IDOK) {
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )dlg.GetPathName());
|
||||
TCollection_AsciiString aFileName (aFileNameW, '?');
|
||||
TCollection_AsciiString aFileName ((const wchar_t* )dlg.GetPathName());
|
||||
TCollection_AsciiString Message;
|
||||
result = SaveSTL (aFileName.ToCString(), aHSequenceOfShape, Message);
|
||||
CString aMsg (Message.ToCString());
|
||||
CString aMsg (TCollection_ExtendedString (Message).ToWideString());
|
||||
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, aMsg, result ? L"CasCade" : L"CasCade Error", result ? MB_OK : MB_ICONERROR);
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
||||
}
|
||||
@@ -696,11 +691,10 @@ dlg.m_ofn.lpstrInitialDir = initdir;
|
||||
|
||||
if (dlg.DoModal() == IDOK) {
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )dlg.GetPathName());
|
||||
TCollection_AsciiString aFileName (aFileNameW, '?');
|
||||
TCollection_AsciiString aFileName ((const wchar_t* )dlg.GetPathName());
|
||||
TCollection_AsciiString Message;
|
||||
result = SaveVRML (aFileName.ToCString(), aHSequenceOfShape, anArrayOfColors, anArrayOfTransparencies, Message);
|
||||
CString aMsg (Message.ToCString());
|
||||
CString aMsg (TCollection_ExtendedString(Message).ToWideString());
|
||||
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, aMsg, result ? L"CasCade" : L"CasCade Error", result ? MB_OK : MB_ICONERROR);
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user