1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0025343: Visualization - Update user's guide and DRAW commands description

Redesign of Visualisation user guide's structure with some changes in the guide.
Update Draw_test_harness user guide. Added dimension commands to DRAW test harness.
Update of prerequisites and building 3rd party tools sections
Move VIS draw tests to Draw Test Harness section.

Additionally, fix bugs 24117 and 25353.
Correct output of new imaged in PDF in modeling algos guide and errors introduced by bug 24699 in the overview.
This commit is contained in:
isz 2014-10-31 18:37:45 +03:00 committed by bugmaster
parent b350f6ee1e
commit 18006a0f10
24 changed files with 1469 additions and 925 deletions

View File

@ -27,7 +27,7 @@ user_guides/step/step.md
user_guides/xde/xde.md
user_guides/ocaf/ocaf.md
user_guides/tobj/tobj.md
user_guides/draw_test_harness.md
user_guides/draw_test_harness/draw_test_harness.md
user_guides/brep_wp/brep_wp.md
user_guides/ocaf_functionmechanism_wp/ocaf_functionmechanism_wp.md
user_guides/ocaf_tree_wp/ocaf_tree_wp.md

View File

@ -16,7 +16,7 @@ user_guides/ocaf_functionmechanism_wp/ocaf_functionmechanism_wp.md
user_guides/ocaf_tree_wp/ocaf_tree_wp.md
user_guides/ocaf_wp/ocaf_wp.md
user_guides/step/step.md
user_guides/draw_test_harness.md
user_guides/draw_test_harness/draw_test_harness.md
user_guides/tobj/tobj.md
user_guides/visualization/visualization.md
user_guides/voxels_wp/voxels_wp.md

View File

@ -16,11 +16,12 @@ 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.4.11;
* FreeType 2.4.10 - 2.5.3;
* Optional products:
* TBB 3.x - 4.x;
* gl2ps 1.3.5 - 1.3.8;
* FreeImage 3.14.1 - 3.15.4.
* FreeImage 3.14.1 - 3.16.0;
* VTK 6.1.0.
@section dev_guides__building_3rdparty_linux_2 Building Mandatory Third-party Products
@ -104,7 +105,7 @@ Download the necessary archive from http://sourceforge.net/projects/freetype/fil
@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 http://threadingbuildingblocks.org.
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.
@subsection dev_guides__building_3rdparty_linux_3_2 gl2ps
@ -198,53 +199,28 @@ and unpack it. The directory with unpacked sources is further referred to as *F
make clean
@subsection dev_guides__building_3rdparty_linux_3_4 OpenCL ICD Loader
@subsection dev_guides__building_3rdparty_linux_3_4 VTK
If you have OpenCL SDK (one provided by Apple, AMD, NVIDIA, Intel, or other
vendor) installed on your system, you should find OpenCL headers and
libraries required for building OCCT inside that SDK.
You can download VTK sources from http://www.vtk.org/VTK/resources/software.html
Alternatively, you can use OpenCL ICD (Installable Client Driver) Loader
provided by Khronos group. The following describes steps used to build OpenCL
ICD Loader version 1.2.11.0.
### The building procedure:
1. Download OpenCL ICD Loader sources archive and OpenCL header files from
Khronos OpenCL Registry
http://www.khronos.org/registry/cl/
Download the necessary archive from http://www.vtk.org/VTK/resources/software.html and unpack it.
2. Unpack the archive and put headers in *inc/CL* sub-folder
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:
3. Print *make* in the root of the unpacked archive to compile OpenCL libraries.
ccmake VTK_SRC_DIR
4. Create installation folder for OpenCL IDL Loader package and put there:
* Press <i>[c]</i> to make the initial configuration
* Define the necessary options in *VTK_INSTALL_PREFIX*
* Press <i>[c]</i> to make the final configuration
* Press <i>[g]</i> to generate Makefile and exit
1. OpenCL header files in *include/CL* subfolder
3. Start the building of VTK:
2. *libOpenCL.so* (generated in *bin* subfolder of source package) in *lib* subfolder
make
@section dev_guides__building_3rdparty_linux_4 Installation From Official Repositories
4. Start the installation of gl2ps. Binaries will be installed according to the *VTK_INSTALL_PREFIX* option.
@subsection dev_guides__building_3rdparty_linux_4_1 Debian-based distributives
All 3rd-party products required for building of OCCT could be installed
from official repositories. You may install them from console using apt-get utility:
sudo apt-get install \
tcllib tklib tcl-dev tk-dev \
libfreetype-dev \
libxt-dev libxmu-dev \
libgl1-mesa-dev \
libfreeimage-dev \
libtbb-dev \
libgl2ps-dev
To launch binaries built with WOK you need to install C shell and 32-bit libraries on x86_64 distributives:
sudo apt-get install \
csh \
libstdc++5:i386 libxt6:i386
Building is possible with any C++ compliant compiler :
sudo apt-get install \
g++
make install

