1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-18 14:27:39 +03:00

0028654: Existed tool (gendoc) for generation documentation does not take into account size of images.

The parameter defining image width has been added to all figures to improve their layout in PDF documents and tweaked depending on the nature of each image.
Additionally, some minor changes improving image and text layout have been introduced.

Remove temporary added possibility for setting image width automatically for generation of pdf documentation.
This commit is contained in:
ysn
2017-06-02 11:55:34 +03:00
committed by bugmaster
parent 26e0b3353c
commit d6b4d3d0d5
20 changed files with 478 additions and 562 deletions

View File

@@ -6,7 +6,7 @@
@section occt_vis_1 Introduction
VIS component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library. This Users Guide describes how to apply VIS classes in application dealing with 3D visualization based on VTK library.
@figure{/user_guides/vis/images/vis_image001.png}
@figure{/user_guides/vis/images/vis_image001.png,"3D visualization based on VTK library",421}
There are two ways to use VIS in the application:
* Use a **high-level API**. It is a simple scenario to use VTK viewer with displayed OCCT shapes. It considers usage of tools provided with VIS component such as a specific VTK data source, a picker class and specific VTK filters. Basically, in this scenario you enrich your custom VTK pipeline with extensions coming from VIS.
@@ -21,14 +21,14 @@ VIS component consists of the following packages:
* **IVtkVTK** -- implementation of interfaces related to VTK visualization toolkit;
* **IVtkTools** -- high-level tools designed for integration into VTK visualization pipelines.
@figure{/user_guides/vis/images/vis_image002.png "Dependencies of VIS packages"}
@figure{/user_guides/vis/images/vis_image002.png, "Dependencies of VIS packages",200}
The idea behind the mentioned organization of packages is separation of interfaces from their actual implementations by their dependencies from a particular library (OCCT, VTK). Besides providing of semantic separation, such splitting helps to avoid excessive dependencies on other OCCT toolkits and VTK.
* **IVtk** package does not depend on VTK libraries at all and needs OCCT libraries only because of collections usage (*TKernel* library);
* Implementation classes from **IVtkOCC** package depend on OCCT libraries only and do not need VTK;
* **IVtkVTK** package depends on VTK libraries only and does not need any OCCT functionality except collections.
@figure{/user_guides/vis/images/vis_image003.png "Dependencies of VIS packages"}
@figure{/user_guides/vis/images/vis_image003.png, "Dependencies of VIS packages", 240}
Basically, it is enough to use the first three packages in the end users application (*IVtk, IVtkOCC* and *IVtkVTK*) to be able to work with OCCT shapes in VTK viewer. However, *IVtkTools* package is also provided as a part of the component to make the work more comfortable.
@@ -156,7 +156,7 @@ For example, the scalar-based coloring can be disabled to bind a single color to
@subsection occt_vis_3_3 Display modes
The output of the shape data source can be presented in wireframe or shading display mode. A specific filter from class *IVtkTools_DisplayModeFilter* can be applied to select the display mode. The filter passes only the cells corresponding to the given mode. The set of available modes is defined by *IVtk_DisplayMode* enumeration.
@figure{/user_guides/vis/images/vis_image004.png}
@figure{/user_guides/vis/images/vis_image004.png,"",360}
For example, the shading representation can be obtained in the following way:
@@ -176,7 +176,7 @@ By default, the display mode filter works in a wireframe mode.
TIP: to make the shading representation smooth, use additional *vtkPolyDataNormals* filter. This filter must be applied after the display mode filter.
@figure{/user_guides/vis/images/vis_image005.png}
@figure{/user_guides/vis/images/vis_image005.png,"",360}
@subsection occt_vis_3_4 Interactive selection
*IVtkTools* package provides *IVtkTools_ShapePicker* class to perform selection of OCCT shapes and sub-shapes in VTK viewer and access the picking results. The typical usage of *IVtkTools_ShapePicker* tool consists in the following sequence of actions:
@@ -241,7 +241,7 @@ OCCT picking algorithm *IVtkTools_ShapePicker* calculates a new transformation m
WARNING: VIS picker essentially works on the initial topological data structures rather than on the actually visualized actors. This peculiarity allows VIS to take advantage of standard OCCT selection mechanism, but puts strict limitations on the corresponding visualization pipelines. Once constructed, the faceted shape representation should not be morphed or translated anyhow. Otherwise, the picking results will lose their associativity with the source geometry. E.g. you should never use *vtkTransform* filter, but rather apply OCCT isometric transformation on the initial model in order to work on already relocated facet. These limitations are often acceptable for CAD visualization. If not, consider usage of a custom VTK-style picker working on the actually visualized actors.
@figure{/user_guides/vis/images/vis_image006.png}
@figure{/user_guides/vis/images/vis_image006.png,"",420}
@subsubsection occt_vis_3_5 Selection of sub-shapes
@@ -282,7 +282,7 @@ The usage of low-level tools is justified in cases when the utilities from *IVtk
The low-level scenario of VIS usage in VTK pipeline is shown in the figure below. The Mesher component produces shape facet (VTK polygonal data) using implementation of *IShapeData* interface. Then result can be retrieved from this implementation as a *vtkPolyData* instance.
@figure{/user_guides/vis/images/vis_image007.svg "Low-level VIS usage with VTK"}
@figure{/user_guides/vis/images/vis_image007.svg "Low-level VIS usage with VTK", 420}
The visualization pipeline for OCCT shape presentation can be initialized as follows:
1. Create an instance of *IShape* class initialized by OCCT topological shape:
@@ -365,3 +365,4 @@ 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.