mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
Compare commits
38 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c88a9e8472 | ||
|
14a58b6472 | ||
|
585659c9ed | ||
|
2ac2591bca | ||
|
2491eec38b | ||
|
ab279b126b | ||
|
e4753a7d16 | ||
|
5ae6f08cc6 | ||
|
9b337ad8e5 | ||
|
3425e83f4b | ||
|
e720157864 | ||
|
452ba192d5 | ||
|
9140163ba8 | ||
|
7573a45deb | ||
|
802180e1a5 | ||
|
8ca58a51a7 | ||
|
acce2c1448 | ||
|
633084b809 | ||
|
a9e5f65041 | ||
|
b9a372bbcd | ||
|
b5204c6c37 | ||
|
75e2ba1695 | ||
|
5c48956f8e | ||
|
b9184c2714 | ||
|
e61aa824db | ||
|
5a846a5d2c | ||
|
b91e601442 | ||
|
cfde7eebb3 | ||
|
600ee85631 | ||
|
8dee83b0f3 | ||
|
2d0dd76414 | ||
|
08984eda3d | ||
|
b66cf6dae5 | ||
|
f91202f3ee | ||
|
072b4d382d | ||
|
3d21fe1aee | ||
|
2922a73ea7 | ||
|
e2d60d0f7f |
@@ -56,6 +56,20 @@ set_property (GLOBAL PROPERTY OCC_VERSION_MAJOR ${OCC_VERSION_MAJOR})
|
|||||||
set_property (GLOBAL PROPERTY OCC_VERSION_MINOR ${OCC_VERSION_MINOR})
|
set_property (GLOBAL PROPERTY OCC_VERSION_MINOR ${OCC_VERSION_MINOR})
|
||||||
set_property (GLOBAL PROPERTY OCC_VERSION_MAINTENANCE ${OCC_VERSION_MAINTENANCE})
|
set_property (GLOBAL PROPERTY OCC_VERSION_MAINTENANCE ${OCC_VERSION_MAINTENANCE})
|
||||||
|
|
||||||
|
# set soversion variable determining compatibility version on platforms with symlinks
|
||||||
|
# 0 - for empty, 1 - for major, 2 - for major.minor, 3 - for major.minor.maintenance
|
||||||
|
if (NOT BUILD_SOVERSION_NUMBERS)
|
||||||
|
set (BUILD_SOVERSION_NUMBERS "0" CACHE STRING "${BUILD_SOVERSION_NUMBERS_DESCR}" FORCE)
|
||||||
|
SET_PROPERTY(CACHE BUILD_SOVERSION_NUMBERS PROPERTY STRINGS 0 1 2 3)
|
||||||
|
|
||||||
|
# update default state of soversion on different platforms
|
||||||
|
if (WIN32 OR ANDROID OR EMSCRIPTEN)
|
||||||
|
set (BUILD_SOVERSION_NUMBERS 0)
|
||||||
|
else()
|
||||||
|
set (BUILD_SOVERSION_NUMBERS 2)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set (INSTALL_TEST_CASES OFF CACHE BOOL "${INSTALL_TEST_CASES_DESCR}")
|
set (INSTALL_TEST_CASES OFF CACHE BOOL "${INSTALL_TEST_CASES_DESCR}")
|
||||||
|
|
||||||
# Regeneration of OCCT resource files
|
# Regeneration of OCCT resource files
|
||||||
@@ -1225,7 +1239,7 @@ foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})
|
|||||||
endforeach()
|
endforeach()
|
||||||
# install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration
|
# install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration
|
||||||
install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)")
|
install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)")
|
||||||
install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)")
|
install (CODE "file(INSTALL FILES \"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" DESTINATION \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/\" TYPE FILE)")
|
||||||
|
|
||||||
foreach (OCCT_MODULE ${OCCT_MODULES})
|
foreach (OCCT_MODULE ${OCCT_MODULES})
|
||||||
if (BUILD_MODULE_${OCCT_MODULE})
|
if (BUILD_MODULE_${OCCT_MODULE})
|
||||||
|
@@ -454,6 +454,7 @@ t TKRWMesh
|
|||||||
n RWGltf
|
n RWGltf
|
||||||
n RWMesh
|
n RWMesh
|
||||||
n RWObj
|
n RWObj
|
||||||
|
n RWPly
|
||||||
n DFBrowser
|
n DFBrowser
|
||||||
n DFBrowserPane
|
n DFBrowserPane
|
||||||
n DFBrowserPaneXDE
|
n DFBrowserPaneXDE
|
||||||
|
@@ -280,14 +280,17 @@ get_property (OCC_VERSION_MAJOR GLOBAL PROPERTY OCC_VERSION_MAJOR)
|
|||||||
get_property (OCC_VERSION_MINOR GLOBAL PROPERTY OCC_VERSION_MINOR)
|
get_property (OCC_VERSION_MINOR GLOBAL PROPERTY OCC_VERSION_MINOR)
|
||||||
get_property (OCC_VERSION_MAINTENANCE GLOBAL PROPERTY OCC_VERSION_MAINTENANCE)
|
get_property (OCC_VERSION_MAINTENANCE GLOBAL PROPERTY OCC_VERSION_MAINTENANCE)
|
||||||
|
|
||||||
if (ANDROID)
|
set (OCC_SOVERSION "")
|
||||||
# do not append version to the filename
|
if (BUILD_SOVERSION_NUMBERS GREATER 2)
|
||||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
|
set (OCC_SOVERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
|
||||||
else()
|
elseif (BUILD_SOVERSION_NUMBERS GREATER 1)
|
||||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
|
set (OCC_SOVERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}")
|
||||||
SOVERSION "${OCC_VERSION_MAJOR}"
|
elseif (BUILD_SOVERSION_NUMBERS GREATER 0)
|
||||||
VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
|
set (OCC_SOVERSION "${OCC_VERSION_MAJOR}")
|
||||||
endif()
|
endif()
|
||||||
|
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
|
||||||
|
SOVERSION "${OCC_SOVERSION}"
|
||||||
|
VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
|
||||||
|
|
||||||
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
|
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
|
||||||
set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
|
set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
|
||||||
|
@@ -28,6 +28,9 @@ Applies only for Debug configuration.")
|
|||||||
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR
|
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR
|
||||||
"Append the postfix to names of output libraries")
|
"Append the postfix to names of output libraries")
|
||||||
|
|
||||||
|
set (BUILD_SOVERSION_NUMBERS_DESCR
|
||||||
|
"Version numbers to put into SONAME: 0 - for empty, 1 - for major, 2 - for major.minor, 3 - for major.minor.maintenance")
|
||||||
|
|
||||||
set (BUILD_RELEASE_DISABLE_EXCEPTIONS_DESCR
|
set (BUILD_RELEASE_DISABLE_EXCEPTIONS_DESCR
|
||||||
"Disables exceptions like Standard_OutOfRange in Release builds.
|
"Disables exceptions like Standard_OutOfRange in Release builds.
|
||||||
Defines No_Exception macros for Release builds when enabled (default).
|
Defines No_Exception macros for Release builds when enabled (default).
|
||||||
|
@@ -132,21 +132,31 @@ for (aPackage, aPackages) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# extend clean with versioned .so files
|
|
||||||
!win32 {
|
!win32 {
|
||||||
aVerList = $$split(VERSION, ".")
|
aVerList = $$split(VERSION, ".")
|
||||||
aVerMaj = $$member(aVerList, 0)
|
aVerMaj = $$member(aVerList, 0)
|
||||||
aVerMin = $$member(aVerList, 1)
|
aVerMin = $$member(aVerList, 1)
|
||||||
aVerMic = $$member(aVerList, 2)
|
aVerMic = $$member(aVerList, 2)
|
||||||
|
|
||||||
equals(TEMPLATE, app) {
|
equals(TEMPLATE, app) {
|
||||||
QMAKE_CLEAN += $$DESTDIR/$${TARGET}
|
QMAKE_CLEAN += $$DESTDIR/$${TARGET}
|
||||||
} else {
|
} else {
|
||||||
mac {
|
mac {
|
||||||
|
# override qmake soname versionong logic
|
||||||
|
QMAKE_LFLAGS_SONAME =
|
||||||
|
QMAKE_LFLAGS += -Wl,-soname=lib$${TARGET}.dylib.$${aVerMaj}.$${aVerMin}
|
||||||
|
|
||||||
|
# extend clean with versioned .dylib files
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.dylib
|
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.dylib
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.dylib
|
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.dylib
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.$${aVerMin}.dylib
|
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.$${aVerMin}.dylib
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.$${aVerMin}.$${aVerMic}.dylib
|
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.$${aVerMin}.$${aVerMic}.dylib
|
||||||
} else {
|
} else {
|
||||||
|
# override qmake soname versionong logic
|
||||||
|
QMAKE_LFLAGS_SONAME =
|
||||||
|
QMAKE_LFLAGS += -Wl,-soname=lib$${TARGET}.so.$${aVerMaj}.$${aVerMin}
|
||||||
|
|
||||||
|
# extend clean with versioned .so files
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so
|
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}
|
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}
|
||||||
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}.$${aVerMin}
|
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}.$${aVerMin}
|
||||||
|
633
dox/build/build_3rdparty/building_3rdparty.md
vendored
633
dox/build/build_3rdparty/building_3rdparty.md
vendored
@@ -2,60 +2,48 @@
|
|||||||
==============================================
|
==============================================
|
||||||
@tableofcontents
|
@tableofcontents
|
||||||
|
|
||||||
On Windows, the easiest way to install third-party libraries is to download archive with pre-built binaries from https://opencascade.com/content/3rd-party-components.
|
On Windows, the easiest way to install third-party libraries is to download archive with pre-built binaries from https://dev.opencascade.org/resources/download/3rd-party-components.
|
||||||
On Linux and OS X, it is recommended to use the version installed in the system natively.
|
On Linux and macOS, it is recommended to use the version installed in the system natively.
|
||||||
|
|
||||||
@section dev_guides__building_3rdparty_win_1 Windows
|
@section dev_guides__building_3rdparty_win_1 Windows
|
||||||
|
|
||||||
This document presents guidelines for building third-party products used by Open CASCADE Technology (OCCT) and samples on Windows platform. It is assumed that you are already familiar with MS Visual Studio / Visual C++.
|
This section presents guidelines for building third-party products used by Open CASCADE Technology (OCCT) and samples on Windows platform.
|
||||||
|
It is assumed that you are already familiar with MS Visual Studio / Visual C++.
|
||||||
|
|
||||||
You need to use the same version of MS Visual Studio for building all third-party products and OCCT itself, in order to receive a consistent set of run-time binaries.
|
You need to use the same version of MS Visual Studio for building all third-party products and OCCT itself, in order to receive a consistent set of runtime binaries.
|
||||||
|
|
||||||
The links for downloading the third-party products are available at https://opencascade.com/content/3rd-party-components.
|
It is recommended to create a separate new folder on your workstation, where you will unpack the downloaded archives of the third-party products, and where you will build these products (for example, `c:/occ3rdparty`).
|
||||||
|
Further in this document, this folder is referred to as `3rdparty`.
|
||||||
There are two types of third-party products used by OCCT:
|
|
||||||
|
|
||||||
* Mandatory products:
|
|
||||||
* Tcl/Tk 8.5 -- 8.6;
|
|
||||||
* FreeType 2.4.10 -- 2.5.3.
|
|
||||||
* Optional products:
|
|
||||||
* TBB 3.x -- 4.x;
|
|
||||||
* FreeImage 3.14.1 -- 3.16.0;
|
|
||||||
* VTK 6.1.0.
|
|
||||||
|
|
||||||
It is recommended to create a separate new folder on your workstation, where you will unpack the downloaded archives of the third-party products, and where you will build these products (for example, *c:\\occ3rdparty*).
|
|
||||||
|
|
||||||
Further in this document, this folder is referred to as *3rdparty*.
|
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_win_2 Tcl/Tk
|
@subsection dev_guides__building_3rdparty_win_2 Tcl/Tk
|
||||||
|
|
||||||
Tcl/Tk is required for DRAW test harness.
|
Tcl/Tk is required for DRAW test harness.
|
||||||
|
|
||||||
**Installation from sources: Tcl**
|
**Installation from sources: Tcl**
|
||||||
|
|
||||||
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||||
|
|
||||||
1. In the *win* sub-directory, edit file *buildall.vc.bat*:
|
1. In the `win` sub-directory, edit file `buildall.vc.bat`:
|
||||||
|
|
||||||
* Edit the line "call ... vcvars32.bat" to have correct path to the version of Visual Studio to be used for building, for instance:
|
* Edit the line `"call ... vcvars32.bat"` to have correct path to the version of Visual Studio to be used for building, for instance:
|
||||||
|
|
||||||
call "%VS80COMNTOOLS%\vsvars32.bat"
|
call "%VS80COMNTOOLS%\vsvars32.bat"
|
||||||
|
|
||||||
If you are building 64-bit version, set environment accordingly, e.g.:
|
If you are building 64-bit version, set environment accordingly, e.g.:
|
||||||
|
|
||||||
call "%VS80COMNTOOLS%\..\..\VC\vcvarsall.bat" amd64
|
call "%VS80COMNTOOLS%\..\..\VC\vcvarsall.bat" amd64
|
||||||
|
|
||||||
* Define variable *INSTALLDIR* pointing to directory where Tcl/Tk will be installed, e.g.:
|
* Define variable `INSTALLDIR` pointing to directory where Tcl/Tk will be installed, e.g.:
|
||||||
|
|
||||||
set INSTALLDIR=D:\OCCT\3rdparty\tcltk-86-32
|
set INSTALLDIR=D:\OCCT\3rdparty\tcltk-86-32
|
||||||
|
|
||||||
* Add option *install* to the first command line calling *nmake*:
|
* Add option `install` to the first command line calling `nmake`:
|
||||||
|
|
||||||
nmake -nologo -f makefile.vc release htmlhelp install %1
|
nmake -nologo -f makefile.vc release htmlhelp install %1
|
||||||
|
|
||||||
* Remove second call to *nmake* (building statically linked executable)
|
* Remove second call to `nmake` (building statically linked executable)
|
||||||
|
|
||||||
2. Edit file *rules.vc* replacing line
|
2. Edit file `rules.vc` replacing line
|
||||||
|
|
||||||
SUFX = tsgx
|
SUFX = tsgx
|
||||||
|
|
||||||
@@ -65,21 +53,18 @@ Download the necessary archive from https://www.tcl.tk/software/tcltk/download.h
|
|||||||
|
|
||||||
This is to avoid extra prefix 't' in the library name, which is not recognized by default by OCCT build tools.
|
This is to avoid extra prefix 't' in the library name, which is not recognized by default by OCCT build tools.
|
||||||
|
|
||||||
|
|
||||||
3. By default, Tcl uses dynamic version of run-time library (MSVCRT), which must be installed on the system where Tcl will be used.
|
3. By default, Tcl uses dynamic version of run-time library (MSVCRT), which must be installed on the system where Tcl will be used.
|
||||||
You may wish to link Tcl library with static version of run-time to avoid this dependency.
|
You may wish to link Tcl library with static version of run-time to avoid this dependency.
|
||||||
For that:
|
For that:
|
||||||
|
|
||||||
* Edit file *makefile.vc* replacing strings "crt = -MD" by "crt = -MT"
|
* Edit file `makefile.vc` replacing strings `"crt = -MD"` by `"crt = -MT"`
|
||||||
|
|
||||||
* Edit source file *tclMain.c* (located in folder *generic*) commenting out forward declaration of function *isatty()*.
|
* Edit source file `tclMain.c` (located in folder `generic`) commenting out forward declaration of function `isatty()`.
|
||||||
|
|
||||||
|
4. In the command prompt, run `buildall.vc.bat`<br>
|
||||||
|
You might need to run this script twice to have `tclsh` executable installed; check subfolder `bin` of specified installation path to verify this.
|
||||||
|
|
||||||
4. In the command prompt, run *buildall.vc.bat*
|
5. For convenience of use, we recommend making a copy of `tclsh` executable created in subfolder `bin` of `INSTALLDIR` and named with Tcl version number suffix, as `tclsh.exe` (with no suffix)
|
||||||
|
|
||||||
You might need to run this script twice to have *tclsh* executable installed; check subfolder *bin* of specified installation path to verify this.
|
|
||||||
|
|
||||||
5. For convenience of use, we recommend making a copy of *tclsh* executable created in subfolder *bin* of *INSTALLDIR* and named with Tcl version number suffix, as *tclsh.exe* (with no suffix)
|
|
||||||
|
|
||||||
> cd D:\OCCT\3rdparty\tcltk-86-32\bin
|
> cd D:\OCCT\3rdparty\tcltk-86-32\bin
|
||||||
> cp tclsh86.exe tclsh.exe
|
> cp tclsh86.exe tclsh.exe
|
||||||
@@ -87,190 +72,153 @@ Download the necessary archive from https://www.tcl.tk/software/tcltk/download.h
|
|||||||
**Installation from sources: Tk**
|
**Installation from sources: Tk**
|
||||||
|
|
||||||
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||||
|
Apply the same steps as described for building Tcl above, with the same `INSTALLDIR`.
|
||||||
|
Note that Tk produces its own executable, called `wish`.
|
||||||
|
|
||||||
Apply the same steps as described for building Tcl above, with the same INSTALLDIR.
|
You might need to edit default value of `TCLDIR` variable defined in `buildall.vc.bat` (should be not necessary if you unpack both Tcl and Tk sources in the same folder).
|
||||||
Note that Tk produces its own executable, called *wish*.
|
|
||||||
|
|
||||||
You might need to edit default value of *TCLDIR* variable defined in *buildall.vc.bat* (should be not necessary if you unpack both Tcl and Tk sources in the same folder).
|
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_win_2_2 FreeType
|
@subsection dev_guides__building_3rdparty_win_2_2 FreeType
|
||||||
|
|
||||||
FreeType is required for text display in a 3D viewer. You can download its sources from https://sourceforge.net/projects/freetype/files/
|
FreeType is required for text display in a 3D viewer.
|
||||||
|
You can download its sources from https://freetype.org/
|
||||||
|
|
||||||
### The building procedure
|
1. Unpack the downloaded archive of FreeType product into the `3rdparty` folder.
|
||||||
|
As a result, you will get a folder named, for example, `3rdparty/freetype-2.4.10`.
|
||||||
|
Further in this document, this folder is referred to as `freetype`.
|
||||||
|
|
||||||
1. Unpack the downloaded archive of FreeType product into the *3rdparty* folder. As a result, you will get a folder named, for example, *3rdparty\\freetype-2.4.10*. Further in this document, this folder is referred to as *freetype*.
|
2. Open the solution file `freetype/builds/win32/vc20xx/freetype.sln` in Visual Studio.
|
||||||
|
Here `vc20xx` stands for your version of Visual Studio.
|
||||||
2. Open the solution file *freetype\\builds\\win32\\vc20xx\\freetype.sln* in Visual Studio. Here *vc20xx* stands for your version of Visual Studio.
|
|
||||||
|
|
||||||
3. Select the configuration to build: either Debug or Release.
|
3. Select the configuration to build: either `Debug` or `Release`.
|
||||||
|
|
||||||
4. Build the *freetype* project.
|
4. Build the `freetype` project.<br>
|
||||||
|
As a result, you will get a `freetype` import library (`.lib`) in the `freetype/obj/win32/vc20xx` folder.
|
||||||
|
|
||||||
As a result, you will get a freetype import library (.lib) in the *freetype\\obj\\win32\\vc20xx* folder.
|
5. If you build FreeType for a 64 bit platform, select in the main menu `Build - Configuration Manager`
|
||||||
|
and add `x64` platform to the solution configuration by copying the settings from `Win32` platform:
|
||||||
|
|
||||||
5. If you build FreeType for a 64 bit platform, select in the main menu **Build - Configuration Manager** and add *x64* platform to the solution configuration by copying the settings from Win32 platform:
|
|
||||||
|
|
||||||
@figure{/build/build_3rdparty/images/3rdparty_image001.png}
|
@figure{/build/build_3rdparty/images/3rdparty_image001.png}
|
||||||
|
|
||||||
Update the value of the Output File for x64 configuration:
|
Update the value of the Output File for `x64` configuration:
|
||||||
|
|
||||||
@figure{/build/build_3rdparty/images/3rdparty_image003.png}
|
@figure{/build/build_3rdparty/images/3rdparty_image003.png}
|
||||||
|
|
||||||
Build the *freetype* project.
|
Build the `freetype` project.<br>
|
||||||
|
As a result, you will obtain a 64 bit import library (`.lib`) file in the `freetype/x64/vc20xx` folder.
|
||||||
|
To build FreeType as a dynamic library (`.dll`) follow steps 6, 7 and 8 of this procedure.
|
||||||
|
|
||||||
As a result, you will obtain a 64 bit import library (.lib) file in the *freetype\\x64\\vc20xx* folder.
|
6. Open menu Project-> Properties-> Configuration Properties-> General and change option `Configuration Type` to `Dynamic Library (.dll)`.
|
||||||
|
7. Edit file `freetype/include/freetype/config/ftoption.h`:<br>
|
||||||
|
in line 255, uncomment the definition of macro `FT_EXPORT` and change it as follows:
|
||||||
|
|
||||||
To build FreeType as a dynamic library (.dll) follow steps 6, 7 and 8 of this procedure.
|
#define FT_EXPORT(x) __declspec(dllexport) x
|
||||||
|
|
||||||
6. Open menu Project-> Properties-> Configuration Properties-> General and change option **Configuration Type** to *Dynamic Library (.dll)*.
|
8. Build the `freetype` project.<br>
|
||||||
7. Edit file *freetype\\include\\freetype\\config\\ftoption.h*:
|
As a result, you will obtain the files of the import library (`.lib`) and the dynamic library (`.dll`) in folders `freetype/objs/release` or `freetype/objs/debug`.
|
||||||
|
If you build for a 64 bit platform, follow step 5 of the procedure.
|
||||||
in line 255, uncomment the definition of macro *FT_EXPORT* and change it as follows:
|
|
||||||
|
|
||||||
#define FT_EXPORT(x) __declspec(dllexport) x
|
To facilitate the use of FreeType libraries in OCCT with minimal adjustment of build procedures,
|
||||||
|
it is recommended to copy the include files and libraries of FreeType into a separate folder, named according to the pattern `freetype-compiler-bitness-building mode`, where:
|
||||||
8. Build the *freetype* project.
|
* `compiler` is `vc8` or `vc9` or `vc10` or `vc11`;
|
||||||
|
* `bitness` is `32` or `64`;
|
||||||
As a result, you will obtain the files of the import library (.lib) and the dynamic library (.dll) in folders <i>freetype \\objs\\release</i> or <i>\\objs\\debug </i>.
|
* `building mode` is `opt` (for `Release`) or `deb` (for `Debug`).
|
||||||
|
|
||||||
If you build for a 64 bit platform, follow step 5 of the procedure.
|
|
||||||
|
|
||||||
To facilitate the use of FreeType libraries in OCCT with minimal adjustment of build procedures, it is recommended to copy the include files and libraries of FreeType into a separate folder, named according to the pattern: *freetype-compiler-bitness-building mode*, where:
|
|
||||||
* **compiler** is *vc8* or *vc9* or *vc10* or *vc11*;
|
|
||||||
* **bitness** is *32* or *64*;
|
|
||||||
* **building mode** is *opt* (for Release) or *deb* (for Debug).
|
|
||||||
|
|
||||||
The *include* subfolder should be copied as is, while libraries should be renamed to *freetype.lib* and *freetype.dll* (suffixes removed) and placed to subdirectories *lib *and *bin*, respectively. If the Debug configuration is built, the Debug libraries should be put into subdirectories *libd* and *bind*.
|
|
||||||
|
|
||||||
|
The `include` subfolder should be copied as is, while libraries should be renamed to `freetype.lib` and `freetype.dll` (suffixes removed) and placed to subdirectories `lib` and `bin`, respectively.
|
||||||
|
If the `Debug` configuration is built, the Debug libraries should be put into subdirectories `libd` and `bind`.
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_win_3_1 TBB
|
@subsection dev_guides__building_3rdparty_win_3_1 TBB
|
||||||
|
|
||||||
This third-party product is installed with binaries
|
This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb.
|
||||||
from the archive that can be downloaded from https://github.com/intel/tbb.
|
Go to the **Download** page, find the release version you need (e.g. `tbb30_018oss`) and pick the archive for Windows platform.
|
||||||
Go to the **Download** page, find the release version you need (e.g. *tbb30_018oss*) and pick the archive for Windows platform.
|
|
||||||
|
|
||||||
Unpack the downloaded archive of TBB product into the *3rdparty* folder.
|
Unpack the downloaded archive of TBB product into the `3rdparty` folder.
|
||||||
|
|
||||||
Further in this document, this folder is referred to as *tbb*.
|
Further in this document, this folder is referred to as `tbb`.
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_win_3_3 FreeImage
|
@subsection dev_guides__building_3rdparty_win_3_3 FreeImage
|
||||||
|
|
||||||
This third-party product should be built as a dynamically loadable library (.dll file).
|
This third-party product should be built as a dynamically loadable library (`.dll` file).
|
||||||
You can download its sources from
|
You can download its sources from
|
||||||
https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||||
|
|
||||||
### The building procedure:
|
1. Unpack the downloaded archive of FreeImage product into `3rdparty` folder.<br>
|
||||||
|
As a result, you should have a folder named `3rdparty/FreeImage`.
|
||||||
|
Rename it according to the rule: `freeimage-platform-compiler-building mode`, where
|
||||||
|
|
||||||
1. Unpack the downloaded archive of FreeImage product into *3rdparty* folder.
|
* `platform` is `win32` or `win64`;
|
||||||
|
* `compiler` is `vc8` or `vc9` or `vc10` or `vc11`;
|
||||||
As a result, you should have a folder named *3rdparty\\FreeImage*.
|
* `building mode` is *opt* (for release) or `deb` (for debug)
|
||||||
|
|
||||||
Rename it according to the rule: *freeimage-platform-compiler-building mode*, where
|
|
||||||
|
|
||||||
* **platform** is *win32* or *win64*;
|
|
||||||
* **compiler** is *vc8* or *vc9* or *vc10* or *vc11*;
|
|
||||||
* **building mode** is *opt* (for release) or *deb* (for debug)
|
|
||||||
|
|
||||||
Further in this document, this folder is referred to as *freeimage*.
|
Further in this document, this folder is referred to as `freeimage`.
|
||||||
|
|
||||||
2. Open the solution file *freeimage\\FreeImage.*.sln* in your Visual Studio.
|
2. Open the solution file `freeimage/FreeImage.*.sln` in your Visual Studio.<br>
|
||||||
|
If you use a Visual Studio version higher than VC++ 2008, apply conversion of the workspace.
|
||||||
If you use a Visual Studio version higher than VC++ 2008, apply conversion of the workspace.
|
Such conversion should be suggested automatically by Visual Studio.
|
||||||
Such conversion should be suggested automatically by Visual Studio.
|
|
||||||
|
|
||||||
3. Select a configuration to build.
|
|
||||||
|
|
||||||
- Choose **Release** if you are building Release binaries.
|
3. Select a configuration to build.
|
||||||
- Choose **Debug** if you are building Debug binaries.
|
- Choose `Release` if you are building Release binaries.
|
||||||
|
- Choose `Debug` if you are building Debug binaries.
|
||||||
|
|
||||||
*Note:*
|
*Note:*
|
||||||
|
|
||||||
|
If you want to build a debug version of FreeImage binaries then you need to rename the following files in FreeImage projects:
|
||||||
|
|
||||||
If you want to build a debug version of FreeImage binaries then you need to rename the following files in FreeImage and FreeimagePlus projects:
|
|
||||||
|
|
||||||
Project -> Properties -> Configuration Properties -> Linker -> General -> Output File
|
Project -> Properties -> Configuration Properties -> Linker -> General -> Output File
|
||||||
|
|
||||||
FreeImage*d*.dll to FreeImage.dll
|
FreeImage*d*.dll to FreeImage.dll
|
||||||
FreeImagePlus*d*.dll to FreeImagePlus.dll
|
|
||||||
|
|
||||||
Project -> Properties -> Configuration Properties -> Linker -> Debugging-> Generate Program Database File
|
Project -> Properties -> Configuration Properties -> Linker -> Debugging-> Generate Program Database File
|
||||||
|
|
||||||
FreeImage*d*.pdb to FreeImage.pdb
|
FreeImage*d*.pdb to FreeImage.pdb
|
||||||
FreeImagePlus*d*.pdb to FreeImagePlus.pdb
|
|
||||||
|
|
||||||
Project -> Properties -> Configuration Properties -> Linker -> Advanced-Import Library
|
Project -> Properties -> Configuration Properties -> Linker -> Advanced-Import Library
|
||||||
|
|
||||||
FreeImage*d*.lib to FreeImage.lib
|
FreeImage*d*.lib to FreeImage.lib
|
||||||
FreeImagePlus*d*.lib to FreeImagePlus.lib
|
|
||||||
|
|
||||||
Project -> Properties -> Configuration Properties -> Build Events -> Post -> Build Event -> Command Line
|
Project -> Properties -> Configuration Properties -> Build Events -> Post -> Build Event -> Command Line
|
||||||
|
|
||||||
FreeImage*d*.dll to FreeImage.dll
|
FreeImage*d*.dll to FreeImage.dll
|
||||||
FreeImage*d*.lib to FreeImage.lib
|
FreeImage*d*.lib to FreeImage.lib
|
||||||
FreeImagePlus*d*.dll to FreeImagePlus.dll
|
|
||||||
FreeImagePlus*d*.lib to FreeImagePlus.lib
|
|
||||||
|
|
||||||
Additionally, rename in project FreeImagePlus
|
Additionally, rename in project FreeImagePlus
|
||||||
|
|
||||||
Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies
|
|
||||||
|
|
||||||
from FreeImage*d*.lib to FreeImage.lib
|
Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies
|
||||||
|
|
||||||
4. Select a platform to build.
|
from FreeImage*d*.lib to FreeImage.lib
|
||||||
|
|
||||||
- Choose *Win32* if you are building for a 32 bit platform.
|
4. Select a platform to build.
|
||||||
- Choose *x64* if you are building for a 64 bit platform.
|
- Choose `Win32` if you are building for a 32 bit platform.
|
||||||
|
- Choose `x64` if you are building for a 64 bit platform.
|
||||||
|
|
||||||
5. Start the building process.
|
5. Start the building process.<br>
|
||||||
|
As a result, you should have the library files of FreeImage product in `freeimage/Dist` folder (`FreeImage.dll` and `FreeImage.lib`).
|
||||||
As a result, you should have the library files of FreeImage product in *freeimage\\Dist* folder (*FreeImage.dll* and *FreeImage.lib*) and in *freeimage\\Wrapper\\FreeImagePlus\\dist* folder (*FreeImagePlus.dll* and *FreeImagePlus.lib*).
|
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_win_3_4 VTK
|
@subsection dev_guides__building_3rdparty_win_3_4 VTK
|
||||||
|
|
||||||
VTK is an open-source, freely available software system for 3D computer graphics, image processing and visualization. VTK Integration Services component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library.
|
VTK Integration Services component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library.
|
||||||
|
|
||||||
### The building procedure:
|
1. Download the necessary archive from https://www.vtk.org/VTK/resources/software.html and unpack it into `3rdparty` folder.<br>
|
||||||
|
As a result, you will get a folder named, for example, `3rdparty/VTK-6.1.0`.
|
||||||
1. Download the necessary archive from https://www.vtk.org/VTK/resources/software.html and unpack it into *3rdparty* folder.
|
Further in this document, this folder is referred to as `VTK`.
|
||||||
|
|
||||||
As a result, you will get a folder named, for example, <i>3rdparty\VTK-6.1.0.</i>
|
|
||||||
|
|
||||||
Further in this document, this folder is referred to as *VTK*.
|
|
||||||
|
|
||||||
2. Use CMake to generate VS projects for building the library:
|
2. Use CMake to generate VS projects for building the library:
|
||||||
- Start CMake-GUI and select VTK folder as source path, and the folder of your choice for VS project and intermediate build data.
|
- Start CMake-GUI and select `VTK` folder as source path, and the folder of your choice for VS project and intermediate build data.
|
||||||
- Click **Configure**.
|
- Click **Configure**.
|
||||||
- Select the VS version to be used from the ones you have installed (we recommend using VS 2015) and the architecture (32 or 64-bit).
|
- Select the VS version to be used from the ones you have installed (we recommend using VS 2015) and the architecture (32 or 64-bit).
|
||||||
- Generate VS projects with default CMake options. The open solution *VTK.sln* will be generated in the build folder.
|
- Generate VS projects with default CMake options. The open solution `VTK.sln` will be generated in the build folder.
|
||||||
|
|
||||||
3. Build project VTK in Release mode.
|
3. Build project VTK in Release mode.
|
||||||
|
|
||||||
|
|
||||||
@section build_3rdparty_linux Linux
|
@section build_3rdparty_linux Linux
|
||||||
|
|
||||||
This document presents additional guidelines for building third-party
|
This section presents additional guidelines for building third-party products used by Open CASCADE Technology and samples on Linux platform.
|
||||||
products used by Open CASCADE Technology and samples on Linux platform.
|
|
||||||
|
|
||||||
The links for downloading the third-party products are available on the web site at
|
|
||||||
https://opencascade.com/content/3rd-party-components.
|
|
||||||
|
|
||||||
There are two types of third-party products, which are necessary to build OCCT:
|
|
||||||
|
|
||||||
* Mandatory products:
|
|
||||||
* Tcl/Tk 8.5 - 8.6;
|
|
||||||
* FreeType 2.4.10 - 2.5.3;
|
|
||||||
* Optional products:
|
|
||||||
* TBB 3.x - 4.x;
|
|
||||||
* FreeImage 3.14.1 - 3.16.0;
|
|
||||||
* VTK 6.1.0.
|
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_linux_4 Installation From Official Repositories
|
@subsection dev_guides__building_3rdparty_linux_4 Installation From Official Repositories
|
||||||
|
|
||||||
**Debian-based distributives**
|
**Debian-based distributives**
|
||||||
|
|
||||||
All 3rd-party products required for building of OCCT could be installed
|
All 3rd-party products required for building of OCCT could be installed from official repositories.
|
||||||
from official repositories. You may install them from console using apt-get utility:
|
You may install them from console using apt-get utility:
|
||||||
|
|
||||||
sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libx11-dev libgl1-mesa-dev libfreeimage-dev
|
sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libx11-dev libgl1-mesa-dev libfreeimage-dev
|
||||||
sudo apt-get install rapidjson-dev libdraco-dev
|
sudo apt-get install rapidjson-dev libdraco-dev
|
||||||
@@ -279,148 +227,148 @@ Building is possible with C++ compliant compiler:
|
|||||||
|
|
||||||
sudo apt-get install g++
|
sudo apt-get install g++
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_linux_2_1 Tcl/Tk
|
@subsection dev_guides__building_3rdparty_linux_2_1 Tcl/Tk
|
||||||
|
|
||||||
Tcl/Tk is required for DRAW test harness.
|
Tcl/Tk is required for DRAW test harness.
|
||||||
|
|
||||||
**Installation from sources: Tcl**
|
**Installation from sources: Tcl**
|
||||||
|
|
||||||
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||||
|
|
||||||
1. Enter the unix sub-directory of the directory where the Tcl source files are located <i>(TCL_SRC_DIR)</i>.
|
|
||||||
|
|
||||||
cd TCL_SRC_DIR/unix
|
1. Enter the `unix` sub-directory of the directory where the Tcl source files are located (`TCL_SRC_DIR`).
|
||||||
|
|
||||||
2. Run the *configure* command:
|
cd TCL_SRC_DIR/unix
|
||||||
|
|
||||||
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
|
2. Run the `configure` command:
|
||||||
|
|
||||||
For a 64 bit platform also add <i>--enable-64bit</i> option to the command line.
|
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
|
||||||
|
|
||||||
3. If the configure command has finished successfully, start the building process:
|
|
||||||
|
|
||||||
make
|
|
||||||
|
|
||||||
4. If building is finished successfully, start the installation of Tcl.
|
For a 64 bit platform also add `--enable-64bit` option to the command line.
|
||||||
All binary and service files of the product will be copied to the directory defined by *TCL_INSTALL_DIR*
|
|
||||||
|
|
||||||
make install
|
3. If the configure command has finished successfully, start the building process:
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
4. If building is finished successfully, start the installation of Tcl.
|
||||||
|
All binary and service files of the product will be copied to the directory defined by `TCL_INSTALL_DIR`
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
||||||
**Installation from sources: Tk**
|
**Installation from sources: Tk**
|
||||||
|
|
||||||
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||||
|
|
||||||
1. Enter the unix sub-directory of the directory where the Tk source files are located <i>(TK_SRC_DIR)</i>
|
1. Enter the `unix` sub-directory of the directory where the Tk source files are located (`TK_SRC_DIR`)
|
||||||
|
|
||||||
cd TK_SRC_DIR/unix
|
cd TK_SRC_DIR/unix
|
||||||
|
|
||||||
2. Run the configure command, where <i>TCL_LIB_DIR</i> is *TCL_INSTALL_DIR/lib*.
|
2. Run the `configure` command, where `TCL_LIB_DIR` is `TCL_INSTALL_DIR/lib`.
|
||||||
|
|
||||||
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
|
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
|
||||||
|
|
||||||
For a 64 bit platform also add <i>--enable-64bit</i> option to the command line.
|
For a 64 bit platform also add `--enable-64bit` option to the command line.
|
||||||
|
|
||||||
3. If the configure command has finished successfully, start the building process:
|
3. If the configure command has finished successfully, start the building process:
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
4. If the building has finished successfully, start the installation of Tk.
|
4. If the building has finished successfully, start the installation of Tk.
|
||||||
All binary and service files of the product will be copied
|
All binary and service files of the product will be copied
|
||||||
to the directory defined by *TK_INSTALL_DIR* (usually it is *TCL_INSTALL_DIR*)
|
to the directory defined by `TK_INSTALL_DIR` (usually it is `TCL_INSTALL_DIR`)
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_linux_2_2 FreeType
|
@subsection dev_guides__building_3rdparty_linux_2_2 FreeType
|
||||||
|
|
||||||
FreeType is required for text display in the 3D viewer.
|
FreeType is required for text display in the 3D viewer.
|
||||||
Download the necessary archive from https://sourceforge.net/projects/freetype/files/ and unpack it.
|
Download the necessary archive from https://freetype.org/ and unpack it.
|
||||||
|
|
||||||
1. Enter the directory where the source files of FreeType are located <i>(FREETYPE_SRC_DIR)</i>.
|
1. Enter the directory where the source files of FreeType are located (`FREETYPE_SRC_DIR`).
|
||||||
|
|
||||||
cd FREETYPE_SRC_DIR
|
cd FREETYPE_SRC_DIR
|
||||||
|
|
||||||
2. Run the *configure* command:
|
2. Run the `configure` command:
|
||||||
|
|
||||||
configure --prefix=FREETYPE_INSTALL_DIR
|
|
||||||
|
|
||||||
For a 64 bit platform also add <i>CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'</i> option to the command line.
|
configure --prefix=FREETYPE_INSTALL_DIR
|
||||||
|
|
||||||
3. If the *configure* command has finished successfully, start the building process:
|
|
||||||
|
|
||||||
make
|
For a 64 bit platform also add `CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'` option to the command line.
|
||||||
|
|
||||||
4. If the building has finished successfully, start the installation of FreeType.
|
3. If the `configure` command has finished successfully, start the building process:
|
||||||
All binary and service files of the product will be copied to the directory defined by *FREETYPE_INSTALL_DIR*
|
|
||||||
|
make
|
||||||
make install
|
|
||||||
|
4. If the building has finished successfully, start the installation of FreeType.
|
||||||
|
All binary and service files of the product will be copied to the directory defined by `FREETYPE_INSTALL_DIR`
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_linux_3_1 TBB
|
@subsection dev_guides__building_3rdparty_linux_3_1 TBB
|
||||||
|
|
||||||
This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb.
|
This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb.
|
||||||
Go to the **Download** page, find the release version you need and pick the archive for Linux platform.
|
Go to the **Download** page, find the release version you need and pick the archive for Linux platform.
|
||||||
To install, unpack the downloaded archive of TBB product.
|
To install, unpack the downloaded archive of TBB product.
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_linux_3_3 FreeImage
|
@subsection dev_guides__building_3rdparty_linux_3_3 FreeImage
|
||||||
|
|
||||||
Download the necessary archive from https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
Download the necessary archive from https://sourceforge.net/projects/freeimage/files/Source%20Distribution/ and unpack it.
|
||||||
and unpack it. The directory with unpacked sources is further referred to as *FREEIMAGE_SRC_DIR*.
|
The directory with unpacked sources is further referred to as `FREEIMAGE_SRC_DIR`.
|
||||||
|
|
||||||
1. Modify *FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h*:
|
|
||||||
In line 60 insert the following:
|
|
||||||
|
|
||||||
#include string.h
|
1. Modify `FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h`:<br>
|
||||||
|
In line 60 insert the following:
|
||||||
|
|
||||||
2. Enter the directory where the source files of FreeImage are located <i>(FREEIMAGE_SRC_DIR)</i>.
|
#include string.h
|
||||||
|
|
||||||
cd FREEIMAGE_SRC_DIR
|
|
||||||
|
|
||||||
3. Run the building process
|
2. Enter the directory where the source files of FreeImage are located (`FREEIMAGE_SRC_DIR`).
|
||||||
|
|
||||||
make
|
|
||||||
|
|
||||||
4. Run the installation process
|
cd FREEIMAGE_SRC_DIR
|
||||||
|
|
||||||
a. If you have the permission to write into directories <i>/usr/include</i> and <i>/usr/lib</i>, run the following command:
|
3. Run the building process
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
4. Run the installation process
|
||||||
|
|
||||||
|
a. If you have the permission to write into directories `/usr/include` and `/usr/lib`, run the following command:
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
||||||
|
b. If you do not have this permission, you need to modify file `FREEIMAGE_SRC_DIR/Makefile.gnu`:
|
||||||
|
|
||||||
make install
|
|
||||||
b. If you do not have this permission, you need to modify file *FREEIMAGE_SRC_DIR/Makefile.gnu*:
|
|
||||||
|
|
||||||
Change lines 7-9 from:
|
Change lines 7-9 from:
|
||||||
|
|
||||||
DESTDIR ?= /
|
|
||||||
INCDIR ?= $(DESTDIR)/usr/include
|
|
||||||
INSTALLDIR ?= $(DESTDIR)/usr/lib
|
|
||||||
|
|
||||||
to:
|
DESTDIR ?= /
|
||||||
|
INCDIR ?= $(DESTDIR)/usr/include
|
||||||
|
INSTALLDIR ?= $(DESTDIR)/usr/lib
|
||||||
|
|
||||||
DESTDIR ?= $(DESTDIR)
|
|
||||||
INCDIR ?= $(DESTDIR)/include
|
|
||||||
INSTALLDIR ?= $(DESTDIR)/lib
|
|
||||||
|
|
||||||
Change lines 65-67 from:
|
|
||||||
|
|
||||||
install -m 644 -o root -g root $(HEADER) $(INCDIR)
|
|
||||||
install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
|
|
||||||
install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
|
|
||||||
|
|
||||||
to:
|
to:
|
||||||
|
|
||||||
install -m 755 $(HEADER) $(INCDIR)
|
DESTDIR ?= $(DESTDIR)
|
||||||
install -m 755 $(STATICLIB) $(INSTALLDIR)
|
INCDIR ?= $(DESTDIR)/include
|
||||||
|
INSTALLDIR ?= $(DESTDIR)/lib
|
||||||
|
|
||||||
|
Change lines 65-67 from:
|
||||||
|
|
||||||
|
install -m 644 -o root -g root $(HEADER) $(INCDIR)
|
||||||
|
install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
|
||||||
|
install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
|
||||||
|
|
||||||
|
to:
|
||||||
|
|
||||||
|
install -m 755 $(HEADER) $(INCDIR)
|
||||||
|
install -m 755 $(STATICLIB) $(INSTALLDIR)
|
||||||
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
||||||
|
|
||||||
Change line 70 from:
|
Change line 70 from:
|
||||||
|
|
||||||
ldconfig
|
ldconfig
|
||||||
|
|
||||||
to:
|
to:
|
||||||
|
|
||||||
\#ldconfig
|
\#ldconfig
|
||||||
|
|
||||||
Then run the installation process by the following command:
|
|
||||||
|
|
||||||
make DESTDIR=FREEIMAGE_INSTALL_DIR install
|
Then run the installation process by the following command:
|
||||||
|
|
||||||
|
make DESTDIR=FREEIMAGE_INSTALL_DIR install
|
||||||
|
|
||||||
5. Clean temporary files
|
5. Clean temporary files
|
||||||
|
|
||||||
@@ -428,201 +376,180 @@ and unpack it. The directory with unpacked sources is further referred to as *F
|
|||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_linux_3_4 VTK
|
@subsection dev_guides__building_3rdparty_linux_3_4 VTK
|
||||||
|
|
||||||
You can download VTK sources from https://www.vtk.org/VTK/resources/software.html
|
|
||||||
|
|
||||||
### The building procedure:
|
|
||||||
|
|
||||||
Download the necessary archive from https://www.vtk.org/VTK/resources/software.html and unpack it.
|
Download the necessary archive from https://www.vtk.org/VTK/resources/software.html and unpack it.
|
||||||
|
|
||||||
1. Install or build *cmake* product from the source file.
|
1. Install or build `cmake` product from the source file.
|
||||||
2. Start *cmake* in GUI mode with the directory where the source files of *VTK* are located:
|
2. Start `cmake` in GUI mode with the directory where the source files of *VTK* are located:
|
||||||
|
|
||||||
ccmake VTK_SRC_DIR
|
ccmake VTK_SRC_DIR
|
||||||
|
|
||||||
* Press <i>[c]</i> to make the initial configuration
|
* Press `[c]` to make the initial configuration
|
||||||
* Define the necessary options in *VTK_INSTALL_PREFIX*
|
* Define the necessary options in `VTK_INSTALL_PREFIX`
|
||||||
* Press <i>[c]</i> to make the final configuration
|
* Press `[c]` to make the final configuration
|
||||||
* Press <i>[g]</i> to generate Makefile and exit
|
* Press `[g]` to generate `Makefile` and exit
|
||||||
|
|
||||||
3. Start the building of VTK:
|
3. Start the building of VTK:
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
4. Start the installation of VTK. Binaries will be installed according to the *VTK_INSTALL_PREFIX* option.
|
4. Start the installation of VTK. Binaries will be installed according to the `VTK_INSTALL_PREFIX` option.
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
@section build_3rdparty_macos Mac OS X
|
@section build_3rdparty_macos Mac OS X
|
||||||
|
|
||||||
This document presents additional guidelines for building third-party products
|
This section presents additional guidelines for building third-party products
|
||||||
used by Open CASCADE Technology and samples on Mac OS X platform (10.6.4 and later).
|
used by Open CASCADE Technology and samples on Mac OS X platform (10.6.4 and later).
|
||||||
|
|
||||||
The links for downloading the third-party products are available at https://opencascade.com/content/3rd-party-components.
|
@subsection dev_guides__building_3rdparty_osx_2_1 Tcl/Tk
|
||||||
|
|
||||||
There are two types of third-party products, which are necessary to build OCCT:
|
Tcl/Tk is required for DRAW test harness.
|
||||||
|
|
||||||
* Mandatory products:
|
|
||||||
* Tcl/Tk 8.5 - 8.6;
|
|
||||||
* FreeType 2.4.10 - 2.5.3.
|
|
||||||
* Optional products:
|
|
||||||
* TBB 3.x - 4.x;
|
|
||||||
* FreeImage 3.14.1 - 3.16.0
|
|
||||||
|
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_osx_2_1 Tcl/Tk 8.5
|
**Installation from sources: Tcl**
|
||||||
|
|
||||||
Tcl/Tk is required for DRAW test harness. Version 8.5 or 8.6 can be used with OCCT.
|
|
||||||
|
|
||||||
**Installation from sources: Tcl 8.5**
|
|
||||||
|
|
||||||
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||||
|
|
||||||
1. Enter the *macosx* sub-directory of the directory where the Tcl source files are located <i>(TCL_SRC_DIR)</i>.
|
1. Enter the `macosx` sub-directory of the directory where the Tcl source files are located (`TCL_SRC_DIR`).
|
||||||
|
|
||||||
cd TCL_SRC_DIR/macosx
|
cd TCL_SRC_DIR/macosx
|
||||||
|
|
||||||
2. Run the *configure* command
|
2. Run the `configure` command
|
||||||
|
|
||||||
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
|
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
|
||||||
|
|
||||||
For a 64 bit platform also add <i>--enable-64bit</i> option to the command line.
|
For a 64 bit platform also add `--enable-64bit` option to the command line.
|
||||||
|
|
||||||
3. If the *configure* command has finished successfully, start the building process
|
3. If the `configure` command has finished successfully, start the building process
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
4. If building is finished successfully, start the installation of Tcl.
|
|
||||||
All binary and service files of the product will be copied to the directory defined by *TCL_INSTALL_DIR*.
|
|
||||||
|
|
||||||
make install
|
4. If building is finished successfully, start the installation of Tcl.
|
||||||
|
All binary and service files of the product will be copied to the directory defined by `TCL_INSTALL_DIR`.
|
||||||
|
|
||||||
**Installation from sources: Tk 8.5**
|
make install
|
||||||
|
|
||||||
|
**Installation from sources: Tk**
|
||||||
|
|
||||||
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||||
|
|
||||||
1. Enter the *macosx* sub-directory of the directory where the source files of Tk are located <i>(TK_SRC_DIR)</i>.
|
1. Enter the `macosx` sub-directory of the directory where the source files of Tk are located (`TK_SRC_DIR`).
|
||||||
|
|
||||||
cd TK_SRC_DIR/macosx
|
cd TK_SRC_DIR/macosx
|
||||||
|
|
||||||
2. Run the *configure* command, where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
|
2. Run the `configure` command, where `TCL_LIB_DIR` is `TCL_INSTALL_DIR/lib`
|
||||||
|
|
||||||
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
|
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
|
||||||
|
|
||||||
For a 64 bit platform also add <i>--enable-64bit</i> option to the command line.
|
For a 64 bit platform also add `--enable-64bit` option to the command line.
|
||||||
|
|
||||||
3. If the *configure* command has finished successfully, start the building process:
|
3. If the `configure` command has finished successfully, start the building process:
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
4. If the building has finished successfully, start the installation of Tk. All binary and service files of the product will be copied to the directory defined by *TK_INSTALL_DIR* (usually it is TCL_INSTALL_DIR)
|
4. If the building has finished successfully, start the installation of Tk.
|
||||||
|
All binary and service files of the product will be copied to the directory defined by `TK_INSTALL_DIR` (usually it is `TCL_INSTALL_DIR`).
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_osx_2_2 FreeType 2.4.10
|
@subsection dev_guides__building_3rdparty_osx_2_2 FreeType
|
||||||
|
|
||||||
FreeType is required for text display in the 3D viewer.
|
|
||||||
|
|
||||||
Download the necessary archive from https://sourceforge.net/projects/freetype/files/ and unpack it.
|
FreeType is required for text display in the 3D viewer.
|
||||||
|
Download the necessary archive from https://freetype.org/ and unpack it.
|
||||||
|
|
||||||
1. Enter the directory where the source files of FreeType are located <i>(FREETYPE_SRC_DIR)</i>.
|
1. Enter the directory where the source files of FreeType are located (`FREETYPE_SRC_DIR`).
|
||||||
|
|
||||||
cd FREETYPE_SRC_DIR
|
cd FREETYPE_SRC_DIR
|
||||||
|
|
||||||
2. Run the *configure* command
|
2. Run the `configure` command
|
||||||
|
|
||||||
configure --prefix=FREETYPE_INSTALL_DIR
|
|
||||||
|
|
||||||
For a 64 bit platform also add <i>CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'</i> option to the command line.
|
configure --prefix=FREETYPE_INSTALL_DIR
|
||||||
|
|
||||||
3. If the *configure* command has finished successfully, start the building process
|
For a 64 bit platform also add `CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'` option to the command line.
|
||||||
|
|
||||||
make
|
3. If the `configure` command has finished successfully, start the building process
|
||||||
|
|
||||||
4. If building has finished successfully, start the installation of FreeType.
|
make
|
||||||
All binary and service files of the product will be copied to the directory defined by *FREETYPE_INSTALL_DIR*.
|
|
||||||
|
|
||||||
make install
|
4. If building has finished successfully, start the installation of FreeType.
|
||||||
|
All binary and service files of the product will be copied to the directory defined by `FREETYPE_INSTALL_DIR`.
|
||||||
@subsection dev_guides__building_3rdparty_osx_3_1 TBB 3.x or 4.x
|
|
||||||
|
|
||||||
This third-party product is installed with binaries from the archive
|
make install
|
||||||
that can be downloaded from https://github.com/intel/tbb.
|
|
||||||
Go to the **Download** page, find the release version you need (e.g. *tbb30_018oss*)
|
|
||||||
and pick the archive for Mac OS X platform.
|
|
||||||
To install, unpack the downloaded archive of TBB 3.0 product (*tbb30_018oss_osx.tgz*).
|
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_osx_3_3 FreeImage 3.14.1 or 3.15.x
|
@subsection dev_guides__building_3rdparty_osx_3_1 TBB
|
||||||
|
|
||||||
Download the necessary archive from
|
This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb.
|
||||||
|
Go to the **Download** page, find the release version you need (e.g. `tbb30_018oss`) and pick the archive for Mac OS X platform.
|
||||||
|
To install, unpack the downloaded archive of TBB product (`tbb30_018oss_osx.tgz`).
|
||||||
|
|
||||||
|
@subsection dev_guides__building_3rdparty_osx_3_3 FreeImage
|
||||||
|
|
||||||
|
Download the necessary archive from
|
||||||
https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||||
and unpack it. The directory with unpacked sources is further referred to as *FREEIMAGE_SRC_DIR*.
|
and unpack it. The directory with unpacked sources is further referred to as `FREEIMAGE_SRC_DIR`.
|
||||||
|
|
||||||
Note that for building FreeImage on Mac OS X 10.7 you should replace *Makefile.osx*
|
Note that for building FreeImage on Mac OS X 10.7 you should replace `Makefile.osx`
|
||||||
in *FREEIMAGE_SRC_DIR* by the corrected file, which you can find in attachment to issue #22811 in OCCT Mantis bug tracker
|
in `FREEIMAGE_SRC_DIR` by the corrected file, which you can find in attachment to issue [`#22811`](https://tracker.dev.opencascade.org/file_download.php?file_id=6937&type=bug) in OCCT Mantis bug tracker.
|
||||||
(https://tracker.dev.opencascade.org/file_download.php?file_id=6937&type=bug).
|
|
||||||
|
|
||||||
1. If you build FreeImage 3.15.x you can skip this step.
|
1. If you build FreeImage 3.15.x you can skip this step.
|
||||||
Modify <i>FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:</i>
|
|
||||||
|
|
||||||
In line 60 insert the following:
|
|
||||||
|
|
||||||
#include string.h
|
Modify `FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:`<br>
|
||||||
|
In line 60 insert the following:
|
||||||
|
|
||||||
Modify <i>FREEIMAGE_SRC_DIR/Source/FreeImage/PluginTARGA.cpp:</i>
|
#include string.h
|
||||||
|
|
||||||
In line 320 replace:
|
|
||||||
|
|
||||||
SwapShort(value);
|
Modify `FREEIMAGE_SRC_DIR/Source/FreeImage/PluginTARGA.cpp`:<br>
|
||||||
|
In line 320 replace:
|
||||||
|
|
||||||
with:
|
SwapShort(value);
|
||||||
|
|
||||||
SwapShort(&value);
|
with:
|
||||||
|
|
||||||
2. Enter the directory where the source files of FreeImage are located <i>(FREEIMAGE_SRC_DIR)</i>.
|
SwapShort(&value);
|
||||||
|
|
||||||
cd FREEIMAGE_SRC_DIR
|
2. Enter the directory where the source files of FreeImage are located (`FREEIMAGE_SRC_DIR`).
|
||||||
|
|
||||||
|
cd FREEIMAGE_SRC_DIR
|
||||||
|
|
||||||
3. Run the building process
|
3. Run the building process
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
4. Run the installation process
|
4. Run the installation process
|
||||||
|
|
||||||
1. If you have the permission to write into <i>/usr/local/include</i> and <i>/usr/local/lib</i> directories, run the following command:
|
|
||||||
|
|
||||||
make install
|
1. If you have the permission to write into `/usr/local/include` and `/usr/local/lib` directories, run the following command:
|
||||||
|
|
||||||
2. If you do not have this permission, you need to modify file *FREEIMAGE_SRC_DIR/Makefile.osx*:
|
make install
|
||||||
|
|
||||||
Change line 49 from:
|
2. If you do not have this permission, you need to modify file `FREEIMAGE_SRC_DIR/Makefile.osx`:<br>
|
||||||
|
Change line 49 from:
|
||||||
|
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
|
|
||||||
to:
|
to:
|
||||||
|
|
||||||
PREFIX ?= $(PREFIX)
|
|
||||||
|
|
||||||
Change lines 65-69 from:
|
PREFIX ?= $(PREFIX)
|
||||||
|
|
||||||
install -d -m 755 -o root -g wheel $(INCDIR) $(INSTALLDIR)
|
Change lines 65-69 from:
|
||||||
install -m 644 -o root -g wheel $(HEADER) $(INCDIR)
|
|
||||||
install -m 644 -o root -g wheel $(SHAREDLIB) $(STATICLIB) $(INSTALLDIR)
|
|
||||||
ranlib -sf $(INSTALLDIR)/$(STATICLIB)
|
|
||||||
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
|
|
||||||
|
|
||||||
to:
|
|
||||||
|
|
||||||
install -d $(INCDIR) $(INSTALLDIR)
|
install -d -m 755 -o root -g wheel $(INCDIR) $(INSTALLDIR)
|
||||||
install -m 755 $(HEADER) $(INCDIR)
|
install -m 644 -o root -g wheel $(HEADER) $(INCDIR)
|
||||||
install -m 755 $(STATICLIB) $(INSTALLDIR)
|
install -m 644 -o root -g wheel $(SHAREDLIB) $(STATICLIB) $(INSTALLDIR)
|
||||||
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
ranlib -sf $(INSTALLDIR)/$(STATICLIB)
|
||||||
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
|
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
|
||||||
|
|
||||||
|
to:
|
||||||
|
|
||||||
|
install -d $(INCDIR) $(INSTALLDIR)
|
||||||
|
install -m 755 $(HEADER) $(INCDIR)
|
||||||
|
install -m 755 $(STATICLIB) $(INSTALLDIR)
|
||||||
|
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
||||||
|
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
|
||||||
ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
|
ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
|
||||||
|
|
||||||
Then run the installation process by the following command:
|
Then run the installation process by the following command:
|
||||||
|
|
||||||
make PREFIX=FREEIMAGE_INSTALL_DIR install
|
make PREFIX=FREEIMAGE_INSTALL_DIR install
|
||||||
|
|
||||||
5. Clean temporary files
|
5. Clean temporary files
|
||||||
|
|
||||||
make clean
|
make clean
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -26,9 +26,7 @@
|
|||||||
#include <BRepBuilderAPI_MakeWire.hxx>
|
#include <BRepBuilderAPI_MakeWire.hxx>
|
||||||
#include <BRepBuilderAPI_MakeFace.hxx>
|
#include <BRepBuilderAPI_MakeFace.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <Graphic3d_Texture1D.hxx>
|
#include <Graphic3d_Texture2D.hxx>
|
||||||
#include <Graphic3d_Texture1Dsegment.hxx>
|
|
||||||
#include <Graphic3d_Texture2Dmanual.hxx>
|
|
||||||
#include <Image_AlienPixMap.hxx>
|
#include <Image_AlienPixMap.hxx>
|
||||||
#include <Prs3d_ShadingAspect.hxx>
|
#include <Prs3d_ShadingAspect.hxx>
|
||||||
#include <TopoDS_Edge.hxx>
|
#include <TopoDS_Edge.hxx>
|
||||||
@@ -81,7 +79,7 @@ void Sample2D_Image::SetContext (const Handle(AIS_InteractiveContext)& theContex
|
|||||||
this->Set(TopoDS_Shape(myFace));
|
this->Set(TopoDS_Shape(myFace));
|
||||||
|
|
||||||
myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
|
myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
|
||||||
Handle(Graphic3d_Texture2Dmanual) aTexture = new Graphic3d_Texture2Dmanual(myFilename);
|
Handle(Graphic3d_Texture2D) aTexture = new Graphic3d_Texture2D (myFilename);
|
||||||
aTexture->DisableModulate();
|
aTexture->DisableModulate();
|
||||||
myDrawer->ShadingAspect()->Aspect()->SetTextureMap (aTexture);
|
myDrawer->ShadingAspect()->Aspect()->SetTextureMap (aTexture);
|
||||||
myDrawer->ShadingAspect()->Aspect()->SetTextureMapOn();
|
myDrawer->ShadingAspect()->Aspect()->SetTextureMapOn();
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
#include <Graphic3d_AspectFillArea3d.hxx>
|
#include <Graphic3d_AspectFillArea3d.hxx>
|
||||||
#include <Graphic3d_Group.hxx>
|
#include <Graphic3d_Group.hxx>
|
||||||
#include <Graphic3d_StructureManager.hxx>
|
#include <Graphic3d_StructureManager.hxx>
|
||||||
#include <Graphic3d_Texture2Dmanual.hxx>
|
#include <Graphic3d_Texture2D.hxx>
|
||||||
#include <Message.hxx>
|
#include <Message.hxx>
|
||||||
#include <Message_Messenger.hxx>
|
#include <Message_Messenger.hxx>
|
||||||
#include <Prs3d_Drawer.hxx>
|
#include <Prs3d_Drawer.hxx>
|
||||||
@@ -278,17 +278,17 @@ void AIS_TexturedShape::updateAttributes (const Handle(Prs3d_Presentation)& theP
|
|||||||
TCollection_AsciiString aTextureDesc;
|
TCollection_AsciiString aTextureDesc;
|
||||||
if (!myTexturePixMap.IsNull())
|
if (!myTexturePixMap.IsNull())
|
||||||
{
|
{
|
||||||
myTexture = new Graphic3d_Texture2Dmanual (myTexturePixMap);
|
myTexture = new Graphic3d_Texture2D (myTexturePixMap);
|
||||||
aTextureDesc = " (custom image)";
|
aTextureDesc = " (custom image)";
|
||||||
}
|
}
|
||||||
else if (myPredefTexture != Graphic3d_NOT_2D_UNKNOWN)
|
else if (myPredefTexture != Graphic3d_NOT_2D_UNKNOWN)
|
||||||
{
|
{
|
||||||
myTexture = new Graphic3d_Texture2Dmanual (myPredefTexture);
|
myTexture = new Graphic3d_Texture2D (myPredefTexture);
|
||||||
aTextureDesc = TCollection_AsciiString(" (predefined texture ") + myTexture->GetId() + ")";
|
aTextureDesc = TCollection_AsciiString(" (predefined texture ") + myTexture->GetId() + ")";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
myTexture = new Graphic3d_Texture2Dmanual (myTextureFile.ToCString());
|
myTexture = new Graphic3d_Texture2D (myTextureFile.ToCString());
|
||||||
aTextureDesc = TCollection_AsciiString(" (") + myTextureFile + ")";
|
aTextureDesc = TCollection_AsciiString(" (") + myTextureFile + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
#include <PrsMgr_PresentationManager.hxx>
|
#include <PrsMgr_PresentationManager.hxx>
|
||||||
|
|
||||||
class Graphic3d_AspectFillArea3d;
|
class Graphic3d_AspectFillArea3d;
|
||||||
class Graphic3d_Texture2Dmanual;
|
class Graphic3d_Texture2D;
|
||||||
|
|
||||||
//! This class allows to map textures on shapes.
|
//! This class allows to map textures on shapes.
|
||||||
//! Presentations modes AIS_WireFrame (0) and AIS_Shaded (1) behave in the same manner as in AIS_Shape,
|
//! Presentations modes AIS_WireFrame (0) and AIS_Shaded (1) behave in the same manner as in AIS_Shape,
|
||||||
@@ -184,7 +184,7 @@ protected: //! @name overridden methods
|
|||||||
|
|
||||||
protected: //! @name presentation fields
|
protected: //! @name presentation fields
|
||||||
|
|
||||||
Handle(Graphic3d_Texture2Dmanual) myTexture;
|
Handle(Graphic3d_Texture2D) myTexture;
|
||||||
Handle(Graphic3d_AspectFillArea3d) myAspect;
|
Handle(Graphic3d_AspectFillArea3d) myAspect;
|
||||||
|
|
||||||
protected: //! @name texture source fields
|
protected: //! @name texture source fields
|
||||||
|
@@ -23,14 +23,14 @@
|
|||||||
#include <SelectMgr_EntityOwner.hxx>
|
#include <SelectMgr_EntityOwner.hxx>
|
||||||
|
|
||||||
//! Texture holder.
|
//! Texture holder.
|
||||||
class AIS_XRTrackedDevice::XRTexture : public Graphic3d_Texture2Dmanual
|
class AIS_XRTrackedDevice::XRTexture : public Graphic3d_Texture2D
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Constructor.
|
//! Constructor.
|
||||||
XRTexture (const Handle(Image_Texture)& theImageSource,
|
XRTexture (const Handle(Image_Texture)& theImageSource,
|
||||||
const Graphic3d_TextureUnit theUnit = Graphic3d_TextureUnit_BaseColor)
|
const Graphic3d_TextureUnit theUnit = Graphic3d_TextureUnit_BaseColor)
|
||||||
: Graphic3d_Texture2Dmanual (""), myImageSource (theImageSource)
|
: Graphic3d_Texture2D (""), myImageSource (theImageSource)
|
||||||
{
|
{
|
||||||
if (!theImageSource->TextureId().IsEmpty())
|
if (!theImageSource->TextureId().IsEmpty())
|
||||||
{
|
{
|
||||||
|
@@ -114,19 +114,20 @@ public:
|
|||||||
Standard_EXPORT virtual Standard_Boolean IsVPeriodic() const;
|
Standard_EXPORT virtual Standard_Boolean IsVPeriodic() const;
|
||||||
|
|
||||||
Standard_EXPORT virtual Standard_Real VPeriod() const;
|
Standard_EXPORT virtual Standard_Real VPeriod() const;
|
||||||
|
|
||||||
//! Computes the point of parameters U,V on the surface.
|
//! Computes the point of parameters U,V on the surface.
|
||||||
|
//! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point.
|
||||||
Standard_EXPORT virtual gp_Pnt Value (const Standard_Real U, const Standard_Real V) const;
|
Standard_EXPORT virtual gp_Pnt Value (const Standard_Real U, const Standard_Real V) const;
|
||||||
|
|
||||||
//! Computes the point of parameters U,V on the surface.
|
//! Computes the point of parameters U,V on the surface.
|
||||||
Standard_EXPORT virtual void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const;
|
Standard_EXPORT virtual void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const;
|
||||||
|
|
||||||
//! Computes the point and the first derivatives on
|
//! Computes the point and the first derivatives on the surface.
|
||||||
//! the surface.
|
//! Raised if the continuity of the current intervals is not C1.
|
||||||
//! Raised if the continuity of the current
|
//!
|
||||||
//! intervals is not C1.
|
//! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point.
|
||||||
Standard_EXPORT virtual void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const;
|
Standard_EXPORT virtual void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const;
|
||||||
|
|
||||||
//! Computes the point, the first and second
|
//! Computes the point, the first and second
|
||||||
//! derivatives on the surface.
|
//! derivatives on the surface.
|
||||||
//! Raised if the continuity of the current
|
//! Raised if the continuity of the current
|
||||||
|
@@ -30,34 +30,6 @@ IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_TopolTool,Standard_Transient)
|
|||||||
|
|
||||||
#define myInfinite Precision::Infinite()
|
#define myInfinite Precision::Infinite()
|
||||||
|
|
||||||
static void GetConeApexParam(const gp_Cone& C, Standard_Real& U, Standard_Real& V)
|
|
||||||
{
|
|
||||||
const gp_Ax3& Pos = C.Position();
|
|
||||||
Standard_Real Radius = C.RefRadius();
|
|
||||||
Standard_Real SAngle = C.SemiAngle();
|
|
||||||
const gp_Pnt& P = C.Apex();
|
|
||||||
|
|
||||||
gp_Trsf T;
|
|
||||||
T.SetTransformation (Pos);
|
|
||||||
gp_Pnt Ploc = P.Transformed (T);
|
|
||||||
|
|
||||||
if(Ploc.X() ==0.0 && Ploc.Y()==0.0 ) {
|
|
||||||
U = 0.0;
|
|
||||||
}
|
|
||||||
else if ( -Radius > Ploc.Z()* Tan(SAngle) ) {
|
|
||||||
// the point is at the `wrong` side of the apex
|
|
||||||
U = atan2(-Ploc.Y(), -Ploc.X());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
U = atan2(Ploc.Y(),Ploc.X());
|
|
||||||
}
|
|
||||||
if (U < -1.e-16) U += (M_PI+M_PI);
|
|
||||||
else if (U < 0) U = 0;
|
|
||||||
|
|
||||||
V = sin(SAngle) * ( Ploc.X() * cos(U) + Ploc.Y() * sin(U) - Radius)
|
|
||||||
+ cos(SAngle) * Ploc.Z();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Adaptor3d_TopolTool::Adaptor3d_TopolTool ()
|
Adaptor3d_TopolTool::Adaptor3d_TopolTool ()
|
||||||
: myNbSamplesU(-1),
|
: myNbSamplesU(-1),
|
||||||
@@ -1376,3 +1348,39 @@ Standard_Boolean Adaptor3d_TopolTool::IsUniformSampling() const
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetConeApexParam
|
||||||
|
//purpose : Computes the cone's apex parameters
|
||||||
|
//=======================================================================
|
||||||
|
void Adaptor3d_TopolTool::GetConeApexParam (const gp_Cone& theC, Standard_Real& theU, Standard_Real& theV)
|
||||||
|
{
|
||||||
|
const gp_Ax3& Pos = theC.Position();
|
||||||
|
Standard_Real Radius = theC.RefRadius();
|
||||||
|
Standard_Real SAngle = theC.SemiAngle();
|
||||||
|
const gp_Pnt& P = theC.Apex();
|
||||||
|
|
||||||
|
gp_Trsf T;
|
||||||
|
T.SetTransformation(Pos);
|
||||||
|
gp_Pnt Ploc = P.Transformed(T);
|
||||||
|
|
||||||
|
if (Ploc.X() == 0.0 && Ploc.Y() == 0.0)
|
||||||
|
{
|
||||||
|
theU = 0.0;
|
||||||
|
}
|
||||||
|
else if (-Radius > Ploc.Z() * Tan(SAngle))
|
||||||
|
{
|
||||||
|
// the point is at the `wrong` side of the apex
|
||||||
|
theU = atan2(-Ploc.Y(), -Ploc.X());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
theU = atan2(Ploc.Y(), Ploc.X());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (theU < -1.e-16) theU += (M_PI + M_PI);
|
||||||
|
else if (theU < 0) theU = 0;
|
||||||
|
|
||||||
|
theV = sin(SAngle) * (Ploc.X() * cos(theU) + Ploc.Y() * sin(theU) - Radius)
|
||||||
|
+ cos(SAngle) * Ploc.Z();
|
||||||
|
}
|
||||||
|
@@ -146,6 +146,12 @@ public:
|
|||||||
//! Returns true if provide uniform sampling of points.
|
//! Returns true if provide uniform sampling of points.
|
||||||
Standard_EXPORT virtual Standard_Boolean IsUniformSampling() const;
|
Standard_EXPORT virtual Standard_Boolean IsUniformSampling() const;
|
||||||
|
|
||||||
|
//! Computes the cone's apex parameters.
|
||||||
|
//! @param[in] theC conical surface
|
||||||
|
//! @param[in] theU U parameter of cone's apex
|
||||||
|
//! @param[in] theV V parameter of cone's apex
|
||||||
|
Standard_EXPORT static void GetConeApexParam (const gp_Cone& theC, Standard_Real& theU, Standard_Real& theV);
|
||||||
|
|
||||||
DEFINE_STANDARD_RTTIEXT(Adaptor3d_TopolTool,Standard_Transient)
|
DEFINE_STANDARD_RTTIEXT(Adaptor3d_TopolTool,Standard_Transient)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -141,17 +141,18 @@ public:
|
|||||||
virtual Standard_Real VPeriod() const Standard_OVERRIDE { return mySurf.VPeriod(); }
|
virtual Standard_Real VPeriod() const Standard_OVERRIDE { return mySurf.VPeriod(); }
|
||||||
|
|
||||||
//! Computes the point of parameters U,V on the surface.
|
//! Computes the point of parameters U,V on the surface.
|
||||||
|
//! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point.
|
||||||
Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const Standard_OVERRIDE;
|
Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Computes the point of parameters U,V on the surface.
|
//! Computes the point of parameters U,V on the surface.
|
||||||
Standard_EXPORT void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const Standard_OVERRIDE;
|
Standard_EXPORT void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Computes the point and the first derivatives on
|
//! Computes the point and the first derivatives on the surface.
|
||||||
//! the surface.
|
//! Raised if the continuity of the current intervals is not C1.
|
||||||
//! Raised if the continuity of the current
|
//!
|
||||||
//! intervals is not C1.
|
//! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point.
|
||||||
Standard_EXPORT void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const Standard_OVERRIDE;
|
Standard_EXPORT void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Computes the point, the first and second
|
//! Computes the point, the first and second
|
||||||
//! derivatives on the surface.
|
//! derivatives on the surface.
|
||||||
//! Raised if the continuity of the current
|
//! Raised if the continuity of the current
|
||||||
|
@@ -1960,6 +1960,12 @@ public:
|
|||||||
return aDeriv.Transformed(mySurfaceTrsf);
|
return aDeriv.Transformed(mySurfaceTrsf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gp_Dir Normal()
|
||||||
|
{
|
||||||
|
gp_Dir aNormal = mySurfaceProps.Normal();
|
||||||
|
return aNormal.Transformed(mySurfaceTrsf);
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate principal curvatures, which consist of minimal and maximal normal curvatures and
|
// Calculate principal curvatures, which consist of minimal and maximal normal curvatures and
|
||||||
// the directions on the tangent plane (principal direction) where the extremums are reached
|
// the directions on the tangent plane (principal direction) where the extremums are reached
|
||||||
void Curvature(gp_Dir& thePrincipalDir1, Standard_Real& theCurvature1,
|
void Curvature(gp_Dir& thePrincipalDir1, Standard_Real& theCurvature1,
|
||||||
@@ -1998,32 +2004,63 @@ private:
|
|||||||
//purpose : check the angle at the border between two squares.
|
//purpose : check the angle at the border between two squares.
|
||||||
// Two shares should have a shared front edge.
|
// Two shares should have a shared front edge.
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed,
|
GeomAbs_Shape BRepLib::ContinuityOfFaces(const TopoDS_Edge& theEdge,
|
||||||
const TopoDS_Face& F1,
|
const TopoDS_Face& theFace1,
|
||||||
const TopoDS_Face& F2,
|
const TopoDS_Face& theFace2,
|
||||||
const Standard_Real theAngleTol)
|
const Standard_Real theAngleTol)
|
||||||
{
|
{
|
||||||
Standard_Boolean isSeam = F1.IsEqual(F2);
|
Standard_Boolean isSeam = theFace1.IsEqual(theFace2);
|
||||||
|
|
||||||
TopoDS_Edge E = Ed;
|
TopoDS_Edge anEdgeInFace1, anEdgeInFace2;
|
||||||
|
Handle(Geom2d_Curve) aCurve1, aCurve2;
|
||||||
|
|
||||||
|
Standard_Real aFirst, aLast;
|
||||||
|
|
||||||
|
if (!theFace1.IsSame (theFace2) &&
|
||||||
|
BRep_Tool::IsClosed (theEdge, theFace1) &&
|
||||||
|
BRep_Tool::IsClosed (theEdge, theFace2))
|
||||||
|
{
|
||||||
|
//Find the edge in the face 1: this edge will have correct orientation
|
||||||
|
TopoDS_Face aFace1 = theFace1;
|
||||||
|
aFace1.Orientation (TopAbs_FORWARD);
|
||||||
|
TopExp_Explorer anExplo (aFace1, TopAbs_EDGE);
|
||||||
|
for (; anExplo.More(); anExplo.Next())
|
||||||
|
{
|
||||||
|
const TopoDS_Edge& anEdge = TopoDS::Edge (anExplo.Current());
|
||||||
|
if (anEdge.IsSame (theEdge))
|
||||||
|
{
|
||||||
|
anEdgeInFace1 = anEdge;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (anEdgeInFace1.IsNull())
|
||||||
|
return GeomAbs_C0;
|
||||||
|
|
||||||
|
aCurve1 = BRep_Tool::CurveOnSurface (anEdgeInFace1, aFace1, aFirst, aLast);
|
||||||
|
TopoDS_Face aFace2 = theFace2;
|
||||||
|
aFace2.Orientation (TopAbs_FORWARD);
|
||||||
|
anEdgeInFace2 = anEdgeInFace1;
|
||||||
|
anEdgeInFace2.Reverse();
|
||||||
|
aCurve2 = BRep_Tool::CurveOnSurface (anEdgeInFace2, aFace2, aFirst, aLast);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Obtaining of pcurves of edge on two faces.
|
||||||
|
anEdgeInFace1 = anEdgeInFace2 = theEdge;
|
||||||
|
aCurve1 = BRep_Tool::CurveOnSurface (anEdgeInFace1, theFace1, aFirst, aLast);
|
||||||
|
//For the case of seam edge
|
||||||
|
if (theFace1.IsSame(theFace2))
|
||||||
|
anEdgeInFace2.Reverse();
|
||||||
|
aCurve2 = BRep_Tool::CurveOnSurface (anEdgeInFace2, theFace2, aFirst, aLast);
|
||||||
|
}
|
||||||
|
|
||||||
// Check if pcurves exist on both faces of edge
|
if (aCurve1.IsNull() || aCurve2.IsNull())
|
||||||
Standard_Real aFirst,aLast;
|
|
||||||
E.Orientation(TopAbs_FORWARD);
|
|
||||||
Handle(Geom2d_Curve) aCurve1 = BRep_Tool::CurveOnSurface(E, F1, aFirst, aLast);
|
|
||||||
if(aCurve1.IsNull())
|
|
||||||
return GeomAbs_C0;
|
|
||||||
|
|
||||||
if (isSeam)
|
|
||||||
E.Orientation(TopAbs_REVERSED);
|
|
||||||
Handle(Geom2d_Curve) aCurve2 = BRep_Tool::CurveOnSurface(E, F2, aFirst, aLast);
|
|
||||||
if(aCurve2.IsNull())
|
|
||||||
return GeomAbs_C0;
|
return GeomAbs_C0;
|
||||||
|
|
||||||
TopLoc_Location aLoc1, aLoc2;
|
TopLoc_Location aLoc1, aLoc2;
|
||||||
Handle(Geom_Surface) aSurface1 = BRep_Tool::Surface(F1, aLoc1);
|
Handle(Geom_Surface) aSurface1 = BRep_Tool::Surface (theFace1, aLoc1);
|
||||||
const gp_Trsf& aSurf1Trsf = aLoc1.Transformation();
|
const gp_Trsf& aSurf1Trsf = aLoc1.Transformation();
|
||||||
Handle(Geom_Surface) aSurface2 = BRep_Tool::Surface(F2, aLoc2);
|
Handle(Geom_Surface) aSurface2 = BRep_Tool::Surface (theFace2, aLoc2);
|
||||||
const gp_Trsf& aSurf2Trsf = aLoc2.Transformation();
|
const gp_Trsf& aSurf2Trsf = aLoc2.Transformation();
|
||||||
|
|
||||||
if (aSurface1->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
|
if (aSurface1->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
|
||||||
@@ -2040,11 +2077,11 @@ static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed,
|
|||||||
return GeomAbs_CN;
|
return GeomAbs_CN;
|
||||||
}
|
}
|
||||||
|
|
||||||
SurfaceProperties aSP1(aSurface1, aSurf1Trsf, aCurve1, F1.Orientation() == TopAbs_REVERSED);
|
SurfaceProperties aSP1(aSurface1, aSurf1Trsf, aCurve1, theFace1.Orientation() == TopAbs_REVERSED);
|
||||||
SurfaceProperties aSP2(aSurface2, aSurf2Trsf, aCurve2, F2.Orientation() == TopAbs_REVERSED);
|
SurfaceProperties aSP2(aSurface2, aSurf2Trsf, aCurve2, theFace2.Orientation() == TopAbs_REVERSED);
|
||||||
|
|
||||||
Standard_Real f, l, eps;
|
Standard_Real f, l, eps;
|
||||||
BRep_Tool::Range(E,f,l);
|
BRep_Tool::Range (theEdge,f,l);
|
||||||
Extrema_LocateExtPC ext;
|
Extrema_LocateExtPC ext;
|
||||||
Handle(BRepAdaptor_Curve) aHC2;
|
Handle(BRepAdaptor_Curve) aHC2;
|
||||||
|
|
||||||
@@ -2055,7 +2092,6 @@ static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed,
|
|||||||
const Standard_Real anAngleTol2 = theAngleTol * theAngleTol;
|
const Standard_Real anAngleTol2 = theAngleTol * theAngleTol;
|
||||||
|
|
||||||
gp_Vec aDer1, aDer2;
|
gp_Vec aDer1, aDer2;
|
||||||
gp_Vec aNorm1;
|
|
||||||
Standard_Real aSqLen1, aSqLen2;
|
Standard_Real aSqLen1, aSqLen2;
|
||||||
gp_Dir aCrvDir1[2], aCrvDir2[2];
|
gp_Dir aCrvDir1[2], aCrvDir2[2];
|
||||||
Standard_Real aCrvLen1[2], aCrvLen2[2];
|
Standard_Real aCrvLen1[2], aCrvLen2[2];
|
||||||
@@ -2083,13 +2119,26 @@ static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed,
|
|||||||
aDer2 = aSP2.Derivative();
|
aDer2 = aSP2.Derivative();
|
||||||
aSqLen2 = aDer2.SquareMagnitude();
|
aSqLen2 = aDer2.SquareMagnitude();
|
||||||
Standard_Boolean isSmoothSuspect = (aDer1.CrossSquareMagnitude(aDer2) <= anAngleTol2 * aSqLen1 * aSqLen2);
|
Standard_Boolean isSmoothSuspect = (aDer1.CrossSquareMagnitude(aDer2) <= anAngleTol2 * aSqLen1 * aSqLen2);
|
||||||
|
if (isSmoothSuspect)
|
||||||
|
{
|
||||||
|
gp_Dir aNormal1 = aSP1.Normal();
|
||||||
|
if (theFace1.Orientation() == TopAbs_REVERSED)
|
||||||
|
aNormal1.Reverse();
|
||||||
|
gp_Dir aNormal2 = aSP2.Normal();
|
||||||
|
if (theFace2.Orientation() == TopAbs_REVERSED)
|
||||||
|
aNormal2.Reverse();
|
||||||
|
|
||||||
|
if (aNormal1 * aNormal2 < 0.)
|
||||||
|
return GeomAbs_C0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isSmoothSuspect)
|
if (!isSmoothSuspect)
|
||||||
{
|
{
|
||||||
// Refine by projection
|
// Refine by projection
|
||||||
if (aHC2.IsNull())
|
if (aHC2.IsNull())
|
||||||
{
|
{
|
||||||
// adaptor for pcurve on the second surface
|
// adaptor for pcurve on the second surface
|
||||||
aHC2 = new BRepAdaptor_Curve (E, F2);
|
aHC2 = new BRepAdaptor_Curve (anEdgeInFace2, theFace2);
|
||||||
ext.Initialize(*aHC2, f, l, Precision::PConfusion());
|
ext.Initialize(*aHC2, f, l, Precision::PConfusion());
|
||||||
}
|
}
|
||||||
ext.Perform(aSP1.Value(), u);
|
ext.Perform(aSP1.Value(), u);
|
||||||
@@ -2285,9 +2334,8 @@ void BRepLib::EncodeRegularity(TopoDS_Edge& E,
|
|||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
if(BRep_Tool::Continuity(E,F1,F2)<=GeomAbs_C0){
|
if(BRep_Tool::Continuity(E,F1,F2)<=GeomAbs_C0){
|
||||||
try {
|
try {
|
||||||
GeomAbs_Shape aCont = tgtfaces(E, F1, F2, TolAng);
|
GeomAbs_Shape aCont = ContinuityOfFaces(E, F1, F2, TolAng);
|
||||||
B.Continuity(E,F1,F2,aCont);
|
B.Continuity(E,F1,F2,aCont);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch(Standard_Failure const&)
|
catch(Standard_Failure const&)
|
||||||
{
|
{
|
||||||
|
@@ -202,7 +202,14 @@ public:
|
|||||||
//! orientation to have matter in the solid. Returns
|
//! orientation to have matter in the solid. Returns
|
||||||
//! False if the solid is unOrientable (open or incoherent)
|
//! False if the solid is unOrientable (open or incoherent)
|
||||||
Standard_EXPORT static Standard_Boolean OrientClosedSolid (TopoDS_Solid& solid);
|
Standard_EXPORT static Standard_Boolean OrientClosedSolid (TopoDS_Solid& solid);
|
||||||
|
|
||||||
|
//! Returns the order of continuity between two faces
|
||||||
|
//! connected by an edge
|
||||||
|
Standard_EXPORT static GeomAbs_Shape ContinuityOfFaces(const TopoDS_Edge& theEdge,
|
||||||
|
const TopoDS_Face& theFace1,
|
||||||
|
const TopoDS_Face& theFace2,
|
||||||
|
const Standard_Real theAngleTol);
|
||||||
|
|
||||||
//! Encodes the Regularity of edges on a Shape.
|
//! Encodes the Regularity of edges on a Shape.
|
||||||
//! Warning: <TolAng> is an angular tolerance, expressed in Rad.
|
//! Warning: <TolAng> is an angular tolerance, expressed in Rad.
|
||||||
//! Warning: If the edges's regularity are coded before, nothing
|
//! Warning: If the edges's regularity are coded before, nothing
|
||||||
|
307
src/BRepLib/BRepLib_PointCloudShape.cxx
Normal file
307
src/BRepLib/BRepLib_PointCloudShape.cxx
Normal file
@@ -0,0 +1,307 @@
|
|||||||
|
// Copyright (c) 2021 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 <BRepLib_PointCloudShape.hxx>
|
||||||
|
|
||||||
|
#include <BRep_Tool.hxx>
|
||||||
|
#include <BRepGProp.hxx>
|
||||||
|
#include <BRepLib_ToolTriangulatedShape.hxx>
|
||||||
|
#include <BRepTools.hxx>
|
||||||
|
#include <BRepTopAdaptor_FClass2d.hxx>
|
||||||
|
#include <Geom_Surface.hxx>
|
||||||
|
#include <GProp_GProps.hxx>
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <gp_Vec.hxx>
|
||||||
|
#include <Precision.hxx>
|
||||||
|
#include <TopExp_Explorer.hxx>
|
||||||
|
#include <TopoDS.hxx>
|
||||||
|
#include <TopoDS_Face.hxx>
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
|
||||||
|
#include <random>
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : BRepLib_PointCloudShape
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
BRepLib_PointCloudShape::BRepLib_PointCloudShape (const TopoDS_Shape& theShape,
|
||||||
|
const Standard_Real theTol)
|
||||||
|
: myShape (theShape),
|
||||||
|
myDist (0.0),
|
||||||
|
myTol (theTol),
|
||||||
|
myNbPoints (0)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : ~BRepLib_PointCloudShape
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
BRepLib_PointCloudShape::~BRepLib_PointCloudShape()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : NbPointsByDensity
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Standard_Integer BRepLib_PointCloudShape::NbPointsByDensity (const Standard_Real theDensity)
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
Standard_Real aDensity = (theDensity < Precision::Confusion() ? computeDensity() : theDensity);
|
||||||
|
if (aDensity < Precision::Confusion())
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_Integer aNbPoints = 0;
|
||||||
|
for (TopExp_Explorer aExpF(myShape, TopAbs_FACE); aExpF.More(); aExpF.Next())
|
||||||
|
{
|
||||||
|
Standard_Real anArea = faceArea(aExpF.Current());
|
||||||
|
|
||||||
|
Standard_Integer aNbPnts = Max ((Standard_Integer)std::ceil(anArea / theDensity), 1);
|
||||||
|
myFacePoints.Bind(aExpF.Current(), aNbPnts);
|
||||||
|
aNbPoints+= aNbPnts;
|
||||||
|
}
|
||||||
|
return aNbPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : GeneratePointsByDensity
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByDensity (const Standard_Real theDensity)
|
||||||
|
{
|
||||||
|
if (myFacePoints.IsEmpty())
|
||||||
|
{
|
||||||
|
if (NbPointsByDensity (theDensity) == 0)
|
||||||
|
{
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_Integer aNbAdded = 0;
|
||||||
|
for (TopExp_Explorer aExpF (myShape, TopAbs_FACE); aExpF.More(); aExpF.Next())
|
||||||
|
{
|
||||||
|
if (addDensityPoints (aExpF.Current()))
|
||||||
|
{
|
||||||
|
aNbAdded++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (aNbAdded > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : GeneratePointsByTriangulation
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByTriangulation()
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
|
||||||
|
Standard_Integer aNbAdded = 0;
|
||||||
|
for (TopExp_Explorer aExpF (myShape, TopAbs_FACE); aExpF.More(); aExpF.Next())
|
||||||
|
{
|
||||||
|
if (addTriangulationPoints (aExpF.Current()))
|
||||||
|
{
|
||||||
|
aNbAdded++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (aNbAdded > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : faceArea
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Standard_Real BRepLib_PointCloudShape::faceArea (const TopoDS_Shape& theShape)
|
||||||
|
{
|
||||||
|
Standard_Real anArea = 0.0;
|
||||||
|
if (myFaceArea.Find (theShape, anArea))
|
||||||
|
{
|
||||||
|
return anArea;
|
||||||
|
}
|
||||||
|
|
||||||
|
GProp_GProps aFaceProps;
|
||||||
|
BRepGProp::SurfaceProperties (theShape, aFaceProps);
|
||||||
|
anArea = aFaceProps.Mass();
|
||||||
|
myFaceArea.Bind (theShape, anArea);
|
||||||
|
return anArea;
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : computeDensity
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Standard_Real BRepLib_PointCloudShape::computeDensity()
|
||||||
|
{
|
||||||
|
// at first step find the face with smallest area
|
||||||
|
Standard_Real anAreaMin = Precision::Infinite();
|
||||||
|
for (TopExp_Explorer aExpF (myShape, TopAbs_FACE); aExpF.More(); aExpF.Next())
|
||||||
|
{
|
||||||
|
Standard_Real anArea = faceArea (aExpF.Current());
|
||||||
|
if (anArea < myTol * myTol)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (anArea < anAreaMin)
|
||||||
|
{
|
||||||
|
anAreaMin = anArea;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return anAreaMin * 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : NbPointsByTriangulation
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Standard_Integer BRepLib_PointCloudShape::NbPointsByTriangulation() const
|
||||||
|
{
|
||||||
|
// at first step find the face with smallest area
|
||||||
|
Standard_Integer aNbPoints = 0;
|
||||||
|
for (TopExp_Explorer aExpF (myShape, TopAbs_FACE); aExpF.More(); aExpF.Next())
|
||||||
|
{
|
||||||
|
TopLoc_Location aLoc;
|
||||||
|
Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (TopoDS::Face (aExpF.Current()), aLoc);
|
||||||
|
if (aTriangulation.IsNull())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
aNbPoints += aTriangulation->NbNodes();
|
||||||
|
}
|
||||||
|
return aNbPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : addDensityPoints
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Standard_Boolean BRepLib_PointCloudShape::addDensityPoints (const TopoDS_Shape& theFace)
|
||||||
|
{
|
||||||
|
//addition of the points with specified density on the face by random way
|
||||||
|
Standard_Integer aNbPnts = (myFacePoints.IsBound (theFace) ? myFacePoints.Find (theFace) : 0);
|
||||||
|
if (aNbPnts == 0)
|
||||||
|
{
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
|
TopoDS_Face aFace = TopoDS::Face (theFace);
|
||||||
|
Standard_Real anUMin = 0.0, anUMax = 0.0, aVMin = 0.0, aVMax = 0.0;
|
||||||
|
BRepTools::UVBounds (aFace, anUMin, anUMax, aVMin, aVMax);
|
||||||
|
BRepTopAdaptor_FClass2d aClassifier (aFace, Precision::Confusion());
|
||||||
|
|
||||||
|
TopLoc_Location aLoc = theFace.Location();
|
||||||
|
const gp_Trsf& aTrsf = aLoc.Transformation();
|
||||||
|
TopLoc_Location aLoc1;
|
||||||
|
Handle(Geom_Surface) aSurf = BRep_Tool::Surface (aFace, aLoc1);
|
||||||
|
if (aSurf.IsNull())
|
||||||
|
{
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::mt19937 aRandomGenerator(0);
|
||||||
|
std::uniform_real_distribution<> anUDistrib(anUMin, anUMax);
|
||||||
|
std::uniform_real_distribution<> aVDistrib (aVMin, aVMax);
|
||||||
|
for (Standard_Integer nbCurPnts = 1; nbCurPnts <= aNbPnts;)
|
||||||
|
{
|
||||||
|
const Standard_Real aU = anUDistrib(aRandomGenerator);
|
||||||
|
const Standard_Real aV = aVDistrib (aRandomGenerator);
|
||||||
|
gp_Pnt2d aUVNode (aU, aV);
|
||||||
|
const TopAbs_State aState = aClassifier.Perform (aUVNode);
|
||||||
|
if (aState == TopAbs_OUT)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
nbCurPnts++;
|
||||||
|
|
||||||
|
gp_Pnt aP1;
|
||||||
|
gp_Vec dU, dV;
|
||||||
|
aSurf->D1 (aU, aV, aP1, dU, dV);
|
||||||
|
|
||||||
|
gp_Vec aNorm = dU ^ dV;
|
||||||
|
if (aFace.Orientation() == TopAbs_REVERSED)
|
||||||
|
{
|
||||||
|
aNorm.Reverse();
|
||||||
|
}
|
||||||
|
const Standard_Real aNormMod = aNorm.Magnitude();
|
||||||
|
if (aNormMod > gp::Resolution())
|
||||||
|
{
|
||||||
|
aNorm /= aNormMod;
|
||||||
|
}
|
||||||
|
if (myDist > Precision::Confusion())
|
||||||
|
{
|
||||||
|
std::uniform_real_distribution<> aDistanceDistrib (0.0, myDist);
|
||||||
|
gp_XYZ aDeflPoint = aP1.XYZ() + aNorm.XYZ() * aDistanceDistrib (aRandomGenerator);
|
||||||
|
aP1.SetXYZ (aDeflPoint);
|
||||||
|
}
|
||||||
|
aP1.Transform (aTrsf);
|
||||||
|
if (aNormMod > gp::Resolution())
|
||||||
|
{
|
||||||
|
aNorm = gp_Dir (aNorm).Transformed (aTrsf);
|
||||||
|
}
|
||||||
|
addPoint (aP1, aNorm, aUVNode, aFace);
|
||||||
|
}
|
||||||
|
return Standard_True;
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : addTriangulationPoints
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Standard_Boolean BRepLib_PointCloudShape::addTriangulationPoints (const TopoDS_Shape& theFace)
|
||||||
|
{
|
||||||
|
TopLoc_Location aLoc;
|
||||||
|
TopoDS_Face aFace = TopoDS::Face (theFace);
|
||||||
|
Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (aFace, aLoc);
|
||||||
|
if (aTriangulation.IsNull())
|
||||||
|
{
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
|
TopLoc_Location aLoc1;
|
||||||
|
Handle(Geom_Surface) aSurf = BRep_Tool::Surface (aFace, aLoc1);
|
||||||
|
const gp_Trsf& aTrsf = aLoc.Transformation();
|
||||||
|
|
||||||
|
BRepLib_ToolTriangulatedShape::ComputeNormals (aFace, aTriangulation);
|
||||||
|
Standard_Boolean aHasUVNode = aTriangulation->HasUVNodes();
|
||||||
|
for (Standard_Integer aNodeIter = 1; aNodeIter <= aTriangulation->NbNodes(); ++aNodeIter)
|
||||||
|
{
|
||||||
|
gp_Pnt aP1 = aTriangulation->Node (aNodeIter);
|
||||||
|
gp_Dir aNormal = aTriangulation->Normal(aNodeIter);
|
||||||
|
if (!aLoc.IsIdentity())
|
||||||
|
{
|
||||||
|
aP1 .Transform (aTrsf);
|
||||||
|
aNormal.Transform (aTrsf);
|
||||||
|
}
|
||||||
|
|
||||||
|
const gp_Pnt2d anUVNode = aHasUVNode ? aTriangulation->UVNode (aNodeIter) : gp_Pnt2d();
|
||||||
|
addPoint (aP1, aNormal, anUVNode, aFace);
|
||||||
|
}
|
||||||
|
return Standard_True;
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : clear
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
void BRepLib_PointCloudShape::clear()
|
||||||
|
{
|
||||||
|
myFaceArea.Clear();
|
||||||
|
myFacePoints.Clear();
|
||||||
|
}
|
116
src/BRepLib/BRepLib_PointCloudShape.hxx
Normal file
116
src/BRepLib/BRepLib_PointCloudShape.hxx
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
// Copyright (c) 2021 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 _BRepLib_PointCloudShape_HeaderFile
|
||||||
|
#define _BRepLib_PointCloudShape_HeaderFile
|
||||||
|
|
||||||
|
#include <TopTools_DataMapOfShapeInteger.hxx>
|
||||||
|
#include <TopTools_DataMapOfShapeReal.hxx>
|
||||||
|
#include <Quantity_Color.hxx>
|
||||||
|
#include <Precision.hxx>
|
||||||
|
|
||||||
|
//! This tool is intended to get points from shape with specified distance from shape along normal.
|
||||||
|
//! Can be used to simulation of points obtained in result of laser scan of shape.
|
||||||
|
//! There are 2 ways for generation points by shape:
|
||||||
|
//! 1. Generation points with specified density
|
||||||
|
//! 2. Generation points using triangulation Nodes
|
||||||
|
//! Generation of points by density using the GeneratePointsByDensity() function is not thread safe.
|
||||||
|
class BRepLib_PointCloudShape
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
|
//! Constructor initialized by shape
|
||||||
|
Standard_EXPORT BRepLib_PointCloudShape (const TopoDS_Shape& theShape = TopoDS_Shape(),
|
||||||
|
const Standard_Real theTol = Precision::Confusion());
|
||||||
|
|
||||||
|
//! Virtual destructor
|
||||||
|
Standard_EXPORT virtual ~BRepLib_PointCloudShape();
|
||||||
|
|
||||||
|
//! Return loaded shape.
|
||||||
|
const TopoDS_Shape& Shape() const { return myShape; }
|
||||||
|
|
||||||
|
//! Set shape.
|
||||||
|
void SetShape (const TopoDS_Shape& theShape) { myShape = theShape; }
|
||||||
|
|
||||||
|
//! Return tolerance.
|
||||||
|
Standard_Real Tolerance() const { return myTol; }
|
||||||
|
|
||||||
|
//! Set tolerance.
|
||||||
|
void SetTolerance (Standard_Real theTol) { myTol = theTol; }
|
||||||
|
|
||||||
|
//! Returns value of the distance to define deflection of points from shape along normal to shape; 0.0 by default.
|
||||||
|
Standard_Real GetDistance() const { return myDist; }
|
||||||
|
|
||||||
|
//! Sets value of the distance to define deflection of points from shape along normal to shape.
|
||||||
|
//! Negative values of theDist parameter are ignored.
|
||||||
|
void SetDistance (const Standard_Real theDist) { myDist = theDist; }
|
||||||
|
|
||||||
|
//! Returns size of the point cloud for specified density.
|
||||||
|
Standard_EXPORT Standard_Integer NbPointsByDensity (const Standard_Real theDensity = 0.0);
|
||||||
|
|
||||||
|
//! Returns size of the point cloud for using triangulation.
|
||||||
|
Standard_EXPORT Standard_Integer NbPointsByTriangulation() const;
|
||||||
|
|
||||||
|
//! Computes points with specified density for initial shape.
|
||||||
|
//! If parameter Density is equal to 0 then density will be computed automatically by criterion:
|
||||||
|
//! - 10 points per minimal unreduced face area.
|
||||||
|
//!
|
||||||
|
//! Note: this function should not be called from concurrent threads without external lock.
|
||||||
|
Standard_EXPORT Standard_Boolean GeneratePointsByDensity (const Standard_Real theDensity = 0.0);
|
||||||
|
|
||||||
|
//! Get points from triangulation existing in the shape.
|
||||||
|
Standard_EXPORT Standard_Boolean GeneratePointsByTriangulation();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
//! Compute area of the specified face.
|
||||||
|
Standard_EXPORT Standard_Real faceArea (const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
//! Computes default density points per face.
|
||||||
|
Standard_EXPORT Standard_Real computeDensity();
|
||||||
|
|
||||||
|
//! Adds points to face in accordance with the specified density randomly in the specified range [0, Dist].
|
||||||
|
Standard_EXPORT Standard_Boolean addDensityPoints (const TopoDS_Shape& theFace);
|
||||||
|
|
||||||
|
//! Adds points to face by nodes of the existing triangulation randomly in the specified range [0, Dist].
|
||||||
|
Standard_EXPORT Standard_Boolean addTriangulationPoints (const TopoDS_Shape& theFace);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
//! Method to clear maps.
|
||||||
|
Standard_EXPORT virtual void clear();
|
||||||
|
|
||||||
|
//! Method to add point, normal to surface in this point and face for which point computed.
|
||||||
|
//! @param[in] thePoint 3D point on the surface
|
||||||
|
//! @param[in] theNorm surface normal at this point
|
||||||
|
//! @param[in] theUV surface UV parameters
|
||||||
|
//! @param[in] theFace surface (face) definition
|
||||||
|
Standard_EXPORT virtual void addPoint (const gp_Pnt& thePoint,
|
||||||
|
const gp_Vec& theNorm,
|
||||||
|
const gp_Pnt2d& theUV,
|
||||||
|
const TopoDS_Shape& theFace) = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
TopoDS_Shape myShape;
|
||||||
|
Standard_Real myDist;
|
||||||
|
Standard_Real myTol;
|
||||||
|
TopTools_DataMapOfShapeReal myFaceArea;
|
||||||
|
TopTools_DataMapOfShapeInteger myFacePoints;
|
||||||
|
Standard_Integer myNbPoints;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _BRepLib_PointCloudShape_HeaderFile
|
83
src/BRepLib/BRepLib_ToolTriangulatedShape.cxx
Normal file
83
src/BRepLib/BRepLib_ToolTriangulatedShape.cxx
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
// Copyright (c) 2021 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 <BRepLib_ToolTriangulatedShape.hxx>
|
||||||
|
|
||||||
|
#include <BRep_Tool.hxx>
|
||||||
|
#include <GeomLib.hxx>
|
||||||
|
#include <Poly.hxx>
|
||||||
|
#include <Poly_Connect.hxx>
|
||||||
|
#include <Precision.hxx>
|
||||||
|
#include <TopLoc_Location.hxx>
|
||||||
|
#include <TopoDS.hxx>
|
||||||
|
#include <TopoDS_Face.hxx>
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : ComputeNormals
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
void BRepLib_ToolTriangulatedShape::ComputeNormals (const TopoDS_Face& theFace,
|
||||||
|
const Handle(Poly_Triangulation)& theTris,
|
||||||
|
Poly_Connect& thePolyConnect)
|
||||||
|
{
|
||||||
|
if (theTris.IsNull()
|
||||||
|
|| theTris->HasNormals())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// take in face the surface location
|
||||||
|
const TopoDS_Face aZeroFace = TopoDS::Face (theFace.Located (TopLoc_Location()));
|
||||||
|
Handle(Geom_Surface) aSurf = BRep_Tool::Surface (aZeroFace);
|
||||||
|
if (!theTris->HasUVNodes() || aSurf.IsNull())
|
||||||
|
{
|
||||||
|
// compute normals by averaging triangulation normals sharing the same vertex
|
||||||
|
Poly::ComputeNormals (theTris);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Standard_Real aTol = Precision::Confusion();
|
||||||
|
Standard_Integer aTri[3];
|
||||||
|
gp_Dir aNorm;
|
||||||
|
theTris->AddNormals();
|
||||||
|
for (Standard_Integer aNodeIter = 1; aNodeIter <= theTris->NbNodes(); ++aNodeIter)
|
||||||
|
{
|
||||||
|
// try to retrieve normal from real surface first, when UV coordinates are available
|
||||||
|
if (GeomLib::NormEstim (aSurf, theTris->UVNode (aNodeIter), aTol, aNorm) > 1)
|
||||||
|
{
|
||||||
|
if (thePolyConnect.Triangulation() != theTris)
|
||||||
|
{
|
||||||
|
thePolyConnect.Load (theTris);
|
||||||
|
}
|
||||||
|
|
||||||
|
// compute flat normals
|
||||||
|
gp_XYZ eqPlan (0.0, 0.0, 0.0);
|
||||||
|
for (thePolyConnect.Initialize (aNodeIter); thePolyConnect.More(); thePolyConnect.Next())
|
||||||
|
{
|
||||||
|
theTris->Triangle (thePolyConnect.Value()).Get (aTri[0], aTri[1], aTri[2]);
|
||||||
|
const gp_XYZ v1 (theTris->Node (aTri[1]).Coord() - theTris->Node (aTri[0]).Coord());
|
||||||
|
const gp_XYZ v2 (theTris->Node (aTri[2]).Coord() - theTris->Node (aTri[1]).Coord());
|
||||||
|
const gp_XYZ vv = v1 ^ v2;
|
||||||
|
const Standard_Real aMod = vv.Modulus();
|
||||||
|
if (aMod >= aTol)
|
||||||
|
{
|
||||||
|
eqPlan += vv / aMod;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const Standard_Real aModMax = eqPlan.Modulus();
|
||||||
|
aNorm = (aModMax > aTol) ? gp_Dir (eqPlan) : gp::DZ();
|
||||||
|
}
|
||||||
|
|
||||||
|
theTris->SetNormal (aNodeIter, aNorm);
|
||||||
|
}
|
||||||
|
}
|
50
src/BRepLib/BRepLib_ToolTriangulatedShape.hxx
Normal file
50
src/BRepLib/BRepLib_ToolTriangulatedShape.hxx
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
// Copyright (c) 2021 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 _BrepLib_ToolTriangulatedShape_HeaderFile
|
||||||
|
#define _BrepLib_ToolTriangulatedShape_HeaderFile
|
||||||
|
|
||||||
|
#include <Poly_Connect.hxx>
|
||||||
|
#include <Poly_Triangulation.hxx>
|
||||||
|
|
||||||
|
class TopoDS_Face;
|
||||||
|
class Poly_Triangulation;
|
||||||
|
|
||||||
|
//! Provides methods for calculating normals to Poly_Triangulation of TopoDS_Face.
|
||||||
|
class BRepLib_ToolTriangulatedShape
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
//! Computes nodal normals for Poly_Triangulation structure using UV coordinates and surface.
|
||||||
|
//! Does nothing if triangulation already defines normals.
|
||||||
|
//! @param[in] theFace the face
|
||||||
|
//! @param[in] theTris the definition of a face triangulation
|
||||||
|
static void ComputeNormals (const TopoDS_Face& theFace,
|
||||||
|
const Handle(Poly_Triangulation)& theTris)
|
||||||
|
{
|
||||||
|
Poly_Connect aPolyConnect;
|
||||||
|
ComputeNormals (theFace, theTris, aPolyConnect);
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Computes nodal normals for Poly_Triangulation structure using UV coordinates and surface.
|
||||||
|
//! Does nothing if triangulation already defines normals.
|
||||||
|
//! @param[in] theFace the face
|
||||||
|
//! @param[in] theTris the definition of a face triangulation
|
||||||
|
//! @param[in,out] thePolyConnect optional, initialized tool for exploring triangulation
|
||||||
|
Standard_EXPORT static void ComputeNormals (const TopoDS_Face& theFace,
|
||||||
|
const Handle(Poly_Triangulation)& theTris,
|
||||||
|
Poly_Connect& thePolyConnect);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@@ -30,8 +30,12 @@ BRepLib_MakeVertex.hxx
|
|||||||
BRepLib_MakeWire.cxx
|
BRepLib_MakeWire.cxx
|
||||||
BRepLib_MakeWire.hxx
|
BRepLib_MakeWire.hxx
|
||||||
BRepLib_MakeWire_1.cxx
|
BRepLib_MakeWire_1.cxx
|
||||||
|
BRepLib_PointCloudShape.hxx
|
||||||
|
BRepLib_PointCloudShape.cxx
|
||||||
BRepLib_ShapeModification.hxx
|
BRepLib_ShapeModification.hxx
|
||||||
BRepLib_ShellError.hxx
|
BRepLib_ShellError.hxx
|
||||||
|
BRepLib_ToolTriangulatedShape.hxx
|
||||||
|
BRepLib_ToolTriangulatedShape.cxx
|
||||||
BRepLib_ValidateEdge.cxx
|
BRepLib_ValidateEdge.cxx
|
||||||
BRepLib_ValidateEdge.hxx
|
BRepLib_ValidateEdge.hxx
|
||||||
BRepLib_WireError.hxx
|
BRepLib_WireError.hxx
|
||||||
|
@@ -308,8 +308,8 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge&
|
|||||||
const Standard_Boolean theIsBRepMode)
|
const Standard_Boolean theIsBRepMode)
|
||||||
{
|
{
|
||||||
Handle(IGESData_IGESEntity) res;
|
Handle(IGESData_IGESEntity) res;
|
||||||
if (theEdge.IsNull() || GetPCurveMode() ==0 ||
|
if (theEdge.IsNull() || ( ! theIsBRepMode && BRep_Tool::Degenerated (theEdge) ) )
|
||||||
( ! theIsBRepMode && BRep_Tool::Degenerated (theEdge) ) ) return res;
|
return res;
|
||||||
|
|
||||||
//S4181 pdn 23.04.99 adjusting length factor according to analytic mode.
|
//S4181 pdn 23.04.99 adjusting length factor according to analytic mode.
|
||||||
Standard_Real myLen = theLength;
|
Standard_Real myLen = theLength;
|
||||||
|
@@ -695,7 +695,7 @@ Standard_Boolean BRepTools::Write (const TopoDS_Shape& theShape,
|
|||||||
const Message_ProgressRange& theProgress)
|
const Message_ProgressRange& theProgress)
|
||||||
{
|
{
|
||||||
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
|
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
|
||||||
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (theFile, std::ios::out);
|
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary);
|
||||||
if (aStream.get() == NULL || !aStream->good())
|
if (aStream.get() == NULL || !aStream->good())
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
@@ -217,7 +217,7 @@ void BndLib_Add3dCurve::Add( const Adaptor3d_Curve& C,
|
|||||||
if(Bsaux->LastParameter() < U2 ) u2 = Bsaux->LastParameter();
|
if(Bsaux->LastParameter() < U2 ) u2 = Bsaux->LastParameter();
|
||||||
// modified by NIZHNY-EAP Fri Dec 3 14:29:18 1999 ___END___
|
// modified by NIZHNY-EAP Fri Dec 3 14:29:18 1999 ___END___
|
||||||
}
|
}
|
||||||
Standard_Real aSegmentTol = Precision::PConfusion();
|
Standard_Real aSegmentTol = 2. * Precision::PConfusion();
|
||||||
if (Abs(u2 - u1) < aSegmentTol)
|
if (Abs(u2 - u1) < aSegmentTol)
|
||||||
aSegmentTol = Abs(u2 - u1) * 0.01;
|
aSegmentTol = Abs(u2 - u1) * 0.01;
|
||||||
Bsaux->Segment(u1, u2, aSegmentTol);
|
Bsaux->Segment(u1, u2, aSegmentTol);
|
||||||
|
@@ -78,19 +78,11 @@ Standard_Boolean CDF_Store::SetFolder(const Standard_ExtString aFolder) {
|
|||||||
Standard_Boolean CDF_Store::SetFolder(const TCollection_ExtendedString& aFolder) {
|
Standard_Boolean CDF_Store::SetFolder(const TCollection_ExtendedString& aFolder) {
|
||||||
|
|
||||||
TCollection_ExtendedString theFolder(aFolder);
|
TCollection_ExtendedString theFolder(aFolder);
|
||||||
Standard_Integer l = theFolder.Length();
|
Standard_Integer aLen = theFolder.Length();
|
||||||
|
|
||||||
// if the last character is the folder separator (which is always the first character)
|
// if the last character is the folder separator, remove it.
|
||||||
// it is removed.
|
if (aLen > 1 && (theFolder.Value(aLen) == '/' || theFolder.Value(aLen) == '\\'))
|
||||||
// This is correct for Unix systems but not for Windows! VMS and MAC? Thomas Haller, 23.11.01
|
theFolder.Trunc(aLen-1);
|
||||||
if(l > 1) {
|
|
||||||
#ifndef _WIN32
|
|
||||||
if(theFolder.Value(l) == theFolder.Value(1)) theFolder.Trunc(l-1);
|
|
||||||
#else
|
|
||||||
if (theFolder.Value(l) == '/' || theFolder.Value(l) == '\\')
|
|
||||||
theFolder.Trunc(l-1);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
if(theMetaDataDriver->FindFolder(theFolder)) {
|
if(theMetaDataDriver->FindFolder(theFolder)) {
|
||||||
myCurrentDocument->SetRequestedFolder(theFolder);
|
myCurrentDocument->SetRequestedFolder(theFolder);
|
||||||
|
@@ -134,12 +134,12 @@ ChFiDS_TypeOfConcavity ChFi3d::DefineConnectType(const TopoDS_Edge& E,
|
|||||||
//function : IsTangentFaces
|
//function : IsTangentFaces
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge,
|
Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge,
|
||||||
const TopoDS_Face& theFace1,
|
const TopoDS_Face& theFace1,
|
||||||
const TopoDS_Face& theFace2,
|
const TopoDS_Face& theFace2,
|
||||||
const GeomAbs_Shape Order)
|
const GeomAbs_Shape theOrder)
|
||||||
{
|
{
|
||||||
if (Order == GeomAbs_G1 && BRep_Tool::Continuity(theEdge, theFace1, theFace2) != GeomAbs_C0)
|
if (theOrder == GeomAbs_G1 && BRep_Tool::Continuity(theEdge, theFace1, theFace2) != GeomAbs_C0)
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
|
|
||||||
Standard_Real TolC0 = Max(0.001, 1.5*BRep_Tool::Tolerance(theEdge));
|
Standard_Real TolC0 = Max(0.001, 1.5*BRep_Tool::Tolerance(theEdge));
|
||||||
@@ -147,15 +147,46 @@ Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge,
|
|||||||
Standard_Real aFirst;
|
Standard_Real aFirst;
|
||||||
Standard_Real aLast;
|
Standard_Real aLast;
|
||||||
|
|
||||||
// Obtaining of pcurves of edge on two faces.
|
Handle(Geom2d_Curve) aC2d1, aC2d2;
|
||||||
const Handle(Geom2d_Curve) aC2d1 = BRep_Tool::CurveOnSurface
|
|
||||||
(theEdge, theFace1, aFirst, aLast);
|
if (!theFace1.IsSame (theFace2) &&
|
||||||
//For the case of seam edge
|
BRep_Tool::IsClosed (theEdge, theFace1) &&
|
||||||
TopoDS_Edge EE = theEdge;
|
BRep_Tool::IsClosed (theEdge, theFace2))
|
||||||
if (theFace1.IsSame(theFace2))
|
{
|
||||||
EE.Reverse();
|
//Find the edge in the face 1: this edge will have correct orientation
|
||||||
const Handle(Geom2d_Curve) aC2d2 = BRep_Tool::CurveOnSurface
|
TopoDS_Edge anEdgeInFace1;
|
||||||
(EE, theFace2, aFirst, aLast);
|
TopoDS_Face aFace1 = theFace1;
|
||||||
|
aFace1.Orientation (TopAbs_FORWARD);
|
||||||
|
TopExp_Explorer anExplo (aFace1, TopAbs_EDGE);
|
||||||
|
for (; anExplo.More(); anExplo.Next())
|
||||||
|
{
|
||||||
|
const TopoDS_Edge& anEdge = TopoDS::Edge (anExplo.Current());
|
||||||
|
if (anEdge.IsSame (theEdge))
|
||||||
|
{
|
||||||
|
anEdgeInFace1 = anEdge;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (anEdgeInFace1.IsNull())
|
||||||
|
return Standard_False;
|
||||||
|
|
||||||
|
aC2d1 = BRep_Tool::CurveOnSurface (anEdgeInFace1, aFace1, aFirst, aLast);
|
||||||
|
TopoDS_Face aFace2 = theFace2;
|
||||||
|
aFace2.Orientation (TopAbs_FORWARD);
|
||||||
|
anEdgeInFace1.Reverse();
|
||||||
|
aC2d2 = BRep_Tool::CurveOnSurface (anEdgeInFace1, aFace2, aFirst, aLast);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Obtaining of pcurves of edge on two faces.
|
||||||
|
aC2d1 = BRep_Tool::CurveOnSurface (theEdge, theFace1, aFirst, aLast);
|
||||||
|
//For the case of seam edge
|
||||||
|
TopoDS_Edge EE = theEdge;
|
||||||
|
if (theFace1.IsSame(theFace2))
|
||||||
|
EE.Reverse();
|
||||||
|
aC2d2 = BRep_Tool::CurveOnSurface (EE, theFace2, aFirst, aLast);
|
||||||
|
}
|
||||||
|
|
||||||
if (aC2d1.IsNull() || aC2d2.IsNull())
|
if (aC2d1.IsNull() || aC2d2.IsNull())
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
|
||||||
@@ -186,15 +217,19 @@ Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge,
|
|||||||
if (i == aNbSamples) aPar = aLast;
|
if (i == aNbSamples) aPar = aLast;
|
||||||
|
|
||||||
LocalAnalysis_SurfaceContinuity aCont(aC2d1, aC2d2, aPar,
|
LocalAnalysis_SurfaceContinuity aCont(aC2d1, aC2d2, aPar,
|
||||||
aSurf1, aSurf2, Order,
|
aSurf1, aSurf2, theOrder,
|
||||||
0.001, TolC0, 0.1, 0.1, 0.1);
|
0.001, TolC0, 0.1, 0.1, 0.1);
|
||||||
if (!aCont.IsDone())
|
if (!aCont.IsDone())
|
||||||
{
|
{
|
||||||
|
if (theOrder == GeomAbs_C2 &&
|
||||||
|
aCont.StatusError() == LocalAnalysis_NullSecondDerivative)
|
||||||
|
continue;
|
||||||
|
|
||||||
nbNotDone++;
|
nbNotDone++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Order == GeomAbs_G1)
|
if (theOrder == GeomAbs_G1)
|
||||||
{
|
{
|
||||||
if (!aCont.IsG1())
|
if (!aCont.IsG1())
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
@@ -1997,6 +1997,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
|||||||
if ((possible1 && possible2) || (!possible1 && !possible2) || (nbarete > 4)) {
|
if ((possible1 && possible2) || (!possible1 && !possible2) || (nbarete > 4)) {
|
||||||
while (!trouve) {
|
while (!trouve) {
|
||||||
nb++;
|
nb++;
|
||||||
|
if (nb>=nn) throw Standard_Failure("IntersectionAtEnd : the max number of faces reached");
|
||||||
if (nb!=1) F3=Face[nb-2];
|
if (nb!=1) F3=Face[nb-2];
|
||||||
Face[nb-1]=F3;
|
Face[nb-1]=F3;
|
||||||
if (CV1.Arc().IsSame(edgelibre1))
|
if (CV1.Arc().IsSame(edgelibre1))
|
||||||
|
@@ -195,7 +195,7 @@ Standard_Boolean D3DHost_FrameBuffer::InitD3dInterop (const Handle(OpenGl_Contex
|
|||||||
|
|
||||||
const OpenGl_TextureFormat aDepthFormat = OpenGl_TextureFormat::FindSizedFormat (theCtx, myDepthFormat);
|
const OpenGl_TextureFormat aDepthFormat = OpenGl_TextureFormat::FindSizedFormat (theCtx, myDepthFormat);
|
||||||
if (aDepthFormat.IsValid()
|
if (aDepthFormat.IsValid()
|
||||||
&& !myDepthStencilTexture->Init (theCtx, aDepthFormat, Graphic3d_Vec2i (aSizeX, aSizeY), Graphic3d_TOT_2D))
|
&& !myDepthStencilTexture->Init (theCtx, aDepthFormat, Graphic3d_Vec2i (aSizeX, aSizeY), Graphic3d_TypeOfTexture_2D))
|
||||||
{
|
{
|
||||||
Release (theCtx.get());
|
Release (theCtx.get());
|
||||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH,
|
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH,
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include <DrawTrSurf.hxx>
|
#include <DrawTrSurf.hxx>
|
||||||
#include <Message.hxx>
|
#include <Message.hxx>
|
||||||
#include <Message_PrinterOStream.hxx>
|
#include <Message_PrinterOStream.hxx>
|
||||||
|
#include <Message_PrinterSystemLog.hxx>
|
||||||
#include <NCollection_IndexedMap.hxx>
|
#include <NCollection_IndexedMap.hxx>
|
||||||
#include <OSD.hxx>
|
#include <OSD.hxx>
|
||||||
#include <OSD_Thread.hxx>
|
#include <OSD_Thread.hxx>
|
||||||
|
@@ -75,146 +75,150 @@ static OSD_Timer aTimer;
|
|||||||
|
|
||||||
extern Standard_Boolean Draw_Chrono;
|
extern Standard_Boolean Draw_Chrono;
|
||||||
|
|
||||||
static Standard_Integer chronom(Draw_Interpretor& di,
|
static Standard_Integer dchronom (Draw_Interpretor& theDI,
|
||||||
Standard_Integer n,const char** a)
|
Standard_Integer theNbArgs,
|
||||||
|
const char** theArgVec)
|
||||||
{
|
{
|
||||||
if ((n == 1) || (*a[1] == '0') || (*a[1] == '1')) {
|
if (theNbArgs == 1
|
||||||
if (n == 1)
|
|| (theNbArgs == 2
|
||||||
|
&& (*theArgVec[1] == '0'
|
||||||
|
|| *theArgVec[1] == '1')))
|
||||||
|
{
|
||||||
|
if (theNbArgs == 1)
|
||||||
|
{
|
||||||
Draw_Chrono = !Draw_Chrono;
|
Draw_Chrono = !Draw_Chrono;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
Draw_Chrono = (*a[1] == '1');
|
{
|
||||||
|
Draw_Chrono = (*theArgVec[1] == '1');
|
||||||
|
}
|
||||||
|
|
||||||
if (Draw_Chrono) di << "Chronometers activated.\n";
|
theDI << (Draw_Chrono
|
||||||
else di << "Chronometers deactivated.\n";
|
? "Chronometers activated.\n"
|
||||||
|
: "Chronometers deactivated.\n");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
Handle(Draw_Drawable3D) D = Draw::Get(a[1]);
|
|
||||||
Handle(Draw_Chronometer) C;
|
|
||||||
if (!D.IsNull()) {
|
|
||||||
C = Handle(Draw_Chronometer)::DownCast(D);
|
|
||||||
}
|
|
||||||
if (C.IsNull()) {
|
|
||||||
C = new Draw_Chronometer();
|
|
||||||
Draw::Set(a[1],C,Standard_False);
|
|
||||||
}
|
|
||||||
if (n <= 2) {
|
|
||||||
C->Timer().Reset();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
for (Standard_Integer anIter = 2; anIter < n; ++anIter)
|
|
||||||
{
|
|
||||||
TCollection_AsciiString anArg (a[anIter]);
|
|
||||||
anArg.LowerCase();
|
|
||||||
|
|
||||||
if (anArg == "reset")
|
const char* aTimerName = theArgVec[1];
|
||||||
{
|
Handle(Draw_Chronometer) aChronom;
|
||||||
C->Timer().Reset();
|
if (Handle(Draw_Drawable3D) aDrawable = Draw::Get (aTimerName))
|
||||||
}
|
{
|
||||||
else if (anArg == "restart")
|
aChronom = Handle(Draw_Chronometer)::DownCast (aDrawable);
|
||||||
{
|
}
|
||||||
C->Timer().Restart();
|
if (aChronom.IsNull())
|
||||||
}
|
{
|
||||||
else if (anArg == "start")
|
aChronom = new Draw_Chronometer();
|
||||||
{
|
Draw::Set (aTimerName, aChronom, false);
|
||||||
C->Timer().Start();
|
}
|
||||||
}
|
|
||||||
else if (anArg == "stop")
|
if (theNbArgs <= 2)
|
||||||
{
|
{
|
||||||
C->Timer().Stop();
|
aChronom->Timer().Reset();
|
||||||
}
|
return 0;
|
||||||
else if (anArg == "show")
|
}
|
||||||
{
|
|
||||||
C->Timer().Show();
|
const bool toShowCout = (TCollection_AsciiString (theArgVec[0]) == "chrono");
|
||||||
}
|
int aNbPuts = false;
|
||||||
else if (anArg == "counter")
|
for (Standard_Integer anIter = 2; anIter < theNbArgs; ++anIter)
|
||||||
{
|
{
|
||||||
Standard_Real aSeconds,aCPUtime;
|
TCollection_AsciiString anArg (theArgVec[anIter]);
|
||||||
Standard_Integer aMinutes, aHours;
|
anArg.LowerCase();
|
||||||
C->Timer().Show(aSeconds,aMinutes,aHours,aCPUtime);
|
if (anArg == "-reset"
|
||||||
std::cout << "COUNTER " << a[++anIter] << ": " << aCPUtime << "\n";
|
|| anArg == "reset")
|
||||||
}
|
{
|
||||||
else
|
aChronom->Timer().Reset();
|
||||||
{
|
}
|
||||||
std::cerr << "Unknown argument '" << a[anIter] << "'!\n";
|
else if (anArg == "-restart"
|
||||||
}
|
|| anArg == "restart")
|
||||||
|
{
|
||||||
|
aChronom->Timer().Restart();
|
||||||
|
}
|
||||||
|
else if (anArg == "-start"
|
||||||
|
|| anArg == "-resume"
|
||||||
|
|| anArg == "start")
|
||||||
|
{
|
||||||
|
aChronom->Timer().Start();
|
||||||
|
}
|
||||||
|
else if (anArg == "-stop"
|
||||||
|
|| anArg == "-pause"
|
||||||
|
|| anArg == "stop")
|
||||||
|
{
|
||||||
|
aChronom->Timer().Stop();
|
||||||
|
}
|
||||||
|
else if (anArg == "-show"
|
||||||
|
|| anArg == "show")
|
||||||
|
{
|
||||||
|
if (toShowCout)
|
||||||
|
{
|
||||||
|
aChronom->Timer().Show (std::cout);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Standard_SStream aStream;
|
||||||
|
aChronom->Timer().Show (aStream);
|
||||||
|
theDI << aStream;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (anIter + 1 < theNbArgs
|
||||||
|
&& (anArg == "-counter"
|
||||||
|
|| anArg == "counter"))
|
||||||
|
{
|
||||||
|
Standard_Real aSeconds = 0.0, aCPUtime = 0.0;
|
||||||
|
Standard_Integer aMinutes = 0, aHours = 0;
|
||||||
|
aChronom->Timer().Show (aSeconds, aMinutes, aHours, aCPUtime);
|
||||||
|
if (toShowCout)
|
||||||
|
{
|
||||||
|
std::cout << "COUNTER " << theArgVec[++anIter] << ": " << aCPUtime << "\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
theDI << "COUNTER " << theArgVec[++anIter] << ": " << aCPUtime << "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (anArg == "-elapsed")
|
||||||
|
{
|
||||||
|
if (++aNbPuts > 1) { theDI << " "; }
|
||||||
|
theDI << aChronom->Timer().ElapsedTime();
|
||||||
|
}
|
||||||
|
else if (anArg == "-cpu"
|
||||||
|
|| anArg == "-usercpu"
|
||||||
|
|| anArg == "-cpuuser")
|
||||||
|
{
|
||||||
|
if (++aNbPuts > 1) { theDI << " "; }
|
||||||
|
theDI << aChronom->Timer().UserTimeCPU();
|
||||||
|
}
|
||||||
|
else if (anArg == "-systemcpu"
|
||||||
|
|| anArg == "-syscpu"
|
||||||
|
|| anArg == "-cpusystem"
|
||||||
|
|| anArg == "-cpusys")
|
||||||
|
{
|
||||||
|
if (++aNbPuts > 1) { theDI << " "; }
|
||||||
|
theDI << aChronom->Timer().SystemTimeCPU();
|
||||||
|
}
|
||||||
|
else if (anArg == "-thread"
|
||||||
|
|| anArg == "-threadonly")
|
||||||
|
{
|
||||||
|
bool isThreadOnly = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anIter);
|
||||||
|
aChronom->Timer().Stop();
|
||||||
|
aChronom->Timer().Reset();
|
||||||
|
aChronom->Timer().SetThisThreadOnly (isThreadOnly);
|
||||||
|
}
|
||||||
|
else if (anArg == "-process")
|
||||||
|
{
|
||||||
|
bool isProcessTime = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anIter);
|
||||||
|
aChronom->Timer().Stop();
|
||||||
|
aChronom->Timer().Reset();
|
||||||
|
aChronom->Timer().SetThisThreadOnly (!isProcessTime);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
theDI << "Syntax error at '" << theArgVec[anIter] << "'\n";
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Standard_Integer dchronom(Draw_Interpretor& theDI,
|
|
||||||
Standard_Integer n,const char** a)
|
|
||||||
{
|
|
||||||
if ((n == 1) || (*a[1] == '0') || (*a[1] == '1')) {
|
|
||||||
if (n == 1)
|
|
||||||
Draw_Chrono = !Draw_Chrono;
|
|
||||||
else
|
|
||||||
Draw_Chrono = (*a[1] == '1');
|
|
||||||
|
|
||||||
if (Draw_Chrono) theDI << "Chronometers activated.\n";
|
|
||||||
else theDI << "Chronometers deactivated.\n";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Handle(Draw_Drawable3D) D = Draw::Get(a[1]);
|
|
||||||
Handle(Draw_Chronometer) C;
|
|
||||||
if (!D.IsNull()) {
|
|
||||||
C = Handle(Draw_Chronometer)::DownCast(D);
|
|
||||||
}
|
|
||||||
if (C.IsNull()) {
|
|
||||||
C = new Draw_Chronometer();
|
|
||||||
Draw::Set(a[1],C,Standard_False);
|
|
||||||
}
|
|
||||||
if (n <= 2) {
|
|
||||||
C->Timer().Reset();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
for (Standard_Integer anIter = 2; anIter < n; ++anIter)
|
|
||||||
{
|
|
||||||
TCollection_AsciiString anArg (a[anIter]);
|
|
||||||
anArg.LowerCase();
|
|
||||||
|
|
||||||
if (anArg == "reset")
|
|
||||||
{
|
|
||||||
C->Timer().Reset();
|
|
||||||
}
|
|
||||||
else if (anArg == "restart")
|
|
||||||
{
|
|
||||||
C->Timer().Restart();
|
|
||||||
}
|
|
||||||
else if (anArg == "start")
|
|
||||||
{
|
|
||||||
C->Timer().Start();
|
|
||||||
}
|
|
||||||
else if (anArg == "stop")
|
|
||||||
{
|
|
||||||
C->Timer().Stop();
|
|
||||||
}
|
|
||||||
else if (anArg == "show")
|
|
||||||
{
|
|
||||||
Standard_SStream ss;
|
|
||||||
C->Timer().Show(ss);
|
|
||||||
theDI << ss;
|
|
||||||
}
|
|
||||||
else if (anArg == "counter")
|
|
||||||
{
|
|
||||||
Standard_Real aSeconds,aCPUtime;
|
|
||||||
Standard_Integer aMinutes, aHours;
|
|
||||||
C->Timer().Show(aSeconds,aMinutes,aHours,aCPUtime);
|
|
||||||
theDI << "COUNTER " << a[++anIter] << ": " << aCPUtime << "\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
theDI << "Unknown argument '" << a[anIter] << "'!\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ifbatch
|
//function : ifbatch
|
||||||
//purpose :
|
//purpose :
|
||||||
@@ -878,7 +882,8 @@ static int dmeminfo (Draw_Interpretor& theDI,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << "Unknown argument '" << theArgVec[anIter] << "'!\n";
|
theDI << "Syntax error at '" << theArgVec[anIter] << "'!\n";
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1304,11 +1309,33 @@ void Draw::BasicCommands(Draw_Interpretor& theCommands)
|
|||||||
__FILE__,Draw_wait,g);
|
__FILE__,Draw_wait,g);
|
||||||
theCommands.Add("cpulimit","cpulimit [nbseconds], no args remove limits",
|
theCommands.Add("cpulimit","cpulimit [nbseconds], no args remove limits",
|
||||||
__FILE__,cpulimit,g);
|
__FILE__,cpulimit,g);
|
||||||
theCommands.Add("chrono","chrono [name action [action...]] \n Operates named timer.\n"
|
|
||||||
" Supported actions: reset, start, stop, restart, show, counter [text].\n"
|
const char* aChronoHelp =
|
||||||
" Without arguments enables / disables global timer for all DRAW commands.",
|
"chrono Name [-start] [-stop] [-reset] [-restart] [-counter Text]"
|
||||||
__FILE__,chronom,g);
|
"\n\t\t: [-show] [-elapsed] [-userCPU] [-sysCPU]"
|
||||||
theCommands.Add("dchrono","see help of chrono command",
|
"\n\t\t: [-thread|-process {0|1}]"
|
||||||
|
"\n\t\t: Operates named timer:"
|
||||||
|
"\n\t\t: -start starts (resumes) timer"
|
||||||
|
"\n\t\t: -stop stops (pauses) timer"
|
||||||
|
"\n\t\t: -reset resets timer progress"
|
||||||
|
"\n\t\t: -restart resets and starts timer"
|
||||||
|
"\n\t\t: -show prints timer progress"
|
||||||
|
"\n\t\t: ('dchrono' puts into Tcl, 'chrono' puts into std::cout)"
|
||||||
|
"\n\t\t: -elapsed prints elapsed time in seconds"
|
||||||
|
"\n\t\t: -userCPU prints user CPU time in seconds"
|
||||||
|
"\n\t\t: -sysCPU prints system CPU time in seconds"
|
||||||
|
"\n\t\t: -counter prints 'COUNTER <Text>'"
|
||||||
|
"\n\t\t: -thread stops timer and sets measuring of CPU time for this thread only (FALSE by default)"
|
||||||
|
"\n\t\t: -process stops timer and sets measuring of CPU time for all threads (TRUE by default)"
|
||||||
|
"\n\t\t: Without arguments enables / disables global timer for all DRAW commands."
|
||||||
|
"\n\t\t: chrono {0|1}"
|
||||||
|
"\n\t\t: Typical usage:"
|
||||||
|
"\n\t\t: chrono t -restart"
|
||||||
|
"\n\t\t: <algorithm>"
|
||||||
|
"\n\t\t: chrono t -stop -show";
|
||||||
|
theCommands.Add("chrono", aChronoHelp,
|
||||||
|
__FILE__,dchronom,g);
|
||||||
|
theCommands.Add("dchrono", aChronoHelp,
|
||||||
__FILE__,dchronom,g);
|
__FILE__,dchronom,g);
|
||||||
theCommands.Add("mallochook",
|
theCommands.Add("mallochook",
|
||||||
"debug memory allocation/deallocation, w/o args for help",
|
"debug memory allocation/deallocation, w/o args for help",
|
||||||
|
@@ -14,69 +14,50 @@
|
|||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
|
||||||
#include <Draw_Chronometer.hxx>
|
#include <Draw_Chronometer.hxx>
|
||||||
#include <Draw_Display.hxx>
|
|
||||||
#include <Draw_Drawable3D.hxx>
|
|
||||||
#include <OSD_Timer.hxx>
|
|
||||||
#include <Standard_Type.hxx>
|
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(Draw_Chronometer,Draw_Drawable3D)
|
#include <Draw_Display.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(Draw_Chronometer, Draw_Drawable3D)
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Draw_Chronometer
|
//function : Draw_Chronometer
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Draw_Chronometer::Draw_Chronometer()
|
Draw_Chronometer::Draw_Chronometer()
|
||||||
{
|
{
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : Timer
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
|
|
||||||
OSD_Timer& Draw_Chronometer::Timer()
|
|
||||||
{
|
|
||||||
return myTimer;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : DrawOn
|
//function : DrawOn
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
void Draw_Chronometer::DrawOn (Draw_Display& ) const
|
||||||
void Draw_Chronometer::DrawOn(Draw_Display&)const
|
|
||||||
{
|
{
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Copy
|
//function : Copy
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
Handle(Draw_Drawable3D) Draw_Chronometer::Copy() const
|
||||||
Handle(Draw_Drawable3D) Draw_Chronometer::Copy()const
|
|
||||||
{
|
{
|
||||||
Handle(Draw_Chronometer) C = new Draw_Chronometer();
|
Handle(Draw_Chronometer) C = new Draw_Chronometer();
|
||||||
return C;
|
return C;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Dump
|
//function : Dump
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
void Draw_Chronometer::Dump (Standard_OStream& S) const
|
||||||
void Draw_Chronometer::Dump(Standard_OStream& S)const
|
|
||||||
{
|
{
|
||||||
S << "Chronometer : ";
|
S << "Chronometer, ";
|
||||||
|
myTimer.Show (S);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Whatis
|
//function : Whatis
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@@ -17,32 +17,25 @@
|
|||||||
#ifndef _Draw_Chronometer_HeaderFile
|
#ifndef _Draw_Chronometer_HeaderFile
|
||||||
#define _Draw_Chronometer_HeaderFile
|
#define _Draw_Chronometer_HeaderFile
|
||||||
|
|
||||||
#include <Standard.hxx>
|
|
||||||
|
|
||||||
#include <OSD_Timer.hxx>
|
|
||||||
#include <Draw_Drawable3D.hxx>
|
#include <Draw_Drawable3D.hxx>
|
||||||
#include <Standard_OStream.hxx>
|
#include <OSD_Timer.hxx>
|
||||||
#include <Draw_Interpretor.hxx>
|
|
||||||
class Draw_Display;
|
|
||||||
|
|
||||||
|
|
||||||
class Draw_Chronometer;
|
|
||||||
DEFINE_STANDARD_HANDLE(Draw_Chronometer, Draw_Drawable3D)
|
DEFINE_STANDARD_HANDLE(Draw_Chronometer, Draw_Drawable3D)
|
||||||
|
|
||||||
//! Class to store chronometer variables.
|
//! Class to store chronometer variables.
|
||||||
class Draw_Chronometer : public Draw_Drawable3D
|
class Draw_Chronometer : public Draw_Drawable3D
|
||||||
{
|
{
|
||||||
|
DEFINE_STANDARD_RTTIEXT(Draw_Chronometer, Draw_Drawable3D)
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT Draw_Chronometer();
|
Standard_EXPORT Draw_Chronometer();
|
||||||
|
|
||||||
Standard_EXPORT OSD_Timer& Timer();
|
//! Return timer.
|
||||||
|
OSD_Timer& Timer() { return myTimer; }
|
||||||
//! Does nothhing,
|
|
||||||
|
//! Does nothing,
|
||||||
Standard_EXPORT void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
|
Standard_EXPORT void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! For variable copy.
|
//! For variable copy.
|
||||||
Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
|
Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
@@ -52,28 +45,10 @@ public:
|
|||||||
//! For variable whatis command.
|
//! For variable whatis command.
|
||||||
Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
|
Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DEFINE_STANDARD_RTTIEXT(Draw_Chronometer,Draw_Drawable3D)
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
||||||
OSD_Timer myTimer;
|
OSD_Timer myTimer;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _Draw_Chronometer_HeaderFile
|
#endif // _Draw_Chronometer_HeaderFile
|
||||||
|
@@ -92,7 +92,7 @@ static Standard_Integer save (Draw_Interpretor& theDI,
|
|||||||
|
|
||||||
const char* aName = theArgVec[2];
|
const char* aName = theArgVec[2];
|
||||||
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
|
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
|
||||||
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (aName, std::ios::out);
|
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (aName, std::ios::out | std::ios::binary);
|
||||||
aStream->precision (15);
|
aStream->precision (15);
|
||||||
if (aStream.get() == NULL || !aStream->good())
|
if (aStream.get() == NULL || !aStream->good())
|
||||||
{
|
{
|
||||||
|
@@ -1402,10 +1402,10 @@ proc _run_test {scriptsdir group gridname casefile echo} {
|
|||||||
append stats "MEMORY DELTA: [expr ($memuse - $membase) / 1024] KiB\n"
|
append stats "MEMORY DELTA: [expr ($memuse - $membase) / 1024] KiB\n"
|
||||||
}
|
}
|
||||||
uplevel dchrono _timer stop
|
uplevel dchrono _timer stop
|
||||||
set time [uplevel dchrono _timer show]
|
set cpu_usr [uplevel dchrono _timer -userCPU]
|
||||||
if { [regexp -nocase {CPU user time:[ \t]*([0-9.e-]+)} $time res cpu_usr] } {
|
set elps [uplevel dchrono _timer -elapsed]
|
||||||
append stats "TOTAL CPU TIME: $cpu_usr sec\n"
|
append stats "TOTAL CPU TIME: $cpu_usr sec\n"
|
||||||
}
|
append stats "ELAPSED TIME: $elps sec\n"
|
||||||
if { $dlog_exists && ! $echo } {
|
if { $dlog_exists && ! $echo } {
|
||||||
dlog add $stats
|
dlog add $stats
|
||||||
} else {
|
} else {
|
||||||
|
@@ -176,6 +176,8 @@ gp_Vec ElSLib::ConeDN (const Standard_Real U,
|
|||||||
}
|
}
|
||||||
else if(Nv == 1) {
|
else if(Nv == 1) {
|
||||||
Xdir.Multiply(sin(SAngle));
|
Xdir.Multiply(sin(SAngle));
|
||||||
|
if (Nu == 0)
|
||||||
|
Xdir.Add(Pos.Direction().XYZ() * cos(SAngle));
|
||||||
return gp_Vec(Xdir);
|
return gp_Vec(Xdir);
|
||||||
}
|
}
|
||||||
return gp_Vec(0.0,0.0,0.0);
|
return gp_Vec(0.0,0.0,0.0);
|
||||||
|
@@ -663,7 +663,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
|
|||||||
// myIsParallel = TRUE and only the least distance will be returned.
|
// myIsParallel = TRUE and only the least distance will be returned.
|
||||||
//4. Arcs are not parallel. Then several (or single) extremas will be returned.
|
//4. Arcs are not parallel. Then several (or single) extremas will be returned.
|
||||||
|
|
||||||
if (aRng.Delta() > Precision::Angular())
|
if (aRng.Delta() > Precision::Confusion())
|
||||||
{
|
{
|
||||||
Standard_Real aPar = 0.0;
|
Standard_Real aPar = 0.0;
|
||||||
aRng.GetIntermediatePoint(0.5, aPar);
|
aRng.GetIntermediatePoint(0.5, aPar);
|
||||||
@@ -678,7 +678,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
|
|||||||
aMinSqD = Min(aMinSqD, ExtPCir.SquareDistance(anExtID));
|
aMinSqD = Min(aMinSqD, ExtPCir.SquareDistance(anExtID));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aMinSqD <= aMinSquareDist + 10.* Epsilon(1. + aMinSqD))
|
if (aMinSqD <= aMinSquareDist + (1. + aMinSqD) * Epsilon(1. + aMinSqD))
|
||||||
{
|
{
|
||||||
ClearSolutions();
|
ClearSolutions();
|
||||||
mySqDist.Append(aMinSqD);
|
mySqDist.Append(aMinSqD);
|
||||||
@@ -703,7 +703,6 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Nearer solution can be found
|
//Nearer solution can be found
|
||||||
}
|
}
|
||||||
else if (!aRng.IsVoid())
|
else if (!aRng.IsVoid())
|
||||||
@@ -779,7 +778,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
|
|||||||
imin = k;
|
imin = k;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (aDmin <= aMinSquareDist + 10.* Epsilon(1. + aDmin))
|
if (aDmin <= aMinSquareDist + (1. + aDmin) * Epsilon(1. + aDmin))
|
||||||
{
|
{
|
||||||
if (imin == 0)
|
if (imin == 0)
|
||||||
{
|
{
|
||||||
|
@@ -120,6 +120,15 @@ Extrema_GenExtCS::Extrema_GenExtCS()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : ~Extrema_GenExtCS
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Extrema_GenExtCS::~Extrema_GenExtCS()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Extrema_GenExtCS
|
//function : Extrema_GenExtCS
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@@ -35,9 +35,12 @@ public:
|
|||||||
|
|
||||||
DEFINE_STANDARD_ALLOC
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
|
//! Empty constructor.
|
||||||
Standard_EXPORT Extrema_GenExtCS();
|
Standard_EXPORT Extrema_GenExtCS();
|
||||||
|
|
||||||
|
//! Destructor.
|
||||||
|
Standard_EXPORT ~Extrema_GenExtCS();
|
||||||
|
|
||||||
//! It calculates all the distances.
|
//! It calculates all the distances.
|
||||||
//! The function F(u,v)=distance(S1(u1,v1),S2(u2,v2)) has an
|
//! The function F(u,v)=distance(S1(u1,v1),S2(u2,v2)) has an
|
||||||
//! extremum when gradient(F)=0. The algorithm searches
|
//! extremum when gradient(F)=0. The algorithm searches
|
||||||
|
@@ -224,7 +224,19 @@ Extrema_GenExtPS::Extrema_GenExtPS()
|
|||||||
myAlgo = Extrema_ExtAlgo_Grad;
|
myAlgo = Extrema_ExtAlgo_Grad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : ~Extrema_GenExtPS
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Extrema_GenExtPS::~Extrema_GenExtPS()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : Extrema_GenExtPS
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
Extrema_GenExtPS::Extrema_GenExtPS (const gp_Pnt& P,
|
Extrema_GenExtPS::Extrema_GenExtPS (const gp_Pnt& P,
|
||||||
const Adaptor3d_Surface& S,
|
const Adaptor3d_Surface& S,
|
||||||
const Standard_Integer NbU,
|
const Standard_Integer NbU,
|
||||||
|
@@ -37,8 +37,12 @@ public:
|
|||||||
|
|
||||||
DEFINE_STANDARD_ALLOC
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
|
//! Empty constructor.
|
||||||
Standard_EXPORT Extrema_GenExtPS();
|
Standard_EXPORT Extrema_GenExtPS();
|
||||||
|
|
||||||
|
//! Destructor.
|
||||||
|
Standard_EXPORT ~Extrema_GenExtPS();
|
||||||
|
|
||||||
//! It calculates all the distances.
|
//! It calculates all the distances.
|
||||||
//! The function F(u,v)=distance(P,S(u,v)) has an
|
//! The function F(u,v)=distance(P,S(u,v)) has an
|
||||||
//! extremum when gradient(F)=0. The algorithm searches
|
//! extremum when gradient(F)=0. The algorithm searches
|
||||||
|
@@ -118,6 +118,15 @@ Extrema_GenExtSS::Extrema_GenExtSS()
|
|||||||
myInit = Standard_False;
|
myInit = Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : ~Extrema_GenExtSS
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Extrema_GenExtSS::~Extrema_GenExtSS()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Extrema_GenExtSS
|
//function : Extrema_GenExtSS
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@@ -36,9 +36,12 @@ public:
|
|||||||
|
|
||||||
DEFINE_STANDARD_ALLOC
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
|
//! Empty constructor.
|
||||||
Standard_EXPORT Extrema_GenExtSS();
|
Standard_EXPORT Extrema_GenExtSS();
|
||||||
|
|
||||||
|
//! Destructor.
|
||||||
|
Standard_EXPORT ~Extrema_GenExtSS();
|
||||||
|
|
||||||
//! It calculates all the distances.
|
//! It calculates all the distances.
|
||||||
//! The function F(u,v)=distance(S1(u1,v1),S2(u2,v2)) has an
|
//! The function F(u,v)=distance(S1(u1,v1),S2(u2,v2)) has an
|
||||||
//! extremum when gradient(F)=0. The algorithm searches
|
//! extremum when gradient(F)=0. The algorithm searches
|
||||||
|
@@ -16,11 +16,9 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <FEmTool_Assembly.hxx>
|
#include <FEmTool_Assembly.hxx>
|
||||||
#include <FEmTool_ListIteratorOfListOfVectors.hxx>
|
|
||||||
#include <FEmTool_ListOfVectors.hxx>
|
#include <FEmTool_ListOfVectors.hxx>
|
||||||
#include <FEmTool_ProfileMatrix.hxx>
|
#include <FEmTool_ProfileMatrix.hxx>
|
||||||
#include <math_Matrix.hxx>
|
#include <math_Matrix.hxx>
|
||||||
#include <Standard_DimensionError.hxx>
|
|
||||||
#include <Standard_DomainError.hxx>
|
#include <Standard_DomainError.hxx>
|
||||||
#include <StdFail_NotDone.hxx>
|
#include <StdFail_NotDone.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include <TColStd_Array2OfInteger.hxx>
|
#include <TColStd_Array2OfInteger.hxx>
|
||||||
#include <FEmTool_HAssemblyTable.hxx>
|
#include <FEmTool_HAssemblyTable.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
#include <FEmTool_SeqOfLinConstr.hxx>
|
#include <FEmTool_SeqOfLinConstr.hxx>
|
||||||
#include <TColStd_SequenceOfReal.hxx>
|
#include <TColStd_SequenceOfReal.hxx>
|
||||||
|
@@ -20,10 +20,8 @@
|
|||||||
|
|
||||||
#include <FEmTool_Curve.hxx>
|
#include <FEmTool_Curve.hxx>
|
||||||
#include <PLib.hxx>
|
#include <PLib.hxx>
|
||||||
#include <PLib_Base.hxx>
|
|
||||||
#include <PLib_HermitJacobi.hxx>
|
#include <PLib_HermitJacobi.hxx>
|
||||||
#include <PLib_JacobiPolynomial.hxx>
|
#include <PLib_JacobiPolynomial.hxx>
|
||||||
#include <Standard_DimensionError.hxx>
|
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(FEmTool_Curve,Standard_Transient)
|
IMPLEMENT_STANDARD_RTTIEXT(FEmTool_Curve,Standard_Transient)
|
||||||
|
@@ -17,8 +17,6 @@
|
|||||||
|
|
||||||
#include <FEmTool_ElementaryCriterion.hxx>
|
#include <FEmTool_ElementaryCriterion.hxx>
|
||||||
#include <math_Matrix.hxx>
|
#include <math_Matrix.hxx>
|
||||||
#include <Standard_DomainError.hxx>
|
|
||||||
#include <Standard_NotImplemented.hxx>
|
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(FEmTool_ElementaryCriterion,Standard_Transient)
|
IMPLEMENT_STANDARD_RTTIEXT(FEmTool_ElementaryCriterion,Standard_Transient)
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
#define _FEmTool_ElementaryCriterion_HeaderFile
|
#define _FEmTool_ElementaryCriterion_HeaderFile
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_Type.hxx>
|
|
||||||
|
|
||||||
#include <TColStd_HArray2OfReal.hxx>
|
#include <TColStd_HArray2OfReal.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <math_FunctionSet.hxx>
|
#include <math_FunctionSet.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
class PLib_Base;
|
class PLib_Base;
|
||||||
|
|
||||||
|
@@ -24,7 +24,6 @@
|
|||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
#include <PLib.hxx>
|
#include <PLib.hxx>
|
||||||
#include <PLib_HermitJacobi.hxx>
|
#include <PLib_HermitJacobi.hxx>
|
||||||
#include <PLib_JacobiPolynomial.hxx>
|
|
||||||
#include <Standard_ConstructionError.hxx>
|
#include <Standard_ConstructionError.hxx>
|
||||||
#include <Standard_DomainError.hxx>
|
#include <Standard_DomainError.hxx>
|
||||||
#include <Standard_NotImplemented.hxx>
|
#include <Standard_NotImplemented.hxx>
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
#include <FEmTool_ElementaryCriterion.hxx>
|
#include <FEmTool_ElementaryCriterion.hxx>
|
||||||
#include <GeomAbs_Shape.hxx>
|
#include <GeomAbs_Shape.hxx>
|
||||||
#include <TColStd_HArray2OfInteger.hxx>
|
#include <TColStd_HArray2OfInteger.hxx>
|
||||||
#include <Standard_Real.hxx>
|
|
||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -24,7 +24,6 @@
|
|||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
#include <PLib.hxx>
|
#include <PLib.hxx>
|
||||||
#include <PLib_HermitJacobi.hxx>
|
#include <PLib_HermitJacobi.hxx>
|
||||||
#include <PLib_JacobiPolynomial.hxx>
|
|
||||||
#include <Standard_ConstructionError.hxx>
|
#include <Standard_ConstructionError.hxx>
|
||||||
#include <Standard_DomainError.hxx>
|
#include <Standard_DomainError.hxx>
|
||||||
#include <Standard_NotImplemented.hxx>
|
#include <Standard_NotImplemented.hxx>
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
#include <FEmTool_ElementaryCriterion.hxx>
|
#include <FEmTool_ElementaryCriterion.hxx>
|
||||||
#include <GeomAbs_Shape.hxx>
|
#include <GeomAbs_Shape.hxx>
|
||||||
#include <TColStd_HArray2OfInteger.hxx>
|
#include <TColStd_HArray2OfInteger.hxx>
|
||||||
#include <Standard_Real.hxx>
|
|
||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -24,7 +24,6 @@
|
|||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
#include <PLib.hxx>
|
#include <PLib.hxx>
|
||||||
#include <PLib_HermitJacobi.hxx>
|
#include <PLib_HermitJacobi.hxx>
|
||||||
#include <PLib_JacobiPolynomial.hxx>
|
|
||||||
#include <Standard_ConstructionError.hxx>
|
#include <Standard_ConstructionError.hxx>
|
||||||
#include <Standard_DomainError.hxx>
|
#include <Standard_DomainError.hxx>
|
||||||
#include <Standard_NotImplemented.hxx>
|
#include <Standard_NotImplemented.hxx>
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
#include <FEmTool_ElementaryCriterion.hxx>
|
#include <FEmTool_ElementaryCriterion.hxx>
|
||||||
#include <GeomAbs_Shape.hxx>
|
#include <GeomAbs_Shape.hxx>
|
||||||
#include <TColStd_HArray2OfInteger.hxx>
|
#include <TColStd_HArray2OfInteger.hxx>
|
||||||
#include <Standard_Real.hxx>
|
|
||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -18,12 +18,10 @@
|
|||||||
#define _FEmTool_ProfileMatrix_HeaderFile
|
#define _FEmTool_ProfileMatrix_HeaderFile
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_Type.hxx>
|
|
||||||
|
|
||||||
#include <TColStd_Array2OfInteger.hxx>
|
#include <TColStd_Array2OfInteger.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
#include <TColStd_HArray1OfInteger.hxx>
|
#include <TColStd_HArray1OfInteger.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <FEmTool_SparseMatrix.hxx>
|
#include <FEmTool_SparseMatrix.hxx>
|
||||||
#include <TColStd_Array1OfInteger.hxx>
|
#include <TColStd_Array1OfInteger.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
|
@@ -17,6 +17,5 @@
|
|||||||
|
|
||||||
#include <FEmTool_SparseMatrix.hxx>
|
#include <FEmTool_SparseMatrix.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
#include <StdFail_NotDone.hxx>
|
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(FEmTool_SparseMatrix,Standard_Transient)
|
IMPLEMENT_STANDARD_RTTIEXT(FEmTool_SparseMatrix,Standard_Transient)
|
@@ -18,12 +18,10 @@
|
|||||||
#define _FEmTool_SparseMatrix_HeaderFile
|
#define _FEmTool_SparseMatrix_HeaderFile
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_Type.hxx>
|
|
||||||
|
|
||||||
#include <Standard_Transient.hxx>
|
#include <Standard_Transient.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
#include <Storage_Error.hxx>
|
#include <Storage_Error.hxx>
|
||||||
#include <Storage_OpenMode.hxx>
|
#include <Storage_OpenMode.hxx>
|
||||||
#include <Storage_Data.hxx>
|
#include <Storage_Data.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <Storage_Position.hxx>
|
#include <Storage_Position.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <TColStd_SequenceOfAsciiString.hxx>
|
#include <TColStd_SequenceOfAsciiString.hxx>
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
#ifndef _FSD_FStream_HeaderFile
|
#ifndef _FSD_FStream_HeaderFile
|
||||||
#define _FSD_FStream_HeaderFile
|
#define _FSD_FStream_HeaderFile
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
typedef std::fstream FSD_FStream;
|
typedef std::fstream FSD_FStream;
|
||||||
|
@@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include <BSplCLib.hxx>
|
#include <BSplCLib.hxx>
|
||||||
#include <FairCurve_Batten.hxx>
|
#include <FairCurve_Batten.hxx>
|
||||||
#include <FairCurve_BattenLaw.hxx>
|
|
||||||
#include <FairCurve_EnergyOfBatten.hxx>
|
#include <FairCurve_EnergyOfBatten.hxx>
|
||||||
#include <FairCurve_Newton.hxx>
|
#include <FairCurve_Newton.hxx>
|
||||||
#include <Geom2d_BSplineCurve.hxx>
|
#include <Geom2d_BSplineCurve.hxx>
|
||||||
|
@@ -23,8 +23,6 @@
|
|||||||
|
|
||||||
#include <FairCurve_AnalysisCode.hxx>
|
#include <FairCurve_AnalysisCode.hxx>
|
||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <Standard_Real.hxx>
|
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <BSplCLib.hxx>
|
#include <BSplCLib.hxx>
|
||||||
#include <FairCurve_BattenLaw.hxx>
|
|
||||||
#include <FairCurve_DistributionOfJerk.hxx>
|
#include <FairCurve_DistributionOfJerk.hxx>
|
||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <gp_XY.hxx>
|
#include <gp_XY.hxx>
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <BSplCLib.hxx>
|
#include <BSplCLib.hxx>
|
||||||
#include <FairCurve_BattenLaw.hxx>
|
|
||||||
#include <FairCurve_DistributionOfSagging.hxx>
|
#include <FairCurve_DistributionOfSagging.hxx>
|
||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <gp_XY.hxx>
|
#include <gp_XY.hxx>
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <BSplCLib.hxx>
|
#include <BSplCLib.hxx>
|
||||||
#include <FairCurve_BattenLaw.hxx>
|
|
||||||
#include <FairCurve_DistributionOfTension.hxx>
|
#include <FairCurve_DistributionOfTension.hxx>
|
||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <gp_XY.hxx>
|
#include <gp_XY.hxx>
|
||||||
|
@@ -21,13 +21,11 @@
|
|||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
#include <Standard_Real.hxx>
|
|
||||||
#include <FairCurve_BattenLaw.hxx>
|
#include <FairCurve_BattenLaw.hxx>
|
||||||
#include <FairCurve_DistributionOfEnergy.hxx>
|
#include <FairCurve_DistributionOfEnergy.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -23,9 +23,7 @@
|
|||||||
|
|
||||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <TColgp_Array1OfXY.hxx>
|
#include <TColgp_Array1OfXY.hxx>
|
||||||
#include <math_Vector.hxx>
|
|
||||||
#include <math_MultipleVarFunctionWithHessian.hxx>
|
#include <math_MultipleVarFunctionWithHessian.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
class math_Matrix;
|
class math_Matrix;
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <FairCurve_BattenLaw.hxx>
|
|
||||||
#include <FairCurve_EnergyOfBatten.hxx>
|
#include <FairCurve_EnergyOfBatten.hxx>
|
||||||
#include <math_GaussSetIntegration.hxx>
|
#include <math_GaussSetIntegration.hxx>
|
||||||
#include <math_IntegerVector.hxx>
|
#include <math_IntegerVector.hxx>
|
||||||
|
@@ -22,7 +22,6 @@
|
|||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#include <FairCurve_BattenLaw.hxx>
|
|
||||||
#include <FairCurve_DistributionOfTension.hxx>
|
#include <FairCurve_DistributionOfTension.hxx>
|
||||||
#include <FairCurve_DistributionOfSagging.hxx>
|
#include <FairCurve_DistributionOfSagging.hxx>
|
||||||
#include <FairCurve_AnalysisCode.hxx>
|
#include <FairCurve_AnalysisCode.hxx>
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
#include <Standard_Real.hxx>
|
|
||||||
#include <FairCurve_BattenLaw.hxx>
|
#include <FairCurve_BattenLaw.hxx>
|
||||||
#include <FairCurve_DistributionOfTension.hxx>
|
#include <FairCurve_DistributionOfTension.hxx>
|
||||||
#include <FairCurve_DistributionOfSagging.hxx>
|
#include <FairCurve_DistributionOfSagging.hxx>
|
||||||
@@ -31,7 +30,6 @@
|
|||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
|
|
||||||
// resolve name collisions with X11 headers
|
// resolve name collisions with X11 headers
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <BSplCLib.hxx>
|
#include <BSplCLib.hxx>
|
||||||
#include <FairCurve_BattenLaw.hxx>
|
|
||||||
#include <FairCurve_EnergyOfMVC.hxx>
|
#include <FairCurve_EnergyOfMVC.hxx>
|
||||||
#include <FairCurve_MinimalVariation.hxx>
|
#include <FairCurve_MinimalVariation.hxx>
|
||||||
#include <FairCurve_Newton.hxx>
|
#include <FairCurve_Newton.hxx>
|
||||||
@@ -30,9 +29,6 @@
|
|||||||
#include <gp_Vec2d.hxx>
|
#include <gp_Vec2d.hxx>
|
||||||
#include <math_Matrix.hxx>
|
#include <math_Matrix.hxx>
|
||||||
#include <PLib.hxx>
|
#include <PLib.hxx>
|
||||||
#include <Precision.hxx>
|
|
||||||
#include <Standard_DomainError.hxx>
|
|
||||||
#include <Standard_NegativeValue.hxx>
|
|
||||||
#include <Standard_NullValue.hxx>
|
#include <Standard_NullValue.hxx>
|
||||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||||
#include <TColStd_HArray1OfInteger.hxx>
|
#include <TColStd_HArray1OfInteger.hxx>
|
||||||
|
@@ -19,13 +19,9 @@
|
|||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
|
||||||
|
|
||||||
#include <Standard_Real.hxx>
|
|
||||||
#include <FairCurve_Batten.hxx>
|
#include <FairCurve_Batten.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <FairCurve_AnalysisCode.hxx>
|
#include <FairCurve_AnalysisCode.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
|
||||||
#include <Standard_OStream.hxx>
|
#include <Standard_OStream.hxx>
|
||||||
class gp_Pnt2d;
|
class gp_Pnt2d;
|
||||||
class gp_Vec2d;
|
class gp_Vec2d;
|
||||||
|
@@ -21,10 +21,7 @@
|
|||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
#include <Standard_Real.hxx>
|
|
||||||
#include <math_NewtonMinimum.hxx>
|
#include <math_NewtonMinimum.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
class math_MultipleVarFunctionWithHessian;
|
class math_MultipleVarFunctionWithHessian;
|
||||||
|
|
||||||
|
|
||||||
|
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
// Modified: Portage NT 7-5-97 DPF (return)
|
// Modified: Portage NT 7-5-97 DPF (return)
|
||||||
|
|
||||||
#include <ChFi3d_FilletShape.hxx>
|
|
||||||
#include <FilletSurf_Builder.hxx>
|
#include <FilletSurf_Builder.hxx>
|
||||||
#include <FilletSurf_ErrorTypeStatus.hxx>
|
#include <FilletSurf_ErrorTypeStatus.hxx>
|
||||||
#include <FilletSurf_InternalBuilder.hxx>
|
#include <FilletSurf_InternalBuilder.hxx>
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
#include <Adaptor3d_TopolTool.hxx>
|
#include <Adaptor3d_TopolTool.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
|
||||||
#include <BRepAdaptor_Curve2d.hxx>
|
#include <BRepAdaptor_Curve2d.hxx>
|
||||||
#include <BRepAdaptor_Surface.hxx>
|
#include <BRepAdaptor_Surface.hxx>
|
||||||
#include <BRepBlend_ConstRad.hxx>
|
#include <BRepBlend_ConstRad.hxx>
|
||||||
@@ -31,16 +30,12 @@
|
|||||||
#include <ChFiDS_FilSpine.hxx>
|
#include <ChFiDS_FilSpine.hxx>
|
||||||
#include <ChFiDS_HData.hxx>
|
#include <ChFiDS_HData.hxx>
|
||||||
#include <ChFiDS_ElSpine.hxx>
|
#include <ChFiDS_ElSpine.hxx>
|
||||||
#include <ChFiDS_ListIteratorOfListOfStripe.hxx>
|
|
||||||
#include <ChFiDS_ListOfStripe.hxx>
|
|
||||||
#include <ChFiDS_SecHArray1.hxx>
|
#include <ChFiDS_SecHArray1.hxx>
|
||||||
#include <ChFiDS_SequenceOfSurfData.hxx>
|
#include <ChFiDS_SequenceOfSurfData.hxx>
|
||||||
#include <ChFiDS_Spine.hxx>
|
#include <ChFiDS_Spine.hxx>
|
||||||
#include <ChFiDS_Stripe.hxx>
|
#include <ChFiDS_Stripe.hxx>
|
||||||
#include <ChFiDS_SurfData.hxx>
|
#include <ChFiDS_SurfData.hxx>
|
||||||
#include <ElSLib.hxx>
|
#include <ElSLib.hxx>
|
||||||
#include <FilletSurf_ErrorTypeStatus.hxx>
|
|
||||||
#include <FilletSurf_StatusDone.hxx>
|
|
||||||
#include <FilletSurf_StatusType.hxx>
|
#include <FilletSurf_StatusType.hxx>
|
||||||
#include <Geom2d_Curve.hxx>
|
#include <Geom2d_Curve.hxx>
|
||||||
#include <Geom_Circle.hxx>
|
#include <Geom_Circle.hxx>
|
||||||
@@ -49,22 +44,19 @@
|
|||||||
#include <Geom_Surface.hxx>
|
#include <Geom_Surface.hxx>
|
||||||
#include <Geom_TrimmedCurve.hxx>
|
#include <Geom_TrimmedCurve.hxx>
|
||||||
#include <GeomAbs_Shape.hxx>
|
#include <GeomAbs_Shape.hxx>
|
||||||
#include <GeomAdaptor_Curve.hxx>
|
|
||||||
#include <GeomAdaptor_Surface.hxx>
|
#include <GeomAdaptor_Surface.hxx>
|
||||||
#include <gp_Circ.hxx>
|
#include <gp_Circ.hxx>
|
||||||
#include <gp_Pln.hxx>
|
#include <gp_Pln.hxx>
|
||||||
#include <IntCurveSurface_HInter.hxx>
|
#include <IntCurveSurface_HInter.hxx>
|
||||||
#include <IntCurveSurface_IntersectionPoint.hxx>
|
#include <IntCurveSurface_IntersectionPoint.hxx>
|
||||||
#include <Precision.hxx>
|
|
||||||
#include <Standard_ConstructionError.hxx>
|
#include <Standard_ConstructionError.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopOpeBRepDS_HDataStructure.hxx>
|
#include <TopOpeBRepDS_HDataStructure.hxx>
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
|
||||||
|
|
||||||
static Standard_Boolean isinlist(const TopoDS_Shape& E,
|
static Standard_Boolean isinlist(const TopoDS_Shape& E,
|
||||||
const TopTools_ListOfShape& L){
|
const TopTools_ListOfShape& L){
|
||||||
TopTools_ListIteratorOfListOfShape It;
|
TopTools_ListIteratorOfListOfShape It;
|
||||||
for (It.Initialize(L); It.More(); It.Next()){
|
for (It.Initialize(L); It.More(); It.Next()){
|
||||||
if(E.IsSame(It.Value())) return 1;
|
if(E.IsSame(It.Value())) return 1;
|
||||||
|
@@ -18,8 +18,6 @@
|
|||||||
#define _FilletSurf_InternalBuilder_HeaderFile
|
#define _FilletSurf_InternalBuilder_HeaderFile
|
||||||
|
|
||||||
#include <BRepAdaptor_Curve2d.hxx>
|
#include <BRepAdaptor_Curve2d.hxx>
|
||||||
#include <BRepAdaptor_Surface.hxx>
|
|
||||||
#include <ChFiDS_ElSpine.hxx>
|
|
||||||
#include <ChFi3d_FilBuilder.hxx>
|
#include <ChFi3d_FilBuilder.hxx>
|
||||||
#include <ChFi3d_FilletShape.hxx>
|
#include <ChFi3d_FilletShape.hxx>
|
||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
#include <Message.hxx>
|
#include <Message.hxx>
|
||||||
#include <Message_Messenger.hxx>
|
#include <Message_Messenger.hxx>
|
||||||
#include <NCollection_Buffer.hxx>
|
#include <NCollection_Buffer.hxx>
|
||||||
#include <NCollection_List.hxx>
|
|
||||||
#include <NCollection_Map.hxx>
|
#include <NCollection_Map.hxx>
|
||||||
#include <OSD_Environment.hxx>
|
#include <OSD_Environment.hxx>
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
@@ -18,8 +18,6 @@
|
|||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_Transient.hxx>
|
#include <Standard_Transient.hxx>
|
||||||
#include <Standard_Type.hxx>
|
|
||||||
#include <Font_FontAspect.hxx>
|
|
||||||
#include <Font_NListOfSystemFont.hxx>
|
#include <Font_NListOfSystemFont.hxx>
|
||||||
#include <Font_StrictLevel.hxx>
|
#include <Font_StrictLevel.hxx>
|
||||||
#include <Font_UnicodeSubset.hxx>
|
#include <Font_UnicodeSubset.hxx>
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include <Font_FontAspect.hxx>
|
#include <Font_FontAspect.hxx>
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_Type.hxx>
|
|
||||||
#include <Standard_Transient.hxx>
|
#include <Standard_Transient.hxx>
|
||||||
#include <TCollection_AsciiString.hxx>
|
#include <TCollection_AsciiString.hxx>
|
||||||
|
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
#include <gce_MakeCone.hxx>
|
#include <gce_MakeCone.hxx>
|
||||||
#include <Geom_ConicalSurface.hxx>
|
#include <Geom_ConicalSurface.hxx>
|
||||||
#include <gp.hxx>
|
#include <gp.hxx>
|
||||||
#include <gp_Ax1.hxx>
|
|
||||||
#include <gp_Ax2.hxx>
|
#include <gp_Ax2.hxx>
|
||||||
#include <gp_Cone.hxx>
|
#include <gp_Cone.hxx>
|
||||||
#include <gp_Lin.hxx>
|
#include <gp_Lin.hxx>
|
||||||
|
@@ -17,11 +17,7 @@
|
|||||||
|
|
||||||
#include <GC_MakeMirror.hxx>
|
#include <GC_MakeMirror.hxx>
|
||||||
#include <Geom_Transformation.hxx>
|
#include <Geom_Transformation.hxx>
|
||||||
#include <gp_Ax1.hxx>
|
|
||||||
#include <gp_Ax2.hxx>
|
|
||||||
#include <gp_Ax3.hxx>
|
|
||||||
#include <gp_Dir.hxx>
|
#include <gp_Dir.hxx>
|
||||||
#include <gp_Lin.hxx>
|
|
||||||
#include <gp_Pln.hxx>
|
#include <gp_Pln.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <StdFail_NotDone.hxx>
|
#include <StdFail_NotDone.hxx>
|
||||||
|
@@ -20,8 +20,6 @@
|
|||||||
#include <Geom_Plane.hxx>
|
#include <Geom_Plane.hxx>
|
||||||
#include <gp.hxx>
|
#include <gp.hxx>
|
||||||
#include <gp_Ax1.hxx>
|
#include <gp_Ax1.hxx>
|
||||||
#include <gp_Ax2.hxx>
|
|
||||||
#include <gp_Ax3.hxx>
|
|
||||||
#include <gp_Dir.hxx>
|
#include <gp_Dir.hxx>
|
||||||
#include <gp_Pln.hxx>
|
#include <gp_Pln.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
#include <GC_MakeRotation.hxx>
|
#include <GC_MakeRotation.hxx>
|
||||||
#include <Geom_Transformation.hxx>
|
#include <Geom_Transformation.hxx>
|
||||||
#include <gp_Ax1.hxx>
|
|
||||||
#include <gp_Dir.hxx>
|
#include <gp_Dir.hxx>
|
||||||
#include <gp_Lin.hxx>
|
#include <gp_Lin.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||||
#include <gp_Ax1.hxx>
|
#include <gp_Ax1.hxx>
|
||||||
#include <gp_Circ.hxx>
|
#include <gp_Circ.hxx>
|
||||||
#include <gp_Cylinder.hxx>
|
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <Standard_NotImplemented.hxx>
|
#include <Standard_NotImplemented.hxx>
|
||||||
#include <StdFail_NotDone.hxx>
|
#include <StdFail_NotDone.hxx>
|
||||||
|
@@ -19,10 +19,8 @@
|
|||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
|
||||||
|
|
||||||
#include <gce_ErrorType.hxx>
|
#include <gce_ErrorType.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
|
|
||||||
// resolve name collisions with X11 headers
|
// resolve name collisions with X11 headers
|
||||||
#ifdef Status
|
#ifdef Status
|
||||||
|
@@ -19,10 +19,8 @@
|
|||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
|
||||||
|
|
||||||
#include <gce_ErrorType.hxx>
|
#include <gce_ErrorType.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
|
|
||||||
// resolve name collisions with X11 headers
|
// resolve name collisions with X11 headers
|
||||||
#ifdef Status
|
#ifdef Status
|
||||||
|
@@ -14,7 +14,6 @@
|
|||||||
#ifndef _GCPnts_DistFunction_HeaderFile
|
#ifndef _GCPnts_DistFunction_HeaderFile
|
||||||
#define _GCPnts_DistFunction_HeaderFile
|
#define _GCPnts_DistFunction_HeaderFile
|
||||||
|
|
||||||
#include <gp_Lin.hxx>
|
|
||||||
#include <math_Function.hxx>
|
#include <math_Function.hxx>
|
||||||
#include <math_MultipleVarFunction.hxx>
|
#include <math_MultipleVarFunction.hxx>
|
||||||
#include <Adaptor3d_Curve.hxx>
|
#include <Adaptor3d_Curve.hxx>
|
||||||
|
@@ -14,7 +14,6 @@
|
|||||||
#ifndef _GCPnts_DistFunction2d_HeaderFile
|
#ifndef _GCPnts_DistFunction2d_HeaderFile
|
||||||
#define _GCPnts_DistFunction2d_HeaderFile
|
#define _GCPnts_DistFunction2d_HeaderFile
|
||||||
|
|
||||||
#include <gp_Lin2d.hxx>
|
|
||||||
#include <math_Function.hxx>
|
#include <math_Function.hxx>
|
||||||
#include <math_MultipleVarFunction.hxx>
|
#include <math_MultipleVarFunction.hxx>
|
||||||
#include <Adaptor2d_Curve2d.hxx>
|
#include <Adaptor2d_Curve2d.hxx>
|
||||||
|
@@ -16,11 +16,9 @@
|
|||||||
|
|
||||||
#include <GCPnts_TCurveTypes.hxx>
|
#include <GCPnts_TCurveTypes.hxx>
|
||||||
#include <GCPnts_UniformAbscissa.hxx>
|
#include <GCPnts_UniformAbscissa.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
|
||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <Standard_ConstructionError.hxx>
|
#include <Standard_ConstructionError.hxx>
|
||||||
#include <TColgp_Array1OfPnt2d.hxx>
|
#include <TColgp_Array1OfPnt2d.hxx>
|
||||||
#include <TColgp_Array1OfPnt.hxx>
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GCPnts_QuasiUniformAbscissa
|
//function : GCPnts_QuasiUniformAbscissa
|
||||||
|
@@ -23,13 +23,10 @@
|
|||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <gp_Vec2d.hxx>
|
#include <gp_Vec2d.hxx>
|
||||||
#include <gp_XYZ.hxx>
|
#include <gp_XYZ.hxx>
|
||||||
#include <gp_Circ.hxx>
|
|
||||||
#include <gp_Circ2d.hxx>
|
|
||||||
#include <math_BrentMinimum.hxx>
|
#include <math_BrentMinimum.hxx>
|
||||||
#include <math_PSO.hxx>
|
#include <math_PSO.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
#include <Standard_ConstructionError.hxx>
|
#include <Standard_ConstructionError.hxx>
|
||||||
#include <Standard_OutOfRange.hxx>
|
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#include <TColgp_SequenceOfPnt.hxx>
|
#include <TColgp_SequenceOfPnt.hxx>
|
||||||
#include <TColStd_SequenceOfReal.hxx>
|
#include <TColStd_SequenceOfReal.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_Lin.hxx>
|
|
||||||
#include <math_Function.hxx>
|
#include <math_Function.hxx>
|
||||||
#include <math_MultipleVarFunction.hxx>
|
#include <math_MultipleVarFunction.hxx>
|
||||||
#include <Adaptor3d_Curve.hxx>
|
#include <Adaptor3d_Curve.hxx>
|
||||||
|
@@ -19,10 +19,7 @@
|
|||||||
#include <GCPnts_TCurveTypes.hxx>
|
#include <GCPnts_TCurveTypes.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <Standard_ConstructionError.hxx>
|
|
||||||
#include <Standard_DomainError.hxx>
|
|
||||||
#include <Standard_NotImplemented.hxx>
|
#include <Standard_NotImplemented.hxx>
|
||||||
#include <Standard_OutOfRange.hxx>
|
|
||||||
#include <StdFail_NotDone.hxx>
|
#include <StdFail_NotDone.hxx>
|
||||||
|
|
||||||
// mask the return of a Adaptor2d_Curve2d as a gp_Pnt
|
// mask the return of a Adaptor2d_Curve2d as a gp_Pnt
|
||||||
|
@@ -18,8 +18,6 @@
|
|||||||
#include <GccAna_Circ2dBisec.hxx>
|
#include <GccAna_Circ2dBisec.hxx>
|
||||||
#include <GccEnt_BadQualifier.hxx>
|
#include <GccEnt_BadQualifier.hxx>
|
||||||
#include <GccEnt_QualifiedCirc.hxx>
|
#include <GccEnt_QualifiedCirc.hxx>
|
||||||
#include <GccEnt_QualifiedLin.hxx>
|
|
||||||
#include <GccInt_BCirc.hxx>
|
|
||||||
#include <GccInt_BLine.hxx>
|
#include <GccInt_BLine.hxx>
|
||||||
#include <GccInt_IType.hxx>
|
#include <GccInt_IType.hxx>
|
||||||
#include <gp_Ax2d.hxx>
|
#include <gp_Ax2d.hxx>
|
||||||
|
@@ -19,16 +19,13 @@
|
|||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
|
||||||
|
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <TColgp_Array1OfCirc2d.hxx>
|
#include <TColgp_Array1OfCirc2d.hxx>
|
||||||
#include <GccEnt_Array1OfPosition.hxx>
|
#include <GccEnt_Array1OfPosition.hxx>
|
||||||
#include <TColStd_Array1OfInteger.hxx>
|
#include <TColStd_Array1OfInteger.hxx>
|
||||||
#include <TColgp_Array1OfPnt2d.hxx>
|
#include <TColgp_Array1OfPnt2d.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
#include <Standard_Real.hxx>
|
|
||||||
#include <GccEnt_Position.hxx>
|
#include <GccEnt_Position.hxx>
|
||||||
class GccEnt_QualifiedCirc;
|
class GccEnt_QualifiedCirc;
|
||||||
class gp_Lin2d;
|
class gp_Lin2d;
|
||||||
|
@@ -31,8 +31,6 @@
|
|||||||
#include <IntAna2d_AnaIntersection.hxx>
|
#include <IntAna2d_AnaIntersection.hxx>
|
||||||
#include <IntAna2d_Conic.hxx>
|
#include <IntAna2d_Conic.hxx>
|
||||||
#include <IntAna2d_IntPoint.hxx>
|
#include <IntAna2d_IntPoint.hxx>
|
||||||
#include <Standard_OutOfRange.hxx>
|
|
||||||
#include <StdFail_NotDone.hxx>
|
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// Creation of a circle tangent to Circle C1 and a straight line L2. +
|
// Creation of a circle tangent to Circle C1 and a straight line L2. +
|
||||||
|
@@ -19,9 +19,7 @@
|
|||||||
#include <GccAna_Circ2d2TanOn.hxx>
|
#include <GccAna_Circ2d2TanOn.hxx>
|
||||||
#include <GccAna_LinPnt2dBisec.hxx>
|
#include <GccAna_LinPnt2dBisec.hxx>
|
||||||
#include <GccEnt_BadQualifier.hxx>
|
#include <GccEnt_BadQualifier.hxx>
|
||||||
#include <GccEnt_QualifiedCirc.hxx>
|
|
||||||
#include <GccEnt_QualifiedLin.hxx>
|
#include <GccEnt_QualifiedLin.hxx>
|
||||||
#include <GccInt_Bisec.hxx>
|
|
||||||
#include <GccInt_BLine.hxx>
|
#include <GccInt_BLine.hxx>
|
||||||
#include <GccInt_IType.hxx>
|
#include <GccInt_IType.hxx>
|
||||||
#include <gp_Ax2d.hxx>
|
#include <gp_Ax2d.hxx>
|
||||||
@@ -32,8 +30,6 @@
|
|||||||
#include <IntAna2d_AnaIntersection.hxx>
|
#include <IntAna2d_AnaIntersection.hxx>
|
||||||
#include <IntAna2d_Conic.hxx>
|
#include <IntAna2d_Conic.hxx>
|
||||||
#include <IntAna2d_IntPoint.hxx>
|
#include <IntAna2d_IntPoint.hxx>
|
||||||
#include <Standard_OutOfRange.hxx>
|
|
||||||
#include <StdFail_NotDone.hxx>
|
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// Creation of a circle tangent to straight line L1 and a point Point2. +
|
// Creation of a circle tangent to straight line L1 and a point Point2. +
|
||||||
|
@@ -24,10 +24,7 @@
|
|||||||
|
|
||||||
#include <ElCLib.hxx>
|
#include <ElCLib.hxx>
|
||||||
#include <GccAna_Circ2d2TanOn.hxx>
|
#include <GccAna_Circ2d2TanOn.hxx>
|
||||||
#include <GccAna_Lin2dBisec.hxx>
|
|
||||||
#include <GccEnt_BadQualifier.hxx>
|
#include <GccEnt_BadQualifier.hxx>
|
||||||
#include <GccEnt_QualifiedCirc.hxx>
|
|
||||||
#include <GccEnt_QualifiedLin.hxx>
|
|
||||||
#include <gp_Ax2d.hxx>
|
#include <gp_Ax2d.hxx>
|
||||||
#include <gp_Circ2d.hxx>
|
#include <gp_Circ2d.hxx>
|
||||||
#include <gp_Dir2d.hxx>
|
#include <gp_Dir2d.hxx>
|
||||||
@@ -35,8 +32,6 @@
|
|||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <IntAna2d_AnaIntersection.hxx>
|
#include <IntAna2d_AnaIntersection.hxx>
|
||||||
#include <IntAna2d_IntPoint.hxx>
|
#include <IntAna2d_IntPoint.hxx>
|
||||||
#include <Standard_OutOfRange.hxx>
|
|
||||||
#include <StdFail_NotDone.hxx>
|
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// Creation of a circle passing by : 2 points Point1 and Point2. +
|
// Creation of a circle passing by : 2 points Point1 and Point2. +
|
||||||
|
@@ -19,9 +19,7 @@
|
|||||||
#include <GccAna_Circ2d2TanOn.hxx>
|
#include <GccAna_Circ2d2TanOn.hxx>
|
||||||
#include <GccAna_Lin2dBisec.hxx>
|
#include <GccAna_Lin2dBisec.hxx>
|
||||||
#include <GccEnt_BadQualifier.hxx>
|
#include <GccEnt_BadQualifier.hxx>
|
||||||
#include <GccEnt_QualifiedCirc.hxx>
|
|
||||||
#include <GccEnt_QualifiedLin.hxx>
|
#include <GccEnt_QualifiedLin.hxx>
|
||||||
#include <gp.hxx>
|
|
||||||
#include <gp_Ax2d.hxx>
|
#include <gp_Ax2d.hxx>
|
||||||
#include <gp_Circ2d.hxx>
|
#include <gp_Circ2d.hxx>
|
||||||
#include <gp_Dir2d.hxx>
|
#include <gp_Dir2d.hxx>
|
||||||
@@ -29,8 +27,6 @@
|
|||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <IntAna2d_AnaIntersection.hxx>
|
#include <IntAna2d_AnaIntersection.hxx>
|
||||||
#include <IntAna2d_IntPoint.hxx>
|
#include <IntAna2d_IntPoint.hxx>
|
||||||
#include <Standard_OutOfRange.hxx>
|
|
||||||
#include <StdFail_NotDone.hxx>
|
|
||||||
|
|
||||||
GccAna_Circ2d2TanOn::
|
GccAna_Circ2d2TanOn::
|
||||||
GccAna_Circ2d2TanOn (const GccEnt_QualifiedLin& Qualified1 ,
|
GccAna_Circ2d2TanOn (const GccEnt_QualifiedLin& Qualified1 ,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user