View File

@ -14,13 +14,12 @@ http://www.opencascade.org/getocc/require/</a>.
There are two types of third-party products, which are necessary to build OCCT:
* Mandatory products:
* Tcl 8.5,
* Tk 8.5,
* FreeType 2.4.10
* Tcl/Tk 8.5 - 8.6;
* FreeType 2.4.10 - 2.5.3.
* Optional products:
* TBB 3.x or 4.x,
* gl2ps 1.3.5,
* FreeImage 3.14.1 or 3.15.x
* TBB 3.x - 4.x;
* gl2ps 1.3.5 - 1.3.8;
* FreeImage 3.14.1 - 3.16.0
@section dev_guides__building_3rdparty_osx_2 Building Mandatory Third-party Products

View File

@ -12,11 +12,12 @@ The links for downloading the third-party products are available on the web site
* Mandatory products:
* Tcl/Tk 8.5 - 8.6;
* FreeType 2.4.10 - 2.4.11.
* FreeType 2.4.10 - 2.5.3.
* Optional products:
* TBB 3.x - 4.x;
* gl2ps 1.3.5 - 1.3.8;
* FreeImage 3.14.1 -3.15.4.
* 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*).
@ -299,35 +300,22 @@ http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
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_opencl OpenCL ICD Loader
@subsection dev_guides__building_3rdparty_win_3_4 VTK
If you have OpenCL SDK (one provided by Apple, AMD, NVIDIA, Intel, or other
vendor) installed on your system, you should find OpenCL headers and
libraries required for building OCCT inside that SDK.
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.
Alternatively, you can use OpenCL ICD (Installable Client Driver) Loader
provided by Khronos group. The following describes steps used to build OpenCL
ICD Loader version 1.2.11.0.
### The building procedure:
1. Download OpenCL ICD Loader sources archive and OpenCL header files from
Khronos OpenCL Registry
http://www.khronos.org/registry/cl/
1. Download the necessary archive from http://www.vtk.org/VTK/resources/software.html and unpack it into *3rdparty* folder.
2. Unpack the archive and put headers in *inc/CL* sub-folder
As a result, you will get a folder named, for example, <i>3rdparty\VTK-6.1.0.</i>
3. Use CMake to generate VS projects for building the library:
- Start CMake-GUI and select OpenCL ICD Loader folder as source path, and the folder of your choice for VS project and intermediate build data;
- Click **Generate**;
- Select the VS version to be used from the ones you have installed (we recommend using VS 2010) and the architecture (32- or 64-bit).
Further in this document, this folder is referred to as *VTK*.
4. Open solution *OPENCL_ICD_LOADER.sln* generated in the build folder.
Though not strictly necessary, we recommend making two changes in the generated projects:
- Add file *OpenCL.rc* to project OpenCL, to have version and Khronos copyright correctly embedded in DLL;
- Change **Runtime library** to **Multi-threaded(/MT)** in the properties of OpenCL project, on **C/C++ / Code Generation** page for Release configuration, to avoid dependency on run-time DLL.
2. Use CMake to generate VS projects for building the library:
- Start CMake-GUI and select VTK folder as source path, and the folder of your choice for VS project and intermediate build data.
- Click **Configure**.
- Select the VS version to be used from the ones you have installed (we recommend using VS 2010) and the architecture (32 or 64-bit).
- Generate VS projects with default CMake options. The open solution *VTK.sln* will be generated in the build folder.
5. Build project OpenCL in Release mode
6. Create the installation folder for OpenCL IDL Loader package and put there:
- OpenCL header files in *include/CL* subfolder;
- *OpenCL.dll* (generated in *bin/Release* subfolder of the source package) in *bin* subfolder;
- *OpenCL.lib* (generated in *Release* subfolder of the build directory) in *lib* subfolder.
3. Build project VTK in Release mode.

View File

