Compare commits
83 Commits
CR29653
...
CR0_CADVie
Author | SHA1 | Date | |
---|---|---|---|
|
9f7af82cde | ||
|
e23f5331d9 | ||
|
d54e1b4c57 | ||
|
0f3127a3bc | ||
|
7dced57d92 | ||
|
2b751582ac | ||
|
42da0d5115 | ||
|
d25f052208 | ||
|
60fddce474 | ||
|
61ace3dc72 | ||
|
2e32a64577 | ||
|
6acbb1c641 | ||
|
fad3eca77f | ||
|
3e782664b8 | ||
|
64e93ce135 | ||
|
8c7fab9b4d | ||
|
c9ebb2dd0e | ||
|
ab5b3c22e0 | ||
|
340549b052 | ||
|
8f1384072c | ||
|
57f84042ff | ||
|
ea7ffc2802 | ||
|
f841d372e9 | ||
|
14deaf427f | ||
|
3d77e9620e | ||
|
32ca771129 | ||
|
9ce99357a4 | ||
|
8bca7d76a5 | ||
|
8a5905801c | ||
|
be480fe752 | ||
|
0e4e721c6b | ||
|
26b004e9e8 | ||
|
b2300241d1 | ||
|
042e09aa36 | ||
|
d0fbc7e5dd | ||
|
ed667b9069 | ||
|
2e93433ee5 | ||
|
0c80bdbf5e | ||
|
72e4db54e7 | ||
|
b4dfd43648 | ||
|
fbcef69b1a | ||
|
e50ebf1f0f | ||
|
94443b4811 | ||
|
4563cf3e6c | ||
|
80d55adf7c | ||
|
ea1114eb85 | ||
|
fc87027267 | ||
|
698faabef3 | ||
|
4f7d41eac3 | ||
|
a3d3777de9 | ||
|
510d969084 | ||
|
ae5225dfcd | ||
|
1ccef79a2a | ||
|
6822a3bef1 | ||
|
6dfdbb7ab8 | ||
|
7373e19fa1 | ||
|
e13b9464ef | ||
|
cbc4faa980 | ||
|
9b74e2071c | ||
|
11af6cddf5 | ||
|
c37f570215 | ||
|
759e2a15ca | ||
|
557916474b | ||
|
55a40de890 | ||
|
41bf7e0b3c | ||
|
6664a9c233 | ||
|
f84edf5816 | ||
|
d051064495 | ||
|
a38b44f172 | ||
|
f0bef12142 | ||
|
bc728d2621 | ||
|
eacdb38f2e | ||
|
10a55e0d05 | ||
|
f816395691 | ||
|
4563472c1e | ||
|
bad76cfc7a | ||
|
f84d6446a7 | ||
|
060811b1b5 | ||
|
fe76088cc7 | ||
|
0e443e130c | ||
|
229add784f | ||
|
8e45500e21 | ||
|
0575de6d7e |
@@ -343,9 +343,9 @@ set (BUILD_ADDITIONAL_TOOLKITS "" CACHE STRING "${BUILD_ADDITIONAL_TOOLKITS_DESC
|
||||
separate_arguments (BUILD_ADDITIONAL_TOOLKITS)
|
||||
|
||||
if (MSVC)
|
||||
set (BUILD_MODULE_MfcSamples OFF CACHE BOOL "${BUILD_MODULE_MfcSamples_DESCR}")
|
||||
set (BUILD_SAMPLES_MFC OFF CACHE BOOL "${BUILD_SAMPLES_MFC_DESCR}")
|
||||
endif()
|
||||
set (BUILD_MODULE_QtSamples OFF CACHE BOOL "${BUILD_MODULE_QtSamples_DESCR}")
|
||||
set (BUILD_SAMPLES_QT OFF CACHE BOOL "${BUILD_SAMPLES_QT_DESCR}")
|
||||
|
||||
set (BUILD_Inspector OFF CACHE BOOL "${BUILD_Inspector_DESCR}")
|
||||
|
||||
@@ -789,7 +789,7 @@ else()
|
||||
set (SCRIPT_EXT sh)
|
||||
endif()
|
||||
|
||||
if (BUILD_Inspector OR BUILD_MODULE_QtSamples)
|
||||
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
|
||||
# check qt 3rdparty path
|
||||
add_definitions (-DHAVE_QT)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/qt")
|
||||
@@ -805,6 +805,8 @@ endif()
|
||||
# list <TOOLNAME>_TOOLKITS is created foreach tool and contains its toolkits
|
||||
# list <OCCT_TOOLS> will contain all tools
|
||||
if (BUILD_Inspector)
|
||||
add_definitions (-DHAVE_Inspector)
|
||||
|
||||
OCCT_MODULES_AND_TOOLKITS (TOOLS "TOOL_TOOLKITS" OCCT_TOOLS)
|
||||
foreach (OCCT_TOOL ${OCCT_TOOLS})
|
||||
list (APPEND BUILD_TOOL_TOOLKITS ${${OCCT_TOOL}_TOOL_TOOLKITS})
|
||||
@@ -911,9 +913,9 @@ OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.install.${SCRIPT_EXT}.in" "${S
|
||||
# write current custom.bat/sh (for build directory)
|
||||
OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
|
||||
|
||||
if (BUILD_MODULE_MfcSamples OR BUILD_MODULE_QtSamples)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR_SCRIPT}")
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.bat" "${CMAKE_BINARY_DIR}")
|
||||
if (BUILD_SAMPLES_MFC OR BUILD_SAMPLES_QT)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}")
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
# env script for draw in building environment
|
||||
@@ -939,7 +941,7 @@ foreach(RESOURCE ${RESOURCES})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (BUILD_MODULE_QtSamples)
|
||||
if (BUILD_SAMPLES_QT)
|
||||
FILE_TO_LIST ("adm/SAMPLES_RESOURCES" SAMPLES_RESOURCES)
|
||||
foreach(RESOURCE ${SAMPLES_RESOURCES})
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/${RESOURCE}" "${INSTALL_DIR_RESOURCE}/samples")
|
||||
@@ -992,11 +994,11 @@ endif()
|
||||
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) OCCT toolkits processed")
|
||||
# samples do not support patch usage
|
||||
if (BUILD_MODULE_MfcSamples OR BUILD_MODULE_QtSamples)
|
||||
if (BUILD_SAMPLES_MFC OR BUILD_SAMPLES_QT)
|
||||
set (OCCT_ROOT ${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
if (BUILD_MODULE_MfcSamples)
|
||||
if (BUILD_SAMPLES_MFC)
|
||||
set (MFC_STANDARD_SAMPLES_DIR ${OCCT_ROOT}/samples/mfc/standard)
|
||||
set (COMMON_WINMAIN_FILE ${MFC_STANDARD_SAMPLES_DIR}/Common/Winmain.cpp)
|
||||
|
||||
@@ -1017,15 +1019,15 @@ endif()
|
||||
|
||||
OCCT_MODULES_AND_TOOLKITS (SAMPLES "SAMPLES_TOOLKITS" OCCT_SAMPLES)
|
||||
|
||||
if (BUILD_MODULE_QtSamples)
|
||||
if (NOT Qt5_FOUND OR NOT WIN32)
|
||||
list (REMOVE_ITEM qt_SAMPLES_TOOLKITS AndroidQt)
|
||||
message (STATUS "Info: AndroidQt sample excluded due to Qt5 usage is disabled or OS is not Windows")
|
||||
endif()
|
||||
|
||||
if (NOT BUILD_Inspector)
|
||||
list (REMOVE_ITEM tools_SAMPLES_TOOLKITS TInspectorEXE)
|
||||
message (STATUS "Info: TInspectorEXE sample excluded due to BUILD_Inspector is disabled")
|
||||
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
|
||||
if (BUILD_SAMPLES_QT)
|
||||
if (NOT Qt5_FOUND OR "${Qt5Gui_EGL_INCLUDE_DIRS}" STREQUAL "" OR NOT WIN32)
|
||||
list (REMOVE_ITEM qt_SAMPLES_TOOLKITS AndroidQt)
|
||||
message (STATUS "Info: AndroidQt sample excluded due to OS is not Windows or Qt is configured without ANGLE")
|
||||
endif()
|
||||
else()
|
||||
list (REMOVE_ITEM OCCT_SAMPLES qt)
|
||||
message (STATUS "Info: qt samples excluded due to BUILD_SAMPLES_QT is disabled")
|
||||
endif()
|
||||
|
||||
foreach (OCCT_SAMPLE ${OCCT_SAMPLES})
|
||||
@@ -1056,8 +1058,9 @@ if (BUILD_TOOL_TOOLKITS)
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
endif()
|
||||
|
||||
set (OpenCASCADE_BINARY_DIR "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||
# patch TInspectorEXE
|
||||
OCCT_CONFIGURE ("adm/templates/TInspectorEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/samples/tools/TInspectorEXE/TInspectorEXE.vcxproj.user")
|
||||
OCCT_CONFIGURE ("adm/templates/TInspectorEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/tools/TInspectorEXE/TInspectorEXE.vcxproj.user")
|
||||
endif()
|
||||
|
||||
# Prepare variables for configuration of OpenCASCADE cmake config file
|
||||
|
@@ -1,2 +1 @@
|
||||
qt AndroidQt FuncDemo IESample Tutorial
|
||||
tools TInspectorEXE
|
||||
qt AndroidQt FuncDemo IESample Tutorial
|
@@ -1,4 +1,4 @@
|
||||
TModelingData TKShapeView
|
||||
TVisualization TKView TKVInspector
|
||||
TApplicationFramework TKTreeModel TKTInspectorAPI TKDFBrowser
|
||||
TTool TKTInspector TKToolsDraw
|
||||
TTool TKTInspector TKToolsDraw TInspectorEXE
|
@@ -433,4 +433,5 @@ n IVtkDraw
|
||||
t TKIVtkDraw
|
||||
n Geom2dEvaluator
|
||||
t TKVCAF
|
||||
n XCAFView
|
||||
n XCAFView
|
||||
n XCAFNoteObjects
|
||||
|
@@ -585,7 +585,7 @@ endmacro()
|
||||
# prior to version 3.3 not supporting per-configuration install paths
|
||||
# for install target files (see https://cmake.org/Bug/view.php?id=14317)
|
||||
macro (OCCT_UPDATE_TARGET_FILE)
|
||||
if (WIN32)
|
||||
if (MSVC)
|
||||
OCCT_INSERT_CODE_FOR_TARGET ()
|
||||
endif()
|
||||
|
||||
|
@@ -191,7 +191,7 @@ foreach (OCCT_MODULE ${OCC_MODULES_LIST})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (WIN32)
|
||||
if (MSVC)
|
||||
OCCT_INSERT_CODE_FOR_TARGET ()
|
||||
endif()
|
||||
|
||||
|
@@ -25,7 +25,7 @@ set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR})
|
||||
|
||||
# Now we can apply standard CMake finder for Qt5. We do this mostly
|
||||
# to have qt5_wrap_cpp() function available and Qt5_FOUND variable filled
|
||||
find_package(Qt5 QUIET COMPONENTS Widgets Quick PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH)
|
||||
find_package(Qt5 QUIET COMPONENTS Widgets Quick Xml PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH)
|
||||
if (NOT ${Qt5_FOUND})
|
||||
# Now we can apply standard CMake finder for Qt. We do this mostly
|
||||
# to have qt4_wrap_cpp() function available
|
||||
|
@@ -9,9 +9,9 @@ macro (FIND_QT_PACKAGE PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT
|
||||
if (${Qt5_FOUND})
|
||||
#message (STATUS "Qt5 cmake configuration")
|
||||
|
||||
set(PROJECT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS}" "${Qt5Quick_INCLUDE_DIRS}")
|
||||
set(PROJECT_LIBRARIES_DEBUG "${Qt5Widgets_LIBRARIES}" "${Qt5Quick_LIBRARIES}")
|
||||
set(PROJECT_LIBRARIES_RELEASE "${Qt5Widgets_LIBRARIES}" "${Qt5Quick_LIBRARIES}")
|
||||
set(PROJECT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS}" "${Qt5Quick_INCLUDE_DIRS}" "${Qt5Xml_INCLUDE_DIRS}")
|
||||
set(PROJECT_LIBRARIES_DEBUG "${Qt5Widgets_LIBRARIES}" "${Qt5Quick_LIBRARIES}" "${Qt5Xml_LIBRARIES}")
|
||||
set(PROJECT_LIBRARIES_RELEASE "${Qt5Widgets_LIBRARIES}" "${Qt5Quick_LIBRARIES}" "${Qt5Xml_LIBRARIES}")
|
||||
|
||||
# processing *.ts files to generate *.qm
|
||||
find_package(Qt5LinguistTools)
|
||||
@@ -24,11 +24,11 @@ macro (FIND_QT_PACKAGE PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT
|
||||
#message (STATUS "Qt4 cmake configuration")
|
||||
set(PROJECT_INCLUDES ${QT_INCLUDES})
|
||||
if (WIN32)
|
||||
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/QtCored4.lib;${3RDPARTY_QT_DIR}/lib/QtGuid4.lib")
|
||||
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/QtCore4.lib;${3RDPARTY_QT_DIR}/lib/QtGui4.lib")
|
||||
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/QtCored4.lib;${3RDPARTY_QT_DIR}/lib/QtGuid4.lib;${3RDPARTY_QT_DIR}/lib/QtXmld4.lib")
|
||||
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/QtCore4.lib;${3RDPARTY_QT_DIR}/lib/QtGui4.lib;${3RDPARTY_QT_DIR}/lib/QtXml4.lib")
|
||||
else()
|
||||
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so")
|
||||
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so")
|
||||
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so;${3RDPARTY_QT_DIR}/lib/libQtXml.so")
|
||||
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so;${3RDPARTY_QT_DIR}/lib/libQtXml.so")
|
||||
endif(WIN32)
|
||||
find_program(QT_LRELEASE_EXECUTABLE lrelease)
|
||||
endif()
|
||||
@@ -68,19 +68,12 @@ macro (FIND_AND_WRAP_RESOURCE_FILE RESOURCE_FILE_NAME RCC_FILES)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (FIND_AND_INSTALL_TS_FILE RESOURCE_FILE_NAME TARGET_FOLDER QM_FILES)
|
||||
macro (FIND_AND_WRAP_TS_FILE RESOURCE_FILE_NAME TARGET_FOLDER QM_FILES)
|
||||
if(EXISTS "${RESOURCE_FILE_NAME}")
|
||||
GET_FILENAME_COMPONENT(_name ${RESOURCE_FILE_NAME} NAME_WE)
|
||||
SET(_output ${CMAKE_CURRENT_BINARY_DIR}/${_name}.qm)
|
||||
SET(_cmd_${_name} ${QT_LRELEASE_EXECUTABLE} ${RESOURCE_FILE_NAME} -qm ${_output})
|
||||
|
||||
set(TARGET_NAME ${_name}_resources)
|
||||
|
||||
if (NOT TARGET "${TARGET_NAME}")
|
||||
add_custom_target(${TARGET_NAME} ALL COMMAND ${_cmd_${_name}} DEPENDS ${RESOURCE_FILE_NAME})
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "${TARGET_FOLDER}")
|
||||
|
||||
list (APPEND ${QM_FILES} "${_output}")
|
||||
if (${Qt5_FOUND})
|
||||
qt5_add_translation(QM_FILES "${RESOURCE_FILE_NAME}")
|
||||
else()
|
||||
qt4_add_translation(QM_FILES "${RESOURCE_FILE_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
@@ -109,9 +102,10 @@ macro (FIND_AND_INSTALL_QT_RESOURCES OCCT_PACKAGE RESOURCE_FILES)
|
||||
#message("TS files are: ${TS_FILES} in ${OCCT_PACKAGE}")
|
||||
foreach (TS_FILE ${TS_FILES})
|
||||
set (TS_FILE_RELATIVE "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${TS_FILE}")
|
||||
FIND_AND_INSTALL_TS_FILE(${TS_FILE_RELATIVE} "${TARGET_FOLDER}/${CURRENT_MODULE}" QM_FILES)
|
||||
FIND_AND_WRAP_TS_FILE(${TS_FILE_RELATIVE} "${TARGET_FOLDER}/${CURRENT_MODULE}" QM_FILES)
|
||||
if (EXISTS ${TS_FILE_RELATIVE})
|
||||
list (APPEND ${RESOURCE_FILES} "${TS_FILE_RELATIVE}")
|
||||
list (APPEND ${RESOURCE_FILES} "${QM_FILES}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
@@ -117,12 +117,12 @@ want to build some particular libraries (toolkits) only, then you may uncheck
|
||||
all modules in the corresponding BUILD_MODUE_* options and provide the list of
|
||||
necessary libraries here. Of course, all dependencies will be resolved automatically")
|
||||
|
||||
set (BUILD_MODULE_MfcSamples_DESCR
|
||||
set (BUILD_SAMPLES_MFC_DESCR
|
||||
"Indicates whether OCCT MFC samples should be built together with OCCT.
|
||||
These samples show some possibilities of using OCCT and they can be executed
|
||||
with script samples.bat from the installation directory (INSTALL_DIR)")
|
||||
|
||||
set (BUILD_MODULE_QtSamples_DESCR
|
||||
set (BUILD_SAMPLES_QT_DESCR
|
||||
"Indicates whether OCCT Qt samples should be built together with OCCT.
|
||||
These samples show some possibilities of using OCCT and they can be executed
|
||||
with script samples.bat from the installation directory (INSTALL_DIR)")
|
||||
|
@@ -1866,6 +1866,7 @@ proc osutils:tk:files { tkloc thePlatform } {
|
||||
"t" { set utyp "toolkit" }
|
||||
"n" { set utyp "nocdlpack" }
|
||||
"x" { set utyp "executable" }
|
||||
default { error "Error: Cannot determine type of unit $loc, check adm/UDLIST!" }
|
||||
}
|
||||
if [array exists map] { unset map }
|
||||
osutils:tk:loadunit $loc map
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
QTDIR=@3RDPARTY_QT_DIR@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;@OpenCASCADE_BINARY_DIR@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
|
||||
@@ -13,7 +13,7 @@ PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
QTDIR=@3RDPARTY_QT_DIR@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;@OpenCASCADE_BINARY_DIR@i;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
|
||||
@@ -22,7 +22,7 @@ PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
QTDIR=@3RDPARTY_QT_DIR@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;@OpenCASCADE_BINARY_DIR@d;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
|
||||
|
35
adm/templates/sample.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
echo Launch selected sample as follows:
|
||||
echo sample.sh SampleName d
|
||||
echo or to use last sample build configuration:
|
||||
echo sample.sh SampleName
|
||||
echo available samples:
|
||||
echo FuncDemo
|
||||
echo IESample
|
||||
echo Tutorial
|
||||
fi
|
||||
|
||||
|
||||
aCurrentPath="$PWD"
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
source "${aScriptPath}/env.sh" "$2"
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
if [ -d "$QTDIR%\qml" ];
|
||||
then export QML2_IMPORT_PATH="$QTDIR\qml";
|
||||
fi
|
||||
fi
|
||||
|
||||
export "EXE_PATH=$CSF_OCCTBinPath/$1"
|
||||
|
||||
if [ ! -f "$EXE_PATH" ]; then
|
||||
echo "Executable \"$EXE_PATH\" not found."
|
||||
echo "Probably you didn't compile the application."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ${aCurrentPath}
|
||||
"$EXE_PATH"
|
@@ -1,4 +1,5 @@
|
||||
[rename]
|
||||
Adaptor3d_OffsetCurve Adaptor2d_OffsetCurve
|
||||
BRepExtrema_OverlappedSubShapes BRepExtrema_MapOfIntegerPackedMapOfInteger
|
||||
ShapeConstruct_CompBezierCurves2dToBSplineCurve2d Convert_CompBezierCurves2dToBSplineCurve2d
|
||||
ShapeConstruct_CompBezierCurves2dToBSplineCurve Convert_CompBezierCurves2dToBSplineCurve
|
||||
@@ -14,6 +15,62 @@ V3d_AMBIENT Graphic3d_TOLS_AMBIENT
|
||||
V3d_DIRECTIONAL Graphic3d_TOLS_DIRECTIONAL
|
||||
V3d_POSITIONAL Graphic3d_TOLS_POSITIONAL
|
||||
V3d_SPOT Graphic3d_TOLS_SPOT
|
||||
BOPCol_BaseAllocator Handle(NCollection_BaseAllocator)
|
||||
BOPCol_BoxBndTree is replaced with BOPTools_BoxBndTree
|
||||
BOPCol_DataMapOfIntegerInteger TColStd_DataMapOfIntegerInteger
|
||||
BOPCol_DataMapOfIntegerListOfInteger TColStd_DataMapOfIntegerListOfInteger
|
||||
BOPCol_DataMapOfIntegerListOfShape TopTools_DataMapOfIntegerListOfShape
|
||||
BOPCol_DataMapOfIntegerReal TColStd_DataMapOfIntegerReal
|
||||
BOPCol_DataMapOfIntegerShape TopTools_DataMapOfIntegerShape
|
||||
BOPCol_DataMapOfShapeBox TopTools_DataMapOfShapeBox
|
||||
BOPCol_DataMapOfShapeInteger TopTools_DataMapOfShapeInteger
|
||||
BOPCol_DataMapOfShapeListOfShape TopTools_DataMapOfShapeListOfShape
|
||||
BOPCol_DataMapOfShapeReal TopTools_DataMapOfShapeReal
|
||||
BOPCol_DataMapOfShapeShape TopTools_DataMapOfShapeShape
|
||||
BOPCol_IndexedDataMapOfShapeListOfShape TopTools_IndexedDataMapOfShapeListOfShape
|
||||
BOPCol_IndexedDataMapOfShapeShape TopTools_IndexedDataMapOfShapeShape
|
||||
BOPCol_IndexedMapOfInteger TColStd_IndexedMapOfInteger
|
||||
BOPCol_IndexedMapOfOrientedShape TopTools_IndexedMapOfOrientedShape
|
||||
BOPCol_IndexedMapOfShape TopTools_IndexedMapOfShape
|
||||
BOPCol_ListOfInteger TColStd_ListOfInteger
|
||||
BOPCol_ListOfListOfShape TopTools_ListOfListOfShape
|
||||
BOPCol_ListOfShape TopTools_ListOfShape
|
||||
BOPCol_MapOfInteger TColStd_MapOfInteger
|
||||
BOPCol_MapOfOrientedShapeTopTools_MapOfOrientedShape
|
||||
BOPCol_MapOfShape TopTools_MapOfShape
|
||||
BOPCol_SequenceOfPnt2d TColgp_SequenceOfPnt2d
|
||||
BOPCol_SequenceOfReal TColStd_SequenceOfReal
|
||||
BOPCol_SequenceOfShape TopTools_SequenceOfShape
|
||||
BOPCol_Parallel BOPTools_Parallel
|
||||
BOPCol_NCVector NCollection_Vector
|
||||
BOPCol_DataMapOfShapeAddress DataMapOfShapeAddress
|
||||
BOPCol_DataMapOfTransientAddress DataMapOfTransientAddress
|
||||
BOPCol_DataMapIteratorOfDataMapOfIntegerReal TColStd_DataMapIteratorOfDataMapOfIntegerReal
|
||||
BOPCol_DataMapIteratorOfDataMapOfShapeAddress DataMapOfShapeAddress::Iterator
|
||||
BOPCol_DataMapIteratorOfDataMapOfTransientAddress DataMapOfTransientAddress::Iterator
|
||||
BOPCol_ListIteratorOfListOfInteger TColStd_ListIteratorOfListOfInteger
|
||||
BOPCol_ListIteratorOfListOfShape TopTools_ListIteratorOfListOfShape
|
||||
BOPCol_MapIteratorOfMapOfInteger TColStd_MapIteratorOfMapOfInteger
|
||||
BOPCol_BoxBndTreeSelector BOPTools_BoxBndTreeSelector
|
||||
BOPCol_BoxBndTree BOPTools_BoxBndTree
|
||||
BOPCol_PListOfInteger TColStd_ListOfInteger*
|
||||
BOPCol_IndexedDataMapOfShapeReal TopTools_IndexedDataMapOfShapeReal
|
||||
BOPCol_MapOfOrientedShape TopTools_MapOfOrientedShape
|
||||
BOPCol_DataMapIteratorOfDataMapOfIntegerInteger TColStd_DataMapIteratorOfDataMapOfIntegerInteger
|
||||
BOPCol_MapIteratorOfMapOfShape TopTools_MapIteratorOfMapOfShape
|
||||
BOPCol_ContextFunctor BOPTools_ContextFunctor
|
||||
BOPCol_ContextCnt BOPTools_ContextCnt
|
||||
BOPCol_Functor BOPTools_Functor
|
||||
BOPCol_Cnt BOPTools_Cnt
|
||||
BOPCol_DataMapIteratorOfDataMapOfIntegerListOfShape TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape
|
||||
BOPCol_MapIteratorOfMapOfOrientedShape TopTools_MapIteratorOfMapOfOrientedShape
|
||||
BOPCol_DataMapIteratorOfDataMapOfIntegerListOfInteger TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger
|
||||
BOPCol_DataMapIteratorOfDataMapOfShapeShape TopTools_DataMapIteratorOfDataMapOfShapeShape
|
||||
BOPTools::MapShapes TopExp::MapShapes
|
||||
BOPTools::MapShapesAndAncestors TopExp::MapShapesAndAncestors
|
||||
BOPCol_Box2DBndTreeSelector BOPTools_BoxSelector<Bnd_Box2d>
|
||||
BiTgte_DataMapOfShapeBox TopTools_DataMapOfShapeBox
|
||||
CDM_MessageDriver Message_Messenger
|
||||
|
||||
[tcollection]
|
||||
AdvApp2Var_SequenceOfNode
|
||||
|
@@ -96,7 +96,8 @@ The following table gives the full list of environment variables used at the con
|
||||
| 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. Note that Draw Harness plugin system is incompatible with "Static" builds, and therefore it is disabled for these builds.|
|
||||
| BUILD_ADDITIONAL_TOOLKITS | String | Semicolon-separated individual toolkits to include into build process. If you want to build some particular libraries (toolkits) only, then you may uncheck all modules in the corresponding *BUILD_MODUE_\<MODULE\>* options and provide the list of necessary libraries here. Of course, all dependencies will be resolved automatically |
|
||||
| BUILD_YACCLEX | Boolean flag | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this option leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
|
||||
| BUILD_MODULE_MfcSamples | Boolean flag | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms |
|
||||
| BUILD_SAMPLES_MFC | Boolean flag | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms |
|
||||
| BUILD_SAMPLES_QT | Boolean flag | Indicates whether QT samples should be built together with OCCT. |
|
||||
| BUILD_Inspector | Boolean flag | Indicates whether Inspector should be built together with OCCT. |
|
||||
| BUILD_DOC_Overview | Boolean flag | Indicates whether OCCT overview documentation project should be created together with OCCT. It is not built together with OCCT. Checking this option leads to automatic search of Doxygen binaries. Its building calls Doxygen command to generate the documentation in HTML format |
|
||||
| BUILD_PATCH | Path | Points to the directory recognized as a "patch" for OCCT. If specified, the files from this directory take precedence over the corresponding native OCCT sources. This way you are able to introduce patches to Open CASCADE Technology not affecting the original source distribution |
|
||||
|
@@ -49,6 +49,13 @@ For instance, in Terminal application:
|
||||
$ ./genproj
|
||||
~~~~~
|
||||
|
||||
Option **-static** can be used with XCode to build static libraries.
|
||||
|
||||
~~~~~
|
||||
$ cd /dev/OCCT/opencascade-7.0.0
|
||||
$ ./genproj xcd -static
|
||||
~~~~~
|
||||
|
||||
@section build_xcode_build Building
|
||||
|
||||
To start **Xcode**, launch script *xcode.sh*.
|
||||
|
@@ -140,7 +140,7 @@ The official repository contains:
|
||||
@figure{OCCT_GitGuide_V2_image006.png,"",320}
|
||||
|
||||
Optionally, you can set up TortoiseGit to use visual diff utility for SVG images used in OCCT documentation.
|
||||
For that, click on item "Diff Viewer" in the Settings dialog, then click button "Advanced..." on the right tab add new record with the following parameters:
|
||||
For that, click on item "Diff Viewer" in the Settings dialog, then click button "Advanced..." in the right tab to add a new record with the following parameters:
|
||||
- Extension: <code>.svg</code>
|
||||
- External program: <code><path_to_OCCT>\\adm\\svgdiff.bat %%base %%mine %%bname %%yname</code>
|
||||
|
||||
|
@@ -193,9 +193,9 @@ Use prefix <i>bug</i> followed by Mantis issue ID and, if necessary, additional
|
||||
* To check expected output which should be obtained as the test result, add @ref testmanual_3_7 "REQUIRED" statement for each line of output to mark it as required.
|
||||
* If the test case produces error messages (contained in parse.rules), which are expected in that test and should not be considered as its failure (e.g. test for *checkshape* command), add REQUIRED statement for each error to mark it as required output.
|
||||
4. To check whether the data files needed for the test are already present in the database, use DRAW command *testfile* (see below).
|
||||
If the data file is already present, use it for new test instead of adding a duplicate.
|
||||
If the data file(s) are not yet present in the test database, put them to some folder and add it to the environment variable *CSF_TestDataPath* to be found by the test system.
|
||||
Information on where the data files can be accessed by OCC team for putting to official database should be provided in comment to Mantis issue, clearly indicating how names of the files used by the test script match the actual names of the files.
|
||||
If the data file is already present, use it for a new test instead of adding a duplicate.
|
||||
If the data file(s) are not yet present in the test database, put them to a folder and add it to the environment variable *CSF_TestDataPath* to be found by the test system.
|
||||
The location of the data files, which need to be accessed by OCC team and put to the official database, should be provided in the comment to Mantis issue, clearly indicating how the names of the files used by the test script match the actual names of the files.
|
||||
The simplest way is to attach the data files to the Mantis issue, with the same names as used by the test script.
|
||||
5. Check that the test case runs as expected (test for fix: OK with the fix, FAILED without the fix; test for existing problem: BAD), and integrate it to the Git branch created for the issue.
|
||||
|
||||
@@ -222,8 +222,8 @@ fixshape result a 0.01 0.01
|
||||
checkshape result
|
||||
~~~~~
|
||||
|
||||
DRAW command testfile should be used to check the data files being used by the test for possible duplication of content or names.
|
||||
The command accepts list of paths to files being checked as single argument, and will give conclusion on each of the files, for instance:
|
||||
DRAW command *testfile* should be used to check the data files used by the test for possible duplication of content or names.
|
||||
The command accepts the list of paths to files to be checked (as a single argument) and gives a conclusion on each of the files, for instance:
|
||||
|
||||
~~~~~
|
||||
Draw[1]> testfile [glob /my/data/path/bug12345*]
|
||||
|
@@ -1503,60 +1503,76 @@ The following obsolete features have been removed:
|
||||
* The container *BiTgte_DataMapOfShapeBox* is replaced with *TopTools_DataMapOfShapeBox*;
|
||||
* The class *BOPTools* has been removed as duplicate of the class *TopExp*;
|
||||
* The method *BOPAlgo_Builder::Splits()* has been removed as excessive. The method *BOPAlgo_Builder::Images()* can be used instead.
|
||||
* The method *BOPTools_AlgoTools::CheckSameGeom()* has been removed as excessive. The method *BOPTools_AlgoTools::AreFacesSameDomain()* can be used instead.
|
||||
|
||||
@section upgrade_occt730 Upgrade to OCCT 7.3.0
|
||||
|
||||
@subsection upgrade_730_lights Light sources
|
||||
|
||||
Multiple changes have been applied to lights management within TKV3d and TKOpenGl:
|
||||
* V3d_Light class is now an alias to Graphic3d_CLight.
|
||||
Graphic3d_CLight is now a Handle class with refactored methods for managing light source parameters
|
||||
(preserving most methods of V3d_Light sub-classes to simplify porting).
|
||||
* Obsolete debugging functionality for drawing lights source has been removed from V3d_Light.
|
||||
Methods and constructors taking parameters for this drawing and not affecting light definition itself has been also removed.
|
||||
* Light constructors taking V3d_Viewer has been marked deprecated.
|
||||
Application may call V3d_Viewer::AddLight() explicitly to register new light sources created by new constructors within V3d_Viewer, but this step is now optional.
|
||||
Multiple changes have been applied to lights management within *TKV3d* and *TKOpenGl*:
|
||||
* *V3d_Light* class is now an alias to *Graphic3d_CLight*.
|
||||
*Graphic3d_CLight* is now a Handle class with refactored methods for managing light source parameters.
|
||||
Most methods of *V3d_Light* sub-classes have been preserved to simplify porting.
|
||||
* Obsolete debugging functionality for drawing a light source has been removed from *V3d_Light*.
|
||||
Methods and constructors that take parameters for debug display and do not affect the light definition itself have also been removed.
|
||||
* Light constructors taking *V3d_Viewer* have been marked as deprecated.
|
||||
Use method *AddLight()* of the class *V3d_Viewer* or *V3d_View* to add new light sources to a scene or a single view, respectively.
|
||||
* The upper limit of 8 light sources has been removed.
|
||||
* Dedicated classes per light source type V3d_AmbientLight, V3d_DirectionalLight, V3d_PositionalLight and V3d_SpotLight have been preserved,
|
||||
but it is now possible defining light of any type by creating base class Graphic3d_CLight directly.
|
||||
Dedicated classes only hides visibility of unrelated light properties depending on its type.
|
||||
* Calling V3d_Viewer::UpdateLights() is no more required after modifying light sources properties (color, position, etc.).
|
||||
* The classes for specific light source types: *V3d_AmbientLight, V3d_DirectionalLight, V3d_PositionalLight* and *V3d_SpotLight* have been preserved, but it is now possible to define the light of any type by creating base class *Graphic3d_CLight* directly. The specific classes only hide unrelated light properties depending on the type of light source.
|
||||
* It is no more required to call *V3d_Viewer::UpdateLights()* after modifying the properties of light sources (color, position, etc.)
|
||||
|
||||
@subsection upgrade_730_shadingmodels Shading Models
|
||||
|
||||
*Graphic3d_AspectFillArea3d* has been extended by a new property *ShadingModel()*, which previously has been defined globally for entire View.
|
||||
*Graphic3d_AspectFillArea3d* has been extended by a new property *ShadingModel()*, which previously has been defined globally for the entire View.
|
||||
|
||||
Previously, triangle array without normal vertex attributes was implicitly considered as unshaded,
|
||||
Previously, a triangle array without normal vertex attributes was implicitly considered as unshaded,
|
||||
but now such array will be shaded using *Graphic3d_TOSM_FACET* model (e.g. by computing per-triangle normals).
|
||||
Therefore, *Graphic3d_TOSM_UNLIT* should be explicitly specified for disabling shading or triangles array.
|
||||
Alternatively, material without reflectance properties can be used for disabling shading as before.
|
||||
Therefore, *Graphic3d_TOSM_UNLIT* should be explicitly specified to disable shading of triangles array.
|
||||
Alternatively, a material without reflectance properties can be used to disable shading (as before).
|
||||
|
||||
@subsection upgrade_730_tkopengl Custom low-level OpenGL elements
|
||||
|
||||
The following API changes should be considered while porting custom OpenGl_Element objects:
|
||||
The following API changes should be considered while porting custom *OpenGl_Element* objects:
|
||||
* *OpenGl_ShaderManager::BindFaceProgram()*, *BindLineProgram()*, *BindMarkerProgram()* now take enumeration arguments instead of Boolean flags.
|
||||
|
||||
@subsection upgrade_730_BOPAlgo_Section Changes in BOPAlgo_Section
|
||||
|
||||
The public method *BuildSection()* in the class *BOPAlgo_Section* has became protected. The methods *Perform()* or *PerformWithFiller()* should be called for construction of the result of SECTION operation.
|
||||
The public method *BuildSection()* in the class *BOPAlgo_Section* has become protected. The methods *Perform()* or *PerformWithFiller()* should be called for construction of the result of SECTION operation.
|
||||
|
||||
@subsection upgrade_730_BRepAdaptor_CompCurve Changes in BRepAdaptor_CompCurve
|
||||
|
||||
The method BRepAdaptor_CompCurve::SetPeriodic has been eliminated.
|
||||
Since new version, the method BRepAdaptor_CompCurve::IsPeriodic() will always return FALSE. Earlier, it could return TRUE in case if the wire contained only one edge based on periodic curve.
|
||||
The method *BRepAdaptor_CompCurve::SetPeriodic* has been eliminated.
|
||||
Since the new version, the method *BRepAdaptor_CompCurve::IsPeriodic()* will always return FALSE. Earlier, it could return TRUE in case if the wire contained only one edge based on a periodic curve.
|
||||
|
||||
@subsection upgrade_730_removed Removed features
|
||||
* The methods *SetDeflection*, *SetEpsilonT*, *SetDiscretize* of the class *IntTools_EdgeFace* have been removed as excessive.
|
||||
|
||||
@subsection upgrade_730_IntersectionAPI Changes in classes responsible for intersection algorithm
|
||||
|
||||
Interfaces of the following methods have been changed: IntPatch_WLineTool::ComputePurgedWLine(...), IntPatch_PrmPrmIntersection::Perform(...), IntPatch_Intersection::Perform(...), IntPatch_Intersection::ParamParamPerfom(...), IntPatch_Intersection::GeomGeomPerfom(...). Please see documentation about corresponding methods.
|
||||
* The methods *SetDeflection*, *SetEpsilonT*, *SetDiscretize* of the class *IntTools_EdgeFace* have been removed as redundant.
|
||||
|
||||
@subsection upgrade_730_BuilderSolid Boolean Operations - Solid Builder algorithm
|
||||
|
||||
Previously, the unclassified faces of *BOPAlgo_BuilderSolid* algorithm (the faces which have not been used for solids creation and located outside of all created solids) have been used to form an additional solid (not closed one) with INTERNAL orientation.
|
||||
Since new version, these unclassified faces are no longer added into resulting solids. Instead, the @ref occt_algorithms_ers "warning" containing these faces appears.
|
||||
Previously, the unclassified faces of *BOPAlgo_BuilderSolid* algorithm (i.e. the faces not used for solids creation and located outside of all created solids) were used to form an additional (not closed) solid with INTERNAL orientation.
|
||||
Since the new version, these unclassified faces are no longer added into the resulting solids. Instead, the @ref occt_algorithms_ers "warning" with a list of these faces appears.
|
||||
|
||||
The following public methods of the *BOPAlgo_BuilderSolid* class have been removed as excessive:
|
||||
* void SetSolid(const TopoDS_Solid& theSolid);
|
||||
* const TopoDS_Solid& Solid() const;
|
||||
The following public methods of the *BOPAlgo_BuilderSolid* class have been removed as redundant:
|
||||
* *void SetSolid(const TopoDS_Solid& theSolid);*
|
||||
* *const TopoDS_Solid& Solid() const;*
|
||||
|
||||
@subsection upgrade_730_BRepAlgoBO Boolean Operation classes in BRepAlgo are deprecated
|
||||
|
||||
The API classes in the package BRepAlgo providing access to old Boolean operations are marked as deprecated:
|
||||
* BRepAlgo_Fuse
|
||||
* BRepAlgo_Common
|
||||
* BRepAlgo_Cut
|
||||
* BRepAlgo_Section
|
||||
Corresponding classes from the package BRepAlgoAPI should be used instead.
|
||||
|
||||
@subsection upgrade_730_replace_CDM_MessageDriver_interface_by_Message_Messenger Unification of the Error/Warning reporting system of Application Framework
|
||||
|
||||
Class *CDM_MessageDriver* and its descendants have been removed; class *Message_Messenger* is used instead in all OCAF packages.
|
||||
By default, messenger returned by *Message::DefaultMessenger()* is used, thus all messages generated by OCAF are directed in the common message queue of OCCT.
|
||||
|
||||
In classes implementing OCAF persistence for custom attributes (those inheriting from *BinMDF_ADriver*, *XmlMDF_ADriver*), uses of method *WriteMessage()* should be replaced by call to method *Send()* of the inherited field *myMessageDriver*. Note that this method takes additional argument indicating the gravity of the message (Trace, Info, Warning, Alarm, or Fail).
|
||||
|
||||
Class *Message_PrinterOStream* can be used instead of *CDM_COutMessageDriver* to direct all messages to a stream.
|
||||
If custom driver class is used in the application, that class shall be reimplemented inheriting from *Message_Printer* instead of *CDM_MessageDriver*.
|
||||
Method *Send()* should be redefined instead of method *Write()* of *CDM_MessageDriver*.
|
||||
To use the custom printer in OCAF, it can be either added to default messenger or set into the custom *Message_Messenger* object created in the method *MessageDriver()* of a class inheriting *CDF_Application*.
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.0 KiB |
@@ -18,7 +18,7 @@ modeling (CAD), manufacturing / measuring (CAM) or numerical simulation (CAE).
|
||||
@section OCCT_OVW_SECTION_2 Copyrights
|
||||
|
||||
Open CASCADE Technology and all materials, including this documentation, is
|
||||
Copyright (c) 1999-2017 by OPEN CASCADE S.A.S. All rights reserved.
|
||||
Copyright (c) 1999-2018 by OPEN CASCADE S.A.S. All rights reserved.
|
||||
|
||||
@htmlonly<center>@endhtmlonly
|
||||
https://www.opencascade.com
|
||||
@@ -223,7 +223,7 @@ for which OCCT is certified to work.
|
||||
| Graphic library | OpenGL 3.3+, OpenGL ES 2.0+ <br> Direct3D 9 |
|
||||
| Qt (for samples and demos) | Desktop: Qt 4.8.6+ https://www.qt.io/download/ <br> Android: Qt 5.3.2+ https://www.qt.io/download/ |
|
||||
| TCL (for testing tools) | Tcl/Tk 8.6.3+ https://www.tcl.tk/software/tcltk/download.html <br> or ActiveTcl 8.6 https://www.activestate.com/activetcl/downloads (for Windows)|
|
||||
| Freetype (for text rendering) | FreeType 2.4.11-2.5.5 https://sourceforge.net/projects/freetype/files/ |
|
||||
| Freetype (for text rendering) | FreeType 2.4.11-2.7.1 https://sourceforge.net/projects/freetype/files/ |
|
||||
| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.17.0+ https://sourceforge.net/projects/freeimage/files |
|
||||
| FFmpeg (optional, for video recording) | FFmpeg 3.1+ https://www.ffmpeg.org/download.html |
|
||||
| gl2ps (optional, for export contents of OCCT viewer to vector formats) | gl2ps-1.3.8+ http://geuz.org/gl2ps/ |
|
||||
@@ -286,13 +286,13 @@ When the installation is complete, you will find the directories for 3rd party p
|
||||
|
||||
@figure{/overview/images/overview_3rdparty.png}
|
||||
|
||||
The contents of the OCCT-7.0.0 directory (called further "OCCT root", or $CASROOT) are as follows:
|
||||
The contents of the OCCT-7.3.0 directory (called further "OCCT root", or $CASROOT) are as follows:
|
||||
|
||||
@figure{/overview/images/overview_installation.png, "The directory tree"}
|
||||
|
||||
* **adm** This folder contains administration files, which allow rebuilding OCCT;
|
||||
* **adm/cmake** This folder contains files of CMake building procedure;
|
||||
* **adm/msvc** This folder contains Visual Studio projects for Visual C++ 2005, 2008, 2010, 2012 and 2013 which allow rebuilding OCCT under Windows platform in 32 and 64-bit mode;
|
||||
* **adm/msvc** This folder contains Visual Studio projects for Visual C++ 2010, 2012, 2013, 2015 and 2017 which allow rebuilding OCCT under Windows platform in 32 and 64-bit mode;
|
||||
* **data** This folder contains CAD files in different formats, which can be used to test the OCCT functionality;
|
||||
* **doc** This folder contains OCCT documentation in HTML and PDF format;
|
||||
* **dox** This folder contains sources of OCCT documentation in plain text (MarkDown) format;
|
||||
@@ -300,6 +300,7 @@ The contents of the OCCT-7.0.0 directory (called further "OCCT root", or $CASROO
|
||||
* **samples** This folder contains sample applications.
|
||||
* **src** This folder contains OCCT source files. They are organized in folders, one per development unit;
|
||||
* **tests** This folder contains scripts for OCCT testing.
|
||||
* **tools** This folder contains sources of Inspector tool.
|
||||
* **win64/vc10** This folder contains executable and library files built in optimize mode for Windows platform by Visual C++ 2010;
|
||||
|
||||
@section OCCT_OVW_SECTION_4_2 Environment Variables
|
||||
@@ -310,7 +311,7 @@ To run any Open CASCADE Technology application you need to set the environment v
|
||||
|
||||
You can define the environment variables with env.bat script located in the
|
||||
$CASROOT folder. This script accepts two arguments to be used:
|
||||
the version of Visual Studio (vc8 -- vc12) and the architecture (win32 or win64).
|
||||
the version of Visual Studio (vc10 -- vc141) and the architecture (win32 or win64).
|
||||
|
||||
The additional environment settings necessary for compiling OCCT libraries and samples
|
||||
by Microsoft Visual Studio can be set using script custom.bat located in the same folder.
|
||||
|
@@ -2171,7 +2171,7 @@ aMV.SetArguments(aLS);
|
||||
// setting options for this algorithm is similar to setting options for GF algorithm (see "GF Usage" chapter)
|
||||
...
|
||||
// Additional option of the algorithm
|
||||
Standard_Boolean bAvoidInternalShapes = Standard_False; /* Avoid or not the internal for solids shapes in the result*/
|
||||
Standard_Boolean bAvoidInternalShapes = Standard_False; // Set to True to exclude from the result any shapes internal to the solids
|
||||
aMV.SetAvoidInternalShapes(bAvoidInternalShapes);
|
||||
|
||||
// Perform the operation
|
||||
@@ -2819,10 +2819,10 @@ To enable the safe processing mode for the operation in DRAW, it is necessary to
|
||||
bnondestructive 1
|
||||
~~~~
|
||||
|
||||
@subsection occt_algorithms_11a_4 Disabling check of the input solids for inverted status
|
||||
@subsection occt_algorithms_11a_4 How to disable check of input solids for inverted status
|
||||
|
||||
By default, all input solids are checked for inverted status, i.e. the solids are classified to understand if they are holes in the space (negative volumes) or normal solids (positive volumes). The possibility to disable the check of the input solids for inverted status is the advanced option in Boolean Operation component. This option can be applied to all Basic operations such as General Fuse, Splitting, Boolean, Section, Maker Volume, Cells building.
|
||||
This option allows avoiding time-consuming classification of the input solids and operate with them as with positive volumes, saving up to 10 percent of time on the cases with big number of input solids.
|
||||
By default, all input solids are checked for inverted status, i.e. the solids are classified to understand if they are holes in the space (negative volumes) or normal solids (positive volumes). The possibility to disable the check of the input solids for inverted status is the advanced option in Boolean Operation component. This option can be applied to all Basic operations, such as General Fuse, Splitting, Boolean, Section, Maker Volume and Cells building.
|
||||
This option allows avoiding time-consuming classification of the input solids and processing them in the same way as positive volumes, saving up to 10 percent of time on the cases with a big number of input solids.
|
||||
|
||||
The classification should be disabled only if the user is sure that there are no negative volumes among the input solids, otherwise the result may be invalid.
|
||||
|
||||
@@ -2842,7 +2842,7 @@ aGF.SetCheckInverted(Standard_False);
|
||||
~~~~
|
||||
|
||||
#### TCL level
|
||||
To enable/disable the classification of the solids in DRAW, it is necessary to call the *bcheckinverted* command with appropriate value:
|
||||
To enable/disable the classification of the solids in DRAW, it is necessary to call *bcheckinverted* command with the appropriate value:
|
||||
* 0 - disabling the classification;
|
||||
* 1 - default value, enabling the classification.
|
||||
|
||||
@@ -2852,7 +2852,7 @@ bcheckinverted 0
|
||||
|
||||
@subsection occt_algorithms_11a_5_obb Usage of Oriented Bounding Boxes
|
||||
|
||||
Since Oriented Bounding Boxes are usually much tighter than Axes Aligned Bounding Boxes (for more information on OBB please see the @ref occt_modat_6 "Bounding boxes" chapter of Modeling data User guide) its usage can significantly speed-up the intersection stage of the operation by reducing the number of interfering objects.
|
||||
Since Oriented Bounding Boxes are usually much tighter than Axes Aligned Bounding Boxes (for more information on OBB see the @ref occt_modat_6 "Bounding boxes" chapter of Modeling data User guide) its usage can significantly speed-up the intersection stage of the operation by reducing the number of interfering objects.
|
||||
|
||||
@subsubsection occt_algorithms_11a_5_obb_1 Usage
|
||||
|
||||
@@ -2931,28 +2931,30 @@ Warning: The positioning of the shapes leads to creation of small edges without
|
||||
|
||||
@section occt_algorithms_history History Information
|
||||
|
||||
The chapter describes the rules for filling the History Information (or just History) for the arguments of the operations in Boolean Component.
|
||||
The History is available only for the VERTICES, EDGES, FACES and SOLIDS from the input arguments.
|
||||
All operations in Boolean Component support @ref occt_modalg_hist "History information". This chapter describes how the History is filled for these operations.
|
||||
|
||||
The History allows tracking the modification of the input shapes during the operation. It consists of the following information:
|
||||
* Information about Deleted shapes;
|
||||
* Information about Modified shapes;
|
||||
* Information about Generated shapes;
|
||||
Additionally to Vertices, Edges and Faces the history is also available for the Solids.
|
||||
|
||||
All History information is filled basing on the result of current operation. History cannot return any shapes not contained in the result.
|
||||
Thus if the result of the operation is empty shape, all input shapes will be considered as Deleted and none will have Modified and Generated shapes.
|
||||
The rules for filling the History information about Deleted and Modified shapes are the same as for the API algorithms.
|
||||
|
||||
@subsection occt_algorithms_history_del Deleted shapes
|
||||
Only the rules for Generated shapes require clarification.
|
||||
In terms of the algorithms in Boolean Component the shape from the arguments can have Generated shapes only if these new shapes
|
||||
have been obtained as a result of pure intersection (not overlapping) of this shape with any other shapes from arguments. Thus, the Generated shapes are always:
|
||||
* VERTICES created from the intersection points and may be Generated from edges and faces only;
|
||||
* EDGES created from the intersection edges and may be Generated from faces only.
|
||||
|
||||
The shape is considered as Deleted if the result shape do not contain the shape itself and none of its splits.
|
||||
For example, the result of CUT operation of two overlapping planar faces (see the example below) does not contain any parts from the tool face. Thus, the tool faces is considered as Deleted.
|
||||
So, only EDGES and FACES could have information about Generated shapes. For all other types of shapes the list of Generated shapes will be empty.
|
||||
|
||||
@subsection occt_algorithms_history_ex Examples
|
||||
|
||||
Here are some examples illustrating the History information.
|
||||
|
||||
@subsubsection occt_algorithms_history_ex_del Deleted shapes
|
||||
|
||||
The result of CUT operation of two overlapping planar faces (see the example below) does not contain any parts from the tool face. Thus, the tool face is considered as Deleted.
|
||||
If the faces are not fully coinciding, the result must contain some parts of the object face. In this case object face will be considered as not deleted.
|
||||
But if the faces are fully coinciding, the result must be empty, and both faces will be considered as Deleted.
|
||||
|
||||
To get the information about Deleted shapes it is necessary to use the method *Standard_Boolean IsDeleted(const TopoDS_Shape& theS)*.
|
||||
|
||||
To get the information about Deleted shapes in DRAW it is necessary to use the command *bisdeleted shape*.
|
||||
|
||||
Example of the overlapping faces:
|
||||
|
||||
~~~~
|
||||
@@ -2967,29 +2969,21 @@ baddtools f2
|
||||
bfillds
|
||||
bbop r 2
|
||||
|
||||
bisdeleted f1
|
||||
savehistory cut_hist
|
||||
isdeleted cut_hist f1
|
||||
# Not deleted
|
||||
|
||||
bisdeleted f2
|
||||
isdeleted cut_hist f2
|
||||
# Deleted
|
||||
~~~~
|
||||
|
||||
@subsection occt_algorithms_history_modif Modified shapes
|
||||
@subsubsection occt_algorithms_history_ex_modif Modified shapes
|
||||
|
||||
The shape is considered as Modified if the result shape contains any of the splits of the shape, not the shape itself. The shape can be modified only into the shapes with same dimension.
|
||||
The splits of the shape contained in the result shape are Modified from the shape.
|
||||
|
||||
For example, in the FUSE operation of two edges intersecting in one point (see the example below), both edges will be split by the intersection point. All these splits will be contained in the result.
|
||||
In the FUSE operation of two edges intersecting in one point (see the example below), both edges will be split by the intersection point. All these splits will be contained in the result.
|
||||
Thus, each of the input edges will be Modified into its two splits.
|
||||
But in the CUT operation on the same edges, the tool edge will be Deleted from the result and, thus, will not have any Modified shapes.
|
||||
|
||||
To get the information about Modified shapes it is necessary to use the method *const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS)*.
|
||||
The list of Modified elements will contain only those which are contained in the result of the operation. If the list is empty the shape has not been modified and it is necessary to check if it has been Deleted.
|
||||
|
||||
To get the information about Modified shapes in DRAW it is necessary to use the command *bmodified modif shape*.
|
||||
|
||||
Example of the intersecting edges:
|
||||
|
||||
~~~~
|
||||
line l1 0 0 0 1 0 0
|
||||
mkedge e1 l1 -10 10
|
||||
@@ -3006,44 +3000,35 @@ bfillds
|
||||
# fuse operation
|
||||
bbop r 1
|
||||
|
||||
bmodified m1 e1
|
||||
savehistory fuse_hist
|
||||
|
||||
modified m1 fuse_hist e1
|
||||
nbshapes m1
|
||||
# EDGES: 2
|
||||
|
||||
bmodified m2 e2
|
||||
modified m2 fuse_hist e2
|
||||
nbshapes m2
|
||||
# EDGES: 2
|
||||
|
||||
# cut operation
|
||||
bbop r 2
|
||||
|
||||
bmodified m1 e1
|
||||
savehistory cut_hist
|
||||
|
||||
modified m1 cut_hist e1
|
||||
nbshapes m1
|
||||
# EDGES: 2
|
||||
|
||||
bmodified m2 e2
|
||||
modified m2 cut_hist e2
|
||||
# The shape has not been modified
|
||||
|
||||
~~~~
|
||||
|
||||
|
||||
@subsection occt_algorithms_history_gen Generated shapes
|
||||
@subsubsection occt_algorithms_history_gen Generated shapes
|
||||
|
||||
In terms of the algorithms in Boolean Component the shape from the arguments can have Generated shapes only if these new shapes have been obtained as a result of pure intersection (not overlapping)
|
||||
of this shape with any other shapes from arguments. Thus, the Generated shapes are always:
|
||||
* VERTICES created from the intersection points and may be Generated from edges and faces only;
|
||||
* EDGES created from the intersection edges and may be Generated from faces only.
|
||||
Two intersecting edges will both have the intersection vertices Generated from them.
|
||||
|
||||
So, only EDGES and FACES could have information about Generated shapes. For all other types of shapes the list of Generated shapes will be empty.
|
||||
|
||||
For example, the two intersecting edges will both have the intersection vertices Generated from them.
|
||||
|
||||
To get the information about Generated shapes it is necessary to use the method *const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS)*.
|
||||
The list of Generated elements will contain only those which are contained in the result of the operation. If the list is empty no new shapes have been Generated from the shape.
|
||||
|
||||
To get the information about Generated shapes in DRAW it is necessary to use the command *bgenerated gen shape*.
|
||||
|
||||
Example of interfering faces
|
||||
As for the operation with intersecting faces, consider the following example:
|
||||
|
||||
~~~~
|
||||
plane p1 0 0 0 0 0 1
|
||||
@@ -3061,11 +3046,13 @@ bfillds
|
||||
# fuse operation
|
||||
bbop r 1
|
||||
|
||||
bgenerated gf1 f1
|
||||
savehistory fuse_hist
|
||||
|
||||
generated gf1 fuse_hist f1
|
||||
nbshapes gf1
|
||||
# EDGES: 1
|
||||
|
||||
bgenerated gf2 f2
|
||||
generated gf2 fuse_hist f2
|
||||
nbshapes gf2
|
||||
# EDGES: 1
|
||||
|
||||
@@ -3073,10 +3060,12 @@ nbshapes gf2
|
||||
# common operation - result is empty
|
||||
bbop r 0
|
||||
|
||||
bgenerated gf1 f1
|
||||
savehistory com_hist
|
||||
|
||||
generated gf1 com_hist f1
|
||||
# No shapes were generated from the shape
|
||||
|
||||
bgenerated gf2 f2
|
||||
generated gf2 com_hist f2
|
||||
# No shapes were generated from the shape
|
||||
|
||||
~~~~
|
||||
|
@@ -5577,7 +5577,7 @@ intconcon curve1 curve2
|
||||
|
||||
Displays the intersection points between two 2d curves.
|
||||
Curves must be only conic sections: 2d lines, circles, ellipses,
|
||||
hyperbolas, parabolas. Algorithm from IntAna2d_AnaIntersection is used.
|
||||
hyperbolas, parabolas. The algorithm from *IntAna2d_AnaIntersection* is used.
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
@@ -7325,11 +7325,7 @@ buildevol
|
||||
|
||||
@subsection occt_draw_defeaturing Defeaturing
|
||||
|
||||
Draw module for @ref occt_modalg_defeaturing "3D Model Defeaturing" includes the command to perform the operation and the commands to access the history of shapes modifications.
|
||||
|
||||
@subsubsection occt_draw_defeaturing_op removefeatures
|
||||
|
||||
*removefeatures* command performs the removal of the requested features from the shape.
|
||||
Draw command **removefeatures** is intended for performing @ref occt_modalg_defeaturing "3D Model Defeaturing", i.e. it performs the removal of the requested features from the shape.
|
||||
|
||||
Syntax:
|
||||
~~~~
|
||||
@@ -7345,20 +7341,6 @@ nohist - disables the history collection;
|
||||
parallel - enables the parallel processing mode.
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_draw_defeaturing_hist rfmodified, rfgenerated, rfisdeleted
|
||||
|
||||
To track the history of a shape modification during Defeaturing the following commands can be used:
|
||||
* <b>rfmodified</b> Shows the shapes modified from the input shape during Defeaturing.
|
||||
* <b>rfgenerated</b> Shows the shapes generated from the input shape during Defeaturing.
|
||||
* <b>rfisdeleted</b> Checks if the shape has been deleted during Defeaturing (i.e. has no trace in the result shape).
|
||||
|
||||
Syntax:
|
||||
~~~~
|
||||
rfmodified : rfmodified c_modified shape
|
||||
rfgenerated : rfgenerated c_generated shape
|
||||
rfisdeleted : rfisdeleted shape
|
||||
~~~~
|
||||
|
||||
|
||||
@subsection occt_draw_7_9 Analysis of topology and geometry
|
||||
|
||||
@@ -7378,15 +7360,26 @@ Analysis of shapes includes commands to compute length, area, volumes and inerti
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
lprops shape
|
||||
sprops shape
|
||||
vprops shape
|
||||
lprops shape [x y z] [-skip] [-full] [-tri]
|
||||
sprops shape [epsilon] [c[losed]] [x y z] [-skip] [-full] [-tri]
|
||||
vprops shape [epsilon] [c[losed]] [x y z] [-skip] [-full] [-tri]
|
||||
~~~~~
|
||||
|
||||
* **lprops** computes the mass properties of all edges in the shape with a linear density of 1;
|
||||
* **sprops** of all faces with a surface density of 1;
|
||||
* **vprops** of all solids with a density of 1.
|
||||
|
||||
For computation of properties of the shape, exact geomery (curves, surfaces) or
|
||||
some discrete data (polygons, triangulations) can be used for calculations.
|
||||
The epsilon, if given, defines relative precision of computation.
|
||||
The **closed** flag, if present, forces computation only closed shells of the shape.
|
||||
The centroid coordinates will be put to DRAW variables x y z (if given).
|
||||
Shared entities will be taken in account only one time in the **skip** mode.
|
||||
All values are output with the full precision in the **full** mode.
|
||||
Preferable source of geometry data are triangulations in case if it exists,
|
||||
if the **-tri** key is used, otherwise preferable data is exact geometry.
|
||||
If epsilon is given, exact geometry (curves, surfaces) are used for calculations independently of using key **-tri**.
|
||||
|
||||
All three commands print the mass, the coordinates of the center of gravity, the matrix of inertia and the moments. Mass is either the length, the area or the volume. The center and the main axis of inertia are displayed.
|
||||
|
||||
**Example:**
|
||||
@@ -7423,12 +7416,12 @@ Syntax:
|
||||
bounding {-s shape | -c xmin ymin zmin xmax ymax zmax} [-obb] [-shape name] [-dump] [-notriangulation] [-perfmeter name NbIters] [-save xmin ymin zmin xmax ymax zmax] [-nodraw] [-optimal] [-exttoler]
|
||||
~~~~~
|
||||
|
||||
Computes and displays the bounding box (BndBox) of a shape. The bounding box is a cuboid circumscribes the source shape.
|
||||
Generaly, bounding boxes can be divided on two main types:
|
||||
- axis-aligned BndBox (AABB). I.e. the box whose edges are parallel to the some axis of World Coordinate System (WCS);
|
||||
Computes and displays the bounding box (BndBox) of a shape. The bounding box is a cuboid that circumscribes the source shape.
|
||||
Generaly, bounding boxes can be divided into two main types:
|
||||
- axis-aligned BndBox (AABB). I.e. the box whose edges are parallel to an axis of World Coordinate System (WCS);
|
||||
- oriented BndBox (OBB). I.e. not AABB.
|
||||
|
||||
Detailed information about this command is availabe in DRAW help-system (enter "help bounding" in DRAW-application).
|
||||
Detailed information about this command is availabe in DRAW help-system (enter "help bounding" in DRAW application).
|
||||
|
||||
**Example 1: Creation of AABB with given corners**
|
||||
~~~~~
|
||||
@@ -7509,7 +7502,7 @@ Syntax:
|
||||
isbbinterf shape1 shape2 [-o]
|
||||
~~~~~
|
||||
|
||||
Checks whether the bounding-boxes created from the given shapes are interfered. If "-o"-option is switched on then the oriented boxes will be checked. Otherwise, axes-aligned boxes will be checked.
|
||||
Checks whether the bounding boxes created from the given shapes are interfered. If "-o"-option is switched on then the oriented boxes will be checked. Otherwise, axis-aligned boxes will be checked.
|
||||
|
||||
**Example 1: Not interfered AABB**
|
||||
~~~~~
|
||||
@@ -7558,7 +7551,7 @@ Syntax:
|
||||
distmini name Shape1 Shape2
|
||||
~~~~~
|
||||
|
||||
Calculates the minimum distance between two shapes. The calculation returns the number of solutions, If more than one solution exists. The options are displayed in the viewer(red) and the results are listed in the shell window. The *distmini* lines are considered as shapes which have a value v.
|
||||
Calculates the minimum distance between two shapes. The calculation returns the number of solutions, if more than one solution exists. The options are displayed in the viewer in red and the results are listed in the shell window. The *distmini* lines are considered as shapes which have a value v.
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
@@ -7628,8 +7621,8 @@ checkshape [-top] shape [result] [-short]
|
||||
|
||||
Where:
|
||||
* *top* -- optional parameter, which allows checking only topological validity of a shape.
|
||||
* *shape* -- the only required parameter which represents the name of the shape to check.
|
||||
* *result* -- optional parameter which is the prefix of the output shape names.
|
||||
* *shape* -- the only required parameter, defines the name of the shape to check.
|
||||
* *result* -- optional parameter, defines custom prefix for the output shape names.
|
||||
* *short* -- a short description of the check.
|
||||
|
||||
**checkshape** examines the selected object for topological and geometric coherence. The object should be a three dimensional shape.
|
||||
@@ -7674,9 +7667,9 @@ validrange edge [(out) u1 u2]
|
||||
|
||||
Where:
|
||||
* *edge* -- the name of the edge to analyze.
|
||||
* *u1*, *u2* -- optional names of variables to put the range into.
|
||||
* *u1*, *u2* -- optional names of variables to put into the range.
|
||||
|
||||
**validrange** computes valid range of the edge. If *u1* and *u2* are not given it returns first and last parameters. Otherwise, it sets the variables u1 and u2.
|
||||
**validrange** computes valid range of the edge. If *u1* and *u2* are not given, it returns the first and the last parameters. Otherwise, it sets variables *u1* and *u2*.
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
@@ -8050,6 +8043,163 @@ Options:
|
||||
* -a AngTol - angular tolerance used for distinguishing the planar faces;
|
||||
* -s Shared(0/1) - boolean flag which defines whether the input edges are already shared or have to be intersected.
|
||||
|
||||
@subsection occt_draw_hist History commands
|
||||
|
||||
Draw module for @ref occt_modalg_hist "History Information support" includes the command to save history of modifications performed by Boolean operation or sibling commands into a drawable object and the actual history commands:
|
||||
|
||||
* *savehistory*;
|
||||
* *isdeleted*;
|
||||
* *modified*;
|
||||
* *generated*.
|
||||
|
||||
@subsubsection occt_draw_hist_save savehistory
|
||||
|
||||
*savehistory* command saves the history from the session into a drawable object with the given name.
|
||||
|
||||
Syntax:
|
||||
~~~~
|
||||
savehistory : savehistory name
|
||||
~~~~
|
||||
|
||||
If the history of shape modifications performed during an operation is needed, the *savehistory* command should be called after the command performing the operation.
|
||||
If another operation supporting history will be performed before the history of the first operation is saved it will be overwritten with the new history.
|
||||
|
||||
Example:
|
||||
~~~~
|
||||
box b1 10 10 10
|
||||
box b2 5 0 0 10 10 15
|
||||
bfuse r b1 b2
|
||||
savehistory fuse_hist
|
||||
|
||||
dump fuse_hist
|
||||
#*********** Dump of fuse_hist *************
|
||||
# History contains:
|
||||
# - 4 Deleted shapes;
|
||||
# - 20 Modified shapes;
|
||||
# - 6 Generated shapes.
|
||||
|
||||
unifysamedom ru r
|
||||
savehistory usd_hist
|
||||
dump usd_hist
|
||||
#*********** Dump of usd_hist *************
|
||||
#History contains:
|
||||
# - 14 Deleted shapes;
|
||||
# - 28 Modified shapes;
|
||||
# - 0 Generated shapes.
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_draw_hist_isdel isdeleted
|
||||
|
||||
*isdeleted* command checks if the given shape has been deleted in the given history.
|
||||
|
||||
Syntax:
|
||||
~~~~
|
||||
isdeleted : isdeleted history shape
|
||||
~~~~
|
||||
|
||||
Example:
|
||||
~~~~
|
||||
box b1 4 4 4 2 2 2
|
||||
box b2 10 10 10
|
||||
bcommon r b1 b2
|
||||
|
||||
savehistory com_hist
|
||||
# all vertices, edges and faces of the b2 are deleted
|
||||
foreach s [join [list [explode b2 v] [explode b2 e] [explode b2 f] ] ] {
|
||||
isdeleted com_hist $s
|
||||
# Deleted
|
||||
}
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_draw_hist_mod modified
|
||||
|
||||
*modified* command returns the shapes Modified from the given shape in the given history. All modified shapes are put into a compound. If the shape has not been modified, the resulting compound will be empty. Note that if the shape has been modified into a single shape only, it will be returned without enclosure into the compound.
|
||||
|
||||
Syntax:
|
||||
~~~~
|
||||
modified : modified modified_shapes history shape
|
||||
~~~~
|
||||
|
||||
Example:
|
||||
~~~~
|
||||
box b 10 10 10
|
||||
explode b e
|
||||
fillet r b 2 b_1
|
||||
|
||||
savehistory fillet_hist
|
||||
|
||||
explode b f
|
||||
|
||||
modified m3 fillet_hist b_3
|
||||
modified m5 fillet_hist b_5
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_draw_hist_gen generated
|
||||
|
||||
*generated* command returns the shapes Generated from the given shape in the given history. All generated shapes are put into a compound. If no shapes have been generated from the shape, the resulting compound will be empty. Note that; if the shape has generated a single shape only, it will be returned without enclosure into the compound.
|
||||
|
||||
Syntax:
|
||||
~~~~
|
||||
generated : generated generated_shapes history shape
|
||||
~~~~
|
||||
|
||||
Example:
|
||||
~~~~
|
||||
polyline w1 0 0 0 10 0 0 10 10 0
|
||||
polyline w2 5 1 10 9 1 10 9 5 10
|
||||
|
||||
thrusections r 0 0 w1 w2
|
||||
|
||||
savehistory loft_hist
|
||||
|
||||
explode w1 e
|
||||
explode w2 e
|
||||
|
||||
generated g11 loft_hist w1_1
|
||||
generated g12 loft_hist w1_2
|
||||
generated g21 loft_hist w2_1
|
||||
generated g22 loft_hist w2_2
|
||||
|
||||
compare g11 g21
|
||||
# equal shapes
|
||||
|
||||
compare g12 g22
|
||||
# equal shapes
|
||||
~~~~
|
||||
|
||||
@subsubsection occt_draw_hist_extension Enabling Draw history support for the algorithms
|
||||
|
||||
Draw History mechanism allows fast and easy enabling of the Draw history support for the OCCT algorithms supporting standard history methods.
|
||||
To enable History commands for the algorithm it is necessary to save the history of the algorithm into the session.
|
||||
For that, it is necessary to put the following code into the command implementation just after the command is done:
|
||||
~~~~
|
||||
BRepTest_Objects::SetHistory(ListOfArguments, Algorithm);
|
||||
~~~~
|
||||
|
||||
Here is the example of how it is done in the command performing Split operation (see implementation of the *bapisplit* command):
|
||||
~~~~
|
||||
BRepAlgoAPI_Splitter aSplitter;
|
||||
// setting arguments
|
||||
aSplitter.SetArguments(BOPTest_Objects::Shapes());
|
||||
// setting tools
|
||||
aSplitter.SetTools(BOPTest_Objects::Tools());
|
||||
|
||||
// setting options
|
||||
aSplitter.SetRunParallel(BOPTest_Objects::RunParallel());
|
||||
aSplitter.SetFuzzyValue(BOPTest_Objects::FuzzyValue());
|
||||
aSplitter.SetNonDestructive(BOPTest_Objects::NonDestructive());
|
||||
aSplitter.SetGlue(BOPTest_Objects::Glue());
|
||||
aSplitter.SetCheckInverted(BOPTest_Objects::CheckInverted());
|
||||
aSplitter.SetUseOBB(BOPTest_Objects::UseOBB());
|
||||
|
||||
// performing operation
|
||||
aSplitter.Build();
|
||||
|
||||
// Store the history for the Objects (overwrites the history in the session)
|
||||
BRepTest_Objects::SetHistory(BOPTest_Objects::Shapes(), aSplitter);
|
||||
// Add the history for the Tools
|
||||
BRepTest_Objects::AddHistory(BOPTest_Objects::Tools(), aSplitter);
|
||||
~~~~
|
||||
|
||||
@subsection occt_draw_7_12 Texture Mapping to a Shape
|
||||
|
||||
@@ -10881,24 +11031,24 @@ tinspector [-plugins {name1 ... [nameN] | all}]
|
||||
[-select {object | name1 ... [nameN]}]
|
||||
[-show {0|1} = 1]
|
||||
~~~~~
|
||||
Starts tool of inspection.
|
||||
Starts inspection tool.
|
||||
Options:
|
||||
* *plugins* enters plugins that should be added in the inspector.
|
||||
Available names are: dfbrowser, vinspector and shapeview.
|
||||
Plugins order will be the same as defined in arguments.
|
||||
Available names are: *dfbrowser*, *vinspector* and *shapeview*.
|
||||
Plugins order will be the same as defined in the arguments.
|
||||
'all' adds all available plugins in the order:
|
||||
DFBrowser, VInspector and ShapeView.
|
||||
If at the first call this option is not used, 'all' option is applyed;
|
||||
If at the first call this option is not used, 'all' option is applied;
|
||||
* *activate* activates the plugin in the tool view.
|
||||
If at the first call this option is not used, the first plugin is activated;
|
||||
* *shape* initializes plugin/s by the shape object. If 'name' is empty, initializes all plugins;
|
||||
* *open* gives the file to the plugin/s. If the plugin is active, after open, update content will be done;
|
||||
* *shape* initializes plugin(s) by the shape object. If 'name' is empty, initializes all plugins;
|
||||
* *open* gives the file to the plugin(s). If the plugin is active after open, the content will be updated;
|
||||
* *update* updates content of the active plugin;
|
||||
* *select* sets the parameter that should be selected in an active tool view.
|
||||
Depending on active tool the parameter is:
|
||||
ShapeView: 'object' is an instance of TopoDS_Shape TShape,
|
||||
DFBrowser: 'name' is an entry of TDF_Label and name2(optionaly) for TDF_Attribute type name,
|
||||
VInspector: 'object' is an instance of AIS_InteractiveObject;
|
||||
Depending on the active tool the parameter is:
|
||||
ShapeView: 'object' is an instance of *TopoDS_Shape TShape*,
|
||||
DFBrowser: 'name' is an entry of *TDF_Label* and 'name2' (optionally) for *TDF_Attribute* type name,
|
||||
VInspector: 'object' is an instance of *AIS_InteractiveObject*;
|
||||
* *show* sets Inspector view visible or hidden. The first call of this command will show it.
|
||||
|
||||
**Example:**
|
||||
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 6.0 KiB |
BIN
dox/user_guides/inspector/images/3DView_set_orientation.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
@@ -73,8 +73,8 @@
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="128.94698"
|
||||
inkscape:cy="215.23058"
|
||||
inkscape:cx="529.17338"
|
||||
inkscape:cy="317.0623"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
@@ -85,10 +85,10 @@
|
||||
inkscape:showpageshadow="false"
|
||||
inkscape:snap-nodes="false"
|
||||
inkscape:snap-global="false"
|
||||
inkscape:window-width="1522"
|
||||
inkscape:window-width="1332"
|
||||
inkscape:window-height="784"
|
||||
inkscape:window-x="1725"
|
||||
inkscape:window-y="5"
|
||||
inkscape:window-x="581"
|
||||
inkscape:window-y="97"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata3732">
|
||||
@@ -200,5 +200,19 @@
|
||||
inkscape:export-filename="D:\OCCT\master_CR29018\dox\user_guides\inspector\images\selection_in_tree_view.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<image
|
||||
y="55.529915"
|
||||
x="167.95375"
|
||||
id="image1593"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAIAAABLixI0AAAAA3NCSVQICAjb4U/gAAAAsElEQVQ4
|
||||
jcWU4QnEIAyFtWSKCg4hbucmzuQUYufI/fCQeG1VTODer5TCx3tJjA4hKCGBc857zwfFGKFW1tpt
|
||||
Ss65FgffUVPHQkQxFlMdS2stxpLMyPQF9AMRG+6ROzYObz9KuVi+qIw5xVjqFnM6mdF+0ZgrkUdz
|
||||
NOasiFKulciT/aq4xd7N92t9CP9+27rXM2vxDVH7tN68ORXx05P9+3Vv7nfv283mCJRSKSU+SFgf
|
||||
ylJCrIGwaxIAAAAASUVORK5CYII=
|
||||
"
|
||||
style="image-rendering:optimizeSpeed"
|
||||
preserveAspectRatio="none"
|
||||
height="6.6145835"
|
||||
width="6.6145835" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
BIN
dox/user_guides/inspector/images/preferences.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
@@ -57,9 +57,9 @@
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="314.86686"
|
||||
inkscape:cy="103.10687"
|
||||
inkscape:zoom="4"
|
||||
inkscape:cx="585.11712"
|
||||
inkscape:cy="337.7975"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
@@ -70,8 +70,8 @@
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1252"
|
||||
inkscape:window-height="826"
|
||||
inkscape:window-x="2069"
|
||||
inkscape:window-y="98"
|
||||
inkscape:window-x="276"
|
||||
inkscape:window-y="50"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata3933">
|
||||
@@ -81,7 +81,7 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
@@ -155,5 +155,19 @@
|
||||
inkscape:export-filename="D:\OCCT\master_CR29018\dox\user_guides\inspector\images\selection_in_tree_view.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<image
|
||||
y="102.39896"
|
||||
x="62.498363"
|
||||
id="image5982"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAIAAABLixI0AAAAA3NCSVQICAjb4U/gAAAAsElEQVQ4
|
||||
jcWU4QnEIAyFtWSKCg4hbucmzuQUYufI/fCQeG1VTODer5TCx3tJjA4hKCGBc857zwfFGKFW1tpt
|
||||
Ss65FgffUVPHQkQxFlMdS2stxpLMyPQF9AMRG+6ROzYObz9KuVi+qIw5xVjqFnM6mdF+0ZgrkUdz
|
||||
NOasiFKulciT/aq4xd7N92t9CP9+27rXM2vxDVH7tN68ORXx05P9+3Vv7nfv283mCJRSKSU+SFgf
|
||||
ylJCrIGwaxIAAAAASUVORK5CYII=
|
||||
"
|
||||
style="image-rendering:optimizeSpeed"
|
||||
preserveAspectRatio="none"
|
||||
height="6.6145835"
|
||||
width="6.6145835" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 37 KiB |
BIN
dox/user_guides/inspector/images/shapeview_tree_columns.png
Normal file
After Width: | Height: | Size: 39 KiB |
417
dox/user_guides/inspector/images/treeview_preferences.svg
Normal file
@@ -0,0 +1,417 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="165.36458mm"
|
||||
height="99.483337mm"
|
||||
viewBox="0 0 165.36458 99.483337"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
sodipodi:docname="treeview_preferences.svg"
|
||||
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">
|
||||
<defs
|
||||
id="defs2">
|
||||
<linearGradient
|
||||
id="linearGradient920"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
style="stop-color:#f0f0f0;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop918" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="237.05748"
|
||||
inkscape:cy="217.01184"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1336"
|
||||
inkscape:window-height="850"
|
||||
inkscape:window-x="276"
|
||||
inkscape:window-y="52"
|
||||
inkscape:window-maximized="1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
showborder="true"
|
||||
inkscape:showpageshadow="false" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-208.35938,-140.66904)">
|
||||
<rect
|
||||
style="opacity:1;fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:#000000;stroke-width:0.52916667;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4147-9"
|
||||
width="164.83542"
|
||||
height="98.95417"
|
||||
x="208.62396"
|
||||
y="140.93362"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:#e3f4d7;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.52916667;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4159-1"
|
||||
width="155.83388"
|
||||
height="89.326508"
|
||||
x="212.62471"
|
||||
y="145.50125"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.42238337;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4195-1-1"
|
||||
width="40.466312"
|
||||
height="11.316654"
|
||||
x="280.74753"
|
||||
y="149.43106"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.42572066;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4195-1-5-9"
|
||||
width="41.108295"
|
||||
height="11.316654"
|
||||
x="321.21384"
|
||||
y="149.43106"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="291.19687"
|
||||
y="156.27933"
|
||||
id="text5675-5"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5677-3"
|
||||
x="291.19687"
|
||||
y="156.27933"
|
||||
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Column_1</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="331.87143"
|
||||
y="156.27933"
|
||||
id="text5679-5"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5681-0"
|
||||
x="331.87143"
|
||||
y="156.27933"
|
||||
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Column_4</tspan></text>
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.97454143;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4195-7-0"
|
||||
width="145.13353"
|
||||
height="68.954567"
|
||||
x="217.1886"
|
||||
y="160.74771"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.5293566;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4195-1-1-3"
|
||||
width="63.558933"
|
||||
height="11.316654"
|
||||
x="217.1886"
|
||||
y="149.43106"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="243.21165"
|
||||
y="156.4707"
|
||||
id="text5675-5-2"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5677-3-2"
|
||||
x="243.21165"
|
||||
y="156.4707"
|
||||
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Name</tspan></text>
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.52916667;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5-8"
|
||||
width="63.558926"
|
||||
height="80.271225"
|
||||
x="217.1886"
|
||||
y="149.43106"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.52916667;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5-8-8"
|
||||
width="40.466305"
|
||||
height="80.271225"
|
||||
x="280.74753"
|
||||
y="149.43106"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.52916667;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5-8-8-8"
|
||||
width="41.108303"
|
||||
height="80.271225"
|
||||
x="321.21384"
|
||||
y="149.43106"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.1984375;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5-8-1"
|
||||
width="63.558929"
|
||||
height="11.316656"
|
||||
x="217.1886"
|
||||
y="149.43106"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.1984375;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5-8-1-0"
|
||||
width="40.466309"
|
||||
height="11.316656"
|
||||
x="280.74753"
|
||||
y="149.43106"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.1984375;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5-8-1-7"
|
||||
width="41.108307"
|
||||
height="11.316656"
|
||||
x="321.21384"
|
||||
y="149.43106"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.44990167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5"
|
||||
width="38.957039"
|
||||
height="58.495327"
|
||||
x="307.89423"
|
||||
y="158.80739"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="317.94843"
|
||||
y="174.62115"
|
||||
id="text5675-5-4"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5677-3-6"
|
||||
x="317.94843"
|
||||
y="174.62115"
|
||||
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Column_1</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="317.78735"
|
||||
y="165.06331"
|
||||
id="text5675-5-2-9"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5677-3-2-1"
|
||||
x="317.78735"
|
||||
y="165.06331"
|
||||
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Name</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="317.94843"
|
||||
y="184.37038"
|
||||
id="text5679-5-9"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5681-0-2"
|
||||
x="317.94843"
|
||||
y="184.37038"
|
||||
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Column_2</tspan></text>
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.1984375;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5-8-1-8"
|
||||
width="38.957031"
|
||||
height="9.7492247"
|
||||
x="307.89423"
|
||||
y="158.80739"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.1984375;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5-8-1-8-8"
|
||||
width="38.957035"
|
||||
height="9.7492256"
|
||||
x="307.89423"
|
||||
y="168.55661"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.1984375;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5-8-1-8-7"
|
||||
width="38.957035"
|
||||
height="9.7492256"
|
||||
x="307.89423"
|
||||
y="178.30583"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.1984375;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5-8-1-8-4"
|
||||
width="38.957035"
|
||||
height="9.7492256"
|
||||
x="307.89423"
|
||||
y="188.05505"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.1984375;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5-8-1-8-2"
|
||||
width="38.957035"
|
||||
height="9.7492256"
|
||||
x="307.89423"
|
||||
y="197.80428"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.1984375;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
|
||||
id="rect4157-5-8-1-8-71"
|
||||
width="38.957035"
|
||||
height="9.7492256"
|
||||
x="307.89423"
|
||||
y="207.5535"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<image
|
||||
y="170.78539"
|
||||
x="310.04617"
|
||||
id="image1119"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAA3NCSVQICAjb4U/gAAAAi0lEQVQ4 jWOccOIbA7mAiWydI0Lz+yd3yNR8bHHblvbEL2+fk6z52OK2uye2W8VW8ghL4tP8/skdNOfBdSpb eBFw9sWtc3dOyIHrx6MTi2ar2GpeYUmIfvw6GRgYGDGT569vX3ZPzH335A4DAwMenVhsZmBgYOPi cc2fLCSjgl8ndpuJB0MieQ4bzQCA/UWjCjrjVAAAAABJRU5ErkJggg== "
|
||||
style="image-rendering:optimizeSpeed"
|
||||
preserveAspectRatio="none"
|
||||
height="5.2916665"
|
||||
width="5.2916665" />
|
||||
<image
|
||||
y="161.03616"
|
||||
x="310.04617"
|
||||
id="image1119-4"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAA3NCSVQICAjb4U/gAAAAi0lEQVQ4 jWOccOIbA7mAiWydI0Lz+yd3yNR8bHHblvbEL2+fk6z52OK2uye2W8VW8ghL4tP8/skdNOfBdSpb eBFw9sWtc3dOyIHrx6MTi2ar2GpeYUmIfvw6GRgYGDGT569vX3ZPzH335A4DAwMenVhsZmBgYOPi cc2fLCSjgl8ndpuJB0MieQ4bzQCA/UWjCjrjVAAAAABJRU5ErkJggg== "
|
||||
style="image-rendering:optimizeSpeed"
|
||||
preserveAspectRatio="none"
|
||||
height="5.2916665"
|
||||
width="5.2916665" />
|
||||
<image
|
||||
y="200.03305"
|
||||
x="310.04617"
|
||||
id="image1119-7"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAA3NCSVQICAjb4U/gAAAAi0lEQVQ4 jWOccOIbA7mAiWydI0Lz+yd3yNR8bHHblvbEL2+fk6z52OK2uye2W8VW8ghL4tP8/skdNOfBdSpb eBFw9sWtc3dOyIHrx6MTi2ar2GpeYUmIfvw6GRgYGDGT569vX3ZPzH335A4DAwMenVhsZmBgYOPi cc2fLCSjgl8ndpuJB0MieQ4bzQCA/UWjCjrjVAAAAABJRU5ErkJggg== "
|
||||
style="image-rendering:optimizeSpeed"
|
||||
preserveAspectRatio="none"
|
||||
height="5.2916665"
|
||||
width="5.2916665" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="317.94843"
|
||||
y="194.1196"
|
||||
id="text5679-5-9-2"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5681-0-2-3"
|
||||
x="317.94843"
|
||||
y="194.1196"
|
||||
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Column_3</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="317.94843"
|
||||
y="203.86882"
|
||||
id="text5679-5-9-4"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5681-0-2-9"
|
||||
x="317.94843"
|
||||
y="203.86882"
|
||||
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Column_4</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="317.94843"
|
||||
y="213.61804"
|
||||
id="text5679-5-9-9"
|
||||
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5681-0-2-4"
|
||||
x="317.94843"
|
||||
y="213.61804"
|
||||
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Column_5</tspan></text>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 22 KiB |
BIN
dox/user_guides/inspector/images/vinspector_tree_columns.png
Normal file
After Width: | Height: | Size: 36 KiB |
@@ -5,41 +5,39 @@ Inspector {#occt_user_guides__inspector}
|
||||
|
||||
@section occt_inspector_1 Introduction
|
||||
|
||||
This manual explains how to use Inspector.
|
||||
This manual explains how to use the Inspector.
|
||||
|
||||
@subsection occt_inspector_1_1 Overview
|
||||
Inspector is a Qt-based library that provides functionality to interactively inspect low-level content of the OCAF data model, OCCT viewer and Modelisation Data.
|
||||
Inspector is a Qt-based library that provides functionality to interactively inspect low-level content of the OCAF data model, OCCT viewer and Modeling Data.
|
||||
This component is aimed to assist the developers of OCCT-based applications to debug the problematic situations that occur in their applications.
|
||||
|
||||
Inspector has a plugin-oriented architecture. The current release contains the following plugins:
|
||||
|
||||
| Plugin | OCCT component | Root class of OCCT investigated component |
|
||||
| :----- | :----- | :----- |
|
||||
| @ref occt_inspector_2_2 "DFBrowser"| OCAF | TDocStd_Application |
|
||||
| @ref occt_inspector_2_3 "VInspector"| Visualization | AIS_InteractiveContext |
|
||||
| @ref occt_inspector_2_4 "ShapeView"| Modelisation Data | TopoDS_Shape |
|
||||
| @ref occt_inspector_2_2 "DFBrowser"| OCAF | *TDocStd_Application* |
|
||||
| @ref occt_inspector_2_3 "VInspector"| Visualization | *AIS_InteractiveContext* |
|
||||
| @ref occt_inspector_2_4 "ShapeView"| Modeling Data | *TopoDS_Shape* |
|
||||
|
||||
|
||||
Each plugin implements logic of a corresponding OCCT component.
|
||||
|
||||
Each of the listed plugins is embeded in the common framework.
|
||||
The user is able to manage which plugins should be loaded by Inspector.
|
||||
Also he can extend number of plugins by implementing a new plugin.
|
||||
Each of the listed plugins is embedded in the common framework, thus it is possible to manage, which plugins should be loaded by the Inspector, and to extend their number by implementing a new plugin.
|
||||
|
||||
|
||||
@subsection occt_inspector_1_3 Getting started
|
||||
|
||||
There are two launch modes:
|
||||
1. Launch **TInspectorEXE** executable sample. For more details see @ref occt_inspector_6 "TInspectorEXE" section;
|
||||
2. Launch DRAW, load plugin INSPECTOR, and use **tinspector** command.
|
||||
For more details see @ref occt_inspector_7 "Launch in DRAW Test Harness" section.
|
||||
1. Launch **TInspectorEXE** executable sample. For more details see @ref occt_inspector_4_1 "TInspectorEXE" section;
|
||||
2. Launch DRAW, load plugin INSPECTOR, and use *tinspector* command.
|
||||
For more details see @ref occt_inspector_4_2 "Launch in DRAW Test Harness" section.
|
||||
|
||||
|
||||
Note. If you have no Inspector library in your build directory, please make sure that OCCT is compiled with *BUILD_Inspector*
|
||||
option ON. For more details see @ref occt_inspector_4 "Build procedure".
|
||||
Note. If you have no Inspector library in your build directory, please, make sure that OCCT is compiled with *BUILD_Inspector*
|
||||
option ON. For more details see @ref occt_inspector_5 "Build procedure".
|
||||
|
||||
|
||||
@section occt_inspector_2 Inspector
|
||||
@section occt_inspector_2 Inspector Plugins
|
||||
|
||||
@subsection occt_inspector_2_1 Overview
|
||||
|
||||
@@ -55,9 +53,9 @@ Inspector consists of the following components:
|
||||
|
||||
@figure{dfbrowser.png, "DFBrowser"}
|
||||
|
||||
This plugin visualizes content of TDocStd_Application in a tree view. It shows documents of the application,
|
||||
hierarchy of TDF_Labels, content of TDF_Attributes and interconnection between attributes (e.g. references).
|
||||
Additionally it has 3D view to visualize TopoDS_Shape elements stored in the document.
|
||||
This plugin visualizes the content of *TDocStd_Application* in a tree view. It shows application documents,
|
||||
the hierarchy of *TDF_Labels*, the content of *TDF_Attributes* and interconnection between attributes (e.g. references).
|
||||
Additionally there is a 3D view to visualize *TopoDS_Shape* elements stored in the document.
|
||||
|
||||
@subsubsection occt_inspector_2_2_2 Elements
|
||||
|
||||
@@ -69,96 +67,95 @@ Each OCAF element has own tree view item:
|
||||
|
||||
| Type | Tree item | Text | Description |
|
||||
| :----- | :----- | :----- | :----- |
|
||||
| TDocStd_Application | Application | TDocStd_Application | It is the root of tree view. Children are documents.|
|
||||
| TDocStd_Document | Document | entry : name | It is a child of Application item. Children are Labels and Attributes items.<br> Text view is an entry of the root label and the value of TDataStd_Name attribute for the label if it exists. |
|
||||
| TDF_Label | Label | entry : name | It is a child of a Document or another Label item. Children and text view are the same as for Document item. |
|
||||
| TDF_Attribute | Attribute | attribute type [additional information] | It is a child of a Label. It has no children. <br> Text view is the attribute type (DynamicType()->Name() of TDF_Attribute) and additional information (a combination of attribute values) |
|
||||
| *TDocStd_Application* | Application | *TDocStd_Application* | The root of tree view. Its children are documents.|
|
||||
| *TDocStd_Document* | Document | entry : name | A child of *Application* item. Its children are *Label* and *Attribute* items.<br> Text view is an entry of the root label and the value of *TDataStd_Name* attribute for the label if it exists. |
|
||||
| *TDF_Label* | Label | entry : name | A child of a *Document* or another *Label* item. Its children and text view are the same as for Document item. |
|
||||
| *TDF_Attribute* | Attribute | attribute type [additional information] | A child of a *Label*. It has no children. <br> Text view is the attribute type *(DynamicType()->Name()* of *TDF_Attribute*) and additional information (a combination of attribute values). |
|
||||
|
||||
|
||||
Additional information of TDF_Attributes:
|
||||
Additional information about TDF_Attributes:
|
||||
|
||||
| Type | Text |
|
||||
| :----- | :----- |
|
||||
| TDocStd_Owner | [storage format] |
|
||||
| TDataStd_AsciiString,<br> TDataStd_Name,<br> TDataStd_Real,<br> @ref occt_attribute_simple_types "other Simple types" | [value] |
|
||||
| TDataStd_BooleanList,<br> TDataStd_ExtStringList,<br> @ref occt_attribute_list_types "other List types" | [value_1 ... value_n] |
|
||||
| TDataStd_BooleanArray,<br> TDataStd_ByteArray,<br> @ref occt_attribute_array_types "other Array types" | [value_1 ... value_n] |
|
||||
| TDataStd_TreeNode | [tree node ID ==> Father()->Label()] (if it has father) or <br> [tree node ID <== First()->Label()] (if it has NO father)|
|
||||
| TDataStd_TreeNode(XDE) | [@ref occt_attribute_xde_tree_node_id "XDE tree node ID" ==> Father()->Label()] (if it has father), <br> [@ref occt_attribute_xde_tree_node_id "XDE tree Node ID" <== label_1, ..., label_n] (if it has NO father)|
|
||||
| TNaming_NamedShape | [shape type : evolution] |
|
||||
| TNaming_UsedShapes | [map extent] |
|
||||
| *TDocStd_Owner* | [storage format] |
|
||||
| *TDataStd_AsciiString*,<br> *TDataStd_Name*,<br> *TDataStd_Real*,<br> other *Simple* type attributes | [value] |
|
||||
| *TDataStd_BooleanList*,<br> *TDataStd_ExtStringList*,<br> other *List* attributes | [value_1 ... value_n] |
|
||||
| *TDataStd_BooleanArray*,<br> *TDataStd_ByteArray*,<br> other *Array* type attributes | [value_1 ... value_n] |
|
||||
| *TDataStd_TreeNode* | [tree node ID ==> Father()->Label()] (if it has a father) or <br> [tree node ID <== First()->Label()] (if it has NO father)|
|
||||
| *TDataStd_TreeNode(XDE)* | [XDE tree node ID ==> Father()->Label()] (if it has a father), <br> [XDE tree Node ID <== label_1, ..., label_n] (if it has NO father)|
|
||||
| *TNaming_NamedShape* | [shape type : evolution] |
|
||||
| *TNaming_UsedShapes* | [map extent] |
|
||||
|
||||
|
||||
Custom color of items:
|
||||
|
||||
| OCAF element Type | Color |
|
||||
| :----- | :----- |
|
||||
| TDF_Label | <b>dark green</b>, if the label has TDataStd_Name attribute, <br><b>light grey</b> if the label is empty (has no attributes on all levels of hierarchy),<br> <b>black</b> otherwise |
|
||||
| TNaming_NamedShape | <b>dark gray</b> for TopAbs_FORWARD orientation of TopoDS_Shape, <br> <b>gray</b> for TopAbs_REVERSED orientation of TopoDS_Shape, <br> <b>black</b> for other orientation |
|
||||
| *TDF_Label* | <b>dark green</b>, if the label has *TDataStd_Name* attribute, <br><b>light grey</b> if the label is empty (has no attributes on all levels of hierarchy),<br> <b>black</b> otherwise. |
|
||||
| *TNaming_NamedShape* | <b>dark gray</b> for *TopAbs_FORWARD* orientation of *TopoDS_Shape*, <br> <b>gray</b> for *TopAbs_REVERSED* orientation of *TopoDS_Shape*, <br> <b>black</b> for other orientation. |
|
||||
|
||||
|
||||
Context popup menu:
|
||||
Context pop-up menu:
|
||||
| Action | Functionality |
|
||||
| :----- | :----- |
|
||||
| Expand | Expands the next two levels under the selected item |
|
||||
| Expand All | Expands the whole tree of the selected item |
|
||||
| Collapse All | Collapses the whole tree of the selected item |
|
||||
| Expand | Expands the next two levels under the selected item. |
|
||||
| Expand All | Expands the whole tree of the selected item. |
|
||||
| Collapse All | Collapses the whole tree of the selected item. |
|
||||
|
||||
|
||||
<b>Property Panel</b>
|
||||
|
||||
Property panel is used to display content of Label or Attribute tree view items.
|
||||
This control is used for content of Label or Attribute tree view items or Search result view.
|
||||
Information is usually shown in one or several tables.
|
||||
Property panel is used to display the content of *Label* or *Attribute* tree view items or Search result view.
|
||||
The information is usually shown in one or several tables.
|
||||
|
||||
TDF_Attribute has the following content in Property Panel:
|
||||
*TDF_Attribute* has the following content in the Property Panel:
|
||||
|
||||
<table>
|
||||
<tr><th>Type</th><th>Description</th><th>Content</th></tr>
|
||||
<tr><td>TDF_Label</td>
|
||||
<tr><td><i>TDF_Label</i></td>
|
||||
<td> a table of [entry or attribute name, value]</td>
|
||||
<td>@figure{property_panel_label.png, "",140}</td></tr>
|
||||
<tr><td>TDocStd_Owner,<br> @ref occt_attribute_simple_types "Simple types", <br> @ref occt_attribute_list_types "List types"</td>
|
||||
<tr><td><i>TDocStd_Owner</i>,<br> Simple type attributes, <br> List type attributes</td>
|
||||
<td>a table of [method name, value]</td>
|
||||
<td>@figure{property_panel_simple_type.png, "",140}</td></tr>
|
||||
<tr><td>TDataStd_BooleanArray,<br> TDataStd_ByteArray,<br> @ref occt_attribute_array_types "other Array types"</td>
|
||||
<td>2 controls: <br> * a table of [array bound, value], <br> * table of [method name, value]</td>
|
||||
<tr><td><i>TDataStd_BooleanArray</i>,<br> <i>TDataStd_ByteArray</i>,<br> other Array type attributes</td>
|
||||
<td>2 controls: <br> - a table of [array bound, value], <br> - a table of [method name, value] </td>
|
||||
<td>@figure{property_panel_array.png, "",140}</td></tr>
|
||||
<tr><td>TDataStd_TreeNode</td>
|
||||
<td>2 controls: <br> * a table of [Tree ID, value] (visible only if Tree ID() != ID()), <br> * a tree view of tree nodes starting from Root() of the tree node. The current tree node has <b>dark blue</b> text.</td>
|
||||
<tr><td><i>TDataStd_TreeNode</i></td>
|
||||
<td>2 controls: <br> - a table of [Tree ID, value] (visible only if Tree ID() != ID() ), <br> - a tree view of tree nodes starting from *Root()* of the tree node. The current tree node has <b>dark blue</b> text.</td>
|
||||
<td>@figure{property_panel_tree_node.png, "",140} </td></tr>
|
||||
<tr><td>TDataStd_NamedData</td>
|
||||
<tr><td><i>TDataStd_NamedData</i></td>
|
||||
<td>tab bar of attribute elements, each tab has a table of [name, value]</td>
|
||||
<td>@figure{property_panel_named_data.png, "",140}</td></tr>
|
||||
<tr><td>TNaming_UsedShapes</td>
|
||||
<td>a table of all the shapes handled by the framework</td>
|
||||
<tr><td><i>TNaming_UsedShapes</i></td>
|
||||
<td>a table of all shapes handled by the framework</td>
|
||||
<td>@figure{property_panel_tnaming_used_shapes.png, "",140}</td></tr>
|
||||
<tr><td>TNaming_NamedShape</td>
|
||||
<td>2 controls: <br> * a table of [method name, value] including CurrentShape/OriginalShape methods result of TNaming_Tools, <br> * an evolution table. <br> Tables contain buttons for @ref occt_shape_export "TopoDS_Shape export".</td>
|
||||
<tr><td><i>TNaming_NamedShape</i></td>
|
||||
<td>2 controls: <br> - a table of [method name, value] including CurrentShape/OriginalShape methods result of <i>TNaming_Tools</i>, <br> - an evolution table. <br> Tables contain buttons for @ref occt_shape_export "TopoDS_Shape export".</td>
|
||||
<td>@figure{property_panel_tnaming_named_shape.png, "",140}</td></tr>
|
||||
<tr><td>TNaming_Naming</td>
|
||||
<td>2 controls: <br> * a table of TNaming_Name vlaues,<br> * a table of [method name, value]</td>
|
||||
<tr><td><i>TNaming_Naming</i></td>
|
||||
<td>2 controls: <br> - a table of <i>TNaming_Name</i> values,<br> - a table of [method name, value]</td>
|
||||
<td>@figure{property_panel_tnaming_naming.png, "",140}</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<b>Dump view</b>
|
||||
|
||||
@figure{dump_attribute.png, "Dump of TDF_Attribute"}
|
||||
@figure{dump_attribute.png, "Dump of TDF_Attribute",200}
|
||||
|
||||
Dump view shows result of <b>TDF_Attribute::Dump()</b> or <b>TDF_Label::Dump()</b> of selected tree view item.
|
||||
Dump view shows the result of <b>TDF_Attribute::Dump()</b> or <b>TDF_Label::Dump()</b> of the selected tree view item.
|
||||
|
||||
<b>3D view</b>
|
||||
|
||||
3D View visualizes TopoDS_Shape elements of OCAF attribute via AIS facilities.
|
||||
3D View visualizes *TopoDS_Shape* elements of OCAF attribute via AIS facilities.
|
||||
|
||||
DFBrowser creates two kinds presentations depending on the selection place:
|
||||
DFBrowser creates two kinds of presentations depending on the selection place:
|
||||
|
||||
<table>
|
||||
<tr><th>Kind</th><th>Source object</th><th>Visualization propeties</th><th>View</th></tr>
|
||||
<tr><th>Kind</th><th>Source object</th><th>Visualization properties</th><th>View</th></tr>
|
||||
<tr><td>Main presentation</td>
|
||||
<td>Tree view item:<br> TPrsStd_AISPresentation,<br> TNaming_NamedShape,<br> TNaming_Naming</td>
|
||||
<td>Color: a default color for shape type of the current TopoDS_Shape</td>
|
||||
<td>Tree view item:<br> *TPrsStd_AISPresentation*,<br> *TNaming_NamedShape*,<br> *TNaming_Naming*</td>
|
||||
<td>Color: a default color for shape type of the current *TopoDS_Shape*.</td>
|
||||
<td>@figure{display_main_presentation.png, "",100}</td></tr>
|
||||
<tr><td>Additional presentation</td>
|
||||
<td>References in Property panel</td>
|
||||
@@ -171,8 +168,8 @@ DFBrowser creates two kinds presentations depending on the selection place:
|
||||
<b>Tree Navigation</b>
|
||||
|
||||
Tree Navigation shows a path to the item selected in the tree view.
|
||||
The path is a sequence of label entries and attribute type name.
|
||||
Each element in the path is selectable - the user can click on it to select the corresponding tree view item.
|
||||
The path is a sequence of label entries and attribute type names.
|
||||
Each element in the path is selectable - simply click on it to select the corresponding tree view item.
|
||||
|
||||
Navigation control has buttons to go to the previous and the next selected tree view items.
|
||||
|
||||
@@ -184,14 +181,14 @@ Update button synchronizes content of tree view to the current content of OCAF d
|
||||
<b>Search</b>
|
||||
|
||||
The user can search OCAF element by typing:
|
||||
* TDF_Label entry,
|
||||
* TDF_Attribute name,
|
||||
* TDataStd_Name and TDataStd_Comment attributes value.
|
||||
* *TDF_Label* entry,
|
||||
* *TDF_Attribute* name,
|
||||
* *TDataStd_Name* and *TDataStd_Comment* attributes value.
|
||||
|
||||
@figure{search.png,"Search"}
|
||||
@figure{search.png,"Search",360}
|
||||
|
||||
As soon as the user confirms the typed criteria, the Property panel is filled by all satisfied values.
|
||||
The user can click a value to hightligt the corresponding tree view item. By double click the item will be selected.
|
||||
The user can click a value to highlight the corresponding tree view item. By double click the item will be selected.
|
||||
|
||||
|
||||
@subsubsection occt_inspector_2_2_3 Elements cooperation
|
||||
@@ -199,22 +196,22 @@ The user can click a value to hightligt the corresponding tree view item. By dou
|
||||
<b>Tree item selection</b>
|
||||
|
||||
Selection of tree view item updates content of the following controls:
|
||||
* Navigation line
|
||||
* Property Panel
|
||||
* 3D View (if it is possible to create an interactive presentation)
|
||||
* Dump View
|
||||
* Navigation line;
|
||||
* Property Panel;
|
||||
* 3D View (if it is possible to create an interactive presentation);
|
||||
* Dump View.
|
||||
|
||||
@figure{dfbrowser_selection_in_tree_view.svg,"",360}
|
||||
|
||||
<b>Property Panel item selection </b>
|
||||
|
||||
If property panel shows content of TDF_Label:
|
||||
* selection of the table row hightlights the corresponding item in tree view,
|
||||
* double click on the table row selects this item in tree view.
|
||||
If the property panel shows content of *TDF_Label*:
|
||||
* selection of the table row highlights the corresponding item in the tree view,
|
||||
* double click on the table row selects this item in the tree view.
|
||||
|
||||
If property panel shows content of TDF_Attribute that has reference to another attribute, selection of this reference:
|
||||
* highlights the referenced item in TreeView,
|
||||
* displays additional presentation in 3D view if it can be created.
|
||||
If the property panel shows content of *TDF_Attribute* that has reference to another attribute, selection of this reference:
|
||||
* highlights the referenced item in the tree view,
|
||||
* displays additional presentation in the 3D view if it can be created.
|
||||
|
||||
@figure{property_panel_item_selection.svg,"",360}
|
||||
|
||||
@@ -222,28 +219,28 @@ Attributes having references:
|
||||
|
||||
| Type | Reference | Additional presentation
|
||||
| :----- | :----- | :----- |
|
||||
| TDF_Reference | TDF_Label | |
|
||||
| TDataStd_ReferenceArray, <br> TDataStd_ReferenceList, <br> TNaming_Naming | one or several TDF_Label in a container | |
|
||||
| TDataStd_TreeNode | TDF_Label | |
|
||||
| TNaming_NamedShape | TDF_Label in Evolution table | selected TopoDS_Shapes in property panel tables |
|
||||
| TNaming_UsedShapes | one or several TNaming_NamedShape | TopoDS_Shapes of selected TNaming_NamedShape |
|
||||
| *TDF_Reference* | *TDF_Label* | |
|
||||
| *TDataStd_ReferenceArray*, <br> *TDataStd_ReferenceList*, <br> *TNaming_Naming* | One or several *TDF_Label* in a container. | |
|
||||
| *TDataStd_TreeNode* | *TDF_Label* | |
|
||||
| *TNaming_NamedShape* | *TDF_Label* in Evolution table | *TopoDS_Shapes* selected in the property panel tables. |
|
||||
| *TNaming_UsedShapes* | one or several *TNaming_NamedShape* | *TopoDS_Shapes* of the selected *TNaming_NamedShape*. |
|
||||
|
||||
|
||||
@subsubsection occt_shape_export TopoDS_Shape export
|
||||
|
||||
Property panel of TNaming_NamedShape attribute has controls to export TopoDS_Shape to:
|
||||
* BREP. The save file dialog is started to enter the result file name,
|
||||
* @ref occt_inspector_2_4 "ShapeView" plugin. Dialog about exporting element to ShapeView is shown with a possibility to activate this plugin immediatelly.
|
||||
Property panel of *TNaming_NamedShape* attribute has controls to export *TopoDS_Shape* to:
|
||||
* BREP. **Save file** dialog is open to enter the result file name,
|
||||
* @ref occt_inspector_2_4 "ShapeView" plugin. The dialog for exporting element to ShapeView allows activating this plugin immediately.
|
||||
|
||||
|
||||
@subsection occt_inspector_2_3 VInspector Plugin
|
||||
|
||||
@subsubsection occt_inspector_2_3_1 Overview
|
||||
|
||||
@figure{vinspector.png, "VInspector"}
|
||||
@figure{vinspector.png, "VInspector",360}
|
||||
|
||||
It visualizes interactive objects displayed in AIS_InteractiveContext in a tree view with columputed selection
|
||||
components for each presentation. It shows the selected elements in the context and allows to select these elements.
|
||||
This plugin visualizes interactive objects displayed in *AIS_InteractiveContext* in a tree view with computed selection
|
||||
components for each presentation. It shows the selected elements in the context and allows selecting these elements.
|
||||
|
||||
@subsubsection occt_inspector_2_3_2 Elements
|
||||
|
||||
@@ -251,81 +248,85 @@ components for each presentation. It shows the selected elements in the context
|
||||
|
||||
<b>Presentations tree view</b>
|
||||
|
||||
It shows presentations and selection computed of them. Also, the view has columns with information about state of visualization elements.
|
||||
This view shows presentations and selection computed on them. Also, the view has columns with information about the state of visualization elements.
|
||||
|
||||
VInspector tree items.
|
||||
|
||||
| Type | Description |
|
||||
| :----- | :----- |
|
||||
| AIS_InteractiveContext | It is the root of tree view. Children are interactive objects obtained by *DisplayedObjects* and *ErasedObjects* methods.|
|
||||
| AIS_InteractiveObject | It is a child of AIS_InteractiveContext item. Children are SelectMgr_Selection obtained by iteration on *CurrentSelection* |
|
||||
| SelectMgr_Selection | It is a child of AIS_InteractiveObject. Children are SelectMgr_SensitiveEntity obtaining by iteration on *Sensitive* |
|
||||
| SelectMgr_SensitiveEntity | It is a child of SelectMgr_Selection. Children are SelectMgr_SensitiveEntity obtaining by iteration on *OwnerId* |
|
||||
| SelectBasics_EntityOwner | It is a child SelectMgr_SensitiveEntity. It has no children. |
|
||||
| *AIS_InteractiveContext* | The root of tree view. Its children are interactive objects obtained by *DisplayedObjects* and *ErasedObjects* methods.|
|
||||
| *AIS_InteractiveObject* | A child of *AIS_InteractiveContext* item. Its children are *SelectMgr_Selection* obtained by iteration on *CurrentSelection*. |
|
||||
| *SelectMgr_Selection* | A child of *AIS_InteractiveObject*. Its children are *SelectMgr_SensitiveEntity* obtaining by iteration on *Sensitive*. |
|
||||
| *SelectMgr_SensitiveEntity* | A child of *SelectMgr_Selection*. Its children are *SelectMgr_SensitiveEntity* obtaining by iteration on *OwnerId*. |
|
||||
| *SelectBasics_EntityOwner* | A child of *SelectMgr_SensitiveEntity*. It has no children. |
|
||||
|
||||
|
||||
Custom color of tree view items:
|
||||
|
||||
| OCAF element Type | Column | What | Color |
|
||||
| :----- | :----- | :----- | :----- |
|
||||
| AIS_InteractiveObject | 0 | Text | <b>dark gray</b>, it is in *ErasedObjects* list of AIS_InteractiveContext,<br> <b>black</b> otherwise |
|
||||
| AIS_InteractiveObject, <br> SelectMgr_SensitiveEntity, <br> SelectBasics_EntityOwner| 1 | Background | <b>dark blue</b>, if there is a selected owner under the item, <br> <b>black</b> otherwise |
|
||||
| SelectMgr_Selection,<br> SelectMgr_SensitiveEntity,<br> SelectBasics_EntityOwner| all | Text | <b>dark gray</b>, if *SelectionState* of SelectMgr_Selection is not *SelectMgr_SOS_Activated*,<br> <b>black</b> otherwise |
|
||||
| *AIS_InteractiveObject* | 0 | Text | <b>dark gray</b> in *ErasedObjects* list of *AIS_InteractiveContext*,<br> <b>black</b> otherwise |
|
||||
| *AIS_InteractiveObject*, <br> *SelectMgr_SensitiveEntity*, <br> *SelectBasics_EntityOwner*| 1 | Background | <b>dark blue</b>, if there is a selected owner under the item, <br> <b>black</b> otherwise |
|
||||
| *SelectMgr_Selection*,<br> *SelectMgr_SensitiveEntity*,<br> *electBasics_EntityOwner* | all | Text | <b>dark gray</b>, if *SelectionState* of *SelectMgr_Selection* is not *SelectMgr_SOS_Activated*,<br> <b>black</b> otherwise |
|
||||
|
||||
|
||||
Context popup menu in tree view:
|
||||
| Action | Item | Functionality |
|
||||
| :----- | :----- | :----- |
|
||||
| Export to ShapeView | AIS_InteractiveObject | Exports TopoDS_Shape of AIS_Interactive presentation to ShapeView plugin. <br> It should be AIS_Shape presentation and ShapeView plugin should be registered in Inspector<br> Dialog about exporting element to ShapeView is shown with a possibility to activate this plugin immediatelly. |
|
||||
| Show | AIS_InteractiveObject | *Display* presentation in AIS_InteractiveContext |
|
||||
| Hide | AIS_InteractiveObject | *Erase* presentation from AIS_InteractiveContext |
|
||||
| Export to ShapeView | *AIS_InteractiveObject* | Exports *TopoDS_Shape* of the *AIS_Interactive* presentation to ShapeView plugin. <br> It should be *AIS_Shape* presentation and ShapeView plugin should be registered in Inspector<br> Dialog about exporting element to ShapeView is shown with a possibility to activate this plugin immediately. |
|
||||
| Show | *AIS_InteractiveObject* | Displays presentation in *AIS_InteractiveContext*. |
|
||||
| Hide | *AIS_InteractiveObject* | Erases presentation from *AIS_InteractiveContext*. |
|
||||
|
||||
<b>Update</b>
|
||||
|
||||
It synchronizes content of the plugin to the current state of AIS_InteractiveContext.
|
||||
It updates the presence of items and the current selection for the items.
|
||||
This button synchronizes the plugin content with the current state of *AIS_InteractiveContext* and updates the presence of items and their current selection.
|
||||
|
||||
<b>Selection controls</b>
|
||||
|
||||
Selection controls switch on/off the posibility to set selection in the context from VInspector plugin.
|
||||
Selection controls switch on/off the possibility to set selection in the context from VInspector plugin.
|
||||
|
||||
| Action | Tree view item | Functionality |
|
||||
| :----- | :----- | :----- |
|
||||
| Select Presentations | AIS_InteractiveObject | Calls *AddOrRemoveSelected* of interactive object for the selected item |
|
||||
| Select Owners | SelectMgr_EntityOwner or <br> SelectMgr_SensitiveEntity | Calls *AddOrRemoveSelected* of SelectMgr_EntityOwner for the selected item |
|
||||
| Select Presentations | *AIS_InteractiveObject* | Calls *AddOrRemoveSelected* of interactive object for the selected item. |
|
||||
| Select Owners | *SelectMgr_EntityOwner* or <br> *SelectMgr_SensitiveEntity* | Calls *AddOrRemoveSelected* of *SelectMgr_EntityOwner* for the selected item. |
|
||||
|
||||
Please note, that the initial selection in context will be cleared.
|
||||
Please, note that the initial selection in the context will be cleared.
|
||||
If the button is toggled, the button selection is active. Only one button may be toggled at the moment.
|
||||
|
||||
|
||||
<b>History view</b>
|
||||
|
||||
At present the History view is under implementation and may be used only in a custom application where Inspector is loaded.
|
||||
At present, the History view is under implementation and may be used only in a custom application where Inspector is loaded.
|
||||
|
||||
To fill this view, VInspectorAPI_CallBack should be redefined in the application and send signals about some actions applyed to context.
|
||||
After, the call back should be given as parameter in the plugin.
|
||||
To fill this view, *VInspectorAPI_CallBack* should be redefined in the application and send signals about some actions applied to the context.
|
||||
After that, the call back should be given as a parameter in the plugin.
|
||||
If done, new items will be created in the history view for each action.
|
||||
|
||||
@subsubsection occt_inspector_2_3_3 Elements cooperation
|
||||
|
||||
Vinspector markes current selected presentations in AIS_InteractiveContext with blue background in tree items. Use "Update" button to synchronize VInspector selected items state to the context.
|
||||
*VInspector* marks the presentations currently selected in *AIS_InteractiveContext* with a blue background in tree items. Use **Update** button to synchronize VInspector selected items state to the context.
|
||||
|
||||
It is also possible to perform selection in context using "Selection controls" VInspector. However, it should be performed carefully as
|
||||
it clears the current selection in AIS_InteractiveContext.
|
||||
It is also possible to perform selection in the context using "Selection controls" VInspector feature. However, this operation should be performed carefully as
|
||||
it clears the current selection in *AIS_InteractiveContext*.
|
||||
|
||||
Selection change:
|
||||
| From | To | Action | Result |
|
||||
| :----- | :----- | :----- | :----- |
|
||||
| AIS_InteractiveContext | VInspector | perform selection in AIS_InteractiveContext | Click "Update" button in VInspector and check "Selection" column: <br> AIS_InteractiveContext item has anount of selected objects,<br> some of AIS_InteractiveObject have filled value if it selection happens for this presentation or entity owner of it |
|
||||
| VInspector | AIS_InteractiveContext | activate one of Selection controls and select one or several elements in tree view | The objects become selected in AIS_InteractiveContext |
|
||||
| *AIS_InteractiveContext* | VInspector | Performs selection in *AIS_InteractiveContext*. | Click **Update** button in VInspector and check **Selection** column: <br> *AIS_InteractiveContext* item contains some selected objects, <br> the value of some *AIS_InteractiveObject* is filled if they are selected for this presentation or its entity owner. |
|
||||
| VInspector | *AIS_InteractiveContext* | Activates one of Selection controls and selects one or several elements in the tree view. | The objects become selected in *AIS_InteractiveContext*. |
|
||||
|
||||
@subsubsection occt_inspector_2_3_4 VInspector tree view columns
|
||||
|
||||
Use context pop-up menu on the tree view header to select, which columns should be displayed.
|
||||
@figure{vinspector_tree_columns.png, "Vinspector tree header context menu",360}
|
||||
|
||||
@subsection occt_inspector_2_4 ShapeView Plugin
|
||||
|
||||
@subsubsection occt_inspector_2_4_1 Overview
|
||||
|
||||
@figure{shapeview.png, "ShapeView"}
|
||||
@figure{shapeview.png, "ShapeView",360}
|
||||
|
||||
This plugin visualizes content of TopoDS_Shape in a tree view.
|
||||
This plugin visualizes content of *TopoDS_Shape* in a tree view.
|
||||
|
||||
@subsubsection occt_inspector_2_4_2 Elements
|
||||
|
||||
@@ -333,99 +334,147 @@ This plugin visualizes content of TopoDS_Shape in a tree view.
|
||||
|
||||
<b>TopoDS_Shape View</b>
|
||||
|
||||
Elements of the view are TopoDS_Shape objects.
|
||||
This shape is exploded into sub-shapes using TopoDS_Iterator of the TopoDS_Shape.
|
||||
Child sub-shapes are presented in the view as children of the initial shape.
|
||||
Iterating recursively by all shapes we obtain a tree view of items shown in the ShapeView.
|
||||
The view elements are *TopoDS_Shape* objects.
|
||||
The shape is exploded into sub-shapes using *TopoDS_Iterator* of the *TopoDS_Shape*.
|
||||
Children sub-shapes are presented in the view as children of the initial shape.
|
||||
By iterating recursively through all shapes we obtain a tree view of items shown in the ShapeView.
|
||||
|
||||
The columns of the View show some information about *TopoDS_Shape* of the item.
|
||||
The first column allows changing the visibility of the item shape in the 3D view.
|
||||
|
||||
Columns of the View show some information about TopoDS_Shape of the item.
|
||||
The most informative column is the last column of TopoDS_Vertex and TopoDS_Edge shape types.
|
||||
|
||||
For TopoDS_Vertex it contains the point coordinates,
|
||||
|
||||
for TopoDS_Edge it contains the first and the last point coordinates, the edge length and some other parameters.
|
||||
|
||||
|
||||
Context popup menu in tree view:
|
||||
Context pop-up menu in tree view:
|
||||
| Action | Functionality |
|
||||
| :----- | :----- |
|
||||
| Load BREP file | Opens selected file and appends the result TopoDS_Shape into tree view |
|
||||
| Remove all shape items | Clears tree view |
|
||||
| BREP view | Shows text view with BREP content of the selected item. It creates BREP file in temporary directory of the plugin. |
|
||||
| Close All BREP views | Closes all opened text views |
|
||||
| BREP directory | Displays folder where temporary BREP files have been stored. |
|
||||
| Load BREP file | Opens the selected file and appends the resulting *TopoDS_Shape* into the tree view. |
|
||||
| Remove all shape items | Clears tree view. |
|
||||
| BREP view | Shows the text view with BREP content of the selected item. Creates the BREP file in a temporary directory of the plugin. |
|
||||
| Close All BREP views | Closes all opened text views. |
|
||||
| BREP directory | Displays the folder, where temporary BREP files have been stored. |
|
||||
|
||||
@subsubsection occt_inspector_2_4_3 Elements cooperation
|
||||
|
||||
Selection of one or several items in TopoDS_Shape View creates AIS_Shape presentation for it and displays it in the 3D View.
|
||||
Selection of one or several items in *TopoDS_Shape* View creates its *AIS_Shape* presentation and displays it in the 3D View.
|
||||
|
||||
@subsubsection occt_inspector_2_4_4 ShapeView tree view columns
|
||||
|
||||
Use context pop-up menu on the tree view header to select, which columns should be displayed.
|
||||
@figure{shapeview_tree_columns.png, "ShapeView tree header context menu",360}
|
||||
|
||||
|
||||
@section occt_inspector_3 Common controls
|
||||
@subsection occt_inspector_3_1 3D View
|
||||
|
||||
@subsubsection occt_inspector_3_1_1 Overview
|
||||
@subsection occt_inspector_3_1 Tree View
|
||||
|
||||
@figure{3DView.png, "3D View"}
|
||||
This control shows presentation hierarchy of the investigated OCCT element, e.g. *TDocStd_Application* for DFBrowser, see @ref occt_inspector_1_1 "Overview".
|
||||
The first column contains the name, other columns are informative.
|
||||
|
||||
Control for OCCT 3D viewer. It creates visualization view components with possibilities to perform some
|
||||
user actions for the view.
|
||||
The tree view has a context menu with plugin-specific actions.
|
||||
|
||||
@subsubsection occt_inspector_3_1_1 Tree View preferences
|
||||
|
||||
It is possible to define visibility and width of columns.
|
||||
This option is available in a view that contains more than one column,
|
||||
e.g. @ref occt_inspector_2_3_4 "VInspector tree view columns"
|
||||
and @ref occt_inspector_2_4_4 "ShapeView tree view columns".
|
||||
|
||||
@figure{treeview_preferences.svg, "Preferences schema",360}
|
||||
|
||||
|
||||
@subsubsection occt_inspector_3_1_2 Elements
|
||||
@subsection occt_inspector_3_2 3D View
|
||||
|
||||
@figure{3DView_elements.svg,"3DView Elements"}
|
||||
@subsubsection occt_inspector_3_2_1 Overview
|
||||
|
||||
3D View contains:
|
||||
@figure{3DView.png, "3D View",360}
|
||||
|
||||
This control for OCCT 3D viewer creates visualization view components and allows performing some user actions in the view.
|
||||
|
||||
|
||||
@subsubsection occt_inspector_3_2_2 Elements
|
||||
|
||||
@figure{3DView_elements.svg,"3DView Elements",360}
|
||||
|
||||
3D View contains the following elements:
|
||||
| Element | Functionality |
|
||||
| :----- | :----- |
|
||||
| 3D view | V3d viewer with mouse events processing |
|
||||
| Context | choice of another context that should be used in the plugin. <br> It is possible to use the next contexts:<br> Own - context of this view, <br> External - context come in parameters which intializes plugin, <br> None - do not perform visualization at all |
|
||||
| Multi/Single | Buttons defined what to do with the previous displayed objects: <br> Multi displays new presentations in additional to already displayed, <br> Single removes all previuos displayed presentations |
|
||||
| Clean | Removes all displayed presentations |
|
||||
| Fit All,<br> Fit Area,<br> Zoom,<br> Pan,<br> Rotation | Scene manipulation actions |
|
||||
| Display Mode | Sets *AIS_Shading* or *AIS_WireFrame* display mode for all presentations |
|
||||
| 3D view | V3d viewer with mouse events processing. |
|
||||
| Context | Allows choosing another context that should be used in the plugin. The following contexts are available:<br> **Own** - the context of this view, <br> **External** - the context of the @ref occt_inspector_4_3 "external application", which initializes the plugin, <br> **None** - the visualization is not performed at all (useful if the presentation is too complex). |
|
||||
| Multi/Single | The buttons define what to do with the previously displayed objects: <br> **Multi** displays new presentations together with already displayed ones, <br> **Single** removes all previously displayed presentations. |
|
||||
| Clean | Removes all displayed presentations. |
|
||||
| Fit All,<br> Fit Area,<br> Zoom,<br> Pan,<br> Rotation | Scene manipulation actions<br> (Fit All is checkable. If checked(by double click), display/hide of new objects will perform **Fit All** of the scene.) |
|
||||
| Display Mode | Sets *AIS_Shading* or *AIS_WireFrame* display mode for all presentations. |
|
||||
|
||||
Context popup menu:
|
||||
| Action | Functionality |
|
||||
| :----- | :----- |
|
||||
| Set View Orientation | Shows the list of available *V3d_View* projections. Selection of an item with change the view. |
|
||||
|
||||
@figure{3DView_set_orientation.png,"Set view orientation",360}
|
||||
|
||||
@subsubsection occt_inspector_3_2_3 3D View preferences.
|
||||
View preferences store the current view orientation.
|
||||
|
||||
@subsection occt_inspector_3_3 Preferences context menu
|
||||
|
||||
@figure{preferences.png,"Plugin preferences",360}
|
||||
|
||||
Context menu contains:
|
||||
| Element | Functionality |
|
||||
| :----- | :----- |
|
||||
| Tree Level Line,<br> PropertyPanel,<br> Dump, <br> View| Names of dock widgets in the active plugin. If the button is checked, dock widget is visible. |
|
||||
| Store Preferences | Creates ".tinspector.xml" preferences file with the current settings for each plugin.<br> This file is created in TEMP/TMP directory (by default) or in a user-defined directory. |
|
||||
| Remove Preferences | Removes preferences file. After the Inspector is restarted, default values will be applied. |
|
||||
|
||||
|
||||
@section occt_inspector_6 TInspectorEXE sample
|
||||
The following controls have store/restore preferences:
|
||||
| Element | Preferences |
|
||||
| :----- | :----- |
|
||||
| Geometry| Inspector window size and position. <br>State of dockable widgets : visibility, position, size.|
|
||||
| @ref occt_inspector_3_1_1 "Tree View preferences"| Columns visible in the tree view and their width. |
|
||||
| @ref occt_inspector_3_2_3 "3D View preferences"| 3D view camera direction. |
|
||||
|
||||
Inspector functionality can be tried using this sample.
|
||||
@section occt_inspector_4 Getting Started
|
||||
|
||||
Use *inspector.bat* script file placed in binary directory of OCCT to launch it.
|
||||
@subsection occt_inspector_4_1 TInspectorEXE sample
|
||||
|
||||
This script accepts the names of plugin's DLL that should be loaded. By default it loads all described above plugins.
|
||||
This sample allows trying Inspector functionality.
|
||||
|
||||
Use *inspector.bat* script file placed in a binary directory of OCCT to launch it.
|
||||
|
||||
This script accepts the names of plugin's DLL that should be loaded. By default it loads all plugins described above.
|
||||
|
||||
|
||||
@figure{TStandaloneEXE.png, "TStandaloneEXE"}
|
||||
@figure{TStandaloneEXE.png, "TStandaloneEXE",360}
|
||||
|
||||
Click on the Open button shows the dialog to select a file. The user is able to select one of the sample files or load own one.
|
||||
@figure{TStandaloneEXE_open.png, ""}
|
||||
Click on the Open button shows the dialog to select a file.
|
||||
@figure{TStandaloneEXE_open.png, "",360}
|
||||
|
||||
Depending on the active plugin, the following files should be selected in the dialog:
|
||||
OCAF document or STEP files for DFBRowser and BREP files for VInspector and ShapeView plugins.
|
||||
Depending on the active plugin, it is possible to select the following files in the dialog:<br>
|
||||
- DFBRowser: OCAF document or STEP files;
|
||||
- VInspector: BREP files;
|
||||
- ShapeView: BREP files.
|
||||
|
||||
It is possible to click the file name in the proposed directory, enter it manually or using Browser button.
|
||||
The last Loading icon becomes enabled if file name is correct.
|
||||
Click the file name in the proposed directory and enter it manually or using **Browse** button.
|
||||
|
||||
|
||||
By default TInspectorEXE opens the next files for plugins:
|
||||
By default, TInspectorEXE opens the following files for plugins:
|
||||
| Plugin DLL library name | Files |
|
||||
| :----- | :----- |
|
||||
| TKDFBrowser | step/screw.step |
|
||||
| TKVInspector | occ/hammer.brep |
|
||||
| TKShapeView | occ/face1.brep, <br> occ/face2.brep |
|
||||
|
||||
These files are found relatively *CSF_OCCTDataPath*.
|
||||
These files are found relatively to *CSF_OCCTDataPath*.
|
||||
|
||||
@subsubsection occt_inspector_4_1_1 TInspectorEXE preferences
|
||||
The application stores recently loaded files. On the application start, the last file is activated.
|
||||
**Open file** dialog contains recently loaded files.
|
||||
Selection of a new file updates the container of recently loaded files and rewrites preferences.
|
||||
|
||||
Source code of TIspectorEXE is a good sample for @ref occt_inspector_8 "Using Inspector in a custom application".
|
||||
Source code of *TIspectorEXE* is a good sample for @ref occt_inspector_4_3 "using the Inspector in a custom application".
|
||||
|
||||
@subsection occt_inspector_4_2 How to launch the Inspector in DRAW Test Harness
|
||||
|
||||
@section occt_inspector_7 Launch in DRAW Test Harness
|
||||
|
||||
TKToolsDraw plugin is created to provide DRAW commands for Qt tools. Use INSPECTOR parameter of @ref occt_draw_1_3_3 "pload"
|
||||
command to download commands of this library. It contains tinspector command to start Inspector under DRAW.
|
||||
*TKToolsDraw* plugin provides DRAW commands for Qt tools. Use *INSPECTOR* parameter of @ref occt_draw_1_3_3 "pload"
|
||||
command to download the commands of this library. It contains *tinspector* command to start Inspector under DRAW.
|
||||
See more detailed description of the @ref occt_draw_13_1 "tinspector" command.
|
||||
|
||||
The simple code to start Inspector with all plugins loaded:
|
||||
@@ -435,26 +484,31 @@ pload INSPECTOR
|
||||
tinspector
|
||||
~~~~~
|
||||
|
||||
@figure{drawexe_tinspector.png,"tinspector"}
|
||||
@figure{drawexe_tinspector.png,"tinspector",360}
|
||||
|
||||
Result of this command is the next:
|
||||
- all available Plugins are presented in the Inspector. These are @ref occt_inspector_2_2 "DFBrowser", @ref occt_inspector_2_3 "VInspector" and @ref occt_inspector_2_4 "ShapeView".
|
||||
- DFBrowser is an active plugin
|
||||
- tree of OCAF is empty.
|
||||
This command does the following:
|
||||
- all available Plugins are presented in the Inspector. These are @ref occt_inspector_2_2 "DFBrowser", @ref occt_inspector_2_3 "VInspector" and @ref occt_inspector_2_4 "ShapeView";
|
||||
- DFBrowser is the active plugin;
|
||||
- OCAF tree is empty.
|
||||
|
||||
After, we should create objects in DRAW and update tinspector.
|
||||
After this, we should create objects in DRAW and update *tinspector*.
|
||||
The examples of using Inspector in DRAW can be found in OCCT source directory /tests/tools.
|
||||
|
||||
@section occt_inspector_8 Using in a custom application
|
||||
@subsection occt_inspector_4_3 How to use the Inspector in a custom application
|
||||
|
||||
To use Inspector in an application, the next steps should be done:
|
||||
* Set dependencies to OCCT and Qt in application (Header and Link)
|
||||
* Create an instance of TInspector_Communicator.
|
||||
* Register plugins of interest in the communicator by DLL library name
|
||||
* Initialize communicator with objects that will be investigated
|
||||
* Set visible true for commumicator
|
||||
The example of using the Inspector in a custom application is presented in OCCT qt sample - <b>FuncDemo</b>.
|
||||
For building qt samples, switch on *BUILD_SAMPLES_QT* variable in @ref build_cmake_conf "Configuration process".
|
||||
|
||||
In general, the following steps should be taken:
|
||||
* Set dependencies to OCCT and Qt in the application (Header and Link);
|
||||
* Create an instance of *TInspector_Communicator*;
|
||||
* Register the plugins of interest in the communicator by DLL library name;
|
||||
* Initialize the communicator with objects that will be investigated;
|
||||
* Set visible true for the communicator.
|
||||
|
||||
|
||||
C++ code is similar:
|
||||
|
||||
Here is an example of C++ implementation:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
|
||||
#include <inspector/TInspector_Communicator.hxx>
|
||||
@@ -479,100 +533,56 @@ void CreateInspector()
|
||||
}
|
||||
MyTCommunicator->SetVisible (true);
|
||||
}
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Give one the following objects for a plugin using a container of parameters:
|
||||
|
||||
| Plugin | to be initialized by |
|
||||
| :----- | :----- |
|
||||
| TKDFBrowser | TDocStd_Application |
|
||||
| TKVInspector | AIS_InteractiveContext |
|
||||
| TKShapeView | TopoDS_TShape |
|
||||
| *TKDFBrowser* | *TDocStd_Application* |
|
||||
| *TKVInspector* | *AIS_InteractiveContext* |
|
||||
| *TKShapeView* | *TopoDS_TShape* |
|
||||
|
||||
|
||||
@section occt_inspector_5 Build procedure
|
||||
|
||||
@section occt_inspector_4 Build procedure
|
||||
|
||||
@subsection occt_inspector_5_1 Building with CMake within OCCT
|
||||
|
||||
By default the Inspector compilation is off.
|
||||
To compile it, set the <b>BUILD_Inspector</b> flag to "ON". See @ref build_cmake_conf "Configuration process".
|
||||
To compile it, set the *BUILD_Inspector* flag to "ON". See @ref build_cmake_conf "Configuration process".
|
||||
|
||||
When this option is switched On, MS Visual Studio project has an additional tree of folders:
|
||||
When this option is switched ON, MS Visual Studio project has an additional tree of folders:
|
||||
|
||||
@figure{VStudio_projects.png,"Inspector packages in MS Visual Studio"}
|
||||
@figure{VStudio_projects.png,"Inspector packages in MS Visual Studio",160}
|
||||
|
||||
|
||||
@section occt_inspector_5 Sources and packaging
|
||||
@section occt_inspector_6 Sources and packaging
|
||||
|
||||
OCCT sources are extended by the /tools directory.
|
||||
|
||||
Distribution of packages participated in plugins:
|
||||
| Sources packages| Plugin |
|
||||
Distribution of plugin packages :
|
||||
| Source packages | Plugin |
|
||||
| :----- | :----- |
|
||||
| DFBrowser, <br> DFBrowserPane, <br> DFBrowserPaneXDE, <br> TKDFBrowser | DFBrowser |
|
||||
| VInspector, <br> TKVInspector | VInspector |
|
||||
| ShapeView, <br> TKShapeView | ShapeView |
|
||||
| *DFBrowser*, <br> *DFBrowserPane*, <br> *DFBrowserPaneXDE*, <br> *TKDFBrowser* | DFBrowser |
|
||||
| *VInspector*, <br> *TKVInspector* | VInspector |
|
||||
| *ShapeView*, <br> *TKShapeView* | ShapeView |
|
||||
|
||||
Other packages:
|
||||
| Sources packages| Used in |
|
||||
| Source packages| Used in |
|
||||
| :----- | :----- |
|
||||
| TInspectorAPI, <br> TKInspectorAPI | Iterface for connection to plugin. |
|
||||
| TreeModel, <br> TKTreeView | Items-oriented model to simplify work with GUI tree control. |
|
||||
| View, <br> TKView | 3D View component |
|
||||
| TInspector, <br> TKTInspector | Inspector window where plugins are placed |
|
||||
| ToolsDraw, <br> TKToolsDraw | Plugin for DRAW to start Inspector |
|
||||
| *TInspectorAPI*, <br> *TKInspectorAPI* | Interface for connection to plugin. |
|
||||
| *TreeModel*, <br> *TKTreeView* | Items-oriented model to simplify work with GUI tree control. |
|
||||
| *View*, <br> *TKView* | 3D View component. |
|
||||
| *TInspector*, <br> *TKTInspector* | Inspector window, where plugins are placed. |
|
||||
| *ToolsDraw*, <br> *TKToolsDraw* | Plugin for DRAW to start Inspector. |
|
||||
|
||||
|
||||
In MSVC studio the separate folder contains Inspector projects.
|
||||
In MSVC studio, a separate folder contains Inspector projects.
|
||||
|
||||
@section occt_inspector_9 Glossary
|
||||
* **Component** -- OCCT part, e.g. OCAF, VISUALIZATION, MODELING and others.
|
||||
* **Plugin** -- library that is loaded in some executable/library. Here, the plugins are:
|
||||
@section occt_inspector_7 Glossary
|
||||
* **Component** -- a part of OCCT , e.g. OCAF, VISUALIZATION, MODELING and others.
|
||||
* **Plugin** -- a library that is loaded in some executable/library. Here, the plugins are:
|
||||
* DFBrowser,
|
||||
* ShapeView,
|
||||
* VInspector.
|
||||
|
||||
@subsection occt_attribute_simple_types TDF_Attribute Simple types
|
||||
Types where the content is a single value
|
||||
|
||||
| Type | Kind of value |
|
||||
| :----- | :----- |
|
||||
| TDataStd_AsciiString | TDataStd_AsciiString |
|
||||
| TDataStd_Comment | TCollection_ExtendedString |
|
||||
| TDataStd_Integer | Standard_Integer |
|
||||
| TDataStd_Name | TCollection_ExtendedString |
|
||||
| TDataStd_Real | Standard_Real |
|
||||
| TDF_Reference | TDF_Label |
|
||||
| TDF_TagSource | Standard_Integer |
|
||||
|
||||
|
||||
@subsection occt_attribute_list_types TDF_Attribute List types
|
||||
|
||||
| Type | Kind of value (container of) |
|
||||
| :----- | :----- |
|
||||
| TDataStd_BooleanList | Standard_Boolean |
|
||||
| TDataStd_ExtStringList | TCollection_ExtendedString |
|
||||
| TDataStd_IntegerList | Standard_Integer |
|
||||
| TDataStd_RealList | Standard_Real |
|
||||
| TDataStd_ReferenceList | TDF_Label |
|
||||
|
||||
@subsection occt_attribute_array_types TDF_Attribute Array types
|
||||
|
||||
| Type | Kind of value (container of) |
|
||||
| :----- | :----- |
|
||||
| TDataStd_BooleanArray | Standard_Boolean |
|
||||
| TDataStd_ByteArray | Standard_Byte |
|
||||
| TDataStd_ExtStringArray | TCollection_ExtendedString |
|
||||
| TDataStd_IntegerArray | Standard_Integer |
|
||||
| TDataStd_RealArray | Standard_Real |
|
||||
| TDataStd_ReferenceArray | TDF_Label |
|
||||
|
||||
@subsection occt_attribute_xde_tree_node_id XDE tree node ID description
|
||||
| GUID | Text |
|
||||
| :----- | :----- |
|
||||
| XCAFDoc::ShapeRefGUID() | Shape Instance Link |
|
||||
| XCAFDoc::ColorRefGUID (XCAFDoc_ColorGen) | Generic Color Link |
|
||||
| XCAFDoc::ColorRefGUID (XCAFDoc_ColorSurf) | Surface Color Link |
|
||||
| XCAFDoc::ColorRefGUID (XCAFDoc_ColorCurv) | Curve Color Link |
|
||||
| XCAFDoc::DimTolRefGUID() | DGT Link |
|
||||
| XCAFDoc::DatumRefGUID() | Datum Link |
|
||||
| XCAFDoc::MaterialRefGUID() | Material Link |
|
||||
|
||||
|
@@ -1283,15 +1283,118 @@ Standard_DomainError::Raise
|
||||
TopoDS_Edge E = ME;
|
||||
~~~~~
|
||||
|
||||
|
||||
@subsection occt_modalg_hist History support
|
||||
|
||||
All topological API algorithms support the history of shape modifications (or just History) for their arguments.
|
||||
Generally, the history is available for the following types of sub-shapes of input shapes:
|
||||
* Vertex;
|
||||
* Edge;
|
||||
* Face.
|
||||
|
||||
Some algorithms also support the history for Solids.
|
||||
|
||||
The history information consists of the following information:
|
||||
* Information about Deleted shapes;
|
||||
* Information about Modified shapes;
|
||||
* Information about Generated shapes.
|
||||
|
||||
The History is filled basing on the result of the operation. History cannot return any shapes not contained in the result.
|
||||
If the result of the operation is an empty shape, all input shapes will be considered as Deleted and none will have Modified and Generated shapes.
|
||||
|
||||
The history information can be accessed by the API methods:
|
||||
* *Standard_Boolean IsDeleted(const TopoDS_Shape& theS)* - to check if the shape has been Deleted during the operation;
|
||||
* *const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS)* - to get the shapes Modified from the given shape;
|
||||
* *const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS)* - to get the shapes Generated from the given shape.
|
||||
|
||||
@subsubsection occt_modalg_hist_del Deleted shapes
|
||||
|
||||
The shape is considered as Deleted during the operation if all of the following conditions are met:
|
||||
* The shape is a part of the argument shapes of the operation;
|
||||
* The result shape does not contain the shape itself;
|
||||
* The result shape does not contain any of the splits of the shape.
|
||||
|
||||
For example, in the CUT operation between two intersecting solids all vertices/edges/faces located completely inside the Tool solid will be Deleted during the operation.
|
||||
|
||||
@subsubsection occt_modalg_hist_mod Modified shapes
|
||||
|
||||
The shape is considered as Modified during the operation if the result shape contains the splits of the shape, not the shape itself. The shape can be modified only into the shapes with the same dimension.
|
||||
The splits of the shape contained in the result shape are Modified from the shape.
|
||||
The Modified shapes are created from the sub-shapes of the input shapes and, generally, repeat their geometry.
|
||||
|
||||
The list of Modified elements will contain only those contributing to the result of the operation. If the list is empty, the shape has not been modified and it is necessary to check if it has been Deleted.
|
||||
|
||||
For example, after translation of the shape in any direction all its sub-shapes will be modified into their translated copies.
|
||||
|
||||
@subsubsection occt_modalg_hist_gen Generated shapes
|
||||
|
||||
The shapes contained in the result shape are considered as Generated from the input shape if they were produced during the operation and have a different dimension from the shapes from which they were created.
|
||||
|
||||
The list of Generated elements will contain only those included in the result of the operation. If the list is empty, no new shapes have been Generated from the shape.
|
||||
|
||||
For example, extrusion of the edge in some direction will create a face. This face will be generated from the edge.
|
||||
|
||||
@subsubsection occt_modalg_hist_tool BRepTools_History
|
||||
|
||||
*BRepTools_History* is the general History tool intended for unification of the histories of different algorithms.
|
||||
|
||||
*BRepTools_History* can be created from any algorithm supporting the standard history methods *(IsDeleted(), Modified()* and *Generated())*:
|
||||
~~~~
|
||||
// The arguments of the operation
|
||||
TopoDS_Shape aS = ...;
|
||||
|
||||
// Perform transformation on the shape
|
||||
gp_Trsf aTrsf;
|
||||
aTrsf.SetTranslationPart(gp_Vec(0, 0, 1));
|
||||
BRepBuilderAPI_Transform aTransformer(aS, aTrsf); // Transformation API algorithm
|
||||
const TopoDS_Shape& aRes = aTransformer.Shape();
|
||||
|
||||
// Create the translation history object
|
||||
TopTools_ListOfShape anArguments;
|
||||
anArguments.Append(aS);
|
||||
BRepTools_History aHistory(anArguments, aTransformer);
|
||||
~~~~
|
||||
|
||||
*BRepTools_History* also allows merging histories. Thus, if you have two or more subsequent operations you can get one final history combined from histories of these operations:
|
||||
|
||||
~~~~
|
||||
Handle(BRepTools_History) aHist1 = ...; // History of first operation
|
||||
Handle(BRepTools_History) aHist2 = ...; // History of second operation
|
||||
~~~~
|
||||
|
||||
It is possible to merge the second history into the first one:
|
||||
~~~~
|
||||
aHist1->Merge(aHist2);
|
||||
~~~~
|
||||
|
||||
Or create the new history keeping the two histories unmodified:
|
||||
~~~~
|
||||
Handle(BRepTools_History) aResHistory = new BRepTools_History;
|
||||
aResHistory->Merge(aHist1);
|
||||
aResHistory->Merge(aHist2);
|
||||
~~~~
|
||||
|
||||
The possibilities of Merging histories and history creation from the API algorithms allow providing easy History support for the new algorithms.
|
||||
|
||||
@subsubsection occt_modalg_hist_draw DRAW history support
|
||||
|
||||
DRAW History support for the algorithms is provided by three basic commands:
|
||||
* *isdeleted*;
|
||||
* *modified*;
|
||||
* *generated*.
|
||||
|
||||
For more information on the Draw History mechanism please refer to the corresponding chapter in the Draw users guide - @ref occt_draw_hist "History commands".
|
||||
|
||||
|
||||
@section occt_modalg_3 Standard Topological Objects
|
||||
|
||||
The following standard topological objects can be created:
|
||||
* Vertices
|
||||
* Edges
|
||||
* Faces
|
||||
* Wires
|
||||
* Polygonal wires
|
||||
* Shells
|
||||
* Vertices;
|
||||
* Edges;
|
||||
* Faces;
|
||||
* Wires;
|
||||
* Polygonal wires;
|
||||
* Shells;
|
||||
* Solids.
|
||||
|
||||
There are two root classes for their construction and modification:
|
||||
@@ -3038,23 +3141,23 @@ You can obtain information on the shape by first exploring it. To access triangu
|
||||
|
||||
@section occt_modalg_defeaturing 3D Model Defeaturing
|
||||
|
||||
The Open CASCADE Technology Defeaturing algorithm is intended for removal of the unwanted parts or features from the model. These parts could be the holes, protrusions, gaps, chamfers, fillets etc.
|
||||
The Open CASCADE Technology Defeaturing algorithm is intended for removal of the unwanted parts or features from the model. These parts can be holes, protrusions, gaps, chamfers, fillets, etc.
|
||||
|
||||
Feature detection is not performed, and all features desired for removal should be defined by the user. The input shape is not modified during Defeaturing, the new shape is built in the result.
|
||||
Feature detection is not performed, and all features to be removed should be defined by the user. The input shape is not modified during Defeaturing, the new shape is built in the result.
|
||||
|
||||
On the API level the Defeaturing algorithm is implemented in the *BRepAlgoAPI_Defeaturing* class. On the input the algorithm accepts the shape to remove the features from and the features (one or many) to remove from the shape.
|
||||
Currently, the input shape should either be SOLID, or COMPSOLID, or COMPOUND of SOLIDs.
|
||||
The features to remove are the sets of faces forming the features. It does not matter how the feature faces are given. It could be the separate faces or the collections of them. The faces should belong to the initial shape, and those that do not belong will be ignored.
|
||||
On the API level the Defeaturing algorithm is implemented in the *BRepAlgoAPI_Defeaturing* class. At input the algorithm accepts the shape to remove the features from and the features (one or many) to be removed from the shape.
|
||||
Currently, the input shape should be either SOLID, or COMPSOLID, or COMPOUND of SOLIDs.
|
||||
The features to be removed are defined by the sets of faces forming them. It does not matter how the feature faces are given: as separate faces or their collections. The faces should belong to the initial shape, else they are ignored.
|
||||
|
||||
The actual features removal is performed by the low-level *BOPAlgo_RemoveFeatures* algorithm. On the API level, all the inputs are passed into the tool and the method *BOPAlgo_RemoveFeatures::Perform()* is called.
|
||||
The actual features removal is performed by the low-level *BOPAlgo_RemoveFeatures* algorithm. On the API level, all inputs are passed into the tool and the method *BOPAlgo_RemoveFeatures::Perform()* is called.
|
||||
|
||||
Before starting Features removal all the faces requested for removal from the shape are sorted on the connected blocks - each block represents single feature to remove.
|
||||
The features will be removed from the shape one by one, which will allow removing all possible features even if there were some problems with the removal of some of them (due to e.g. incorrect input data).
|
||||
Before removing features, all faces to be removed from the shape are sorted into connected blocks - each block represents a single feature to be removed.
|
||||
The features are removed from the shape one by one, which allows removing all possible features even if there are some problems with their removal (e.g. due to incorrect input data).
|
||||
|
||||
The removed feature is filled by the extension of the faces adjacent to the feature. In general, the algorithm of removing of the single feature from the shape looks as follows:
|
||||
The removed feature is filled by the extension of the faces adjacent to it. In general, the algorithm removing a single feature from the shape goes as follows:
|
||||
* Find the faces adjacent to the feature;
|
||||
* Extend the adjacent faces to cover the feature;
|
||||
* Trim the extended faces by the bounds of original face (except for bounds common with the feature), so it will cover the feature only;
|
||||
* Trim the extended faces by the bounds of the original face (except for the bounds common with the feature), so that they cover the feature only;
|
||||
* Rebuild the solids with reconstructed adjacent faces avoiding the feature faces.
|
||||
|
||||
If the single feature removal was successful, the result shape is overwritten with the new shape, otherwise the results are not kept, and the warning is given.
|
||||
@@ -3067,27 +3170,27 @@ and the options available from base class (*BOPAlgo_Options*):
|
||||
* Error/Warning reporting system;
|
||||
* Parallel processing mode.
|
||||
|
||||
Please note that the other options of the base class are not supported here and will have no effect.
|
||||
Note that the other options of the base class are not supported here and will have no effect.
|
||||
|
||||
<b>History support</b> allows tracking modification of the input shape in terms of Modified, IsDeleted and Generated. By default, the history is collected, but it is possible to disable it using the method *TrackHistory(false)*.
|
||||
On the low-level the history information is collected by the history tool *BRepTools_History*, which can be accessed through the method *BOPAlgo_RemoveFeatures::History()*.
|
||||
|
||||
<b>Error/Warning reporting system</b> - allows obtaining the extended overview of the Errors/Warnings occurred during the operation. As soon as any error appears the algorithm stops working. The warnings allow continuing the job, informing the user that something went wrong. The algorithm returns the following errors/warnings:
|
||||
* BOPAlgo_AlertUnsupportedType - the alert will be given as an error if the input shape does not contain any solids, and as a warning if the input shape contains not only solids, but also other shapes;
|
||||
* BOPAlgo_AlertNoFacesToRemove - the error alert is given in case there are no faces to remove from the shape (nothing to do);
|
||||
* BOPAlgo_AlertUnableToRemoveTheFeature - the warning alert is given to inform the user the removal of the feature is not possible. The algorithm will still try to remove the other features;
|
||||
* BOPAlgo_AlertRemoveFeaturesFailed - the error alert is given in case if the operation was aborted by the unknown reason.
|
||||
<b>Error/Warning reporting system</b> allows obtaining the extended overview of the Errors/Warnings occurred during the operation. As soon as any error appears, the algorithm stops working. The warnings allow continuing the job and informing the user that something went wrong. The algorithm returns the following errors/warnings:
|
||||
* *BOPAlgo_AlertUnsupportedType* - the alert will be given as an error if the input shape does not contain any solids, and as a warning if the input shape contains not only solids, but also other shapes;
|
||||
* *BOPAlgo_AlertNoFacesToRemove* - the error alert is given in case there are no faces to remove from the shape (nothing to do);
|
||||
* *BOPAlgo_AlertUnableToRemoveTheFeature* - the warning alert is given to inform the user the removal of the feature is not possible. The algorithm will still try to remove the other features;
|
||||
* *BOPAlgo_AlertRemoveFeaturesFailed* - the error alert is given in case if the operation was aborted by the unknown reason.
|
||||
|
||||
For more information on the error/warning reporting system please see the chapter @ref occt_algorithms_ers "Errors and warnings reporting system" of Boolean operations user guide.
|
||||
|
||||
<b>Parallel processing mode</b> - allows running the algorithm in parallel mode obtaining the result faster.
|
||||
|
||||
The algorithm has certain limitations:
|
||||
* Intersection of the surfaces of the connected faces adjacent to the feature should not be empty. It means, that such faces should not be tangent to each other.
|
||||
* Intersection of the surfaces of the connected faces adjacent to the feature should not be empty. It means, that such faces should not be tangent to each other.
|
||||
If the intersection of the adjacent faces will be empty, the algorithm will be unable to trim the faces correctly and, most likely, the feature will not be removed.
|
||||
* The algorithm does not process the INTERNAL parts of the solids, they are simply removed during reconstruction.
|
||||
|
||||
Note, that for successful removal of the feature, the extended faces adjacent to the feature should cover the feature completely, otherwise the solids will not be rebuild.
|
||||
Note, that for successful removal of the feature, the extended faces adjacent to the feature should cover the feature completely, otherwise the solids will not be rebuild.
|
||||
Take a look at the simple shape on the image below:
|
||||
@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im001.png,"",220}
|
||||
|
||||
@@ -3131,7 +3234,7 @@ if (aDF.HasWarnings()) // Check for the warnings
|
||||
const TopoDS_Shape& aResult = aDF.Shape(); // Result shape
|
||||
~~~~
|
||||
|
||||
To track the history of a shape use the API history methods:
|
||||
Use the API history methods to track the history of a shape:
|
||||
~~~~
|
||||
// Obtain modification of the shape
|
||||
const TopTools_ListOfShape& BRepAlgoAPI_Defeaturing::Modified(const TopoDS_Shape& theS);
|
||||
@@ -3143,20 +3246,15 @@ const TopTools_ListOfShape& BRepAlgoAPI_Defeaturing::Generated(const TopoDS_Shap
|
||||
Standard_Boolean BRepAlgoAPI_Defeaturing::IsDeleted(const TopoDS_Shape& theS);
|
||||
~~~~
|
||||
|
||||
For the usage of the Defeaturing algorithm on the Draw level the command <b>removefeatures</b> has been implemented.
|
||||
The command <b>removefeatures</b> allows using the Defeaturing algorithm on the Draw level.
|
||||
|
||||
To track the history of a shape modification during Defeaturing the following commands can be used:
|
||||
* <b>rfmodified</b> Shows the shapes modified from the input shape during Defeaturing.
|
||||
* <b>rfgenerated</b> Shows the shapes generated from the input shape during Defeaturing.
|
||||
* <b>rfisdeleted</b> Checks if the shape has been deleted during Defeaturing.
|
||||
The @ref occt_draw_hist "standard history commands" can be used to track the history of shape modification during Defeaturing.
|
||||
|
||||
For more details on commands above please refer the @ref occt_draw_defeaturing "Defeaturing commands" of the Draw test harness user guide.
|
||||
|
||||
To have possibility to access the error/warning shapes of the operation use the *bdrawwarnshapes* command before running the algorithm (see command usage in the @ref occt_algorithms_ers "Errors and warnings reporting system" of Boolean operations user guide).
|
||||
For more details on commands above, refer to the @ref occt_draw_defeaturing "Defeaturing commands" of the Draw test harness user guide.
|
||||
|
||||
@subsection occt_modalg_defeaturing_examples Examples
|
||||
|
||||
Here are the few examples of defeaturing of the ANC101 model:
|
||||
Here are the examples of defeaturing of the ANC101 model:
|
||||
|
||||
@figure{/user_guides/modeling_algos/images/modeling_algos_rf_im004.png,"ANC101 model",220}</td>
|
||||
|
||||
|
Before Width: | Height: | Size: 641 KiB After Width: | Height: | Size: 30 KiB |
@@ -1296,28 +1296,29 @@ The following sample code reads a shape from ASCII file and writes it to a binar
|
||||
|
||||
@section occt_modat_6 Bounding boxes
|
||||
|
||||
*Bounding box(es) (BndBox(es))* is used in many OCCT algorithms. In general, it is some filter to avoid check of excess interferences between pairs of shapes (check of interferences between BndBoxes is much simpler then between shapes and if BndBoxes do not interfere then there is no point in searching interferences between the corresponding shapes).
|
||||
Generally, BndBoxes can be divided on two main types:
|
||||
- axis-aligned BndBox (AABB). I.e. the box whose edges are parallel to the axes of World Coordinate System (WCS);
|
||||
- oriented BndBox (OBB). I.e. not AABB.
|
||||
In fact, every AABB is a specific case of OBB.<br>
|
||||
Bounding boxes are used in many OCCT algorithms. The most common use is as a filter avoiding check of excess interferences between pairs of shapes (check of interferences between bounding boxes is much simpler then between shapes and if they do not interfere then there is no point in searching interferences between the corresponding shapes).
|
||||
Generally, bounding boxes can be divided into two main types:
|
||||
- axis-aligned bounding box (AABB) is the box whose edges are parallel to the axes of the World Coordinate System (WCS);
|
||||
- oriented BndBox (OBB) is defined in its own coordinate system that can be rotated with respect to the WCS.
|
||||
Indeed, an AABB is a specific case of OBB.<br>
|
||||
|
||||
The image below illustrates the example, when using OBB is better than AABB.
|
||||
|
||||
@figure{/user_guides/modeling_data/images/modeling_data_image015.png,"Illustrating the problem with AABB.",320}
|
||||
|
||||
AABBs in this picture are interfered. Therefore, many OCCT-algorithms will spend much time to interfere the shapes. However, if we check OBBs, which are not interfered, then searching of interferences between the shapes will not be necessary. At that, creation and analysis of OBBs takes significantly more time than the analogical operations with AABB.
|
||||
AABBs in this picture are interfered. Therefore, many OCCT algorithms will spend much time to interfere the shapes. However, if we check OBBs, which are not interfered, then searching of interferences between the shapes will not be necessary. At that, creation and analysis of OBBs takes significantly more time than the analogical operations with AABB.
|
||||
|
||||
Later in this section, the BndBox having the smallest surface area will be called as <b> optimal </b>.
|
||||
Later in this section, the bounding boxes having the smallest surface area will be called *optimal*.
|
||||
|
||||
In OCCT, BndBox(es) are described in Bnd package. In general, Bnd_Box class describes AABB, Bnd_OBB class describes OBB. These classes contain the following common methods (this list is not complete; please see the documentation about corresponding class for detailed information):
|
||||
In OCCT, bounding boxes are defined in *Bnd* package. *Bnd_Box* class defines AABB, *Bnd_OBB* class defines OBB. These classes contain the following common methods (this list is not complete; see the documentation about the corresponding class for detailed information):
|
||||
|
||||
- SetVoid() and IsVoid(). SetVoid method clears the existing BndBox. IsVoid method indicates whether the BndBox is initialized.
|
||||
- Enlarge(...). Extends the current BndBox.
|
||||
- Add(...). Rebuilds the current BndBox in order to cover all previous objects (which it was created from) and the argument of the method.
|
||||
- IsOut(...). Checks whether the argument is inside/outside of the current BndBox.
|
||||
- *IsVoid* method indicates whether the bounding box is empty (uninitialized).
|
||||
- *SetVoid* method clears the existing bounding box.
|
||||
- *Enlarge(...)* extends the current bounding box.
|
||||
- *Add(...)* extends the bounding box as necessary to include the object (a point, a shape, etc.) passed as the argument.
|
||||
- *IsOut(...)* checks whether the argument is inside/outside of the current BndBox.
|
||||
|
||||
Also, BRepBndLib class contains methods to provide creation of BndBox (both AABB and OBB) from the complex shape.
|
||||
BRepBndLib class contains methods for creation of bounding boxes (both AABB and OBB) from the shapes.
|
||||
|
||||
@subsection occt_modat_6_1 Brief description of some algorithms working with OBB
|
||||
|
||||
@@ -1340,22 +1341,22 @@ Further, let us consider the triangle \f$ T_{0}\left \langle p_{0}, p_{1}, p_{2}
|
||||
<span>10.</span> Compute the center of OBB and its half dimensions.<br>
|
||||
<span>11.</span> Create OBB using the center, axes and half dimensions.<br>
|
||||
|
||||
This algorithm is realized in Bnd_OBB::ReBuild(...) method.
|
||||
This algorithm is implemented in the *Bnd_OBB::ReBuild(...)* method.
|
||||
|
||||
@subsubsection occt_modat_6_1_2 Creation of OBB based on Axes of inertia
|
||||
|
||||
The algorithm contains the following steps:
|
||||
1. Calculate three inertia axes, which will be the axes of the OBB.
|
||||
2. Transform the source object (TopoDS_Shape) into the local coordinate system based on the axes from item 1.
|
||||
2. Transform the source object *(TopoDS_Shape)* into the local coordinate system based on the axes from item 1.
|
||||
3. Create an AABB for the shape obtained in the item 2.
|
||||
4. Compute the center of AABB and its half dimensions
|
||||
5. Transform the center into the WCS
|
||||
4. Compute the center of AABB and its half dimensions.
|
||||
5. Transform the center into the WCS.
|
||||
6. Create OBB using the center, axes and half dimensions.
|
||||
|
||||
@subsubsection occt_modat_6_1_3 Method IsOut for a point
|
||||
|
||||
1. Project the point to each axis.
|
||||
2. Check, whether the absolute value of the projection parameter greater than the correspond half-dimension. In this case, IsOut method will return TRUE.
|
||||
2. Check, whether the absolute value of the projection parameter greater than the correspond half-dimension. In this case, *IsOut* method will return TRUE.
|
||||
|
||||
@subsubsection occt_modat_6_1_4 Method IsOut for another OBB
|
||||
|
||||
@@ -1366,27 +1367,27 @@ The algorithm of analyzing axis \f$ \mathbf{l} \f$ is following:
|
||||
|
||||
If OBBs are not interfered in terms of at least one axis (of 15) then they are not interfered at all.
|
||||
|
||||
@subsubsection occt_modat_6_1_5 Method Add for point or another BndBox
|
||||
@subsubsection occt_modat_6_1_5 Method Add for point or another bounding box
|
||||
|
||||
Create new OBB (see the section @ref occt_modat_6_1_1) based on the source point and all vertices of the given BndBoxes.
|
||||
Create a new OBB (see the section @ref occt_modat_6_1_1) based on the source point and all vertices of the given bounding boxes.
|
||||
|
||||
@subsection occt_modat_6_2 Add a shape
|
||||
|
||||
Method BRepBndLib::AddOBB(...) allows creating BndBox from the complex object (TopoDS_Shape). This method uses both algorithms described in the sections @ref occt_modat_6_1_1 and sections @ref occt_modat_6_1_2.
|
||||
Method *BRepBndLib::AddOBB(...)* allows creating the bounding box from a complex object *(TopoDS_Shape)*. This method uses both algorithms described in the sections @ref occt_modat_6_1_1 and sections @ref occt_modat_6_1_2.
|
||||
|
||||
The first algorithm is used if the shape outer shell can be represented by a set of points contained in the shape. Namely, only the following elements are the source of set of points:
|
||||
The first algorithm is used if the outer shell of the shape can be represented by a set of points contained in it. Namely, only the following elements are the source of set of points:
|
||||
|
||||
- Nodes of triangulation;
|
||||
- Nodes of Poly_Polygon3D;
|
||||
- Vertices of edges with linear 3D-curve lying in the planar face;
|
||||
- Vertices of edges with linear 3D-curve if the source shape does not contain more complex topological structure (e.g. the source shape is a compound of edges);
|
||||
- Vertices if the source shape does not contain more complex topological structure (e.g. the source shape is a compound of vertices).
|
||||
- Nodes of *Poly_Polygon3D*;
|
||||
- Vertices of edges with a linear 3D-curve lying in the planar face;
|
||||
- Vertices of edges with a linear 3D-curve if the source shape does not contain a more complex topological structure (e.g. the source shape is a compound of edges);
|
||||
- Vertices if the source shape does not contain a more complex topological structure (e.g. the source shape is a compound of vertices).
|
||||
|
||||
If required set of points cannot be extracted then the algorithm from section @ref occt_modat_6_1_2 is used for OBB creation.
|
||||
If the required set of points cannot be extracted then the algorithm from section @ref occt_modat_6_1_2 is used for OBB creation.
|
||||
|
||||
The package BRepBndLib contains the methods BRepBndLib::Add(...), BRepBndLib::AddClose(...) and BRepBndLib::AddOptimal(...) for creation of AABB of a shape. Please see reference manual for detailed information.
|
||||
The package *BRepBndLib* contains methods *BRepBndLib::Add(...), BRepBndLib::AddClose(...)* and *BRepBndLib::AddOptimal(...)* for creation of AABB of a shape. See the reference manual for the detailed information.
|
||||
|
||||
@subsection occt_modat_6_3 Limitations of algorithm for OBB creation.
|
||||
|
||||
1. The algorithm described in the section @ref occt_modat_6_1_1 works significantly better (finds resulting OBB with less surface area) and faster than the algorithm from the section @ref occt_modat_6_1_2. Nevertheless, (in general) the result returned by both algorithms is not always optimal (i.e. sometimes another OBB exists having less surface area). Moreover, the first method does not allow computing OBB of shapes with complex geometry.
|
||||
2. Currently, the algorithm of OBB creation is implemented for objects in 3D-space only.
|
||||
1. The algorithm described in the section @ref occt_modat_6_1_1 works significantly better (finds resulting OBB with less surface area) and faster than the algorithm from the section @ref occt_modat_6_1_2. Nevertheless, (in general) the result returned by both algorithms is not always optimal (i.e. sometimes another OBB exists with a smaller surface area). Moreover, the first method does not allow computing OBBs of shapes with a complex geometry.
|
||||
2. Currently, the algorithm of OBB creation is implemented for objects in 3D space only.
|
||||
|
@@ -440,6 +440,9 @@ current.Add (INT); // INT is now attached to current
|
||||
current.Add (INT); // causes failure
|
||||
TDF_Label attach = INT->Label();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Note. There is an exception from this rule for some sub-set of Standard attributes. See for details chapter 6.Standard Attributes.
|
||||
|
||||
@subsubsection occt_ocaf_3_5_4 Testing the attachment to a label
|
||||
|
||||
You can test whether an attribute is attached to a label or not by using *TDF_Attribute::IsA* with the GUID of the attribute as an argument. In the example below, you test whether the current label has an integer attribute, and then, if that is so, how many attributes are attached to it. *TDataStd_Integer::GetID* provides the GUID argument needed by the method IsAttribute.
|
||||
@@ -1102,6 +1105,30 @@ Standard attributes are ready-to-use attributes, which allow creating and modify
|
||||
|
||||
All attributes inherit class *TDF_Attribute*, so, each attribute has its own GUID and standard methods for attribute creation, manipulation, getting access to the data framework.
|
||||
|
||||
### Attributes supporting several attributes of the same type on the same label
|
||||
|
||||
By default only one attribute of the same type on the same lable is supported. For example, you can set only one TDataStd_Real attribute
|
||||
on the same label. This limitation was removed for some predefined sub-set of standard attributes by adding so called 'user defined ID'
|
||||
feature to the attribute.
|
||||
The listed below attributes received this new feature:
|
||||
|
||||
* **TDataStd_AsciiString**
|
||||
* **TDataStd_Integer**
|
||||
* **TDataStd_Name**
|
||||
* **TDataStd_Real**
|
||||
* **TDataStd_BooleanArray**
|
||||
* **TDataStd_BooleanList**
|
||||
* **TDataStd_ByteArray**
|
||||
* **TDataStd_ExtStringArray**
|
||||
* **TDataStd_ExtStringList**
|
||||
* **TDataStd_IntegerArray**
|
||||
* **TDataStd_IntegerList**
|
||||
* **TDataStd_RealArray**
|
||||
* **TDataStd_RealList**
|
||||
* **TDataStd_ReferenceArray**
|
||||
* **TDataStd_ReferenceList**
|
||||
|
||||
See for details paragraph 6.4.
|
||||
|
||||
@subsection occt_ocaf_6_2 Services common to all attributes
|
||||
|
||||
@@ -1228,6 +1255,60 @@ It is possible to describe any model by means of standard OCAF attributes.
|
||||
Most of the models may be implemented using only standard OCAF attributes.
|
||||
Some other models need special treatment and require implementation of new OCAF attributes.
|
||||
|
||||
|
||||
@subsection occt_ocaf_6_4 Standard Attributes with User Defined GUID
|
||||
|
||||
The listed above attributes allow to set at the same Label as many attributes of the same type as you want thanks to specific user's ID.
|
||||
Let's consider it on the example of the TDataStd_Real attribute. The previous version of the attribute allowed to set the attribute using
|
||||
static method Set in next way:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
static Handle(TDataStd_Real) Set (const TDF_Label& label, const Standard_Real value);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This is a default form which is kept by the attribute. It uses the default GUID for the attribute identification - TDataStd_Real::GetID().
|
||||
In case if you want to use the new feature (user defined Real attribute), for example to define several attributes which should keep a value
|
||||
of the same type - Standard_Real, but to be associated with different user's notions (or objects) the new static method Set should be used.
|
||||
In our example we will define two Real attributes which presents two customer's objects - Density and Volume and will be put on the same Label.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
#define DENSITY Standard_GUID("12e9454b-6dbc-11d4-b9c8-0060b0ee2810")
|
||||
#define VOLUME Standard_GUID("161595c0-3628-4737-915a-c160ce94c6f7")
|
||||
|
||||
TDF_Label aLabel = ...;
|
||||
|
||||
// Real attribute type with user defined GUID associated with user's object "Density"
|
||||
TDataStd_Real::Set(aLabel, DENSITY, 1.2);
|
||||
|
||||
// Real attribute type with user defined GUID associated with user's object "Volume"
|
||||
TDataStd_Real::Set(aLabel, VOLUME, 185.5);
|
||||
|
||||
To find an user defined Real attribute just use a corresponding GUID:
|
||||
Handle (TDataStd_Real) anAtt;
|
||||
aLabel.FindAttribute (DENSITY, anAtt);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@subsection occt_ocaf_6_4_1 Creation Attributes with User Defined GUID.
|
||||
|
||||
You can create a new instance of an attribute with user define GUID and add it to label in two ways.
|
||||
1. Using static method Set(). For example:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
TDF_Label aLabel = ...;
|
||||
Standard_Integer aValue = ...;
|
||||
Standard_GUID aGuid = TDataStd_Integer::GetID();
|
||||
TDataStd_Integer::Set(aLabel, aGuid, aValue);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
2. Using the default constructor
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
Handle(TDataStd_Integer) anInt = new TDataStd_Integer();
|
||||
anInt->SetID(aGuid);
|
||||
aLabel.Add(anInt);
|
||||
anInt->Set(aValue);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@section occt_ocaf_7 Visualization Attributes
|
||||
|
||||
|
@@ -138,7 +138,7 @@ Selectable object stores information about all created selection modes and sensi
|
||||
All successors of a selectable object must implement the method that splits its presentation into sensitive entities according to the given mode. The computed entities are arranged in one selection and added to the list of all selections of this object. No selection will be removed from the list until the object is deleted permanently.
|
||||
|
||||
For all standard OCCT shapes, zero mode is supposed to select the whole object (but it may be redefined easily in the custom object). For example, the standard OCCT selection mechanism and *AIS_Shape* determine the following modes:
|
||||
- 0 -- selection of entire object (AIS_Shape);
|
||||
- 0 -- selection of the entire object *(AIS_Shape)*;
|
||||
- 1 -- selection of the vertices;
|
||||
- 2 -- selection of the edges;
|
||||
- 3 -- selection of the wires;
|
||||
@@ -765,10 +765,10 @@ theCtx->SetDisplayMode (2, true);
|
||||
The Local Selection is defined by index (Selection Mode). The Selection Modes implemented by a specific interactive object and their meaning should be checked within the documentation of this class.
|
||||
See, for example, *MeshVS_SelectionModeFlags* for *MeshVS_Mesh* object.
|
||||
|
||||
The interactive object, which is used the most by applications, is *AIS_Shape*. Consequently, there are standard functions, which allow you to easily prepare selection operations on the constituent elements of shapes (selection of vertices, edges, faces, etc.). The Selection Mode for a specific shape type (*TopAbs_ShapeEnum*) is returned by method *AIS_Shape::SelectionMode()*.
|
||||
*AIS_Shape* is the most used interactive object. It provides API to manage selection operations on the constituent elements of shapes (selection of vertices, edges, faces, etc.). The Selection Mode for a specific shape type (*TopAbs_ShapeEnum*) is returned by method *AIS_Shape::SelectionMode()*.
|
||||
|
||||
The function *AIS_InteractiveObject::Display* (without argument taking Selection Mode) activates the object's default Selection Mode.
|
||||
The functions *AIS_InteractiveContext::Activate* and *AIS_InteractiveContext::Deactivate* activate and deactivate specific Selection Mode.
|
||||
The method *AIS_InteractiveObject::Display()* without a Selection Mode argument activates the default Selection Mode of the object.
|
||||
The methods *AIS_InteractiveContext::Activate()* and *AIS_InteractiveContext::Deactivate()* activate and deactivate a specific Selection Mode.
|
||||
|
||||
More than one Selection Mode can be activated at the same time (but default 0 mode for selecting entire object is exclusive - it cannot be combined with others).
|
||||
The list of active modes can be retrieved using function *AIS_InteractiveContext::ActivatedModes*.
|
||||
@@ -843,8 +843,8 @@ After using the *Select* and *ShiftSelect* functions, you can explore the list o
|
||||
* *AIS_InteractiveContext::NextSelected* -- moves the iterator to the next position;
|
||||
* *AIS_InteractiveContext::SelectedOwner* -- returns an entity at the current iterator position.
|
||||
|
||||
The owner object *SelectMgr_EntityOwner* is a key object identifying selectable entitiy in the viewer (returned by methods *AIS_InteractiveContext::DetectedOwner* and *AIS_InteractiveContext::SelectedOwner*).
|
||||
The Interactive Object itself can be retrieved by method *SelectMgr_EntityOwner::Selectable*, while identifying sub-part depends on type of Interactive Object.
|
||||
The owner object *SelectMgr_EntityOwner* is a key object identifying the selectable entity in the viewer (returned by methods *AIS_InteractiveContext::DetectedOwner* and *AIS_InteractiveContext::SelectedOwner*).
|
||||
The Interactive Object itself can be retrieved by method *SelectMgr_EntityOwner::Selectable*, while identifying a sub-part depends on the type of Interactive Object.
|
||||
In case of *AIS_Shape*, the (sub)shape is returned by method *StdSelect_BRepOwner::Shape*.
|
||||
|
||||
#### Example
|
||||
@@ -1121,9 +1121,9 @@ The root is the top of a structure hierarchy or structure network. The attribute
|
||||
* Have a type, a scale factor, and a color,
|
||||
* Have a size, shape, and orientation independent of transformations.
|
||||
* **Triangulation**
|
||||
* Have at least three vertices,
|
||||
* Have nodal normals defined for shading,
|
||||
* Have interior attributes -- style, color, front and back material, texture and reflection ratio,
|
||||
* Has at least three vertices,
|
||||
* Has nodal normals defined for shading,
|
||||
* Has interior attributes -- style, color, front and back material, texture and reflection ratio.
|
||||
* **Polylines** or **Segments**
|
||||
* Have two or more vertices,
|
||||
* Have the following attributes -- type, width scale factor, color.
|
||||
@@ -1196,7 +1196,7 @@ aGroup->SetGroupPrimitivesAspect (myDrawer->ShadingAspect()->Aspect());
|
||||
|
||||
@subsubsection occt_visu_4_2_5 Text primitive
|
||||
|
||||
TKOpenGL toolkit renders text labels using texture fonts. *Graphic3d* text primitives have the following features:
|
||||
*TKOpenGL* toolkit renders text labels using texture fonts. *Graphic3d* text primitives have the following features:
|
||||
* fixed size (non-zoomable) or zoomable,
|
||||
* can be rotated to any angle in the view plane,
|
||||
* support unicode charset.
|
||||
@@ -1213,8 +1213,16 @@ void Graphic3d_Group::Text (const Standard_CString theText,
|
||||
const Graphic3d_VerticalTextAlignment theVta,
|
||||
const Standard_Boolean theToEvalMinMax);
|
||||
~~~~~
|
||||
*theText* parameter is the text string, *thePoint* is the three-dimensional position of the text, *theHeight* is the text height, *theAngle* is the orientation of the text (at the moment, this parameter has no effect, but you can specify the text orientation through the *Graphic3d_AspectText3d* attributes).
|
||||
*theTp* parameter defines the text path, *theHta* is the horizontal alignment of the text, *theVta* is the vertical alignment of the text.
|
||||
|
||||
The meaning of these parameters is as follows:
|
||||
* *theText* - the text string,
|
||||
* *thePoint* - the three-dimensional position of the text,
|
||||
* *theHeight* - the text height,
|
||||
* *theAngle* - the text orientation (at the moment, this parameter has no effect, but you can specify the text orientation through the *Graphic3d_AspectText3d* attributes).
|
||||
* *theTp* defines the text path,
|
||||
* *theHta* - the horizontal alignment of the text,
|
||||
* *theVta* - the vertical alignment of the text.
|
||||
|
||||
You can pass FALSE as *theToEvalMinMax* if you do not want the graphic3d structure boundaries to be affected by the text position.
|
||||
|
||||
**Note** that the text orientation angle can be defined by *Graphic3d_AspectText3d* attributes.
|
||||
|
@@ -100,7 +100,7 @@ for the Representation and Presentation of Product Manufacturing Information (PM
|
||||
XDE can read and write GD\&T data of the following types:
|
||||
* dimensions, such as distance, length, radius and so on;
|
||||
* geometric tolerances;
|
||||
* datums, i.e a theoretically exact geometric references, such as point, line or plane, to which toleranced features are related.
|
||||
* datums, i.e theoretically exact geometric references, such as point, line or plane, to which toleranced features are related.
|
||||
|
||||
XDE supports two presentations of GD\&T data:
|
||||
* semantic presentation, i.e. data is stored in a machine-consumable way and includes all information required to understand the
|
||||
@@ -116,7 +116,7 @@ XDE provides capabilities for adding, editing and removing clipping planes.
|
||||
|
||||
@subsection occt_xde_1_9 Saved views
|
||||
|
||||
XDE supports reading from STEP views. Views allow to save information about camera parameters (position, direction, zoom factor, etc.)
|
||||
XDE supports reading from STEP views. Views allow saving information about camera parameters (position, direction, zoom factor, etc.)
|
||||
and visible shapes, PMIs, used clipping planes and notes. Currently, XDE supports saving of clipping planes in XBF format only.
|
||||
|
||||
XDE provides the following view management capabilities:
|
||||
@@ -677,7 +677,7 @@ Each GD\&T entity then corresponds to the dedicated label, the property itself i
|
||||
* *XCAFDimTolObject_GeomToleranceObject* - for geometric tolerances;
|
||||
* *XCAFDimTolObject_DatumObject* - for geometric tolerance Datums.
|
||||
|
||||
GD\&Ts and Shapes are related to by Graph Nodes.
|
||||
GD\&Ts and Shapes are related by Graph Nodes.
|
||||
|
||||
These definitions are common to various exchange formats, at least for STEP.
|
||||
|
||||
@@ -710,7 +710,7 @@ A similar approach can be used for other GD\&T types.
|
||||
|
||||
@subsubsection occt_xde_2_7_3 Editing a GD\&T
|
||||
A newly added GD\&T entity is empty. To set its data a corresponding access object should be used as it is demonstrated
|
||||
below, where the dimension becomes the linear distance between two points.
|
||||
below, where the dimension becomes a linear distance between two points.
|
||||
~~~~~
|
||||
Handle(XCAFDoc_Dimension) aDimAttr;
|
||||
aDimLabel.FindAttribute(XCAFDoc_Dimension::GetID(), aDimAttr);
|
||||
@@ -732,7 +732,7 @@ A similar approach can be used for other GD\&T types.
|
||||
To link a GD\&T entity with other OCAF labels (e.g. representing shapes) one should use the following methods:
|
||||
* *SetDimension* - for dimensions;
|
||||
* *SetGeomTolerance* - for geometric tolerances;
|
||||
* SetDatum - for geometric tolerance datums.
|
||||
* *SetDatum* - for geometric tolerance datums.
|
||||
|
||||
These methods can take a single label or a sequence of labels. All previous links will be removed.
|
||||
|
||||
@@ -751,7 +751,7 @@ In addition, a special method *SetDatumToGeomTol* should be used to link a datum
|
||||
@subsubsection occt_xde_2_7_5 Finding GD\&Ts and reference shapes
|
||||
|
||||
*XCAFDimTolObjects_Tool* class provides basic capabilities for searching GD\&Ts linked to shapes.
|
||||
Using the tool one can get sequences of dimensions, geometric tolerances and datums linked with a shape. A series of related datums is also returned for geometric tolerances.
|
||||
The tool provides sequences of dimensions, geometric tolerances and datums linked with a shape. A series of related datums is also returned for geometric tolerances.
|
||||
|
||||
To get reference shapes for a GD\&T entity one can use *GetRefShapeLabel* from *XCAFDoc_DimTolTool*.
|
||||
|
||||
@@ -798,7 +798,7 @@ if (!myClipPlaneTool->RemoveClippingPlane(aClipPlnLbl))
|
||||
~~~~~
|
||||
The plane will not be removed if it is referenced in at least one view.
|
||||
|
||||
To change clipping plane and its name use *UpdateClippingPlane* method, e.g.:
|
||||
To change the clipping plane and its name use *UpdateClippingPlane* method, e.g.:
|
||||
~~~~~
|
||||
gp_Pln aPln = ...
|
||||
myClipPlaneTool->UpdateClippingPlane(aClipPlnLbl, aPln, "New name of plane");
|
||||
@@ -810,7 +810,7 @@ Standard_Boolean aCapping = ...
|
||||
myClipPlaneTool->SetCapping(aClipPlnLbl, aCapping);
|
||||
~~~~~
|
||||
|
||||
*XCAFDoc_ClippingPlaneTool* can be used to get all clipping plane labels and to check if a label belongs to the ClippingPlane table, e.g.:
|
||||
*XCAFDoc_ClippingPlaneTool* can be used to get all clipping plane labels and to check if a label belongs to the *ClippingPlane table*, e.g.:
|
||||
~~~~~
|
||||
TDF_LabelSequence aClipPlaneLbls;
|
||||
myClipPlaneTool->GetClippingPlanes(aClipPlaneLbls);
|
||||
@@ -834,7 +834,7 @@ for (TDF_LabelSequence::Iterator anIt(aClipPlaneLbls); anIt.More(); anIt.Next())
|
||||
|
||||
@subsection occt_xde_2_9 Saved views
|
||||
|
||||
In an XDE document, Views are managed by the class *XCAFDoc_ViewTool*. It works basing on the same principles as ShapeTool works with Shapes. This tool can be provided on the Main Label or on any sub-label. Views are stored in a child of the starting document label 0.1.7, where a view itself is defined as *XCAFDoc_View* sub-class of *TDF_Attribute*. Views and selected shapes, clipping planes, GD\&Ts and notes are related to by Graph Nodes.
|
||||
In an XDE document, Views are managed by the class *XCAFDoc_ViewTool*. It works basing on the same principles as ShapeTool works with Shapes. This tool can be provided on the Main Label or on any sub-label. Views are stored in a child of the starting document label 0.1.7, where a view itself is defined as *XCAFDoc_View* sub-class of *TDF_Attribute*. Views and selected shapes, clipping planes, GD\&Ts and notes are related by Graph Nodes.
|
||||
|
||||
To query, edit, or initialize a Document to handle views of XCAF, use:
|
||||
~~~~~
|
||||
@@ -899,11 +899,11 @@ To get shapes, clipping planes, GD\&Ts or notes associated with a particular vie
|
||||
* *GetRefAnnotationLabel* - returns a sequence of associated annotated labels.
|
||||
|
||||
And vice versa, to get views that display a particular clipping plane, GD\&T or note use the following methods:
|
||||
* *GetViewLabelsForShape* - returns a sequence of associated view labels for a shape;
|
||||
* *GetViewLabelsForGDT* - returns a sequence of associated view labels for a GD\&T;
|
||||
* *GetViewLabelsForClippingPlane* - returns a sequence of associated view labels for a clipping plane;
|
||||
* *GetViewLabelsForNote* - returns a sequence of associated view labels for a note;
|
||||
* *GetViewLabelsForAnnotation* - returns a sequence of associated view labels for an annotated label.
|
||||
* *GetViewLabelsForShape* - returns a sequence of view labels associated with a shape;
|
||||
* *GetViewLabelsForGDT* - returns a sequence of view labels associated with a GD\&T;
|
||||
* *GetViewLabelsForClippingPlane* - returns a sequence of view labels associated with a clipping plane;
|
||||
* *GetViewLabelsForNote* - returns a sequence of view labels associated with a note;
|
||||
* *GetViewLabelsForAnnotation* - returns a sequence of view labels associated with an annotated label.
|
||||
|
||||
@subsection occt_xde_2_10 Custom notes
|
||||
|
||||
@@ -952,6 +952,26 @@ if (!myCommentNote.IsNull()) {
|
||||
myCommentNote->Set("New comment");
|
||||
}
|
||||
~~~~~
|
||||
In order to edit auxiliary note data such as text and attachment position, plane for rendering and tesselated presentation,
|
||||
one should use a transfer object *XCAFNoteObjects_NoteObject* by GetObject and SetObject methods of *XCAFDoc_Note* class.
|
||||
*XCAFNoteObjects_NoteObject* class provides the following functionality:
|
||||
- HasPlane, GetPlane and SetPlane methods test, get and set plane for note rendering
|
||||
- HasPoint, GetPoint and SetPoint methods test, get and set note attachment position on the annotated object
|
||||
- HasPointText, GetPointText, SetPointText methods test, get and set test position
|
||||
- GetPresentation and SetPresentation methods allow to test for and specify tesselated presentation
|
||||
|
||||
After getting, the transfer object can be edited and set back to the note:
|
||||
~~~~~
|
||||
Handle(XCAFNoteObjects_NoteObject) aNoteObj = myNote->GetObject();
|
||||
if (!aNoteObj.IsNull())
|
||||
{
|
||||
gp_Pnt aPntTxt (...);
|
||||
aNoteObj->SetPointText (aPntTxt);
|
||||
TopoDS_Shape aS = ...;
|
||||
aNoteObj->SetPresentation (aS);
|
||||
myNote->SetObject (aNoteObj);
|
||||
}
|
||||
~~~~~
|
||||
|
||||
@subsubsection occt_xde_2_10_4 Adding Notes
|
||||
|
||||
|
@@ -65,7 +65,7 @@ add_executable (Geometry WIN32 ${Geometry_SOURCE_FILES}
|
||||
${Geometry_RESOURCE_FILES}
|
||||
${Geometry_RESOURCE_HEADER})
|
||||
|
||||
set_property(TARGET Geometry PROPERTY FOLDER Samples)
|
||||
set_property(TARGET Geometry PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Geometry DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -37,7 +37,7 @@ add_executable ( Modeling WIN32 ${Modeling_SOURCE_FILES}
|
||||
${Modeling_RESOURCE_HEADER}
|
||||
${Modeling_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET Modeling PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Modeling PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Modeling DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -33,7 +33,7 @@ add_executable (Viewer2d WIN32 ${Viewer2d_SOURCE_FILES}
|
||||
${Viewer2d_RESOURCE_HEADER}
|
||||
${Viewer2d_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET Viewer2d PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Viewer2d PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Viewer2d DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -330,8 +330,7 @@ void CViewer2dDoc::OnBUTTONTestImage()
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (40,50) ;
|
||||
anImage->SetScale (1.0);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage,3,Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
FitAll2DViews (Standard_True);
|
||||
}
|
||||
}
|
||||
@@ -365,48 +364,41 @@ void CViewer2dDoc::OnBUTTONMultipleImage()
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (40, 50);
|
||||
anImage->SetScale (0.5);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
{ // 2
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (100, 50);
|
||||
anImage->SetScale (0.9);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
{ // 3
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (40, 40);
|
||||
anImage->SetScale (0.3);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
{ // 4
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (50, 40);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
{ // 5
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (80, 45);
|
||||
anImage->SetScale (2);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
{ // 6
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (20, -20);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
{ // 7
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (0, 0);
|
||||
anImage->SetScale (0.5);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False);
|
||||
}
|
||||
FitAll2DViews (Standard_True); // Update Viewer
|
||||
}
|
||||
|
@@ -57,7 +57,7 @@ add_executable (Viewer3d WIN32 ${Viewer3d_SOURCE_FILES}
|
||||
${COMMON_WINMAIN_FILE}
|
||||
${Viewer3d_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET Viewer3d PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Viewer3d PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Viewer3d DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#include "ModelClippingDlg.h"
|
||||
#include "TrihedronDlg.h"
|
||||
|
||||
#include <AIS_RubberBand.hxx>
|
||||
#include <V3d_AmbientLight.hxx>
|
||||
#include <V3d_DirectionalLight.hxx>
|
||||
#include <V3d_PositionalLight.hxx>
|
||||
@@ -109,7 +110,7 @@ CViewer3dView::CViewer3dView()
|
||||
myCurZoom (0.0),
|
||||
NbActiveLights (2), // There are 2 default active lights
|
||||
myHlrModeIsOn (Standard_False),
|
||||
m_Pen (NULL),
|
||||
myRect (new AIS_RubberBand (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0)),
|
||||
myAxisKey (0),
|
||||
myScaleDirection (0)
|
||||
{
|
||||
@@ -120,7 +121,6 @@ CViewer3dView::CViewer3dView()
|
||||
CViewer3dView::~CViewer3dView()
|
||||
{
|
||||
myView->Remove();
|
||||
if (m_Pen) delete m_Pen;
|
||||
}
|
||||
|
||||
BOOL CViewer3dView::PreCreateWindow(CREATESTRUCT& cs)
|
||||
@@ -424,7 +424,7 @@ GetDocument()->UpdateResultMessageDlg("SetPosition",Message);
|
||||
BRepPrimAPI_MakeCone MakeCone(gp_Ax2(p1, gp_Dir(gp_Vec(p1, p2))),
|
||||
0, (p1.Distance(p2))/tan(1.04), coneHeigth);
|
||||
spotConeShape->Set(MakeCone.Solid());
|
||||
GetDocument()->GetAISContext()->Display (spotConeShape, 0, -1, Standard_True);
|
||||
GetDocument()->GetAISContext()->Display (spotConeShape, 0, -1, false);
|
||||
((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick the target point");
|
||||
myCurrentMode = CurAction3d_TargetSpotLight;
|
||||
|
||||
@@ -646,7 +646,6 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
{
|
||||
case CurAction3d_Nothing :
|
||||
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False);
|
||||
myXmax = point.x; myYmax = point.y;
|
||||
if (nFlags & MK_SHIFT)
|
||||
GetDocument()->ShiftDragEvent(myXmax,myYmax,0,myView);
|
||||
@@ -661,8 +660,7 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
break;
|
||||
case CurAction3d_WindowZooming :
|
||||
myXmax = point.x; myYmax = point.y;
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash);
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash);
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True, Aspect_TOL_DASH);
|
||||
|
||||
break;
|
||||
case CurAction3d_DynamicPanning :
|
||||
@@ -710,6 +708,7 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
GetDocument()->GetAISContext()->Redisplay(directionalEdgeShape,0,Standard_True);
|
||||
myCurrent_DirectionalLight->SetDirection(p2.X()-p1.X(),p2.Y()-p1.Y(),p2.Z()-p1.Z());
|
||||
myView->UpdateLights();
|
||||
myView->Redraw();
|
||||
}
|
||||
}
|
||||
else if (myCurrentMode == CurAction3d_BeginPositionalLight)
|
||||
@@ -718,6 +717,7 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
//Update the light dynamically
|
||||
myCurrent_PositionalLight->SetPosition(p2.X(),p2.Y(),p2.Z());
|
||||
myView->UpdateLights();
|
||||
myView->Redraw();
|
||||
}
|
||||
else if (myCurrentMode == CurAction3d_TargetSpotLight)
|
||||
{
|
||||
@@ -732,6 +732,7 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
GetDocument()->GetAISContext()->Redisplay(spotConeShape,0,Standard_True);
|
||||
myCurrent_SpotLight->SetDirection(p2.X()-p1.X(),p2.Y()-p1.Y(),p2.Z()-p1.Z());
|
||||
myView->UpdateLights();
|
||||
myView->Redraw();
|
||||
}
|
||||
}
|
||||
else if (myCurrentMode == CurAction3d_EndSpotLight)
|
||||
@@ -747,12 +748,17 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
GetDocument()->GetAISContext()->Redisplay(spotConeShape,0,Standard_True);
|
||||
myCurrent_SpotLight->SetAngle((float )atan(p2.Distance(p3)/p1.Distance(p2))) ;
|
||||
myView->UpdateLights();
|
||||
myView->Redraw();
|
||||
}
|
||||
}
|
||||
if (nFlags & MK_SHIFT)
|
||||
else if (nFlags & MK_SHIFT)
|
||||
{
|
||||
GetDocument()->ShiftMoveEvent(point.x,point.y,myView);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetDocument()->MoveEvent(point.x,point.y,myView);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -799,60 +805,34 @@ void CViewer3dView::OnUpdateBUTTONRot(CCmdUI* pCmdUI)
|
||||
pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicRotation);
|
||||
}
|
||||
|
||||
void CViewer3dView::DrawRectangle(const Standard_Integer MinX ,
|
||||
const Standard_Integer MinY ,
|
||||
const Standard_Integer MaxX ,
|
||||
const Standard_Integer MaxY ,
|
||||
const Standard_Boolean Draw ,
|
||||
const LineStyle aLineStyle)
|
||||
void CViewer3dView::DrawRectangle (Standard_Integer theMinX,
|
||||
Standard_Integer theMinY,
|
||||
Standard_Integer theMaxX,
|
||||
Standard_Integer theMaxY,
|
||||
Standard_Boolean theToDraw,
|
||||
Aspect_TypeOfLine theLineType)
|
||||
{
|
||||
static int m_DrawMode;
|
||||
if (!m_Pen && aLineStyle ==Solid )
|
||||
{m_Pen = new CPen(PS_SOLID, 1, RGB(0,0,0)); m_DrawMode = R2_MERGEPENNOT;}
|
||||
else if (!m_Pen && aLineStyle ==Dot )
|
||||
{m_Pen = new CPen(PS_DOT, 1, RGB(0,0,0)); m_DrawMode = R2_XORPEN;}
|
||||
else if (!m_Pen && aLineStyle == ShortDash)
|
||||
{m_Pen = new CPen(PS_DASH, 1, RGB(255,0,0)); m_DrawMode = R2_XORPEN;}
|
||||
else if (!m_Pen && aLineStyle == LongDash)
|
||||
{m_Pen = new CPen(PS_DASH, 1, RGB(0,0,0)); m_DrawMode = R2_NOTXORPEN;}
|
||||
else if (aLineStyle == Default)
|
||||
{ m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT;}
|
||||
const Handle(AIS_InteractiveContext)& aCtx = GetDocument()->GetAISContext();
|
||||
if (!theToDraw)
|
||||
{
|
||||
aCtx->Remove (myRect, false);
|
||||
aCtx->CurrentViewer()->RedrawImmediate();
|
||||
return;
|
||||
}
|
||||
|
||||
CPen* aOldPen = NULL;
|
||||
CClientDC clientDC(this);
|
||||
if (m_Pen) aOldPen = clientDC.SelectObject(m_Pen);
|
||||
clientDC.SetROP2(m_DrawMode);
|
||||
|
||||
static Standard_Integer StoredMinX, StoredMaxX, StoredMinY, StoredMaxY;
|
||||
static Standard_Boolean m_IsVisible;
|
||||
|
||||
if ( m_IsVisible && !Draw) // move or up : erase at the old position
|
||||
{
|
||||
clientDC.MoveTo(StoredMinX,StoredMinY);
|
||||
clientDC.LineTo(StoredMinX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMinY);
|
||||
clientDC.LineTo(StoredMinX,StoredMinY);
|
||||
m_IsVisible = false;
|
||||
}
|
||||
|
||||
StoredMinX = Min ( MinX, MaxX );
|
||||
StoredMinY = Min ( MinY, MaxY );
|
||||
StoredMaxX = Max ( MinX, MaxX );
|
||||
StoredMaxY = Max ( MinY, MaxY);
|
||||
|
||||
if (Draw) // move : draw
|
||||
{
|
||||
clientDC.MoveTo(StoredMinX,StoredMinY);
|
||||
clientDC.LineTo(StoredMinX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMinY);
|
||||
clientDC.LineTo(StoredMinX,StoredMinY);
|
||||
m_IsVisible = true;
|
||||
}
|
||||
|
||||
if (m_Pen)
|
||||
clientDC.SelectObject(aOldPen);
|
||||
CRect aRect;
|
||||
GetWindowRect (aRect);
|
||||
myRect->SetLineType (theLineType);
|
||||
myRect->SetRectangle (theMinX, aRect.Height() - theMinY, theMaxX, aRect.Height() - theMaxY);
|
||||
if (!aCtx->IsDisplayed (myRect))
|
||||
{
|
||||
aCtx->Display (myRect, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
aCtx->Redisplay (myRect, false);
|
||||
}
|
||||
aCtx->CurrentViewer()->RedrawImmediate();
|
||||
}
|
||||
|
||||
void CViewer3dView::OnModifyChangeBackground()
|
||||
@@ -978,6 +958,7 @@ void CViewer3dView::OnAmbientLight()
|
||||
NbActiveLights++;
|
||||
|
||||
myView->UpdateLights();
|
||||
myView->Redraw();
|
||||
|
||||
TCollection_AsciiString Message("\
|
||||
myCurrent_AmbientLight=new V3d_AmbientLight(Quantity_NOC_GRAY);\n\
|
||||
|
@@ -33,6 +33,8 @@ enum View3D_CurrentAction {
|
||||
CurAction3d_EndDirectionalLight
|
||||
};
|
||||
|
||||
class AIS_RubberBand;
|
||||
|
||||
class CViewer3dView : public CView
|
||||
{
|
||||
protected: // create from serialization only
|
||||
@@ -145,16 +147,13 @@ private:
|
||||
Handle(V3d_DirectionalLight) myCurrent_DirectionalLight;
|
||||
Handle(Graphic3d_ClipPlane) myClippingPlane;
|
||||
Handle(AIS_Shape) myShape;
|
||||
Handle(AIS_RubberBand) myRect; //!< Rubber rectangle for selection
|
||||
|
||||
private:
|
||||
enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
|
||||
CPen* m_Pen;
|
||||
virtual void DrawRectangle (const Standard_Integer MinX ,
|
||||
const Standard_Integer MinY ,
|
||||
const Standard_Integer MaxX ,
|
||||
const Standard_Integer MaxY ,
|
||||
const Standard_Boolean Draw ,
|
||||
const LineStyle aLineStyle = Default );
|
||||
|
||||
void DrawRectangle (Standard_Integer theMinX, Standard_Integer theMinY, Standard_Integer theMaxX, Standard_Integer theMaxY,
|
||||
Standard_Boolean theToDraw, Aspect_TypeOfLine theLineType = Aspect_TOL_SOLID);
|
||||
|
||||
UINT myAxisKey;
|
||||
UINT myScaleDirection;
|
||||
void RedrawVisMode();
|
||||
|
@@ -35,7 +35,7 @@ add_executable (ImportExport WIN32 ${ImportExport_SOURCE_FILES}
|
||||
${ImportExport_RESOURCE_HEADER}
|
||||
${ImportExport_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET ImportExport PROPERTY FOLDER Samples)
|
||||
set_property (TARGET ImportExport PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS ImportExport DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -49,7 +49,7 @@ add_executable (Ocaf WIN32 ${Ocaf_SOURCE_FILES}
|
||||
${Ocaf_RESOURCE_FILES} )
|
||||
|
||||
|
||||
set_property (TARGET Ocaf PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Ocaf PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Ocaf DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -39,7 +39,7 @@ add_executable (Triangulation WIN32 ${Triangulation_SOURCE_FILES}
|
||||
${Triangulation_RESOURCE_HEADER}
|
||||
${Triangulation_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET Triangulation PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Triangulation PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Triangulation DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -61,7 +61,7 @@ add_executable (HLR WIN32 ${HLR_SOURCE_FILES}
|
||||
${HLR_RESOURCE_HEADER}
|
||||
${HLR_RESOURCE_FILES} )
|
||||
|
||||
set_property (TARGET HLR PROPERTY FOLDER Samples)
|
||||
set_property (TARGET HLR PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS HLR DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -44,7 +44,7 @@ add_executable (Animation WIN32 ${Animation_SOURCE_FILES}
|
||||
${COMMON_WINMAIN_FILE}
|
||||
${Animation_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET Animation PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Animation PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Animation DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -11,6 +11,8 @@
|
||||
|
||||
#include "Sensitivity.h"
|
||||
|
||||
#include <AIS_RubberBand.hxx>
|
||||
|
||||
#ifdef _DEBUG
|
||||
//#define new DEBUG_NEW by CasCade
|
||||
#undef THIS_FILE
|
||||
@@ -92,7 +94,7 @@ CAnimationView3D::CAnimationView3D()
|
||||
myCurrentMode (CurrentAction3d_Nothing),
|
||||
m_FlySens (500.0),
|
||||
m_TurnSens (M_PI / 40.0),
|
||||
m_Pen (NULL)
|
||||
myRect (new AIS_RubberBand (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0))
|
||||
{
|
||||
// TODO: add construction code here
|
||||
}
|
||||
@@ -100,7 +102,6 @@ CAnimationView3D::CAnimationView3D()
|
||||
CAnimationView3D::~CAnimationView3D()
|
||||
{
|
||||
myView->Remove();
|
||||
if (m_Pen) delete m_Pen;
|
||||
}
|
||||
|
||||
BOOL CAnimationView3D::PreCreateWindow(CREATESTRUCT& cs)
|
||||
@@ -403,7 +404,7 @@ void CAnimationView3D::OnLButtonUp(UINT nFlags, CPoint point)
|
||||
break;
|
||||
case CurrentAction3d_WindowZooming :
|
||||
myXmax=point.x; myYmax=point.y;
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash);
|
||||
DrawRectangle (myXmin, myYmin, myXmax, myYmax, Standard_False, Aspect_TOL_DASH);
|
||||
if ((abs(myXmin-myXmax)>ValZWMin) || (abs(myYmin-myYmax)>ValZWMin))
|
||||
// Test if the zoom window is greater than a minimale window.
|
||||
{
|
||||
@@ -503,7 +504,6 @@ void CAnimationView3D::OnMouseMove(UINT nFlags, CPoint point)
|
||||
{
|
||||
case CurrentAction3d_Nothing :
|
||||
myXmax = point.x; myYmax = point.y;
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False);
|
||||
if (nFlags & MK_SHIFT)
|
||||
GetDocument()->ShiftDragEvent(myXmax,myYmax,0,myView);
|
||||
else
|
||||
@@ -517,8 +517,7 @@ void CAnimationView3D::OnMouseMove(UINT nFlags, CPoint point)
|
||||
break;
|
||||
case CurrentAction3d_WindowZooming :
|
||||
myXmax = point.x; myYmax = point.y;
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash);
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash);
|
||||
DrawRectangle (myXmin, myYmin, myXmax, myYmax, Standard_True, Aspect_TOL_DASH);
|
||||
break;
|
||||
case CurrentAction3d_DynamicPanning :
|
||||
myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning
|
||||
@@ -652,57 +651,36 @@ void CAnimationView3D::OnChangeBackground()
|
||||
//-----------------------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------------------
|
||||
void CAnimationView3D::DrawRectangle(const Standard_Integer MinX ,
|
||||
const Standard_Integer MinY ,
|
||||
const Standard_Integer MaxX ,
|
||||
const Standard_Integer MaxY ,
|
||||
const Standard_Boolean Draw ,
|
||||
const LineStyle aLineStyle)
|
||||
void CAnimationView3D::DrawRectangle (Standard_Integer theMinX,
|
||||
Standard_Integer theMinY,
|
||||
Standard_Integer theMaxX,
|
||||
Standard_Integer theMaxY,
|
||||
Standard_Boolean theToDraw,
|
||||
Aspect_TypeOfLine theLineType)
|
||||
{
|
||||
static int m_DrawMode;
|
||||
if (!m_Pen && aLineStyle ==Solid )
|
||||
{m_Pen = new CPen(PS_SOLID, 1, RGB(0,0,0)); m_DrawMode = R2_MERGEPENNOT;}
|
||||
else if (!m_Pen && aLineStyle ==Dot )
|
||||
{m_Pen = new CPen(PS_DOT, 1, RGB(0,0,0)); m_DrawMode = R2_XORPEN;}
|
||||
else if (!m_Pen && aLineStyle == ShortDash)
|
||||
{m_Pen = new CPen(PS_DASH, 1, RGB(255,0,0)); m_DrawMode = R2_XORPEN;}
|
||||
else if (!m_Pen && aLineStyle == LongDash)
|
||||
{m_Pen = new CPen(PS_DASH, 1, RGB(0,0,0)); m_DrawMode = R2_NOTXORPEN;}
|
||||
else if (aLineStyle == Default)
|
||||
{ m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT;}
|
||||
const Handle(AIS_InteractiveContext)& aCtx = GetDocument()->GetAISContext();
|
||||
if (!theToDraw)
|
||||
{
|
||||
aCtx->Remove (myRect, false);
|
||||
aCtx->CurrentViewer()->RedrawImmediate();
|
||||
return;
|
||||
}
|
||||
|
||||
CPen* aOldPen = NULL;
|
||||
CClientDC clientDC(this);
|
||||
if (m_Pen) aOldPen = clientDC.SelectObject(m_Pen);
|
||||
clientDC.SetROP2(m_DrawMode);
|
||||
|
||||
static Standard_Integer StoredMinX, StoredMaxX, StoredMinY, StoredMaxY;
|
||||
static Standard_Boolean m_IsVisible;
|
||||
|
||||
if ( m_IsVisible && !Draw) // move or up : erase at the old position
|
||||
{
|
||||
clientDC.MoveTo(StoredMinX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMinY);
|
||||
m_IsVisible = false;
|
||||
}
|
||||
|
||||
StoredMinX = Min ( MinX, MaxX );
|
||||
StoredMinY = Min ( MinY, MaxY );
|
||||
StoredMaxX = Max ( MinX, MaxX );
|
||||
StoredMaxY = Max ( MinY, MaxY);
|
||||
|
||||
if (Draw) // move : draw
|
||||
{
|
||||
clientDC.MoveTo(StoredMinX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMinY);
|
||||
m_IsVisible = true;
|
||||
}
|
||||
|
||||
if (m_Pen)
|
||||
clientDC.SelectObject(aOldPen);
|
||||
CRect aRect;
|
||||
GetWindowRect (aRect);
|
||||
myRect->SetLineType (theLineType);
|
||||
myRect->SetRectangle (theMinX, aRect.Height() - theMinY, theMaxX, aRect.Height() - theMaxY);
|
||||
if (!aCtx->IsDisplayed (myRect))
|
||||
{
|
||||
aCtx->Display (myRect, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
aCtx->Redisplay (myRect, false);
|
||||
}
|
||||
aCtx->CurrentViewer()->RedrawImmediate();
|
||||
}
|
||||
|
||||
void CAnimationView3D::OnStop()
|
||||
{
|
||||
KillTimer(GetDocument()->myCount);
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "AnimationDoc.h"
|
||||
#include "..\..\Common\res\OCC_Resource.h"
|
||||
|
||||
class AIS_RubberBand;
|
||||
|
||||
enum View3D_CurrentAction {
|
||||
CurrentAction3d_Nothing,
|
||||
CurrentAction3d_DynamicZooming,
|
||||
@@ -146,14 +148,9 @@ private:
|
||||
double m_Focus ;
|
||||
|
||||
private:
|
||||
enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
|
||||
CPen* m_Pen;
|
||||
virtual void DrawRectangle (const Standard_Integer MinX ,
|
||||
const Standard_Integer MinY ,
|
||||
const Standard_Integer MaxX ,
|
||||
const Standard_Integer MaxY ,
|
||||
const Standard_Boolean Draw ,
|
||||
const LineStyle aLineStyle = Default );
|
||||
Handle(AIS_RubberBand) myRect; //!< Rubber rectangle for selection
|
||||
void DrawRectangle (Standard_Integer theMinX, Standard_Integer theMinY, Standard_Integer theMaxX, Standard_Integer theMaxY,
|
||||
Standard_Boolean theToDraw, Aspect_TypeOfLine theLineType = Aspect_TOL_SOLID);
|
||||
};
|
||||
|
||||
#ifndef _DEBUG // debug version in AnimationView.cpp
|
||||
|
@@ -61,7 +61,7 @@ add_executable (Convert WIN32 ${Convert_SOURCE_FILES}
|
||||
${COMMON_WINMAIN_FILE}
|
||||
${WNT_RESOURCE_FILES} )
|
||||
|
||||
set_property (TARGET Convert PROPERTY FOLDER Samples)
|
||||
set_property (TARGET Convert PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS Convert DESTINATION "${INSTALL_DIR_BIN}")
|
||||
|
@@ -7,6 +7,7 @@
|
||||
#include "OCCDemoDoc.h"
|
||||
#include "OCCDemoView.h"
|
||||
|
||||
#include <AIS_RubberBand.hxx>
|
||||
#include <Graphic3d_GraphicDriver.hxx>
|
||||
|
||||
#define ValZWMin 1
|
||||
@@ -69,7 +70,7 @@ COCCDemoView::COCCDemoView()
|
||||
myCurZoom=0;
|
||||
myCurrentMode = CurAction3d_Nothing;
|
||||
myVisMode = VIS_SHADE;
|
||||
m_Pen = NULL;
|
||||
myRect = new AIS_RubberBand (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0);
|
||||
myGraphicDriver = ((COCCDemoApp*)AfxGetApp())->GetGraphicDriver();
|
||||
}
|
||||
|
||||
@@ -77,8 +78,6 @@ COCCDemoView::~COCCDemoView()
|
||||
{
|
||||
if (!myView.IsNull())
|
||||
myView->Remove();
|
||||
if (m_Pen)
|
||||
delete m_Pen;
|
||||
}
|
||||
|
||||
BOOL COCCDemoView::PreCreateWindow(CREATESTRUCT& cs)
|
||||
@@ -336,8 +335,7 @@ void COCCDemoView::OnMouseMove(UINT nFlags, CPoint point)
|
||||
break;
|
||||
case CurAction3d_WindowZooming :
|
||||
myXmax = point.x; myYmax = point.y;
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash);
|
||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash);
|
||||
DrawRectangle (myXmin, myYmin, myXmax, myYmax, Standard_True, Aspect_TOL_DASH);
|
||||
break;
|
||||
case CurAction3d_DynamicPanning :
|
||||
myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning
|
||||
@@ -407,67 +405,34 @@ void COCCDemoView::OnUpdateBUTTONRot(CCmdUI* pCmdUI)
|
||||
pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicRotation);
|
||||
}
|
||||
|
||||
void COCCDemoView::DrawRectangle(const Standard_Integer MinX,
|
||||
const Standard_Integer MinY,
|
||||
const Standard_Integer MaxX,
|
||||
const Standard_Integer MaxY,
|
||||
const Standard_Boolean Draw,
|
||||
const LineStyle aLineStyle)
|
||||
void COCCDemoView::DrawRectangle (Standard_Integer theMinX,
|
||||
Standard_Integer theMinY,
|
||||
Standard_Integer theMaxX,
|
||||
Standard_Integer theMaxY,
|
||||
Standard_Boolean theToDraw,
|
||||
Aspect_TypeOfLine theLineType)
|
||||
{
|
||||
static int m_DrawMode;
|
||||
if (!m_Pen && aLineStyle ==Solid )
|
||||
const Handle(AIS_InteractiveContext)& aCtx = GetDocument()->GetAISContext();
|
||||
if (!theToDraw)
|
||||
{
|
||||
m_Pen = new CPen(PS_SOLID, 1, RGB(0,0,0)); m_DrawMode = R2_MERGEPENNOT;
|
||||
}
|
||||
else if (!m_Pen && aLineStyle ==Dot )
|
||||
{
|
||||
m_Pen = new CPen(PS_DOT, 1, RGB(0,0,0)); m_DrawMode = R2_XORPEN;
|
||||
}
|
||||
else if (!m_Pen && aLineStyle == ShortDash)
|
||||
{
|
||||
m_Pen = new CPen(PS_DASH, 1, RGB(255,0,0)); m_DrawMode = R2_XORPEN;
|
||||
}
|
||||
else if (!m_Pen && aLineStyle == LongDash)
|
||||
{
|
||||
m_Pen = new CPen(PS_DASH, 1, RGB(0,0,0)); m_DrawMode = R2_NOTXORPEN;
|
||||
}
|
||||
else if (aLineStyle == Default)
|
||||
{
|
||||
m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT;
|
||||
aCtx->Remove (myRect, false);
|
||||
aCtx->CurrentViewer()->RedrawImmediate();
|
||||
return;
|
||||
}
|
||||
|
||||
CPen* aOldPen = NULL;
|
||||
CClientDC clientDC(this);
|
||||
if (m_Pen)
|
||||
aOldPen = clientDC.SelectObject(m_Pen);
|
||||
clientDC.SetROP2(m_DrawMode);
|
||||
|
||||
static Standard_Integer StoredMinX, StoredMaxX, StoredMinY, StoredMaxY;
|
||||
static Standard_Boolean m_IsVisible = Standard_False;
|
||||
|
||||
if ( m_IsVisible && !Draw) // move or up : erase at the old position
|
||||
CRect aRect;
|
||||
GetWindowRect (aRect);
|
||||
myRect->SetLineType (theLineType);
|
||||
myRect->SetRectangle (theMinX, aRect.Height() - theMinY, theMaxX, aRect.Height() - theMaxY);
|
||||
if (!aCtx->IsDisplayed (myRect))
|
||||
{
|
||||
clientDC.MoveTo(StoredMinX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMinY);
|
||||
m_IsVisible = false;
|
||||
aCtx->Display (myRect, false);
|
||||
}
|
||||
|
||||
StoredMinX = Min ( MinX, MaxX );
|
||||
StoredMinY = Min ( MinY, MaxY );
|
||||
StoredMaxX = Max ( MinX, MaxX );
|
||||
StoredMaxY = Max ( MinY, MaxY);
|
||||
|
||||
if (Draw) // move : draw
|
||||
else
|
||||
{
|
||||
clientDC.MoveTo(StoredMinX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMaxY);
|
||||
clientDC.LineTo(StoredMaxX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMinY);
|
||||
m_IsVisible = true;
|
||||
aCtx->Redisplay (myRect, false);
|
||||
}
|
||||
|
||||
if (m_Pen)
|
||||
clientDC.SelectObject(aOldPen);
|
||||
aCtx->CurrentViewer()->RedrawImmediate();
|
||||
}
|
||||
|
||||
void COCCDemoView::InitButtons()
|
||||
|
@@ -18,6 +18,8 @@ enum View3D_CurrentAction {
|
||||
CurAction3d_DynamicRotation
|
||||
};
|
||||
|
||||
class AIS_RubberBand;
|
||||
|
||||
class COCCDemoView : public CView
|
||||
{
|
||||
protected: // create from serialization only
|
||||
@@ -119,14 +121,13 @@ private:
|
||||
Standard_Real myCurZoom;
|
||||
|
||||
private:
|
||||
enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
|
||||
CPen* m_Pen;
|
||||
Handle(AIS_RubberBand) myRect; //!< Rubber rectangle for selection
|
||||
virtual void DrawRectangle (const Standard_Integer MinX ,
|
||||
const Standard_Integer MinY ,
|
||||
const Standard_Integer MaxX ,
|
||||
const Standard_Integer MaxY ,
|
||||
const Standard_Boolean Draw ,
|
||||
const LineStyle aLineStyle = Default );
|
||||
Aspect_TypeOfLine theLineType = Aspect_TOL_SOLID);
|
||||
|
||||
};
|
||||
|
||||
|
@@ -38,6 +38,8 @@ void Sample2D_Image::SetContext(const Handle(AIS_InteractiveContext)& theContext
|
||||
MakeShape();
|
||||
this->Set(TopoDS_Shape(myFace));
|
||||
myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
|
||||
myDrawer->ShadingAspect()->Aspect()->SetTextureMap (new Graphic3d_Texture2Dmanual (myFilename));
|
||||
Handle(Graphic3d_Texture2Dmanual) aTexture = new Graphic3d_Texture2Dmanual (myFilename);
|
||||
aTexture->DisableModulate();
|
||||
myDrawer->ShadingAspect()->Aspect()->SetTextureMap (aTexture);
|
||||
myDrawer->ShadingAspect()->Aspect()->SetTextureMapOn();
|
||||
}
|
||||
|
@@ -139,7 +139,7 @@ add_library ( mfcsample ${mfcsample_SOURCE_FILES}
|
||||
${COMMON_ISESSION2D_SOURCE_FILES}
|
||||
${COMMON_RESOURCE_FILES})
|
||||
|
||||
set_property (TARGET mfcsample PROPERTY FOLDER Samples)
|
||||
set_property (TARGET mfcsample PROPERTY FOLDER "Samples/mfc")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (TARGETS mfcsample
|
||||
|
5
samples/qt/AndroidQt/AndroidQt0.pro
Normal file
@@ -0,0 +1,5 @@
|
||||
TEMPLATE=subdirs
|
||||
|
||||
SUBDIRS=AndroidQt0
|
||||
|
||||
AndroidQt0.file=AndroidQt.pro
|
@@ -4,9 +4,6 @@ DEPENDPATH += $$_PRO_FILE_PWD_/occt/inc $$_PRO_FILE_PWD_/3rdparty/include
|
||||
|
||||
DEFINES += OCC_CONVERT_SIGNALS
|
||||
|
||||
QMAKE_CFLAGS += -fexceptions -Wno-ignored-qualifiers
|
||||
QMAKE_CXXFLAGS += -fexceptions -Wno-ignored-qualifiers
|
||||
|
||||
CONFIG(debug,debug|release) {
|
||||
DEFINES += DEB
|
||||
}
|
||||
@@ -16,9 +13,19 @@ occt_lib_subpath = libs/armeabi-v7a
|
||||
occt_lib_path = $$_PRO_FILE_PWD_/occt/$$occt_lib_subpath
|
||||
3rdparty_lib_path = $$_PRO_FILE_PWD_/3rdparty/$$occt_lib_subpath
|
||||
|
||||
android {
|
||||
QMAKE_CFLAGS += -fexceptions -Wno-ignored-qualifiers
|
||||
QMAKE_CXXFLAGS += -fexceptions -Wno-ignored-qualifiers
|
||||
LIBS += -L$$occt_lib_path -lEGL
|
||||
}
|
||||
win32 {
|
||||
QMAKE_CXXFLAGS_WARN_ON += -W4
|
||||
INCLUDEPATH += $$(CSF_OCCTIncludePath)
|
||||
LIBS += -L$(CSF_OCCTLibPath);$(CSF_PRODLibPath)
|
||||
LIBS += -lopengl32
|
||||
}
|
||||
|
||||
LIBS += -L$$occt_lib_path \
|
||||
-lTKernel \
|
||||
LIBS += -lTKernel \
|
||||
-lTKMath \
|
||||
-lTKG2d \
|
||||
-lTKG3d \
|
||||
@@ -31,8 +38,7 @@ LIBS += -L$$occt_lib_path \
|
||||
-lTKMesh \
|
||||
-lTKHLR \
|
||||
-lTKV3d \
|
||||
-lTKOpenGl \
|
||||
-lEGL
|
||||
-lTKOpenGl
|
||||
|
||||
# IMPORTANT. load libraries in a proper order
|
||||
ANDROID_EXTRA_LIBS = $$3rdparty_lib_path/libfreeimage.so \
|
||||
|
@@ -14,9 +14,9 @@ Requirements for building sample:
|
||||
* Android NDK r9d or newer
|
||||
* Apache Ant 1.9.4 or higher
|
||||
* OCCT compiled under Android platform and placed in directories:
|
||||
* occt\libs\armeabi-v7a\*.so and occt\inc\*.hxx (libraries and include files of OCCT install)
|
||||
* android\assets\opencascade\shared\Shaders\* (Shaders folder of OCCT install: \share\opencascade\resources\Shaders)
|
||||
* 3rdparty\include\freetype2\*, 3rdparty\include\FreeImage.h and 3rdparty\libs\armeabi-v7a\libFreeImage.so and 3rdparty\libs\armeabi-v7a\libfreetype.so
|
||||
* occt/libs/armeabi-v7a/*.so and occt/inc/*.hxx (libraries and include files of OCCT install)
|
||||
* android/assets/opencascade/shared/Shaders/* (Shaders folder of OCCT install: /share/opencascade/resources/Shaders)
|
||||
* 3rdparty/include/freetype2/*, 3rdparty/include/FreeImage.h and 3rdparty/libs/armeabi-v7a/libFreeImage.so and 3rdparty/libs/armeabi-v7a/libfreetype.so
|
||||
|
||||
It is also possible to to correct OCCT.pri file an get resources from another tree of directories.
|
||||
|
||||
|
4
samples/qt/AndroidQt/custom.bat
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
rem Define QTDIR variable
|
||||
|
||||
set "QTDIR="
|
10
samples/qt/AndroidQt/env.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
@echo off
|
||||
|
||||
call "%~dp0..\..\..\env.bat" %1 %2 %3
|
||||
|
||||
call "custom.bat" %1 %2 %3
|
||||
|
||||
set "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
|
||||
set "CSF_ResourcesDefaults=%RES_DIR%"
|
||||
|
||||
set "PATH=%QTDIR%/bin;%PATH%"
|
11
samples/qt/AndroidQt/genproj.bat
Normal file
@@ -0,0 +1,11 @@
|
||||
@echo off
|
||||
REM Generation of vcproj files with qmake utilite
|
||||
REM Variable QTDIR and PATH to qmake executable must be defined without fail
|
||||
|
||||
REM Use first argument to specify version of Visual Studio (vc10, vc11, vc12 or vc14),
|
||||
REM second argument specifies architecture) (win32 or win64)
|
||||
REM third argument specifies Debug or Release mode
|
||||
|
||||
call "%~dp0env.bat" %1 %2 %3
|
||||
call "%VCVARS%" %VCARCH%
|
||||
qmake -tp vc -r -o AndroidQt.sln AndroidQt0.pro
|
19
samples/qt/AndroidQt/msvc.bat
Normal file
@@ -0,0 +1,19 @@
|
||||
@echo off
|
||||
|
||||
Setlocal EnableDelayedExpansion
|
||||
|
||||
rem Setup environment
|
||||
call "%~dp0env.bat" %1 %2 %3
|
||||
|
||||
rem Define path to project file
|
||||
set "PRJFILE=%~dp0AndroidQt.sln"
|
||||
|
||||
rem Launch Visual Studio - either professional (devenv) or Express, as available
|
||||
if exist "%DevEnvDir%\devenv.exe" (
|
||||
start "" "%DevEnvDir%\devenv.exe" "%PRJFILE%"
|
||||
) else if exist "%DevEnvDir%\%VisualStudioExpressName%.exe" (
|
||||
start "" "%DevEnvDir%\%VisualStudioExpressName%.exe" "%PRJFILE%"
|
||||
) else (
|
||||
echo Error: Could not find MS Visual Studio ^(%VCVER%^)
|
||||
echo Check relevant environment variable ^(e.g. VS100COMNTOOLS for vc10^)
|
||||
)
|
@@ -34,7 +34,10 @@
|
||||
#include <WNT_Window.hxx>
|
||||
|
||||
#include <EGL/egl.h>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QFileInfo>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : AndroidQt
|
||||
@@ -218,8 +221,8 @@ void AndroidQt::paint()
|
||||
|
||||
if (Abs (myTouchPoint.DevX()) + Abs (myTouchPoint.DevY()) > 1)
|
||||
{
|
||||
myView->StartRotation (myTouchPoint.X().first, myTouchPoint.Y().first);
|
||||
myView->Rotation (myTouchPoint.X().second, myTouchPoint.Y().second);
|
||||
myView->StartRotation ((Standard_Integer)myTouchPoint.X().first, (Standard_Integer)myTouchPoint.Y().first);
|
||||
myView->Rotation ((Standard_Integer)myTouchPoint.X().second, (Standard_Integer)myTouchPoint.Y().second);
|
||||
|
||||
myTouchPoint.ClearDev();
|
||||
}
|
||||
|
@@ -16,19 +16,20 @@
|
||||
|
||||
#include <OpenGl_Context.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
// workaround broken definitions in Qt
|
||||
#define GLdouble GLdouble
|
||||
|
||||
#include <QMutex>
|
||||
#include <QtQuick/qquickwindow.h>
|
||||
#include <QtQuick/QQuickItem>
|
||||
|
||||
#undef GLdouble
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <V3d_View.hxx>
|
||||
|
||||
#include <QMutex>
|
||||
|
||||
#include "AndroidQt_TouchParameters.h"
|
||||
|
||||
//! QML item with embedded OCCT viewer.
|
||||
|
@@ -14,7 +14,9 @@
|
||||
#ifndef ANDROIDQT_TOUCHPARAMETERS_H
|
||||
#define ANDROIDQT_TOUCHPARAMETERS_H
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QPair>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
//! Class holding touch event state.
|
||||
class AndroidQt_TouchParameters
|
||||
|
@@ -11,8 +11,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include "AndroidQt.h"
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
#include "DocumentCommon.h"
|
||||
#include "View.h"
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QFrame>
|
||||
#include <QVBoxLayout>
|
||||
#include <QMenuBar>
|
||||
@@ -12,6 +13,7 @@
|
||||
#include <QMessageBox>
|
||||
#include <QApplication>
|
||||
#include <QSignalMapper>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <Graphic3d_GraphicDriver.hxx>
|
||||
#include <OpenGl_GraphicDriver.hxx>
|
||||
|
@@ -3,12 +3,14 @@
|
||||
|
||||
#include "DocumentCommon.h"
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QMainWindow>
|
||||
#include <QAction>
|
||||
#include <QToolBar>
|
||||
#include <QMenu>
|
||||
#include <QMdiArea>
|
||||
#include <QList>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
|
||||
class COMMONSAMPLE_EXPORT ApplicationCommonWindow: public QMainWindow
|
||||
|
@@ -134,10 +134,6 @@
|
||||
<source>ICON_TOOL_SHADOWS</source>
|
||||
<translation>shadows.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ICON_TOOL_RAYTRACING</source>
|
||||
<translation>shadows.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ICON_TOOL_REFLECTIONS</source>
|
||||
<translation>reflections.png</translation>
|
||||
|
@@ -4,10 +4,12 @@
|
||||
#include "Transparency.h"
|
||||
#include "Material.h"
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QStatusBar>
|
||||
#include <QApplication>
|
||||
#include <QColor>
|
||||
#include <QColorDialog>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <Aspect_DisplayConnection.hxx>
|
||||
#include <AIS_InteractiveObject.hxx>
|
||||
@@ -188,7 +190,8 @@ void DocumentCommon::onColor()
|
||||
{
|
||||
Quantity_Color aShapeColor;
|
||||
myContext->Color( Current, aShapeColor );
|
||||
aColor.setRgb( aShapeColor.Red() * 255, aShapeColor.Green() * 255, aShapeColor.Blue() * 255 );
|
||||
aColor.setRgb( (Standard_Integer)(aShapeColor.Red() * 255), (Standard_Integer)(aShapeColor.Green() * 255),
|
||||
(Standard_Integer)(aShapeColor.Blue() * 255));
|
||||
}
|
||||
else
|
||||
aColor.setRgb( 255, 255, 255 );
|
||||
|
@@ -4,8 +4,10 @@
|
||||
#include "MDIWindow.h"
|
||||
//#include "IESample.h"
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <V3d_Viewer.hxx>
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "DocumentCommon.h"
|
||||
#include "ApplicationCommon.h"
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QFrame>
|
||||
#include <QToolBar>
|
||||
#include <QFileDialog>
|
||||
@@ -14,6 +15,7 @@
|
||||
#include <QFileInfo>
|
||||
#include <QMainWindow>
|
||||
#include <QVBoxLayout>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
MDIWindow::MDIWindow(View* aView,
|
||||
DocumentCommon* aDocument,
|
||||
|
@@ -1,7 +1,10 @@
|
||||
#ifndef MDIWINDOW_H
|
||||
#define MDIWINDOW_H
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QMainWindow>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include "CommonSample.h"
|
||||
|
||||
class DocumentCommon;
|
||||
|
@@ -1,8 +1,10 @@
|
||||
#include "Material.h"
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QPushButton>
|
||||
#include <QLayout>
|
||||
#include <QSignalMapper>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <Graphic3d_NameOfMaterial.hxx>
|
||||
|
||||
|
@@ -1,9 +1,11 @@
|
||||
#ifndef MATERIAL_H
|
||||
#define MATERIAL_H
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QDialog>
|
||||
#include <QList>
|
||||
#include <QPushButton>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
|
||||
|
@@ -3,7 +3,10 @@
|
||||
|
||||
#include <Aspect_Window.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
class OcctWindow;
|
||||
|
||||
/*
|
||||
|
@@ -1,7 +1,9 @@
|
||||
#include "Transparency.h"
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QHBoxLayout>
|
||||
#include <QSpinBox>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
DialogTransparency::DialogTransparency( QWidget* parent, Qt::WindowFlags f, bool modal )
|
||||
: QDialog( parent, f )
|
||||
|
@@ -1,5 +1,8 @@
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QDialog>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
|
||||
class DialogTransparency : public QDialog
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include "View.h"
|
||||
#include "ApplicationCommon.h"
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QApplication>
|
||||
#include <QPainter>
|
||||
#include <QMenu>
|
||||
@@ -19,6 +20,7 @@
|
||||
#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && QT_VERSION < 0x050000
|
||||
#include <QX11Info>
|
||||
#endif
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
|
||||
#include <Graphic3d_ExportFormat.hxx>
|
||||
@@ -997,7 +999,7 @@ void View::onBackground()
|
||||
Standard_Real G1;
|
||||
Standard_Real B1;
|
||||
myView->BackgroundColor(Quantity_TOC_RGB,R1,G1,B1);
|
||||
aColor.setRgb(R1*255,G1*255,B1*255);
|
||||
aColor.setRgb((Standard_Integer)(R1 * 255), (Standard_Integer)(G1 * 255), (Standard_Integer)(B1 * 255));
|
||||
|
||||
QColor aRetColor = QColorDialog::getColor(aColor);
|
||||
|
||||
|
@@ -1,9 +1,11 @@
|
||||
#ifndef VIEW_H
|
||||
#define VIEW_H
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QWidget>
|
||||
#include <QAction>
|
||||
#include <QList>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <V3d_View.hxx>
|
||||
|
@@ -3,3 +3,7 @@ project(FuncDemo)
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_sample)
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit)
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_sample)
|
||||
|
||||
if (BUILD_Inspector)
|
||||
target_link_libraries (FuncDemo TKTInspector)
|
||||
endif()
|
||||
|
@@ -19,24 +19,24 @@ FThread::~FThread()
|
||||
|
||||
}
|
||||
|
||||
void FThread::setIterator(const TFunction_Iterator& itr)
|
||||
void FThread::setIterator(const TFunction_Iterator& theItr)
|
||||
{
|
||||
this->itr = itr;
|
||||
this->itr = theItr;
|
||||
}
|
||||
|
||||
void FThread::setLogbook(const Handle(TFunction_Logbook)& log)
|
||||
void FThread::setLogbook(const Handle(TFunction_Logbook)& theLog)
|
||||
{
|
||||
this->log = log;
|
||||
this->log = theLog;
|
||||
}
|
||||
|
||||
void FThread::setGraph(GraphWidget* graph)
|
||||
void FThread::setGraph(GraphWidget* theGraph)
|
||||
{
|
||||
this->graph = graph;
|
||||
this->graph = theGraph;
|
||||
}
|
||||
|
||||
void FThread::setThreadIndex(const int thread_index)
|
||||
void FThread::setThreadIndex(const int theIndex)
|
||||
{
|
||||
this->thread_index = thread_index;
|
||||
this->thread_index = theIndex;
|
||||
}
|
||||
|
||||
// Returns any free (not executed yet) function
|
||||
|
@@ -1,7 +1,9 @@
|
||||
#ifndef _FTHREAD_H_
|
||||
#define _FTHREAD_H_
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QThread>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <TFunction_Logbook.hxx>
|
||||
#include <TFunction_Iterator.hxx>
|
||||
|
@@ -38,7 +38,9 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QPainter>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include "edge.h"
|
||||
#include "node.h"
|
||||
|
@@ -41,7 +41,9 @@
|
||||
#ifndef EDGE_H
|
||||
#define EDGE_H
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QGraphicsItem>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
class Node;
|
||||
|
||||
|
@@ -42,10 +42,12 @@
|
||||
#include "edge.h"
|
||||
#include "node.h"
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QDebug>
|
||||
#include <QGraphicsScene>
|
||||
#include <QWheelEvent>
|
||||
#include <QApplication>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
@@ -41,7 +41,9 @@
|
||||
#ifndef GRAPHWIDGET_H
|
||||
#define GRAPHWIDGET_H
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QGraphicsView>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include "FThread.h"
|
||||
|
||||
|
@@ -38,7 +38,9 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QApplication>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <OSD_Environment.hxx>
|
||||
|
@@ -38,12 +38,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtGlobal>
|
||||
#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "graphwidget.h"
|
||||
#include "node.h"
|
||||
@@ -77,10 +71,24 @@
|
||||
#include <TDataStd_Name.hxx>
|
||||
#include <TDataStd_Real.hxx>
|
||||
#include <TDataStd_RealArray.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QtGui>
|
||||
#include <QtGlobal>
|
||||
#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_Inspector
|
||||
#include <inspector/TInspector_Communicator.hxx>
|
||||
static TInspector_Communicator* MyTCommunicator;
|
||||
#endif
|
||||
|
||||
MainWindow::MainWindow()
|
||||
{
|
||||
graph = new GraphWidget(this);
|
||||
@@ -221,6 +229,30 @@ void MainWindow::nbThreads()
|
||||
graph->setNbThreads(nb);
|
||||
}
|
||||
|
||||
#ifdef HAVE_Inspector
|
||||
void MainWindow::startDFBrowser()
|
||||
{
|
||||
Handle(AppStd_Application) anApplication = getApplication();
|
||||
if (!anApplication.IsNull())
|
||||
{
|
||||
if (!MyTCommunicator)
|
||||
{
|
||||
MyTCommunicator = new TInspector_Communicator();
|
||||
|
||||
NCollection_List<Handle(Standard_Transient)> aParameters;
|
||||
aParameters.Append(anApplication);
|
||||
|
||||
MyTCommunicator->RegisterPlugin("TKDFBrowser");
|
||||
|
||||
MyTCommunicator->Init(aParameters);
|
||||
MyTCommunicator->Activate("TKDFBrowser");
|
||||
|
||||
}
|
||||
MyTCommunicator->SetVisible(true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void MainWindow::about()
|
||||
{
|
||||
QMessageBox::about(this, tr("Test-application of the advanced Function Mechanism"),
|
||||
@@ -247,6 +279,12 @@ void MainWindow::createActions()
|
||||
nbThreadsAct->setStatusTip(tr("Number of threads"));
|
||||
connect(nbThreadsAct, SIGNAL(triggered()), this, SLOT(nbThreads()));
|
||||
|
||||
#ifdef HAVE_Inspector
|
||||
dfBrowserAct = new QAction(tr("DFBrowser"), this);
|
||||
dfBrowserAct->setStatusTip(tr("OCAF structure presentation"));
|
||||
connect(dfBrowserAct, SIGNAL(triggered()), this, SLOT(startDFBrowser()));
|
||||
#endif
|
||||
|
||||
exitAct = new QAction(tr("E&xit"), this);
|
||||
exitAct->setShortcut(tr("Ctrl+Q"));
|
||||
exitAct->setStatusTip(tr("Exit the application"));
|
||||
@@ -266,6 +304,10 @@ void MainWindow::createMenus()
|
||||
computeMenu->addAction(computeAct);
|
||||
computeMenu->addAction(nbThreadsAct);
|
||||
computeMenu->addSeparator();
|
||||
#ifdef HAVE_Inspector
|
||||
computeMenu->addAction(dfBrowserAct);
|
||||
computeMenu->addSeparator();
|
||||
#endif
|
||||
computeMenu->addAction(exitAct);
|
||||
|
||||
menuBar()->addSeparator();
|
||||
|
@@ -41,7 +41,10 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QMainWindow>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <AppStd_Application.hxx>
|
||||
|
||||
class QAction;
|
||||
@@ -67,6 +70,9 @@ private slots:
|
||||
void model2();
|
||||
void compute();
|
||||
void nbThreads();
|
||||
#ifdef HAVE_Inspector
|
||||
void startDFBrowser();
|
||||
#endif
|
||||
void about();
|
||||
|
||||
private:
|
||||
@@ -84,6 +90,9 @@ private:
|
||||
QAction *model2Act;
|
||||
QAction *computeAct;
|
||||
QAction *nbThreadsAct;
|
||||
#ifdef HAVE_Inspector
|
||||
QAction *dfBrowserAct;
|
||||
#endif
|
||||
QAction *exitAct;
|
||||
QAction *aboutAct;
|
||||
|
||||
|