mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
fd4af9bf4e | ||
|
d404757de0 |
@@ -1,31 +0,0 @@
|
||||
Instruction for building OCCT for ASRV
|
||||
======================================
|
||||
|
||||
Build using regular native compiler
|
||||
-----------------------------------
|
||||
|
||||
1. Make sure the directory 3rdparty is next to occt. It must contain the following products:
|
||||
freetype
|
||||
tcltk
|
||||
2. Change current directory to adm/scripts.
|
||||
3. On Windows run the script cmake_gen.bat.
|
||||
On Linux run 'cmake_gen.sh' for release build and 'cmake_gen.sh -d' for debug build.
|
||||
4. Go to build directory and build and install OCCT.
|
||||
On Windows run:
|
||||
build.bat
|
||||
build.bat vc14 64 d
|
||||
install.bat
|
||||
install.bat vc14 64 d
|
||||
On Linux run:
|
||||
make -j4 install
|
||||
|
||||
Build using Emscripten to generate libs for Web assembly
|
||||
--------------------------------------------------------
|
||||
|
||||
1. Make sure you have installed Emscripten. For that you can make sure occ-web3d directory
|
||||
is next to occt. It must contain fips\fips-sdks\emsdk.
|
||||
2. Make sure the directory 3rdparty is next to occt. It must contain the following products:
|
||||
freetype wasm build
|
||||
3. Change current directory to adm/scripts.
|
||||
4. Run the script wasm_build.bat (wasm_build.sh on Linux).
|
||||
5. Copy installed files from work/wasm to the 3rdparty under occt77-wasm.
|
@@ -3,6 +3,10 @@
|
||||
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
if (NOT DEFINED INSTALL_DRACO)
|
||||
set (INSTALL_DRACO OFF CACHE BOOL "${INSTALL_DRACO_DESCR}")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DRACO_DIR)
|
||||
set (3RDPARTY_DRACO_DIR "" CACHE PATH "The directory containing Draco")
|
||||
endif()
|
||||
@@ -11,24 +15,14 @@ if (NOT DEFINED 3RDPARTY_DRACO_INCLUDE_DIR)
|
||||
set (3RDPARTY_DRACO_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the Draco")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY)
|
||||
set (3RDPARTY_DRACO_LIBRARY "" CACHE FILEPATH "Draco library")
|
||||
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY OR NOT 3RDPARTY_DRACO_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY_DIR}")
|
||||
set (3RDPARTY_DRACO_LIBRARY "" CACHE FILEPATH "Draco library" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DIR)
|
||||
set (3RDPARTY_DRACO_LIBRARY_DIR "" CACHE PATH "The directory containing Draco library")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DEBUG)
|
||||
set (3RDPARTY_DRACO_LIBRARY_DEBUG "" CACHE FILEPATH "Draco debug library")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DIR_DEBUG)
|
||||
set (3RDPARTY_DRACO_LIBRARY_DIR_DEBUG "" CACHE PATH "The directory containing Draco debug library")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
||||
if (NOT 3RDPARTY_DRACO_DIR OR NOT EXISTS "${3RDPARTY_DRACO_DIR}")
|
||||
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" draco DRACO_DIR_NAME)
|
||||
@@ -38,19 +32,20 @@ if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# header
|
||||
if (NOT 3RDPARTY_DRACO_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_DRACO_INCLUDE_DIR}")
|
||||
set (HEADER_NAMES draco)
|
||||
if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
|
||||
set (DRACO_INCLUDE_PATH "${3RDPARTY_DRACO_DIR}/include")
|
||||
set (DRACO_LIBRARY_PATH "${3RDPARTY_DRACO_DIR}/lib")
|
||||
endif()
|
||||
|
||||
# set 3RDPARTY_DRACO_INCLUDE_DIR as notfound, otherwise find_path can't assign a new value to 3RDPARTY_DRACO_INCLUDE_DIR
|
||||
set (3RDPARTY_DRACO_INCLUDE_DIR "3RDPARTY_DRACO_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "The directory containing headers of the Draco" FORCE)
|
||||
if (NOT 3RDPARTY_DRACO_INCLUDE_DIR)
|
||||
if (DRACO_INCLUDE_PATH AND EXISTS "${DRACO_INCLUDE_PATH}")
|
||||
set (3RDPARTY_DRACO_INCLUDE_DIR "${DRACO_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of DRACO" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
|
||||
find_path (3RDPARTY_DRACO_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
||||
PATHS ${3RDPARTY_DRACO_DIR}
|
||||
PATH_SUFFIXES "include"
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
if (NOT 3RDPARTY_DRACO_LIBRARY_DIR)
|
||||
if (DRACO_LIBRARY_PATH AND EXISTS "${DRACO_LIBRARY_PATH}")
|
||||
set (3RDPARTY_DRACO_LIBRARY_DIR "${DRACO_LIBRARY_PATH}" CACHE FILEPATH "The directory containing DRACO library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -62,11 +57,11 @@ endif()
|
||||
|
||||
if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
|
||||
if (NOT 3RDPARTY_DRACO_LIBRARY OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY}")
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .a)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
|
||||
set (3RDPARTY_DRACO_LIBRARY "3RDPARTY_DRACO_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to Draco library" FORCE)
|
||||
|
||||
find_library (3RDPARTY_DRACO_LIBRARY NAMES ${CSF_Draco}
|
||||
PATHS "${3RDPARTY_DRACO_DIR}"
|
||||
PATHS "${3RDPARTY_DRACO_LIBRARY_DIR}"
|
||||
PATH_SUFFIXES lib
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
@@ -75,19 +70,27 @@ if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
|
||||
set (3RDPARTY_DRACO_LIBRARY_DIR "${3RDPARTY_DRACO_LIBRARY_DIR}" CACHE FILEPATH "The directory containing Draco library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32 AND (NOT 3RDPARTY_DRACO_LIBRARY_DEBUG OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY_DEBUG}"))
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .a)
|
||||
set (3RDPARTY_DRACO_LIBRARY_DEBUG "3RDPARTY_DRACO_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "The path to debug Draco library" FORCE)
|
||||
if (3RDPARTY_DRACO_LIBRARY_DIR AND EXISTS "${3RDPARTY_DRACO_LIBRARY_DIR}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_DRACO_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_DRACO_LIBRARY_DIR)
|
||||
endif()
|
||||
|
||||
find_library (3RDPARTY_DRACO_LIBRARY_DEBUG NAMES ${CSF_Draco}
|
||||
PATHS "${3RDPARTY_DRACO_DIR}"
|
||||
PATH_SUFFIXES libd
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
if (3RDPARTY_DRACO_LIBRARY_DEBUG AND EXISTS "${3RDPARTY_DRACO_LIBRARY_DEBUG}")
|
||||
get_filename_component (3RDPARTY_DRACO_LIBRARY_DIR_DEBUG "${3RDPARTY_DRACO_LIBRARY_DEBUG}" PATH)
|
||||
set (3RDPARTY_DRACO_LIBRARY_DIR_DEBUG "${3RDPARTY_DRACO_LIBRARY_DIR_DEBUG}" CACHE FILEPATH "The directory containing debug Draco library" FORCE)
|
||||
endif()
|
||||
if (INSTALL_DRACO)
|
||||
get_filename_component(3RDPARTY_DRACO_LIBRARY_REALPATH ${3RDPARTY_DRACO_LIBRARY} REALPATH)
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR_LIB}")
|
||||
install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_LIB}i")
|
||||
install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_LIB}d")
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -370,10 +370,6 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
|
||||
add_definitions (-DHAVE_GLES2)
|
||||
endif()
|
||||
|
||||
if ("${CURRENT_CSF}" STREQUAL "${CSF_Draco}")
|
||||
set (CURRENT_CSF "")
|
||||
set (USED_DRACO 1)
|
||||
endif()
|
||||
set (LIBRARY_FROM_CACHE 0)
|
||||
separate_arguments (CURRENT_CSF)
|
||||
foreach (CSF_LIBRARY ${CURRENT_CSF})
|
||||
@@ -401,7 +397,7 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
if (NOT ${LIBRARY_FROM_CACHE} AND NOT "${CURRENT_CSF}" STREQUAL "")
|
||||
if (NOT ${LIBRARY_FROM_CACHE})
|
||||
# prepare a list from a string with whitespaces
|
||||
separate_arguments (CURRENT_CSF)
|
||||
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
|
||||
@@ -412,28 +408,6 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (USE_DRACO)
|
||||
if (USED_DRACO)
|
||||
set (USED_LIB_RELEASE ${3RDPARTY_DRACO_LIBRARY})
|
||||
if (WIN32)
|
||||
set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY_DEBUG})
|
||||
else()
|
||||
set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY})
|
||||
endif()
|
||||
set (USED_LIB_CONF)
|
||||
if (EXISTS ${USED_LIB_DEBUG})
|
||||
set (USED_LIB_CONF "$<$<CONFIG:DEBUG>:${USED_LIB_DEBUG}>;${USED_LIB_CONF}")
|
||||
endif()
|
||||
if (EXISTS ${USED_LIB_RELEASE})
|
||||
set (USED_LIB_CONF "$<$<CONFIG:RELEASE>:${USED_LIB_RELEASE}>;${USED_LIB_CONF}")
|
||||
set (USED_LIB_CONF "$<$<CONFIG:RELWITHDEBINFO>:${USED_LIB_RELEASE}>;${USED_LIB_CONF}")
|
||||
endif()
|
||||
if (DEFINED USED_LIB_CONF)
|
||||
set_property (TARGET ${PROJECT_NAME} APPEND PROPERTY LINK_LIBRARIES "${USED_LIB_CONF}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
|
||||
if (NOT ${IS_X11_FOUND} EQUAL -1)
|
||||
|
2
adm/scripts/.gitignore
vendored
Normal file
2
adm/scripts/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*custom.bat
|
||||
*custom.sh
|
@@ -1,50 +0,0 @@
|
||||
rem Environment configuration template for cmake_gen.bat (to be renamed as cmake_gen_custom.bat)
|
||||
|
||||
set "OCCT3RDPARTY=%SrcRoot%\..\3rdparty"
|
||||
|
||||
set VS=14
|
||||
set VSDATA=2015
|
||||
|
||||
rem Leave VSPLATFORM empty to build for x86 platform
|
||||
set VSPLATFORM=Win64
|
||||
|
||||
rem ------------------------------------
|
||||
rem Uncomment to customize building steps
|
||||
rem ------------------------------------
|
||||
|
||||
rem set "BUILD_DIR=build-vs%VS%-%VSPLATFORM%"
|
||||
set "INSTALL_DIR=%SrcRoot%\..\3rdparty\occt77-vc14-64"
|
||||
|
||||
set BUILD_CPP_STANDARD=C++14
|
||||
|
||||
rem set BUILD_DOC_Overview=OFF
|
||||
rem set BUILD_Inspector=OFF
|
||||
rem set BUILD_LIBRARY_TYPE=Shared
|
||||
rem set BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
|
||||
rem set BUILD_WITH_DEBUG=OFF
|
||||
rem set BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
|
||||
rem set BUILD_USE_PCH=OFF
|
||||
rem set BUILD_FORCE_RelWithDebInfo=OFF
|
||||
|
||||
rem Use semicolon-separated list of toolkits if you want to disable all modules
|
||||
rem and build only some toolkits.
|
||||
rem set BUILD_ADDITIONAL_TOOLKITS=
|
||||
|
||||
rem Set a directory recognized as a patch for OCCT.
|
||||
rem set BUILD_PATCH=
|
||||
|
||||
rem set BUILD_MODULE_ApplicationFramework=ON
|
||||
rem set BUILD_MODULE_DataExchange=ON
|
||||
rem set BUILD_MODULE_Draw=ON
|
||||
rem set BUILD_MODULE_ModelingAlgorithms=ON
|
||||
rem set BUILD_MODULE_ModelingData=ON
|
||||
rem set BUILD_MODULE_Visualization=ON
|
||||
|
||||
rem set USE_D3D=OFF
|
||||
rem set USE_FFMPEG=OFF
|
||||
set USE_FREEIMAGE=ON
|
||||
rem set USE_GLES2=OFF
|
||||
set USE_RAPIDJSON=ON
|
||||
rem set USE_DRACO=OFF
|
||||
rem set USE_TBB=OFF
|
||||
rem set USE_VTK=OFF
|
@@ -1,45 +0,0 @@
|
||||
# Environment configuration template for cmake_gen.sh (to be renamed as cmake_gen_custom.sh)
|
||||
|
||||
OCCT3RDPARTY="$SrcRoot/../3rdparty"
|
||||
FREETYPE_DIR="$OCCT3RDPARTY/freetype-2.7.1"
|
||||
|
||||
# ------------------------------------
|
||||
# Uncomment to customize building steps
|
||||
# ------------------------------------
|
||||
|
||||
#BUILD_DIR=build
|
||||
INSTALL_DIR="$SrcRoot/../3rdparty/occt77"
|
||||
|
||||
BUILD_CPP_STANDARD=C++14
|
||||
|
||||
#BUILD_DOC_Overview=OFF
|
||||
#BUILD_Inspector=OFF
|
||||
#BUILD_LIBRARY_TYPE=Shared
|
||||
#BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
|
||||
#BUILD_WITH_DEBUG=OFF
|
||||
#BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
|
||||
|
||||
# Use semicolon-separated list of toolkits if you want to disable all modules
|
||||
# and build only some toolkits.
|
||||
#BUILD_ADDITIONAL_TOOLKITS=
|
||||
|
||||
# Set a directory recognized as a patch for OCCT.
|
||||
#BUILD_PATCH=
|
||||
|
||||
#BUILD_MODULE_ApplicationFramework=ON
|
||||
#BUILD_MODULE_DataExchange=ON
|
||||
#BUILD_MODULE_Draw=ON
|
||||
#BUILD_MODULE_ModelingAlgorithms=ON
|
||||
#BUILD_MODULE_ModelingData=ON
|
||||
#BUILD_MODULE_Visualization=ON
|
||||
|
||||
#USE_FFMPEG=OFF
|
||||
USE_FREEIMAGE=ON
|
||||
#USE_GLES2=OFF
|
||||
USE_RAPIDJSON=ON
|
||||
#USE_DRACO=OFF
|
||||
#USE_TBB=OFF
|
||||
#USE_VTK=OFF
|
||||
|
||||
# This is to add any additional arguments to cmake
|
||||
#AUX_ARGS=
|
@@ -15,8 +15,6 @@ set "BUILD_DIR=build-vs%VS%-%VSPLATFORM%"
|
||||
set "OCCT3RDPARTY="
|
||||
set "INSTALL_DIR=%SrcRoot%\install"
|
||||
|
||||
set BUILD_CPP_STANDARD=C++11
|
||||
|
||||
set BUILD_ADDITIONAL_TOOLKITS=
|
||||
set BUILD_DOC_Overview=OFF
|
||||
set BUILD_Inspector=OFF
|
||||
@@ -57,7 +55,6 @@ if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
|
||||
pushd "%BUILD_DIR%"
|
||||
|
||||
cmake -G "%arch_compile%" ^
|
||||
-D BUILD_CPP_STANDARD:STRING="%BUILD_CPP_STANDARD%" ^
|
||||
-D 3RDPARTY_DIR:STRING="%OCCT3RDPARTY%" ^
|
||||
-D BUILD_ADDITIONAL_TOOLKITS:STRING="%BUILD_ADDITIONAL_TOOLKITS%" ^
|
||||
-D BUILD_DOC_Overview:BOOL=%BUILD_DOC_Overview% ^
|
||||
|
@@ -14,13 +14,12 @@ DEB=
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
if [ "$1" = "-d" ]; then
|
||||
DEB=d
|
||||
BUILD_DIR=${BUILD_DIR}-deb
|
||||
CMAKE_BUILD_TYPE=Debug
|
||||
fi
|
||||
INSTALL_DIR_BIN=lin64/gcc/bin$DEB
|
||||
INSTALL_DIR_LIB=lin64/gcc/lib$DEB
|
||||
|
||||
BUILD_CPP_STANDARD=C++11
|
||||
|
||||
BUILD_ADDITIONAL_TOOLKITS=
|
||||
BUILD_DOC_Overview=OFF
|
||||
BUILD_Inspector=OFF
|
||||
@@ -55,7 +54,6 @@ if [ ! -d "$BUILD_DIR" ]; then mkdir -p "$BUILD_DIR"; fi
|
||||
pushd "$BUILD_DIR"
|
||||
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D BUILD_CPP_STANDARD:STRING="$BUILD_CPP_STANDARD" \
|
||||
-D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
|
||||
-D 3RDPARTY_DIR:PATH="$OCCT3RDPARTY" \
|
||||
-D 3RDPARTY_FREETYPE_DIR:PATH="$FREETYPE_DIR" \
|
||||
|
@@ -26,12 +26,6 @@ set "toDebug=0"
|
||||
set "toBuildSample=0"
|
||||
set "sourceMapBase="
|
||||
|
||||
set "aBuildType=Release"
|
||||
if /I ["%1"] == ["-d"] (
|
||||
set "toDebug=1"
|
||||
set "aBuildType=Debug"
|
||||
)
|
||||
|
||||
rem OCCT Modules to build
|
||||
set "BUILD_ModelingData=ON"
|
||||
set "BUILD_ModelingAlgorithms=ON"
|
||||
@@ -50,38 +44,9 @@ rem Archive tool
|
||||
set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on"
|
||||
set "THE_7Z_PATH=%ProgramW6432%\7-Zip\7z.exe"
|
||||
|
||||
set "aPlatformAndCompiler="
|
||||
set "aWorkDir="
|
||||
set "aDestDir="
|
||||
set "aLogFile="
|
||||
|
||||
set "aSrcRootSmpl=%aCasSrc%\samples\webgl"
|
||||
set "aWorkDirSmpl="
|
||||
set "aDestDirSmpl="
|
||||
set "aLogFileSmpl="
|
||||
|
||||
rem Configuration file
|
||||
if exist "%~dp0wasm_custom.bat" call "%~dp0wasm_custom.bat"
|
||||
|
||||
set "aBuildTypePrefix="
|
||||
set "anExtraCxxFlags="
|
||||
if /I ["%USE_PTHREADS%"] == ["ON"] (
|
||||
set "anExtraCxxFlags=-pthread"
|
||||
set "aBuildTypePrefix=%aBuildTypePrefix%-pthread"
|
||||
)
|
||||
if ["%toDebug%"] == ["1"] (
|
||||
set "aBuildTypePrefix=%aBuildTypePrefix%-debug"
|
||||
)
|
||||
|
||||
if ["%aPlatformAndCompiler%"] == [""] ( set "aPlatformAndCompiler=wasm32%aBuildTypePrefix%" )
|
||||
if ["%aWorkDir%"] == [""] ( set "aWorkDir=%aBuildRoot%\occt-%aPlatformAndCompiler%-make" )
|
||||
if ["%aDestDir%"] == [""] ( set "aDestDir=%aBuildRoot%\occt-%aPlatformAndCompiler%" )
|
||||
if ["%aLogFile%"] == [""] ( set "aLogFile=%aBuildRoot%\occt-%aPlatformAndCompiler%-build.log" )
|
||||
|
||||
if ["%aWorkDirSmpl%"] == [""] ( set "aWorkDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-make" )
|
||||
if ["%aDestDirSmpl%"] == [""] ( set "aDestDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%" )
|
||||
if ["%aLogFileSmpl%"] == [""] ( set "aLogFileSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-build.log" )
|
||||
|
||||
call "%EMSDK_ROOT%\emsdk_env.bat"
|
||||
set "aToolchain=%EMSDK%/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
|
||||
if not ["%aCmakeBin%"] == [""] ( set "PATH=%aCmakeBin%;%PATH%" )
|
||||
@@ -93,8 +58,23 @@ for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_DEVELOP
|
||||
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_COMPLETE" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVersion=%%i" )
|
||||
for /f %%i in ('git symbolic-ref --short HEAD') do ( set "aGitBranch=%%i" )
|
||||
|
||||
set "aBuildType=Release"
|
||||
set "aBuildTypePrefix="
|
||||
set "anExtraCxxFlags="
|
||||
if /I ["%USE_PTHREADS%"] == ["ON"] (
|
||||
set "anExtraCxxFlags=-pthread"
|
||||
set "aBuildTypePrefix=%aBuildTypePrefix%-pthread"
|
||||
)
|
||||
if ["%toDebug%"] == ["1"] (
|
||||
set "aBuildType=Debug"
|
||||
set "aBuildTypePrefix=%aBuildTypePrefix%-debug"
|
||||
)
|
||||
|
||||
call :cmakeGenerate
|
||||
if errorlevel 1 (
|
||||
if not ["%1"] == ["-nopause"] (
|
||||
pause
|
||||
)
|
||||
exit /B 1
|
||||
goto :eof
|
||||
)
|
||||
@@ -128,10 +108,17 @@ if ["%toPack%"] == ["1"] (
|
||||
|
||||
"%THE_7Z_PATH%" a -r %THE_7Z_PARAMS% "%aBuildRoot%/%anArchName%.7z" "%aTarget%"
|
||||
)
|
||||
if not ["%1"] == ["-nopause"] (
|
||||
pause
|
||||
)
|
||||
|
||||
goto :eof
|
||||
|
||||
:cmakeGenerate
|
||||
set "aPlatformAndCompiler=wasm32%aBuildTypePrefix%"
|
||||
set "aWorkDir=%aBuildRoot%\occt-%aPlatformAndCompiler%-make"
|
||||
set "aDestDir=%aBuildRoot%\occt-%aPlatformAndCompiler%"
|
||||
set "aLogFile=%aBuildRoot%\occt-%aPlatformAndCompiler%-build.log"
|
||||
if ["%toCMake%"] == ["1"] (
|
||||
if ["%toClean%"] == ["1"] (
|
||||
rmdir /S /Q %aWorkDir%"
|
||||
@@ -141,6 +128,10 @@ if ["%toCMake%"] == ["1"] (
|
||||
if not exist "%aWorkDir%" ( mkdir "%aWorkDir%" )
|
||||
if exist "%aLogFile%" ( del "%aLogFile%" )
|
||||
|
||||
set "aSrcRootSmpl=%aCasSrc%\samples\webgl"
|
||||
set "aWorkDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-make"
|
||||
set "aDestDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%"
|
||||
set "aLogFileSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-build.log"
|
||||
if ["%toBuildSample%"] == ["1"] (
|
||||
if ["%toCMake%"] == ["1"] (
|
||||
if ["%toClean%"] == ["1"] (
|
||||
@@ -281,6 +272,7 @@ if ["%toCMake%"] == ["1"] (
|
||||
|
||||
if errorlevel 1 (
|
||||
popd
|
||||
pause
|
||||
exit /B
|
||||
goto :eof
|
||||
)
|
||||
@@ -295,6 +287,7 @@ if ["%toMake%"] == ["1"] (
|
||||
if errorlevel 1 (
|
||||
type "%aLogFileSmpl%"
|
||||
popd
|
||||
pause
|
||||
exit /B
|
||||
goto :eof
|
||||
)
|
||||
@@ -306,6 +299,7 @@ if ["%toInstall%"] == ["1"] (
|
||||
if errorlevel 1 (
|
||||
type "%aLogFileSmpl%"
|
||||
popd
|
||||
pause
|
||||
exit /B
|
||||
goto :eof
|
||||
)
|
||||
|
@@ -4,11 +4,6 @@
|
||||
# wasm_custom.sh should be configured with paths to CMake, 3rd-parties and Emscripten SDK.
|
||||
# FreeType should be specified as mandatory dependency.
|
||||
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
if [ "$1" = "-d" ]; then
|
||||
CMAKE_BUILD_TYPE=Debug
|
||||
fi
|
||||
|
||||
export aScriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
export aSrcRoot="${aScriptDir}/../.."
|
||||
export aBuildRoot=work
|
||||
@@ -26,12 +21,6 @@ export BUILD_Visualization=ON
|
||||
export BUILD_ApplicationFramework=ON
|
||||
export BUILD_DataExchange=ON
|
||||
|
||||
export aPlatformAndCompiler=wasm
|
||||
|
||||
export aWorkDir="${aSrcRoot}/${aBuildRoot}/${aPlatformAndCompiler}-make"
|
||||
export aDestDir="${aSrcRoot}/${aBuildRoot}/${aPlatformAndCompiler}"
|
||||
export aLogFile="${aSrcRoot}/${aBuildRoot}/build-${aPlatformAndCompiler}.log"
|
||||
|
||||
if [ -f "${aScriptDir}/wasm_custom.sh" ] ; then
|
||||
. "${aScriptDir}/wasm_custom.sh"
|
||||
fi
|
||||
@@ -44,14 +33,19 @@ export aGitBranch=`git symbolic-ref --short HEAD`
|
||||
|
||||
echo "Compilation OCCT branch : $aGitBranch"
|
||||
|
||||
export aPlatformAndCompiler=wasm
|
||||
|
||||
export aWorkDir="${aSrcRoot}/${aBuildRoot}/${aPlatformAndCompiler}-make"
|
||||
if [ ! -d "${aWorkDir}" ]; then
|
||||
mkdir -p "${aWorkDir}"
|
||||
fi
|
||||
|
||||
export aDestDir="${aSrcRoot}/${aBuildRoot}/${aPlatformAndCompiler}"
|
||||
if [ ! -d "${aDestDir}" ]; then
|
||||
mkdir -p "${aDestDir}"
|
||||
fi
|
||||
|
||||
export aLogFile="${aSrcRoot}/${aBuildRoot}/build-${aPlatformAndCompiler}.log"
|
||||
if [ -f "${aLogFile}" ]; then
|
||||
rm "${aLogFile}"
|
||||
fi
|
||||
@@ -66,14 +60,14 @@ if [ "${toCMake}" = "1" ]; then
|
||||
|
||||
echo "Configuring OCCT for WASM..."
|
||||
echo cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \
|
||||
-DCMAKE_BUILD_TYPE:STRING="$CMAKE_BUILD_TYPE" \
|
||||
-DCMAKE_BUILD_TYPE:STRING="Release" \
|
||||
-DBUILD_LIBRARY_TYPE:STRING="Static" \
|
||||
-DINSTALL_DIR:PATH="${aDestDir}" \
|
||||
-DINSTALL_DIR_INCLUDE:STRING="inc" \
|
||||
-DINSTALL_DIR_RESOURCE:STRING="src" \
|
||||
-D3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \
|
||||
-D3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include/freetype2" \
|
||||
-D3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include/freetype2" \
|
||||
-D3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \
|
||||
-D3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \
|
||||
-DBUILD_MODULE_FoundationClasses:BOOL="ON" \
|
||||
-DBUILD_MODULE_ModelingData:BOOL="${BUILD_ModelingData}" \
|
||||
-DBUILD_MODULE_ModelingAlgorithms:BOOL="${BUILD_ModelingAlgorithms}" \
|
||||
@@ -84,14 +78,14 @@ echo cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \
|
||||
-DBUILD_DOC_Overview:BOOL="OFF" "${aSrcRoot}"
|
||||
|
||||
cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \
|
||||
-DCMAKE_BUILD_TYPE:STRING="$CMAKE_BUILD_TYPE" \
|
||||
-DCMAKE_BUILD_TYPE:STRING="Release" \
|
||||
-DBUILD_LIBRARY_TYPE:STRING="Static" \
|
||||
-DINSTALL_DIR:PATH="${aDestDir}" \
|
||||
-DINSTALL_DIR_INCLUDE:STRING="inc" \
|
||||
-DINSTALL_DIR_RESOURCE:STRING="src" \
|
||||
-D3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \
|
||||
-D3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include/freetype2" \
|
||||
-D3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include/freetype2" \
|
||||
-D3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \
|
||||
-D3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \
|
||||
-DBUILD_MODULE_FoundationClasses:BOOL="ON" \
|
||||
-DBUILD_MODULE_ModelingData:BOOL="${BUILD_ModelingData}" \
|
||||
-DBUILD_MODULE_ModelingAlgorithms:BOOL="${BUILD_ModelingAlgorithms}" \
|
||||
|
@@ -1,30 +0,0 @@
|
||||
rem Environment configuration template for wasm_build.bat (to be renamed as wasm_custom.bat)
|
||||
set "aFreeType=%aCasSrc%\..\3rdparty\freetype-2.7.1-wasm"
|
||||
set "EMSDK_ROOT=%aCasSrc%\..\emsdk"
|
||||
rem set "aRapidJson=%aCasSrc%\..\3rdparty\rapidjson-1.1.0"
|
||||
rem set "aDraco=%aCasSrc%\..\3rdparty\draco-1.4.1-wasm32"
|
||||
rem set "aCmakeBin=%ProgramW6432%\CMake\bin"
|
||||
|
||||
set "aDestDir=%aCasSrc%\..\3rdparty\occt77-wasm"
|
||||
|
||||
rem Uncomment to customize building steps
|
||||
rem set "aBuildRoot=work"
|
||||
rem set "toCMake=1"
|
||||
rem set "toClean=0"
|
||||
rem set "toMake=1"
|
||||
rem set "toInstall=1"
|
||||
set "toPack=0"
|
||||
set "toBuildSample=0"
|
||||
rem Source map base (should point to server where C++ sources will be copied)
|
||||
rem enables -g4 debug building option for WebGL sample and allows navigating C++ source code within JavaScript debugger.
|
||||
rem set "sourceMapBase=http://localhost:9090/"
|
||||
|
||||
set "BUILD_ModelingData=OFF"
|
||||
set "BUILD_ModelingAlgorithms=OFF"
|
||||
rem set "BUILD_Visualization=ON"
|
||||
set "BUILD_ApplicationFramework=OFF"
|
||||
set "BUILD_DataExchange=OFF"
|
||||
|
||||
set "USE_RAPIDJSON=OFF"
|
||||
set "USE_DRACO=OFF"
|
||||
set "USE_PTHREADS=OFF"
|
@@ -1,20 +0,0 @@
|
||||
# environment configuration template for occ_build_wasm.sh (to be renamed as wasm_custom_env.sh)
|
||||
export aFreeType="$aSrcRoot/../3rdparty/freetype-2.7.1-wasm"
|
||||
export EMSDK_ROOT="$aSrcRoot/../emsdk"
|
||||
|
||||
export aDestDir="${aSrcRoot}/../3rdparty/occt77-wasm"
|
||||
|
||||
# Uncomment to customize building steps
|
||||
#export aBuildRoot=work
|
||||
#export toCMake=1
|
||||
#export toClean=0
|
||||
#export toMake=1
|
||||
#export toInstall=1
|
||||
|
||||
export BUILD_ModelingData=OFF
|
||||
export BUILD_ModelingAlgorithms=OFF
|
||||
#export BUILD_Visualization=ON
|
||||
export BUILD_ApplicationFramework=OFF
|
||||
export BUILD_DataExchange=OFF
|
||||
|
||||
export aNbJobs=10
|
@@ -1653,13 +1653,6 @@ For each Saved View OCCT STEP Reader will retrieve the following attributes:
|
||||
- clipping planes (single plane of combination of planes);
|
||||
- front and back plane clipping.
|
||||
|
||||
### User defined attributes
|
||||
Attributes are implemented in accordance with <a href="https://www.mbx-if.org/documents/rec_prac_user_def_attributes_v18.pdf">Recommended practices for User Defined Attributes</a> section 4, 5, 6.1-6.3 and 7.
|
||||
Attributes can be read for shapes at levels:
|
||||
- Part/Product Level;
|
||||
- Component Instances in an Assembly;
|
||||
- Geometry Level.
|
||||
|
||||
@subsection occt_step_7_3 Writing to STEP
|
||||
|
||||
The translation from XDE to STEP can be initialized as follows:
|
||||
@@ -1737,8 +1730,5 @@ Interface_Static::SetIVal("write.step.schema", 5));
|
||||
### Saved views
|
||||
Saved Views are not exported by OCCT.
|
||||
|
||||
### User defined attributes
|
||||
Attributes can be imported from STEP.
|
||||
|
||||
|
||||
|
||||
|
@@ -808,11 +808,8 @@ void Approx_BSplComputeLine::Parameters(const MultiLine& Line,
|
||||
const Standard_Integer aNbp = lastP - firstP + 1;
|
||||
|
||||
|
||||
// The first parameter should always be zero according to all the logic below,
|
||||
// so division by any value will give zero anyway, so it should never be scaled
|
||||
// to avoid case when there is only one parameter in the array thus division by zero happens.
|
||||
TheParameters(firstP) = 0.0;
|
||||
if (aNbp == 2) {
|
||||
TheParameters(firstP) = 0.0;
|
||||
TheParameters(lastP) = 1.0;
|
||||
}
|
||||
else if (Par == Approx_ChordLength || Par == Approx_Centripetal)
|
||||
@@ -823,6 +820,7 @@ void Approx_BSplComputeLine::Parameters(const MultiLine& Line,
|
||||
if (nbP3d == 0) mynbP3d = 1;
|
||||
if (nbP2d == 0) mynbP2d = 1;
|
||||
|
||||
TheParameters(firstP) = 0.0;
|
||||
dist = 0.0;
|
||||
TColgp_Array1OfPnt tabP(1, mynbP3d);
|
||||
TColgp_Array1OfPnt tabPP(1, mynbP3d);
|
||||
@@ -863,10 +861,10 @@ void Approx_BSplComputeLine::Parameters(const MultiLine& Line,
|
||||
TheParameters(i) = TheParameters(i - 1) + Sqrt(dist);
|
||||
}
|
||||
}
|
||||
for (i = firstP + 1; i <= lastP; i++) TheParameters(i) /= TheParameters(lastP);
|
||||
for (i = firstP; i <= lastP; i++) TheParameters(i) /= TheParameters(lastP);
|
||||
}
|
||||
else {
|
||||
for (i = firstP + 1; i <= lastP; i++) {
|
||||
for (i = firstP; i <= lastP; i++) {
|
||||
TheParameters(i) = (Standard_Real(i) - firstP) /
|
||||
(Standard_Real(lastP - Standard_Real(firstP)));
|
||||
}
|
||||
|
@@ -96,7 +96,7 @@ Standard_Boolean BRepClass_FaceExplorer::CheckPoint(gp_Pnt2d& thePoint)
|
||||
else
|
||||
{
|
||||
Standard_Real anEpsilon = Epsilon(aDistance);
|
||||
if (anEpsilon > Max (myUMax - myUMin, myVMax - myVMin) && anEpsilon > 1e-100)
|
||||
if (anEpsilon > Max (myUMax - myUMin, myVMax - myVMin))
|
||||
{
|
||||
gp_Vec2d aLinVec(aCenterPnt, thePoint);
|
||||
gp_Dir2d aLinDir(aLinVec);
|
||||
|
@@ -308,15 +308,10 @@ Standard_Boolean BRepTools_GTrsfModification::NewTriangulation(const TopoDS_Face
|
||||
// modify normals
|
||||
if (theTriangulation->HasNormals())
|
||||
{
|
||||
for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbNodes(); ++anInd)
|
||||
for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbTriangles(); ++anInd)
|
||||
{
|
||||
gp_Dir aNormal = theTriangulation->Normal(anInd);
|
||||
gp_Mat aMat = aGTrsf.VectorialPart();
|
||||
aMat.SetDiagonal(1., 1., 1.);
|
||||
gp_Trsf aTrsf;
|
||||
aTrsf.SetForm(gp_Rotation);
|
||||
(gp_Mat&)aTrsf.HVectorialPart() = aMat;
|
||||
aNormal.Transform(aTrsf);
|
||||
aNormal.Transform(aGTrsf.Trsf());
|
||||
theTriangulation->SetNormal(anInd, aNormal);
|
||||
}
|
||||
}
|
||||
|
@@ -515,13 +515,8 @@ BSplCLib::EvalBsplineBasis
|
||||
//
|
||||
// this should be always invertible if ii is correctly computed
|
||||
//
|
||||
const Standard_Real aScale = (FlatKnots(ii + pp) - FlatKnots(ii - qq + pp + 1));
|
||||
if (Abs (aScale) < gp::Resolution())
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
Factor = (Parameter - FlatKnots(ii - qq + pp + 1)) / aScale;
|
||||
Factor = (Parameter - FlatKnots(ii - qq + pp + 1))
|
||||
/ (FlatKnots(ii + pp) - FlatKnots(ii - qq + pp + 1)) ;
|
||||
Saved = Factor * BsplineBasis(1,pp) ;
|
||||
BsplineBasis(1,pp) *= (1.0e0 - Factor) ;
|
||||
BsplineBasis(1,pp) += BsplineBasis(1,qq) ;
|
||||
@@ -541,13 +536,7 @@ BSplCLib::EvalBsplineBasis
|
||||
}
|
||||
|
||||
for (pp = 1 ; pp <= qq - 1 ; pp++) {
|
||||
const Standard_Real aScale = (FlatKnots(ii + pp) - FlatKnots(ii - qq + pp + 1));
|
||||
if (Abs (aScale) < gp::Resolution())
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
Inverse = 1.0e0 / aScale;
|
||||
Inverse = 1.0e0 / (FlatKnots(ii + pp) - FlatKnots(ii - qq + pp + 1)) ;
|
||||
Factor = (Parameter - FlatKnots(ii - qq + pp + 1)) * Inverse ;
|
||||
Saved = Factor * BsplineBasis(1,pp) ;
|
||||
BsplineBasis(1,pp) *= (1.0e0 - Factor) ;
|
||||
|
@@ -33,7 +33,6 @@
|
||||
#include <Storage_Schema.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TCollection_ExtendedString.hxx>
|
||||
#include <TDataStd_TreeNode.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <TDF_Data.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
@@ -325,16 +324,7 @@ void BinLDrivers_DocumentRetrievalDriver::Read (Standard_IStream&
|
||||
// read sub-tree of the root label
|
||||
if (!theFilter.IsNull())
|
||||
theFilter->StartIteration();
|
||||
const auto aStreamStartPosition = theIStream.tellg();
|
||||
Standard_Integer nbRead = ReadSubTree (theIStream, aData->Root(), theFilter, aQuickPart, Standard_False, aPS.Next());
|
||||
if (!myUnresolvedLinks.IsEmpty())
|
||||
{
|
||||
// In case we have skipped some linked TreeNodes before getting to
|
||||
// their children.
|
||||
theFilter->StartIteration();
|
||||
theIStream.seekg(aStreamStartPosition, std::ios_base::beg);
|
||||
nbRead += ReadSubTree(theIStream, aData->Root(), theFilter, aQuickPart, Standard_True, aPS.Next());
|
||||
}
|
||||
Standard_Integer nbRead = ReadSubTree (theIStream, aData->Root(), theFilter, aQuickPart, aPS.Next());
|
||||
if (!aPS.More())
|
||||
{
|
||||
myReaderStatus = PCDM_RS_UserBreak;
|
||||
@@ -383,7 +373,6 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree
|
||||
const TDF_Label& theLabel,
|
||||
const Handle(PCDM_ReaderFilter)& theFilter,
|
||||
const Standard_Boolean& theQuickPart,
|
||||
const Standard_Boolean theReadMissing,
|
||||
const Message_ProgressRange& theRange)
|
||||
{
|
||||
Standard_Integer nbRead = 0;
|
||||
@@ -404,7 +393,7 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree
|
||||
aLabelSize = InverseUint64(aLabelSize);
|
||||
#endif
|
||||
// no one sub-label is needed, so, skip everything
|
||||
if (aSkipAttrs && !theFilter->IsSubPassed() && myUnresolvedLinks.IsEmpty())
|
||||
if (aSkipAttrs && !theFilter->IsSubPassed())
|
||||
{
|
||||
aLabelSize -= sizeof (uint64_t);
|
||||
theIS.seekg (aLabelSize, std::ios_base::cur);
|
||||
@@ -414,11 +403,6 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree
|
||||
}
|
||||
}
|
||||
|
||||
if (theReadMissing)
|
||||
{
|
||||
aSkipAttrs = Standard_True;
|
||||
}
|
||||
const auto anAttStartPosition = theIS.tellg();
|
||||
// Read attributes:
|
||||
for (theIS >> myPAtt;
|
||||
theIS && myPAtt.TypeId() > 0 && // not an end marker ?
|
||||
@@ -431,12 +415,6 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree
|
||||
myReaderStatus = PCDM_RS_UserBreak;
|
||||
return -1;
|
||||
}
|
||||
if (myUnresolvedLinks.Remove(myPAtt.Id()) && aSkipAttrs)
|
||||
{
|
||||
aSkipAttrs = Standard_False;
|
||||
theIS.seekg(anAttStartPosition, std::ios_base::beg);
|
||||
continue;
|
||||
}
|
||||
if (aSkipAttrs)
|
||||
{
|
||||
if (myPAtt.IsDirect()) // skip direct written stream
|
||||
@@ -509,17 +487,7 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree
|
||||
aDriver->TypeName(), Message_Warning);
|
||||
}
|
||||
else if (!isBound)
|
||||
{
|
||||
myRelocTable.Bind(anID, tAtt);
|
||||
Handle(TDataStd_TreeNode) aNode = Handle(TDataStd_TreeNode)::DownCast(tAtt);
|
||||
if (!theFilter.IsNull() && !aNode.IsNull() && !aNode->Father().IsNull() && aNode->Father()->IsNew())
|
||||
{
|
||||
Standard_Integer anUnresolvedLink;
|
||||
myPAtt.SetPosition(BP_HEADSIZE);
|
||||
myPAtt >> anUnresolvedLink;
|
||||
myUnresolvedLinks.Add(anUnresolvedLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!myMapUnsupported.Contains(myPAtt.TypeId()))
|
||||
myMsgDriver->Send(aMethStr + "warning: type ID not registered in header: "
|
||||
@@ -554,7 +522,7 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree
|
||||
// read sub-tree
|
||||
if (!theFilter.IsNull())
|
||||
theFilter->Down (aTag);
|
||||
Standard_Integer nbSubRead = ReadSubTree (theIS, aLab, theFilter, theQuickPart, theReadMissing, aPS.Next());
|
||||
Standard_Integer nbSubRead = ReadSubTree (theIS, aLab, theFilter, theQuickPart, aPS.Next());
|
||||
// check for error
|
||||
if (nbSubRead == -1)
|
||||
return -1;
|
||||
|
@@ -80,7 +80,6 @@ protected:
|
||||
const TDF_Label& theData,
|
||||
const Handle(PCDM_ReaderFilter)& theFilter,
|
||||
const Standard_Boolean& theQuickPart,
|
||||
const Standard_Boolean theReadMissing,
|
||||
const Message_ProgressRange& theRanges = Message_ProgressRange());
|
||||
|
||||
|
||||
@@ -126,7 +125,6 @@ private:
|
||||
BinObjMgt_Persistent myPAtt;
|
||||
TColStd_MapOfInteger myMapUnsupported;
|
||||
BinLDrivers_VectorOfDocumentSection mySections;
|
||||
NCollection_Map<Standard_Integer> myUnresolvedLinks;
|
||||
|
||||
|
||||
};
|
||||
|
@@ -88,11 +88,8 @@ bool DE_ConfigurationNode::Save(const TCollection_AsciiString& theResourcePath)
|
||||
// function : UpdateLoad
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
bool DE_ConfigurationNode::UpdateLoad(const Standard_Boolean theToImport,
|
||||
const Standard_Boolean theToKeep)
|
||||
bool DE_ConfigurationNode::UpdateLoad()
|
||||
{
|
||||
(void)theToImport;
|
||||
(void)theToKeep;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -85,12 +85,9 @@ public:
|
||||
//! @return new object with the same field values
|
||||
Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const = 0;
|
||||
|
||||
//! Update loading status. Checking for the ability to read and write.
|
||||
//! @param[in] theToImport flag to updates for import. Standard_True-import, Standard_False-export
|
||||
//! @param[in] theToKeep flag to save update result
|
||||
//! Update loading status. Checking for the license.
|
||||
//! @return Standard_True, if node can be used
|
||||
Standard_EXPORT virtual bool UpdateLoad(const Standard_Boolean theToImport,
|
||||
const Standard_Boolean theToKeep);
|
||||
Standard_EXPORT virtual bool UpdateLoad();
|
||||
|
||||
public:
|
||||
|
||||
|
@@ -34,9 +34,6 @@ namespace
|
||||
static const TCollection_AsciiString aScope ("global");
|
||||
return aScope;
|
||||
}
|
||||
|
||||
//! Global configuration of current DE Session
|
||||
static Handle(DE_Wrapper) THE_GLOBAL_CONFIGURATION;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -44,7 +41,6 @@ namespace
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
DE_Wrapper::DE_Wrapper()
|
||||
:myKeepUpdates(Standard_False)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
@@ -68,7 +64,6 @@ DE_Wrapper::DE_Wrapper(const Handle(DE_Wrapper)& theWrapper)
|
||||
Bind(aVendorIter.Value());
|
||||
}
|
||||
}
|
||||
theWrapper->myKeepUpdates = myKeepUpdates;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -77,23 +72,8 @@ DE_Wrapper::DE_Wrapper(const Handle(DE_Wrapper)& theWrapper)
|
||||
//=======================================================================
|
||||
Handle(DE_Wrapper) DE_Wrapper::GlobalWrapper()
|
||||
{
|
||||
if (THE_GLOBAL_CONFIGURATION.IsNull())
|
||||
{
|
||||
THE_GLOBAL_CONFIGURATION = new DE_Wrapper();
|
||||
}
|
||||
return THE_GLOBAL_CONFIGURATION;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : SetGlobalWrapper
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void DE_Wrapper::SetGlobalWrapper(const Handle(DE_Wrapper)& theWrapper)
|
||||
{
|
||||
if (!theWrapper.IsNull())
|
||||
{
|
||||
THE_GLOBAL_CONFIGURATION = theWrapper;
|
||||
}
|
||||
static const Handle(DE_Wrapper)& aConfiguration = new DE_Wrapper();
|
||||
return aConfiguration;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -101,7 +81,7 @@ void DE_Wrapper::SetGlobalWrapper(const Handle(DE_Wrapper)& theWrapper)
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath,
|
||||
const Handle(TDocStd_Document)& theDocument,
|
||||
Handle(TDocStd_Document)& theDocument,
|
||||
Handle(XSControl_WorkSession)& theWS,
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
@@ -114,7 +94,7 @@ Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath,
|
||||
return Read(thePath, theDocument, theProgress);
|
||||
}
|
||||
Handle(DE_Provider) aProvider;
|
||||
if (!FindProvider(thePath, Standard_True, aProvider))
|
||||
if (!findProvider(thePath, Standard_True, aProvider))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -139,7 +119,7 @@ Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath,
|
||||
return Write(thePath, theDocument, theProgress);
|
||||
}
|
||||
Handle(DE_Provider) aProvider;
|
||||
if (!FindProvider(thePath, Standard_False, aProvider))
|
||||
if (!findProvider(thePath, Standard_False, aProvider))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -151,7 +131,7 @@ Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath,
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath,
|
||||
const Handle(TDocStd_Document)& theDocument,
|
||||
Handle(TDocStd_Document)& theDocument,
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
if (theDocument.IsNull())
|
||||
@@ -159,7 +139,7 @@ Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath,
|
||||
return Standard_False;
|
||||
}
|
||||
Handle(DE_Provider) aProvider;
|
||||
if (!FindProvider(thePath, Standard_True, aProvider))
|
||||
if (!findProvider(thePath, Standard_True, aProvider))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -179,7 +159,7 @@ Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath,
|
||||
return Standard_False;
|
||||
}
|
||||
Handle(DE_Provider) aProvider;
|
||||
if (!FindProvider(thePath, Standard_False, aProvider))
|
||||
if (!findProvider(thePath, Standard_False, aProvider))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -200,7 +180,7 @@ Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath,
|
||||
return Read(thePath, theShape, theProgress);
|
||||
}
|
||||
Handle(DE_Provider) aProvider;
|
||||
if (!FindProvider(thePath, Standard_True, aProvider))
|
||||
if (!findProvider(thePath, Standard_True, aProvider))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -221,7 +201,7 @@ Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath,
|
||||
return Write(thePath, theShape, theProgress);
|
||||
}
|
||||
Handle(DE_Provider) aProvider;
|
||||
if (!FindProvider(thePath, Standard_False, aProvider))
|
||||
if (!findProvider(thePath, Standard_False, aProvider))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -238,7 +218,7 @@ Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath,
|
||||
{
|
||||
|
||||
Handle(DE_Provider) aProvider;
|
||||
if (!FindProvider(thePath, Standard_True, aProvider))
|
||||
if (!findProvider(thePath, Standard_True, aProvider))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -254,7 +234,7 @@ Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath,
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
Handle(DE_Provider) aProvider;
|
||||
if (!FindProvider(thePath, Standard_False, aProvider))
|
||||
if (!findProvider(thePath, Standard_False, aProvider))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -447,6 +427,7 @@ void DE_Wrapper::ChangePriority(const TCollection_AsciiString& theFormat,
|
||||
if (aVendorMap.FindFromKey(aVendorName, aNode))
|
||||
{
|
||||
aNode->SetEnabled(Standard_True);
|
||||
aNode->UpdateLoad();
|
||||
aNewVendorMap.Add(aVendorName, aNode);
|
||||
}
|
||||
}
|
||||
@@ -501,10 +482,10 @@ Handle(DE_Wrapper) DE_Wrapper::Copy() const
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : FindProvider
|
||||
// function : findProvider
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean DE_Wrapper::FindProvider(const TCollection_AsciiString& thePath,
|
||||
Standard_Boolean DE_Wrapper::findProvider(const TCollection_AsciiString& thePath,
|
||||
const Standard_Boolean theToImport,
|
||||
Handle(DE_Provider)& theProvider) const
|
||||
{
|
||||
@@ -533,11 +514,11 @@ Standard_Boolean DE_Wrapper::FindProvider(const TCollection_AsciiString& thePath
|
||||
((theToImport && aNode->IsImportSupported()) ||
|
||||
(!theToImport && aNode->IsExportSupported())) &&
|
||||
(aNode->CheckExtension(anExtr) ||
|
||||
(theToImport && aNode->CheckContent(aBuffer))) &&
|
||||
aNode->UpdateLoad(theToImport, myKeepUpdates))
|
||||
(theToImport && aNode->CheckContent(aBuffer))))
|
||||
{
|
||||
theProvider = aNode->BuildProvider();
|
||||
aNode->GlobalParameters = GlobalParameters;
|
||||
theProvider->SetNode(aNode);
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
@@ -545,28 +526,6 @@ Standard_Boolean DE_Wrapper::FindProvider(const TCollection_AsciiString& thePath
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : ReLoadNodes
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT void DE_Wrapper::UpdateLoad(const Standard_Boolean theToForceUpdate) const
|
||||
{
|
||||
for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration);
|
||||
aFormatIter.More(); aFormatIter.Next())
|
||||
{
|
||||
for (DE_ConfigurationVendorMap::Iterator aVendorIter(aFormatIter.Value());
|
||||
aVendorIter.More(); aVendorIter.Next())
|
||||
{
|
||||
const Handle(DE_ConfigurationNode)& aNode = aVendorIter.Value();
|
||||
aNode->UpdateLoad(Standard_True, Standard_True);
|
||||
aNode->UpdateLoad(Standard_False, Standard_True);
|
||||
if (!theToForceUpdate)
|
||||
continue;
|
||||
aNode->SetEnabled(aNode->IsExportSupported() || aNode->IsImportSupported());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : sort
|
||||
// purpose :
|
||||
|
@@ -61,15 +61,10 @@ public:
|
||||
//! @param[in] theWrapper object to copy
|
||||
Standard_EXPORT DE_Wrapper(const Handle(DE_Wrapper)& theWrapper);
|
||||
|
||||
//! Gets global configuration singleton.
|
||||
//! If wrapper is not set, create it by default as base class object.
|
||||
//! Gets global configuration singleton
|
||||
//! @return point to global configuration
|
||||
Standard_EXPORT static Handle(DE_Wrapper) GlobalWrapper();
|
||||
|
||||
//! Sets global configuration singleton
|
||||
//! @param[in] theWrapper object to set as global configuration
|
||||
Standard_EXPORT static void SetGlobalWrapper(const Handle(DE_Wrapper)& theWrapper);
|
||||
|
||||
public:
|
||||
|
||||
//! Reads a CAD file, according internal configuration
|
||||
@@ -79,7 +74,7 @@ public:
|
||||
//! @param theProgress[in] progress indicator
|
||||
//! @return true if Read operation has ended correctly
|
||||
Standard_EXPORT Standard_Boolean Read(const TCollection_AsciiString& thePath,
|
||||
const Handle(TDocStd_Document)& theDocument,
|
||||
Handle(TDocStd_Document)& theDocument,
|
||||
Handle(XSControl_WorkSession)& theWS,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
@@ -100,7 +95,7 @@ public:
|
||||
//! @param theProgress[in] progress indicator
|
||||
//! @return true if Read operation has ended correctly
|
||||
Standard_EXPORT Standard_Boolean Read(const TCollection_AsciiString& thePath,
|
||||
const Handle(TDocStd_Document)& theDocument,
|
||||
Handle(TDocStd_Document)& theDocument,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Writes a CAD file, according internal configuration
|
||||
@@ -216,33 +211,13 @@ public:
|
||||
Standard_EXPORT void ChangePriority(const TColStd_ListOfAsciiString& theVendorPriority,
|
||||
const Standard_Boolean theToDisable = Standard_False);
|
||||
|
||||
//! Find available provider from the configuration.
|
||||
//! If there are several providers, choose the one with the highest priority.
|
||||
//! @param[in] thePath path to the CAD file
|
||||
//! @param[in] theToImport flag to finds for import. Standard_True-import, Standard_False-export
|
||||
//! @param[out] theProvider created new provider
|
||||
//! @return Standard_True if provider found and created
|
||||
Standard_EXPORT virtual Standard_Boolean FindProvider(const TCollection_AsciiString& thePath,
|
||||
const Standard_Boolean theToImport,
|
||||
Handle(DE_Provider)& theProvider) const;
|
||||
|
||||
//! Updates all registered nodes, save all result.
|
||||
//! @param[in] theToForceUpdate flag to turn on/of nodes according opportunity to transfer
|
||||
Standard_EXPORT void UpdateLoad(const Standard_Boolean theToForceUpdate = Standard_False) const;
|
||||
|
||||
//! Gets flag to save updates operation while transfer checks
|
||||
Standard_Boolean KeepUpdates() const { return myKeepUpdates; }
|
||||
|
||||
//! Sets flag to save updates operation while transfer checks
|
||||
void SetKeepUpdates(const Standard_Boolean theToKeepUpdates) { myKeepUpdates = theToKeepUpdates; }
|
||||
|
||||
//! Gets format map, contains vendor map with nodes
|
||||
//! @return internal map of formats
|
||||
Standard_EXPORT const DE_ConfigurationFormatMap& Nodes() const;
|
||||
|
||||
//! Copies values of all fields
|
||||
//! @return new object with the same field values
|
||||
Standard_EXPORT virtual Handle(DE_Wrapper) Copy() const;
|
||||
Standard_EXPORT Handle(DE_Wrapper) Copy() const;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -252,13 +227,22 @@ protected:
|
||||
//! @param[in] theResource resource to get priority
|
||||
void sort(const Handle(DE_ConfigurationContext)& theResource);
|
||||
|
||||
//! Find available provider from the configuration.
|
||||
//! If there are several providers, choose the one with the highest priority.
|
||||
//! @param[in] thePath path to the CAD file
|
||||
//! @param[in] theToImport flag to finds for import. Standard_True-import, Standard_False-export
|
||||
//! @param[out] theProvider created new provider
|
||||
//! @return Standard_True if provider found and created
|
||||
Standard_Boolean findProvider(const TCollection_AsciiString& thePath,
|
||||
const Standard_Boolean theToImport,
|
||||
Handle(DE_Provider)& theProvider) const;
|
||||
|
||||
public:
|
||||
|
||||
DE_ConfigurationNode::DE_SectionGlobal GlobalParameters; //!< Internal parameters for the all translators
|
||||
|
||||
private:
|
||||
|
||||
Standard_Boolean myKeepUpdates; //!< Flag to save updates operation while transfer checks
|
||||
DE_ConfigurationFormatMap myConfiguration; //!< Internal map of formats
|
||||
};
|
||||
|
||||
|
@@ -34,7 +34,9 @@ namespace
|
||||
//=======================================================================
|
||||
DEBRepCascade_ConfigurationNode::DEBRepCascade_ConfigurationNode() :
|
||||
DE_ConfigurationNode()
|
||||
{}
|
||||
{
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : DEBRepCascade_ConfigurationNode
|
||||
@@ -44,6 +46,7 @@ DEBRepCascade_ConfigurationNode::DEBRepCascade_ConfigurationNode(const Handle(DE
|
||||
:DE_ConfigurationNode(theNode)
|
||||
{
|
||||
InternalParameters = theNode->InternalParameters;
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -34,7 +34,9 @@ namespace
|
||||
//=======================================================================
|
||||
DEXCAFCascade_ConfigurationNode::DEXCAFCascade_ConfigurationNode() :
|
||||
DE_ConfigurationNode()
|
||||
{}
|
||||
{
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : DEXCAFCascade_ConfigurationNode
|
||||
@@ -44,6 +46,7 @@ DEXCAFCascade_ConfigurationNode::DEXCAFCascade_ConfigurationNode(const Handle(DE
|
||||
:DE_ConfigurationNode(theNode)
|
||||
{
|
||||
InternalParameters = theNode->InternalParameters;
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -125,7 +128,7 @@ Handle(DE_ConfigurationNode) DEXCAFCascade_ConfigurationNode::Copy() const
|
||||
//=======================================================================
|
||||
Handle(DE_Provider) DEXCAFCascade_ConfigurationNode::BuildProvider()
|
||||
{
|
||||
return new DEXCAFCascade_Provider (this);
|
||||
return new DEXCAFCascade_Provider();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -429,8 +429,6 @@ static Standard_Boolean ConicDefinition
|
||||
term2 = -gdet/(cprim*pdet);
|
||||
|
||||
if (IsEllip) {
|
||||
if (term1 <= eps || term2 <= eps)
|
||||
return Standard_False;
|
||||
Xax = cost;
|
||||
Yax = sint;
|
||||
Rmin = sqrt ( term1);
|
||||
@@ -441,16 +439,12 @@ static Standard_Boolean ConicDefinition
|
||||
}
|
||||
}
|
||||
else if (term1 <= eps){
|
||||
if (-term1 <= eps || term2 <= eps)
|
||||
return Standard_False;
|
||||
Xax = -sint;
|
||||
Yax = cost;
|
||||
Rmin = sqrt (-term1);
|
||||
Rmax = sqrt (term2);
|
||||
}
|
||||
else {
|
||||
if (term1 <= eps || -term2 <= eps)
|
||||
return Standard_False;
|
||||
Xax = cost;
|
||||
Yax = sint;
|
||||
Rmin = sqrt (-term2);
|
||||
|
@@ -76,28 +76,22 @@ static Standard_Boolean Controle(const TColgp_Array1OfPnt& Poles,
|
||||
Standard_Real umin, umax, vmin, vmax;
|
||||
S->Bounds(umin, umax, vmin, vmax);
|
||||
S->D1( (umin+umax)/2, (vmin+vmax)/2, P, DU, DV);
|
||||
|
||||
if (DU.SquareMagnitude() > gp::Resolution() &&
|
||||
DV.SquareMagnitude() > gp::Resolution())
|
||||
{
|
||||
// On prend DX le plus proche possible de DU
|
||||
gp_Dir du(DU);
|
||||
Standard_Real Angle1 = du.Angle(DX);
|
||||
Standard_Real Angle2 = du.Angle(DY);
|
||||
if (Angle1 > M_PI/2) Angle1 = M_PI-Angle1;
|
||||
if (Angle2 > M_PI/2) Angle2 = M_PI-Angle2;
|
||||
if (Angle2 < Angle1)
|
||||
{
|
||||
du = DY; DY = DX; DX = du;
|
||||
}
|
||||
if (DX.Angle(DU) > M_PI/2) DX.Reverse();
|
||||
if (DY.Angle(DV) > M_PI/2) DY.Reverse();
|
||||
|
||||
gp_Ax3 axe(Bary, DX^DY, DX);
|
||||
Plan.SetPosition(axe);
|
||||
Plan.SetLocation(Bary);
|
||||
IsPlan = Standard_True;
|
||||
// On prend DX le plus proche possible de DU
|
||||
gp_Dir du(DU);
|
||||
Standard_Real Angle1 = du.Angle(DX);
|
||||
Standard_Real Angle2 = du.Angle(DY);
|
||||
if (Angle1 > M_PI/2) Angle1 = M_PI-Angle1;
|
||||
if (Angle2 > M_PI/2) Angle2 = M_PI-Angle2;
|
||||
if (Angle2 < Angle1) {
|
||||
du = DY; DY = DX; DX = du;
|
||||
}
|
||||
if (DX.Angle(DU) > M_PI/2) DX.Reverse();
|
||||
if (DY.Angle(DV) > M_PI/2) DY.Reverse();
|
||||
|
||||
gp_Ax3 axe(Bary, DX^DY, DX);
|
||||
Plan.SetPosition(axe);
|
||||
Plan.SetLocation(Bary);
|
||||
IsPlan = Standard_True;
|
||||
}
|
||||
}
|
||||
return IsPlan;
|
||||
|
@@ -34,7 +34,9 @@ namespace
|
||||
//=======================================================================
|
||||
IGESCAFControl_ConfigurationNode::IGESCAFControl_ConfigurationNode() :
|
||||
DE_ConfigurationNode()
|
||||
{}
|
||||
{
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : IGESCAFControl_ConfigurationNode
|
||||
@@ -44,6 +46,7 @@ IGESCAFControl_ConfigurationNode::IGESCAFControl_ConfigurationNode(const Handle(
|
||||
:DE_ConfigurationNode(theNode)
|
||||
{
|
||||
InternalParameters = theNode->InternalParameters;
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -33,7 +33,9 @@ namespace
|
||||
//=======================================================================
|
||||
RWGltf_ConfigurationNode::RWGltf_ConfigurationNode() :
|
||||
DE_ConfigurationNode()
|
||||
{}
|
||||
{
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : RWGltf_ConfigurationNode
|
||||
@@ -43,6 +45,7 @@ RWGltf_ConfigurationNode::RWGltf_ConfigurationNode(const Handle(RWGltf_Configura
|
||||
:DE_ConfigurationNode(theNode)
|
||||
{
|
||||
InternalParameters = theNode->InternalParameters;
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -370,16 +370,6 @@ Standard_Boolean RWMesh_CafReader::addShapeIntoDoc (CafDocumentTools& theTools,
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
if (toMakeAssembly)
|
||||
{
|
||||
TDF_Label aRefLabel;
|
||||
theTools.ShapeTool->GetReferredShape(aNewLabel, aRefLabel);
|
||||
if (!aRefLabel.IsNull())
|
||||
{
|
||||
theTools.OriginalShapeMap.Bind(theShape, aRefLabel);
|
||||
}
|
||||
}
|
||||
|
||||
// if new label is a reference get referred shape
|
||||
TDF_Label aNewRefLabel = aNewLabel;
|
||||
theTools.ShapeTool->GetReferredShape (aNewLabel, aNewRefLabel);
|
||||
|
@@ -56,7 +56,6 @@ public:
|
||||
Handle(XCAFDoc_ColorTool) ColorTool;
|
||||
Handle(XCAFDoc_VisMaterialTool) VisMaterialTool;
|
||||
NCollection_DataMap<TopoDS_Shape, TDF_Label, TopTools_ShapeMapHasher> ComponentMap;
|
||||
NCollection_DataMap<TopoDS_Shape, TDF_Label, TopTools_ShapeMapHasher> OriginalShapeMap;
|
||||
};
|
||||
|
||||
public:
|
||||
|
@@ -33,7 +33,9 @@ namespace
|
||||
//=======================================================================
|
||||
RWObj_ConfigurationNode::RWObj_ConfigurationNode() :
|
||||
DE_ConfigurationNode()
|
||||
{}
|
||||
{
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : RWObj_ConfigurationNode
|
||||
@@ -43,6 +45,7 @@ RWObj_ConfigurationNode::RWObj_ConfigurationNode(const Handle(RWObj_Configuratio
|
||||
:DE_ConfigurationNode(theNode)
|
||||
{
|
||||
InternalParameters = theNode->InternalParameters;
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -27,7 +27,9 @@ static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider";
|
||||
//=======================================================================
|
||||
RWPly_ConfigurationNode::RWPly_ConfigurationNode() :
|
||||
DE_ConfigurationNode()
|
||||
{}
|
||||
{
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : RWPly_ConfigurationNode
|
||||
@@ -37,6 +39,7 @@ RWPly_ConfigurationNode::RWPly_ConfigurationNode(const Handle(RWPly_Configuratio
|
||||
:DE_ConfigurationNode(theNode)
|
||||
{
|
||||
InternalParameters = theNode->InternalParameters;
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -98,8 +98,6 @@
|
||||
#include <RWStepBasic_RWExternalIdentificationAssignment.hxx>
|
||||
#include <RWStepBasic_RWExternallyDefinedItem.hxx>
|
||||
#include <RWStepBasic_RWGeneralProperty.hxx>
|
||||
#include <RWStepBasic_RWGeneralPropertyAssociation.hxx>
|
||||
#include <RWStepBasic_RWGeneralPropertyRelationship.hxx>
|
||||
#include <RWStepBasic_RWGroupRelationship.hxx>
|
||||
#include <RWStepBasic_RWIdentificationAssignment.hxx>
|
||||
#include <RWStepBasic_RWIdentificationRole.hxx>
|
||||
@@ -572,8 +570,6 @@
|
||||
#include <StepBasic_ExternalIdentificationAssignment.hxx>
|
||||
#include <StepBasic_ExternalSource.hxx>
|
||||
#include <StepBasic_GeneralProperty.hxx>
|
||||
#include <StepBasic_GeneralPropertyAssociation.hxx>
|
||||
#include <StepBasic_GeneralPropertyRelationship.hxx>
|
||||
#include <StepBasic_Group.hxx>
|
||||
#include <StepBasic_GroupRelationship.hxx>
|
||||
#include <StepBasic_IdentificationAssignment.hxx>
|
||||
@@ -1192,9 +1188,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule)
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx>
|
||||
#include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <StepRepr_BooleanRepresentationItem.hxx>
|
||||
#include <StepRepr_IntegerRepresentationItem.hxx>
|
||||
#include <StepRepr_RealRepresentationItem.hxx>
|
||||
#include <StepRepr_ValueRepresentationItem.hxx>
|
||||
#include <StepAP242_DraughtingModelItemAssociation.hxx>
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
|
||||
@@ -5873,20 +5867,6 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN,
|
||||
aTool.Share(anEnt, iter);
|
||||
}
|
||||
break;
|
||||
case 819:
|
||||
{
|
||||
DeclareAndCast(StepBasic_GeneralPropertyAssociation, anEnt, ent);
|
||||
RWStepBasic_RWGeneralPropertyAssociation aTool;
|
||||
aTool.Share(anEnt, iter);
|
||||
}
|
||||
break;
|
||||
case 820:
|
||||
{
|
||||
DeclareAndCast(StepBasic_GeneralPropertyRelationship, anEnt, ent);
|
||||
RWStepBasic_RWGeneralPropertyRelationship aTool;
|
||||
aTool.Share(anEnt, iter);
|
||||
}
|
||||
break;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
@@ -8193,18 +8173,6 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid
|
||||
case 818:
|
||||
ent = new StepVisual_CubicBezierTriangulatedFace;
|
||||
break;
|
||||
case 819:
|
||||
ent = new StepBasic_GeneralPropertyAssociation;
|
||||
break;
|
||||
case 820:
|
||||
ent = new StepBasic_GeneralPropertyRelationship;
|
||||
break;
|
||||
case 821:
|
||||
ent = new StepRepr_BooleanRepresentationItem;
|
||||
break;
|
||||
case 822:
|
||||
ent = new StepRepr_RealRepresentationItem;
|
||||
break;
|
||||
|
||||
default:
|
||||
return Standard_False;
|
||||
|
@@ -188,8 +188,6 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
||||
#include <StepShape_GeometricallyBoundedWireframeShapeRepresentation.hxx>
|
||||
#include <StepRepr_GlobalUncertaintyAssignedContext.hxx>
|
||||
#include <StepRepr_GlobalUnitAssignedContext.hxx>
|
||||
#include <StepBasic_GeneralPropertyAssociation.hxx>
|
||||
#include <StepBasic_GeneralPropertyRelationship.hxx>
|
||||
#include <StepBasic_Group.hxx>
|
||||
#include <StepBasic_GroupRelationship.hxx>
|
||||
#include <StepShape_HalfSpaceSolid.hxx>
|
||||
@@ -622,8 +620,6 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
||||
#include <RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.hxx>
|
||||
#include <RWStepRepr_RWGlobalUncertaintyAssignedContext.hxx>
|
||||
#include <RWStepRepr_RWGlobalUnitAssignedContext.hxx>
|
||||
#include <RWStepBasic_RWGeneralPropertyAssociation.hxx>
|
||||
#include <RWStepBasic_RWGeneralPropertyRelationship.hxx>
|
||||
#include <RWStepBasic_RWGroup.hxx>
|
||||
#include <RWStepBasic_RWGroupRelationship.hxx>
|
||||
#include <RWStepShape_RWHalfSpaceSolid.hxx>
|
||||
@@ -1357,9 +1353,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
||||
#include <RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx>
|
||||
#include <RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <RWStepRepr_RWCompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <RWStepRepr_RWBooleanRepresentationItem.hxx>
|
||||
#include <RWStepRepr_RWIntegerRepresentationItem.hxx>
|
||||
#include <RWStepRepr_RWRealRepresentationItem.hxx>
|
||||
#include <RWStepRepr_RWValueRepresentationItem.hxx>
|
||||
#include <RWStepRepr_RWValueRepresentationItem.hxx>
|
||||
#include <RWStepAP242_RWDraughtingModelItemAssociation.hxx>
|
||||
@@ -1410,9 +1404,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx>
|
||||
#include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <StepRepr_BooleanRepresentationItem.hxx>
|
||||
#include <StepRepr_IntegerRepresentationItem.hxx>
|
||||
#include <StepRepr_RealRepresentationItem.hxx>
|
||||
#include <StepRepr_ValueRepresentationItem.hxx>
|
||||
#include <StepAP242_DraughtingModelItemAssociation.hxx>
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
|
||||
@@ -2357,10 +2349,6 @@ static TCollection_AsciiString Reco_ComplexTriangulatedFace("COMPLEX_TRIANGULATE
|
||||
static TCollection_AsciiString Reco_ComplexTriangulatedSurfaceSet("COMPLEX_TRIANGULATED_SURFACE_SET");
|
||||
static TCollection_AsciiString Reco_CubicBezierTessellatedEdge("CUBIC_BEZIER_TESSELLATED_EDGE");
|
||||
static TCollection_AsciiString Reco_CubicBezierTriangulatedFace("CUBIC_BEZIER_TRIANGULATED_FACE");
|
||||
static TCollection_AsciiString Reco_GeneralPropertyAssociation("GENERAL_PROPERTY_ASSOCIATION");
|
||||
static TCollection_AsciiString Reco_GeneralPropertyRelationship("GENERAL_PROPERTY_RELATIONSHIP");
|
||||
static TCollection_AsciiString Reco_BooleanRepresentationItem("BOOLEAN_REPRESENTATION_ITEM");
|
||||
static TCollection_AsciiString Reco_RealRepresentationItem("REAL_REPRESENTATION_ITEM");
|
||||
|
||||
// -- Definition of the libraries --
|
||||
|
||||
@@ -3117,10 +3105,6 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule ()
|
||||
typenums.Bind(Reco_ComplexTriangulatedSurfaceSet, 816);
|
||||
typenums.Bind(Reco_CubicBezierTessellatedEdge, 817);
|
||||
typenums.Bind(Reco_CubicBezierTriangulatedFace, 818);
|
||||
typenums.Bind(Reco_GeneralPropertyAssociation, 819);
|
||||
typenums.Bind(Reco_GeneralPropertyRelationship, 820);
|
||||
typenums.Bind(Reco_BooleanRepresentationItem, 821);
|
||||
typenums.Bind(Reco_RealRepresentationItem, 822);
|
||||
|
||||
|
||||
// SHORT NAMES
|
||||
@@ -5108,10 +5092,6 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType
|
||||
case 816: return Reco_ComplexTriangulatedSurfaceSet;
|
||||
case 817: return Reco_CubicBezierTessellatedEdge;
|
||||
case 818: return Reco_CubicBezierTriangulatedFace;
|
||||
case 819: return Reco_GeneralPropertyAssociation;
|
||||
case 820: return Reco_GeneralPropertyRelationship;
|
||||
case 821: return Reco_BooleanRepresentationItem;
|
||||
case 822: return Reco_RealRepresentationItem;
|
||||
default : return PasReco;
|
||||
}
|
||||
}
|
||||
@@ -10714,34 +10694,6 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN,
|
||||
aTool.ReadStep(data, num, ach, anEnt);
|
||||
}
|
||||
break;
|
||||
case 819:
|
||||
{
|
||||
DeclareAndCast(StepBasic_GeneralPropertyAssociation, anEnt, ent);
|
||||
RWStepBasic_RWGeneralPropertyAssociation aTool;
|
||||
aTool.ReadStep(data, num, ach, anEnt);
|
||||
}
|
||||
break;
|
||||
case 820:
|
||||
{
|
||||
DeclareAndCast(StepBasic_GeneralPropertyRelationship, anEnt, ent);
|
||||
RWStepBasic_RWGeneralPropertyRelationship aTool;
|
||||
aTool.ReadStep(data, num, ach, anEnt);
|
||||
}
|
||||
break;
|
||||
case 821:
|
||||
{
|
||||
DeclareAndCast(StepRepr_BooleanRepresentationItem, anent, ent);
|
||||
RWStepRepr_RWBooleanRepresentationItem aTool;
|
||||
aTool.ReadStep(data, num, ach, anent);
|
||||
}
|
||||
break;
|
||||
case 822:
|
||||
{
|
||||
DeclareAndCast(StepRepr_RealRepresentationItem, anent, ent);
|
||||
RWStepRepr_RWRealRepresentationItem aTool;
|
||||
aTool.ReadStep(data, num, ach, anent);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ach->AddFail("Type Mismatch when reading - Entity");
|
||||
}
|
||||
@@ -16286,34 +16238,6 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN,
|
||||
aTool.WriteStep(SW, anEnt);
|
||||
}
|
||||
break;
|
||||
case 819:
|
||||
{
|
||||
DeclareAndCast(StepBasic_GeneralPropertyAssociation, anEnt, ent);
|
||||
RWStepBasic_RWGeneralPropertyAssociation aTool;
|
||||
aTool.WriteStep(SW, anEnt);
|
||||
}
|
||||
break;
|
||||
case 820:
|
||||
{
|
||||
DeclareAndCast(StepBasic_GeneralPropertyRelationship, anEnt, ent);
|
||||
RWStepBasic_RWGeneralPropertyRelationship aTool;
|
||||
aTool.WriteStep(SW, anEnt);
|
||||
}
|
||||
break;
|
||||
case 821:
|
||||
{
|
||||
DeclareAndCast(StepRepr_BooleanRepresentationItem, anent, ent);
|
||||
RWStepRepr_RWBooleanRepresentationItem aTool;
|
||||
aTool.WriteStep(SW, anent);
|
||||
}
|
||||
break;
|
||||
case 822:
|
||||
{
|
||||
DeclareAndCast(StepRepr_RealRepresentationItem, anent, ent);
|
||||
RWStepRepr_RWRealRepresentationItem aTool;
|
||||
aTool.WriteStep(SW, anent);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
@@ -108,10 +108,6 @@ RWStepBasic_RWExternalSource.cxx
|
||||
RWStepBasic_RWExternalSource.hxx
|
||||
RWStepBasic_RWGeneralProperty.cxx
|
||||
RWStepBasic_RWGeneralProperty.hxx
|
||||
RWStepBasic_RWGeneralPropertyAssociation.cxx
|
||||
RWStepBasic_RWGeneralPropertyAssociation.hxx
|
||||
RWStepBasic_RWGeneralPropertyRelationship.cxx
|
||||
RWStepBasic_RWGeneralPropertyRelationship.hxx
|
||||
RWStepBasic_RWGroup.cxx
|
||||
RWStepBasic_RWGroup.hxx
|
||||
RWStepBasic_RWGroupAssignment.cxx
|
||||
|
@@ -1,87 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <RWStepBasic_RWGeneralPropertyAssociation.hxx>
|
||||
#include <StepBasic_GeneralProperty.hxx>
|
||||
#include <StepBasic_GeneralPropertyAssociation.hxx>
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
#include <StepData_StepWriter.hxx>
|
||||
#include <StepRepr_PropertyDefinition.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepBasic_RWGeneralPropertyAssociation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
RWStepBasic_RWGeneralPropertyAssociation::RWStepBasic_RWGeneralPropertyAssociation()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void RWStepBasic_RWGeneralPropertyAssociation::ReadStep(const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepBasic_GeneralPropertyAssociation)& theEnt) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if (!theData->CheckNbParams(theNum, 4, theAch, "general_property_association")) return;
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
theData->ReadString(theNum, 1, "name", theAch, aName);
|
||||
|
||||
Handle(TCollection_HAsciiString) aDescription;
|
||||
theData->ReadString(theNum, 2, "description", theAch, aDescription);
|
||||
|
||||
Handle(StepBasic_GeneralProperty) aGeneralProperty;
|
||||
theData->ReadEntity(theNum, 3, "base_definition", theAch, STANDARD_TYPE(StepBasic_GeneralProperty), aGeneralProperty);
|
||||
|
||||
Handle(StepRepr_PropertyDefinition) aPropertyDefinition;
|
||||
theData->ReadEntity(theNum, 4, "derived_definition", theAch, STANDARD_TYPE(StepRepr_PropertyDefinition), aPropertyDefinition);
|
||||
|
||||
// Initialize entity
|
||||
theEnt->Init(aName,
|
||||
aDescription,
|
||||
aGeneralProperty,
|
||||
aPropertyDefinition);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void RWStepBasic_RWGeneralPropertyAssociation::WriteStep (StepData_StepWriter& theSW,
|
||||
const Handle(StepBasic_GeneralPropertyAssociation) &theEnt) const
|
||||
{
|
||||
theSW.Send(theEnt->Name());
|
||||
|
||||
theSW.Send(theEnt->Description());
|
||||
|
||||
theSW.Send(theEnt->GeneralProperty());
|
||||
|
||||
theSW.Send(theEnt->PropertyDefinition());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void RWStepBasic_RWGeneralPropertyAssociation::Share(const Handle(StepBasic_GeneralPropertyAssociation)& theEnt,
|
||||
Interface_EntityIterator& theIter) const
|
||||
{
|
||||
theIter.AddItem(theEnt->GeneralProperty());
|
||||
|
||||
theIter.AddItem(theEnt->PropertyDefinition());
|
||||
}
|
@@ -1,60 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile
|
||||
#define _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
class StepData_StepReaderData;
|
||||
class Interface_Check;
|
||||
class StepBasic_GeneralProperty;
|
||||
class StepData_StepWriter;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
class StepBasic_GeneralPropertyAssociation;
|
||||
|
||||
//! Read & Write tool for GeneralPropertyAssociation
|
||||
class RWStepBasic_RWGeneralPropertyAssociation
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT RWStepBasic_RWGeneralPropertyAssociation();
|
||||
|
||||
//! Reads GeneralPropertyAssociation
|
||||
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepBasic_GeneralPropertyAssociation)& theEnt) const;
|
||||
|
||||
//! Writes GeneralPropertyAssociation
|
||||
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
|
||||
const Handle(StepBasic_GeneralPropertyAssociation)& theEnt) const;
|
||||
|
||||
//! Fills data for graph (shared items)
|
||||
Standard_EXPORT void Share (const Handle(StepBasic_GeneralPropertyAssociation)& theEnt,
|
||||
Interface_EntityIterator& theIter) const;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif // _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile
|
@@ -1,103 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <RWStepBasic_RWGeneralPropertyRelationship.hxx>
|
||||
#include <StepBasic_GeneralProperty.hxx>
|
||||
#include <StepBasic_GeneralPropertyRelationship.hxx>
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
#include <StepData_StepWriter.hxx>
|
||||
#include <StepRepr_PropertyDefinition.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepBasic_RWGeneralPropertyRelationship
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
RWStepBasic_RWGeneralPropertyRelationship::RWStepBasic_RWGeneralPropertyRelationship()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void RWStepBasic_RWGeneralPropertyRelationship::ReadStep(const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if (!theData->CheckNbParams(theNum, 4, theAch, "general_property_association")) return;
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
theData->ReadString(theNum, 1, "name", theAch, aName);
|
||||
|
||||
Handle(TCollection_HAsciiString) aDescription;
|
||||
Standard_Boolean hasDescription = Standard_True;
|
||||
if (theData->IsParamDefined(theNum, 2))
|
||||
{
|
||||
theData->ReadString(theNum, 2, "description", theAch, aDescription);
|
||||
}
|
||||
else
|
||||
{
|
||||
hasDescription = Standard_False;
|
||||
}
|
||||
|
||||
Handle(StepBasic_GeneralProperty) aRelatingGeneralProperty;
|
||||
theData->ReadEntity(theNum, 3, "relating_property", theAch, STANDARD_TYPE(StepBasic_GeneralProperty), aRelatingGeneralProperty);
|
||||
|
||||
Handle(StepBasic_GeneralProperty) aRelatedGeneralProperty;
|
||||
theData->ReadEntity(theNum, 4, "related_property", theAch, STANDARD_TYPE(StepBasic_GeneralProperty), aRelatedGeneralProperty);
|
||||
|
||||
// Initialize entity
|
||||
theEnt->Init(aName,
|
||||
hasDescription,
|
||||
aDescription,
|
||||
aRelatingGeneralProperty,
|
||||
aRelatedGeneralProperty);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void RWStepBasic_RWGeneralPropertyRelationship::WriteStep(StepData_StepWriter& theSW,
|
||||
const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const
|
||||
{
|
||||
theSW.Send(theEnt->Name());
|
||||
|
||||
if (theEnt->HasDescription())
|
||||
{
|
||||
theSW.Send(theEnt->Description());
|
||||
}
|
||||
else
|
||||
{
|
||||
theSW.SendUndef();
|
||||
}
|
||||
|
||||
theSW.Send(theEnt->RelatingGeneralProperty());
|
||||
|
||||
theSW.Send(theEnt->RelatedGeneralProperty());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void RWStepBasic_RWGeneralPropertyRelationship::Share(const Handle(StepBasic_GeneralPropertyRelationship)& theEnt,
|
||||
Interface_EntityIterator& theIter) const
|
||||
{
|
||||
theIter.AddItem(theEnt->RelatingGeneralProperty());
|
||||
|
||||
theIter.AddItem(theEnt->RelatedGeneralProperty());
|
||||
}
|
@@ -1,60 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _RWStepBasic_RWGeneralPropertyRelationship_HeaderFile
|
||||
#define _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
class StepData_StepReaderData;
|
||||
class Interface_Check;
|
||||
class StepBasic_GeneralProperty;
|
||||
class StepData_StepWriter;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
class StepBasic_GeneralPropertyRelationship;
|
||||
|
||||
//! Read & Write tool for GeneralPropertyRelationship
|
||||
class RWStepBasic_RWGeneralPropertyRelationship
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT RWStepBasic_RWGeneralPropertyRelationship();
|
||||
|
||||
//! Reads GeneralPropertyAssociation
|
||||
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const;
|
||||
|
||||
//! Writes GeneralPropertyAssociation
|
||||
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
|
||||
const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const;
|
||||
|
||||
//! Fills data for graph (shared items)
|
||||
Standard_EXPORT void Share (const Handle(StepBasic_GeneralPropertyRelationship)& theEnt,
|
||||
Interface_EntityIterator& theIter) const;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif // _RWStepBasic_RWGeneralPropertyRelationship_HeaderFile
|
@@ -8,8 +8,6 @@ RWStepRepr_RWAssemblyComponentUsageSubstitute.cxx
|
||||
RWStepRepr_RWAssemblyComponentUsageSubstitute.hxx
|
||||
RWStepRepr_RWBetweenShapeAspect.cxx
|
||||
RWStepRepr_RWBetweenShapeAspect.hxx
|
||||
RWStepRepr_RWBooleanRepresentationItem.cxx
|
||||
RWStepRepr_RWBooleanRepresentationItem.hxx
|
||||
RWStepRepr_RWCentreOfSymmetry.cxx
|
||||
RWStepRepr_RWCentreOfSymmetry.hxx
|
||||
RWStepRepr_RWCharacterizedRepresentation.cxx
|
||||
@@ -90,8 +88,6 @@ RWStepRepr_RWPropertyDefinitionRepresentation.cxx
|
||||
RWStepRepr_RWPropertyDefinitionRepresentation.hxx
|
||||
RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx
|
||||
RWStepRepr_RWQuantifiedAssemblyComponentUsage.hxx
|
||||
RWStepRepr_RWRealRepresentationItem.cxx
|
||||
RWStepRepr_RWRealRepresentationItem.hxx
|
||||
RWStepRepr_RWRepresentation.cxx
|
||||
RWStepRepr_RWRepresentation.hxx
|
||||
RWStepRepr_RWRepresentationContext.cxx
|
||||
|
@@ -1,50 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <RWStepRepr_RWBooleanRepresentationItem.hxx>
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
#include <StepData_StepWriter.hxx>
|
||||
#include <StepRepr_BooleanRepresentationItem.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
RWStepRepr_RWBooleanRepresentationItem::RWStepRepr_RWBooleanRepresentationItem()
|
||||
{
|
||||
}
|
||||
|
||||
void RWStepRepr_RWBooleanRepresentationItem::ReadStep(const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if (!theData->CheckNbParams(theNum, 2, theAch, "boolean_representation_item") ) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
theData->ReadString (theNum, 1, "name", theAch, aName);
|
||||
|
||||
// --- own field : value ---
|
||||
Standard_Boolean aValue;
|
||||
theData->ReadBoolean (theNum, 2, "value", theAch, aValue);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
theEnt->Init(aName, aValue);
|
||||
}
|
||||
|
||||
void RWStepRepr_RWBooleanRepresentationItem::WriteStep(StepData_StepWriter& theSW,
|
||||
const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const
|
||||
{
|
||||
theSW.Send(theEnt->Name());
|
||||
theSW.Send(theEnt->Value());
|
||||
}
|
@@ -1,45 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _RWStepRepr_RWBooleanRepresentationItem_HeaderFile
|
||||
#define _RWStepRepr_RWBooleanRepresentationItem_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
class StepData_StepReaderData;
|
||||
class Interface_Check;
|
||||
class StepRepr_BooleanRepresentationItem;
|
||||
class StepData_StepWriter;
|
||||
|
||||
|
||||
//! Read & Write Module for BooleanRepresentationItem
|
||||
class RWStepRepr_RWBooleanRepresentationItem
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT RWStepRepr_RWBooleanRepresentationItem();
|
||||
|
||||
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const;
|
||||
|
||||
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
|
||||
const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const;
|
||||
};
|
||||
#endif // _RWStepRepr_RWBooleanRepresentationItem_HeaderFile
|
@@ -1,50 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <RWStepRepr_RWRealRepresentationItem.hxx>
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
#include <StepData_StepWriter.hxx>
|
||||
#include <StepRepr_RealRepresentationItem.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
RWStepRepr_RWRealRepresentationItem::RWStepRepr_RWRealRepresentationItem()
|
||||
{
|
||||
}
|
||||
|
||||
void RWStepRepr_RWRealRepresentationItem::ReadStep(const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepRepr_RealRepresentationItem)& theEnt) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if (!theData->CheckNbParams (theNum, 2, theAch, "real_representation_item")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
theData->ReadString (theNum, 1, "name", theAch, aName);
|
||||
|
||||
// --- own field : value ---
|
||||
Standard_Real aValue;
|
||||
theData->ReadReal (theNum, 2, "value", theAch, aValue);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
theEnt->Init(aName, aValue);
|
||||
}
|
||||
|
||||
void RWStepRepr_RWRealRepresentationItem::WriteStep(StepData_StepWriter& theSW,
|
||||
const Handle(StepRepr_RealRepresentationItem)& theEnt) const
|
||||
{
|
||||
theSW.Send(theEnt->Name());
|
||||
theSW.Send(theEnt->Value());
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _RWStepRepr_RWRealRepresentationItem_HeaderFile
|
||||
#define _RWStepRepr_RWRealRepresentationItem_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
class StepData_StepReaderData;
|
||||
class Interface_Check;
|
||||
class StepRepr_RealRepresentationItem;
|
||||
class StepData_StepWriter;
|
||||
|
||||
|
||||
//! Read & Write Module for RealRepresentationItem
|
||||
class RWStepRepr_RWRealRepresentationItem
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT RWStepRepr_RWRealRepresentationItem();
|
||||
|
||||
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepRepr_RealRepresentationItem)& theEnt) const;
|
||||
|
||||
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
|
||||
const Handle(StepRepr_RealRepresentationItem)& theEnt) const;
|
||||
};
|
||||
#endif // _RWStepRepr_RWRealRepresentationItem_HeaderFile
|
@@ -27,7 +27,7 @@
|
||||
#include <Standard_Real.hxx>
|
||||
#include <StepVisual_FaceOrSurface.hxx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <TColStd_HArray1OfTransient.hxx>
|
||||
#include <TColStd_HArray2OfInteger.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepVisual_RWComplexTriangulatedFace
|
||||
@@ -118,16 +118,15 @@ void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_Ste
|
||||
}
|
||||
}
|
||||
|
||||
Handle(TColStd_HArray1OfTransient) aTriangleStrips;
|
||||
Handle(TColStd_HArray2OfInteger) aTriangleStrips;
|
||||
Standard_Integer sub7 = 0;
|
||||
if (theData->ReadSubList(theNum, 7, "triangle_strips", theCheck, sub7))
|
||||
{
|
||||
Standard_Integer nb0 = theData->NbParams(sub7);
|
||||
aTriangleStrips = new TColStd_HArray1OfTransient(1, nb0);
|
||||
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7,1));
|
||||
aTriangleStrips = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0);
|
||||
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
|
||||
{
|
||||
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7, i0));
|
||||
Handle(TColStd_HArray1OfInteger) aSingleTriangleStrip = new TColStd_HArray1OfInteger(1, nbj0);
|
||||
Standard_Integer subj7 = 0;
|
||||
if ( theData->ReadSubList (sub7, i0, "sub-part(triangle_strips)", theCheck, subj7) ) {
|
||||
Standard_Integer num4 = subj7;
|
||||
@@ -135,23 +134,21 @@ void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_Ste
|
||||
{
|
||||
Standard_Integer anIt0;
|
||||
theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
|
||||
aSingleTriangleStrip->SetValue(j0, anIt0);
|
||||
aTriangleStrips->SetValue(i0,j0, anIt0);
|
||||
}
|
||||
aTriangleStrips->SetValue(i0, aSingleTriangleStrip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Handle(TColStd_HArray1OfTransient) aTriangleFans;
|
||||
Handle(TColStd_HArray2OfInteger) aTriangleFans;
|
||||
Standard_Integer sub8 = 0;
|
||||
if (theData->ReadSubList(theNum, 8, "triangle_fans", theCheck, sub8))
|
||||
{
|
||||
Standard_Integer nb0 = theData->NbParams(sub8);
|
||||
aTriangleFans = new TColStd_HArray1OfTransient(1, nb0);
|
||||
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub8,1));
|
||||
aTriangleFans = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0);
|
||||
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
|
||||
{
|
||||
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub8, i0));
|
||||
Handle(TColStd_HArray1OfInteger) aSingleTriangleFan = new TColStd_HArray1OfInteger(1, nbj0);
|
||||
Standard_Integer subj8 = 0;
|
||||
if ( theData->ReadSubList (sub8, i0, "sub-part(triangle_fans)", theCheck, subj8) ) {
|
||||
Standard_Integer num4 = subj8;
|
||||
@@ -159,9 +156,8 @@ void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_Ste
|
||||
{
|
||||
Standard_Integer anIt0;
|
||||
theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
|
||||
aSingleTriangleFan->SetValue(j0, anIt0);
|
||||
aTriangleFans->SetValue(i0,j0, anIt0);
|
||||
}
|
||||
aTriangleFans->SetValue(i0, aSingleTriangleFan);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -223,14 +219,13 @@ void RWStepVisual_RWComplexTriangulatedFace::WriteStep (StepData_StepWriter& the
|
||||
theSW.CloseSub();
|
||||
|
||||
theSW.OpenSub();
|
||||
for (Standard_Integer i6 = 1; i6 <= theEnt->NbTriangleStrips(); i6++)
|
||||
for (Standard_Integer i6 = 1; i6 <= theEnt->TriangleStrips()->RowLength(); i6++)
|
||||
{
|
||||
theSW.NewLine(Standard_False);
|
||||
theSW.OpenSub();
|
||||
Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(theEnt->TriangleStrips()->Value(i6));
|
||||
for (Standard_Integer j6 = 1; j6 <= aTriangleStrip->Length(); j6++)
|
||||
for (Standard_Integer j6 = 1; j6 <= theEnt->TriangleStrips()->ColLength(); j6++)
|
||||
{
|
||||
Standard_Integer Var0 = aTriangleStrip->Value(j6);
|
||||
Standard_Integer Var0 = theEnt->TriangleStrips()->Value(i6,j6);
|
||||
theSW.Send(Var0);
|
||||
}
|
||||
theSW.CloseSub();
|
||||
@@ -238,14 +233,13 @@ void RWStepVisual_RWComplexTriangulatedFace::WriteStep (StepData_StepWriter& the
|
||||
theSW.CloseSub();
|
||||
|
||||
theSW.OpenSub();
|
||||
for (Standard_Integer i7 = 1; i7 <= theEnt->NbTriangleFans(); i7++)
|
||||
for (Standard_Integer i7 = 1; i7 <= theEnt->TriangleFans()->RowLength(); i7++)
|
||||
{
|
||||
theSW.NewLine(Standard_False);
|
||||
theSW.OpenSub();
|
||||
Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(theEnt->TriangleFans()->Value(i7));
|
||||
for (Standard_Integer j7 = 1; j7 <= aTriangleFan->Length(); j7++)
|
||||
for (Standard_Integer j7 = 1; j7 <= theEnt->TriangleFans()->ColLength(); j7++)
|
||||
{
|
||||
Standard_Integer Var0 = aTriangleFan->Value(j7);
|
||||
Standard_Integer Var0 = theEnt->TriangleFans()->Value(i7,j7);
|
||||
theSW.Send(Var0);
|
||||
}
|
||||
theSW.CloseSub();
|
||||
|
@@ -114,13 +114,11 @@ Interface_EntityIterator& theIter) const
|
||||
{
|
||||
|
||||
// Inherited fields of Representation
|
||||
if (!theEnt->StepRepr_Representation::Items().IsNull())
|
||||
|
||||
for (Standard_Integer i1 = 1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++)
|
||||
{
|
||||
for (Standard_Integer i1 = 1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++)
|
||||
{
|
||||
Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1);
|
||||
theIter.AddItem(Var0);
|
||||
}
|
||||
Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1);
|
||||
theIter.AddItem(Var0);
|
||||
}
|
||||
|
||||
theIter.AddItem(theEnt->StepRepr_Representation::ContextOfItems());
|
||||
|
@@ -34,7 +34,9 @@ namespace
|
||||
//=======================================================================
|
||||
RWStl_ConfigurationNode::RWStl_ConfigurationNode() :
|
||||
DE_ConfigurationNode()
|
||||
{}
|
||||
{
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : STEPCAFControl_ConfigurationNode
|
||||
@@ -44,6 +46,7 @@ RWStl_ConfigurationNode::RWStl_ConfigurationNode(const Handle(RWStl_Configuratio
|
||||
:DE_ConfigurationNode(theNode)
|
||||
{
|
||||
InternalParameters = theNode->InternalParameters;
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -34,7 +34,9 @@ namespace
|
||||
//=======================================================================
|
||||
STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode() :
|
||||
DE_ConfigurationNode()
|
||||
{}
|
||||
{
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : STEPCAFControl_ConfigurationNode
|
||||
@@ -43,7 +45,9 @@ STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode() :
|
||||
STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode(const Handle(STEPCAFControl_ConfigurationNode)& theNode)
|
||||
:DE_ConfigurationNode(theNode),
|
||||
InternalParameters(theNode->InternalParameters)
|
||||
{}
|
||||
{
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : Load
|
||||
@@ -112,8 +116,6 @@ bool STEPCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext
|
||||
theResource->BooleanVal("read.layer", InternalParameters.ReadLayer, aScope);
|
||||
InternalParameters.ReadProps =
|
||||
theResource->BooleanVal("read.props", InternalParameters.ReadProps, aScope);
|
||||
InternalParameters.ReadMetadata =
|
||||
theResource->BooleanVal("read.metadata", InternalParameters.ReadMetadata, aScope);
|
||||
|
||||
InternalParameters.WritePrecisionMode = (WriteMode_PrecisionMode)
|
||||
theResource->IntegerVal("write.precision.mode", InternalParameters.WritePrecisionMode, aScope);
|
||||
@@ -368,12 +370,6 @@ TCollection_AsciiString STEPCAFControl_ConfigurationNode::Save() const
|
||||
aResult += aScope + "read.props :\t " + InternalParameters.ReadProps + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Setting up the read.metadata parameter which is used to indicate read Metadata or not\n";
|
||||
aResult += "!Default value: 0(\"OFF\"). Available values: 0(\"OFF\"), 1(\"ON\")\n";
|
||||
aResult += aScope + "read.metadata :\t " + InternalParameters.ReadMetadata + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Write Parameters:\n";
|
||||
aResult += "!\n";
|
||||
|
@@ -207,7 +207,6 @@ public:
|
||||
bool ReadName = true; //<! NameMode is used to indicate read Name or not
|
||||
bool ReadLayer = true; //<! LayerMode is used to indicate read Layers or not
|
||||
bool ReadProps = true; //<! PropsMode is used to indicate read Validation properties or not
|
||||
bool ReadMetadata = true; //! Parameter for metadata reading
|
||||
|
||||
// Write
|
||||
WriteMode_PrecisionMode WritePrecisionMode = WriteMode_PrecisionMode_Average; //<! Specifies the mode of writing the resolution value into the STEP file
|
||||
|
@@ -185,7 +185,6 @@ bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath,
|
||||
aReader.SetNameMode(aNode->InternalParameters.ReadName);
|
||||
aReader.SetLayerMode(aNode->InternalParameters.ReadLayer);
|
||||
aReader.SetPropsMode(aNode->InternalParameters.ReadProps);
|
||||
aReader.SetMetaMode(aNode->InternalParameters.ReadMetadata);
|
||||
|
||||
IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid;
|
||||
aReadStat = aReader.ReadFile(thePath.ToCString());
|
||||
|
@@ -30,12 +30,9 @@
|
||||
#include <StepBasic_ConversionBasedUnitAndLengthUnit.hxx>
|
||||
#include <StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx>
|
||||
#include <StepBasic_ConversionBasedUnitAndMassUnit.hxx>
|
||||
#include <StepBasic_ConversionBasedUnitAndTimeUnit.hxx>
|
||||
#include <StepBasic_DerivedUnit.hxx>
|
||||
#include <StepBasic_DerivedUnitElement.hxx>
|
||||
#include <StepBasic_DocumentFile.hxx>
|
||||
#include <StepBasic_GeneralProperty.hxx>
|
||||
#include <StepBasic_GeneralPropertyAssociation.hxx>
|
||||
#include <StepBasic_MeasureValueMember.hxx>
|
||||
#include <StepBasic_NamedUnit.hxx>
|
||||
#include <StepBasic_Product.hxx>
|
||||
@@ -43,9 +40,6 @@
|
||||
#include <StepBasic_ProductDefinitionFormation.hxx>
|
||||
#include <StepBasic_ProductDefinitionWithAssociatedDocuments.hxx>
|
||||
#include <StepBasic_SiUnitAndLengthUnit.hxx>
|
||||
#include <StepBasic_SiUnitAndMassUnit.hxx>
|
||||
#include <StepBasic_SiUnitAndThermodynamicTemperatureUnit.hxx>
|
||||
#include <StepBasic_SiUnitAndTimeUnit.hxx>
|
||||
#include <StepData_GlobalFactors.hxx>
|
||||
#include <STEPCAFControl_Controller.hxx>
|
||||
#include <STEPCAFControl_DataMapOfPDExternFile.hxx>
|
||||
@@ -135,7 +129,6 @@
|
||||
#include <StepShape_DimensionalLocation.hxx>
|
||||
#include <StepShape_EdgeCurve.hxx>
|
||||
#include <StepShape_EdgeLoop.hxx>
|
||||
#include <StepShape_GeometricCurveSet.hxx>
|
||||
#include <StepShape_GeometricSet.hxx>
|
||||
#include <StepShape_HArray1OfFace.hxx>
|
||||
#include <StepShape_HArray1OfFaceBound.hxx>
|
||||
@@ -221,7 +214,6 @@
|
||||
#include <XSControl_WorkSession.hxx>
|
||||
#include <StepAP242_DraughtingModelItemAssociation.hxx>
|
||||
#include <StepAP242_GeometricItemSpecificUsage.hxx>
|
||||
#include <StepAP242_IdAttribute.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <STEPCAFControl_GDTProperty.hxx>
|
||||
#include <StepVisual_TessellatedAnnotationOccurrence.hxx>
|
||||
@@ -229,14 +221,6 @@
|
||||
#include <StepVisual_TessellatedCurveSet.hxx>
|
||||
#include <StepVisual_CoordinatesList.hxx>
|
||||
#include <NCollection_Vector.hxx>
|
||||
#include <StepRepr_BooleanRepresentationItem.hxx>
|
||||
#include <StepRepr_IntegerRepresentationItem.hxx>
|
||||
#include <StepRepr_PropertyDefinitionRelationship.hxx>
|
||||
#include <StepRepr_RealRepresentationItem.hxx>
|
||||
#include <StepRepr_ValueRepresentationItem.hxx>
|
||||
|
||||
#include <StepRepr_ShapeAspectRelationship.hxx>
|
||||
|
||||
|
||||
#include <TColgp_HArray1OfXYZ.hxx>
|
||||
#include <BRepBuilderAPI_MakeEdge.hxx>
|
||||
@@ -286,7 +270,6 @@ STEPCAFControl_Reader::STEPCAFControl_Reader()
|
||||
myNameMode(Standard_True),
|
||||
myLayerMode(Standard_True),
|
||||
myPropsMode(Standard_True),
|
||||
myMetaMode(Standard_True),
|
||||
mySHUOMode(Standard_False),
|
||||
myGDTMode(Standard_True),
|
||||
myMatMode(Standard_True),
|
||||
@@ -307,7 +290,6 @@ STEPCAFControl_Reader::STEPCAFControl_Reader(const Handle(XSControl_WorkSession)
|
||||
myNameMode(Standard_True),
|
||||
myLayerMode(Standard_True),
|
||||
myPropsMode(Standard_True),
|
||||
myMetaMode(Standard_True),
|
||||
mySHUOMode(Standard_False),
|
||||
myGDTMode(Standard_True),
|
||||
myMatMode(Standard_True),
|
||||
@@ -736,10 +718,6 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader,
|
||||
if (GetViewMode())
|
||||
ReadViews(reader.WS(), doc);
|
||||
|
||||
// read metadata
|
||||
if (GetMetaMode())
|
||||
ReadMetadata(reader.WS(), doc);
|
||||
|
||||
// Expand resulting CAF structure for sub-shapes (optionally with their
|
||||
// names) if requested
|
||||
ExpandSubShapes(STool, ShapePDMap);
|
||||
@@ -1739,7 +1717,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadSHUOs(const Handle(XSControl_WorkSes
|
||||
//function : GetMassConversionFactor
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static Standard_Boolean GetMassConversionFactor(const Handle(StepBasic_NamedUnit)& NU,
|
||||
static Standard_Boolean GetMassConversionFactor(Handle(StepBasic_NamedUnit)& NU,
|
||||
Standard_Real& afact)
|
||||
{
|
||||
afact = 1.;
|
||||
@@ -4837,26 +4815,6 @@ Standard_Boolean STEPCAFControl_Reader::GetPropsMode() const
|
||||
return myPropsMode;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetMetaMode
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void STEPCAFControl_Reader::SetMetaMode(const Standard_Boolean theMetaMode)
|
||||
{
|
||||
myMetaMode = theMetaMode;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetMetaMode
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean STEPCAFControl_Reader::GetMetaMode() const
|
||||
{
|
||||
return myMetaMode;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetSHUOMode
|
||||
//purpose :
|
||||
@@ -4937,478 +4895,3 @@ Standard_Boolean STEPCAFControl_Reader::GetViewMode() const
|
||||
{
|
||||
return myViewMode;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadMetadata
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean STEPCAFControl_Reader::ReadMetadata(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(TDocStd_Document)& theDoc) const
|
||||
{
|
||||
const Handle(Interface_InterfaceModel)& aModel = theWS->Model();
|
||||
const Handle(XSControl_TransferReader)& aTR = theWS->TransferReader();
|
||||
const Handle(Transfer_TransientProcess)& aTP = aTR->TransientProcess();
|
||||
Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main());
|
||||
if (aSTool.IsNull())
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
Standard_Integer aNb = aModel->NbEntities();
|
||||
STEPConstruct_Tool aTool(theWS);
|
||||
|
||||
TDF_LabelMap aGeneralLabelMap;
|
||||
NCollection_DataMap<TDF_Label, NCollection_Sequence<Handle(StepRepr_PropertyDefinition)>, TDF_LabelMapHasher> anAttrMap;
|
||||
NCollection_DataMap<TDF_Label, NCollection_Sequence<std::pair<TCollection_AsciiString, Handle(TCollection_HAsciiString)>>, TDF_LabelMapHasher> anExtraAttrMap;
|
||||
for (Standard_Integer anEntityInd = 1; anEntityInd <= aNb; ++anEntityInd)
|
||||
{
|
||||
Handle(Standard_Transient) anEntity = aModel->Value(anEntityInd);
|
||||
|
||||
// checking for Product attributes
|
||||
Handle(StepBasic_ProductDefinition) aProdDefinition = Handle(StepBasic_ProductDefinition)::DownCast(anEntity);
|
||||
if (!aProdDefinition.IsNull())
|
||||
{
|
||||
Handle(Transfer_Binder) aBinder = aTP->Find(aProdDefinition);
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
TopoDS_Shape aShape = TransferBRep::ShapeResult(aTP, aBinder);
|
||||
if (!aShape.IsNull())
|
||||
{
|
||||
TDF_Label aShapeLabel;
|
||||
if (myMap.Find(aShape, aShapeLabel))
|
||||
{
|
||||
aGeneralLabelMap.Add(aShapeLabel);
|
||||
NCollection_Sequence<std::pair<TCollection_AsciiString, Handle(TCollection_HAsciiString)>> anAttrSeq;
|
||||
Handle(StepBasic_Product) aProduct = aProdDefinition->Formation()->OfProduct();
|
||||
anAttrSeq.Append({ "ProductID", aProduct->Id() });
|
||||
anAttrSeq.Append({ "ProductName", aProduct->Name() });
|
||||
anAttrSeq.Append({ "Description", aProduct->Description() });
|
||||
anAttrSeq.Append({ "ProductDefinition", aProdDefinition->Description() });
|
||||
anExtraAttrMap.Bind(aShapeLabel, anAttrSeq);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// checking for User Defined Attributes
|
||||
Handle(StepBasic_GeneralProperty) aGeneralProp = Handle(StepBasic_GeneralProperty)::DownCast(anEntity);
|
||||
if (aGeneralProp.IsNull())
|
||||
continue;
|
||||
|
||||
Handle(StepBasic_GeneralPropertyAssociation) aPropAssociation;
|
||||
NCollection_List< Handle(StepRepr_PropertyDefinition)> aPropDefinitionList;
|
||||
Interface_EntityIterator aSharingListOfGP = theWS->Graph().Sharings(aGeneralProp);
|
||||
for (aSharingListOfGP.Start(); aSharingListOfGP.More(); aSharingListOfGP.Next())
|
||||
{
|
||||
aPropAssociation = Handle(StepBasic_GeneralPropertyAssociation)::DownCast(aSharingListOfGP.Value());
|
||||
if (aPropAssociation.IsNull())
|
||||
continue;
|
||||
|
||||
aPropDefinitionList.Append(aPropAssociation->PropertyDefinition());
|
||||
}
|
||||
|
||||
if (aPropDefinitionList.IsEmpty())
|
||||
continue;
|
||||
|
||||
NCollection_List<Handle(StepRepr_PropertyDefinition)> aGroupedProperties;
|
||||
NCollection_List< Handle(StepRepr_PropertyDefinition)>::Iterator aPropDefIter(aPropDefinitionList);
|
||||
for ( ; aPropDefIter.More(); aPropDefIter.Next())
|
||||
{
|
||||
Handle(StepRepr_PropertyDefinition) aPropDefinition = aPropDefIter.Value();
|
||||
|
||||
// check group of PropertyDefinition
|
||||
Interface_EntityIterator aSharingsListOfPD = theWS->Graph().Sharings(aPropDefinition);
|
||||
for (aSharingsListOfPD.Start(); aSharingsListOfPD.More(); aSharingsListOfPD.Next())
|
||||
{
|
||||
Handle(StepRepr_PropertyDefinitionRelationship) aRel =
|
||||
Handle(StepRepr_PropertyDefinitionRelationship)::DownCast(aSharingsListOfPD.Value());
|
||||
if (aRel.IsNull())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(StepRepr_PropertyDefinition) aGroupedProp = aRel->RelatedPropertyDefinition();
|
||||
if (!aGroupedProp.IsNull())
|
||||
{
|
||||
aGroupedProperties.Append(aGroupedProp);
|
||||
}
|
||||
}
|
||||
|
||||
NCollection_List<Handle(Transfer_Binder)> aBinders;
|
||||
Interface_EntityIterator aSharedListOfPD = theWS->Graph().Shareds(aPropDefinition);
|
||||
for (aSharedListOfPD.Start(); aSharedListOfPD.More(); aSharedListOfPD.Next())
|
||||
{
|
||||
Handle(Transfer_Binder) aBinder;
|
||||
Handle(StepBasic_ProductDefinition) aProductDefinition =
|
||||
Handle(StepBasic_ProductDefinition)::DownCast(aSharedListOfPD.Value());
|
||||
if (!aProductDefinition.IsNull())
|
||||
{
|
||||
aBinder = aTP->Find(aProductDefinition);
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
aBinders.Append(aBinder);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(StepRepr_ProductDefinitionShape) aProductDefinitionShape =
|
||||
Handle(StepRepr_ProductDefinitionShape)::DownCast(aSharedListOfPD.Value());
|
||||
if (!aProductDefinitionShape.IsNull())
|
||||
{
|
||||
Handle(StepBasic_ProductDefinition) aProductDef =
|
||||
aProductDefinitionShape->Definition().ProductDefinition();
|
||||
aBinder = aTP->Find(aProductDef);
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
aBinders.Append(aBinder);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(StepRepr_NextAssemblyUsageOccurrence) aNextAssembUsOcc =
|
||||
Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(aSharedListOfPD.Value());
|
||||
if (!aNextAssembUsOcc.IsNull())
|
||||
{
|
||||
aBinder = aTP->Find(aNextAssembUsOcc);
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
aBinders.Append(aBinder);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aShapeAspect =
|
||||
Handle(StepRepr_ShapeAspect)::DownCast(aSharedListOfPD.Value());
|
||||
if (!aShapeAspect.IsNull())
|
||||
{
|
||||
TDF_Label aLabel;
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
TopoDS_Shape aShape = TransferBRep::ShapeResult(aTP, aBinder);
|
||||
if (aShape.IsNull())
|
||||
continue;
|
||||
|
||||
if (myMap.IsBound(aShape))
|
||||
{
|
||||
aLabel = myMap.Find(aShape);
|
||||
}
|
||||
}
|
||||
Interface_EntityIterator aSharedListOfSA = theWS->Graph().Sharings(aShapeAspect);
|
||||
for (aSharedListOfSA.Start(); aSharedListOfSA.More(); aSharedListOfSA.Next())
|
||||
{
|
||||
Handle(StepAP242_DraughtingModelItemAssociation) aDMIA =
|
||||
Handle(StepAP242_DraughtingModelItemAssociation)::DownCast(aSharedListOfSA.Value());
|
||||
if (!aDMIA.IsNull())
|
||||
break;
|
||||
|
||||
Handle(StepAP242_ItemIdentifiedRepresentationUsage) anItemIdentUsage =
|
||||
Handle(StepAP242_ItemIdentifiedRepresentationUsage)::DownCast(aSharedListOfSA.Value());
|
||||
if (!anItemIdentUsage.IsNull())
|
||||
{
|
||||
for (Standard_Integer anIndex = 1; anIndex <= anItemIdentUsage->NbIdentifiedItem(); ++anIndex)
|
||||
{
|
||||
Handle(StepRepr_RepresentationItem) aReprItem = anItemIdentUsage->IdentifiedItemValue(anIndex);
|
||||
if (aReprItem.IsNull())
|
||||
continue;
|
||||
aBinder = aTP->Find(aReprItem);
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
aBinders.Append(aBinder);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(StepRepr_PropertyDefinition) aPropDef =
|
||||
Handle(StepRepr_PropertyDefinition)::DownCast(aSharedListOfSA.Value());
|
||||
if (!aPropDef.IsNull() && aPropDef != aPropDefinition)
|
||||
{
|
||||
Interface_EntityIterator aSharingListOfPD = theWS->Graph().Sharings(aPropDef);
|
||||
for (aSharingListOfPD.Start(); aSharingListOfPD.More(); aSharingListOfPD.Next())
|
||||
{
|
||||
Handle(StepShape_ShapeDefinitionRepresentation) aShDef =
|
||||
Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSharingListOfPD.Value());
|
||||
if (aShDef.IsNull())
|
||||
continue;
|
||||
|
||||
findReprItems(theWS, aShDef, aBinders);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(StepShape_ShapeDefinitionRepresentation) aShapeDefRepr =
|
||||
Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSharedListOfSA.Value());
|
||||
if (!aShapeDefRepr.IsNull())
|
||||
{
|
||||
findReprItems(theWS, aShapeDefRepr, aBinders);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (aBinders.IsEmpty())
|
||||
continue;
|
||||
|
||||
TDF_LabelSequence aLabelSeq;
|
||||
NCollection_List<Handle(Transfer_Binder)>::Iterator aBindIt(aBinders);
|
||||
for (; aBindIt.More(); aBindIt.Next())
|
||||
{
|
||||
TopoDS_Shape aShape = TransferBRep::ShapeResult(aTP, aBindIt.Value());
|
||||
if (aShape.IsNull())
|
||||
continue;
|
||||
|
||||
TDF_Label aShapeLabel;
|
||||
if (myMap.Find(aShape, aShapeLabel))
|
||||
{
|
||||
aLabelSeq.Append(aShapeLabel);
|
||||
aGeneralLabelMap.Add(aShapeLabel);
|
||||
}
|
||||
}
|
||||
|
||||
// fill user defined attribute map
|
||||
for (TDF_LabelSequence::Iterator aLabelIt(aLabelSeq); aLabelIt.More(); aLabelIt.Next())
|
||||
{
|
||||
NCollection_Sequence<Handle(StepRepr_PropertyDefinition)>* aPropSeqPtr = anAttrMap.ChangeSeek(aLabelIt.Value());
|
||||
if (aPropSeqPtr == NULL)
|
||||
{
|
||||
NCollection_Sequence<Handle(StepRepr_PropertyDefinition)> aPropSeq;
|
||||
aPropSeqPtr = anAttrMap.Bound(aLabelIt.Value(), aPropSeq);
|
||||
}
|
||||
aPropSeqPtr->Append(aPropDefinition);
|
||||
if (!aGroupedProperties.IsEmpty())
|
||||
{
|
||||
NCollection_List<Handle(StepRepr_PropertyDefinition)>::Iterator aPropIt(aGroupedProperties);
|
||||
for (; aPropIt.More(); aPropIt.Next())
|
||||
{
|
||||
aPropSeqPtr->Append(aPropIt.Value());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// create metadata
|
||||
for (TDF_LabelMap::Iterator aLabelIt(aGeneralLabelMap); aLabelIt.More(); aLabelIt.Next())
|
||||
{
|
||||
Handle(TDataStd_NamedData) anAttr;
|
||||
if (!aLabelIt.Value().FindAttribute(TDataStd_NamedData::GetID(), anAttr))
|
||||
{
|
||||
anAttr = new TDataStd_NamedData;
|
||||
aLabelIt.Value().AddAttribute(anAttr);
|
||||
}
|
||||
NCollection_Sequence<Handle(StepRepr_PropertyDefinition)> anAttrib;
|
||||
if (anAttrMap.Find(aLabelIt.Value(), anAttrib))
|
||||
{
|
||||
NCollection_Sequence<Handle(StepRepr_PropertyDefinition)>::Iterator aPropIt(anAttrib);
|
||||
for (; aPropIt.More(); aPropIt.Next())
|
||||
{
|
||||
fillAttributes(theWS, aPropIt.Value(), anAttr);
|
||||
}
|
||||
}
|
||||
NCollection_Sequence<std::pair<TCollection_AsciiString, Handle(TCollection_HAsciiString)>> aPairSeq;
|
||||
if (anExtraAttrMap.Find(aLabelIt.Value(), aPairSeq))
|
||||
{
|
||||
NCollection_Sequence<std::pair<TCollection_AsciiString, Handle(TCollection_HAsciiString)>>::Iterator aSeqIt(aPairSeq);
|
||||
for (; aSeqIt.More(); aSeqIt.Next())
|
||||
{
|
||||
const auto& aPair = aSeqIt.Value();
|
||||
if (aPair.second.IsNull() || aPair.second->String().IsEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
anAttr->SetString(aPair.first, aPair.second->String());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : findReprItems
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean STEPCAFControl_Reader::findReprItems(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(StepShape_ShapeDefinitionRepresentation)& theShDefRepr,
|
||||
NCollection_List<Handle(Transfer_Binder)>& theBinders) const
|
||||
{
|
||||
Handle(StepRepr_Representation) aRepr = theShDefRepr->UsedRepresentation();
|
||||
if (aRepr.IsNull())
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
Handle(Transfer_Binder) aBinder;
|
||||
const Handle(Transfer_TransientProcess)& aTP = theWS->TransferReader()->TransientProcess();
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aReprItems = aRepr->Items();
|
||||
if (!aReprItems->IsEmpty())
|
||||
{
|
||||
for (Standard_Integer anInd = aReprItems->Lower(); anInd <= aReprItems->Upper(); anInd++)
|
||||
{
|
||||
Handle(StepRepr_RepresentationItem) aReprItem = aReprItems->Value(anInd);
|
||||
aBinder = aTP->Find(aReprItem);
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
theBinders.Append(aBinder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : fillAttributes
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean STEPCAFControl_Reader::fillAttributes(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(StepRepr_PropertyDefinition)& thePropDef,
|
||||
Handle(TDataStd_NamedData)& theAttr) const
|
||||
{
|
||||
// skip if key is null
|
||||
if (thePropDef->Name().IsNull())
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
Handle(StepRepr_PropertyDefinitionRepresentation) aPropDefRepr;
|
||||
Interface_EntityIterator aSharingListOfPD = theWS->Graph().Sharings(thePropDef);
|
||||
for (aSharingListOfPD.Start(); aSharingListOfPD.More(); aSharingListOfPD.Next())
|
||||
{
|
||||
aPropDefRepr = Handle(StepRepr_PropertyDefinitionRepresentation)::DownCast(aSharingListOfPD.Value());
|
||||
if (aPropDefRepr.IsNull())
|
||||
continue;
|
||||
|
||||
Handle(StepRepr_Representation) aUsedRepr = aPropDefRepr->UsedRepresentation();
|
||||
if (aUsedRepr.IsNull())
|
||||
continue;
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aReprItems = aUsedRepr->Items();
|
||||
if (!aReprItems.IsNull())
|
||||
{
|
||||
for (Standard_Integer anIndex = aReprItems->Lower(); anIndex <= aReprItems->Upper(); anIndex++)
|
||||
{
|
||||
Handle(StepRepr_RepresentationItem) anItem = aReprItems->Value(anIndex);
|
||||
if (anItem.IsNull())
|
||||
continue;
|
||||
|
||||
if (anItem->IsKind(STANDARD_TYPE(StepRepr_DescriptiveRepresentationItem)))
|
||||
{
|
||||
Handle(StepRepr_DescriptiveRepresentationItem) aDescrItem = Handle(StepRepr_DescriptiveRepresentationItem)::DownCast(anItem);
|
||||
Handle(TCollection_HAsciiString) aDescription = aDescrItem->Description();
|
||||
theAttr->SetString(thePropDef->Name()->ToCString(), aDescription->ToCString());
|
||||
}
|
||||
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_MeasureRepresentationItem)))
|
||||
{
|
||||
Handle(StepRepr_MeasureRepresentationItem) aMeasureItem = Handle(StepRepr_MeasureRepresentationItem)::DownCast(anItem);
|
||||
Standard_Real aValue = aMeasureItem->Measure()->ValueComponent();
|
||||
TCollection_AsciiString aValType = aMeasureItem->Measure()->ValueComponentMember()->Name();
|
||||
StepBasic_Unit anUnit = aMeasureItem->Measure()->UnitComponent();
|
||||
if (!anUnit.IsNull())
|
||||
{
|
||||
Standard_Real aParam = 1.;
|
||||
if (anUnit.Type() == STANDARD_TYPE(StepBasic_DerivedUnit))
|
||||
{
|
||||
Handle(StepBasic_DerivedUnit) aDUnit = anUnit.DerivedUnit();
|
||||
for (Standard_Integer anInd = 1; anInd <= aDUnit->NbElements(); ++anInd)
|
||||
{
|
||||
Handle(StepBasic_DerivedUnitElement) aDUElem = aDUnit->ElementsValue(anInd);
|
||||
Standard_Real anExp = aDUElem->Exponent();
|
||||
Handle(StepBasic_NamedUnit) aNUnit = aDUElem->Unit();
|
||||
if (!aNUnit.IsNull())
|
||||
{
|
||||
if (aNUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit)) ||
|
||||
aNUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit)))
|
||||
{
|
||||
STEPConstruct_UnitContext anUnitCtx;
|
||||
anUnitCtx.ComputeFactors(aNUnit);
|
||||
if (aValType == "VOLUME_MEASURE")
|
||||
{
|
||||
aParam = pow(anUnitCtx.LengthFactor(), anExp);
|
||||
}
|
||||
else
|
||||
{
|
||||
aParam = aParam * pow(anUnitCtx.LengthFactor()/1000, anExp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
STEPConstruct_UnitContext anUnitCtx;
|
||||
anUnitCtx.ComputeFactors(aNUnit);
|
||||
if (anUnitCtx.AreaDone())
|
||||
aParam = anUnitCtx.AreaFactor();
|
||||
if (anUnitCtx.LengthDone())
|
||||
{
|
||||
Standard_Real aLengthFactor = anUnitCtx.LengthFactor();
|
||||
aParam *= pow(aLengthFactor, anExp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
aValue = aValue * aParam;
|
||||
}
|
||||
else
|
||||
{
|
||||
Handle(StepBasic_NamedUnit) aNUnit = anUnit.NamedUnit();
|
||||
if (!aNUnit.IsNull())
|
||||
{
|
||||
if (aNUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndMassUnit)))
|
||||
{
|
||||
Standard_Real aFact = 1.;
|
||||
if (GetMassConversionFactor(aNUnit, aFact))
|
||||
{
|
||||
aValue *= aFact;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
STEPConstruct_UnitContext anUnitCtx;
|
||||
anUnitCtx.ComputeFactors(aNUnit);
|
||||
if (anUnitCtx.AreaDone())
|
||||
aParam = anUnitCtx.AreaFactor();
|
||||
if (anUnitCtx.VolumeDone())
|
||||
aParam = anUnitCtx.VolumeFactor();
|
||||
if (anUnitCtx.LengthDone())
|
||||
aParam = anUnitCtx.LengthFactor();
|
||||
|
||||
aValue *= aParam;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
theAttr->SetReal(thePropDef->Name()->ToCString(), aValue);
|
||||
}
|
||||
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_ValueRepresentationItem)))
|
||||
{
|
||||
Handle(StepRepr_ValueRepresentationItem) aValueItem = Handle(StepRepr_ValueRepresentationItem)::DownCast(anItem);
|
||||
Handle(StepBasic_MeasureValueMember) aMeasureValueMem = aValueItem->ValueComponentMember();
|
||||
Interface_ParamType aParamType = aMeasureValueMem->ParamType();
|
||||
if (aParamType == Interface_ParamInteger)
|
||||
{
|
||||
theAttr->SetInteger(thePropDef->Name()->ToCString(), aMeasureValueMem->Integer());
|
||||
}
|
||||
else if (aParamType == Interface_ParamReal)
|
||||
{
|
||||
theAttr->SetReal(thePropDef->Name()->ToCString(), aMeasureValueMem->Real());
|
||||
}
|
||||
}
|
||||
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_IntegerRepresentationItem)))
|
||||
{
|
||||
Handle(StepRepr_IntegerRepresentationItem) anIntegerItem = Handle(StepRepr_IntegerRepresentationItem)::DownCast(anItem);
|
||||
theAttr->SetInteger(thePropDef->Name()->ToCString(), anIntegerItem->Value());
|
||||
}
|
||||
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_RealRepresentationItem)))
|
||||
{
|
||||
Handle(StepRepr_RealRepresentationItem) aRealItem = Handle(StepRepr_RealRepresentationItem)::DownCast(anItem);
|
||||
theAttr->SetReal(thePropDef->Name()->ToCString(), aRealItem->Value());
|
||||
}
|
||||
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_BooleanRepresentationItem)))
|
||||
{
|
||||
Handle(StepRepr_BooleanRepresentationItem) aBoolItem = Handle(StepRepr_BooleanRepresentationItem)::DownCast(anItem);
|
||||
theAttr->SetInteger(thePropDef->Name()->ToCString(), aBoolItem->Value());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Standard_True;
|
||||
}
|
||||
|
@@ -28,21 +28,16 @@
|
||||
#include <XCAFDimTolObjects_DatumModifWithValue.hxx>
|
||||
|
||||
class XSControl_WorkSession;
|
||||
class TDataStd_NamedData;
|
||||
class TDocStd_Document;
|
||||
class STEPCAFControl_ExternFile;
|
||||
class TopoDS_Shape;
|
||||
class XCAFDoc_ShapeTool;
|
||||
class StepRepr_RepresentationItem;
|
||||
class Transfer_TransientProcess;
|
||||
class StepBasic_NamedUnit;
|
||||
class StepShape_ConnectedFaceSet;
|
||||
class StepShape_ShapeDefinitionRepresentation;
|
||||
class StepRepr_NextAssemblyUsageOccurrence;
|
||||
class StepRepr_PropertyDefinition;
|
||||
class STEPConstruct_Tool;
|
||||
class StepDimTol_Datum;
|
||||
class Transfer_Binder;
|
||||
|
||||
|
||||
//! Provides a tool to read STEP file and put it into
|
||||
@@ -160,11 +155,6 @@ public:
|
||||
Standard_EXPORT void SetPropsMode (const Standard_Boolean propsmode);
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetPropsMode() const;
|
||||
|
||||
//! MetaMode for indicate read Metadata or not.
|
||||
Standard_EXPORT void SetMetaMode(const Standard_Boolean theMetaMode);
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetMetaMode() const;
|
||||
|
||||
//! Set SHUO mode for indicate write SHUO or not.
|
||||
Standard_EXPORT void SetSHUOMode (const Standard_Boolean shuomode);
|
||||
@@ -232,11 +222,6 @@ protected:
|
||||
//! model and assigns them to corresponding labels in the DECAF
|
||||
//! document
|
||||
Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const;
|
||||
|
||||
//! Reads metadata assigned to shapes in the STEP model and
|
||||
//! assigns them to corresponding labels in the DECAF document
|
||||
Standard_EXPORT Standard_Boolean ReadMetadata(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(TDocStd_Document)& theDoc) const;
|
||||
|
||||
//! Reads layers of parts defined in the STEP model and
|
||||
//! set reference between shape and layers in the DECAF document
|
||||
@@ -313,16 +298,6 @@ private:
|
||||
void prepareUnits(const Handle(StepData_StepModel)& theModel,
|
||||
const Handle(TDocStd_Document)& theDoc) const;
|
||||
|
||||
//! Find RepresentationItems
|
||||
Standard_Boolean findReprItems(const Handle(XSControl_WorkSession) & theWS,
|
||||
const Handle(StepShape_ShapeDefinitionRepresentation) & theShDefRepr,
|
||||
NCollection_List<Handle(Transfer_Binder)>& theBinders) const;
|
||||
|
||||
//! Fill metadata
|
||||
Standard_Boolean fillAttributes(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(StepRepr_PropertyDefinition)& thePropDef,
|
||||
Handle(TDataStd_NamedData)& theAttr) const;
|
||||
|
||||
private:
|
||||
|
||||
STEPControl_Reader myReader;
|
||||
@@ -332,7 +307,6 @@ private:
|
||||
Standard_Boolean myNameMode;
|
||||
Standard_Boolean myLayerMode;
|
||||
Standard_Boolean myPropsMode;
|
||||
Standard_Boolean myMetaMode;
|
||||
Standard_Boolean mySHUOMode;
|
||||
Standard_Boolean myGDTMode;
|
||||
Standard_Boolean myMatMode;
|
||||
|
@@ -18,7 +18,6 @@
|
||||
|
||||
// paralleling with Intel TBB
|
||||
#ifdef HAVE_TBB
|
||||
#pragma comment (lib, "tbbmalloc.lib")
|
||||
#include <tbb/scalable_allocator.h>
|
||||
using namespace tbb;
|
||||
#else
|
||||
|
@@ -34,7 +34,7 @@
|
||||
|
||||
// Primary definitions
|
||||
#define OCC_VERSION_MAJOR 7
|
||||
#define OCC_VERSION_MINOR 7
|
||||
#define OCC_VERSION_MINOR 8
|
||||
#define OCC_VERSION_MAINTENANCE 0
|
||||
|
||||
//! This macro must be commented in official release, and set to non-empty
|
||||
@@ -42,12 +42,12 @@
|
||||
//! - "dev" for development version between releases
|
||||
//! - "beta..." or "rc..." for beta releases or release candidates
|
||||
//! - "project..." for version containing project-specific fixes
|
||||
//#define OCC_VERSION_DEVELOPMENT "dev"
|
||||
#define OCC_VERSION_DEVELOPMENT "dev"
|
||||
|
||||
// Derived (manually): version as real and string (major.minor)
|
||||
#define OCC_VERSION 7.7
|
||||
#define OCC_VERSION_STRING "7.7"
|
||||
#define OCC_VERSION_COMPLETE "7.7.0"
|
||||
#define OCC_VERSION 7.8
|
||||
#define OCC_VERSION_STRING "7.8"
|
||||
#define OCC_VERSION_COMPLETE "7.8.0"
|
||||
|
||||
//! Derived: extended version as string ("major.minor.maintenance.dev")
|
||||
#ifdef OCC_VERSION_DEVELOPMENT
|
||||
|
@@ -158,8 +158,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI
|
||||
#include <StepShape_GeometricallyBoundedWireframeShapeRepresentation.hxx>
|
||||
#include <StepRepr_GlobalUncertaintyAssignedContext.hxx>
|
||||
#include <StepRepr_GlobalUnitAssignedContext.hxx>
|
||||
#include <StepBasic_GeneralPropertyAssociation.hxx>
|
||||
#include <StepBasic_GeneralPropertyRelationship.hxx>
|
||||
#include <StepBasic_GroupRelationship.hxx>
|
||||
#include <StepShape_HalfSpaceSolid.hxx>
|
||||
#include <StepGeom_Hyperbola.hxx>
|
||||
@@ -641,9 +639,7 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx>
|
||||
#include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <StepRepr_BooleanRepresentationItem.hxx>
|
||||
#include <StepRepr_IntegerRepresentationItem.hxx>
|
||||
#include <StepRepr_RealRepresentationItem.hxx>
|
||||
#include <StepRepr_ValueRepresentationItem.hxx>
|
||||
#include <StepAP242_DraughtingModelItemAssociation.hxx>
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
|
||||
@@ -1562,10 +1558,6 @@ StepAP214_Protocol::StepAP214_Protocol ()
|
||||
types.Bind(STANDARD_TYPE(StepVisual_ComplexTriangulatedSurfaceSet), 816);
|
||||
types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTessellatedEdge), 817);
|
||||
types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTriangulatedFace), 818);
|
||||
types.Bind(STANDARD_TYPE(StepBasic_GeneralPropertyAssociation), 819);
|
||||
types.Bind(STANDARD_TYPE(StepBasic_GeneralPropertyRelationship), 820);
|
||||
types.Bind(STANDARD_TYPE(StepRepr_BooleanRepresentationItem), 821);
|
||||
types.Bind(STANDARD_TYPE(StepRepr_RealRepresentationItem), 822);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -135,10 +135,6 @@ StepBasic_ExternalSource.cxx
|
||||
StepBasic_ExternalSource.hxx
|
||||
StepBasic_GeneralProperty.cxx
|
||||
StepBasic_GeneralProperty.hxx
|
||||
StepBasic_GeneralPropertyAssociation.cxx
|
||||
StepBasic_GeneralPropertyAssociation.hxx
|
||||
StepBasic_GeneralPropertyRelationship.cxx
|
||||
StepBasic_GeneralPropertyRelationship.hxx
|
||||
StepBasic_Group.cxx
|
||||
StepBasic_Group.hxx
|
||||
StepBasic_GroupAssignment.cxx
|
||||
|
@@ -1,117 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <StepBasic_GeneralPropertyAssociation.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(StepBasic_GeneralPropertyAssociation, Standard_Transient)
|
||||
|
||||
//=======================================================================
|
||||
//function : StepBasic_GeneralPropertyAssociation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
StepBasic_GeneralPropertyAssociation::StepBasic_GeneralPropertyAssociation ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Init
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyAssociation::Init (const Handle(TCollection_HAsciiString)& aName,
|
||||
const Handle(TCollection_HAsciiString)& aDescription,
|
||||
const Handle(StepBasic_GeneralProperty)& aGeneralProperty,
|
||||
const Handle(StepRepr_PropertyDefinition)& aPropertyDefinition)
|
||||
{
|
||||
theName = aName;
|
||||
|
||||
theDescription = aDescription;
|
||||
|
||||
theGeneralProperty = aGeneralProperty;
|
||||
|
||||
thePropertyDefinition = aPropertyDefinition;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Name
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyAssociation::Name() const
|
||||
{
|
||||
return theName;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetName
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyAssociation::SetName(const Handle(TCollection_HAsciiString)& aName)
|
||||
{
|
||||
theName = aName;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Description
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyAssociation::Description() const
|
||||
{
|
||||
return theDescription;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetDescription
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyAssociation::SetDescription (const Handle(TCollection_HAsciiString)& aDescription)
|
||||
{
|
||||
theDescription = aDescription;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GeneralProperty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(StepBasic_GeneralProperty) StepBasic_GeneralPropertyAssociation::GeneralProperty() const
|
||||
{
|
||||
return theGeneralProperty;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetGeneralProperty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyAssociation::SetGeneralProperty(const Handle(StepBasic_GeneralProperty)& aGeneralProperty)
|
||||
{
|
||||
theGeneralProperty = aGeneralProperty;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : PropertyDefinition
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(StepRepr_PropertyDefinition) StepBasic_GeneralPropertyAssociation::PropertyDefinition() const
|
||||
{
|
||||
return thePropertyDefinition;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetPropertyDefinition
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyAssociation::SetPropertyDefinition(const Handle(StepRepr_PropertyDefinition)& aPropertyDefinition)
|
||||
{
|
||||
thePropertyDefinition = aPropertyDefinition;
|
||||
}
|
@@ -1,84 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StepBasic_GeneralPropertyAssociation_HeaderFile
|
||||
#define _StepBasic_GeneralPropertyAssociation_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
class TCollection_HAsciiString;
|
||||
class StepBasic_GeneralProperty;
|
||||
class StepRepr_PropertyDefinition;
|
||||
|
||||
DEFINE_STANDARD_HANDLE(StepBasic_GeneralPropertyAssociation, Standard_Transient)
|
||||
|
||||
//! Representation of STEP entity GeneralPropertyAssociation
|
||||
class StepBasic_GeneralPropertyAssociation : public Standard_Transient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT StepBasic_GeneralPropertyAssociation();
|
||||
|
||||
//! Initialize all fields (own and inherited)
|
||||
Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName,
|
||||
const Handle(TCollection_HAsciiString)& aDescription,
|
||||
const Handle(StepBasic_GeneralProperty)& aGeneralProperty,
|
||||
const Handle(StepRepr_PropertyDefinition)& aPropertyDefinition);
|
||||
|
||||
//! Returns field Name
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) Name() const;
|
||||
|
||||
//! Set field Name
|
||||
Standard_EXPORT void SetName(const Handle(TCollection_HAsciiString)& Name);
|
||||
|
||||
//! Returns field Description
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) Description() const;
|
||||
|
||||
//! Set field Description
|
||||
Standard_EXPORT void SetDescription(const Handle(TCollection_HAsciiString)& Description);
|
||||
|
||||
//! Returns field GeneralProperty
|
||||
Standard_EXPORT Handle(StepBasic_GeneralProperty) GeneralProperty() const;
|
||||
|
||||
//! Set field GeneralProperty
|
||||
Standard_EXPORT void SetGeneralProperty(const Handle(StepBasic_GeneralProperty)& GeneralProperty);
|
||||
|
||||
//! Returns field PropertyDefinition
|
||||
Standard_EXPORT Handle(StepRepr_PropertyDefinition) PropertyDefinition() const;
|
||||
|
||||
//! Set field PropertyDefinition
|
||||
Standard_EXPORT void SetPropertyDefinition(const Handle(StepRepr_PropertyDefinition)& PropertyDefinition);
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(StepBasic_GeneralPropertyAssociation, Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Handle(TCollection_HAsciiString) theName;
|
||||
Handle(TCollection_HAsciiString) theDescription;
|
||||
Handle(StepBasic_GeneralProperty) theGeneralProperty;
|
||||
Handle(StepRepr_PropertyDefinition) thePropertyDefinition;
|
||||
|
||||
};
|
||||
|
||||
#endif // _StepBasic_GeneralPropertyAssociation_HeaderFile
|
@@ -1,137 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <StepBasic_GeneralProperty.hxx>
|
||||
#include <StepBasic_GeneralPropertyRelationship.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(StepBasic_GeneralPropertyRelationship, Standard_Transient)
|
||||
|
||||
//=======================================================================
|
||||
//function : StepBasic_GeneralPropertyRelationship
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
StepBasic_GeneralPropertyRelationship::StepBasic_GeneralPropertyRelationship ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Init
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyRelationship::Init(const Handle(TCollection_HAsciiString)& aName,
|
||||
const Standard_Boolean hasDescription,
|
||||
const Handle(TCollection_HAsciiString)& aDescription,
|
||||
const Handle(StepBasic_GeneralProperty)& aRelatingGeneralProperty,
|
||||
const Handle(StepBasic_GeneralProperty)& aRelatedGeneralProperty)
|
||||
{
|
||||
theName = aName;
|
||||
|
||||
defDescription = hasDescription;
|
||||
if (defDescription) {
|
||||
theDescription = aDescription;
|
||||
}
|
||||
else theDescription.Nullify();
|
||||
|
||||
theRelatingGeneralProperty = aRelatingGeneralProperty;
|
||||
|
||||
theRelatedGeneralProperty = aRelatedGeneralProperty;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Name
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyRelationship::Name() const
|
||||
{
|
||||
return theName;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetName
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyRelationship::SetName(const Handle(TCollection_HAsciiString)& aName)
|
||||
{
|
||||
theName = aName;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : HasDescription
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean StepBasic_GeneralPropertyRelationship::HasDescription() const
|
||||
{
|
||||
return defDescription;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Description
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyRelationship::Description() const
|
||||
{
|
||||
return theDescription;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetDescription
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyRelationship::SetDescription (const Handle(TCollection_HAsciiString)& aDescription)
|
||||
{
|
||||
defDescription = true;
|
||||
if (aDescription.IsNull())
|
||||
{
|
||||
defDescription = false;
|
||||
}
|
||||
theDescription = aDescription;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : RelatingGeneralProperty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(StepBasic_GeneralProperty) StepBasic_GeneralPropertyRelationship::RelatingGeneralProperty() const
|
||||
{
|
||||
return theRelatingGeneralProperty;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetRelatingGeneralProperty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyRelationship::SetRelatingGeneralProperty(const Handle(StepBasic_GeneralProperty)& aRelatingGeneralProperty)
|
||||
{
|
||||
theRelatingGeneralProperty = aRelatingGeneralProperty;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : RelatedGeneralProperty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(StepBasic_GeneralProperty) StepBasic_GeneralPropertyRelationship::RelatedGeneralProperty() const
|
||||
{
|
||||
return theRelatedGeneralProperty;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetRelatedGeneralProperty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyRelationship::SetRelatedGeneralProperty(const Handle(StepBasic_GeneralProperty)& aRelatedGeneralProperty)
|
||||
{
|
||||
theRelatedGeneralProperty = aRelatedGeneralProperty;
|
||||
}
|
@@ -1,88 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StepBasic_GeneralPropertyRelationship_HeaderFile
|
||||
#define _StepBasic_GeneralPropertyRelationship_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
class TCollection_HAsciiString;
|
||||
class StepBasic_GeneralProperty;
|
||||
|
||||
DEFINE_STANDARD_HANDLE(StepBasic_GeneralPropertyRelationship, Standard_Transient)
|
||||
|
||||
//! Representation of STEP entity GeneralPropertyRelationship
|
||||
class StepBasic_GeneralPropertyRelationship : public Standard_Transient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT StepBasic_GeneralPropertyRelationship();
|
||||
|
||||
//! Initialize all fields (own and inherited)
|
||||
Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName,
|
||||
const Standard_Boolean hasDescription,
|
||||
const Handle(TCollection_HAsciiString)& aDescription,
|
||||
const Handle(StepBasic_GeneralProperty)& aRelatingGeneralProperty,
|
||||
const Handle(StepBasic_GeneralProperty)& aRelatedGeneralProperty);
|
||||
|
||||
//! Returns field Name
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) Name() const;
|
||||
|
||||
//! Set field Name
|
||||
Standard_EXPORT void SetName(const Handle(TCollection_HAsciiString)& Name);
|
||||
|
||||
//! Returns True if optional field Description is defined
|
||||
Standard_EXPORT Standard_Boolean HasDescription() const;
|
||||
|
||||
//! Returns field Description
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) Description() const;
|
||||
|
||||
//! Set field Description
|
||||
Standard_EXPORT void SetDescription(const Handle(TCollection_HAsciiString)& Description);
|
||||
|
||||
//! Returns field RelatingGeneralProperty
|
||||
Standard_EXPORT Handle(StepBasic_GeneralProperty) RelatingGeneralProperty() const;
|
||||
|
||||
//! Set field RelatingGeneralProperty
|
||||
Standard_EXPORT void SetRelatingGeneralProperty(const Handle(StepBasic_GeneralProperty)& RelatingGeneralProperty);
|
||||
|
||||
//! Returns field RelatedGeneralProperty
|
||||
Standard_EXPORT Handle(StepBasic_GeneralProperty) RelatedGeneralProperty() const;
|
||||
|
||||
//! Set field RelatedGeneralProperty
|
||||
Standard_EXPORT void SetRelatedGeneralProperty(const Handle(StepBasic_GeneralProperty)& RelatedGeneralProperty);
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(StepBasic_GeneralPropertyRelationship, Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Standard_Boolean defDescription;
|
||||
Handle(TCollection_HAsciiString) theName;
|
||||
Handle(TCollection_HAsciiString) theDescription;
|
||||
Handle(StepBasic_GeneralProperty) theRelatingGeneralProperty;
|
||||
Handle(StepBasic_GeneralProperty) theRelatedGeneralProperty;
|
||||
|
||||
};
|
||||
|
||||
#endif // _StepBasic_GeneralPropertyRelationship_HeaderFile
|
@@ -62,7 +62,6 @@ Standard_CString StepBasic_MeasureValueMember::Name () const
|
||||
case 13 : return "MASS_MEASURE";
|
||||
case 14 : return "THERMODYNAMIC_TEMPERATURE_MEASURE";
|
||||
case 15 : return "COUNT_MEASURE";
|
||||
case 16 : return "NUMERIC_MEASURE";
|
||||
default : break;
|
||||
}
|
||||
return "";
|
||||
@@ -93,7 +92,6 @@ Standard_Boolean StepBasic_MeasureValueMember::SetName (const Standard_CString
|
||||
else if (name[0] == 'M' && !strcmp (name,"MASS_MEASURE")) thecase = 13;
|
||||
else if (name[1] == 'H' && !strcmp (name,"THERMODYNAMIC_TEMPERATURE_MEASURE")) thecase = 14;
|
||||
else if (name[2] == 'U' && !strcmp (name,"COUNT_MEASURE")) thecase = 15;
|
||||
else if (name[0] == 'N' && !strcmp (name,"NUMERIC_MEASURE")) thecase = 16;
|
||||
else return Standard_False;
|
||||
|
||||
return Standard_True;
|
||||
|
@@ -1000,7 +1000,7 @@ Standard_Boolean StepData_StepReaderData::ReadAny(const Standard_Integer num,
|
||||
case Interface_ParamInteger: {
|
||||
if (!val.IsNull()) {
|
||||
DeclareAndCast(StepData_SelectMember, sm, val);
|
||||
sm->SetReal(Interface_FileReaderData::Fastof(str));
|
||||
sm->SetInteger(atoi(str));
|
||||
return Standard_True;
|
||||
}
|
||||
Handle(StepData_SelectInt) sin = new StepData_SelectInt;
|
||||
@@ -1358,27 +1358,16 @@ Standard_Boolean StepData_StepReaderData::ReadInteger(const Standard_Integer num
|
||||
Standard_Integer& val) const
|
||||
{
|
||||
Handle(String) errmess; // Null si pas d erreur
|
||||
Standard_Boolean warn = Standard_False;
|
||||
if (nump > 0 && nump <= NbParams(num)) {
|
||||
const Interface_FileParameter& FP = Param(num, nump);
|
||||
if (FP.ParamType() == Interface_ParamInteger)
|
||||
val = atoi(FP.CValue());
|
||||
else if (FP.ParamType() == Interface_ParamReal)
|
||||
{
|
||||
val = static_cast<Standard_Integer>(std::round(Interface_FileReaderData::Fastof(FP.CValue())));
|
||||
if (acceptvoid) warn = Standard_True;
|
||||
errmess = new String("Parameter n0.%d (%s) was rounded");
|
||||
}
|
||||
if (FP.ParamType() != Interface_ParamInteger &&
|
||||
FP.ParamType() != Interface_ParamReal)
|
||||
errmess = new String("Parameter n0.%d (%s) not an Integer");
|
||||
if (FP.ParamType() == Interface_ParamInteger) val = atoi(FP.CValue());
|
||||
else errmess = new String("Parameter n0.%d (%s) not an Integer");
|
||||
}
|
||||
else errmess = new String("Parameter n0.%d (%s) absent");
|
||||
|
||||
if (errmess.IsNull()) return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
if (warn) ach->AddWarning(txtmes, errmess->ToCString());
|
||||
else ach->AddFail(txtmes, errmess->ToCString());
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
|
@@ -12,8 +12,6 @@ StepRepr_AssemblyComponentUsageSubstitute.cxx
|
||||
StepRepr_AssemblyComponentUsageSubstitute.hxx
|
||||
StepRepr_BetweenShapeAspect.cxx
|
||||
StepRepr_BetweenShapeAspect.hxx
|
||||
StepRepr_BooleanRepresentationItem.cxx
|
||||
StepRepr_BooleanRepresentationItem.hxx
|
||||
StepRepr_CentreOfSymmetry.cxx
|
||||
StepRepr_CentreOfSymmetry.hxx
|
||||
StepRepr_CharacterizedDefinition.cxx
|
||||
@@ -112,8 +110,6 @@ StepRepr_PropertyDefinitionRepresentation.cxx
|
||||
StepRepr_PropertyDefinitionRepresentation.hxx
|
||||
StepRepr_QuantifiedAssemblyComponentUsage.cxx
|
||||
StepRepr_QuantifiedAssemblyComponentUsage.hxx
|
||||
StepRepr_RealRepresentationItem.cxx
|
||||
StepRepr_RealRepresentationItem.hxx
|
||||
StepRepr_Representation.cxx
|
||||
StepRepr_Representation.hxx
|
||||
StepRepr_RepresentationContext.cxx
|
||||
|
@@ -1,28 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepRepr_BooleanRepresentationItem.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(StepRepr_BooleanRepresentationItem, StepRepr_RepresentationItem)
|
||||
|
||||
StepRepr_BooleanRepresentationItem::StepRepr_BooleanRepresentationItem()
|
||||
{
|
||||
}
|
||||
|
||||
void StepRepr_BooleanRepresentationItem::Init(const Handle(TCollection_HAsciiString)& theName,
|
||||
const Standard_Boolean theValue)
|
||||
{
|
||||
value = theValue;
|
||||
StepRepr_RepresentationItem::Init(theName);
|
||||
}
|
@@ -1,52 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StepRepr_BooleanRepresentationItem_HeaderFile
|
||||
#define _StepRepr_BooleanRepresentationItem_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
class TCollection_HAsciiString;
|
||||
|
||||
class StepRepr_BooleanRepresentationItem;
|
||||
DEFINE_STANDARD_HANDLE(StepRepr_BooleanRepresentationItem, StepRepr_RepresentationItem)
|
||||
|
||||
class StepRepr_BooleanRepresentationItem : public StepRepr_RepresentationItem
|
||||
{
|
||||
public:
|
||||
|
||||
//! Returns a BooleanRepresentationItem
|
||||
Standard_EXPORT StepRepr_BooleanRepresentationItem();
|
||||
|
||||
Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Standard_Boolean theValue);
|
||||
|
||||
inline void SetValue(const Standard_Boolean theValue)
|
||||
{
|
||||
value = theValue;
|
||||
}
|
||||
|
||||
inline Standard_Boolean Value() const
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(StepRepr_BooleanRepresentationItem, StepRepr_RepresentationItem)
|
||||
|
||||
private:
|
||||
|
||||
Standard_Boolean value;
|
||||
};
|
||||
|
||||
#endif // _StepRepr_BooleanRepresentationItem_HeaderFile
|
@@ -1,28 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepRepr_RealRepresentationItem.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(StepRepr_RealRepresentationItem, StepRepr_RepresentationItem)
|
||||
|
||||
StepRepr_RealRepresentationItem::StepRepr_RealRepresentationItem()
|
||||
{
|
||||
}
|
||||
|
||||
void StepRepr_RealRepresentationItem::Init(const Handle(TCollection_HAsciiString)& theName,
|
||||
const Standard_Real theValue)
|
||||
{
|
||||
value = theValue;
|
||||
StepRepr_RepresentationItem::Init(theName);
|
||||
}
|
@@ -1,53 +0,0 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StepRepr_RealRepresentationItem_HeaderFile
|
||||
#define _StepRepr_RealRepresentationItem_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
class TCollection_HAsciiString;
|
||||
|
||||
class StepRepr_RealRepresentationItem;
|
||||
DEFINE_STANDARD_HANDLE(StepRepr_RealRepresentationItem, StepRepr_RepresentationItem)
|
||||
|
||||
class StepRepr_RealRepresentationItem : public StepRepr_RepresentationItem
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//! Returns a RealRepresentationItem
|
||||
Standard_EXPORT StepRepr_RealRepresentationItem();
|
||||
|
||||
Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Standard_Real theValue);
|
||||
|
||||
inline void SetValue(const Standard_Real theValue)
|
||||
{
|
||||
value = theValue;
|
||||
}
|
||||
|
||||
inline Standard_Real Value() const
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(StepRepr_RealRepresentationItem, StepRepr_RepresentationItem)
|
||||
|
||||
private:
|
||||
|
||||
Standard_Real value;
|
||||
};
|
||||
|
||||
#endif // _StepRepr_RealRepresentationItem_HeaderFile
|
@@ -96,7 +96,7 @@
|
||||
// To proceed with I-DEAS-like STP (ssv; 15.11.2010)
|
||||
//#define DEBUG
|
||||
// ============================================================================
|
||||
// Method : StepToTopoDS_TranslateFace
|
||||
// Method : StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace
|
||||
// Purpose : Empty Constructor
|
||||
// ============================================================================
|
||||
StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace()
|
||||
@@ -540,25 +540,24 @@ StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_ComplexTriangulat
|
||||
{
|
||||
Handle(StepVisual_CoordinatesList) aCoords = theTF->Coordinates();
|
||||
Handle(TColgp_HArray1OfXYZ) aNodes = aCoords->Points();
|
||||
Handle(TColStd_HArray1OfTransient) aTriaStrips = theTF->TriangleStrips();
|
||||
Handle(TColStd_HArray1OfTransient) aTriaFans = theTF->TriangleFans();
|
||||
Handle(TColStd_HArray2OfInteger) aTriaStrips = theTF->TriangleStrips();
|
||||
Handle(TColStd_HArray2OfInteger) aTriaFans = theTF->TriangleFans();
|
||||
const Standard_Boolean aHasUVNodes = Standard_False;
|
||||
const Standard_Boolean aHasNormals = (theTF->NbNormals() > 0);
|
||||
|
||||
Standard_Integer aNbTriaStrips = 0;
|
||||
for (Standard_Integer i = 1; i <= theTF->NbTriangleStrips(); ++i)
|
||||
{
|
||||
Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaStrips->Value(i));
|
||||
for (Standard_Integer j = 3; j <= aTriangleStrip->Length(); j += 2)
|
||||
for (Standard_Integer j = 3; j <= aTriaStrips->UpperCol(); j += 2)
|
||||
{
|
||||
if (aTriangleStrip->Value(j) != aTriangleStrip->Value(j - 2) &&
|
||||
aTriangleStrip->Value(j) != aTriangleStrip->Value(j - 1))
|
||||
if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) &&
|
||||
aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1))
|
||||
++aNbTriaStrips;
|
||||
}
|
||||
for (Standard_Integer j = 4; j <= aTriangleStrip->Length(); j += 2)
|
||||
for (Standard_Integer j = 4; j <= aTriaStrips->UpperCol(); j += 2)
|
||||
{
|
||||
if (aTriangleStrip->Value(j) != aTriangleStrip->Value(j - 2) &&
|
||||
aTriangleStrip->Value(j) != aTriangleStrip->Value(j - 1))
|
||||
if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) &&
|
||||
aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1))
|
||||
++aNbTriaStrips;
|
||||
}
|
||||
}
|
||||
@@ -566,8 +565,12 @@ StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_ComplexTriangulat
|
||||
Standard_Integer aNbTriaFans = 0;
|
||||
for (Standard_Integer i = 1; i <= theTF->NbTriangleFans(); ++i)
|
||||
{
|
||||
Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaFans->Value(i));
|
||||
aNbTriaFans += aTriangleFan->Length() - 2;
|
||||
Standard_Integer v1 = aTriaStrips->Value(i, 1);
|
||||
for (Standard_Integer j = 3; j <= aTriaStrips->UpperCol(); ++j)
|
||||
{
|
||||
if (aTriaStrips->Value(i, j) != v1 && aTriaStrips->Value(i, j - 1) != v1)
|
||||
++aNbTriaFans;
|
||||
}
|
||||
}
|
||||
|
||||
Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(theTF->NbPnindex(),
|
||||
@@ -580,42 +583,27 @@ StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_ComplexTriangulat
|
||||
aMesh->SetNode(j, aLF * aPoint);
|
||||
}
|
||||
|
||||
Standard_Integer aTriangleIndex = 1;
|
||||
for (Standard_Integer aTrianStripIndex = 1; aTrianStripIndex <= theTF->NbTriangleStrips(); ++aTrianStripIndex)
|
||||
Standard_Integer k = 1;
|
||||
for (Standard_Integer i = 1; i <= theTF->NbTriangleStrips(); ++i)
|
||||
{
|
||||
Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaStrips->Value(aTrianStripIndex));
|
||||
for (Standard_Integer anIndex = 3; anIndex <= aTriangleStrip->Length(); anIndex += 2)
|
||||
for (Standard_Integer j = 3; j <= aTriaStrips->UpperCol(); j += 2)
|
||||
{
|
||||
if (aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 2) &&
|
||||
aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 1))
|
||||
if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) &&
|
||||
aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1))
|
||||
{
|
||||
aMesh->SetTriangle(aTriangleIndex++, Poly_Triangle(aTriangleStrip->Value(anIndex - 2),
|
||||
aTriangleStrip->Value(anIndex),
|
||||
aTriangleStrip->Value(anIndex - 1)));
|
||||
aMesh->SetTriangle(k++, Poly_Triangle(aTriaStrips->Value(i, j - 2),
|
||||
aTriaStrips->Value(i, j),
|
||||
aTriaStrips->Value(i, j - 1)));
|
||||
}
|
||||
}
|
||||
for (Standard_Integer anIndex = 4; anIndex <= aTriangleStrip->Length(); anIndex += 2)
|
||||
for (Standard_Integer j = 4; j <= aTriaStrips->UpperCol(); j += 2)
|
||||
{
|
||||
if (aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 2) &&
|
||||
aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 1))
|
||||
if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) &&
|
||||
aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1))
|
||||
{
|
||||
aMesh->SetTriangle(aTriangleIndex++, Poly_Triangle(aTriangleStrip->Value(anIndex - 2),
|
||||
aTriangleStrip->Value(anIndex - 1),
|
||||
aTriangleStrip->Value(anIndex)));
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Standard_Integer aTrianFanIndex = 1; aTrianFanIndex <= theTF->NbTriangleFans(); ++aTrianFanIndex)
|
||||
{
|
||||
Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaFans->Value(aTrianFanIndex));
|
||||
for (Standard_Integer anIndex = 3; anIndex <= aTriangleFan->Length(); ++anIndex)
|
||||
{
|
||||
if (aTriangleFan->Value(anIndex) != aTriangleFan->Value(anIndex - 2) &&
|
||||
aTriangleFan->Value(anIndex - 1) != aTriangleFan->Value(anIndex - 2))
|
||||
{
|
||||
aMesh->SetTriangle(aTriangleIndex++, Poly_Triangle(aTriangleFan->Value(1),
|
||||
aTriangleFan->Value(anIndex),
|
||||
aTriangleFan->Value(anIndex - 1)));
|
||||
aMesh->SetTriangle(k++, Poly_Triangle(aTriaStrips->Value(i, j - 2),
|
||||
aTriaStrips->Value(i, j - 1),
|
||||
aTriaStrips->Value(i, j)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -39,8 +39,8 @@ void StepVisual_ComplexTriangulatedFace::Init (const Handle(TCollection_HAsciiSt
|
||||
const Standard_Boolean theHasTessellatedFace_GeometricLink,
|
||||
const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink,
|
||||
const Handle(TColStd_HArray1OfInteger)& thePnindex,
|
||||
const Handle(TColStd_HArray1OfTransient)& theTriangleStrips,
|
||||
const Handle(TColStd_HArray1OfTransient)& theTriangleFans)
|
||||
const Handle(TColStd_HArray2OfInteger)& theTriangleStrips,
|
||||
const Handle(TColStd_HArray2OfInteger)& theTriangleFans)
|
||||
{
|
||||
StepVisual_TessellatedFace::Init(theRepresentationItem_Name,
|
||||
theTessellatedFace_Coordinates,
|
||||
@@ -107,7 +107,7 @@ Standard_Integer StepVisual_ComplexTriangulatedFace::PnindexValue(const Standard
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(TColStd_HArray1OfTransient) StepVisual_ComplexTriangulatedFace::TriangleStrips () const
|
||||
Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedFace::TriangleStrips () const
|
||||
{
|
||||
return myTriangleStrips;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ Handle(TColStd_HArray1OfTransient) StepVisual_ComplexTriangulatedFace::TriangleS
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void StepVisual_ComplexTriangulatedFace::SetTriangleStrips(const Handle(TColStd_HArray1OfTransient)& theTriangleStrips)
|
||||
void StepVisual_ComplexTriangulatedFace::SetTriangleStrips(const Handle(TColStd_HArray2OfInteger)& theTriangleStrips)
|
||||
{
|
||||
myTriangleStrips = theTriangleStrips;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ Standard_Integer StepVisual_ComplexTriangulatedFace::NbTriangleStrips() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return myTriangleStrips->Length();
|
||||
return myTriangleStrips->ColLength();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -141,7 +141,7 @@ Standard_Integer StepVisual_ComplexTriangulatedFace::NbTriangleStrips() const
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(TColStd_HArray1OfTransient) StepVisual_ComplexTriangulatedFace::TriangleFans () const
|
||||
Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedFace::TriangleFans () const
|
||||
{
|
||||
return myTriangleFans;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ Handle(TColStd_HArray1OfTransient) StepVisual_ComplexTriangulatedFace::TriangleF
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void StepVisual_ComplexTriangulatedFace::SetTriangleFans(const Handle(TColStd_HArray1OfTransient)& theTriangleFans)
|
||||
void StepVisual_ComplexTriangulatedFace::SetTriangleFans(const Handle(TColStd_HArray2OfInteger)& theTriangleFans)
|
||||
{
|
||||
myTriangleFans = theTriangleFans;
|
||||
}
|
||||
@@ -167,5 +167,5 @@ Standard_Integer StepVisual_ComplexTriangulatedFace::NbTriangleFans() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return myTriangleFans->Length();
|
||||
return myTriangleFans->ColLength();
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
#include <StepVisual_TessellatedFace.hxx>
|
||||
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <TColStd_HArray1OfTransient.hxx>
|
||||
#include <TColStd_HArray2OfInteger.hxx>
|
||||
|
||||
DEFINE_STANDARD_HANDLE(StepVisual_ComplexTriangulatedFace, StepVisual_TessellatedFace)
|
||||
|
||||
@@ -43,8 +43,8 @@ public :
|
||||
const Standard_Boolean theHasTessellatedFace_GeometricLink,
|
||||
const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink,
|
||||
const Handle(TColStd_HArray1OfInteger)& thePnindex,
|
||||
const Handle(TColStd_HArray1OfTransient)& theTriangleStrips,
|
||||
const Handle(TColStd_HArray1OfTransient)& theTriangleFans);
|
||||
const Handle(TColStd_HArray2OfInteger)& theTriangleStrips,
|
||||
const Handle(TColStd_HArray2OfInteger)& theTriangleFans);
|
||||
|
||||
//! Returns field Pnindex
|
||||
Standard_EXPORT Handle(TColStd_HArray1OfInteger) Pnindex() const;
|
||||
@@ -59,19 +59,19 @@ public :
|
||||
Standard_EXPORT Standard_Integer PnindexValue(const Standard_Integer theNum) const;
|
||||
|
||||
//! Returns field TriangleStrips
|
||||
Standard_EXPORT Handle(TColStd_HArray1OfTransient) TriangleStrips() const;
|
||||
Standard_EXPORT Handle(TColStd_HArray2OfInteger) TriangleStrips() const;
|
||||
|
||||
//! Sets field TriangleStrips
|
||||
Standard_EXPORT void SetTriangleStrips (const Handle(TColStd_HArray1OfTransient)& theTriangleStrips);
|
||||
Standard_EXPORT void SetTriangleStrips (const Handle(TColStd_HArray2OfInteger)& theTriangleStrips);
|
||||
|
||||
//! Returns number of TriangleStrips
|
||||
Standard_EXPORT Standard_Integer NbTriangleStrips() const;
|
||||
|
||||
//! Returns field TriangleFans
|
||||
Standard_EXPORT Handle(TColStd_HArray1OfTransient) TriangleFans() const;
|
||||
Standard_EXPORT Handle(TColStd_HArray2OfInteger) TriangleFans() const;
|
||||
|
||||
//! Sets field TriangleFans
|
||||
Standard_EXPORT void SetTriangleFans (const Handle(TColStd_HArray1OfTransient)& theTriangleFans);
|
||||
Standard_EXPORT void SetTriangleFans (const Handle(TColStd_HArray2OfInteger)& theTriangleFans);
|
||||
|
||||
//! Returns number of TriangleFans
|
||||
Standard_EXPORT Standard_Integer NbTriangleFans() const;
|
||||
@@ -81,8 +81,8 @@ public :
|
||||
private:
|
||||
|
||||
Handle(TColStd_HArray1OfInteger) myPnindex;
|
||||
Handle(TColStd_HArray1OfTransient) myTriangleStrips;
|
||||
Handle(TColStd_HArray1OfTransient) myTriangleFans;
|
||||
Handle(TColStd_HArray2OfInteger) myTriangleStrips;
|
||||
Handle(TColStd_HArray2OfInteger) myTriangleFans;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -9,7 +9,6 @@ TKShHealing
|
||||
TKMesh
|
||||
TKService
|
||||
TKHLR
|
||||
TKTopAlgo
|
||||
CSF_TclLibs
|
||||
CSF_TclTkLibs
|
||||
CSF_XwLibs
|
||||
|
@@ -1,7 +1,6 @@
|
||||
XCAFApp
|
||||
XCAFAnimObjects
|
||||
XCAFDimTolObjects
|
||||
XCAFNoteObjects
|
||||
XCAFDoc
|
||||
XCAFPrs
|
||||
XCAFView
|
||||
XCAFView
|
||||
|
@@ -21,7 +21,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@@ -33,7 +33,9 @@ namespace
|
||||
//=======================================================================
|
||||
Vrml_ConfigurationNode::Vrml_ConfigurationNode() :
|
||||
DE_ConfigurationNode()
|
||||
{}
|
||||
{
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : STEPCAFControl_ConfigurationNode
|
||||
@@ -43,6 +45,7 @@ Vrml_ConfigurationNode::Vrml_ConfigurationNode(const Handle(Vrml_ConfigurationNo
|
||||
:DE_ConfigurationNode(theNode)
|
||||
{
|
||||
InternalParameters = theNode->InternalParameters;
|
||||
UpdateLoad();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -1,20 +0,0 @@
|
||||
XCAFAnimObjects_AnimObject.cxx
|
||||
XCAFAnimObjects_AnimObject.hxx
|
||||
XCAFAnimObjects_CustomOperation.cxx
|
||||
XCAFAnimObjects_CustomOperation.hxx
|
||||
XCAFAnimObjects_InterpolationType.hxx
|
||||
XCAFAnimObjects_Operation.cxx
|
||||
XCAFAnimObjects_Operation.hxx
|
||||
XCAFAnimObjects_OperationType.hxx
|
||||
XCAFAnimObjects_Orient.cxx
|
||||
XCAFAnimObjects_Orient.hxx
|
||||
XCAFAnimObjects_Rotate.cxx
|
||||
XCAFAnimObjects_Rotate.hxx
|
||||
XCAFAnimObjects_Scale.cxx
|
||||
XCAFAnimObjects_Scale.hxx
|
||||
XCAFAnimObjects_Skew.cxx
|
||||
XCAFAnimObjects_Skew.hxx
|
||||
XCAFAnimObjects_Transform.cxx
|
||||
XCAFAnimObjects_Transform.hxx
|
||||
XCAFAnimObjects_Translate.cxx
|
||||
XCAFAnimObjects_Translate.hxx
|
@@ -1,33 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XCAFAnimObjects_AnimObject.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(XCAFAnimObjects_AnimObject, Standard_Transient)
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_AnimObject
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_AnimObject::XCAFAnimObjects_AnimObject() :
|
||||
myInterpolationType(XCAFAnimObjects_InterpolationType_Step)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_AnimObject
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_AnimObject::XCAFAnimObjects_AnimObject(const Handle(XCAFAnimObjects_AnimObject)& theObject) :
|
||||
myInterpolationType(XCAFAnimObjects_InterpolationType_Step),
|
||||
myOrderedOperations(theObject->myOrderedOperations)
|
||||
{}
|
@@ -1,59 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XCAFAnimObjects_AnimObject_HeaderFile
|
||||
#define _XCAFAnimObjects_AnimObject_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <NCollection_List.hxx>
|
||||
#include <XCAFAnimObjects_InterpolationType.hxx>
|
||||
|
||||
class XCAFAnimObjects_Operation;
|
||||
|
||||
//!
|
||||
class XCAFAnimObjects_AnimObject : public Standard_Transient
|
||||
{
|
||||
public:
|
||||
DEFINE_STANDARD_RTTIEXT(XCAFAnimObjects_AnimObject, Standard_Transient)
|
||||
|
||||
public:
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_AnimObject();
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_AnimObject(const Handle(XCAFAnimObjects_AnimObject)& theObject);
|
||||
|
||||
//!
|
||||
void AppendNewOperation(const Handle(XCAFAnimObjects_Operation)& theOperation) { myOrderedOperations.Append(theOperation); }
|
||||
|
||||
//!
|
||||
XCAFAnimObjects_InterpolationType GetInterpolationType() const { return myInterpolationType; }
|
||||
|
||||
//!
|
||||
void SetInterpolationType(const XCAFAnimObjects_InterpolationType theType) { myInterpolationType = theType; }
|
||||
|
||||
//!
|
||||
const NCollection_List<Handle(XCAFAnimObjects_Operation)>& GetOrderedOperations() const { return myOrderedOperations; }
|
||||
|
||||
//!
|
||||
NCollection_List<Handle(XCAFAnimObjects_Operation)>& ChangeOrderedOperations() { return myOrderedOperations; }
|
||||
|
||||
private:
|
||||
|
||||
XCAFAnimObjects_InterpolationType myInterpolationType;
|
||||
NCollection_List<Handle(XCAFAnimObjects_Operation)> myOrderedOperations;
|
||||
};
|
||||
|
||||
#endif // _XCAFAnimObjects_AnimObject_HeaderFile
|
@@ -1,52 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include "XCAFAnimObjects_CustomOperation.hxx"
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_CustomOperation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_CustomOperation::XCAFAnimObjects_CustomOperation(const NCollection_Array1<double>& thePresentation,
|
||||
const TCollection_AsciiString& theCustomTypeName) :
|
||||
XCAFAnimObjects_Operation(false),
|
||||
myTypeName(theCustomTypeName),
|
||||
myPresentation(1, 1, thePresentation.Lower(), thePresentation.Upper())
|
||||
{
|
||||
for (int anInd = thePresentation.Lower(); anInd <= thePresentation.Upper(); anInd++)
|
||||
{
|
||||
myPresentation.SetValue(1, anInd, thePresentation.Value(anInd));
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_CustomOperation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_CustomOperation::XCAFAnimObjects_CustomOperation(const NCollection_Array2<double>& thePresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps,
|
||||
const TCollection_AsciiString& theCustomTypeName) :
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
myTypeName(theCustomTypeName),
|
||||
myPresentation(thePresentation)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_CustomOperation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_CustomOperation::XCAFAnimObjects_CustomOperation(const Handle(XCAFAnimObjects_CustomOperation)& theOperation) :
|
||||
XCAFAnimObjects_Operation(theOperation),
|
||||
myTypeName(theOperation->myTypeName),
|
||||
myPresentation(theOperation->myPresentation)
|
||||
{}
|
@@ -1,56 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XCAFAnimObjects_CustomOperation_HeaderFile
|
||||
#define _XCAFAnimObjects_CustomOperation_HeaderFile
|
||||
|
||||
#include <XCAFAnimObjects_Operation.hxx>
|
||||
#include <NCollection_Array2.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
//!
|
||||
class XCAFAnimObjects_CustomOperation : public XCAFAnimObjects_Operation
|
||||
{
|
||||
public:
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_CustomOperation(const NCollection_Array1<double>& thePresentation,
|
||||
const TCollection_AsciiString& theCustomTypeName);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_CustomOperation(const NCollection_Array2<double>& thePresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps,
|
||||
const TCollection_AsciiString& theCustomTypeName);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_CustomOperation(const Handle(XCAFAnimObjects_CustomOperation)& theOperation);
|
||||
|
||||
//!
|
||||
XCAFAnimObjects_OperationType GetType() const Standard_OVERRIDE { return XCAFAnimObjects_OperationType_Custom; }
|
||||
|
||||
//!
|
||||
NCollection_Array2<double> GeneralPresentation() const Standard_OVERRIDE { return myPresentation; }
|
||||
|
||||
//!
|
||||
TCollection_AsciiString GetTypeName() const Standard_OVERRIDE { return myTypeName; }
|
||||
|
||||
//!
|
||||
const NCollection_Array2<double>& CustomPresentation() const { return myPresentation; }
|
||||
|
||||
private:
|
||||
|
||||
TCollection_AsciiString myTypeName; //!<
|
||||
NCollection_Array2<double> myPresentation; //!<
|
||||
};
|
||||
|
||||
#endif // _XCAFAnimObjects_CustomOperation_HeaderFile
|
@@ -1,27 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XCAFAnimObjects_InterpolationType_HeaderFile
|
||||
#define _XCAFAnimObjects_InterpolationType_HeaderFile
|
||||
|
||||
//! Interpolation is a description of behavior between timestamps
|
||||
enum XCAFAnimObjects_InterpolationType
|
||||
{
|
||||
XCAFAnimObjects_InterpolationType_Custom = 0, //!< User-defined interpolation
|
||||
XCAFAnimObjects_InterpolationType_Step, //!< No interpolation, just apply timestamps step by step
|
||||
XCAFAnimObjects_InterpolationType_Linear, //!< Linear dependency from t_(i) to t_(i+1)
|
||||
XCAFAnimObjects_InterpolationType_CubicSpline, //!< Cubic dependency from t_(i) to t_(i+1)
|
||||
XCAFAnimObjects_InterpolationType_Static //!< No animation in this time period, use the closest static value
|
||||
};
|
||||
|
||||
#endif // _XCAFAnimObjects_InterpolationType_HeaderFile
|
@@ -1,43 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XCAFAnimObjects_Operation.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(XCAFAnimObjects_Operation, Standard_Transient)
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Operation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Operation::XCAFAnimObjects_Operation(const bool theIsInverse) :
|
||||
myIsInverse(theIsInverse)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Operation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Operation::XCAFAnimObjects_Operation(const NCollection_Array1<double>& theTimeStamps,
|
||||
const bool theIsInverse) :
|
||||
myIsInverse(theIsInverse),
|
||||
myTimeStamps(theTimeStamps)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Operation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Operation::XCAFAnimObjects_Operation(const Handle(XCAFAnimObjects_Operation)& theOperation) :
|
||||
myIsInverse(theOperation->myIsInverse),
|
||||
myTimeStamps(theOperation->myTimeStamps)
|
||||
{}
|
@@ -1,67 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XCAFAnimObjects_Operation_HeaderFile
|
||||
#define _XCAFAnimObjects_Operation_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <NCollection_Array1.hxx>
|
||||
#include <NCollection_Array2.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <XCAFAnimObjects_OperationType.hxx>
|
||||
|
||||
//!
|
||||
class XCAFAnimObjects_Operation : public Standard_Transient
|
||||
{
|
||||
public:
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Operation(const bool theIsInverse = false);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Operation(const NCollection_Array1<double>& theTimeStamps,
|
||||
const bool theIsInverse = false);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Operation(const Handle(XCAFAnimObjects_Operation)& theOperation);
|
||||
|
||||
//!
|
||||
const NCollection_Array1<double>& TimeStamps() const { return myTimeStamps; }
|
||||
|
||||
//!
|
||||
bool HasTimeStamps() const { return !myTimeStamps.IsEmpty(); }
|
||||
|
||||
//!
|
||||
Standard_EXPORT virtual XCAFAnimObjects_OperationType GetType() const = 0;
|
||||
|
||||
//!
|
||||
Standard_EXPORT virtual TCollection_AsciiString GetTypeName() const = 0;
|
||||
|
||||
//!
|
||||
bool IsInverse() const { return myIsInverse; }
|
||||
|
||||
//!
|
||||
void SetInverse(const bool theIsInverse) { myIsInverse = theIsInverse; }
|
||||
|
||||
//!
|
||||
Standard_EXPORT virtual NCollection_Array2<double> GeneralPresentation() const = 0;
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(XCAFAnimObjects_Operation, Standard_Transient)
|
||||
|
||||
private:
|
||||
bool myIsInverse; //!
|
||||
NCollection_Array1<double> myTimeStamps; //!<
|
||||
};
|
||||
|
||||
#endif // _XCAFAnimObjects_Operation_HeaderFile
|
@@ -1,29 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XCAFAnimObjects_OperationType_HeaderFile
|
||||
#define _XCAFAnimObjects_OperationType_HeaderFile
|
||||
|
||||
//!
|
||||
enum XCAFAnimObjects_OperationType
|
||||
{
|
||||
XCAFAnimObjects_OperationType_Custom = 0, //!<
|
||||
XCAFAnimObjects_OperationType_Orient, //!<
|
||||
XCAFAnimObjects_OperationType_Rotate, //!<
|
||||
XCAFAnimObjects_OperationType_Scale, //!<
|
||||
XCAFAnimObjects_OperationType_Skew, //!<
|
||||
XCAFAnimObjects_OperationType_Transform, //!<
|
||||
XCAFAnimObjects_OperationType_Translate //!<
|
||||
};
|
||||
|
||||
#endif // _XCAFAnimObjects_OperationType_HeaderFile
|
@@ -1,90 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XCAFAnimObjects_Orient.hxx>
|
||||
|
||||
#include <Message.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Orient
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Orient::XCAFAnimObjects_Orient(const gp_Quaternion& theOrient) :
|
||||
XCAFAnimObjects_Operation(false),
|
||||
myOrientPresentation(1, 1)
|
||||
{
|
||||
myOrientPresentation.SetValue(1, theOrient);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Orient
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Orient::XCAFAnimObjects_Orient(const NCollection_Array1<gp_Quaternion>& theOrient,
|
||||
const NCollection_Array1<double>& theTimeStamps) :
|
||||
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
myOrientPresentation(theOrient)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Orient
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Orient::XCAFAnimObjects_Orient(const NCollection_Array2<double>& theGeneralPresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps) :
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
myOrientPresentation(1, theGeneralPresentation.NbRows())
|
||||
{
|
||||
if (theGeneralPresentation.NbColumns() != 4)
|
||||
{
|
||||
Message::SendWarning() << "Warning: XCAFAnimObjects_Orient: Incorrect Quaternion general presentation";
|
||||
return;
|
||||
}
|
||||
for (int aRowInd = 1; aRowInd <= theGeneralPresentation.NbRows(); aRowInd++)
|
||||
{
|
||||
gp_Quaternion aQuat(theGeneralPresentation.Value(aRowInd, 1),
|
||||
theGeneralPresentation.Value(aRowInd, 2),
|
||||
theGeneralPresentation.Value(aRowInd, 3),
|
||||
theGeneralPresentation.Value(aRowInd, 4));
|
||||
myOrientPresentation.SetValue(aRowInd, aQuat);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Orient
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Orient::XCAFAnimObjects_Orient(const Handle(XCAFAnimObjects_Orient)& theOperation) :
|
||||
XCAFAnimObjects_Operation(theOperation),
|
||||
myOrientPresentation(theOperation->myOrientPresentation)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : GeneralPresentation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
NCollection_Array2<double> XCAFAnimObjects_Orient::GeneralPresentation() const
|
||||
{
|
||||
NCollection_Array2<double> aRes(1, myOrientPresentation.Length(), 1, 4);
|
||||
for (int aRowInd = 1; aRowInd <= myOrientPresentation.Length(); aRowInd++)
|
||||
{
|
||||
const gp_Quaternion& aQuat = myOrientPresentation.Value(aRowInd);
|
||||
|
||||
aRes.SetValue(aRowInd, 1, aQuat.X());
|
||||
aRes.SetValue(aRowInd, 2, aQuat.Y());
|
||||
aRes.SetValue(aRowInd, 3, aQuat.Z());
|
||||
aRes.SetValue(aRowInd, 4, aQuat.W());
|
||||
}
|
||||
return aRes;
|
||||
}
|
@@ -1,56 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XCAFAnimObjects_Orient_HeaderFile
|
||||
#define _XCAFAnimObjects_Orient_HeaderFile
|
||||
|
||||
#include <XCAFAnimObjects_Operation.hxx>
|
||||
#include <gp_Quaternion.hxx>
|
||||
|
||||
//!
|
||||
class XCAFAnimObjects_Orient : public XCAFAnimObjects_Operation
|
||||
{
|
||||
public:
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Orient(const gp_Quaternion& theOrient);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Orient(const NCollection_Array1<gp_Quaternion>& theOrient,
|
||||
const NCollection_Array1<double>& theTimeStamps);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Orient(const NCollection_Array2<double>& theGeneralPresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Orient(const Handle(XCAFAnimObjects_Orient)& theOperation);
|
||||
|
||||
//!
|
||||
XCAFAnimObjects_OperationType GetType() const Standard_OVERRIDE { return XCAFAnimObjects_OperationType_Orient; }
|
||||
|
||||
//!
|
||||
TCollection_AsciiString GetTypeName() const Standard_OVERRIDE { return "Orient"; }
|
||||
|
||||
//!
|
||||
Standard_EXPORT NCollection_Array2<double> GeneralPresentation() const Standard_OVERRIDE;
|
||||
|
||||
//!
|
||||
const NCollection_Array1<gp_Quaternion>& OrientPresentation() const { return myOrientPresentation; }
|
||||
|
||||
private:
|
||||
|
||||
NCollection_Array1<gp_Quaternion> myOrientPresentation; //!<
|
||||
};
|
||||
|
||||
#endif // _XCAFAnimObjects_Orient_HeaderFile
|
@@ -1,86 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include "XCAFAnimObjects_Rotate.hxx"
|
||||
|
||||
#include <Message.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Rotate
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Rotate::XCAFAnimObjects_Rotate(const NCollection_Array1<double>& theRotate,
|
||||
const NCollection_Array1<double>& theTimeStamps,
|
||||
const XCAFAnimObjects_Rotate_Type theRotateType) :
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
myRotateType(theRotateType),
|
||||
myRotatePresentation(1, 1, theRotate.Lower(), theRotate.Upper())
|
||||
{
|
||||
for (int anInd = theRotate.Lower(); anInd <= theRotate.Upper(); anInd++)
|
||||
{
|
||||
myRotatePresentation.SetValue(1, anInd, theRotate.Value(anInd));
|
||||
}
|
||||
Standard_Integer aNbDouble = 3;
|
||||
if (theRotateType >= XCAFAnimObjects_Rotate_Type_XY &&
|
||||
theRotateType <= XCAFAnimObjects_Rotate_Type_ZY)
|
||||
{
|
||||
aNbDouble = 2;
|
||||
}
|
||||
if (theRotateType >= XCAFAnimObjects_Rotate_Type_X &&
|
||||
theRotateType <= XCAFAnimObjects_Rotate_Type_Z)
|
||||
{
|
||||
aNbDouble = 1;
|
||||
}
|
||||
if (theRotate.Length() != aNbDouble)
|
||||
{
|
||||
Message::SendWarning() << "Warning: XCAFAnimObjects_Rotate: Incorrect Rotate presentation";
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Rotate
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Rotate::XCAFAnimObjects_Rotate(const NCollection_Array2<double>& theGeneralPresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps,
|
||||
const XCAFAnimObjects_Rotate_Type theRotateType) :
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
myRotateType(theRotateType),
|
||||
myRotatePresentation(theGeneralPresentation)
|
||||
{
|
||||
Standard_Integer aNbDouble = 3;
|
||||
if (theRotateType >= XCAFAnimObjects_Rotate_Type_XY &&
|
||||
theRotateType <= XCAFAnimObjects_Rotate_Type_ZY)
|
||||
{
|
||||
aNbDouble = 2;
|
||||
}
|
||||
if (theRotateType >= XCAFAnimObjects_Rotate_Type_X &&
|
||||
theRotateType <= XCAFAnimObjects_Rotate_Type_Z)
|
||||
{
|
||||
aNbDouble = 1;
|
||||
}
|
||||
if (theGeneralPresentation.NbColumns() != aNbDouble)
|
||||
{
|
||||
Message::SendWarning() << "Warning: XCAFAnimObjects_Rotate: Incorrect Rotate presentation";
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Rotate
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Rotate::XCAFAnimObjects_Rotate(const Handle(XCAFAnimObjects_Rotate)& theOperation) :
|
||||
XCAFAnimObjects_Operation(theOperation),
|
||||
myRotateType(theOperation->myRotateType),
|
||||
myRotatePresentation(theOperation->myRotatePresentation)
|
||||
{}
|
@@ -1,84 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XCAFAnimObjects_Rotate_HeaderFile
|
||||
#define _XCAFAnimObjects_Rotate_HeaderFile
|
||||
|
||||
#include <XCAFAnimObjects_Operation.hxx>
|
||||
#include <gp_Quaternion.hxx>
|
||||
|
||||
//!
|
||||
class XCAFAnimObjects_Rotate : public XCAFAnimObjects_Operation
|
||||
{
|
||||
public:
|
||||
|
||||
//!
|
||||
enum XCAFAnimObjects_Rotate_Type
|
||||
{
|
||||
XCAFAnimObjects_Rotate_Type_XYZ = 0,
|
||||
XCAFAnimObjects_Rotate_Type_XZY,
|
||||
XCAFAnimObjects_Rotate_Type_YZX,
|
||||
XCAFAnimObjects_Rotate_Type_YXZ,
|
||||
XCAFAnimObjects_Rotate_Type_ZXY,
|
||||
XCAFAnimObjects_Rotate_Type_ZYX,
|
||||
XCAFAnimObjects_Rotate_Type_XY,
|
||||
XCAFAnimObjects_Rotate_Type_XZ,
|
||||
XCAFAnimObjects_Rotate_Type_YX,
|
||||
XCAFAnimObjects_Rotate_Type_YZ,
|
||||
XCAFAnimObjects_Rotate_Type_ZX,
|
||||
XCAFAnimObjects_Rotate_Type_ZY,
|
||||
XCAFAnimObjects_Rotate_Type_X,
|
||||
XCAFAnimObjects_Rotate_Type_Y,
|
||||
XCAFAnimObjects_Rotate_Type_Z
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Rotate(const NCollection_Array1<double>& theRotate,
|
||||
const NCollection_Array1<double>& theTimeStamps,
|
||||
const XCAFAnimObjects_Rotate_Type theRotateType = XCAFAnimObjects_Rotate_Type_XYZ);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Rotate(const NCollection_Array2<double>& theGeneralPresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps,
|
||||
const XCAFAnimObjects_Rotate_Type theRotateType = XCAFAnimObjects_Rotate_Type_XYZ);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Rotate(const Handle(XCAFAnimObjects_Rotate)& theOperation);
|
||||
|
||||
//!
|
||||
XCAFAnimObjects_OperationType GetType() const Standard_OVERRIDE { return XCAFAnimObjects_OperationType_Rotate; }
|
||||
|
||||
//!
|
||||
XCAFAnimObjects_Rotate_Type GetRotateType() const { return myRotateType; }
|
||||
|
||||
//!
|
||||
void SetRotateType(const XCAFAnimObjects_Rotate_Type theRotateType) { myRotateType = theRotateType; }
|
||||
|
||||
//!
|
||||
TCollection_AsciiString GetTypeName() const Standard_OVERRIDE { return "Rotate"; }
|
||||
|
||||
//!
|
||||
NCollection_Array2<double> GeneralPresentation() const { return myRotatePresentation; }
|
||||
|
||||
//!
|
||||
const NCollection_Array2<double>& RotatePresentation() const { return myRotatePresentation; }
|
||||
|
||||
private:
|
||||
|
||||
XCAFAnimObjects_Rotate_Type myRotateType; //!<
|
||||
NCollection_Array2<double> myRotatePresentation; //!<
|
||||
};
|
||||
|
||||
#endif // _XCAFAnimObjects_Rotate_HeaderFile
|
@@ -1,87 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include "XCAFAnimObjects_Scale.hxx"
|
||||
|
||||
#include <Message.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Scale
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Scale::XCAFAnimObjects_Scale(const gp_XYZ& theScale) :
|
||||
XCAFAnimObjects_Operation(false),
|
||||
myScalePresentation(1, 1)
|
||||
{
|
||||
myScalePresentation.SetValue(1, theScale);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Scale
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Scale::XCAFAnimObjects_Scale(const NCollection_Array1<gp_XYZ>& theScale,
|
||||
const NCollection_Array1<double>& theTimeStamps) :
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
myScalePresentation(theScale)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Scale
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Scale::XCAFAnimObjects_Scale(const NCollection_Array2<double>& theGeneralPresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps) :
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
myScalePresentation(1, theGeneralPresentation.NbRows())
|
||||
{
|
||||
if (theGeneralPresentation.NbColumns() != 3)
|
||||
{
|
||||
Message::SendWarning() << "Warning: XCAFAnimObjects_Scale: Incorrect XYZ general presentation";
|
||||
return;
|
||||
}
|
||||
for (int aRowInd = 1; aRowInd <= theGeneralPresentation.NbRows(); aRowInd++)
|
||||
{
|
||||
gp_XYZ aXYZ(theGeneralPresentation.Value(aRowInd, 1),
|
||||
theGeneralPresentation.Value(aRowInd, 2),
|
||||
theGeneralPresentation.Value(aRowInd, 3));
|
||||
myScalePresentation.SetValue(aRowInd, aXYZ);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Scale
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Scale::XCAFAnimObjects_Scale(const Handle(XCAFAnimObjects_Scale)& theOperation) :
|
||||
XCAFAnimObjects_Operation(theOperation),
|
||||
myScalePresentation(theOperation->myScalePresentation)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : GeneralPresentation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
NCollection_Array2<double> XCAFAnimObjects_Scale::GeneralPresentation() const
|
||||
{
|
||||
NCollection_Array2<double> aRes(1, myScalePresentation.Length(), 1, 3);
|
||||
for (int aRowInd = 1; aRowInd <= myScalePresentation.Length(); aRowInd++)
|
||||
{
|
||||
const gp_XYZ& aXYZ = myScalePresentation.Value(aRowInd);
|
||||
|
||||
aRes.SetValue(aRowInd, 1, aXYZ.X());
|
||||
aRes.SetValue(aRowInd, 2, aXYZ.Y());
|
||||
aRes.SetValue(aRowInd, 3, aXYZ.Z());
|
||||
}
|
||||
return aRes;
|
||||
}
|
@@ -1,56 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XCAFAnimObjects_Scale_HeaderFile
|
||||
#define _XCAFAnimObjects_Scale_HeaderFile
|
||||
|
||||
#include <XCAFAnimObjects_Operation.hxx>
|
||||
#include <gp_XYZ.hxx>
|
||||
|
||||
//!
|
||||
class XCAFAnimObjects_Scale : public XCAFAnimObjects_Operation
|
||||
{
|
||||
public:
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Scale(const gp_XYZ& theScale);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Scale(const NCollection_Array1<gp_XYZ>& theScale,
|
||||
const NCollection_Array1<double>& theTimeStamps);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Scale(const NCollection_Array2<double>& theGeneralPresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Scale(const Handle(XCAFAnimObjects_Scale)& theOperation);
|
||||
|
||||
//!
|
||||
XCAFAnimObjects_OperationType GetType() const Standard_OVERRIDE { return XCAFAnimObjects_OperationType_Scale; }
|
||||
|
||||
//!
|
||||
TCollection_AsciiString GetTypeName() const Standard_OVERRIDE { return "Scale"; }
|
||||
|
||||
//!
|
||||
Standard_EXPORT NCollection_Array2<double> GeneralPresentation() const Standard_OVERRIDE;
|
||||
|
||||
//!
|
||||
const NCollection_Array1<gp_XYZ>& ScalePresentation() const { return myScalePresentation; }
|
||||
|
||||
private:
|
||||
|
||||
NCollection_Array1<gp_XYZ> myScalePresentation; //!<
|
||||
};
|
||||
|
||||
#endif // _XCAFAnimObjects_Scale_HeaderFile
|
@@ -1,87 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include "XCAFAnimObjects_Skew.hxx"
|
||||
|
||||
#include <Message.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Skew
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Skew::XCAFAnimObjects_Skew(const gp_XYZ& theSkew) :
|
||||
XCAFAnimObjects_Operation(false),
|
||||
mySkewPresentation(1, 1)
|
||||
{
|
||||
mySkewPresentation.SetValue(1, theSkew);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Skew
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Skew::XCAFAnimObjects_Skew(const NCollection_Array1<gp_XYZ>& theSkew,
|
||||
const NCollection_Array1<double>& theTimeStamps) :
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
mySkewPresentation(theSkew)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Skew
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Skew::XCAFAnimObjects_Skew(const NCollection_Array2<double>& theGeneralPresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps) :
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
mySkewPresentation(1, theGeneralPresentation.NbRows())
|
||||
{
|
||||
if (theGeneralPresentation.NbColumns() != 3)
|
||||
{
|
||||
Message::SendWarning() << "Warning: XCAFAnimObjects_Skew: Incorrect Skew general presentation";
|
||||
return;
|
||||
}
|
||||
for (int aRowInd = 1; aRowInd <= theGeneralPresentation.NbRows(); aRowInd++)
|
||||
{
|
||||
gp_XYZ aSkew(theGeneralPresentation.Value(aRowInd, 1),
|
||||
theGeneralPresentation.Value(aRowInd, 2),
|
||||
theGeneralPresentation.Value(aRowInd, 3));
|
||||
mySkewPresentation.SetValue(aRowInd, aSkew);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Skew
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Skew::XCAFAnimObjects_Skew(const Handle(XCAFAnimObjects_Skew)& theOperation) :
|
||||
XCAFAnimObjects_Operation(theOperation),
|
||||
mySkewPresentation(theOperation->mySkewPresentation)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : GeneralPresentation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
NCollection_Array2<double> XCAFAnimObjects_Skew::GeneralPresentation() const
|
||||
{
|
||||
NCollection_Array2<double> aRes(1, mySkewPresentation.Length(), 1, 3);
|
||||
for (int aRowInd = 1; aRowInd <= mySkewPresentation.Length(); aRowInd++)
|
||||
{
|
||||
const gp_XYZ& aSkew = mySkewPresentation.Value(aRowInd);
|
||||
|
||||
aRes.SetValue(aRowInd, 1, aSkew.X());
|
||||
aRes.SetValue(aRowInd, 2, aSkew.Y());
|
||||
aRes.SetValue(aRowInd, 3, aSkew.Z());
|
||||
}
|
||||
return aRes;
|
||||
}
|
@@ -1,57 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XCAFAnimObjects_Skew_HeaderFile
|
||||
#define _XCAFAnimObjects_Skew_HeaderFile
|
||||
|
||||
#include <XCAFAnimObjects_Operation.hxx>
|
||||
#include <gp_XYZ.hxx>
|
||||
|
||||
|
||||
//!
|
||||
class XCAFAnimObjects_Skew : public XCAFAnimObjects_Operation
|
||||
{
|
||||
public:
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Skew(const gp_XYZ& theSkew);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Skew(const NCollection_Array1<gp_XYZ>& theSkew,
|
||||
const NCollection_Array1<double>& theTimeStamps);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Skew(const NCollection_Array2<double>& theGeneralPresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Skew(const Handle(XCAFAnimObjects_Skew)& theOperation);
|
||||
|
||||
//!
|
||||
XCAFAnimObjects_OperationType GetType() const Standard_OVERRIDE { return XCAFAnimObjects_OperationType_Skew; }
|
||||
|
||||
//!
|
||||
TCollection_AsciiString GetTypeName() const Standard_OVERRIDE { return "Skew"; }
|
||||
|
||||
//!
|
||||
Standard_EXPORT NCollection_Array2<double> GeneralPresentation() const Standard_OVERRIDE;
|
||||
|
||||
//!
|
||||
const NCollection_Array1<gp_XYZ>& SkewPresentation() const { return mySkewPresentation; }
|
||||
|
||||
private:
|
||||
|
||||
NCollection_Array1<gp_XYZ> mySkewPresentation; //!<
|
||||
};
|
||||
|
||||
#endif // _XCAFAnimObjects_Skew_HeaderFile
|
@@ -1,114 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include "XCAFAnimObjects_Transform.hxx"
|
||||
|
||||
#include <Message.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Transform
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Transform::XCAFAnimObjects_Transform(const NCollection_Mat4<double>& theTransform) :
|
||||
XCAFAnimObjects_Operation(false),
|
||||
myTransformPresentation(1, 1)
|
||||
{
|
||||
myTransformPresentation.SetValue(1, theTransform);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Transform
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Transform::XCAFAnimObjects_Transform(const NCollection_Array1<NCollection_Mat4<double>>& theTransform,
|
||||
const NCollection_Array1<double>& theTimeStamps) :
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
myTransformPresentation(theTransform)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Transform
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Transform::XCAFAnimObjects_Transform(const NCollection_Array2<double>& theGeneralPresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps) :
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
myTransformPresentation(1, theGeneralPresentation.NbRows())
|
||||
{
|
||||
if (theGeneralPresentation.NbColumns() != 16)
|
||||
{
|
||||
Message::SendWarning() << "Warning: XCAFAnimObjects_Transform: Incorrect Mat4x4 general presentation";
|
||||
return;
|
||||
}
|
||||
for (int aRowInd = 1; aRowInd <= theGeneralPresentation.NbRows(); aRowInd++)
|
||||
{
|
||||
NCollection_Mat4<double> aTransform;
|
||||
aTransform.SetRow(0, NCollection_Vec4<double>(theGeneralPresentation.Value(aRowInd, 1),
|
||||
theGeneralPresentation.Value(aRowInd, 2),
|
||||
theGeneralPresentation.Value(aRowInd, 3),
|
||||
theGeneralPresentation.Value(aRowInd, 4)));
|
||||
aTransform.SetRow(1, NCollection_Vec4<double>(theGeneralPresentation.Value(aRowInd, 5),
|
||||
theGeneralPresentation.Value(aRowInd, 6),
|
||||
theGeneralPresentation.Value(aRowInd, 7),
|
||||
theGeneralPresentation.Value(aRowInd, 8)));
|
||||
aTransform.SetRow(2, NCollection_Vec4<double>(theGeneralPresentation.Value(aRowInd, 9),
|
||||
theGeneralPresentation.Value(aRowInd, 10),
|
||||
theGeneralPresentation.Value(aRowInd, 11),
|
||||
theGeneralPresentation.Value(aRowInd, 12)));
|
||||
aTransform.SetRow(3, NCollection_Vec4<double>(theGeneralPresentation.Value(aRowInd, 13),
|
||||
theGeneralPresentation.Value(aRowInd, 14),
|
||||
theGeneralPresentation.Value(aRowInd, 15),
|
||||
theGeneralPresentation.Value(aRowInd, 16)));
|
||||
myTransformPresentation.SetValue(aRowInd, aTransform);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Transform
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Transform::XCAFAnimObjects_Transform(const Handle(XCAFAnimObjects_Transform)& theOperation) :
|
||||
XCAFAnimObjects_Operation(theOperation),
|
||||
myTransformPresentation(theOperation->myTransformPresentation)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : GeneralPresentation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
NCollection_Array2<double> XCAFAnimObjects_Transform::GeneralPresentation() const
|
||||
{
|
||||
NCollection_Array2<double> aRes(1, myTransformPresentation.Length(), 1, 16);
|
||||
for (int aRowInd = 1; aRowInd <= myTransformPresentation.Length(); aRowInd++)
|
||||
{
|
||||
const NCollection_Mat4<double>& aTransform = myTransformPresentation.Value(aRowInd);
|
||||
|
||||
aRes.SetValue(aRowInd, 1, aTransform.GetValue(0, 0));
|
||||
aRes.SetValue(aRowInd, 2, aTransform.GetValue(0, 1));
|
||||
aRes.SetValue(aRowInd, 3, aTransform.GetValue(0, 2));
|
||||
aRes.SetValue(aRowInd, 4, aTransform.GetValue(0, 3));
|
||||
aRes.SetValue(aRowInd, 5, aTransform.GetValue(1, 0));
|
||||
aRes.SetValue(aRowInd, 6, aTransform.GetValue(1, 1));
|
||||
aRes.SetValue(aRowInd, 7, aTransform.GetValue(1, 2));
|
||||
aRes.SetValue(aRowInd, 8, aTransform.GetValue(1, 3));
|
||||
aRes.SetValue(aRowInd, 9, aTransform.GetValue(2, 0));
|
||||
aRes.SetValue(aRowInd, 10, aTransform.GetValue(2, 1));
|
||||
aRes.SetValue(aRowInd, 11, aTransform.GetValue(2, 2));
|
||||
aRes.SetValue(aRowInd, 12, aTransform.GetValue(2, 3));
|
||||
aRes.SetValue(aRowInd, 13, aTransform.GetValue(3, 0));
|
||||
aRes.SetValue(aRowInd, 14, aTransform.GetValue(3, 1));
|
||||
aRes.SetValue(aRowInd, 15, aTransform.GetValue(3, 2));
|
||||
aRes.SetValue(aRowInd, 16, aTransform.GetValue(3, 3));
|
||||
}
|
||||
return aRes;
|
||||
}
|
@@ -1,56 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XCAFAnimObjects_Transform_HeaderFile
|
||||
#define _XCAFAnimObjects_Transform_HeaderFile
|
||||
|
||||
#include <XCAFAnimObjects_Operation.hxx>
|
||||
#include <NCollection_Mat4.hxx>
|
||||
|
||||
//!
|
||||
class XCAFAnimObjects_Transform : public XCAFAnimObjects_Operation
|
||||
{
|
||||
public:
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Transform(const NCollection_Mat4<double>& theTransform);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Transform(const NCollection_Array1<NCollection_Mat4<double>>& theTransform,
|
||||
const NCollection_Array1<double>& theTimeStamps);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Transform(const NCollection_Array2<double>& theGeneralPresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Transform(const Handle(XCAFAnimObjects_Transform)& theOperation);
|
||||
|
||||
//!
|
||||
XCAFAnimObjects_OperationType GetType() const Standard_OVERRIDE { return XCAFAnimObjects_OperationType_Transform; }
|
||||
|
||||
//!
|
||||
TCollection_AsciiString GetTypeName() const Standard_OVERRIDE { return "Transform"; }
|
||||
|
||||
//!
|
||||
Standard_EXPORT NCollection_Array2<double> GeneralPresentation() const Standard_OVERRIDE;
|
||||
|
||||
//!
|
||||
const NCollection_Array1<NCollection_Mat4<double>>& TransformPresentation() const { return myTransformPresentation; }
|
||||
|
||||
private:
|
||||
|
||||
NCollection_Array1<NCollection_Mat4<double>> myTransformPresentation; //!<
|
||||
};
|
||||
|
||||
#endif // _XCAFAnimObjects_Transform_HeaderFile
|
@@ -1,88 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include "XCAFAnimObjects_Translate.hxx"
|
||||
|
||||
#include <Message.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Translate
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Translate::XCAFAnimObjects_Translate(const gp_XYZ& theTranslate) :
|
||||
XCAFAnimObjects_Operation(false),
|
||||
myTranslatePresentation(1, 1)
|
||||
{
|
||||
myTranslatePresentation.SetValue(1, theTranslate);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Translate
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Translate::XCAFAnimObjects_Translate(const NCollection_Array1<gp_XYZ>& theTranslate,
|
||||
const NCollection_Array1<double>& theTimeStamps) :
|
||||
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
myTranslatePresentation(theTranslate)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Translate
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Translate::XCAFAnimObjects_Translate(const NCollection_Array2<double>& theGeneralPresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps) :
|
||||
XCAFAnimObjects_Operation(theTimeStamps),
|
||||
myTranslatePresentation(1, theGeneralPresentation.NbRows())
|
||||
{
|
||||
if (theGeneralPresentation.NbColumns() != 3)
|
||||
{
|
||||
Message::SendWarning() << "Warning: XCAFAnimObjects_Translate: Incorrect XYZ general presentation";
|
||||
return;
|
||||
}
|
||||
for (int aRowInd = 1; aRowInd <= theGeneralPresentation.NbRows(); aRowInd++)
|
||||
{
|
||||
gp_XYZ aXYZ(theGeneralPresentation.Value(aRowInd, 1),
|
||||
theGeneralPresentation.Value(aRowInd, 2),
|
||||
theGeneralPresentation.Value(aRowInd, 3));
|
||||
myTranslatePresentation.SetValue(aRowInd, aXYZ);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFAnimObjects_Translate
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFAnimObjects_Translate::XCAFAnimObjects_Translate(const Handle(XCAFAnimObjects_Translate)& theOperation) :
|
||||
XCAFAnimObjects_Operation(theOperation),
|
||||
myTranslatePresentation(theOperation->myTranslatePresentation)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : GeneralPresentation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
NCollection_Array2<double> XCAFAnimObjects_Translate::GeneralPresentation() const
|
||||
{
|
||||
NCollection_Array2<double> aRes(1, myTranslatePresentation.Length(), 1, 3);
|
||||
for (int aRowInd = 1; aRowInd <= myTranslatePresentation.Length(); aRowInd++)
|
||||
{
|
||||
const gp_XYZ& aXYZ = myTranslatePresentation.Value(aRowInd);
|
||||
|
||||
aRes.SetValue(aRowInd, 1, aXYZ.X());
|
||||
aRes.SetValue(aRowInd, 2, aXYZ.Y());
|
||||
aRes.SetValue(aRowInd, 3, aXYZ.Z());
|
||||
}
|
||||
return aRes;
|
||||
}
|
@@ -1,56 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XCAFAnimObjects_Translate_HeaderFile
|
||||
#define _XCAFAnimObjects_Translate_HeaderFile
|
||||
|
||||
#include <XCAFAnimObjects_Operation.hxx>
|
||||
#include <gp_XYZ.hxx>
|
||||
|
||||
//!
|
||||
class XCAFAnimObjects_Translate : public XCAFAnimObjects_Operation
|
||||
{
|
||||
public:
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Translate(const gp_XYZ& theTranslate);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Translate(const NCollection_Array1<gp_XYZ>& theTranslate,
|
||||
const NCollection_Array1<double>& theTimeStamps);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Translate(const NCollection_Array2<double>& theGeneralPresentation,
|
||||
const NCollection_Array1<double>& theTimeStamps);
|
||||
|
||||
//!
|
||||
Standard_EXPORT XCAFAnimObjects_Translate(const Handle(XCAFAnimObjects_Translate)& theOperation);
|
||||
|
||||
//!
|
||||
XCAFAnimObjects_OperationType GetType() const Standard_OVERRIDE { return XCAFAnimObjects_OperationType_Translate; }
|
||||
|
||||
//!
|
||||
TCollection_AsciiString GetTypeName() const Standard_OVERRIDE { return "Translate"; }
|
||||
|
||||
//!
|
||||
Standard_EXPORT NCollection_Array2<double> GeneralPresentation() const Standard_OVERRIDE;
|
||||
|
||||
//!
|
||||
const NCollection_Array1<gp_XYZ>& TranslatePresentation() const { return myTranslatePresentation; }
|
||||
|
||||
private:
|
||||
|
||||
NCollection_Array1<gp_XYZ> myTranslatePresentation; //!<
|
||||
};
|
||||
|
||||
#endif // _XCAFAnimObjects_Translate_HeaderFile
|
@@ -2,10 +2,6 @@ FILES
|
||||
GUID.txt
|
||||
XCAFDoc.cxx
|
||||
XCAFDoc.hxx
|
||||
XCAFDoc_Animation.cxx
|
||||
XCAFDoc_Animation.hxx
|
||||
XCAFDoc_AnimationTool.cxx
|
||||
XCAFDoc_AnimationTool.hxx
|
||||
XCAFDoc_AssemblyItemId.cxx
|
||||
XCAFDoc_AssemblyItemId.hxx
|
||||
XCAFDoc_AssemblyItemRef.cxx
|
||||
|
@@ -322,16 +322,6 @@ const Standard_GUID& XCAFDoc::LockGUID()
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimRefShapeGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& XCAFDoc::AnimRefShapeGUID()
|
||||
{
|
||||
static const Standard_GUID ID("0BE692B6-2E38-4FDC-A349-27615CF8784F");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AttributeInfo
|
||||
//purpose :
|
||||
|
@@ -114,9 +114,6 @@ public:
|
||||
//! Returns GUID for UAttribute identifying lock flag
|
||||
Standard_EXPORT static const Standard_GUID& LockGUID();
|
||||
|
||||
//! Return GUIDs for TreeNode representing connections Animation-Shape
|
||||
Standard_EXPORT static const Standard_GUID& AnimRefShapeGUID();
|
||||
|
||||
//! Prints attribute information into a string.
|
||||
//! @param theAtt an XDE attribute
|
||||
//! @return the generated info value
|
||||
|
@@ -1,450 +0,0 @@
|
||||
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XCAFDoc_Animation.hxx>
|
||||
|
||||
#include <Standard_GUID.hxx>
|
||||
#include <TCollection_ExtendedString.hxx>
|
||||
#include <TDataStd_Integer.hxx>
|
||||
#include <TDataStd_IntegerArray.hxx>
|
||||
#include <TDataStd_Name.hxx>
|
||||
#include <TDataStd_RealArray.hxx>
|
||||
#include <TDataStd_UAttribute.hxx>
|
||||
#include <TDF_ChildIterator.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
#include <XCAFAnimObjects_AnimObject.hxx>
|
||||
#include <XCAFAnimObjects_CustomOperation.hxx>
|
||||
#include <XCAFAnimObjects_Orient.hxx>
|
||||
#include <XCAFAnimObjects_Rotate.hxx>
|
||||
#include <XCAFAnimObjects_Scale.hxx>
|
||||
#include <XCAFAnimObjects_Skew.hxx>
|
||||
#include <XCAFAnimObjects_Transform.hxx>
|
||||
#include <XCAFAnimObjects_Translate.hxx>
|
||||
|
||||
IMPLEMENT_DERIVED_ATTRIBUTE(XCAFDoc_Animation, TDataStd_GenericEmpty)
|
||||
|
||||
namespace
|
||||
{
|
||||
//=======================================================================
|
||||
//function : AnimRotateRefGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimRotateRefGUID()
|
||||
{
|
||||
static const Standard_GUID ID("09135874-3B7E-4379-8BDB-E781422B8DD7");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimCustomRefGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimCustomRefGUID()
|
||||
{
|
||||
static const Standard_GUID ID("1D0BC396-328D-45CC-B968-FD58DB7109A0");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimOrientRefGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimOrientRefGUID()
|
||||
{
|
||||
static const Standard_GUID ID("F601BE38-D3F8-4594-90C8-04B790ACD08A");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimScaleRefGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimScaleRefGUID()
|
||||
{
|
||||
static const Standard_GUID ID("40602308-A430-4912-A480-66DF8788338B");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimSkewRefGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimSkewRefGUID()
|
||||
{
|
||||
static const Standard_GUID ID("9A260C95-B2D6-472D-AEB4-D802C7528FEE");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimTransformRefGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimTransformRefGUID()
|
||||
{
|
||||
static const Standard_GUID ID("F26898A6-C7A8-4FC8-B328-4B442F935E7A");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimTranslateRefGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimTranslateRefGUID()
|
||||
{
|
||||
static const Standard_GUID ID("A8777A51-B13E-417A-82A0-6176246DD441");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimInterpolationRefGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimInterpolationRefGUID()
|
||||
{
|
||||
static const Standard_GUID ID("4C565EBB-70C2-4934-B451-0B45C3460412");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimInvertRefGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimInvertRefGUID()
|
||||
{
|
||||
static const Standard_GUID ID("7898D79A-6CCE-434C-A494-A37FC1931CC2");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimInvertRefGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimValuesDimensionGUID()
|
||||
{
|
||||
static const Standard_GUID ID("95CBDC47-5A79-4229-9851-B6F04EAEE482");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimValuesGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimValuesGUID()
|
||||
{
|
||||
static const Standard_GUID ID("C3CDFA73-1C9B-4674-BCAA-D1B7038AFE86");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimValuesGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimTimeStampsValuesGUID()
|
||||
{
|
||||
static const Standard_GUID ID("AAF6F1A2-F764-4A4B-8984-BF7CF09B7646");
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AnimValuesGUID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& AnimRotateSubTypeGUID()
|
||||
{
|
||||
static const Standard_GUID ID("A1E22D67-CD3E-4F8D-BD75-1DF04EF45266");
|
||||
return ID;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFDoc_Animation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XCAFDoc_Animation::XCAFDoc_Animation()
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& XCAFDoc_Animation::GetID()
|
||||
{
|
||||
static Standard_GUID DGTID("D755686B-872E-421E-8871-E98BE8051644");
|
||||
return DGTID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Set
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(XCAFDoc_Animation) XCAFDoc_Animation::Set(const TDF_Label& theLabel)
|
||||
{
|
||||
Handle(XCAFDoc_Animation) anAnimAttr;
|
||||
if (!theLabel.FindAttribute(XCAFDoc_Animation::GetID(), anAnimAttr)) {
|
||||
anAnimAttr = new XCAFDoc_Animation();
|
||||
theLabel.AddAttribute(anAnimAttr);
|
||||
}
|
||||
return anAnimAttr;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetObject
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void XCAFDoc_Animation::SetObject(const Handle(XCAFAnimObjects_AnimObject)& theObject)
|
||||
{
|
||||
Backup();
|
||||
|
||||
// Setting name
|
||||
const static TCollection_ExtendedString anObjName("Animation");
|
||||
TDataStd_Name::Set(Label(), anObjName);
|
||||
|
||||
// Setting Interpolation type
|
||||
TDataStd_Integer::Set(Label(), AnimInterpolationRefGUID(), theObject->GetInterpolationType());
|
||||
|
||||
Standard_Integer anOperInd = 1;
|
||||
// Setting ordered operations
|
||||
for (NCollection_List<Handle(XCAFAnimObjects_Operation)>::Iterator anIter(theObject->GetOrderedOperations());
|
||||
anIter.More(); anIter.Next(), anOperInd++)
|
||||
{
|
||||
const TDF_Label aChild = Label().FindChild(anOperInd, true);
|
||||
aChild.ForgetAllAttributes(); // Clear old values
|
||||
|
||||
const Handle(XCAFAnimObjects_Operation)& anOperation = anIter.Value();
|
||||
// Setting inverse flag
|
||||
if (anOperation->IsInverse())
|
||||
{
|
||||
TDataStd_UAttribute::Set(aChild, AnimInvertRefGUID());
|
||||
}
|
||||
// Setting operation type and name
|
||||
TDataStd_Name::Set(aChild, anOperation->GetTypeName());
|
||||
switch (anOperation->GetType())
|
||||
{
|
||||
case XCAFAnimObjects_OperationType_Custom:
|
||||
TDataStd_UAttribute::Set(aChild, AnimCustomRefGUID());
|
||||
break;
|
||||
case XCAFAnimObjects_OperationType_Orient:
|
||||
TDataStd_UAttribute::Set(aChild, AnimOrientRefGUID());
|
||||
break;
|
||||
case XCAFAnimObjects_OperationType_Rotate:
|
||||
{
|
||||
TDataStd_UAttribute::Set(aChild, AnimRotateRefGUID());
|
||||
const Handle(XCAFAnimObjects_Rotate) aRotate = Handle(XCAFAnimObjects_Rotate)::DownCast(anOperation);
|
||||
TDataStd_Integer::Set(aChild, AnimRotateSubTypeGUID(), aRotate->GetRotateType());
|
||||
break;
|
||||
}
|
||||
case XCAFAnimObjects_OperationType_Scale:
|
||||
TDataStd_UAttribute::Set(aChild, AnimScaleRefGUID());
|
||||
break;
|
||||
case XCAFAnimObjects_OperationType_Skew:
|
||||
TDataStd_UAttribute::Set(aChild, AnimSkewRefGUID());
|
||||
break;
|
||||
case XCAFAnimObjects_OperationType_Transform:
|
||||
TDataStd_UAttribute::Set(aChild, AnimTransformRefGUID());
|
||||
break;
|
||||
case XCAFAnimObjects_OperationType_Translate:
|
||||
TDataStd_UAttribute::Set(aChild, AnimTranslateRefGUID());
|
||||
break;
|
||||
}
|
||||
// Setting operation values
|
||||
const NCollection_Array2<double> anOperPresentation = anOperation->GeneralPresentation();
|
||||
Handle(TDataStd_IntegerArray) aDimArr = TDataStd_IntegerArray::Set(aChild, AnimValuesDimensionGUID(), 1, 2);
|
||||
aDimArr->SetValue(1, anOperPresentation.RowLength());
|
||||
aDimArr->SetValue(2, anOperPresentation.ColLength());
|
||||
const int aNbValues = anOperPresentation.Length();
|
||||
Handle(TDataStd_RealArray) aValuesArr = TDataStd_RealArray::Set(aChild, AnimValuesGUID(), 1, aNbValues);
|
||||
int anOperValueInd = 1;
|
||||
for (NCollection_Array2<double>::Iterator aOperValIter(anOperPresentation);
|
||||
aOperValIter.More(); aOperValIter.Next())
|
||||
{
|
||||
aValuesArr->SetValue(anOperValueInd++, aOperValIter.Value());
|
||||
}
|
||||
if (anOperation->HasTimeStamps())
|
||||
{
|
||||
const NCollection_Array1<double>& aTimeStamps = anOperation->TimeStamps();
|
||||
Handle(TDataStd_RealArray) aTimeStampsAttr =
|
||||
TDataStd_RealArray::Set(aChild, AnimTimeStampsValuesGUID(), aTimeStamps.Lower(), aTimeStamps.Upper());
|
||||
for (int aTimeStampInd = 1; aTimeStampInd <= aTimeStamps.Length(); aTimeStampInd++)
|
||||
{
|
||||
aTimeStampsAttr->SetValue(aTimeStampInd, aTimeStamps.Value(aTimeStampInd));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetObject
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(XCAFAnimObjects_AnimObject) XCAFDoc_Animation::GetObject() const
|
||||
{
|
||||
Handle(XCAFAnimObjects_AnimObject) anObj = new XCAFAnimObjects_AnimObject();
|
||||
Handle(TDataStd_Integer) anIntType;
|
||||
if (Label().FindAttribute(AnimInterpolationRefGUID(), anIntType))
|
||||
{
|
||||
const XCAFAnimObjects_InterpolationType aType =
|
||||
static_cast<XCAFAnimObjects_InterpolationType>(anIntType->Get());
|
||||
anObj->SetInterpolationType(aType);
|
||||
}
|
||||
NCollection_List<Handle(XCAFAnimObjects_Operation)> anOrderedOperations;
|
||||
for (TDF_ChildIterator aChildIterator(Label());
|
||||
aChildIterator.More(); aChildIterator.Next())
|
||||
{
|
||||
const TDF_Label& anOperL = aChildIterator.Value();
|
||||
XCAFAnimObjects_OperationType anOperType = XCAFAnimObjects_OperationType_Custom;
|
||||
Handle(TDataStd_UAttribute) anOperTypeAttr;
|
||||
if (anOperL.FindAttribute(AnimCustomRefGUID(), anOperTypeAttr))
|
||||
{
|
||||
anOperType = XCAFAnimObjects_OperationType_Custom;
|
||||
}
|
||||
else if (anOperL.FindAttribute(AnimOrientRefGUID(), anOperTypeAttr))
|
||||
{
|
||||
anOperType = XCAFAnimObjects_OperationType_Orient;
|
||||
}
|
||||
else if (anOperL.FindAttribute(AnimRotateRefGUID(), anOperTypeAttr))
|
||||
{
|
||||
anOperType = XCAFAnimObjects_OperationType_Rotate;
|
||||
}
|
||||
else if (anOperL.FindAttribute(AnimScaleRefGUID(), anOperTypeAttr))
|
||||
{
|
||||
anOperType = XCAFAnimObjects_OperationType_Scale;
|
||||
}
|
||||
else if (anOperL.FindAttribute(AnimSkewRefGUID(), anOperTypeAttr))
|
||||
{
|
||||
anOperType = XCAFAnimObjects_OperationType_Skew;
|
||||
}
|
||||
else if (anOperL.FindAttribute(AnimTransformRefGUID(), anOperTypeAttr))
|
||||
{
|
||||
anOperType = XCAFAnimObjects_OperationType_Transform;
|
||||
}
|
||||
else if (anOperL.FindAttribute(AnimTranslateRefGUID(), anOperTypeAttr))
|
||||
{
|
||||
anOperType = XCAFAnimObjects_OperationType_Translate;
|
||||
}
|
||||
if (anOperTypeAttr.IsNull())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Handle(TDataStd_IntegerArray) aDimAtrArr;
|
||||
if (!anOperL.FindAttribute(AnimValuesDimensionGUID(), aDimAtrArr) ||
|
||||
aDimAtrArr->Length() != 2)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Handle(TDataStd_RealArray) aValuesAtrArr;
|
||||
if (!anOperL.FindAttribute(AnimValuesGUID(), aValuesAtrArr) ||
|
||||
(aDimAtrArr->Value(1) * aDimAtrArr->Value(2)) != aValuesAtrArr->Length())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
NCollection_Array2<double> aValuesArr(1, aDimAtrArr->Value(2), 1, aDimAtrArr->Value(1));
|
||||
int aValuesInd = 1;
|
||||
for (NCollection_Array2<double>::Iterator aOperValIter(aValuesArr);
|
||||
aOperValIter.More(); aOperValIter.Next(), aValuesInd++)
|
||||
{
|
||||
aOperValIter.ChangeValue() = aValuesAtrArr->Value(aValuesInd);
|
||||
}
|
||||
Handle(TDataStd_RealArray) aTimeStampsAttr;
|
||||
NCollection_Array1<double> aTimeStampsArr;
|
||||
if (anOperL.FindAttribute(AnimTimeStampsValuesGUID(), aTimeStampsAttr) &&
|
||||
aTimeStampsAttr->Length() == aValuesArr.NbRows())
|
||||
{
|
||||
aTimeStampsArr.Resize(1, aTimeStampsAttr->Length(), false);
|
||||
for (int anTimeStampInd = 1; anTimeStampInd <= aTimeStampsAttr->Length(); anTimeStampInd++)
|
||||
{
|
||||
aTimeStampsArr.SetValue(anTimeStampInd, aTimeStampsAttr->Value(anTimeStampInd));
|
||||
}
|
||||
}
|
||||
Handle(TDataStd_UAttribute) anInvertAttr;
|
||||
const bool anIsInvert = anOperL.FindAttribute(AnimInvertRefGUID(), anInvertAttr);
|
||||
Handle(XCAFAnimObjects_Operation) aNewOperObj;
|
||||
switch (anOperType)
|
||||
{
|
||||
case XCAFAnimObjects_OperationType_Custom:
|
||||
{
|
||||
Handle(TDataStd_Name) aOperNameAttr;
|
||||
if (!anOperL.FindAttribute(TDataStd_Name::GetID(), aOperNameAttr))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
const TCollection_AsciiString aOperName = aOperNameAttr->Get();
|
||||
aNewOperObj = new XCAFAnimObjects_CustomOperation(aValuesArr, aTimeStampsArr, aOperName);
|
||||
break;
|
||||
}
|
||||
case XCAFAnimObjects_OperationType_Orient:
|
||||
{
|
||||
aNewOperObj = new XCAFAnimObjects_Orient(aValuesArr, aTimeStampsArr);
|
||||
break;
|
||||
}
|
||||
case XCAFAnimObjects_OperationType_Rotate:
|
||||
{
|
||||
Handle(TDataStd_Integer) aRotateTypeAttr;
|
||||
if (!anOperL.FindAttribute(AnimRotateSubTypeGUID(), aRotateTypeAttr))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
const XCAFAnimObjects_Rotate::XCAFAnimObjects_Rotate_Type aRotateType =
|
||||
static_cast<XCAFAnimObjects_Rotate::XCAFAnimObjects_Rotate_Type>(aRotateTypeAttr->Get());
|
||||
aNewOperObj = new XCAFAnimObjects_Rotate(aValuesArr, aTimeStampsArr, aRotateType);
|
||||
break;
|
||||
}
|
||||
case XCAFAnimObjects_OperationType_Scale:
|
||||
{
|
||||
aNewOperObj = new XCAFAnimObjects_Scale(aValuesArr, aTimeStampsArr);
|
||||
break;
|
||||
}
|
||||
case XCAFAnimObjects_OperationType_Skew:
|
||||
{
|
||||
aNewOperObj = new XCAFAnimObjects_Skew(aValuesArr, aTimeStampsArr);
|
||||
break;
|
||||
}
|
||||
case XCAFAnimObjects_OperationType_Transform:
|
||||
{
|
||||
aNewOperObj = new XCAFAnimObjects_Transform(aValuesArr, aTimeStampsArr);
|
||||
break;
|
||||
}
|
||||
case XCAFAnimObjects_OperationType_Translate:
|
||||
{
|
||||
aNewOperObj = new XCAFAnimObjects_Translate(aValuesArr, aTimeStampsArr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (aNewOperObj.IsNull())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
aNewOperObj->SetInverse(anIsInvert);
|
||||
anOrderedOperations.Append(aNewOperObj);
|
||||
}
|
||||
anObj->ChangeOrderedOperations() = anOrderedOperations;
|
||||
return anObj;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& XCAFDoc_Animation::ID() const
|
||||
{
|
||||
return GetID();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DumpJson
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void XCAFDoc_Animation::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const
|
||||
{
|
||||
(void)theOStream;
|
||||
(void)theDepth;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user