@ -46,13 +46,13 @@ To prevent this, it is suggested to make links:
* <i> --with-freeimage= </i> defines the location of installed **FreeImage** product;
* <i> --with-tbb-include= </i> defines the location of *tbb.h*;
* <i> --with-tbb-library= </i> defines the location of *libtbb.so*;
* <i> --with-opencl-include= </i> defines the location of *cl.h*;
* <i> --with-opencl-library= </i> defines the location of *libOpenCL.so*;
* <i> --with-vtk-include= </i> defines the location of VTK includes;
* <i> --with-vtk-library= </i> defines the location of VTK libraries;
* <i> --enable-debug= yes: </i> includes debug information, no: does not include debug information;
* <i> --enable-production= yes: </i> switches code optimization, no: switches off code optimization;
* <i> --disable-draw </i> allows OCCT building without Draw.
If location of **FreeImage, TBB, gl2ps** or **OpenCL** is not specified, OCCT will be built without these optional libraries.
If location of **FreeImage, TBB, gl2ps** or **VTK** is not specified, OCCT will be built without these optional libraries.
Attention: 64-bit platforms are detected automatically.
@ -60,7 +60,7 @@ To prevent this, it is suggested to make links:
Example:
\> ./configure -prefix=/PRODUCTS/occt-6.5.5 --with-tcl=/PRODUCTS/tcltk-8.5.8/lib --with-tk=/PRODUCTS/tcltk-8.5.8/lib --with-freetype=/PRODUCTS/freetype-2.4.10 --with-gl2ps=/PRODUCTS/gl2ps-1.3.5 --with-freeimage=/PRODUCTS/freeimage-3.14.1 --with-tbb-include=/PRODUCTS/tbb30_018oss/include --with-tbb-library=/PRODUCTS/tbb30_018oss/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21 --with-opencl-include=/PRODUCTS/opencl-icd-1.2.11.0/include --with-opencl-library=/PRODUCTS/opencl-icd-1.2.11.0/lib
\> ./configure -prefix=/PRODUCTS/occt-6.5.5 --with-tcl=/PRODUCTS/tcltk-8.5.8/lib --with-tk=/PRODUCTS/tcltk-8.5.8/lib --with-freetype=/PRODUCTS/freetype-2.4.10 --with-gl2ps=/PRODUCTS/gl2ps-1.3.5 --with-freeimage=/PRODUCTS/freeimage-3.14.1 --with-tbb-include=/PRODUCTS/tbb30_018oss/include --with-tbb-library=/PRODUCTS/tbb30_018oss/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21 -with-vtk-include=/PRODUCTS/VTK-6.1.0/include/vtk-6.1 with-vtk-library=/PRODUCTS/ /VTK-6.1.0//lib
3.If configure exits successfully, you can build OCCT with *make* command.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

@ -117,14 +117,7 @@ implementation of 3D viewer. OpenGL specification is developed by the
Khronos group, http://www.khronos.org/opengl/. OCCT code includes header
file *glext.h* obtained from Khronos web site.
**OpenCL** (Open Computing Language) is open, royalty-free standard for
cross-platform, parallel programming of modern processors, optionally used by
OCCT for ray tracing. OpenCL specification is developed by the
Khronos group, http://www.khronos.org/opencl/. The implementations of OpenCL
are available from Apple, AMD, NVIDIA, Intel, and other vendors.
**OpenCL Installable Client Driver (ICD) Loader** is a library provided by
Khronos group which allows dispatching OpenCL calls to underlying
implementation.
**VTK** - The **Visualization Toolkit (VTK)** is an open-source, freely available software system for 3D computer graphics, image processing and visualization. OCCT VIS component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library. If you need further information on VTK, please, refer to VTK Homepage http://www.vtk.org/.
**Doxygen** developed by Dimitri van Heesch is open source documentation system for
C++, C, Java, Objective-C, Python, IDL, PHP and C#. This product is used in Open CASCADE Technology
@ -235,12 +228,12 @@ for which OCCT is certified to work.
| Graphic library | OpenGL 1.1+ (OpenGL 2.1+ is recommended)|
| C++ | GNU gcc 4.0. - 4.7.3. |
| TCL (for testing tools) | Tcltk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/download.html |
| Qt (for demonstration tools) | Qt 4.6.2 http://qt-project.org/downloads |
| Freetype (for text rendering) | freetype-2.4.11 http://sourceforge.net/projects/freetype/files/ |
| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.15.4 http://sourceforge.net/projects/freeimage/files |
| Qt (for demonstration tools) | Qt 4.8.6 http://qt-project.org/downloads |
| Freetype (for text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.16.0 http://sourceforge.net/projects/freeimage/files |
| gl2ps (optional, for export contents of OCCT viewer to vector graphic files) | gl2ps-1.3.8 http://geuz.org/gl2ps/ |
| Intel TBB (optional, for multithreaded algorithms) | TBB 3.x or 4.x http://www.threadingbuildingblocks.org/ |
| OpenCL (optional, for ray tracing visualization) | OpenCL SDK (usually one provided by vendor of your graphic card) or OpenCL ICD Loader by Khronos group, http://www.khronos.org/registry/cl |
| VTK (for VTK Integration Services | VTK 6.1.0 http://www.vtk.org/VTK/resources/software.html |
* Debian 60 64 bit is a platform used for regular testing of contributions
@ -253,13 +246,13 @@ for which OCCT is certified to work.
| Video card | See \ref overview_req_graphics |
| Graphic library | OpenGL 1.1+ (OpenGL 2.1+ is recommended)|
| C++ | Microsoft Visual Studio: 2005 SP1, 2008 SP1\*, 2010 SP1, 2012 Update 3, 2013 <br>Intel C++ Composer XE 2013 SP1 |
| TCL (for testing tools) | Tcl/Tk 8.5 or 8.6 http://www.tcl/tk/software/tcltk/download.html |
| Qt (for demonstration tools) | Qt 4.6.2 http://qt-project.org/downloads |
| Freetype (OCCT Text rendering) | freetype-2.4.11 http://sourceforge.net/projects/freetype/files/ |
| FreeImage (Support of common graphic formats) | FreeImage 3.15.4 http://sourceforge.net/projects/freeimage/files |
| TCL (for testing tools) | Tcl/Tk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/download.html |
| Qt (for demonstration tools) | Qt 4.8.6 http://qt-project.org/downloads |
| Freetype (OCCT Text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
| FreeImage (Support of common graphic formats) | FreeImage 3.16.0 http://sourceforge.net/projects/freeimage/files |
| gl2ps (Export contents of OCCT viewer to vector graphic file) | gl2ps-1.3.8 http://geuz.org/gl2ps/ |
| Intel TBB (optional, for multithreaded algorithms) | TBB 3.x or 4.x http://www.threadingbuildingblocks.org/ |
| OpenCL (optional, for ray tracing visualization) | OpenCL SDK (usually one provided by vendor of your graphic card) or OpenCL ICD Loader by Khronos group, http://www.khronos.org/registry/cl |
| VTK (for VTK Integration Services | VTK 6.1.0 http://www.vtk.org/VTK/resources/software.html |
* VC++ 10 32-bit is used for certification of contributions and for building
binary package of official release of OCCT on Windows.
@ -274,19 +267,18 @@ for which OCCT is certified to work.
| Graphic library | OpenGL 1.1+ (OpenGL 2.1+ is recommended)|
| C++ | XCode 3.2 or newer (4.x is recommended) |
| TCL (for testing tools) | Tcltk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/download.html |
| Qt (for demonstration tools) | Qt 4.6.2 http://qt-project.org/downloads |
| Freetype (OCCT Text rendering) | freetype-2.4.11 http://sourceforge.net/projects/freetype/files/ |
| FreeImage (Support of common graphic formats) | FreeImage 3.15.4 http://sourceforge.net/projects/freeimage/files |
| Qt (for demonstration tools) | Qt 4.8.6 http://qt-project.org/downloads |
| Freetype (OCCT Text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
| FreeImage (Support of common graphic formats) | FreeImage 3.16.0 http://sourceforge.net/projects/freeimage/files |
| gl2ps (Export contents of OCCT viewer to vector graphic file) | gl2ps-1.3.8 http://geuz.org/gl2ps/ |
| Intel TBB (optional, for multithreaded algorithms) | TBB 3.x or 4.x http://www.threadingbuildingblocks.org/ |
| OpenCL (optional, for ray tracing visualization) | Native OpenCL 1.2.8 |
@subsection OCCT_OVW_SECTION_5_4 Android
| Operating System | Android 4.0.4+ |
| ----- | ----- |
| Minimum memory | 512 MB, 1 GB recommended |
| Freetype (for text rendering) | freetype-2.4.11 http://sourceforge.net/projects/freetype/files/ |
| Freetype (for text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
@subsection overview_req_graphics Graphic cards
@ -319,7 +311,7 @@ building OCCT from sources on supported platforms.
@subsection OCCT_OVW_SECTION_4_1 Using Windows installer
On Windows Open CASCADE Technology can be installed with binaries precompiled by
Visual C++ 2008 with installation procedure.
Visual C++ 2010 with installation procedure.
**Recommendation:**
@ -345,14 +337,14 @@ When the installation is complete, you will find the directories for 3rd party p
@image html /overview/images/overview_3rdparty.png
@image latex /overview/images/overview_3rdparty.png
The contents of the OCCT-6.7.0 directory (called further "OCCT root", or $CASROOT) are as follows:
The contents of the OCCT-6.8.0 directory (called further "OCCT root", or $CASROOT) are as follows:
@image html /overview/images/overview_installation.png "The directory tree"
@image latex /overview/images/overview_installation.png "The directory tree"
* **adm** This folder contains administration files, which allow rebuilding OCCT;
* **adm/cmake** This folder contains files of CMake building procedure;
* **adm/msvc** This folder contains Visual Studio projects for Visual C++ 2005, 2008 and 2010, which allow rebuilding OCCT under Windows platform in 32 and 64-bit mode;
* **adm/msvc** This folder contains Visual Studio projects for Visual C++ 2005, 2008, 2010, 2012 and 2013 which allow rebuilding OCCT under Windows platform in 32 and 64-bit mode;
* **data** This folder contains CAD files in different formats, which can be used to test the OCCT functionality;
* **doc** This folder contains OCCT documentation in HTML and PDF format;
* **dox** This folder contains sources of OCCT documentation in plain text (MarkDown) format;
@ -361,7 +353,7 @@ The contents of the OCCT-6.7.0 directory (called further "OCCT root", or $CASROO
* **samples** This folder contains sample applications.
* **src** This folder contains OCCT source files. They are organized in folders, one per development unit;
* **tests** This folder contains scripts for OCCT testing.
* **win32/vc9** This folder contains executable and library files built in optimize mode for Windows platform by Visual C++ 2008;
* **win32/vc10** This folder contains executable and library files built in optimize mode for Windows platform by Visual C++ 2010;
@section OCCT_OVW_SECTION_4_2 Environment Variables
@ -392,7 +384,6 @@ The scripts are located in the OCCT root folder.
### Description of system variables:
* **CASROOT** is used to define the root directory of Open CASCADE Technology;
* **PATH** is required to define the path to OCCT binaries and 3rdparty folder;
* **LD_LIBRARY_PATH** is required to define the path to OCCT libraries (on UNIX platforms only);
@ -625,7 +616,7 @@ Export:
See \subpage samples_csharp_occt "Readme" for details.
Also there is an other C# example with the same functionality which demonstrates integration of Direct3D Viewer into .NET applications using WPF front end.
There is also another C# example with the same functionality, which demonstrates the integration of Direct3D Viewer into .NET applications using WPF front end.
See \subpage samples_csharp_direct3d "Readme" for details.

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -2713,7 +2713,7 @@ aPolyHLRToShape.OutLineHCompound();
@section occt_modalg_10_2 Meshing of Shapes
The algorithm of shape triangulation is provided by the functionality of *BRepMesh_IncrementalMesh* class, which adds a triangulation of the shape to its topological data structure.
The algorithm of shape triangulation is provided by the functionality of *BRepMesh_IncrementalMesh* class, which adds a triangulation of the shape to its topological data structure. This triangulation is used to visualize the shape in shaded mode.
~~~~~
const Standard_Real aRadius = 10.0;
@ -2727,23 +2727,26 @@ const Standard_Real anAngularDeflection = 0.5;
BRepMesh_IncrementalMesh aMesh(aShape, aLinearDeflection, Standard_False, anAngularDeflection);
~~~~~
Default meshing algorithm *BRepMesh_IncrementalMesh* has two major options to define triangulation linear and angular deflections. At the first step all edges from face are discretized according to specified parameters. Linear deflection limits distance between curve and its tessellation and angular deflection limits the angle between subsequent segments in polyline.
The default meshing algorithm *BRepMesh_IncrementalMesh* has two major options to define triangulation linear and angular deflections.
@image html /user_guides/modeling_algos/images/modeling_algos_image056.png "Deflection parameters of BRepMesh_IncrementalMesh algorithm"
At the first step all edges from a face are discretized according to the specified parameters.
Linear deflection limits distance between triangles and face interior.
At the second step, the faces are tessellated. Linear deflection limits the distance between a curve and its tessellation, whereas angular deflection limits the angle between subsequent segments in a polyline.
@image html /user_guides/modeling_algos/images/modeling_algos_image057.png "Linear deflection"
@figure{/user_guides/modeling_algos/images/modeling_algos_image056.png, "Deflection parameters of BRepMesh_IncrementalMesh algorithm"}
Note that if given value of linear deflection is less than shape tolerance then the algorithm will skip this value and will take into account the shape tolerance.
Linear deflection limits the distance between triangles and the face interior.
Application should provide deflection parameters to compute satisfying mesh. Angular deflection is relatively simple and default value can be used (12-20 degrees). Linear deflection has absolute meaning and application should provide correct value for its models. Giving small values may result in too huge mesh (a lot of memory, long computation time and slow rendering) while big values results in ugly mesh.
@figure{/user_guides/modeling_algos/images/modeling_algos_image057.png, "Linear deflection"}
For application working in dimensions known in advance this is reasonable to fix absolute linear deflection for all models. This gives a meshes according to metrics and precision used in application (for example models known to be stored in meters and 0.004 m is enough for most tasks).
Note that if a given value of linear deflection is less than shape tolerance then the algorithm will skip this value and will take into account the shape tolerance.
However applications worked with alien models can not use the same deflection for all models (notice that this is abnormal situation in fact and this application is probably just a viewer for CAD models with dimensions vary by an order). To solve this problem conception of relative linear deflection was introduced that has some kind of LOD (level of detail) meaning. This value in fact is a scale factor to absolute deflection applied to model dimensions.
The application should provide deflection parameters to compute a satisfactory mesh. Angular deflection is relatively simple and allows using a default value (12-20 degrees). Linear deflection has an absolute meaning and the application should provide the correct value for its models. Giving small values may result in a too huge mesh (consuming a lot of memory, which results in a long computation time and slow rendering) while big values result in an ugly mesh.
For an application working in dimensions known in advance it can be reasonable to use the absolute linear deflection for all models. This provides meshes according to metrics and precision used in the application (for example, it it is known that the model will be stored in meters, 0.004 m is enough for most tasks).
Meshing covers a shape with a triangular mesh. Other than hidden line removal, you can use meshing to transfer the shape to another tool: a manufacturing tool, a shading algorithm, a finite element algorithm, or a collision algorithm, for example.
However, an application that imports models created in other applications may not use the same deflection for all models. Note that actually this is an abnormal situation and this application is probably just a viewer for CAD models with dimensions varying by an order of magnitude. This problem can be solved by introducing the concept of a relative linear deflection with some LOD (level of detail). The level of detail is a scale factor for absolute deflection, which is applied to model dimensions.
You can obtain information on the shape by first exploring it. To then access triangulation of a face in the shape, use *BRepTool::Triangulation*. To access a polygon which is the approximation of an edge of the face, use *BRepTool::PolygonOnTriangulation*.
Meshing covers a shape with a triangular mesh. Other than hidden line removal, you can use meshing to transfer the shape to another tool: a manufacturing tool, a shading algorithm, a finite element algorithm, or a collision algorithm.
You can obtain information on the shape by first exploring it. To access triangulation of a face in the shape later, use *BRepTool::Triangulation*. To access a polygon, which is the approximation of an edge of the face, use *BRepTool::PolygonOnTriangulation*.

View File

@ -364,177 +364,3 @@ IVtk_ShapeIdList subShapeIds
*TKIVtkDraw* toolkit contains classes for embedding VIS functionality into DRAW Test Harness with possibility of simple interactions, including detection and highlighting.
* *IVtkDraw_HighlightAndSelectionPipeline* - Creates VTK pipeline with OCCT shape data source and properly initialized VIS filters.
* *IVtkDraw_Interactor* - Controls simple interactive actions, such as detection and selection of the displayed shapes.
@section occt_vis_6 Test Harness Commands
A specific plugin with alias *VIS* should be loaded to have access to VIS functionality in DRAW Test Harness:
~~~~
\> pload VIS
~~~~
Typical use cases are available in non-regression tests scripts
@subsection occt_vis_6_1 ivtkinit
Purpose: Creates a window for VTK viewer.
Syntax: *ivtkinit*
@figure{/user_guides/vis/images/vis_image008.png}
@subsection occt_vis_6_2 ivtkdisplay
Purpose: Displays named objects.
Syntax: <i>ivtkdisplay name1 [name2] …[name n]</i>
Example
~~~~
ivtkinit
# create cone
pcone c 5 0 10
ivtkdisplay c
~~~~
@figure{/user_guides/vis/images/vis_image009.png}
@subsection occt_vis_6_3 ivtkerase
Purpose: Erases named objects. If no arguments are passed, erases all displayed objects.
Syntax: <i>ivtkerase [name1] [name2] … [name n] </i>
Example
~~~~
ivtkinit
# create a sphere
psphere s 10
# create a cone
pcone c 5 0 10
# create a cylinder
pcylinder cy 5 10
# display objects
ivtkdisplay s c cy
# erase only the cylinder
ivtkerase cy
# erase the sphere and the cone
ivtkerase s c
~~~~
@subsection occt_vis_6_4 ivtkfit
Purpose: Automatic zoom/panning.
Syntax: *ivtkfit*
@subsection occt_vis_6_5 ivtkdispmode
Purpose: Sets display mode for a named object. If no arguments are passed, sets the given display mode for all displayed objects
The possible modes are: 0 (WireFrame) and 1 (Shading).
Syntax: <i>ivtksetdispmode [name] mode(0,1)</i>
Example
~~~~
ivtkinit
# create a cone
pcone c 5 0 10
# display the cone
ivtkdisplay c
# set shading mode for the cone
ivtksetdispmode c 1
~~~~
@figure{/user_guides/vis/images/vis_image010.png}
@subsection occt_vis_6_6 ivtksetselmode
Purpose: Sets selection mode for a named object. If no arguments are passed, sets the given selection mode for all the displayed objects
Syntax: <i>ivtksetselmode [name] mode on/off(0/1)</i>
Example
~~~~
ivtkinit
# load a shape from file
restore CrankArm.brep a
# display the loaded shape
ivtkdisplay a
# set the face selection mode
ivtksetselmode a 4 1
~~~~
@figure{/user_guides/vis/images/vis_image011.png}
@subsection occt_vis_6_7 ivtkmoveto
Purpose: Imitates mouse cursor moving to point with the given display coordinates.
Syntax: <i>ivtkmoveto x y</i>
Example
~~~~
ivtkinit
pcone c 5 0 10
ivtkdisplay c
ivtkmoveto 40 50
~~~~
@subsection occt_vis_6_8 ivtkselect
Purpose: Imitates mouse cursor moving to point with the given display coordinates and performs selection at this point.
Syntax: <i>ivtkselect x y</i>
Example
~~~~
ivtkinit
pcone c 5 0 10
ivtkdisplay c
ivtkselect 40 50
~~~~
@subsection occt_vis_6_9 ivtkdump
Purpose: Dumps the contents of VTK viewer to image. It supports:
* dumping in different raster graphics formats: PNG, BMP, JPEG, TIFF or PNM.
* dumping of different buffers: RGB, RGBA or depth buffer.
* defining of image sizes (width and height in pixels).
* dumping of stereo projections (left or right).
Syntax: <i> ivtkdump *filename* [buffer={rgb|rgba|depth}] [width height] [stereoproj={L|R}] </i>
Example
~~~~
ivtkinit
pcone c 5 0 10
ivtkdisplay c
ivtkdump D:/ConeSnapshot.png rgb 768 768
~~~~
@subsection occt_vis_6_10 ivtkbgcolor
Purpose: Sets uniform background color or gradient background if second triple of parameters is set. Color parameters r,g,b have to be chosen in the interval [0..255].
Syntax: <i> ivtkbgcolor r g b [r2 g2 b2] </i>
Example
~~~~
ivtkinit
ivtkbgcolor 200 220 250
~~~~
@figure{/user_guides/vis/images/vis_image012.png}
~~~~
ivtkbgcolor 10 30 80 255 255 255
~~~~
@figure{/user_guides/vis/images/vis_image013.png}
@section occt_vis_7 Non-regression tests
The test scenarios are available in <i> /test/v3d/ivtk </i> directory to test the functionality of VIS component. This directory contains test cases for all DRAW commands described above.

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

File diff suppressed because it is too large Load Diff